"use strict";(self.webpackChunkdami=self.webpackChunkdami||[]).push([[8565],{88565:(e,a,t)=>{t.r(a),t.d(a,{default:()=>s,regexVariable:()=>i});var r=t(31528),n=t.n(r);async function i({id:e,data:a}){const t=this.engine.referenceData.variables;if(!n().has(t,a.variableName))throw new Error(`Cant find "${a.variableName}" variable`);const r=n().get(t,a.variableName);if("string"!=typeof r)throw new Error(`The value of the "${a.variableName}" variable is not a string/text`);const i=a.method||"match",s=new RegExp(a.expression,a.flag.join(""));let l="";if("match"===i){const e=r.match(s);l=e&&!a.flag.includes("g")?e[0]:e}else"replace"===i&&(l=r.replace(s,a.replaceVal??""));return n().set(this.engine.referenceData.variables,a.variableName,l),{data:l,nextBlockId:this.getBlockConnections(e)}}const s=i}}]);