import*as e from"react";import{PrimeReactContext as r}from"primereact/api";import{useMountEffect as n,useUpdateEffect as t}from"primereact/hooks";import{InputText as u}from"primereact/inputtext";import{classNames as c,DomHandler as a,ObjectUtils as l}from"primereact/utils";import{ComponentBase as o}from"primereact/componentbase";function i(){return i=Object.assign?Object.assign.bind():function(e){for(var r=1;r=0&&!h.current[e];);return e},z=function(e,r){var n,t;if(!(e<0)){for(n=e,t=w(r);nr.length){for(q(!0);n.begin>0&&!h.current[n.begin-1];)n.begin--;if(0===n.begin)for(;n.beginu.length){L(r+1,y.current);break}}else b.current[r]===u.charAt(t)&&t++,r1&&void 0!==arguments[1]&&arguments[1])){var r=q(!0);A(r)}Y(e),p.onComplete&&D()&&p.onComplete({originalEvent:e,value:j()})}},Z=e.useCallback((function(){for(var e=[],r=0;r0?a.addClass(m.current,"p-filled"):a.removeClass(m.current,"p-filled")},J=function(e){var r;return m.current&&(l.isEmpty(p.value)?m.current.value="":(m.current.value=p.value,r=q(e),setTimeout((function(){if(m.current)return N(),q(e)}),10)),R.current=m.current.value),G(),r},Q=e.useCallback((function(){return p.unmask?p.value!==Z():O.current!==m.current.value&&m.current.value!==p.value}),[p.unmask,p.value,Z]),U=function(){if(p.mask){h.current=[],E.current=p.mask.length,y.current=p.mask.length,d.current=null;var e={9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"};S.current=a.isChrome()&&a.isAndroid();for(var r=p.mask.split(""),n=0;n