: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
class Encoding extends OptionObject {
constructor(attributes) {
super(TEMPLATE_NS_ID, "encoding", ["adbe.x509.rsa_sha1", "adbe.pkcs7.detached", "adbe.pkcs7.sha1"]);
this.id = attributes.id || "";
this.use = attributes.use || "";
this.usehref = attributes.usehref || "";
class Encodings extends XFAObject {
constructor(attributes) {
super(TEMPLATE_NS_ID, "encodings", true);
this.id = attributes.id || "";
this.type = getStringOption(attributes.type, ["optional", "required"]);
this.use = attributes.use || "";
this.usehref = attributes.usehref || "";
this.encoding = new XFAObjectArray();
class Encrypt extends XFAObject {
constructor(attributes) {
super(TEMPLATE_NS_ID, "encrypt", true);
this.id = attributes.id || "";
this.use = attributes.use || "";
this.usehref = attributes.usehref || "";
class EncryptData extends XFAObject {
constructor(attributes) {
super(TEMPLATE_NS_ID, "encryptData", true);
this.id = attributes.id || "";
this.operation = getStringOption(attributes.operation, ["encrypt", "decrypt"]);
this.target = attributes.target || "";
this.use = attributes.use || "";
this.usehref = attributes.usehref || "";
class Encryption extends XFAObject {
constructor(attributes) {
super(TEMPLATE_NS_ID, "encryption", true);
this.id = attributes.id || "";
this.type = getStringOption(attributes.type, ["optional", "required"]);
this.use = attributes.use || "";
this.usehref = attributes.usehref || "";
this.certificate = new XFAObjectArray();
class EncryptionMethod extends OptionObject {
constructor(attributes) {
super(TEMPLATE_NS_ID, "encryptionMethod", ["", "AES256-CBC", "TRIPLEDES-CBC", "AES128-CBC", "AES192-CBC"]);
this.id = attributes.id || "";
this.use = attributes.use || "";
this.usehref = attributes.usehref || "";
class EncryptionMethods extends XFAObject {
constructor(attributes) {
super(TEMPLATE_NS_ID, "encryptionMethods", true);
this.id = attributes.id || "";
this.type = getStringOption(attributes.type, ["optional", "required"]);
this.use = attributes.use || "";
this.usehref = attributes.usehref || "";
this.encryptionMethod = new XFAObjectArray();
class Event extends XFAObject {
constructor(attributes) {
super(TEMPLATE_NS_ID, "event", true);
this.activity = getStringOption(attributes.activity, ["click", "change", "docClose", "docReady", "enter", "exit", "full", "indexChange", "initialize", "mouseDown", "mouseEnter", "mouseExit", "mouseUp", "postExecute", "postOpen", "postPrint", "postSave", "postSign", "postSubmit", "preExecute", "preOpen", "prePrint", "preSave", "preSign", "preSubmit", "ready", "validationState"]);
this.id = attributes.id || "";
this.listen = getStringOption(attributes.listen, ["refOnly", "refAndDescendents"]);
this.name = attributes.name || "";
this.ref = attributes.ref || "";
this.use = attributes.use || "";
this.usehref = attributes.usehref || "";
class ExData extends ContentObject {
constructor(attributes) {
super(TEMPLATE_NS_ID, "exData");
this.contentType = attributes.contentType || "";
this.href = attributes.href || "";
this.id = attributes.id || "";
this.maxLength = getInteger({
data: attributes.maxLength,
this.name = attributes.name || "";
this.rid = attributes.rid || "";
this.transferEncoding = getStringOption(attributes.transferEncoding, ["none", "base64", "package"]);
this.use = attributes.use || "";
this.usehref = attributes.usehref || "";
return this.contentType === "text/html";
if (this.contentType === "text/html" && child[$namespaceId] === NamespaceIds.xhtml.id) {
if (this.contentType === "text/xml") {
[$toHTML](availableSpace) {
if (this.contentType !== "text/html" || !this[$content]) {
return this[$content][$toHTML](availableSpace);
class ExObject extends XFAObject {
constructor(attributes) {
super(TEMPLATE_NS_ID, "exObject", true);
this.archive = attributes.archive || "";
this.classId = attributes.classId || "";
this.codeBase = attributes.codeBase || "";
this.codeType = attributes.codeType || "";
this.id = attributes.id || "";
this.name = attributes.name || "";
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.exObject = new XFAObjectArray();
this.float = new XFAObjectArray();
this.image = new XFAObjectArray();
this.integer = new XFAObjectArray();
this.text = new XFAObjectArray();
this.time = new XFAObjectArray();
class ExclGroup extends XFAObject {
constructor(attributes) {
super(TEMPLATE_NS_ID, "exclGroup", true);
this.access = getStringOption(attributes.access, ["open", "nonInteractive", "protected", "readOnly"]);
this.accessKey = attributes.accessKey || "";
this.anchorType = getStringOption(attributes.anchorType, ["topLeft", "bottomCenter", "bottomLeft", "bottomRight", "middleCenter", "middleLeft", "middleRight", "topCenter", "topRight"]);
this.colSpan = getInteger({
data: attributes.colSpan,
validate: n => n >= 1 || n === -1
this.h = attributes.h ? getMeasurement(attributes.h) : "";
this.hAlign = getStringOption(attributes.hAlign, ["left", "center", "justify", "justifyAll", "radix", "right"]);
this.id = attributes.id || "";
this.layout = getStringOption(attributes.layout, ["position", "lr-tb", "rl-row", "rl-tb", "row", "table", "tb"]);
this.maxH = getMeasurement(attributes.maxH, "0pt");
this.maxW = getMeasurement(attributes.maxW, "0pt");
this.minH = getMeasurement(attributes.minH, "0pt");
this.minW = getMeasurement(attributes.minW, "0pt");
this.name = attributes.name || "";
this.presence = getStringOption(attributes.presence, ["visible", "hidden", "inactive", "invisible"]);
this.relevant = getRelevant(attributes.relevant);
this.use = attributes.use || "";
this.usehref = attributes.usehref || "";
this.w = attributes.w ? getMeasurement(attributes.w) : "";
this.x = getMeasurement(attributes.x, "0pt");
this.y = getMeasurement(attributes.y, "0pt");
this.connect = new XFAObjectArray();
this.event = new XFAObjectArray();
this.field = new XFAObjectArray();
this.setProperty = new XFAObjectArray();
for (const field of this.field.children) {
const nodeValue = new Value({});
field[$appendChild](nodeValue);
field.value[$setValue](value);
return this.layout.endsWith("-tb") && this[$extra].attempt === 0 && this[$extra].numberInLine > 0 || this[$getParent]()[$isThereMoreWidth]();
const parent = this[$getSubformParent]();
if (!parent[$isSplittable]()) {
if (this[$extra]._isSplittable !== undefined) {
return this[$extra]._isSplittable;
if (this.layout === "position" || this.layout.includes("row")) {
this[$extra]._isSplittable = false;
if (parent.layout?.endsWith("-tb") && parent[$extra].numberInLine !== 0) {
this[$extra]._isSplittable = true;
addHTML(this, html, bbox);
return getAvailableSpace(this);
[$toHTML](availableSpace) {
if (this.presence === "hidden" || this.presence === "inactive" || this.h === 0 || this.w === 0) {
setAccess(this, attributes.class);
this[$extra] = Object.create(null);
Object.assign(this[$extra], {
width: Math.min(this.w || Infinity, availableSpace.width),
height: Math.min(this.h || Infinity, availableSpace.height)
const isSplittable = this[$isSplittable]();
setFirstUnsplittable(this);
if (!checkDimensions(this, availableSpace)) {
return HTMLResult.FAILURE;
const filter = new Set(["field"]);
if (this.layout.includes("row")) {
const columnWidths = this[$getSubformParent]().columnWidths;
if (Array.isArray(columnWidths) && columnWidths.length > 0) {
this[$extra].columnWidths = columnWidths;
this[$extra].currentColumn = 0;
const style = toStyle(this, "anchorType", "dimensions", "position", "presence", "border", "margin", "hAlign");
const classNames = ["xfaExclgroup"];
const cl = layoutClass(this);
classNames.push("xfaPrintOnly");
attributes.style = style;
attributes.class = classNames;
attributes.xfaName = this.name;
const isLrTb = this.layout === "lr-tb" || this.layout === "rl-tb";
const maxRun = isLrTb ? MAX_ATTEMPTS_FOR_LRTB_LAYOUT : 1;
for (; this[$extra].attempt < maxRun; this[$extra].attempt++) {
if (isLrTb && this[$extra].attempt === MAX_ATTEMPTS_FOR_LRTB_LAYOUT - 1) {
this[$extra].numberInLine = 0;
const result = this[$childrenToHTML]({
if (isLrTb && this[$extra].attempt === 0 && this[$extra].numberInLine === 0 && !this[$getTemplateRoot]()[$extra].noLayoutFailure) {
this[$extra].attempt = maxRun;
unsetFirstUnsplittable(this);
if (this[$extra].attempt === maxRun) {
return HTMLResult.FAILURE;
marginH = this.margin.leftInset + this.margin.rightInset;
marginV = this.margin.topInset + this.margin.bottomInset;
const width = Math.max(this[$extra].width + marginH, this.w || 0);
const height = Math.max(this[$extra].height + marginV, this.h || 0);
const bbox = [this.x, this.y, width, height];
style.width = measureToString(width);
style.height = measureToString(height);
applyAssist(this, attributes);
return HTMLResult.success(createWrapper(this, html), bbox);
class Execute extends XFAObject {
constructor(attributes) {
super(TEMPLATE_NS_ID, "execute");
this.connection = attributes.connection || "";
this.executeType = getStringOption(attributes.executeType, ["import", "remerge"]);
this.id = attributes.id || "";
this.runAt = getStringOption(attributes.runAt, ["client", "both", "server"]);
this.use = attributes.use || "";
this.usehref = attributes.usehref || "";
class Extras extends XFAObject {
constructor(attributes) {
super(TEMPLATE_NS_ID, "extras", true);
this.id = attributes.id || "";
this.name = attributes.name || "";
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.extras = new XFAObjectArray();
this.float = new XFAObjectArray();
this.image = new XFAObjectArray();
this.integer = new XFAObjectArray();
this.text = new XFAObjectArray();
this.time = new XFAObjectArray();
class Field extends XFAObject {
constructor(attributes) {
super(TEMPLATE_NS_ID, "field", true);
this.access = getStringOption(attributes.access, ["open", "nonInteractive", "protected", "readOnly"]);
this.accessKey = attributes.accessKey || "";
this.anchorType = getStringOption(attributes.anchorType, ["topLeft", "bottomCenter", "bottomLeft", "bottomRight", "middleCenter", "middleLeft", "middleRight", "topCenter", "topRight"]);
this.colSpan = getInteger({
data: attributes.colSpan,
validate: n => n >= 1 || n === -1
this.h = attributes.h ? getMeasurement(attributes.h) : "";
this.hAlign = getStringOption(attributes.hAlign, ["left", "center", "justify", "justifyAll", "radix", "right"]);
this.id = attributes.id || "";
this.locale = attributes.locale || "";
this.maxH = getMeasurement(attributes.maxH, "0pt");
this.maxW = getMeasurement(attributes.maxW, "0pt");
this.minH = getMeasurement(attributes.minH, "0pt");
this.minW = getMeasurement(attributes.minW, "0pt");
this.name = attributes.name || "";
this.presence = getStringOption(attributes.presence, ["visible", "hidden", "inactive", "invisible"]);
this.relevant = getRelevant(attributes.relevant);
this.rotate = getInteger({
validate: x => x % 90 === 0
this.use = attributes.use || "";
this.usehref = attributes.usehref || "";
this.w = attributes.w ? getMeasurement(attributes.w) : "";
this.x = getMeasurement(attributes.x, "0pt");
this.y = getMeasurement(attributes.y, "0pt");
this.items = new XFAObjectArray(2);
this.bindItems = new XFAObjectArray();
this.connect = new XFAObjectArray();
this.event = new XFAObjectArray();
this.setProperty = new XFAObjectArray();
[$toHTML](availableSpace) {
this.ui[$globalData] = this[$globalData];
this[$appendChild](this.ui);
switch (this.items.children.length) {
node = new CheckButton({});
this.ui.checkButton = node;
node = new ChoiceList({});
this.ui.choiceList = node;
this.ui[$appendChild](node);
if (!this.ui || this.presence === "hidden" || this.presence === "inactive" || this.h === 0 || this.w === 0) {
delete this.caption[$extra];
const caption = this.caption ? this.caption[$toHTML](availableSpace).html : null;
marginH = this.margin.leftInset + this.margin.rightInset;