bkui-vue 0.0.1-beta.387 → 0.0.1-beta.389

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 (150) hide show
  1. package/dist/index.cjs.js +22 -22
  2. package/dist/index.esm.js +1 -0
  3. package/dist/index.umd.js +23 -23
  4. package/lib/affix/index.js +353 -1
  5. package/lib/alert/index.js +251 -1
  6. package/lib/animate-number/index.js +226 -1
  7. package/lib/backtop/index.js +260 -1
  8. package/lib/badge/index.js +274 -1
  9. package/lib/breadcrumb/index.js +329 -1
  10. package/lib/button/index.js +371 -1
  11. package/lib/card/index.js +326 -1
  12. package/lib/cascader/index.js +2168 -1
  13. package/lib/checkbox/index.js +571 -1
  14. package/lib/code-diff/index.js +5520 -1
  15. package/lib/collapse/index.js +698 -1
  16. package/lib/color-picker/index.js +2816 -1
  17. package/lib/components.js +759 -1
  18. package/lib/container/index.js +369 -1
  19. package/lib/date-picker/index.js +5601 -1
  20. package/lib/dialog/index.js +545 -1
  21. package/lib/directives/index.js +1428 -2
  22. package/lib/dist.index.js +166 -1
  23. package/lib/divider/index.js +512 -1
  24. package/lib/dropdown/index.js +414 -1
  25. package/lib/exception/index.js +405 -1
  26. package/lib/fixed-navbar/index.js +214 -1
  27. package/lib/form/index.js +986 -1
  28. package/lib/icon/angle-double-down-line.js +426 -1
  29. package/lib/icon/angle-double-left-line.js +426 -1
  30. package/lib/icon/angle-double-left.js +426 -1
  31. package/lib/icon/angle-double-right-line.js +426 -1
  32. package/lib/icon/angle-double-right.js +426 -1
  33. package/lib/icon/angle-double-up-line.js +426 -1
  34. package/lib/icon/angle-down-fill.js +426 -1
  35. package/lib/icon/angle-down-line.js +426 -1
  36. package/lib/icon/angle-down.js +426 -1
  37. package/lib/icon/angle-left.js +426 -1
  38. package/lib/icon/angle-right.js +426 -1
  39. package/lib/icon/angle-up-fill.js +426 -1
  40. package/lib/icon/angle-up.js +426 -1
  41. package/lib/icon/archive-fill.js +426 -1
  42. package/lib/icon/arrows-left.js +426 -1
  43. package/lib/icon/arrows-right.js +426 -1
  44. package/lib/icon/audio-fill.js +426 -1
  45. package/lib/icon/bk.js +426 -1
  46. package/lib/icon/circle.js +426 -1
  47. package/lib/icon/close-line.js +426 -1
  48. package/lib/icon/close.js +426 -1
  49. package/lib/icon/code.js +426 -1
  50. package/lib/icon/cog-shape.js +426 -1
  51. package/lib/icon/collapse-left.js +426 -1
  52. package/lib/icon/copy.js +426 -1
  53. package/lib/icon/data-shape.js +426 -1
  54. package/lib/icon/del.js +426 -1
  55. package/lib/icon/doc-fill.js +426 -1
  56. package/lib/icon/done.js +426 -1
  57. package/lib/icon/down-shape.js +426 -1
  58. package/lib/icon/down-small.js +426 -1
  59. package/lib/icon/edit-line.js +426 -1
  60. package/lib/icon/ellipsis.js +426 -1
  61. package/lib/icon/enlarge-line.js +426 -1
  62. package/lib/icon/error.js +426 -1
  63. package/lib/icon/excel-fill.js +426 -1
  64. package/lib/icon/exclamation-circle-shape.js +426 -1
  65. package/lib/icon/eye.js +426 -1
  66. package/lib/icon/filliscreen-line.js +426 -1
  67. package/lib/icon/folder-open.js +426 -1
  68. package/lib/icon/folder-shape-open.js +426 -1
  69. package/lib/icon/folder-shape.js +426 -1
  70. package/lib/icon/folder.js +426 -1
  71. package/lib/icon/funnel.js +426 -1
  72. package/lib/icon/help-document-fill.js +426 -1
  73. package/lib/icon/help-fill.js +426 -1
  74. package/lib/icon/help.js +426 -1
  75. package/lib/icon/image-fill.js +426 -1
  76. package/lib/icon/img-placehoulder.js +448 -1
  77. package/lib/icon/index.js +2275 -1
  78. package/lib/icon/info-line.js +448 -1
  79. package/lib/icon/info.js +448 -1
  80. package/lib/icon/left-shape.js +448 -1
  81. package/lib/icon/left-turn-line.js +448 -1
  82. package/lib/icon/narrow-line.js +448 -1
  83. package/lib/icon/original.js +448 -1
  84. package/lib/icon/pdf-fill.js +448 -1
  85. package/lib/icon/play-shape.js +448 -1
  86. package/lib/icon/plus.js +448 -1
  87. package/lib/icon/ppt-fill.js +448 -1
  88. package/lib/icon/qq.js +448 -1
  89. package/lib/icon/right-shape.js +448 -1
  90. package/lib/icon/right-turn-line.js +448 -1
  91. package/lib/icon/search.js +448 -1
  92. package/lib/icon/share.js +448 -1
  93. package/lib/icon/spinner.js +448 -1
  94. package/lib/icon/success.js +448 -1
  95. package/lib/icon/switcher-loading.js +448 -1
  96. package/lib/icon/text-file.js +448 -1
  97. package/lib/icon/text-fill.js +448 -1
  98. package/lib/icon/transfer.js +448 -1
  99. package/lib/icon/tree-application-shape.js +448 -1
  100. package/lib/icon/unfull-screen.js +448 -1
  101. package/lib/icon/unvisible.js +448 -1
  102. package/lib/icon/up-shape.js +448 -1
  103. package/lib/icon/upload.js +448 -1
  104. package/lib/icon/video-fill.js +448 -1
  105. package/lib/icon/warn.js +448 -1
  106. package/lib/icon/weixin.js +448 -1
  107. package/lib/image/index.js +873 -1
  108. package/lib/index.js +169 -1
  109. package/lib/info-box/index.js +1784 -1
  110. package/lib/input/index.js +846 -1
  111. package/lib/link/index.js +226 -1
  112. package/lib/loading/index.js +309 -1
  113. package/lib/menu/index.js +796 -1
  114. package/lib/message/index.js +401 -1
  115. package/lib/modal/index.js +395 -1
  116. package/lib/navigation/index.js +431 -1
  117. package/lib/notify/index.js +430 -1
  118. package/lib/overflow-title/index.js +512 -1
  119. package/lib/pagination/index.js +1026 -1
  120. package/lib/plugin-popover/index.js +2448 -1
  121. package/lib/plugins/index.js +130 -1
  122. package/lib/popover/index.js +2454 -1
  123. package/lib/popover2/index.js +172 -1
  124. package/lib/preset.js +129 -1
  125. package/lib/process/index.js +1417 -1
  126. package/lib/progress/index.js +479 -1
  127. package/lib/radio/index.js +649 -1
  128. package/lib/rate/index.js +358 -1
  129. package/lib/resize-layout/index.js +495 -1
  130. package/lib/search-select/index.js +3388 -1
  131. package/lib/select/index.js +2819 -1
  132. package/lib/shared/index.js +2813 -1
  133. package/lib/sideslider/index.js +1362 -1
  134. package/lib/slider/index.js +2060 -1
  135. package/lib/steps/index.js +1504 -1
  136. package/lib/swiper/index.js +374 -1
  137. package/lib/switcher/index.js +308 -1
  138. package/lib/tab/index.js +919 -1
  139. package/lib/table/index.js +6635 -1
  140. package/lib/table-column/index.js +737 -1
  141. package/lib/tag/index.js +278 -1
  142. package/lib/tag-input/index.js +1897 -1
  143. package/lib/time-picker/index.js +142 -1
  144. package/lib/timeline/index.js +315 -1
  145. package/lib/transfer/index.js +658 -1
  146. package/lib/tree/index.js +2917 -1
  147. package/lib/upload/index.js +3735 -1
  148. package/lib/virtual-render/index.js +825 -1
  149. package/package.json +1 -3
  150. package/lib/directives/index.js.LICENSE.txt +0 -14
@@ -1 +1,2060 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("../input"),require("../popover"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../input","../popover"],t);else{var a="object"==typeof exports?t(require("../shared"),require("vue"),require("../input"),require("../popover")):t(e["../shared"],e.vue,e["../input"],e["../popover"]);for(var r in a)("object"==typeof exports?exports:e)[r]=a[r]}}(self,((e,t,a,r)=>(()=>{var n={7162:(e,t,a)=>{e.exports=a(5047)},5047:e=>{var t=function(e){"use strict";var t,a=Object.prototype,r=a.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",u=n.asyncIterator||"@@asyncIterator",l=n.toStringTag||"@@toStringTag";function i(e,t,a){return Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{i({},"")}catch(e){i=function(e,t,a){return e[t]=a}}function c(e,t,a,r){var n=t&&t.prototype instanceof h?t:h,o=Object.create(n.prototype),u=new T(r||[]);return o._invoke=function(e,t,a){var r=v;return function(n,o){if(r===d)throw new Error("Generator is already running");if(r===f){if("throw"===n)throw o;return B()}for(a.method=n,a.arg=o;;){var u=a.delegate;if(u){var l=k(u,a);if(l){if(l===p)continue;return l}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(r===v)throw r=f,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);r=d;var i=s(e,t,a);if("normal"===i.type){if(r=a.done?f:m,i.arg===p)continue;return{value:i.arg,done:a.done}}"throw"===i.type&&(r=f,a.method="throw",a.arg=i.arg)}}}(e,a,u),o}function s(e,t,a){try{return{type:"normal",arg:e.call(t,a)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var v="suspendedStart",m="suspendedYield",d="executing",f="completed",p={};function h(){}function V(){}function y(){}var b={};i(b,o,(function(){return this}));var g=Object.getPrototypeOf,w=g&&g(g(j([])));w&&w!==a&&r.call(w,o)&&(b=w);var x=y.prototype=h.prototype=Object.create(b);function L(e){["next","throw","return"].forEach((function(t){i(e,t,(function(e){return this._invoke(t,e)}))}))}function N(e,t){function a(n,o,u,l){var i=s(e[n],e,o);if("throw"!==i.type){var c=i.arg,v=c.value;return v&&"object"==typeof v&&r.call(v,"__await")?t.resolve(v.__await).then((function(e){a("next",e,u,l)}),(function(e){a("throw",e,u,l)})):t.resolve(v).then((function(e){c.value=e,u(c)}),(function(e){return a("throw",e,u,l)}))}l(i.arg)}var n;this._invoke=function(e,r){function o(){return new t((function(t,n){a(e,r,t,n)}))}return n=n?n.then(o,o):o()}}function k(e,a){var r=e.iterator[a.method];if(r===t){if(a.delegate=null,"throw"===a.method){if(e.iterator.return&&(a.method="return",a.arg=t,k(e,a),"throw"===a.method))return p;a.method="throw",a.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=s(r,e.iterator,a.arg);if("throw"===n.type)return a.method="throw",a.arg=n.arg,a.delegate=null,p;var o=n.arg;return o?o.done?(a[e.resultName]=o.value,a.next=e.nextLoc,"return"!==a.method&&(a.method="next",a.arg=t),a.delegate=null,p):o:(a.method="throw",a.arg=new TypeError("iterator result is not an object"),a.delegate=null,p)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function j(e){if(e){var a=e[o];if(a)return a.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,u=function a(){for(;++n<e.length;)if(r.call(e,n))return a.value=e[n],a.done=!1,a;return a.value=t,a.done=!0,a};return u.next=u}}return{next:B}}function B(){return{value:t,done:!0}}return V.prototype=y,i(x,"constructor",y),i(y,"constructor",V),V.displayName=i(y,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===V||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,i(e,l,"GeneratorFunction")),e.prototype=Object.create(x),e},e.awrap=function(e){return{__await:e}},L(N.prototype),i(N.prototype,u,(function(){return this})),e.AsyncIterator=N,e.async=function(t,a,r,n,o){void 0===o&&(o=Promise);var u=new N(c(t,a,r,n),o);return e.isGeneratorFunction(a)?u:u.next().then((function(e){return e.done?e.value:u.next()}))},L(x),i(x,l,"Generator"),i(x,o,(function(){return this})),i(x,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var a in e)t.push(a);return t.reverse(),function a(){for(;t.length;){var r=t.pop();if(r in e)return a.value=r,a.done=!1,a}return a.done=!0,a}},e.values=j,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var a in this)"t"===a.charAt(0)&&r.call(this,a)&&!isNaN(+a.slice(1))&&(this[a]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var a=this;function n(r,n){return l.type="throw",l.arg=e,a.next=r,n&&(a.method="next",a.arg=t),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var u=this.tryEntries[o],l=u.completion;if("root"===u.tryLoc)return n("end");if(u.tryLoc<=this.prev){var i=r.call(u,"catchLoc"),c=r.call(u,"finallyLoc");if(i&&c){if(this.prev<u.catchLoc)return n(u.catchLoc,!0);if(this.prev<u.finallyLoc)return n(u.finallyLoc)}else if(i){if(this.prev<u.catchLoc)return n(u.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return n(u.finallyLoc)}}}},abrupt:function(e,t){for(var a=this.tryEntries.length-1;a>=0;--a){var n=this.tryEntries[a];if(n.tryLoc<=this.prev&&r.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var u=o?o.completion:{};return u.type=e,u.arg=t,o?(this.method="next",this.next=o.finallyLoc,p):this.complete(u)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var a=this.tryEntries[t];if(a.finallyLoc===e)return this.complete(a.completion,a.afterLoc),C(a),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var a=this.tryEntries[t];if(a.tryLoc===e){var r=a.completion;if("throw"===r.type){var n=r.arg;C(a)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(e,a,r){return this.delegate={iterator:j(e),resultName:a,nextLoc:r},"next"===this.method&&(this.arg=t),p}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},8133:e=>{"use strict";e.exports=a},5537:e=>{"use strict";e.exports=r},4212:t=>{"use strict";t.exports=e},748:e=>{"use strict";e.exports=t}},o={};function u(e){var t=o[e];if(void 0!==t)return t.exports;var a=o[e]={exports:{}};return n[e](a,a.exports,u),a.exports}u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var a in t)u.o(t,a)&&!u.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};return(()=>{"use strict";u.r(l),u.d(l,{default:()=>f});var e=u(4212),t=u(748),a=u(7162),r=u.n(a);Object.create,Object.create;var n=u(8133),o=u.n(n),i=u(5537),c=u.n(i);const s=(0,t.defineComponent)({name:"SliderButton",props:{modelValue:{type:Number,default:0},params:{type:Object,default:function(){return{}}}},emits:["emitChange","resetSize","update:modelValue"],setup:function(a,r){var n=r.emit,o=(0,t.ref)(!1),u=(0,t.ref)(!1),l=(0,t.ref)(0),i=(0,t.ref)(0),s=(0,t.ref)(0),d=(0,t.ref)(null),f=(0,t.ref)(a.modelValue),p=(0,t.ref)(0),h=(0,t.ref)(0),V=(0,t.ref)(!1),y=(0,t.ref)(null),b=(0,t.computed)((function(){var t,r,n="";if(null===(t=a.params.customContent)||void 0===t?void 0:t[a.modelValue]){var o=a.params.customContent[a.modelValue];n=o.tip||o.label||""}var u=a.params.vertical?e.PlacementEnum.RIGHT:e.PlacementEnum.TOP;return(null===(r=a.params)||void 0===r?void 0:r.showTip)?{content:a.params.formatterTipLabel("".concat(n||(null==a?void 0:a.modelValue)||"0")),placement:u}:{content:"",placement:u}})),g=(0,t.computed)((function(){return"".concat((a.modelValue-a.params.minValue)/(a.params.maxValue-a.params.minValue)*100,"%")})),w=(0,t.computed)((function(){return a.params.vertical?{bottom:g.value}:{left:g.value}})),x=(0,t.computed)((function(){return a.params.formatterButtonLabel(a.modelValue)})),L=function(e){a.params.disable||(e.preventDefault(),N(e),v(window,"mousemove",k),v(window,"touchmove",k),v(window,"mouseup",E),v(window,"touchend",E))},N=function(e){o.value=!0,u.value=!0,a.params.vertical?l.value=e.clientY:i.value=e.clientX,s.value=parseFloat(g.value),d.value=s.value},k=function(e){if(o.value){u.value=!1,n("resetSize");var t=0;a.params.vertical?(p.value=e.clientY,t=(l.value-p.value)/a.params.sliderSize*100):(h.value=e.clientX,t=(h.value-i.value)/a.params.sliderSize*100),d.value=s.value+t,C(d.value)}},E=function e(){V.value=!1,o.value&&(setTimeout((function(){o.value=!1,u.value||(C(d.value),n("emitChange"))}),0),m(window,"mousemove",k),m(window,"touchmove",k),m(window,"mouseup",e),m(window,"touchend",e))},C=function(e){if(null!==e&&!isNaN(e)){e<0?d.value=0:e>100&&(d.value=100);var t=100/((a.params.maxValue-a.params.minValue)/a.params.step),r=Math.round(e/t)*t*(a.params.maxValue-a.params.minValue)*.01+a.params.minValue;r=parseFloat(r.toFixed(a.params.precision)),n("update:modelValue",r),o.value||a.modelValue===f.value||(f.value=a.modelValue)}};return{renderDom:function(){return(0,t.createVNode)("div",{class:["bk-slider-button",a.params.vertical?"vertical":"horizontal",{grabbing:o.value}],ref:y,tabindex:"0",style:w.value,onClick:function(e){return e.stopPropagation()},onMousedown:L},[Boolean(b.value.content)?(0,t.createVNode)(c(),{content:b.value.content,theme:"dark",placement:b.value.placement,boundary:document.body},{default:function(){return[(0,t.createVNode)("div",{class:["slider-button",{"slider-button-disable":a.params.disable}]},null)]}}):(0,t.createVNode)("div",{class:["slider-button",{"slider-button-disable":a.params.disable}]},null),a.params.showButtonLabel&&!a.params.showIntervalLabel?(0,t.createVNode)("div",{class:["slider-button-label",a.params.vertical?"vertical":"horizontal"]},[x.value]):void 0])},setPosition:C,tip:b}},render:function(){return this.renderDom()}});var v=function(e,t,a){e&&t&&a&&e.addEventListener(t,a,!1)},m=function(e,t,a){e&&t&&a&&e.removeEventListener(t,a,!1)};const d=(0,t.defineComponent)({name:"Slider",props:{modelValue:e.PropTypes.oneOfType([e.PropTypes.array,e.PropTypes.number]),extCls:{type:String,default:""},vertical:{type:Boolean,default:!1},height:{type:String,default:"200px"},disable:{type:Boolean,default:!1},showTip:{type:Boolean,default:!1},maxValue:{type:[Number],default:100},minValue:{type:[Number],default:0},step:{type:[Number],default:1},range:{type:Boolean,default:!1},showInterval:{type:Boolean,default:!1},showIntervalLabel:{type:Boolean,default:!1},showButtonLabel:{type:Boolean,default:!1},showBetweenLabel:{type:Boolean,default:!1},showInput:{type:Boolean,default:!1},customContent:{type:Object,default:null},formatterLabel:{type:Function,default:function(e){return e}},formatterButtonLabel:{type:Function,default:function(e){return e}},formatterTipLabel:{type:Function,default:function(e){return e}}},emits:["update:modelValue","change"],setup:function(e,a){var n=this,u=a.slots,l=a.emit,i=(0,t.ref)(1),c=(0,t.ref)(null),m=(0,t.ref)(null),d=(0,t.ref)(null),f=(0,t.ref)(0),p=(0,t.ref)(0),h=(0,t.ref)(null),V=(0,t.ref)(null),y=(0,t.ref)(null),b=(0,t.ref)(null),g=(0,t.computed)((function(){var t=[e.minValue,e.maxValue,e.step].map((function(e){var t="".concat(e).split(".")[1];return t?t.length:0}));return Math.max.apply(null,t)})),w=(0,t.computed)((function(){return Math.min(c.value,m.value)})),x=(0,t.computed)((function(){return Math.max(c.value,m.value)})),L=(0,t.computed)((function(){return e.range?"".concat(100*(x.value-w.value)/(e.maxValue-e.minValue),"%"):"".concat(100*(c.value-e.minValue)/(e.maxValue-e.minValue),"%")})),N=(0,t.computed)((function(){return e.range?"".concat(100*(w.value-e.minValue)/(e.maxValue-e.minValue),"%"):"0%"})),k=(0,t.computed)((function(){return e.vertical?{height:L.value,bottom:N.value}:{width:L.value,left:N.value}})),E=(0,t.computed)((function(){if(!e.showInterval||e.minValue>e.maxValue)return[];if(0===e.step)return console.warn("WARNNING:step should not be 0"),[];for(var t=(e.maxValue-e.minValue)/e.step,a=100*e.step/(e.maxValue-e.minValue),r=[],n=1;n<t;n++)r.push(n*a);return e.range?r.filter((function(t){return t<100*(w.value-e.minValue)/(e.maxValue-e.minValue)||t>100*(x.value-e.minValue)/(e.maxValue-e.minValue)})):r.filter((function(t){return t>100*(c.value-e.minValue)/(e.maxValue-e.minValue)}))})),C=(0,t.computed)((function(){return e.vertical?{height:e.height,width:"4px"}:{}})),T=(0,t.computed)((function(){if(!e.showIntervalLabel)return[];if(0===e.step)return console.warn("WARNNING:step should not be 0"),[];for(var t=100*e.step/(e.maxValue-e.minValue),a=[],r=e.minValue,n=0;r<=e.maxValue;r+=e.step,n++){var o={stepWidth:n*t,stepLabel:e.formatterLabel(r)};a.push(o)}return a})),j=(0,t.computed)((function(){return Array.isArray(e.modelValue)})),B=(0,t.computed)((function(){return e.customContent?Object.keys(e.customContent).sort((function(e,t){return Number(e)-Number(t)})).filter((function(t){return Number(t)>=e.minValue&&Number(t)<=e.maxValue})).map((function(t){var a=e.customContent[t].tip,r=e.customContent[t].label;return{tip:a||r||"",label:r||"",percent:(Number(t)-e.minValue)/(e.maxValue-e.minValue)*100}})):[]})),O=(0,t.computed)((function(){return{vertical:e.vertical,showTip:e.showTip,disable:e.disable,maxValue:e.maxValue,minValue:e.minValue,step:e.step,precision:g.value,showButtonLabel:e.showButtonLabel,formatterButtonLabel:e.formatterButtonLabel,showIntervalLabel:e.showIntervalLabel,customContent:e.customContent,sliderSize:i.value,formatterTipLabel:e.formatterTipLabel}}));(0,t.watch)((function(){return e.modelValue}),(function(){_()})),(0,t.watch)((function(){return c.value}),(function(t){e.range?l("update:modelValue",[w.value,x.value]):l("update:modelValue",t),f.value=t})),(0,t.watch)((function(){return m.value}),(function(e){l("update:modelValue",[w.value,x.value]),p.value=e})),(0,t.onMounted)((function(){e.range?(Array.isArray(e.modelValue)?(c.value=Math.max(e.minValue,Number(e.modelValue[0])),m.value=Math.min(e.maxValue,Number(e.modelValue[1]))):(c.value=e.minValue,m.value=e.maxValue),d.value=[c.value,m.value]):("number"!=typeof e.modelValue||isNaN(e.modelValue)?c.value=e.minValue:c.value=Math.min(e.maxValue,Math.max(e.minValue,e.modelValue)),d.value=c.value),P(),v(window,"resize",P())}));var P=function(){h.value&&(i.value=h.value["client".concat(e.vertical?"Height":"Width")])},S=function(t){var a,r;if(t.stopPropagation(),!e.disable){if(P(),e.vertical){var n=null===(a=h.value)||void 0===a?void 0:a.getBoundingClientRect().bottom;F((n-t.clientY)/i.value*100)}else{var o=null===(r=h.value)||void 0===r?void 0:r.getBoundingClientRect().left;F((t.clientX-o)/i.value*100)}M()}},I=function(){return e.range?![w.value,x.value].every((function(e,t){return e===d.value[t]})):e.modelValue!==d.value},_=function(){if(e.minValue>e.maxValue)console.error("min should not be greater than max.");else{var t=e.modelValue;e.range&&Array.isArray(t)?t[1]<e.minValue?l("update:modelValue",[e.minValue,e.minValue]):t[0]>e.maxValue?l("update:modelValue",[e.maxValue,e.maxValue]):t[0]<e.minValue?l("update:modelValue",[e.minValue,t[1]]):t[1]>e.maxValue?l("update:modelValue",[t[0],e.maxValue]):(c.value=Number(t[0]),m.value=Number(t[1]),I()&&(d.value=t.slice())):e.range||"number"!=typeof t||isNaN(t)||(t<e.minValue?l("update:modelValue",e.minValue):t>e.maxValue?l("update:modelValue",e.maxValue):(c.value=t,I()&&(d.value=t)))}},M=function(){return a=n,o=void 0,u=void 0,i=r().mark((function a(){return r().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,t.nextTick)();case 2:l("change",e.range?[w.value,x.value]:e.modelValue);case 3:case"end":return a.stop()}}),a)})),new(u||(u=Promise))((function(e,t){function r(e){try{l(i.next(e))}catch(e){t(e)}}function n(e){try{l(i.throw(e))}catch(e){t(e)}}function l(t){var a;t.done?e(t.value):(a=t.value,a instanceof u?a:new u((function(e){e(a)}))).then(r,n)}l((i=i.apply(a,o||[])).next())}));var a,o,u,i},z=function(t){return e.vertical?{bottom:"".concat(t,"%")}:{left:"".concat(t,"%")}},F=function(t){if(e.range){var a=e.minValue+t*(e.maxValue-e.minValue)/100;Math.abs(w.value-a)<Math.abs(x.value-a)?b.value=c.value<m.value?V.value:y.value:b.value=c.value>m.value?V.value:y.value,b.value.setPosition(t)}else V.value.setPosition(t)},G=function(t){if(""!==t){var a=parseFloat(t);a<e.minValue?(f.value=e.minValue,c.value=e.minValue):a>e.maxValue?(f.value=e.maxValue,c.value=e.maxValue):c.value=a}},A=function(t){if(""!==t&&"number"!=typeof t){var a=parseFloat(t);a<e.minValue?(p.value=e.minValue,m.value=e.minValue):a>e.maxValue?(p.value=e.maxValue,m.value=e.maxValue):m.value=a}},R=function(t){var a;return a="start"===t?e.vertical?e.maxValue:e.minValue:e.vertical?e.minValue:e.maxValue,e.showButtonLabel&&[c.value,m.value].includes(a)?"0":"1"};return{renderDom:function(){var a,r;return(0,t.createVNode)("div",{class:["bk-slider",e.extCls]},[null===(a=u.start)||void 0===a?void 0:a.call(u),(0,t.createVNode)("div",{class:"bk-slider-runway",ref:h,style:C.value,onClick:S},[(0,t.createVNode)("div",{class:["bk-slider-bar",e.vertical?"vertical":"horizontal",{disable:e.disable}],style:k.value},null),e.showInterval?E.value.map((function(a,r){return(0,t.createVNode)("div",{key:r,class:["bk-slider-interval",{vertical:e.vertical}],style:z(a)},null)})):void 0,e.customContent?B.value.map((function(a,r){return(0,t.createVNode)("div",{key:r,class:["bk-slider-interval",{vertical:e.vertical}],style:z(a.percent)},null)})):void 0,e.showBetweenLabel||e.showIntervalLabel||e.customContent?(0,t.createVNode)("div",{class:["bk-slider-labels",e.vertical?"vertical":"horizontal"]},[e.showBetweenLabel?[(0,t.createVNode)("div",{class:"label-start",style:[{opacity:R("start")}]},[e.formatterLabel(e.minValue)]),(0,t.createVNode)("div",{class:"label-end",style:[{opacity:R("end")}]},[e.formatterLabel(e.maxValue)])]:e.showIntervalLabel?T.value.map((function(a,r){return(0,t.createVNode)("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:r,style:z(a.stepWidth)},[a.stepLabel])})):e.customContent?B.value.map((function(a,r){return(0,t.createVNode)("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:r,style:z(a.percent)},[a.label])})):void 0]):void 0,(0,t.createVNode)(s,{modelValue:c.value,"onUpdate:modelValue":function(e){return c.value=e},ref:V,params:O.value,onEmitChange:M,onResetSize:P},null),e.range?(0,t.createVNode)(s,{modelValue:m.value,"onUpdate:modelValue":function(e){return m.value=e},ref:y,params:O.value,onEmitChange:M,onResetSize:P},null):void 0]),e.showInput&&!e.vertical?(0,t.createVNode)("div",{class:"bk-slider-input"},[(0,t.createVNode)("div",{class:"input-item"},[(0,t.createVNode)(o(),{type:"number",modelValue:f.value,max:e.maxValue,min:e.minValue,onChange:G},null)]),j.value&&m.value?[(0,t.createVNode)("div",{class:"input-center"},[(0,t.createTextVNode)("~")]),(0,t.createVNode)("div",{class:"input-item"},[(0,t.createVNode)(o(),{type:"number",modelValue:p.value,max:e.maxValue,min:e.minValue,onChange:A},null)])]:void 0]):void 0,null===(r=u.end)||void 0===r?void 0:r.call(u)])}}},render:function(){return this.renderDom()}}),f=(0,e.withInstall)(d)})(),l})()));
1
+ (function webpackUniversalModuleDefinition(root, factory) {
2
+ if(typeof exports === 'object' && typeof module === 'object')
3
+ module.exports = factory(require("../shared"), require("vue"), require("../input"), require("../popover"));
4
+ else if(typeof define === 'function' && define.amd)
5
+ define(["../shared", "vue", "../input", "../popover"], factory);
6
+ else {
7
+ var a = typeof exports === 'object' ? factory(require("../shared"), require("vue"), require("../input"), require("../popover")) : factory(root["../shared"], root["vue"], root["../input"], root["../popover"]);
8
+ for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
9
+ }
10
+ })(self, (__WEBPACK_EXTERNAL_MODULE__4212__, __WEBPACK_EXTERNAL_MODULE__748__, __WEBPACK_EXTERNAL_MODULE__8133__, __WEBPACK_EXTERNAL_MODULE__5537__) => {
11
+ return /******/ (() => { // webpackBootstrap
12
+ /******/ var __webpack_modules__ = ({
13
+
14
+ /***/ 7162:
15
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
16
+
17
+ module.exports = __webpack_require__(5047);
18
+
19
+
20
+ /***/ }),
21
+
22
+ /***/ 5047:
23
+ /***/ ((module) => {
24
+
25
+ /**
26
+ * Copyright (c) 2014-present, Facebook, Inc.
27
+ *
28
+ * This source code is licensed under the MIT license found in the
29
+ * LICENSE file in the root directory of this source tree.
30
+ */
31
+
32
+ var runtime = (function (exports) {
33
+ "use strict";
34
+
35
+ var Op = Object.prototype;
36
+ var hasOwn = Op.hasOwnProperty;
37
+ var undefined; // More compressible than void 0.
38
+ var $Symbol = typeof Symbol === "function" ? Symbol : {};
39
+ var iteratorSymbol = $Symbol.iterator || "@@iterator";
40
+ var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
41
+ var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
42
+
43
+ function define(obj, key, value) {
44
+ Object.defineProperty(obj, key, {
45
+ value: value,
46
+ enumerable: true,
47
+ configurable: true,
48
+ writable: true
49
+ });
50
+ return obj[key];
51
+ }
52
+ try {
53
+ // IE 8 has a broken Object.defineProperty that only works on DOM objects.
54
+ define({}, "");
55
+ } catch (err) {
56
+ define = function(obj, key, value) {
57
+ return obj[key] = value;
58
+ };
59
+ }
60
+
61
+ function wrap(innerFn, outerFn, self, tryLocsList) {
62
+ // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
63
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
64
+ var generator = Object.create(protoGenerator.prototype);
65
+ var context = new Context(tryLocsList || []);
66
+
67
+ // The ._invoke method unifies the implementations of the .next,
68
+ // .throw, and .return methods.
69
+ generator._invoke = makeInvokeMethod(innerFn, self, context);
70
+
71
+ return generator;
72
+ }
73
+ exports.wrap = wrap;
74
+
75
+ // Try/catch helper to minimize deoptimizations. Returns a completion
76
+ // record like context.tryEntries[i].completion. This interface could
77
+ // have been (and was previously) designed to take a closure to be
78
+ // invoked without arguments, but in all the cases we care about we
79
+ // already have an existing method we want to call, so there's no need
80
+ // to create a new function object. We can even get away with assuming
81
+ // the method takes exactly one argument, since that happens to be true
82
+ // in every case, so we don't have to touch the arguments object. The
83
+ // only additional allocation required is the completion record, which
84
+ // has a stable shape and so hopefully should be cheap to allocate.
85
+ function tryCatch(fn, obj, arg) {
86
+ try {
87
+ return { type: "normal", arg: fn.call(obj, arg) };
88
+ } catch (err) {
89
+ return { type: "throw", arg: err };
90
+ }
91
+ }
92
+
93
+ var GenStateSuspendedStart = "suspendedStart";
94
+ var GenStateSuspendedYield = "suspendedYield";
95
+ var GenStateExecuting = "executing";
96
+ var GenStateCompleted = "completed";
97
+
98
+ // Returning this object from the innerFn has the same effect as
99
+ // breaking out of the dispatch switch statement.
100
+ var ContinueSentinel = {};
101
+
102
+ // Dummy constructor functions that we use as the .constructor and
103
+ // .constructor.prototype properties for functions that return Generator
104
+ // objects. For full spec compliance, you may wish to configure your
105
+ // minifier not to mangle the names of these two functions.
106
+ function Generator() {}
107
+ function GeneratorFunction() {}
108
+ function GeneratorFunctionPrototype() {}
109
+
110
+ // This is a polyfill for %IteratorPrototype% for environments that
111
+ // don't natively support it.
112
+ var IteratorPrototype = {};
113
+ define(IteratorPrototype, iteratorSymbol, function () {
114
+ return this;
115
+ });
116
+
117
+ var getProto = Object.getPrototypeOf;
118
+ var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
119
+ if (NativeIteratorPrototype &&
120
+ NativeIteratorPrototype !== Op &&
121
+ hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
122
+ // This environment has a native %IteratorPrototype%; use it instead
123
+ // of the polyfill.
124
+ IteratorPrototype = NativeIteratorPrototype;
125
+ }
126
+
127
+ var Gp = GeneratorFunctionPrototype.prototype =
128
+ Generator.prototype = Object.create(IteratorPrototype);
129
+ GeneratorFunction.prototype = GeneratorFunctionPrototype;
130
+ define(Gp, "constructor", GeneratorFunctionPrototype);
131
+ define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
132
+ GeneratorFunction.displayName = define(
133
+ GeneratorFunctionPrototype,
134
+ toStringTagSymbol,
135
+ "GeneratorFunction"
136
+ );
137
+
138
+ // Helper for defining the .next, .throw, and .return methods of the
139
+ // Iterator interface in terms of a single ._invoke method.
140
+ function defineIteratorMethods(prototype) {
141
+ ["next", "throw", "return"].forEach(function(method) {
142
+ define(prototype, method, function(arg) {
143
+ return this._invoke(method, arg);
144
+ });
145
+ });
146
+ }
147
+
148
+ exports.isGeneratorFunction = function(genFun) {
149
+ var ctor = typeof genFun === "function" && genFun.constructor;
150
+ return ctor
151
+ ? ctor === GeneratorFunction ||
152
+ // For the native GeneratorFunction constructor, the best we can
153
+ // do is to check its .name property.
154
+ (ctor.displayName || ctor.name) === "GeneratorFunction"
155
+ : false;
156
+ };
157
+
158
+ exports.mark = function(genFun) {
159
+ if (Object.setPrototypeOf) {
160
+ Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
161
+ } else {
162
+ genFun.__proto__ = GeneratorFunctionPrototype;
163
+ define(genFun, toStringTagSymbol, "GeneratorFunction");
164
+ }
165
+ genFun.prototype = Object.create(Gp);
166
+ return genFun;
167
+ };
168
+
169
+ // Within the body of any async function, `await x` is transformed to
170
+ // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
171
+ // `hasOwn.call(value, "__await")` to determine if the yielded value is
172
+ // meant to be awaited.
173
+ exports.awrap = function(arg) {
174
+ return { __await: arg };
175
+ };
176
+
177
+ function AsyncIterator(generator, PromiseImpl) {
178
+ function invoke(method, arg, resolve, reject) {
179
+ var record = tryCatch(generator[method], generator, arg);
180
+ if (record.type === "throw") {
181
+ reject(record.arg);
182
+ } else {
183
+ var result = record.arg;
184
+ var value = result.value;
185
+ if (value &&
186
+ typeof value === "object" &&
187
+ hasOwn.call(value, "__await")) {
188
+ return PromiseImpl.resolve(value.__await).then(function(value) {
189
+ invoke("next", value, resolve, reject);
190
+ }, function(err) {
191
+ invoke("throw", err, resolve, reject);
192
+ });
193
+ }
194
+
195
+ return PromiseImpl.resolve(value).then(function(unwrapped) {
196
+ // When a yielded Promise is resolved, its final value becomes
197
+ // the .value of the Promise<{value,done}> result for the
198
+ // current iteration.
199
+ result.value = unwrapped;
200
+ resolve(result);
201
+ }, function(error) {
202
+ // If a rejected Promise was yielded, throw the rejection back
203
+ // into the async generator function so it can be handled there.
204
+ return invoke("throw", error, resolve, reject);
205
+ });
206
+ }
207
+ }
208
+
209
+ var previousPromise;
210
+
211
+ function enqueue(method, arg) {
212
+ function callInvokeWithMethodAndArg() {
213
+ return new PromiseImpl(function(resolve, reject) {
214
+ invoke(method, arg, resolve, reject);
215
+ });
216
+ }
217
+
218
+ return previousPromise =
219
+ // If enqueue has been called before, then we want to wait until
220
+ // all previous Promises have been resolved before calling invoke,
221
+ // so that results are always delivered in the correct order. If
222
+ // enqueue has not been called before, then it is important to
223
+ // call invoke immediately, without waiting on a callback to fire,
224
+ // so that the async generator function has the opportunity to do
225
+ // any necessary setup in a predictable way. This predictability
226
+ // is why the Promise constructor synchronously invokes its
227
+ // executor callback, and why async functions synchronously
228
+ // execute code before the first await. Since we implement simple
229
+ // async functions in terms of async generators, it is especially
230
+ // important to get this right, even though it requires care.
231
+ previousPromise ? previousPromise.then(
232
+ callInvokeWithMethodAndArg,
233
+ // Avoid propagating failures to Promises returned by later
234
+ // invocations of the iterator.
235
+ callInvokeWithMethodAndArg
236
+ ) : callInvokeWithMethodAndArg();
237
+ }
238
+
239
+ // Define the unified helper method that is used to implement .next,
240
+ // .throw, and .return (see defineIteratorMethods).
241
+ this._invoke = enqueue;
242
+ }
243
+
244
+ defineIteratorMethods(AsyncIterator.prototype);
245
+ define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
246
+ return this;
247
+ });
248
+ exports.AsyncIterator = AsyncIterator;
249
+
250
+ // Note that simple async functions are implemented on top of
251
+ // AsyncIterator objects; they just return a Promise for the value of
252
+ // the final result produced by the iterator.
253
+ exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
254
+ if (PromiseImpl === void 0) PromiseImpl = Promise;
255
+
256
+ var iter = new AsyncIterator(
257
+ wrap(innerFn, outerFn, self, tryLocsList),
258
+ PromiseImpl
259
+ );
260
+
261
+ return exports.isGeneratorFunction(outerFn)
262
+ ? iter // If outerFn is a generator, return the full iterator.
263
+ : iter.next().then(function(result) {
264
+ return result.done ? result.value : iter.next();
265
+ });
266
+ };
267
+
268
+ function makeInvokeMethod(innerFn, self, context) {
269
+ var state = GenStateSuspendedStart;
270
+
271
+ return function invoke(method, arg) {
272
+ if (state === GenStateExecuting) {
273
+ throw new Error("Generator is already running");
274
+ }
275
+
276
+ if (state === GenStateCompleted) {
277
+ if (method === "throw") {
278
+ throw arg;
279
+ }
280
+
281
+ // Be forgiving, per 25.3.3.3.3 of the spec:
282
+ // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
283
+ return doneResult();
284
+ }
285
+
286
+ context.method = method;
287
+ context.arg = arg;
288
+
289
+ while (true) {
290
+ var delegate = context.delegate;
291
+ if (delegate) {
292
+ var delegateResult = maybeInvokeDelegate(delegate, context);
293
+ if (delegateResult) {
294
+ if (delegateResult === ContinueSentinel) continue;
295
+ return delegateResult;
296
+ }
297
+ }
298
+
299
+ if (context.method === "next") {
300
+ // Setting context._sent for legacy support of Babel's
301
+ // function.sent implementation.
302
+ context.sent = context._sent = context.arg;
303
+
304
+ } else if (context.method === "throw") {
305
+ if (state === GenStateSuspendedStart) {
306
+ state = GenStateCompleted;
307
+ throw context.arg;
308
+ }
309
+
310
+ context.dispatchException(context.arg);
311
+
312
+ } else if (context.method === "return") {
313
+ context.abrupt("return", context.arg);
314
+ }
315
+
316
+ state = GenStateExecuting;
317
+
318
+ var record = tryCatch(innerFn, self, context);
319
+ if (record.type === "normal") {
320
+ // If an exception is thrown from innerFn, we leave state ===
321
+ // GenStateExecuting and loop back for another invocation.
322
+ state = context.done
323
+ ? GenStateCompleted
324
+ : GenStateSuspendedYield;
325
+
326
+ if (record.arg === ContinueSentinel) {
327
+ continue;
328
+ }
329
+
330
+ return {
331
+ value: record.arg,
332
+ done: context.done
333
+ };
334
+
335
+ } else if (record.type === "throw") {
336
+ state = GenStateCompleted;
337
+ // Dispatch the exception by looping back around to the
338
+ // context.dispatchException(context.arg) call above.
339
+ context.method = "throw";
340
+ context.arg = record.arg;
341
+ }
342
+ }
343
+ };
344
+ }
345
+
346
+ // Call delegate.iterator[context.method](context.arg) and handle the
347
+ // result, either by returning a { value, done } result from the
348
+ // delegate iterator, or by modifying context.method and context.arg,
349
+ // setting context.delegate to null, and returning the ContinueSentinel.
350
+ function maybeInvokeDelegate(delegate, context) {
351
+ var method = delegate.iterator[context.method];
352
+ if (method === undefined) {
353
+ // A .throw or .return when the delegate iterator has no .throw
354
+ // method always terminates the yield* loop.
355
+ context.delegate = null;
356
+
357
+ if (context.method === "throw") {
358
+ // Note: ["return"] must be used for ES3 parsing compatibility.
359
+ if (delegate.iterator["return"]) {
360
+ // If the delegate iterator has a return method, give it a
361
+ // chance to clean up.
362
+ context.method = "return";
363
+ context.arg = undefined;
364
+ maybeInvokeDelegate(delegate, context);
365
+
366
+ if (context.method === "throw") {
367
+ // If maybeInvokeDelegate(context) changed context.method from
368
+ // "return" to "throw", let that override the TypeError below.
369
+ return ContinueSentinel;
370
+ }
371
+ }
372
+
373
+ context.method = "throw";
374
+ context.arg = new TypeError(
375
+ "The iterator does not provide a 'throw' method");
376
+ }
377
+
378
+ return ContinueSentinel;
379
+ }
380
+
381
+ var record = tryCatch(method, delegate.iterator, context.arg);
382
+
383
+ if (record.type === "throw") {
384
+ context.method = "throw";
385
+ context.arg = record.arg;
386
+ context.delegate = null;
387
+ return ContinueSentinel;
388
+ }
389
+
390
+ var info = record.arg;
391
+
392
+ if (! info) {
393
+ context.method = "throw";
394
+ context.arg = new TypeError("iterator result is not an object");
395
+ context.delegate = null;
396
+ return ContinueSentinel;
397
+ }
398
+
399
+ if (info.done) {
400
+ // Assign the result of the finished delegate to the temporary
401
+ // variable specified by delegate.resultName (see delegateYield).
402
+ context[delegate.resultName] = info.value;
403
+
404
+ // Resume execution at the desired location (see delegateYield).
405
+ context.next = delegate.nextLoc;
406
+
407
+ // If context.method was "throw" but the delegate handled the
408
+ // exception, let the outer generator proceed normally. If
409
+ // context.method was "next", forget context.arg since it has been
410
+ // "consumed" by the delegate iterator. If context.method was
411
+ // "return", allow the original .return call to continue in the
412
+ // outer generator.
413
+ if (context.method !== "return") {
414
+ context.method = "next";
415
+ context.arg = undefined;
416
+ }
417
+
418
+ } else {
419
+ // Re-yield the result returned by the delegate method.
420
+ return info;
421
+ }
422
+
423
+ // The delegate iterator is finished, so forget it and continue with
424
+ // the outer generator.
425
+ context.delegate = null;
426
+ return ContinueSentinel;
427
+ }
428
+
429
+ // Define Generator.prototype.{next,throw,return} in terms of the
430
+ // unified ._invoke helper method.
431
+ defineIteratorMethods(Gp);
432
+
433
+ define(Gp, toStringTagSymbol, "Generator");
434
+
435
+ // A Generator should always return itself as the iterator object when the
436
+ // @@iterator function is called on it. Some browsers' implementations of the
437
+ // iterator prototype chain incorrectly implement this, causing the Generator
438
+ // object to not be returned from this call. This ensures that doesn't happen.
439
+ // See https://github.com/facebook/regenerator/issues/274 for more details.
440
+ define(Gp, iteratorSymbol, function() {
441
+ return this;
442
+ });
443
+
444
+ define(Gp, "toString", function() {
445
+ return "[object Generator]";
446
+ });
447
+
448
+ function pushTryEntry(locs) {
449
+ var entry = { tryLoc: locs[0] };
450
+
451
+ if (1 in locs) {
452
+ entry.catchLoc = locs[1];
453
+ }
454
+
455
+ if (2 in locs) {
456
+ entry.finallyLoc = locs[2];
457
+ entry.afterLoc = locs[3];
458
+ }
459
+
460
+ this.tryEntries.push(entry);
461
+ }
462
+
463
+ function resetTryEntry(entry) {
464
+ var record = entry.completion || {};
465
+ record.type = "normal";
466
+ delete record.arg;
467
+ entry.completion = record;
468
+ }
469
+
470
+ function Context(tryLocsList) {
471
+ // The root entry object (effectively a try statement without a catch
472
+ // or a finally block) gives us a place to store values thrown from
473
+ // locations where there is no enclosing try statement.
474
+ this.tryEntries = [{ tryLoc: "root" }];
475
+ tryLocsList.forEach(pushTryEntry, this);
476
+ this.reset(true);
477
+ }
478
+
479
+ exports.keys = function(object) {
480
+ var keys = [];
481
+ for (var key in object) {
482
+ keys.push(key);
483
+ }
484
+ keys.reverse();
485
+
486
+ // Rather than returning an object with a next method, we keep
487
+ // things simple and return the next function itself.
488
+ return function next() {
489
+ while (keys.length) {
490
+ var key = keys.pop();
491
+ if (key in object) {
492
+ next.value = key;
493
+ next.done = false;
494
+ return next;
495
+ }
496
+ }
497
+
498
+ // To avoid creating an additional object, we just hang the .value
499
+ // and .done properties off the next function object itself. This
500
+ // also ensures that the minifier will not anonymize the function.
501
+ next.done = true;
502
+ return next;
503
+ };
504
+ };
505
+
506
+ function values(iterable) {
507
+ if (iterable) {
508
+ var iteratorMethod = iterable[iteratorSymbol];
509
+ if (iteratorMethod) {
510
+ return iteratorMethod.call(iterable);
511
+ }
512
+
513
+ if (typeof iterable.next === "function") {
514
+ return iterable;
515
+ }
516
+
517
+ if (!isNaN(iterable.length)) {
518
+ var i = -1, next = function next() {
519
+ while (++i < iterable.length) {
520
+ if (hasOwn.call(iterable, i)) {
521
+ next.value = iterable[i];
522
+ next.done = false;
523
+ return next;
524
+ }
525
+ }
526
+
527
+ next.value = undefined;
528
+ next.done = true;
529
+
530
+ return next;
531
+ };
532
+
533
+ return next.next = next;
534
+ }
535
+ }
536
+
537
+ // Return an iterator with no values.
538
+ return { next: doneResult };
539
+ }
540
+ exports.values = values;
541
+
542
+ function doneResult() {
543
+ return { value: undefined, done: true };
544
+ }
545
+
546
+ Context.prototype = {
547
+ constructor: Context,
548
+
549
+ reset: function(skipTempReset) {
550
+ this.prev = 0;
551
+ this.next = 0;
552
+ // Resetting context._sent for legacy support of Babel's
553
+ // function.sent implementation.
554
+ this.sent = this._sent = undefined;
555
+ this.done = false;
556
+ this.delegate = null;
557
+
558
+ this.method = "next";
559
+ this.arg = undefined;
560
+
561
+ this.tryEntries.forEach(resetTryEntry);
562
+
563
+ if (!skipTempReset) {
564
+ for (var name in this) {
565
+ // Not sure about the optimal order of these conditions:
566
+ if (name.charAt(0) === "t" &&
567
+ hasOwn.call(this, name) &&
568
+ !isNaN(+name.slice(1))) {
569
+ this[name] = undefined;
570
+ }
571
+ }
572
+ }
573
+ },
574
+
575
+ stop: function() {
576
+ this.done = true;
577
+
578
+ var rootEntry = this.tryEntries[0];
579
+ var rootRecord = rootEntry.completion;
580
+ if (rootRecord.type === "throw") {
581
+ throw rootRecord.arg;
582
+ }
583
+
584
+ return this.rval;
585
+ },
586
+
587
+ dispatchException: function(exception) {
588
+ if (this.done) {
589
+ throw exception;
590
+ }
591
+
592
+ var context = this;
593
+ function handle(loc, caught) {
594
+ record.type = "throw";
595
+ record.arg = exception;
596
+ context.next = loc;
597
+
598
+ if (caught) {
599
+ // If the dispatched exception was caught by a catch block,
600
+ // then let that catch block handle the exception normally.
601
+ context.method = "next";
602
+ context.arg = undefined;
603
+ }
604
+
605
+ return !! caught;
606
+ }
607
+
608
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
609
+ var entry = this.tryEntries[i];
610
+ var record = entry.completion;
611
+
612
+ if (entry.tryLoc === "root") {
613
+ // Exception thrown outside of any try block that could handle
614
+ // it, so set the completion value of the entire function to
615
+ // throw the exception.
616
+ return handle("end");
617
+ }
618
+
619
+ if (entry.tryLoc <= this.prev) {
620
+ var hasCatch = hasOwn.call(entry, "catchLoc");
621
+ var hasFinally = hasOwn.call(entry, "finallyLoc");
622
+
623
+ if (hasCatch && hasFinally) {
624
+ if (this.prev < entry.catchLoc) {
625
+ return handle(entry.catchLoc, true);
626
+ } else if (this.prev < entry.finallyLoc) {
627
+ return handle(entry.finallyLoc);
628
+ }
629
+
630
+ } else if (hasCatch) {
631
+ if (this.prev < entry.catchLoc) {
632
+ return handle(entry.catchLoc, true);
633
+ }
634
+
635
+ } else if (hasFinally) {
636
+ if (this.prev < entry.finallyLoc) {
637
+ return handle(entry.finallyLoc);
638
+ }
639
+
640
+ } else {
641
+ throw new Error("try statement without catch or finally");
642
+ }
643
+ }
644
+ }
645
+ },
646
+
647
+ abrupt: function(type, arg) {
648
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
649
+ var entry = this.tryEntries[i];
650
+ if (entry.tryLoc <= this.prev &&
651
+ hasOwn.call(entry, "finallyLoc") &&
652
+ this.prev < entry.finallyLoc) {
653
+ var finallyEntry = entry;
654
+ break;
655
+ }
656
+ }
657
+
658
+ if (finallyEntry &&
659
+ (type === "break" ||
660
+ type === "continue") &&
661
+ finallyEntry.tryLoc <= arg &&
662
+ arg <= finallyEntry.finallyLoc) {
663
+ // Ignore the finally entry if control is not jumping to a
664
+ // location outside the try/catch block.
665
+ finallyEntry = null;
666
+ }
667
+
668
+ var record = finallyEntry ? finallyEntry.completion : {};
669
+ record.type = type;
670
+ record.arg = arg;
671
+
672
+ if (finallyEntry) {
673
+ this.method = "next";
674
+ this.next = finallyEntry.finallyLoc;
675
+ return ContinueSentinel;
676
+ }
677
+
678
+ return this.complete(record);
679
+ },
680
+
681
+ complete: function(record, afterLoc) {
682
+ if (record.type === "throw") {
683
+ throw record.arg;
684
+ }
685
+
686
+ if (record.type === "break" ||
687
+ record.type === "continue") {
688
+ this.next = record.arg;
689
+ } else if (record.type === "return") {
690
+ this.rval = this.arg = record.arg;
691
+ this.method = "return";
692
+ this.next = "end";
693
+ } else if (record.type === "normal" && afterLoc) {
694
+ this.next = afterLoc;
695
+ }
696
+
697
+ return ContinueSentinel;
698
+ },
699
+
700
+ finish: function(finallyLoc) {
701
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
702
+ var entry = this.tryEntries[i];
703
+ if (entry.finallyLoc === finallyLoc) {
704
+ this.complete(entry.completion, entry.afterLoc);
705
+ resetTryEntry(entry);
706
+ return ContinueSentinel;
707
+ }
708
+ }
709
+ },
710
+
711
+ "catch": function(tryLoc) {
712
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
713
+ var entry = this.tryEntries[i];
714
+ if (entry.tryLoc === tryLoc) {
715
+ var record = entry.completion;
716
+ if (record.type === "throw") {
717
+ var thrown = record.arg;
718
+ resetTryEntry(entry);
719
+ }
720
+ return thrown;
721
+ }
722
+ }
723
+
724
+ // The context.catch method must only be called with a location
725
+ // argument that corresponds to a known catch block.
726
+ throw new Error("illegal catch attempt");
727
+ },
728
+
729
+ delegateYield: function(iterable, resultName, nextLoc) {
730
+ this.delegate = {
731
+ iterator: values(iterable),
732
+ resultName: resultName,
733
+ nextLoc: nextLoc
734
+ };
735
+
736
+ if (this.method === "next") {
737
+ // Deliberately forget the last sent value so that we don't
738
+ // accidentally pass it on to the delegate.
739
+ this.arg = undefined;
740
+ }
741
+
742
+ return ContinueSentinel;
743
+ }
744
+ };
745
+
746
+ // Regardless of whether this script is executing as a CommonJS module
747
+ // or not, return the runtime object so that we can declare the variable
748
+ // regeneratorRuntime in the outer scope, which allows this module to be
749
+ // injected easily by `bin/regenerator --include-runtime script.js`.
750
+ return exports;
751
+
752
+ }(
753
+ // If this script is executing as a CommonJS module, use module.exports
754
+ // as the regeneratorRuntime namespace. Otherwise create a new empty
755
+ // object. Either way, the resulting object will be used to initialize
756
+ // the regeneratorRuntime variable at the top of this file.
757
+ true ? module.exports : 0
758
+ ));
759
+
760
+ try {
761
+ regeneratorRuntime = runtime;
762
+ } catch (accidentalStrictMode) {
763
+ // This module should not be running in strict mode, so the above
764
+ // assignment should always work unless something is misconfigured. Just
765
+ // in case runtime.js accidentally runs in strict mode, in modern engines
766
+ // we can explicitly access globalThis. In older engines we can escape
767
+ // strict mode using a global Function call. This could conceivably fail
768
+ // if a Content Security Policy forbids using Function, but in that case
769
+ // the proper solution is to fix the accidental strict mode problem. If
770
+ // you've misconfigured your bundler to force strict mode and applied a
771
+ // CSP to forbid Function, and you're not willing to fix either of those
772
+ // problems, please detail your unique predicament in a GitHub issue.
773
+ if (typeof globalThis === "object") {
774
+ globalThis.regeneratorRuntime = runtime;
775
+ } else {
776
+ Function("r", "regeneratorRuntime = r")(runtime);
777
+ }
778
+ }
779
+
780
+
781
+ /***/ }),
782
+
783
+ /***/ 8133:
784
+ /***/ ((module) => {
785
+
786
+ "use strict";
787
+ module.exports = __WEBPACK_EXTERNAL_MODULE__8133__;
788
+
789
+ /***/ }),
790
+
791
+ /***/ 5537:
792
+ /***/ ((module) => {
793
+
794
+ "use strict";
795
+ module.exports = __WEBPACK_EXTERNAL_MODULE__5537__;
796
+
797
+ /***/ }),
798
+
799
+ /***/ 4212:
800
+ /***/ ((module) => {
801
+
802
+ "use strict";
803
+ module.exports = __WEBPACK_EXTERNAL_MODULE__4212__;
804
+
805
+ /***/ }),
806
+
807
+ /***/ 748:
808
+ /***/ ((module) => {
809
+
810
+ "use strict";
811
+ module.exports = __WEBPACK_EXTERNAL_MODULE__748__;
812
+
813
+ /***/ })
814
+
815
+ /******/ });
816
+ /************************************************************************/
817
+ /******/ // The module cache
818
+ /******/ var __webpack_module_cache__ = {};
819
+ /******/
820
+ /******/ // The require function
821
+ /******/ function __webpack_require__(moduleId) {
822
+ /******/ // Check if module is in cache
823
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
824
+ /******/ if (cachedModule !== undefined) {
825
+ /******/ return cachedModule.exports;
826
+ /******/ }
827
+ /******/ // Create a new module (and put it into the cache)
828
+ /******/ var module = __webpack_module_cache__[moduleId] = {
829
+ /******/ // no module.id needed
830
+ /******/ // no module.loaded needed
831
+ /******/ exports: {}
832
+ /******/ };
833
+ /******/
834
+ /******/ // Execute the module function
835
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
836
+ /******/
837
+ /******/ // Return the exports of the module
838
+ /******/ return module.exports;
839
+ /******/ }
840
+ /******/
841
+ /************************************************************************/
842
+ /******/ /* webpack/runtime/compat get default export */
843
+ /******/ (() => {
844
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
845
+ /******/ __webpack_require__.n = (module) => {
846
+ /******/ var getter = module && module.__esModule ?
847
+ /******/ () => (module['default']) :
848
+ /******/ () => (module);
849
+ /******/ __webpack_require__.d(getter, { a: getter });
850
+ /******/ return getter;
851
+ /******/ };
852
+ /******/ })();
853
+ /******/
854
+ /******/ /* webpack/runtime/define property getters */
855
+ /******/ (() => {
856
+ /******/ // define getter functions for harmony exports
857
+ /******/ __webpack_require__.d = (exports, definition) => {
858
+ /******/ for(var key in definition) {
859
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
860
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
861
+ /******/ }
862
+ /******/ }
863
+ /******/ };
864
+ /******/ })();
865
+ /******/
866
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
867
+ /******/ (() => {
868
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
869
+ /******/ })();
870
+ /******/
871
+ /******/ /* webpack/runtime/make namespace object */
872
+ /******/ (() => {
873
+ /******/ // define __esModule on exports
874
+ /******/ __webpack_require__.r = (exports) => {
875
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
876
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
877
+ /******/ }
878
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
879
+ /******/ };
880
+ /******/ })();
881
+ /******/
882
+ /************************************************************************/
883
+ var __webpack_exports__ = {};
884
+ // This entry need to be wrapped in an IIFE because it need to be in strict mode.
885
+ (() => {
886
+ "use strict";
887
+ // ESM COMPAT FLAG
888
+ __webpack_require__.r(__webpack_exports__);
889
+
890
+ // EXPORTS
891
+ __webpack_require__.d(__webpack_exports__, {
892
+ "default": () => (/* binding */ src)
893
+ });
894
+
895
+ // EXTERNAL MODULE: external "../shared"
896
+ var external_shared_ = __webpack_require__(4212);
897
+ // EXTERNAL MODULE: external "vue"
898
+ var external_vue_ = __webpack_require__(748);
899
+ // EXTERNAL MODULE: ../../node_modules/@babel/runtime/regenerator/index.js
900
+ var regenerator = __webpack_require__(7162);
901
+ var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
902
+ ;// CONCATENATED MODULE: ../../node_modules/tslib/tslib.es6.js
903
+ /******************************************************************************
904
+ Copyright (c) Microsoft Corporation.
905
+
906
+ Permission to use, copy, modify, and/or distribute this software for any
907
+ purpose with or without fee is hereby granted.
908
+
909
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
910
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
911
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
912
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
913
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
914
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
915
+ PERFORMANCE OF THIS SOFTWARE.
916
+ ***************************************************************************** */
917
+ /* global Reflect, Promise */
918
+
919
+ var extendStatics = function(d, b) {
920
+ extendStatics = Object.setPrototypeOf ||
921
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
922
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
923
+ return extendStatics(d, b);
924
+ };
925
+
926
+ function __extends(d, b) {
927
+ if (typeof b !== "function" && b !== null)
928
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
929
+ extendStatics(d, b);
930
+ function __() { this.constructor = d; }
931
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
932
+ }
933
+
934
+ var __assign = function() {
935
+ __assign = Object.assign || function __assign(t) {
936
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
937
+ s = arguments[i];
938
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
939
+ }
940
+ return t;
941
+ }
942
+ return __assign.apply(this, arguments);
943
+ }
944
+
945
+ function __rest(s, e) {
946
+ var t = {};
947
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
948
+ t[p] = s[p];
949
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
950
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
951
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
952
+ t[p[i]] = s[p[i]];
953
+ }
954
+ return t;
955
+ }
956
+
957
+ function __decorate(decorators, target, key, desc) {
958
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
959
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
960
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
961
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
962
+ }
963
+
964
+ function __param(paramIndex, decorator) {
965
+ return function (target, key) { decorator(target, key, paramIndex); }
966
+ }
967
+
968
+ function __metadata(metadataKey, metadataValue) {
969
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
970
+ }
971
+
972
+ function __awaiter(thisArg, _arguments, P, generator) {
973
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
974
+ return new (P || (P = Promise))(function (resolve, reject) {
975
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
976
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
977
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
978
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
979
+ });
980
+ }
981
+
982
+ function __generator(thisArg, body) {
983
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
984
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
985
+ function verb(n) { return function (v) { return step([n, v]); }; }
986
+ function step(op) {
987
+ if (f) throw new TypeError("Generator is already executing.");
988
+ while (_) try {
989
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
990
+ if (y = 0, t) op = [op[0] & 2, t.value];
991
+ switch (op[0]) {
992
+ case 0: case 1: t = op; break;
993
+ case 4: _.label++; return { value: op[1], done: false };
994
+ case 5: _.label++; y = op[1]; op = [0]; continue;
995
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
996
+ default:
997
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
998
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
999
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
1000
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
1001
+ if (t[2]) _.ops.pop();
1002
+ _.trys.pop(); continue;
1003
+ }
1004
+ op = body.call(thisArg, _);
1005
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
1006
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
1007
+ }
1008
+ }
1009
+
1010
+ var __createBinding = Object.create ? (function(o, m, k, k2) {
1011
+ if (k2 === undefined) k2 = k;
1012
+ var desc = Object.getOwnPropertyDescriptor(m, k);
1013
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
1014
+ desc = { enumerable: true, get: function() { return m[k]; } };
1015
+ }
1016
+ Object.defineProperty(o, k2, desc);
1017
+ }) : (function(o, m, k, k2) {
1018
+ if (k2 === undefined) k2 = k;
1019
+ o[k2] = m[k];
1020
+ });
1021
+
1022
+ function __exportStar(m, o) {
1023
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
1024
+ }
1025
+
1026
+ function __values(o) {
1027
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
1028
+ if (m) return m.call(o);
1029
+ if (o && typeof o.length === "number") return {
1030
+ next: function () {
1031
+ if (o && i >= o.length) o = void 0;
1032
+ return { value: o && o[i++], done: !o };
1033
+ }
1034
+ };
1035
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
1036
+ }
1037
+
1038
+ function __read(o, n) {
1039
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
1040
+ if (!m) return o;
1041
+ var i = m.call(o), r, ar = [], e;
1042
+ try {
1043
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
1044
+ }
1045
+ catch (error) { e = { error: error }; }
1046
+ finally {
1047
+ try {
1048
+ if (r && !r.done && (m = i["return"])) m.call(i);
1049
+ }
1050
+ finally { if (e) throw e.error; }
1051
+ }
1052
+ return ar;
1053
+ }
1054
+
1055
+ /** @deprecated */
1056
+ function __spread() {
1057
+ for (var ar = [], i = 0; i < arguments.length; i++)
1058
+ ar = ar.concat(__read(arguments[i]));
1059
+ return ar;
1060
+ }
1061
+
1062
+ /** @deprecated */
1063
+ function __spreadArrays() {
1064
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
1065
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
1066
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
1067
+ r[k] = a[j];
1068
+ return r;
1069
+ }
1070
+
1071
+ function __spreadArray(to, from, pack) {
1072
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
1073
+ if (ar || !(i in from)) {
1074
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
1075
+ ar[i] = from[i];
1076
+ }
1077
+ }
1078
+ return to.concat(ar || Array.prototype.slice.call(from));
1079
+ }
1080
+
1081
+ function __await(v) {
1082
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
1083
+ }
1084
+
1085
+ function __asyncGenerator(thisArg, _arguments, generator) {
1086
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
1087
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
1088
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
1089
+ function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
1090
+ function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
1091
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
1092
+ function fulfill(value) { resume("next", value); }
1093
+ function reject(value) { resume("throw", value); }
1094
+ function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
1095
+ }
1096
+
1097
+ function __asyncDelegator(o) {
1098
+ var i, p;
1099
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
1100
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
1101
+ }
1102
+
1103
+ function __asyncValues(o) {
1104
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
1105
+ var m = o[Symbol.asyncIterator], i;
1106
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
1107
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
1108
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
1109
+ }
1110
+
1111
+ function __makeTemplateObject(cooked, raw) {
1112
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
1113
+ return cooked;
1114
+ };
1115
+
1116
+ var __setModuleDefault = Object.create ? (function(o, v) {
1117
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
1118
+ }) : function(o, v) {
1119
+ o["default"] = v;
1120
+ };
1121
+
1122
+ function __importStar(mod) {
1123
+ if (mod && mod.__esModule) return mod;
1124
+ var result = {};
1125
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
1126
+ __setModuleDefault(result, mod);
1127
+ return result;
1128
+ }
1129
+
1130
+ function __importDefault(mod) {
1131
+ return (mod && mod.__esModule) ? mod : { default: mod };
1132
+ }
1133
+
1134
+ function __classPrivateFieldGet(receiver, state, kind, f) {
1135
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
1136
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
1137
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
1138
+ }
1139
+
1140
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
1141
+ if (kind === "m") throw new TypeError("Private method is not writable");
1142
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
1143
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
1144
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
1145
+ }
1146
+
1147
+ function __classPrivateFieldIn(state, receiver) {
1148
+ if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
1149
+ return typeof state === "function" ? receiver === state : state.has(receiver);
1150
+ }
1151
+
1152
+ // EXTERNAL MODULE: external "../input"
1153
+ var external_input_ = __webpack_require__(8133);
1154
+ var external_input_default = /*#__PURE__*/__webpack_require__.n(external_input_);
1155
+ // EXTERNAL MODULE: external "../popover"
1156
+ var external_popover_ = __webpack_require__(5537);
1157
+ var external_popover_default = /*#__PURE__*/__webpack_require__.n(external_popover_);
1158
+ ;// CONCATENATED MODULE: ../../packages/slider/src/slider-button.tsx
1159
+
1160
+
1161
+ /**
1162
+ * Tencent is pleased to support the open source community by making
1163
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1164
+ *
1165
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1166
+ *
1167
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1168
+ *
1169
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1170
+ *
1171
+ * ---------------------------------------------------
1172
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1173
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1174
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1175
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1176
+ *
1177
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1178
+ * the Software.
1179
+ *
1180
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1181
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1182
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1183
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1184
+ * IN THE SOFTWARE.
1185
+ */
1186
+
1187
+
1188
+
1189
+
1190
+ /* harmony default export */ const slider_button = ((0,external_vue_.defineComponent)({
1191
+ name: 'SliderButton',
1192
+ props: {
1193
+ modelValue: {
1194
+ type: Number,
1195
+ "default": 0
1196
+ },
1197
+ params: {
1198
+ type: Object,
1199
+ "default": function _default() {
1200
+ return {};
1201
+ }
1202
+ }
1203
+ },
1204
+ emits: ['emitChange', 'resetSize', 'update:modelValue'],
1205
+ setup: function setup(props, _ref) {
1206
+ var emit = _ref.emit;
1207
+ var dragging = (0,external_vue_.ref)(false);
1208
+ var isClick = (0,external_vue_.ref)(false);
1209
+ var startY = (0,external_vue_.ref)(0);
1210
+ var startX = (0,external_vue_.ref)(0);
1211
+ var startPosition = (0,external_vue_.ref)(0);
1212
+ var newPosition = (0,external_vue_.ref)(null);
1213
+ var oldValue = (0,external_vue_.ref)(props.modelValue);
1214
+ var currentY = (0,external_vue_.ref)(0);
1215
+ var currentX = (0,external_vue_.ref)(0);
1216
+ var isMove = (0,external_vue_.ref)(false);
1217
+ var button = (0,external_vue_.ref)(null);
1218
+ var tip = (0,external_vue_.computed)(function () {
1219
+ var _a, _b;
1220
+
1221
+ var tip = '';
1222
+
1223
+ if ((_a = props.params.customContent) === null || _a === void 0 ? void 0 : _a[props.modelValue]) {
1224
+ var customContent = props.params.customContent[props.modelValue];
1225
+ tip = customContent.tip || customContent.label || '';
1226
+ }
1227
+
1228
+ var placement = props.params.vertical ? external_shared_.PlacementEnum.RIGHT : external_shared_.PlacementEnum.TOP;
1229
+
1230
+ if ((_b = props.params) === null || _b === void 0 ? void 0 : _b.showTip) {
1231
+ return {
1232
+ content: props.params.formatterTipLabel("".concat(tip || (props === null || props === void 0 ? void 0 : props.modelValue) || '0')),
1233
+ placement: placement
1234
+ };
1235
+ }
1236
+
1237
+ return {
1238
+ content: '',
1239
+ placement: placement
1240
+ };
1241
+ });
1242
+ var currentPosition = (0,external_vue_.computed)(function () {
1243
+ return "".concat((props.modelValue - props.params.minValue) / (props.params.maxValue - props.params.minValue) * 100, "%");
1244
+ });
1245
+ var wrapperStyle = (0,external_vue_.computed)(function () {
1246
+ return props.params.vertical ? {
1247
+ bottom: currentPosition.value
1248
+ } : {
1249
+ left: currentPosition.value
1250
+ };
1251
+ });
1252
+ var buttonLabel = (0,external_vue_.computed)(function () {
1253
+ return props.params.formatterButtonLabel(props.modelValue);
1254
+ });
1255
+
1256
+ var onButtonDown = function onButtonDown(event) {
1257
+ if (props.params.disable) return;
1258
+ event.preventDefault();
1259
+ onDragStart(event);
1260
+ on(window, 'mousemove', onDragging);
1261
+ on(window, 'touchmove', onDragging);
1262
+ on(window, 'mouseup', onDragEnd);
1263
+ on(window, 'touchend', onDragEnd);
1264
+ };
1265
+
1266
+ var onDragStart = function onDragStart(event) {
1267
+ dragging.value = true;
1268
+ isClick.value = true;
1269
+
1270
+ if (props.params.vertical) {
1271
+ startY.value = event.clientY;
1272
+ } else {
1273
+ startX.value = event.clientX;
1274
+ }
1275
+
1276
+ startPosition.value = parseFloat(currentPosition.value);
1277
+ newPosition.value = startPosition.value;
1278
+ };
1279
+
1280
+ var onDragging = function onDragging(event) {
1281
+ if (dragging.value) {
1282
+ isClick.value = false;
1283
+ emit('resetSize');
1284
+ var diff = 0;
1285
+
1286
+ if (props.params.vertical) {
1287
+ currentY.value = event.clientY;
1288
+ diff = (startY.value - currentY.value) / props.params.sliderSize * 100;
1289
+ } else {
1290
+ currentX.value = event.clientX;
1291
+ diff = (currentX.value - startX.value) / props.params.sliderSize * 100;
1292
+ }
1293
+
1294
+ newPosition.value = startPosition.value + diff;
1295
+ setPosition(newPosition.value);
1296
+ }
1297
+ };
1298
+
1299
+ var onDragEnd = function onDragEnd() {
1300
+ isMove.value = false;
1301
+
1302
+ if (dragging.value) {
1303
+ setTimeout(function () {
1304
+ dragging.value = false;
1305
+
1306
+ if (!isClick.value) {
1307
+ setPosition(newPosition.value);
1308
+ emit('emitChange');
1309
+ }
1310
+ }, 0);
1311
+ off(window, 'mousemove', onDragging);
1312
+ off(window, 'touchmove', onDragging);
1313
+ off(window, 'mouseup', onDragEnd);
1314
+ off(window, 'touchend', onDragEnd);
1315
+ }
1316
+ };
1317
+
1318
+ var setPosition = function setPosition(position) {
1319
+ if (position === null || isNaN(position)) return;
1320
+
1321
+ if (position < 0) {
1322
+ newPosition.value = 0;
1323
+ } else if (position > 100) {
1324
+ newPosition.value = 100;
1325
+ }
1326
+
1327
+ var lengthPerStep = 100 / ((props.params.maxValue - props.params.minValue) / props.params.step);
1328
+ var steps = Math.round(position / lengthPerStep);
1329
+ var value = steps * lengthPerStep * (props.params.maxValue - props.params.minValue) * 0.01 + props.params.minValue;
1330
+ value = parseFloat(value.toFixed(props.params.precision));
1331
+ emit('update:modelValue', value);
1332
+
1333
+ if (!dragging.value && props.modelValue !== oldValue.value) {
1334
+ oldValue.value = props.modelValue;
1335
+ }
1336
+ };
1337
+
1338
+ var renderDom = function renderDom() {
1339
+ return (0,external_vue_.createVNode)("div", {
1340
+ "class": ['bk-slider-button', props.params.vertical ? 'vertical' : 'horizontal', {
1341
+ grabbing: dragging.value
1342
+ }],
1343
+ "ref": button,
1344
+ "tabindex": "0",
1345
+ "style": wrapperStyle.value,
1346
+ "onClick": function onClick(event) {
1347
+ return event.stopPropagation();
1348
+ },
1349
+ "onMousedown": onButtonDown
1350
+ }, [Boolean(tip.value.content) ? (0,external_vue_.createVNode)((external_popover_default()), {
1351
+ "content": tip.value.content,
1352
+ "theme": 'dark',
1353
+ "placement": tip.value.placement,
1354
+ "boundary": document.body
1355
+ }, {
1356
+ "default": function _default() {
1357
+ return [(0,external_vue_.createVNode)("div", {
1358
+ "class": ['slider-button', {
1359
+ 'slider-button-disable': props.params.disable
1360
+ }]
1361
+ }, null)];
1362
+ }
1363
+ }) : (0,external_vue_.createVNode)("div", {
1364
+ "class": ['slider-button', {
1365
+ 'slider-button-disable': props.params.disable
1366
+ }]
1367
+ }, null), props.params.showButtonLabel && !props.params.showIntervalLabel ? (0,external_vue_.createVNode)("div", {
1368
+ "class": ['slider-button-label', props.params.vertical ? 'vertical' : 'horizontal']
1369
+ }, [buttonLabel.value]) : undefined]);
1370
+ };
1371
+
1372
+ return {
1373
+ renderDom: renderDom,
1374
+ setPosition: setPosition,
1375
+ tip: tip
1376
+ };
1377
+ },
1378
+ render: function render() {
1379
+ return this.renderDom();
1380
+ }
1381
+ }));
1382
+ ;// CONCATENATED MODULE: ../../packages/slider/src/slider.tsx
1383
+
1384
+
1385
+
1386
+ /**
1387
+ * Tencent is pleased to support the open source community by making
1388
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1389
+ *
1390
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1391
+ *
1392
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1393
+ *
1394
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1395
+ *
1396
+ * ---------------------------------------------------
1397
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1398
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1399
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1400
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1401
+ *
1402
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1403
+ * the Software.
1404
+ *
1405
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1406
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1407
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1408
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1409
+ * IN THE SOFTWARE.
1410
+ */
1411
+
1412
+
1413
+
1414
+
1415
+
1416
+ var on = function on(element, event, handler) {
1417
+ if (element && event && handler) {
1418
+ element.addEventListener(event, handler, false);
1419
+ }
1420
+ };
1421
+ var off = function off(element, event, handler) {
1422
+ if (element && event && handler) {
1423
+ element.removeEventListener(event, handler, false);
1424
+ }
1425
+ };
1426
+ /* harmony default export */ const slider = ((0,external_vue_.defineComponent)({
1427
+ name: 'Slider',
1428
+ props: {
1429
+ modelValue: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.array, external_shared_.PropTypes.number]),
1430
+ extCls: {
1431
+ type: String,
1432
+ "default": ''
1433
+ },
1434
+ vertical: {
1435
+ type: Boolean,
1436
+ "default": false
1437
+ },
1438
+ height: {
1439
+ type: String,
1440
+ "default": '200px'
1441
+ },
1442
+ disable: {
1443
+ type: Boolean,
1444
+ "default": false
1445
+ },
1446
+ showTip: {
1447
+ type: Boolean,
1448
+ "default": false
1449
+ },
1450
+ maxValue: {
1451
+ type: [Number],
1452
+ "default": 100
1453
+ },
1454
+ minValue: {
1455
+ type: [Number],
1456
+ "default": 0
1457
+ },
1458
+ step: {
1459
+ type: [Number],
1460
+ "default": 1
1461
+ },
1462
+ range: {
1463
+ type: Boolean,
1464
+ "default": false
1465
+ },
1466
+ showInterval: {
1467
+ type: Boolean,
1468
+ "default": false
1469
+ },
1470
+ showIntervalLabel: {
1471
+ type: Boolean,
1472
+ "default": false
1473
+ },
1474
+ showButtonLabel: {
1475
+ type: Boolean,
1476
+ "default": false
1477
+ },
1478
+ showBetweenLabel: {
1479
+ type: Boolean,
1480
+ "default": false
1481
+ },
1482
+ showInput: {
1483
+ type: Boolean,
1484
+ "default": false
1485
+ },
1486
+ customContent: {
1487
+ type: Object,
1488
+ "default": null
1489
+ },
1490
+ formatterLabel: {
1491
+ type: Function,
1492
+ "default": function _default(value) {
1493
+ return value;
1494
+ }
1495
+ },
1496
+ formatterButtonLabel: {
1497
+ type: Function,
1498
+ "default": function _default(value) {
1499
+ return value;
1500
+ }
1501
+ },
1502
+ formatterTipLabel: {
1503
+ type: Function,
1504
+ "default": function _default(value) {
1505
+ return value;
1506
+ }
1507
+ } // 自定义tip格式
1508
+
1509
+ },
1510
+ emits: ['update:modelValue', 'change'],
1511
+ setup: function setup(props, _ref) {
1512
+ var _this = this;
1513
+
1514
+ var slots = _ref.slots,
1515
+ emit = _ref.emit;
1516
+
1517
+ /* 滑动选择器长度 */
1518
+ var sliderSize = (0,external_vue_.ref)(1);
1519
+ /* 第一个滑块与第二个滑块的值 */
1520
+
1521
+ var firstValue = (0,external_vue_.ref)(null);
1522
+ var secondValue = (0,external_vue_.ref)(null);
1523
+ var oldValue = (0,external_vue_.ref)(null);
1524
+ /* 第一个输入框与第二个输入框的值 */
1525
+
1526
+ var firstInput = (0,external_vue_.ref)(0);
1527
+ var secondInput = (0,external_vue_.ref)(0);
1528
+ /* 以下为refDom */
1529
+
1530
+ var slider = (0,external_vue_.ref)(null);
1531
+ var firstbutton = (0,external_vue_.ref)(null);
1532
+ var secondbutton = (0,external_vue_.ref)(null);
1533
+ var curButtonRef = (0,external_vue_.ref)(null); // 小数点后最大位数
1534
+
1535
+ var precision = (0,external_vue_.computed)(function () {
1536
+ var precisions = [props.minValue, props.maxValue, props.step].map(function (item) {
1537
+ var decimal = "".concat(item).split('.')[1];
1538
+ return decimal ? decimal.length : 0;
1539
+ });
1540
+ return Math.max.apply(null, precisions);
1541
+ });
1542
+ /* 当前滑块的最小值与最大值 */
1543
+
1544
+ var rangeMinValue = (0,external_vue_.computed)(function () {
1545
+ return Math.min(firstValue.value, secondValue.value);
1546
+ });
1547
+ var rangeMaxValue = (0,external_vue_.computed)(function () {
1548
+ return Math.max(firstValue.value, secondValue.value);
1549
+ });
1550
+ var barSize = (0,external_vue_.computed)(function () {
1551
+ return props.range ? "".concat(100 * (rangeMaxValue.value - rangeMinValue.value) / (props.maxValue - props.minValue), "%") : "".concat(100 * (firstValue.value - props.minValue) / (props.maxValue - props.minValue), "%");
1552
+ });
1553
+ var barStart = (0,external_vue_.computed)(function () {
1554
+ return props.range ? "".concat(100 * (rangeMinValue.value - props.minValue) / (props.maxValue - props.minValue), "%") : '0%';
1555
+ });
1556
+ /* 当前滑动区域的位置与长度 */
1557
+
1558
+ var barStyle = (0,external_vue_.computed)(function () {
1559
+ return props.vertical ? {
1560
+ height: barSize.value,
1561
+ bottom: barStart.value
1562
+ } : {
1563
+ width: barSize.value,
1564
+ left: barStart.value
1565
+ };
1566
+ });
1567
+ /* 断点 */
1568
+
1569
+ var intervals = (0,external_vue_.computed)(function () {
1570
+ if (!props.showInterval || props.minValue > props.maxValue) return [];
1571
+
1572
+ if (props.step === 0) {
1573
+ console.warn('WARNNING:step should not be 0');
1574
+ return [];
1575
+ }
1576
+
1577
+ var stopCount = (props.maxValue - props.minValue) / props.step;
1578
+ var stepWidth = 100 * props.step / (props.maxValue - props.minValue);
1579
+ var result = [];
1580
+
1581
+ for (var i = 1; i < stopCount; i++) {
1582
+ result.push(i * stepWidth);
1583
+ }
1584
+
1585
+ if (props.range) {
1586
+ // eslint-disable-next-line max-len
1587
+ return result.filter(function (step) {
1588
+ return step < 100 * (rangeMinValue.value - props.minValue) / (props.maxValue - props.minValue) || step > 100 * (rangeMaxValue.value - props.minValue) / (props.maxValue - props.minValue);
1589
+ });
1590
+ } // eslint-disable-next-line max-len
1591
+
1592
+
1593
+ return result.filter(function (step) {
1594
+ return step > 100 * (firstValue.value - props.minValue) / (props.maxValue - props.minValue);
1595
+ });
1596
+ });
1597
+ /* 可滑动区域的样式 */
1598
+
1599
+ var runwayStyle = (0,external_vue_.computed)(function () {
1600
+ return props.vertical ? {
1601
+ height: props.height,
1602
+ width: '4px'
1603
+ } : {};
1604
+ });
1605
+ /* 断点下方的文案 */
1606
+
1607
+ var intervalLabels = (0,external_vue_.computed)(function () {
1608
+ if (!props.showIntervalLabel) return [];
1609
+
1610
+ if (props.step === 0) {
1611
+ console.warn('WARNNING:step should not be 0');
1612
+ return [];
1613
+ }
1614
+
1615
+ var stepWidth = 100 * props.step / (props.maxValue - props.minValue);
1616
+ var result = [];
1617
+
1618
+ for (var i = props.minValue, j = 0; i <= props.maxValue; i += props.step, j++) {
1619
+ var item = {
1620
+ stepWidth: j * stepWidth,
1621
+ stepLabel: props.formatterLabel(i)
1622
+ };
1623
+ result.push(item);
1624
+ }
1625
+
1626
+ return result;
1627
+ });
1628
+ /* 是否显示第二个输入框 */
1629
+
1630
+ var showSecondInput = (0,external_vue_.computed)(function () {
1631
+ return Array.isArray(props.modelValue);
1632
+ });
1633
+ /* 自定义断点 */
1634
+
1635
+ var customList = (0,external_vue_.computed)(function () {
1636
+ if (!props.customContent) {
1637
+ return [];
1638
+ }
1639
+
1640
+ return Object.keys(props.customContent).sort(function (a, b) {
1641
+ return Number(a) - Number(b);
1642
+ }).filter(function (value) {
1643
+ return Number(value) >= props.minValue && Number(value) <= props.maxValue;
1644
+ }).map(function (item) {
1645
+ var tip = props.customContent[item].tip;
1646
+ var label = props.customContent[item].label;
1647
+ return {
1648
+ tip: tip || label || '',
1649
+ label: label || '',
1650
+ percent: (Number(item) - props.minValue) / (props.maxValue - props.minValue) * 100
1651
+ };
1652
+ });
1653
+ });
1654
+ /* 传入到滑块的参数 */
1655
+
1656
+ var buttonParms = (0,external_vue_.computed)(function () {
1657
+ return {
1658
+ vertical: props.vertical,
1659
+ showTip: props.showTip,
1660
+ disable: props.disable,
1661
+ maxValue: props.maxValue,
1662
+ minValue: props.minValue,
1663
+ step: props.step,
1664
+ precision: precision.value,
1665
+ showButtonLabel: props.showButtonLabel,
1666
+ formatterButtonLabel: props.formatterButtonLabel,
1667
+ showIntervalLabel: props.showIntervalLabel,
1668
+ customContent: props.customContent,
1669
+ sliderSize: sliderSize.value,
1670
+ formatterTipLabel: props.formatterTipLabel
1671
+ };
1672
+ }); // 监听
1673
+
1674
+ (0,external_vue_.watch)(function () {
1675
+ return props.modelValue;
1676
+ }, function () {
1677
+ setValues();
1678
+ });
1679
+ (0,external_vue_.watch)(function () {
1680
+ return firstValue.value;
1681
+ }, function (val) {
1682
+ if (props.range) {
1683
+ emit('update:modelValue', [rangeMinValue.value, rangeMaxValue.value]);
1684
+ } else {
1685
+ emit('update:modelValue', val);
1686
+ }
1687
+
1688
+ firstInput.value = val;
1689
+ });
1690
+ (0,external_vue_.watch)(function () {
1691
+ return secondValue.value;
1692
+ }, function (val) {
1693
+ emit('update:modelValue', [rangeMinValue.value, rangeMaxValue.value]);
1694
+ secondInput.value = val;
1695
+ });
1696
+ /* 初始化 */
1697
+
1698
+ (0,external_vue_.onMounted)(function () {
1699
+ if (props.range) {
1700
+ if (Array.isArray(props.modelValue)) {
1701
+ firstValue.value = Math.max(props.minValue, Number(props.modelValue[0]));
1702
+ secondValue.value = Math.min(props.maxValue, Number(props.modelValue[1]));
1703
+ } else {
1704
+ firstValue.value = props.minValue;
1705
+ secondValue.value = props.maxValue;
1706
+ }
1707
+
1708
+ oldValue.value = [firstValue.value, secondValue.value];
1709
+ } else {
1710
+ if (typeof props.modelValue !== 'number' || isNaN(props.modelValue)) {
1711
+ firstValue.value = props.minValue;
1712
+ } else {
1713
+ firstValue.value = Math.min(props.maxValue, Math.max(props.minValue, props.modelValue));
1714
+ }
1715
+
1716
+ oldValue.value = firstValue.value;
1717
+ }
1718
+
1719
+ resetSize();
1720
+ on(window, 'resize', resetSize());
1721
+ });
1722
+
1723
+ var resetSize = function resetSize() {
1724
+ if (slider.value) {
1725
+ sliderSize.value = slider.value["client".concat(props.vertical ? 'Height' : 'Width')];
1726
+ }
1727
+ };
1728
+ /* 点击容器时设置滑块位置 */
1729
+
1730
+
1731
+ var setButtonPos = function setButtonPos(event) {
1732
+ var _a, _b;
1733
+
1734
+ event.stopPropagation();
1735
+ if (props.disable) return;
1736
+ resetSize();
1737
+
1738
+ if (props.vertical) {
1739
+ var offsetBottom = (_a = slider.value) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().bottom;
1740
+ setPosition((offsetBottom - event.clientY) / sliderSize.value * 100);
1741
+ } else {
1742
+ var offsetLeft = (_b = slider.value) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect().left;
1743
+ setPosition((event.clientX - offsetLeft) / sliderSize.value * 100);
1744
+ }
1745
+
1746
+ emitChange();
1747
+ };
1748
+ /* 是否更改了值 */
1749
+
1750
+
1751
+ var valueChanged = function valueChanged() {
1752
+ if (props.range) {
1753
+ return ![rangeMinValue.value, rangeMaxValue.value].every(function (item, index) {
1754
+ return item === oldValue.value[index];
1755
+ });
1756
+ }
1757
+
1758
+ return props.modelValue !== oldValue.value;
1759
+ };
1760
+ /* emit */
1761
+
1762
+
1763
+ var setValues = function setValues() {
1764
+ if (props.minValue > props.maxValue) {
1765
+ console.error('min should not be greater than max.');
1766
+ return;
1767
+ }
1768
+
1769
+ var val = props.modelValue;
1770
+
1771
+ if (props.range && Array.isArray(val)) {
1772
+ if (val[1] < props.minValue) {
1773
+ emit('update:modelValue', [props.minValue, props.minValue]);
1774
+ } else if (val[0] > props.maxValue) {
1775
+ emit('update:modelValue', [props.maxValue, props.maxValue]);
1776
+ } else if (val[0] < props.minValue) {
1777
+ emit('update:modelValue', [props.minValue, val[1]]);
1778
+ } else if (val[1] > props.maxValue) {
1779
+ emit('update:modelValue', [val[0], props.maxValue]);
1780
+ } else {
1781
+ firstValue.value = Number(val[0]);
1782
+ secondValue.value = Number(val[1]);
1783
+
1784
+ if (valueChanged()) {
1785
+ oldValue.value = val.slice();
1786
+ }
1787
+ }
1788
+ } else if (!props.range && typeof val === 'number' && !isNaN(val)) {
1789
+ if (val < props.minValue) {
1790
+ emit('update:modelValue', props.minValue);
1791
+ } else if (val > props.maxValue) {
1792
+ emit('update:modelValue', props.maxValue);
1793
+ } else {
1794
+ firstValue.value = val;
1795
+
1796
+ if (valueChanged()) {
1797
+ oldValue.value = val;
1798
+ }
1799
+ }
1800
+ }
1801
+ };
1802
+ /* 派出事件 */
1803
+
1804
+
1805
+ var emitChange = function emitChange() {
1806
+ return __awaiter(_this, void 0, void 0, /*#__PURE__*/regenerator_default().mark(function _callee() {
1807
+ return regenerator_default().wrap(function _callee$(_context) {
1808
+ while (1) {
1809
+ switch (_context.prev = _context.next) {
1810
+ case 0:
1811
+ _context.next = 2;
1812
+ return (0,external_vue_.nextTick)();
1813
+
1814
+ case 2:
1815
+ emit('change', props.range ? [rangeMinValue.value, rangeMaxValue.value] : props.modelValue);
1816
+
1817
+ case 3:
1818
+ case "end":
1819
+ return _context.stop();
1820
+ }
1821
+ }
1822
+ }, _callee);
1823
+ }));
1824
+ };
1825
+ /* 断点样式 */
1826
+
1827
+
1828
+ var getIntervalStyle = function getIntervalStyle(position) {
1829
+ return props.vertical ? {
1830
+ bottom: "".concat(position, "%")
1831
+ } : {
1832
+ left: "".concat(position, "%")
1833
+ };
1834
+ };
1835
+ /* 设置滑块位置 */
1836
+
1837
+
1838
+ var setPosition = function setPosition(percent) {
1839
+ if (!props.range) {
1840
+ firstbutton.value.setPosition(percent);
1841
+ return;
1842
+ }
1843
+
1844
+ var targetValue = props.minValue + percent * (props.maxValue - props.minValue) / 100; // 绝对值
1845
+
1846
+ if (Math.abs(rangeMinValue.value - targetValue) < Math.abs(rangeMaxValue.value - targetValue)) {
1847
+ curButtonRef.value = firstValue.value < secondValue.value ? firstbutton.value : secondbutton.value;
1848
+ } else {
1849
+ curButtonRef.value = firstValue.value > secondValue.value ? firstbutton.value : secondbutton.value;
1850
+ }
1851
+
1852
+ curButtonRef.value.setPosition(percent);
1853
+ };
1854
+
1855
+ var firstInputChange = function firstInputChange(v) {
1856
+ if (v === '') {
1857
+ return;
1858
+ }
1859
+
1860
+ var val = parseFloat(v);
1861
+
1862
+ if (val < props.minValue) {
1863
+ firstInput.value = props.minValue;
1864
+ firstValue.value = props.minValue;
1865
+ } else if (val > props.maxValue) {
1866
+ firstInput.value = props.maxValue;
1867
+ firstValue.value = props.maxValue;
1868
+ } else {
1869
+ firstValue.value = val;
1870
+ }
1871
+ };
1872
+
1873
+ var secondInputChange = function secondInputChange(v) {
1874
+ if (v === '' || typeof v === 'number') {
1875
+ return;
1876
+ }
1877
+
1878
+ var val = parseFloat(v);
1879
+
1880
+ if (val < props.minValue) {
1881
+ secondInput.value = props.minValue;
1882
+ secondValue.value = props.minValue;
1883
+ } else if (val > props.maxValue) {
1884
+ secondInput.value = props.maxValue;
1885
+ secondValue.value = props.maxValue;
1886
+ } else {
1887
+ secondValue.value = val;
1888
+ }
1889
+ };
1890
+
1891
+ var betweenLabelStyle = function betweenLabelStyle(postion) {
1892
+ var value = 0;
1893
+
1894
+ if (postion === 'start') {
1895
+ value = props.vertical ? props.maxValue : props.minValue;
1896
+ } else {
1897
+ value = props.vertical ? props.minValue : props.maxValue;
1898
+ }
1899
+
1900
+ if (props.showButtonLabel && [firstValue.value, secondValue.value].includes(value)) {
1901
+ return '0';
1902
+ }
1903
+
1904
+ return '1';
1905
+ };
1906
+
1907
+ var renderDom = function renderDom() {
1908
+ var _a, _b;
1909
+
1910
+ return (0,external_vue_.createVNode)("div", {
1911
+ "class": ['bk-slider', props.extCls]
1912
+ }, [(_a = slots.start) === null || _a === void 0 ? void 0 : _a.call(slots), (0,external_vue_.createVNode)("div", {
1913
+ "class": "bk-slider-runway",
1914
+ "ref": slider,
1915
+ "style": runwayStyle.value,
1916
+ "onClick": setButtonPos
1917
+ }, [(0,external_vue_.createVNode)("div", {
1918
+ "class": ['bk-slider-bar', props.vertical ? 'vertical' : 'horizontal', {
1919
+ disable: props.disable
1920
+ }],
1921
+ "style": barStyle.value
1922
+ }, null), props.showInterval ? intervals.value.map(function (interval, index) {
1923
+ return (0,external_vue_.createVNode)("div", {
1924
+ "key": index,
1925
+ "class": ['bk-slider-interval', {
1926
+ vertical: props.vertical
1927
+ }],
1928
+ "style": getIntervalStyle(interval)
1929
+ }, null);
1930
+ }) : undefined, props.customContent ? customList.value.map(function (custom, index) {
1931
+ return (0,external_vue_.createVNode)("div", {
1932
+ "key": index,
1933
+ "class": ['bk-slider-interval', {
1934
+ vertical: props.vertical
1935
+ }],
1936
+ "style": getIntervalStyle(custom.percent)
1937
+ }, null);
1938
+ }) : undefined, props.showBetweenLabel || props.showIntervalLabel || props.customContent ? (0,external_vue_.createVNode)("div", {
1939
+ "class": ['bk-slider-labels', props.vertical ? 'vertical' : 'horizontal']
1940
+ }, [function () {
1941
+ if (props.showBetweenLabel) {
1942
+ return [(0,external_vue_.createVNode)("div", {
1943
+ "class": "label-start",
1944
+ "style": [{
1945
+ opacity: betweenLabelStyle('start')
1946
+ }]
1947
+ }, [props.formatterLabel(props.minValue)]), (0,external_vue_.createVNode)("div", {
1948
+ "class": "label-end",
1949
+ "style": [{
1950
+ opacity: betweenLabelStyle('end')
1951
+ }]
1952
+ }, [props.formatterLabel(props.maxValue)])];
1953
+ }
1954
+
1955
+ if (props.showIntervalLabel) {
1956
+ return intervalLabels.value.map(function (intervalLabel, index) {
1957
+ return (0,external_vue_.createVNode)("div", {
1958
+ "class": ['bk-slider-label', props.vertical ? 'vertical' : 'horizontal'],
1959
+ "key": index,
1960
+ "style": getIntervalStyle(intervalLabel.stepWidth)
1961
+ }, [intervalLabel.stepLabel]);
1962
+ });
1963
+ }
1964
+
1965
+ if (props.customContent) {
1966
+ return customList.value.map(function (item, index) {
1967
+ return (0,external_vue_.createVNode)("div", {
1968
+ "class": ['bk-slider-label', props.vertical ? 'vertical' : 'horizontal'],
1969
+ "key": index,
1970
+ "style": getIntervalStyle(item.percent)
1971
+ }, [item.label]);
1972
+ });
1973
+ }
1974
+
1975
+ return undefined;
1976
+ }()]) : undefined, (0,external_vue_.createVNode)(slider_button, {
1977
+ "modelValue": firstValue.value,
1978
+ "onUpdate:modelValue": function onUpdateModelValue($event) {
1979
+ return firstValue.value = $event;
1980
+ },
1981
+ "ref": firstbutton,
1982
+ "params": buttonParms.value,
1983
+ "onEmitChange": emitChange,
1984
+ "onResetSize": resetSize
1985
+ }, null), props.range ? (0,external_vue_.createVNode)(slider_button, {
1986
+ "modelValue": secondValue.value,
1987
+ "onUpdate:modelValue": function onUpdateModelValue($event) {
1988
+ return secondValue.value = $event;
1989
+ },
1990
+ "ref": secondbutton,
1991
+ "params": buttonParms.value,
1992
+ "onEmitChange": emitChange,
1993
+ "onResetSize": resetSize
1994
+ }, null) : undefined]), props.showInput && !props.vertical ? (0,external_vue_.createVNode)("div", {
1995
+ "class": "bk-slider-input"
1996
+ }, [(0,external_vue_.createVNode)("div", {
1997
+ "class": "input-item"
1998
+ }, [(0,external_vue_.createVNode)((external_input_default()), {
1999
+ "type": "number",
2000
+ "modelValue": firstInput.value,
2001
+ "max": props.maxValue,
2002
+ "min": props.minValue,
2003
+ "onChange": firstInputChange
2004
+ }, null)]), showSecondInput.value && secondValue.value ? [(0,external_vue_.createVNode)("div", {
2005
+ "class": "input-center"
2006
+ }, [(0,external_vue_.createTextVNode)("\uFF5E")]), (0,external_vue_.createVNode)("div", {
2007
+ "class": "input-item"
2008
+ }, [(0,external_vue_.createVNode)((external_input_default()), {
2009
+ "type": "number",
2010
+ "modelValue": secondInput.value,
2011
+ "max": props.maxValue,
2012
+ "min": props.minValue,
2013
+ "onChange": secondInputChange
2014
+ }, null)])] : undefined]) : undefined, (_b = slots.end) === null || _b === void 0 ? void 0 : _b.call(slots)]);
2015
+ };
2016
+
2017
+ return {
2018
+ renderDom: renderDom
2019
+ };
2020
+ },
2021
+ render: function render() {
2022
+ return this.renderDom();
2023
+ }
2024
+ }));
2025
+ ;// CONCATENATED MODULE: ../../packages/slider/src/index.ts
2026
+ /**
2027
+ * Tencent is pleased to support the open source community by making
2028
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
2029
+ *
2030
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
2031
+ *
2032
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
2033
+ *
2034
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
2035
+ *
2036
+ * ---------------------------------------------------
2037
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
2038
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
2039
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
2040
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
2041
+ *
2042
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
2043
+ * the Software.
2044
+ *
2045
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
2046
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2047
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
2048
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
2049
+ * IN THE SOFTWARE.
2050
+ */
2051
+
2052
+
2053
+ var Slider = (0,external_shared_.withInstall)(slider);
2054
+ /* harmony default export */ const src = (Slider);
2055
+ })();
2056
+
2057
+ /******/ return __webpack_exports__;
2058
+ /******/ })()
2059
+ ;
2060
+ });