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IAAI,EAOJ,OANA,KAAK,OAAO,MAAwE,QAAjE,EAAK,aAAqC,EAAS,EAAM,UAAuB,IAAP,EAAgB,EAAK,MACjH,EAAM,SAAQ,CAAC,EAAM,KACb,EAAQ,GACR,KAAK,WAAW,GAAG,EAAQ,MAAM,IACrC,IAEG,IACX,EACA,iBAAiB,QAAQ,UAAU,QAAU,iBAAiB,QAAQ,UAAU,YAChF,iBAAiB,QAAQ,UAAU,cAAgB,SAAU,GACzD,IAAI,EAQJ,OANA,KAAK,OAAO,KAA+E,QAAjE,EAAK,aAAqC,EAAS,EAAM,UAAuB,IAAP,EAAgB,EAAK,MACxH,EAAM,SAAQ,CAAC,EAAM,KACb,EAAQ,GACR,KAAK,WAAW,KAAa,IACjC,IAEG,IACX,EACA,iBAAiB,QAAQ,UAAU,QAAU,iBAAiB,QAAQ,UAAU,cAChF,iBAAiB,QAAQ,UAAU,KAAO,SAAU,EAAO,GAOvD,OANI,EACA,KAAK,YAAY,GAGjB,KAAK,cAAc,GAEhB,IACX,EACA,iBAAiB,QAAQ,UAAU,SAAW,SAAU,GACpD,IAAI,EAA+B,IAAlB,KAAK,EAAE,OAAe,GAAK,KAAK,EAAE,KAAK,IAYxD,OAXK,QAAQ,KACT,EAAa,EAAW,QAAQ,iBAChC,CAAC,EAAO,IACA,EAAM,WAAW,MAEV,IAAI,KAGR,KAAO,EAAO,EAAK,GAAO,IAAI,QAGtC,CACX,EACA,MAAM,cAAgB,iBAAiB,QACvC,QAAQ,QAAU","file":"/npm/whatsapp-messager@1.0.1/dist/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/whatsapp-messager@1.0.1/dist/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n    return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst string_builder_1 = __importDefault(require(\"string-builder\"));\nfunction isEmpty(value) {\n    for (let prop in value) {\n        if (value.hasOwnProperty(prop))\n            return false;\n    }\n    return true;\n}\nstring_builder_1.default.prototype.bold = function (text, isNewLine) {\n    const input = `*${text}*`;\n    if (isNewLine) {\n        this.appendLine(input);\n    }\n    else {\n        this.append(input);\n    }\n    return this;\n};\nstring_builder_1.default.prototype.italic = function (text, isNewLine) {\n    const input = `_${text}_`;\n    if (isNewLine) {\n        this.appendLine(input);\n    }\n    else {\n        this.append(input);\n    }\n    return this;\n};\nstring_builder_1.default.prototype.strikethrough = function (text, isNewLine) {\n    const input = `~${text}~`;\n    if (isNewLine) {\n        this.appendLine(input);\n    }\n    else {\n        this.append(input);\n    }\n    return this;\n};\nstring_builder_1.default.prototype.monospace = function (text, isNewLine) {\n    const input = `\\`\\`\\`${text}\\`\\`\\``;\n    if (isNewLine) {\n        this.appendLine(input);\n    }\n    else {\n        this.append(input);\n    }\n    return this;\n};\nstring_builder_1.default.prototype.block = function (text, isNewLine) {\n    const input = `\\`${text}\\``;\n    if (isNewLine) {\n        this.appendLine(input);\n    }\n    else {\n        this.append(input);\n    }\n    return this;\n};\nstring_builder_1.default.prototype.code = string_builder_1.default.prototype.block;\n/**\n * Must be a new line\n */\nstring_builder_1.default.prototype.quote = function (text) {\n    const input = `> ${text}`;\n    this.appendLine(input);\n    return this;\n};\nstring_builder_1.default.prototype.orderedList = function (texts) {\n    var _a;\n    this.append(`1. ${(_a = texts === null || texts === void 0 ? void 0 : texts[0]) !== null && _a !== void 0 ? _a : ''}`);\n    texts.forEach((text, index) => {\n        if (index > 0) {\n            this.appendLine(`${index + 1}. ${text}`);\n        }\n    });\n    return this;\n};\nstring_builder_1.default.prototype.numbers = string_builder_1.default.prototype.orderedList;\nstring_builder_1.default.prototype.unorderedList = function (texts) {\n    var _a;\n    const bullet = '*';\n    this.append(`${bullet} ${(_a = texts === null || texts === void 0 ? void 0 : texts[0]) !== null && _a !== void 0 ? _a : ''}`);\n    texts.forEach((text, index) => {\n        if (index > 0) {\n            this.appendLine(`${bullet} ${text}`);\n        }\n    });\n    return this;\n};\nstring_builder_1.default.prototype.bullets = string_builder_1.default.prototype.unorderedList;\nstring_builder_1.default.prototype.list = function (texts, isOrdered) {\n    if (isOrdered) {\n        this.orderedList(texts);\n    }\n    else {\n        this.unorderedList(texts);\n    }\n    return this;\n};\nstring_builder_1.default.prototype.toString = function (data) {\n    let fullString = this.s.length === 0 ? '' : this.s.join('');\n    if (!isEmpty(data)) {\n        fullString = fullString.replace(/\\\\?\\{(\\w+)\\}/g, // Match placeholders with optional escape (\\{key})\n        (match, key) => {\n            if (match.startsWith('\\\\')) {\n                // If escaped, return the unescaped curly brackets\n                return `{${key}}`;\n            }\n            // Replace the placeholder with the value from data or leave as is\n            return key in data ? data[key] : `{${key}}`;\n        });\n    }\n    return fullString;\n};\nconst StringBuilder = string_builder_1.default;\nexports.default = StringBuilder;\n"]}