doph-js 0.3.19 → 0.3.20

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.
package/dist/dophJs.js CHANGED
@@ -4966,7 +4966,7 @@ const aa = {
4966
4966
  default: null
4967
4967
  },
4968
4968
  limit: {
4969
- // максимальное расстояние между позунками
4969
+ // максимальное расстояние между ползунками
4970
4970
  type: Number,
4971
4971
  default: null
4972
4972
  },
@@ -5041,7 +5041,7 @@ const aa = {
5041
5041
  direction: n.reverse ? "rtl" : "ltr",
5042
5042
  tooltips: n.tooltips,
5043
5043
  // в примере варианты получения данных в тултипах
5044
- pips: n.pips ? { mode: "steps", density: 3, format: n.pips } : null,
5044
+ pips: n.pips ? n.pips : null,
5045
5045
  animate: n.animate,
5046
5046
  animationDuration: n.duration
5047
5047
  };
@@ -3,4 +3,4 @@
3
3
  * (c) 2023
4
4
  * @license MIT
5
5
  */function _e(o){let t={r:0,g:0,b:0,a:1};/#/.test(o)?t=Lr(o):/rgb/.test(o)?t=Jt(o):typeof o=="string"?t=Jt(`rgba(${o})`):Object.prototype.toString.call(o)==="[object Object]"&&(t=o);const{r:n,g:r,b:s,a}=t,{h:i,s:d,v:l}=Mr(t);return{r:n,g:r,b:s,a:a===void 0?1:a,h:i,s:d,v:l}}function ut(o){const t=document.createElement("canvas"),n=t.getContext("2d"),r=o*2;return t.width=r,t.height=r,n.fillStyle="#ffffff",n.fillRect(0,0,r,r),n.fillStyle="#ccd5db",n.fillRect(0,0,o,o),n.fillRect(o,o,o,o),t}function ft(o,t,n,r,s,a){const i=o==="l",d=t.createLinearGradient(0,0,i?n:0,i?0:r);d.addColorStop(.01,s),d.addColorStop(.99,a),t.fillStyle=d,t.fillRect(0,0,n,r)}function Tr({r:o,g:t,b:n},r){const s=i=>("0"+Number(i).toString(16)).slice(-2),a=`#${s(o)}${s(t)}${s(n)}`;return r?a.toUpperCase():a}function Lr(o){o=o.slice(1);const t=n=>parseInt(n,16)||0;return{r:t(o.slice(0,2)),g:t(o.slice(2,4)),b:t(o.slice(4,6))}}function Jt(o){return typeof o=="string"?(o=(/rgba?\((.*?)\)/.exec(o)||["","0,0,0,1"])[1].split(","),{r:Number(o[0])||0,g:Number(o[1])||0,b:Number(o[2])||0,a:Number(o[3]?o[3]:1)}):o}function Mr({r:o,g:t,b:n}){o=o/255,t=t/255,n=n/255;const r=Math.max(o,t,n),s=Math.min(o,t,n),a=r-s;let i=0;r===s?i=0:r===o?t>=n?i=60*(t-n)/a:i=60*(t-n)/a+360:r===t?i=60*(n-o)/a+120:r===n&&(i=60*(o-t)/a+240),i=Math.floor(i);let d=parseFloat((r===0?0:1-s/r).toFixed(2)),l=parseFloat(r.toFixed(2));return{h:i,s:d,v:l}}var pt=e.defineComponent({props:{color:{type:String,default:"#000000"},hsv:{type:Object,default:null},size:{type:Number,default:152}},emits:["selectSaturation"],data(){return{slideSaturationStyle:{}}},mounted(){this.renderColor(),this.renderSlide()},methods:{renderColor(){const o=this.$refs.canvasSaturation,t=this.size,n=o.getContext("2d");o.width=t,o.height=t,n.fillStyle=this.color,n.fillRect(0,0,t,t),ft("l",n,t,t,"#FFFFFF","rgba(255,255,255,0)"),ft("p",n,t,t,"rgba(0,0,0,0)","#000000")},renderSlide(){this.slideSaturationStyle={left:this.hsv.s*this.size-5+"px",top:(1-this.hsv.v)*this.size-5+"px"}},selectSaturation(o){const{top:t,left:n}=this.$el.getBoundingClientRect(),r=o.target.getContext("2d"),s=i=>{let d=i.clientX-n,l=i.clientY-t;d<0&&(d=0),l<0&&(l=0),d>this.size&&(d=this.size),l>this.size&&(l=this.size),this.slideSaturationStyle={left:d-5+"px",top:l-5+"px"};const p=r.getImageData(Math.min(d,this.size-1),Math.min(l,this.size-1),1,1),[h,y,m]=p.data;this.$emit("selectSaturation",{r:h,g:y,b:m})};s(o);const a=()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",a)};document.addEventListener("mousemove",s),document.addEventListener("mouseup",a)}}});const Ar={ref:"canvasSaturation"};function Fr(o,t,n,r,s,a){return e.openBlock(),e.createBlock("div",{class:"saturation",onMousedown:t[1]||(t[1]=e.withModifiers((...i)=>o.selectSaturation&&o.selectSaturation(...i),["prevent","stop"]))},[e.createVNode("canvas",Ar,null,512),e.createVNode("div",{style:o.slideSaturationStyle,class:"slide"},null,4)],32)}pt.render=Fr,pt.__file="src/color/Saturation.vue";var mt=e.defineComponent({props:{hsv:{type:Object,default:null},width:{type:Number,default:15},height:{type:Number,default:152}},emits:["selectHue"],data(){return{slideHueStyle:{}}},mounted(){this.renderColor(),this.renderSlide()},methods:{renderColor(){const o=this.$refs.canvasHue,t=this.width,n=this.height,r=o.getContext("2d");o.width=t,o.height=n;const s=r.createLinearGradient(0,0,0,n);s.addColorStop(0,"#FF0000"),s.addColorStop(.17*1,"#FF00FF"),s.addColorStop(.17*2,"#0000FF"),s.addColorStop(.17*3,"#00FFFF"),s.addColorStop(.17*4,"#00FF00"),s.addColorStop(.17*5,"#FFFF00"),s.addColorStop(1,"#FF0000"),r.fillStyle=s,r.fillRect(0,0,t,n)},renderSlide(){this.slideHueStyle={top:(1-this.hsv.h/360)*this.height-2+"px"}},selectHue(o){const{top:t}=this.$el.getBoundingClientRect(),n=o.target.getContext("2d"),r=a=>{let i=a.clientY-t;i<0&&(i=0),i>this.height&&(i=this.height),this.slideHueStyle={top:i-2+"px"};const d=n.getImageData(0,Math.min(i,this.height-1),1,1),[l,p,h]=d.data;this.$emit("selectHue",{r:l,g:p,b:h})};r(o);const s=()=>{document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",s)};document.addEventListener("mousemove",r),document.addEventListener("mouseup",s)}}});const Hr={ref:"canvasHue"};function Ir(o,t,n,r,s,a){return e.openBlock(),e.createBlock("div",{class:"hue",onMousedown:t[1]||(t[1]=e.withModifiers((...i)=>o.selectHue&&o.selectHue(...i),["prevent","stop"]))},[e.createVNode("canvas",Hr,null,512),e.createVNode("div",{style:o.slideHueStyle,class:"slide"},null,4)],32)}mt.render=Ir,mt.__file="src/color/Hue.vue";var ht=e.defineComponent({props:{color:{type:String,default:"#000000"},rgba:{type:Object,default:null},width:{type:Number,default:15},height:{type:Number,default:152}},emits:["selectAlpha"],data(){return{slideAlphaStyle:{},alphaSize:5}},watch:{color(){this.renderColor()},"rgba.a"(){this.renderSlide()}},mounted(){this.renderColor(),this.renderSlide()},methods:{renderColor(){const o=this.$refs.canvasAlpha,t=this.width,n=this.height,r=this.alphaSize,s=ut(r),a=o.getContext("2d");o.width=t,o.height=n,a.fillStyle=a.createPattern(s,"repeat"),a.fillRect(0,0,t,n),ft("p",a,t,n,"rgba(255,255,255,0)",this.color)},renderSlide(){this.slideAlphaStyle={top:this.rgba.a*this.height-2+"px"}},selectAlpha(o){const{top:t}=this.$el.getBoundingClientRect(),n=s=>{let a=s.clientY-t;a<0&&(a=0),a>this.height&&(a=this.height);let i=parseFloat((a/this.height).toFixed(2));this.$emit("selectAlpha",i)};n(o);const r=()=>{document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",r)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",r)}}});const zr={ref:"canvasAlpha"};function Rr(o,t,n,r,s,a){return e.openBlock(),e.createBlock("div",{class:"color-alpha",onMousedown:t[1]||(t[1]=e.withModifiers((...i)=>o.selectAlpha&&o.selectAlpha(...i),["prevent","stop"]))},[e.createVNode("canvas",zr,null,512),e.createVNode("div",{style:o.slideAlphaStyle,class:"slide"},null,4)],32)}ht.render=Rr,ht.__file="src/color/Alpha.vue";var gt=e.defineComponent({props:{color:{type:String,default:"#000000"},width:{type:Number,default:100},height:{type:Number,default:30}},data(){return{alphaSize:5}},watch:{color(){this.renderColor()}},mounted(){this.renderColor()},methods:{renderColor(){const o=this.$el,t=this.width,n=this.height,r=this.alphaSize,s=ut(r),a=o.getContext("2d");o.width=t,o.height=n,a.fillStyle=a.createPattern(s,"repeat"),a.fillRect(0,0,t,n),a.fillStyle=this.color,a.fillRect(0,0,t,n)}}});function Pr(o,t,n,r,s,a){return e.openBlock(),e.createBlock("canvas")}gt.render=Pr,gt.__file="src/color/Preview.vue";var yt=e.defineComponent({props:{suckerCanvas:{type:Object,default:null},suckerArea:{type:Array,default:()=>[]}},data(){return{isOpenSucker:!1,suckerPreview:null,isSucking:!1}},watch:{suckerCanvas(o){this.isSucking=!1,this.suckColor(o)}},methods:{openSucker(){this.isOpenSucker?this.keydownHandler({keyCode:27}):(this.isOpenSucker=!0,this.isSucking=!0,this.$emit("openSucker",!0),document.addEventListener("keydown",this.keydownHandler))},keydownHandler(o){o.keyCode===27&&(this.isOpenSucker=!1,this.isSucking=!1,this.$emit("openSucker",!1),document.removeEventListener("keydown",this.keydownHandler),document.removeEventListener("mousemove",this.mousemoveHandler),document.removeEventListener("mouseup",this.mousemoveHandler),this.suckerPreview&&(document.body.removeChild(this.suckerPreview),this.suckerPreview=null))},mousemoveHandler(o){const{clientX:t,clientY:n}=o,{top:r,left:s,width:a,height:i}=this.suckerCanvas.getBoundingClientRect(),d=t-s,l=n-r,h=this.suckerCanvas.getContext("2d").getImageData(Math.min(d,a-1),Math.min(l,i-1),1,1);let[y,m,w,x]=h.data;x=parseFloat((x/255).toFixed(2));const k=this.suckerPreview.style;Object.assign(k,{position:"absolute",left:t+20+"px",top:n-36+"px",width:"24px",height:"24px",borderRadius:"50%",border:"2px solid #fff",boxShadow:"0 0 8px 0 rgba(0, 0, 0, 0.16)",background:`rgba(${y}, ${m}, ${w}, ${x})`,zIndex:95}),this.suckerArea.length&&t>=this.suckerArea[0]&&n>=this.suckerArea[1]&&t<=this.suckerArea[2]&&n<=this.suckerArea[3]?k.display="":k.display="none"},suckColor(o){o&&o.tagName!=="CANVAS"||(this.suckerPreview=document.createElement("div"),this.suckerPreview&&document.body.appendChild(this.suckerPreview),document.addEventListener("mousemove",this.mousemoveHandler),document.addEventListener("mouseup",this.mousemoveHandler),o.addEventListener("click",t=>{const{clientX:n,clientY:r}=t,{top:s,left:a,width:i,height:d}=o.getBoundingClientRect(),l=n-a,p=r-s,y=o.getContext("2d").getImageData(Math.min(l,i-1),Math.min(p,d-1),1,1);let[m,w,x,k]=y.data;k=parseFloat((k/255).toFixed(2)),this.$emit("selectSucker",{r:m,g:w,b:x,a:k})}))}}});const Or=e.createVNode("path",{d:"M13.1,8.2l5.6,5.6c0.4,0.4,0.5,1.1,0.1,1.5s-1.1,0.5-1.5,0.1c0,0-0.1,0-0.1-0.1l-1.4-1.4l-7.7,7.7C7.9,21.9,7.6,22,7.3,22H3.1C2.5,22,2,21.5,2,20.9l0,0v-4.2c0-0.3,0.1-0.6,0.3-0.8l5.8-5.8C8.5,9.7,9.2,9.6,9.7,10s0.5,1.1,0.1,1.5c0,0,0,0.1-0.1,0.1l-5.5,5.5v2.7h2.7l7.4-7.4L8.7,6.8c-0.5-0.4-0.5-1-0.1-1.5s1.1-0.5,1.5-0.1c0,0,0.1,0,0.1,0.1l1.4,1.4l3.5-3.5c1.6-1.6,4.1-1.6,5.8-0.1c1.6,1.6,1.6,4.1,0.1,5.8L20.9,9l-3.6,3.6c-0.4,0.4-1.1,0.5-1.5,0.1"},null,-1),jr={key:1,class:"sucker",viewBox:"-16 -16 68 68",xmlns:"http://www.w3.org/2000/svg",stroke:"#9099a4"},Ur=e.createVNode("g",{fill:"none","fill-rule":"evenodd"},[e.createVNode("g",{transform:"translate(1 1)","stroke-width":"4"},[e.createVNode("circle",{"stroke-opacity":".5",cx:"18",cy:"18",r:"18"}),e.createVNode("path",{d:"M36 18c0-9.94-8.06-18-18-18"},[e.createVNode("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})])])],-1);function Wr(o,t,n,r,s,a){return e.openBlock(),e.createBlock("div",null,[o.isSucking?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createBlock("svg",{key:0,class:[{active:o.isOpenSucker},"sucker"],xmlns:"http://www.w3.org/2000/svg",viewBox:"-12 -12 48 48",onClick:t[1]||(t[1]=(...i)=>o.openSucker&&o.openSucker(...i))},[Or],2)),o.isSucking?(e.openBlock(),e.createBlock("svg",jr,[Ur])):e.createCommentVNode("v-if",!0)])}yt.render=Wr,yt.__file="src/color/Sucker.vue";var kt=e.defineComponent({props:{name:{type:String,default:""},color:{type:String,default:""}},emits:["inputColor","inputFocus","inputBlur"],setup(o,{emit:t}){return{modelColor:e.computed({get(){return o.color||""},set(a){t("inputColor",a)}}),handleFocus:a=>{t("inputFocus",a)},handleBlur:a=>{t("inputBlur",a)}}}});const Xr={class:"color-type"},Yr={class:"name"};function qr(o,t,n,r,s,a){return e.openBlock(),e.createBlock("div",Xr,[e.createVNode("span",Yr,e.toDisplayString(o.name),1),e.withDirectives(e.createVNode("input",{"onUpdate:modelValue":t[1]||(t[1]=i=>o.modelColor=i),class:"value",onFocus:t[2]||(t[2]=(...i)=>o.handleFocus&&o.handleFocus(...i)),onBlur:t[3]||(t[3]=(...i)=>o.handleBlur&&o.handleBlur(...i))},null,544),[[e.vModelText,o.modelColor]])])}kt.render=qr,kt.__file="src/color/Box.vue";var bt=e.defineComponent({name:"ColorPicker",props:{color:{type:String,default:"#000000"},colorsDefault:{type:Array,default:()=>[]},colorsHistoryKey:{type:String,default:""}},emits:["selectColor"],setup(o,{emit:t}){const n=e.ref(),r=e.ref([]),s=e.ref();o.colorsHistoryKey&&localStorage&&(r.value=JSON.parse(localStorage.getItem(o.colorsHistoryKey))||[]),s.value=ut(4).toDataURL(),e.onUnmounted(()=>{a(n.value)});function a(d){if(!d)return;const l=r.value||[],p=l.indexOf(d);p>=0&&l.splice(p,1),l.length>=8&&(l.length=7),l.unshift(d),r.value=l||[],localStorage&&o.colorsHistoryKey&&localStorage.setItem(o.colorsHistoryKey,JSON.stringify(l))}function i(d){t("selectColor",d)}return{setColorsHistory:a,colorsHistory:r,color:n,imgAlphaBase64:s,selectColor:i}}});const Kr={class:"colors"},Gr={key:0,class:"colors history"};function Zr(o,t,n,r,s,a){return e.openBlock(),e.createBlock("div",null,[e.createVNode("ul",Kr,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(o.colorsDefault,i=>(e.openBlock(),e.createBlock("li",{key:i,class:"item",onClick:d=>o.selectColor(i)},[e.createVNode("div",{style:{background:`url(${o.imgAlphaBase64})`},class:"alpha"},null,4),e.createVNode("div",{style:{background:i},class:"color"},null,4)],8,["onClick"]))),128))]),o.colorsHistory.length?(e.openBlock(),e.createBlock("ul",Gr,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(o.colorsHistory,i=>(e.openBlock(),e.createBlock("li",{key:i,class:"item",onClick:d=>o.selectColor(i)},[e.createVNode("div",{style:{background:`url(${o.imgAlphaBase64})`},class:"alpha"},null,4),e.createVNode("div",{style:{background:i},class:"color"},null,4)],8,["onClick"]))),128))])):e.createCommentVNode("v-if",!0)])}bt.render=Zr,bt.__file="src/color/Colors.vue";var Ve=e.defineComponent({components:{Saturation:pt,Hue:mt,Alpha:ht,Preview:gt,Sucker:yt,Box:kt,Colors:bt},emits:["changeColor","openSucker","inputFocus","inputBlur"],props:{color:{type:String,default:"#000000"},theme:{type:String,default:"dark"},suckerHide:{type:Boolean,default:!0},suckerCanvas:{type:null,default:null},suckerArea:{type:Array,default:()=>[]},colorsDefault:{type:Array,default:()=>["#000000","#FFFFFF","#FF1900","#F47365","#FFB243","#FFE623","#6EFF2A","#1BC7B1","#00BEFF","#2E81FF","#5D61FF","#FF89CF","#FC3CAD","#BF3DCE","#8E00A7","rgba(0,0,0,0)"]},colorsHistoryKey:{type:String,default:"vue-colorpicker-history"}},data(){return{hueWidth:15,hueHeight:152,previewHeight:30,modelRgba:"",modelHex:"",r:0,g:0,b:0,a:1,h:0,s:0,v:0}},computed:{isLightTheme(){return this.theme==="light"},totalWidth(){return this.hueHeight+(this.hueWidth+8)*2},previewWidth(){return this.totalWidth-(this.suckerHide?0:this.previewHeight)},rgba(){return{r:this.r,g:this.g,b:this.b,a:this.a}},hsv(){return{h:this.h,s:this.s,v:this.v}},rgbString(){return`rgb(${this.r}, ${this.g}, ${this.b})`},rgbaStringShort(){return`${this.r}, ${this.g}, ${this.b}, ${this.a}`},rgbaString(){return`rgba(${this.rgbaStringShort})`},hexString(){return Tr(this.rgba,!0)}},created(){Object.assign(this,_e(this.color)),this.setText(),this.$watch("rgba",()=>{this.$emit("changeColor",{rgba:this.rgba,hsv:this.hsv,hex:this.modelHex})})},methods:{selectSaturation(o){const{r:t,g:n,b:r,h:s,s:a,v:i}=_e(o);Object.assign(this,{r:t,g:n,b:r,h:s,s:a,v:i}),this.setText()},handleFocus(o){this.$emit("inputFocus",o)},handleBlur(o){this.$emit("inputBlur",o)},selectHue(o){const{r:t,g:n,b:r,h:s,s:a,v:i}=_e(o);Object.assign(this,{r:t,g:n,b:r,h:s,s:a,v:i}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide()})},selectAlpha(o){this.a=o,this.setText()},inputHex(o){const{r:t,g:n,b:r,a:s,h:a,s:i,v:d}=_e(o);Object.assign(this,{r:t,g:n,b:r,a:s,h:a,s:i,v:d}),this.modelHex=o,this.modelRgba=this.rgbaStringShort,this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})},inputRgba(o){const{r:t,g:n,b:r,a:s,h:a,s:i,v:d}=_e(o);Object.assign(this,{r:t,g:n,b:r,a:s,h:a,s:i,v:d}),this.modelHex=this.hexString,this.modelRgba=o,this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})},setText(){this.modelHex=this.hexString,this.modelRgba=this.rgbaStringShort},openSucker(o){this.$emit("openSucker",o)},selectSucker(o){const{r:t,g:n,b:r,a:s,h:a,s:i,v:d}=_e(o);Object.assign(this,{r:t,g:n,b:r,a:s,h:a,s:i,v:d}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})},selectColor(o){const{r:t,g:n,b:r,a:s,h:a,s:i,v:d}=_e(o);Object.assign(this,{r:t,g:n,b:r,a:s,h:a,s:i,v:d}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})}}});const Jr={class:"color-set"};function Qr(o,t,n,r,s,a){const i=e.resolveComponent("Saturation"),d=e.resolveComponent("Hue"),l=e.resolveComponent("Alpha"),p=e.resolveComponent("Preview"),h=e.resolveComponent("Sucker"),y=e.resolveComponent("Box"),m=e.resolveComponent("Colors");return e.openBlock(),e.createBlock("div",{class:["hu-color-picker",{light:o.isLightTheme}],style:{width:o.totalWidth+"px"}},[e.createVNode("div",Jr,[e.createVNode(i,{ref:"saturation",color:o.rgbString,hsv:o.hsv,size:o.hueHeight,onSelectSaturation:o.selectSaturation},null,8,["color","hsv","size","onSelectSaturation"]),e.createVNode(d,{ref:"hue",hsv:o.hsv,width:o.hueWidth,height:o.hueHeight,onSelectHue:o.selectHue},null,8,["hsv","width","height","onSelectHue"]),e.createVNode(l,{ref:"alpha",color:o.rgbString,rgba:o.rgba,width:o.hueWidth,height:o.hueHeight,onSelectAlpha:o.selectAlpha},null,8,["color","rgba","width","height","onSelectAlpha"])]),e.createVNode("div",{style:{height:o.previewHeight+"px"},class:"color-show"},[e.createVNode(p,{color:o.rgbaString,width:o.previewWidth,height:o.previewHeight},null,8,["color","width","height"]),o.suckerHide?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createBlock(h,{key:0,"sucker-canvas":o.suckerCanvas,"sucker-area":o.suckerArea,onOpenSucker:o.openSucker,onSelectSucker:o.selectSucker},null,8,["sucker-canvas","sucker-area","onOpenSucker","onSelectSucker"]))],4),e.createVNode(y,{name:"HEX",color:o.modelHex,onInputColor:o.inputHex,onInputFocus:o.handleFocus,onInputBlur:o.handleBlur},null,8,["color","onInputColor","onInputFocus","onInputBlur"]),e.createVNode(y,{name:"RGBA",color:o.modelRgba,onInputColor:o.inputRgba,onInputFocus:o.handleFocus,onInputBlur:o.handleBlur},null,8,["color","onInputColor","onInputFocus","onInputBlur"]),e.createVNode(m,{color:o.rgbaString,"colors-default":o.colorsDefault,"colors-history-key":o.colorsHistoryKey,onSelectColor:o.selectColor},null,8,["color","colors-default","colors-history-key","onSelectColor"]),e.createCommentVNode(" custom options "),e.renderSlot(o.$slots,"default")],6)}Ve.render=Qr,Ve.__file="src/color/ColorPicker.vue",Ve.install=o=>{o.component(Ve.name,Ve)};class es{validate(t,n="https"){return this._isValidURL(t)||(t=n+"://"+t),this._isValidURL(t)}message(t,n){let r="";switch(t){case"url":r=n;break}return r}_isValidURL(t){try{return new URL(t),!0}catch{return!1}}}const ts=new es;class os{validate(t=""){return t!==""}message(t){return t}}const ns=new os;class rs{validate(t="",n=0){return t.length>=n}message(t){return t}}const ss=new rs;class as{validate(t="",n=0){return t.length<=n}message(t){return t}}const is=new as;class ls{validate(t){return/^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/.test(t)}message(t){return t}}const cs=new ls;class ds{validate(t){return!isNaN(parseFloat(t))&&!isNaN(t-0)}message(t){return t}}const us=new ds,oe={RulesUrl:ts,RulesRequired:ns,RulesMin:ss,RulesMax:is,RulesEmail:cs,RulesNumber:us};class fs{validate(t,n){var s,a,i,d,l,p,h,y,m,w,x,k,N,T;let r="";if(n){let M=!1;for(let A in n)if(!M)switch(A){case"url":r=oe.RulesUrl.validate(t,"https")||t.length===0?"":oe.RulesUrl.message("url",(s=n[A])!=null&&s.message?(a=n[A])==null?void 0:a.message:"url_incorrect"),M=r!=="";break;case"required":r=oe.RulesRequired.validate(t)?"":oe.RulesRequired.message((i=n[A])!=null&&i.message?(d=n[A])==null?void 0:d.message:"required"),M=r!=="";break;case"min":r=oe.RulesMin.validate(t,(l=n[A])==null?void 0:l.value)?"":oe.RulesMin.message((p=n[A])!=null&&p.message?(h=n[A])==null?void 0:h.message:"very_small"),M=r!=="";break;case"max":r=oe.RulesMax.validate(t,(y=n[A])==null?void 0:y.value)?"":oe.RulesMax.message((m=n[A])!=null&&m.message?(w=n[A])==null?void 0:w.message:"vary_large"),M=r!=="";break;case"email":r=oe.RulesEmail.validate(t)?"":oe.RulesMax.message((x=n[A])!=null&&x.message?(k=n[A])==null?void 0:k.message:"email_incorrect"),M=r!=="";break;case"number":r=oe.RulesNumber.validate(t)?"":oe.RulesNumber.message((N=n[A])!=null&&N.message?(T=n[A])==null?void 0:T.message:"number_incorrect"),M=r!=="";break}}return r}}const ps=new fs,ms={style:{display:"flex","flex-direction":"column"}},hs={key:0,class:"d-label"},gs={key:0,class:"text-red"},ys={style:{display:"flex","flex-direction":"row"}},ks={style:{flex:"1",position:"relative"}},bs=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[e.createElementVNode("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41z",fill:"currentColor"})],-1)],Ss=["id","type","placeholder","disabled"],Cs=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[e.createElementVNode("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41z",fill:"currentColor"})],-1)],ws={key:1,class:"d-help"},_s={key:2,class:"d-error text-red"},Qt={__name:"DInputString",props:{form:Object,name:String,modelValue:String,label:String,error:String,help:String,placeholder:String,type:{type:String,default:"text"},pre:Object,post:Object,fieldRules:Object,scale:String,focus:Boolean,disabled:Boolean},emits:["update:modelValue","input","blur"],setup(o,{expose:t,emit:n}){const r=o,s=e.ref(r.error),a=Tt(),i=e.ref(!1),d=e.ref(null);//!props.form ? ref(null) : props.form.fields[props.name].ref
6
- const l=e.computed({get:()=>r.modelValue,set:M=>{n("update:modelValue",M)}}),p=e.computed(()=>r.type==="password"?"password":"text"),h=e.computed(()=>r.scale),y=M=>{n("input",M),m()},m=()=>{if(!(!r.form||!r.form.fields||!r.form.fields[r.name].rules))return s.value=ps.validate(l.value,r.form.fields[r.name].rules),!!s.value};e.onMounted(()=>{w()});const w=()=>{var M;(M=d.value)==null||M.focus()},x=()=>{l.value=""},k=M=>{i.value=M},N=M=>{s.value=M},T=M=>{n("blur",M)};return t({focus:w,setError:N,validate:m}),(M,A)=>{var O,L,I,F,V,X,q,_,b,D,j,le,ke,Be,Ne,Te,ne,Le,me,be,$e,Se,ue,Ye,ze,qe,Ke,Ge,Me,Ae,Ze,Je,Qe,et,Fe,tt,Ce,P,Ee;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["d-input-string",h.value])},[e.createElementVNode("div",ms,[r.label?(e.openBlock(),e.createElementBlock("div",hs,[e.createTextVNode(e.toDisplayString(r.label),1),(O=r.form)!=null&&O.fields[r.name].rules&&r.form.fields[r.name].rules.hasOwnProperty("required")?(e.openBlock(),e.createElementBlock("span",gs,"*")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",ys,[(I=(L=r.pre)==null?void 0:L.outside)!=null&&I.component?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["d-pre",r.disabled?"disabled":""])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent((V=(F=r.pre)==null?void 0:F.outside)==null?void 0:V.component)))],2)):(q=(X=r.pre)==null?void 0:X.outside)!=null&&q.text?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["d-pre",r.disabled?"disabled":""])},[e.createElementVNode("div",{class:e.normalizeClass(["d-text",i.value?"focused":""])},e.toDisplayString((b=(_=r.pre)==null?void 0:_.outside)==null?void 0:b.text),3)],2)):e.createCommentVNode("",!0),e.createElementVNode("div",ks,[(j=(D=r.pre)==null?void 0:D.inside)!=null&&j.action&&((ke=(le=r.pre)==null?void 0:le.inside)==null?void 0:ke.action)==="clear"&&((Be=l.value)==null?void 0:Be.length)>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:"d-pre-inside-button",onClick:x},bs)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{id:e.unref(a),ref_key:"inputRef",ref:d,"onUpdate:modelValue":A[0]||(A[0]=De=>l.value=De),style:{width:"100%"},type:p.value,placeholder:r.placeholder,onInput:y,onFocus:A[1]||(A[1]=De=>k(!0)),onBlur:T,onFocusout:A[2]||(A[2]=De=>k(!1)),class:e.normalizeClass([(Te=(Ne=r.pre)==null?void 0:Ne.outside)!=null&&Te.component||(Le=(ne=r.pre)==null?void 0:ne.outside)!=null&&Le.text?"has-pre":"",(be=(me=r.post)==null?void 0:me.outside)!=null&&be.component||(Se=($e=r.post)==null?void 0:$e.outside)!=null&&Se.text?"has-post":"",(Ye=(ue=r.pre)==null?void 0:ue.inside)!=null&&Ye.action?"has-pre-inside-button":"",(qe=(ze=r.post)==null?void 0:ze.inside)!=null&&qe.action?"has-post-inside-button":"",i.value?"focused":""]),disabled:r.disabled},null,42,Ss),[[e.vModelDynamic,l.value]]),(Ge=(Ke=r.post)==null?void 0:Ke.inside)!=null&&Ge.action&&((Ae=(Me=r.post)==null?void 0:Me.inside)==null?void 0:Ae.action)==="clear"&&((Ze=l.value)==null?void 0:Ze.length)>0?(e.openBlock(),e.createElementBlock("div",{key:1,class:"d-post-inside-button",onClick:x},Cs)):e.createCommentVNode("",!0)]),(Qe=(Je=r.post)==null?void 0:Je.outside)!=null&&Qe.component?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["d-post",r.disabled?"disabled":""])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent((Fe=(et=r.post)==null?void 0:et.outside)==null?void 0:Fe.component)))],2)):(Ce=(tt=r.post)==null?void 0:tt.outside)!=null&&Ce.text?(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(["d-post",r.disabled?"disabled":""])},[e.createElementVNode("div",{class:e.normalizeClass(["d-text",i.value?"focused":""])},e.toDisplayString((Ee=(P=r.post)==null?void 0:P.outside)==null?void 0:Ee.text),3)],2)):e.createCommentVNode("",!0)]),r.help?(e.openBlock(),e.createElementBlock("div",ws,e.toDisplayString(r.help),1)):e.createCommentVNode("",!0),s.value?(e.openBlock(),e.createElementBlock("div",_s,e.toDisplayString(s.value),1)):e.createCommentVNode("",!0)])],2)}}},xs={style:{"text-align":"center"}},Bs={__name:"DColorPicker",props:{modelValue:String,label:String,format:{type:String,default:"rgba"},title:{type:String,default:"Выбор цвета"},close:{type:String,default:"Закрыть"},select:{type:String,default:"Выбрать"}},emits:["update:modelValue"],setup(o,{emit:t}){const n=o;e.useCssVars(y=>({c187db06:r.value}));const r=e.computed({get:()=>n.modelValue,set:y=>{t("update:modelValue",y)}}),s=e.ref(null),a=e.ref(r),i=e.ref(null),d=y=>{i.value=n.format==="rgba"?y.rgba:y.hex},l=()=>{s.value.show()},p={outside:{component:e.h("div",{class:"color-indicator"})}},h=()=>{if(n.format==="rgba"){const{r:y,g:m,b:w,a:x}=i.value;r.value=`rgba(${y}, ${m}, ${w}, ${x})`}else r.value=i.value;s.value.hide()};return(y,m)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(Qt,{pre:p,label:n.label,modelValue:r.value,"onUpdate:modelValue":m[0]||(m[0]=w=>r.value=w),onClick:l},null,8,["label","modelValue"]),e.createVNode(Re,{ref_key:"modalRef",ref:s,width:"100%","max-width":"250px"},{"modal-title":e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.title),1)]),default:e.withCtx(()=>[e.createVNode(e.unref(Ve),{theme:e.unref(he).getters.theme(),color:a.value,"sucker-hide":!0,onChangeColor:d},null,8,["theme","color"])]),"modal-footer":e.withCtx(()=>[e.createElementVNode("div",xs,[e.createVNode(re,{onClick:m[1]||(m[1]=w=>s.value.hide())},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.close),1)]),_:1}),e.createVNode(re,{type:"success",onClick:h},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.select),1)]),_:1})])]),_:1},512)]))}};var ge;(function(o){o.Range="range",o.Steps="steps",o.Positions="positions",o.Count="count",o.Values="values"})(ge||(ge={}));var ee;(function(o){o[o.None=-1]="None",o[o.NoValue=0]="NoValue",o[o.LargeValue=1]="LargeValue",o[o.SmallValue=2]="SmallValue"})(ee||(ee={}));function $s(o){return Pe(o)&&typeof o.from=="function"}function Pe(o){return typeof o=="object"&&typeof o.to=="function"}function eo(o){o.parentElement.removeChild(o)}function St(o){return o!=null}function to(o){o.preventDefault()}function Es(o){return o.filter(function(t){return this[t]?!1:this[t]=!0},{})}function Ds(o,t){return Math.round(o/t)*t}function vs(o,t){var n=o.getBoundingClientRect(),r=o.ownerDocument,s=r.documentElement,a=ro(r);return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(a.x=0),t?n.top+a.y-s.clientTop:n.left+a.x-s.clientLeft}function ae(o){return typeof o=="number"&&!isNaN(o)&&isFinite(o)}function oo(o,t,n){n>0&&(J(o,t),setTimeout(function(){je(o,t)},n))}function no(o){return Math.max(Math.min(o,100),0)}function Oe(o){return Array.isArray(o)?o:[o]}function Vs(o){o=String(o);var t=o.split(".");return t.length>1?t[1].length:0}function J(o,t){o.classList&&!/\s/.test(t)?o.classList.add(t):o.className+=" "+t}function je(o,t){o.classList&&!/\s/.test(t)?o.classList.remove(t):o.className=o.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")}function Ns(o,t){return o.classList?o.classList.contains(t):new RegExp("\\b"+t+"\\b").test(o.className)}function ro(o){var t=window.pageXOffset!==void 0,n=(o.compatMode||"")==="CSS1Compat",r=t?window.pageXOffset:n?o.documentElement.scrollLeft:o.body.scrollLeft,s=t?window.pageYOffset:n?o.documentElement.scrollTop:o.body.scrollTop;return{x:r,y:s}}function Ts(){return window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"}}function Ls(){var o=!1;try{var t=Object.defineProperty({},"passive",{get:function(){o=!0}});window.addEventListener("test",null,t)}catch{}return o}function Ms(){return window.CSS&&CSS.supports&&CSS.supports("touch-action","none")}function Ct(o,t){return 100/(t-o)}function wt(o,t,n){return t*100/(o[n+1]-o[n])}function As(o,t){return wt(o,o[0]<0?t+Math.abs(o[0]):t-o[0],0)}function Fs(o,t){return t*(o[1]-o[0])/100+o[0]}function Ie(o,t){for(var n=1;o>=t[n];)n+=1;return n}function Hs(o,t,n){if(n>=o.slice(-1)[0])return 100;var r=Ie(n,o),s=o[r-1],a=o[r],i=t[r-1],d=t[r];return i+As([s,a],n)/Ct(i,d)}function Is(o,t,n){if(n>=100)return o.slice(-1)[0];var r=Ie(n,t),s=o[r-1],a=o[r],i=t[r-1],d=t[r];return Fs([s,a],(n-i)*Ct(i,d))}function zs(o,t,n,r){if(r===100)return r;var s=Ie(r,o),a=o[s-1],i=o[s];return n?r-a>(i-a)/2?i:a:t[s-1]?o[s-1]+Ds(r-o[s-1],t[s-1]):r}var so=function(){function o(t,n,r){this.xPct=[],this.xVal=[],this.xSteps=[],this.xNumSteps=[],this.xHighestCompleteStep=[],this.xSteps=[r||!1],this.xNumSteps=[!1],this.snap=n;var s,a=[];for(Object.keys(t).forEach(function(i){a.push([Oe(t[i]),i])}),a.sort(function(i,d){return i[0][0]-d[0][0]}),s=0;s<a.length;s++)this.handleEntryPoint(a[s][1],a[s][0]);for(this.xNumSteps=this.xSteps.slice(0),s=0;s<this.xNumSteps.length;s++)this.handleStepPoint(s,this.xNumSteps[s])}return o.prototype.getDistance=function(t){for(var n=[],r=0;r<this.xNumSteps.length-1;r++)n[r]=wt(this.xVal,t,r);return n},o.prototype.getAbsoluteDistance=function(t,n,r){var s=0;if(t<this.xPct[this.xPct.length-1])for(;t>this.xPct[s+1];)s++;else t===this.xPct[this.xPct.length-1]&&(s=this.xPct.length-2);!r&&t===this.xPct[s+1]&&s++,n===null&&(n=[]);var a,i=1,d=n[s],l=0,p=0,h=0,y=0;for(r?a=(t-this.xPct[s])/(this.xPct[s+1]-this.xPct[s]):a=(this.xPct[s+1]-t)/(this.xPct[s+1]-this.xPct[s]);d>0;)l=this.xPct[s+1+y]-this.xPct[s+y],n[s+y]*i+100-a*100>100?(p=l*a,i=(d-100*a)/n[s+y],a=1):(p=n[s+y]*l/100*i,i=0),r?(h=h-p,this.xPct.length+y>=1&&y--):(h=h+p,this.xPct.length-y>=1&&y++),d=n[s+y]*i;return t+h},o.prototype.toStepping=function(t){return t=Hs(this.xVal,this.xPct,t),t},o.prototype.fromStepping=function(t){return Is(this.xVal,this.xPct,t)},o.prototype.getStep=function(t){return t=zs(this.xPct,this.xSteps,this.snap,t),t},o.prototype.getDefaultStep=function(t,n,r){var s=Ie(t,this.xPct);return(t===100||n&&t===this.xPct[s-1])&&(s=Math.max(s-1,1)),(this.xVal[s]-this.xVal[s-1])/r},o.prototype.getNearbySteps=function(t){var n=Ie(t,this.xPct);return{stepBefore:{startValue:this.xVal[n-2],step:this.xNumSteps[n-2],highestStep:this.xHighestCompleteStep[n-2]},thisStep:{startValue:this.xVal[n-1],step:this.xNumSteps[n-1],highestStep:this.xHighestCompleteStep[n-1]},stepAfter:{startValue:this.xVal[n],step:this.xNumSteps[n],highestStep:this.xHighestCompleteStep[n]}}},o.prototype.countStepDecimals=function(){var t=this.xNumSteps.map(Vs);return Math.max.apply(null,t)},o.prototype.hasNoSize=function(){return this.xVal[0]===this.xVal[this.xVal.length-1]},o.prototype.convert=function(t){return this.getStep(this.toStepping(t))},o.prototype.handleEntryPoint=function(t,n){var r;if(t==="min"?r=0:t==="max"?r=100:r=parseFloat(t),!ae(r)||!ae(n[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");this.xPct.push(r),this.xVal.push(n[0]);var s=Number(n[1]);r?this.xSteps.push(isNaN(s)?!1:s):isNaN(s)||(this.xSteps[0]=s),this.xHighestCompleteStep.push(0)},o.prototype.handleStepPoint=function(t,n){if(n){if(this.xVal[t]===this.xVal[t+1]){this.xSteps[t]=this.xHighestCompleteStep[t]=this.xVal[t];return}this.xSteps[t]=wt([this.xVal[t],this.xVal[t+1]],n,0)/Ct(this.xPct[t],this.xPct[t+1]);var r=(this.xVal[t+1]-this.xVal[t])/this.xNumSteps[t],s=Math.ceil(Number(r.toFixed(3))-1),a=this.xVal[t]+this.xNumSteps[t]*s;this.xHighestCompleteStep[t]=a}},o}(),ao={to:function(o){return o===void 0?"":o.toFixed(2)},from:Number},io={target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",touchArea:"touch-area",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",connects:"connects",ltr:"ltr",rtl:"rtl",textDirectionLtr:"txt-dir-ltr",textDirectionRtl:"txt-dir-rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"},ye={tooltips:".__tooltips",aria:".__aria"};function Rs(o,t){if(!ae(t))throw new Error("noUiSlider: 'step' is not numeric.");o.singleStep=t}function Ps(o,t){if(!ae(t))throw new Error("noUiSlider: 'keyboardPageMultiplier' is not numeric.");o.keyboardPageMultiplier=t}function Os(o,t){if(!ae(t))throw new Error("noUiSlider: 'keyboardMultiplier' is not numeric.");o.keyboardMultiplier=t}function js(o,t){if(!ae(t))throw new Error("noUiSlider: 'keyboardDefaultStep' is not numeric.");o.keyboardDefaultStep=t}function Us(o,t){if(typeof t!="object"||Array.isArray(t))throw new Error("noUiSlider: 'range' is not an object.");if(t.min===void 0||t.max===void 0)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");o.spectrum=new so(t,o.snap||!1,o.singleStep)}function Ws(o,t){if(t=Oe(t),!Array.isArray(t)||!t.length)throw new Error("noUiSlider: 'start' option is incorrect.");o.handles=t.length,o.start=t}function Xs(o,t){if(typeof t!="boolean")throw new Error("noUiSlider: 'snap' option must be a boolean.");o.snap=t}function Ys(o,t){if(typeof t!="boolean")throw new Error("noUiSlider: 'animate' option must be a boolean.");o.animate=t}function qs(o,t){if(typeof t!="number")throw new Error("noUiSlider: 'animationDuration' option must be a number.");o.animationDuration=t}function Ks(o,t){var n=[!1],r;if(t==="lower"?t=[!0,!1]:t==="upper"&&(t=[!1,!0]),t===!0||t===!1){for(r=1;r<o.handles;r++)n.push(t);n.push(!1)}else{if(!Array.isArray(t)||!t.length||t.length!==o.handles+1)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");n=t}o.connect=n}function Gs(o,t){switch(t){case"horizontal":o.ort=0;break;case"vertical":o.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.")}}function lo(o,t){if(!ae(t))throw new Error("noUiSlider: 'margin' option must be numeric.");t!==0&&(o.margin=o.spectrum.getDistance(t))}function Zs(o,t){if(!ae(t))throw new Error("noUiSlider: 'limit' option must be numeric.");if(o.limit=o.spectrum.getDistance(t),!o.limit||o.handles<2)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders with 2 or more handles.")}function Js(o,t){var n;if(!ae(t)&&!Array.isArray(t))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(Array.isArray(t)&&!(t.length===2||ae(t[0])||ae(t[1])))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(t!==0){for(Array.isArray(t)||(t=[t,t]),o.padding=[o.spectrum.getDistance(t[0]),o.spectrum.getDistance(t[1])],n=0;n<o.spectrum.xNumSteps.length-1;n++)if(o.padding[0][n]<0||o.padding[1][n]<0)throw new Error("noUiSlider: 'padding' option must be a positive number(s).");var r=t[0]+t[1],s=o.spectrum.xVal[0],a=o.spectrum.xVal[o.spectrum.xVal.length-1];if(r/(a-s)>1)throw new Error("noUiSlider: 'padding' option must not exceed 100% of the range.")}}function Qs(o,t){switch(t){case"ltr":o.dir=0;break;case"rtl":o.dir=1;break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function ea(o,t){if(typeof t!="string")throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var n=t.indexOf("tap")>=0,r=t.indexOf("drag")>=0,s=t.indexOf("fixed")>=0,a=t.indexOf("snap")>=0,i=t.indexOf("hover")>=0,d=t.indexOf("unconstrained")>=0,l=t.indexOf("drag-all")>=0,p=t.indexOf("smooth-steps")>=0;if(s){if(o.handles!==2)throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");lo(o,o.start[1]-o.start[0])}if(d&&(o.margin||o.limit))throw new Error("noUiSlider: 'unconstrained' behaviour cannot be used with margin or limit");o.events={tap:n||a,drag:r,dragAll:l,smoothSteps:p,fixed:s,snap:a,hover:i,unconstrained:d}}function ta(o,t){if(t!==!1)if(t===!0||Pe(t)){o.tooltips=[];for(var n=0;n<o.handles;n++)o.tooltips.push(t)}else{if(t=Oe(t),t.length!==o.handles)throw new Error("noUiSlider: must pass a formatter for all handles.");t.forEach(function(r){if(typeof r!="boolean"&&!Pe(r))throw new Error("noUiSlider: 'tooltips' must be passed a formatter or 'false'.")}),o.tooltips=t}}function oa(o,t){if(t.length!==o.handles)throw new Error("noUiSlider: must pass a attributes for all handles.");o.handleAttributes=t}function na(o,t){if(!Pe(t))throw new Error("noUiSlider: 'ariaFormat' requires 'to' method.");o.ariaFormat=t}function ra(o,t){if(!$s(t))throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.");o.format=t}function sa(o,t){if(typeof t!="boolean")throw new Error("noUiSlider: 'keyboardSupport' option must be a boolean.");o.keyboardSupport=t}function aa(o,t){o.documentElement=t}function ia(o,t){if(typeof t!="string"&&t!==!1)throw new Error("noUiSlider: 'cssPrefix' must be a string or `false`.");o.cssPrefix=t}function la(o,t){if(typeof t!="object")throw new Error("noUiSlider: 'cssClasses' must be an object.");typeof o.cssPrefix=="string"?(o.cssClasses={},Object.keys(t).forEach(function(n){o.cssClasses[n]=o.cssPrefix+t[n]})):o.cssClasses=t}function co(o){var t={margin:null,limit:null,padding:null,animate:!0,animationDuration:300,ariaFormat:ao,format:ao},n={step:{r:!1,t:Rs},keyboardPageMultiplier:{r:!1,t:Ps},keyboardMultiplier:{r:!1,t:Os},keyboardDefaultStep:{r:!1,t:js},start:{r:!0,t:Ws},connect:{r:!0,t:Ks},direction:{r:!0,t:Qs},snap:{r:!1,t:Xs},animate:{r:!1,t:Ys},animationDuration:{r:!1,t:qs},range:{r:!0,t:Us},orientation:{r:!1,t:Gs},margin:{r:!1,t:lo},limit:{r:!1,t:Zs},padding:{r:!1,t:Js},behaviour:{r:!0,t:ea},ariaFormat:{r:!1,t:na},format:{r:!1,t:ra},tooltips:{r:!1,t:ta},keyboardSupport:{r:!0,t:sa},documentElement:{r:!1,t:aa},cssPrefix:{r:!0,t:ia},cssClasses:{r:!0,t:la},handleAttributes:{r:!1,t:oa}},r={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal",keyboardSupport:!0,cssPrefix:"noUi-",cssClasses:io,keyboardPageMultiplier:5,keyboardMultiplier:1,keyboardDefaultStep:10};o.format&&!o.ariaFormat&&(o.ariaFormat=o.format),Object.keys(n).forEach(function(l){if(!St(o[l])&&r[l]===void 0){if(n[l].r)throw new Error("noUiSlider: '"+l+"' is required.");return}n[l].t(t,St(o[l])?o[l]:r[l])}),t.pips=o.pips;var s=document.createElement("div"),a=s.style.msTransform!==void 0,i=s.style.transform!==void 0;t.transformRule=i?"transform":a?"msTransform":"webkitTransform";var d=[["left","top"],["right","bottom"]];return t.style=d[t.dir][t.ort],t}function ca(o,t,n){var r=Ts(),s=Ms(),a=s&&Ls(),i=o,d,l,p,h,y,m=t.spectrum,w=[],x=[],k=[],N=0,T={},M=o.ownerDocument,A=t.documentElement||M.documentElement,O=M.body,L=M.dir==="rtl"||t.ort===1?0:100;function I(c,u){var f=M.createElement("div");return u&&J(f,u),c.appendChild(f),f}function F(c,u){var f=I(c,t.cssClasses.origin),g=I(f,t.cssClasses.handle);if(I(g,t.cssClasses.touchArea),g.setAttribute("data-handle",String(u)),t.keyboardSupport&&(g.setAttribute("tabindex","0"),g.addEventListener("keydown",function(S){return Qe(S,u)})),t.handleAttributes!==void 0){var C=t.handleAttributes[u];Object.keys(C).forEach(function(S){g.setAttribute(S,C[S])})}return g.setAttribute("role","slider"),g.setAttribute("aria-orientation",t.ort?"vertical":"horizontal"),u===0?J(g,t.cssClasses.handleLower):u===t.handles-1&&J(g,t.cssClasses.handleUpper),f.handle=g,f}function V(c,u){return u?I(c,t.cssClasses.connect):!1}function X(c,u){var f=I(u,t.cssClasses.connects);l=[],p=[],p.push(V(f,c[0]));for(var g=0;g<t.handles;g++)l.push(F(u,g)),k[g]=g,p.push(V(f,c[g+1]))}function q(c){J(c,t.cssClasses.target),t.dir===0?J(c,t.cssClasses.ltr):J(c,t.cssClasses.rtl),t.ort===0?J(c,t.cssClasses.horizontal):J(c,t.cssClasses.vertical);var u=getComputedStyle(c).direction;return u==="rtl"?J(c,t.cssClasses.textDirectionRtl):J(c,t.cssClasses.textDirectionLtr),I(c,t.cssClasses.base)}function _(c,u){return!t.tooltips||!t.tooltips[u]?!1:I(c.firstChild,t.cssClasses.tooltip)}function b(){return i.hasAttribute("disabled")}function D(c){var u=l[c];return u.hasAttribute("disabled")}function j(c){c!=null?(l[c].setAttribute("disabled",""),l[c].handle.removeAttribute("tabindex")):(i.setAttribute("disabled",""),l.forEach(function(u){u.handle.removeAttribute("tabindex")}))}function le(c){c!=null?(l[c].removeAttribute("disabled"),l[c].handle.setAttribute("tabindex","0")):(i.removeAttribute("disabled"),l.forEach(function(u){u.removeAttribute("disabled"),u.handle.setAttribute("tabindex","0")}))}function ke(){y&&(Ce("update"+ye.tooltips),y.forEach(function(c){c&&eo(c)}),y=null)}function Be(){ke(),y=l.map(_),Fe("update"+ye.tooltips,function(c,u,f){if(!(!y||!t.tooltips)&&y[u]!==!1){var g=c[u];t.tooltips[u]!==!0&&(g=t.tooltips[u].to(f[u])),y[u].innerHTML=g}})}function Ne(){Ce("update"+ye.aria),Fe("update"+ye.aria,function(c,u,f,g,C){k.forEach(function(S){var v=l[S],$=Ee(x,S,0,!0,!0,!0),R=Ee(x,S,100,!0,!0,!0),z=C[S],U=String(t.ariaFormat.to(f[S]));$=m.fromStepping($).toFixed(1),R=m.fromStepping(R).toFixed(1),z=m.fromStepping(z).toFixed(1),v.children[0].setAttribute("aria-valuemin",$),v.children[0].setAttribute("aria-valuemax",R),v.children[0].setAttribute("aria-valuenow",z),v.children[0].setAttribute("aria-valuetext",U)})})}function Te(c){if(c.mode===ge.Range||c.mode===ge.Steps)return m.xVal;if(c.mode===ge.Count){if(c.values<2)throw new Error("noUiSlider: 'values' (>= 2) required for mode 'count'.");for(var u=c.values-1,f=100/u,g=[];u--;)g[u]=u*f;return g.push(100),ne(g,c.stepped)}return c.mode===ge.Positions?ne(c.values,c.stepped):c.mode===ge.Values?c.stepped?c.values.map(function(C){return m.fromStepping(m.getStep(m.toStepping(C)))}):c.values:[]}function ne(c,u){return c.map(function(f){return m.fromStepping(u?m.getStep(f):f)})}function Le(c){function u(z,U){return Number((z+U).toFixed(7))}var f=Te(c),g={},C=m.xVal[0],S=m.xVal[m.xVal.length-1],v=!1,$=!1,R=0;return f=Es(f.slice().sort(function(z,U){return z-U})),f[0]!==C&&(f.unshift(C),v=!0),f[f.length-1]!==S&&(f.push(S),$=!0),f.forEach(function(z,U){var W,H,Y,Q=z,K=f[U+1],G,Et,Dt,vt,_o,Vt,xo,Bo=c.mode===ge.Steps;for(Bo&&(W=m.xNumSteps[U]),W||(W=K-Q),K===void 0&&(K=Q),W=Math.max(W,1e-7),H=Q;H<=K;H=u(H,W)){for(G=m.toStepping(H),Et=G-R,_o=Et/(c.density||1),Vt=Math.round(_o),xo=Et/Vt,Y=1;Y<=Vt;Y+=1)Dt=R+Y*xo,g[Dt.toFixed(5)]=[m.fromStepping(Dt),0];vt=f.indexOf(H)>-1?ee.LargeValue:Bo?ee.SmallValue:ee.NoValue,!U&&v&&H!==K&&(vt=0),H===K&&$||(g[G.toFixed(5)]=[H,vt]),R=G}}),g}function me(c,u,f){var g,C,S=M.createElement("div"),v=(g={},g[ee.None]="",g[ee.NoValue]=t.cssClasses.valueNormal,g[ee.LargeValue]=t.cssClasses.valueLarge,g[ee.SmallValue]=t.cssClasses.valueSub,g),$=(C={},C[ee.None]="",C[ee.NoValue]=t.cssClasses.markerNormal,C[ee.LargeValue]=t.cssClasses.markerLarge,C[ee.SmallValue]=t.cssClasses.markerSub,C),R=[t.cssClasses.valueHorizontal,t.cssClasses.valueVertical],z=[t.cssClasses.markerHorizontal,t.cssClasses.markerVertical];J(S,t.cssClasses.pips),J(S,t.ort===0?t.cssClasses.pipsHorizontal:t.cssClasses.pipsVertical);function U(H,Y){var Q=Y===t.cssClasses.value,K=Q?R:z,G=Q?v:$;return Y+" "+K[t.ort]+" "+G[H]}function W(H,Y,Q){if(Q=u?u(Y,Q):Q,Q!==ee.None){var K=I(S,!1);K.className=U(Q,t.cssClasses.marker),K.style[t.style]=H+"%",Q>ee.NoValue&&(K=I(S,!1),K.className=U(Q,t.cssClasses.value),K.setAttribute("data-value",String(Y)),K.style[t.style]=H+"%",K.innerHTML=String(f.to(Y)))}}return Object.keys(c).forEach(function(H){W(H,c[H][0],c[H][1])}),S}function be(){h&&(eo(h),h=null)}function $e(c){be();var u=Le(c),f=c.filter,g=c.format||{to:function(C){return String(Math.round(C))}};return h=i.appendChild(me(u,f,g)),h}function Se(){var c=d.getBoundingClientRect(),u="offset"+["Width","Height"][t.ort];return t.ort===0?c.width||d[u]:c.height||d[u]}function ue(c,u,f,g){var C=function(v){var $=Ye(v,g.pageOffset,g.target||u);if(!$||b()&&!g.doNotReject||Ns(i,t.cssClasses.tap)&&!g.doNotReject||c===r.start&&$.buttons!==void 0&&$.buttons>1||g.hover&&$.buttons)return!1;a||$.preventDefault(),$.calcPoint=$.points[t.ort],f($,g)},S=[];return c.split(" ").forEach(function(v){u.addEventListener(v,C,a?{passive:!0}:!1),S.push([v,C])}),S}function Ye(c,u,f){var g=c.type.indexOf("touch")===0,C=c.type.indexOf("mouse")===0,S=c.type.indexOf("pointer")===0,v=0,$=0;if(c.type.indexOf("MSPointer")===0&&(S=!0),c.type==="mousedown"&&!c.buttons&&!c.touches)return!1;if(g){var R=function(W){var H=W.target;return H===f||f.contains(H)||c.composed&&c.composedPath().shift()===f};if(c.type==="touchstart"){var z=Array.prototype.filter.call(c.touches,R);if(z.length>1)return!1;v=z[0].pageX,$=z[0].pageY}else{var U=Array.prototype.find.call(c.changedTouches,R);if(!U)return!1;v=U.pageX,$=U.pageY}}return u=u||ro(M),(C||S)&&(v=c.clientX+u.x,$=c.clientY+u.y),c.pageOffset=u,c.points=[v,$],c.cursor=C||S,c}function ze(c){var u=c-vs(d,t.ort),f=u*100/Se();return f=no(f),t.dir?100-f:f}function qe(c){var u=100,f=!1;return l.forEach(function(g,C){if(!D(C)){var S=x[C],v=Math.abs(S-c),$=v===100&&u===100,R=v<u,z=v<=u&&c>S;(R||z||$)&&(f=C,u=v)}}),f}function Ke(c,u){c.type==="mouseout"&&c.target.nodeName==="HTML"&&c.relatedTarget===null&&Me(c,u)}function Ge(c,u){if(navigator.appVersion.indexOf("MSIE 9")===-1&&c.buttons===0&&u.buttonsProperty!==0)return Me(c,u);var f=(t.dir?-1:1)*(c.calcPoint-u.startCalcPoint),g=f*100/u.baseSize;yo(f>0,g,u.locations,u.handleNumbers,u.connect)}function Me(c,u){u.handle&&(je(u.handle,t.cssClasses.active),N-=1),u.listeners.forEach(function(f){A.removeEventListener(f[0],f[1])}),N===0&&(je(i,t.cssClasses.drag),$t(),c.cursor&&(O.style.cursor="",O.removeEventListener("selectstart",to))),t.events.smoothSteps&&(u.handleNumbers.forEach(function(f){ve(f,x[f],!0,!0,!1,!1)}),u.handleNumbers.forEach(function(f){P("update",f)})),u.handleNumbers.forEach(function(f){P("change",f),P("set",f),P("end",f)})}function Ae(c,u){if(!u.handleNumbers.some(D)){var f;if(u.handleNumbers.length===1){var g=l[u.handleNumbers[0]];f=g.children[0],N+=1,J(f,t.cssClasses.active)}c.stopPropagation();var C=[],S=ue(r.move,A,Ge,{target:c.target,handle:f,connect:u.connect,listeners:C,startCalcPoint:c.calcPoint,baseSize:Se(),pageOffset:c.pageOffset,handleNumbers:u.handleNumbers,buttonsProperty:c.buttons,locations:x.slice()}),v=ue(r.end,A,Me,{target:c.target,handle:f,listeners:C,doNotReject:!0,handleNumbers:u.handleNumbers}),$=ue("mouseout",A,Ke,{target:c.target,handle:f,listeners:C,doNotReject:!0,handleNumbers:u.handleNumbers});C.push.apply(C,S.concat(v,$)),c.cursor&&(O.style.cursor=getComputedStyle(c.target).cursor,l.length>1&&J(i,t.cssClasses.drag),O.addEventListener("selectstart",to,!1)),u.handleNumbers.forEach(function(R){P("start",R)})}}function Ze(c){c.stopPropagation();var u=ze(c.calcPoint),f=qe(u);f!==!1&&(t.events.snap||oo(i,t.cssClasses.tap,t.animationDuration),ve(f,u,!0,!0),$t(),P("slide",f,!0),P("update",f,!0),t.events.snap?Ae(c,{handleNumbers:[f]}):(P("change",f,!0),P("set",f,!0)))}function Je(c){var u=ze(c.calcPoint),f=m.getStep(u),g=m.fromStepping(f);Object.keys(T).forEach(function(C){C.split(".")[0]==="hover"&&T[C].forEach(function(S){S.call(nt,g)})})}function Qe(c,u){if(b()||D(u))return!1;var f=["Left","Right"],g=["Down","Up"],C=["PageDown","PageUp"],S=["Home","End"];t.dir&&!t.ort?f.reverse():t.ort&&!t.dir&&(g.reverse(),C.reverse());var v=c.key.replace("Arrow",""),$=v===C[0],R=v===C[1],z=v===g[0]||v===f[0]||$,U=v===g[1]||v===f[1]||R,W=v===S[0],H=v===S[1];if(!z&&!U&&!W&&!H)return!0;c.preventDefault();var Y;if(U||z){var Q=z?0:1,K=wo(u),G=K[Q];if(G===null)return!1;G===!1&&(G=m.getDefaultStep(x[u],z,t.keyboardDefaultStep)),R||$?G*=t.keyboardPageMultiplier:G*=t.keyboardMultiplier,G=Math.max(G,1e-7),G=(z?-1:1)*G,Y=w[u]+G}else H?Y=t.spectrum.xVal[t.spectrum.xVal.length-1]:Y=t.spectrum.xVal[0];return ve(u,m.toStepping(Y),!0,!0),P("slide",u),P("update",u),P("change",u),P("set",u),!1}function et(c){c.fixed||l.forEach(function(u,f){ue(r.start,u.children[0],Ae,{handleNumbers:[f]})}),c.tap&&ue(r.start,d,Ze,{}),c.hover&&ue(r.move,d,Je,{hover:!0}),c.drag&&p.forEach(function(u,f){if(!(u===!1||f===0||f===p.length-1)){var g=l[f-1],C=l[f],S=[u],v=[g,C],$=[f-1,f];J(u,t.cssClasses.draggable),c.fixed&&(S.push(g.children[0]),S.push(C.children[0])),c.dragAll&&(v=l,$=k),S.forEach(function(R){ue(r.start,R,Ae,{handles:v,handleNumbers:$,connect:u})})}})}function Fe(c,u){T[c]=T[c]||[],T[c].push(u),c.split(".")[0]==="update"&&l.forEach(function(f,g){P("update",g)})}function tt(c){return c===ye.aria||c===ye.tooltips}function Ce(c){var u=c&&c.split(".")[0],f=u?c.substring(u.length):c;Object.keys(T).forEach(function(g){var C=g.split(".")[0],S=g.substring(C.length);(!u||u===C)&&(!f||f===S)&&(!tt(S)||f===S)&&delete T[g]})}function P(c,u,f){Object.keys(T).forEach(function(g){var C=g.split(".")[0];c===C&&T[g].forEach(function(S){S.call(nt,w.map(t.format.to),u,w.slice(),f||!1,x.slice(),nt)})})}function Ee(c,u,f,g,C,S,v){var $;return l.length>1&&!t.events.unconstrained&&(g&&u>0&&($=m.getAbsoluteDistance(c[u-1],t.margin,!1),f=Math.max(f,$)),C&&u<l.length-1&&($=m.getAbsoluteDistance(c[u+1],t.margin,!0),f=Math.min(f,$))),l.length>1&&t.limit&&(g&&u>0&&($=m.getAbsoluteDistance(c[u-1],t.limit,!1),f=Math.min(f,$)),C&&u<l.length-1&&($=m.getAbsoluteDistance(c[u+1],t.limit,!0),f=Math.max(f,$))),t.padding&&(u===0&&($=m.getAbsoluteDistance(0,t.padding[0],!1),f=Math.max(f,$)),u===l.length-1&&($=m.getAbsoluteDistance(100,t.padding[1],!0),f=Math.min(f,$))),v||(f=m.getStep(f)),f=no(f),f===c[u]&&!S?!1:f}function De(c,u){var f=t.ort;return(f?u:c)+", "+(f?c:u)}function yo(c,u,f,g,C){var S=f.slice(),v=g[0],$=t.events.smoothSteps,R=[!c,c],z=[c,!c];g=g.slice(),c&&g.reverse(),g.length>1?g.forEach(function(W,H){var Y=Ee(S,W,S[W]+u,R[H],z[H],!1,$);Y===!1?u=0:(u=Y-S[W],S[W]=Y)}):R=z=[!0];var U=!1;g.forEach(function(W,H){U=ve(W,f[W]+u,R[H],z[H],!1,$)||U}),U&&(g.forEach(function(W){P("update",W),P("slide",W)}),C!=null&&P("drag",v))}function ko(c,u){return t.dir?100-c-u:c}function wa(c,u){x[c]=u,w[c]=m.fromStepping(u);var f=ko(u,0)-L,g="translate("+De(f+"%","0")+")";l[c].style[t.transformRule]=g,bo(c),bo(c+1)}function $t(){k.forEach(function(c){var u=x[c]>50?-1:1,f=3+(l.length+u*c);l[c].style.zIndex=String(f)})}function ve(c,u,f,g,C,S){return C||(u=Ee(x,c,u,f,g,!1,S)),u===!1?!1:(wa(c,u),!0)}function bo(c){if(p[c]){var u=0,f=100;c!==0&&(u=x[c-1]),c!==p.length-1&&(f=x[c]);var g=f-u,C="translate("+De(ko(u,g)+"%","0")+")",S="scale("+De(g/100,"1")+")";p[c].style[t.transformRule]=C+" "+S}}function So(c,u){return c===null||c===!1||c===void 0||(typeof c=="number"&&(c=String(c)),c=t.format.from(c),c!==!1&&(c=m.toStepping(c)),c===!1||isNaN(c))?x[u]:c}function ot(c,u,f){var g=Oe(c),C=x[0]===void 0;u=u===void 0?!0:u,t.animate&&!C&&oo(i,t.cssClasses.tap,t.animationDuration),k.forEach(function($){ve($,So(g[$],$),!0,!1,f)});var S=k.length===1?0:1;if(C&&m.hasNoSize()&&(f=!0,x[0]=0,k.length>1)){var v=100/(k.length-1);k.forEach(function($){x[$]=$*v})}for(;S<k.length;++S)k.forEach(function($){ve($,x[$],!0,!0,f)});$t(),k.forEach(function($){P("update",$),g[$]!==null&&u&&P("set",$)})}function _a(c){ot(t.start,c)}function xa(c,u,f,g){if(c=Number(c),!(c>=0&&c<k.length))throw new Error("noUiSlider: invalid handle number, got: "+c);ve(c,So(u,c),!0,!0,g),P("update",c),f&&P("set",c)}function Co(c){if(c===void 0&&(c=!1),c)return w.length===1?w[0]:w.slice(0);var u=w.map(t.format.to);return u.length===1?u[0]:u}function Ba(){for(Ce(ye.aria),Ce(ye.tooltips),Object.keys(t.cssClasses).forEach(function(c){je(i,t.cssClasses[c])});i.firstChild;)i.removeChild(i.firstChild);delete i.noUiSlider}function wo(c){var u=x[c],f=m.getNearbySteps(u),g=w[c],C=f.thisStep.step,S=null;if(t.snap)return[g-f.stepBefore.startValue||null,f.stepAfter.startValue-g||null];C!==!1&&g+C>f.stepAfter.startValue&&(C=f.stepAfter.startValue-g),g>f.thisStep.startValue?S=f.thisStep.step:f.stepBefore.step===!1?S=!1:S=g-f.stepBefore.highestStep,u===100?C=null:u===0&&(S=null);var v=m.countStepDecimals();return C!==null&&C!==!1&&(C=Number(C.toFixed(v))),S!==null&&S!==!1&&(S=Number(S.toFixed(v))),[S,C]}function $a(){return k.map(wo)}function Ea(c,u){var f=Co(),g=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips"];g.forEach(function(S){c[S]!==void 0&&(n[S]=c[S])});var C=co(n);g.forEach(function(S){c[S]!==void 0&&(t[S]=C[S])}),m=C.spectrum,t.margin=C.margin,t.limit=C.limit,t.padding=C.padding,t.pips?$e(t.pips):be(),t.tooltips?Be():ke(),x=[],ot(St(c.start)?c.start:f,u)}function Da(){d=q(i),X(t.connect,d),et(t.events),ot(t.start),t.pips&&$e(t.pips),t.tooltips&&Be(),Ne()}Da();var nt={destroy:Ba,steps:$a,on:Fe,off:Ce,get:Co,set:ot,setHandle:xa,reset:_a,disable:j,enable:le,__moveHandles:function(c,u,f){yo(c,u,x,f)},options:n,updateOptions:Ea,target:i,removePips:be,removeTooltips:ke,getPositions:function(){return x.slice()},getTooltips:function(){return y},getOrigins:function(){return l},pips:$e};return nt}function da(o,t){if(!o||!o.nodeName)throw new Error("noUiSlider: create requires a single element, got: "+o);if(o.noUiSlider)throw new Error("noUiSlider: Slider was already initialized.");var n=co(t),r=ca(o,n,t);return o.noUiSlider=r,r}const ua={__spectrum:so,cssClasses:io,create:da},fa={__name:"DRangeSlider",props:{start:{type:[Number,Array],default:40},connect:{type:[String,Array,Boolean],default:!1},tooltips:{type:[Boolean,String,Array,Function],default:!1},range:{type:Object,default:{min:0,max:100}},margin:{type:Number,default:null},limit:{type:Number,default:null},behaviour:{type:String,default:"tap"},padding:{type:[Number,Array],default:null},step:{type:Number,default:null},vertical:{type:Boolean,default:!1},reverse:{type:Boolean,default:!1},pips:{type:Object,default:null},animate:{type:Boolean,default:!0},duration:{type:Number,default:300},type:{type:String,default:"default"},selectable:{type:Boolean,default:!1},tooltipHide:{type:Boolean,default:!1}},emits:["start","slide","drag","update","change","set","end"],setup(o,{expose:t,emit:n}){const r=o,s="id"+Tt(),a=e.ref(null),i={start:r.start,connect:r.connect,range:r.range,margin:r.margin,limit:r.limit,behaviour:r.behaviour,padding:r.padding,step:r.step,orientation:r.vertical?"vertical":"horizontal",direction:r.reverse?"rtl":"ltr",tooltips:r.tooltips,pips:r.pips?{mode:"steps",density:3,format:r.pips}:null,animate:r.animate,animationDuration:r.duration};let d=null;return e.watch(()=>a.value,(m,w)=>{if(!r.selectable)return;const k=document.querySelector(`#${s}`).querySelectorAll("[data-handle]");for(let N in k)k.hasOwnProperty(N)&&k[N].classList.remove("selected");m!==null&&document.querySelector(`#${s} [data-handle="${m}"]`).classList.add("selected")}),e.onMounted(()=>{d=document.getElementById(s),ua.create(d,i),d.noUiSlider.on("start",(m,w,x,k,N,T)=>{a.value=w,n("start",{values:m,index:w,eunencoded:x,tap:k,positions:N,slider:T,selectedIndex:a})}),d.noUiSlider.on("slide",(m,w,x,k,N,T)=>{a.value=w,n("slide",{values:m,index:w,eunencoded:x,tap:k,positions:N,slider:T,selectedIndex:a})}),d.noUiSlider.on("drag",(m,w,x,k,N,T)=>{a.value=w,n("drag",{values:m,index:w,eunencoded:x,tap:k,positions:N,slider:T,selectedIndex:a})}),d.noUiSlider.on("update",(m,w,x,k,N,T)=>{a.value=w,n("update",{values:m,index:w,eunencoded:x,tap:k,positions:N,slider:T,selectedIndex:a})}),d.noUiSlider.on("change",(m,w,x,k,N,T)=>{a.value=w,n("change",{values:m,index:w,eunencoded:x,tap:k,positions:N,slider:T,selectedIndex:a})}),d.noUiSlider.on("set",(m,w,x,k,N,T)=>{a.value=w,n("set",{values:m,index:w,eunencoded:x,tap:k,positions:N,slider:T,selectedIndex:a})}),d.noUiSlider.on("end",(m,w,x,k,N,T)=>{a.value=w,n("end",{values:m,index:w,eunencoded:x,tap:k,positions:N,slider:T,selectedIndex:a})})}),t({get:()=>d.noUiSlider.get(),set:m=>{d.noUiSlider.set(m)},position:()=>d.noUiSlider.getPositions(),getSelectedIndex:()=>a.value}),(m,w)=>(e.openBlock(),e.createElementBlock("div",{id:s,class:e.normalizeClass(["slider-styled slider-round",[r.type,r.tooltipHide?"slider-tooltip-hide":null]])},null,2))}};class pa{constructor(t){this.fields=t}validate(){let t=!1;for(let n in this.fields)this.fields[n].ref.value.validate()===!0&&(t=!0);return!t}}const xe={state:{},getters:{getComponent(o){return xe.state[o]},getComponents(){return xe.state}},mutations:{addComponent(o,t){xe.state.name=t},addComponents(o){for(const t in o)o.hasOwnProperty(t)&&(xe.state[t]=o[t])}}},_t=o=>{typeof o=="string"&&(o={title:"",text:o}),typeof o=="object"&&te.emit("notification-add",o)};_t.close=o=>{te.emit("notification-close",o)};const ma=()=>({notify:_t}),ha={mounted:function(o,t){o.clickOutsideEvent=function(n){o===n.target||o.contains(n.target)||t.value(n,o)},document.addEventListener("click",o.clickOutsideEvent)},unmounted:function(o){document.removeEventListener("click",o.clickOutsideEvent)}},ga={beforeMount(o,t){o._keydownCallback=n=>{n.key===t.arg&&t.value()},document.addEventListener("keydown",o._keydownCallback)},unmounted(o,t){document.removeEventListener("keydown",o._keydownCallback),delete o._keydownCallback}},ya={beforeMount(o){o.focus()}};function uo(o){return o.type.indexOf("mouse")!==-1?o.clientX:o.touches[0].clientX}function fo(o){return o.type.indexOf("mouse")!==-1?o.clientY:o.touches[0].clientY}var ka=function(){var o=!1;try{var t=Object.defineProperty({},"passive",{get:function(){o=!0}});window.addEventListener("test",null,t)}catch{}return o}(),ba={disableClick:!1,tapTolerance:10,swipeTolerance:30,touchHoldTolerance:400,longTapTimeInterval:400,touchClass:"",dragFrequency:100,rollOverFrequency:100};function Ue(o){var t=this.$$touchObj,n=o.type.indexOf("touch")>=0,r=o.type.indexOf("mouse")>=0,s=this;n&&(t.lastTouchStartTime=o.timeStamp),!(r&&t.lastTouchStartTime&&o.timeStamp-t.lastTouchStartTime<350)&&(t.touchStarted||(go(this),t.touchStarted=!0,t.touchMoved=!1,t.swipeOutBounded=!1,t.startX=uo(o),t.startY=fo(o),t.currentX=0,t.currentY=0,t.touchStartTime=o.timeStamp,t.hasSwipe=ie(this,"swipe")||ie(this,"swipe.left")||ie(this,"swipe.right")||ie(this,"swipe.top")||ie(this,"swipe.bottom"),ie(this,"hold")&&(t.touchHoldTimer=setTimeout(function(){t.touchHoldTimer=null,de(o,s,"hold")},t.options.touchHoldTolerance)),de(o,this,"press")))}function We(o){var t=this.$$touchObj,n=uo(o),r=fo(o),s=t.currentX!==n||t.currentY!==r;if(t.currentX=n,t.currentY=r,t.touchMoved){if(t.hasSwipe&&!t.swipeOutBounded){var i=t.options.swipeTolerance;t.swipeOutBounded=Math.abs(t.startX-t.currentX)>i&&Math.abs(t.startY-t.currentY)>i}}else{var a=t.options.tapTolerance;t.touchMoved=Math.abs(t.startX-t.currentX)>a||Math.abs(t.startY-t.currentY)>a,t.touchMoved&&(Bt(t),de(o,this,"drag.once"))}if(ie(this,"rollover")&&s){var d=o.timeStamp,l=t.options.rollOverFrequency;(t.touchRollTime==null||d>t.touchRollTime+l)&&(t.touchRollTime=d,de(o,this,"rollover"))}if(ie(this,"drag")&&t.touchStarted&&t.touchMoved&&s){var d=o.timeStamp,l=t.options.dragFrequency;(t.touchDragTime==null||d>t.touchDragTime+l)&&(t.touchDragTime=d,de(o,this,"drag"))}}function po(){var o=this.$$touchObj;Bt(o),xt(this),o.touchStarted=o.touchMoved=!1,o.startX=o.startY=0}function Xe(o){var t=this.$$touchObj,n=o.type.indexOf("touch")>=0,r=o.type.indexOf("mouse")>=0;n&&(t.lastTouchEndTime=o.timeStamp);var s=n&&!t.touchHoldTimer;if(Bt(t),t.touchStarted=!1,xt(this),!(r&&t.lastTouchEndTime&&o.timeStamp-t.lastTouchEndTime<350))if(de(o,this,"release"),t.touchMoved){if(t.hasSwipe&&!t.swipeOutBounded){var a=t.options.swipeTolerance,i,d=Math.abs(t.startY-t.currentY),l=Math.abs(t.startX-t.currentX);(d>a||l>a)&&(d>a?i=t.startY>t.currentY?"top":"bottom":i=t.startX>t.currentX?"left":"right",ie(this,"swipe."+i)?de(o,this,"swipe."+i,i):de(o,this,"swipe",i))}}else if(ie(this,"longtap")&&o.timeStamp-t.touchStartTime>t.options.longTapTimeInterval)o.cancelable&&o.preventDefault(),de(o,this,"longtap");else if(ie(this,"hold")&&s){o.cancelable&&o.preventDefault();return}else de(o,this,"tap")}function mo(){go(this)}function ho(){xt(this)}function ie(o,t){var n=o.$$touchObj.callbacks[t];return n!=null&&n.length>0}function de(o,t,n,r){var s=t.$$touchObj,a=s.callbacks[n];if(a==null||a.length===0)return null;for(var i=0;i<a.length;i++){var d=a[i];d.modifiers.stop&&o.stopPropagation(),d.modifiers.prevent&&o.preventDefault(),!(d.modifiers.self&&o.target!==o.currentTarget)&&typeof d.value=="function"&&(r?d.value(r,o):d.value(o))}}function go(o){var t=o.$$touchObj.options.touchClass;t&&o.classList.add(t)}function xt(o){var t=o.$$touchObj.options.touchClass;t&&o.classList.remove(t)}function Bt(o){o.touchHoldTimer&&(clearTimeout(o.touchHoldTimer),o.touchHoldTimer=null)}function Sa(o,t){var n=o.$$touchObj||{callbacks:{},hasBindTouchEvents:!1,options:ba};return t&&(n.options=Object.assign({},n.options,t)),o.$$touchObj=n,o.$$touchObj}const Ca={beforeMount:function(o,t){const n=Sa(o);let r=ka?{passive:!0}:!1;const s=t.arg||"tap";switch(s){case"swipe":let a=t.modifiers;if(a.left||a.right||a.top||a.bottom){for(let i in t.modifiers)if(["left","right","top","bottom"].indexOf(i)>=0){let d="swipe."+i;n.callbacks[d]=n.callbacks[d]||[],n.callbacks[d].push(t)}}else n.callbacks.swipe=n.callbacks.swipe||[],n.callbacks.swipe.push(t);break;case"press":case"drag":t.modifiers.disablePassive&&(r=!1);default:n.callbacks[s]=n.callbacks[s]||[],n.callbacks[s].push(t)}n.hasBindTouchEvents||(o.addEventListener("touchstart",Ue,r),o.addEventListener("touchmove",We,r),o.addEventListener("touchcancel",po),o.addEventListener("touchend",Xe),n.options.disableClick||(o.addEventListener("mousedown",Ue),o.addEventListener("mousemove",We),o.addEventListener("mouseup",Xe),o.addEventListener("mouseenter",mo),o.addEventListener("mouseleave",ho)),n.hasBindTouchEvents=!0)},unmounted:function(o){o.removeEventListener("touchstart",Ue),o.removeEventListener("touchmove",We),o.removeEventListener("touchcancel",po),o.removeEventListener("touchend",Xe),o.$$touchObj&&!o.$$touchObj.options.disableClick&&(o.removeEventListener("mousedown",Ue),o.removeEventListener("mousemove",We),o.removeEventListener("mouseup",Xe),o.removeEventListener("mouseenter",mo),o.removeEventListener("mouseleave",ho)),delete o.$$touchObj}};B.DAccordion=an,B.DAlertDialog=Wt,B.DBadge=Lt,B.DButton=re,B.DCard=An,B.DCheckbox=ar,B.DCollapse=Mt,B.DColorPicker=Bs,B.DComponentStore=xe,B.DConfigProvider=pn,B.DConfirmDialog=Xt,B.DContextMenu=It,B.DDialogProvider=ir,B.DDrag=st,B.DDrop=Ht,B.DDropdown=Dn,B.DForm=pa,B.DGlobalStore=he,B.DGrid=wr,B.DIcon=fe,B.DIconStore=se,B.DImage=xr,B.DInfoProgress=or,B.DInput=Uo,B.DInputString=Qt,B.DLayoutAdmin=fn,B.DLayoutContent=jt,B.DLayoutFooter=Pt,B.DLayoutHeader=zt,B.DLayoutSidebar=Ot,B.DLayoutTab=Rt,B.DMenu=at,B.DModal=Re,B.DNotificationProvider=Zn,B.DPanel=Yt,B.DRangeSlider=fa,B.DScroll=hn,B.DScrollProvider=mn,B.DSelect=fr,B.DSwitcher=Nr,B.DTabs=Sr,B.DTextarea=Dr,B.DTransferStore=He,B.DTree=it,B.DTreeItem=At,B.DTreeStore=E,B.Rules=oe,B.alert=Zt,B.clickOutside=ha,B.confirm=Gt,B.emitter=te,B.eventsBus=Ft,B.focus=ya,B.keydown=ga,B.notify=_t,B.touch=Ca,B.useNotification=ma,Object.defineProperty(B,Symbol.toStringTag,{value:"Module"})});
6
+ const l=e.computed({get:()=>r.modelValue,set:M=>{n("update:modelValue",M)}}),p=e.computed(()=>r.type==="password"?"password":"text"),h=e.computed(()=>r.scale),y=M=>{n("input",M),m()},m=()=>{if(!(!r.form||!r.form.fields||!r.form.fields[r.name].rules))return s.value=ps.validate(l.value,r.form.fields[r.name].rules),!!s.value};e.onMounted(()=>{w()});const w=()=>{var M;(M=d.value)==null||M.focus()},x=()=>{l.value=""},k=M=>{i.value=M},N=M=>{s.value=M},T=M=>{n("blur",M)};return t({focus:w,setError:N,validate:m}),(M,A)=>{var O,L,I,F,V,X,q,_,b,D,j,le,ke,Be,Ne,Te,ne,Le,me,be,$e,Se,ue,Ye,ze,qe,Ke,Ge,Me,Ae,Ze,Je,Qe,et,Fe,tt,Ce,P,Ee;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["d-input-string",h.value])},[e.createElementVNode("div",ms,[r.label?(e.openBlock(),e.createElementBlock("div",hs,[e.createTextVNode(e.toDisplayString(r.label),1),(O=r.form)!=null&&O.fields[r.name].rules&&r.form.fields[r.name].rules.hasOwnProperty("required")?(e.openBlock(),e.createElementBlock("span",gs,"*")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",ys,[(I=(L=r.pre)==null?void 0:L.outside)!=null&&I.component?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["d-pre",r.disabled?"disabled":""])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent((V=(F=r.pre)==null?void 0:F.outside)==null?void 0:V.component)))],2)):(q=(X=r.pre)==null?void 0:X.outside)!=null&&q.text?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["d-pre",r.disabled?"disabled":""])},[e.createElementVNode("div",{class:e.normalizeClass(["d-text",i.value?"focused":""])},e.toDisplayString((b=(_=r.pre)==null?void 0:_.outside)==null?void 0:b.text),3)],2)):e.createCommentVNode("",!0),e.createElementVNode("div",ks,[(j=(D=r.pre)==null?void 0:D.inside)!=null&&j.action&&((ke=(le=r.pre)==null?void 0:le.inside)==null?void 0:ke.action)==="clear"&&((Be=l.value)==null?void 0:Be.length)>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:"d-pre-inside-button",onClick:x},bs)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{id:e.unref(a),ref_key:"inputRef",ref:d,"onUpdate:modelValue":A[0]||(A[0]=De=>l.value=De),style:{width:"100%"},type:p.value,placeholder:r.placeholder,onInput:y,onFocus:A[1]||(A[1]=De=>k(!0)),onBlur:T,onFocusout:A[2]||(A[2]=De=>k(!1)),class:e.normalizeClass([(Te=(Ne=r.pre)==null?void 0:Ne.outside)!=null&&Te.component||(Le=(ne=r.pre)==null?void 0:ne.outside)!=null&&Le.text?"has-pre":"",(be=(me=r.post)==null?void 0:me.outside)!=null&&be.component||(Se=($e=r.post)==null?void 0:$e.outside)!=null&&Se.text?"has-post":"",(Ye=(ue=r.pre)==null?void 0:ue.inside)!=null&&Ye.action?"has-pre-inside-button":"",(qe=(ze=r.post)==null?void 0:ze.inside)!=null&&qe.action?"has-post-inside-button":"",i.value?"focused":""]),disabled:r.disabled},null,42,Ss),[[e.vModelDynamic,l.value]]),(Ge=(Ke=r.post)==null?void 0:Ke.inside)!=null&&Ge.action&&((Ae=(Me=r.post)==null?void 0:Me.inside)==null?void 0:Ae.action)==="clear"&&((Ze=l.value)==null?void 0:Ze.length)>0?(e.openBlock(),e.createElementBlock("div",{key:1,class:"d-post-inside-button",onClick:x},Cs)):e.createCommentVNode("",!0)]),(Qe=(Je=r.post)==null?void 0:Je.outside)!=null&&Qe.component?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["d-post",r.disabled?"disabled":""])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent((Fe=(et=r.post)==null?void 0:et.outside)==null?void 0:Fe.component)))],2)):(Ce=(tt=r.post)==null?void 0:tt.outside)!=null&&Ce.text?(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(["d-post",r.disabled?"disabled":""])},[e.createElementVNode("div",{class:e.normalizeClass(["d-text",i.value?"focused":""])},e.toDisplayString((Ee=(P=r.post)==null?void 0:P.outside)==null?void 0:Ee.text),3)],2)):e.createCommentVNode("",!0)]),r.help?(e.openBlock(),e.createElementBlock("div",ws,e.toDisplayString(r.help),1)):e.createCommentVNode("",!0),s.value?(e.openBlock(),e.createElementBlock("div",_s,e.toDisplayString(s.value),1)):e.createCommentVNode("",!0)])],2)}}},xs={style:{"text-align":"center"}},Bs={__name:"DColorPicker",props:{modelValue:String,label:String,format:{type:String,default:"rgba"},title:{type:String,default:"Выбор цвета"},close:{type:String,default:"Закрыть"},select:{type:String,default:"Выбрать"}},emits:["update:modelValue"],setup(o,{emit:t}){const n=o;e.useCssVars(y=>({c187db06:r.value}));const r=e.computed({get:()=>n.modelValue,set:y=>{t("update:modelValue",y)}}),s=e.ref(null),a=e.ref(r),i=e.ref(null),d=y=>{i.value=n.format==="rgba"?y.rgba:y.hex},l=()=>{s.value.show()},p={outside:{component:e.h("div",{class:"color-indicator"})}},h=()=>{if(n.format==="rgba"){const{r:y,g:m,b:w,a:x}=i.value;r.value=`rgba(${y}, ${m}, ${w}, ${x})`}else r.value=i.value;s.value.hide()};return(y,m)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(Qt,{pre:p,label:n.label,modelValue:r.value,"onUpdate:modelValue":m[0]||(m[0]=w=>r.value=w),onClick:l},null,8,["label","modelValue"]),e.createVNode(Re,{ref_key:"modalRef",ref:s,width:"100%","max-width":"250px"},{"modal-title":e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.title),1)]),default:e.withCtx(()=>[e.createVNode(e.unref(Ve),{theme:e.unref(he).getters.theme(),color:a.value,"sucker-hide":!0,onChangeColor:d},null,8,["theme","color"])]),"modal-footer":e.withCtx(()=>[e.createElementVNode("div",xs,[e.createVNode(re,{onClick:m[1]||(m[1]=w=>s.value.hide())},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.close),1)]),_:1}),e.createVNode(re,{type:"success",onClick:h},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.select),1)]),_:1})])]),_:1},512)]))}};var ge;(function(o){o.Range="range",o.Steps="steps",o.Positions="positions",o.Count="count",o.Values="values"})(ge||(ge={}));var ee;(function(o){o[o.None=-1]="None",o[o.NoValue=0]="NoValue",o[o.LargeValue=1]="LargeValue",o[o.SmallValue=2]="SmallValue"})(ee||(ee={}));function $s(o){return Pe(o)&&typeof o.from=="function"}function Pe(o){return typeof o=="object"&&typeof o.to=="function"}function eo(o){o.parentElement.removeChild(o)}function St(o){return o!=null}function to(o){o.preventDefault()}function Es(o){return o.filter(function(t){return this[t]?!1:this[t]=!0},{})}function Ds(o,t){return Math.round(o/t)*t}function vs(o,t){var n=o.getBoundingClientRect(),r=o.ownerDocument,s=r.documentElement,a=ro(r);return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(a.x=0),t?n.top+a.y-s.clientTop:n.left+a.x-s.clientLeft}function ae(o){return typeof o=="number"&&!isNaN(o)&&isFinite(o)}function oo(o,t,n){n>0&&(J(o,t),setTimeout(function(){je(o,t)},n))}function no(o){return Math.max(Math.min(o,100),0)}function Oe(o){return Array.isArray(o)?o:[o]}function Vs(o){o=String(o);var t=o.split(".");return t.length>1?t[1].length:0}function J(o,t){o.classList&&!/\s/.test(t)?o.classList.add(t):o.className+=" "+t}function je(o,t){o.classList&&!/\s/.test(t)?o.classList.remove(t):o.className=o.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")}function Ns(o,t){return o.classList?o.classList.contains(t):new RegExp("\\b"+t+"\\b").test(o.className)}function ro(o){var t=window.pageXOffset!==void 0,n=(o.compatMode||"")==="CSS1Compat",r=t?window.pageXOffset:n?o.documentElement.scrollLeft:o.body.scrollLeft,s=t?window.pageYOffset:n?o.documentElement.scrollTop:o.body.scrollTop;return{x:r,y:s}}function Ts(){return window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"}}function Ls(){var o=!1;try{var t=Object.defineProperty({},"passive",{get:function(){o=!0}});window.addEventListener("test",null,t)}catch{}return o}function Ms(){return window.CSS&&CSS.supports&&CSS.supports("touch-action","none")}function Ct(o,t){return 100/(t-o)}function wt(o,t,n){return t*100/(o[n+1]-o[n])}function As(o,t){return wt(o,o[0]<0?t+Math.abs(o[0]):t-o[0],0)}function Fs(o,t){return t*(o[1]-o[0])/100+o[0]}function Ie(o,t){for(var n=1;o>=t[n];)n+=1;return n}function Hs(o,t,n){if(n>=o.slice(-1)[0])return 100;var r=Ie(n,o),s=o[r-1],a=o[r],i=t[r-1],d=t[r];return i+As([s,a],n)/Ct(i,d)}function Is(o,t,n){if(n>=100)return o.slice(-1)[0];var r=Ie(n,t),s=o[r-1],a=o[r],i=t[r-1],d=t[r];return Fs([s,a],(n-i)*Ct(i,d))}function zs(o,t,n,r){if(r===100)return r;var s=Ie(r,o),a=o[s-1],i=o[s];return n?r-a>(i-a)/2?i:a:t[s-1]?o[s-1]+Ds(r-o[s-1],t[s-1]):r}var so=function(){function o(t,n,r){this.xPct=[],this.xVal=[],this.xSteps=[],this.xNumSteps=[],this.xHighestCompleteStep=[],this.xSteps=[r||!1],this.xNumSteps=[!1],this.snap=n;var s,a=[];for(Object.keys(t).forEach(function(i){a.push([Oe(t[i]),i])}),a.sort(function(i,d){return i[0][0]-d[0][0]}),s=0;s<a.length;s++)this.handleEntryPoint(a[s][1],a[s][0]);for(this.xNumSteps=this.xSteps.slice(0),s=0;s<this.xNumSteps.length;s++)this.handleStepPoint(s,this.xNumSteps[s])}return o.prototype.getDistance=function(t){for(var n=[],r=0;r<this.xNumSteps.length-1;r++)n[r]=wt(this.xVal,t,r);return n},o.prototype.getAbsoluteDistance=function(t,n,r){var s=0;if(t<this.xPct[this.xPct.length-1])for(;t>this.xPct[s+1];)s++;else t===this.xPct[this.xPct.length-1]&&(s=this.xPct.length-2);!r&&t===this.xPct[s+1]&&s++,n===null&&(n=[]);var a,i=1,d=n[s],l=0,p=0,h=0,y=0;for(r?a=(t-this.xPct[s])/(this.xPct[s+1]-this.xPct[s]):a=(this.xPct[s+1]-t)/(this.xPct[s+1]-this.xPct[s]);d>0;)l=this.xPct[s+1+y]-this.xPct[s+y],n[s+y]*i+100-a*100>100?(p=l*a,i=(d-100*a)/n[s+y],a=1):(p=n[s+y]*l/100*i,i=0),r?(h=h-p,this.xPct.length+y>=1&&y--):(h=h+p,this.xPct.length-y>=1&&y++),d=n[s+y]*i;return t+h},o.prototype.toStepping=function(t){return t=Hs(this.xVal,this.xPct,t),t},o.prototype.fromStepping=function(t){return Is(this.xVal,this.xPct,t)},o.prototype.getStep=function(t){return t=zs(this.xPct,this.xSteps,this.snap,t),t},o.prototype.getDefaultStep=function(t,n,r){var s=Ie(t,this.xPct);return(t===100||n&&t===this.xPct[s-1])&&(s=Math.max(s-1,1)),(this.xVal[s]-this.xVal[s-1])/r},o.prototype.getNearbySteps=function(t){var n=Ie(t,this.xPct);return{stepBefore:{startValue:this.xVal[n-2],step:this.xNumSteps[n-2],highestStep:this.xHighestCompleteStep[n-2]},thisStep:{startValue:this.xVal[n-1],step:this.xNumSteps[n-1],highestStep:this.xHighestCompleteStep[n-1]},stepAfter:{startValue:this.xVal[n],step:this.xNumSteps[n],highestStep:this.xHighestCompleteStep[n]}}},o.prototype.countStepDecimals=function(){var t=this.xNumSteps.map(Vs);return Math.max.apply(null,t)},o.prototype.hasNoSize=function(){return this.xVal[0]===this.xVal[this.xVal.length-1]},o.prototype.convert=function(t){return this.getStep(this.toStepping(t))},o.prototype.handleEntryPoint=function(t,n){var r;if(t==="min"?r=0:t==="max"?r=100:r=parseFloat(t),!ae(r)||!ae(n[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");this.xPct.push(r),this.xVal.push(n[0]);var s=Number(n[1]);r?this.xSteps.push(isNaN(s)?!1:s):isNaN(s)||(this.xSteps[0]=s),this.xHighestCompleteStep.push(0)},o.prototype.handleStepPoint=function(t,n){if(n){if(this.xVal[t]===this.xVal[t+1]){this.xSteps[t]=this.xHighestCompleteStep[t]=this.xVal[t];return}this.xSteps[t]=wt([this.xVal[t],this.xVal[t+1]],n,0)/Ct(this.xPct[t],this.xPct[t+1]);var r=(this.xVal[t+1]-this.xVal[t])/this.xNumSteps[t],s=Math.ceil(Number(r.toFixed(3))-1),a=this.xVal[t]+this.xNumSteps[t]*s;this.xHighestCompleteStep[t]=a}},o}(),ao={to:function(o){return o===void 0?"":o.toFixed(2)},from:Number},io={target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",touchArea:"touch-area",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",connects:"connects",ltr:"ltr",rtl:"rtl",textDirectionLtr:"txt-dir-ltr",textDirectionRtl:"txt-dir-rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"},ye={tooltips:".__tooltips",aria:".__aria"};function Rs(o,t){if(!ae(t))throw new Error("noUiSlider: 'step' is not numeric.");o.singleStep=t}function Ps(o,t){if(!ae(t))throw new Error("noUiSlider: 'keyboardPageMultiplier' is not numeric.");o.keyboardPageMultiplier=t}function Os(o,t){if(!ae(t))throw new Error("noUiSlider: 'keyboardMultiplier' is not numeric.");o.keyboardMultiplier=t}function js(o,t){if(!ae(t))throw new Error("noUiSlider: 'keyboardDefaultStep' is not numeric.");o.keyboardDefaultStep=t}function Us(o,t){if(typeof t!="object"||Array.isArray(t))throw new Error("noUiSlider: 'range' is not an object.");if(t.min===void 0||t.max===void 0)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");o.spectrum=new so(t,o.snap||!1,o.singleStep)}function Ws(o,t){if(t=Oe(t),!Array.isArray(t)||!t.length)throw new Error("noUiSlider: 'start' option is incorrect.");o.handles=t.length,o.start=t}function Xs(o,t){if(typeof t!="boolean")throw new Error("noUiSlider: 'snap' option must be a boolean.");o.snap=t}function Ys(o,t){if(typeof t!="boolean")throw new Error("noUiSlider: 'animate' option must be a boolean.");o.animate=t}function qs(o,t){if(typeof t!="number")throw new Error("noUiSlider: 'animationDuration' option must be a number.");o.animationDuration=t}function Ks(o,t){var n=[!1],r;if(t==="lower"?t=[!0,!1]:t==="upper"&&(t=[!1,!0]),t===!0||t===!1){for(r=1;r<o.handles;r++)n.push(t);n.push(!1)}else{if(!Array.isArray(t)||!t.length||t.length!==o.handles+1)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");n=t}o.connect=n}function Gs(o,t){switch(t){case"horizontal":o.ort=0;break;case"vertical":o.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.")}}function lo(o,t){if(!ae(t))throw new Error("noUiSlider: 'margin' option must be numeric.");t!==0&&(o.margin=o.spectrum.getDistance(t))}function Zs(o,t){if(!ae(t))throw new Error("noUiSlider: 'limit' option must be numeric.");if(o.limit=o.spectrum.getDistance(t),!o.limit||o.handles<2)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders with 2 or more handles.")}function Js(o,t){var n;if(!ae(t)&&!Array.isArray(t))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(Array.isArray(t)&&!(t.length===2||ae(t[0])||ae(t[1])))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(t!==0){for(Array.isArray(t)||(t=[t,t]),o.padding=[o.spectrum.getDistance(t[0]),o.spectrum.getDistance(t[1])],n=0;n<o.spectrum.xNumSteps.length-1;n++)if(o.padding[0][n]<0||o.padding[1][n]<0)throw new Error("noUiSlider: 'padding' option must be a positive number(s).");var r=t[0]+t[1],s=o.spectrum.xVal[0],a=o.spectrum.xVal[o.spectrum.xVal.length-1];if(r/(a-s)>1)throw new Error("noUiSlider: 'padding' option must not exceed 100% of the range.")}}function Qs(o,t){switch(t){case"ltr":o.dir=0;break;case"rtl":o.dir=1;break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function ea(o,t){if(typeof t!="string")throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var n=t.indexOf("tap")>=0,r=t.indexOf("drag")>=0,s=t.indexOf("fixed")>=0,a=t.indexOf("snap")>=0,i=t.indexOf("hover")>=0,d=t.indexOf("unconstrained")>=0,l=t.indexOf("drag-all")>=0,p=t.indexOf("smooth-steps")>=0;if(s){if(o.handles!==2)throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");lo(o,o.start[1]-o.start[0])}if(d&&(o.margin||o.limit))throw new Error("noUiSlider: 'unconstrained' behaviour cannot be used with margin or limit");o.events={tap:n||a,drag:r,dragAll:l,smoothSteps:p,fixed:s,snap:a,hover:i,unconstrained:d}}function ta(o,t){if(t!==!1)if(t===!0||Pe(t)){o.tooltips=[];for(var n=0;n<o.handles;n++)o.tooltips.push(t)}else{if(t=Oe(t),t.length!==o.handles)throw new Error("noUiSlider: must pass a formatter for all handles.");t.forEach(function(r){if(typeof r!="boolean"&&!Pe(r))throw new Error("noUiSlider: 'tooltips' must be passed a formatter or 'false'.")}),o.tooltips=t}}function oa(o,t){if(t.length!==o.handles)throw new Error("noUiSlider: must pass a attributes for all handles.");o.handleAttributes=t}function na(o,t){if(!Pe(t))throw new Error("noUiSlider: 'ariaFormat' requires 'to' method.");o.ariaFormat=t}function ra(o,t){if(!$s(t))throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.");o.format=t}function sa(o,t){if(typeof t!="boolean")throw new Error("noUiSlider: 'keyboardSupport' option must be a boolean.");o.keyboardSupport=t}function aa(o,t){o.documentElement=t}function ia(o,t){if(typeof t!="string"&&t!==!1)throw new Error("noUiSlider: 'cssPrefix' must be a string or `false`.");o.cssPrefix=t}function la(o,t){if(typeof t!="object")throw new Error("noUiSlider: 'cssClasses' must be an object.");typeof o.cssPrefix=="string"?(o.cssClasses={},Object.keys(t).forEach(function(n){o.cssClasses[n]=o.cssPrefix+t[n]})):o.cssClasses=t}function co(o){var t={margin:null,limit:null,padding:null,animate:!0,animationDuration:300,ariaFormat:ao,format:ao},n={step:{r:!1,t:Rs},keyboardPageMultiplier:{r:!1,t:Ps},keyboardMultiplier:{r:!1,t:Os},keyboardDefaultStep:{r:!1,t:js},start:{r:!0,t:Ws},connect:{r:!0,t:Ks},direction:{r:!0,t:Qs},snap:{r:!1,t:Xs},animate:{r:!1,t:Ys},animationDuration:{r:!1,t:qs},range:{r:!0,t:Us},orientation:{r:!1,t:Gs},margin:{r:!1,t:lo},limit:{r:!1,t:Zs},padding:{r:!1,t:Js},behaviour:{r:!0,t:ea},ariaFormat:{r:!1,t:na},format:{r:!1,t:ra},tooltips:{r:!1,t:ta},keyboardSupport:{r:!0,t:sa},documentElement:{r:!1,t:aa},cssPrefix:{r:!0,t:ia},cssClasses:{r:!0,t:la},handleAttributes:{r:!1,t:oa}},r={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal",keyboardSupport:!0,cssPrefix:"noUi-",cssClasses:io,keyboardPageMultiplier:5,keyboardMultiplier:1,keyboardDefaultStep:10};o.format&&!o.ariaFormat&&(o.ariaFormat=o.format),Object.keys(n).forEach(function(l){if(!St(o[l])&&r[l]===void 0){if(n[l].r)throw new Error("noUiSlider: '"+l+"' is required.");return}n[l].t(t,St(o[l])?o[l]:r[l])}),t.pips=o.pips;var s=document.createElement("div"),a=s.style.msTransform!==void 0,i=s.style.transform!==void 0;t.transformRule=i?"transform":a?"msTransform":"webkitTransform";var d=[["left","top"],["right","bottom"]];return t.style=d[t.dir][t.ort],t}function ca(o,t,n){var r=Ts(),s=Ms(),a=s&&Ls(),i=o,d,l,p,h,y,m=t.spectrum,w=[],x=[],k=[],N=0,T={},M=o.ownerDocument,A=t.documentElement||M.documentElement,O=M.body,L=M.dir==="rtl"||t.ort===1?0:100;function I(c,u){var f=M.createElement("div");return u&&J(f,u),c.appendChild(f),f}function F(c,u){var f=I(c,t.cssClasses.origin),g=I(f,t.cssClasses.handle);if(I(g,t.cssClasses.touchArea),g.setAttribute("data-handle",String(u)),t.keyboardSupport&&(g.setAttribute("tabindex","0"),g.addEventListener("keydown",function(S){return Qe(S,u)})),t.handleAttributes!==void 0){var C=t.handleAttributes[u];Object.keys(C).forEach(function(S){g.setAttribute(S,C[S])})}return g.setAttribute("role","slider"),g.setAttribute("aria-orientation",t.ort?"vertical":"horizontal"),u===0?J(g,t.cssClasses.handleLower):u===t.handles-1&&J(g,t.cssClasses.handleUpper),f.handle=g,f}function V(c,u){return u?I(c,t.cssClasses.connect):!1}function X(c,u){var f=I(u,t.cssClasses.connects);l=[],p=[],p.push(V(f,c[0]));for(var g=0;g<t.handles;g++)l.push(F(u,g)),k[g]=g,p.push(V(f,c[g+1]))}function q(c){J(c,t.cssClasses.target),t.dir===0?J(c,t.cssClasses.ltr):J(c,t.cssClasses.rtl),t.ort===0?J(c,t.cssClasses.horizontal):J(c,t.cssClasses.vertical);var u=getComputedStyle(c).direction;return u==="rtl"?J(c,t.cssClasses.textDirectionRtl):J(c,t.cssClasses.textDirectionLtr),I(c,t.cssClasses.base)}function _(c,u){return!t.tooltips||!t.tooltips[u]?!1:I(c.firstChild,t.cssClasses.tooltip)}function b(){return i.hasAttribute("disabled")}function D(c){var u=l[c];return u.hasAttribute("disabled")}function j(c){c!=null?(l[c].setAttribute("disabled",""),l[c].handle.removeAttribute("tabindex")):(i.setAttribute("disabled",""),l.forEach(function(u){u.handle.removeAttribute("tabindex")}))}function le(c){c!=null?(l[c].removeAttribute("disabled"),l[c].handle.setAttribute("tabindex","0")):(i.removeAttribute("disabled"),l.forEach(function(u){u.removeAttribute("disabled"),u.handle.setAttribute("tabindex","0")}))}function ke(){y&&(Ce("update"+ye.tooltips),y.forEach(function(c){c&&eo(c)}),y=null)}function Be(){ke(),y=l.map(_),Fe("update"+ye.tooltips,function(c,u,f){if(!(!y||!t.tooltips)&&y[u]!==!1){var g=c[u];t.tooltips[u]!==!0&&(g=t.tooltips[u].to(f[u])),y[u].innerHTML=g}})}function Ne(){Ce("update"+ye.aria),Fe("update"+ye.aria,function(c,u,f,g,C){k.forEach(function(S){var v=l[S],$=Ee(x,S,0,!0,!0,!0),R=Ee(x,S,100,!0,!0,!0),z=C[S],U=String(t.ariaFormat.to(f[S]));$=m.fromStepping($).toFixed(1),R=m.fromStepping(R).toFixed(1),z=m.fromStepping(z).toFixed(1),v.children[0].setAttribute("aria-valuemin",$),v.children[0].setAttribute("aria-valuemax",R),v.children[0].setAttribute("aria-valuenow",z),v.children[0].setAttribute("aria-valuetext",U)})})}function Te(c){if(c.mode===ge.Range||c.mode===ge.Steps)return m.xVal;if(c.mode===ge.Count){if(c.values<2)throw new Error("noUiSlider: 'values' (>= 2) required for mode 'count'.");for(var u=c.values-1,f=100/u,g=[];u--;)g[u]=u*f;return g.push(100),ne(g,c.stepped)}return c.mode===ge.Positions?ne(c.values,c.stepped):c.mode===ge.Values?c.stepped?c.values.map(function(C){return m.fromStepping(m.getStep(m.toStepping(C)))}):c.values:[]}function ne(c,u){return c.map(function(f){return m.fromStepping(u?m.getStep(f):f)})}function Le(c){function u(z,U){return Number((z+U).toFixed(7))}var f=Te(c),g={},C=m.xVal[0],S=m.xVal[m.xVal.length-1],v=!1,$=!1,R=0;return f=Es(f.slice().sort(function(z,U){return z-U})),f[0]!==C&&(f.unshift(C),v=!0),f[f.length-1]!==S&&(f.push(S),$=!0),f.forEach(function(z,U){var W,H,Y,Q=z,K=f[U+1],G,Et,Dt,vt,_o,Vt,xo,Bo=c.mode===ge.Steps;for(Bo&&(W=m.xNumSteps[U]),W||(W=K-Q),K===void 0&&(K=Q),W=Math.max(W,1e-7),H=Q;H<=K;H=u(H,W)){for(G=m.toStepping(H),Et=G-R,_o=Et/(c.density||1),Vt=Math.round(_o),xo=Et/Vt,Y=1;Y<=Vt;Y+=1)Dt=R+Y*xo,g[Dt.toFixed(5)]=[m.fromStepping(Dt),0];vt=f.indexOf(H)>-1?ee.LargeValue:Bo?ee.SmallValue:ee.NoValue,!U&&v&&H!==K&&(vt=0),H===K&&$||(g[G.toFixed(5)]=[H,vt]),R=G}}),g}function me(c,u,f){var g,C,S=M.createElement("div"),v=(g={},g[ee.None]="",g[ee.NoValue]=t.cssClasses.valueNormal,g[ee.LargeValue]=t.cssClasses.valueLarge,g[ee.SmallValue]=t.cssClasses.valueSub,g),$=(C={},C[ee.None]="",C[ee.NoValue]=t.cssClasses.markerNormal,C[ee.LargeValue]=t.cssClasses.markerLarge,C[ee.SmallValue]=t.cssClasses.markerSub,C),R=[t.cssClasses.valueHorizontal,t.cssClasses.valueVertical],z=[t.cssClasses.markerHorizontal,t.cssClasses.markerVertical];J(S,t.cssClasses.pips),J(S,t.ort===0?t.cssClasses.pipsHorizontal:t.cssClasses.pipsVertical);function U(H,Y){var Q=Y===t.cssClasses.value,K=Q?R:z,G=Q?v:$;return Y+" "+K[t.ort]+" "+G[H]}function W(H,Y,Q){if(Q=u?u(Y,Q):Q,Q!==ee.None){var K=I(S,!1);K.className=U(Q,t.cssClasses.marker),K.style[t.style]=H+"%",Q>ee.NoValue&&(K=I(S,!1),K.className=U(Q,t.cssClasses.value),K.setAttribute("data-value",String(Y)),K.style[t.style]=H+"%",K.innerHTML=String(f.to(Y)))}}return Object.keys(c).forEach(function(H){W(H,c[H][0],c[H][1])}),S}function be(){h&&(eo(h),h=null)}function $e(c){be();var u=Le(c),f=c.filter,g=c.format||{to:function(C){return String(Math.round(C))}};return h=i.appendChild(me(u,f,g)),h}function Se(){var c=d.getBoundingClientRect(),u="offset"+["Width","Height"][t.ort];return t.ort===0?c.width||d[u]:c.height||d[u]}function ue(c,u,f,g){var C=function(v){var $=Ye(v,g.pageOffset,g.target||u);if(!$||b()&&!g.doNotReject||Ns(i,t.cssClasses.tap)&&!g.doNotReject||c===r.start&&$.buttons!==void 0&&$.buttons>1||g.hover&&$.buttons)return!1;a||$.preventDefault(),$.calcPoint=$.points[t.ort],f($,g)},S=[];return c.split(" ").forEach(function(v){u.addEventListener(v,C,a?{passive:!0}:!1),S.push([v,C])}),S}function Ye(c,u,f){var g=c.type.indexOf("touch")===0,C=c.type.indexOf("mouse")===0,S=c.type.indexOf("pointer")===0,v=0,$=0;if(c.type.indexOf("MSPointer")===0&&(S=!0),c.type==="mousedown"&&!c.buttons&&!c.touches)return!1;if(g){var R=function(W){var H=W.target;return H===f||f.contains(H)||c.composed&&c.composedPath().shift()===f};if(c.type==="touchstart"){var z=Array.prototype.filter.call(c.touches,R);if(z.length>1)return!1;v=z[0].pageX,$=z[0].pageY}else{var U=Array.prototype.find.call(c.changedTouches,R);if(!U)return!1;v=U.pageX,$=U.pageY}}return u=u||ro(M),(C||S)&&(v=c.clientX+u.x,$=c.clientY+u.y),c.pageOffset=u,c.points=[v,$],c.cursor=C||S,c}function ze(c){var u=c-vs(d,t.ort),f=u*100/Se();return f=no(f),t.dir?100-f:f}function qe(c){var u=100,f=!1;return l.forEach(function(g,C){if(!D(C)){var S=x[C],v=Math.abs(S-c),$=v===100&&u===100,R=v<u,z=v<=u&&c>S;(R||z||$)&&(f=C,u=v)}}),f}function Ke(c,u){c.type==="mouseout"&&c.target.nodeName==="HTML"&&c.relatedTarget===null&&Me(c,u)}function Ge(c,u){if(navigator.appVersion.indexOf("MSIE 9")===-1&&c.buttons===0&&u.buttonsProperty!==0)return Me(c,u);var f=(t.dir?-1:1)*(c.calcPoint-u.startCalcPoint),g=f*100/u.baseSize;yo(f>0,g,u.locations,u.handleNumbers,u.connect)}function Me(c,u){u.handle&&(je(u.handle,t.cssClasses.active),N-=1),u.listeners.forEach(function(f){A.removeEventListener(f[0],f[1])}),N===0&&(je(i,t.cssClasses.drag),$t(),c.cursor&&(O.style.cursor="",O.removeEventListener("selectstart",to))),t.events.smoothSteps&&(u.handleNumbers.forEach(function(f){ve(f,x[f],!0,!0,!1,!1)}),u.handleNumbers.forEach(function(f){P("update",f)})),u.handleNumbers.forEach(function(f){P("change",f),P("set",f),P("end",f)})}function Ae(c,u){if(!u.handleNumbers.some(D)){var f;if(u.handleNumbers.length===1){var g=l[u.handleNumbers[0]];f=g.children[0],N+=1,J(f,t.cssClasses.active)}c.stopPropagation();var C=[],S=ue(r.move,A,Ge,{target:c.target,handle:f,connect:u.connect,listeners:C,startCalcPoint:c.calcPoint,baseSize:Se(),pageOffset:c.pageOffset,handleNumbers:u.handleNumbers,buttonsProperty:c.buttons,locations:x.slice()}),v=ue(r.end,A,Me,{target:c.target,handle:f,listeners:C,doNotReject:!0,handleNumbers:u.handleNumbers}),$=ue("mouseout",A,Ke,{target:c.target,handle:f,listeners:C,doNotReject:!0,handleNumbers:u.handleNumbers});C.push.apply(C,S.concat(v,$)),c.cursor&&(O.style.cursor=getComputedStyle(c.target).cursor,l.length>1&&J(i,t.cssClasses.drag),O.addEventListener("selectstart",to,!1)),u.handleNumbers.forEach(function(R){P("start",R)})}}function Ze(c){c.stopPropagation();var u=ze(c.calcPoint),f=qe(u);f!==!1&&(t.events.snap||oo(i,t.cssClasses.tap,t.animationDuration),ve(f,u,!0,!0),$t(),P("slide",f,!0),P("update",f,!0),t.events.snap?Ae(c,{handleNumbers:[f]}):(P("change",f,!0),P("set",f,!0)))}function Je(c){var u=ze(c.calcPoint),f=m.getStep(u),g=m.fromStepping(f);Object.keys(T).forEach(function(C){C.split(".")[0]==="hover"&&T[C].forEach(function(S){S.call(nt,g)})})}function Qe(c,u){if(b()||D(u))return!1;var f=["Left","Right"],g=["Down","Up"],C=["PageDown","PageUp"],S=["Home","End"];t.dir&&!t.ort?f.reverse():t.ort&&!t.dir&&(g.reverse(),C.reverse());var v=c.key.replace("Arrow",""),$=v===C[0],R=v===C[1],z=v===g[0]||v===f[0]||$,U=v===g[1]||v===f[1]||R,W=v===S[0],H=v===S[1];if(!z&&!U&&!W&&!H)return!0;c.preventDefault();var Y;if(U||z){var Q=z?0:1,K=wo(u),G=K[Q];if(G===null)return!1;G===!1&&(G=m.getDefaultStep(x[u],z,t.keyboardDefaultStep)),R||$?G*=t.keyboardPageMultiplier:G*=t.keyboardMultiplier,G=Math.max(G,1e-7),G=(z?-1:1)*G,Y=w[u]+G}else H?Y=t.spectrum.xVal[t.spectrum.xVal.length-1]:Y=t.spectrum.xVal[0];return ve(u,m.toStepping(Y),!0,!0),P("slide",u),P("update",u),P("change",u),P("set",u),!1}function et(c){c.fixed||l.forEach(function(u,f){ue(r.start,u.children[0],Ae,{handleNumbers:[f]})}),c.tap&&ue(r.start,d,Ze,{}),c.hover&&ue(r.move,d,Je,{hover:!0}),c.drag&&p.forEach(function(u,f){if(!(u===!1||f===0||f===p.length-1)){var g=l[f-1],C=l[f],S=[u],v=[g,C],$=[f-1,f];J(u,t.cssClasses.draggable),c.fixed&&(S.push(g.children[0]),S.push(C.children[0])),c.dragAll&&(v=l,$=k),S.forEach(function(R){ue(r.start,R,Ae,{handles:v,handleNumbers:$,connect:u})})}})}function Fe(c,u){T[c]=T[c]||[],T[c].push(u),c.split(".")[0]==="update"&&l.forEach(function(f,g){P("update",g)})}function tt(c){return c===ye.aria||c===ye.tooltips}function Ce(c){var u=c&&c.split(".")[0],f=u?c.substring(u.length):c;Object.keys(T).forEach(function(g){var C=g.split(".")[0],S=g.substring(C.length);(!u||u===C)&&(!f||f===S)&&(!tt(S)||f===S)&&delete T[g]})}function P(c,u,f){Object.keys(T).forEach(function(g){var C=g.split(".")[0];c===C&&T[g].forEach(function(S){S.call(nt,w.map(t.format.to),u,w.slice(),f||!1,x.slice(),nt)})})}function Ee(c,u,f,g,C,S,v){var $;return l.length>1&&!t.events.unconstrained&&(g&&u>0&&($=m.getAbsoluteDistance(c[u-1],t.margin,!1),f=Math.max(f,$)),C&&u<l.length-1&&($=m.getAbsoluteDistance(c[u+1],t.margin,!0),f=Math.min(f,$))),l.length>1&&t.limit&&(g&&u>0&&($=m.getAbsoluteDistance(c[u-1],t.limit,!1),f=Math.min(f,$)),C&&u<l.length-1&&($=m.getAbsoluteDistance(c[u+1],t.limit,!0),f=Math.max(f,$))),t.padding&&(u===0&&($=m.getAbsoluteDistance(0,t.padding[0],!1),f=Math.max(f,$)),u===l.length-1&&($=m.getAbsoluteDistance(100,t.padding[1],!0),f=Math.min(f,$))),v||(f=m.getStep(f)),f=no(f),f===c[u]&&!S?!1:f}function De(c,u){var f=t.ort;return(f?u:c)+", "+(f?c:u)}function yo(c,u,f,g,C){var S=f.slice(),v=g[0],$=t.events.smoothSteps,R=[!c,c],z=[c,!c];g=g.slice(),c&&g.reverse(),g.length>1?g.forEach(function(W,H){var Y=Ee(S,W,S[W]+u,R[H],z[H],!1,$);Y===!1?u=0:(u=Y-S[W],S[W]=Y)}):R=z=[!0];var U=!1;g.forEach(function(W,H){U=ve(W,f[W]+u,R[H],z[H],!1,$)||U}),U&&(g.forEach(function(W){P("update",W),P("slide",W)}),C!=null&&P("drag",v))}function ko(c,u){return t.dir?100-c-u:c}function wa(c,u){x[c]=u,w[c]=m.fromStepping(u);var f=ko(u,0)-L,g="translate("+De(f+"%","0")+")";l[c].style[t.transformRule]=g,bo(c),bo(c+1)}function $t(){k.forEach(function(c){var u=x[c]>50?-1:1,f=3+(l.length+u*c);l[c].style.zIndex=String(f)})}function ve(c,u,f,g,C,S){return C||(u=Ee(x,c,u,f,g,!1,S)),u===!1?!1:(wa(c,u),!0)}function bo(c){if(p[c]){var u=0,f=100;c!==0&&(u=x[c-1]),c!==p.length-1&&(f=x[c]);var g=f-u,C="translate("+De(ko(u,g)+"%","0")+")",S="scale("+De(g/100,"1")+")";p[c].style[t.transformRule]=C+" "+S}}function So(c,u){return c===null||c===!1||c===void 0||(typeof c=="number"&&(c=String(c)),c=t.format.from(c),c!==!1&&(c=m.toStepping(c)),c===!1||isNaN(c))?x[u]:c}function ot(c,u,f){var g=Oe(c),C=x[0]===void 0;u=u===void 0?!0:u,t.animate&&!C&&oo(i,t.cssClasses.tap,t.animationDuration),k.forEach(function($){ve($,So(g[$],$),!0,!1,f)});var S=k.length===1?0:1;if(C&&m.hasNoSize()&&(f=!0,x[0]=0,k.length>1)){var v=100/(k.length-1);k.forEach(function($){x[$]=$*v})}for(;S<k.length;++S)k.forEach(function($){ve($,x[$],!0,!0,f)});$t(),k.forEach(function($){P("update",$),g[$]!==null&&u&&P("set",$)})}function _a(c){ot(t.start,c)}function xa(c,u,f,g){if(c=Number(c),!(c>=0&&c<k.length))throw new Error("noUiSlider: invalid handle number, got: "+c);ve(c,So(u,c),!0,!0,g),P("update",c),f&&P("set",c)}function Co(c){if(c===void 0&&(c=!1),c)return w.length===1?w[0]:w.slice(0);var u=w.map(t.format.to);return u.length===1?u[0]:u}function Ba(){for(Ce(ye.aria),Ce(ye.tooltips),Object.keys(t.cssClasses).forEach(function(c){je(i,t.cssClasses[c])});i.firstChild;)i.removeChild(i.firstChild);delete i.noUiSlider}function wo(c){var u=x[c],f=m.getNearbySteps(u),g=w[c],C=f.thisStep.step,S=null;if(t.snap)return[g-f.stepBefore.startValue||null,f.stepAfter.startValue-g||null];C!==!1&&g+C>f.stepAfter.startValue&&(C=f.stepAfter.startValue-g),g>f.thisStep.startValue?S=f.thisStep.step:f.stepBefore.step===!1?S=!1:S=g-f.stepBefore.highestStep,u===100?C=null:u===0&&(S=null);var v=m.countStepDecimals();return C!==null&&C!==!1&&(C=Number(C.toFixed(v))),S!==null&&S!==!1&&(S=Number(S.toFixed(v))),[S,C]}function $a(){return k.map(wo)}function Ea(c,u){var f=Co(),g=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips"];g.forEach(function(S){c[S]!==void 0&&(n[S]=c[S])});var C=co(n);g.forEach(function(S){c[S]!==void 0&&(t[S]=C[S])}),m=C.spectrum,t.margin=C.margin,t.limit=C.limit,t.padding=C.padding,t.pips?$e(t.pips):be(),t.tooltips?Be():ke(),x=[],ot(St(c.start)?c.start:f,u)}function Da(){d=q(i),X(t.connect,d),et(t.events),ot(t.start),t.pips&&$e(t.pips),t.tooltips&&Be(),Ne()}Da();var nt={destroy:Ba,steps:$a,on:Fe,off:Ce,get:Co,set:ot,setHandle:xa,reset:_a,disable:j,enable:le,__moveHandles:function(c,u,f){yo(c,u,x,f)},options:n,updateOptions:Ea,target:i,removePips:be,removeTooltips:ke,getPositions:function(){return x.slice()},getTooltips:function(){return y},getOrigins:function(){return l},pips:$e};return nt}function da(o,t){if(!o||!o.nodeName)throw new Error("noUiSlider: create requires a single element, got: "+o);if(o.noUiSlider)throw new Error("noUiSlider: Slider was already initialized.");var n=co(t),r=ca(o,n,t);return o.noUiSlider=r,r}const ua={__spectrum:so,cssClasses:io,create:da},fa={__name:"DRangeSlider",props:{start:{type:[Number,Array],default:40},connect:{type:[String,Array,Boolean],default:!1},tooltips:{type:[Boolean,String,Array,Function],default:!1},range:{type:Object,default:{min:0,max:100}},margin:{type:Number,default:null},limit:{type:Number,default:null},behaviour:{type:String,default:"tap"},padding:{type:[Number,Array],default:null},step:{type:Number,default:null},vertical:{type:Boolean,default:!1},reverse:{type:Boolean,default:!1},pips:{type:Object,default:null},animate:{type:Boolean,default:!0},duration:{type:Number,default:300},type:{type:String,default:"default"},selectable:{type:Boolean,default:!1},tooltipHide:{type:Boolean,default:!1}},emits:["start","slide","drag","update","change","set","end"],setup(o,{expose:t,emit:n}){const r=o,s="id"+Tt(),a=e.ref(null),i={start:r.start,connect:r.connect,range:r.range,margin:r.margin,limit:r.limit,behaviour:r.behaviour,padding:r.padding,step:r.step,orientation:r.vertical?"vertical":"horizontal",direction:r.reverse?"rtl":"ltr",tooltips:r.tooltips,pips:r.pips?r.pips:null,animate:r.animate,animationDuration:r.duration};let d=null;return e.watch(()=>a.value,(m,w)=>{if(!r.selectable)return;const k=document.querySelector(`#${s}`).querySelectorAll("[data-handle]");for(let N in k)k.hasOwnProperty(N)&&k[N].classList.remove("selected");m!==null&&document.querySelector(`#${s} [data-handle="${m}"]`).classList.add("selected")}),e.onMounted(()=>{d=document.getElementById(s),ua.create(d,i),d.noUiSlider.on("start",(m,w,x,k,N,T)=>{a.value=w,n("start",{values:m,index:w,eunencoded:x,tap:k,positions:N,slider:T,selectedIndex:a})}),d.noUiSlider.on("slide",(m,w,x,k,N,T)=>{a.value=w,n("slide",{values:m,index:w,eunencoded:x,tap:k,positions:N,slider:T,selectedIndex:a})}),d.noUiSlider.on("drag",(m,w,x,k,N,T)=>{a.value=w,n("drag",{values:m,index:w,eunencoded:x,tap:k,positions:N,slider:T,selectedIndex:a})}),d.noUiSlider.on("update",(m,w,x,k,N,T)=>{a.value=w,n("update",{values:m,index:w,eunencoded:x,tap:k,positions:N,slider:T,selectedIndex:a})}),d.noUiSlider.on("change",(m,w,x,k,N,T)=>{a.value=w,n("change",{values:m,index:w,eunencoded:x,tap:k,positions:N,slider:T,selectedIndex:a})}),d.noUiSlider.on("set",(m,w,x,k,N,T)=>{a.value=w,n("set",{values:m,index:w,eunencoded:x,tap:k,positions:N,slider:T,selectedIndex:a})}),d.noUiSlider.on("end",(m,w,x,k,N,T)=>{a.value=w,n("end",{values:m,index:w,eunencoded:x,tap:k,positions:N,slider:T,selectedIndex:a})})}),t({get:()=>d.noUiSlider.get(),set:m=>{d.noUiSlider.set(m)},position:()=>d.noUiSlider.getPositions(),getSelectedIndex:()=>a.value}),(m,w)=>(e.openBlock(),e.createElementBlock("div",{id:s,class:e.normalizeClass(["slider-styled slider-round",[r.type,r.tooltipHide?"slider-tooltip-hide":null]])},null,2))}};class pa{constructor(t){this.fields=t}validate(){let t=!1;for(let n in this.fields)this.fields[n].ref.value.validate()===!0&&(t=!0);return!t}}const xe={state:{},getters:{getComponent(o){return xe.state[o]},getComponents(){return xe.state}},mutations:{addComponent(o,t){xe.state.name=t},addComponents(o){for(const t in o)o.hasOwnProperty(t)&&(xe.state[t]=o[t])}}},_t=o=>{typeof o=="string"&&(o={title:"",text:o}),typeof o=="object"&&te.emit("notification-add",o)};_t.close=o=>{te.emit("notification-close",o)};const ma=()=>({notify:_t}),ha={mounted:function(o,t){o.clickOutsideEvent=function(n){o===n.target||o.contains(n.target)||t.value(n,o)},document.addEventListener("click",o.clickOutsideEvent)},unmounted:function(o){document.removeEventListener("click",o.clickOutsideEvent)}},ga={beforeMount(o,t){o._keydownCallback=n=>{n.key===t.arg&&t.value()},document.addEventListener("keydown",o._keydownCallback)},unmounted(o,t){document.removeEventListener("keydown",o._keydownCallback),delete o._keydownCallback}},ya={beforeMount(o){o.focus()}};function uo(o){return o.type.indexOf("mouse")!==-1?o.clientX:o.touches[0].clientX}function fo(o){return o.type.indexOf("mouse")!==-1?o.clientY:o.touches[0].clientY}var ka=function(){var o=!1;try{var t=Object.defineProperty({},"passive",{get:function(){o=!0}});window.addEventListener("test",null,t)}catch{}return o}(),ba={disableClick:!1,tapTolerance:10,swipeTolerance:30,touchHoldTolerance:400,longTapTimeInterval:400,touchClass:"",dragFrequency:100,rollOverFrequency:100};function Ue(o){var t=this.$$touchObj,n=o.type.indexOf("touch")>=0,r=o.type.indexOf("mouse")>=0,s=this;n&&(t.lastTouchStartTime=o.timeStamp),!(r&&t.lastTouchStartTime&&o.timeStamp-t.lastTouchStartTime<350)&&(t.touchStarted||(go(this),t.touchStarted=!0,t.touchMoved=!1,t.swipeOutBounded=!1,t.startX=uo(o),t.startY=fo(o),t.currentX=0,t.currentY=0,t.touchStartTime=o.timeStamp,t.hasSwipe=ie(this,"swipe")||ie(this,"swipe.left")||ie(this,"swipe.right")||ie(this,"swipe.top")||ie(this,"swipe.bottom"),ie(this,"hold")&&(t.touchHoldTimer=setTimeout(function(){t.touchHoldTimer=null,de(o,s,"hold")},t.options.touchHoldTolerance)),de(o,this,"press")))}function We(o){var t=this.$$touchObj,n=uo(o),r=fo(o),s=t.currentX!==n||t.currentY!==r;if(t.currentX=n,t.currentY=r,t.touchMoved){if(t.hasSwipe&&!t.swipeOutBounded){var i=t.options.swipeTolerance;t.swipeOutBounded=Math.abs(t.startX-t.currentX)>i&&Math.abs(t.startY-t.currentY)>i}}else{var a=t.options.tapTolerance;t.touchMoved=Math.abs(t.startX-t.currentX)>a||Math.abs(t.startY-t.currentY)>a,t.touchMoved&&(Bt(t),de(o,this,"drag.once"))}if(ie(this,"rollover")&&s){var d=o.timeStamp,l=t.options.rollOverFrequency;(t.touchRollTime==null||d>t.touchRollTime+l)&&(t.touchRollTime=d,de(o,this,"rollover"))}if(ie(this,"drag")&&t.touchStarted&&t.touchMoved&&s){var d=o.timeStamp,l=t.options.dragFrequency;(t.touchDragTime==null||d>t.touchDragTime+l)&&(t.touchDragTime=d,de(o,this,"drag"))}}function po(){var o=this.$$touchObj;Bt(o),xt(this),o.touchStarted=o.touchMoved=!1,o.startX=o.startY=0}function Xe(o){var t=this.$$touchObj,n=o.type.indexOf("touch")>=0,r=o.type.indexOf("mouse")>=0;n&&(t.lastTouchEndTime=o.timeStamp);var s=n&&!t.touchHoldTimer;if(Bt(t),t.touchStarted=!1,xt(this),!(r&&t.lastTouchEndTime&&o.timeStamp-t.lastTouchEndTime<350))if(de(o,this,"release"),t.touchMoved){if(t.hasSwipe&&!t.swipeOutBounded){var a=t.options.swipeTolerance,i,d=Math.abs(t.startY-t.currentY),l=Math.abs(t.startX-t.currentX);(d>a||l>a)&&(d>a?i=t.startY>t.currentY?"top":"bottom":i=t.startX>t.currentX?"left":"right",ie(this,"swipe."+i)?de(o,this,"swipe."+i,i):de(o,this,"swipe",i))}}else if(ie(this,"longtap")&&o.timeStamp-t.touchStartTime>t.options.longTapTimeInterval)o.cancelable&&o.preventDefault(),de(o,this,"longtap");else if(ie(this,"hold")&&s){o.cancelable&&o.preventDefault();return}else de(o,this,"tap")}function mo(){go(this)}function ho(){xt(this)}function ie(o,t){var n=o.$$touchObj.callbacks[t];return n!=null&&n.length>0}function de(o,t,n,r){var s=t.$$touchObj,a=s.callbacks[n];if(a==null||a.length===0)return null;for(var i=0;i<a.length;i++){var d=a[i];d.modifiers.stop&&o.stopPropagation(),d.modifiers.prevent&&o.preventDefault(),!(d.modifiers.self&&o.target!==o.currentTarget)&&typeof d.value=="function"&&(r?d.value(r,o):d.value(o))}}function go(o){var t=o.$$touchObj.options.touchClass;t&&o.classList.add(t)}function xt(o){var t=o.$$touchObj.options.touchClass;t&&o.classList.remove(t)}function Bt(o){o.touchHoldTimer&&(clearTimeout(o.touchHoldTimer),o.touchHoldTimer=null)}function Sa(o,t){var n=o.$$touchObj||{callbacks:{},hasBindTouchEvents:!1,options:ba};return t&&(n.options=Object.assign({},n.options,t)),o.$$touchObj=n,o.$$touchObj}const Ca={beforeMount:function(o,t){const n=Sa(o);let r=ka?{passive:!0}:!1;const s=t.arg||"tap";switch(s){case"swipe":let a=t.modifiers;if(a.left||a.right||a.top||a.bottom){for(let i in t.modifiers)if(["left","right","top","bottom"].indexOf(i)>=0){let d="swipe."+i;n.callbacks[d]=n.callbacks[d]||[],n.callbacks[d].push(t)}}else n.callbacks.swipe=n.callbacks.swipe||[],n.callbacks.swipe.push(t);break;case"press":case"drag":t.modifiers.disablePassive&&(r=!1);default:n.callbacks[s]=n.callbacks[s]||[],n.callbacks[s].push(t)}n.hasBindTouchEvents||(o.addEventListener("touchstart",Ue,r),o.addEventListener("touchmove",We,r),o.addEventListener("touchcancel",po),o.addEventListener("touchend",Xe),n.options.disableClick||(o.addEventListener("mousedown",Ue),o.addEventListener("mousemove",We),o.addEventListener("mouseup",Xe),o.addEventListener("mouseenter",mo),o.addEventListener("mouseleave",ho)),n.hasBindTouchEvents=!0)},unmounted:function(o){o.removeEventListener("touchstart",Ue),o.removeEventListener("touchmove",We),o.removeEventListener("touchcancel",po),o.removeEventListener("touchend",Xe),o.$$touchObj&&!o.$$touchObj.options.disableClick&&(o.removeEventListener("mousedown",Ue),o.removeEventListener("mousemove",We),o.removeEventListener("mouseup",Xe),o.removeEventListener("mouseenter",mo),o.removeEventListener("mouseleave",ho)),delete o.$$touchObj}};B.DAccordion=an,B.DAlertDialog=Wt,B.DBadge=Lt,B.DButton=re,B.DCard=An,B.DCheckbox=ar,B.DCollapse=Mt,B.DColorPicker=Bs,B.DComponentStore=xe,B.DConfigProvider=pn,B.DConfirmDialog=Xt,B.DContextMenu=It,B.DDialogProvider=ir,B.DDrag=st,B.DDrop=Ht,B.DDropdown=Dn,B.DForm=pa,B.DGlobalStore=he,B.DGrid=wr,B.DIcon=fe,B.DIconStore=se,B.DImage=xr,B.DInfoProgress=or,B.DInput=Uo,B.DInputString=Qt,B.DLayoutAdmin=fn,B.DLayoutContent=jt,B.DLayoutFooter=Pt,B.DLayoutHeader=zt,B.DLayoutSidebar=Ot,B.DLayoutTab=Rt,B.DMenu=at,B.DModal=Re,B.DNotificationProvider=Zn,B.DPanel=Yt,B.DRangeSlider=fa,B.DScroll=hn,B.DScrollProvider=mn,B.DSelect=fr,B.DSwitcher=Nr,B.DTabs=Sr,B.DTextarea=Dr,B.DTransferStore=He,B.DTree=it,B.DTreeItem=At,B.DTreeStore=E,B.Rules=oe,B.alert=Zt,B.clickOutside=ha,B.confirm=Gt,B.emitter=te,B.eventsBus=Ft,B.focus=ya,B.keydown=ga,B.notify=_t,B.touch=Ca,B.useNotification=ma,Object.defineProperty(B,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "doph-js",
3
- "version": "0.3.19",
3
+ "version": "0.3.20",
4
4
  "description": "Simple Vue3 component library",
5
5
  "author": "Error202",
6
6
  "license": "MIT",