PageSourceSearch

https://frontiersnorth.com/_nuxt/B3Mh2Hyb.js

js frontiersnorth.com collected 2026-10-02 05:45:06 UTC 4,405 bytes, 22 lines download raw bytes

1import{au as f,aC as c,aD as m,aJ as h,aT as y,e as s,o as p,F as g,X as v,ac as T,f as I,z as k,a9 as b}from"./D_LWL9om.js";var w=`
2    .p-inputotp {
3        display: flex;
4        align-items: center;
5        gap: dt('inputotp.gap');
6    }
7
8    .p-inputotp-input {
9        text-align: center;
10        width: dt('inputotp.input.width');
11    }
12
13    .p-inputotp-input.p-inputtext-sm {
14        text-align: center;
15        width: dt('inputotp.input.sm.width');
16    }
17
18    .p-inputotp-input.p-inputtext-lg {
19        text-align: center;
20        width: dt('inputotp.input.lg.width');
21    }
22`,x={root:"p-inputotp p-component",pcInputText:"p-inputotp-input"},N=f.extend({name:"inputotp",style:w,classes:x}),P={name:"BaseInputOtp",extends:m,props:{readonly:{type:Boolean,default:!1},tabindex:{type:Number,default:null},length:{type:Number,default:4},mask:{type:Boolean,default:!1},integerOnly:{type:Boolean,default:!1}},style:N,provide:function(){return{$pcInputOtp:this,$parentInstance:this}}},D={name:"InputOtp",extends:P,inheritAttrs:!1,emits:["change","focus","blur"],data:function(){return{tokens:[]}},watch:{modelValue:{immediate:!0,handler:function(t){this.tokens=t?t.split(""):new Array(this.length)}}},methods:{getTemplateAttrs:function(t){return{value:this.tokens[t]}},getTemplateEvents:function(t){var n=this;return{input:function(r){return n.onInput(r,t)},keydown:function(r){return n.onKeyDown(r)},focus:function(r){return n.onFocus(r)},blur:function(r){return n.onBlur(r)},paste:function(r){return n.onPaste(r)}}},onInput:function(t,n){this.tokens[n]=t.target.value,this.updateModel(t),t.inputType==="deleteContentBackward"?this.moveToPrev(t):(t.inputType==="insertText"||t.inputType==="deleteContentForward"||h()&&t instanceof CustomEvent)&&this.moveToNext(t)},updateModel:function(t){var n=this.tokens.join("");this.writeValue(n,t),this.$emit("change",{originalEvent:t,value:n})},moveToPrev:function(t){var n=this.findPrevInput(t.target);n&&(n.focus(),n.select())},moveToNext:function(t){var n=this.findNextInput(t.target);n&&(n.focus(),n.select())},findNextInput:function(t){var n=t.nextElementSibling;if(n)return n.nodeName==="INPUT"?n:this.findNextInput(n)},findPrevInput:function(t){var n=t.previousElementSibling;if(n)return n.nodeName==="INPUT"?n:this.findPrevInput(n)},onFocus:function(t){t.target.select(),this.$emit("focus",t)},onBlur:function(t){this.$emit("blur",t)},onClick:function(t){setTimeout(function(){return t.target.select()},1)},onKeyDown:function(t){if(!(t.ctrlKey||t.metaKey))switch(t.code){case"ArrowLeft":this.moveToPrev(t),t.preventDefault();break;case"ArrowUp":case"ArrowDown":t.preventDefault();break;case"Backspace":t.target.value.length===0&&(this.moveToPrev(t),t.preventDefault());break;case"ArrowRight":this.moveToNext(t),t.preventDefault();break;case"Enter":case"NumpadEnter":case"Tab":break;default:(this.integerOnly&&!(t.code!=="Space"&&Number(t.key)>=0&&Number(t.key)<=9)||this.tokens.join("").length>=this.length&&t.code!=="Delete")&&t.preventDefault();break}},onPaste:function(t){var n=t.clipboardData.getData("text");if(n.length){var o=n.substring(0,this.length);(!this.integerOnly||!isNaN(o))&&(this.tokens=o.split(""),this.updateModel(t))}t.preventDefault()}},computed:{inputMode:function(){return this.integerOnly?"numeric":"text"},inputType:function(){return this.mask?"password":"text"}},components:{OtpInputText:c}};function B(e,t,n,o,r,u){var l=y("OtpInputText");return p(),s("div",b({class:e.cx("root")},e.ptmi("root")),[(p(!0),s(g,null,v(e.length,function(a){return T(e.$slots,"default",{key:a,events:u.getTemplateEvents(a-1),attrs:u.getTemplateAttrs(a-1),index:a},function(){return[I(l,{value:r.tokens[a-1],type:u.inputType,class:k(e.cx("pcInputText")),name:e.$formName,inputmode:u.inputMode,variant:e.variant,readonly:e.readonly,disabled:e.disabled,size:e.size,invalid:e.invalid,tabindex:e.tabindex,unstyled:e.unstyled,onInput:function(d){return u.onInput(d,a-1)},onFocus:t[0]||(t[0]=function(i){return u.onFocus(i)}),onBlur:t[1]||(t[1]=function(i){return u.onBlur(i)}),onPaste:t[2]||(t[2]=function(i){return u.onPaste(i)}),onKeydown:t[3]||(t[3]=function(i){return u.onKeyDown(i)}),onClick:t[4]||(t[4]=function(i){return u.onClick(i)}),pt:e.ptm("pcInputText")},null,8,["value","type","class","name","inputmode","variant","readonly","disabled","size","invali
22d","tabindex","unstyled","onInput","pt"])]})}),128))],16)}D.render=B;export{D as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.