bkui-vue 0.0.2-beta.35 → 0.0.2-beta.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. package/dist/index.cjs.js +25 -25
  2. package/dist/index.esm.js +30 -14
  3. package/dist/index.umd.js +44 -44
  4. package/lib/affix/index.js +391 -1
  5. package/lib/alert/index.js +287 -1
  6. package/lib/animate-number/index.js +219 -1
  7. package/lib/backtop/index.js +264 -1
  8. package/lib/badge/index.js +304 -1
  9. package/lib/breadcrumb/index.js +379 -1
  10. package/lib/button/index.js +403 -1
  11. package/lib/card/index.js +369 -1
  12. package/lib/cascader/index.js +2095 -2
  13. package/lib/checkbox/index.js +602 -1
  14. package/lib/code-diff/index.js +5548 -1
  15. package/lib/collapse/index.js +605 -1
  16. package/lib/collapse-transition/index.js +237 -1
  17. package/lib/color-picker/index.js +2735 -1
  18. package/lib/components.js +770 -1
  19. package/lib/config-provider/index.js +377 -1
  20. package/lib/container/index.js +408 -1
  21. package/lib/date-picker/index.js +5576 -1
  22. package/lib/dialog/index.js +1324 -2
  23. package/lib/directives/index.js +1386 -2
  24. package/lib/dist.index.js +179 -1
  25. package/lib/divider/index.js +237 -1
  26. package/lib/dropdown/index.js +455 -1
  27. package/lib/exception/index.js +435 -1
  28. package/lib/fixed-navbar/index.js +222 -1
  29. package/lib/form/index.js +1004 -1
  30. package/lib/hooks.js +133 -1
  31. package/lib/icon/angle-double-down-line.js +541 -1
  32. package/lib/icon/angle-double-left-line.js +541 -1
  33. package/lib/icon/angle-double-left.js +541 -1
  34. package/lib/icon/angle-double-right-line.js +541 -1
  35. package/lib/icon/angle-double-right.js +541 -1
  36. package/lib/icon/angle-double-up-line.js +541 -1
  37. package/lib/icon/angle-down-fill.js +541 -1
  38. package/lib/icon/angle-down-line.js +541 -1
  39. package/lib/icon/angle-down.js +541 -1
  40. package/lib/icon/angle-left.js +541 -1
  41. package/lib/icon/angle-right.js +541 -1
  42. package/lib/icon/angle-up-fill.js +541 -1
  43. package/lib/icon/angle-up.js +541 -1
  44. package/lib/icon/archive-fill.js +541 -1
  45. package/lib/icon/arrows-left.js +541 -1
  46. package/lib/icon/arrows-right.js +541 -1
  47. package/lib/icon/assistant.js +541 -1
  48. package/lib/icon/audio-fill.js +541 -1
  49. package/lib/icon/bk.js +541 -1
  50. package/lib/icon/circle.js +541 -1
  51. package/lib/icon/close-line.js +541 -1
  52. package/lib/icon/close.js +541 -1
  53. package/lib/icon/code.js +541 -1
  54. package/lib/icon/cog-shape.js +541 -1
  55. package/lib/icon/collapse-left.js +541 -1
  56. package/lib/icon/copy-shape.js +541 -1
  57. package/lib/icon/copy.js +541 -1
  58. package/lib/icon/data-shape.js +541 -1
  59. package/lib/icon/del.js +541 -1
  60. package/lib/icon/doc-fill.js +541 -1
  61. package/lib/icon/done.js +541 -1
  62. package/lib/icon/down-shape.js +541 -1
  63. package/lib/icon/down-small.js +541 -1
  64. package/lib/icon/edit-line.js +541 -1
  65. package/lib/icon/ellipsis.js +541 -1
  66. package/lib/icon/enlarge-line.js +541 -1
  67. package/lib/icon/error.js +541 -1
  68. package/lib/icon/excel-fill.js +541 -1
  69. package/lib/icon/exclamation-circle-shape.js +541 -1
  70. package/lib/icon/eye.js +541 -1
  71. package/lib/icon/filliscreen-line.js +541 -1
  72. package/lib/icon/fix-line.js +541 -1
  73. package/lib/icon/fix-shape.js +541 -1
  74. package/lib/icon/folder-open.js +541 -1
  75. package/lib/icon/folder-shape-open.js +541 -1
  76. package/lib/icon/folder-shape.js +541 -1
  77. package/lib/icon/folder.js +541 -1
  78. package/lib/icon/funnel.js +541 -1
  79. package/lib/icon/help-document-fill.js +541 -1
  80. package/lib/icon/help-fill.js +541 -1
  81. package/lib/icon/help.js +541 -1
  82. package/lib/icon/image-fill.js +563 -1
  83. package/lib/icon/img-error.js +563 -1
  84. package/lib/icon/img-placehoulder.js +563 -1
  85. package/lib/icon/index.js +2353 -1
  86. package/lib/icon/info-line.js +563 -1
  87. package/lib/icon/info.js +563 -1
  88. package/lib/icon/left-shape.js +563 -1
  89. package/lib/icon/left-turn-line.js +563 -1
  90. package/lib/icon/narrow-line.js +563 -1
  91. package/lib/icon/original.js +563 -1
  92. package/lib/icon/pdf-fill.js +563 -1
  93. package/lib/icon/play-shape.js +563 -1
  94. package/lib/icon/plus.js +563 -1
  95. package/lib/icon/ppt-fill.js +563 -1
  96. package/lib/icon/qq.js +563 -1
  97. package/lib/icon/right-shape.js +563 -1
  98. package/lib/icon/right-turn-line.js +563 -1
  99. package/lib/icon/search.js +563 -1
  100. package/lib/icon/share.js +563 -1
  101. package/lib/icon/spinner.js +563 -1
  102. package/lib/icon/success.js +563 -1
  103. package/lib/icon/switcher-loading.js +563 -1
  104. package/lib/icon/text-file.js +563 -1
  105. package/lib/icon/text-fill.js +563 -1
  106. package/lib/icon/transfer.js +563 -1
  107. package/lib/icon/tree-application-shape.js +563 -1
  108. package/lib/icon/unfull-screen.js +563 -1
  109. package/lib/icon/unvisible.js +563 -1
  110. package/lib/icon/up-shape.js +563 -1
  111. package/lib/icon/upload.js +563 -1
  112. package/lib/icon/video-fill.js +563 -1
  113. package/lib/icon/warn.js +563 -1
  114. package/lib/icon/weixin-pro.js +563 -1
  115. package/lib/icon/weixin.js +563 -1
  116. package/lib/image/index.js +681 -1
  117. package/lib/index.js +195 -1
  118. package/lib/info-box/index.js +1514 -2
  119. package/lib/input/index.js +1038 -1
  120. package/lib/link/index.js +232 -1
  121. package/lib/loading/index.js +443 -1
  122. package/lib/locale/index.js +489 -1
  123. package/lib/menu/index.js +793 -1
  124. package/lib/message/index.js +1842 -2
  125. package/lib/message/messageConstructor.d.ts +1 -1
  126. package/lib/modal/index.js +407 -1
  127. package/lib/navigation/index.js +439 -1
  128. package/lib/notify/index.js +470 -1
  129. package/lib/overflow-title/index.js +547 -1
  130. package/lib/pagination/index.js +974 -1
  131. package/lib/plugin-popover/index.js +4121 -1
  132. package/lib/plugins/index.js +130 -1
  133. package/lib/pop-confirm/index.js +367 -1
  134. package/lib/popover/content.d.ts +8 -0
  135. package/lib/popover/index.d.ts +12 -0
  136. package/lib/popover/index.js +4127 -1
  137. package/lib/popover/popover.d.ts +7 -0
  138. package/lib/popover/props.d.ts +3 -0
  139. package/lib/popover2/index.js +171 -1
  140. package/lib/preset.js +164 -1
  141. package/lib/process/index.js +1146 -2
  142. package/lib/progress/index.js +495 -1
  143. package/lib/radio/index.js +693 -1
  144. package/lib/rate/index.js +406 -1
  145. package/lib/resize-layout/index.js +499 -1
  146. package/lib/search-select/index.js +3024 -2
  147. package/lib/select/index.d.ts +25 -3
  148. package/lib/select/index.js +2599 -2
  149. package/lib/select/select.d.ts +11 -1
  150. package/lib/shared/index.js +2832 -1
  151. package/lib/sideslider/index.js +1056 -2
  152. package/lib/slider/index.js +1683 -2
  153. package/lib/steps/index.js +1215 -2
  154. package/lib/swiper/index.js +404 -1
  155. package/lib/switcher/index.js +335 -1
  156. package/lib/tab/index.js +935 -1
  157. package/lib/table/index.js +6588 -1
  158. package/lib/table-column/index.js +768 -1
  159. package/lib/tag/index.js +309 -1
  160. package/lib/tag-input/index.d.ts +9 -0
  161. package/lib/tag-input/index.js +1758 -1
  162. package/lib/tag-input/tag-input.d.ts +20 -0
  163. package/lib/tag-input/tag-props.d.ts +3 -0
  164. package/lib/time-picker/index.js +142 -1
  165. package/lib/timeline/index.js +310 -1
  166. package/lib/transfer/index.js +767 -1
  167. package/lib/tree/index.js +2664 -1
  168. package/lib/upload/index.js +3257 -2
  169. package/lib/virtual-render/index.js +806 -1
  170. package/package.json +1 -1
  171. package/lib/cascader/index.js.LICENSE.txt +0 -1
  172. package/lib/dialog/index.js.LICENSE.txt +0 -1
  173. package/lib/directives/index.js.LICENSE.txt +0 -14
  174. package/lib/info-box/index.js.LICENSE.txt +0 -1
  175. package/lib/message/index.js.LICENSE.txt +0 -6
  176. package/lib/process/index.js.LICENSE.txt +0 -1
  177. package/lib/search-select/index.js.LICENSE.txt +0 -1
  178. package/lib/select/index.js.LICENSE.txt +0 -1
  179. package/lib/sideslider/index.js.LICENSE.txt +0 -1
  180. package/lib/slider/index.js.LICENSE.txt +0 -1
  181. package/lib/steps/index.js.LICENSE.txt +0 -1
  182. package/lib/upload/index.js.LICENSE.txt +0 -1
@@ -1,2 +1,1842 @@
1
- /*! For license information please see index.js.LICENSE.txt */
2
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("vue"),require("../shared"),require("vue-types"),require("../config-provider"),require("../icon"));else if("function"==typeof define&&define.amd)define(["vue","../shared","vue-types","../config-provider","../icon"],t);else{var n="object"==typeof exports?t(require("vue"),require("../shared"),require("vue-types"),require("../config-provider"),require("../icon")):t(e.vue,e["../shared"],e["vue-types"],e["../config-provider"],e["../icon"]);for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(self,((e,t,n,r,o)=>(()=>{var i={7647:function(e){var t;t=function(){return function(){var e={686:function(e,t,n){"use strict";n.d(t,{default:function(){return b}});var r=n(279),o=n.n(r),i=n(370),s=n.n(i),a=n(817),c=n.n(a);function l(e){try{return document.execCommand(e)}catch(e){return!1}}var u=function(e){var t=c()(e);return l("cut"),t},f=function(e,t){var n=function(e){var t="rtl"===document.documentElement.getAttribute("dir"),n=document.createElement("textarea");n.style.fontSize="12pt",n.style.border="0",n.style.padding="0",n.style.margin="0",n.style.position="absolute",n.style[t?"right":"left"]="-9999px";var r=window.pageYOffset||document.documentElement.scrollTop;return n.style.top="".concat(r,"px"),n.setAttribute("readonly",""),n.value=e,n}(e);t.container.appendChild(n);var r=c()(n);return l("copy"),n.remove(),r},d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body},n="";return"string"==typeof e?n=f(e,t):e instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(null==e?void 0:e.type)?n=f(e.value,t):(n=c()(e),l("copy")),n};function p(e){return p="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},p(e)}function m(e){return m="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},m(e)}function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},h(e,t)}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function g(e,t){var n="data-clipboard-".concat(e);if(t.hasAttribute(n))return t.getAttribute(n)}var j=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(c,e);var t,n,r,o,i,a=(o=c,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=v(o);if(i){var n=v(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){return!t||"object"!==m(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,e)});function c(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(n=a.call(this)).resolveOptions(t),n.listenClick(e),n}return t=c,n=[{key:"resolveOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===m(e.container)?e.container:document.body}},{key:"listenClick",value:function(e){var t=this;this.listener=s()(e,"click",(function(e){return t.onClick(e)}))}},{key:"onClick",value:function(e){var t=e.delegateTarget||e.currentTarget,n=this.action(t)||"copy",r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.action,n=void 0===t?"copy":t,r=e.container,o=e.target,i=e.text;if("copy"!==n&&"cut"!==n)throw new Error('Invalid "action" value, use either "copy" or "cut"');if(void 0!==o){if(!o||"object"!==p(o)||1!==o.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===n&&o.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===n&&(o.hasAttribute("readonly")||o.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes')}return i?d(i,{container:r}):o?"cut"===n?u(o):d(o,{container:r}):void 0}({action:n,container:this.container,target:this.target(t),text:this.text(t)});this.emit(r?"success":"error",{action:n,text:r,trigger:t,clearSelection:function(){t&&t.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(e){return g("action",e)}},{key:"defaultTarget",value:function(e){var t=g("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return g("text",e)}},{key:"destroy",value:function(){this.listener.destroy()}}],r=[{key:"copy",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body};return d(e,t)}},{key:"cut",value:function(e){return u(e)}},{key:"isSupported",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof e?[e]:e,n=!!document.queryCommandSupported;return t.forEach((function(e){n=n&&!!document.queryCommandSupported(e)})),n}}],n&&y(t.prototype,n),r&&y(t,r),c}(o()),b=j},828:function(e){if("undefined"!=typeof Element&&!Element.prototype.matches){var t=Element.prototype;t.matches=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}e.exports=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}}},438:function(e,t,n){var r=n(828);function o(e,t,n,r,o){var s=i.apply(this,arguments);return e.addEventListener(n,s,o),{destroy:function(){e.removeEventListener(n,s,o)}}}function i(e,t,n,o){return function(n){n.delegateTarget=r(n.target,t),n.delegateTarget&&o.call(e,n)}}e.exports=function(e,t,n,r,i){return"function"==typeof e.addEventListener?o.apply(null,arguments):"function"==typeof n?o.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,(function(e){return o(e,t,n,r,i)})))}},879:function(e,t){t.node=function(e){return void 0!==e&&e instanceof HTMLElement&&1===e.nodeType},t.nodeList=function(e){var n=Object.prototype.toString.call(e);return void 0!==e&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in e&&(0===e.length||t.node(e[0]))},t.string=function(e){return"string"==typeof e||e instanceof String},t.fn=function(e){return"[object Function]"===Object.prototype.toString.call(e)}},370:function(e,t,n){var r=n(879),o=n(438);e.exports=function(e,t,n){if(!e&&!t&&!n)throw new Error("Missing required arguments");if(!r.string(t))throw new TypeError("Second argument must be a String");if(!r.fn(n))throw new TypeError("Third argument must be a Function");if(r.node(e))return function(e,t,n){return e.addEventListener(t,n),{destroy:function(){e.removeEventListener(t,n)}}}(e,t,n);if(r.nodeList(e))return function(e,t,n){return Array.prototype.forEach.call(e,(function(e){e.addEventListener(t,n)})),{destroy:function(){Array.prototype.forEach.call(e,(function(e){e.removeEventListener(t,n)}))}}}(e,t,n);if(r.string(e))return function(e,t,n){return o(document.body,e,t,n)}(e,t,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}},817:function(e){e.exports=function(e){var t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){var n=e.hasAttribute("readonly");n||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),n||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();var r=window.getSelection(),o=document.createRange();o.selectNodeContents(e),r.removeAllRanges(),r.addRange(o),t=r.toString()}return t}},279:function(e){function t(){}t.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function o(){r.off(e,o),t.apply(n,arguments)}return o._=t,this.on(e,o,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,o=n.length;r<o;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],o=[];if(r&&t)for(var i=0,s=r.length;i<s;i++)r[i].fn!==t&&r[i].fn._!==t&&o.push(r[i]);return o.length?n[e]=o:delete n[e],this}},e.exports=t,e.exports.TinyEmitter=t}},t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}return n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n(686)}().default},e.exports=t()},4346:function(e){e.exports=function(){"use strict";function e(e){return null===e?"null":typeof e}function t(e){return!!e&&"object"==typeof e}function n(e){if(void 0===e)return"";if(null===e)return"Object";if("object"==typeof e&&!e.constructor)return"Object";var t=/function ([^(]*)/.exec(e.constructor.toString());return t&&t.length>1?t[1]:""}function r(e,t,n){return"null"===e||"undefined"===e?e:("string"!==e&&"stringifiable"!==e||(n='"'+n.replace(/"/g,'\\"')+'"'),"function"===e?t.toString().replace(/[\r\n]/g,"").replace(/\{.*\}/,"")+"{…}":n)}function o(o){var i="";return t(o)?(i=n(o),Array.isArray(o)&&(i+="["+o.length+"]")):i=r(e(o),o,o),i}function i(e){return"json-formatter-"+e}function s(e,t,n){var r=document.createElement(e);return t&&r.classList.add(i(t)),void 0!==n&&(n instanceof Node?r.appendChild(n):r.appendChild(document.createTextNode(String(n)))),r}!function(e){if(e&&"undefined"!=typeof window){var t=document.createElement("style");t.setAttribute("media","screen"),t.innerHTML=e,document.head.appendChild(t)}}('.json-formatter-row {\n font-family: monospace;\n}\n.json-formatter-row,\n.json-formatter-row a,\n.json-formatter-row a:hover {\n color: black;\n text-decoration: none;\n}\n.json-formatter-row .json-formatter-row {\n margin-left: 1rem;\n}\n.json-formatter-row .json-formatter-children.json-formatter-empty {\n opacity: 0.5;\n margin-left: 1rem;\n}\n.json-formatter-row .json-formatter-children.json-formatter-empty:after {\n display: none;\n}\n.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-object:after {\n content: "No properties";\n}\n.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-array:after {\n content: "[]";\n}\n.json-formatter-row .json-formatter-string,\n.json-formatter-row .json-formatter-stringifiable {\n color: green;\n white-space: pre;\n word-wrap: break-word;\n}\n.json-formatter-row .json-formatter-number {\n color: blue;\n}\n.json-formatter-row .json-formatter-boolean {\n color: red;\n}\n.json-formatter-row .json-formatter-null {\n color: #855A00;\n}\n.json-formatter-row .json-formatter-undefined {\n color: #ca0b69;\n}\n.json-formatter-row .json-formatter-function {\n color: #FF20ED;\n}\n.json-formatter-row .json-formatter-date {\n background-color: rgba(0, 0, 0, 0.05);\n}\n.json-formatter-row .json-formatter-url {\n text-decoration: underline;\n color: blue;\n cursor: pointer;\n}\n.json-formatter-row .json-formatter-bracket {\n color: blue;\n}\n.json-formatter-row .json-formatter-key {\n color: #00008B;\n padding-right: 0.2rem;\n}\n.json-formatter-row .json-formatter-toggler-link {\n cursor: pointer;\n}\n.json-formatter-row .json-formatter-toggler {\n line-height: 1.2rem;\n font-size: 0.7rem;\n vertical-align: middle;\n opacity: 0.6;\n cursor: pointer;\n padding-right: 0.2rem;\n}\n.json-formatter-row .json-formatter-toggler:after {\n display: inline-block;\n transition: transform 100ms ease-in;\n content: "►";\n}\n.json-formatter-row > a > .json-formatter-preview-text {\n opacity: 0;\n transition: opacity 0.15s ease-in;\n font-style: italic;\n}\n.json-formatter-row:hover > a > .json-formatter-preview-text {\n opacity: 0.6;\n}\n.json-formatter-row.json-formatter-open > .json-formatter-toggler-link .json-formatter-toggler:after {\n transform: rotate(90deg);\n}\n.json-formatter-row.json-formatter-open > .json-formatter-children:after {\n display: inline-block;\n}\n.json-formatter-row.json-formatter-open > a > .json-formatter-preview-text {\n display: none;\n}\n.json-formatter-row.json-formatter-open.json-formatter-empty:after {\n display: block;\n}\n.json-formatter-dark.json-formatter-row {\n font-family: monospace;\n}\n.json-formatter-dark.json-formatter-row,\n.json-formatter-dark.json-formatter-row a,\n.json-formatter-dark.json-formatter-row a:hover {\n color: white;\n text-decoration: none;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-row {\n margin-left: 1rem;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty {\n opacity: 0.5;\n margin-left: 1rem;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty:after {\n display: none;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-object:after {\n content: "No properties";\n}\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-array:after {\n content: "[]";\n}\n.json-formatter-dark.json-formatter-row .json-formatter-string,\n.json-formatter-dark.json-formatter-row .json-formatter-stringifiable {\n color: #31F031;\n white-space: pre;\n word-wrap: break-word;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-number {\n color: #66C2FF;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-boolean {\n color: #EC4242;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-null {\n color: #EEC97D;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-undefined {\n color: #ef8fbe;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-function {\n color: #FD48CB;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-date {\n background-color: rgba(255, 255, 255, 0.05);\n}\n.json-formatter-dark.json-formatter-row .json-formatter-url {\n text-decoration: underline;\n color: #027BFF;\n cursor: pointer;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-bracket {\n color: #9494FF;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-key {\n color: #23A0DB;\n padding-right: 0.2rem;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-toggler-link {\n cursor: pointer;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-toggler {\n line-height: 1.2rem;\n font-size: 0.7rem;\n vertical-align: middle;\n opacity: 0.6;\n cursor: pointer;\n padding-right: 0.2rem;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-toggler:after {\n display: inline-block;\n transition: transform 100ms ease-in;\n content: "►";\n}\n.json-formatter-dark.json-formatter-row > a > .json-formatter-preview-text {\n opacity: 0;\n transition: opacity 0.15s ease-in;\n font-style: italic;\n}\n.json-formatter-dark.json-formatter-row:hover > a > .json-formatter-preview-text {\n opacity: 0.6;\n}\n.json-formatter-dark.json-formatter-row.json-formatter-open > .json-formatter-toggler-link .json-formatter-toggler:after {\n transform: rotate(90deg);\n}\n.json-formatter-dark.json-formatter-row.json-formatter-open > .json-formatter-children:after {\n display: inline-block;\n}\n.json-formatter-dark.json-formatter-row.json-formatter-open > a > .json-formatter-preview-text {\n display: none;\n}\n.json-formatter-dark.json-formatter-row.json-formatter-open.json-formatter-empty:after {\n display: block;\n}\n');var a=/(^\d{1,4}[\.|\\/|-]\d{1,2}[\.|\\/|-]\d{1,4})(\s*(?:0?[1-9]:[0-5]|1(?=[012])\d:[0-5])\d\s*[ap]m)?$/,c=/\d{2}:\d{2}:\d{2} GMT-\d{4}/,l=/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/,u=window.requestAnimationFrame||function(e){return e(),0},f={hoverPreviewEnabled:!1,hoverPreviewArrayCount:100,hoverPreviewFieldCount:5,animateOpen:!0,animateClose:!0,theme:null,useToJSON:!0,sortPropertiesBy:null};return function(){function d(e,t,n,r){void 0===t&&(t=1),void 0===n&&(n=f),this.json=e,this.open=t,this.config=n,this.key=r,this._isOpen=null,void 0===this.config.hoverPreviewEnabled&&(this.config.hoverPreviewEnabled=f.hoverPreviewEnabled),void 0===this.config.hoverPreviewArrayCount&&(this.config.hoverPreviewArrayCount=f.hoverPreviewArrayCount),void 0===this.config.hoverPreviewFieldCount&&(this.config.hoverPreviewFieldCount=f.hoverPreviewFieldCount),void 0===this.config.useToJSON&&(this.config.useToJSON=f.useToJSON),""===this.key&&(this.key='""')}return Object.defineProperty(d.prototype,"isOpen",{get:function(){return null!==this._isOpen?this._isOpen:this.open>0},set:function(e){this._isOpen=e},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"isDate",{get:function(){return this.json instanceof Date||"string"===this.type&&(a.test(this.json)||l.test(this.json)||c.test(this.json))},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"isUrl",{get:function(){return"string"===this.type&&0===this.json.indexOf("http")},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"isArray",{get:function(){return Array.isArray(this.json)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"isObject",{get:function(){return t(this.json)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"isEmptyObject",{get:function(){return!this.keys.length&&!this.isArray},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"isEmpty",{get:function(){return this.isEmptyObject||this.keys&&!this.keys.length&&this.isArray},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"useToJSON",{get:function(){return this.config.useToJSON&&"stringifiable"===this.type},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"hasKey",{get:function(){return void 0!==this.key},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"constructorName",{get:function(){return n(this.json)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"type",{get:function(){return this.config.useToJSON&&this.json&&this.json.toJSON?"stringifiable":e(this.json)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"keys",{get:function(){if(this.isObject){var e=Object.keys(this.json);return!this.isArray&&this.config.sortPropertiesBy?e.sort(this.config.sortPropertiesBy):e}return[]},enumerable:!0,configurable:!0}),d.prototype.toggleOpen=function(){this.isOpen=!this.isOpen,this.element&&(this.isOpen?this.appendChildren(this.config.animateOpen):this.removeChildren(this.config.animateClose),this.element.classList.toggle(i("open")))},d.prototype.openAtDepth=function(e){void 0===e&&(e=1),e<0||(this.open=e,this.isOpen=0!==e,this.element&&(this.removeChildren(!1),0===e?this.element.classList.remove(i("open")):(this.appendChildren(this.config.animateOpen),this.element.classList.add(i("open")))))},d.prototype.getInlinepreview=function(){var e=this;if(this.isArray)return this.json.length>this.config.hoverPreviewArrayCount?"Array["+this.json.length+"]":"["+this.json.map(o).join(", ")+"]";var t=this.keys,n=t.slice(0,this.config.hoverPreviewFieldCount).map((function(t){return t+":"+o(e.json[t])})),r=t.length>=this.config.hoverPreviewFieldCount?"…":"";return"{"+n.join(", ")+r+"}"},d.prototype.render=function(){this.element=s("div","row");var e=this.isObject?s("a","toggler-link"):s("span");if(this.isObject&&!this.useToJSON&&e.appendChild(s("span","toggler")),this.hasKey&&e.appendChild(s("span","key",this.key+":")),this.isObject&&!this.useToJSON){var t=s("span","value"),n=s("span"),o=s("span","constructor-name",this.constructorName);if(n.appendChild(o),this.isArray){var a=s("span");a.appendChild(s("span","bracket","[")),a.appendChild(s("span","number",this.json.length)),a.appendChild(s("span","bracket","]")),n.appendChild(a)}t.appendChild(n),e.appendChild(t)}else{(t=this.isUrl?s("a"):s("span")).classList.add(i(this.type)),this.isDate&&t.classList.add(i("date")),this.isUrl&&(t.classList.add(i("url")),t.setAttribute("href",this.json));var c=r(this.type,this.json,this.useToJSON?this.json.toJSON():this.json);t.appendChild(document.createTextNode(c)),e.appendChild(t)}if(this.isObject&&this.config.hoverPreviewEnabled){var l=s("span","preview-text");l.appendChild(document.createTextNode(this.getInlinepreview())),e.appendChild(l)}var u=s("div","children");return this.isObject&&u.classList.add(i("object")),this.isArray&&u.classList.add(i("array")),this.isEmpty&&u.classList.add(i("empty")),this.config&&this.config.theme&&this.element.classList.add(i(this.config.theme)),this.isOpen&&this.element.classList.add(i("open")),this.element.appendChild(e),this.element.appendChild(u),this.isObject&&this.isOpen&&this.appendChildren(),this.isObject&&!this.useToJSON&&e.addEventListener("click",this.toggleOpen.bind(this)),this.element},d.prototype.appendChildren=function(e){var t=this;void 0===e&&(e=!1);var n=this.element.querySelector("div."+i("children"));if(n&&!this.isEmpty)if(e){var r=0,o=function(){var e=t.keys[r],i=new d(t.json[e],t.open-1,t.config,e);n.appendChild(i.render()),(r+=1)<t.keys.length&&(r>10?o():u(o))};u(o)}else this.keys.forEach((function(e){var r=new d(t.json[e],t.open-1,t.config,e);n.appendChild(r.render())}))},d.prototype.removeChildren=function(e){void 0===e&&(e=!1);var t=this.element.querySelector("div."+i("children"));if(e){var n=0,r=function(){t&&t.children.length&&(t.removeChild(t.children[0]),(n+=1)>10?r():u(r))};u(r)}else t&&(t.innerHTML="")},d}()}()},2717:e=>{"use strict";e.exports=r},6870:e=>{"use strict";e.exports=o},4212:e=>{"use strict";e.exports=t},748:t=>{"use strict";t.exports=e},210:e=>{"use strict";e.exports=n}},s={};function a(e){var t=s[e];if(void 0!==t)return t.exports;var n=s[e]={exports:{}};return i[e].call(n.exports,n,n.exports,a),n.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return(()=>{"use strict";a.r(c),a.d(c,{default:()=>S});var e=a(748),t=a(4212),n={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},r=1;function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function i(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(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)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e){return s="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},s(e)}function l(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==s(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===s(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u,f,d,p=a(7647),m=a.n(p),y=a(4346),h=a.n(y),v=a(210),g=a(2717),j=a(6870);!function(e){e.PRIMARY="primary",e.WARNING="warning",e.SUCCESS="success",e.ERROR="error"}(u||(u={})),function(e){e.KEY_VALUE="key-value",e.JSON="json"}(f||(f={})),function(e){e.ASSISTANT="assistant",e.DETAILS="details",e.FIX="fix",e.CLOSE="close"}(d||(d={}));var b={id:t.PropTypes.string.def(""),message:(0,v.toType)("IMessage",{}),theme:(0,v.toType)("messageTheme",{}).def(u.PRIMARY),delay:t.PropTypes.number,dismissable:t.PropTypes.bool.def(!0),offsetY:t.PropTypes.number.def(30),spacing:t.PropTypes.number.def(10),extCls:t.PropTypes.string.def(""),onClose:t.PropTypes.func,getContainer:t.PropTypes.instanceOf(HTMLElement),width:t.PropTypes.oneOfType([t.PropTypes.number,t.PropTypes.string]),minWidth:t.PropTypes.oneOfType([t.PropTypes.number,t.PropTypes.string]).def(100),maxWidth:t.PropTypes.oneOfType([t.PropTypes.number,t.PropTypes.string]).def("100%"),actions:(0,v.toType)("IMessageAction",{})};const w=(0,e.defineComponent)({name:"Message",props:b,emits:["destroy","detail"],setup:function(n,r){var o,a=this,c=r.emit,u=r.slots,p=r.expose,y=(0,g.useLocale)("message"),v=(0,g.usePrefix)().resolveClassName,b=(0,e.computed)((function(){return["".concat(v("message")),"".concat(v("message-".concat(n.theme))),"".concat(n.extCls)]})),w=t.bkZIndexManager.getMessageNextIndex(),S=(0,e.computed)((function(){return/^\d+\.?\d*$/.test("".concat(n.delay))?n.delay:"object"!==s(n.message)||(0,e.isVNode)(n.message)?3e3:8e3})),C=function(e){return"number"==typeof n[e]?"".concat(n[e],"px"):n[e]},k=(0,e.computed)((function(){var t={maxWidth:C("maxWidth"),minWidth:C("minWidth")},r="object"===s(n.message)&&!(0,e.isVNode)(n.message);return/%$/.test("".concat(n.width))||/auto/gi.test("".concat(n.width))?Object.assign({width:n.width},t):/^\d+/.test("".concat(n.width))?/^\d+\.?\d*$/.test("".concat(n.width))?Object.assign({width:"".concat(n.width,"px")},t):Object.assign({width:n.width},t):r?{width:"".concat(800,"px")}:{width:"".concat(560,"px")}})),O=(0,e.computed)((function(){return n.getContainer&&(0,t.isElement)(n.getContainer)})),T=(0,e.computed)((function(){return Object.assign({top:"".concat(n.offsetY,"px"),zIndex:w,position:O.value?"absolute":"fixed"},k.value)})),x=(0,e.ref)(null),N=(0,e.ref)(null),E=(0,e.ref)(null),A=(0,e.ref)(!1),L=(0,e.reactive)({isFix:!1,isDetailShow:!1}),P=null,V=function(){P=setTimeout((function(){L.isFix||(A.value=!1)}),S.value)},M=function(e){e.preventDefault(),e.stopPropagation(),A.value=!1},F=(0,e.ref)(null),D=function(){var e=new(m())(E.value,{text:function(){return function(e){var t=e;if("object"===s(e))try{t=JSON.stringify(e)}catch(e){console.error("JSON.stringify Error: ".concat(e))}return t}(n.message.details)}});I(e)},I=function(e,t){["success","error"].forEach((function(n){e.on(n,(function(e){var r=N.value;if(F.value=n,r){var i,s,a=e.trigger,c=a.offsetLeft,l=a.offsetWidth,u=a.offsetTop,f=e.trigger.closest(".message-tree"),d=f?f.scrollTop:0;(i=r.classList).remove.apply(i,["success","error","is-hidden"]),(s=r.classList).add.apply(s,[n,"is-show"]);var p=c+l/2-41,m=u-d-40;r.style.setProperty("transform","translate(".concat(p,"px, ").concat(m,"px")),o&&clearTimeout(o),o=setTimeout((function(){var e,t;(e=r.classList).remove.apply(e,["is-show"]),(t=r.classList).add.apply(t,["is-hidden"])}),2e3)}"function"==typeof t&&t()}))}))},R=function(){var e=new(m())(x.value.querySelectorAll("span.copy-value"),{text:function(e){return e.innerHTML}});I(e)},_=function(e){var t=e;if("string"==typeof e)try{t=JSON.parse(e)}catch(e){console.error("Format Json Error: ".concat(e))}return t},J=function(t,r){if(L.isDetailShow=null!=r?r:!L.isDetailShow,q(t,L.isDetailShow),L.isDetailShow&&"object"===s(n.message)&&!(0,e.isVNode)(n.message)){if(n.message.type===f.JSON||!n.message.type){var o=_(n.message.details),i=new(h())(o);setTimeout((function(){x.value&&(x.value.innerHTML="",x.value.append(i.render())),D()}))}n.message.type===f.KEY_VALUE&&setTimeout((function(){D(),R()})),c("detail",L.isDetailShow,n.id)}},q=function(e,t){L.isFix=null!=t?t:!L.isFix},H=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];"object"===s(n.message)&&!(0,e.isVNode)(n.message)&&(t?document.removeEventListener("keydown",Y):document.addEventListener("keydown",Y))},Y=function(e){e.altKey&&80===e.keyCode&&q(e)};(0,e.onMounted)((function(){S.value&&V(),A.value=!0,H()})),(0,e.onUnmounted)((function(){clearTimeout(P),H(!0)})),(0,e.watch)(A,(function(){A.value||c("destroy",n.id)}));var U=(0,e.computed)((function(){var t;return l(t={},d.ASSISTANT,{id:d.ASSISTANT,icon:function(){return(0,e.createVNode)(j.Assistant,null,null)},text:function(){return y.value.assistant},onClick:function(e){n.message.assistant&&window.open(n.message.assistant,"_blank")}}),l(t,d.DETAILS,{id:d.DETAILS,icon:function(){return L.isDetailShow?(0,e.createVNode)(j.AngleDoubleUpLine,null,null):(0,e.createVNode)(j.AngleDoubleDownLine,null,null)},text:function(){return y.value.details},onClick:function(e){return J(e)}}),l(t,d.FIX,{id:d.FIX,icon:function(){return L.isFix?(0,e.createVNode)(j.FixShape,null,null):(0,e.createVNode)(j.FixLine,null,null)},classList:L.isFix?"fixed":"",onClick:function(e){return q(e)}}),l(t,d.CLOSE,{id:d.CLOSE,classList:"normal-color",icon:function(){return n.dismissable&&(0,e.createVNode)(j.Error,{class:"".concat(v("message-close")),onClick:M},null)},onClick:M}),t})),W=[d.ASSISTANT,d.DETAILS,d.FIX,d.CLOSE],B=(0,e.computed)((function(){var e;if((null===(e=n.actions)||void 0===e?void 0:e.length)>0){var t=n.actions.map((function(e){var t=e.id.toLocaleLowerCase(),n=U.value[t],r=null==n?void 0:n.onClick,o=Object.assign({},U.value[t]||{},e);if(o.id=t,void 0!==e.classList){var c=Array.isArray(e.classList)?e.classList:[e.classList],l=[];void 0!==n.classList&&(l=Array.isArray(n.classList)?n.classList:[n.classList]),o.classList=[].concat(i(l),i(c))}return"function"==typeof e.onClick?(o.onClick=function(){var t=Reflect.apply(e.onClick,a,[]);void 0!==s(t)&&!t||"function"!=typeof r||Reflect.apply(r,a,[])},o):(o.onClick=r,o)})),r=W.filter((function(e){return!t.some((function(t){return t.id===e}))})).map((function(e){return U.value[e]}));return t.push.apply(t,i(r)),t}return W.map((function(e){return U.value[e]}))}));return p({setDetailsShow:J}),{classNames:b,styles:T,visible:A,close:M,setDetailsShow:J,fixMesage:q,copyMessage:D,parseToJson:_,handleMouseenter:function(e){clearTimeout(P)},handleMouseleave:function(e){S.value&&V()},renderMessageActions:function(){var t,n,r=function(t){var n=t.text,r=void 0;if("function"==typeof n&&(r=Reflect.apply(n,a,[])),void 0!==r)return"string"==typeof r?(0,e.createVNode)("span",{class:"message-action-text"},[r]):r};return null!==(n=null===(t=u.action)||void 0===t?void 0:t.call(u))&&void 0!==n?n:B.value.map((function(t){if(t.disabled)return null;if("function"==typeof t.render)return Reflect.apply(t.render,a,[]);var n,o,i=Array.isArray(t.classList)?t.classList.join(" "):t.classList;return(0,e.createVNode)("span",{class:["tool",t.id,i],onClick:function(e){return function(e,t){t.readonly||t.disabled||"function"==typeof t.onClick&&Reflect.apply(t.onClick,a,[e,t])}(e,t)}},[(n=t,o=n.icon,"function"==typeof o?Reflect.apply(o,a,[]):(0,e.createVNode)("span",{class:o},null)),r(t)])}))},refJsonContent:x,refCopyStatus:N,refCopyMsgDiv:E,toolOperation:L,copyStatus:F,t:y,resolveClassName:v,copyValueItem:R}},render:function(){var t=this,n=function(n){return{primary:(0,e.createVNode)(j.Info,null,null),warning:(0,e.createVNode)(j.Warn,null,null),success:(0,e.createVNode)(j.Success,null,null),error:(0,e.createVNode)(j.Close,null,null)}[null!=n?n:t.theme]},r=function(n){if(n.type===f.KEY_VALUE){var r=t.parseToJson(n.details||{});return Object.keys(r).map((function(t){return(0,e.createVNode)("div",{class:"message-row"},[(0,e.createVNode)("label",null,[t]),(0,e.createVNode)("span",{class:"copy-value"},[r[t]])])}))}};return(0,e.createVNode)(e.Transition,{name:"bk-message-fade"},{default:function(){return[(0,e.withDirectives)((0,e.createVNode)("div",{class:t.classNames,style:t.styles,onMouseenter:t.handleMouseenter,onMouseleave:t.handleMouseleave},["object"!==s(t.message)||(0,e.isVNode)(t.message)?(0,e.createVNode)(e.Fragment,null,[(0,e.createVNode)("div",{class:"".concat(t.resolveClassName("message-content"))},[(0,e.createVNode)("div",{class:"".concat(t.resolveClassName("message-icon"))},[n()]),t.message]),t.dismissable&&(0,e.createVNode)(j.Error,{class:"".concat(t.resolveClassName("message-close")),onClick:t.close},null)]):(0,e.createVNode)("div",{class:"".concat(t.resolveClassName("message-content")," multi")},[(0,e.createVNode)("div",{class:"overview"},[(0,e.createVNode)("div",{class:"left-content"},[(0,e.createVNode)("div",{class:"".concat(t.resolveClassName("message-icon"))},[n()]),(0,e.createVNode)("div",{class:"describe"},[null!==(a=null===(i=(o=t.$slots).title)||void 0===i?void 0:i.call(o))&&void 0!==a?a:"【".concat(t.message.code,"】").concat(t.message.overview," ").concat(t.message.suggestion)])]),(0,e.createVNode)("div",{class:"tools"},[t.renderMessageActions()])]),t.toolOperation.isDetailShow&&(0,e.createVNode)("div",{class:"message-detail"},[(0,e.createVNode)("div",{class:"message-copy",ref:"refCopyMsgDiv"},[(0,e.createVNode)(j.CopyShape,null,null)]),(0,e.createVNode)("div",{class:"copy-status",ref:"refCopyStatus"},[(0,e.createVNode)("div",{class:"inner"},[n(t.copyStatus),"success"===t.copyStatus?t.t.copySuccess:t.t.copyFailed])]),(0,e.createVNode)("div",{ref:"refJsonContent",class:"message-tree"},[r(t.message)])])])]),[[e.vShow,t.visible]])];var o,i,a}})}}),S=function(o){!function(o,i){var s=i,a=s.position||"top-right";"string"==typeof i&&(s={message:i});var c=i.onClose,l=s.offsetX||10,u=s.offsetY||30,f=s.spacing,d=void 0===f?10:f;n[a].forEach((function(e){u+=(e.el.offsetHeight||0)+d}));var p="message_".concat(r+=1);s=Object.assign(Object.assign({},s),{offsetX:l,offsetY:u,id:p});var m=document.createElement("div"),y=(0,e.createVNode)(o,s);y.props.onDestroy=function(t){!function(e,t,r,o){null==o||o();var i=t.startsWith("top")?"top":"bottom",s=-1;n[t].forEach((function(t,n){t.props.id===e&&(s=n)}));for(var a=n[t][s].el.offsetHeight,c=n[t].length,l=s;l<c;l++){var u=parseInt(n[t][l].el.style[i],10)-a-r;n[t][l].component.props.offsetY=u}n[t].splice(s,1)}(t,a,d,c),(0,e.render)(null,m)},y.props.onDetail=function(e,t){n[a].forEach((function(e){var n,r;e.props.id!==t&&(null===(r=null===(n=e.component)||void 0===n?void 0:n.exposed)||void 0===r||r.setDetailsShow(null,!1))}))},(0,e.render)(y,m),n[a].push(y),(y.props.getContainer&&(0,t.isElement)(y.props.getContainer)?y.props.getContainer:document.body).appendChild(m.firstElementChild)}(w,o)}})(),c})()));
1
+ (function webpackUniversalModuleDefinition(root, factory) {
2
+ if(typeof exports === 'object' && typeof module === 'object')
3
+ module.exports = factory(require("vue"), require("../shared"), require("vue-types"), require("../config-provider"), require("../icon"));
4
+ else if(typeof define === 'function' && define.amd)
5
+ define(["vue", "../shared", "vue-types", "../config-provider", "../icon"], factory);
6
+ else {
7
+ var a = typeof exports === 'object' ? factory(require("vue"), require("../shared"), require("vue-types"), require("../config-provider"), require("../icon")) : factory(root["vue"], root["../shared"], root["vue-types"], root["../config-provider"], root["../icon"]);
8
+ for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
9
+ }
10
+ })(self, (__WEBPACK_EXTERNAL_MODULE__748__, __WEBPACK_EXTERNAL_MODULE__4212__, __WEBPACK_EXTERNAL_MODULE__210__, __WEBPACK_EXTERNAL_MODULE__2717__, __WEBPACK_EXTERNAL_MODULE__6870__) => {
11
+ return /******/ (() => { // webpackBootstrap
12
+ /******/ var __webpack_modules__ = ({
13
+
14
+ /***/ 7647:
15
+ /***/ (function(module) {
16
+
17
+ /*!
18
+ * clipboard.js v2.0.11
19
+ * https://clipboardjs.com/
20
+ *
21
+ * Licensed MIT © Zeno Rocha
22
+ */
23
+ (function webpackUniversalModuleDefinition(root, factory) {
24
+ if(true)
25
+ module.exports = factory();
26
+ else {}
27
+ })(this, function() {
28
+ return /******/ (function() { // webpackBootstrap
29
+ /******/ var __webpack_modules__ = ({
30
+
31
+ /***/ 686:
32
+ /***/ (function(__unused_webpack_module, __nested_webpack_exports__, __nested_webpack_require_623__) {
33
+
34
+ "use strict";
35
+
36
+ // EXPORTS
37
+ __nested_webpack_require_623__.d(__nested_webpack_exports__, {
38
+ "default": function() { return /* binding */ clipboard; }
39
+ });
40
+
41
+ // EXTERNAL MODULE: ./node_modules/tiny-emitter/index.js
42
+ var tiny_emitter = __nested_webpack_require_623__(279);
43
+ var tiny_emitter_default = /*#__PURE__*/__nested_webpack_require_623__.n(tiny_emitter);
44
+ // EXTERNAL MODULE: ./node_modules/good-listener/src/listen.js
45
+ var listen = __nested_webpack_require_623__(370);
46
+ var listen_default = /*#__PURE__*/__nested_webpack_require_623__.n(listen);
47
+ // EXTERNAL MODULE: ./node_modules/select/src/select.js
48
+ var src_select = __nested_webpack_require_623__(817);
49
+ var select_default = /*#__PURE__*/__nested_webpack_require_623__.n(src_select);
50
+ ;// CONCATENATED MODULE: ./src/common/command.js
51
+ /**
52
+ * Executes a given operation type.
53
+ * @param {String} type
54
+ * @return {Boolean}
55
+ */
56
+ function command(type) {
57
+ try {
58
+ return document.execCommand(type);
59
+ } catch (err) {
60
+ return false;
61
+ }
62
+ }
63
+ ;// CONCATENATED MODULE: ./src/actions/cut.js
64
+
65
+
66
+ /**
67
+ * Cut action wrapper.
68
+ * @param {String|HTMLElement} target
69
+ * @return {String}
70
+ */
71
+
72
+ var ClipboardActionCut = function ClipboardActionCut(target) {
73
+ var selectedText = select_default()(target);
74
+ command('cut');
75
+ return selectedText;
76
+ };
77
+
78
+ /* harmony default export */ var actions_cut = (ClipboardActionCut);
79
+ ;// CONCATENATED MODULE: ./src/common/create-fake-element.js
80
+ /**
81
+ * Creates a fake textarea element with a value.
82
+ * @param {String} value
83
+ * @return {HTMLElement}
84
+ */
85
+ function createFakeElement(value) {
86
+ var isRTL = document.documentElement.getAttribute('dir') === 'rtl';
87
+ var fakeElement = document.createElement('textarea'); // Prevent zooming on iOS
88
+
89
+ fakeElement.style.fontSize = '12pt'; // Reset box model
90
+
91
+ fakeElement.style.border = '0';
92
+ fakeElement.style.padding = '0';
93
+ fakeElement.style.margin = '0'; // Move element out of screen horizontally
94
+
95
+ fakeElement.style.position = 'absolute';
96
+ fakeElement.style[isRTL ? 'right' : 'left'] = '-9999px'; // Move element to the same position vertically
97
+
98
+ var yPosition = window.pageYOffset || document.documentElement.scrollTop;
99
+ fakeElement.style.top = "".concat(yPosition, "px");
100
+ fakeElement.setAttribute('readonly', '');
101
+ fakeElement.value = value;
102
+ return fakeElement;
103
+ }
104
+ ;// CONCATENATED MODULE: ./src/actions/copy.js
105
+
106
+
107
+
108
+ /**
109
+ * Create fake copy action wrapper using a fake element.
110
+ * @param {String} target
111
+ * @param {Object} options
112
+ * @return {String}
113
+ */
114
+
115
+ var fakeCopyAction = function fakeCopyAction(value, options) {
116
+ var fakeElement = createFakeElement(value);
117
+ options.container.appendChild(fakeElement);
118
+ var selectedText = select_default()(fakeElement);
119
+ command('copy');
120
+ fakeElement.remove();
121
+ return selectedText;
122
+ };
123
+ /**
124
+ * Copy action wrapper.
125
+ * @param {String|HTMLElement} target
126
+ * @param {Object} options
127
+ * @return {String}
128
+ */
129
+
130
+
131
+ var ClipboardActionCopy = function ClipboardActionCopy(target) {
132
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
133
+ container: document.body
134
+ };
135
+ var selectedText = '';
136
+
137
+ if (typeof target === 'string') {
138
+ selectedText = fakeCopyAction(target, options);
139
+ } else if (target instanceof HTMLInputElement && !['text', 'search', 'url', 'tel', 'password'].includes(target === null || target === void 0 ? void 0 : target.type)) {
140
+ // If input type doesn't support `setSelectionRange`. Simulate it. https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange
141
+ selectedText = fakeCopyAction(target.value, options);
142
+ } else {
143
+ selectedText = select_default()(target);
144
+ command('copy');
145
+ }
146
+
147
+ return selectedText;
148
+ };
149
+
150
+ /* harmony default export */ var actions_copy = (ClipboardActionCopy);
151
+ ;// CONCATENATED MODULE: ./src/actions/default.js
152
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
153
+
154
+
155
+
156
+ /**
157
+ * Inner function which performs selection from either `text` or `target`
158
+ * properties and then executes copy or cut operations.
159
+ * @param {Object} options
160
+ */
161
+
162
+ var ClipboardActionDefault = function ClipboardActionDefault() {
163
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
164
+ // Defines base properties passed from constructor.
165
+ var _options$action = options.action,
166
+ action = _options$action === void 0 ? 'copy' : _options$action,
167
+ container = options.container,
168
+ target = options.target,
169
+ text = options.text; // Sets the `action` to be performed which can be either 'copy' or 'cut'.
170
+
171
+ if (action !== 'copy' && action !== 'cut') {
172
+ throw new Error('Invalid "action" value, use either "copy" or "cut"');
173
+ } // Sets the `target` property using an element that will be have its content copied.
174
+
175
+
176
+ if (target !== undefined) {
177
+ if (target && _typeof(target) === 'object' && target.nodeType === 1) {
178
+ if (action === 'copy' && target.hasAttribute('disabled')) {
179
+ throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');
180
+ }
181
+
182
+ if (action === 'cut' && (target.hasAttribute('readonly') || target.hasAttribute('disabled'))) {
183
+ throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');
184
+ }
185
+ } else {
186
+ throw new Error('Invalid "target" value, use a valid Element');
187
+ }
188
+ } // Define selection strategy based on `text` property.
189
+
190
+
191
+ if (text) {
192
+ return actions_copy(text, {
193
+ container: container
194
+ });
195
+ } // Defines which selection strategy based on `target` property.
196
+
197
+
198
+ if (target) {
199
+ return action === 'cut' ? actions_cut(target) : actions_copy(target, {
200
+ container: container
201
+ });
202
+ }
203
+ };
204
+
205
+ /* harmony default export */ var actions_default = (ClipboardActionDefault);
206
+ ;// CONCATENATED MODULE: ./src/clipboard.js
207
+ function clipboard_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { clipboard_typeof = function _typeof(obj) { return typeof obj; }; } else { clipboard_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return clipboard_typeof(obj); }
208
+
209
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
210
+
211
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
212
+
213
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
214
+
215
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
216
+
217
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
218
+
219
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
220
+
221
+ function _possibleConstructorReturn(self, call) { if (call && (clipboard_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
222
+
223
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
224
+
225
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
226
+
227
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
228
+
229
+
230
+
231
+
232
+
233
+
234
+ /**
235
+ * Helper function to retrieve attribute value.
236
+ * @param {String} suffix
237
+ * @param {Element} element
238
+ */
239
+
240
+ function getAttributeValue(suffix, element) {
241
+ var attribute = "data-clipboard-".concat(suffix);
242
+
243
+ if (!element.hasAttribute(attribute)) {
244
+ return;
245
+ }
246
+
247
+ return element.getAttribute(attribute);
248
+ }
249
+ /**
250
+ * Base class which takes one or more elements, adds event listeners to them,
251
+ * and instantiates a new `ClipboardAction` on each click.
252
+ */
253
+
254
+
255
+ var Clipboard = /*#__PURE__*/function (_Emitter) {
256
+ _inherits(Clipboard, _Emitter);
257
+
258
+ var _super = _createSuper(Clipboard);
259
+
260
+ /**
261
+ * @param {String|HTMLElement|HTMLCollection|NodeList} trigger
262
+ * @param {Object} options
263
+ */
264
+ function Clipboard(trigger, options) {
265
+ var _this;
266
+
267
+ _classCallCheck(this, Clipboard);
268
+
269
+ _this = _super.call(this);
270
+
271
+ _this.resolveOptions(options);
272
+
273
+ _this.listenClick(trigger);
274
+
275
+ return _this;
276
+ }
277
+ /**
278
+ * Defines if attributes would be resolved using internal setter functions
279
+ * or custom functions that were passed in the constructor.
280
+ * @param {Object} options
281
+ */
282
+
283
+
284
+ _createClass(Clipboard, [{
285
+ key: "resolveOptions",
286
+ value: function resolveOptions() {
287
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
288
+ this.action = typeof options.action === 'function' ? options.action : this.defaultAction;
289
+ this.target = typeof options.target === 'function' ? options.target : this.defaultTarget;
290
+ this.text = typeof options.text === 'function' ? options.text : this.defaultText;
291
+ this.container = clipboard_typeof(options.container) === 'object' ? options.container : document.body;
292
+ }
293
+ /**
294
+ * Adds a click event listener to the passed trigger.
295
+ * @param {String|HTMLElement|HTMLCollection|NodeList} trigger
296
+ */
297
+
298
+ }, {
299
+ key: "listenClick",
300
+ value: function listenClick(trigger) {
301
+ var _this2 = this;
302
+
303
+ this.listener = listen_default()(trigger, 'click', function (e) {
304
+ return _this2.onClick(e);
305
+ });
306
+ }
307
+ /**
308
+ * Defines a new `ClipboardAction` on each click event.
309
+ * @param {Event} e
310
+ */
311
+
312
+ }, {
313
+ key: "onClick",
314
+ value: function onClick(e) {
315
+ var trigger = e.delegateTarget || e.currentTarget;
316
+ var action = this.action(trigger) || 'copy';
317
+ var text = actions_default({
318
+ action: action,
319
+ container: this.container,
320
+ target: this.target(trigger),
321
+ text: this.text(trigger)
322
+ }); // Fires an event based on the copy operation result.
323
+
324
+ this.emit(text ? 'success' : 'error', {
325
+ action: action,
326
+ text: text,
327
+ trigger: trigger,
328
+ clearSelection: function clearSelection() {
329
+ if (trigger) {
330
+ trigger.focus();
331
+ }
332
+
333
+ window.getSelection().removeAllRanges();
334
+ }
335
+ });
336
+ }
337
+ /**
338
+ * Default `action` lookup function.
339
+ * @param {Element} trigger
340
+ */
341
+
342
+ }, {
343
+ key: "defaultAction",
344
+ value: function defaultAction(trigger) {
345
+ return getAttributeValue('action', trigger);
346
+ }
347
+ /**
348
+ * Default `target` lookup function.
349
+ * @param {Element} trigger
350
+ */
351
+
352
+ }, {
353
+ key: "defaultTarget",
354
+ value: function defaultTarget(trigger) {
355
+ var selector = getAttributeValue('target', trigger);
356
+
357
+ if (selector) {
358
+ return document.querySelector(selector);
359
+ }
360
+ }
361
+ /**
362
+ * Allow fire programmatically a copy action
363
+ * @param {String|HTMLElement} target
364
+ * @param {Object} options
365
+ * @returns Text copied.
366
+ */
367
+
368
+ }, {
369
+ key: "defaultText",
370
+
371
+ /**
372
+ * Default `text` lookup function.
373
+ * @param {Element} trigger
374
+ */
375
+ value: function defaultText(trigger) {
376
+ return getAttributeValue('text', trigger);
377
+ }
378
+ /**
379
+ * Destroy lifecycle.
380
+ */
381
+
382
+ }, {
383
+ key: "destroy",
384
+ value: function destroy() {
385
+ this.listener.destroy();
386
+ }
387
+ }], [{
388
+ key: "copy",
389
+ value: function copy(target) {
390
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
391
+ container: document.body
392
+ };
393
+ return actions_copy(target, options);
394
+ }
395
+ /**
396
+ * Allow fire programmatically a cut action
397
+ * @param {String|HTMLElement} target
398
+ * @returns Text cutted.
399
+ */
400
+
401
+ }, {
402
+ key: "cut",
403
+ value: function cut(target) {
404
+ return actions_cut(target);
405
+ }
406
+ /**
407
+ * Returns the support of the given action, or all actions if no action is
408
+ * given.
409
+ * @param {String} [action]
410
+ */
411
+
412
+ }, {
413
+ key: "isSupported",
414
+ value: function isSupported() {
415
+ var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['copy', 'cut'];
416
+ var actions = typeof action === 'string' ? [action] : action;
417
+ var support = !!document.queryCommandSupported;
418
+ actions.forEach(function (action) {
419
+ support = support && !!document.queryCommandSupported(action);
420
+ });
421
+ return support;
422
+ }
423
+ }]);
424
+
425
+ return Clipboard;
426
+ }((tiny_emitter_default()));
427
+
428
+ /* harmony default export */ var clipboard = (Clipboard);
429
+
430
+ /***/ }),
431
+
432
+ /***/ 828:
433
+ /***/ (function(module) {
434
+
435
+ var DOCUMENT_NODE_TYPE = 9;
436
+
437
+ /**
438
+ * A polyfill for Element.matches()
439
+ */
440
+ if (typeof Element !== 'undefined' && !Element.prototype.matches) {
441
+ var proto = Element.prototype;
442
+
443
+ proto.matches = proto.matchesSelector ||
444
+ proto.mozMatchesSelector ||
445
+ proto.msMatchesSelector ||
446
+ proto.oMatchesSelector ||
447
+ proto.webkitMatchesSelector;
448
+ }
449
+
450
+ /**
451
+ * Finds the closest parent that matches a selector.
452
+ *
453
+ * @param {Element} element
454
+ * @param {String} selector
455
+ * @return {Function}
456
+ */
457
+ function closest (element, selector) {
458
+ while (element && element.nodeType !== DOCUMENT_NODE_TYPE) {
459
+ if (typeof element.matches === 'function' &&
460
+ element.matches(selector)) {
461
+ return element;
462
+ }
463
+ element = element.parentNode;
464
+ }
465
+ }
466
+
467
+ module.exports = closest;
468
+
469
+
470
+ /***/ }),
471
+
472
+ /***/ 438:
473
+ /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_15749__) {
474
+
475
+ var closest = __nested_webpack_require_15749__(828);
476
+
477
+ /**
478
+ * Delegates event to a selector.
479
+ *
480
+ * @param {Element} element
481
+ * @param {String} selector
482
+ * @param {String} type
483
+ * @param {Function} callback
484
+ * @param {Boolean} useCapture
485
+ * @return {Object}
486
+ */
487
+ function _delegate(element, selector, type, callback, useCapture) {
488
+ var listenerFn = listener.apply(this, arguments);
489
+
490
+ element.addEventListener(type, listenerFn, useCapture);
491
+
492
+ return {
493
+ destroy: function() {
494
+ element.removeEventListener(type, listenerFn, useCapture);
495
+ }
496
+ }
497
+ }
498
+
499
+ /**
500
+ * Delegates event to a selector.
501
+ *
502
+ * @param {Element|String|Array} [elements]
503
+ * @param {String} selector
504
+ * @param {String} type
505
+ * @param {Function} callback
506
+ * @param {Boolean} useCapture
507
+ * @return {Object}
508
+ */
509
+ function delegate(elements, selector, type, callback, useCapture) {
510
+ // Handle the regular Element usage
511
+ if (typeof elements.addEventListener === 'function') {
512
+ return _delegate.apply(null, arguments);
513
+ }
514
+
515
+ // Handle Element-less usage, it defaults to global delegation
516
+ if (typeof type === 'function') {
517
+ // Use `document` as the first parameter, then apply arguments
518
+ // This is a short way to .unshift `arguments` without running into deoptimizations
519
+ return _delegate.bind(null, document).apply(null, arguments);
520
+ }
521
+
522
+ // Handle Selector-based usage
523
+ if (typeof elements === 'string') {
524
+ elements = document.querySelectorAll(elements);
525
+ }
526
+
527
+ // Handle Array-like based usage
528
+ return Array.prototype.map.call(elements, function (element) {
529
+ return _delegate(element, selector, type, callback, useCapture);
530
+ });
531
+ }
532
+
533
+ /**
534
+ * Finds closest match and invokes callback.
535
+ *
536
+ * @param {Element} element
537
+ * @param {String} selector
538
+ * @param {String} type
539
+ * @param {Function} callback
540
+ * @return {Function}
541
+ */
542
+ function listener(element, selector, type, callback) {
543
+ return function(e) {
544
+ e.delegateTarget = closest(e.target, selector);
545
+
546
+ if (e.delegateTarget) {
547
+ callback.call(element, e);
548
+ }
549
+ }
550
+ }
551
+
552
+ module.exports = delegate;
553
+
554
+
555
+ /***/ }),
556
+
557
+ /***/ 879:
558
+ /***/ (function(__unused_webpack_module, exports) {
559
+
560
+ /**
561
+ * Check if argument is a HTML element.
562
+ *
563
+ * @param {Object} value
564
+ * @return {Boolean}
565
+ */
566
+ exports.node = function(value) {
567
+ return value !== undefined
568
+ && value instanceof HTMLElement
569
+ && value.nodeType === 1;
570
+ };
571
+
572
+ /**
573
+ * Check if argument is a list of HTML elements.
574
+ *
575
+ * @param {Object} value
576
+ * @return {Boolean}
577
+ */
578
+ exports.nodeList = function(value) {
579
+ var type = Object.prototype.toString.call(value);
580
+
581
+ return value !== undefined
582
+ && (type === '[object NodeList]' || type === '[object HTMLCollection]')
583
+ && ('length' in value)
584
+ && (value.length === 0 || exports.node(value[0]));
585
+ };
586
+
587
+ /**
588
+ * Check if argument is a string.
589
+ *
590
+ * @param {Object} value
591
+ * @return {Boolean}
592
+ */
593
+ exports.string = function(value) {
594
+ return typeof value === 'string'
595
+ || value instanceof String;
596
+ };
597
+
598
+ /**
599
+ * Check if argument is a function.
600
+ *
601
+ * @param {Object} value
602
+ * @return {Boolean}
603
+ */
604
+ exports.fn = function(value) {
605
+ var type = Object.prototype.toString.call(value);
606
+
607
+ return type === '[object Function]';
608
+ };
609
+
610
+
611
+ /***/ }),
612
+
613
+ /***/ 370:
614
+ /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_19113__) {
615
+
616
+ var is = __nested_webpack_require_19113__(879);
617
+ var delegate = __nested_webpack_require_19113__(438);
618
+
619
+ /**
620
+ * Validates all params and calls the right
621
+ * listener function based on its target type.
622
+ *
623
+ * @param {String|HTMLElement|HTMLCollection|NodeList} target
624
+ * @param {String} type
625
+ * @param {Function} callback
626
+ * @return {Object}
627
+ */
628
+ function listen(target, type, callback) {
629
+ if (!target && !type && !callback) {
630
+ throw new Error('Missing required arguments');
631
+ }
632
+
633
+ if (!is.string(type)) {
634
+ throw new TypeError('Second argument must be a String');
635
+ }
636
+
637
+ if (!is.fn(callback)) {
638
+ throw new TypeError('Third argument must be a Function');
639
+ }
640
+
641
+ if (is.node(target)) {
642
+ return listenNode(target, type, callback);
643
+ }
644
+ else if (is.nodeList(target)) {
645
+ return listenNodeList(target, type, callback);
646
+ }
647
+ else if (is.string(target)) {
648
+ return listenSelector(target, type, callback);
649
+ }
650
+ else {
651
+ throw new TypeError('First argument must be a String, HTMLElement, HTMLCollection, or NodeList');
652
+ }
653
+ }
654
+
655
+ /**
656
+ * Adds an event listener to a HTML element
657
+ * and returns a remove listener function.
658
+ *
659
+ * @param {HTMLElement} node
660
+ * @param {String} type
661
+ * @param {Function} callback
662
+ * @return {Object}
663
+ */
664
+ function listenNode(node, type, callback) {
665
+ node.addEventListener(type, callback);
666
+
667
+ return {
668
+ destroy: function() {
669
+ node.removeEventListener(type, callback);
670
+ }
671
+ }
672
+ }
673
+
674
+ /**
675
+ * Add an event listener to a list of HTML elements
676
+ * and returns a remove listener function.
677
+ *
678
+ * @param {NodeList|HTMLCollection} nodeList
679
+ * @param {String} type
680
+ * @param {Function} callback
681
+ * @return {Object}
682
+ */
683
+ function listenNodeList(nodeList, type, callback) {
684
+ Array.prototype.forEach.call(nodeList, function(node) {
685
+ node.addEventListener(type, callback);
686
+ });
687
+
688
+ return {
689
+ destroy: function() {
690
+ Array.prototype.forEach.call(nodeList, function(node) {
691
+ node.removeEventListener(type, callback);
692
+ });
693
+ }
694
+ }
695
+ }
696
+
697
+ /**
698
+ * Add an event listener to a selector
699
+ * and returns a remove listener function.
700
+ *
701
+ * @param {String} selector
702
+ * @param {String} type
703
+ * @param {Function} callback
704
+ * @return {Object}
705
+ */
706
+ function listenSelector(selector, type, callback) {
707
+ return delegate(document.body, selector, type, callback);
708
+ }
709
+
710
+ module.exports = listen;
711
+
712
+
713
+ /***/ }),
714
+
715
+ /***/ 817:
716
+ /***/ (function(module) {
717
+
718
+ function select(element) {
719
+ var selectedText;
720
+
721
+ if (element.nodeName === 'SELECT') {
722
+ element.focus();
723
+
724
+ selectedText = element.value;
725
+ }
726
+ else if (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') {
727
+ var isReadOnly = element.hasAttribute('readonly');
728
+
729
+ if (!isReadOnly) {
730
+ element.setAttribute('readonly', '');
731
+ }
732
+
733
+ element.select();
734
+ element.setSelectionRange(0, element.value.length);
735
+
736
+ if (!isReadOnly) {
737
+ element.removeAttribute('readonly');
738
+ }
739
+
740
+ selectedText = element.value;
741
+ }
742
+ else {
743
+ if (element.hasAttribute('contenteditable')) {
744
+ element.focus();
745
+ }
746
+
747
+ var selection = window.getSelection();
748
+ var range = document.createRange();
749
+
750
+ range.selectNodeContents(element);
751
+ selection.removeAllRanges();
752
+ selection.addRange(range);
753
+
754
+ selectedText = selection.toString();
755
+ }
756
+
757
+ return selectedText;
758
+ }
759
+
760
+ module.exports = select;
761
+
762
+
763
+ /***/ }),
764
+
765
+ /***/ 279:
766
+ /***/ (function(module) {
767
+
768
+ function E () {
769
+ // Keep this empty so it's easier to inherit from
770
+ // (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)
771
+ }
772
+
773
+ E.prototype = {
774
+ on: function (name, callback, ctx) {
775
+ var e = this.e || (this.e = {});
776
+
777
+ (e[name] || (e[name] = [])).push({
778
+ fn: callback,
779
+ ctx: ctx
780
+ });
781
+
782
+ return this;
783
+ },
784
+
785
+ once: function (name, callback, ctx) {
786
+ var self = this;
787
+ function listener () {
788
+ self.off(name, listener);
789
+ callback.apply(ctx, arguments);
790
+ };
791
+
792
+ listener._ = callback
793
+ return this.on(name, listener, ctx);
794
+ },
795
+
796
+ emit: function (name) {
797
+ var data = [].slice.call(arguments, 1);
798
+ var evtArr = ((this.e || (this.e = {}))[name] || []).slice();
799
+ var i = 0;
800
+ var len = evtArr.length;
801
+
802
+ for (i; i < len; i++) {
803
+ evtArr[i].fn.apply(evtArr[i].ctx, data);
804
+ }
805
+
806
+ return this;
807
+ },
808
+
809
+ off: function (name, callback) {
810
+ var e = this.e || (this.e = {});
811
+ var evts = e[name];
812
+ var liveEvents = [];
813
+
814
+ if (evts && callback) {
815
+ for (var i = 0, len = evts.length; i < len; i++) {
816
+ if (evts[i].fn !== callback && evts[i].fn._ !== callback)
817
+ liveEvents.push(evts[i]);
818
+ }
819
+ }
820
+
821
+ // Remove event from queue to prevent memory leak
822
+ // Suggested by https://github.com/lazd
823
+ // Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910
824
+
825
+ (liveEvents.length)
826
+ ? e[name] = liveEvents
827
+ : delete e[name];
828
+
829
+ return this;
830
+ }
831
+ };
832
+
833
+ module.exports = E;
834
+ module.exports.TinyEmitter = E;
835
+
836
+
837
+ /***/ })
838
+
839
+ /******/ });
840
+ /************************************************************************/
841
+ /******/ // The module cache
842
+ /******/ var __webpack_module_cache__ = {};
843
+ /******/
844
+ /******/ // The require function
845
+ /******/ function __nested_webpack_require_24495__(moduleId) {
846
+ /******/ // Check if module is in cache
847
+ /******/ if(__webpack_module_cache__[moduleId]) {
848
+ /******/ return __webpack_module_cache__[moduleId].exports;
849
+ /******/ }
850
+ /******/ // Create a new module (and put it into the cache)
851
+ /******/ var module = __webpack_module_cache__[moduleId] = {
852
+ /******/ // no module.id needed
853
+ /******/ // no module.loaded needed
854
+ /******/ exports: {}
855
+ /******/ };
856
+ /******/
857
+ /******/ // Execute the module function
858
+ /******/ __webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_24495__);
859
+ /******/
860
+ /******/ // Return the exports of the module
861
+ /******/ return module.exports;
862
+ /******/ }
863
+ /******/
864
+ /************************************************************************/
865
+ /******/ /* webpack/runtime/compat get default export */
866
+ /******/ !function() {
867
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
868
+ /******/ __nested_webpack_require_24495__.n = function(module) {
869
+ /******/ var getter = module && module.__esModule ?
870
+ /******/ function() { return module['default']; } :
871
+ /******/ function() { return module; };
872
+ /******/ __nested_webpack_require_24495__.d(getter, { a: getter });
873
+ /******/ return getter;
874
+ /******/ };
875
+ /******/ }();
876
+ /******/
877
+ /******/ /* webpack/runtime/define property getters */
878
+ /******/ !function() {
879
+ /******/ // define getter functions for harmony exports
880
+ /******/ __nested_webpack_require_24495__.d = function(exports, definition) {
881
+ /******/ for(var key in definition) {
882
+ /******/ if(__nested_webpack_require_24495__.o(definition, key) && !__nested_webpack_require_24495__.o(exports, key)) {
883
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
884
+ /******/ }
885
+ /******/ }
886
+ /******/ };
887
+ /******/ }();
888
+ /******/
889
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
890
+ /******/ !function() {
891
+ /******/ __nested_webpack_require_24495__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
892
+ /******/ }();
893
+ /******/
894
+ /************************************************************************/
895
+ /******/ // module exports must be returned from runtime so entry inlining is disabled
896
+ /******/ // startup
897
+ /******/ // Load entry module and return exports
898
+ /******/ return __nested_webpack_require_24495__(686);
899
+ /******/ })()
900
+ .default;
901
+ });
902
+
903
+ /***/ }),
904
+
905
+ /***/ 4346:
906
+ /***/ (function(module) {
907
+
908
+ !function(t,e){ true?module.exports=e():0}(this,(function(){"use strict";function t(t){return null===t?"null":typeof t}function e(t){return!!t&&"object"==typeof t}function r(t){if(void 0===t)return"";if(null===t)return"Object";if("object"==typeof t&&!t.constructor)return"Object";var e=/function ([^(]*)/.exec(t.constructor.toString());return e&&e.length>1?e[1]:""}function n(t,e,r){return"null"===t||"undefined"===t?t:("string"!==t&&"stringifiable"!==t||(r='"'+r.replace(/"/g,'\\"')+'"'),"function"===t?e.toString().replace(/[\r\n]/g,"").replace(/\{.*\}/,"")+"{…}":r)}function o(o){var i="";return e(o)?(i=r(o),Array.isArray(o)&&(i+="["+o.length+"]")):i=n(t(o),o,o),i}function i(t){return"json-formatter-"+t}function s(t,e,r){var n=document.createElement(t);return e&&n.classList.add(i(e)),void 0!==r&&(r instanceof Node?n.appendChild(r):n.appendChild(document.createTextNode(String(r)))),n}!function(t){if(t&&"undefined"!=typeof window){var e=document.createElement("style");e.setAttribute("media","screen"),e.innerHTML=t,document.head.appendChild(e)}}('.json-formatter-row {\n font-family: monospace;\n}\n.json-formatter-row,\n.json-formatter-row a,\n.json-formatter-row a:hover {\n color: black;\n text-decoration: none;\n}\n.json-formatter-row .json-formatter-row {\n margin-left: 1rem;\n}\n.json-formatter-row .json-formatter-children.json-formatter-empty {\n opacity: 0.5;\n margin-left: 1rem;\n}\n.json-formatter-row .json-formatter-children.json-formatter-empty:after {\n display: none;\n}\n.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-object:after {\n content: "No properties";\n}\n.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-array:after {\n content: "[]";\n}\n.json-formatter-row .json-formatter-string,\n.json-formatter-row .json-formatter-stringifiable {\n color: green;\n white-space: pre;\n word-wrap: break-word;\n}\n.json-formatter-row .json-formatter-number {\n color: blue;\n}\n.json-formatter-row .json-formatter-boolean {\n color: red;\n}\n.json-formatter-row .json-formatter-null {\n color: #855A00;\n}\n.json-formatter-row .json-formatter-undefined {\n color: #ca0b69;\n}\n.json-formatter-row .json-formatter-function {\n color: #FF20ED;\n}\n.json-formatter-row .json-formatter-date {\n background-color: rgba(0, 0, 0, 0.05);\n}\n.json-formatter-row .json-formatter-url {\n text-decoration: underline;\n color: blue;\n cursor: pointer;\n}\n.json-formatter-row .json-formatter-bracket {\n color: blue;\n}\n.json-formatter-row .json-formatter-key {\n color: #00008B;\n padding-right: 0.2rem;\n}\n.json-formatter-row .json-formatter-toggler-link {\n cursor: pointer;\n}\n.json-formatter-row .json-formatter-toggler {\n line-height: 1.2rem;\n font-size: 0.7rem;\n vertical-align: middle;\n opacity: 0.6;\n cursor: pointer;\n padding-right: 0.2rem;\n}\n.json-formatter-row .json-formatter-toggler:after {\n display: inline-block;\n transition: transform 100ms ease-in;\n content: "►";\n}\n.json-formatter-row > a > .json-formatter-preview-text {\n opacity: 0;\n transition: opacity 0.15s ease-in;\n font-style: italic;\n}\n.json-formatter-row:hover > a > .json-formatter-preview-text {\n opacity: 0.6;\n}\n.json-formatter-row.json-formatter-open > .json-formatter-toggler-link .json-formatter-toggler:after {\n transform: rotate(90deg);\n}\n.json-formatter-row.json-formatter-open > .json-formatter-children:after {\n display: inline-block;\n}\n.json-formatter-row.json-formatter-open > a > .json-formatter-preview-text {\n display: none;\n}\n.json-formatter-row.json-formatter-open.json-formatter-empty:after {\n display: block;\n}\n.json-formatter-dark.json-formatter-row {\n font-family: monospace;\n}\n.json-formatter-dark.json-formatter-row,\n.json-formatter-dark.json-formatter-row a,\n.json-formatter-dark.json-formatter-row a:hover {\n color: white;\n text-decoration: none;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-row {\n margin-left: 1rem;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty {\n opacity: 0.5;\n margin-left: 1rem;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty:after {\n display: none;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-object:after {\n content: "No properties";\n}\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-array:after {\n content: "[]";\n}\n.json-formatter-dark.json-formatter-row .json-formatter-string,\n.json-formatter-dark.json-formatter-row .json-formatter-stringifiable {\n color: #31F031;\n white-space: pre;\n word-wrap: break-word;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-number {\n color: #66C2FF;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-boolean {\n color: #EC4242;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-null {\n color: #EEC97D;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-undefined {\n color: #ef8fbe;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-function {\n color: #FD48CB;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-date {\n background-color: rgba(255, 255, 255, 0.05);\n}\n.json-formatter-dark.json-formatter-row .json-formatter-url {\n text-decoration: underline;\n color: #027BFF;\n cursor: pointer;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-bracket {\n color: #9494FF;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-key {\n color: #23A0DB;\n padding-right: 0.2rem;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-toggler-link {\n cursor: pointer;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-toggler {\n line-height: 1.2rem;\n font-size: 0.7rem;\n vertical-align: middle;\n opacity: 0.6;\n cursor: pointer;\n padding-right: 0.2rem;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-toggler:after {\n display: inline-block;\n transition: transform 100ms ease-in;\n content: "►";\n}\n.json-formatter-dark.json-formatter-row > a > .json-formatter-preview-text {\n opacity: 0;\n transition: opacity 0.15s ease-in;\n font-style: italic;\n}\n.json-formatter-dark.json-formatter-row:hover > a > .json-formatter-preview-text {\n opacity: 0.6;\n}\n.json-formatter-dark.json-formatter-row.json-formatter-open > .json-formatter-toggler-link .json-formatter-toggler:after {\n transform: rotate(90deg);\n}\n.json-formatter-dark.json-formatter-row.json-formatter-open > .json-formatter-children:after {\n display: inline-block;\n}\n.json-formatter-dark.json-formatter-row.json-formatter-open > a > .json-formatter-preview-text {\n display: none;\n}\n.json-formatter-dark.json-formatter-row.json-formatter-open.json-formatter-empty:after {\n display: block;\n}\n');var a=/(^\d{1,4}[\.|\\/|-]\d{1,2}[\.|\\/|-]\d{1,4})(\s*(?:0?[1-9]:[0-5]|1(?=[012])\d:[0-5])\d\s*[ap]m)?$/,f=/\d{2}:\d{2}:\d{2} GMT-\d{4}/,m=/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/,l=window.requestAnimationFrame||function(t){return t(),0},d={hoverPreviewEnabled:!1,hoverPreviewArrayCount:100,hoverPreviewFieldCount:5,animateOpen:!0,animateClose:!0,theme:null,useToJSON:!0,sortPropertiesBy:null};return function(){function c(t,e,r,n){void 0===e&&(e=1),void 0===r&&(r=d),this.json=t,this.open=e,this.config=r,this.key=n,this._isOpen=null,void 0===this.config.hoverPreviewEnabled&&(this.config.hoverPreviewEnabled=d.hoverPreviewEnabled),void 0===this.config.hoverPreviewArrayCount&&(this.config.hoverPreviewArrayCount=d.hoverPreviewArrayCount),void 0===this.config.hoverPreviewFieldCount&&(this.config.hoverPreviewFieldCount=d.hoverPreviewFieldCount),void 0===this.config.useToJSON&&(this.config.useToJSON=d.useToJSON),""===this.key&&(this.key='""')}return Object.defineProperty(c.prototype,"isOpen",{get:function(){return null!==this._isOpen?this._isOpen:this.open>0},set:function(t){this._isOpen=t},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"isDate",{get:function(){return this.json instanceof Date||"string"===this.type&&(a.test(this.json)||m.test(this.json)||f.test(this.json))},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"isUrl",{get:function(){return"string"===this.type&&0===this.json.indexOf("http")},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"isArray",{get:function(){return Array.isArray(this.json)},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"isObject",{get:function(){return e(this.json)},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"isEmptyObject",{get:function(){return!this.keys.length&&!this.isArray},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"isEmpty",{get:function(){return this.isEmptyObject||this.keys&&!this.keys.length&&this.isArray},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"useToJSON",{get:function(){return this.config.useToJSON&&"stringifiable"===this.type},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"hasKey",{get:function(){return void 0!==this.key},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"constructorName",{get:function(){return r(this.json)},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"type",{get:function(){return this.config.useToJSON&&this.json&&this.json.toJSON?"stringifiable":t(this.json)},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"keys",{get:function(){if(this.isObject){var t=Object.keys(this.json);return!this.isArray&&this.config.sortPropertiesBy?t.sort(this.config.sortPropertiesBy):t}return[]},enumerable:!0,configurable:!0}),c.prototype.toggleOpen=function(){this.isOpen=!this.isOpen,this.element&&(this.isOpen?this.appendChildren(this.config.animateOpen):this.removeChildren(this.config.animateClose),this.element.classList.toggle(i("open")))},c.prototype.openAtDepth=function(t){void 0===t&&(t=1),t<0||(this.open=t,this.isOpen=0!==t,this.element&&(this.removeChildren(!1),0===t?this.element.classList.remove(i("open")):(this.appendChildren(this.config.animateOpen),this.element.classList.add(i("open")))))},c.prototype.getInlinepreview=function(){var t=this;if(this.isArray)return this.json.length>this.config.hoverPreviewArrayCount?"Array["+this.json.length+"]":"["+this.json.map(o).join(", ")+"]";var e=this.keys,r=e.slice(0,this.config.hoverPreviewFieldCount).map((function(e){return e+":"+o(t.json[e])})),n=e.length>=this.config.hoverPreviewFieldCount?"…":"";return"{"+r.join(", ")+n+"}"},c.prototype.render=function(){this.element=s("div","row");var t=this.isObject?s("a","toggler-link"):s("span");if(this.isObject&&!this.useToJSON&&t.appendChild(s("span","toggler")),this.hasKey&&t.appendChild(s("span","key",this.key+":")),this.isObject&&!this.useToJSON){var e=s("span","value"),r=s("span"),o=s("span","constructor-name",this.constructorName);if(r.appendChild(o),this.isArray){var a=s("span");a.appendChild(s("span","bracket","[")),a.appendChild(s("span","number",this.json.length)),a.appendChild(s("span","bracket","]")),r.appendChild(a)}e.appendChild(r),t.appendChild(e)}else{(e=this.isUrl?s("a"):s("span")).classList.add(i(this.type)),this.isDate&&e.classList.add(i("date")),this.isUrl&&(e.classList.add(i("url")),e.setAttribute("href",this.json));var f=n(this.type,this.json,this.useToJSON?this.json.toJSON():this.json);e.appendChild(document.createTextNode(f)),t.appendChild(e)}if(this.isObject&&this.config.hoverPreviewEnabled){var m=s("span","preview-text");m.appendChild(document.createTextNode(this.getInlinepreview())),t.appendChild(m)}var l=s("div","children");return this.isObject&&l.classList.add(i("object")),this.isArray&&l.classList.add(i("array")),this.isEmpty&&l.classList.add(i("empty")),this.config&&this.config.theme&&this.element.classList.add(i(this.config.theme)),this.isOpen&&this.element.classList.add(i("open")),this.element.appendChild(t),this.element.appendChild(l),this.isObject&&this.isOpen&&this.appendChildren(),this.isObject&&!this.useToJSON&&t.addEventListener("click",this.toggleOpen.bind(this)),this.element},c.prototype.appendChildren=function(t){var e=this;void 0===t&&(t=!1);var r=this.element.querySelector("div."+i("children"));if(r&&!this.isEmpty)if(t){var n=0,o=function(){var t=e.keys[n],i=new c(e.json[t],e.open-1,e.config,t);r.appendChild(i.render()),(n+=1)<e.keys.length&&(n>10?o():l(o))};l(o)}else this.keys.forEach((function(t){var n=new c(e.json[t],e.open-1,e.config,t);r.appendChild(n.render())}))},c.prototype.removeChildren=function(t){void 0===t&&(t=!1);var e=this.element.querySelector("div."+i("children"));if(t){var r=0,n=function(){e&&e.children.length&&(e.removeChild(e.children[0]),(r+=1)>10?n():l(n))};l(n)}else e&&(e.innerHTML="")},c}()}));
909
+
910
+
911
+ /***/ }),
912
+
913
+ /***/ 2717:
914
+ /***/ ((module) => {
915
+
916
+ "use strict";
917
+ module.exports = __WEBPACK_EXTERNAL_MODULE__2717__;
918
+
919
+ /***/ }),
920
+
921
+ /***/ 6870:
922
+ /***/ ((module) => {
923
+
924
+ "use strict";
925
+ module.exports = __WEBPACK_EXTERNAL_MODULE__6870__;
926
+
927
+ /***/ }),
928
+
929
+ /***/ 4212:
930
+ /***/ ((module) => {
931
+
932
+ "use strict";
933
+ module.exports = __WEBPACK_EXTERNAL_MODULE__4212__;
934
+
935
+ /***/ }),
936
+
937
+ /***/ 748:
938
+ /***/ ((module) => {
939
+
940
+ "use strict";
941
+ module.exports = __WEBPACK_EXTERNAL_MODULE__748__;
942
+
943
+ /***/ }),
944
+
945
+ /***/ 210:
946
+ /***/ ((module) => {
947
+
948
+ "use strict";
949
+ module.exports = __WEBPACK_EXTERNAL_MODULE__210__;
950
+
951
+ /***/ })
952
+
953
+ /******/ });
954
+ /************************************************************************/
955
+ /******/ // The module cache
956
+ /******/ var __webpack_module_cache__ = {};
957
+ /******/
958
+ /******/ // The require function
959
+ /******/ function __webpack_require__(moduleId) {
960
+ /******/ // Check if module is in cache
961
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
962
+ /******/ if (cachedModule !== undefined) {
963
+ /******/ return cachedModule.exports;
964
+ /******/ }
965
+ /******/ // Create a new module (and put it into the cache)
966
+ /******/ var module = __webpack_module_cache__[moduleId] = {
967
+ /******/ // no module.id needed
968
+ /******/ // no module.loaded needed
969
+ /******/ exports: {}
970
+ /******/ };
971
+ /******/
972
+ /******/ // Execute the module function
973
+ /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
974
+ /******/
975
+ /******/ // Return the exports of the module
976
+ /******/ return module.exports;
977
+ /******/ }
978
+ /******/
979
+ /************************************************************************/
980
+ /******/ /* webpack/runtime/compat get default export */
981
+ /******/ (() => {
982
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
983
+ /******/ __webpack_require__.n = (module) => {
984
+ /******/ var getter = module && module.__esModule ?
985
+ /******/ () => (module['default']) :
986
+ /******/ () => (module);
987
+ /******/ __webpack_require__.d(getter, { a: getter });
988
+ /******/ return getter;
989
+ /******/ };
990
+ /******/ })();
991
+ /******/
992
+ /******/ /* webpack/runtime/define property getters */
993
+ /******/ (() => {
994
+ /******/ // define getter functions for harmony exports
995
+ /******/ __webpack_require__.d = (exports, definition) => {
996
+ /******/ for(var key in definition) {
997
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
998
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
999
+ /******/ }
1000
+ /******/ }
1001
+ /******/ };
1002
+ /******/ })();
1003
+ /******/
1004
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
1005
+ /******/ (() => {
1006
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
1007
+ /******/ })();
1008
+ /******/
1009
+ /******/ /* webpack/runtime/make namespace object */
1010
+ /******/ (() => {
1011
+ /******/ // define __esModule on exports
1012
+ /******/ __webpack_require__.r = (exports) => {
1013
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
1014
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
1015
+ /******/ }
1016
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
1017
+ /******/ };
1018
+ /******/ })();
1019
+ /******/
1020
+ /************************************************************************/
1021
+ var __webpack_exports__ = {};
1022
+ // This entry need to be wrapped in an IIFE because it need to be in strict mode.
1023
+ (() => {
1024
+ "use strict";
1025
+ // ESM COMPAT FLAG
1026
+ __webpack_require__.r(__webpack_exports__);
1027
+
1028
+ // EXPORTS
1029
+ __webpack_require__.d(__webpack_exports__, {
1030
+ "default": () => (/* binding */ src)
1031
+ });
1032
+
1033
+ // EXTERNAL MODULE: external "vue"
1034
+ var external_vue_ = __webpack_require__(748);
1035
+ // EXTERNAL MODULE: external "../shared"
1036
+ var external_shared_ = __webpack_require__(4212);
1037
+ ;// CONCATENATED MODULE: ../../packages/hooks/use-message.ts
1038
+ /*
1039
+ * Tencent is pleased to support the open source community by making
1040
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1041
+ *
1042
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1043
+ *
1044
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1045
+ *
1046
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1047
+ *
1048
+ * ---------------------------------------------------
1049
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1050
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1051
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1052
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1053
+ *
1054
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1055
+ * the Software.
1056
+ *
1057
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1058
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1059
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1060
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1061
+ * IN THE SOFTWARE.
1062
+ */
1063
+
1064
+
1065
+ var instances = {
1066
+ 'top-left': [],
1067
+ 'top-right': [],
1068
+ 'bottom-left': [],
1069
+ 'bottom-right': []
1070
+ };
1071
+ var seed = 1;
1072
+ var Message = function Message(constructor, options) {
1073
+ var opts = options;
1074
+ var position = opts.position || 'top-right';
1075
+ if (typeof options === 'string') {
1076
+ opts = {
1077
+ message: options
1078
+ };
1079
+ }
1080
+ var userOnClose = options.onClose;
1081
+ var horizontalOffset = opts.offsetX || 10;
1082
+ var verticalOffset = opts.offsetY || 30;
1083
+ var _opts = opts,
1084
+ _opts$spacing = _opts.spacing,
1085
+ spacing = _opts$spacing === void 0 ? 10 : _opts$spacing;
1086
+ instances[position].forEach(function (vm) {
1087
+ verticalOffset += (vm.el.offsetHeight || 0) + spacing;
1088
+ });
1089
+ seed += 1;
1090
+ var id = "message_".concat(seed);
1091
+ opts = Object.assign(Object.assign({}, opts), {
1092
+ offsetX: horizontalOffset,
1093
+ offsetY: verticalOffset,
1094
+ id: id
1095
+ });
1096
+ var container = document.createElement('div');
1097
+ var vm = (0,external_vue_.createVNode)(constructor, opts);
1098
+ // const updateModalPosition = () => {
1099
+ // let offsetTop = 30;
1100
+ // instances[position].forEach((vm) => {
1101
+ // offsetTop += (vm.el.offsetHeight || 0) + spacing;
1102
+ // vm.props.offsetY = offsetTop;
1103
+ // });
1104
+ // };
1105
+ vm.props.onDestroy = function (id) {
1106
+ use_message_close(id, position, spacing, userOnClose);
1107
+ (0,external_vue_.render)(null, container);
1108
+ };
1109
+ vm.props.onDetail = function (_isShow, id) {
1110
+ instances[position].forEach(function (item) {
1111
+ var _a, _b;
1112
+ if (item.props.id !== id) {
1113
+ (_b = (_a = item.component) === null || _a === void 0 ? void 0 : _a.exposed) === null || _b === void 0 ? void 0 : _b.setDetailsShow(null, false);
1114
+ }
1115
+ });
1116
+ // setTimeout(() => {
1117
+ // console.log('updateModalPosition');
1118
+ // updateModalPosition();
1119
+ // });
1120
+ };
1121
+
1122
+ (0,external_vue_.render)(vm, container);
1123
+ instances[position].push(vm);
1124
+ var target;
1125
+ if (vm.props.getContainer && (0,external_shared_.isElement)(vm.props.getContainer)) {
1126
+ target = vm.props.getContainer;
1127
+ } else {
1128
+ target = document.body;
1129
+ }
1130
+ target.appendChild(container.firstElementChild);
1131
+ };
1132
+ function use_message_close(id, position, spacing, userOnClose) {
1133
+ userOnClose === null || userOnClose === void 0 ? void 0 : userOnClose();
1134
+ var verticalProperty = position.startsWith('top') ? 'top' : 'bottom';
1135
+ var instanceIndex = -1;
1136
+ instances[position].forEach(function (item, index) {
1137
+ if (item.props.id === id) {
1138
+ instanceIndex = index;
1139
+ }
1140
+ });
1141
+ var vm = instances[position][instanceIndex];
1142
+ var removeHeight = vm.el.offsetHeight;
1143
+ var len = instances[position].length;
1144
+ for (var i = instanceIndex; i < len; i++) {
1145
+ var pos = parseInt(instances[position][i].el.style[verticalProperty], 10) - removeHeight - spacing;
1146
+ instances[position][i].component.props.offsetY = pos;
1147
+ }
1148
+ instances[position].splice(instanceIndex, 1);
1149
+ }
1150
+ /* harmony default export */ const use_message = (Message);
1151
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
1152
+ function _arrayLikeToArray(arr, len) {
1153
+ if (len == null || len > arr.length) len = arr.length;
1154
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
1155
+ return arr2;
1156
+ }
1157
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
1158
+
1159
+ function _arrayWithoutHoles(arr) {
1160
+ if (Array.isArray(arr)) return _arrayLikeToArray(arr);
1161
+ }
1162
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/iterableToArray.js
1163
+ function _iterableToArray(iter) {
1164
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
1165
+ }
1166
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
1167
+
1168
+ function _unsupportedIterableToArray(o, minLen) {
1169
+ if (!o) return;
1170
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
1171
+ var n = Object.prototype.toString.call(o).slice(8, -1);
1172
+ if (n === "Object" && o.constructor) n = o.constructor.name;
1173
+ if (n === "Map" || n === "Set") return Array.from(o);
1174
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
1175
+ }
1176
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
1177
+ function _nonIterableSpread() {
1178
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1179
+ }
1180
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
1181
+
1182
+
1183
+
1184
+
1185
+ function _toConsumableArray(arr) {
1186
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
1187
+ }
1188
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
1189
+ function _typeof(obj) {
1190
+ "@babel/helpers - typeof";
1191
+
1192
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
1193
+ return typeof obj;
1194
+ } : function (obj) {
1195
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
1196
+ }, _typeof(obj);
1197
+ }
1198
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
1199
+
1200
+ function _toPrimitive(input, hint) {
1201
+ if (_typeof(input) !== "object" || input === null) return input;
1202
+ var prim = input[Symbol.toPrimitive];
1203
+ if (prim !== undefined) {
1204
+ var res = prim.call(input, hint || "default");
1205
+ if (_typeof(res) !== "object") return res;
1206
+ throw new TypeError("@@toPrimitive must return a primitive value.");
1207
+ }
1208
+ return (hint === "string" ? String : Number)(input);
1209
+ }
1210
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
1211
+
1212
+
1213
+ function _toPropertyKey(arg) {
1214
+ var key = _toPrimitive(arg, "string");
1215
+ return _typeof(key) === "symbol" ? key : String(key);
1216
+ }
1217
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
1218
+
1219
+ function _defineProperty(obj, key, value) {
1220
+ key = _toPropertyKey(key);
1221
+ if (key in obj) {
1222
+ Object.defineProperty(obj, key, {
1223
+ value: value,
1224
+ enumerable: true,
1225
+ configurable: true,
1226
+ writable: true
1227
+ });
1228
+ } else {
1229
+ obj[key] = value;
1230
+ }
1231
+ return obj;
1232
+ }
1233
+ // EXTERNAL MODULE: ../../node_modules/clipboard/dist/clipboard.js
1234
+ var clipboard = __webpack_require__(7647);
1235
+ var clipboard_default = /*#__PURE__*/__webpack_require__.n(clipboard);
1236
+ // EXTERNAL MODULE: ../../node_modules/json-formatter-js/dist/json-formatter.umd.js
1237
+ var json_formatter_umd = __webpack_require__(4346);
1238
+ var json_formatter_umd_default = /*#__PURE__*/__webpack_require__.n(json_formatter_umd);
1239
+ // EXTERNAL MODULE: external "vue-types"
1240
+ var external_vue_types_ = __webpack_require__(210);
1241
+ // EXTERNAL MODULE: external "../config-provider"
1242
+ var external_config_provider_ = __webpack_require__(2717);
1243
+ // EXTERNAL MODULE: external "../icon"
1244
+ var external_icon_ = __webpack_require__(6870);
1245
+ ;// CONCATENATED MODULE: ../../packages/message/src/messageConstructor.tsx
1246
+
1247
+
1248
+
1249
+
1250
+ /*
1251
+ * Tencent is pleased to support the open source community by making
1252
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1253
+ *
1254
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1255
+ *
1256
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1257
+ *
1258
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1259
+ *
1260
+ * ---------------------------------------------------
1261
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1262
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1263
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1264
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1265
+ *
1266
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1267
+ * the Software.
1268
+ *
1269
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1270
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1271
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1272
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1273
+ * IN THE SOFTWARE.
1274
+ */
1275
+
1276
+
1277
+
1278
+
1279
+
1280
+
1281
+
1282
+ var MessageThemeEnum;
1283
+ (function (MessageThemeEnum) {
1284
+ MessageThemeEnum["PRIMARY"] = "primary";
1285
+ MessageThemeEnum["WARNING"] = "warning";
1286
+ MessageThemeEnum["SUCCESS"] = "success";
1287
+ MessageThemeEnum["ERROR"] = "error";
1288
+ })(MessageThemeEnum || (MessageThemeEnum = {}));
1289
+ var MessageContentType;
1290
+ (function (MessageContentType) {
1291
+ MessageContentType["KEY_VALUE"] = "key-value";
1292
+ MessageContentType["JSON"] = "json";
1293
+ })(MessageContentType || (MessageContentType = {}));
1294
+ var IMessageActionType;
1295
+ (function (IMessageActionType) {
1296
+ /**
1297
+ * 联系助手:默认直接拉起企业微信与助手的聊天,需要在 message.assistant 配置对应的企微群ID
1298
+ */
1299
+ IMessageActionType["ASSISTANT"] = "assistant";
1300
+ /**
1301
+ * 展开详情:展开面向开发的详情
1302
+ */
1303
+ IMessageActionType["DETAILS"] = "details";
1304
+ /**
1305
+ * 图钉按钮:点击后,Message 不会自动消失
1306
+ */
1307
+ IMessageActionType["FIX"] = "fix";
1308
+ /**
1309
+ * 关闭:点击关闭,Message 消失
1310
+ */
1311
+ IMessageActionType["CLOSE"] = "close";
1312
+ })(IMessageActionType || (IMessageActionType = {}));
1313
+ var messageProps = {
1314
+ id: external_shared_.PropTypes.string.def(''),
1315
+ message: (0,external_vue_types_.toType)('IMessage', {}),
1316
+ theme: (0,external_vue_types_.toType)('messageTheme', {}).def(MessageThemeEnum.PRIMARY),
1317
+ delay: external_shared_.PropTypes.number,
1318
+ dismissable: external_shared_.PropTypes.bool.def(true),
1319
+ offsetY: external_shared_.PropTypes.number.def(30),
1320
+ spacing: external_shared_.PropTypes.number.def(10),
1321
+ extCls: external_shared_.PropTypes.string.def(''),
1322
+ onClose: external_shared_.PropTypes.func,
1323
+ getContainer: external_shared_.PropTypes.instanceOf(HTMLElement),
1324
+ width: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.number, external_shared_.PropTypes.string]),
1325
+ minWidth: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.number, external_shared_.PropTypes.string]).def(100),
1326
+ maxWidth: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.number, external_shared_.PropTypes.string]).def('100%'),
1327
+ actions: (0,external_vue_types_.toType)('IMessageAction', {})
1328
+ };
1329
+ /* harmony default export */ const messageConstructor = ((0,external_vue_.defineComponent)({
1330
+ name: 'Message',
1331
+ props: messageProps,
1332
+ emits: ['destroy', 'detail'],
1333
+ setup: function setup(props, _ref) {
1334
+ var _this = this;
1335
+ var emit = _ref.emit,
1336
+ slots = _ref.slots,
1337
+ expose = _ref.expose;
1338
+ var t = (0,external_config_provider_.useLocale)('message');
1339
+ var _usePrefix = (0,external_config_provider_.usePrefix)(),
1340
+ resolveClassName = _usePrefix.resolveClassName;
1341
+ var classNames = (0,external_vue_.computed)(function () {
1342
+ return ["".concat(resolveClassName('message')), "".concat(resolveClassName("message-".concat(props.theme))), "".concat(props.extCls)];
1343
+ });
1344
+ var zIndex = external_shared_.bkZIndexManager.getMessageNextIndex();
1345
+ var singleLineWidth = 560;
1346
+ var advanceWidth = 800;
1347
+ var singleLineDelay = 3000;
1348
+ var advanceDelay = 8000;
1349
+ var timerDelay = (0,external_vue_.computed)(function () {
1350
+ if (/^\d+\.?\d*$/.test("".concat(props.delay))) {
1351
+ return props.delay;
1352
+ }
1353
+ if (_typeof(props.message) === 'object' && !(0,external_vue_.isVNode)(props.message)) {
1354
+ return advanceDelay;
1355
+ }
1356
+ return singleLineDelay;
1357
+ });
1358
+ var getPropNumberAsStringValue = function getPropNumberAsStringValue(key) {
1359
+ return typeof props[key] === 'number' ? "".concat(props[key], "px") : props[key];
1360
+ };
1361
+ var contentWidth = (0,external_vue_.computed)(function () {
1362
+ var minMaxWidth = {
1363
+ maxWidth: getPropNumberAsStringValue('maxWidth'),
1364
+ minWidth: getPropNumberAsStringValue('minWidth')
1365
+ };
1366
+ var isAdvance = _typeof(props.message) === 'object' && !(0,external_vue_.isVNode)(props.message);
1367
+ if (/%$/.test("".concat(props.width)) || /auto/ig.test("".concat(props.width))) {
1368
+ return Object.assign({
1369
+ width: props.width
1370
+ }, minMaxWidth);
1371
+ }
1372
+ if (/^\d+/.test("".concat(props.width))) {
1373
+ return /^\d+\.?\d*$/.test("".concat(props.width)) ? Object.assign({
1374
+ width: "".concat(props.width, "px")
1375
+ }, minMaxWidth) : Object.assign({
1376
+ width: props.width
1377
+ }, minMaxWidth);
1378
+ }
1379
+ if (isAdvance) {
1380
+ return {
1381
+ width: "".concat(advanceWidth, "px")
1382
+ };
1383
+ }
1384
+ return {
1385
+ width: "".concat(singleLineWidth, "px")
1386
+ };
1387
+ });
1388
+ var isGetContainer = (0,external_vue_.computed)(function () {
1389
+ return props.getContainer && (0,external_shared_.isElement)(props.getContainer);
1390
+ });
1391
+ var styles = (0,external_vue_.computed)(function () {
1392
+ return Object.assign({
1393
+ top: "".concat(props.offsetY, "px"),
1394
+ zIndex: zIndex,
1395
+ position: isGetContainer.value ? 'absolute' : 'fixed'
1396
+ }, contentWidth.value);
1397
+ });
1398
+ var refJsonContent = (0,external_vue_.ref)(null);
1399
+ var refCopyStatus = (0,external_vue_.ref)(null);
1400
+ var refCopyMsgDiv = (0,external_vue_.ref)(null);
1401
+ var visible = (0,external_vue_.ref)(false);
1402
+ var toolOperation = (0,external_vue_.reactive)({
1403
+ isFix: false,
1404
+ isDetailShow: false
1405
+ });
1406
+ var timer = null;
1407
+ var startTimer = function startTimer() {
1408
+ timer = setTimeout(function () {
1409
+ if (toolOperation.isFix) {
1410
+ return;
1411
+ }
1412
+ visible.value = false;
1413
+ }, timerDelay.value);
1414
+ };
1415
+ var close = function close(e) {
1416
+ e.preventDefault();
1417
+ e.stopPropagation();
1418
+ visible.value = false;
1419
+ };
1420
+ var copyStatusTimer;
1421
+ var copyStatus = (0,external_vue_.ref)(null);
1422
+ var parseToString = function parseToString(value) {
1423
+ var targetStr = value;
1424
+ if (_typeof(value) === 'object') {
1425
+ try {
1426
+ targetStr = JSON.stringify(value);
1427
+ } catch (e) {
1428
+ console.error("JSON.stringify Error: ".concat(e));
1429
+ }
1430
+ }
1431
+ return targetStr;
1432
+ };
1433
+ var copyMessage = function copyMessage() {
1434
+ var copyInstance = new (clipboard_default())(refCopyMsgDiv.value, {
1435
+ text: function text() {
1436
+ return parseToString(props.message.details);
1437
+ }
1438
+ });
1439
+ registerCopyCallback(copyInstance);
1440
+ };
1441
+ var registerCopyCallback = function registerCopyCallback(copyInstance, complete) {
1442
+ ['success', 'error'].forEach(function (theme) {
1443
+ copyInstance.on(theme, function (e) {
1444
+ var target = refCopyStatus.value;
1445
+ copyStatus.value = theme;
1446
+ if (target) {
1447
+ var _target$classList, _target$classList2;
1448
+ var _e$trigger = e.trigger,
1449
+ offsetLeft = _e$trigger.offsetLeft,
1450
+ offsetWidth = _e$trigger.offsetWidth,
1451
+ offsetTop = _e$trigger.offsetTop;
1452
+ var msgTree = e.trigger.closest('.message-tree');
1453
+ var msgTreeScrollTop = msgTree ? msgTree.scrollTop : 0;
1454
+ (_target$classList = target.classList).remove.apply(_target$classList, ['success', 'error', 'is-hidden']);
1455
+ (_target$classList2 = target.classList).add.apply(_target$classList2, [theme, 'is-show']);
1456
+ var transX = offsetLeft + offsetWidth / 2 - 41;
1457
+ var transY = offsetTop - msgTreeScrollTop - 40;
1458
+ target.style.setProperty('transform', "translate(".concat(transX, "px, ").concat(transY, "px"));
1459
+ copyStatusTimer && clearTimeout(copyStatusTimer);
1460
+ copyStatusTimer = setTimeout(function () {
1461
+ var _target$classList3, _target$classList4;
1462
+ (_target$classList3 = target.classList).remove.apply(_target$classList3, ['is-show']);
1463
+ (_target$classList4 = target.classList).add.apply(_target$classList4, ['is-hidden']);
1464
+ }, 2000);
1465
+ }
1466
+ if (typeof complete === 'function') {
1467
+ complete();
1468
+ }
1469
+ });
1470
+ });
1471
+ };
1472
+ var copyValueItem = function copyValueItem() {
1473
+ var copyInstance = new (clipboard_default())(refJsonContent.value.querySelectorAll('span.copy-value'), {
1474
+ text: function text(trigger) {
1475
+ return trigger.innerHTML;
1476
+ }
1477
+ });
1478
+ registerCopyCallback(copyInstance);
1479
+ };
1480
+ var parseToJson = function parseToJson(value) {
1481
+ var targetJson = value;
1482
+ if (typeof value === 'string') {
1483
+ try {
1484
+ targetJson = JSON.parse(value);
1485
+ } catch (e) {
1486
+ console.error("Format Json Error: ".concat(e));
1487
+ }
1488
+ }
1489
+ return targetJson;
1490
+ };
1491
+ var setDetailsShow = function setDetailsShow(e, isShow) {
1492
+ toolOperation.isDetailShow = isShow !== null && isShow !== void 0 ? isShow : !toolOperation.isDetailShow;
1493
+ fixMesage(e, toolOperation.isDetailShow);
1494
+ if (toolOperation.isDetailShow && _typeof(props.message) === 'object' && !(0,external_vue_.isVNode)(props.message)) {
1495
+ if (props.message.type === MessageContentType.JSON || !props.message.type) {
1496
+ var targetJson = parseToJson(props.message.details);
1497
+ var formatter = new (json_formatter_umd_default())(targetJson);
1498
+ setTimeout(function () {
1499
+ if (refJsonContent.value) {
1500
+ refJsonContent.value.innerHTML = '';
1501
+ refJsonContent.value.append(formatter.render());
1502
+ }
1503
+ copyMessage();
1504
+ });
1505
+ }
1506
+ if (props.message.type === MessageContentType.KEY_VALUE) {
1507
+ setTimeout(function () {
1508
+ copyMessage();
1509
+ copyValueItem();
1510
+ });
1511
+ }
1512
+ emit('detail', toolOperation.isDetailShow, props.id);
1513
+ }
1514
+ };
1515
+ var fixMesage = function fixMesage(_e, isFix) {
1516
+ toolOperation.isFix = isFix !== null && isFix !== void 0 ? isFix : !toolOperation.isFix;
1517
+ };
1518
+ var addMouseKeyEvent = function addMouseKeyEvent() {
1519
+ var remove = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
1520
+ var isAdvance = _typeof(props.message) === 'object' && !(0,external_vue_.isVNode)(props.message);
1521
+ if (!isAdvance) {
1522
+ return;
1523
+ }
1524
+ if (remove) {
1525
+ document.removeEventListener('keydown', handleMouseKeyEvent);
1526
+ return;
1527
+ }
1528
+ document.addEventListener('keydown', handleMouseKeyEvent);
1529
+ };
1530
+ var handleMouseKeyEvent = function handleMouseKeyEvent(e) {
1531
+ if (e.altKey && e.keyCode === 80) {
1532
+ fixMesage(e);
1533
+ }
1534
+ };
1535
+ (0,external_vue_.onMounted)(function () {
1536
+ timerDelay.value && startTimer();
1537
+ visible.value = true;
1538
+ addMouseKeyEvent();
1539
+ });
1540
+ (0,external_vue_.onUnmounted)(function () {
1541
+ clearTimeout(timer);
1542
+ addMouseKeyEvent(true);
1543
+ });
1544
+ (0,external_vue_.watch)(visible, function () {
1545
+ if (!visible.value) {
1546
+ emit('destroy', props.id);
1547
+ }
1548
+ });
1549
+ var handleMouseenter = function handleMouseenter(_e) {
1550
+ clearTimeout(timer);
1551
+ };
1552
+ var handleMouseleave = function handleMouseleave(_e) {
1553
+ timerDelay.value && startTimer();
1554
+ };
1555
+ var handleHeplerClick = function handleHeplerClick(_e) {
1556
+ if (props.message.assistant) {
1557
+ window.open(props.message.assistant, '_blank');
1558
+ }
1559
+ };
1560
+ var defActionList = (0,external_vue_.computed)(function () {
1561
+ var _ref2;
1562
+ return _ref2 = {}, _defineProperty(_ref2, IMessageActionType.ASSISTANT, {
1563
+ id: IMessageActionType.ASSISTANT,
1564
+ icon: function icon() {
1565
+ return (0,external_vue_.createVNode)(external_icon_.Assistant, null, null);
1566
+ },
1567
+ text: function text() {
1568
+ return t.value.assistant;
1569
+ },
1570
+ onClick: function onClick(e) {
1571
+ return handleHeplerClick(e);
1572
+ }
1573
+ }), _defineProperty(_ref2, IMessageActionType.DETAILS, {
1574
+ id: IMessageActionType.DETAILS,
1575
+ icon: function icon() {
1576
+ return toolOperation.isDetailShow ? (0,external_vue_.createVNode)(external_icon_.AngleDoubleUpLine, null, null) : (0,external_vue_.createVNode)(external_icon_.AngleDoubleDownLine, null, null);
1577
+ },
1578
+ text: function text() {
1579
+ return t.value.details;
1580
+ },
1581
+ onClick: function onClick(e) {
1582
+ return setDetailsShow(e);
1583
+ }
1584
+ }), _defineProperty(_ref2, IMessageActionType.FIX, {
1585
+ id: IMessageActionType.FIX,
1586
+ icon: function icon() {
1587
+ return toolOperation.isFix ? (0,external_vue_.createVNode)(external_icon_.FixShape, null, null) : (0,external_vue_.createVNode)(external_icon_.FixLine, null, null);
1588
+ },
1589
+ classList: toolOperation.isFix ? 'fixed' : '',
1590
+ onClick: function onClick(e) {
1591
+ return fixMesage(e);
1592
+ }
1593
+ }), _defineProperty(_ref2, IMessageActionType.CLOSE, {
1594
+ id: IMessageActionType.CLOSE,
1595
+ classList: 'normal-color',
1596
+ icon: function icon() {
1597
+ return props.dismissable && (0,external_vue_.createVNode)(external_icon_.Error, {
1598
+ "class": "".concat(resolveClassName('message-close')),
1599
+ "onClick": close
1600
+ }, null);
1601
+ },
1602
+ onClick: close
1603
+ }), _ref2;
1604
+ });
1605
+ var sortActionIdList = [IMessageActionType.ASSISTANT, IMessageActionType.DETAILS, IMessageActionType.FIX, IMessageActionType.CLOSE];
1606
+ var actionList = (0,external_vue_.computed)(function () {
1607
+ var _a;
1608
+ if (((_a = props.actions) === null || _a === void 0 ? void 0 : _a.length) > 0) {
1609
+ var resultList = props.actions.map(function (action) {
1610
+ var id = action.id.toLocaleLowerCase();
1611
+ var defAction = defActionList.value[id];
1612
+ var defClickFn = defAction === null || defAction === void 0 ? void 0 : defAction.onClick;
1613
+ var target = Object.assign({}, defActionList.value[id] || {}, action);
1614
+ target.id = id;
1615
+ if (action.classList !== undefined) {
1616
+ var classList = Array.isArray(action.classList) ? action.classList : [action.classList];
1617
+ var defClassList = [];
1618
+ if (defAction.classList !== undefined) {
1619
+ defClassList = Array.isArray(defAction.classList) ? defAction.classList : [defAction.classList];
1620
+ }
1621
+ target.classList = [].concat(_toConsumableArray(defClassList), _toConsumableArray(classList));
1622
+ }
1623
+ if (typeof action.onClick === 'function') {
1624
+ target.onClick = function () {
1625
+ var resp = Reflect.apply(action.onClick, _this, []);
1626
+ if ((_typeof(resp) === undefined || resp) && typeof defClickFn === 'function') {
1627
+ Reflect.apply(defClickFn, _this, []);
1628
+ }
1629
+ };
1630
+ return target;
1631
+ }
1632
+ target.onClick = defClickFn;
1633
+ return target;
1634
+ });
1635
+ var appendList = sortActionIdList.filter(function (id) {
1636
+ return !resultList.some(function (action) {
1637
+ return action.id === id;
1638
+ });
1639
+ }).map(function (id) {
1640
+ return defActionList.value[id];
1641
+ });
1642
+ resultList.push.apply(resultList, _toConsumableArray(appendList));
1643
+ return resultList;
1644
+ }
1645
+ return sortActionIdList.map(function (id) {
1646
+ return defActionList.value[id];
1647
+ });
1648
+ });
1649
+ var renderMessageActions = function renderMessageActions() {
1650
+ var _a, _b;
1651
+ var renderIcon = function renderIcon(_ref3) {
1652
+ var icon = _ref3.icon;
1653
+ if (typeof icon === 'function') {
1654
+ return Reflect.apply(icon, _this, []);
1655
+ }
1656
+ return (0,external_vue_.createVNode)("span", {
1657
+ "class": icon
1658
+ }, null);
1659
+ };
1660
+ var renderText = function renderText(_ref4) {
1661
+ var text = _ref4.text;
1662
+ var content = undefined;
1663
+ if (typeof text === 'function') {
1664
+ content = Reflect.apply(text, _this, []);
1665
+ }
1666
+ if (content === undefined) {
1667
+ return;
1668
+ }
1669
+ if (typeof content === 'string') {
1670
+ return (0,external_vue_.createVNode)("span", {
1671
+ "class": "message-action-text"
1672
+ }, [content]);
1673
+ }
1674
+ return content;
1675
+ };
1676
+ var handleActionClick = function handleActionClick(e, action) {
1677
+ if (action.readonly || action.disabled) {
1678
+ return;
1679
+ }
1680
+ if (typeof action.onClick === 'function') {
1681
+ Reflect.apply(action.onClick, _this, [e, action]);
1682
+ }
1683
+ };
1684
+ var renderActionList = function renderActionList() {
1685
+ return actionList.value.map(function (action) {
1686
+ if (action.disabled) {
1687
+ return null;
1688
+ }
1689
+ if (typeof action.render === 'function') {
1690
+ return Reflect.apply(action.render, _this, []);
1691
+ }
1692
+ var classList = Array.isArray(action.classList) ? action.classList.join(' ') : action.classList;
1693
+ return (0,external_vue_.createVNode)("span", {
1694
+ "class": ['tool', action.id, classList],
1695
+ "onClick": function onClick(e) {
1696
+ return handleActionClick(e, action);
1697
+ }
1698
+ }, [renderIcon(action), renderText(action)]);
1699
+ });
1700
+ };
1701
+ return (_b = (_a = slots.action) === null || _a === void 0 ? void 0 : _a.call(slots)) !== null && _b !== void 0 ? _b : renderActionList();
1702
+ };
1703
+ expose({
1704
+ setDetailsShow: setDetailsShow
1705
+ });
1706
+ return {
1707
+ classNames: classNames,
1708
+ styles: styles,
1709
+ visible: visible,
1710
+ close: close,
1711
+ setDetailsShow: setDetailsShow,
1712
+ fixMesage: fixMesage,
1713
+ copyMessage: copyMessage,
1714
+ parseToJson: parseToJson,
1715
+ handleMouseenter: handleMouseenter,
1716
+ handleMouseleave: handleMouseleave,
1717
+ renderMessageActions: renderMessageActions,
1718
+ refJsonContent: refJsonContent,
1719
+ refCopyStatus: refCopyStatus,
1720
+ refCopyMsgDiv: refCopyMsgDiv,
1721
+ toolOperation: toolOperation,
1722
+ copyStatus: copyStatus,
1723
+ t: t,
1724
+ resolveClassName: resolveClassName,
1725
+ copyValueItem: copyValueItem
1726
+ };
1727
+ },
1728
+ render: function render() {
1729
+ var _this2 = this;
1730
+ var renderIcon = function renderIcon(theme) {
1731
+ var iconMap = {
1732
+ primary: (0,external_vue_.createVNode)(external_icon_.Info, null, null),
1733
+ warning: (0,external_vue_.createVNode)(external_icon_.Warn, null, null),
1734
+ success: (0,external_vue_.createVNode)(external_icon_.Success, null, null),
1735
+ error: (0,external_vue_.createVNode)(external_icon_.Close, null, null)
1736
+ };
1737
+ return iconMap[theme !== null && theme !== void 0 ? theme : _this2.theme];
1738
+ };
1739
+ var renderMsgDetail = function renderMsgDetail(msg) {
1740
+ if (msg.type === MessageContentType.KEY_VALUE) {
1741
+ var target = _this2.parseToJson(msg.details || {});
1742
+ var keys = Object.keys(target);
1743
+ return keys.map(function (key) {
1744
+ return (0,external_vue_.createVNode)("div", {
1745
+ "class": "message-row"
1746
+ }, [(0,external_vue_.createVNode)("label", null, [key]), (0,external_vue_.createVNode)("span", {
1747
+ "class": "copy-value"
1748
+ }, [target[key]])]);
1749
+ });
1750
+ }
1751
+ };
1752
+ var renderMessage = function renderMessage() {
1753
+ var _a, _b, _c;
1754
+ if (_typeof(_this2.message) === 'object' && !(0,external_vue_.isVNode)(_this2.message)) {
1755
+ return (0,external_vue_.createVNode)("div", {
1756
+ "class": "".concat(_this2.resolveClassName('message-content'), " multi")
1757
+ }, [(0,external_vue_.createVNode)("div", {
1758
+ "class": "overview"
1759
+ }, [(0,external_vue_.createVNode)("div", {
1760
+ "class": "left-content"
1761
+ }, [(0,external_vue_.createVNode)("div", {
1762
+ "class": "".concat(_this2.resolveClassName('message-icon'))
1763
+ }, [renderIcon()]), (0,external_vue_.createVNode)("div", {
1764
+ "class": "describe"
1765
+ }, [(_c = (_b = (_a = _this2.$slots).title) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : "\u3010".concat(_this2.message.code, "\u3011").concat(_this2.message.overview, " ").concat(_this2.message.suggestion)])]), (0,external_vue_.createVNode)("div", {
1766
+ "class": "tools"
1767
+ }, [_this2.renderMessageActions()])]), _this2.toolOperation.isDetailShow && (0,external_vue_.createVNode)("div", {
1768
+ "class": "message-detail"
1769
+ }, [(0,external_vue_.createVNode)("div", {
1770
+ "class": "message-copy",
1771
+ "ref": "refCopyMsgDiv"
1772
+ }, [(0,external_vue_.createVNode)(external_icon_.CopyShape, null, null)]), (0,external_vue_.createVNode)("div", {
1773
+ "class": "copy-status",
1774
+ "ref": "refCopyStatus"
1775
+ }, [(0,external_vue_.createVNode)("div", {
1776
+ "class": "inner"
1777
+ }, [renderIcon(_this2.copyStatus), _this2.copyStatus === 'success' ? _this2.t.copySuccess : _this2.t.copyFailed])]), (0,external_vue_.createVNode)("div", {
1778
+ "ref": "refJsonContent",
1779
+ "class": "message-tree"
1780
+ }, [renderMsgDetail(_this2.message)])])]);
1781
+ }
1782
+ return (0,external_vue_.createVNode)(external_vue_.Fragment, null, [(0,external_vue_.createVNode)("div", {
1783
+ "class": "".concat(_this2.resolveClassName('message-content'))
1784
+ }, [(0,external_vue_.createVNode)("div", {
1785
+ "class": "".concat(_this2.resolveClassName('message-icon'))
1786
+ }, [renderIcon()]), _this2.message]), _this2.dismissable && (0,external_vue_.createVNode)(external_icon_.Error, {
1787
+ "class": "".concat(_this2.resolveClassName('message-close')),
1788
+ "onClick": _this2.close
1789
+ }, null)]);
1790
+ };
1791
+ return (0,external_vue_.createVNode)(external_vue_.Transition, {
1792
+ "name": "bk-message-fade"
1793
+ }, {
1794
+ "default": function _default() {
1795
+ return [(0,external_vue_.withDirectives)((0,external_vue_.createVNode)("div", {
1796
+ "class": _this2.classNames,
1797
+ "style": _this2.styles,
1798
+ "onMouseenter": _this2.handleMouseenter,
1799
+ "onMouseleave": _this2.handleMouseleave
1800
+ }, [renderMessage()]), [[external_vue_.vShow, _this2.visible]])];
1801
+ }
1802
+ });
1803
+ }
1804
+ }));
1805
+ ;// CONCATENATED MODULE: ../../packages/message/src/index.ts
1806
+ /*
1807
+ * Tencent is pleased to support the open source community by making
1808
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1809
+ *
1810
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1811
+ *
1812
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1813
+ *
1814
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1815
+ *
1816
+ * ---------------------------------------------------
1817
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1818
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1819
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1820
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1821
+ *
1822
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1823
+ * the Software.
1824
+ *
1825
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1826
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1827
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1828
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1829
+ * IN THE SOFTWARE.
1830
+ */
1831
+
1832
+
1833
+ var src_Message = function Message(options) {
1834
+ use_message(messageConstructor, options);
1835
+ };
1836
+ /* harmony default export */ const src = (src_Message);
1837
+ })();
1838
+
1839
+ /******/ return __webpack_exports__;
1840
+ /******/ })()
1841
+ ;
1842
+ });