Files
church-translate/app/vendor/transformers.min.js
T

2 lines
867 KiB
JavaScript
Raw Normal View History

var e,t,n={"./node_modules/onnxruntime-web/dist/ort-wasm-simd-threaded.jsep.wasm":(e,t,n)=>{e.exports=n.p+"ort-wasm-simd-threaded.jsep.wasm"},"./node_modules/onnxruntime-web/dist/ort.bundle.min.mjs?46eb":(e,t,n)=>{e.exports=n.p+"ort.bundle.min.mjs"},"?2ce3":()=>{},"?7992":()=>{},"?5af5":()=>{},"?2b25":()=>{},"?db59":()=>{},"?383f":()=>{},"?fa4b":()=>{},"./node_modules/@huggingface/jinja/dist/index.js":(e,t,n)=>{n.r(t),n.d(t,{Environment:()=>ie,Interpreter:()=>ue,Template:()=>we,parse:()=>V,tokenize:()=>u});var r=Object.freeze({Text:"Text",NumericLiteral:"NumericLiteral",StringLiteral:"StringLiteral",Identifier:"Identifier",Equals:"Equals",OpenParen:"OpenParen",CloseParen:"CloseParen",OpenStatement:"OpenStatement",CloseStatement:"CloseStatement",OpenExpression:"OpenExpression",CloseExpression:"CloseExpression",OpenSquareBracket:"OpenSquareBracket",CloseSquareBracket:"CloseSquareBracket",OpenCurlyBracket:"OpenCurlyBracket",CloseCurlyBracket:"CloseCurlyBracket",Comma:"Comma",Dot:"Dot",Colon:"Colon",Pipe:"Pipe",CallOperator:"CallOperator",AdditiveBinaryOperator:"AdditiveBinaryOperator",MultiplicativeBinaryOperator:"MultiplicativeBinaryOperator",ComparisonBinaryOperator:"ComparisonBinaryOperator",UnaryOperator:"UnaryOperator",Comment:"Comment"}),s=class{constructor(e,t){this.value=e,this.type=t}};function a(e){return/\w/.test(e)}function o(e){return/[0-9]/.test(e)}function i(e){return/\s/.test(e)}var l=[["{%",r.OpenStatement],["%}",r.CloseStatement],["{{",r.OpenExpression],["}}",r.CloseExpression],["(",r.OpenParen],[")",r.CloseParen],["{",r.OpenCurlyBracket],["}",r.CloseCurlyBracket],["[",r.OpenSquareBracket],["]",r.CloseSquareBracket],[",",r.Comma],[".",r.Dot],[":",r.Colon],["|",r.Pipe],["<=",r.ComparisonBinaryOperator],[">=",r.ComparisonBinaryOperator],["==",r.ComparisonBinaryOperator],["!=",r.ComparisonBinaryOperator],["<",r.ComparisonBinaryOperator],[">",r.ComparisonBinaryOperator],["+",r.AdditiveBinaryOperator],["-",r.AdditiveBinaryOperator],["~",r.AdditiveBinaryOperator],["*",r.MultiplicativeBinaryOperator],["/",r.MultiplicativeBinaryOperator],["%",r.MultiplicativeBinaryOperator],["=",r.Equals]],d=new Map([["n","\n"],["t","\t"],["r","\r"],["b","\b"],["f","\f"],["v","\v"],["'","'"],['"','"'],["\\","\\"]]);function u(e,t={}){const n=[],u=function(e,t={}){return e.endsWith("\n")&&(e=e.slice(0,-1)),t.lstrip_blocks&&(e=e.replace(/^[ \t]*({[#%-])/gm,"$1")),t.trim_blocks&&(e=e.replace(/([#%-]})\n/g,"$1")),e.replace(/{%\s*(end)?generation\s*%}/gs,"")}(e,t);let c=0,p=0;const m=e=>{let t="";for(;e(u[c]);)if("\\"!==u[c]){if(t+=u[c++],c>=u.length)throw new SyntaxError("Unexpected end of input")}else{if(++c,c>=u.length)throw new SyntaxError("Unexpected end of input");const e=u[c++],n=d.get(e);if(void 0===n)throw new SyntaxError(`Unexpected escaped character: ${e}`);t+=n}return t},h=()=>{const e=n.at(-1);e&&e.type===r.Text&&(e.value=e.value.trimEnd(),""===e.value&&n.pop())},f=()=>{for(;c<u.length&&i(u[c]);)++c};e:for(;c<u.length;){const e=n.at(-1)?.type;if(void 0===e||e===r.CloseStatement||e===r.CloseExpression||e===r.Comment){let e="";for(;c<u.length&&("{"!==u[c]||"%"!==u[c+1]&&"{"!==u[c+1]&&"#"!==u[c+1]);)e+=u[c++];if(e.length>0){n.push(new s(e,r.Text));continue}}if("{"===u[c]&&"#"===u[c+1]){c+=2;const e="-"===u[c];e&&++c;let t="";for(;"#"!==u[c]||"}"!==u[c+1];){if(c+2>=u.length)throw new SyntaxError("Missing end of comment tag");t+=u[c++]}const a=t.endsWith("-");a&&(t=t.slice(0,-1)),e&&h(),n.push(new s(t,r.Comment)),c+=2,a&&f();continue}if("{%-"===u.slice(c,c+3)){h(),n.push(new s("{%",r.OpenStatement)),c+=3;continue}if("{{-"===u.slice(c,c+3)){h(),n.push(new s("{{",r.OpenExpression)),p=0,c+=3;continue}if(m(i),"-%}"===u.slice(c,c+3)){n.push(new s("%}",r.CloseStatement)),c+=3,f();continue}if("-}}"===u.slice(c,c+3)){n.push(new s("}}",r.CloseExpression)),c+=3,f();continue}const t=u[c];if("-"===t||"+"===t){const e=n.at(-1)?.type;if(e===r.Text||void 0===e)throw new SyntaxError(`Unexpected character: ${t}`);switch(e){case r.Identifier:case r.NumericLiteral:case r.StringLiteral:case r.CloseParen:case r.CloseSquareBracket:break;default:{++
//# sourceMappingURL=transformers.min.js.map