!function(){function e(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function n(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var t,a,o=[],u=!0,i=!1;try{for(r=r.call(e);!(u=(t=r.next()).done)&&(o.push(t.value),!n||o.length!==n);u=!0);}catch(l){i=!0,a=l}finally{try{u||null==r.return||r.return()}finally{if(i)throw a}}return o}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return r(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return r(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,n){(null==n||n>e.length)&&(n=e.length);for(var r=0,t=new Array(n);r=+n.max})),E=s((function(){return{width:p(n.inputWidth),height:p(n.buttonSize)}})),L=s((function(){return d(n.buttonSize)})),N=function(e){n.beforeChange?S(n.beforeChange,{args:[e],done:function(){P.value=e}}):P.value=e},O=function(){if("plus"===t&&j.value||"minus"===t&&A.value)I("overlimit",t);else{var e="minus"===t?-n.step:+n.step,r=M(z(+P.value,e));N(r),I(t)}},F=function(e){var r=e.target,t=r.value,a=n.decimalLength,o=_(String(t),!n.integer);if(y(a)&&o.includes(".")){var u=o.split(".");o="".concat(u[0],".").concat(u[1].slice(0,+a))}n.beforeChange?r.value=String(P.value):B(t,o)||(r.value=o);var i=o===String(+o);N(i?+o:o)},W=function(e){var r;n.disableInput?null==(r=C.value)||r.blur():I("focus",e)},G=function(e){var n=e.target,r=M(n.value);n.value=String(r),P.value=r,w((function(){I("blur",e),x()}))},H=function e(){V=setTimeout((function(){O(),e()}),200)},U=function(){n.longPress&&(i=!1,clearTimeout(V),V=setTimeout((function(){i=!0,O(),H()}),600))},X=function(e){n.longPress&&(clearTimeout(V),i&&k(e))},$=function(e){n.disableInput&&k(e)},q=function(e){return{onClick:function(n){k(n),t=e,O()},onTouchstart:function(){t=e,U()},onTouchend:X,onTouchcancel:X}};return v((function(){return[n.max,n.min,n.integer,n.decimalLength]}),(function(){var e=M(P.value);B(e,P.value)||(P.value=e)})),v((function(){return n.modelValue}),(function(e){B(e,P.value)||(P.value=M(e))})),v(P,(function(e){I("update:modelValue",e),I("change",e,{name:n.name})})),c((function(){return n.modelValue})),function(){return b("div",{role:"group",class:T([n.theme])},[m(b("button",g({type:"button",style:L.value,class:[T("minus",{disabled:A.value}),e({},h,!A.value)],"aria-disabled":A.value||void 0},q("minus")),null),[[f,n.showMinus]]),m(b("input",{ref:C,type:n.integer?"tel":"text",role:"spinbutton",class:T("input"),value:P.value,style:E.value,disabled:n.disabled,readonly:n.disableInput,inputmode:n.integer?"numeric":"decimal",placeholder:n.placeholder,"aria-valuemax":n.max,"aria-valuemin":n.min,"aria-valuenow":P.value,onBlur:G,onInput:F,onFocus:W,onMousedown:$},null),[[f,n.showInput]]),m(b("button",g({type:"button",style:L.value,class:[T("plus",{disabled:j.value}),e({},h,!j.value)],"aria-disabled":j.value||void 0},q("plus")),null),[[f,n.showPlus]])])}}});r("S",V(P))}}}))}();