bkui-vue 0.0.2-beta.82 → 0.0.2-beta.84

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