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