import {a as a$3}from'./chunk-K5Y26N6X.js';import {a as a$1}from'./chunk-AVKEMR5W.js';import {a as a$2}from'./chunk-SYDG6PPD.js';import {nativeHandle}from'@scandit/web-datacapture-core/build/js/private/nativeHandle.js';var a=class extends a$1{constructor(){super(...arguments);this.anchorRegexes=[];this.shouldResetAnchorRegexes=false;}setAnchorRegexes(e){return this.anchorRegexes=e,this.getThis()}setAnchorRegex(e){return this.anchorRegexes=[String(e)],this.getThis()}resetAnchorRegexes(){return this.shouldResetAnchorRegexes=true,this.getThis()}setLocation(e){return this.location=e,this.getThis()}async build(e){var i;let n=await a$2().workerCommand("labelCaptureBuildCustomText",{payload:{name:e,dataTypePatterns:this.anchorRegexes.map(l=>l.toString()),hiddenProperties:this.hiddenProperties,isOptional:this._isOptional,patterns:this.valueRegexes,locationHandle:(i=this.location)==null?void 0:i[nativeHandle],shouldResetDataTypePatterns:this.shouldResetAnchorRegexes}}),t=a$3.forHandle(n);return t._anchorRegexes=this.anchorRegexes,t._isOptional=this._isOptional,t._name=e,t._valueRegexes=this.valueRegexes,t._location=this.location,t}getThis(){return this}};export{a};