openmcp-sdk 0.0.2 → 0.0.3
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/package.json +1 -1
- package/service/hook/adapter.d.ts +8 -2
- package/service/hook/adapter.d.ts.map +1 -1
- package/service/hook/adapter.js +4 -5
- package/task-loop.js +69 -10840
- package/task-loop.js.map +1 -1
- package/tools.js +1 -8
- package/renderer/CascadiaCode.woff2 +0 -0
- package/renderer/animation.css +0 -121
- package/renderer/default-dark.css +0 -772
- package/renderer/default-light.css +0 -777
- package/renderer/favicon.svg +0 -20
- package/renderer/fonts/KaTeX_AMS-Regular.1608a09b.woff +0 -0
- package/renderer/fonts/KaTeX_AMS-Regular.4aafdb68.ttf +0 -0
- package/renderer/fonts/KaTeX_AMS-Regular.a79f1c31.woff2 +0 -0
- package/renderer/fonts/KaTeX_Caligraphic-Bold.cce5b8ec.ttf +0 -0
- package/renderer/fonts/KaTeX_Caligraphic-Regular.07ef19e7.ttf +0 -0
- package/renderer/fonts/KaTeX_Fraktur-Bold.9f256b85.woff +0 -0
- package/renderer/fonts/KaTeX_Fraktur-Bold.b18f59e1.ttf +0 -0
- package/renderer/fonts/KaTeX_Fraktur-Bold.d42a5579.woff2 +0 -0
- package/renderer/fonts/KaTeX_Fraktur-Regular.7c187121.woff +0 -0
- package/renderer/fonts/KaTeX_Fraktur-Regular.d3c882a6.woff2 +0 -0
- package/renderer/fonts/KaTeX_Fraktur-Regular.ed38e79f.ttf +0 -0
- package/renderer/fonts/KaTeX_Main-Bold.b74a1a8b.ttf +0 -0
- package/renderer/fonts/KaTeX_Main-Bold.c3fb5ac2.woff2 +0 -0
- package/renderer/fonts/KaTeX_Main-Bold.d181c465.woff +0 -0
- package/renderer/fonts/KaTeX_Main-BoldItalic.6f2bb1df.woff2 +0 -0
- package/renderer/fonts/KaTeX_Main-BoldItalic.70d8b0a5.ttf +0 -0
- package/renderer/fonts/KaTeX_Main-BoldItalic.e3f82f9d.woff +0 -0
- package/renderer/fonts/KaTeX_Main-Italic.47373d1e.ttf +0 -0
- package/renderer/fonts/KaTeX_Main-Italic.8916142b.woff2 +0 -0
- package/renderer/fonts/KaTeX_Main-Italic.9024d815.woff +0 -0
- package/renderer/fonts/KaTeX_Main-Regular.0462f03b.woff2 +0 -0
- package/renderer/fonts/KaTeX_Main-Regular.7f51fe03.woff +0 -0
- package/renderer/fonts/KaTeX_Main-Regular.b7f8fe9b.ttf +0 -0
- package/renderer/fonts/KaTeX_Math-BoldItalic.572d331f.woff2 +0 -0
- package/renderer/fonts/KaTeX_Math-BoldItalic.a879cf83.ttf +0 -0
- package/renderer/fonts/KaTeX_Math-BoldItalic.f1035d8d.woff +0 -0
- package/renderer/fonts/KaTeX_Math-Italic.5295ba48.woff +0 -0
- package/renderer/fonts/KaTeX_Math-Italic.939bc644.ttf +0 -0
- package/renderer/fonts/KaTeX_Math-Italic.f28c23ac.woff2 +0 -0
- package/renderer/fonts/KaTeX_SansSerif-Bold.8c5b5494.woff2 +0 -0
- package/renderer/fonts/KaTeX_SansSerif-Bold.94e1e8dc.ttf +0 -0
- package/renderer/fonts/KaTeX_SansSerif-Bold.bf59d231.woff +0 -0
- package/renderer/fonts/KaTeX_SansSerif-Italic.3b1e59b3.woff2 +0 -0
- package/renderer/fonts/KaTeX_SansSerif-Italic.7c9bc82b.woff +0 -0
- package/renderer/fonts/KaTeX_SansSerif-Italic.b4c20c84.ttf +0 -0
- package/renderer/fonts/KaTeX_SansSerif-Regular.74048478.woff +0 -0
- package/renderer/fonts/KaTeX_SansSerif-Regular.ba21ed5f.woff2 +0 -0
- package/renderer/fonts/KaTeX_SansSerif-Regular.d4d7ba48.ttf +0 -0
- package/renderer/fonts/KaTeX_Script-Regular.03e9641d.woff2 +0 -0
- package/renderer/fonts/KaTeX_Script-Regular.07505710.woff +0 -0
- package/renderer/fonts/KaTeX_Script-Regular.fe9cbbe1.ttf +0 -0
- package/renderer/fonts/KaTeX_Size1-Regular.fabc004a.ttf +0 -0
- package/renderer/fonts/KaTeX_Size2-Regular.d6b476ec.ttf +0 -0
- package/renderer/fonts/KaTeX_Size4-Regular.fbccdabe.ttf +0 -0
- package/renderer/fonts/KaTeX_Typewriter-Regular.6258592b.woff +0 -0
- package/renderer/fonts/KaTeX_Typewriter-Regular.a8709e36.woff2 +0 -0
- package/renderer/fonts/KaTeX_Typewriter-Regular.d97aaf4a.ttf +0 -0
- package/renderer/iconfont.css +0 -211
- package/renderer/iconfont.woff2 +0 -0
- package/renderer/images/deepseek.com.ico +0 -0
- package/renderer/images/grok.com.png +0 -0
- package/renderer/images/gstatic.com.svg +0 -22
- package/renderer/images/kimichat.cn.png +0 -0
- package/renderer/images/mistral.ai.ico +0 -0
- package/renderer/images/ollama.png +0 -0
- package/renderer/images/openai.com.ico +0 -0
- package/renderer/images/openmcp-qq-qrcode.jpg +0 -0
- package/renderer/images/openmcp.png +0 -0
- package/renderer/images/openmcp.svg +0 -22
- package/renderer/images/perplexity.ai.ico +0 -0
- package/renderer/index.html +0 -1
- package/renderer/js/app.fa042648.js +0 -51
- package/renderer/js/app.fa042648.js.map +0 -1
- package/renderer/mcp.css +0 -224
- package/renderer/vscode.css +0 -149
package/task-loop.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"task-loop.js","mappings":";;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACa;;AAEb,sBAAsB,mBAAO,CAAC,8GAA2B;AACzD,aAAa,mBAAO,CAAC,gFAAiB;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,KAAK;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,KAAK;AAClD;;AAEA,yCAAyC,OAAO;AAChD;AACA;AACA,kDAAkD,QAAQ;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,YAAY;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,0BAA0B;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,wBAAwB;AACxB,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,wBAAwB;AACxB,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,8CAA8C;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,IAAI,WAAW,OAAO;AACtE,qEAAqE,IAAI,aAAa,OAAO;AAC7F;AACA,6EAA6E,IAAI,aAAa,OAAO;AACrG;AACA,6EAA6E,IAAI,aAAa,OAAO;AACrG;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,kCAAkC,EAAE,cAAc;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,wBAAwB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,2BAA2B;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,KAAK,GAAG,IAAI;AACxC,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,aAAa;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,yEAAyE;AACrF,YAAY,uBAAuB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,oBAAoB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,KAAK,GAAG,IAAI;AAC5C,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE;AACtE;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,aAAa,IAAI,IAAI;AACrC;AACA,gBAAgB,GAAG,IAAI,0BAA0B;AACjD;AACA;AACA;AACA,0EAA0E;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,EAAE,IAAI,EAAE,IAAI,EAAE;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,kBAAkB,EAAE,kBAAkB;AAC3D,qBAAqB,kBAAkB,GAAG,kBAAkB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,OAAO,IAAI,IAAI;AACrC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,uEAAuE;AACnF,YAAY,qBAAqB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,oBAAoB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,KAAK,GAAG,IAAI;AAC5C,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE;AACtE;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,aAAa,IAAI,IAAI;AACrC;AACA,gBAAgB,GAAG,IAAI,0BAA0B;AACjD;AACA;AACA;AACA,wEAAwE;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,OAAO,IAAI,IAAI;AACrC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,0FAA0F;AACtG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,IAAI;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,2CAA2C;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,YAAY,oEAAoE;AAChF,uEAAuE;AACvE;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,oBAAoB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,KAAK,GAAG,IAAI;AAC5C,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,4BAAkB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA,wBAAwB,4BAAkB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,KAAK,GAAG,IAAI;AAC5C,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mCAAmC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,4BAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,4BAAkB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,YAAY,GAAG,IAAI;AAC/C,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,4BAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,4BAAkB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,YAAY,GAAG,QAAQ;AACnD,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,YAAY;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,YAAY,GAAG,IAAI;AACvD,qBAAqB;AACrB;AACA,6CAA6C,QAAQ,IAAI,UAAU;AACnE;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,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A;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,EAAE;AAC7D,uFAAuF,EAAE;AACzF;AACA,8EAA8E,EAAE;AAChF,4FAA4F,EAAE;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8FAA8F,EAAE;AAChG;AACA,qFAAqF,EAAE;AACvF;AACA,uFAAuF,EAAE;AACzF;AACA,mDAAmD;AACnD,YAAY,yBAAyB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC;AACrC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,gBAAgB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,GAAG;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,wGAAwG,QAAQ,EAAE,SAAS,EAAE,mBAAmB;AAChJ;AACA;AACA;AACA;AACA,oBAAoB,QAAQ,EAAE,SAAS;AACvC;AACA;AACA,yBAAyB;AACzB,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA,0EAA0E;AAC1E;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA,2EAA2E;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA,mBAAmB;AACnB;AACA;AACA,0EAA0E;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wCAAwC;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mDAAmD,EAAE,kBAAkB,EAAE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wCAAwC,WAAW;AACnE;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,gBAAgB,wCAAwC,WAAW;AACnE;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,gBAAgB,wCAAwC,WAAW;AACnE;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wCAAwC,WAAW;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA,wBAAwB,0BAA0B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,0BAA0B;AACtD;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,kBAAkB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,kBAAkB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,8DAA8D;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,IAAI;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB,sBAAsB,4CAA4C;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,qBAAqB;AACjC,sBAAsB,kDAAkD;AACxE;AACA;AACA,oBAAoB,YAAY;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,qBAAqB;AACjC;AACA,0BAA0B,4CAA4C;AACtE;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,sDAAsD,GAAG,wCAAwC,GAAG,WAAW;AAC7I;AACA;AACA,8BAA8B,sDAAsD,GAAG,0CAA0C,GAAG,yBAAyB;AAC7J;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,gEAAgE,eAAe;AAC/E;AACA;AACA,gCAAgC,EAAE,gCAAgC,EAAE,KAAK,EAAE,aAAa;AACxF;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,YAAY,YAAY;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,wBAAwB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yCAAyC;AACzC,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA,wCAAwC;AACxC,yBAAyB;AACzB,oBAAoB;AACpB,qBAAqB;AACrB,mBAAmB;AACnB,0BAA0B;AAC1B,sBAAsB;AACtB,oBAAoB;AACpB,sBAAsB;AACtB,sBAAsB;AACtB,qBAAqB;AACrB,qBAAqB;;;;;;;;;;;;ACljDrB;AACA;AACA;AACA;AACA;AACa;;AAEb;AACA;AACA;AACA;AACA,kBAAkB,QAAa;AAC/B,YAAY;AACZ,eAAe;AACf;AACA,8BAA8B,4BAAkB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,YAAY;AACpB;AACA;AACA,QAAQ,eAAe;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,gBAAgB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,gFAAgF,8BAA8B;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,KAA6B;AACnD,0BAA0B,sFAAM;AAChC,0BAA0B,CAEY;AACtC;AACA;AACA;AACA,4BAA4B;AAC5B,4BAA4B;AAC5B,8BAA8B;AAC9B,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA,oCAAoC,+BAA+B;AACnE;AACA;AACA;AACA,4BAA4B,KAAK,EAAE,oCAAoC,KAAK,SAAS;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,UAAU;AAC/B;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,8BAA8B;AAC3D;AACA,SAAS;AACT;AACA;;AAEA,cAAc;AACd,cAAc;AACd,qBAAqB;AACrB,gBAAgB;AAChB,kBAAkB;AAClB,cAAc;AACd,6BAA6B;AAC7B,yBAAyB;AACzB,8BAA8B;AAC9B,qBAAqB;AACrB,cAAc;AACd,iBAAiB;AACjB,eAAe;AACf,iBAAiB;AACjB,cAAc;AACd,qBAAqB;AACrB,kBAAkB;AAClB,gBAAgB;AAChB,gBAAgB;AAChB,qBAAqB;AACrB,iBAAiB;AACjB,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB,YAAY;AACZ,kBAAkB;AAClB,sBAAsB;AACtB,uBAAuB;AACvB,oBAAoB;AACpB,YAAY;AACZ,gBAAgB;;;;;;;;;;;ACjRhB,iBAAiB,oBAAoB;AACrC;AACA;AACA;AACA;AACA;;AAEA,WAAW,mBAAO,CAAC,iEAAQ;AAC3B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,uCAAuC,SAAS;AAChD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,gBAAgB;;;;;;;;;;;ACxHhB,iBAAiB,oBAAoB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D,qBAAqB;AACrB;AACA;AACA;AACA;;AAEA,aAAa,mBAAO,CAAC,qEAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;;;;;;;;;;;AC3IA,iBAAiB,oBAAoB;AACrC;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd,qBAAqB;AACrB,qBAAqB;;AAErB,qBAAqB;AACrB,qBAAqB;;AAErB,qBAAqB;AACrB,qBAAqB;;AAErB,qBAAqB;AACrB,qBAAqB;;AAErB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;AClEA,iBAAiB,oBAAoB;AACrC;AACA;AACA;AACA;AACA;;AAEA,4BAA4B;AAC5B,yBAAyB;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;AC9GA,iBAAiB,oBAAoB;AACrC;AACA;AACA;AACA;AACA;;AAEA,WAAW,mBAAO,CAAC,iEAAQ;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;;;;;;;;;;;AC9EnB,iBAAiB,oBAAoB;AACrC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,WAAW,UAAU;AACrB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,0CAA0C,SAAS;AACnD;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,WAAW,UAAU;AACrB;AACA;;AAEA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnIA,iBAAiB,oBAAoB;AACrC;AACA;AACA;AACA;AACA;;AAEA,WAAW,mBAAO,CAAC,iEAAQ;AAC3B,mBAAmB,mBAAO,CAAC,mFAAiB;AAC5C,eAAe,2GAA+B;AAC9C,gBAAgB,mBAAO,CAAC,6EAAc;AACtC,gBAAgB,8GAAiC;;AAEjD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,mBAAmB;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;;AAEX;AACA;AACA,QAAQ;AACR;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;;AAEX;AACA;AACA;AACA;;AAEA;AACA;;AAEA,yBAAyB;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,MAAM;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,kCAAkC;AAChD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,uDAAuD,YAAY;AACnE;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,wBAAwB,OAAO;AAC/B,sBAAsB,WAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,0BAA0B,cAAc;AACxC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,wCAAwC;AAChE;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,oBAAoB;AACpE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8BAA8B;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA;AACA;AACA;AACA;AACA,6BAA6B,MAAM;AACnC;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,2BAA2B;AAC/C,sBAAsB,+CAA+C;AACrE;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,2BAA2B;AAC/C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,2BAA2B;AAC/C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,2BAA2B;AAC/C;AACA;AACA,sBAAsB,4BAA4B;AAClD;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,gCAAgC;;;;;;;;;;;ACnqChC,iBAAiB,oBAAoB;AACrC;AACA;AACA;AACA;AACA;;AAEA,gBAAgB,mBAAO,CAAC,6EAAc;AACtC,WAAW,mBAAO,CAAC,iEAAQ;AAC3B,eAAe,2GAA+B;AAC9C,kBAAkB,oHAAqC;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E;AAC3E;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2CAA2C,SAAS;AACpD;AACA;;AAEA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,0BAA0B;;;;;;;;;;;AC3b1B,iBAAiB,oBAAoB;AACrC;AACA;AACA;AACA;AACA;;AAEA,yBAAyB,2IAAoD;AAC7E,WAAW,mBAAO,CAAC,iEAAQ;;AAE3B;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,SAAS;AACvD;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,SAAS;AACzD;AACA;AACA;AACA;;AAEA;AACA,0CAA0C,SAAS;AACnD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,6CAA6C,cAAc;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA,WAAW;AACX;AACA,QAAQ;AACR;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;;AAEH,WAAW;AACX;;AAEA,kBAAkB;;;;;;;;;;;AC5ZlB,iBAAiB,oBAAoB;AACrC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA,cAAc;;AAEd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;;AAEhB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;;AAEZ,kBAAkB;AAClB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB;;AAEhB;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB;;AAEnB;AACA;AACA;AACA;;AAEA;AACA;AACA,qBAAqB;;AAErB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,kCAAkC;;AAElC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,0CAA0C;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,2CAA2C;;AAE3C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,iDAAiD;;AAEjD;AACA;AACA;AACA;;AAEA;AACA,cAAc;AACd;;AAEA;AACA,eAAe;AACf;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,2CAA2C;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA,2BAA2B;;AAE3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,wBAAwB;;;;;;;;;;;ACjlBxB;AACA;AACA;AAC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A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;;;;;;;;;;;;ACtCF;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,qBAAqB;AACrB,iBAAiB,mBAAO,CAAC,8DAAU;AACnC,uBAAuB,mBAAO,CAAC,0EAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO,GAAG,aAAa;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;AACA,kBAAe;;;;;;;;;;;;ACtFF;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,mBAAmB,mBAAO,CAAC,kEAAY;AACvC,uBAAuB,mBAAO,CAAC,0EAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;;;;;;;;;;;;ACZa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,WAAW,GAAG,WAAW;AACzB,iBAAiB,mBAAO,CAAC,8DAAU;AACnC,iBAAiB,mBAAO,CAAC,8DAAU;AACnC,eAAe,mBAAO,CAAC,8DAAU;AACjC,uCAAsC,EAAE,qCAAqC,wBAAwB,EAAC;AACtG,uCAAsC,EAAE,qCAAqC,wBAAwB,EAAC;AACtG;AACA;AACA;AACA;AACA;AACA,kBAAe;;;;;;;;;;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ACA,wBAAwB,QAAQ;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;;;;;;;;;;;;AClBF;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,mBAAmB,mBAAO,CAAC,kEAAY;AACvC,uBAAuB,mBAAO,CAAC,0EAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;;;;;;;;;;;;ACZa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,qBAAqB;AACrB,iBAAiB,mBAAO,CAAC,8DAAU;AACnC,uBAAuB,mBAAO,CAAC,0EAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO,GAAG,aAAa;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;;;;;;;;;;;;ACpEF;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,mBAAmB,mBAAO,CAAC,kEAAY;AACvC;AACA;AACA;AACA,kBAAe;;;;;;;;;;;;ACNF;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,sBAAsB,mBAAO,CAAC,wEAAe;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;;;;;;;;;;;;ACTf;AACA;AACA;AACA;AACA;AACa;;AAEb,eAAe,mBAAO,CAAC,yFAAoB;AAC3C,aAAa,mBAAO,CAAC,gFAAiB;AACtC,UAAU,mBAAO,CAAC,gBAAK;;AAEvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,eAAe;AAC3C;AACA,mDAAmD,WAAW;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,8CAA8C;AAC1D;AACA;AACA;AACA;AACA;AACA,gBAAgB,2BAA2B;AAC3C;AACA;AACA;AACA;AACA,wBAAwB,mBAAmB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC,YAAY,6BAA6B;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA,gBAAgB,KAAc,EAAE,EAAC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,uBAAuB,YAAY;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,wBAAwB,oBAAoB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2FAA2F;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFAAuF;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE;AACtE;AACA;AACA,SAAS,iBAAiB;AAC1B;AACA,YAAY,qCAAqC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA,YAAY,aAAa;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAE,OAAO;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,YAAY;AACrD;AACA;AACA;AACA;AACA;AACA,YAAY,YAAY;AACxB,YAAY,aAAa;AACzB;AACA;AACA;AACA;AACA,4BAA4B,EAAE;AAC9B,MAAM;AACN;AACA;AACA,uBAAuB,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,eAAe;AAC3B;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,4BAA4B;AAC5F;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,uCAAuC;AACpE;AACA;AACA,qCAAqC,UAAU,GAAG,MAAM;AACxD;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,OAAO;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,qCAAqC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB;AACtB;AACA;AACA;AACA,yCAAyC,kBAAkB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,OAAO;AACtE,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;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IAAI,QAAQ,CAAC,QAAQ,CAAC,IAAI;4BACnD,OAAO,EAAE,cAAc,CAAC,OAAO;4BAC/B,SAAS,EAAE;gCACP,OAAO,EAAE,IAAI,CAAC,GAAG,EAAE;gCACnB,KAAK,EAAE,cAAc,CAAC,KAAK;gCAC3B,UAAU,EAAE,IAAI,CAAC,YAAY,EAAE,CAAC,EAAE,IAAI,SAAS;gCAC/C,KAAK,EAAE,IAAI,CAAC,eAAe;6BAC9B;yBACJ,CAAC,CAAC;oBACP,CAAC;gBACL,CAAC;YAEL,CAAC;iBAAM,IAAI,IAAI,CAAC,gBAAgB,CAAC,KAAK,EAAE,CAAC;gBACrC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC;oBACrB,IAAI,EAAE,WAAW;oBACjB,OAAO,EAAE,IAAI,CAAC,gBAAgB,CAAC,KAAK;oBACpC,SAAS,EAAE;wBACP,OAAO,EAAE,IAAI,CAAC,GAAG,EAAE;wBACnB,KAAK,EAAE,mBAAY,CAAC,OAAO;wBAC3B,UAAU,EAAE,IAAI,CAAC,YAAY,EAAE,CAAC,EAAE,IAAI,SAAS;wBAC/C,KAAK,EAAE,IAAI,CAAC,eAAe;qBAC9B;iBACJ,CAAC,CAAC;gBACH,MAAM;YAEV,CAAC;iBAAM,CAAC;gBACJ,OAAO;gBACP,MAAM;YACV,CAAC;YAED,2BAA2B;YAC3B,IAAI,mBAAmB,CAAC,IAAI,EAAE,CAAC;gBAC3B,MAAM;YACV,CAAC;QACL,CAAC;IACL,CAAC;CACJ;AAzXD,4BAyXC","sources":["webpack://openmcp/./renderer/node_modules/@intlify/core-base/dist/core-base.cjs","webpack://openmcp/./renderer/node_modules/@intlify/message-compiler/dist/message-compiler.cjs","webpack://openmcp/./renderer/node_modules/@intlify/shared/dist/shared.cjs","webpack://openmcp/./renderer/node_modules/source-map-js/lib/array-set.js","webpack://openmcp/./renderer/node_modules/source-map-js/lib/base64-vlq.js","webpack://openmcp/./renderer/node_modules/source-map-js/lib/base64.js","webpack://openmcp/./renderer/node_modules/source-map-js/lib/binary-search.js","webpack://openmcp/./renderer/node_modules/source-map-js/lib/mapping-list.js","webpack://openmcp/./renderer/node_modules/source-map-js/lib/quick-sort.js","webpack://openmcp/./renderer/node_modules/source-map-js/lib/source-map-consumer.js","webpack://openmcp/./renderer/node_modules/source-map-js/lib/source-map-generator.js","webpack://openmcp/./renderer/node_modules/source-map-js/lib/source-node.js","webpack://openmcp/./renderer/node_modules/source-map-js/lib/util.js","webpack://openmcp/./renderer/node_modules/source-map-js/source-map.js","webpack://openmcp/./renderer/node_modules/uuid/dist/cjs/index.js","webpack://openmcp/./renderer/node_modules/uuid/dist/cjs/max.js","webpack://openmcp/./renderer/node_modules/uuid/dist/cjs/md5.js","webpack://openmcp/./renderer/node_modules/uuid/dist/cjs/native.js","webpack://openmcp/./renderer/node_modules/uuid/dist/cjs/nil.js","webpack://openmcp/./renderer/node_modules/uuid/dist/cjs/parse.js","webpack://openmcp/./renderer/node_modules/uuid/dist/cjs/regex.js","webpack://openmcp/./renderer/node_modules/uuid/dist/cjs/rng.js","webpack://openmcp/./renderer/node_modules/uuid/dist/cjs/sha1.js","webpack://openmcp/./renderer/node_modules/uuid/dist/cjs/stringify.js","webpack://openmcp/./renderer/node_modules/uuid/dist/cjs/v1.js","webpack://openmcp/./renderer/node_modules/uuid/dist/cjs/v1ToV6.js","webpack://openmcp/./renderer/node_modules/uuid/dist/cjs/v3.js","webpack://openmcp/./renderer/node_modules/uuid/dist/cjs/v35.js","webpack://openmcp/./renderer/node_modules/uuid/dist/cjs/v4.js","webpack://openmcp/./renderer/node_modules/uuid/dist/cjs/v5.js","webpack://openmcp/./renderer/node_modules/uuid/dist/cjs/v6.js","webpack://openmcp/./renderer/node_modules/uuid/dist/cjs/v6ToV1.js","webpack://openmcp/./renderer/node_modules/uuid/dist/cjs/v7.js","webpack://openmcp/./renderer/node_modules/uuid/dist/cjs/validate.js","webpack://openmcp/./renderer/node_modules/uuid/dist/cjs/version.js","webpack://openmcp/./renderer/node_modules/vue-i18n/dist/vue-i18n.cjs","webpack://openmcp/./renderer/src/api/message-bridge.ts","webpack://openmcp/./renderer/src/api/platform.ts","webpack://openmcp/./renderer/src/components/main-panel/chat/chat-box/chat.ts","webpack://openmcp/./renderer/src/components/main-panel/chat/core/handle-tool-calls.ts","webpack://openmcp/./renderer/src/components/main-panel/chat/index.vue","webpack://openmcp/./renderer/src/components/main-panel/panel.ts","webpack://openmcp/./renderer/src/components/main-panel/prompt/index.vue","webpack://openmcp/./renderer/src/components/main-panel/resource/index.vue","webpack://openmcp/./renderer/src/components/main-panel/tool/index.vue","webpack://openmcp/./renderer/src/components/main-panel/tool/tools.ts","webpack://openmcp/./renderer/src/hook/mcp.ts","webpack://openmcp/./renderer/src/hook/panel.ts","webpack://openmcp/./renderer/src/i18n/index.ts","webpack://openmcp/./renderer/src/views/setting/llm.ts","webpack://openmcp/./renderer/src/views/setting/util.ts","webpack://openmcp/external node-commonjs \"crypto\"","webpack://openmcp/external commonjs2 \"./tools.js\"","webpack://openmcp/external commonjs2 \"vue\"","webpack://openmcp/webpack/bootstrap","webpack://openmcp/./renderer/src/components/main-panel/chat/core/task-loop.ts"],"sourcesContent":["/*!\n * core-base v11.1.2\n * (c) 2025 kazuya kawaguchi\n * Released under the MIT License.\n */\n'use strict';\n\nvar messageCompiler = require('@intlify/message-compiler');\nvar shared = require('@intlify/shared');\n\nfunction format(ast) {\n const msg = (ctx) => formatParts(ctx, ast);\n return msg;\n}\nfunction formatParts(ctx, ast) {\n const body = resolveBody(ast);\n if (body == null) {\n throw createUnhandleNodeError(0 /* NodeTypes.Resource */);\n }\n const type = resolveType(body);\n if (type === 1 /* NodeTypes.Plural */) {\n const plural = body;\n const cases = resolveCases(plural);\n return ctx.plural(cases.reduce((messages, c) => [\n ...messages,\n formatMessageParts(ctx, c)\n ], []));\n }\n else {\n return formatMessageParts(ctx, body);\n }\n}\nconst PROPS_BODY = ['b', 'body'];\nfunction resolveBody(node) {\n return resolveProps(node, PROPS_BODY);\n}\nconst PROPS_CASES = ['c', 'cases'];\nfunction resolveCases(node) {\n return resolveProps(node, PROPS_CASES, []);\n}\nfunction formatMessageParts(ctx, node) {\n const static_ = resolveStatic(node);\n if (static_ != null) {\n return ctx.type === 'text'\n ? static_\n : ctx.normalize([static_]);\n }\n else {\n const messages = resolveItems(node).reduce((acm, c) => [...acm, formatMessagePart(ctx, c)], []);\n return ctx.normalize(messages);\n }\n}\nconst PROPS_STATIC = ['s', 'static'];\nfunction resolveStatic(node) {\n return resolveProps(node, PROPS_STATIC);\n}\nconst PROPS_ITEMS = ['i', 'items'];\nfunction resolveItems(node) {\n return resolveProps(node, PROPS_ITEMS, []);\n}\nfunction formatMessagePart(ctx, node) {\n const type = resolveType(node);\n switch (type) {\n case 3 /* NodeTypes.Text */: {\n return resolveValue$1(node, type);\n }\n case 9 /* NodeTypes.Literal */: {\n return resolveValue$1(node, type);\n }\n case 4 /* NodeTypes.Named */: {\n const named = node;\n if (shared.hasOwn(named, 'k') && named.k) {\n return ctx.interpolate(ctx.named(named.k));\n }\n if (shared.hasOwn(named, 'key') && named.key) {\n return ctx.interpolate(ctx.named(named.key));\n }\n throw createUnhandleNodeError(type);\n }\n case 5 /* NodeTypes.List */: {\n const list = node;\n if (shared.hasOwn(list, 'i') && shared.isNumber(list.i)) {\n return ctx.interpolate(ctx.list(list.i));\n }\n if (shared.hasOwn(list, 'index') && shared.isNumber(list.index)) {\n return ctx.interpolate(ctx.list(list.index));\n }\n throw createUnhandleNodeError(type);\n }\n case 6 /* NodeTypes.Linked */: {\n const linked = node;\n const modifier = resolveLinkedModifier(linked);\n const key = resolveLinkedKey(linked);\n return ctx.linked(formatMessagePart(ctx, key), modifier ? formatMessagePart(ctx, modifier) : undefined, ctx.type);\n }\n case 7 /* NodeTypes.LinkedKey */: {\n return resolveValue$1(node, type);\n }\n case 8 /* NodeTypes.LinkedModifier */: {\n return resolveValue$1(node, type);\n }\n default:\n throw new Error(`unhandled node on format message part: ${type}`);\n }\n}\nconst PROPS_TYPE = ['t', 'type'];\nfunction resolveType(node) {\n return resolveProps(node, PROPS_TYPE);\n}\nconst PROPS_VALUE = ['v', 'value'];\nfunction resolveValue$1(node, type) {\n const resolved = resolveProps(node, PROPS_VALUE);\n if (resolved) {\n return resolved;\n }\n else {\n throw createUnhandleNodeError(type);\n }\n}\nconst PROPS_MODIFIER = ['m', 'modifier'];\nfunction resolveLinkedModifier(node) {\n return resolveProps(node, PROPS_MODIFIER);\n}\nconst PROPS_KEY = ['k', 'key'];\nfunction resolveLinkedKey(node) {\n const resolved = resolveProps(node, PROPS_KEY);\n if (resolved) {\n return resolved;\n }\n else {\n throw createUnhandleNodeError(6 /* NodeTypes.Linked */);\n }\n}\nfunction resolveProps(node, props, defaultValue) {\n for (let i = 0; i < props.length; i++) {\n const prop = props[i];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (shared.hasOwn(node, prop) && node[prop] != null) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return node[prop];\n }\n }\n return defaultValue;\n}\nfunction createUnhandleNodeError(type) {\n return new Error(`unhandled node type: ${type}`);\n}\n\nconst WARN_MESSAGE = `Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.`;\nfunction checkHtmlMessage(source, warnHtmlMessage) {\n if (warnHtmlMessage && messageCompiler.detectHtmlTag(source)) {\n shared.warn(shared.format(WARN_MESSAGE, { source }));\n }\n}\nconst defaultOnCacheKey = (message) => message;\nlet compileCache = shared.create();\nfunction clearCompileCache() {\n compileCache = shared.create();\n}\nfunction isMessageAST(val) {\n return (shared.isObject(val) &&\n resolveType(val) === 0 &&\n (shared.hasOwn(val, 'b') || shared.hasOwn(val, 'body')));\n}\nfunction baseCompile(message, options = {}) {\n // error detecting on compile\n let detectError = false;\n const onError = options.onError || messageCompiler.defaultOnError;\n options.onError = (err) => {\n detectError = true;\n onError(err);\n };\n // compile with mesasge-compiler\n return { ...messageCompiler.baseCompile(message, options), detectError };\n}\n/* #__NO_SIDE_EFFECTS__ */\nfunction compile(message, context) {\n if (shared.isString(message)) {\n // check HTML message\n const warnHtmlMessage = shared.isBoolean(context.warnHtmlMessage)\n ? context.warnHtmlMessage\n : true;\n checkHtmlMessage(message, warnHtmlMessage);\n // check caches\n const onCacheKey = context.onCacheKey || defaultOnCacheKey;\n const cacheKey = onCacheKey(message);\n const cached = compileCache[cacheKey];\n if (cached) {\n return cached;\n }\n // compile with JIT mode\n const { ast, detectError } = baseCompile(message, {\n ...context,\n location: true,\n jit: true\n });\n // compose message function from AST\n const msg = format(ast);\n // if occurred compile error, don't cache\n return !detectError\n ? (compileCache[cacheKey] = msg)\n : msg;\n }\n else {\n if (!isMessageAST(message)) {\n shared.warn(`the message that is resolve with key '${context.key}' is not supported for jit compilation`);\n return (() => message);\n }\n // AST case (passed from bundler)\n const cacheKey = message.cacheKey;\n if (cacheKey) {\n const cached = compileCache[cacheKey];\n if (cached) {\n return cached;\n }\n // compose message function from message (AST)\n return (compileCache[cacheKey] =\n format(message));\n }\n else {\n return format(message);\n }\n }\n}\n\nlet devtools = null;\nfunction setDevToolsHook(hook) {\n devtools = hook;\n}\nfunction getDevToolsHook() {\n return devtools;\n}\nfunction initI18nDevTools(i18n, version, meta) {\n // TODO: queue if devtools is undefined\n devtools &&\n devtools.emit('i18n:init', {\n timestamp: Date.now(),\n i18n,\n version,\n meta\n });\n}\nconst translateDevTools = \n/* #__PURE__*/ createDevToolsHook('function:translate');\nfunction createDevToolsHook(hook) {\n return (payloads) => devtools && devtools.emit(hook, payloads);\n}\n\nconst CoreErrorCodes = {\n INVALID_ARGUMENT: messageCompiler.COMPILE_ERROR_CODES_EXTEND_POINT, // 17\n INVALID_DATE_ARGUMENT: 18,\n INVALID_ISO_DATE_ARGUMENT: 19,\n NOT_SUPPORT_NON_STRING_MESSAGE: 20,\n NOT_SUPPORT_LOCALE_PROMISE_VALUE: 21,\n NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: 22,\n NOT_SUPPORT_LOCALE_TYPE: 23\n};\nconst CORE_ERROR_CODES_EXTEND_POINT = 24;\nfunction createCoreError(code) {\n return messageCompiler.createCompileError(code, null, { messages: errorMessages } );\n}\n/** @internal */\nconst errorMessages = {\n [CoreErrorCodes.INVALID_ARGUMENT]: 'Invalid arguments',\n [CoreErrorCodes.INVALID_DATE_ARGUMENT]: 'The date provided is an invalid Date object.' +\n 'Make sure your Date represents a valid date.',\n [CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT]: 'The argument provided is not a valid ISO date string',\n [CoreErrorCodes.NOT_SUPPORT_NON_STRING_MESSAGE]: 'Not support non-string message',\n [CoreErrorCodes.NOT_SUPPORT_LOCALE_PROMISE_VALUE]: 'cannot support promise value',\n [CoreErrorCodes.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]: 'cannot support async function',\n [CoreErrorCodes.NOT_SUPPORT_LOCALE_TYPE]: 'cannot support locale type'\n};\n\n/** @internal */\nfunction getLocale(context, options) {\n return options.locale != null\n ? resolveLocale(options.locale)\n : resolveLocale(context.locale);\n}\nlet _resolveLocale;\n/** @internal */\nfunction resolveLocale(locale) {\n if (shared.isString(locale)) {\n return locale;\n }\n else {\n if (shared.isFunction(locale)) {\n if (locale.resolvedOnce && _resolveLocale != null) {\n return _resolveLocale;\n }\n else if (locale.constructor.name === 'Function') {\n const resolve = locale();\n if (shared.isPromise(resolve)) {\n throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_PROMISE_VALUE);\n }\n return (_resolveLocale = resolve);\n }\n else {\n throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION);\n }\n }\n else {\n throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_TYPE);\n }\n }\n}\n/**\n * Fallback with simple implemenation\n *\n * @remarks\n * A fallback locale function implemented with a simple fallback algorithm.\n *\n * Basically, it returns the value as specified in the `fallbackLocale` props, and is processed with the fallback inside intlify.\n *\n * @param ctx - A {@link CoreContext | context}\n * @param fallback - A {@link FallbackLocale | fallback locale}\n * @param start - A starting {@link Locale | locale}\n *\n * @returns Fallback locales\n *\n * @VueI18nGeneral\n */\nfunction fallbackWithSimple(ctx, fallback, start) {\n // prettier-ignore\n return [...new Set([\n start,\n ...(shared.isArray(fallback)\n ? fallback\n : shared.isObject(fallback)\n ? Object.keys(fallback)\n : shared.isString(fallback)\n ? [fallback]\n : [start])\n ])];\n}\n/**\n * Fallback with locale chain\n *\n * @remarks\n * A fallback locale function implemented with a fallback chain algorithm. It's used in VueI18n as default.\n *\n * @param ctx - A {@link CoreContext | context}\n * @param fallback - A {@link FallbackLocale | fallback locale}\n * @param start - A starting {@link Locale | locale}\n *\n * @returns Fallback locales\n *\n * @VueI18nSee [Fallbacking](../guide/essentials/fallback)\n *\n * @VueI18nGeneral\n */\nfunction fallbackWithLocaleChain(ctx, fallback, start) {\n const startLocale = shared.isString(start) ? start : DEFAULT_LOCALE;\n const context = ctx;\n if (!context.__localeChainCache) {\n context.__localeChainCache = new Map();\n }\n let chain = context.__localeChainCache.get(startLocale);\n if (!chain) {\n chain = [];\n // first block defined by start\n let block = [start];\n // while any intervening block found\n while (shared.isArray(block)) {\n block = appendBlockToChain(chain, block, fallback);\n }\n // prettier-ignore\n // last block defined by default\n const defaults = shared.isArray(fallback) || !shared.isPlainObject(fallback)\n ? fallback\n : fallback['default']\n ? fallback['default']\n : null;\n // convert defaults to array\n block = shared.isString(defaults) ? [defaults] : defaults;\n if (shared.isArray(block)) {\n appendBlockToChain(chain, block, false);\n }\n context.__localeChainCache.set(startLocale, chain);\n }\n return chain;\n}\nfunction appendBlockToChain(chain, block, blocks) {\n let follow = true;\n for (let i = 0; i < block.length && shared.isBoolean(follow); i++) {\n const locale = block[i];\n if (shared.isString(locale)) {\n follow = appendLocaleToChain(chain, block[i], blocks);\n }\n }\n return follow;\n}\nfunction appendLocaleToChain(chain, locale, blocks) {\n let follow;\n const tokens = locale.split('-');\n do {\n const target = tokens.join('-');\n follow = appendItemToChain(chain, target, blocks);\n tokens.splice(-1, 1);\n } while (tokens.length && follow === true);\n return follow;\n}\nfunction appendItemToChain(chain, target, blocks) {\n let follow = false;\n if (!chain.includes(target)) {\n follow = true;\n if (target) {\n follow = target[target.length - 1] !== '!';\n const locale = target.replace(/!/g, '');\n chain.push(locale);\n if ((shared.isArray(blocks) || shared.isPlainObject(blocks)) &&\n blocks[locale] // eslint-disable-line @typescript-eslint/no-explicit-any\n ) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n follow = blocks[locale];\n }\n }\n }\n return follow;\n}\n\nconst pathStateMachine = [];\npathStateMachine[0 /* States.BEFORE_PATH */] = {\n [\"w\" /* PathCharTypes.WORKSPACE */]: [0 /* States.BEFORE_PATH */],\n [\"i\" /* PathCharTypes.IDENT */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],\n [\"[\" /* PathCharTypes.LEFT_BRACKET */]: [4 /* States.IN_SUB_PATH */],\n [\"o\" /* PathCharTypes.END_OF_FAIL */]: [7 /* States.AFTER_PATH */]\n};\npathStateMachine[1 /* States.IN_PATH */] = {\n [\"w\" /* PathCharTypes.WORKSPACE */]: [1 /* States.IN_PATH */],\n [\".\" /* PathCharTypes.DOT */]: [2 /* States.BEFORE_IDENT */],\n [\"[\" /* PathCharTypes.LEFT_BRACKET */]: [4 /* States.IN_SUB_PATH */],\n [\"o\" /* PathCharTypes.END_OF_FAIL */]: [7 /* States.AFTER_PATH */]\n};\npathStateMachine[2 /* States.BEFORE_IDENT */] = {\n [\"w\" /* PathCharTypes.WORKSPACE */]: [2 /* States.BEFORE_IDENT */],\n [\"i\" /* PathCharTypes.IDENT */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],\n [\"0\" /* PathCharTypes.ZERO */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */]\n};\npathStateMachine[3 /* States.IN_IDENT */] = {\n [\"i\" /* PathCharTypes.IDENT */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],\n [\"0\" /* PathCharTypes.ZERO */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],\n [\"w\" /* PathCharTypes.WORKSPACE */]: [1 /* States.IN_PATH */, 1 /* Actions.PUSH */],\n [\".\" /* PathCharTypes.DOT */]: [2 /* States.BEFORE_IDENT */, 1 /* Actions.PUSH */],\n [\"[\" /* PathCharTypes.LEFT_BRACKET */]: [4 /* States.IN_SUB_PATH */, 1 /* Actions.PUSH */],\n [\"o\" /* PathCharTypes.END_OF_FAIL */]: [7 /* States.AFTER_PATH */, 1 /* Actions.PUSH */]\n};\npathStateMachine[4 /* States.IN_SUB_PATH */] = {\n [\"'\" /* PathCharTypes.SINGLE_QUOTE */]: [5 /* States.IN_SINGLE_QUOTE */, 0 /* Actions.APPEND */],\n [\"\\\"\" /* PathCharTypes.DOUBLE_QUOTE */]: [6 /* States.IN_DOUBLE_QUOTE */, 0 /* Actions.APPEND */],\n [\"[\" /* PathCharTypes.LEFT_BRACKET */]: [\n 4 /* States.IN_SUB_PATH */,\n 2 /* Actions.INC_SUB_PATH_DEPTH */\n ],\n [\"]\" /* PathCharTypes.RIGHT_BRACKET */]: [1 /* States.IN_PATH */, 3 /* Actions.PUSH_SUB_PATH */],\n [\"o\" /* PathCharTypes.END_OF_FAIL */]: 8 /* States.ERROR */,\n [\"l\" /* PathCharTypes.ELSE */]: [4 /* States.IN_SUB_PATH */, 0 /* Actions.APPEND */]\n};\npathStateMachine[5 /* States.IN_SINGLE_QUOTE */] = {\n [\"'\" /* PathCharTypes.SINGLE_QUOTE */]: [4 /* States.IN_SUB_PATH */, 0 /* Actions.APPEND */],\n [\"o\" /* PathCharTypes.END_OF_FAIL */]: 8 /* States.ERROR */,\n [\"l\" /* PathCharTypes.ELSE */]: [5 /* States.IN_SINGLE_QUOTE */, 0 /* Actions.APPEND */]\n};\npathStateMachine[6 /* States.IN_DOUBLE_QUOTE */] = {\n [\"\\\"\" /* PathCharTypes.DOUBLE_QUOTE */]: [4 /* States.IN_SUB_PATH */, 0 /* Actions.APPEND */],\n [\"o\" /* PathCharTypes.END_OF_FAIL */]: 8 /* States.ERROR */,\n [\"l\" /* PathCharTypes.ELSE */]: [6 /* States.IN_DOUBLE_QUOTE */, 0 /* Actions.APPEND */]\n};\n/**\n * Check if an expression is a literal value.\n */\nconst literalValueRE = /^\\s?(?:true|false|-?[\\d.]+|'[^']*'|\"[^\"]*\")\\s?$/;\nfunction isLiteral(exp) {\n return literalValueRE.test(exp);\n}\n/**\n * Strip quotes from a string\n */\nfunction stripQuotes(str) {\n const a = str.charCodeAt(0);\n const b = str.charCodeAt(str.length - 1);\n return a === b && (a === 0x22 || a === 0x27) ? str.slice(1, -1) : str;\n}\n/**\n * Determine the type of a character in a keypath.\n */\nfunction getPathCharType(ch) {\n if (ch === undefined || ch === null) {\n return \"o\" /* PathCharTypes.END_OF_FAIL */;\n }\n const code = ch.charCodeAt(0);\n switch (code) {\n case 0x5b: // [\n case 0x5d: // ]\n case 0x2e: // .\n case 0x22: // \"\n case 0x27: // '\n return ch;\n case 0x5f: // _\n case 0x24: // $\n case 0x2d: // -\n return \"i\" /* PathCharTypes.IDENT */;\n case 0x09: // Tab (HT)\n case 0x0a: // Newline (LF)\n case 0x0d: // Return (CR)\n case 0xa0: // No-break space (NBSP)\n case 0xfeff: // Byte Order Mark (BOM)\n case 0x2028: // Line Separator (LS)\n case 0x2029: // Paragraph Separator (PS)\n return \"w\" /* PathCharTypes.WORKSPACE */;\n }\n return \"i\" /* PathCharTypes.IDENT */;\n}\n/**\n * Format a subPath, return its plain form if it is\n * a literal string or number. Otherwise prepend the\n * dynamic indicator (*).\n */\nfunction formatSubPath(path) {\n const trimmed = path.trim();\n // invalid leading 0\n if (path.charAt(0) === '0' && isNaN(parseInt(path))) {\n return false;\n }\n return isLiteral(trimmed)\n ? stripQuotes(trimmed)\n : \"*\" /* PathCharTypes.ASTARISK */ + trimmed;\n}\n/**\n * Parse a string path into an array of segments\n */\nfunction parse(path) {\n const keys = [];\n let index = -1;\n let mode = 0 /* States.BEFORE_PATH */;\n let subPathDepth = 0;\n let c;\n let key; // eslint-disable-line\n let newChar;\n let type;\n let transition;\n let action;\n let typeMap;\n const actions = [];\n actions[0 /* Actions.APPEND */] = () => {\n if (key === undefined) {\n key = newChar;\n }\n else {\n key += newChar;\n }\n };\n actions[1 /* Actions.PUSH */] = () => {\n if (key !== undefined) {\n keys.push(key);\n key = undefined;\n }\n };\n actions[2 /* Actions.INC_SUB_PATH_DEPTH */] = () => {\n actions[0 /* Actions.APPEND */]();\n subPathDepth++;\n };\n actions[3 /* Actions.PUSH_SUB_PATH */] = () => {\n if (subPathDepth > 0) {\n subPathDepth--;\n mode = 4 /* States.IN_SUB_PATH */;\n actions[0 /* Actions.APPEND */]();\n }\n else {\n subPathDepth = 0;\n if (key === undefined) {\n return false;\n }\n key = formatSubPath(key);\n if (key === false) {\n return false;\n }\n else {\n actions[1 /* Actions.PUSH */]();\n }\n }\n };\n function maybeUnescapeQuote() {\n const nextChar = path[index + 1];\n if ((mode === 5 /* States.IN_SINGLE_QUOTE */ &&\n nextChar === \"'\" /* PathCharTypes.SINGLE_QUOTE */) ||\n (mode === 6 /* States.IN_DOUBLE_QUOTE */ &&\n nextChar === \"\\\"\" /* PathCharTypes.DOUBLE_QUOTE */)) {\n index++;\n newChar = '\\\\' + nextChar;\n actions[0 /* Actions.APPEND */]();\n return true;\n }\n }\n while (mode !== null) {\n index++;\n c = path[index];\n if (c === '\\\\' && maybeUnescapeQuote()) {\n continue;\n }\n type = getPathCharType(c);\n typeMap = pathStateMachine[mode];\n transition = typeMap[type] || typeMap[\"l\" /* PathCharTypes.ELSE */] || 8 /* States.ERROR */;\n // check parse error\n if (transition === 8 /* States.ERROR */) {\n return;\n }\n mode = transition[0];\n if (transition[1] !== undefined) {\n action = actions[transition[1]];\n if (action) {\n newChar = c;\n if (action() === false) {\n return;\n }\n }\n }\n // check parse finish\n if (mode === 7 /* States.AFTER_PATH */) {\n return keys;\n }\n }\n}\n// path token cache\nconst cache = new Map();\n/**\n * key-value message resolver\n *\n * @remarks\n * Resolves messages with the key-value structure. Note that messages with a hierarchical structure such as objects cannot be resolved\n *\n * @param obj - A target object to be resolved with path\n * @param path - A {@link Path | path} to resolve the value of message\n *\n * @returns A resolved {@link PathValue | path value}\n *\n * @VueI18nGeneral\n */\nfunction resolveWithKeyValue(obj, path) {\n return shared.isObject(obj) ? obj[path] : null;\n}\n/**\n * message resolver\n *\n * @remarks\n * Resolves messages. messages with a hierarchical structure such as objects can be resolved. This resolver is used in VueI18n as default.\n *\n * @param obj - A target object to be resolved with path\n * @param path - A {@link Path | path} to resolve the value of message\n *\n * @returns A resolved {@link PathValue | path value}\n *\n * @VueI18nGeneral\n */\nfunction resolveValue(obj, path) {\n // check object\n if (!shared.isObject(obj)) {\n return null;\n }\n // parse path\n let hit = cache.get(path);\n if (!hit) {\n hit = parse(path);\n if (hit) {\n cache.set(path, hit);\n }\n }\n // check hit\n if (!hit) {\n return null;\n }\n // resolve path value\n const len = hit.length;\n let last = obj;\n let i = 0;\n while (i < len) {\n const val = last[hit[i]];\n if (val === undefined) {\n return null;\n }\n if (shared.isFunction(last)) {\n return null;\n }\n last = val;\n i++;\n }\n return last;\n}\n\nconst CoreWarnCodes = {\n NOT_FOUND_KEY: 1,\n FALLBACK_TO_TRANSLATE: 2,\n CANNOT_FORMAT_NUMBER: 3,\n FALLBACK_TO_NUMBER_FORMAT: 4,\n CANNOT_FORMAT_DATE: 5,\n FALLBACK_TO_DATE_FORMAT: 6,\n EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER: 7\n};\nconst CORE_WARN_CODES_EXTEND_POINT = 8;\n/** @internal */\nconst warnMessages = {\n [CoreWarnCodes.NOT_FOUND_KEY]: `Not found '{key}' key in '{locale}' locale messages.`,\n [CoreWarnCodes.FALLBACK_TO_TRANSLATE]: `Fall back to translate '{key}' key with '{target}' locale.`,\n [CoreWarnCodes.CANNOT_FORMAT_NUMBER]: `Cannot format a number value due to not supported Intl.NumberFormat.`,\n [CoreWarnCodes.FALLBACK_TO_NUMBER_FORMAT]: `Fall back to number format '{key}' key with '{target}' locale.`,\n [CoreWarnCodes.CANNOT_FORMAT_DATE]: `Cannot format a date value due to not supported Intl.DateTimeFormat.`,\n [CoreWarnCodes.FALLBACK_TO_DATE_FORMAT]: `Fall back to datetime format '{key}' key with '{target}' locale.`,\n [CoreWarnCodes.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]: `This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future.`\n};\nfunction getWarnMessage(code, ...args) {\n return shared.format(warnMessages[code], ...args);\n}\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * Intlify core-base version\n * @internal\n */\nconst VERSION = '11.1.2';\nconst NOT_REOSLVED = -1;\nconst DEFAULT_LOCALE = 'en-US';\nconst MISSING_RESOLVE_VALUE = '';\nconst capitalize = (str) => `${str.charAt(0).toLocaleUpperCase()}${str.substr(1)}`;\nfunction getDefaultLinkedModifiers() {\n return {\n upper: (val, type) => {\n // prettier-ignore\n return type === 'text' && shared.isString(val)\n ? val.toUpperCase()\n : type === 'vnode' && shared.isObject(val) && '__v_isVNode' in val\n ? val.children.toUpperCase()\n : val;\n },\n lower: (val, type) => {\n // prettier-ignore\n return type === 'text' && shared.isString(val)\n ? val.toLowerCase()\n : type === 'vnode' && shared.isObject(val) && '__v_isVNode' in val\n ? val.children.toLowerCase()\n : val;\n },\n capitalize: (val, type) => {\n // prettier-ignore\n return (type === 'text' && shared.isString(val)\n ? capitalize(val)\n : type === 'vnode' && shared.isObject(val) && '__v_isVNode' in val\n ? capitalize(val.children)\n : val);\n }\n };\n}\nlet _compiler;\nfunction registerMessageCompiler(compiler) {\n _compiler = compiler;\n}\nlet _resolver;\n/**\n * Register the message resolver\n *\n * @param resolver - A {@link MessageResolver} function\n *\n * @VueI18nGeneral\n */\nfunction registerMessageResolver(resolver) {\n _resolver = resolver;\n}\nlet _fallbacker;\n/**\n * Register the locale fallbacker\n *\n * @param fallbacker - A {@link LocaleFallbacker} function\n *\n * @VueI18nGeneral\n */\nfunction registerLocaleFallbacker(fallbacker) {\n _fallbacker = fallbacker;\n}\n// Additional Meta for Intlify DevTools\nlet _additionalMeta = null;\n/* #__NO_SIDE_EFFECTS__ */\nconst setAdditionalMeta = (meta) => {\n _additionalMeta = meta;\n};\n/* #__NO_SIDE_EFFECTS__ */\nconst getAdditionalMeta = () => _additionalMeta;\nlet _fallbackContext = null;\nconst setFallbackContext = (context) => {\n _fallbackContext = context;\n};\nconst getFallbackContext = () => _fallbackContext;\n// ID for CoreContext\nlet _cid = 0;\nfunction createCoreContext(options = {}) {\n // setup options\n const onWarn = shared.isFunction(options.onWarn) ? options.onWarn : shared.warn;\n const version = shared.isString(options.version) ? options.version : VERSION;\n const locale = shared.isString(options.locale) || shared.isFunction(options.locale)\n ? options.locale\n : DEFAULT_LOCALE;\n const _locale = shared.isFunction(locale) ? DEFAULT_LOCALE : locale;\n const fallbackLocale = shared.isArray(options.fallbackLocale) ||\n shared.isPlainObject(options.fallbackLocale) ||\n shared.isString(options.fallbackLocale) ||\n options.fallbackLocale === false\n ? options.fallbackLocale\n : _locale;\n const messages = shared.isPlainObject(options.messages)\n ? options.messages\n : createResources(_locale);\n const datetimeFormats = shared.isPlainObject(options.datetimeFormats)\n ? options.datetimeFormats\n : createResources(_locale)\n ;\n const numberFormats = shared.isPlainObject(options.numberFormats)\n ? options.numberFormats\n : createResources(_locale)\n ;\n const modifiers = shared.assign(shared.create(), options.modifiers, getDefaultLinkedModifiers());\n const pluralRules = options.pluralRules || shared.create();\n const missing = shared.isFunction(options.missing) ? options.missing : null;\n const missingWarn = shared.isBoolean(options.missingWarn) || shared.isRegExp(options.missingWarn)\n ? options.missingWarn\n : true;\n const fallbackWarn = shared.isBoolean(options.fallbackWarn) || shared.isRegExp(options.fallbackWarn)\n ? options.fallbackWarn\n : true;\n const fallbackFormat = !!options.fallbackFormat;\n const unresolving = !!options.unresolving;\n const postTranslation = shared.isFunction(options.postTranslation)\n ? options.postTranslation\n : null;\n const processor = shared.isPlainObject(options.processor) ? options.processor : null;\n const warnHtmlMessage = shared.isBoolean(options.warnHtmlMessage)\n ? options.warnHtmlMessage\n : true;\n const escapeParameter = !!options.escapeParameter;\n const messageCompiler = shared.isFunction(options.messageCompiler)\n ? options.messageCompiler\n : _compiler;\n if (shared.isFunction(options.messageCompiler)) {\n shared.warnOnce(getWarnMessage(CoreWarnCodes.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));\n }\n const messageResolver = shared.isFunction(options.messageResolver)\n ? options.messageResolver\n : _resolver || resolveWithKeyValue;\n const localeFallbacker = shared.isFunction(options.localeFallbacker)\n ? options.localeFallbacker\n : _fallbacker || fallbackWithSimple;\n const fallbackContext = shared.isObject(options.fallbackContext)\n ? options.fallbackContext\n : undefined;\n // setup internal options\n const internalOptions = options;\n const __datetimeFormatters = shared.isObject(internalOptions.__datetimeFormatters)\n ? internalOptions.__datetimeFormatters\n : new Map()\n ;\n const __numberFormatters = shared.isObject(internalOptions.__numberFormatters)\n ? internalOptions.__numberFormatters\n : new Map()\n ;\n const __meta = shared.isObject(internalOptions.__meta) ? internalOptions.__meta : {};\n _cid++;\n const context = {\n version,\n cid: _cid,\n locale,\n fallbackLocale,\n messages,\n modifiers,\n pluralRules,\n missing,\n missingWarn,\n fallbackWarn,\n fallbackFormat,\n unresolving,\n postTranslation,\n processor,\n warnHtmlMessage,\n escapeParameter,\n messageCompiler,\n messageResolver,\n localeFallbacker,\n fallbackContext,\n onWarn,\n __meta\n };\n {\n context.datetimeFormats = datetimeFormats;\n context.numberFormats = numberFormats;\n context.__datetimeFormatters = __datetimeFormatters;\n context.__numberFormatters = __numberFormatters;\n }\n // for vue-devtools timeline event\n {\n context.__v_emitter =\n internalOptions.__v_emitter != null\n ? internalOptions.__v_emitter\n : undefined;\n }\n // NOTE: experimental !!\n {\n initI18nDevTools(context, version, __meta);\n }\n return context;\n}\nconst createResources = (locale) => ({ [locale]: shared.create() });\n/** @internal */\nfunction isTranslateFallbackWarn(fallback, key) {\n return fallback instanceof RegExp ? fallback.test(key) : fallback;\n}\n/** @internal */\nfunction isTranslateMissingWarn(missing, key) {\n return missing instanceof RegExp ? missing.test(key) : missing;\n}\n/** @internal */\nfunction handleMissing(context, key, locale, missingWarn, type) {\n const { missing, onWarn } = context;\n // for vue-devtools timeline event\n {\n const emitter = context.__v_emitter;\n if (emitter) {\n emitter.emit('missing', {\n locale,\n key,\n type,\n groupId: `${type}:${key}`\n });\n }\n }\n if (missing !== null) {\n const ret = missing(context, locale, key, type);\n return shared.isString(ret) ? ret : key;\n }\n else {\n if (isTranslateMissingWarn(missingWarn, key)) {\n onWarn(getWarnMessage(CoreWarnCodes.NOT_FOUND_KEY, { key, locale }));\n }\n return key;\n }\n}\n/** @internal */\nfunction updateFallbackLocale(ctx, locale, fallback) {\n const context = ctx;\n context.__localeChainCache = new Map();\n ctx.localeFallbacker(ctx, fallback, locale);\n}\n/** @internal */\nfunction isAlmostSameLocale(locale, compareLocale) {\n if (locale === compareLocale)\n return false;\n return locale.split('-')[0] === compareLocale.split('-')[0];\n}\n/** @internal */\nfunction isImplicitFallback(targetLocale, locales) {\n const index = locales.indexOf(targetLocale);\n if (index === -1) {\n return false;\n }\n for (let i = index + 1; i < locales.length; i++) {\n if (isAlmostSameLocale(targetLocale, locales[i])) {\n return true;\n }\n }\n return false;\n}\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\nconst intlDefined = typeof Intl !== 'undefined';\nconst Availabilities = {\n dateTimeFormat: intlDefined && typeof Intl.DateTimeFormat !== 'undefined',\n numberFormat: intlDefined && typeof Intl.NumberFormat !== 'undefined'\n};\n\n// implementation of `datetime` function\nfunction datetime(context, ...args) {\n const { datetimeFormats, unresolving, fallbackLocale, onWarn, localeFallbacker } = context;\n const { __datetimeFormatters } = context;\n if (!Availabilities.dateTimeFormat) {\n onWarn(getWarnMessage(CoreWarnCodes.CANNOT_FORMAT_DATE));\n return MISSING_RESOLVE_VALUE;\n }\n const [key, value, options, overrides] = parseDateTimeArgs(...args);\n const missingWarn = shared.isBoolean(options.missingWarn)\n ? options.missingWarn\n : context.missingWarn;\n const fallbackWarn = shared.isBoolean(options.fallbackWarn)\n ? options.fallbackWarn\n : context.fallbackWarn;\n const part = !!options.part;\n const locale = getLocale(context, options);\n const locales = localeFallbacker(context, // eslint-disable-line @typescript-eslint/no-explicit-any\n fallbackLocale, locale);\n if (!shared.isString(key) || key === '') {\n return new Intl.DateTimeFormat(locale, overrides).format(value);\n }\n // resolve format\n let datetimeFormat = {};\n let targetLocale;\n let format = null;\n let from = locale;\n let to = null;\n const type = 'datetime format';\n for (let i = 0; i < locales.length; i++) {\n targetLocale = to = locales[i];\n if (locale !== targetLocale &&\n isTranslateFallbackWarn(fallbackWarn, key)) {\n onWarn(getWarnMessage(CoreWarnCodes.FALLBACK_TO_DATE_FORMAT, {\n key,\n target: targetLocale\n }));\n }\n // for vue-devtools timeline event\n if (locale !== targetLocale) {\n const emitter = context.__v_emitter;\n if (emitter) {\n emitter.emit('fallback', {\n type,\n key,\n from,\n to,\n groupId: `${type}:${key}`\n });\n }\n }\n datetimeFormat =\n datetimeFormats[targetLocale] || {};\n format = datetimeFormat[key];\n if (shared.isPlainObject(format))\n break;\n handleMissing(context, key, targetLocale, missingWarn, type); // eslint-disable-line @typescript-eslint/no-explicit-any\n from = to;\n }\n // checking format and target locale\n if (!shared.isPlainObject(format) || !shared.isString(targetLocale)) {\n return unresolving ? NOT_REOSLVED : key;\n }\n let id = `${targetLocale}__${key}`;\n if (!shared.isEmptyObject(overrides)) {\n id = `${id}__${JSON.stringify(overrides)}`;\n }\n let formatter = __datetimeFormatters.get(id);\n if (!formatter) {\n formatter = new Intl.DateTimeFormat(targetLocale, shared.assign({}, format, overrides));\n __datetimeFormatters.set(id, formatter);\n }\n return !part ? formatter.format(value) : formatter.formatToParts(value);\n}\n/** @internal */\nconst DATETIME_FORMAT_OPTIONS_KEYS = [\n 'localeMatcher',\n 'weekday',\n 'era',\n 'year',\n 'month',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'timeZoneName',\n 'formatMatcher',\n 'hour12',\n 'timeZone',\n 'dateStyle',\n 'timeStyle',\n 'calendar',\n 'dayPeriod',\n 'numberingSystem',\n 'hourCycle',\n 'fractionalSecondDigits'\n];\n/** @internal */\nfunction parseDateTimeArgs(...args) {\n const [arg1, arg2, arg3, arg4] = args;\n const options = shared.create();\n let overrides = shared.create();\n let value;\n if (shared.isString(arg1)) {\n // Only allow ISO strings - other date formats are often supported,\n // but may cause different results in different browsers.\n const matches = arg1.match(/(\\d{4}-\\d{2}-\\d{2})(T|\\s)?(.*)/);\n if (!matches) {\n throw createCoreError(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT);\n }\n // Some browsers can not parse the iso datetime separated by space,\n // this is a compromise solution by replace the 'T'/' ' with 'T'\n const dateTime = matches[3]\n ? matches[3].trim().startsWith('T')\n ? `${matches[1].trim()}${matches[3].trim()}`\n : `${matches[1].trim()}T${matches[3].trim()}`\n : matches[1].trim();\n value = new Date(dateTime);\n try {\n // This will fail if the date is not valid\n value.toISOString();\n }\n catch {\n throw createCoreError(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT);\n }\n }\n else if (shared.isDate(arg1)) {\n if (isNaN(arg1.getTime())) {\n throw createCoreError(CoreErrorCodes.INVALID_DATE_ARGUMENT);\n }\n value = arg1;\n }\n else if (shared.isNumber(arg1)) {\n value = arg1;\n }\n else {\n throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);\n }\n if (shared.isString(arg2)) {\n options.key = arg2;\n }\n else if (shared.isPlainObject(arg2)) {\n Object.keys(arg2).forEach(key => {\n if (DATETIME_FORMAT_OPTIONS_KEYS.includes(key)) {\n overrides[key] = arg2[key];\n }\n else {\n options[key] = arg2[key];\n }\n });\n }\n if (shared.isString(arg3)) {\n options.locale = arg3;\n }\n else if (shared.isPlainObject(arg3)) {\n overrides = arg3;\n }\n if (shared.isPlainObject(arg4)) {\n overrides = arg4;\n }\n return [options.key || '', value, options, overrides];\n}\n/** @internal */\nfunction clearDateTimeFormat(ctx, locale, format) {\n const context = ctx;\n for (const key in format) {\n const id = `${locale}__${key}`;\n if (!context.__datetimeFormatters.has(id)) {\n continue;\n }\n context.__datetimeFormatters.delete(id);\n }\n}\n\n// implementation of `number` function\nfunction number(context, ...args) {\n const { numberFormats, unresolving, fallbackLocale, onWarn, localeFallbacker } = context;\n const { __numberFormatters } = context;\n if (!Availabilities.numberFormat) {\n onWarn(getWarnMessage(CoreWarnCodes.CANNOT_FORMAT_NUMBER));\n return MISSING_RESOLVE_VALUE;\n }\n const [key, value, options, overrides] = parseNumberArgs(...args);\n const missingWarn = shared.isBoolean(options.missingWarn)\n ? options.missingWarn\n : context.missingWarn;\n const fallbackWarn = shared.isBoolean(options.fallbackWarn)\n ? options.fallbackWarn\n : context.fallbackWarn;\n const part = !!options.part;\n const locale = getLocale(context, options);\n const locales = localeFallbacker(context, // eslint-disable-line @typescript-eslint/no-explicit-any\n fallbackLocale, locale);\n if (!shared.isString(key) || key === '') {\n return new Intl.NumberFormat(locale, overrides).format(value);\n }\n // resolve format\n let numberFormat = {};\n let targetLocale;\n let format = null;\n let from = locale;\n let to = null;\n const type = 'number format';\n for (let i = 0; i < locales.length; i++) {\n targetLocale = to = locales[i];\n if (locale !== targetLocale &&\n isTranslateFallbackWarn(fallbackWarn, key)) {\n onWarn(getWarnMessage(CoreWarnCodes.FALLBACK_TO_NUMBER_FORMAT, {\n key,\n target: targetLocale\n }));\n }\n // for vue-devtools timeline event\n if (locale !== targetLocale) {\n const emitter = context.__v_emitter;\n if (emitter) {\n emitter.emit('fallback', {\n type,\n key,\n from,\n to,\n groupId: `${type}:${key}`\n });\n }\n }\n numberFormat =\n numberFormats[targetLocale] || {};\n format = numberFormat[key];\n if (shared.isPlainObject(format))\n break;\n handleMissing(context, key, targetLocale, missingWarn, type); // eslint-disable-line @typescript-eslint/no-explicit-any\n from = to;\n }\n // checking format and target locale\n if (!shared.isPlainObject(format) || !shared.isString(targetLocale)) {\n return unresolving ? NOT_REOSLVED : key;\n }\n let id = `${targetLocale}__${key}`;\n if (!shared.isEmptyObject(overrides)) {\n id = `${id}__${JSON.stringify(overrides)}`;\n }\n let formatter = __numberFormatters.get(id);\n if (!formatter) {\n formatter = new Intl.NumberFormat(targetLocale, shared.assign({}, format, overrides));\n __numberFormatters.set(id, formatter);\n }\n return !part ? formatter.format(value) : formatter.formatToParts(value);\n}\n/** @internal */\nconst NUMBER_FORMAT_OPTIONS_KEYS = [\n 'localeMatcher',\n 'style',\n 'currency',\n 'currencyDisplay',\n 'currencySign',\n 'useGrouping',\n 'minimumIntegerDigits',\n 'minimumFractionDigits',\n 'maximumFractionDigits',\n 'minimumSignificantDigits',\n 'maximumSignificantDigits',\n 'compactDisplay',\n 'notation',\n 'signDisplay',\n 'unit',\n 'unitDisplay',\n 'roundingMode',\n 'roundingPriority',\n 'roundingIncrement',\n 'trailingZeroDisplay'\n];\n/** @internal */\nfunction parseNumberArgs(...args) {\n const [arg1, arg2, arg3, arg4] = args;\n const options = shared.create();\n let overrides = shared.create();\n if (!shared.isNumber(arg1)) {\n throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);\n }\n const value = arg1;\n if (shared.isString(arg2)) {\n options.key = arg2;\n }\n else if (shared.isPlainObject(arg2)) {\n Object.keys(arg2).forEach(key => {\n if (NUMBER_FORMAT_OPTIONS_KEYS.includes(key)) {\n overrides[key] = arg2[key];\n }\n else {\n options[key] = arg2[key];\n }\n });\n }\n if (shared.isString(arg3)) {\n options.locale = arg3;\n }\n else if (shared.isPlainObject(arg3)) {\n overrides = arg3;\n }\n if (shared.isPlainObject(arg4)) {\n overrides = arg4;\n }\n return [options.key || '', value, options, overrides];\n}\n/** @internal */\nfunction clearNumberFormat(ctx, locale, format) {\n const context = ctx;\n for (const key in format) {\n const id = `${locale}__${key}`;\n if (!context.__numberFormatters.has(id)) {\n continue;\n }\n context.__numberFormatters.delete(id);\n }\n}\n\nconst DEFAULT_MODIFIER = (str) => str;\nconst DEFAULT_MESSAGE = (ctx) => ''; // eslint-disable-line\nconst DEFAULT_MESSAGE_DATA_TYPE = 'text';\nconst DEFAULT_NORMALIZE = (values) => values.length === 0 ? '' : shared.join(values);\nconst DEFAULT_INTERPOLATE = shared.toDisplayString;\nfunction pluralDefault(choice, choicesLength) {\n choice = Math.abs(choice);\n if (choicesLength === 2) {\n // prettier-ignore\n return choice\n ? choice > 1\n ? 1\n : 0\n : 1;\n }\n return choice ? Math.min(choice, 2) : 0;\n}\nfunction getPluralIndex(options) {\n // prettier-ignore\n const index = shared.isNumber(options.pluralIndex)\n ? options.pluralIndex\n : -1;\n // prettier-ignore\n return options.named && (shared.isNumber(options.named.count) || shared.isNumber(options.named.n))\n ? shared.isNumber(options.named.count)\n ? options.named.count\n : shared.isNumber(options.named.n)\n ? options.named.n\n : index\n : index;\n}\nfunction normalizeNamed(pluralIndex, props) {\n if (!props.count) {\n props.count = pluralIndex;\n }\n if (!props.n) {\n props.n = pluralIndex;\n }\n}\nfunction createMessageContext(options = {}) {\n const locale = options.locale;\n const pluralIndex = getPluralIndex(options);\n const pluralRule = shared.isObject(options.pluralRules) &&\n shared.isString(locale) &&\n shared.isFunction(options.pluralRules[locale])\n ? options.pluralRules[locale]\n : pluralDefault;\n const orgPluralRule = shared.isObject(options.pluralRules) &&\n shared.isString(locale) &&\n shared.isFunction(options.pluralRules[locale])\n ? pluralDefault\n : undefined;\n const plural = (messages) => {\n return messages[pluralRule(pluralIndex, messages.length, orgPluralRule)];\n };\n const _list = options.list || [];\n const list = (index) => _list[index];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const _named = options.named || shared.create();\n shared.isNumber(options.pluralIndex) && normalizeNamed(pluralIndex, _named);\n const named = (key) => _named[key];\n function message(key, useLinked) {\n // prettier-ignore\n const msg = shared.isFunction(options.messages)\n ? options.messages(key, !!useLinked)\n : shared.isObject(options.messages)\n ? options.messages[key]\n : false;\n return !msg\n ? options.parent\n ? options.parent.message(key) // resolve from parent messages\n : DEFAULT_MESSAGE\n : msg;\n }\n const _modifier = (name) => options.modifiers\n ? options.modifiers[name]\n : DEFAULT_MODIFIER;\n const normalize = shared.isPlainObject(options.processor) && shared.isFunction(options.processor.normalize)\n ? options.processor.normalize\n : DEFAULT_NORMALIZE;\n const interpolate = shared.isPlainObject(options.processor) &&\n shared.isFunction(options.processor.interpolate)\n ? options.processor.interpolate\n : DEFAULT_INTERPOLATE;\n const type = shared.isPlainObject(options.processor) && shared.isString(options.processor.type)\n ? options.processor.type\n : DEFAULT_MESSAGE_DATA_TYPE;\n const linked = (key, ...args) => {\n const [arg1, arg2] = args;\n let type = 'text';\n let modifier = '';\n if (args.length === 1) {\n if (shared.isObject(arg1)) {\n modifier = arg1.modifier || modifier;\n type = arg1.type || type;\n }\n else if (shared.isString(arg1)) {\n modifier = arg1 || modifier;\n }\n }\n else if (args.length === 2) {\n if (shared.isString(arg1)) {\n modifier = arg1 || modifier;\n }\n if (shared.isString(arg2)) {\n type = arg2 || type;\n }\n }\n const ret = message(key, true)(ctx);\n const msg = \n // The message in vnode resolved with linked are returned as an array by processor.nomalize\n type === 'vnode' && shared.isArray(ret) && modifier\n ? ret[0]\n : ret;\n return modifier ? _modifier(modifier)(msg, type) : msg;\n };\n const ctx = {\n [\"list\" /* HelperNameMap.LIST */]: list,\n [\"named\" /* HelperNameMap.NAMED */]: named,\n [\"plural\" /* HelperNameMap.PLURAL */]: plural,\n [\"linked\" /* HelperNameMap.LINKED */]: linked,\n [\"message\" /* HelperNameMap.MESSAGE */]: message,\n [\"type\" /* HelperNameMap.TYPE */]: type,\n [\"interpolate\" /* HelperNameMap.INTERPOLATE */]: interpolate,\n [\"normalize\" /* HelperNameMap.NORMALIZE */]: normalize,\n [\"values\" /* HelperNameMap.VALUES */]: shared.assign(shared.create(), _list, _named)\n };\n return ctx;\n}\n\nconst NOOP_MESSAGE_FUNCTION = () => '';\nconst isMessageFunction = (val) => shared.isFunction(val);\n// implementation of `translate` function\nfunction translate(context, ...args) {\n const { fallbackFormat, postTranslation, unresolving, messageCompiler, fallbackLocale, messages } = context;\n const [key, options] = parseTranslateArgs(...args);\n const missingWarn = shared.isBoolean(options.missingWarn)\n ? options.missingWarn\n : context.missingWarn;\n const fallbackWarn = shared.isBoolean(options.fallbackWarn)\n ? options.fallbackWarn\n : context.fallbackWarn;\n const escapeParameter = shared.isBoolean(options.escapeParameter)\n ? options.escapeParameter\n : context.escapeParameter;\n const resolvedMessage = !!options.resolvedMessage;\n // prettier-ignore\n const defaultMsgOrKey = shared.isString(options.default) || shared.isBoolean(options.default) // default by function option\n ? !shared.isBoolean(options.default)\n ? options.default\n : (!messageCompiler ? () => key : key)\n : fallbackFormat // default by `fallbackFormat` option\n ? (!messageCompiler ? () => key : key)\n : null;\n const enableDefaultMsg = fallbackFormat ||\n (defaultMsgOrKey != null &&\n (shared.isString(defaultMsgOrKey) || shared.isFunction(defaultMsgOrKey)));\n const locale = getLocale(context, options);\n // escape params\n escapeParameter && escapeParams(options);\n // resolve message format\n // eslint-disable-next-line prefer-const\n let [formatScope, targetLocale, message] = !resolvedMessage\n ? resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn)\n : [\n key,\n locale,\n messages[locale] || shared.create()\n ];\n // NOTE:\n // Fix to work around `ssrTransfrom` bug in Vite.\n // https://github.com/vitejs/vite/issues/4306\n // To get around this, use temporary variables.\n // https://github.com/nuxt/framework/issues/1461#issuecomment-954606243\n let format = formatScope;\n // if you use default message, set it as message format!\n let cacheBaseKey = key;\n if (!resolvedMessage &&\n !(shared.isString(format) ||\n isMessageAST(format) ||\n isMessageFunction(format))) {\n if (enableDefaultMsg) {\n format = defaultMsgOrKey;\n cacheBaseKey = format;\n }\n }\n // checking message format and target locale\n if (!resolvedMessage &&\n (!(shared.isString(format) ||\n isMessageAST(format) ||\n isMessageFunction(format)) ||\n !shared.isString(targetLocale))) {\n return unresolving ? NOT_REOSLVED : key;\n }\n // TODO: refactor\n if (shared.isString(format) && context.messageCompiler == null) {\n shared.warn(`The message format compilation is not supported in this build. ` +\n `Because message compiler isn't included. ` +\n `You need to pre-compilation all message format. ` +\n `So translate function return '${key}'.`);\n return key;\n }\n // setup compile error detecting\n let occurred = false;\n const onError = () => {\n occurred = true;\n };\n // compile message format\n const msg = !isMessageFunction(format)\n ? compileMessageFormat(context, key, targetLocale, format, cacheBaseKey, onError)\n : format;\n // if occurred compile error, return the message format\n if (occurred) {\n return format;\n }\n // evaluate message with context\n const ctxOptions = getMessageContextOptions(context, targetLocale, message, options);\n const msgContext = createMessageContext(ctxOptions);\n const messaged = evaluateMessage(context, msg, msgContext);\n // if use post translation option, proceed it with handler\n const ret = postTranslation\n ? postTranslation(messaged, key)\n : messaged;\n // NOTE: experimental !!\n {\n // prettier-ignore\n const payloads = {\n timestamp: Date.now(),\n key: shared.isString(key)\n ? key\n : isMessageFunction(format)\n ? format.key\n : '',\n locale: targetLocale || (isMessageFunction(format)\n ? format.locale\n : ''),\n format: shared.isString(format)\n ? format\n : isMessageFunction(format)\n ? format.source\n : '',\n message: ret\n };\n payloads.meta = shared.assign({}, context.__meta, getAdditionalMeta() || {});\n translateDevTools(payloads);\n }\n return ret;\n}\nfunction escapeParams(options) {\n if (shared.isArray(options.list)) {\n options.list = options.list.map(item => shared.isString(item) ? shared.escapeHtml(item) : item);\n }\n else if (shared.isObject(options.named)) {\n Object.keys(options.named).forEach(key => {\n if (shared.isString(options.named[key])) {\n options.named[key] = shared.escapeHtml(options.named[key]);\n }\n });\n }\n}\nfunction resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn) {\n const { messages, onWarn, messageResolver: resolveValue, localeFallbacker } = context;\n const locales = localeFallbacker(context, fallbackLocale, locale); // eslint-disable-line @typescript-eslint/no-explicit-any\n let message = shared.create();\n let targetLocale;\n let format = null;\n let from = locale;\n let to = null;\n const type = 'translate';\n for (let i = 0; i < locales.length; i++) {\n targetLocale = to = locales[i];\n if (locale !== targetLocale &&\n !isAlmostSameLocale(locale, targetLocale) &&\n isTranslateFallbackWarn(fallbackWarn, key)) {\n onWarn(getWarnMessage(CoreWarnCodes.FALLBACK_TO_TRANSLATE, {\n key,\n target: targetLocale\n }));\n }\n // for vue-devtools timeline event\n if (locale !== targetLocale) {\n const emitter = context.__v_emitter;\n if (emitter) {\n emitter.emit('fallback', {\n type,\n key,\n from,\n to,\n groupId: `${type}:${key}`\n });\n }\n }\n message =\n messages[targetLocale] || shared.create();\n // for vue-devtools timeline event\n let start = null;\n let startTag;\n let endTag;\n if (shared.inBrowser) {\n start = window.performance.now();\n startTag = 'intlify-message-resolve-start';\n endTag = 'intlify-message-resolve-end';\n shared.mark && shared.mark(startTag);\n }\n if ((format = resolveValue(message, key)) === null) {\n // if null, resolve with object key path\n format = message[key]; // eslint-disable-line @typescript-eslint/no-explicit-any\n }\n // for vue-devtools timeline event\n if (shared.inBrowser) {\n const end = window.performance.now();\n const emitter = context.__v_emitter;\n if (emitter && start && format) {\n emitter.emit('message-resolve', {\n type: 'message-resolve',\n key,\n message: format,\n time: end - start,\n groupId: `${type}:${key}`\n });\n }\n if (startTag && endTag && shared.mark && shared.measure) {\n shared.mark(endTag);\n shared.measure('intlify message resolve', startTag, endTag);\n }\n }\n if (shared.isString(format) || isMessageAST(format) || isMessageFunction(format)) {\n break;\n }\n if (!isImplicitFallback(targetLocale, locales)) {\n const missingRet = handleMissing(context, // eslint-disable-line @typescript-eslint/no-explicit-any\n key, targetLocale, missingWarn, type);\n if (missingRet !== key) {\n format = missingRet;\n }\n }\n from = to;\n }\n return [format, targetLocale, message];\n}\nfunction compileMessageFormat(context, key, targetLocale, format, cacheBaseKey, onError) {\n const { messageCompiler, warnHtmlMessage } = context;\n if (isMessageFunction(format)) {\n const msg = format;\n msg.locale = msg.locale || targetLocale;\n msg.key = msg.key || key;\n return msg;\n }\n if (messageCompiler == null) {\n const msg = (() => format);\n msg.locale = targetLocale;\n msg.key = key;\n return msg;\n }\n // for vue-devtools timeline event\n let start = null;\n let startTag;\n let endTag;\n if (shared.inBrowser) {\n start = window.performance.now();\n startTag = 'intlify-message-compilation-start';\n endTag = 'intlify-message-compilation-end';\n shared.mark && shared.mark(startTag);\n }\n const msg = messageCompiler(format, getCompileContext(context, targetLocale, cacheBaseKey, format, warnHtmlMessage, onError));\n // for vue-devtools timeline event\n if (shared.inBrowser) {\n const end = window.performance.now();\n const emitter = context.__v_emitter;\n if (emitter && start) {\n emitter.emit('message-compilation', {\n type: 'message-compilation',\n message: format,\n time: end - start,\n groupId: `${'translate'}:${key}`\n });\n }\n if (startTag && endTag && shared.mark && shared.measure) {\n shared.mark(endTag);\n shared.measure('intlify message compilation', startTag, endTag);\n }\n }\n msg.locale = targetLocale;\n msg.key = key;\n msg.source = format;\n return msg;\n}\nfunction evaluateMessage(context, msg, msgCtx) {\n // for vue-devtools timeline event\n let start = null;\n let startTag;\n let endTag;\n if (shared.inBrowser) {\n start = window.performance.now();\n startTag = 'intlify-message-evaluation-start';\n endTag = 'intlify-message-evaluation-end';\n shared.mark && shared.mark(startTag);\n }\n const messaged = msg(msgCtx);\n // for vue-devtools timeline event\n if (shared.inBrowser) {\n const end = window.performance.now();\n const emitter = context.__v_emitter;\n if (emitter && start) {\n emitter.emit('message-evaluation', {\n type: 'message-evaluation',\n value: messaged,\n time: end - start,\n groupId: `${'translate'}:${msg.key}`\n });\n }\n if (startTag && endTag && shared.mark && shared.measure) {\n shared.mark(endTag);\n shared.measure('intlify message evaluation', startTag, endTag);\n }\n }\n return messaged;\n}\n/** @internal */\nfunction parseTranslateArgs(...args) {\n const [arg1, arg2, arg3] = args;\n const options = shared.create();\n if (!shared.isString(arg1) &&\n !shared.isNumber(arg1) &&\n !isMessageFunction(arg1) &&\n !isMessageAST(arg1)) {\n throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);\n }\n // prettier-ignore\n const key = shared.isNumber(arg1)\n ? String(arg1)\n : isMessageFunction(arg1)\n ? arg1\n : arg1;\n if (shared.isNumber(arg2)) {\n options.plural = arg2;\n }\n else if (shared.isString(arg2)) {\n options.default = arg2;\n }\n else if (shared.isPlainObject(arg2) && !shared.isEmptyObject(arg2)) {\n options.named = arg2;\n }\n else if (shared.isArray(arg2)) {\n options.list = arg2;\n }\n if (shared.isNumber(arg3)) {\n options.plural = arg3;\n }\n else if (shared.isString(arg3)) {\n options.default = arg3;\n }\n else if (shared.isPlainObject(arg3)) {\n shared.assign(options, arg3);\n }\n return [key, options];\n}\nfunction getCompileContext(context, locale, key, source, warnHtmlMessage, onError) {\n return {\n locale,\n key,\n warnHtmlMessage,\n onError: (err) => {\n onError && onError(err);\n {\n const _source = getSourceForCodeFrame(source);\n const message = `Message compilation error: ${err.message}`;\n const codeFrame = err.location &&\n _source &&\n shared.generateCodeFrame(_source, err.location.start.offset, err.location.end.offset);\n const emitter = context.__v_emitter;\n if (emitter && _source) {\n emitter.emit('compile-error', {\n message: _source,\n error: err.message,\n start: err.location && err.location.start.offset,\n end: err.location && err.location.end.offset,\n groupId: `${'translate'}:${key}`\n });\n }\n console.error(codeFrame ? `${message}\\n${codeFrame}` : message);\n }\n },\n onCacheKey: (source) => shared.generateFormatCacheKey(locale, key, source)\n };\n}\nfunction getSourceForCodeFrame(source) {\n if (shared.isString(source)) {\n return source;\n }\n else {\n if (source.loc && source.loc.source) {\n return source.loc.source;\n }\n }\n}\nfunction getMessageContextOptions(context, locale, message, options) {\n const { modifiers, pluralRules, messageResolver: resolveValue, fallbackLocale, fallbackWarn, missingWarn, fallbackContext } = context;\n const resolveMessage = (key, useLinked) => {\n let val = resolveValue(message, key);\n // fallback\n if (val == null && (fallbackContext || useLinked)) {\n const [, , message] = resolveMessageFormat(fallbackContext || context, // NOTE: if has fallbackContext, fallback to root, else if use linked, fallback to local context\n key, locale, fallbackLocale, fallbackWarn, missingWarn);\n val = resolveValue(message, key);\n }\n if (shared.isString(val) || isMessageAST(val)) {\n let occurred = false;\n const onError = () => {\n occurred = true;\n };\n const msg = compileMessageFormat(context, key, locale, val, key, onError);\n return !occurred\n ? msg\n : NOOP_MESSAGE_FUNCTION;\n }\n else if (isMessageFunction(val)) {\n return val;\n }\n else {\n // TODO: should be implemented warning message\n return NOOP_MESSAGE_FUNCTION;\n }\n };\n const ctxOptions = {\n locale,\n modifiers,\n pluralRules,\n messages: resolveMessage\n };\n if (context.processor) {\n ctxOptions.processor = context.processor;\n }\n if (options.list) {\n ctxOptions.list = options.list;\n }\n if (options.named) {\n ctxOptions.named = options.named;\n }\n if (shared.isNumber(options.plural)) {\n ctxOptions.pluralIndex = options.plural;\n }\n return ctxOptions;\n}\n\nexports.CompileErrorCodes = messageCompiler.CompileErrorCodes;\nexports.createCompileError = messageCompiler.createCompileError;\nexports.CORE_ERROR_CODES_EXTEND_POINT = CORE_ERROR_CODES_EXTEND_POINT;\nexports.CORE_WARN_CODES_EXTEND_POINT = CORE_WARN_CODES_EXTEND_POINT;\nexports.CoreErrorCodes = CoreErrorCodes;\nexports.CoreWarnCodes = CoreWarnCodes;\nexports.DATETIME_FORMAT_OPTIONS_KEYS = DATETIME_FORMAT_OPTIONS_KEYS;\nexports.DEFAULT_LOCALE = DEFAULT_LOCALE;\nexports.DEFAULT_MESSAGE_DATA_TYPE = DEFAULT_MESSAGE_DATA_TYPE;\nexports.MISSING_RESOLVE_VALUE = MISSING_RESOLVE_VALUE;\nexports.NOT_REOSLVED = NOT_REOSLVED;\nexports.NUMBER_FORMAT_OPTIONS_KEYS = NUMBER_FORMAT_OPTIONS_KEYS;\nexports.VERSION = VERSION;\nexports.clearCompileCache = clearCompileCache;\nexports.clearDateTimeFormat = clearDateTimeFormat;\nexports.clearNumberFormat = clearNumberFormat;\nexports.compile = compile;\nexports.createCoreContext = createCoreContext;\nexports.createCoreError = createCoreError;\nexports.createMessageContext = createMessageContext;\nexports.datetime = datetime;\nexports.fallbackWithLocaleChain = fallbackWithLocaleChain;\nexports.fallbackWithSimple = fallbackWithSimple;\nexports.getAdditionalMeta = getAdditionalMeta;\nexports.getDevToolsHook = getDevToolsHook;\nexports.getFallbackContext = getFallbackContext;\nexports.getLocale = getLocale;\nexports.getWarnMessage = getWarnMessage;\nexports.handleMissing = handleMissing;\nexports.initI18nDevTools = initI18nDevTools;\nexports.isAlmostSameLocale = isAlmostSameLocale;\nexports.isImplicitFallback = isImplicitFallback;\nexports.isMessageAST = isMessageAST;\nexports.isMessageFunction = isMessageFunction;\nexports.isTranslateFallbackWarn = isTranslateFallbackWarn;\nexports.isTranslateMissingWarn = isTranslateMissingWarn;\nexports.number = number;\nexports.parse = parse;\nexports.parseDateTimeArgs = parseDateTimeArgs;\nexports.parseNumberArgs = parseNumberArgs;\nexports.parseTranslateArgs = parseTranslateArgs;\nexports.registerLocaleFallbacker = registerLocaleFallbacker;\nexports.registerMessageCompiler = registerMessageCompiler;\nexports.registerMessageResolver = registerMessageResolver;\nexports.resolveLocale = resolveLocale;\nexports.resolveValue = resolveValue;\nexports.resolveWithKeyValue = resolveWithKeyValue;\nexports.setAdditionalMeta = setAdditionalMeta;\nexports.setDevToolsHook = setDevToolsHook;\nexports.setFallbackContext = setFallbackContext;\nexports.translate = translate;\nexports.translateDevTools = translateDevTools;\nexports.updateFallbackLocale = updateFallbackLocale;\n","/*!\n * message-compiler v11.1.2\n * (c) 2025 kazuya kawaguchi\n * Released under the MIT License.\n */\n'use strict';\n\nvar shared = require('@intlify/shared');\nvar sourceMapJs = require('source-map-js');\n\nconst LOCATION_STUB = {\n start: { line: 1, column: 1, offset: 0 },\n end: { line: 1, column: 1, offset: 0 }\n};\nfunction createPosition(line, column, offset) {\n return { line, column, offset };\n}\nfunction createLocation(start, end, source) {\n const loc = { start, end };\n if (source != null) {\n loc.source = source;\n }\n return loc;\n}\n\nconst CompileErrorCodes = {\n // tokenizer error codes\n EXPECTED_TOKEN: 1,\n INVALID_TOKEN_IN_PLACEHOLDER: 2,\n UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3,\n UNKNOWN_ESCAPE_SEQUENCE: 4,\n INVALID_UNICODE_ESCAPE_SEQUENCE: 5,\n UNBALANCED_CLOSING_BRACE: 6,\n UNTERMINATED_CLOSING_BRACE: 7,\n EMPTY_PLACEHOLDER: 8,\n NOT_ALLOW_NEST_PLACEHOLDER: 9,\n INVALID_LINKED_FORMAT: 10,\n // parser error codes\n MUST_HAVE_MESSAGES_IN_PLURAL: 11,\n UNEXPECTED_EMPTY_LINKED_MODIFIER: 12,\n UNEXPECTED_EMPTY_LINKED_KEY: 13,\n UNEXPECTED_LEXICAL_ANALYSIS: 14,\n // generator error codes\n UNHANDLED_CODEGEN_NODE_TYPE: 15,\n // minifier error codes\n UNHANDLED_MINIFIER_NODE_TYPE: 16\n};\n// Special value for higher-order compilers to pick up the last code\n// to avoid collision of error codes.\n// This should always be kept as the last item.\nconst COMPILE_ERROR_CODES_EXTEND_POINT = 17;\n/** @internal */\nconst errorMessages = {\n // tokenizer error messages\n [CompileErrorCodes.EXPECTED_TOKEN]: `Expected token: '{0}'`,\n [CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER]: `Invalid token in placeholder: '{0}'`,\n [CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]: `Unterminated single quote in placeholder`,\n [CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE]: `Unknown escape sequence: \\\\{0}`,\n [CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE]: `Invalid unicode escape sequence: {0}`,\n [CompileErrorCodes.UNBALANCED_CLOSING_BRACE]: `Unbalanced closing brace`,\n [CompileErrorCodes.UNTERMINATED_CLOSING_BRACE]: `Unterminated closing brace`,\n [CompileErrorCodes.EMPTY_PLACEHOLDER]: `Empty placeholder`,\n [CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER]: `Not allowed nest placeholder`,\n [CompileErrorCodes.INVALID_LINKED_FORMAT]: `Invalid linked format`,\n // parser error messages\n [CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL]: `Plural must have messages`,\n [CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER]: `Unexpected empty linked modifier`,\n [CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY]: `Unexpected empty linked key`,\n [CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS]: `Unexpected lexical analysis in token: '{0}'`,\n // generator error messages\n [CompileErrorCodes.UNHANDLED_CODEGEN_NODE_TYPE]: `unhandled codegen node type: '{0}'`,\n // minimizer error messages\n [CompileErrorCodes.UNHANDLED_MINIFIER_NODE_TYPE]: `unhandled mimifier node type: '{0}'`\n};\nfunction createCompileError(code, loc, options = {}) {\n const { domain, messages, args } = options;\n const msg = shared.format((messages || errorMessages)[code] || '', ...(args || []))\n ;\n const error = new SyntaxError(String(msg));\n error.code = code;\n if (loc) {\n error.location = loc;\n }\n error.domain = domain;\n return error;\n}\n/** @internal */\nfunction defaultOnError(error) {\n throw error;\n}\n\n// eslint-disable-next-line no-useless-escape\nconst RE_HTML_TAG = /<\\/?[\\w\\s=\"/.':;#-\\/]+>/;\nconst detectHtmlTag = (source) => RE_HTML_TAG.test(source);\n\nconst CHAR_SP = ' ';\nconst CHAR_CR = '\\r';\nconst CHAR_LF = '\\n';\nconst CHAR_LS = String.fromCharCode(0x2028);\nconst CHAR_PS = String.fromCharCode(0x2029);\nfunction createScanner(str) {\n const _buf = str;\n let _index = 0;\n let _line = 1;\n let _column = 1;\n let _peekOffset = 0;\n const isCRLF = (index) => _buf[index] === CHAR_CR && _buf[index + 1] === CHAR_LF;\n const isLF = (index) => _buf[index] === CHAR_LF;\n const isPS = (index) => _buf[index] === CHAR_PS;\n const isLS = (index) => _buf[index] === CHAR_LS;\n const isLineEnd = (index) => isCRLF(index) || isLF(index) || isPS(index) || isLS(index);\n const index = () => _index;\n const line = () => _line;\n const column = () => _column;\n const peekOffset = () => _peekOffset;\n const charAt = (offset) => isCRLF(offset) || isPS(offset) || isLS(offset) ? CHAR_LF : _buf[offset];\n const currentChar = () => charAt(_index);\n const currentPeek = () => charAt(_index + _peekOffset);\n function next() {\n _peekOffset = 0;\n if (isLineEnd(_index)) {\n _line++;\n _column = 0;\n }\n if (isCRLF(_index)) {\n _index++;\n }\n _index++;\n _column++;\n return _buf[_index];\n }\n function peek() {\n if (isCRLF(_index + _peekOffset)) {\n _peekOffset++;\n }\n _peekOffset++;\n return _buf[_index + _peekOffset];\n }\n function reset() {\n _index = 0;\n _line = 1;\n _column = 1;\n _peekOffset = 0;\n }\n function resetPeek(offset = 0) {\n _peekOffset = offset;\n }\n function skipToPeek() {\n const target = _index + _peekOffset;\n while (target !== _index) {\n next();\n }\n _peekOffset = 0;\n }\n return {\n index,\n line,\n column,\n peekOffset,\n charAt,\n currentChar,\n currentPeek,\n next,\n peek,\n reset,\n resetPeek,\n skipToPeek\n };\n}\n\nconst EOF = undefined;\nconst DOT = '.';\nconst LITERAL_DELIMITER = \"'\";\nconst ERROR_DOMAIN$3 = 'tokenizer';\nfunction createTokenizer(source, options = {}) {\n const location = options.location !== false;\n const _scnr = createScanner(source);\n const currentOffset = () => _scnr.index();\n const currentPosition = () => createPosition(_scnr.line(), _scnr.column(), _scnr.index());\n const _initLoc = currentPosition();\n const _initOffset = currentOffset();\n const _context = {\n currentType: 13 /* TokenTypes.EOF */,\n offset: _initOffset,\n startLoc: _initLoc,\n endLoc: _initLoc,\n lastType: 13 /* TokenTypes.EOF */,\n lastOffset: _initOffset,\n lastStartLoc: _initLoc,\n lastEndLoc: _initLoc,\n braceNest: 0,\n inLinked: false,\n text: ''\n };\n const context = () => _context;\n const { onError } = options;\n function emitError(code, pos, offset, ...args) {\n const ctx = context();\n pos.column += offset;\n pos.offset += offset;\n if (onError) {\n const loc = location ? createLocation(ctx.startLoc, pos) : null;\n const err = createCompileError(code, loc, {\n domain: ERROR_DOMAIN$3,\n args\n });\n onError(err);\n }\n }\n function getToken(context, type, value) {\n context.endLoc = currentPosition();\n context.currentType = type;\n const token = { type };\n if (location) {\n token.loc = createLocation(context.startLoc, context.endLoc);\n }\n if (value != null) {\n token.value = value;\n }\n return token;\n }\n const getEndToken = (context) => getToken(context, 13 /* TokenTypes.EOF */);\n function eat(scnr, ch) {\n if (scnr.currentChar() === ch) {\n scnr.next();\n return ch;\n }\n else {\n emitError(CompileErrorCodes.EXPECTED_TOKEN, currentPosition(), 0, ch);\n return '';\n }\n }\n function peekSpaces(scnr) {\n let buf = '';\n while (scnr.currentPeek() === CHAR_SP || scnr.currentPeek() === CHAR_LF) {\n buf += scnr.currentPeek();\n scnr.peek();\n }\n return buf;\n }\n function skipSpaces(scnr) {\n const buf = peekSpaces(scnr);\n scnr.skipToPeek();\n return buf;\n }\n function isIdentifierStart(ch) {\n if (ch === EOF) {\n return false;\n }\n const cc = ch.charCodeAt(0);\n return ((cc >= 97 && cc <= 122) || // a-z\n (cc >= 65 && cc <= 90) || // A-Z\n cc === 95 // _\n );\n }\n function isNumberStart(ch) {\n if (ch === EOF) {\n return false;\n }\n const cc = ch.charCodeAt(0);\n return cc >= 48 && cc <= 57; // 0-9\n }\n function isNamedIdentifierStart(scnr, context) {\n const { currentType } = context;\n if (currentType !== 2 /* TokenTypes.BraceLeft */) {\n return false;\n }\n peekSpaces(scnr);\n const ret = isIdentifierStart(scnr.currentPeek());\n scnr.resetPeek();\n return ret;\n }\n function isListIdentifierStart(scnr, context) {\n const { currentType } = context;\n if (currentType !== 2 /* TokenTypes.BraceLeft */) {\n return false;\n }\n peekSpaces(scnr);\n const ch = scnr.currentPeek() === '-' ? scnr.peek() : scnr.currentPeek();\n const ret = isNumberStart(ch);\n scnr.resetPeek();\n return ret;\n }\n function isLiteralStart(scnr, context) {\n const { currentType } = context;\n if (currentType !== 2 /* TokenTypes.BraceLeft */) {\n return false;\n }\n peekSpaces(scnr);\n const ret = scnr.currentPeek() === LITERAL_DELIMITER;\n scnr.resetPeek();\n return ret;\n }\n function isLinkedDotStart(scnr, context) {\n const { currentType } = context;\n if (currentType !== 7 /* TokenTypes.LinkedAlias */) {\n return false;\n }\n peekSpaces(scnr);\n const ret = scnr.currentPeek() === \".\" /* TokenChars.LinkedDot */;\n scnr.resetPeek();\n return ret;\n }\n function isLinkedModifierStart(scnr, context) {\n const { currentType } = context;\n if (currentType !== 8 /* TokenTypes.LinkedDot */) {\n return false;\n }\n peekSpaces(scnr);\n const ret = isIdentifierStart(scnr.currentPeek());\n scnr.resetPeek();\n return ret;\n }\n function isLinkedDelimiterStart(scnr, context) {\n const { currentType } = context;\n if (!(currentType === 7 /* TokenTypes.LinkedAlias */ ||\n currentType === 11 /* TokenTypes.LinkedModifier */)) {\n return false;\n }\n peekSpaces(scnr);\n const ret = scnr.currentPeek() === \":\" /* TokenChars.LinkedDelimiter */;\n scnr.resetPeek();\n return ret;\n }\n function isLinkedReferStart(scnr, context) {\n const { currentType } = context;\n if (currentType !== 9 /* TokenTypes.LinkedDelimiter */) {\n return false;\n }\n const fn = () => {\n const ch = scnr.currentPeek();\n if (ch === \"{\" /* TokenChars.BraceLeft */) {\n return isIdentifierStart(scnr.peek());\n }\n else if (ch === \"@\" /* TokenChars.LinkedAlias */ ||\n ch === \"|\" /* TokenChars.Pipe */ ||\n ch === \":\" /* TokenChars.LinkedDelimiter */ ||\n ch === \".\" /* TokenChars.LinkedDot */ ||\n ch === CHAR_SP ||\n !ch) {\n return false;\n }\n else if (ch === CHAR_LF) {\n scnr.peek();\n return fn();\n }\n else {\n // other characters\n return isTextStart(scnr, false);\n }\n };\n const ret = fn();\n scnr.resetPeek();\n return ret;\n }\n function isPluralStart(scnr) {\n peekSpaces(scnr);\n const ret = scnr.currentPeek() === \"|\" /* TokenChars.Pipe */;\n scnr.resetPeek();\n return ret;\n }\n function isTextStart(scnr, reset = true) {\n const fn = (hasSpace = false, prev = '') => {\n const ch = scnr.currentPeek();\n if (ch === \"{\" /* TokenChars.BraceLeft */) {\n return hasSpace;\n }\n else if (ch === \"@\" /* TokenChars.LinkedAlias */ || !ch) {\n return hasSpace;\n }\n else if (ch === \"|\" /* TokenChars.Pipe */) {\n return !(prev === CHAR_SP || prev === CHAR_LF);\n }\n else if (ch === CHAR_SP) {\n scnr.peek();\n return fn(true, CHAR_SP);\n }\n else if (ch === CHAR_LF) {\n scnr.peek();\n return fn(true, CHAR_LF);\n }\n else {\n return true;\n }\n };\n const ret = fn();\n reset && scnr.resetPeek();\n return ret;\n }\n function takeChar(scnr, fn) {\n const ch = scnr.currentChar();\n if (ch === EOF) {\n return EOF;\n }\n if (fn(ch)) {\n scnr.next();\n return ch;\n }\n return null;\n }\n function isIdentifier(ch) {\n const cc = ch.charCodeAt(0);\n return ((cc >= 97 && cc <= 122) || // a-z\n (cc >= 65 && cc <= 90) || // A-Z\n (cc >= 48 && cc <= 57) || // 0-9\n cc === 95 || // _\n cc === 36 // $\n );\n }\n function takeIdentifierChar(scnr) {\n return takeChar(scnr, isIdentifier);\n }\n function isNamedIdentifier(ch) {\n const cc = ch.charCodeAt(0);\n return ((cc >= 97 && cc <= 122) || // a-z\n (cc >= 65 && cc <= 90) || // A-Z\n (cc >= 48 && cc <= 57) || // 0-9\n cc === 95 || // _\n cc === 36 || // $\n cc === 45 // -\n );\n }\n function takeNamedIdentifierChar(scnr) {\n return takeChar(scnr, isNamedIdentifier);\n }\n function isDigit(ch) {\n const cc = ch.charCodeAt(0);\n return cc >= 48 && cc <= 57; // 0-9\n }\n function takeDigit(scnr) {\n return takeChar(scnr, isDigit);\n }\n function isHexDigit(ch) {\n const cc = ch.charCodeAt(0);\n return ((cc >= 48 && cc <= 57) || // 0-9\n (cc >= 65 && cc <= 70) || // A-F\n (cc >= 97 && cc <= 102)); // a-f\n }\n function takeHexDigit(scnr) {\n return takeChar(scnr, isHexDigit);\n }\n function getDigits(scnr) {\n let ch = '';\n let num = '';\n while ((ch = takeDigit(scnr))) {\n num += ch;\n }\n return num;\n }\n function readText(scnr) {\n let buf = '';\n while (true) {\n const ch = scnr.currentChar();\n if (ch === \"{\" /* TokenChars.BraceLeft */ ||\n ch === \"}\" /* TokenChars.BraceRight */ ||\n ch === \"@\" /* TokenChars.LinkedAlias */ ||\n ch === \"|\" /* TokenChars.Pipe */ ||\n !ch) {\n break;\n }\n else if (ch === CHAR_SP || ch === CHAR_LF) {\n if (isTextStart(scnr)) {\n buf += ch;\n scnr.next();\n }\n else if (isPluralStart(scnr)) {\n break;\n }\n else {\n buf += ch;\n scnr.next();\n }\n }\n else {\n buf += ch;\n scnr.next();\n }\n }\n return buf;\n }\n function readNamedIdentifier(scnr) {\n skipSpaces(scnr);\n let ch = '';\n let name = '';\n while ((ch = takeNamedIdentifierChar(scnr))) {\n name += ch;\n }\n if (scnr.currentChar() === EOF) {\n emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);\n }\n return name;\n }\n function readListIdentifier(scnr) {\n skipSpaces(scnr);\n let value = '';\n if (scnr.currentChar() === '-') {\n scnr.next();\n value += `-${getDigits(scnr)}`;\n }\n else {\n value += getDigits(scnr);\n }\n if (scnr.currentChar() === EOF) {\n emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);\n }\n return value;\n }\n function isLiteral(ch) {\n return ch !== LITERAL_DELIMITER && ch !== CHAR_LF;\n }\n function readLiteral(scnr) {\n skipSpaces(scnr);\n // eslint-disable-next-line no-useless-escape\n eat(scnr, `\\'`);\n let ch = '';\n let literal = '';\n while ((ch = takeChar(scnr, isLiteral))) {\n if (ch === '\\\\') {\n literal += readEscapeSequence(scnr);\n }\n else {\n literal += ch;\n }\n }\n const current = scnr.currentChar();\n if (current === CHAR_LF || current === EOF) {\n emitError(CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, currentPosition(), 0);\n // TODO: Is it correct really?\n if (current === CHAR_LF) {\n scnr.next();\n // eslint-disable-next-line no-useless-escape\n eat(scnr, `\\'`);\n }\n return literal;\n }\n // eslint-disable-next-line no-useless-escape\n eat(scnr, `\\'`);\n return literal;\n }\n function readEscapeSequence(scnr) {\n const ch = scnr.currentChar();\n switch (ch) {\n case '\\\\':\n case `\\'`: // eslint-disable-line no-useless-escape\n scnr.next();\n return `\\\\${ch}`;\n case 'u':\n return readUnicodeEscapeSequence(scnr, ch, 4);\n case 'U':\n return readUnicodeEscapeSequence(scnr, ch, 6);\n default:\n emitError(CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE, currentPosition(), 0, ch);\n return '';\n }\n }\n function readUnicodeEscapeSequence(scnr, unicode, digits) {\n eat(scnr, unicode);\n let sequence = '';\n for (let i = 0; i < digits; i++) {\n const ch = takeHexDigit(scnr);\n if (!ch) {\n emitError(CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE, currentPosition(), 0, `\\\\${unicode}${sequence}${scnr.currentChar()}`);\n break;\n }\n sequence += ch;\n }\n return `\\\\${unicode}${sequence}`;\n }\n function isInvalidIdentifier(ch) {\n return (ch !== \"{\" /* TokenChars.BraceLeft */ &&\n ch !== \"}\" /* TokenChars.BraceRight */ &&\n ch !== CHAR_SP &&\n ch !== CHAR_LF);\n }\n function readInvalidIdentifier(scnr) {\n skipSpaces(scnr);\n let ch = '';\n let identifiers = '';\n while ((ch = takeChar(scnr, isInvalidIdentifier))) {\n identifiers += ch;\n }\n return identifiers;\n }\n function readLinkedModifier(scnr) {\n let ch = '';\n let name = '';\n while ((ch = takeIdentifierChar(scnr))) {\n name += ch;\n }\n return name;\n }\n function readLinkedRefer(scnr) {\n const fn = (buf) => {\n const ch = scnr.currentChar();\n if (ch === \"{\" /* TokenChars.BraceLeft */ ||\n ch === \"@\" /* TokenChars.LinkedAlias */ ||\n ch === \"|\" /* TokenChars.Pipe */ ||\n ch === \"(\" /* TokenChars.ParenLeft */ ||\n ch === \")\" /* TokenChars.ParenRight */ ||\n !ch) {\n return buf;\n }\n else if (ch === CHAR_SP) {\n return buf;\n }\n else if (ch === CHAR_LF || ch === DOT) {\n buf += ch;\n scnr.next();\n return fn(buf);\n }\n else {\n buf += ch;\n scnr.next();\n return fn(buf);\n }\n };\n return fn('');\n }\n function readPlural(scnr) {\n skipSpaces(scnr);\n const plural = eat(scnr, \"|\" /* TokenChars.Pipe */);\n skipSpaces(scnr);\n return plural;\n }\n // TODO: We need refactoring of token parsing ...\n function readTokenInPlaceholder(scnr, context) {\n let token = null;\n const ch = scnr.currentChar();\n switch (ch) {\n case \"{\" /* TokenChars.BraceLeft */:\n if (context.braceNest >= 1) {\n emitError(CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER, currentPosition(), 0);\n }\n scnr.next();\n token = getToken(context, 2 /* TokenTypes.BraceLeft */, \"{\" /* TokenChars.BraceLeft */);\n skipSpaces(scnr);\n context.braceNest++;\n return token;\n case \"}\" /* TokenChars.BraceRight */:\n if (context.braceNest > 0 &&\n context.currentType === 2 /* TokenTypes.BraceLeft */) {\n emitError(CompileErrorCodes.EMPTY_PLACEHOLDER, currentPosition(), 0);\n }\n scnr.next();\n token = getToken(context, 3 /* TokenTypes.BraceRight */, \"}\" /* TokenChars.BraceRight */);\n context.braceNest--;\n context.braceNest > 0 && skipSpaces(scnr);\n if (context.inLinked && context.braceNest === 0) {\n context.inLinked = false;\n }\n return token;\n case \"@\" /* TokenChars.LinkedAlias */:\n if (context.braceNest > 0) {\n emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);\n }\n token = readTokenInLinked(scnr, context) || getEndToken(context);\n context.braceNest = 0;\n return token;\n default: {\n let validNamedIdentifier = true;\n let validListIdentifier = true;\n let validLiteral = true;\n if (isPluralStart(scnr)) {\n if (context.braceNest > 0) {\n emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);\n }\n token = getToken(context, 1 /* TokenTypes.Pipe */, readPlural(scnr));\n // reset\n context.braceNest = 0;\n context.inLinked = false;\n return token;\n }\n if (context.braceNest > 0 &&\n (context.currentType === 4 /* TokenTypes.Named */ ||\n context.currentType === 5 /* TokenTypes.List */ ||\n context.currentType === 6 /* TokenTypes.Literal */)) {\n emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);\n context.braceNest = 0;\n return readToken(scnr, context);\n }\n if ((validNamedIdentifier = isNamedIdentifierStart(scnr, context))) {\n token = getToken(context, 4 /* TokenTypes.Named */, readNamedIdentifier(scnr));\n skipSpaces(scnr);\n return token;\n }\n if ((validListIdentifier = isListIdentifierStart(scnr, context))) {\n token = getToken(context, 5 /* TokenTypes.List */, readListIdentifier(scnr));\n skipSpaces(scnr);\n return token;\n }\n if ((validLiteral = isLiteralStart(scnr, context))) {\n token = getToken(context, 6 /* TokenTypes.Literal */, readLiteral(scnr));\n skipSpaces(scnr);\n return token;\n }\n if (!validNamedIdentifier && !validListIdentifier && !validLiteral) {\n // TODO: we should be re-designed invalid cases, when we will extend message syntax near the future ...\n token = getToken(context, 12 /* TokenTypes.InvalidPlace */, readInvalidIdentifier(scnr));\n emitError(CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER, currentPosition(), 0, token.value);\n skipSpaces(scnr);\n return token;\n }\n break;\n }\n }\n return token;\n }\n // TODO: We need refactoring of token parsing ...\n function readTokenInLinked(scnr, context) {\n const { currentType } = context;\n let token = null;\n const ch = scnr.currentChar();\n if ((currentType === 7 /* TokenTypes.LinkedAlias */ ||\n currentType === 8 /* TokenTypes.LinkedDot */ ||\n currentType === 11 /* TokenTypes.LinkedModifier */ ||\n currentType === 9 /* TokenTypes.LinkedDelimiter */) &&\n (ch === CHAR_LF || ch === CHAR_SP)) {\n emitError(CompileErrorCodes.INVALID_LINKED_FORMAT, currentPosition(), 0);\n }\n switch (ch) {\n case \"@\" /* TokenChars.LinkedAlias */:\n scnr.next();\n token = getToken(context, 7 /* TokenTypes.LinkedAlias */, \"@\" /* TokenChars.LinkedAlias */);\n context.inLinked = true;\n return token;\n case \".\" /* TokenChars.LinkedDot */:\n skipSpaces(scnr);\n scnr.next();\n return getToken(context, 8 /* TokenTypes.LinkedDot */, \".\" /* TokenChars.LinkedDot */);\n case \":\" /* TokenChars.LinkedDelimiter */:\n skipSpaces(scnr);\n scnr.next();\n return getToken(context, 9 /* TokenTypes.LinkedDelimiter */, \":\" /* TokenChars.LinkedDelimiter */);\n default:\n if (isPluralStart(scnr)) {\n token = getToken(context, 1 /* TokenTypes.Pipe */, readPlural(scnr));\n // reset\n context.braceNest = 0;\n context.inLinked = false;\n return token;\n }\n if (isLinkedDotStart(scnr, context) ||\n isLinkedDelimiterStart(scnr, context)) {\n skipSpaces(scnr);\n return readTokenInLinked(scnr, context);\n }\n if (isLinkedModifierStart(scnr, context)) {\n skipSpaces(scnr);\n return getToken(context, 11 /* TokenTypes.LinkedModifier */, readLinkedModifier(scnr));\n }\n if (isLinkedReferStart(scnr, context)) {\n skipSpaces(scnr);\n if (ch === \"{\" /* TokenChars.BraceLeft */) {\n // scan the placeholder\n return readTokenInPlaceholder(scnr, context) || token;\n }\n else {\n return getToken(context, 10 /* TokenTypes.LinkedKey */, readLinkedRefer(scnr));\n }\n }\n if (currentType === 7 /* TokenTypes.LinkedAlias */) {\n emitError(CompileErrorCodes.INVALID_LINKED_FORMAT, currentPosition(), 0);\n }\n context.braceNest = 0;\n context.inLinked = false;\n return readToken(scnr, context);\n }\n }\n // TODO: We need refactoring of token parsing ...\n function readToken(scnr, context) {\n let token = { type: 13 /* TokenTypes.EOF */ };\n if (context.braceNest > 0) {\n return readTokenInPlaceholder(scnr, context) || getEndToken(context);\n }\n if (context.inLinked) {\n return readTokenInLinked(scnr, context) || getEndToken(context);\n }\n const ch = scnr.currentChar();\n switch (ch) {\n case \"{\" /* TokenChars.BraceLeft */:\n return readTokenInPlaceholder(scnr, context) || getEndToken(context);\n case \"}\" /* TokenChars.BraceRight */:\n emitError(CompileErrorCodes.UNBALANCED_CLOSING_BRACE, currentPosition(), 0);\n scnr.next();\n return getToken(context, 3 /* TokenTypes.BraceRight */, \"}\" /* TokenChars.BraceRight */);\n case \"@\" /* TokenChars.LinkedAlias */:\n return readTokenInLinked(scnr, context) || getEndToken(context);\n default: {\n if (isPluralStart(scnr)) {\n token = getToken(context, 1 /* TokenTypes.Pipe */, readPlural(scnr));\n // reset\n context.braceNest = 0;\n context.inLinked = false;\n return token;\n }\n if (isTextStart(scnr)) {\n return getToken(context, 0 /* TokenTypes.Text */, readText(scnr));\n }\n break;\n }\n }\n return token;\n }\n function nextToken() {\n const { currentType, offset, startLoc, endLoc } = _context;\n _context.lastType = currentType;\n _context.lastOffset = offset;\n _context.lastStartLoc = startLoc;\n _context.lastEndLoc = endLoc;\n _context.offset = currentOffset();\n _context.startLoc = currentPosition();\n if (_scnr.currentChar() === EOF) {\n return getToken(_context, 13 /* TokenTypes.EOF */);\n }\n return readToken(_scnr, _context);\n }\n return {\n nextToken,\n currentOffset,\n currentPosition,\n context\n };\n}\n\nconst ERROR_DOMAIN$2 = 'parser';\n// Backslash backslash, backslash quote, uHHHH, UHHHHHH.\nconst KNOWN_ESCAPES = /(?:\\\\\\\\|\\\\'|\\\\u([0-9a-fA-F]{4})|\\\\U([0-9a-fA-F]{6}))/g;\nfunction fromEscapeSequence(match, codePoint4, codePoint6) {\n switch (match) {\n case `\\\\\\\\`:\n return `\\\\`;\n // eslint-disable-next-line no-useless-escape\n case `\\\\\\'`:\n // eslint-disable-next-line no-useless-escape\n return `\\'`;\n default: {\n const codePoint = parseInt(codePoint4 || codePoint6, 16);\n if (codePoint <= 0xd7ff || codePoint >= 0xe000) {\n return String.fromCodePoint(codePoint);\n }\n // invalid ...\n // Replace them with U+FFFD REPLACEMENT CHARACTER.\n return '�';\n }\n }\n}\nfunction createParser(options = {}) {\n const location = options.location !== false;\n const { onError } = options;\n function emitError(tokenzer, code, start, offset, ...args) {\n const end = tokenzer.currentPosition();\n end.offset += offset;\n end.column += offset;\n if (onError) {\n const loc = location ? createLocation(start, end) : null;\n const err = createCompileError(code, loc, {\n domain: ERROR_DOMAIN$2,\n args\n });\n onError(err);\n }\n }\n function startNode(type, offset, loc) {\n const node = { type };\n if (location) {\n node.start = offset;\n node.end = offset;\n node.loc = { start: loc, end: loc };\n }\n return node;\n }\n function endNode(node, offset, pos, type) {\n if (location) {\n node.end = offset;\n if (node.loc) {\n node.loc.end = pos;\n }\n }\n }\n function parseText(tokenizer, value) {\n const context = tokenizer.context();\n const node = startNode(3 /* NodeTypes.Text */, context.offset, context.startLoc);\n node.value = value;\n endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n return node;\n }\n function parseList(tokenizer, index) {\n const context = tokenizer.context();\n const { lastOffset: offset, lastStartLoc: loc } = context; // get brace left loc\n const node = startNode(5 /* NodeTypes.List */, offset, loc);\n node.index = parseInt(index, 10);\n tokenizer.nextToken(); // skip brach right\n endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n return node;\n }\n function parseNamed(tokenizer, key) {\n const context = tokenizer.context();\n const { lastOffset: offset, lastStartLoc: loc } = context; // get brace left loc\n const node = startNode(4 /* NodeTypes.Named */, offset, loc);\n node.key = key;\n tokenizer.nextToken(); // skip brach right\n endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n return node;\n }\n function parseLiteral(tokenizer, value) {\n const context = tokenizer.context();\n const { lastOffset: offset, lastStartLoc: loc } = context; // get brace left loc\n const node = startNode(9 /* NodeTypes.Literal */, offset, loc);\n node.value = value.replace(KNOWN_ESCAPES, fromEscapeSequence);\n tokenizer.nextToken(); // skip brach right\n endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n return node;\n }\n function parseLinkedModifier(tokenizer) {\n const token = tokenizer.nextToken();\n const context = tokenizer.context();\n const { lastOffset: offset, lastStartLoc: loc } = context; // get linked dot loc\n const node = startNode(8 /* NodeTypes.LinkedModifier */, offset, loc);\n if (token.type !== 11 /* TokenTypes.LinkedModifier */) {\n // empty modifier\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER, context.lastStartLoc, 0);\n node.value = '';\n endNode(node, offset, loc);\n return {\n nextConsumeToken: token,\n node\n };\n }\n // check token\n if (token.value == null) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n }\n node.value = token.value || '';\n endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n return {\n node\n };\n }\n function parseLinkedKey(tokenizer, value) {\n const context = tokenizer.context();\n const node = startNode(7 /* NodeTypes.LinkedKey */, context.offset, context.startLoc);\n node.value = value;\n endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n return node;\n }\n function parseLinked(tokenizer) {\n const context = tokenizer.context();\n const linkedNode = startNode(6 /* NodeTypes.Linked */, context.offset, context.startLoc);\n let token = tokenizer.nextToken();\n if (token.type === 8 /* TokenTypes.LinkedDot */) {\n const parsed = parseLinkedModifier(tokenizer);\n linkedNode.modifier = parsed.node;\n token = parsed.nextConsumeToken || tokenizer.nextToken();\n }\n // asset check token\n if (token.type !== 9 /* TokenTypes.LinkedDelimiter */) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n }\n token = tokenizer.nextToken();\n // skip brace left\n if (token.type === 2 /* TokenTypes.BraceLeft */) {\n token = tokenizer.nextToken();\n }\n switch (token.type) {\n case 10 /* TokenTypes.LinkedKey */:\n if (token.value == null) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n }\n linkedNode.key = parseLinkedKey(tokenizer, token.value || '');\n break;\n case 4 /* TokenTypes.Named */:\n if (token.value == null) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n }\n linkedNode.key = parseNamed(tokenizer, token.value || '');\n break;\n case 5 /* TokenTypes.List */:\n if (token.value == null) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n }\n linkedNode.key = parseList(tokenizer, token.value || '');\n break;\n case 6 /* TokenTypes.Literal */:\n if (token.value == null) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n }\n linkedNode.key = parseLiteral(tokenizer, token.value || '');\n break;\n default: {\n // empty key\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY, context.lastStartLoc, 0);\n const nextContext = tokenizer.context();\n const emptyLinkedKeyNode = startNode(7 /* NodeTypes.LinkedKey */, nextContext.offset, nextContext.startLoc);\n emptyLinkedKeyNode.value = '';\n endNode(emptyLinkedKeyNode, nextContext.offset, nextContext.startLoc);\n linkedNode.key = emptyLinkedKeyNode;\n endNode(linkedNode, nextContext.offset, nextContext.startLoc);\n return {\n nextConsumeToken: token,\n node: linkedNode\n };\n }\n }\n endNode(linkedNode, tokenizer.currentOffset(), tokenizer.currentPosition());\n return {\n node: linkedNode\n };\n }\n function parseMessage(tokenizer) {\n const context = tokenizer.context();\n const startOffset = context.currentType === 1 /* TokenTypes.Pipe */\n ? tokenizer.currentOffset()\n : context.offset;\n const startLoc = context.currentType === 1 /* TokenTypes.Pipe */\n ? context.endLoc\n : context.startLoc;\n const node = startNode(2 /* NodeTypes.Message */, startOffset, startLoc);\n node.items = [];\n let nextToken = null;\n do {\n const token = nextToken || tokenizer.nextToken();\n nextToken = null;\n switch (token.type) {\n case 0 /* TokenTypes.Text */:\n if (token.value == null) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n }\n node.items.push(parseText(tokenizer, token.value || ''));\n break;\n case 5 /* TokenTypes.List */:\n if (token.value == null) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n }\n node.items.push(parseList(tokenizer, token.value || ''));\n break;\n case 4 /* TokenTypes.Named */:\n if (token.value == null) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n }\n node.items.push(parseNamed(tokenizer, token.value || ''));\n break;\n case 6 /* TokenTypes.Literal */:\n if (token.value == null) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n }\n node.items.push(parseLiteral(tokenizer, token.value || ''));\n break;\n case 7 /* TokenTypes.LinkedAlias */: {\n const parsed = parseLinked(tokenizer);\n node.items.push(parsed.node);\n nextToken = parsed.nextConsumeToken || null;\n break;\n }\n }\n } while (context.currentType !== 13 /* TokenTypes.EOF */ &&\n context.currentType !== 1 /* TokenTypes.Pipe */);\n // adjust message node loc\n const endOffset = context.currentType === 1 /* TokenTypes.Pipe */\n ? context.lastOffset\n : tokenizer.currentOffset();\n const endLoc = context.currentType === 1 /* TokenTypes.Pipe */\n ? context.lastEndLoc\n : tokenizer.currentPosition();\n endNode(node, endOffset, endLoc);\n return node;\n }\n function parsePlural(tokenizer, offset, loc, msgNode) {\n const context = tokenizer.context();\n let hasEmptyMessage = msgNode.items.length === 0;\n const node = startNode(1 /* NodeTypes.Plural */, offset, loc);\n node.cases = [];\n node.cases.push(msgNode);\n do {\n const msg = parseMessage(tokenizer);\n if (!hasEmptyMessage) {\n hasEmptyMessage = msg.items.length === 0;\n }\n node.cases.push(msg);\n } while (context.currentType !== 13 /* TokenTypes.EOF */);\n if (hasEmptyMessage) {\n emitError(tokenizer, CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL, loc, 0);\n }\n endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n return node;\n }\n function parseResource(tokenizer) {\n const context = tokenizer.context();\n const { offset, startLoc } = context;\n const msgNode = parseMessage(tokenizer);\n if (context.currentType === 13 /* TokenTypes.EOF */) {\n return msgNode;\n }\n else {\n return parsePlural(tokenizer, offset, startLoc, msgNode);\n }\n }\n function parse(source) {\n const tokenizer = createTokenizer(source, shared.assign({}, options));\n const context = tokenizer.context();\n const node = startNode(0 /* NodeTypes.Resource */, context.offset, context.startLoc);\n if (location && node.loc) {\n node.loc.source = source;\n }\n node.body = parseResource(tokenizer);\n if (options.onCacheKey) {\n node.cacheKey = options.onCacheKey(source);\n }\n // assert whether achieved to EOF\n if (context.currentType !== 13 /* TokenTypes.EOF */) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, source[context.offset] || '');\n }\n endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n return node;\n }\n return { parse };\n}\nfunction getTokenCaption(token) {\n if (token.type === 13 /* TokenTypes.EOF */) {\n return 'EOF';\n }\n const name = (token.value || '').replace(/\\r?\\n/gu, '\\\\n');\n return name.length > 10 ? name.slice(0, 9) + '…' : name;\n}\n\nfunction createTransformer(ast, options = {} // eslint-disable-line\n) {\n const _context = {\n ast,\n helpers: new Set()\n };\n const context = () => _context;\n const helper = (name) => {\n _context.helpers.add(name);\n return name;\n };\n return { context, helper };\n}\nfunction traverseNodes(nodes, transformer) {\n for (let i = 0; i < nodes.length; i++) {\n traverseNode(nodes[i], transformer);\n }\n}\nfunction traverseNode(node, transformer) {\n // TODO: if we need pre-hook of transform, should be implemented to here\n switch (node.type) {\n case 1 /* NodeTypes.Plural */:\n traverseNodes(node.cases, transformer);\n transformer.helper(\"plural\" /* HelperNameMap.PLURAL */);\n break;\n case 2 /* NodeTypes.Message */:\n traverseNodes(node.items, transformer);\n break;\n case 6 /* NodeTypes.Linked */: {\n const linked = node;\n traverseNode(linked.key, transformer);\n transformer.helper(\"linked\" /* HelperNameMap.LINKED */);\n transformer.helper(\"type\" /* HelperNameMap.TYPE */);\n break;\n }\n case 5 /* NodeTypes.List */:\n transformer.helper(\"interpolate\" /* HelperNameMap.INTERPOLATE */);\n transformer.helper(\"list\" /* HelperNameMap.LIST */);\n break;\n case 4 /* NodeTypes.Named */:\n transformer.helper(\"interpolate\" /* HelperNameMap.INTERPOLATE */);\n transformer.helper(\"named\" /* HelperNameMap.NAMED */);\n break;\n }\n // TODO: if we need post-hook of transform, should be implemented to here\n}\n// transform AST\nfunction transform(ast, options = {} // eslint-disable-line\n) {\n const transformer = createTransformer(ast);\n transformer.helper(\"normalize\" /* HelperNameMap.NORMALIZE */);\n // traverse\n ast.body && traverseNode(ast.body, transformer);\n // set meta information\n const context = transformer.context();\n ast.helpers = Array.from(context.helpers);\n}\n\nfunction optimize(ast) {\n const body = ast.body;\n if (body.type === 2 /* NodeTypes.Message */) {\n optimizeMessageNode(body);\n }\n else {\n body.cases.forEach(c => optimizeMessageNode(c));\n }\n return ast;\n}\nfunction optimizeMessageNode(message) {\n if (message.items.length === 1) {\n const item = message.items[0];\n if (item.type === 3 /* NodeTypes.Text */ || item.type === 9 /* NodeTypes.Literal */) {\n message.static = item.value;\n delete item.value; // optimization for size\n }\n }\n else {\n const values = [];\n for (let i = 0; i < message.items.length; i++) {\n const item = message.items[i];\n if (!(item.type === 3 /* NodeTypes.Text */ || item.type === 9 /* NodeTypes.Literal */)) {\n break;\n }\n if (item.value == null) {\n break;\n }\n values.push(item.value);\n }\n if (values.length === message.items.length) {\n message.static = shared.join(values);\n for (let i = 0; i < message.items.length; i++) {\n const item = message.items[i];\n if (item.type === 3 /* NodeTypes.Text */ || item.type === 9 /* NodeTypes.Literal */) {\n delete item.value; // optimization for size\n }\n }\n }\n }\n}\n\nconst ERROR_DOMAIN$1 = 'minifier';\n/* eslint-disable @typescript-eslint/no-explicit-any */\nfunction minify(node) {\n node.t = node.type;\n switch (node.type) {\n case 0 /* NodeTypes.Resource */: {\n const resource = node;\n minify(resource.body);\n resource.b = resource.body;\n delete resource.body;\n break;\n }\n case 1 /* NodeTypes.Plural */: {\n const plural = node;\n const cases = plural.cases;\n for (let i = 0; i < cases.length; i++) {\n minify(cases[i]);\n }\n plural.c = cases;\n delete plural.cases;\n break;\n }\n case 2 /* NodeTypes.Message */: {\n const message = node;\n const items = message.items;\n for (let i = 0; i < items.length; i++) {\n minify(items[i]);\n }\n message.i = items;\n delete message.items;\n if (message.static) {\n message.s = message.static;\n delete message.static;\n }\n break;\n }\n case 3 /* NodeTypes.Text */:\n case 9 /* NodeTypes.Literal */:\n case 8 /* NodeTypes.LinkedModifier */:\n case 7 /* NodeTypes.LinkedKey */: {\n const valueNode = node;\n if (valueNode.value) {\n valueNode.v = valueNode.value;\n delete valueNode.value;\n }\n break;\n }\n case 6 /* NodeTypes.Linked */: {\n const linked = node;\n minify(linked.key);\n linked.k = linked.key;\n delete linked.key;\n if (linked.modifier) {\n minify(linked.modifier);\n linked.m = linked.modifier;\n delete linked.modifier;\n }\n break;\n }\n case 5 /* NodeTypes.List */: {\n const list = node;\n list.i = list.index;\n delete list.index;\n break;\n }\n case 4 /* NodeTypes.Named */: {\n const named = node;\n named.k = named.key;\n delete named.key;\n break;\n }\n default:\n {\n throw createCompileError(CompileErrorCodes.UNHANDLED_MINIFIER_NODE_TYPE, null, {\n domain: ERROR_DOMAIN$1,\n args: [node.type]\n });\n }\n }\n delete node.type;\n}\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\n// eslint-disable-next-line @typescript-eslint/triple-slash-reference\n/// <reference types=\"source-map-js\" />\nconst ERROR_DOMAIN = 'parser';\nfunction createCodeGenerator(ast, options) {\n const { sourceMap, filename, breakLineCode, needIndent: _needIndent } = options;\n const location = options.location !== false;\n const _context = {\n filename,\n code: '',\n column: 1,\n line: 1,\n offset: 0,\n map: undefined,\n breakLineCode,\n needIndent: _needIndent,\n indentLevel: 0\n };\n if (location && ast.loc) {\n _context.source = ast.loc.source;\n }\n const context = () => _context;\n function push(code, node) {\n _context.code += code;\n if (_context.map) {\n if (node && node.loc && node.loc !== LOCATION_STUB) {\n addMapping(node.loc.start, getMappingName(node));\n }\n advancePositionWithSource(_context, code);\n }\n }\n function _newline(n, withBreakLine = true) {\n const _breakLineCode = withBreakLine ? breakLineCode : '';\n push(_needIndent ? _breakLineCode + ` `.repeat(n) : _breakLineCode);\n }\n function indent(withNewLine = true) {\n const level = ++_context.indentLevel;\n withNewLine && _newline(level);\n }\n function deindent(withNewLine = true) {\n const level = --_context.indentLevel;\n withNewLine && _newline(level);\n }\n function newline() {\n _newline(_context.indentLevel);\n }\n const helper = (key) => `_${key}`;\n const needIndent = () => _context.needIndent;\n function addMapping(loc, name) {\n _context.map.addMapping({\n name,\n source: _context.filename,\n original: {\n line: loc.line,\n column: loc.column - 1\n },\n generated: {\n line: _context.line,\n column: _context.column - 1\n }\n });\n }\n if (location && sourceMap) {\n _context.map = new sourceMapJs.SourceMapGenerator();\n _context.map.setSourceContent(filename, _context.source);\n }\n return {\n context,\n push,\n indent,\n deindent,\n newline,\n helper,\n needIndent\n };\n}\nfunction generateLinkedNode(generator, node) {\n const { helper } = generator;\n generator.push(`${helper(\"linked\" /* HelperNameMap.LINKED */)}(`);\n generateNode(generator, node.key);\n if (node.modifier) {\n generator.push(`, `);\n generateNode(generator, node.modifier);\n generator.push(`, _type`);\n }\n else {\n generator.push(`, undefined, _type`);\n }\n generator.push(`)`);\n}\nfunction generateMessageNode(generator, node) {\n const { helper, needIndent } = generator;\n generator.push(`${helper(\"normalize\" /* HelperNameMap.NORMALIZE */)}([`);\n generator.indent(needIndent());\n const length = node.items.length;\n for (let i = 0; i < length; i++) {\n generateNode(generator, node.items[i]);\n if (i === length - 1) {\n break;\n }\n generator.push(', ');\n }\n generator.deindent(needIndent());\n generator.push('])');\n}\nfunction generatePluralNode(generator, node) {\n const { helper, needIndent } = generator;\n if (node.cases.length > 1) {\n generator.push(`${helper(\"plural\" /* HelperNameMap.PLURAL */)}([`);\n generator.indent(needIndent());\n const length = node.cases.length;\n for (let i = 0; i < length; i++) {\n generateNode(generator, node.cases[i]);\n if (i === length - 1) {\n break;\n }\n generator.push(', ');\n }\n generator.deindent(needIndent());\n generator.push(`])`);\n }\n}\nfunction generateResource(generator, node) {\n if (node.body) {\n generateNode(generator, node.body);\n }\n else {\n generator.push('null');\n }\n}\nfunction generateNode(generator, node) {\n const { helper } = generator;\n switch (node.type) {\n case 0 /* NodeTypes.Resource */:\n generateResource(generator, node);\n break;\n case 1 /* NodeTypes.Plural */:\n generatePluralNode(generator, node);\n break;\n case 2 /* NodeTypes.Message */:\n generateMessageNode(generator, node);\n break;\n case 6 /* NodeTypes.Linked */:\n generateLinkedNode(generator, node);\n break;\n case 8 /* NodeTypes.LinkedModifier */:\n generator.push(JSON.stringify(node.value), node);\n break;\n case 7 /* NodeTypes.LinkedKey */:\n generator.push(JSON.stringify(node.value), node);\n break;\n case 5 /* NodeTypes.List */:\n generator.push(`${helper(\"interpolate\" /* HelperNameMap.INTERPOLATE */)}(${helper(\"list\" /* HelperNameMap.LIST */)}(${node.index}))`, node);\n break;\n case 4 /* NodeTypes.Named */:\n generator.push(`${helper(\"interpolate\" /* HelperNameMap.INTERPOLATE */)}(${helper(\"named\" /* HelperNameMap.NAMED */)}(${JSON.stringify(node.key)}))`, node);\n break;\n case 9 /* NodeTypes.Literal */:\n generator.push(JSON.stringify(node.value), node);\n break;\n case 3 /* NodeTypes.Text */:\n generator.push(JSON.stringify(node.value), node);\n break;\n default:\n {\n throw createCompileError(CompileErrorCodes.UNHANDLED_CODEGEN_NODE_TYPE, null, {\n domain: ERROR_DOMAIN,\n args: [node.type]\n });\n }\n }\n}\n// generate code from AST\nconst generate = (ast, options = {}) => {\n const mode = shared.isString(options.mode) ? options.mode : 'normal';\n const filename = shared.isString(options.filename)\n ? options.filename\n : 'message.intl';\n const sourceMap = !!options.sourceMap;\n // prettier-ignore\n const breakLineCode = options.breakLineCode != null\n ? options.breakLineCode\n : mode === 'arrow'\n ? ';'\n : '\\n';\n const needIndent = options.needIndent ? options.needIndent : mode !== 'arrow';\n const helpers = ast.helpers || [];\n const generator = createCodeGenerator(ast, {\n mode,\n filename,\n sourceMap,\n breakLineCode,\n needIndent\n });\n generator.push(mode === 'normal' ? `function __msg__ (ctx) {` : `(ctx) => {`);\n generator.indent(needIndent);\n if (helpers.length > 0) {\n generator.push(`const { ${shared.join(helpers.map(s => `${s}: _${s}`), ', ')} } = ctx`);\n generator.newline();\n }\n generator.push(`return `);\n generateNode(generator, ast);\n generator.deindent(needIndent);\n generator.push(`}`);\n delete ast.helpers;\n const { code, map } = generator.context();\n return {\n ast,\n code,\n map: map ? map.toJSON() : undefined // eslint-disable-line @typescript-eslint/no-explicit-any\n };\n};\nfunction getMappingName(node) {\n switch (node.type) {\n case 3 /* NodeTypes.Text */:\n case 9 /* NodeTypes.Literal */:\n case 8 /* NodeTypes.LinkedModifier */:\n case 7 /* NodeTypes.LinkedKey */:\n return node.value;\n case 5 /* NodeTypes.List */:\n return node.index.toString();\n case 4 /* NodeTypes.Named */:\n return node.key;\n default:\n return undefined;\n }\n}\nfunction advancePositionWithSource(pos, source, numberOfCharacters = source.length) {\n let linesCount = 0;\n let lastNewLinePos = -1;\n for (let i = 0; i < numberOfCharacters; i++) {\n if (source.charCodeAt(i) === 10 /* newline char code */) {\n linesCount++;\n lastNewLinePos = i;\n }\n }\n pos.offset += numberOfCharacters;\n pos.line += linesCount;\n pos.column =\n lastNewLinePos === -1\n ? pos.column + numberOfCharacters\n : numberOfCharacters - lastNewLinePos;\n return pos;\n}\n\nfunction baseCompile(source, options = {}) {\n const assignedOptions = shared.assign({}, options);\n const jit = !!assignedOptions.jit;\n const enalbeMinify = !!assignedOptions.minify;\n const enambeOptimize = assignedOptions.optimize == null ? true : assignedOptions.optimize;\n // parse source codes\n const parser = createParser(assignedOptions);\n const ast = parser.parse(source);\n if (!jit) {\n // transform ASTs\n transform(ast, assignedOptions);\n // generate javascript codes\n return generate(ast, assignedOptions);\n }\n else {\n // optimize ASTs\n enambeOptimize && optimize(ast);\n // minimize ASTs\n enalbeMinify && minify(ast);\n // In JIT mode, no ast transform, no code generation.\n return { ast, code: '' };\n }\n}\n\nexports.COMPILE_ERROR_CODES_EXTEND_POINT = COMPILE_ERROR_CODES_EXTEND_POINT;\nexports.CompileErrorCodes = CompileErrorCodes;\nexports.ERROR_DOMAIN = ERROR_DOMAIN$2;\nexports.LOCATION_STUB = LOCATION_STUB;\nexports.baseCompile = baseCompile;\nexports.createCompileError = createCompileError;\nexports.createLocation = createLocation;\nexports.createParser = createParser;\nexports.createPosition = createPosition;\nexports.defaultOnError = defaultOnError;\nexports.detectHtmlTag = detectHtmlTag;\nexports.errorMessages = errorMessages;\n","/*!\n * shared v11.1.2\n * (c) 2025 kazuya kawaguchi\n * Released under the MIT License.\n */\n'use strict';\n\n/**\n * Original Utilities\n * written by kazuya kawaguchi\n */\nconst inBrowser = typeof window !== 'undefined';\nexports.mark = void 0;\nexports.measure = void 0;\n{\n const perf = inBrowser && window.performance;\n if (perf &&\n perf.mark &&\n perf.measure &&\n perf.clearMarks &&\n // @ts-ignore browser compat\n perf.clearMeasures) {\n exports.mark = (tag) => {\n perf.mark(tag);\n };\n exports.measure = (name, startTag, endTag) => {\n perf.measure(name, startTag, endTag);\n perf.clearMarks(startTag);\n perf.clearMarks(endTag);\n };\n }\n}\nconst RE_ARGS = /\\{([0-9a-zA-Z]+)\\}/g;\n/* eslint-disable */\nfunction format(message, ...args) {\n if (args.length === 1 && isObject(args[0])) {\n args = args[0];\n }\n if (!args || !args.hasOwnProperty) {\n args = {};\n }\n return message.replace(RE_ARGS, (match, identifier) => {\n return args.hasOwnProperty(identifier) ? args[identifier] : '';\n });\n}\nconst makeSymbol = (name, shareable = false) => !shareable ? Symbol(name) : Symbol.for(name);\nconst generateFormatCacheKey = (locale, key, source) => friendlyJSONstringify({ l: locale, k: key, s: source });\nconst friendlyJSONstringify = (json) => JSON.stringify(json)\n .replace(/\\u2028/g, '\\\\u2028')\n .replace(/\\u2029/g, '\\\\u2029')\n .replace(/\\u0027/g, '\\\\u0027');\nconst isNumber = (val) => typeof val === 'number' && isFinite(val);\nconst isDate = (val) => toTypeString(val) === '[object Date]';\nconst isRegExp = (val) => toTypeString(val) === '[object RegExp]';\nconst isEmptyObject = (val) => isPlainObject(val) && Object.keys(val).length === 0;\nconst assign = Object.assign;\nconst _create = Object.create;\nconst create = (obj = null) => _create(obj);\nlet _globalThis;\nconst getGlobalThis = () => {\n // prettier-ignore\n return (_globalThis ||\n (_globalThis =\n typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : create()));\n};\nfunction escapeHtml(rawText) {\n return rawText\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/\"/g, '"')\n .replace(/'/g, ''');\n}\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction hasOwn(obj, key) {\n return hasOwnProperty.call(obj, key);\n}\n/* eslint-enable */\n/**\n * Useful Utilities By Evan you\n * Modified by kazuya kawaguchi\n * MIT License\n * https://github.com/vuejs/vue-next/blob/master/packages/shared/src/index.ts\n * https://github.com/vuejs/vue-next/blob/master/packages/shared/src/codeframe.ts\n */\nconst isArray = Array.isArray;\nconst isFunction = (val) => typeof val === 'function';\nconst isString = (val) => typeof val === 'string';\nconst isBoolean = (val) => typeof val === 'boolean';\nconst isSymbol = (val) => typeof val === 'symbol';\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst isObject = (val) => val !== null && typeof val === 'object';\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst isPromise = (val) => {\n return isObject(val) && isFunction(val.then) && isFunction(val.catch);\n};\nconst objectToString = Object.prototype.toString;\nconst toTypeString = (value) => objectToString.call(value);\nconst isPlainObject = (val) => toTypeString(val) === '[object Object]';\n// for converting list and named values to displayed strings.\nconst toDisplayString = (val) => {\n return val == null\n ? ''\n : isArray(val) || (isPlainObject(val) && val.toString === objectToString)\n ? JSON.stringify(val, null, 2)\n : String(val);\n};\nfunction join(items, separator = '') {\n return items.reduce((str, item, index) => (index === 0 ? str + item : str + separator + item), '');\n}\nconst RANGE = 2;\nfunction generateCodeFrame(source, start = 0, end = source.length) {\n const lines = source.split(/\\r?\\n/);\n let count = 0;\n const res = [];\n for (let i = 0; i < lines.length; i++) {\n count += lines[i].length + 1;\n if (count >= start) {\n for (let j = i - RANGE; j <= i + RANGE || end > count; j++) {\n if (j < 0 || j >= lines.length)\n continue;\n const line = j + 1;\n res.push(`${line}${' '.repeat(3 - String(line).length)}| ${lines[j]}`);\n const lineLength = lines[j].length;\n if (j === i) {\n // push underline\n const pad = start - (count - lineLength) + 1;\n const length = Math.max(1, end > count ? lineLength - pad : end - start);\n res.push(` | ` + ' '.repeat(pad) + '^'.repeat(length));\n }\n else if (j > i) {\n if (end > count) {\n const length = Math.max(Math.min(end - count, lineLength), 1);\n res.push(` | ` + '^'.repeat(length));\n }\n count += lineLength + 1;\n }\n }\n break;\n }\n }\n return res.join('\\n');\n}\n\nfunction warn(msg, err) {\n if (typeof console !== 'undefined') {\n console.warn(`[intlify] ` + msg);\n /* istanbul ignore if */\n if (err) {\n console.warn(err.stack);\n }\n }\n}\nconst hasWarned = {};\nfunction warnOnce(msg) {\n if (!hasWarned[msg]) {\n hasWarned[msg] = true;\n warn(msg);\n }\n}\n\n/**\n * Event emitter, forked from the below:\n * - original repository url: https://github.com/developit/mitt\n * - code url: https://github.com/developit/mitt/blob/master/src/index.ts\n * - author: Jason Miller (https://github.com/developit)\n * - license: MIT\n */\n/**\n * Create a event emitter\n *\n * @returns An event emitter\n */\nfunction createEmitter() {\n const events = new Map();\n const emitter = {\n events,\n on(event, handler) {\n const handlers = events.get(event);\n const added = handlers && handlers.push(handler);\n if (!added) {\n events.set(event, [handler]);\n }\n },\n off(event, handler) {\n const handlers = events.get(event);\n if (handlers) {\n handlers.splice(handlers.indexOf(handler) >>> 0, 1);\n }\n },\n emit(event, payload) {\n (events.get(event) || [])\n .slice()\n .map(handler => handler(payload));\n (events.get('*') || [])\n .slice()\n .map(handler => handler(event, payload));\n }\n };\n return emitter;\n}\n\nconst isNotObjectOrIsArray = (val) => !isObject(val) || isArray(val);\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction deepCopy(src, des) {\n // src and des should both be objects, and none of them can be a array\n if (isNotObjectOrIsArray(src) || isNotObjectOrIsArray(des)) {\n throw new Error('Invalid value');\n }\n const stack = [{ src, des }];\n while (stack.length) {\n const { src, des } = stack.pop();\n // using `Object.keys` which skips prototype properties\n Object.keys(src).forEach(key => {\n if (key === '__proto__') {\n return;\n }\n // if src[key] is an object/array, set des[key]\n // to empty object/array to prevent setting by reference\n if (isObject(src[key]) && !isObject(des[key])) {\n des[key] = Array.isArray(src[key]) ? [] : create();\n }\n if (isNotObjectOrIsArray(des[key]) || isNotObjectOrIsArray(src[key])) {\n // replace with src[key] when:\n // src[key] or des[key] is not an object, or\n // src[key] or des[key] is an array\n des[key] = src[key];\n }\n else {\n // src[key] and des[key] are both objects, merge them\n stack.push({ src: src[key], des: des[key] });\n }\n });\n }\n}\n\nexports.assign = assign;\nexports.create = create;\nexports.createEmitter = createEmitter;\nexports.deepCopy = deepCopy;\nexports.escapeHtml = escapeHtml;\nexports.format = format;\nexports.friendlyJSONstringify = friendlyJSONstringify;\nexports.generateCodeFrame = generateCodeFrame;\nexports.generateFormatCacheKey = generateFormatCacheKey;\nexports.getGlobalThis = getGlobalThis;\nexports.hasOwn = hasOwn;\nexports.inBrowser = inBrowser;\nexports.isArray = isArray;\nexports.isBoolean = isBoolean;\nexports.isDate = isDate;\nexports.isEmptyObject = isEmptyObject;\nexports.isFunction = isFunction;\nexports.isNumber = isNumber;\nexports.isObject = isObject;\nexports.isPlainObject = isPlainObject;\nexports.isPromise = isPromise;\nexports.isRegExp = isRegExp;\nexports.isString = isString;\nexports.isSymbol = isSymbol;\nexports.join = join;\nexports.makeSymbol = makeSymbol;\nexports.objectToString = objectToString;\nexports.toDisplayString = toDisplayString;\nexports.toTypeString = toTypeString;\nexports.warn = warn;\nexports.warnOnce = warnOnce;\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar has = Object.prototype.hasOwnProperty;\nvar hasNativeMap = typeof Map !== \"undefined\";\n\n/**\n * A data structure which is a combination of an array and a set. Adding a new\n * member is O(1), testing for membership is O(1), and finding the index of an\n * element is O(1). Removing elements from the set is not supported. Only\n * strings are supported for membership.\n */\nfunction ArraySet() {\n this._array = [];\n this._set = hasNativeMap ? new Map() : Object.create(null);\n}\n\n/**\n * Static method for creating ArraySet instances from an existing array.\n */\nArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n var set = new ArraySet();\n for (var i = 0, len = aArray.length; i < len; i++) {\n set.add(aArray[i], aAllowDuplicates);\n }\n return set;\n};\n\n/**\n * Return how many unique items are in this ArraySet. If duplicates have been\n * added, than those do not count towards the size.\n *\n * @returns Number\n */\nArraySet.prototype.size = function ArraySet_size() {\n return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n};\n\n/**\n * Add the given string to this set.\n *\n * @param String aStr\n */\nArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n var sStr = hasNativeMap ? aStr : util.toSetString(aStr);\n var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);\n var idx = this._array.length;\n if (!isDuplicate || aAllowDuplicates) {\n this._array.push(aStr);\n }\n if (!isDuplicate) {\n if (hasNativeMap) {\n this._set.set(aStr, idx);\n } else {\n this._set[sStr] = idx;\n }\n }\n};\n\n/**\n * Is the given string a member of this set?\n *\n * @param String aStr\n */\nArraySet.prototype.has = function ArraySet_has(aStr) {\n if (hasNativeMap) {\n return this._set.has(aStr);\n } else {\n var sStr = util.toSetString(aStr);\n return has.call(this._set, sStr);\n }\n};\n\n/**\n * What is the index of the given string in the array?\n *\n * @param String aStr\n */\nArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n if (hasNativeMap) {\n var idx = this._set.get(aStr);\n if (idx >= 0) {\n return idx;\n }\n } else {\n var sStr = util.toSetString(aStr);\n if (has.call(this._set, sStr)) {\n return this._set[sStr];\n }\n }\n\n throw new Error('\"' + aStr + '\" is not in the set.');\n};\n\n/**\n * What is the element at the given index?\n *\n * @param Number aIdx\n */\nArraySet.prototype.at = function ArraySet_at(aIdx) {\n if (aIdx >= 0 && aIdx < this._array.length) {\n return this._array[aIdx];\n }\n throw new Error('No element indexed by ' + aIdx);\n};\n\n/**\n * Returns the array representation of this set (which has the proper indices\n * indicated by indexOf). Note that this is a copy of the internal array used\n * for storing the members so that no one can mess with internal state.\n */\nArraySet.prototype.toArray = function ArraySet_toArray() {\n return this._array.slice();\n};\n\nexports.ArraySet = ArraySet;\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n *\n * Based on the Base 64 VLQ implementation in Closure Compiler:\n * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n *\n * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following\n * disclaimer in the documentation and/or other materials provided\n * with the distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nvar base64 = require('./base64');\n\n// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n// length quantities we use in the source map spec, the first bit is the sign,\n// the next four bits are the actual value, and the 6th bit is the\n// continuation bit. The continuation bit tells us whether there are more\n// digits in this value following this digit.\n//\n// Continuation\n// | Sign\n// | |\n// V V\n// 101011\n\nvar VLQ_BASE_SHIFT = 5;\n\n// binary: 100000\nvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\n// binary: 011111\nvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\n// binary: 100000\nvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\n/**\n * Converts from a two-complement value to a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n */\nfunction toVLQSigned(aValue) {\n return aValue < 0\n ? ((-aValue) << 1) + 1\n : (aValue << 1) + 0;\n}\n\n/**\n * Converts to a two-complement value from a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n */\nfunction fromVLQSigned(aValue) {\n var isNegative = (aValue & 1) === 1;\n var shifted = aValue >> 1;\n return isNegative\n ? -shifted\n : shifted;\n}\n\n/**\n * Returns the base 64 VLQ encoded value.\n */\nexports.encode = function base64VLQ_encode(aValue) {\n var encoded = \"\";\n var digit;\n\n var vlq = toVLQSigned(aValue);\n\n do {\n digit = vlq & VLQ_BASE_MASK;\n vlq >>>= VLQ_BASE_SHIFT;\n if (vlq > 0) {\n // There are still more digits in this value, so we must make sure the\n // continuation bit is marked.\n digit |= VLQ_CONTINUATION_BIT;\n }\n encoded += base64.encode(digit);\n } while (vlq > 0);\n\n return encoded;\n};\n\n/**\n * Decodes the next base 64 VLQ value from the given string and returns the\n * value and the rest of the string via the out parameter.\n */\nexports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n var strLen = aStr.length;\n var result = 0;\n var shift = 0;\n var continuation, digit;\n\n do {\n if (aIndex >= strLen) {\n throw new Error(\"Expected more digits in base 64 VLQ value.\");\n }\n\n digit = base64.decode(aStr.charCodeAt(aIndex++));\n if (digit === -1) {\n throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n }\n\n continuation = !!(digit & VLQ_CONTINUATION_BIT);\n digit &= VLQ_BASE_MASK;\n result = result + (digit << shift);\n shift += VLQ_BASE_SHIFT;\n } while (continuation);\n\n aOutParam.value = fromVLQSigned(result);\n aOutParam.rest = aIndex;\n};\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\n/**\n * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n */\nexports.encode = function (number) {\n if (0 <= number && number < intToCharMap.length) {\n return intToCharMap[number];\n }\n throw new TypeError(\"Must be between 0 and 63: \" + number);\n};\n\n/**\n * Decode a single base 64 character code digit to an integer. Returns -1 on\n * failure.\n */\nexports.decode = function (charCode) {\n var bigA = 65; // 'A'\n var bigZ = 90; // 'Z'\n\n var littleA = 97; // 'a'\n var littleZ = 122; // 'z'\n\n var zero = 48; // '0'\n var nine = 57; // '9'\n\n var plus = 43; // '+'\n var slash = 47; // '/'\n\n var littleOffset = 26;\n var numberOffset = 52;\n\n // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n if (bigA <= charCode && charCode <= bigZ) {\n return (charCode - bigA);\n }\n\n // 26 - 51: abcdefghijklmnopqrstuvwxyz\n if (littleA <= charCode && charCode <= littleZ) {\n return (charCode - littleA + littleOffset);\n }\n\n // 52 - 61: 0123456789\n if (zero <= charCode && charCode <= nine) {\n return (charCode - zero + numberOffset);\n }\n\n // 62: +\n if (charCode == plus) {\n return 62;\n }\n\n // 63: /\n if (charCode == slash) {\n return 63;\n }\n\n // Invalid base64 digit.\n return -1;\n};\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nexports.GREATEST_LOWER_BOUND = 1;\nexports.LEAST_UPPER_BOUND = 2;\n\n/**\n * Recursive implementation of binary search.\n *\n * @param aLow Indices here and lower do not contain the needle.\n * @param aHigh Indices here and higher do not contain the needle.\n * @param aNeedle The element being searched for.\n * @param aHaystack The non-empty array being searched.\n * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n */\nfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}\n\n/**\n * This is an implementation of binary search which will always try and return\n * the index of the closest element if there is no exact hit. This is because\n * mappings between original and generated line/col pairs are single points,\n * and there is an implicit region between each of them, so a miss just means\n * that you aren't on the very start of a region.\n *\n * @param aNeedle The element you are looking for.\n * @param aHaystack The array that is being searched.\n * @param aCompare A function which takes the needle and an element in the\n * array and returns -1, 0, or 1 depending on whether the needle is less\n * than, equal to, or greater than the element, respectively.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n */\nexports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n if (aHaystack.length === 0) {\n return -1;\n }\n\n var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n if (index < 0) {\n return -1;\n }\n\n // We have found either the exact element, or the next-closest element than\n // the one we are searching for. However, there may be more than one such\n // element. Make sure we always return the smallest of these.\n while (index - 1 >= 0) {\n if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n break;\n }\n --index;\n }\n\n return index;\n};\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2014 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\n\n/**\n * Determine whether mappingB is after mappingA with respect to generated\n * position.\n */\nfunction generatedPositionAfter(mappingA, mappingB) {\n // Optimized for most common case\n var lineA = mappingA.generatedLine;\n var lineB = mappingB.generatedLine;\n var columnA = mappingA.generatedColumn;\n var columnB = mappingB.generatedColumn;\n return lineB > lineA || lineB == lineA && columnB >= columnA ||\n util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n}\n\n/**\n * A data structure to provide a sorted view of accumulated mappings in a\n * performance conscious manner. It trades a neglibable overhead in general\n * case for a large speedup in case of mappings being added in order.\n */\nfunction MappingList() {\n this._array = [];\n this._sorted = true;\n // Serves as infimum\n this._last = {generatedLine: -1, generatedColumn: 0};\n}\n\n/**\n * Iterate through internal items. This method takes the same arguments that\n * `Array.prototype.forEach` takes.\n *\n * NOTE: The order of the mappings is NOT guaranteed.\n */\nMappingList.prototype.unsortedForEach =\n function MappingList_forEach(aCallback, aThisArg) {\n this._array.forEach(aCallback, aThisArg);\n };\n\n/**\n * Add the given source mapping.\n *\n * @param Object aMapping\n */\nMappingList.prototype.add = function MappingList_add(aMapping) {\n if (generatedPositionAfter(this._last, aMapping)) {\n this._last = aMapping;\n this._array.push(aMapping);\n } else {\n this._sorted = false;\n this._array.push(aMapping);\n }\n};\n\n/**\n * Returns the flat, sorted array of mappings. The mappings are sorted by\n * generated position.\n *\n * WARNING: This method returns internal data without copying, for\n * performance. The return value must NOT be mutated, and should be treated as\n * an immutable borrow. If you want to take ownership, you must make your own\n * copy.\n */\nMappingList.prototype.toArray = function MappingList_toArray() {\n if (!this._sorted) {\n this._array.sort(util.compareByGeneratedPositionsInflated);\n this._sorted = true;\n }\n return this._array;\n};\n\nexports.MappingList = MappingList;\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n// It turns out that some (most?) JavaScript engines don't self-host\n// `Array.prototype.sort`. This makes sense because C++ will likely remain\n// faster than JS when doing raw CPU-intensive sorting. However, when using a\n// custom comparator function, calling back and forth between the VM's C++ and\n// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n// worse generated code for the comparator function than would be optimal. In\n// fact, when sorting with a comparator, these costs outweigh the benefits of\n// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n// a ~3500ms mean speed-up in `bench/bench.html`.\n\nfunction SortTemplate(comparator) {\n\n/**\n * Swap the elements indexed by `x` and `y` in the array `ary`.\n *\n * @param {Array} ary\n * The array.\n * @param {Number} x\n * The index of the first item.\n * @param {Number} y\n * The index of the second item.\n */\nfunction swap(ary, x, y) {\n var temp = ary[x];\n ary[x] = ary[y];\n ary[y] = temp;\n}\n\n/**\n * Returns a random integer within the range `low .. high` inclusive.\n *\n * @param {Number} low\n * The lower bound on the range.\n * @param {Number} high\n * The upper bound on the range.\n */\nfunction randomIntInRange(low, high) {\n return Math.round(low + (Math.random() * (high - low)));\n}\n\n/**\n * The Quick Sort algorithm.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n * @param {Number} p\n * Start index of the array\n * @param {Number} r\n * End index of the array\n */\nfunction doQuickSort(ary, comparator, p, r) {\n // If our lower bound is less than our upper bound, we (1) partition the\n // array into two pieces and (2) recurse on each half. If it is not, this is\n // the empty array and our base case.\n\n if (p < r) {\n // (1) Partitioning.\n //\n // The partitioning chooses a pivot between `p` and `r` and moves all\n // elements that are less than or equal to the pivot to the before it, and\n // all the elements that are greater than it after it. The effect is that\n // once partition is done, the pivot is in the exact place it will be when\n // the array is put in sorted order, and it will not need to be moved\n // again. This runs in O(n) time.\n\n // Always choose a random pivot so that an input array which is reverse\n // sorted does not cause O(n^2) running time.\n var pivotIndex = randomIntInRange(p, r);\n var i = p - 1;\n\n swap(ary, pivotIndex, r);\n var pivot = ary[r];\n\n // Immediately after `j` is incremented in this loop, the following hold\n // true:\n //\n // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n //\n // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n for (var j = p; j < r; j++) {\n if (comparator(ary[j], pivot, false) <= 0) {\n i += 1;\n swap(ary, i, j);\n }\n }\n\n swap(ary, i + 1, j);\n var q = i + 1;\n\n // (2) Recurse on each half.\n\n doQuickSort(ary, comparator, p, q - 1);\n doQuickSort(ary, comparator, q + 1, r);\n }\n}\n\n return doQuickSort;\n}\n\nfunction cloneSort(comparator) {\n let template = SortTemplate.toString();\n let templateFn = new Function(`return ${template}`)();\n return templateFn(comparator);\n}\n\n/**\n * Sort the given array in-place with the given comparator function.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n */\n\nlet sortCache = new WeakMap();\nexports.quickSort = function (ary, comparator, start = 0) {\n let doQuickSort = sortCache.get(comparator);\n if (doQuickSort === void 0) {\n doQuickSort = cloneSort(comparator);\n sortCache.set(comparator, doQuickSort);\n }\n doQuickSort(ary, comparator, start, ary.length - 1);\n};\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar binarySearch = require('./binary-search');\nvar ArraySet = require('./array-set').ArraySet;\nvar base64VLQ = require('./base64-vlq');\nvar quickSort = require('./quick-sort').quickSort;\n\nfunction SourceMapConsumer(aSourceMap, aSourceMapURL) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = util.parseSourceMapInput(aSourceMap);\n }\n\n return sourceMap.sections != null\n ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL)\n : new BasicSourceMapConsumer(sourceMap, aSourceMapURL);\n}\n\nSourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) {\n return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL);\n}\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nSourceMapConsumer.prototype._version = 3;\n\n// `__generatedMappings` and `__originalMappings` are arrays that hold the\n// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n// are lazily instantiated, accessed via the `_generatedMappings` and\n// `_originalMappings` getters respectively, and we only parse the mappings\n// and create these arrays once queried for a source location. We jump through\n// these hoops because there can be many thousands of mappings, and parsing\n// them is expensive, so we only want to do it if we must.\n//\n// Each object in the arrays is of the form:\n//\n// {\n// generatedLine: The line number in the generated code,\n// generatedColumn: The column number in the generated code,\n// source: The path to the original source file that generated this\n// chunk of code,\n// originalLine: The line number in the original source that\n// corresponds to this chunk of generated code,\n// originalColumn: The column number in the original source that\n// corresponds to this chunk of generated code,\n// name: The name of the original symbol which generated this chunk of\n// code.\n// }\n//\n// All properties except for `generatedLine` and `generatedColumn` can be\n// `null`.\n//\n// `_generatedMappings` is ordered by the generated positions.\n//\n// `_originalMappings` is ordered by the original positions.\n\nSourceMapConsumer.prototype.__generatedMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n configurable: true,\n enumerable: true,\n get: function () {\n if (!this.__generatedMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__generatedMappings;\n }\n});\n\nSourceMapConsumer.prototype.__originalMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n configurable: true,\n enumerable: true,\n get: function () {\n if (!this.__originalMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__originalMappings;\n }\n});\n\nSourceMapConsumer.prototype._charIsMappingSeparator =\n function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n var c = aStr.charAt(index);\n return c === \";\" || c === \",\";\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n throw new Error(\"Subclasses must implement _parseMappings\");\n };\n\nSourceMapConsumer.GENERATED_ORDER = 1;\nSourceMapConsumer.ORIGINAL_ORDER = 2;\n\nSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\nSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\n/**\n * Iterate over each mapping between an original source/line/column and a\n * generated line/column in this source map.\n *\n * @param Function aCallback\n * The function that is called with each mapping.\n * @param Object aContext\n * Optional. If specified, this object will be the value of `this` every\n * time that `aCallback` is called.\n * @param aOrder\n * Either `SourceMapConsumer.GENERATED_ORDER` or\n * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n * iterate over the mappings sorted by the generated file's line/column\n * order or the original's source/line/column order, respectively. Defaults to\n * `SourceMapConsumer.GENERATED_ORDER`.\n */\nSourceMapConsumer.prototype.eachMapping =\n function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n var context = aContext || null;\n var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\n var mappings;\n switch (order) {\n case SourceMapConsumer.GENERATED_ORDER:\n mappings = this._generatedMappings;\n break;\n case SourceMapConsumer.ORIGINAL_ORDER:\n mappings = this._originalMappings;\n break;\n default:\n throw new Error(\"Unknown order of iteration.\");\n }\n\n var sourceRoot = this.sourceRoot;\n var boundCallback = aCallback.bind(context);\n var names = this._names;\n var sources = this._sources;\n var sourceMapURL = this._sourceMapURL;\n\n for (var i = 0, n = mappings.length; i < n; i++) {\n var mapping = mappings[i];\n var source = mapping.source === null ? null : sources.at(mapping.source);\n if(source !== null) {\n source = util.computeSourceURL(sourceRoot, source, sourceMapURL);\n }\n boundCallback({\n source: source,\n generatedLine: mapping.generatedLine,\n generatedColumn: mapping.generatedColumn,\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: mapping.name === null ? null : names.at(mapping.name)\n });\n }\n };\n\n/**\n * Returns all generated line and column information for the original source,\n * line, and column provided. If no column is provided, returns all mappings\n * corresponding to a either the line we are searching for or the next\n * closest line that has any mappings. Otherwise, returns all mappings\n * corresponding to the given line and either the column we are searching for\n * or the next closest column that has any offsets.\n *\n * The only argument is an object with the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source. The line number is 1-based.\n * - column: Optional. the column number in the original source.\n * The column number is 0-based.\n *\n * and an array of objects is returned, each with the following properties:\n *\n * - line: The line number in the generated source, or null. The\n * line number is 1-based.\n * - column: The column number in the generated source, or null.\n * The column number is 0-based.\n */\nSourceMapConsumer.prototype.allGeneratedPositionsFor =\n function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n var line = util.getArg(aArgs, 'line');\n\n // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n // returns the index of the closest mapping less than the needle. By\n // setting needle.originalColumn to 0, we thus find the last mapping for\n // the given line, provided such a mapping exists.\n var needle = {\n source: util.getArg(aArgs, 'source'),\n originalLine: line,\n originalColumn: util.getArg(aArgs, 'column', 0)\n };\n\n needle.source = this._findSourceIndex(needle.source);\n if (needle.source < 0) {\n return [];\n }\n\n var mappings = [];\n\n var index = this._findMapping(needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n binarySearch.LEAST_UPPER_BOUND);\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (aArgs.column === undefined) {\n var originalLine = mapping.originalLine;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we found. Since\n // mappings are sorted, this is guaranteed to find all mappings for\n // the line we found.\n while (mapping && mapping.originalLine === originalLine) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n } else {\n var originalColumn = mapping.originalColumn;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we were searching for.\n // Since mappings are sorted, this is guaranteed to find all mappings for\n // the line we are searching for.\n while (mapping &&\n mapping.originalLine === line &&\n mapping.originalColumn == originalColumn) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n }\n }\n\n return mappings;\n };\n\nexports.SourceMapConsumer = SourceMapConsumer;\n\n/**\n * A BasicSourceMapConsumer instance represents a parsed source map which we can\n * query for information about the original file positions by giving it a file\n * position in the generated source.\n *\n * The first parameter is the raw source map (either as a JSON string, or\n * already parsed to an object). According to the spec, source maps have the\n * following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - sources: An array of URLs to the original source files.\n * - names: An array of identifiers which can be referrenced by individual mappings.\n * - sourceRoot: Optional. The URL root from which all sources are relative.\n * - sourcesContent: Optional. An array of contents of the original source files.\n * - mappings: A string of base64 VLQs which contain the actual mappings.\n * - file: Optional. The generated file this source map is associated with.\n *\n * Here is an example source map, taken from the source map spec[0]:\n *\n * {\n * version : 3,\n * file: \"out.js\",\n * sourceRoot : \"\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AA,AB;;ABCDE;\"\n * }\n *\n * The second parameter, if given, is a string whose value is the URL\n * at which the source map was found. This URL is used to compute the\n * sources array.\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n */\nfunction BasicSourceMapConsumer(aSourceMap, aSourceMapURL) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = util.parseSourceMapInput(aSourceMap);\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sources = util.getArg(sourceMap, 'sources');\n // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n // requires the array) to play nice here.\n var names = util.getArg(sourceMap, 'names', []);\n var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n var mappings = util.getArg(sourceMap, 'mappings');\n var file = util.getArg(sourceMap, 'file', null);\n\n // Once again, Sass deviates from the spec and supplies the version as a\n // string rather than a number, so we use loose equality checking here.\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n if (sourceRoot) {\n sourceRoot = util.normalize(sourceRoot);\n }\n\n sources = sources\n .map(String)\n // Some source maps produce relative source paths like \"./foo.js\" instead of\n // \"foo.js\". Normalize these first so that future comparisons will succeed.\n // See bugzil.la/1090768.\n .map(util.normalize)\n // Always ensure that absolute sources are internally stored relative to\n // the source root, if the source root is absolute. Not doing this would\n // be particularly problematic when the source root is a prefix of the\n // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n .map(function (source) {\n return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n ? util.relative(sourceRoot, source)\n : source;\n });\n\n // Pass `true` below to allow duplicate names and sources. While source maps\n // are intended to be compressed and deduplicated, the TypeScript compiler\n // sometimes generates source maps with duplicates in them. See Github issue\n // #72 and bugzil.la/889492.\n this._names = ArraySet.fromArray(names.map(String), true);\n this._sources = ArraySet.fromArray(sources, true);\n\n this._absoluteSources = this._sources.toArray().map(function (s) {\n return util.computeSourceURL(sourceRoot, s, aSourceMapURL);\n });\n\n this.sourceRoot = sourceRoot;\n this.sourcesContent = sourcesContent;\n this._mappings = mappings;\n this._sourceMapURL = aSourceMapURL;\n this.file = file;\n}\n\nBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\n/**\n * Utility function to find the index of a source. Returns -1 if not\n * found.\n */\nBasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) {\n var relativeSource = aSource;\n if (this.sourceRoot != null) {\n relativeSource = util.relative(this.sourceRoot, relativeSource);\n }\n\n if (this._sources.has(relativeSource)) {\n return this._sources.indexOf(relativeSource);\n }\n\n // Maybe aSource is an absolute URL as returned by |sources|. In\n // this case we can't simply undo the transform.\n var i;\n for (i = 0; i < this._absoluteSources.length; ++i) {\n if (this._absoluteSources[i] == aSource) {\n return i;\n }\n }\n\n return -1;\n};\n\n/**\n * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n *\n * @param SourceMapGenerator aSourceMap\n * The source map that will be consumed.\n * @param String aSourceMapURL\n * The URL at which the source map can be found (optional)\n * @returns BasicSourceMapConsumer\n */\nBasicSourceMapConsumer.fromSourceMap =\n function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) {\n var smc = Object.create(BasicSourceMapConsumer.prototype);\n\n var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n smc.sourceRoot = aSourceMap._sourceRoot;\n smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n smc.sourceRoot);\n smc.file = aSourceMap._file;\n smc._sourceMapURL = aSourceMapURL;\n smc._absoluteSources = smc._sources.toArray().map(function (s) {\n return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL);\n });\n\n // Because we are modifying the entries (by converting string sources and\n // names to indices into the sources and names ArraySets), we have to make\n // a copy of the entry or else bad things happen. Shared mutable state\n // strikes again! See github issue #191.\n\n var generatedMappings = aSourceMap._mappings.toArray().slice();\n var destGeneratedMappings = smc.__generatedMappings = [];\n var destOriginalMappings = smc.__originalMappings = [];\n\n for (var i = 0, length = generatedMappings.length; i < length; i++) {\n var srcMapping = generatedMappings[i];\n var destMapping = new Mapping;\n destMapping.generatedLine = srcMapping.generatedLine;\n destMapping.generatedColumn = srcMapping.generatedColumn;\n\n if (srcMapping.source) {\n destMapping.source = sources.indexOf(srcMapping.source);\n destMapping.originalLine = srcMapping.originalLine;\n destMapping.originalColumn = srcMapping.originalColumn;\n\n if (srcMapping.name) {\n destMapping.name = names.indexOf(srcMapping.name);\n }\n\n destOriginalMappings.push(destMapping);\n }\n\n destGeneratedMappings.push(destMapping);\n }\n\n quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\n return smc;\n };\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nBasicSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n get: function () {\n return this._absoluteSources.slice();\n }\n});\n\n/**\n * Provide the JIT with a nice shape / hidden class.\n */\nfunction Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\n\nconst compareGenerated = util.compareByGeneratedPositionsDeflatedNoLine;\nfunction sortGenerated(array, start) {\n let l = array.length;\n let n = array.length - start;\n if (n <= 1) {\n return;\n } else if (n == 2) {\n let a = array[start];\n let b = array[start + 1];\n if (compareGenerated(a, b) > 0) {\n array[start] = b;\n array[start + 1] = a;\n }\n } else if (n < 20) {\n for (let i = start; i < l; i++) {\n for (let j = i; j > start; j--) {\n let a = array[j - 1];\n let b = array[j];\n if (compareGenerated(a, b) <= 0) {\n break;\n }\n array[j - 1] = b;\n array[j] = a;\n }\n }\n } else {\n quickSort(array, compareGenerated, start);\n }\n}\nBasicSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n var generatedLine = 1;\n var previousGeneratedColumn = 0;\n var previousOriginalLine = 0;\n var previousOriginalColumn = 0;\n var previousSource = 0;\n var previousName = 0;\n var length = aStr.length;\n var index = 0;\n var cachedSegments = {};\n var temp = {};\n var originalMappings = [];\n var generatedMappings = [];\n var mapping, str, segment, end, value;\n\n let subarrayStart = 0;\n while (index < length) {\n if (aStr.charAt(index) === ';') {\n generatedLine++;\n index++;\n previousGeneratedColumn = 0;\n\n sortGenerated(generatedMappings, subarrayStart);\n subarrayStart = generatedMappings.length;\n }\n else if (aStr.charAt(index) === ',') {\n index++;\n }\n else {\n mapping = new Mapping();\n mapping.generatedLine = generatedLine;\n\n for (end = index; end < length; end++) {\n if (this._charIsMappingSeparator(aStr, end)) {\n break;\n }\n }\n str = aStr.slice(index, end);\n\n segment = [];\n while (index < end) {\n base64VLQ.decode(aStr, index, temp);\n value = temp.value;\n index = temp.rest;\n segment.push(value);\n }\n\n if (segment.length === 2) {\n throw new Error('Found a source, but no line and column');\n }\n\n if (segment.length === 3) {\n throw new Error('Found a source and line, but no column');\n }\n\n // Generated column.\n mapping.generatedColumn = previousGeneratedColumn + segment[0];\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (segment.length > 1) {\n // Original source.\n mapping.source = previousSource + segment[1];\n previousSource += segment[1];\n\n // Original line.\n mapping.originalLine = previousOriginalLine + segment[2];\n previousOriginalLine = mapping.originalLine;\n // Lines are stored 0-based\n mapping.originalLine += 1;\n\n // Original column.\n mapping.originalColumn = previousOriginalColumn + segment[3];\n previousOriginalColumn = mapping.originalColumn;\n\n if (segment.length > 4) {\n // Original name.\n mapping.name = previousName + segment[4];\n previousName += segment[4];\n }\n }\n\n generatedMappings.push(mapping);\n if (typeof mapping.originalLine === 'number') {\n let currentSource = mapping.source;\n while (originalMappings.length <= currentSource) {\n originalMappings.push(null);\n }\n if (originalMappings[currentSource] === null) {\n originalMappings[currentSource] = [];\n }\n originalMappings[currentSource].push(mapping);\n }\n }\n }\n\n sortGenerated(generatedMappings, subarrayStart);\n this.__generatedMappings = generatedMappings;\n\n for (var i = 0; i < originalMappings.length; i++) {\n if (originalMappings[i] != null) {\n quickSort(originalMappings[i], util.compareByOriginalPositionsNoSource);\n }\n }\n this.__originalMappings = [].concat(...originalMappings);\n };\n\n/**\n * Find the mapping that best matches the hypothetical \"needle\" mapping that\n * we are searching for in the given \"haystack\" of mappings.\n */\nBasicSourceMapConsumer.prototype._findMapping =\n function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n aColumnName, aComparator, aBias) {\n // To return the position we are searching for, we must first find the\n // mapping for the given position and then return the opposite position it\n // points to. Because the mappings are sorted, we can use binary search to\n // find the best mapping.\n\n if (aNeedle[aLineName] <= 0) {\n throw new TypeError('Line must be greater than or equal to 1, got '\n + aNeedle[aLineName]);\n }\n if (aNeedle[aColumnName] < 0) {\n throw new TypeError('Column must be greater than or equal to 0, got '\n + aNeedle[aColumnName]);\n }\n\n return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n };\n\n/**\n * Compute the last column for each generated mapping. The last column is\n * inclusive.\n */\nBasicSourceMapConsumer.prototype.computeColumnSpans =\n function SourceMapConsumer_computeColumnSpans() {\n for (var index = 0; index < this._generatedMappings.length; ++index) {\n var mapping = this._generatedMappings[index];\n\n // Mappings do not contain a field for the last generated columnt. We\n // can come up with an optimistic estimate, however, by assuming that\n // mappings are contiguous (i.e. given two consecutive mappings, the\n // first mapping ends where the second one starts).\n if (index + 1 < this._generatedMappings.length) {\n var nextMapping = this._generatedMappings[index + 1];\n\n if (mapping.generatedLine === nextMapping.generatedLine) {\n mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n continue;\n }\n }\n\n // The last mapping for each line spans the entire line.\n mapping.lastGeneratedColumn = Infinity;\n }\n };\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source. The line number\n * is 1-based.\n * - column: The column number in the generated source. The column\n * number is 0-based.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null. The\n * line number is 1-based.\n * - column: The column number in the original source, or null. The\n * column number is 0-based.\n * - name: The original identifier, or null.\n */\nBasicSourceMapConsumer.prototype.originalPositionFor =\n function SourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._generatedMappings,\n \"generatedLine\",\n \"generatedColumn\",\n util.compareByGeneratedPositionsDeflated,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._generatedMappings[index];\n\n if (mapping.generatedLine === needle.generatedLine) {\n var source = util.getArg(mapping, 'source', null);\n if (source !== null) {\n source = this._sources.at(source);\n source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL);\n }\n var name = util.getArg(mapping, 'name', null);\n if (name !== null) {\n name = this._names.at(name);\n }\n return {\n source: source,\n line: util.getArg(mapping, 'originalLine', null),\n column: util.getArg(mapping, 'originalColumn', null),\n name: name\n };\n }\n }\n\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n function BasicSourceMapConsumer_hasContentsOfAllSources() {\n if (!this.sourcesContent) {\n return false;\n }\n return this.sourcesContent.length >= this._sources.size() &&\n !this.sourcesContent.some(function (sc) { return sc == null; });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nBasicSourceMapConsumer.prototype.sourceContentFor =\n function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n if (!this.sourcesContent) {\n return null;\n }\n\n var index = this._findSourceIndex(aSource);\n if (index >= 0) {\n return this.sourcesContent[index];\n }\n\n var relativeSource = aSource;\n if (this.sourceRoot != null) {\n relativeSource = util.relative(this.sourceRoot, relativeSource);\n }\n\n var url;\n if (this.sourceRoot != null\n && (url = util.urlParse(this.sourceRoot))) {\n // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n // many users. We can help them out when they expect file:// URIs to\n // behave like it would if they were running a local HTTP server. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n var fileUriAbsPath = relativeSource.replace(/^file:\\/\\//, \"\");\n if (url.scheme == \"file\"\n && this._sources.has(fileUriAbsPath)) {\n return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n }\n\n if ((!url.path || url.path == \"/\")\n && this._sources.has(\"/\" + relativeSource)) {\n return this.sourcesContent[this._sources.indexOf(\"/\" + relativeSource)];\n }\n }\n\n // This function is used recursively from\n // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n // don't want to throw if we can't find the source - we just want to\n // return null, so we provide a flag to exit gracefully.\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + relativeSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source. The line number\n * is 1-based.\n * - column: The column number in the original source. The column\n * number is 0-based.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null. The\n * line number is 1-based.\n * - column: The column number in the generated source, or null.\n * The column number is 0-based.\n */\nBasicSourceMapConsumer.prototype.generatedPositionFor =\n function SourceMapConsumer_generatedPositionFor(aArgs) {\n var source = util.getArg(aArgs, 'source');\n source = this._findSourceIndex(source);\n if (source < 0) {\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n }\n\n var needle = {\n source: source,\n originalLine: util.getArg(aArgs, 'line'),\n originalColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (mapping.source === needle.source) {\n return {\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n };\n }\n }\n\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n };\n\nexports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\n/**\n * An IndexedSourceMapConsumer instance represents a parsed source map which\n * we can query for information. It differs from BasicSourceMapConsumer in\n * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n * input.\n *\n * The first parameter is a raw source map (either as a JSON string, or already\n * parsed to an object). According to the spec for indexed source maps, they\n * have the following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - file: Optional. The generated file this source map is associated with.\n * - sections: A list of section definitions.\n *\n * Each value under the \"sections\" field has two fields:\n * - offset: The offset into the original specified at which this section\n * begins to apply, defined as an object with a \"line\" and \"column\"\n * field.\n * - map: A source map definition. This source map could also be indexed,\n * but doesn't have to be.\n *\n * Instead of the \"map\" field, it's also possible to have a \"url\" field\n * specifying a URL to retrieve a source map from, but that's currently\n * unsupported.\n *\n * Here's an example source map, taken from the source map spec[0], but\n * modified to omit a section which uses the \"url\" field.\n *\n * {\n * version : 3,\n * file: \"app.js\",\n * sections: [{\n * offset: {line:100, column:10},\n * map: {\n * version : 3,\n * file: \"section.js\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AAAA,E;;ABCDE;\"\n * }\n * }],\n * }\n *\n * The second parameter, if given, is a string whose value is the URL\n * at which the source map was found. This URL is used to compute the\n * sources array.\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n */\nfunction IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = util.parseSourceMapInput(aSourceMap);\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sections = util.getArg(sourceMap, 'sections');\n\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n this._sources = new ArraySet();\n this._names = new ArraySet();\n\n var lastOffset = {\n line: -1,\n column: 0\n };\n this._sections = sections.map(function (s) {\n if (s.url) {\n // The url field will require support for asynchronicity.\n // See https://github.com/mozilla/source-map/issues/16\n throw new Error('Support for url field in sections not implemented.');\n }\n var offset = util.getArg(s, 'offset');\n var offsetLine = util.getArg(offset, 'line');\n var offsetColumn = util.getArg(offset, 'column');\n\n if (offsetLine < lastOffset.line ||\n (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n throw new Error('Section offsets must be ordered and non-overlapping.');\n }\n lastOffset = offset;\n\n return {\n generatedOffset: {\n // The offset fields are 0-based, but we use 1-based indices when\n // encoding/decoding from VLQ.\n generatedLine: offsetLine + 1,\n generatedColumn: offsetColumn + 1\n },\n consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL)\n }\n });\n}\n\nIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nIndexedSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n get: function () {\n var sources = [];\n for (var i = 0; i < this._sections.length; i++) {\n for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n sources.push(this._sections[i].consumer.sources[j]);\n }\n }\n return sources;\n }\n});\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source. The line number\n * is 1-based.\n * - column: The column number in the generated source. The column\n * number is 0-based.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null. The\n * line number is 1-based.\n * - column: The column number in the original source, or null. The\n * column number is 0-based.\n * - name: The original identifier, or null.\n */\nIndexedSourceMapConsumer.prototype.originalPositionFor =\n function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n // Find the section containing the generated position we're trying to map\n // to an original position.\n var sectionIndex = binarySearch.search(needle, this._sections,\n function(needle, section) {\n var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n if (cmp) {\n return cmp;\n }\n\n return (needle.generatedColumn -\n section.generatedOffset.generatedColumn);\n });\n var section = this._sections[sectionIndex];\n\n if (!section) {\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n }\n\n return section.consumer.originalPositionFor({\n line: needle.generatedLine -\n (section.generatedOffset.generatedLine - 1),\n column: needle.generatedColumn -\n (section.generatedOffset.generatedLine === needle.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n bias: aArgs.bias\n });\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n return this._sections.every(function (s) {\n return s.consumer.hasContentsOfAllSources();\n });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nIndexedSourceMapConsumer.prototype.sourceContentFor =\n function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n var content = section.consumer.sourceContentFor(aSource, true);\n if (content || content === '') {\n return content;\n }\n }\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source. The line number\n * is 1-based.\n * - column: The column number in the original source. The column\n * number is 0-based.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null. The\n * line number is 1-based. \n * - column: The column number in the generated source, or null.\n * The column number is 0-based.\n */\nIndexedSourceMapConsumer.prototype.generatedPositionFor =\n function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n // Only consider this section if the requested source is in the list of\n // sources of the consumer.\n if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) {\n continue;\n }\n var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n if (generatedPosition) {\n var ret = {\n line: generatedPosition.line +\n (section.generatedOffset.generatedLine - 1),\n column: generatedPosition.column +\n (section.generatedOffset.generatedLine === generatedPosition.line\n ? section.generatedOffset.generatedColumn - 1\n : 0)\n };\n return ret;\n }\n }\n\n return {\n line: null,\n column: null\n };\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nIndexedSourceMapConsumer.prototype._parseMappings =\n function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n this.__generatedMappings = [];\n this.__originalMappings = [];\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n var sectionMappings = section.consumer._generatedMappings;\n for (var j = 0; j < sectionMappings.length; j++) {\n var mapping = sectionMappings[j];\n\n var source = section.consumer._sources.at(mapping.source);\n if(source !== null) {\n source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL);\n }\n this._sources.add(source);\n source = this._sources.indexOf(source);\n\n var name = null;\n if (mapping.name) {\n name = section.consumer._names.at(mapping.name);\n this._names.add(name);\n name = this._names.indexOf(name);\n }\n\n // The mappings coming from the consumer for the section have\n // generated positions relative to the start of the section, so we\n // need to offset them to be relative to the start of the concatenated\n // generated file.\n var adjustedMapping = {\n source: source,\n generatedLine: mapping.generatedLine +\n (section.generatedOffset.generatedLine - 1),\n generatedColumn: mapping.generatedColumn +\n (section.generatedOffset.generatedLine === mapping.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: name\n };\n\n this.__generatedMappings.push(adjustedMapping);\n if (typeof adjustedMapping.originalLine === 'number') {\n this.__originalMappings.push(adjustedMapping);\n }\n }\n }\n\n quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n quickSort(this.__originalMappings, util.compareByOriginalPositions);\n };\n\nexports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar base64VLQ = require('./base64-vlq');\nvar util = require('./util');\nvar ArraySet = require('./array-set').ArraySet;\nvar MappingList = require('./mapping-list').MappingList;\n\n/**\n * An instance of the SourceMapGenerator represents a source map which is\n * being built incrementally. You may pass an object with the following\n * properties:\n *\n * - file: The filename of the generated source.\n * - sourceRoot: A root for all relative URLs in this source map.\n */\nfunction SourceMapGenerator(aArgs) {\n if (!aArgs) {\n aArgs = {};\n }\n this._file = util.getArg(aArgs, 'file', null);\n this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);\n this._skipValidation = util.getArg(aArgs, 'skipValidation', false);\n this._ignoreInvalidMapping = util.getArg(aArgs, 'ignoreInvalidMapping', false);\n this._sources = new ArraySet();\n this._names = new ArraySet();\n this._mappings = new MappingList();\n this._sourcesContents = null;\n}\n\nSourceMapGenerator.prototype._version = 3;\n\n/**\n * Creates a new SourceMapGenerator based on a SourceMapConsumer\n *\n * @param aSourceMapConsumer The SourceMap.\n */\nSourceMapGenerator.fromSourceMap =\n function SourceMapGenerator_fromSourceMap(aSourceMapConsumer, generatorOps) {\n var sourceRoot = aSourceMapConsumer.sourceRoot;\n var generator = new SourceMapGenerator(Object.assign(generatorOps || {}, {\n file: aSourceMapConsumer.file,\n sourceRoot: sourceRoot\n }));\n aSourceMapConsumer.eachMapping(function (mapping) {\n var newMapping = {\n generated: {\n line: mapping.generatedLine,\n column: mapping.generatedColumn\n }\n };\n\n if (mapping.source != null) {\n newMapping.source = mapping.source;\n if (sourceRoot != null) {\n newMapping.source = util.relative(sourceRoot, newMapping.source);\n }\n\n newMapping.original = {\n line: mapping.originalLine,\n column: mapping.originalColumn\n };\n\n if (mapping.name != null) {\n newMapping.name = mapping.name;\n }\n }\n\n generator.addMapping(newMapping);\n });\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var sourceRelative = sourceFile;\n if (sourceRoot !== null) {\n sourceRelative = util.relative(sourceRoot, sourceFile);\n }\n\n if (!generator._sources.has(sourceRelative)) {\n generator._sources.add(sourceRelative);\n }\n\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n generator.setSourceContent(sourceFile, content);\n }\n });\n return generator;\n };\n\n/**\n * Add a single mapping from original source line and column to the generated\n * source's line and column for this source map being created. The mapping\n * object should have the following properties:\n *\n * - generated: An object with the generated line and column positions.\n * - original: An object with the original line and column positions.\n * - source: The original source file (relative to the sourceRoot).\n * - name: An optional original token name for this mapping.\n */\nSourceMapGenerator.prototype.addMapping =\n function SourceMapGenerator_addMapping(aArgs) {\n var generated = util.getArg(aArgs, 'generated');\n var original = util.getArg(aArgs, 'original', null);\n var source = util.getArg(aArgs, 'source', null);\n var name = util.getArg(aArgs, 'name', null);\n\n if (!this._skipValidation) {\n if (this._validateMapping(generated, original, source, name) === false) {\n return;\n }\n }\n\n if (source != null) {\n source = String(source);\n if (!this._sources.has(source)) {\n this._sources.add(source);\n }\n }\n\n if (name != null) {\n name = String(name);\n if (!this._names.has(name)) {\n this._names.add(name);\n }\n }\n\n this._mappings.add({\n generatedLine: generated.line,\n generatedColumn: generated.column,\n originalLine: original != null && original.line,\n originalColumn: original != null && original.column,\n source: source,\n name: name\n });\n };\n\n/**\n * Set the source content for a source file.\n */\nSourceMapGenerator.prototype.setSourceContent =\n function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {\n var source = aSourceFile;\n if (this._sourceRoot != null) {\n source = util.relative(this._sourceRoot, source);\n }\n\n if (aSourceContent != null) {\n // Add the source content to the _sourcesContents map.\n // Create a new _sourcesContents map if the property is null.\n if (!this._sourcesContents) {\n this._sourcesContents = Object.create(null);\n }\n this._sourcesContents[util.toSetString(source)] = aSourceContent;\n } else if (this._sourcesContents) {\n // Remove the source file from the _sourcesContents map.\n // If the _sourcesContents map is empty, set the property to null.\n delete this._sourcesContents[util.toSetString(source)];\n if (Object.keys(this._sourcesContents).length === 0) {\n this._sourcesContents = null;\n }\n }\n };\n\n/**\n * Applies the mappings of a sub-source-map for a specific source file to the\n * source map being generated. Each mapping to the supplied source file is\n * rewritten using the supplied source map. Note: The resolution for the\n * resulting mappings is the minimium of this map and the supplied map.\n *\n * @param aSourceMapConsumer The source map to be applied.\n * @param aSourceFile Optional. The filename of the source file.\n * If omitted, SourceMapConsumer's file property will be used.\n * @param aSourceMapPath Optional. The dirname of the path to the source map\n * to be applied. If relative, it is relative to the SourceMapConsumer.\n * This parameter is needed when the two source maps aren't in the same\n * directory, and the source map to be applied contains relative source\n * paths. If so, those relative source paths need to be rewritten\n * relative to the SourceMapGenerator.\n */\nSourceMapGenerator.prototype.applySourceMap =\n function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {\n var sourceFile = aSourceFile;\n // If aSourceFile is omitted, we will use the file property of the SourceMap\n if (aSourceFile == null) {\n if (aSourceMapConsumer.file == null) {\n throw new Error(\n 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +\n 'or the source map\\'s \"file\" property. Both were omitted.'\n );\n }\n sourceFile = aSourceMapConsumer.file;\n }\n var sourceRoot = this._sourceRoot;\n // Make \"sourceFile\" relative if an absolute Url is passed.\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n // Applying the SourceMap can add and remove items from the sources and\n // the names array.\n var newSources = new ArraySet();\n var newNames = new ArraySet();\n\n // Find mappings for the \"sourceFile\"\n this._mappings.unsortedForEach(function (mapping) {\n if (mapping.source === sourceFile && mapping.originalLine != null) {\n // Check if it can be mapped by the source map, then update the mapping.\n var original = aSourceMapConsumer.originalPositionFor({\n line: mapping.originalLine,\n column: mapping.originalColumn\n });\n if (original.source != null) {\n // Copy mapping\n mapping.source = original.source;\n if (aSourceMapPath != null) {\n mapping.source = util.join(aSourceMapPath, mapping.source)\n }\n if (sourceRoot != null) {\n mapping.source = util.relative(sourceRoot, mapping.source);\n }\n mapping.originalLine = original.line;\n mapping.originalColumn = original.column;\n if (original.name != null) {\n mapping.name = original.name;\n }\n }\n }\n\n var source = mapping.source;\n if (source != null && !newSources.has(source)) {\n newSources.add(source);\n }\n\n var name = mapping.name;\n if (name != null && !newNames.has(name)) {\n newNames.add(name);\n }\n\n }, this);\n this._sources = newSources;\n this._names = newNames;\n\n // Copy sourcesContents of applied map.\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aSourceMapPath != null) {\n sourceFile = util.join(aSourceMapPath, sourceFile);\n }\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n this.setSourceContent(sourceFile, content);\n }\n }, this);\n };\n\n/**\n * A mapping can have one of the three levels of data:\n *\n * 1. Just the generated position.\n * 2. The Generated position, original position, and original source.\n * 3. Generated and original position, original source, as well as a name\n * token.\n *\n * To maintain consistency, we validate that any new mapping being added falls\n * in to one of these categories.\n */\nSourceMapGenerator.prototype._validateMapping =\n function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,\n aName) {\n // When aOriginal is truthy but has empty values for .line and .column,\n // it is most likely a programmer error. In this case we throw a very\n // specific error message to try to guide them the right way.\n // For example: https://github.com/Polymer/polymer-bundler/pull/519\n if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {\n var message = 'original.line and original.column are not numbers -- you probably meant to omit ' +\n 'the original mapping entirely and only map the generated position. If so, pass ' +\n 'null for the original mapping instead of an object with empty or null values.'\n\n if (this._ignoreInvalidMapping) {\n if (typeof console !== 'undefined' && console.warn) {\n console.warn(message);\n }\n return false;\n } else {\n throw new Error(message);\n }\n }\n\n if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aGenerated.line > 0 && aGenerated.column >= 0\n && !aOriginal && !aSource && !aName) {\n // Case 1.\n return;\n }\n else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n && aGenerated.line > 0 && aGenerated.column >= 0\n && aOriginal.line > 0 && aOriginal.column >= 0\n && aSource) {\n // Cases 2 and 3.\n return;\n }\n else {\n var message = 'Invalid mapping: ' + JSON.stringify({\n generated: aGenerated,\n source: aSource,\n original: aOriginal,\n name: aName\n });\n\n if (this._ignoreInvalidMapping) {\n if (typeof console !== 'undefined' && console.warn) {\n console.warn(message);\n }\n return false;\n } else {\n throw new Error(message)\n }\n }\n };\n\n/**\n * Serialize the accumulated mappings in to the stream of base 64 VLQs\n * specified by the source map format.\n */\nSourceMapGenerator.prototype._serializeMappings =\n function SourceMapGenerator_serializeMappings() {\n var previousGeneratedColumn = 0;\n var previousGeneratedLine = 1;\n var previousOriginalColumn = 0;\n var previousOriginalLine = 0;\n var previousName = 0;\n var previousSource = 0;\n var result = '';\n var next;\n var mapping;\n var nameIdx;\n var sourceIdx;\n\n var mappings = this._mappings.toArray();\n for (var i = 0, len = mappings.length; i < len; i++) {\n mapping = mappings[i];\n next = ''\n\n if (mapping.generatedLine !== previousGeneratedLine) {\n previousGeneratedColumn = 0;\n while (mapping.generatedLine !== previousGeneratedLine) {\n next += ';';\n previousGeneratedLine++;\n }\n }\n else {\n if (i > 0) {\n if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n continue;\n }\n next += ',';\n }\n }\n\n next += base64VLQ.encode(mapping.generatedColumn\n - previousGeneratedColumn);\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (mapping.source != null) {\n sourceIdx = this._sources.indexOf(mapping.source);\n next += base64VLQ.encode(sourceIdx - previousSource);\n previousSource = sourceIdx;\n\n // lines are stored 0-based in SourceMap spec version 3\n next += base64VLQ.encode(mapping.originalLine - 1\n - previousOriginalLine);\n previousOriginalLine = mapping.originalLine - 1;\n\n next += base64VLQ.encode(mapping.originalColumn\n - previousOriginalColumn);\n previousOriginalColumn = mapping.originalColumn;\n\n if (mapping.name != null) {\n nameIdx = this._names.indexOf(mapping.name);\n next += base64VLQ.encode(nameIdx - previousName);\n previousName = nameIdx;\n }\n }\n\n result += next;\n }\n\n return result;\n };\n\nSourceMapGenerator.prototype._generateSourcesContent =\n function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n return aSources.map(function (source) {\n if (!this._sourcesContents) {\n return null;\n }\n if (aSourceRoot != null) {\n source = util.relative(aSourceRoot, source);\n }\n var key = util.toSetString(source);\n return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n ? this._sourcesContents[key]\n : null;\n }, this);\n };\n\n/**\n * Externalize the source map.\n */\nSourceMapGenerator.prototype.toJSON =\n function SourceMapGenerator_toJSON() {\n var map = {\n version: this._version,\n sources: this._sources.toArray(),\n names: this._names.toArray(),\n mappings: this._serializeMappings()\n };\n if (this._file != null) {\n map.file = this._file;\n }\n if (this._sourceRoot != null) {\n map.sourceRoot = this._sourceRoot;\n }\n if (this._sourcesContents) {\n map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n }\n\n return map;\n };\n\n/**\n * Render the source map being generated to a string.\n */\nSourceMapGenerator.prototype.toString =\n function SourceMapGenerator_toString() {\n return JSON.stringify(this.toJSON());\n };\n\nexports.SourceMapGenerator = SourceMapGenerator;\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar SourceMapGenerator = require('./source-map-generator').SourceMapGenerator;\nvar util = require('./util');\n\n// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n// operating systems these days (capturing the result).\nvar REGEX_NEWLINE = /(\\r?\\n)/;\n\n// Newline character code for charCodeAt() comparisons\nvar NEWLINE_CODE = 10;\n\n// Private symbol for identifying `SourceNode`s when multiple versions of\n// the source-map library are loaded. This MUST NOT CHANGE across\n// versions!\nvar isSourceNode = \"$$$isSourceNode$$$\";\n\n/**\n * SourceNodes provide a way to abstract over interpolating/concatenating\n * snippets of generated JavaScript source code while maintaining the line and\n * column information associated with the original source code.\n *\n * @param aLine The original line number.\n * @param aColumn The original column number.\n * @param aSource The original source's filename.\n * @param aChunks Optional. An array of strings which are snippets of\n * generated JS, or other SourceNodes.\n * @param aName The original identifier.\n */\nfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n this.children = [];\n this.sourceContents = {};\n this.line = aLine == null ? null : aLine;\n this.column = aColumn == null ? null : aColumn;\n this.source = aSource == null ? null : aSource;\n this.name = aName == null ? null : aName;\n this[isSourceNode] = true;\n if (aChunks != null) this.add(aChunks);\n}\n\n/**\n * Creates a SourceNode from generated code and a SourceMapConsumer.\n *\n * @param aGeneratedCode The generated code\n * @param aSourceMapConsumer The SourceMap for the generated code\n * @param aRelativePath Optional. The path that relative sources in the\n * SourceMapConsumer should be relative to.\n */\nSourceNode.fromStringWithSourceMap =\n function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n // The SourceNode we want to fill with the generated code\n // and the SourceMap\n var node = new SourceNode();\n\n // All even indices of this array are one line of the generated code,\n // while all odd indices are the newlines between two adjacent lines\n // (since `REGEX_NEWLINE` captures its match).\n // Processed fragments are accessed by calling `shiftNextLine`.\n var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n var remainingLinesIndex = 0;\n var shiftNextLine = function() {\n var lineContents = getNextLine();\n // The last line of a file might not have a newline.\n var newLine = getNextLine() || \"\";\n return lineContents + newLine;\n\n function getNextLine() {\n return remainingLinesIndex < remainingLines.length ?\n remainingLines[remainingLinesIndex++] : undefined;\n }\n };\n\n // We need to remember the position of \"remainingLines\"\n var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\n // The generate SourceNodes we need a code range.\n // To extract it current and last mapping is used.\n // Here we store the last mapping.\n var lastMapping = null;\n\n aSourceMapConsumer.eachMapping(function (mapping) {\n if (lastMapping !== null) {\n // We add the code from \"lastMapping\" to \"mapping\":\n // First check if there is a new line in between.\n if (lastGeneratedLine < mapping.generatedLine) {\n // Associate first line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n lastGeneratedLine++;\n lastGeneratedColumn = 0;\n // The remaining code is added without mapping\n } else {\n // There is no new line in between.\n // Associate the code between \"lastGeneratedColumn\" and\n // \"mapping.generatedColumn\" with \"lastMapping\"\n var nextLine = remainingLines[remainingLinesIndex] || '';\n var code = nextLine.substr(0, mapping.generatedColumn -\n lastGeneratedColumn);\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -\n lastGeneratedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n addMappingWithCode(lastMapping, code);\n // No more remaining code, continue\n lastMapping = mapping;\n return;\n }\n }\n // We add the generated code until the first mapping\n // to the SourceNode without any mapping.\n // Each line is added as separate string.\n while (lastGeneratedLine < mapping.generatedLine) {\n node.add(shiftNextLine());\n lastGeneratedLine++;\n }\n if (lastGeneratedColumn < mapping.generatedColumn) {\n var nextLine = remainingLines[remainingLinesIndex] || '';\n node.add(nextLine.substr(0, mapping.generatedColumn));\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n }\n lastMapping = mapping;\n }, this);\n // We have processed all mappings.\n if (remainingLinesIndex < remainingLines.length) {\n if (lastMapping) {\n // Associate the remaining code in the current line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n }\n // and add the remaining lines without any mapping\n node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n }\n\n // Copy sourcesContent into SourceNode\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aRelativePath != null) {\n sourceFile = util.join(aRelativePath, sourceFile);\n }\n node.setSourceContent(sourceFile, content);\n }\n });\n\n return node;\n\n function addMappingWithCode(mapping, code) {\n if (mapping === null || mapping.source === undefined) {\n node.add(code);\n } else {\n var source = aRelativePath\n ? util.join(aRelativePath, mapping.source)\n : mapping.source;\n node.add(new SourceNode(mapping.originalLine,\n mapping.originalColumn,\n source,\n code,\n mapping.name));\n }\n }\n };\n\n/**\n * Add a chunk of generated JS to this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.add = function SourceNode_add(aChunk) {\n if (Array.isArray(aChunk)) {\n aChunk.forEach(function (chunk) {\n this.add(chunk);\n }, this);\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n if (aChunk) {\n this.children.push(aChunk);\n }\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Add a chunk of generated JS to the beginning of this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n if (Array.isArray(aChunk)) {\n for (var i = aChunk.length-1; i >= 0; i--) {\n this.prepend(aChunk[i]);\n }\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n this.children.unshift(aChunk);\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Walk over the tree of JS snippets in this node and its children. The\n * walking function is called once for each snippet of JS and is passed that\n * snippet and the its original associated source's line/column location.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n var chunk;\n for (var i = 0, len = this.children.length; i < len; i++) {\n chunk = this.children[i];\n if (chunk[isSourceNode]) {\n chunk.walk(aFn);\n }\n else {\n if (chunk !== '') {\n aFn(chunk, { source: this.source,\n line: this.line,\n column: this.column,\n name: this.name });\n }\n }\n }\n};\n\n/**\n * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n * each of `this.children`.\n *\n * @param aSep The separator.\n */\nSourceNode.prototype.join = function SourceNode_join(aSep) {\n var newChildren;\n var i;\n var len = this.children.length;\n if (len > 0) {\n newChildren = [];\n for (i = 0; i < len-1; i++) {\n newChildren.push(this.children[i]);\n newChildren.push(aSep);\n }\n newChildren.push(this.children[i]);\n this.children = newChildren;\n }\n return this;\n};\n\n/**\n * Call String.prototype.replace on the very right-most source snippet. Useful\n * for trimming whitespace from the end of a source node, etc.\n *\n * @param aPattern The pattern to replace.\n * @param aReplacement The thing to replace the pattern with.\n */\nSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n var lastChild = this.children[this.children.length - 1];\n if (lastChild[isSourceNode]) {\n lastChild.replaceRight(aPattern, aReplacement);\n }\n else if (typeof lastChild === 'string') {\n this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n }\n else {\n this.children.push(''.replace(aPattern, aReplacement));\n }\n return this;\n};\n\n/**\n * Set the source content for a source file. This will be added to the SourceMapGenerator\n * in the sourcesContent field.\n *\n * @param aSourceFile The filename of the source file\n * @param aSourceContent The content of the source file\n */\nSourceNode.prototype.setSourceContent =\n function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n };\n\n/**\n * Walk over the tree of SourceNodes. The walking function is called for each\n * source file content and is passed the filename and source content.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walkSourceContents =\n function SourceNode_walkSourceContents(aFn) {\n for (var i = 0, len = this.children.length; i < len; i++) {\n if (this.children[i][isSourceNode]) {\n this.children[i].walkSourceContents(aFn);\n }\n }\n\n var sources = Object.keys(this.sourceContents);\n for (var i = 0, len = sources.length; i < len; i++) {\n aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n }\n };\n\n/**\n * Return the string representation of this source node. Walks over the tree\n * and concatenates all the various snippets together to one string.\n */\nSourceNode.prototype.toString = function SourceNode_toString() {\n var str = \"\";\n this.walk(function (chunk) {\n str += chunk;\n });\n return str;\n};\n\n/**\n * Returns the string representation of this source node along with a source\n * map.\n */\nSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n var generated = {\n code: \"\",\n line: 1,\n column: 0\n };\n var map = new SourceMapGenerator(aArgs);\n var sourceMappingActive = false;\n var lastOriginalSource = null;\n var lastOriginalLine = null;\n var lastOriginalColumn = null;\n var lastOriginalName = null;\n this.walk(function (chunk, original) {\n generated.code += chunk;\n if (original.source !== null\n && original.line !== null\n && original.column !== null) {\n if(lastOriginalSource !== original.source\n || lastOriginalLine !== original.line\n || lastOriginalColumn !== original.column\n || lastOriginalName !== original.name) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n lastOriginalSource = original.source;\n lastOriginalLine = original.line;\n lastOriginalColumn = original.column;\n lastOriginalName = original.name;\n sourceMappingActive = true;\n } else if (sourceMappingActive) {\n map.addMapping({\n generated: {\n line: generated.line,\n column: generated.column\n }\n });\n lastOriginalSource = null;\n sourceMappingActive = false;\n }\n for (var idx = 0, length = chunk.length; idx < length; idx++) {\n if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n generated.line++;\n generated.column = 0;\n // Mappings end at eol\n if (idx + 1 === length) {\n lastOriginalSource = null;\n sourceMappingActive = false;\n } else if (sourceMappingActive) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n } else {\n generated.column++;\n }\n }\n });\n this.walkSourceContents(function (sourceFile, sourceContent) {\n map.setSourceContent(sourceFile, sourceContent);\n });\n\n return { code: generated.code, map: map };\n};\n\nexports.SourceNode = SourceNode;\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n/**\n * This is a helper function for getting values from parameter/options\n * objects.\n *\n * @param args The object we are extracting values from\n * @param name The name of the property we are getting.\n * @param defaultValue An optional value to return if the property is missing\n * from the object. If this is not specified and the property is missing, an\n * error will be thrown.\n */\nfunction getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}\nexports.getArg = getArg;\n\nvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.-]*)(?::(\\d+))?(.*)$/;\nvar dataUrlRegexp = /^data:.+\\,.+$/;\n\nfunction urlParse(aUrl) {\n var match = aUrl.match(urlRegexp);\n if (!match) {\n return null;\n }\n return {\n scheme: match[1],\n auth: match[2],\n host: match[3],\n port: match[4],\n path: match[5]\n };\n}\nexports.urlParse = urlParse;\n\nfunction urlGenerate(aParsedUrl) {\n var url = '';\n if (aParsedUrl.scheme) {\n url += aParsedUrl.scheme + ':';\n }\n url += '//';\n if (aParsedUrl.auth) {\n url += aParsedUrl.auth + '@';\n }\n if (aParsedUrl.host) {\n url += aParsedUrl.host;\n }\n if (aParsedUrl.port) {\n url += \":\" + aParsedUrl.port\n }\n if (aParsedUrl.path) {\n url += aParsedUrl.path;\n }\n return url;\n}\nexports.urlGenerate = urlGenerate;\n\nvar MAX_CACHED_INPUTS = 32;\n\n/**\n * Takes some function `f(input) -> result` and returns a memoized version of\n * `f`.\n *\n * We keep at most `MAX_CACHED_INPUTS` memoized results of `f` alive. The\n * memoization is a dumb-simple, linear least-recently-used cache.\n */\nfunction lruMemoize(f) {\n var cache = [];\n\n return function(input) {\n for (var i = 0; i < cache.length; i++) {\n if (cache[i].input === input) {\n var temp = cache[0];\n cache[0] = cache[i];\n cache[i] = temp;\n return cache[0].result;\n }\n }\n\n var result = f(input);\n\n cache.unshift({\n input,\n result,\n });\n\n if (cache.length > MAX_CACHED_INPUTS) {\n cache.pop();\n }\n\n return result;\n };\n}\n\n/**\n * Normalizes a path, or the path portion of a URL:\n *\n * - Replaces consecutive slashes with one slash.\n * - Removes unnecessary '.' parts.\n * - Removes unnecessary '<dir>/..' parts.\n *\n * Based on code in the Node.js 'path' core module.\n *\n * @param aPath The path or url to normalize.\n */\nvar normalize = lruMemoize(function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n // Split the path into parts between `/` characters. This is much faster than\n // using `.split(/\\/+/g)`.\n var parts = [];\n var start = 0;\n var i = 0;\n while (true) {\n start = i;\n i = path.indexOf(\"/\", start);\n if (i === -1) {\n parts.push(path.slice(start));\n break;\n } else {\n parts.push(path.slice(start, i));\n while (i < path.length && path[i] === \"/\") {\n i++;\n }\n }\n }\n\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n});\nexports.normalize = normalize;\n\n/**\n * Joins two paths/URLs.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be joined with the root.\n *\n * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n * first.\n * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n * is updated with the result and aRoot is returned. Otherwise the result\n * is returned.\n * - If aPath is absolute, the result is aPath.\n * - Otherwise the two paths are joined with a slash.\n * - Joining for example 'http://' and 'www.example.com' is also supported.\n */\nfunction join(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n if (aPath === \"\") {\n aPath = \".\";\n }\n var aPathUrl = urlParse(aPath);\n var aRootUrl = urlParse(aRoot);\n if (aRootUrl) {\n aRoot = aRootUrl.path || '/';\n }\n\n // `join(foo, '//www.example.org')`\n if (aPathUrl && !aPathUrl.scheme) {\n if (aRootUrl) {\n aPathUrl.scheme = aRootUrl.scheme;\n }\n return urlGenerate(aPathUrl);\n }\n\n if (aPathUrl || aPath.match(dataUrlRegexp)) {\n return aPath;\n }\n\n // `join('http://', 'www.example.com')`\n if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n aRootUrl.host = aPath;\n return urlGenerate(aRootUrl);\n }\n\n var joined = aPath.charAt(0) === '/'\n ? aPath\n : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\n if (aRootUrl) {\n aRootUrl.path = joined;\n return urlGenerate(aRootUrl);\n }\n return joined;\n}\nexports.join = join;\n\nexports.isAbsolute = function (aPath) {\n return aPath.charAt(0) === '/' || urlRegexp.test(aPath);\n};\n\n/**\n * Make a path relative to a URL or another path.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be made relative to aRoot.\n */\nfunction relative(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n\n aRoot = aRoot.replace(/\\/$/, '');\n\n // It is possible for the path to be above the root. In this case, simply\n // checking whether the root is a prefix of the path won't work. Instead, we\n // need to remove components from the root one by one, until either we find\n // a prefix that fits, or we run out of components to remove.\n var level = 0;\n while (aPath.indexOf(aRoot + '/') !== 0) {\n var index = aRoot.lastIndexOf(\"/\");\n if (index < 0) {\n return aPath;\n }\n\n // If the only part of the root that is left is the scheme (i.e. http://,\n // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n // have exhausted all components, so the path is not relative to the root.\n aRoot = aRoot.slice(0, index);\n if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n return aPath;\n }\n\n ++level;\n }\n\n // Make sure we add a \"../\" for each component we removed from the root.\n return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n}\nexports.relative = relative;\n\nvar supportsNullProto = (function () {\n var obj = Object.create(null);\n return !('__proto__' in obj);\n}());\n\nfunction identity (s) {\n return s;\n}\n\n/**\n * Because behavior goes wacky when you set `__proto__` on objects, we\n * have to prefix all the strings in our set with an arbitrary character.\n *\n * See https://github.com/mozilla/source-map/pull/31 and\n * https://github.com/mozilla/source-map/issues/30\n *\n * @param String aStr\n */\nfunction toSetString(aStr) {\n if (isProtoString(aStr)) {\n return '$' + aStr;\n }\n\n return aStr;\n}\nexports.toSetString = supportsNullProto ? identity : toSetString;\n\nfunction fromSetString(aStr) {\n if (isProtoString(aStr)) {\n return aStr.slice(1);\n }\n\n return aStr;\n}\nexports.fromSetString = supportsNullProto ? identity : fromSetString;\n\nfunction isProtoString(s) {\n if (!s) {\n return false;\n }\n\n var length = s.length;\n\n if (length < 9 /* \"__proto__\".length */) {\n return false;\n }\n\n if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n s.charCodeAt(length - 9) !== 95 /* '_' */) {\n return false;\n }\n\n for (var i = length - 10; i >= 0; i--) {\n if (s.charCodeAt(i) !== 36 /* '$' */) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Comparator between two mappings where the original positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same original source/line/column, but different generated\n * line and column the same. Useful when searching for a mapping with a\n * stubbed out mapping.\n */\nfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n var cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0 || onlyCompareOriginal) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByOriginalPositions = compareByOriginalPositions;\n\nfunction compareByOriginalPositionsNoSource(mappingA, mappingB, onlyCompareOriginal) {\n var cmp\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0 || onlyCompareOriginal) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByOriginalPositionsNoSource = compareByOriginalPositionsNoSource;\n\n/**\n * Comparator between two mappings with deflated source and name indices where\n * the generated positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same generated line and column, but different\n * source/name/original line and column the same. Useful when searching for a\n * mapping with a stubbed out mapping.\n */\nfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0 || onlyCompareGenerated) {\n return cmp;\n }\n\n cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\nfunction compareByGeneratedPositionsDeflatedNoLine(mappingA, mappingB, onlyCompareGenerated) {\n var cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0 || onlyCompareGenerated) {\n return cmp;\n }\n\n cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsDeflatedNoLine = compareByGeneratedPositionsDeflatedNoLine;\n\nfunction strcmp(aStr1, aStr2) {\n if (aStr1 === aStr2) {\n return 0;\n }\n\n if (aStr1 === null) {\n return 1; // aStr2 !== null\n }\n\n if (aStr2 === null) {\n return -1; // aStr1 !== null\n }\n\n if (aStr1 > aStr2) {\n return 1;\n }\n\n return -1;\n}\n\n/**\n * Comparator between two mappings with inflated source and name strings where\n * the generated positions are compared.\n */\nfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\n/**\n * Strip any JSON XSSI avoidance prefix from the string (as documented\n * in the source maps specification), and then parse the string as\n * JSON.\n */\nfunction parseSourceMapInput(str) {\n return JSON.parse(str.replace(/^\\)]}'[^\\n]*\\n/, ''));\n}\nexports.parseSourceMapInput = parseSourceMapInput;\n\n/**\n * Compute the URL of a source given the the source root, the source's\n * URL, and the source map's URL.\n */\nfunction computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {\n sourceURL = sourceURL || '';\n\n if (sourceRoot) {\n // This follows what Chrome does.\n if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') {\n sourceRoot += '/';\n }\n // The spec says:\n // Line 4: An optional source root, useful for relocating source\n // files on a server or removing repeated values in the\n // “sources” entry. This value is prepended to the individual\n // entries in the “source” field.\n sourceURL = sourceRoot + sourceURL;\n }\n\n // Historically, SourceMapConsumer did not take the sourceMapURL as\n // a parameter. This mode is still somewhat supported, which is why\n // this code block is conditional. However, it's preferable to pass\n // the source map URL to SourceMapConsumer, so that this function\n // can implement the source URL resolution algorithm as outlined in\n // the spec. This block is basically the equivalent of:\n // new URL(sourceURL, sourceMapURL).toString()\n // ... except it avoids using URL, which wasn't available in the\n // older releases of node still supported by this library.\n //\n // The spec says:\n // If the sources are not absolute URLs after prepending of the\n // “sourceRoot”, the sources are resolved relative to the\n // SourceMap (like resolving script src in a html document).\n if (sourceMapURL) {\n var parsed = urlParse(sourceMapURL);\n if (!parsed) {\n throw new Error(\"sourceMapURL could not be parsed\");\n }\n if (parsed.path) {\n // Strip the last path component, but keep the \"/\".\n var index = parsed.path.lastIndexOf('/');\n if (index >= 0) {\n parsed.path = parsed.path.substring(0, index + 1);\n }\n }\n sourceURL = join(urlGenerate(parsed), sourceURL);\n }\n\n return normalize(sourceURL);\n}\nexports.computeSourceURL = computeSourceURL;\n","/*\n * Copyright 2009-2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE.txt or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\nexports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator;\nexports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer;\nexports.SourceNode = require('./lib/source-node').SourceNode;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.version = exports.validate = exports.v7 = exports.v6ToV1 = exports.v6 = exports.v5 = exports.v4 = exports.v3 = exports.v1ToV6 = exports.v1 = exports.stringify = exports.parse = exports.NIL = exports.MAX = void 0;\nvar max_js_1 = require(\"./max.js\");\nObject.defineProperty(exports, \"MAX\", { enumerable: true, get: function () { return max_js_1.default; } });\nvar nil_js_1 = require(\"./nil.js\");\nObject.defineProperty(exports, \"NIL\", { enumerable: true, get: function () { return nil_js_1.default; } });\nvar parse_js_1 = require(\"./parse.js\");\nObject.defineProperty(exports, \"parse\", { enumerable: true, get: function () { return parse_js_1.default; } });\nvar stringify_js_1 = require(\"./stringify.js\");\nObject.defineProperty(exports, \"stringify\", { enumerable: true, get: function () { return stringify_js_1.default; } });\nvar v1_js_1 = require(\"./v1.js\");\nObject.defineProperty(exports, \"v1\", { enumerable: true, get: function () { return v1_js_1.default; } });\nvar v1ToV6_js_1 = require(\"./v1ToV6.js\");\nObject.defineProperty(exports, \"v1ToV6\", { enumerable: true, get: function () { return v1ToV6_js_1.default; } });\nvar v3_js_1 = require(\"./v3.js\");\nObject.defineProperty(exports, \"v3\", { enumerable: true, get: function () { return v3_js_1.default; } });\nvar v4_js_1 = require(\"./v4.js\");\nObject.defineProperty(exports, \"v4\", { enumerable: true, get: function () { return v4_js_1.default; } });\nvar v5_js_1 = require(\"./v5.js\");\nObject.defineProperty(exports, \"v5\", { enumerable: true, get: function () { return v5_js_1.default; } });\nvar v6_js_1 = require(\"./v6.js\");\nObject.defineProperty(exports, \"v6\", { enumerable: true, get: function () { return v6_js_1.default; } });\nvar v6ToV1_js_1 = require(\"./v6ToV1.js\");\nObject.defineProperty(exports, \"v6ToV1\", { enumerable: true, get: function () { return v6ToV1_js_1.default; } });\nvar v7_js_1 = require(\"./v7.js\");\nObject.defineProperty(exports, \"v7\", { enumerable: true, get: function () { return v7_js_1.default; } });\nvar validate_js_1 = require(\"./validate.js\");\nObject.defineProperty(exports, \"validate\", { enumerable: true, get: function () { return validate_js_1.default; } });\nvar version_js_1 = require(\"./version.js\");\nObject.defineProperty(exports, \"version\", { enumerable: true, get: function () { return version_js_1.default; } });\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = 'ffffffff-ffff-ffff-ffff-ffffffffffff';\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst crypto_1 = require(\"crypto\");\nfunction md5(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n }\n else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n return (0, crypto_1.createHash)('md5').update(bytes).digest();\n}\nexports.default = md5;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst crypto_1 = require(\"crypto\");\nexports.default = { randomUUID: crypto_1.randomUUID };\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = '00000000-0000-0000-0000-000000000000';\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst validate_js_1 = require(\"./validate.js\");\nfunction parse(uuid) {\n if (!(0, validate_js_1.default)(uuid)) {\n throw TypeError('Invalid UUID');\n }\n let v;\n return Uint8Array.of((v = parseInt(uuid.slice(0, 8), 16)) >>> 24, (v >>> 16) & 0xff, (v >>> 8) & 0xff, v & 0xff, (v = parseInt(uuid.slice(9, 13), 16)) >>> 8, v & 0xff, (v = parseInt(uuid.slice(14, 18), 16)) >>> 8, v & 0xff, (v = parseInt(uuid.slice(19, 23), 16)) >>> 8, v & 0xff, ((v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000) & 0xff, (v / 0x100000000) & 0xff, (v >>> 24) & 0xff, (v >>> 16) & 0xff, (v >>> 8) & 0xff, v & 0xff);\n}\nexports.default = parse;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst crypto_1 = require(\"crypto\");\nconst rnds8Pool = new Uint8Array(256);\nlet poolPtr = rnds8Pool.length;\nfunction rng() {\n if (poolPtr > rnds8Pool.length - 16) {\n (0, crypto_1.randomFillSync)(rnds8Pool);\n poolPtr = 0;\n }\n return rnds8Pool.slice(poolPtr, (poolPtr += 16));\n}\nexports.default = rng;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst crypto_1 = require(\"crypto\");\nfunction sha1(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n }\n else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n return (0, crypto_1.createHash)('sha1').update(bytes).digest();\n}\nexports.default = sha1;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.unsafeStringify = void 0;\nconst validate_js_1 = require(\"./validate.js\");\nconst byteToHex = [];\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\nfunction unsafeStringify(arr, offset = 0) {\n return (byteToHex[arr[offset + 0]] +\n byteToHex[arr[offset + 1]] +\n byteToHex[arr[offset + 2]] +\n byteToHex[arr[offset + 3]] +\n '-' +\n byteToHex[arr[offset + 4]] +\n byteToHex[arr[offset + 5]] +\n '-' +\n byteToHex[arr[offset + 6]] +\n byteToHex[arr[offset + 7]] +\n '-' +\n byteToHex[arr[offset + 8]] +\n byteToHex[arr[offset + 9]] +\n '-' +\n byteToHex[arr[offset + 10]] +\n byteToHex[arr[offset + 11]] +\n byteToHex[arr[offset + 12]] +\n byteToHex[arr[offset + 13]] +\n byteToHex[arr[offset + 14]] +\n byteToHex[arr[offset + 15]]).toLowerCase();\n}\nexports.unsafeStringify = unsafeStringify;\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset);\n if (!(0, validate_js_1.default)(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n return uuid;\n}\nexports.default = stringify;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.updateV1State = void 0;\nconst rng_js_1 = require(\"./rng.js\");\nconst stringify_js_1 = require(\"./stringify.js\");\nconst _state = {};\nfunction v1(options, buf, offset) {\n let bytes;\n const isV6 = options?._v6 ?? false;\n if (options) {\n const optionsKeys = Object.keys(options);\n if (optionsKeys.length === 1 && optionsKeys[0] === '_v6') {\n options = undefined;\n }\n }\n if (options) {\n bytes = v1Bytes(options.random ?? options.rng?.() ?? (0, rng_js_1.default)(), options.msecs, options.nsecs, options.clockseq, options.node, buf, offset);\n }\n else {\n const now = Date.now();\n const rnds = (0, rng_js_1.default)();\n updateV1State(_state, now, rnds);\n bytes = v1Bytes(rnds, _state.msecs, _state.nsecs, isV6 ? undefined : _state.clockseq, isV6 ? undefined : _state.node, buf, offset);\n }\n return buf ?? (0, stringify_js_1.unsafeStringify)(bytes);\n}\nfunction updateV1State(state, now, rnds) {\n state.msecs ??= -Infinity;\n state.nsecs ??= 0;\n if (now === state.msecs) {\n state.nsecs++;\n if (state.nsecs >= 10000) {\n state.node = undefined;\n state.nsecs = 0;\n }\n }\n else if (now > state.msecs) {\n state.nsecs = 0;\n }\n else if (now < state.msecs) {\n state.node = undefined;\n }\n if (!state.node) {\n state.node = rnds.slice(10, 16);\n state.node[0] |= 0x01;\n state.clockseq = ((rnds[8] << 8) | rnds[9]) & 0x3fff;\n }\n state.msecs = now;\n return state;\n}\nexports.updateV1State = updateV1State;\nfunction v1Bytes(rnds, msecs, nsecs, clockseq, node, buf, offset = 0) {\n if (rnds.length < 16) {\n throw new Error('Random bytes length must be >= 16');\n }\n if (!buf) {\n buf = new Uint8Array(16);\n offset = 0;\n }\n else {\n if (offset < 0 || offset + 16 > buf.length) {\n throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);\n }\n }\n msecs ??= Date.now();\n nsecs ??= 0;\n clockseq ??= ((rnds[8] << 8) | rnds[9]) & 0x3fff;\n node ??= rnds.slice(10, 16);\n msecs += 12219292800000;\n const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n buf[offset++] = (tl >>> 24) & 0xff;\n buf[offset++] = (tl >>> 16) & 0xff;\n buf[offset++] = (tl >>> 8) & 0xff;\n buf[offset++] = tl & 0xff;\n const tmh = ((msecs / 0x100000000) * 10000) & 0xfffffff;\n buf[offset++] = (tmh >>> 8) & 0xff;\n buf[offset++] = tmh & 0xff;\n buf[offset++] = ((tmh >>> 24) & 0xf) | 0x10;\n buf[offset++] = (tmh >>> 16) & 0xff;\n buf[offset++] = (clockseq >>> 8) | 0x80;\n buf[offset++] = clockseq & 0xff;\n for (let n = 0; n < 6; ++n) {\n buf[offset++] = node[n];\n }\n return buf;\n}\nexports.default = v1;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst parse_js_1 = require(\"./parse.js\");\nconst stringify_js_1 = require(\"./stringify.js\");\nfunction v1ToV6(uuid) {\n const v1Bytes = typeof uuid === 'string' ? (0, parse_js_1.default)(uuid) : uuid;\n const v6Bytes = _v1ToV6(v1Bytes);\n return typeof uuid === 'string' ? (0, stringify_js_1.unsafeStringify)(v6Bytes) : v6Bytes;\n}\nexports.default = v1ToV6;\nfunction _v1ToV6(v1Bytes) {\n return Uint8Array.of(((v1Bytes[6] & 0x0f) << 4) | ((v1Bytes[7] >> 4) & 0x0f), ((v1Bytes[7] & 0x0f) << 4) | ((v1Bytes[4] & 0xf0) >> 4), ((v1Bytes[4] & 0x0f) << 4) | ((v1Bytes[5] & 0xf0) >> 4), ((v1Bytes[5] & 0x0f) << 4) | ((v1Bytes[0] & 0xf0) >> 4), ((v1Bytes[0] & 0x0f) << 4) | ((v1Bytes[1] & 0xf0) >> 4), ((v1Bytes[1] & 0x0f) << 4) | ((v1Bytes[2] & 0xf0) >> 4), 0x60 | (v1Bytes[2] & 0x0f), v1Bytes[3], v1Bytes[8], v1Bytes[9], v1Bytes[10], v1Bytes[11], v1Bytes[12], v1Bytes[13], v1Bytes[14], v1Bytes[15]);\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.URL = exports.DNS = void 0;\nconst md5_js_1 = require(\"./md5.js\");\nconst v35_js_1 = require(\"./v35.js\");\nvar v35_js_2 = require(\"./v35.js\");\nObject.defineProperty(exports, \"DNS\", { enumerable: true, get: function () { return v35_js_2.DNS; } });\nObject.defineProperty(exports, \"URL\", { enumerable: true, get: function () { return v35_js_2.URL; } });\nfunction v3(value, namespace, buf, offset) {\n return (0, v35_js_1.default)(0x30, md5_js_1.default, value, namespace, buf, offset);\n}\nv3.DNS = v35_js_1.DNS;\nv3.URL = v35_js_1.URL;\nexports.default = v3;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.URL = exports.DNS = exports.stringToBytes = void 0;\nconst parse_js_1 = require(\"./parse.js\");\nconst stringify_js_1 = require(\"./stringify.js\");\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str));\n const bytes = new Uint8Array(str.length);\n for (let i = 0; i < str.length; ++i) {\n bytes[i] = str.charCodeAt(i);\n }\n return bytes;\n}\nexports.stringToBytes = stringToBytes;\nexports.DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexports.URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nfunction v35(version, hash, value, namespace, buf, offset) {\n const valueBytes = typeof value === 'string' ? stringToBytes(value) : value;\n const namespaceBytes = typeof namespace === 'string' ? (0, parse_js_1.default)(namespace) : namespace;\n if (typeof namespace === 'string') {\n namespace = (0, parse_js_1.default)(namespace);\n }\n if (namespace?.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n }\n let bytes = new Uint8Array(16 + valueBytes.length);\n bytes.set(namespaceBytes);\n bytes.set(valueBytes, namespaceBytes.length);\n bytes = hash(bytes);\n bytes[6] = (bytes[6] & 0x0f) | version;\n bytes[8] = (bytes[8] & 0x3f) | 0x80;\n if (buf) {\n offset = offset || 0;\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n return buf;\n }\n return (0, stringify_js_1.unsafeStringify)(bytes);\n}\nexports.default = v35;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst native_js_1 = require(\"./native.js\");\nconst rng_js_1 = require(\"./rng.js\");\nconst stringify_js_1 = require(\"./stringify.js\");\nfunction v4(options, buf, offset) {\n if (native_js_1.default.randomUUID && !buf && !options) {\n return native_js_1.default.randomUUID();\n }\n options = options || {};\n const rnds = options.random ?? options.rng?.() ?? (0, rng_js_1.default)();\n if (rnds.length < 16) {\n throw new Error('Random bytes length must be >= 16');\n }\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n if (buf) {\n offset = offset || 0;\n if (offset < 0 || offset + 16 > buf.length) {\n throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);\n }\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n return buf;\n }\n return (0, stringify_js_1.unsafeStringify)(rnds);\n}\nexports.default = v4;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.URL = exports.DNS = void 0;\nconst sha1_js_1 = require(\"./sha1.js\");\nconst v35_js_1 = require(\"./v35.js\");\nvar v35_js_2 = require(\"./v35.js\");\nObject.defineProperty(exports, \"DNS\", { enumerable: true, get: function () { return v35_js_2.DNS; } });\nObject.defineProperty(exports, \"URL\", { enumerable: true, get: function () { return v35_js_2.URL; } });\nfunction v5(value, namespace, buf, offset) {\n return (0, v35_js_1.default)(0x50, sha1_js_1.default, value, namespace, buf, offset);\n}\nv5.DNS = v35_js_1.DNS;\nv5.URL = v35_js_1.URL;\nexports.default = v5;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst stringify_js_1 = require(\"./stringify.js\");\nconst v1_js_1 = require(\"./v1.js\");\nconst v1ToV6_js_1 = require(\"./v1ToV6.js\");\nfunction v6(options, buf, offset) {\n options ??= {};\n offset ??= 0;\n let bytes = (0, v1_js_1.default)({ ...options, _v6: true }, new Uint8Array(16));\n bytes = (0, v1ToV6_js_1.default)(bytes);\n if (buf) {\n for (let i = 0; i < 16; i++) {\n buf[offset + i] = bytes[i];\n }\n return buf;\n }\n return (0, stringify_js_1.unsafeStringify)(bytes);\n}\nexports.default = v6;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst parse_js_1 = require(\"./parse.js\");\nconst stringify_js_1 = require(\"./stringify.js\");\nfunction v6ToV1(uuid) {\n const v6Bytes = typeof uuid === 'string' ? (0, parse_js_1.default)(uuid) : uuid;\n const v1Bytes = _v6ToV1(v6Bytes);\n return typeof uuid === 'string' ? (0, stringify_js_1.unsafeStringify)(v1Bytes) : v1Bytes;\n}\nexports.default = v6ToV1;\nfunction _v6ToV1(v6Bytes) {\n return Uint8Array.of(((v6Bytes[3] & 0x0f) << 4) | ((v6Bytes[4] >> 4) & 0x0f), ((v6Bytes[4] & 0x0f) << 4) | ((v6Bytes[5] & 0xf0) >> 4), ((v6Bytes[5] & 0x0f) << 4) | (v6Bytes[6] & 0x0f), v6Bytes[7], ((v6Bytes[1] & 0x0f) << 4) | ((v6Bytes[2] & 0xf0) >> 4), ((v6Bytes[2] & 0x0f) << 4) | ((v6Bytes[3] & 0xf0) >> 4), 0x10 | ((v6Bytes[0] & 0xf0) >> 4), ((v6Bytes[0] & 0x0f) << 4) | ((v6Bytes[1] & 0xf0) >> 4), v6Bytes[8], v6Bytes[9], v6Bytes[10], v6Bytes[11], v6Bytes[12], v6Bytes[13], v6Bytes[14], v6Bytes[15]);\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.updateV7State = void 0;\nconst rng_js_1 = require(\"./rng.js\");\nconst stringify_js_1 = require(\"./stringify.js\");\nconst _state = {};\nfunction v7(options, buf, offset) {\n let bytes;\n if (options) {\n bytes = v7Bytes(options.random ?? options.rng?.() ?? (0, rng_js_1.default)(), options.msecs, options.seq, buf, offset);\n }\n else {\n const now = Date.now();\n const rnds = (0, rng_js_1.default)();\n updateV7State(_state, now, rnds);\n bytes = v7Bytes(rnds, _state.msecs, _state.seq, buf, offset);\n }\n return buf ?? (0, stringify_js_1.unsafeStringify)(bytes);\n}\nfunction updateV7State(state, now, rnds) {\n state.msecs ??= -Infinity;\n state.seq ??= 0;\n if (now > state.msecs) {\n state.seq = (rnds[6] << 23) | (rnds[7] << 16) | (rnds[8] << 8) | rnds[9];\n state.msecs = now;\n }\n else {\n state.seq = (state.seq + 1) | 0;\n if (state.seq === 0) {\n state.msecs++;\n }\n }\n return state;\n}\nexports.updateV7State = updateV7State;\nfunction v7Bytes(rnds, msecs, seq, buf, offset = 0) {\n if (rnds.length < 16) {\n throw new Error('Random bytes length must be >= 16');\n }\n if (!buf) {\n buf = new Uint8Array(16);\n offset = 0;\n }\n else {\n if (offset < 0 || offset + 16 > buf.length) {\n throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);\n }\n }\n msecs ??= Date.now();\n seq ??= ((rnds[6] * 0x7f) << 24) | (rnds[7] << 16) | (rnds[8] << 8) | rnds[9];\n buf[offset++] = (msecs / 0x10000000000) & 0xff;\n buf[offset++] = (msecs / 0x100000000) & 0xff;\n buf[offset++] = (msecs / 0x1000000) & 0xff;\n buf[offset++] = (msecs / 0x10000) & 0xff;\n buf[offset++] = (msecs / 0x100) & 0xff;\n buf[offset++] = msecs & 0xff;\n buf[offset++] = 0x70 | ((seq >>> 28) & 0x0f);\n buf[offset++] = (seq >>> 20) & 0xff;\n buf[offset++] = 0x80 | ((seq >>> 14) & 0x3f);\n buf[offset++] = (seq >>> 6) & 0xff;\n buf[offset++] = ((seq << 2) & 0xff) | (rnds[10] & 0x03);\n buf[offset++] = rnds[11];\n buf[offset++] = rnds[12];\n buf[offset++] = rnds[13];\n buf[offset++] = rnds[14];\n buf[offset++] = rnds[15];\n return buf;\n}\nexports.default = v7;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst regex_js_1 = require(\"./regex.js\");\nfunction validate(uuid) {\n return typeof uuid === 'string' && regex_js_1.default.test(uuid);\n}\nexports.default = validate;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst validate_js_1 = require(\"./validate.js\");\nfunction version(uuid) {\n if (!(0, validate_js_1.default)(uuid)) {\n throw TypeError('Invalid UUID');\n }\n return parseInt(uuid.slice(14, 15), 16);\n}\nexports.default = version;\n","/*!\n * vue-i18n v11.1.2\n * (c) 2025 kazuya kawaguchi\n * Released under the MIT License.\n */\n'use strict';\n\nvar coreBase = require('@intlify/core-base');\nvar shared = require('@intlify/shared');\nvar vue = require('vue');\n\n/**\n * Vue I18n Version\n *\n * @remarks\n * Semver format. Same format as the package.json `version` field.\n *\n * @VueI18nGeneral\n */\nconst VERSION = '11.1.2';\n\nconst I18nErrorCodes = {\n // composer module errors\n UNEXPECTED_RETURN_TYPE: coreBase.CORE_ERROR_CODES_EXTEND_POINT, // 24\n // legacy module errors\n INVALID_ARGUMENT: 25,\n // i18n module errors\n MUST_BE_CALL_SETUP_TOP: 26,\n NOT_INSTALLED: 27,\n // directive module errors\n REQUIRED_VALUE: 28,\n INVALID_VALUE: 29,\n // vue-devtools errors\n CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN: 30,\n NOT_INSTALLED_WITH_PROVIDE: 31,\n // unexpected error\n UNEXPECTED_ERROR: 32,\n // not compatible legacy vue-i18n constructor\n NOT_COMPATIBLE_LEGACY_VUE_I18N: 33,\n // Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly\n NOT_AVAILABLE_COMPOSITION_IN_LEGACY: 34\n};\nfunction createI18nError(code, ...args) {\n return coreBase.createCompileError(code, null, undefined);\n}\n\nconst TranslateVNodeSymbol = \n/* #__PURE__*/ shared.makeSymbol('__translateVNode');\nconst DatetimePartsSymbol = /* #__PURE__*/ shared.makeSymbol('__datetimeParts');\nconst NumberPartsSymbol = /* #__PURE__*/ shared.makeSymbol('__numberParts');\nconst SetPluralRulesSymbol = shared.makeSymbol('__setPluralRules');\nshared.makeSymbol('__intlifyMeta');\nconst InejctWithOptionSymbol = \n/* #__PURE__*/ shared.makeSymbol('__injectWithOption');\nconst DisposeSymbol = /* #__PURE__*/ shared.makeSymbol('__dispose');\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * Transform flat json in obj to normal json in obj\n */\nfunction handleFlatJson(obj) {\n // check obj\n if (!shared.isObject(obj)) {\n return obj;\n }\n for (const key in obj) {\n // check key\n if (!shared.hasOwn(obj, key)) {\n continue;\n }\n // handle for normal json\n if (!key.includes('.')) {\n // recursive process value if value is also a object\n if (shared.isObject(obj[key])) {\n handleFlatJson(obj[key]);\n }\n }\n // handle for flat json, transform to normal json\n else {\n // go to the last object\n const subKeys = key.split('.');\n const lastIndex = subKeys.length - 1;\n let currentObj = obj;\n let hasStringValue = false;\n for (let i = 0; i < lastIndex; i++) {\n if (subKeys[i] === '__proto__') {\n throw new Error(`unsafe key: ${subKeys[i]}`);\n }\n if (!(subKeys[i] in currentObj)) {\n currentObj[subKeys[i]] = shared.create();\n }\n if (!shared.isObject(currentObj[subKeys[i]])) {\n hasStringValue = true;\n break;\n }\n currentObj = currentObj[subKeys[i]];\n }\n // update last object value, delete old property\n if (!hasStringValue) {\n currentObj[subKeys[lastIndex]] = obj[key];\n delete obj[key];\n }\n // recursive process value if value is also a object\n if (shared.isObject(currentObj[subKeys[lastIndex]])) {\n handleFlatJson(currentObj[subKeys[lastIndex]]);\n }\n }\n }\n return obj;\n}\nfunction getLocaleMessages(locale, options) {\n const { messages, __i18n, messageResolver, flatJson } = options;\n // prettier-ignore\n const ret = (shared.isPlainObject(messages)\n ? messages\n : shared.isArray(__i18n)\n ? shared.create()\n : { [locale]: shared.create() });\n // merge locale messages of i18n custom block\n if (shared.isArray(__i18n)) {\n __i18n.forEach(custom => {\n if ('locale' in custom && 'resource' in custom) {\n const { locale, resource } = custom;\n if (locale) {\n ret[locale] = ret[locale] || shared.create();\n shared.deepCopy(resource, ret[locale]);\n }\n else {\n shared.deepCopy(resource, ret);\n }\n }\n else {\n shared.isString(custom) && shared.deepCopy(JSON.parse(custom), ret);\n }\n });\n }\n // handle messages for flat json\n if (messageResolver == null && flatJson) {\n for (const key in ret) {\n if (shared.hasOwn(ret, key)) {\n handleFlatJson(ret[key]);\n }\n }\n }\n return ret;\n}\nfunction getComponentOptions(instance) {\n return instance.type;\n}\nfunction adjustI18nResources(gl, options, componentOptions) {\n // prettier-ignore\n let messages = shared.isObject(options.messages)\n ? options.messages\n : shared.create();\n if ('__i18nGlobal' in componentOptions) {\n messages = getLocaleMessages(gl.locale.value, {\n messages,\n __i18n: componentOptions.__i18nGlobal\n });\n }\n // merge locale messages\n const locales = Object.keys(messages);\n if (locales.length) {\n locales.forEach(locale => {\n gl.mergeLocaleMessage(locale, messages[locale]);\n });\n }\n {\n // merge datetime formats\n if (shared.isObject(options.datetimeFormats)) {\n const locales = Object.keys(options.datetimeFormats);\n if (locales.length) {\n locales.forEach(locale => {\n gl.mergeDateTimeFormat(locale, options.datetimeFormats[locale]);\n });\n }\n }\n // merge number formats\n if (shared.isObject(options.numberFormats)) {\n const locales = Object.keys(options.numberFormats);\n if (locales.length) {\n locales.forEach(locale => {\n gl.mergeNumberFormat(locale, options.numberFormats[locale]);\n });\n }\n }\n }\n}\nfunction createTextNode(key) {\n return vue.createVNode(vue.Text, null, key, 0);\n}\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n// extend VNode interface\nconst DEVTOOLS_META = '__INTLIFY_META__';\nconst NOOP_RETURN_ARRAY = () => [];\nconst NOOP_RETURN_FALSE = () => false;\nlet composerID = 0;\nfunction defineCoreMissingHandler(missing) {\n return ((ctx, locale, key, type) => {\n return missing(locale, key, vue.getCurrentInstance() || undefined, type);\n });\n}\n// for Intlify DevTools\n/* #__NO_SIDE_EFFECTS__ */\nconst getMetaInfo = () => {\n const instance = vue.getCurrentInstance();\n let meta = null;\n return instance && (meta = getComponentOptions(instance)[DEVTOOLS_META])\n ? { [DEVTOOLS_META]: meta }\n : null;\n};\n/**\n * Create composer interface factory\n *\n * @internal\n */\nfunction createComposer(options = {}) {\n const { __root, __injectWithOption } = options;\n const _isGlobal = __root === undefined;\n const flatJson = options.flatJson;\n const _ref = shared.inBrowser ? vue.ref : vue.shallowRef;\n let _inheritLocale = shared.isBoolean(options.inheritLocale)\n ? options.inheritLocale\n : true;\n const _locale = _ref(\n // prettier-ignore\n __root && _inheritLocale\n ? __root.locale.value\n : shared.isString(options.locale)\n ? options.locale\n : coreBase.DEFAULT_LOCALE);\n const _fallbackLocale = _ref(\n // prettier-ignore\n __root && _inheritLocale\n ? __root.fallbackLocale.value\n : shared.isString(options.fallbackLocale) ||\n shared.isArray(options.fallbackLocale) ||\n shared.isPlainObject(options.fallbackLocale) ||\n options.fallbackLocale === false\n ? options.fallbackLocale\n : _locale.value);\n const _messages = _ref(getLocaleMessages(_locale.value, options));\n // prettier-ignore\n const _datetimeFormats = _ref(shared.isPlainObject(options.datetimeFormats)\n ? options.datetimeFormats\n : { [_locale.value]: {} })\n ;\n // prettier-ignore\n const _numberFormats = _ref(shared.isPlainObject(options.numberFormats)\n ? options.numberFormats\n : { [_locale.value]: {} })\n ;\n // warning suppress options\n // prettier-ignore\n let _missingWarn = __root\n ? __root.missingWarn\n : shared.isBoolean(options.missingWarn) || shared.isRegExp(options.missingWarn)\n ? options.missingWarn\n : true;\n // prettier-ignore\n let _fallbackWarn = __root\n ? __root.fallbackWarn\n : shared.isBoolean(options.fallbackWarn) || shared.isRegExp(options.fallbackWarn)\n ? options.fallbackWarn\n : true;\n // prettier-ignore\n let _fallbackRoot = __root\n ? __root.fallbackRoot\n : shared.isBoolean(options.fallbackRoot)\n ? options.fallbackRoot\n : true;\n // configure fall back to root\n let _fallbackFormat = !!options.fallbackFormat;\n // runtime missing\n let _missing = shared.isFunction(options.missing) ? options.missing : null;\n let _runtimeMissing = shared.isFunction(options.missing)\n ? defineCoreMissingHandler(options.missing)\n : null;\n // postTranslation handler\n let _postTranslation = shared.isFunction(options.postTranslation)\n ? options.postTranslation\n : null;\n // prettier-ignore\n let _warnHtmlMessage = __root\n ? __root.warnHtmlMessage\n : shared.isBoolean(options.warnHtmlMessage)\n ? options.warnHtmlMessage\n : true;\n let _escapeParameter = !!options.escapeParameter;\n // custom linked modifiers\n // prettier-ignore\n const _modifiers = __root\n ? __root.modifiers\n : shared.isPlainObject(options.modifiers)\n ? options.modifiers\n : {};\n // pluralRules\n let _pluralRules = options.pluralRules || (__root && __root.pluralRules);\n // runtime context\n // eslint-disable-next-line prefer-const\n let _context;\n const getCoreContext = () => {\n _isGlobal && coreBase.setFallbackContext(null);\n const ctxOptions = {\n version: VERSION,\n locale: _locale.value,\n fallbackLocale: _fallbackLocale.value,\n messages: _messages.value,\n modifiers: _modifiers,\n pluralRules: _pluralRules,\n missing: _runtimeMissing === null ? undefined : _runtimeMissing,\n missingWarn: _missingWarn,\n fallbackWarn: _fallbackWarn,\n fallbackFormat: _fallbackFormat,\n unresolving: true,\n postTranslation: _postTranslation === null ? undefined : _postTranslation,\n warnHtmlMessage: _warnHtmlMessage,\n escapeParameter: _escapeParameter,\n messageResolver: options.messageResolver,\n messageCompiler: options.messageCompiler,\n __meta: { framework: 'vue' }\n };\n {\n ctxOptions.datetimeFormats = _datetimeFormats.value;\n ctxOptions.numberFormats = _numberFormats.value;\n ctxOptions.__datetimeFormatters = shared.isPlainObject(_context)\n ? _context.__datetimeFormatters\n : undefined;\n ctxOptions.__numberFormatters = shared.isPlainObject(_context)\n ? _context.__numberFormatters\n : undefined;\n }\n const ctx = coreBase.createCoreContext(ctxOptions);\n _isGlobal && coreBase.setFallbackContext(ctx);\n return ctx;\n };\n _context = getCoreContext();\n coreBase.updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);\n // track reactivity\n function trackReactivityValues() {\n return [\n _locale.value,\n _fallbackLocale.value,\n _messages.value,\n _datetimeFormats.value,\n _numberFormats.value\n ]\n ;\n }\n // locale\n const locale = vue.computed({\n get: () => _locale.value,\n set: val => {\n _context.locale = val;\n _locale.value = val;\n }\n });\n // fallbackLocale\n const fallbackLocale = vue.computed({\n get: () => _fallbackLocale.value,\n set: val => {\n _context.fallbackLocale = val;\n _fallbackLocale.value = val;\n coreBase.updateFallbackLocale(_context, _locale.value, val);\n }\n });\n // messages\n const messages = vue.computed(() => _messages.value);\n // datetimeFormats\n const datetimeFormats = /* #__PURE__*/ vue.computed(() => _datetimeFormats.value);\n // numberFormats\n const numberFormats = /* #__PURE__*/ vue.computed(() => _numberFormats.value);\n // getPostTranslationHandler\n function getPostTranslationHandler() {\n return shared.isFunction(_postTranslation) ? _postTranslation : null;\n }\n // setPostTranslationHandler\n function setPostTranslationHandler(handler) {\n _postTranslation = handler;\n _context.postTranslation = handler;\n }\n // getMissingHandler\n function getMissingHandler() {\n return _missing;\n }\n // setMissingHandler\n function setMissingHandler(handler) {\n if (handler !== null) {\n _runtimeMissing = defineCoreMissingHandler(handler);\n }\n _missing = handler;\n _context.missing = _runtimeMissing;\n }\n const wrapWithDeps = (fn, argumentParser, warnType, fallbackSuccess, fallbackFail, successCondition) => {\n trackReactivityValues(); // track reactive dependency\n // NOTE: experimental !!\n let ret;\n try {\n if (false || false) ;\n if (!_isGlobal) {\n _context.fallbackContext = __root\n ? coreBase.getFallbackContext()\n : undefined;\n }\n ret = fn(_context);\n }\n finally {\n if (!_isGlobal) {\n _context.fallbackContext = undefined;\n }\n }\n if ((warnType !== 'translate exists' && // for not `te` (e.g `t`)\n shared.isNumber(ret) &&\n ret === coreBase.NOT_REOSLVED) ||\n (warnType === 'translate exists' && !ret) // for `te`\n ) {\n const [key, arg2] = argumentParser();\n return __root && _fallbackRoot\n ? fallbackSuccess(__root)\n : fallbackFail(key);\n }\n else if (successCondition(ret)) {\n return ret;\n }\n else {\n /* istanbul ignore next */\n throw createI18nError(I18nErrorCodes.UNEXPECTED_RETURN_TYPE);\n }\n };\n // t\n function t(...args) {\n return wrapWithDeps(context => Reflect.apply(coreBase.translate, null, [context, ...args]), () => coreBase.parseTranslateArgs(...args), 'translate', root => Reflect.apply(root.t, root, [...args]), key => key, val => shared.isString(val));\n }\n // rt\n function rt(...args) {\n const [arg1, arg2, arg3] = args;\n if (arg3 && !shared.isObject(arg3)) {\n throw createI18nError(I18nErrorCodes.INVALID_ARGUMENT);\n }\n return t(...[arg1, arg2, shared.assign({ resolvedMessage: true }, arg3 || {})]);\n }\n // d\n function d(...args) {\n return wrapWithDeps(context => Reflect.apply(coreBase.datetime, null, [context, ...args]), () => coreBase.parseDateTimeArgs(...args), 'datetime format', root => Reflect.apply(root.d, root, [...args]), () => coreBase.MISSING_RESOLVE_VALUE, val => shared.isString(val));\n }\n // n\n function n(...args) {\n return wrapWithDeps(context => Reflect.apply(coreBase.number, null, [context, ...args]), () => coreBase.parseNumberArgs(...args), 'number format', root => Reflect.apply(root.n, root, [...args]), () => coreBase.MISSING_RESOLVE_VALUE, val => shared.isString(val));\n }\n // for custom processor\n function normalize(values) {\n return values.map(val => shared.isString(val) || shared.isNumber(val) || shared.isBoolean(val)\n ? createTextNode(String(val))\n : val);\n }\n const interpolate = (val) => val;\n const processor = {\n normalize,\n interpolate,\n type: 'vnode'\n };\n // translateVNode, using for `i18n-t` component\n function translateVNode(...args) {\n return wrapWithDeps(context => {\n let ret;\n const _context = context;\n try {\n _context.processor = processor;\n ret = Reflect.apply(coreBase.translate, null, [_context, ...args]);\n }\n finally {\n _context.processor = null;\n }\n return ret;\n }, () => coreBase.parseTranslateArgs(...args), 'translate', root => root[TranslateVNodeSymbol](...args), key => [createTextNode(key)], val => shared.isArray(val));\n }\n // numberParts, using for `i18n-n` component\n function numberParts(...args) {\n return wrapWithDeps(context => Reflect.apply(coreBase.number, null, [context, ...args]), () => coreBase.parseNumberArgs(...args), 'number format', root => root[NumberPartsSymbol](...args), NOOP_RETURN_ARRAY, val => shared.isString(val) || shared.isArray(val));\n }\n // datetimeParts, using for `i18n-d` component\n function datetimeParts(...args) {\n return wrapWithDeps(context => Reflect.apply(coreBase.datetime, null, [context, ...args]), () => coreBase.parseDateTimeArgs(...args), 'datetime format', root => root[DatetimePartsSymbol](...args), NOOP_RETURN_ARRAY, val => shared.isString(val) || shared.isArray(val));\n }\n function setPluralRules(rules) {\n _pluralRules = rules;\n _context.pluralRules = _pluralRules;\n }\n // te\n function te(key, locale) {\n return wrapWithDeps(() => {\n if (!key) {\n return false;\n }\n const targetLocale = shared.isString(locale) ? locale : _locale.value;\n const message = getLocaleMessage(targetLocale);\n const resolved = _context.messageResolver(message, key);\n return (coreBase.isMessageAST(resolved) ||\n coreBase.isMessageFunction(resolved) ||\n shared.isString(resolved));\n }, () => [key], 'translate exists', root => {\n return Reflect.apply(root.te, root, [key, locale]);\n }, NOOP_RETURN_FALSE, val => shared.isBoolean(val));\n }\n function resolveMessages(key) {\n let messages = null;\n const locales = coreBase.fallbackWithLocaleChain(_context, _fallbackLocale.value, _locale.value);\n for (let i = 0; i < locales.length; i++) {\n const targetLocaleMessages = _messages.value[locales[i]] || {};\n const messageValue = _context.messageResolver(targetLocaleMessages, key);\n if (messageValue != null) {\n messages = messageValue;\n break;\n }\n }\n return messages;\n }\n // tm\n function tm(key) {\n const messages = resolveMessages(key);\n // prettier-ignore\n return messages != null\n ? messages\n : __root\n ? __root.tm(key) || {}\n : {};\n }\n // getLocaleMessage\n function getLocaleMessage(locale) {\n return (_messages.value[locale] || {});\n }\n // setLocaleMessage\n function setLocaleMessage(locale, message) {\n if (flatJson) {\n const _message = { [locale]: message };\n for (const key in _message) {\n if (shared.hasOwn(_message, key)) {\n handleFlatJson(_message[key]);\n }\n }\n message = _message[locale];\n }\n _messages.value[locale] = message;\n _context.messages = _messages.value;\n }\n // mergeLocaleMessage\n function mergeLocaleMessage(locale, message) {\n _messages.value[locale] = _messages.value[locale] || {};\n const _message = { [locale]: message };\n if (flatJson) {\n for (const key in _message) {\n if (shared.hasOwn(_message, key)) {\n handleFlatJson(_message[key]);\n }\n }\n }\n message = _message[locale];\n shared.deepCopy(message, _messages.value[locale]);\n _context.messages = _messages.value;\n }\n // getDateTimeFormat\n function getDateTimeFormat(locale) {\n return _datetimeFormats.value[locale] || {};\n }\n // setDateTimeFormat\n function setDateTimeFormat(locale, format) {\n _datetimeFormats.value[locale] = format;\n _context.datetimeFormats = _datetimeFormats.value;\n coreBase.clearDateTimeFormat(_context, locale, format);\n }\n // mergeDateTimeFormat\n function mergeDateTimeFormat(locale, format) {\n _datetimeFormats.value[locale] = shared.assign(_datetimeFormats.value[locale] || {}, format);\n _context.datetimeFormats = _datetimeFormats.value;\n coreBase.clearDateTimeFormat(_context, locale, format);\n }\n // getNumberFormat\n function getNumberFormat(locale) {\n return _numberFormats.value[locale] || {};\n }\n // setNumberFormat\n function setNumberFormat(locale, format) {\n _numberFormats.value[locale] = format;\n _context.numberFormats = _numberFormats.value;\n coreBase.clearNumberFormat(_context, locale, format);\n }\n // mergeNumberFormat\n function mergeNumberFormat(locale, format) {\n _numberFormats.value[locale] = shared.assign(_numberFormats.value[locale] || {}, format);\n _context.numberFormats = _numberFormats.value;\n coreBase.clearNumberFormat(_context, locale, format);\n }\n // for debug\n composerID++;\n // watch root locale & fallbackLocale\n if (__root && shared.inBrowser) {\n vue.watch(__root.locale, (val) => {\n if (_inheritLocale) {\n _locale.value = val;\n _context.locale = val;\n coreBase.updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);\n }\n });\n vue.watch(__root.fallbackLocale, (val) => {\n if (_inheritLocale) {\n _fallbackLocale.value = val;\n _context.fallbackLocale = val;\n coreBase.updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);\n }\n });\n }\n // define basic composition API!\n const composer = {\n id: composerID,\n locale,\n fallbackLocale,\n get inheritLocale() {\n return _inheritLocale;\n },\n set inheritLocale(val) {\n _inheritLocale = val;\n if (val && __root) {\n _locale.value = __root.locale.value;\n _fallbackLocale.value = __root.fallbackLocale.value;\n coreBase.updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);\n }\n },\n get availableLocales() {\n return Object.keys(_messages.value).sort();\n },\n messages,\n get modifiers() {\n return _modifiers;\n },\n get pluralRules() {\n return _pluralRules || {};\n },\n get isGlobal() {\n return _isGlobal;\n },\n get missingWarn() {\n return _missingWarn;\n },\n set missingWarn(val) {\n _missingWarn = val;\n _context.missingWarn = _missingWarn;\n },\n get fallbackWarn() {\n return _fallbackWarn;\n },\n set fallbackWarn(val) {\n _fallbackWarn = val;\n _context.fallbackWarn = _fallbackWarn;\n },\n get fallbackRoot() {\n return _fallbackRoot;\n },\n set fallbackRoot(val) {\n _fallbackRoot = val;\n },\n get fallbackFormat() {\n return _fallbackFormat;\n },\n set fallbackFormat(val) {\n _fallbackFormat = val;\n _context.fallbackFormat = _fallbackFormat;\n },\n get warnHtmlMessage() {\n return _warnHtmlMessage;\n },\n set warnHtmlMessage(val) {\n _warnHtmlMessage = val;\n _context.warnHtmlMessage = val;\n },\n get escapeParameter() {\n return _escapeParameter;\n },\n set escapeParameter(val) {\n _escapeParameter = val;\n _context.escapeParameter = val;\n },\n t,\n getLocaleMessage,\n setLocaleMessage,\n mergeLocaleMessage,\n getPostTranslationHandler,\n setPostTranslationHandler,\n getMissingHandler,\n setMissingHandler,\n [SetPluralRulesSymbol]: setPluralRules\n };\n {\n composer.datetimeFormats = datetimeFormats;\n composer.numberFormats = numberFormats;\n composer.rt = rt;\n composer.te = te;\n composer.tm = tm;\n composer.d = d;\n composer.n = n;\n composer.getDateTimeFormat = getDateTimeFormat;\n composer.setDateTimeFormat = setDateTimeFormat;\n composer.mergeDateTimeFormat = mergeDateTimeFormat;\n composer.getNumberFormat = getNumberFormat;\n composer.setNumberFormat = setNumberFormat;\n composer.mergeNumberFormat = mergeNumberFormat;\n composer[InejctWithOptionSymbol] = __injectWithOption;\n composer[TranslateVNodeSymbol] = translateVNode;\n composer[DatetimePartsSymbol] = datetimeParts;\n composer[NumberPartsSymbol] = numberParts;\n }\n return composer;\n}\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * Convert to I18n Composer Options from VueI18n Options\n *\n * @internal\n */\nfunction convertComposerOptions(options) {\n const locale = shared.isString(options.locale) ? options.locale : coreBase.DEFAULT_LOCALE;\n const fallbackLocale = shared.isString(options.fallbackLocale) ||\n shared.isArray(options.fallbackLocale) ||\n shared.isPlainObject(options.fallbackLocale) ||\n options.fallbackLocale === false\n ? options.fallbackLocale\n : locale;\n const missing = shared.isFunction(options.missing) ? options.missing : undefined;\n const missingWarn = shared.isBoolean(options.silentTranslationWarn) ||\n shared.isRegExp(options.silentTranslationWarn)\n ? !options.silentTranslationWarn\n : true;\n const fallbackWarn = shared.isBoolean(options.silentFallbackWarn) ||\n shared.isRegExp(options.silentFallbackWarn)\n ? !options.silentFallbackWarn\n : true;\n const fallbackRoot = shared.isBoolean(options.fallbackRoot)\n ? options.fallbackRoot\n : true;\n const fallbackFormat = !!options.formatFallbackMessages;\n const modifiers = shared.isPlainObject(options.modifiers) ? options.modifiers : {};\n const pluralizationRules = options.pluralizationRules;\n const postTranslation = shared.isFunction(options.postTranslation)\n ? options.postTranslation\n : undefined;\n const warnHtmlMessage = shared.isString(options.warnHtmlInMessage)\n ? options.warnHtmlInMessage !== 'off'\n : true;\n const escapeParameter = !!options.escapeParameterHtml;\n const inheritLocale = shared.isBoolean(options.sync) ? options.sync : true;\n let messages = options.messages;\n if (shared.isPlainObject(options.sharedMessages)) {\n const sharedMessages = options.sharedMessages;\n const locales = Object.keys(sharedMessages);\n messages = locales.reduce((messages, locale) => {\n const message = messages[locale] || (messages[locale] = {});\n shared.assign(message, sharedMessages[locale]);\n return messages;\n }, (messages || {}));\n }\n const { __i18n, __root, __injectWithOption } = options;\n const datetimeFormats = options.datetimeFormats;\n const numberFormats = options.numberFormats;\n const flatJson = options.flatJson;\n return {\n locale,\n fallbackLocale,\n messages,\n flatJson,\n datetimeFormats,\n numberFormats,\n missing,\n missingWarn,\n fallbackWarn,\n fallbackRoot,\n fallbackFormat,\n modifiers,\n pluralRules: pluralizationRules,\n postTranslation,\n warnHtmlMessage,\n escapeParameter,\n messageResolver: options.messageResolver,\n inheritLocale,\n __i18n,\n __root,\n __injectWithOption\n };\n}\n/**\n * create VueI18n interface factory\n *\n * @internal\n *\n * @deprecated will be removed at vue-i18n v12\n */\nfunction createVueI18n(options = {}) {\n const composer = createComposer(convertComposerOptions(options));\n const { __extender } = options;\n // defines VueI18n\n const vueI18n = {\n // id\n id: composer.id,\n // locale\n get locale() {\n return composer.locale.value;\n },\n set locale(val) {\n composer.locale.value = val;\n },\n // fallbackLocale\n get fallbackLocale() {\n return composer.fallbackLocale.value;\n },\n set fallbackLocale(val) {\n composer.fallbackLocale.value = val;\n },\n // messages\n get messages() {\n return composer.messages.value;\n },\n // datetimeFormats\n get datetimeFormats() {\n return composer.datetimeFormats.value;\n },\n // numberFormats\n get numberFormats() {\n return composer.numberFormats.value;\n },\n // availableLocales\n get availableLocales() {\n return composer.availableLocales;\n },\n // missing\n get missing() {\n return composer.getMissingHandler();\n },\n set missing(handler) {\n composer.setMissingHandler(handler);\n },\n // silentTranslationWarn\n get silentTranslationWarn() {\n return shared.isBoolean(composer.missingWarn)\n ? !composer.missingWarn\n : composer.missingWarn;\n },\n set silentTranslationWarn(val) {\n composer.missingWarn = shared.isBoolean(val) ? !val : val;\n },\n // silentFallbackWarn\n get silentFallbackWarn() {\n return shared.isBoolean(composer.fallbackWarn)\n ? !composer.fallbackWarn\n : composer.fallbackWarn;\n },\n set silentFallbackWarn(val) {\n composer.fallbackWarn = shared.isBoolean(val) ? !val : val;\n },\n // modifiers\n get modifiers() {\n return composer.modifiers;\n },\n // formatFallbackMessages\n get formatFallbackMessages() {\n return composer.fallbackFormat;\n },\n set formatFallbackMessages(val) {\n composer.fallbackFormat = val;\n },\n // postTranslation\n get postTranslation() {\n return composer.getPostTranslationHandler();\n },\n set postTranslation(handler) {\n composer.setPostTranslationHandler(handler);\n },\n // sync\n get sync() {\n return composer.inheritLocale;\n },\n set sync(val) {\n composer.inheritLocale = val;\n },\n // warnInHtmlMessage\n get warnHtmlInMessage() {\n return composer.warnHtmlMessage ? 'warn' : 'off';\n },\n set warnHtmlInMessage(val) {\n composer.warnHtmlMessage = val !== 'off';\n },\n // escapeParameterHtml\n get escapeParameterHtml() {\n return composer.escapeParameter;\n },\n set escapeParameterHtml(val) {\n composer.escapeParameter = val;\n },\n // pluralizationRules\n get pluralizationRules() {\n return composer.pluralRules || {};\n },\n // for internal\n __composer: composer,\n // t\n t(...args) {\n return Reflect.apply(composer.t, composer, [...args]);\n },\n // rt\n rt(...args) {\n return Reflect.apply(composer.rt, composer, [...args]);\n },\n // te\n te(key, locale) {\n return composer.te(key, locale);\n },\n // tm\n tm(key) {\n return composer.tm(key);\n },\n // getLocaleMessage\n getLocaleMessage(locale) {\n return composer.getLocaleMessage(locale);\n },\n // setLocaleMessage\n setLocaleMessage(locale, message) {\n composer.setLocaleMessage(locale, message);\n },\n // mergeLocaleMessage\n mergeLocaleMessage(locale, message) {\n composer.mergeLocaleMessage(locale, message);\n },\n // d\n d(...args) {\n return Reflect.apply(composer.d, composer, [...args]);\n },\n // getDateTimeFormat\n getDateTimeFormat(locale) {\n return composer.getDateTimeFormat(locale);\n },\n // setDateTimeFormat\n setDateTimeFormat(locale, format) {\n composer.setDateTimeFormat(locale, format);\n },\n // mergeDateTimeFormat\n mergeDateTimeFormat(locale, format) {\n composer.mergeDateTimeFormat(locale, format);\n },\n // n\n n(...args) {\n return Reflect.apply(composer.n, composer, [...args]);\n },\n // getNumberFormat\n getNumberFormat(locale) {\n return composer.getNumberFormat(locale);\n },\n // setNumberFormat\n setNumberFormat(locale, format) {\n composer.setNumberFormat(locale, format);\n },\n // mergeNumberFormat\n mergeNumberFormat(locale, format) {\n composer.mergeNumberFormat(locale, format);\n }\n };\n vueI18n.__extender = __extender;\n return vueI18n;\n}\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\n/**\n * Supports compatibility for legacy vue-i18n APIs\n * This mixin is used when we use vue-i18n@v9.x or later\n */\nfunction defineMixin(vuei18n, composer, i18n) {\n return {\n beforeCreate() {\n const instance = vue.getCurrentInstance();\n /* istanbul ignore if */\n if (!instance) {\n throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);\n }\n const options = this.$options;\n if (options.i18n) {\n const optionsI18n = options.i18n;\n if (options.__i18n) {\n optionsI18n.__i18n = options.__i18n;\n }\n optionsI18n.__root = composer;\n if (this === this.$root) {\n // merge option and gttach global\n this.$i18n = mergeToGlobal(vuei18n, optionsI18n);\n }\n else {\n optionsI18n.__injectWithOption = true;\n optionsI18n.__extender = i18n.__vueI18nExtend;\n // atttach local VueI18n instance\n this.$i18n = createVueI18n(optionsI18n);\n // extend VueI18n instance\n const _vueI18n = this.$i18n;\n if (_vueI18n.__extender) {\n _vueI18n.__disposer = _vueI18n.__extender(this.$i18n);\n }\n }\n }\n else if (options.__i18n) {\n if (this === this.$root) {\n // merge option and gttach global\n this.$i18n = mergeToGlobal(vuei18n, options);\n }\n else {\n // atttach local VueI18n instance\n this.$i18n = createVueI18n({\n __i18n: options.__i18n,\n __injectWithOption: true,\n __extender: i18n.__vueI18nExtend,\n __root: composer\n });\n // extend VueI18n instance\n const _vueI18n = this.$i18n;\n if (_vueI18n.__extender) {\n _vueI18n.__disposer = _vueI18n.__extender(this.$i18n);\n }\n }\n }\n else {\n // attach global VueI18n instance\n this.$i18n = vuei18n;\n }\n if (options.__i18nGlobal) {\n adjustI18nResources(composer, options, options);\n }\n // defines vue-i18n legacy APIs\n this.$t = (...args) => this.$i18n.t(...args);\n this.$rt = (...args) => this.$i18n.rt(...args);\n this.$te = (key, locale) => this.$i18n.te(key, locale);\n this.$d = (...args) => this.$i18n.d(...args);\n this.$n = (...args) => this.$i18n.n(...args);\n this.$tm = (key) => this.$i18n.tm(key);\n i18n.__setInstance(instance, this.$i18n);\n },\n mounted() {\n },\n unmounted() {\n const instance = vue.getCurrentInstance();\n /* istanbul ignore if */\n if (!instance) {\n throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);\n }\n const _vueI18n = this.$i18n;\n delete this.$t;\n delete this.$rt;\n delete this.$te;\n delete this.$d;\n delete this.$n;\n delete this.$tm;\n if (_vueI18n.__disposer) {\n _vueI18n.__disposer();\n delete _vueI18n.__disposer;\n delete _vueI18n.__extender;\n }\n i18n.__deleteInstance(instance);\n delete this.$i18n;\n }\n };\n}\nfunction mergeToGlobal(g, options) {\n g.locale = options.locale || g.locale;\n g.fallbackLocale = options.fallbackLocale || g.fallbackLocale;\n g.missing = options.missing || g.missing;\n g.silentTranslationWarn =\n options.silentTranslationWarn || g.silentFallbackWarn;\n g.silentFallbackWarn = options.silentFallbackWarn || g.silentFallbackWarn;\n g.formatFallbackMessages =\n options.formatFallbackMessages || g.formatFallbackMessages;\n g.postTranslation = options.postTranslation || g.postTranslation;\n g.warnHtmlInMessage = options.warnHtmlInMessage || g.warnHtmlInMessage;\n g.escapeParameterHtml = options.escapeParameterHtml || g.escapeParameterHtml;\n g.sync = options.sync || g.sync;\n g.__composer[SetPluralRulesSymbol](options.pluralizationRules || g.pluralizationRules);\n const messages = getLocaleMessages(g.locale, {\n messages: options.messages,\n __i18n: options.__i18n\n });\n Object.keys(messages).forEach(locale => g.mergeLocaleMessage(locale, messages[locale]));\n if (options.datetimeFormats) {\n Object.keys(options.datetimeFormats).forEach(locale => g.mergeDateTimeFormat(locale, options.datetimeFormats[locale]));\n }\n if (options.numberFormats) {\n Object.keys(options.numberFormats).forEach(locale => g.mergeNumberFormat(locale, options.numberFormats[locale]));\n }\n return g;\n}\n\nconst baseFormatProps = {\n tag: {\n type: [String, Object]\n },\n locale: {\n type: String\n },\n scope: {\n type: String,\n // NOTE: avoid https://github.com/microsoft/rushstack/issues/1050\n validator: (val /* ComponentI18nScope */) => val === 'parent' || val === 'global',\n default: 'parent' /* ComponentI18nScope */\n },\n i18n: {\n type: Object\n }\n};\n\nfunction getInterpolateArg(\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n{ slots }, // SetupContext,\nkeys) {\n if (keys.length === 1 && keys[0] === 'default') {\n // default slot with list\n const ret = slots.default ? slots.default() : [];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return ret.reduce((slot, current) => {\n return [\n ...slot,\n // prettier-ignore\n ...(current.type === vue.Fragment ? current.children : [current])\n ];\n }, []);\n }\n else {\n // named slots\n return keys.reduce((arg, key) => {\n const slot = slots[key];\n if (slot) {\n arg[key] = slot();\n }\n return arg;\n }, shared.create());\n }\n}\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getFragmentableTag() {\n return vue.Fragment;\n}\n\nconst TranslationImpl = /*#__PURE__*/ vue.defineComponent({\n /* eslint-disable */\n name: 'i18n-t',\n props: shared.assign({\n keypath: {\n type: String,\n required: true\n },\n plural: {\n type: [Number, String],\n validator: (val) => shared.isNumber(val) || !isNaN(val)\n }\n }, baseFormatProps),\n /* eslint-enable */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n setup(props, context) {\n const { slots, attrs } = context;\n // NOTE: avoid https://github.com/microsoft/rushstack/issues/1050\n const i18n = props.i18n ||\n useI18n({\n useScope: props.scope,\n __useComponent: true\n });\n return () => {\n const keys = Object.keys(slots).filter(key => key !== '_');\n const options = shared.create();\n if (props.locale) {\n options.locale = props.locale;\n }\n if (props.plural !== undefined) {\n options.plural = shared.isString(props.plural) ? +props.plural : props.plural;\n }\n const arg = getInterpolateArg(context, keys);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const children = i18n[TranslateVNodeSymbol](props.keypath, arg, options);\n const assignedAttrs = shared.assign(shared.create(), attrs);\n const tag = shared.isString(props.tag) || shared.isObject(props.tag)\n ? props.tag\n : getFragmentableTag();\n return vue.h(tag, assignedAttrs, children);\n };\n }\n});\n/**\n * export the public type for h/tsx inference\n * also to avoid inline import() in generated d.ts files\n */\n/**\n * Translation Component\n *\n * @remarks\n * See the following items for property about details\n *\n * @VueI18nSee [TranslationProps](component#translationprops)\n * @VueI18nSee [BaseFormatProps](component#baseformatprops)\n * @VueI18nSee [Component Interpolation](../guide/advanced/component)\n *\n * @example\n * ```html\n * <div id=\"app\">\n * <!-- ... -->\n * <i18n keypath=\"term\" tag=\"label\" for=\"tos\">\n * <a :href=\"url\" target=\"_blank\">{{ $t('tos') }}</a>\n * </i18n>\n * <!-- ... -->\n * </div>\n * ```\n * ```js\n * import { createApp } from 'vue'\n * import { createI18n } from 'vue-i18n'\n *\n * const messages = {\n * en: {\n * tos: 'Term of Service',\n * term: 'I accept xxx {0}.'\n * },\n * ja: {\n * tos: '利用規約',\n * term: '私は xxx の{0}に同意します。'\n * }\n * }\n *\n * const i18n = createI18n({\n * locale: 'en',\n * messages\n * })\n *\n * const app = createApp({\n * data: {\n * url: '/term'\n * }\n * }).use(i18n).mount('#app')\n * ```\n *\n * @VueI18nComponent\n */\nconst Translation = TranslationImpl;\nconst I18nT = Translation;\n\nfunction isVNode(target) {\n return shared.isArray(target) && !shared.isString(target[0]);\n}\nfunction renderFormatter(props, context, slotKeys, partFormatter) {\n const { slots, attrs } = context;\n return () => {\n const options = { part: true };\n let overrides = shared.create();\n if (props.locale) {\n options.locale = props.locale;\n }\n if (shared.isString(props.format)) {\n options.key = props.format;\n }\n else if (shared.isObject(props.format)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (shared.isString(props.format.key)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n options.key = props.format.key;\n }\n // Filter out number format options only\n overrides = Object.keys(props.format).reduce((options, prop) => {\n return slotKeys.includes(prop)\n ? shared.assign(shared.create(), options, { [prop]: props.format[prop] }) // eslint-disable-line @typescript-eslint/no-explicit-any\n : options;\n }, shared.create());\n }\n const parts = partFormatter(...[props.value, options, overrides]);\n let children = [options.key];\n if (shared.isArray(parts)) {\n children = parts.map((part, index) => {\n const slot = slots[part.type];\n const node = slot\n ? slot({ [part.type]: part.value, index, parts })\n : [part.value];\n if (isVNode(node)) {\n node[0].key = `${part.type}-${index}`;\n }\n return node;\n });\n }\n else if (shared.isString(parts)) {\n children = [parts];\n }\n const assignedAttrs = shared.assign(shared.create(), attrs);\n const tag = shared.isString(props.tag) || shared.isObject(props.tag)\n ? props.tag\n : getFragmentableTag();\n return vue.h(tag, assignedAttrs, children);\n };\n}\n\nconst NumberFormatImpl = /*#__PURE__*/ vue.defineComponent({\n /* eslint-disable */\n name: 'i18n-n',\n props: shared.assign({\n value: {\n type: Number,\n required: true\n },\n format: {\n type: [String, Object]\n }\n }, baseFormatProps),\n /* eslint-enable */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n setup(props, context) {\n const i18n = props.i18n ||\n useI18n({\n useScope: props.scope,\n __useComponent: true\n });\n return renderFormatter(props, context, coreBase.NUMBER_FORMAT_OPTIONS_KEYS, (...args) => \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n i18n[NumberPartsSymbol](...args));\n }\n});\n/**\n * export the public type for h/tsx inference\n * also to avoid inline import() in generated d.ts files\n */\n/**\n * Number Format Component\n *\n * @remarks\n * See the following items for property about details\n *\n * @VueI18nSee [FormattableProps](component#formattableprops)\n * @VueI18nSee [BaseFormatProps](component#baseformatprops)\n * @VueI18nSee [Custom Formatting](../guide/essentials/number#custom-formatting)\n *\n * @VueI18nDanger\n * Not supported IE, due to no support `Intl.NumberFormat#formatToParts` in [IE](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/formatToParts)\n *\n * If you want to use it, you need to use [polyfill](https://github.com/formatjs/formatjs/tree/main/packages/intl-numberformat)\n *\n * @VueI18nComponent\n */\nconst NumberFormat = NumberFormatImpl;\nconst I18nN = NumberFormat;\n\nfunction getComposer$1(i18n, instance) {\n const i18nInternal = i18n;\n if (i18n.mode === 'composition') {\n return (i18nInternal.__getInstance(instance) || i18n.global);\n }\n else {\n const vueI18n = i18nInternal.__getInstance(instance);\n return vueI18n != null\n ? vueI18n.__composer\n : i18n.global.__composer;\n }\n}\n/**\n * @deprecated will be removed at vue-i18n v12\n */\nfunction vTDirective(i18n) {\n const _process = (binding) => {\n const { instance, value } = binding;\n /* istanbul ignore if */\n if (!instance || !instance.$) {\n throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);\n }\n const composer = getComposer$1(i18n, instance.$);\n const parsedValue = parseValue(value);\n return [\n Reflect.apply(composer.t, composer, [...makeParams(parsedValue)]),\n composer\n ];\n };\n const register = (el, binding) => {\n const [textContent, composer] = _process(binding);\n if (shared.inBrowser && i18n.global === composer) {\n // global scope only\n el.__i18nWatcher = vue.watch(composer.locale, () => {\n binding.instance && binding.instance.$forceUpdate();\n });\n }\n el.__composer = composer;\n el.textContent = textContent;\n };\n const unregister = (el) => {\n if (shared.inBrowser && el.__i18nWatcher) {\n el.__i18nWatcher();\n el.__i18nWatcher = undefined;\n delete el.__i18nWatcher;\n }\n if (el.__composer) {\n el.__composer = undefined;\n delete el.__composer;\n }\n };\n const update = (el, { value }) => {\n if (el.__composer) {\n const composer = el.__composer;\n const parsedValue = parseValue(value);\n el.textContent = Reflect.apply(composer.t, composer, [\n ...makeParams(parsedValue)\n ]);\n }\n };\n const getSSRProps = (binding) => {\n const [textContent] = _process(binding);\n return { textContent };\n };\n return {\n created: register,\n unmounted: unregister,\n beforeUpdate: update,\n getSSRProps\n };\n}\nfunction parseValue(value) {\n if (shared.isString(value)) {\n return { path: value };\n }\n else if (shared.isPlainObject(value)) {\n if (!('path' in value)) {\n throw createI18nError(I18nErrorCodes.REQUIRED_VALUE, 'path');\n }\n return value;\n }\n else {\n throw createI18nError(I18nErrorCodes.INVALID_VALUE);\n }\n}\nfunction makeParams(value) {\n const { path, locale, args, choice, plural } = value;\n const options = {};\n const named = args || {};\n if (shared.isString(locale)) {\n options.locale = locale;\n }\n if (shared.isNumber(choice)) {\n options.plural = choice;\n }\n if (shared.isNumber(plural)) {\n options.plural = plural;\n }\n return [path, named, options];\n}\n\nfunction apply(app, i18n, ...options) {\n const pluginOptions = shared.isPlainObject(options[0])\n ? options[0]\n : {};\n const globalInstall = shared.isBoolean(pluginOptions.globalInstall)\n ? pluginOptions.globalInstall\n : true;\n if (globalInstall) {\n [Translation.name, 'I18nT'].forEach(name => app.component(name, Translation));\n [NumberFormat.name, 'I18nN'].forEach(name => app.component(name, NumberFormat));\n [DatetimeFormat.name, 'I18nD'].forEach(name => app.component(name, DatetimeFormat));\n }\n // install directive\n {\n app.directive('t', vTDirective(i18n));\n }\n}\n\n/**\n * Injection key for {@link useI18n}\n *\n * @remarks\n * The global injection key for I18n instances with `useI18n`. this injection key is used in Web Components.\n * Specify the i18n instance created by {@link createI18n} together with `provide` function.\n *\n * @VueI18nGeneral\n */\nconst I18nInjectionKey = \n/* #__PURE__*/ shared.makeSymbol('global-vue-i18n');\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction createI18n(options = {}) {\n // prettier-ignore\n const __legacyMode = shared.isBoolean(options.legacy)\n ? options.legacy\n : true;\n // prettier-ignore\n const __globalInjection = shared.isBoolean(options.globalInjection)\n ? options.globalInjection\n : true;\n const __instances = new Map();\n const [globalScope, __global] = createGlobal(options, __legacyMode);\n const symbol = /* #__PURE__*/ shared.makeSymbol('');\n function __getInstance(component) {\n return __instances.get(component) || null;\n }\n function __setInstance(component, instance) {\n __instances.set(component, instance);\n }\n function __deleteInstance(component) {\n __instances.delete(component);\n }\n const i18n = {\n // mode\n get mode() {\n return __legacyMode\n ? 'legacy'\n : 'composition';\n },\n // install plugin\n async install(app, ...options) {\n // setup global provider\n app.__VUE_I18N_SYMBOL__ = symbol;\n app.provide(app.__VUE_I18N_SYMBOL__, i18n);\n // set composer & vuei18n extend hook options from plugin options\n if (shared.isPlainObject(options[0])) {\n const opts = options[0];\n i18n.__composerExtend =\n opts.__composerExtend;\n i18n.__vueI18nExtend =\n opts.__vueI18nExtend;\n }\n // global method and properties injection for Composition API\n let globalReleaseHandler = null;\n if (!__legacyMode && __globalInjection) {\n globalReleaseHandler = injectGlobalFields(app, i18n.global);\n }\n // install built-in components and directive\n {\n apply(app, i18n, ...options);\n }\n // setup mixin for Legacy API\n if (__legacyMode) {\n app.mixin(defineMixin(__global, __global.__composer, i18n));\n }\n // release global scope\n const unmountApp = app.unmount;\n app.unmount = () => {\n globalReleaseHandler && globalReleaseHandler();\n i18n.dispose();\n unmountApp();\n };\n },\n // global accessor\n get global() {\n return __global;\n },\n dispose() {\n globalScope.stop();\n },\n // @internal\n __instances,\n // @internal\n __getInstance,\n // @internal\n __setInstance,\n // @internal\n __deleteInstance\n };\n return i18n;\n}\nfunction useI18n(options = {}) {\n const instance = vue.getCurrentInstance();\n if (instance == null) {\n throw createI18nError(I18nErrorCodes.MUST_BE_CALL_SETUP_TOP);\n }\n if (!instance.isCE &&\n instance.appContext.app != null &&\n !instance.appContext.app.__VUE_I18N_SYMBOL__) {\n throw createI18nError(I18nErrorCodes.NOT_INSTALLED);\n }\n const i18n = getI18nInstance(instance);\n const gl = getGlobalComposer(i18n);\n const componentOptions = getComponentOptions(instance);\n const scope = getScope(options, componentOptions);\n if (scope === 'global') {\n adjustI18nResources(gl, options, componentOptions);\n return gl;\n }\n if (scope === 'parent') {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let composer = getComposer(i18n, instance, options.__useComponent);\n if (composer == null) {\n composer = gl;\n }\n return composer;\n }\n const i18nInternal = i18n;\n let composer = i18nInternal.__getInstance(instance);\n if (composer == null) {\n const composerOptions = shared.assign({}, options);\n if ('__i18n' in componentOptions) {\n composerOptions.__i18n = componentOptions.__i18n;\n }\n if (gl) {\n composerOptions.__root = gl;\n }\n composer = createComposer(composerOptions);\n if (i18nInternal.__composerExtend) {\n composer[DisposeSymbol] =\n i18nInternal.__composerExtend(composer);\n }\n setupLifeCycle(i18nInternal, instance, composer);\n i18nInternal.__setInstance(instance, composer);\n }\n return composer;\n}\nfunction createGlobal(options, legacyMode) {\n const scope = vue.effectScope();\n const obj = legacyMode\n ? scope.run(() => createVueI18n(options))\n : scope.run(() => createComposer(options));\n if (obj == null) {\n throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);\n }\n return [scope, obj];\n}\nfunction getI18nInstance(instance) {\n const i18n = vue.inject(!instance.isCE\n ? instance.appContext.app.__VUE_I18N_SYMBOL__\n : I18nInjectionKey);\n /* istanbul ignore if */\n if (!i18n) {\n throw createI18nError(!instance.isCE\n ? I18nErrorCodes.UNEXPECTED_ERROR\n : I18nErrorCodes.NOT_INSTALLED_WITH_PROVIDE);\n }\n return i18n;\n}\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getScope(options, componentOptions) {\n // prettier-ignore\n return shared.isEmptyObject(options)\n ? ('__i18n' in componentOptions)\n ? 'local'\n : 'global'\n : !options.useScope\n ? 'local'\n : options.useScope;\n}\nfunction getGlobalComposer(i18n) {\n // prettier-ignore\n return i18n.mode === 'composition'\n ? i18n.global\n : i18n.global.__composer;\n}\nfunction getComposer(i18n, target, useComponent = false) {\n let composer = null;\n const root = target.root;\n let current = getParentComponentInstance(target, useComponent);\n while (current != null) {\n const i18nInternal = i18n;\n if (i18n.mode === 'composition') {\n composer = i18nInternal.__getInstance(current);\n }\n else {\n {\n const vueI18n = i18nInternal.__getInstance(current);\n if (vueI18n != null) {\n composer = vueI18n\n .__composer;\n if (useComponent &&\n composer &&\n !composer[InejctWithOptionSymbol] // eslint-disable-line @typescript-eslint/no-explicit-any\n ) {\n composer = null;\n }\n }\n }\n }\n if (composer != null) {\n break;\n }\n if (root === current) {\n break;\n }\n current = current.parent;\n }\n return composer;\n}\nfunction getParentComponentInstance(target, useComponent = false) {\n if (target == null) {\n return null;\n }\n // if `useComponent: true` will be specified, we get lexical scope owner instance for use-case slots\n return !useComponent\n ? target.parent\n : target.vnode.ctx || target.parent; // eslint-disable-line @typescript-eslint/no-explicit-any\n}\nfunction setupLifeCycle(i18n, target, composer) {\n vue.onMounted(() => {\n }, target);\n vue.onUnmounted(() => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const _composer = composer;\n i18n.__deleteInstance(target);\n // dispose extended resources\n const dispose = _composer[DisposeSymbol];\n if (dispose) {\n dispose();\n delete _composer[DisposeSymbol];\n }\n }, target);\n}\nconst globalExportProps = [\n 'locale',\n 'fallbackLocale',\n 'availableLocales'\n];\nconst globalExportMethods = ['t', 'rt', 'd', 'n', 'tm', 'te']\n ;\nfunction injectGlobalFields(app, composer) {\n const i18n = Object.create(null);\n globalExportProps.forEach(prop => {\n const desc = Object.getOwnPropertyDescriptor(composer, prop);\n if (!desc) {\n throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);\n }\n const wrap = vue.isRef(desc.value) // check computed props\n ? {\n get() {\n return desc.value.value;\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n set(val) {\n desc.value.value = val;\n }\n }\n : {\n get() {\n return desc.get && desc.get();\n }\n };\n Object.defineProperty(i18n, prop, wrap);\n });\n app.config.globalProperties.$i18n = i18n;\n globalExportMethods.forEach(method => {\n const desc = Object.getOwnPropertyDescriptor(composer, method);\n if (!desc || !desc.value) {\n throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);\n }\n Object.defineProperty(app.config.globalProperties, `$${method}`, desc);\n });\n const dispose = () => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n delete app.config.globalProperties.$i18n;\n globalExportMethods.forEach(method => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n delete app.config.globalProperties[`$${method}`];\n });\n };\n return dispose;\n}\n\nconst DatetimeFormatImpl = /* #__PURE__*/ vue.defineComponent({\n /* eslint-disable */\n name: 'i18n-d',\n props: shared.assign({\n value: {\n type: [Number, Date],\n required: true\n },\n format: {\n type: [String, Object]\n }\n }, baseFormatProps),\n /* eslint-enable */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n setup(props, context) {\n const i18n = props.i18n ||\n useI18n({\n useScope: props.scope,\n __useComponent: true\n });\n return renderFormatter(props, context, coreBase.DATETIME_FORMAT_OPTIONS_KEYS, (...args) => \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n i18n[DatetimePartsSymbol](...args));\n }\n});\n/**\n * Datetime Format Component\n *\n * @remarks\n * See the following items for property about details\n *\n * @VueI18nSee [FormattableProps](component#formattableprops)\n * @VueI18nSee [BaseFormatProps](component#baseformatprops)\n * @VueI18nSee [Custom Formatting](../guide/essentials/datetime#custom-formatting)\n *\n * @VueI18nDanger\n * Not supported IE, due to no support `Intl.DateTimeFormat#formatToParts` in [IE](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/formatToParts)\n *\n * If you want to use it, you need to use [polyfill](https://github.com/formatjs/formatjs/tree/main/packages/intl-datetimeformat)\n *\n * @VueI18nComponent\n */\nconst DatetimeFormat = DatetimeFormatImpl;\nconst I18nD = DatetimeFormat;\n\n// register message compiler at vue-i18n\ncoreBase.registerMessageCompiler(coreBase.compile);\n// register message resolver at vue-i18n\ncoreBase.registerMessageResolver(coreBase.resolveValue);\n// register fallback locale at vue-i18n\ncoreBase.registerLocaleFallbacker(coreBase.fallbackWithLocaleChain);\n\nexports.DatetimeFormat = DatetimeFormat;\nexports.I18nD = I18nD;\nexports.I18nInjectionKey = I18nInjectionKey;\nexports.I18nN = I18nN;\nexports.I18nT = I18nT;\nexports.NumberFormat = NumberFormat;\nexports.Translation = Translation;\nexports.VERSION = VERSION;\nexports.createI18n = createI18n;\nexports.useI18n = useI18n;\nexports.vTDirective = vTDirective;\n","import { pinkLog, redLog } from '@/views/setting/util';\nimport { acquireVsCodeApi, electronApi, getPlatform } from './platform';\n\nexport interface VSCodeMessage {\n\tcommand: string;\n\tdata?: unknown;\n\tcallbackId?: string;\n}\n\nexport interface RestFulResponse {\n\tcode: number;\n\tmsg: any;\n}\n\nexport type MessageHandler = (message: VSCodeMessage) => void;\nexport type CommandHandler = (data: any) => void;\n\ninterface AddCommandListenerOption {\n\tonce: boolean // 只调用一次就销毁\n}\n\nexport class MessageBridge {\n\tprivate ws: WebSocket | null = null;\n\tprivate handlers = new Map<string, Set<CommandHandler>>();\n\tprivate isConnected: Promise<boolean> | null = null;\n\n\tconstructor(\n\t\tprivate setupSignature: any\n\t) {\n\n\t\tconst platform = getPlatform();\n\n\t\tswitch (platform) {\n\t\t\tcase 'vscode':\n\t\t\t\tthis.setupVsCodeListener();\n\t\t\t\tpinkLog('当前模式: vscode');\n\t\t\t\tbreak;\n\n\t\t\tcase 'electron':\n\t\t\t\tthis.setupElectronListener();\n\t\t\t\tpinkLog('当前模式: electron');\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'nodejs':\n\t\t\t\tthis.setupNodejsListener();\n\t\t\t\tpinkLog('当前模式: nodejs');\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'web':\n\t\t\t\tthis.setupWebSocket();\n\t\t\t\tpinkLog('当前模式: web');\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\t// VS Code 环境监听\n\tprivate setupVsCodeListener() {\n\t\tconst vscode = acquireVsCodeApi();\n\n\t\twindow.addEventListener('message', (event: MessageEvent<VSCodeMessage>) => {\n\t\t\tthis.dispatchMessage(event.data);\n\t\t});\n\n\t\tthis.postMessage = (message) => vscode.postMessage(message);\n\t}\n\n\t// WebSocket 环境连接\n\tprivate setupWebSocket() {\n\n\t\tconst wsUrl = this.setupSignature;\n\n\t\tif (typeof wsUrl !== 'string') {\n\t\t\tthrow new Error('setupSignature must be a string');\n\t\t}\n\n\t\tthis.ws = new WebSocket(wsUrl);\n\n\t\tthis.ws.onmessage = (event) => {\n\t\t\ttry {\t\t\t\t\n\t\t\t\tconst message = JSON.parse(event.data) as VSCodeMessage;\n\t\t\t\tthis.dispatchMessage(message);\n\t\t\t} catch (err) {\n\t\t\t\tconsole.error('Message parse error:', err);\n\t\t\t\tconsole.log(event);\n\t\t\t}\n\t\t};\n\n\t\tthis.ws.onclose = () => {\n\t\t\tredLog('WebSocket connection closed');\n\t\t};\n\n\t\tthis.postMessage = (message) => {\n\t\t\tif (this.ws?.readyState === WebSocket.OPEN) {\n\t\t\t\tconsole.log('send', message);\n\t\t\t\tthis.ws.send(JSON.stringify(message));\n\t\t\t}\n\t\t};\n\n\t\tconst ws = this.ws;\n\n\t\tthis.isConnected = new Promise<boolean>((resolve, reject) => {\n\t\t\tws.onopen = () => {\n\t\t\t\tresolve(true);\n\t\t\t};\n\t\t});\n\t}\n\n\tpublic async awaitForWebsockt() {\n\t\tif (this.isConnected) {\n\t\t\tawait this.isConnected;\n\t\t}\n\t}\n\n\tprivate setupElectronListener() {\n\t\telectronApi.onReply((event: MessageEvent<VSCodeMessage>) => {\n\t\t\tconsole.log(event);\n\t\t\tthis.dispatchMessage(event.data);\n\t\t});\n\n\t\tthis.postMessage = (message) => {\n\t\t\tconsole.log(message);\n\t\t\telectronApi.sendToMain(message);\n\t\t};\t\t\n\t}\n\n\tprivate setupNodejsListener() {\n\t\tconsole.log('setup');\n\t\t\n\t\tconst emitter = this.setupSignature;\n\t\tif (!emitter.on || !emitter.emit) {\n\t\t\treturn;\n\t\t}\n\n\t\temitter.on('message/service', (message: VSCodeMessage) => {\n\t\t\tthis.dispatchMessage(message);\n\t\t});\n\n\t\tthis.postMessage = (message) => {\n\t\t\temitter.emit('message/renderer', message);\n\t\t};\n\t}\n\n\t/**\n\t * @description 对 message 发起调度,根据 command 类型获取调取器\n\t * @param message \n\t */\n\tprivate dispatchMessage(message: VSCodeMessage) {\n\t\tconst command = message.command;\n\t\tconst data = message.data;\n\n\t\tconst handlers = this.handlers.get(command) || [];\n\t\thandlers.forEach(handler => handler(data));\n\t}\n\n\tpublic postMessage(message: VSCodeMessage) {\n\t\tthrow new Error('PostMessage not initialized');\n\t}\n\n\t/**\n\t * @description 注册一个命令的执行器(支持一次性或持久监听)\n\t * @example\n\t * // 基本用法(持久监听)\n\t * const removeListener = bridge.addCommandListener('message', (data) => {\n\t * console.log('收到消息:', data.msg.text);\n\t * }, { once: false });\n\t * \n\t * // 稍后取消监听\n\t * removeListener();\n\t * \n\t * @example\n\t * // 一次性监听(自动移除)\n\t * bridge.addCommandListener('connect', (data) => {\n\t * const { code, msg } = data;\n\t * console.log(`连接结果: ${code === 200 ? '成功' : '失败'}`);\n\t * }, { once: true });\n\t */\n\tpublic addCommandListener(\n\t\tcommand: string,\n\t\tcommandHandler: CommandHandler,\n\t\toption: AddCommandListenerOption\n\t): () => boolean {\n\t\tif (!this.handlers.has(command)) {\n\t\t\tthis.handlers.set(command, new Set<CommandHandler>());\n\t\t}\n\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\tconst commandHandlers = this.handlers.get(command)!;\n\n\t\tconst wrapperCommandHandler = option.once ? (data: any) => {\n\t\t\tcommandHandler(data);\n\t\t\tcommandHandlers.delete(wrapperCommandHandler);\n\t\t} : commandHandler;\n\n\t\tcommandHandlers.add(wrapperCommandHandler);\n\t\treturn () => commandHandlers.delete(wrapperCommandHandler);\n\t}\n\n\t/**\n\t * @description do as axios does\n\t * @param command \n\t * @param data \n\t * @returns \n\t */\n\tpublic commandRequest(command: string, data?: any) {\n\t\treturn new Promise<RestFulResponse>((resolve, reject) => {\n\t\t\tthis.addCommandListener(command, (data) => {\n\t\t\t\tresolve(data as RestFulResponse);\n\t\t\t}, { once: true });\n\n\t\t\tthis.postMessage({\n\t\t\t\tcommand,\n\t\t\t\tdata\n\t\t\t});\n\t\t});\n\t}\n\n\tpublic destroy() {\n\t\tthis.ws?.close();\n\t\tthis.handlers.clear();\n\t}\n}\n\n// 单例实例\nlet messageBridge: MessageBridge;\n\n// 向外暴露一个独立函数,保证 MessageBridge 是单例的\nexport function useMessageBridge() {\n\tif (!messageBridge) {\n\t\tmessageBridge = new MessageBridge('ws://localhost:8080');\n\t}\n\tconst bridge = messageBridge;\n\n\treturn bridge;\n}","export type OpenMcpSupportPlatform = 'web' | 'vscode' | 'electron' | 'nodejs';\n\nexport const acquireVsCodeApi = (window as any)['acquireVsCodeApi'];\nexport const electronApi = (window as any)['electronApi'];\nexport const isNodejs = (window as any)['nodejs'];\n\nexport function getPlatform(): OpenMcpSupportPlatform {\n if (acquireVsCodeApi) {\n return 'vscode';\n } else if (electronApi) {\n return 'electron';\n } else if (isNodejs) {\n return 'nodejs';\n } else {\n return 'web';\n }\n}","import type { ToolCallContent, ToolItem } from \"@/hook/type\";\nimport { Ref, ref } from \"vue\";\n\nimport type { OpenAI } from 'openai';\ntype ChatCompletionChunk = OpenAI.Chat.Completions.ChatCompletionChunk;\n\nexport enum MessageState {\n ServerError = 'server internal error',\n ReceiveChunkError = 'receive chunk error',\n Timeout = 'timeout',\n MaxEpochs = 'max epochs',\n Unknown = 'unknown error',\n Abort = 'abort',\n ToolCall = 'tool call failed',\n None = 'none',\n Success = 'success',\n ParseJsonError = 'parse json error'\n}\n\nexport interface IExtraInfo {\n created: number,\n state: MessageState,\n serverName: string,\n usage?: ChatCompletionChunk['usage'];\n [key: string]: any;\n}\n\nexport interface ToolMessage {\n role: 'tool';\n index: number;\n content: ToolCallContent[];\n tool_call_id?: string\n name?: string // 工具名称,当 role 为 tool\n tool_calls?: ToolCall[],\n extraInfo: IExtraInfo\n}\n\nexport interface TextMessage {\n role: 'user' | 'assistant' | 'system';\n content: string;\n tool_call_id?: string\n name?: string // 工具名称,当 role 为 tool\n tool_calls?: ToolCall[],\n extraInfo: IExtraInfo\n}\n\nexport type ChatMessage = ToolMessage | TextMessage;\n\n// 新增状态和工具数据\ninterface EnableToolItem {\n\tname: string;\n\tdescription: string;\n\tenabled: boolean;\n}\n\nexport interface ChatSetting {\n modelIndex: number\n systemPrompt: string\n enableTools: EnableToolItem[]\n temperature: number\n enableWebSearch: boolean\n contextLength: number\n}\n\nexport interface ChatStorage {\n\tmessages: ChatMessage[]\n settings: ChatSetting\n}\n\nexport interface ToolCall {\n id?: string;\n index?: number;\n type: string;\n function: {\n name: string;\n arguments: string;\n }\n}\n\ninterface PromptTextItem {\n type: 'prompt'\n text: string\n}\n\ninterface ResourceTextItem {\n type: 'resource'\n text: string\n}\n\ninterface TextItem {\n type: 'text'\n text: string\n}\n\nexport type RichTextItem = PromptTextItem | ResourceTextItem | TextItem;\n\nexport const allTools = ref<ToolItem[]>([]);\n\nexport interface ICommonRenderMessage {\n role: 'user' | 'assistant/content';\n content: string;\n showJson?: Ref<boolean>;\n extraInfo: IExtraInfo;\n}\n\nexport interface IToolRenderMessage {\n role: 'assistant/tool_calls';\n content: string;\n toolResults: ToolCallContent[][];\n tool_calls: ToolCall[];\n showJson?: Ref<boolean>;\n extraInfo: IExtraInfo; \n}\n\nexport type IRenderMessage = ICommonRenderMessage | IToolRenderMessage;\n\nexport function getToolSchema(enableTools: EnableToolItem[]) {\n const toolsSchema = [];\n\tfor (let i = 0; i < enableTools.length; i++) {\n\t\tif (enableTools[i].enabled) {\n\t\t\tconst tool = allTools.value[i];\n\t\t\t\n\t\t\ttoolsSchema.push({\n\t\t\t\ttype: 'function',\n\t\t\t\tfunction: {\n\t\t\t\t\tname: tool.name,\n\t\t\t\t\tdescription: tool.description || \"\",\n\t\t\t\t\tparameters: tool.inputSchema\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n return toolsSchema;\n}\n\nexport interface EditorContext {\n editor: Ref<HTMLDivElement>;\n [key: string]: any;\n}","import { ToolCallResponse } from \"@/hook/type\";\nimport { callTool } from \"../../tool/tools\";\nimport { MessageState, ToolCall } from \"../chat-box/chat\";\n\nexport async function handleToolCalls(toolCall: ToolCall) {\n // 反序列化 streaming 来的参数字符串\n const toolName = toolCall.function.name;\n const argsResult = deserializeToolCallResponse(toolCall.function.arguments);\n \n if (argsResult.error) {\n return {\n content: [{\n type: 'error',\n text: parseErrorObject(argsResult.error)\n }],\n state: MessageState.ParseJsonError\n };\n }\n\n const toolArgs = argsResult.value;\n\n // 进行调用,根据结果返回不同的值\n const toolResponse = await callTool(toolName, toolArgs);\n return handleToolResponse(toolResponse);\n}\n\nfunction deserializeToolCallResponse(toolArgs: string) {\n try {\n const args = JSON.parse(toolArgs);\n return {\n value: args,\n error: undefined\n }\n } catch (error) {\n return {\n value: undefined,\n error\n }\n }\n}\n\nfunction handleToolResponse(toolResponse: ToolCallResponse) {\n if (typeof toolResponse === 'string') {\n // 如果是 string,说明是错误信息\n console.log(toolResponse);\n\n\n return {\n content: [{\n type: 'error',\n text: toolResponse\n }],\n state: MessageState.ToolCall\n }\n\n } else if (!toolResponse.isError) {\n\n return {\n content: toolResponse.content,\n state: MessageState.Success\n };\n\n } else {\n\n return {\n content: toolResponse.content,\n state: MessageState.ToolCall\n };\n\n }\n}\n\nfunction parseErrorObject(error: any): string {\n if (typeof error === 'string') {\n return error;\n } else if (typeof error === 'object') {\n return JSON.stringify(error, null, 2);\n } else {\n return error.toString();\n }\n}","","import { watch, reactive } from 'vue';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport Resource from './resource/index.vue';\nimport Chat from './chat/index.vue';\nimport Prompt from './prompt/index.vue';\nimport Tool from './tool/index.vue';\nimport I18n from '@/i18n/index';\nimport { safeSavePanels, savePanels } from '@/hook/panel';\n\nconst { t } = I18n.global;\n\ninterface Tab {\n\tid: string;\n\tname: string;\n\ticon: string;\n\ttype: string;\n\tcomponent: any;\n\tcomponentIndex: number;\n\tstorage: Record<string, any>;\n}\n\nexport const debugModes = [\n\tResource, Prompt, Tool, Chat\n]\n\n// TODO: 实现对于 tabs 这个数据的可持久化\nexport const tabs = reactive<{\n\tcontent: Tab[]\n\tactiveIndex: number\n\tactiveTab: Tab\n}>({\n\tcontent: [\n\t\tcreateTab('blank', 1)\n\t],\n\tactiveIndex: 0,\n\tget activeTab() {\n\t\treturn this.content[this.activeIndex];\n\t}\n});\n\nlet tabCounter = 1;\n\n// 监控 tabs\n\nwatch(\n\t() => tabs,\n\t(newValue, oldValue) => {\n\t\tsafeSavePanels();\n\t},\n\t{ deep: true }\n);\n\nexport function createTab(type: string, index: number): Tab {\n\tlet customName: string | null = null;\n\tconst id = uuidv4();\n\n\treturn {\n\t\tget name() {\n\t\t\tif (customName !== null) {\n\t\t\t\treturn customName;\n\t\t\t}\n\t\t\treturn t('blank-test') + ` ${index}`;\n\t\t},\n\t\tset name(value: string) {\n\t\t\tcustomName = value; // 允许外部修改 name\n\t\t},\n\t\ticon: 'icon-blank',\n\t\ttype,\n\t\tid,\n\t\tcomponentIndex: -1,\n\t\tcomponent: undefined,\n\t\tstorage: {},\n\t};\n}\n\nexport function addNewTab() {\n\tconst newTab = createTab('blank', ++tabCounter);\n\ttabs.content.push(newTab);\n\ttabs.activeIndex = tabs.content.length - 1;\n}\n\n\nexport function closeTab(index: number) {\n\tif (tabs.content.length <= 1) return; // 至少保留一个标签页\n\n\ttabs.content.splice(index, 1);\n\n\tconsole.log(tabs.content);\n\n\t// 调整活动标签索引\n\tif (tabs.activeIndex >= index) {\n\t\ttabs.activeIndex = Math.max(0, tabs.activeIndex - 1);\n\t}\n}","","","","import { useMessageBridge } from '@/api/message-bridge';\nimport { mcpSetting } from '@/hook/mcp';\nimport { ToolsListResponse, ToolCallResponse, CasualRestAPI } from '@/hook/type';\nimport { pinkLog } from '@/views/setting/util';\nimport { reactive } from 'vue';\n\nexport const toolsManager = reactive<{\n tools: ToolsListResponse['tools']\n}>({\n tools: []\n});\n\nexport interface ToolStorage {\n currentToolName: string;\n lastToolCallResponse?: ToolCallResponse | string;\n formData: Record<string, any>;\n}\n\nconst bridge = useMessageBridge();\n\nexport function callTool(toolName: string, toolArgs: Record<string, any>) {\n return new Promise<ToolCallResponse>((resolve, reject) => {\n bridge.addCommandListener('tools/call', (data: CasualRestAPI<ToolCallResponse>) => {\n console.log(data.msg);\n\n if (data.code !== 200) {\n resolve(data.msg);\n } else {\n resolve(data.msg);\n }\n }, { once: true });\n \n bridge.postMessage({\n command: 'tools/call',\n data: {\n toolName,\n toolArgs: JSON.parse(JSON.stringify(toolArgs)),\n callToolOption: {\n timeout: mcpSetting.timeout * 1000\n }\n }\n });\n });\n}","import { reactive } from \"vue\";\n\ninterface TypeAble {\n type: string;\n}\n\nexport function getDefaultValue(property: TypeAble): any { \n if (property.type === 'number' || property.type === 'integer') {\n return 0;\n } else if (property.type === 'boolean') {\n return false;\n } else if (property.type === 'object') {\n return {};\n } else {\n return '';\n }\n}\n\nexport function normaliseJavascriptType(type: string) {\n switch (type) {\n case 'integer':\n return 'number';\n case 'number':\n return 'number';\n case 'boolean':\n return 'boolean';\n case 'string':\n return 'string';\n default:\n return 'string';\n }\n}\n\nexport const mcpSetting = reactive({\n timeout: 60,\n});","import { useMessageBridge } from \"@/api/message-bridge\";\nimport { pinkLog } from \"@/views/setting/util\";\nimport { debugModes, tabs } from \"@/components/main-panel/panel\";\nimport { markRaw, ref, nextTick } from \"vue\";\nimport { v4 as uuidv4 } from 'uuid';\n\ninterface SaveTabItem {\n\tname: string;\n\ticon: string;\n\ttype: string;\n\tcomponentIndex: number;\n\tstorage: Record<string, any>;\n}\n\ninterface SaveTab {\n\ttabs: SaveTabItem[]\n\tcurrentIndex: number\n}\n\nexport const panelLoaded = ref(false);\n\nexport function loadPanels() {\n\n\treturn new Promise((resolve, reject) => {\n\t\tconst bridge = useMessageBridge();\n \n\t\tbridge.addCommandListener('panel/load', data => {\n\t\t\tif (data.code !== 200) {\n\t\t\t\tpinkLog('tabs 加载失败');\n\t\t\t\tconsole.log(data.msg);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tconst persistTab = data.msg as SaveTab;\t\t\t\t\n\t\n\t\t\t\tpinkLog('tabs 加载成功');\n\t\t\n\t\t\t\tif (persistTab.tabs.length === 0) {\n\t\t\t\t\t// 空的,直接返回不需要管\n\t\t\t\t\tpanelLoaded.value = true;\n\t\t\t\t\tresolve(void 0);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttabs.activeIndex = 0;\n\t\t\t\ttabs.content = [];\n\t\t\n\t\t\t\tfor (const tab of persistTab.tabs || []) {\n\t\t\t\t\t\n\t\t\t\t\tconst component = tab.componentIndex >= 0? markRaw(debugModes[tab.componentIndex]) : undefined;\n\t\t\n\t\t\t\t\ttabs.content.push({\n\t\t\t\t\t\tid: uuidv4(),\n\t\t\t\t\t\tname: tab.name,\n\t\t\t\t\t\ticon: tab.icon,\n\t\t\t\t\t\ttype: tab.type,\n\t\t\t\t\t\tcomponentIndex: tab.componentIndex,\n\t\t\t\t\t\tcomponent: component,\n\t\t\t\t\t\tstorage: tab.storage\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\n\t\t\t\ttabs.activeIndex = persistTab.currentIndex;\t\t\t\t\n\t\t\t}\n\t\n\t\t\tpanelLoaded.value = true;\n\t\t\tresolve(void 0);\n\t\t}, { once: true });\n\t\n\t\tbridge.postMessage({\n\t\t\tcommand: 'panel/load'\n\t\t});\n\t});\n}\n\nlet debounceHandler: NodeJS.Timeout;\n\nexport function safeSavePanels() {\n\tclearTimeout(debounceHandler);\n\tdebounceHandler = setTimeout(() => {\n\t\tsavePanels();\n\t}, 100);\n}\n\nexport function savePanels(saveHandler?: () => void) {\n\t// // 没有完成 panel 加载就不保存\n\t// if (!panelLoaded.value) {\n\t// \treturn;\n\t// }\n\n const bridge = useMessageBridge();\n\n const saveTabs: SaveTab = {\n\t\tcurrentIndex: tabs.activeIndex,\n\t\ttabs: []\n\t};\n\tfor (const tab of tabs.content) {\n\t\tsaveTabs.tabs.push({\n\t\t\tname: tab.name,\n\t\t\ticon: tab.icon,\n\t\t\ttype: tab.type,\n\t\t\tcomponentIndex: tab.componentIndex,\n\t\t\tstorage: JSON.parse(JSON.stringify(tab.storage))\n\t\t});\n\t}\n\n bridge.addCommandListener('panel/save', data => {\n const saveStatusCode = data.code;\n pinkLog('配置保存状态:' + saveStatusCode);\n \n if (saveHandler) {\n saveHandler();\n }\n }, { once: true });\n\n bridge.postMessage({\n command: 'panel/save',\n data: saveTabs\n });\n}","import { createI18n } from 'vue-i18n';\n\nimport en from './en.json';\nimport zh from './zh-cn.json';\nimport zhTw from './zh-tw.json';\nimport ja from './ja.json';\nimport de from './de.json';\nimport ko from './ko.json';\nimport ru from './ru.json';\nimport fr from './fr.json';\nimport ar from './ar.json';\n\nconst i18n = createI18n({\n legacy: false,\n locale: 'zh',\n warnHtmlMessage: false,\n messages: { en, zh, zhTw, ja, de, ko, ru, fr, ar }\n});\n\nexport default i18n;","import { markRaw, reactive } from 'vue';\nimport { createTab, debugModes, tabs } from '@/components/main-panel/panel';\nimport { ToolStorage } from '@/components/main-panel/tool/tools';\nimport { ToolCall } from '@/components/main-panel/chat/chat-box/chat';\n\nimport I18n from '@/i18n';\nconst { t } = I18n.global;\n\nexport const llms = reactive<any[]>([]);\n\nexport const llmManager = reactive({\n\tcurrentModelIndex: 0,\n});\n\nexport function createTest(call: ToolCall) {\n\tconst tab = createTab('tool', 0);\n\ttab.componentIndex = 2;\n\ttab.component = markRaw(debugModes[2]);\n\ttab.icon = 'icon-tool';\n\ttab.name = t(\"tools\");\n\t\n\tconst storage: ToolStorage = {\n\t\tcurrentToolName: call.function.name,\n\t\tformData: JSON.parse(call.function.arguments)\n\t};\n\n\ttab.storage = storage;\n\ttabs.content.push(tab);\n\ttabs.activeIndex = tabs.content.length - 1;\n}","const pinkLogStyle = 'background-color: #CB81DA; color: white; padding: 3px; border-radius: 3px;';\nconst redLogStyle = 'background-color:rgb(227, 91, 49); color: white; padding: 3px; border-radius: 3px;';\n\n\n/**\n * @description 粉色log, 代表客户端发送的信息\n * @param message \n */\nexport function pinkLog(message: string) {\n console.log('%c' + message, pinkLogStyle);\n}\n\n/**\n * @description 红色log, 代表错误信息\n * @param message \n */\nexport function redLog(message: string) {\n console.log('%c' + message, redLogStyle);\n}\n\n/**\n * @description 绿色log, 代表服务器发送的信息\n * @param message \n */\nexport function greenLog(message: string) {\n console.log('%c' + message, 'background-color:rgb(100, 200, 100); color: white; padding: 3px; border-radius: 3px;');\n}","module.exports = require(\"crypto\");","module.exports = require(\"./tools.js\");","module.exports = require(\"vue\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","/* eslint-disable */\nimport { ref, type Ref } from \"vue\";\nimport { ToolCall, ChatStorage, getToolSchema, MessageState } from \"../chat-box/chat\";\nimport { useMessageBridge, MessageBridge } from \"@/api/message-bridge\";\nimport type { OpenAI } from 'openai';\nimport { llmManager, llms } from \"@/views/setting/llm\";\nimport { pinkLog, redLog } from \"@/views/setting/util\";\nimport { ElMessage } from \"element-plus\";\nimport { handleToolCalls } from \"./handle-tool-calls\";\nimport { getPlatform } from \"@/api/platform\";\n\nexport type ChatCompletionChunk = OpenAI.Chat.Completions.ChatCompletionChunk;\nexport type ChatCompletionCreateParamsBase = OpenAI.Chat.Completions.ChatCompletionCreateParams & { id?: string };\nexport interface TaskLoopOptions {\n maxEpochs?: number;\n maxJsonParseRetry?: number;\n adapter?: any;\n}\n\nexport interface IErrorMssage {\n state: MessageState,\n msg: string\n}\n\nexport interface IDoConversationResult {\n stop: boolean;\n}\n\n\n/**\n * @description 对任务循环进行的抽象封装\n */\nexport class TaskLoop {\n private bridge: MessageBridge;\n private streamingContent: Ref<string>;\n private streamingToolCalls: Ref<ToolCall[]>;\n\n private currentChatId = '';\n private onError: (error: IErrorMssage) => void = (msg) => {};\n private onChunk: (chunk: ChatCompletionChunk) => void = (chunk) => {};\n private onDone: () => void = () => {};\n private onEpoch: () => void = () => {};\n private completionUsage: ChatCompletionChunk['usage'] | undefined;\n private llmConfig: any;\n\n constructor(\n private readonly taskOptions: TaskLoopOptions = { maxEpochs: 20, maxJsonParseRetry: 3, adapter: undefined },\n ) {\n this.streamingContent = ref('');\n this.streamingToolCalls = ref([]);\n\n // 根据当前环境决定是否要开启 messageBridge\n const platform = getPlatform();\n if (platform === 'nodejs') {\n\n const adapter = taskOptions.adapter;\n\n if (!adapter) {\n throw new Error('adapter is required');\n }\n\n this.bridge = new MessageBridge(adapter.emitter);\n } else {\n this.bridge = useMessageBridge();\n } \n }\n\n private handleChunkDeltaContent(chunk: ChatCompletionChunk) {\n const content = chunk.choices[0]?.delta?.content || '';\n if (content) {\n this.streamingContent.value += content;\n }\n }\n\n private handleChunkDeltaToolCalls(chunk: ChatCompletionChunk) {\n const toolCall = chunk.choices[0]?.delta?.tool_calls?.[0];\n \n if (toolCall) {\n const currentCall = this.streamingToolCalls.value[toolCall.index];\n\n if (currentCall === undefined) {\n // 新的工具调用开始\n this.streamingToolCalls.value[toolCall.index] = {\n id: toolCall.id,\n index: toolCall.index,\n type: 'function',\n function: {\n name: toolCall.function?.name || '',\n arguments: toolCall.function?.arguments || ''\n }\n };\n } else {\n // 累积现有工具调用的信息\n if (currentCall) {\n if (toolCall.id) {\n currentCall.id = toolCall.id;\n }\n if (toolCall.function?.name) {\n currentCall.function.name = toolCall.function.name;\n }\n if (toolCall.function?.arguments) {\n currentCall.function.arguments += toolCall.function.arguments; \n }\n }\n }\n\n } \n }\n\n private handleChunkUsage(chunk: ChatCompletionChunk) {\n const usage = chunk.usage;\n if (usage) {\n this.completionUsage = usage;\n }\n }\n\n private doConversation(chatData: ChatCompletionCreateParamsBase) {\n\n return new Promise<IDoConversationResult>((resolve, reject) => {\n const chunkHandler = this.bridge.addCommandListener('llm/chat/completions/chunk', data => {\n // data.code 一定为 200,否则不会走这个 route\n const { chunk } = data.msg as { chunk: ChatCompletionChunk };\n\n // 处理增量的 content 和 tool_calls\n this.handleChunkDeltaContent(chunk);\n this.handleChunkDeltaToolCalls(chunk);\n this.handleChunkUsage(chunk);\n \n this.onChunk(chunk);\n }, { once: false });\n \n const doneHandler = this.bridge.addCommandListener('llm/chat/completions/done', data => { \n this.onDone();\n chunkHandler();\n errorHandler();\n\n resolve({\n stop: false\n });\n }, { once: true });\n\n const errorHandler = this.bridge.addCommandListener('llm/chat/completions/error', data => {\n this.onError({\n state: MessageState.ReceiveChunkError,\n msg: data.msg || '请求模型服务时发生错误'\n });\n\n chunkHandler();\n doneHandler();\n\n resolve({\n stop: true\n });\n\n }, { once: true });\n\n // console.log(chatData);\n\n this.bridge.postMessage({\n command: 'llm/chat/completions',\n data: JSON.parse(JSON.stringify(chatData)),\n });\n });\n }\n\n public makeChatData(tabStorage: ChatStorage): ChatCompletionCreateParamsBase | undefined {\n const baseURL = this.getLlmConfig().baseUrl;\n const apiKey = this.getLlmConfig().userToken || '';\n \n if (apiKey.trim() === '') {\n \n if (tabStorage.messages.length > 0 && tabStorage.messages[tabStorage.messages.length - 1].role === 'user') {\n tabStorage.messages.pop();\n ElMessage.error('请先设置 API Key');\n }\n return undefined;\n }\n \n const model = this.getLlmConfig().userModel;\n const temperature = tabStorage.settings.temperature;\n const tools = getToolSchema(tabStorage.settings.enableTools);\n\n const userMessages = [];\n if (tabStorage.settings.systemPrompt) {\n userMessages.push({\n role: 'system',\n content: tabStorage.settings.systemPrompt\n });\n }\n\n // 如果超出了 tabStorage.settings.contextLength, 则删除最早的消息\n const loadMessages = tabStorage.messages.slice(- tabStorage.settings.contextLength);\n userMessages.push(...loadMessages);\n\n // 增加一个id用于锁定状态\n const id = crypto.randomUUID();\n\n const chatData = {\n id,\n baseURL,\n apiKey,\n model,\n temperature,\n tools,\n messages: userMessages,\n } as ChatCompletionCreateParamsBase;\n\n return chatData;\n }\n\n public abort() {\n this.bridge.postMessage({\n command: 'llm/chat/completions/abort',\n data: {\n id: this.currentChatId\n }\n });\n this.streamingContent.value = '';\n this.streamingToolCalls.value = [];\n }\n\n public registerOnError(handler: (msg: IErrorMssage) => void) {\n this.onError = handler;\n }\n\n public registerOnChunk(handler: (chunk: ChatCompletionChunk) => void) {\n this.onChunk = handler;\n }\n \n public registerOnDone(handler: () => void) {\n this.onDone = handler;\n }\n\n public registerOnEpoch(handler: () => void) {\n this.onEpoch = handler;\n }\n\n public setMaxEpochs(maxEpochs: number) {\n this.taskOptions.maxEpochs = maxEpochs;\n }\n\n /**\n * @description 设置当前的 LLM 配置,用于 nodejs 环境运行\n * @param config \n * @example\n * setLlmConfig({\n * id: 'openai',\n * baseUrl: 'https://api.openai.com/v1',\n * userToken: 'sk-xxx',\n * userModel: 'gpt-3.5-turbo',\n * })\n */\n public setLlmConfig(config: any) {\n this.llmConfig = config;\n }\n\n public bindStreaming(content: Ref<string>, toolCalls: Ref<ToolCall[]>) {\n this.streamingContent = content;\n this.streamingToolCalls = toolCalls;\n }\n\n public getLlmConfig() {\n if (this.llmConfig) {\n return this.llmConfig;\n }\n return llms[llmManager.currentModelIndex];\n }\n\n public async connectToService() {\n \n }\n\n /**\n * @description 开启循环,异步更新 DOM\n */\n public async start(tabStorage: ChatStorage, userMessage: string) {\n // 添加目前的消息\n tabStorage.messages.push({\n role: 'user',\n content: userMessage,\n extraInfo: {\n created: Date.now(),\n state: MessageState.Success,\n serverName: this.getLlmConfig().id || 'unknown'\n }\n });\n\n let jsonParseErrorRetryCount = 0;\n const maxEpochs = this.taskOptions.maxEpochs || 20;\n\n for (let i = 0; i < maxEpochs; ++ i) {\n\n this.onEpoch();\n\n // 初始累计清空\n this.streamingContent.value = '';\n this.streamingToolCalls.value = [];\n this.completionUsage = undefined;\n\n // 构造 chatData\n const chatData = this.makeChatData(tabStorage);\n\n if (!chatData) {\n this.onDone();\n break;\n }\n\n this.currentChatId = chatData.id!;\n\n // 发送请求\n const doConverationResult = await this.doConversation(chatData);\n\n console.log('[doConverationResult] Response');\n console.log(doConverationResult);\n\n // 如果存在需要调度的工具\n if (this.streamingToolCalls.value.length > 0) {\n\n tabStorage.messages.push({\n role: 'assistant',\n content: this.streamingContent.value || '',\n tool_calls: this.streamingToolCalls.value,\n extraInfo: {\n created: Date.now(),\n state: MessageState.Success,\n serverName: this.getLlmConfig().id || 'unknown'\n }\n });\n \n pinkLog('调用工具数量:' + this.streamingToolCalls.value.length);\n\n for (const toolCall of this.streamingToolCalls.value || []) {\n const toolCallResult = await handleToolCalls(toolCall);\n \n if (toolCallResult.state === MessageState.ParseJsonError) {\n // 如果是因为解析 JSON 错误,则重新开始\n tabStorage.messages.pop();\n jsonParseErrorRetryCount ++;\n \n redLog('解析 JSON 错误 ' + toolCall?.function?.arguments);\n \n // 如果因为 JSON 错误而失败太多,就只能中断了\n if (jsonParseErrorRetryCount >= (this.taskOptions.maxJsonParseRetry || 3)) {\n tabStorage.messages.push({\n role: 'assistant',\n content: `解析 JSON 错误,无法继续调用工具 (累计错误次数 ${this.taskOptions.maxJsonParseRetry})`,\n extraInfo: {\n created: Date.now(),\n state: toolCallResult.state,\n serverName: this.getLlmConfig().id || 'unknown',\n usage: undefined\n }\n });\n break;\n }\n } else if (toolCallResult.state === MessageState.Success) {\n tabStorage.messages.push({\n role: 'tool',\n index: toolCall.index || 0,\n tool_call_id: toolCall.id || toolCall.function.name,\n content: toolCallResult.content,\n extraInfo: {\n created: Date.now(),\n state: toolCallResult.state,\n serverName: this.getLlmConfig().id || 'unknown',\n usage: this.completionUsage\n }\n });\n } else if (toolCallResult.state === MessageState.ToolCall) {\n \n tabStorage.messages.push({\n role: 'tool',\n index: toolCall.index || 0,\n tool_call_id: toolCall.id || toolCall.function.name,\n content: toolCallResult.content,\n extraInfo: {\n created: Date.now(),\n state: toolCallResult.state,\n serverName: this.getLlmConfig().id || 'unknown',\n usage: this.completionUsage\n }\n });\n }\n }\n\n } else if (this.streamingContent.value) {\n tabStorage.messages.push({\n role: 'assistant',\n content: this.streamingContent.value,\n extraInfo: {\n created: Date.now(),\n state: MessageState.Success,\n serverName: this.getLlmConfig().id || 'unknown',\n usage: this.completionUsage\n }\n });\n break;\n\n } else {\n // 一些提示\n break;\n }\n\n // 回答聚合完成后根据 stop 来决定是否提前中断\n if (doConverationResult.stop) {\n break;\n }\n }\n }\n}"],"names":[],"sourceRoot":""}
|
1
|
+
{"version":3,"file":"task-loop.js","mappings":";;;;;;;;IAOA,IAAIA,EAAkB,kCAAQ,+EAC1BC,EAAS,wBAAQ,2DAErB,SAASC,EAAOC,GAEZ,OADaC,GAGjB,SAAqBA,EAAKD,GACtB,MAAME,GAkBWC,EAlBQH,EAmBlBI,EAAaD,EAAME,IAD9B,IAAqBF,EAjBjB,GAAY,MAARD,EACA,MAAMI,EAAwB,GAGlC,GAAa,IADAC,EAAYL,GACc,CACnC,MACMM,EAed,SAAsBL,GAClB,OAAOC,EAAaD,EAAMM,EAAa,GAC3C,CAjBsBC,CADCR,GAEf,OAAOD,EAAIU,OAAOH,EAAMI,QAAO,CAACC,EAAUC,IAAM,IACzCD,EACHE,EAAmBd,EAAKa,KACzB,IACP,CAEI,OAAOC,EAAmBd,EAAKC,EAEvC,C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owB,eAAermC,IAAM,UACtC2lC,WAAOr1C,KAGf,KACJ,OACO83C,EAAe/c,QAAU,EAAA2U,aAAaY,SAatCwH,EAAe/c,QAAU,EAAA2U,aAAaU,WAZ7CyF,EAAW33C,SAAS0G,KAAK,CACrBuxC,KAAM,OACN32C,MAAOowC,EAASpwC,OAAS,EACzBw4C,aAAcpI,EAASlgC,IAAMkgC,EAASP,SAASlsC,KAC/C+uB,QAAS4lB,EAAe5lB,QACxBwlB,UAAW,CACP1Q,QAAS1lC,KAAKC,MACdw5B,MAAO+c,EAAe/c,MACtB4c,WAAYhyB,KAAKowB,eAAermC,IAAM,UACtC2lC,MAAO1vB,KAAK8uB,kBAkB5B,CAqBJ,GAAIoD,EAAoB1L,KACpB,KAER,CACJ,E","sources":["webpack://openmcp/./renderer/node_modules/@intlify/core-base/dist/core-base.cjs","webpack://openmcp/./renderer/node_modules/@intlify/message-compiler/dist/message-compiler.cjs","webpack://openmcp/./renderer/node_modules/@intlify/shared/dist/shared.cjs","webpack://openmcp/./renderer/node_modules/source-map-js/lib/array-set.js","webpack://openmcp/./renderer/node_modules/source-map-js/lib/base64-vlq.js","webpack://openmcp/./renderer/node_modules/source-map-js/lib/base64.js","webpack://openmcp/./renderer/node_modules/source-map-js/lib/binary-search.js","webpack://openmcp/./renderer/node_modules/source-map-js/lib/mapping-list.js","webpack://openmcp/./renderer/node_modules/source-map-js/lib/quick-sort.js","webpack://openmcp/./renderer/node_modules/source-map-js/lib/source-map-consumer.js","webpack://openmcp/./renderer/node_modules/source-map-js/lib/source-map-generator.js","webpack://openmcp/./renderer/node_modules/source-map-js/lib/source-node.js","webpack://openmcp/./renderer/node_modules/source-map-js/lib/util.js","webpack://openmcp/./renderer/node_modules/source-map-js/source-map.js","webpack://openmcp/./renderer/node_modules/uuid/dist/cjs/index.js","webpack://openmcp/./renderer/node_modules/uuid/dist/cjs/max.js","webpack://openmcp/./renderer/node_modules/uuid/dist/cjs/md5.js","webpack://openmcp/./renderer/node_modules/uuid/dist/cjs/native.js","webpack://openmcp/./renderer/node_modules/uuid/dist/cjs/nil.js","webpack://openmcp/./renderer/node_modules/uuid/dist/cjs/parse.js","webpack://openmcp/./renderer/node_modules/uuid/dist/cjs/regex.js","webpack://openmcp/./renderer/node_modules/uuid/dist/cjs/rng.js","webpack://openmcp/./renderer/node_modules/uuid/dist/cjs/sha1.js","webpack://openmcp/./renderer/node_modules/uuid/dist/cjs/stringify.js","webpack://openmcp/./renderer/node_modules/uuid/dist/cjs/v1.js","webpack://openmcp/./renderer/node_modules/uuid/dist/cjs/v1ToV6.js","webpack://openmcp/./renderer/node_modules/uuid/dist/cjs/v3.js","webpack://openmcp/./renderer/node_modules/uuid/dist/cjs/v35.js","webpack://openmcp/./renderer/node_modules/uuid/dist/cjs/v4.js","webpack://openmcp/./renderer/node_modules/uuid/dist/cjs/v5.js","webpack://openmcp/./renderer/node_modules/uuid/dist/cjs/v6.js","webpack://openmcp/./renderer/node_modules/uuid/dist/cjs/v6ToV1.js","webpack://openmcp/./renderer/node_modules/uuid/dist/cjs/v7.js","webpack://openmcp/./renderer/node_modules/uuid/dist/cjs/validate.js","webpack://openmcp/./renderer/node_modules/uuid/dist/cjs/version.js","webpack://openmcp/./renderer/node_modules/vue-i18n/dist/vue-i18n.cjs","webpack://openmcp/./renderer/src/api/message-bridge.ts","webpack://openmcp/./renderer/src/api/platform.ts","webpack://openmcp/./renderer/src/components/main-panel/chat/chat-box/chat.ts","webpack://openmcp/./renderer/src/components/main-panel/chat/core/handle-tool-calls.ts","webpack://openmcp/./renderer/src/components/main-panel/panel.ts","webpack://openmcp/./renderer/src/components/main-panel/tool/tools.ts","webpack://openmcp/./renderer/src/hook/mcp.ts","webpack://openmcp/./renderer/src/hook/panel.ts","webpack://openmcp/./renderer/src/i18n/index.ts","webpack://openmcp/./renderer/src/views/setting/llm.ts","webpack://openmcp/./renderer/src/views/setting/util.ts","webpack://openmcp/external node-commonjs \"crypto\"","webpack://openmcp/external commonjs2 \"./tools.js\"","webpack://openmcp/external commonjs2 \"vue\"","webpack://openmcp/webpack/bootstrap","webpack://openmcp/./renderer/src/components/main-panel/chat/core/task-loop.ts"],"sourcesContent":["/*!\n * core-base v11.1.2\n * (c) 2025 kazuya kawaguchi\n * Released under the MIT License.\n */\n'use strict';\n\nvar messageCompiler = require('@intlify/message-compiler');\nvar shared = require('@intlify/shared');\n\nfunction format(ast) {\n const msg = (ctx) => formatParts(ctx, ast);\n return msg;\n}\nfunction formatParts(ctx, ast) {\n const body = resolveBody(ast);\n if (body == null) {\n throw createUnhandleNodeError(0 /* NodeTypes.Resource */);\n }\n const type = resolveType(body);\n if (type === 1 /* NodeTypes.Plural */) {\n const plural = body;\n const cases = resolveCases(plural);\n return ctx.plural(cases.reduce((messages, c) => [\n ...messages,\n formatMessageParts(ctx, c)\n ], []));\n }\n else {\n return formatMessageParts(ctx, body);\n }\n}\nconst PROPS_BODY = ['b', 'body'];\nfunction resolveBody(node) {\n return resolveProps(node, PROPS_BODY);\n}\nconst PROPS_CASES = ['c', 'cases'];\nfunction resolveCases(node) {\n return resolveProps(node, PROPS_CASES, []);\n}\nfunction formatMessageParts(ctx, node) {\n const static_ = resolveStatic(node);\n if (static_ != null) {\n return ctx.type === 'text'\n ? static_\n : ctx.normalize([static_]);\n }\n else {\n const messages = resolveItems(node).reduce((acm, c) => [...acm, formatMessagePart(ctx, c)], []);\n return ctx.normalize(messages);\n }\n}\nconst PROPS_STATIC = ['s', 'static'];\nfunction resolveStatic(node) {\n return resolveProps(node, PROPS_STATIC);\n}\nconst PROPS_ITEMS = ['i', 'items'];\nfunction resolveItems(node) {\n return resolveProps(node, PROPS_ITEMS, []);\n}\nfunction formatMessagePart(ctx, node) {\n const type = resolveType(node);\n switch (type) {\n case 3 /* NodeTypes.Text */: {\n return resolveValue$1(node, type);\n }\n case 9 /* NodeTypes.Literal */: {\n return resolveValue$1(node, type);\n }\n case 4 /* NodeTypes.Named */: {\n const named = node;\n if (shared.hasOwn(named, 'k') && named.k) {\n return ctx.interpolate(ctx.named(named.k));\n }\n if (shared.hasOwn(named, 'key') && named.key) {\n return ctx.interpolate(ctx.named(named.key));\n }\n throw createUnhandleNodeError(type);\n }\n case 5 /* NodeTypes.List */: {\n const list = node;\n if (shared.hasOwn(list, 'i') && shared.isNumber(list.i)) {\n return ctx.interpolate(ctx.list(list.i));\n }\n if (shared.hasOwn(list, 'index') && shared.isNumber(list.index)) {\n return ctx.interpolate(ctx.list(list.index));\n }\n throw createUnhandleNodeError(type);\n }\n case 6 /* NodeTypes.Linked */: {\n const linked = node;\n const modifier = resolveLinkedModifier(linked);\n const key = resolveLinkedKey(linked);\n return ctx.linked(formatMessagePart(ctx, key), modifier ? formatMessagePart(ctx, modifier) : undefined, ctx.type);\n }\n case 7 /* NodeTypes.LinkedKey */: {\n return resolveValue$1(node, type);\n }\n case 8 /* NodeTypes.LinkedModifier */: {\n return resolveValue$1(node, type);\n }\n default:\n throw new Error(`unhandled node on format message part: ${type}`);\n }\n}\nconst PROPS_TYPE = ['t', 'type'];\nfunction resolveType(node) {\n return resolveProps(node, PROPS_TYPE);\n}\nconst PROPS_VALUE = ['v', 'value'];\nfunction resolveValue$1(node, type) {\n const resolved = resolveProps(node, PROPS_VALUE);\n if (resolved) {\n return resolved;\n }\n else {\n throw createUnhandleNodeError(type);\n }\n}\nconst PROPS_MODIFIER = ['m', 'modifier'];\nfunction resolveLinkedModifier(node) {\n return resolveProps(node, PROPS_MODIFIER);\n}\nconst PROPS_KEY = ['k', 'key'];\nfunction resolveLinkedKey(node) {\n const resolved = resolveProps(node, PROPS_KEY);\n if (resolved) {\n return resolved;\n }\n else {\n throw createUnhandleNodeError(6 /* NodeTypes.Linked */);\n }\n}\nfunction resolveProps(node, props, defaultValue) {\n for (let i = 0; i < props.length; i++) {\n const prop = props[i];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (shared.hasOwn(node, prop) && node[prop] != null) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return node[prop];\n }\n }\n return defaultValue;\n}\nfunction createUnhandleNodeError(type) {\n return new Error(`unhandled node type: ${type}`);\n}\n\nconst WARN_MESSAGE = `Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.`;\nfunction checkHtmlMessage(source, warnHtmlMessage) {\n if (warnHtmlMessage && messageCompiler.detectHtmlTag(source)) {\n shared.warn(shared.format(WARN_MESSAGE, { source }));\n }\n}\nconst defaultOnCacheKey = (message) => message;\nlet compileCache = shared.create();\nfunction clearCompileCache() {\n compileCache = shared.create();\n}\nfunction isMessageAST(val) {\n return (shared.isObject(val) &&\n resolveType(val) === 0 &&\n (shared.hasOwn(val, 'b') || shared.hasOwn(val, 'body')));\n}\nfunction baseCompile(message, options = {}) {\n // error detecting on compile\n let detectError = false;\n const onError = options.onError || messageCompiler.defaultOnError;\n options.onError = (err) => {\n detectError = true;\n onError(err);\n };\n // compile with mesasge-compiler\n return { ...messageCompiler.baseCompile(message, options), detectError };\n}\n/* #__NO_SIDE_EFFECTS__ */\nfunction compile(message, context) {\n if (shared.isString(message)) {\n // check HTML message\n const warnHtmlMessage = shared.isBoolean(context.warnHtmlMessage)\n ? context.warnHtmlMessage\n : true;\n checkHtmlMessage(message, warnHtmlMessage);\n // check caches\n const onCacheKey = context.onCacheKey || defaultOnCacheKey;\n const cacheKey = onCacheKey(message);\n const cached = compileCache[cacheKey];\n if (cached) {\n return cached;\n }\n // compile with JIT mode\n const { ast, detectError } = baseCompile(message, {\n ...context,\n location: true,\n jit: true\n });\n // compose message function from AST\n const msg = format(ast);\n // if occurred compile error, don't cache\n return !detectError\n ? (compileCache[cacheKey] = msg)\n : msg;\n }\n else {\n if (!isMessageAST(message)) {\n shared.warn(`the message that is resolve with key '${context.key}' is not supported for jit compilation`);\n return (() => message);\n }\n // AST case (passed from bundler)\n const cacheKey = message.cacheKey;\n if (cacheKey) {\n const cached = compileCache[cacheKey];\n if (cached) {\n return cached;\n }\n // compose message function from message (AST)\n return (compileCache[cacheKey] =\n format(message));\n }\n else {\n return format(message);\n }\n }\n}\n\nlet devtools = null;\nfunction setDevToolsHook(hook) {\n devtools = hook;\n}\nfunction getDevToolsHook() {\n return devtools;\n}\nfunction initI18nDevTools(i18n, version, meta) {\n // TODO: queue if devtools is undefined\n devtools &&\n devtools.emit('i18n:init', {\n timestamp: Date.now(),\n i18n,\n version,\n meta\n });\n}\nconst translateDevTools = \n/* #__PURE__*/ createDevToolsHook('function:translate');\nfunction createDevToolsHook(hook) {\n return (payloads) => devtools && devtools.emit(hook, payloads);\n}\n\nconst CoreErrorCodes = {\n INVALID_ARGUMENT: messageCompiler.COMPILE_ERROR_CODES_EXTEND_POINT, // 17\n INVALID_DATE_ARGUMENT: 18,\n INVALID_ISO_DATE_ARGUMENT: 19,\n NOT_SUPPORT_NON_STRING_MESSAGE: 20,\n NOT_SUPPORT_LOCALE_PROMISE_VALUE: 21,\n NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: 22,\n NOT_SUPPORT_LOCALE_TYPE: 23\n};\nconst CORE_ERROR_CODES_EXTEND_POINT = 24;\nfunction createCoreError(code) {\n return messageCompiler.createCompileError(code, null, { messages: errorMessages } );\n}\n/** @internal */\nconst errorMessages = {\n [CoreErrorCodes.INVALID_ARGUMENT]: 'Invalid arguments',\n [CoreErrorCodes.INVALID_DATE_ARGUMENT]: 'The date provided is an invalid Date object.' +\n 'Make sure your Date represents a valid date.',\n [CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT]: 'The argument provided is not a valid ISO date string',\n [CoreErrorCodes.NOT_SUPPORT_NON_STRING_MESSAGE]: 'Not support non-string message',\n [CoreErrorCodes.NOT_SUPPORT_LOCALE_PROMISE_VALUE]: 'cannot support promise value',\n [CoreErrorCodes.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]: 'cannot support async function',\n [CoreErrorCodes.NOT_SUPPORT_LOCALE_TYPE]: 'cannot support locale type'\n};\n\n/** @internal */\nfunction getLocale(context, options) {\n return options.locale != null\n ? resolveLocale(options.locale)\n : resolveLocale(context.locale);\n}\nlet _resolveLocale;\n/** @internal */\nfunction resolveLocale(locale) {\n if (shared.isString(locale)) {\n return locale;\n }\n else {\n if (shared.isFunction(locale)) {\n if (locale.resolvedOnce && _resolveLocale != null) {\n return _resolveLocale;\n }\n else if (locale.constructor.name === 'Function') {\n const resolve = locale();\n if (shared.isPromise(resolve)) {\n throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_PROMISE_VALUE);\n }\n return (_resolveLocale = resolve);\n }\n else {\n throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION);\n }\n }\n else {\n throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_TYPE);\n }\n }\n}\n/**\n * Fallback with simple implemenation\n *\n * @remarks\n * A fallback locale function implemented with a simple fallback algorithm.\n *\n * Basically, it returns the value as specified in the `fallbackLocale` props, and is processed with the fallback inside intlify.\n *\n * @param ctx - A {@link CoreContext | context}\n * @param fallback - A {@link FallbackLocale | fallback locale}\n * @param start - A starting {@link Locale | locale}\n *\n * @returns Fallback locales\n *\n * @VueI18nGeneral\n */\nfunction fallbackWithSimple(ctx, fallback, start) {\n // prettier-ignore\n return [...new Set([\n start,\n ...(shared.isArray(fallback)\n ? fallback\n : shared.isObject(fallback)\n ? Object.keys(fallback)\n : shared.isString(fallback)\n ? [fallback]\n : [start])\n ])];\n}\n/**\n * Fallback with locale chain\n *\n * @remarks\n * A fallback locale function implemented with a fallback chain algorithm. It's used in VueI18n as default.\n *\n * @param ctx - A {@link CoreContext | context}\n * @param fallback - A {@link FallbackLocale | fallback locale}\n * @param start - A starting {@link Locale | locale}\n *\n * @returns Fallback locales\n *\n * @VueI18nSee [Fallbacking](../guide/essentials/fallback)\n *\n * @VueI18nGeneral\n */\nfunction fallbackWithLocaleChain(ctx, fallback, start) {\n const startLocale = shared.isString(start) ? start : DEFAULT_LOCALE;\n const context = ctx;\n if (!context.__localeChainCache) {\n context.__localeChainCache = new Map();\n }\n let chain = context.__localeChainCache.get(startLocale);\n if (!chain) {\n chain = [];\n // first block defined by start\n let block = [start];\n // while any intervening block found\n while (shared.isArray(block)) {\n block = appendBlockToChain(chain, block, fallback);\n }\n // prettier-ignore\n // last block defined by default\n const defaults = shared.isArray(fallback) || !shared.isPlainObject(fallback)\n ? fallback\n : fallback['default']\n ? fallback['default']\n : null;\n // convert defaults to array\n block = shared.isString(defaults) ? [defaults] : defaults;\n if (shared.isArray(block)) {\n appendBlockToChain(chain, block, false);\n }\n context.__localeChainCache.set(startLocale, chain);\n }\n return chain;\n}\nfunction appendBlockToChain(chain, block, blocks) {\n let follow = true;\n for (let i = 0; i < block.length && shared.isBoolean(follow); i++) {\n const locale = block[i];\n if (shared.isString(locale)) {\n follow = appendLocaleToChain(chain, block[i], blocks);\n }\n }\n return follow;\n}\nfunction appendLocaleToChain(chain, locale, blocks) {\n let follow;\n const tokens = locale.split('-');\n do {\n const target = tokens.join('-');\n follow = appendItemToChain(chain, target, blocks);\n tokens.splice(-1, 1);\n } while (tokens.length && follow === true);\n return follow;\n}\nfunction appendItemToChain(chain, target, blocks) {\n let follow = false;\n if (!chain.includes(target)) {\n follow = true;\n if (target) {\n follow = target[target.length - 1] !== '!';\n const locale = target.replace(/!/g, '');\n chain.push(locale);\n if ((shared.isArray(blocks) || shared.isPlainObject(blocks)) &&\n blocks[locale] // eslint-disable-line @typescript-eslint/no-explicit-any\n ) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n follow = blocks[locale];\n }\n }\n }\n return follow;\n}\n\nconst pathStateMachine = [];\npathStateMachine[0 /* States.BEFORE_PATH */] = {\n [\"w\" /* PathCharTypes.WORKSPACE */]: [0 /* States.BEFORE_PATH */],\n [\"i\" /* PathCharTypes.IDENT */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],\n [\"[\" /* PathCharTypes.LEFT_BRACKET */]: [4 /* States.IN_SUB_PATH */],\n [\"o\" /* PathCharTypes.END_OF_FAIL */]: [7 /* States.AFTER_PATH */]\n};\npathStateMachine[1 /* States.IN_PATH */] = {\n [\"w\" /* PathCharTypes.WORKSPACE */]: [1 /* States.IN_PATH */],\n [\".\" /* PathCharTypes.DOT */]: [2 /* States.BEFORE_IDENT */],\n [\"[\" /* PathCharTypes.LEFT_BRACKET */]: [4 /* States.IN_SUB_PATH */],\n [\"o\" /* PathCharTypes.END_OF_FAIL */]: [7 /* States.AFTER_PATH */]\n};\npathStateMachine[2 /* States.BEFORE_IDENT */] = {\n [\"w\" /* PathCharTypes.WORKSPACE */]: [2 /* States.BEFORE_IDENT */],\n [\"i\" /* PathCharTypes.IDENT */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],\n [\"0\" /* PathCharTypes.ZERO */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */]\n};\npathStateMachine[3 /* States.IN_IDENT */] = {\n [\"i\" /* PathCharTypes.IDENT */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],\n [\"0\" /* PathCharTypes.ZERO */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],\n [\"w\" /* PathCharTypes.WORKSPACE */]: [1 /* States.IN_PATH */, 1 /* Actions.PUSH */],\n [\".\" /* PathCharTypes.DOT */]: [2 /* States.BEFORE_IDENT */, 1 /* Actions.PUSH */],\n [\"[\" /* PathCharTypes.LEFT_BRACKET */]: [4 /* States.IN_SUB_PATH */, 1 /* Actions.PUSH */],\n [\"o\" /* PathCharTypes.END_OF_FAIL */]: [7 /* States.AFTER_PATH */, 1 /* Actions.PUSH */]\n};\npathStateMachine[4 /* States.IN_SUB_PATH */] = {\n [\"'\" /* PathCharTypes.SINGLE_QUOTE */]: [5 /* States.IN_SINGLE_QUOTE */, 0 /* Actions.APPEND */],\n [\"\\\"\" /* PathCharTypes.DOUBLE_QUOTE */]: [6 /* States.IN_DOUBLE_QUOTE */, 0 /* Actions.APPEND */],\n [\"[\" /* PathCharTypes.LEFT_BRACKET */]: [\n 4 /* States.IN_SUB_PATH */,\n 2 /* Actions.INC_SUB_PATH_DEPTH */\n ],\n [\"]\" /* PathCharTypes.RIGHT_BRACKET */]: [1 /* States.IN_PATH */, 3 /* Actions.PUSH_SUB_PATH */],\n [\"o\" /* PathCharTypes.END_OF_FAIL */]: 8 /* States.ERROR */,\n [\"l\" /* PathCharTypes.ELSE */]: [4 /* States.IN_SUB_PATH */, 0 /* Actions.APPEND */]\n};\npathStateMachine[5 /* States.IN_SINGLE_QUOTE */] = {\n [\"'\" /* PathCharTypes.SINGLE_QUOTE */]: [4 /* States.IN_SUB_PATH */, 0 /* Actions.APPEND */],\n [\"o\" /* PathCharTypes.END_OF_FAIL */]: 8 /* States.ERROR */,\n [\"l\" /* PathCharTypes.ELSE */]: [5 /* States.IN_SINGLE_QUOTE */, 0 /* Actions.APPEND */]\n};\npathStateMachine[6 /* States.IN_DOUBLE_QUOTE */] = {\n [\"\\\"\" /* PathCharTypes.DOUBLE_QUOTE */]: [4 /* States.IN_SUB_PATH */, 0 /* Actions.APPEND */],\n [\"o\" /* PathCharTypes.END_OF_FAIL */]: 8 /* States.ERROR */,\n [\"l\" /* PathCharTypes.ELSE */]: [6 /* States.IN_DOUBLE_QUOTE */, 0 /* Actions.APPEND */]\n};\n/**\n * Check if an expression is a literal value.\n */\nconst literalValueRE = /^\\s?(?:true|false|-?[\\d.]+|'[^']*'|\"[^\"]*\")\\s?$/;\nfunction isLiteral(exp) {\n return literalValueRE.test(exp);\n}\n/**\n * Strip quotes from a string\n */\nfunction stripQuotes(str) {\n const a = str.charCodeAt(0);\n const b = str.charCodeAt(str.length - 1);\n return a === b && (a === 0x22 || a === 0x27) ? str.slice(1, -1) : str;\n}\n/**\n * Determine the type of a character in a keypath.\n */\nfunction getPathCharType(ch) {\n if (ch === undefined || ch === null) {\n return \"o\" /* PathCharTypes.END_OF_FAIL */;\n }\n const code = ch.charCodeAt(0);\n switch (code) {\n case 0x5b: // [\n case 0x5d: // ]\n case 0x2e: // .\n case 0x22: // \"\n case 0x27: // '\n return ch;\n case 0x5f: // _\n case 0x24: // $\n case 0x2d: // -\n return \"i\" /* PathCharTypes.IDENT */;\n case 0x09: // Tab (HT)\n case 0x0a: // Newline (LF)\n case 0x0d: // Return (CR)\n case 0xa0: // No-break space (NBSP)\n case 0xfeff: // Byte Order Mark (BOM)\n case 0x2028: // Line Separator (LS)\n case 0x2029: // Paragraph Separator (PS)\n return \"w\" /* PathCharTypes.WORKSPACE */;\n }\n return \"i\" /* PathCharTypes.IDENT */;\n}\n/**\n * Format a subPath, return its plain form if it is\n * a literal string or number. Otherwise prepend the\n * dynamic indicator (*).\n */\nfunction formatSubPath(path) {\n const trimmed = path.trim();\n // invalid leading 0\n if (path.charAt(0) === '0' && isNaN(parseInt(path))) {\n return false;\n }\n return isLiteral(trimmed)\n ? stripQuotes(trimmed)\n : \"*\" /* PathCharTypes.ASTARISK */ + trimmed;\n}\n/**\n * Parse a string path into an array of segments\n */\nfunction parse(path) {\n const keys = [];\n let index = -1;\n let mode = 0 /* States.BEFORE_PATH */;\n let subPathDepth = 0;\n let c;\n let key; // eslint-disable-line\n let newChar;\n let type;\n let transition;\n let action;\n let typeMap;\n const actions = [];\n actions[0 /* Actions.APPEND */] = () => {\n if (key === undefined) {\n key = newChar;\n }\n else {\n key += newChar;\n }\n };\n actions[1 /* Actions.PUSH */] = () => {\n if (key !== undefined) {\n keys.push(key);\n key = undefined;\n }\n };\n actions[2 /* Actions.INC_SUB_PATH_DEPTH */] = () => {\n actions[0 /* Actions.APPEND */]();\n subPathDepth++;\n };\n actions[3 /* Actions.PUSH_SUB_PATH */] = () => {\n if (subPathDepth > 0) {\n subPathDepth--;\n mode = 4 /* States.IN_SUB_PATH */;\n actions[0 /* Actions.APPEND */]();\n }\n else {\n subPathDepth = 0;\n if (key === undefined) {\n return false;\n }\n key = formatSubPath(key);\n if (key === false) {\n return false;\n }\n else {\n actions[1 /* Actions.PUSH */]();\n }\n }\n };\n function maybeUnescapeQuote() {\n const nextChar = path[index + 1];\n if ((mode === 5 /* States.IN_SINGLE_QUOTE */ &&\n nextChar === \"'\" /* PathCharTypes.SINGLE_QUOTE */) ||\n (mode === 6 /* States.IN_DOUBLE_QUOTE */ &&\n nextChar === \"\\\"\" /* PathCharTypes.DOUBLE_QUOTE */)) {\n index++;\n newChar = '\\\\' + nextChar;\n actions[0 /* Actions.APPEND */]();\n return true;\n }\n }\n while (mode !== null) {\n index++;\n c = path[index];\n if (c === '\\\\' && maybeUnescapeQuote()) {\n continue;\n }\n type = getPathCharType(c);\n typeMap = pathStateMachine[mode];\n transition = typeMap[type] || typeMap[\"l\" /* PathCharTypes.ELSE */] || 8 /* States.ERROR */;\n // check parse error\n if (transition === 8 /* States.ERROR */) {\n return;\n }\n mode = transition[0];\n if (transition[1] !== undefined) {\n action = actions[transition[1]];\n if (action) {\n newChar = c;\n if (action() === false) {\n return;\n }\n }\n }\n // check parse finish\n if (mode === 7 /* States.AFTER_PATH */) {\n return keys;\n }\n }\n}\n// path token cache\nconst cache = new Map();\n/**\n * key-value message resolver\n *\n * @remarks\n * Resolves messages with the key-value structure. Note that messages with a hierarchical structure such as objects cannot be resolved\n *\n * @param obj - A target object to be resolved with path\n * @param path - A {@link Path | path} to resolve the value of message\n *\n * @returns A resolved {@link PathValue | path value}\n *\n * @VueI18nGeneral\n */\nfunction resolveWithKeyValue(obj, path) {\n return shared.isObject(obj) ? obj[path] : null;\n}\n/**\n * message resolver\n *\n * @remarks\n * Resolves messages. messages with a hierarchical structure such as objects can be resolved. This resolver is used in VueI18n as default.\n *\n * @param obj - A target object to be resolved with path\n * @param path - A {@link Path | path} to resolve the value of message\n *\n * @returns A resolved {@link PathValue | path value}\n *\n * @VueI18nGeneral\n */\nfunction resolveValue(obj, path) {\n // check object\n if (!shared.isObject(obj)) {\n return null;\n }\n // parse path\n let hit = cache.get(path);\n if (!hit) {\n hit = parse(path);\n if (hit) {\n cache.set(path, hit);\n }\n }\n // check hit\n if (!hit) {\n return null;\n }\n // resolve path value\n const len = hit.length;\n let last = obj;\n let i = 0;\n while (i < len) {\n const val = last[hit[i]];\n if (val === undefined) {\n return null;\n }\n if (shared.isFunction(last)) {\n return null;\n }\n last = val;\n i++;\n }\n return last;\n}\n\nconst CoreWarnCodes = {\n NOT_FOUND_KEY: 1,\n FALLBACK_TO_TRANSLATE: 2,\n CANNOT_FORMAT_NUMBER: 3,\n FALLBACK_TO_NUMBER_FORMAT: 4,\n CANNOT_FORMAT_DATE: 5,\n FALLBACK_TO_DATE_FORMAT: 6,\n EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER: 7\n};\nconst CORE_WARN_CODES_EXTEND_POINT = 8;\n/** @internal */\nconst warnMessages = {\n [CoreWarnCodes.NOT_FOUND_KEY]: `Not found '{key}' key in '{locale}' locale messages.`,\n [CoreWarnCodes.FALLBACK_TO_TRANSLATE]: `Fall back to translate '{key}' key with '{target}' locale.`,\n [CoreWarnCodes.CANNOT_FORMAT_NUMBER]: `Cannot format a number value due to not supported Intl.NumberFormat.`,\n [CoreWarnCodes.FALLBACK_TO_NUMBER_FORMAT]: `Fall back to number format '{key}' key with '{target}' locale.`,\n [CoreWarnCodes.CANNOT_FORMAT_DATE]: `Cannot format a date value due to not supported Intl.DateTimeFormat.`,\n [CoreWarnCodes.FALLBACK_TO_DATE_FORMAT]: `Fall back to datetime format '{key}' key with '{target}' locale.`,\n [CoreWarnCodes.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]: `This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future.`\n};\nfunction getWarnMessage(code, ...args) {\n return shared.format(warnMessages[code], ...args);\n}\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * Intlify core-base version\n * @internal\n */\nconst VERSION = '11.1.2';\nconst NOT_REOSLVED = -1;\nconst DEFAULT_LOCALE = 'en-US';\nconst MISSING_RESOLVE_VALUE = '';\nconst capitalize = (str) => `${str.charAt(0).toLocaleUpperCase()}${str.substr(1)}`;\nfunction getDefaultLinkedModifiers() {\n return {\n upper: (val, type) => {\n // prettier-ignore\n return type === 'text' && shared.isString(val)\n ? val.toUpperCase()\n : type === 'vnode' && shared.isObject(val) && '__v_isVNode' in val\n ? val.children.toUpperCase()\n : val;\n },\n lower: (val, type) => {\n // prettier-ignore\n return type === 'text' && shared.isString(val)\n ? val.toLowerCase()\n : type === 'vnode' && shared.isObject(val) && '__v_isVNode' in val\n ? val.children.toLowerCase()\n : val;\n },\n capitalize: (val, type) => {\n // prettier-ignore\n return (type === 'text' && shared.isString(val)\n ? capitalize(val)\n : type === 'vnode' && shared.isObject(val) && '__v_isVNode' in val\n ? capitalize(val.children)\n : val);\n }\n };\n}\nlet _compiler;\nfunction registerMessageCompiler(compiler) {\n _compiler = compiler;\n}\nlet _resolver;\n/**\n * Register the message resolver\n *\n * @param resolver - A {@link MessageResolver} function\n *\n * @VueI18nGeneral\n */\nfunction registerMessageResolver(resolver) {\n _resolver = resolver;\n}\nlet _fallbacker;\n/**\n * Register the locale fallbacker\n *\n * @param fallbacker - A {@link LocaleFallbacker} function\n *\n * @VueI18nGeneral\n */\nfunction registerLocaleFallbacker(fallbacker) {\n _fallbacker = fallbacker;\n}\n// Additional Meta for Intlify DevTools\nlet _additionalMeta = null;\n/* #__NO_SIDE_EFFECTS__ */\nconst setAdditionalMeta = (meta) => {\n _additionalMeta = meta;\n};\n/* #__NO_SIDE_EFFECTS__ */\nconst getAdditionalMeta = () => _additionalMeta;\nlet _fallbackContext = null;\nconst setFallbackContext = (context) => {\n _fallbackContext = context;\n};\nconst getFallbackContext = () => _fallbackContext;\n// ID for CoreContext\nlet _cid = 0;\nfunction createCoreContext(options = {}) {\n // setup options\n const onWarn = shared.isFunction(options.onWarn) ? options.onWarn : shared.warn;\n const version = shared.isString(options.version) ? options.version : VERSION;\n const locale = shared.isString(options.locale) || shared.isFunction(options.locale)\n ? options.locale\n : DEFAULT_LOCALE;\n const _locale = shared.isFunction(locale) ? DEFAULT_LOCALE : locale;\n const fallbackLocale = shared.isArray(options.fallbackLocale) ||\n shared.isPlainObject(options.fallbackLocale) ||\n shared.isString(options.fallbackLocale) ||\n options.fallbackLocale === false\n ? options.fallbackLocale\n : _locale;\n const messages = shared.isPlainObject(options.messages)\n ? options.messages\n : createResources(_locale);\n const datetimeFormats = shared.isPlainObject(options.datetimeFormats)\n ? options.datetimeFormats\n : createResources(_locale)\n ;\n const numberFormats = shared.isPlainObject(options.numberFormats)\n ? options.numberFormats\n : createResources(_locale)\n ;\n const modifiers = shared.assign(shared.create(), options.modifiers, getDefaultLinkedModifiers());\n const pluralRules = options.pluralRules || shared.create();\n const missing = shared.isFunction(options.missing) ? options.missing : null;\n const missingWarn = shared.isBoolean(options.missingWarn) || shared.isRegExp(options.missingWarn)\n ? options.missingWarn\n : true;\n const fallbackWarn = shared.isBoolean(options.fallbackWarn) || shared.isRegExp(options.fallbackWarn)\n ? options.fallbackWarn\n : true;\n const fallbackFormat = !!options.fallbackFormat;\n const unresolving = !!options.unresolving;\n const postTranslation = shared.isFunction(options.postTranslation)\n ? options.postTranslation\n : null;\n const processor = shared.isPlainObject(options.processor) ? options.processor : null;\n const warnHtmlMessage = shared.isBoolean(options.warnHtmlMessage)\n ? options.warnHtmlMessage\n : true;\n const escapeParameter = !!options.escapeParameter;\n const messageCompiler = shared.isFunction(options.messageCompiler)\n ? options.messageCompiler\n : _compiler;\n if (shared.isFunction(options.messageCompiler)) {\n shared.warnOnce(getWarnMessage(CoreWarnCodes.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));\n }\n const messageResolver = shared.isFunction(options.messageResolver)\n ? options.messageResolver\n : _resolver || resolveWithKeyValue;\n const localeFallbacker = shared.isFunction(options.localeFallbacker)\n ? options.localeFallbacker\n : _fallbacker || fallbackWithSimple;\n const fallbackContext = shared.isObject(options.fallbackContext)\n ? options.fallbackContext\n : undefined;\n // setup internal options\n const internalOptions = options;\n const __datetimeFormatters = shared.isObject(internalOptions.__datetimeFormatters)\n ? internalOptions.__datetimeFormatters\n : new Map()\n ;\n const __numberFormatters = shared.isObject(internalOptions.__numberFormatters)\n ? internalOptions.__numberFormatters\n : new Map()\n ;\n const __meta = shared.isObject(internalOptions.__meta) ? internalOptions.__meta : {};\n _cid++;\n const context = {\n version,\n cid: _cid,\n locale,\n fallbackLocale,\n messages,\n modifiers,\n pluralRules,\n missing,\n missingWarn,\n fallbackWarn,\n fallbackFormat,\n unresolving,\n postTranslation,\n processor,\n warnHtmlMessage,\n escapeParameter,\n messageCompiler,\n messageResolver,\n localeFallbacker,\n fallbackContext,\n onWarn,\n __meta\n };\n {\n context.datetimeFormats = datetimeFormats;\n context.numberFormats = numberFormats;\n context.__datetimeFormatters = __datetimeFormatters;\n context.__numberFormatters = __numberFormatters;\n }\n // for vue-devtools timeline event\n {\n context.__v_emitter =\n internalOptions.__v_emitter != null\n ? internalOptions.__v_emitter\n : undefined;\n }\n // NOTE: experimental !!\n {\n initI18nDevTools(context, version, __meta);\n }\n return context;\n}\nconst createResources = (locale) => ({ [locale]: shared.create() });\n/** @internal */\nfunction isTranslateFallbackWarn(fallback, key) {\n return fallback instanceof RegExp ? fallback.test(key) : fallback;\n}\n/** @internal */\nfunction isTranslateMissingWarn(missing, key) {\n return missing instanceof RegExp ? missing.test(key) : missing;\n}\n/** @internal */\nfunction handleMissing(context, key, locale, missingWarn, type) {\n const { missing, onWarn } = context;\n // for vue-devtools timeline event\n {\n const emitter = context.__v_emitter;\n if (emitter) {\n emitter.emit('missing', {\n locale,\n key,\n type,\n groupId: `${type}:${key}`\n });\n }\n }\n if (missing !== null) {\n const ret = missing(context, locale, key, type);\n return shared.isString(ret) ? ret : key;\n }\n else {\n if (isTranslateMissingWarn(missingWarn, key)) {\n onWarn(getWarnMessage(CoreWarnCodes.NOT_FOUND_KEY, { key, locale }));\n }\n return key;\n }\n}\n/** @internal */\nfunction updateFallbackLocale(ctx, locale, fallback) {\n const context = ctx;\n context.__localeChainCache = new Map();\n ctx.localeFallbacker(ctx, fallback, locale);\n}\n/** @internal */\nfunction isAlmostSameLocale(locale, compareLocale) {\n if (locale === compareLocale)\n return false;\n return locale.split('-')[0] === compareLocale.split('-')[0];\n}\n/** @internal */\nfunction isImplicitFallback(targetLocale, locales) {\n const index = locales.indexOf(targetLocale);\n if (index === -1) {\n return false;\n }\n for (let i = index + 1; i < locales.length; i++) {\n if (isAlmostSameLocale(targetLocale, locales[i])) {\n return true;\n }\n }\n return false;\n}\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\nconst intlDefined = typeof Intl !== 'undefined';\nconst Availabilities = {\n dateTimeFormat: intlDefined && typeof Intl.DateTimeFormat !== 'undefined',\n numberFormat: intlDefined && typeof Intl.NumberFormat !== 'undefined'\n};\n\n// implementation of `datetime` function\nfunction datetime(context, ...args) {\n const { datetimeFormats, unresolving, fallbackLocale, onWarn, localeFallbacker } = context;\n const { __datetimeFormatters } = context;\n if (!Availabilities.dateTimeFormat) {\n onWarn(getWarnMessage(CoreWarnCodes.CANNOT_FORMAT_DATE));\n return MISSING_RESOLVE_VALUE;\n }\n const [key, value, options, overrides] = parseDateTimeArgs(...args);\n const missingWarn = shared.isBoolean(options.missingWarn)\n ? options.missingWarn\n : context.missingWarn;\n const fallbackWarn = shared.isBoolean(options.fallbackWarn)\n ? options.fallbackWarn\n : context.fallbackWarn;\n const part = !!options.part;\n const locale = getLocale(context, options);\n const locales = localeFallbacker(context, // eslint-disable-line @typescript-eslint/no-explicit-any\n fallbackLocale, locale);\n if (!shared.isString(key) || key === '') {\n return new Intl.DateTimeFormat(locale, overrides).format(value);\n }\n // resolve format\n let datetimeFormat = {};\n let targetLocale;\n let format = null;\n let from = locale;\n let to = null;\n const type = 'datetime format';\n for (let i = 0; i < locales.length; i++) {\n targetLocale = to = locales[i];\n if (locale !== targetLocale &&\n isTranslateFallbackWarn(fallbackWarn, key)) {\n onWarn(getWarnMessage(CoreWarnCodes.FALLBACK_TO_DATE_FORMAT, {\n key,\n target: targetLocale\n }));\n }\n // for vue-devtools timeline event\n if (locale !== targetLocale) {\n const emitter = context.__v_emitter;\n if (emitter) {\n emitter.emit('fallback', {\n type,\n key,\n from,\n to,\n groupId: `${type}:${key}`\n });\n }\n }\n datetimeFormat =\n datetimeFormats[targetLocale] || {};\n format = datetimeFormat[key];\n if (shared.isPlainObject(format))\n break;\n handleMissing(context, key, targetLocale, missingWarn, type); // eslint-disable-line @typescript-eslint/no-explicit-any\n from = to;\n }\n // checking format and target locale\n if (!shared.isPlainObject(format) || !shared.isString(targetLocale)) {\n return unresolving ? NOT_REOSLVED : key;\n }\n let id = `${targetLocale}__${key}`;\n if (!shared.isEmptyObject(overrides)) {\n id = `${id}__${JSON.stringify(overrides)}`;\n }\n let formatter = __datetimeFormatters.get(id);\n if (!formatter) {\n formatter = new Intl.DateTimeFormat(targetLocale, shared.assign({}, format, overrides));\n __datetimeFormatters.set(id, formatter);\n }\n return !part ? formatter.format(value) : formatter.formatToParts(value);\n}\n/** @internal */\nconst DATETIME_FORMAT_OPTIONS_KEYS = [\n 'localeMatcher',\n 'weekday',\n 'era',\n 'year',\n 'month',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'timeZoneName',\n 'formatMatcher',\n 'hour12',\n 'timeZone',\n 'dateStyle',\n 'timeStyle',\n 'calendar',\n 'dayPeriod',\n 'numberingSystem',\n 'hourCycle',\n 'fractionalSecondDigits'\n];\n/** @internal */\nfunction parseDateTimeArgs(...args) {\n const [arg1, arg2, arg3, arg4] = args;\n const options = shared.create();\n let overrides = shared.create();\n let value;\n if (shared.isString(arg1)) {\n // Only allow ISO strings - other date formats are often supported,\n // but may cause different results in different browsers.\n const matches = arg1.match(/(\\d{4}-\\d{2}-\\d{2})(T|\\s)?(.*)/);\n if (!matches) {\n throw createCoreError(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT);\n }\n // Some browsers can not parse the iso datetime separated by space,\n // this is a compromise solution by replace the 'T'/' ' with 'T'\n const dateTime = matches[3]\n ? matches[3].trim().startsWith('T')\n ? `${matches[1].trim()}${matches[3].trim()}`\n : `${matches[1].trim()}T${matches[3].trim()}`\n : matches[1].trim();\n value = new Date(dateTime);\n try {\n // This will fail if the date is not valid\n value.toISOString();\n }\n catch {\n throw createCoreError(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT);\n }\n }\n else if (shared.isDate(arg1)) {\n if (isNaN(arg1.getTime())) {\n throw createCoreError(CoreErrorCodes.INVALID_DATE_ARGUMENT);\n }\n value = arg1;\n }\n else if (shared.isNumber(arg1)) {\n value = arg1;\n }\n else {\n throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);\n }\n if (shared.isString(arg2)) {\n options.key = arg2;\n }\n else if (shared.isPlainObject(arg2)) {\n Object.keys(arg2).forEach(key => {\n if (DATETIME_FORMAT_OPTIONS_KEYS.includes(key)) {\n overrides[key] = arg2[key];\n }\n else {\n options[key] = arg2[key];\n }\n });\n }\n if (shared.isString(arg3)) {\n options.locale = arg3;\n }\n else if (shared.isPlainObject(arg3)) {\n overrides = arg3;\n }\n if (shared.isPlainObject(arg4)) {\n overrides = arg4;\n }\n return [options.key || '', value, options, overrides];\n}\n/** @internal */\nfunction clearDateTimeFormat(ctx, locale, format) {\n const context = ctx;\n for (const key in format) {\n const id = `${locale}__${key}`;\n if (!context.__datetimeFormatters.has(id)) {\n continue;\n }\n context.__datetimeFormatters.delete(id);\n }\n}\n\n// implementation of `number` function\nfunction number(context, ...args) {\n const { numberFormats, unresolving, fallbackLocale, onWarn, localeFallbacker } = context;\n const { __numberFormatters } = context;\n if (!Availabilities.numberFormat) {\n onWarn(getWarnMessage(CoreWarnCodes.CANNOT_FORMAT_NUMBER));\n return MISSING_RESOLVE_VALUE;\n }\n const [key, value, options, overrides] = parseNumberArgs(...args);\n const missingWarn = shared.isBoolean(options.missingWarn)\n ? options.missingWarn\n : context.missingWarn;\n const fallbackWarn = shared.isBoolean(options.fallbackWarn)\n ? options.fallbackWarn\n : context.fallbackWarn;\n const part = !!options.part;\n const locale = getLocale(context, options);\n const locales = localeFallbacker(context, // eslint-disable-line @typescript-eslint/no-explicit-any\n fallbackLocale, locale);\n if (!shared.isString(key) || key === '') {\n return new Intl.NumberFormat(locale, overrides).format(value);\n }\n // resolve format\n let numberFormat = {};\n let targetLocale;\n let format = null;\n let from = locale;\n let to = null;\n const type = 'number format';\n for (let i = 0; i < locales.length; i++) {\n targetLocale = to = locales[i];\n if (locale !== targetLocale &&\n isTranslateFallbackWarn(fallbackWarn, key)) {\n onWarn(getWarnMessage(CoreWarnCodes.FALLBACK_TO_NUMBER_FORMAT, {\n key,\n target: targetLocale\n }));\n }\n // for vue-devtools timeline event\n if (locale !== targetLocale) {\n const emitter = context.__v_emitter;\n if (emitter) {\n emitter.emit('fallback', {\n type,\n key,\n from,\n to,\n groupId: `${type}:${key}`\n });\n }\n }\n numberFormat =\n numberFormats[targetLocale] || {};\n format = numberFormat[key];\n if (shared.isPlainObject(format))\n break;\n handleMissing(context, key, targetLocale, missingWarn, type); // eslint-disable-line @typescript-eslint/no-explicit-any\n from = to;\n }\n // checking format and target locale\n if (!shared.isPlainObject(format) || !shared.isString(targetLocale)) {\n return unresolving ? NOT_REOSLVED : key;\n }\n let id = `${targetLocale}__${key}`;\n if (!shared.isEmptyObject(overrides)) {\n id = `${id}__${JSON.stringify(overrides)}`;\n }\n let formatter = __numberFormatters.get(id);\n if (!formatter) {\n formatter = new Intl.NumberFormat(targetLocale, shared.assign({}, format, overrides));\n __numberFormatters.set(id, formatter);\n }\n return !part ? formatter.format(value) : formatter.formatToParts(value);\n}\n/** @internal */\nconst NUMBER_FORMAT_OPTIONS_KEYS = [\n 'localeMatcher',\n 'style',\n 'currency',\n 'currencyDisplay',\n 'currencySign',\n 'useGrouping',\n 'minimumIntegerDigits',\n 'minimumFractionDigits',\n 'maximumFractionDigits',\n 'minimumSignificantDigits',\n 'maximumSignificantDigits',\n 'compactDisplay',\n 'notation',\n 'signDisplay',\n 'unit',\n 'unitDisplay',\n 'roundingMode',\n 'roundingPriority',\n 'roundingIncrement',\n 'trailingZeroDisplay'\n];\n/** @internal */\nfunction parseNumberArgs(...args) {\n const [arg1, arg2, arg3, arg4] = args;\n const options = shared.create();\n let overrides = shared.create();\n if (!shared.isNumber(arg1)) {\n throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);\n }\n const value = arg1;\n if (shared.isString(arg2)) {\n options.key = arg2;\n }\n else if (shared.isPlainObject(arg2)) {\n Object.keys(arg2).forEach(key => {\n if (NUMBER_FORMAT_OPTIONS_KEYS.includes(key)) {\n overrides[key] = arg2[key];\n }\n else {\n options[key] = arg2[key];\n }\n });\n }\n if (shared.isString(arg3)) {\n options.locale = arg3;\n }\n else if (shared.isPlainObject(arg3)) {\n overrides = arg3;\n }\n if (shared.isPlainObject(arg4)) {\n overrides = arg4;\n }\n return [options.key || '', value, options, overrides];\n}\n/** @internal */\nfunction clearNumberFormat(ctx, locale, format) {\n const context = ctx;\n for (const key in format) {\n const id = `${locale}__${key}`;\n if (!context.__numberFormatters.has(id)) {\n continue;\n }\n context.__numberFormatters.delete(id);\n }\n}\n\nconst DEFAULT_MODIFIER = (str) => str;\nconst DEFAULT_MESSAGE = (ctx) => ''; // eslint-disable-line\nconst DEFAULT_MESSAGE_DATA_TYPE = 'text';\nconst DEFAULT_NORMALIZE = (values) => values.length === 0 ? '' : shared.join(values);\nconst DEFAULT_INTERPOLATE = shared.toDisplayString;\nfunction pluralDefault(choice, choicesLength) {\n choice = Math.abs(choice);\n if (choicesLength === 2) {\n // prettier-ignore\n return choice\n ? choice > 1\n ? 1\n : 0\n : 1;\n }\n return choice ? Math.min(choice, 2) : 0;\n}\nfunction getPluralIndex(options) {\n // prettier-ignore\n const index = shared.isNumber(options.pluralIndex)\n ? options.pluralIndex\n : -1;\n // prettier-ignore\n return options.named && (shared.isNumber(options.named.count) || shared.isNumber(options.named.n))\n ? shared.isNumber(options.named.count)\n ? options.named.count\n : shared.isNumber(options.named.n)\n ? options.named.n\n : index\n : index;\n}\nfunction normalizeNamed(pluralIndex, props) {\n if (!props.count) {\n props.count = pluralIndex;\n }\n if (!props.n) {\n props.n = pluralIndex;\n }\n}\nfunction createMessageContext(options = {}) {\n const locale = options.locale;\n const pluralIndex = getPluralIndex(options);\n const pluralRule = shared.isObject(options.pluralRules) &&\n shared.isString(locale) &&\n shared.isFunction(options.pluralRules[locale])\n ? options.pluralRules[locale]\n : pluralDefault;\n const orgPluralRule = shared.isObject(options.pluralRules) &&\n shared.isString(locale) &&\n shared.isFunction(options.pluralRules[locale])\n ? pluralDefault\n : undefined;\n const plural = (messages) => {\n return messages[pluralRule(pluralIndex, messages.length, orgPluralRule)];\n };\n const _list = options.list || [];\n const list = (index) => _list[index];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const _named = options.named || shared.create();\n shared.isNumber(options.pluralIndex) && normalizeNamed(pluralIndex, _named);\n const named = (key) => _named[key];\n function message(key, useLinked) {\n // prettier-ignore\n const msg = shared.isFunction(options.messages)\n ? options.messages(key, !!useLinked)\n : shared.isObject(options.messages)\n ? options.messages[key]\n : false;\n return !msg\n ? options.parent\n ? options.parent.message(key) // resolve from parent messages\n : DEFAULT_MESSAGE\n : msg;\n }\n const _modifier = (name) => options.modifiers\n ? options.modifiers[name]\n : DEFAULT_MODIFIER;\n const normalize = shared.isPlainObject(options.processor) && shared.isFunction(options.processor.normalize)\n ? options.processor.normalize\n : DEFAULT_NORMALIZE;\n const interpolate = shared.isPlainObject(options.processor) &&\n shared.isFunction(options.processor.interpolate)\n ? options.processor.interpolate\n : DEFAULT_INTERPOLATE;\n const type = shared.isPlainObject(options.processor) && shared.isString(options.processor.type)\n ? options.processor.type\n : DEFAULT_MESSAGE_DATA_TYPE;\n const linked = (key, ...args) => {\n const [arg1, arg2] = args;\n let type = 'text';\n let modifier = '';\n if (args.length === 1) {\n if (shared.isObject(arg1)) {\n modifier = arg1.modifier || modifier;\n type = arg1.type || type;\n }\n else if (shared.isString(arg1)) {\n modifier = arg1 || modifier;\n }\n }\n else if (args.length === 2) {\n if (shared.isString(arg1)) {\n modifier = arg1 || modifier;\n }\n if (shared.isString(arg2)) {\n type = arg2 || type;\n }\n }\n const ret = message(key, true)(ctx);\n const msg = \n // The message in vnode resolved with linked are returned as an array by processor.nomalize\n type === 'vnode' && shared.isArray(ret) && modifier\n ? ret[0]\n : ret;\n return modifier ? _modifier(modifier)(msg, type) : msg;\n };\n const ctx = {\n [\"list\" /* HelperNameMap.LIST */]: list,\n [\"named\" /* HelperNameMap.NAMED */]: named,\n [\"plural\" /* HelperNameMap.PLURAL */]: plural,\n [\"linked\" /* HelperNameMap.LINKED */]: linked,\n [\"message\" /* HelperNameMap.MESSAGE */]: message,\n [\"type\" /* HelperNameMap.TYPE */]: type,\n [\"interpolate\" /* HelperNameMap.INTERPOLATE */]: interpolate,\n [\"normalize\" /* HelperNameMap.NORMALIZE */]: normalize,\n [\"values\" /* HelperNameMap.VALUES */]: shared.assign(shared.create(), _list, _named)\n };\n return ctx;\n}\n\nconst NOOP_MESSAGE_FUNCTION = () => '';\nconst isMessageFunction = (val) => shared.isFunction(val);\n// implementation of `translate` function\nfunction translate(context, ...args) {\n const { fallbackFormat, postTranslation, unresolving, messageCompiler, fallbackLocale, messages } = context;\n const [key, options] = parseTranslateArgs(...args);\n const missingWarn = shared.isBoolean(options.missingWarn)\n ? options.missingWarn\n : context.missingWarn;\n const fallbackWarn = shared.isBoolean(options.fallbackWarn)\n ? options.fallbackWarn\n : context.fallbackWarn;\n const escapeParameter = shared.isBoolean(options.escapeParameter)\n ? options.escapeParameter\n : context.escapeParameter;\n const resolvedMessage = !!options.resolvedMessage;\n // prettier-ignore\n const defaultMsgOrKey = shared.isString(options.default) || shared.isBoolean(options.default) // default by function option\n ? !shared.isBoolean(options.default)\n ? options.default\n : (!messageCompiler ? () => key : key)\n : fallbackFormat // default by `fallbackFormat` option\n ? (!messageCompiler ? () => key : key)\n : null;\n const enableDefaultMsg = fallbackFormat ||\n (defaultMsgOrKey != null &&\n (shared.isString(defaultMsgOrKey) || shared.isFunction(defaultMsgOrKey)));\n const locale = getLocale(context, options);\n // escape params\n escapeParameter && escapeParams(options);\n // resolve message format\n // eslint-disable-next-line prefer-const\n let [formatScope, targetLocale, message] = !resolvedMessage\n ? resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn)\n : [\n key,\n locale,\n messages[locale] || shared.create()\n ];\n // NOTE:\n // Fix to work around `ssrTransfrom` bug in Vite.\n // https://github.com/vitejs/vite/issues/4306\n // To get around this, use temporary variables.\n // https://github.com/nuxt/framework/issues/1461#issuecomment-954606243\n let format = formatScope;\n // if you use default message, set it as message format!\n let cacheBaseKey = key;\n if (!resolvedMessage &&\n !(shared.isString(format) ||\n isMessageAST(format) ||\n isMessageFunction(format))) {\n if (enableDefaultMsg) {\n format = defaultMsgOrKey;\n cacheBaseKey = format;\n }\n }\n // checking message format and target locale\n if (!resolvedMessage &&\n (!(shared.isString(format) ||\n isMessageAST(format) ||\n isMessageFunction(format)) ||\n !shared.isString(targetLocale))) {\n return unresolving ? NOT_REOSLVED : key;\n }\n // TODO: refactor\n if (shared.isString(format) && context.messageCompiler == null) {\n shared.warn(`The message format compilation is not supported in this build. ` +\n `Because message compiler isn't included. ` +\n `You need to pre-compilation all message format. ` +\n `So translate function return '${key}'.`);\n return key;\n }\n // setup compile error detecting\n let occurred = false;\n const onError = () => {\n occurred = true;\n };\n // compile message format\n const msg = !isMessageFunction(format)\n ? compileMessageFormat(context, key, targetLocale, format, cacheBaseKey, onError)\n : format;\n // if occurred compile error, return the message format\n if (occurred) {\n return format;\n }\n // evaluate message with context\n const ctxOptions = getMessageContextOptions(context, targetLocale, message, options);\n const msgContext = createMessageContext(ctxOptions);\n const messaged = evaluateMessage(context, msg, msgContext);\n // if use post translation option, proceed it with handler\n const ret = postTranslation\n ? postTranslation(messaged, key)\n : messaged;\n // NOTE: experimental !!\n {\n // prettier-ignore\n const payloads = {\n timestamp: Date.now(),\n key: shared.isString(key)\n ? key\n : isMessageFunction(format)\n ? format.key\n : '',\n locale: targetLocale || (isMessageFunction(format)\n ? format.locale\n : ''),\n format: shared.isString(format)\n ? format\n : isMessageFunction(format)\n ? format.source\n : '',\n message: ret\n };\n payloads.meta = shared.assign({}, context.__meta, getAdditionalMeta() || {});\n translateDevTools(payloads);\n }\n return ret;\n}\nfunction escapeParams(options) {\n if (shared.isArray(options.list)) {\n options.list = options.list.map(item => shared.isString(item) ? shared.escapeHtml(item) : item);\n }\n else if (shared.isObject(options.named)) {\n Object.keys(options.named).forEach(key => {\n if (shared.isString(options.named[key])) {\n options.named[key] = shared.escapeHtml(options.named[key]);\n }\n });\n }\n}\nfunction resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn) {\n const { messages, onWarn, messageResolver: resolveValue, localeFallbacker } = context;\n const locales = localeFallbacker(context, fallbackLocale, locale); // eslint-disable-line @typescript-eslint/no-explicit-any\n let message = shared.create();\n let targetLocale;\n let format = null;\n let from = locale;\n let to = null;\n const type = 'translate';\n for (let i = 0; i < locales.length; i++) {\n targetLocale = to = locales[i];\n if (locale !== targetLocale &&\n !isAlmostSameLocale(locale, targetLocale) &&\n isTranslateFallbackWarn(fallbackWarn, key)) {\n onWarn(getWarnMessage(CoreWarnCodes.FALLBACK_TO_TRANSLATE, {\n key,\n target: targetLocale\n }));\n }\n // for vue-devtools timeline event\n if (locale !== targetLocale) {\n const emitter = context.__v_emitter;\n if (emitter) {\n emitter.emit('fallback', {\n type,\n key,\n from,\n to,\n groupId: `${type}:${key}`\n });\n }\n }\n message =\n messages[targetLocale] || shared.create();\n // for vue-devtools timeline event\n let start = null;\n let startTag;\n let endTag;\n if (shared.inBrowser) {\n start = window.performance.now();\n startTag = 'intlify-message-resolve-start';\n endTag = 'intlify-message-resolve-end';\n shared.mark && shared.mark(startTag);\n }\n if ((format = resolveValue(message, key)) === null) {\n // if null, resolve with object key path\n format = message[key]; // eslint-disable-line @typescript-eslint/no-explicit-any\n }\n // for vue-devtools timeline event\n if (shared.inBrowser) {\n const end = window.performance.now();\n const emitter = context.__v_emitter;\n if (emitter && start && format) {\n emitter.emit('message-resolve', {\n type: 'message-resolve',\n key,\n message: format,\n time: end - start,\n groupId: `${type}:${key}`\n });\n }\n if (startTag && endTag && shared.mark && shared.measure) {\n shared.mark(endTag);\n shared.measure('intlify message resolve', startTag, endTag);\n }\n }\n if (shared.isString(format) || isMessageAST(format) || isMessageFunction(format)) {\n break;\n }\n if (!isImplicitFallback(targetLocale, locales)) {\n const missingRet = handleMissing(context, // eslint-disable-line @typescript-eslint/no-explicit-any\n key, targetLocale, missingWarn, type);\n if (missingRet !== key) {\n format = missingRet;\n }\n }\n from = to;\n }\n return [format, targetLocale, message];\n}\nfunction compileMessageFormat(context, key, targetLocale, format, cacheBaseKey, onError) {\n const { messageCompiler, warnHtmlMessage } = context;\n if (isMessageFunction(format)) {\n const msg = format;\n msg.locale = msg.locale || targetLocale;\n msg.key = msg.key || key;\n return msg;\n }\n if (messageCompiler == null) {\n const msg = (() => format);\n msg.locale = targetLocale;\n msg.key = key;\n return msg;\n }\n // for vue-devtools timeline event\n let start = null;\n let startTag;\n let endTag;\n if (shared.inBrowser) {\n start = window.performance.now();\n startTag = 'intlify-message-compilation-start';\n endTag = 'intlify-message-compilation-end';\n shared.mark && shared.mark(startTag);\n }\n const msg = messageCompiler(format, getCompileContext(context, targetLocale, cacheBaseKey, format, warnHtmlMessage, onError));\n // for vue-devtools timeline event\n if (shared.inBrowser) {\n const end = window.performance.now();\n const emitter = context.__v_emitter;\n if (emitter && start) {\n emitter.emit('message-compilation', {\n type: 'message-compilation',\n message: format,\n time: end - start,\n groupId: `${'translate'}:${key}`\n });\n }\n if (startTag && endTag && shared.mark && shared.measure) {\n shared.mark(endTag);\n shared.measure('intlify message compilation', startTag, endTag);\n }\n }\n msg.locale = targetLocale;\n msg.key = key;\n msg.source = format;\n return msg;\n}\nfunction evaluateMessage(context, msg, msgCtx) {\n // for vue-devtools timeline event\n let start = null;\n let startTag;\n let endTag;\n if (shared.inBrowser) {\n start = window.performance.now();\n startTag = 'intlify-message-evaluation-start';\n endTag = 'intlify-message-evaluation-end';\n shared.mark && shared.mark(startTag);\n }\n const messaged = msg(msgCtx);\n // for vue-devtools timeline event\n if (shared.inBrowser) {\n const end = window.performance.now();\n const emitter = context.__v_emitter;\n if (emitter && start) {\n emitter.emit('message-evaluation', {\n type: 'message-evaluation',\n value: messaged,\n time: end - start,\n groupId: `${'translate'}:${msg.key}`\n });\n }\n if (startTag && endTag && shared.mark && shared.measure) {\n shared.mark(endTag);\n shared.measure('intlify message evaluation', startTag, endTag);\n }\n }\n return messaged;\n}\n/** @internal */\nfunction parseTranslateArgs(...args) {\n const [arg1, arg2, arg3] = args;\n const options = shared.create();\n if (!shared.isString(arg1) &&\n !shared.isNumber(arg1) &&\n !isMessageFunction(arg1) &&\n !isMessageAST(arg1)) {\n throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);\n }\n // prettier-ignore\n const key = shared.isNumber(arg1)\n ? String(arg1)\n : isMessageFunction(arg1)\n ? arg1\n : arg1;\n if (shared.isNumber(arg2)) {\n options.plural = arg2;\n }\n else if (shared.isString(arg2)) {\n options.default = arg2;\n }\n else if (shared.isPlainObject(arg2) && !shared.isEmptyObject(arg2)) {\n options.named = arg2;\n }\n else if (shared.isArray(arg2)) {\n options.list = arg2;\n }\n if (shared.isNumber(arg3)) {\n options.plural = arg3;\n }\n else if (shared.isString(arg3)) {\n options.default = arg3;\n }\n else if (shared.isPlainObject(arg3)) {\n shared.assign(options, arg3);\n }\n return [key, options];\n}\nfunction getCompileContext(context, locale, key, source, warnHtmlMessage, onError) {\n return {\n locale,\n key,\n warnHtmlMessage,\n onError: (err) => {\n onError && onError(err);\n {\n const _source = getSourceForCodeFrame(source);\n const message = `Message compilation error: ${err.message}`;\n const codeFrame = err.location &&\n _source &&\n shared.generateCodeFrame(_source, err.location.start.offset, err.location.end.offset);\n const emitter = context.__v_emitter;\n if (emitter && _source) {\n emitter.emit('compile-error', {\n message: _source,\n error: err.message,\n start: err.location && err.location.start.offset,\n end: err.location && err.location.end.offset,\n groupId: `${'translate'}:${key}`\n });\n }\n console.error(codeFrame ? `${message}\\n${codeFrame}` : message);\n }\n },\n onCacheKey: (source) => shared.generateFormatCacheKey(locale, key, source)\n };\n}\nfunction getSourceForCodeFrame(source) {\n if (shared.isString(source)) {\n return source;\n }\n else {\n if (source.loc && source.loc.source) {\n return source.loc.source;\n }\n }\n}\nfunction getMessageContextOptions(context, locale, message, options) {\n const { modifiers, pluralRules, messageResolver: resolveValue, fallbackLocale, fallbackWarn, missingWarn, fallbackContext } = context;\n const resolveMessage = (key, useLinked) => {\n let val = resolveValue(message, key);\n // fallback\n if (val == null && (fallbackContext || useLinked)) {\n const [, , message] = resolveMessageFormat(fallbackContext || context, // NOTE: if has fallbackContext, fallback to root, else if use linked, fallback to local context\n key, locale, fallbackLocale, fallbackWarn, missingWarn);\n val = resolveValue(message, key);\n }\n if (shared.isString(val) || isMessageAST(val)) {\n let occurred = false;\n const onError = () => {\n occurred = true;\n };\n const msg = compileMessageFormat(context, key, locale, val, key, onError);\n return !occurred\n ? msg\n : NOOP_MESSAGE_FUNCTION;\n }\n else if (isMessageFunction(val)) {\n return val;\n }\n else {\n // TODO: should be implemented warning message\n return NOOP_MESSAGE_FUNCTION;\n }\n };\n const ctxOptions = {\n locale,\n modifiers,\n pluralRules,\n messages: resolveMessage\n };\n if (context.processor) {\n ctxOptions.processor = context.processor;\n }\n if (options.list) {\n ctxOptions.list = options.list;\n }\n if (options.named) {\n ctxOptions.named = options.named;\n }\n if (shared.isNumber(options.plural)) {\n ctxOptions.pluralIndex = options.plural;\n }\n return ctxOptions;\n}\n\nexports.CompileErrorCodes = messageCompiler.CompileErrorCodes;\nexports.createCompileError = messageCompiler.createCompileError;\nexports.CORE_ERROR_CODES_EXTEND_POINT = CORE_ERROR_CODES_EXTEND_POINT;\nexports.CORE_WARN_CODES_EXTEND_POINT = CORE_WARN_CODES_EXTEND_POINT;\nexports.CoreErrorCodes = CoreErrorCodes;\nexports.CoreWarnCodes = CoreWarnCodes;\nexports.DATETIME_FORMAT_OPTIONS_KEYS = DATETIME_FORMAT_OPTIONS_KEYS;\nexports.DEFAULT_LOCALE = DEFAULT_LOCALE;\nexports.DEFAULT_MESSAGE_DATA_TYPE = DEFAULT_MESSAGE_DATA_TYPE;\nexports.MISSING_RESOLVE_VALUE = MISSING_RESOLVE_VALUE;\nexports.NOT_REOSLVED = NOT_REOSLVED;\nexports.NUMBER_FORMAT_OPTIONS_KEYS = NUMBER_FORMAT_OPTIONS_KEYS;\nexports.VERSION = VERSION;\nexports.clearCompileCache = clearCompileCache;\nexports.clearDateTimeFormat = clearDateTimeFormat;\nexports.clearNumberFormat = clearNumberFormat;\nexports.compile = compile;\nexports.createCoreContext = createCoreContext;\nexports.createCoreError = createCoreError;\nexports.createMessageContext = createMessageContext;\nexports.datetime = datetime;\nexports.fallbackWithLocaleChain = fallbackWithLocaleChain;\nexports.fallbackWithSimple = fallbackWithSimple;\nexports.getAdditionalMeta = getAdditionalMeta;\nexports.getDevToolsHook = getDevToolsHook;\nexports.getFallbackContext = getFallbackContext;\nexports.getLocale = getLocale;\nexports.getWarnMessage = getWarnMessage;\nexports.handleMissing = handleMissing;\nexports.initI18nDevTools = initI18nDevTools;\nexports.isAlmostSameLocale = isAlmostSameLocale;\nexports.isImplicitFallback = isImplicitFallback;\nexports.isMessageAST = isMessageAST;\nexports.isMessageFunction = isMessageFunction;\nexports.isTranslateFallbackWarn = isTranslateFallbackWarn;\nexports.isTranslateMissingWarn = isTranslateMissingWarn;\nexports.number = number;\nexports.parse = parse;\nexports.parseDateTimeArgs = parseDateTimeArgs;\nexports.parseNumberArgs = parseNumberArgs;\nexports.parseTranslateArgs = parseTranslateArgs;\nexports.registerLocaleFallbacker = registerLocaleFallbacker;\nexports.registerMessageCompiler = registerMessageCompiler;\nexports.registerMessageResolver = registerMessageResolver;\nexports.resolveLocale = resolveLocale;\nexports.resolveValue = resolveValue;\nexports.resolveWithKeyValue = resolveWithKeyValue;\nexports.setAdditionalMeta = setAdditionalMeta;\nexports.setDevToolsHook = setDevToolsHook;\nexports.setFallbackContext = setFallbackContext;\nexports.translate = translate;\nexports.translateDevTools = translateDevTools;\nexports.updateFallbackLocale = updateFallbackLocale;\n","/*!\n * message-compiler v11.1.2\n * (c) 2025 kazuya kawaguchi\n * Released under the MIT License.\n */\n'use strict';\n\nvar shared = require('@intlify/shared');\nvar sourceMapJs = require('source-map-js');\n\nconst LOCATION_STUB = {\n start: { line: 1, column: 1, offset: 0 },\n end: { line: 1, column: 1, offset: 0 }\n};\nfunction createPosition(line, column, offset) {\n return { line, column, offset };\n}\nfunction createLocation(start, end, source) {\n const loc = { start, end };\n if (source != null) {\n loc.source = source;\n }\n return loc;\n}\n\nconst CompileErrorCodes = {\n // tokenizer error codes\n EXPECTED_TOKEN: 1,\n INVALID_TOKEN_IN_PLACEHOLDER: 2,\n UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3,\n UNKNOWN_ESCAPE_SEQUENCE: 4,\n INVALID_UNICODE_ESCAPE_SEQUENCE: 5,\n UNBALANCED_CLOSING_BRACE: 6,\n UNTERMINATED_CLOSING_BRACE: 7,\n EMPTY_PLACEHOLDER: 8,\n NOT_ALLOW_NEST_PLACEHOLDER: 9,\n INVALID_LINKED_FORMAT: 10,\n // parser error codes\n MUST_HAVE_MESSAGES_IN_PLURAL: 11,\n UNEXPECTED_EMPTY_LINKED_MODIFIER: 12,\n UNEXPECTED_EMPTY_LINKED_KEY: 13,\n UNEXPECTED_LEXICAL_ANALYSIS: 14,\n // generator error codes\n UNHANDLED_CODEGEN_NODE_TYPE: 15,\n // minifier error codes\n UNHANDLED_MINIFIER_NODE_TYPE: 16\n};\n// Special value for higher-order compilers to pick up the last code\n// to avoid collision of error codes.\n// This should always be kept as the last item.\nconst COMPILE_ERROR_CODES_EXTEND_POINT = 17;\n/** @internal */\nconst errorMessages = {\n // tokenizer error messages\n [CompileErrorCodes.EXPECTED_TOKEN]: `Expected token: '{0}'`,\n [CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER]: `Invalid token in placeholder: '{0}'`,\n [CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]: `Unterminated single quote in placeholder`,\n [CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE]: `Unknown escape sequence: \\\\{0}`,\n [CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE]: `Invalid unicode escape sequence: {0}`,\n [CompileErrorCodes.UNBALANCED_CLOSING_BRACE]: `Unbalanced closing brace`,\n [CompileErrorCodes.UNTERMINATED_CLOSING_BRACE]: `Unterminated closing brace`,\n [CompileErrorCodes.EMPTY_PLACEHOLDER]: `Empty placeholder`,\n [CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER]: `Not allowed nest placeholder`,\n [CompileErrorCodes.INVALID_LINKED_FORMAT]: `Invalid linked format`,\n // parser error messages\n [CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL]: `Plural must have messages`,\n [CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER]: `Unexpected empty linked modifier`,\n [CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY]: `Unexpected empty linked key`,\n [CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS]: `Unexpected lexical analysis in token: '{0}'`,\n // generator error messages\n [CompileErrorCodes.UNHANDLED_CODEGEN_NODE_TYPE]: `unhandled codegen node type: '{0}'`,\n // minimizer error messages\n [CompileErrorCodes.UNHANDLED_MINIFIER_NODE_TYPE]: `unhandled mimifier node type: '{0}'`\n};\nfunction createCompileError(code, loc, options = {}) {\n const { domain, messages, args } = options;\n const msg = shared.format((messages || errorMessages)[code] || '', ...(args || []))\n ;\n const error = new SyntaxError(String(msg));\n error.code = code;\n if (loc) {\n error.location = loc;\n }\n error.domain = domain;\n return error;\n}\n/** @internal */\nfunction defaultOnError(error) {\n throw error;\n}\n\n// eslint-disable-next-line no-useless-escape\nconst RE_HTML_TAG = /<\\/?[\\w\\s=\"/.':;#-\\/]+>/;\nconst detectHtmlTag = (source) => RE_HTML_TAG.test(source);\n\nconst CHAR_SP = ' ';\nconst CHAR_CR = '\\r';\nconst CHAR_LF = '\\n';\nconst CHAR_LS = String.fromCharCode(0x2028);\nconst CHAR_PS = String.fromCharCode(0x2029);\nfunction createScanner(str) {\n const _buf = str;\n let _index = 0;\n let _line = 1;\n let _column = 1;\n let _peekOffset = 0;\n const isCRLF = (index) => _buf[index] === CHAR_CR && _buf[index + 1] === CHAR_LF;\n const isLF = (index) => _buf[index] === CHAR_LF;\n const isPS = (index) => _buf[index] === CHAR_PS;\n const isLS = (index) => _buf[index] === CHAR_LS;\n const isLineEnd = (index) => isCRLF(index) || isLF(index) || isPS(index) || isLS(index);\n const index = () => _index;\n const line = () => _line;\n const column = () => _column;\n const peekOffset = () => _peekOffset;\n const charAt = (offset) => isCRLF(offset) || isPS(offset) || isLS(offset) ? CHAR_LF : _buf[offset];\n const currentChar = () => charAt(_index);\n const currentPeek = () => charAt(_index + _peekOffset);\n function next() {\n _peekOffset = 0;\n if (isLineEnd(_index)) {\n _line++;\n _column = 0;\n }\n if (isCRLF(_index)) {\n _index++;\n }\n _index++;\n _column++;\n return _buf[_index];\n }\n function peek() {\n if (isCRLF(_index + _peekOffset)) {\n _peekOffset++;\n }\n _peekOffset++;\n return _buf[_index + _peekOffset];\n }\n function reset() {\n _index = 0;\n _line = 1;\n _column = 1;\n _peekOffset = 0;\n }\n function resetPeek(offset = 0) {\n _peekOffset = offset;\n }\n function skipToPeek() {\n const target = _index + _peekOffset;\n while (target !== _index) {\n next();\n }\n _peekOffset = 0;\n }\n return {\n index,\n line,\n column,\n peekOffset,\n charAt,\n currentChar,\n currentPeek,\n next,\n peek,\n reset,\n resetPeek,\n skipToPeek\n };\n}\n\nconst EOF = undefined;\nconst DOT = '.';\nconst LITERAL_DELIMITER = \"'\";\nconst ERROR_DOMAIN$3 = 'tokenizer';\nfunction createTokenizer(source, options = {}) {\n const location = options.location !== false;\n const _scnr = createScanner(source);\n const currentOffset = () => _scnr.index();\n const currentPosition = () => createPosition(_scnr.line(), _scnr.column(), _scnr.index());\n const _initLoc = currentPosition();\n const _initOffset = currentOffset();\n const _context = {\n currentType: 13 /* TokenTypes.EOF */,\n offset: _initOffset,\n startLoc: _initLoc,\n endLoc: _initLoc,\n lastType: 13 /* TokenTypes.EOF */,\n lastOffset: _initOffset,\n lastStartLoc: _initLoc,\n lastEndLoc: _initLoc,\n braceNest: 0,\n inLinked: false,\n text: ''\n };\n const context = () => _context;\n const { onError } = options;\n function emitError(code, pos, offset, ...args) {\n const ctx = context();\n pos.column += offset;\n pos.offset += offset;\n if (onError) {\n const loc = location ? createLocation(ctx.startLoc, pos) : null;\n const err = createCompileError(code, loc, {\n domain: ERROR_DOMAIN$3,\n args\n });\n onError(err);\n }\n }\n function getToken(context, type, value) {\n context.endLoc = currentPosition();\n context.currentType = type;\n const token = { type };\n if (location) {\n token.loc = createLocation(context.startLoc, context.endLoc);\n }\n if (value != null) {\n token.value = value;\n }\n return token;\n }\n const getEndToken = (context) => getToken(context, 13 /* TokenTypes.EOF */);\n function eat(scnr, ch) {\n if (scnr.currentChar() === ch) {\n scnr.next();\n return ch;\n }\n else {\n emitError(CompileErrorCodes.EXPECTED_TOKEN, currentPosition(), 0, ch);\n return '';\n }\n }\n function peekSpaces(scnr) {\n let buf = '';\n while (scnr.currentPeek() === CHAR_SP || scnr.currentPeek() === CHAR_LF) {\n buf += scnr.currentPeek();\n scnr.peek();\n }\n return buf;\n }\n function skipSpaces(scnr) {\n const buf = peekSpaces(scnr);\n scnr.skipToPeek();\n return buf;\n }\n function isIdentifierStart(ch) {\n if (ch === EOF) {\n return false;\n }\n const cc = ch.charCodeAt(0);\n return ((cc >= 97 && cc <= 122) || // a-z\n (cc >= 65 && cc <= 90) || // A-Z\n cc === 95 // _\n );\n }\n function isNumberStart(ch) {\n if (ch === EOF) {\n return false;\n }\n const cc = ch.charCodeAt(0);\n return cc >= 48 && cc <= 57; // 0-9\n }\n function isNamedIdentifierStart(scnr, context) {\n const { currentType } = context;\n if (currentType !== 2 /* TokenTypes.BraceLeft */) {\n return false;\n }\n peekSpaces(scnr);\n const ret = isIdentifierStart(scnr.currentPeek());\n scnr.resetPeek();\n return ret;\n }\n function isListIdentifierStart(scnr, context) {\n const { currentType } = context;\n if (currentType !== 2 /* TokenTypes.BraceLeft */) {\n return false;\n }\n peekSpaces(scnr);\n const ch = scnr.currentPeek() === '-' ? scnr.peek() : scnr.currentPeek();\n const ret = isNumberStart(ch);\n scnr.resetPeek();\n return ret;\n }\n function isLiteralStart(scnr, context) {\n const { currentType } = context;\n if (currentType !== 2 /* TokenTypes.BraceLeft */) {\n return false;\n }\n peekSpaces(scnr);\n const ret = scnr.currentPeek() === LITERAL_DELIMITER;\n scnr.resetPeek();\n return ret;\n }\n function isLinkedDotStart(scnr, context) {\n const { currentType } = context;\n if (currentType !== 7 /* TokenTypes.LinkedAlias */) {\n return false;\n }\n peekSpaces(scnr);\n const ret = scnr.currentPeek() === \".\" /* TokenChars.LinkedDot */;\n scnr.resetPeek();\n return ret;\n }\n function isLinkedModifierStart(scnr, context) {\n const { currentType } = context;\n if (currentType !== 8 /* TokenTypes.LinkedDot */) {\n return false;\n }\n peekSpaces(scnr);\n const ret = isIdentifierStart(scnr.currentPeek());\n scnr.resetPeek();\n return ret;\n }\n function isLinkedDelimiterStart(scnr, context) {\n const { currentType } = context;\n if (!(currentType === 7 /* TokenTypes.LinkedAlias */ ||\n currentType === 11 /* TokenTypes.LinkedModifier */)) {\n return false;\n }\n peekSpaces(scnr);\n const ret = scnr.currentPeek() === \":\" /* TokenChars.LinkedDelimiter */;\n scnr.resetPeek();\n return ret;\n }\n function isLinkedReferStart(scnr, context) {\n const { currentType } = context;\n if (currentType !== 9 /* TokenTypes.LinkedDelimiter */) {\n return false;\n }\n const fn = () => {\n const ch = scnr.currentPeek();\n if (ch === \"{\" /* TokenChars.BraceLeft */) {\n return isIdentifierStart(scnr.peek());\n }\n else if (ch === \"@\" /* TokenChars.LinkedAlias */ ||\n ch === \"|\" /* TokenChars.Pipe */ ||\n ch === \":\" /* TokenChars.LinkedDelimiter */ ||\n ch === \".\" /* TokenChars.LinkedDot */ ||\n ch === CHAR_SP ||\n !ch) {\n return false;\n }\n else if (ch === CHAR_LF) {\n scnr.peek();\n return fn();\n }\n else {\n // other characters\n return isTextStart(scnr, false);\n }\n };\n const ret = fn();\n scnr.resetPeek();\n return ret;\n }\n function isPluralStart(scnr) {\n peekSpaces(scnr);\n const ret = scnr.currentPeek() === \"|\" /* TokenChars.Pipe */;\n scnr.resetPeek();\n return ret;\n }\n function isTextStart(scnr, reset = true) {\n const fn = (hasSpace = false, prev = '') => {\n const ch = scnr.currentPeek();\n if (ch === \"{\" /* TokenChars.BraceLeft */) {\n return hasSpace;\n }\n else if (ch === \"@\" /* TokenChars.LinkedAlias */ || !ch) {\n return hasSpace;\n }\n else if (ch === \"|\" /* TokenChars.Pipe */) {\n return !(prev === CHAR_SP || prev === CHAR_LF);\n }\n else if (ch === CHAR_SP) {\n scnr.peek();\n return fn(true, CHAR_SP);\n }\n else if (ch === CHAR_LF) {\n scnr.peek();\n return fn(true, CHAR_LF);\n }\n else {\n return true;\n }\n };\n const ret = fn();\n reset && scnr.resetPeek();\n return ret;\n }\n function takeChar(scnr, fn) {\n const ch = scnr.currentChar();\n if (ch === EOF) {\n return EOF;\n }\n if (fn(ch)) {\n scnr.next();\n return ch;\n }\n return null;\n }\n function isIdentifier(ch) {\n const cc = ch.charCodeAt(0);\n return ((cc >= 97 && cc <= 122) || // a-z\n (cc >= 65 && cc <= 90) || // A-Z\n (cc >= 48 && cc <= 57) || // 0-9\n cc === 95 || // _\n cc === 36 // $\n );\n }\n function takeIdentifierChar(scnr) {\n return takeChar(scnr, isIdentifier);\n }\n function isNamedIdentifier(ch) {\n const cc = ch.charCodeAt(0);\n return ((cc >= 97 && cc <= 122) || // a-z\n (cc >= 65 && cc <= 90) || // A-Z\n (cc >= 48 && cc <= 57) || // 0-9\n cc === 95 || // _\n cc === 36 || // $\n cc === 45 // -\n );\n }\n function takeNamedIdentifierChar(scnr) {\n return takeChar(scnr, isNamedIdentifier);\n }\n function isDigit(ch) {\n const cc = ch.charCodeAt(0);\n return cc >= 48 && cc <= 57; // 0-9\n }\n function takeDigit(scnr) {\n return takeChar(scnr, isDigit);\n }\n function isHexDigit(ch) {\n const cc = ch.charCodeAt(0);\n return ((cc >= 48 && cc <= 57) || // 0-9\n (cc >= 65 && cc <= 70) || // A-F\n (cc >= 97 && cc <= 102)); // a-f\n }\n function takeHexDigit(scnr) {\n return takeChar(scnr, isHexDigit);\n }\n function getDigits(scnr) {\n let ch = '';\n let num = '';\n while ((ch = takeDigit(scnr))) {\n num += ch;\n }\n return num;\n }\n function readText(scnr) {\n let buf = '';\n while (true) {\n const ch = scnr.currentChar();\n if (ch === \"{\" /* TokenChars.BraceLeft */ ||\n ch === \"}\" /* TokenChars.BraceRight */ ||\n ch === \"@\" /* TokenChars.LinkedAlias */ ||\n ch === \"|\" /* TokenChars.Pipe */ ||\n !ch) {\n break;\n }\n else if (ch === CHAR_SP || ch === CHAR_LF) {\n if (isTextStart(scnr)) {\n buf += ch;\n scnr.next();\n }\n else if (isPluralStart(scnr)) {\n break;\n }\n else {\n buf += ch;\n scnr.next();\n }\n }\n else {\n buf += ch;\n scnr.next();\n }\n }\n return buf;\n }\n function readNamedIdentifier(scnr) {\n skipSpaces(scnr);\n let ch = '';\n let name = '';\n while ((ch = takeNamedIdentifierChar(scnr))) {\n name += ch;\n }\n if (scnr.currentChar() === EOF) {\n emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);\n }\n return name;\n }\n function readListIdentifier(scnr) {\n skipSpaces(scnr);\n let value = '';\n if (scnr.currentChar() === '-') {\n scnr.next();\n value += `-${getDigits(scnr)}`;\n }\n else {\n value += getDigits(scnr);\n }\n if (scnr.currentChar() === EOF) {\n emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);\n }\n return value;\n }\n function isLiteral(ch) {\n return ch !== LITERAL_DELIMITER && ch !== CHAR_LF;\n }\n function readLiteral(scnr) {\n skipSpaces(scnr);\n // eslint-disable-next-line no-useless-escape\n eat(scnr, `\\'`);\n let ch = '';\n let literal = '';\n while ((ch = takeChar(scnr, isLiteral))) {\n if (ch === '\\\\') {\n literal += readEscapeSequence(scnr);\n }\n else {\n literal += ch;\n }\n }\n const current = scnr.currentChar();\n if (current === CHAR_LF || current === EOF) {\n emitError(CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, currentPosition(), 0);\n // TODO: Is it correct really?\n if (current === CHAR_LF) {\n scnr.next();\n // eslint-disable-next-line no-useless-escape\n eat(scnr, `\\'`);\n }\n return literal;\n }\n // eslint-disable-next-line no-useless-escape\n eat(scnr, `\\'`);\n return literal;\n }\n function readEscapeSequence(scnr) {\n const ch = scnr.currentChar();\n switch (ch) {\n case '\\\\':\n case `\\'`: // eslint-disable-line no-useless-escape\n scnr.next();\n return `\\\\${ch}`;\n case 'u':\n return readUnicodeEscapeSequence(scnr, ch, 4);\n case 'U':\n return readUnicodeEscapeSequence(scnr, ch, 6);\n default:\n emitError(CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE, currentPosition(), 0, ch);\n return '';\n }\n }\n function readUnicodeEscapeSequence(scnr, unicode, digits) {\n eat(scnr, unicode);\n let sequence = '';\n for (let i = 0; i < digits; i++) {\n const ch = takeHexDigit(scnr);\n if (!ch) {\n emitError(CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE, currentPosition(), 0, `\\\\${unicode}${sequence}${scnr.currentChar()}`);\n break;\n }\n sequence += ch;\n }\n return `\\\\${unicode}${sequence}`;\n }\n function isInvalidIdentifier(ch) {\n return (ch !== \"{\" /* TokenChars.BraceLeft */ &&\n ch !== \"}\" /* TokenChars.BraceRight */ &&\n ch !== CHAR_SP &&\n ch !== CHAR_LF);\n }\n function readInvalidIdentifier(scnr) {\n skipSpaces(scnr);\n let ch = '';\n let identifiers = '';\n while ((ch = takeChar(scnr, isInvalidIdentifier))) {\n identifiers += ch;\n }\n return identifiers;\n }\n function readLinkedModifier(scnr) {\n let ch = '';\n let name = '';\n while ((ch = takeIdentifierChar(scnr))) {\n name += ch;\n }\n return name;\n }\n function readLinkedRefer(scnr) {\n const fn = (buf) => {\n const ch = scnr.currentChar();\n if (ch === \"{\" /* TokenChars.BraceLeft */ ||\n ch === \"@\" /* TokenChars.LinkedAlias */ ||\n ch === \"|\" /* TokenChars.Pipe */ ||\n ch === \"(\" /* TokenChars.ParenLeft */ ||\n ch === \")\" /* TokenChars.ParenRight */ ||\n !ch) {\n return buf;\n }\n else if (ch === CHAR_SP) {\n return buf;\n }\n else if (ch === CHAR_LF || ch === DOT) {\n buf += ch;\n scnr.next();\n return fn(buf);\n }\n else {\n buf += ch;\n scnr.next();\n return fn(buf);\n }\n };\n return fn('');\n }\n function readPlural(scnr) {\n skipSpaces(scnr);\n const plural = eat(scnr, \"|\" /* TokenChars.Pipe */);\n skipSpaces(scnr);\n return plural;\n }\n // TODO: We need refactoring of token parsing ...\n function readTokenInPlaceholder(scnr, context) {\n let token = null;\n const ch = scnr.currentChar();\n switch (ch) {\n case \"{\" /* TokenChars.BraceLeft */:\n if (context.braceNest >= 1) {\n emitError(CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER, currentPosition(), 0);\n }\n scnr.next();\n token = getToken(context, 2 /* TokenTypes.BraceLeft */, \"{\" /* TokenChars.BraceLeft */);\n skipSpaces(scnr);\n context.braceNest++;\n return token;\n case \"}\" /* TokenChars.BraceRight */:\n if (context.braceNest > 0 &&\n context.currentType === 2 /* TokenTypes.BraceLeft */) {\n emitError(CompileErrorCodes.EMPTY_PLACEHOLDER, currentPosition(), 0);\n }\n scnr.next();\n token = getToken(context, 3 /* TokenTypes.BraceRight */, \"}\" /* TokenChars.BraceRight */);\n context.braceNest--;\n context.braceNest > 0 && skipSpaces(scnr);\n if (context.inLinked && context.braceNest === 0) {\n context.inLinked = false;\n }\n return token;\n case \"@\" /* TokenChars.LinkedAlias */:\n if (context.braceNest > 0) {\n emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);\n }\n token = readTokenInLinked(scnr, context) || getEndToken(context);\n context.braceNest = 0;\n return token;\n default: {\n let validNamedIdentifier = true;\n let validListIdentifier = true;\n let validLiteral = true;\n if (isPluralStart(scnr)) {\n if (context.braceNest > 0) {\n emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);\n }\n token = getToken(context, 1 /* TokenTypes.Pipe */, readPlural(scnr));\n // reset\n context.braceNest = 0;\n context.inLinked = false;\n return token;\n }\n if (context.braceNest > 0 &&\n (context.currentType === 4 /* TokenTypes.Named */ ||\n context.currentType === 5 /* TokenTypes.List */ ||\n context.currentType === 6 /* TokenTypes.Literal */)) {\n emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);\n context.braceNest = 0;\n return readToken(scnr, context);\n }\n if ((validNamedIdentifier = isNamedIdentifierStart(scnr, context))) {\n token = getToken(context, 4 /* TokenTypes.Named */, readNamedIdentifier(scnr));\n skipSpaces(scnr);\n return token;\n }\n if ((validListIdentifier = isListIdentifierStart(scnr, context))) {\n token = getToken(context, 5 /* TokenTypes.List */, readListIdentifier(scnr));\n skipSpaces(scnr);\n return token;\n }\n if ((validLiteral = isLiteralStart(scnr, context))) {\n token = getToken(context, 6 /* TokenTypes.Literal */, readLiteral(scnr));\n skipSpaces(scnr);\n return token;\n }\n if (!validNamedIdentifier && !validListIdentifier && !validLiteral) {\n // TODO: we should be re-designed invalid cases, when we will extend message syntax near the future ...\n token = getToken(context, 12 /* TokenTypes.InvalidPlace */, readInvalidIdentifier(scnr));\n emitError(CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER, currentPosition(), 0, token.value);\n skipSpaces(scnr);\n return token;\n }\n break;\n }\n }\n return token;\n }\n // TODO: We need refactoring of token parsing ...\n function readTokenInLinked(scnr, context) {\n const { currentType } = context;\n let token = null;\n const ch = scnr.currentChar();\n if ((currentType === 7 /* TokenTypes.LinkedAlias */ ||\n currentType === 8 /* TokenTypes.LinkedDot */ ||\n currentType === 11 /* TokenTypes.LinkedModifier */ ||\n currentType === 9 /* TokenTypes.LinkedDelimiter */) &&\n (ch === CHAR_LF || ch === CHAR_SP)) {\n emitError(CompileErrorCodes.INVALID_LINKED_FORMAT, currentPosition(), 0);\n }\n switch (ch) {\n case \"@\" /* TokenChars.LinkedAlias */:\n scnr.next();\n token = getToken(context, 7 /* TokenTypes.LinkedAlias */, \"@\" /* TokenChars.LinkedAlias */);\n context.inLinked = true;\n return token;\n case \".\" /* TokenChars.LinkedDot */:\n skipSpaces(scnr);\n scnr.next();\n return getToken(context, 8 /* TokenTypes.LinkedDot */, \".\" /* TokenChars.LinkedDot */);\n case \":\" /* TokenChars.LinkedDelimiter */:\n skipSpaces(scnr);\n scnr.next();\n return getToken(context, 9 /* TokenTypes.LinkedDelimiter */, \":\" /* TokenChars.LinkedDelimiter */);\n default:\n if (isPluralStart(scnr)) {\n token = getToken(context, 1 /* TokenTypes.Pipe */, readPlural(scnr));\n // reset\n context.braceNest = 0;\n context.inLinked = false;\n return token;\n }\n if (isLinkedDotStart(scnr, context) ||\n isLinkedDelimiterStart(scnr, context)) {\n skipSpaces(scnr);\n return readTokenInLinked(scnr, context);\n }\n if (isLinkedModifierStart(scnr, context)) {\n skipSpaces(scnr);\n return getToken(context, 11 /* TokenTypes.LinkedModifier */, readLinkedModifier(scnr));\n }\n if (isLinkedReferStart(scnr, context)) {\n skipSpaces(scnr);\n if (ch === \"{\" /* TokenChars.BraceLeft */) {\n // scan the placeholder\n return readTokenInPlaceholder(scnr, context) || token;\n }\n else {\n return getToken(context, 10 /* TokenTypes.LinkedKey */, readLinkedRefer(scnr));\n }\n }\n if (currentType === 7 /* TokenTypes.LinkedAlias */) {\n emitError(CompileErrorCodes.INVALID_LINKED_FORMAT, currentPosition(), 0);\n }\n context.braceNest = 0;\n context.inLinked = false;\n return readToken(scnr, context);\n }\n }\n // TODO: We need refactoring of token parsing ...\n function readToken(scnr, context) {\n let token = { type: 13 /* TokenTypes.EOF */ };\n if (context.braceNest > 0) {\n return readTokenInPlaceholder(scnr, context) || getEndToken(context);\n }\n if (context.inLinked) {\n return readTokenInLinked(scnr, context) || getEndToken(context);\n }\n const ch = scnr.currentChar();\n switch (ch) {\n case \"{\" /* TokenChars.BraceLeft */:\n return readTokenInPlaceholder(scnr, context) || getEndToken(context);\n case \"}\" /* TokenChars.BraceRight */:\n emitError(CompileErrorCodes.UNBALANCED_CLOSING_BRACE, currentPosition(), 0);\n scnr.next();\n return getToken(context, 3 /* TokenTypes.BraceRight */, \"}\" /* TokenChars.BraceRight */);\n case \"@\" /* TokenChars.LinkedAlias */:\n return readTokenInLinked(scnr, context) || getEndToken(context);\n default: {\n if (isPluralStart(scnr)) {\n token = getToken(context, 1 /* TokenTypes.Pipe */, readPlural(scnr));\n // reset\n context.braceNest = 0;\n context.inLinked = false;\n return token;\n }\n if (isTextStart(scnr)) {\n return getToken(context, 0 /* TokenTypes.Text */, readText(scnr));\n }\n break;\n }\n }\n return token;\n }\n function nextToken() {\n const { currentType, offset, startLoc, endLoc } = _context;\n _context.lastType = currentType;\n _context.lastOffset = offset;\n _context.lastStartLoc = startLoc;\n _context.lastEndLoc = endLoc;\n _context.offset = currentOffset();\n _context.startLoc = currentPosition();\n if (_scnr.currentChar() === EOF) {\n return getToken(_context, 13 /* TokenTypes.EOF */);\n }\n return readToken(_scnr, _context);\n }\n return {\n nextToken,\n currentOffset,\n currentPosition,\n context\n };\n}\n\nconst ERROR_DOMAIN$2 = 'parser';\n// Backslash backslash, backslash quote, uHHHH, UHHHHHH.\nconst KNOWN_ESCAPES = /(?:\\\\\\\\|\\\\'|\\\\u([0-9a-fA-F]{4})|\\\\U([0-9a-fA-F]{6}))/g;\nfunction fromEscapeSequence(match, codePoint4, codePoint6) {\n switch (match) {\n case `\\\\\\\\`:\n return `\\\\`;\n // eslint-disable-next-line no-useless-escape\n case `\\\\\\'`:\n // eslint-disable-next-line no-useless-escape\n return `\\'`;\n default: {\n const codePoint = parseInt(codePoint4 || codePoint6, 16);\n if (codePoint <= 0xd7ff || codePoint >= 0xe000) {\n return String.fromCodePoint(codePoint);\n }\n // invalid ...\n // Replace them with U+FFFD REPLACEMENT CHARACTER.\n return '�';\n }\n }\n}\nfunction createParser(options = {}) {\n const location = options.location !== false;\n const { onError } = options;\n function emitError(tokenzer, code, start, offset, ...args) {\n const end = tokenzer.currentPosition();\n end.offset += offset;\n end.column += offset;\n if (onError) {\n const loc = location ? createLocation(start, end) : null;\n const err = createCompileError(code, loc, {\n domain: ERROR_DOMAIN$2,\n args\n });\n onError(err);\n }\n }\n function startNode(type, offset, loc) {\n const node = { type };\n if (location) {\n node.start = offset;\n node.end = offset;\n node.loc = { start: loc, end: loc };\n }\n return node;\n }\n function endNode(node, offset, pos, type) {\n if (location) {\n node.end = offset;\n if (node.loc) {\n node.loc.end = pos;\n }\n }\n }\n function parseText(tokenizer, value) {\n const context = tokenizer.context();\n const node = startNode(3 /* NodeTypes.Text */, context.offset, context.startLoc);\n node.value = value;\n endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n return node;\n }\n function parseList(tokenizer, index) {\n const context = tokenizer.context();\n const { lastOffset: offset, lastStartLoc: loc } = context; // get brace left loc\n const node = startNode(5 /* NodeTypes.List */, offset, loc);\n node.index = parseInt(index, 10);\n tokenizer.nextToken(); // skip brach right\n endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n return node;\n }\n function parseNamed(tokenizer, key) {\n const context = tokenizer.context();\n const { lastOffset: offset, lastStartLoc: loc } = context; // get brace left loc\n const node = startNode(4 /* NodeTypes.Named */, offset, loc);\n node.key = key;\n tokenizer.nextToken(); // skip brach right\n endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n return node;\n }\n function parseLiteral(tokenizer, value) {\n const context = tokenizer.context();\n const { lastOffset: offset, lastStartLoc: loc } = context; // get brace left loc\n const node = startNode(9 /* NodeTypes.Literal */, offset, loc);\n node.value = value.replace(KNOWN_ESCAPES, fromEscapeSequence);\n tokenizer.nextToken(); // skip brach right\n endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n return node;\n }\n function parseLinkedModifier(tokenizer) {\n const token = tokenizer.nextToken();\n const context = tokenizer.context();\n const { lastOffset: offset, lastStartLoc: loc } = context; // get linked dot loc\n const node = startNode(8 /* NodeTypes.LinkedModifier */, offset, loc);\n if (token.type !== 11 /* TokenTypes.LinkedModifier */) {\n // empty modifier\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER, context.lastStartLoc, 0);\n node.value = '';\n endNode(node, offset, loc);\n return {\n nextConsumeToken: token,\n node\n };\n }\n // check token\n if (token.value == null) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n }\n node.value = token.value || '';\n endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n return {\n node\n };\n }\n function parseLinkedKey(tokenizer, value) {\n const context = tokenizer.context();\n const node = startNode(7 /* NodeTypes.LinkedKey */, context.offset, context.startLoc);\n node.value = value;\n endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n return node;\n }\n function parseLinked(tokenizer) {\n const context = tokenizer.context();\n const linkedNode = startNode(6 /* NodeTypes.Linked */, context.offset, context.startLoc);\n let token = tokenizer.nextToken();\n if (token.type === 8 /* TokenTypes.LinkedDot */) {\n const parsed = parseLinkedModifier(tokenizer);\n linkedNode.modifier = parsed.node;\n token = parsed.nextConsumeToken || tokenizer.nextToken();\n }\n // asset check token\n if (token.type !== 9 /* TokenTypes.LinkedDelimiter */) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n }\n token = tokenizer.nextToken();\n // skip brace left\n if (token.type === 2 /* TokenTypes.BraceLeft */) {\n token = tokenizer.nextToken();\n }\n switch (token.type) {\n case 10 /* TokenTypes.LinkedKey */:\n if (token.value == null) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n }\n linkedNode.key = parseLinkedKey(tokenizer, token.value || '');\n break;\n case 4 /* TokenTypes.Named */:\n if (token.value == null) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n }\n linkedNode.key = parseNamed(tokenizer, token.value || '');\n break;\n case 5 /* TokenTypes.List */:\n if (token.value == null) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n }\n linkedNode.key = parseList(tokenizer, token.value || '');\n break;\n case 6 /* TokenTypes.Literal */:\n if (token.value == null) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n }\n linkedNode.key = parseLiteral(tokenizer, token.value || '');\n break;\n default: {\n // empty key\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY, context.lastStartLoc, 0);\n const nextContext = tokenizer.context();\n const emptyLinkedKeyNode = startNode(7 /* NodeTypes.LinkedKey */, nextContext.offset, nextContext.startLoc);\n emptyLinkedKeyNode.value = '';\n endNode(emptyLinkedKeyNode, nextContext.offset, nextContext.startLoc);\n linkedNode.key = emptyLinkedKeyNode;\n endNode(linkedNode, nextContext.offset, nextContext.startLoc);\n return {\n nextConsumeToken: token,\n node: linkedNode\n };\n }\n }\n endNode(linkedNode, tokenizer.currentOffset(), tokenizer.currentPosition());\n return {\n node: linkedNode\n };\n }\n function parseMessage(tokenizer) {\n const context = tokenizer.context();\n const startOffset = context.currentType === 1 /* TokenTypes.Pipe */\n ? tokenizer.currentOffset()\n : context.offset;\n const startLoc = context.currentType === 1 /* TokenTypes.Pipe */\n ? context.endLoc\n : context.startLoc;\n const node = startNode(2 /* NodeTypes.Message */, startOffset, startLoc);\n node.items = [];\n let nextToken = null;\n do {\n const token = nextToken || tokenizer.nextToken();\n nextToken = null;\n switch (token.type) {\n case 0 /* TokenTypes.Text */:\n if (token.value == null) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n }\n node.items.push(parseText(tokenizer, token.value || ''));\n break;\n case 5 /* TokenTypes.List */:\n if (token.value == null) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n }\n node.items.push(parseList(tokenizer, token.value || ''));\n break;\n case 4 /* TokenTypes.Named */:\n if (token.value == null) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n }\n node.items.push(parseNamed(tokenizer, token.value || ''));\n break;\n case 6 /* TokenTypes.Literal */:\n if (token.value == null) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n }\n node.items.push(parseLiteral(tokenizer, token.value || ''));\n break;\n case 7 /* TokenTypes.LinkedAlias */: {\n const parsed = parseLinked(tokenizer);\n node.items.push(parsed.node);\n nextToken = parsed.nextConsumeToken || null;\n break;\n }\n }\n } while (context.currentType !== 13 /* TokenTypes.EOF */ &&\n context.currentType !== 1 /* TokenTypes.Pipe */);\n // adjust message node loc\n const endOffset = context.currentType === 1 /* TokenTypes.Pipe */\n ? context.lastOffset\n : tokenizer.currentOffset();\n const endLoc = context.currentType === 1 /* TokenTypes.Pipe */\n ? context.lastEndLoc\n : tokenizer.currentPosition();\n endNode(node, endOffset, endLoc);\n return node;\n }\n function parsePlural(tokenizer, offset, loc, msgNode) {\n const context = tokenizer.context();\n let hasEmptyMessage = msgNode.items.length === 0;\n const node = startNode(1 /* NodeTypes.Plural */, offset, loc);\n node.cases = [];\n node.cases.push(msgNode);\n do {\n const msg = parseMessage(tokenizer);\n if (!hasEmptyMessage) {\n hasEmptyMessage = msg.items.length === 0;\n }\n node.cases.push(msg);\n } while (context.currentType !== 13 /* TokenTypes.EOF */);\n if (hasEmptyMessage) {\n emitError(tokenizer, CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL, loc, 0);\n }\n endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n return node;\n }\n function parseResource(tokenizer) {\n const context = tokenizer.context();\n const { offset, startLoc } = context;\n const msgNode = parseMessage(tokenizer);\n if (context.currentType === 13 /* TokenTypes.EOF */) {\n return msgNode;\n }\n else {\n return parsePlural(tokenizer, offset, startLoc, msgNode);\n }\n }\n function parse(source) {\n const tokenizer = createTokenizer(source, shared.assign({}, options));\n const context = tokenizer.context();\n const node = startNode(0 /* NodeTypes.Resource */, context.offset, context.startLoc);\n if (location && node.loc) {\n node.loc.source = source;\n }\n node.body = parseResource(tokenizer);\n if (options.onCacheKey) {\n node.cacheKey = options.onCacheKey(source);\n }\n // assert whether achieved to EOF\n if (context.currentType !== 13 /* TokenTypes.EOF */) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, source[context.offset] || '');\n }\n endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n return node;\n }\n return { parse };\n}\nfunction getTokenCaption(token) {\n if (token.type === 13 /* TokenTypes.EOF */) {\n return 'EOF';\n }\n const name = (token.value || '').replace(/\\r?\\n/gu, '\\\\n');\n return name.length > 10 ? name.slice(0, 9) + '…' : name;\n}\n\nfunction createTransformer(ast, options = {} // eslint-disable-line\n) {\n const _context = {\n ast,\n helpers: new Set()\n };\n const context = () => _context;\n const helper = (name) => {\n _context.helpers.add(name);\n return name;\n };\n return { context, helper };\n}\nfunction traverseNodes(nodes, transformer) {\n for (let i = 0; i < nodes.length; i++) {\n traverseNode(nodes[i], transformer);\n }\n}\nfunction traverseNode(node, transformer) {\n // TODO: if we need pre-hook of transform, should be implemented to here\n switch (node.type) {\n case 1 /* NodeTypes.Plural */:\n traverseNodes(node.cases, transformer);\n transformer.helper(\"plural\" /* HelperNameMap.PLURAL */);\n break;\n case 2 /* NodeTypes.Message */:\n traverseNodes(node.items, transformer);\n break;\n case 6 /* NodeTypes.Linked */: {\n const linked = node;\n traverseNode(linked.key, transformer);\n transformer.helper(\"linked\" /* HelperNameMap.LINKED */);\n transformer.helper(\"type\" /* HelperNameMap.TYPE */);\n break;\n }\n case 5 /* NodeTypes.List */:\n transformer.helper(\"interpolate\" /* HelperNameMap.INTERPOLATE */);\n transformer.helper(\"list\" /* HelperNameMap.LIST */);\n break;\n case 4 /* NodeTypes.Named */:\n transformer.helper(\"interpolate\" /* HelperNameMap.INTERPOLATE */);\n transformer.helper(\"named\" /* HelperNameMap.NAMED */);\n break;\n }\n // TODO: if we need post-hook of transform, should be implemented to here\n}\n// transform AST\nfunction transform(ast, options = {} // eslint-disable-line\n) {\n const transformer = createTransformer(ast);\n transformer.helper(\"normalize\" /* HelperNameMap.NORMALIZE */);\n // traverse\n ast.body && traverseNode(ast.body, transformer);\n // set meta information\n const context = transformer.context();\n ast.helpers = Array.from(context.helpers);\n}\n\nfunction optimize(ast) {\n const body = ast.body;\n if (body.type === 2 /* NodeTypes.Message */) {\n optimizeMessageNode(body);\n }\n else {\n body.cases.forEach(c => optimizeMessageNode(c));\n }\n return ast;\n}\nfunction optimizeMessageNode(message) {\n if (message.items.length === 1) {\n const item = message.items[0];\n if (item.type === 3 /* NodeTypes.Text */ || item.type === 9 /* NodeTypes.Literal */) {\n message.static = item.value;\n delete item.value; // optimization for size\n }\n }\n else {\n const values = [];\n for (let i = 0; i < message.items.length; i++) {\n const item = message.items[i];\n if (!(item.type === 3 /* NodeTypes.Text */ || item.type === 9 /* NodeTypes.Literal */)) {\n break;\n }\n if (item.value == null) {\n break;\n }\n values.push(item.value);\n }\n if (values.length === message.items.length) {\n message.static = shared.join(values);\n for (let i = 0; i < message.items.length; i++) {\n const item = message.items[i];\n if (item.type === 3 /* NodeTypes.Text */ || item.type === 9 /* NodeTypes.Literal */) {\n delete item.value; // optimization for size\n }\n }\n }\n }\n}\n\nconst ERROR_DOMAIN$1 = 'minifier';\n/* eslint-disable @typescript-eslint/no-explicit-any */\nfunction minify(node) {\n node.t = node.type;\n switch (node.type) {\n case 0 /* NodeTypes.Resource */: {\n const resource = node;\n minify(resource.body);\n resource.b = resource.body;\n delete resource.body;\n break;\n }\n case 1 /* NodeTypes.Plural */: {\n const plural = node;\n const cases = plural.cases;\n for (let i = 0; i < cases.length; i++) {\n minify(cases[i]);\n }\n plural.c = cases;\n delete plural.cases;\n break;\n }\n case 2 /* NodeTypes.Message */: {\n const message = node;\n const items = message.items;\n for (let i = 0; i < items.length; i++) {\n minify(items[i]);\n }\n message.i = items;\n delete message.items;\n if (message.static) {\n message.s = message.static;\n delete message.static;\n }\n break;\n }\n case 3 /* NodeTypes.Text */:\n case 9 /* NodeTypes.Literal */:\n case 8 /* NodeTypes.LinkedModifier */:\n case 7 /* NodeTypes.LinkedKey */: {\n const valueNode = node;\n if (valueNode.value) {\n valueNode.v = valueNode.value;\n delete valueNode.value;\n }\n break;\n }\n case 6 /* NodeTypes.Linked */: {\n const linked = node;\n minify(linked.key);\n linked.k = linked.key;\n delete linked.key;\n if (linked.modifier) {\n minify(linked.modifier);\n linked.m = linked.modifier;\n delete linked.modifier;\n }\n break;\n }\n case 5 /* NodeTypes.List */: {\n const list = node;\n list.i = list.index;\n delete list.index;\n break;\n }\n case 4 /* NodeTypes.Named */: {\n const named = node;\n named.k = named.key;\n delete named.key;\n break;\n }\n default:\n {\n throw createCompileError(CompileErrorCodes.UNHANDLED_MINIFIER_NODE_TYPE, null, {\n domain: ERROR_DOMAIN$1,\n args: [node.type]\n });\n }\n }\n delete node.type;\n}\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\n// eslint-disable-next-line @typescript-eslint/triple-slash-reference\n/// <reference types=\"source-map-js\" />\nconst ERROR_DOMAIN = 'parser';\nfunction createCodeGenerator(ast, options) {\n const { sourceMap, filename, breakLineCode, needIndent: _needIndent } = options;\n const location = options.location !== false;\n const _context = {\n filename,\n code: '',\n column: 1,\n line: 1,\n offset: 0,\n map: undefined,\n breakLineCode,\n needIndent: _needIndent,\n indentLevel: 0\n };\n if (location && ast.loc) {\n _context.source = ast.loc.source;\n }\n const context = () => _context;\n function push(code, node) {\n _context.code += code;\n if (_context.map) {\n if (node && node.loc && node.loc !== LOCATION_STUB) {\n addMapping(node.loc.start, getMappingName(node));\n }\n advancePositionWithSource(_context, code);\n }\n }\n function _newline(n, withBreakLine = true) {\n const _breakLineCode = withBreakLine ? breakLineCode : '';\n push(_needIndent ? _breakLineCode + ` `.repeat(n) : _breakLineCode);\n }\n function indent(withNewLine = true) {\n const level = ++_context.indentLevel;\n withNewLine && _newline(level);\n }\n function deindent(withNewLine = true) {\n const level = --_context.indentLevel;\n withNewLine && _newline(level);\n }\n function newline() {\n _newline(_context.indentLevel);\n }\n const helper = (key) => `_${key}`;\n const needIndent = () => _context.needIndent;\n function addMapping(loc, name) {\n _context.map.addMapping({\n name,\n source: _context.filename,\n original: {\n line: loc.line,\n column: loc.column - 1\n },\n generated: {\n line: _context.line,\n column: _context.column - 1\n }\n });\n }\n if (location && sourceMap) {\n _context.map = new sourceMapJs.SourceMapGenerator();\n _context.map.setSourceContent(filename, _context.source);\n }\n return {\n context,\n push,\n indent,\n deindent,\n newline,\n helper,\n needIndent\n };\n}\nfunction generateLinkedNode(generator, node) {\n const { helper } = generator;\n generator.push(`${helper(\"linked\" /* HelperNameMap.LINKED */)}(`);\n generateNode(generator, node.key);\n if (node.modifier) {\n generator.push(`, `);\n generateNode(generator, node.modifier);\n generator.push(`, _type`);\n }\n else {\n generator.push(`, undefined, _type`);\n }\n generator.push(`)`);\n}\nfunction generateMessageNode(generator, node) {\n const { helper, needIndent } = generator;\n generator.push(`${helper(\"normalize\" /* HelperNameMap.NORMALIZE */)}([`);\n generator.indent(needIndent());\n const length = node.items.length;\n for (let i = 0; i < length; i++) {\n generateNode(generator, node.items[i]);\n if (i === length - 1) {\n break;\n }\n generator.push(', ');\n }\n generator.deindent(needIndent());\n generator.push('])');\n}\nfunction generatePluralNode(generator, node) {\n const { helper, needIndent } = generator;\n if (node.cases.length > 1) {\n generator.push(`${helper(\"plural\" /* HelperNameMap.PLURAL */)}([`);\n generator.indent(needIndent());\n const length = node.cases.length;\n for (let i = 0; i < length; i++) {\n generateNode(generator, node.cases[i]);\n if (i === length - 1) {\n break;\n }\n generator.push(', ');\n }\n generator.deindent(needIndent());\n generator.push(`])`);\n }\n}\nfunction generateResource(generator, node) {\n if (node.body) {\n generateNode(generator, node.body);\n }\n else {\n generator.push('null');\n }\n}\nfunction generateNode(generator, node) {\n const { helper } = generator;\n switch (node.type) {\n case 0 /* NodeTypes.Resource */:\n generateResource(generator, node);\n break;\n case 1 /* NodeTypes.Plural */:\n generatePluralNode(generator, node);\n break;\n case 2 /* NodeTypes.Message */:\n generateMessageNode(generator, node);\n break;\n case 6 /* NodeTypes.Linked */:\n generateLinkedNode(generator, node);\n break;\n case 8 /* NodeTypes.LinkedModifier */:\n generator.push(JSON.stringify(node.value), node);\n break;\n case 7 /* NodeTypes.LinkedKey */:\n generator.push(JSON.stringify(node.value), node);\n break;\n case 5 /* NodeTypes.List */:\n generator.push(`${helper(\"interpolate\" /* HelperNameMap.INTERPOLATE */)}(${helper(\"list\" /* HelperNameMap.LIST */)}(${node.index}))`, node);\n break;\n case 4 /* NodeTypes.Named */:\n generator.push(`${helper(\"interpolate\" /* HelperNameMap.INTERPOLATE */)}(${helper(\"named\" /* HelperNameMap.NAMED */)}(${JSON.stringify(node.key)}))`, node);\n break;\n case 9 /* NodeTypes.Literal */:\n generator.push(JSON.stringify(node.value), node);\n break;\n case 3 /* NodeTypes.Text */:\n generator.push(JSON.stringify(node.value), node);\n break;\n default:\n {\n throw createCompileError(CompileErrorCodes.UNHANDLED_CODEGEN_NODE_TYPE, null, {\n domain: ERROR_DOMAIN,\n args: [node.type]\n });\n }\n }\n}\n// generate code from AST\nconst generate = (ast, options = {}) => {\n const mode = shared.isString(options.mode) ? options.mode : 'normal';\n const filename = shared.isString(options.filename)\n ? options.filename\n : 'message.intl';\n const sourceMap = !!options.sourceMap;\n // prettier-ignore\n const breakLineCode = options.breakLineCode != null\n ? options.breakLineCode\n : mode === 'arrow'\n ? ';'\n : '\\n';\n const needIndent = options.needIndent ? options.needIndent : mode !== 'arrow';\n const helpers = ast.helpers || [];\n const generator = createCodeGenerator(ast, {\n mode,\n filename,\n sourceMap,\n breakLineCode,\n needIndent\n });\n generator.push(mode === 'normal' ? `function __msg__ (ctx) {` : `(ctx) => {`);\n generator.indent(needIndent);\n if (helpers.length > 0) {\n generator.push(`const { ${shared.join(helpers.map(s => `${s}: _${s}`), ', ')} } = ctx`);\n generator.newline();\n }\n generator.push(`return `);\n generateNode(generator, ast);\n generator.deindent(needIndent);\n generator.push(`}`);\n delete ast.helpers;\n const { code, map } = generator.context();\n return {\n ast,\n code,\n map: map ? map.toJSON() : undefined // eslint-disable-line @typescript-eslint/no-explicit-any\n };\n};\nfunction getMappingName(node) {\n switch (node.type) {\n case 3 /* NodeTypes.Text */:\n case 9 /* NodeTypes.Literal */:\n case 8 /* NodeTypes.LinkedModifier */:\n case 7 /* NodeTypes.LinkedKey */:\n return node.value;\n case 5 /* NodeTypes.List */:\n return node.index.toString();\n case 4 /* NodeTypes.Named */:\n return node.key;\n default:\n return undefined;\n }\n}\nfunction advancePositionWithSource(pos, source, numberOfCharacters = source.length) {\n let linesCount = 0;\n let lastNewLinePos = -1;\n for (let i = 0; i < numberOfCharacters; i++) {\n if (source.charCodeAt(i) === 10 /* newline char code */) {\n linesCount++;\n lastNewLinePos = i;\n }\n }\n pos.offset += numberOfCharacters;\n pos.line += linesCount;\n pos.column =\n lastNewLinePos === -1\n ? pos.column + numberOfCharacters\n : numberOfCharacters - lastNewLinePos;\n return pos;\n}\n\nfunction baseCompile(source, options = {}) {\n const assignedOptions = shared.assign({}, options);\n const jit = !!assignedOptions.jit;\n const enalbeMinify = !!assignedOptions.minify;\n const enambeOptimize = assignedOptions.optimize == null ? true : assignedOptions.optimize;\n // parse source codes\n const parser = createParser(assignedOptions);\n const ast = parser.parse(source);\n if (!jit) {\n // transform ASTs\n transform(ast, assignedOptions);\n // generate javascript codes\n return generate(ast, assignedOptions);\n }\n else {\n // optimize ASTs\n enambeOptimize && optimize(ast);\n // minimize ASTs\n enalbeMinify && minify(ast);\n // In JIT mode, no ast transform, no code generation.\n return { ast, code: '' };\n }\n}\n\nexports.COMPILE_ERROR_CODES_EXTEND_POINT = COMPILE_ERROR_CODES_EXTEND_POINT;\nexports.CompileErrorCodes = CompileErrorCodes;\nexports.ERROR_DOMAIN = ERROR_DOMAIN$2;\nexports.LOCATION_STUB = LOCATION_STUB;\nexports.baseCompile = baseCompile;\nexports.createCompileError = createCompileError;\nexports.createLocation = createLocation;\nexports.createParser = createParser;\nexports.createPosition = createPosition;\nexports.defaultOnError = defaultOnError;\nexports.detectHtmlTag = detectHtmlTag;\nexports.errorMessages = errorMessages;\n","/*!\n * shared v11.1.2\n * (c) 2025 kazuya kawaguchi\n * Released under the MIT License.\n */\n'use strict';\n\n/**\n * Original Utilities\n * written by kazuya kawaguchi\n */\nconst inBrowser = typeof window !== 'undefined';\nexports.mark = void 0;\nexports.measure = void 0;\n{\n const perf = inBrowser && window.performance;\n if (perf &&\n perf.mark &&\n perf.measure &&\n perf.clearMarks &&\n // @ts-ignore browser compat\n perf.clearMeasures) {\n exports.mark = (tag) => {\n perf.mark(tag);\n };\n exports.measure = (name, startTag, endTag) => {\n perf.measure(name, startTag, endTag);\n perf.clearMarks(startTag);\n perf.clearMarks(endTag);\n };\n }\n}\nconst RE_ARGS = /\\{([0-9a-zA-Z]+)\\}/g;\n/* eslint-disable */\nfunction format(message, ...args) {\n if (args.length === 1 && isObject(args[0])) {\n args = args[0];\n }\n if (!args || !args.hasOwnProperty) {\n args = {};\n }\n return message.replace(RE_ARGS, (match, identifier) => {\n return args.hasOwnProperty(identifier) ? args[identifier] : '';\n });\n}\nconst makeSymbol = (name, shareable = false) => !shareable ? Symbol(name) : Symbol.for(name);\nconst generateFormatCacheKey = (locale, key, source) => friendlyJSONstringify({ l: locale, k: key, s: source });\nconst friendlyJSONstringify = (json) => JSON.stringify(json)\n .replace(/\\u2028/g, '\\\\u2028')\n .replace(/\\u2029/g, '\\\\u2029')\n .replace(/\\u0027/g, '\\\\u0027');\nconst isNumber = (val) => typeof val === 'number' && isFinite(val);\nconst isDate = (val) => toTypeString(val) === '[object Date]';\nconst isRegExp = (val) => toTypeString(val) === '[object RegExp]';\nconst isEmptyObject = (val) => isPlainObject(val) && Object.keys(val).length === 0;\nconst assign = Object.assign;\nconst _create = Object.create;\nconst create = (obj = null) => _create(obj);\nlet _globalThis;\nconst getGlobalThis = () => {\n // prettier-ignore\n return (_globalThis ||\n (_globalThis =\n typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : create()));\n};\nfunction escapeHtml(rawText) {\n return rawText\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/\"/g, '"')\n .replace(/'/g, ''');\n}\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction hasOwn(obj, key) {\n return hasOwnProperty.call(obj, key);\n}\n/* eslint-enable */\n/**\n * Useful Utilities By Evan you\n * Modified by kazuya kawaguchi\n * MIT License\n * https://github.com/vuejs/vue-next/blob/master/packages/shared/src/index.ts\n * https://github.com/vuejs/vue-next/blob/master/packages/shared/src/codeframe.ts\n */\nconst isArray = Array.isArray;\nconst isFunction = (val) => typeof val === 'function';\nconst isString = (val) => typeof val === 'string';\nconst isBoolean = (val) => typeof val === 'boolean';\nconst isSymbol = (val) => typeof val === 'symbol';\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst isObject = (val) => val !== null && typeof val === 'object';\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst isPromise = (val) => {\n return isObject(val) && isFunction(val.then) && isFunction(val.catch);\n};\nconst objectToString = Object.prototype.toString;\nconst toTypeString = (value) => objectToString.call(value);\nconst isPlainObject = (val) => toTypeString(val) === '[object Object]';\n// for converting list and named values to displayed strings.\nconst toDisplayString = (val) => {\n return val == null\n ? ''\n : isArray(val) || (isPlainObject(val) && val.toString === objectToString)\n ? JSON.stringify(val, null, 2)\n : String(val);\n};\nfunction join(items, separator = '') {\n return items.reduce((str, item, index) => (index === 0 ? str + item : str + separator + item), '');\n}\nconst RANGE = 2;\nfunction generateCodeFrame(source, start = 0, end = source.length) {\n const lines = source.split(/\\r?\\n/);\n let count = 0;\n const res = [];\n for (let i = 0; i < lines.length; i++) {\n count += lines[i].length + 1;\n if (count >= start) {\n for (let j = i - RANGE; j <= i + RANGE || end > count; j++) {\n if (j < 0 || j >= lines.length)\n continue;\n const line = j + 1;\n res.push(`${line}${' '.repeat(3 - String(line).length)}| ${lines[j]}`);\n const lineLength = lines[j].length;\n if (j === i) {\n // push underline\n const pad = start - (count - lineLength) + 1;\n const length = Math.max(1, end > count ? lineLength - pad : end - start);\n res.push(` | ` + ' '.repeat(pad) + '^'.repeat(length));\n }\n else if (j > i) {\n if (end > count) {\n const length = Math.max(Math.min(end - count, lineLength), 1);\n res.push(` | ` + '^'.repeat(length));\n }\n count += lineLength + 1;\n }\n }\n break;\n }\n }\n return res.join('\\n');\n}\n\nfunction warn(msg, err) {\n if (typeof console !== 'undefined') {\n console.warn(`[intlify] ` + msg);\n /* istanbul ignore if */\n if (err) {\n console.warn(err.stack);\n }\n }\n}\nconst hasWarned = {};\nfunction warnOnce(msg) {\n if (!hasWarned[msg]) {\n hasWarned[msg] = true;\n warn(msg);\n }\n}\n\n/**\n * Event emitter, forked from the below:\n * - original repository url: https://github.com/developit/mitt\n * - code url: https://github.com/developit/mitt/blob/master/src/index.ts\n * - author: Jason Miller (https://github.com/developit)\n * - license: MIT\n */\n/**\n * Create a event emitter\n *\n * @returns An event emitter\n */\nfunction createEmitter() {\n const events = new Map();\n const emitter = {\n events,\n on(event, handler) {\n const handlers = events.get(event);\n const added = handlers && handlers.push(handler);\n if (!added) {\n events.set(event, [handler]);\n }\n },\n off(event, handler) {\n const handlers = events.get(event);\n if (handlers) {\n handlers.splice(handlers.indexOf(handler) >>> 0, 1);\n }\n },\n emit(event, payload) {\n (events.get(event) || [])\n .slice()\n .map(handler => handler(payload));\n (events.get('*') || [])\n .slice()\n .map(handler => handler(event, payload));\n }\n };\n return emitter;\n}\n\nconst isNotObjectOrIsArray = (val) => !isObject(val) || isArray(val);\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction deepCopy(src, des) {\n // src and des should both be objects, and none of them can be a array\n if (isNotObjectOrIsArray(src) || isNotObjectOrIsArray(des)) {\n throw new Error('Invalid value');\n }\n const stack = [{ src, des }];\n while (stack.length) {\n const { src, des } = stack.pop();\n // using `Object.keys` which skips prototype properties\n Object.keys(src).forEach(key => {\n if (key === '__proto__') {\n return;\n }\n // if src[key] is an object/array, set des[key]\n // to empty object/array to prevent setting by reference\n if (isObject(src[key]) && !isObject(des[key])) {\n des[key] = Array.isArray(src[key]) ? [] : create();\n }\n if (isNotObjectOrIsArray(des[key]) || isNotObjectOrIsArray(src[key])) {\n // replace with src[key] when:\n // src[key] or des[key] is not an object, or\n // src[key] or des[key] is an array\n des[key] = src[key];\n }\n else {\n // src[key] and des[key] are both objects, merge them\n stack.push({ src: src[key], des: des[key] });\n }\n });\n }\n}\n\nexports.assign = assign;\nexports.create = create;\nexports.createEmitter = createEmitter;\nexports.deepCopy = deepCopy;\nexports.escapeHtml = escapeHtml;\nexports.format = format;\nexports.friendlyJSONstringify = friendlyJSONstringify;\nexports.generateCodeFrame = generateCodeFrame;\nexports.generateFormatCacheKey = generateFormatCacheKey;\nexports.getGlobalThis = getGlobalThis;\nexports.hasOwn = hasOwn;\nexports.inBrowser = inBrowser;\nexports.isArray = isArray;\nexports.isBoolean = isBoolean;\nexports.isDate = isDate;\nexports.isEmptyObject = isEmptyObject;\nexports.isFunction = isFunction;\nexports.isNumber = isNumber;\nexports.isObject = isObject;\nexports.isPlainObject = isPlainObject;\nexports.isPromise = isPromise;\nexports.isRegExp = isRegExp;\nexports.isString = isString;\nexports.isSymbol = isSymbol;\nexports.join = join;\nexports.makeSymbol = makeSymbol;\nexports.objectToString = objectToString;\nexports.toDisplayString = toDisplayString;\nexports.toTypeString = toTypeString;\nexports.warn = warn;\nexports.warnOnce = warnOnce;\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar has = Object.prototype.hasOwnProperty;\nvar hasNativeMap = typeof Map !== \"undefined\";\n\n/**\n * A data structure which is a combination of an array and a set. Adding a new\n * member is O(1), testing for membership is O(1), and finding the index of an\n * element is O(1). Removing elements from the set is not supported. Only\n * strings are supported for membership.\n */\nfunction ArraySet() {\n this._array = [];\n this._set = hasNativeMap ? new Map() : Object.create(null);\n}\n\n/**\n * Static method for creating ArraySet instances from an existing array.\n */\nArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n var set = new ArraySet();\n for (var i = 0, len = aArray.length; i < len; i++) {\n set.add(aArray[i], aAllowDuplicates);\n }\n return set;\n};\n\n/**\n * Return how many unique items are in this ArraySet. If duplicates have been\n * added, than those do not count towards the size.\n *\n * @returns Number\n */\nArraySet.prototype.size = function ArraySet_size() {\n return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n};\n\n/**\n * Add the given string to this set.\n *\n * @param String aStr\n */\nArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n var sStr = hasNativeMap ? aStr : util.toSetString(aStr);\n var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);\n var idx = this._array.length;\n if (!isDuplicate || aAllowDuplicates) {\n this._array.push(aStr);\n }\n if (!isDuplicate) {\n if (hasNativeMap) {\n this._set.set(aStr, idx);\n } else {\n this._set[sStr] = idx;\n }\n }\n};\n\n/**\n * Is the given string a member of this set?\n *\n * @param String aStr\n */\nArraySet.prototype.has = function ArraySet_has(aStr) {\n if (hasNativeMap) {\n return this._set.has(aStr);\n } else {\n var sStr = util.toSetString(aStr);\n return has.call(this._set, sStr);\n }\n};\n\n/**\n * What is the index of the given string in the array?\n *\n * @param String aStr\n */\nArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n if (hasNativeMap) {\n var idx = this._set.get(aStr);\n if (idx >= 0) {\n return idx;\n }\n } else {\n var sStr = util.toSetString(aStr);\n if (has.call(this._set, sStr)) {\n return this._set[sStr];\n }\n }\n\n throw new Error('\"' + aStr + '\" is not in the set.');\n};\n\n/**\n * What is the element at the given index?\n *\n * @param Number aIdx\n */\nArraySet.prototype.at = function ArraySet_at(aIdx) {\n if (aIdx >= 0 && aIdx < this._array.length) {\n return this._array[aIdx];\n }\n throw new Error('No element indexed by ' + aIdx);\n};\n\n/**\n * Returns the array representation of this set (which has the proper indices\n * indicated by indexOf). Note that this is a copy of the internal array used\n * for storing the members so that no one can mess with internal state.\n */\nArraySet.prototype.toArray = function ArraySet_toArray() {\n return this._array.slice();\n};\n\nexports.ArraySet = ArraySet;\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n *\n * Based on the Base 64 VLQ implementation in Closure Compiler:\n * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n *\n * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following\n * disclaimer in the documentation and/or other materials provided\n * with the distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nvar base64 = require('./base64');\n\n// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n// length quantities we use in the source map spec, the first bit is the sign,\n// the next four bits are the actual value, and the 6th bit is the\n// continuation bit. The continuation bit tells us whether there are more\n// digits in this value following this digit.\n//\n// Continuation\n// | Sign\n// | |\n// V V\n// 101011\n\nvar VLQ_BASE_SHIFT = 5;\n\n// binary: 100000\nvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\n// binary: 011111\nvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\n// binary: 100000\nvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\n/**\n * Converts from a two-complement value to a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n */\nfunction toVLQSigned(aValue) {\n return aValue < 0\n ? ((-aValue) << 1) + 1\n : (aValue << 1) + 0;\n}\n\n/**\n * Converts to a two-complement value from a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n */\nfunction fromVLQSigned(aValue) {\n var isNegative = (aValue & 1) === 1;\n var shifted = aValue >> 1;\n return isNegative\n ? -shifted\n : shifted;\n}\n\n/**\n * Returns the base 64 VLQ encoded value.\n */\nexports.encode = function base64VLQ_encode(aValue) {\n var encoded = \"\";\n var digit;\n\n var vlq = toVLQSigned(aValue);\n\n do {\n digit = vlq & VLQ_BASE_MASK;\n vlq >>>= VLQ_BASE_SHIFT;\n if (vlq > 0) {\n // There are still more digits in this value, so we must make sure the\n // continuation bit is marked.\n digit |= VLQ_CONTINUATION_BIT;\n }\n encoded += base64.encode(digit);\n } while (vlq > 0);\n\n return encoded;\n};\n\n/**\n * Decodes the next base 64 VLQ value from the given string and returns the\n * value and the rest of the string via the out parameter.\n */\nexports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n var strLen = aStr.length;\n var result = 0;\n var shift = 0;\n var continuation, digit;\n\n do {\n if (aIndex >= strLen) {\n throw new Error(\"Expected more digits in base 64 VLQ value.\");\n }\n\n digit = base64.decode(aStr.charCodeAt(aIndex++));\n if (digit === -1) {\n throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n }\n\n continuation = !!(digit & VLQ_CONTINUATION_BIT);\n digit &= VLQ_BASE_MASK;\n result = result + (digit << shift);\n shift += VLQ_BASE_SHIFT;\n } while (continuation);\n\n aOutParam.value = fromVLQSigned(result);\n aOutParam.rest = aIndex;\n};\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\n/**\n * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n */\nexports.encode = function (number) {\n if (0 <= number && number < intToCharMap.length) {\n return intToCharMap[number];\n }\n throw new TypeError(\"Must be between 0 and 63: \" + number);\n};\n\n/**\n * Decode a single base 64 character code digit to an integer. Returns -1 on\n * failure.\n */\nexports.decode = function (charCode) {\n var bigA = 65; // 'A'\n var bigZ = 90; // 'Z'\n\n var littleA = 97; // 'a'\n var littleZ = 122; // 'z'\n\n var zero = 48; // '0'\n var nine = 57; // '9'\n\n var plus = 43; // '+'\n var slash = 47; // '/'\n\n var littleOffset = 26;\n var numberOffset = 52;\n\n // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n if (bigA <= charCode && charCode <= bigZ) {\n return (charCode - bigA);\n }\n\n // 26 - 51: abcdefghijklmnopqrstuvwxyz\n if (littleA <= charCode && charCode <= littleZ) {\n return (charCode - littleA + littleOffset);\n }\n\n // 52 - 61: 0123456789\n if (zero <= charCode && charCode <= nine) {\n return (charCode - zero + numberOffset);\n }\n\n // 62: +\n if (charCode == plus) {\n return 62;\n }\n\n // 63: /\n if (charCode == slash) {\n return 63;\n }\n\n // Invalid base64 digit.\n return -1;\n};\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nexports.GREATEST_LOWER_BOUND = 1;\nexports.LEAST_UPPER_BOUND = 2;\n\n/**\n * Recursive implementation of binary search.\n *\n * @param aLow Indices here and lower do not contain the needle.\n * @param aHigh Indices here and higher do not contain the needle.\n * @param aNeedle The element being searched for.\n * @param aHaystack The non-empty array being searched.\n * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n */\nfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}\n\n/**\n * This is an implementation of binary search which will always try and return\n * the index of the closest element if there is no exact hit. This is because\n * mappings between original and generated line/col pairs are single points,\n * and there is an implicit region between each of them, so a miss just means\n * that you aren't on the very start of a region.\n *\n * @param aNeedle The element you are looking for.\n * @param aHaystack The array that is being searched.\n * @param aCompare A function which takes the needle and an element in the\n * array and returns -1, 0, or 1 depending on whether the needle is less\n * than, equal to, or greater than the element, respectively.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n */\nexports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n if (aHaystack.length === 0) {\n return -1;\n }\n\n var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n if (index < 0) {\n return -1;\n }\n\n // We have found either the exact element, or the next-closest element than\n // the one we are searching for. However, there may be more than one such\n // element. Make sure we always return the smallest of these.\n while (index - 1 >= 0) {\n if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n break;\n }\n --index;\n }\n\n return index;\n};\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2014 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\n\n/**\n * Determine whether mappingB is after mappingA with respect to generated\n * position.\n */\nfunction generatedPositionAfter(mappingA, mappingB) {\n // Optimized for most common case\n var lineA = mappingA.generatedLine;\n var lineB = mappingB.generatedLine;\n var columnA = mappingA.generatedColumn;\n var columnB = mappingB.generatedColumn;\n return lineB > lineA || lineB == lineA && columnB >= columnA ||\n util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n}\n\n/**\n * A data structure to provide a sorted view of accumulated mappings in a\n * performance conscious manner. It trades a neglibable overhead in general\n * case for a large speedup in case of mappings being added in order.\n */\nfunction MappingList() {\n this._array = [];\n this._sorted = true;\n // Serves as infimum\n this._last = {generatedLine: -1, generatedColumn: 0};\n}\n\n/**\n * Iterate through internal items. This method takes the same arguments that\n * `Array.prototype.forEach` takes.\n *\n * NOTE: The order of the mappings is NOT guaranteed.\n */\nMappingList.prototype.unsortedForEach =\n function MappingList_forEach(aCallback, aThisArg) {\n this._array.forEach(aCallback, aThisArg);\n };\n\n/**\n * Add the given source mapping.\n *\n * @param Object aMapping\n */\nMappingList.prototype.add = function MappingList_add(aMapping) {\n if (generatedPositionAfter(this._last, aMapping)) {\n this._last = aMapping;\n this._array.push(aMapping);\n } else {\n this._sorted = false;\n this._array.push(aMapping);\n }\n};\n\n/**\n * Returns the flat, sorted array of mappings. The mappings are sorted by\n * generated position.\n *\n * WARNING: This method returns internal data without copying, for\n * performance. The return value must NOT be mutated, and should be treated as\n * an immutable borrow. If you want to take ownership, you must make your own\n * copy.\n */\nMappingList.prototype.toArray = function MappingList_toArray() {\n if (!this._sorted) {\n this._array.sort(util.compareByGeneratedPositionsInflated);\n this._sorted = true;\n }\n return this._array;\n};\n\nexports.MappingList = MappingList;\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n// It turns out that some (most?) JavaScript engines don't self-host\n// `Array.prototype.sort`. This makes sense because C++ will likely remain\n// faster than JS when doing raw CPU-intensive sorting. However, when using a\n// custom comparator function, calling back and forth between the VM's C++ and\n// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n// worse generated code for the comparator function than would be optimal. In\n// fact, when sorting with a comparator, these costs outweigh the benefits of\n// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n// a ~3500ms mean speed-up in `bench/bench.html`.\n\nfunction SortTemplate(comparator) {\n\n/**\n * Swap the elements indexed by `x` and `y` in the array `ary`.\n *\n * @param {Array} ary\n * The array.\n * @param {Number} x\n * The index of the first item.\n * @param {Number} y\n * The index of the second item.\n */\nfunction swap(ary, x, y) {\n var temp = ary[x];\n ary[x] = ary[y];\n ary[y] = temp;\n}\n\n/**\n * Returns a random integer within the range `low .. high` inclusive.\n *\n * @param {Number} low\n * The lower bound on the range.\n * @param {Number} high\n * The upper bound on the range.\n */\nfunction randomIntInRange(low, high) {\n return Math.round(low + (Math.random() * (high - low)));\n}\n\n/**\n * The Quick Sort algorithm.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n * @param {Number} p\n * Start index of the array\n * @param {Number} r\n * End index of the array\n */\nfunction doQuickSort(ary, comparator, p, r) {\n // If our lower bound is less than our upper bound, we (1) partition the\n // array into two pieces and (2) recurse on each half. If it is not, this is\n // the empty array and our base case.\n\n if (p < r) {\n // (1) Partitioning.\n //\n // The partitioning chooses a pivot between `p` and `r` and moves all\n // elements that are less than or equal to the pivot to the before it, and\n // all the elements that are greater than it after it. The effect is that\n // once partition is done, the pivot is in the exact place it will be when\n // the array is put in sorted order, and it will not need to be moved\n // again. This runs in O(n) time.\n\n // Always choose a random pivot so that an input array which is reverse\n // sorted does not cause O(n^2) running time.\n var pivotIndex = randomIntInRange(p, r);\n var i = p - 1;\n\n swap(ary, pivotIndex, r);\n var pivot = ary[r];\n\n // Immediately after `j` is incremented in this loop, the following hold\n // true:\n //\n // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n //\n // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n for (var j = p; j < r; j++) {\n if (comparator(ary[j], pivot, false) <= 0) {\n i += 1;\n swap(ary, i, j);\n }\n }\n\n swap(ary, i + 1, j);\n var q = i + 1;\n\n // (2) Recurse on each half.\n\n doQuickSort(ary, comparator, p, q - 1);\n doQuickSort(ary, comparator, q + 1, r);\n }\n}\n\n return doQuickSort;\n}\n\nfunction cloneSort(comparator) {\n let template = SortTemplate.toString();\n let templateFn = new Function(`return ${template}`)();\n return templateFn(comparator);\n}\n\n/**\n * Sort the given array in-place with the given comparator function.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n */\n\nlet sortCache = new WeakMap();\nexports.quickSort = function (ary, comparator, start = 0) {\n let doQuickSort = sortCache.get(comparator);\n if (doQuickSort === void 0) {\n doQuickSort = cloneSort(comparator);\n sortCache.set(comparator, doQuickSort);\n }\n doQuickSort(ary, comparator, start, ary.length - 1);\n};\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar binarySearch = require('./binary-search');\nvar ArraySet = require('./array-set').ArraySet;\nvar base64VLQ = require('./base64-vlq');\nvar quickSort = require('./quick-sort').quickSort;\n\nfunction SourceMapConsumer(aSourceMap, aSourceMapURL) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = util.parseSourceMapInput(aSourceMap);\n }\n\n return sourceMap.sections != null\n ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL)\n : new BasicSourceMapConsumer(sourceMap, aSourceMapURL);\n}\n\nSourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) {\n return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL);\n}\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nSourceMapConsumer.prototype._version = 3;\n\n// `__generatedMappings` and `__originalMappings` are arrays that hold the\n// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n// are lazily instantiated, accessed via the `_generatedMappings` and\n// `_originalMappings` getters respectively, and we only parse the mappings\n// and create these arrays once queried for a source location. We jump through\n// these hoops because there can be many thousands of mappings, and parsing\n// them is expensive, so we only want to do it if we must.\n//\n// Each object in the arrays is of the form:\n//\n// {\n// generatedLine: The line number in the generated code,\n// generatedColumn: The column number in the generated code,\n// source: The path to the original source file that generated this\n// chunk of code,\n// originalLine: The line number in the original source that\n// corresponds to this chunk of generated code,\n// originalColumn: The column number in the original source that\n// corresponds to this chunk of generated code,\n// name: The name of the original symbol which generated this chunk of\n// code.\n// }\n//\n// All properties except for `generatedLine` and `generatedColumn` can be\n// `null`.\n//\n// `_generatedMappings` is ordered by the generated positions.\n//\n// `_originalMappings` is ordered by the original positions.\n\nSourceMapConsumer.prototype.__generatedMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n configurable: true,\n enumerable: true,\n get: function () {\n if (!this.__generatedMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__generatedMappings;\n }\n});\n\nSourceMapConsumer.prototype.__originalMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n configurable: true,\n enumerable: true,\n get: function () {\n if (!this.__originalMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__originalMappings;\n }\n});\n\nSourceMapConsumer.prototype._charIsMappingSeparator =\n function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n var c = aStr.charAt(index);\n return c === \";\" || c === \",\";\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n throw new Error(\"Subclasses must implement _parseMappings\");\n };\n\nSourceMapConsumer.GENERATED_ORDER = 1;\nSourceMapConsumer.ORIGINAL_ORDER = 2;\n\nSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\nSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\n/**\n * Iterate over each mapping between an original source/line/column and a\n * generated line/column in this source map.\n *\n * @param Function aCallback\n * The function that is called with each mapping.\n * @param Object aContext\n * Optional. If specified, this object will be the value of `this` every\n * time that `aCallback` is called.\n * @param aOrder\n * Either `SourceMapConsumer.GENERATED_ORDER` or\n * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n * iterate over the mappings sorted by the generated file's line/column\n * order or the original's source/line/column order, respectively. Defaults to\n * `SourceMapConsumer.GENERATED_ORDER`.\n */\nSourceMapConsumer.prototype.eachMapping =\n function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n var context = aContext || null;\n var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\n var mappings;\n switch (order) {\n case SourceMapConsumer.GENERATED_ORDER:\n mappings = this._generatedMappings;\n break;\n case SourceMapConsumer.ORIGINAL_ORDER:\n mappings = this._originalMappings;\n break;\n default:\n throw new Error(\"Unknown order of iteration.\");\n }\n\n var sourceRoot = this.sourceRoot;\n var boundCallback = aCallback.bind(context);\n var names = this._names;\n var sources = this._sources;\n var sourceMapURL = this._sourceMapURL;\n\n for (var i = 0, n = mappings.length; i < n; i++) {\n var mapping = mappings[i];\n var source = mapping.source === null ? null : sources.at(mapping.source);\n if(source !== null) {\n source = util.computeSourceURL(sourceRoot, source, sourceMapURL);\n }\n boundCallback({\n source: source,\n generatedLine: mapping.generatedLine,\n generatedColumn: mapping.generatedColumn,\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: mapping.name === null ? null : names.at(mapping.name)\n });\n }\n };\n\n/**\n * Returns all generated line and column information for the original source,\n * line, and column provided. If no column is provided, returns all mappings\n * corresponding to a either the line we are searching for or the next\n * closest line that has any mappings. Otherwise, returns all mappings\n * corresponding to the given line and either the column we are searching for\n * or the next closest column that has any offsets.\n *\n * The only argument is an object with the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source. The line number is 1-based.\n * - column: Optional. the column number in the original source.\n * The column number is 0-based.\n *\n * and an array of objects is returned, each with the following properties:\n *\n * - line: The line number in the generated source, or null. The\n * line number is 1-based.\n * - column: The column number in the generated source, or null.\n * The column number is 0-based.\n */\nSourceMapConsumer.prototype.allGeneratedPositionsFor =\n function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n var line = util.getArg(aArgs, 'line');\n\n // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n // returns the index of the closest mapping less than the needle. By\n // setting needle.originalColumn to 0, we thus find the last mapping for\n // the given line, provided such a mapping exists.\n var needle = {\n source: util.getArg(aArgs, 'source'),\n originalLine: line,\n originalColumn: util.getArg(aArgs, 'column', 0)\n };\n\n needle.source = this._findSourceIndex(needle.source);\n if (needle.source < 0) {\n return [];\n }\n\n var mappings = [];\n\n var index = this._findMapping(needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n binarySearch.LEAST_UPPER_BOUND);\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (aArgs.column === undefined) {\n var originalLine = mapping.originalLine;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we found. Since\n // mappings are sorted, this is guaranteed to find all mappings for\n // the line we found.\n while (mapping && mapping.originalLine === originalLine) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n } else {\n var originalColumn = mapping.originalColumn;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we were searching for.\n // Since mappings are sorted, this is guaranteed to find all mappings for\n // the line we are searching for.\n while (mapping &&\n mapping.originalLine === line &&\n mapping.originalColumn == originalColumn) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n }\n }\n\n return mappings;\n };\n\nexports.SourceMapConsumer = SourceMapConsumer;\n\n/**\n * A BasicSourceMapConsumer instance represents a parsed source map which we can\n * query for information about the original file positions by giving it a file\n * position in the generated source.\n *\n * The first parameter is the raw source map (either as a JSON string, or\n * already parsed to an object). According to the spec, source maps have the\n * following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - sources: An array of URLs to the original source files.\n * - names: An array of identifiers which can be referrenced by individual mappings.\n * - sourceRoot: Optional. The URL root from which all sources are relative.\n * - sourcesContent: Optional. An array of contents of the original source files.\n * - mappings: A string of base64 VLQs which contain the actual mappings.\n * - file: Optional. The generated file this source map is associated with.\n *\n * Here is an example source map, taken from the source map spec[0]:\n *\n * {\n * version : 3,\n * file: \"out.js\",\n * sourceRoot : \"\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AA,AB;;ABCDE;\"\n * }\n *\n * The second parameter, if given, is a string whose value is the URL\n * at which the source map was found. This URL is used to compute the\n * sources array.\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n */\nfunction BasicSourceMapConsumer(aSourceMap, aSourceMapURL) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = util.parseSourceMapInput(aSourceMap);\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sources = util.getArg(sourceMap, 'sources');\n // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n // requires the array) to play nice here.\n var names = util.getArg(sourceMap, 'names', []);\n var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n var mappings = util.getArg(sourceMap, 'mappings');\n var file = util.getArg(sourceMap, 'file', null);\n\n // Once again, Sass deviates from the spec and supplies the version as a\n // string rather than a number, so we use loose equality checking here.\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n if (sourceRoot) {\n sourceRoot = util.normalize(sourceRoot);\n }\n\n sources = sources\n .map(String)\n // Some source maps produce relative source paths like \"./foo.js\" instead of\n // \"foo.js\". Normalize these first so that future comparisons will succeed.\n // See bugzil.la/1090768.\n .map(util.normalize)\n // Always ensure that absolute sources are internally stored relative to\n // the source root, if the source root is absolute. Not doing this would\n // be particularly problematic when the source root is a prefix of the\n // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n .map(function (source) {\n return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n ? util.relative(sourceRoot, source)\n : source;\n });\n\n // Pass `true` below to allow duplicate names and sources. While source maps\n // are intended to be compressed and deduplicated, the TypeScript compiler\n // sometimes generates source maps with duplicates in them. See Github issue\n // #72 and bugzil.la/889492.\n this._names = ArraySet.fromArray(names.map(String), true);\n this._sources = ArraySet.fromArray(sources, true);\n\n this._absoluteSources = this._sources.toArray().map(function (s) {\n return util.computeSourceURL(sourceRoot, s, aSourceMapURL);\n });\n\n this.sourceRoot = sourceRoot;\n this.sourcesContent = sourcesContent;\n this._mappings = mappings;\n this._sourceMapURL = aSourceMapURL;\n this.file = file;\n}\n\nBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\n/**\n * Utility function to find the index of a source. Returns -1 if not\n * found.\n */\nBasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) {\n var relativeSource = aSource;\n if (this.sourceRoot != null) {\n relativeSource = util.relative(this.sourceRoot, relativeSource);\n }\n\n if (this._sources.has(relativeSource)) {\n return this._sources.indexOf(relativeSource);\n }\n\n // Maybe aSource is an absolute URL as returned by |sources|. In\n // this case we can't simply undo the transform.\n var i;\n for (i = 0; i < this._absoluteSources.length; ++i) {\n if (this._absoluteSources[i] == aSource) {\n return i;\n }\n }\n\n return -1;\n};\n\n/**\n * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n *\n * @param SourceMapGenerator aSourceMap\n * The source map that will be consumed.\n * @param String aSourceMapURL\n * The URL at which the source map can be found (optional)\n * @returns BasicSourceMapConsumer\n */\nBasicSourceMapConsumer.fromSourceMap =\n function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) {\n var smc = Object.create(BasicSourceMapConsumer.prototype);\n\n var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n smc.sourceRoot = aSourceMap._sourceRoot;\n smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n smc.sourceRoot);\n smc.file = aSourceMap._file;\n smc._sourceMapURL = aSourceMapURL;\n smc._absoluteSources = smc._sources.toArray().map(function (s) {\n return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL);\n });\n\n // Because we are modifying the entries (by converting string sources and\n // names to indices into the sources and names ArraySets), we have to make\n // a copy of the entry or else bad things happen. Shared mutable state\n // strikes again! See github issue #191.\n\n var generatedMappings = aSourceMap._mappings.toArray().slice();\n var destGeneratedMappings = smc.__generatedMappings = [];\n var destOriginalMappings = smc.__originalMappings = [];\n\n for (var i = 0, length = generatedMappings.length; i < length; i++) {\n var srcMapping = generatedMappings[i];\n var destMapping = new Mapping;\n destMapping.generatedLine = srcMapping.generatedLine;\n destMapping.generatedColumn = srcMapping.generatedColumn;\n\n if (srcMapping.source) {\n destMapping.source = sources.indexOf(srcMapping.source);\n destMapping.originalLine = srcMapping.originalLine;\n destMapping.originalColumn = srcMapping.originalColumn;\n\n if (srcMapping.name) {\n destMapping.name = names.indexOf(srcMapping.name);\n }\n\n destOriginalMappings.push(destMapping);\n }\n\n destGeneratedMappings.push(destMapping);\n }\n\n quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\n return smc;\n };\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nBasicSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n get: function () {\n return this._absoluteSources.slice();\n }\n});\n\n/**\n * Provide the JIT with a nice shape / hidden class.\n */\nfunction Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\n\nconst compareGenerated = util.compareByGeneratedPositionsDeflatedNoLine;\nfunction sortGenerated(array, start) {\n let l = array.length;\n let n = array.length - start;\n if (n <= 1) {\n return;\n } else if (n == 2) {\n let a = array[start];\n let b = array[start + 1];\n if (compareGenerated(a, b) > 0) {\n array[start] = b;\n array[start + 1] = a;\n }\n } else if (n < 20) {\n for (let i = start; i < l; i++) {\n for (let j = i; j > start; j--) {\n let a = array[j - 1];\n let b = array[j];\n if (compareGenerated(a, b) <= 0) {\n break;\n }\n array[j - 1] = b;\n array[j] = a;\n }\n }\n } else {\n quickSort(array, compareGenerated, start);\n }\n}\nBasicSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n var generatedLine = 1;\n var previousGeneratedColumn = 0;\n var previousOriginalLine = 0;\n var previousOriginalColumn = 0;\n var previousSource = 0;\n var previousName = 0;\n var length = aStr.length;\n var index = 0;\n var cachedSegments = {};\n var temp = {};\n var originalMappings = [];\n var generatedMappings = [];\n var mapping, str, segment, end, value;\n\n let subarrayStart = 0;\n while (index < length) {\n if (aStr.charAt(index) === ';') {\n generatedLine++;\n index++;\n previousGeneratedColumn = 0;\n\n sortGenerated(generatedMappings, subarrayStart);\n subarrayStart = generatedMappings.length;\n }\n else if (aStr.charAt(index) === ',') {\n index++;\n }\n else {\n mapping = new Mapping();\n mapping.generatedLine = generatedLine;\n\n for (end = index; end < length; end++) {\n if (this._charIsMappingSeparator(aStr, end)) {\n break;\n }\n }\n str = aStr.slice(index, end);\n\n segment = [];\n while (index < end) {\n base64VLQ.decode(aStr, index, temp);\n value = temp.value;\n index = temp.rest;\n segment.push(value);\n }\n\n if (segment.length === 2) {\n throw new Error('Found a source, but no line and column');\n }\n\n if (segment.length === 3) {\n throw new Error('Found a source and line, but no column');\n }\n\n // Generated column.\n mapping.generatedColumn = previousGeneratedColumn + segment[0];\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (segment.length > 1) {\n // Original source.\n mapping.source = previousSource + segment[1];\n previousSource += segment[1];\n\n // Original line.\n mapping.originalLine = previousOriginalLine + segment[2];\n previousOriginalLine = mapping.originalLine;\n // Lines are stored 0-based\n mapping.originalLine += 1;\n\n // Original column.\n mapping.originalColumn = previousOriginalColumn + segment[3];\n previousOriginalColumn = mapping.originalColumn;\n\n if (segment.length > 4) {\n // Original name.\n mapping.name = previousName + segment[4];\n previousName += segment[4];\n }\n }\n\n generatedMappings.push(mapping);\n if (typeof mapping.originalLine === 'number') {\n let currentSource = mapping.source;\n while (originalMappings.length <= currentSource) {\n originalMappings.push(null);\n }\n if (originalMappings[currentSource] === null) {\n originalMappings[currentSource] = [];\n }\n originalMappings[currentSource].push(mapping);\n }\n }\n }\n\n sortGenerated(generatedMappings, subarrayStart);\n this.__generatedMappings = generatedMappings;\n\n for (var i = 0; i < originalMappings.length; i++) {\n if (originalMappings[i] != null) {\n quickSort(originalMappings[i], util.compareByOriginalPositionsNoSource);\n }\n }\n this.__originalMappings = [].concat(...originalMappings);\n };\n\n/**\n * Find the mapping that best matches the hypothetical \"needle\" mapping that\n * we are searching for in the given \"haystack\" of mappings.\n */\nBasicSourceMapConsumer.prototype._findMapping =\n function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n aColumnName, aComparator, aBias) {\n // To return the position we are searching for, we must first find the\n // mapping for the given position and then return the opposite position it\n // points to. Because the mappings are sorted, we can use binary search to\n // find the best mapping.\n\n if (aNeedle[aLineName] <= 0) {\n throw new TypeError('Line must be greater than or equal to 1, got '\n + aNeedle[aLineName]);\n }\n if (aNeedle[aColumnName] < 0) {\n throw new TypeError('Column must be greater than or equal to 0, got '\n + aNeedle[aColumnName]);\n }\n\n return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n };\n\n/**\n * Compute the last column for each generated mapping. The last column is\n * inclusive.\n */\nBasicSourceMapConsumer.prototype.computeColumnSpans =\n function SourceMapConsumer_computeColumnSpans() {\n for (var index = 0; index < this._generatedMappings.length; ++index) {\n var mapping = this._generatedMappings[index];\n\n // Mappings do not contain a field for the last generated columnt. We\n // can come up with an optimistic estimate, however, by assuming that\n // mappings are contiguous (i.e. given two consecutive mappings, the\n // first mapping ends where the second one starts).\n if (index + 1 < this._generatedMappings.length) {\n var nextMapping = this._generatedMappings[index + 1];\n\n if (mapping.generatedLine === nextMapping.generatedLine) {\n mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n continue;\n }\n }\n\n // The last mapping for each line spans the entire line.\n mapping.lastGeneratedColumn = Infinity;\n }\n };\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source. The line number\n * is 1-based.\n * - column: The column number in the generated source. The column\n * number is 0-based.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null. The\n * line number is 1-based.\n * - column: The column number in the original source, or null. The\n * column number is 0-based.\n * - name: The original identifier, or null.\n */\nBasicSourceMapConsumer.prototype.originalPositionFor =\n function SourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._generatedMappings,\n \"generatedLine\",\n \"generatedColumn\",\n util.compareByGeneratedPositionsDeflated,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._generatedMappings[index];\n\n if (mapping.generatedLine === needle.generatedLine) {\n var source = util.getArg(mapping, 'source', null);\n if (source !== null) {\n source = this._sources.at(source);\n source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL);\n }\n var name = util.getArg(mapping, 'name', null);\n if (name !== null) {\n name = this._names.at(name);\n }\n return {\n source: source,\n line: util.getArg(mapping, 'originalLine', null),\n column: util.getArg(mapping, 'originalColumn', null),\n name: name\n };\n }\n }\n\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n function BasicSourceMapConsumer_hasContentsOfAllSources() {\n if (!this.sourcesContent) {\n return false;\n }\n return this.sourcesContent.length >= this._sources.size() &&\n !this.sourcesContent.some(function (sc) { return sc == null; });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nBasicSourceMapConsumer.prototype.sourceContentFor =\n function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n if (!this.sourcesContent) {\n return null;\n }\n\n var index = this._findSourceIndex(aSource);\n if (index >= 0) {\n return this.sourcesContent[index];\n }\n\n var relativeSource = aSource;\n if (this.sourceRoot != null) {\n relativeSource = util.relative(this.sourceRoot, relativeSource);\n }\n\n var url;\n if (this.sourceRoot != null\n && (url = util.urlParse(this.sourceRoot))) {\n // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n // many users. We can help them out when they expect file:// URIs to\n // behave like it would if they were running a local HTTP server. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n var fileUriAbsPath = relativeSource.replace(/^file:\\/\\//, \"\");\n if (url.scheme == \"file\"\n && this._sources.has(fileUriAbsPath)) {\n return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n }\n\n if ((!url.path || url.path == \"/\")\n && this._sources.has(\"/\" + relativeSource)) {\n return this.sourcesContent[this._sources.indexOf(\"/\" + relativeSource)];\n }\n }\n\n // This function is used recursively from\n // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n // don't want to throw if we can't find the source - we just want to\n // return null, so we provide a flag to exit gracefully.\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + relativeSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source. The line number\n * is 1-based.\n * - column: The column number in the original source. The column\n * number is 0-based.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null. The\n * line number is 1-based.\n * - column: The column number in the generated source, or null.\n * The column number is 0-based.\n */\nBasicSourceMapConsumer.prototype.generatedPositionFor =\n function SourceMapConsumer_generatedPositionFor(aArgs) {\n var source = util.getArg(aArgs, 'source');\n source = this._findSourceIndex(source);\n if (source < 0) {\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n }\n\n var needle = {\n source: source,\n originalLine: util.getArg(aArgs, 'line'),\n originalColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (mapping.source === needle.source) {\n return {\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n };\n }\n }\n\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n };\n\nexports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\n/**\n * An IndexedSourceMapConsumer instance represents a parsed source map which\n * we can query for information. It differs from BasicSourceMapConsumer in\n * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n * input.\n *\n * The first parameter is a raw source map (either as a JSON string, or already\n * parsed to an object). According to the spec for indexed source maps, they\n * have the following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - file: Optional. The generated file this source map is associated with.\n * - sections: A list of section definitions.\n *\n * Each value under the \"sections\" field has two fields:\n * - offset: The offset into the original specified at which this section\n * begins to apply, defined as an object with a \"line\" and \"column\"\n * field.\n * - map: A source map definition. This source map could also be indexed,\n * but doesn't have to be.\n *\n * Instead of the \"map\" field, it's also possible to have a \"url\" field\n * specifying a URL to retrieve a source map from, but that's currently\n * unsupported.\n *\n * Here's an example source map, taken from the source map spec[0], but\n * modified to omit a section which uses the \"url\" field.\n *\n * {\n * version : 3,\n * file: \"app.js\",\n * sections: [{\n * offset: {line:100, column:10},\n * map: {\n * version : 3,\n * file: \"section.js\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AAAA,E;;ABCDE;\"\n * }\n * }],\n * }\n *\n * The second parameter, if given, is a string whose value is the URL\n * at which the source map was found. This URL is used to compute the\n * sources array.\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n */\nfunction IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = util.parseSourceMapInput(aSourceMap);\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sections = util.getArg(sourceMap, 'sections');\n\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n this._sources = new ArraySet();\n this._names = new ArraySet();\n\n var lastOffset = {\n line: -1,\n column: 0\n };\n this._sections = sections.map(function (s) {\n if (s.url) {\n // The url field will require support for asynchronicity.\n // See https://github.com/mozilla/source-map/issues/16\n throw new Error('Support for url field in sections not implemented.');\n }\n var offset = util.getArg(s, 'offset');\n var offsetLine = util.getArg(offset, 'line');\n var offsetColumn = util.getArg(offset, 'column');\n\n if (offsetLine < lastOffset.line ||\n (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n throw new Error('Section offsets must be ordered and non-overlapping.');\n }\n lastOffset = offset;\n\n return {\n generatedOffset: {\n // The offset fields are 0-based, but we use 1-based indices when\n // encoding/decoding from VLQ.\n generatedLine: offsetLine + 1,\n generatedColumn: offsetColumn + 1\n },\n consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL)\n }\n });\n}\n\nIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nIndexedSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n get: function () {\n var sources = [];\n for (var i = 0; i < this._sections.length; i++) {\n for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n sources.push(this._sections[i].consumer.sources[j]);\n }\n }\n return sources;\n }\n});\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source. The line number\n * is 1-based.\n * - column: The column number in the generated source. The column\n * number is 0-based.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null. The\n * line number is 1-based.\n * - column: The column number in the original source, or null. The\n * column number is 0-based.\n * - name: The original identifier, or null.\n */\nIndexedSourceMapConsumer.prototype.originalPositionFor =\n function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n // Find the section containing the generated position we're trying to map\n // to an original position.\n var sectionIndex = binarySearch.search(needle, this._sections,\n function(needle, section) {\n var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n if (cmp) {\n return cmp;\n }\n\n return (needle.generatedColumn -\n section.generatedOffset.generatedColumn);\n });\n var section = this._sections[sectionIndex];\n\n if (!section) {\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n }\n\n return section.consumer.originalPositionFor({\n line: needle.generatedLine -\n (section.generatedOffset.generatedLine - 1),\n column: needle.generatedColumn -\n (section.generatedOffset.generatedLine === needle.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n bias: aArgs.bias\n });\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n return this._sections.every(function (s) {\n return s.consumer.hasContentsOfAllSources();\n });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nIndexedSourceMapConsumer.prototype.sourceContentFor =\n function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n var content = section.consumer.sourceContentFor(aSource, true);\n if (content || content === '') {\n return content;\n }\n }\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source. The line number\n * is 1-based.\n * - column: The column number in the original source. The column\n * number is 0-based.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null. The\n * line number is 1-based. \n * - column: The column number in the generated source, or null.\n * The column number is 0-based.\n */\nIndexedSourceMapConsumer.prototype.generatedPositionFor =\n function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n // Only consider this section if the requested source is in the list of\n // sources of the consumer.\n if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) {\n continue;\n }\n var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n if (generatedPosition) {\n var ret = {\n line: generatedPosition.line +\n (section.generatedOffset.generatedLine - 1),\n column: generatedPosition.column +\n (section.generatedOffset.generatedLine === generatedPosition.line\n ? section.generatedOffset.generatedColumn - 1\n : 0)\n };\n return ret;\n }\n }\n\n return {\n line: null,\n column: null\n };\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nIndexedSourceMapConsumer.prototype._parseMappings =\n function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n this.__generatedMappings = [];\n this.__originalMappings = [];\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n var sectionMappings = section.consumer._generatedMappings;\n for (var j = 0; j < sectionMappings.length; j++) {\n var mapping = sectionMappings[j];\n\n var source = section.consumer._sources.at(mapping.source);\n if(source !== null) {\n source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL);\n }\n this._sources.add(source);\n source = this._sources.indexOf(source);\n\n var name = null;\n if (mapping.name) {\n name = section.consumer._names.at(mapping.name);\n this._names.add(name);\n name = this._names.indexOf(name);\n }\n\n // The mappings coming from the consumer for the section have\n // generated positions relative to the start of the section, so we\n // need to offset them to be relative to the start of the concatenated\n // generated file.\n var adjustedMapping = {\n source: source,\n generatedLine: mapping.generatedLine +\n (section.generatedOffset.generatedLine - 1),\n generatedColumn: mapping.generatedColumn +\n (section.generatedOffset.generatedLine === mapping.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: name\n };\n\n this.__generatedMappings.push(adjustedMapping);\n if (typeof adjustedMapping.originalLine === 'number') {\n this.__originalMappings.push(adjustedMapping);\n }\n }\n }\n\n quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n quickSort(this.__originalMappings, util.compareByOriginalPositions);\n };\n\nexports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar base64VLQ = require('./base64-vlq');\nvar util = require('./util');\nvar ArraySet = require('./array-set').ArraySet;\nvar MappingList = require('./mapping-list').MappingList;\n\n/**\n * An instance of the SourceMapGenerator represents a source map which is\n * being built incrementally. You may pass an object with the following\n * properties:\n *\n * - file: The filename of the generated source.\n * - sourceRoot: A root for all relative URLs in this source map.\n */\nfunction SourceMapGenerator(aArgs) {\n if (!aArgs) {\n aArgs = {};\n }\n this._file = util.getArg(aArgs, 'file', null);\n this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);\n this._skipValidation = util.getArg(aArgs, 'skipValidation', false);\n this._ignoreInvalidMapping = util.getArg(aArgs, 'ignoreInvalidMapping', false);\n this._sources = new ArraySet();\n this._names = new ArraySet();\n this._mappings = new MappingList();\n this._sourcesContents = null;\n}\n\nSourceMapGenerator.prototype._version = 3;\n\n/**\n * Creates a new SourceMapGenerator based on a SourceMapConsumer\n *\n * @param aSourceMapConsumer The SourceMap.\n */\nSourceMapGenerator.fromSourceMap =\n function SourceMapGenerator_fromSourceMap(aSourceMapConsumer, generatorOps) {\n var sourceRoot = aSourceMapConsumer.sourceRoot;\n var generator = new SourceMapGenerator(Object.assign(generatorOps || {}, {\n file: aSourceMapConsumer.file,\n sourceRoot: sourceRoot\n }));\n aSourceMapConsumer.eachMapping(function (mapping) {\n var newMapping = {\n generated: {\n line: mapping.generatedLine,\n column: mapping.generatedColumn\n }\n };\n\n if (mapping.source != null) {\n newMapping.source = mapping.source;\n if (sourceRoot != null) {\n newMapping.source = util.relative(sourceRoot, newMapping.source);\n }\n\n newMapping.original = {\n line: mapping.originalLine,\n column: mapping.originalColumn\n };\n\n if (mapping.name != null) {\n newMapping.name = mapping.name;\n }\n }\n\n generator.addMapping(newMapping);\n });\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var sourceRelative = sourceFile;\n if (sourceRoot !== null) {\n sourceRelative = util.relative(sourceRoot, sourceFile);\n }\n\n if (!generator._sources.has(sourceRelative)) {\n generator._sources.add(sourceRelative);\n }\n\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n generator.setSourceContent(sourceFile, content);\n }\n });\n return generator;\n };\n\n/**\n * Add a single mapping from original source line and column to the generated\n * source's line and column for this source map being created. The mapping\n * object should have the following properties:\n *\n * - generated: An object with the generated line and column positions.\n * - original: An object with the original line and column positions.\n * - source: The original source file (relative to the sourceRoot).\n * - name: An optional original token name for this mapping.\n */\nSourceMapGenerator.prototype.addMapping =\n function SourceMapGenerator_addMapping(aArgs) {\n var generated = util.getArg(aArgs, 'generated');\n var original = util.getArg(aArgs, 'original', null);\n var source = util.getArg(aArgs, 'source', null);\n var name = util.getArg(aArgs, 'name', null);\n\n if (!this._skipValidation) {\n if (this._validateMapping(generated, original, source, name) === false) {\n return;\n }\n }\n\n if (source != null) {\n source = String(source);\n if (!this._sources.has(source)) {\n this._sources.add(source);\n }\n }\n\n if (name != null) {\n name = String(name);\n if (!this._names.has(name)) {\n this._names.add(name);\n }\n }\n\n this._mappings.add({\n generatedLine: generated.line,\n generatedColumn: generated.column,\n originalLine: original != null && original.line,\n originalColumn: original != null && original.column,\n source: source,\n name: name\n });\n };\n\n/**\n * Set the source content for a source file.\n */\nSourceMapGenerator.prototype.setSourceContent =\n function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {\n var source = aSourceFile;\n if (this._sourceRoot != null) {\n source = util.relative(this._sourceRoot, source);\n }\n\n if (aSourceContent != null) {\n // Add the source content to the _sourcesContents map.\n // Create a new _sourcesContents map if the property is null.\n if (!this._sourcesContents) {\n this._sourcesContents = Object.create(null);\n }\n this._sourcesContents[util.toSetString(source)] = aSourceContent;\n } else if (this._sourcesContents) {\n // Remove the source file from the _sourcesContents map.\n // If the _sourcesContents map is empty, set the property to null.\n delete this._sourcesContents[util.toSetString(source)];\n if (Object.keys(this._sourcesContents).length === 0) {\n this._sourcesContents = null;\n }\n }\n };\n\n/**\n * Applies the mappings of a sub-source-map for a specific source file to the\n * source map being generated. Each mapping to the supplied source file is\n * rewritten using the supplied source map. Note: The resolution for the\n * resulting mappings is the minimium of this map and the supplied map.\n *\n * @param aSourceMapConsumer The source map to be applied.\n * @param aSourceFile Optional. The filename of the source file.\n * If omitted, SourceMapConsumer's file property will be used.\n * @param aSourceMapPath Optional. The dirname of the path to the source map\n * to be applied. If relative, it is relative to the SourceMapConsumer.\n * This parameter is needed when the two source maps aren't in the same\n * directory, and the source map to be applied contains relative source\n * paths. If so, those relative source paths need to be rewritten\n * relative to the SourceMapGenerator.\n */\nSourceMapGenerator.prototype.applySourceMap =\n function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {\n var sourceFile = aSourceFile;\n // If aSourceFile is omitted, we will use the file property of the SourceMap\n if (aSourceFile == null) {\n if (aSourceMapConsumer.file == null) {\n throw new Error(\n 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +\n 'or the source map\\'s \"file\" property. Both were omitted.'\n );\n }\n sourceFile = aSourceMapConsumer.file;\n }\n var sourceRoot = this._sourceRoot;\n // Make \"sourceFile\" relative if an absolute Url is passed.\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n // Applying the SourceMap can add and remove items from the sources and\n // the names array.\n var newSources = new ArraySet();\n var newNames = new ArraySet();\n\n // Find mappings for the \"sourceFile\"\n this._mappings.unsortedForEach(function (mapping) {\n if (mapping.source === sourceFile && mapping.originalLine != null) {\n // Check if it can be mapped by the source map, then update the mapping.\n var original = aSourceMapConsumer.originalPositionFor({\n line: mapping.originalLine,\n column: mapping.originalColumn\n });\n if (original.source != null) {\n // Copy mapping\n mapping.source = original.source;\n if (aSourceMapPath != null) {\n mapping.source = util.join(aSourceMapPath, mapping.source)\n }\n if (sourceRoot != null) {\n mapping.source = util.relative(sourceRoot, mapping.source);\n }\n mapping.originalLine = original.line;\n mapping.originalColumn = original.column;\n if (original.name != null) {\n mapping.name = original.name;\n }\n }\n }\n\n var source = mapping.source;\n if (source != null && !newSources.has(source)) {\n newSources.add(source);\n }\n\n var name = mapping.name;\n if (name != null && !newNames.has(name)) {\n newNames.add(name);\n }\n\n }, this);\n this._sources = newSources;\n this._names = newNames;\n\n // Copy sourcesContents of applied map.\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aSourceMapPath != null) {\n sourceFile = util.join(aSourceMapPath, sourceFile);\n }\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n this.setSourceContent(sourceFile, content);\n }\n }, this);\n };\n\n/**\n * A mapping can have one of the three levels of data:\n *\n * 1. Just the generated position.\n * 2. The Generated position, original position, and original source.\n * 3. Generated and original position, original source, as well as a name\n * token.\n *\n * To maintain consistency, we validate that any new mapping being added falls\n * in to one of these categories.\n */\nSourceMapGenerator.prototype._validateMapping =\n function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,\n aName) {\n // When aOriginal is truthy but has empty values for .line and .column,\n // it is most likely a programmer error. In this case we throw a very\n // specific error message to try to guide them the right way.\n // For example: https://github.com/Polymer/polymer-bundler/pull/519\n if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {\n var message = 'original.line and original.column are not numbers -- you probably meant to omit ' +\n 'the original mapping entirely and only map the generated position. If so, pass ' +\n 'null for the original mapping instead of an object with empty or null values.'\n\n if (this._ignoreInvalidMapping) {\n if (typeof console !== 'undefined' && console.warn) {\n console.warn(message);\n }\n return false;\n } else {\n throw new Error(message);\n }\n }\n\n if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aGenerated.line > 0 && aGenerated.column >= 0\n && !aOriginal && !aSource && !aName) {\n // Case 1.\n return;\n }\n else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n && aGenerated.line > 0 && aGenerated.column >= 0\n && aOriginal.line > 0 && aOriginal.column >= 0\n && aSource) {\n // Cases 2 and 3.\n return;\n }\n else {\n var message = 'Invalid mapping: ' + JSON.stringify({\n generated: aGenerated,\n source: aSource,\n original: aOriginal,\n name: aName\n });\n\n if (this._ignoreInvalidMapping) {\n if (typeof console !== 'undefined' && console.warn) {\n console.warn(message);\n }\n return false;\n } else {\n throw new Error(message)\n }\n }\n };\n\n/**\n * Serialize the accumulated mappings in to the stream of base 64 VLQs\n * specified by the source map format.\n */\nSourceMapGenerator.prototype._serializeMappings =\n function SourceMapGenerator_serializeMappings() {\n var previousGeneratedColumn = 0;\n var previousGeneratedLine = 1;\n var previousOriginalColumn = 0;\n var previousOriginalLine = 0;\n var previousName = 0;\n var previousSource = 0;\n var result = '';\n var next;\n var mapping;\n var nameIdx;\n var sourceIdx;\n\n var mappings = this._mappings.toArray();\n for (var i = 0, len = mappings.length; i < len; i++) {\n mapping = mappings[i];\n next = ''\n\n if (mapping.generatedLine !== previousGeneratedLine) {\n previousGeneratedColumn = 0;\n while (mapping.generatedLine !== previousGeneratedLine) {\n next += ';';\n previousGeneratedLine++;\n }\n }\n else {\n if (i > 0) {\n if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n continue;\n }\n next += ',';\n }\n }\n\n next += base64VLQ.encode(mapping.generatedColumn\n - previousGeneratedColumn);\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (mapping.source != null) {\n sourceIdx = this._sources.indexOf(mapping.source);\n next += base64VLQ.encode(sourceIdx - previousSource);\n previousSource = sourceIdx;\n\n // lines are stored 0-based in SourceMap spec version 3\n next += base64VLQ.encode(mapping.originalLine - 1\n - previousOriginalLine);\n previousOriginalLine = mapping.originalLine - 1;\n\n next += base64VLQ.encode(mapping.originalColumn\n - previousOriginalColumn);\n previousOriginalColumn = mapping.originalColumn;\n\n if (mapping.name != null) {\n nameIdx = this._names.indexOf(mapping.name);\n next += base64VLQ.encode(nameIdx - previousName);\n previousName = nameIdx;\n }\n }\n\n result += next;\n }\n\n return result;\n };\n\nSourceMapGenerator.prototype._generateSourcesContent =\n function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n return aSources.map(function (source) {\n if (!this._sourcesContents) {\n return null;\n }\n if (aSourceRoot != null) {\n source = util.relative(aSourceRoot, source);\n }\n var key = util.toSetString(source);\n return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n ? this._sourcesContents[key]\n : null;\n }, this);\n };\n\n/**\n * Externalize the source map.\n */\nSourceMapGenerator.prototype.toJSON =\n function SourceMapGenerator_toJSON() {\n var map = {\n version: this._version,\n sources: this._sources.toArray(),\n names: this._names.toArray(),\n mappings: this._serializeMappings()\n };\n if (this._file != null) {\n map.file = this._file;\n }\n if (this._sourceRoot != null) {\n map.sourceRoot = this._sourceRoot;\n }\n if (this._sourcesContents) {\n map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n }\n\n return map;\n };\n\n/**\n * Render the source map being generated to a string.\n */\nSourceMapGenerator.prototype.toString =\n function SourceMapGenerator_toString() {\n return JSON.stringify(this.toJSON());\n };\n\nexports.SourceMapGenerator = SourceMapGenerator;\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar SourceMapGenerator = require('./source-map-generator').SourceMapGenerator;\nvar util = require('./util');\n\n// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n// operating systems these days (capturing the result).\nvar REGEX_NEWLINE = /(\\r?\\n)/;\n\n// Newline character code for charCodeAt() comparisons\nvar NEWLINE_CODE = 10;\n\n// Private symbol for identifying `SourceNode`s when multiple versions of\n// the source-map library are loaded. This MUST NOT CHANGE across\n// versions!\nvar isSourceNode = \"$$$isSourceNode$$$\";\n\n/**\n * SourceNodes provide a way to abstract over interpolating/concatenating\n * snippets of generated JavaScript source code while maintaining the line and\n * column information associated with the original source code.\n *\n * @param aLine The original line number.\n * @param aColumn The original column number.\n * @param aSource The original source's filename.\n * @param aChunks Optional. An array of strings which are snippets of\n * generated JS, or other SourceNodes.\n * @param aName The original identifier.\n */\nfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n this.children = [];\n this.sourceContents = {};\n this.line = aLine == null ? null : aLine;\n this.column = aColumn == null ? null : aColumn;\n this.source = aSource == null ? null : aSource;\n this.name = aName == null ? null : aName;\n this[isSourceNode] = true;\n if (aChunks != null) this.add(aChunks);\n}\n\n/**\n * Creates a SourceNode from generated code and a SourceMapConsumer.\n *\n * @param aGeneratedCode The generated code\n * @param aSourceMapConsumer The SourceMap for the generated code\n * @param aRelativePath Optional. The path that relative sources in the\n * SourceMapConsumer should be relative to.\n */\nSourceNode.fromStringWithSourceMap =\n function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n // The SourceNode we want to fill with the generated code\n // and the SourceMap\n var node = new SourceNode();\n\n // All even indices of this array are one line of the generated code,\n // while all odd indices are the newlines between two adjacent lines\n // (since `REGEX_NEWLINE` captures its match).\n // Processed fragments are accessed by calling `shiftNextLine`.\n var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n var remainingLinesIndex = 0;\n var shiftNextLine = function() {\n var lineContents = getNextLine();\n // The last line of a file might not have a newline.\n var newLine = getNextLine() || \"\";\n return lineContents + newLine;\n\n function getNextLine() {\n return remainingLinesIndex < remainingLines.length ?\n remainingLines[remainingLinesIndex++] : undefined;\n }\n };\n\n // We need to remember the position of \"remainingLines\"\n var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\n // The generate SourceNodes we need a code range.\n // To extract it current and last mapping is used.\n // Here we store the last mapping.\n var lastMapping = null;\n\n aSourceMapConsumer.eachMapping(function (mapping) {\n if (lastMapping !== null) {\n // We add the code from \"lastMapping\" to \"mapping\":\n // First check if there is a new line in between.\n if (lastGeneratedLine < mapping.generatedLine) {\n // Associate first line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n lastGeneratedLine++;\n lastGeneratedColumn = 0;\n // The remaining code is added without mapping\n } else {\n // There is no new line in between.\n // Associate the code between \"lastGeneratedColumn\" and\n // \"mapping.generatedColumn\" with \"lastMapping\"\n var nextLine = remainingLines[remainingLinesIndex] || '';\n var code = nextLine.substr(0, mapping.generatedColumn -\n lastGeneratedColumn);\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -\n lastGeneratedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n addMappingWithCode(lastMapping, code);\n // No more remaining code, continue\n lastMapping = mapping;\n return;\n }\n }\n // We add the generated code until the first mapping\n // to the SourceNode without any mapping.\n // Each line is added as separate string.\n while (lastGeneratedLine < mapping.generatedLine) {\n node.add(shiftNextLine());\n lastGeneratedLine++;\n }\n if (lastGeneratedColumn < mapping.generatedColumn) {\n var nextLine = remainingLines[remainingLinesIndex] || '';\n node.add(nextLine.substr(0, mapping.generatedColumn));\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n }\n lastMapping = mapping;\n }, this);\n // We have processed all mappings.\n if (remainingLinesIndex < remainingLines.length) {\n if (lastMapping) {\n // Associate the remaining code in the current line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n }\n // and add the remaining lines without any mapping\n node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n }\n\n // Copy sourcesContent into SourceNode\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aRelativePath != null) {\n sourceFile = util.join(aRelativePath, sourceFile);\n }\n node.setSourceContent(sourceFile, content);\n }\n });\n\n return node;\n\n function addMappingWithCode(mapping, code) {\n if (mapping === null || mapping.source === undefined) {\n node.add(code);\n } else {\n var source = aRelativePath\n ? util.join(aRelativePath, mapping.source)\n : mapping.source;\n node.add(new SourceNode(mapping.originalLine,\n mapping.originalColumn,\n source,\n code,\n mapping.name));\n }\n }\n };\n\n/**\n * Add a chunk of generated JS to this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.add = function SourceNode_add(aChunk) {\n if (Array.isArray(aChunk)) {\n aChunk.forEach(function (chunk) {\n this.add(chunk);\n }, this);\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n if (aChunk) {\n this.children.push(aChunk);\n }\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Add a chunk of generated JS to the beginning of this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n if (Array.isArray(aChunk)) {\n for (var i = aChunk.length-1; i >= 0; i--) {\n this.prepend(aChunk[i]);\n }\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n this.children.unshift(aChunk);\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Walk over the tree of JS snippets in this node and its children. The\n * walking function is called once for each snippet of JS and is passed that\n * snippet and the its original associated source's line/column location.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n var chunk;\n for (var i = 0, len = this.children.length; i < len; i++) {\n chunk = this.children[i];\n if (chunk[isSourceNode]) {\n chunk.walk(aFn);\n }\n else {\n if (chunk !== '') {\n aFn(chunk, { source: this.source,\n line: this.line,\n column: this.column,\n name: this.name });\n }\n }\n }\n};\n\n/**\n * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n * each of `this.children`.\n *\n * @param aSep The separator.\n */\nSourceNode.prototype.join = function SourceNode_join(aSep) {\n var newChildren;\n var i;\n var len = this.children.length;\n if (len > 0) {\n newChildren = [];\n for (i = 0; i < len-1; i++) {\n newChildren.push(this.children[i]);\n newChildren.push(aSep);\n }\n newChildren.push(this.children[i]);\n this.children = newChildren;\n }\n return this;\n};\n\n/**\n * Call String.prototype.replace on the very right-most source snippet. Useful\n * for trimming whitespace from the end of a source node, etc.\n *\n * @param aPattern The pattern to replace.\n * @param aReplacement The thing to replace the pattern with.\n */\nSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n var lastChild = this.children[this.children.length - 1];\n if (lastChild[isSourceNode]) {\n lastChild.replaceRight(aPattern, aReplacement);\n }\n else if (typeof lastChild === 'string') {\n this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n }\n else {\n this.children.push(''.replace(aPattern, aReplacement));\n }\n return this;\n};\n\n/**\n * Set the source content for a source file. This will be added to the SourceMapGenerator\n * in the sourcesContent field.\n *\n * @param aSourceFile The filename of the source file\n * @param aSourceContent The content of the source file\n */\nSourceNode.prototype.setSourceContent =\n function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n };\n\n/**\n * Walk over the tree of SourceNodes. The walking function is called for each\n * source file content and is passed the filename and source content.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walkSourceContents =\n function SourceNode_walkSourceContents(aFn) {\n for (var i = 0, len = this.children.length; i < len; i++) {\n if (this.children[i][isSourceNode]) {\n this.children[i].walkSourceContents(aFn);\n }\n }\n\n var sources = Object.keys(this.sourceContents);\n for (var i = 0, len = sources.length; i < len; i++) {\n aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n }\n };\n\n/**\n * Return the string representation of this source node. Walks over the tree\n * and concatenates all the various snippets together to one string.\n */\nSourceNode.prototype.toString = function SourceNode_toString() {\n var str = \"\";\n this.walk(function (chunk) {\n str += chunk;\n });\n return str;\n};\n\n/**\n * Returns the string representation of this source node along with a source\n * map.\n */\nSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n var generated = {\n code: \"\",\n line: 1,\n column: 0\n };\n var map = new SourceMapGenerator(aArgs);\n var sourceMappingActive = false;\n var lastOriginalSource = null;\n var lastOriginalLine = null;\n var lastOriginalColumn = null;\n var lastOriginalName = null;\n this.walk(function (chunk, original) {\n generated.code += chunk;\n if (original.source !== null\n && original.line !== null\n && original.column !== null) {\n if(lastOriginalSource !== original.source\n || lastOriginalLine !== original.line\n || lastOriginalColumn !== original.column\n || lastOriginalName !== original.name) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n lastOriginalSource = original.source;\n lastOriginalLine = original.line;\n lastOriginalColumn = original.column;\n lastOriginalName = original.name;\n sourceMappingActive = true;\n } else if (sourceMappingActive) {\n map.addMapping({\n generated: {\n line: generated.line,\n column: generated.column\n }\n });\n lastOriginalSource = null;\n sourceMappingActive = false;\n }\n for (var idx = 0, length = chunk.length; idx < length; idx++) {\n if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n generated.line++;\n generated.column = 0;\n // Mappings end at eol\n if (idx + 1 === length) {\n lastOriginalSource = null;\n sourceMappingActive = false;\n } else if (sourceMappingActive) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n } else {\n generated.column++;\n }\n }\n });\n this.walkSourceContents(function (sourceFile, sourceContent) {\n map.setSourceContent(sourceFile, sourceContent);\n });\n\n return { code: generated.code, map: map };\n};\n\nexports.SourceNode = SourceNode;\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n/**\n * This is a helper function for getting values from parameter/options\n * objects.\n *\n * @param args The object we are extracting values from\n * @param name The name of the property we are getting.\n * @param defaultValue An optional value to return if the property is missing\n * from the object. If this is not specified and the property is missing, an\n * error will be thrown.\n */\nfunction getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}\nexports.getArg = getArg;\n\nvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.-]*)(?::(\\d+))?(.*)$/;\nvar dataUrlRegexp = /^data:.+\\,.+$/;\n\nfunction urlParse(aUrl) {\n var match = aUrl.match(urlRegexp);\n if (!match) {\n return null;\n }\n return {\n scheme: match[1],\n auth: match[2],\n host: match[3],\n port: match[4],\n path: match[5]\n };\n}\nexports.urlParse = urlParse;\n\nfunction urlGenerate(aParsedUrl) {\n var url = '';\n if (aParsedUrl.scheme) {\n url += aParsedUrl.scheme + ':';\n }\n url += '//';\n if (aParsedUrl.auth) {\n url += aParsedUrl.auth + '@';\n }\n if (aParsedUrl.host) {\n url += aParsedUrl.host;\n }\n if (aParsedUrl.port) {\n url += \":\" + aParsedUrl.port\n }\n if (aParsedUrl.path) {\n url += aParsedUrl.path;\n }\n return url;\n}\nexports.urlGenerate = urlGenerate;\n\nvar MAX_CACHED_INPUTS = 32;\n\n/**\n * Takes some function `f(input) -> result` and returns a memoized version of\n * `f`.\n *\n * We keep at most `MAX_CACHED_INPUTS` memoized results of `f` alive. The\n * memoization is a dumb-simple, linear least-recently-used cache.\n */\nfunction lruMemoize(f) {\n var cache = [];\n\n return function(input) {\n for (var i = 0; i < cache.length; i++) {\n if (cache[i].input === input) {\n var temp = cache[0];\n cache[0] = cache[i];\n cache[i] = temp;\n return cache[0].result;\n }\n }\n\n var result = f(input);\n\n cache.unshift({\n input,\n result,\n });\n\n if (cache.length > MAX_CACHED_INPUTS) {\n cache.pop();\n }\n\n return result;\n };\n}\n\n/**\n * Normalizes a path, or the path portion of a URL:\n *\n * - Replaces consecutive slashes with one slash.\n * - Removes unnecessary '.' parts.\n * - Removes unnecessary '<dir>/..' parts.\n *\n * Based on code in the Node.js 'path' core module.\n *\n * @param aPath The path or url to normalize.\n */\nvar normalize = lruMemoize(function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n // Split the path into parts between `/` characters. This is much faster than\n // using `.split(/\\/+/g)`.\n var parts = [];\n var start = 0;\n var i = 0;\n while (true) {\n start = i;\n i = path.indexOf(\"/\", start);\n if (i === -1) {\n parts.push(path.slice(start));\n break;\n } else {\n parts.push(path.slice(start, i));\n while (i < path.length && path[i] === \"/\") {\n i++;\n }\n }\n }\n\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n});\nexports.normalize = normalize;\n\n/**\n * Joins two paths/URLs.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be joined with the root.\n *\n * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n * first.\n * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n * is updated with the result and aRoot is returned. Otherwise the result\n * is returned.\n * - If aPath is absolute, the result is aPath.\n * - Otherwise the two paths are joined with a slash.\n * - Joining for example 'http://' and 'www.example.com' is also supported.\n */\nfunction join(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n if (aPath === \"\") {\n aPath = \".\";\n }\n var aPathUrl = urlParse(aPath);\n var aRootUrl = urlParse(aRoot);\n if (aRootUrl) {\n aRoot = aRootUrl.path || '/';\n }\n\n // `join(foo, '//www.example.org')`\n if (aPathUrl && !aPathUrl.scheme) {\n if (aRootUrl) {\n aPathUrl.scheme = aRootUrl.scheme;\n }\n return urlGenerate(aPathUrl);\n }\n\n if (aPathUrl || aPath.match(dataUrlRegexp)) {\n return aPath;\n }\n\n // `join('http://', 'www.example.com')`\n if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n aRootUrl.host = aPath;\n return urlGenerate(aRootUrl);\n }\n\n var joined = aPath.charAt(0) === '/'\n ? aPath\n : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\n if (aRootUrl) {\n aRootUrl.path = joined;\n return urlGenerate(aRootUrl);\n }\n return joined;\n}\nexports.join = join;\n\nexports.isAbsolute = function (aPath) {\n return aPath.charAt(0) === '/' || urlRegexp.test(aPath);\n};\n\n/**\n * Make a path relative to a URL or another path.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be made relative to aRoot.\n */\nfunction relative(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n\n aRoot = aRoot.replace(/\\/$/, '');\n\n // It is possible for the path to be above the root. In this case, simply\n // checking whether the root is a prefix of the path won't work. Instead, we\n // need to remove components from the root one by one, until either we find\n // a prefix that fits, or we run out of components to remove.\n var level = 0;\n while (aPath.indexOf(aRoot + '/') !== 0) {\n var index = aRoot.lastIndexOf(\"/\");\n if (index < 0) {\n return aPath;\n }\n\n // If the only part of the root that is left is the scheme (i.e. http://,\n // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n // have exhausted all components, so the path is not relative to the root.\n aRoot = aRoot.slice(0, index);\n if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n return aPath;\n }\n\n ++level;\n }\n\n // Make sure we add a \"../\" for each component we removed from the root.\n return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n}\nexports.relative = relative;\n\nvar supportsNullProto = (function () {\n var obj = Object.create(null);\n return !('__proto__' in obj);\n}());\n\nfunction identity (s) {\n return s;\n}\n\n/**\n * Because behavior goes wacky when you set `__proto__` on objects, we\n * have to prefix all the strings in our set with an arbitrary character.\n *\n * See https://github.com/mozilla/source-map/pull/31 and\n * https://github.com/mozilla/source-map/issues/30\n *\n * @param String aStr\n */\nfunction toSetString(aStr) {\n if (isProtoString(aStr)) {\n return '$' + aStr;\n }\n\n return aStr;\n}\nexports.toSetString = supportsNullProto ? identity : toSetString;\n\nfunction fromSetString(aStr) {\n if (isProtoString(aStr)) {\n return aStr.slice(1);\n }\n\n return aStr;\n}\nexports.fromSetString = supportsNullProto ? identity : fromSetString;\n\nfunction isProtoString(s) {\n if (!s) {\n return false;\n }\n\n var length = s.length;\n\n if (length < 9 /* \"__proto__\".length */) {\n return false;\n }\n\n if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n s.charCodeAt(length - 9) !== 95 /* '_' */) {\n return false;\n }\n\n for (var i = length - 10; i >= 0; i--) {\n if (s.charCodeAt(i) !== 36 /* '$' */) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Comparator between two mappings where the original positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same original source/line/column, but different generated\n * line and column the same. Useful when searching for a mapping with a\n * stubbed out mapping.\n */\nfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n var cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0 || onlyCompareOriginal) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByOriginalPositions = compareByOriginalPositions;\n\nfunction compareByOriginalPositionsNoSource(mappingA, mappingB, onlyCompareOriginal) {\n var cmp\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0 || onlyCompareOriginal) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByOriginalPositionsNoSource = compareByOriginalPositionsNoSource;\n\n/**\n * Comparator between two mappings with deflated source and name indices where\n * the generated positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same generated line and column, but different\n * source/name/original line and column the same. Useful when searching for a\n * mapping with a stubbed out mapping.\n */\nfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0 || onlyCompareGenerated) {\n return cmp;\n }\n\n cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\nfunction compareByGeneratedPositionsDeflatedNoLine(mappingA, mappingB, onlyCompareGenerated) {\n var cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0 || onlyCompareGenerated) {\n return cmp;\n }\n\n cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsDeflatedNoLine = compareByGeneratedPositionsDeflatedNoLine;\n\nfunction strcmp(aStr1, aStr2) {\n if (aStr1 === aStr2) {\n return 0;\n }\n\n if (aStr1 === null) {\n return 1; // aStr2 !== null\n }\n\n if (aStr2 === null) {\n return -1; // aStr1 !== null\n }\n\n if (aStr1 > aStr2) {\n return 1;\n }\n\n return -1;\n}\n\n/**\n * Comparator between two mappings with inflated source and name strings where\n * the generated positions are compared.\n */\nfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\n/**\n * Strip any JSON XSSI avoidance prefix from the string (as documented\n * in the source maps specification), and then parse the string as\n * JSON.\n */\nfunction parseSourceMapInput(str) {\n return JSON.parse(str.replace(/^\\)]}'[^\\n]*\\n/, ''));\n}\nexports.parseSourceMapInput = parseSourceMapInput;\n\n/**\n * Compute the URL of a source given the the source root, the source's\n * URL, and the source map's URL.\n */\nfunction computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {\n sourceURL = sourceURL || '';\n\n if (sourceRoot) {\n // This follows what Chrome does.\n if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') {\n sourceRoot += '/';\n }\n // The spec says:\n // Line 4: An optional source root, useful for relocating source\n // files on a server or removing repeated values in the\n // “sources” entry. This value is prepended to the individual\n // entries in the “source” field.\n sourceURL = sourceRoot + sourceURL;\n }\n\n // Historically, SourceMapConsumer did not take the sourceMapURL as\n // a parameter. This mode is still somewhat supported, which is why\n // this code block is conditional. However, it's preferable to pass\n // the source map URL to SourceMapConsumer, so that this function\n // can implement the source URL resolution algorithm as outlined in\n // the spec. This block is basically the equivalent of:\n // new URL(sourceURL, sourceMapURL).toString()\n // ... except it avoids using URL, which wasn't available in the\n // older releases of node still supported by this library.\n //\n // The spec says:\n // If the sources are not absolute URLs after prepending of the\n // “sourceRoot”, the sources are resolved relative to the\n // SourceMap (like resolving script src in a html document).\n if (sourceMapURL) {\n var parsed = urlParse(sourceMapURL);\n if (!parsed) {\n throw new Error(\"sourceMapURL could not be parsed\");\n }\n if (parsed.path) {\n // Strip the last path component, but keep the \"/\".\n var index = parsed.path.lastIndexOf('/');\n if (index >= 0) {\n parsed.path = parsed.path.substring(0, index + 1);\n }\n }\n sourceURL = join(urlGenerate(parsed), sourceURL);\n }\n\n return normalize(sourceURL);\n}\nexports.computeSourceURL = computeSourceURL;\n","/*\n * Copyright 2009-2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE.txt or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\nexports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator;\nexports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer;\nexports.SourceNode = require('./lib/source-node').SourceNode;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.version = exports.validate = exports.v7 = exports.v6ToV1 = exports.v6 = exports.v5 = exports.v4 = exports.v3 = exports.v1ToV6 = exports.v1 = exports.stringify = exports.parse = exports.NIL = exports.MAX = void 0;\nvar max_js_1 = require(\"./max.js\");\nObject.defineProperty(exports, \"MAX\", { enumerable: true, get: function () { return max_js_1.default; } });\nvar nil_js_1 = require(\"./nil.js\");\nObject.defineProperty(exports, \"NIL\", { enumerable: true, get: function () { return nil_js_1.default; } });\nvar parse_js_1 = require(\"./parse.js\");\nObject.defineProperty(exports, \"parse\", { enumerable: true, get: function () { return parse_js_1.default; } });\nvar stringify_js_1 = require(\"./stringify.js\");\nObject.defineProperty(exports, \"stringify\", { enumerable: true, get: function () { return stringify_js_1.default; } });\nvar v1_js_1 = require(\"./v1.js\");\nObject.defineProperty(exports, \"v1\", { enumerable: true, get: function () { return v1_js_1.default; } });\nvar v1ToV6_js_1 = require(\"./v1ToV6.js\");\nObject.defineProperty(exports, \"v1ToV6\", { enumerable: true, get: function () { return v1ToV6_js_1.default; } });\nvar v3_js_1 = require(\"./v3.js\");\nObject.defineProperty(exports, \"v3\", { enumerable: true, get: function () { return v3_js_1.default; } });\nvar v4_js_1 = require(\"./v4.js\");\nObject.defineProperty(exports, \"v4\", { enumerable: true, get: function () { return v4_js_1.default; } });\nvar v5_js_1 = require(\"./v5.js\");\nObject.defineProperty(exports, \"v5\", { enumerable: true, get: function () { return v5_js_1.default; } });\nvar v6_js_1 = require(\"./v6.js\");\nObject.defineProperty(exports, \"v6\", { enumerable: true, get: function () { return v6_js_1.default; } });\nvar v6ToV1_js_1 = require(\"./v6ToV1.js\");\nObject.defineProperty(exports, \"v6ToV1\", { enumerable: true, get: function () { return v6ToV1_js_1.default; } });\nvar v7_js_1 = require(\"./v7.js\");\nObject.defineProperty(exports, \"v7\", { enumerable: true, get: function () { return v7_js_1.default; } });\nvar validate_js_1 = require(\"./validate.js\");\nObject.defineProperty(exports, \"validate\", { enumerable: true, get: function () { return validate_js_1.default; } });\nvar version_js_1 = require(\"./version.js\");\nObject.defineProperty(exports, \"version\", { enumerable: true, get: function () { return version_js_1.default; } });\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = 'ffffffff-ffff-ffff-ffff-ffffffffffff';\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst crypto_1 = require(\"crypto\");\nfunction md5(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n }\n else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n return (0, crypto_1.createHash)('md5').update(bytes).digest();\n}\nexports.default = md5;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst crypto_1 = require(\"crypto\");\nexports.default = { randomUUID: crypto_1.randomUUID };\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = '00000000-0000-0000-0000-000000000000';\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst validate_js_1 = require(\"./validate.js\");\nfunction parse(uuid) {\n if (!(0, validate_js_1.default)(uuid)) {\n throw TypeError('Invalid UUID');\n }\n let v;\n return Uint8Array.of((v = parseInt(uuid.slice(0, 8), 16)) >>> 24, (v >>> 16) & 0xff, (v >>> 8) & 0xff, v & 0xff, (v = parseInt(uuid.slice(9, 13), 16)) >>> 8, v & 0xff, (v = parseInt(uuid.slice(14, 18), 16)) >>> 8, v & 0xff, (v = parseInt(uuid.slice(19, 23), 16)) >>> 8, v & 0xff, ((v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000) & 0xff, (v / 0x100000000) & 0xff, (v >>> 24) & 0xff, (v >>> 16) & 0xff, (v >>> 8) & 0xff, v & 0xff);\n}\nexports.default = parse;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst crypto_1 = require(\"crypto\");\nconst rnds8Pool = new Uint8Array(256);\nlet poolPtr = rnds8Pool.length;\nfunction rng() {\n if (poolPtr > rnds8Pool.length - 16) {\n (0, crypto_1.randomFillSync)(rnds8Pool);\n poolPtr = 0;\n }\n return rnds8Pool.slice(poolPtr, (poolPtr += 16));\n}\nexports.default = rng;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst crypto_1 = require(\"crypto\");\nfunction sha1(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n }\n else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n return (0, crypto_1.createHash)('sha1').update(bytes).digest();\n}\nexports.default = sha1;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.unsafeStringify = void 0;\nconst validate_js_1 = require(\"./validate.js\");\nconst byteToHex = [];\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\nfunction unsafeStringify(arr, offset = 0) {\n return (byteToHex[arr[offset + 0]] +\n byteToHex[arr[offset + 1]] +\n byteToHex[arr[offset + 2]] +\n byteToHex[arr[offset + 3]] +\n '-' +\n byteToHex[arr[offset + 4]] +\n byteToHex[arr[offset + 5]] +\n '-' +\n byteToHex[arr[offset + 6]] +\n byteToHex[arr[offset + 7]] +\n '-' +\n byteToHex[arr[offset + 8]] +\n byteToHex[arr[offset + 9]] +\n '-' +\n byteToHex[arr[offset + 10]] +\n byteToHex[arr[offset + 11]] +\n byteToHex[arr[offset + 12]] +\n byteToHex[arr[offset + 13]] +\n byteToHex[arr[offset + 14]] +\n byteToHex[arr[offset + 15]]).toLowerCase();\n}\nexports.unsafeStringify = unsafeStringify;\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset);\n if (!(0, validate_js_1.default)(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n return uuid;\n}\nexports.default = stringify;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.updateV1State = void 0;\nconst rng_js_1 = require(\"./rng.js\");\nconst stringify_js_1 = require(\"./stringify.js\");\nconst _state = {};\nfunction v1(options, buf, offset) {\n let bytes;\n const isV6 = options?._v6 ?? false;\n if (options) {\n const optionsKeys = Object.keys(options);\n if (optionsKeys.length === 1 && optionsKeys[0] === '_v6') {\n options = undefined;\n }\n }\n if (options) {\n bytes = v1Bytes(options.random ?? options.rng?.() ?? (0, rng_js_1.default)(), options.msecs, options.nsecs, options.clockseq, options.node, buf, offset);\n }\n else {\n const now = Date.now();\n const rnds = (0, rng_js_1.default)();\n updateV1State(_state, now, rnds);\n bytes = v1Bytes(rnds, _state.msecs, _state.nsecs, isV6 ? undefined : _state.clockseq, isV6 ? undefined : _state.node, buf, offset);\n }\n return buf ?? (0, stringify_js_1.unsafeStringify)(bytes);\n}\nfunction updateV1State(state, now, rnds) {\n state.msecs ??= -Infinity;\n state.nsecs ??= 0;\n if (now === state.msecs) {\n state.nsecs++;\n if (state.nsecs >= 10000) {\n state.node = undefined;\n state.nsecs = 0;\n }\n }\n else if (now > state.msecs) {\n state.nsecs = 0;\n }\n else if (now < state.msecs) {\n state.node = undefined;\n }\n if (!state.node) {\n state.node = rnds.slice(10, 16);\n state.node[0] |= 0x01;\n state.clockseq = ((rnds[8] << 8) | rnds[9]) & 0x3fff;\n }\n state.msecs = now;\n return state;\n}\nexports.updateV1State = updateV1State;\nfunction v1Bytes(rnds, msecs, nsecs, clockseq, node, buf, offset = 0) {\n if (rnds.length < 16) {\n throw new Error('Random bytes length must be >= 16');\n }\n if (!buf) {\n buf = new Uint8Array(16);\n offset = 0;\n }\n else {\n if (offset < 0 || offset + 16 > buf.length) {\n throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);\n }\n }\n msecs ??= Date.now();\n nsecs ??= 0;\n clockseq ??= ((rnds[8] << 8) | rnds[9]) & 0x3fff;\n node ??= rnds.slice(10, 16);\n msecs += 12219292800000;\n const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n buf[offset++] = (tl >>> 24) & 0xff;\n buf[offset++] = (tl >>> 16) & 0xff;\n buf[offset++] = (tl >>> 8) & 0xff;\n buf[offset++] = tl & 0xff;\n const tmh = ((msecs / 0x100000000) * 10000) & 0xfffffff;\n buf[offset++] = (tmh >>> 8) & 0xff;\n buf[offset++] = tmh & 0xff;\n buf[offset++] = ((tmh >>> 24) & 0xf) | 0x10;\n buf[offset++] = (tmh >>> 16) & 0xff;\n buf[offset++] = (clockseq >>> 8) | 0x80;\n buf[offset++] = clockseq & 0xff;\n for (let n = 0; n < 6; ++n) {\n buf[offset++] = node[n];\n }\n return buf;\n}\nexports.default = v1;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst parse_js_1 = require(\"./parse.js\");\nconst stringify_js_1 = require(\"./stringify.js\");\nfunction v1ToV6(uuid) {\n const v1Bytes = typeof uuid === 'string' ? (0, parse_js_1.default)(uuid) : uuid;\n const v6Bytes = _v1ToV6(v1Bytes);\n return typeof uuid === 'string' ? (0, stringify_js_1.unsafeStringify)(v6Bytes) : v6Bytes;\n}\nexports.default = v1ToV6;\nfunction _v1ToV6(v1Bytes) {\n return Uint8Array.of(((v1Bytes[6] & 0x0f) << 4) | ((v1Bytes[7] >> 4) & 0x0f), ((v1Bytes[7] & 0x0f) << 4) | ((v1Bytes[4] & 0xf0) >> 4), ((v1Bytes[4] & 0x0f) << 4) | ((v1Bytes[5] & 0xf0) >> 4), ((v1Bytes[5] & 0x0f) << 4) | ((v1Bytes[0] & 0xf0) >> 4), ((v1Bytes[0] & 0x0f) << 4) | ((v1Bytes[1] & 0xf0) >> 4), ((v1Bytes[1] & 0x0f) << 4) | ((v1Bytes[2] & 0xf0) >> 4), 0x60 | (v1Bytes[2] & 0x0f), v1Bytes[3], v1Bytes[8], v1Bytes[9], v1Bytes[10], v1Bytes[11], v1Bytes[12], v1Bytes[13], v1Bytes[14], v1Bytes[15]);\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.URL = exports.DNS = void 0;\nconst md5_js_1 = require(\"./md5.js\");\nconst v35_js_1 = require(\"./v35.js\");\nvar v35_js_2 = require(\"./v35.js\");\nObject.defineProperty(exports, \"DNS\", { enumerable: true, get: function () { return v35_js_2.DNS; } });\nObject.defineProperty(exports, \"URL\", { enumerable: true, get: function () { return v35_js_2.URL; } });\nfunction v3(value, namespace, buf, offset) {\n return (0, v35_js_1.default)(0x30, md5_js_1.default, value, namespace, buf, offset);\n}\nv3.DNS = v35_js_1.DNS;\nv3.URL = v35_js_1.URL;\nexports.default = v3;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.URL = exports.DNS = exports.stringToBytes = void 0;\nconst parse_js_1 = require(\"./parse.js\");\nconst stringify_js_1 = require(\"./stringify.js\");\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str));\n const bytes = new Uint8Array(str.length);\n for (let i = 0; i < str.length; ++i) {\n bytes[i] = str.charCodeAt(i);\n }\n return bytes;\n}\nexports.stringToBytes = stringToBytes;\nexports.DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexports.URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nfunction v35(version, hash, value, namespace, buf, offset) {\n const valueBytes = typeof value === 'string' ? stringToBytes(value) : value;\n const namespaceBytes = typeof namespace === 'string' ? (0, parse_js_1.default)(namespace) : namespace;\n if (typeof namespace === 'string') {\n namespace = (0, parse_js_1.default)(namespace);\n }\n if (namespace?.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n }\n let bytes = new Uint8Array(16 + valueBytes.length);\n bytes.set(namespaceBytes);\n bytes.set(valueBytes, namespaceBytes.length);\n bytes = hash(bytes);\n bytes[6] = (bytes[6] & 0x0f) | version;\n bytes[8] = (bytes[8] & 0x3f) | 0x80;\n if (buf) {\n offset = offset || 0;\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n return buf;\n }\n return (0, stringify_js_1.unsafeStringify)(bytes);\n}\nexports.default = v35;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst native_js_1 = require(\"./native.js\");\nconst rng_js_1 = require(\"./rng.js\");\nconst stringify_js_1 = require(\"./stringify.js\");\nfunction v4(options, buf, offset) {\n if (native_js_1.default.randomUUID && !buf && !options) {\n return native_js_1.default.randomUUID();\n }\n options = options || {};\n const rnds = options.random ?? options.rng?.() ?? (0, rng_js_1.default)();\n if (rnds.length < 16) {\n throw new Error('Random bytes length must be >= 16');\n }\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n if (buf) {\n offset = offset || 0;\n if (offset < 0 || offset + 16 > buf.length) {\n throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);\n }\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n return buf;\n }\n return (0, stringify_js_1.unsafeStringify)(rnds);\n}\nexports.default = v4;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.URL = exports.DNS = void 0;\nconst sha1_js_1 = require(\"./sha1.js\");\nconst v35_js_1 = require(\"./v35.js\");\nvar v35_js_2 = require(\"./v35.js\");\nObject.defineProperty(exports, \"DNS\", { enumerable: true, get: function () { return v35_js_2.DNS; } });\nObject.defineProperty(exports, \"URL\", { enumerable: true, get: function () { return v35_js_2.URL; } });\nfunction v5(value, namespace, buf, offset) {\n return (0, v35_js_1.default)(0x50, sha1_js_1.default, value, namespace, buf, offset);\n}\nv5.DNS = v35_js_1.DNS;\nv5.URL = v35_js_1.URL;\nexports.default = v5;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst stringify_js_1 = require(\"./stringify.js\");\nconst v1_js_1 = require(\"./v1.js\");\nconst v1ToV6_js_1 = require(\"./v1ToV6.js\");\nfunction v6(options, buf, offset) {\n options ??= {};\n offset ??= 0;\n let bytes = (0, v1_js_1.default)({ ...options, _v6: true }, new Uint8Array(16));\n bytes = (0, v1ToV6_js_1.default)(bytes);\n if (buf) {\n for (let i = 0; i < 16; i++) {\n buf[offset + i] = bytes[i];\n }\n return buf;\n }\n return (0, stringify_js_1.unsafeStringify)(bytes);\n}\nexports.default = v6;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst parse_js_1 = require(\"./parse.js\");\nconst stringify_js_1 = require(\"./stringify.js\");\nfunction v6ToV1(uuid) {\n const v6Bytes = typeof uuid === 'string' ? (0, parse_js_1.default)(uuid) : uuid;\n const v1Bytes = _v6ToV1(v6Bytes);\n return typeof uuid === 'string' ? (0, stringify_js_1.unsafeStringify)(v1Bytes) : v1Bytes;\n}\nexports.default = v6ToV1;\nfunction _v6ToV1(v6Bytes) {\n return Uint8Array.of(((v6Bytes[3] & 0x0f) << 4) | ((v6Bytes[4] >> 4) & 0x0f), ((v6Bytes[4] & 0x0f) << 4) | ((v6Bytes[5] & 0xf0) >> 4), ((v6Bytes[5] & 0x0f) << 4) | (v6Bytes[6] & 0x0f), v6Bytes[7], ((v6Bytes[1] & 0x0f) << 4) | ((v6Bytes[2] & 0xf0) >> 4), ((v6Bytes[2] & 0x0f) << 4) | ((v6Bytes[3] & 0xf0) >> 4), 0x10 | ((v6Bytes[0] & 0xf0) >> 4), ((v6Bytes[0] & 0x0f) << 4) | ((v6Bytes[1] & 0xf0) >> 4), v6Bytes[8], v6Bytes[9], v6Bytes[10], v6Bytes[11], v6Bytes[12], v6Bytes[13], v6Bytes[14], v6Bytes[15]);\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.updateV7State = void 0;\nconst rng_js_1 = require(\"./rng.js\");\nconst stringify_js_1 = require(\"./stringify.js\");\nconst _state = {};\nfunction v7(options, buf, offset) {\n let bytes;\n if (options) {\n bytes = v7Bytes(options.random ?? options.rng?.() ?? (0, rng_js_1.default)(), options.msecs, options.seq, buf, offset);\n }\n else {\n const now = Date.now();\n const rnds = (0, rng_js_1.default)();\n updateV7State(_state, now, rnds);\n bytes = v7Bytes(rnds, _state.msecs, _state.seq, buf, offset);\n }\n return buf ?? (0, stringify_js_1.unsafeStringify)(bytes);\n}\nfunction updateV7State(state, now, rnds) {\n state.msecs ??= -Infinity;\n state.seq ??= 0;\n if (now > state.msecs) {\n state.seq = (rnds[6] << 23) | (rnds[7] << 16) | (rnds[8] << 8) | rnds[9];\n state.msecs = now;\n }\n else {\n state.seq = (state.seq + 1) | 0;\n if (state.seq === 0) {\n state.msecs++;\n }\n }\n return state;\n}\nexports.updateV7State = updateV7State;\nfunction v7Bytes(rnds, msecs, seq, buf, offset = 0) {\n if (rnds.length < 16) {\n throw new Error('Random bytes length must be >= 16');\n }\n if (!buf) {\n buf = new Uint8Array(16);\n offset = 0;\n }\n else {\n if (offset < 0 || offset + 16 > buf.length) {\n throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);\n }\n }\n msecs ??= Date.now();\n seq ??= ((rnds[6] * 0x7f) << 24) | (rnds[7] << 16) | (rnds[8] << 8) | rnds[9];\n buf[offset++] = (msecs / 0x10000000000) & 0xff;\n buf[offset++] = (msecs / 0x100000000) & 0xff;\n buf[offset++] = (msecs / 0x1000000) & 0xff;\n buf[offset++] = (msecs / 0x10000) & 0xff;\n buf[offset++] = (msecs / 0x100) & 0xff;\n buf[offset++] = msecs & 0xff;\n buf[offset++] = 0x70 | ((seq >>> 28) & 0x0f);\n buf[offset++] = (seq >>> 20) & 0xff;\n buf[offset++] = 0x80 | ((seq >>> 14) & 0x3f);\n buf[offset++] = (seq >>> 6) & 0xff;\n buf[offset++] = ((seq << 2) & 0xff) | (rnds[10] & 0x03);\n buf[offset++] = rnds[11];\n buf[offset++] = rnds[12];\n buf[offset++] = rnds[13];\n buf[offset++] = rnds[14];\n buf[offset++] = rnds[15];\n return buf;\n}\nexports.default = v7;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst regex_js_1 = require(\"./regex.js\");\nfunction validate(uuid) {\n return typeof uuid === 'string' && regex_js_1.default.test(uuid);\n}\nexports.default = validate;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst validate_js_1 = require(\"./validate.js\");\nfunction version(uuid) {\n if (!(0, validate_js_1.default)(uuid)) {\n throw TypeError('Invalid UUID');\n }\n return parseInt(uuid.slice(14, 15), 16);\n}\nexports.default = version;\n","/*!\n * vue-i18n v11.1.2\n * (c) 2025 kazuya kawaguchi\n * Released under the MIT License.\n */\n'use strict';\n\nvar coreBase = require('@intlify/core-base');\nvar shared = require('@intlify/shared');\nvar vue = require('vue');\n\n/**\n * Vue I18n Version\n *\n * @remarks\n * Semver format. Same format as the package.json `version` field.\n *\n * @VueI18nGeneral\n */\nconst VERSION = '11.1.2';\n\nconst I18nErrorCodes = {\n // composer module errors\n UNEXPECTED_RETURN_TYPE: coreBase.CORE_ERROR_CODES_EXTEND_POINT, // 24\n // legacy module errors\n INVALID_ARGUMENT: 25,\n // i18n module errors\n MUST_BE_CALL_SETUP_TOP: 26,\n NOT_INSTALLED: 27,\n // directive module errors\n REQUIRED_VALUE: 28,\n INVALID_VALUE: 29,\n // vue-devtools errors\n CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN: 30,\n NOT_INSTALLED_WITH_PROVIDE: 31,\n // unexpected error\n UNEXPECTED_ERROR: 32,\n // not compatible legacy vue-i18n constructor\n NOT_COMPATIBLE_LEGACY_VUE_I18N: 33,\n // Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly\n NOT_AVAILABLE_COMPOSITION_IN_LEGACY: 34\n};\nfunction createI18nError(code, ...args) {\n return coreBase.createCompileError(code, null, undefined);\n}\n\nconst TranslateVNodeSymbol = \n/* #__PURE__*/ shared.makeSymbol('__translateVNode');\nconst DatetimePartsSymbol = /* #__PURE__*/ shared.makeSymbol('__datetimeParts');\nconst NumberPartsSymbol = /* #__PURE__*/ shared.makeSymbol('__numberParts');\nconst SetPluralRulesSymbol = shared.makeSymbol('__setPluralRules');\nshared.makeSymbol('__intlifyMeta');\nconst InejctWithOptionSymbol = \n/* #__PURE__*/ shared.makeSymbol('__injectWithOption');\nconst DisposeSymbol = /* #__PURE__*/ shared.makeSymbol('__dispose');\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * Transform flat json in obj to normal json in obj\n */\nfunction handleFlatJson(obj) {\n // check obj\n if (!shared.isObject(obj)) {\n return obj;\n }\n for (const key in obj) {\n // check key\n if (!shared.hasOwn(obj, key)) {\n continue;\n }\n // handle for normal json\n if (!key.includes('.')) {\n // recursive process value if value is also a object\n if (shared.isObject(obj[key])) {\n handleFlatJson(obj[key]);\n }\n }\n // handle for flat json, transform to normal json\n else {\n // go to the last object\n const subKeys = key.split('.');\n const lastIndex = subKeys.length - 1;\n let currentObj = obj;\n let hasStringValue = false;\n for (let i = 0; i < lastIndex; i++) {\n if (subKeys[i] === '__proto__') {\n throw new Error(`unsafe key: ${subKeys[i]}`);\n }\n if (!(subKeys[i] in currentObj)) {\n currentObj[subKeys[i]] = shared.create();\n }\n if (!shared.isObject(currentObj[subKeys[i]])) {\n hasStringValue = true;\n break;\n }\n currentObj = currentObj[subKeys[i]];\n }\n // update last object value, delete old property\n if (!hasStringValue) {\n currentObj[subKeys[lastIndex]] = obj[key];\n delete obj[key];\n }\n // recursive process value if value is also a object\n if (shared.isObject(currentObj[subKeys[lastIndex]])) {\n handleFlatJson(currentObj[subKeys[lastIndex]]);\n }\n }\n }\n return obj;\n}\nfunction getLocaleMessages(locale, options) {\n const { messages, __i18n, messageResolver, flatJson } = options;\n // prettier-ignore\n const ret = (shared.isPlainObject(messages)\n ? messages\n : shared.isArray(__i18n)\n ? shared.create()\n : { [locale]: shared.create() });\n // merge locale messages of i18n custom block\n if (shared.isArray(__i18n)) {\n __i18n.forEach(custom => {\n if ('locale' in custom && 'resource' in custom) {\n const { locale, resource } = custom;\n if (locale) {\n ret[locale] = ret[locale] || shared.create();\n shared.deepCopy(resource, ret[locale]);\n }\n else {\n shared.deepCopy(resource, ret);\n }\n }\n else {\n shared.isString(custom) && shared.deepCopy(JSON.parse(custom), ret);\n }\n });\n }\n // handle messages for flat json\n if (messageResolver == null && flatJson) {\n for (const key in ret) {\n if (shared.hasOwn(ret, key)) {\n handleFlatJson(ret[key]);\n }\n }\n }\n return ret;\n}\nfunction getComponentOptions(instance) {\n return instance.type;\n}\nfunction adjustI18nResources(gl, options, componentOptions) {\n // prettier-ignore\n let messages = shared.isObject(options.messages)\n ? options.messages\n : shared.create();\n if ('__i18nGlobal' in componentOptions) {\n messages = getLocaleMessages(gl.locale.value, {\n messages,\n __i18n: componentOptions.__i18nGlobal\n });\n }\n // merge locale messages\n const locales = Object.keys(messages);\n if (locales.length) {\n locales.forEach(locale => {\n gl.mergeLocaleMessage(locale, messages[locale]);\n });\n }\n {\n // merge datetime formats\n if (shared.isObject(options.datetimeFormats)) {\n const locales = Object.keys(options.datetimeFormats);\n if (locales.length) {\n locales.forEach(locale => {\n gl.mergeDateTimeFormat(locale, options.datetimeFormats[locale]);\n });\n }\n }\n // merge number formats\n if (shared.isObject(options.numberFormats)) {\n const locales = Object.keys(options.numberFormats);\n if (locales.length) {\n locales.forEach(locale => {\n gl.mergeNumberFormat(locale, options.numberFormats[locale]);\n });\n }\n }\n }\n}\nfunction createTextNode(key) {\n return vue.createVNode(vue.Text, null, key, 0);\n}\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n// extend VNode interface\nconst DEVTOOLS_META = '__INTLIFY_META__';\nconst NOOP_RETURN_ARRAY = () => [];\nconst NOOP_RETURN_FALSE = () => false;\nlet composerID = 0;\nfunction defineCoreMissingHandler(missing) {\n return ((ctx, locale, key, type) => {\n return missing(locale, key, vue.getCurrentInstance() || undefined, type);\n });\n}\n// for Intlify DevTools\n/* #__NO_SIDE_EFFECTS__ */\nconst getMetaInfo = () => {\n const instance = vue.getCurrentInstance();\n let meta = null;\n return instance && (meta = getComponentOptions(instance)[DEVTOOLS_META])\n ? { [DEVTOOLS_META]: meta }\n : null;\n};\n/**\n * Create composer interface factory\n *\n * @internal\n */\nfunction createComposer(options = {}) {\n const { __root, __injectWithOption } = options;\n const _isGlobal = __root === undefined;\n const flatJson = options.flatJson;\n const _ref = shared.inBrowser ? vue.ref : vue.shallowRef;\n let _inheritLocale = shared.isBoolean(options.inheritLocale)\n ? options.inheritLocale\n : true;\n const _locale = _ref(\n // prettier-ignore\n __root && _inheritLocale\n ? __root.locale.value\n : shared.isString(options.locale)\n ? options.locale\n : coreBase.DEFAULT_LOCALE);\n const _fallbackLocale = _ref(\n // prettier-ignore\n __root && _inheritLocale\n ? __root.fallbackLocale.value\n : shared.isString(options.fallbackLocale) ||\n shared.isArray(options.fallbackLocale) ||\n shared.isPlainObject(options.fallbackLocale) ||\n options.fallbackLocale === false\n ? options.fallbackLocale\n : _locale.value);\n const _messages = _ref(getLocaleMessages(_locale.value, options));\n // prettier-ignore\n const _datetimeFormats = _ref(shared.isPlainObject(options.datetimeFormats)\n ? options.datetimeFormats\n : { [_locale.value]: {} })\n ;\n // prettier-ignore\n const _numberFormats = _ref(shared.isPlainObject(options.numberFormats)\n ? options.numberFormats\n : { [_locale.value]: {} })\n ;\n // warning suppress options\n // prettier-ignore\n let _missingWarn = __root\n ? __root.missingWarn\n : shared.isBoolean(options.missingWarn) || shared.isRegExp(options.missingWarn)\n ? options.missingWarn\n : true;\n // prettier-ignore\n let _fallbackWarn = __root\n ? __root.fallbackWarn\n : shared.isBoolean(options.fallbackWarn) || shared.isRegExp(options.fallbackWarn)\n ? options.fallbackWarn\n : true;\n // prettier-ignore\n let _fallbackRoot = __root\n ? __root.fallbackRoot\n : shared.isBoolean(options.fallbackRoot)\n ? options.fallbackRoot\n : true;\n // configure fall back to root\n let _fallbackFormat = !!options.fallbackFormat;\n // runtime missing\n let _missing = shared.isFunction(options.missing) ? options.missing : null;\n let _runtimeMissing = shared.isFunction(options.missing)\n ? defineCoreMissingHandler(options.missing)\n : null;\n // postTranslation handler\n let _postTranslation = shared.isFunction(options.postTranslation)\n ? options.postTranslation\n : null;\n // prettier-ignore\n let _warnHtmlMessage = __root\n ? __root.warnHtmlMessage\n : shared.isBoolean(options.warnHtmlMessage)\n ? options.warnHtmlMessage\n : true;\n let _escapeParameter = !!options.escapeParameter;\n // custom linked modifiers\n // prettier-ignore\n const _modifiers = __root\n ? __root.modifiers\n : shared.isPlainObject(options.modifiers)\n ? options.modifiers\n : {};\n // pluralRules\n let _pluralRules = options.pluralRules || (__root && __root.pluralRules);\n // runtime context\n // eslint-disable-next-line prefer-const\n let _context;\n const getCoreContext = () => {\n _isGlobal && coreBase.setFallbackContext(null);\n const ctxOptions = {\n version: VERSION,\n locale: _locale.value,\n fallbackLocale: _fallbackLocale.value,\n messages: _messages.value,\n modifiers: _modifiers,\n pluralRules: _pluralRules,\n missing: _runtimeMissing === null ? undefined : _runtimeMissing,\n missingWarn: _missingWarn,\n fallbackWarn: _fallbackWarn,\n fallbackFormat: _fallbackFormat,\n unresolving: true,\n postTranslation: _postTranslation === null ? undefined : _postTranslation,\n warnHtmlMessage: _warnHtmlMessage,\n escapeParameter: _escapeParameter,\n messageResolver: options.messageResolver,\n messageCompiler: options.messageCompiler,\n __meta: { framework: 'vue' }\n };\n {\n ctxOptions.datetimeFormats = _datetimeFormats.value;\n ctxOptions.numberFormats = _numberFormats.value;\n ctxOptions.__datetimeFormatters = shared.isPlainObject(_context)\n ? _context.__datetimeFormatters\n : undefined;\n ctxOptions.__numberFormatters = shared.isPlainObject(_context)\n ? _context.__numberFormatters\n : undefined;\n }\n const ctx = coreBase.createCoreContext(ctxOptions);\n _isGlobal && coreBase.setFallbackContext(ctx);\n return ctx;\n };\n _context = getCoreContext();\n coreBase.updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);\n // track reactivity\n function trackReactivityValues() {\n return [\n _locale.value,\n _fallbackLocale.value,\n _messages.value,\n _datetimeFormats.value,\n _numberFormats.value\n ]\n ;\n }\n // locale\n const locale = vue.computed({\n get: () => _locale.value,\n set: val => {\n _context.locale = val;\n _locale.value = val;\n }\n });\n // fallbackLocale\n const fallbackLocale = vue.computed({\n get: () => _fallbackLocale.value,\n set: val => {\n _context.fallbackLocale = val;\n _fallbackLocale.value = val;\n coreBase.updateFallbackLocale(_context, _locale.value, val);\n }\n });\n // messages\n const messages = vue.computed(() => _messages.value);\n // datetimeFormats\n const datetimeFormats = /* #__PURE__*/ vue.computed(() => _datetimeFormats.value);\n // numberFormats\n const numberFormats = /* #__PURE__*/ vue.computed(() => _numberFormats.value);\n // getPostTranslationHandler\n function getPostTranslationHandler() {\n return shared.isFunction(_postTranslation) ? _postTranslation : null;\n }\n // setPostTranslationHandler\n function setPostTranslationHandler(handler) {\n _postTranslation = handler;\n _context.postTranslation = handler;\n }\n // getMissingHandler\n function getMissingHandler() {\n return _missing;\n }\n // setMissingHandler\n function setMissingHandler(handler) {\n if (handler !== null) {\n _runtimeMissing = defineCoreMissingHandler(handler);\n }\n _missing = handler;\n _context.missing = _runtimeMissing;\n }\n const wrapWithDeps = (fn, argumentParser, warnType, fallbackSuccess, fallbackFail, successCondition) => {\n trackReactivityValues(); // track reactive dependency\n // NOTE: experimental !!\n let ret;\n try {\n if (false || false) ;\n if (!_isGlobal) {\n _context.fallbackContext = __root\n ? coreBase.getFallbackContext()\n : undefined;\n }\n ret = fn(_context);\n }\n finally {\n if (!_isGlobal) {\n _context.fallbackContext = undefined;\n }\n }\n if ((warnType !== 'translate exists' && // for not `te` (e.g `t`)\n shared.isNumber(ret) &&\n ret === coreBase.NOT_REOSLVED) ||\n (warnType === 'translate exists' && !ret) // for `te`\n ) {\n const [key, arg2] = argumentParser();\n return __root && _fallbackRoot\n ? fallbackSuccess(__root)\n : fallbackFail(key);\n }\n else if (successCondition(ret)) {\n return ret;\n }\n else {\n /* istanbul ignore next */\n throw createI18nError(I18nErrorCodes.UNEXPECTED_RETURN_TYPE);\n }\n };\n // t\n function t(...args) {\n return wrapWithDeps(context => Reflect.apply(coreBase.translate, null, [context, ...args]), () => coreBase.parseTranslateArgs(...args), 'translate', root => Reflect.apply(root.t, root, [...args]), key => key, val => shared.isString(val));\n }\n // rt\n function rt(...args) {\n const [arg1, arg2, arg3] = args;\n if (arg3 && !shared.isObject(arg3)) {\n throw createI18nError(I18nErrorCodes.INVALID_ARGUMENT);\n }\n return t(...[arg1, arg2, shared.assign({ resolvedMessage: true }, arg3 || {})]);\n }\n // d\n function d(...args) {\n return wrapWithDeps(context => Reflect.apply(coreBase.datetime, null, [context, ...args]), () => coreBase.parseDateTimeArgs(...args), 'datetime format', root => Reflect.apply(root.d, root, [...args]), () => coreBase.MISSING_RESOLVE_VALUE, val => shared.isString(val));\n }\n // n\n function n(...args) {\n return wrapWithDeps(context => Reflect.apply(coreBase.number, null, [context, ...args]), () => coreBase.parseNumberArgs(...args), 'number format', root => Reflect.apply(root.n, root, [...args]), () => coreBase.MISSING_RESOLVE_VALUE, val => shared.isString(val));\n }\n // for custom processor\n function normalize(values) {\n return values.map(val => shared.isString(val) || shared.isNumber(val) || shared.isBoolean(val)\n ? createTextNode(String(val))\n : val);\n }\n const interpolate = (val) => val;\n const processor = {\n normalize,\n interpolate,\n type: 'vnode'\n };\n // translateVNode, using for `i18n-t` component\n function translateVNode(...args) {\n return wrapWithDeps(context => {\n let ret;\n const _context = context;\n try {\n _context.processor = processor;\n ret = Reflect.apply(coreBase.translate, null, [_context, ...args]);\n }\n finally {\n _context.processor = null;\n }\n return ret;\n }, () => coreBase.parseTranslateArgs(...args), 'translate', root => root[TranslateVNodeSymbol](...args), key => [createTextNode(key)], val => shared.isArray(val));\n }\n // numberParts, using for `i18n-n` component\n function numberParts(...args) {\n return wrapWithDeps(context => Reflect.apply(coreBase.number, null, [context, ...args]), () => coreBase.parseNumberArgs(...args), 'number format', root => root[NumberPartsSymbol](...args), NOOP_RETURN_ARRAY, val => shared.isString(val) || shared.isArray(val));\n }\n // datetimeParts, using for `i18n-d` component\n function datetimeParts(...args) {\n return wrapWithDeps(context => Reflect.apply(coreBase.datetime, null, [context, ...args]), () => coreBase.parseDateTimeArgs(...args), 'datetime format', root => root[DatetimePartsSymbol](...args), NOOP_RETURN_ARRAY, val => shared.isString(val) || shared.isArray(val));\n }\n function setPluralRules(rules) {\n _pluralRules = rules;\n _context.pluralRules = _pluralRules;\n }\n // te\n function te(key, locale) {\n return wrapWithDeps(() => {\n if (!key) {\n return false;\n }\n const targetLocale = shared.isString(locale) ? locale : _locale.value;\n const message = getLocaleMessage(targetLocale);\n const resolved = _context.messageResolver(message, key);\n return (coreBase.isMessageAST(resolved) ||\n coreBase.isMessageFunction(resolved) ||\n shared.isString(resolved));\n }, () => [key], 'translate exists', root => {\n return Reflect.apply(root.te, root, [key, locale]);\n }, NOOP_RETURN_FALSE, val => shared.isBoolean(val));\n }\n function resolveMessages(key) {\n let messages = null;\n const locales = coreBase.fallbackWithLocaleChain(_context, _fallbackLocale.value, _locale.value);\n for (let i = 0; i < locales.length; i++) {\n const targetLocaleMessages = _messages.value[locales[i]] || {};\n const messageValue = _context.messageResolver(targetLocaleMessages, key);\n if (messageValue != null) {\n messages = messageValue;\n break;\n }\n }\n return messages;\n }\n // tm\n function tm(key) {\n const messages = resolveMessages(key);\n // prettier-ignore\n return messages != null\n ? messages\n : __root\n ? __root.tm(key) || {}\n : {};\n }\n // getLocaleMessage\n function getLocaleMessage(locale) {\n return (_messages.value[locale] || {});\n }\n // setLocaleMessage\n function setLocaleMessage(locale, message) {\n if (flatJson) {\n const _message = { [locale]: message };\n for (const key in _message) {\n if (shared.hasOwn(_message, key)) {\n handleFlatJson(_message[key]);\n }\n }\n message = _message[locale];\n }\n _messages.value[locale] = message;\n _context.messages = _messages.value;\n }\n // mergeLocaleMessage\n function mergeLocaleMessage(locale, message) {\n _messages.value[locale] = _messages.value[locale] || {};\n const _message = { [locale]: message };\n if (flatJson) {\n for (const key in _message) {\n if (shared.hasOwn(_message, key)) {\n handleFlatJson(_message[key]);\n }\n }\n }\n message = _message[locale];\n shared.deepCopy(message, _messages.value[locale]);\n _context.messages = _messages.value;\n }\n // getDateTimeFormat\n function getDateTimeFormat(locale) {\n return _datetimeFormats.value[locale] || {};\n }\n // setDateTimeFormat\n function setDateTimeFormat(locale, format) {\n _datetimeFormats.value[locale] = format;\n _context.datetimeFormats = _datetimeFormats.value;\n coreBase.clearDateTimeFormat(_context, locale, format);\n }\n // mergeDateTimeFormat\n function mergeDateTimeFormat(locale, format) {\n _datetimeFormats.value[locale] = shared.assign(_datetimeFormats.value[locale] || {}, format);\n _context.datetimeFormats = _datetimeFormats.value;\n coreBase.clearDateTimeFormat(_context, locale, format);\n }\n // getNumberFormat\n function getNumberFormat(locale) {\n return _numberFormats.value[locale] || {};\n }\n // setNumberFormat\n function setNumberFormat(locale, format) {\n _numberFormats.value[locale] = format;\n _context.numberFormats = _numberFormats.value;\n coreBase.clearNumberFormat(_context, locale, format);\n }\n // mergeNumberFormat\n function mergeNumberFormat(locale, format) {\n _numberFormats.value[locale] = shared.assign(_numberFormats.value[locale] || {}, format);\n _context.numberFormats = _numberFormats.value;\n coreBase.clearNumberFormat(_context, locale, format);\n }\n // for debug\n composerID++;\n // watch root locale & fallbackLocale\n if (__root && shared.inBrowser) {\n vue.watch(__root.locale, (val) => {\n if (_inheritLocale) {\n _locale.value = val;\n _context.locale = val;\n coreBase.updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);\n }\n });\n vue.watch(__root.fallbackLocale, (val) => {\n if (_inheritLocale) {\n _fallbackLocale.value = val;\n _context.fallbackLocale = val;\n coreBase.updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);\n }\n });\n }\n // define basic composition API!\n const composer = {\n id: composerID,\n locale,\n fallbackLocale,\n get inheritLocale() {\n return _inheritLocale;\n },\n set inheritLocale(val) {\n _inheritLocale = val;\n if (val && __root) {\n _locale.value = __root.locale.value;\n _fallbackLocale.value = __root.fallbackLocale.value;\n coreBase.updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);\n }\n },\n get availableLocales() {\n return Object.keys(_messages.value).sort();\n },\n messages,\n get modifiers() {\n return _modifiers;\n },\n get pluralRules() {\n return _pluralRules || {};\n },\n get isGlobal() {\n return _isGlobal;\n },\n get missingWarn() {\n return _missingWarn;\n },\n set missingWarn(val) {\n _missingWarn = val;\n _context.missingWarn = _missingWarn;\n },\n get fallbackWarn() {\n return _fallbackWarn;\n },\n set fallbackWarn(val) {\n _fallbackWarn = val;\n _context.fallbackWarn = _fallbackWarn;\n },\n get fallbackRoot() {\n return _fallbackRoot;\n },\n set fallbackRoot(val) {\n _fallbackRoot = val;\n },\n get fallbackFormat() {\n return _fallbackFormat;\n },\n set fallbackFormat(val) {\n _fallbackFormat = val;\n _context.fallbackFormat = _fallbackFormat;\n },\n get warnHtmlMessage() {\n return _warnHtmlMessage;\n },\n set warnHtmlMessage(val) {\n _warnHtmlMessage = val;\n _context.warnHtmlMessage = val;\n },\n get escapeParameter() {\n return _escapeParameter;\n },\n set escapeParameter(val) {\n _escapeParameter = val;\n _context.escapeParameter = val;\n },\n t,\n getLocaleMessage,\n setLocaleMessage,\n mergeLocaleMessage,\n getPostTranslationHandler,\n setPostTranslationHandler,\n getMissingHandler,\n setMissingHandler,\n [SetPluralRulesSymbol]: setPluralRules\n };\n {\n composer.datetimeFormats = datetimeFormats;\n composer.numberFormats = numberFormats;\n composer.rt = rt;\n composer.te = te;\n composer.tm = tm;\n composer.d = d;\n composer.n = n;\n composer.getDateTimeFormat = getDateTimeFormat;\n composer.setDateTimeFormat = setDateTimeFormat;\n composer.mergeDateTimeFormat = mergeDateTimeFormat;\n composer.getNumberFormat = getNumberFormat;\n composer.setNumberFormat = setNumberFormat;\n composer.mergeNumberFormat = mergeNumberFormat;\n composer[InejctWithOptionSymbol] = __injectWithOption;\n composer[TranslateVNodeSymbol] = translateVNode;\n composer[DatetimePartsSymbol] = datetimeParts;\n composer[NumberPartsSymbol] = numberParts;\n }\n return composer;\n}\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * Convert to I18n Composer Options from VueI18n Options\n *\n * @internal\n */\nfunction convertComposerOptions(options) {\n const locale = shared.isString(options.locale) ? options.locale : coreBase.DEFAULT_LOCALE;\n const fallbackLocale = shared.isString(options.fallbackLocale) ||\n shared.isArray(options.fallbackLocale) ||\n shared.isPlainObject(options.fallbackLocale) ||\n options.fallbackLocale === false\n ? options.fallbackLocale\n : locale;\n const missing = shared.isFunction(options.missing) ? options.missing : undefined;\n const missingWarn = shared.isBoolean(options.silentTranslationWarn) ||\n shared.isRegExp(options.silentTranslationWarn)\n ? !options.silentTranslationWarn\n : true;\n const fallbackWarn = shared.isBoolean(options.silentFallbackWarn) ||\n shared.isRegExp(options.silentFallbackWarn)\n ? !options.silentFallbackWarn\n : true;\n const fallbackRoot = shared.isBoolean(options.fallbackRoot)\n ? options.fallbackRoot\n : true;\n const fallbackFormat = !!options.formatFallbackMessages;\n const modifiers = shared.isPlainObject(options.modifiers) ? options.modifiers : {};\n const pluralizationRules = options.pluralizationRules;\n const postTranslation = shared.isFunction(options.postTranslation)\n ? options.postTranslation\n : undefined;\n const warnHtmlMessage = shared.isString(options.warnHtmlInMessage)\n ? options.warnHtmlInMessage !== 'off'\n : true;\n const escapeParameter = !!options.escapeParameterHtml;\n const inheritLocale = shared.isBoolean(options.sync) ? options.sync : true;\n let messages = options.messages;\n if (shared.isPlainObject(options.sharedMessages)) {\n const sharedMessages = options.sharedMessages;\n const locales = Object.keys(sharedMessages);\n messages = locales.reduce((messages, locale) => {\n const message = messages[locale] || (messages[locale] = {});\n shared.assign(message, sharedMessages[locale]);\n return messages;\n }, (messages || {}));\n }\n const { __i18n, __root, __injectWithOption } = options;\n const datetimeFormats = options.datetimeFormats;\n const numberFormats = options.numberFormats;\n const flatJson = options.flatJson;\n return {\n locale,\n fallbackLocale,\n messages,\n flatJson,\n datetimeFormats,\n numberFormats,\n missing,\n missingWarn,\n fallbackWarn,\n fallbackRoot,\n fallbackFormat,\n modifiers,\n pluralRules: pluralizationRules,\n postTranslation,\n warnHtmlMessage,\n escapeParameter,\n messageResolver: options.messageResolver,\n inheritLocale,\n __i18n,\n __root,\n __injectWithOption\n };\n}\n/**\n * create VueI18n interface factory\n *\n * @internal\n *\n * @deprecated will be removed at vue-i18n v12\n */\nfunction createVueI18n(options = {}) {\n const composer = createComposer(convertComposerOptions(options));\n const { __extender } = options;\n // defines VueI18n\n const vueI18n = {\n // id\n id: composer.id,\n // locale\n get locale() {\n return composer.locale.value;\n },\n set locale(val) {\n composer.locale.value = val;\n },\n // fallbackLocale\n get fallbackLocale() {\n return composer.fallbackLocale.value;\n },\n set fallbackLocale(val) {\n composer.fallbackLocale.value = val;\n },\n // messages\n get messages() {\n return composer.messages.value;\n },\n // datetimeFormats\n get datetimeFormats() {\n return composer.datetimeFormats.value;\n },\n // numberFormats\n get numberFormats() {\n return composer.numberFormats.value;\n },\n // availableLocales\n get availableLocales() {\n return composer.availableLocales;\n },\n // missing\n get missing() {\n return composer.getMissingHandler();\n },\n set missing(handler) {\n composer.setMissingHandler(handler);\n },\n // silentTranslationWarn\n get silentTranslationWarn() {\n return shared.isBoolean(composer.missingWarn)\n ? !composer.missingWarn\n : composer.missingWarn;\n },\n set silentTranslationWarn(val) {\n composer.missingWarn = shared.isBoolean(val) ? !val : val;\n },\n // silentFallbackWarn\n get silentFallbackWarn() {\n return shared.isBoolean(composer.fallbackWarn)\n ? !composer.fallbackWarn\n : composer.fallbackWarn;\n },\n set silentFallbackWarn(val) {\n composer.fallbackWarn = shared.isBoolean(val) ? !val : val;\n },\n // modifiers\n get modifiers() {\n return composer.modifiers;\n },\n // formatFallbackMessages\n get formatFallbackMessages() {\n return composer.fallbackFormat;\n },\n set formatFallbackMessages(val) {\n composer.fallbackFormat = val;\n },\n // postTranslation\n get postTranslation() {\n return composer.getPostTranslationHandler();\n },\n set postTranslation(handler) {\n composer.setPostTranslationHandler(handler);\n },\n // sync\n get sync() {\n return composer.inheritLocale;\n },\n set sync(val) {\n composer.inheritLocale = val;\n },\n // warnInHtmlMessage\n get warnHtmlInMessage() {\n return composer.warnHtmlMessage ? 'warn' : 'off';\n },\n set warnHtmlInMessage(val) {\n composer.warnHtmlMessage = val !== 'off';\n },\n // escapeParameterHtml\n get escapeParameterHtml() {\n return composer.escapeParameter;\n },\n set escapeParameterHtml(val) {\n composer.escapeParameter = val;\n },\n // pluralizationRules\n get pluralizationRules() {\n return composer.pluralRules || {};\n },\n // for internal\n __composer: composer,\n // t\n t(...args) {\n return Reflect.apply(composer.t, composer, [...args]);\n },\n // rt\n rt(...args) {\n return Reflect.apply(composer.rt, composer, [...args]);\n },\n // te\n te(key, locale) {\n return composer.te(key, locale);\n },\n // tm\n tm(key) {\n return composer.tm(key);\n },\n // getLocaleMessage\n getLocaleMessage(locale) {\n return composer.getLocaleMessage(locale);\n },\n // setLocaleMessage\n setLocaleMessage(locale, message) {\n composer.setLocaleMessage(locale, message);\n },\n // mergeLocaleMessage\n mergeLocaleMessage(locale, message) {\n composer.mergeLocaleMessage(locale, message);\n },\n // d\n d(...args) {\n return Reflect.apply(composer.d, composer, [...args]);\n },\n // getDateTimeFormat\n getDateTimeFormat(locale) {\n return composer.getDateTimeFormat(locale);\n },\n // setDateTimeFormat\n setDateTimeFormat(locale, format) {\n composer.setDateTimeFormat(locale, format);\n },\n // mergeDateTimeFormat\n mergeDateTimeFormat(locale, format) {\n composer.mergeDateTimeFormat(locale, format);\n },\n // n\n n(...args) {\n return Reflect.apply(composer.n, composer, [...args]);\n },\n // getNumberFormat\n getNumberFormat(locale) {\n return composer.getNumberFormat(locale);\n },\n // setNumberFormat\n setNumberFormat(locale, format) {\n composer.setNumberFormat(locale, format);\n },\n // mergeNumberFormat\n mergeNumberFormat(locale, format) {\n composer.mergeNumberFormat(locale, format);\n }\n };\n vueI18n.__extender = __extender;\n return vueI18n;\n}\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\n/**\n * Supports compatibility for legacy vue-i18n APIs\n * This mixin is used when we use vue-i18n@v9.x or later\n */\nfunction defineMixin(vuei18n, composer, i18n) {\n return {\n beforeCreate() {\n const instance = vue.getCurrentInstance();\n /* istanbul ignore if */\n if (!instance) {\n throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);\n }\n const options = this.$options;\n if (options.i18n) {\n const optionsI18n = options.i18n;\n if (options.__i18n) {\n optionsI18n.__i18n = options.__i18n;\n }\n optionsI18n.__root = composer;\n if (this === this.$root) {\n // merge option and gttach global\n this.$i18n = mergeToGlobal(vuei18n, optionsI18n);\n }\n else {\n optionsI18n.__injectWithOption = true;\n optionsI18n.__extender = i18n.__vueI18nExtend;\n // atttach local VueI18n instance\n this.$i18n = createVueI18n(optionsI18n);\n // extend VueI18n instance\n const _vueI18n = this.$i18n;\n if (_vueI18n.__extender) {\n _vueI18n.__disposer = _vueI18n.__extender(this.$i18n);\n }\n }\n }\n else if (options.__i18n) {\n if (this === this.$root) {\n // merge option and gttach global\n this.$i18n = mergeToGlobal(vuei18n, options);\n }\n else {\n // atttach local VueI18n instance\n this.$i18n = createVueI18n({\n __i18n: options.__i18n,\n __injectWithOption: true,\n __extender: i18n.__vueI18nExtend,\n __root: composer\n });\n // extend VueI18n instance\n const _vueI18n = this.$i18n;\n if (_vueI18n.__extender) {\n _vueI18n.__disposer = _vueI18n.__extender(this.$i18n);\n }\n }\n }\n else {\n // attach global VueI18n instance\n this.$i18n = vuei18n;\n }\n if (options.__i18nGlobal) {\n adjustI18nResources(composer, options, options);\n }\n // defines vue-i18n legacy APIs\n this.$t = (...args) => this.$i18n.t(...args);\n this.$rt = (...args) => this.$i18n.rt(...args);\n this.$te = (key, locale) => this.$i18n.te(key, locale);\n this.$d = (...args) => this.$i18n.d(...args);\n this.$n = (...args) => this.$i18n.n(...args);\n this.$tm = (key) => this.$i18n.tm(key);\n i18n.__setInstance(instance, this.$i18n);\n },\n mounted() {\n },\n unmounted() {\n const instance = vue.getCurrentInstance();\n /* istanbul ignore if */\n if (!instance) {\n throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);\n }\n const _vueI18n = this.$i18n;\n delete this.$t;\n delete this.$rt;\n delete this.$te;\n delete this.$d;\n delete this.$n;\n delete this.$tm;\n if (_vueI18n.__disposer) {\n _vueI18n.__disposer();\n delete _vueI18n.__disposer;\n delete _vueI18n.__extender;\n }\n i18n.__deleteInstance(instance);\n delete this.$i18n;\n }\n };\n}\nfunction mergeToGlobal(g, options) {\n g.locale = options.locale || g.locale;\n g.fallbackLocale = options.fallbackLocale || g.fallbackLocale;\n g.missing = options.missing || g.missing;\n g.silentTranslationWarn =\n options.silentTranslationWarn || g.silentFallbackWarn;\n g.silentFallbackWarn = options.silentFallbackWarn || g.silentFallbackWarn;\n g.formatFallbackMessages =\n options.formatFallbackMessages || g.formatFallbackMessages;\n g.postTranslation = options.postTranslation || g.postTranslation;\n g.warnHtmlInMessage = options.warnHtmlInMessage || g.warnHtmlInMessage;\n g.escapeParameterHtml = options.escapeParameterHtml || g.escapeParameterHtml;\n g.sync = options.sync || g.sync;\n g.__composer[SetPluralRulesSymbol](options.pluralizationRules || g.pluralizationRules);\n const messages = getLocaleMessages(g.locale, {\n messages: options.messages,\n __i18n: options.__i18n\n });\n Object.keys(messages).forEach(locale => g.mergeLocaleMessage(locale, messages[locale]));\n if (options.datetimeFormats) {\n Object.keys(options.datetimeFormats).forEach(locale => g.mergeDateTimeFormat(locale, options.datetimeFormats[locale]));\n }\n if (options.numberFormats) {\n Object.keys(options.numberFormats).forEach(locale => g.mergeNumberFormat(locale, options.numberFormats[locale]));\n }\n return g;\n}\n\nconst baseFormatProps = {\n tag: {\n type: [String, Object]\n },\n locale: {\n type: String\n },\n scope: {\n type: String,\n // NOTE: avoid https://github.com/microsoft/rushstack/issues/1050\n validator: (val /* ComponentI18nScope */) => val === 'parent' || val === 'global',\n default: 'parent' /* ComponentI18nScope */\n },\n i18n: {\n type: Object\n }\n};\n\nfunction getInterpolateArg(\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n{ slots }, // SetupContext,\nkeys) {\n if (keys.length === 1 && keys[0] === 'default') {\n // default slot with list\n const ret = slots.default ? slots.default() : [];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return ret.reduce((slot, current) => {\n return [\n ...slot,\n // prettier-ignore\n ...(current.type === vue.Fragment ? current.children : [current])\n ];\n }, []);\n }\n else {\n // named slots\n return keys.reduce((arg, key) => {\n const slot = slots[key];\n if (slot) {\n arg[key] = slot();\n }\n return arg;\n }, shared.create());\n }\n}\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getFragmentableTag() {\n return vue.Fragment;\n}\n\nconst TranslationImpl = /*#__PURE__*/ vue.defineComponent({\n /* eslint-disable */\n name: 'i18n-t',\n props: shared.assign({\n keypath: {\n type: String,\n required: true\n },\n plural: {\n type: [Number, String],\n validator: (val) => shared.isNumber(val) || !isNaN(val)\n }\n }, baseFormatProps),\n /* eslint-enable */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n setup(props, context) {\n const { slots, attrs } = context;\n // NOTE: avoid https://github.com/microsoft/rushstack/issues/1050\n const i18n = props.i18n ||\n useI18n({\n useScope: props.scope,\n __useComponent: true\n });\n return () => {\n const keys = Object.keys(slots).filter(key => key !== '_');\n const options = shared.create();\n if (props.locale) {\n options.locale = props.locale;\n }\n if (props.plural !== undefined) {\n options.plural = shared.isString(props.plural) ? +props.plural : props.plural;\n }\n const arg = getInterpolateArg(context, keys);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const children = i18n[TranslateVNodeSymbol](props.keypath, arg, options);\n const assignedAttrs = shared.assign(shared.create(), attrs);\n const tag = shared.isString(props.tag) || shared.isObject(props.tag)\n ? props.tag\n : getFragmentableTag();\n return vue.h(tag, assignedAttrs, children);\n };\n }\n});\n/**\n * export the public type for h/tsx inference\n * also to avoid inline import() in generated d.ts files\n */\n/**\n * Translation Component\n *\n * @remarks\n * See the following items for property about details\n *\n * @VueI18nSee [TranslationProps](component#translationprops)\n * @VueI18nSee [BaseFormatProps](component#baseformatprops)\n * @VueI18nSee [Component Interpolation](../guide/advanced/component)\n *\n * @example\n * ```html\n * <div id=\"app\">\n * <!-- ... -->\n * <i18n keypath=\"term\" tag=\"label\" for=\"tos\">\n * <a :href=\"url\" target=\"_blank\">{{ $t('tos') }}</a>\n * </i18n>\n * <!-- ... -->\n * </div>\n * ```\n * ```js\n * import { createApp } from 'vue'\n * import { createI18n } from 'vue-i18n'\n *\n * const messages = {\n * en: {\n * tos: 'Term of Service',\n * term: 'I accept xxx {0}.'\n * },\n * ja: {\n * tos: '利用規約',\n * term: '私は xxx の{0}に同意します。'\n * }\n * }\n *\n * const i18n = createI18n({\n * locale: 'en',\n * messages\n * })\n *\n * const app = createApp({\n * data: {\n * url: '/term'\n * }\n * }).use(i18n).mount('#app')\n * ```\n *\n * @VueI18nComponent\n */\nconst Translation = TranslationImpl;\nconst I18nT = Translation;\n\nfunction isVNode(target) {\n return shared.isArray(target) && !shared.isString(target[0]);\n}\nfunction renderFormatter(props, context, slotKeys, partFormatter) {\n const { slots, attrs } = context;\n return () => {\n const options = { part: true };\n let overrides = shared.create();\n if (props.locale) {\n options.locale = props.locale;\n }\n if (shared.isString(props.format)) {\n options.key = props.format;\n }\n else if (shared.isObject(props.format)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (shared.isString(props.format.key)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n options.key = props.format.key;\n }\n // Filter out number format options only\n overrides = Object.keys(props.format).reduce((options, prop) => {\n return slotKeys.includes(prop)\n ? shared.assign(shared.create(), options, { [prop]: props.format[prop] }) // eslint-disable-line @typescript-eslint/no-explicit-any\n : options;\n }, shared.create());\n }\n const parts = partFormatter(...[props.value, options, overrides]);\n let children = [options.key];\n if (shared.isArray(parts)) {\n children = parts.map((part, index) => {\n const slot = slots[part.type];\n const node = slot\n ? slot({ [part.type]: part.value, index, parts })\n : [part.value];\n if (isVNode(node)) {\n node[0].key = `${part.type}-${index}`;\n }\n return node;\n });\n }\n else if (shared.isString(parts)) {\n children = [parts];\n }\n const assignedAttrs = shared.assign(shared.create(), attrs);\n const tag = shared.isString(props.tag) || shared.isObject(props.tag)\n ? props.tag\n : getFragmentableTag();\n return vue.h(tag, assignedAttrs, children);\n };\n}\n\nconst NumberFormatImpl = /*#__PURE__*/ vue.defineComponent({\n /* eslint-disable */\n name: 'i18n-n',\n props: shared.assign({\n value: {\n type: Number,\n required: true\n },\n format: {\n type: [String, Object]\n }\n }, baseFormatProps),\n /* eslint-enable */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n setup(props, context) {\n const i18n = props.i18n ||\n useI18n({\n useScope: props.scope,\n __useComponent: true\n });\n return renderFormatter(props, context, coreBase.NUMBER_FORMAT_OPTIONS_KEYS, (...args) => \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n i18n[NumberPartsSymbol](...args));\n }\n});\n/**\n * export the public type for h/tsx inference\n * also to avoid inline import() in generated d.ts files\n */\n/**\n * Number Format Component\n *\n * @remarks\n * See the following items for property about details\n *\n * @VueI18nSee [FormattableProps](component#formattableprops)\n * @VueI18nSee [BaseFormatProps](component#baseformatprops)\n * @VueI18nSee [Custom Formatting](../guide/essentials/number#custom-formatting)\n *\n * @VueI18nDanger\n * Not supported IE, due to no support `Intl.NumberFormat#formatToParts` in [IE](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/formatToParts)\n *\n * If you want to use it, you need to use [polyfill](https://github.com/formatjs/formatjs/tree/main/packages/intl-numberformat)\n *\n * @VueI18nComponent\n */\nconst NumberFormat = NumberFormatImpl;\nconst I18nN = NumberFormat;\n\nfunction getComposer$1(i18n, instance) {\n const i18nInternal = i18n;\n if (i18n.mode === 'composition') {\n return (i18nInternal.__getInstance(instance) || i18n.global);\n }\n else {\n const vueI18n = i18nInternal.__getInstance(instance);\n return vueI18n != null\n ? vueI18n.__composer\n : i18n.global.__composer;\n }\n}\n/**\n * @deprecated will be removed at vue-i18n v12\n */\nfunction vTDirective(i18n) {\n const _process = (binding) => {\n const { instance, value } = binding;\n /* istanbul ignore if */\n if (!instance || !instance.$) {\n throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);\n }\n const composer = getComposer$1(i18n, instance.$);\n const parsedValue = parseValue(value);\n return [\n Reflect.apply(composer.t, composer, [...makeParams(parsedValue)]),\n composer\n ];\n };\n const register = (el, binding) => {\n const [textContent, composer] = _process(binding);\n if (shared.inBrowser && i18n.global === composer) {\n // global scope only\n el.__i18nWatcher = vue.watch(composer.locale, () => {\n binding.instance && binding.instance.$forceUpdate();\n });\n }\n el.__composer = composer;\n el.textContent = textContent;\n };\n const unregister = (el) => {\n if (shared.inBrowser && el.__i18nWatcher) {\n el.__i18nWatcher();\n el.__i18nWatcher = undefined;\n delete el.__i18nWatcher;\n }\n if (el.__composer) {\n el.__composer = undefined;\n delete el.__composer;\n }\n };\n const update = (el, { value }) => {\n if (el.__composer) {\n const composer = el.__composer;\n const parsedValue = parseValue(value);\n el.textContent = Reflect.apply(composer.t, composer, [\n ...makeParams(parsedValue)\n ]);\n }\n };\n const getSSRProps = (binding) => {\n const [textContent] = _process(binding);\n return { textContent };\n };\n return {\n created: register,\n unmounted: unregister,\n beforeUpdate: update,\n getSSRProps\n };\n}\nfunction parseValue(value) {\n if (shared.isString(value)) {\n return { path: value };\n }\n else if (shared.isPlainObject(value)) {\n if (!('path' in value)) {\n throw createI18nError(I18nErrorCodes.REQUIRED_VALUE, 'path');\n }\n return value;\n }\n else {\n throw createI18nError(I18nErrorCodes.INVALID_VALUE);\n }\n}\nfunction makeParams(value) {\n const { path, locale, args, choice, plural } = value;\n const options = {};\n const named = args || {};\n if (shared.isString(locale)) {\n options.locale = locale;\n }\n if (shared.isNumber(choice)) {\n options.plural = choice;\n }\n if (shared.isNumber(plural)) {\n options.plural = plural;\n }\n return [path, named, options];\n}\n\nfunction apply(app, i18n, ...options) {\n const pluginOptions = shared.isPlainObject(options[0])\n ? options[0]\n : {};\n const globalInstall = shared.isBoolean(pluginOptions.globalInstall)\n ? pluginOptions.globalInstall\n : true;\n if (globalInstall) {\n [Translation.name, 'I18nT'].forEach(name => app.component(name, Translation));\n [NumberFormat.name, 'I18nN'].forEach(name => app.component(name, NumberFormat));\n [DatetimeFormat.name, 'I18nD'].forEach(name => app.component(name, DatetimeFormat));\n }\n // install directive\n {\n app.directive('t', vTDirective(i18n));\n }\n}\n\n/**\n * Injection key for {@link useI18n}\n *\n * @remarks\n * The global injection key for I18n instances with `useI18n`. this injection key is used in Web Components.\n * Specify the i18n instance created by {@link createI18n} together with `provide` function.\n *\n * @VueI18nGeneral\n */\nconst I18nInjectionKey = \n/* #__PURE__*/ shared.makeSymbol('global-vue-i18n');\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction createI18n(options = {}) {\n // prettier-ignore\n const __legacyMode = shared.isBoolean(options.legacy)\n ? options.legacy\n : true;\n // prettier-ignore\n const __globalInjection = shared.isBoolean(options.globalInjection)\n ? options.globalInjection\n : true;\n const __instances = new Map();\n const [globalScope, __global] = createGlobal(options, __legacyMode);\n const symbol = /* #__PURE__*/ shared.makeSymbol('');\n function __getInstance(component) {\n return __instances.get(component) || null;\n }\n function __setInstance(component, instance) {\n __instances.set(component, instance);\n }\n function __deleteInstance(component) {\n __instances.delete(component);\n }\n const i18n = {\n // mode\n get mode() {\n return __legacyMode\n ? 'legacy'\n : 'composition';\n },\n // install plugin\n async install(app, ...options) {\n // setup global provider\n app.__VUE_I18N_SYMBOL__ = symbol;\n app.provide(app.__VUE_I18N_SYMBOL__, i18n);\n // set composer & vuei18n extend hook options from plugin options\n if (shared.isPlainObject(options[0])) {\n const opts = options[0];\n i18n.__composerExtend =\n opts.__composerExtend;\n i18n.__vueI18nExtend =\n opts.__vueI18nExtend;\n }\n // global method and properties injection for Composition API\n let globalReleaseHandler = null;\n if (!__legacyMode && __globalInjection) {\n globalReleaseHandler = injectGlobalFields(app, i18n.global);\n }\n // install built-in components and directive\n {\n apply(app, i18n, ...options);\n }\n // setup mixin for Legacy API\n if (__legacyMode) {\n app.mixin(defineMixin(__global, __global.__composer, i18n));\n }\n // release global scope\n const unmountApp = app.unmount;\n app.unmount = () => {\n globalReleaseHandler && globalReleaseHandler();\n i18n.dispose();\n unmountApp();\n };\n },\n // global accessor\n get global() {\n return __global;\n },\n dispose() {\n globalScope.stop();\n },\n // @internal\n __instances,\n // @internal\n __getInstance,\n // @internal\n __setInstance,\n // @internal\n __deleteInstance\n };\n return i18n;\n}\nfunction useI18n(options = {}) {\n const instance = vue.getCurrentInstance();\n if (instance == null) {\n throw createI18nError(I18nErrorCodes.MUST_BE_CALL_SETUP_TOP);\n }\n if (!instance.isCE &&\n instance.appContext.app != null &&\n !instance.appContext.app.__VUE_I18N_SYMBOL__) {\n throw createI18nError(I18nErrorCodes.NOT_INSTALLED);\n }\n const i18n = getI18nInstance(instance);\n const gl = getGlobalComposer(i18n);\n const componentOptions = getComponentOptions(instance);\n const scope = getScope(options, componentOptions);\n if (scope === 'global') {\n adjustI18nResources(gl, options, componentOptions);\n return gl;\n }\n if (scope === 'parent') {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let composer = getComposer(i18n, instance, options.__useComponent);\n if (composer == null) {\n composer = gl;\n }\n return composer;\n }\n const i18nInternal = i18n;\n let composer = i18nInternal.__getInstance(instance);\n if (composer == null) {\n const composerOptions = shared.assign({}, options);\n if ('__i18n' in componentOptions) {\n composerOptions.__i18n = componentOptions.__i18n;\n }\n if (gl) {\n composerOptions.__root = gl;\n }\n composer = createComposer(composerOptions);\n if (i18nInternal.__composerExtend) {\n composer[DisposeSymbol] =\n i18nInternal.__composerExtend(composer);\n }\n setupLifeCycle(i18nInternal, instance, composer);\n i18nInternal.__setInstance(instance, composer);\n }\n return composer;\n}\nfunction createGlobal(options, legacyMode) {\n const scope = vue.effectScope();\n const obj = legacyMode\n ? scope.run(() => createVueI18n(options))\n : scope.run(() => createComposer(options));\n if (obj == null) {\n throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);\n }\n return [scope, obj];\n}\nfunction getI18nInstance(instance) {\n const i18n = vue.inject(!instance.isCE\n ? instance.appContext.app.__VUE_I18N_SYMBOL__\n : I18nInjectionKey);\n /* istanbul ignore if */\n if (!i18n) {\n throw createI18nError(!instance.isCE\n ? I18nErrorCodes.UNEXPECTED_ERROR\n : I18nErrorCodes.NOT_INSTALLED_WITH_PROVIDE);\n }\n return i18n;\n}\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getScope(options, componentOptions) {\n // prettier-ignore\n return shared.isEmptyObject(options)\n ? ('__i18n' in componentOptions)\n ? 'local'\n : 'global'\n : !options.useScope\n ? 'local'\n : options.useScope;\n}\nfunction getGlobalComposer(i18n) {\n // prettier-ignore\n return i18n.mode === 'composition'\n ? i18n.global\n : i18n.global.__composer;\n}\nfunction getComposer(i18n, target, useComponent = false) {\n let composer = null;\n const root = target.root;\n let current = getParentComponentInstance(target, useComponent);\n while (current != null) {\n const i18nInternal = i18n;\n if (i18n.mode === 'composition') {\n composer = i18nInternal.__getInstance(current);\n }\n else {\n {\n const vueI18n = i18nInternal.__getInstance(current);\n if (vueI18n != null) {\n composer = vueI18n\n .__composer;\n if (useComponent &&\n composer &&\n !composer[InejctWithOptionSymbol] // eslint-disable-line @typescript-eslint/no-explicit-any\n ) {\n composer = null;\n }\n }\n }\n }\n if (composer != null) {\n break;\n }\n if (root === current) {\n break;\n }\n current = current.parent;\n }\n return composer;\n}\nfunction getParentComponentInstance(target, useComponent = false) {\n if (target == null) {\n return null;\n }\n // if `useComponent: true` will be specified, we get lexical scope owner instance for use-case slots\n return !useComponent\n ? target.parent\n : target.vnode.ctx || target.parent; // eslint-disable-line @typescript-eslint/no-explicit-any\n}\nfunction setupLifeCycle(i18n, target, composer) {\n vue.onMounted(() => {\n }, target);\n vue.onUnmounted(() => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const _composer = composer;\n i18n.__deleteInstance(target);\n // dispose extended resources\n const dispose = _composer[DisposeSymbol];\n if (dispose) {\n dispose();\n delete _composer[DisposeSymbol];\n }\n }, target);\n}\nconst globalExportProps = [\n 'locale',\n 'fallbackLocale',\n 'availableLocales'\n];\nconst globalExportMethods = ['t', 'rt', 'd', 'n', 'tm', 'te']\n ;\nfunction injectGlobalFields(app, composer) {\n const i18n = Object.create(null);\n globalExportProps.forEach(prop => {\n const desc = Object.getOwnPropertyDescriptor(composer, prop);\n if (!desc) {\n throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);\n }\n const wrap = vue.isRef(desc.value) // check computed props\n ? {\n get() {\n return desc.value.value;\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n set(val) {\n desc.value.value = val;\n }\n }\n : {\n get() {\n return desc.get && desc.get();\n }\n };\n Object.defineProperty(i18n, prop, wrap);\n });\n app.config.globalProperties.$i18n = i18n;\n globalExportMethods.forEach(method => {\n const desc = Object.getOwnPropertyDescriptor(composer, method);\n if (!desc || !desc.value) {\n throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);\n }\n Object.defineProperty(app.config.globalProperties, `$${method}`, desc);\n });\n const dispose = () => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n delete app.config.globalProperties.$i18n;\n globalExportMethods.forEach(method => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n delete app.config.globalProperties[`$${method}`];\n });\n };\n return dispose;\n}\n\nconst DatetimeFormatImpl = /* #__PURE__*/ vue.defineComponent({\n /* eslint-disable */\n name: 'i18n-d',\n props: shared.assign({\n value: {\n type: [Number, Date],\n required: true\n },\n format: {\n type: [String, Object]\n }\n }, baseFormatProps),\n /* eslint-enable */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n setup(props, context) {\n const i18n = props.i18n ||\n useI18n({\n useScope: props.scope,\n __useComponent: true\n });\n return renderFormatter(props, context, coreBase.DATETIME_FORMAT_OPTIONS_KEYS, (...args) => \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n i18n[DatetimePartsSymbol](...args));\n }\n});\n/**\n * Datetime Format Component\n *\n * @remarks\n * See the following items for property about details\n *\n * @VueI18nSee [FormattableProps](component#formattableprops)\n * @VueI18nSee [BaseFormatProps](component#baseformatprops)\n * @VueI18nSee [Custom Formatting](../guide/essentials/datetime#custom-formatting)\n *\n * @VueI18nDanger\n * Not supported IE, due to no support `Intl.DateTimeFormat#formatToParts` in [IE](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/formatToParts)\n *\n * If you want to use it, you need to use [polyfill](https://github.com/formatjs/formatjs/tree/main/packages/intl-datetimeformat)\n *\n * @VueI18nComponent\n */\nconst DatetimeFormat = DatetimeFormatImpl;\nconst I18nD = DatetimeFormat;\n\n// register message compiler at vue-i18n\ncoreBase.registerMessageCompiler(coreBase.compile);\n// register message resolver at vue-i18n\ncoreBase.registerMessageResolver(coreBase.resolveValue);\n// register fallback locale at vue-i18n\ncoreBase.registerLocaleFallbacker(coreBase.fallbackWithLocaleChain);\n\nexports.DatetimeFormat = DatetimeFormat;\nexports.I18nD = I18nD;\nexports.I18nInjectionKey = I18nInjectionKey;\nexports.I18nN = I18nN;\nexports.I18nT = I18nT;\nexports.NumberFormat = NumberFormat;\nexports.Translation = Translation;\nexports.VERSION = VERSION;\nexports.createI18n = createI18n;\nexports.useI18n = useI18n;\nexports.vTDirective = vTDirective;\n","import { pinkLog, redLog } from '@/views/setting/util';\nimport { acquireVsCodeApi, electronApi, getPlatform } from './platform';\n\nexport interface VSCodeMessage {\n\tcommand: string;\n\tdata?: unknown;\n\tcallbackId?: string;\n}\n\nexport interface RestFulResponse {\n\tcode: number;\n\tmsg: any;\n}\n\nexport type MessageHandler = (message: VSCodeMessage) => void;\nexport type CommandHandler = (data: any) => void;\n\ninterface AddCommandListenerOption {\n\tonce: boolean // 只调用一次就销毁\n}\n\nexport class MessageBridge {\n\tprivate ws: WebSocket | null = null;\n\tprivate handlers = new Map<string, Set<CommandHandler>>();\n\tprivate isConnected: Promise<boolean> | null = null;\n\n\tconstructor(\n\t\tprivate setupSignature: any\n\t) {\n\n\t\tconst platform = getPlatform();\n\n\t\tswitch (platform) {\n\t\t\tcase 'vscode':\n\t\t\t\tthis.setupVsCodeListener();\n\t\t\t\tpinkLog('当前模式: vscode');\n\t\t\t\tbreak;\n\n\t\t\tcase 'electron':\n\t\t\t\tthis.setupElectronListener();\n\t\t\t\tpinkLog('当前模式: electron');\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'nodejs':\n\t\t\t\tthis.setupNodejsListener();\n\t\t\t\tpinkLog('当前模式: nodejs');\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'web':\n\t\t\t\tthis.setupWebSocket();\n\t\t\t\tpinkLog('当前模式: web');\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\t// VS Code 环境监听\n\tprivate setupVsCodeListener() {\n\t\tconst vscode = acquireVsCodeApi();\n\n\t\twindow.addEventListener('message', (event: MessageEvent<VSCodeMessage>) => {\n\t\t\tthis.dispatchMessage(event.data);\n\t\t});\n\n\t\tthis.postMessage = (message) => vscode.postMessage(message);\n\t}\n\n\t// WebSocket 环境连接\n\tprivate setupWebSocket() {\n\n\t\tconst wsUrl = this.setupSignature;\n\n\t\tif (typeof wsUrl !== 'string') {\n\t\t\tthrow new Error('setupSignature must be a string');\n\t\t}\n\n\t\tthis.ws = new WebSocket(wsUrl);\n\n\t\tthis.ws.onmessage = (event) => {\n\t\t\ttry {\t\t\t\t\n\t\t\t\tconst message = JSON.parse(event.data) as VSCodeMessage;\n\t\t\t\tthis.dispatchMessage(message);\n\t\t\t} catch (err) {\n\t\t\t\tconsole.error('Message parse error:', err);\n\t\t\t\tconsole.log(event);\n\t\t\t}\n\t\t};\n\n\t\tthis.ws.onclose = () => {\n\t\t\tredLog('WebSocket connection closed');\n\t\t};\n\n\t\tthis.postMessage = (message) => {\n\t\t\tif (this.ws?.readyState === WebSocket.OPEN) {\n\t\t\t\tconsole.log('send', message);\n\t\t\t\tthis.ws.send(JSON.stringify(message));\n\t\t\t}\n\t\t};\n\n\t\tconst ws = this.ws;\n\n\t\tthis.isConnected = new Promise<boolean>((resolve, reject) => {\n\t\t\tws.onopen = () => {\n\t\t\t\tresolve(true);\n\t\t\t};\n\t\t});\n\t}\n\n\tpublic async awaitForWebsockt() {\n\t\tif (this.isConnected) {\n\t\t\tawait this.isConnected;\n\t\t}\n\t}\n\n\tprivate setupElectronListener() {\n\t\telectronApi.onReply((event: MessageEvent<VSCodeMessage>) => {\n\t\t\tconsole.log(event);\n\t\t\tthis.dispatchMessage(event.data);\n\t\t});\n\n\t\tthis.postMessage = (message) => {\n\t\t\tconsole.log(message);\n\t\t\telectronApi.sendToMain(message);\n\t\t};\t\t\n\t}\n\n\tprivate setupNodejsListener() {\n\t\t\n\t\tconst emitter = this.setupSignature;\n\t\tif (!emitter.on || !emitter.emit) {\n\t\t\treturn;\n\t\t}\n\n\t\temitter.on('message/service', (message: VSCodeMessage) => {\n\t\t\tthis.dispatchMessage(message);\n\t\t});\n\n\t\tthis.postMessage = (message) => {\n\t\t\temitter.emit('message/renderer', message);\n\t\t};\n\t}\n\n\t/**\n\t * @description 对 message 发起调度,根据 command 类型获取调取器\n\t * @param message \n\t */\n\tprivate dispatchMessage(message: VSCodeMessage) {\n\t\tconst command = message.command;\n\t\tconst data = message.data;\n\n\t\tconst handlers = this.handlers.get(command) || [];\n\t\thandlers.forEach(handler => handler(data));\n\t}\n\n\tpublic postMessage(message: VSCodeMessage) {\n\t\tthrow new Error('PostMessage not initialized');\n\t}\n\n\t/**\n\t * @description 注册一个命令的执行器(支持一次性或持久监听)\n\t * @example\n\t * // 基本用法(持久监听)\n\t * const removeListener = bridge.addCommandListener('message', (data) => {\n\t * console.log('收到消息:', data.msg.text);\n\t * }, { once: false });\n\t * \n\t * // 稍后取消监听\n\t * removeListener();\n\t * \n\t * @example\n\t * // 一次性监听(自动移除)\n\t * bridge.addCommandListener('connect', (data) => {\n\t * const { code, msg } = data;\n\t * console.log(`连接结果: ${code === 200 ? '成功' : '失败'}`);\n\t * }, { once: true });\n\t */\n\tpublic addCommandListener(\n\t\tcommand: string,\n\t\tcommandHandler: CommandHandler,\n\t\toption: AddCommandListenerOption\n\t): () => boolean {\n\t\tif (!this.handlers.has(command)) {\n\t\t\tthis.handlers.set(command, new Set<CommandHandler>());\n\t\t}\n\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\tconst commandHandlers = this.handlers.get(command)!;\n\n\t\tconst wrapperCommandHandler = option.once ? (data: any) => {\n\t\t\tcommandHandler(data);\n\t\t\tcommandHandlers.delete(wrapperCommandHandler);\n\t\t} : commandHandler;\n\n\t\tcommandHandlers.add(wrapperCommandHandler);\n\t\treturn () => commandHandlers.delete(wrapperCommandHandler);\n\t}\n\n\t/**\n\t * @description do as axios does\n\t * @param command \n\t * @param data \n\t * @returns \n\t */\n\tpublic commandRequest(command: string, data?: any) {\n\t\treturn new Promise<RestFulResponse>((resolve, reject) => {\n\t\t\tthis.addCommandListener(command, (data) => {\n\t\t\t\tresolve(data as RestFulResponse);\n\t\t\t}, { once: true });\n\n\t\t\tthis.postMessage({\n\t\t\t\tcommand,\n\t\t\t\tdata\n\t\t\t});\n\t\t});\n\t}\n\n\tpublic destroy() {\n\t\tthis.ws?.close();\n\t\tthis.handlers.clear();\n\t}\n}\n\n// 单例实例\nlet messageBridge: MessageBridge;\n\n// 向外暴露一个独立函数,保证 MessageBridge 是单例的\nexport function useMessageBridge() {\n\tif (!messageBridge) {\n\t\tmessageBridge = new MessageBridge('ws://localhost:8080');\n\t}\n\tconst bridge = messageBridge;\n\n\treturn bridge;\n}","export type OpenMcpSupportPlatform = 'web' | 'vscode' | 'electron' | 'nodejs';\n\nexport const acquireVsCodeApi = (window as any)['acquireVsCodeApi'];\nexport const electronApi = (window as any)['electronApi'];\nexport const isNodejs = (window as any)['nodejs'];\n\nexport function getPlatform(): OpenMcpSupportPlatform {\n if (acquireVsCodeApi) {\n return 'vscode';\n } else if (electronApi) {\n return 'electron';\n } else if (isNodejs) {\n return 'nodejs';\n } else {\n return 'web';\n }\n}","import type { ToolCallContent, ToolItem } from \"@/hook/type\";\nimport { Ref, ref } from \"vue\";\n\nimport type { OpenAI } from 'openai';\ntype ChatCompletionChunk = OpenAI.Chat.Completions.ChatCompletionChunk;\n\nexport enum MessageState {\n ServerError = 'server internal error',\n ReceiveChunkError = 'receive chunk error',\n Timeout = 'timeout',\n MaxEpochs = 'max epochs',\n Unknown = 'unknown error',\n Abort = 'abort',\n ToolCall = 'tool call failed',\n None = 'none',\n Success = 'success',\n ParseJsonError = 'parse json error'\n}\n\nexport interface IExtraInfo {\n created: number,\n state: MessageState,\n serverName: string,\n usage?: ChatCompletionChunk['usage'];\n [key: string]: any;\n}\n\nexport interface ToolMessage {\n role: 'tool';\n index: number;\n content: ToolCallContent[];\n tool_call_id?: string\n name?: string // 工具名称,当 role 为 tool\n tool_calls?: ToolCall[],\n extraInfo: IExtraInfo\n}\n\nexport interface TextMessage {\n role: 'user' | 'assistant' | 'system';\n content: string;\n tool_call_id?: string\n name?: string // 工具名称,当 role 为 tool\n tool_calls?: ToolCall[],\n extraInfo: IExtraInfo\n}\n\nexport type ChatMessage = ToolMessage | TextMessage;\n\n// 新增状态和工具数据\ninterface EnableToolItem {\n\tname: string;\n\tdescription: string;\n\tenabled: boolean;\n inputSchema?: any;\n}\n\nexport interface ChatSetting {\n modelIndex: number\n systemPrompt: string\n enableTools: EnableToolItem[]\n temperature: number\n enableWebSearch: boolean\n contextLength: number\n}\n\nexport interface ChatStorage {\n\tmessages: ChatMessage[]\n settings: ChatSetting\n}\n\nexport interface ToolCall {\n id?: string;\n index?: number;\n type: string;\n function: {\n name: string;\n arguments: string;\n }\n}\n\ninterface PromptTextItem {\n type: 'prompt'\n text: string\n}\n\ninterface ResourceTextItem {\n type: 'resource'\n text: string\n}\n\ninterface TextItem {\n type: 'text'\n text: string\n}\n\nexport type RichTextItem = PromptTextItem | ResourceTextItem | TextItem;\n\nexport const allTools = ref<ToolItem[]>([]);\n\nexport interface ICommonRenderMessage {\n role: 'user' | 'assistant/content';\n content: string;\n showJson?: Ref<boolean>;\n extraInfo: IExtraInfo;\n}\n\nexport interface IToolRenderMessage {\n role: 'assistant/tool_calls';\n content: string;\n toolResults: ToolCallContent[][];\n tool_calls: ToolCall[];\n showJson?: Ref<boolean>;\n extraInfo: IExtraInfo; \n}\n\nexport type IRenderMessage = ICommonRenderMessage | IToolRenderMessage;\n\nexport function getToolSchema(enableTools: EnableToolItem[]) {\n const toolsSchema = [];\n\tfor (let i = 0; i < enableTools.length; i++) {\n const enableTool = enableTools[i];\n\n if (enableTool.enabled) {\n\n if (enableTool.inputSchema) {\n toolsSchema.push({\n type: 'function',\n function: {\n name: enableTool.name,\n description: enableTool.description || \"\",\n parameters: enableTool.inputSchema\n }\n });\n } else {\n const tool = allTools.value[i];\n\t\t\t\n toolsSchema.push({\n type: 'function',\n function: {\n name: tool.name,\n description: tool.description || \"\",\n parameters: tool.inputSchema\n }\n });\n }\n\t\t}\n\t}\n return toolsSchema;\n}\n\nexport interface EditorContext {\n editor: Ref<HTMLDivElement>;\n [key: string]: any;\n}","import { ToolCallResponse } from \"@/hook/type\";\nimport { callTool } from \"../../tool/tools\";\nimport { MessageState, ToolCall } from \"../chat-box/chat\";\n\nexport async function handleToolCalls(toolCall: ToolCall) {\n // 反序列化 streaming 来的参数字符串\n const toolName = toolCall.function.name;\n const argsResult = deserializeToolCallResponse(toolCall.function.arguments);\n \n if (argsResult.error) {\n return {\n content: [{\n type: 'error',\n text: parseErrorObject(argsResult.error)\n }],\n state: MessageState.ParseJsonError\n };\n }\n\n const toolArgs = argsResult.value;\n\n // 进行调用,根据结果返回不同的值\n const toolResponse = await callTool(toolName, toolArgs);\n return handleToolResponse(toolResponse);\n}\n\nfunction deserializeToolCallResponse(toolArgs: string) {\n try {\n const args = JSON.parse(toolArgs);\n return {\n value: args,\n error: undefined\n }\n } catch (error) {\n return {\n value: undefined,\n error\n }\n }\n}\n\nfunction handleToolResponse(toolResponse: ToolCallResponse) {\n if (typeof toolResponse === 'string') {\n // 如果是 string,说明是错误信息\n console.log(toolResponse);\n\n\n return {\n content: [{\n type: 'error',\n text: toolResponse\n }],\n state: MessageState.ToolCall\n }\n\n } else if (!toolResponse.isError) {\n\n return {\n content: toolResponse.content,\n state: MessageState.Success\n };\n\n } else {\n\n return {\n content: toolResponse.content,\n state: MessageState.ToolCall\n };\n\n }\n}\n\nfunction parseErrorObject(error: any): string {\n if (typeof error === 'string') {\n return error;\n } else if (typeof error === 'object') {\n return JSON.stringify(error, null, 2);\n } else {\n return error.toString();\n }\n}","import { watch, reactive } from 'vue';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport Resource from './resource/index.vue';\nimport Chat from './chat/index.vue';\nimport Prompt from './prompt/index.vue';\nimport Tool from './tool/index.vue';\nimport I18n from '@/i18n/index';\nimport { safeSavePanels, savePanels } from '@/hook/panel';\n\nconst { t } = I18n.global;\n\ninterface Tab {\n\tid: string;\n\tname: string;\n\ticon: string;\n\ttype: string;\n\tcomponent: any;\n\tcomponentIndex: number;\n\tstorage: Record<string, any>;\n}\n\nexport const debugModes = [\n\tResource, Prompt, Tool, Chat\n]\n\n// TODO: 实现对于 tabs 这个数据的可持久化\nexport const tabs = reactive<{\n\tcontent: Tab[]\n\tactiveIndex: number\n\tactiveTab: Tab\n}>({\n\tcontent: [\n\t\tcreateTab('blank', 1)\n\t],\n\tactiveIndex: 0,\n\tget activeTab() {\n\t\treturn this.content[this.activeIndex];\n\t}\n});\n\nlet tabCounter = 1;\n\n// 监控 tabs\n\nwatch(\n\t() => tabs,\n\t(newValue, oldValue) => {\n\t\tsafeSavePanels();\n\t},\n\t{ deep: true }\n);\n\nexport function createTab(type: string, index: number): Tab {\n\tlet customName: string | null = null;\n\tconst id = uuidv4();\n\n\treturn {\n\t\tget name() {\n\t\t\tif (customName !== null) {\n\t\t\t\treturn customName;\n\t\t\t}\n\t\t\treturn t('blank-test') + ` ${index}`;\n\t\t},\n\t\tset name(value: string) {\n\t\t\tcustomName = value; // 允许外部修改 name\n\t\t},\n\t\ticon: 'icon-blank',\n\t\ttype,\n\t\tid,\n\t\tcomponentIndex: -1,\n\t\tcomponent: undefined,\n\t\tstorage: {},\n\t};\n}\n\nexport function addNewTab() {\n\tconst newTab = createTab('blank', ++tabCounter);\n\ttabs.content.push(newTab);\n\ttabs.activeIndex = tabs.content.length - 1;\n}\n\n\nexport function closeTab(index: number) {\n\tif (tabs.content.length <= 1) return; // 至少保留一个标签页\n\n\ttabs.content.splice(index, 1);\n\n\tconsole.log(tabs.content);\n\n\t// 调整活动标签索引\n\tif (tabs.activeIndex >= index) {\n\t\ttabs.activeIndex = Math.max(0, tabs.activeIndex - 1);\n\t}\n}","import { useMessageBridge } from '@/api/message-bridge';\nimport { mcpSetting } from '@/hook/mcp';\nimport { ToolsListResponse, ToolCallResponse, CasualRestAPI } from '@/hook/type';\nimport { pinkLog } from '@/views/setting/util';\nimport { reactive } from 'vue';\n\nexport const toolsManager = reactive<{\n tools: ToolsListResponse['tools']\n}>({\n tools: []\n});\n\nexport interface ToolStorage {\n currentToolName: string;\n lastToolCallResponse?: ToolCallResponse | string;\n formData: Record<string, any>;\n}\n\nconst bridge = useMessageBridge();\n\nexport function callTool(toolName: string, toolArgs: Record<string, any>) {\n return new Promise<ToolCallResponse>((resolve, reject) => {\n bridge.addCommandListener('tools/call', (data: CasualRestAPI<ToolCallResponse>) => {\n console.log(data.msg);\n\n if (data.code !== 200) {\n resolve(data.msg);\n } else {\n resolve(data.msg);\n }\n }, { once: true });\n \n bridge.postMessage({\n command: 'tools/call',\n data: {\n toolName,\n toolArgs: JSON.parse(JSON.stringify(toolArgs)),\n callToolOption: {\n timeout: mcpSetting.timeout * 1000\n }\n }\n });\n });\n}","import { reactive } from \"vue\";\n\ninterface TypeAble {\n type: string;\n}\n\nexport function getDefaultValue(property: TypeAble): any { \n if (property.type === 'number' || property.type === 'integer') {\n return 0;\n } else if (property.type === 'boolean') {\n return false;\n } else if (property.type === 'object') {\n return {};\n } else {\n return '';\n }\n}\n\nexport function normaliseJavascriptType(type: string) {\n switch (type) {\n case 'integer':\n return 'number';\n case 'number':\n return 'number';\n case 'boolean':\n return 'boolean';\n case 'string':\n return 'string';\n default:\n return 'string';\n }\n}\n\nexport const mcpSetting = reactive({\n timeout: 60,\n});","import { useMessageBridge } from \"@/api/message-bridge\";\nimport { pinkLog } from \"@/views/setting/util\";\nimport { debugModes, tabs } from \"@/components/main-panel/panel\";\nimport { markRaw, ref, nextTick } from \"vue\";\nimport { v4 as uuidv4 } from 'uuid';\n\ninterface SaveTabItem {\n\tname: string;\n\ticon: string;\n\ttype: string;\n\tcomponentIndex: number;\n\tstorage: Record<string, any>;\n}\n\ninterface SaveTab {\n\ttabs: SaveTabItem[]\n\tcurrentIndex: number\n}\n\nexport const panelLoaded = ref(false);\n\nexport function loadPanels() {\n\n\treturn new Promise((resolve, reject) => {\n\t\tconst bridge = useMessageBridge();\n \n\t\tbridge.addCommandListener('panel/load', data => {\n\t\t\tif (data.code !== 200) {\n\t\t\t\tpinkLog('tabs 加载失败');\n\t\t\t\tconsole.log(data.msg);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tconst persistTab = data.msg as SaveTab;\t\t\t\t\n\t\n\t\t\t\tpinkLog('tabs 加载成功');\n\t\t\n\t\t\t\tif (persistTab.tabs.length === 0) {\n\t\t\t\t\t// 空的,直接返回不需要管\n\t\t\t\t\tpanelLoaded.value = true;\n\t\t\t\t\tresolve(void 0);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttabs.activeIndex = 0;\n\t\t\t\ttabs.content = [];\n\t\t\n\t\t\t\tfor (const tab of persistTab.tabs || []) {\n\t\t\t\t\t\n\t\t\t\t\tconst component = tab.componentIndex >= 0? markRaw(debugModes[tab.componentIndex]) : undefined;\n\t\t\n\t\t\t\t\ttabs.content.push({\n\t\t\t\t\t\tid: uuidv4(),\n\t\t\t\t\t\tname: tab.name,\n\t\t\t\t\t\ticon: tab.icon,\n\t\t\t\t\t\ttype: tab.type,\n\t\t\t\t\t\tcomponentIndex: tab.componentIndex,\n\t\t\t\t\t\tcomponent: component,\n\t\t\t\t\t\tstorage: tab.storage\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\n\t\t\t\ttabs.activeIndex = persistTab.currentIndex;\t\t\t\t\n\t\t\t}\n\t\n\t\t\tpanelLoaded.value = true;\n\t\t\tresolve(void 0);\n\t\t}, { once: true });\n\t\n\t\tbridge.postMessage({\n\t\t\tcommand: 'panel/load'\n\t\t});\n\t});\n}\n\nlet debounceHandler: NodeJS.Timeout;\n\nexport function safeSavePanels() {\n\tclearTimeout(debounceHandler);\n\tdebounceHandler = setTimeout(() => {\n\t\tsavePanels();\n\t}, 100);\n}\n\nexport function savePanels(saveHandler?: () => void) {\n\t// // 没有完成 panel 加载就不保存\n\t// if (!panelLoaded.value) {\n\t// \treturn;\n\t// }\n\n const bridge = useMessageBridge();\n\n const saveTabs: SaveTab = {\n\t\tcurrentIndex: tabs.activeIndex,\n\t\ttabs: []\n\t};\n\tfor (const tab of tabs.content) {\n\t\tsaveTabs.tabs.push({\n\t\t\tname: tab.name,\n\t\t\ticon: tab.icon,\n\t\t\ttype: tab.type,\n\t\t\tcomponentIndex: tab.componentIndex,\n\t\t\tstorage: JSON.parse(JSON.stringify(tab.storage))\n\t\t});\n\t}\n\n bridge.addCommandListener('panel/save', data => {\n const saveStatusCode = data.code;\n pinkLog('配置保存状态:' + saveStatusCode);\n \n if (saveHandler) {\n saveHandler();\n }\n }, { once: true });\n\n bridge.postMessage({\n command: 'panel/save',\n data: saveTabs\n });\n}","import { createI18n } from 'vue-i18n';\n\nimport en from './en.json';\nimport zh from './zh-cn.json';\nimport zhTw from './zh-tw.json';\nimport ja from './ja.json';\nimport de from './de.json';\nimport ko from './ko.json';\nimport ru from './ru.json';\nimport fr from './fr.json';\nimport ar from './ar.json';\n\nconst i18n = createI18n({\n legacy: false,\n locale: 'zh',\n warnHtmlMessage: false,\n messages: { en, zh, zhTw, ja, de, ko, ru, fr, ar }\n});\n\nexport default i18n;","import { markRaw, reactive } from 'vue';\nimport { createTab, debugModes, tabs } from '@/components/main-panel/panel';\nimport { ToolStorage } from '@/components/main-panel/tool/tools';\nimport { ToolCall } from '@/components/main-panel/chat/chat-box/chat';\n\nimport I18n from '@/i18n';\nconst { t } = I18n.global;\n\nexport const llms = reactive<any[]>([]);\n\nexport const llmManager = reactive({\n\tcurrentModelIndex: 0,\n});\n\nexport function createTest(call: ToolCall) {\n\tconst tab = createTab('tool', 0);\n\ttab.componentIndex = 2;\n\ttab.component = markRaw(debugModes[2]);\n\ttab.icon = 'icon-tool';\n\ttab.name = t(\"tools\");\n\t\n\tconst storage: ToolStorage = {\n\t\tcurrentToolName: call.function.name,\n\t\tformData: JSON.parse(call.function.arguments)\n\t};\n\n\ttab.storage = storage;\n\ttabs.content.push(tab);\n\ttabs.activeIndex = tabs.content.length - 1;\n}","const pinkLogStyle = 'background-color: #CB81DA; color: white; padding: 3px; border-radius: 3px;';\nconst redLogStyle = 'background-color:rgb(227, 91, 49); color: white; padding: 3px; border-radius: 3px;';\n\n\n/**\n * @description 粉色log, 代表客户端发送的信息\n * @param message \n */\nexport function pinkLog(message: string) {\n console.log('%c' + message, pinkLogStyle);\n}\n\n/**\n * @description 红色log, 代表错误信息\n * @param message \n */\nexport function redLog(message: string) {\n console.log('%c' + message, redLogStyle);\n}\n\n/**\n * @description 绿色log, 代表服务器发送的信息\n * @param message \n */\nexport function greenLog(message: string) {\n console.log('%c' + message, 'background-color:rgb(100, 200, 100); color: white; padding: 3px; border-radius: 3px;');\n}","module.exports = require(\"crypto\");","module.exports = require(\"./tools.js\");","module.exports = require(\"vue\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","/* eslint-disable */\nimport { ref, type Ref } from \"vue\";\nimport { ToolCall, ChatStorage, getToolSchema, MessageState } from \"../chat-box/chat\";\nimport { useMessageBridge, MessageBridge } from \"@/api/message-bridge\";\nimport type { OpenAI } from 'openai';\nimport { llmManager, llms } from \"@/views/setting/llm\";\nimport { pinkLog, redLog } from \"@/views/setting/util\";\nimport { ElMessage } from \"element-plus\";\nimport { handleToolCalls } from \"./handle-tool-calls\";\nimport { getPlatform } from \"@/api/platform\";\n\nexport type ChatCompletionChunk = OpenAI.Chat.Completions.ChatCompletionChunk;\nexport type ChatCompletionCreateParamsBase = OpenAI.Chat.Completions.ChatCompletionCreateParams & { id?: string };\nexport interface TaskLoopOptions {\n maxEpochs?: number;\n maxJsonParseRetry?: number;\n adapter?: any;\n}\n\nexport interface IErrorMssage {\n state: MessageState,\n msg: string\n}\n\nexport interface IDoConversationResult {\n stop: boolean;\n}\n\n\n/**\n * @description 对任务循环进行的抽象封装\n */\nexport class TaskLoop {\n private bridge: MessageBridge;\n private streamingContent: Ref<string>;\n private streamingToolCalls: Ref<ToolCall[]>;\n\n private currentChatId = '';\n private onError: (error: IErrorMssage) => void = (msg) => {};\n private onChunk: (chunk: ChatCompletionChunk) => void = (chunk) => {};\n private onDone: () => void = () => {};\n private onEpoch: () => void = () => {};\n private completionUsage: ChatCompletionChunk['usage'] | undefined;\n private llmConfig: any;\n\n constructor(\n private readonly taskOptions: TaskLoopOptions = { maxEpochs: 20, maxJsonParseRetry: 3, adapter: undefined },\n ) {\n this.streamingContent = ref('');\n this.streamingToolCalls = ref([]);\n\n // 根据当前环境决定是否要开启 messageBridge\n const platform = getPlatform();\n if (platform === 'nodejs') {\n\n const adapter = taskOptions.adapter;\n\n if (!adapter) {\n throw new Error('adapter is required');\n }\n\n this.bridge = new MessageBridge(adapter.emitter);\n } else {\n this.bridge = useMessageBridge();\n } \n }\n\n private handleChunkDeltaContent(chunk: ChatCompletionChunk) {\n const content = chunk.choices[0]?.delta?.content || '';\n if (content) {\n this.streamingContent.value += content;\n }\n }\n\n private handleChunkDeltaToolCalls(chunk: ChatCompletionChunk) {\n const toolCall = chunk.choices[0]?.delta?.tool_calls?.[0];\n \n if (toolCall) {\n const currentCall = this.streamingToolCalls.value[toolCall.index];\n\n if (currentCall === undefined) {\n // 新的工具调用开始\n this.streamingToolCalls.value[toolCall.index] = {\n id: toolCall.id,\n index: toolCall.index,\n type: 'function',\n function: {\n name: toolCall.function?.name || '',\n arguments: toolCall.function?.arguments || ''\n }\n };\n } else {\n // 累积现有工具调用的信息\n if (currentCall) {\n if (toolCall.id) {\n currentCall.id = toolCall.id;\n }\n if (toolCall.function?.name) {\n currentCall.function.name = toolCall.function.name;\n }\n if (toolCall.function?.arguments) {\n currentCall.function.arguments += toolCall.function.arguments; \n }\n }\n }\n\n } \n }\n\n private handleChunkUsage(chunk: ChatCompletionChunk) {\n const usage = chunk.usage;\n if (usage) {\n this.completionUsage = usage;\n }\n }\n\n private doConversation(chatData: ChatCompletionCreateParamsBase) {\n\n return new Promise<IDoConversationResult>((resolve, reject) => {\n const chunkHandler = this.bridge.addCommandListener('llm/chat/completions/chunk', data => {\n // data.code 一定为 200,否则不会走这个 route\n const { chunk } = data.msg as { chunk: ChatCompletionChunk };\n\n // 处理增量的 content 和 tool_calls\n this.handleChunkDeltaContent(chunk);\n this.handleChunkDeltaToolCalls(chunk);\n this.handleChunkUsage(chunk);\n \n this.onChunk(chunk);\n }, { once: false });\n \n const doneHandler = this.bridge.addCommandListener('llm/chat/completions/done', data => { \n this.onDone();\n chunkHandler();\n errorHandler();\n\n resolve({\n stop: false\n });\n }, { once: true });\n\n const errorHandler = this.bridge.addCommandListener('llm/chat/completions/error', data => {\n this.onError({\n state: MessageState.ReceiveChunkError,\n msg: data.msg || '请求模型服务时发生错误'\n });\n\n chunkHandler();\n doneHandler();\n\n resolve({\n stop: true\n });\n\n }, { once: true });\n\n // console.log(chatData);\n\n this.bridge.postMessage({\n command: 'llm/chat/completions',\n data: JSON.parse(JSON.stringify(chatData)),\n });\n });\n }\n\n public makeChatData(tabStorage: ChatStorage): ChatCompletionCreateParamsBase | undefined {\n const baseURL = this.getLlmConfig().baseUrl;\n const apiKey = this.getLlmConfig().userToken || '';\n \n if (apiKey.trim() === '') {\n \n if (tabStorage.messages.length > 0 && tabStorage.messages[tabStorage.messages.length - 1].role === 'user') {\n tabStorage.messages.pop();\n ElMessage.error('请先设置 API Key');\n }\n return undefined;\n }\n \n const model = this.getLlmConfig().userModel;\n const temperature = tabStorage.settings.temperature;\n const tools = getToolSchema(tabStorage.settings.enableTools);\n\n const userMessages = [];\n if (tabStorage.settings.systemPrompt) {\n userMessages.push({\n role: 'system',\n content: tabStorage.settings.systemPrompt\n });\n }\n\n // 如果超出了 tabStorage.settings.contextLength, 则删除最早的消息\n const loadMessages = tabStorage.messages.slice(- tabStorage.settings.contextLength);\n userMessages.push(...loadMessages);\n\n // 增加一个id用于锁定状态\n const id = crypto.randomUUID();\n\n const chatData = {\n id,\n baseURL,\n apiKey,\n model,\n temperature,\n tools,\n messages: userMessages,\n } as ChatCompletionCreateParamsBase;\n\n return chatData;\n }\n\n public abort() {\n this.bridge.postMessage({\n command: 'llm/chat/completions/abort',\n data: {\n id: this.currentChatId\n }\n });\n this.streamingContent.value = '';\n this.streamingToolCalls.value = [];\n }\n\n public registerOnError(handler: (msg: IErrorMssage) => void) {\n this.onError = handler;\n }\n\n public registerOnChunk(handler: (chunk: ChatCompletionChunk) => void) {\n this.onChunk = handler;\n }\n \n public registerOnDone(handler: () => void) {\n this.onDone = handler;\n }\n\n public registerOnEpoch(handler: () => void) {\n this.onEpoch = handler;\n }\n\n public setMaxEpochs(maxEpochs: number) {\n this.taskOptions.maxEpochs = maxEpochs;\n }\n\n /**\n * @description 设置当前的 LLM 配置,用于 nodejs 环境运行\n * @param config \n * @example\n * setLlmConfig({\n * id: 'openai',\n * baseUrl: 'https://api.openai.com/v1',\n * userToken: 'sk-xxx',\n * userModel: 'gpt-3.5-turbo',\n * })\n */\n public setLlmConfig(config: any) {\n this.llmConfig = config;\n }\n\n public bindStreaming(content: Ref<string>, toolCalls: Ref<ToolCall[]>) {\n this.streamingContent = content;\n this.streamingToolCalls = toolCalls;\n }\n\n public getLlmConfig() {\n if (this.llmConfig) {\n return this.llmConfig;\n }\n return llms[llmManager.currentModelIndex];\n }\n\n public async connectToService() {\n \n }\n\n /**\n * @description 开启循环,异步更新 DOM\n */\n public async start(tabStorage: ChatStorage, userMessage: string) {\n // 添加目前的消息\n tabStorage.messages.push({\n role: 'user',\n content: userMessage,\n extraInfo: {\n created: Date.now(),\n state: MessageState.Success,\n serverName: this.getLlmConfig().id || 'unknown'\n }\n });\n\n let jsonParseErrorRetryCount = 0;\n const maxEpochs = this.taskOptions.maxEpochs || 20;\n\n for (let i = 0; i < maxEpochs; ++ i) {\n\n this.onEpoch();\n\n // 初始累计清空\n this.streamingContent.value = '';\n this.streamingToolCalls.value = [];\n this.completionUsage = undefined;\n\n // 构造 chatData\n const chatData = this.makeChatData(tabStorage);\n\n if (!chatData) {\n this.onDone();\n break;\n }\n\n this.currentChatId = chatData.id!;\n\n // 发送请求\n const doConverationResult = await this.doConversation(chatData);\n\n console.log('[doConverationResult] Response');\n console.log(doConverationResult);\n\n // 如果存在需要调度的工具\n if (this.streamingToolCalls.value.length > 0) {\n\n tabStorage.messages.push({\n role: 'assistant',\n content: this.streamingContent.value || '',\n tool_calls: this.streamingToolCalls.value,\n extraInfo: {\n created: Date.now(),\n state: MessageState.Success,\n serverName: this.getLlmConfig().id || 'unknown'\n }\n });\n \n pinkLog('调用工具数量:' + this.streamingToolCalls.value.length);\n\n for (const toolCall of this.streamingToolCalls.value || []) {\n const toolCallResult = await handleToolCalls(toolCall);\n \n if (toolCallResult.state === MessageState.ParseJsonError) {\n // 如果是因为解析 JSON 错误,则重新开始\n tabStorage.messages.pop();\n jsonParseErrorRetryCount ++;\n \n redLog('解析 JSON 错误 ' + toolCall?.function?.arguments);\n \n // 如果因为 JSON 错误而失败太多,就只能中断了\n if (jsonParseErrorRetryCount >= (this.taskOptions.maxJsonParseRetry || 3)) {\n tabStorage.messages.push({\n role: 'assistant',\n content: `解析 JSON 错误,无法继续调用工具 (累计错误次数 ${this.taskOptions.maxJsonParseRetry})`,\n extraInfo: {\n created: Date.now(),\n state: toolCallResult.state,\n serverName: this.getLlmConfig().id || 'unknown',\n usage: undefined\n }\n });\n break;\n }\n } else if (toolCallResult.state === MessageState.Success) {\n tabStorage.messages.push({\n role: 'tool',\n index: toolCall.index || 0,\n tool_call_id: toolCall.id || toolCall.function.name,\n content: toolCallResult.content,\n extraInfo: {\n created: Date.now(),\n state: toolCallResult.state,\n serverName: this.getLlmConfig().id || 'unknown',\n usage: this.completionUsage\n }\n });\n } else if (toolCallResult.state === MessageState.ToolCall) {\n \n tabStorage.messages.push({\n role: 'tool',\n index: toolCall.index || 0,\n tool_call_id: toolCall.id || toolCall.function.name,\n content: toolCallResult.content,\n extraInfo: {\n created: Date.now(),\n state: toolCallResult.state,\n serverName: this.getLlmConfig().id || 'unknown',\n usage: this.completionUsage\n }\n });\n }\n }\n\n } else if (this.streamingContent.value) {\n tabStorage.messages.push({\n role: 'assistant',\n content: this.streamingContent.value,\n extraInfo: {\n created: Date.now(),\n state: MessageState.Success,\n serverName: this.getLlmConfig().id || 'unknown',\n usage: this.completionUsage\n }\n });\n break;\n\n } else {\n // 一些提示\n break;\n }\n\n // 回答聚合完成后根据 stop 来决定是否提前中断\n if (doConverationResult.stop) {\n break;\n }\n }\n }\n}"],"names":["messageCompiler","shared","format","ast","ctx","body","node","resolveProps","PROPS_BODY","createUnhandleNodeError","resolveType","cases","PROPS_CASES","resolveCases","plural","reduce","messages","c","formatMessageParts","formatParts","static_","PROPS_STATIC","resolveStatic","type","normalize","PROPS_ITEMS","resolveItems","acm","formatMessagePart","resolveValue$1","named","hasOwn","k","interpolate","key","list","isNumber","i","index","linked","modifier","PROPS_MODIFIER","resolveLinkedModifier","resolved","PROPS_KEY","resolveLinkedKey","undefined","Error","PROPS_TYPE","PROPS_VALUE","props","defaultValue","length","prop","defaultOnCacheKey","message","compileCache","create","isMessageAST","val","isObject","devtools","initI18nDevTools","i18n","version","meta","emit","timestamp","Date","now","translateDevTools","createDevToolsHook","hook","payloads","CoreErrorCodes","INVALID_ARGUMENT","COMPILE_ERROR_CODES_EXTEND_POINT","INVALID_DATE_ARGUMENT","INVALID_ISO_DATE_ARGUMENT","NOT_SUPPORT_NON_STRING_MESSAGE","NOT_SUPPORT_LOCALE_PROMISE_VALUE","NOT_SUPPORT_LOCALE_ASYNC_FUNCTION","NOT_SUPPORT_LOCALE_TYPE","createCoreError","code","createCompileError","errorMessages","getLocale","context","options","locale","resolveLocale","_resolveLocale","isString","isFunction","resolvedOnce","constructor","name","resolve","isPromise","fallbackWithSimple","fallback","start","Set","isArray","Object","keys","appendBlockToChain","chain","block","blocks","follow","isBoolean","appendLocaleToChain","tokens","split","appendItemToChain","join","splice","target","includes","replace","push","isPlainObject","pathStateMachine","literalValueRE","getPathCharType","ch","charCodeAt","formatSubPath","path","trimmed","trim","charAt","isNaN","parseInt","exp","test","str","a","slice","stripQuotes","parse","newChar","transition","action","typeMap","mode","subPathDepth","actions","maybeUnescapeQuote","nextChar","cache","Map","resolveWithKeyValue","obj","CoreWarnCodes","NOT_FOUND_KEY","FALLBACK_TO_TRANSLATE","CANNOT_FORMAT_NUMBER","FALLBACK_TO_NUMBER_FORMAT","CANNOT_FORMAT_DATE","FALLBACK_TO_DATE_FORMAT","EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER","warnMessages","getWarnMessage","args","VERSION","DEFAULT_LOCALE","capitalize","toLocaleUpperCase","substr","_compiler","_resolver","_fallbacker","_additionalMeta","getAdditionalMeta","_fallbackContext","_cid","createResources","isTranslateFallbackWarn","RegExp","isTranslateMissingWarn","missing","handleMissing","missingWarn","onWarn","emitter","__v_emitter","groupId","ret","isAlmostSameLocale","compareLocale","isImplicitFallback","targetLocale","locales","indexOf","intlDefined","Intl","Availabilities","DateTimeFormat","NumberFormat","DATETIME_FORMAT_OPTIONS_KEYS","parseDateTimeArgs","arg1","arg2","arg3","arg4","value","overrides","matches","match","dateTime","startsWith","toISOString","isDate","getTime","forEach","NUMBER_FORMAT_OPTIONS_KEYS","parseNumberArgs","DEFAULT_MODIFIER","DEFAULT_MESSAGE","DEFAULT_MESSAGE_DATA_TYPE","DEFAULT_NORMALIZE","values","DEFAULT_INTERPOLATE","toDisplayString","pluralDefault","choice","choicesLength","Math","abs","min","createMessageContext","pluralIndex","count","n","getPluralIndex","pluralRule","pluralRules","orgPluralRule","_list","_named","normalizeNamed","useLinked","msg","parent","processor","modifiers","assign","NOOP_MESSAGE_FUNCTION","isMessageFunction","resolveMessageFormat","fallbackLocale","fallbackWarn","messageResolver","resolveValue","localeFallbacker","from","to","startTag","endTag","inBrowser","mark","end","time","measure","missingRet","compileMessageFormat","cacheBaseKey","onError","warnHtmlMessage","source","err","_source","loc","getSourceForCodeFrame","location","generateCodeFrame","offset","error","onCacheKey","generateFormatCacheKey","getCompileContext","parseTranslateArgs","String","default","isEmptyObject","exports","CompileErrorCodes","CORE_ERROR_CODES_EXTEND_POINT","CORE_WARN_CODES_EXTEND_POINT","MISSING_RESOLVE_VALUE","NOT_REOSLVED","clearCompileCache","clearDateTimeFormat","id","__datetimeFormatters","has","delete","clearNumberFormat","__numberFormatters","compile","detectHtmlTag","warn","checkHtmlMessage","cacheKey","cached","detectError","defaultOnError","baseCompile","jit","createCoreContext","_locale","datetimeFormats","numberFormats","upper","toUpperCase","children","lower","toLowerCase","isRegExp","fallbackFormat","unresolving","postTranslation","escapeParameter","warnOnce","fallbackContext","internalOptions","__meta","cid","datetime","part","datetimeFormat","JSON","stringify","formatter","get","set","formatToParts","fallbackWithLocaleChain","startLocale","__localeChainCache","defaults","getDevToolsHook","getFallbackContext","number","numberFormat","registerLocaleFallbacker","fallbacker","registerMessageCompiler","compiler","registerMessageResolver","resolver","hit","len","last","setAdditionalMeta","setDevToolsHook","setFallbackContext","translate","resolvedMessage","defaultMsgOrKey","enableDefaultMsg","map","item","escapeHtml","escapeParams","formatScope","occurred","ctxOptions","resolveMessage","getMessageContextOptions","messaged","msgCtx","evaluateMessage","updateFallbackLocale","sourceMapJs","LOCATION_STUB","line","column","createPosition","createLocation","EXPECTED_TOKEN","INVALID_TOKEN_IN_PLACEHOLDER","UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER","UNKNOWN_ESCAPE_SEQUENCE","INVALID_UNICODE_ESCAPE_SEQUENCE","UNBALANCED_CLOSING_BRACE","UNTERMINATED_CLOSING_BRACE","EMPTY_PLACEHOLDER","NOT_ALLOW_NEST_PLACEHOLDER","INVALID_LINKED_FORMAT","MUST_HAVE_MESSAGES_IN_PLURAL","UNEXPECTED_EMPTY_LINKED_MODIFIER","UNEXPECTED_EMPTY_LINKED_KEY","UNEXPECTED_LEXICAL_ANALYSIS","UNHANDLED_CODEGEN_NODE_TYPE","UNHANDLED_MINIFIER_NODE_TYPE","domain","SyntaxError","RE_HTML_TAG","CHAR_SP","CHAR_LF","CHAR_LS","fromCharCode","CHAR_PS","createScanner","_buf","_index","_line","_column","_peekOffset","isCRLF","isPS","isLS","isLineEnd","isLF","next","peekOffset","currentChar","currentPeek","peek","reset","resetPeek","skipToPeek","EOF","createTokenizer","_scnr","currentOffset","currentPosition","_initLoc","_initOffset","_context","currentType","startLoc","endLoc","lastType","lastOffset","lastStartLoc","lastEndLoc","braceNest","inLinked","text","emitError","pos","getToken","token","getEndToken","eat","scnr","peekSpaces","buf","skipSpaces","isIdentifierStart","cc","isListIdentifierStart","isNumberStart","isPluralStart","isTextStart","fn","hasSpace","prev","takeChar","isIdentifier","takeIdentifierChar","isNamedIdentifier","takeNamedIdentifierChar","isDigit","takeDigit","isHexDigit","takeHexDigit","getDigits","num","isLiteral","readEscapeSequence","readUnicodeEscapeSequence","unicode","digits","sequence","isInvalidIdentifier","readPlural","readTokenInPlaceholder","readTokenInLinked","validNamedIdentifier","validListIdentifier","validLiteral","readToken","isNamedIdentifierStart","readNamedIdentifier","readListIdentifier","isLiteralStart","literal","current","readLiteral","identifiers","readInvalidIdentifier","isLinkedDotStart","isLinkedDelimiterStart","isLinkedModifierStart","readLinkedModifier","isLinkedReferStart","readLinkedRefer","readText","nextToken","ERROR_DOMAIN$2","KNOWN_ESCAPES","fromEscapeSequence","codePoint4","codePoint6","codePoint","fromCodePoint","createParser","tokenzer","startNode","endNode","parseText","tokenizer","parseList","parseNamed","parseLiteral","parseLinked","linkedNode","parsed","nextConsumeToken","getTokenCaption","parseLinkedModifier","parseLinkedKey","nextContext","emptyLinkedKeyNode","parseMessage","items","parseResource","msgNode","hasEmptyMessage","parsePlural","traverseNodes","nodes","transformer","traverseNode","helper","transform","helpers","add","createTransformer","Array","optimizeMessageNode","static","minify","t","resource","b","s","valueNode","v","m","createCodeGenerator","sourceMap","filename","breakLineCode","needIndent","_needIndent","indentLevel","toString","getMappingName","addMapping","original","generated","numberOfCharacters","linesCount","lastNewLinePos","advancePositionWithSource","_newline","withBreakLine","_breakLineCode","repeat","SourceMapGenerator","setSourceContent","indent","withNewLine","level","deindent","newline","generateNode","generator","generateResource","generatePluralNode","generateMessageNode","generateLinkedNode","ERROR_DOMAIN","assignedOptions","enalbeMinify","enambeOptimize","optimize","toJSON","generate","perf","clearMarks","clearMeasures","tag","RE_ARGS","friendlyJSONstringify","json","_create","_globalThis","hasOwnProperty","prototype","objectToString","toTypeString","call","hasWarned","isNotObjectOrIsArray","createEmitter","events","on","event","handler","handlers","off","payload","deepCopy","src","des","stack","pop","rawText","identifier","lines","res","j","lineLength","pad","max","l","getGlobalThis","globalThis","self","isFinite","then","catch","isSymbol","separator","makeSymbol","shareable","Symbol","for","util","hasNativeMap","ArraySet","this","_array","_set","fromArray","aArray","aAllowDuplicates","size","getOwnPropertyNames","aStr","sStr","toSetString","isDuplicate","idx","at","aIdx","toArray","base64","encode","aValue","digit","encoded","vlq","toVLQSigned","VLQ_BASE","decode","aIndex","aOutParam","continuation","shifted","strLen","result","shift","rest","intToCharMap","TypeError","charCode","recursiveSearch","aLow","aHigh","aNeedle","aHaystack","aCompare","aBias","mid","floor","cmp","LEAST_UPPER_BOUND","GREATEST_LOWER_BOUND","search","MappingList","_sorted","_last","generatedLine","generatedColumn","unsortedForEach","aCallback","aThisArg","aMapping","mappingA","mappingB","lineA","lineB","columnA","columnB","compareByGeneratedPositionsInflated","sort","SortTemplate","comparator","swap","ary","x","y","temp","doQuickSort","p","r","low","high","round","random","pivot","q","sortCache","WeakMap","quickSort","template","Function","templateFn","cloneSort","binarySearch","base64VLQ","SourceMapConsumer","aSourceMap","aSourceMapURL","parseSourceMapInput","sections","IndexedSourceMapConsumer","BasicSourceMapConsumer","getArg","sources","names","sourceRoot","sourcesContent","mappings","file","_version","isAbsolute","relative","_names","_sources","_absoluteSources","computeSourceURL","_mappings","_sourceMapURL","Mapping","originalLine","originalColumn","fromSourceMap","__generatedMappings","defineProperty","configurable","enumerable","_parseMappings","__originalMappings","_charIsMappingSeparator","aSourceRoot","GENERATED_ORDER","ORIGINAL_ORDER","eachMapping","aContext","aOrder","_generatedMappings","_originalMappings","boundCallback","bind","sourceMapURL","mapping","allGeneratedPositionsFor","aArgs","needle","_findSourceIndex","_findMapping","compareByOriginalPositions","lastColumn","consumer","aSource","relativeSource","smc","_sourceRoot","_generateSourcesContent","_file","generatedMappings","destGeneratedMappings","destOriginalMappings","srcMapping","destMapping","compareGenerated","compareByGeneratedPositionsDeflatedNoLine","sortGenerated","array","_sections","url","offsetLine","offsetColumn","generatedOffset","segment","previousGeneratedColumn","previousOriginalLine","previousOriginalColumn","previousSource","previousName","originalMappings","subarrayStart","currentSource","compareByOriginalPositionsNoSource","concat","aMappings","aLineName","aColumnName","aComparator","computeColumnSpans","nextMapping","lastGeneratedColumn","Infinity","originalPositionFor","compareByGeneratedPositionsDeflated","hasContentsOfAllSources","some","sc","sourceContentFor","nullOnMissing","urlParse","fileUriAbsPath","scheme","generatedPositionFor","sectionIndex","section","bias","every","content","generatedPosition","sectionMappings","adjustedMapping","_skipValidation","_ignoreInvalidMapping","_sourcesContents","aSourceMapConsumer","generatorOps","newMapping","sourceFile","sourceRelative","_validateMapping","aSourceFile","aSourceContent","applySourceMap","aSourceMapPath","newSources","newNames","aGenerated","aOriginal","aName","console","_serializeMappings","nameIdx","sourceIdx","previousGeneratedLine","aSources","REGEX_NEWLINE","isSourceNode","SourceNode","aLine","aColumn","aChunks","sourceContents","fromStringWithSourceMap","aGeneratedCode","aRelativePath","remainingLines","remainingLinesIndex","shiftNextLine","getNextLine","lastGeneratedLine","lastMapping","nextLine","addMappingWithCode","aChunk","chunk","prepend","unshift","walk","aFn","aSep","newChildren","replaceRight","aPattern","aReplacement","lastChild","walkSourceContents","fromSetString","toStringWithSourceMap","sourceMappingActive","lastOriginalSource","lastOriginalLine","lastOriginalColumn","lastOriginalName","sourceContent","aDefaultValue","arguments","urlRegexp","dataUrlRegexp","aUrl","auth","host","port","urlGenerate","aParsedUrl","f","aPath","parts","up","input","aRoot","aPathUrl","aRootUrl","joined","lastIndexOf","supportsNullProto","identity","isProtoString","strcmp","aStr1","aStr2","onlyCompareOriginal","onlyCompareGenerated","sourceURL","substring","validate","v7","v6ToV1","v6","v5","v4","v3","v1ToV6","v1","NIL","MAX","max_js_1","nil_js_1","parse_js_1","stringify_js_1","v1_js_1","v1ToV6_js_1","v3_js_1","v4_js_1","v5_js_1","v6_js_1","v6ToV1_js_1","v7_js_1","validate_js_1","version_js_1","crypto_1","bytes","Buffer","createHash","update","digest","randomUUID","uuid","Uint8Array","of","rnds8Pool","poolPtr","randomFillSync","unsafeStringify","byteToHex","arr","updateV1State","rng_js_1","_state","state","rnds","msecs","nsecs","clockseq","v1Bytes","RangeError","tl","tmh","isV6","_v6","optionsKeys","rng","v6Bytes","_v1ToV6","URL","DNS","md5_js_1","v35_js_1","v35_js_2","namespace","stringToBytes","unescape","encodeURIComponent","hash","valueBytes","namespaceBytes","native_js_1","sha1_js_1","_v6ToV1","updateV7State","seq","v7Bytes","regex_js_1","coreBase","vue","I18nErrorCodes","UNEXPECTED_RETURN_TYPE","MUST_BE_CALL_SETUP_TOP","NOT_INSTALLED","REQUIRED_VALUE","INVALID_VALUE","CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN","NOT_INSTALLED_WITH_PROVIDE","UNEXPECTED_ERROR","NOT_COMPATIBLE_LEGACY_VUE_I18N","NOT_AVAILABLE_COMPOSITION_IN_LEGACY","createI18nError","TranslateVNodeSymbol","DatetimePartsSymbol","NumberPartsSymbol","SetPluralRulesSymbol","InejctWithOptionSymbol","DisposeSymbol","handleFlatJson","subKeys","lastIndex","currentObj","hasStringValue","getLocaleMessages","__i18n","flatJson","custom","getComponentOptions","instance","adjustI18nResources","gl","componentOptions","__i18nGlobal","mergeLocaleMessage","mergeDateTimeFormat","mergeNumberFormat","createTextNode","createVNode","Text","NOOP_RETURN_ARRAY","NOOP_RETURN_FALSE","composerID","defineCoreMissingHandler","getCurrentInstance","createComposer","__root","__injectWithOption","_isGlobal","_ref","ref","shallowRef","_inheritLocale","inheritLocale","_fallbackLocale","_messages","_datetimeFormats","_numberFormats","_missingWarn","_fallbackWarn","_fallbackRoot","fallbackRoot","_fallbackFormat","_missing","_runtimeMissing","_postTranslation","_warnHtmlMessage","_escapeParameter","_modifiers","_pluralRules","framework","getCoreContext","computed","wrapWithDeps","argumentParser","warnType","fallbackSuccess","fallbackFail","successCondition","Reflect","apply","root","getLocaleMessage","watch","composer","availableLocales","isGlobal","setLocaleMessage","_message","getPostTranslationHandler","setPostTranslationHandler","getMissingHandler","setMissingHandler","rules","rt","te","tm","targetLocaleMessages","messageValue","resolveMessages","d","getDateTimeFormat","setDateTimeFormat","getNumberFormat","setNumberFormat","createVueI18n","silentTranslationWarn","silentFallbackWarn","formatFallbackMessages","pluralizationRules","warnHtmlInMessage","escapeParameterHtml","sync","sharedMessages","convertComposerOptions","__extender","vueI18n","__composer","mergeToGlobal","g","baseFormatProps","scope","validator","getFragmentableTag","Fragment","Translation","defineComponent","keypath","required","Number","setup","slots","attrs","useI18n","useScope","__useComponent","filter","arg","slot","getInterpolateArg","assignedAttrs","h","I18nT","renderFormatter","slotKeys","partFormatter","I18nN","vTDirective","_process","binding","$","i18nInternal","__getInstance","global","getComposer$1","parsedValue","parseValue","makeParams","created","el","textContent","__i18nWatcher","$forceUpdate","unmounted","beforeUpdate","getSSRProps","I18nInjectionKey","isCE","appContext","app","__VUE_I18N_SYMBOL__","inject","getI18nInstance","getGlobalComposer","getScope","useComponent","vnode","getParentComponentInstance","getComposer","composerOptions","__composerExtend","onMounted","onUnmounted","_composer","__deleteInstance","dispose","setupLifeCycle","__setInstance","globalExportProps","globalExportMethods","DatetimeFormat","I18nD","createI18n","__legacyMode","legacy","__globalInjection","globalInjection","__instances","globalScope","__global","legacyMode","effectScope","run","createGlobal","symbol","install","provide","opts","__vueI18nExtend","globalReleaseHandler","desc","getOwnPropertyDescriptor","wrap","isRef","config","globalProperties","$i18n","method","injectGlobalFields","pluginOptions","globalInstall","component","directive","mixin","vuei18n","beforeCreate","$options","optionsI18n","$root","_vueI18n","__disposer","$t","$rt","$te","$d","$n","$tm","mounted","defineMixin","unmountApp","unmount","stop","messageBridge","MessageBridge","setupSignature","ws","isConnected","getPlatform","setupVsCodeListener","pinkLog","setupElectronListener","setupNodejsListener","setupWebSocket","vscode","acquireVsCodeApi","addEventListener","dispatchMessage","data","postMessage","wsUrl","WebSocket","onmessage","onclose","redLog","readyState","OPEN","send","Promise","reject","onopen","awaitForWebsockt","electronApi","onReply","sendToMain","command","addCommandListener","commandHandler","option","commandHandlers","wrapperCommandHandler","once","commandRequest","destroy","close","clear","isNodejs","enableTools","toolsSchema","enableTool","enabled","inputSchema","function","description","parameters","tool","allTools","MessageState","async","toolCall","toolName","argsResult","toolArgs","deserializeToolCallResponse","parseErrorObject","ParseJsonError","toolResponse","ToolCall","isError","Success","handleToolResponse","callTool","newTab","createTab","tabCounter","tabs","activeIndex","debugModes","reactive","activeTab","customName","icon","componentIndex","storage","newValue","oldValue","safeSavePanels","deep","bridge","callToolOption","timeout","mcpSetting","toolsManager","tools","useMessageBridge","property","persistTab","panelLoaded","tab","markRaw","currentIndex","clearTimeout","debounceHandler","setTimeout","savePanels","saveHandler","saveTabs","saveStatusCode","en","zh","zhTw","ja","de","ko","ru","fr","ar","currentToolName","formData","llms","llmManager","currentModelIndex","module","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","taskOptions","streamingContent","streamingToolCalls","currentChatId","onChunk","onDone","onEpoch","completionUsage","llmConfig","maxEpochs","maxJsonParseRetry","adapter","handleChunkDeltaContent","choices","delta","handleChunkDeltaToolCalls","tool_calls","currentCall","handleChunkUsage","usage","doConversation","chatData","chunkHandler","doneHandler","errorHandler","ReceiveChunkError","makeChatData","tabStorage","baseURL","getLlmConfig","baseUrl","apiKey","userToken","role","ElMessage","model","userModel","temperature","settings","getToolSchema","userMessages","systemPrompt","loadMessages","contextLength","crypto","abort","registerOnError","registerOnChunk","registerOnDone","registerOnEpoch","setMaxEpochs","setLlmConfig","bindStreaming","toolCalls","connectToService","userMessage","extraInfo","serverName","jsonParseErrorRetryCount","doConverationResult","toolCallResult","handleToolCalls","tool_call_id"],"sourceRoot":""}
|