: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
if (parent instanceof Field) {
if (parent.ui?.imageEdit) {
this.image = new Image({});
this[$appendChild](this.image);
this.image[$content] = value[$content];
const valueName = value[$nodeName];
if (this[valueName] !== null) {
this[valueName][$content] = value[$content];
for (const name of Object.getOwnPropertyNames(this)) {
if (obj instanceof XFAObject) {
this[value[$nodeName]] = value;
this[$appendChild](value);
if (typeof this.exData[$content] === "string") {
return this.exData[$content].trim();
return this.exData[$content][$text]().trim();
for (const name of Object.getOwnPropertyNames(this)) {
if (obj instanceof XFAObject) {
return (obj[$content] || "").toString().trim();
[$toHTML](availableSpace) {
for (const name of Object.getOwnPropertyNames(this)) {
if (!(obj instanceof XFAObject)) {
return obj[$toHTML](availableSpace);
class Variables extends XFAObject {
constructor(attributes) {
super(TEMPLATE_NS_ID, "variables", true);
this.id = attributes.id || "";
this.use = attributes.use || "";
this.usehref = attributes.usehref || "";
this.boolean = new XFAObjectArray();
this.date = new XFAObjectArray();
this.dateTime = new XFAObjectArray();
this.decimal = new XFAObjectArray();
this.exData = new XFAObjectArray();
this.float = new XFAObjectArray();
this.image = new XFAObjectArray();
this.integer = new XFAObjectArray();
this.manifest = new XFAObjectArray();
this.script = new XFAObjectArray();
this.text = new XFAObjectArray();
this.time = new XFAObjectArray();
class TemplateNamespace {
static [$buildXFAObject](name, attributes) {
if (TemplateNamespace.hasOwnProperty(name)) {
const node = TemplateNamespace[name](attributes);
node[$setSetAttributes](attributes);
static appearanceFilter(attrs) {
return new AppearanceFilter(attrs);
return new Assist(attrs);
return new Barcode(attrs);
static bindItems(attrs) {
return new BindItems(attrs);
return new Bookend(attrs);
return new BooleanElement(attrs);
return new Border(attrs);
static breakAfter(attrs) {
return new BreakAfter(attrs);
static breakBefore(attrs) {
return new BreakBefore(attrs);
return new Button(attrs);
static calculate(attrs) {
return new Calculate(attrs);
return new Caption(attrs);
static certificate(attrs) {
return new Certificate(attrs);
static certificates(attrs) {
return new Certificates(attrs);
static checkButton(attrs) {
return new CheckButton(attrs);
static choiceList(attrs) {
return new ChoiceList(attrs);
return new Connect(attrs);
static contentArea(attrs) {
return new ContentArea(attrs);
return new Corner(attrs);
return new DateElement(attrs);
return new DateTime(attrs);
static dateTimeEdit(attrs) {
return new DateTimeEdit(attrs);
return new Decimal(attrs);
static defaultUi(attrs) {
return new DefaultUi(attrs);
static digestMethod(attrs) {
return new DigestMethod(attrs);
static digestMethods(attrs) {
return new DigestMethods(attrs);
return new Encoding(attrs);
static encodings(attrs) {
return new Encodings(attrs);
return new Encrypt(attrs);
static encryptData(attrs) {
return new EncryptData(attrs);
static encryption(attrs) {
return new Encryption(attrs);
static encryptionMethod(attrs) {
return new EncryptionMethod(attrs);
static encryptionMethods(attrs) {
return new EncryptionMethods(attrs);
return new ExData(attrs);
return new ExObject(attrs);
static exclGroup(attrs) {
return new ExclGroup(attrs);
return new Execute(attrs);
return new Extras(attrs);
return new Filter(attrs);
return new template_Font(attrs);
return new Format(attrs);
return new Handler(attrs);
static hyphenation(attrs) {
return new Hyphenation(attrs);
static imageEdit(attrs) {
return new ImageEdit(attrs);
return new Integer(attrs);
return new Issuers(attrs);
return new KeyUsage(attrs);
return new Linear(attrs);
static lockDocument(attrs) {
return new LockDocument(attrs);
return new Manifest(attrs);
return new Margin(attrs);
return new Medium(attrs);
return new Message(attrs);
static numericEdit(attrs) {
return new NumericEdit(attrs);
return new Overflow(attrs);
return new PageArea(attrs);
return new PageSet(attrs);
static passwordEdit(attrs) {
return new PasswordEdit(attrs);
return new template_Pattern(attrs);
return new Picture(attrs);
return new Radial(attrs);
return new Reason(attrs);
return new Reasons(attrs);
static rectangle(attrs) {
return new Rectangle(attrs);
return new RefElement(attrs);
return new Script(attrs);
static setProperty(attrs) {
return new SetProperty(attrs);
return new SignData(attrs);
static signature(attrs) {
return new Signature(attrs);
return new Signing(attrs);
return new Stipple(attrs);
return new Subform(attrs);
static subformSet(attrs) {
return new SubformSet(attrs);
static subjectDN(attrs) {
return new SubjectDN(attrs);
static subjectDNs(attrs) {
return new SubjectDNs(attrs);
return new Submit(attrs);
return new Template(attrs);
return new TextEdit(attrs);
static timeStamp(attrs) {
return new TimeStamp(attrs);
return new ToolTip(attrs);
static traversal(attrs) {
return new Traversal(attrs);
return new Traverse(attrs);
return new Validate(attrs);
static variables(attrs) {
return new Variables(attrs);
;// CONCATENATED MODULE: ./src/core/xfa/bind.js
const bind_NS_DATASETS = NamespaceIds.datasets.id;
function createText(content) {
const node = new Text({});
node[$content] = content;
this.datasets = root.datasets;
this.data = root.datasets?.data || new XmlObject(NamespaceIds.datasets.id, "data");
this.emptyMerge = this.data[$getChildren]().length === 0;
this.root.form = this.form = root.template[$clone]();
return !this.emptyMerge && this._mergeMode;
return !this._isConsumeData();
this._bindElement(this.form, this.data);
_bindValue(formNode, data, picture) {
if (formNode[$hasSettableValue]()) {
if (data[$isDataValue]()) {
const value = data[$getDataValue]();
formNode[$setValue](createText(value));
} else if (formNode instanceof Field && formNode.ui?.choiceList?.open === "multiSelect") {
const value = data[$getChildren]().map(child => child[$content].trim()).join("\n");
formNode[$setValue](createText(value));
} else if (this._isConsumeData()) {
warn(`XFA - Nodes haven't the same type.`);
} else if (!data[$isDataValue]() || this._isMatchTemplate()) {
this._bindElement(formNode, data);
warn(`XFA - Nodes haven't the same type.`);
_findDataByNameToConsume(name, isValue, dataNode, global) {
for (let i = 0; i < 3; i++) {
generator = dataNode[$getRealChildrenByNameIt](name, false, true);
match = generator.next().value;
if (isValue === match[$isDataValue]()) {