legal-markdown-js 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +168 -0
- package/dist/browser.d.ts +87 -0
- package/dist/browser.d.ts.map +1 -0
- package/dist/browser.js +157 -0
- package/dist/browser.js.map +1 -0
- package/dist/cli/index.d.ts +34 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +221 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/service.d.ts +128 -0
- package/dist/cli/service.d.ts.map +1 -0
- package/dist/cli/service.js +284 -0
- package/dist/cli/service.js.map +1 -0
- package/dist/constants/index.d.ts +229 -0
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/constants/index.js +232 -0
- package/dist/constants/index.js.map +1 -0
- package/dist/core/exporters/metadata-exporter.d.ts +104 -0
- package/dist/core/exporters/metadata-exporter.d.ts.map +1 -0
- package/dist/core/exporters/metadata-exporter.js +201 -0
- package/dist/core/exporters/metadata-exporter.js.map +1 -0
- package/dist/core/index.d.ts +40 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +56 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/parsers/yaml-parser.d.ts +149 -0
- package/dist/core/parsers/yaml-parser.d.ts.map +1 -0
- package/dist/core/parsers/yaml-parser.js +321 -0
- package/dist/core/parsers/yaml-parser.js.map +1 -0
- package/dist/core/processors/clause-processor.d.ts +74 -0
- package/dist/core/processors/clause-processor.d.ts.map +1 -0
- package/dist/core/processors/clause-processor.js +213 -0
- package/dist/core/processors/clause-processor.js.map +1 -0
- package/dist/core/processors/date-processor.d.ts +90 -0
- package/dist/core/processors/date-processor.d.ts.map +1 -0
- package/dist/core/processors/date-processor.js +336 -0
- package/dist/core/processors/date-processor.js.map +1 -0
- package/dist/core/processors/header-processor.d.ts +104 -0
- package/dist/core/processors/header-processor.d.ts.map +1 -0
- package/dist/core/processors/header-processor.js +585 -0
- package/dist/core/processors/header-processor.js.map +1 -0
- package/dist/core/processors/import-processor.d.ts +116 -0
- package/dist/core/processors/import-processor.d.ts.map +1 -0
- package/dist/core/processors/import-processor.js +236 -0
- package/dist/core/processors/import-processor.js.map +1 -0
- package/dist/core/processors/mixin-processor.d.ts +93 -0
- package/dist/core/processors/mixin-processor.d.ts.map +1 -0
- package/dist/core/processors/mixin-processor.js +378 -0
- package/dist/core/processors/mixin-processor.js.map +1 -0
- package/dist/core/processors/reference-processor.d.ts +115 -0
- package/dist/core/processors/reference-processor.d.ts.map +1 -0
- package/dist/core/processors/reference-processor.js +273 -0
- package/dist/core/processors/reference-processor.js.map +1 -0
- package/dist/errors/index.d.ts +234 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +267 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/extensions/batch-processor.d.ts +197 -0
- package/dist/extensions/batch-processor.d.ts.map +1 -0
- package/dist/extensions/batch-processor.js +392 -0
- package/dist/extensions/batch-processor.js.map +1 -0
- package/dist/extensions/formatters/index.d.ts +99 -0
- package/dist/extensions/formatters/index.d.ts.map +1 -0
- package/dist/extensions/formatters/index.js +128 -0
- package/dist/extensions/formatters/index.js.map +1 -0
- package/dist/extensions/index.d.ts +53 -0
- package/dist/extensions/index.d.ts.map +1 -0
- package/dist/extensions/index.js +71 -0
- package/dist/extensions/index.js.map +1 -0
- package/dist/extensions/latex-parser.d.ts +111 -0
- package/dist/extensions/latex-parser.d.ts.map +1 -0
- package/dist/extensions/latex-parser.js +563 -0
- package/dist/extensions/latex-parser.js.map +1 -0
- package/dist/extensions/rst-parser.d.ts +112 -0
- package/dist/extensions/rst-parser.d.ts.map +1 -0
- package/dist/extensions/rst-parser.js +268 -0
- package/dist/extensions/rst-parser.js.map +1 -0
- package/dist/extensions/template-loops.d.ts +61 -0
- package/dist/extensions/template-loops.d.ts.map +1 -0
- package/dist/extensions/template-loops.js +418 -0
- package/dist/extensions/template-loops.js.map +1 -0
- package/dist/extensions/utilities/index.d.ts +114 -0
- package/dist/extensions/utilities/index.d.ts.map +1 -0
- package/dist/extensions/utilities/index.js +137 -0
- package/dist/extensions/utilities/index.js.map +1 -0
- package/dist/extensions/validators/index.d.ts +65 -0
- package/dist/extensions/validators/index.d.ts.map +1 -0
- package/dist/extensions/validators/index.js +88 -0
- package/dist/extensions/validators/index.js.map +1 -0
- package/dist/generators/html-generator.d.ts +184 -0
- package/dist/generators/html-generator.d.ts.map +1 -0
- package/dist/generators/html-generator.js +361 -0
- package/dist/generators/html-generator.js.map +1 -0
- package/dist/generators/pdf-generator.d.ts +165 -0
- package/dist/generators/pdf-generator.d.ts.map +1 -0
- package/dist/generators/pdf-generator.js +275 -0
- package/dist/generators/pdf-generator.js.map +1 -0
- package/dist/helpers/date-helpers.d.ts +216 -0
- package/dist/helpers/date-helpers.d.ts.map +1 -0
- package/dist/helpers/date-helpers.js +402 -0
- package/dist/helpers/date-helpers.js.map +1 -0
- package/dist/helpers/index.d.ts +87 -0
- package/dist/helpers/index.d.ts.map +1 -0
- package/dist/helpers/index.js +149 -0
- package/dist/helpers/index.js.map +1 -0
- package/dist/helpers/number-helpers.d.ts +269 -0
- package/dist/helpers/number-helpers.d.ts.map +1 -0
- package/dist/helpers/number-helpers.js +406 -0
- package/dist/helpers/number-helpers.js.map +1 -0
- package/dist/helpers/string-helpers.d.ts +391 -0
- package/dist/helpers/string-helpers.d.ts.map +1 -0
- package/dist/helpers/string-helpers.js +549 -0
- package/dist/helpers/string-helpers.js.map +1 -0
- package/dist/index.d.ts +229 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +384 -0
- package/dist/index.js.map +1 -0
- package/dist/legal-markdown.umd.min.js +2 -0
- package/dist/legal-markdown.umd.min.js.LICENSE.txt +14 -0
- package/dist/legal-markdown.umd.min.js.map +1 -0
- package/dist/lib/index.d.ts +150 -0
- package/dist/lib/index.d.ts.map +1 -0
- package/dist/lib/index.js +265 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/parsers/content-detector.d.ts +131 -0
- package/dist/parsers/content-detector.d.ts.map +1 -0
- package/dist/parsers/content-detector.js +220 -0
- package/dist/parsers/content-detector.js.map +1 -0
- package/dist/parsers/fallback-parsers.d.ts +14 -0
- package/dist/parsers/fallback-parsers.d.ts.map +1 -0
- package/dist/parsers/fallback-parsers.js +188 -0
- package/dist/parsers/fallback-parsers.js.map +1 -0
- package/dist/parsers/implementations/pandoc-native.d.ts +13 -0
- package/dist/parsers/implementations/pandoc-native.d.ts.map +1 -0
- package/dist/parsers/implementations/pandoc-native.js +63 -0
- package/dist/parsers/implementations/pandoc-native.js.map +1 -0
- package/dist/parsers/implementations/pandoc-wasm.d.ts +14 -0
- package/dist/parsers/implementations/pandoc-wasm.d.ts.map +1 -0
- package/dist/parsers/implementations/pandoc-wasm.js +64 -0
- package/dist/parsers/implementations/pandoc-wasm.js.map +1 -0
- package/dist/parsers/pandoc-factory.d.ts +97 -0
- package/dist/parsers/pandoc-factory.d.ts.map +1 -0
- package/dist/parsers/pandoc-factory.js +146 -0
- package/dist/parsers/pandoc-factory.js.map +1 -0
- package/dist/parsers/pandoc-loader.d.ts +24 -0
- package/dist/parsers/pandoc-loader.d.ts.map +1 -0
- package/dist/parsers/pandoc-loader.js +124 -0
- package/dist/parsers/pandoc-loader.js.map +1 -0
- package/dist/parsers/pandoc-parser.d.ts +27 -0
- package/dist/parsers/pandoc-parser.d.ts.map +1 -0
- package/dist/parsers/pandoc-parser.js +3 -0
- package/dist/parsers/pandoc-parser.js.map +1 -0
- package/dist/styles/default.css +125 -0
- package/dist/styles/headers.css +146 -0
- package/dist/styles/highlight.css +171 -0
- package/dist/tracking/field-tracker.d.ts +206 -0
- package/dist/tracking/field-tracker.d.ts.map +1 -0
- package/dist/tracking/field-tracker.js +247 -0
- package/dist/tracking/field-tracker.js.map +1 -0
- package/dist/types.d.ts +186 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +33 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/logger.d.ts +107 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +122 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/web/bundle-standalone.js +28 -0
- package/dist/web/bundle.js +17 -0
- package/dist/web/index.html +1465 -0
- package/dist/web/legal-markdown.umd.min.js +2 -0
- package/dist/web/standalone.html +390 -0
- package/dist/web/styles.css +874 -0
- package/package.json +118 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("pandoc-wasm"),require("child_process")):"function"==typeof define&&define.amd?define("LegalMarkdown",["pandoc-wasm","child_process"],t):"object"==typeof exports?exports.LegalMarkdown=t(require("pandoc-wasm"),require("child_process")):e.LegalMarkdown=t(e["pandoc-wasm"],e.child_process)}(this,(e,t)=>(()=>{"use strict";var n={64:(e,t)=>{function n(e,t,n,o,s=0){if(e<1||e>5)return`l${e}. ${t}`;const l=function(e,t){let n;switch(e){case 1:n=t.levelOne;break;case 2:n=t.levelTwo;break;case 3:n=t.levelThree;break;case 4:n=t.levelFour;break;case 5:n=t.levelFive;break;default:n="%n."}if("string"!=typeof n)switch(e){case 1:return"Article %n.";case 2:return"Section %n.";case 3:return"(%n)";case 4:return"(%n%c)";case 5:return"(%n%c%r)";default:return"%n."}return n}(e,o);if("string"!=typeof l)return`l${e}. ${t}`;let c=l;const u=l.includes("%r.%n"),p=l.includes("%c.%n"),d=o.levelOne?.includes("%c")&&o.levelTwo?.includes("%c.%n");if(c=c.replace(/%0(\d+)n/g,(t,r)=>n[e-1].toString().padStart(parseInt(r),"0")),c=c.replace(/%0(\d+)s/g,(e,t)=>n[0].toString().padStart(parseInt(t),"0")),c=c.replace(/%0(\d+)t/g,(e,t)=>n[1].toString().padStart(parseInt(t),"0")),c=c.replace(/%0(\d+)f/g,(e,t)=>n[2].toString().padStart(parseInt(t),"0")),c=c.replace(/%0(\d+)i/g,(e,t)=>n[3].toString().padStart(parseInt(t),"0")),4===e)!c.includes("%n%c")||c.includes(".%s")||c.includes(".%t")||c.includes(".%f")||(c=c.replace(/%n/g,n[2].toString()),c=c.replace(/%c/g,r(n[3])));else if(5===e&&(c.includes("%c%r")||c.includes("%n%c%r"))){c=c.replace(/%n/g,n[2].toString()),c=c.replace(/%c/g,r(n[3]));const e=!0;c=c.replace(/%r/g,i(n[4],e))}const f="string"==typeof o.levelThree&&o.levelThree.includes("%n.%s.%t")||"string"==typeof o.levelFour&&o.levelFour.includes("%n.%s.%t.%f")||"string"==typeof o.levelFive&&o.levelFive.includes("%n.%s.%t.%f.%i"),g=(c.includes(".%s.%t")||c.includes(".%t.%f")||c.includes(".%f.%i")||c.includes(".%s")&&f)&&!c.includes("%r.")&&!c.includes("%c.");c=g?c.replace(/%n/g,n[0].toString()):c.replace(/%n/g,n[e-1].toString()),c=g?c.replace(/%s/g,n[1].toString()):c.replace(/%s/g,n[0].toString()),c=c.replace(/%t/g,n[2].toString()),c=c.replace(/%f/g,n[3].toString()),c=c.replace(/%i/g,n[4].toString()),p&&e>1||d&&e>1?c=c.replace(/%c/g,r(n[0])):(e<=3||e>=4&&c.includes("%c"))&&(c=c.replace(/%c/g,r(n[e-1]))),u&&e>1?c=c.replace(/%r/g,i(n[0],!0)):(e<=3||e>=4&&c.includes("%r"))&&(c=c.replace(/%r/g,i(n[e-1],!0)));const m=o.noIndent?"":" ".repeat(Math.floor((e-1)*(o.levelIndent||1.5)*2));return o.enableFieldTracking?`${m}<span class="${["legal-header",`legal-header-level-${e}`,a(e)].join(" ")}" data-level="${e}" data-number="${n[e-1]}">${c} ${t}</span>`:`${m}${c} ${t}`}function r(e){if(e<=0)return"";let t="",n=e;for(;n>0;){const e=(n-1)%26;t=String.fromCharCode(97+e)+t,n=Math.floor((n-1)/26)}return t}function i(e,t=!1){if(e<=0)return"";const n=[{value:1e3,numeral:"M"},{value:900,numeral:"CM"},{value:500,numeral:"D"},{value:400,numeral:"CD"},{value:100,numeral:"C"},{value:90,numeral:"XC"},{value:50,numeral:"L"},{value:40,numeral:"XL"},{value:10,numeral:"X"},{value:9,numeral:"IX"},{value:5,numeral:"V"},{value:4,numeral:"IV"},{value:1,numeral:"I"}];let r="",i=e;for(const{value:e,numeral:t}of n)for(;i>=e;)r+=t,i-=e;return t?r.toLowerCase():r}function a(e){switch(e){case 1:return"legal-article";case 2:return"legal-section";case 3:return"legal-subsection";case 4:return"legal-sub-subsection";case 5:return"legal-paragraph";default:return"legal-header-unknown"}}Object.defineProperty(t,"__esModule",{value:!0}),t.processHeaders=function(e,t,r={}){const i=function(e,t={}){return{levelOne:e["level-one"]||"Article %n.",levelTwo:e["level-two"]||"Section %n.",levelThree:e["level-three"]||"(%n)",levelFour:e["level-four"]||"(%n%c)",levelFive:e["level-five"]||"(%n%c%r)",levelIndent:parseFloat(e["level-indent"]||"1.5"),noReset:t.noReset||e["no-reset"]||!1,noIndent:t.noIndent||e["no-indent"]||!1,enableFieldTracking:t.enableFieldTracking||!1}}(t,r),a=/^(l+)\.\s+(.*?)$/gm,o=/^l(\d+)\.\s+(.*?)$/gm,s=[0,0,0,0,0],l=[];let c;const u=e.slice();for(a.lastIndex=0;null!==(c=a.exec(u));)l.push({match:c[0],level:c[1].length,text:c[2],index:c.index});for(o.lastIndex=0;null!==(c=o.exec(u));)l.push({match:c[0],level:parseInt(c[1],10),text:c[2],index:c.index});l.sort((e,t)=>e.index-t.index);let p=e,d=0,f=0;for(const e of l){const t=e.level;if(5===t)5===f?s[4]++:s[4]=1;else{for(let e=f;e<t-1;e++)0===s[e]&&(s[e]=1);if(s[t-1]++,!i.noReset)for(let e=t;e<s.length;e++)s[e]=0}const r=n(t,e.text,[...s],i,f),a=e.index+d,o=a+e.match.length;p=p.substring(0,a)+r+p.substring(o),d+=r.length-e.match.length,f=t}return p}},70:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.processCrossReferences=function(e,t){return(0,r.processDateReferences)(e,t).replace(/\|(.*?)\|/g,(e,n)=>{const r=function(e,t){const n=t.split(".");let r=e;for(const e of n){if(null==r)return;r=r[e]}return r}(t,n.trim());return void 0===r?e:r instanceof Date?i(r):"number"==typeof r&&n.includes("amount")?a(r,`currency:${t.payment_currency||"USD"}`):String(r)})},t.formatReferenceValue=function(e,t){return null==e?"":"object"==typeof e&&e instanceof Date?i(e,t):"number"==typeof e&&t?.startsWith("currency")?a(e,t):String(e)};const r=n(681);function i(e,t){return t?"short"===t?e.toLocaleDateString():"long"===t?e.toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"}):e.toISOString().split("T")[0]:e.toISOString().split("T")[0]}function a(e,t){let n="USD",r="en-US";if(t){const e=t.split(":");e.length>1&&(n=e[1].trim().toUpperCase()),e.length>2&&(r=e[2].trim())}return new Intl.NumberFormat(r,{style:"currency",currency:n}).format(e)}},75:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PandocFactory=void 0;const r=n(862),i=n(961),a=n(517);t.PandocFactory=class{static async create(e={}){if("undefined"==typeof window)return new i.PandocNative(e);{const t=r.PandocLoader.getPandocWasm();if(t)return new a.PandocWasm(t,e);if(await r.PandocLoader.loadIfNeeded("# dummy content to trigger loading")){const t=r.PandocLoader.getPandocWasm();if(t)return new a.PandocWasm(t,e)}return null}}static async createForContent(e,t={}){return await r.PandocLoader.loadIfNeeded(e)?this.create(t):null}static async isAvailable(){try{return null!==await this.create()}catch(e){return!1}}static getEnvironmentInfo(){const e="undefined"==typeof window?"node":"browser",t=r.PandocLoader.getPandocWasm();return{environment:e,pandocWasmLoaded:null!==t,pandocWasmInstance:t}}}},83:(e,t,n)=>{var r=n(433);function i(e,t,n,r,i){var a="",o="",s=Math.floor(i/2)-1;return r-t>s&&(t=r-s+(a=" ... ").length),n-r>s&&(n=r+s-(o=" ...").length),{str:a+e.slice(t,n).replace(/\t/g,"→")+o,pos:r-t+a.length}}function a(e,t){return r.repeat(" ",t-e.length)+e}e.exports=function(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2);for(var n,o=/\r?\n|\r|\0/g,s=[0],l=[],c=-1;n=o.exec(e.buffer);)l.push(n.index),s.push(n.index+n[0].length),e.position<=n.index&&c<0&&(c=s.length-2);c<0&&(c=s.length-1);var u,p,d="",f=Math.min(e.line+t.linesAfter,l.length).toString().length,g=t.maxLength-(t.indent+f+3);for(u=1;u<=t.linesBefore&&!(c-u<0);u++)p=i(e.buffer,s[c-u],l[c-u],e.position-(s[c]-s[c-u]),g),d=r.repeat(" ",t.indent)+a((e.line-u+1).toString(),f)+" | "+p.str+"\n"+d;for(p=i(e.buffer,s[c],l[c],e.position,g),d+=r.repeat(" ",t.indent)+a((e.line+1).toString(),f)+" | "+p.str+"\n",d+=r.repeat("-",t.indent+f+3+p.pos)+"^\n",u=1;u<=t.linesAfter&&!(c+u>=l.length);u++)p=i(e.buffer,s[c+u],l[c+u],e.position-(s[c]-s[c+u]),g),d+=r.repeat(" ",t.indent)+a((e.line+u+1).toString(),f)+" | "+p.str+"\n";return d.replace(/\n$/,"")}},119:(e,t,n)=>{var r=n(231),i=n(388);function a(e,t){var n=[];return e[t].forEach(function(e){var t=n.length;n.forEach(function(n,r){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=r)}),n[t]=e}),n}function o(e){return this.extend(e)}o.prototype.extend=function(e){var t=[],n=[];if(e instanceof i)n.push(e);else if(Array.isArray(e))n=n.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new r("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit))}t.forEach(function(e){if(!(e instanceof i))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new r("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(e.multi)throw new r("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(e){if(!(e instanceof i))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var s=Object.create(o.prototype);return s.implicit=(this.implicit||[]).concat(t),s.explicit=(this.explicit||[]).concat(n),s.compiledImplicit=a(s,"implicit"),s.compiledExplicit=a(s,"explicit"),s.compiledTypeMap=function(){var e,t,n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function r(e){e.multi?(n.multi[e.kind].push(e),n.multi.fallback.push(e)):n[e.kind][e.tag]=n.fallback[e.tag]=e}for(e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(r);return n}(s.compiledImplicit,s.compiledExplicit),s},e.exports=o},127:(e,t,n)=>{var r=n(388),i=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),a=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");e.exports=new r("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==i.exec(e)||null!==a.exec(e))},construct:function(e){var t,n,r,o,s,l,c,u,p=0,d=null;if(null===(t=i.exec(e))&&(t=a.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,o=+t[3],!t[4])return new Date(Date.UTC(n,r,o));if(s=+t[4],l=+t[5],c=+t[6],t[7]){for(p=t[7].slice(0,3);p.length<3;)p+="0";p=+p}return t[9]&&(d=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(d=-d)),u=new Date(Date.UTC(n,r,o,s,l,c,p)),d&&u.setTime(u.getTime()-d),u},instanceOf:Date,represent:function(e){return e.toISOString()}})},148:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LegalMarkdown=void 0,t.processLegalMarkdown=p;const r=n(176),i=n(64),a=n(576),o=n(70),s=n(294);let l,c;try{const e=n(480);l=e.convertRstToLegalMarkdownSync}catch(e){l=e=>e}try{const e=n(811);c=e.convertLatexToLegalMarkdownSync}catch(e){c=e=>e}const u=n(321);function p(e,t={}){u.fieldTracker.clear();let n=l(e);n=c(n);const{content:p,metadata:d}=(0,r.parseYamlFrontMatter)(n,t.throwOnYamlError);if(t.yamlOnly)return{content:p,metadata:d};let f=p;return t.noClauses||(f=(0,a.processOptionalClauses)(f,d)),t.noReferences||(f=(0,o.processCrossReferences)(f,d)),t.noMixins||(f=(0,s.processMixins)(f,d,t)),t.noHeaders||(f=(0,i.processHeaders)(f,d,{noReset:t.noReset,noIndent:t.noIndent,enableFieldTracking:t.enableFieldTracking})),t.enableFieldTracking&&(f=u.fieldTracker.applyFieldTracking(f)),{content:f,metadata:d,fieldReport:t.enableFieldTracking?u.fieldTracker.generateReport():void 0}}t.LegalMarkdown={processLegalMarkdown:p},"undefined"!=typeof window&&(window.LegalMarkdown=t.LegalMarkdown)},156:(e,t)=>{function n(e){const t=["th","st","nd","rd"],n=e%100;return t[(n-20)%10]||t[n]||t[0]}Object.defineProperty(t,"__esModule",{value:!0}),t.DateFormats=void 0,t.addYears=function(e,t){if(!e)throw new Error("Date is required for addYears");const n=new Date(e);if(isNaN(n.getTime()))throw new Error(`Invalid date: ${e}`);return n.setFullYear(n.getFullYear()+t),n},t.addDays=function(e,t){if(!e)throw new Error("Date is required for addDays");const n=new Date(e);if(isNaN(n.getTime()))throw new Error(`Invalid date: ${e}`);return n.setDate(n.getDate()+t),n},t.addMonths=function(e,t){if(!e)throw new Error("Date is required for addMonths");const n=new Date(e);if(isNaN(n.getTime()))throw new Error(`Invalid date: ${e}`);return n.setMonth(n.getMonth()+t),n},t.formatDate=function(e,t="YYYY-MM-DD"){if(!e)throw new Error("Date is required for formatting");const r="string"==typeof e?new Date(e):e;if(isNaN(r.getTime()))throw new Error(`Invalid date: ${e}`);const i=r.getFullYear(),a=String(r.getMonth()+1).padStart(2,"0"),o=String(r.getDate()).padStart(2,"0"),s={YYYY:String(i),YY:String(i).slice(-2),MM:a,M:String(r.getMonth()+1),DD:o,D:String(r.getDate()),MMMM:["January","February","March","April","May","June","July","August","September","October","November","December"][r.getMonth()],MMM:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][r.getMonth()],dddd:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][r.getDay()],ddd:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][r.getDay()],Do:o+n(r.getDate())};let l=t;function c(e,t){let n=0;for(;n<=e.length-t.length;){const r=e.indexOf(t,n);if(-1===r)break;const i=r>0?e[r-1]:"",a=r+t.length<e.length?e[r+t.length]:"";if(i!==t[0]&&a!==t[0])return!0;n=r+1}return!1}const u=["dddd","ddd","MMMM","MMM","YYYY","YY","Do","DD","MM","D","M"];for(const e of u)s[e]&&c(t,e)&&(l=l.split(e).join(s[e]));return l},t.parseDate=function(e){const t=[/^\d{4}-\d{2}-\d{2}$/,/^\d{2}\/\d{2}\/\d{4}$/,/^\d{2}-\d{2}-\d{4}$/],n=new Date(e);if(!isNaN(n.getTime()))return n;if(t[0].test(e))return new Date(e);if(t[1].test(e)||t[2].test(e)){const t=e.includes("/")?"/":"-",n=e.split(t).map(Number);return n[0]<=12?new Date(n[2],n[0]-1,n[1]):new Date(n[2],n[1]-1,n[0])}return null},t.DateFormats={ISO:"YYYY-MM-DD",US:"MM/DD/YYYY",EU:"DD/MM/YYYY",UK:"DD/MM/YYYY",FULL:"MMMM Do, YYYY",FULL_US:"MMMM D, YYYY",SHORT:"MMM D, YYYY",LEGAL:"Do day of MMMM, YYYY",FORMAL:"dddd, MMMM Do, YYYY"}},162:t=>{t.exports=e},176:function(e,t,n){var r,i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=r(e),o=0;o<n.length;o++)"default"!==n[o]&&i(t,e,n[o]);return a(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.parseYamlFrontMatter=function(e,t=!1){const n={content:e,metadata:{}};if(!e.startsWith("---"))return n;const r=e.indexOf("---",3);if(-1===r)return n;let i=e.substring(3,r).trim();const a=e.substring(r+3).trim();i=function(e){return e.replace(/@today(?:\[([^\]]+)\])?/g,(e,t)=>{const n=t||"YYYY-MM-DD",r=function(e,t){try{switch(t.toLowerCase()){case"iso":case"yyyy-mm-dd":default:return e.toISOString().split("T")[0];case"long":return e.toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"});case"medium":return e.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"});case"short":return e.toLocaleDateString("en-US",{year:"2-digit",month:"short",day:"numeric"})}}catch(t){return e.toISOString().split("T")[0]}}(new Date,n);return`"${r}"`})}(i);try{const e=s.load(i);return e&&"object"==typeof e?{content:a,metadata:e}:{content:a,metadata:{}}}catch(e){if(t)throw new Error(`Invalid YAML Front Matter: ${e instanceof Error?e.message:"Unknown error"}`);return n}},t.serializeToYaml=function(e){try{return s.dump(e)}catch(e){return console.error("Error serializing metadata to YAML:",e),""}},t.extractMetadataOutputConfig=function(e){return{yamlOutput:e["meta-yaml-output"],jsonOutput:e["meta-json-output"],outputPath:e["meta-output-path"],includeOriginal:e["meta-include-original"]}};const s=o(n(210))},184:(e,t,n)=>{e.exports=n(759).extend({implicit:[n(198),n(199),n(466),n(461)]})},198:(e,t,n)=>{var r=n(388);e.exports=new r("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})},199:(e,t,n)=>{var r=n(388);e.exports=new r("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},210:(e,t,n)=>{var r=n(243),i=n(781);function a(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}e.exports.Type=n(388),e.exports.Schema=n(119),e.exports.FAILSAFE_SCHEMA=n(759),e.exports.JSON_SCHEMA=n(184),e.exports.CORE_SCHEMA=n(769),e.exports.DEFAULT_SCHEMA=n(489),e.exports.load=r.load,e.exports.loadAll=r.loadAll,e.exports.dump=i.dump,e.exports.YAMLException=n(231),e.exports.types={binary:n(342),float:n(461),map:n(369),null:n(198),pairs:n(942),set:n(663),timestamp:n(127),bool:n(199),int:n(466),merge:n(851),omap:n(946),seq:n(636),str:n(212)},e.exports.safeLoad=a("safeLoad","load"),e.exports.safeLoadAll=a("safeLoadAll","loadAll"),e.exports.safeDump=a("safeDump","dump")},212:(e,t,n)=>{var r=n(388);e.exports=new r("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}})},231:e=>{function t(e,t){var n="",r=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(n+='in "'+e.mark.name+'" '),n+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(n+="\n\n"+e.mark.snippet),r+" "+n):r}function n(e,n){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=n,this.message=t(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n.prototype.toString=function(e){return this.name+": "+t(this,e)},e.exports=n},243:(e,t,n)=>{var r=n(433),i=n(231),a=n(83),o=n(489),s=Object.prototype.hasOwnProperty,l=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,c=/[\x85\u2028\u2029]/,u=/[,\[\]\{\}]/,p=/^(?:!|!!|![a-z\-]+!)$/i,d=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function f(e){return Object.prototype.toString.call(e)}function g(e){return 10===e||13===e}function m(e){return 9===e||32===e}function h(e){return 9===e||32===e||10===e||13===e}function y(e){return 44===e||91===e||93===e||123===e||125===e}function b(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function v(e){return 120===e?2:117===e?4:85===e?8:0}function w(e){return 48<=e&&e<=57?e-48:-1}function x(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e||9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"
":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function M(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}for(var A=new Array(256),k=new Array(256),O=0;O<256;O++)A[O]=x(O)?1:0,k[O]=x(O);function $(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||o,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function S(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=a(n),new i(t,n)}function C(e,t){throw S(e,t)}function j(e,t){e.onWarning&&e.onWarning.call(null,S(e,t))}var F={YAML:function(e,t,n){var r,i,a;null!==e.version&&C(e,"duplication of %YAML directive"),1!==n.length&&C(e,"YAML directive accepts exactly one argument"),null===(r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&C(e,"ill-formed argument of the YAML directive"),i=parseInt(r[1],10),a=parseInt(r[2],10),1!==i&&C(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=a<2,1!==a&&2!==a&&j(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var r,i;2!==n.length&&C(e,"TAG directive accepts exactly two arguments"),r=n[0],i=n[1],p.test(r)||C(e,"ill-formed tag handle (first argument) of the TAG directive"),s.call(e.tagMap,r)&&C(e,'there is a previously declared suffix for "'+r+'" tag handle'),d.test(i)||C(e,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch(t){C(e,"tag prefix is malformed: "+i)}e.tagMap[r]=i}};function I(e,t,n,r){var i,a,o,s;if(t<n){if(s=e.input.slice(t,n),r)for(i=0,a=s.length;i<a;i+=1)9===(o=s.charCodeAt(i))||32<=o&&o<=1114111||C(e,"expected valid JSON character");else l.test(s)&&C(e,"the stream contains non-printable characters");e.result+=s}}function T(e,t,n,i){var a,o,l,c;for(r.isObject(n)||C(e,"cannot merge mappings; the provided source object is unacceptable"),l=0,c=(a=Object.keys(n)).length;l<c;l+=1)o=a[l],s.call(t,o)||(t[o]=n[o],i[o]=!0)}function D(e,t,n,r,i,a,o,l,c){var u,p;if(Array.isArray(i))for(u=0,p=(i=Array.prototype.slice.call(i)).length;u<p;u+=1)Array.isArray(i[u])&&C(e,"nested arrays are not supported inside keys"),"object"==typeof i&&"[object Object]"===f(i[u])&&(i[u]="[object Object]");if("object"==typeof i&&"[object Object]"===f(i)&&(i="[object Object]"),i=String(i),null===t&&(t={}),"tag:yaml.org,2002:merge"===r)if(Array.isArray(a))for(u=0,p=a.length;u<p;u+=1)T(e,t,a[u],n);else T(e,t,a,n);else e.json||s.call(n,i)||!s.call(t,i)||(e.line=o||e.line,e.lineStart=l||e.lineStart,e.position=c||e.position,C(e,"duplicated mapping key")),"__proto__"===i?Object.defineProperty(t,i,{configurable:!0,enumerable:!0,writable:!0,value:a}):t[i]=a,delete n[i];return t}function P(e){var t;10===(t=e.input.charCodeAt(e.position))?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):C(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function L(e,t,n){for(var r=0,i=e.input.charCodeAt(e.position);0!==i;){for(;m(i);)9===i&&-1===e.firstTabInLine&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(t&&35===i)do{i=e.input.charCodeAt(++e.position)}while(10!==i&&13!==i&&0!==i);if(!g(i))break;for(P(e),i=e.input.charCodeAt(e.position),r++,e.lineIndent=0;32===i;)e.lineIndent++,i=e.input.charCodeAt(++e.position)}return-1!==n&&0!==r&&e.lineIndent<n&&j(e,"deficient indentation"),r}function _(e){var t,n=e.position;return!(45!==(t=e.input.charCodeAt(n))&&46!==t||t!==e.input.charCodeAt(n+1)||t!==e.input.charCodeAt(n+2)||(n+=3,0!==(t=e.input.charCodeAt(n))&&!h(t)))}function Y(e,t){1===t?e.result+=" ":t>1&&(e.result+=r.repeat("\n",t-1))}function N(e,t){var n,r,i=e.tag,a=e.anchor,o=[],s=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=o),r=e.input.charCodeAt(e.position);0!==r&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,C(e,"tab characters must not be used in indentation")),45===r)&&h(e.input.charCodeAt(e.position+1));)if(s=!0,e.position++,L(e,!0,-1)&&e.lineIndent<=t)o.push(null),r=e.input.charCodeAt(e.position);else if(n=e.line,R(e,t,3,!1,!0),o.push(e.result),L(e,!0,-1),r=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==r)C(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return!!s&&(e.tag=i,e.anchor=a,e.kind="sequence",e.result=o,!0)}function E(e){var t,n,r,i,a=!1,o=!1;if(33!==(i=e.input.charCodeAt(e.position)))return!1;if(null!==e.tag&&C(e,"duplication of a tag property"),60===(i=e.input.charCodeAt(++e.position))?(a=!0,i=e.input.charCodeAt(++e.position)):33===i?(o=!0,n="!!",i=e.input.charCodeAt(++e.position)):n="!",t=e.position,a){do{i=e.input.charCodeAt(++e.position)}while(0!==i&&62!==i);e.position<e.length?(r=e.input.slice(t,e.position),i=e.input.charCodeAt(++e.position)):C(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==i&&!h(i);)33===i&&(o?C(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),p.test(n)||C(e,"named tag handle cannot contain such characters"),o=!0,t=e.position+1)),i=e.input.charCodeAt(++e.position);r=e.input.slice(t,e.position),u.test(r)&&C(e,"tag suffix cannot contain flow indicator characters")}r&&!d.test(r)&&C(e,"tag name cannot contain such characters: "+r);try{r=decodeURIComponent(r)}catch(t){C(e,"tag name is malformed: "+r)}return a?e.tag=r:s.call(e.tagMap,n)?e.tag=e.tagMap[n]+r:"!"===n?e.tag="!"+r:"!!"===n?e.tag="tag:yaml.org,2002:"+r:C(e,'undeclared tag handle "'+n+'"'),!0}function W(e){var t,n;if(38!==(n=e.input.charCodeAt(e.position)))return!1;for(null!==e.anchor&&C(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!h(n)&&!y(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&C(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function R(e,t,n,i,a){var o,l,c,u,p,d,f,x,O,$=1,S=!1,j=!1;if(null!==e.listener&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=l=c=4===n||3===n,i&&L(e,!0,-1)&&(S=!0,e.lineIndent>t?$=1:e.lineIndent===t?$=0:e.lineIndent<t&&($=-1)),1===$)for(;E(e)||W(e);)L(e,!0,-1)?(S=!0,c=o,e.lineIndent>t?$=1:e.lineIndent===t?$=0:e.lineIndent<t&&($=-1)):c=!1;if(c&&(c=S||a),1!==$&&4!==n||(x=1===n||2===n?t:t+1,O=e.position-e.lineStart,1===$?c&&(N(e,O)||function(e,t,n){var r,i,a,o,s,l,c,u=e.tag,p=e.anchor,d={},f=Object.create(null),g=null,y=null,b=null,v=!1,w=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=d),c=e.input.charCodeAt(e.position);0!==c;){if(v||-1===e.firstTabInLine||(e.position=e.firstTabInLine,C(e,"tab characters must not be used in indentation")),r=e.input.charCodeAt(e.position+1),a=e.line,63!==c&&58!==c||!h(r)){if(o=e.line,s=e.lineStart,l=e.position,!R(e,n,2,!1,!0))break;if(e.line===a){for(c=e.input.charCodeAt(e.position);m(c);)c=e.input.charCodeAt(++e.position);if(58===c)h(c=e.input.charCodeAt(++e.position))||C(e,"a whitespace character is expected after the key-value separator within a block mapping"),v&&(D(e,d,f,g,y,null,o,s,l),g=y=b=null),w=!0,v=!1,i=!1,g=e.tag,y=e.result;else{if(!w)return e.tag=u,e.anchor=p,!0;C(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!w)return e.tag=u,e.anchor=p,!0;C(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===c?(v&&(D(e,d,f,g,y,null,o,s,l),g=y=b=null),w=!0,v=!0,i=!0):v?(v=!1,i=!0):C(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,c=r;if((e.line===a||e.lineIndent>t)&&(v&&(o=e.line,s=e.lineStart,l=e.position),R(e,t,4,!0,i)&&(v?y=e.result:b=e.result),v||(D(e,d,f,g,y,b,o,s,l),g=y=b=null),L(e,!0,-1),c=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&0!==c)C(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return v&&D(e,d,f,g,y,null,o,s,l),w&&(e.tag=u,e.anchor=p,e.kind="mapping",e.result=d),w}(e,O,x))||function(e,t){var n,r,i,a,o,s,l,c,u,p,d,f,g=!0,m=e.tag,y=e.anchor,b=Object.create(null);if(91===(f=e.input.charCodeAt(e.position)))o=93,c=!1,a=[];else{if(123!==f)return!1;o=125,c=!0,a={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),f=e.input.charCodeAt(++e.position);0!==f;){if(L(e,!0,t),(f=e.input.charCodeAt(e.position))===o)return e.position++,e.tag=m,e.anchor=y,e.kind=c?"mapping":"sequence",e.result=a,!0;g?44===f&&C(e,"expected the node content, but found ','"):C(e,"missed comma between flow collection entries"),d=null,s=l=!1,63===f&&h(e.input.charCodeAt(e.position+1))&&(s=l=!0,e.position++,L(e,!0,t)),n=e.line,r=e.lineStart,i=e.position,R(e,t,1,!1,!0),p=e.tag,u=e.result,L(e,!0,t),f=e.input.charCodeAt(e.position),!l&&e.line!==n||58!==f||(s=!0,f=e.input.charCodeAt(++e.position),L(e,!0,t),R(e,t,1,!1,!0),d=e.result),c?D(e,a,b,p,u,d,n,r,i):s?a.push(D(e,null,b,p,u,d,n,r,i)):a.push(u),L(e,!0,t),44===(f=e.input.charCodeAt(e.position))?(g=!0,f=e.input.charCodeAt(++e.position)):g=!1}C(e,"unexpected end of the stream within a flow collection")}(e,x)?j=!0:(l&&function(e,t){var n,i,a,o,s=1,l=!1,c=!1,u=t,p=0,d=!1;if(124===(o=e.input.charCodeAt(e.position)))i=!1;else{if(62!==o)return!1;i=!0}for(e.kind="scalar",e.result="";0!==o;)if(43===(o=e.input.charCodeAt(++e.position))||45===o)1===s?s=43===o?3:2:C(e,"repeat of a chomping mode identifier");else{if(!((a=w(o))>=0))break;0===a?C(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?C(e,"repeat of an indentation width identifier"):(u=t+a-1,c=!0)}if(m(o)){do{o=e.input.charCodeAt(++e.position)}while(m(o));if(35===o)do{o=e.input.charCodeAt(++e.position)}while(!g(o)&&0!==o)}for(;0!==o;){for(P(e),e.lineIndent=0,o=e.input.charCodeAt(e.position);(!c||e.lineIndent<u)&&32===o;)e.lineIndent++,o=e.input.charCodeAt(++e.position);if(!c&&e.lineIndent>u&&(u=e.lineIndent),g(o))p++;else{if(e.lineIndent<u){3===s?e.result+=r.repeat("\n",l?1+p:p):1===s&&l&&(e.result+="\n");break}for(i?m(o)?(d=!0,e.result+=r.repeat("\n",l?1+p:p)):d?(d=!1,e.result+=r.repeat("\n",p+1)):0===p?l&&(e.result+=" "):e.result+=r.repeat("\n",p):e.result+=r.repeat("\n",l?1+p:p),l=!0,c=!0,p=0,n=e.position;!g(o)&&0!==o;)o=e.input.charCodeAt(++e.position);I(e,n,e.position,!1)}}return!0}(e,x)||function(e,t){var n,r,i;if(39!==(n=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(I(e,r,e.position,!0),39!==(n=e.input.charCodeAt(++e.position)))return!0;r=e.position,e.position++,i=e.position}else g(n)?(I(e,r,i,!0),Y(e,L(e,!1,t)),r=i=e.position):e.position===e.lineStart&&_(e)?C(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);C(e,"unexpected end of the stream within a single quoted scalar")}(e,x)||function(e,t){var n,r,i,a,o,s;if(34!==(s=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,n=r=e.position;0!==(s=e.input.charCodeAt(e.position));){if(34===s)return I(e,n,e.position,!0),e.position++,!0;if(92===s){if(I(e,n,e.position,!0),g(s=e.input.charCodeAt(++e.position)))L(e,!1,t);else if(s<256&&A[s])e.result+=k[s],e.position++;else if((o=v(s))>0){for(i=o,a=0;i>0;i--)(o=b(s=e.input.charCodeAt(++e.position)))>=0?a=(a<<4)+o:C(e,"expected hexadecimal character");e.result+=M(a),e.position++}else C(e,"unknown escape sequence");n=r=e.position}else g(s)?(I(e,n,r,!0),Y(e,L(e,!1,t)),n=r=e.position):e.position===e.lineStart&&_(e)?C(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}C(e,"unexpected end of the stream within a double quoted scalar")}(e,x)?j=!0:function(e){var t,n,r;if(42!==(r=e.input.charCodeAt(e.position)))return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!h(r)&&!y(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&C(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),s.call(e.anchorMap,n)||C(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],L(e,!0,-1),!0}(e)?(j=!0,null===e.tag&&null===e.anchor||C(e,"alias node should not have any properties")):function(e,t,n){var r,i,a,o,s,l,c,u,p=e.kind,d=e.result;if(h(u=e.input.charCodeAt(e.position))||y(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if((63===u||45===u)&&(h(r=e.input.charCodeAt(e.position+1))||n&&y(r)))return!1;for(e.kind="scalar",e.result="",i=a=e.position,o=!1;0!==u;){if(58===u){if(h(r=e.input.charCodeAt(e.position+1))||n&&y(r))break}else if(35===u){if(h(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&_(e)||n&&y(u))break;if(g(u)){if(s=e.line,l=e.lineStart,c=e.lineIndent,L(e,!1,-1),e.lineIndent>=t){o=!0,u=e.input.charCodeAt(e.position);continue}e.position=a,e.line=s,e.lineStart=l,e.lineIndent=c;break}}o&&(I(e,i,a,!1),Y(e,e.line-s),i=a=e.position,o=!1),m(u)||(a=e.position+1),u=e.input.charCodeAt(++e.position)}return I(e,i,a,!1),!!e.result||(e.kind=p,e.result=d,!1)}(e,x,1===n)&&(j=!0,null===e.tag&&(e.tag="?")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===$&&(j=c&&N(e,O))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&C(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,p=e.implicitTypes.length;u<p;u+=1)if((f=e.implicitTypes[u]).resolve(e.result)){e.result=f.construct(e.result),e.tag=f.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else if("!"!==e.tag){if(s.call(e.typeMap[e.kind||"fallback"],e.tag))f=e.typeMap[e.kind||"fallback"][e.tag];else for(f=null,u=0,p=(d=e.typeMap.multi[e.kind||"fallback"]).length;u<p;u+=1)if(e.tag.slice(0,d[u].tag.length)===d[u].tag){f=d[u];break}f||C(e,"unknown tag !<"+e.tag+">"),null!==e.result&&f.kind!==e.kind&&C(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+f.kind+'", not "'+e.kind+'"'),f.resolve(e.result,e.tag)?(e.result=f.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):C(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||j}function U(e){var t,n,r,i,a=e.position,o=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(i=e.input.charCodeAt(e.position))&&(L(e,!0,-1),i=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==i));){for(o=!0,i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!h(i);)i=e.input.charCodeAt(++e.position);for(r=[],(n=e.input.slice(t,e.position)).length<1&&C(e,"directive name must not be less than one character in length");0!==i;){for(;m(i);)i=e.input.charCodeAt(++e.position);if(35===i){do{i=e.input.charCodeAt(++e.position)}while(0!==i&&!g(i));break}if(g(i))break;for(t=e.position;0!==i&&!h(i);)i=e.input.charCodeAt(++e.position);r.push(e.input.slice(t,e.position))}0!==i&&P(e),s.call(F,n)?F[n](e,n,r):j(e,'unknown document directive "'+n+'"')}L(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,L(e,!0,-1)):o&&C(e,"directives end mark is expected"),R(e,e.lineIndent-1,4,!1,!0),L(e,!0,-1),e.checkLineBreaks&&c.test(e.input.slice(a,e.position))&&j(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&_(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,L(e,!0,-1)):e.position<e.length-1&&C(e,"end of the stream or a document separator is expected")}function z(e,t){t=t||{},0!==(e=String(e)).length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var n=new $(e,t),r=e.indexOf("\0");for(-1!==r&&(n.position=r,C(n,"null byte is not allowed in input")),n.input+="\0";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)U(n);return n.documents}e.exports.loadAll=function(e,t,n){null!==t&&"object"==typeof t&&void 0===n&&(n=t,t=null);var r=z(e,n);if("function"!=typeof t)return r;for(var i=0,a=r.length;i<a;i+=1)t(r[i])},e.exports.load=function(e,t){var n=z(e,t);if(0!==n.length){if(1===n.length)return n[0];throw new i("expected a single document in the stream, but found more")}}},294:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.processMixins=function(e,t,n={}){if(n.noMixins)return e;const s=/\{\{([^}]+)\}\}/g;function l(e,t){return t.split(".").reduce((e,t)=>{const n=t.match(/^(\w+)\[(\d+)\]$/);if(n){const[,t,r]=n;return e?.[t]?.[parseInt(r,10)]}return e?.[t]},e)}function c(e,t){return e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")?e.slice(1,-1):/^-?\d+(\.\d+)?$/.test(e)?parseFloat(e):"true"===e||"false"!==e&&("null"===e?null:"undefined"!==e?"@today"===e?new Date:l(t,e):void 0)}return function e(a,u=0){return u>10?a:a.replace(s,(a,p)=>{const d=p.trim();if(d.includes("(")&&d.includes(")")){const e=function(e,t){try{const n=e.match(/^(\w+)\((.*)\)$/);if(!n)return;const[,r,a]=n,o=i.helpers[r];if(!o||"function"!=typeof o)return;const s=function(e,t){if(!e.trim())return[];const n=[];let r="",i=!1,a="";for(let o=0;o<e.length;o++){const s=e[o];i||'"'!==s&&"'"!==s?i&&s===a?(i=!1,a=""):i||","!==s?r+=s:(n.push(c(r.trim(),t)),r=""):(i=!0,a=s)}return r.trim()&&n.push(c(r.trim(),t)),n}(a,t);return o(...s)}catch(t){return void console.warn(`Error evaluating helper expression: ${e}`,t)}}(d,t);return void 0!==e?(r.fieldTracker.trackField(d,{value:e,hasLogic:!0,mixinUsed:"helper"}),n.enableFieldTracking?`<span class="highlight"><span class="imported-value" data-field="${o(d)}">${String(e)}</span></span>`:String(e)):n.enableFieldTracking?`<span class="highlight"><span class="missing-value" data-field="${o(d)}">[[${d}]]</span></span>`:`{{${d}}}`}if(d.includes("?")){const i=d.indexOf("?"),a=d.indexOf(":",i);if(-1!==a){const s=d.substring(0,i).trim(),c=d.substring(i+1,a).trim(),p=d.substring(a+1).trim(),f=l(t,s),g=f?c:p;if(r.fieldTracker.trackField(s,{value:f,hasLogic:!0,mixinUsed:"conditional"}),g){const t=e(g,u+1);return n.enableFieldTracking?`<span class="highlight"><span class="imported-value" data-field="${o(d)}">${t}</span></span>`:t}}return n.enableFieldTracking?`<span class="highlight"><span class="missing-value" data-field="${o(d)}">[[${d}]]</span></span>`:`{{${d}}}`}const f=l(t,d);if(null==f)return r.fieldTracker.trackField(d,{value:void 0,hasLogic:!1}),n.enableFieldTracking?`<span class="missing-value" data-field="${o(d)}">[[${d}]]</span>`:`{{${d}}}`;r.fieldTracker.trackField(d,{value:f,hasLogic:!1});const g=String(f);if(s.test(g)){const t=e(g,u+1);return n.enableFieldTracking?`<span class="imported-value" data-field="${o(d)}">${t}</span>`:t}return n.enableFieldTracking?`<span class="imported-value" data-field="${o(d)}">${g}</span>`:g})}((0,a.processTemplateLoops)(e,t,void 0,n.enableFieldTracking))};const r=n(321),i=n(730),a=n(519);function o(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}},321:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.fieldTracker=t.FieldTracker=t.FieldStatus=void 0;const r=n(628);var i;!function(e){e.FILLED="filled",e.EMPTY="empty",e.LOGIC="logic"}(i||(t.FieldStatus=i={}));class a{constructor(){this.fields=new Map,this.processedContent=""}trackField(e,t){const{value:n,originalValue:a,hasLogic:o=!1,mixinUsed:s}=t;let l;l=o||s?i.LOGIC:null==n||""===n?i.EMPTY:i.FILLED;const c={name:e,status:l,value:n,originalValue:a,hasLogic:o,mixinUsed:s};this.fields.set(e,c),r.logger.debug("Field tracked",{fieldName:e,status:l,hasLogic:o})}applyFieldTracking(e){let t=e;return this.fields.forEach((e,n)=>{const r=this.getFieldCssClass(e.status),i=new RegExp(`\\{\\{\\s*${n}\\s*\\}\\}`,"g");if(void 0!==e.value&&null!==e.value&&""!==e.value){const i=new RegExp(`(?<!<span[^>]*>)${this.escapeRegex(String(e.value))}(?!</span>)`,"g");t=t.replace(i,e=>`<span class="${r}" data-field="${n}">${e}</span>`)}else t=t.replace(i,e=>`<span class="${r}" data-field="${n}">[${n}]</span>`)}),this.processedContent=t,t}getFieldCssClass(e){switch(e){case i.FILLED:return"imported-value";case i.EMPTY:return"missing-value";case i.LOGIC:return"highlight";default:return""}}escapeRegex(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}getFields(){return new Map(this.fields)}getFieldsByStatus(e){return Array.from(this.fields.values()).filter(t=>t.status===e)}generateReport(){const e=Array.from(this.fields.values());return{total:e.length,filled:e.filter(e=>e.status===i.FILLED).length,empty:e.filter(e=>e.status===i.EMPTY).length,logic:e.filter(e=>e.status===i.LOGIC).length,fields:e}}clear(){this.fields.clear(),this.processedContent=""}}t.FieldTracker=a,t.fieldTracker=new a},342:(e,t,n)=>{var r=n(388),i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";e.exports=new r("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,r=0,a=e.length,o=i;for(n=0;n<a;n++)if(!((t=o.indexOf(e.charAt(n)))>64)){if(t<0)return!1;r+=6}return r%8==0},construct:function(e){var t,n,r=e.replace(/[\r\n=]/g,""),a=r.length,o=i,s=0,l=[];for(t=0;t<a;t++)t%4==0&&t&&(l.push(s>>16&255),l.push(s>>8&255),l.push(255&s)),s=s<<6|o.indexOf(r.charAt(t));return 0==(n=a%4*6)?(l.push(s>>16&255),l.push(s>>8&255),l.push(255&s)):18===n?(l.push(s>>10&255),l.push(s>>2&255)):12===n&&l.push(s>>4&255),new Uint8Array(l)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){var t,n,r="",a=0,o=e.length,s=i;for(t=0;t<o;t++)t%3==0&&t&&(r+=s[a>>18&63],r+=s[a>>12&63],r+=s[a>>6&63],r+=s[63&a]),a=(a<<8)+e[t];return 0==(n=o%3)?(r+=s[a>>18&63],r+=s[a>>12&63],r+=s[a>>6&63],r+=s[63&a]):2===n?(r+=s[a>>10&63],r+=s[a>>4&63],r+=s[a<<2&63],r+=s[64]):1===n&&(r+=s[a>>2&63],r+=s[a<<4&63],r+=s[64],r+=s[64]),r}})},369:(e,t,n)=>{var r=n(388);e.exports=new r("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},388:(e,t,n)=>{var r=n(231),i=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],a=["scalar","sequence","mapping"];e.exports=function(e,t){var n,o;if(t=t||{},Object.keys(t).forEach(function(t){if(-1===i.indexOf(t))throw new r('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=(n=t.styleAliases||null,o={},null!==n&&Object.keys(n).forEach(function(e){n[e].forEach(function(t){o[String(t)]=e})}),o),-1===a.indexOf(this.kind))throw new r('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}},401:(e,t)=>{function n(e,t="EUR",n=2){const r="string"==typeof e?parseFloat(e):e;if(isNaN(r))return String(e);const i=r.toFixed(n).replace(/\B(?=(\d{3})+(?!\d))/g,","),a={EUR:"€",USD:"$",GBP:"£"}[t]||t;return"EUR"===t?`${i} ${a}`:`${a}${i}`}Object.defineProperty(t,"__esModule",{value:!0}),t.formatInteger=function(e,t=","){const n="string"==typeof e?parseFloat(e):e;return isNaN(n)?String(e):Math.floor(n).toString().replace(/\B(?=(\d{3})+(?!\d))/g,t)},t.formatPercent=function(e,t=2,n=!0){const r="string"==typeof e?parseFloat(e):e;if(isNaN(r))return String(e);const i=r.toFixed(t);return n?`${i}%`:i},t.formatCurrency=n,t.formatEuro=function(e,t=2){return n(e,"EUR",t)},t.formatDollar=function(e,t=2){return n(e,"USD",t)},t.formatPound=function(e,t=2){return n(e,"GBP",t)},t.numberToWords=function e(t){const n="string"==typeof t?parseFloat(t):t;if(isNaN(n))return String(t);if(0===n)return"zero";const r=["","one","two","three","four","five","six","seven","eight","nine"],i=["","","twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"],a=["ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"],o=e=>e>=1e6?o(Math.floor(e/1e6))+" million "+s(e%1e6):s(e),s=e=>e>=1e3?l(Math.floor(e/1e3))+" thousand "+l(e%1e3):l(e),l=e=>{let t="";if(e>99&&(t+=r[Math.floor(e/100)]+" hundred ",e%=100),e>19)t+=i[Math.floor(e/10)]+" ",e%=10;else if(e>9)return t+=a[e-10]+" ",t.trim();return e>0&&(t+=r[e]+" "),t.trim()};if(n<0)return"negative "+e(Math.abs(n));const c=Math.floor(n),u=Math.round(100*(n-c));let p=o(c);return u>0&&(p+=" and "+l(u)+" cents"),p.trim()},t.formatNumber=function(e,t=2,n=".",r=","){const i="string"==typeof e?parseFloat(e):e;if(isNaN(i))return String(e);const a=i.toFixed(t).split(".");return a[0]=a[0].replace(/\B(?=(\d{3})+(?!\d))/g,r),a.join(n)},t.round=function(e,t=0){const n="string"==typeof e?parseFloat(e):e;if(isNaN(n))return 0;const r=Math.pow(10,t);return Math.round(n*r)/r}},409:(e,t)=>{function n(e){return e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():""}function r(e){return e?e.split(/[\s-_]+/).map((e,t)=>0===t?e.toLowerCase():e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(""):""}Object.defineProperty(t,"__esModule",{value:!0}),t.capitalize=n,t.capitalizeWords=function(e){return e?e.split(" ").map(e=>n(e)).join(" "):""},t.upper=function(e){return e?e.toUpperCase():""},t.lower=function(e){return e?e.toLowerCase():""},t.titleCase=function(e){if(!e)return"";const t=new Set(["a","an","and","as","at","but","by","for","if","in","nor","of","on","or","so","the","to","up","yet"]);return e.split(" ").map((r,i)=>{const a=r.toLowerCase();return 0===i||i===e.split(" ").length-1?n(r):t.has(a)?a:n(r)}).join(" ")},t.kebabCase=function(e){return e?e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase():""},t.snakeCase=function(e){return e?e.replace(/([a-z])([A-Z])/g,"$1_$2").replace(/[\s-]+/g,"_").toLowerCase():""},t.camelCase=r,t.pascalCase=function(e){if(!e)return"";const t=r(e);return t.charAt(0).toUpperCase()+t.slice(1)},t.truncate=function(e,t,n="..."){return e?e.length<=t?e:e.slice(0,t-n.length)+n:""},t.clean=function(e){return e?e.replace(/\s+/g," ").trim():""},t.pluralize=function(e,t,n){if(1===t)return e;if(n)return n;const r=[[/s$/i,"s"],[/([^aeiou])y$/i,"$1ies"],[/(x|z|s|sh|ch)$/i,"$1es"],[/$/i,"s"]];for(const[t,n]of r)if(t.test(e))return e.replace(t,n);return e+"s"},t.padStart=function(e,t,n=" "){return e?e.padStart(t,n):n.repeat(t)},t.padEnd=function(e,t,n=" "){return e?e.padEnd(t,n):n.repeat(t)},t.contains=function(e,t,n=!1){return!(!e||!t)&&(n?e.includes(t):e.toLowerCase().includes(t.toLowerCase()))},t.replaceAll=function(e,t,n){return e?e.split(t).join(n):""},t.initials=function(e){return e?e.split(" ").map(e=>e.charAt(0).toUpperCase()).join(""):""}},433:e=>{function t(e){return null==e}e.exports.isNothing=t,e.exports.isObject=function(e){return"object"==typeof e&&null!==e},e.exports.toArray=function(e){return Array.isArray(e)?e:t(e)?[]:[e]},e.exports.repeat=function(e,t){var n,r="";for(n=0;n<t;n+=1)r+=e;return r},e.exports.isNegativeZero=function(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e},e.exports.extend=function(e,t){var n,r,i,a;if(t)for(n=0,r=(a=Object.keys(t)).length;n<r;n+=1)e[i=a[n]]=t[i];return e}},461:(e,t,n)=>{var r=n(433),i=n(388),a=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),o=/^[-+]?[0-9]+e/;e.exports=new i("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!a.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n;return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||r.isNegativeZero(e))},represent:function(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(e))return"-0.0";return n=e.toString(10),o.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"})},466:(e,t,n)=>{var r=n(433),i=n(388);function a(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function o(e){return 48<=e&&e<=55}function s(e){return 48<=e&&e<=57}e.exports=new i("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n=e.length,r=0,i=!1;if(!n)return!1;if("-"!==(t=e[r])&&"+"!==t||(t=e[++r]),"0"===t){if(r+1===n)return!0;if("b"===(t=e[++r])){for(r++;r<n;r++)if("_"!==(t=e[r])){if("0"!==t&&"1"!==t)return!1;i=!0}return i&&"_"!==t}if("x"===t){for(r++;r<n;r++)if("_"!==(t=e[r])){if(!a(e.charCodeAt(r)))return!1;i=!0}return i&&"_"!==t}if("o"===t){for(r++;r<n;r++)if("_"!==(t=e[r])){if(!o(e.charCodeAt(r)))return!1;i=!0}return i&&"_"!==t}}if("_"===t)return!1;for(;r<n;r++)if("_"!==(t=e[r])){if(!s(e.charCodeAt(r)))return!1;i=!0}return!(!i||"_"===t)},construct:function(e){var t,n=e,r=1;if(-1!==n.indexOf("_")&&(n=n.replace(/_/g,"")),"-"!==(t=n[0])&&"+"!==t||("-"===t&&(r=-1),t=(n=n.slice(1))[0]),"0"===n)return 0;if("0"===t){if("b"===n[1])return r*parseInt(n.slice(2),2);if("x"===n[1])return r*parseInt(n.slice(2),16);if("o"===n[1])return r*parseInt(n.slice(2),8)}return r*parseInt(n,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!r.isNegativeZero(e)},represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},480:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseRestructuredText=o,t.parseRestructuredTextSync=s,t.isRestructuredText=l,t.convertRstToLegalMarkdown=async function(e){return l(e)?await o(e):e},t.convertRstToLegalMarkdownSync=function(e){return l(e)?s(e):e};const r=n(869),i=n(75),a=n(704);async function o(e){try{const t=await i.PandocFactory.createForContent(e);return t?(await t.convert(e,"rst","markdown")).replace(/\n{3,}/g,"\n\n").trim():a.FallbackParsers.convertRstBasic(e)}catch(t){return console.error("Error parsing RST:",t),a.FallbackParsers.convertRstBasic(e)}}function s(e){return a.FallbackParsers.convertRstBasic(e)}function l(e){return r.ContentDetector.needsRstParser(e)}},489:(e,t,n)=>{e.exports=n(769).extend({implicit:[n(127),n(851)],explicit:[n(342),n(946),n(942),n(663)]})},517:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PandocWasm=void 0,t.PandocWasm=class{constructor(e,t={}){this.pandocWasm=e,this.options={timeout:1e4,verbose:!1,...t}}async convert(e,t,n){if(!this.pandocWasm)throw new Error("Pandoc WASM not initialized");try{this.options.verbose&&console.log(`Converting ${t} to ${n} using pandoc-wasm`);const r=new Promise((e,t)=>{setTimeout(()=>{t(new Error(`Pandoc WASM conversion timed out after ${this.options.timeout}ms`))},this.options.timeout)});let i;if("function"==typeof this.pandocWasm.convert)i=Promise.resolve(this.pandocWasm.convert(e,t,n));else if("function"==typeof this.pandocWasm.pandoc)i=Promise.resolve(this.pandocWasm.pandoc(e,{from:t,to:n}));else{if("function"!=typeof this.pandocWasm.run)throw new Error("Unsupported pandoc-wasm API");{const r=["-f",t,"-t",n,"--wrap=none"];this.options.args&&r.push(...this.options.args),i=Promise.resolve(this.pandocWasm.run(r,e))}}return await Promise.race([i,r])}catch(e){throw new Error(`Pandoc WASM conversion failed: ${e.message}`)}}}},519:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.processTemplateLoops=a;const r=n(321);function i(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function a(e,t,n,r=!0){const i=function(e){const t=[],n=/\{\{#(\w+)\}\}([\s\S]*?)\{\{\/\1\}\}/g;let r;for(;null!==(r=n.exec(e));){const[e,n,i]=r;t.push({variable:n,content:i,start:r.index,end:r.index+e.length,fullMatch:e})}return t}(e);if(0===i.length)return e;let a=e;for(let e=i.length-1;e>=0;e--){const s=i[e],l=o(s,t,n,r);a=a.slice(0,s.start)+l+a.slice(s.end)}return a}function o(e,t,n,i=!0){const{variable:o,content:c}=e,u=function(e,t,n){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];if(n&&n.item&&Object.prototype.hasOwnProperty.call(n.item,e))return n.item[e];let r=n;for(;r&&r.parent;)if(r=r.parent,r.item&&Object.prototype.hasOwnProperty.call(r.item,e))return r.item[e]}(o,t,n);return r.fieldTracker.trackField(o,{value:u,hasLogic:!0,mixinUsed:"loop"}),Array.isArray(u)?function(e,t,n,r,i,o=!0){const c=[];for(let u=0;u<n.length;u++){const d=n[u],f={variable:e,item:d,index:u,total:n.length,parent:i},g=s(r,d,f);let m=t;m=a(m,g,f,o),m=l(m,g,f,o),m=p(m),c.push(m)}return c.join("\n")}(o,c,u,t,n,i):u?function(e,t,n,r,i,o=!0){const s={...r,[e]:n};let c=a(t,s,i,o);return c=l(c,s,i,o),c}(o,c,u,t,n,i):""}function s(e,t,n){const r={...e};return t&&"object"==typeof t&&!Array.isArray(t)&&Object.assign(r,t),r["@index"]=n.index,r["@total"]=n.total,r["@first"]=0===n.index,r["@last"]=n.index===n.total-1,r}function l(e,t,n,r=!0){return e.replace(/\{\{([^}]+)\}\}/g,(e,n)=>{const a=n.trim();if(a.includes("?")&&a.includes(":")){const e=function(e,t,n=!0){const r=c(e,"?"),a=c(e,":",r);if(-1===r||-1===a)return e;const o=e.substring(0,r).trim(),s=e.substring(r+1,a).trim(),l=e.substring(a+1).trim(),p=u(o,t)?s:l;if(p.startsWith('"')&&p.endsWith('"')||p.startsWith("'")&&p.endsWith("'")){const t=p.slice(1,-1);return n?`<span class="imported-value" data-field="${i(e)}">${t}</span>`:t}const d=function(e,t){if(e.includes("+"))return e.split("+").map(e=>{const n=e.trim();if(n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'"))return n.slice(1,-1);const r=u(n,t);return void 0!==r?String(r):n}).join("");const n=u(e,t);return void 0!==n?String(n):e}(p,t);return n?`<span class="imported-value" data-field="${i(e)}">${d}</span>`:d}(a,t,r);return r?`<span class="highlight">${e}</span>`:e}const o=u(a,t);return null==o?r?`<span class="missing-value" data-field="${i(a)}">[[${a}]]</span>`:`{{${a}}}`:r?`<span class="imported-value" data-field="${i(a)}">${String(o)}</span>`:String(o)})}function c(e,t,n=0){let r=!1,i="";for(let a=n;a<e.length;a++){const n=e[a];if(r||'"'!==n&&"'"!==n){if(r&&n===i)r=!1,i="";else if(!r&&n===t)return a}else r=!0,i=n}return-1}function u(e,t,n){const r=e.split(".");let i=t;for(const e of r){if(!i||"object"!=typeof i||!Object.prototype.hasOwnProperty.call(i,e))return;i=i[e]}return i}function p(e){const t=e.trim();return t.startsWith("- ")?`<li>${t.substring(2).trim()}</li>`:e}},576:(e,t)=>{function n(e,t){if(!e.trim())return!0;if(!(e.includes("=")||e.includes("!")||e.includes("AND")||e.includes("OR"))){const n=r(t,e.trim());return Boolean(n)}try{if(e.includes(" AND "))return e.split(" AND ").map(e=>e.trim()).every(e=>n(e,t));if(e.includes(" OR "))return e.split(" OR ").map(e=>e.trim()).some(e=>n(e,t));if(e.includes("=")){const n=e.includes("!="),i=e.split(n?"!=":"=").map(e=>e.trim());if(2!==i.length)return!1;const[a,o]=i,s=r(t,a);let l=o;return o.startsWith('"')&&o.endsWith('"')?l=o.slice(1,-1):"true"===o?l=!0:"false"===o?l=!1:isNaN(Number(o))||(l=Number(o)),n?s!==l:s===l}return!1}catch(e){return console.error("Error evaluating condition:",e),!1}}function r(e,t){const n=t.split(".");let r=e;for(const e of n){if(null==r)return;r=r[e]}return r}Object.defineProperty(t,"__esModule",{value:!0}),t.processOptionalClauses=function(e,t){return e.replace(/\[(.*?)\]\{(.*?)\}/gs,(e,r,i)=>n(i,t)?r:"")}},628:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.logger=void 0,t.logger={debug:(e,t)=>{},info:(e,t)=>{console.info(`[INFO] ${e}`,t||"")},warn:(e,t)=>{console.warn(`[WARN] ${e}`,t||"")},error:(e,t)=>{console.error(`[ERROR] ${e}`,t||"")}}},636:(e,t,n)=>{var r=n(388);e.exports=new r("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}})},660:e=>{e.exports=t},663:(e,t,n)=>{var r=n(388),i=Object.prototype.hasOwnProperty;e.exports=new r("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(e){if(null===e)return!0;var t,n=e;for(t in n)if(i.call(n,t)&&null!==n[t])return!1;return!0},construct:function(e){return null!==e?e:{}}})},681:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.processDateReferences=function(e,t,n={}){const r=function(e){return{dateFormat:e["date-format"]||e.dateFormat,timezone:e.timezone||e.tz,locale:e.locale||e.lang}}(t);return e.replace(/@today(?:\[([^\]]+)\])?/g,(e,t)=>{const n=t||r.dateFormat||"YYYY-MM-DD",i=r.timezone||"UTC",a=r.locale||"en-US";return function(e,t,n,r){try{const i={timeZone:n};switch(t.toLowerCase()){case"iso":case"yyyy-mm-dd":return i.year="numeric",i.month="2-digit",i.day="2-digit",new Intl.DateTimeFormat("en-CA",i).format(e);case"us":case"mm/dd/yyyy":return i.year="numeric",i.month="2-digit",i.day="2-digit",new Intl.DateTimeFormat("en-US",i).format(e);case"european":case"dd/mm/yyyy":return i.year="numeric",i.month="2-digit",i.day="2-digit",new Intl.DateTimeFormat("en-GB",i).format(e);case"long":return i.year="numeric",i.month="long",i.day="numeric",new Intl.DateTimeFormat(r,i).format(e);case"medium":return i.year="numeric",i.month="short",i.day="numeric",new Intl.DateTimeFormat(r,i).format(e);case"short":return i.year="2-digit",i.month="short",i.day="numeric",new Intl.DateTimeFormat(r,i).format(e);case"legal":return i.year="numeric",i.month="long",i.day="numeric",function(e,t){const n=function(e){const t=e%100;if(t>=11&&t<=13)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}(t);return e.replace(/\b\d+\b/,`${t}${n}`)}(new Intl.DateTimeFormat(r,i).format(e),e.getDate());default:try{return function(e,t,n,r){const i={timeZone:n},a=[{pattern:/YYYY/g,formatter:()=>new Intl.DateTimeFormat(r,{...i,year:"numeric"}).format(e)},{pattern:/YY/g,formatter:()=>new Intl.DateTimeFormat(r,{...i,year:"2-digit"}).format(e)},{pattern:/MMMM/g,formatter:()=>new Intl.DateTimeFormat(r,{...i,month:"long"}).format(e)},{pattern:/MMM/g,formatter:()=>new Intl.DateTimeFormat(r,{...i,month:"short"}).format(e)},{pattern:/MM/g,formatter:()=>new Intl.DateTimeFormat(r,{...i,month:"2-digit"}).format(e)},{pattern:/\bM\b/g,formatter:()=>new Intl.DateTimeFormat(r,{...i,month:"numeric"}).format(e)},{pattern:/DD/g,formatter:()=>new Intl.DateTimeFormat(r,{...i,day:"2-digit"}).format(e)},{pattern:/\bD\b/g,formatter:()=>new Intl.DateTimeFormat(r,{...i,day:"numeric"}).format(e)}];let o=t;for(const{pattern:e,formatter:t}of a)o=o.replace(e,t());if(o.match(/\b[YMDH]+\b/)||o===t)throw new Error("Invalid format pattern");return o}(e,t,n,r)}catch(t){return e.toISOString().split("T")[0]}}}catch(t){return e.toISOString().split("T")[0]}}(new Date,n,i,a)})}},704:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FallbackParsers=void 0,t.FallbackParsers=class{static convertRstBasic(e){console.warn("Using basic RST parser - some features may not work correctly");let t=e;return t=t.replace(/^(.+)\n([=]{3,})\s*$/gm,"# $1"),t=t.replace(/^(.+)\n([-]{3,})\s*$/gm,"## $1"),t=t.replace(/^(.+)\n([~]{3,})\s*$/gm,"### $1"),t=t.replace(/^(.+)\n([\^]{3,})\s*$/gm,"#### $1"),t=t.replace(/^(.+)\n(["]{3,})\s*$/gm,"##### $1"),t=t.replace(/^(.+)\n([']{3,})\s*$/gm,"###### $1"),t=t.replace(/^([=]{3,})\n(.+)\n([=]{3,})\s*$/gm,"# $2"),t=t.replace(/^([-]{3,})\n(.+)\n([-]{3,})\s*$/gm,"## $2"),t=t.replace(/\*\*([^*]+)\*\*/g,"**$1**"),t=t.replace(/\*([^*]+)\*/g,"*$1*"),t=t.replace(/:emphasis:`([^`]+)`/g,"*$1*"),t=t.replace(/:strong:`([^`]+)`/g,"**$1**"),t=t.replace(/:literal:`([^`]+)`/g,"`$1`"),t=t.replace(/``([^`]+)``/g,"`$1`"),t=t.replace(/`([^<]+?)\s*<([^>]+?)>`_/g,"[$1]($2)"),t=t.replace(/`([^`]+)`_/g,"[$1][$1]"),t=t.replace(/^(\s*)\* (.+)/gm,"$1- $2"),t=t.replace(/^(\s*)(\d+)\. (.+)/gm,"$1$2. $3"),t=t.replace(/^(\s*)(\d+)\) (.+)/gm,"$1$2. $3"),t=t.replace(/^(.+)::\s*$/gm,(e,t)=>t+"\n\n```"),t=t.replace(/^::\s*$/gm,"```"),(t.match(/```/g)||[]).length%2==1&&(t+="\n```"),t=t.replace(/^([^\n]+)\n(\s{4,})(.+)/gm,(e,t,n,r)=>t.includes("```")||r.includes("```")?e:`**${t}**\n${n}${r}`),t=t.replace(/^\.\.[ \t]+note::[ \t]*(.*)$/gm,"> **Note:** $1"),t=t.replace(/^\.\.[ \t]+warning::[ \t]*(.*)$/gm,"> **Warning:** $1"),t=t.replace(/^\.\.[ \t]+important::[ \t]*(.*)$/gm,"> **Important:** $1"),t=t.replace(/^\.\.[ \t]+(\w+)::[ \t]*(.*)$/gm,"\x3c!-- $1: $2 --\x3e"),t=t.replace(/(?<!\]\()https?:\/\/[^\s<>)]+(?!\))/g,"<$&>"),t=t.replace(/\n{3,}/g,"\n\n"),t.trim()}static convertLatexBasic(e){console.warn("Using basic LaTeX parser - some features may not work correctly");let t=e;const n=t.match(/\\title\{([^}]+)\}/),r=t.match(/\\author\{([^}]+)\}/),i=t.match(/\\date\{([^}]+)\}/);let a="";(n||r||i)&&(a="---\n",n&&(a+=`title: "${n[1]}"\n`),r&&(a+=`author: "${r[1]}"\n`),i&&(a+=`date: "${i[1]}"\n`),a+="---\n\n"),t=t.replace(/\\documentclass\{[^}]*\}/g,""),t=t.replace(/\\usepackage\{[^}]*\}/g,""),t=t.replace(/\\title\{[^}]*\}/g,""),t=t.replace(/\\author\{[^}]*\}/g,""),t=t.replace(/\\date\{[^}]*\}/g,""),t=t.replace(/\\maketitle/g,""),t=t.replace(/\\begin\{document\}/g,""),t=t.replace(/\\end\{document\}/g,""),t=t.replace(/\\section\*?\{([^}]+)\}/g,"# $1"),t=t.replace(/\\subsection\*?\{([^}]+)\}/g,"## $1"),t=t.replace(/\\subsubsection\*?\{([^}]+)\}/g,"### $1"),t=t.replace(/\\paragraph\*?\{([^}]+)\}/g,"#### $1"),t=t.replace(/\\subparagraph\*?\{([^}]+)\}/g,"##### $1"),t=t.replace(/\\textbf\{([^}]+)\}/g,"**$1**"),t=t.replace(/\\textit\{([^}]+)\}/g,"*$1*"),t=t.replace(/\\emph\{([^}]+)\}/g,"*$1*"),t=t.replace(/\\texttt\{([^}]+)\}/g,"`$1`"),t=t.replace(/\\underline\{([^}]+)\}/g,"__$1__"),t=t.replace(/\\verb\|([^|]+)\|/g,"`$1`"),t=t.replace(/\\href\{([^}]+)\}\{([^}]+)\}/g,"[$2]($1)"),t=t.replace(/\\url\{([^}]+)\}/g,"<$1>"),t=t.replace(/\\cite\{([^}]+)\}/g,"[$1]"),t=t.replace(/\\ref\{([^}]+)\}/g,"[$1]"),t=t.replace(/\\label\{([^}]+)\}/g,'<a name="$1"></a>'),t=t.replace(/\\begin\{enumerate\}([\s\S]*?)\\end\{enumerate\}/g,(e,t)=>{let n=1;return t.replace(/\\item\s+/g,()=>n+++". ")}),t=t.replace(/\\begin\{itemize\}([\s\S]*?)\\end\{itemize\}/g,(e,t)=>t.replace(/\\item\s+/g,"- ")),t=t.replace(/\\begin\{description\}([\s\S]*?)\\end\{description\}/g,(e,t)=>t.replace(/\\item\[([^\]]+)\]\s*([^\n\r]*)/g,"**$1**\n $2")),t=t.replace(/\\begin\{itemize\}/g,""),t=t.replace(/\\end\{itemize\}/g,""),t=t.replace(/\\begin\{enumerate\}/g,""),t=t.replace(/\\end\{enumerate\}/g,""),t=t.replace(/\\begin\{description\}/g,""),t=t.replace(/\\end\{description\}/g,""),t=t.replace(/\\item\s+/g,"- ");let o=1;const s=[];return t=t.replace(/\\footnote\{([^}]+)\}/g,(e,t)=>(s.push(`[^${o}]: ${t}`),`[^${o++}]`)),t=t.replace(/\\begin\{quote\}([\s\S]*?)\\end\{quote\}/g,(e,t)=>t.trim().split("\n").map(e=>e.trim()?`> ${e}`:">").join("\n")),t=t.replace(/``([^']+)''/g,'"$1"'),t=t.replace(/\\`([^']+)'/g,"'$1'"),t=t.replace(/\\begin\{verbatim\}/g,"```\n"),t=t.replace(/\\end\{verbatim\}/g,"\n```"),t=t.replace(/\\begin\{lstlisting\}(\[language=([^\]]+)\])?/g,"```$2\n"),t=t.replace(/\\end\{lstlisting\}/g,"\n```"),t=t.replace(/\\begin\{minted\}\{([^}]+)\}/g,"```$1\n"),t=t.replace(/\\end\{minted\}/g,"\n```"),t=t.replace(/\\tableofcontents/g,""),t=t.replace(/\\newpage/g,""),t=t.replace(/\\clearpage/g,""),t=t.replace(/\\bigskip/g,""),t=t.replace(/\\\\/g," "),t=t.replace(/^%.*$/gm,""),t=t.replace(/([^\\])%.*$/gm,"$1"),t=t.replace(/\\[a-zA-Z]+(\[[^\]]*\])?(\{[^}]*\})?/g,""),t=t.replace(/\n{3,}/g,"\n\n"),t=t.replace(/\s{2,}/g," "),s.length>0&&(t+="\n\n"+s.join("\n")),(a+t).trim()}}},730:function(e,t,n){var r,i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)},s=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=r(e),o=0;o<n.length;o++)"default"!==n[o]&&i(t,e,n[o]);return a(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.helpers=t.pluralize=t.clean=t.titleCase=t.lower=t.upper=t.capitalizeWords=t.capitalize=t.numberToWords=t.formatPound=t.formatDollar=t.formatEuro=t.formatCurrency=t.formatPercent=t.formatInteger=t.DateFormats=t.formatDate=t.addDays=t.addMonths=t.addYears=void 0,o(n(156),t),o(n(401),t),o(n(409),t);const l=n(156);Object.defineProperty(t,"addYears",{enumerable:!0,get:function(){return l.addYears}}),Object.defineProperty(t,"addMonths",{enumerable:!0,get:function(){return l.addMonths}}),Object.defineProperty(t,"addDays",{enumerable:!0,get:function(){return l.addDays}}),Object.defineProperty(t,"formatDate",{enumerable:!0,get:function(){return l.formatDate}}),Object.defineProperty(t,"DateFormats",{enumerable:!0,get:function(){return l.DateFormats}});const c=n(401);Object.defineProperty(t,"formatInteger",{enumerable:!0,get:function(){return c.formatInteger}}),Object.defineProperty(t,"formatPercent",{enumerable:!0,get:function(){return c.formatPercent}}),Object.defineProperty(t,"formatCurrency",{enumerable:!0,get:function(){return c.formatCurrency}}),Object.defineProperty(t,"formatEuro",{enumerable:!0,get:function(){return c.formatEuro}}),Object.defineProperty(t,"formatDollar",{enumerable:!0,get:function(){return c.formatDollar}}),Object.defineProperty(t,"formatPound",{enumerable:!0,get:function(){return c.formatPound}}),Object.defineProperty(t,"numberToWords",{enumerable:!0,get:function(){return c.numberToWords}});const u=n(409);Object.defineProperty(t,"capitalize",{enumerable:!0,get:function(){return u.capitalize}}),Object.defineProperty(t,"capitalizeWords",{enumerable:!0,get:function(){return u.capitalizeWords}}),Object.defineProperty(t,"upper",{enumerable:!0,get:function(){return u.upper}}),Object.defineProperty(t,"lower",{enumerable:!0,get:function(){return u.lower}}),Object.defineProperty(t,"titleCase",{enumerable:!0,get:function(){return u.titleCase}}),Object.defineProperty(t,"clean",{enumerable:!0,get:function(){return u.clean}}),Object.defineProperty(t,"pluralize",{enumerable:!0,get:function(){return u.pluralize}});const p=s(n(156)),d=s(n(401)),f=s(n(409));t.helpers={addYears:p.addYears,addMonths:p.addMonths,addDays:p.addDays,formatDate:p.formatDate,formatInteger:d.formatInteger,formatPercent:d.formatPercent,formatCurrency:d.formatCurrency,formatEuro:d.formatEuro,formatDollar:d.formatDollar,formatPound:d.formatPound,numberToWords:d.numberToWords,round:d.round,capitalize:f.capitalize,capitalizeWords:f.capitalizeWords,upper:f.upper,lower:f.lower,titleCase:f.titleCase,kebabCase:f.kebabCase,snakeCase:f.snakeCase,camelCase:f.camelCase,pascalCase:f.pascalCase,truncate:f.truncate,clean:f.clean,pluralize:f.pluralize,padStart:f.padStart,padEnd:f.padEnd,contains:f.contains,replaceAll:f.replaceAll,initials:f.initials}},759:(e,t,n)=>{var r=n(119);e.exports=new r({explicit:[n(212),n(636),n(369)]})},769:(e,t,n)=>{e.exports=n(184)},781:(e,t,n)=>{var r=n(433),i=n(231),a=n(489),o=Object.prototype.toString,s=Object.prototype.hasOwnProperty,l=65279,c={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},u=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],p=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function d(e){var t,n,a;if(t=e.toString(16).toUpperCase(),e<=255)n="x",a=2;else if(e<=65535)n="u",a=4;else{if(!(e<=4294967295))throw new i("code point within a string may not be greater than 0xFFFFFFFF");n="U",a=8}return"\\"+n+r.repeat("0",a-t.length)+t}function f(e){this.schema=e.schema||a,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=r.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=function(e,t){var n,r,i,a,o,l,c;if(null===t)return{};for(n={},i=0,a=(r=Object.keys(t)).length;i<a;i+=1)o=r[i],l=String(t[o]),"!!"===o.slice(0,2)&&(o="tag:yaml.org,2002:"+o.slice(2)),(c=e.compiledTypeMap.fallback[o])&&s.call(c.styleAliases,l)&&(l=c.styleAliases[l]),n[o]=l;return n}(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType='"'===e.quotingType?2:1,this.forceQuotes=e.forceQuotes||!1,this.replacer="function"==typeof e.replacer?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function g(e,t){for(var n,i=r.repeat(" ",t),a=0,o=-1,s="",l=e.length;a<l;)-1===(o=e.indexOf("\n",a))?(n=e.slice(a),a=l):(n=e.slice(a,o+1),a=o+1),n.length&&"\n"!==n&&(s+=i),s+=n;return s}function m(e,t){return"\n"+r.repeat(" ",e.indent*t)}function h(e){return 32===e||9===e}function y(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&e!==l||65536<=e&&e<=1114111}function b(e){return y(e)&&e!==l&&13!==e&&10!==e}function v(e,t,n){var r=b(e),i=r&&!h(e);return(n?r:r&&44!==e&&91!==e&&93!==e&&123!==e&&125!==e)&&35!==e&&!(58===t&&!i)||b(t)&&!h(t)&&35===e||58===t&&i}function w(e,t){var n,r=e.charCodeAt(t);return r>=55296&&r<=56319&&t+1<e.length&&(n=e.charCodeAt(t+1))>=56320&&n<=57343?1024*(r-55296)+n-56320+65536:r}function x(e){return/^\n* /.test(e)}function M(e,t,n,r,a){e.dump=function(){if(0===t.length)return 2===e.quotingType?'""':"''";if(!e.noCompatMode&&(-1!==u.indexOf(t)||p.test(t)))return 2===e.quotingType?'"'+t+'"':"'"+t+"'";var o=e.indent*Math.max(1,n),s=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),f=r||e.flowLevel>-1&&n>=e.flowLevel;switch(function(e,t,n,r,i,a,o,s){var c,u,p=0,d=null,f=!1,g=!1,m=-1!==r,b=-1,M=y(u=w(e,0))&&u!==l&&!h(u)&&45!==u&&63!==u&&58!==u&&44!==u&&91!==u&&93!==u&&123!==u&&125!==u&&35!==u&&38!==u&&42!==u&&33!==u&&124!==u&&61!==u&&62!==u&&39!==u&&34!==u&&37!==u&&64!==u&&96!==u&&function(e){return!h(e)&&58!==e}(w(e,e.length-1));if(t||o)for(c=0;c<e.length;p>=65536?c+=2:c++){if(!y(p=w(e,c)))return 5;M=M&&v(p,d,s),d=p}else{for(c=0;c<e.length;p>=65536?c+=2:c++){if(10===(p=w(e,c)))f=!0,m&&(g=g||c-b-1>r&&" "!==e[b+1],b=c);else if(!y(p))return 5;M=M&&v(p,d,s),d=p}g=g||m&&c-b-1>r&&" "!==e[b+1]}return f||g?n>9&&x(e)?5:o?2===a?5:2:g?4:3:!M||o||i(e)?2===a?5:2:1}(t,f,e.indent,s,function(t){return function(e,t){var n,r;for(n=0,r=e.implicitTypes.length;n<r;n+=1)if(e.implicitTypes[n].resolve(t))return!0;return!1}(e,t)},e.quotingType,e.forceQuotes&&!r,a)){case 1:return t;case 2:return"'"+t.replace(/'/g,"''")+"'";case 3:return"|"+A(t,e.indent)+k(g(t,o));case 4:return">"+A(t,e.indent)+k(g(function(e,t){for(var n,r,i,a=/(\n+)([^\n]*)/g,o=(i=-1!==(i=e.indexOf("\n"))?i:e.length,a.lastIndex=i,O(e.slice(0,i),t)),s="\n"===e[0]||" "===e[0];r=a.exec(e);){var l=r[1],c=r[2];n=" "===c[0],o+=l+(s||n||""===c?"":"\n")+O(c,t),s=n}return o}(t,s),o));case 5:return'"'+function(e){for(var t,n="",r=0,i=0;i<e.length;r>=65536?i+=2:i++)r=w(e,i),!(t=c[r])&&y(r)?(n+=e[i],r>=65536&&(n+=e[i+1])):n+=t||d(r);return n}(t)+'"';default:throw new i("impossible error: invalid scalar style")}}()}function A(e,t){var n=x(e)?String(t):"",r="\n"===e[e.length-1];return n+(!r||"\n"!==e[e.length-2]&&"\n"!==e?r?"":"-":"+")+"\n"}function k(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function O(e,t){if(""===e||" "===e[0])return e;for(var n,r,i=/ [^ ]/g,a=0,o=0,s=0,l="";n=i.exec(e);)(s=n.index)-a>t&&(r=o>a?o:s,l+="\n"+e.slice(a,r),a=r+1),o=s;return l+="\n",e.length-a>t&&o>a?l+=e.slice(a,o)+"\n"+e.slice(o+1):l+=e.slice(a),l.slice(1)}function $(e,t,n,r){var i,a,o,s="",l=e.tag;for(i=0,a=n.length;i<a;i+=1)o=n[i],e.replacer&&(o=e.replacer.call(n,String(i),o)),(C(e,t+1,o,!0,!0,!1,!0)||void 0===o&&C(e,t+1,null,!0,!0,!1,!0))&&(r&&""===s||(s+=m(e,t)),e.dump&&10===e.dump.charCodeAt(0)?s+="-":s+="- ",s+=e.dump);e.tag=l,e.dump=s||"[]"}function S(e,t,n){var r,a,l,c,u,p;for(l=0,c=(a=n?e.explicitTypes:e.implicitTypes).length;l<c;l+=1)if(((u=a[l]).instanceOf||u.predicate)&&(!u.instanceOf||"object"==typeof t&&t instanceof u.instanceOf)&&(!u.predicate||u.predicate(t))){if(n?u.multi&&u.representName?e.tag=u.representName(t):e.tag=u.tag:e.tag="?",u.represent){if(p=e.styleMap[u.tag]||u.defaultStyle,"[object Function]"===o.call(u.represent))r=u.represent(t,p);else{if(!s.call(u.represent,p))throw new i("!<"+u.tag+'> tag resolver accepts not "'+p+'" style');r=u.represent[p](t,p)}e.dump=r}return!0}return!1}function C(e,t,n,r,a,s,l){e.tag=null,e.dump=n,S(e,n,!1)||S(e,n,!0);var c,u=o.call(e.dump),p=r;r&&(r=e.flowLevel<0||e.flowLevel>t);var d,f,g="[object Object]"===u||"[object Array]"===u;if(g&&(f=-1!==(d=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||f||2!==e.indent&&t>0)&&(a=!1),f&&e.usedDuplicates[d])e.dump="*ref_"+d;else{if(g&&f&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),"[object Object]"===u)r&&0!==Object.keys(e.dump).length?(function(e,t,n,r){var a,o,s,l,c,u,p="",d=e.tag,f=Object.keys(n);if(!0===e.sortKeys)f.sort();else if("function"==typeof e.sortKeys)f.sort(e.sortKeys);else if(e.sortKeys)throw new i("sortKeys must be a boolean or a function");for(a=0,o=f.length;a<o;a+=1)u="",r&&""===p||(u+=m(e,t)),l=n[s=f[a]],e.replacer&&(l=e.replacer.call(n,s,l)),C(e,t+1,s,!0,!0,!0)&&((c=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024)&&(e.dump&&10===e.dump.charCodeAt(0)?u+="?":u+="? "),u+=e.dump,c&&(u+=m(e,t)),C(e,t+1,l,!0,c)&&(e.dump&&10===e.dump.charCodeAt(0)?u+=":":u+=": ",p+=u+=e.dump));e.tag=d,e.dump=p||"{}"}(e,t,e.dump,a),f&&(e.dump="&ref_"+d+e.dump)):(function(e,t,n){var r,i,a,o,s,l="",c=e.tag,u=Object.keys(n);for(r=0,i=u.length;r<i;r+=1)s="",""!==l&&(s+=", "),e.condenseFlow&&(s+='"'),o=n[a=u[r]],e.replacer&&(o=e.replacer.call(n,a,o)),C(e,t,a,!1,!1)&&(e.dump.length>1024&&(s+="? "),s+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),C(e,t,o,!1,!1)&&(l+=s+=e.dump));e.tag=c,e.dump="{"+l+"}"}(e,t,e.dump),f&&(e.dump="&ref_"+d+" "+e.dump));else if("[object Array]"===u)r&&0!==e.dump.length?(e.noArrayIndent&&!l&&t>0?$(e,t-1,e.dump,a):$(e,t,e.dump,a),f&&(e.dump="&ref_"+d+e.dump)):(function(e,t,n){var r,i,a,o="",s=e.tag;for(r=0,i=n.length;r<i;r+=1)a=n[r],e.replacer&&(a=e.replacer.call(n,String(r),a)),(C(e,t,a,!1,!1)||void 0===a&&C(e,t,null,!1,!1))&&(""!==o&&(o+=","+(e.condenseFlow?"":" ")),o+=e.dump);e.tag=s,e.dump="["+o+"]"}(e,t,e.dump),f&&(e.dump="&ref_"+d+" "+e.dump));else{if("[object String]"!==u){if("[object Undefined]"===u)return!1;if(e.skipInvalid)return!1;throw new i("unacceptable kind of an object to dump "+u)}"?"!==e.tag&&M(e,e.dump,t,s,p)}null!==e.tag&&"?"!==e.tag&&(c=encodeURI("!"===e.tag[0]?e.tag.slice(1):e.tag).replace(/!/g,"%21"),c="!"===e.tag[0]?"!"+c:"tag:yaml.org,2002:"===c.slice(0,18)?"!!"+c.slice(18):"!<"+c+">",e.dump=c+" "+e.dump)}return!0}function j(e,t){var n,r,i=[],a=[];for(F(e,i,a),n=0,r=a.length;n<r;n+=1)t.duplicates.push(i[a[n]]);t.usedDuplicates=new Array(r)}function F(e,t,n){var r,i,a;if(null!==e&&"object"==typeof e)if(-1!==(i=t.indexOf(e)))-1===n.indexOf(i)&&n.push(i);else if(t.push(e),Array.isArray(e))for(i=0,a=e.length;i<a;i+=1)F(e[i],t,n);else for(i=0,a=(r=Object.keys(e)).length;i<a;i+=1)F(e[r[i]],t,n)}e.exports.dump=function(e,t){var n=new f(t=t||{});n.noRefs||j(e,n);var r=e;return n.replacer&&(r=n.replacer.call({"":r},"",r)),C(n,0,r,!0,!0)?n.dump+"\n":""}},811:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseLatex=o,t.parseLatexSync=s,t.isLatex=l,t.convertLatexToLegalMarkdown=async function(e){return l(e)?await o(e):e},t.convertLatexToLegalMarkdownSync=function(e){return l(e)?s(e):e};const r=n(869),i=n(75),a=n(704);async function o(e){try{const t=await i.PandocFactory.createForContent(e);return t?(await t.convert(e,"latex","markdown")).replace(/\n{3,}/g,"\n\n").trim():a.FallbackParsers.convertLatexBasic(e)}catch(t){return console.error("Error parsing LaTeX:",t),a.FallbackParsers.convertLatexBasic(e)}}function s(e){return a.FallbackParsers.convertLatexBasic(e)}function l(e){return r.ContentDetector.needsLatexParser(e)}},851:(e,t,n)=>{var r=n(388);e.exports=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}})},862:function(e,t,n){var r,i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=r(e),o=0;o<n.length;o++)"default"!==n[o]&&i(t,e,n[o]);return a(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.PandocLoader=void 0;const s=n(869);class l{static async loadIfNeeded(e){if(!s.ContentDetector.needsPandoc(e))return!1;if("undefined"==typeof window)return!0;if(this.pandocWasm)return!0;if(this.loadingPromise)try{return await this.loadingPromise,null!==this.pandocWasm}catch(e){return!1}this.loadingPromise=this.loadPandocWasm();try{return this.pandocWasm=await this.loadingPromise,!0}catch(e){return console.warn("Failed to load pandoc-wasm:",e),!1}finally{this.loadingPromise=null}}static getPandocWasm(){return this.pandocWasm}static async loadPandocWasm(){try{const e=await Promise.resolve().then(()=>o(n(162)));return"function"==typeof e.init?await e.init():"function"==typeof e.default?await e.default():"object"==typeof e.default&&e.default.convert?e.default:e}catch(e){throw new Error(`Failed to load pandoc-wasm: ${e.message}`)}}static reset(){this.pandocWasm=null,this.loadingPromise=null}}t.PandocLoader=l,l.pandocWasm=null,l.loadingPromise=null},869:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ContentDetector=void 0,t.ContentDetector=class{static needsRstParser(e){return!e.startsWith("---")&&([/^\.\.[ \t]+\w+::/m,/`[^<]+[ \t]*<[^>]+>`_/,/^\.\.[ \t]+(note|warning|important)::/m,/::[ \t]*$/m].filter(t=>t.test(e)).length>=1||(!!/^.+\n[=~^"'`#*+<>-]{4,}[ \t]*$/m.test(e)||[/^\.\.[ \t]+\w+::/m,/^[=~^"'`#*+<>-]{4,}[ \t]*$/m,/`[^`]+`__?/,/`[^<]+[ \t]*<[^>]+>`_/,/::[ \t]*$/m,/^\.\.[ \t]+(note|warning|important)::/m,/^\*[ \t]+\S/m,/^\d+\.[ \t]+\S/m].filter(t=>t.test(e)).length>=2))}static needsLatexParser(e){return!e.startsWith("---")&&([/\\documentclass\{/,/\\begin\{document\}/,/\\section\*?\{/,/\\subsection\*?\{/,/\\usepackage\{/,/\\textbf\{/,/\\textit\{/,/\\emph\{/,/\\item\b/,/\\cite\{/,/\\ref\{/,/\\label\{/].filter(t=>t.test(e)).length>=1||[/\\documentclass\{/,/\\begin\{document\}/,/\\section\*?\{/,/\\subsection\*?\{/,/\\begin\{[^}]+\}/,/\\[a-zA-Z]+\{[^}]*\}/,/\\textbf\{/,/\\textit\{/,/\\emph\{/,/\\usepackage\{/,/\\href\{[^}]*\}\{[^}]*\}/,/\\item\b/,/\\cite\{/,/\\ref\{/,/\\label\{/].filter(t=>t.test(e)).length>=2)}static needsPandoc(e){return this.needsRstParser(e)||this.needsLatexParser(e)}}},942:(e,t,n)=>{var r=n(388),i=Object.prototype.toString;e.exports=new r("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,r,a,o,s=e;for(o=new Array(s.length),t=0,n=s.length;t<n;t+=1){if(r=s[t],"[object Object]"!==i.call(r))return!1;if(1!==(a=Object.keys(r)).length)return!1;o[t]=[a[0],r[a[0]]]}return!0},construct:function(e){if(null===e)return[];var t,n,r,i,a,o=e;for(a=new Array(o.length),t=0,n=o.length;t<n;t+=1)r=o[t],i=Object.keys(r),a[t]=[i[0],r[i[0]]];return a}})},946:(e,t,n)=>{var r=n(388),i=Object.prototype.hasOwnProperty,a=Object.prototype.toString;e.exports=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,r,o,s,l=[],c=e;for(t=0,n=c.length;t<n;t+=1){if(r=c[t],s=!1,"[object Object]"!==a.call(r))return!1;for(o in r)if(i.call(r,o)){if(s)return!1;s=!0}if(!s)return!1;if(-1!==l.indexOf(o))return!1;l.push(o)}return!0},construct:function(e){return null!==e?e:[]}})},961:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PandocNative=void 0;const r=n(660);t.PandocNative=class{constructor(e={}){this.options={timeout:1e4,verbose:!1,...e}}async convert(e,t,n){return new Promise((i,a)=>{const o=["-f",t,"-t",n,"--wrap=none"];this.options.args&&o.push(...this.options.args),this.options.verbose&&console.log(`Running pandoc with args: ${o.join(" ")}`);const s=(0,r.spawn)("pandoc",o);let l="",c="";const u=setTimeout(()=>{s.kill(),a(new Error(`Pandoc conversion timed out after ${this.options.timeout}ms`))},this.options.timeout);s.stdout.on("data",e=>{l+=e.toString()}),s.stderr.on("data",e=>{c+=e.toString()}),s.on("close",e=>{clearTimeout(u),0===e?i(l):a(new Error(`Pandoc failed with code ${e}: ${c}`))}),s.on("error",e=>{clearTimeout(u),a(new Error(`Failed to start pandoc: ${e.message}`))}),s.stdin.write(e),s.stdin.end()})}}}},r={};return function e(t){var i=r[t];if(void 0!==i)return i.exports;var a=r[t]={exports:{}};return n[t].call(a.exports,a,a.exports,e),a.exports}(148)})());
|
|
2
|
+
//# sourceMappingURL=legal-markdown.umd.min.js.map
|
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Legal Markdown Processor - Standalone</title>
|
|
7
|
+
<style>
|
|
8
|
+
body {
|
|
9
|
+
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
10
|
+
max-width: 800px;
|
|
11
|
+
margin: 0 auto;
|
|
12
|
+
padding: 20px;
|
|
13
|
+
background-color: #f5f5f5;
|
|
14
|
+
}
|
|
15
|
+
.container {
|
|
16
|
+
background: white;
|
|
17
|
+
padding: 30px;
|
|
18
|
+
border-radius: 8px;
|
|
19
|
+
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
|
|
20
|
+
}
|
|
21
|
+
h1 {
|
|
22
|
+
color: #333;
|
|
23
|
+
text-align: center;
|
|
24
|
+
margin-bottom: 30px;
|
|
25
|
+
}
|
|
26
|
+
.form-group {
|
|
27
|
+
margin-bottom: 20px;
|
|
28
|
+
}
|
|
29
|
+
label {
|
|
30
|
+
display: block;
|
|
31
|
+
margin-bottom: 5px;
|
|
32
|
+
font-weight: 500;
|
|
33
|
+
color: #555;
|
|
34
|
+
}
|
|
35
|
+
input[type="text"], input[type="file"], textarea, select {
|
|
36
|
+
width: 100%;
|
|
37
|
+
padding: 10px;
|
|
38
|
+
border: 2px solid #ddd;
|
|
39
|
+
border-radius: 4px;
|
|
40
|
+
font-size: 14px;
|
|
41
|
+
transition: border-color 0.3s;
|
|
42
|
+
}
|
|
43
|
+
input[type="text"]:focus, textarea:focus, select:focus {
|
|
44
|
+
outline: none;
|
|
45
|
+
border-color: #4CAF50;
|
|
46
|
+
}
|
|
47
|
+
textarea {
|
|
48
|
+
height: 200px;
|
|
49
|
+
resize: vertical;
|
|
50
|
+
font-family: 'Courier New', monospace;
|
|
51
|
+
}
|
|
52
|
+
.checkbox-group {
|
|
53
|
+
display: grid;
|
|
54
|
+
grid-template-columns: 1fr 1fr;
|
|
55
|
+
gap: 10px;
|
|
56
|
+
margin-top: 10px;
|
|
57
|
+
}
|
|
58
|
+
.checkbox-item {
|
|
59
|
+
display: flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
gap: 8px;
|
|
62
|
+
}
|
|
63
|
+
input[type="checkbox"] {
|
|
64
|
+
width: auto;
|
|
65
|
+
}
|
|
66
|
+
.output-options {
|
|
67
|
+
background: #f8f9fa;
|
|
68
|
+
padding: 15px;
|
|
69
|
+
border-radius: 4px;
|
|
70
|
+
margin-top: 10px;
|
|
71
|
+
}
|
|
72
|
+
.process-btn {
|
|
73
|
+
background: #4CAF50;
|
|
74
|
+
color: white;
|
|
75
|
+
padding: 12px 30px;
|
|
76
|
+
border: none;
|
|
77
|
+
border-radius: 4px;
|
|
78
|
+
font-size: 16px;
|
|
79
|
+
cursor: pointer;
|
|
80
|
+
display: block;
|
|
81
|
+
margin: 20px auto;
|
|
82
|
+
transition: background-color 0.3s;
|
|
83
|
+
}
|
|
84
|
+
.process-btn:hover {
|
|
85
|
+
background: #45a049;
|
|
86
|
+
}
|
|
87
|
+
.process-btn:disabled {
|
|
88
|
+
background: #ccc;
|
|
89
|
+
cursor: not-allowed;
|
|
90
|
+
}
|
|
91
|
+
.output-section {
|
|
92
|
+
margin-top: 30px;
|
|
93
|
+
padding: 20px;
|
|
94
|
+
background: #f8f9fa;
|
|
95
|
+
border-radius: 4px;
|
|
96
|
+
display: none;
|
|
97
|
+
}
|
|
98
|
+
.output-content {
|
|
99
|
+
background: white;
|
|
100
|
+
padding: 15px;
|
|
101
|
+
border-radius: 4px;
|
|
102
|
+
border: 1px solid #ddd;
|
|
103
|
+
font-family: 'Courier New', monospace;
|
|
104
|
+
white-space: pre-wrap;
|
|
105
|
+
max-height: 400px;
|
|
106
|
+
overflow-y: auto;
|
|
107
|
+
}
|
|
108
|
+
.download-btn {
|
|
109
|
+
background: #2196F3;
|
|
110
|
+
color: white;
|
|
111
|
+
padding: 8px 16px;
|
|
112
|
+
border: none;
|
|
113
|
+
border-radius: 4px;
|
|
114
|
+
cursor: pointer;
|
|
115
|
+
margin-top: 10px;
|
|
116
|
+
margin-right: 10px;
|
|
117
|
+
}
|
|
118
|
+
.download-btn:hover {
|
|
119
|
+
background: #1976D2;
|
|
120
|
+
}
|
|
121
|
+
.error {
|
|
122
|
+
color: #f44336;
|
|
123
|
+
background: #ffebee;
|
|
124
|
+
padding: 10px;
|
|
125
|
+
border-radius: 4px;
|
|
126
|
+
margin-top: 10px;
|
|
127
|
+
}
|
|
128
|
+
.success {
|
|
129
|
+
color: #4CAF50;
|
|
130
|
+
background: #e8f5e8;
|
|
131
|
+
padding: 10px;
|
|
132
|
+
border-radius: 4px;
|
|
133
|
+
margin-top: 10px;
|
|
134
|
+
}
|
|
135
|
+
.info {
|
|
136
|
+
background: #d1ecf1;
|
|
137
|
+
color: #0c5460;
|
|
138
|
+
padding: 15px;
|
|
139
|
+
border-radius: 4px;
|
|
140
|
+
margin-bottom: 20px;
|
|
141
|
+
border: 1px solid #bee5eb;
|
|
142
|
+
}
|
|
143
|
+
</style>
|
|
144
|
+
</head>
|
|
145
|
+
<body>
|
|
146
|
+
<div class="container">
|
|
147
|
+
<h1>Legal Markdown Processor</h1>
|
|
148
|
+
|
|
149
|
+
<div class="info">
|
|
150
|
+
<strong>ℹ️ Standalone Version:</strong> Esta versión usa la librería completa de Legal Markdown.
|
|
151
|
+
Todas las funcionalidades están disponibles excepto la generación de PDF.
|
|
152
|
+
</div>
|
|
153
|
+
|
|
154
|
+
<form id="processingForm">
|
|
155
|
+
<div class="form-group">
|
|
156
|
+
<label for="inputText">Input Content:</label>
|
|
157
|
+
<textarea id="inputText" placeholder="Paste your Legal Markdown content here or upload a file..."></textarea>
|
|
158
|
+
</div>
|
|
159
|
+
|
|
160
|
+
<div class="form-group">
|
|
161
|
+
<label for="fileInput">Or upload a file:</label>
|
|
162
|
+
<input type="file" id="fileInput" accept=".md,.txt">
|
|
163
|
+
</div>
|
|
164
|
+
|
|
165
|
+
<div class="form-group">
|
|
166
|
+
<label>Processing Options:</label>
|
|
167
|
+
<div class="checkbox-group">
|
|
168
|
+
<div class="checkbox-item">
|
|
169
|
+
<input type="checkbox" id="debug">
|
|
170
|
+
<label for="debug">Debug mode</label>
|
|
171
|
+
</div>
|
|
172
|
+
<div class="checkbox-item">
|
|
173
|
+
<input type="checkbox" id="yaml">
|
|
174
|
+
<label for="yaml">YAML only</label>
|
|
175
|
+
</div>
|
|
176
|
+
<div class="checkbox-item">
|
|
177
|
+
<input type="checkbox" id="headers">
|
|
178
|
+
<label for="headers">Headers only</label>
|
|
179
|
+
</div>
|
|
180
|
+
<div class="checkbox-item">
|
|
181
|
+
<input type="checkbox" id="noHeaders">
|
|
182
|
+
<label for="noHeaders">No headers</label>
|
|
183
|
+
</div>
|
|
184
|
+
<div class="checkbox-item">
|
|
185
|
+
<input type="checkbox" id="noClauses">
|
|
186
|
+
<label for="noClauses">No clauses</label>
|
|
187
|
+
</div>
|
|
188
|
+
<div class="checkbox-item">
|
|
189
|
+
<input type="checkbox" id="noReferences">
|
|
190
|
+
<label for="noReferences">No references</label>
|
|
191
|
+
</div>
|
|
192
|
+
<div class="checkbox-item">
|
|
193
|
+
<input type="checkbox" id="noImports">
|
|
194
|
+
<label for="noImports">No imports</label>
|
|
195
|
+
</div>
|
|
196
|
+
<div class="checkbox-item">
|
|
197
|
+
<input type="checkbox" id="noMixins">
|
|
198
|
+
<label for="noMixins">No mixins</label>
|
|
199
|
+
</div>
|
|
200
|
+
<div class="checkbox-item">
|
|
201
|
+
<input type="checkbox" id="noReset">
|
|
202
|
+
<label for="noReset">No reset</label>
|
|
203
|
+
</div>
|
|
204
|
+
<div class="checkbox-item">
|
|
205
|
+
<input type="checkbox" id="noIndent">
|
|
206
|
+
<label for="noIndent">No indent</label>
|
|
207
|
+
</div>
|
|
208
|
+
<div class="checkbox-item">
|
|
209
|
+
<input type="checkbox" id="toMarkdown">
|
|
210
|
+
<label for="toMarkdown">To Markdown</label>
|
|
211
|
+
</div>
|
|
212
|
+
</div>
|
|
213
|
+
</div>
|
|
214
|
+
|
|
215
|
+
<div class="form-group">
|
|
216
|
+
<label>Output Options:</label>
|
|
217
|
+
<div class="output-options">
|
|
218
|
+
<div class="checkbox-group">
|
|
219
|
+
<div class="checkbox-item">
|
|
220
|
+
<input type="checkbox" id="html">
|
|
221
|
+
<label for="html">HTML output</label>
|
|
222
|
+
</div>
|
|
223
|
+
<div class="checkbox-item">
|
|
224
|
+
<input type="checkbox" id="exportYaml">
|
|
225
|
+
<label for="exportYaml">Export YAML</label>
|
|
226
|
+
</div>
|
|
227
|
+
<div class="checkbox-item">
|
|
228
|
+
<input type="checkbox" id="exportJson">
|
|
229
|
+
<label for="exportJson">Export JSON</label>
|
|
230
|
+
</div>
|
|
231
|
+
</div>
|
|
232
|
+
|
|
233
|
+
<div class="form-group">
|
|
234
|
+
<label for="title">Document Title:</label>
|
|
235
|
+
<input type="text" id="title" placeholder="Enter document title">
|
|
236
|
+
</div>
|
|
237
|
+
</div>
|
|
238
|
+
</div>
|
|
239
|
+
|
|
240
|
+
<button type="submit" class="process-btn">Process Document</button>
|
|
241
|
+
</form>
|
|
242
|
+
|
|
243
|
+
<div id="outputSection" class="output-section">
|
|
244
|
+
<h3>Output:</h3>
|
|
245
|
+
<div id="outputContent" class="output-content"></div>
|
|
246
|
+
<button id="downloadBtn" class="download-btn">Download Result</button>
|
|
247
|
+
<button id="downloadMetadata" class="download-btn" style="display:none;">Download Metadata</button>
|
|
248
|
+
</div>
|
|
249
|
+
|
|
250
|
+
<div id="messageArea"></div>
|
|
251
|
+
</div>
|
|
252
|
+
|
|
253
|
+
<!-- Include the bundled legal-markdown library -->
|
|
254
|
+
<script src="./legal-markdown-bundle.js"></script>
|
|
255
|
+
<script>
|
|
256
|
+
// Check if the library loaded correctly
|
|
257
|
+
if (typeof window.LegalMarkdown === 'undefined') {
|
|
258
|
+
console.error('Legal Markdown library not loaded');
|
|
259
|
+
document.querySelector('.info').innerHTML =
|
|
260
|
+
'<strong>⚠️ Error:</strong> La librería Legal Markdown no se pudo cargar. ' +
|
|
261
|
+
'Por favor, asegúrate de que el archivo legal-markdown-bundle.js esté disponible.';
|
|
262
|
+
document.querySelector('.info').style.background = '#f8d7da';
|
|
263
|
+
document.querySelector('.info').style.color = '#721c24';
|
|
264
|
+
document.querySelector('.info').style.borderColor = '#f5c6cb';
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
// Use the real library
|
|
268
|
+
const LegalMarkdown = window.LegalMarkdown || {
|
|
269
|
+
processLegalMarkdown: function() {
|
|
270
|
+
throw new Error('Legal Markdown library not available');
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
|
|
274
|
+
let processedResult = null;
|
|
275
|
+
let metadataResult = null;
|
|
276
|
+
let outputFormat = 'md';
|
|
277
|
+
|
|
278
|
+
document.getElementById('fileInput').addEventListener('change', function(e) {
|
|
279
|
+
const file = e.target.files[0];
|
|
280
|
+
if (file) {
|
|
281
|
+
const reader = new FileReader();
|
|
282
|
+
reader.onload = function(e) {
|
|
283
|
+
document.getElementById('inputText').value = e.target.result;
|
|
284
|
+
};
|
|
285
|
+
reader.readAsText(file);
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
|
|
289
|
+
document.getElementById('processingForm').addEventListener('submit', async function(e) {
|
|
290
|
+
e.preventDefault();
|
|
291
|
+
|
|
292
|
+
const inputText = document.getElementById('inputText').value;
|
|
293
|
+
if (!inputText.trim()) {
|
|
294
|
+
showMessage('Please enter some content to process.', 'error');
|
|
295
|
+
return;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
const options = {
|
|
299
|
+
debug: document.getElementById('debug').checked,
|
|
300
|
+
yamlOnly: document.getElementById('yaml').checked,
|
|
301
|
+
noHeaders: document.getElementById('noHeaders').checked,
|
|
302
|
+
noClauses: document.getElementById('headers').checked || document.getElementById('noClauses').checked,
|
|
303
|
+
noReferences: document.getElementById('headers').checked || document.getElementById('noReferences').checked,
|
|
304
|
+
noImports: document.getElementById('headers').checked || document.getElementById('noImports').checked,
|
|
305
|
+
noMixins: document.getElementById('headers').checked || document.getElementById('noMixins').checked,
|
|
306
|
+
noReset: document.getElementById('noReset').checked,
|
|
307
|
+
noIndent: document.getElementById('noIndent').checked,
|
|
308
|
+
throwOnYamlError: false,
|
|
309
|
+
toMarkdown: document.getElementById('toMarkdown').checked,
|
|
310
|
+
html: document.getElementById('html').checked,
|
|
311
|
+
exportMetadata: document.getElementById('exportYaml').checked || document.getElementById('exportJson').checked,
|
|
312
|
+
exportFormat: document.getElementById('exportYaml').checked ? 'yaml' : 'json',
|
|
313
|
+
title: document.getElementById('title').value,
|
|
314
|
+
basePath: '.'
|
|
315
|
+
};
|
|
316
|
+
|
|
317
|
+
const processBtn = document.querySelector('.process-btn');
|
|
318
|
+
processBtn.disabled = true;
|
|
319
|
+
processBtn.textContent = 'Processing...';
|
|
320
|
+
|
|
321
|
+
try {
|
|
322
|
+
console.log('Processing with options:', options);
|
|
323
|
+
processedResult = await LegalMarkdown.processLegalMarkdown(inputText, options);
|
|
324
|
+
|
|
325
|
+
if (options.html) {
|
|
326
|
+
outputFormat = 'html';
|
|
327
|
+
} else if (options.exportMetadata) {
|
|
328
|
+
outputFormat = options.exportFormat;
|
|
329
|
+
} else {
|
|
330
|
+
outputFormat = 'md';
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
document.getElementById('outputContent').textContent = processedResult;
|
|
334
|
+
document.getElementById('outputSection').style.display = 'block';
|
|
335
|
+
|
|
336
|
+
if (options.exportMetadata) {
|
|
337
|
+
document.getElementById('downloadMetadata').style.display = 'inline-block';
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
showMessage('Document processed successfully!', 'success');
|
|
341
|
+
|
|
342
|
+
} catch (error) {
|
|
343
|
+
showMessage('Error processing document: ' + error.message, 'error');
|
|
344
|
+
console.error('Processing error:', error);
|
|
345
|
+
} finally {
|
|
346
|
+
processBtn.disabled = false;
|
|
347
|
+
processBtn.textContent = 'Process Document';
|
|
348
|
+
}
|
|
349
|
+
});
|
|
350
|
+
|
|
351
|
+
document.getElementById('downloadBtn').addEventListener('click', function() {
|
|
352
|
+
if (processedResult) {
|
|
353
|
+
downloadFile(processedResult, `output.${outputFormat}`);
|
|
354
|
+
}
|
|
355
|
+
});
|
|
356
|
+
|
|
357
|
+
document.getElementById('downloadMetadata').addEventListener('click', function() {
|
|
358
|
+
if (metadataResult) {
|
|
359
|
+
const format = document.getElementById('exportYaml').checked ? 'yaml' : 'json';
|
|
360
|
+
downloadFile(metadataResult, `metadata.${format}`);
|
|
361
|
+
}
|
|
362
|
+
});
|
|
363
|
+
|
|
364
|
+
function downloadFile(content, filename) {
|
|
365
|
+
const blob = new Blob([content], { type: 'text/plain' });
|
|
366
|
+
const url = URL.createObjectURL(blob);
|
|
367
|
+
const a = document.createElement('a');
|
|
368
|
+
a.href = url;
|
|
369
|
+
a.download = filename;
|
|
370
|
+
document.body.appendChild(a);
|
|
371
|
+
a.click();
|
|
372
|
+
document.body.removeChild(a);
|
|
373
|
+
URL.revokeObjectURL(url);
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
function showMessage(message, type) {
|
|
377
|
+
const messageArea = document.getElementById('messageArea');
|
|
378
|
+
const messageDiv = document.createElement('div');
|
|
379
|
+
messageDiv.className = type;
|
|
380
|
+
messageDiv.textContent = message;
|
|
381
|
+
messageArea.innerHTML = '';
|
|
382
|
+
messageArea.appendChild(messageDiv);
|
|
383
|
+
|
|
384
|
+
setTimeout(() => {
|
|
385
|
+
messageArea.innerHTML = '';
|
|
386
|
+
}, 5000);
|
|
387
|
+
}
|
|
388
|
+
</script>
|
|
389
|
+
</body>
|
|
390
|
+
</html>
|