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 +1,4127 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("../config-provider"),require("vue-types"),require("lodash"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../config-provider","vue-types","lodash"],t);else{var n="object"==typeof exports?t(require("../shared"),require("vue"),require("../config-provider"),require("vue-types"),require("lodash")):t(e["../shared"],e.vue,e["../config-provider"],e["vue-types"],e.lodash);for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(self,((e,t,n,o,r)=>(()=>{var i={8022:(e,t,n)=>{var o=n(4481),r=n(6426),i=r;i.v1=o,i.v4=r,e.exports=i},8725:e=>{for(var t=[],n=0;n<256;++n)t[n]=(n+256).toString(16).substr(1);e.exports=function(e,n){var o=n||0,r=t;return[r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]]].join("")}},9157:e=>{var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var n=new Uint8Array(16);e.exports=function(){return t(n),n}}else{var o=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},4481:(e,t,n)=>{var o,r,i=n(9157),l=n(8725),a=0,u=0;e.exports=function(e,t,n){var c=t&&n||0,s=t||[],f=(e=e||{}).node||o,d=void 0!==e.clockseq?e.clockseq:r;if(null==f||null==d){var p=i();null==f&&(f=o=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==d&&(d=r=16383&(p[6]<<8|p[7]))}var v=void 0!==e.msecs?e.msecs:(new Date).getTime(),m=void 0!==e.nsecs?e.nsecs:u+1,y=v-a+(m-u)/1e4;if(y<0&&void 0===e.clockseq&&(d=d+1&16383),(y<0||v>a)&&void 0===e.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=v,u=m,r=d;var h=(1e4*(268435455&(v+=122192928e5))+m)%4294967296;s[c++]=h>>>24&255,s[c++]=h>>>16&255,s[c++]=h>>>8&255,s[c++]=255&h;var g=v/4294967296*1e4&268435455;s[c++]=g>>>8&255,s[c++]=255&g,s[c++]=g>>>24&15|16,s[c++]=g>>>16&255,s[c++]=d>>>8|128,s[c++]=255&d;for(var b=0;b<6;++b)s[c+b]=f[b];return t||l(s)}},6426:(e,t,n)=>{var o=n(9157),r=n(8725);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var l=(e=e||{}).random||(e.rng||o)();if(l[6]=15&l[6]|64,l[8]=63&l[8]|128,t)for(var a=0;a<16;++a)t[i+a]=l[a];return t||r(l)}},2717:e=>{"use strict";e.exports=n},4212:t=>{"use strict";t.exports=e},467:e=>{"use strict";e.exports=r},748:e=>{"use strict";e.exports=t},210:e=>{"use strict";e.exports=o}},l={};function a(e){var t=l[e];if(void 0!==t)return t.exports;var n=l[e]={exports:{}};return i[e](n,n.exports,a),n.exports}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 u={};return(()=>{"use strict";a.r(u),a.d(u,{$bkPopover:()=>Be,PopoverProps:()=>T,default:()=>Ue});var e=a(4212),t=a(748);function n(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=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))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,l=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw l}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var r,i=new Map;function l(e,t){var n,o=[];return Array.isArray(t.arg)?o=t.arg:(n=t.arg,"undefined"!=typeof Element&&n instanceof Element&&o.push(t.arg)),function(n,r){var i=t.instance.popperRef,l=n.target,a=null==r?void 0:r.target,u=!t||!t.instance,c=!l||!a,s=e.contains(l)||e.contains(a),f=e===l,d=o.length&&o.some((function(e){return null==e?void 0:e.contains(l)}))||o.length&&o.includes(a),p=i&&(i.contains(l)||i.contains(a));u||c||s||f||d||p||t.value(n,r)}}document.addEventListener("mousedown",(function(e){return r=e})),document.addEventListener("mouseup",(function(e){var t,o=n(i.values());try{for(o.s();!(t=o.n()).done;){var l,a=n(t.value);try{for(a.s();!(l=a.n()).done;)(0,l.value.documentHandler)(e,r)}catch(e){a.e(e)}finally{a.f()}}}catch(e){o.e(e)}finally{o.f()}}));var c={beforeMount:function(e,t){i.has(e)||i.set(e,[]),i.get(e).push({documentHandler:l(e,t),bindingFn:t.value})},updated:function(e,t){i.has(e)||i.set(e,[]);var n=i.get(e),o=n.findIndex((function(e){return e.bindingFn===t.oldValue})),r={documentHandler:l(e,t),bindingFn:t.value};o>=0?n.splice(o,1,r):n.push(r)},unmounted:function(e){i.delete(e)},install:function(e){e.directive("bkTooltips",c)}};const s=c;var f=a(2717);const d=(0,t.defineComponent)({name:"PopArrow",render:function(){var e=(0,(0,f.usePrefix)().resolveClassName)("pop2-arrow");return(0,t.createVNode)("div",{class:e},null)}});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 v(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==p(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==p(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===p(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m,y;!function(e){e.CLICK_OUTSIDE="clickoutside",e.CONTENT_MOUSEENTER="contentMouseenter",e.CONTENT_MOUSELEAVE="contentMouseleave",e.CONTENT_AfterHidden="afterHidden",e.CONTENT_AfterShow="afterShow"}(y||(y={}));var h=function(e){return!0},g=function(e){return e},b=(v(m={},y.CLICK_OUTSIDE,(function(e){return!0})),v(m,y.CONTENT_MOUSEENTER,g),v(m,y.CONTENT_MOUSELEAVE,g),v(m,y.CONTENT_AfterHidden,h),v(m,y.CONTENT_AfterShow,h),m);const w=(0,t.defineComponent)({name:"PopContent",props:{width:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def("auto"),height:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def("auto"),maxHeight:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def("auto"),extCls:e.PropTypes.string.def(""),visible:e.PropTypes.bool.def(!1),eventDelay:e.PropTypes.number.def(0)},setup:function(e){var n=function(e){return/^\d+\.?\d*$/.test("".concat(e))?"".concat(e,"px"):e},o=(0,t.computed)((function(){return{width:n(e.width),height:n(e.height),maxHeight:n(e.maxHeight)}})),r=(0,t.ref)(null),i=(0,t.ref)(null),l=function(t){var n;0!==e.eventDelay&&(null===(n=r.value)||void 0===n||n.style.setProperty("pointer-events",t))},a=(0,f.usePrefix)().resolveClassName;return{style:o,refContent:r,resolveClassName:a,resetPointerEvent:function(){var t;0!==e.eventDelay&&(i.value&&clearTimeout(i.value),i.value=setTimeout((function(){l("unset")}),null!==(t=e.eventDelay)&&void 0!==t?t:300))},setContentPointerEvent:l}},render:function(){var e,n,o,r,i,l,a,u,c=this,s=[this.resolveClassName("popover"),this.resolveClassName("pop2-content"),this.extCls],f=function(e){var n;return t.Fragment===(null===(n=null==e?void 0:e[0])||void 0===n?void 0:n.type)&&(0,t.nextTick)((function(){c.setContentPointerEvent("none"),c.resetPointerEvent()})),c.style}(null===(n=(e=this.$slots).default)||void 0===n?void 0:n.call(e));return(0,t.createVNode)("div",{class:s,tabindex:"-1",style:f,ref:"refContent"},[null!==(i=null===(r=(o=this.$slots).arrow)||void 0===r?void 0:r.call(o))&&void 0!==i?i:"",null!==(u=null===(a=(l=this.$slots).default)||void 0===a?void 0:a.call(l))&&void 0!==u?u:""])}});var x=a(210),T={isShow:e.PropTypes.bool.def(!1),always:e.PropTypes.bool.def(!1),disabled:e.PropTypes.bool.def(!1),width:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def("auto"),height:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def("auto"),maxHeight:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def("auto"),content:(0,x.toType)("IContent",{}).def(""),target:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.instanceOf(HTMLElement),e.PropTypes.instanceOf(PointerEvent)]),allowHtml:e.PropTypes.bool.def(!1),placement:(0,e.placementType)().def(e.PlacementEnum.TOP_START),theme:e.PropTypes.string.def("dark"),trigger:(0,e.triggerType)(),renderType:(0,e.renderType)(),arrow:e.PropTypes.bool.def(!0),padding:e.PropTypes.number.def(5),offset:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.shape({mainAxis:e.PropTypes.number,crossAxis:e.PropTypes.number,alignmentAxis:e.PropTypes.number})]).def(6),boundary:e.PropTypes.oneOfType([e.PropTypes.string.def("parent"),e.PropTypes.instanceOf(HTMLElement)]),zIndex:e.PropTypes.number.def(void 0),disableTeleport:e.PropTypes.bool.def(!1),autoPlacement:e.PropTypes.bool.def(!1),autoVisibility:e.PropTypes.bool.def(!0),disableOutsideClick:e.PropTypes.bool.def(!1),disableTransform:e.PropTypes.bool.def(!1),reference:e.PropTypes.any,modifiers:e.PropTypes.array.def([]),popoverDelay:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.arrayOf(e.PropTypes.number)]).def(100),extCls:e.PropTypes.string.def(""),componentEventDelay:e.PropTypes.number.def(0),forceClickoutside:e.PropTypes.bool.def(!1)};const P=(0,t.defineComponent)({name:"PopReference",render:function(){var e,t,n;return null!==(n=null===(t=(e=this.$slots).default)||void 0===t?void 0:t.call(e))&&void 0!==n?n:""}}),E=(0,t.defineComponent)({props:{class:e.PropTypes.string.def(""),mode:e.PropTypes.string.def("")},render:function(){var e,n;return(0,t.createVNode)(t.Fragment,null,[null===(n=(e=this.$slots).default)||void 0===n?void 0:n.call(e)])}});function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function R(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,l,a=[],u=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(o=i.call(n)).done)&&(a.push(o.value),a.length!==t);u=!0);}catch(e){c=!0,r=e}finally{try{if(!u&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw r}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return C(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)?C(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const O=["top","right","bottom","left"],A=["start","end"],S=O.reduce(((e,t)=>e.concat(t,t+"-"+A[0],t+"-"+A[1])),[]),N=Math.min,L=Math.max,D=Math.round,H=Math.floor,I=e=>({x:e,y:e}),j={left:"right",right:"left",bottom:"top",top:"bottom"},k={start:"end",end:"start"};function M(e,t,n){return L(e,N(t,n))}function F(e,t){return"function"==typeof e?e(t):e}function V(e){return e.split("-")[0]}function $(e){return e.split("-")[1]}function _(e){return"x"===e?"y":"x"}function q(e){return"y"===e?"height":"width"}function B(e){return["top","bottom"].includes(V(e))?"y":"x"}function U(e){return _(B(e))}function W(e,t,n){void 0===n&&(n=!1);const o=$(e),r=U(e),i=q(r);let l="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=K(l)),[l,K(l)]}function z(e){return e.replace(/start|end/g,(e=>k[e]))}function K(e){return e.replace(/left|right|bottom|top/g,(e=>j[e]))}function X(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Y(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Z(e,t,n){let{reference:o,floating:r}=e;const i=B(t),l=U(t),a=q(l),u=V(t),c="y"===i,s=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,d=o[a]/2-r[a]/2;let p;switch(u){case"top":p={x:s,y:o.y-r.height};break;case"bottom":p={x:s,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:f};break;case"left":p={x:o.x-r.width,y:f};break;default:p={x:o.x,y:o.y}}switch($(t)){case"start":p[l]-=d*(n&&c?-1:1);break;case"end":p[l]+=d*(n&&c?-1:1)}return p}async function G(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:i,rects:l,elements:a,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:s="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=F(t,e),v=X(p),m=a[d?"floating"===f?"reference":"floating":f],y=Y(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:s,strategy:u})),h="floating"===f?{...l.floating,x:o,y:r}:l.reference,g=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),b=await(null==i.isElement?void 0:i.isElement(g))&&await(null==i.getScale?void 0:i.getScale(g))||{x:1,y:1},w=Y(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:h,offsetParent:g,strategy:u}):h);return{top:(y.top-w.top+v.top)/b.y,bottom:(w.bottom-y.bottom+v.bottom)/b.y,left:(y.left-w.left+v.left)/b.x,right:(w.right-y.right+v.right)/b.x}}function J(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Q(e){return O.some((t=>e[t]>=0))}function ee(e){const t=N(...e.map((e=>e.left))),n=N(...e.map((e=>e.top)));return{x:t,y:n,width:L(...e.map((e=>e.right)))-t,height:L(...e.map((e=>e.bottom)))-n}}const te=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:o}=t,r=await async function(e,t){const{placement:n,platform:o,elements:r}=e,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),l=V(n),a=$(n),u="y"===B(n),c=["left","top"].includes(l)?-1:1,s=i&&u?-1:1,f=F(t,e);let{mainAxis:d,crossAxis:p,alignmentAxis:v}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&"number"==typeof v&&(p="end"===a?-1*v:v),u?{x:p*s,y:d*c}:{x:d*c,y:p*s}}(t,e);return{x:n+r.x,y:o+r.y,data:r}}}},ne=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=F(e,t),c={x:n,y:o},s=await G(t,u),f=B(V(r)),d=_(f);let p=c[d],v=c[f];if(i){const e="y"===d?"bottom":"right";p=M(p+s["y"===d?"top":"left"],p,p-s[e])}if(l){const e="y"===f?"bottom":"right";v=M(v+s["y"===f?"top":"left"],v,v-s[e])}const m=a.fn({...t,[d]:p,[f]:v});return{...m,data:{x:m.x-n,y:m.y-o}}}}};function oe(e){return le(e)?(e.nodeName||"").toLowerCase():"#document"}function re(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ie(e){var t;return null==(t=(le(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function le(e){return e instanceof Node||e instanceof re(e).Node}function ae(e){return e instanceof Element||e instanceof re(e).Element}function ue(e){return e instanceof HTMLElement||e instanceof re(e).HTMLElement}function ce(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof re(e).ShadowRoot)}function se(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=me(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function fe(e){return["table","td","th"].includes(oe(e))}function de(e){const t=pe(),n=me(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function pe(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function ve(e){return["html","body","#document"].includes(oe(e))}function me(e){return re(e).getComputedStyle(e)}function ye(e){return ae(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function he(e){if("html"===oe(e))return e;const t=e.assignedSlot||e.parentNode||ce(e)&&e.host||ie(e);return ce(t)?t.host:t}function ge(e){const t=he(e);return ve(t)?e.ownerDocument?e.ownerDocument.body:e.body:ue(t)&&se(t)?t:ge(t)}function be(e,t){var n;void 0===t&&(t=[]);const o=ge(e),r=o===(null==(n=e.ownerDocument)?void 0:n.body),i=re(o);return r?t.concat(i,i.visualViewport||[],se(o)?o:[]):t.concat(o,be(o))}function we(e){const t=me(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=ue(e),i=r?e.offsetWidth:n,l=r?e.offsetHeight:o,a=D(n)!==i||D(o)!==l;return a&&(n=i,o=l),{width:n,height:o,$:a}}function xe(e){return ae(e)?e:e.contextElement}function Te(e){const t=xe(e);if(!ue(t))return I(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=we(t);let l=(i?D(n.width):n.width)/o,a=(i?D(n.height):n.height)/r;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}const Pe=I(0);function Ee(e){const t=re(e);return pe()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Pe}function Ce(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),i=xe(e);let l=I(1);t&&(o?ae(o)&&(l=Te(o)):l=Te(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==re(e))&&t}(i,n,o)?Ee(i):I(0);let u=(r.left+a.x)/l.x,c=(r.top+a.y)/l.y,s=r.width/l.x,f=r.height/l.y;if(i){const e=re(i),t=o&&ae(o)?re(o):o;let n=e.frameElement;for(;n&&o&&t!==e;){const e=Te(n),t=n.getBoundingClientRect(),o=me(n),r=t.left+(n.clientLeft+parseFloat(o.paddingLeft))*e.x,i=t.top+(n.clientTop+parseFloat(o.paddingTop))*e.y;u*=e.x,c*=e.y,s*=e.x,f*=e.y,u+=r,c+=i,n=re(n).frameElement}}return Y({width:s,height:f,x:u,y:c})}function Re(e){return Ce(ie(e)).left+ye(e).scrollLeft}function Oe(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=re(e),o=ie(e),r=n.visualViewport;let i=o.clientWidth,l=o.clientHeight,a=0,u=0;if(r){i=r.width,l=r.height;const e=pe();(!e||e&&"fixed"===t)&&(a=r.offsetLeft,u=r.offsetTop)}return{width:i,height:l,x:a,y:u}}(e,n);else if("document"===t)o=function(e){const t=ie(e),n=ye(e),o=e.ownerDocument.body,r=L(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=L(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+Re(e);const a=-n.scrollTop;return"rtl"===me(o).direction&&(l+=L(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:l,y:a}}(ie(e));else if(ae(t))o=function(e,t){const n=Ce(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=ue(e)?Te(e):I(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:r*i.x,y:o*i.y}}(t,n);else{const n=Ee(e);o={...t,x:t.x-n.x,y:t.y-n.y}}return Y(o)}function Ae(e,t){const n=he(e);return!(n===t||!ae(n)||ve(n))&&("fixed"===me(n).position||Ae(n,t))}function Se(e,t,n){const o=ue(t),r=ie(t),i="fixed"===n,l=Ce(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const u=I(0);if(o||!o&&!i)if(("body"!==oe(t)||se(r))&&(a=ye(t)),o){const e=Ce(t,!0,i,t);u.x=e.x+t.clientLeft,u.y=e.y+t.clientTop}else r&&(u.x=Re(r));return{x:l.left+a.scrollLeft-u.x,y:l.top+a.scrollTop-u.y,width:l.width,height:l.height}}function Ne(e,t){return ue(e)&&"fixed"!==me(e).position?t?t(e):e.offsetParent:null}function Le(e,t){const n=re(e);if(!ue(e))return n;let o=Ne(e,t);for(;o&&fe(o)&&"static"===me(o).position;)o=Ne(o,t);return o&&("html"===oe(o)||"body"===oe(o)&&"static"===me(o).position&&!de(o))?n:o||function(e){let t=he(e);for(;ue(t)&&!ve(t);){if(de(t))return t;t=he(t)}return null}(e)||n}const De={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:o}=e;const r=ue(n),i=ie(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0},a=I(1);const u=I(0);if((r||!r&&"fixed"!==o)&&(("body"!==oe(n)||se(i))&&(l=ye(n)),ue(n))){const e=Ce(n);a=Te(n),u.x=e.x+n.clientLeft,u.y=e.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-l.scrollLeft*a.x+u.x,y:t.y*a.y-l.scrollTop*a.y+u.y}},getDocumentElement:ie,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let o=be(e).filter((e=>ae(e)&&"body"!==oe(e))),r=null;const i="fixed"===me(e).position;let l=i?he(e):e;for(;ae(l)&&!ve(l);){const t=me(l),n=de(l);n||"fixed"!==t.position||(r=null),(i?!n&&!r:!n&&"static"===t.position&&r&&["absolute","fixed"].includes(r.position)||se(l)&&!n&&Ae(e,l))?o=o.filter((e=>e!==l)):r=t,l=he(l)}return t.set(e,o),o}(t,this._c):[].concat(n),o],l=i[0],a=i.reduce(((e,n)=>{const o=Oe(t,n,r);return e.top=L(o.top,e.top),e.right=N(o.right,e.right),e.bottom=N(o.bottom,e.bottom),e.left=L(o.left,e.left),e}),Oe(t,l,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:Le,getElementRects:async function(e){let{reference:t,floating:n,strategy:o}=e;const r=this.getOffsetParent||Le,i=this.getDimensions;return{reference:Se(t,await r(n),o),floating:{x:0,y:0,...await i(n)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){return we(e)},getScale:Te,isElement:ae,isRTL:function(e){return"rtl"===me(e).direction}};var He=a(8022),Ie={},je=function(e){return document.querySelector(e)instanceof HTMLElement},ke=function(e){return e instanceof Element||e instanceof HTMLDocument},Me=function(e){if(ke(e))return{isElement:!0,content:e,vNode:void 0};if(/^(#|\.)/.test(e)){var t=document.querySelector(e),n=ke(t);return{isElement:n,content:n?t:e,vNode:n?void 0:e}}return{isElement:!1,content:e,vNode:e}},Fe=a(467);const Ve=function(n,o,r){var i=r.refReference,l=r.refContent,a=r.refArrow,u=r.refRoot,c=(0,t.ref)(!1),s=(0,t.ref)(),f=function(){var e,t,n=b();return(null===(e=document.fullscreenElement)||void 0===e?void 0:e.shadowRoot)?document.fullscreenElement.shadowRoot.contains(n):null===(t=document.fullscreenElement)||void 0===t?void 0:t.contains(n)},d=["dark","light"],p=(0,t.computed)((function(){var e,t,o=null!==(t=null===(e=n.theme)||void 0===e?void 0:e.split(/\s+/))&&void 0!==t?t:[];return o.sort((function(e,t){return Number(d.includes(t))-Number(d.includes(e))})),{systemThemes:o,customThemes:o.filter((function(e){return!d.includes(e)}))}})),m=function(){return n.autoVisibility},h=function(){return n.autoPlacement},g=function(){var e,t,o,r=b(),i=T(null===(e=l.value)||void 0===e?void 0:e.$el),c=n.arrow?T(null===(t=a.value)||void 0===t?void 0:t.$el):null,s=T(null===(o=u.value)||void 0===o?void 0:o.$el),f=Me(n.content),d=f.isElement,p=f.content;return i&&d&&!(null==i?void 0:i.contains(p))&&i.append(p),{elReference:r,elContent:i,elArrow:c,root:s}},b=function(){var e;return T(n.target)||T(null===(e=i.value)||void 0===e?void 0:e.$el)},w=function(){var e={};return Array.isArray(n.modifiers)&&n.modifiers.forEach((function(t){var n,o,r,i,l;if("offset"===t.name){if("number"==typeof(null===(n=t.options)||void 0===n?void 0:n.offset)&&(l=null===(o=t.options)||void 0===o?void 0:o.offset),Array.isArray(null===(r=t.options)||void 0===r?void 0:r.offset)){var a=R(null===(i=t.options)||void 0===i?void 0:i.offset,2);l={mainAxis:a[0],crossAxis:a[1]}}Object.assign(e,{offset:l})}})),e},x=function(e,t){var n,o,r=w(),i=[te(r.offset||t.offset),ne({padding:t.padding})],l={placement:t.placement,middleware:i};if(t.arrow&&i.push((e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:i,platform:l,elements:a}=t,{element:u,padding:c=0}=F(e,t)||{};if(null==u)return{};const s=X(c),f={x:n,y:o},d=U(r),p=q(d),v=await l.getDimensions(u),m="y"===d,y=m?"top":"left",h=m?"bottom":"right",g=m?"clientHeight":"clientWidth",b=i.reference[p]+i.reference[d]-f[d]-i.floating[p],w=f[d]-i.reference[d],x=await(null==l.getOffsetParent?void 0:l.getOffsetParent(u));let T=x?x[g]:0;T&&await(null==l.isElement?void 0:l.isElement(x))||(T=a.floating[g]||i.floating[p]);const P=b/2-w/2,E=T/2-v[p]/2-1,C=N(s[y],E),R=N(s[h],E),O=C,A=T-v[p]-R,S=T/2-v[p]/2+P,L=M(O,S,A),D=null!=$(r)&&S!=L&&i.reference[p]/2-(S<O?C:R)-v[p]/2<0?S<O?O-S:A-S:0;return{[d]:f[d]-D,data:{[d]:L,centerOffset:S-L+D}}}}))({element:e})),h()?i.push(function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,o,r;const{rects:i,middlewareData:l,placement:a,platform:u,elements:c}=t,{crossAxis:s=!1,alignment:f,allowedPlacements:d=S,autoAlignment:p=!0,...v}=F(e,t),m=void 0!==f||d===S?function(e,t,n){return(e?[...n.filter((t=>$(t)===e)),...n.filter((t=>$(t)!==e))]:n.filter((e=>V(e)===e))).filter((n=>!e||$(n)===e||!!t&&z(n)!==n))}(f||null,p,d):d,y=await G(t,v),h=(null==(n=l.autoPlacement)?void 0:n.index)||0,g=m[h];if(null==g)return{};const b=W(g,i,await(null==u.isRTL?void 0:u.isRTL(c.floating)));if(a!==g)return{reset:{placement:m[0]}};const w=[y[V(g)],y[b[0]],y[b[1]]],x=[...(null==(o=l.autoPlacement)?void 0:o.overflows)||[],{placement:g,overflows:w}],T=m[h+1];if(T)return{data:{index:h+1,overflows:x},reset:{placement:T}};const P=x.map((e=>{const t=$(e.placement);return[e.placement,t&&s?e.overflows.slice(0,2).reduce(((e,t)=>e+t),0):e.overflows[0],e.overflows]})).sort(((e,t)=>e[1]-t[1])),E=(null==(r=P.filter((e=>e[2].slice(0,$(e[0])?2:3).every((e=>e<=0))))[0])?void 0:r[0])||P[0][0];return E!==a?{data:{index:h+1,overflows:x},reset:{placement:E}}:{}}}}()):(i.unshift(function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){const{placement:n,elements:o,rects:r,platform:i,strategy:l}=t,{padding:a=2,x:u,y:c}=F(e,t),s=Array.from(await(null==i.getClientRects?void 0:i.getClientRects(o.reference))||[]),f=function(e){const t=e.slice().sort(((e,t)=>e.y-t.y)),n=[];let o=null;for(let e=0;e<t.length;e++){const r=t[e];!o||r.y-o.y>o.height/2?n.push([r]):n[n.length-1].push(r),o=r}return n.map((e=>Y(ee(e))))}(s),d=Y(ee(s)),p=X(a),v=await i.getElementRects({reference:{getBoundingClientRect:function(){if(2===f.length&&f[0].left>f[1].right&&null!=u&&null!=c)return f.find((e=>u>e.left-p.left&&u<e.right+p.right&&c>e.top-p.top&&c<e.bottom+p.bottom))||d;if(f.length>=2){if("y"===B(n)){const e=f[0],t=f[f.length-1],o="top"===V(n),r=e.top,i=t.bottom,l=o?e.left:t.left,a=o?e.right:t.right;return{top:r,bottom:i,left:l,right:a,width:a-l,height:i-r,x:l,y:r}}const e="left"===V(n),t=L(...f.map((e=>e.right))),o=N(...f.map((e=>e.left))),r=f.filter((n=>e?n.left===o:n.right===t)),i=r[0].top,l=r[r.length-1].bottom;return{top:i,bottom:l,left:o,right:t,width:t-o,height:l-i,x:o,y:i}}return d}},floating:o.floating,strategy:l});return r.reference.x!==v.reference.x||r.reference.y!==v.reference.y||r.reference.width!==v.reference.width||r.reference.height!==v.reference.height?{reset:{rects:v}}:{}}}}()),i.push(function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:o,middlewareData:r,rects:i,initialPlacement:l,platform:a,elements:u}=t,{mainAxis:c=!0,crossAxis:s=!0,fallbackPlacements:f,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:v=!0,...m}=F(e,t),y=V(o),h=V(l)===l,g=await(null==a.isRTL?void 0:a.isRTL(u.floating)),b=f||(h||!v?[K(l)]:function(e){const t=K(e);return[z(e),t,z(t)]}(l));f||"none"===p||b.push(...function(e,t,n,o){const r=$(e);let i=function(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:l;default:return[]}}(V(e),"start"===n,o);return r&&(i=i.map((e=>e+"-"+r)),t&&(i=i.concat(i.map(z)))),i}(l,v,p,g));const w=[l,...b],x=await G(t,m),T=[];let P=(null==(n=r.flip)?void 0:n.overflows)||[];if(c&&T.push(x[y]),s){const e=W(o,i,g);T.push(x[e[0]],x[e[1]])}if(P=[...P,{placement:o,overflows:T}],!T.every((e=>e<=0))){var E,C;const e=((null==(E=r.flip)?void 0:E.index)||0)+1,t=w[e];if(t)return{data:{index:e,overflows:P},reset:{placement:t}};let n=null==(C=P.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:C.placement;if(!n)switch(d){case"bestFit":{var R;const e=null==(R=P.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:R[0];e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}}())),m()&&l.middleware.push(function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=F(e,t);switch(o){case"referenceHidden":{const e=J(await G(t,{...r,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Q(e)}}}case"escaped":{const e=J(await G(t,{...r,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Q(e)}}}default:return{}}}}}()),f()||t.isVirtualEl){var a=(o=s.value,{getElementRects:function(e){var t=e.reference,n=e.floating,o=t.getBoundingClientRect(),r=n.getBoundingClientRect();return{reference:{width:o.width,height:o.height,x:o.x,y:o.y},floating:{width:r.width,height:r.height,x:r.x,y:r.y}}},getDimensions:function(e){var t=e.getBoundingClientRect();return{width:t.width,height:t.height}},getClippingRect:function(e){var t;!function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e);var n=null!==(t=null==o?void 0:o.getBoundingClientRect())&&void 0!==t?t:{},r=n.width,i=void 0===r?0:r,l=n.height;return{width:i,height:void 0===l?0:l,x:0,y:0}}}),u=a.getElementRects,c=a.getDimensions,d=a.getClippingRect;Object.assign(l,{platform:Object.assign(Object.assign({},null!==(n=null==t?void 0:t.platform)&&void 0!==n?n:{}),{getElementRects:u,getDimensions:c,getClippingRect:d})})}return l},T=function e(t){if(t instanceof HTMLElement)return t;if(t instanceof Text)return e(t.nextElementSibling);if("function"==typeof(null==t?void 0:t.getBoundingClientRect))return t;if("string"==typeof t){var n=document.querySelector(t);return(0,Fe.isElement)(n)?n:null}return t instanceof PointerEvent?e(t.target):null},P=p.value.customThemes.join(" "),E=p.value.customThemes.reduce((function(e,t){return Object.assign(v({},"data-".concat(t,"-theme"),!0),e)}),{}),C="".concat(P),O=null,A=function(e){var t=window.devicePixelRatio||1;return Math.round(e*t)/t||0},D=function(e,t,o,r){var i;n.disableTransform?Object.assign(e.style,{left:"".concat(A(t),"px"),top:"".concat(A(o),"px")}):Object.assign(e.style,{left:"0",top:"0",transform:"translate3d(".concat(A(t),"px,").concat(A(o),"px,0)")});var l=!!m()&&(null===(i=r.hide)||void 0===i?void 0:i.referenceHidden);Object.assign(e.style,{visibility:l?"hidden":"visible"})},I=function(e,t,o){var r;if(n.arrow){var i=null!==(r=o.arrow)&&void 0!==r?r:{},l=i.x,a=i.y;e.setAttribute("data-arrow",t),Object.assign(e.style,{left:"",top:"",bottom:"",right:""});var u={top:"bottom",right:"left",bottom:"top",left:"right"}[t];Object.assign(e.style,v({left:null!==l?"".concat(l,"px"):"",top:null!==a?"".concat(a,"px"):""},u,"-4px"))}},j=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,o=g(),r=o.elReference,i=o.elContent,l=o.elArrow,a=e||r;if(a&&i){var u=x(l,t);((e,t,n)=>{const o=new Map,r={platform:De,...n},i={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),u=await(null==l.isRTL?void 0:l.isRTL(t));let c=await l.getElementRects({reference:e,floating:t,strategy:r}),{x:s,y:f}=Z(c,o,u),d=o,p={},v=0;for(let n=0;n<a.length;n++){const{name:i,fn:m}=a[n],{x:y,y:h,data:g,reset:b}=await m({x:s,y:f,initialPlacement:o,placement:d,strategy:r,middlewareData:p,rects:c,platform:l,elements:{reference:e,floating:t}});s=null!=y?y:s,f=null!=h?h:f,p={...p,[i]:{...p[i],...g}},b&&v<=50&&(v++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(c=!0===b.rects?await l.getElementRects({reference:e,floating:t,strategy:r}):b.rects),({x:s,y:f}=Z(c,d,u))),n=-1)}return{x:s,y:f,placement:d,strategy:r,middlewareData:p}})(e,t,{...r,platform:i})})(a,i,u).then((function(e){var t=e.x,o=e.y,r=e.placement,a=e.middlewareData,u=i.className;i.className="".concat(u.replace(C,"")," ").concat(C).replace(/\s+/gm," ").replace(/^\s+|\s+$/g,""),Object.keys(E).forEach((function(e){i.setAttribute(e,E[e])}));var c=r.split("-")[0],s=c;["left","right","top","bottom"].includes(c)||(s="top"),D(i,t,o,a),I(l,s,a),"function"==typeof n&&n()}))}},k=void 0,_=void 0,oe=!1,re=function(){return Array.isArray(n.popoverDelay)?[n.popoverDelay[0],n.popoverDelay.slice(-1)[0]]:[n.popoverDelay,n.popoverDelay]},le=function(){var e=re()[0];_=setTimeout((function(){k&&clearTimeout(k),n.disabled||(c.value=!0)}),e)},ae=function(){var e=re()[1];k=setTimeout((function(){_&&clearTimeout(_),c.value=!1}),e)},ue=function(){c.value?ae():le()},ce=function(){ue()},se=function(e){"hover"===n.trigger&&(k&&(oe=!0,clearTimeout(k),k=void 0),de(e))},fe=function(e){oe&&(ae(),oe=!1,pe(e))},de=function(e){o.emit(y.CONTENT_MOUSEENTER,e)},pe=function(e){o.emit(y.CONTENT_MOUSELEAVE,e)};return(0,t.watch)((function(){return n.isShow}),(function(e){c.value=e})),(0,t.watch)(c,(function(t){var r,i;t?((i=T(null===(r=l.value)||void 0===r?void 0:r.$el)).style.setProperty("display","block"),i.style.setProperty("z-index","".concat(n.zIndex?n.zIndex:e.bkZIndexManager.getPopperIndex())),j(),o.emit(y.CONTENT_AfterShow,{isShow:!0})):function(){var e;T(null===(e=l.value)||void 0===e?void 0:e.$el).style.setProperty("display","none"),o.emit(y.CONTENT_AfterHidden,{isShow:!1})}()})),{showPopover:le,hidePopover:ae,resolveTriggerEvents:function(){var e;return null!==(e={hover:{content:[["mouseenter",se],["mouseleave",fe]],reference:[["mouseenter",le],["mouseleave",ae],["focus",le],["blur",ae]]},click:[["click",ce]],manual:{content:[["mouseenter",de],["mouseleave",pe]],reference:[[]]}}[n.trigger])&&void 0!==e?e:[]},updatePopover:j,triggerPopover:ue,resolvePopElements:g,isElementFullScreen:f,resolveTargetElement:T,createPopInstance:function(){var e=g(),t=e.elReference,o=e.elContent;O=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:u=!1}=o,c=xe(e),s=r||i?[...c?be(c):[],...be(t)]:[];s.forEach((e=>{r&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const f=c&&a?function(e,t){let n,o=null;const r=ie(e);function i(){clearTimeout(n),o&&o.disconnect(),o=null}return function l(a,u){void 0===a&&(a=!1),void 0===u&&(u=1),i();const{left:c,top:s,width:f,height:d}=e.getBoundingClientRect();if(a||t(),!f||!d)return;const p={rootMargin:-H(s)+"px "+-H(r.clientWidth-(c+f))+"px "+-H(r.clientHeight-(s+d))+"px "+-H(c)+"px",threshold:L(0,N(1,u))||1};let v=!0;function m(e){const t=e[0].intersectionRatio;if(t!==u){if(!v)return l();t?l(!1,t):n=setTimeout((()=>{l(!1,1e-7)}),100)}v=!1}try{o=new IntersectionObserver(m,{...p,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(m,p)}o.observe(e)}(!0),i}(c,n):null;let d,p=-1,v=null;l&&(v=new ResizeObserver((e=>{let[o]=e;o&&o.target===c&&v&&(v.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{v&&v.observe(t)}))),n()})),c&&!u&&v.observe(c),v.observe(t));let m=u?Ce(e):null;return u&&function t(){const o=Ce(e);!m||o.x===m.x&&o.y===m.y&&o.width===m.width&&o.height===m.height||n(),m=o,d=requestAnimationFrame(t)}(),n(),()=>{s.forEach((e=>{r&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),f&&f(),v&&v.disconnect(),v=null,u&&cancelAnimationFrame(d)}}(t,o,(function(){c.value&&j(null,n)}))},updateFullscreenTarget:function(e){s.value=e},getFullscreenRoot:function(e){return f()?document.fullscreenElement.shadowRoot?document.fullscreenElement.shadowRoot.querySelector(e):document.fullscreenElement.querySelector(e):document.body},stopHide:function(){k&&(oe=!0,clearTimeout(k),k=void 0)},localIsShow:c,cleanup:O}};var $e=null,_e=null;const qe=(0,t.defineComponent)({name:"Popover",components:{Content:w,Arrow:d,Root:E},directives:{clickoutside:s},props:T,emits:b,setup:function(n,o){var r=(0,t.toRefs)(n).reference,i=(0,t.ref)(),l=(0,t.ref)(),a=(0,t.ref)(),u=(0,t.ref)(),c=(0,t.computed)((function(){return r.value||i.value})),s=function(e,n,o){var r=o.refReference,i=o.refContent,l=o.refArrow,a=o.refRoot,u=null,c=(0,t.ref)(!1),s=(Ie.fullscreenReferId||(Ie.fullscreenReferId="id_".concat((0,He.v4)())),Ie.fullscreenReferId),f=(0,t.ref)(),d=Ve(e,n,{refReference:r,refContent:i,refArrow:l,refRoot:a}),p=d.localIsShow,v=d.showPopover,m=d.hidePopover,h=d.updatePopover,g=d.cleanup,b=d.resolveTriggerEvents,w=d.resolvePopElements,x=d.isElementFullScreen,T=d.updateFullscreenTarget,P=d.createPopInstance,E=d.getFullscreenRoot,C=d.stopHide,O=function(){m()},A=function(){P(),e.always?v():S()},S=function(){var e=w(),t=e.elReference,n=e.elContent;if(u=b(),Array.isArray(u))N(t,u);else{var o=u,r=o.content,i=o.reference;N(t,i),N(n,r)}},N=function(e,t){t.forEach((function(t){var n=R(t,2),o=n[0],r=n[1];o&&"function"==typeof r&&e.addEventListener(o,r)}))},L=function(){var e=w(),t=e.elReference,n=e.root;c.value?I.value=null==f?void 0:f.value:I.value=H(n||t)},D=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#",n=function(n){var o=null,r=function(e){null===o&&e()};return r((function(){if(/^parent$/i.test(e.boundary)){o="".concat(t).concat($e);var r=(n||{}).parentNode;(null==r?void 0:r.parentNode)&&(r.parentNode.setAttribute("data-pnode-id",_e),o="[data-pnode-id=".concat(_e,"]"))}})),r((function(){if(!/^body$/i.test(e.boundary)){if("string"==typeof e.boundary)return je(e.boundary)?void(o=e.boundary):void(o="body");if(ke(e.boundary))return void(o=e.boundary)}})),r((function(){o="string"==typeof e.boundary?e.boundary:"".concat(t).concat($e)})),o};if(null===$e||!je("#".concat($e))){$e="id_".concat((0,He.v4)());var o=document.createElement("div");o.setAttribute("id",$e),o.setAttribute("data-popper-id",$e),document.body.append(o)}return null===_e&&(_e="id_".concat((0,He.v4)())),{popContainerId:$e,prefixId:n(),getPrefixId:n}}(e,"#"),H=D.getPrefixId,I=(0,t.ref)(),j=function(){!function(){if(null==u?void 0:u.length){var e=w().elReference;e&&u.forEach((function(t){var n=R(t,2),o=n[0],r=n[1];o&&"function"==typeof r&&e.removeEventListener(o,r)})),u=null}}()},k=function(e){var t;f.value=e,T(e),c.value=x(),null===(t=null==f?void 0:f.value)||void 0===t||t.setAttribute("data-fllsrn-id",s)},M=function(t){var n,o,r;document.fullscreenElement||(r="[data-fllsrn-id=".concat(s,"]"),(null!==(o=null===(n=null==f?void 0:f.value)||void 0===n?void 0:n.querySelectorAll(r))&&void 0!==o?o:[]).forEach((function(e){null==e||e.removeAttribute("data-fllsrn-id")}))),k(t.target),L(),h(null,e)};return{onMountedFn:function(){if(!e.disabled){if(A(),x()){var t="[data-fllsrn-id=".concat(s,"]"),n=E(t);k(n)}L(),document.body.addEventListener("fullscreenchange",M)}},onUnmountedFn:function(){j(),document.body.removeEventListener("fullscreenchange",M)},handleClickOutside:function(t){n.emit(y.CLICK_OUTSIDE,{isShow:p.value,event:t});var o=e.disableOutsideClick||e.always||e.disabled||"manual"===e.trigger;!e.forceClickoutside&&o||p.value&&O()},beforeInstanceUnmount:j,updateBoundary:L,initPopInstance:A,updatePopover:h,resetPopover:function(){null==g||g(),P()},showPopover:v,hidePopover:m,showFn:function(){v()},hideFn:O,stopHide:C,isFullscreen:c,boundary:I,localIsShow:p}}(n,o,{refReference:c,refContent:l,refArrow:a,refRoot:u}),f=s.onMountedFn,d=s.onUnmountedFn,p=s.handleClickOutside,v=s.beforeInstanceUnmount,m=s.updateBoundary,h=s.initPopInstance,g=s.showFn,b=s.hideFn,w=s.showPopover,x=s.hidePopover,T=s.updatePopover,P=s.resetPopover,E=s.stopHide,C=s.localIsShow,O=s.boundary;n.always||n.disabled||(0,t.watch)((function(){return n.isShow}),(function(){n.isShow?w():x()}),{immediate:!0}),(0,t.watch)((function(){return[n.disabled]}),(function(e){e[0]?v():h()})),m(),(0,t.onMounted)(f),(0,t.onBeforeUnmount)(d);var A=(0,t.computed)((function(){return!n.disableTeleport})),S=(0,t.computed)((function(){return n.renderType===e.RenderType.AUTO||C.value}));return{boundary:O,arrow:n.arrow,refDefaultReference:i,refContent:l,refArrow:a,content:n.content,theme:n.theme,transBoundary:A,handleClickOutside:p,updatePopover:T,resetPopover:P,hide:function(){b()},show:function(){g()},stopHide:E,contentIsShow:S,renderContent:function(){return n.allowHtml?Me(n.content).vNode:n.content},localIsShow:C}},render:function(){var e,n,o,r,i,l,a,u=this,c=function(e){var n;return t.Text===(null===(n=null==e?void 0:e[0])||void 0===n?void 0:n.type)?(0,t.createVNode)("span",null,[e]):e};return(0,t.createVNode)(E,{ref:"refRoot"},{default:function(){return[(0,t.createVNode)(P,{ref:"refDefaultReference"},(s=e=c(null!==(r=null===(o=(n=u.$slots).default)||void 0===o?void 0:o.call(n))&&void 0!==r?r:(0,t.createVNode)("span",null,null)),"function"==typeof s||"[object Object]"===Object.prototype.toString.call(s)&&!(0,t.isVNode)(s)?e:{default:function(){return[e]}})),(0,t.createVNode)(t.Teleport,{to:u.boundary,disabled:!u.transBoundary},{default:function(){return[(0,t.withDirectives)((0,t.createVNode)(w,{ref:"refContent",visible:u.localIsShow,"data-theme":u.theme,extCls:u.extCls,width:u.width,height:u.height,maxHeight:u.maxHeight,eventDelay:u.componentEventDelay},{default:function(){return[u.contentIsShow?null!==(a=null===(l=(i=u.$slots).content)||void 0===l?void 0:l.call(i))&&void 0!==a?a:u.renderContent():""]},arrow:function(){var e,n;return u.arrow?(0,t.createVNode)(d,{ref:"refArrow"},{default:function(){return[null===(n=(e=u.$slots).arrow)||void 0===n?void 0:n.call(e)]}}):""}}),[[(0,t.resolveDirective)("clickoutside"),u.handleClickOutside]])]}})];var s}})}});function Be(e){var n,o=null,r=null,i=null,l=Object.assign(Object.assign({boundary:"body",placement:"top",autoVisibility:!0,isShow:!1,trigger:"manual"},e),{allowHtml:!0}),a={name:"$popover",setup:function(e,n){var o=n.expose,r=(0,t.reactive)(Object.keys(T).reduce((function(e,t){return Object.prototype.hasOwnProperty.call(l,t)&&Object.assign(e,v({},t,l[t])),e}),{target:l.target})),i=(0,t.ref)(),a=function(){var e;null===(e=l.onContentMouseenter)||void 0===e||e.call(l)},u=function(){var e;null===(e=l.onContentMouseleave)||void 0===e||e.call(l)};return o({show:function(){var e,t;null===(t=null===(e=i.value)||void 0===e?void 0:e.show)||void 0===t||t.call(e)},hide:function(){var e,t;null===(t=null===(e=i.value)||void 0===e?void 0:e.hide)||void 0===t||t.call(e)},updateTarget:function(e){var t,n;r.target=e,null===(n=null===(t=i.value)||void 0===t?void 0:t.resetPopover)||void 0===n||n.call(t)},stopHide:function(){var e,t;null===(t=null===(e=i.value)||void 0===e?void 0:e.stopHide)||void 0===t||t.call(e)}}),function(){return(0,t.createVNode)(qe,(0,t.mergeProps)(r,{ref:i,onContentMouseenter:a,onContentMouseleave:u}),null)}}};return null===o&&(i=document.createElement("div"),(n=l.boundary,/^body$/i.test(n)?document.body:/^parent$/i.test(n)?ke(l.target)?l.target.parentNode:l.target.target.parentNode:"string"==typeof n&&je(n)?document.querySelector(n):document.body).append(i),o=(0,t.createApp)(a),r=o.mount(i)),{close:function(){o&&(o.unmount(),r=null,o=null,i.remove())},show:function(){null==r||r.show()},hide:function(){null==r||r.hide()},update:function(e){null==r||r.updateTarget(e)},get vm(){return r},get $el(){return r.$el}}}const Ue=(0,e.withInstall)(qe)})(),u})()));
1
+ (function webpackUniversalModuleDefinition(root, factory) {
2
+ if(typeof exports === 'object' && typeof module === 'object')
3
+ module.exports = factory(require("../shared"), require("vue"), require("../config-provider"), require("vue-types"), require("lodash"));
4
+ else if(typeof define === 'function' && define.amd)
5
+ define(["../shared", "vue", "../config-provider", "vue-types", "lodash"], factory);
6
+ else {
7
+ var a = typeof exports === 'object' ? factory(require("../shared"), require("vue"), require("../config-provider"), require("vue-types"), require("lodash")) : factory(root["../shared"], root["vue"], root["../config-provider"], root["vue-types"], root["lodash"]);
8
+ for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
9
+ }
10
+ })(self, (__WEBPACK_EXTERNAL_MODULE__4212__, __WEBPACK_EXTERNAL_MODULE__748__, __WEBPACK_EXTERNAL_MODULE__2717__, __WEBPACK_EXTERNAL_MODULE__210__, __WEBPACK_EXTERNAL_MODULE__467__) => {
11
+ return /******/ (() => { // webpackBootstrap
12
+ /******/ var __webpack_modules__ = ({
13
+
14
+ /***/ 8022:
15
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
16
+
17
+ var v1 = __webpack_require__(4481);
18
+ var v4 = __webpack_require__(6426);
19
+
20
+ var uuid = v4;
21
+ uuid.v1 = v1;
22
+ uuid.v4 = v4;
23
+
24
+ module.exports = uuid;
25
+
26
+
27
+ /***/ }),
28
+
29
+ /***/ 8725:
30
+ /***/ ((module) => {
31
+
32
+ /**
33
+ * Convert array of 16 byte values to UUID string format of the form:
34
+ * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
35
+ */
36
+ var byteToHex = [];
37
+ for (var i = 0; i < 256; ++i) {
38
+ byteToHex[i] = (i + 0x100).toString(16).substr(1);
39
+ }
40
+
41
+ function bytesToUuid(buf, offset) {
42
+ var i = offset || 0;
43
+ var bth = byteToHex;
44
+ // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4
45
+ return ([
46
+ bth[buf[i++]], bth[buf[i++]],
47
+ bth[buf[i++]], bth[buf[i++]], '-',
48
+ bth[buf[i++]], bth[buf[i++]], '-',
49
+ bth[buf[i++]], bth[buf[i++]], '-',
50
+ bth[buf[i++]], bth[buf[i++]], '-',
51
+ bth[buf[i++]], bth[buf[i++]],
52
+ bth[buf[i++]], bth[buf[i++]],
53
+ bth[buf[i++]], bth[buf[i++]]
54
+ ]).join('');
55
+ }
56
+
57
+ module.exports = bytesToUuid;
58
+
59
+
60
+ /***/ }),
61
+
62
+ /***/ 9157:
63
+ /***/ ((module) => {
64
+
65
+ // Unique ID creation requires a high quality random # generator. In the
66
+ // browser this is a little complicated due to unknown quality of Math.random()
67
+ // and inconsistent support for the `crypto` API. We do the best we can via
68
+ // feature-detection
69
+
70
+ // getRandomValues needs to be invoked in a context where "this" is a Crypto
71
+ // implementation. Also, find the complete implementation of crypto on IE11.
72
+ var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||
73
+ (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));
74
+
75
+ if (getRandomValues) {
76
+ // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto
77
+ var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef
78
+
79
+ module.exports = function whatwgRNG() {
80
+ getRandomValues(rnds8);
81
+ return rnds8;
82
+ };
83
+ } else {
84
+ // Math.random()-based (RNG)
85
+ //
86
+ // If all else fails, use Math.random(). It's fast, but is of unspecified
87
+ // quality.
88
+ var rnds = new Array(16);
89
+
90
+ module.exports = function mathRNG() {
91
+ for (var i = 0, r; i < 16; i++) {
92
+ if ((i & 0x03) === 0) r = Math.random() * 0x100000000;
93
+ rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;
94
+ }
95
+
96
+ return rnds;
97
+ };
98
+ }
99
+
100
+
101
+ /***/ }),
102
+
103
+ /***/ 4481:
104
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
105
+
106
+ var rng = __webpack_require__(9157);
107
+ var bytesToUuid = __webpack_require__(8725);
108
+
109
+ // **`v1()` - Generate time-based UUID**
110
+ //
111
+ // Inspired by https://github.com/LiosK/UUID.js
112
+ // and http://docs.python.org/library/uuid.html
113
+
114
+ var _nodeId;
115
+ var _clockseq;
116
+
117
+ // Previous uuid creation time
118
+ var _lastMSecs = 0;
119
+ var _lastNSecs = 0;
120
+
121
+ // See https://github.com/uuidjs/uuid for API details
122
+ function v1(options, buf, offset) {
123
+ var i = buf && offset || 0;
124
+ var b = buf || [];
125
+
126
+ options = options || {};
127
+ var node = options.node || _nodeId;
128
+ var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;
129
+
130
+ // node and clockseq need to be initialized to random values if they're not
131
+ // specified. We do this lazily to minimize issues related to insufficient
132
+ // system entropy. See #189
133
+ if (node == null || clockseq == null) {
134
+ var seedBytes = rng();
135
+ if (node == null) {
136
+ // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
137
+ node = _nodeId = [
138
+ seedBytes[0] | 0x01,
139
+ seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]
140
+ ];
141
+ }
142
+ if (clockseq == null) {
143
+ // Per 4.2.2, randomize (14 bit) clockseq
144
+ clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;
145
+ }
146
+ }
147
+
148
+ // UUID timestamps are 100 nano-second units since the Gregorian epoch,
149
+ // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
150
+ // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
151
+ // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
152
+ var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();
153
+
154
+ // Per 4.2.1.2, use count of uuid's generated during the current clock
155
+ // cycle to simulate higher resolution clock
156
+ var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;
157
+
158
+ // Time since last uuid creation (in msecs)
159
+ var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;
160
+
161
+ // Per 4.2.1.2, Bump clockseq on clock regression
162
+ if (dt < 0 && options.clockseq === undefined) {
163
+ clockseq = clockseq + 1 & 0x3fff;
164
+ }
165
+
166
+ // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
167
+ // time interval
168
+ if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
169
+ nsecs = 0;
170
+ }
171
+
172
+ // Per 4.2.1.2 Throw error if too many uuids are requested
173
+ if (nsecs >= 10000) {
174
+ throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec');
175
+ }
176
+
177
+ _lastMSecs = msecs;
178
+ _lastNSecs = nsecs;
179
+ _clockseq = clockseq;
180
+
181
+ // Per 4.1.4 - Convert from unix epoch to Gregorian epoch
182
+ msecs += 12219292800000;
183
+
184
+ // `time_low`
185
+ var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
186
+ b[i++] = tl >>> 24 & 0xff;
187
+ b[i++] = tl >>> 16 & 0xff;
188
+ b[i++] = tl >>> 8 & 0xff;
189
+ b[i++] = tl & 0xff;
190
+
191
+ // `time_mid`
192
+ var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;
193
+ b[i++] = tmh >>> 8 & 0xff;
194
+ b[i++] = tmh & 0xff;
195
+
196
+ // `time_high_and_version`
197
+ b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
198
+ b[i++] = tmh >>> 16 & 0xff;
199
+
200
+ // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
201
+ b[i++] = clockseq >>> 8 | 0x80;
202
+
203
+ // `clock_seq_low`
204
+ b[i++] = clockseq & 0xff;
205
+
206
+ // `node`
207
+ for (var n = 0; n < 6; ++n) {
208
+ b[i + n] = node[n];
209
+ }
210
+
211
+ return buf ? buf : bytesToUuid(b);
212
+ }
213
+
214
+ module.exports = v1;
215
+
216
+
217
+ /***/ }),
218
+
219
+ /***/ 6426:
220
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
221
+
222
+ var rng = __webpack_require__(9157);
223
+ var bytesToUuid = __webpack_require__(8725);
224
+
225
+ function v4(options, buf, offset) {
226
+ var i = buf && offset || 0;
227
+
228
+ if (typeof(options) == 'string') {
229
+ buf = options === 'binary' ? new Array(16) : null;
230
+ options = null;
231
+ }
232
+ options = options || {};
233
+
234
+ var rnds = options.random || (options.rng || rng)();
235
+
236
+ // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
237
+ rnds[6] = (rnds[6] & 0x0f) | 0x40;
238
+ rnds[8] = (rnds[8] & 0x3f) | 0x80;
239
+
240
+ // Copy bytes to buffer, if provided
241
+ if (buf) {
242
+ for (var ii = 0; ii < 16; ++ii) {
243
+ buf[i + ii] = rnds[ii];
244
+ }
245
+ }
246
+
247
+ return buf || bytesToUuid(rnds);
248
+ }
249
+
250
+ module.exports = v4;
251
+
252
+
253
+ /***/ }),
254
+
255
+ /***/ 2717:
256
+ /***/ ((module) => {
257
+
258
+ "use strict";
259
+ module.exports = __WEBPACK_EXTERNAL_MODULE__2717__;
260
+
261
+ /***/ }),
262
+
263
+ /***/ 4212:
264
+ /***/ ((module) => {
265
+
266
+ "use strict";
267
+ module.exports = __WEBPACK_EXTERNAL_MODULE__4212__;
268
+
269
+ /***/ }),
270
+
271
+ /***/ 467:
272
+ /***/ ((module) => {
273
+
274
+ "use strict";
275
+ module.exports = __WEBPACK_EXTERNAL_MODULE__467__;
276
+
277
+ /***/ }),
278
+
279
+ /***/ 748:
280
+ /***/ ((module) => {
281
+
282
+ "use strict";
283
+ module.exports = __WEBPACK_EXTERNAL_MODULE__748__;
284
+
285
+ /***/ }),
286
+
287
+ /***/ 210:
288
+ /***/ ((module) => {
289
+
290
+ "use strict";
291
+ module.exports = __WEBPACK_EXTERNAL_MODULE__210__;
292
+
293
+ /***/ })
294
+
295
+ /******/ });
296
+ /************************************************************************/
297
+ /******/ // The module cache
298
+ /******/ var __webpack_module_cache__ = {};
299
+ /******/
300
+ /******/ // The require function
301
+ /******/ function __webpack_require__(moduleId) {
302
+ /******/ // Check if module is in cache
303
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
304
+ /******/ if (cachedModule !== undefined) {
305
+ /******/ return cachedModule.exports;
306
+ /******/ }
307
+ /******/ // Create a new module (and put it into the cache)
308
+ /******/ var module = __webpack_module_cache__[moduleId] = {
309
+ /******/ // no module.id needed
310
+ /******/ // no module.loaded needed
311
+ /******/ exports: {}
312
+ /******/ };
313
+ /******/
314
+ /******/ // Execute the module function
315
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
316
+ /******/
317
+ /******/ // Return the exports of the module
318
+ /******/ return module.exports;
319
+ /******/ }
320
+ /******/
321
+ /************************************************************************/
322
+ /******/ /* webpack/runtime/define property getters */
323
+ /******/ (() => {
324
+ /******/ // define getter functions for harmony exports
325
+ /******/ __webpack_require__.d = (exports, definition) => {
326
+ /******/ for(var key in definition) {
327
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
328
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
329
+ /******/ }
330
+ /******/ }
331
+ /******/ };
332
+ /******/ })();
333
+ /******/
334
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
335
+ /******/ (() => {
336
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
337
+ /******/ })();
338
+ /******/
339
+ /******/ /* webpack/runtime/make namespace object */
340
+ /******/ (() => {
341
+ /******/ // define __esModule on exports
342
+ /******/ __webpack_require__.r = (exports) => {
343
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
344
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
345
+ /******/ }
346
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
347
+ /******/ };
348
+ /******/ })();
349
+ /******/
350
+ /************************************************************************/
351
+ var __webpack_exports__ = {};
352
+ // This entry need to be wrapped in an IIFE because it need to be in strict mode.
353
+ (() => {
354
+ "use strict";
355
+ // ESM COMPAT FLAG
356
+ __webpack_require__.r(__webpack_exports__);
357
+
358
+ // EXPORTS
359
+ __webpack_require__.d(__webpack_exports__, {
360
+ $bkPopover: () => (/* reexport */ createPopoverComponent),
361
+ PopoverProps: () => (/* reexport */ PopoverProps),
362
+ "default": () => (/* binding */ src)
363
+ });
364
+
365
+ // EXTERNAL MODULE: external "../shared"
366
+ var external_shared_ = __webpack_require__(4212);
367
+ // EXTERNAL MODULE: external "vue"
368
+ var external_vue_ = __webpack_require__(748);
369
+ ;// CONCATENATED MODULE: ../../packages/directives/src/clickoutside.ts
370
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
371
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
372
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
373
+ /*
374
+ * Tencent is pleased to support the open source community by making
375
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
376
+ *
377
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
378
+ *
379
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
380
+ *
381
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
382
+ *
383
+ * ---------------------------------------------------
384
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
385
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
386
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
387
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
388
+ *
389
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
390
+ * the Software.
391
+ *
392
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
393
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
394
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
395
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
396
+ * IN THE SOFTWARE.
397
+ */
398
+ var isElement = function isElement(e) {
399
+ if (typeof Element === 'undefined') return false;
400
+ return e instanceof Element;
401
+ };
402
+ var nodeList = new Map();
403
+ var startClick;
404
+ document.addEventListener('mousedown', function (e) {
405
+ return startClick = e;
406
+ });
407
+ document.addEventListener('mouseup', function (e) {
408
+ var _iterator = _createForOfIteratorHelper(nodeList.values()),
409
+ _step;
410
+ try {
411
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
412
+ var handlers = _step.value;
413
+ var _iterator2 = _createForOfIteratorHelper(handlers),
414
+ _step2;
415
+ try {
416
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
417
+ var documentHandler = _step2.value.documentHandler;
418
+ documentHandler(e, startClick);
419
+ }
420
+ } catch (err) {
421
+ _iterator2.e(err);
422
+ } finally {
423
+ _iterator2.f();
424
+ }
425
+ }
426
+ } catch (err) {
427
+ _iterator.e(err);
428
+ } finally {
429
+ _iterator.f();
430
+ }
431
+ });
432
+ function createDocumentHandler(el, binding) {
433
+ var excludes = [];
434
+ if (Array.isArray(binding.arg)) {
435
+ excludes = binding.arg;
436
+ } else if (isElement(binding.arg)) {
437
+ excludes.push(binding.arg);
438
+ }
439
+ return function (mouseup, mousedown) {
440
+ var popperRef = binding.instance.popperRef;
441
+ var mouseUpTarget = mouseup.target;
442
+ var mouseDownTarget = mousedown === null || mousedown === void 0 ? void 0 : mousedown.target;
443
+ var isBound = !binding || !binding.instance;
444
+ var isTargetExists = !mouseUpTarget || !mouseDownTarget;
445
+ var isContainedByEl = el.contains(mouseUpTarget) || el.contains(mouseDownTarget);
446
+ var isSelf = el === mouseUpTarget;
447
+ var isTargetExcluded = excludes.length && excludes.some(function (item) {
448
+ return item === null || item === void 0 ? void 0 : item.contains(mouseUpTarget);
449
+ }) || excludes.length && excludes.includes(mouseDownTarget);
450
+ var isContainedByPopper = popperRef && (popperRef.contains(mouseUpTarget) || popperRef.contains(mouseDownTarget));
451
+ if (isBound || isTargetExists || isContainedByEl || isSelf || isTargetExcluded || isContainedByPopper) {
452
+ return;
453
+ }
454
+ binding.value(mouseup, mousedown);
455
+ };
456
+ }
457
+ var ClickOutside = {
458
+ beforeMount: function beforeMount(el, binding) {
459
+ if (!nodeList.has(el)) {
460
+ nodeList.set(el, []);
461
+ }
462
+ nodeList.get(el).push({
463
+ documentHandler: createDocumentHandler(el, binding),
464
+ bindingFn: binding.value
465
+ });
466
+ },
467
+ updated: function updated(el, binding) {
468
+ if (!nodeList.has(el)) {
469
+ nodeList.set(el, []);
470
+ }
471
+ var handlers = nodeList.get(el);
472
+ var oldHandlerIndex = handlers.findIndex(function (item) {
473
+ return item.bindingFn === binding.oldValue;
474
+ });
475
+ var newHandler = {
476
+ documentHandler: createDocumentHandler(el, binding),
477
+ bindingFn: binding.value
478
+ };
479
+ if (oldHandlerIndex >= 0) {
480
+ // replace the old handler to the new handler
481
+ handlers.splice(oldHandlerIndex, 1, newHandler);
482
+ } else {
483
+ handlers.push(newHandler);
484
+ }
485
+ },
486
+ unmounted: function unmounted(el) {
487
+ // remove all listeners when a component unmounted
488
+ nodeList["delete"](el);
489
+ }
490
+ };
491
+ ClickOutside.install = function (app) {
492
+ app.directive('bkTooltips', ClickOutside);
493
+ };
494
+ /* harmony default export */ const clickoutside = (ClickOutside);
495
+ // EXTERNAL MODULE: external "../config-provider"
496
+ var external_config_provider_ = __webpack_require__(2717);
497
+ ;// CONCATENATED MODULE: ../../packages/popover/src/arrow.tsx
498
+
499
+ /*
500
+ * Tencent is pleased to support the open source community by making
501
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
502
+ *
503
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
504
+ *
505
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
506
+ *
507
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
508
+ *
509
+ * ---------------------------------------------------
510
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
511
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
512
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
513
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
514
+ *
515
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
516
+ * the Software.
517
+ *
518
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
519
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
520
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
521
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
522
+ * IN THE SOFTWARE.
523
+ */
524
+
525
+
526
+ /* harmony default export */ const src_arrow = ((0,external_vue_.defineComponent)({
527
+ name: 'PopArrow',
528
+ render: function render() {
529
+ var _usePrefix = (0,external_config_provider_.usePrefix)(),
530
+ resolveClassName = _usePrefix.resolveClassName;
531
+ var arrowClassName = resolveClassName('pop2-arrow');
532
+ return (0,external_vue_.createVNode)("div", {
533
+ "class": arrowClassName
534
+ }, null);
535
+ }
536
+ }));
537
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
538
+ function _typeof(obj) {
539
+ "@babel/helpers - typeof";
540
+
541
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
542
+ return typeof obj;
543
+ } : function (obj) {
544
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
545
+ }, _typeof(obj);
546
+ }
547
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
548
+
549
+ function _toPrimitive(input, hint) {
550
+ if (_typeof(input) !== "object" || input === null) return input;
551
+ var prim = input[Symbol.toPrimitive];
552
+ if (prim !== undefined) {
553
+ var res = prim.call(input, hint || "default");
554
+ if (_typeof(res) !== "object") return res;
555
+ throw new TypeError("@@toPrimitive must return a primitive value.");
556
+ }
557
+ return (hint === "string" ? String : Number)(input);
558
+ }
559
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
560
+
561
+
562
+ function _toPropertyKey(arg) {
563
+ var key = _toPrimitive(arg, "string");
564
+ return _typeof(key) === "symbol" ? key : String(key);
565
+ }
566
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
567
+
568
+ function _defineProperty(obj, key, value) {
569
+ key = _toPropertyKey(key);
570
+ if (key in obj) {
571
+ Object.defineProperty(obj, key, {
572
+ value: value,
573
+ enumerable: true,
574
+ configurable: true,
575
+ writable: true
576
+ });
577
+ } else {
578
+ obj[key] = value;
579
+ }
580
+ return obj;
581
+ }
582
+ ;// CONCATENATED MODULE: ../../packages/popover/src/const.tsx
583
+
584
+ var _EMIT_EVENT_TYPES;
585
+ /* eslint-disable @typescript-eslint/naming-convention */
586
+ /*
587
+ * Tencent is pleased to support the open source community by making
588
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
589
+ *
590
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
591
+ *
592
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
593
+ *
594
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
595
+ *
596
+ * ---------------------------------------------------
597
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
598
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
599
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
600
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
601
+ *
602
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
603
+ * the Software.
604
+ *
605
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
606
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
607
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
608
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
609
+ * IN THE SOFTWARE.
610
+ */
611
+ // eslint-disable-next-line @typescript-eslint/naming-convention
612
+ var EMIT_EVENTS;
613
+ (function (EMIT_EVENTS) {
614
+ EMIT_EVENTS["CLICK_OUTSIDE"] = "clickoutside";
615
+ EMIT_EVENTS["CONTENT_MOUSEENTER"] = "contentMouseenter";
616
+ EMIT_EVENTS["CONTENT_MOUSELEAVE"] = "contentMouseleave";
617
+ EMIT_EVENTS["CONTENT_AfterHidden"] = "afterHidden";
618
+ EMIT_EVENTS["CONTENT_AfterShow"] = "afterShow";
619
+ })(EMIT_EVENTS || (EMIT_EVENTS = {}));
620
+ var EVENT_SHOW_HIDE_FN = function EVENT_SHOW_HIDE_FN(_args) {
621
+ return true;
622
+ };
623
+ var EVENT_COMMON_FN = function EVENT_COMMON_FN(e) {
624
+ return e;
625
+ };
626
+ var EVENT_CLICK_OUTSIDE_FN = function EVENT_CLICK_OUTSIDE_FN(_args) {
627
+ return true;
628
+ };
629
+ var EMIT_EVENT_TYPES = (_EMIT_EVENT_TYPES = {}, _defineProperty(_EMIT_EVENT_TYPES, EMIT_EVENTS.CLICK_OUTSIDE, EVENT_CLICK_OUTSIDE_FN), _defineProperty(_EMIT_EVENT_TYPES, EMIT_EVENTS.CONTENT_MOUSEENTER, EVENT_COMMON_FN), _defineProperty(_EMIT_EVENT_TYPES, EMIT_EVENTS.CONTENT_MOUSELEAVE, EVENT_COMMON_FN), _defineProperty(_EMIT_EVENT_TYPES, EMIT_EVENTS.CONTENT_AfterHidden, EVENT_SHOW_HIDE_FN), _defineProperty(_EMIT_EVENT_TYPES, EMIT_EVENTS.CONTENT_AfterShow, EVENT_SHOW_HIDE_FN), _EMIT_EVENT_TYPES);
630
+ ;// CONCATENATED MODULE: ../../packages/popover/src/content.tsx
631
+
632
+ /*
633
+ * Tencent is pleased to support the open source community by making
634
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
635
+ *
636
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
637
+ *
638
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
639
+ *
640
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
641
+ *
642
+ * ---------------------------------------------------
643
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
644
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
645
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
646
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
647
+ *
648
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
649
+ * the Software.
650
+ *
651
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
652
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
653
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
654
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
655
+ * IN THE SOFTWARE.
656
+ */
657
+
658
+
659
+
660
+ /* harmony default export */ const content = ((0,external_vue_.defineComponent)({
661
+ name: 'PopContent',
662
+ props: {
663
+ width: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.string, external_shared_.PropTypes.number]).def('auto'),
664
+ height: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.string, external_shared_.PropTypes.number]).def('auto'),
665
+ maxHeight: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.string, external_shared_.PropTypes.number]).def('auto'),
666
+ maxWidth: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.string, external_shared_.PropTypes.number]).def('auto'),
667
+ extCls: external_shared_.PropTypes.string.def(''),
668
+ visible: external_shared_.PropTypes.bool.def(false),
669
+ eventDelay: external_shared_.PropTypes.number.def(0)
670
+ },
671
+ setup: function setup(props) {
672
+ var resolveValToPix = function resolveValToPix(val) {
673
+ if (/^\d+\.?\d*$/.test("".concat(val))) {
674
+ return "".concat(val, "px");
675
+ }
676
+ return val;
677
+ };
678
+ var style = (0,external_vue_.computed)(function () {
679
+ return {
680
+ width: resolveValToPix(props.width),
681
+ height: resolveValToPix(props.height),
682
+ maxHeight: resolveValToPix(props.maxHeight),
683
+ maxWidth: resolveValToPix(props.maxWidth)
684
+ };
685
+ });
686
+ var refContent = (0,external_vue_.ref)(null);
687
+ var refTimer = (0,external_vue_.ref)(null);
688
+ var resetPointerEvent = function resetPointerEvent() {
689
+ var _a;
690
+ if (props.eventDelay === 0) {
691
+ return;
692
+ }
693
+ refTimer.value && clearTimeout(refTimer.value);
694
+ refTimer.value = setTimeout(function () {
695
+ setContentPointerEvent('unset');
696
+ }, (_a = props.eventDelay) !== null && _a !== void 0 ? _a : 300);
697
+ };
698
+ var setContentPointerEvent = function setContentPointerEvent(val) {
699
+ var _a;
700
+ if (props.eventDelay === 0) {
701
+ return;
702
+ }
703
+ (_a = refContent.value) === null || _a === void 0 ? void 0 : _a.style.setProperty('pointer-events', val);
704
+ };
705
+ var _usePrefix = (0,external_config_provider_.usePrefix)(),
706
+ resolveClassName = _usePrefix.resolveClassName;
707
+ return {
708
+ style: style,
709
+ refContent: refContent,
710
+ resolveClassName: resolveClassName,
711
+ resetPointerEvent: resetPointerEvent,
712
+ setContentPointerEvent: setContentPointerEvent
713
+ };
714
+ },
715
+ render: function render() {
716
+ var _this = this;
717
+ var _a, _b, _c, _d, _e, _f, _g, _h;
718
+ var className = [this.resolveClassName('popover'), this.resolveClassName('pop2-content'), this.extCls];
719
+ var resolveContentStyle = function resolveContentStyle(slot) {
720
+ var _a;
721
+ if (external_vue_.Fragment === ((_a = slot === null || slot === void 0 ? void 0 : slot[0]) === null || _a === void 0 ? void 0 : _a.type)) {
722
+ (0,external_vue_.nextTick)(function () {
723
+ _this.setContentPointerEvent('none');
724
+ _this.resetPointerEvent();
725
+ });
726
+ }
727
+ return _this.style;
728
+ };
729
+ var style = resolveContentStyle((_b = (_a = this.$slots)["default"]) === null || _b === void 0 ? void 0 : _b.call(_a));
730
+ return (0,external_vue_.createVNode)("div", {
731
+ "class": className,
732
+ "tabindex": "-1",
733
+ "style": style,
734
+ "ref": "refContent"
735
+ }, [(_e = (_d = (_c = this.$slots).arrow) === null || _d === void 0 ? void 0 : _d.call(_c)) !== null && _e !== void 0 ? _e : '', (_h = (_g = (_f = this.$slots)["default"]) === null || _g === void 0 ? void 0 : _g.call(_f)) !== null && _h !== void 0 ? _h : '']);
736
+ }
737
+ }));
738
+ // EXTERNAL MODULE: external "vue-types"
739
+ var external_vue_types_ = __webpack_require__(210);
740
+ ;// CONCATENATED MODULE: ../../packages/popover/src/props.ts
741
+
742
+
743
+ var EventProps = {
744
+ onAfterHidden: function onAfterHidden() {},
745
+ onAfterShow: function onAfterShow() {}
746
+ };
747
+ var PopoverProps = {
748
+ isShow: external_shared_.PropTypes.bool.def(false),
749
+ always: external_shared_.PropTypes.bool.def(false),
750
+ disabled: external_shared_.PropTypes.bool.def(false),
751
+ width: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.string, external_shared_.PropTypes.number]).def('auto'),
752
+ height: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.string, external_shared_.PropTypes.number]).def('auto'),
753
+ maxWidth: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.string, external_shared_.PropTypes.number]).def('auto'),
754
+ maxHeight: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.string, external_shared_.PropTypes.number]).def('auto'),
755
+ content: (0,external_vue_types_.toType)('IContent', {}).def(''),
756
+ target: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.string, external_shared_.PropTypes.instanceOf(HTMLElement), external_shared_.PropTypes.instanceOf(PointerEvent)]),
757
+ allowHtml: external_shared_.PropTypes.bool.def(false),
758
+ /**
759
+ * 组件显示位置
760
+ */
761
+ // placement: placementType().def(PlacementEnum.TOP),
762
+ placement: (0,external_shared_.placementType)().def(external_shared_.PlacementEnum.TOP_START),
763
+ // 'dark', 'light'
764
+ theme: external_shared_.PropTypes.string.def('dark'),
765
+ /**
766
+ * 触发方式
767
+ * 支持 click hover manual
768
+ * manual: 通过isShow控制显示、隐藏
769
+ */
770
+ // trigger: triggerType(),
771
+ trigger: (0,external_shared_.triggerType)(),
772
+ /**
773
+ * content 渲染方式
774
+ */
775
+ renderType: (0,external_shared_.renderType)(),
776
+ // 是否显示箭头
777
+ arrow: external_shared_.PropTypes.bool.def(true),
778
+ padding: external_shared_.PropTypes.number.def(5),
779
+ offset: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.number, external_shared_.PropTypes.shape({
780
+ mainAxis: external_shared_.PropTypes.number,
781
+ crossAxis: external_shared_.PropTypes.number,
782
+ alignmentAxis: external_shared_.PropTypes.number
783
+ })]).def(6),
784
+ /**
785
+ * 弹出内容绑定元素
786
+ */
787
+ boundary: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.string.def('parent'), external_shared_.PropTypes.instanceOf(HTMLElement)]),
788
+ zIndex: external_shared_.PropTypes.number.def(undefined),
789
+ disableTeleport: external_shared_.PropTypes.bool.def(false),
790
+ /**
791
+ * chooses the placement that has the most space available automatically
792
+ */
793
+ autoPlacement: external_shared_.PropTypes.bool.def(false),
794
+ /**
795
+ * 当有滚动条,滚动出可是范围时自动隐藏pop
796
+ */
797
+ autoVisibility: external_shared_.PropTypes.bool.def(true),
798
+ /**
799
+ * 是否禁用clickoutside
800
+ */
801
+ disableOutsideClick: external_shared_.PropTypes.bool.def(false),
802
+ /**
803
+ * 是否禁用样式的transform更新位移
804
+ */
805
+ disableTransform: external_shared_.PropTypes.bool.def(false),
806
+ /**
807
+ * 自定义 reference
808
+ */
809
+ reference: external_shared_.PropTypes.any,
810
+ /**
811
+ * 兼容v1版本遗留配置
812
+ * 不建议使用
813
+ */
814
+ modifiers: external_shared_.PropTypes.array.def([]),
815
+ /**
816
+ * popover显示和隐藏的延时时间
817
+ */
818
+ popoverDelay: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.number, external_shared_.PropTypes.arrayOf(external_shared_.PropTypes.number)]).def(100),
819
+ /**
820
+ * 配置自定义样式类名,传入的类会被加在组件最外层的 DOM
821
+ */
822
+ extCls: external_shared_.PropTypes.string.def(''),
823
+ /**
824
+ * 自定义Content组件渲染,point-event延迟渲染时间
825
+ * 避免子组件point-event渲染时触发popover鼠标事件
826
+ * 如果设置为0,则不启用此设置
827
+ */
828
+ componentEventDelay: external_shared_.PropTypes.number.def(0),
829
+ /**
830
+ * 或略其他判定条件,强制监听clickoutside & 执行hide
831
+ */
832
+ forceClickoutside: external_shared_.PropTypes.bool.def(false)
833
+ };
834
+ ;// CONCATENATED MODULE: ../../packages/popover/src/reference.tsx
835
+ /*
836
+ * Tencent is pleased to support the open source community by making
837
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
838
+ *
839
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
840
+ *
841
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
842
+ *
843
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
844
+ *
845
+ * ---------------------------------------------------
846
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
847
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
848
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
849
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
850
+ *
851
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
852
+ * the Software.
853
+ *
854
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
855
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
856
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
857
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
858
+ * IN THE SOFTWARE.
859
+ */
860
+
861
+ /* harmony default export */ const reference = ((0,external_vue_.defineComponent)({
862
+ name: 'PopReference',
863
+ render: function render() {
864
+ var _a, _b, _c;
865
+ return (_c = (_b = (_a = this.$slots)["default"]) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : '';
866
+ }
867
+ }));
868
+ ;// CONCATENATED MODULE: ../../packages/popover/src/root.tsx
869
+
870
+ /*
871
+ * Tencent is pleased to support the open source community by making
872
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
873
+ *
874
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
875
+ *
876
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
877
+ *
878
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
879
+ *
880
+ * ---------------------------------------------------
881
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
882
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
883
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
884
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
885
+ *
886
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
887
+ * the Software.
888
+ *
889
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
890
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
891
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
892
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
893
+ * IN THE SOFTWARE.
894
+ */
895
+
896
+
897
+ /* harmony default export */ const root = ((0,external_vue_.defineComponent)({
898
+ props: {
899
+ "class": external_shared_.PropTypes.string.def(''),
900
+ mode: external_shared_.PropTypes.string.def('')
901
+ },
902
+ render: function render() {
903
+ var _a, _b;
904
+ return (0,external_vue_.createVNode)(external_vue_.Fragment, null, [(_b = (_a = this.$slots)["default"]) === null || _b === void 0 ? void 0 : _b.call(_a)]);
905
+ }
906
+ }));
907
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
908
+ function _arrayWithHoles(arr) {
909
+ if (Array.isArray(arr)) return arr;
910
+ }
911
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
912
+ function _iterableToArrayLimit(arr, i) {
913
+ var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
914
+ if (null != _i) {
915
+ var _s,
916
+ _e,
917
+ _x,
918
+ _r,
919
+ _arr = [],
920
+ _n = !0,
921
+ _d = !1;
922
+ try {
923
+ if (_x = (_i = _i.call(arr)).next, 0 === i) {
924
+ if (Object(_i) !== _i) return;
925
+ _n = !1;
926
+ } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
927
+ } catch (err) {
928
+ _d = !0, _e = err;
929
+ } finally {
930
+ try {
931
+ if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
932
+ } finally {
933
+ if (_d) throw _e;
934
+ }
935
+ }
936
+ return _arr;
937
+ }
938
+ }
939
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
940
+ function arrayLikeToArray_arrayLikeToArray(arr, len) {
941
+ if (len == null || len > arr.length) len = arr.length;
942
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
943
+ return arr2;
944
+ }
945
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
946
+
947
+ function unsupportedIterableToArray_unsupportedIterableToArray(o, minLen) {
948
+ if (!o) return;
949
+ if (typeof o === "string") return arrayLikeToArray_arrayLikeToArray(o, minLen);
950
+ var n = Object.prototype.toString.call(o).slice(8, -1);
951
+ if (n === "Object" && o.constructor) n = o.constructor.name;
952
+ if (n === "Map" || n === "Set") return Array.from(o);
953
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray_arrayLikeToArray(o, minLen);
954
+ }
955
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
956
+ function _nonIterableRest() {
957
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
958
+ }
959
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js
960
+
961
+
962
+
963
+
964
+ function _slicedToArray(arr, i) {
965
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || unsupportedIterableToArray_unsupportedIterableToArray(arr, i) || _nonIterableRest();
966
+ }
967
+ ;// CONCATENATED MODULE: ../../node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
968
+ const sides = ['top', 'right', 'bottom', 'left'];
969
+ const alignments = ['start', 'end'];
970
+ const placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []);
971
+ const floating_ui_utils_min = Math.min;
972
+ const floating_ui_utils_max = Math.max;
973
+ const round = Math.round;
974
+ const floor = Math.floor;
975
+ const createCoords = v => ({
976
+ x: v,
977
+ y: v
978
+ });
979
+ const oppositeSideMap = {
980
+ left: 'right',
981
+ right: 'left',
982
+ bottom: 'top',
983
+ top: 'bottom'
984
+ };
985
+ const oppositeAlignmentMap = {
986
+ start: 'end',
987
+ end: 'start'
988
+ };
989
+ function clamp(start, value, end) {
990
+ return floating_ui_utils_max(start, floating_ui_utils_min(value, end));
991
+ }
992
+ function floating_ui_utils_evaluate(value, param) {
993
+ return typeof value === 'function' ? value(param) : value;
994
+ }
995
+ function floating_ui_utils_getSide(placement) {
996
+ return placement.split('-')[0];
997
+ }
998
+ function floating_ui_utils_getAlignment(placement) {
999
+ return placement.split('-')[1];
1000
+ }
1001
+ function floating_ui_utils_getOppositeAxis(axis) {
1002
+ return axis === 'x' ? 'y' : 'x';
1003
+ }
1004
+ function getAxisLength(axis) {
1005
+ return axis === 'y' ? 'height' : 'width';
1006
+ }
1007
+ function floating_ui_utils_getSideAxis(placement) {
1008
+ return ['top', 'bottom'].includes(floating_ui_utils_getSide(placement)) ? 'y' : 'x';
1009
+ }
1010
+ function getAlignmentAxis(placement) {
1011
+ return floating_ui_utils_getOppositeAxis(floating_ui_utils_getSideAxis(placement));
1012
+ }
1013
+ function getAlignmentSides(placement, rects, rtl) {
1014
+ if (rtl === void 0) {
1015
+ rtl = false;
1016
+ }
1017
+ const alignment = floating_ui_utils_getAlignment(placement);
1018
+ const alignmentAxis = getAlignmentAxis(placement);
1019
+ const length = getAxisLength(alignmentAxis);
1020
+ let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
1021
+ if (rects.reference[length] > rects.floating[length]) {
1022
+ mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
1023
+ }
1024
+ return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
1025
+ }
1026
+ function getExpandedPlacements(placement) {
1027
+ const oppositePlacement = getOppositePlacement(placement);
1028
+ return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
1029
+ }
1030
+ function getOppositeAlignmentPlacement(placement) {
1031
+ return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
1032
+ }
1033
+ function getSideList(side, isStart, rtl) {
1034
+ const lr = ['left', 'right'];
1035
+ const rl = ['right', 'left'];
1036
+ const tb = ['top', 'bottom'];
1037
+ const bt = ['bottom', 'top'];
1038
+ switch (side) {
1039
+ case 'top':
1040
+ case 'bottom':
1041
+ if (rtl) return isStart ? rl : lr;
1042
+ return isStart ? lr : rl;
1043
+ case 'left':
1044
+ case 'right':
1045
+ return isStart ? tb : bt;
1046
+ default:
1047
+ return [];
1048
+ }
1049
+ }
1050
+ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
1051
+ const alignment = floating_ui_utils_getAlignment(placement);
1052
+ let list = getSideList(floating_ui_utils_getSide(placement), direction === 'start', rtl);
1053
+ if (alignment) {
1054
+ list = list.map(side => side + "-" + alignment);
1055
+ if (flipAlignment) {
1056
+ list = list.concat(list.map(getOppositeAlignmentPlacement));
1057
+ }
1058
+ }
1059
+ return list;
1060
+ }
1061
+ function getOppositePlacement(placement) {
1062
+ return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);
1063
+ }
1064
+ function expandPaddingObject(padding) {
1065
+ return {
1066
+ top: 0,
1067
+ right: 0,
1068
+ bottom: 0,
1069
+ left: 0,
1070
+ ...padding
1071
+ };
1072
+ }
1073
+ function getPaddingObject(padding) {
1074
+ return typeof padding !== 'number' ? expandPaddingObject(padding) : {
1075
+ top: padding,
1076
+ right: padding,
1077
+ bottom: padding,
1078
+ left: padding
1079
+ };
1080
+ }
1081
+ function rectToClientRect(rect) {
1082
+ return {
1083
+ ...rect,
1084
+ top: rect.y,
1085
+ left: rect.x,
1086
+ right: rect.x + rect.width,
1087
+ bottom: rect.y + rect.height
1088
+ };
1089
+ }
1090
+
1091
+
1092
+
1093
+ ;// CONCATENATED MODULE: ../../node_modules/@floating-ui/core/dist/floating-ui.core.mjs
1094
+
1095
+
1096
+
1097
+ function computeCoordsFromPlacement(_ref, placement, rtl) {
1098
+ let {
1099
+ reference,
1100
+ floating
1101
+ } = _ref;
1102
+ const sideAxis = floating_ui_utils_getSideAxis(placement);
1103
+ const alignmentAxis = getAlignmentAxis(placement);
1104
+ const alignLength = getAxisLength(alignmentAxis);
1105
+ const side = floating_ui_utils_getSide(placement);
1106
+ const isVertical = sideAxis === 'y';
1107
+ const commonX = reference.x + reference.width / 2 - floating.width / 2;
1108
+ const commonY = reference.y + reference.height / 2 - floating.height / 2;
1109
+ const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
1110
+ let coords;
1111
+ switch (side) {
1112
+ case 'top':
1113
+ coords = {
1114
+ x: commonX,
1115
+ y: reference.y - floating.height
1116
+ };
1117
+ break;
1118
+ case 'bottom':
1119
+ coords = {
1120
+ x: commonX,
1121
+ y: reference.y + reference.height
1122
+ };
1123
+ break;
1124
+ case 'right':
1125
+ coords = {
1126
+ x: reference.x + reference.width,
1127
+ y: commonY
1128
+ };
1129
+ break;
1130
+ case 'left':
1131
+ coords = {
1132
+ x: reference.x - floating.width,
1133
+ y: commonY
1134
+ };
1135
+ break;
1136
+ default:
1137
+ coords = {
1138
+ x: reference.x,
1139
+ y: reference.y
1140
+ };
1141
+ }
1142
+ switch (floating_ui_utils_getAlignment(placement)) {
1143
+ case 'start':
1144
+ coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
1145
+ break;
1146
+ case 'end':
1147
+ coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
1148
+ break;
1149
+ }
1150
+ return coords;
1151
+ }
1152
+
1153
+ /**
1154
+ * Computes the `x` and `y` coordinates that will place the floating element
1155
+ * next to a reference element when it is given a certain positioning strategy.
1156
+ *
1157
+ * This export does not have any `platform` interface logic. You will need to
1158
+ * write one for the platform you are using Floating UI with.
1159
+ */
1160
+ const computePosition = async (reference, floating, config) => {
1161
+ const {
1162
+ placement = 'bottom',
1163
+ strategy = 'absolute',
1164
+ middleware = [],
1165
+ platform
1166
+ } = config;
1167
+ const validMiddleware = middleware.filter(Boolean);
1168
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
1169
+ let rects = await platform.getElementRects({
1170
+ reference,
1171
+ floating,
1172
+ strategy
1173
+ });
1174
+ let {
1175
+ x,
1176
+ y
1177
+ } = computeCoordsFromPlacement(rects, placement, rtl);
1178
+ let statefulPlacement = placement;
1179
+ let middlewareData = {};
1180
+ let resetCount = 0;
1181
+ for (let i = 0; i < validMiddleware.length; i++) {
1182
+ const {
1183
+ name,
1184
+ fn
1185
+ } = validMiddleware[i];
1186
+ const {
1187
+ x: nextX,
1188
+ y: nextY,
1189
+ data,
1190
+ reset
1191
+ } = await fn({
1192
+ x,
1193
+ y,
1194
+ initialPlacement: placement,
1195
+ placement: statefulPlacement,
1196
+ strategy,
1197
+ middlewareData,
1198
+ rects,
1199
+ platform,
1200
+ elements: {
1201
+ reference,
1202
+ floating
1203
+ }
1204
+ });
1205
+ x = nextX != null ? nextX : x;
1206
+ y = nextY != null ? nextY : y;
1207
+ middlewareData = {
1208
+ ...middlewareData,
1209
+ [name]: {
1210
+ ...middlewareData[name],
1211
+ ...data
1212
+ }
1213
+ };
1214
+ if (reset && resetCount <= 50) {
1215
+ resetCount++;
1216
+ if (typeof reset === 'object') {
1217
+ if (reset.placement) {
1218
+ statefulPlacement = reset.placement;
1219
+ }
1220
+ if (reset.rects) {
1221
+ rects = reset.rects === true ? await platform.getElementRects({
1222
+ reference,
1223
+ floating,
1224
+ strategy
1225
+ }) : reset.rects;
1226
+ }
1227
+ ({
1228
+ x,
1229
+ y
1230
+ } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
1231
+ }
1232
+ i = -1;
1233
+ continue;
1234
+ }
1235
+ }
1236
+ return {
1237
+ x,
1238
+ y,
1239
+ placement: statefulPlacement,
1240
+ strategy,
1241
+ middlewareData
1242
+ };
1243
+ };
1244
+
1245
+ /**
1246
+ * Resolves with an object of overflow side offsets that determine how much the
1247
+ * element is overflowing a given clipping boundary on each side.
1248
+ * - positive = overflowing the boundary by that number of pixels
1249
+ * - negative = how many pixels left before it will overflow
1250
+ * - 0 = lies flush with the boundary
1251
+ * @see https://floating-ui.com/docs/detectOverflow
1252
+ */
1253
+ async function detectOverflow(state, options) {
1254
+ var _await$platform$isEle;
1255
+ if (options === void 0) {
1256
+ options = {};
1257
+ }
1258
+ const {
1259
+ x,
1260
+ y,
1261
+ platform,
1262
+ rects,
1263
+ elements,
1264
+ strategy
1265
+ } = state;
1266
+ const {
1267
+ boundary = 'clippingAncestors',
1268
+ rootBoundary = 'viewport',
1269
+ elementContext = 'floating',
1270
+ altBoundary = false,
1271
+ padding = 0
1272
+ } = floating_ui_utils_evaluate(options, state);
1273
+ const paddingObject = getPaddingObject(padding);
1274
+ const altContext = elementContext === 'floating' ? 'reference' : 'floating';
1275
+ const element = elements[altBoundary ? altContext : elementContext];
1276
+ const clippingClientRect = rectToClientRect(await platform.getClippingRect({
1277
+ element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
1278
+ boundary,
1279
+ rootBoundary,
1280
+ strategy
1281
+ }));
1282
+ const rect = elementContext === 'floating' ? {
1283
+ ...rects.floating,
1284
+ x,
1285
+ y
1286
+ } : rects.reference;
1287
+ const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
1288
+ const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
1289
+ x: 1,
1290
+ y: 1
1291
+ } : {
1292
+ x: 1,
1293
+ y: 1
1294
+ };
1295
+ const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
1296
+ rect,
1297
+ offsetParent,
1298
+ strategy
1299
+ }) : rect);
1300
+ return {
1301
+ top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
1302
+ bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
1303
+ left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
1304
+ right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
1305
+ };
1306
+ }
1307
+
1308
+ /**
1309
+ * Provides data to position an inner element of the floating element so that it
1310
+ * appears centered to the reference element.
1311
+ * @see https://floating-ui.com/docs/arrow
1312
+ */
1313
+ const arrow = options => ({
1314
+ name: 'arrow',
1315
+ options,
1316
+ async fn(state) {
1317
+ const {
1318
+ x,
1319
+ y,
1320
+ placement,
1321
+ rects,
1322
+ platform,
1323
+ elements
1324
+ } = state;
1325
+ // Since `element` is required, we don't Partial<> the type.
1326
+ const {
1327
+ element,
1328
+ padding = 0
1329
+ } = floating_ui_utils_evaluate(options, state) || {};
1330
+ if (element == null) {
1331
+ return {};
1332
+ }
1333
+ const paddingObject = getPaddingObject(padding);
1334
+ const coords = {
1335
+ x,
1336
+ y
1337
+ };
1338
+ const axis = getAlignmentAxis(placement);
1339
+ const length = getAxisLength(axis);
1340
+ const arrowDimensions = await platform.getDimensions(element);
1341
+ const isYAxis = axis === 'y';
1342
+ const minProp = isYAxis ? 'top' : 'left';
1343
+ const maxProp = isYAxis ? 'bottom' : 'right';
1344
+ const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';
1345
+ const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
1346
+ const startDiff = coords[axis] - rects.reference[axis];
1347
+ const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));
1348
+ let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
1349
+
1350
+ // DOM platform can return `window` as the `offsetParent`.
1351
+ if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {
1352
+ clientSize = elements.floating[clientProp] || rects.floating[length];
1353
+ }
1354
+ const centerToReference = endDiff / 2 - startDiff / 2;
1355
+
1356
+ // If the padding is large enough that it causes the arrow to no longer be
1357
+ // centered, modify the padding so that it is centered.
1358
+ const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
1359
+ const minPadding = floating_ui_utils_min(paddingObject[minProp], largestPossiblePadding);
1360
+ const maxPadding = floating_ui_utils_min(paddingObject[maxProp], largestPossiblePadding);
1361
+
1362
+ // Make sure the arrow doesn't overflow the floating element if the center
1363
+ // point is outside the floating element's bounds.
1364
+ const min$1 = minPadding;
1365
+ const max = clientSize - arrowDimensions[length] - maxPadding;
1366
+ const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
1367
+ const offset = clamp(min$1, center, max);
1368
+
1369
+ // If the reference is small enough that the arrow's padding causes it to
1370
+ // to point to nothing for an aligned placement, adjust the offset of the
1371
+ // floating element itself. This stops `shift()` from taking action, but can
1372
+ // be worked around by calling it again after the `arrow()` if desired.
1373
+ const shouldAddOffset = floating_ui_utils_getAlignment(placement) != null && center != offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
1374
+ const alignmentOffset = shouldAddOffset ? center < min$1 ? min$1 - center : max - center : 0;
1375
+ return {
1376
+ [axis]: coords[axis] - alignmentOffset,
1377
+ data: {
1378
+ [axis]: offset,
1379
+ centerOffset: center - offset + alignmentOffset
1380
+ }
1381
+ };
1382
+ }
1383
+ });
1384
+
1385
+ function getPlacementList(alignment, autoAlignment, allowedPlacements) {
1386
+ const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => floating_ui_utils_getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => floating_ui_utils_getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => floating_ui_utils_getSide(placement) === placement);
1387
+ return allowedPlacementsSortedByAlignment.filter(placement => {
1388
+ if (alignment) {
1389
+ return floating_ui_utils_getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);
1390
+ }
1391
+ return true;
1392
+ });
1393
+ }
1394
+ /**
1395
+ * Optimizes the visibility of the floating element by choosing the placement
1396
+ * that has the most space available automatically, without needing to specify a
1397
+ * preferred placement. Alternative to `flip`.
1398
+ * @see https://floating-ui.com/docs/autoPlacement
1399
+ */
1400
+ const autoPlacement = function (options) {
1401
+ if (options === void 0) {
1402
+ options = {};
1403
+ }
1404
+ return {
1405
+ name: 'autoPlacement',
1406
+ options,
1407
+ async fn(state) {
1408
+ var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;
1409
+ const {
1410
+ rects,
1411
+ middlewareData,
1412
+ placement,
1413
+ platform,
1414
+ elements
1415
+ } = state;
1416
+ const {
1417
+ crossAxis = false,
1418
+ alignment,
1419
+ allowedPlacements = placements,
1420
+ autoAlignment = true,
1421
+ ...detectOverflowOptions
1422
+ } = floating_ui_utils_evaluate(options, state);
1423
+ const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;
1424
+ const overflow = await detectOverflow(state, detectOverflowOptions);
1425
+ const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;
1426
+ const currentPlacement = placements$1[currentIndex];
1427
+ if (currentPlacement == null) {
1428
+ return {};
1429
+ }
1430
+ const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));
1431
+
1432
+ // Make `computeCoords` start from the right place.
1433
+ if (placement !== currentPlacement) {
1434
+ return {
1435
+ reset: {
1436
+ placement: placements$1[0]
1437
+ }
1438
+ };
1439
+ }
1440
+ const currentOverflows = [overflow[floating_ui_utils_getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];
1441
+ const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {
1442
+ placement: currentPlacement,
1443
+ overflows: currentOverflows
1444
+ }];
1445
+ const nextPlacement = placements$1[currentIndex + 1];
1446
+
1447
+ // There are more placements to check.
1448
+ if (nextPlacement) {
1449
+ return {
1450
+ data: {
1451
+ index: currentIndex + 1,
1452
+ overflows: allOverflows
1453
+ },
1454
+ reset: {
1455
+ placement: nextPlacement
1456
+ }
1457
+ };
1458
+ }
1459
+ const placementsSortedByMostSpace = allOverflows.map(d => {
1460
+ const alignment = floating_ui_utils_getAlignment(d.placement);
1461
+ return [d.placement, alignment && crossAxis ?
1462
+ // Check along the mainAxis and main crossAxis side.
1463
+ d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :
1464
+ // Check only the mainAxis.
1465
+ d.overflows[0], d.overflows];
1466
+ }).sort((a, b) => a[1] - b[1]);
1467
+ const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,
1468
+ // Aligned placements should not check their opposite crossAxis
1469
+ // side.
1470
+ floating_ui_utils_getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));
1471
+ const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];
1472
+ if (resetPlacement !== placement) {
1473
+ return {
1474
+ data: {
1475
+ index: currentIndex + 1,
1476
+ overflows: allOverflows
1477
+ },
1478
+ reset: {
1479
+ placement: resetPlacement
1480
+ }
1481
+ };
1482
+ }
1483
+ return {};
1484
+ }
1485
+ };
1486
+ };
1487
+
1488
+ /**
1489
+ * Optimizes the visibility of the floating element by flipping the `placement`
1490
+ * in order to keep it in view when the preferred placement(s) will overflow the
1491
+ * clipping boundary. Alternative to `autoPlacement`.
1492
+ * @see https://floating-ui.com/docs/flip
1493
+ */
1494
+ const flip = function (options) {
1495
+ if (options === void 0) {
1496
+ options = {};
1497
+ }
1498
+ return {
1499
+ name: 'flip',
1500
+ options,
1501
+ async fn(state) {
1502
+ var _middlewareData$flip;
1503
+ const {
1504
+ placement,
1505
+ middlewareData,
1506
+ rects,
1507
+ initialPlacement,
1508
+ platform,
1509
+ elements
1510
+ } = state;
1511
+ const {
1512
+ mainAxis: checkMainAxis = true,
1513
+ crossAxis: checkCrossAxis = true,
1514
+ fallbackPlacements: specifiedFallbackPlacements,
1515
+ fallbackStrategy = 'bestFit',
1516
+ fallbackAxisSideDirection = 'none',
1517
+ flipAlignment = true,
1518
+ ...detectOverflowOptions
1519
+ } = floating_ui_utils_evaluate(options, state);
1520
+ const side = floating_ui_utils_getSide(placement);
1521
+ const isBasePlacement = floating_ui_utils_getSide(initialPlacement) === initialPlacement;
1522
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
1523
+ const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
1524
+ if (!specifiedFallbackPlacements && fallbackAxisSideDirection !== 'none') {
1525
+ fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
1526
+ }
1527
+ const placements = [initialPlacement, ...fallbackPlacements];
1528
+ const overflow = await detectOverflow(state, detectOverflowOptions);
1529
+ const overflows = [];
1530
+ let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
1531
+ if (checkMainAxis) {
1532
+ overflows.push(overflow[side]);
1533
+ }
1534
+ if (checkCrossAxis) {
1535
+ const sides = getAlignmentSides(placement, rects, rtl);
1536
+ overflows.push(overflow[sides[0]], overflow[sides[1]]);
1537
+ }
1538
+ overflowsData = [...overflowsData, {
1539
+ placement,
1540
+ overflows
1541
+ }];
1542
+
1543
+ // One or more sides is overflowing.
1544
+ if (!overflows.every(side => side <= 0)) {
1545
+ var _middlewareData$flip2, _overflowsData$filter;
1546
+ const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
1547
+ const nextPlacement = placements[nextIndex];
1548
+ if (nextPlacement) {
1549
+ // Try next placement and re-run the lifecycle.
1550
+ return {
1551
+ data: {
1552
+ index: nextIndex,
1553
+ overflows: overflowsData
1554
+ },
1555
+ reset: {
1556
+ placement: nextPlacement
1557
+ }
1558
+ };
1559
+ }
1560
+
1561
+ // First, find the candidates that fit on the mainAxis side of overflow,
1562
+ // then find the placement that fits the best on the main crossAxis side.
1563
+ let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
1564
+
1565
+ // Otherwise fallback.
1566
+ if (!resetPlacement) {
1567
+ switch (fallbackStrategy) {
1568
+ case 'bestFit':
1569
+ {
1570
+ var _overflowsData$map$so;
1571
+ const placement = (_overflowsData$map$so = overflowsData.map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$map$so[0];
1572
+ if (placement) {
1573
+ resetPlacement = placement;
1574
+ }
1575
+ break;
1576
+ }
1577
+ case 'initialPlacement':
1578
+ resetPlacement = initialPlacement;
1579
+ break;
1580
+ }
1581
+ }
1582
+ if (placement !== resetPlacement) {
1583
+ return {
1584
+ reset: {
1585
+ placement: resetPlacement
1586
+ }
1587
+ };
1588
+ }
1589
+ }
1590
+ return {};
1591
+ }
1592
+ };
1593
+ };
1594
+
1595
+ function getSideOffsets(overflow, rect) {
1596
+ return {
1597
+ top: overflow.top - rect.height,
1598
+ right: overflow.right - rect.width,
1599
+ bottom: overflow.bottom - rect.height,
1600
+ left: overflow.left - rect.width
1601
+ };
1602
+ }
1603
+ function isAnySideFullyClipped(overflow) {
1604
+ return sides.some(side => overflow[side] >= 0);
1605
+ }
1606
+ /**
1607
+ * Provides data to hide the floating element in applicable situations, such as
1608
+ * when it is not in the same clipping context as the reference element.
1609
+ * @see https://floating-ui.com/docs/hide
1610
+ */
1611
+ const hide = function (options) {
1612
+ if (options === void 0) {
1613
+ options = {};
1614
+ }
1615
+ return {
1616
+ name: 'hide',
1617
+ options,
1618
+ async fn(state) {
1619
+ const {
1620
+ rects
1621
+ } = state;
1622
+ const {
1623
+ strategy = 'referenceHidden',
1624
+ ...detectOverflowOptions
1625
+ } = floating_ui_utils_evaluate(options, state);
1626
+ switch (strategy) {
1627
+ case 'referenceHidden':
1628
+ {
1629
+ const overflow = await detectOverflow(state, {
1630
+ ...detectOverflowOptions,
1631
+ elementContext: 'reference'
1632
+ });
1633
+ const offsets = getSideOffsets(overflow, rects.reference);
1634
+ return {
1635
+ data: {
1636
+ referenceHiddenOffsets: offsets,
1637
+ referenceHidden: isAnySideFullyClipped(offsets)
1638
+ }
1639
+ };
1640
+ }
1641
+ case 'escaped':
1642
+ {
1643
+ const overflow = await detectOverflow(state, {
1644
+ ...detectOverflowOptions,
1645
+ altBoundary: true
1646
+ });
1647
+ const offsets = getSideOffsets(overflow, rects.floating);
1648
+ return {
1649
+ data: {
1650
+ escapedOffsets: offsets,
1651
+ escaped: isAnySideFullyClipped(offsets)
1652
+ }
1653
+ };
1654
+ }
1655
+ default:
1656
+ {
1657
+ return {};
1658
+ }
1659
+ }
1660
+ }
1661
+ };
1662
+ };
1663
+
1664
+ function getBoundingRect(rects) {
1665
+ const minX = floating_ui_utils_min(...rects.map(rect => rect.left));
1666
+ const minY = floating_ui_utils_min(...rects.map(rect => rect.top));
1667
+ const maxX = floating_ui_utils_max(...rects.map(rect => rect.right));
1668
+ const maxY = floating_ui_utils_max(...rects.map(rect => rect.bottom));
1669
+ return {
1670
+ x: minX,
1671
+ y: minY,
1672
+ width: maxX - minX,
1673
+ height: maxY - minY
1674
+ };
1675
+ }
1676
+ function getRectsByLine(rects) {
1677
+ const sortedRects = rects.slice().sort((a, b) => a.y - b.y);
1678
+ const groups = [];
1679
+ let prevRect = null;
1680
+ for (let i = 0; i < sortedRects.length; i++) {
1681
+ const rect = sortedRects[i];
1682
+ if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {
1683
+ groups.push([rect]);
1684
+ } else {
1685
+ groups[groups.length - 1].push(rect);
1686
+ }
1687
+ prevRect = rect;
1688
+ }
1689
+ return groups.map(rect => rectToClientRect(getBoundingRect(rect)));
1690
+ }
1691
+ /**
1692
+ * Provides improved positioning for inline reference elements that can span
1693
+ * over multiple lines, such as hyperlinks or range selections.
1694
+ * @see https://floating-ui.com/docs/inline
1695
+ */
1696
+ const inline = function (options) {
1697
+ if (options === void 0) {
1698
+ options = {};
1699
+ }
1700
+ return {
1701
+ name: 'inline',
1702
+ options,
1703
+ async fn(state) {
1704
+ const {
1705
+ placement,
1706
+ elements,
1707
+ rects,
1708
+ platform,
1709
+ strategy
1710
+ } = state;
1711
+ // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a
1712
+ // ClientRect's bounds, despite the event listener being triggered. A
1713
+ // padding of 2 seems to handle this issue.
1714
+ const {
1715
+ padding = 2,
1716
+ x,
1717
+ y
1718
+ } = floating_ui_utils_evaluate(options, state);
1719
+ const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);
1720
+ const clientRects = getRectsByLine(nativeClientRects);
1721
+ const fallback = rectToClientRect(getBoundingRect(nativeClientRects));
1722
+ const paddingObject = getPaddingObject(padding);
1723
+ function getBoundingClientRect() {
1724
+ // There are two rects and they are disjoined.
1725
+ if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {
1726
+ // Find the first rect in which the point is fully inside.
1727
+ return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;
1728
+ }
1729
+
1730
+ // There are 2 or more connected rects.
1731
+ if (clientRects.length >= 2) {
1732
+ if (floating_ui_utils_getSideAxis(placement) === 'y') {
1733
+ const firstRect = clientRects[0];
1734
+ const lastRect = clientRects[clientRects.length - 1];
1735
+ const isTop = floating_ui_utils_getSide(placement) === 'top';
1736
+ const top = firstRect.top;
1737
+ const bottom = lastRect.bottom;
1738
+ const left = isTop ? firstRect.left : lastRect.left;
1739
+ const right = isTop ? firstRect.right : lastRect.right;
1740
+ const width = right - left;
1741
+ const height = bottom - top;
1742
+ return {
1743
+ top,
1744
+ bottom,
1745
+ left,
1746
+ right,
1747
+ width,
1748
+ height,
1749
+ x: left,
1750
+ y: top
1751
+ };
1752
+ }
1753
+ const isLeftSide = floating_ui_utils_getSide(placement) === 'left';
1754
+ const maxRight = floating_ui_utils_max(...clientRects.map(rect => rect.right));
1755
+ const minLeft = floating_ui_utils_min(...clientRects.map(rect => rect.left));
1756
+ const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);
1757
+ const top = measureRects[0].top;
1758
+ const bottom = measureRects[measureRects.length - 1].bottom;
1759
+ const left = minLeft;
1760
+ const right = maxRight;
1761
+ const width = right - left;
1762
+ const height = bottom - top;
1763
+ return {
1764
+ top,
1765
+ bottom,
1766
+ left,
1767
+ right,
1768
+ width,
1769
+ height,
1770
+ x: left,
1771
+ y: top
1772
+ };
1773
+ }
1774
+ return fallback;
1775
+ }
1776
+ const resetRects = await platform.getElementRects({
1777
+ reference: {
1778
+ getBoundingClientRect
1779
+ },
1780
+ floating: elements.floating,
1781
+ strategy
1782
+ });
1783
+ if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {
1784
+ return {
1785
+ reset: {
1786
+ rects: resetRects
1787
+ }
1788
+ };
1789
+ }
1790
+ return {};
1791
+ }
1792
+ };
1793
+ };
1794
+
1795
+ // For type backwards-compatibility, the `OffsetOptions` type was also
1796
+ // Derivable.
1797
+ async function convertValueToCoords(state, options) {
1798
+ const {
1799
+ placement,
1800
+ platform,
1801
+ elements
1802
+ } = state;
1803
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
1804
+ const side = floating_ui_utils_getSide(placement);
1805
+ const alignment = floating_ui_utils_getAlignment(placement);
1806
+ const isVertical = floating_ui_utils_getSideAxis(placement) === 'y';
1807
+ const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
1808
+ const crossAxisMulti = rtl && isVertical ? -1 : 1;
1809
+ const rawValue = floating_ui_utils_evaluate(options, state);
1810
+
1811
+ // eslint-disable-next-line prefer-const
1812
+ let {
1813
+ mainAxis,
1814
+ crossAxis,
1815
+ alignmentAxis
1816
+ } = typeof rawValue === 'number' ? {
1817
+ mainAxis: rawValue,
1818
+ crossAxis: 0,
1819
+ alignmentAxis: null
1820
+ } : {
1821
+ mainAxis: 0,
1822
+ crossAxis: 0,
1823
+ alignmentAxis: null,
1824
+ ...rawValue
1825
+ };
1826
+ if (alignment && typeof alignmentAxis === 'number') {
1827
+ crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;
1828
+ }
1829
+ return isVertical ? {
1830
+ x: crossAxis * crossAxisMulti,
1831
+ y: mainAxis * mainAxisMulti
1832
+ } : {
1833
+ x: mainAxis * mainAxisMulti,
1834
+ y: crossAxis * crossAxisMulti
1835
+ };
1836
+ }
1837
+
1838
+ /**
1839
+ * Modifies the placement by translating the floating element along the
1840
+ * specified axes.
1841
+ * A number (shorthand for `mainAxis` or distance), or an axes configuration
1842
+ * object may be passed.
1843
+ * @see https://floating-ui.com/docs/offset
1844
+ */
1845
+ const offset = function (options) {
1846
+ if (options === void 0) {
1847
+ options = 0;
1848
+ }
1849
+ return {
1850
+ name: 'offset',
1851
+ options,
1852
+ async fn(state) {
1853
+ const {
1854
+ x,
1855
+ y
1856
+ } = state;
1857
+ const diffCoords = await convertValueToCoords(state, options);
1858
+ return {
1859
+ x: x + diffCoords.x,
1860
+ y: y + diffCoords.y,
1861
+ data: diffCoords
1862
+ };
1863
+ }
1864
+ };
1865
+ };
1866
+
1867
+ /**
1868
+ * Optimizes the visibility of the floating element by shifting it in order to
1869
+ * keep it in view when it will overflow the clipping boundary.
1870
+ * @see https://floating-ui.com/docs/shift
1871
+ */
1872
+ const shift = function (options) {
1873
+ if (options === void 0) {
1874
+ options = {};
1875
+ }
1876
+ return {
1877
+ name: 'shift',
1878
+ options,
1879
+ async fn(state) {
1880
+ const {
1881
+ x,
1882
+ y,
1883
+ placement
1884
+ } = state;
1885
+ const {
1886
+ mainAxis: checkMainAxis = true,
1887
+ crossAxis: checkCrossAxis = false,
1888
+ limiter = {
1889
+ fn: _ref => {
1890
+ let {
1891
+ x,
1892
+ y
1893
+ } = _ref;
1894
+ return {
1895
+ x,
1896
+ y
1897
+ };
1898
+ }
1899
+ },
1900
+ ...detectOverflowOptions
1901
+ } = floating_ui_utils_evaluate(options, state);
1902
+ const coords = {
1903
+ x,
1904
+ y
1905
+ };
1906
+ const overflow = await detectOverflow(state, detectOverflowOptions);
1907
+ const crossAxis = floating_ui_utils_getSideAxis(floating_ui_utils_getSide(placement));
1908
+ const mainAxis = floating_ui_utils_getOppositeAxis(crossAxis);
1909
+ let mainAxisCoord = coords[mainAxis];
1910
+ let crossAxisCoord = coords[crossAxis];
1911
+ if (checkMainAxis) {
1912
+ const minSide = mainAxis === 'y' ? 'top' : 'left';
1913
+ const maxSide = mainAxis === 'y' ? 'bottom' : 'right';
1914
+ const min = mainAxisCoord + overflow[minSide];
1915
+ const max = mainAxisCoord - overflow[maxSide];
1916
+ mainAxisCoord = clamp(min, mainAxisCoord, max);
1917
+ }
1918
+ if (checkCrossAxis) {
1919
+ const minSide = crossAxis === 'y' ? 'top' : 'left';
1920
+ const maxSide = crossAxis === 'y' ? 'bottom' : 'right';
1921
+ const min = crossAxisCoord + overflow[minSide];
1922
+ const max = crossAxisCoord - overflow[maxSide];
1923
+ crossAxisCoord = clamp(min, crossAxisCoord, max);
1924
+ }
1925
+ const limitedCoords = limiter.fn({
1926
+ ...state,
1927
+ [mainAxis]: mainAxisCoord,
1928
+ [crossAxis]: crossAxisCoord
1929
+ });
1930
+ return {
1931
+ ...limitedCoords,
1932
+ data: {
1933
+ x: limitedCoords.x - x,
1934
+ y: limitedCoords.y - y
1935
+ }
1936
+ };
1937
+ }
1938
+ };
1939
+ };
1940
+ /**
1941
+ * Built-in `limiter` that will stop `shift()` at a certain point.
1942
+ */
1943
+ const limitShift = function (options) {
1944
+ if (options === void 0) {
1945
+ options = {};
1946
+ }
1947
+ return {
1948
+ options,
1949
+ fn(state) {
1950
+ const {
1951
+ x,
1952
+ y,
1953
+ placement,
1954
+ rects,
1955
+ middlewareData
1956
+ } = state;
1957
+ const {
1958
+ offset = 0,
1959
+ mainAxis: checkMainAxis = true,
1960
+ crossAxis: checkCrossAxis = true
1961
+ } = evaluate(options, state);
1962
+ const coords = {
1963
+ x,
1964
+ y
1965
+ };
1966
+ const crossAxis = getSideAxis(placement);
1967
+ const mainAxis = getOppositeAxis(crossAxis);
1968
+ let mainAxisCoord = coords[mainAxis];
1969
+ let crossAxisCoord = coords[crossAxis];
1970
+ const rawOffset = evaluate(offset, state);
1971
+ const computedOffset = typeof rawOffset === 'number' ? {
1972
+ mainAxis: rawOffset,
1973
+ crossAxis: 0
1974
+ } : {
1975
+ mainAxis: 0,
1976
+ crossAxis: 0,
1977
+ ...rawOffset
1978
+ };
1979
+ if (checkMainAxis) {
1980
+ const len = mainAxis === 'y' ? 'height' : 'width';
1981
+ const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;
1982
+ const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;
1983
+ if (mainAxisCoord < limitMin) {
1984
+ mainAxisCoord = limitMin;
1985
+ } else if (mainAxisCoord > limitMax) {
1986
+ mainAxisCoord = limitMax;
1987
+ }
1988
+ }
1989
+ if (checkCrossAxis) {
1990
+ var _middlewareData$offse, _middlewareData$offse2;
1991
+ const len = mainAxis === 'y' ? 'width' : 'height';
1992
+ const isOriginSide = ['top', 'left'].includes(getSide(placement));
1993
+ const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
1994
+ const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
1995
+ if (crossAxisCoord < limitMin) {
1996
+ crossAxisCoord = limitMin;
1997
+ } else if (crossAxisCoord > limitMax) {
1998
+ crossAxisCoord = limitMax;
1999
+ }
2000
+ }
2001
+ return {
2002
+ [mainAxis]: mainAxisCoord,
2003
+ [crossAxis]: crossAxisCoord
2004
+ };
2005
+ }
2006
+ };
2007
+ };
2008
+
2009
+ /**
2010
+ * Provides data that allows you to change the size of the floating element —
2011
+ * for instance, prevent it from overflowing the clipping boundary or match the
2012
+ * width of the reference element.
2013
+ * @see https://floating-ui.com/docs/size
2014
+ */
2015
+ const size = function (options) {
2016
+ if (options === void 0) {
2017
+ options = {};
2018
+ }
2019
+ return {
2020
+ name: 'size',
2021
+ options,
2022
+ async fn(state) {
2023
+ const {
2024
+ placement,
2025
+ rects,
2026
+ platform,
2027
+ elements
2028
+ } = state;
2029
+ const {
2030
+ apply = () => {},
2031
+ ...detectOverflowOptions
2032
+ } = evaluate(options, state);
2033
+ const overflow = await detectOverflow(state, detectOverflowOptions);
2034
+ const side = getSide(placement);
2035
+ const alignment = getAlignment(placement);
2036
+ const isYAxis = getSideAxis(placement) === 'y';
2037
+ const {
2038
+ width,
2039
+ height
2040
+ } = rects.floating;
2041
+ let heightSide;
2042
+ let widthSide;
2043
+ if (side === 'top' || side === 'bottom') {
2044
+ heightSide = side;
2045
+ widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';
2046
+ } else {
2047
+ widthSide = side;
2048
+ heightSide = alignment === 'end' ? 'top' : 'bottom';
2049
+ }
2050
+ const overflowAvailableHeight = height - overflow[heightSide];
2051
+ const overflowAvailableWidth = width - overflow[widthSide];
2052
+ const noShift = !state.middlewareData.shift;
2053
+ let availableHeight = overflowAvailableHeight;
2054
+ let availableWidth = overflowAvailableWidth;
2055
+ if (isYAxis) {
2056
+ const maximumClippingWidth = width - overflow.left - overflow.right;
2057
+ availableWidth = alignment || noShift ? min(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth;
2058
+ } else {
2059
+ const maximumClippingHeight = height - overflow.top - overflow.bottom;
2060
+ availableHeight = alignment || noShift ? min(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight;
2061
+ }
2062
+ if (noShift && !alignment) {
2063
+ const xMin = max(overflow.left, 0);
2064
+ const xMax = max(overflow.right, 0);
2065
+ const yMin = max(overflow.top, 0);
2066
+ const yMax = max(overflow.bottom, 0);
2067
+ if (isYAxis) {
2068
+ availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));
2069
+ } else {
2070
+ availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));
2071
+ }
2072
+ }
2073
+ await apply({
2074
+ ...state,
2075
+ availableWidth,
2076
+ availableHeight
2077
+ });
2078
+ const nextDimensions = await platform.getDimensions(elements.floating);
2079
+ if (width !== nextDimensions.width || height !== nextDimensions.height) {
2080
+ return {
2081
+ reset: {
2082
+ rects: true
2083
+ }
2084
+ };
2085
+ }
2086
+ return {};
2087
+ }
2088
+ };
2089
+ };
2090
+
2091
+
2092
+
2093
+ ;// CONCATENATED MODULE: ../../node_modules/@floating-ui/utils/dom/dist/floating-ui.utils.dom.mjs
2094
+ function getNodeName(node) {
2095
+ if (isNode(node)) {
2096
+ return (node.nodeName || '').toLowerCase();
2097
+ }
2098
+ // Mocked nodes in testing environments may not be instances of Node. By
2099
+ // returning `#document` an infinite loop won't occur.
2100
+ // https://github.com/floating-ui/floating-ui/issues/2317
2101
+ return '#document';
2102
+ }
2103
+ function getWindow(node) {
2104
+ var _node$ownerDocument;
2105
+ return (node == null ? void 0 : (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
2106
+ }
2107
+ function getDocumentElement(node) {
2108
+ var _ref;
2109
+ return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
2110
+ }
2111
+ function isNode(value) {
2112
+ return value instanceof Node || value instanceof getWindow(value).Node;
2113
+ }
2114
+ function floating_ui_utils_dom_isElement(value) {
2115
+ return value instanceof Element || value instanceof getWindow(value).Element;
2116
+ }
2117
+ function isHTMLElement(value) {
2118
+ return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
2119
+ }
2120
+ function isShadowRoot(value) {
2121
+ // Browsers without `ShadowRoot` support.
2122
+ if (typeof ShadowRoot === 'undefined') {
2123
+ return false;
2124
+ }
2125
+ return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
2126
+ }
2127
+ function isOverflowElement(element) {
2128
+ const {
2129
+ overflow,
2130
+ overflowX,
2131
+ overflowY,
2132
+ display
2133
+ } = getComputedStyle(element);
2134
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);
2135
+ }
2136
+ function isTableElement(element) {
2137
+ return ['table', 'td', 'th'].includes(getNodeName(element));
2138
+ }
2139
+ function isContainingBlock(element) {
2140
+ const webkit = isWebKit();
2141
+ const css = getComputedStyle(element);
2142
+
2143
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
2144
+ return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
2145
+ }
2146
+ function isWebKit() {
2147
+ if (typeof CSS === 'undefined' || !CSS.supports) return false;
2148
+ return CSS.supports('-webkit-backdrop-filter', 'none');
2149
+ }
2150
+ function isLastTraversableNode(node) {
2151
+ return ['html', 'body', '#document'].includes(getNodeName(node));
2152
+ }
2153
+ function getComputedStyle(element) {
2154
+ return getWindow(element).getComputedStyle(element);
2155
+ }
2156
+ function getNodeScroll(element) {
2157
+ if (floating_ui_utils_dom_isElement(element)) {
2158
+ return {
2159
+ scrollLeft: element.scrollLeft,
2160
+ scrollTop: element.scrollTop
2161
+ };
2162
+ }
2163
+ return {
2164
+ scrollLeft: element.pageXOffset,
2165
+ scrollTop: element.pageYOffset
2166
+ };
2167
+ }
2168
+ function getParentNode(node) {
2169
+ if (getNodeName(node) === 'html') {
2170
+ return node;
2171
+ }
2172
+ const result =
2173
+ // Step into the shadow DOM of the parent of a slotted node.
2174
+ node.assignedSlot ||
2175
+ // DOM Element detected.
2176
+ node.parentNode ||
2177
+ // ShadowRoot detected.
2178
+ isShadowRoot(node) && node.host ||
2179
+ // Fallback.
2180
+ getDocumentElement(node);
2181
+ return isShadowRoot(result) ? result.host : result;
2182
+ }
2183
+ function getNearestOverflowAncestor(node) {
2184
+ const parentNode = getParentNode(node);
2185
+ if (isLastTraversableNode(parentNode)) {
2186
+ return node.ownerDocument ? node.ownerDocument.body : node.body;
2187
+ }
2188
+ if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
2189
+ return parentNode;
2190
+ }
2191
+ return getNearestOverflowAncestor(parentNode);
2192
+ }
2193
+ function getOverflowAncestors(node, list) {
2194
+ var _node$ownerDocument2;
2195
+ if (list === void 0) {
2196
+ list = [];
2197
+ }
2198
+ const scrollableAncestor = getNearestOverflowAncestor(node);
2199
+ const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
2200
+ const win = getWindow(scrollableAncestor);
2201
+ if (isBody) {
2202
+ return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : []);
2203
+ }
2204
+ return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor));
2205
+ }
2206
+
2207
+
2208
+
2209
+ ;// CONCATENATED MODULE: ../../node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
2210
+
2211
+
2212
+
2213
+
2214
+
2215
+
2216
+ function getCssDimensions(element) {
2217
+ const css = getComputedStyle(element);
2218
+ // In testing environments, the `width` and `height` properties are empty
2219
+ // strings for SVG elements, returning NaN. Fallback to `0` in this case.
2220
+ let width = parseFloat(css.width) || 0;
2221
+ let height = parseFloat(css.height) || 0;
2222
+ const hasOffset = isHTMLElement(element);
2223
+ const offsetWidth = hasOffset ? element.offsetWidth : width;
2224
+ const offsetHeight = hasOffset ? element.offsetHeight : height;
2225
+ const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
2226
+ if (shouldFallback) {
2227
+ width = offsetWidth;
2228
+ height = offsetHeight;
2229
+ }
2230
+ return {
2231
+ width,
2232
+ height,
2233
+ $: shouldFallback
2234
+ };
2235
+ }
2236
+
2237
+ function unwrapElement(element) {
2238
+ return !floating_ui_utils_dom_isElement(element) ? element.contextElement : element;
2239
+ }
2240
+
2241
+ function getScale(element) {
2242
+ const domElement = unwrapElement(element);
2243
+ if (!isHTMLElement(domElement)) {
2244
+ return createCoords(1);
2245
+ }
2246
+ const rect = domElement.getBoundingClientRect();
2247
+ const {
2248
+ width,
2249
+ height,
2250
+ $
2251
+ } = getCssDimensions(domElement);
2252
+ let x = ($ ? round(rect.width) : rect.width) / width;
2253
+ let y = ($ ? round(rect.height) : rect.height) / height;
2254
+
2255
+ // 0, NaN, or Infinity should always fallback to 1.
2256
+
2257
+ if (!x || !Number.isFinite(x)) {
2258
+ x = 1;
2259
+ }
2260
+ if (!y || !Number.isFinite(y)) {
2261
+ y = 1;
2262
+ }
2263
+ return {
2264
+ x,
2265
+ y
2266
+ };
2267
+ }
2268
+
2269
+ const noOffsets = /*#__PURE__*/createCoords(0);
2270
+ function getVisualOffsets(element) {
2271
+ const win = getWindow(element);
2272
+ if (!isWebKit() || !win.visualViewport) {
2273
+ return noOffsets;
2274
+ }
2275
+ return {
2276
+ x: win.visualViewport.offsetLeft,
2277
+ y: win.visualViewport.offsetTop
2278
+ };
2279
+ }
2280
+ function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
2281
+ if (isFixed === void 0) {
2282
+ isFixed = false;
2283
+ }
2284
+ if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {
2285
+ return false;
2286
+ }
2287
+ return isFixed;
2288
+ }
2289
+
2290
+ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
2291
+ if (includeScale === void 0) {
2292
+ includeScale = false;
2293
+ }
2294
+ if (isFixedStrategy === void 0) {
2295
+ isFixedStrategy = false;
2296
+ }
2297
+ const clientRect = element.getBoundingClientRect();
2298
+ const domElement = unwrapElement(element);
2299
+ let scale = createCoords(1);
2300
+ if (includeScale) {
2301
+ if (offsetParent) {
2302
+ if (floating_ui_utils_dom_isElement(offsetParent)) {
2303
+ scale = getScale(offsetParent);
2304
+ }
2305
+ } else {
2306
+ scale = getScale(element);
2307
+ }
2308
+ }
2309
+ const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
2310
+ let x = (clientRect.left + visualOffsets.x) / scale.x;
2311
+ let y = (clientRect.top + visualOffsets.y) / scale.y;
2312
+ let width = clientRect.width / scale.x;
2313
+ let height = clientRect.height / scale.y;
2314
+ if (domElement) {
2315
+ const win = getWindow(domElement);
2316
+ const offsetWin = offsetParent && floating_ui_utils_dom_isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
2317
+ let currentIFrame = win.frameElement;
2318
+ while (currentIFrame && offsetParent && offsetWin !== win) {
2319
+ const iframeScale = getScale(currentIFrame);
2320
+ const iframeRect = currentIFrame.getBoundingClientRect();
2321
+ const css = getComputedStyle(currentIFrame);
2322
+ const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
2323
+ const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
2324
+ x *= iframeScale.x;
2325
+ y *= iframeScale.y;
2326
+ width *= iframeScale.x;
2327
+ height *= iframeScale.y;
2328
+ x += left;
2329
+ y += top;
2330
+ currentIFrame = getWindow(currentIFrame).frameElement;
2331
+ }
2332
+ }
2333
+ return rectToClientRect({
2334
+ width,
2335
+ height,
2336
+ x,
2337
+ y
2338
+ });
2339
+ }
2340
+
2341
+ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
2342
+ let {
2343
+ rect,
2344
+ offsetParent,
2345
+ strategy
2346
+ } = _ref;
2347
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
2348
+ const documentElement = getDocumentElement(offsetParent);
2349
+ if (offsetParent === documentElement) {
2350
+ return rect;
2351
+ }
2352
+ let scroll = {
2353
+ scrollLeft: 0,
2354
+ scrollTop: 0
2355
+ };
2356
+ let scale = createCoords(1);
2357
+ const offsets = createCoords(0);
2358
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {
2359
+ if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
2360
+ scroll = getNodeScroll(offsetParent);
2361
+ }
2362
+ if (isHTMLElement(offsetParent)) {
2363
+ const offsetRect = getBoundingClientRect(offsetParent);
2364
+ scale = getScale(offsetParent);
2365
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
2366
+ offsets.y = offsetRect.y + offsetParent.clientTop;
2367
+ }
2368
+ }
2369
+ return {
2370
+ width: rect.width * scale.x,
2371
+ height: rect.height * scale.y,
2372
+ x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,
2373
+ y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y
2374
+ };
2375
+ }
2376
+
2377
+ function getClientRects(element) {
2378
+ return Array.from(element.getClientRects());
2379
+ }
2380
+
2381
+ function getWindowScrollBarX(element) {
2382
+ // If <html> has a CSS width greater than the viewport, then this will be
2383
+ // incorrect for RTL.
2384
+ return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
2385
+ }
2386
+
2387
+ // Gets the entire size of the scrollable document area, even extending outside
2388
+ // of the `<html>` and `<body>` rect bounds if horizontally scrollable.
2389
+ function getDocumentRect(element) {
2390
+ const html = getDocumentElement(element);
2391
+ const scroll = getNodeScroll(element);
2392
+ const body = element.ownerDocument.body;
2393
+ const width = floating_ui_utils_max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
2394
+ const height = floating_ui_utils_max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
2395
+ let x = -scroll.scrollLeft + getWindowScrollBarX(element);
2396
+ const y = -scroll.scrollTop;
2397
+ if (getComputedStyle(body).direction === 'rtl') {
2398
+ x += floating_ui_utils_max(html.clientWidth, body.clientWidth) - width;
2399
+ }
2400
+ return {
2401
+ width,
2402
+ height,
2403
+ x,
2404
+ y
2405
+ };
2406
+ }
2407
+
2408
+ function getViewportRect(element, strategy) {
2409
+ const win = getWindow(element);
2410
+ const html = getDocumentElement(element);
2411
+ const visualViewport = win.visualViewport;
2412
+ let width = html.clientWidth;
2413
+ let height = html.clientHeight;
2414
+ let x = 0;
2415
+ let y = 0;
2416
+ if (visualViewport) {
2417
+ width = visualViewport.width;
2418
+ height = visualViewport.height;
2419
+ const visualViewportBased = isWebKit();
2420
+ if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {
2421
+ x = visualViewport.offsetLeft;
2422
+ y = visualViewport.offsetTop;
2423
+ }
2424
+ }
2425
+ return {
2426
+ width,
2427
+ height,
2428
+ x,
2429
+ y
2430
+ };
2431
+ }
2432
+
2433
+ // Returns the inner client rect, subtracting scrollbars if present.
2434
+ function getInnerBoundingClientRect(element, strategy) {
2435
+ const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
2436
+ const top = clientRect.top + element.clientTop;
2437
+ const left = clientRect.left + element.clientLeft;
2438
+ const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);
2439
+ const width = element.clientWidth * scale.x;
2440
+ const height = element.clientHeight * scale.y;
2441
+ const x = left * scale.x;
2442
+ const y = top * scale.y;
2443
+ return {
2444
+ width,
2445
+ height,
2446
+ x,
2447
+ y
2448
+ };
2449
+ }
2450
+ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
2451
+ let rect;
2452
+ if (clippingAncestor === 'viewport') {
2453
+ rect = getViewportRect(element, strategy);
2454
+ } else if (clippingAncestor === 'document') {
2455
+ rect = getDocumentRect(getDocumentElement(element));
2456
+ } else if (floating_ui_utils_dom_isElement(clippingAncestor)) {
2457
+ rect = getInnerBoundingClientRect(clippingAncestor, strategy);
2458
+ } else {
2459
+ const visualOffsets = getVisualOffsets(element);
2460
+ rect = {
2461
+ ...clippingAncestor,
2462
+ x: clippingAncestor.x - visualOffsets.x,
2463
+ y: clippingAncestor.y - visualOffsets.y
2464
+ };
2465
+ }
2466
+ return rectToClientRect(rect);
2467
+ }
2468
+ function hasFixedPositionAncestor(element, stopNode) {
2469
+ const parentNode = getParentNode(element);
2470
+ if (parentNode === stopNode || !floating_ui_utils_dom_isElement(parentNode) || isLastTraversableNode(parentNode)) {
2471
+ return false;
2472
+ }
2473
+ return getComputedStyle(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
2474
+ }
2475
+
2476
+ // A "clipping ancestor" is an `overflow` element with the characteristic of
2477
+ // clipping (or hiding) child elements. This returns all clipping ancestors
2478
+ // of the given element up the tree.
2479
+ function getClippingElementAncestors(element, cache) {
2480
+ const cachedResult = cache.get(element);
2481
+ if (cachedResult) {
2482
+ return cachedResult;
2483
+ }
2484
+ let result = getOverflowAncestors(element).filter(el => floating_ui_utils_dom_isElement(el) && getNodeName(el) !== 'body');
2485
+ let currentContainingBlockComputedStyle = null;
2486
+ const elementIsFixed = getComputedStyle(element).position === 'fixed';
2487
+ let currentNode = elementIsFixed ? getParentNode(element) : element;
2488
+
2489
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
2490
+ while (floating_ui_utils_dom_isElement(currentNode) && !isLastTraversableNode(currentNode)) {
2491
+ const computedStyle = getComputedStyle(currentNode);
2492
+ const currentNodeIsContaining = isContainingBlock(currentNode);
2493
+ if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
2494
+ currentContainingBlockComputedStyle = null;
2495
+ }
2496
+ const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
2497
+ if (shouldDropCurrentNode) {
2498
+ // Drop non-containing blocks.
2499
+ result = result.filter(ancestor => ancestor !== currentNode);
2500
+ } else {
2501
+ // Record last containing block for next iteration.
2502
+ currentContainingBlockComputedStyle = computedStyle;
2503
+ }
2504
+ currentNode = getParentNode(currentNode);
2505
+ }
2506
+ cache.set(element, result);
2507
+ return result;
2508
+ }
2509
+
2510
+ // Gets the maximum area that the element is visible in due to any number of
2511
+ // clipping ancestors.
2512
+ function getClippingRect(_ref) {
2513
+ let {
2514
+ element,
2515
+ boundary,
2516
+ rootBoundary,
2517
+ strategy
2518
+ } = _ref;
2519
+ const elementClippingAncestors = boundary === 'clippingAncestors' ? getClippingElementAncestors(element, this._c) : [].concat(boundary);
2520
+ const clippingAncestors = [...elementClippingAncestors, rootBoundary];
2521
+ const firstClippingAncestor = clippingAncestors[0];
2522
+ const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
2523
+ const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
2524
+ accRect.top = floating_ui_utils_max(rect.top, accRect.top);
2525
+ accRect.right = floating_ui_utils_min(rect.right, accRect.right);
2526
+ accRect.bottom = floating_ui_utils_min(rect.bottom, accRect.bottom);
2527
+ accRect.left = floating_ui_utils_max(rect.left, accRect.left);
2528
+ return accRect;
2529
+ }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
2530
+ return {
2531
+ width: clippingRect.right - clippingRect.left,
2532
+ height: clippingRect.bottom - clippingRect.top,
2533
+ x: clippingRect.left,
2534
+ y: clippingRect.top
2535
+ };
2536
+ }
2537
+
2538
+ function getDimensions(element) {
2539
+ return getCssDimensions(element);
2540
+ }
2541
+
2542
+ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
2543
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
2544
+ const documentElement = getDocumentElement(offsetParent);
2545
+ const isFixed = strategy === 'fixed';
2546
+ const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
2547
+ let scroll = {
2548
+ scrollLeft: 0,
2549
+ scrollTop: 0
2550
+ };
2551
+ const offsets = createCoords(0);
2552
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
2553
+ if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
2554
+ scroll = getNodeScroll(offsetParent);
2555
+ }
2556
+ if (isOffsetParentAnElement) {
2557
+ const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
2558
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
2559
+ offsets.y = offsetRect.y + offsetParent.clientTop;
2560
+ } else if (documentElement) {
2561
+ offsets.x = getWindowScrollBarX(documentElement);
2562
+ }
2563
+ }
2564
+ return {
2565
+ x: rect.left + scroll.scrollLeft - offsets.x,
2566
+ y: rect.top + scroll.scrollTop - offsets.y,
2567
+ width: rect.width,
2568
+ height: rect.height
2569
+ };
2570
+ }
2571
+
2572
+ function getTrueOffsetParent(element, polyfill) {
2573
+ if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {
2574
+ return null;
2575
+ }
2576
+ if (polyfill) {
2577
+ return polyfill(element);
2578
+ }
2579
+ return element.offsetParent;
2580
+ }
2581
+ function getContainingBlock(element) {
2582
+ let currentNode = getParentNode(element);
2583
+ while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
2584
+ if (isContainingBlock(currentNode)) {
2585
+ return currentNode;
2586
+ } else {
2587
+ currentNode = getParentNode(currentNode);
2588
+ }
2589
+ }
2590
+ return null;
2591
+ }
2592
+
2593
+ // Gets the closest ancestor positioned element. Handles some edge cases,
2594
+ // such as table ancestors and cross browser bugs.
2595
+ function getOffsetParent(element, polyfill) {
2596
+ const window = getWindow(element);
2597
+ if (!isHTMLElement(element)) {
2598
+ return window;
2599
+ }
2600
+ let offsetParent = getTrueOffsetParent(element, polyfill);
2601
+ while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {
2602
+ offsetParent = getTrueOffsetParent(offsetParent, polyfill);
2603
+ }
2604
+ if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) {
2605
+ return window;
2606
+ }
2607
+ return offsetParent || getContainingBlock(element) || window;
2608
+ }
2609
+
2610
+ const getElementRects = async function (_ref) {
2611
+ let {
2612
+ reference,
2613
+ floating,
2614
+ strategy
2615
+ } = _ref;
2616
+ const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
2617
+ const getDimensionsFn = this.getDimensions;
2618
+ return {
2619
+ reference: getRectRelativeToOffsetParent(reference, await getOffsetParentFn(floating), strategy),
2620
+ floating: {
2621
+ x: 0,
2622
+ y: 0,
2623
+ ...(await getDimensionsFn(floating))
2624
+ }
2625
+ };
2626
+ };
2627
+
2628
+ function isRTL(element) {
2629
+ return getComputedStyle(element).direction === 'rtl';
2630
+ }
2631
+
2632
+ const platform = {
2633
+ convertOffsetParentRelativeRectToViewportRelativeRect,
2634
+ getDocumentElement: getDocumentElement,
2635
+ getClippingRect,
2636
+ getOffsetParent,
2637
+ getElementRects,
2638
+ getClientRects,
2639
+ getDimensions,
2640
+ getScale,
2641
+ isElement: floating_ui_utils_dom_isElement,
2642
+ isRTL
2643
+ };
2644
+
2645
+ // https://samthor.au/2021/observing-dom/
2646
+ function observeMove(element, onMove) {
2647
+ let io = null;
2648
+ let timeoutId;
2649
+ const root = getDocumentElement(element);
2650
+ function cleanup() {
2651
+ clearTimeout(timeoutId);
2652
+ io && io.disconnect();
2653
+ io = null;
2654
+ }
2655
+ function refresh(skip, threshold) {
2656
+ if (skip === void 0) {
2657
+ skip = false;
2658
+ }
2659
+ if (threshold === void 0) {
2660
+ threshold = 1;
2661
+ }
2662
+ cleanup();
2663
+ const {
2664
+ left,
2665
+ top,
2666
+ width,
2667
+ height
2668
+ } = element.getBoundingClientRect();
2669
+ if (!skip) {
2670
+ onMove();
2671
+ }
2672
+ if (!width || !height) {
2673
+ return;
2674
+ }
2675
+ const insetTop = floor(top);
2676
+ const insetRight = floor(root.clientWidth - (left + width));
2677
+ const insetBottom = floor(root.clientHeight - (top + height));
2678
+ const insetLeft = floor(left);
2679
+ const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
2680
+ const options = {
2681
+ rootMargin,
2682
+ threshold: floating_ui_utils_max(0, floating_ui_utils_min(1, threshold)) || 1
2683
+ };
2684
+ let isFirstUpdate = true;
2685
+ function handleObserve(entries) {
2686
+ const ratio = entries[0].intersectionRatio;
2687
+ if (ratio !== threshold) {
2688
+ if (!isFirstUpdate) {
2689
+ return refresh();
2690
+ }
2691
+ if (!ratio) {
2692
+ timeoutId = setTimeout(() => {
2693
+ refresh(false, 1e-7);
2694
+ }, 100);
2695
+ } else {
2696
+ refresh(false, ratio);
2697
+ }
2698
+ }
2699
+ isFirstUpdate = false;
2700
+ }
2701
+
2702
+ // Older browsers don't support a `document` as the root and will throw an
2703
+ // error.
2704
+ try {
2705
+ io = new IntersectionObserver(handleObserve, {
2706
+ ...options,
2707
+ // Handle <iframe>s
2708
+ root: root.ownerDocument
2709
+ });
2710
+ } catch (e) {
2711
+ io = new IntersectionObserver(handleObserve, options);
2712
+ }
2713
+ io.observe(element);
2714
+ }
2715
+ refresh(true);
2716
+ return cleanup;
2717
+ }
2718
+
2719
+ /**
2720
+ * Automatically updates the position of the floating element when necessary.
2721
+ * Should only be called when the floating element is mounted on the DOM or
2722
+ * visible on the screen.
2723
+ * @returns cleanup function that should be invoked when the floating element is
2724
+ * removed from the DOM or hidden from the screen.
2725
+ * @see https://floating-ui.com/docs/autoUpdate
2726
+ */
2727
+ function autoUpdate(reference, floating, update, options) {
2728
+ if (options === void 0) {
2729
+ options = {};
2730
+ }
2731
+ const {
2732
+ ancestorScroll = true,
2733
+ ancestorResize = true,
2734
+ elementResize = typeof ResizeObserver === 'function',
2735
+ layoutShift = typeof IntersectionObserver === 'function',
2736
+ animationFrame = false
2737
+ } = options;
2738
+ const referenceEl = unwrapElement(reference);
2739
+ const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];
2740
+ ancestors.forEach(ancestor => {
2741
+ ancestorScroll && ancestor.addEventListener('scroll', update, {
2742
+ passive: true
2743
+ });
2744
+ ancestorResize && ancestor.addEventListener('resize', update);
2745
+ });
2746
+ const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
2747
+ let reobserveFrame = -1;
2748
+ let resizeObserver = null;
2749
+ if (elementResize) {
2750
+ resizeObserver = new ResizeObserver(_ref => {
2751
+ let [firstEntry] = _ref;
2752
+ if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
2753
+ // Prevent update loops when using the `size` middleware.
2754
+ // https://github.com/floating-ui/floating-ui/issues/1740
2755
+ resizeObserver.unobserve(floating);
2756
+ cancelAnimationFrame(reobserveFrame);
2757
+ reobserveFrame = requestAnimationFrame(() => {
2758
+ resizeObserver && resizeObserver.observe(floating);
2759
+ });
2760
+ }
2761
+ update();
2762
+ });
2763
+ if (referenceEl && !animationFrame) {
2764
+ resizeObserver.observe(referenceEl);
2765
+ }
2766
+ resizeObserver.observe(floating);
2767
+ }
2768
+ let frameId;
2769
+ let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
2770
+ if (animationFrame) {
2771
+ frameLoop();
2772
+ }
2773
+ function frameLoop() {
2774
+ const nextRefRect = getBoundingClientRect(reference);
2775
+ if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {
2776
+ update();
2777
+ }
2778
+ prevRefRect = nextRefRect;
2779
+ frameId = requestAnimationFrame(frameLoop);
2780
+ }
2781
+ update();
2782
+ return () => {
2783
+ ancestors.forEach(ancestor => {
2784
+ ancestorScroll && ancestor.removeEventListener('scroll', update);
2785
+ ancestorResize && ancestor.removeEventListener('resize', update);
2786
+ });
2787
+ cleanupIo && cleanupIo();
2788
+ resizeObserver && resizeObserver.disconnect();
2789
+ resizeObserver = null;
2790
+ if (animationFrame) {
2791
+ cancelAnimationFrame(frameId);
2792
+ }
2793
+ };
2794
+ }
2795
+
2796
+ /**
2797
+ * Computes the `x` and `y` coordinates that will place the floating element
2798
+ * next to a reference element when it is given a certain CSS positioning
2799
+ * strategy.
2800
+ */
2801
+ const floating_ui_dom_computePosition = (reference, floating, options) => {
2802
+ // This caches the expensive `getClippingElementAncestors` function so that
2803
+ // multiple lifecycle resets re-use the same result. It only lives for a
2804
+ // single call. If other functions become expensive, we can add them as well.
2805
+ const cache = new Map();
2806
+ const mergedOptions = {
2807
+ platform,
2808
+ ...options
2809
+ };
2810
+ const platformWithCache = {
2811
+ ...mergedOptions.platform,
2812
+ _c: cache
2813
+ };
2814
+ return computePosition(reference, floating, {
2815
+ ...mergedOptions,
2816
+ platform: platformWithCache
2817
+ });
2818
+ };
2819
+
2820
+
2821
+
2822
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js
2823
+ function _objectDestructuringEmpty(obj) {
2824
+ if (obj == null) throw new TypeError("Cannot destructure " + obj);
2825
+ }
2826
+ ;// CONCATENATED MODULE: ../../packages/popover/src/use-platform.tsx
2827
+
2828
+ /*
2829
+ * Tencent is pleased to support the open source community by making
2830
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
2831
+ *
2832
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
2833
+ *
2834
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
2835
+ *
2836
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
2837
+ *
2838
+ * ---------------------------------------------------
2839
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
2840
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
2841
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
2842
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
2843
+ *
2844
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
2845
+ * the Software.
2846
+ *
2847
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
2848
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2849
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
2850
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
2851
+ * IN THE SOFTWARE.
2852
+ */
2853
+ /* harmony default export */ const use_platform = (function (fullscreenTarget) {
2854
+ var getElementRects = function getElementRects(_ref) {
2855
+ var reference = _ref.reference,
2856
+ floating = _ref.floating;
2857
+ var refRect = reference.getBoundingClientRect();
2858
+ var floatRect = floating.getBoundingClientRect();
2859
+ return {
2860
+ reference: {
2861
+ width: refRect.width,
2862
+ height: refRect.height,
2863
+ x: refRect.x,
2864
+ y: refRect.y
2865
+ },
2866
+ floating: {
2867
+ width: floatRect.width,
2868
+ height: floatRect.height,
2869
+ x: floatRect.x,
2870
+ y: floatRect.y
2871
+ }
2872
+ };
2873
+ };
2874
+ var getDimensions = function getDimensions(element) {
2875
+ var _element$getBoundingC = element.getBoundingClientRect(),
2876
+ width = _element$getBoundingC.width,
2877
+ height = _element$getBoundingC.height;
2878
+ return {
2879
+ width: width,
2880
+ height: height
2881
+ };
2882
+ };
2883
+ var getClippingRect = function getClippingRect(_ref2) {
2884
+ _objectDestructuringEmpty(_ref2);
2885
+ var _a;
2886
+ var _ref3 = (_a = fullscreenTarget === null || fullscreenTarget === void 0 ? void 0 : fullscreenTarget.getBoundingClientRect()) !== null && _a !== void 0 ? _a : {},
2887
+ _ref3$width = _ref3.width,
2888
+ width = _ref3$width === void 0 ? 0 : _ref3$width,
2889
+ _ref3$height = _ref3.height,
2890
+ height = _ref3$height === void 0 ? 0 : _ref3$height;
2891
+ return {
2892
+ width: width,
2893
+ height: height,
2894
+ x: 0,
2895
+ y: 0
2896
+ };
2897
+ };
2898
+ return {
2899
+ getElementRects: getElementRects,
2900
+ getDimensions: getDimensions,
2901
+ getClippingRect: getClippingRect
2902
+ };
2903
+ });
2904
+ // EXTERNAL MODULE: ../../node_modules/uuid/index.js
2905
+ var uuid = __webpack_require__(8022);
2906
+ ;// CONCATENATED MODULE: ../../packages/popover/src/utils.ts
2907
+ /*
2908
+ * Tencent is pleased to support the open source community by making
2909
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
2910
+ *
2911
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
2912
+ *
2913
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
2914
+ *
2915
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
2916
+ *
2917
+ * ---------------------------------------------------
2918
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
2919
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
2920
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
2921
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
2922
+ *
2923
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
2924
+ * the Software.
2925
+ *
2926
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
2927
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2928
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
2929
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
2930
+ * IN THE SOFTWARE.
2931
+ */
2932
+
2933
+ var CachedConst = {};
2934
+ var isAvailableId = function isAvailableId(query) {
2935
+ var container = document.querySelector(query);
2936
+ return container instanceof HTMLElement;
2937
+ };
2938
+ var getFullscreenUid = function getFullscreenUid() {
2939
+ if (!CachedConst.fullscreenReferId) {
2940
+ CachedConst.fullscreenReferId = "id_".concat((0,uuid.v4)());
2941
+ }
2942
+ return CachedConst.fullscreenReferId;
2943
+ };
2944
+ var utils_isElement = function isElement(element) {
2945
+ return element instanceof Element || element instanceof HTMLDocument;
2946
+ };
2947
+ var contentAsHTMLElement = function contentAsHTMLElement(content) {
2948
+ if (utils_isElement(content)) {
2949
+ return {
2950
+ isElement: true,
2951
+ content: content,
2952
+ vNode: undefined
2953
+ };
2954
+ }
2955
+ if (/^(#|\.)/.test(content)) {
2956
+ var target = document.querySelector(content);
2957
+ var isEle = utils_isElement(target);
2958
+ return {
2959
+ isElement: isEle,
2960
+ content: isEle ? target : content,
2961
+ vNode: isEle ? undefined : content
2962
+ };
2963
+ }
2964
+ return {
2965
+ isElement: false,
2966
+ content: content,
2967
+ vNode: content
2968
+ };
2969
+ };
2970
+ // EXTERNAL MODULE: external "lodash"
2971
+ var external_lodash_ = __webpack_require__(467);
2972
+ ;// CONCATENATED MODULE: ../../packages/popover/src/use-floating.tsx
2973
+
2974
+
2975
+ /*
2976
+ * Tencent is pleased to support the open source community by making
2977
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
2978
+ *
2979
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
2980
+ *
2981
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
2982
+ *
2983
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
2984
+ *
2985
+ * ---------------------------------------------------
2986
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
2987
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
2988
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
2989
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
2990
+ *
2991
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
2992
+ * the Software.
2993
+ *
2994
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
2995
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2996
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
2997
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
2998
+ * IN THE SOFTWARE.
2999
+ */
3000
+
3001
+
3002
+
3003
+
3004
+
3005
+
3006
+
3007
+ /**
3008
+ * 解析popover相关配置
3009
+ */
3010
+ /* harmony default export */ const use_floating = (function (props, ctx, _ref) {
3011
+ var refReference = _ref.refReference,
3012
+ refContent = _ref.refContent,
3013
+ refArrow = _ref.refArrow,
3014
+ refRoot = _ref.refRoot;
3015
+ var localIsShow = (0,external_vue_.ref)(false);
3016
+ var fullScreenTarget = (0,external_vue_.ref)();
3017
+ var isElementFullScreen = function isElementFullScreen() {
3018
+ var _a, _b;
3019
+ var elReference = resolveReferElement();
3020
+ if ((_a = document.fullscreenElement) === null || _a === void 0 ? void 0 : _a.shadowRoot) {
3021
+ return document.fullscreenElement.shadowRoot.contains(elReference);
3022
+ }
3023
+ return (_b = document.fullscreenElement) === null || _b === void 0 ? void 0 : _b.contains(elReference);
3024
+ };
3025
+ /**
3026
+ * 当全屏模式开启,获取指定选择器下面的全屏元素
3027
+ * 如果是启用了webcomponent组件,则返回shadowRoot内指定的目标元素
3028
+ * @param selector
3029
+ * @returns
3030
+ */
3031
+ var getFullscreenRoot = function getFullscreenRoot(selector) {
3032
+ if (isElementFullScreen()) {
3033
+ if (document.fullscreenElement.shadowRoot) {
3034
+ return document.fullscreenElement.shadowRoot.querySelector(selector);
3035
+ }
3036
+ return document.fullscreenElement.querySelector(selector);
3037
+ }
3038
+ return document.body;
3039
+ };
3040
+ var themeList = ['dark', 'light'];
3041
+ /**
3042
+ * 根据props.theme计算theme
3043
+ * 返回systemTheme & customTheme
3044
+ * systemTheme是指包含在 ['dark', 'light'] 内置主题
3045
+ * customTheme是指自定义的theme,string类型
3046
+ */
3047
+ var compTheme = (0,external_vue_.computed)(function () {
3048
+ var _a, _b;
3049
+ var themes = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.split(/\s+/)) !== null && _b !== void 0 ? _b : [];
3050
+ themes.sort(function (a, b) {
3051
+ return Number(themeList.includes(b)) - Number(themeList.includes(a));
3052
+ });
3053
+ var systemThemes = themes;
3054
+ var customThemes = themes.filter(function (item) {
3055
+ return !themeList.includes(item);
3056
+ });
3057
+ return {
3058
+ systemThemes: systemThemes,
3059
+ customThemes: customThemes
3060
+ };
3061
+ });
3062
+ var isHideMiddlewareAvailable = function isHideMiddlewareAvailable() {
3063
+ return props.autoVisibility;
3064
+ };
3065
+ var isAutoPlacementAvailable = function isAutoPlacementAvailable() {
3066
+ return props.autoPlacement;
3067
+ };
3068
+ /**
3069
+ * 解析弹出reference元素,content元素, arrow元素
3070
+ * @returns
3071
+ */
3072
+ var resolvePopElements = function resolvePopElements() {
3073
+ var _a, _b, _c;
3074
+ var elReference = resolveReferElement();
3075
+ var elContent = resolveTargetElement((_a = refContent.value) === null || _a === void 0 ? void 0 : _a.$el);
3076
+ var elArrow = props.arrow ? resolveTargetElement((_b = refArrow.value) === null || _b === void 0 ? void 0 : _b.$el) : null;
3077
+ var root = resolveTargetElement((_c = refRoot.value) === null || _c === void 0 ? void 0 : _c.$el);
3078
+ var _contentAsHTMLElement = contentAsHTMLElement(props.content),
3079
+ isElement = _contentAsHTMLElement.isElement,
3080
+ content = _contentAsHTMLElement.content;
3081
+ if (elContent && isElement && !(elContent === null || elContent === void 0 ? void 0 : elContent.contains(content))) {
3082
+ elContent.append(content);
3083
+ }
3084
+ return {
3085
+ elReference: elReference,
3086
+ elContent: elContent,
3087
+ elArrow: elArrow,
3088
+ root: root
3089
+ };
3090
+ };
3091
+ var resolveReferElement = function resolveReferElement() {
3092
+ var _a;
3093
+ return resolveTargetElement(props.target) || resolveTargetElement((_a = refReference.value) === null || _a === void 0 ? void 0 : _a.$el);
3094
+ };
3095
+ var resolveModifiers = function resolveModifiers() {
3096
+ var resolveResult = {};
3097
+ if (Array.isArray(props.modifiers)) {
3098
+ props.modifiers.forEach(function (m) {
3099
+ var _a, _b, _c, _d;
3100
+ var result;
3101
+ if (m.name === 'offset') {
3102
+ if (typeof ((_a = m.options) === null || _a === void 0 ? void 0 : _a.offset) === 'number') {
3103
+ result = (_b = m.options) === null || _b === void 0 ? void 0 : _b.offset;
3104
+ }
3105
+ if (Array.isArray((_c = m.options) === null || _c === void 0 ? void 0 : _c.offset)) {
3106
+ var _ref2 = (_d = m.options) === null || _d === void 0 ? void 0 : _d.offset,
3107
+ _ref3 = _slicedToArray(_ref2, 2),
3108
+ mainAxis = _ref3[0],
3109
+ crossAxis = _ref3[1];
3110
+ result = {
3111
+ mainAxis: mainAxis,
3112
+ crossAxis: crossAxis
3113
+ };
3114
+ }
3115
+ Object.assign(resolveResult, {
3116
+ offset: result
3117
+ });
3118
+ }
3119
+ });
3120
+ }
3121
+ return resolveResult;
3122
+ };
3123
+ var resolvePopOptions = function resolvePopOptions(elArrow, props) {
3124
+ var _a;
3125
+ var modifiers = resolveModifiers();
3126
+ var middleware = [offset(modifiers.offset || props.offset), shift({
3127
+ padding: props.padding
3128
+ })];
3129
+ var options = {
3130
+ placement: props.placement,
3131
+ middleware: middleware
3132
+ };
3133
+ if (props.arrow) {
3134
+ middleware.push(arrow({
3135
+ element: elArrow
3136
+ }));
3137
+ }
3138
+ if (isAutoPlacementAvailable()) {
3139
+ middleware.push(autoPlacement());
3140
+ } else {
3141
+ middleware.unshift(inline());
3142
+ middleware.push(flip());
3143
+ }
3144
+ if (isHideMiddlewareAvailable()) {
3145
+ options.middleware.push(hide());
3146
+ }
3147
+ /**
3148
+ * 如果是全屏元素或者指定的虚拟元素
3149
+ * 则启用自定义的platform
3150
+ * 在弹出的全屏元素中,元素相对位置有别于document下面元素
3151
+ * 全屏模式下面,需要自定义当前元素的一个platform
3152
+ */
3153
+ if (isElementFullScreen() || props.isVirtualEl) {
3154
+ var _usePlatform = use_platform(fullScreenTarget.value),
3155
+ getElementRects = _usePlatform.getElementRects,
3156
+ getDimensions = _usePlatform.getDimensions,
3157
+ getClippingRect = _usePlatform.getClippingRect;
3158
+ Object.assign(options, {
3159
+ platform: Object.assign(Object.assign({}, (_a = props === null || props === void 0 ? void 0 : props.platform) !== null && _a !== void 0 ? _a : {}), {
3160
+ getElementRects: getElementRects,
3161
+ getDimensions: getDimensions,
3162
+ getClippingRect: getClippingRect
3163
+ })
3164
+ });
3165
+ }
3166
+ return options;
3167
+ };
3168
+ var resolveTargetElement = function resolveTargetElement(target) {
3169
+ if (target instanceof HTMLElement) {
3170
+ return target;
3171
+ }
3172
+ if (target instanceof Text) {
3173
+ return resolveTargetElement(target.nextElementSibling);
3174
+ }
3175
+ if (typeof (target === null || target === void 0 ? void 0 : target.getBoundingClientRect) === 'function') {
3176
+ return target;
3177
+ }
3178
+ if (typeof target === 'string') {
3179
+ var targetEl = document.querySelector(target);
3180
+ if ((0,external_lodash_.isElement)(targetEl)) {
3181
+ return targetEl;
3182
+ }
3183
+ return null;
3184
+ }
3185
+ if (target instanceof PointerEvent) {
3186
+ return resolveTargetElement(target.target);
3187
+ }
3188
+ return null;
3189
+ };
3190
+ // 兼容多种样式处理规则
3191
+ // class custom-theme
3192
+ var customThemeCls = compTheme.value.customThemes.join(' ');
3193
+ var customTheme = compTheme.value.customThemes.reduce(function (out, cur) {
3194
+ return Object.assign(_defineProperty({}, "data-".concat(cur, "-theme"), true), out);
3195
+ }, {});
3196
+ var contentClass = "".concat(customThemeCls);
3197
+ var cleanup = null;
3198
+ var getRoundPixelVal = function getRoundPixelVal(val) {
3199
+ var dpr = window.devicePixelRatio || 1;
3200
+ return Math.round(val * dpr) / dpr || 0;
3201
+ };
3202
+ var updatePopContentStyle = function updatePopContentStyle(elContent, x, y, middlewareData) {
3203
+ var _a;
3204
+ if (props.disableTransform) {
3205
+ Object.assign(elContent.style, {
3206
+ left: "".concat(getRoundPixelVal(x), "px"),
3207
+ top: "".concat(getRoundPixelVal(y), "px")
3208
+ });
3209
+ } else {
3210
+ Object.assign(elContent.style, {
3211
+ left: '0',
3212
+ top: '0',
3213
+ transform: "translate3d(".concat(getRoundPixelVal(x), "px,").concat(getRoundPixelVal(y), "px,0)")
3214
+ });
3215
+ }
3216
+ var referenceHidden = isHideMiddlewareAvailable() ? (_a = middlewareData.hide) === null || _a === void 0 ? void 0 : _a.referenceHidden : false;
3217
+ Object.assign(elContent.style, {
3218
+ visibility: referenceHidden ? 'hidden' : 'visible'
3219
+ });
3220
+ };
3221
+ var updateArrowStyle = function updateArrowStyle(elArrow, resolvedPlacement, middlewareData) {
3222
+ var _a;
3223
+ if (props.arrow) {
3224
+ var _ref4 = (_a = middlewareData.arrow) !== null && _a !== void 0 ? _a : {},
3225
+ arrowX = _ref4.x,
3226
+ arrowY = _ref4.y;
3227
+ elArrow.setAttribute('data-arrow', resolvedPlacement);
3228
+ var arrowConfig = {
3229
+ left: '',
3230
+ top: '',
3231
+ bottom: '',
3232
+ right: ''
3233
+ };
3234
+ Object.assign(elArrow.style, arrowConfig);
3235
+ var arrowSide = {
3236
+ top: 'bottom',
3237
+ right: 'left',
3238
+ bottom: 'top',
3239
+ left: 'right'
3240
+ }[resolvedPlacement];
3241
+ Object.assign(elArrow.style, _defineProperty({
3242
+ left: arrowX !== null ? "".concat(arrowX, "px") : '',
3243
+ top: arrowY !== null ? "".concat(arrowY, "px") : ''
3244
+ }, arrowSide, '-4px'));
3245
+ }
3246
+ };
3247
+ var createPopInstance = function createPopInstance() {
3248
+ var _resolvePopElements = resolvePopElements(),
3249
+ elReference = _resolvePopElements.elReference,
3250
+ elContent = _resolvePopElements.elContent;
3251
+ cleanup = autoUpdate(elReference, elContent, function () {
3252
+ if (localIsShow.value) {
3253
+ updatePopover(null, props);
3254
+ }
3255
+ });
3256
+ };
3257
+ var updatePopover = function updatePopover() {
3258
+ var virtualEl = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
3259
+ var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
3260
+ var callFn = arguments.length > 2 ? arguments[2] : undefined;
3261
+ var _resolvePopElements2 = resolvePopElements(),
3262
+ elReference = _resolvePopElements2.elReference,
3263
+ elContent = _resolvePopElements2.elContent,
3264
+ elArrow = _resolvePopElements2.elArrow;
3265
+ var targetEl = virtualEl || elReference;
3266
+ if (!targetEl || !elContent) return;
3267
+ var options = resolvePopOptions(elArrow, props);
3268
+ floating_ui_dom_computePosition(targetEl, elContent, options).then(function (_ref5) {
3269
+ var x = _ref5.x,
3270
+ y = _ref5.y,
3271
+ placement = _ref5.placement,
3272
+ middlewareData = _ref5.middlewareData;
3273
+ var oldClass = elContent.className;
3274
+ elContent.className = "".concat(oldClass.replace(contentClass, ''), " ").concat(contentClass).replace(/\s+/mg, ' ').replace(/^\s+|\s+$/g, '');
3275
+ Object.keys(customTheme).forEach(function (key) {
3276
+ elContent.setAttribute(key, customTheme[key]);
3277
+ });
3278
+ var placementStr = placement.split('-')[0];
3279
+ var resolvedPlacement = placementStr;
3280
+ if (!['left', 'right', 'top', 'bottom'].includes(placementStr)) {
3281
+ resolvedPlacement = 'top';
3282
+ }
3283
+ updatePopContentStyle(elContent, x, y, middlewareData);
3284
+ updateArrowStyle(elArrow, resolvedPlacement, middlewareData);
3285
+ if (typeof callFn === 'function') {
3286
+ callFn();
3287
+ }
3288
+ });
3289
+ };
3290
+ var popHideTimerId = undefined;
3291
+ var popShowTimerId = undefined;
3292
+ var isMouseenter = false;
3293
+ var resolvePopoverDelay = function resolvePopoverDelay() {
3294
+ if (Array.isArray(props.popoverDelay)) {
3295
+ return [props.popoverDelay[0], props.popoverDelay.slice(-1)[0]];
3296
+ }
3297
+ return [props.popoverDelay, props.popoverDelay];
3298
+ };
3299
+ var showPopover = function showPopover() {
3300
+ var delay = resolvePopoverDelay()[0];
3301
+ // 设置settimeout避免hidePopover导致显示问题
3302
+ popShowTimerId = setTimeout(function () {
3303
+ if (popHideTimerId) {
3304
+ clearTimeout(popHideTimerId);
3305
+ }
3306
+ if (!props.disabled) {
3307
+ localIsShow.value = true;
3308
+ }
3309
+ }, delay);
3310
+ };
3311
+ var hidePopover = function hidePopover() {
3312
+ var delay = resolvePopoverDelay()[1];
3313
+ popHideTimerId = setTimeout(function () {
3314
+ popShowTimerId && clearTimeout(popShowTimerId);
3315
+ localIsShow.value = false;
3316
+ }, delay);
3317
+ };
3318
+ var handlePopoverShow = function handlePopoverShow() {
3319
+ var _a;
3320
+ var elContent = resolveTargetElement((_a = refContent.value) === null || _a === void 0 ? void 0 : _a.$el);
3321
+ elContent.style.setProperty('display', 'block');
3322
+ elContent.style.setProperty('z-index', "".concat(props.zIndex ? props.zIndex : external_shared_.bkZIndexManager.getPopperIndex()));
3323
+ updatePopover();
3324
+ ctx.emit(EMIT_EVENTS.CONTENT_AfterShow, {
3325
+ isShow: true
3326
+ });
3327
+ };
3328
+ var handlePopoverHide = function handlePopoverHide() {
3329
+ var _a;
3330
+ var elContent = resolveTargetElement((_a = refContent.value) === null || _a === void 0 ? void 0 : _a.$el);
3331
+ elContent.style.setProperty('display', 'none');
3332
+ ctx.emit(EMIT_EVENTS.CONTENT_AfterHidden, {
3333
+ isShow: false
3334
+ });
3335
+ };
3336
+ var triggerPopover = function triggerPopover() {
3337
+ if (!localIsShow.value) {
3338
+ showPopover();
3339
+ } else {
3340
+ hidePopover();
3341
+ }
3342
+ };
3343
+ var handleClickRef = function handleClickRef() {
3344
+ triggerPopover();
3345
+ };
3346
+ var handlePopContentMouseEnter = function handlePopContentMouseEnter(e) {
3347
+ if (props.trigger !== 'hover') {
3348
+ return;
3349
+ }
3350
+ if (popHideTimerId) {
3351
+ isMouseenter = true;
3352
+ clearTimeout(popHideTimerId);
3353
+ popHideTimerId = undefined;
3354
+ }
3355
+ emitPopContentMouseEnter(e);
3356
+ };
3357
+ var handlePopContentMouseLeave = function handlePopContentMouseLeave(e) {
3358
+ if (isMouseenter) {
3359
+ hidePopover();
3360
+ isMouseenter = false;
3361
+ emitPopContentMouseLeave(e);
3362
+ }
3363
+ };
3364
+ /**
3365
+ * 弹出内容鼠标移入事件
3366
+ * 抛出相关事件,方便后续操作
3367
+ * 例如:鼠标移入内容区域,则取消弹出内容隐藏操作
3368
+ */
3369
+ var emitPopContentMouseEnter = function emitPopContentMouseEnter(e) {
3370
+ ctx.emit(EMIT_EVENTS.CONTENT_MOUSEENTER, e);
3371
+ };
3372
+ /**
3373
+ * 弹出内容鼠标移出事件
3374
+ */
3375
+ var emitPopContentMouseLeave = function emitPopContentMouseLeave(e) {
3376
+ ctx.emit(EMIT_EVENTS.CONTENT_MOUSELEAVE, e);
3377
+ };
3378
+ var resolveTriggerEvents = function resolveTriggerEvents() {
3379
+ var _a;
3380
+ var triggerEvents = {
3381
+ hover: {
3382
+ content: [['mouseenter', handlePopContentMouseEnter], ['mouseleave', handlePopContentMouseLeave]],
3383
+ reference: [['mouseenter', showPopover], ['mouseleave', hidePopover], ['focus', showPopover], ['blur', hidePopover]]
3384
+ },
3385
+ click: [['click', handleClickRef]],
3386
+ manual: {
3387
+ content: [['mouseenter', emitPopContentMouseEnter], ['mouseleave', emitPopContentMouseLeave]],
3388
+ reference: [[]]
3389
+ }
3390
+ };
3391
+ return (_a = triggerEvents[props.trigger]) !== null && _a !== void 0 ? _a : [];
3392
+ };
3393
+ var updateFullscreenTarget = function updateFullscreenTarget(val) {
3394
+ fullScreenTarget.value = val;
3395
+ };
3396
+ (0,external_vue_.watch)(function () {
3397
+ return props.isShow;
3398
+ }, function (val) {
3399
+ localIsShow.value = val;
3400
+ });
3401
+ (0,external_vue_.watch)(localIsShow, function (val) {
3402
+ if (val) {
3403
+ handlePopoverShow();
3404
+ } else {
3405
+ handlePopoverHide();
3406
+ }
3407
+ });
3408
+ var stopHide = function stopHide() {
3409
+ if (popHideTimerId) {
3410
+ isMouseenter = true;
3411
+ clearTimeout(popHideTimerId);
3412
+ popHideTimerId = undefined;
3413
+ }
3414
+ };
3415
+ return {
3416
+ showPopover: showPopover,
3417
+ hidePopover: hidePopover,
3418
+ resolveTriggerEvents: resolveTriggerEvents,
3419
+ updatePopover: updatePopover,
3420
+ triggerPopover: triggerPopover,
3421
+ resolvePopElements: resolvePopElements,
3422
+ isElementFullScreen: isElementFullScreen,
3423
+ resolveTargetElement: resolveTargetElement,
3424
+ createPopInstance: createPopInstance,
3425
+ updateFullscreenTarget: updateFullscreenTarget,
3426
+ getFullscreenRoot: getFullscreenRoot,
3427
+ stopHide: stopHide,
3428
+ localIsShow: localIsShow,
3429
+ cleanup: cleanup
3430
+ };
3431
+ });
3432
+ ;// CONCATENATED MODULE: ../../packages/popover/src/use-popper-id.ts
3433
+ /*
3434
+ * Tencent is pleased to support the open source community by making
3435
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
3436
+ *
3437
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
3438
+ *
3439
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
3440
+ *
3441
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
3442
+ *
3443
+ * ---------------------------------------------------
3444
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
3445
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
3446
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
3447
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3448
+ *
3449
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
3450
+ * the Software.
3451
+ *
3452
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
3453
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
3454
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
3455
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
3456
+ * IN THE SOFTWARE.
3457
+ */
3458
+
3459
+
3460
+ var popContainerId = null;
3461
+ var parentNodeReferId = null;
3462
+ /* harmony default export */ const use_popper_id = (function (props) {
3463
+ var prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '#';
3464
+ var getPrefixId = function getPrefixId(root) {
3465
+ var resolvedBoundary = null;
3466
+ var resolveBoundary = function resolveBoundary(fn) {
3467
+ if (resolvedBoundary === null) {
3468
+ fn();
3469
+ }
3470
+ };
3471
+ var resolveParentBoundary = function resolveParentBoundary() {
3472
+ if (/^parent$/i.test(props.boundary)) {
3473
+ resolvedBoundary = "".concat(prefix).concat(popContainerId);
3474
+ var _ref = root || {},
3475
+ parentNode = _ref.parentNode;
3476
+ if (parentNode === null || parentNode === void 0 ? void 0 : parentNode.parentNode) {
3477
+ parentNode.parentNode.setAttribute('data-pnode-id', parentNodeReferId);
3478
+ resolvedBoundary = "[data-pnode-id=".concat(parentNodeReferId, "]");
3479
+ }
3480
+ }
3481
+ };
3482
+ var resolveCommonBoundary = function resolveCommonBoundary() {
3483
+ if (!/^body$/i.test(props.boundary)) {
3484
+ if (typeof props.boundary === 'string') {
3485
+ if (!isAvailableId(props.boundary)) {
3486
+ // console.error('props.boundary is not available selector');
3487
+ resolvedBoundary = 'body';
3488
+ return;
3489
+ }
3490
+ resolvedBoundary = props.boundary;
3491
+ return;
3492
+ }
3493
+ if (utils_isElement(props.boundary)) {
3494
+ resolvedBoundary = props.boundary;
3495
+ return;
3496
+ }
3497
+ }
3498
+ };
3499
+ resolveBoundary(resolveParentBoundary);
3500
+ resolveBoundary(resolveCommonBoundary);
3501
+ resolveBoundary(function () {
3502
+ resolvedBoundary = typeof props.boundary === 'string' ? props.boundary : "".concat(prefix).concat(popContainerId);
3503
+ });
3504
+ return resolvedBoundary;
3505
+ };
3506
+ if (popContainerId === null || !isAvailableId("#".concat(popContainerId))) {
3507
+ popContainerId = "id_".concat((0,uuid.v4)());
3508
+ var popContainer = document.createElement('div');
3509
+ popContainer.setAttribute('id', popContainerId);
3510
+ popContainer.setAttribute('data-popper-id', popContainerId);
3511
+ document.body.append(popContainer);
3512
+ }
3513
+ if (parentNodeReferId === null) {
3514
+ parentNodeReferId = "id_".concat((0,uuid.v4)());
3515
+ }
3516
+ return {
3517
+ popContainerId: popContainerId,
3518
+ prefixId: getPrefixId(),
3519
+ getPrefixId: getPrefixId
3520
+ };
3521
+ });
3522
+ ;// CONCATENATED MODULE: ../../packages/popover/src/use-popover-init.ts
3523
+
3524
+ /*
3525
+ * Tencent is pleased to support the open source community by making
3526
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
3527
+ *
3528
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
3529
+ *
3530
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
3531
+ *
3532
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
3533
+ *
3534
+ * ---------------------------------------------------
3535
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
3536
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
3537
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
3538
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3539
+ *
3540
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
3541
+ * the Software.
3542
+ *
3543
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
3544
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
3545
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
3546
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
3547
+ * IN THE SOFTWARE.
3548
+ */
3549
+
3550
+
3551
+
3552
+
3553
+
3554
+ /* harmony default export */ const use_popover_init = (function (props, ctx, _ref) {
3555
+ var refReference = _ref.refReference,
3556
+ refContent = _ref.refContent,
3557
+ refArrow = _ref.refArrow,
3558
+ refRoot = _ref.refRoot;
3559
+ var storeEvents = null;
3560
+ var isFullscreen = (0,external_vue_.ref)(false);
3561
+ var fullscreenReferId = getFullscreenUid();
3562
+ var fullScreenTarget = (0,external_vue_.ref)();
3563
+ var _useFloating = use_floating(props, ctx, {
3564
+ refReference: refReference,
3565
+ refContent: refContent,
3566
+ refArrow: refArrow,
3567
+ refRoot: refRoot
3568
+ }),
3569
+ localIsShow = _useFloating.localIsShow,
3570
+ showPopover = _useFloating.showPopover,
3571
+ hidePopover = _useFloating.hidePopover,
3572
+ updatePopover = _useFloating.updatePopover,
3573
+ cleanup = _useFloating.cleanup,
3574
+ resolveTriggerEvents = _useFloating.resolveTriggerEvents,
3575
+ resolvePopElements = _useFloating.resolvePopElements,
3576
+ isElementFullScreen = _useFloating.isElementFullScreen,
3577
+ updateFullscreenTarget = _useFloating.updateFullscreenTarget,
3578
+ createPopInstance = _useFloating.createPopInstance,
3579
+ getFullscreenRoot = _useFloating.getFullscreenRoot,
3580
+ stopHide = _useFloating.stopHide;
3581
+ var resetPopover = function resetPopover() {
3582
+ cleanup === null || cleanup === void 0 ? void 0 : cleanup();
3583
+ createPopInstance();
3584
+ };
3585
+ var showFn = function showFn() {
3586
+ showPopover();
3587
+ };
3588
+ var hideFn = function hideFn() {
3589
+ hidePopover();
3590
+ };
3591
+ var initPopInstance = function initPopInstance() {
3592
+ createPopInstance();
3593
+ if (props.always) {
3594
+ showPopover();
3595
+ } else {
3596
+ addEventToPopTargetEl();
3597
+ }
3598
+ };
3599
+ var addEventToPopTargetEl = function addEventToPopTargetEl() {
3600
+ var _resolvePopElements = resolvePopElements(),
3601
+ elReference = _resolvePopElements.elReference,
3602
+ elContent = _resolvePopElements.elContent;
3603
+ storeEvents = resolveTriggerEvents();
3604
+ if (Array.isArray(storeEvents)) {
3605
+ addEventToTargetEl(elReference, storeEvents);
3606
+ } else {
3607
+ var _storeEvents = storeEvents,
3608
+ content = _storeEvents.content,
3609
+ reference = _storeEvents.reference;
3610
+ addEventToTargetEl(elReference, reference);
3611
+ addEventToTargetEl(elContent, content);
3612
+ }
3613
+ };
3614
+ var addEventToTargetEl = function addEventToTargetEl(target, evets) {
3615
+ evets.forEach(function (_ref2) {
3616
+ var _ref3 = _slicedToArray(_ref2, 2),
3617
+ event = _ref3[0],
3618
+ listener = _ref3[1];
3619
+ if (event && typeof listener === 'function') {
3620
+ target.addEventListener(event, listener);
3621
+ }
3622
+ });
3623
+ };
3624
+ var removeEventListener = function removeEventListener() {
3625
+ if (storeEvents === null || storeEvents === void 0 ? void 0 : storeEvents.length) {
3626
+ var _resolvePopElements2 = resolvePopElements(),
3627
+ elReference = _resolvePopElements2.elReference;
3628
+ if (elReference) {
3629
+ storeEvents.forEach(function (_ref4) {
3630
+ var _ref5 = _slicedToArray(_ref4, 2),
3631
+ event = _ref5[0],
3632
+ listener = _ref5[1];
3633
+ if (event && typeof listener === 'function') {
3634
+ elReference.removeEventListener(event, listener);
3635
+ }
3636
+ });
3637
+ }
3638
+ storeEvents = null;
3639
+ }
3640
+ };
3641
+ var updateBoundary = function updateBoundary() {
3642
+ var _resolvePopElements3 = resolvePopElements(),
3643
+ elReference = _resolvePopElements3.elReference,
3644
+ root = _resolvePopElements3.root;
3645
+ if (isFullscreen.value) {
3646
+ boundary.value = fullScreenTarget === null || fullScreenTarget === void 0 ? void 0 : fullScreenTarget.value;
3647
+ return;
3648
+ }
3649
+ boundary.value = getPrefixId(root || elReference);
3650
+ };
3651
+ var _usePopperId = use_popper_id(props, '#'),
3652
+ getPrefixId = _usePopperId.getPrefixId;
3653
+ var setFullscreenTag = function setFullscreenTag() {
3654
+ var _a;
3655
+ (_a = fullScreenTarget === null || fullScreenTarget === void 0 ? void 0 : fullScreenTarget.value) === null || _a === void 0 ? void 0 : _a.setAttribute('data-fllsrn-id', fullscreenReferId);
3656
+ };
3657
+ var clearFullscreenTag = function clearFullscreenTag() {
3658
+ var _a, _b;
3659
+ var query = "[data-fllsrn-id=".concat(fullscreenReferId, "]");
3660
+ ((_b = (_a = fullScreenTarget === null || fullScreenTarget === void 0 ? void 0 : fullScreenTarget.value) === null || _a === void 0 ? void 0 : _a.querySelectorAll(query)) !== null && _b !== void 0 ? _b : []).forEach(function (element) {
3661
+ element === null || element === void 0 ? void 0 : element.removeAttribute('data-fllsrn-id');
3662
+ });
3663
+ };
3664
+ var boundary = (0,external_vue_.ref)();
3665
+ var beforeInstanceUnmount = function beforeInstanceUnmount() {
3666
+ removeEventListener();
3667
+ };
3668
+ var updateFullscreen = function updateFullscreen(target) {
3669
+ fullScreenTarget.value = target;
3670
+ updateFullscreenTarget(target);
3671
+ isFullscreen.value = isElementFullScreen();
3672
+ setFullscreenTag();
3673
+ };
3674
+ var handleFullscreenChange = function handleFullscreenChange(e) {
3675
+ if (!document.fullscreenElement) {
3676
+ clearFullscreenTag();
3677
+ }
3678
+ updateFullscreen(e.target);
3679
+ updateBoundary();
3680
+ updatePopover(null, props);
3681
+ };
3682
+ var onMountedFn = function onMountedFn() {
3683
+ if (props.disabled) {
3684
+ return;
3685
+ }
3686
+ initPopInstance();
3687
+ if (isElementFullScreen()) {
3688
+ var query = "[data-fllsrn-id=".concat(fullscreenReferId, "]");
3689
+ var target = getFullscreenRoot(query);
3690
+ updateFullscreen(target);
3691
+ }
3692
+ updateBoundary();
3693
+ document.body.addEventListener('fullscreenchange', handleFullscreenChange);
3694
+ };
3695
+ var onUnmountedFn = function onUnmountedFn() {
3696
+ beforeInstanceUnmount();
3697
+ document.body.removeEventListener('fullscreenchange', handleFullscreenChange);
3698
+ };
3699
+ var handleClickOutside = function handleClickOutside(_e) {
3700
+ ctx.emit(EMIT_EVENTS.CLICK_OUTSIDE, {
3701
+ isShow: localIsShow.value,
3702
+ event: _e
3703
+ });
3704
+ var needExec = props.disableOutsideClick || props.always || props.disabled || props.trigger === 'manual';
3705
+ if (!props.forceClickoutside && needExec) {
3706
+ return;
3707
+ }
3708
+ if (localIsShow.value) {
3709
+ hideFn();
3710
+ }
3711
+ };
3712
+ return {
3713
+ onMountedFn: onMountedFn,
3714
+ onUnmountedFn: onUnmountedFn,
3715
+ handleClickOutside: handleClickOutside,
3716
+ beforeInstanceUnmount: beforeInstanceUnmount,
3717
+ updateBoundary: updateBoundary,
3718
+ initPopInstance: initPopInstance,
3719
+ updatePopover: updatePopover,
3720
+ resetPopover: resetPopover,
3721
+ showPopover: showPopover,
3722
+ hidePopover: hidePopover,
3723
+ showFn: showFn,
3724
+ hideFn: hideFn,
3725
+ stopHide: stopHide,
3726
+ isFullscreen: isFullscreen,
3727
+ boundary: boundary,
3728
+ localIsShow: localIsShow
3729
+ };
3730
+ });
3731
+ ;// CONCATENATED MODULE: ../../packages/popover/src/popover.tsx
3732
+
3733
+ /*
3734
+ * Tencent is pleased to support the open source community by making
3735
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
3736
+ *
3737
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
3738
+ *
3739
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
3740
+ *
3741
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
3742
+ *
3743
+ * ---------------------------------------------------
3744
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
3745
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
3746
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
3747
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3748
+ *
3749
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
3750
+ * the Software.
3751
+ *
3752
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
3753
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
3754
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
3755
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
3756
+ * IN THE SOFTWARE.
3757
+ */
3758
+
3759
+
3760
+
3761
+
3762
+
3763
+
3764
+
3765
+
3766
+
3767
+
3768
+
3769
+ function _isSlot(s) {
3770
+ return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0,external_vue_.isVNode)(s);
3771
+ }
3772
+ /* harmony default export */ const popover = ((0,external_vue_.defineComponent)({
3773
+ name: 'Popover',
3774
+ components: {
3775
+ Content: content,
3776
+ Arrow: src_arrow,
3777
+ Root: root
3778
+ },
3779
+ directives: {
3780
+ clickoutside: clickoutside
3781
+ },
3782
+ props: PopoverProps,
3783
+ emits: EMIT_EVENT_TYPES,
3784
+ setup: function setup(props, ctx) {
3785
+ var _toRefs = (0,external_vue_.toRefs)(props),
3786
+ reference = _toRefs.reference;
3787
+ var refDefaultReference = (0,external_vue_.ref)();
3788
+ var refContent = (0,external_vue_.ref)();
3789
+ var refArrow = (0,external_vue_.ref)();
3790
+ var refRoot = (0,external_vue_.ref)();
3791
+ var refReference = (0,external_vue_.computed)(function () {
3792
+ return reference.value || refDefaultReference.value;
3793
+ });
3794
+ var _usePopoverInit = use_popover_init(props, ctx, {
3795
+ refReference: refReference,
3796
+ refContent: refContent,
3797
+ refArrow: refArrow,
3798
+ refRoot: refRoot
3799
+ }),
3800
+ onMountedFn = _usePopoverInit.onMountedFn,
3801
+ onUnmountedFn = _usePopoverInit.onUnmountedFn,
3802
+ handleClickOutside = _usePopoverInit.handleClickOutside,
3803
+ beforeInstanceUnmount = _usePopoverInit.beforeInstanceUnmount,
3804
+ updateBoundary = _usePopoverInit.updateBoundary,
3805
+ initPopInstance = _usePopoverInit.initPopInstance,
3806
+ showFn = _usePopoverInit.showFn,
3807
+ hideFn = _usePopoverInit.hideFn,
3808
+ showPopover = _usePopoverInit.showPopover,
3809
+ hidePopover = _usePopoverInit.hidePopover,
3810
+ updatePopover = _usePopoverInit.updatePopover,
3811
+ resetPopover = _usePopoverInit.resetPopover,
3812
+ stopHide = _usePopoverInit.stopHide,
3813
+ localIsShow = _usePopoverInit.localIsShow,
3814
+ boundary = _usePopoverInit.boundary;
3815
+ if (!props.always && !props.disabled) {
3816
+ (0,external_vue_.watch)(function () {
3817
+ return props.isShow;
3818
+ }, function () {
3819
+ props.isShow ? showPopover() : hidePopover();
3820
+ }, {
3821
+ immediate: true
3822
+ });
3823
+ }
3824
+ (0,external_vue_.watch)(function () {
3825
+ return [props.disabled];
3826
+ }, function (val) {
3827
+ if (val[0]) {
3828
+ beforeInstanceUnmount();
3829
+ } else {
3830
+ initPopInstance();
3831
+ }
3832
+ });
3833
+ updateBoundary();
3834
+ (0,external_vue_.onMounted)(onMountedFn);
3835
+ (0,external_vue_.onBeforeUnmount)(onUnmountedFn);
3836
+ var transBoundary = (0,external_vue_.computed)(function () {
3837
+ return !props.disableTeleport;
3838
+ });
3839
+ var show = function show() {
3840
+ showFn();
3841
+ };
3842
+ var hide = function hide() {
3843
+ hideFn();
3844
+ };
3845
+ var contentIsShow = (0,external_vue_.computed)(function () {
3846
+ if (props.renderType === external_shared_.RenderType.AUTO) {
3847
+ return true;
3848
+ }
3849
+ return localIsShow.value;
3850
+ });
3851
+ var renderContent = function renderContent() {
3852
+ if (props.allowHtml) {
3853
+ var _contentAsHTMLElement = contentAsHTMLElement(props.content),
3854
+ vNode = _contentAsHTMLElement.vNode;
3855
+ return vNode;
3856
+ }
3857
+ return props.content;
3858
+ };
3859
+ return {
3860
+ boundary: boundary,
3861
+ arrow: props.arrow,
3862
+ refDefaultReference: refDefaultReference,
3863
+ refContent: refContent,
3864
+ refArrow: refArrow,
3865
+ content: props.content,
3866
+ theme: props.theme,
3867
+ transBoundary: transBoundary,
3868
+ handleClickOutside: handleClickOutside,
3869
+ updatePopover: updatePopover,
3870
+ resetPopover: resetPopover,
3871
+ hide: hide,
3872
+ show: show,
3873
+ stopHide: stopHide,
3874
+ contentIsShow: contentIsShow,
3875
+ renderContent: renderContent,
3876
+ localIsShow: localIsShow
3877
+ };
3878
+ },
3879
+ render: function render() {
3880
+ var _this = this;
3881
+ var _slot;
3882
+ var _a, _b, _c, _d, _e, _f;
3883
+ var renderReferSlot = function renderReferSlot(slot) {
3884
+ var _a;
3885
+ if (external_vue_.Text === ((_a = slot === null || slot === void 0 ? void 0 : slot[0]) === null || _a === void 0 ? void 0 : _a.type)) {
3886
+ return (0,external_vue_.createVNode)("span", null, [slot]);
3887
+ }
3888
+ return slot;
3889
+ };
3890
+ return (0,external_vue_.createVNode)(root, {
3891
+ "ref": "refRoot"
3892
+ }, {
3893
+ "default": function _default() {
3894
+ return [(0,external_vue_.createVNode)(reference, {
3895
+ "ref": "refDefaultReference"
3896
+ }, _isSlot(_slot = renderReferSlot((_c = (_b = (_a = _this.$slots)["default"]) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : (0,external_vue_.createVNode)("span", null, null))) ? _slot : {
3897
+ "default": function _default() {
3898
+ return [_slot];
3899
+ }
3900
+ }), (0,external_vue_.createVNode)(external_vue_.Teleport, {
3901
+ "to": _this.boundary,
3902
+ "disabled": !_this.transBoundary
3903
+ }, {
3904
+ "default": function _default() {
3905
+ return [(0,external_vue_.withDirectives)((0,external_vue_.createVNode)(content, {
3906
+ "ref": "refContent",
3907
+ "visible": _this.localIsShow,
3908
+ "data-theme": _this.theme,
3909
+ "extCls": _this.extCls,
3910
+ "width": _this.width,
3911
+ "height": _this.height,
3912
+ "maxWidth": _this.maxWidth,
3913
+ "maxHeight": _this.maxHeight,
3914
+ "eventDelay": _this.componentEventDelay
3915
+ }, {
3916
+ "default": function _default() {
3917
+ return [_this.contentIsShow ? (_f = (_e = (_d = _this.$slots).content) === null || _e === void 0 ? void 0 : _e.call(_d)) !== null && _f !== void 0 ? _f : _this.renderContent() : ''];
3918
+ },
3919
+ arrow: function arrow() {
3920
+ var _a, _b;
3921
+ return _this.arrow ? (0,external_vue_.createVNode)(src_arrow, {
3922
+ "ref": "refArrow"
3923
+ }, {
3924
+ "default": function _default() {
3925
+ return [(_b = (_a = _this.$slots).arrow) === null || _b === void 0 ? void 0 : _b.call(_a)];
3926
+ }
3927
+ }) : '';
3928
+ }
3929
+ }), [[(0,external_vue_.resolveDirective)("clickoutside"), _this.handleClickOutside]])];
3930
+ }
3931
+ })];
3932
+ }
3933
+ });
3934
+ }
3935
+ }));
3936
+ ;// CONCATENATED MODULE: ../../packages/popover/src/plugin-popover.tsx
3937
+
3938
+
3939
+ /*
3940
+ * Tencent is pleased to support the open source community by making
3941
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
3942
+ *
3943
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
3944
+ *
3945
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
3946
+ *
3947
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
3948
+ *
3949
+ * ---------------------------------------------------
3950
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
3951
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
3952
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
3953
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3954
+ *
3955
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
3956
+ * the Software.
3957
+ *
3958
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
3959
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
3960
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
3961
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
3962
+ * IN THE SOFTWARE.
3963
+ */
3964
+
3965
+
3966
+
3967
+
3968
+ function createPopoverComponent(options) {
3969
+ var $PopoverInstance = null;
3970
+ var $PopoverInstanceVm = null;
3971
+ var $PopoverInstanceEl = null;
3972
+ var resolvedOptions = Object.assign(Object.assign({
3973
+ boundary: 'body',
3974
+ placement: 'top',
3975
+ autoVisibility: true,
3976
+ isShow: false,
3977
+ trigger: 'manual'
3978
+ }, options), {
3979
+ allowHtml: true
3980
+ });
3981
+ var popoverComponent = {
3982
+ name: '$popover',
3983
+ setup: function setup(_, _ref) {
3984
+ var expose = _ref.expose;
3985
+ var formatOptions = function formatOptions() {
3986
+ return Object.keys(PopoverProps).reduce(function (result, key) {
3987
+ if (Object.prototype.hasOwnProperty.call(resolvedOptions, key)) {
3988
+ Object.assign(result, _defineProperty({}, key, resolvedOptions[key]));
3989
+ }
3990
+ return result;
3991
+ }, {
3992
+ target: resolvedOptions.target
3993
+ });
3994
+ };
3995
+ var refProps = (0,external_vue_.reactive)(formatOptions());
3996
+ var refReference = (0,external_vue_.ref)();
3997
+ var show = function show() {
3998
+ var _a, _b;
3999
+ (_b = (_a = refReference.value) === null || _a === void 0 ? void 0 : _a.show) === null || _b === void 0 ? void 0 : _b.call(_a);
4000
+ };
4001
+ var hide = function hide() {
4002
+ var _a, _b;
4003
+ (_b = (_a = refReference.value) === null || _a === void 0 ? void 0 : _a.hide) === null || _b === void 0 ? void 0 : _b.call(_a);
4004
+ };
4005
+ var stopHide = function stopHide() {
4006
+ var _a, _b;
4007
+ (_b = (_a = refReference.value) === null || _a === void 0 ? void 0 : _a.stopHide) === null || _b === void 0 ? void 0 : _b.call(_a);
4008
+ };
4009
+ var updateTarget = function updateTarget(target) {
4010
+ var _a, _b;
4011
+ refProps.target = target;
4012
+ (_b = (_a = refReference.value) === null || _a === void 0 ? void 0 : _a.resetPopover) === null || _b === void 0 ? void 0 : _b.call(_a);
4013
+ };
4014
+ var handleContentMouseenter = function handleContentMouseenter() {
4015
+ var _a;
4016
+ (_a = resolvedOptions.onContentMouseenter) === null || _a === void 0 ? void 0 : _a.call(resolvedOptions);
4017
+ };
4018
+ var handleContentMouseleave = function handleContentMouseleave() {
4019
+ var _a;
4020
+ (_a = resolvedOptions.onContentMouseleave) === null || _a === void 0 ? void 0 : _a.call(resolvedOptions);
4021
+ };
4022
+ expose({
4023
+ show: show,
4024
+ hide: hide,
4025
+ updateTarget: updateTarget,
4026
+ stopHide: stopHide
4027
+ });
4028
+ return function () {
4029
+ return (0,external_vue_.createVNode)(popover, (0,external_vue_.mergeProps)(refProps, {
4030
+ "ref": refReference,
4031
+ "onContentMouseenter": handleContentMouseenter,
4032
+ "onContentMouseleave": handleContentMouseleave
4033
+ }), null);
4034
+ };
4035
+ }
4036
+ };
4037
+ function getBoundaryDom(boundary) {
4038
+ if (/^body$/i.test(boundary)) {
4039
+ return document.body;
4040
+ }
4041
+ if (/^parent$/i.test(boundary)) {
4042
+ if (utils_isElement(resolvedOptions.target)) {
4043
+ return resolvedOptions.target.parentNode;
4044
+ }
4045
+ return resolvedOptions.target.target.parentNode;
4046
+ }
4047
+ if (typeof boundary === 'string' && isAvailableId(boundary)) {
4048
+ return document.querySelector(boundary);
4049
+ }
4050
+ return document.body;
4051
+ }
4052
+ if ($PopoverInstance === null) {
4053
+ $PopoverInstanceEl = document.createElement('div');
4054
+ getBoundaryDom(resolvedOptions.boundary).append($PopoverInstanceEl);
4055
+ $PopoverInstance = (0,external_vue_.createApp)(popoverComponent);
4056
+ $PopoverInstanceVm = $PopoverInstance.mount($PopoverInstanceEl);
4057
+ }
4058
+ function close() {
4059
+ if ($PopoverInstance) {
4060
+ $PopoverInstance.unmount();
4061
+ $PopoverInstanceVm = null;
4062
+ $PopoverInstance = null;
4063
+ $PopoverInstanceEl.remove();
4064
+ }
4065
+ }
4066
+ ;
4067
+ function show() {
4068
+ $PopoverInstanceVm === null || $PopoverInstanceVm === void 0 ? void 0 : $PopoverInstanceVm.show();
4069
+ }
4070
+ function update(e) {
4071
+ $PopoverInstanceVm === null || $PopoverInstanceVm === void 0 ? void 0 : $PopoverInstanceVm.updateTarget(e);
4072
+ }
4073
+ ;
4074
+ function hide() {
4075
+ $PopoverInstanceVm === null || $PopoverInstanceVm === void 0 ? void 0 : $PopoverInstanceVm.hide();
4076
+ }
4077
+ return {
4078
+ close: close,
4079
+ show: show,
4080
+ hide: hide,
4081
+ update: update,
4082
+ get vm() {
4083
+ return $PopoverInstanceVm;
4084
+ },
4085
+ get $el() {
4086
+ return $PopoverInstanceVm.$el;
4087
+ }
4088
+ };
4089
+ }
4090
+ ;// CONCATENATED MODULE: ../../packages/popover/src/index.ts
4091
+ /**
4092
+ * Tencent is pleased to support the open source community by making
4093
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
4094
+ *
4095
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
4096
+ *
4097
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
4098
+ *
4099
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
4100
+ *
4101
+ * ---------------------------------------------------
4102
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
4103
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
4104
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
4105
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4106
+ *
4107
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
4108
+ * the Software.
4109
+ *
4110
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
4111
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
4112
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
4113
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
4114
+ * IN THE SOFTWARE.
4115
+ */
4116
+
4117
+
4118
+ var BkPopover = (0,external_shared_.withInstall)(popover);
4119
+ /* harmony default export */ const src = (BkPopover);
4120
+
4121
+
4122
+ })();
4123
+
4124
+ /******/ return __webpack_exports__;
4125
+ /******/ })()
4126
+ ;
4127
+ });