@codingame/monaco-vscode-emmet-default-extension 1.85.2 → 1.85.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/index.js +8 -5
- package/package.json +2 -2
- package/resources/README.md +9 -0
- package/resources/emmetBrowserMain.js +2 -0
- package/resources/emmetBrowserMain.js.map +1 -0
- package/resources/icon.png +0 -0
- package/resources/package.json +1 -0
- package/resources/package.nls.json +1 -0
- package/emmetBrowserMain.js +0 -20288
- package/emmetBrowserMain.js.map +0 -1
- package/package.nls.json +0 -64
package/emmetBrowserMain.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"emmetBrowserMain.js","mappings":";;;;;;;;AAAA;;;gGAGgG;;;AAEhG,sCAAiC;AACjC,2DAA4E;AAC5E,qDAAsF;AACtF,4CAAwC;AACxC,4CAAwC;AACxC,2CAAsC;AACtC,0CAAkD;AAClD,+CAA8C;AAC9C,6CAA0C;AAC1C,gDAAgD;AAChD,4CAA6C;AAC7C,6CAA+C;AAC/C,yDAAkE;AAClE,qDAA0D;AAC1D,sCAA2K;AAC3K,kDAAoD;AACpD,gDAAiG;AAEjG,SAAgB,sBAAsB,CAAC,OAAgC;IACtE,qCAA0B,GAAE,CAAC;IAC7B,0BAA0B,CAAC,OAAO,CAAC,CAAC;IACpC,oCAAyB,GAAE,CAAC;IAE5B,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC,0CAA0C,EAAE,CAAC,IAAI,EAAE,EAAE;QAC/G,8CAAoB,EAAC,IAAI,CAAC,CAAC;IAC5B,CAAC,CAAC,CAAC,CAAC;IAEJ,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC,0BAA0B,EAAE,CAAC,IAAI,EAAE,EAAE;QAC/F,iDAAuB,EAAC,IAAI,CAAC,CAAC;IAC/B,CAAC,CAAC,C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qBAAqB;AACjC,YAAY,OAAO;AACnB,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,YAAY,YAAY,GAAG,aAAa,EAAE,SAAS;AACnD;AACA;;AAEA;AACA,qBAAqB;AACrB;AACA,qBAAqB;AACrB;AACA,qBAAqB;AACrB;AACA,qBAAqB,KAAK;;AAE1B,cAAc;;AAEd;AACA;AACA;AACA,YAAY,cAAc;AAC1B,YAAY,OAAO;AACnB;AACA;AACA;AACA,kBAAkB,qEAAO;AACzB,KAAK,qEAAO;AACZ,KAAK,qEAAO;AACZ,KAAK,qEAAO;;AAEZ;AACA;AACA;AACA;;AAEA,4BAA4B;AAC5B,0BAA0B;AAC1B,4BAA4B;;AAE5B;AACA;AACA,WAAW,cAAc;AACzB,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA,kBAAkB,iEAAO;AACzB,WAAW;;AAEX;AACA,yBAAyB,SAAS;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,YAAY,cAAc;AAC1B,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,cAAc;AAC1B,YAAY;AACZ;AACA;AACA;AACA,KAAK,uEAAS;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,YAAY,SAAS;AACrB,YAAY;AACZ;AACA;AACA,mDAAmD,qEAAO;AAC1D;;AAEA;AACA;AACA,YAAY,SAAS;AACrB,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,cAAc;AAC1B,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,SAAS;AACrB,YAAY;AACZ;AACA;AACA,yBAAyB,qEAAO,WAAW,qEAAO;AAClD;;AAEA,wBAAwB;AACxB,wBAAwB;AACxB,wBAAwB;AACxB,wBAAwB;AACxB,wBAAwB;AACxB,wBAAwB;AACxB,wBAAwB;;AAExB;AACA;AACA,WAAW,cAAc;AACzB,YAAY;AACZ;AACA;AACA;;AAEA;AACA,kBAAkB;;AAElB;AACA;AACA;AACA,oBAAoB,iEAAO;AAC3B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,cAAc;AAC1B,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,SAAS;AACrB,YAAY;AACZ;AACA;AACA,QAAQ,4EAAc;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,cAAc;AAC1B,YAAY,UAAU;AACtB,YAAY;AACZ;AACA;AACA;;AAEA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,cAAc;AAC1B,YAAY,UAAU;AACtB,YAAY,UAAU;AACtB,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,YAAY,cAAc;AAC1B,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,YAAY,cAAc;AAC1B,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;;AAEA;AACA;AACA,YAAY,qBAAqB;AACjC,YAAY,QAAQ;AACpB,YAAY;AACZ;AACA;AACA,2BAA2B;AAC3B;AACA,QAAQ,8DAAY;AACpB;;AAEA;AACA;AACA;AACA,gDAAgD,KAAK;AACrD;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,KAAK;AACL;AACA,mCAAmC,OAAO;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,YAAY,qBAAqB;AACjC,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,YAAY,cAAc;AAC1B,YAAY,UAAU;AACtB,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,YAAY,OAAO;AACnB,YAAY;AACZ;AACA;AACA,4DAA4D,YAAY;AACxE;;AAEA;AACA;AACA;;AAEiC,iEAAe,KAAK,EAAC;;;;;;;;;;;;AC3lBtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY,iBAAiB;AAC7B,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,QAAQ;AACpB,aAAa;AACb;AACA;AACA,2BAA2B,SAAS,UAAU,aAAa;AAC3D;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,YAAY,EAAC;;;;;;;;;;;;;;;;;;;AC/H5B;AACA;AACA;;AAEA,yBAAyB;AACzB,yBAAyB;;AAEzB;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,cAAc;AAC1B,YAAY,SAAS;AACrB,YAAY,SAAS;AACrB,YAAY,SAAS;AACrB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,YAAY,SAAS;AACrB,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,SAAS;AACrB,YAAY,SAAS;AACrB,YAAY,SAAS;AACrB,YAAY;AACZ;AACA;AACA,oBAAoB;AACpB,oBAAoB;AACpB,cAAc;;AAEd;AACA;;AAEA;AACA;AACA,YAAY,SAAS;AACrB,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;AACnB;;AAEA;AACA;AACA,YAAY,SAAS;AACrB,YAAY;AACZ;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,cAAc;AAC1B,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB,YAAY,eAAe;AAC3B;AACA;AACA;AACA,qCAAqC;AACrC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA,0DAA0D,0BAA0B;AACpF;AACA;;AAEA;AACA;;AAEiG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC3J/C;AAC0C;;AAE5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,MAAM;AAClB,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,SAAS;AACrB,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,YAAY,SAAS;AACrB,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,cAAc;AAC1B,YAAY,QAAQ;AACpB,YAAY,SAAS;AACrB;AACA;AACA;;AAEA,qCAAqC,QAAQ;AAC7C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,cAAc;AAC1B,YAAY,cAAc;AAC1B,YAAY,cAAc;AAC1B,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,qCAAqC,QAAQ;AAC7C;AACA;AACA,IAAI;AACJ;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA;AACA,YAAY,gBAAgB,GAAG,WAAW,IAAI,SAAS,KAAK,UAAU;AACtE;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,6BAA6B;AAC7B,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;;AAE/B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;;AAEA,6BAA6B;AAC7B,6BAA6B;;AAE7B;AACA;AACA;AACA;;AAEA;AACA;AACA,mEAAmE;AACnE;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,kBAAkB,mBAAmB;AACrC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,kDAAkD,qEAAO;AACzD;;AAEA;AACA,QAAQ,sEAAQ;AAChB;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,eAAe;;AAEf;AACA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB;AACjB,mBAAmB;;AAEnB;AACA,yCAAyC,WAAW;AACpD,YAAY,cAAc;AAC1B,YAAY,UAAU;AACtB,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,+CAA+C,qEAAO;AACtD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,cAAc;AAC1B,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;;AAEA,KAAK,qEAAO;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,YAAY,cAAc;AAC1B,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6BAA6B,iEAAO;AACpC;;AAEA,uBAAuB;AACvB,uBAAuB;;AAEvB;AACA;AACA,YAAY,cAAc;AAC1B,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,qBAAqB;;AAErB;AACA;AACA,YAAY,cAAc;AAC1B,YAAY,UAAU;AACtB,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,KAAK,qEAAO;AACZ;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB;;AAElB;AACA;AACA,YAAY,cAAc;AAC1B,YAAY;AACZ;AACA;AACA;AACA;;AAEA,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;;AAE9B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,QAAQ,sEAAQ,UAAU,qEAAO;AACjC;AACA,iBAAiB;AACjB;;AAEA,eAAe;;AAEf;AACA;AACA,YAAY,cAAc;AAC1B,YAAY;AACZ;AACA;AACA;AACA;;AAEA,sBAAsB;;AAEtB;AACA;AACA,YAAY,cAAc;AAC1B,YAAY;AACZ;AACA;AACA;AACA;;AAEA,gBAAgB;;AAEhB;AACA;AACA,YAAY,cAAc;AAC1B,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;AAIA;AACA;;AAEA;AACA,qBAAqB,kEAAQ;AAC7B;AACA;;AAEA,2CAA2C,kEAAQ;AACnD;AACA;;AAEA;AACA,GAAG,4CAA4C,kEAAQ;AACvD;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,yBAAyB;AACzB,yBAAyB;AACzB,yBAAyB;AACzB,yBAAyB;AACzB,yBAAyB;AACzB,yBAAyB;AACzB,yBAAyB;AACzB,yBAAyB;;AAEzB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB;;AAEnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,YAAY,cAAc;AAC1B,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,yBAAyB,qEAAO,WAAW,qEAAO;AAClD;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,cAAc;AAC1B,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;;AAElB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,qBAAqB;;AAErB;AACA;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,qBAAqB;AACjC,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,YAAY;AACZ;AACA;AACA,iDAAiD,8DAAY;AAC7D;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,qCAAqC,QAAQ;AAC7C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,YAAY,qBAAqB;AACjC,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,qBAAqB;AACjC,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,qBAAqB;AACjC,YAAY,oBAAoB;AAChC;AACA,YAAY;AACZ;AACA;AACA;AACA,iDAAiD,8DAAY;AAC7D;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,YAAY,cAAc;AAC1B,YAAY,SAAS;AACrB,YAAY,OAAO;AACnB,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,YAAY,cAAc;AAC1B,YAAY,OAAO;AACnB,YAAY,OAAO;AACnB,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,cAAc;AAC1B,YAAY,SAAS;AACrB,YAAY,OAAO;AACnB,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,cAAc;AAC1B,YAAY,cAAc;AAC1B,YAAY,cAAc;AAC1B,YAAY;AACZ;AACA;AACA,mEAAmE;AACnE;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;;AAE7B;AACA,iDAAiD,8DAAY;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;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ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,SAAS;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA,oGAAoG,SAAS;AAC7G;AACA;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,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,CAAC,oCAAoC;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,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBA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A;AACA;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;AAC3D;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA,YAAY,0CAA0C;AACtD;AACA;AACA;AACA;AACA,gDAAgD,aAAa;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,gBAAgB,mSAAmS;AAChW;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA,kKAAkK,aAAa,IAAI,EAAE,IAAI,aAAa;AACtM;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA,4CAA4C,KAAK,wBAAwB,SAAS,KAAK;AACvF;AACA;AACA,4CAA4C,KAAK,uBAAuB,SAAS,KAAK;AACtF;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,0CAA0C;AAC/D,kFAAkF;AAClF;AACA;AACA,oBAAoB,GAAG;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,GAAG;AAC1D;AACA;AACA,sCAAsC,wBAAwB;AAC9D;AACA;AACA;AACA,wCAAwC,wBAAwB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,6BAA6B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,QAAQ;AACrC;AACA;AACA;AACA;AACA;AACA,yBAAyB,iBAAiB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,EAAE,MAAM,EAAE,sCAAsC;AACtG,yBAAyB;AACzB;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA,iCAAiC;AACjC;AACA,0BAA0B;AAC1B;AACA;AACA,oBAAoB,gBAAgB;AACpC,6BAA6B,gBAAgB,EAAE,gBAAgB;AAC/D;AACA;AACA;AACA,kCAAkC,gBAAgB,EAAE,oBAAoB;AACxE;AACA;AACA;AACA,kCAAkC,gBAAgB,EAAE,iBAAiB;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,cAAc;AAC1B;AACA,UAAU,yCAAyC;AACnD,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,IAAI;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA,eAAe,IAAI,EAAE,aAAa,EAAE,IAAI;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG,IAAI;AAClB;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA,yBAAyB,oBAAoB;AAC7C;AACA;AACA,4FAA4F;AAC5F;AACA;AACA;AACA;AACA,mCAAmC,KAAK,EAAE,QAAQ,GAAG,EAAE,EAAE,MAAM;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,2BAA2B,IAAI,EAAE,IAAI,2BAA2B;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+GAA+G;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF;AAChF;AACA;AACA,oCAAoC,oCAAoC;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,6CAA6C,iBAAiB;AAC9D,2CAA2C,iBAAiB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFAAuF;AACvF;AACA;AACA,wFAAwF;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,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,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,oBAAoB,OAAO;AAC3B;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,4BAA4B;AAC5B;AACA;AACA;AACA;AACA,uCAAuC,4CAA4C,yBAAyB,SAAS,YAAY,iBAAiB;AAClJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,EAAE,4BAA4B;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD;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,2EAA2E;AAC3E;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACljCA;AACA;AACA;AACA;AACa;AAC8B;AACP;AACM;AACF;AACxC;AACA;AACA;AACA;AACO,oBAAoB,wDAAqB;AAChD;AACA;AACA;AACO,kBAAkB,qDAAkB;AAC3C;AACA;AACA;AACA;AACO,YAAY,+CAAY;AAC/B;AACA;AACA;AACO,gBAAgB,mDAAgB;AACvC;AACA;AACA;AACO,yBAAyB,4DAAyB;AACzD;AACA;AACA;AACO,uBAAuB,0DAAuB;AACrD;AACA;AACA;AACO,kBAAkB,qDAAkB;AAC3C;AACA;AACA;AACO,mBAAmB,sDAAmB;AAC7C;AACA;AACA;AACO,YAAY,+CAAY;AAC/B;AACA;AACA;AACA;AACA;AACO,oBAAoB,uDAAoB;AACxC;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,WAAW,gDAAgB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,WAAW,mDAAgB;AAC3B;AACA;AACA;AACA;AACO;AACP,mCAAmC,QAAQ;AAC3C,eAAe,iDAAc;AAC7B;AACA;AACA;;;;;;;;;;;;;;ACnHA;AACA;AACA;AACA;AACa;AAC6B;AACnC;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,uDAAa;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,qEAAqE;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,WAAW;AAC/B;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,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;;;;;;;;;;;;ACjMA;AACA;AACA;AACA;AACa;AACb;AACA;AACA;AACA;AACO;AACP,mCAAmC;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,mCAAmC,aAAa;AAChD;AACA,gCAAgC,eAAe;AAC/C,qCAAqC,eAAe;AACpD,sCAAsC,qBAAqB;AAC3D,sCAAsC,2BAA2B;AACjE,yCAAyC,yBAAyB;AAClE,8CAA8C,gDAAgD;AAC9F,qCAAqC,mBAAmB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;AC1WA;AACA;AACA;AACA;AACa;AAC4B;AACgB;AAClD;AACP;AACA;AACO;AACP;AACA;AACA;AACA,eAAe,kDAAS;AACxB;AACA;AACA;AACA;AACA,iBAAiB,2DAAkB;AACnC;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA,sCAAsC,gGAAgG;AACtI;AACA;AACA,uBAAuB,2DAAkB;AACzC;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,mEAAmE;AACjH;AACA;AACA;AACA,8CAA8C,kFAAkF;AAChI;AACA;AACA;AACA,oCAAoC;AACpC,2BAA2B;AAC3B;AACA;AACA,iHAAiH,6BAA6B;AAC9I;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,yBAAyB;AACzB;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,yBAAyB;AACzB;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,0DAA0D;AAC1D,6BAA6B,8CAAK;AAClC;AACA;AACA,wCAAwC,8CAAK;AAC7C;AACA;AACA;AACA,gBAAgB,+CAAM,YAAY,oCAAoC;AACtE;AACA,mCAAmC,QAAQ;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,2EAA2E;AACzF;AACO;AACP;AACA;AACO;AACP;AACA;;;;;;;;;;;;;;;;;;;;;;;ACzLA;AACA;AACA;AACA;AACa;AAC6B;AAC1C;AACA;AACA;AACA;AACA;AACA,CAAC,oCAAoC;AACrC;AACA;AACA;AACO;AACP,uBAAuB;AACvB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;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,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,2CAA2C;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,6BAA6B;AAC7B,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,0BAA0B,8CAA8C;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,6BAA6B;AAC7B,8BAA8B;AAC9B,0BAA0B,0EAA0E;AACpG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,iFAAiF;AACvH,SAAS;AACT;AACA,sCAAsC,mFAAmF;AACzH,0CAA0C,oFAAoF;AAC9H,SAAS;AACT;AACA,qDAAqD;AACrD;AACA;AACA;AACA,SAAS;AACT;AACA,sCAAsC,gFAAgF;AACtH,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,sBAAsB,+FAA+F;AACrH;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,0BAA0B,8CAA8C;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA,oCAAoC,oBAAoB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,gBAAgB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,iDAAiD,gBAAgB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACO;AACP,wCAAwC;AACxC;AACA;AACA;AACA,4BAA4B,qDAAqD;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,8BAA8B;AAC9B,mBAAmB,uDAAa;AAChC;AACA,6CAA6C,+IAA+I,gBAAgB;AAC5M;AACA;AACA,gDAAgD,oJAAoJ,gBAAgB;AACpN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACO;AACP,mBAAmB,uDAAa;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC5mBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,wBAAwB,SAAS;AACjC;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;;AAEA,IAAI,EAAW;AACf,iBAAiB,EAAW;AAC5B,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;;;AAGf;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;;;AAGA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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,4CAA4C,KAAK;;AAEjD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA,oCAAoC,OAAO;AAC3C;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;AAGA;AACA;AACA,0DAA0D;AAC1D;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,UAAU;AACV;AACA;AACA,WAAW;AACX;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA,uCAA0C;;AAE1C;AACA;AACA;AACA,eAAe;;AAEf;AACA;AACA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA,cAAc;;AAEd;AACA;AACA;AACA,yBAAyB;;AAEzB;AACA;AACA;AACA,gBAAgB;;AAEhB;AACA;AACA;AACA,gBAAgB;;AAEhB;AACA;AACA;AACA,gBAAgB;;AAEhB;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;AACA;AACA,gBAAgB;AAChB,sBAAsB;;AAEtB;AACA;AACA;AACA,gBAAgB;;AAEhB;AACA;AACA;AACA,cAAc;AACd,oBAAoB;;AAEpB;AACA;AACA;AACA;AACA,eAAe;AACf,2BAA2B;;AAE3B;AACA;AACA;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB,0CAAgD;;AAEhD;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW;AACX;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB;AACA,0CAAsC;;AAEtC,eAAe;AACf;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,iBAAiB;AACjB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;;AAEL;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA,wBAAwB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,4CAA4C;AACxE,4BAA4B,6DAA6D;AACzF;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB;;;;;;;;AC1sBnB;AACA;;AAEa;;AAEb,wBAAwB,mBAAO,CAAC,EAAc;AAC9C,0BAA0B,mBAAO,CAAC,EAAuB;AACzD,sBAAsB,mBAAO,CAAC,EAAmB;AACjD,mBAAmB,mBAAO,CAAC,EAAgB;;AAE3C;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA,yBAAyB;AACzB,2BAA2B;AAC3B,oBAAoB;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,yBAAyB;;;AAGzB;AACA;AACA;AACA,oBAAoB;;AAEpB;AACA;AACA;AACA,2BAA2B;;AAE3B;AACA;AACA;AACA,qBAAqB;;AAErB;AACA;AACA;AACA,qBAAqB;;AAErB;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;AACA;AACA,oBAAoB;;AAEpB;AACA;AACA;AACA,oBAAoB;;AAEpB;AACA;AACA;AACA,sBAAsB;;AAEtB;AACA;AACA;AACA,sBAAsB;;AAEtB;AACA;AACA;AACA,uBAAuB;;AAEvB;AACA;AACA;AACA,wBAAwB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,2BAA2B;;AAE3B;AACA;AACA;AACA,uBAAuB;;AAEvB;AACA;AACA;AACA,qBAAqB;;AAErB;AACA;AACA;AACA,qBAAqB;;AAErB;AACA;AACA;AACA,yBAAyB;;AAEzB;AACA;AACA;AACA,mCAAmC;;AAEnC;AACA;AACA;AACA,sBAAsB;;AAEtB;AACA;AACA;AACA,sBAAsB;;AAEtB;AACA;AACA;AACA,uBAAuB;;AAEvB;AACA;AACA;AACA,sBAAsB;;AAEtB;AACA;AACA;AACA,sBAAsB;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;;;;;;;;AC7UY;;AAEb,qBAAqB,mBAAO,CAAC,EAAuB;AACpD,gBAAgB,mBAAO,CAAC,EAAqB;;AAE7C;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED,2DAA2D;;AAE3D;;;;;;;;AChCa;;AAEb,iBAAiB,mBAAO,CAAC,EAAmB;;AAE5C;AACA;AACA;;;;;;;;ACNa;;AAEb;AACA;AACA,2FAA2F;AAC3F,4CAA4C;;AAE5C;AACA;AACA;AACA,gCAAgC;;AAEhC,kEAAkE;AAClE,qEAAqE;;AAErE;AACA,iCAAiC;AACjC;AACA,uCAAuC;;AAEvC,2DAA2D;AAC3D,+DAA+D;;AAE/D;AACA;AACA,oBAAoB,gBAAgB;AACpC,2EAA2E;;AAE3E,yGAAyG;;AAEzG;AACA,6CAA6C;;AAE7C,8DAA8D;;AAE9D;AACA;AACA,uEAAuE;AACvE;;AAEA;AACA;;;;;;;;ACzCa;;AAEb,mBAAmB,mBAAO,CAAC,EAAe;;AAE1C,eAAe,mBAAO,CAAC,EAAI;;AAE3B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACda;;AAEb;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,kCAAkC,8CAA8C;AAChF,GAAG;AACH;;AAEA;AACA;AACA;AACA,UAAU;AACV,GAAG;AACH,gBAAgB;AAChB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,IAAI;AACJ;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,EAAE;AACF;;AAEA,iBAAiB,mBAAO,CAAC,EAAa;AACtC,eAAe,mBAAO,CAAC,EAAW;;AAElC;AACA;AACA,mBAAmB,sBAAsB;AACzC;AACA;;AAEA;;AAEA;;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;;AAEA;AACA;AACA,cAAc;AACd,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,qDAAqD;AACrD,GAAG;AACH,gDAAgD;AAChD,GAAG;AACH,sDAAsD;AACtD,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;AAEA;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;;AAEA,WAAW,mBAAO,CAAC,EAAe;AAClC,aAAa,mBAAO,CAAC,EAAK;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,+BAA+B,kBAAkB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;A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B,SAAS,UAAU;AACvC,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,4CAA4C,kBAAkB;AAC9D,EAAE;AACF,CAAC,oBAAoB;AACrB;;;;;;;;AC9Ca;;AAEb;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA,wCAAwC;AACxC,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrCa;;AAEb,cAAc,mBAAO,CAAC,EAAU;AAChC,2BAA2B,mBAAO,CAAC,EAAwB;AAC3D,eAAe,mBAAO,CAAC,EAAW;AAClC,gBAAgB,mBAAO,CAAC,EAAqB;AAC7C,WAAW,mBAAO,CAAC,EAAM;;AAEzB;AACA,qBAAqB,mBAAO,CAAC,EAAuB;;AAEpD,4CAA4C,qBAAM;AAClD;;AAEA;AACA,4CAA4C;;AAE5C;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF,EAAE;AACF;AACA;AACA;AACA,EAAE;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,YAAY;AACjB;AACA,EAAE;AACF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,YAAY;AACjB;AACA,EAAE;AACF;AACA;;AAEA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,eAAe;AAC7B;AACA;;;;;;;;ACxFa;;AAEb,iBAAiB,mBAAO,CAAC,EAAa;;AAEtC;AACA;;AAEA;AACA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA,yCAAyC,SAAS;AAClD;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;AC7Da;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,6BAA6B,WAAW;AACxC,GAAG;AACH;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,gBAAgB;AAChB;AACA;;AAEA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA,2CAA2C;AAC3C,2EAA2E;;AAE3E,0BAA0B;;AAE1B,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B,MAAM,YAAY;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,sBAAsB;AACtB,gBAAgB;AAChB,kEAAkE;AAClE;AACA;AACA,IAAI;AACJ,iCAAiC;AACjC;AACA;AACA;AACA;AACA,sBAAsB;AACtB,gBAAgB;AAChB,kEAAkE;AAClE,wBAAwB;AACxB,6BAA6B;AAC7B;AACA,6FAA6F;AAC7F;AACA;;;;;;;;ACpGa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,4CAA4C,qBAAM;;AAElD;AACA;AACA,iBAAiB,0BAA0B;AAC3C;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1Ba;;AAEb,WAAW,mBAAO,CAAC,EAAe;AAClC,mBAAmB,mBAAO,CAAC,EAAe;;AAE1C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,SAAS,UAAU;AACvC,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,4CAA4C,kBAAkB;AAC9D,EAAE;AACF,CAAC,oBAAoB;AACrB;;;;;;;;AC9Ca;;AAEb,mBAAmB,mBAAO,CAAC,EAAe;;AAE1C,eAAe,mBAAO,CAAC,EAAI;;AAE3B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACda;;AAEb,mBAAmB,mBAAO,CAAC,EAAe;;AAE1C;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;;;;;;;;ACfa;;AAEb,sBAAsB,mBAAO,CAAC,EAAmB;;AAEjD;AACA;AACA;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACa;AACN;AACP;AACA;AACA;AACA;AACA;AACA,CAAC,kCAAkC;AAC5B;AACP;AACA;AACA;AACA;AACA;AACA,CAAC,kBAAkB;AACZ;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0BAA0B;AACpB;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4BAA4B;AAC7B;AACA;AACA,IAAI,gBAAgB;AACpB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,yDAAyD,gBAAgB;AACzE;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4BAA4B;AAC7B;AACA;AACA,IAAI,aAAa;AACjB;AACO;AACP;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,aAAa;AACtE;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sBAAsB;AACvB;AACA;AACA,IAAI,gBAAgB;AACpB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,yDAAyD,gBAAgB;AACzE;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4BAA4B;AAC7B;AACA;AACA,IAAI,oBAAoB;AACxB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,yDAAyD,oBAAoB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,oCAAoC;AACrC;AACA;AACA,IAAI,aAAa;AACjB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,aAAa;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sBAAsB;AACvB;AACA;AACA,IAAI,wBAAwB;AAC5B;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,wBAAwB;AACjF;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4CAA4C;AAC7C;AACA;AACA,IAAI,yBAAyB;AAC7B;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,wBAAwB;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,8CAA8C;AAC/C;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4CAA4C;AAC7C;AACA;AACA,IAAI,oBAAoB;AACxB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,oBAAoB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,oCAAoC;AACrC;AACA;AACA,IAAI,oCAAoC;AACxC;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,oCAAoC;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,oEAAoE;AACrE;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,gDAAgD;AACjD;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sCAAsC;AACvC;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0CAA0C;AAC3C;AACA;AACA,IAAI,kBAAkB;AACtB;AACO;AACP;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,kBAAkB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,gCAAgC;AACjC;AACA;AACA,IAAI,eAAe;AACnB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,uBAAuB;AAChD;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,eAAe;AACxE;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0BAA0B;AAC3B;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,SAAS,gCAAgC;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4BAA4B;AACtB;AACP;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4CAA4C;AACtC;AACP;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,gEAAgE;AAC1D;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,SAAS,gCAAgC;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,8CAA8C;AAC/C;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4CAA4C;AACtC;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,gCAAgC;AAC1B;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,gCAAgC;AAC1B;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,gCAAgC;AAC1B;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,CAAC,sCAAsC;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,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;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,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,qBAAqB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAC0B;AAC3B;AACA;AACA,IAAI,8BAA8B;AAClC;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,yDAAyD,8BAA8B;AACvF;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,wDAAwD;AACzD;AACA;AACA,IAAI,uCAAuC;AAC3C;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,yDAAyD,uCAAuC;AAChG;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0EAA0E;AAC3E;AACA;AACA,IAAI,+CAA+C;AACnD;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,yDAAyD,+CAA+C;AACxG;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0FAA0F;AAC3F;AACA;AACA,IAAI,wBAAwB;AAC5B;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,yDAAyD,wBAAwB;AACjF;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4CAA4C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,kBAAkB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,gCAAgC;AAC1B;AACP;AACA;AACA,uDAAuD,qBAAqB;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sCAAsC;AACvC;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,gDAAgD;AACjD;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,MAAM;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4CAA4C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,CAAC,8CAA8C;AAC/C;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,yDAAyD,yBAAyB;AAClF;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,8CAA8C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,wCAAwC;AAClC;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,gEAAgE;AACjE;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,CAAC,wCAAwC;AACzC;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,CAAC,wCAAwC;AAClC;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,yBAAyB;AACnE;AACA;AACA;AACA,uDAAuD,oBAAoB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,oCAAoC;AAC9B;AACP;AACA;AACA,uDAAuD,aAAa;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sBAAsB;AACvB;AACA;AACA,IAAI,4BAA4B;AAChC;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,6CAA6C,IAAI;AAClF;AACA;AACA,CAAC,oDAAoD;AACrD;AACA;AACA,IAAI,4BAA4B;AAChC;AACO;AACP;AACA;AACA;AACA,yBAAyB,uBAAuB;AAChD;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,oDAAoD;AACrD;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sDAAsD;AACvD;AACA;AACA,IAAI,yBAAyB;AAC7B;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,8CAA8C;AAC/C;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,gCAAgC;AACjC;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,CAAC,8BAA8B;AACxB;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,8CAA8C;AACxC;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oCAAoC;AACpD,gBAAgB,oCAAoC;AACpD;AACA;AACA,CAAC,0CAA0C;AACpC;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,sBAAsB;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,wCAAwC;AACzC;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,wCAAwC;AACzC;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sDAAsD;AACvD;AACA;AACA,IAAI,yBAAyB;AAC7B;AACO;AACP;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,yBAAyB;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,8CAA8C;AACxC;AACP;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,gCAAgC;AACjC;AACA;AACA,IAAI,gBAAgB;AACpB;AACO;AACP;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,gBAAgB;AACzE;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4BAA4B;AAC7B;AACA;AACA,IAAI,yBAAyB;AAC7B;AACO;AACP;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,yDAAyD,yBAAyB;AAClF;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,8CAA8C;AAC/C;AACA;AACA,IAAI,oBAAoB;AACxB;AACO;AACP;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,yDAAyD,oBAAoB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,oCAAoC;AACrC;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,wCAAwC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,gDAAgD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,wDAAwD;AACzD;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,wCAAwC;AACzC;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0CAA0C;AAC3C;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,8DAA8D;AAC/D;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4EAA4E;AAC7E;AACA;AACA,IAAI,0BAA0B;AAC9B;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,yDAAyD,0BAA0B;AACnF;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,gDAAgD;AACjD;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sCAAsC;AAChC;AACP;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,gDAAgD;AAC1C;AACP;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,8BAA8B;AACxB;AACP;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0CAA0C;AACpC;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,qBAAqB;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,oCAAoC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,iBAAiB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,KAAK;AACL;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,gBAAgB;;;;;;;;;;;;;AC/pEjB;AACA;AACA;AACA;AACa;AACb,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,gBAAgB,KAAgB;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;AACA;AACA;AACA;AACA,yDAAyD,iJAAiJ;AAC1M;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,YAAY;AAClF;AACA;AACA,SAAS;AACT;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,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;AACA;AACA,UAAU;AACV;AACA;AACA,0BAA0B,eAAe;AACzC;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,CAAC;AACc;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;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,CAAC;AACD;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,2BAA2B;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;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,mBAAmB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oFAAoF;AACpF;AACA;AACA;AACA;AACA;AACA,8EAA8E;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,2CAA2C;AACrG;;;;;;;;ACloBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gBAAgB,GAAG,eAAe;AAClC,eAAe;AACf;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACda;AACb;AACA;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gBAAgB,GAAG,qBAAqB,GAAG,mBAAmB,GAAG,sBAAsB,GAAG,gBAAgB;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,kCAAkC,gBAAgB,KAAK;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA,0BAA0B,sCAAsC;AAChE;AACA;AACA;AACA,mBAAmB;AACnB;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,sBAAsB,4BAA4B;AAClD;AACA,gBAAgB;AAChB;;;;;;;ACvEa;;AAEb,8CAA6C,EAAE,aAAa,EAAC;;AAE7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB,mBAAmB;AACnB,iBAAiB;AACjB;AACA;AACA;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,wBAAwB;AACxB;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,iDAAiD;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,mCAAmC,SAAS,KAAK,QAAQ;AACzD;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,0BAA0B,YAAY;AACtC;AACA;AACA;AACA;AACA;;AAEA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,qBAAqB;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,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,MAAM;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;AAEA;AACA;AACA,UAAU;AACV;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0BAA0B;AAC3B;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,sDAAsD;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACxC;AACA;AACA;AACA;AACA;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;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,kCAAkC,MAAM;AACxC;AACA;AACA,wCAAwC;AACxC;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,sBAAsB,EAAE,YAAY,GAAG,YAAY;AACnD,sBAAsB,EAAE,YAAY;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,iDAAiD,QAAQ;AACzD;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,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,WAAW;AACpD;AACA;AACA;;AAEA;AACA,uDAAuD,IAAI;AAC3D;AACA;AACA;AACA;AACA,mCAAmC;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,wBAAwB,kBAAkB;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,+CAA+C;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,mBAAmB;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;AACA;AACA,6BAA6B,KAAK;AAClC;AACA;AACA;AACA,yBAAyB,KAAK;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uDAAuD;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,KAAK,IAAI,oBAAoB;AAC7D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,oCAAoC;;AAErC;AACA;AACA;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,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0BAA0B;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACxC;AACA;AACA;AACA;AACA;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;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;AACA;AACA;AACA,oBAAoB,aAAa;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,0BAA0B,YAAY;AACtC;AACA;AACA;AACA;AACA;;AAEA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,gCAAgC,KAAK,IAAI,oBAAoB;AAC7D;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,mEAAmE;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;;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,aAAa;AACb;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;;AAEA,0BAA0B;AAC1B,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,2CAA2C,SAAS;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,uCAAuC,QAAQ;AAC/C;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;;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;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,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;AACvD;AACA;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,iBAAiB;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,uCAAuC,QAAQ;AAC/C;AACA;AACA;AACA;AACA;AACA;;AAEA;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,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,OAAO,EAAE,wBAAwB,EAAE,KAAK;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB,mCAAmC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,CAAC,sCAAsC;AACvC;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;AACA;AACA;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;;AAEA;AACA,YAAY,UAAU;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,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,MAAM;AAClB;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,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,KAAK;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,KAAK;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,cAAc;AAC1B;AACA;AACA;AACA,cAAc,cAAc;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO,GAAG,IAAI,OAAO,OAAO,IAAI,IAAI;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,iBAAiB;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;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,mDAAmD,QAAQ;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,iBAAiB;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,gCAAgC,IAAI;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,eAAe;AAC3B,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;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,gBAAgB,uBAAuB;AACvC;AACA,wBAAwB,kBAAkB;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,YAAY,eAAe;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,kBAAkB;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;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;;AAEA;AACA;AACA;AACA;AACA,CAAC,wCAAwC;AACzC,gDAAgD,KAAK;AACrD,cAAc;AACd;AACA;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,gCAAgC;AAChC;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;;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,cAAc,qCAAqC,GAAG,kBAAkB;AACxE;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,oBAAoB,iBAAiB;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,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,wBAAwB;AAC1D;AACA,yFAAyF,IAAI;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,4BAA4B;AACpD;AACA;AACA;AACA;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,+BAA+B,6BAA6B;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,iBAAiB,yBAAyB;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,YAAY,kFAAkF;AAC3J;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,UAAU,MAAM;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;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,iBAAiB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,UAAU;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,QAAQ,EAAE,OAAO;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,QAAQ;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,WAAW,OAAO;AAC3D;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,8BAA8B,EAAE;AAChC,6BAA6B,EAAE;AAC/B,6BAA6B,EAAE;AAC/B,0BAA0B,EAAE;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,QAAQ;AACnC,6BAA6B,QAAQ;AACrC,qEAAqE,cAAc;AACnF,uDAAuD,gBAAgB;AACvE,kDAAkD,cAAc;AAChE,4EAA4E,UAAU;AACtF,+EAA+E,WAAW;AAC1F,iDAAiD,YAAY;AAC7D;AACA,8DAA8D;AAC9D,iDAAiD,eAAe,kBAAkB,MAAM;AACxF,4DAA4D,OAAO;AACnE,sCAAsC,UAAU;AAChD,uDAAuD,MAAM,qBAAqB;AAClF,qDAAqD,IAAI;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,SAAS;AACtD;AACA,yCAAyC,cAAc;AACvD,mDAAmD,SAAS;AAC5D;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,OAAO;AAC/B,sBAAsB,GAAG,KAAK,EAAE;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,0BAA0B,GAAG,KAAK,EAAE;AACpC;AACA;AACA,8BAA8B,GAAG,KAAK,GAAG,OAAO,MAAM,OAAO,KAA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AE;AACtC;AACA;AACA,4BAA4B,EAAE;AAC9B,uBAAuB,OAAO,EAAE,SAAS,EAAE,OAAO;AAClD,8BAA8B,OAAO;AACrC;AACA,kCAAkC,EAAE;AACpC;AACA;AACA,wBAAwB,OAAO,EAAE,SAAS,EAAE,OAAO;AACnD,+BAA+B,OAAO;AACtC,mCAAmC,EAAE;AACrC;AACA;AACA;AACA;AACA;AACA,sBAAsB,OAAO,EAAE,SAAS,EAAE,OAAO;AACjD,6BAA6B,OAAO;AACpC,iCAAiC,EAAE;AACnC,uCAAuC,EAAE;AACzC;AACA,wCAAwC,EAAE;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA,4BAA4B,OAAO;AACnC;AACA,gCAAgC,EAAE;AAClC;AACA,+BAA+B,KAAK,EAAE,IAAI;AAC1C;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO;AACvE;AACA,eAAe,OAAO;AACtB,oBAAoB,IAAI,IAAI,IAAI,IAAI,IAAI;AACxC,sBAAsB,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,KAAK;AACnD;AACA,aAAa,GAAG;AAChB,oBAAoB,EAAE,oEAAoE,EAAE,YAAY,EAAE,aAAa,EAAE;AACzH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO;AAChE;AACA;AACA;AACA;AACA,cAAc,OAAO,EAAE,aAAa;AACpC;AACA;AACA;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;AAC1C,qCAAqC,EAAE;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,EAAE;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,OAAO;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,KAAK,EAAE,KAAK,EAAE,OAAO;AAC5C;AACA;AACA,qBAAqB,EAAE,SAAS,QAAQ,UAAU,QAAQ,UAAU,IAAI,IAAI,IAAI,WAAW,IAAI,WAAW,IAAI,WAAW,IAAI,YAAY,IAAI,IAAI,IAAI,IAAI,IAAI,WAAW,QAAQ,YAAY,QAAQ,YAAY,QAAQ,YAAY,QAAQ,cAAc,IAAI,IAAI,IAAI,eAAe,IAAI,eAAe,IAAI,eAAe,IAAI,gBAAgB,KAAK,IAAI,KAAK,IAAI,KAAK;AACtW;AACA;AACA,sBAAsB,QAAQ,EAAE,OAAO;AACvC,8BAA8B,OAAO;AACrC,iCAAiC,OAAO;AACxC,gCAAgC,OAAO;AACvC,wCAAwC,KAAK;AAC7C,uBAAuB,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO;AAC5D;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,4FAA4F,IAAI;AAChG,aAAa,2CAA2C;AACxD;;AAEA;AACA,UAAU,aAAa;AACvB;;AAEA;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,0BAA0B;AAC1B;AACA;AACA,gCAAgC,oCAAoC;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,kCAAkC,cAAc;AAChD;AACA;AACA,uDAAuD,6BAA6B;AACpF,mNAAmN;AACnN;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA,iGAAiG;AACjG;;AAEA;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;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC,0BAA0B;AAC3B;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,CAAC,4BAA4B;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf,iCAAiC;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA,8CAA8C;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,yBAAyB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;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;;AAEA,4BAA4B;AAC5B,kBAAe;AACf,eAAe;AACf,cAAc;AACd,0BAA0B;AAC1B,mBAAmB;AACnB,uBAAuB;AACvB,+BAA+B;AAC/B,qBAAqB;AACrB,uBAAuB;AACvB,2BAA2B;AAC3B,kBAAkB;AAClB,8BAA8B;AAC9B;;;;;;;;ACrvKa;AACb;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gBAAgB,GAAG,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,gBAAgB;AAChB;AAC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;ACjD2E;;AAE5E;AACA;AACA;AACA;AACA;AACA,mDAAmD,wDAAO;AAC1D;AACA;AACA;AACA;AACA;AACA,yBAAyB,0DAAY;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,sDAAsD,sDAAQ;AAC9D;AACA;AACA;AACA,yBAAyB,sDAAQ,qDAAqD,sDAAQ;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;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,8BAA8B,aAAa;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE,yDAAO;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,yDAAO;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yDAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,0DAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,0DAAQ;AAC9B;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,sCAAsC,QAAQ;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,QAAQ,EAAC;AACE;AAC1B;;;;;;;;;;;;;;;;;;;;;;;;ACjTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB,mBAAmB;AACnB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,0BAA0B;AAC7F;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,iDAAiD;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,mCAAmC,SAAS,KAAK,QAAQ;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAE8K;AAC9K;;;;;;;;;AC5OA;;;gGAGgG;;;AAEhG,mDAAmD;AAEnD,sCAAiC;AAEjC,MAAM,QAAQ,GAAG,OAAO,CAAC;AAEzB;;GAEG;AACH,SAAgB,kBAAkB,CAAC,KAAa;IAC/C,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,gBAAgB,EAAE,CAAC;QACrC,MAAM,CAAC,MAAM,CAAC,sBAAsB,CAAC,qBAAqB,CAAC,CAAC;QAC5D,OAAO;IACR,CAAC;IACD,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC;IAE9C,OAAO,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;QAChC,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;YACrC,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;YAC3G,IAA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,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,GAAG;WACH;WACA;WACA,CAAC;;;;;WCPD;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;ACNA;;;gGAGgG;;;AAGhG,6CAAwD;AAExD,SAAgB,QAAQ,CAAC,OAAgC;IACxD,wCAAsB,EAAC,OAAO,CAAC,CAAC;AACjC,CAAC;AAFD,4BAEC","sources":["webpack://emmet/./src/emmetCommon.ts","webpack://emmet/external commonjs \"vscode\"","webpack://emmet/./src/defaultCompletionProvider.ts","webpack://emmet/./src/abbreviationActions.ts","webpack://emmet/./src/util.ts","webpack://emmet/./node_modules/@emmetio/html-matcher/dist/html-matcher.es.js","webpack://emmet/./node_modules/@emmetio/stream-reader/dist/stream-reader.es.js","webpack://emmet/./node_modules/@emmetio/stream-reader-utils/dist/stream-reader-utils.es.js","webpack://emmet/./node_modules/@emmetio/css-parser/dist/css-parser.es.js","webpack://emmet/./src/bufferStream.ts","webpack://emmet/./node_modules/vscode-languageserver-textdocument/lib/esm/main.js","webpack://emmet/./src/parseDocument.ts","webpack://emmet/./node_modules/@vscode/emmet-helper/lib/cjs/emmetHelper.js","webpack://emmet/./node_modules/jsonc-parser/lib/esm/main.js","webpack://emmet/./node_modules/jsonc-parser/lib/esm/impl/format.js","webpack://emmet/./node_modules/jsonc-parser/lib/esm/impl/scanner.js","webpack://emmet/./node_modules/jsonc-parser/lib/esm/impl/edit.js","webpack://emmet/./node_modules/jsonc-parser/lib/esm/impl/parser.js","webpack://emmet/../../node_modules/util/util.js","webpack://emmet/../../node_modules/util/support/types.js","webpack://emmet/../../node_modules/is-arguments/index.js","webpack://emmet/../../node_modules/has-tostringtag/shams.js","webpack://emmet/../../node_modules/has-tostringtag/node_modules/has-symbols/shams.js","webpack://emmet/../../node_modules/is-arguments/node_modules/call-bind/callBound.js","webpack://emmet/../../node_modules/get-intrinsic/index.js","webpack://emmet/../../node_modules/get-intrinsic/node_modules/has-symbols/index.js","webpack://emmet/../../node_modules/get-intrinsic/node_modules/has-symbols/shams.js","webpack://emmet/../../node_modules/has-proto/index.js","webpack://emmet/../../node_modules/function-bind/index.js","webpack://emmet/../../node_modules/function-bind/implementation.js","webpack://emmet/../../node_modules/has/src/index.js","webpack://emmet/../../node_modules/is-arguments/node_modules/call-bind/index.js","webpack://emmet/../../node_modules/is-generator-function/index.js","webpack://emmet/../../node_modules/which-typed-array/index.js","webpack://emmet/../../node_modules/for-each/index.js","webpack://emmet/../../node_modules/for-each/node_modules/is-callable/index.js","webpack://emmet/../../node_modules/available-typed-arrays/index.js","webpack://emmet/../../node_modules/which-typed-array/node_modules/call-bind/index.js","webpack://emmet/../../node_modules/which-typed-array/node_modules/call-bind/callBound.js","webpack://emmet/../../node_modules/gopd/index.js","webpack://emmet/../../node_modules/is-typed-array/index.js","webpack://emmet/../../node_modules/util/support/isBufferBrowser.js","webpack://emmet/../../node_modules/inherits/inherits_browser.js","webpack://emmet/./node_modules/vscode-languageserver-types/lib/esm/main.js","webpack://emmet/./node_modules/vscode-uri/lib/esm/index.js","webpack://emmet/./node_modules/@vscode/emmet-helper/lib/cjs/data.js","webpack://emmet/./node_modules/@vscode/emmet-helper/lib/cjs/fileService.js","webpack://emmet/./node_modules/emmet/dist/emmet.cjs","webpack://emmet/./node_modules/@vscode/emmet-helper/lib/cjs/configCompat.js","webpack://emmet/./src/removeTag.ts","webpack://emmet/./src/updateTag.ts","webpack://emmet/./src/matchTag.ts","webpack://emmet/./src/balance.ts","webpack://emmet/./src/splitJoinTag.ts","webpack://emmet/./src/mergeLines.ts","webpack://emmet/./src/toggleComment.ts","webpack://emmet/./src/editPoint.ts","webpack://emmet/./src/selectItem.ts","webpack://emmet/./src/selectItemHTML.ts","webpack://emmet/./src/selectItemStylesheet.ts","webpack://emmet/./src/evaluateMathExpression.ts","webpack://emmet/./node_modules/@emmetio/math-expression/dist/math.es.js","webpack://emmet/./node_modules/@emmetio/scanner/scanner.js","webpack://emmet/./src/incrementDecrement.ts","webpack://emmet/./src/reflectCssValue.ts","webpack://emmet/webpack/bootstrap","webpack://emmet/webpack/runtime/define property getters","webpack://emmet/webpack/runtime/global","webpack://emmet/webpack/runtime/hasOwnProperty shorthand","webpack://emmet/webpack/runtime/make namespace object","webpack://emmet/./src/browser/emmetBrowserMain.ts"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as vscode from 'vscode';\nimport { DefaultCompletionItemProvider } from './defaultCompletionProvider';\nimport { expandEmmetAbbreviation, wrapWithAbbreviation } from './abbreviationActions';\nimport { removeTag } from './removeTag';\nimport { updateTag } from './updateTag';\nimport { matchTag } from './matchTag';\nimport { balanceOut, balanceIn } from './balance';\nimport { splitJoinTag } from './splitJoinTag';\nimport { mergeLines } from './mergeLines';\nimport { toggleComment } from './toggleComment';\nimport { fetchEditPoint } from './editPoint';\nimport { fetchSelectItem } from './selectItem';\nimport { evaluateMathExpression } from './evaluateMathExpression';\nimport { incrementDecrement } from './incrementDecrement';\nimport { LANGUAGE_MODES, getMappingForIncludedLanguages, updateEmmetExtensionsPath, migrateEmmetExtensionsPath, getPathBaseName, getSyntaxes, getEmmetMode } from './util';\nimport { reflectCssValue } from './reflectCssValue';\nimport { addFileToParseCache, clearParseCache, removeFileFromParseCache } from './parseDocument';\n\nexport function activateEmmetExtension(context: vscode.ExtensionContext) {\n\tmigrateEmmetExtensionsPath();\n\trefreshCompletionProviders(context);\n\tupdateEmmetExtensionsPath();\n\n\tcontext.subscriptions.push(vscode.commands.registerCommand('editor.emmet.action.wrapWithAbbreviation', (args) => {\n\t\twrapWithAbbreviation(args);\n\t}));\n\n\tcontext.subscriptions.push(vscode.commands.registerCommand('emmet.expandAbbreviation', (args) => {\n\t\texpandEmmetAbbreviation(args);\n\t}));\n\n\tcontext.subscriptions.push(vscode.commands.registerCommand('editor.emmet.action.removeTag', () => {\n\t\treturn removeTag();\n\t}));\n\n\tcontext.subscriptions.push(vscode.commands.registerCommand('editor.emmet.action.updateTag', (inputTag) => {\n\t\tif (inputTag && typeof inputTag === 'string') {\n\t\t\treturn updateTag(inputTag);\n\t\t}\n\t\treturn updateTag(undefined);\n\t}));\n\n\tcontext.subscriptions.push(vscode.commands.registerCommand('editor.emmet.action.matchTag', () => {\n\t\tmatchTag();\n\t}));\n\n\tcontext.subscriptions.push(vscode.commands.registerCommand('editor.emmet.action.balanceOut', () => {\n\t\tbalanceOut();\n\t}));\n\n\tcontext.subscriptions.push(vscode.commands.registerCommand('editor.emmet.action.balanceIn', () => {\n\t\tbalanceIn();\n\t}));\n\n\tcontext.subscriptions.push(vscode.commands.registerCommand('editor.emmet.action.splitJoinTag', () => {\n\t\treturn splitJoinTag();\n\t}));\n\n\tcontext.subscriptions.push(vscode.commands.registerCommand('editor.emmet.action.mergeLines', () => {\n\t\tmergeLines();\n\t}));\n\n\tcontext.subscriptions.push(vscode.commands.registerCommand('editor.emmet.action.toggleComment', () => {\n\t\ttoggleComment();\n\t}));\n\n\tcontext.subscriptions.push(vscode.commands.registerCommand('editor.emmet.action.nextEditPoint', () => {\n\t\tfetchEditPoint('next');\n\t}));\n\n\tcontext.subscriptions.push(vscode.commands.registerCommand('editor.emmet.action.prevEditPoint', () => {\n\t\tfetchEditPoint('prev');\n\t}));\n\n\tcontext.subscriptions.push(vscode.commands.registerCommand('editor.emmet.action.selectNextItem', () => {\n\t\tfetchSelectItem('next');\n\t}));\n\n\tcontext.subscriptions.push(vscode.commands.registerCommand('editor.emmet.action.selectPrevItem', () => {\n\t\tfetchSelectItem('prev');\n\t}));\n\n\tcontext.subscriptions.push(vscode.commands.registerCommand('editor.emmet.action.evaluateMathExpression', () => {\n\t\tevaluateMathExpression();\n\t}));\n\n\tcontext.subscriptions.push(vscode.commands.registerCommand('editor.emmet.action.incrementNumberByOneTenth', () => {\n\t\treturn incrementDecrement(0.1);\n\t}));\n\n\tcontext.subscriptions.push(vscode.commands.registerCommand('editor.emmet.action.incrementNumberByOne', () => {\n\t\treturn incrementDecrement(1);\n\t}));\n\n\tcontext.subscriptions.push(vscode.commands.registerCommand('editor.emmet.action.incrementNumberByTen', () => {\n\t\treturn incrementDecrement(10);\n\t}));\n\n\tcontext.subscriptions.push(vscode.commands.registerCommand('editor.emmet.action.decrementNumberByOneTenth', () => {\n\t\treturn incrementDecrement(-0.1);\n\t}));\n\n\tcontext.subscriptions.push(vscode.commands.registerCommand('editor.emmet.action.decrementNumberByOne', () => {\n\t\treturn incrementDecrement(-1);\n\t}));\n\n\tcontext.subscriptions.push(vscode.commands.registerCommand('editor.emmet.action.decrementNumberByTen', () => {\n\t\treturn incrementDecrement(-10);\n\t}));\n\n\tcontext.subscriptions.push(vscode.commands.registerCommand('editor.emmet.action.reflectCSSValue', () => {\n\t\treturn reflectCssValue();\n\t}));\n\n\tcontext.subscriptions.push(vscode.commands.registerCommand('workbench.action.showEmmetCommands', () => {\n\t\tvscode.commands.executeCommand('workbench.action.quickOpen', '>Emmet: ');\n\t}));\n\n\tcontext.subscriptions.push(vscode.workspace.onDidChangeConfiguration((e) => {\n\t\tif (e.affectsConfiguration('emmet.includeLanguages') || e.affectsConfiguration('emmet.useInlineCompletions')) {\n\t\t\trefreshCompletionProviders(context);\n\t\t}\n\t\tif (e.affectsConfiguration('emmet.extensionsPath')) {\n\t\t\tupdateEmmetExtensionsPath();\n\t\t}\n\t}));\n\n\tcontext.subscriptions.push(vscode.workspace.onDidSaveTextDocument((e) => {\n\t\tconst basefileName: string = getPathBaseName(e.fileName);\n\t\tif (basefileName.startsWith('snippets') && basefileName.endsWith('.json')) {\n\t\t\tupdateEmmetExtensionsPath(true);\n\t\t}\n\t}));\n\n\tcontext.subscriptions.push(vscode.workspace.onDidOpenTextDocument((e) => {\n\t\tconst emmetMode = getEmmetMode(e.languageId, {}, []) ?? '';\n\t\tconst syntaxes = getSyntaxes();\n\t\tif (syntaxes.markup.includes(emmetMode) || syntaxes.stylesheet.includes(emmetMode)) {\n\t\t\taddFileToParseCache(e);\n\t\t}\n\t}));\n\n\tcontext.subscriptions.push(vscode.workspace.onDidCloseTextDocument((e) => {\n\t\tconst emmetMode = getEmmetMode(e.languageId, {}, []) ?? '';\n\t\tconst syntaxes = getSyntaxes();\n\t\tif (syntaxes.markup.includes(emmetMode) || syntaxes.stylesheet.includes(emmetMode)) {\n\t\t\tremoveFileFromParseCache(e);\n\t\t}\n\t}));\n}\n\n/**\n * Holds any registered completion providers by their language strings\n */\nconst languageMappingForCompletionProviders: Map<string, string> = new Map<string, string>();\nconst completionProviderDisposables: vscode.Disposable[] = [];\n\nfunction refreshCompletionProviders(_: vscode.ExtensionContext) {\n\tclearCompletionProviderInfo();\n\n\tconst completionProvider = new DefaultCompletionItemProvider();\n\tconst inlineCompletionProvider: vscode.InlineCompletionItemProvider = {\n\t\tasync provideInlineCompletionItems(document: vscode.TextDocument, position: vscode.Position, _: vscode.InlineCompletionContext, token: vscode.CancellationToken) {\n\t\t\tconst items = await completionProvider.provideCompletionItems(document, position, token, { triggerCharacter: undefined, triggerKind: vscode.CompletionTriggerKind.Invoke });\n\t\t\tif (!items) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\tconst item = items.items[0];\n\t\t\tif (!item) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\tconst range = item.range as vscode.Range;\n\n\t\t\tif (document.getText(range) !== item.label) {\n\t\t\t\t// We only want to show an inline completion if we are really sure the user meant emmet.\n\t\t\t\t// If the user types `d`, we don't want to suggest `<div></div>`.\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tinsertText: item.insertText as any,\n\t\t\t\t\tfilterText: item.label as any,\n\t\t\t\t\trange\n\t\t\t\t}\n\t\t\t];\n\t\t}\n\t};\n\n\tconst useInlineCompletionProvider = vscode.workspace.getConfiguration('emmet').get<boolean>('useInlineCompletions');\n\tconst includedLanguages = getMappingForIncludedLanguages();\n\tObject.keys(includedLanguages).forEach(language => {\n\t\tif (languageMappingForCompletionProviders.has(language) && languageMappingForCompletionProviders.get(language) === includedLanguages[language]) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (useInlineCompletionProvider) {\n\t\t\tconst inlineCompletionsProvider = vscode.languages.registerInlineCompletionItemProvider({ language, scheme: '*' }, inlineCompletionProvider);\n\t\t\tcompletionProviderDisposables.push(inlineCompletionsProvider);\n\t\t}\n\n\t\tconst explicitProvider = vscode.languages.registerCompletionItemProvider({ language, scheme: '*' }, completionProvider, ...LANGUAGE_MODES[includedLanguages[language]]);\n\t\tcompletionProviderDisposables.push(explicitProvider);\n\n\t\tlanguageMappingForCompletionProviders.set(language, includedLanguages[language]);\n\t});\n\n\tObject.keys(LANGUAGE_MODES).forEach(language => {\n\t\tif (!languageMappingForCompletionProviders.has(language)) {\n\t\t\tif (useInlineCompletionProvider) {\n\t\t\t\tconst inlineCompletionsProvider = vscode.languages.registerInlineCompletionItemProvider({ language, scheme: '*' }, inlineCompletionProvider);\n\t\t\t\tcompletionProviderDisposables.push(inlineCompletionsProvider);\n\t\t\t}\n\n\t\t\tconst explicitProvider = vscode.languages.registerCompletionItemProvider({ language, scheme: '*' }, completionProvider, ...LANGUAGE_MODES[language]);\n\t\t\tcompletionProviderDisposables.push(explicitProvider);\n\n\t\t\tlanguageMappingForCompletionProviders.set(language, language);\n\t\t}\n\t});\n}\n\nfunction clearCompletionProviderInfo() {\n\tlanguageMappingForCompletionProviders.clear();\n\tlet disposable: vscode.Disposable | undefined;\n\twhile (disposable = completionProviderDisposables.pop()) {\n\t\tdisposable.dispose();\n\t}\n}\n\nexport function deactivate() {\n\tclearCompletionProviderInfo();\n\tclearParseCache();\n}\n","module.exports = require(\"vscode\");","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as vscode from 'vscode';\nimport { Node, Stylesheet } from 'EmmetFlatNode';\nimport { isValidLocationForEmmetAbbreviation, getSyntaxFromArgs } from './abbreviationActions';\nimport { getEmmetHelper, getMappingForIncludedLanguages, parsePartialStylesheet, getEmmetConfiguration, getEmmetMode, isStyleSheet, getFlatNode, allowedMimeTypesInScriptTag, toLSTextDocument, getHtmlFlatNode, getEmbeddedCssNodeIfAny } from './util';\nimport { Range as LSRange } from 'vscode-languageserver-textdocument';\nimport { getRootNode } from './parseDocument';\n\nexport class DefaultCompletionItemProvider implements vscode.CompletionItemProvider {\n\n\tprivate lastCompletionType: string | undefined;\n\n\tpublic provideCompletionItems(document: vscode.TextDocument, position: vscode.Position, _: vscode.CancellationToken, context: vscode.CompletionContext): Thenable<vscode.CompletionList | undefined> | undefined {\n\t\tconst completionResult = this.provideCompletionItemsInternal(document, position, context);\n\t\tif (!completionResult) {\n\t\t\tthis.lastCompletionType = undefined;\n\t\t\treturn;\n\t\t}\n\n\t\treturn completionResult.then(completionList => {\n\t\t\tif (!completionList || !completionList.items.length) {\n\t\t\t\tthis.lastCompletionType = undefined;\n\t\t\t\treturn completionList;\n\t\t\t}\n\t\t\tconst item = completionList.items[0];\n\t\t\tconst expandedText = item.documentation ? item.documentation.toString() : '';\n\n\t\t\tif (expandedText.startsWith('<')) {\n\t\t\t\tthis.lastCompletionType = 'html';\n\t\t\t} else if (expandedText.indexOf(':') > 0 && expandedText.endsWith(';')) {\n\t\t\t\tthis.lastCompletionType = 'css';\n\t\t\t} else {\n\t\t\t\tthis.lastCompletionType = undefined;\n\t\t\t}\n\t\t\treturn completionList;\n\t\t});\n\t}\n\n\tprivate provideCompletionItemsInternal(document: vscode.TextDocument, position: vscode.Position, context: vscode.CompletionContext): Thenable<vscode.CompletionList | undefined> | undefined {\n\t\tconst emmetConfig = vscode.workspace.getConfiguration('emmet');\n\t\tconst excludedLanguages = emmetConfig['excludeLanguages'] ? emmetConfig['excludeLanguages'] : [];\n\t\tif (excludedLanguages.includes(document.languageId)) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst mappedLanguages = getMappingForIncludedLanguages();\n\t\tconst isSyntaxMapped = mappedLanguages[document.languageId] ? true : false;\n\t\tconst emmetMode = getEmmetMode((isSyntaxMapped ? mappedLanguages[document.languageId] : document.languageId), mappedLanguages, excludedLanguages);\n\n\t\tif (!emmetMode\n\t\t\t|| emmetConfig['showExpandedAbbreviation'] === 'never'\n\t\t\t|| ((isSyntaxMapped || emmetMode === 'jsx') && emmetConfig['showExpandedAbbreviation'] !== 'always')) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet syntax = emmetMode;\n\n\t\tlet validateLocation = syntax === 'html' || syntax === 'jsx' || syntax === 'xml';\n\t\tlet rootNode: Node | undefined;\n\t\tlet currentNode: Node | undefined;\n\n\t\tconst lsDoc = toLSTextDocument(document);\n\t\tposition = document.validatePosition(position);\n\n\t\t// Don't show completions if there's a comment at the beginning of the line\n\t\tconst lineRange = new vscode.Range(position.line, 0, position.line, position.character);\n\t\tif (document.getText(lineRange).trimStart().startsWith('//')) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst helper = getEmmetHelper();\n\t\tif (syntax === 'html') {\n\t\t\tif (context.triggerKind === vscode.CompletionTriggerKind.TriggerForIncompleteCompletions) {\n\t\t\t\tswitch (this.lastCompletionType) {\n\t\t\t\t\tcase 'html':\n\t\t\t\t\t\tvalidateLocation = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'css':\n\t\t\t\t\t\tvalidateLocation = false;\n\t\t\t\t\t\tsyntax = 'css';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (validateLocation) {\n\t\t\t\tconst positionOffset = document.offsetAt(position);\n\t\t\t\tconst emmetRootNode = getRootNode(document, true);\n\t\t\t\tconst foundNode = getHtmlFlatNode(document.getText(), emmetRootNode, positionOffset, false);\n\t\t\t\tif (foundNode) {\n\t\t\t\t\tif (foundNode.name === 'script') {\n\t\t\t\t\t\tconst typeNode = foundNode.attributes.find(attr => attr.name.toString() === 'type');\n\t\t\t\t\t\tif (typeNode) {\n\t\t\t\t\t\t\tconst typeAttrValue = typeNode.value.toString();\n\t\t\t\t\t\t\tif (typeAttrValue === 'application/javascript' || typeAttrValue === 'text/javascript') {\n\t\t\t\t\t\t\t\tif (!getSyntaxFromArgs({ language: 'javascript' })) {\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tvalidateLocation = false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (allowedMimeTypesInScriptTag.includes(typeAttrValue)) {\n\t\t\t\t\t\t\t\tvalidateLocation = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (foundNode.name === 'style') {\n\t\t\t\t\t\tsyntax = 'css';\n\t\t\t\t\t\tvalidateLocation = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst styleNode = foundNode.attributes.find(attr => attr.name.toString() === 'style');\n\t\t\t\t\t\tif (styleNode && styleNode.value.start <= positionOffset && positionOffset <= styleNode.value.end) {\n\t\t\t\t\t\t\tsyntax = 'css';\n\t\t\t\t\t\t\tvalidateLocation = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst expandOptions = isStyleSheet(syntax) ?\n\t\t\t{ lookAhead: false, syntax: 'stylesheet' } :\n\t\t\t{ lookAhead: true, syntax: 'markup' };\n\t\tconst extractAbbreviationResults = helper.extractAbbreviation(lsDoc, position, expandOptions);\n\t\tif (!extractAbbreviationResults || !helper.isAbbreviationValid(syntax, extractAbbreviationResults.abbreviation)) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst offset = document.offsetAt(position);\n\t\tif (isStyleSheet(document.languageId) && context.triggerKind !== vscode.CompletionTriggerKind.TriggerForIncompleteCompletions) {\n\t\t\tvalidateLocation = true;\n\t\t\tconst usePartialParsing = vscode.workspace.getConfiguration('emmet')['optimizeStylesheetParsing'] === true;\n\t\t\trootNode = usePartialParsing && document.lineCount > 1000 ? parsePartialStylesheet(document, position) : <Stylesheet>getRootNode(document, true);\n\t\t\tif (!rootNode) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcurrentNode = getFlatNode(rootNode, offset, true);\n\t\t}\n\n\t\t// Fix for https://github.com/microsoft/vscode/issues/107578\n\t\t// Validate location if syntax is of styleSheet type to ensure that location is valid for emmet abbreviation.\n\t\t// For an html document containing a <style> node, compute the embeddedCssNode and fetch the flattened node as currentNode.\n\t\tif (!isStyleSheet(document.languageId) && isStyleSheet(syntax) && context.triggerKind !== vscode.CompletionTriggerKind.TriggerForIncompleteCompletions) {\n\t\t\tvalidateLocation = true;\n\t\t\trootNode = getRootNode(document, true);\n\t\t\tif (!rootNode) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst flatNode = getFlatNode(rootNode, offset, true);\n\t\t\tconst embeddedCssNode = getEmbeddedCssNodeIfAny(document, flatNode, position);\n\t\t\tcurrentNode = getFlatNode(embeddedCssNode, offset, true);\n\t\t}\n\n\t\tif (validateLocation && !isValidLocationForEmmetAbbreviation(document, rootNode, currentNode, syntax, offset, toRange(extractAbbreviationResults.abbreviationRange))) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet isNoisePromise: Thenable<boolean> = Promise.resolve(false);\n\n\t\t// Fix for https://github.com/microsoft/vscode/issues/32647\n\t\t// Check for document symbols in js/ts/jsx/tsx and avoid triggering emmet for abbreviations of the form symbolName.sometext\n\t\t// Presence of > or * or + in the abbreviation denotes valid abbreviation that should trigger emmet\n\t\tif (!isStyleSheet(syntax) && (document.languageId === 'javascript' || document.languageId === 'javascriptreact' || document.languageId === 'typescript' || document.languageId === 'typescriptreact')) {\n\t\t\tconst abbreviation: string = extractAbbreviationResults.abbreviation;\n\t\t\t// For the second condition, we don't want abbreviations that have [] characters but not ='s in them to expand\n\t\t\t// In turn, users must explicitly expand abbreviations of the form Component[attr1 attr2], but it means we don't try to expand a[i].\n\t\t\tif (abbreviation.startsWith('this.') || /\\[[^\\]=]*\\]/.test(abbreviation)) {\n\t\t\t\tisNoisePromise = Promise.resolve(true);\n\t\t\t} else {\n\t\t\t\tisNoisePromise = vscode.commands.executeCommand<vscode.SymbolInformation[] | undefined>('vscode.executeDocumentSymbolProvider', document.uri).then(symbols => {\n\t\t\t\t\treturn !!symbols && symbols.some(x => abbreviation === x.name || (abbreviation.startsWith(x.name + '.') && !/>|\\*|\\+/.test(abbreviation)));\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn isNoisePromise.then((isNoise): vscode.CompletionList | undefined => {\n\t\t\tif (isNoise) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tconst config = getEmmetConfiguration(syntax!);\n\t\t\tconst result = helper.doComplete(toLSTextDocument(document), position, syntax, config);\n\n\t\t\t// https://github.com/microsoft/vscode/issues/86941\n\t\t\tif (result && result.items && result.items.length === 1) {\n\t\t\t\tif (result.items[0].label === 'widows: ;') {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst newItems: vscode.CompletionItem[] = [];\n\t\t\tif (result && result.items) {\n\t\t\t\tresult.items.forEach((item: any) => {\n\t\t\t\t\tconst newItem = new vscode.CompletionItem(item.label);\n\t\t\t\t\tnewItem.documentation = item.documentation;\n\t\t\t\t\tnewItem.detail = item.detail;\n\t\t\t\t\tnewItem.insertText = new vscode.SnippetString(item.textEdit.newText);\n\t\t\t\t\tconst oldrange = item.textEdit.range;\n\t\t\t\t\tnewItem.range = new vscode.Range(oldrange.start.line, oldrange.start.character, oldrange.end.line, oldrange.end.character);\n\n\t\t\t\t\tnewItem.filterText = item.filterText;\n\t\t\t\t\tnewItem.sortText = item.sortText;\n\n\t\t\t\t\tif (emmetConfig['showSuggestionsAsSnippets'] === true) {\n\t\t\t\t\t\tnewItem.kind = vscode.CompletionItemKind.Snippet;\n\t\t\t\t\t}\n\t\t\t\t\tnewItems.push(newItem);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn new vscode.CompletionList(newItems, true);\n\t\t});\n\t}\n}\n\nfunction toRange(lsRange: LSRange) {\n\treturn new vscode.Range(lsRange.start.line, lsRange.start.character, lsRange.end.line, lsRange.end.character);\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as vscode from 'vscode';\nimport { Node, HtmlNode, Rule, Property, Stylesheet } from 'EmmetFlatNode';\nimport { getEmmetHelper, getFlatNode, getHtmlFlatNode, getMappingForIncludedLanguages, validate, getEmmetConfiguration, isStyleSheet, getEmmetMode, parsePartialStylesheet, isStyleAttribute, getEmbeddedCssNodeIfAny, allowedMimeTypesInScriptTag, toLSTextDocument, isOffsetInsideOpenOrCloseTag } from './util';\nimport { getRootNode as parseDocument } from './parseDocument';\n\nconst trimRegex = /[\\u00a0]*[\\d#\\-\\*\\u2022]+\\.?/;\nconst hexColorRegex = /^#[\\da-fA-F]{0,6}$/;\n\ninterface ExpandAbbreviationInput {\n\tsyntax: string;\n\tabbreviation: string;\n\trangeToReplace: vscode.Range;\n\ttextToWrap?: string[];\n\tfilter?: string;\n\tindent?: string;\n\tbaseIndent?: string;\n}\n\ninterface PreviewRangesWithContent {\n\tpreviewRange: vscode.Range;\n\toriginalRange: vscode.Range;\n\toriginalContent: string;\n\ttextToWrapInPreview: string[];\n\tbaseIndent: string;\n}\n\nexport async function wrapWithAbbreviation(args: any): Promise<boolean> {\n\tif (!validate(false)) {\n\t\treturn false;\n\t}\n\n\tconst editor = vscode.window.activeTextEditor!;\n\tconst document = editor.document;\n\n\targs = args || {};\n\tif (!args['language']) {\n\t\targs['language'] = document.languageId;\n\t}\n\t// we know it's not stylesheet due to the validate(false) call above\n\tconst syntax = getSyntaxFromArgs(args) || 'html';\n\tconst rootNode = parseDocument(document, true);\n\n\tconst helper = getEmmetHelper();\n\n\tconst operationRanges = Array.from(editor.selections).sort((a, b) => a.start.compareTo(b.start)).map(selection => {\n\t\tlet rangeToReplace: vscode.Range = selection;\n\t\t// wrap around the node if the selection falls inside its open or close tag\n\t\t{\n\t\t\tlet { start, end } = rangeToReplace;\n\n\t\t\tconst startOffset = document.offsetAt(start);\n\t\t\tconst documentText = document.getText();\n\t\t\tconst startNode = getHtmlFlatNode(documentText, rootNode, startOffset, true);\n\t\t\tif (startNode && isOffsetInsideOpenOrCloseTag(startNode, startOffset)) {\n\t\t\t\tstart = document.positionAt(startNode.start);\n\t\t\t\tconst nodeEndPosition = document.positionAt(startNode.end);\n\t\t\t\tend = nodeEndPosition.isAfter(end) ? nodeEndPosition : end;\n\t\t\t}\n\n\t\t\tconst endOffset = document.offsetAt(end);\n\t\t\tconst endNode = getHtmlFlatNode(documentText, rootNode, endOffset, true);\n\t\t\tif (endNode && isOffsetInsideOpenOrCloseTag(endNode, endOffset)) {\n\t\t\t\tconst nodeStartPosition = document.positionAt(endNode.start);\n\t\t\t\tstart = nodeStartPosition.isBefore(start) ? nodeStartPosition : start;\n\t\t\t\tconst nodeEndPosition = document.positionAt(endNode.end);\n\t\t\t\tend = nodeEndPosition.isAfter(end) ? nodeEndPosition : end;\n\t\t\t}\n\n\t\t\trangeToReplace = new vscode.Range(start, end);\n\t\t}\n\t\t// in case of multi-line, exclude last empty line from rangeToReplace\n\t\tif (!rangeToReplace.isSingleLine && rangeToReplace.end.character === 0) {\n\t\t\tconst previousLine = rangeToReplace.end.line - 1;\n\t\t\trangeToReplace = new vscode.Range(rangeToReplace.start, document.lineAt(previousLine).range.end);\n\t\t}\n\t\t// wrap line the cursor is on\n\t\tif (rangeToReplace.isEmpty) {\n\t\t\trangeToReplace = document.lineAt(rangeToReplace.start).range;\n\t\t}\n\n\t\t// ignore whitespace on the first line\n\t\tconst firstLineOfRange = document.lineAt(rangeToReplace.start);\n\t\tif (!firstLineOfRange.isEmptyOrWhitespace && firstLineOfRange.firstNonWhitespaceCharacterIndex > rangeToReplace.start.character) {\n\t\t\trangeToReplace = rangeToReplace.with(new vscode.Position(rangeToReplace.start.line, firstLineOfRange.firstNonWhitespaceCharacterIndex));\n\t\t}\n\n\t\treturn rangeToReplace;\n\t}).reduce((mergedRanges, range) => {\n\t\t// Merge overlapping ranges\n\t\tif (mergedRanges.length > 0 && range.intersection(mergedRanges[mergedRanges.length - 1])) {\n\t\t\tmergedRanges.push(range.union(mergedRanges.pop()!));\n\t\t} else {\n\t\t\tmergedRanges.push(range);\n\t\t}\n\t\treturn mergedRanges;\n\t}, [] as vscode.Range[]);\n\n\t// Backup orginal selections and update selections\n\t// Also helps with https://github.com/microsoft/vscode/issues/113930 by avoiding `editor.linkedEditing`\n\t// execution if selection is inside an open or close tag\n\tconst oldSelections = editor.selections;\n\teditor.selections = operationRanges.map(range => new vscode.Selection(range.start, range.end));\n\n\t// Fetch general information for the succesive expansions. i.e. the ranges to replace and its contents\n\tconst rangesToReplace: PreviewRangesWithContent[] = operationRanges.map(rangeToReplace => {\n\t\tlet textToWrapInPreview: string[];\n\t\tconst textToReplace = document.getText(rangeToReplace);\n\n\t\t// the following assumes all the lines are indented the same way as the first\n\t\t// this assumption helps with applyPreview later\n\t\tconst wholeFirstLine = document.lineAt(rangeToReplace.start).text;\n\t\tconst otherMatches = wholeFirstLine.match(/^(\\s*)/);\n\t\tconst baseIndent = otherMatches ? otherMatches[1] : '';\n\t\ttextToWrapInPreview = rangeToReplace.isSingleLine ?\n\t\t\t[textToReplace] :\n\t\t\ttextToReplace.split('\\n' + baseIndent).map(x => x.trimEnd());\n\n\t\t// escape $ characters, fixes #52640\n\t\ttextToWrapInPreview = textToWrapInPreview.map(e => e.replace(/(\\$\\d)/g, '\\\\$1'));\n\n\t\treturn {\n\t\t\tpreviewRange: rangeToReplace,\n\t\t\toriginalRange: rangeToReplace,\n\t\t\toriginalContent: textToReplace,\n\t\t\ttextToWrapInPreview,\n\t\t\tbaseIndent\n\t\t};\n\t});\n\n\tconst { tabSize, insertSpaces } = editor.options;\n\tconst indent = insertSpaces ? ' '.repeat(tabSize as number) : '\\t';\n\n\tfunction revertPreview(): Thenable<boolean> {\n\t\treturn editor.edit(builder => {\n\t\t\tfor (const rangeToReplace of rangesToReplace) {\n\t\t\t\tbuilder.replace(rangeToReplace.previewRange, rangeToReplace.originalContent);\n\t\t\t\trangeToReplace.previewRange = rangeToReplace.originalRange;\n\t\t\t}\n\t\t}, { undoStopBefore: false, undoStopAfter: false });\n\t}\n\n\tfunction applyPreview(expandAbbrList: ExpandAbbreviationInput[]): Thenable<boolean> {\n\t\tlet lastOldPreviewRange = new vscode.Range(0, 0, 0, 0);\n\t\tlet lastNewPreviewRange = new vscode.Range(0, 0, 0, 0);\n\t\tlet totalNewLinesInserted = 0;\n\n\t\treturn editor.edit(builder => {\n\t\t\t// the edits are applied in order top-down\n\t\t\tfor (let i = 0; i < rangesToReplace.length; i++) {\n\t\t\t\tconst expandedText = expandAbbr(expandAbbrList[i]) || '';\n\t\t\t\tif (!expandedText) {\n\t\t\t\t\t// Failed to expand text. We already showed an error inside expandAbbr.\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// get the current preview range, format the new wrapped text, and then replace\n\t\t\t\t// the text in the preview range with that new text\n\t\t\t\tconst oldPreviewRange = rangesToReplace[i].previewRange;\n\t\t\t\tconst newText = expandedText\n\t\t\t\t\t.replace(/\\$\\{[\\d]*\\}/g, '|') // Removing Tabstops\n\t\t\t\t\t.replace(/\\$\\{[\\d]*:([^}]*)\\}/g, (_, placeholder) => placeholder) // Replacing Placeholders\n\t\t\t\t\t.replace(/\\\\\\$/g, '$'); // Remove backslashes before $\n\t\t\t\tbuilder.replace(oldPreviewRange, newText);\n\n\t\t\t\t// calculate the new preview range to use for future previews\n\t\t\t\t// we also have to take into account that the previous expansions could:\n\t\t\t\t// - cause new lines to appear\n\t\t\t\t// - be on the same line as other expansions\n\t\t\t\tconst expandedTextLines = newText.split('\\n');\n\t\t\t\tconst oldPreviewLines = oldPreviewRange.end.line - oldPreviewRange.start.line + 1;\n\t\t\t\tconst newLinesInserted = expandedTextLines.length - oldPreviewLines;\n\n\t\t\t\tconst newPreviewLineStart = oldPreviewRange.start.line + totalNewLinesInserted;\n\t\t\t\tlet newPreviewStart = oldPreviewRange.start.character;\n\t\t\t\tconst newPreviewLineEnd = oldPreviewRange.end.line + totalNewLinesInserted + newLinesInserted;\n\t\t\t\tlet newPreviewEnd = expandedTextLines[expandedTextLines.length - 1].length;\n\t\t\t\tif (i > 0 && newPreviewLineEnd === lastNewPreviewRange.end.line) {\n\t\t\t\t\t// If newPreviewLineEnd is equal to the previous expandedText lineEnd,\n\t\t\t\t\t// set newPreviewStart to the length of the previous expandedText in that line\n\t\t\t\t\t// plus the number of characters between both selections.\n\t\t\t\t\tnewPreviewStart = lastNewPreviewRange.end.character + (oldPreviewRange.start.character - lastOldPreviewRange.end.character);\n\t\t\t\t\tnewPreviewEnd += newPreviewStart;\n\t\t\t\t} else if (i > 0 && newPreviewLineStart === lastNewPreviewRange.end.line) {\n\t\t\t\t\t// Same as above but expandedTextLines.length > 1 so newPreviewEnd keeps its value.\n\t\t\t\t\tnewPreviewStart = lastNewPreviewRange.end.character + (oldPreviewRange.start.character - lastOldPreviewRange.end.character);\n\t\t\t\t} else if (expandedTextLines.length === 1) {\n\t\t\t\t\t// If the expandedText is single line, add the length of preceeding text as it will not be included in line length.\n\t\t\t\t\tnewPreviewEnd += oldPreviewRange.start.character;\n\t\t\t\t}\n\n\t\t\t\tlastOldPreviewRange = rangesToReplace[i].previewRange;\n\t\t\t\tlastNewPreviewRange = new vscode.Range(newPreviewLineStart, newPreviewStart, newPreviewLineEnd, newPreviewEnd);\n\t\t\t\trangesToReplace[i].previewRange = lastNewPreviewRange;\n\t\t\t\ttotalNewLinesInserted += newLinesInserted;\n\t\t\t}\n\t\t}, { undoStopBefore: false, undoStopAfter: false });\n\t}\n\n\tlet inPreviewMode = false;\n\tasync function makeChanges(inputAbbreviation: string | undefined, previewChanges: boolean): Promise<boolean> {\n\t\tconst isAbbreviationValid = !!inputAbbreviation && !!inputAbbreviation.trim() && helper.isAbbreviationValid(syntax, inputAbbreviation);\n\t\tconst extractedResults = isAbbreviationValid ? helper.extractAbbreviationFromText(inputAbbreviation!, syntax) : undefined;\n\t\tif (!extractedResults) {\n\t\t\tif (inPreviewMode) {\n\t\t\t\tinPreviewMode = false;\n\t\t\t\tawait revertPreview();\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\tconst { abbreviation, filter } = extractedResults;\n\t\tif (abbreviation !== inputAbbreviation) {\n\t\t\t// Not clear what should we do in this case. Warn the user? How?\n\t\t}\n\n\t\tif (previewChanges) {\n\t\t\tconst expandAbbrList: ExpandAbbreviationInput[] = rangesToReplace.map(rangesAndContent =>\n\t\t\t\t({ syntax, abbreviation, rangeToReplace: rangesAndContent.originalRange, textToWrap: rangesAndContent.textToWrapInPreview, filter, indent, baseIndent: rangesAndContent.baseIndent })\n\t\t\t);\n\n\t\t\tinPreviewMode = true;\n\t\t\treturn applyPreview(expandAbbrList);\n\t\t}\n\n\t\tconst expandAbbrList: ExpandAbbreviationInput[] = rangesToReplace.map(rangesAndContent =>\n\t\t\t({ syntax, abbreviation, rangeToReplace: rangesAndContent.originalRange, textToWrap: rangesAndContent.textToWrapInPreview, filter, indent })\n\t\t);\n\n\t\tif (inPreviewMode) {\n\t\t\tinPreviewMode = false;\n\t\t\tawait revertPreview();\n\t\t}\n\n\t\treturn expandAbbreviationInRange(editor, expandAbbrList, false);\n\t}\n\n\tlet currentValue = '';\n\tasync function inputChanged(value: string): Promise<string> {\n\t\tif (value !== currentValue) {\n\t\t\tcurrentValue = value;\n\t\t\tawait makeChanges(value, true);\n\t\t}\n\t\treturn '';\n\t}\n\n\tconst prompt = vscode.l10n.t(\"Enter Abbreviation\");\n\tconst inputAbbreviation = (args && args['abbreviation'])\n\t\t? (args['abbreviation'] as string)\n\t\t: await vscode.window.showInputBox({ prompt, validateInput: inputChanged });\n\n\tconst changesWereMade = await makeChanges(inputAbbreviation, false);\n\tif (!changesWereMade) {\n\t\teditor.selections = oldSelections;\n\t}\n\n\treturn changesWereMade;\n}\n\nexport function expandEmmetAbbreviation(args: any): Thenable<boolean | undefined> {\n\tif (!validate() || !vscode.window.activeTextEditor) {\n\t\treturn fallbackTab();\n\t}\n\n\t/**\n\t * Short circuit the parsing. If previous character is space, do not expand.\n\t */\n\tif (vscode.window.activeTextEditor.selections.length === 1 &&\n\t\tvscode.window.activeTextEditor.selection.isEmpty\n\t) {\n\t\tconst anchor = vscode.window.activeTextEditor.selection.anchor;\n\t\tif (anchor.character === 0) {\n\t\t\treturn fallbackTab();\n\t\t}\n\n\t\tconst prevPositionAnchor = anchor.translate(0, -1);\n\t\tconst prevText = vscode.window.activeTextEditor.document.getText(new vscode.Range(prevPositionAnchor, anchor));\n\t\tif (prevText === ' ' || prevText === '\\t') {\n\t\t\treturn fallbackTab();\n\t\t}\n\t}\n\n\targs = args || {};\n\tif (!args['language']) {\n\t\targs['language'] = vscode.window.activeTextEditor.document.languageId;\n\t} else {\n\t\tconst excludedLanguages = vscode.workspace.getConfiguration('emmet')['excludeLanguages'] ? vscode.workspace.getConfiguration('emmet')['excludeLanguages'] : [];\n\t\tif (excludedLanguages.includes(vscode.window.activeTextEditor.document.languageId)) {\n\t\t\treturn fallbackTab();\n\t\t}\n\t}\n\tconst syntax = getSyntaxFromArgs(args);\n\tif (!syntax) {\n\t\treturn fallbackTab();\n\t}\n\n\tconst editor = vscode.window.activeTextEditor;\n\n\t// When tabbed on a non empty selection, do not treat it as an emmet abbreviation, and fallback to tab instead\n\tif (vscode.workspace.getConfiguration('emmet')['triggerExpansionOnTab'] === true && editor.selections.find(x => !x.isEmpty)) {\n\t\treturn fallbackTab();\n\t}\n\n\tconst abbreviationList: ExpandAbbreviationInput[] = [];\n\tlet firstAbbreviation: string;\n\tlet allAbbreviationsSame: boolean = true;\n\tconst helper = getEmmetHelper();\n\n\tconst getAbbreviation = (document: vscode.TextDocument, selection: vscode.Selection, position: vscode.Position, syntax: string): [vscode.Range | null, string, string | undefined] => {\n\t\tposition = document.validatePosition(position);\n\t\tlet rangeToReplace: vscode.Range = selection;\n\t\tlet abbr = document.getText(rangeToReplace);\n\t\tif (!rangeToReplace.isEmpty) {\n\t\t\tconst extractedResults = helper.extractAbbreviationFromText(abbr, syntax);\n\t\t\tif (extractedResults) {\n\t\t\t\treturn [rangeToReplace, extractedResults.abbreviation, extractedResults.filter];\n\t\t\t}\n\t\t\treturn [null, '', ''];\n\t\t}\n\n\t\tconst currentLine = editor.document.lineAt(position.line).text;\n\t\tconst textTillPosition = currentLine.substr(0, position.character);\n\n\t\t// Expand cases like <div to <div></div> explicitly\n\t\t// else we will end up with <<div></div>\n\t\tif (syntax === 'html') {\n\t\t\tconst matches = textTillPosition.match(/<(\\w+)$/);\n\t\t\tif (matches) {\n\t\t\t\tabbr = matches[1];\n\t\t\t\trangeToReplace = new vscode.Range(position.translate(0, -(abbr.length + 1)), position);\n\t\t\t\treturn [rangeToReplace, abbr, ''];\n\t\t\t}\n\t\t}\n\t\tconst extractedResults = helper.extractAbbreviation(toLSTextDocument(editor.document), position, { lookAhead: false });\n\t\tif (!extractedResults) {\n\t\t\treturn [null, '', ''];\n\t\t}\n\n\t\tconst { abbreviationRange, abbreviation, filter } = extractedResults;\n\t\treturn [new vscode.Range(abbreviationRange.start.line, abbreviationRange.start.character, abbreviationRange.end.line, abbreviationRange.end.character), abbreviation, filter];\n\t};\n\n\tconst selectionsInReverseOrder = editor.selections.slice(0);\n\tselectionsInReverseOrder.sort((a, b) => {\n\t\tconst posA = a.isReversed ? a.anchor : a.active;\n\t\tconst posB = b.isReversed ? b.anchor : b.active;\n\t\treturn posA.compareTo(posB) * -1;\n\t});\n\n\tlet rootNode: Node | undefined;\n\tfunction getRootNode() {\n\t\tif (rootNode) {\n\t\t\treturn rootNode;\n\t\t}\n\n\t\tconst usePartialParsing = vscode.workspace.getConfiguration('emmet')['optimizeStylesheetParsing'] === true;\n\t\tif (editor.selections.length === 1 && isStyleSheet(editor.document.languageId) && usePartialParsing && editor.document.lineCount > 1000) {\n\t\t\trootNode = parsePartialStylesheet(editor.document, editor.selection.isReversed ? editor.selection.anchor : editor.selection.active);\n\t\t} else {\n\t\t\trootNode = parseDocument(editor.document, true);\n\t\t}\n\n\t\treturn rootNode;\n\t}\n\n\tselectionsInReverseOrder.forEach(selection => {\n\t\tconst position = selection.isReversed ? selection.anchor : selection.active;\n\t\tconst [rangeToReplace, abbreviation, filter] = getAbbreviation(editor.document, selection, position, syntax);\n\t\tif (!rangeToReplace) {\n\t\t\treturn;\n\t\t}\n\t\tif (!helper.isAbbreviationValid(syntax, abbreviation)) {\n\t\t\treturn;\n\t\t}\n\t\tif (isStyleSheet(syntax) && abbreviation.endsWith(':')) {\n\t\t\t// Fix for https://github.com/Microsoft/vscode/issues/1623\n\t\t\treturn;\n\t\t}\n\n\t\tconst offset = editor.document.offsetAt(position);\n\t\tlet currentNode = getFlatNode(getRootNode(), offset, true);\n\t\tlet validateLocation = true;\n\t\tlet syntaxToUse = syntax;\n\n\t\tif (editor.document.languageId === 'html') {\n\t\t\tif (isStyleAttribute(currentNode, offset)) {\n\t\t\t\tsyntaxToUse = 'css';\n\t\t\t\tvalidateLocation = false;\n\t\t\t} else {\n\t\t\t\tconst embeddedCssNode = getEmbeddedCssNodeIfAny(editor.document, currentNode, position);\n\t\t\t\tif (embeddedCssNode) {\n\t\t\t\t\tcurrentNode = getFlatNode(embeddedCssNode, offset, true);\n\t\t\t\t\tsyntaxToUse = 'css';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (validateLocation && !isValidLocationForEmmetAbbreviation(editor.document, getRootNode(), currentNode, syntaxToUse, offset, rangeToReplace)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!firstAbbreviation) {\n\t\t\tfirstAbbreviation = abbreviation;\n\t\t} else if (allAbbreviationsSame && firstAbbreviation !== abbreviation) {\n\t\t\tallAbbreviationsSame = false;\n\t\t}\n\n\t\tabbreviationList.push({ syntax: syntaxToUse, abbreviation, rangeToReplace, filter });\n\t});\n\n\treturn expandAbbreviationInRange(editor, abbreviationList, allAbbreviationsSame).then(success => {\n\t\treturn success ? Promise.resolve(undefined) : fallbackTab();\n\t});\n}\n\nfunction fallbackTab(): Thenable<boolean | undefined> {\n\tif (vscode.workspace.getConfiguration('emmet')['triggerExpansionOnTab'] === true) {\n\t\treturn vscode.commands.executeCommand('tab');\n\t}\n\treturn Promise.resolve(true);\n}\n/**\n * Checks if given position is a valid location to expand emmet abbreviation.\n * Works only on html and css/less/scss syntax\n * @param document current Text Document\n * @param rootNode parsed document\n * @param currentNode current node in the parsed document\n * @param syntax syntax of the abbreviation\n * @param position position to validate\n * @param abbreviationRange The range of the abbreviation for which given position is being validated\n */\nexport function isValidLocationForEmmetAbbreviation(document: vscode.TextDocument, rootNode: Node | undefined, currentNode: Node | undefined, syntax: string, offset: number, abbreviationRange: vscode.Range): boolean {\n\tif (isStyleSheet(syntax)) {\n\t\tconst stylesheet = <Stylesheet>rootNode;\n\t\tif (stylesheet && (stylesheet.comments || []).some(x => offset >= x.start && offset <= x.end)) {\n\t\t\treturn false;\n\t\t}\n\t\t// Continue validation only if the file was parse-able and the currentNode has been found\n\t\tif (!currentNode) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Get the abbreviation right now\n\t\t// Fixes https://github.com/microsoft/vscode/issues/74505\n\t\t// Stylesheet abbreviations starting with @ should bring up suggestions\n\t\t// even at outer-most level\n\t\tconst abbreviation = document.getText(new vscode.Range(abbreviationRange.start.line, abbreviationRange.start.character, abbreviationRange.end.line, abbreviationRange.end.character));\n\t\tif (abbreviation.startsWith('@')) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Fix for https://github.com/microsoft/vscode/issues/34162\n\t\t// Other than sass, stylus, we can make use of the terminator tokens to validate position\n\t\tif (syntax !== 'sass' && syntax !== 'stylus' && currentNode.type === 'property') {\n\t\t\t// Fix for upstream issue https://github.com/emmetio/css-parser/issues/3\n\t\t\tif (currentNode.parent\n\t\t\t\t&& currentNode.parent.type !== 'rule'\n\t\t\t\t&& currentNode.parent.type !== 'at-rule') {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tconst propertyNode = <Property>currentNode;\n\t\t\tif (propertyNode.terminatorToken\n\t\t\t\t&& propertyNode.separator\n\t\t\t\t&& offset >= propertyNode.separatorToken.end\n\t\t\t\t&& offset <= propertyNode.terminatorToken.start\n\t\t\t\t&& !abbreviation.includes(':')) {\n\t\t\t\treturn hexColorRegex.test(abbreviation) || abbreviation === '!';\n\t\t\t}\n\t\t\tif (!propertyNode.terminatorToken\n\t\t\t\t&& propertyNode.separator\n\t\t\t\t&& offset >= propertyNode.separatorToken.end\n\t\t\t\t&& !abbreviation.includes(':')) {\n\t\t\t\treturn hexColorRegex.test(abbreviation) || abbreviation === '!';\n\t\t\t}\n\t\t\tif (hexColorRegex.test(abbreviation) || abbreviation === '!') {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// If current node is a rule or at-rule, then perform additional checks to ensure\n\t\t// emmet suggestions are not provided in the rule selector\n\t\tif (currentNode.type !== 'rule' && currentNode.type !== 'at-rule') {\n\t\t\treturn true;\n\t\t}\n\n\t\tconst currentCssNode = <Rule>currentNode;\n\n\t\t// Position is valid if it occurs after the `{` that marks beginning of rule contents\n\t\tif (offset > currentCssNode.contentStartToken.end) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Workaround for https://github.com/microsoft/vscode/30188\n\t\t// The line above the rule selector is considered as part of the selector by the css-parser\n\t\t// But we should assume it is a valid location for css properties under the parent rule\n\t\tif (currentCssNode.parent\n\t\t\t&& (currentCssNode.parent.type === 'rule' || currentCssNode.parent.type === 'at-rule')\n\t\t\t&& currentCssNode.selectorToken) {\n\t\t\tconst position = document.positionAt(offset);\n\t\t\tconst tokenStartPos = document.positionAt(currentCssNode.selectorToken.start);\n\t\t\tconst tokenEndPos = document.positionAt(currentCssNode.selectorToken.end);\n\t\t\tif (position.line !== tokenEndPos.line\n\t\t\t\t&& tokenStartPos.character === abbreviationRange.start.character\n\t\t\t\t&& tokenStartPos.line === abbreviationRange.start.line\n\t\t\t) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tconst startAngle = '<';\n\tconst endAngle = '>';\n\tconst escape = '\\\\';\n\tconst question = '?';\n\tconst currentHtmlNode = <HtmlNode>currentNode;\n\tlet start = 0;\n\n\tif (currentHtmlNode) {\n\t\tif (currentHtmlNode.name === 'script') {\n\t\t\tconst typeAttribute = (currentHtmlNode.attributes || []).filter(x => x.name.toString() === 'type')[0];\n\t\t\tconst typeValue = typeAttribute ? typeAttribute.value.toString() : '';\n\n\t\t\tif (allowedMimeTypesInScriptTag.includes(typeValue)) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tconst isScriptJavascriptType = !typeValue || typeValue === 'application/javascript' || typeValue === 'text/javascript';\n\t\t\tif (isScriptJavascriptType) {\n\t\t\t\treturn !!getSyntaxFromArgs({ language: 'javascript' });\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\t// Fix for https://github.com/microsoft/vscode/issues/28829\n\t\tif (!currentHtmlNode.open || !currentHtmlNode.close ||\n\t\t\t!(currentHtmlNode.open.end <= offset && offset <= currentHtmlNode.close.start)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Fix for https://github.com/microsoft/vscode/issues/35128\n\t\t// Find the position up till where we will backtrack looking for unescaped < or >\n\t\t// to decide if current position is valid for emmet expansion\n\t\tstart = currentHtmlNode.open.end;\n\t\tlet lastChildBeforePosition = currentHtmlNode.firstChild;\n\t\twhile (lastChildBeforePosition) {\n\t\t\tif (lastChildBeforePosition.end > offset) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tstart = lastChildBeforePosition.end;\n\t\t\tlastChildBeforePosition = lastChildBeforePosition.nextSibling;\n\t\t}\n\t}\n\tconst startPos = document.positionAt(start);\n\tlet textToBackTrack = document.getText(new vscode.Range(startPos.line, startPos.character, abbreviationRange.start.line, abbreviationRange.start.character));\n\n\t// Worse case scenario is when cursor is inside a big chunk of text which needs to backtracked\n\t// Backtrack only 500 offsets to ensure we dont waste time doing this\n\tif (textToBackTrack.length > 500) {\n\t\ttextToBackTrack = textToBackTrack.substr(textToBackTrack.length - 500);\n\t}\n\n\tif (!textToBackTrack.trim()) {\n\t\treturn true;\n\t}\n\n\tlet valid = true;\n\tlet foundSpace = false; // If < is found before finding whitespace, then its valid abbreviation. E.g.: <div|\n\tlet i = textToBackTrack.length - 1;\n\tif (textToBackTrack[i] === startAngle) {\n\t\treturn false;\n\t}\n\n\twhile (i >= 0) {\n\t\tconst char = textToBackTrack[i];\n\t\ti--;\n\t\tif (!foundSpace && /\\s/.test(char)) {\n\t\t\tfoundSpace = true;\n\t\t\tcontinue;\n\t\t}\n\t\tif (char === question && textToBackTrack[i] === startAngle) {\n\t\t\ti--;\n\t\t\tcontinue;\n\t\t}\n\t\t// Fix for https://github.com/microsoft/vscode/issues/55411\n\t\t// A space is not a valid character right after < in a tag name.\n\t\tif (/\\s/.test(char) && textToBackTrack[i] === startAngle) {\n\t\t\ti--;\n\t\t\tcontinue;\n\t\t}\n\t\tif (char !== startAngle && char !== endAngle) {\n\t\t\tcontinue;\n\t\t}\n\t\tif (i >= 0 && textToBackTrack[i] === escape) {\n\t\t\ti--;\n\t\t\tcontinue;\n\t\t}\n\t\tif (char === endAngle) {\n\t\t\tif (i >= 0 && textToBackTrack[i] === '=') {\n\t\t\t\tcontinue; // False alarm of cases like =>\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (char === startAngle) {\n\t\t\tvalid = !foundSpace;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn valid;\n}\n\n/**\n * Expands abbreviations as detailed in expandAbbrList in the editor\n *\n * @returns false if no snippet can be inserted.\n */\nasync function expandAbbreviationInRange(editor: vscode.TextEditor, expandAbbrList: ExpandAbbreviationInput[], insertSameSnippet: boolean): Promise<boolean> {\n\tif (!expandAbbrList || expandAbbrList.length === 0) {\n\t\treturn false;\n\t}\n\n\t// Snippet to replace at multiple cursors are not the same\n\t// `editor.insertSnippet` will have to be called for each instance separately\n\t// We will not be able to maintain multiple cursors after snippet insertion\n\tlet insertedSnippetsCount = 0;\n\tif (!insertSameSnippet) {\n\t\texpandAbbrList.sort((a: ExpandAbbreviationInput, b: ExpandAbbreviationInput) => { return b.rangeToReplace.start.compareTo(a.rangeToReplace.start); });\n\t\tfor (const expandAbbrInput of expandAbbrList) {\n\t\t\tconst expandedText = expandAbbr(expandAbbrInput);\n\t\t\tif (expandedText) {\n\t\t\t\tawait editor.insertSnippet(new vscode.SnippetString(expandedText), expandAbbrInput.rangeToReplace, { undoStopBefore: false, undoStopAfter: false });\n\t\t\t\tinsertedSnippetsCount++;\n\t\t\t}\n\t\t}\n\t\treturn insertedSnippetsCount > 0;\n\t}\n\n\t// Snippet to replace at all cursors are the same\n\t// We can pass all ranges to `editor.insertSnippet` in a single call so that\n\t// all cursors are maintained after snippet insertion\n\tconst anyExpandAbbrInput = expandAbbrList[0];\n\tconst expandedText = expandAbbr(anyExpandAbbrInput);\n\tconst allRanges = expandAbbrList.map(value => value.rangeToReplace);\n\tif (expandedText) {\n\t\treturn editor.insertSnippet(new vscode.SnippetString(expandedText), allRanges);\n\t}\n\treturn false;\n}\n\n/**\n * Expands abbreviation as detailed in given input.\n */\nfunction expandAbbr(input: ExpandAbbreviationInput): string | undefined {\n\tconst helper = getEmmetHelper();\n\tconst expandOptions = helper.getExpandOptions(input.syntax, getEmmetConfiguration(input.syntax), input.filter);\n\n\tif (input.textToWrap) {\n\t\t// escape ${ sections, fixes #122231\n\t\tinput.textToWrap = input.textToWrap.map(e => e.replace(/\\$\\{/g, '\\\\\\$\\{'));\n\t\tif (input.filter && input.filter.includes('t')) {\n\t\t\tinput.textToWrap = input.textToWrap.map(line => {\n\t\t\t\treturn line.replace(trimRegex, '').trim();\n\t\t\t});\n\t\t}\n\t\texpandOptions['text'] = input.textToWrap;\n\n\t\tif (expandOptions.options) {\n\t\t\t// Below fixes https://github.com/microsoft/vscode/issues/29898\n\t\t\t// With this, Emmet formats inline elements as block elements\n\t\t\t// ensuring the wrapped multi line text does not get merged to a single line\n\t\t\tif (!input.rangeToReplace.isSingleLine) {\n\t\t\t\texpandOptions.options['output.inlineBreak'] = 1;\n\t\t\t}\n\n\t\t\tif (input.indent) {\n\t\t\t\texpandOptions.options['output.indent'] = input.indent;\n\t\t\t}\n\t\t\tif (input.baseIndent) {\n\t\t\t\texpandOptions.options['output.baseIndent'] = input.baseIndent;\n\t\t\t}\n\t\t}\n\t}\n\n\tlet expandedText: string | undefined;\n\ttry {\n\t\texpandedText = helper.expandAbbreviation(input.abbreviation, expandOptions);\n\t} catch (e) {\n\t\tvoid vscode.window.showErrorMessage('Failed to expand abbreviation');\n\t}\n\n\treturn expandedText;\n}\n\nexport function getSyntaxFromArgs(args: { [x: string]: string }): string | undefined {\n\tconst mappedModes = getMappingForIncludedLanguages();\n\tconst language: string = args['language'];\n\tconst parentMode: string = args['parentMode'];\n\tconst excludedLanguages = vscode.workspace.getConfiguration('emmet')['excludeLanguages'] ? vscode.workspace.getConfiguration('emmet')['excludeLanguages'] : [];\n\tif (excludedLanguages.includes(language)) {\n\t\treturn;\n\t}\n\n\tlet syntax = getEmmetMode(mappedModes[language] ?? language, mappedModes, excludedLanguages);\n\tif (!syntax) {\n\t\tsyntax = getEmmetMode(mappedModes[parentMode] ?? parentMode, mappedModes, excludedLanguages);\n\t}\n\n\treturn syntax;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as vscode from 'vscode';\nimport parse from '@emmetio/html-matcher';\nimport parseStylesheet from '@emmetio/css-parser';\nimport { Node as FlatNode, HtmlNode as HtmlFlatNode, Property as FlatProperty, Rule as FlatRule, CssToken as FlatCssToken, Stylesheet as FlatStylesheet } from 'EmmetFlatNode';\nimport { DocumentStreamReader } from './bufferStream';\nimport * as EmmetHelper from '@vscode/emmet-helper';\nimport { TextDocument as LSTextDocument } from 'vscode-languageserver-textdocument';\nimport { getRootNode } from './parseDocument';\n\nlet _emmetHelper: typeof EmmetHelper;\nlet _currentExtensionsPath: string[] | undefined;\n\nlet _homeDir: vscode.Uri | undefined;\n\n\nexport function setHomeDir(homeDir: vscode.Uri) {\n\t_homeDir = homeDir;\n}\n\nexport function getEmmetHelper() {\n\t// Lazy load vscode-emmet-helper instead of importing it\n\t// directly to reduce the start-up time of the extension\n\tif (!_emmetHelper) {\n\t\t_emmetHelper = require('@vscode/emmet-helper');\n\t}\n\treturn _emmetHelper;\n}\n\n/**\n * Update Emmet Helper to use user snippets from the extensionsPath setting\n */\nexport function updateEmmetExtensionsPath(forceRefresh: boolean = false) {\n\tconst helper = getEmmetHelper();\n\tlet extensionsPath = vscode.workspace.getConfiguration('emmet').get<string[]>('extensionsPath');\n\tif (!extensionsPath) {\n\t\textensionsPath = [];\n\t}\n\tif (forceRefresh || _currentExtensionsPath !== extensionsPath) {\n\t\t_currentExtensionsPath = extensionsPath;\n\t\tconst rootPaths = vscode.workspace.workspaceFolders?.length ? vscode.workspace.workspaceFolders.map(f => f.uri) : undefined;\n\t\tconst fileSystem = vscode.workspace.fs;\n\t\thelper.updateExtensionsPath(extensionsPath, fileSystem, rootPaths, _homeDir).catch(err => {\n\t\t\tif (Array.isArray(extensionsPath) && extensionsPath.length) {\n\t\t\t\tvscode.window.showErrorMessage(err.message);\n\t\t\t}\n\t\t});\n\t}\n}\n\n/**\n * Migrate old configuration(string) for extensionsPath to new type(string[])\n * https://github.com/microsoft/vscode/issues/117517\n */\nexport function migrateEmmetExtensionsPath() {\n\t// Get the detail info of emmet.extensionsPath setting\n\tconst config = vscode.workspace.getConfiguration().inspect('emmet.extensionsPath');\n\n\t// Update Global setting if the value type is string or the value is null\n\tif (typeof config?.globalValue === 'string') {\n\t\tvscode.workspace.getConfiguration().update('emmet.extensionsPath', [config.globalValue], true);\n\t} else if (config?.globalValue === null) {\n\t\tvscode.workspace.getConfiguration().update('emmet.extensionsPath', [], true);\n\t}\n\t// Update Workspace setting if the value type is string or the value is null\n\tif (typeof config?.workspaceValue === 'string') {\n\t\tvscode.workspace.getConfiguration().update('emmet.extensionsPath', [config.workspaceValue], false);\n\t} else if (config?.workspaceValue === null) {\n\t\tvscode.workspace.getConfiguration().update('emmet.extensionsPath', [], false);\n\t}\n\t// Update WorkspaceFolder setting if the value type is string or the value is null\n\tif (typeof config?.workspaceFolderValue === 'string') {\n\t\tvscode.workspace.getConfiguration().update('emmet.extensionsPath', [config.workspaceFolderValue]);\n\t} else if (config?.workspaceFolderValue === null) {\n\t\tvscode.workspace.getConfiguration().update('emmet.extensionsPath', []);\n\t}\n}\n\n/**\n * Mapping between languages that support Emmet and completion trigger characters\n */\nexport const LANGUAGE_MODES: { [id: string]: string[] } = {\n\t'html': ['!', '.', '}', ':', '*', '$', ']', '/', '>', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],\n\t'jade': ['!', '.', '}', ':', '*', '$', ']', '/', '>', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],\n\t'slim': ['!', '.', '}', ':', '*', '$', ']', '/', '>', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],\n\t'haml': ['!', '.', '}', ':', '*', '$', ']', '/', '>', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],\n\t'xml': ['.', '}', '*', '$', ']', '/', '>', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],\n\t'xsl': ['!', '.', '}', '*', '$', '/', ']', '>', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],\n\t'css': [':', '!', '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],\n\t'scss': [':', '!', '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],\n\t'sass': [':', '!', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],\n\t'less': [':', '!', '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],\n\t'stylus': [':', '!', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],\n\t'javascriptreact': ['!', '.', '}', '*', '$', ']', '/', '>', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],\n\t'typescriptreact': ['!', '.', '}', '*', '$', ']', '/', '>', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9']\n};\n\nexport function isStyleSheet(syntax: string): boolean {\n\tconst stylesheetSyntaxes = ['css', 'scss', 'sass', 'less', 'stylus'];\n\treturn stylesheetSyntaxes.includes(syntax);\n}\n\nexport function validate(allowStylesheet: boolean = true): boolean {\n\tconst editor = vscode.window.activeTextEditor;\n\tif (!editor) {\n\t\tvscode.window.showInformationMessage('No editor is active');\n\t\treturn false;\n\t}\n\tif (!allowStylesheet && isStyleSheet(editor.document.languageId)) {\n\t\treturn false;\n\t}\n\treturn true;\n}\n\nexport function getMappingForIncludedLanguages(): Record<string, string> {\n\t// Explicitly map languages that have built-in grammar in VS Code to their parent language\n\t// to get emmet completion support\n\t// For other languages, users will have to use `emmet.includeLanguages` or\n\t// language specific extensions can provide emmet completion support\n\tconst MAPPED_MODES: Record<string, string> = {\n\t\t'handlebars': 'html',\n\t\t'php': 'html'\n\t};\n\n\tconst finalMappedModes: Record<string, string> = {};\n\tconst includeLanguagesConfig = vscode.workspace.getConfiguration('emmet').get<Record<string, string>>('includeLanguages');\n\tconst includeLanguages = Object.assign({}, MAPPED_MODES, includeLanguagesConfig ?? {});\n\tObject.keys(includeLanguages).forEach(syntax => {\n\t\tif (typeof includeLanguages[syntax] === 'string' && LANGUAGE_MODES[includeLanguages[syntax]]) {\n\t\t\tfinalMappedModes[syntax] = includeLanguages[syntax];\n\t\t}\n\t});\n\treturn finalMappedModes;\n}\n\n/**\n* Get the corresponding emmet mode for given vscode language mode\n* E.g.: jsx for typescriptreact/javascriptreact or pug for jade\n* If the language is not supported by emmet or has been excluded via `excludeLanguages` setting,\n* then nothing is returned\n*\n* @param excludedLanguages Array of language ids that user has chosen to exclude for emmet\n*/\nexport function getEmmetMode(language: string, mappedModes: Record<string, string>, excludedLanguages: string[]): string | undefined {\n\tif (!language || excludedLanguages.includes(language)) {\n\t\treturn;\n\t}\n\n\tif (language === 'jsx-tags') {\n\t\tlanguage = 'javascriptreact';\n\t}\n\n\tif (mappedModes[language]) {\n\t\tlanguage = mappedModes[language];\n\t}\n\n\tif (/\\b(typescriptreact|javascriptreact|jsx-tags)\\b/.test(language)) { // treat tsx like jsx\n\t\tlanguage = 'jsx';\n\t}\n\telse if (language === 'sass-indented') { // map sass-indented to sass\n\t\tlanguage = 'sass';\n\t}\n\telse if (language === 'jade' || language === 'pug') {\n\t\tlanguage = 'pug';\n\t}\n\n\tconst syntaxes = getSyntaxes();\n\tif (syntaxes.markup.includes(language) || syntaxes.stylesheet.includes(language)) {\n\t\treturn language;\n\t}\n\treturn;\n}\n\nconst closeBrace = 125;\nconst openBrace = 123;\nconst slash = 47;\nconst star = 42;\n\n/**\n * Traverse the given document backward & forward from given position\n * to find a complete ruleset, then parse just that to return a Stylesheet\n * @param document vscode.TextDocument\n * @param position vscode.Position\n */\nexport function parsePartialStylesheet(document: vscode.TextDocument, position: vscode.Position): FlatStylesheet | undefined {\n\tconst isCSS = document.languageId === 'css';\n\tconst positionOffset = document.offsetAt(position);\n\tlet startOffset = 0;\n\tlet endOffset = document.getText().length;\n\tconst limitCharacter = positionOffset - 5000;\n\tconst limitOffset = limitCharacter > 0 ? limitCharacter : startOffset;\n\tconst stream = new DocumentStreamReader(document, positionOffset);\n\n\tfunction findOpeningCommentBeforePosition(pos: number): number | undefined {\n\t\tconst text = document.getText().substring(0, pos);\n\t\tconst offset = text.lastIndexOf('/*');\n\t\tif (offset === -1) {\n\t\t\treturn;\n\t\t}\n\t\treturn offset;\n\t}\n\n\tfunction findClosingCommentAfterPosition(pos: number): number | undefined {\n\t\tconst text = document.getText().substring(pos);\n\t\tlet offset = text.indexOf('*/');\n\t\tif (offset === -1) {\n\t\t\treturn;\n\t\t}\n\t\toffset += 2 + pos;\n\t\treturn offset;\n\t}\n\n\tfunction consumeLineCommentBackwards() {\n\t\tconst posLineNumber = document.positionAt(stream.pos).line;\n\t\tif (!isCSS && currentLine !== posLineNumber) {\n\t\t\tcurrentLine = posLineNumber;\n\t\t\tconst startLineComment = document.lineAt(currentLine).text.indexOf('//');\n\t\t\tif (startLineComment > -1) {\n\t\t\t\tstream.pos = document.offsetAt(new vscode.Position(currentLine, startLineComment));\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction consumeBlockCommentBackwards() {\n\t\tif (!stream.sof() && stream.peek() === slash) {\n\t\t\tif (stream.backUp(1) === star) {\n\t\t\t\tstream.pos = findOpeningCommentBeforePosition(stream.pos) ?? startOffset;\n\t\t\t} else {\n\t\t\t\tstream.next();\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction consumeCommentForwards() {\n\t\tif (stream.eat(slash)) {\n\t\t\tif (stream.eat(slash) && !isCSS) {\n\t\t\t\tconst posLineNumber = document.positionAt(stream.pos).line;\n\t\t\t\tstream.pos = document.offsetAt(new vscode.Position(posLineNumber + 1, 0));\n\t\t\t} else if (stream.eat(star)) {\n\t\t\t\tstream.pos = findClosingCommentAfterPosition(stream.pos) ?? endOffset;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Go forward until we find a closing brace.\n\twhile (!stream.eof() && !stream.eat(closeBrace)) {\n\t\tif (stream.peek() === slash) {\n\t\t\tconsumeCommentForwards();\n\t\t} else {\n\t\t\tstream.next();\n\t\t}\n\t}\n\n\tif (!stream.eof()) {\n\t\tendOffset = stream.pos;\n\t}\n\n\tstream.pos = positionOffset;\n\tlet openBracesToFind = 1;\n\tlet currentLine = position.line;\n\tlet exit = false;\n\n\t// Go back until we found an opening brace. If we find a closing one, consume its pair and continue.\n\twhile (!exit && openBracesToFind > 0 && !stream.sof()) {\n\t\tconsumeLineCommentBackwards();\n\n\t\tswitch (stream.backUp(1)) {\n\t\t\tcase openBrace:\n\t\t\t\topenBracesToFind--;\n\t\t\t\tbreak;\n\t\t\tcase closeBrace:\n\t\t\t\tif (isCSS) {\n\t\t\t\t\tstream.next();\n\t\t\t\t\tstartOffset = stream.pos;\n\t\t\t\t\texit = true;\n\t\t\t\t} else {\n\t\t\t\t\topenBracesToFind++;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase slash:\n\t\t\t\tconsumeBlockCommentBackwards();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif (position.line - document.positionAt(stream.pos).line > 100\n\t\t\t|| stream.pos <= limitOffset) {\n\t\t\texit = true;\n\t\t}\n\t}\n\n\t// We are at an opening brace. We need to include its selector.\n\tcurrentLine = document.positionAt(stream.pos).line;\n\topenBracesToFind = 0;\n\tlet foundSelector = false;\n\twhile (!exit && !stream.sof() && !foundSelector && openBracesToFind >= 0) {\n\t\tconsumeLineCommentBackwards();\n\n\t\tconst ch = stream.backUp(1);\n\t\tif (/\\s/.test(String.fromCharCode(ch))) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tswitch (ch) {\n\t\t\tcase slash:\n\t\t\t\tconsumeBlockCommentBackwards();\n\t\t\t\tbreak;\n\t\t\tcase closeBrace:\n\t\t\t\topenBracesToFind++;\n\t\t\t\tbreak;\n\t\t\tcase openBrace:\n\t\t\t\topenBracesToFind--;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tif (!openBracesToFind) {\n\t\t\t\t\tfoundSelector = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif (!stream.sof() && foundSelector) {\n\t\t\tstartOffset = stream.pos;\n\t\t}\n\t}\n\n\ttry {\n\t\tconst buffer = ' '.repeat(startOffset) + document.getText().substring(startOffset, endOffset);\n\t\treturn parseStylesheet(buffer);\n\t} catch (e) {\n\t\treturn;\n\t}\n}\n\n/**\n * Returns node corresponding to given position in the given root node\n */\nexport function getFlatNode(root: FlatNode | undefined, offset: number, includeNodeBoundary: boolean): FlatNode | undefined {\n\tif (!root) {\n\t\treturn;\n\t}\n\n\tfunction getFlatNodeChild(child: FlatNode | undefined): FlatNode | undefined {\n\t\tif (!child) {\n\t\t\treturn;\n\t\t}\n\t\tconst nodeStart = child.start;\n\t\tconst nodeEnd = child.end;\n\t\tif ((nodeStart < offset && nodeEnd > offset)\n\t\t\t|| (includeNodeBoundary && nodeStart <= offset && nodeEnd >= offset)) {\n\t\t\treturn getFlatNodeChildren(child.children) ?? child;\n\t\t}\n\t\telse if ('close' in <any>child) {\n\t\t\t// We have an HTML node in this case.\n\t\t\t// In case this node is an invalid unpaired HTML node,\n\t\t\t// we still want to search its children\n\t\t\tconst htmlChild = <HtmlFlatNode>child;\n\t\t\tif (htmlChild.open && !htmlChild.close) {\n\t\t\t\treturn getFlatNodeChildren(htmlChild.children);\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}\n\n\tfunction getFlatNodeChildren(children: FlatNode[]): FlatNode | undefined {\n\t\tfor (let i = 0; i < children.length; i++) {\n\t\t\tconst foundChild = getFlatNodeChild(children[i]);\n\t\t\tif (foundChild) {\n\t\t\t\treturn foundChild;\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}\n\n\treturn getFlatNodeChildren(root.children);\n}\n\nexport const allowedMimeTypesInScriptTag = ['text/html', 'text/plain', 'text/x-template', 'text/template', 'text/ng-template'];\n\n/**\n * Finds the HTML node within an HTML document at a given position\n * If position is inside a script tag of type template, then it will be parsed to find the inner HTML node as well\n */\nexport function getHtmlFlatNode(documentText: string, root: FlatNode | undefined, offset: number, includeNodeBoundary: boolean): HtmlFlatNode | undefined {\n\tlet currentNode: HtmlFlatNode | undefined = <HtmlFlatNode | undefined>getFlatNode(root, offset, includeNodeBoundary);\n\tif (!currentNode) { return; }\n\n\t// If the currentNode is a script one, first set up its subtree and then find HTML node.\n\tif (currentNode.name === 'script' && currentNode.children.length === 0) {\n\t\tconst scriptNodeBody = setupScriptNodeSubtree(documentText, currentNode);\n\t\tif (scriptNodeBody) {\n\t\t\tcurrentNode = getHtmlFlatNode(scriptNodeBody, currentNode, offset, includeNodeBoundary) ?? currentNode;\n\t\t}\n\t}\n\telse if (currentNode.type === 'cdata') {\n\t\tconst cdataBody = setupCdataNodeSubtree(documentText, currentNode);\n\t\tcurrentNode = getHtmlFlatNode(cdataBody, currentNode, offset, includeNodeBoundary) ?? currentNode;\n\t}\n\treturn currentNode;\n}\n\nexport function setupScriptNodeSubtree(documentText: string, scriptNode: HtmlFlatNode): string {\n\tconst isTemplateScript = scriptNode.name === 'script' &&\n\t\t(scriptNode.attributes &&\n\t\t\tscriptNode.attributes.some(x => x.name.toString() === 'type'\n\t\t\t\t&& allowedMimeTypesInScriptTag.includes(x.value.toString())));\n\tif (isTemplateScript\n\t\t&& scriptNode.open) {\n\t\t// blank out the rest of the document and generate the subtree.\n\t\tconst beforePadding = ' '.repeat(scriptNode.open.end);\n\t\tconst endToUse = scriptNode.close ? scriptNode.close.start : scriptNode.end;\n\t\tconst scriptBodyText = beforePadding + documentText.substring(scriptNode.open.end, endToUse);\n\t\tconst innerRoot: HtmlFlatNode = parse(scriptBodyText);\n\t\tinnerRoot.children.forEach(child => {\n\t\t\tscriptNode.children.push(child);\n\t\t\tchild.parent = scriptNode;\n\t\t});\n\t\treturn scriptBodyText;\n\t}\n\treturn '';\n}\n\nexport function setupCdataNodeSubtree(documentText: string, cdataNode: HtmlFlatNode): string {\n\t// blank out the rest of the document and generate the subtree.\n\tconst cdataStart = '<![CDATA[';\n\tconst cdataEnd = ']]>';\n\tconst startToUse = cdataNode.start + cdataStart.length;\n\tconst endToUse = cdataNode.end - cdataEnd.length;\n\tconst beforePadding = ' '.repeat(startToUse);\n\tconst cdataBody = beforePadding + documentText.substring(startToUse, endToUse);\n\tconst innerRoot: HtmlFlatNode = parse(cdataBody);\n\tinnerRoot.children.forEach(child => {\n\t\tcdataNode.children.push(child);\n\t\tchild.parent = cdataNode;\n\t});\n\treturn cdataBody;\n}\n\nexport function isOffsetInsideOpenOrCloseTag(node: FlatNode, offset: number): boolean {\n\tconst htmlNode = node as HtmlFlatNode;\n\tif ((htmlNode.open && offset > htmlNode.open.start && offset < htmlNode.open.end)\n\t\t|| (htmlNode.close && offset > htmlNode.close.start && offset < htmlNode.close.end)) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n\nexport function offsetRangeToSelection(document: vscode.TextDocument, start: number, end: number): vscode.Selection {\n\tconst startPos = document.positionAt(start);\n\tconst endPos = document.positionAt(end);\n\treturn new vscode.Selection(startPos, endPos);\n}\n\nexport function offsetRangeToVsRange(document: vscode.TextDocument, start: number, end: number): vscode.Range {\n\tconst startPos = document.positionAt(start);\n\tconst endPos = document.positionAt(end);\n\treturn new vscode.Range(startPos, endPos);\n}\n\n/**\n * Returns the deepest non comment node under given node\n */\nexport function getDeepestFlatNode(node: FlatNode | undefined): FlatNode | undefined {\n\tif (!node || !node.children || node.children.length === 0 || !node.children.find(x => x.type !== 'comment')) {\n\t\treturn node;\n\t}\n\tfor (let i = node.children.length - 1; i >= 0; i--) {\n\t\tif (node.children[i].type !== 'comment') {\n\t\t\treturn getDeepestFlatNode(node.children[i]);\n\t\t}\n\t}\n\treturn undefined;\n}\n\nexport function findNextWord(propertyValue: string, pos: number): [number | undefined, number | undefined] {\n\n\tlet foundSpace = pos === -1;\n\tlet foundStart = false;\n\tlet foundEnd = false;\n\n\tlet newSelectionStart;\n\tlet newSelectionEnd;\n\twhile (pos < propertyValue.length - 1) {\n\t\tpos++;\n\t\tif (!foundSpace) {\n\t\t\tif (propertyValue[pos] === ' ') {\n\t\t\t\tfoundSpace = true;\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\t\tif (foundSpace && !foundStart && propertyValue[pos] === ' ') {\n\t\t\tcontinue;\n\t\t}\n\t\tif (!foundStart) {\n\t\t\tnewSelectionStart = pos;\n\t\t\tfoundStart = true;\n\t\t\tcontinue;\n\t\t}\n\t\tif (propertyValue[pos] === ' ') {\n\t\t\tnewSelectionEnd = pos;\n\t\t\tfoundEnd = true;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif (foundStart && !foundEnd) {\n\t\tnewSelectionEnd = propertyValue.length;\n\t}\n\n\treturn [newSelectionStart, newSelectionEnd];\n}\n\nexport function findPrevWord(propertyValue: string, pos: number): [number | undefined, number | undefined] {\n\n\tlet foundSpace = pos === propertyValue.length;\n\tlet foundStart = false;\n\tlet foundEnd = false;\n\n\tlet newSelectionStart;\n\tlet newSelectionEnd;\n\twhile (pos > -1) {\n\t\tpos--;\n\t\tif (!foundSpace) {\n\t\t\tif (propertyValue[pos] === ' ') {\n\t\t\t\tfoundSpace = true;\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\t\tif (foundSpace && !foundEnd && propertyValue[pos] === ' ') {\n\t\t\tcontinue;\n\t\t}\n\t\tif (!foundEnd) {\n\t\t\tnewSelectionEnd = pos + 1;\n\t\t\tfoundEnd = true;\n\t\t\tcontinue;\n\t\t}\n\t\tif (propertyValue[pos] === ' ') {\n\t\t\tnewSelectionStart = pos + 1;\n\t\t\tfoundStart = true;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif (foundEnd && !foundStart) {\n\t\tnewSelectionStart = 0;\n\t}\n\n\treturn [newSelectionStart, newSelectionEnd];\n}\n\nexport function getNodesInBetween(node1: FlatNode, node2: FlatNode): FlatNode[] {\n\t// Same node\n\tif (sameNodes(node1, node2)) {\n\t\treturn [node1];\n\t}\n\n\t// Not siblings\n\tif (!sameNodes(node1.parent, node2.parent)) {\n\t\t// node2 is ancestor of node1\n\t\tif (node2.start < node1.start) {\n\t\t\treturn [node2];\n\t\t}\n\n\t\t// node1 is ancestor of node2\n\t\tif (node2.start < node1.end) {\n\t\t\treturn [node1];\n\t\t}\n\n\t\t// Get the highest ancestor of node1 that should be commented\n\t\twhile (node1.parent && node1.parent.end < node2.start) {\n\t\t\tnode1 = node1.parent;\n\t\t}\n\n\t\t// Get the highest ancestor of node2 that should be commented\n\t\twhile (node2.parent && node2.parent.start > node1.start) {\n\t\t\tnode2 = node2.parent;\n\t\t}\n\t}\n\n\tconst siblings: FlatNode[] = [];\n\tlet currentNode: FlatNode | undefined = node1;\n\tconst position = node2.end;\n\twhile (currentNode && position > currentNode.start) {\n\t\tsiblings.push(currentNode);\n\t\tcurrentNode = currentNode.nextSibling;\n\t}\n\treturn siblings;\n}\n\nexport function sameNodes(node1: FlatNode | undefined, node2: FlatNode | undefined): boolean {\n\t// return true if they're both undefined\n\tif (!node1 && !node2) {\n\t\treturn true;\n\t}\n\t// return false if only one of them is undefined\n\tif (!node1 || !node2) {\n\t\treturn false;\n\t}\n\treturn node1.start === node2.start && node1.end === node2.end;\n}\n\nexport function getEmmetConfiguration(syntax: string) {\n\tconst emmetConfig = vscode.workspace.getConfiguration('emmet');\n\tconst syntaxProfiles = Object.assign({}, emmetConfig['syntaxProfiles'] || {});\n\tconst preferences = Object.assign({}, emmetConfig['preferences'] || {});\n\t// jsx, xml and xsl syntaxes need to have self closing tags unless otherwise configured by user\n\tif (syntax === 'jsx' || syntax === 'xml' || syntax === 'xsl') {\n\t\tsyntaxProfiles[syntax] = syntaxProfiles[syntax] || {};\n\t\tif (typeof syntaxProfiles[syntax] === 'object'\n\t\t\t&& !syntaxProfiles[syntax].hasOwnProperty('self_closing_tag') // Old Emmet format\n\t\t\t&& !syntaxProfiles[syntax].hasOwnProperty('selfClosingStyle') // Emmet 2.0 format\n\t\t) {\n\t\t\tsyntaxProfiles[syntax] = {\n\t\t\t\t...syntaxProfiles[syntax],\n\t\t\t\tselfClosingStyle: syntax === 'jsx' ? 'xhtml' : 'xml'\n\t\t\t};\n\t\t}\n\t}\n\n\treturn {\n\t\tpreferences,\n\t\tshowExpandedAbbreviation: emmetConfig['showExpandedAbbreviation'],\n\t\tshowAbbreviationSuggestions: emmetConfig['showAbbreviationSuggestions'],\n\t\tsyntaxProfiles,\n\t\tvariables: emmetConfig['variables'],\n\t\texcludeLanguages: emmetConfig['excludeLanguages'],\n\t\tshowSuggestionsAsSnippets: emmetConfig['showSuggestionsAsSnippets']\n\t};\n}\n\n/**\n * Itereates by each child, as well as nested child's children, in their order\n * and invokes `fn` for each. If `fn` function returns `false`, iteration stops\n */\nexport function iterateCSSToken(token: FlatCssToken, fn: (x: any) => any): boolean {\n\tfor (let i = 0, il = token.size; i < il; i++) {\n\t\tif (fn(token.item(i)) === false || iterateCSSToken(token.item(i), fn) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n\n/**\n * Returns `name` CSS property from given `rule`\n */\nexport function getCssPropertyFromRule(rule: FlatRule, name: string): FlatProperty | undefined {\n\treturn rule.children.find(node => node.type === 'property' && node.name === name) as FlatProperty;\n}\n\n/**\n * Returns css property under caret in given editor or `null` if such node cannot\n * be found\n */\nexport function getCssPropertyFromDocument(editor: vscode.TextEditor, position: vscode.Position): FlatProperty | null {\n\tconst document = editor.document;\n\tconst rootNode = getRootNode(document, true);\n\tconst offset = document.offsetAt(position);\n\tconst node = getFlatNode(rootNode, offset, true);\n\n\tif (isStyleSheet(editor.document.languageId)) {\n\t\treturn node && node.type === 'property' ? <FlatProperty>node : null;\n\t}\n\n\tconst htmlNode = <HtmlFlatNode>node;\n\tif (htmlNode\n\t\t&& htmlNode.name === 'style'\n\t\t&& htmlNode.open && htmlNode.close\n\t\t&& htmlNode.open.end < offset\n\t\t&& htmlNode.close.start > offset) {\n\t\tconst buffer = ' '.repeat(htmlNode.start) +\n\t\t\tdocument.getText().substring(htmlNode.start, htmlNode.end);\n\t\tconst innerRootNode = parseStylesheet(buffer);\n\t\tconst innerNode = getFlatNode(innerRootNode, offset, true);\n\t\treturn (innerNode && innerNode.type === 'property') ? <FlatProperty>innerNode : null;\n\t}\n\n\treturn null;\n}\n\n\nexport function getEmbeddedCssNodeIfAny(document: vscode.TextDocument, currentNode: FlatNode | undefined, position: vscode.Position): FlatNode | undefined {\n\tif (!currentNode) {\n\t\treturn;\n\t}\n\tconst currentHtmlNode = <HtmlFlatNode>currentNode;\n\tif (currentHtmlNode && currentHtmlNode.open && currentHtmlNode.close) {\n\t\tconst offset = document.offsetAt(position);\n\t\tif (currentHtmlNode.open.end < offset && offset <= currentHtmlNode.close.start) {\n\t\t\tif (currentHtmlNode.name === 'style') {\n\t\t\t\tconst buffer = ' '.repeat(currentHtmlNode.open.end) + document.getText().substring(currentHtmlNode.open.end, currentHtmlNode.close.start);\n\t\t\t\treturn parseStylesheet(buffer);\n\t\t\t}\n\t\t}\n\t}\n\treturn;\n}\n\nexport function isStyleAttribute(currentNode: FlatNode | undefined, offset: number): boolean {\n\tif (!currentNode) {\n\t\treturn false;\n\t}\n\tconst currentHtmlNode = <HtmlFlatNode>currentNode;\n\tconst index = (currentHtmlNode.attributes || []).findIndex(x => x.name.toString() === 'style');\n\tif (index === -1) {\n\t\treturn false;\n\t}\n\tconst styleAttribute = currentHtmlNode.attributes[index];\n\treturn offset >= styleAttribute.value.start && offset <= styleAttribute.value.end;\n}\n\nexport function isNumber(obj: any): obj is number {\n\treturn typeof obj === 'number';\n}\n\nexport function toLSTextDocument(doc: vscode.TextDocument): LSTextDocument {\n\treturn LSTextDocument.create(doc.uri.toString(), doc.languageId, doc.version, doc.getText());\n}\n\nexport function getPathBaseName(path: string): string {\n\tconst pathAfterSlashSplit = path.split('/').pop();\n\tconst pathAfterBackslashSplit = pathAfterSlashSplit ? pathAfterSlashSplit.split('\\\\').pop() : '';\n\treturn pathAfterBackslashSplit ?? '';\n}\n\nexport function getSyntaxes() {\n\t/**\n\t * List of all known syntaxes, from emmetio/emmet\n\t */\n\treturn {\n\t\tmarkup: ['html', 'xml', 'xsl', 'jsx', 'js', 'pug', 'slim', 'haml'],\n\t\tstylesheet: ['css', 'sass', 'scss', 'less', 'sss', 'stylus']\n\t};\n}\n","import StreamReader from '@emmetio/stream-reader';\nimport { eatPair, eatQuoted, isAlphaNumeric, isQuote, isSpace } from '@emmetio/stream-reader-utils';\n\nclass Node {\n\tconstructor(stream, type, open, close) {\n\t\tthis.stream = stream;\n\t\tthis.type = type;\n\t\tthis.open = open;\n\t\tthis.close = close;\n\n\t\tthis.children = [];\n\t\tthis.parent = null;\n\t}\n\n\t/**\n\t * Returns node name\n\t * @return {String}\n\t */\n\tget name() {\n\t\tif (this.type === 'tag' && this.open) {\n\t\t\treturn this.open && this.open.name && this.open.name.value;\n\t\t}\n\n\t\treturn '#' + this.type;\n\t}\n\n\t/**\n\t * Returns attributes of current node\n\t * @return {Array}\n\t */\n\tget attributes() {\n\t\treturn this.open && this.open.attributes;\n\t}\n\n\t/**\n\t * Returns node’s start position in stream\n\t * @return {*}\n\t */\n\tget start() {\n\t\treturn this.open && this.open.start;\n\t}\n\n\t/**\n\t * Returns node’s start position in stream\n\t * @return {*}\n\t */\n\tget end() {\n\t\treturn this.close ? this.close.end : this.open && this.open.end;\n\t}\n\n\tget firstChild() {\n\t\treturn this.children[0];\n\t}\n\n\tget nextSibling() {\n\t\tconst ix = this.getIndex();\n\t\treturn ix !== -1 ? this.parent.children[ix + 1] : null;\n\t}\n\n\tget previousSibling() {\n\t\tconst ix = this.getIndex();\n\t\treturn ix !== -1 ? this.parent.children[ix - 1] : null;\n\t}\n\n\t/**\n\t * Returns current element’s index in parent list of child nodes\n\t * @return {Number}\n\t */\n\tgetIndex() {\n\t\treturn this.parent ? this.parent.children.indexOf(this) : -1;\n\t}\n\n\t/**\n\t * Adds given node as a child\n\t * @param {Node} node\n\t * @return {Node} Current node\n\t */\n\taddChild(node) {\n\t\tthis.removeChild(node);\n\t\tthis.children.push(node);\n\t\tnode.parent = this;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Removes given node from current node’s child list\n\t * @param {Node} node\n\t * @return {Node} Current node\n\t */\n\tremoveChild(node) {\n\t\tconst ix = this.children.indexOf(node);\n\t\tif (ix !== -1) {\n\t\t\tthis.children.splice(ix, 1);\n\t\t\tnode.parent = null;\n\t\t}\n\n\t\treturn this;\n\t}\n}\n\n/**\n * A token factory method\n * @param {StreamReader} stream\n * @param {Point|Function} start Tokens’ start location or stream consumer\n * @param {Point} [end] Tokens’ end location\n * @return {Token}\n */\nvar token = function(stream, start, end) {\n\treturn typeof start === 'function'\n\t\t? eatToken(stream, start)\n\t\t: new Token(stream, start, end);\n};\n\n/**\n * Consumes characters from given stream that matches `fn` call and returns it\n * as token, if consumed\n * @param {StreamReader} stream\n * @param {Function} test\n * @return {Token}\n */\nfunction eatToken(stream, test) {\n\tconst start = stream.pos;\n\tif (stream.eatWhile(test)) {\n\t\treturn new Token(stream, start, stream.pos);\n\t}\n\n\tstream.pos = start;\n}\n\n/**\n * A structure describing text fragment in content stream\n */\nclass Token {\n\t/**\n\t * @param {ContentStreamReader} stream\n\t * @param {Point} start Tokens’ start location in content stream\n\t * @param {Point} end Tokens’ end location in content stream\n\t */\n\tconstructor(stream, start, end) {\n\t\tthis.stream = stream;\n\t\tthis.start = start != null ? start : stream.start;\n\t\tthis.end = end != null ? end : stream.pos;\n\t\tthis._value = null;\n\t}\n\n\t/**\n\t * Returns token textual value\n\t * NB implemented as getter to reduce unnecessary memory allocations for\n\t * strings that not required\n\t * @return {String}\n\t */\n\tget value() {\n\t\tif (this._value === null) {\n\t\t\tconst start = this.stream.start;\n\t\t\tconst end = this.stream.pos;\n\n\t\t\tthis.stream.start = this.start;\n\t\t\tthis.stream.pos = this.end;\n\t\t\tthis._value = this.stream.current();\n\n\t\t\tthis.stream.start = start;\n\t\t\tthis.stream.pos = end;\n\t\t}\n\n\t\treturn this._value;\n\t}\n\n\ttoString() {\n\t\treturn this.value;\n\t}\n\n\tvalueOf() {\n\t\treturn `${this.value} [${this.start}; ${this.end}]`;\n\t}\n}\n\nconst LANGLE = 60;\nconst RANGLE = 62; // < and >\nconst LSQUARE = 91;\nconst RSQUARE = 93; // [ and ]\nconst LROUND = 40;\nconst RROUND = 41; // ( and )\nconst LCURLY = 123;\nconst RCURLY = 125; // { and }\n\nconst opt = { throws: true };\n\n/**\n * Consumes paired tokens (like `[` and `]`) with respect of nesting and embedded\n * quoted values\n * @param {StreamReader} stream\n * @return {Token} A token with consumed paired character\n */\nvar eatPaired = function(stream) {\n\tconst start = stream.pos;\n\tconst consumed = eatPair(stream, LANGLE, RANGLE, opt)\n\t\t|| eatPair(stream, LSQUARE, RSQUARE, opt)\n\t\t|| eatPair(stream, LROUND, RROUND, opt)\n\t\t|| eatPair(stream, LCURLY, RCURLY, opt);\n\n\tif (consumed) {\n\t\treturn token(stream, start);\n\t}\n};\n\nconst SLASH$1 = 47; // /\nconst EQUALS = 61; // =\nconst RIGHT_ANGLE$1 = 62; // >\n\n/**\n * Consumes attributes from given stream\n * @param {StreamReader} stream\n * @return {Array} Array of consumed attributes\n */\nvar eatAttributes = function(stream) {\n\tconst result = [];\n\tlet name, value, attr;\n\n\twhile (!stream.eof()) {\n\t\tstream.eatWhile(isSpace);\n\t\tattr = { start: stream.pos };\n\n\t\t// A name could be a regular name or expression:\n\t\t// React-style – <div {...props}>\n\t\t// Angular-style – <div [ng-for]>\n\t\tif (attr.name = eatAttributeName(stream)) {\n\t\t\t// Consumed attribute name. Can be an attribute with name\n\t\t\t// or boolean attribute. The value can be React-like expression\n\t\t\tif (stream.eat(EQUALS)) {\n\t\t\t\tattr.value = eatAttributeValue(stream);\n\t\t\t} else {\n\t\t\t\tattr.boolean = true;\n\t\t\t}\n\t\t\tattr.end = stream.pos;\n\t\t\tresult.push(attr);\n\t\t} else if (isTerminator(stream.peek())) {\n\t\t\t// look for tag terminator in order to skip any other possible characters\n\t\t\t// (maybe junk)\n\t\t\tbreak;\n\t\t} else {\n\t\t\tstream.next();\n\t\t}\n\t}\n\n\treturn result;\n};\n\n/**\n * Consumes attribute name from current location\n * @param {StreamReader} stream\n * @return {Token}\n */\nfunction eatAttributeName(stream) {\n\treturn eatPaired(stream) || token(stream, isAttributeName);\n}\n\n/**\n * Consumes attribute value from given location\n * @param {StreamReader} stream\n * @return {Token}\n */\nfunction eatAttributeValue(stream) {\n\tconst start = stream.pos;\n\tif (eatQuoted(stream)) {\n\t\t// Should return token that points to unquoted value.\n\t\t// Use stream readers’ public API to traverse instead of direct\n\t\t// manipulation\n\t\tconst current = stream.pos;\n\t\tlet valueStart, valueEnd;\n\n\t\tstream.pos = start;\n\t\tstream.next();\n\t\tvalueStart = stream.start = stream.pos;\n\n\t\tstream.pos = current;\n\t\tstream.backUp(1);\n\t\tvalueEnd = stream.pos;\n\n\t\tconst result = token(stream, valueStart, valueEnd);\n\t\tstream.pos = current;\n\t\treturn result;\n\t}\n\n\treturn eatPaired(stream) || eatUnquoted(stream);\n}\n\n/**\n * Check if given code belongs to attribute name.\n * NB some custom HTML variations allow non-default values in name, like `*ngFor`\n * @param {Number} code\n * @return {Boolean}\n */\nfunction isAttributeName(code) {\n\treturn code !== EQUALS && !isTerminator(code) && !isSpace(code);\n}\n\n/**\n * Check if given code is tag terminator\n * @param {Number} code\n * @return {Boolean}\n */\nfunction isTerminator(code) {\n\treturn code === RIGHT_ANGLE$1 || code === SLASH$1;\n}\n\n/**\n * Eats unquoted value from stream\n * @param {StreamReader} stream\n * @return {Token}\n */\nfunction eatUnquoted(stream) {\n\treturn token(stream, isUnquoted);\n}\n\n/**\n * Check if given character code is valid unquoted value\n * @param {Number} code\n * @return {Boolean}\n */\nfunction isUnquoted(code) {\n\treturn !isNaN(code) && !isQuote(code) && !isSpace(code) && !isTerminator(code);\n}\n\nconst DASH = 45; // -\nconst DOT = 46; // .\nconst SLASH = 47; // /\nconst COLON = 58; // :\nconst LEFT_ANGLE = 60; // <\nconst RIGHT_ANGLE = 62; // >\nconst UNDERSCORE = 95; // _\n\n/**\n * Parses tag definition (open or close tag) from given stream state\n * @param {StreamReader} stream Content stream reader\n * @return {Object}\n */\nvar tag = function(stream) {\n\tconst start = stream.pos;\n\n\tif (stream.eat(LEFT_ANGLE)) {\n\t\tconst model = { type: stream.eat(SLASH) ? 'close' : 'open' };\n\n\t\tif (model.name = eatTagName(stream)) {\n\t\t\tif (model.type !== 'close') {\n\t\t\t\tmodel.attributes = eatAttributes(stream);\n\t\t\t\tstream.eatWhile(isSpace);\n\t\t\t\tmodel.selfClosing = stream.eat(SLASH);\n\t\t\t}\n\n\t\t\tif (stream.eat(RIGHT_ANGLE)) {\n\t\t\t\t// tag properly closed\n\t\t\t\treturn Object.assign(token(stream, start), model);\n\t\t\t}\n\t\t}\n\t}\n\n\t// invalid tag, revert to original position\n\tstream.pos = start;\n\treturn null;\n};\n\n/**\n * Eats HTML identifier (tag or attribute name) from given stream\n * @param {StreamReader} stream\n * @return {Token}\n */\nfunction eatTagName(stream) {\n\treturn token(stream, isTagName);\n}\n\n/**\n * Check if given character code can be used as HTML/XML tag name\n * @param {Number} code\n * @return {Boolean}\n */\nfunction isTagName(code) {\n\treturn isAlphaNumeric(code)\n\t\t|| code === COLON // colon is used for namespaces\n\t\t|| code === DOT // in rare cases declarative tag names may have dots in names\n\t\t|| code === DASH\n\t\t|| code === UNDERSCORE;\n}\n\n/**\n * Eats array of character codes from given stream\n * @param {StreamReader} stream\n * @param {Number[]} codes Array of character codes\n * @return {Boolean}\n */\nfunction eatArray(stream, codes) {\n\tconst start = stream.pos;\n\n\tfor (let i = 0; i < codes.length; i++) {\n\t\tif (!stream.eat(codes[i])) {\n\t\t\tstream.pos = start;\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tstream.start = start;\n\treturn true;\n}\n\n/**\n * Consumes section from given string which starts with `open` character codes\n * and ends with `close` character codes\n * @param {StreamReader} stream\n * @param {Number[]} open\n * @param {Number[]} close\n * @return {Boolean} Returns `true` if section was consumed\n */\nfunction eatSection(stream, open, close, allowUnclosed) {\n\tconst start = stream.pos;\n\tif (eatArray(stream, open)) {\n\t\t// consumed `<!--`, read next until we find ending part or reach the end of input\n\t\twhile (!stream.eof()) {\n\t\t\tif (eatArray(stream, close)) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tstream.next();\n\t\t}\n\n\t\t// unclosed section is allowed\n\t\tif (allowUnclosed) {\n\t\t\treturn true;\n\t\t}\n\n\t\tstream.pos = start;\n\t\treturn false;\n\t}\n\n\t// unable to find section, revert to initial position\n\tstream.pos = start;\n\treturn null;\n}\n\n/**\n * Converts given string into array of character codes\n * @param {String} str\n * @return {Number[]}\n */\nfunction toCharCodes(str) {\n\treturn str.split('').map(ch => ch.charCodeAt(0));\n}\n\nconst open = toCharCodes('<!--');\nconst close = toCharCodes('-->');\n\n/**\n * Consumes HTML comment from given stream\n * @param {StreamReader} stream\n * @return {Token}\n */\nvar comment = function(stream) {\n\tconst start = stream.pos;\n\tif (eatSection(stream, open, close, true)) {\n\t\tconst result = token(stream, start);\n\t\tresult.type = 'comment';\n\t\treturn result;\n\t}\n\n\treturn null;\n};\n\nconst open$1 = toCharCodes('<![CDATA[');\nconst close$1 = toCharCodes(']]>');\n\n/**\n * Consumes CDATA from given stream\n * @param {StreamReader} stream\n * @return {Token}\n */\nvar cdata = function(stream) {\n\tconst start = stream.pos;\n\tif (eatSection(stream, open$1, close$1, true)) {\n\t\tconst result = token(stream, start);\n\t\tresult.type = 'cdata';\n\t\treturn result;\n\t}\n\n\treturn null;\n};\n\nconst defaultOptions = {\n\t/**\n\t * Expect XML content in searching content. It alters how should-be-empty\n\t * elements are treated: for example, in XML mode parser will try to locate\n\t * closing pair for `<br>` tag\n\t * @type {Boolean}\n\t */\n\txml: false,\n\n\tspecial: ['script', 'style'],\n\n\t/**\n\t * List of elements that should be treated as empty (e.g. without closing tag)\n\t * in non-XML syntax\n\t * @type {Array}\n\t */\n\tempty: ['img', 'meta', 'link', 'br', 'base', 'hr', 'area', 'wbr','col', 'embed', 'input', 'param', 'source', 'track']\n};\n\n/**\n * Parses given content into a DOM-like structure\n * @param {String|StreamReader} content\n * @param {Object} options\n * @return {Node}\n */\nfunction parse(content, options) {\n\toptions = Object.assign({}, defaultOptions, options);\n\tconst stream = typeof content === 'string'\n\t\t? new StreamReader(content)\n\t\t: content;\n\n\tconst root = new Node(stream, 'root');\n\tconst empty = new Set(options.empty);\n\tconst special = options.special.reduce(\n\t\t(map, name) => map.set(name, toCharCodes(`</${name}>`)), new Map());\n\tconst isEmpty = (token, name) =>\n\t\ttoken.selfClosing || (!options.xml && empty.has(name));\n\n\tlet m, node, name, stack = [root];\n\n\twhile (!stream.eof()) {\n\t\tif (m = match(stream)) {\n\t\t\tname = getName(m);\n\n\t\t\tif (m.type === 'open') {\n\t\t\t\t// opening tag\n\t\t\t\tnode = new Node(stream, 'tag', m);\n\t\t\t\tlast(stack).addChild(node);\n\t\t\t\tif (special.has(name)) {\n\t\t\t\t\tnode.close = consumeSpecial(stream, special.get(name));\n\t\t\t\t} else if (!isEmpty(m, name)) {\n\t\t\t\t\tstack.push(node);\n\t\t\t\t}\n\t\t\t} else if (m.type === 'close') {\n\t\t\t\t// closing tag, find it’s matching opening tag\n\t\t\t\tfor (let i = stack.length - 1; i > 0; i--) {\n\t\t\t\t\tif (stack[i].name.toLowerCase() === name) {\n\t\t\t\t\t\tstack[i].close = m;\n\t\t\t\t\t\tstack = stack.slice(0, i);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tlast(stack).addChild(new Node(stream, m.type, m));\n\t\t\t}\n\t\t} else {\n\t\t\tstream.next();\n\t\t}\n\t}\n\n\treturn root;\n}\n\n/**\n * Matches known token in current state of given stream\n * @param {ContentStreamReader} stream\n * @return {Token}\n */\nfunction match(stream) {\n\t// fast-path optimization: check for `<` code\n\tif (stream.peek() === 60 /* < */) {\n\t\treturn comment(stream) || cdata(stream) || tag(stream);\n\t}\n}\n\n/**\n * @param {StreamReader} stream\n * @param {Number[]} codes\n * @return {Token}\n */\nfunction consumeSpecial(stream, codes) {\n\tconst start = stream.pos;\n\tlet m;\n\n\twhile (!stream.eof()) {\n\t\tif (eatArray(stream, codes)) {\n\t\t\tstream.pos = stream.start;\n\t\t\treturn tag(stream);\n\t\t}\n\t\tstream.next();\n\t}\n\n\tstream.pos = start;\n\treturn null;\n}\n\n/**\n * Returns name of given matched token\n * @param {Token} tag\n * @return {String}\n */\nfunction getName(tag$$1) {\n\treturn tag$$1.name ? tag$$1.name.value.toLowerCase() : `#${tag$$1.type}`;\n}\n\nfunction last(arr) {\n\treturn arr[arr.length - 1];\n}\n\nexport { defaultOptions, match };export default parse;\n","/**\n * A streaming, character code-based string reader\n */\nclass StreamReader {\n\tconstructor(string, start, end) {\n\t\tif (end == null && typeof string === 'string') {\n\t\t\tend = string.length;\n\t\t}\n\n\t\tthis.string = string;\n\t\tthis.pos = this.start = start || 0;\n\t\tthis.end = end;\n\t}\n\n\t/**\n\t * Returns true only if the stream is at the end of the file.\n\t * @returns {Boolean}\n\t */\n\teof() {\n\t\treturn this.pos >= this.end;\n\t}\n\n\t/**\n\t * Creates a new stream instance which is limited to given `start` and `end`\n\t * range. E.g. its `eof()` method will look at `end` property, not actual\n\t * stream end\n\t * @param {Point} start\n\t * @param {Point} end\n\t * @return {StreamReader}\n\t */\n\tlimit(start, end) {\n\t\treturn new this.constructor(this.string, start, end);\n\t}\n\n\t/**\n\t * Returns the next character code in the stream without advancing it.\n\t * Will return NaN at the end of the file.\n\t * @returns {Number}\n\t */\n\tpeek() {\n\t\treturn this.string.charCodeAt(this.pos);\n\t}\n\n\t/**\n\t * Returns the next character in the stream and advances it.\n\t * Also returns <code>undefined</code> when no more characters are available.\n\t * @returns {Number}\n\t */\n\tnext() {\n\t\tif (this.pos < this.string.length) {\n\t\t\treturn this.string.charCodeAt(this.pos++);\n\t\t}\n\t}\n\n\t/**\n\t * `match` can be a character code or a function that takes a character code\n\t * and returns a boolean. If the next character in the stream 'matches'\n\t * the given argument, it is consumed and returned.\n\t * Otherwise, `false` is returned.\n\t * @param {Number|Function} match\n\t * @returns {Boolean}\n\t */\n\teat(match) {\n\t\tconst ch = this.peek();\n\t\tconst ok = typeof match === 'function' ? match(ch) : ch === match;\n\n\t\tif (ok) {\n\t\t\tthis.next();\n\t\t}\n\n\t\treturn ok;\n\t}\n\n\t/**\n\t * Repeatedly calls <code>eat</code> with the given argument, until it\n\t * fails. Returns <code>true</code> if any characters were eaten.\n\t * @param {Object} match\n\t * @returns {Boolean}\n\t */\n\teatWhile(match) {\n\t\tconst start = this.pos;\n\t\twhile (!this.eof() && this.eat(match)) {}\n\t\treturn this.pos !== start;\n\t}\n\n\t/**\n\t * Backs up the stream n characters. Backing it up further than the\n\t * start of the current token will cause things to break, so be careful.\n\t * @param {Number} n\n\t */\n\tbackUp(n) {\n\t\tthis.pos -= (n || 1);\n\t}\n\n\t/**\n\t * Get the string between the start of the current token and the\n\t * current stream position.\n\t * @returns {String}\n\t */\n\tcurrent() {\n\t\treturn this.substring(this.start, this.pos);\n\t}\n\n\t/**\n\t * Returns substring for given range\n\t * @param {Number} start\n\t * @param {Number} [end]\n\t * @return {String}\n\t */\n\tsubstring(start, end) {\n\t\treturn this.string.slice(start, end);\n\t}\n\n\t/**\n\t * Creates error object with current stream state\n\t * @param {String} message\n\t * @return {Error}\n\t */\n\terror(message) {\n\t\tconst err = new Error(`${message} at char ${this.pos + 1}`);\n\t\terr.originalMessage = message;\n\t\terr.pos = this.pos;\n\t\terr.string = this.string;\n\t\treturn err;\n\t}\n}\n\nexport default StreamReader;\n","/**\n * Methods for consuming quoted values\n */\n\nconst SINGLE_QUOTE = 39; // '\nconst DOUBLE_QUOTE = 34; // \"\n\nconst defaultOptions = {\n\tescape: 92, // \\ character\n\tthrows: false\n};\n\n/**\n * Consumes 'single' or \"double\"-quoted string from given string, if possible\n * @param {StreamReader} stream\n * @param {Number} options.escape A character code of quote-escape symbol\n * @param {Boolean} options.throws Throw error if quotes string can’t be properly consumed\n * @return {Boolean} `true` if quoted string was consumed. The contents\n * of quoted string will be availabe as `stream.current()`\n */\nvar eatQuoted = function(stream, options) {\n\toptions = options ? Object.assign({}, defaultOptions, options) : defaultOptions;\n\tconst start = stream.pos;\n\tconst quote = stream.peek();\n\n\tif (stream.eat(isQuote)) {\n\t\twhile (!stream.eof()) {\n\t\t\tswitch (stream.next()) {\n\t\t\t\tcase quote:\n\t\t\t\t\tstream.start = start;\n\t\t\t\t\treturn true;\n\n\t\t\t\tcase options.escape:\n\t\t\t\t\tstream.next();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// If we’re here then stream wasn’t properly consumed.\n\t\t// Revert stream and decide what to do\n\t\tstream.pos = start;\n\n\t\tif (options.throws) {\n\t\t\tthrow stream.error('Unable to consume quoted string');\n\t\t}\n\t}\n\n\treturn false;\n};\n\nfunction isQuote(code) {\n\treturn code === SINGLE_QUOTE || code === DOUBLE_QUOTE;\n}\n\n/**\n * Check if given code is a number\n * @param {Number} code\n * @return {Boolean}\n */\nfunction isNumber(code) {\n\treturn code > 47 && code < 58;\n}\n\n/**\n * Check if given character code is alpha code (letter through A to Z)\n * @param {Number} code\n * @param {Number} [from]\n * @param {Number} [to]\n * @return {Boolean}\n */\nfunction isAlpha(code, from, to) {\n\tfrom = from || 65; // A\n\tto = to || 90; // Z\n\tcode &= ~32; // quick hack to convert any char code to uppercase char code\n\n\treturn code >= from && code <= to;\n}\n\n/**\n * Check if given character code is alpha-numeric (letter through A to Z or number)\n * @param {Number} code\n * @return {Boolean}\n */\nfunction isAlphaNumeric(code) {\n\treturn isNumber(code) || isAlpha(code);\n}\n\nfunction isWhiteSpace(code) {\n\treturn code === 32 /* space */\n\t\t|| code === 9 /* tab */\n\t\t|| code === 160; /* non-breaking space */\n}\n\n/**\n * Check if given character code is a space\n * @param {Number} code\n * @return {Boolean}\n */\nfunction isSpace(code) {\n\treturn isWhiteSpace(code)\n\t\t|| code === 10 /* LF */\n\t\t|| code === 13; /* CR */\n}\n\nconst defaultOptions$1 = {\n\tescape: 92, // \\ character\n\tthrows: false\n};\n\n/**\n * Eats paired characters substring, for example `(foo)` or `[bar]`\n * @param {StreamReader} stream\n * @param {Number} open Character code of pair openinig\n * @param {Number} close Character code of pair closing\n * @param {Object} [options]\n * @return {Boolean} Returns `true` if chacarter pair was successfully\n * consumed, it’s content will be available as `stream.current()`\n */\nfunction eatPair(stream, open, close, options) {\n\toptions = options ? Object.assign({}, defaultOptions$1, options) : defaultOptions$1;\n\tconst start = stream.pos;\n\n\tif (stream.eat(open)) {\n\t\tlet stack = 1, ch;\n\n\t\twhile (!stream.eof()) {\n\t\t\tif (eatQuoted(stream, options)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tch = stream.next();\n\t\t\tif (ch === open) {\n\t\t\t\tstack++;\n\t\t\t} else if (ch === close) {\n\t\t\t\tstack--;\n\t\t\t\tif (!stack) {\n\t\t\t\t\tstream.start = start;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t} else if (ch === options.escape) {\n\t\t\t\tstream.next();\n\t\t\t}\n\t\t}\n\n\t\t// If we’re here then paired character can’t be consumed\n\t\tstream.pos = start;\n\n\t\tif (options.throws) {\n\t\t\tthrow stream.error(`Unable to find matching pair for ${String.fromCharCode(open)}`);\n\t\t}\n\t}\n\n\treturn false;\n}\n\nexport { eatQuoted, isQuote, isAlpha, isNumber, isAlphaNumeric, isSpace, isWhiteSpace, eatPair };\n","import StreamReader from '@emmetio/stream-reader';\nimport { eatPair, isAlpha, isNumber, isQuote, isSpace } from '@emmetio/stream-reader-utils';\n\n/**\n * Abstract container that contains nested nodes or other containers\n */\nclass Node {\n\tconstructor(type) {\n\t\tthis.type = type;\n\t\tthis.children = [];\n\t\tthis.parent = null;\n\t}\n\n\tget firstChild() {\n\t\treturn this.children[0];\n\t}\n\n\tget nextSibling() {\n\t\tconst ix = this.index();\n\t\treturn ix !== -1 ? this.parent.children[ix + 1] : null;\n\t}\n\n\tget previousSibling() {\n\t\tconst ix = this.index();\n\t\treturn ix !== -1 ? this.parent.children[ix - 1] : null;\n\t}\n\n\t/**\n\t * Returns current element’s index in parent list of child nodes\n\t * @return {Number}\n\t */\n\tindex() {\n\t\treturn this.parent ? this.parent.children.indexOf(this) : -1;\n\t}\n\n\t/**\n\t * Adds given node as a child\n\t * @param {Node} node\n\t * @return {Node} Current node\n\t */\n\tadd(node) {\n\t\tif (node) {\n\t\t\tnode.remove();\n\t\t\tthis.children.push(node);\n\t\t\tnode.parent = this;\n\t\t}\n\t\treturn this;\n\t}\n\n\t/**\n\t * Removes current node from its parent\n\t * @return {Node} Current node\n\t */\n\tremove() {\n\t\tif (this.parent) {\n\t\t\tconst ix = this.index();\n\t\t\tif (ix !== -1) {\n\t\t\t\tthis.parent.children.splice(ix, 1);\n\t\t\t\tthis.parent = null;\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t}\n}\n\nclass Stylesheet extends Node {\n\tconstructor() {\n\t\tsuper('stylesheet');\n\t\tthis.comments = [];\n\t}\n\n\t/**\n\t * Returns node’s start position in stream\n\t * @return {*}\n\t */\n\tget start() {\n\t\tconst node = this.firstChild;\n\t\treturn node && node.start;\n\t}\n\n\t/**\n\t * Returns node’s end position in stream\n\t * @return {*}\n\t */\n\tget end() {\n\t\tconst node = this.children[this.children.length - 1];\n\t\treturn node && node.end;\n\t}\n\n\t/**\n\t * Adds comment token into a list.\n\t * This somewhat awkward feature is required to properly detect comment\n\t * ranges. Specifically, in Atom: it’s API provides scopes limited to current\n\t * line only\n\t * @param {Token} token\n\t */\n\taddComment(token) {\n\t\tthis.comments.push(token);\n\t}\n}\n\n/**\n * Removes tokens that matches given criteria from start and end of given list\n * @param {Token[]} tokens\n * @return {Token[]}\n */\nfunction trimTokens(tokens) {\n\ttokens = tokens.slice();\n\tlet len;\n\twhile (len !== tokens.length) {\n\t\tlen = tokens.length;\n\t\tif (isFormattingToken(tokens[0])) {\n\t\t\ttokens.shift();\n\t\t}\n\n\t\tif (isFormattingToken(last(tokens))) {\n\t\t\ttokens.pop();\n\t\t}\n\t}\n\n\treturn tokens;\n}\n\n/**\n * Trims formatting tokens (whitespace and comments) from the beginning and end\n * of given token list\n * @param {Token[]} tokens\n * @return {Token[]}\n */\nfunction trimFormatting(tokens) {\n\treturn trimTokens(tokens, isFormattingToken);\n}\n\n/**\n * Check if given token is a formatting one (whitespace or comment)\n * @param {Token} token\n * @return {Boolean}\n */\nfunction isFormattingToken(token) {\n\tconst type = token && token.type;\n\treturn type === 'whitespace' || type === 'comment';\n}\n\n/**\n * Consumes string char-by-char from given stream\n * @param {StreamReader} stream\n * @param {String} string\n * @return {Boolean} Returns `true` if string was completely consumed\n */\nfunction eatString(stream, string) {\n\tconst start = stream.pos;\n\n\tfor (let i = 0, il = string.length; i < il; i++) {\n\t\tif (!stream.eat(string.charCodeAt(i))) {\n\t\t\tstream.pos = start;\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n\nfunction consume(stream, match) {\n\tconst start = stream.pos;\n\tif (stream.eat(match)) {\n\t\tstream.start = start;\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n\nfunction consumeWhile(stream, match) {\n\tconst start = stream.pos;\n\tif (stream.eatWhile(match)) {\n\t\tstream.start = start;\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n\nfunction last(arr) {\n\treturn arr[arr.length - 1];\n}\n\nfunction valueOf(token) {\n\treturn token && token.valueOf();\n}\n\n/**\n * A structure describing text fragment in content stream. It may contain\n * other sub-fragments (also tokens) that represent current fragments’ logical\n * parts\n */\nclass Token {\n\t/**\n\t * @param {StreamReader} stream\n\t * @param {String} type Token type\n\t * @param {Object} [start] Tokens’ start position in `stream`\n\t * @param {Object} [end] Tokens’ end position in `stream`\n\t */\n\tconstructor(stream, type, start, end) {\n\t\tthis.stream = stream;\n\t\tthis.start = start != null ? start : stream.start;\n\t\tthis.end = end != null ? end : stream.pos;\n\t\tthis.type = type;\n\n\t\tthis._props = null;\n\t\tthis._value = null;\n\t\tthis._items = null;\n\t}\n\n\tget size() {\n\t\treturn this._items ? this._items.length : 0;\n\t}\n\n\tget items() {\n\t\treturn this._items;\n\t}\n\n\tclone(start, end) {\n\t\treturn new this.constructor(this.stream, this.type,\n\t\t\tstart != null ? start : this.start,\n\t\t\tend != null ? end : this.end);\n\t}\n\n\tadd(item) {\n\t\tif (Array.isArray(item)) {\n\t\t\tfor (let i = 0, il = item.length; i < il; i++) {\n\t\t\t\tthis.add(item[i]);\n\t\t\t}\n\t\t} else if (item) {\n\t\t\tif (!this._items) {\n\t\t\t\tthis._items = [item];\n\t\t\t} else {\n\t\t\t\tthis._items.push(item);\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t}\n\n\tremove(item) {\n\t\tif (this._items) {\n\t\t\tconst ix = this._items.indexOf(item);\n\t\t\tif (ix !== -1 ) {\n\t\t\t\tthis._items.splice(ix, 1);\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t}\n\n\titem(i) {\n\t\tconst size = this.size;\n\t\treturn this._items && this._items[(size + i) % size];\n\t}\n\n\tlimit() {\n\t\treturn this.stream.limit(this.start, this.end);\n\t}\n\n\tslice(from, to) {\n\t\tconst token = this.clone();\n\t\tconst items = this._items && this._items.slice(from, to);\n\t\tif (items && items.length) {\n\t\t\ttoken.start = items[0].start;\n\t\t\ttoken.end = items[items.length - 1].end;\n\t\t\ttoken.add(items);\n\t\t} else if (items) {\n\t\t\t// Empty token\n\t\t\ttoken.start = token.end;\n\t\t}\n\n\t\treturn token;\n\t}\n\n\tproperty(name, value) {\n\t\tif (typeof value !== 'undefined') {\n\t\t\t// set property value\n\t\t\tif (!this._props) {\n\t\t\t\tthis._props = {};\n\t\t\t}\n\n\t\t\tthis._props[name] = value;\n\t\t}\n\n\t\treturn this._props && this._props[name];\n\t}\n\n\t/**\n\t * Returns token textual representation\n\t * @return {String}\n\t */\n\ttoString() {\n\t\treturn `${this.valueOf()} [${this.start}, ${this.end}] (${this.type})`;\n\t}\n\n\tvalueOf() {\n\t\tif (this._value === null) {\n\t\t\tthis._value = this.stream.substring(this.start, this.end);\n\t\t}\n\n\t\treturn this._value;\n\t}\n}\n\nconst COMMA = 44; // ,\nconst PROP_DELIMITER$1 = 58; // :\nconst PROP_TERMINATOR$1 = 59; // ;\nconst RULE_START$1 = 123; // {\nconst RULE_END$1 = 125; // }\n\nconst types = new Map()\n\t.set(COMMA, 'comma')\n\t.set(PROP_DELIMITER$1, 'propertyDelimiter')\n\t.set(PROP_TERMINATOR$1, 'propertyTerminator')\n\t.set(RULE_START$1, 'ruleStart')\n\t.set(RULE_END$1, 'ruleEnd');\n\n/**\n * Consumes separator token from given string\n */\nfunction separator(stream) {\n\tif (isSeparator(stream.peek())) {\n\t\tconst start = stream.pos;\n\t\tconst type = types.get(stream.next());\n\t\tconst token = new Token(stream, 'separator', start);\n\n\t\ttoken.property('type', type);\n\t\treturn token;\n\t}\n}\n\n\n\nfunction isSeparator(code) {\n\treturn code === COMMA\n\t\t|| code === PROP_DELIMITER$1 || code === PROP_TERMINATOR$1\n\t\t|| code === RULE_START$1 || code === RULE_END$1;\n}\n\nconst ARGUMENTS_START = 40; // (\nconst ARGUMENTS_END = 41; // )\n\nvar args = function(stream, tokenConsumer) {\n\tif (stream.peek() === ARGUMENTS_START) {\n\t\tconst start = stream.pos;\n\t\tstream.next();\n\n\t\tconst tokens = [];\n\t\tlet t;\n\t\t// in LESS, it’s possible to separate arguments list either by `;` or `,`.\n\t\t// In first case, we should keep comma-separated item as a single argument\n\t\tlet usePropTerminator = false;\n\n\t\twhile (!stream.eof()) {\n\t\t\tif (isUnexpectedTerminator(stream.peek()) || stream.eat(ARGUMENTS_END)) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tt = tokenConsumer(stream);\n\t\t\tif (!t) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (isSemicolonSeparator(t)) {\n\t\t\t\tusePropTerminator = true;\n\t\t\t}\n\n\t\t\ttokens.push(t);\n\t\t}\n\n\t\tstream.start = start;\n\t\treturn createArgumentList(stream, tokens, usePropTerminator);\n\t}\n};\n\nfunction isUnexpectedTerminator(code) {\n\treturn code === RULE_START$1 || code === RULE_END$1;\n}\n\nfunction createArgumentList(stream, tokens, usePropTerminator) {\n\tconst argsToken = new Token(stream, 'arguments');\n\tconst isSeparator = usePropTerminator ? isSemicolonSeparator : isCommaSeparator;\n\tlet arg = [];\n\n\tfor (let i = 0, il = tokens.length, token; i < il; i++) {\n\t\ttoken = tokens[i];\n\t\tif (isSeparator(token)) {\n\t\t\targsToken.add(createArgument(stream, arg) || createEmptyArgument(stream, token.start));\n\t\t\targ.length = 0;\n\t\t} else {\n\t\t\targ.push(token);\n\t\t}\n\t}\n\n\tif (arg.length) {\n\t\targsToken.add(createArgument(stream, arg));\n\t}\n\n\treturn argsToken;\n}\n\nfunction createArgument(stream, tokens) {\n\ttokens = trimFormatting(tokens);\n\n\tif (tokens.length) {\n\t\tconst arg = new Token(stream, 'argument', tokens[0].start, last(tokens).end);\n\n\t\tfor (let i = 0; i < tokens.length; i++) {\n\t\t\targ.add(tokens[i]);\n\t\t}\n\n\t\treturn arg;\n\t}\n}\n\nfunction createEmptyArgument(stream, pos) {\n\tconst token = new Token(stream, 'argument', pos, pos);\n\ttoken.property('empty', true);\n\treturn token;\n}\n\nfunction isCommaSeparator(token) {\n\treturn token.property('type') === 'comma';\n}\n\nfunction isSemicolonSeparator(token) {\n\treturn token.property('type') === 'propertyTerminator';\n}\n\nconst HYPHEN = 45;\nconst UNDERSCORE = 95;\n\nfunction ident(stream) {\n\treturn eatIdent(stream) && new Token(stream, 'ident');\n}\n\nfunction eatIdent(stream) {\n\tconst start = stream.pos;\n\n\tstream.eat(HYPHEN);\n\tif (stream.eat(isIdentStart)) {\n\t\tstream.eatWhile(isIdent);\n\t\tstream.start = start;\n\t\treturn true;\n\t}\n\n\tstream.pos = start;\n\treturn false;\n}\n\nfunction isIdentStart(code) {\n\treturn code === UNDERSCORE || code === HYPHEN || isAlpha(code) || code >= 128;\n}\n\nfunction isIdent(code) {\n\treturn isNumber(code) || isIdentStart(code);\n}\n\nfunction prefixed(stream, tokenType, prefix, body, allowEmptyBody) {\n\tconst start = stream.pos;\n\n\tif (stream.eat(prefix)) {\n\t\tconst bodyToken = body(stream, start);\n\t\tif (bodyToken || allowEmptyBody) {\n\t\t\tstream.start = start;\n\t\t\treturn new Token(stream, tokenType, start).add(bodyToken);\n\t\t}\n\t}\n\n\tstream.pos = start;\n}\n\nconst AT = 64; // @\n\n/**\n * Consumes at-keyword from given stream\n */\nfunction atKeyword(stream) {\n\treturn prefixed(stream, 'at-keyword', AT, ident);\n}\n\nconst HASH = 35; // #\nconst AT$1 = 64; // @\n\n/**\n * Consumes interpolation token, e.g. `#{expression}`\n * @param {StreamReader} stream\n * @param {Function} tokenConsumer\n * @return {Token}\n */\nfunction interpolation(stream, tokenConsumer) {\n\tconst start = stream.pos;\n\ttokenConsumer = tokenConsumer || defaultTokenConsumer;\n\n\tif ((stream.eat(HASH) || stream.eat(AT$1)) && stream.eat(RULE_START$1)) {\n\t\tconst container = new Token(stream, 'interpolation', start);\n\t\tlet stack = 1, token;\n\n\t\twhile (!stream.eof()) {\n\t\t\tif (stream.eat(RULE_START$1)) {\n\t\t\t\tstack++;\n\t\t\t} else if (stream.eat(RULE_END$1)) {\n\t\t\t\tstack--;\n\t\t\t\tif (!stack) {\n\t\t\t\t\tcontainer.end = stream.pos;\n\t\t\t\t\treturn container;\n\t\t\t\t}\n\t\t\t} else if (token = tokenConsumer(stream)) {\n\t\t\t\tcontainer.add(token);\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tstream.pos = start;\n}\n\nfunction eatInterpolation(stream) {\n\tconst start = stream.pos;\n\n\tif ((stream.eat(HASH) || stream.eat(AT$1)) && eatPair(stream, RULE_START$1, RULE_END$1)) {\n\t\tstream.start = start;\n\t\treturn true;\n\t}\n\n\tstream.pos = start;\n\treturn false;\n}\n\nfunction defaultTokenConsumer(stream) {\n\tconst start = stream.pos;\n\n\twhile (!stream.eof()) {\n\t\tif (stream.peek() === RULE_END$1) {\n\t\t\tbreak;\n\t\t}\n\n\t\teatString$1(stream) || stream.next();\n\t}\n\n\tif (start !== stream.pos) {\n\t\treturn new Token(stream, 'expression', start);\n\t}\n}\n\n/**\n * Consumes quoted string from current string and returns token with consumed\n * data or `null`, if string wasn’t consumed\n * @param {StreamReader} stream\n * @return {StringToken}\n */\nfunction string(stream) {\n\treturn eatString$1(stream, true);\n}\n\nfunction eatString$1(stream, asToken) {\n\tlet ch = stream.peek(), pos, tokens, token;\n\n\tif (isQuote(ch)) {\n\t\tstream.start = stream.pos;\n\t\tstream.next();\n\t\tconst quote = ch;\n\t\tconst valueStart = stream.pos;\n\n\t\twhile (!stream.eof()) {\n\t\t\tpos = stream.pos;\n\t\t\tif (stream.eat(quote) || stream.eat(isNewline)) {\n\t\t\t\t// found end of string or newline without preceding '\\',\n\t\t\t\t// which is not allowed (don’t throw error, for now)\n\t\t\t\tbreak;\n\t\t\t} else if (stream.eat(92 /* \\ */)) {\n\t\t\t\t// backslash allows newline in string\n\t\t\t\tstream.eat(isNewline);\n\t\t\t} else if (asToken && (token = interpolation(stream))) {\n\t\t\t\tif (!tokens) {\n\t\t\t\t\ttokens = [token];\n\t\t\t\t} else {\n\t\t\t\t\ttokens.push(token);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tstream.next();\n\t\t}\n\n\t\t// Either reached EOF or explicitly stopped at string end\n\t\t// NB use extra `asToken` param to return boolean instead of token to reduce\n\t\t// memory allocations and improve performance\n\t\tif (asToken) {\n\t\t\tconst token = new Token(stream, 'string');\n\t\t\tconst inner = new Token(stream, 'unquoted', valueStart, pos);\n\t\t\tinner.add(tokens);\n\t\t\ttoken.add(inner);\n\t\t\ttoken.property('quote', quote);\n\t\t\treturn token;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n\nfunction isNewline(code) {\n\treturn code === 10 /* LF */ || code === 13 /* CR */;\n}\n\nconst ASTERISK = 42;\nconst SLASH = 47;\n\n/**\n * Consumes comment from given stream: either multi-line or single-line\n * @param {StreamReader} stream\n * @return {CommentToken}\n */\nvar comment = function(stream) {\n\treturn singleLineComment(stream) || multiLineComment(stream);\n};\n\nfunction singleLineComment(stream) {\n\tif (eatSingleLineComment(stream)) {\n\t\tconst token = new Token(stream, 'comment');\n\t\ttoken.property('type', 'single-line');\n\t\treturn token;\n\t}\n}\n\nfunction multiLineComment(stream) {\n\tif (eatMultiLineComment(stream)) {\n\t\tconst token = new Token(stream, 'comment');\n\t\ttoken.property('type', 'multiline');\n\t\treturn token;\n\t}\n}\n\nfunction eatComment(stream) {\n\treturn eatSingleLineComment(stream) || eatMultiLineComment(stream);\n}\n\nfunction eatSingleLineComment(stream) {\n\tconst start = stream.pos;\n\n\tif (stream.eat(SLASH) && stream.eat(SLASH)) {\n\t\t// single-line comment, consume till the end of line\n\t\tstream.start = start;\n\t\twhile (!stream.eof()) {\n\t\t\tif (isLineBreak(stream.next())) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\tstream.pos = start;\n\treturn false;\n}\n\nfunction eatMultiLineComment(stream) {\n\tconst start = stream.pos;\n\n\tif (stream.eat(SLASH) && stream.eat(ASTERISK)) {\n\t\twhile (!stream.eof()) {\n\t\t\tif (stream.next() === ASTERISK && stream.eat(SLASH)) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tstream.start = start;\n\t\treturn true;\n\t}\n\n\tstream.pos = start;\n\treturn false;\n}\n\nfunction isLineBreak(code) {\n\treturn code === 10 /* LF */ || code === 13 /* CR */;\n}\n\n/**\n * Consumes white-space tokens from given stream\n */\nfunction whitespace(stream) {\n\treturn eatWhitespace(stream) && new Token(stream, 'whitespace');\n}\n\nfunction eatWhitespace(stream) {\n\treturn consumeWhile(stream, isSpace);\n}\n\nconst ATTR_START = 91; // [\nconst ATTR_END = 93; // ]\n\n/**\n * Consumes attribute from given string, e.g. value between [ and ]\n * @param {StreamReader} stream\n * @return {AttributeToken}\n */\nfunction eatAttribuite(stream) {\n\tconst start = stream.pos;\n\n\tif (stream.eat(ATTR_START)) {\n\t\tskip(stream);\n\t\tconst name = ident(stream);\n\n\t\tskip(stream);\n\t\tconst op = operator(stream);\n\n\t\tskip(stream);\n\t\tconst value = string(stream) || ident(stream);\n\n\t\tskip(stream);\n\t\tstream.eat(ATTR_END);\n\n\t\treturn new Token(stream, 'attribute', start).add(name).add(op).add(value);\n\t}\n}\n\nfunction skip(stream) {\n\twhile (!stream.eof()) {\n\t\tif (!eatWhitespace(stream) && !eatComment(stream)) {\n\t\t\treturn true;\n\t\t}\n\t}\n}\n\nfunction operator(stream) {\n\treturn consumeWhile(stream, isOperator) && new Token(stream, 'operator');\n}\n\nfunction isOperator(code) {\n\treturn code === 126 /* ~ */\n\t\t|| code === 124 /* | */\n\t\t|| code === 94 /* ^ */\n\t\t|| code === 36 /* $ */\n\t\t|| code === 42 /* * */\n\t\t|| code === 61; /* = */\n}\n\nconst BACKTICK = 96; // `\n\n/**\n * Consumes backtick token, e.g. `...`\n * @param {StreamReader} stream\n * @param {Function} tokenConsumer\n * @return {Token}\n */\nfunction backtick(stream) {\n\tif (eatBacktick(stream)) {\n\t\treturn new Token(stream, 'backtick');\n\t}\n}\n\nfunction eatBacktick(stream) {\n\tconst start = stream.pos;\n\n\tif (eatPair(stream, BACKTICK, BACKTICK)) {\n\t\tstream.start = start;\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n\nconst CLASS = 46; // .\n\n/**\n * Consumes class fragment from given stream, e.g. `.foo`\n * @param {StreamReader} stream\n * @return {ClassToken}\n */\nfunction className(stream) {\n\treturn prefixed(stream, 'class', CLASS, ident);\n}\n\nconst ADJACENT_SIBLING = 43; // +\nconst GENERAL_SIBLING = 126; // ~\nconst CHILD = 62; // >\nconst NESTING = 38; // &\n\nconst types$1 = {\n\t[ADJACENT_SIBLING]: 'adjacentSibling',\n\t[GENERAL_SIBLING]: 'generalSibling',\n\t[CHILD]: 'child',\n\t[NESTING]: 'nesting'\n};\n\n/**\n * Consumes combinator token from given string\n */\nvar combinator = function(stream) {\n\tif (isCombinator(stream.peek())) {\n\t\tconst start = stream.pos;\n\t\tconst type = types$1[stream.next()];\n\t\tconst token = new Token(stream, 'combinator', start);\n\n\t\ttoken.property('type', type);\n\t\treturn token;\n\t}\n};\n\n\n\nfunction isCombinator(code) {\n\treturn code === ADJACENT_SIBLING || code === GENERAL_SIBLING\n\t\t|| code === NESTING || code === CHILD;\n}\n\nconst HASH$1 = 35;\n\nfunction hash(stream) {\n\treturn prefixed(stream, 'hash', HASH$1, hashValue, true);\n}\n\n\n\nfunction hashValue(stream) {\n\tif (eatHashValue(stream)) {\n\t\treturn new Token(stream, 'hash-value');\n\t}\n}\n\nfunction eatHashValue(stream) {\n\treturn consumeWhile(stream, isHashValue);\n}\n\nfunction isHashValue(code) {\n\treturn isNumber(code) || isAlpha(code, 65 /* A */, 70 /* F */)\n\t\t|| code === 95 /* _ */ || code === 45 /* - */\n\t\t|| code > 128; /* non-ASCII */\n}\n\nconst ID = 35; // #\n\n/**\n * Consumes id fragment from given stream, e.g. `#foo`\n * @param {StreamReader} stream\n * @return {Token}\n */\nfunction id(stream) {\n\treturn prefixed(stream, 'id', ID, ident);\n}\n\nconst IMPORTANT = 33; // !\n\n/**\n * Consumes !important token\n * @param {StreamReader} stream\n * @return {Token}\n */\nfunction important(stream) {\n\treturn prefixed(stream, 'important', IMPORTANT, ident);\n}\n\nconst DOT = 46; // .\n\n/**\n * Consumes number from given string, e.g. `10px`\n * @param {StreamReader} stream\n * @return {NumberToken}\n */\nfunction number(stream) {\n\tif (eatNumericPart(stream)) {\n\t\tconst start = stream.start;\n\t\tconst num = new Token(stream, 'value');\n\t\tconst unit = eatUnitPart(stream) ? new Token(stream, 'unit') : null;\n\n\t\treturn new Token(stream, 'number', start).add(num).add(unit);\n\t}\n}\n\n\n\nfunction eatNumericPart(stream) {\n\tconst start = stream.pos;\n\n\tstream.eat(isOperator$1);\n\tif (stream.eatWhile(isNumber)) {\n\t\tstream.start = start;\n\t\tconst decimalEnd = stream.pos;\n\n\t\tif (!(stream.eat(DOT) && stream.eatWhile(isNumber))) {\n\t\t\tstream.pos = decimalEnd;\n\t\t}\n\n\t\treturn true;\n\t} else if (stream.eat(DOT) && stream.eatWhile(isNumber)) {\n\t\tstream.start = start;\n\t\treturn true;\n\t}\n\n\t// TODO eat exponent part\n\n\tstream.pos = start;\n\treturn false;\n}\n\nfunction eatUnitPart(stream) {\n\treturn eatIdent(stream) || eatPercent(stream);\n}\n\nfunction eatPercent(stream) {\n\treturn consume(stream, 37 /* % */);\n}\n\nfunction isOperator$1(code) {\n\treturn code === 45 /* - */ || code === 43 /* + */;\n}\n\nconst NOT = 33; // !\nconst MULTIPLY = 42; // *\nconst PLUS = 43; // +\nconst MINUS = 45; // -\nconst DIVIDE = 47; // /\nconst LESS_THAN = 60; // <\nconst EQUALS = 61; // =\nconst GREATER_THAN = 62; // <\n\nfunction operator$1(stream) {\n\treturn eatOperator(stream) && new Token(stream, 'operator');\n}\n\nfunction eatOperator(stream) {\n\tif (consume(stream, isEquality)) {\n\t\tstream.eatWhile(EQUALS);\n\t\treturn true;\n\t} else if (consume(stream, isOperator$2)) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n\nfunction isEquality(code) {\n\treturn code === NOT || code === LESS_THAN || code === EQUALS || code === GREATER_THAN;\n}\n\nfunction isOperator$2(code) {\n\treturn code === MULTIPLY || code === PLUS || code === MINUS || code === DIVIDE\n\t\t|| isEquality(code);\n}\n\nconst PSEUDO = 58; // :\n\n/**\n * Consumes pseudo-selector from given stream\n */\nvar pseudo = function(stream) {\n\tconst start = stream.pos;\n\n\tif (stream.eatWhile(PSEUDO)) {\n\t\tconst name = ident(stream);\n\t\tif (name) {\n\t\t\treturn new Token(stream, 'pseudo', start).add(name);\n\t\t}\n\t}\n\n\tstream.pos = start;\n};\n\n/**\n * Consumes unquoted value from given stream\n * @param {StreamReader} stream\n * @return {UnquotedToken}\n */\nvar unquoted = function(stream) {\n\treturn eatUnquoted(stream) && new Token(stream, 'unquoted');\n};\n\nfunction eatUnquoted(stream) {\n\treturn consumeWhile(stream, isUnquoted);\n}\n\nfunction isUnquoted(code) {\n\treturn !isNaN(code) && !isQuote(code) && !isSpace(code)\n\t\t&& code !== 40 /* ( */ && code !== 41 /* ) */ && code !== 92 /* \\ */\n\t\t&& !isNonPrintable(code);\n}\n\nfunction isNonPrintable(code) {\n\treturn (code >= 0 && code <= 8) || code === 11\n\t|| (code >= 14 && code <= 31) || code === 127;\n}\n\n/**\n * Consumes URL token from given stream\n * @param {StreamReader} stream\n * @return {Token}\n */\nfunction url(stream) {\n\tconst start = stream.pos;\n\n\tif (eatString(stream, 'url(')) {\n\t\teatWhitespace(stream);\n\t\tconst value = string(stream) || unquoted(stream);\n\t\teatWhitespace(stream);\n\t\tstream.eat(41); // )\n\n\t\treturn new Token(stream, 'url', start).add(value);\n\t}\n\n\tstream.pos = start;\n}\n\nfunction eatUrl(stream) {\n\tconst start = stream.pos;\n\n\tif (eatString(stream, 'url(')) {\n\t\teatWhitespace(stream);\n\t\teatString$1(stream) || eatUnquoted(stream);\n\t\teatWhitespace(stream);\n\t\tstream.eat(41); // )\n\t\tstream.start = start;\n\n\t\treturn true;\n\t}\n\n\tstream.pos = start;\n\treturn false;\n}\n\nconst VARIABLE = 36; // $\n\n/**\n * Consumes SCSS variable from given stream\n */\nfunction variable(stream) {\n\treturn prefixed(stream, 'variable', VARIABLE, variableName);\n}\n\n\n\nfunction variableName(stream) {\n\tif (eatVariableName(stream)) {\n\t\treturn new Token(stream, 'name');\n\t}\n}\n\nfunction eatVariableName(stream) {\n\treturn consumeWhile(stream, isVariableName);\n}\n\nfunction isVariableName(code) {\n\treturn code === VARIABLE || isIdent(code);\n}\n\n/**\n * Group tokens by commonly used context\n */\n\nfunction consumeToken(stream) {\n\tconst _token = any(stream) || args(stream, consumeToken);\n\tif (_token && _token.type === 'ident') {\n\t\tconst _args = args(stream, consumeToken);\n\t\tif (_args) {\n\t\t\t// An identifier followed by arguments – function call\n\t\t\treturn new Token(stream, 'function', _token.start, _args.end).add(_token).add(_args);\n\t\t}\n\t}\n\n\treturn _token || unknown(stream);\n}\n\nfunction any(stream) {\n\treturn formatting(stream) || url(stream) || selector(stream) || value(stream)\n\t\t|| separator(stream);\n}\n\nfunction selector(stream) {\n\treturn interpolation(stream) || backtick(stream) || ident(stream) || atKeyword(stream)\n\t\t|| className(stream) || id(stream) || pseudo(stream) || eatAttribuite(stream)\n\t\t|| combinator(stream);\n}\n\nfunction value(stream) {\n\treturn url(stream) || string(stream) || interpolation(stream) || backtick(stream) \n\t\t|| number(stream) || hash(stream) || keyword(stream) || important(stream) \n\t\t|| operator$1(stream);\n}\n\nfunction keyword(stream) {\n\treturn backtick(stream) || variable(stream) || atKeyword(stream) || ident(stream);\n}\n\nfunction formatting(stream) {\n\treturn comment(stream) || whitespace(stream);\n}\n\nfunction unknown(stream) {\n\tstream.start = stream.pos;\n\tconst ch = stream.next();\n\tif (ch != null) {\n\t\treturn new Token(stream, 'unknown');\n\t}\n}\n\n/**\n * Parses CSS rule selector\n * @param {String|StreamReader} source\n * @return {Token[]}\n */\nfunction parseSelector(source) {\n\treturn parseList(source, 'selector');\n}\n\n/**\n * Parses CSS property name. Mostly used for LESS where\n * property-like entry might be used as a mixin call\n * @param {String|StreamReader} source\n * @return {Token}\n */\nfunction parsePropertyName(source) {\n\tconst stream = typeof source === 'string' ? new StreamReader(source) : source;\n\tconst items = [];\n\n\twhile (!stream.eof()) {\n\t\titems.push(consumeToken(stream));\n\t}\n\n\tlet token;\n\tif (items.length === 1) {\n\t\ttoken = items[0];\n\t} else {\n\t\ttoken = new Token(stream, 'property-name', stream.start, stream.end);\n\t\tfor (let i = 0, il = items.length; i < il; i++) {\n\t\t\ttoken.add(items[i]);\n\t\t}\n\t}\n\n\treturn token;\n}\n\n/**\n * Parses CSS property value\n * @param {String|StreamReader} source\n * @return {Token[]}\n */\nfunction parsePropertyValue(source) {\n\treturn parseList(source);\n}\n\n/**\n * Parses @media CSS rule expression\n * @param {String|StreamReader} source\n * @return {Token[]}\n */\nfunction parseMediaExpression(source) {\n\treturn parseList(source);\n}\n\n/**\n * Parses given source into a set of tokens, separated by comma. Each token contains\n * parsed sub-items as independent tokens and so on. Mostly used to parse\n * selectors and property values\n * @param {String|StreamReader} source Source to parse\n * @param {String} [tokenType] Type of first-level tokens.\n * Default is `item`\n * @return {Token[]}\n */\nfunction parseList(source, tokenType) {\n\ttokenType = tokenType || 'item';\n\tconst stream = typeof source === 'string' ? new StreamReader(source) : source;\n\tconst items = [];\n\tconst fragments = [];\n\tconst flush = () => {\n\t\tconst clean = trimFormatting(fragments);\n\n\t\tif (clean.length) {\n\t\t\tconst item = new Token(stream, tokenType, clean[0].start, last(clean).end);\n\t\t\tfor (let i = 0; i < clean.length; i++) {\n\t\t\t\titem.add(clean[i]);\n\t\t\t}\n\t\t\titems.push(item);\n\t\t}\n\n\t\tfragments.length = 0;\n\t};\n\n\tlet token;\n\twhile (!stream.eof()) {\n\t\tif (stream.eat(44 /* , */)) {\n\t\t\tflush();\n\t\t} else if (token = consumeToken(stream)) {\n\t\t\tif (token.type !== 'comment') {\n\t\t\t\tfragments.push(token);\n\t\t\t}\n\t\t} else {\n\t\t\tthrow stream.error('Unexpected character');\n\t\t}\n\t}\n\n\tflush();\n\treturn items;\n}\n\n/**\n * Creates CSS rule from given tokens\n * @param {StreamReader} stream\n * @param {Token[]} tokens\n * @param {Token} [content]\n * @return {Rule}\n */\nfunction createRule(stream, tokens, contentStart, contentEnd) {\n\tif (!tokens.length) {\n\t\treturn null;\n\t}\n\n\tconst name = tokens[0];\n\tname.end = last(tokens).end;\n\n\treturn new Rule(stream, name, contentStart, contentEnd);\n}\n\n/**\n * Represents CSS rule\n * @type {Node}\n */\nclass Rule extends Node {\n\t/**\n\t * @param {StreamReader} stream\n\t * @param {Token} name Rule’s name token\n\t * @param {Token} contentStart Rule’s content start token\n\t * @param {Token} [contentEnd] Rule’s content end token\n\t */\n\tconstructor(stream, name, contentStart, contentEnd) {\n\t\tsuper('rule');\n\t\tthis.stream = stream;\n\t\tthis.selectorToken = name;\n\t\tthis.contentStartToken = contentStart;\n\t\tthis.contentEndToken = contentEnd || contentStart;\n\t\tthis._parsedSelector = null;\n\t}\n\n\t/**\n\t * Returns rule selector\n\t * @return {String}\n\t */\n\tget selector() {\n\t\treturn valueOf(this.selectorToken);\n\t}\n\n\tget parsedSelector() {\n\t\tif (!this._parsedSelector) {\n\t\t\tthis._parsedSelector = parseSelector(this.selectorToken.limit());\n\t\t}\n\n\t\treturn this._parsedSelector;\n\t}\n\n\t/**\n\t * Returns node’s start position in stream\n\t * @return {*}\n\t */\n\tget start() {\n\t\treturn this.selectorToken && this.selectorToken.start;\n\t}\n\n\t/**\n\t * Returns node’s end position in stream\n\t * @return {*}\n\t */\n\tget end() {\n\t\tconst token = this.contentEndToken || this.contentStartToken || this.nameToken;\n\t\treturn token && token.end;\n\t}\n}\n\n/**\n * Creates CSS rule from given tokens\n * @param {StreamReader} stream\n * @param {Token[]} tokens\n * @param {Token} [content]\n * @return {Rule}\n */\nfunction createAtRule(stream, tokens, contentStart, contentEnd) {\n\tif (!tokens.length) {\n\t\treturn null;\n\t}\n\n\tlet ix = 0, expression;\n\tconst name = tokens[ix++];\n \n\tif (ix < tokens.length) {\n\t\texpression = tokens[ix++];\n\t\texpression.type = 'expression';\n\t\texpression.end = last(tokens).end;\n\t} else {\n\t\texpression = new Token(stream, 'expression', name.end, name.end);\n\t}\n\n\treturn new AtRule(stream, name, expression, contentStart, contentEnd);\n}\n\nclass AtRule extends Node {\n\tconstructor(stream, name, expression, contentStart, contentEnd) {\n\t\tsuper('at-rule');\n\t\tthis.stream = stream;\n\t\tthis.nameToken = name;\n\t\tthis.expressionToken = expression;\n\t\tthis.contentStartToken = contentStart;\n\t\tthis.contentEndToken = contentEnd || contentStart;\n\t\tthis._parsedExpression = null;\n\t}\n\n\t/**\n\t * Returns at-rule name\n\t * @return {String}\n\t */\n\tget name() {\n\t\treturn valueOf(this.nameToken && this.nameToken.item(0));\n\t}\n\n\tget expression() {\n\t\treturn valueOf(this.expressionToken);\n\t}\n\n\tget parsedExpression() {\n\t\tif (!this._parsedExpression) {\n\t\t\tthis._parsedExpression = parseMediaExpression(this.expressionToken.limit());\n\t\t}\n\n\t\treturn this._parsedExpression;\n\t}\n\n\t/**\n\t * Returns node’s start position in stream\n\t * @return {*}\n\t */\n\tget start() {\n\t\treturn this.nameToken && this.nameToken.start;\n\t}\n\n\t/**\n\t * Returns node’s end position in stream\n\t * @return {*}\n\t */\n\tget end() {\n\t\tconst token = this.contentEndToken || this.contentStartToken || this.nameToken;\n\t\treturn token && token.end;\n\t}\n}\n\n/**\n * Factory method that creates property node from given tokens\n * @param {StreamReader} stream\n * @param {Token[]} tokens\n * @param {Token} terminator\n * @return {Property}\n */\nfunction createProperty(stream, tokens, terminator) {\n\t// NB in LESS, fragmented properties without value like `.foo.bar;` must be\n\t// treated like mixin call\n\tif (!tokens.length) {\n\t\treturn null;\n\t}\n\n\tlet separator, value, ix = 0;\n\tconst name = tokens[ix++];\n\n\tif (ix < tokens.length) {\n\t\tvalue = tokens[ix++];\n\t\tvalue.type = 'value';\n\t\tvalue.end = last(tokens).end;\n\t}\n\n\tif (name && value) {\n\t\tseparator = new Token(stream, 'separator', name.end, value.start);\n\t}\n\n\treturn new Property(\n\t\tstream,\n\t\tname,\n\t\tvalue,\n\t\tseparator,\n\t\tterminator\n\t);\n}\n\nclass Property extends Node {\n\tconstructor(stream, name, value, separator, terminator) {\n\t\tsuper('property');\n\t\tthis.stream = stream;\n\t\tthis.nameToken = name;\n\t\tthis.valueToken = value;\n\t\tthis._parsedName = null;\n\t\tthis._parsedValue = null;\n\n\t\tthis.separatorToken = separator;\n\t\tthis.terminatorToken = terminator;\n\t}\n\n\t/**\n\t * Property name\n\t * @return {String}\n\t */\n\tget name() {\n\t\treturn valueOf(this.nameToken);\n\t}\n\n\t/**\n\t * Returns parsed sub-tokens of current property name\n\t * @return {Token[]}\n\t */\n\tget parsedName() {\n\t\tif (!this._parsedName) {\n\t\t\tthis._parsedName = parsePropertyName(this.nameToken.limit());\n\t\t}\n\n\t\treturn this._parsedName;\n\t}\n\n\t/**\n\t * Property value\n\t * @return {String}\n\t */\n\tget value() {\n\t\treturn valueOf(this.valueToken);\n\t}\n\n\t/**\n\t * Parsed value parts: a list of tokens, separated by comma. Each token may\n\t * contains parsed sub-tokens and so on\n\t * @return {Token[]}\n\t */\n\tget parsedValue() {\n\t\tif (!this._parsedValue) {\n\t\t\tthis._parsedValue = parsePropertyValue(this.valueToken.limit());\n\t\t}\n\n\t\treturn this._parsedValue;\n\t}\n\n\tget separator() {\n\t\treturn valueOf(this.separatorToken);\n\t}\n\n\tget terminator() {\n\t\treturn valueOf(this.terminatorToken);\n\t}\n\n\tget start() {\n\t\tconst token = this.nameToken || this.separatorToken || this.valueToken\n\t\t\t|| this.terminatorToken;\n\t\treturn token && token.start;\n\t}\n\n\tget end() {\n\t\tconst token = this.terminatorToken || this.valueToken\n\t\t\t|| this.separatorToken || this.nameToken;\n\t\treturn token && token.end;\n\t}\n}\n\nconst LBRACE = 40; // (\nconst RBRACE = 41; // )\nconst PROP_DELIMITER = 58; // :\nconst PROP_TERMINATOR = 59; // ;\nconst RULE_START = 123; // {\nconst RULE_END = 125; // }\n\nfunction parseStylesheet(source) {\n\tconst stream = typeof source === 'string' ? new StreamReader(source) : source;\n\tconst root = new Stylesheet();\n\tlet ctx = root, child, accum, token;\n\tlet tokens = [];\n\tconst flush = () => {\n\t\tif (accum) {\n\t\t\ttokens.push(accum);\n\t\t\taccum = null;\n\t\t}\n\t};\n\n\twhile (!stream.eof()) {\n\t\tif (eatWhitespace(stream)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (token = comment(stream)) {\n\t\t\troot.addComment(token);\n\t\t\tcontinue;\n\t\t}\n\n\t\tstream.start = stream.pos;\n\n\t\tif (stream.eatWhile(PROP_DELIMITER)) {\n\t\t\t// Property delimiter can be either a real property delimiter or a\n\t\t\t// part of pseudo-selector.\n\t\t\tif (!tokens.length) {\n\t\t\t\tif (accum) {\n\t\t\t\t\t// No consumed tokens yet but pending token: most likely it’s\n\t\t\t\t\t// a CSS property\n\t\t\t\t\tflush();\n\t\t\t\t} else {\n\t\t\t\t\t// No consumend or accumulated token, seems like a start of\n\t\t\t\t\t// pseudo-selector, e.g. `::slotted`\n\t\t\t\t\taccum = new Token(stream, 'preparse');\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Skip delimiter if there are already consumend tokens: most likely\n\t\t\t// it’s a part of pseudo-selector\n\t\t} else if (stream.eat(PROP_TERMINATOR)) {\n\t\t\tflush();\n\t\t\tctx.add(createProperty(stream, tokens, new Token(stream, 'termintator')));\n\t\t\ttokens.length = 0;\n\t\t} else if (stream.eat(RULE_START)) {\n\t\t\tflush();\n\t\t\tif (tokens.length > 0) {\n\t\t\t\tchild = tokens[0].type === 'at-keyword'\n\t\t\t\t? createAtRule(stream, tokens, new Token(stream, 'body-start'))\n\t\t\t\t: createRule(stream, tokens, new Token(stream, 'body-start'));\n\t\t\t\tctx.add(child);\n\t\t\t\tctx = child;\n\t\t\t\ttokens.length = 0;\n\t\t\t}\n\t\t\t\n\t\t} else if (stream.eat(RULE_END)) {\n\t\t\tflush();\n\n\t\t\t// Finalize context section\n\t\t\tctx.add(createProperty(stream, tokens));\n\n\t\t\tif (ctx.type !== 'stylesheet') {\n\t\t\t\t// In case of invalid stylesheet with redundant `}`,\n\t\t\t\t// don’t modify root section.\n\t\t\t\tctx.contentEndToken = new Token(stream, 'body-end');\n\t\t\t\tctx = ctx.parent;\n\t\t\t}\n\n\t\t\ttokens.length = 0;\n\t\t} else if (token = atKeyword(stream)) {\n\t\t\t// Explictly consume @-tokens since it defines how rule or property\n\t\t\t// should be pre-parsed\n\t\t\tflush();\n\t\t\ttokens.push(token);\n\t\t} else if (eatUrl(stream) || eatInterpolation(stream) || eatBacktick(stream) \n\t\t\t\t|| eatBraces(stream, root) || eatString$1(stream) || stream.next()) {\n\t\t\t// NB explicitly consume `url()` token since it may contain\n\t\t\t// an unquoted url like `http://example.com` which interferes\n\t\t\t// with single-line comment\n\t\t\taccum = accum || new Token(stream, 'preparse');\n\t\t\taccum.end = stream.pos;\n\t\t} else {\n\t\t\tthrow new Error(`Unexpected end-of-stream at ${stream.pos}`);\n\t\t}\n\t}\n\n\tif (accum) {\n\t\ttokens.push(accum);\n\t}\n\n\t// Finalize all the rest properties\n\tctx.add(createProperty(stream, tokens));\n\n\t// Finalize unterminated rules\n\tstream.start = stream.pos;\n\twhile (ctx && ctx !== root) {\n\t\tctx.contentEndToken = new Token(stream, 'body-end');\n\t\tctx = ctx.parent;\n\t}\n\n\treturn root;\n}\n\n/**\n * Parses given source into tokens\n * @param {String|StreamReader} source\n * @param {Function} [consumer] Token consumer function, for example, `selector`,\n * `value` etc. from `lib/tokens` module. Default is generic `consumeToken`\n * @return {Token[]}\n */\nfunction lexer(source, consumer) {\n\tconsumer = consumer || consumeToken;\n\tconst stream = typeof source === 'string' ? new StreamReader(source) : source;\n\tconst result = [];\n\tlet token;\n\n\twhile (!stream.eof() && (token = consumer(stream))) {\n\t\tresult.push(token);\n\t}\n\n\treturn result;\n}\n\n/**\n * Consumes content inside round braces. Mostly used to skip `;` token inside\n * expressions since in LESS it is also used to separate function arguments\n * @param {StringReader} stream\n * @param {Stylesheet} root A stylesheet root. Used to accumulate comments\n * @return {Boolean}\n */\nfunction eatBraces(stream, root) {\n\tif (stream.eat(LBRACE)) {\n\t\tlet stack = 1, token;\n\n\t\twhile (!stream.eof()) {\n\t\t\tif (stream.eat(RBRACE)) {\n\t\t\t\tstack--;\n\t\t\t\tif (!stack) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else if (stream.eat(LBRACE)) {\n\t\t\t\tstack++;\n\t\t\t} else if (eatUrl(stream) || eatString$1(stream)) {\n\t\t\t\tcontinue;\n\t\t\t} else if (token = comment(stream)) {\n\t\t\t\troot.addComment(token);\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\tstream.next();\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n\nexport { lexer, Token, any, selector, value, keyword, variable, formatting, comment, whitespace, ident, string, url, interpolation, backtick, parseMediaExpression, parsePropertyName, parsePropertyValue, parseSelector, createProperty, createRule, createAtRule };export default parseStylesheet;\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* Based on @sergeche's work in his emmet plugin */\n\nimport { TextDocument } from 'vscode';\n\n/**\n * A stream reader for VSCode's `TextDocument`\n * Based on @emmetio/stream-reader and @emmetio/atom-plugin\n */\nexport class DocumentStreamReader {\n\tprivate document: TextDocument;\n\tprivate start: number;\n\tprivate _eof: number;\n\tprivate _sof: number;\n\tpublic pos: number;\n\n\tconstructor(document: TextDocument, pos?: number, limit?: [number, number]) {\n\t\tthis.document = document;\n\t\tthis.start = this.pos = pos ? pos : 0;\n\t\tthis._sof = limit ? limit[0] : 0;\n\t\tthis._eof = limit ? limit[1] : document.getText().length;\n\t}\n\n\t/**\n\t * Returns true only if the stream is at the start of the file.\n\t */\n\tsof(): boolean {\n\t\treturn this.pos <= this._sof;\n\t}\n\n\t/**\n\t * Returns true only if the stream is at the end of the file.\n\t */\n\teof(): boolean {\n\t\treturn this.pos >= this._eof;\n\t}\n\n\t/**\n\t * Creates a new stream instance which is limited to given range for given document\n\t */\n\tlimit(start: number, end: number): DocumentStreamReader {\n\t\treturn new DocumentStreamReader(this.document, start, [start, end]);\n\t}\n\n\t/**\n\t * Returns the next character code in the stream without advancing it.\n\t * Will return NaN at the end of the file.\n\t */\n\tpeek(): number {\n\t\tif (this.eof()) {\n\t\t\treturn NaN;\n\t\t}\n\t\treturn this.document.getText().charCodeAt(this.pos);\n\t}\n\n\t/**\n\t * Returns the next character in the stream and advances it.\n\t * Also returns NaN when no more characters are available.\n\t */\n\tnext(): number {\n\t\tif (this.eof()) {\n\t\t\treturn NaN;\n\t\t}\n\n\t\tconst code = this.document.getText().charCodeAt(this.pos);\n\t\tthis.pos++;\n\n\t\tif (this.eof()) {\n\t\t\t// restrict pos to eof, if in case it got moved beyond eof\n\t\t\tthis.pos = this._eof;\n\t\t}\n\n\t\treturn code;\n\t}\n\n\t/**\n\t * Backs up the stream n characters. Backing it up further than the\n\t * start of the current token will cause things to break, so be careful.\n\t */\n\tbackUp(n: number): number {\n\t\tthis.pos -= n;\n\t\tif (this.pos < 0) {\n\t\t\tthis.pos = 0;\n\t\t}\n\t\treturn this.peek();\n\t}\n\n\t/**\n\t * Get the string between the start of the current token and the\n\t * current stream position.\n\t */\n\tcurrent(): string {\n\t\treturn this.substring(this.start, this.pos);\n\t}\n\n\t/**\n\t * Returns contents for given range\n\t */\n\tsubstring(from: number, to: number): string {\n\t\treturn this.document.getText().substring(from, to);\n\t}\n\n\t/**\n\t * Creates error object with current stream state\n\t */\n\terror(message: string): Error {\n\t\tconst err = new Error(`${message} at offset ${this.pos}`);\n\t\treturn err;\n\t}\n\n\t/**\n\t * `match` can be a character code or a function that takes a character code\n\t * and returns a boolean. If the next character in the stream 'matches'\n\t * the given argument, it is consumed and returned.\n\t * Otherwise, `false` is returned.\n\t */\n\teat(match: number | Function): boolean {\n\t\tconst ch = this.peek();\n\t\tconst ok = typeof match === 'function' ? match(ch) : ch === match;\n\n\t\tif (ok) {\n\t\t\tthis.next();\n\t\t}\n\n\t\treturn ok;\n\t}\n\n\t/**\n\t * Repeatedly calls <code>eat</code> with the given argument, until it\n\t * fails. Returns <code>true</code> if any characters were eaten.\n\t */\n\teatWhile(match: number | Function): boolean {\n\t\tconst start = this.pos;\n\t\twhile (!this.eof() && this.eat(match)) { }\n\t\treturn this.pos !== start;\n\t}\n}\n","/* --------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\n'use strict';\nclass FullTextDocument {\n constructor(uri, languageId, version, content) {\n this._uri = uri;\n this._languageId = languageId;\n this._version = version;\n this._content = content;\n this._lineOffsets = undefined;\n }\n get uri() {\n return this._uri;\n }\n get languageId() {\n return this._languageId;\n }\n get version() {\n return this._version;\n }\n getText(range) {\n if (range) {\n const start = this.offsetAt(range.start);\n const end = this.offsetAt(range.end);\n return this._content.substring(start, end);\n }\n return this._content;\n }\n update(changes, version) {\n for (let change of changes) {\n if (FullTextDocument.isIncremental(change)) {\n // makes sure start is before end\n const range = getWellformedRange(change.range);\n // update content\n const startOffset = this.offsetAt(range.start);\n const endOffset = this.offsetAt(range.end);\n this._content = this._content.substring(0, startOffset) + change.text + this._content.substring(endOffset, this._content.length);\n // update the offsets\n const startLine = Math.max(range.start.line, 0);\n const endLine = Math.max(range.end.line, 0);\n let lineOffsets = this._lineOffsets;\n const addedLineOffsets = computeLineOffsets(change.text, false, startOffset);\n if (endLine - startLine === addedLineOffsets.length) {\n for (let i = 0, len = addedLineOffsets.length; i < len; i++) {\n lineOffsets[i + startLine + 1] = addedLineOffsets[i];\n }\n }\n else {\n if (addedLineOffsets.length < 10000) {\n lineOffsets.splice(startLine + 1, endLine - startLine, ...addedLineOffsets);\n }\n else { // avoid too many arguments for splice\n this._lineOffsets = lineOffsets = lineOffsets.slice(0, startLine + 1).concat(addedLineOffsets, lineOffsets.slice(endLine + 1));\n }\n }\n const diff = change.text.length - (endOffset - startOffset);\n if (diff !== 0) {\n for (let i = startLine + 1 + addedLineOffsets.length, len = lineOffsets.length; i < len; i++) {\n lineOffsets[i] = lineOffsets[i] + diff;\n }\n }\n }\n else if (FullTextDocument.isFull(change)) {\n this._content = change.text;\n this._lineOffsets = undefined;\n }\n else {\n throw new Error('Unknown change event received');\n }\n }\n this._version = version;\n }\n getLineOffsets() {\n if (this._lineOffsets === undefined) {\n this._lineOffsets = computeLineOffsets(this._content, true);\n }\n return this._lineOffsets;\n }\n positionAt(offset) {\n offset = Math.max(Math.min(offset, this._content.length), 0);\n let lineOffsets = this.getLineOffsets();\n let low = 0, high = lineOffsets.length;\n if (high === 0) {\n return { line: 0, character: offset };\n }\n while (low < high) {\n let mid = Math.floor((low + high) / 2);\n if (lineOffsets[mid] > offset) {\n high = mid;\n }\n else {\n low = mid + 1;\n }\n }\n // low is the least x for which the line offset is larger than the current offset\n // or array.length if no line offset is larger than the current offset\n let line = low - 1;\n return { line, character: offset - lineOffsets[line] };\n }\n offsetAt(position) {\n let lineOffsets = this.getLineOffsets();\n if (position.line >= lineOffsets.length) {\n return this._content.length;\n }\n else if (position.line < 0) {\n return 0;\n }\n let lineOffset = lineOffsets[position.line];\n let nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;\n return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);\n }\n get lineCount() {\n return this.getLineOffsets().length;\n }\n static isIncremental(event) {\n let candidate = event;\n return candidate !== undefined && candidate !== null &&\n typeof candidate.text === 'string' && candidate.range !== undefined &&\n (candidate.rangeLength === undefined || typeof candidate.rangeLength === 'number');\n }\n static isFull(event) {\n let candidate = event;\n return candidate !== undefined && candidate !== null &&\n typeof candidate.text === 'string' && candidate.range === undefined && candidate.rangeLength === undefined;\n }\n}\nexport var TextDocument;\n(function (TextDocument) {\n /**\n * Creates a new text document.\n *\n * @param uri The document's uri.\n * @param languageId The document's language Id.\n * @param version The document's initial version number.\n * @param content The document's content.\n */\n function create(uri, languageId, version, content) {\n return new FullTextDocument(uri, languageId, version, content);\n }\n TextDocument.create = create;\n /**\n * Updates a TextDocument by modifying its content.\n *\n * @param document the document to update. Only documents created by TextDocument.create are valid inputs.\n * @param changes the changes to apply to the document.\n * @param version the changes version for the document.\n * @returns The updated TextDocument. Note: That's the same document instance passed in as first parameter.\n *\n */\n function update(document, changes, version) {\n if (document instanceof FullTextDocument) {\n document.update(changes, version);\n return document;\n }\n else {\n throw new Error('TextDocument.update: document must be created by TextDocument.create');\n }\n }\n TextDocument.update = update;\n function applyEdits(document, edits) {\n let text = document.getText();\n let sortedEdits = mergeSort(edits.map(getWellformedEdit), (a, b) => {\n let diff = a.range.start.line - b.range.start.line;\n if (diff === 0) {\n return a.range.start.character - b.range.start.character;\n }\n return diff;\n });\n let lastModifiedOffset = 0;\n const spans = [];\n for (const e of sortedEdits) {\n let startOffset = document.offsetAt(e.range.start);\n if (startOffset < lastModifiedOffset) {\n throw new Error('Overlapping edit');\n }\n else if (startOffset > lastModifiedOffset) {\n spans.push(text.substring(lastModifiedOffset, startOffset));\n }\n if (e.newText.length) {\n spans.push(e.newText);\n }\n lastModifiedOffset = document.offsetAt(e.range.end);\n }\n spans.push(text.substr(lastModifiedOffset));\n return spans.join('');\n }\n TextDocument.applyEdits = applyEdits;\n})(TextDocument || (TextDocument = {}));\nfunction mergeSort(data, compare) {\n if (data.length <= 1) {\n // sorted\n return data;\n }\n const p = (data.length / 2) | 0;\n const left = data.slice(0, p);\n const right = data.slice(p);\n mergeSort(left, compare);\n mergeSort(right, compare);\n let leftIdx = 0;\n let rightIdx = 0;\n let i = 0;\n while (leftIdx < left.length && rightIdx < right.length) {\n let ret = compare(left[leftIdx], right[rightIdx]);\n if (ret <= 0) {\n // smaller_equal -> take left to preserve order\n data[i++] = left[leftIdx++];\n }\n else {\n // greater -> take right\n data[i++] = right[rightIdx++];\n }\n }\n while (leftIdx < left.length) {\n data[i++] = left[leftIdx++];\n }\n while (rightIdx < right.length) {\n data[i++] = right[rightIdx++];\n }\n return data;\n}\nfunction computeLineOffsets(text, isAtLineStart, textOffset = 0) {\n const result = isAtLineStart ? [textOffset] : [];\n for (let i = 0; i < text.length; i++) {\n let ch = text.charCodeAt(i);\n if (ch === 13 /* CarriageReturn */ || ch === 10 /* LineFeed */) {\n if (ch === 13 /* CarriageReturn */ && i + 1 < text.length && text.charCodeAt(i + 1) === 10 /* LineFeed */) {\n i++;\n }\n result.push(textOffset + i + 1);\n }\n }\n return result;\n}\nfunction getWellformedRange(range) {\n const start = range.start;\n const end = range.end;\n if (start.line > end.line || (start.line === end.line && start.character > end.character)) {\n return { start: end, end: start };\n }\n return range;\n}\nfunction getWellformedEdit(textEdit) {\n const range = getWellformedRange(textEdit.range);\n if (range !== textEdit.range) {\n return { newText: textEdit.newText, range };\n }\n return textEdit;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { TextDocument } from 'vscode';\nimport { Node as FlatNode } from 'EmmetFlatNode';\nimport parse from '@emmetio/html-matcher';\nimport parseStylesheet from '@emmetio/css-parser';\nimport { isStyleSheet } from './util';\n\ntype Pair<K, V> = {\n\tkey: K;\n\tvalue: V;\n};\n\n// Map(filename, Pair(fileVersion, rootNodeOfParsedContent))\nconst _parseCache = new Map<string, Pair<number, FlatNode> | undefined>();\n\nexport function getRootNode(document: TextDocument, useCache: boolean): FlatNode {\n\tconst key = document.uri.toString();\n\tconst result = _parseCache.get(key);\n\tconst documentVersion = document.version;\n\tif (useCache && result) {\n\t\tif (documentVersion === result.key) {\n\t\t\treturn result.value;\n\t\t}\n\t}\n\n\tconst parseContent = isStyleSheet(document.languageId) ? parseStylesheet : parse;\n\tconst rootNode = parseContent(document.getText());\n\tif (useCache) {\n\t\t_parseCache.set(key, { key: documentVersion, value: rootNode });\n\t}\n\treturn rootNode;\n}\n\nexport function addFileToParseCache(document: TextDocument) {\n\tconst filename = document.uri.toString();\n\t_parseCache.set(filename, undefined);\n}\n\nexport function removeFileFromParseCache(document: TextDocument) {\n\tconst filename = document.uri.toString();\n\t_parseCache.delete(filename);\n}\n\nexport function clearParseCache() {\n\t_parseCache.clear();\n}\n","\"use strict\";\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getEmmetMode = exports.updateExtensionsPath = exports.expandAbbreviation = exports.parseAbbreviation = exports.getExpandOptions = exports.isAbbreviationValid = exports.extractAbbreviationFromText = exports.extractAbbreviation = exports.getDefaultSnippets = exports.getDefaultSyntax = exports.getSyntaxType = exports.isStyleSheet = exports.emmetSnippetField = exports.doComplete = exports.FileType = void 0;\nconst JSONC = __importStar(require(\"jsonc-parser\"));\nconst util_1 = require(\"util\");\nconst vscode_languageserver_types_1 = require(\"vscode-languageserver-types\");\nconst vscode_uri_1 = require(\"vscode-uri\");\nconst data_1 = require(\"./data\");\nconst fileService_1 = require(\"./fileService\");\nObject.defineProperty(exports, \"FileType\", { enumerable: true, get: function () { return fileService_1.FileType; } });\nconst emmet_1 = __importStar(require(\"emmet\"));\nconst configCompat_1 = require(\"./configCompat\");\nlet l10n;\ntry {\n l10n = require('vscode').l10n;\n}\ncatch (_a) {\n // Fallback to the identity function.\n l10n = {\n t: (message) => message\n };\n}\nconst snippetKeyCache = new Map();\nlet markupSnippetKeys;\nconst stylesheetCustomSnippetsKeyCache = new Map();\nconst htmlAbbreviationStartRegex = /^[a-z,A-Z,!,(,[,#,\\.\\{]/;\n// take off { for jsx because it interferes with the language\nconst jsxAbbreviationStartRegex = /^[a-z,A-Z,!,(,[,#,\\.]/;\nconst cssAbbreviationRegex = /^-?[a-z,A-Z,!,@,#]/;\nconst htmlAbbreviationRegex = /[a-z,A-Z\\.]/;\nconst commonlyUsedTags = [...data_1.htmlData.tags, 'lorem'];\nconst bemFilterSuffix = 'bem';\nconst filterDelimitor = '|';\nconst trimFilterSuffix = 't';\nconst commentFilterSuffix = 'c';\nconst maxFilters = 3;\n/**\n * Returns all applicable emmet expansions for abbreviation at given position in a CompletionList\n * @param document TextDocument in which completions are requested\n * @param position Position in the document at which completions are requested\n * @param syntax Emmet supported language\n * @param emmetConfig Emmet Configurations as derived from VS Code\n */\nfunction doComplete(document, position, syntax, emmetConfig) {\n var _a, _b;\n if (emmetConfig.showExpandedAbbreviation === 'never' || !getEmmetMode(syntax, emmetConfig.excludeLanguages)) {\n return;\n }\n const isStyleSheetRes = isStyleSheet(syntax);\n // Fetch markupSnippets so that we can provide possible abbreviation completions\n // For example, when text at position is `a`, completions should return `a:blank`, `a:link`, `acr` etc.\n if (!isStyleSheetRes) {\n if (!snippetKeyCache.has(syntax)) {\n const registry = Object.assign(Object.assign({}, getDefaultSnippets(syntax)), customSnippetsRegistry[syntax]);\n snippetKeyCache.set(syntax, Object.keys(registry));\n }\n markupSnippetKeys = (_a = snippetKeyCache.get(syntax)) !== null && _a !== void 0 ? _a : [];\n }\n const extractOptions = { lookAhead: !isStyleSheetRes, type: isStyleSheetRes ? 'stylesheet' : 'markup' };\n const extractedValue = extractAbbreviation(document, position, extractOptions);\n if (!extractedValue) {\n return;\n }\n const { abbreviationRange, abbreviation, filter } = extractedValue;\n const currentLineTillPosition = getCurrentLine(document, position).substr(0, position.character);\n const currentWord = getCurrentWord(currentLineTillPosition);\n // Don't attempt to expand open tags\n if (currentWord === abbreviation\n && currentLineTillPosition.endsWith(`<${abbreviation}`)\n && configCompat_1.syntaxes.markup.includes(syntax)) {\n return;\n }\n const expandOptions = getExpandOptions(syntax, emmetConfig, filter);\n let expandedText = \"\";\n let expandedAbbr;\n let completionItems = [];\n // Create completion item after expanding given abbreviation\n // if abbreviation is valid and expanded value is not noise\n const createExpandedAbbr = (syntax, abbr) => {\n if (!isAbbreviationValid(syntax, abbreviation)) {\n return;\n }\n try {\n expandedText = (0, emmet_1.default)(abbr, expandOptions);\n // manually patch https://github.com/microsoft/vscode/issues/120245 for now\n if (isStyleSheetRes && '!important'.startsWith(abbr)) {\n expandedText = '!important';\n }\n }\n catch (e) {\n }\n if (!expandedText || isExpandedTextNoise(syntax, abbr, expandedText, expandOptions.options)) {\n return;\n }\n expandedAbbr = vscode_languageserver_types_1.CompletionItem.create(abbr);\n expandedAbbr.textEdit = vscode_languageserver_types_1.TextEdit.replace(abbreviationRange, escapeNonTabStopDollar(addFinalTabStop(expandedText)));\n expandedAbbr.documentation = replaceTabStopsWithCursors(expandedText);\n expandedAbbr.insertTextFormat = vscode_languageserver_types_1.InsertTextFormat.Snippet;\n expandedAbbr.detail = l10n.t('Emmet Abbreviation');\n expandedAbbr.label = abbreviation;\n expandedAbbr.label += filter ? '|' + filter.replace(',', '|') : \"\";\n completionItems = [expandedAbbr];\n };\n if (isStyleSheet(syntax)) {\n createExpandedAbbr(syntax, abbreviation);\n // When abbr is longer than usual emmet snippets and matches better with existing css property, then no emmet\n if (abbreviation.length > 4\n && data_1.cssData.properties.find(x => x.startsWith(abbreviation))) {\n return vscode_languageserver_types_1.CompletionList.create([], true);\n }\n if (expandedAbbr && expandedText.length) {\n expandedAbbr.textEdit = vscode_languageserver_types_1.TextEdit.replace(abbreviationRange, escapeNonTabStopDollar(addFinalTabStop(expandedText)));\n expandedAbbr.documentation = replaceTabStopsWithCursors(expandedText);\n expandedAbbr.label = removeTabStops(expandedText);\n expandedAbbr.filterText = abbreviation;\n // Custom snippets should show up in completions if abbreviation is a prefix\n const stylesheetCustomSnippetsKeys = stylesheetCustomSnippetsKeyCache.has(syntax) ?\n stylesheetCustomSnippetsKeyCache.get(syntax) : stylesheetCustomSnippetsKeyCache.get('css');\n completionItems = makeSnippetSuggestion(stylesheetCustomSnippetsKeys !== null && stylesheetCustomSnippetsKeys !== void 0 ? stylesheetCustomSnippetsKeys : [], abbreviation, abbreviation, abbreviationRange, expandOptions, 'Emmet Custom Snippet', false);\n if (!completionItems.find(x => { var _a, _b, _c; return ((_a = x.textEdit) === null || _a === void 0 ? void 0 : _a.newText) && ((_b = x.textEdit) === null || _b === void 0 ? void 0 : _b.newText) === ((_c = expandedAbbr === null || expandedAbbr === void 0 ? void 0 : expandedAbbr.textEdit) === null || _c === void 0 ? void 0 : _c.newText); })) {\n // Fix for https://github.com/Microsoft/vscode/issues/28933#issuecomment-309236902\n // When user types in propertyname, emmet uses it to match with snippet names, resulting in width -> widows or font-family -> font: family\n // Filter out those cases here.\n const abbrRegex = new RegExp('.*' + abbreviation.split('').map(x => (x === '$' || x === '+') ? '\\\\' + x : x).join('.*') + '.*', 'i');\n if (/\\d/.test(abbreviation) || abbrRegex.test(expandedAbbr.label)) {\n completionItems.push(expandedAbbr);\n }\n }\n }\n }\n else {\n createExpandedAbbr(syntax, abbreviation);\n let tagToFindMoreSuggestionsFor = abbreviation;\n const newTagMatches = abbreviation.match(/(>|\\+)([\\w:-]+)$/);\n if (newTagMatches && newTagMatches.length === 3) {\n tagToFindMoreSuggestionsFor = newTagMatches[2];\n }\n if (syntax !== 'xml') {\n const commonlyUsedTagSuggestions = makeSnippetSuggestion(commonlyUsedTags, tagToFindMoreSuggestionsFor, abbreviation, abbreviationRange, expandOptions, 'Emmet Abbreviation');\n completionItems = completionItems.concat(commonlyUsedTagSuggestions);\n }\n if (emmetConfig.showAbbreviationSuggestions === true) {\n const abbreviationSuggestions = makeSnippetSuggestion(markupSnippetKeys.filter(x => !commonlyUsedTags.includes(x)), tagToFindMoreSuggestionsFor, abbreviation, abbreviationRange, expandOptions, 'Emmet Abbreviation');\n // Workaround for the main expanded abbr not appearing before the snippet suggestions\n if (expandedAbbr && abbreviationSuggestions.length > 0 && tagToFindMoreSuggestionsFor !== abbreviation) {\n expandedAbbr.sortText = '0' + expandedAbbr.label;\n abbreviationSuggestions.forEach(item => {\n // Workaround for snippet suggestions items getting filtered out as the complete abbr does not start with snippetKey\n item.filterText = abbreviation;\n // Workaround for the main expanded abbr not appearing before the snippet suggestions\n item.sortText = '9' + abbreviation;\n });\n }\n completionItems = completionItems.concat(abbreviationSuggestions);\n }\n // https://github.com/microsoft/vscode/issues/66680\n if (syntax === 'html' && completionItems.length >= 2 && abbreviation.includes(\":\")\n && ((_b = expandedAbbr === null || expandedAbbr === void 0 ? void 0 : expandedAbbr.textEdit) === null || _b === void 0 ? void 0 : _b.newText) === `<${abbreviation}>\\${0}</${abbreviation}>`) {\n completionItems = completionItems.filter(item => item.label !== abbreviation);\n }\n }\n if (emmetConfig.showSuggestionsAsSnippets === true) {\n completionItems.forEach(x => x.kind = vscode_languageserver_types_1.CompletionItemKind.Snippet);\n }\n return completionItems.length ? vscode_languageserver_types_1.CompletionList.create(completionItems, true) : undefined;\n}\nexports.doComplete = doComplete;\n/**\n * Create & return snippets for snippet keys that start with given prefix\n */\nfunction makeSnippetSuggestion(snippetKeys, prefix, abbreviation, abbreviationRange, expandOptions, snippetDetail, skipFullMatch = true) {\n if (!prefix || !snippetKeys) {\n return [];\n }\n const snippetCompletions = [];\n snippetKeys.forEach(snippetKey => {\n if (!snippetKey.startsWith(prefix.toLowerCase()) || (skipFullMatch && snippetKey === prefix.toLowerCase())) {\n return;\n }\n const currentAbbr = abbreviation + snippetKey.substr(prefix.length);\n let expandedAbbr;\n try {\n expandedAbbr = (0, emmet_1.default)(currentAbbr, expandOptions);\n }\n catch (e) {\n }\n if (!expandedAbbr) {\n return;\n }\n const item = vscode_languageserver_types_1.CompletionItem.create(prefix + snippetKey.substr(prefix.length));\n item.documentation = replaceTabStopsWithCursors(expandedAbbr);\n item.detail = snippetDetail;\n item.textEdit = vscode_languageserver_types_1.TextEdit.replace(abbreviationRange, escapeNonTabStopDollar(addFinalTabStop(expandedAbbr)));\n item.insertTextFormat = vscode_languageserver_types_1.InsertTextFormat.Snippet;\n snippetCompletions.push(item);\n });\n return snippetCompletions;\n}\nfunction getCurrentWord(currentLineTillPosition) {\n if (currentLineTillPosition) {\n const matches = currentLineTillPosition.match(/[\\w,:,-,\\.]*$/);\n if (matches) {\n return matches[0];\n }\n }\n}\nfunction replaceTabStopsWithCursors(expandedWord) {\n return expandedWord.replace(/([^\\\\])\\$\\{\\d+\\}/g, '$1|').replace(/\\$\\{\\d+:([^\\}]+)\\}/g, '$1');\n}\nfunction removeTabStops(expandedWord) {\n return expandedWord.replace(/([^\\\\])\\$\\{\\d+\\}/g, '$1').replace(/\\$\\{\\d+:([^\\}]+)\\}/g, '$1');\n}\nfunction escapeNonTabStopDollar(text) {\n return text ? text.replace(/([^\\\\])(\\$)([^\\{])/g, '$1\\\\$2$3') : text;\n}\nfunction addFinalTabStop(text) {\n if (!text || !text.trim()) {\n return text;\n }\n let maxTabStop = -1;\n let maxTabStopRanges = [];\n let foundLastStop = false;\n let replaceWithLastStop = false;\n let i = 0;\n const n = text.length;\n try {\n while (i < n && !foundLastStop) {\n // Look for ${\n if (text[i++] != '$' || text[i++] != '{') {\n continue;\n }\n // Find tabstop\n let numberStart = -1;\n let numberEnd = -1;\n while (i < n && /\\d/.test(text[i])) {\n numberStart = numberStart < 0 ? i : numberStart;\n numberEnd = i + 1;\n i++;\n }\n // If ${ was not followed by a number and either } or :, then its not a tabstop\n if (numberStart === -1 || numberEnd === -1 || i >= n || (text[i] != '}' && text[i] != ':')) {\n continue;\n }\n // If ${0} was found, then break\n const currentTabStop = text.substring(numberStart, numberEnd);\n foundLastStop = currentTabStop === '0';\n if (foundLastStop) {\n break;\n }\n let foundPlaceholder = false;\n if (text[i++] == ':') {\n // TODO: Nested placeholders may break here\n while (i < n) {\n if (text[i] == '}') {\n foundPlaceholder = true;\n break;\n }\n i++;\n }\n }\n // Decide to replace currentTabStop with ${0} only if its the max among all tabstops and is not a placeholder\n if (Number(currentTabStop) > Number(maxTabStop)) {\n maxTabStop = Number(currentTabStop);\n maxTabStopRanges = [{ numberStart, numberEnd }];\n replaceWithLastStop = !foundPlaceholder;\n }\n else if (Number(currentTabStop) === maxTabStop) {\n maxTabStopRanges.push({ numberStart, numberEnd });\n }\n }\n }\n catch (e) {\n }\n if (replaceWithLastStop && !foundLastStop) {\n for (let i = 0; i < maxTabStopRanges.length; i++) {\n const rangeStart = maxTabStopRanges[i].numberStart;\n const rangeEnd = maxTabStopRanges[i].numberEnd;\n text = text.substr(0, rangeStart) + '0' + text.substr(rangeEnd);\n }\n }\n return text;\n}\nfunction getCurrentLine(document, position) {\n const offset = document.offsetAt(position);\n const text = document.getText();\n let start = 0;\n let end = text.length;\n for (let i = offset - 1; i >= 0; i--) {\n if (text[i] === '\\n') {\n start = i + 1;\n break;\n }\n }\n for (let i = offset; i < text.length; i++) {\n if (text[i] === '\\n') {\n end = i;\n break;\n }\n }\n return text.substring(start, end);\n}\nlet customSnippetsRegistry = {};\nlet variablesFromFile = {};\nlet profilesFromFile = {};\nconst emmetSnippetField = (index, placeholder) => `\\${${index}${placeholder ? ':' + placeholder : ''}}`;\nexports.emmetSnippetField = emmetSnippetField;\n/** Returns whether or not syntax is a supported stylesheet syntax, like CSS */\nfunction isStyleSheet(syntax) {\n return configCompat_1.syntaxes.stylesheet.includes(syntax);\n}\nexports.isStyleSheet = isStyleSheet;\n/** Returns the syntax type, either markup (e.g. for HTML) or stylesheet (e.g. for CSS) */\nfunction getSyntaxType(syntax) {\n return isStyleSheet(syntax) ? 'stylesheet' : 'markup';\n}\nexports.getSyntaxType = getSyntaxType;\n/** Returns the default syntax (html or css) to use for the snippets registry */\nfunction getDefaultSyntax(syntax) {\n return isStyleSheet(syntax) ? 'css' : 'html';\n}\nexports.getDefaultSyntax = getDefaultSyntax;\n/** Returns the default snippets that Emmet suggests */\nfunction getDefaultSnippets(syntax) {\n const syntaxType = getSyntaxType(syntax);\n const emptyUserConfig = { type: syntaxType, syntax };\n const resolvedConfig = (0, emmet_1.resolveConfig)(emptyUserConfig);\n // https://github.com/microsoft/vscode/issues/97632\n // don't return markup (HTML) snippets for XML\n return syntax === 'xml' ? {} : resolvedConfig.snippets;\n}\nexports.getDefaultSnippets = getDefaultSnippets;\nfunction getFilters(text, pos) {\n let filter;\n for (let i = 0; i < maxFilters; i++) {\n if (text.endsWith(`${filterDelimitor}${bemFilterSuffix}`, pos)) {\n pos -= bemFilterSuffix.length + 1;\n filter = filter ? bemFilterSuffix + ',' + filter : bemFilterSuffix;\n }\n else if (text.endsWith(`${filterDelimitor}${commentFilterSuffix}`, pos)) {\n pos -= commentFilterSuffix.length + 1;\n filter = filter ? commentFilterSuffix + ',' + filter : commentFilterSuffix;\n }\n else if (text.endsWith(`${filterDelimitor}${trimFilterSuffix}`, pos)) {\n pos -= trimFilterSuffix.length + 1;\n filter = filter ? trimFilterSuffix + ',' + filter : trimFilterSuffix;\n }\n else {\n break;\n }\n }\n return {\n pos: pos,\n filter: filter\n };\n}\n/**\n * Extracts abbreviation from the given position in the given document\n * @param document The TextDocument from which abbreviation needs to be extracted\n * @param position The Position in the given document from where abbreviation needs to be extracted\n * @param options The options to pass to the @emmetio/extract-abbreviation module\n */\nfunction extractAbbreviation(document, position, options) {\n const currentLine = getCurrentLine(document, position);\n const currentLineTillPosition = currentLine.substr(0, position.character);\n const { pos, filter } = getFilters(currentLineTillPosition, position.character);\n const lengthOccupiedByFilter = filter ? filter.length + 1 : 0;\n const result = (0, emmet_1.extract)(currentLine, pos, options);\n if (!result) {\n return;\n }\n const rangeToReplace = vscode_languageserver_types_1.Range.create(position.line, result.location, position.line, result.location + result.abbreviation.length + lengthOccupiedByFilter);\n return {\n abbreviationRange: rangeToReplace,\n abbreviation: result.abbreviation,\n filter\n };\n}\nexports.extractAbbreviation = extractAbbreviation;\n/**\n * Extracts abbreviation from the given text\n * @param text Text from which abbreviation needs to be extracted\n * @param syntax Syntax used to extract the abbreviation from the given text\n */\nfunction extractAbbreviationFromText(text, syntax) {\n if (!text) {\n return;\n }\n const { pos, filter } = getFilters(text, text.length);\n const extractOptions = (isStyleSheet(syntax) || syntax === 'stylesheet') ?\n { syntax: 'stylesheet', lookAhead: false } :\n { lookAhead: true };\n const result = (0, emmet_1.extract)(text, pos, extractOptions);\n if (!result) {\n return;\n }\n return {\n abbreviation: result.abbreviation,\n filter\n };\n}\nexports.extractAbbreviationFromText = extractAbbreviationFromText;\n/**\n * Returns a boolean denoting validity of given abbreviation in the context of given syntax\n * Not needed once https://github.com/emmetio/atom-plugin/issues/22 is fixed\n * @param syntax string\n * @param abbreviation string\n */\nfunction isAbbreviationValid(syntax, abbreviation) {\n if (!abbreviation) {\n return false;\n }\n if (isStyleSheet(syntax)) {\n if (abbreviation.includes('#')) {\n if (abbreviation.startsWith('#')) {\n const hexColorRegex = /^#[\\d,a-f,A-F]{1,6}$/;\n return hexColorRegex.test(abbreviation);\n }\n else if (commonlyUsedTags.includes(abbreviation.substring(0, abbreviation.indexOf('#')))) {\n return false;\n }\n }\n return cssAbbreviationRegex.test(abbreviation);\n }\n if (abbreviation.startsWith('!')) {\n return !/[^!]/.test(abbreviation);\n }\n // Its common for users to type (sometextinsidebrackets), this should not be treated as an abbreviation\n // Grouping in abbreviation is valid only if it's inside a text node or preceeded/succeeded with one of the symbols for nesting, sibling, repeater or climb up\n // Also, cases such as `span[onclick=\"alert();\"]` are valid\n if ((/\\(/.test(abbreviation) || /\\)/.test(abbreviation))\n && !/\\{[^\\}\\{]*[\\(\\)]+[^\\}\\{]*\\}(?:[>\\+\\*\\^]|$)/.test(abbreviation)\n && !/\\(.*\\)[>\\+\\*\\^]/.test(abbreviation)\n && !/\\[[^\\[\\]\\(\\)]+=\".*\"\\]/.test(abbreviation)\n && !/[>\\+\\*\\^]\\(.*\\)/.test(abbreviation)) {\n return false;\n }\n if (syntax === 'jsx') {\n return (jsxAbbreviationStartRegex.test(abbreviation) && htmlAbbreviationRegex.test(abbreviation));\n }\n // Fix for jinja syntax https://github.com/microsoft/vscode/issues/179422\n if (/^{%|{#|{{/.test(abbreviation)) {\n return false;\n }\n return (htmlAbbreviationStartRegex.test(abbreviation) && htmlAbbreviationRegex.test(abbreviation));\n}\nexports.isAbbreviationValid = isAbbreviationValid;\nfunction isExpandedTextNoise(syntax, abbreviation, expandedText, options) {\n var _a, _b;\n // Unresolved css abbreviations get expanded to a blank property value\n // Eg: abc -> abc: ; or abc:d -> abc: d; which is noise if it gets suggested for every word typed\n if (isStyleSheet(syntax) && options) {\n const between = (_a = options['stylesheet.between']) !== null && _a !== void 0 ? _a : ': ';\n const after = (_b = options['stylesheet.after']) !== null && _b !== void 0 ? _b : ';';\n // Remove overlapping between `abbreviation` and `between`, if any\n let endPrefixIndex = abbreviation.indexOf(between[0], Math.max(abbreviation.length - between.length, 0));\n endPrefixIndex = endPrefixIndex >= 0 ? endPrefixIndex : abbreviation.length;\n const abbr = abbreviation.substring(0, endPrefixIndex);\n return expandedText === `${abbr}${between}\\${0}${after}` ||\n expandedText.replace(/\\s/g, '') === abbreviation.replace(/\\s/g, '') + after;\n }\n // we don't want common html tags suggested for xml\n if (syntax === 'xml' &&\n commonlyUsedTags.some(tag => tag.startsWith(abbreviation.toLowerCase()))) {\n return true;\n }\n if (commonlyUsedTags.includes(abbreviation.toLowerCase()) ||\n markupSnippetKeys.includes(abbreviation)) {\n return false;\n }\n // Custom tags can have - or :\n if (/[-,:]/.test(abbreviation) && !/--|::/.test(abbreviation) &&\n !abbreviation.endsWith(':')) {\n return false;\n }\n // users might write successive dots '..', '...' which shouldn't be treated as an abbreviation\n if (/^\\.{2,}$/.test(abbreviation)) {\n return true;\n }\n // Its common for users to type some text and end it with period, this should not be treated as an abbreviation\n // Else it becomes noise.\n // When user just types '.', return the expansion\n // Otherwise emmet loses change to participate later\n // For example in `.foo`. See https://github.com/Microsoft/vscode/issues/66013\n if (abbreviation === '.') {\n return false;\n }\n const dotMatches = abbreviation.match(/^([a-z,A-Z,\\d]*)\\.$/);\n if (dotMatches) {\n // Valid html tags such as `div.`\n if (dotMatches[1] && data_1.htmlData.tags.includes(dotMatches[1])) {\n return false;\n }\n return true;\n }\n // Fix for https://github.com/microsoft/vscode/issues/89746\n // PascalCase tags are common in jsx code, which should not be treated as noise.\n // Eg: MyAwesomComponent -> <MyAwesomComponent></MyAwesomComponent>\n if (syntax === 'jsx' && /^([A-Z][A-Za-z0-9]*)+$/.test(abbreviation)) {\n return false;\n }\n // Unresolved html abbreviations get expanded as if it were a tag\n // Eg: abc -> <abc></abc> which is noise if it gets suggested for every word typed\n return (expandedText.toLowerCase() === `<${abbreviation.toLowerCase()}>\\${1}</${abbreviation.toLowerCase()}>`);\n}\n/**\n * Returns options to be used by emmet\n */\nfunction getExpandOptions(syntax, emmetConfig, filter) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;\n emmetConfig = emmetConfig !== null && emmetConfig !== void 0 ? emmetConfig : {};\n emmetConfig['preferences'] = (_a = emmetConfig['preferences']) !== null && _a !== void 0 ? _a : {};\n const preferences = emmetConfig['preferences'];\n const stylesheetSyntax = isStyleSheet(syntax) ? syntax : 'css';\n // Fetch Profile\n const profile = getProfile(syntax, (_b = emmetConfig['syntaxProfiles']) !== null && _b !== void 0 ? _b : {});\n const filtersFromProfile = (profile && profile['filters']) ? profile['filters'].split(',') : [];\n const trimmedFilters = filtersFromProfile.map(filterFromProfile => filterFromProfile.trim());\n const bemEnabled = (filter && filter.split(',').some(x => x.trim() === 'bem')) || trimmedFilters.includes('bem');\n const commentEnabled = (filter && filter.split(',').some(x => x.trim() === 'c')) || trimmedFilters.includes('c');\n // Fetch formatters\n const formatters = getFormatters(syntax, emmetConfig['preferences']);\n const unitAliases = ((formatters === null || formatters === void 0 ? void 0 : formatters.stylesheet) && formatters.stylesheet['unitAliases']) || {};\n // These options are the default values provided by vscode for\n // extension preferences\n const defaultVSCodeOptions = {\n // inlineElements: string[],\n // 'output.indent': string,\n // 'output.baseIndent': string,\n // 'output.newline': string,\n // 'output.tagCase': profile['tagCase'],\n // 'output.attributeCase': profile['attributeCase'],\n // 'output.attributeQuotes': profile['attributeQuotes'],\n // 'output.format': profile['format'] ?? true,\n // 'output.formatLeafNode': boolean,\n 'output.formatSkip': ['html'],\n 'output.formatForce': ['body'],\n 'output.inlineBreak': 0,\n 'output.compactBoolean': false,\n // 'output.booleanAttributes': string[],\n 'output.reverseAttributes': false,\n // 'output.selfClosingStyle': profile['selfClosingStyle'],\n 'output.field': exports.emmetSnippetField,\n // 'output.text': TextOutput,\n 'markup.href': true,\n 'comment.enabled': false,\n 'comment.trigger': ['id', 'class'],\n 'comment.before': '',\n 'comment.after': '\\n<!-- /[#ID][.CLASS] -->',\n 'bem.enabled': false,\n 'bem.element': '__',\n 'bem.modifier': '_',\n 'jsx.enabled': syntax === 'jsx',\n // 'stylesheet.keywords': string[],\n // 'stylesheet.unitless': string[],\n 'stylesheet.shortHex': true,\n 'stylesheet.between': syntax === 'stylus' ? ' ' : ': ',\n 'stylesheet.after': (syntax === 'sass' || syntax === 'stylus') ? '' : ';',\n 'stylesheet.intUnit': 'px',\n 'stylesheet.floatUnit': 'em',\n 'stylesheet.unitAliases': { e: 'em', p: '%', x: 'ex', r: 'rem' },\n // 'stylesheet.json': boolean,\n // 'stylesheet.jsonDoubleQuotes': boolean,\n 'stylesheet.fuzzySearchMinScore': 0.3,\n };\n // These options come from user prefs in the vscode repo\n let userPreferenceOptions = {\n // inlineElements: string[],\n // 'output.indent': string,\n // 'output.baseIndent': string,\n // 'output.newline': string,\n 'output.tagCase': profile['tagCase'],\n 'output.attributeCase': profile['attributeCase'],\n 'output.attributeQuotes': profile['attributeQuotes'],\n 'output.format': (_c = profile['format']) !== null && _c !== void 0 ? _c : true,\n // 'output.formatLeafNode': boolean,\n 'output.formatSkip': preferences['format.noIndentTags'],\n 'output.formatForce': preferences['format.forceIndentationForTags'],\n 'output.inlineBreak': (_d = profile['inlineBreak']) !== null && _d !== void 0 ? _d : preferences['output.inlineBreak'],\n 'output.compactBoolean': (_e = profile['compactBooleanAttributes']) !== null && _e !== void 0 ? _e : preferences['profile.allowCompactBoolean'],\n // 'output.booleanAttributes': string[],\n 'output.reverseAttributes': preferences['output.reverseAttributes'],\n 'output.selfClosingStyle': (_g = (_f = profile['selfClosingStyle']) !== null && _f !== void 0 ? _f : preferences['output.selfClosingStyle']) !== null && _g !== void 0 ? _g : getClosingStyle(syntax),\n 'output.field': exports.emmetSnippetField,\n // 'output.text': TextOutput,\n // 'markup.href': boolean,\n 'comment.enabled': commentEnabled,\n 'comment.trigger': preferences['filter.commentTrigger'],\n 'comment.before': preferences['filter.commentBefore'],\n 'comment.after': preferences['filter.commentAfter'],\n 'bem.enabled': bemEnabled,\n 'bem.element': (_h = preferences['bem.elementSeparator']) !== null && _h !== void 0 ? _h : '__',\n 'bem.modifier': (_j = preferences['bem.modifierSeparator']) !== null && _j !== void 0 ? _j : '_',\n 'jsx.enabled': syntax === 'jsx',\n // 'stylesheet.keywords': string[],\n // 'stylesheet.unitless': string[],\n 'stylesheet.shortHex': preferences['css.color.short'],\n 'stylesheet.between': preferences[`${stylesheetSyntax}.valueSeparator`],\n 'stylesheet.after': preferences[`${stylesheetSyntax}.propertyEnd`],\n 'stylesheet.intUnit': preferences['css.intUnit'],\n 'stylesheet.floatUnit': preferences['css.floatUnit'],\n 'stylesheet.unitAliases': unitAliases,\n // 'stylesheet.json': boolean,\n // 'stylesheet.jsonDoubleQuotes': boolean,\n 'stylesheet.fuzzySearchMinScore': preferences['css.fuzzySearchMinScore']\n };\n if (syntax === 'jsx') {\n // Ref https://github.com/emmetio/emmet/blob/master/src/config.ts#L391\n const defaultMarkupAttributeOptions = {\n 'class': 'className',\n 'class*': 'styleName',\n 'for': 'htmlFor'\n };\n const defaultMarkupValuePrefixOptions = {\n 'class*': 'styles'\n };\n // Rather than trying to merge these specific options upstream,\n // we can merge them here before passing them upstream.\n if (profile['markup.attributes']) {\n userPreferenceOptions['markup.attributes'] = Object.assign(Object.assign({}, defaultMarkupAttributeOptions), profile['markup.attributes']);\n }\n if (profile['markup.valuePrefix']) {\n userPreferenceOptions['markup.valuePrefix'] = Object.assign(Object.assign({}, defaultMarkupValuePrefixOptions), profile['markup.valuePrefix']);\n }\n }\n const combinedOptions = {};\n [...Object.keys(defaultVSCodeOptions), ...Object.keys(userPreferenceOptions)].forEach(key => {\n var _a;\n const castKey = key;\n combinedOptions[castKey] = (_a = userPreferenceOptions[castKey]) !== null && _a !== void 0 ? _a : defaultVSCodeOptions[castKey];\n });\n const mergedAliases = Object.assign(Object.assign({}, defaultVSCodeOptions['stylesheet.unitAliases']), userPreferenceOptions['stylesheet.unitAliases']);\n combinedOptions['stylesheet.unitAliases'] = mergedAliases;\n const type = getSyntaxType(syntax);\n const variables = getVariables(emmetConfig['variables']);\n const baseSyntax = getDefaultSyntax(syntax);\n const snippets = (type === 'stylesheet') ?\n ((_k = customSnippetsRegistry[syntax]) !== null && _k !== void 0 ? _k : customSnippetsRegistry[baseSyntax]) :\n customSnippetsRegistry[syntax];\n return {\n type,\n options: combinedOptions,\n variables,\n snippets,\n syntax,\n // context: null,\n text: undefined,\n maxRepeat: 1000,\n // cache: null\n };\n}\nexports.getExpandOptions = getExpandOptions;\nfunction getClosingStyle(syntax) {\n switch (syntax) {\n case 'xhtml': return 'xhtml';\n case 'xml': return 'xml';\n case 'xsl': return 'xml';\n case 'jsx': return 'xhtml';\n default: return 'html';\n }\n}\n/**\n * Parses given abbreviation using given options and returns a tree\n * @param abbreviation string\n * @param options options used by the emmet module to parse given abbreviation\n */\nfunction parseAbbreviation(abbreviation, options) {\n const resolvedOptions = (0, emmet_1.resolveConfig)(options);\n return (options.type === 'stylesheet') ?\n (0, emmet_1.parseStylesheet)(abbreviation, resolvedOptions) :\n (0, emmet_1.parseMarkup)(abbreviation, resolvedOptions);\n}\nexports.parseAbbreviation = parseAbbreviation;\n/**\n * Expands given abbreviation using given options\n * @param abbreviation string or parsed abbreviation\n * @param config options used by the @emmetio/expand-abbreviation module to expand given abbreviation\n */\nfunction expandAbbreviation(abbreviation, config) {\n let expandedText;\n const resolvedConfig = (0, emmet_1.resolveConfig)(config);\n if (config.type === 'stylesheet') {\n if (typeof abbreviation === 'string') {\n expandedText = (0, emmet_1.default)(abbreviation, resolvedConfig);\n }\n else {\n expandedText = (0, emmet_1.stringifyStylesheet)(abbreviation, resolvedConfig);\n }\n }\n else {\n if (typeof abbreviation === 'string') {\n expandedText = (0, emmet_1.default)(abbreviation, resolvedConfig);\n }\n else {\n expandedText = (0, emmet_1.stringifyMarkup)(abbreviation, resolvedConfig);\n }\n }\n return escapeNonTabStopDollar(addFinalTabStop(expandedText));\n}\nexports.expandAbbreviation = expandAbbreviation;\n/**\n * Maps and returns syntaxProfiles of previous format to ones compatible with new emmet modules\n * @param syntax\n */\nfunction getProfile(syntax, profilesFromSettings) {\n if (!profilesFromSettings) {\n profilesFromSettings = {};\n }\n const profilesConfig = Object.assign({}, profilesFromFile, profilesFromSettings);\n const options = profilesConfig[syntax];\n if (!options || typeof options === 'string') {\n if (options === 'xhtml') {\n return {\n selfClosingStyle: 'xhtml'\n };\n }\n return {};\n }\n const newOptions = {};\n for (const key in options) {\n switch (key) {\n case 'tag_case':\n newOptions['tagCase'] = (options[key] === 'lower' || options[key] === 'upper') ? options[key] : '';\n break;\n case 'attr_case':\n newOptions['attributeCase'] = (options[key] === 'lower' || options[key] === 'upper') ? options[key] : '';\n break;\n case 'attr_quotes':\n newOptions['attributeQuotes'] = options[key];\n break;\n case 'tag_nl':\n newOptions['format'] = (options[key] === true || options[key] === false) ? options[key] : true;\n break;\n case 'inline_break':\n newOptions['inlineBreak'] = options[key];\n break;\n case 'self_closing_tag':\n if (options[key] === true) {\n newOptions['selfClosingStyle'] = 'xml';\n break;\n }\n if (options[key] === false) {\n newOptions['selfClosingStyle'] = 'html';\n break;\n }\n newOptions['selfClosingStyle'] = options[key];\n break;\n case 'compact_bool':\n newOptions['compactBooleanAttributes'] = options[key];\n break;\n default:\n newOptions[key] = options[key];\n break;\n }\n }\n return newOptions;\n}\n/**\n * Returns variables to be used while expanding snippets\n */\nfunction getVariables(variablesFromSettings) {\n if (!variablesFromSettings) {\n return variablesFromFile;\n }\n return Object.assign({}, variablesFromFile, variablesFromSettings);\n}\nfunction getFormatters(syntax, preferences) {\n if (!preferences || typeof preferences !== 'object') {\n return {};\n }\n if (!isStyleSheet(syntax)) {\n const commentFormatter = {};\n for (const key in preferences) {\n switch (key) {\n case 'filter.commentAfter':\n commentFormatter['after'] = preferences[key];\n break;\n case 'filter.commentBefore':\n commentFormatter['before'] = preferences[key];\n break;\n case 'filter.commentTrigger':\n commentFormatter['trigger'] = preferences[key];\n break;\n default:\n break;\n }\n }\n return {\n comment: commentFormatter\n };\n }\n let fuzzySearchMinScore = typeof (preferences === null || preferences === void 0 ? void 0 : preferences['css.fuzzySearchMinScore']) === 'number' ? preferences['css.fuzzySearchMinScore'] : 0.3;\n if (fuzzySearchMinScore > 1) {\n fuzzySearchMinScore = 1;\n }\n else if (fuzzySearchMinScore < 0) {\n fuzzySearchMinScore = 0;\n }\n const stylesheetFormatter = {\n 'fuzzySearchMinScore': fuzzySearchMinScore\n };\n for (const key in preferences) {\n switch (key) {\n case 'css.floatUnit':\n stylesheetFormatter['floatUnit'] = preferences[key];\n break;\n case 'css.intUnit':\n stylesheetFormatter['intUnit'] = preferences[key];\n break;\n case 'css.unitAliases':\n const unitAliases = {};\n preferences[key].split(',').forEach((alias) => {\n if (!alias || !alias.trim() || !alias.includes(':')) {\n return;\n }\n const aliasName = alias.substr(0, alias.indexOf(':'));\n const aliasValue = alias.substr(aliasName.length + 1);\n if (!aliasName.trim() || !aliasValue) {\n return;\n }\n unitAliases[aliasName.trim()] = aliasValue;\n });\n stylesheetFormatter['unitAliases'] = unitAliases;\n break;\n case `${syntax}.valueSeparator`:\n stylesheetFormatter['between'] = preferences[key];\n break;\n case `${syntax}.propertyEnd`:\n stylesheetFormatter['after'] = preferences[key];\n break;\n default:\n break;\n }\n }\n return {\n stylesheet: stylesheetFormatter\n };\n}\n/**\n * Updates customizations from snippets.json and syntaxProfiles.json files in the directory configured in emmet.extensionsPath setting\n * @param emmetExtensionsPathSetting setting passed from emmet.extensionsPath. Supports multiple paths\n */\nfunction updateExtensionsPath(emmetExtensionsPathSetting, fs, workspaceFolderPaths, homeDir) {\n return __awaiter(this, void 0, void 0, function* () {\n resetSettingsFromFile();\n if (!emmetExtensionsPathSetting.length) {\n return;\n }\n // Extract URIs from the given setting\n const emmetExtensionsPathUri = [];\n for (let emmetExtensionsPath of emmetExtensionsPathSetting) {\n if (typeof emmetExtensionsPath !== 'string') {\n console.warn(\"The following emmetExtensionsPath isn't a string: \" + JSON.stringify(emmetExtensionsPath));\n continue;\n }\n emmetExtensionsPath = emmetExtensionsPath.trim();\n if (emmetExtensionsPath.length && emmetExtensionsPath[0] === '~') {\n if (homeDir) {\n emmetExtensionsPathUri.push((0, fileService_1.joinPath)(homeDir, emmetExtensionsPath.substring(1)));\n }\n }\n else if (!(0, fileService_1.isAbsolutePath)(emmetExtensionsPath)) {\n if (workspaceFolderPaths) {\n // Try pushing the path for each workspace root\n for (const workspacePath of workspaceFolderPaths) {\n emmetExtensionsPathUri.push((0, fileService_1.joinPath)(workspacePath, emmetExtensionsPath));\n }\n }\n }\n else {\n emmetExtensionsPathUri.push(vscode_uri_1.URI.file(emmetExtensionsPath));\n }\n }\n // For each URI, grab the files\n for (const uri of emmetExtensionsPathUri) {\n try {\n if ((yield fs.stat(uri)).type !== fileService_1.FileType.Directory) {\n // Invalid directory, or path is not a directory\n continue;\n }\n }\n catch (e) {\n // stat threw an error\n continue;\n }\n const snippetsPath = (0, fileService_1.joinPath)(uri, 'snippets.json');\n const profilesPath = (0, fileService_1.joinPath)(uri, 'syntaxProfiles.json');\n let decoder;\n if (typeof globalThis.TextDecoder === 'function') {\n decoder = new globalThis.TextDecoder();\n }\n else {\n decoder = new util_1.TextDecoder();\n }\n // the only errors we want to throw here are JSON parse errors\n let snippetsDataStr = \"\";\n try {\n const snippetsData = yield fs.readFile(snippetsPath);\n snippetsDataStr = decoder.decode(snippetsData);\n }\n catch (e) {\n }\n if (snippetsDataStr.length) {\n try {\n const snippetsJson = tryParseFile(snippetsPath, snippetsDataStr);\n if (snippetsJson['variables']) {\n updateVariables(snippetsJson['variables']);\n }\n updateSnippets(snippetsJson);\n }\n catch (e) {\n resetSettingsFromFile();\n throw e;\n }\n }\n let profilesDataStr = \"\";\n try {\n const profilesData = yield fs.readFile(profilesPath);\n profilesDataStr = decoder.decode(profilesData);\n }\n catch (e) {\n }\n if (profilesDataStr.length) {\n try {\n const profilesJson = tryParseFile(profilesPath, profilesDataStr);\n updateProfiles(profilesJson);\n }\n catch (e) {\n resetSettingsFromFile();\n throw e;\n }\n }\n }\n });\n}\nexports.updateExtensionsPath = updateExtensionsPath;\nfunction tryParseFile(strPath, dataStr) {\n let errors = [];\n const json = JSONC.parse(dataStr, errors);\n if (errors.length) {\n throw new Error(`Found error ${JSONC.printParseErrorCode(errors[0].error)} while parsing the file ${strPath} at offset ${errors[0].offset}`);\n }\n return json;\n}\n/**\n * Assigns variables from one snippet file under emmet.extensionsPath to\n * variablesFromFile\n */\nfunction updateVariables(varsJson) {\n if (typeof varsJson === 'object' && varsJson) {\n variablesFromFile = Object.assign({}, variablesFromFile, varsJson);\n }\n else {\n throw new Error(l10n.t('Invalid emmet.variables field. See https://code.visualstudio.com/docs/editor/emmet#_emmet-configuration for a valid example.'));\n }\n}\n/**\n * Assigns profiles from one profile file under emmet.extensionsPath to\n * profilesFromFile\n */\nfunction updateProfiles(profileJson) {\n if (typeof profileJson === 'object' && profileJson) {\n profilesFromFile = Object.assign({}, profilesFromFile, profileJson);\n }\n else {\n throw new Error(l10n.t('Invalid syntax profile. See https://code.visualstudio.com/docs/editor/emmet#_emmet-configuration for a valid example.'));\n }\n}\n/**\n * Assigns snippets from one snippet file under emmet.extensionsPath to\n * customSnippetsRegistry, snippetKeyCache, and stylesheetCustomSnippetsKeyCache\n */\nfunction updateSnippets(snippetsJson) {\n if (typeof snippetsJson === 'object' && snippetsJson) {\n Object.keys(snippetsJson).forEach(syntax => {\n if (!snippetsJson[syntax]['snippets']) {\n return;\n }\n const baseSyntax = getDefaultSyntax(syntax);\n let customSnippets = snippetsJson[syntax]['snippets'];\n if (snippetsJson[baseSyntax] && snippetsJson[baseSyntax]['snippets'] && baseSyntax !== syntax) {\n customSnippets = Object.assign({}, snippetsJson[baseSyntax]['snippets'], snippetsJson[syntax]['snippets']);\n }\n if (!isStyleSheet(syntax)) {\n // In Emmet 2.0 all snippets should be valid abbreviations\n // Convert old snippets that do not follow this format to new format\n for (const snippetKey in customSnippets) {\n if (customSnippets.hasOwnProperty(snippetKey)\n && customSnippets[snippetKey].startsWith('<')\n && customSnippets[snippetKey].endsWith('>')) {\n customSnippets[snippetKey] = `{${customSnippets[snippetKey]}}`;\n }\n }\n }\n else {\n const prevSnippetKeys = stylesheetCustomSnippetsKeyCache.get(syntax);\n const mergedSnippetKeys = Object.assign([], prevSnippetKeys, Object.keys(customSnippets));\n stylesheetCustomSnippetsKeyCache.set(syntax, mergedSnippetKeys);\n }\n const prevSnippetsRegistry = customSnippetsRegistry[syntax];\n const newSnippets = (0, configCompat_1.parseSnippets)(customSnippets);\n const mergedSnippets = Object.assign({}, prevSnippetsRegistry, newSnippets);\n customSnippetsRegistry[syntax] = mergedSnippets;\n });\n }\n else {\n throw new Error(l10n.t('Invalid snippets file. See https://code.visualstudio.com/docs/editor/emmet#_using-custom-emmet-snippets for a valid example.'));\n }\n}\nfunction resetSettingsFromFile() {\n customSnippetsRegistry = {};\n snippetKeyCache.clear();\n stylesheetCustomSnippetsKeyCache.clear();\n profilesFromFile = {};\n variablesFromFile = {};\n}\n/**\n* Get the corresponding emmet mode for given vscode language mode\n* Eg: jsx for typescriptreact/javascriptreact or pug for jade\n* If the language is not supported by emmet or has been exlcuded via `exlcudeLanguages` setting,\n* then nothing is returned\n*\n* @param language\n* @param exlcudedLanguages Array of language ids that user has chosen to exlcude for emmet\n*/\nfunction getEmmetMode(language, excludedLanguages = []) {\n if (!language || excludedLanguages.includes(language)) {\n return;\n }\n if (/\\b(typescriptreact|javascriptreact|jsx-tags)\\b/.test(language)) { // treat tsx like jsx\n return 'jsx';\n }\n if (language === 'sass-indented') { // map sass-indented to sass\n return 'sass';\n }\n if (language === 'jade') {\n return 'pug';\n }\n if (configCompat_1.syntaxes.markup.includes(language) || configCompat_1.syntaxes.stylesheet.includes(language)) {\n return language;\n }\n}\nexports.getEmmetMode = getEmmetMode;\n//# sourceMappingURL=emmetHelper.js.map","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport * as formatter from './impl/format';\nimport * as edit from './impl/edit';\nimport * as scanner from './impl/scanner';\nimport * as parser from './impl/parser';\n/**\n * Creates a JSON scanner on the given text.\n * If ignoreTrivia is set, whitespaces or comments are ignored.\n */\nexport var createScanner = scanner.createScanner;\n/**\n * For a given offset, evaluate the location in the JSON document. Each segment in the location path is either a property name or an array index.\n */\nexport var getLocation = parser.getLocation;\n/**\n * Parses the given text and returns the object the JSON content represents. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result.\n * Therefore, always check the errors list to find out if the input was valid.\n */\nexport var parse = parser.parse;\n/**\n * Parses the given text and returns a tree representation the JSON content. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result.\n */\nexport var parseTree = parser.parseTree;\n/**\n * Finds the node at the given path in a JSON DOM.\n */\nexport var findNodeAtLocation = parser.findNodeAtLocation;\n/**\n * Finds the innermost node at the given offset. If includeRightBound is set, also finds nodes that end at the given offset.\n */\nexport var findNodeAtOffset = parser.findNodeAtOffset;\n/**\n * Gets the JSON path of the given JSON DOM node\n */\nexport var getNodePath = parser.getNodePath;\n/**\n * Evaluates the JavaScript object of the given JSON DOM node\n */\nexport var getNodeValue = parser.getNodeValue;\n/**\n * Parses the given text and invokes the visitor functions for each object, array and literal reached.\n */\nexport var visit = parser.visit;\n/**\n * Takes JSON with JavaScript-style comments and remove\n * them. Optionally replaces every none-newline character\n * of comments with a replaceCharacter\n */\nexport var stripComments = parser.stripComments;\nexport function printParseErrorCode(code) {\n switch (code) {\n case 1 /* InvalidSymbol */: return 'InvalidSymbol';\n case 2 /* InvalidNumberFormat */: return 'InvalidNumberFormat';\n case 3 /* PropertyNameExpected */: return 'PropertyNameExpected';\n case 4 /* ValueExpected */: return 'ValueExpected';\n case 5 /* ColonExpected */: return 'ColonExpected';\n case 6 /* CommaExpected */: return 'CommaExpected';\n case 7 /* CloseBraceExpected */: return 'CloseBraceExpected';\n case 8 /* CloseBracketExpected */: return 'CloseBracketExpected';\n case 9 /* EndOfFileExpected */: return 'EndOfFileExpected';\n case 10 /* InvalidCommentToken */: return 'InvalidCommentToken';\n case 11 /* UnexpectedEndOfComment */: return 'UnexpectedEndOfComment';\n case 12 /* UnexpectedEndOfString */: return 'UnexpectedEndOfString';\n case 13 /* UnexpectedEndOfNumber */: return 'UnexpectedEndOfNumber';\n case 14 /* InvalidUnicode */: return 'InvalidUnicode';\n case 15 /* InvalidEscapeCharacter */: return 'InvalidEscapeCharacter';\n case 16 /* InvalidCharacter */: return 'InvalidCharacter';\n }\n return '<unknown ParseErrorCode>';\n}\n/**\n * Computes the edits needed to format a JSON document.\n *\n * @param documentText The input text\n * @param range The range to format or `undefined` to format the full content\n * @param options The formatting options\n * @returns A list of edit operations describing the formatting changes to the original document. Edits can be either inserts, replacements or\n * removals of text segments. All offsets refer to the original state of the document. No two edits must change or remove the same range of\n * text in the original document. However, multiple edits can have\n * the same offset, for example multiple inserts, or an insert followed by a remove or replace. The order in the array defines which edit is applied first.\n * To apply edits to an input, you can use `applyEdits`.\n */\nexport function format(documentText, range, options) {\n return formatter.format(documentText, range, options);\n}\n/**\n * Computes the edits needed to modify a value in the JSON document.\n *\n * @param documentText The input text\n * @param path The path of the value to change. The path represents either to the document root, a property or an array item.\n * If the path points to an non-existing property or item, it will be created.\n * @param value The new value for the specified property or item. If the value is undefined,\n * the property or item will be removed.\n * @param options Options\n * @returns A list of edit operations describing the formatting changes to the original document. Edits can be either inserts, replacements or\n * removals of text segments. All offsets refer to the original state of the document. No two edits must change or remove the same range of\n * text in the original document. However, multiple edits can have\n * the same offset, for example multiple inserts, or an insert followed by a remove or replace. The order in the array defines which edit is applied first.\n * To apply edits to an input, you can use `applyEdits`.\n */\nexport function modify(text, path, value, options) {\n return edit.setProperty(text, path, value, options);\n}\n/**\n * Applies edits to a input string.\n */\nexport function applyEdits(text, edits) {\n for (var i = edits.length - 1; i >= 0; i--) {\n text = edit.applyEdit(text, edits[i]);\n }\n return text;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { createScanner } from './scanner';\nexport function format(documentText, range, options) {\n var initialIndentLevel;\n var formatText;\n var formatTextStart;\n var rangeStart;\n var rangeEnd;\n if (range) {\n rangeStart = range.offset;\n rangeEnd = rangeStart + range.length;\n formatTextStart = rangeStart;\n while (formatTextStart > 0 && !isEOL(documentText, formatTextStart - 1)) {\n formatTextStart--;\n }\n var endOffset = rangeEnd;\n while (endOffset < documentText.length && !isEOL(documentText, endOffset)) {\n endOffset++;\n }\n formatText = documentText.substring(formatTextStart, endOffset);\n initialIndentLevel = computeIndentLevel(formatText, options);\n }\n else {\n formatText = documentText;\n initialIndentLevel = 0;\n formatTextStart = 0;\n rangeStart = 0;\n rangeEnd = documentText.length;\n }\n var eol = getEOL(options, documentText);\n var lineBreak = false;\n var indentLevel = 0;\n var indentValue;\n if (options.insertSpaces) {\n indentValue = repeat(' ', options.tabSize || 4);\n }\n else {\n indentValue = '\\t';\n }\n var scanner = createScanner(formatText, false);\n var hasError = false;\n function newLineAndIndent() {\n return eol + repeat(indentValue, initialIndentLevel + indentLevel);\n }\n function scanNext() {\n var token = scanner.scan();\n lineBreak = false;\n while (token === 15 /* Trivia */ || token === 14 /* LineBreakTrivia */) {\n lineBreak = lineBreak || (token === 14 /* LineBreakTrivia */);\n token = scanner.scan();\n }\n hasError = token === 16 /* Unknown */ || scanner.getTokenError() !== 0 /* None */;\n return token;\n }\n var editOperations = [];\n function addEdit(text, startOffset, endOffset) {\n if (!hasError && startOffset < rangeEnd && endOffset > rangeStart && documentText.substring(startOffset, endOffset) !== text) {\n editOperations.push({ offset: startOffset, length: endOffset - startOffset, content: text });\n }\n }\n var firstToken = scanNext();\n if (firstToken !== 17 /* EOF */) {\n var firstTokenStart = scanner.getTokenOffset() + formatTextStart;\n var initialIndent = repeat(indentValue, initialIndentLevel);\n addEdit(initialIndent, formatTextStart, firstTokenStart);\n }\n while (firstToken !== 17 /* EOF */) {\n var firstTokenEnd = scanner.getTokenOffset() + scanner.getTokenLength() + formatTextStart;\n var secondToken = scanNext();\n var replaceContent = '';\n while (!lineBreak && (secondToken === 12 /* LineCommentTrivia */ || secondToken === 13 /* BlockCommentTrivia */)) {\n // comments on the same line: keep them on the same line, but ignore them otherwise\n var commentTokenStart = scanner.getTokenOffset() + formatTextStart;\n addEdit(' ', firstTokenEnd, commentTokenStart);\n firstTokenEnd = scanner.getTokenOffset() + scanner.getTokenLength() + formatTextStart;\n replaceContent = secondToken === 12 /* LineCommentTrivia */ ? newLineAndIndent() : '';\n secondToken = scanNext();\n }\n if (secondToken === 2 /* CloseBraceToken */) {\n if (firstToken !== 1 /* OpenBraceToken */) {\n indentLevel--;\n replaceContent = newLineAndIndent();\n }\n }\n else if (secondToken === 4 /* CloseBracketToken */) {\n if (firstToken !== 3 /* OpenBracketToken */) {\n indentLevel--;\n replaceContent = newLineAndIndent();\n }\n }\n else {\n switch (firstToken) {\n case 3 /* OpenBracketToken */:\n case 1 /* OpenBraceToken */:\n indentLevel++;\n replaceContent = newLineAndIndent();\n break;\n case 5 /* CommaToken */:\n case 12 /* LineCommentTrivia */:\n replaceContent = newLineAndIndent();\n break;\n case 13 /* BlockCommentTrivia */:\n if (lineBreak) {\n replaceContent = newLineAndIndent();\n }\n else {\n // symbol following comment on the same line: keep on same line, separate with ' '\n replaceContent = ' ';\n }\n break;\n case 6 /* ColonToken */:\n replaceContent = ' ';\n break;\n case 10 /* StringLiteral */:\n if (secondToken === 6 /* ColonToken */) {\n replaceContent = '';\n break;\n }\n // fall through\n case 7 /* NullKeyword */:\n case 8 /* TrueKeyword */:\n case 9 /* FalseKeyword */:\n case 11 /* NumericLiteral */:\n case 2 /* CloseBraceToken */:\n case 4 /* CloseBracketToken */:\n if (secondToken === 12 /* LineCommentTrivia */ || secondToken === 13 /* BlockCommentTrivia */) {\n replaceContent = ' ';\n }\n else if (secondToken !== 5 /* CommaToken */ && secondToken !== 17 /* EOF */) {\n hasError = true;\n }\n break;\n case 16 /* Unknown */:\n hasError = true;\n break;\n }\n if (lineBreak && (secondToken === 12 /* LineCommentTrivia */ || secondToken === 13 /* BlockCommentTrivia */)) {\n replaceContent = newLineAndIndent();\n }\n }\n var secondTokenStart = scanner.getTokenOffset() + formatTextStart;\n addEdit(replaceContent, firstTokenEnd, secondTokenStart);\n firstToken = secondToken;\n }\n return editOperations;\n}\nfunction repeat(s, count) {\n var result = '';\n for (var i = 0; i < count; i++) {\n result += s;\n }\n return result;\n}\nfunction computeIndentLevel(content, options) {\n var i = 0;\n var nChars = 0;\n var tabSize = options.tabSize || 4;\n while (i < content.length) {\n var ch = content.charAt(i);\n if (ch === ' ') {\n nChars++;\n }\n else if (ch === '\\t') {\n nChars += tabSize;\n }\n else {\n break;\n }\n i++;\n }\n return Math.floor(nChars / tabSize);\n}\nfunction getEOL(options, text) {\n for (var i = 0; i < text.length; i++) {\n var ch = text.charAt(i);\n if (ch === '\\r') {\n if (i + 1 < text.length && text.charAt(i + 1) === '\\n') {\n return '\\r\\n';\n }\n return '\\r';\n }\n else if (ch === '\\n') {\n return '\\n';\n }\n }\n return (options && options.eol) || '\\n';\n}\nexport function isEOL(text, offset) {\n return '\\r\\n'.indexOf(text.charAt(offset)) !== -1;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n/**\n * Creates a JSON scanner on the given text.\n * If ignoreTrivia is set, whitespaces or comments are ignored.\n */\nexport function createScanner(text, ignoreTrivia) {\n if (ignoreTrivia === void 0) { ignoreTrivia = false; }\n var len = text.length;\n var pos = 0, value = '', tokenOffset = 0, token = 16 /* Unknown */, lineNumber = 0, lineStartOffset = 0, tokenLineStartOffset = 0, prevTokenLineStartOffset = 0, scanError = 0 /* None */;\n function scanHexDigits(count, exact) {\n var digits = 0;\n var value = 0;\n while (digits < count || !exact) {\n var ch = text.charCodeAt(pos);\n if (ch >= 48 /* _0 */ && ch <= 57 /* _9 */) {\n value = value * 16 + ch - 48 /* _0 */;\n }\n else if (ch >= 65 /* A */ && ch <= 70 /* F */) {\n value = value * 16 + ch - 65 /* A */ + 10;\n }\n else if (ch >= 97 /* a */ && ch <= 102 /* f */) {\n value = value * 16 + ch - 97 /* a */ + 10;\n }\n else {\n break;\n }\n pos++;\n digits++;\n }\n if (digits < count) {\n value = -1;\n }\n return value;\n }\n function setPosition(newPosition) {\n pos = newPosition;\n value = '';\n tokenOffset = 0;\n token = 16 /* Unknown */;\n scanError = 0 /* None */;\n }\n function scanNumber() {\n var start = pos;\n if (text.charCodeAt(pos) === 48 /* _0 */) {\n pos++;\n }\n else {\n pos++;\n while (pos < text.length && isDigit(text.charCodeAt(pos))) {\n pos++;\n }\n }\n if (pos < text.length && text.charCodeAt(pos) === 46 /* dot */) {\n pos++;\n if (pos < text.length && isDigit(text.charCodeAt(pos))) {\n pos++;\n while (pos < text.length && isDigit(text.charCodeAt(pos))) {\n pos++;\n }\n }\n else {\n scanError = 3 /* UnexpectedEndOfNumber */;\n return text.substring(start, pos);\n }\n }\n var end = pos;\n if (pos < text.length && (text.charCodeAt(pos) === 69 /* E */ || text.charCodeAt(pos) === 101 /* e */)) {\n pos++;\n if (pos < text.length && text.charCodeAt(pos) === 43 /* plus */ || text.charCodeAt(pos) === 45 /* minus */) {\n pos++;\n }\n if (pos < text.length && isDigit(text.charCodeAt(pos))) {\n pos++;\n while (pos < text.length && isDigit(text.charCodeAt(pos))) {\n pos++;\n }\n end = pos;\n }\n else {\n scanError = 3 /* UnexpectedEndOfNumber */;\n }\n }\n return text.substring(start, end);\n }\n function scanString() {\n var result = '', start = pos;\n while (true) {\n if (pos >= len) {\n result += text.substring(start, pos);\n scanError = 2 /* UnexpectedEndOfString */;\n break;\n }\n var ch = text.charCodeAt(pos);\n if (ch === 34 /* doubleQuote */) {\n result += text.substring(start, pos);\n pos++;\n break;\n }\n if (ch === 92 /* backslash */) {\n result += text.substring(start, pos);\n pos++;\n if (pos >= len) {\n scanError = 2 /* UnexpectedEndOfString */;\n break;\n }\n var ch2 = text.charCodeAt(pos++);\n switch (ch2) {\n case 34 /* doubleQuote */:\n result += '\\\"';\n break;\n case 92 /* backslash */:\n result += '\\\\';\n break;\n case 47 /* slash */:\n result += '/';\n break;\n case 98 /* b */:\n result += '\\b';\n break;\n case 102 /* f */:\n result += '\\f';\n break;\n case 110 /* n */:\n result += '\\n';\n break;\n case 114 /* r */:\n result += '\\r';\n break;\n case 116 /* t */:\n result += '\\t';\n break;\n case 117 /* u */:\n var ch3 = scanHexDigits(4, true);\n if (ch3 >= 0) {\n result += String.fromCharCode(ch3);\n }\n else {\n scanError = 4 /* InvalidUnicode */;\n }\n break;\n default:\n scanError = 5 /* InvalidEscapeCharacter */;\n }\n start = pos;\n continue;\n }\n if (ch >= 0 && ch <= 0x1f) {\n if (isLineBreak(ch)) {\n result += text.substring(start, pos);\n scanError = 2 /* UnexpectedEndOfString */;\n break;\n }\n else {\n scanError = 6 /* InvalidCharacter */;\n // mark as error but continue with string\n }\n }\n pos++;\n }\n return result;\n }\n function scanNext() {\n value = '';\n scanError = 0 /* None */;\n tokenOffset = pos;\n lineStartOffset = lineNumber;\n prevTokenLineStartOffset = tokenLineStartOffset;\n if (pos >= len) {\n // at the end\n tokenOffset = len;\n return token = 17 /* EOF */;\n }\n var code = text.charCodeAt(pos);\n // trivia: whitespace\n if (isWhiteSpace(code)) {\n do {\n pos++;\n value += String.fromCharCode(code);\n code = text.charCodeAt(pos);\n } while (isWhiteSpace(code));\n return token = 15 /* Trivia */;\n }\n // trivia: newlines\n if (isLineBreak(code)) {\n pos++;\n value += String.fromCharCode(code);\n if (code === 13 /* carriageReturn */ && text.charCodeAt(pos) === 10 /* lineFeed */) {\n pos++;\n value += '\\n';\n }\n lineNumber++;\n tokenLineStartOffset = pos;\n return token = 14 /* LineBreakTrivia */;\n }\n switch (code) {\n // tokens: []{}:,\n case 123 /* openBrace */:\n pos++;\n return token = 1 /* OpenBraceToken */;\n case 125 /* closeBrace */:\n pos++;\n return token = 2 /* CloseBraceToken */;\n case 91 /* openBracket */:\n pos++;\n return token = 3 /* OpenBracketToken */;\n case 93 /* closeBracket */:\n pos++;\n return token = 4 /* CloseBracketToken */;\n case 58 /* colon */:\n pos++;\n return token = 6 /* ColonToken */;\n case 44 /* comma */:\n pos++;\n return token = 5 /* CommaToken */;\n // strings\n case 34 /* doubleQuote */:\n pos++;\n value = scanString();\n return token = 10 /* StringLiteral */;\n // comments\n case 47 /* slash */:\n var start = pos - 1;\n // Single-line comment\n if (text.charCodeAt(pos + 1) === 47 /* slash */) {\n pos += 2;\n while (pos < len) {\n if (isLineBreak(text.charCodeAt(pos))) {\n break;\n }\n pos++;\n }\n value = text.substring(start, pos);\n return token = 12 /* LineCommentTrivia */;\n }\n // Multi-line comment\n if (text.charCodeAt(pos + 1) === 42 /* asterisk */) {\n pos += 2;\n var safeLength = len - 1; // For lookahead.\n var commentClosed = false;\n while (pos < safeLength) {\n var ch = text.charCodeAt(pos);\n if (ch === 42 /* asterisk */ && text.charCodeAt(pos + 1) === 47 /* slash */) {\n pos += 2;\n commentClosed = true;\n break;\n }\n pos++;\n if (isLineBreak(ch)) {\n if (ch === 13 /* carriageReturn */ && text.charCodeAt(pos) === 10 /* lineFeed */) {\n pos++;\n }\n lineNumber++;\n tokenLineStartOffset = pos;\n }\n }\n if (!commentClosed) {\n pos++;\n scanError = 1 /* UnexpectedEndOfComment */;\n }\n value = text.substring(start, pos);\n return token = 13 /* BlockCommentTrivia */;\n }\n // just a single slash\n value += String.fromCharCode(code);\n pos++;\n return token = 16 /* Unknown */;\n // numbers\n case 45 /* minus */:\n value += String.fromCharCode(code);\n pos++;\n if (pos === len || !isDigit(text.charCodeAt(pos))) {\n return token = 16 /* Unknown */;\n }\n // found a minus, followed by a number so\n // we fall through to proceed with scanning\n // numbers\n case 48 /* _0 */:\n case 49 /* _1 */:\n case 50 /* _2 */:\n case 51 /* _3 */:\n case 52 /* _4 */:\n case 53 /* _5 */:\n case 54 /* _6 */:\n case 55 /* _7 */:\n case 56 /* _8 */:\n case 57 /* _9 */:\n value += scanNumber();\n return token = 11 /* NumericLiteral */;\n // literals and unknown symbols\n default:\n // is a literal? Read the full word.\n while (pos < len && isUnknownContentCharacter(code)) {\n pos++;\n code = text.charCodeAt(pos);\n }\n if (tokenOffset !== pos) {\n value = text.substring(tokenOffset, pos);\n // keywords: true, false, null\n switch (value) {\n case 'true': return token = 8 /* TrueKeyword */;\n case 'false': return token = 9 /* FalseKeyword */;\n case 'null': return token = 7 /* NullKeyword */;\n }\n return token = 16 /* Unknown */;\n }\n // some\n value += String.fromCharCode(code);\n pos++;\n return token = 16 /* Unknown */;\n }\n }\n function isUnknownContentCharacter(code) {\n if (isWhiteSpace(code) || isLineBreak(code)) {\n return false;\n }\n switch (code) {\n case 125 /* closeBrace */:\n case 93 /* closeBracket */:\n case 123 /* openBrace */:\n case 91 /* openBracket */:\n case 34 /* doubleQuote */:\n case 58 /* colon */:\n case 44 /* comma */:\n case 47 /* slash */:\n return false;\n }\n return true;\n }\n function scanNextNonTrivia() {\n var result;\n do {\n result = scanNext();\n } while (result >= 12 /* LineCommentTrivia */ && result <= 15 /* Trivia */);\n return result;\n }\n return {\n setPosition: setPosition,\n getPosition: function () { return pos; },\n scan: ignoreTrivia ? scanNextNonTrivia : scanNext,\n getToken: function () { return token; },\n getTokenValue: function () { return value; },\n getTokenOffset: function () { return tokenOffset; },\n getTokenLength: function () { return pos - tokenOffset; },\n getTokenStartLine: function () { return lineStartOffset; },\n getTokenStartCharacter: function () { return tokenOffset - prevTokenLineStartOffset; },\n getTokenError: function () { return scanError; },\n };\n}\nfunction isWhiteSpace(ch) {\n return ch === 32 /* space */ || ch === 9 /* tab */ || ch === 11 /* verticalTab */ || ch === 12 /* formFeed */ ||\n ch === 160 /* nonBreakingSpace */ || ch === 5760 /* ogham */ || ch >= 8192 /* enQuad */ && ch <= 8203 /* zeroWidthSpace */ ||\n ch === 8239 /* narrowNoBreakSpace */ || ch === 8287 /* mathematicalSpace */ || ch === 12288 /* ideographicSpace */ || ch === 65279 /* byteOrderMark */;\n}\nfunction isLineBreak(ch) {\n return ch === 10 /* lineFeed */ || ch === 13 /* carriageReturn */ || ch === 8232 /* lineSeparator */ || ch === 8233 /* paragraphSeparator */;\n}\nfunction isDigit(ch) {\n return ch >= 48 /* _0 */ && ch <= 57 /* _9 */;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { format, isEOL } from './format';\nimport { parseTree, findNodeAtLocation } from './parser';\nexport function removeProperty(text, path, options) {\n return setProperty(text, path, void 0, options);\n}\nexport function setProperty(text, originalPath, value, options) {\n var _a;\n var path = originalPath.slice();\n var errors = [];\n var root = parseTree(text, errors);\n var parent = void 0;\n var lastSegment = void 0;\n while (path.length > 0) {\n lastSegment = path.pop();\n parent = findNodeAtLocation(root, path);\n if (parent === void 0 && value !== void 0) {\n if (typeof lastSegment === 'string') {\n value = (_a = {}, _a[lastSegment] = value, _a);\n }\n else {\n value = [value];\n }\n }\n else {\n break;\n }\n }\n if (!parent) {\n // empty document\n if (value === void 0) { // delete\n throw new Error('Can not delete in empty document');\n }\n return withFormatting(text, { offset: root ? root.offset : 0, length: root ? root.length : 0, content: JSON.stringify(value) }, options);\n }\n else if (parent.type === 'object' && typeof lastSegment === 'string' && Array.isArray(parent.children)) {\n var existing = findNodeAtLocation(parent, [lastSegment]);\n if (existing !== void 0) {\n if (value === void 0) { // delete\n if (!existing.parent) {\n throw new Error('Malformed AST');\n }\n var propertyIndex = parent.children.indexOf(existing.parent);\n var removeBegin = void 0;\n var removeEnd = existing.parent.offset + existing.parent.length;\n if (propertyIndex > 0) {\n // remove the comma of the previous node\n var previous = parent.children[propertyIndex - 1];\n removeBegin = previous.offset + previous.length;\n }\n else {\n removeBegin = parent.offset + 1;\n if (parent.children.length > 1) {\n // remove the comma of the next node\n var next = parent.children[1];\n removeEnd = next.offset;\n }\n }\n return withFormatting(text, { offset: removeBegin, length: removeEnd - removeBegin, content: '' }, options);\n }\n else {\n // set value of existing property\n return withFormatting(text, { offset: existing.offset, length: existing.length, content: JSON.stringify(value) }, options);\n }\n }\n else {\n if (value === void 0) { // delete\n return []; // property does not exist, nothing to do\n }\n var newProperty = JSON.stringify(lastSegment) + \": \" + JSON.stringify(value);\n var index = options.getInsertionIndex ? options.getInsertionIndex(parent.children.map(function (p) { return p.children[0].value; })) : parent.children.length;\n var edit = void 0;\n if (index > 0) {\n var previous = parent.children[index - 1];\n edit = { offset: previous.offset + previous.length, length: 0, content: ',' + newProperty };\n }\n else if (parent.children.length === 0) {\n edit = { offset: parent.offset + 1, length: 0, content: newProperty };\n }\n else {\n edit = { offset: parent.offset + 1, length: 0, content: newProperty + ',' };\n }\n return withFormatting(text, edit, options);\n }\n }\n else if (parent.type === 'array' && typeof lastSegment === 'number' && Array.isArray(parent.children)) {\n var insertIndex = lastSegment;\n if (insertIndex === -1) {\n // Insert\n var newProperty = \"\" + JSON.stringify(value);\n var edit = void 0;\n if (parent.children.length === 0) {\n edit = { offset: parent.offset + 1, length: 0, content: newProperty };\n }\n else {\n var previous = parent.children[parent.children.length - 1];\n edit = { offset: previous.offset + previous.length, length: 0, content: ',' + newProperty };\n }\n return withFormatting(text, edit, options);\n }\n else if (value === void 0 && parent.children.length >= 0) {\n // Removal\n var removalIndex = lastSegment;\n var toRemove = parent.children[removalIndex];\n var edit = void 0;\n if (parent.children.length === 1) {\n // only item\n edit = { offset: parent.offset + 1, length: parent.length - 2, content: '' };\n }\n else if (parent.children.length - 1 === removalIndex) {\n // last item\n var previous = parent.children[removalIndex - 1];\n var offset = previous.offset + previous.length;\n var parentEndOffset = parent.offset + parent.length;\n edit = { offset: offset, length: parentEndOffset - 2 - offset, content: '' };\n }\n else {\n edit = { offset: toRemove.offset, length: parent.children[removalIndex + 1].offset - toRemove.offset, content: '' };\n }\n return withFormatting(text, edit, options);\n }\n else if (value !== void 0) {\n var edit = void 0;\n var newProperty = \"\" + JSON.stringify(value);\n if (!options.isArrayInsertion && parent.children.length > lastSegment) {\n var toModify = parent.children[lastSegment];\n edit = { offset: toModify.offset, length: toModify.length, content: newProperty };\n }\n else if (parent.children.length === 0 || lastSegment === 0) {\n edit = { offset: parent.offset + 1, length: 0, content: parent.children.length === 0 ? newProperty : newProperty + ',' };\n }\n else {\n var index = lastSegment > parent.children.length ? parent.children.length : lastSegment;\n var previous = parent.children[index - 1];\n edit = { offset: previous.offset + previous.length, length: 0, content: ',' + newProperty };\n }\n return withFormatting(text, edit, options);\n }\n else {\n throw new Error(\"Can not \" + (value === void 0 ? 'remove' : (options.isArrayInsertion ? 'insert' : 'modify')) + \" Array index \" + insertIndex + \" as length is not sufficient\");\n }\n }\n else {\n throw new Error(\"Can not add \" + (typeof lastSegment !== 'number' ? 'index' : 'property') + \" to parent of type \" + parent.type);\n }\n}\nfunction withFormatting(text, edit, options) {\n if (!options.formattingOptions) {\n return [edit];\n }\n // apply the edit\n var newText = applyEdit(text, edit);\n // format the new text\n var begin = edit.offset;\n var end = edit.offset + edit.content.length;\n if (edit.length === 0 || edit.content.length === 0) { // insert or remove\n while (begin > 0 && !isEOL(newText, begin - 1)) {\n begin--;\n }\n while (end < newText.length && !isEOL(newText, end)) {\n end++;\n }\n }\n var edits = format(newText, { offset: begin, length: end - begin }, options.formattingOptions);\n // apply the formatting edits and track the begin and end offsets of the changes\n for (var i = edits.length - 1; i >= 0; i--) {\n var edit_1 = edits[i];\n newText = applyEdit(newText, edit_1);\n begin = Math.min(begin, edit_1.offset);\n end = Math.max(end, edit_1.offset + edit_1.length);\n end += edit_1.content.length - edit_1.length;\n }\n // create a single edit with all changes\n var editLength = text.length - (newText.length - end) - begin;\n return [{ offset: begin, length: editLength, content: newText.substring(begin, end) }];\n}\nexport function applyEdit(text, edit) {\n return text.substring(0, edit.offset) + edit.content + text.substring(edit.offset + edit.length);\n}\nexport function isWS(text, offset) {\n return '\\r\\n \\t'.indexOf(text.charAt(offset)) !== -1;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { createScanner } from './scanner';\nvar ParseOptions;\n(function (ParseOptions) {\n ParseOptions.DEFAULT = {\n allowTrailingComma: false\n };\n})(ParseOptions || (ParseOptions = {}));\n/**\n * For a given offset, evaluate the location in the JSON document. Each segment in the location path is either a property name or an array index.\n */\nexport function getLocation(text, position) {\n var segments = []; // strings or numbers\n var earlyReturnException = new Object();\n var previousNode = undefined;\n var previousNodeInst = {\n value: {},\n offset: 0,\n length: 0,\n type: 'object',\n parent: undefined\n };\n var isAtPropertyKey = false;\n function setPreviousNode(value, offset, length, type) {\n previousNodeInst.value = value;\n previousNodeInst.offset = offset;\n previousNodeInst.length = length;\n previousNodeInst.type = type;\n previousNodeInst.colonOffset = undefined;\n previousNode = previousNodeInst;\n }\n try {\n visit(text, {\n onObjectBegin: function (offset, length) {\n if (position <= offset) {\n throw earlyReturnException;\n }\n previousNode = undefined;\n isAtPropertyKey = position > offset;\n segments.push(''); // push a placeholder (will be replaced)\n },\n onObjectProperty: function (name, offset, length) {\n if (position < offset) {\n throw earlyReturnException;\n }\n setPreviousNode(name, offset, length, 'property');\n segments[segments.length - 1] = name;\n if (position <= offset + length) {\n throw earlyReturnException;\n }\n },\n onObjectEnd: function (offset, length) {\n if (position <= offset) {\n throw earlyReturnException;\n }\n previousNode = undefined;\n segments.pop();\n },\n onArrayBegin: function (offset, length) {\n if (position <= offset) {\n throw earlyReturnException;\n }\n previousNode = undefined;\n segments.push(0);\n },\n onArrayEnd: function (offset, length) {\n if (position <= offset) {\n throw earlyReturnException;\n }\n previousNode = undefined;\n segments.pop();\n },\n onLiteralValue: function (value, offset, length) {\n if (position < offset) {\n throw earlyReturnException;\n }\n setPreviousNode(value, offset, length, getNodeType(value));\n if (position <= offset + length) {\n throw earlyReturnException;\n }\n },\n onSeparator: function (sep, offset, length) {\n if (position <= offset) {\n throw earlyReturnException;\n }\n if (sep === ':' && previousNode && previousNode.type === 'property') {\n previousNode.colonOffset = offset;\n isAtPropertyKey = false;\n previousNode = undefined;\n }\n else if (sep === ',') {\n var last = segments[segments.length - 1];\n if (typeof last === 'number') {\n segments[segments.length - 1] = last + 1;\n }\n else {\n isAtPropertyKey = true;\n segments[segments.length - 1] = '';\n }\n previousNode = undefined;\n }\n }\n });\n }\n catch (e) {\n if (e !== earlyReturnException) {\n throw e;\n }\n }\n return {\n path: segments,\n previousNode: previousNode,\n isAtPropertyKey: isAtPropertyKey,\n matches: function (pattern) {\n var k = 0;\n for (var i = 0; k < pattern.length && i < segments.length; i++) {\n if (pattern[k] === segments[i] || pattern[k] === '*') {\n k++;\n }\n else if (pattern[k] !== '**') {\n return false;\n }\n }\n return k === pattern.length;\n }\n };\n}\n/**\n * Parses the given text and returns the object the JSON content represents. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result.\n * Therefore always check the errors list to find out if the input was valid.\n */\nexport function parse(text, errors, options) {\n if (errors === void 0) { errors = []; }\n if (options === void 0) { options = ParseOptions.DEFAULT; }\n var currentProperty = null;\n var currentParent = [];\n var previousParents = [];\n function onValue(value) {\n if (Array.isArray(currentParent)) {\n currentParent.push(value);\n }\n else if (currentProperty !== null) {\n currentParent[currentProperty] = value;\n }\n }\n var visitor = {\n onObjectBegin: function () {\n var object = {};\n onValue(object);\n previousParents.push(currentParent);\n currentParent = object;\n currentProperty = null;\n },\n onObjectProperty: function (name) {\n currentProperty = name;\n },\n onObjectEnd: function () {\n currentParent = previousParents.pop();\n },\n onArrayBegin: function () {\n var array = [];\n onValue(array);\n previousParents.push(currentParent);\n currentParent = array;\n currentProperty = null;\n },\n onArrayEnd: function () {\n currentParent = previousParents.pop();\n },\n onLiteralValue: onValue,\n onError: function (error, offset, length) {\n errors.push({ error: error, offset: offset, length: length });\n }\n };\n visit(text, visitor, options);\n return currentParent[0];\n}\n/**\n * Parses the given text and returns a tree representation the JSON content. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result.\n */\nexport function parseTree(text, errors, options) {\n if (errors === void 0) { errors = []; }\n if (options === void 0) { options = ParseOptions.DEFAULT; }\n var currentParent = { type: 'array', offset: -1, length: -1, children: [], parent: undefined }; // artificial root\n function ensurePropertyComplete(endOffset) {\n if (currentParent.type === 'property') {\n currentParent.length = endOffset - currentParent.offset;\n currentParent = currentParent.parent;\n }\n }\n function onValue(valueNode) {\n currentParent.children.push(valueNode);\n return valueNode;\n }\n var visitor = {\n onObjectBegin: function (offset) {\n currentParent = onValue({ type: 'object', offset: offset, length: -1, parent: currentParent, children: [] });\n },\n onObjectProperty: function (name, offset, length) {\n currentParent = onValue({ type: 'property', offset: offset, length: -1, parent: currentParent, children: [] });\n currentParent.children.push({ type: 'string', value: name, offset: offset, length: length, parent: currentParent });\n },\n onObjectEnd: function (offset, length) {\n ensurePropertyComplete(offset + length); // in case of a missing value for a property: make sure property is complete\n currentParent.length = offset + length - currentParent.offset;\n currentParent = currentParent.parent;\n ensurePropertyComplete(offset + length);\n },\n onArrayBegin: function (offset, length) {\n currentParent = onValue({ type: 'array', offset: offset, length: -1, parent: currentParent, children: [] });\n },\n onArrayEnd: function (offset, length) {\n currentParent.length = offset + length - currentParent.offset;\n currentParent = currentParent.parent;\n ensurePropertyComplete(offset + length);\n },\n onLiteralValue: function (value, offset, length) {\n onValue({ type: getNodeType(value), offset: offset, length: length, parent: currentParent, value: value });\n ensurePropertyComplete(offset + length);\n },\n onSeparator: function (sep, offset, length) {\n if (currentParent.type === 'property') {\n if (sep === ':') {\n currentParent.colonOffset = offset;\n }\n else if (sep === ',') {\n ensurePropertyComplete(offset);\n }\n }\n },\n onError: function (error, offset, length) {\n errors.push({ error: error, offset: offset, length: length });\n }\n };\n visit(text, visitor, options);\n var result = currentParent.children[0];\n if (result) {\n delete result.parent;\n }\n return result;\n}\n/**\n * Finds the node at the given path in a JSON DOM.\n */\nexport function findNodeAtLocation(root, path) {\n if (!root) {\n return undefined;\n }\n var node = root;\n for (var _i = 0, path_1 = path; _i < path_1.length; _i++) {\n var segment = path_1[_i];\n if (typeof segment === 'string') {\n if (node.type !== 'object' || !Array.isArray(node.children)) {\n return undefined;\n }\n var found = false;\n for (var _a = 0, _b = node.children; _a < _b.length; _a++) {\n var propertyNode = _b[_a];\n if (Array.isArray(propertyNode.children) && propertyNode.children[0].value === segment) {\n node = propertyNode.children[1];\n found = true;\n break;\n }\n }\n if (!found) {\n return undefined;\n }\n }\n else {\n var index = segment;\n if (node.type !== 'array' || index < 0 || !Array.isArray(node.children) || index >= node.children.length) {\n return undefined;\n }\n node = node.children[index];\n }\n }\n return node;\n}\n/**\n * Gets the JSON path of the given JSON DOM node\n */\nexport function getNodePath(node) {\n if (!node.parent || !node.parent.children) {\n return [];\n }\n var path = getNodePath(node.parent);\n if (node.parent.type === 'property') {\n var key = node.parent.children[0].value;\n path.push(key);\n }\n else if (node.parent.type === 'array') {\n var index = node.parent.children.indexOf(node);\n if (index !== -1) {\n path.push(index);\n }\n }\n return path;\n}\n/**\n * Evaluates the JavaScript object of the given JSON DOM node\n */\nexport function getNodeValue(node) {\n switch (node.type) {\n case 'array':\n return node.children.map(getNodeValue);\n case 'object':\n var obj = Object.create(null);\n for (var _i = 0, _a = node.children; _i < _a.length; _i++) {\n var prop = _a[_i];\n var valueNode = prop.children[1];\n if (valueNode) {\n obj[prop.children[0].value] = getNodeValue(valueNode);\n }\n }\n return obj;\n case 'null':\n case 'string':\n case 'number':\n case 'boolean':\n return node.value;\n default:\n return undefined;\n }\n}\nexport function contains(node, offset, includeRightBound) {\n if (includeRightBound === void 0) { includeRightBound = false; }\n return (offset >= node.offset && offset < (node.offset + node.length)) || includeRightBound && (offset === (node.offset + node.length));\n}\n/**\n * Finds the most inner node at the given offset. If includeRightBound is set, also finds nodes that end at the given offset.\n */\nexport function findNodeAtOffset(node, offset, includeRightBound) {\n if (includeRightBound === void 0) { includeRightBound = false; }\n if (contains(node, offset, includeRightBound)) {\n var children = node.children;\n if (Array.isArray(children)) {\n for (var i = 0; i < children.length && children[i].offset <= offset; i++) {\n var item = findNodeAtOffset(children[i], offset, includeRightBound);\n if (item) {\n return item;\n }\n }\n }\n return node;\n }\n return undefined;\n}\n/**\n * Parses the given text and invokes the visitor functions for each object, array and literal reached.\n */\nexport function visit(text, visitor, options) {\n if (options === void 0) { options = ParseOptions.DEFAULT; }\n var _scanner = createScanner(text, false);\n function toNoArgVisit(visitFunction) {\n return visitFunction ? function () { return visitFunction(_scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter()); } : function () { return true; };\n }\n function toOneArgVisit(visitFunction) {\n return visitFunction ? function (arg) { return visitFunction(arg, _scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter()); } : function () { return true; };\n }\n var onObjectBegin = toNoArgVisit(visitor.onObjectBegin), onObjectProperty = toOneArgVisit(visitor.onObjectProperty), onObjectEnd = toNoArgVisit(visitor.onObjectEnd), onArrayBegin = toNoArgVisit(visitor.onArrayBegin), onArrayEnd = toNoArgVisit(visitor.onArrayEnd), onLiteralValue = toOneArgVisit(visitor.onLiteralValue), onSeparator = toOneArgVisit(visitor.onSeparator), onComment = toNoArgVisit(visitor.onComment), onError = toOneArgVisit(visitor.onError);\n var disallowComments = options && options.disallowComments;\n var allowTrailingComma = options && options.allowTrailingComma;\n function scanNext() {\n while (true) {\n var token = _scanner.scan();\n switch (_scanner.getTokenError()) {\n case 4 /* InvalidUnicode */:\n handleError(14 /* InvalidUnicode */);\n break;\n case 5 /* InvalidEscapeCharacter */:\n handleError(15 /* InvalidEscapeCharacter */);\n break;\n case 3 /* UnexpectedEndOfNumber */:\n handleError(13 /* UnexpectedEndOfNumber */);\n break;\n case 1 /* UnexpectedEndOfComment */:\n if (!disallowComments) {\n handleError(11 /* UnexpectedEndOfComment */);\n }\n break;\n case 2 /* UnexpectedEndOfString */:\n handleError(12 /* UnexpectedEndOfString */);\n break;\n case 6 /* InvalidCharacter */:\n handleError(16 /* InvalidCharacter */);\n break;\n }\n switch (token) {\n case 12 /* LineCommentTrivia */:\n case 13 /* BlockCommentTrivia */:\n if (disallowComments) {\n handleError(10 /* InvalidCommentToken */);\n }\n else {\n onComment();\n }\n break;\n case 16 /* Unknown */:\n handleError(1 /* InvalidSymbol */);\n break;\n case 15 /* Trivia */:\n case 14 /* LineBreakTrivia */:\n break;\n default:\n return token;\n }\n }\n }\n function handleError(error, skipUntilAfter, skipUntil) {\n if (skipUntilAfter === void 0) { skipUntilAfter = []; }\n if (skipUntil === void 0) { skipUntil = []; }\n onError(error);\n if (skipUntilAfter.length + skipUntil.length > 0) {\n var token = _scanner.getToken();\n while (token !== 17 /* EOF */) {\n if (skipUntilAfter.indexOf(token) !== -1) {\n scanNext();\n break;\n }\n else if (skipUntil.indexOf(token) !== -1) {\n break;\n }\n token = scanNext();\n }\n }\n }\n function parseString(isValue) {\n var value = _scanner.getTokenValue();\n if (isValue) {\n onLiteralValue(value);\n }\n else {\n onObjectProperty(value);\n }\n scanNext();\n return true;\n }\n function parseLiteral() {\n switch (_scanner.getToken()) {\n case 11 /* NumericLiteral */:\n var tokenValue = _scanner.getTokenValue();\n var value = Number(tokenValue);\n if (isNaN(value)) {\n handleError(2 /* InvalidNumberFormat */);\n value = 0;\n }\n onLiteralValue(value);\n break;\n case 7 /* NullKeyword */:\n onLiteralValue(null);\n break;\n case 8 /* TrueKeyword */:\n onLiteralValue(true);\n break;\n case 9 /* FalseKeyword */:\n onLiteralValue(false);\n break;\n default:\n return false;\n }\n scanNext();\n return true;\n }\n function parseProperty() {\n if (_scanner.getToken() !== 10 /* StringLiteral */) {\n handleError(3 /* PropertyNameExpected */, [], [2 /* CloseBraceToken */, 5 /* CommaToken */]);\n return false;\n }\n parseString(false);\n if (_scanner.getToken() === 6 /* ColonToken */) {\n onSeparator(':');\n scanNext(); // consume colon\n if (!parseValue()) {\n handleError(4 /* ValueExpected */, [], [2 /* CloseBraceToken */, 5 /* CommaToken */]);\n }\n }\n else {\n handleError(5 /* ColonExpected */, [], [2 /* CloseBraceToken */, 5 /* CommaToken */]);\n }\n return true;\n }\n function parseObject() {\n onObjectBegin();\n scanNext(); // consume open brace\n var needsComma = false;\n while (_scanner.getToken() !== 2 /* CloseBraceToken */ && _scanner.getToken() !== 17 /* EOF */) {\n if (_scanner.getToken() === 5 /* CommaToken */) {\n if (!needsComma) {\n handleError(4 /* ValueExpected */, [], []);\n }\n onSeparator(',');\n scanNext(); // consume comma\n if (_scanner.getToken() === 2 /* CloseBraceToken */ && allowTrailingComma) {\n break;\n }\n }\n else if (needsComma) {\n handleError(6 /* CommaExpected */, [], []);\n }\n if (!parseProperty()) {\n handleError(4 /* ValueExpected */, [], [2 /* CloseBraceToken */, 5 /* CommaToken */]);\n }\n needsComma = true;\n }\n onObjectEnd();\n if (_scanner.getToken() !== 2 /* CloseBraceToken */) {\n handleError(7 /* CloseBraceExpected */, [2 /* CloseBraceToken */], []);\n }\n else {\n scanNext(); // consume close brace\n }\n return true;\n }\n function parseArray() {\n onArrayBegin();\n scanNext(); // consume open bracket\n var needsComma = false;\n while (_scanner.getToken() !== 4 /* CloseBracketToken */ && _scanner.getToken() !== 17 /* EOF */) {\n if (_scanner.getToken() === 5 /* CommaToken */) {\n if (!needsComma) {\n handleError(4 /* ValueExpected */, [], []);\n }\n onSeparator(',');\n scanNext(); // consume comma\n if (_scanner.getToken() === 4 /* CloseBracketToken */ && allowTrailingComma) {\n break;\n }\n }\n else if (needsComma) {\n handleError(6 /* CommaExpected */, [], []);\n }\n if (!parseValue()) {\n handleError(4 /* ValueExpected */, [], [4 /* CloseBracketToken */, 5 /* CommaToken */]);\n }\n needsComma = true;\n }\n onArrayEnd();\n if (_scanner.getToken() !== 4 /* CloseBracketToken */) {\n handleError(8 /* CloseBracketExpected */, [4 /* CloseBracketToken */], []);\n }\n else {\n scanNext(); // consume close bracket\n }\n return true;\n }\n function parseValue() {\n switch (_scanner.getToken()) {\n case 3 /* OpenBracketToken */:\n return parseArray();\n case 1 /* OpenBraceToken */:\n return parseObject();\n case 10 /* StringLiteral */:\n return parseString(true);\n default:\n return parseLiteral();\n }\n }\n scanNext();\n if (_scanner.getToken() === 17 /* EOF */) {\n if (options.allowEmptyContent) {\n return true;\n }\n handleError(4 /* ValueExpected */, [], []);\n return false;\n }\n if (!parseValue()) {\n handleError(4 /* ValueExpected */, [], []);\n return false;\n }\n if (_scanner.getToken() !== 17 /* EOF */) {\n handleError(9 /* EndOfFileExpected */, [], []);\n }\n return true;\n}\n/**\n * Takes JSON with JavaScript-style comments and remove\n * them. Optionally replaces every none-newline character\n * of comments with a replaceCharacter\n */\nexport function stripComments(text, replaceCh) {\n var _scanner = createScanner(text), parts = [], kind, offset = 0, pos;\n do {\n pos = _scanner.getPosition();\n kind = _scanner.scan();\n switch (kind) {\n case 12 /* LineCommentTrivia */:\n case 13 /* BlockCommentTrivia */:\n case 17 /* EOF */:\n if (offset !== pos) {\n parts.push(text.substring(offset, pos));\n }\n if (replaceCh !== undefined) {\n parts.push(_scanner.getTokenValue().replace(/[^\\r\\n]/g, replaceCh));\n }\n offset = _scanner.getPosition();\n break;\n }\n } while (kind !== 17 /* EOF */);\n return parts.join('');\n}\nexport function getNodeType(value) {\n switch (typeof value) {\n case 'boolean': return 'boolean';\n case 'number': return 'number';\n case 'string': return 'string';\n case 'object': {\n if (!value) {\n return 'null';\n }\n else if (Array.isArray(value)) {\n return 'array';\n }\n return 'object';\n }\n default: return 'null';\n }\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors ||\n function getOwnPropertyDescriptors(obj) {\n var keys = Object.keys(obj);\n var descriptors = {};\n for (var i = 0; i < keys.length; i++) {\n descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]);\n }\n return descriptors;\n };\n\nvar formatRegExp = /%[sdj%]/g;\nexports.format = function(f) {\n if (!isString(f)) {\n var objects = [];\n for (var i = 0; i < arguments.length; i++) {\n objects.push(inspect(arguments[i]));\n }\n return objects.join(' ');\n }\n\n var i = 1;\n var args = arguments;\n var len = args.length;\n var str = String(f).replace(formatRegExp, function(x) {\n if (x === '%%') return '%';\n if (i >= len) return x;\n switch (x) {\n case '%s': return String(args[i++]);\n case '%d': return Number(args[i++]);\n case '%j':\n try {\n return JSON.stringify(args[i++]);\n } catch (_) {\n return '[Circular]';\n }\n default:\n return x;\n }\n });\n for (var x = args[i]; i < len; x = args[++i]) {\n if (isNull(x) || !isObject(x)) {\n str += ' ' + x;\n } else {\n str += ' ' + inspect(x);\n }\n }\n return str;\n};\n\n\n// Mark that a method should not be used.\n// Returns a modified function which warns once by default.\n// If --no-deprecation is set, then it is a no-op.\nexports.deprecate = function(fn, msg) {\n if (typeof process !== 'undefined' && process.noDeprecation === true) {\n return fn;\n }\n\n // Allow for deprecating things in the process of starting up.\n if (typeof process === 'undefined') {\n return function() {\n return exports.deprecate(fn, msg).apply(this, arguments);\n };\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (process.throwDeprecation) {\n throw new Error(msg);\n } else if (process.traceDeprecation) {\n console.trace(msg);\n } else {\n console.error(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n};\n\n\nvar debugs = {};\nvar debugEnvRegex = /^$/;\n\nif (process.env.NODE_DEBUG) {\n var debugEnv = process.env.NODE_DEBUG;\n debugEnv = debugEnv.replace(/[|\\\\{}()[\\]^$+?.]/g, '\\\\$&')\n .replace(/\\*/g, '.*')\n .replace(/,/g, '$|^')\n .toUpperCase();\n debugEnvRegex = new RegExp('^' + debugEnv + '$', 'i');\n}\nexports.debuglog = function(set) {\n set = set.toUpperCase();\n if (!debugs[set]) {\n if (debugEnvRegex.test(set)) {\n var pid = process.pid;\n debugs[set] = function() {\n var msg = exports.format.apply(exports, arguments);\n console.error('%s %d: %s', set, pid, msg);\n };\n } else {\n debugs[set] = function() {};\n }\n }\n return debugs[set];\n};\n\n\n/**\n * Echos the value of a value. Trys to print the value out\n * in the best way possible given the different types.\n *\n * @param {Object} obj The object to print out.\n * @param {Object} opts Optional options object that alters the output.\n */\n/* legacy: obj, showHidden, depth, colors*/\nfunction inspect(obj, opts) {\n // default options\n var ctx = {\n seen: [],\n stylize: stylizeNoColor\n };\n // legacy...\n if (arguments.length >= 3) ctx.depth = arguments[2];\n if (arguments.length >= 4) ctx.colors = arguments[3];\n if (isBoolean(opts)) {\n // legacy...\n ctx.showHidden = opts;\n } else if (opts) {\n // got an \"options\" object\n exports._extend(ctx, opts);\n }\n // set default options\n if (isUndefined(ctx.showHidden)) ctx.showHidden = false;\n if (isUndefined(ctx.depth)) ctx.depth = 2;\n if (isUndefined(ctx.colors)) ctx.colors = false;\n if (isUndefined(ctx.customInspect)) ctx.customInspect = true;\n if (ctx.colors) ctx.stylize = stylizeWithColor;\n return formatValue(ctx, obj, ctx.depth);\n}\nexports.inspect = inspect;\n\n\n// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics\ninspect.colors = {\n 'bold' : [1, 22],\n 'italic' : [3, 23],\n 'underline' : [4, 24],\n 'inverse' : [7, 27],\n 'white' : [37, 39],\n 'grey' : [90, 39],\n 'black' : [30, 39],\n 'blue' : [34, 39],\n 'cyan' : [36, 39],\n 'green' : [32, 39],\n 'magenta' : [35, 39],\n 'red' : [31, 39],\n 'yellow' : [33, 39]\n};\n\n// Don't use 'blue' not visible on cmd.exe\ninspect.styles = {\n 'special': 'cyan',\n 'number': 'yellow',\n 'boolean': 'yellow',\n 'undefined': 'grey',\n 'null': 'bold',\n 'string': 'green',\n 'date': 'magenta',\n // \"name\": intentionally not styling\n 'regexp': 'red'\n};\n\n\nfunction stylizeWithColor(str, styleType) {\n var style = inspect.styles[styleType];\n\n if (style) {\n return '\\u001b[' + inspect.colors[style][0] + 'm' + str +\n '\\u001b[' + inspect.colors[style][1] + 'm';\n } else {\n return str;\n }\n}\n\n\nfunction stylizeNoColor(str, styleType) {\n return str;\n}\n\n\nfunction arrayToHash(array) {\n var hash = {};\n\n array.forEach(function(val, idx) {\n hash[val] = true;\n });\n\n return hash;\n}\n\n\nfunction formatValue(ctx, value, recurseTimes) {\n // Provide a hook for user-specified inspect functions.\n // Check that value is an object with an inspect function on it\n if (ctx.customInspect &&\n value &&\n isFunction(value.inspect) &&\n // Filter out the util module, it's inspect function is special\n value.inspect !== exports.inspect &&\n // Also filter out any prototype objects using the circular check.\n !(value.constructor && value.constructor.prototype === value)) {\n var ret = value.inspect(recurseTimes, ctx);\n if (!isString(ret)) {\n ret = formatValue(ctx, ret, recurseTimes);\n }\n return ret;\n }\n\n // Primitive types cannot have properties\n var primitive = formatPrimitive(ctx, value);\n if (primitive) {\n return primitive;\n }\n\n // Look up the keys of the object.\n var keys = Object.keys(value);\n var visibleKeys = arrayToHash(keys);\n\n if (ctx.showHidden) {\n keys = Object.getOwnPropertyNames(value);\n }\n\n // IE doesn't make error fields non-enumerable\n // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n if (isError(value)\n && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {\n return formatError(value);\n }\n\n // Some type of object without properties can be shortcutted.\n if (keys.length === 0) {\n if (isFunction(value)) {\n var name = value.name ? ': ' + value.name : '';\n return ctx.stylize('[Function' + name + ']', 'special');\n }\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n }\n if (isDate(value)) {\n return ctx.stylize(Date.prototype.toString.call(value), 'date');\n }\n if (isError(value)) {\n return formatError(value);\n }\n }\n\n var base = '', array = false, braces = ['{', '}'];\n\n // Make Array say that they are Array\n if (isArray(value)) {\n array = true;\n braces = ['[', ']'];\n }\n\n // Make functions say that they are functions\n if (isFunction(value)) {\n var n = value.name ? ': ' + value.name : '';\n base = ' [Function' + n + ']';\n }\n\n // Make RegExps say that they are RegExps\n if (isRegExp(value)) {\n base = ' ' + RegExp.prototype.toString.call(value);\n }\n\n // Make dates with properties first say the date\n if (isDate(value)) {\n base = ' ' + Date.prototype.toUTCString.call(value);\n }\n\n // Make error with message first say the error\n if (isError(value)) {\n base = ' ' + formatError(value);\n }\n\n if (keys.length === 0 && (!array || value.length == 0)) {\n return braces[0] + base + braces[1];\n }\n\n if (recurseTimes < 0) {\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n } else {\n return ctx.stylize('[Object]', 'special');\n }\n }\n\n ctx.seen.push(value);\n\n var output;\n if (array) {\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n } else {\n output = keys.map(function(key) {\n return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n });\n }\n\n ctx.seen.pop();\n\n return reduceToSingleString(output, base, braces);\n}\n\n\nfunction formatPrimitive(ctx, value) {\n if (isUndefined(value))\n return ctx.stylize('undefined', 'undefined');\n if (isString(value)) {\n var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"') + '\\'';\n return ctx.stylize(simple, 'string');\n }\n if (isNumber(value))\n return ctx.stylize('' + value, 'number');\n if (isBoolean(value))\n return ctx.stylize('' + value, 'boolean');\n // For some reason typeof null is \"object\", so special case here.\n if (isNull(value))\n return ctx.stylize('null', 'null');\n}\n\n\nfunction formatError(value) {\n return '[' + Error.prototype.toString.call(value) + ']';\n}\n\n\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n var output = [];\n for (var i = 0, l = value.length; i < l; ++i) {\n if (hasOwnProperty(value, String(i))) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n String(i), true));\n } else {\n output.push('');\n }\n }\n keys.forEach(function(key) {\n if (!key.match(/^\\d+$/)) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n key, true));\n }\n });\n return output;\n}\n\n\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n var name, str, desc;\n desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };\n if (desc.get) {\n if (desc.set) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (desc.set) {\n str = ctx.stylize('[Setter]', 'special');\n }\n }\n if (!hasOwnProperty(visibleKeys, key)) {\n name = '[' + key + ']';\n }\n if (!str) {\n if (ctx.seen.indexOf(desc.value) < 0) {\n if (isNull(recurseTimes)) {\n str = formatValue(ctx, desc.value, null);\n } else {\n str = formatValue(ctx, desc.value, recurseTimes - 1);\n }\n if (str.indexOf('\\n') > -1) {\n if (array) {\n str = str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n').slice(2);\n } else {\n str = '\\n' + str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n');\n }\n }\n } else {\n str = ctx.stylize('[Circular]', 'special');\n }\n }\n if (isUndefined(name)) {\n if (array && key.match(/^\\d+$/)) {\n return str;\n }\n name = JSON.stringify('' + key);\n if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n name = name.slice(1, -1);\n name = ctx.stylize(name, 'name');\n } else {\n name = name.replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n .replace(/(^\"|\"$)/g, \"'\");\n name = ctx.stylize(name, 'string');\n }\n }\n\n return name + ': ' + str;\n}\n\n\nfunction reduceToSingleString(output, base, braces) {\n var numLinesEst = 0;\n var length = output.reduce(function(prev, cur) {\n numLinesEst++;\n if (cur.indexOf('\\n') >= 0) numLinesEst++;\n return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n }, 0);\n\n if (length > 60) {\n return braces[0] +\n (base === '' ? '' : base + '\\n ') +\n ' ' +\n output.join(',\\n ') +\n ' ' +\n braces[1];\n }\n\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n}\n\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\nexports.types = require('./support/types');\n\nfunction isArray(ar) {\n return Array.isArray(ar);\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return isObject(re) && objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\nexports.types.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return isObject(d) && objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\nexports.types.isDate = isDate;\n\nfunction isError(e) {\n return isObject(e) &&\n (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\nexports.types.isNativeError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = require('./support/isBuffer');\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n\n\nfunction pad(n) {\n return n < 10 ? '0' + n.toString(10) : n.toString(10);\n}\n\n\nvar months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',\n 'Oct', 'Nov', 'Dec'];\n\n// 26 Feb 16:19:34\nfunction timestamp() {\n var d = new Date();\n var time = [pad(d.getHours()),\n pad(d.getMinutes()),\n pad(d.getSeconds())].join(':');\n return [d.getDate(), months[d.getMonth()], time].join(' ');\n}\n\n\n// log is just a thin wrapper to console.log that prepends a timestamp\nexports.log = function() {\n console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));\n};\n\n\n/**\n * Inherit the prototype methods from one constructor into another.\n *\n * The Function.prototype.inherits from lang.js rewritten as a standalone\n * function (not on Function.prototype). NOTE: If this file is to be loaded\n * during bootstrapping this function needs to be rewritten using some native\n * functions as prototype setup using normal JavaScript does not work as\n * expected during bootstrapping (see mirror.js in r114903).\n *\n * @param {function} ctor Constructor function which needs to inherit the\n * prototype.\n * @param {function} superCtor Constructor function to inherit prototype from.\n */\nexports.inherits = require('inherits');\n\nexports._extend = function(origin, add) {\n // Don't do anything if add isn't an object\n if (!add || !isObject(add)) return origin;\n\n var keys = Object.keys(add);\n var i = keys.length;\n while (i--) {\n origin[keys[i]] = add[keys[i]];\n }\n return origin;\n};\n\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nvar kCustomPromisifiedSymbol = typeof Symbol !== 'undefined' ? Symbol('util.promisify.custom') : undefined;\n\nexports.promisify = function promisify(original) {\n if (typeof original !== 'function')\n throw new TypeError('The \"original\" argument must be of type Function');\n\n if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) {\n var fn = original[kCustomPromisifiedSymbol];\n if (typeof fn !== 'function') {\n throw new TypeError('The \"util.promisify.custom\" argument must be of type Function');\n }\n Object.defineProperty(fn, kCustomPromisifiedSymbol, {\n value: fn, enumerable: false, writable: false, configurable: true\n });\n return fn;\n }\n\n function fn() {\n var promiseResolve, promiseReject;\n var promise = new Promise(function (resolve, reject) {\n promiseResolve = resolve;\n promiseReject = reject;\n });\n\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n args.push(function (err, value) {\n if (err) {\n promiseReject(err);\n } else {\n promiseResolve(value);\n }\n });\n\n try {\n original.apply(this, args);\n } catch (err) {\n promiseReject(err);\n }\n\n return promise;\n }\n\n Object.setPrototypeOf(fn, Object.getPrototypeOf(original));\n\n if (kCustomPromisifiedSymbol) Object.defineProperty(fn, kCustomPromisifiedSymbol, {\n value: fn, enumerable: false, writable: false, configurable: true\n });\n return Object.defineProperties(\n fn,\n getOwnPropertyDescriptors(original)\n );\n}\n\nexports.promisify.custom = kCustomPromisifiedSymbol\n\nfunction callbackifyOnRejected(reason, cb) {\n // `!reason` guard inspired by bluebird (Ref: https://goo.gl/t5IS6M).\n // Because `null` is a special error value in callbacks which means \"no error\n // occurred\", we error-wrap so the callback consumer can distinguish between\n // \"the promise rejected with null\" or \"the promise fulfilled with undefined\".\n if (!reason) {\n var newReason = new Error('Promise was rejected with a falsy value');\n newReason.reason = reason;\n reason = newReason;\n }\n return cb(reason);\n}\n\nfunction callbackify(original) {\n if (typeof original !== 'function') {\n throw new TypeError('The \"original\" argument must be of type Function');\n }\n\n // We DO NOT return the promise as it gives the user a false sense that\n // the promise is actually somehow related to the callback's execution\n // and that the callback throwing will reject the promise.\n function callbackified() {\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n\n var maybeCb = args.pop();\n if (typeof maybeCb !== 'function') {\n throw new TypeError('The last argument must be of type Function');\n }\n var self = this;\n var cb = function() {\n return maybeCb.apply(self, arguments);\n };\n // In true node style we process the callback on `nextTick` with all the\n // implications (stack, `uncaughtException`, `async_hooks`)\n original.apply(this, args)\n .then(function(ret) { process.nextTick(cb.bind(null, null, ret)) },\n function(rej) { process.nextTick(callbackifyOnRejected.bind(null, rej, cb)) });\n }\n\n Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original));\n Object.defineProperties(callbackified,\n getOwnPropertyDescriptors(original));\n return callbackified;\n}\nexports.callbackify = callbackify;\n","// Currently in sync with Node.js lib/internal/util/types.js\n// https://github.com/nodejs/node/commit/112cc7c27551254aa2b17098fb774867f05ed0d9\n\n'use strict';\n\nvar isArgumentsObject = require('is-arguments');\nvar isGeneratorFunction = require('is-generator-function');\nvar whichTypedArray = require('which-typed-array');\nvar isTypedArray = require('is-typed-array');\n\nfunction uncurryThis(f) {\n return f.call.bind(f);\n}\n\nvar BigIntSupported = typeof BigInt !== 'undefined';\nvar SymbolSupported = typeof Symbol !== 'undefined';\n\nvar ObjectToString = uncurryThis(Object.prototype.toString);\n\nvar numberValue = uncurryThis(Number.prototype.valueOf);\nvar stringValue = uncurryThis(String.prototype.valueOf);\nvar booleanValue = uncurryThis(Boolean.prototype.valueOf);\n\nif (BigIntSupported) {\n var bigIntValue = uncurryThis(BigInt.prototype.valueOf);\n}\n\nif (SymbolSupported) {\n var symbolValue = uncurryThis(Symbol.prototype.valueOf);\n}\n\nfunction checkBoxedPrimitive(value, prototypeValueOf) {\n if (typeof value !== 'object') {\n return false;\n }\n try {\n prototypeValueOf(value);\n return true;\n } catch(e) {\n return false;\n }\n}\n\nexports.isArgumentsObject = isArgumentsObject;\nexports.isGeneratorFunction = isGeneratorFunction;\nexports.isTypedArray = isTypedArray;\n\n// Taken from here and modified for better browser support\n// https://github.com/sindresorhus/p-is-promise/blob/cda35a513bda03f977ad5cde3a079d237e82d7ef/index.js\nfunction isPromise(input) {\n\treturn (\n\t\t(\n\t\t\ttypeof Promise !== 'undefined' &&\n\t\t\tinput instanceof Promise\n\t\t) ||\n\t\t(\n\t\t\tinput !== null &&\n\t\t\ttypeof input === 'object' &&\n\t\t\ttypeof input.then === 'function' &&\n\t\t\ttypeof input.catch === 'function'\n\t\t)\n\t);\n}\nexports.isPromise = isPromise;\n\nfunction isArrayBufferView(value) {\n if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {\n return ArrayBuffer.isView(value);\n }\n\n return (\n isTypedArray(value) ||\n isDataView(value)\n );\n}\nexports.isArrayBufferView = isArrayBufferView;\n\n\nfunction isUint8Array(value) {\n return whichTypedArray(value) === 'Uint8Array';\n}\nexports.isUint8Array = isUint8Array;\n\nfunction isUint8ClampedArray(value) {\n return whichTypedArray(value) === 'Uint8ClampedArray';\n}\nexports.isUint8ClampedArray = isUint8ClampedArray;\n\nfunction isUint16Array(value) {\n return whichTypedArray(value) === 'Uint16Array';\n}\nexports.isUint16Array = isUint16Array;\n\nfunction isUint32Array(value) {\n return whichTypedArray(value) === 'Uint32Array';\n}\nexports.isUint32Array = isUint32Array;\n\nfunction isInt8Array(value) {\n return whichTypedArray(value) === 'Int8Array';\n}\nexports.isInt8Array = isInt8Array;\n\nfunction isInt16Array(value) {\n return whichTypedArray(value) === 'Int16Array';\n}\nexports.isInt16Array = isInt16Array;\n\nfunction isInt32Array(value) {\n return whichTypedArray(value) === 'Int32Array';\n}\nexports.isInt32Array = isInt32Array;\n\nfunction isFloat32Array(value) {\n return whichTypedArray(value) === 'Float32Array';\n}\nexports.isFloat32Array = isFloat32Array;\n\nfunction isFloat64Array(value) {\n return whichTypedArray(value) === 'Float64Array';\n}\nexports.isFloat64Array = isFloat64Array;\n\nfunction isBigInt64Array(value) {\n return whichTypedArray(value) === 'BigInt64Array';\n}\nexports.isBigInt64Array = isBigInt64Array;\n\nfunction isBigUint64Array(value) {\n return whichTypedArray(value) === 'BigUint64Array';\n}\nexports.isBigUint64Array = isBigUint64Array;\n\nfunction isMapToString(value) {\n return ObjectToString(value) === '[object Map]';\n}\nisMapToString.working = (\n typeof Map !== 'undefined' &&\n isMapToString(new Map())\n);\n\nfunction isMap(value) {\n if (typeof Map === 'undefined') {\n return false;\n }\n\n return isMapToString.working\n ? isMapToString(value)\n : value instanceof Map;\n}\nexports.isMap = isMap;\n\nfunction isSetToString(value) {\n return ObjectToString(value) === '[object Set]';\n}\nisSetToString.working = (\n typeof Set !== 'undefined' &&\n isSetToString(new Set())\n);\nfunction isSet(value) {\n if (typeof Set === 'undefined') {\n return false;\n }\n\n return isSetToString.working\n ? isSetToString(value)\n : value instanceof Set;\n}\nexports.isSet = isSet;\n\nfunction isWeakMapToString(value) {\n return ObjectToString(value) === '[object WeakMap]';\n}\nisWeakMapToString.working = (\n typeof WeakMap !== 'undefined' &&\n isWeakMapToString(new WeakMap())\n);\nfunction isWeakMap(value) {\n if (typeof WeakMap === 'undefined') {\n return false;\n }\n\n return isWeakMapToString.working\n ? isWeakMapToString(value)\n : value instanceof WeakMap;\n}\nexports.isWeakMap = isWeakMap;\n\nfunction isWeakSetToString(value) {\n return ObjectToString(value) === '[object WeakSet]';\n}\nisWeakSetToString.working = (\n typeof WeakSet !== 'undefined' &&\n isWeakSetToString(new WeakSet())\n);\nfunction isWeakSet(value) {\n return isWeakSetToString(value);\n}\nexports.isWeakSet = isWeakSet;\n\nfunction isArrayBufferToString(value) {\n return ObjectToString(value) === '[object ArrayBuffer]';\n}\nisArrayBufferToString.working = (\n typeof ArrayBuffer !== 'undefined' &&\n isArrayBufferToString(new ArrayBuffer())\n);\nfunction isArrayBuffer(value) {\n if (typeof ArrayBuffer === 'undefined') {\n return false;\n }\n\n return isArrayBufferToString.working\n ? isArrayBufferToString(value)\n : value instanceof ArrayBuffer;\n}\nexports.isArrayBuffer = isArrayBuffer;\n\nfunction isDataViewToString(value) {\n return ObjectToString(value) === '[object DataView]';\n}\nisDataViewToString.working = (\n typeof ArrayBuffer !== 'undefined' &&\n typeof DataView !== 'undefined' &&\n isDataViewToString(new DataView(new ArrayBuffer(1), 0, 1))\n);\nfunction isDataView(value) {\n if (typeof DataView === 'undefined') {\n return false;\n }\n\n return isDataViewToString.working\n ? isDataViewToString(value)\n : value instanceof DataView;\n}\nexports.isDataView = isDataView;\n\n// Store a copy of SharedArrayBuffer in case it's deleted elsewhere\nvar SharedArrayBufferCopy = typeof SharedArrayBuffer !== 'undefined' ? SharedArrayBuffer : undefined;\nfunction isSharedArrayBufferToString(value) {\n return ObjectToString(value) === '[object SharedArrayBuffer]';\n}\nfunction isSharedArrayBuffer(value) {\n if (typeof SharedArrayBufferCopy === 'undefined') {\n return false;\n }\n\n if (typeof isSharedArrayBufferToString.working === 'undefined') {\n isSharedArrayBufferToString.working = isSharedArrayBufferToString(new SharedArrayBufferCopy());\n }\n\n return isSharedArrayBufferToString.working\n ? isSharedArrayBufferToString(value)\n : value instanceof SharedArrayBufferCopy;\n}\nexports.isSharedArrayBuffer = isSharedArrayBuffer;\n\nfunction isAsyncFunction(value) {\n return ObjectToString(value) === '[object AsyncFunction]';\n}\nexports.isAsyncFunction = isAsyncFunction;\n\nfunction isMapIterator(value) {\n return ObjectToString(value) === '[object Map Iterator]';\n}\nexports.isMapIterator = isMapIterator;\n\nfunction isSetIterator(value) {\n return ObjectToString(value) === '[object Set Iterator]';\n}\nexports.isSetIterator = isSetIterator;\n\nfunction isGeneratorObject(value) {\n return ObjectToString(value) === '[object Generator]';\n}\nexports.isGeneratorObject = isGeneratorObject;\n\nfunction isWebAssemblyCompiledModule(value) {\n return ObjectToString(value) === '[object WebAssembly.Module]';\n}\nexports.isWebAssemblyCompiledModule = isWebAssemblyCompiledModule;\n\nfunction isNumberObject(value) {\n return checkBoxedPrimitive(value, numberValue);\n}\nexports.isNumberObject = isNumberObject;\n\nfunction isStringObject(value) {\n return checkBoxedPrimitive(value, stringValue);\n}\nexports.isStringObject = isStringObject;\n\nfunction isBooleanObject(value) {\n return checkBoxedPrimitive(value, booleanValue);\n}\nexports.isBooleanObject = isBooleanObject;\n\nfunction isBigIntObject(value) {\n return BigIntSupported && checkBoxedPrimitive(value, bigIntValue);\n}\nexports.isBigIntObject = isBigIntObject;\n\nfunction isSymbolObject(value) {\n return SymbolSupported && checkBoxedPrimitive(value, symbolValue);\n}\nexports.isSymbolObject = isSymbolObject;\n\nfunction isBoxedPrimitive(value) {\n return (\n isNumberObject(value) ||\n isStringObject(value) ||\n isBooleanObject(value) ||\n isBigIntObject(value) ||\n isSymbolObject(value)\n );\n}\nexports.isBoxedPrimitive = isBoxedPrimitive;\n\nfunction isAnyArrayBuffer(value) {\n return typeof Uint8Array !== 'undefined' && (\n isArrayBuffer(value) ||\n isSharedArrayBuffer(value)\n );\n}\nexports.isAnyArrayBuffer = isAnyArrayBuffer;\n\n['isProxy', 'isExternal', 'isModuleNamespaceObject'].forEach(function(method) {\n Object.defineProperty(exports, method, {\n enumerable: false,\n value: function() {\n throw new Error(method + ' is not supported in userland');\n }\n });\n});\n","'use strict';\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar callBound = require('call-bind/callBound');\n\nvar $toString = callBound('Object.prototype.toString');\n\nvar isStandardArguments = function isArguments(value) {\n\tif (hasToStringTag && value && typeof value === 'object' && Symbol.toStringTag in value) {\n\t\treturn false;\n\t}\n\treturn $toString(value) === '[object Arguments]';\n};\n\nvar isLegacyArguments = function isArguments(value) {\n\tif (isStandardArguments(value)) {\n\t\treturn true;\n\t}\n\treturn value !== null &&\n\t\ttypeof value === 'object' &&\n\t\ttypeof value.length === 'number' &&\n\t\tvalue.length >= 0 &&\n\t\t$toString(value) !== '[object Array]' &&\n\t\t$toString(value.callee) === '[object Function]';\n};\n\nvar supportsStandardArguments = (function () {\n\treturn isStandardArguments(arguments);\n}());\n\nisStandardArguments.isLegacyArguments = isLegacyArguments; // for tests\n\nmodule.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments;\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar test = {\n\tfoo: {}\n};\n\nvar $Object = Object;\n\nmodule.exports = function hasProto() {\n\treturn { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar bind = require('function-bind');\n\nmodule.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\nvar toStr = Object.prototype.toString;\nvar fnToStr = Function.prototype.toString;\nvar isFnRegex = /^\\s*(?:function)?\\*/;\nvar hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';\nvar getProto = Object.getPrototypeOf;\nvar getGeneratorFunc = function () { // eslint-disable-line consistent-return\n\tif (!hasToStringTag) {\n\t\treturn false;\n\t}\n\ttry {\n\t\treturn Function('return function*() {}')();\n\t} catch (e) {\n\t}\n};\nvar GeneratorFunction;\n\nmodule.exports = function isGeneratorFunction(fn) {\n\tif (typeof fn !== 'function') {\n\t\treturn false;\n\t}\n\tif (isFnRegex.test(fnToStr.call(fn))) {\n\t\treturn true;\n\t}\n\tif (!hasToStringTag) {\n\t\tvar str = toStr.call(fn);\n\t\treturn str === '[object GeneratorFunction]';\n\t}\n\tif (!getProto) {\n\t\treturn false;\n\t}\n\tif (typeof GeneratorFunction === 'undefined') {\n\t\tvar generatorFunc = getGeneratorFunc();\n\t\tGeneratorFunction = generatorFunc ? getProto(generatorFunc) : false;\n\t}\n\treturn getProto(fn) === GeneratorFunction;\n};\n","'use strict';\n\nvar forEach = require('for-each');\nvar availableTypedArrays = require('available-typed-arrays');\nvar callBind = require('call-bind');\nvar callBound = require('call-bind/callBound');\nvar gOPD = require('gopd');\n\nvar $toString = callBound('Object.prototype.toString');\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nvar g = typeof globalThis === 'undefined' ? global : globalThis;\nvar typedArrays = availableTypedArrays();\n\nvar $slice = callBound('String.prototype.slice');\nvar getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof');\n\nvar $indexOf = callBound('Array.prototype.indexOf', true) || function indexOf(array, value) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tif (array[i] === value) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n};\nvar cache = { __proto__: null };\nif (hasToStringTag && gOPD && getPrototypeOf) {\n\tforEach(typedArrays, function (typedArray) {\n\t\tvar arr = new g[typedArray]();\n\t\tif (Symbol.toStringTag in arr) {\n\t\t\tvar proto = getPrototypeOf(arr);\n\t\t\tvar descriptor = gOPD(proto, Symbol.toStringTag);\n\t\t\tif (!descriptor) {\n\t\t\t\tvar superProto = getPrototypeOf(proto);\n\t\t\t\tdescriptor = gOPD(superProto, Symbol.toStringTag);\n\t\t\t}\n\t\t\tcache['$' + typedArray] = callBind(descriptor.get);\n\t\t}\n\t});\n} else {\n\tforEach(typedArrays, function (typedArray) {\n\t\tvar arr = new g[typedArray]();\n\t\tcache['$' + typedArray] = callBind(arr.slice);\n\t});\n}\n\nvar tryTypedArrays = function tryAllTypedArrays(value) {\n\tvar found = false;\n\tforEach(cache, function (getter, typedArray) {\n\t\tif (!found) {\n\t\t\ttry {\n\t\t\t\tif ('$' + getter(value) === typedArray) {\n\t\t\t\t\tfound = $slice(typedArray, 1);\n\t\t\t\t}\n\t\t\t} catch (e) { /**/ }\n\t\t}\n\t});\n\treturn found;\n};\n\nvar trySlices = function tryAllSlices(value) {\n\tvar found = false;\n\tforEach(cache, function (getter, name) {\n\t\tif (!found) {\n\t\t\ttry {\n\t\t\t\tgetter(value);\n\t\t\t\tfound = $slice(name, 1);\n\t\t\t} catch (e) { /**/ }\n\t\t}\n\t});\n\treturn found;\n};\n\nmodule.exports = function whichTypedArray(value) {\n\tif (!value || typeof value !== 'object') { return false; }\n\tif (!hasToStringTag) {\n\t\tvar tag = $slice($toString(value), 8, -1);\n\t\tif ($indexOf(typedArrays, tag) > -1) {\n\t\t\treturn tag;\n\t\t}\n\t\tif (tag !== 'Object') {\n\t\t\treturn false;\n\t\t}\n\t\t// node < 0.6 hits here on real Typed Arrays\n\t\treturn trySlices(value);\n\t}\n\tif (!gOPD) { return null; } // unknown engine\n\treturn tryTypedArrays(value);\n};\n","'use strict';\n\nvar isCallable = require('is-callable');\n\nvar toStr = Object.prototype.toString;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar forEachArray = function forEachArray(array, iterator, receiver) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (hasOwnProperty.call(array, i)) {\n if (receiver == null) {\n iterator(array[i], i, array);\n } else {\n iterator.call(receiver, array[i], i, array);\n }\n }\n }\n};\n\nvar forEachString = function forEachString(string, iterator, receiver) {\n for (var i = 0, len = string.length; i < len; i++) {\n // no such thing as a sparse string.\n if (receiver == null) {\n iterator(string.charAt(i), i, string);\n } else {\n iterator.call(receiver, string.charAt(i), i, string);\n }\n }\n};\n\nvar forEachObject = function forEachObject(object, iterator, receiver) {\n for (var k in object) {\n if (hasOwnProperty.call(object, k)) {\n if (receiver == null) {\n iterator(object[k], k, object);\n } else {\n iterator.call(receiver, object[k], k, object);\n }\n }\n }\n};\n\nvar forEach = function forEach(list, iterator, thisArg) {\n if (!isCallable(iterator)) {\n throw new TypeError('iterator must be a function');\n }\n\n var receiver;\n if (arguments.length >= 3) {\n receiver = thisArg;\n }\n\n if (toStr.call(list) === '[object Array]') {\n forEachArray(list, iterator, receiver);\n } else if (typeof list === 'string') {\n forEachString(list, iterator, receiver);\n } else {\n forEachObject(list, iterator, receiver);\n }\n};\n\nmodule.exports = forEach;\n","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n","'use strict';\n\nvar possibleNames = [\n\t'BigInt64Array',\n\t'BigUint64Array',\n\t'Float32Array',\n\t'Float64Array',\n\t'Int16Array',\n\t'Int32Array',\n\t'Int8Array',\n\t'Uint16Array',\n\t'Uint32Array',\n\t'Uint8Array',\n\t'Uint8ClampedArray'\n];\n\nvar g = typeof globalThis === 'undefined' ? global : globalThis;\n\nmodule.exports = function availableTypedArrays() {\n\tvar out = [];\n\tfor (var i = 0; i < possibleNames.length; i++) {\n\t\tif (typeof g[possibleNames[i]] === 'function') {\n\t\t\tout[out.length] = possibleNames[i];\n\t\t}\n\t}\n\treturn out;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\nvar whichTypedArray = require('which-typed-array');\n\nmodule.exports = function isTypedArray(value) {\n\treturn !!whichTypedArray(value);\n};\n","module.exports = function isBuffer(arg) {\n return arg && typeof arg === 'object'\n && typeof arg.copy === 'function'\n && typeof arg.fill === 'function'\n && typeof arg.readUInt8 === 'function';\n}","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n }\n}\n","/* --------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\n'use strict';\nexport var DocumentUri;\n(function (DocumentUri) {\n function is(value) {\n return typeof value === 'string';\n }\n DocumentUri.is = is;\n})(DocumentUri || (DocumentUri = {}));\nexport var URI;\n(function (URI) {\n function is(value) {\n return typeof value === 'string';\n }\n URI.is = is;\n})(URI || (URI = {}));\nexport var integer;\n(function (integer) {\n integer.MIN_VALUE = -2147483648;\n integer.MAX_VALUE = 2147483647;\n function is(value) {\n return typeof value === 'number' && integer.MIN_VALUE <= value && value <= integer.MAX_VALUE;\n }\n integer.is = is;\n})(integer || (integer = {}));\nexport var uinteger;\n(function (uinteger) {\n uinteger.MIN_VALUE = 0;\n uinteger.MAX_VALUE = 2147483647;\n function is(value) {\n return typeof value === 'number' && uinteger.MIN_VALUE <= value && value <= uinteger.MAX_VALUE;\n }\n uinteger.is = is;\n})(uinteger || (uinteger = {}));\n/**\n * The Position namespace provides helper functions to work with\n * {@link Position} literals.\n */\nexport var Position;\n(function (Position) {\n /**\n * Creates a new Position literal from the given line and character.\n * @param line The position's line.\n * @param character The position's character.\n */\n function create(line, character) {\n if (line === Number.MAX_VALUE) {\n line = uinteger.MAX_VALUE;\n }\n if (character === Number.MAX_VALUE) {\n character = uinteger.MAX_VALUE;\n }\n return { line: line, character: character };\n }\n Position.create = create;\n /**\n * Checks whether the given literal conforms to the {@link Position} interface.\n */\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate) && Is.uinteger(candidate.line) && Is.uinteger(candidate.character);\n }\n Position.is = is;\n})(Position || (Position = {}));\n/**\n * The Range namespace provides helper functions to work with\n * {@link Range} literals.\n */\nexport var Range;\n(function (Range) {\n function create(one, two, three, four) {\n if (Is.uinteger(one) && Is.uinteger(two) && Is.uinteger(three) && Is.uinteger(four)) {\n return { start: Position.create(one, two), end: Position.create(three, four) };\n }\n else if (Position.is(one) && Position.is(two)) {\n return { start: one, end: two };\n }\n else {\n throw new Error(\"Range#create called with invalid arguments[\".concat(one, \", \").concat(two, \", \").concat(three, \", \").concat(four, \"]\"));\n }\n }\n Range.create = create;\n /**\n * Checks whether the given literal conforms to the {@link Range} interface.\n */\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);\n }\n Range.is = is;\n})(Range || (Range = {}));\n/**\n * The Location namespace provides helper functions to work with\n * {@link Location} literals.\n */\nexport var Location;\n(function (Location) {\n /**\n * Creates a Location literal.\n * @param uri The location's uri.\n * @param range The location's range.\n */\n function create(uri, range) {\n return { uri: uri, range: range };\n }\n Location.create = create;\n /**\n * Checks whether the given literal conforms to the {@link Location} interface.\n */\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri));\n }\n Location.is = is;\n})(Location || (Location = {}));\n/**\n * The LocationLink namespace provides helper functions to work with\n * {@link LocationLink} literals.\n */\nexport var LocationLink;\n(function (LocationLink) {\n /**\n * Creates a LocationLink literal.\n * @param targetUri The definition's uri.\n * @param targetRange The full range of the definition.\n * @param targetSelectionRange The span of the symbol definition at the target.\n * @param originSelectionRange The span of the symbol being defined in the originating source file.\n */\n function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) {\n return { targetUri: targetUri, targetRange: targetRange, targetSelectionRange: targetSelectionRange, originSelectionRange: originSelectionRange };\n }\n LocationLink.create = create;\n /**\n * Checks whether the given literal conforms to the {@link LocationLink} interface.\n */\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri)\n && Range.is(candidate.targetSelectionRange)\n && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange));\n }\n LocationLink.is = is;\n})(LocationLink || (LocationLink = {}));\n/**\n * The Color namespace provides helper functions to work with\n * {@link Color} literals.\n */\nexport var Color;\n(function (Color) {\n /**\n * Creates a new Color literal.\n */\n function create(red, green, blue, alpha) {\n return {\n red: red,\n green: green,\n blue: blue,\n alpha: alpha,\n };\n }\n Color.create = create;\n /**\n * Checks whether the given literal conforms to the {@link Color} interface.\n */\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate) && Is.numberRange(candidate.red, 0, 1)\n && Is.numberRange(candidate.green, 0, 1)\n && Is.numberRange(candidate.blue, 0, 1)\n && Is.numberRange(candidate.alpha, 0, 1);\n }\n Color.is = is;\n})(Color || (Color = {}));\n/**\n * The ColorInformation namespace provides helper functions to work with\n * {@link ColorInformation} literals.\n */\nexport var ColorInformation;\n(function (ColorInformation) {\n /**\n * Creates a new ColorInformation literal.\n */\n function create(range, color) {\n return {\n range: range,\n color: color,\n };\n }\n ColorInformation.create = create;\n /**\n * Checks whether the given literal conforms to the {@link ColorInformation} interface.\n */\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate) && Range.is(candidate.range) && Color.is(candidate.color);\n }\n ColorInformation.is = is;\n})(ColorInformation || (ColorInformation = {}));\n/**\n * The Color namespace provides helper functions to work with\n * {@link ColorPresentation} literals.\n */\nexport var ColorPresentation;\n(function (ColorPresentation) {\n /**\n * Creates a new ColorInformation literal.\n */\n function create(label, textEdit, additionalTextEdits) {\n return {\n label: label,\n textEdit: textEdit,\n additionalTextEdits: additionalTextEdits,\n };\n }\n ColorPresentation.create = create;\n /**\n * Checks whether the given literal conforms to the {@link ColorInformation} interface.\n */\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate) && Is.string(candidate.label)\n && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate))\n && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is));\n }\n ColorPresentation.is = is;\n})(ColorPresentation || (ColorPresentation = {}));\n/**\n * A set of predefined range kinds.\n */\nexport var FoldingRangeKind;\n(function (FoldingRangeKind) {\n /**\n * Folding range for a comment\n */\n FoldingRangeKind.Comment = 'comment';\n /**\n * Folding range for an import or include\n */\n FoldingRangeKind.Imports = 'imports';\n /**\n * Folding range for a region (e.g. `#region`)\n */\n FoldingRangeKind.Region = 'region';\n})(FoldingRangeKind || (FoldingRangeKind = {}));\n/**\n * The folding range namespace provides helper functions to work with\n * {@link FoldingRange} literals.\n */\nexport var FoldingRange;\n(function (FoldingRange) {\n /**\n * Creates a new FoldingRange literal.\n */\n function create(startLine, endLine, startCharacter, endCharacter, kind, collapsedText) {\n var result = {\n startLine: startLine,\n endLine: endLine\n };\n if (Is.defined(startCharacter)) {\n result.startCharacter = startCharacter;\n }\n if (Is.defined(endCharacter)) {\n result.endCharacter = endCharacter;\n }\n if (Is.defined(kind)) {\n result.kind = kind;\n }\n if (Is.defined(collapsedText)) {\n result.collapsedText = collapsedText;\n }\n return result;\n }\n FoldingRange.create = create;\n /**\n * Checks whether the given literal conforms to the {@link FoldingRange} interface.\n */\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate) && Is.uinteger(candidate.startLine) && Is.uinteger(candidate.startLine)\n && (Is.undefined(candidate.startCharacter) || Is.uinteger(candidate.startCharacter))\n && (Is.undefined(candidate.endCharacter) || Is.uinteger(candidate.endCharacter))\n && (Is.undefined(candidate.kind) || Is.string(candidate.kind));\n }\n FoldingRange.is = is;\n})(FoldingRange || (FoldingRange = {}));\n/**\n * The DiagnosticRelatedInformation namespace provides helper functions to work with\n * {@link DiagnosticRelatedInformation} literals.\n */\nexport var DiagnosticRelatedInformation;\n(function (DiagnosticRelatedInformation) {\n /**\n * Creates a new DiagnosticRelatedInformation literal.\n */\n function create(location, message) {\n return {\n location: location,\n message: message\n };\n }\n DiagnosticRelatedInformation.create = create;\n /**\n * Checks whether the given literal conforms to the {@link DiagnosticRelatedInformation} interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message);\n }\n DiagnosticRelatedInformation.is = is;\n})(DiagnosticRelatedInformation || (DiagnosticRelatedInformation = {}));\n/**\n * The diagnostic's severity.\n */\nexport var DiagnosticSeverity;\n(function (DiagnosticSeverity) {\n /**\n * Reports an error.\n */\n DiagnosticSeverity.Error = 1;\n /**\n * Reports a warning.\n */\n DiagnosticSeverity.Warning = 2;\n /**\n * Reports an information.\n */\n DiagnosticSeverity.Information = 3;\n /**\n * Reports a hint.\n */\n DiagnosticSeverity.Hint = 4;\n})(DiagnosticSeverity || (DiagnosticSeverity = {}));\n/**\n * The diagnostic tags.\n *\n * @since 3.15.0\n */\nexport var DiagnosticTag;\n(function (DiagnosticTag) {\n /**\n * Unused or unnecessary code.\n *\n * Clients are allowed to render diagnostics with this tag faded out instead of having\n * an error squiggle.\n */\n DiagnosticTag.Unnecessary = 1;\n /**\n * Deprecated or obsolete code.\n *\n * Clients are allowed to rendered diagnostics with this tag strike through.\n */\n DiagnosticTag.Deprecated = 2;\n})(DiagnosticTag || (DiagnosticTag = {}));\n/**\n * The CodeDescription namespace provides functions to deal with descriptions for diagnostic codes.\n *\n * @since 3.16.0\n */\nexport var CodeDescription;\n(function (CodeDescription) {\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate) && Is.string(candidate.href);\n }\n CodeDescription.is = is;\n})(CodeDescription || (CodeDescription = {}));\n/**\n * The Diagnostic namespace provides helper functions to work with\n * {@link Diagnostic} literals.\n */\nexport var Diagnostic;\n(function (Diagnostic) {\n /**\n * Creates a new Diagnostic literal.\n */\n function create(range, message, severity, code, source, relatedInformation) {\n var result = { range: range, message: message };\n if (Is.defined(severity)) {\n result.severity = severity;\n }\n if (Is.defined(code)) {\n result.code = code;\n }\n if (Is.defined(source)) {\n result.source = source;\n }\n if (Is.defined(relatedInformation)) {\n result.relatedInformation = relatedInformation;\n }\n return result;\n }\n Diagnostic.create = create;\n /**\n * Checks whether the given literal conforms to the {@link Diagnostic} interface.\n */\n function is(value) {\n var _a;\n var candidate = value;\n return Is.defined(candidate)\n && Range.is(candidate.range)\n && Is.string(candidate.message)\n && (Is.number(candidate.severity) || Is.undefined(candidate.severity))\n && (Is.integer(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code))\n && (Is.undefined(candidate.codeDescription) || (Is.string((_a = candidate.codeDescription) === null || _a === void 0 ? void 0 : _a.href)))\n && (Is.string(candidate.source) || Is.undefined(candidate.source))\n && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is));\n }\n Diagnostic.is = is;\n})(Diagnostic || (Diagnostic = {}));\n/**\n * The Command namespace provides helper functions to work with\n * {@link Command} literals.\n */\nexport var Command;\n(function (Command) {\n /**\n * Creates a new Command literal.\n */\n function create(title, command) {\n var args = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n var result = { title: title, command: command };\n if (Is.defined(args) && args.length > 0) {\n result.arguments = args;\n }\n return result;\n }\n Command.create = create;\n /**\n * Checks whether the given literal conforms to the {@link Command} interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command);\n }\n Command.is = is;\n})(Command || (Command = {}));\n/**\n * The TextEdit namespace provides helper function to create replace,\n * insert and delete edits more easily.\n */\nexport var TextEdit;\n(function (TextEdit) {\n /**\n * Creates a replace text edit.\n * @param range The range of text to be replaced.\n * @param newText The new text.\n */\n function replace(range, newText) {\n return { range: range, newText: newText };\n }\n TextEdit.replace = replace;\n /**\n * Creates an insert text edit.\n * @param position The position to insert the text at.\n * @param newText The text to be inserted.\n */\n function insert(position, newText) {\n return { range: { start: position, end: position }, newText: newText };\n }\n TextEdit.insert = insert;\n /**\n * Creates a delete text edit.\n * @param range The range of text to be deleted.\n */\n function del(range) {\n return { range: range, newText: '' };\n }\n TextEdit.del = del;\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate)\n && Is.string(candidate.newText)\n && Range.is(candidate.range);\n }\n TextEdit.is = is;\n})(TextEdit || (TextEdit = {}));\nexport var ChangeAnnotation;\n(function (ChangeAnnotation) {\n function create(label, needsConfirmation, description) {\n var result = { label: label };\n if (needsConfirmation !== undefined) {\n result.needsConfirmation = needsConfirmation;\n }\n if (description !== undefined) {\n result.description = description;\n }\n return result;\n }\n ChangeAnnotation.create = create;\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate) && Is.string(candidate.label) &&\n (Is.boolean(candidate.needsConfirmation) || candidate.needsConfirmation === undefined) &&\n (Is.string(candidate.description) || candidate.description === undefined);\n }\n ChangeAnnotation.is = is;\n})(ChangeAnnotation || (ChangeAnnotation = {}));\nexport var ChangeAnnotationIdentifier;\n(function (ChangeAnnotationIdentifier) {\n function is(value) {\n var candidate = value;\n return Is.string(candidate);\n }\n ChangeAnnotationIdentifier.is = is;\n})(ChangeAnnotationIdentifier || (ChangeAnnotationIdentifier = {}));\nexport var AnnotatedTextEdit;\n(function (AnnotatedTextEdit) {\n /**\n * Creates an annotated replace text edit.\n *\n * @param range The range of text to be replaced.\n * @param newText The new text.\n * @param annotation The annotation.\n */\n function replace(range, newText, annotation) {\n return { range: range, newText: newText, annotationId: annotation };\n }\n AnnotatedTextEdit.replace = replace;\n /**\n * Creates an annotated insert text edit.\n *\n * @param position The position to insert the text at.\n * @param newText The text to be inserted.\n * @param annotation The annotation.\n */\n function insert(position, newText, annotation) {\n return { range: { start: position, end: position }, newText: newText, annotationId: annotation };\n }\n AnnotatedTextEdit.insert = insert;\n /**\n * Creates an annotated delete text edit.\n *\n * @param range The range of text to be deleted.\n * @param annotation The annotation.\n */\n function del(range, annotation) {\n return { range: range, newText: '', annotationId: annotation };\n }\n AnnotatedTextEdit.del = del;\n function is(value) {\n var candidate = value;\n return TextEdit.is(candidate) && (ChangeAnnotation.is(candidate.annotationId) || ChangeAnnotationIdentifier.is(candidate.annotationId));\n }\n AnnotatedTextEdit.is = is;\n})(AnnotatedTextEdit || (AnnotatedTextEdit = {}));\n/**\n * The TextDocumentEdit namespace provides helper function to create\n * an edit that manipulates a text document.\n */\nexport var TextDocumentEdit;\n(function (TextDocumentEdit) {\n /**\n * Creates a new `TextDocumentEdit`\n */\n function create(textDocument, edits) {\n return { textDocument: textDocument, edits: edits };\n }\n TextDocumentEdit.create = create;\n function is(value) {\n var candidate = value;\n return Is.defined(candidate)\n && OptionalVersionedTextDocumentIdentifier.is(candidate.textDocument)\n && Array.isArray(candidate.edits);\n }\n TextDocumentEdit.is = is;\n})(TextDocumentEdit || (TextDocumentEdit = {}));\nexport var CreateFile;\n(function (CreateFile) {\n function create(uri, options, annotation) {\n var result = {\n kind: 'create',\n uri: uri\n };\n if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {\n result.options = options;\n }\n if (annotation !== undefined) {\n result.annotationId = annotation;\n }\n return result;\n }\n CreateFile.create = create;\n function is(value) {\n var candidate = value;\n return candidate && candidate.kind === 'create' && Is.string(candidate.uri) && (candidate.options === undefined ||\n ((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));\n }\n CreateFile.is = is;\n})(CreateFile || (CreateFile = {}));\nexport var RenameFile;\n(function (RenameFile) {\n function create(oldUri, newUri, options, annotation) {\n var result = {\n kind: 'rename',\n oldUri: oldUri,\n newUri: newUri\n };\n if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {\n result.options = options;\n }\n if (annotation !== undefined) {\n result.annotationId = annotation;\n }\n return result;\n }\n RenameFile.create = create;\n function is(value) {\n var candidate = value;\n return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) && (candidate.options === undefined ||\n ((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));\n }\n RenameFile.is = is;\n})(RenameFile || (RenameFile = {}));\nexport var DeleteFile;\n(function (DeleteFile) {\n function create(uri, options, annotation) {\n var result = {\n kind: 'delete',\n uri: uri\n };\n if (options !== undefined && (options.recursive !== undefined || options.ignoreIfNotExists !== undefined)) {\n result.options = options;\n }\n if (annotation !== undefined) {\n result.annotationId = annotation;\n }\n return result;\n }\n DeleteFile.create = create;\n function is(value) {\n var candidate = value;\n return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) && (candidate.options === undefined ||\n ((candidate.options.recursive === undefined || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === undefined || Is.boolean(candidate.options.ignoreIfNotExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));\n }\n DeleteFile.is = is;\n})(DeleteFile || (DeleteFile = {}));\nexport var WorkspaceEdit;\n(function (WorkspaceEdit) {\n function is(value) {\n var candidate = value;\n return candidate &&\n (candidate.changes !== undefined || candidate.documentChanges !== undefined) &&\n (candidate.documentChanges === undefined || candidate.documentChanges.every(function (change) {\n if (Is.string(change.kind)) {\n return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change);\n }\n else {\n return TextDocumentEdit.is(change);\n }\n }));\n }\n WorkspaceEdit.is = is;\n})(WorkspaceEdit || (WorkspaceEdit = {}));\nvar TextEditChangeImpl = /** @class */ (function () {\n function TextEditChangeImpl(edits, changeAnnotations) {\n this.edits = edits;\n this.changeAnnotations = changeAnnotations;\n }\n TextEditChangeImpl.prototype.insert = function (position, newText, annotation) {\n var edit;\n var id;\n if (annotation === undefined) {\n edit = TextEdit.insert(position, newText);\n }\n else if (ChangeAnnotationIdentifier.is(annotation)) {\n id = annotation;\n edit = AnnotatedTextEdit.insert(position, newText, annotation);\n }\n else {\n this.assertChangeAnnotations(this.changeAnnotations);\n id = this.changeAnnotations.manage(annotation);\n edit = AnnotatedTextEdit.insert(position, newText, id);\n }\n this.edits.push(edit);\n if (id !== undefined) {\n return id;\n }\n };\n TextEditChangeImpl.prototype.replace = function (range, newText, annotation) {\n var edit;\n var id;\n if (annotation === undefined) {\n edit = TextEdit.replace(range, newText);\n }\n else if (ChangeAnnotationIdentifier.is(annotation)) {\n id = annotation;\n edit = AnnotatedTextEdit.replace(range, newText, annotation);\n }\n else {\n this.assertChangeAnnotations(this.changeAnnotations);\n id = this.changeAnnotations.manage(annotation);\n edit = AnnotatedTextEdit.replace(range, newText, id);\n }\n this.edits.push(edit);\n if (id !== undefined) {\n return id;\n }\n };\n TextEditChangeImpl.prototype.delete = function (range, annotation) {\n var edit;\n var id;\n if (annotation === undefined) {\n edit = TextEdit.del(range);\n }\n else if (ChangeAnnotationIdentifier.is(annotation)) {\n id = annotation;\n edit = AnnotatedTextEdit.del(range, annotation);\n }\n else {\n this.assertChangeAnnotations(this.changeAnnotations);\n id = this.changeAnnotations.manage(annotation);\n edit = AnnotatedTextEdit.del(range, id);\n }\n this.edits.push(edit);\n if (id !== undefined) {\n return id;\n }\n };\n TextEditChangeImpl.prototype.add = function (edit) {\n this.edits.push(edit);\n };\n TextEditChangeImpl.prototype.all = function () {\n return this.edits;\n };\n TextEditChangeImpl.prototype.clear = function () {\n this.edits.splice(0, this.edits.length);\n };\n TextEditChangeImpl.prototype.assertChangeAnnotations = function (value) {\n if (value === undefined) {\n throw new Error(\"Text edit change is not configured to manage change annotations.\");\n }\n };\n return TextEditChangeImpl;\n}());\n/**\n * A helper class\n */\nvar ChangeAnnotations = /** @class */ (function () {\n function ChangeAnnotations(annotations) {\n this._annotations = annotations === undefined ? Object.create(null) : annotations;\n this._counter = 0;\n this._size = 0;\n }\n ChangeAnnotations.prototype.all = function () {\n return this._annotations;\n };\n Object.defineProperty(ChangeAnnotations.prototype, \"size\", {\n get: function () {\n return this._size;\n },\n enumerable: false,\n configurable: true\n });\n ChangeAnnotations.prototype.manage = function (idOrAnnotation, annotation) {\n var id;\n if (ChangeAnnotationIdentifier.is(idOrAnnotation)) {\n id = idOrAnnotation;\n }\n else {\n id = this.nextId();\n annotation = idOrAnnotation;\n }\n if (this._annotations[id] !== undefined) {\n throw new Error(\"Id \".concat(id, \" is already in use.\"));\n }\n if (annotation === undefined) {\n throw new Error(\"No annotation provided for id \".concat(id));\n }\n this._annotations[id] = annotation;\n this._size++;\n return id;\n };\n ChangeAnnotations.prototype.nextId = function () {\n this._counter++;\n return this._counter.toString();\n };\n return ChangeAnnotations;\n}());\n/**\n * A workspace change helps constructing changes to a workspace.\n */\nvar WorkspaceChange = /** @class */ (function () {\n function WorkspaceChange(workspaceEdit) {\n var _this = this;\n this._textEditChanges = Object.create(null);\n if (workspaceEdit !== undefined) {\n this._workspaceEdit = workspaceEdit;\n if (workspaceEdit.documentChanges) {\n this._changeAnnotations = new ChangeAnnotations(workspaceEdit.changeAnnotations);\n workspaceEdit.changeAnnotations = this._changeAnnotations.all();\n workspaceEdit.documentChanges.forEach(function (change) {\n if (TextDocumentEdit.is(change)) {\n var textEditChange = new TextEditChangeImpl(change.edits, _this._changeAnnotations);\n _this._textEditChanges[change.textDocument.uri] = textEditChange;\n }\n });\n }\n else if (workspaceEdit.changes) {\n Object.keys(workspaceEdit.changes).forEach(function (key) {\n var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]);\n _this._textEditChanges[key] = textEditChange;\n });\n }\n }\n else {\n this._workspaceEdit = {};\n }\n }\n Object.defineProperty(WorkspaceChange.prototype, \"edit\", {\n /**\n * Returns the underlying {@link WorkspaceEdit} literal\n * use to be returned from a workspace edit operation like rename.\n */\n get: function () {\n this.initDocumentChanges();\n if (this._changeAnnotations !== undefined) {\n if (this._changeAnnotations.size === 0) {\n this._workspaceEdit.changeAnnotations = undefined;\n }\n else {\n this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();\n }\n }\n return this._workspaceEdit;\n },\n enumerable: false,\n configurable: true\n });\n WorkspaceChange.prototype.getTextEditChange = function (key) {\n if (OptionalVersionedTextDocumentIdentifier.is(key)) {\n this.initDocumentChanges();\n if (this._workspaceEdit.documentChanges === undefined) {\n throw new Error('Workspace edit is not configured for document changes.');\n }\n var textDocument = { uri: key.uri, version: key.version };\n var result = this._textEditChanges[textDocument.uri];\n if (!result) {\n var edits = [];\n var textDocumentEdit = {\n textDocument: textDocument,\n edits: edits\n };\n this._workspaceEdit.documentChanges.push(textDocumentEdit);\n result = new TextEditChangeImpl(edits, this._changeAnnotations);\n this._textEditChanges[textDocument.uri] = result;\n }\n return result;\n }\n else {\n this.initChanges();\n if (this._workspaceEdit.changes === undefined) {\n throw new Error('Workspace edit is not configured for normal text edit changes.');\n }\n var result = this._textEditChanges[key];\n if (!result) {\n var edits = [];\n this._workspaceEdit.changes[key] = edits;\n result = new TextEditChangeImpl(edits);\n this._textEditChanges[key] = result;\n }\n return result;\n }\n };\n WorkspaceChange.prototype.initDocumentChanges = function () {\n if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) {\n this._changeAnnotations = new ChangeAnnotations();\n this._workspaceEdit.documentChanges = [];\n this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();\n }\n };\n WorkspaceChange.prototype.initChanges = function () {\n if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) {\n this._workspaceEdit.changes = Object.create(null);\n }\n };\n WorkspaceChange.prototype.createFile = function (uri, optionsOrAnnotation, options) {\n this.initDocumentChanges();\n if (this._workspaceEdit.documentChanges === undefined) {\n throw new Error('Workspace edit is not configured for document changes.');\n }\n var annotation;\n if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {\n annotation = optionsOrAnnotation;\n }\n else {\n options = optionsOrAnnotation;\n }\n var operation;\n var id;\n if (annotation === undefined) {\n operation = CreateFile.create(uri, options);\n }\n else {\n id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);\n operation = CreateFile.create(uri, options, id);\n }\n this._workspaceEdit.documentChanges.push(operation);\n if (id !== undefined) {\n return id;\n }\n };\n WorkspaceChange.prototype.renameFile = function (oldUri, newUri, optionsOrAnnotation, options) {\n this.initDocumentChanges();\n if (this._workspaceEdit.documentChanges === undefined) {\n throw new Error('Workspace edit is not configured for document changes.');\n }\n var annotation;\n if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {\n annotation = optionsOrAnnotation;\n }\n else {\n options = optionsOrAnnotation;\n }\n var operation;\n var id;\n if (annotation === undefined) {\n operation = RenameFile.create(oldUri, newUri, options);\n }\n else {\n id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);\n operation = RenameFile.create(oldUri, newUri, options, id);\n }\n this._workspaceEdit.documentChanges.push(operation);\n if (id !== undefined) {\n return id;\n }\n };\n WorkspaceChange.prototype.deleteFile = function (uri, optionsOrAnnotation, options) {\n this.initDocumentChanges();\n if (this._workspaceEdit.documentChanges === undefined) {\n throw new Error('Workspace edit is not configured for document changes.');\n }\n var annotation;\n if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {\n annotation = optionsOrAnnotation;\n }\n else {\n options = optionsOrAnnotation;\n }\n var operation;\n var id;\n if (annotation === undefined) {\n operation = DeleteFile.create(uri, options);\n }\n else {\n id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);\n operation = DeleteFile.create(uri, options, id);\n }\n this._workspaceEdit.documentChanges.push(operation);\n if (id !== undefined) {\n return id;\n }\n };\n return WorkspaceChange;\n}());\nexport { WorkspaceChange };\n/**\n * The TextDocumentIdentifier namespace provides helper functions to work with\n * {@link TextDocumentIdentifier} literals.\n */\nexport var TextDocumentIdentifier;\n(function (TextDocumentIdentifier) {\n /**\n * Creates a new TextDocumentIdentifier literal.\n * @param uri The document's uri.\n */\n function create(uri) {\n return { uri: uri };\n }\n TextDocumentIdentifier.create = create;\n /**\n * Checks whether the given literal conforms to the {@link TextDocumentIdentifier} interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Is.string(candidate.uri);\n }\n TextDocumentIdentifier.is = is;\n})(TextDocumentIdentifier || (TextDocumentIdentifier = {}));\n/**\n * The VersionedTextDocumentIdentifier namespace provides helper functions to work with\n * {@link VersionedTextDocumentIdentifier} literals.\n */\nexport var VersionedTextDocumentIdentifier;\n(function (VersionedTextDocumentIdentifier) {\n /**\n * Creates a new VersionedTextDocumentIdentifier literal.\n * @param uri The document's uri.\n * @param version The document's version.\n */\n function create(uri, version) {\n return { uri: uri, version: version };\n }\n VersionedTextDocumentIdentifier.create = create;\n /**\n * Checks whether the given literal conforms to the {@link VersionedTextDocumentIdentifier} interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Is.string(candidate.uri) && Is.integer(candidate.version);\n }\n VersionedTextDocumentIdentifier.is = is;\n})(VersionedTextDocumentIdentifier || (VersionedTextDocumentIdentifier = {}));\n/**\n * The OptionalVersionedTextDocumentIdentifier namespace provides helper functions to work with\n * {@link OptionalVersionedTextDocumentIdentifier} literals.\n */\nexport var OptionalVersionedTextDocumentIdentifier;\n(function (OptionalVersionedTextDocumentIdentifier) {\n /**\n * Creates a new OptionalVersionedTextDocumentIdentifier literal.\n * @param uri The document's uri.\n * @param version The document's version.\n */\n function create(uri, version) {\n return { uri: uri, version: version };\n }\n OptionalVersionedTextDocumentIdentifier.create = create;\n /**\n * Checks whether the given literal conforms to the {@link OptionalVersionedTextDocumentIdentifier} interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.integer(candidate.version));\n }\n OptionalVersionedTextDocumentIdentifier.is = is;\n})(OptionalVersionedTextDocumentIdentifier || (OptionalVersionedTextDocumentIdentifier = {}));\n/**\n * The TextDocumentItem namespace provides helper functions to work with\n * {@link TextDocumentItem} literals.\n */\nexport var TextDocumentItem;\n(function (TextDocumentItem) {\n /**\n * Creates a new TextDocumentItem literal.\n * @param uri The document's uri.\n * @param languageId The document's language identifier.\n * @param version The document's version number.\n * @param text The document's text.\n */\n function create(uri, languageId, version, text) {\n return { uri: uri, languageId: languageId, version: version, text: text };\n }\n TextDocumentItem.create = create;\n /**\n * Checks whether the given literal conforms to the {@link TextDocumentItem} interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.integer(candidate.version) && Is.string(candidate.text);\n }\n TextDocumentItem.is = is;\n})(TextDocumentItem || (TextDocumentItem = {}));\n/**\n * Describes the content type that a client supports in various\n * result literals like `Hover`, `ParameterInfo` or `CompletionItem`.\n *\n * Please note that `MarkupKinds` must not start with a `$`. This kinds\n * are reserved for internal usage.\n */\nexport var MarkupKind;\n(function (MarkupKind) {\n /**\n * Plain text is supported as a content format\n */\n MarkupKind.PlainText = 'plaintext';\n /**\n * Markdown is supported as a content format\n */\n MarkupKind.Markdown = 'markdown';\n /**\n * Checks whether the given value is a value of the {@link MarkupKind} type.\n */\n function is(value) {\n var candidate = value;\n return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown;\n }\n MarkupKind.is = is;\n})(MarkupKind || (MarkupKind = {}));\nexport var MarkupContent;\n(function (MarkupContent) {\n /**\n * Checks whether the given value conforms to the {@link MarkupContent} interface.\n */\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);\n }\n MarkupContent.is = is;\n})(MarkupContent || (MarkupContent = {}));\n/**\n * The kind of a completion entry.\n */\nexport var CompletionItemKind;\n(function (CompletionItemKind) {\n CompletionItemKind.Text = 1;\n CompletionItemKind.Method = 2;\n CompletionItemKind.Function = 3;\n CompletionItemKind.Constructor = 4;\n CompletionItemKind.Field = 5;\n CompletionItemKind.Variable = 6;\n CompletionItemKind.Class = 7;\n CompletionItemKind.Interface = 8;\n CompletionItemKind.Module = 9;\n CompletionItemKind.Property = 10;\n CompletionItemKind.Unit = 11;\n CompletionItemKind.Value = 12;\n CompletionItemKind.Enum = 13;\n CompletionItemKind.Keyword = 14;\n CompletionItemKind.Snippet = 15;\n CompletionItemKind.Color = 16;\n CompletionItemKind.File = 17;\n CompletionItemKind.Reference = 18;\n CompletionItemKind.Folder = 19;\n CompletionItemKind.EnumMember = 20;\n CompletionItemKind.Constant = 21;\n CompletionItemKind.Struct = 22;\n CompletionItemKind.Event = 23;\n CompletionItemKind.Operator = 24;\n CompletionItemKind.TypeParameter = 25;\n})(CompletionItemKind || (CompletionItemKind = {}));\n/**\n * Defines whether the insert text in a completion item should be interpreted as\n * plain text or a snippet.\n */\nexport var InsertTextFormat;\n(function (InsertTextFormat) {\n /**\n * The primary text to be inserted is treated as a plain string.\n */\n InsertTextFormat.PlainText = 1;\n /**\n * The primary text to be inserted is treated as a snippet.\n *\n * A snippet can define tab stops and placeholders with `$1`, `$2`\n * and `${3:foo}`. `$0` defines the final tab stop, it defaults to\n * the end of the snippet. Placeholders with equal identifiers are linked,\n * that is typing in one will update others too.\n *\n * See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax\n */\n InsertTextFormat.Snippet = 2;\n})(InsertTextFormat || (InsertTextFormat = {}));\n/**\n * Completion item tags are extra annotations that tweak the rendering of a completion\n * item.\n *\n * @since 3.15.0\n */\nexport var CompletionItemTag;\n(function (CompletionItemTag) {\n /**\n * Render a completion as obsolete, usually using a strike-out.\n */\n CompletionItemTag.Deprecated = 1;\n})(CompletionItemTag || (CompletionItemTag = {}));\n/**\n * The InsertReplaceEdit namespace provides functions to deal with insert / replace edits.\n *\n * @since 3.16.0\n */\nexport var InsertReplaceEdit;\n(function (InsertReplaceEdit) {\n /**\n * Creates a new insert / replace edit\n */\n function create(newText, insert, replace) {\n return { newText: newText, insert: insert, replace: replace };\n }\n InsertReplaceEdit.create = create;\n /**\n * Checks whether the given literal conforms to the {@link InsertReplaceEdit} interface.\n */\n function is(value) {\n var candidate = value;\n return candidate && Is.string(candidate.newText) && Range.is(candidate.insert) && Range.is(candidate.replace);\n }\n InsertReplaceEdit.is = is;\n})(InsertReplaceEdit || (InsertReplaceEdit = {}));\n/**\n * How whitespace and indentation is handled during completion\n * item insertion.\n *\n * @since 3.16.0\n */\nexport var InsertTextMode;\n(function (InsertTextMode) {\n /**\n * The insertion or replace strings is taken as it is. If the\n * value is multi line the lines below the cursor will be\n * inserted using the indentation defined in the string value.\n * The client will not apply any kind of adjustments to the\n * string.\n */\n InsertTextMode.asIs = 1;\n /**\n * The editor adjusts leading whitespace of new lines so that\n * they match the indentation up to the cursor of the line for\n * which the item is accepted.\n *\n * Consider a line like this: <2tabs><cursor><3tabs>foo. Accepting a\n * multi line completion item is indented using 2 tabs and all\n * following lines inserted will be indented using 2 tabs as well.\n */\n InsertTextMode.adjustIndentation = 2;\n})(InsertTextMode || (InsertTextMode = {}));\nexport var CompletionItemLabelDetails;\n(function (CompletionItemLabelDetails) {\n function is(value) {\n var candidate = value;\n return candidate && (Is.string(candidate.detail) || candidate.detail === undefined) &&\n (Is.string(candidate.description) || candidate.description === undefined);\n }\n CompletionItemLabelDetails.is = is;\n})(CompletionItemLabelDetails || (CompletionItemLabelDetails = {}));\n/**\n * The CompletionItem namespace provides functions to deal with\n * completion items.\n */\nexport var CompletionItem;\n(function (CompletionItem) {\n /**\n * Create a completion item and seed it with a label.\n * @param label The completion item's label\n */\n function create(label) {\n return { label: label };\n }\n CompletionItem.create = create;\n})(CompletionItem || (CompletionItem = {}));\n/**\n * The CompletionList namespace provides functions to deal with\n * completion lists.\n */\nexport var CompletionList;\n(function (CompletionList) {\n /**\n * Creates a new completion list.\n *\n * @param items The completion items.\n * @param isIncomplete The list is not complete.\n */\n function create(items, isIncomplete) {\n return { items: items ? items : [], isIncomplete: !!isIncomplete };\n }\n CompletionList.create = create;\n})(CompletionList || (CompletionList = {}));\nexport var MarkedString;\n(function (MarkedString) {\n /**\n * Creates a marked string from plain text.\n *\n * @param plainText The plain text.\n */\n function fromPlainText(plainText) {\n return plainText.replace(/[\\\\`*_{}[\\]()#+\\-.!]/g, '\\\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash\n }\n MarkedString.fromPlainText = fromPlainText;\n /**\n * Checks whether the given value conforms to the {@link MarkedString} type.\n */\n function is(value) {\n var candidate = value;\n return Is.string(candidate) || (Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value));\n }\n MarkedString.is = is;\n})(MarkedString || (MarkedString = {}));\nexport var Hover;\n(function (Hover) {\n /**\n * Checks whether the given value conforms to the {@link Hover} interface.\n */\n function is(value) {\n var candidate = value;\n return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) ||\n MarkedString.is(candidate.contents) ||\n Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === undefined || Range.is(value.range));\n }\n Hover.is = is;\n})(Hover || (Hover = {}));\n/**\n * The ParameterInformation namespace provides helper functions to work with\n * {@link ParameterInformation} literals.\n */\nexport var ParameterInformation;\n(function (ParameterInformation) {\n /**\n * Creates a new parameter information literal.\n *\n * @param label A label string.\n * @param documentation A doc string.\n */\n function create(label, documentation) {\n return documentation ? { label: label, documentation: documentation } : { label: label };\n }\n ParameterInformation.create = create;\n})(ParameterInformation || (ParameterInformation = {}));\n/**\n * The SignatureInformation namespace provides helper functions to work with\n * {@link SignatureInformation} literals.\n */\nexport var SignatureInformation;\n(function (SignatureInformation) {\n function create(label, documentation) {\n var parameters = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n parameters[_i - 2] = arguments[_i];\n }\n var result = { label: label };\n if (Is.defined(documentation)) {\n result.documentation = documentation;\n }\n if (Is.defined(parameters)) {\n result.parameters = parameters;\n }\n else {\n result.parameters = [];\n }\n return result;\n }\n SignatureInformation.create = create;\n})(SignatureInformation || (SignatureInformation = {}));\n/**\n * A document highlight kind.\n */\nexport var DocumentHighlightKind;\n(function (DocumentHighlightKind) {\n /**\n * A textual occurrence.\n */\n DocumentHighlightKind.Text = 1;\n /**\n * Read-access of a symbol, like reading a variable.\n */\n DocumentHighlightKind.Read = 2;\n /**\n * Write-access of a symbol, like writing to a variable.\n */\n DocumentHighlightKind.Write = 3;\n})(DocumentHighlightKind || (DocumentHighlightKind = {}));\n/**\n * DocumentHighlight namespace to provide helper functions to work with\n * {@link DocumentHighlight} literals.\n */\nexport var DocumentHighlight;\n(function (DocumentHighlight) {\n /**\n * Create a DocumentHighlight object.\n * @param range The range the highlight applies to.\n * @param kind The highlight kind\n */\n function create(range, kind) {\n var result = { range: range };\n if (Is.number(kind)) {\n result.kind = kind;\n }\n return result;\n }\n DocumentHighlight.create = create;\n})(DocumentHighlight || (DocumentHighlight = {}));\n/**\n * A symbol kind.\n */\nexport var SymbolKind;\n(function (SymbolKind) {\n SymbolKind.File = 1;\n SymbolKind.Module = 2;\n SymbolKind.Namespace = 3;\n SymbolKind.Package = 4;\n SymbolKind.Class = 5;\n SymbolKind.Method = 6;\n SymbolKind.Property = 7;\n SymbolKind.Field = 8;\n SymbolKind.Constructor = 9;\n SymbolKind.Enum = 10;\n SymbolKind.Interface = 11;\n SymbolKind.Function = 12;\n SymbolKind.Variable = 13;\n SymbolKind.Constant = 14;\n SymbolKind.String = 15;\n SymbolKind.Number = 16;\n SymbolKind.Boolean = 17;\n SymbolKind.Array = 18;\n SymbolKind.Object = 19;\n SymbolKind.Key = 20;\n SymbolKind.Null = 21;\n SymbolKind.EnumMember = 22;\n SymbolKind.Struct = 23;\n SymbolKind.Event = 24;\n SymbolKind.Operator = 25;\n SymbolKind.TypeParameter = 26;\n})(SymbolKind || (SymbolKind = {}));\n/**\n * Symbol tags are extra annotations that tweak the rendering of a symbol.\n *\n * @since 3.16\n */\nexport var SymbolTag;\n(function (SymbolTag) {\n /**\n * Render a symbol as obsolete, usually using a strike-out.\n */\n SymbolTag.Deprecated = 1;\n})(SymbolTag || (SymbolTag = {}));\nexport var SymbolInformation;\n(function (SymbolInformation) {\n /**\n * Creates a new symbol information literal.\n *\n * @param name The name of the symbol.\n * @param kind The kind of the symbol.\n * @param range The range of the location of the symbol.\n * @param uri The resource of the location of symbol.\n * @param containerName The name of the symbol containing the symbol.\n */\n function create(name, kind, range, uri, containerName) {\n var result = {\n name: name,\n kind: kind,\n location: { uri: uri, range: range }\n };\n if (containerName) {\n result.containerName = containerName;\n }\n return result;\n }\n SymbolInformation.create = create;\n})(SymbolInformation || (SymbolInformation = {}));\nexport var WorkspaceSymbol;\n(function (WorkspaceSymbol) {\n /**\n * Create a new workspace symbol.\n *\n * @param name The name of the symbol.\n * @param kind The kind of the symbol.\n * @param uri The resource of the location of the symbol.\n * @param range An options range of the location.\n * @returns A WorkspaceSymbol.\n */\n function create(name, kind, uri, range) {\n return range !== undefined\n ? { name: name, kind: kind, location: { uri: uri, range: range } }\n : { name: name, kind: kind, location: { uri: uri } };\n }\n WorkspaceSymbol.create = create;\n})(WorkspaceSymbol || (WorkspaceSymbol = {}));\nexport var DocumentSymbol;\n(function (DocumentSymbol) {\n /**\n * Creates a new symbol information literal.\n *\n * @param name The name of the symbol.\n * @param detail The detail of the symbol.\n * @param kind The kind of the symbol.\n * @param range The range of the symbol.\n * @param selectionRange The selectionRange of the symbol.\n * @param children Children of the symbol.\n */\n function create(name, detail, kind, range, selectionRange, children) {\n var result = {\n name: name,\n detail: detail,\n kind: kind,\n range: range,\n selectionRange: selectionRange\n };\n if (children !== undefined) {\n result.children = children;\n }\n return result;\n }\n DocumentSymbol.create = create;\n /**\n * Checks whether the given literal conforms to the {@link DocumentSymbol} interface.\n */\n function is(value) {\n var candidate = value;\n return candidate &&\n Is.string(candidate.name) && Is.number(candidate.kind) &&\n Range.is(candidate.range) && Range.is(candidate.selectionRange) &&\n (candidate.detail === undefined || Is.string(candidate.detail)) &&\n (candidate.deprecated === undefined || Is.boolean(candidate.deprecated)) &&\n (candidate.children === undefined || Array.isArray(candidate.children)) &&\n (candidate.tags === undefined || Array.isArray(candidate.tags));\n }\n DocumentSymbol.is = is;\n})(DocumentSymbol || (DocumentSymbol = {}));\n/**\n * A set of predefined code action kinds\n */\nexport var CodeActionKind;\n(function (CodeActionKind) {\n /**\n * Empty kind.\n */\n CodeActionKind.Empty = '';\n /**\n * Base kind for quickfix actions: 'quickfix'\n */\n CodeActionKind.QuickFix = 'quickfix';\n /**\n * Base kind for refactoring actions: 'refactor'\n */\n CodeActionKind.Refactor = 'refactor';\n /**\n * Base kind for refactoring extraction actions: 'refactor.extract'\n *\n * Example extract actions:\n *\n * - Extract method\n * - Extract function\n * - Extract variable\n * - Extract interface from class\n * - ...\n */\n CodeActionKind.RefactorExtract = 'refactor.extract';\n /**\n * Base kind for refactoring inline actions: 'refactor.inline'\n *\n * Example inline actions:\n *\n * - Inline function\n * - Inline variable\n * - Inline constant\n * - ...\n */\n CodeActionKind.RefactorInline = 'refactor.inline';\n /**\n * Base kind for refactoring rewrite actions: 'refactor.rewrite'\n *\n * Example rewrite actions:\n *\n * - Convert JavaScript function to class\n * - Add or remove parameter\n * - Encapsulate field\n * - Make method static\n * - Move method to base class\n * - ...\n */\n CodeActionKind.RefactorRewrite = 'refactor.rewrite';\n /**\n * Base kind for source actions: `source`\n *\n * Source code actions apply to the entire file.\n */\n CodeActionKind.Source = 'source';\n /**\n * Base kind for an organize imports source action: `source.organizeImports`\n */\n CodeActionKind.SourceOrganizeImports = 'source.organizeImports';\n /**\n * Base kind for auto-fix source actions: `source.fixAll`.\n *\n * Fix all actions automatically fix errors that have a clear fix that do not require user input.\n * They should not suppress errors or perform unsafe fixes such as generating new types or classes.\n *\n * @since 3.15.0\n */\n CodeActionKind.SourceFixAll = 'source.fixAll';\n})(CodeActionKind || (CodeActionKind = {}));\n/**\n * The reason why code actions were requested.\n *\n * @since 3.17.0\n */\nexport var CodeActionTriggerKind;\n(function (CodeActionTriggerKind) {\n /**\n * Code actions were explicitly requested by the user or by an extension.\n */\n CodeActionTriggerKind.Invoked = 1;\n /**\n * Code actions were requested automatically.\n *\n * This typically happens when current selection in a file changes, but can\n * also be triggered when file content changes.\n */\n CodeActionTriggerKind.Automatic = 2;\n})(CodeActionTriggerKind || (CodeActionTriggerKind = {}));\n/**\n * The CodeActionContext namespace provides helper functions to work with\n * {@link CodeActionContext} literals.\n */\nexport var CodeActionContext;\n(function (CodeActionContext) {\n /**\n * Creates a new CodeActionContext literal.\n */\n function create(diagnostics, only, triggerKind) {\n var result = { diagnostics: diagnostics };\n if (only !== undefined && only !== null) {\n result.only = only;\n }\n if (triggerKind !== undefined && triggerKind !== null) {\n result.triggerKind = triggerKind;\n }\n return result;\n }\n CodeActionContext.create = create;\n /**\n * Checks whether the given literal conforms to the {@link CodeActionContext} interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is)\n && (candidate.only === undefined || Is.typedArray(candidate.only, Is.string))\n && (candidate.triggerKind === undefined || candidate.triggerKind === CodeActionTriggerKind.Invoked || candidate.triggerKind === CodeActionTriggerKind.Automatic);\n }\n CodeActionContext.is = is;\n})(CodeActionContext || (CodeActionContext = {}));\nexport var CodeAction;\n(function (CodeAction) {\n function create(title, kindOrCommandOrEdit, kind) {\n var result = { title: title };\n var checkKind = true;\n if (typeof kindOrCommandOrEdit === 'string') {\n checkKind = false;\n result.kind = kindOrCommandOrEdit;\n }\n else if (Command.is(kindOrCommandOrEdit)) {\n result.command = kindOrCommandOrEdit;\n }\n else {\n result.edit = kindOrCommandOrEdit;\n }\n if (checkKind && kind !== undefined) {\n result.kind = kind;\n }\n return result;\n }\n CodeAction.create = create;\n function is(value) {\n var candidate = value;\n return candidate && Is.string(candidate.title) &&\n (candidate.diagnostics === undefined || Is.typedArray(candidate.diagnostics, Diagnostic.is)) &&\n (candidate.kind === undefined || Is.string(candidate.kind)) &&\n (candidate.edit !== undefined || candidate.command !== undefined) &&\n (candidate.command === undefined || Command.is(candidate.command)) &&\n (candidate.isPreferred === undefined || Is.boolean(candidate.isPreferred)) &&\n (candidate.edit === undefined || WorkspaceEdit.is(candidate.edit));\n }\n CodeAction.is = is;\n})(CodeAction || (CodeAction = {}));\n/**\n * The CodeLens namespace provides helper functions to work with\n * {@link CodeLens} literals.\n */\nexport var CodeLens;\n(function (CodeLens) {\n /**\n * Creates a new CodeLens literal.\n */\n function create(range, data) {\n var result = { range: range };\n if (Is.defined(data)) {\n result.data = data;\n }\n return result;\n }\n CodeLens.create = create;\n /**\n * Checks whether the given literal conforms to the {@link CodeLens} interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command));\n }\n CodeLens.is = is;\n})(CodeLens || (CodeLens = {}));\n/**\n * The FormattingOptions namespace provides helper functions to work with\n * {@link FormattingOptions} literals.\n */\nexport var FormattingOptions;\n(function (FormattingOptions) {\n /**\n * Creates a new FormattingOptions literal.\n */\n function create(tabSize, insertSpaces) {\n return { tabSize: tabSize, insertSpaces: insertSpaces };\n }\n FormattingOptions.create = create;\n /**\n * Checks whether the given literal conforms to the {@link FormattingOptions} interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Is.uinteger(candidate.tabSize) && Is.boolean(candidate.insertSpaces);\n }\n FormattingOptions.is = is;\n})(FormattingOptions || (FormattingOptions = {}));\n/**\n * The DocumentLink namespace provides helper functions to work with\n * {@link DocumentLink} literals.\n */\nexport var DocumentLink;\n(function (DocumentLink) {\n /**\n * Creates a new DocumentLink literal.\n */\n function create(range, target, data) {\n return { range: range, target: target, data: data };\n }\n DocumentLink.create = create;\n /**\n * Checks whether the given literal conforms to the {@link DocumentLink} interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target));\n }\n DocumentLink.is = is;\n})(DocumentLink || (DocumentLink = {}));\n/**\n * The SelectionRange namespace provides helper function to work with\n * SelectionRange literals.\n */\nexport var SelectionRange;\n(function (SelectionRange) {\n /**\n * Creates a new SelectionRange\n * @param range the range.\n * @param parent an optional parent.\n */\n function create(range, parent) {\n return { range: range, parent: parent };\n }\n SelectionRange.create = create;\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate) && Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent));\n }\n SelectionRange.is = is;\n})(SelectionRange || (SelectionRange = {}));\n/**\n * A set of predefined token types. This set is not fixed\n * an clients can specify additional token types via the\n * corresponding client capabilities.\n *\n * @since 3.16.0\n */\nexport var SemanticTokenTypes;\n(function (SemanticTokenTypes) {\n SemanticTokenTypes[\"namespace\"] = \"namespace\";\n /**\n * Represents a generic type. Acts as a fallback for types which can't be mapped to\n * a specific type like class or enum.\n */\n SemanticTokenTypes[\"type\"] = \"type\";\n SemanticTokenTypes[\"class\"] = \"class\";\n SemanticTokenTypes[\"enum\"] = \"enum\";\n SemanticTokenTypes[\"interface\"] = \"interface\";\n SemanticTokenTypes[\"struct\"] = \"struct\";\n SemanticTokenTypes[\"typeParameter\"] = \"typeParameter\";\n SemanticTokenTypes[\"parameter\"] = \"parameter\";\n SemanticTokenTypes[\"variable\"] = \"variable\";\n SemanticTokenTypes[\"property\"] = \"property\";\n SemanticTokenTypes[\"enumMember\"] = \"enumMember\";\n SemanticTokenTypes[\"event\"] = \"event\";\n SemanticTokenTypes[\"function\"] = \"function\";\n SemanticTokenTypes[\"method\"] = \"method\";\n SemanticTokenTypes[\"macro\"] = \"macro\";\n SemanticTokenTypes[\"keyword\"] = \"keyword\";\n SemanticTokenTypes[\"modifier\"] = \"modifier\";\n SemanticTokenTypes[\"comment\"] = \"comment\";\n SemanticTokenTypes[\"string\"] = \"string\";\n SemanticTokenTypes[\"number\"] = \"number\";\n SemanticTokenTypes[\"regexp\"] = \"regexp\";\n SemanticTokenTypes[\"operator\"] = \"operator\";\n /**\n * @since 3.17.0\n */\n SemanticTokenTypes[\"decorator\"] = \"decorator\";\n})(SemanticTokenTypes || (SemanticTokenTypes = {}));\n/**\n * A set of predefined token modifiers. This set is not fixed\n * an clients can specify additional token types via the\n * corresponding client capabilities.\n *\n * @since 3.16.0\n */\nexport var SemanticTokenModifiers;\n(function (SemanticTokenModifiers) {\n SemanticTokenModifiers[\"declaration\"] = \"declaration\";\n SemanticTokenModifiers[\"definition\"] = \"definition\";\n SemanticTokenModifiers[\"readonly\"] = \"readonly\";\n SemanticTokenModifiers[\"static\"] = \"static\";\n SemanticTokenModifiers[\"deprecated\"] = \"deprecated\";\n SemanticTokenModifiers[\"abstract\"] = \"abstract\";\n SemanticTokenModifiers[\"async\"] = \"async\";\n SemanticTokenModifiers[\"modification\"] = \"modification\";\n SemanticTokenModifiers[\"documentation\"] = \"documentation\";\n SemanticTokenModifiers[\"defaultLibrary\"] = \"defaultLibrary\";\n})(SemanticTokenModifiers || (SemanticTokenModifiers = {}));\n/**\n * @since 3.16.0\n */\nexport var SemanticTokens;\n(function (SemanticTokens) {\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate) && (candidate.resultId === undefined || typeof candidate.resultId === 'string') &&\n Array.isArray(candidate.data) && (candidate.data.length === 0 || typeof candidate.data[0] === 'number');\n }\n SemanticTokens.is = is;\n})(SemanticTokens || (SemanticTokens = {}));\n/**\n * The InlineValueText namespace provides functions to deal with InlineValueTexts.\n *\n * @since 3.17.0\n */\nexport var InlineValueText;\n(function (InlineValueText) {\n /**\n * Creates a new InlineValueText literal.\n */\n function create(range, text) {\n return { range: range, text: text };\n }\n InlineValueText.create = create;\n function is(value) {\n var candidate = value;\n return candidate !== undefined && candidate !== null && Range.is(candidate.range) && Is.string(candidate.text);\n }\n InlineValueText.is = is;\n})(InlineValueText || (InlineValueText = {}));\n/**\n * The InlineValueVariableLookup namespace provides functions to deal with InlineValueVariableLookups.\n *\n * @since 3.17.0\n */\nexport var InlineValueVariableLookup;\n(function (InlineValueVariableLookup) {\n /**\n * Creates a new InlineValueText literal.\n */\n function create(range, variableName, caseSensitiveLookup) {\n return { range: range, variableName: variableName, caseSensitiveLookup: caseSensitiveLookup };\n }\n InlineValueVariableLookup.create = create;\n function is(value) {\n var candidate = value;\n return candidate !== undefined && candidate !== null && Range.is(candidate.range) && Is.boolean(candidate.caseSensitiveLookup)\n && (Is.string(candidate.variableName) || candidate.variableName === undefined);\n }\n InlineValueVariableLookup.is = is;\n})(InlineValueVariableLookup || (InlineValueVariableLookup = {}));\n/**\n * The InlineValueEvaluatableExpression namespace provides functions to deal with InlineValueEvaluatableExpression.\n *\n * @since 3.17.0\n */\nexport var InlineValueEvaluatableExpression;\n(function (InlineValueEvaluatableExpression) {\n /**\n * Creates a new InlineValueEvaluatableExpression literal.\n */\n function create(range, expression) {\n return { range: range, expression: expression };\n }\n InlineValueEvaluatableExpression.create = create;\n function is(value) {\n var candidate = value;\n return candidate !== undefined && candidate !== null && Range.is(candidate.range)\n && (Is.string(candidate.expression) || candidate.expression === undefined);\n }\n InlineValueEvaluatableExpression.is = is;\n})(InlineValueEvaluatableExpression || (InlineValueEvaluatableExpression = {}));\n/**\n * The InlineValueContext namespace provides helper functions to work with\n * {@link InlineValueContext} literals.\n *\n * @since 3.17.0\n */\nexport var InlineValueContext;\n(function (InlineValueContext) {\n /**\n * Creates a new InlineValueContext literal.\n */\n function create(frameId, stoppedLocation) {\n return { frameId: frameId, stoppedLocation: stoppedLocation };\n }\n InlineValueContext.create = create;\n /**\n * Checks whether the given literal conforms to the {@link InlineValueContext} interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Range.is(value.stoppedLocation);\n }\n InlineValueContext.is = is;\n})(InlineValueContext || (InlineValueContext = {}));\n/**\n * Inlay hint kinds.\n *\n * @since 3.17.0\n */\nexport var InlayHintKind;\n(function (InlayHintKind) {\n /**\n * An inlay hint that for a type annotation.\n */\n InlayHintKind.Type = 1;\n /**\n * An inlay hint that is for a parameter.\n */\n InlayHintKind.Parameter = 2;\n function is(value) {\n return value === 1 || value === 2;\n }\n InlayHintKind.is = is;\n})(InlayHintKind || (InlayHintKind = {}));\nexport var InlayHintLabelPart;\n(function (InlayHintLabelPart) {\n function create(value) {\n return { value: value };\n }\n InlayHintLabelPart.create = create;\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate)\n && (candidate.tooltip === undefined || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip))\n && (candidate.location === undefined || Location.is(candidate.location))\n && (candidate.command === undefined || Command.is(candidate.command));\n }\n InlayHintLabelPart.is = is;\n})(InlayHintLabelPart || (InlayHintLabelPart = {}));\nexport var InlayHint;\n(function (InlayHint) {\n function create(position, label, kind) {\n var result = { position: position, label: label };\n if (kind !== undefined) {\n result.kind = kind;\n }\n return result;\n }\n InlayHint.create = create;\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate) && Position.is(candidate.position)\n && (Is.string(candidate.label) || Is.typedArray(candidate.label, InlayHintLabelPart.is))\n && (candidate.kind === undefined || InlayHintKind.is(candidate.kind))\n && (candidate.textEdits === undefined) || Is.typedArray(candidate.textEdits, TextEdit.is)\n && (candidate.tooltip === undefined || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip))\n && (candidate.paddingLeft === undefined || Is.boolean(candidate.paddingLeft))\n && (candidate.paddingRight === undefined || Is.boolean(candidate.paddingRight));\n }\n InlayHint.is = is;\n})(InlayHint || (InlayHint = {}));\nexport var WorkspaceFolder;\n(function (WorkspaceFolder) {\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate) && URI.is(candidate.uri) && Is.string(candidate.name);\n }\n WorkspaceFolder.is = is;\n})(WorkspaceFolder || (WorkspaceFolder = {}));\nexport var EOL = ['\\n', '\\r\\n', '\\r'];\n/**\n * @deprecated Use the text document from the new vscode-languageserver-textdocument package.\n */\nexport var TextDocument;\n(function (TextDocument) {\n /**\n * Creates a new ITextDocument literal from the given uri and content.\n * @param uri The document's uri.\n * @param languageId The document's language Id.\n * @param version The document's version.\n * @param content The document's content.\n */\n function create(uri, languageId, version, content) {\n return new FullTextDocument(uri, languageId, version, content);\n }\n TextDocument.create = create;\n /**\n * Checks whether the given literal conforms to the {@link ITextDocument} interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.uinteger(candidate.lineCount)\n && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false;\n }\n TextDocument.is = is;\n function applyEdits(document, edits) {\n var text = document.getText();\n var sortedEdits = mergeSort(edits, function (a, b) {\n var diff = a.range.start.line - b.range.start.line;\n if (diff === 0) {\n return a.range.start.character - b.range.start.character;\n }\n return diff;\n });\n var lastModifiedOffset = text.length;\n for (var i = sortedEdits.length - 1; i >= 0; i--) {\n var e = sortedEdits[i];\n var startOffset = document.offsetAt(e.range.start);\n var endOffset = document.offsetAt(e.range.end);\n if (endOffset <= lastModifiedOffset) {\n text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length);\n }\n else {\n throw new Error('Overlapping edit');\n }\n lastModifiedOffset = startOffset;\n }\n return text;\n }\n TextDocument.applyEdits = applyEdits;\n function mergeSort(data, compare) {\n if (data.length <= 1) {\n // sorted\n return data;\n }\n var p = (data.length / 2) | 0;\n var left = data.slice(0, p);\n var right = data.slice(p);\n mergeSort(left, compare);\n mergeSort(right, compare);\n var leftIdx = 0;\n var rightIdx = 0;\n var i = 0;\n while (leftIdx < left.length && rightIdx < right.length) {\n var ret = compare(left[leftIdx], right[rightIdx]);\n if (ret <= 0) {\n // smaller_equal -> take left to preserve order\n data[i++] = left[leftIdx++];\n }\n else {\n // greater -> take right\n data[i++] = right[rightIdx++];\n }\n }\n while (leftIdx < left.length) {\n data[i++] = left[leftIdx++];\n }\n while (rightIdx < right.length) {\n data[i++] = right[rightIdx++];\n }\n return data;\n }\n})(TextDocument || (TextDocument = {}));\n/**\n * @deprecated Use the text document from the new vscode-languageserver-textdocument package.\n */\nvar FullTextDocument = /** @class */ (function () {\n function FullTextDocument(uri, languageId, version, content) {\n this._uri = uri;\n this._languageId = languageId;\n this._version = version;\n this._content = content;\n this._lineOffsets = undefined;\n }\n Object.defineProperty(FullTextDocument.prototype, \"uri\", {\n get: function () {\n return this._uri;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(FullTextDocument.prototype, \"languageId\", {\n get: function () {\n return this._languageId;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(FullTextDocument.prototype, \"version\", {\n get: function () {\n return this._version;\n },\n enumerable: false,\n configurable: true\n });\n FullTextDocument.prototype.getText = function (range) {\n if (range) {\n var start = this.offsetAt(range.start);\n var end = this.offsetAt(range.end);\n return this._content.substring(start, end);\n }\n return this._content;\n };\n FullTextDocument.prototype.update = function (event, version) {\n this._content = event.text;\n this._version = version;\n this._lineOffsets = undefined;\n };\n FullTextDocument.prototype.getLineOffsets = function () {\n if (this._lineOffsets === undefined) {\n var lineOffsets = [];\n var text = this._content;\n var isLineStart = true;\n for (var i = 0; i < text.length; i++) {\n if (isLineStart) {\n lineOffsets.push(i);\n isLineStart = false;\n }\n var ch = text.charAt(i);\n isLineStart = (ch === '\\r' || ch === '\\n');\n if (ch === '\\r' && i + 1 < text.length && text.charAt(i + 1) === '\\n') {\n i++;\n }\n }\n if (isLineStart && text.length > 0) {\n lineOffsets.push(text.length);\n }\n this._lineOffsets = lineOffsets;\n }\n return this._lineOffsets;\n };\n FullTextDocument.prototype.positionAt = function (offset) {\n offset = Math.max(Math.min(offset, this._content.length), 0);\n var lineOffsets = this.getLineOffsets();\n var low = 0, high = lineOffsets.length;\n if (high === 0) {\n return Position.create(0, offset);\n }\n while (low < high) {\n var mid = Math.floor((low + high) / 2);\n if (lineOffsets[mid] > offset) {\n high = mid;\n }\n else {\n low = mid + 1;\n }\n }\n // low is the least x for which the line offset is larger than the current offset\n // or array.length if no line offset is larger than the current offset\n var line = low - 1;\n return Position.create(line, offset - lineOffsets[line]);\n };\n FullTextDocument.prototype.offsetAt = function (position) {\n var lineOffsets = this.getLineOffsets();\n if (position.line >= lineOffsets.length) {\n return this._content.length;\n }\n else if (position.line < 0) {\n return 0;\n }\n var lineOffset = lineOffsets[position.line];\n var nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;\n return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);\n };\n Object.defineProperty(FullTextDocument.prototype, \"lineCount\", {\n get: function () {\n return this.getLineOffsets().length;\n },\n enumerable: false,\n configurable: true\n });\n return FullTextDocument;\n}());\nvar Is;\n(function (Is) {\n var toString = Object.prototype.toString;\n function defined(value) {\n return typeof value !== 'undefined';\n }\n Is.defined = defined;\n function undefined(value) {\n return typeof value === 'undefined';\n }\n Is.undefined = undefined;\n function boolean(value) {\n return value === true || value === false;\n }\n Is.boolean = boolean;\n function string(value) {\n return toString.call(value) === '[object String]';\n }\n Is.string = string;\n function number(value) {\n return toString.call(value) === '[object Number]';\n }\n Is.number = number;\n function numberRange(value, min, max) {\n return toString.call(value) === '[object Number]' && min <= value && value <= max;\n }\n Is.numberRange = numberRange;\n function integer(value) {\n return toString.call(value) === '[object Number]' && -2147483648 <= value && value <= 2147483647;\n }\n Is.integer = integer;\n function uinteger(value) {\n return toString.call(value) === '[object Number]' && 0 <= value && value <= 2147483647;\n }\n Is.uinteger = uinteger;\n function func(value) {\n return toString.call(value) === '[object Function]';\n }\n Is.func = func;\n function objectLiteral(value) {\n // Strictly speaking class instances pass this check as well. Since the LSP\n // doesn't use classes we ignore this for now. If we do we need to add something\n // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`\n return value !== null && typeof value === 'object';\n }\n Is.objectLiteral = objectLiteral;\n function typedArray(value, check) {\n return Array.isArray(value) && value.every(check);\n }\n Is.typedArray = typedArray;\n})(Is || (Is = {}));\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar _a;\nvar isWindows;\nif (typeof process === 'object') {\n isWindows = process.platform === 'win32';\n}\nelse if (typeof navigator === 'object') {\n var userAgent = navigator.userAgent;\n isWindows = userAgent.indexOf('Windows') >= 0;\n}\nfunction isHighSurrogate(charCode) {\n return (0xD800 <= charCode && charCode <= 0xDBFF);\n}\nfunction isLowSurrogate(charCode) {\n return (0xDC00 <= charCode && charCode <= 0xDFFF);\n}\nfunction isLowerAsciiHex(code) {\n return code >= 97 /* a */ && code <= 102 /* f */;\n}\nfunction isLowerAsciiLetter(code) {\n return code >= 97 /* a */ && code <= 122 /* z */;\n}\nfunction isUpperAsciiLetter(code) {\n return code >= 65 /* A */ && code <= 90 /* Z */;\n}\nfunction isAsciiLetter(code) {\n return isLowerAsciiLetter(code) || isUpperAsciiLetter(code);\n}\n//#endregion\nvar _schemePattern = /^\\w[\\w\\d+.-]*$/;\nvar _singleSlashStart = /^\\//;\nvar _doubleSlashStart = /^\\/\\//;\nfunction _validateUri(ret, _strict) {\n // scheme, must be set\n if (!ret.scheme && _strict) {\n throw new Error(\"[UriError]: Scheme is missing: {scheme: \\\"\\\", authority: \\\"\" + ret.authority + \"\\\", path: \\\"\" + ret.path + \"\\\", query: \\\"\" + ret.query + \"\\\", fragment: \\\"\" + ret.fragment + \"\\\"}\");\n }\n // scheme, https://tools.ietf.org/html/rfc3986#section-3.1\n // ALPHA *( ALPHA / DIGIT / \"+\" / \"-\" / \".\" )\n if (ret.scheme && !_schemePattern.test(ret.scheme)) {\n throw new Error('[UriError]: Scheme contains illegal characters.');\n }\n // path, http://tools.ietf.org/html/rfc3986#section-3.3\n // If a URI contains an authority component, then the path component\n // must either be empty or begin with a slash (\"/\") character. If a URI\n // does not contain an authority component, then the path cannot begin\n // with two slash characters (\"//\").\n if (ret.path) {\n if (ret.authority) {\n if (!_singleSlashStart.test(ret.path)) {\n throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash (\"/\") character');\n }\n }\n else {\n if (_doubleSlashStart.test(ret.path)) {\n throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters (\"//\")');\n }\n }\n }\n}\n// for a while we allowed uris *without* schemes and this is the migration\n// for them, e.g. an uri without scheme and without strict-mode warns and falls\n// back to the file-scheme. that should cause the least carnage and still be a\n// clear warning\nfunction _schemeFix(scheme, _strict) {\n if (!scheme && !_strict) {\n return 'file';\n }\n return scheme;\n}\n// implements a bit of https://tools.ietf.org/html/rfc3986#section-5\nfunction _referenceResolution(scheme, path) {\n // the slash-character is our 'default base' as we don't\n // support constructing URIs relative to other URIs. This\n // also means that we alter and potentially break paths.\n // see https://tools.ietf.org/html/rfc3986#section-5.1.4\n switch (scheme) {\n case 'https':\n case 'http':\n case 'file':\n if (!path) {\n path = _slash;\n }\n else if (path[0] !== _slash) {\n path = _slash + path;\n }\n break;\n }\n return path;\n}\nvar _empty = '';\nvar _slash = '/';\nvar _regexp = /^(([^:/?#]+?):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?/;\n/**\n * Uniform Resource Identifier (URI) http://tools.ietf.org/html/rfc3986.\n * This class is a simple parser which creates the basic component parts\n * (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation\n * and encoding.\n *\n * ```txt\n * foo://example.com:8042/over/there?name=ferret#nose\n * \\_/ \\______________/\\_________/ \\_________/ \\__/\n * | | | | |\n * scheme authority path query fragment\n * | _____________________|__\n * / \\ / \\\n * urn:example:animal:ferret:nose\n * ```\n */\nvar URI = /** @class */ (function () {\n /**\n * @internal\n */\n function URI(schemeOrData, authority, path, query, fragment, _strict) {\n if (_strict === void 0) { _strict = false; }\n if (typeof schemeOrData === 'object') {\n this.scheme = schemeOrData.scheme || _empty;\n this.authority = schemeOrData.authority || _empty;\n this.path = schemeOrData.path || _empty;\n this.query = schemeOrData.query || _empty;\n this.fragment = schemeOrData.fragment || _empty;\n // no validation because it's this URI\n // that creates uri components.\n // _validateUri(this);\n }\n else {\n this.scheme = _schemeFix(schemeOrData, _strict);\n this.authority = authority || _empty;\n this.path = _referenceResolution(this.scheme, path || _empty);\n this.query = query || _empty;\n this.fragment = fragment || _empty;\n _validateUri(this, _strict);\n }\n }\n URI.isUri = function (thing) {\n if (thing instanceof URI) {\n return true;\n }\n if (!thing) {\n return false;\n }\n return typeof thing.authority === 'string'\n && typeof thing.fragment === 'string'\n && typeof thing.path === 'string'\n && typeof thing.query === 'string'\n && typeof thing.scheme === 'string'\n && typeof thing.fsPath === 'function'\n && typeof thing.with === 'function'\n && typeof thing.toString === 'function';\n };\n Object.defineProperty(URI.prototype, \"fsPath\", {\n // ---- filesystem path -----------------------\n /**\n * Returns a string representing the corresponding file system path of this URI.\n * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the\n * platform specific path separator.\n *\n * * Will *not* validate the path for invalid characters and semantics.\n * * Will *not* look at the scheme of this URI.\n * * The result shall *not* be used for display purposes but for accessing a file on disk.\n *\n *\n * The *difference* to `URI#path` is the use of the platform specific separator and the handling\n * of UNC paths. See the below sample of a file-uri with an authority (UNC path).\n *\n * ```ts\n const u = URI.parse('file://server/c$/folder/file.txt')\n u.authority === 'server'\n u.path === '/shares/c$/file.txt'\n u.fsPath === '\\\\server\\c$\\folder\\file.txt'\n ```\n *\n * Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path,\n * namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working\n * with URIs that represent files on disk (`file` scheme).\n */\n get: function () {\n // if (this.scheme !== 'file') {\n // \tconsole.warn(`[UriError] calling fsPath with scheme ${this.scheme}`);\n // }\n return uriToFsPath(this, false);\n },\n enumerable: true,\n configurable: true\n });\n // ---- modify to new -------------------------\n URI.prototype.with = function (change) {\n if (!change) {\n return this;\n }\n var scheme = change.scheme, authority = change.authority, path = change.path, query = change.query, fragment = change.fragment;\n if (scheme === undefined) {\n scheme = this.scheme;\n }\n else if (scheme === null) {\n scheme = _empty;\n }\n if (authority === undefined) {\n authority = this.authority;\n }\n else if (authority === null) {\n authority = _empty;\n }\n if (path === undefined) {\n path = this.path;\n }\n else if (path === null) {\n path = _empty;\n }\n if (query === undefined) {\n query = this.query;\n }\n else if (query === null) {\n query = _empty;\n }\n if (fragment === undefined) {\n fragment = this.fragment;\n }\n else if (fragment === null) {\n fragment = _empty;\n }\n if (scheme === this.scheme\n && authority === this.authority\n && path === this.path\n && query === this.query\n && fragment === this.fragment) {\n return this;\n }\n return new _URI(scheme, authority, path, query, fragment);\n };\n // ---- parse & validate ------------------------\n /**\n * Creates a new URI from a string, e.g. `http://www.msft.com/some/path`,\n * `file:///usr/home`, or `scheme:with/path`.\n *\n * @param value A string which represents an URI (see `URI#toString`).\n */\n URI.parse = function (value, _strict) {\n if (_strict === void 0) { _strict = false; }\n var match = _regexp.exec(value);\n if (!match) {\n return new _URI(_empty, _empty, _empty, _empty, _empty);\n }\n return new _URI(match[2] || _empty, percentDecode(match[4] || _empty), percentDecode(match[5] || _empty), percentDecode(match[7] || _empty), percentDecode(match[9] || _empty), _strict);\n };\n /**\n * Creates a new URI from a file system path, e.g. `c:\\my\\files`,\n * `/usr/home`, or `\\\\server\\share\\some\\path`.\n *\n * The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument\n * as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as**\n * `URI.parse('file://' + path)` because the path might contain characters that are\n * interpreted (# and ?). See the following sample:\n * ```ts\n const good = URI.file('/coding/c#/project1');\n good.scheme === 'file';\n good.path === '/coding/c#/project1';\n good.fragment === '';\n const bad = URI.parse('file://' + '/coding/c#/project1');\n bad.scheme === 'file';\n bad.path === '/coding/c'; // path is now broken\n bad.fragment === '/project1';\n ```\n *\n * @param path A file system path (see `URI#fsPath`)\n */\n URI.file = function (path) {\n var authority = _empty;\n // normalize to fwd-slashes on windows,\n // on other systems bwd-slashes are valid\n // filename character, eg /f\\oo/ba\\r.txt\n if (isWindows) {\n path = path.replace(/\\\\/g, _slash);\n }\n // check for authority as used in UNC shares\n // or use the path as given\n if (path[0] === _slash && path[1] === _slash) {\n var idx = path.indexOf(_slash, 2);\n if (idx === -1) {\n authority = path.substring(2);\n path = _slash;\n }\n else {\n authority = path.substring(2, idx);\n path = path.substring(idx) || _slash;\n }\n }\n return new _URI('file', authority, path, _empty, _empty);\n };\n URI.from = function (components) {\n return new _URI(components.scheme, components.authority, components.path, components.query, components.fragment);\n };\n // /**\n // * Join a URI path with path fragments and normalizes the resulting path.\n // *\n // * @param uri The input URI.\n // * @param pathFragment The path fragment to add to the URI path.\n // * @returns The resulting URI.\n // */\n // static joinPath(uri: URI, ...pathFragment: string[]): URI {\n // \tif (!uri.path) {\n // \t\tthrow new Error(`[UriError]: cannot call joinPaths on URI without path`);\n // \t}\n // \tlet newPath: string;\n // \tif (isWindows && uri.scheme === 'file') {\n // \t\tnewPath = URI.file(paths.win32.join(uriToFsPath(uri, true), ...pathFragment)).path;\n // \t} else {\n // \t\tnewPath = paths.posix.join(uri.path, ...pathFragment);\n // \t}\n // \treturn uri.with({ path: newPath });\n // }\n // ---- printing/externalize ---------------------------\n /**\n * Creates a string representation for this URI. It's guaranteed that calling\n * `URI.parse` with the result of this function creates an URI which is equal\n * to this URI.\n *\n * * The result shall *not* be used for display purposes but for externalization or transport.\n * * The result will be encoded using the percentage encoding and encoding happens mostly\n * ignore the scheme-specific encoding rules.\n *\n * @param skipEncoding Do not encode the result, default is `false`\n */\n URI.prototype.toString = function (skipEncoding) {\n if (skipEncoding === void 0) { skipEncoding = false; }\n return _asFormatted(this, skipEncoding);\n };\n URI.prototype.toJSON = function () {\n return this;\n };\n URI.revive = function (data) {\n if (!data) {\n return data;\n }\n else if (data instanceof URI) {\n return data;\n }\n else {\n var result = new _URI(data);\n result._formatted = data.external;\n result._fsPath = data._sep === _pathSepMarker ? data.fsPath : null;\n return result;\n }\n };\n return URI;\n}());\nexport { URI };\nvar _pathSepMarker = isWindows ? 1 : undefined;\n// eslint-disable-next-line @typescript-eslint/class-name-casing\nvar _URI = /** @class */ (function (_super) {\n __extends(_URI, _super);\n function _URI() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._formatted = null;\n _this._fsPath = null;\n return _this;\n }\n Object.defineProperty(_URI.prototype, \"fsPath\", {\n get: function () {\n if (!this._fsPath) {\n this._fsPath = uriToFsPath(this, false);\n }\n return this._fsPath;\n },\n enumerable: true,\n configurable: true\n });\n _URI.prototype.toString = function (skipEncoding) {\n if (skipEncoding === void 0) { skipEncoding = false; }\n if (!skipEncoding) {\n if (!this._formatted) {\n this._formatted = _asFormatted(this, false);\n }\n return this._formatted;\n }\n else {\n // we don't cache that\n return _asFormatted(this, true);\n }\n };\n _URI.prototype.toJSON = function () {\n var res = {\n $mid: 1\n };\n // cached state\n if (this._fsPath) {\n res.fsPath = this._fsPath;\n res._sep = _pathSepMarker;\n }\n if (this._formatted) {\n res.external = this._formatted;\n }\n // uri components\n if (this.path) {\n res.path = this.path;\n }\n if (this.scheme) {\n res.scheme = this.scheme;\n }\n if (this.authority) {\n res.authority = this.authority;\n }\n if (this.query) {\n res.query = this.query;\n }\n if (this.fragment) {\n res.fragment = this.fragment;\n }\n return res;\n };\n return _URI;\n}(URI));\n// reserved characters: https://tools.ietf.org/html/rfc3986#section-2.2\nvar encodeTable = (_a = {},\n _a[58 /* Colon */] = '%3A',\n _a[47 /* Slash */] = '%2F',\n _a[63 /* QuestionMark */] = '%3F',\n _a[35 /* Hash */] = '%23',\n _a[91 /* OpenSquareBracket */] = '%5B',\n _a[93 /* CloseSquareBracket */] = '%5D',\n _a[64 /* AtSign */] = '%40',\n _a[33 /* ExclamationMark */] = '%21',\n _a[36 /* DollarSign */] = '%24',\n _a[38 /* Ampersand */] = '%26',\n _a[39 /* SingleQuote */] = '%27',\n _a[40 /* OpenParen */] = '%28',\n _a[41 /* CloseParen */] = '%29',\n _a[42 /* Asterisk */] = '%2A',\n _a[43 /* Plus */] = '%2B',\n _a[44 /* Comma */] = '%2C',\n _a[59 /* Semicolon */] = '%3B',\n _a[61 /* Equals */] = '%3D',\n _a[32 /* Space */] = '%20',\n _a);\nfunction encodeURIComponentFast(uriComponent, allowSlash) {\n var res = undefined;\n var nativeEncodePos = -1;\n for (var pos = 0; pos < uriComponent.length; pos++) {\n var code = uriComponent.charCodeAt(pos);\n // unreserved characters: https://tools.ietf.org/html/rfc3986#section-2.3\n if ((code >= 97 /* a */ && code <= 122 /* z */)\n || (code >= 65 /* A */ && code <= 90 /* Z */)\n || (code >= 48 /* Digit0 */ && code <= 57 /* Digit9 */)\n || code === 45 /* Dash */\n || code === 46 /* Period */\n || code === 95 /* Underline */\n || code === 126 /* Tilde */\n || (allowSlash && code === 47 /* Slash */)) {\n // check if we are delaying native encode\n if (nativeEncodePos !== -1) {\n res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));\n nativeEncodePos = -1;\n }\n // check if we write into a new string (by default we try to return the param)\n if (res !== undefined) {\n res += uriComponent.charAt(pos);\n }\n }\n else {\n // encoding needed, we need to allocate a new string\n if (res === undefined) {\n res = uriComponent.substr(0, pos);\n }\n // check with default table first\n var escaped = encodeTable[code];\n if (escaped !== undefined) {\n // check if we are delaying native encode\n if (nativeEncodePos !== -1) {\n res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));\n nativeEncodePos = -1;\n }\n // append escaped variant to result\n res += escaped;\n }\n else if (nativeEncodePos === -1) {\n // use native encode only when needed\n nativeEncodePos = pos;\n }\n }\n }\n if (nativeEncodePos !== -1) {\n res += encodeURIComponent(uriComponent.substring(nativeEncodePos));\n }\n return res !== undefined ? res : uriComponent;\n}\nfunction encodeURIComponentMinimal(path) {\n var res = undefined;\n for (var pos = 0; pos < path.length; pos++) {\n var code = path.charCodeAt(pos);\n if (code === 35 /* Hash */ || code === 63 /* QuestionMark */) {\n if (res === undefined) {\n res = path.substr(0, pos);\n }\n res += encodeTable[code];\n }\n else {\n if (res !== undefined) {\n res += path[pos];\n }\n }\n }\n return res !== undefined ? res : path;\n}\n/**\n * Compute `fsPath` for the given uri\n */\nexport function uriToFsPath(uri, keepDriveLetterCasing) {\n var value;\n if (uri.authority && uri.path.length > 1 && uri.scheme === 'file') {\n // unc path: file://shares/c$/far/boo\n value = \"//\" + uri.authority + uri.path;\n }\n else if (uri.path.charCodeAt(0) === 47 /* Slash */\n && (uri.path.charCodeAt(1) >= 65 /* A */ && uri.path.charCodeAt(1) <= 90 /* Z */ || uri.path.charCodeAt(1) >= 97 /* a */ && uri.path.charCodeAt(1) <= 122 /* z */)\n && uri.path.charCodeAt(2) === 58 /* Colon */) {\n if (!keepDriveLetterCasing) {\n // windows drive letter: file:///c:/far/boo\n value = uri.path[1].toLowerCase() + uri.path.substr(2);\n }\n else {\n value = uri.path.substr(1);\n }\n }\n else {\n // other path\n value = uri.path;\n }\n if (isWindows) {\n value = value.replace(/\\//g, '\\\\');\n }\n return value;\n}\n/**\n * Create the external version of a uri\n */\nfunction _asFormatted(uri, skipEncoding) {\n var encoder = !skipEncoding\n ? encodeURIComponentFast\n : encodeURIComponentMinimal;\n var res = '';\n var scheme = uri.scheme, authority = uri.authority, path = uri.path, query = uri.query, fragment = uri.fragment;\n if (scheme) {\n res += scheme;\n res += ':';\n }\n if (authority || scheme === 'file') {\n res += _slash;\n res += _slash;\n }\n if (authority) {\n var idx = authority.indexOf('@');\n if (idx !== -1) {\n // <user>@<auth>\n var userinfo = authority.substr(0, idx);\n authority = authority.substr(idx + 1);\n idx = userinfo.indexOf(':');\n if (idx === -1) {\n res += encoder(userinfo, false);\n }\n else {\n // <user>:<pass>@<auth>\n res += encoder(userinfo.substr(0, idx), false);\n res += ':';\n res += encoder(userinfo.substr(idx + 1), false);\n }\n res += '@';\n }\n authority = authority.toLowerCase();\n idx = authority.indexOf(':');\n if (idx === -1) {\n res += encoder(authority, false);\n }\n else {\n // <auth>:<port>\n res += encoder(authority.substr(0, idx), false);\n res += authority.substr(idx);\n }\n }\n if (path) {\n // lower-case windows drive letters in /C:/fff or C:/fff\n if (path.length >= 3 && path.charCodeAt(0) === 47 /* Slash */ && path.charCodeAt(2) === 58 /* Colon */) {\n var code = path.charCodeAt(1);\n if (code >= 65 /* A */ && code <= 90 /* Z */) {\n path = \"/\" + String.fromCharCode(code + 32) + \":\" + path.substr(3); // \"/c:\".length === 3\n }\n }\n else if (path.length >= 2 && path.charCodeAt(1) === 58 /* Colon */) {\n var code = path.charCodeAt(0);\n if (code >= 65 /* A */ && code <= 90 /* Z */) {\n path = String.fromCharCode(code + 32) + \":\" + path.substr(2); // \"/c:\".length === 3\n }\n }\n // encode the rest of the path\n res += encoder(path, true);\n }\n if (query) {\n res += '?';\n res += encoder(query, false);\n }\n if (fragment) {\n res += '#';\n res += !skipEncoding ? encodeURIComponentFast(fragment, false) : fragment;\n }\n return res;\n}\n// --- decode\nfunction decodeURIComponentGraceful(str) {\n try {\n return decodeURIComponent(str);\n }\n catch (_a) {\n if (str.length > 3) {\n return str.substr(0, 3) + decodeURIComponentGraceful(str.substr(3));\n }\n else {\n return str;\n }\n }\n}\nvar _rEncodedAsHex = /(%[0-9A-Za-z][0-9A-Za-z])+/g;\nfunction percentDecode(str) {\n if (!str.match(_rEncodedAsHex)) {\n return str;\n }\n return str.replace(_rEncodedAsHex, function (match) { return decodeURIComponentGraceful(match); });\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.htmlData = exports.cssData = void 0;\nexports.cssData = {\n \"properties\": [\"additive-symbols\", \"align-content\", \"align-items\", \"justify-items\", \"justify-self\", \"justify-items\", \"align-self\", \"all\", \"alt\", \"animation\", \"animation-delay\", \"animation-direction\", \"animation-duration\", \"animation-fill-mode\", \"animation-iteration-count\", \"animation-name\", \"animation-play-state\", \"animation-timing-function\", \"backface-visibility\", \"background\", \"background-attachment\", \"background-blend-mode\", \"background-clip\", \"background-color\", \"background-image\", \"background-origin\", \"background-position\", \"background-position-x\", \"background-position-y\", \"background-repeat\", \"background-size\", \"behavior\", \"block-size\", \"border\", \"border-block-end\", \"border-block-start\", \"border-block-end-color\", \"border-block-start-color\", \"border-block-end-style\", \"border-block-start-style\", \"border-block-end-width\", \"border-block-start-width\", \"border-bottom\", \"border-bottom-color\", \"border-bottom-left-radius\", \"border-bottom-right-radius\", \"border-bottom-style\", \"border-bottom-width\", \"border-collapse\", \"border-color\", \"border-image\", \"border-image-outset\", \"border-image-repeat\", \"border-image-slice\", \"border-image-source\", \"border-image-width\", \"border-inline-end\", \"border-inline-start\", \"border-inline-end-color\", \"border-inline-start-color\", \"border-inline-end-style\", \"border-inline-start-style\", \"border-inline-end-width\", \"border-inline-start-width\", \"border-left\", \"border-left-color\", \"border-left-style\", \"border-left-width\", \"border-radius\", \"border-right\", \"border-right-color\", \"border-right-style\", \"border-right-width\", \"border-spacing\", \"border-style\", \"border-top\", \"border-top-color\", \"border-top-left-radius\", \"border-top-right-radius\", \"border-top-style\", \"border-top-width\", \"border-width\", \"bottom\", \"box-decoration-break\", \"box-shadow\", \"box-sizing\", \"break-after\", \"break-before\", \"break-inside\", \"caption-side\", \"caret-color\", \"clear\", \"clip\", \"clip-path\", \"clip-rule\", \"color\", \"color-interpolation-filters\", \"column-count\", \"column-fill\", \"column-gap\", \"column-rule\", \"column-rule-color\", \"column-rule-style\", \"column-rule-width\", \"columns\", \"column-span\", \"column-width\", \"contain\", \"content\", \"counter-increment\", \"counter-reset\", \"cursor\", \"direction\", \"display\", \"empty-cells\", \"enable-background\", \"fallback\", \"fill\", \"fill-opacity\", \"fill-rule\", \"filter\", \"flex\", \"flex-basis\", \"flex-direction\", \"flex-flow\", \"flex-grow\", \"flex-shrink\", \"flex-wrap\", \"float\", \"flood-color\", \"flood-opacity\", \"font\", \"font-family\", \"font-feature-settings\", \"font-kerning\", \"font-language-override\", \"font-size\", \"font-size-adjust\", \"font-stretch\", \"font-style\", \"font-synthesis\", \"font-variant\", \"font-variant-alternates\", \"font-variant-caps\", \"font-variant-east-asian\", \"font-variant-ligatures\", \"font-variant-numeric\", \"font-variant-position\", \"font-weight\", \"glyph-orientation-horizontal\", \"glyph-orientation-vertical\", \"grid-area\", \"grid-auto-columns\", \"grid-auto-flow\", \"grid-auto-rows\", \"grid-column\", \"grid-column-end\", \"grid-column-gap\", \"grid-column-start\", \"grid-gap\", \"grid-row\", \"grid-row-end\", \"grid-row-gap\", \"grid-row-start\", \"grid-template\", \"grid-template-areas\", \"grid-template-columns\", \"grid-template-rows\", \"height\", \"hyphens\", \"image-orientation\", \"image-rendering\", \"ime-mode\", \"inline-size\", \"isolation\", \"justify-content\", \"kerning\", \"left\", \"letter-spacing\", \"lighting-color\", \"line-break\", \"line-height\", \"list-style\", \"list-style-image\", \"list-style-position\", \"list-style-type\", \"margin\", \"margin-block-end\", \"margin-block-start\", \"margin-bottom\", \"margin-inline-end\", \"margin-inline-start\", \"margin-left\", \"margin-right\", \"margin-top\", \"marker\", \"marker-end\", \"marker-mid\", \"marker-start\", \"mask-type\", \"max-block-size\", \"max-height\", \"max-inline-size\", \"max-width\", \"min-block-size\", \"min-height\", \"min-inline-size\", \"min-width\", \"mix-blend-mode\", \"motion\", \"motion-offset\", \"motion-path\", \"motion-rotation\", \"-moz-animation\", \"-moz-animation-delay\", \"-moz-animation-direction\", \"-moz-animation-duration\", \"-moz-animation-iteration-count\", \"-moz-animation-name\", \"-moz-animation-play-state\", \"-moz-animation-timing-function\", \"-moz-appearance\", \"-moz-backface-visibility\", \"-moz-background-clip\", \"-moz-background-inline-policy\", \"-moz-background-origin\", \"-moz-border-bottom-colors\", \"-moz-border-image\", \"-moz-border-left-colors\", \"-moz-border-right-colors\", \"-moz-border-top-colors\", \"-moz-box-align\", \"-moz-box-direction\", \"-moz-box-flex\", \"-moz-box-flexgroup\", \"-moz-box-ordinal-group\", \"-moz-box-orient\", \"-moz-box-pack\", \"-moz-box-sizing\", \"-moz-column-count\", \"-moz-column-gap\", \"-moz-column-rule\", \"-moz-column-rule-color\", \"-moz-column-rule-style\", \"-moz-column-rule-width\", \"-moz-columns\", \"-moz-column-width\", \"-moz-font-feature-settings\", \"-moz-hyphens\", \"-moz-perspective\", \"-moz-perspective-origin\", \"-moz-text-align-last\", \"-moz-text-decoration-color\", \"-moz-text-decoration-line\", \"-moz-text-decoration-style\", \"-moz-text-size-adjust\", \"-moz-transform\", \"-moz-transform-origin\", \"-moz-transition\", \"-moz-transition-delay\", \"-moz-transition-duration\", \"-moz-transition-property\", \"-moz-transition-timing-function\", \"-moz-user-focus\", \"-moz-user-select\", \"-ms-accelerator\", \"-ms-behavior\", \"-ms-block-progression\", \"-ms-content-zoom-chaining\", \"-ms-content-zooming\", \"-ms-content-zoom-limit\", \"-ms-content-zoom-limit-max\", \"-ms-content-zoom-limit-min\", \"-ms-content-zoom-snap\", \"-ms-content-zoom-snap-points\", \"-ms-content-zoom-snap-type\", \"-ms-filter\", \"-ms-flex\", \"-ms-flex-align\", \"-ms-flex-direction\", \"-ms-flex-flow\", \"-ms-flex-item-align\", \"-ms-flex-line-pack\", \"-ms-flex-order\", \"-ms-flex-pack\", \"-ms-flex-wrap\", \"-ms-flow-from\", \"-ms-flow-into\", \"-ms-grid-column\", \"-ms-grid-column-align\", \"-ms-grid-columns\", \"-ms-grid-column-span\", \"-ms-grid-layer\", \"-ms-grid-row\", \"-ms-grid-row-align\", \"-ms-grid-rows\", \"-ms-grid-row-span\", \"-ms-high-contrast-adjust\", \"-ms-hyphenate-limit-chars\", \"-ms-hyphenate-limit-lines\", \"-ms-hyphenate-limit-zone\", \"-ms-hyphens\", \"-ms-ime-mode\", \"-ms-interpolation-mode\", \"-ms-layout-grid\", \"-ms-layout-grid-char\", \"-ms-layout-grid-line\", \"-ms-layout-grid-mode\", \"-ms-layout-grid-type\", \"-ms-line-break\", \"-ms-overflow-style\", \"-ms-perspective\", \"-ms-perspective-origin\", \"-ms-perspective-origin-x\", \"-ms-perspective-origin-y\", \"-ms-progress-appearance\", \"-ms-scrollbar-3dlight-color\", \"-ms-scrollbar-arrow-color\", \"-ms-scrollbar-base-color\", \"-ms-scrollbar-darkshadow-color\", \"-ms-scrollbar-face-color\", \"-ms-scrollbar-highlight-color\", \"-ms-scrollbar-shadow-color\", \"-ms-scrollbar-track-color\", \"-ms-scroll-chaining\", \"-ms-scroll-limit\", \"-ms-scroll-limit-x-max\", \"-ms-scroll-limit-x-min\", \"-ms-scroll-limit-y-max\", \"-ms-scroll-limit-y-min\", \"-ms-scroll-rails\", \"-ms-scroll-snap-points-x\", \"-ms-scroll-snap-points-y\", \"-ms-scroll-snap-type\", \"-ms-scroll-snap-x\", \"-ms-scroll-snap-y\", \"-ms-scroll-translation\", \"-ms-text-align-last\", \"-ms-text-autospace\", \"-ms-text-combine-horizontal\", \"-ms-text-justify\", \"-ms-text-kashida-space\", \"-ms-text-overflow\", \"-ms-text-size-adjust\", \"-ms-text-underline-position\", \"-ms-touch-action\", \"-ms-touch-select\", \"-ms-transform\", \"-ms-transform-origin\", \"-ms-transform-origin-x\", \"-ms-transform-origin-y\", \"-ms-transform-origin-z\", \"-ms-user-select\", \"-ms-word-break\", \"-ms-word-wrap\", \"-ms-wrap-flow\", \"-ms-wrap-margin\", \"-ms-wrap-through\", \"-ms-writing-mode\", \"-ms-zoom\", \"-ms-zoom-animation\", \"nav-down\", \"nav-index\", \"nav-left\", \"nav-right\", \"nav-up\", \"negative\", \"-o-animation\", \"-o-animation-delay\", \"-o-animation-direction\", \"-o-animation-duration\", \"-o-animation-fill-mode\", \"-o-animation-iteration-count\", \"-o-animation-name\", \"-o-animation-play-state\", \"-o-animation-timing-function\", \"object-fit\", \"object-position\", \"-o-border-image\", \"-o-object-fit\", \"-o-object-position\", \"opacity\", \"order\", \"orphans\", \"-o-table-baseline\", \"-o-tab-size\", \"-o-text-overflow\", \"-o-transform\", \"-o-transform-origin\", \"-o-transition\", \"-o-transition-delay\", \"-o-transition-duration\", \"-o-transition-property\", \"-o-transition-timing-function\", \"offset-block-end\", \"offset-block-start\", \"offset-inline-end\", \"offset-inline-start\", \"outline\", \"outline-color\", \"outline-offset\", \"outline-style\", \"outline-width\", \"overflow\", \"overflow-wrap\", \"overflow-x\", \"overflow-y\", \"pad\", \"padding\", \"padding-bottom\", \"padding-block-end\", \"padding-block-start\", \"padding-inline-end\", \"padding-inline-start\", \"padding-left\", \"padding-right\", \"padding-top\", \"page-break-after\", \"page-break-before\", \"page-break-inside\", \"paint-order\", \"perspective\", \"perspective-origin\", \"pointer-events\", \"position\", \"prefix\", \"quotes\", \"range\", \"resize\", \"right\", \"ruby-align\", \"ruby-overhang\", \"ruby-position\", \"ruby-span\", \"scrollbar-3dlight-color\", \"scrollbar-arrow-color\", \"scrollbar-base-color\", \"scrollbar-darkshadow-color\", \"scrollbar-face-color\", \"scrollbar-highlight-color\", \"scrollbar-shadow-color\", \"scrollbar-track-color\", \"scroll-behavior\", \"scroll-snap-coordinate\", \"scroll-snap-destination\", \"scroll-snap-points-x\", \"scroll-snap-points-y\", \"scroll-snap-type\", \"shape-image-threshold\", \"shape-margin\", \"shape-outside\", \"shape-rendering\", \"size\", \"src\", \"stop-color\", \"stop-opacity\", \"stroke\", \"stroke-dasharray\", \"stroke-dashoffset\", \"stroke-linecap\", \"stroke-linejoin\", \"stroke-miterlimit\", \"stroke-opacity\", \"stroke-width\", \"suffix\", \"system\", \"symbols\", \"table-layout\", \"tab-size\", \"text-align\", \"text-align-last\", \"text-anchor\", \"text-decoration\", \"text-decoration-color\", \"text-decoration-line\", \"text-decoration-style\", \"text-indent\", \"text-justify\", \"text-orientation\", \"text-overflow\", \"text-rendering\", \"text-shadow\", \"text-transform\", \"text-underline-position\", \"top\", \"touch-action\", \"transform\", \"transform-origin\", \"transform-style\", \"transition\", \"transition-delay\", \"transition-duration\", \"transition-property\", \"transition-timing-function\", \"unicode-bidi\", \"unicode-range\", \"user-select\", \"vertical-align\", \"visibility\", \"-webkit-animation\", \"-webkit-animation-delay\", \"-webkit-animation-direction\", \"-webkit-animation-duration\", \"-webkit-animation-fill-mode\", \"-webkit-animation-iteration-count\", \"-webkit-animation-name\", \"-webkit-animation-play-state\", \"-webkit-animation-timing-function\", \"-webkit-appearance\", \"-webkit-backdrop-filter\", \"-webkit-backface-visibility\", \"-webkit-background-clip\", \"-webkit-background-composite\", \"-webkit-background-origin\", \"-webkit-border-image\", \"-webkit-box-align\", \"-webkit-box-direction\", \"-webkit-box-flex\", \"-webkit-box-flex-group\", \"-webkit-box-ordinal-group\", \"-webkit-box-orient\", \"-webkit-box-pack\", \"-webkit-box-reflect\", \"-webkit-box-sizing\", \"-webkit-break-after\", \"-webkit-break-before\", \"-webkit-break-inside\", \"-webkit-column-break-after\", \"-webkit-column-break-before\", \"-webkit-column-break-inside\", \"-webkit-column-count\", \"-webkit-column-gap\", \"-webkit-column-rule\", \"-webkit-column-rule-color\", \"-webkit-column-rule-style\", \"-webkit-column-rule-width\", \"-webkit-columns\", \"-webkit-column-span\", \"-webkit-column-width\", \"-webkit-filter\", \"-webkit-flow-from\", \"-webkit-flow-into\", \"-webkit-font-feature-settings\", \"-webkit-hyphens\", \"-webkit-line-break\", \"-webkit-margin-bottom-collapse\", \"-webkit-margin-collapse\", \"-webkit-margin-start\", \"-webkit-margin-top-collapse\", \"-webkit-mask-clip\", \"-webkit-mask-image\", \"-webkit-mask-origin\", \"-webkit-mask-repeat\", \"-webkit-mask-size\", \"-webkit-nbsp-mode\", \"-webkit-overflow-scrolling\", \"-webkit-padding-start\", \"-webkit-perspective\", \"-webkit-perspective-origin\", \"-webkit-region-fragment\", \"-webkit-tap-highlight-color\", \"-webkit-text-fill-color\", \"-webkit-text-size-adjust\", \"-webkit-text-stroke\", \"-webkit-text-stroke-color\", \"-webkit-text-stroke-width\", \"-webkit-touch-callout\", \"-webkit-transform\", \"-webkit-transform-origin\", \"-webkit-transform-origin-x\", \"-webkit-transform-origin-y\", \"-webkit-transform-origin-z\", \"-webkit-transform-style\", \"-webkit-transition\", \"-webkit-transition-delay\", \"-webkit-transition-duration\", \"-webkit-transition-property\", \"-webkit-transition-timing-function\", \"-webkit-user-drag\", \"-webkit-user-modify\", \"-webkit-user-select\", \"white-space\", \"widows\", \"width\", \"will-change\", \"word-break\", \"word-spacing\", \"word-wrap\", \"writing-mode\", \"z-index\", \"zoom\"]\n};\nexports.htmlData = {\n \"tags\": [\n \"body\", \"head\", \"html\",\n \"address\", \"blockquote\", \"dd\", \"div\", \"section\", \"article\", \"aside\", \"header\", \"footer\", \"nav\", \"menu\", \"dl\", \"dt\", \"fieldset\", \"form\", \"frame\", \"frameset\", \"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\", \"iframe\", \"noframes\", \"object\", \"ol\", \"p\", \"ul\", \"applet\", \"center\", \"dir\", \"hr\", \"pre\",\n \"a\", \"abbr\", \"acronym\", \"area\", \"b\", \"base\", \"basefont\", \"bdo\", \"big\", \"br\", \"button\", \"caption\", \"cite\", \"code\", \"col\", \"colgroup\", \"del\", \"dfn\", \"em\", \"font\", \"i\", \"img\", \"input\", \"ins\", \"isindex\", \"kbd\", \"label\", \"legend\", \"li\", \"link\", \"map\", \"meta\", \"noscript\", \"optgroup\", \"option\", \"param\", \"q\", \"s\", \"samp\", \"script\", \"select\", \"small\", \"span\", \"strike\", \"strong\", \"style\", \"sub\", \"sup\", \"table\", \"tbody\", \"td\", \"textarea\", \"tfoot\", \"th\", \"thead\", \"title\", \"tr\", \"tt\", \"u\", \"var\",\n \"canvas\", \"main\", \"figure\", \"plaintext\", \"figcaption\", \"hgroup\", \"details\", \"summary\"\n ]\n};\n//# sourceMappingURL=data.js.map","\"use strict\";\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.joinPath = exports.normalizePath = exports.resolvePath = exports.isAbsolutePath = exports.FileType = void 0;\nvar FileType;\n(function (FileType) {\n /**\n * The file type is unknown.\n */\n FileType[FileType[\"Unknown\"] = 0] = \"Unknown\";\n /**\n * A regular file.\n */\n FileType[FileType[\"File\"] = 1] = \"File\";\n /**\n * A directory.\n */\n FileType[FileType[\"Directory\"] = 2] = \"Directory\";\n /**\n * A symbolic link to a file.\n */\n FileType[FileType[\"SymbolicLink\"] = 64] = \"SymbolicLink\";\n})(FileType = exports.FileType || (exports.FileType = {}));\n// following https://nodejs.org/api/path.html#path_path_isabsolute_path\nconst PathMatchRegex = new RegExp('^(/|//|\\\\\\\\\\\\\\\\|[A-Za-z]:(/|\\\\\\\\))');\nconst Dot = '.'.charCodeAt(0);\nfunction isAbsolutePath(path) {\n return PathMatchRegex.test(path);\n}\nexports.isAbsolutePath = isAbsolutePath;\nfunction resolvePath(uri, path) {\n if (isAbsolutePath(path)) {\n return uri.with({ path: normalizePath(path.split('/')) });\n }\n return joinPath(uri, path);\n}\nexports.resolvePath = resolvePath;\nfunction normalizePath(parts) {\n const newParts = [];\n for (const part of parts) {\n if (part.length === 0 || part.length === 1 && part.charCodeAt(0) === Dot) {\n // ignore\n }\n else if (part.length === 2 && part.charCodeAt(0) === Dot && part.charCodeAt(1) === Dot) {\n newParts.pop();\n }\n else {\n newParts.push(part);\n }\n }\n if (parts.length > 1 && parts[parts.length - 1].length === 0) {\n newParts.push('');\n }\n let res = newParts.join('/');\n if (parts[0].length === 0) {\n res = '/' + res;\n }\n return res;\n}\nexports.normalizePath = normalizePath;\nfunction joinPath(uri, ...paths) {\n const parts = uri.path.split('/');\n for (const path of paths) {\n parts.push(...path.split('/'));\n }\n return uri.with({ path: normalizePath(parts) });\n}\nexports.joinPath = joinPath;\n//# sourceMappingURL=fileService.js.map","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n/**\n * Check if given code is a number\n */\nfunction isNumber$1(code) {\n return code > 47 && code < 58;\n}\n/**\n * Check if given character code is alpha code (letter through A to Z)\n */\nfunction isAlpha$1(code, from, to) {\n from = from || 65; // A\n to = to || 90; // Z\n code &= ~32; // quick hack to convert any char code to uppercase char code\n return code >= from && code <= to;\n}\nfunction isAlphaNumericWord(code) {\n return isNumber$1(code) || isAlphaWord(code);\n}\nfunction isAlphaWord(code) {\n return code === 95 /* _ */ || isAlpha$1(code);\n}\n/**\n * Check for Umlauts i.e. ä, Ä, ö, Ö, ü and Ü\n */\nfunction isUmlaut(code) {\n return code === 196\n || code == 214\n || code === 220\n || code === 228\n || code === 246\n || code === 252;\n}\n/**\n * Check if given character code is a white-space character: a space character\n * or line breaks\n */\nfunction isWhiteSpace$3(code) {\n return code === 32 /* space */\n || code === 9 /* tab */\n || code === 160; /* non-breaking space */\n}\n/**\n * Check if given character code is a space character\n */\nfunction isSpace(code) {\n return isWhiteSpace$3(code)\n || code === 10 /* LF */\n || code === 13; /* CR */\n}\n/**\n * Check if given character code is a quote character\n */\nfunction isQuote$2(code) {\n return code === 39 /* ' */ || code === 34 /* \" */;\n}\n\n/**\n * A streaming, character code-based string reader\n */\nclass Scanner {\n constructor(str, start, end) {\n if (end == null && typeof str === 'string') {\n end = str.length;\n }\n this.string = str;\n this.pos = this.start = start || 0;\n this.end = end || 0;\n }\n /**\n * Returns true only if the stream is at the end of the file.\n */\n eof() {\n return this.pos >= this.end;\n }\n /**\n * Creates a new stream instance which is limited to given `start` and `end`\n * range. E.g. its `eof()` method will look at `end` property, not actual\n * stream end\n */\n limit(start, end) {\n return new Scanner(this.string, start, end);\n }\n /**\n * Returns the next character code in the stream without advancing it.\n * Will return NaN at the end of the file.\n */\n peek() {\n return this.string.charCodeAt(this.pos);\n }\n /**\n * Returns the next character in the stream and advances it.\n * Also returns <code>undefined</code> when no more characters are available.\n */\n next() {\n if (this.pos < this.string.length) {\n return this.string.charCodeAt(this.pos++);\n }\n }\n /**\n * `match` can be a character code or a function that takes a character code\n * and returns a boolean. If the next character in the stream 'matches'\n * the given argument, it is consumed and returned.\n * Otherwise, `false` is returned.\n */\n eat(match) {\n const ch = this.peek();\n const ok = typeof match === 'function' ? match(ch) : ch === match;\n if (ok) {\n this.next();\n }\n return ok;\n }\n /**\n * Repeatedly calls <code>eat</code> with the given argument, until it\n * fails. Returns <code>true</code> if any characters were eaten.\n */\n eatWhile(match) {\n const start = this.pos;\n while (!this.eof() && this.eat(match)) { /* */ }\n return this.pos !== start;\n }\n /**\n * Backs up the stream n characters. Backing it up further than the\n * start of the current token will cause things to break, so be careful.\n */\n backUp(n) {\n this.pos -= (n || 1);\n }\n /**\n * Get the string between the start of the current token and the\n * current stream position.\n */\n current() {\n return this.substring(this.start, this.pos);\n }\n /**\n * Returns substring for given range\n */\n substring(start, end) {\n return this.string.slice(start, end);\n }\n /**\n * Creates error object with current stream state\n */\n error(message, pos = this.pos) {\n return new ScannerError(`${message} at ${pos + 1}`, pos, this.string);\n }\n}\nclass ScannerError extends Error {\n constructor(message, pos, str) {\n super(message);\n this.pos = pos;\n this.string = str;\n }\n}\n\nfunction tokenScanner$1(tokens) {\n return {\n tokens,\n start: 0,\n pos: 0,\n size: tokens.length\n };\n}\nfunction peek$3(scanner) {\n return scanner.tokens[scanner.pos];\n}\nfunction next(scanner) {\n return scanner.tokens[scanner.pos++];\n}\nfunction slice(scanner, from = scanner.start, to = scanner.pos) {\n return scanner.tokens.slice(from, to);\n}\nfunction readable$1(scanner) {\n return scanner.pos < scanner.size;\n}\nfunction consume$2(scanner, test) {\n const token = peek$3(scanner);\n if (token && test(token)) {\n scanner.pos++;\n return true;\n }\n return false;\n}\nfunction error$1(scanner, message, token = peek$3(scanner)) {\n if (token && token.start != null) {\n message += ` at ${token.start}`;\n }\n const err = new Error(message);\n err['pos'] = token && token.start;\n return err;\n}\n\nfunction abbreviation(abbr, options = {}) {\n const scanner = tokenScanner$1(abbr);\n const result = statements(scanner, options);\n if (readable$1(scanner)) {\n throw error$1(scanner, 'Unexpected character');\n }\n return result;\n}\nfunction statements(scanner, options) {\n const result = {\n type: 'TokenGroup',\n elements: []\n };\n let ctx = result;\n let node;\n const stack = [];\n while (readable$1(scanner)) {\n if (node = element$2(scanner, options) || group(scanner, options)) {\n ctx.elements.push(node);\n if (consume$2(scanner, isChildOperator)) {\n stack.push(ctx);\n ctx = node;\n }\n else if (consume$2(scanner, isSiblingOperator$1)) {\n continue;\n }\n else if (consume$2(scanner, isClimbOperator)) {\n do {\n if (stack.length) {\n ctx = stack.pop();\n }\n } while (consume$2(scanner, isClimbOperator));\n }\n }\n else {\n break;\n }\n }\n return result;\n}\n/**\n * Consumes group from given scanner\n */\nfunction group(scanner, options) {\n if (consume$2(scanner, isGroupStart)) {\n const result = statements(scanner, options);\n const token = next(scanner);\n if (isBracket$2(token, 'group', false)) {\n result.repeat = repeater$1(scanner);\n }\n return result;\n }\n}\n/**\n * Consumes single element from given scanner\n */\nfunction element$2(scanner, options) {\n let attr;\n const elem = {\n type: 'TokenElement',\n name: void 0,\n attributes: void 0,\n value: void 0,\n repeat: void 0,\n selfClose: false,\n elements: []\n };\n if (elementName(scanner, options)) {\n elem.name = slice(scanner);\n }\n while (readable$1(scanner)) {\n scanner.start = scanner.pos;\n if (!elem.repeat && !isEmpty(elem) && consume$2(scanner, isRepeater)) {\n elem.repeat = scanner.tokens[scanner.pos - 1];\n }\n else if (!elem.value && text(scanner)) {\n elem.value = getText(scanner);\n }\n else if (attr = shortAttribute(scanner, 'id', options) || shortAttribute(scanner, 'class', options) || attributeSet(scanner)) {\n if (!elem.attributes) {\n elem.attributes = Array.isArray(attr) ? attr.slice() : [attr];\n }\n else {\n elem.attributes = elem.attributes.concat(attr);\n }\n }\n else {\n if (!isEmpty(elem) && consume$2(scanner, isCloseOperator)) {\n elem.selfClose = true;\n if (!elem.repeat && consume$2(scanner, isRepeater)) {\n elem.repeat = scanner.tokens[scanner.pos - 1];\n }\n }\n break;\n }\n }\n return !isEmpty(elem) ? elem : void 0;\n}\n/**\n * Consumes attribute set from given scanner\n */\nfunction attributeSet(scanner) {\n if (consume$2(scanner, isAttributeSetStart)) {\n const attributes = [];\n let attr;\n while (readable$1(scanner)) {\n if (attr = attribute(scanner)) {\n attributes.push(attr);\n }\n else if (consume$2(scanner, isAttributeSetEnd)) {\n break;\n }\n else if (!consume$2(scanner, isWhiteSpace$2)) {\n throw error$1(scanner, `Unexpected \"${peek$3(scanner).type}\" token`);\n }\n }\n return attributes;\n }\n}\n/**\n * Consumes attribute shorthand (class or id) from given scanner\n */\nfunction shortAttribute(scanner, type, options) {\n if (isOperator$1(peek$3(scanner), type)) {\n scanner.pos++;\n // Consume multiple operators\n let count = 1;\n while (isOperator$1(peek$3(scanner), type)) {\n scanner.pos++;\n count++;\n }\n const attr = {\n name: [createLiteral$1(type)]\n };\n if (count > 1) {\n attr.multiple = true;\n }\n // Consume expression after shorthand start for React-like components\n if (options.jsx && text(scanner)) {\n attr.value = getText(scanner);\n attr.expression = true;\n }\n else {\n attr.value = literal$1$1(scanner) ? slice(scanner) : void 0;\n }\n return attr;\n }\n}\n/**\n * Consumes single attribute from given scanner\n */\nfunction attribute(scanner) {\n if (quoted(scanner)) {\n // Consumed quoted value: it’s a value for default attribute\n return {\n value: slice(scanner)\n };\n }\n if (literal$1$1(scanner, true)) {\n const name = slice(scanner);\n let value;\n if (consume$2(scanner, isEquals)) {\n if (quoted(scanner) || literal$1$1(scanner, true)) {\n value = slice(scanner);\n }\n }\n return { name, value };\n }\n}\nfunction repeater$1(scanner) {\n return isRepeater(peek$3(scanner))\n ? scanner.tokens[scanner.pos++]\n : void 0;\n}\n/**\n * Consumes quoted value from given scanner, if possible\n */\nfunction quoted(scanner) {\n const start = scanner.pos;\n const quote = peek$3(scanner);\n if (isQuote$1(quote)) {\n scanner.pos++;\n while (readable$1(scanner)) {\n if (isQuote$1(next(scanner), quote.single)) {\n scanner.start = start;\n return true;\n }\n }\n throw error$1(scanner, 'Unclosed quote', quote);\n }\n return false;\n}\n/**\n * Consumes literal (unquoted value) from given scanner\n */\nfunction literal$1$1(scanner, allowBrackets) {\n const start = scanner.pos;\n const brackets = {\n attribute: 0,\n expression: 0,\n group: 0\n };\n while (readable$1(scanner)) {\n const token = peek$3(scanner);\n if (brackets.expression) {\n // If we’re inside expression, we should consume all content in it\n if (isBracket$2(token, 'expression')) {\n brackets[token.context] += token.open ? 1 : -1;\n }\n }\n else if (isQuote$1(token) || isOperator$1(token) || isWhiteSpace$2(token) || isRepeater(token)) {\n break;\n }\n else if (isBracket$2(token)) {\n if (!allowBrackets) {\n break;\n }\n if (token.open) {\n brackets[token.context]++;\n }\n else if (!brackets[token.context]) {\n // Stop if found unmatched closing brace: it must be handled\n // by parent consumer\n break;\n }\n else {\n brackets[token.context]--;\n }\n }\n scanner.pos++;\n }\n if (start !== scanner.pos) {\n scanner.start = start;\n return true;\n }\n return false;\n}\n/**\n * Consumes element name from given scanner\n */\nfunction elementName(scanner, options) {\n const start = scanner.pos;\n if (options.jsx && consume$2(scanner, isCapitalizedLiteral)) {\n // Check for edge case: consume immediate capitalized class names\n // for React-like components, e.g. `Foo.Bar.Baz`\n while (readable$1(scanner)) {\n const { pos } = scanner;\n if (!consume$2(scanner, isClassNameOperator) || !consume$2(scanner, isCapitalizedLiteral)) {\n scanner.pos = pos;\n break;\n }\n }\n }\n while (readable$1(scanner) && consume$2(scanner, isElementName$1)) {\n // empty\n }\n if (scanner.pos !== start) {\n scanner.start = start;\n return true;\n }\n return false;\n}\n/**\n * Consumes text value from given scanner\n */\nfunction text(scanner) {\n const start = scanner.pos;\n if (consume$2(scanner, isTextStart)) {\n let brackets = 0;\n while (readable$1(scanner)) {\n const token = next(scanner);\n if (isBracket$2(token, 'expression')) {\n if (token.open) {\n brackets++;\n }\n else if (!brackets) {\n break;\n }\n else {\n brackets--;\n }\n }\n }\n scanner.start = start;\n return true;\n }\n return false;\n}\nfunction getText(scanner) {\n let from = scanner.start;\n let to = scanner.pos;\n if (isBracket$2(scanner.tokens[from], 'expression', true)) {\n from++;\n }\n if (isBracket$2(scanner.tokens[to - 1], 'expression', false)) {\n to--;\n }\n return slice(scanner, from, to);\n}\nfunction isBracket$2(token, context, isOpen) {\n return Boolean(token && token.type === 'Bracket'\n && (!context || token.context === context)\n && (isOpen == null || token.open === isOpen));\n}\nfunction isOperator$1(token, type) {\n return Boolean(token && token.type === 'Operator' && (!type || token.operator === type));\n}\nfunction isQuote$1(token, isSingle) {\n return Boolean(token && token.type === 'Quote' && (isSingle == null || token.single === isSingle));\n}\nfunction isWhiteSpace$2(token) {\n return Boolean(token && token.type === 'WhiteSpace');\n}\nfunction isEquals(token) {\n return isOperator$1(token, 'equal');\n}\nfunction isRepeater(token) {\n return Boolean(token && token.type === 'Repeater');\n}\nfunction isLiteral$2(token) {\n return token.type === 'Literal';\n}\nfunction isCapitalizedLiteral(token) {\n if (isLiteral$2(token)) {\n const ch = token.value.charCodeAt(0);\n return ch >= 65 && ch <= 90;\n }\n return false;\n}\nfunction isElementName$1(token) {\n return token.type === 'Literal' || token.type === 'RepeaterNumber' || token.type === 'RepeaterPlaceholder';\n}\nfunction isClassNameOperator(token) {\n return isOperator$1(token, 'class');\n}\nfunction isAttributeSetStart(token) {\n return isBracket$2(token, 'attribute', true);\n}\nfunction isAttributeSetEnd(token) {\n return isBracket$2(token, 'attribute', false);\n}\nfunction isTextStart(token) {\n return isBracket$2(token, 'expression', true);\n}\nfunction isGroupStart(token) {\n return isBracket$2(token, 'group', true);\n}\nfunction createLiteral$1(value) {\n return { type: 'Literal', value };\n}\nfunction isEmpty(elem) {\n return !elem.name && !elem.value && !elem.attributes;\n}\nfunction isChildOperator(token) {\n return isOperator$1(token, 'child');\n}\nfunction isSiblingOperator$1(token) {\n return isOperator$1(token, 'sibling');\n}\nfunction isClimbOperator(token) {\n return isOperator$1(token, 'climb');\n}\nfunction isCloseOperator(token) {\n return isOperator$1(token, 'close');\n}\n\nvar Chars$3;\n(function (Chars) {\n /** `{` character */\n Chars[Chars[\"CurlyBracketOpen\"] = 123] = \"CurlyBracketOpen\";\n /** `}` character */\n Chars[Chars[\"CurlyBracketClose\"] = 125] = \"CurlyBracketClose\";\n /** `\\\\` character */\n Chars[Chars[\"Escape\"] = 92] = \"Escape\";\n /** `=` character */\n Chars[Chars[\"Equals\"] = 61] = \"Equals\";\n /** `[` character */\n Chars[Chars[\"SquareBracketOpen\"] = 91] = \"SquareBracketOpen\";\n /** `]` character */\n Chars[Chars[\"SquareBracketClose\"] = 93] = \"SquareBracketClose\";\n /** `*` character */\n Chars[Chars[\"Asterisk\"] = 42] = \"Asterisk\";\n /** `#` character */\n Chars[Chars[\"Hash\"] = 35] = \"Hash\";\n /** `$` character */\n Chars[Chars[\"Dollar\"] = 36] = \"Dollar\";\n /** `-` character */\n Chars[Chars[\"Dash\"] = 45] = \"Dash\";\n /** `.` character */\n Chars[Chars[\"Dot\"] = 46] = \"Dot\";\n /** `/` character */\n Chars[Chars[\"Slash\"] = 47] = \"Slash\";\n /** `:` character */\n Chars[Chars[\"Colon\"] = 58] = \"Colon\";\n /** `!` character */\n Chars[Chars[\"Excl\"] = 33] = \"Excl\";\n /** `@` character */\n Chars[Chars[\"At\"] = 64] = \"At\";\n /** `_` character */\n Chars[Chars[\"Underscore\"] = 95] = \"Underscore\";\n /** `(` character */\n Chars[Chars[\"RoundBracketOpen\"] = 40] = \"RoundBracketOpen\";\n /** `)` character */\n Chars[Chars[\"RoundBracketClose\"] = 41] = \"RoundBracketClose\";\n /** `+` character */\n Chars[Chars[\"Sibling\"] = 43] = \"Sibling\";\n /** `>` character */\n Chars[Chars[\"Child\"] = 62] = \"Child\";\n /** `^` character */\n Chars[Chars[\"Climb\"] = 94] = \"Climb\";\n /** `'` character */\n Chars[Chars[\"SingleQuote\"] = 39] = \"SingleQuote\";\n /** `\"\"` character */\n Chars[Chars[\"DoubleQuote\"] = 34] = \"DoubleQuote\";\n})(Chars$3 || (Chars$3 = {}));\n/**\n * If consumes escape character, sets current stream range to escaped value\n */\nfunction escaped(scanner) {\n if (scanner.eat(Chars$3.Escape)) {\n scanner.start = scanner.pos;\n if (!scanner.eof()) {\n scanner.pos++;\n }\n return true;\n }\n return false;\n}\n\nfunction tokenize$1(source) {\n const scanner = new Scanner(source);\n const result = [];\n const ctx = {\n group: 0,\n attribute: 0,\n expression: 0,\n quote: 0\n };\n let ch = 0;\n let token;\n while (!scanner.eof()) {\n ch = scanner.peek();\n token = getToken$1(scanner, ctx);\n if (token) {\n result.push(token);\n if (token.type === 'Quote') {\n ctx.quote = ch === ctx.quote ? 0 : ch;\n }\n else if (token.type === 'Bracket') {\n ctx[token.context] += token.open ? 1 : -1;\n }\n }\n else {\n throw scanner.error('Unexpected character');\n }\n }\n return result;\n}\n/**\n * Returns next token from given scanner, if possible\n */\nfunction getToken$1(scanner, ctx) {\n return field$2(scanner, ctx)\n || repeaterPlaceholder(scanner)\n || repeaterNumber(scanner)\n || repeater(scanner)\n || whiteSpace$1(scanner)\n || literal$2(scanner, ctx)\n || operator$1(scanner)\n || quote(scanner)\n || bracket$1(scanner);\n}\n/**\n * Consumes literal from given scanner\n */\nfunction literal$2(scanner, ctx) {\n const start = scanner.pos;\n const expressionStart = ctx.expression;\n let value = '';\n while (!scanner.eof()) {\n // Consume escaped sequence no matter of context\n if (escaped(scanner)) {\n value += scanner.current();\n continue;\n }\n const ch = scanner.peek();\n if (ch === Chars$3.Slash && !ctx.quote && !ctx.expression && !ctx.attribute) {\n // Special case for `/` character between numbers in class names\n const prev = scanner.string.charCodeAt(scanner.pos - 1);\n const next = scanner.string.charCodeAt(scanner.pos + 1);\n if (isNumber$1(prev) && isNumber$1(next)) {\n value += scanner.string[scanner.pos++];\n continue;\n }\n }\n if (ch === ctx.quote || ch === Chars$3.Dollar || isAllowedOperator(ch, ctx)) {\n // 1. Found matching quote\n // 2. The `$` character has special meaning in every context\n // 3. Depending on context, some characters should be treated as operators\n break;\n }\n if (expressionStart) {\n // Consume nested expressions, e.g. span{{foo}}\n if (ch === Chars$3.CurlyBracketOpen) {\n ctx.expression++;\n }\n else if (ch === Chars$3.CurlyBracketClose) {\n if (ctx.expression > expressionStart) {\n ctx.expression--;\n }\n else {\n break;\n }\n }\n }\n else if (!ctx.quote) {\n // Consuming element name\n if (!ctx.attribute && !isElementName(ch)) {\n break;\n }\n if (isAllowedSpace(ch, ctx) || isAllowedRepeater(ch, ctx) || isQuote$2(ch) || bracketType(ch)) {\n // Stop for characters not allowed in unquoted literal\n break;\n }\n }\n value += scanner.string[scanner.pos++];\n }\n if (start !== scanner.pos) {\n scanner.start = start;\n return {\n type: 'Literal',\n value,\n start,\n end: scanner.pos\n };\n }\n}\n/**\n * Consumes white space characters as string literal from given scanner\n */\nfunction whiteSpace$1(scanner) {\n const start = scanner.pos;\n if (scanner.eatWhile(isSpace)) {\n return {\n type: 'WhiteSpace',\n start,\n end: scanner.pos,\n value: scanner.substring(start, scanner.pos)\n };\n }\n}\n/**\n * Consumes quote from given scanner\n */\nfunction quote(scanner) {\n const ch = scanner.peek();\n if (isQuote$2(ch)) {\n return {\n type: 'Quote',\n single: ch === Chars$3.SingleQuote,\n start: scanner.pos++,\n end: scanner.pos\n };\n }\n}\n/**\n * Consumes bracket from given scanner\n */\nfunction bracket$1(scanner) {\n const ch = scanner.peek();\n const context = bracketType(ch);\n if (context) {\n return {\n type: 'Bracket',\n open: isOpenBracket$2(ch),\n context,\n start: scanner.pos++,\n end: scanner.pos\n };\n }\n}\n/**\n * Consumes operator from given scanner\n */\nfunction operator$1(scanner) {\n const op = operatorType$1(scanner.peek());\n if (op) {\n return {\n type: 'Operator',\n operator: op,\n start: scanner.pos++,\n end: scanner.pos\n };\n }\n}\n/**\n * Consumes node repeat token from current stream position and returns its\n * parsed value\n */\nfunction repeater(scanner) {\n const start = scanner.pos;\n if (scanner.eat(Chars$3.Asterisk)) {\n scanner.start = scanner.pos;\n let count = 1;\n let implicit = false;\n if (scanner.eatWhile(isNumber$1)) {\n count = Number(scanner.current());\n }\n else {\n implicit = true;\n }\n return {\n type: 'Repeater',\n count,\n value: 0,\n implicit,\n start,\n end: scanner.pos\n };\n }\n}\n/**\n * Consumes repeater placeholder `$#` from given scanner\n */\nfunction repeaterPlaceholder(scanner) {\n const start = scanner.pos;\n if (scanner.eat(Chars$3.Dollar) && scanner.eat(Chars$3.Hash)) {\n return {\n type: 'RepeaterPlaceholder',\n value: void 0,\n start,\n end: scanner.pos\n };\n }\n scanner.pos = start;\n}\n/**\n * Consumes numbering token like `$` from given scanner state\n */\nfunction repeaterNumber(scanner) {\n const start = scanner.pos;\n if (scanner.eatWhile(Chars$3.Dollar)) {\n const size = scanner.pos - start;\n let reverse = false;\n let base = 1;\n let parent = 0;\n if (scanner.eat(Chars$3.At)) {\n // Consume numbering modifiers\n while (scanner.eat(Chars$3.Climb)) {\n parent++;\n }\n reverse = scanner.eat(Chars$3.Dash);\n scanner.start = scanner.pos;\n if (scanner.eatWhile(isNumber$1)) {\n base = Number(scanner.current());\n }\n }\n scanner.start = start;\n return {\n type: 'RepeaterNumber',\n size,\n reverse,\n base,\n parent,\n start,\n end: scanner.pos\n };\n }\n}\nfunction field$2(scanner, ctx) {\n const start = scanner.pos;\n // Fields are allowed inside expressions and attributes\n if ((ctx.expression || ctx.attribute) && scanner.eat(Chars$3.Dollar) && scanner.eat(Chars$3.CurlyBracketOpen)) {\n scanner.start = scanner.pos;\n let index;\n let name = '';\n if (scanner.eatWhile(isNumber$1)) {\n // It’s a field\n index = Number(scanner.current());\n name = scanner.eat(Chars$3.Colon) ? consumePlaceholder$2(scanner) : '';\n }\n else if (isAlpha$1(scanner.peek())) {\n // It’s a variable\n name = consumePlaceholder$2(scanner);\n }\n if (scanner.eat(Chars$3.CurlyBracketClose)) {\n return {\n type: 'Field',\n index, name,\n start,\n end: scanner.pos\n };\n }\n throw scanner.error('Expecting }');\n }\n // If we reached here then there’s no valid field here, revert\n // back to starting position\n scanner.pos = start;\n}\n/**\n * Consumes a placeholder: value right after `:` in field. Could be empty\n */\nfunction consumePlaceholder$2(stream) {\n const stack = [];\n stream.start = stream.pos;\n while (!stream.eof()) {\n if (stream.eat(Chars$3.CurlyBracketOpen)) {\n stack.push(stream.pos);\n }\n else if (stream.eat(Chars$3.CurlyBracketClose)) {\n if (!stack.length) {\n stream.pos--;\n break;\n }\n stack.pop();\n }\n else {\n stream.pos++;\n }\n }\n if (stack.length) {\n stream.pos = stack.pop();\n throw stream.error(`Expecting }`);\n }\n return stream.current();\n}\n/**\n * Check if given character code is an operator and it’s allowed in current context\n */\nfunction isAllowedOperator(ch, ctx) {\n const op = operatorType$1(ch);\n if (!op || ctx.quote || ctx.expression) {\n // No operators inside quoted values or expressions\n return false;\n }\n // Inside attributes, only `equals` is allowed\n return !ctx.attribute || op === 'equal';\n}\n/**\n * Check if given character is a space character and is allowed to be consumed\n * as a space token in current context\n */\nfunction isAllowedSpace(ch, ctx) {\n return isSpace(ch) && !ctx.expression;\n}\n/**\n * Check if given character can be consumed as repeater in current context\n */\nfunction isAllowedRepeater(ch, ctx) {\n return ch === Chars$3.Asterisk && !ctx.attribute && !ctx.expression;\n}\n/**\n * If given character is a bracket, returns it’s type\n */\nfunction bracketType(ch) {\n if (ch === Chars$3.RoundBracketOpen || ch === Chars$3.RoundBracketClose) {\n return 'group';\n }\n if (ch === Chars$3.SquareBracketOpen || ch === Chars$3.SquareBracketClose) {\n return 'attribute';\n }\n if (ch === Chars$3.CurlyBracketOpen || ch === Chars$3.CurlyBracketClose) {\n return 'expression';\n }\n}\n/**\n * If given character is an operator, returns it’s type\n */\nfunction operatorType$1(ch) {\n return (ch === Chars$3.Child && 'child')\n || (ch === Chars$3.Sibling && 'sibling')\n || (ch === Chars$3.Climb && 'climb')\n || (ch === Chars$3.Dot && 'class')\n || (ch === Chars$3.Hash && 'id')\n || (ch === Chars$3.Slash && 'close')\n || (ch === Chars$3.Equals && 'equal')\n || void 0;\n}\n/**\n * Check if given character is an open bracket\n */\nfunction isOpenBracket$2(ch) {\n return ch === Chars$3.CurlyBracketOpen\n || ch === Chars$3.SquareBracketOpen\n || ch === Chars$3.RoundBracketOpen;\n}\n/**\n * Check if given character is allowed in element name\n */\nfunction isElementName(ch) {\n return isAlphaNumericWord(ch)\n || isUmlaut(ch)\n || ch === Chars$3.Dash\n || ch === Chars$3.Colon\n || ch === Chars$3.Excl;\n}\n\nconst operators = {\n child: '>',\n class: '.',\n climb: '^',\n id: '#',\n equal: '=',\n close: '/',\n sibling: '+'\n};\nconst tokenVisitor = {\n Literal(token) {\n return token.value;\n },\n Quote(token) {\n return token.single ? '\\'' : '\"';\n },\n Bracket(token) {\n if (token.context === 'attribute') {\n return token.open ? '[' : ']';\n }\n else if (token.context === 'expression') {\n return token.open ? '{' : '}';\n }\n else {\n return token.open ? '(' : '}';\n }\n },\n Operator(token) {\n return operators[token.operator];\n },\n Field(token, state) {\n if (token.index != null) {\n // It’s a field: by default, return TextMate-compatible field\n return token.name\n ? `\\${${token.index}:${token.name}}`\n : `\\${${token.index}`;\n }\n else if (token.name) {\n // It’s a variable\n return state.getVariable(token.name);\n }\n return '';\n },\n RepeaterPlaceholder(token, state) {\n // Find closest implicit repeater\n let repeater;\n for (let i = state.repeaters.length - 1; i >= 0; i--) {\n if (state.repeaters[i].implicit) {\n repeater = state.repeaters[i];\n break;\n }\n }\n state.inserted = true;\n return state.getText(repeater && repeater.value);\n },\n RepeaterNumber(token, state) {\n let value = 1;\n const lastIx = state.repeaters.length - 1;\n // const repeaterIx = Math.max(0, state.repeaters.length - 1 - token.parent);\n const repeater = state.repeaters[lastIx];\n if (repeater) {\n value = token.reverse\n ? token.base + repeater.count - repeater.value - 1\n : token.base + repeater.value;\n if (token.parent) {\n const parentIx = Math.max(0, lastIx - token.parent);\n if (parentIx !== lastIx) {\n const parentRepeater = state.repeaters[parentIx];\n value += repeater.count * parentRepeater.value;\n }\n }\n }\n let result = String(value);\n while (result.length < token.size) {\n result = '0' + result;\n }\n return result;\n },\n WhiteSpace(token) {\n return token.value;\n }\n};\n/**\n * Converts given value token to string\n */\nfunction stringify$1(token, state) {\n if (!tokenVisitor[token.type]) {\n throw new Error(`Unknown token ${token.type}`);\n }\n return tokenVisitor[token.type](token, state);\n}\n\nconst urlRegex = /^((https?:|ftp:|file:)?\\/\\/|(www|ftp)\\.)[^ ]*$/;\nconst emailRegex = /^[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,5}$/;\n/**\n * Converts given token-based abbreviation into simplified and unrolled node-based\n * abbreviation\n */\nfunction convert(abbr, options = {}) {\n let textInserted = false;\n let cleanText;\n if (options.text) {\n if (Array.isArray(options.text)) {\n cleanText = options.text.filter(s => s.trim());\n }\n else {\n cleanText = options.text;\n }\n }\n const result = {\n type: 'Abbreviation',\n children: convertGroup(abbr, {\n inserted: false,\n repeaters: [],\n text: options.text,\n cleanText,\n repeatGuard: options.maxRepeat || Number.POSITIVE_INFINITY,\n getText(pos) {\n var _a;\n textInserted = true;\n let value;\n if (Array.isArray(options.text)) {\n if (pos !== undefined && pos >= 0 && pos < cleanText.length) {\n return cleanText[pos];\n }\n value = pos !== undefined ? options.text[pos] : options.text.join('\\n');\n }\n else {\n value = (_a = options.text) !== null && _a !== void 0 ? _a : '';\n }\n return value;\n },\n getVariable(name) {\n const varValue = options.variables && options.variables[name];\n return varValue != null ? varValue : name;\n }\n })\n };\n if (options.text != null && !textInserted) {\n // Text given but no implicitly repeated elements: insert it into\n // deepest child\n const deepest = deepestNode(last$1(result.children));\n if (deepest) {\n const text = Array.isArray(options.text) ? options.text.join('\\n') : options.text;\n insertText(deepest, text);\n if (deepest.name === 'a' && options.href) {\n // Automatically update value of `<a>` element if inserting URL or email\n insertHref(deepest, text);\n }\n }\n }\n return result;\n}\n/**\n * Converts given statement to abbreviation nodes\n */\nfunction convertStatement(node, state) {\n let result = [];\n if (node.repeat) {\n // Node is repeated: we should create copies of given node\n // and supply context token with actual repeater state\n const original = node.repeat;\n const repeat = Object.assign({}, original);\n repeat.count = repeat.implicit && Array.isArray(state.text)\n ? state.cleanText.length\n : (repeat.count || 1);\n let items;\n state.repeaters.push(repeat);\n for (let i = 0; i < repeat.count; i++) {\n repeat.value = i;\n node.repeat = repeat;\n items = isGroup(node)\n ? convertGroup(node, state)\n : convertElement(node, state);\n if (repeat.implicit && !state.inserted) {\n // It’s an implicit repeater but no repeater placeholders found inside,\n // we should insert text into deepest node\n const target = last$1(items);\n const deepest = target && deepestNode(target);\n if (deepest) {\n insertText(deepest, state.getText(repeat.value));\n }\n }\n result = result.concat(items);\n // We should output at least one repeated item even if it’s reached\n // repeat limit\n if (--state.repeatGuard <= 0) {\n break;\n }\n }\n state.repeaters.pop();\n node.repeat = original;\n if (repeat.implicit) {\n state.inserted = true;\n }\n }\n else {\n result = result.concat(isGroup(node) ? convertGroup(node, state) : convertElement(node, state));\n }\n return result;\n}\nfunction convertElement(node, state) {\n let children = [];\n const elem = {\n type: 'AbbreviationNode',\n name: node.name && stringifyName(node.name, state),\n value: node.value && stringifyValue$1(node.value, state),\n attributes: void 0,\n children,\n repeat: node.repeat && Object.assign({}, node.repeat),\n selfClosing: node.selfClose,\n };\n let result = [elem];\n for (const child of node.elements) {\n children = children.concat(convertStatement(child, state));\n }\n if (node.attributes) {\n elem.attributes = [];\n for (const attr of node.attributes) {\n elem.attributes.push(convertAttribute(attr, state));\n }\n }\n // In case if current node is a text-only snippet without fields, we should\n // put all children as siblings\n if (!elem.name && !elem.attributes && elem.value && !elem.value.some(isField$1)) {\n // XXX it’s unclear that `children` is not bound to `elem`\n // due to concat operation\n result = result.concat(children);\n }\n else {\n elem.children = children;\n }\n return result;\n}\nfunction convertGroup(node, state) {\n let result = [];\n for (const child of node.elements) {\n result = result.concat(convertStatement(child, state));\n }\n if (node.repeat) {\n result = attachRepeater(result, node.repeat);\n }\n return result;\n}\nfunction convertAttribute(node, state) {\n let implied = false;\n let isBoolean = false;\n let valueType = node.expression ? 'expression' : 'raw';\n let value;\n const name = node.name && stringifyName(node.name, state);\n if (name && name[0] === '!') {\n implied = true;\n }\n if (name && name[name.length - 1] === '.') {\n isBoolean = true;\n }\n if (node.value) {\n const tokens = node.value.slice();\n if (isQuote$1(tokens[0])) {\n // It’s a quoted value: remove quotes from output but mark attribute\n // value as quoted\n const quote = tokens.shift();\n if (tokens.length && last$1(tokens).type === quote.type) {\n tokens.pop();\n }\n valueType = quote.single ? 'singleQuote' : 'doubleQuote';\n }\n else if (isBracket$2(tokens[0], 'expression', true)) {\n // Value is expression: remove brackets but mark value type\n valueType = 'expression';\n tokens.shift();\n if (isBracket$2(last$1(tokens), 'expression', false)) {\n tokens.pop();\n }\n }\n value = stringifyValue$1(tokens, state);\n }\n return {\n name: isBoolean || implied\n ? name.slice(implied ? 1 : 0, isBoolean ? -1 : void 0)\n : name,\n value,\n boolean: isBoolean,\n implied,\n valueType,\n multiple: node.multiple\n };\n}\n/**\n * Converts given token list to string\n */\nfunction stringifyName(tokens, state) {\n let str = '';\n for (let i = 0; i < tokens.length; i++) {\n str += stringify$1(tokens[i], state);\n }\n return str;\n}\n/**\n * Converts given token list to value list\n */\nfunction stringifyValue$1(tokens, state) {\n const result = [];\n let str = '';\n for (let i = 0, token; i < tokens.length; i++) {\n token = tokens[i];\n if (isField$1(token)) {\n // We should keep original fields in output since some editors has their\n // own syntax for field or doesn’t support fields at all so we should\n // capture actual field location in output stream\n if (str) {\n result.push(str);\n str = '';\n }\n result.push(token);\n }\n else {\n str += stringify$1(token, state);\n }\n }\n if (str) {\n result.push(str);\n }\n return result;\n}\nfunction isGroup(node) {\n return node.type === 'TokenGroup';\n}\nfunction isField$1(token) {\n return typeof token === 'object' && token.type === 'Field' && token.index != null;\n}\nfunction last$1(arr) {\n return arr[arr.length - 1];\n}\nfunction deepestNode(node) {\n return node.children.length ? deepestNode(last$1(node.children)) : node;\n}\nfunction insertText(node, text) {\n if (node.value) {\n const lastToken = last$1(node.value);\n if (typeof lastToken === 'string') {\n node.value[node.value.length - 1] += text;\n }\n else {\n node.value.push(text);\n }\n }\n else {\n node.value = [text];\n }\n}\nfunction insertHref(node, text) {\n var _a;\n let href = '';\n if (urlRegex.test(text)) {\n href = text;\n if (!/\\w+:/.test(href) && !href.startsWith('//')) {\n href = `http://${href}`;\n }\n }\n else if (emailRegex.test(text)) {\n href = `mailto:${text}`;\n }\n const hrefAttribute = (_a = node.attributes) === null || _a === void 0 ? void 0 : _a.find(attr => attr.name === 'href');\n if (!hrefAttribute) {\n if (!node.attributes) {\n node.attributes = [];\n }\n node.attributes.push({ name: 'href', value: [href], valueType: 'doubleQuote' });\n }\n else if (!hrefAttribute.value) {\n hrefAttribute.value = [href];\n }\n}\nfunction attachRepeater(items, repeater) {\n for (const item of items) {\n if (!item.repeat) {\n item.repeat = Object.assign({}, repeater);\n }\n }\n return items;\n}\n\n/**\n * Parses given abbreviation into node tree\n */\nfunction parseAbbreviation(abbr, options) {\n try {\n const tokens = typeof abbr === 'string' ? tokenize$1(abbr) : abbr;\n return convert(abbreviation(tokens, options), options);\n }\n catch (err) {\n if (err instanceof ScannerError && typeof abbr === 'string') {\n err.message += `\\n${abbr}\\n${'-'.repeat(err.pos)}^`;\n }\n throw err;\n }\n}\n\nvar OperatorType;\n(function (OperatorType) {\n OperatorType[\"Sibling\"] = \"+\";\n OperatorType[\"Important\"] = \"!\";\n OperatorType[\"ArgumentDelimiter\"] = \",\";\n OperatorType[\"ValueDelimiter\"] = \"-\";\n OperatorType[\"PropertyDelimiter\"] = \":\";\n})(OperatorType || (OperatorType = {}));\n\nvar Chars$2;\n(function (Chars) {\n /** `#` character */\n Chars[Chars[\"Hash\"] = 35] = \"Hash\";\n /** `$` character */\n Chars[Chars[\"Dollar\"] = 36] = \"Dollar\";\n /** `-` character */\n Chars[Chars[\"Dash\"] = 45] = \"Dash\";\n /** `.` character */\n Chars[Chars[\"Dot\"] = 46] = \"Dot\";\n /** `:` character */\n Chars[Chars[\"Colon\"] = 58] = \"Colon\";\n /** `,` character */\n Chars[Chars[\"Comma\"] = 44] = \"Comma\";\n /** `!` character */\n Chars[Chars[\"Excl\"] = 33] = \"Excl\";\n /** `@` character */\n Chars[Chars[\"At\"] = 64] = \"At\";\n /** `%` character */\n Chars[Chars[\"Percent\"] = 37] = \"Percent\";\n /** `_` character */\n Chars[Chars[\"Underscore\"] = 95] = \"Underscore\";\n /** `(` character */\n Chars[Chars[\"RoundBracketOpen\"] = 40] = \"RoundBracketOpen\";\n /** `)` character */\n Chars[Chars[\"RoundBracketClose\"] = 41] = \"RoundBracketClose\";\n /** `{` character */\n Chars[Chars[\"CurlyBracketOpen\"] = 123] = \"CurlyBracketOpen\";\n /** `}` character */\n Chars[Chars[\"CurlyBracketClose\"] = 125] = \"CurlyBracketClose\";\n /** `+` character */\n Chars[Chars[\"Sibling\"] = 43] = \"Sibling\";\n /** `'` character */\n Chars[Chars[\"SingleQuote\"] = 39] = \"SingleQuote\";\n /** `\"` character */\n Chars[Chars[\"DoubleQuote\"] = 34] = \"DoubleQuote\";\n /** `t` character */\n Chars[Chars[\"Transparent\"] = 116] = \"Transparent\";\n /** `/` character */\n Chars[Chars[\"Slash\"] = 47] = \"Slash\";\n})(Chars$2 || (Chars$2 = {}));\n\nfunction tokenize(abbr, isValue) {\n let brackets = 0;\n let token;\n const scanner = new Scanner(abbr);\n const tokens = [];\n while (!scanner.eof()) {\n token = getToken(scanner, brackets === 0 && !isValue);\n if (!token) {\n throw scanner.error('Unexpected character');\n }\n if (token.type === 'Bracket') {\n if (!brackets && token.open) {\n mergeTokens(scanner, tokens);\n }\n brackets += token.open ? 1 : -1;\n if (brackets < 0) {\n throw scanner.error('Unexpected bracket', token.start);\n }\n }\n tokens.push(token);\n // Forcibly consume next operator after unit-less numeric value or color:\n // next dash `-` must be used as value delimiter\n if (shouldConsumeDashAfter(token) && (token = operator(scanner))) {\n tokens.push(token);\n }\n }\n return tokens;\n}\n/**\n * Returns next token from given scanner, if possible\n */\nfunction getToken(scanner, short) {\n return field$1(scanner)\n || customProperty(scanner)\n || numberValue(scanner)\n || colorValue(scanner)\n || stringValue(scanner)\n || bracket(scanner)\n || operator(scanner)\n || whiteSpace(scanner)\n || literal$1(scanner, short);\n}\nfunction field$1(scanner) {\n const start = scanner.pos;\n if (scanner.eat(Chars$2.Dollar) && scanner.eat(Chars$2.CurlyBracketOpen)) {\n scanner.start = scanner.pos;\n let index;\n let name = '';\n if (scanner.eatWhile(isNumber$1)) {\n // It’s a field\n index = Number(scanner.current());\n name = scanner.eat(Chars$2.Colon) ? consumePlaceholder$1(scanner) : '';\n }\n else if (isAlpha$1(scanner.peek())) {\n // It’s a variable\n name = consumePlaceholder$1(scanner);\n }\n if (scanner.eat(Chars$2.CurlyBracketClose)) {\n return {\n type: 'Field',\n index, name,\n start,\n end: scanner.pos\n };\n }\n throw scanner.error('Expecting }');\n }\n // If we reached here then there’s no valid field here, revert\n // back to starting position\n scanner.pos = start;\n}\n/**\n * Consumes a placeholder: value right after `:` in field. Could be empty\n */\nfunction consumePlaceholder$1(stream) {\n const stack = [];\n stream.start = stream.pos;\n while (!stream.eof()) {\n if (stream.eat(Chars$2.CurlyBracketOpen)) {\n stack.push(stream.pos);\n }\n else if (stream.eat(Chars$2.CurlyBracketClose)) {\n if (!stack.length) {\n stream.pos--;\n break;\n }\n stack.pop();\n }\n else {\n stream.pos++;\n }\n }\n if (stack.length) {\n stream.pos = stack.pop();\n throw stream.error(`Expecting }`);\n }\n return stream.current();\n}\n/**\n * Consumes literal from given scanner\n * @param short Use short notation for consuming value.\n * The difference between “short” and “full” notation is that first one uses\n * alpha characters only and used for extracting keywords from abbreviation,\n * while “full” notation also supports numbers and dashes\n */\nfunction literal$1(scanner, short) {\n const start = scanner.pos;\n if (scanner.eat(isIdentPrefix)) {\n // SCSS or LESS variable\n // NB a bit dirty hack: if abbreviation starts with identifier prefix,\n // consume alpha characters only to allow embedded variables\n scanner.eatWhile(start ? isKeyword : isLiteral$1);\n }\n else if (scanner.eat(isAlphaWord)) {\n scanner.eatWhile(short ? isLiteral$1 : isKeyword);\n }\n else {\n // Allow dots only at the beginning of literal\n scanner.eat(Chars$2.Dot);\n scanner.eatWhile(isLiteral$1);\n }\n if (start !== scanner.pos) {\n scanner.start = start;\n return createLiteral(scanner, scanner.start = start);\n }\n}\nfunction createLiteral(scanner, start = scanner.start, end = scanner.pos) {\n return {\n type: 'Literal',\n value: scanner.substring(start, end),\n start,\n end\n };\n}\n/**\n * Consumes numeric CSS value (number with optional unit) from current stream,\n * if possible\n */\nfunction numberValue(scanner) {\n const start = scanner.pos;\n if (consumeNumber(scanner)) {\n scanner.start = start;\n const rawValue = scanner.current();\n // eat unit, which can be a % or alpha word\n scanner.start = scanner.pos;\n scanner.eat(Chars$2.Percent) || scanner.eatWhile(isAlphaWord);\n return {\n type: 'NumberValue',\n value: Number(rawValue),\n rawValue,\n unit: scanner.current(),\n start,\n end: scanner.pos\n };\n }\n}\n/**\n * Consumes quoted string value from given scanner\n */\nfunction stringValue(scanner) {\n const ch = scanner.peek();\n const start = scanner.pos;\n let finished = false;\n if (isQuote$2(ch)) {\n scanner.pos++;\n while (!scanner.eof()) {\n // Do not throw error on malformed string\n if (scanner.eat(ch)) {\n finished = true;\n break;\n }\n else {\n scanner.pos++;\n }\n }\n scanner.start = start;\n return {\n type: 'StringValue',\n value: scanner.substring(start + 1, scanner.pos - (finished ? 1 : 0)),\n quote: ch === Chars$2.SingleQuote ? 'single' : 'double',\n start,\n end: scanner.pos\n };\n }\n}\n/**\n * Consumes a color token from given string\n */\nfunction colorValue(scanner) {\n // supported color variations:\n // #abc → #aabbccc\n // #0 → #000000\n // #fff.5 → rgba(255, 255, 255, 0.5)\n // #t → transparent\n const start = scanner.pos;\n if (scanner.eat(Chars$2.Hash)) {\n const valueStart = scanner.pos;\n let color = '';\n let alpha = '';\n if (scanner.eatWhile(isHex)) {\n color = scanner.substring(valueStart, scanner.pos);\n alpha = colorAlpha(scanner);\n }\n else if (scanner.eat(Chars$2.Transparent)) {\n color = '0';\n alpha = colorAlpha(scanner) || '0';\n }\n else {\n alpha = colorAlpha(scanner);\n }\n if (color || alpha || scanner.eof()) {\n const { r, g, b, a } = parseColor(color, alpha);\n return {\n type: 'ColorValue',\n r, g, b, a,\n raw: scanner.substring(start + 1, scanner.pos),\n start,\n end: scanner.pos\n };\n }\n else {\n // Consumed # but no actual value: invalid color value, treat it as literal\n return createLiteral(scanner, start);\n }\n }\n scanner.pos = start;\n}\n/**\n * Consumes alpha value of color: `.1`\n */\nfunction colorAlpha(scanner) {\n const start = scanner.pos;\n if (scanner.eat(Chars$2.Dot)) {\n scanner.start = start;\n if (scanner.eatWhile(isNumber$1)) {\n return scanner.current();\n }\n return '1';\n }\n return '';\n}\n/**\n * Consumes white space characters as string literal from given scanner\n */\nfunction whiteSpace(scanner) {\n const start = scanner.pos;\n if (scanner.eatWhile(isSpace)) {\n return {\n type: 'WhiteSpace',\n start,\n end: scanner.pos\n };\n }\n}\n/**\n * Consumes custom CSS property: --foo-bar\n */\nfunction customProperty(scanner) {\n const start = scanner.pos;\n if (scanner.eat(Chars$2.Dash) && scanner.eat(Chars$2.Dash)) {\n scanner.start = start;\n scanner.eatWhile(isKeyword);\n return {\n type: 'CustomProperty',\n value: scanner.current(),\n start,\n end: scanner.pos\n };\n }\n scanner.pos = start;\n}\n/**\n * Consumes bracket from given scanner\n */\nfunction bracket(scanner) {\n const ch = scanner.peek();\n if (isBracket$1(ch)) {\n return {\n type: 'Bracket',\n open: ch === Chars$2.RoundBracketOpen,\n start: scanner.pos++,\n end: scanner.pos\n };\n }\n}\n/**\n * Consumes operator from given scanner\n */\nfunction operator(scanner) {\n const op = operatorType(scanner.peek());\n if (op) {\n return {\n type: 'Operator',\n operator: op,\n start: scanner.pos++,\n end: scanner.pos\n };\n }\n}\n/**\n * Eats number value from given stream\n * @return Returns `true` if number was consumed\n */\nfunction consumeNumber(stream) {\n const start = stream.pos;\n stream.eat(Chars$2.Dash);\n const afterNegative = stream.pos;\n const hasDecimal = stream.eatWhile(isNumber$1);\n const prevPos = stream.pos;\n if (stream.eat(Chars$2.Dot)) {\n // It’s perfectly valid to have numbers like `1.`, which enforces\n // value to float unit type\n const hasFloat = stream.eatWhile(isNumber$1);\n if (!hasDecimal && !hasFloat) {\n // Lone dot\n stream.pos = prevPos;\n }\n }\n // Edge case: consumed dash only: not a number, bail-out\n if (stream.pos === afterNegative) {\n stream.pos = start;\n }\n return stream.pos !== start;\n}\nfunction isIdentPrefix(code) {\n return code === Chars$2.At || code === Chars$2.Dollar;\n}\n/**\n * If given character is an operator, returns it’s type\n */\nfunction operatorType(ch) {\n return (ch === Chars$2.Sibling && OperatorType.Sibling)\n || (ch === Chars$2.Excl && OperatorType.Important)\n || (ch === Chars$2.Comma && OperatorType.ArgumentDelimiter)\n || (ch === Chars$2.Colon && OperatorType.PropertyDelimiter)\n || (ch === Chars$2.Dash && OperatorType.ValueDelimiter)\n || void 0;\n}\n/**\n * Check if given code is a hex value (/0-9a-f/)\n */\nfunction isHex(code) {\n return isNumber$1(code) || isAlpha$1(code, 65, 70); // A-F\n}\nfunction isKeyword(code) {\n return isAlphaNumericWord(code) || code === Chars$2.Dash;\n}\nfunction isBracket$1(code) {\n return code === Chars$2.RoundBracketOpen || code === Chars$2.RoundBracketClose;\n}\nfunction isLiteral$1(code) {\n return isAlphaWord(code) || code === Chars$2.Percent || code === Chars$2.Slash;\n}\n/**\n * Parses given color value from abbreviation into RGBA format\n */\nfunction parseColor(value, alpha) {\n let r = '0';\n let g = '0';\n let b = '0';\n let a = Number(alpha != null && alpha !== '' ? alpha : 1);\n if (value === 't') {\n a = 0;\n }\n else {\n switch (value.length) {\n case 0:\n break;\n case 1:\n r = g = b = value + value;\n break;\n case 2:\n r = g = b = value;\n break;\n case 3:\n r = value[0] + value[0];\n g = value[1] + value[1];\n b = value[2] + value[2];\n break;\n default:\n value += value;\n r = value.slice(0, 2);\n g = value.slice(2, 4);\n b = value.slice(4, 6);\n }\n }\n return {\n r: parseInt(r, 16),\n g: parseInt(g, 16),\n b: parseInt(b, 16),\n a\n };\n}\n/**\n * Check if scanner reader must consume dash after given token.\n * Used in cases where user must explicitly separate numeric values\n */\nfunction shouldConsumeDashAfter(token) {\n return token.type === 'ColorValue' || (token.type === 'NumberValue' && !token.unit);\n}\n/**\n * Merges last adjacent tokens into a single literal.\n * This function is used to overcome edge case when function name was parsed\n * as a list of separate tokens. For example, a `scale3d()` value will be\n * parsed as literal and number tokens (`scale` and `3d`) which is a perfectly\n * valid abbreviation but undesired result. This function will detect last adjacent\n * literal and number values and combine them into single literal\n */\nfunction mergeTokens(scanner, tokens) {\n let start = 0;\n let end = 0;\n while (tokens.length) {\n const token = last(tokens);\n if (token.type === 'Literal' || token.type === 'NumberValue') {\n start = token.start;\n if (!end) {\n end = token.end;\n }\n tokens.pop();\n }\n else {\n break;\n }\n }\n if (start !== end) {\n tokens.push(createLiteral(scanner, start, end));\n }\n}\nfunction last(arr) {\n return arr[arr.length - 1];\n}\n\nfunction tokenScanner(tokens) {\n return {\n tokens,\n start: 0,\n pos: 0,\n size: tokens.length\n };\n}\nfunction peek$2(scanner) {\n return scanner.tokens[scanner.pos];\n}\nfunction readable(scanner) {\n return scanner.pos < scanner.size;\n}\nfunction consume$1(scanner, test) {\n if (test(peek$2(scanner))) {\n scanner.pos++;\n return true;\n }\n return false;\n}\nfunction error(scanner, message, token = peek$2(scanner)) {\n if (token && token.start != null) {\n message += ` at ${token.start}`;\n }\n const err = new Error(message);\n err['pos'] = token && token.start;\n return err;\n}\n\nfunction parser(tokens, options = {}) {\n const scanner = tokenScanner(tokens);\n const result = [];\n let property;\n while (readable(scanner)) {\n if (property = consumeProperty(scanner, options)) {\n result.push(property);\n }\n else if (!consume$1(scanner, isSiblingOperator)) {\n throw error(scanner, 'Unexpected token');\n }\n }\n return result;\n}\n/**\n * Consumes single CSS property\n */\nfunction consumeProperty(scanner, options) {\n let name;\n let important = false;\n let valueFragment;\n const value = [];\n const token = peek$2(scanner);\n const valueMode = !!options.value;\n if (!valueMode && isLiteral(token) && !isFunctionStart(scanner)) {\n scanner.pos++;\n name = token.value;\n // Consume any following value delimiter after property name\n consume$1(scanner, isValueDelimiter);\n }\n // Skip whitespace right after property name, if any\n if (valueMode) {\n consume$1(scanner, isWhiteSpace$1);\n }\n while (readable(scanner)) {\n if (consume$1(scanner, isImportant)) {\n important = true;\n }\n else if (valueFragment = consumeValue(scanner, valueMode)) {\n value.push(valueFragment);\n }\n else if (!consume$1(scanner, isFragmentDelimiter)) {\n break;\n }\n }\n if (name || value.length || important) {\n return { name, value, important };\n }\n}\n/**\n * Consumes single value fragment, e.g. all value tokens before comma\n */\nfunction consumeValue(scanner, inArgument) {\n const result = [];\n let token;\n let args;\n while (readable(scanner)) {\n token = peek$2(scanner);\n if (isValue(token)) {\n scanner.pos++;\n if (isLiteral(token) && (args = consumeArguments(scanner))) {\n result.push({\n type: 'FunctionCall',\n name: token.value,\n arguments: args\n });\n }\n else {\n result.push(token);\n }\n }\n else if (isValueDelimiter(token) || (inArgument && isWhiteSpace$1(token))) {\n scanner.pos++;\n }\n else {\n break;\n }\n }\n return result.length\n ? { type: 'CSSValue', value: result }\n : void 0;\n}\nfunction consumeArguments(scanner) {\n const start = scanner.pos;\n if (consume$1(scanner, isOpenBracket$1)) {\n const args = [];\n let value;\n while (readable(scanner) && !consume$1(scanner, isCloseBracket$1)) {\n if (value = consumeValue(scanner, true)) {\n args.push(value);\n }\n else if (!consume$1(scanner, isWhiteSpace$1) && !consume$1(scanner, isArgumentDelimiter)) {\n throw error(scanner, 'Unexpected token');\n }\n }\n scanner.start = start;\n return args;\n }\n}\nfunction isLiteral(token) {\n return token && token.type === 'Literal';\n}\nfunction isBracket(token, open) {\n return token && token.type === 'Bracket' && (open == null || token.open === open);\n}\nfunction isOpenBracket$1(token) {\n return isBracket(token, true);\n}\nfunction isCloseBracket$1(token) {\n return isBracket(token, false);\n}\nfunction isWhiteSpace$1(token) {\n return token && token.type === 'WhiteSpace';\n}\nfunction isOperator(token, operator) {\n return token && token.type === 'Operator' && (!operator || token.operator === operator);\n}\nfunction isSiblingOperator(token) {\n return isOperator(token, OperatorType.Sibling);\n}\nfunction isArgumentDelimiter(token) {\n return isOperator(token, OperatorType.ArgumentDelimiter);\n}\nfunction isFragmentDelimiter(token) {\n return isArgumentDelimiter(token);\n}\nfunction isImportant(token) {\n return isOperator(token, OperatorType.Important);\n}\nfunction isValue(token) {\n return token.type === 'StringValue'\n || token.type === 'ColorValue'\n || token.type === 'NumberValue'\n || token.type === 'Literal'\n || token.type === 'Field'\n || token.type === 'CustomProperty';\n}\nfunction isValueDelimiter(token) {\n return isOperator(token, OperatorType.PropertyDelimiter)\n || isOperator(token, OperatorType.ValueDelimiter);\n}\nfunction isFunctionStart(scanner) {\n const t1 = scanner.tokens[scanner.pos];\n const t2 = scanner.tokens[scanner.pos + 1];\n return t1 && t2 && isLiteral(t1) && t2.type === 'Bracket';\n}\n\n/**\n * Parses given abbreviation into property set\n */\nfunction parse$2(abbr, options) {\n try {\n const tokens = typeof abbr === 'string' ? tokenize(abbr, options && options.value) : abbr;\n return parser(tokens, options);\n }\n catch (err) {\n if (err instanceof ScannerError && typeof abbr === 'string') {\n err.message += `\\n${abbr}\\n${'-'.repeat(err.pos)}^`;\n }\n throw err;\n }\n}\n\n/**\n * Merges attributes in current node: de-duplicates attributes with the same name\n * and merges class names\n */\nfunction mergeAttributes(node, config) {\n if (!node.attributes) {\n return;\n }\n const attributes = [];\n const lookup = {};\n for (const attr of node.attributes) {\n if (attr.name) {\n const attrName = attr.name;\n if (attrName in lookup) {\n const prev = lookup[attrName];\n if (attrName === 'class') {\n prev.value = mergeValue(prev.value, attr.value, ' ');\n }\n else {\n mergeDeclarations(prev, attr, config);\n }\n }\n else {\n // Create new attribute instance so we can safely modify it later\n attributes.push(lookup[attrName] = Object.assign({}, attr));\n }\n }\n else {\n attributes.push(attr);\n }\n }\n node.attributes = attributes;\n}\n/**\n * Merges two token lists into single list. Adjacent strings are merged together\n */\nfunction mergeValue(prev, next, glue) {\n if (prev && next) {\n if (prev.length && glue) {\n append(prev, glue);\n }\n for (const t of next) {\n append(prev, t);\n }\n return prev;\n }\n const result = prev || next;\n return result && result.slice();\n}\n/**\n * Merges data from `src` attribute into `dest` and returns it\n */\nfunction mergeDeclarations(dest, src, config) {\n dest.name = src.name;\n if (!config.options['output.reverseAttributes']) {\n dest.value = src.value;\n }\n // Keep high-priority properties\n if (!dest.implied) {\n dest.implied = src.implied;\n }\n if (!dest.boolean) {\n dest.boolean = src.boolean;\n }\n if (dest.valueType !== 'expression') {\n dest.valueType = src.valueType;\n }\n return dest;\n}\nfunction append(tokens, value) {\n const lastIx = tokens.length - 1;\n if (typeof tokens[lastIx] === 'string' && typeof value === 'string') {\n tokens[lastIx] += value;\n }\n else {\n tokens.push(value);\n }\n}\n\n/**\n * Walks over each child node of given markup abbreviation AST node (not including\n * given one) and invokes `fn` on each node.\n * The `fn` callback accepts context node, list of ancestor nodes and optional\n * state object\n */\nfunction walk$1(node, fn, state) {\n const ancestors = [node];\n const callback = (ctx) => {\n fn(ctx, ancestors, state);\n ancestors.push(ctx);\n ctx.children.forEach(callback);\n ancestors.pop();\n };\n node.children.forEach(callback);\n}\n/**\n * Finds node which is the deepest for in current node or node itself.\n */\nfunction findDeepest(node) {\n let parent;\n while (node.children.length) {\n parent = node;\n node = node.children[node.children.length - 1];\n }\n return { parent, node };\n}\nfunction isNode(node) {\n return node.type === 'AbbreviationNode';\n}\n\n/**\n * Finds matching snippet from `registry` and resolves it into a parsed abbreviation.\n * Resolved node is then updated or replaced with matched abbreviation tree.\n *\n * A HTML registry basically contains aliases to another Emmet abbreviations,\n * e.g. a predefined set of name, attributes and so on, possibly a complex\n * abbreviation with multiple elements. So we have to get snippet, parse it\n * and recursively resolve it.\n */\nfunction resolveSnippets(abbr, config) {\n const stack = [];\n const reversed = config.options['output.reverseAttributes'];\n const resolve = (child) => {\n const snippet = child.name && config.snippets[child.name];\n // A snippet in stack means circular reference.\n // It can be either a user error or a perfectly valid snippet like\n // \"img\": \"img[src alt]/\", e.g. an element with predefined shape.\n // In any case, simply stop parsing and keep element as is\n if (!snippet || stack.includes(snippet)) {\n return null;\n }\n const snippetAbbr = parseAbbreviation(snippet, config);\n stack.push(snippet);\n walkResolve(snippetAbbr, resolve);\n stack.pop();\n // Add attributes from current node into every top-level node of parsed abbreviation\n for (const topNode of snippetAbbr.children) {\n if (child.attributes) {\n const from = topNode.attributes || [];\n const to = child.attributes || [];\n topNode.attributes = reversed ? to.concat(from) : from.concat(to);\n }\n mergeNodes(child, topNode);\n }\n return snippetAbbr;\n };\n walkResolve(abbr, resolve);\n return abbr;\n}\nfunction walkResolve(node, resolve, config) {\n let children = [];\n for (const child of node.children) {\n const resolved = resolve(child);\n if (resolved) {\n children = children.concat(resolved.children);\n const deepest = findDeepest(resolved);\n if (isNode(deepest.node)) {\n deepest.node.children = deepest.node.children.concat(walkResolve(child, resolve));\n }\n }\n else {\n children.push(child);\n child.children = walkResolve(child, resolve);\n }\n }\n return node.children = children;\n}\n/**\n * Adds data from first node into second node\n */\nfunction mergeNodes(from, to) {\n if (from.selfClosing) {\n to.selfClosing = true;\n }\n if (from.value != null) {\n to.value = from.value;\n }\n if (from.repeat) {\n to.repeat = from.repeat;\n }\n}\n\nconst expressionStart = '{';\nconst expressionEnd = '}';\nfunction createOutputStream(options, level = 0) {\n return {\n options,\n value: '',\n level,\n offset: 0,\n line: 0,\n column: 0\n };\n}\n/**\n * Pushes plain string into output stream without newline processing\n */\nfunction push(stream, text) {\n const processText = stream.options['output.text'];\n _push(stream, processText(text, stream.offset, stream.line, stream.column));\n}\n/**\n * Pushes given string with possible newline formatting into output\n */\nfunction pushString(stream, value) {\n // If given value contains newlines, we should push content line-by-line and\n // use `pushNewline()` to maintain proper line/column state\n const lines = splitByLines$1(value);\n for (let i = 0, il = lines.length - 1; i <= il; i++) {\n push(stream, lines[i]);\n if (i !== il) {\n pushNewline(stream, true);\n }\n }\n}\n/**\n * Pushes new line into given output stream\n */\nfunction pushNewline(stream, indent) {\n const baseIndent = stream.options['output.baseIndent'];\n const newline = stream.options['output.newline'];\n push(stream, newline + baseIndent);\n stream.line++;\n stream.column = baseIndent.length;\n if (indent) {\n pushIndent(stream, indent === true ? stream.level : indent);\n }\n}\n/**\n * Adds indentation of `size` to current output stream\n */\nfunction pushIndent(stream, size = stream.level) {\n const indent = stream.options['output.indent'];\n push(stream, indent.repeat(Math.max(size, 0)));\n}\n/**\n * Pushes field/tabstop into output stream\n */\nfunction pushField(stream, index, placeholder) {\n const field = stream.options['output.field'];\n // NB: use `_push` instead of `push` to skip text processing\n _push(stream, field(index, placeholder, stream.offset, stream.line, stream.column));\n}\n/**\n * Returns given tag name formatted according to given config\n */\nfunction tagName(name, config) {\n return strCase(name, config.options['output.tagCase']);\n}\n/**\n * Returns given attribute name formatted according to given config\n */\nfunction attrName(name, config) {\n return strCase(name, config.options['output.attributeCase']);\n}\n/**\n * Returns character for quoting value of given attribute\n */\nfunction attrQuote(attr, config, isOpen) {\n if (attr.valueType === 'expression') {\n return isOpen ? expressionStart : expressionEnd;\n }\n return config.options['output.attributeQuotes'] === 'single' ? '\\'' : '\"';\n}\n/**\n * Check if given attribute is boolean\n */\nfunction isBooleanAttribute(attr, config) {\n return attr.boolean\n || config.options['output.booleanAttributes'].includes((attr.name || '').toLowerCase());\n}\n/**\n * Returns a token for self-closing tag, depending on current options\n */\nfunction selfClose(config) {\n switch (config.options['output.selfClosingStyle']) {\n case 'xhtml': return ' /';\n case 'xml': return '/';\n default: return '';\n }\n}\n/**\n * Check if given tag name belongs to inline-level element\n * @param node Parsed node or tag name\n */\nfunction isInline(node, config) {\n if (typeof node === 'string') {\n return config.options.inlineElements.includes(node.toLowerCase());\n }\n // inline node is a node either with inline-level name or text-only node\n return node.name ? isInline(node.name, config) : Boolean(node.value && !node.attributes);\n}\n/**\n * Splits given text by lines\n */\nfunction splitByLines$1(text) {\n return text.split(/\\r\\n|\\r|\\n/g);\n}\n/**\n * Pushes raw string into output stream without any processing\n */\nfunction _push(stream, text) {\n stream.value += text;\n stream.offset += text.length;\n stream.column += text.length;\n}\nfunction strCase(str, type) {\n if (type) {\n return type === 'upper' ? str.toUpperCase() : str.toLowerCase();\n }\n return str;\n}\n\nconst elementMap = {\n p: 'span',\n ul: 'li',\n ol: 'li',\n table: 'tr',\n tr: 'td',\n tbody: 'tr',\n thead: 'tr',\n tfoot: 'tr',\n colgroup: 'col',\n select: 'option',\n optgroup: 'option',\n audio: 'source',\n video: 'source',\n object: 'param',\n map: 'area'\n};\nfunction implicitTag(node, ancestors, config) {\n if (!node.name && node.attributes) {\n resolveImplicitTag(node, ancestors, config);\n }\n}\nfunction resolveImplicitTag(node, ancestors, config) {\n const parent = getParentElement(ancestors);\n const contextName = config.context ? config.context.name : '';\n const parentName = lowercase(parent ? parent.name : contextName);\n node.name = elementMap[parentName]\n || (isInline(parentName, config) ? 'span' : 'div');\n}\nfunction lowercase(str) {\n return (str || '').toLowerCase();\n}\n/**\n * Returns closest element node from given ancestors list\n */\nfunction getParentElement(ancestors) {\n for (let i = ancestors.length - 1; i >= 0; i--) {\n const elem = ancestors[i];\n if (isNode(elem)) {\n return elem;\n }\n }\n}\n\nvar latin = {\n\t\"common\": [\"lorem\", \"ipsum\", \"dolor\", \"sit\", \"amet\", \"consectetur\", \"adipisicing\", \"elit\"],\n\t\"words\": [\"exercitationem\", \"perferendis\", \"perspiciatis\", \"laborum\", \"eveniet\",\n\t\t\"sunt\", \"iure\", \"nam\", \"nobis\", \"eum\", \"cum\", \"officiis\", \"excepturi\",\n\t\t\"odio\", \"consectetur\", \"quasi\", \"aut\", \"quisquam\", \"vel\", \"eligendi\",\n\t\t\"itaque\", \"non\", \"odit\", \"tempore\", \"quaerat\", \"dignissimos\",\n\t\t\"facilis\", \"neque\", \"nihil\", \"expedita\", \"vitae\", \"vero\", \"ipsum\",\n\t\t\"nisi\", \"animi\", \"cumque\", \"pariatur\", \"velit\", \"modi\", \"natus\",\n\t\t\"iusto\", \"eaque\", \"sequi\", \"illo\", \"sed\", \"ex\", \"et\", \"voluptatibus\",\n\t\t\"tempora\", \"veritatis\", \"ratione\", \"assumenda\", \"incidunt\", \"nostrum\",\n\t\t\"placeat\", \"aliquid\", \"fuga\", \"provident\", \"praesentium\", \"rem\",\n\t\t\"necessitatibus\", \"suscipit\", \"adipisci\", \"quidem\", \"possimus\",\n\t\t\"voluptas\", \"debitis\", \"sint\", \"accusantium\", \"unde\", \"sapiente\",\n\t\t\"voluptate\", \"qui\", \"aspernatur\", \"laudantium\", \"soluta\", \"amet\",\n\t\t\"quo\", \"aliquam\", \"saepe\", \"culpa\", \"libero\", \"ipsa\", \"dicta\",\n\t\t\"reiciendis\", \"nesciunt\", \"doloribus\", \"autem\", \"impedit\", \"minima\",\n\t\t\"maiores\", \"repudiandae\", \"ipsam\", \"obcaecati\", \"ullam\", \"enim\",\n\t\t\"totam\", \"delectus\", \"ducimus\", \"quis\", \"voluptates\", \"dolores\",\n\t\t\"molestiae\", \"harum\", \"dolorem\", \"quia\", \"voluptatem\", \"molestias\",\n\t\t\"magni\", \"distinctio\", \"omnis\", \"illum\", \"dolorum\", \"voluptatum\", \"ea\",\n\t\t\"quas\", \"quam\", \"corporis\", \"quae\", \"blanditiis\", \"atque\", \"deserunt\",\n\t\t\"laboriosam\", \"earum\", \"consequuntur\", \"hic\", \"cupiditate\",\n\t\t\"quibusdam\", \"accusamus\", \"ut\", \"rerum\", \"error\", \"minus\", \"eius\",\n\t\t\"ab\", \"ad\", \"nemo\", \"fugit\", \"officia\", \"at\", \"in\", \"id\", \"quos\",\n\t\t\"reprehenderit\", \"numquam\", \"iste\", \"fugiat\", \"sit\", \"inventore\",\n\t\t\"beatae\", \"repellendus\", \"magnam\", \"recusandae\", \"quod\", \"explicabo\",\n\t\t\"doloremque\", \"aperiam\", \"consequatur\", \"asperiores\", \"commodi\",\n\t\t\"optio\", \"dolor\", \"labore\", \"temporibus\", \"repellat\", \"veniam\",\n\t\t\"architecto\", \"est\", \"esse\", \"mollitia\", \"nulla\", \"a\", \"similique\",\n\t\t\"eos\", \"alias\", \"dolore\", \"tenetur\", \"deleniti\", \"porro\", \"facere\",\n\t\t\"maxime\", \"corrupti\"]\n};\n\nvar ru = {\n\t\"common\": [\"далеко-далеко\", \"за\", \"словесными\", \"горами\", \"в стране\", \"гласных\", \"и согласных\", \"живут\", \"рыбные\", \"тексты\"],\n\t\"words\": [\"вдали\", \"от всех\", \"они\", \"буквенных\", \"домах\", \"на берегу\", \"семантика\",\n\t\t\"большого\", \"языкового\", \"океана\", \"маленький\", \"ручеек\", \"даль\",\n\t\t\"журчит\", \"по всей\", \"обеспечивает\", \"ее\",\"всеми\", \"необходимыми\",\n\t\t\"правилами\", \"эта\", \"парадигматическая\", \"страна\", \"которой\", \"жаренные\",\n\t\t\"предложения\", \"залетают\", \"прямо\", \"рот\", \"даже\", \"всемогущая\",\n\t\t\"пунктуация\", \"не\", \"имеет\", \"власти\", \"над\", \"рыбными\", \"текстами\",\n\t\t\"ведущими\", \"безорфографичный\", \"образ\", \"жизни\", \"однажды\", \"одна\",\n\t\t\"маленькая\", \"строчка\",\"рыбного\", \"текста\", \"имени\", \"lorem\", \"ipsum\",\n\t\t\"решила\", \"выйти\", \"большой\", \"мир\", \"грамматики\", \"великий\", \"оксмокс\",\n\t\t\"предупреждал\", \"о\", \"злых\", \"запятых\", \"диких\", \"знаках\", \"вопроса\",\n\t\t\"коварных\", \"точках\", \"запятой\", \"но\", \"текст\", \"дал\", \"сбить\",\n\t\t\"себя\", \"толку\", \"он\", \"собрал\", \"семь\", \"своих\", \"заглавных\", \"букв\",\n\t\t\"подпоясал\", \"инициал\", \"за\", \"пояс\", \"пустился\", \"дорогу\",\n\t\t\"взобравшись\", \"первую\", \"вершину\", \"курсивных\", \"гор\", \"бросил\",\n\t\t\"последний\", \"взгляд\", \"назад\", \"силуэт\", \"своего\", \"родного\", \"города\",\n\t\t\"буквоград\", \"заголовок\", \"деревни\", \"алфавит\", \"подзаголовок\", \"своего\",\n\t\t\"переулка\", \"грустный\", \"реторический\", \"вопрос\", \"скатился\", \"его\",\n\t\t\"щеке\", \"продолжил\", \"свой\", \"путь\", \"дороге\", \"встретил\", \"рукопись\",\n\t\t\"она\", \"предупредила\", \"моей\", \"все\", \"переписывается\", \"несколько\",\n\t\t\"раз\", \"единственное\", \"что\", \"меня\", \"осталось\", \"это\", \"приставка\",\n\t\t\"возвращайся\", \"ты\", \"лучше\", \"свою\", \"безопасную\", \"страну\", \"послушавшись\",\n\t\t\"рукописи\", \"наш\", \"продолжил\", \"свой\", \"путь\", \"вскоре\", \"ему\",\n\t\t\"повстречался\", \"коварный\", \"составитель\", \"рекламных\", \"текстов\",\n\t\t\"напоивший\", \"языком\", \"речью\", \"заманивший\", \"свое\", \"агентство\",\n\t\t\"которое\", \"использовало\", \"снова\", \"снова\", \"своих\", \"проектах\",\n\t\t\"если\", \"переписали\", \"то\", \"живет\", \"там\", \"до\", \"сих\", \"пор\"]\n};\n\nvar sp = {\n\t\"common\": [\"mujer\", \"uno\", \"dolor\", \"más\", \"de\", \"poder\", \"mismo\", \"si\"],\n\t\"words\": [\"ejercicio\", \"preferencia\", \"perspicacia\", \"laboral\", \"paño\",\n\t\t\"suntuoso\", \"molde\", \"namibia\", \"planeador\", \"mirar\", \"demás\", \"oficinista\", \"excepción\",\n\t\t\"odio\", \"consecuencia\", \"casi\", \"auto\", \"chicharra\", \"velo\", \"elixir\",\n\t\t\"ataque\", \"no\", \"odio\", \"temporal\", \"cuórum\", \"dignísimo\",\n\t\t\"facilismo\", \"letra\", \"nihilista\", \"expedición\", \"alma\", \"alveolar\", \"aparte\",\n\t\t\"león\", \"animal\", \"como\", \"paria\", \"belleza\", \"modo\", \"natividad\",\n\t\t\"justo\", \"ataque\", \"séquito\", \"pillo\", \"sed\", \"ex\", \"y\", \"voluminoso\",\n\t\t\"temporalidad\", \"verdades\", \"racional\", \"asunción\", \"incidente\", \"marejada\",\n\t\t\"placenta\", \"amanecer\", \"fuga\", \"previsor\", \"presentación\", \"lejos\",\n\t\t\"necesariamente\", \"sospechoso\", \"adiposidad\", \"quindío\", \"pócima\",\n\t\t\"voluble\", \"débito\", \"sintió\", \"accesorio\", \"falda\", \"sapiencia\",\n\t\t\"volutas\", \"queso\", \"permacultura\", \"laudo\", \"soluciones\", \"entero\",\n\t\t\"pan\", \"litro\", \"tonelada\", \"culpa\", \"libertario\", \"mosca\", \"dictado\",\n\t\t\"reincidente\", \"nascimiento\", \"dolor\", \"escolar\", \"impedimento\", \"mínima\",\n\t\t\"mayores\", \"repugnante\", \"dulce\", \"obcecado\", \"montaña\", \"enigma\",\n\t\t\"total\", \"deletéreo\", \"décima\", \"cábala\", \"fotografía\", \"dolores\",\n\t\t\"molesto\", \"olvido\", \"paciencia\", \"resiliencia\", \"voluntad\", \"molestias\",\n\t\t\"magnífico\", \"distinción\", \"ovni\", \"marejada\", \"cerro\", \"torre\", \"y\",\n\t\t\"abogada\", \"manantial\", \"corporal\", \"agua\", \"crepúsculo\", \"ataque\", \"desierto\",\n\t\t\"laboriosamente\", \"angustia\", \"afortunado\", \"alma\", \"encefalograma\",\n\t\t\"materialidad\", \"cosas\", \"o\", \"renuncia\", \"error\", \"menos\", \"conejo\",\n\t\t\"abadía\", \"analfabeto\", \"remo\", \"fugacidad\", \"oficio\", \"en\", \"almácigo\", \"vos\", \"pan\",\n\t\t\"represión\", \"números\", \"triste\", \"refugiado\", \"trote\", \"inventor\",\n\t\t\"corchea\", \"repelente\", \"magma\", \"recusado\", \"patrón\", \"explícito\",\n\t\t\"paloma\", \"síndrome\", \"inmune\", \"autoinmune\", \"comodidad\",\n\t\t\"ley\", \"vietnamita\", \"demonio\", \"tasmania\", \"repeler\", \"apéndice\",\n\t\t\"arquitecto\", \"columna\", \"yugo\", \"computador\", \"mula\", \"a\", \"propósito\",\n\t\t\"fantasía\", \"alias\", \"rayo\", \"tenedor\", \"deleznable\", \"ventana\", \"cara\",\n\t\t\"anemia\", \"corrupto\"]\n};\n\nconst vocabularies = { ru, sp, latin };\nconst reLorem = /^lorem([a-z]*)(\\d*)(-\\d*)?$/i;\nfunction lorem(node, ancestors, config) {\n let m;\n if (node.name && (m = node.name.match(reLorem))) {\n const db = vocabularies[m[1]] || vocabularies.latin;\n const minWordCount = m[2] ? Math.max(1, Number(m[2])) : 30;\n const maxWordCount = m[3] ? Math.max(minWordCount, Number(m[3].slice(1))) : minWordCount;\n const wordCount = rand(minWordCount, maxWordCount);\n const repeat = node.repeat || findRepeater(ancestors);\n node.name = node.attributes = void 0;\n node.value = [paragraph(db, wordCount, !repeat || repeat.value === 0)];\n if (node.repeat && ancestors.length > 1) {\n resolveImplicitTag(node, ancestors, config);\n }\n }\n}\n/**\n * Returns random integer between <code>from</code> and <code>to</code> values\n */\nfunction rand(from, to) {\n return Math.floor(Math.random() * (to - from) + from);\n}\nfunction sample(arr, count) {\n const len = arr.length;\n const iterations = Math.min(len, count);\n const result = [];\n while (result.length < iterations) {\n const str = arr[rand(0, len)];\n if (!result.includes(str)) {\n result.push(str);\n }\n }\n return result;\n}\nfunction choice(val) {\n return val[rand(0, val.length - 1)];\n}\nfunction sentence(words, end) {\n if (words.length) {\n words = [capitalize(words[0])].concat(words.slice(1));\n }\n return words.join(' ') + (end || choice('?!...')); // more dots than question marks\n}\nfunction capitalize(word) {\n return word[0].toUpperCase() + word.slice(1);\n}\n/**\n * Insert commas at randomly selected words. This function modifies values\n * inside `words` array\n */\nfunction insertCommas(words) {\n if (words.length < 2) {\n return words;\n }\n words = words.slice();\n const len = words.length;\n const hasComma = /,$/;\n let totalCommas = 0;\n if (len > 3 && len <= 6) {\n totalCommas = rand(0, 1);\n }\n else if (len > 6 && len <= 12) {\n totalCommas = rand(0, 2);\n }\n else {\n totalCommas = rand(1, 4);\n }\n for (let i = 0, pos; i < totalCommas; i++) {\n pos = rand(0, len - 2);\n if (!hasComma.test(words[pos])) {\n words[pos] += ',';\n }\n }\n return words;\n}\n/**\n * Generate a paragraph of \"Lorem ipsum\" text\n * @param dict Words dictionary\n * @param wordCount Words count in paragraph\n * @param startWithCommon Should paragraph start with common \"lorem ipsum\" sentence.\n */\nfunction paragraph(dict, wordCount, startWithCommon) {\n const result = [];\n let totalWords = 0;\n let words;\n if (startWithCommon && dict.common) {\n words = dict.common.slice(0, wordCount);\n totalWords += words.length;\n result.push(sentence(insertCommas(words), '.'));\n }\n while (totalWords < wordCount) {\n words = sample(dict.words, Math.min(rand(2, 30), wordCount - totalWords));\n totalWords += words.length;\n result.push(sentence(insertCommas(words)));\n }\n return result.join(' ');\n}\nfunction findRepeater(ancestors) {\n for (let i = ancestors.length - 1; i >= 0; i--) {\n const element = ancestors[i];\n if (element.type === 'AbbreviationNode' && element.repeat) {\n return element.repeat;\n }\n }\n}\n\n/**\n * XSL transformer: removes `select` attributes from certain nodes that contain\n * children\n */\nfunction xsl(node) {\n if (matchesName(node.name) && node.attributes && (node.children.length || node.value)) {\n node.attributes = node.attributes.filter(isAllowed);\n }\n}\nfunction isAllowed(attr) {\n return attr.name !== 'select';\n}\nfunction matchesName(name) {\n return name === 'xsl:variable' || name === 'xsl:with-param';\n}\n\nconst reElement = /^(-+)([a-z0-9]+[a-z0-9-]*)/i;\nconst reModifier = /^(_+)([a-z0-9]+[a-z0-9-_]*)/i;\nconst blockCandidates1 = (className) => /^[a-z]\\-/i.test(className);\nconst blockCandidates2 = (className) => /^[a-z]/i.test(className);\nfunction bem(node, ancestors, config) {\n expandClassNames(node);\n expandShortNotation(node, ancestors, config);\n}\n/**\n * Expands existing class names in BEM notation in given `node`.\n * For example, if node contains `b__el_mod` class name, this method ensures\n * that element contains `b__el` class as well\n */\nfunction expandClassNames(node) {\n const data = getBEMData(node);\n const classNames = [];\n for (const cl of data.classNames) {\n // remove all modifiers and element prefixes from class name to get a base element name\n const ix = cl.indexOf('_');\n if (ix > 0 && !cl.startsWith('-')) {\n classNames.push(cl.slice(0, ix));\n classNames.push(cl.slice(ix));\n }\n else {\n classNames.push(cl);\n }\n }\n if (classNames.length) {\n data.classNames = classNames.filter(uniqueClass);\n data.block = findBlockName(data.classNames);\n updateClass(node, data.classNames.join(' '));\n }\n}\n/**\n * Expands short BEM notation, e.g. `-element` and `_modifier`\n */\nfunction expandShortNotation(node, ancestors, config) {\n const data = getBEMData(node);\n const classNames = [];\n const { options } = config;\n const path = ancestors.slice(1).concat(node);\n for (let cl of data.classNames) {\n let prefix = '';\n let m;\n const originalClass = cl;\n // parse element definition (could be only one)\n if (m = cl.match(reElement)) {\n prefix = getBlockName(path, m[1].length, config.context) + options['bem.element'] + m[2];\n classNames.push(prefix);\n cl = cl.slice(m[0].length);\n }\n // parse modifiers definitions\n if (m = cl.match(reModifier)) {\n if (!prefix) {\n prefix = getBlockName(path, m[1].length);\n classNames.push(prefix);\n }\n classNames.push(`${prefix}${options['bem.modifier']}${m[2]}`);\n cl = cl.slice(m[0].length);\n }\n if (cl === originalClass) {\n // class name wasn’t modified: it’s not a BEM-specific class,\n // add it as-is into output\n classNames.push(originalClass);\n }\n }\n const arrClassNames = classNames.filter(uniqueClass);\n if (arrClassNames.length) {\n updateClass(node, arrClassNames.join(' '));\n }\n}\n/**\n * Returns BEM data from given abbreviation node\n */\nfunction getBEMData(node) {\n if (!node._bem) {\n let classValue = '';\n if (node.attributes) {\n for (const attr of node.attributes) {\n if (attr.name === 'class' && attr.value) {\n classValue = stringifyValue(attr.value);\n break;\n }\n }\n }\n node._bem = parseBEM(classValue);\n }\n return node._bem;\n}\nfunction getBEMDataFromContext(context) {\n if (!context._bem) {\n context._bem = parseBEM(context.attributes && context.attributes.class || '');\n }\n return context._bem;\n}\n/**\n * Parses BEM data from given class name\n */\nfunction parseBEM(classValue) {\n const classNames = classValue ? classValue.split(/\\s+/) : [];\n return {\n classNames,\n block: findBlockName(classNames)\n };\n}\n/**\n * Returns block name for given `node` by `prefix`, which tells the depth of\n * of parent node lookup\n */\nfunction getBlockName(ancestors, depth = 0, context) {\n const maxParentIx = 0;\n let parentIx = Math.max(ancestors.length - depth, maxParentIx);\n do {\n const parent = ancestors[parentIx];\n if (parent) {\n const data = getBEMData(parent);\n if (data.block) {\n return data.block;\n }\n }\n } while (maxParentIx < parentIx--);\n if (context) {\n const data = getBEMDataFromContext(context);\n if (data.block) {\n return data.block;\n }\n }\n return '';\n}\nfunction findBlockName(classNames) {\n return find(classNames, blockCandidates1)\n || find(classNames, blockCandidates2)\n || void 0;\n}\n/**\n * Finds class name from given list which may be used as block name\n */\nfunction find(classNames, filter) {\n for (const cl of classNames) {\n if (reElement.test(cl) || reModifier.test(cl)) {\n break;\n }\n if (filter(cl)) {\n return cl;\n }\n }\n}\nfunction updateClass(node, value) {\n for (const attr of node.attributes) {\n if (attr.name === 'class') {\n attr.value = [value];\n break;\n }\n }\n}\nfunction stringifyValue(value) {\n let result = '';\n for (const t of value) {\n result += typeof t === 'string' ? t : t.name;\n }\n return result;\n}\nfunction uniqueClass(item, ix, arr) {\n return !!item && arr.indexOf(item) === ix;\n}\n\nfunction walk(abbr, visitor, state) {\n const callback = (ctx, index, items) => {\n const { parent, current } = state;\n state.parent = current;\n state.current = ctx;\n visitor(ctx, index, items, state, next);\n state.current = current;\n state.parent = parent;\n };\n const next = (node, index, items) => {\n state.ancestors.push(state.current);\n callback(node, index, items);\n state.ancestors.pop();\n };\n abbr.children.forEach(callback);\n}\nfunction createWalkState(config) {\n return {\n // @ts-ignore: Will set value in iterator\n current: null,\n parent: void 0,\n ancestors: [],\n config,\n field: 1,\n out: createOutputStream(config.options)\n };\n}\n\nconst caret = [{ type: 'Field', index: 0, name: '' }];\n/**\n * Check if given node is a snippet: a node without name and attributes\n */\nfunction isSnippet(node) {\n return node ? !node.name && !node.attributes : false;\n}\n/**\n * Check if given node is inline-level element, e.g. element with explicitly\n * defined node name\n */\nfunction isInlineElement(node, config) {\n return node ? isInline(node, config) : false;\n}\n/**\n * Check if given value token is a field\n */\nfunction isField(token) {\n return typeof token === 'object' && token.type === 'Field';\n}\nfunction pushTokens(tokens, state) {\n const { out } = state;\n let largestIndex = -1;\n for (const t of tokens) {\n if (typeof t === 'string') {\n pushString(out, t);\n }\n else {\n pushField(out, state.field + t.index, t.name);\n if (t.index > largestIndex) {\n largestIndex = t.index;\n }\n }\n }\n if (largestIndex !== -1) {\n state.field += largestIndex + 1;\n }\n}\n/**\n * Splits given value token by lines: returns array where each entry is a token list\n * for a single line\n */\nfunction splitByLines(tokens) {\n const result = [];\n let line = [];\n for (const t of tokens) {\n if (typeof t === 'string') {\n const lines = t.split(/\\r\\n?|\\n/g);\n line.push(lines.shift() || '');\n while (lines.length) {\n result.push(line);\n line = [lines.shift() || ''];\n }\n }\n else {\n line.push(t);\n }\n }\n line.length && result.push(line);\n return result;\n}\n/**\n * Check if given attribute should be outputted\n */\nfunction shouldOutputAttribute(attr) {\n // In case if attribute is implied, check if it has a defined value:\n // either non-empty value or quoted empty value\n return !attr.implied || attr.valueType !== 'raw' || (!!attr.value && attr.value.length > 0);\n}\n\nvar TemplateChars;\n(function (TemplateChars) {\n /** `[` character */\n TemplateChars[TemplateChars[\"Start\"] = 91] = \"Start\";\n /** `]` character */\n TemplateChars[TemplateChars[\"End\"] = 93] = \"End\";\n /* `_` character */\n TemplateChars[TemplateChars[\"Underscore\"] = 95] = \"Underscore\";\n /* `-` character */\n TemplateChars[TemplateChars[\"Dash\"] = 45] = \"Dash\";\n})(TemplateChars || (TemplateChars = {}));\n/**\n * Splits given string into template tokens.\n * Template is a string which contains placeholders which are uppercase names\n * between `[` and `]`, for example: `[PLACEHOLDER]`.\n * Unlike other templates, a placeholder may contain extra characters before and\n * after name: `[%PLACEHOLDER.]`. If data for `PLACEHOLDER` is defined, it will\n * be outputted with with these extra character, otherwise will be completely omitted.\n */\nfunction template(text) {\n const tokens = [];\n const scanner = { pos: 0, text };\n let placeholder;\n let offset = scanner.pos;\n let pos = scanner.pos;\n while (scanner.pos < scanner.text.length) {\n pos = scanner.pos;\n if (placeholder = consumePlaceholder(scanner)) {\n if (offset !== scanner.pos) {\n tokens.push(text.slice(offset, pos));\n }\n tokens.push(placeholder);\n offset = scanner.pos;\n }\n else {\n scanner.pos++;\n }\n }\n if (offset !== scanner.pos) {\n tokens.push(text.slice(offset));\n }\n return tokens;\n}\n/**\n * Consumes placeholder like `[#ID]` from given scanner\n */\nfunction consumePlaceholder(scanner) {\n if (peek$1(scanner) === TemplateChars.Start) {\n const start = ++scanner.pos;\n let namePos = start;\n let afterPos = start;\n let stack = 1;\n while (scanner.pos < scanner.text.length) {\n const code = peek$1(scanner);\n if (isTokenStart(code)) {\n namePos = scanner.pos;\n while (isToken(peek$1(scanner))) {\n scanner.pos++;\n }\n afterPos = scanner.pos;\n }\n else {\n if (code === TemplateChars.Start) {\n stack++;\n }\n else if (code === TemplateChars.End) {\n if (--stack === 0) {\n return {\n before: scanner.text.slice(start, namePos),\n after: scanner.text.slice(afterPos, scanner.pos++),\n name: scanner.text.slice(namePos, afterPos)\n };\n }\n }\n scanner.pos++;\n }\n }\n }\n}\nfunction peek$1(scanner, pos = scanner.pos) {\n return scanner.text.charCodeAt(pos);\n}\nfunction isTokenStart(code) {\n return code >= 65 && code <= 90; // A-Z\n}\nfunction isToken(code) {\n return isTokenStart(code)\n || (code > 47 && code < 58) /* 0-9 */\n || code === TemplateChars.Underscore\n || code === TemplateChars.Dash;\n}\n\nfunction createCommentState(config) {\n const { options } = config;\n return {\n enabled: options['comment.enabled'],\n trigger: options['comment.trigger'],\n before: options['comment.before'] ? template(options['comment.before']) : void 0,\n after: options['comment.after'] ? template(options['comment.after']) : void 0\n };\n}\n/**\n * Adds comment prefix for given node, if required\n */\nfunction commentNodeBefore(node, state) {\n if (shouldComment(node, state) && state.comment.before) {\n output(node, state.comment.before, state);\n }\n}\n/**\n * Adds comment suffix for given node, if required\n */\nfunction commentNodeAfter(node, state) {\n if (shouldComment(node, state) && state.comment.after) {\n output(node, state.comment.after, state);\n }\n}\n/**\n * Check if given node should be commented\n */\nfunction shouldComment(node, state) {\n const { comment } = state;\n if (!comment.enabled || !comment.trigger || !node.name || !node.attributes) {\n return false;\n }\n for (const attr of node.attributes) {\n if (attr.name && comment.trigger.includes(attr.name)) {\n return true;\n }\n }\n return false;\n}\n/**\n * Pushes given template tokens into output stream\n */\nfunction output(node, tokens, state) {\n const attrs = {};\n const { out } = state;\n // Collect attributes payload\n for (const attr of node.attributes) {\n if (attr.name && attr.value) {\n attrs[attr.name.toUpperCase()] = attr.value;\n }\n }\n // Output parsed tokens\n for (const token of tokens) {\n if (typeof token === 'string') {\n pushString(out, token);\n }\n else if (attrs[token.name]) {\n pushString(out, token.before);\n pushTokens(attrs[token.name], state);\n pushString(out, token.after);\n }\n }\n}\n\nconst htmlTagRegex = /^<([\\w\\-:]+)[\\s>]/;\nconst reservedKeywords = new Set([\n 'for', 'while', 'of', 'async', 'await', 'const', 'let', 'var', 'continue',\n 'break', 'debugger', 'do', 'export', 'import', 'in', 'instanceof', 'new', 'return',\n 'switch', 'this', 'throw', 'try', 'catch', 'typeof', 'void', 'with', 'yield'\n]);\nfunction html(abbr, config) {\n const state = createWalkState(config);\n state.comment = createCommentState(config);\n walk(abbr, element$1, state);\n return state.out.value;\n}\n/**\n * Outputs `node` content to output stream of `state`\n * @param node Context node\n * @param index Index of `node` in `items`\n * @param items List of `node`’s siblings\n * @param state Current walk state\n */\nfunction element$1(node, index, items, state, next) {\n const { out, config } = state;\n const format = shouldFormat$1(node, index, items, state);\n // Pick offset level for current node\n const level = getIndent(state);\n out.level += level;\n format && pushNewline(out, true);\n if (node.name) {\n const name = tagName(node.name, config);\n commentNodeBefore(node, state);\n pushString(out, `<${name}`);\n if (node.attributes) {\n for (const attr of node.attributes) {\n if (shouldOutputAttribute(attr)) {\n pushAttribute(attr, state);\n }\n }\n }\n if (node.selfClosing && !node.children.length && !node.value) {\n pushString(out, `${selfClose(config)}>`);\n }\n else {\n pushString(out, '>');\n if (!pushSnippet(node, state, next)) {\n if (node.value) {\n const innerFormat = node.value.some(hasNewline) || startsWithBlockTag(node.value, config);\n innerFormat && pushNewline(state.out, ++out.level);\n pushTokens(node.value, state);\n innerFormat && pushNewline(state.out, --out.level);\n }\n node.children.forEach(next);\n if (!node.value && !node.children.length) {\n const innerFormat = config.options['output.formatLeafNode']\n || config.options['output.formatForce'].includes(node.name);\n innerFormat && pushNewline(state.out, ++out.level);\n pushTokens(caret, state);\n innerFormat && pushNewline(state.out, --out.level);\n }\n }\n pushString(out, `</${name}>`);\n commentNodeAfter(node, state);\n }\n }\n else if (!pushSnippet(node, state, next) && node.value) {\n // A text-only node (snippet)\n pushTokens(node.value, state);\n node.children.forEach(next);\n }\n if (format && index === items.length - 1 && state.parent) {\n const offset = isSnippet(state.parent) ? 0 : 1;\n pushNewline(out, out.level - offset);\n }\n out.level -= level;\n}\n/**\n * Outputs given attribute’s content into output stream\n */\nfunction pushAttribute(attr, state) {\n const { out, config } = state;\n if (attr.name) {\n const attributes = config.options['markup.attributes'];\n const valuePrefix = config.options['markup.valuePrefix'];\n let { name, value } = attr;\n let lQuote = attrQuote(attr, config, true);\n let rQuote = attrQuote(attr, config);\n if (attributes) {\n name = getMultiValue(name, attributes, attr.multiple) || name;\n }\n name = attrName(name, config);\n const prefix = valuePrefix\n ? getMultiValue(attr.name, valuePrefix, attr.multiple)\n : null;\n if (prefix && (value === null || value === void 0 ? void 0 : value.length) === 1 && typeof value[0] === 'string') {\n // Add given prefix in object notation\n const val = value[0];\n value = [isPropKey(val) ? `${prefix}.${val}` : `${prefix}['${val}']`];\n if (config.options['jsx.enabled']) {\n lQuote = expressionStart;\n rQuote = expressionEnd;\n }\n }\n if (isBooleanAttribute(attr, config) && !value) {\n // If attribute value is omitted and it’s a boolean value, check for\n // `compactBoolean` option: if it’s disabled, set value to attribute name\n // (XML style)\n if (!config.options['output.compactBoolean']) {\n value = [name];\n }\n }\n else if (!value) {\n value = caret;\n }\n pushString(out, ' ' + name);\n if (value) {\n pushString(out, '=' + lQuote);\n pushTokens(value, state);\n pushString(out, rQuote);\n }\n else if (config.options['output.selfClosingStyle'] !== 'html') {\n pushString(out, '=' + lQuote + rQuote);\n }\n }\n}\nfunction pushSnippet(node, state, next) {\n if (node.value && node.children.length) {\n // We have a value and child nodes. In case if value contains fields,\n // we should output children as a content of first field\n const fieldIx = node.value.findIndex(isField);\n if (fieldIx !== -1) {\n pushTokens(node.value.slice(0, fieldIx), state);\n const line = state.out.line;\n let pos = fieldIx + 1;\n node.children.forEach(next);\n // If there was a line change, trim leading whitespace for better result\n if (state.out.line !== line && typeof node.value[pos] === 'string') {\n pushString(state.out, node.value[pos++].trimLeft());\n }\n pushTokens(node.value.slice(pos), state);\n return true;\n }\n }\n return false;\n}\n/**\n * Check if given node should be formatted in its parent context\n */\nfunction shouldFormat$1(node, index, items, state) {\n const { config, parent } = state;\n if (!config.options['output.format']) {\n return false;\n }\n if (index === 0 && !parent) {\n // Do not format very first node\n return false;\n }\n // Do not format single child of snippet\n if (parent && isSnippet(parent) && items.length === 1) {\n return false;\n }\n /**\n * Adjacent text-only/snippet nodes\n */\n if (isSnippet(node)) {\n // Adjacent text-only/snippet nodes\n const format = isSnippet(items[index - 1]) || isSnippet(items[index + 1])\n // Has newlines: looks like wrapping code fragment\n || node.value.some(hasNewline)\n // Format as wrapper: contains children which will be outputted as field content\n || (node.value.some(isField) && node.children.length);\n if (format) {\n return true;\n }\n }\n if (isInline(node, config)) {\n // Check if inline node is the next sibling of block-level node\n if (index === 0) {\n // First node in parent: format if it’s followed by a block-level element\n for (let i = 0; i < items.length; i++) {\n if (!isInline(items[i], config)) {\n return true;\n }\n }\n }\n else if (!isInline(items[index - 1], config)) {\n // Node is right after block-level element\n return true;\n }\n if (config.options['output.inlineBreak']) {\n // check for adjacent inline elements before and after current element\n let adjacentInline = 1;\n let before = index;\n let after = index;\n while (isInlineElement(items[--before], config)) {\n adjacentInline++;\n }\n while (isInlineElement(items[++after], config)) {\n adjacentInline++;\n }\n if (adjacentInline >= config.options['output.inlineBreak']) {\n return true;\n }\n }\n // Edge case: inline node contains node that should receive formatting\n for (let i = 0, il = node.children.length; i < il; i++) {\n if (shouldFormat$1(node.children[i], i, node.children, state)) {\n return true;\n }\n }\n return false;\n }\n return true;\n}\n/**\n * Returns indentation offset for given node\n */\nfunction getIndent(state) {\n const { config, parent } = state;\n if (!parent || isSnippet(parent) || (parent.name && config.options['output.formatSkip'].includes(parent.name))) {\n return 0;\n }\n return 1;\n}\n/**\n * Check if given node value contains newlines\n */\nfunction hasNewline(value) {\n return typeof value === 'string' && /\\r|\\n/.test(value);\n}\n/**\n * Check if given node value starts with block-level tag\n */\nfunction startsWithBlockTag(value, config) {\n if (value.length && typeof value[0] === 'string') {\n const matches = htmlTagRegex.exec(value[0]);\n if ((matches === null || matches === void 0 ? void 0 : matches.length) && !config.options['inlineElements'].includes(matches[1].toLowerCase())) {\n return true;\n }\n }\n return false;\n}\nfunction getMultiValue(key, data, multiple) {\n return (multiple && data[`${key}*`]) || data[key];\n}\nfunction isPropKey(name) {\n return !reservedKeywords.has(name) && /^[a-zA-Z_$][\\w_$]*$/.test(name);\n}\n\nfunction indentFormat(abbr, config, options) {\n const state = createWalkState(config);\n state.options = options || {};\n walk(abbr, element, state);\n return state.out.value;\n}\n/**\n * Outputs `node` content to output stream of `state`\n * @param node Context node\n * @param index Index of `node` in `items`\n * @param items List of `node`’s siblings\n * @param state Current walk state\n */\nfunction element(node, index, items, state, next) {\n const { out, options } = state;\n const { primary, secondary } = collectAttributes(node);\n // Pick offset level for current node\n const level = state.parent ? 1 : 0;\n out.level += level;\n // Do not indent top-level elements\n if (shouldFormat(node, index, items, state)) {\n pushNewline(out, true);\n }\n if (node.name && (node.name !== 'div' || !primary.length)) {\n pushString(out, (options.beforeName || '') + node.name + (options.afterName || ''));\n }\n pushPrimaryAttributes(primary, state);\n pushSecondaryAttributes(secondary.filter(shouldOutputAttribute), state);\n if (node.selfClosing && !node.value && !node.children.length) {\n if (state.options.selfClose) {\n pushString(out, state.options.selfClose);\n }\n }\n else {\n pushValue(node, state);\n node.children.forEach(next);\n }\n out.level -= level;\n}\n/**\n * From given node, collects all attributes as `primary` (id, class) and\n * `secondary` (all the rest) lists. In most indent-based syntaxes, primary attribute\n * has special syntax\n */\nfunction collectAttributes(node) {\n const primary = [];\n const secondary = [];\n if (node.attributes) {\n for (const attr of node.attributes) {\n if (isPrimaryAttribute(attr)) {\n primary.push(attr);\n }\n else {\n secondary.push(attr);\n }\n }\n }\n return { primary, secondary };\n}\n/**\n * Outputs given attributes as primary into output stream\n */\nfunction pushPrimaryAttributes(attrs, state) {\n for (const attr of attrs) {\n if (attr.value) {\n if (attr.name === 'class') {\n pushString(state.out, '.');\n // All whitespace characters must be replaced with dots in class names\n const tokens = attr.value.map(t => typeof t === 'string' ? t.replace(/\\s+/g, '.') : t);\n pushTokens(tokens, state);\n }\n else {\n // ID attribute\n pushString(state.out, '#');\n pushTokens(attr.value, state);\n }\n }\n }\n}\n/**\n * Outputs given attributes as secondary into output stream\n */\nfunction pushSecondaryAttributes(attrs, state) {\n if (attrs.length) {\n const { out, config, options } = state;\n options.beforeAttribute && pushString(out, options.beforeAttribute);\n for (let i = 0; i < attrs.length; i++) {\n const attr = attrs[i];\n pushString(out, attrName(attr.name || '', config));\n if (isBooleanAttribute(attr, config) && !attr.value) {\n if (!config.options['output.compactBoolean'] && options.booleanValue) {\n pushString(out, '=' + options.booleanValue);\n }\n }\n else {\n pushString(out, '=' + attrQuote(attr, config, true));\n pushTokens(attr.value || caret, state);\n pushString(out, attrQuote(attr, config));\n }\n if (i !== attrs.length - 1 && options.glueAttribute) {\n pushString(out, options.glueAttribute);\n }\n }\n options.afterAttribute && pushString(out, options.afterAttribute);\n }\n}\n/**\n * Outputs given node value into state output stream\n */\nfunction pushValue(node, state) {\n // We should either output value or add caret but for leaf nodes only (no children)\n if (!node.value && node.children.length) {\n return;\n }\n const value = node.value || caret;\n const lines = splitByLines(value);\n const { out, options } = state;\n if (lines.length === 1) {\n if (node.name || node.attributes) {\n push(out, ' ');\n }\n pushTokens(value, state);\n }\n else {\n // We should format multi-line value with terminating `|` character\n // and same line length\n const lineLengths = [];\n let maxLength = 0;\n // Calculate lengths of all lines and max line length\n for (const line of lines) {\n const len = valueLength(line);\n lineLengths.push(len);\n if (len > maxLength) {\n maxLength = len;\n }\n }\n // Output each line, padded to max length\n out.level++;\n for (let i = 0; i < lines.length; i++) {\n pushNewline(out, true);\n options.beforeTextLine && push(out, options.beforeTextLine);\n pushTokens(lines[i], state);\n if (options.afterTextLine) {\n push(out, ' '.repeat(maxLength - lineLengths[i]));\n push(out, options.afterTextLine);\n }\n }\n out.level--;\n }\n}\nfunction isPrimaryAttribute(attr) {\n return attr.name === 'class' || attr.name === 'id';\n}\n/**\n * Calculates string length from given tokens\n */\nfunction valueLength(tokens) {\n let len = 0;\n for (const token of tokens) {\n len += typeof token === 'string' ? token.length : token.name.length;\n }\n return len;\n}\nfunction shouldFormat(node, index, items, state) {\n // Do not format first top-level element or snippets\n if (!state.parent && index === 0) {\n return false;\n }\n return !isSnippet(node);\n}\n\nfunction haml(abbr, config) {\n return indentFormat(abbr, config, {\n beforeName: '%',\n beforeAttribute: '(',\n afterAttribute: ')',\n glueAttribute: ' ',\n afterTextLine: ' |',\n booleanValue: 'true',\n selfClose: '/'\n });\n}\n\nfunction slim(abbr, config) {\n return indentFormat(abbr, config, {\n beforeAttribute: ' ',\n glueAttribute: ' ',\n beforeTextLine: '| ',\n selfClose: '/'\n });\n}\n\nfunction pug(abbr, config) {\n return indentFormat(abbr, config, {\n beforeAttribute: '(',\n afterAttribute: ')',\n glueAttribute: ', ',\n beforeTextLine: '| ',\n selfClose: config.options['output.selfClosingStyle'] === 'xml' ? '/' : ''\n });\n}\n\nconst formatters = { html, haml, slim, pug };\n/**\n * Parses given Emmet abbreviation into a final abbreviation tree with all\n * required transformations applied\n */\nfunction parse$1(abbr, config) {\n let oldTextValue;\n if (typeof abbr === 'string') {\n const parseOpt = Object.assign({}, config);\n if (config.options['jsx.enabled']) {\n parseOpt.jsx = true;\n }\n if (config.options['markup.href']) {\n parseOpt.href = true;\n }\n abbr = parseAbbreviation(abbr, parseOpt);\n // remove text field before snippets(abbr, config) call\n // as abbreviation(abbr, parseOpt) already handled it\n oldTextValue = config.text;\n config.text = undefined;\n }\n // Run abbreviation resolve in two passes:\n // 1. Map each node to snippets, which are abbreviations as well. A single snippet\n // may produce multiple nodes\n // 2. Transform every resolved node\n abbr = resolveSnippets(abbr, config);\n walk$1(abbr, transform, config);\n config.text = oldTextValue !== null && oldTextValue !== void 0 ? oldTextValue : config.text;\n return abbr;\n}\n/**\n * Converts given abbreviation to string according to provided `config`\n */\nfunction stringify(abbr, config) {\n const formatter = formatters[config.syntax] || html;\n return formatter(abbr, config);\n}\n/**\n * Modifies given node and prepares it for output\n */\nfunction transform(node, ancestors, config) {\n implicitTag(node, ancestors, config);\n mergeAttributes(node, config);\n lorem(node, ancestors, config);\n if (config.syntax === 'xsl') {\n xsl(node);\n }\n if (config.options['bem.enabled']) {\n bem(node, ancestors, config);\n }\n}\n\nvar CSSSnippetType;\n(function (CSSSnippetType) {\n CSSSnippetType[\"Raw\"] = \"Raw\";\n CSSSnippetType[\"Property\"] = \"Property\";\n})(CSSSnippetType || (CSSSnippetType = {}));\nconst reProperty = /^([a-z-]+)(?:\\s*:\\s*([^\\n\\r;]+?);*)?$/;\nconst opt = { value: true };\n/**\n * Creates structure for holding resolved CSS snippet\n */\nfunction createSnippet(key, value) {\n // A snippet could be a raw text snippet (e.g. arbitrary text string) or a\n // CSS property with possible values separated by `|`.\n // In latter case, we have to parse snippet as CSS abbreviation\n const m = value.match(reProperty);\n if (m) {\n const keywords = {};\n const parsed = m[2] ? m[2].split('|').map(parseValue) : [];\n for (const item of parsed) {\n for (const cssVal of item) {\n collectKeywords(cssVal, keywords);\n }\n }\n return {\n type: CSSSnippetType.Property,\n key,\n property: m[1],\n value: parsed,\n keywords,\n dependencies: []\n };\n }\n return { type: CSSSnippetType.Raw, key, value };\n}\n/**\n * Nests more specific CSS properties into shorthand ones, e.g.\n * `background-position-x` -> `background-position` -> `background`\n */\nfunction nest(snippets) {\n snippets = snippets.slice().sort(snippetsSort);\n const stack = [];\n let prev;\n // For sorted list of CSS properties, create dependency graph where each\n // shorthand property contains its more specific one, e.g.\n // background -> background-position -> background-position-x\n for (const cur of snippets.filter(isProperty)) {\n // Check if current property belongs to one from parent stack.\n // Since `snippets` array is sorted, items are perfectly aligned\n // from shorthands to more specific variants\n while (stack.length) {\n prev = stack[stack.length - 1];\n if (cur.property.startsWith(prev.property)\n && cur.property.charCodeAt(prev.property.length) === 45 /* - */) {\n prev.dependencies.push(cur);\n stack.push(cur);\n break;\n }\n stack.pop();\n }\n if (!stack.length) {\n stack.push(cur);\n }\n }\n return snippets;\n}\n/**\n * A sorting function for array of snippets\n */\nfunction snippetsSort(a, b) {\n if (a.key === b.key) {\n return 0;\n }\n return a.key < b.key ? -1 : 1;\n}\nfunction parseValue(value) {\n return parse$2(value.trim(), opt)[0].value;\n}\nfunction isProperty(snippet) {\n return snippet.type === CSSSnippetType.Property;\n}\nfunction collectKeywords(cssVal, dest) {\n for (const v of cssVal.value) {\n if (v.type === 'Literal') {\n dest[v.value] = v;\n }\n else if (v.type === 'FunctionCall') {\n dest[v.name] = v;\n }\n else if (v.type === 'Field') {\n // Create literal from field, if available\n const value = v.name.trim();\n if (value) {\n dest[value] = { type: 'Literal', value };\n }\n }\n }\n}\n\n/**\n * Calculates how close `str1` matches `str2` using fuzzy match.\n * How matching works:\n * – first characters of both `str1` and `str2` *must* match\n * – `str1` length larger than `str2` length is allowed only when `unmatched` is true\n * – ideal match is when `str1` equals to `str2` (score: 1)\n * – next best match is `str2` starts with `str1` (score: 1 × percent of matched characters)\n * – other scores depend on how close characters of `str1` to the beginning of `str2`\n * @param partialMatch Allow length `str1` to be greater than `str2` length\n */\nfunction scoreMatch(str1, str2, partialMatch = false) {\n str1 = str1.toLowerCase();\n str2 = str2.toLowerCase();\n if (str1 === str2) {\n return 1;\n }\n // Both strings MUST start with the same character\n if (!str1 || !str2 || str1.charCodeAt(0) !== str2.charCodeAt(0)) {\n return 0;\n }\n const str1Len = str1.length;\n const str2Len = str2.length;\n if (!partialMatch && str1Len > str2Len) {\n return 0;\n }\n // Characters from `str1` which are closer to the beginning of a `str2` should\n // have higher score.\n // For example, if `str2` is `abcde`, it’s max score is:\n // 5 + 4 + 3 + 2 + 1 = 15 (sum of character positions in reverse order)\n // Matching `abd` against `abcde` should produce:\n // 5 + 4 + 2 = 11\n // Acronym bonus for match right after `-`. Matching `abd` against `abc-de`\n // should produce:\n // 6 + 5 + 4 (use `d` position in `abd`, not in abc-de`)\n const minLength = Math.min(str1Len, str2Len);\n const maxLength = Math.max(str1Len, str2Len);\n let i = 1;\n let j = 1;\n let score = maxLength;\n let ch1 = 0;\n let ch2 = 0;\n let found = false;\n let acronym = false;\n while (i < str1Len) {\n ch1 = str1.charCodeAt(i);\n found = false;\n acronym = false;\n while (j < str2Len) {\n ch2 = str2.charCodeAt(j);\n if (ch1 === ch2) {\n found = true;\n score += maxLength - (acronym ? i : j);\n break;\n }\n // add acronym bonus for exactly next match after unmatched `-`\n acronym = ch2 === 45 /* - */;\n j++;\n }\n if (!found) {\n if (!partialMatch) {\n return 0;\n }\n break;\n }\n i++;\n }\n const matchRatio = i / maxLength;\n const delta = maxLength - minLength;\n const maxScore = sum(maxLength) - sum(delta);\n return (score * matchRatio) / maxScore;\n}\n/**\n * Calculates sum of first `n` numbers, e.g. 1+2+3+...n\n */\nfunction sum(n) {\n return n * (n + 1) / 2;\n}\n\nfunction color(token, shortHex) {\n if (!token.r && !token.g && !token.b && !token.a) {\n return 'transparent';\n }\n else if (token.a === 1) {\n return asHex(token, shortHex);\n }\n return asRGB(token);\n}\n/**\n * Output given color as hex value\n * @param short Produce short value (e.g. #fff instead of #ffffff), if possible\n */\nfunction asHex(token, short) {\n const fn = (short && isShortHex(token.r) && isShortHex(token.g) && isShortHex(token.b))\n ? toShortHex : toHex;\n return '#' + fn(token.r) + fn(token.g) + fn(token.b);\n}\n/**\n * Output current color as `rgba?(...)` CSS color\n */\nfunction asRGB(token) {\n const values = [token.r, token.g, token.b];\n if (token.a !== 1) {\n values.push(frac(token.a, 8));\n }\n return `${values.length === 3 ? 'rgb' : 'rgba'}(${values.join(', ')})`;\n}\nfunction frac(num, digits = 4) {\n return num.toFixed(digits).replace(/\\.?0+$/, '');\n}\nfunction isShortHex(hex) {\n return !(hex % 17);\n}\nfunction toShortHex(num) {\n return (num >> 4).toString(16);\n}\nfunction toHex(num) {\n return pad(num.toString(16), 2);\n}\nfunction pad(value, len) {\n while (value.length < len) {\n value = '0' + value;\n }\n return value;\n}\n\nconst CSSAbbreviationScope = {\n /** Include all possible snippets in match */\n Global: '@@global',\n /** Include raw snippets only (e.g. no properties) in abbreviation match */\n Section: '@@section',\n /** Include properties only in abbreviation match */\n Property: '@@property',\n /** Resolve abbreviation in context of CSS property value */\n Value: '@@value',\n};\nfunction css(abbr, config) {\n var _a;\n const out = createOutputStream(config.options);\n const format = config.options['output.format'];\n if (((_a = config.context) === null || _a === void 0 ? void 0 : _a.name) === CSSAbbreviationScope.Section) {\n // For section context, filter out unmatched snippets\n abbr = abbr.filter(node => node.snippet);\n }\n for (let i = 0; i < abbr.length; i++) {\n if (format && i !== 0) {\n pushNewline(out, true);\n }\n property(abbr[i], out, config);\n }\n return out.value;\n}\n/**\n * Outputs given abbreviation node into output stream\n */\nfunction property(node, out, config) {\n const isJSON = config.options['stylesheet.json'];\n if (node.name) {\n // It’s a CSS property\n const name = isJSON ? toCamelCase(node.name) : node.name;\n pushString(out, name + config.options['stylesheet.between']);\n if (node.value.length) {\n propertyValue(node, out, config);\n }\n else {\n pushField(out, 0, '');\n }\n if (isJSON) {\n // For CSS-in-JS, always finalize property with comma\n // NB: seems like `important` is not available in CSS-in-JS syntaxes\n push(out, ',');\n }\n else {\n outputImportant(node, out, true);\n push(out, config.options['stylesheet.after']);\n }\n }\n else {\n // It’s a regular snippet, output plain tokens without any additional formatting\n for (const cssVal of node.value) {\n for (const v of cssVal.value) {\n outputToken(v, out, config);\n }\n }\n outputImportant(node, out, node.value.length > 0);\n }\n}\nfunction propertyValue(node, out, config) {\n const isJSON = config.options['stylesheet.json'];\n const num = isJSON ? getSingleNumeric(node) : null;\n if (num && (!num.unit || num.unit === 'px')) {\n // For CSS-in-JS, if property contains single numeric value, output it\n // as JS number\n push(out, String(num.value));\n }\n else {\n const quote = getQuote(config);\n isJSON && push(out, quote);\n for (let i = 0; i < node.value.length; i++) {\n if (i !== 0) {\n push(out, ', ');\n }\n outputValue(node.value[i], out, config);\n }\n isJSON && push(out, quote);\n }\n}\nfunction outputImportant(node, out, separator) {\n if (node.important) {\n if (separator) {\n push(out, ' ');\n }\n push(out, '!important');\n }\n}\nfunction outputValue(value, out, config) {\n for (let i = 0, prevEnd = -1; i < value.value.length; i++) {\n const token = value.value[i];\n // Handle edge case: a field is written close to previous token like this: `foo${bar}`.\n // We should not add delimiter here\n if (i !== 0 && (token.type !== 'Field' || token.start !== prevEnd)) {\n push(out, ' ');\n }\n outputToken(token, out, config);\n prevEnd = token['end'];\n }\n}\nfunction outputToken(token, out, config) {\n if (token.type === 'ColorValue') {\n push(out, color(token, config.options['stylesheet.shortHex']));\n }\n else if (token.type === 'Literal' || token.type === 'CustomProperty') {\n pushString(out, token.value);\n }\n else if (token.type === 'NumberValue') {\n pushString(out, frac(token.value, 4) + token.unit);\n }\n else if (token.type === 'StringValue') {\n const quote = token.quote === 'double' ? '\"' : '\\'';\n pushString(out, quote + token.value + quote);\n }\n else if (token.type === 'Field') {\n pushField(out, token.index, token.name);\n }\n else if (token.type === 'FunctionCall') {\n push(out, token.name + '(');\n for (let i = 0; i < token.arguments.length; i++) {\n if (i) {\n push(out, ', ');\n }\n outputValue(token.arguments[i], out, config);\n }\n push(out, ')');\n }\n}\n/**\n * If value of given property is a single numeric value, returns this token\n */\nfunction getSingleNumeric(node) {\n if (node.value.length === 1) {\n const cssVal = node.value[0];\n if (cssVal.value.length === 1 && cssVal.value[0].type === 'NumberValue') {\n return cssVal.value[0];\n }\n }\n}\n/**\n * Converts kebab-case string to camelCase\n */\nfunction toCamelCase(str) {\n return str.replace(/\\-(\\w)/g, (_, letter) => letter.toUpperCase());\n}\nfunction getQuote(config) {\n return config.options['stylesheet.jsonDoubleQuotes'] ? '\"' : '\\'';\n}\n\nconst gradientName = 'lg';\n/**\n * Parses given Emmet abbreviation into a final abbreviation tree with all\n * required transformations applied\n */\nfunction parse(abbr, config) {\n var _a;\n const snippets = ((_a = config.cache) === null || _a === void 0 ? void 0 : _a.stylesheetSnippets) || convertSnippets(config.snippets);\n if (config.cache) {\n config.cache.stylesheetSnippets = snippets;\n }\n if (typeof abbr === 'string') {\n abbr = parse$2(abbr, { value: isValueScope(config) });\n }\n const filteredSnippets = getSnippetsForScope(snippets, config);\n for (const node of abbr) {\n resolveNode(node, filteredSnippets, config);\n }\n return abbr;\n}\n/**\n * Converts given raw snippets into internal snippets representation\n */\nfunction convertSnippets(snippets) {\n const result = [];\n for (const key of Object.keys(snippets)) {\n result.push(createSnippet(key, snippets[key]));\n }\n return nest(result);\n}\n/**\n * Resolves given node: finds matched CSS snippets using fuzzy match and resolves\n * keyword aliases from node value\n */\nfunction resolveNode(node, snippets, config) {\n if (!resolveGradient(node, config)) {\n const score = config.options['stylesheet.fuzzySearchMinScore'];\n if (isValueScope(config)) {\n // Resolve as value of given CSS property\n const propName = config.context.name;\n const snippet = snippets.find(s => s.type === CSSSnippetType.Property && s.property === propName);\n resolveValueKeywords(node, config, snippet, score);\n node.snippet = snippet;\n }\n else if (node.name) {\n const snippet = findBestMatch(node.name, snippets, score, true);\n node.snippet = snippet;\n if (snippet) {\n if (snippet.type === CSSSnippetType.Property) {\n resolveAsProperty(node, snippet, config);\n }\n else {\n resolveAsSnippet(node, snippet);\n }\n }\n }\n }\n if (node.name || config.context) {\n // Resolve numeric values for CSS properties only\n resolveNumericValue(node, config);\n }\n return node;\n}\n/**\n * Resolves CSS gradient shortcut from given property, if possible\n */\nfunction resolveGradient(node, config) {\n let gradientFn = null;\n const cssVal = node.value.length === 1 ? node.value[0] : null;\n if (cssVal && cssVal.value.length === 1) {\n const v = cssVal.value[0];\n if (v.type === 'FunctionCall' && v.name === gradientName) {\n gradientFn = v;\n }\n }\n if (gradientFn || node.name === gradientName) {\n if (!gradientFn) {\n gradientFn = {\n type: 'FunctionCall',\n name: 'linear-gradient',\n arguments: [cssValue(field(0, ''))]\n };\n }\n else {\n gradientFn = Object.assign(Object.assign({}, gradientFn), { name: 'linear-gradient' });\n }\n if (!config.context) {\n node.name = 'background-image';\n }\n node.value = [cssValue(gradientFn)];\n return true;\n }\n return false;\n}\n/**\n * Resolves given parsed abbreviation node as CSS property\n */\nfunction resolveAsProperty(node, snippet, config) {\n const abbr = node.name;\n // Check for unmatched part of abbreviation\n // For example, in `dib` abbreviation the matched part is `d` and `ib` should\n // be considered as inline value. If unmatched fragment exists, we should check\n // if it matches actual value of snippet. If either explicit value is specified\n // or unmatched fragment did not resolve to to a keyword, we should consider\n // matched snippet as invalid\n const inlineValue = getUnmatchedPart(abbr, snippet.key);\n if (inlineValue) {\n if (node.value.length) {\n // Already have value: unmatched part indicates matched snippet is invalid\n return node;\n }\n const kw = resolveKeyword(inlineValue, config, snippet);\n if (!kw) {\n return node;\n }\n node.value.push(cssValue(kw));\n }\n node.name = snippet.property;\n if (node.value.length) {\n // Replace keyword alias from current abbreviation node with matched keyword\n resolveValueKeywords(node, config, snippet);\n }\n else if (snippet.value.length) {\n const defaultValue = snippet.value[0];\n // https://github.com/emmetio/emmet/issues/558\n // We should auto-select inserted value only if there’s multiple value\n // choice\n node.value = snippet.value.length === 1 || defaultValue.some(hasField)\n ? defaultValue\n : defaultValue.map(n => wrapWithField(n, config));\n }\n return node;\n}\nfunction resolveValueKeywords(node, config, snippet, minScore) {\n for (const cssVal of node.value) {\n const value = [];\n for (const token of cssVal.value) {\n if (token.type === 'Literal') {\n value.push(resolveKeyword(token.value, config, snippet, minScore) || token);\n }\n else if (token.type === 'FunctionCall') {\n // For function calls, we should find matching function call\n // and merge arguments\n const match = resolveKeyword(token.name, config, snippet, minScore);\n if (match && match.type === 'FunctionCall') {\n value.push(Object.assign(Object.assign({}, match), { arguments: token.arguments.concat(match.arguments.slice(token.arguments.length)) }));\n }\n else {\n value.push(token);\n }\n }\n else {\n value.push(token);\n }\n }\n cssVal.value = value;\n }\n}\n/**\n * Resolves given parsed abbreviation node as a snippet: a plain code chunk\n */\nfunction resolveAsSnippet(node, snippet) {\n // When resolving snippets, we have to do the following:\n // 1. Replace field placeholders with actual field tokens.\n // 2. If input values given, put them instead of fields\n let offset = 0;\n let m;\n const reField = /\\$\\{(\\d+)(:[^}]+)?\\}/g;\n const inputValue = node.value[0];\n const outputValue = [];\n while (m = reField.exec(snippet.value)) {\n if (offset !== m.index) {\n outputValue.push(literal(snippet.value.slice(offset, m.index)));\n }\n offset = m.index + m[0].length;\n if (inputValue && inputValue.value.length) {\n outputValue.push(inputValue.value.shift());\n }\n else {\n outputValue.push(field(Number(m[1]), m[2] ? m[2].slice(1) : ''));\n }\n }\n const tail = snippet.value.slice(offset);\n if (tail) {\n outputValue.push(literal(tail));\n }\n node.name = void 0;\n node.value = [cssValue(...outputValue)];\n return node;\n}\n/**\n * Finds best matching item from `items` array\n * @param abbr Abbreviation to match\n * @param items List of items for match\n * @param minScore The minimum score the best matched item should have to be a valid match.\n */\nfunction findBestMatch(abbr, items, minScore = 0, partialMatch = false) {\n let matchedItem = null;\n let maxScore = 0;\n for (const item of items) {\n const score = scoreMatch(abbr, getScoringPart(item), partialMatch);\n if (score === 1) {\n // direct hit, no need to look further\n return item;\n }\n if (score && score >= maxScore) {\n maxScore = score;\n matchedItem = item;\n }\n }\n return maxScore >= minScore ? matchedItem : null;\n}\nfunction getScoringPart(item) {\n return typeof item === 'string' ? item : item.key;\n}\n/**\n * Returns a part of `abbr` that wasn’t directly matched against `str`.\n * For example, if abbreviation `poas` is matched against `position`,\n * the unmatched part will be `as` since `a` wasn’t found in string stream\n */\nfunction getUnmatchedPart(abbr, str) {\n for (let i = 0, lastPos = 0; i < abbr.length; i++) {\n lastPos = str.indexOf(abbr[i], lastPos);\n if (lastPos === -1) {\n return abbr.slice(i);\n }\n lastPos++;\n }\n return '';\n}\n/**\n * Resolves given keyword shorthand into matched snippet keyword or global keyword,\n * if possible\n */\nfunction resolveKeyword(kw, config, snippet, minScore) {\n let ref;\n if (snippet) {\n if (ref = findBestMatch(kw, Object.keys(snippet.keywords), minScore)) {\n return snippet.keywords[ref];\n }\n for (const dep of snippet.dependencies) {\n if (ref = findBestMatch(kw, Object.keys(dep.keywords), minScore)) {\n return dep.keywords[ref];\n }\n }\n }\n if (ref = findBestMatch(kw, config.options['stylesheet.keywords'], minScore)) {\n return literal(ref);\n }\n return null;\n}\n/**\n * Resolves numeric values in given abbreviation node\n */\nfunction resolveNumericValue(node, config) {\n const aliases = config.options['stylesheet.unitAliases'];\n const unitless = config.options['stylesheet.unitless'];\n for (const v of node.value) {\n for (const t of v.value) {\n if (t.type === 'NumberValue') {\n if (t.unit) {\n t.unit = aliases[t.unit] || t.unit;\n }\n else if (t.value !== 0 && !unitless.includes(node.name)) {\n t.unit = t.rawValue.includes('.')\n ? config.options['stylesheet.floatUnit']\n : config.options['stylesheet.intUnit'];\n }\n }\n }\n }\n}\n/**\n * Constructs CSS value token\n */\nfunction cssValue(...args) {\n return {\n type: 'CSSValue',\n value: args\n };\n}\n/**\n * Constructs literal token\n */\nfunction literal(value) {\n return { type: 'Literal', value };\n}\n/**\n * Constructs field token\n */\nfunction field(index, name) {\n return { type: 'Field', index, name };\n}\n/**\n * Check if given value contains fields\n */\nfunction hasField(value) {\n for (const v of value.value) {\n if (v.type === 'Field' || (v.type === 'FunctionCall' && v.arguments.some(hasField))) {\n return true;\n }\n }\n return false;\n}\n/**\n * Wraps tokens of given abbreviation with fields\n */\nfunction wrapWithField(node, config, state = { index: 1 }) {\n let value = [];\n for (const v of node.value) {\n switch (v.type) {\n case 'ColorValue':\n value.push(field(state.index++, color(v, config.options['stylesheet.shortHex'])));\n break;\n case 'Literal':\n value.push(field(state.index++, v.value));\n break;\n case 'NumberValue':\n value.push(field(state.index++, `${v.value}${v.unit}`));\n break;\n case 'StringValue':\n const q = v.quote === 'single' ? '\\'' : '\"';\n value.push(field(state.index++, q + v.value + q));\n break;\n case 'FunctionCall':\n value.push(field(state.index++, v.name), literal('('));\n for (let i = 0, il = v.arguments.length; i < il; i++) {\n value = value.concat(wrapWithField(v.arguments[i], config, state).value);\n if (i !== il - 1) {\n value.push(literal(', '));\n }\n }\n value.push(literal(')'));\n break;\n default:\n value.push(v);\n }\n }\n return Object.assign(Object.assign({}, node), { value });\n}\n/**\n * Check if abbreviation should be expanded in CSS value context\n */\nfunction isValueScope(config) {\n if (config.context) {\n return config.context.name === CSSAbbreviationScope.Value || !config.context.name.startsWith('@@');\n }\n return false;\n}\n/**\n * Returns snippets for given scope\n */\nfunction getSnippetsForScope(snippets, config) {\n if (config.context) {\n if (config.context.name === CSSAbbreviationScope.Section) {\n return snippets.filter(s => s.type === CSSSnippetType.Raw);\n }\n if (config.context.name === CSSAbbreviationScope.Property) {\n return snippets.filter(s => s.type === CSSSnippetType.Property);\n }\n }\n return snippets;\n}\n\nvar markupSnippets = {\n\t\"a\": \"a[href]\",\n\t\"a:blank\": \"a[href='http://${0}' target='_blank' rel='noopener noreferrer']\",\n\t\"a:link\": \"a[href='http://${0}']\",\n\t\"a:mail\": \"a[href='mailto:${0}']\",\n\t\"a:tel\": \"a[href='tel:+${0}']\",\n\t\"abbr\": \"abbr[title]\",\n\t\"acr|acronym\": \"acronym[title]\",\n\t\"base\": \"base[href]/\",\n\t\"basefont\": \"basefont/\",\n\t\"br\": \"br/\",\n\t\"frame\": \"frame/\",\n\t\"hr\": \"hr/\",\n\t\"bdo\": \"bdo[dir]\",\n\t\"bdo:r\": \"bdo[dir=rtl]\",\n\t\"bdo:l\": \"bdo[dir=ltr]\",\n\t\"col\": \"col/\",\n\t\"link\": \"link[rel=stylesheet href]/\",\n\t\"link:css\": \"link[href='${1:style}.css']\",\n\t\"link:print\": \"link[href='${1:print}.css' media=print]\",\n\t\"link:favicon\": \"link[rel='shortcut icon' type=image/x-icon href='${1:favicon.ico}']\",\n\t\"link:mf|link:manifest\": \"link[rel='manifest' href='${1:manifest.json}']\",\n\t\"link:touch\": \"link[rel=apple-touch-icon href='${1:favicon.png}']\",\n\t\"link:rss\": \"link[rel=alternate type=application/rss+xml title=RSS href='${1:rss.xml}']\",\n\t\"link:atom\": \"link[rel=alternate type=application/atom+xml title=Atom href='${1:atom.xml}']\",\n\t\"link:im|link:import\": \"link[rel=import href='${1:component}.html']\",\n\t\"meta\": \"meta/\",\n\t\"meta:utf\": \"meta[http-equiv=Content-Type content='text/html;charset=UTF-8']\",\n\t\"meta:vp\": \"meta[name=viewport content='width=${1:device-width}, initial-scale=${2:1.0}']\",\n\t\"meta:compat\": \"meta[http-equiv=X-UA-Compatible content='${1:IE=7}']\",\n\t\"meta:edge\": \"meta:compat[content='${1:ie=edge}']\",\n\t\"meta:redirect\": \"meta[http-equiv=refresh content='0; url=${1:http://example.com}']\",\n\t\"meta:refresh\": \"meta[http-equiv=refresh content='${1:5}']\",\n\t\"meta:kw\": \"meta[name=keywords content]\",\n\t\"meta:desc\": \"meta[name=description content]\",\n\t\"style\": \"style\",\n\t\"script\": \"script\",\n\t\"script:src\": \"script[src]\",\n\t\"script:module\": \"script[type=module src]\",\n\t\"img\": \"img[src alt]/\",\n\t\"img:s|img:srcset\": \"img[srcset src alt]\",\n\t\"img:z|img:sizes\": \"img[sizes srcset src alt]\",\n\t\"picture\": \"picture\",\n\t\"src|source\": \"source/\",\n\t\"src:sc|source:src\": \"source[src type]\",\n\t\"src:s|source:srcset\": \"source[srcset]\",\n\t\"src:t|source:type\": \"source[srcset type='${1:image/}']\",\n\t\"src:z|source:sizes\": \"source[sizes srcset]\",\n\t\"src:m|source:media\": \"source[media='(${1:min-width: })' srcset]\",\n\t\"src:mt|source:media:type\": \"source:media[type='${2:image/}']\",\n\t\"src:mz|source:media:sizes\": \"source:media[sizes srcset]\",\n\t\"src:zt|source:sizes:type\": \"source[sizes srcset type='${1:image/}']\",\n\t\"iframe\": \"iframe[src frameborder=0]\",\n\t\"embed\": \"embed[src type]/\",\n\t\"object\": \"object[data type]\",\n\t\"param\": \"param[name value]/\",\n\t\"map\": \"map[name]\",\n\t\"area\": \"area[shape coords href alt]/\",\n\t\"area:d\": \"area[shape=default]\",\n\t\"area:c\": \"area[shape=circle]\",\n\t\"area:r\": \"area[shape=rect]\",\n\t\"area:p\": \"area[shape=poly]\",\n\t\"form\": \"form[action]\",\n\t\"form:get\": \"form[method=get]\",\n\t\"form:post\": \"form[method=post]\",\n\t\"label\": \"label[for]\",\n\t\"input\": \"input[type=${1:text}]/\",\n\t\"inp\": \"input[name=${1} id=${1}]\",\n\t\"input:h|input:hidden\": \"input[type=hidden name]\",\n\t\"input:t|input:text\": \"inp[type=text]\",\n\t\"input:search\": \"inp[type=search]\",\n\t\"input:email\": \"inp[type=email]\",\n\t\"input:url\": \"inp[type=url]\",\n\t\"input:p|input:password\": \"inp[type=password]\",\n\t\"input:datetime\": \"inp[type=datetime]\",\n\t\"input:date\": \"inp[type=date]\",\n\t\"input:datetime-local\": \"inp[type=datetime-local]\",\n\t\"input:month\": \"inp[type=month]\",\n\t\"input:week\": \"inp[type=week]\",\n\t\"input:time\": \"inp[type=time]\",\n\t\"input:tel\": \"inp[type=tel]\",\n\t\"input:number\": \"inp[type=number]\",\n\t\"input:color\": \"inp[type=color]\",\n\t\"input:c|input:checkbox\": \"inp[type=checkbox]\",\n\t\"input:r|input:radio\": \"inp[type=radio]\",\n\t\"input:range\": \"inp[type=range]\",\n\t\"input:f|input:file\": \"inp[type=file]\",\n\t\"input:s|input:submit\": \"input[type=submit value]\",\n\t\"input:i|input:image\": \"input[type=image src alt]\",\n\t\"input:b|input:btn|input:button\": \"input[type=button value]\",\n\t\"input:reset\": \"input:button[type=reset]\",\n\t\"isindex\": \"isindex/\",\n\t\"select\": \"select[name=${1} id=${1}]\",\n\t\"select:d|select:disabled\": \"select[disabled.]\",\n\t\"opt|option\": \"option[value]\",\n\t\"textarea\": \"textarea[name=${1} id=${1} cols=${2:30} rows=${3:10}]\",\n\t\"marquee\": \"marquee[behavior direction]\",\n\t\"menu:c|menu:context\": \"menu[type=context]\",\n\t\"menu:t|menu:toolbar\": \"menu[type=toolbar]\",\n\t\"video\": \"video[src]\",\n\t\"audio\": \"audio[src]\",\n\t\"html:xml\": \"html[xmlns=http://www.w3.org/1999/xhtml]\",\n\t\"keygen\": \"keygen/\",\n\t\"command\": \"command/\",\n\t\"btn:s|button:s|button:submit\" : \"button[type=submit]\",\n\t\"btn:r|button:r|button:reset\" : \"button[type=reset]\",\n\t\"btn:b|button:b|button:button\" : \"button[type=button]\",\n\t\"btn:d|button:d|button:disabled\" : \"button[disabled.]\",\n\t\"fst:d|fset:d|fieldset:d|fieldset:disabled\" : \"fieldset[disabled.]\",\n\n\t\"bq\": \"blockquote\",\n\t\"fig\": \"figure\",\n\t\"figc\": \"figcaption\",\n\t\"pic\": \"picture\",\n\t\"ifr\": \"iframe\",\n\t\"emb\": \"embed\",\n\t\"obj\": \"object\",\n\t\"cap\": \"caption\",\n\t\"colg\": \"colgroup\",\n\t\"fst\": \"fieldset\",\n\t\"btn\": \"button\",\n\t\"optg\": \"optgroup\",\n\t\"tarea\": \"textarea\",\n\t\"leg\": \"legend\",\n\t\"sect\": \"section\",\n\t\"art\": \"article\",\n\t\"hdr\": \"header\",\n\t\"ftr\": \"footer\",\n\t\"adr\": \"address\",\n\t\"dlg\": \"dialog\",\n\t\"str\": \"strong\",\n\t\"prog\": \"progress\",\n\t\"mn\": \"main\",\n\t\"tem\": \"template\",\n\t\"fset\": \"fieldset\",\n\t\"datag\": \"datagrid\",\n\t\"datal\": \"datalist\",\n\t\"kg\": \"keygen\",\n\t\"out\": \"output\",\n\t\"det\": \"details\",\n\t\"sum\": \"summary\",\n\t\"cmd\": \"command\",\n\n\t\"ri:d|ri:dpr\": \"img:s\",\n\t\"ri:v|ri:viewport\": \"img:z\",\n\t\"ri:a|ri:art\": \"pic>src:m+img\",\n\t\"ri:t|ri:type\": \"pic>src:t+img\",\n\n\t\"!!!\": \"{<!DOCTYPE html>}\",\n\t\"doc\": \"html[lang=${lang}]>(head>meta[charset=${charset}]+meta:vp+title{${1:Document}})+body\",\n\t\"!|html:5\": \"!!!+doc\",\n\n\t\"c\": \"{<!-- ${0} -->}\",\n\t\"cc:ie\": \"{<!--[if IE]>${0}<![endif]-->}\",\n\t\"cc:noie\": \"{<!--[if !IE]><!-->${0}<!--<![endif]-->}\"\n};\n\nvar stylesheetSnippets = {\n\t\"@f\": \"@font-face {\\n\\tfont-family: ${1};\\n\\tsrc: url(${2});\\n}\",\n\t\"@ff\": \"@font-face {\\n\\tfont-family: '${1:FontName}';\\n\\tsrc: url('${2:FileName}.eot');\\n\\tsrc: url('${2:FileName}.eot?#iefix') format('embedded-opentype'),\\n\\t\\t url('${2:FileName}.woff') format('woff'),\\n\\t\\t url('${2:FileName}.ttf') format('truetype'),\\n\\t\\t url('${2:FileName}.svg#${1:FontName}') format('svg');\\n\\tfont-style: ${3:normal};\\n\\tfont-weight: ${4:normal};\\n}\",\n\t\"@i|@import\": \"@import url(${0});\",\n\t\"@kf\": \"@keyframes ${1:identifier} {\\n\\t${2}\\n}\",\n\t\"@m|@media\": \"@media ${1:screen} {\\n\\t${0}\\n}\",\n\t\"ac\": \"align-content:start|end|flex-start|flex-end|center|space-between|space-around|stretch|space-evenly\",\n\t\"ai\": \"align-items:start|end|flex-start|flex-end|center|baseline|stretch\",\n\t\"anim\": \"animation:${1:name} ${2:duration} ${3:timing-function} ${4:delay} ${5:iteration-count} ${6:direction} ${7:fill-mode}\",\n\t\"animdel\": \"animation-delay:time\",\n\t\"animdir\": \"animation-direction:normal|reverse|alternate|alternate-reverse\",\n\t\"animdur\": \"animation-duration:${1:0}s\",\n\t\"animfm\": \"animation-fill-mode:both|forwards|backwards\",\n\t\"animic\": \"animation-iteration-count:1|infinite\",\n\t\"animn\": \"animation-name\",\n\t\"animps\": \"animation-play-state:running|paused\",\n\t\"animtf\": \"animation-timing-function:linear|ease|ease-in|ease-out|ease-in-out|cubic-bezier(${1:0.1}, ${2:0.7}, ${3:1.0}, ${3:0.1})\",\n\t\"ap\": \"appearance:none\",\n\t\"as\": \"align-self:start|end|auto|flex-start|flex-end|center|baseline|stretch\",\n\t\"b\": \"bottom\",\n\t\"bd\": \"border:${1:1px} ${2:solid} ${3:#000}\",\n\t\"bdb\": \"border-bottom:${1:1px} ${2:solid} ${3:#000}\",\n\t\"bdbc\": \"border-bottom-color:${1:#000}\",\n\t\"bdbi\": \"border-bottom-image:url(${0})\",\n\t\"bdbk\": \"border-break:close\",\n\t\"bdbli\": \"border-bottom-left-image:url(${0})|continue\",\n\t\"bdblrs\": \"border-bottom-left-radius\",\n\t\"bdbri\": \"border-bottom-right-image:url(${0})|continue\",\n\t\"bdbrrs\": \"border-bottom-right-radius\",\n\t\"bdbs\": \"border-bottom-style\",\n\t\"bdbw\": \"border-bottom-width\",\n\t\"bdc\": \"border-color:${1:#000}\",\n\t\"bdci\": \"border-corner-image:url(${0})|continue\",\n\t\"bdcl\": \"border-collapse:collapse|separate\",\n\t\"bdf\": \"border-fit:repeat|clip|scale|stretch|overwrite|overflow|space\",\n\t\"bdi\": \"border-image:url(${0})\",\n\t\"bdl\": \"border-left:${1:1px} ${2:solid} ${3:#000}\",\n\t\"bdlc\": \"border-left-color:${1:#000}\",\n\t\"bdlen\": \"border-length\",\n\t\"bdli\": \"border-left-image:url(${0})\",\n\t\"bdls\": \"border-left-style\",\n\t\"bdlw\": \"border-left-width\",\n\t\"bdr\": \"border-right:${1:1px} ${2:solid} ${3:#000}\",\n\t\"bdrc\": \"border-right-color:${1:#000}\",\n\t\"bdri\": \"border-right-image:url(${0})\",\n\t\"bdrs\": \"border-radius\",\n\t\"bdrst\": \"border-right-style\",\n\t\"bdrw\": \"border-right-width\",\n\t\"bds\": \"border-style:none|hidden|dotted|dashed|solid|double|dot-dash|dot-dot-dash|wave|groove|ridge|inset|outset\",\n\t\"bdsp\": \"border-spacing\",\n\t\"bdt\": \"border-top:${1:1px} ${2:solid} ${3:#000}\",\n\t\"bdtc\": \"border-top-color:${1:#000}\",\n\t\"bdti\": \"border-top-image:url(${0})\",\n\t\"bdtli\": \"border-top-left-image:url(${0})|continue\",\n\t\"bdtlrs\": \"border-top-left-radius\",\n\t\"bdtri\": \"border-top-right-image:url(${0})|continue\",\n\t\"bdtrrs\": \"border-top-right-radius\",\n\t\"bdts\": \"border-top-style\",\n\t\"bdtw\": \"border-top-width\",\n\t\"bdw\": \"border-width\",\n \"bbs\": \"border-block-start\",\n \"bbe\": \"border-block-end\",\n \"bis\": \"border-inline-start\",\n \"bie\": \"border-inline-end\",\n\t\"bfv\": \"backface-visibility:hidden|visible\",\n\t\"bg\": \"background:${1:#000}\",\n\t\"bg:n\": \"background: none\",\n\t\"bga\": \"background-attachment:fixed|scroll\",\n\t\"bgbk\": \"background-break:bounding-box|each-box|continuous\",\n\t\"bgc\": \"background-color:${1:#fff}\",\n\t\"bgcp\": \"background-clip:padding-box|border-box|content-box|no-clip\",\n\t\"bgi\": \"background-image:url(${0})\",\n\t\"bgo\": \"background-origin:padding-box|border-box|content-box\",\n\t\"bgp\": \"background-position:${1:0} ${2:0}\",\n\t\"bgpx\": \"background-position-x\",\n\t\"bgpy\": \"background-position-y\",\n\t\"bgr\": \"background-repeat:no-repeat|repeat-x|repeat-y|space|round\",\n\t\"bgsz\": \"background-size:contain|cover\",\n \"bs\": \"block-size\",\n\t\"bxsh\": \"box-shadow:${1:inset }${2:hoff} ${3:voff} ${4:blur} ${5:#000}|none\",\n\t\"bxsz\": \"box-sizing:border-box|content-box|border-box\",\n\t\"c\": \"color:${1:#000}\",\n\t\"cr\": \"color:rgb(${1:0}, ${2:0}, ${3:0})\",\n\t\"cra\": \"color:rgba(${1:0}, ${2:0}, ${3:0}, ${4:.5})\",\n\t\"cl\": \"clear:both|left|right|none\",\n\t\"cm\": \"/* ${0} */\",\n\t\"cnt\": \"content:'${0}'|normal|open-quote|no-open-quote|close-quote|no-close-quote|attr(${0})|counter(${0})|counters(${0})\",\n\t\"coi\": \"counter-increment\",\n\t\"colm\": \"columns\",\n\t\"colmc\": \"column-count\",\n\t\"colmf\": \"column-fill\",\n\t\"colmg\": \"column-gap\",\n\t\"colmr\": \"column-rule\",\n\t\"colmrc\": \"column-rule-color\",\n\t\"colmrs\": \"column-rule-style\",\n\t\"colmrw\": \"column-rule-width\",\n\t\"colms\": \"column-span\",\n\t\"colmw\": \"column-width\",\n\t\"cor\": \"counter-reset\",\n\t\"cp\": \"clip:auto|rect(${1:top} ${2:right} ${3:bottom} ${4:left})\",\n\t\"cps\": \"caption-side:top|bottom\",\n\t\"cur\": \"cursor:pointer|auto|default|crosshair|hand|help|move|pointer|text\",\n\t\"d\": \"display:block|none|flex|inline-flex|inline|inline-block|grid|inline-grid|subgrid|list-item|run-in|contents|table|inline-table|table-caption|table-column|table-column-group|table-header-group|table-footer-group|table-row|table-row-group|table-cell|ruby|ruby-base|ruby-base-group|ruby-text|ruby-text-group\",\n\t\"ec\": \"empty-cells:show|hide\",\n\t\"f\": \"font:${1:1em} ${2:sans-serif}\",\n\t\"fd\": \"font-display:auto|block|swap|fallback|optional\",\n\t\"fef\": \"font-effect:none|engrave|emboss|outline\",\n\t\"fem\": \"font-emphasize\",\n\t\"femp\": \"font-emphasize-position:before|after\",\n\t\"fems\": \"font-emphasize-style:none|accent|dot|circle|disc\",\n\t\"ff\": \"font-family:serif|sans-serif|cursive|fantasy|monospace\",\n\t\"fft\": \"font-family:\\\"Times New Roman\\\", Times, Baskerville, Georgia, serif\",\n\t\"ffa\": \"font-family:Arial, \\\"Helvetica Neue\\\", Helvetica, sans-serif\",\n\t\"ffv\": \"font-family:Verdana, Geneva, sans-serif\",\n\t\"fl\": \"float:left|right|none\",\n\t\"fs\": \"font-style:italic|normal|oblique\",\n\t\"fsm\": \"font-smoothing:antialiased|subpixel-antialiased|none\",\n\t\"fst\": \"font-stretch:normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded\",\n\t\"fv\": \"font-variant:normal|small-caps\",\n\t\"fvs\": \"font-variation-settings:normal|inherit|initial|unset\",\n\t\"fw\": \"font-weight:normal|bold|bolder|lighter\",\n\t\"fx\": \"flex\",\n\t\"fxb\": \"flex-basis:fill|max-content|min-content|fit-content|content\",\n\t\"fxd\": \"flex-direction:row|row-reverse|column|column-reverse\",\n\t\"fxf\": \"flex-flow\",\n\t\"fxg\": \"flex-grow\",\n\t\"fxsh\": \"flex-shrink\",\n\t\"fxw\": \"flex-wrap:nowrap|wrap|wrap-reverse\",\n\t\"fsz\": \"font-size\",\n\t\"fsza\": \"font-size-adjust\",\n\t\"g\": \"gap\",\n\t\"gtc\": \"grid-template-columns:repeat(${0})|minmax()\",\n\t\"gtr\": \"grid-template-rows:repeat(${0})|minmax()\",\n\t\"gta\": \"grid-template-areas\",\n\t\"gt\": \"grid-template\",\n\t\"gg\": \"grid-gap\",\n\t\"gcg\": \"grid-column-gap\",\n\t\"grg\": \"grid-row-gap\",\n\t\"gac\": \"grid-auto-columns:auto|minmax()\",\n\t\"gar\": \"grid-auto-rows:auto|minmax()\",\n\t\"gaf\": \"grid-auto-flow:row|column|dense|inherit|initial|unset\",\n\t\"gd\": \"grid\",\n\t\"gc\": \"grid-column\",\n\t\"gcs\": \"grid-column-start\",\n\t\"gce\": \"grid-column-end\",\n\t\"gr\": \"grid-row\",\n\t\"grs\": \"grid-row-start\",\n\t\"gre\": \"grid-row-end\",\n\t\"ga\": \"grid-area\",\n\t\"h\": \"height\",\n \"is\": \"inline-size\",\n\t\"jc\": \"justify-content:start|end|stretch|flex-start|flex-end|center|space-between|space-around|space-evenly\",\n\t\"ji\": \"justify-items:start|end|center|stretch\",\n\t\"js\": \"justify-self:start|end|center|stretch\",\n\t\"l\": \"left\",\n\t\"lg\": \"background-image:linear-gradient(${1})\",\n\t\"lh\": \"line-height\",\n\t\"lis\": \"list-style\",\n\t\"lisi\": \"list-style-image\",\n\t\"lisp\": \"list-style-position:inside|outside\",\n\t\"list\": \"list-style-type:disc|circle|square|decimal|decimal-leading-zero|lower-roman|upper-roman\",\n\t\"lts\": \"letter-spacing:normal\",\n\t\"m\": \"margin\",\n\t\"mah\": \"max-height\",\n\t\"mar\": \"max-resolution\",\n\t\"maw\": \"max-width\",\n\t\"mb\": \"margin-bottom\",\n\t\"mih\": \"min-height\",\n\t\"mir\": \"min-resolution\",\n\t\"miw\": \"min-width\",\n\t\"ml\": \"margin-left\",\n\t\"mr\": \"margin-right\",\n\t\"mt\": \"margin-top\",\n \"mbs\": \"margin-block-start\",\n \"mbe\": \"margin-block-end\",\n \"mis\": \"margin-inline-start\",\n \"mie\": \"margin-inline-end\",\n\t\"ol\": \"outline\",\n\t\"olc\": \"outline-color:${1:#000}|invert\",\n\t\"olo\": \"outline-offset\",\n\t\"ols\": \"outline-style:none|dotted|dashed|solid|double|groove|ridge|inset|outset\",\n\t\"olw\": \"outline-width|thin|medium|thick\",\n\t\"op|opa\": \"opacity\",\n\t\"ord\": \"order\",\n\t\"ori\": \"orientation:landscape|portrait\",\n\t\"orp\": \"orphans\",\n\t\"ov\": \"overflow:hidden|visible|hidden|scroll|auto\",\n\t\"ovs\": \"overflow-style:scrollbar|auto|scrollbar|panner|move|marquee\",\n\t\"ovx\": \"overflow-x:hidden|visible|hidden|scroll|auto\",\n\t\"ovy\": \"overflow-y:hidden|visible|hidden|scroll|auto\",\n\t\"p\": \"padding\",\n\t\"pb\": \"padding-bottom\",\n\t\"pgba\": \"page-break-after:auto|always|left|right\",\n\t\"pgbb\": \"page-break-before:auto|always|left|right\",\n\t\"pgbi\": \"page-break-inside:auto|avoid\",\n\t\"pl\": \"padding-left\",\n\t\"pos\": \"position:relative|absolute|relative|fixed|static\",\n\t\"pr\": \"padding-right\",\n\t\"pt\": \"padding-top\",\n \"pbs\": \"padding-block-start\",\n \"pbe\": \"padding-block-end\",\n \"pis\": \"padding-inline-start\",\n \"pie\": \"padding-inline-end\",\n \"spbs\": \"scroll-padding-block-start\",\n \"spbe\": \"scroll-padding-block-end\",\n \"spis\": \"scroll-padding-inline-start\",\n \"spie\": \"scroll-padding-inline-end\",\n\t\"q\": \"quotes\",\n\t\"qen\": \"quotes:'\\\\201C' '\\\\201D' '\\\\2018' '\\\\2019'\",\n\t\"qru\": \"quotes:'\\\\00AB' '\\\\00BB' '\\\\201E' '\\\\201C'\",\n\t\"r\": \"right\",\n\t\"rsz\": \"resize:none|both|horizontal|vertical\",\n\t\"t\": \"top\",\n\t\"ta\": \"text-align:left|center|right|justify\",\n\t\"tal\": \"text-align-last:left|center|right\",\n\t\"tbl\": \"table-layout:fixed\",\n\t\"td\": \"text-decoration:none|underline|overline|line-through\",\n\t\"te\": \"text-emphasis:none|accent|dot|circle|disc|before|after\",\n\t\"th\": \"text-height:auto|font-size|text-size|max-size\",\n\t\"ti\": \"text-indent\",\n\t\"tj\": \"text-justify:auto|inter-word|inter-ideograph|inter-cluster|distribute|kashida|tibetan\",\n\t\"to\": \"text-outline:${1:0} ${2:0} ${3:#000}\",\n\t\"tov\": \"text-overflow:ellipsis|clip\",\n\t\"tr\": \"text-replace\",\n\t\"trf\": \"transform:${1}|skewX(${1:angle})|skewY(${1:angle})|scale(${1:x}, ${2:y})|scaleX(${1:x})|scaleY(${1:y})|scaleZ(${1:z})|scale3d(${1:x}, ${2:y}, ${3:z})|rotate(${1:angle})|rotateX(${1:angle})|rotateY(${1:angle})|rotateZ(${1:angle})|translate(${1:x}, ${2:y})|translateX(${1:x})|translateY(${1:y})|translateZ(${1:z})|translate3d(${1:tx}, ${2:ty}, ${3:tz})\",\n\t\"trfo\": \"transform-origin\",\n\t\"trfs\": \"transform-style:preserve-3d\",\n\t\"trs\": \"transition:${1:prop} ${2:time}\",\n\t\"trsde\": \"transition-delay:${1:time}\",\n\t\"trsdu\": \"transition-duration:${1:time}\",\n\t\"trsp\": \"transition-property:${1:prop}\",\n\t\"trstf\": \"transition-timing-function:${1:fn}\",\n\t\"tsh\": \"text-shadow:${1:hoff} ${2:voff} ${3:blur} ${4:#000}\",\n\t\"tt\": \"text-transform:uppercase|lowercase|capitalize|none\",\n\t\"tw\": \"text-wrap:none|normal|unrestricted|suppress\",\n\t\"us\": \"user-select:none\",\n\t\"v\": \"visibility:hidden|visible|collapse\",\n\t\"va\": \"vertical-align:top|super|text-top|middle|baseline|bottom|text-bottom|sub\",\n\t\"w\": \"width\",\n\t\"whs\": \"white-space:nowrap|pre|pre-wrap|pre-line|normal\",\n\t\"whsc\": \"white-space-collapse:normal|keep-all|loose|break-strict|break-all\",\n\t\"wid\": \"widows\",\n\t\"wm\": \"writing-mode:lr-tb|lr-tb|lr-bt|rl-tb|rl-bt|tb-rl|tb-lr|bt-lr|bt-rl\",\n\t\"wob\": \"word-break:normal|keep-all|break-all\",\n\t\"wos\": \"word-spacing\",\n\t\"wow\": \"word-wrap:none|unrestricted|suppress|break-word|normal\",\n\t\"z\": \"z-index\",\n\t\"zom\": \"zoom:1\"\n};\n\nvar xslSnippets = {\n \"tm|tmatch\": \"xsl:template[match mode]\",\n \"tn|tname\": \"xsl:template[name]\",\n \"call\": \"xsl:call-template[name]\",\n \"ap\": \"xsl:apply-templates[select mode]\",\n \"api\": \"xsl:apply-imports\",\n \"imp\": \"xsl:import[href]\",\n \"inc\": \"xsl:include[href]\",\n \"ch\": \"xsl:choose\",\n \"wh|xsl:when\": \"xsl:when[test]\",\n \"ot\": \"xsl:otherwise\",\n \"if\": \"xsl:if[test]\",\n \"par\": \"xsl:param[name]\",\n \"pare\": \"xsl:param[name select]\",\n \"var\": \"xsl:variable[name]\",\n \"vare\": \"xsl:variable[name select]\",\n \"wp\": \"xsl:with-param[name select]\",\n \"key\": \"xsl:key[name match use]\",\n \"elem\": \"xsl:element[name]\",\n \"attr\": \"xsl:attribute[name]\",\n \"attrs\": \"xsl:attribute-set[name]\",\n \"cp\": \"xsl:copy[select]\",\n \"co\": \"xsl:copy-of[select]\",\n \"val\": \"xsl:value-of[select]\",\n \"for|each\": \"xsl:for-each[select]\",\n \"tex\": \"xsl:text\",\n \"com\": \"xsl:comment\",\n \"msg\": \"xsl:message[terminate=no]\",\n \"fall\": \"xsl:fallback\",\n \"num\": \"xsl:number[value]\",\n \"nam\": \"namespace-alias[stylesheet-prefix result-prefix]\",\n \"pres\": \"xsl:preserve-space[elements]\",\n \"strip\": \"xsl:strip-space[elements]\",\n \"proc\": \"xsl:processing-instruction[name]\",\n \"sort\": \"xsl:sort[select order]\",\n \"choose\": \"xsl:choose>xsl:when+xsl:otherwise\",\n \"xsl\": \"!!!+xsl:stylesheet[version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform]>{\\n|}\",\n \"!!!\": \"{<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>}\"\n};\n\nvar pugSnippets = {\n\t\"!!!\": \"{doctype html}\"\n};\n\nvar variables = {\n\t\"lang\": \"en\",\n\t\"locale\": \"en-US\",\n\t\"charset\": \"UTF-8\",\n\t\"indentation\": \"\\t\",\n\t\"newline\": \"\\n\"\n};\n\n/**\n * Default syntaxes for abbreviation types\n */\nconst defaultSyntaxes = {\n markup: 'html',\n stylesheet: 'css'\n};\nconst defaultOptions$1 = {\n 'inlineElements': [\n 'a', 'abbr', 'acronym', 'applet', 'b', 'basefont', 'bdo',\n 'big', 'br', 'button', 'cite', 'code', 'del', 'dfn', 'em', 'font', 'i',\n 'iframe', 'img', 'input', 'ins', 'kbd', 'label', 'map', 'object', 'q',\n 's', 'samp', 'select', 'small', 'span', 'strike', 'strong', 'sub', 'sup',\n 'textarea', 'tt', 'u', 'var'\n ],\n 'output.indent': '\\t',\n 'output.baseIndent': '',\n 'output.newline': '\\n',\n 'output.tagCase': '',\n 'output.attributeCase': '',\n 'output.attributeQuotes': 'double',\n 'output.format': true,\n 'output.formatLeafNode': false,\n 'output.formatSkip': ['html'],\n 'output.formatForce': ['body'],\n 'output.inlineBreak': 3,\n 'output.compactBoolean': false,\n 'output.booleanAttributes': [\n 'contenteditable', 'seamless', 'async', 'autofocus',\n 'autoplay', 'checked', 'controls', 'defer', 'disabled', 'formnovalidate',\n 'hidden', 'ismap', 'loop', 'multiple', 'muted', 'novalidate', 'readonly',\n 'required', 'reversed', 'selected', 'typemustmatch'\n ],\n 'output.reverseAttributes': false,\n 'output.selfClosingStyle': 'html',\n 'output.field': (index, placeholder) => placeholder,\n 'output.text': text => text,\n 'markup.href': true,\n 'comment.enabled': false,\n 'comment.trigger': ['id', 'class'],\n 'comment.before': '',\n 'comment.after': '\\n<!-- /[#ID][.CLASS] -->',\n 'bem.enabled': false,\n 'bem.element': '__',\n 'bem.modifier': '_',\n 'jsx.enabled': false,\n 'stylesheet.keywords': ['auto', 'inherit', 'unset', 'none'],\n 'stylesheet.unitless': ['z-index', 'line-height', 'opacity', 'font-weight', 'zoom', 'flex', 'flex-grow', 'flex-shrink'],\n 'stylesheet.shortHex': true,\n 'stylesheet.between': ': ',\n 'stylesheet.after': ';',\n 'stylesheet.intUnit': 'px',\n 'stylesheet.floatUnit': 'em',\n 'stylesheet.unitAliases': { e: 'em', p: '%', x: 'ex', r: 'rem' },\n 'stylesheet.json': false,\n 'stylesheet.jsonDoubleQuotes': false,\n 'stylesheet.fuzzySearchMinScore': 0\n};\nconst defaultConfig = {\n type: 'markup',\n syntax: 'html',\n variables,\n snippets: {},\n options: defaultOptions$1\n};\n/**\n * Default per-syntax config\n */\nconst syntaxConfig = {\n markup: {\n snippets: parseSnippets(markupSnippets),\n },\n xhtml: {\n options: {\n 'output.selfClosingStyle': 'xhtml'\n }\n },\n xml: {\n options: {\n 'output.selfClosingStyle': 'xml'\n }\n },\n xsl: {\n snippets: parseSnippets(xslSnippets),\n options: {\n 'output.selfClosingStyle': 'xml'\n }\n },\n jsx: {\n options: {\n 'jsx.enabled': true,\n 'markup.attributes': {\n 'class': 'className',\n 'class*': 'styleName',\n 'for': 'htmlFor'\n },\n 'markup.valuePrefix': {\n 'class*': 'styles'\n }\n }\n },\n vue: {\n options: {\n 'markup.attributes': {\n 'class*': ':class',\n }\n }\n },\n svelte: {\n options: {\n 'jsx.enabled': true\n }\n },\n pug: {\n snippets: parseSnippets(pugSnippets)\n },\n stylesheet: {\n snippets: parseSnippets(stylesheetSnippets)\n },\n sass: {\n options: {\n 'stylesheet.after': ''\n }\n },\n stylus: {\n options: {\n 'stylesheet.between': ' ',\n 'stylesheet.after': '',\n }\n }\n};\n/**\n * Parses raw snippets definitions with possibly multiple keys into a plan\n * snippet map\n */\nfunction parseSnippets(snippets) {\n const result = {};\n Object.keys(snippets).forEach(k => {\n for (const name of k.split('|')) {\n result[name] = snippets[k];\n }\n });\n return result;\n}\nfunction resolveConfig(config = {}, globals = {}) {\n const type = config.type || 'markup';\n const syntax = config.syntax || defaultSyntaxes[type];\n return Object.assign(Object.assign(Object.assign({}, defaultConfig), config), { type,\n syntax, variables: mergedData(type, syntax, 'variables', config, globals), snippets: mergedData(type, syntax, 'snippets', config, globals), options: mergedData(type, syntax, 'options', config, globals) });\n}\nfunction mergedData(type, syntax, key, config, globals = {}) {\n const typeDefaults = syntaxConfig[type];\n const typeOverride = globals[type];\n const syntaxDefaults = syntaxConfig[syntax];\n const syntaxOverride = globals[syntax];\n return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, defaultConfig[key]), (typeDefaults && typeDefaults[key])), (syntaxDefaults && syntaxDefaults[key])), (typeOverride && typeOverride[key])), (syntaxOverride && syntaxOverride[key])), config[key]);\n}\n\n/**\n * Creates structure for scanning given string in backward direction\n */\nfunction backwardScanner(text, start = 0) {\n return { text, start, pos: text.length };\n}\n/**\n * Check if given scanner position is at start of scanned text\n */\nfunction sol(scanner) {\n return scanner.pos === scanner.start;\n}\n/**\n * “Peeks” character code an current scanner location without advancing it\n */\nfunction peek(scanner, offset = 0) {\n return scanner.text.charCodeAt(scanner.pos - 1 + offset);\n}\n/**\n * Returns current character code and moves character location one symbol back\n */\nfunction previous(scanner) {\n if (!sol(scanner)) {\n return scanner.text.charCodeAt(--scanner.pos);\n }\n}\n/**\n * Consumes current character code if it matches given `match` code or function\n */\nfunction consume(scanner, match) {\n if (sol(scanner)) {\n return false;\n }\n const ok = typeof match === 'function'\n ? match(peek(scanner))\n : match === peek(scanner);\n if (ok) {\n scanner.pos--;\n }\n return !!ok;\n}\nfunction consumeWhile(scanner, match) {\n const start = scanner.pos;\n while (consume(scanner, match)) {\n // empty\n }\n return scanner.pos < start;\n}\n\nvar Chars$1;\n(function (Chars) {\n Chars[Chars[\"SingleQuote\"] = 39] = \"SingleQuote\";\n Chars[Chars[\"DoubleQuote\"] = 34] = \"DoubleQuote\";\n Chars[Chars[\"Escape\"] = 92] = \"Escape\";\n})(Chars$1 || (Chars$1 = {}));\n/**\n * Check if given character code is a quote\n */\nfunction isQuote(c) {\n return c === Chars$1.SingleQuote || c === Chars$1.DoubleQuote;\n}\n/**\n * Consumes quoted value, if possible\n * @return Returns `true` is value was consumed\n */\nfunction consumeQuoted(scanner) {\n const start = scanner.pos;\n const quote = previous(scanner);\n if (isQuote(quote)) {\n while (!sol(scanner)) {\n if (previous(scanner) === quote && peek(scanner) !== Chars$1.Escape) {\n return true;\n }\n }\n }\n scanner.pos = start;\n return false;\n}\n\nvar Brackets;\n(function (Brackets) {\n Brackets[Brackets[\"SquareL\"] = 91] = \"SquareL\";\n Brackets[Brackets[\"SquareR\"] = 93] = \"SquareR\";\n Brackets[Brackets[\"RoundL\"] = 40] = \"RoundL\";\n Brackets[Brackets[\"RoundR\"] = 41] = \"RoundR\";\n Brackets[Brackets[\"CurlyL\"] = 123] = \"CurlyL\";\n Brackets[Brackets[\"CurlyR\"] = 125] = \"CurlyR\";\n})(Brackets || (Brackets = {}));\nconst bracePairs = {\n [Brackets.SquareL]: Brackets.SquareR,\n [Brackets.RoundL]: Brackets.RoundR,\n [Brackets.CurlyL]: Brackets.CurlyR,\n};\n\nvar Chars;\n(function (Chars) {\n Chars[Chars[\"Tab\"] = 9] = \"Tab\";\n Chars[Chars[\"Space\"] = 32] = \"Space\";\n /** `-` character */\n Chars[Chars[\"Dash\"] = 45] = \"Dash\";\n /** `/` character */\n Chars[Chars[\"Slash\"] = 47] = \"Slash\";\n /** `:` character */\n Chars[Chars[\"Colon\"] = 58] = \"Colon\";\n /** `=` character */\n Chars[Chars[\"Equals\"] = 61] = \"Equals\";\n /** `<` character */\n Chars[Chars[\"AngleLeft\"] = 60] = \"AngleLeft\";\n /** `>` character */\n Chars[Chars[\"AngleRight\"] = 62] = \"AngleRight\";\n})(Chars || (Chars = {}));\n/**\n * Check if given reader’s current position points at the end of HTML tag\n */\nfunction isHtml(scanner) {\n const start = scanner.pos;\n if (!consume(scanner, Chars.AngleRight)) {\n return false;\n }\n let ok = false;\n consume(scanner, Chars.Slash); // possibly self-closed element\n while (!sol(scanner)) {\n consumeWhile(scanner, isWhiteSpace);\n if (consumeIdent(scanner)) {\n // ate identifier: could be a tag name, boolean attribute or unquoted\n // attribute value\n if (consume(scanner, Chars.Slash)) {\n // either closing tag or invalid tag\n ok = consume(scanner, Chars.AngleLeft);\n break;\n }\n else if (consume(scanner, Chars.AngleLeft)) {\n // opening tag\n ok = true;\n break;\n }\n else if (consume(scanner, isWhiteSpace)) {\n // boolean attribute\n continue;\n }\n else if (consume(scanner, Chars.Equals)) {\n // simple unquoted value or invalid attribute\n if (consumeIdent(scanner)) {\n continue;\n }\n break;\n }\n else if (consumeAttributeWithUnquotedValue(scanner)) {\n // identifier was a part of unquoted value\n ok = true;\n break;\n }\n // invalid tag\n break;\n }\n if (consumeAttribute(scanner)) {\n continue;\n }\n break;\n }\n scanner.pos = start;\n return ok;\n}\n/**\n * Consumes HTML attribute from given string.\n * @return `true` if attribute was consumed.\n */\nfunction consumeAttribute(scanner) {\n return consumeAttributeWithQuotedValue(scanner) || consumeAttributeWithUnquotedValue(scanner);\n}\nfunction consumeAttributeWithQuotedValue(scanner) {\n const start = scanner.pos;\n if (consumeQuoted(scanner) && consume(scanner, Chars.Equals) && consumeIdent(scanner)) {\n return true;\n }\n scanner.pos = start;\n return false;\n}\nfunction consumeAttributeWithUnquotedValue(scanner) {\n const start = scanner.pos;\n const stack = [];\n while (!sol(scanner)) {\n const ch = peek(scanner);\n if (isCloseBracket(ch)) {\n stack.push(ch);\n }\n else if (isOpenBracket(ch)) {\n if (stack.pop() !== bracePairs[ch]) {\n // Unexpected open bracket\n break;\n }\n }\n else if (!isUnquotedValue(ch)) {\n break;\n }\n scanner.pos--;\n }\n if (start !== scanner.pos && consume(scanner, Chars.Equals) && consumeIdent(scanner)) {\n return true;\n }\n scanner.pos = start;\n return false;\n}\n/**\n * Consumes HTML identifier from stream\n */\nfunction consumeIdent(scanner) {\n return consumeWhile(scanner, isIdent);\n}\n/**\n * Check if given character code belongs to HTML identifier\n */\nfunction isIdent(ch) {\n return ch === Chars.Colon || ch === Chars.Dash || isAlpha(ch) || isNumber(ch);\n}\n/**\n * Check if given character code is alpha code (letter though A to Z)\n */\nfunction isAlpha(ch) {\n ch &= ~32; // quick hack to convert any char code to uppercase char code\n return ch >= 65 && ch <= 90; // A-Z\n}\n/**\n * Check if given code is a number\n */\nfunction isNumber(ch) {\n return ch > 47 && ch < 58;\n}\n/**\n * Check if given code is a whitespace\n */\nfunction isWhiteSpace(ch) {\n return ch === Chars.Space || ch === Chars.Tab;\n}\n/**\n * Check if given code may belong to unquoted attribute value\n */\nfunction isUnquotedValue(ch) {\n return !isNaN(ch) && ch !== Chars.Equals && !isWhiteSpace(ch) && !isQuote(ch);\n}\nfunction isOpenBracket(ch) {\n return ch === Brackets.CurlyL || ch === Brackets.RoundL || ch === Brackets.SquareL;\n}\nfunction isCloseBracket(ch) {\n return ch === Brackets.CurlyR || ch === Brackets.RoundR || ch === Brackets.SquareR;\n}\n\nconst code = (ch) => ch.charCodeAt(0);\nconst specialChars = '#.*:$-_!@%^+>/'.split('').map(code);\nconst defaultOptions = {\n type: 'markup',\n lookAhead: true,\n prefix: ''\n};\n/**\n * Extracts Emmet abbreviation from given string.\n * The goal of this module is to extract abbreviation from current editor’s line,\n * e.g. like this: `<span>.foo[title=bar|]</span>` -> `.foo[title=bar]`, where\n * `|` is a current caret position.\n * @param line A text line where abbreviation should be expanded\n * @param pos Caret position in line. If not given, uses end of line\n * @param options Extracting options\n */\nfunction extractAbbreviation(line, pos = line.length, options = {}) {\n // make sure `pos` is within line range\n const opt = Object.assign(Object.assign({}, defaultOptions), options);\n pos = Math.min(line.length, Math.max(0, pos == null ? line.length : pos));\n if (opt.lookAhead) {\n pos = offsetPastAutoClosed(line, pos, opt);\n }\n let ch;\n const start = getStartOffset(line, pos, opt.prefix || '');\n if (start === -1) {\n return void 0;\n }\n const scanner = backwardScanner(line, start);\n scanner.pos = pos;\n const stack = [];\n while (!sol(scanner)) {\n ch = peek(scanner);\n if (stack.includes(Brackets.CurlyR)) {\n if (ch === Brackets.CurlyR) {\n stack.push(ch);\n scanner.pos--;\n continue;\n }\n if (ch !== Brackets.CurlyL) {\n scanner.pos--;\n continue;\n }\n }\n if (isCloseBrace(ch, opt.type)) {\n stack.push(ch);\n }\n else if (isOpenBrace(ch, opt.type)) {\n if (stack.pop() !== bracePairs[ch]) {\n // unexpected brace\n break;\n }\n }\n else if (stack.includes(Brackets.SquareR) || stack.includes(Brackets.CurlyR)) {\n // respect all characters inside attribute sets or text nodes\n scanner.pos--;\n continue;\n }\n else if (isHtml(scanner) || !isAbbreviation(ch)) {\n break;\n }\n scanner.pos--;\n }\n if (!stack.length && scanner.pos !== pos) {\n // Found something, remove some invalid symbols from the\n // beginning and return abbreviation\n const abbreviation = line.slice(scanner.pos, pos).replace(/^[*+>^]+/, '');\n return {\n abbreviation,\n location: pos - abbreviation.length,\n start: options.prefix\n ? start - options.prefix.length\n : pos - abbreviation.length,\n end: pos\n };\n }\n}\n/**\n * Returns new `line` index which is right after characters beyound `pos` that\n * editor will likely automatically close, e.g. }, ], and quotes\n */\nfunction offsetPastAutoClosed(line, pos, options) {\n // closing quote is allowed only as a next character\n if (isQuote(line.charCodeAt(pos))) {\n pos++;\n }\n // offset pointer until non-autoclosed character is found\n while (isCloseBrace(line.charCodeAt(pos), options.type)) {\n pos++;\n }\n return pos;\n}\n/**\n * Returns start offset (left limit) in `line` where we should stop looking for\n * abbreviation: it’s nearest to `pos` location of `prefix` token\n */\nfunction getStartOffset(line, pos, prefix) {\n if (!prefix) {\n return 0;\n }\n const scanner = backwardScanner(line);\n const compiledPrefix = prefix.split('').map(code);\n scanner.pos = pos;\n let result;\n while (!sol(scanner)) {\n if (consumePair(scanner, Brackets.SquareR, Brackets.SquareL) || consumePair(scanner, Brackets.CurlyR, Brackets.CurlyL)) {\n continue;\n }\n result = scanner.pos;\n if (consumeArray(scanner, compiledPrefix)) {\n return result;\n }\n scanner.pos--;\n }\n return -1;\n}\n/**\n * Consumes full character pair, if possible\n */\nfunction consumePair(scanner, close, open) {\n const start = scanner.pos;\n if (consume(scanner, close)) {\n while (!sol(scanner)) {\n if (consume(scanner, open)) {\n return true;\n }\n scanner.pos--;\n }\n }\n scanner.pos = start;\n return false;\n}\n/**\n * Consumes all character codes from given array, right-to-left, if possible\n */\nfunction consumeArray(scanner, arr) {\n const start = scanner.pos;\n let consumed = false;\n for (let i = arr.length - 1; i >= 0 && !sol(scanner); i--) {\n if (!consume(scanner, arr[i])) {\n break;\n }\n consumed = i === 0;\n }\n if (!consumed) {\n scanner.pos = start;\n }\n return consumed;\n}\nfunction isAbbreviation(ch) {\n return (ch > 64 && ch < 91) // uppercase letter\n || (ch > 96 && ch < 123) // lowercase letter\n || (ch > 47 && ch < 58) // number\n || specialChars.includes(ch); // special character\n}\nfunction isOpenBrace(ch, syntax) {\n return ch === Brackets.RoundL || (syntax === 'markup' && (ch === Brackets.SquareL || ch === Brackets.CurlyL));\n}\nfunction isCloseBrace(ch, syntax) {\n return ch === Brackets.RoundR || (syntax === 'markup' && (ch === Brackets.SquareR || ch === Brackets.CurlyR));\n}\n\nfunction expandAbbreviation(abbr, config) {\n const resolvedConfig = resolveConfig(config);\n return resolvedConfig.type === 'stylesheet'\n ? stylesheet(abbr, resolvedConfig)\n : markup(abbr, resolvedConfig);\n}\n/**\n * Expands given *markup* abbreviation (e.g. regular Emmet abbreviation that\n * produces structured output like HTML) and outputs it according to options\n * provided in config\n */\nfunction markup(abbr, config) {\n return stringify(parse$1(abbr, config), config);\n}\n/**\n * Expands given *stylesheet* abbreviation (a special Emmet abbreviation designed for\n * stylesheet languages like CSS, SASS etc.) and outputs it according to options\n * provided in config\n */\nfunction stylesheet(abbr, config) {\n return css(parse(abbr, config), config);\n}\n\nexports.CSSAbbreviationScope = CSSAbbreviationScope;\nexports.default = expandAbbreviation;\nexports.extract = extractAbbreviation;\nexports.markup = markup;\nexports.markupAbbreviation = parseAbbreviation;\nexports.parseMarkup = parse$1;\nexports.parseStylesheet = parse;\nexports.parseStylesheetSnippets = convertSnippets;\nexports.resolveConfig = resolveConfig;\nexports.stringifyMarkup = stringify;\nexports.stringifyStylesheet = css;\nexports.stylesheet = stylesheet;\nexports.stylesheetAbbreviation = parse$2;\n//# sourceMappingURL=emmet.cjs.map\n","\"use strict\";\n/*\nMIT License\n\nCopyright (c) 2020 Sergey Chikuyonok <serge.che@gmail.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.syntaxes = exports.parseSnippets = void 0;\n/**\n * Parses raw snippets definitions with possibly multiple keys into a plan\n * snippet map\n */\nfunction parseSnippets(snippets) {\n const result = {};\n Object.keys(snippets).forEach(k => {\n for (const name of k.split('|')) {\n result[name] = snippets[k];\n }\n });\n return result;\n}\nexports.parseSnippets = parseSnippets;\n/**\n * List of all known syntaxes\n */\nexports.syntaxes = {\n markup: ['html', 'xml', 'xsl', 'jsx', 'js', 'pug', 'slim', 'haml'],\n stylesheet: ['css', 'sass', 'scss', 'less', 'sss', 'stylus']\n};\n//# sourceMappingURL=configCompat.js.map","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as vscode from 'vscode';\nimport { getRootNode } from './parseDocument';\nimport { validate, getHtmlFlatNode, offsetRangeToVsRange } from './util';\nimport { HtmlNode as HtmlFlatNode } from 'EmmetFlatNode';\n\nexport function removeTag() {\n\tif (!validate(false) || !vscode.window.activeTextEditor) {\n\t\treturn;\n\t}\n\tconst editor = vscode.window.activeTextEditor;\n\tconst document = editor.document;\n\tconst rootNode = <HtmlFlatNode>getRootNode(document, true);\n\tif (!rootNode) {\n\t\treturn;\n\t}\n\n\tconst finalRangesToRemove = Array.from(editor.selections).reverse()\n\t\t.reduce<vscode.Range[]>((prev, selection) =>\n\t\t\tprev.concat(getRangesToRemove(editor.document, rootNode, selection)), []);\n\n\treturn editor.edit(editBuilder => {\n\t\tfinalRangesToRemove.forEach(range => {\n\t\t\teditBuilder.delete(range);\n\t\t});\n\t});\n}\n\n/**\n * Calculates the ranges to remove, along with what to replace those ranges with.\n * It finds the node to remove based on the selection's start position\n * and then removes that node, reindenting the content in between.\n */\nfunction getRangesToRemove(document: vscode.TextDocument, rootNode: HtmlFlatNode, selection: vscode.Selection): vscode.Range[] {\n\tconst offset = document.offsetAt(selection.start);\n\tconst nodeToUpdate = getHtmlFlatNode(document.getText(), rootNode, offset, true);\n\tif (!nodeToUpdate) {\n\t\treturn [];\n\t}\n\n\tlet openTagRange: vscode.Range | undefined;\n\tif (nodeToUpdate.open) {\n\t\topenTagRange = offsetRangeToVsRange(document, nodeToUpdate.open.start, nodeToUpdate.open.end);\n\t}\n\tlet closeTagRange: vscode.Range | undefined;\n\tif (nodeToUpdate.close) {\n\t\tcloseTagRange = offsetRangeToVsRange(document, nodeToUpdate.close.start, nodeToUpdate.close.end);\n\t}\n\n\tif (openTagRange && closeTagRange) {\n\t\tconst innerCombinedRange = new vscode.Range(\n\t\t\topenTagRange.end.line,\n\t\t\topenTagRange.end.character,\n\t\t\tcloseTagRange.start.line,\n\t\t\tcloseTagRange.start.character);\n\t\tconst outerCombinedRange = new vscode.Range(\n\t\t\topenTagRange.start.line,\n\t\t\topenTagRange.start.character,\n\t\t\tcloseTagRange.end.line,\n\t\t\tcloseTagRange.end.character);\n\t\t// Special case: there is only whitespace in between.\n\t\tif (document.getText(innerCombinedRange).trim() === '' && nodeToUpdate.name !== 'pre') {\n\t\t\treturn [outerCombinedRange];\n\t\t}\n\t}\n\n\tconst rangesToRemove = [];\n\tif (openTagRange) {\n\t\trangesToRemove.push(openTagRange);\n\t\tif (closeTagRange) {\n\t\t\tconst indentAmountToRemove = calculateIndentAmountToRemove(document, openTagRange, closeTagRange);\n\t\t\tlet firstInnerNonEmptyLine: number | undefined;\n\t\t\tlet lastInnerNonEmptyLine: number | undefined;\n\t\t\tfor (let i = openTagRange.start.line + 1; i < closeTagRange.start.line; i++) {\n\t\t\t\tif (!document.lineAt(i).isEmptyOrWhitespace) {\n\t\t\t\t\trangesToRemove.push(new vscode.Range(i, 0, i, indentAmountToRemove));\n\t\t\t\t\tif (firstInnerNonEmptyLine === undefined) {\n\t\t\t\t\t\t// We found the first non-empty inner line.\n\t\t\t\t\t\tfirstInnerNonEmptyLine = i;\n\t\t\t\t\t}\n\t\t\t\t\tlastInnerNonEmptyLine = i;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove the entire last line + empty lines preceding it\n\t\t\t// if it is just the tag, otherwise remove just the tag.\n\t\t\tif (entireLineIsTag(document, closeTagRange) && lastInnerNonEmptyLine) {\n\t\t\t\trangesToRemove.push(new vscode.Range(\n\t\t\t\t\tlastInnerNonEmptyLine,\n\t\t\t\t\tdocument.lineAt(lastInnerNonEmptyLine).range.end.character,\n\t\t\t\t\tcloseTagRange.end.line,\n\t\t\t\t\tcloseTagRange.end.character));\n\t\t\t} else {\n\t\t\t\trangesToRemove.push(closeTagRange);\n\t\t\t}\n\n\t\t\t// Remove the entire first line + empty lines proceding it\n\t\t\t// if it is just the tag, otherwise keep on removing just the tag.\n\t\t\tif (entireLineIsTag(document, openTagRange) && firstInnerNonEmptyLine) {\n\t\t\t\trangesToRemove[1] = new vscode.Range(\n\t\t\t\t\topenTagRange.start.line,\n\t\t\t\t\topenTagRange.start.character,\n\t\t\t\t\tfirstInnerNonEmptyLine,\n\t\t\t\t\tdocument.lineAt(firstInnerNonEmptyLine).firstNonWhitespaceCharacterIndex);\n\t\t\t\trangesToRemove.shift();\n\t\t\t}\n\t\t}\n\t}\n\treturn rangesToRemove;\n}\n\nfunction entireLineIsTag(document: vscode.TextDocument, range: vscode.Range): boolean {\n\tif (range.start.line === range.end.line) {\n\t\tconst lineText = document.lineAt(range.start).text;\n\t\tconst tagText = document.getText(range);\n\t\tif (lineText.trim() === tagText) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\n/**\n * Calculates the amount of indent to remove for getRangesToRemove.\n */\nfunction calculateIndentAmountToRemove(document: vscode.TextDocument, openRange: vscode.Range, closeRange: vscode.Range): number {\n\tconst startLine = openRange.start.line;\n\tconst endLine = closeRange.start.line;\n\n\tconst startLineIndent = document.lineAt(startLine).firstNonWhitespaceCharacterIndex;\n\tconst endLineIndent = document.lineAt(endLine).firstNonWhitespaceCharacterIndex;\n\n\tlet contentIndent: number | undefined;\n\tfor (let i = startLine + 1; i < endLine; i++) {\n\t\tconst line = document.lineAt(i);\n\t\tif (!line.isEmptyOrWhitespace) {\n\t\t\tconst lineIndent = line.firstNonWhitespaceCharacterIndex;\n\t\t\tcontentIndent = !contentIndent ? lineIndent : Math.min(contentIndent, lineIndent);\n\t\t}\n\t}\n\n\tlet indentAmount = 0;\n\tif (contentIndent) {\n\t\tif (contentIndent < startLineIndent || contentIndent < endLineIndent) {\n\t\t\tindentAmount = 0;\n\t\t}\n\t\telse {\n\t\t\tindentAmount = Math.min(contentIndent - startLineIndent, contentIndent - endLineIndent);\n\t\t}\n\t}\n\treturn indentAmount;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as vscode from 'vscode';\nimport { getHtmlFlatNode, validate } from './util';\nimport { HtmlNode as HtmlFlatNode } from 'EmmetFlatNode';\nimport { getRootNode } from './parseDocument';\n\ninterface TagRange {\n\tname: string;\n\trange: vscode.Range;\n}\n\nexport async function updateTag(tagName: string | undefined): Promise<boolean | undefined> {\n\tif (!validate(false) || !vscode.window.activeTextEditor) {\n\t\treturn;\n\t}\n\n\tconst editor = vscode.window.activeTextEditor;\n\tconst document = editor.document;\n\tconst rootNode = <HtmlFlatNode>getRootNode(document, true);\n\tif (!rootNode) {\n\t\treturn;\n\t}\n\n\tconst rangesToUpdate = editor.selections\n\t\t.reduceRight<TagRange[]>((prev, selection) =>\n\t\t\tprev.concat(getRangesToUpdate(document, selection, rootNode)), []);\n\tif (!rangesToUpdate.length) {\n\t\treturn;\n\t}\n\tconst firstTagName = rangesToUpdate[0].name;\n\tconst tagNamesAreEqual = rangesToUpdate.every(range => range.name === firstTagName);\n\n\tif (tagName === undefined) {\n\t\ttagName = await vscode.window.showInputBox({\n\t\t\tprompt: 'Enter Tag',\n\t\t\tvalue: tagNamesAreEqual ? firstTagName : undefined\n\t\t});\n\n\t\t// TODO: Accept fragments for JSX and TSX\n\t\tif (!tagName) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn editor.edit(editBuilder => {\n\t\trangesToUpdate.forEach(tagRange => {\n\t\t\teditBuilder.replace(tagRange.range, tagName!);\n\t\t});\n\t});\n}\n\nfunction getRangesFromNode(node: HtmlFlatNode, document: vscode.TextDocument): TagRange[] {\n\tconst ranges: TagRange[] = [];\n\tif (node.open) {\n\t\tconst start = document.positionAt(node.open.start);\n\t\tranges.push({\n\t\t\tname: node.name,\n\t\t\trange: new vscode.Range(start.translate(0, 1), start.translate(0, 1).translate(0, node.name.length))\n\t\t});\n\t}\n\tif (node.close) {\n\t\tconst endTagStart = document.positionAt(node.close.start);\n\t\tconst end = document.positionAt(node.close.end);\n\t\tranges.push({\n\t\t\tname: node.name,\n\t\t\trange: new vscode.Range(endTagStart.translate(0, 2), end.translate(0, -1))\n\t\t});\n\t}\n\treturn ranges;\n}\n\nfunction getRangesToUpdate(document: vscode.TextDocument, selection: vscode.Selection, rootNode: HtmlFlatNode): TagRange[] {\n\tconst documentText = document.getText();\n\tconst offset = document.offsetAt(selection.start);\n\tconst nodeToUpdate = getHtmlFlatNode(documentText, rootNode, offset, true);\n\tif (!nodeToUpdate) {\n\t\treturn [];\n\t}\n\treturn getRangesFromNode(nodeToUpdate, document);\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as vscode from 'vscode';\nimport { validate, getHtmlFlatNode, offsetRangeToSelection } from './util';\nimport { getRootNode } from './parseDocument';\nimport { HtmlNode as HtmlFlatNode } from 'EmmetFlatNode';\n\nexport function matchTag() {\n\tif (!validate(false) || !vscode.window.activeTextEditor) {\n\t\treturn;\n\t}\n\n\tconst editor = vscode.window.activeTextEditor;\n\tconst document = editor.document;\n\tconst rootNode = <HtmlFlatNode>getRootNode(document, true);\n\tif (!rootNode) {\n\t\treturn;\n\t}\n\n\tconst updatedSelections: vscode.Selection[] = [];\n\teditor.selections.forEach(selection => {\n\t\tconst updatedSelection = getUpdatedSelections(document, rootNode, selection.start);\n\t\tif (updatedSelection) {\n\t\t\tupdatedSelections.push(updatedSelection);\n\t\t}\n\t});\n\tif (updatedSelections.length) {\n\t\teditor.selections = updatedSelections;\n\t\teditor.revealRange(editor.selections[updatedSelections.length - 1]);\n\t}\n}\n\nfunction getUpdatedSelections(document: vscode.TextDocument, rootNode: HtmlFlatNode, position: vscode.Position): vscode.Selection | undefined {\n\tconst offset = document.offsetAt(position);\n\tconst currentNode = getHtmlFlatNode(document.getText(), rootNode, offset, true);\n\tif (!currentNode) {\n\t\treturn;\n\t}\n\n\t// If no opening/closing tag or cursor is between open and close tag, then no-op\n\tif (!currentNode.open\n\t\t|| !currentNode.close\n\t\t|| (offset > currentNode.open.end && offset < currentNode.close.start)) {\n\t\treturn;\n\t}\n\n\t// Place cursor inside the close tag if cursor is inside the open tag, else place it inside the open tag\n\tconst finalOffset = (offset <= currentNode.open.end) ? currentNode.close.start + 2 : currentNode.start + 1;\n\treturn offsetRangeToSelection(document, finalOffset, finalOffset);\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as vscode from 'vscode';\nimport { getHtmlFlatNode, offsetRangeToSelection, validate } from './util';\nimport { getRootNode } from './parseDocument';\nimport { HtmlNode as HtmlFlatNode } from 'EmmetFlatNode';\n\nlet balanceOutStack: Array<readonly vscode.Selection[]> = [];\nlet lastBalancedSelections: readonly vscode.Selection[] = [];\n\nexport function balanceOut() {\n\tbalance(true);\n}\n\nexport function balanceIn() {\n\tbalance(false);\n}\n\nfunction balance(out: boolean) {\n\tif (!validate(false) || !vscode.window.activeTextEditor) {\n\t\treturn;\n\t}\n\tconst editor = vscode.window.activeTextEditor;\n\tconst document = editor.document;\n\tconst rootNode = <HtmlFlatNode>getRootNode(document, true);\n\tif (!rootNode) {\n\t\treturn;\n\t}\n\n\tconst rangeFn = out ? getRangeToBalanceOut : getRangeToBalanceIn;\n\tlet newSelections: readonly vscode.Selection[] = editor.selections.map(selection => {\n\t\treturn rangeFn(document, rootNode, selection);\n\t});\n\n\t// check whether we are starting a balance elsewhere\n\tif (areSameSelections(lastBalancedSelections, editor.selections)) {\n\t\t// we are not starting elsewhere, so use the stack as-is\n\t\tif (out) {\n\t\t\t// make sure we are able to expand outwards\n\t\t\tif (!areSameSelections(editor.selections, newSelections)) {\n\t\t\t\tbalanceOutStack.push(editor.selections);\n\t\t\t}\n\t\t} else if (balanceOutStack.length) {\n\t\t\tnewSelections = balanceOutStack.pop()!;\n\t\t}\n\t} else {\n\t\t// we are starting elsewhere, so reset the stack\n\t\tbalanceOutStack = out ? [editor.selections] : [];\n\t}\n\n\teditor.selections = newSelections;\n\tlastBalancedSelections = editor.selections;\n}\n\nfunction getRangeToBalanceOut(document: vscode.TextDocument, rootNode: HtmlFlatNode, selection: vscode.Selection): vscode.Selection {\n\tconst offset = document.offsetAt(selection.start);\n\tconst nodeToBalance = getHtmlFlatNode(document.getText(), rootNode, offset, false);\n\tif (!nodeToBalance) {\n\t\treturn selection;\n\t}\n\tif (!nodeToBalance.open || !nodeToBalance.close) {\n\t\treturn offsetRangeToSelection(document, nodeToBalance.start, nodeToBalance.end);\n\t}\n\n\t// Set reverse direction if we were in the end tag\n\tlet innerSelection: vscode.Selection;\n\tlet outerSelection: vscode.Selection;\n\tif (nodeToBalance.close.start <= offset && nodeToBalance.close.end > offset) {\n\t\tinnerSelection = offsetRangeToSelection(document, nodeToBalance.close.start, nodeToBalance.open.end);\n\t\touterSelection = offsetRangeToSelection(document, nodeToBalance.close.end, nodeToBalance.open.start);\n\t}\n\telse {\n\t\tinnerSelection = offsetRangeToSelection(document, nodeToBalance.open.end, nodeToBalance.close.start);\n\t\touterSelection = offsetRangeToSelection(document, nodeToBalance.open.start, nodeToBalance.close.end);\n\t}\n\n\tif (innerSelection.contains(selection) && !innerSelection.isEqual(selection)) {\n\t\treturn innerSelection;\n\t}\n\tif (outerSelection.contains(selection) && !outerSelection.isEqual(selection)) {\n\t\treturn outerSelection;\n\t}\n\treturn selection;\n}\n\nfunction getRangeToBalanceIn(document: vscode.TextDocument, rootNode: HtmlFlatNode, selection: vscode.Selection): vscode.Selection {\n\tconst offset = document.offsetAt(selection.start);\n\tconst nodeToBalance = getHtmlFlatNode(document.getText(), rootNode, offset, true);\n\tif (!nodeToBalance) {\n\t\treturn selection;\n\t}\n\n\tconst selectionStart = document.offsetAt(selection.start);\n\tconst selectionEnd = document.offsetAt(selection.end);\n\tif (nodeToBalance.open && nodeToBalance.close) {\n\t\tconst entireNodeSelected = selectionStart === nodeToBalance.start && selectionEnd === nodeToBalance.end;\n\t\tconst startInOpenTag = selectionStart > nodeToBalance.open.start && selectionStart < nodeToBalance.open.end;\n\t\tconst startInCloseTag = selectionStart > nodeToBalance.close.start && selectionStart < nodeToBalance.close.end;\n\n\t\tif (entireNodeSelected || startInOpenTag || startInCloseTag) {\n\t\t\treturn offsetRangeToSelection(document, nodeToBalance.open.end, nodeToBalance.close.start);\n\t\t}\n\t}\n\n\tif (!nodeToBalance.firstChild) {\n\t\treturn selection;\n\t}\n\n\tconst firstChild = nodeToBalance.firstChild;\n\tif (selectionStart === firstChild.start\n\t\t&& selectionEnd === firstChild.end\n\t\t&& firstChild.open\n\t\t&& firstChild.close) {\n\t\treturn offsetRangeToSelection(document, firstChild.open.end, firstChild.close.start);\n\t}\n\n\treturn offsetRangeToSelection(document, firstChild.start, firstChild.end);\n}\n\nfunction areSameSelections(a: readonly vscode.Selection[], b: readonly vscode.Selection[]): boolean {\n\tif (a.length !== b.length) {\n\t\treturn false;\n\t}\n\tfor (let i = 0; i < a.length; i++) {\n\t\tif (!a[i].isEqual(b[i])) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as vscode from 'vscode';\nimport { validate, getEmmetMode, getEmmetConfiguration, getHtmlFlatNode, offsetRangeToVsRange } from './util';\nimport { HtmlNode as HtmlFlatNode } from 'EmmetFlatNode';\nimport { getRootNode } from './parseDocument';\n\nexport function splitJoinTag() {\n\tif (!validate(false) || !vscode.window.activeTextEditor) {\n\t\treturn;\n\t}\n\n\tconst editor = vscode.window.activeTextEditor;\n\tconst document = editor.document;\n\tconst rootNode = <HtmlFlatNode>getRootNode(editor.document, true);\n\tif (!rootNode) {\n\t\treturn;\n\t}\n\n\treturn editor.edit(editBuilder => {\n\t\tArray.from(editor.selections).reverse().forEach(selection => {\n\t\t\tconst documentText = document.getText();\n\t\t\tconst offset = document.offsetAt(selection.start);\n\t\t\tconst nodeToUpdate = getHtmlFlatNode(documentText, rootNode, offset, true);\n\t\t\tif (nodeToUpdate) {\n\t\t\t\tconst textEdit = getRangesToReplace(document, nodeToUpdate);\n\t\t\t\teditBuilder.replace(textEdit.range, textEdit.newText);\n\t\t\t}\n\t\t});\n\t});\n}\n\nfunction getRangesToReplace(document: vscode.TextDocument, nodeToUpdate: HtmlFlatNode): vscode.TextEdit {\n\tlet rangeToReplace: vscode.Range;\n\tlet textToReplaceWith: string;\n\n\tif (!nodeToUpdate.open || !nodeToUpdate.close) {\n\t\t// Split Tag\n\t\tconst nodeText = document.getText().substring(nodeToUpdate.start, nodeToUpdate.end);\n\t\tconst m = nodeText.match(/(\\s*\\/)?>$/);\n\t\tconst end = nodeToUpdate.end;\n\t\tconst start = m ? end - m[0].length : end;\n\n\t\trangeToReplace = offsetRangeToVsRange(document, start, end);\n\t\ttextToReplaceWith = `></${nodeToUpdate.name}>`;\n\t} else {\n\t\t// Join Tag\n\t\tconst start = nodeToUpdate.open.end - 1;\n\t\tconst end = nodeToUpdate.end;\n\t\trangeToReplace = offsetRangeToVsRange(document, start, end);\n\t\ttextToReplaceWith = '/>';\n\n\t\tconst emmetMode = getEmmetMode(document.languageId, {}, []) ?? '';\n\t\tconst emmetConfig = getEmmetConfiguration(emmetMode);\n\t\tif (emmetMode && emmetConfig.syntaxProfiles[emmetMode] &&\n\t\t\t(emmetConfig.syntaxProfiles[emmetMode]['selfClosingStyle'] === 'xhtml' || emmetConfig.syntaxProfiles[emmetMode]['self_closing_tag'] === 'xhtml')) {\n\t\t\ttextToReplaceWith = ' ' + textToReplaceWith;\n\t\t}\n\t}\n\n\treturn new vscode.TextEdit(rangeToReplace, textToReplaceWith);\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as vscode from 'vscode';\nimport { Node } from 'EmmetFlatNode';\nimport { getFlatNode, offsetRangeToVsRange, validate } from './util';\nimport { getRootNode } from './parseDocument';\n\nexport function mergeLines() {\n\tif (!validate(false) || !vscode.window.activeTextEditor) {\n\t\treturn;\n\t}\n\n\tconst editor = vscode.window.activeTextEditor;\n\n\tconst rootNode = getRootNode(editor.document, true);\n\tif (!rootNode) {\n\t\treturn;\n\t}\n\n\treturn editor.edit(editBuilder => {\n\t\tArray.from(editor.selections).reverse().forEach(selection => {\n\t\t\tconst textEdit = getRangesToReplace(editor.document, selection, rootNode);\n\t\t\tif (textEdit) {\n\t\t\t\teditBuilder.replace(textEdit.range, textEdit.newText);\n\t\t\t}\n\t\t});\n\t});\n}\n\nfunction getRangesToReplace(document: vscode.TextDocument, selection: vscode.Selection, rootNode: Node): vscode.TextEdit | undefined {\n\tlet startNodeToUpdate: Node | undefined;\n\tlet endNodeToUpdate: Node | undefined;\n\n\tconst selectionStart = document.offsetAt(selection.start);\n\tconst selectionEnd = document.offsetAt(selection.end);\n\tif (selection.isEmpty) {\n\t\tstartNodeToUpdate = endNodeToUpdate = getFlatNode(rootNode, selectionStart, true);\n\t} else {\n\t\tstartNodeToUpdate = getFlatNode(rootNode, selectionStart, true);\n\t\tendNodeToUpdate = getFlatNode(rootNode, selectionEnd, true);\n\t}\n\n\tif (!startNodeToUpdate || !endNodeToUpdate) {\n\t\treturn;\n\t}\n\n\tconst startPos = document.positionAt(startNodeToUpdate.start);\n\tconst startLine = startPos.line;\n\tconst startChar = startPos.character;\n\tconst endPos = document.positionAt(endNodeToUpdate.end);\n\tconst endLine = endPos.line;\n\tif (startLine === endLine) {\n\t\treturn;\n\t}\n\n\tconst rangeToReplace = offsetRangeToVsRange(document, startNodeToUpdate.start, endNodeToUpdate.end);\n\tlet textToReplaceWith = document.lineAt(startLine).text.substr(startChar);\n\tfor (let i = startLine + 1; i <= endLine; i++) {\n\t\ttextToReplaceWith += document.lineAt(i).text.trim();\n\t}\n\n\treturn new vscode.TextEdit(rangeToReplace, textToReplaceWith);\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as vscode from 'vscode';\nimport { getNodesInBetween, getFlatNode, getHtmlFlatNode, sameNodes, isStyleSheet, validate, offsetRangeToVsRange, offsetRangeToSelection } from './util';\nimport { Node, Stylesheet, Rule } from 'EmmetFlatNode';\nimport parseStylesheet from '@emmetio/css-parser';\nimport { getRootNode } from './parseDocument';\n\nlet startCommentStylesheet: string;\nlet endCommentStylesheet: string;\nlet startCommentHTML: string;\nlet endCommentHTML: string;\n\nexport function toggleComment(): Thenable<boolean> | undefined {\n\tif (!validate() || !vscode.window.activeTextEditor) {\n\t\treturn;\n\t}\n\tsetupCommentSpacing();\n\n\tconst editor = vscode.window.activeTextEditor;\n\tconst rootNode = getRootNode(editor.document, true);\n\tif (!rootNode) {\n\t\treturn;\n\t}\n\n\treturn editor.edit(editBuilder => {\n\t\tconst allEdits: vscode.TextEdit[][] = [];\n\t\tArray.from(editor.selections).reverse().forEach(selection => {\n\t\t\tconst edits = isStyleSheet(editor.document.languageId) ? toggleCommentStylesheet(editor.document, selection, <Stylesheet>rootNode) : toggleCommentHTML(editor.document, selection, rootNode!);\n\t\t\tif (edits.length > 0) {\n\t\t\t\tallEdits.push(edits);\n\t\t\t}\n\t\t});\n\n\t\t// Apply edits in order so we can skip nested ones.\n\t\tallEdits.sort((arr1, arr2) => {\n\t\t\tconst result = arr1[0].range.start.line - arr2[0].range.start.line;\n\t\t\treturn result === 0 ? arr1[0].range.start.character - arr2[0].range.start.character : result;\n\t\t});\n\t\tlet lastEditPosition = new vscode.Position(0, 0);\n\t\tfor (const edits of allEdits) {\n\t\t\tif (edits[0].range.end.isAfterOrEqual(lastEditPosition)) {\n\t\t\t\tedits.forEach(x => {\n\t\t\t\t\teditBuilder.replace(x.range, x.newText);\n\t\t\t\t\tlastEditPosition = x.range.end;\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t});\n}\n\nfunction toggleCommentHTML(document: vscode.TextDocument, selection: vscode.Selection, rootNode: Node): vscode.TextEdit[] {\n\tconst selectionStart = selection.isReversed ? selection.active : selection.anchor;\n\tconst selectionEnd = selection.isReversed ? selection.anchor : selection.active;\n\tconst selectionStartOffset = document.offsetAt(selectionStart);\n\tconst selectionEndOffset = document.offsetAt(selectionEnd);\n\tconst documentText = document.getText();\n\n\tconst startNode = getHtmlFlatNode(documentText, rootNode, selectionStartOffset, true);\n\tconst endNode = getHtmlFlatNode(documentText, rootNode, selectionEndOffset, true);\n\n\tif (!startNode || !endNode) {\n\t\treturn [];\n\t}\n\n\tif (sameNodes(startNode, endNode) && startNode.name === 'style'\n\t\t&& startNode.open && startNode.close\n\t\t&& startNode.open.end < selectionStartOffset\n\t\t&& startNode.close.start > selectionEndOffset) {\n\t\tconst buffer = ' '.repeat(startNode.open.end) +\n\t\t\tdocumentText.substring(startNode.open.end, startNode.close.start);\n\t\tconst cssRootNode = parseStylesheet(buffer);\n\t\treturn toggleCommentStylesheet(document, selection, cssRootNode);\n\t}\n\n\tconst allNodes: Node[] = getNodesInBetween(startNode, endNode);\n\tlet edits: vscode.TextEdit[] = [];\n\n\tallNodes.forEach(node => {\n\t\tedits = edits.concat(getRangesToUnCommentHTML(node, document));\n\t});\n\n\tif (startNode.type === 'comment') {\n\t\treturn edits;\n\t}\n\n\n\tedits.push(new vscode.TextEdit(offsetRangeToVsRange(document, allNodes[0].start, allNodes[0].start), startCommentHTML));\n\tedits.push(new vscode.TextEdit(offsetRangeToVsRange(document, allNodes[allNodes.length - 1].end, allNodes[allNodes.length - 1].end), endCommentHTML));\n\n\treturn edits;\n}\n\nfunction getRangesToUnCommentHTML(node: Node, document: vscode.TextDocument): vscode.TextEdit[] {\n\tlet unCommentTextEdits: vscode.TextEdit[] = [];\n\n\t// If current node is commented, then uncomment and return\n\tif (node.type === 'comment') {\n\t\tunCommentTextEdits.push(new vscode.TextEdit(offsetRangeToVsRange(document, node.start, node.start + startCommentHTML.length), ''));\n\t\tunCommentTextEdits.push(new vscode.TextEdit(offsetRangeToVsRange(document, node.end - endCommentHTML.length, node.end), ''));\n\t\treturn unCommentTextEdits;\n\t}\n\n\t// All children of current node should be uncommented\n\tnode.children.forEach(childNode => {\n\t\tunCommentTextEdits = unCommentTextEdits.concat(getRangesToUnCommentHTML(childNode, document));\n\t});\n\n\treturn unCommentTextEdits;\n}\n\nfunction toggleCommentStylesheet(document: vscode.TextDocument, selection: vscode.Selection, rootNode: Stylesheet): vscode.TextEdit[] {\n\tconst selectionStart = selection.isReversed ? selection.active : selection.anchor;\n\tconst selectionEnd = selection.isReversed ? selection.anchor : selection.active;\n\tlet selectionStartOffset = document.offsetAt(selectionStart);\n\tlet selectionEndOffset = document.offsetAt(selectionEnd);\n\n\tconst startNode = getFlatNode(rootNode, selectionStartOffset, true);\n\tconst endNode = getFlatNode(rootNode, selectionEndOffset, true);\n\n\tif (!selection.isEmpty) {\n\t\tselectionStartOffset = adjustStartNodeCss(startNode, selectionStartOffset, rootNode);\n\t\tselectionEndOffset = adjustEndNodeCss(endNode, selectionEndOffset, rootNode);\n\t\tselection = offsetRangeToSelection(document, selectionStartOffset, selectionEndOffset);\n\t} else if (startNode) {\n\t\tselectionStartOffset = startNode.start;\n\t\tselectionEndOffset = startNode.end;\n\t\tselection = offsetRangeToSelection(document, selectionStartOffset, selectionEndOffset);\n\t}\n\n\t// Uncomment the comments that intersect with the selection.\n\tconst rangesToUnComment: vscode.Range[] = [];\n\tconst edits: vscode.TextEdit[] = [];\n\trootNode.comments.forEach(comment => {\n\t\tconst commentRange = offsetRangeToVsRange(document, comment.start, comment.end);\n\t\tif (selection.intersection(commentRange)) {\n\t\t\trangesToUnComment.push(commentRange);\n\t\t\tedits.push(new vscode.TextEdit(offsetRangeToVsRange(document, comment.start, comment.start + startCommentStylesheet.length), ''));\n\t\t\tedits.push(new vscode.TextEdit(offsetRangeToVsRange(document, comment.end - endCommentStylesheet.length, comment.end), ''));\n\t\t}\n\t});\n\n\tif (edits.length > 0) {\n\t\treturn edits;\n\t}\n\n\treturn [\n\t\tnew vscode.TextEdit(new vscode.Range(selection.start, selection.start), startCommentStylesheet),\n\t\tnew vscode.TextEdit(new vscode.Range(selection.end, selection.end), endCommentStylesheet)\n\t];\n}\n\nfunction setupCommentSpacing() {\n\tconst config: boolean | undefined = vscode.workspace.getConfiguration('editor.comments').get('insertSpace');\n\tif (config) {\n\t\tstartCommentStylesheet = '/* ';\n\t\tendCommentStylesheet = ' */';\n\t\tstartCommentHTML = '<!-- ';\n\t\tendCommentHTML = ' -->';\n\t} else {\n\t\tstartCommentStylesheet = '/*';\n\t\tendCommentStylesheet = '*/';\n\t\tstartCommentHTML = '<!--';\n\t\tendCommentHTML = '-->';\n\t}\n}\n\nfunction adjustStartNodeCss(node: Node | undefined, offset: number, rootNode: Stylesheet): number {\n\tfor (const comment of rootNode.comments) {\n\t\tif (comment.start <= offset && offset <= comment.end) {\n\t\t\treturn offset;\n\t\t}\n\t}\n\n\tif (!node) {\n\t\treturn offset;\n\t}\n\n\tif (node.type === 'property') {\n\t\treturn node.start;\n\t}\n\n\tconst rule = <Rule>node;\n\tif (offset < rule.contentStartToken.end || !rule.firstChild) {\n\t\treturn rule.start;\n\t}\n\n\tif (offset < rule.firstChild.start) {\n\t\treturn offset;\n\t}\n\n\tlet newStartNode = rule.firstChild;\n\twhile (newStartNode.nextSibling && offset > newStartNode.end) {\n\t\tnewStartNode = newStartNode.nextSibling;\n\t}\n\n\treturn newStartNode.start;\n}\n\nfunction adjustEndNodeCss(node: Node | undefined, offset: number, rootNode: Stylesheet): number {\n\tfor (const comment of rootNode.comments) {\n\t\tif (comment.start <= offset && offset <= comment.end) {\n\t\t\treturn offset;\n\t\t}\n\t}\n\n\tif (!node) {\n\t\treturn offset;\n\t}\n\n\tif (node.type === 'property') {\n\t\treturn node.end;\n\t}\n\n\tconst rule = <Rule>node;\n\tif (offset === rule.contentEndToken.end || !rule.firstChild) {\n\t\treturn rule.end;\n\t}\n\n\tif (offset > rule.children[rule.children.length - 1].end) {\n\t\treturn offset;\n\t}\n\n\tlet newEndNode = rule.children[rule.children.length - 1];\n\twhile (newEndNode.previousSibling && offset < newEndNode.start) {\n\t\tnewEndNode = newEndNode.previousSibling;\n\t}\n\n\treturn newEndNode.end;\n}\n\n\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as vscode from 'vscode';\nimport { validate } from './util';\n\nexport function fetchEditPoint(direction: string): void {\n\tif (!validate() || !vscode.window.activeTextEditor) {\n\t\treturn;\n\t}\n\tconst editor = vscode.window.activeTextEditor;\n\n\tconst newSelections: vscode.Selection[] = [];\n\teditor.selections.forEach(selection => {\n\t\tconst updatedSelection = direction === 'next' ? nextEditPoint(selection, editor) : prevEditPoint(selection, editor);\n\t\tnewSelections.push(updatedSelection);\n\t});\n\teditor.selections = newSelections;\n\teditor.revealRange(editor.selections[editor.selections.length - 1]);\n}\n\nfunction nextEditPoint(selection: vscode.Selection, editor: vscode.TextEditor): vscode.Selection {\n\tfor (let lineNum = selection.anchor.line; lineNum < editor.document.lineCount; lineNum++) {\n\t\tconst updatedSelection = findEditPoint(lineNum, editor, selection.anchor, 'next');\n\t\tif (updatedSelection) {\n\t\t\treturn updatedSelection;\n\t\t}\n\t}\n\treturn selection;\n}\n\nfunction prevEditPoint(selection: vscode.Selection, editor: vscode.TextEditor): vscode.Selection {\n\tfor (let lineNum = selection.anchor.line; lineNum >= 0; lineNum--) {\n\t\tconst updatedSelection = findEditPoint(lineNum, editor, selection.anchor, 'prev');\n\t\tif (updatedSelection) {\n\t\t\treturn updatedSelection;\n\t\t}\n\t}\n\treturn selection;\n}\n\n\nfunction findEditPoint(lineNum: number, editor: vscode.TextEditor, position: vscode.Position, direction: string): vscode.Selection | undefined {\n\tconst line = editor.document.lineAt(lineNum);\n\tlet lineContent = line.text;\n\n\tif (lineNum !== position.line && line.isEmptyOrWhitespace && lineContent.length) {\n\t\treturn new vscode.Selection(lineNum, lineContent.length, lineNum, lineContent.length);\n\t}\n\n\tif (lineNum === position.line && direction === 'prev') {\n\t\tlineContent = lineContent.substr(0, position.character);\n\t}\n\tconst emptyAttrIndex = direction === 'next' ? lineContent.indexOf('\"\"', lineNum === position.line ? position.character : 0) : lineContent.lastIndexOf('\"\"');\n\tconst emptyTagIndex = direction === 'next' ? lineContent.indexOf('><', lineNum === position.line ? position.character : 0) : lineContent.lastIndexOf('><');\n\n\tlet winner = -1;\n\n\tif (emptyAttrIndex > -1 && emptyTagIndex > -1) {\n\t\twinner = direction === 'next' ? Math.min(emptyAttrIndex, emptyTagIndex) : Math.max(emptyAttrIndex, emptyTagIndex);\n\t} else if (emptyAttrIndex > -1) {\n\t\twinner = emptyAttrIndex;\n\t} else {\n\t\twinner = emptyTagIndex;\n\t}\n\n\tif (winner > -1) {\n\t\treturn new vscode.Selection(lineNum, winner + 1, lineNum, winner + 1);\n\t}\n\treturn;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as vscode from 'vscode';\nimport { validate, isStyleSheet } from './util';\nimport { nextItemHTML, prevItemHTML } from './selectItemHTML';\nimport { nextItemStylesheet, prevItemStylesheet } from './selectItemStylesheet';\nimport { HtmlNode, CssNode } from 'EmmetFlatNode';\nimport { getRootNode } from './parseDocument';\n\nexport function fetchSelectItem(direction: string): void {\n\tif (!validate() || !vscode.window.activeTextEditor) {\n\t\treturn;\n\t}\n\tconst editor = vscode.window.activeTextEditor;\n\tconst document = editor.document;\n\tconst rootNode = getRootNode(document, true);\n\tif (!rootNode) {\n\t\treturn;\n\t}\n\n\tconst newSelections: vscode.Selection[] = [];\n\teditor.selections.forEach(selection => {\n\t\tconst selectionStart = selection.isReversed ? selection.active : selection.anchor;\n\t\tconst selectionEnd = selection.isReversed ? selection.anchor : selection.active;\n\n\t\tlet updatedSelection;\n\t\tif (isStyleSheet(editor.document.languageId)) {\n\t\t\tupdatedSelection = direction === 'next' ?\n\t\t\t\tnextItemStylesheet(document, selectionStart, selectionEnd, <CssNode>rootNode) :\n\t\t\t\tprevItemStylesheet(document, selectionStart, selectionEnd, <CssNode>rootNode);\n\t\t} else {\n\t\t\tupdatedSelection = direction === 'next' ?\n\t\t\t\tnextItemHTML(document, selectionStart, selectionEnd, <HtmlNode>rootNode) :\n\t\t\t\tprevItemHTML(document, selectionStart, selectionEnd, <HtmlNode>rootNode);\n\t\t}\n\t\tnewSelections.push(updatedSelection ? updatedSelection : selection);\n\t});\n\teditor.selections = newSelections;\n\teditor.revealRange(editor.selections[editor.selections.length - 1]);\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as vscode from 'vscode';\nimport { getDeepestFlatNode, findNextWord, findPrevWord, getHtmlFlatNode, offsetRangeToSelection } from './util';\nimport { HtmlNode } from 'EmmetFlatNode';\n\nexport function nextItemHTML(document: vscode.TextDocument, selectionStart: vscode.Position, selectionEnd: vscode.Position, rootNode: HtmlNode): vscode.Selection | undefined {\n\tconst selectionEndOffset = document.offsetAt(selectionEnd);\n\tlet currentNode = getHtmlFlatNode(document.getText(), rootNode, selectionEndOffset, false);\n\tlet nextNode: HtmlNode | undefined = undefined;\n\n\tif (!currentNode) {\n\t\treturn;\n\t}\n\n\tif (currentNode.type !== 'comment') {\n\t\t// If cursor is in the tag name, select tag\n\t\tif (currentNode.open &&\n\t\t\tselectionEndOffset <= currentNode.open.start + currentNode.name.length) {\n\t\t\treturn getSelectionFromNode(document, currentNode);\n\t\t}\n\n\t\t// If cursor is in the open tag, look for attributes\n\t\tif (currentNode.open &&\n\t\t\tselectionEndOffset < currentNode.open.end) {\n\t\t\tconst selectionStartOffset = document.offsetAt(selectionStart);\n\t\t\tconst attrSelection = getNextAttribute(document, selectionStartOffset, selectionEndOffset, currentNode);\n\t\t\tif (attrSelection) {\n\t\t\t\treturn attrSelection;\n\t\t\t}\n\t\t}\n\n\t\t// Get the first child of current node which is right after the cursor and is not a comment\n\t\tnextNode = currentNode.firstChild;\n\t\twhile (nextNode && (selectionEndOffset >= nextNode.end || nextNode.type === 'comment')) {\n\t\t\tnextNode = nextNode.nextSibling;\n\t\t}\n\t}\n\n\t// Get next sibling of current node which is not a comment. If none is found try the same on the parent\n\twhile (!nextNode && currentNode) {\n\t\tif (currentNode.nextSibling) {\n\t\t\tif (currentNode.nextSibling.type !== 'comment') {\n\t\t\t\tnextNode = currentNode.nextSibling;\n\t\t\t} else {\n\t\t\t\tcurrentNode = currentNode.nextSibling;\n\t\t\t}\n\t\t} else {\n\t\t\tcurrentNode = currentNode.parent;\n\t\t}\n\t}\n\n\treturn nextNode && getSelectionFromNode(document, nextNode);\n}\n\nexport function prevItemHTML(document: vscode.TextDocument, selectionStart: vscode.Position, selectionEnd: vscode.Position, rootNode: HtmlNode): vscode.Selection | undefined {\n\tconst selectionStartOffset = document.offsetAt(selectionStart);\n\tlet currentNode = getHtmlFlatNode(document.getText(), rootNode, selectionStartOffset, false);\n\tlet prevNode: HtmlNode | undefined = undefined;\n\n\tif (!currentNode) {\n\t\treturn;\n\t}\n\n\tconst selectionEndOffset = document.offsetAt(selectionEnd);\n\tif (currentNode.open &&\n\t\tcurrentNode.type !== 'comment' &&\n\t\tselectionStartOffset - 1 > currentNode.open.start) {\n\t\tif (selectionStartOffset < currentNode.open.end || !currentNode.firstChild || selectionEndOffset <= currentNode.firstChild.start) {\n\t\t\tprevNode = currentNode;\n\t\t} else {\n\t\t\t// Select the child that appears just before the cursor and is not a comment\n\t\t\tprevNode = currentNode.firstChild;\n\t\t\tlet oldOption: HtmlNode | undefined = undefined;\n\t\t\twhile (prevNode.nextSibling && selectionStartOffset >= prevNode.nextSibling.end) {\n\t\t\t\tif (prevNode && prevNode.type !== 'comment') {\n\t\t\t\t\toldOption = prevNode;\n\t\t\t\t}\n\t\t\t\tprevNode = prevNode.nextSibling;\n\t\t\t}\n\n\t\t\tprevNode = <HtmlNode>getDeepestFlatNode((prevNode && prevNode.type !== 'comment') ? prevNode : oldOption);\n\t\t}\n\t}\n\n\t// Select previous sibling which is not a comment. If none found, then select parent\n\twhile (!prevNode && currentNode) {\n\t\tif (currentNode.previousSibling) {\n\t\t\tif (currentNode.previousSibling.type !== 'comment') {\n\t\t\t\tprevNode = <HtmlNode>getDeepestFlatNode(currentNode.previousSibling);\n\t\t\t} else {\n\t\t\t\tcurrentNode = currentNode.previousSibling;\n\t\t\t}\n\t\t} else {\n\t\t\tprevNode = currentNode.parent;\n\t\t}\n\n\t}\n\n\tif (!prevNode) {\n\t\treturn undefined;\n\t}\n\n\tconst attrSelection = getPrevAttribute(document, selectionStartOffset, selectionEndOffset, prevNode);\n\treturn attrSelection ? attrSelection : getSelectionFromNode(document, prevNode);\n}\n\nfunction getSelectionFromNode(document: vscode.TextDocument, node: HtmlNode): vscode.Selection | undefined {\n\tif (node && node.open) {\n\t\tconst selectionStart = node.open.start + 1;\n\t\tconst selectionEnd = selectionStart + node.name.length;\n\t\treturn offsetRangeToSelection(document, selectionStart, selectionEnd);\n\t}\n\treturn undefined;\n}\n\nfunction getNextAttribute(document: vscode.TextDocument, selectionStart: number, selectionEnd: number, node: HtmlNode): vscode.Selection | undefined {\n\tif (!node.attributes || node.attributes.length === 0 || node.type === 'comment') {\n\t\treturn;\n\t}\n\n\tfor (const attr of node.attributes) {\n\t\tif (selectionEnd < attr.start) {\n\t\t\t// select full attr\n\t\t\treturn offsetRangeToSelection(document, attr.start, attr.end);\n\t\t}\n\n\t\tif (!attr.value || attr.value.start === attr.value.end) {\n\t\t\t// No attr value to select\n\t\t\tcontinue;\n\t\t}\n\n\t\tif ((selectionStart === attr.start && selectionEnd === attr.end) ||\n\t\t\tselectionEnd < attr.value.start) {\n\t\t\t// cursor is in attr name, so select full attr value\n\t\t\treturn offsetRangeToSelection(document, attr.value.start, attr.value.end);\n\t\t}\n\n\t\t// Fetch the next word in the attr value\n\t\tif (!attr.value.toString().includes(' ')) {\n\t\t\t// attr value does not have space, so no next word to find\n\t\t\tcontinue;\n\t\t}\n\n\t\tlet pos: number | undefined = undefined;\n\t\tif (selectionStart === attr.value.start && selectionEnd === attr.value.end) {\n\t\t\tpos = -1;\n\t\t}\n\t\tif (pos === undefined && selectionEnd < attr.end) {\n\t\t\tconst selectionEndCharacter = document.positionAt(selectionEnd).character;\n\t\t\tconst attrValueStartCharacter = document.positionAt(attr.value.start).character;\n\t\t\tpos = selectionEndCharacter - attrValueStartCharacter - 1;\n\t\t}\n\n\t\tif (pos !== undefined) {\n\t\t\tconst [newSelectionStartOffset, newSelectionEndOffset] = findNextWord(attr.value.toString(), pos);\n\t\t\tif (newSelectionStartOffset === undefined || newSelectionEndOffset === undefined) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (newSelectionStartOffset >= 0 && newSelectionEndOffset >= 0) {\n\t\t\t\tconst newSelectionStart = attr.value.start + newSelectionStartOffset;\n\t\t\t\tconst newSelectionEnd = attr.value.start + newSelectionEndOffset;\n\t\t\t\treturn offsetRangeToSelection(document, newSelectionStart, newSelectionEnd);\n\t\t\t}\n\t\t}\n\n\t}\n\n\treturn;\n}\n\nfunction getPrevAttribute(document: vscode.TextDocument, selectionStart: number, selectionEnd: number, node: HtmlNode): vscode.Selection | undefined {\n\tif (!node.attributes || node.attributes.length === 0 || node.type === 'comment') {\n\t\treturn;\n\t}\n\n\tfor (let i = node.attributes.length - 1; i >= 0; i--) {\n\t\tconst attr = node.attributes[i];\n\t\tif (selectionStart <= attr.start) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (!attr.value || attr.value.start === attr.value.end || selectionStart < attr.value.start) {\n\t\t\t// select full attr\n\t\t\treturn offsetRangeToSelection(document, attr.start, attr.end);\n\t\t}\n\n\t\tif (selectionStart === attr.value.start) {\n\t\t\tif (selectionEnd >= attr.value.end) {\n\t\t\t\t// select full attr\n\t\t\t\treturn offsetRangeToSelection(document, attr.start, attr.end);\n\t\t\t}\n\t\t\t// select attr value\n\t\t\treturn offsetRangeToSelection(document, attr.value.start, attr.value.end);\n\t\t}\n\n\t\t// Fetch the prev word in the attr value\n\t\tconst selectionStartCharacter = document.positionAt(selectionStart).character;\n\t\tconst attrValueStartCharacter = document.positionAt(attr.value.start).character;\n\t\tconst pos = selectionStart > attr.value.end ? attr.value.toString().length :\n\t\t\tselectionStartCharacter - attrValueStartCharacter;\n\t\tconst [newSelectionStartOffset, newSelectionEndOffset] = findPrevWord(attr.value.toString(), pos);\n\t\tif (newSelectionStartOffset === undefined || newSelectionEndOffset === undefined) {\n\t\t\treturn;\n\t\t}\n\t\tif (newSelectionStartOffset >= 0 && newSelectionEndOffset >= 0) {\n\t\t\tconst newSelectionStart = attr.value.start + newSelectionStartOffset;\n\t\t\tconst newSelectionEnd = attr.value.start + newSelectionEndOffset;\n\t\t\treturn offsetRangeToSelection(document, newSelectionStart, newSelectionEnd);\n\t\t}\n\t}\n\n\treturn;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as vscode from 'vscode';\nimport { getDeepestFlatNode, findNextWord, findPrevWord, getFlatNode, offsetRangeToSelection } from './util';\nimport { Node, CssNode, Rule, Property } from 'EmmetFlatNode';\n\nexport function nextItemStylesheet(document: vscode.TextDocument, startPosition: vscode.Position, endPosition: vscode.Position, rootNode: Node): vscode.Selection | undefined {\n\tconst startOffset = document.offsetAt(startPosition);\n\tconst endOffset = document.offsetAt(endPosition);\n\tlet currentNode: CssNode | undefined = <CssNode>getFlatNode(rootNode, endOffset, true);\n\tif (!currentNode) {\n\t\tcurrentNode = <CssNode>rootNode;\n\t}\n\tif (!currentNode) {\n\t\treturn;\n\t}\n\t// Full property is selected, so select full property value next\n\tif (currentNode.type === 'property' &&\n\t\tstartOffset === currentNode.start &&\n\t\tendOffset === currentNode.end) {\n\t\treturn getSelectionFromProperty(document, currentNode, startOffset, endOffset, true, 'next');\n\t}\n\n\t// Part or whole of propertyValue is selected, so select the next word in the propertyValue\n\tif (currentNode.type === 'property' &&\n\t\tstartOffset >= (<Property>currentNode).valueToken.start &&\n\t\tendOffset <= (<Property>currentNode).valueToken.end) {\n\t\tconst singlePropertyValue = getSelectionFromProperty(document, currentNode, startOffset, endOffset, false, 'next');\n\t\tif (singlePropertyValue) {\n\t\t\treturn singlePropertyValue;\n\t\t}\n\t}\n\n\t// Cursor is in the selector or in a property\n\tif ((currentNode.type === 'rule' && endOffset < (<Rule>currentNode).selectorToken.end)\n\t\t|| (currentNode.type === 'property' && endOffset < (<Property>currentNode).valueToken.end)) {\n\t\treturn getSelectionFromNode(document, currentNode);\n\t}\n\n\t// Get the first child of current node which is right after the cursor\n\tlet nextNode = currentNode.firstChild;\n\twhile (nextNode && endOffset >= nextNode.end) {\n\t\tnextNode = nextNode.nextSibling;\n\t}\n\n\t// Get next sibling of current node or the parent\n\twhile (!nextNode && currentNode) {\n\t\tnextNode = currentNode.nextSibling;\n\t\tcurrentNode = currentNode.parent;\n\t}\n\n\treturn nextNode ? getSelectionFromNode(document, nextNode) : undefined;\n}\n\nexport function prevItemStylesheet(document: vscode.TextDocument, startPosition: vscode.Position, endPosition: vscode.Position, rootNode: CssNode): vscode.Selection | undefined {\n\tconst startOffset = document.offsetAt(startPosition);\n\tconst endOffset = document.offsetAt(endPosition);\n\tlet currentNode = <CssNode>getFlatNode(rootNode, startOffset, false);\n\tif (!currentNode) {\n\t\tcurrentNode = rootNode;\n\t}\n\tif (!currentNode) {\n\t\treturn;\n\t}\n\n\t// Full property value is selected, so select the whole property next\n\tif (currentNode.type === 'property' &&\n\t\tstartOffset === (<Property>currentNode).valueToken.start &&\n\t\tendOffset === (<Property>currentNode).valueToken.end) {\n\t\treturn getSelectionFromNode(document, currentNode);\n\t}\n\n\t// Part of propertyValue is selected, so select the prev word in the propertyValue\n\tif (currentNode.type === 'property' &&\n\t\tstartOffset >= (<Property>currentNode).valueToken.start &&\n\t\tendOffset <= (<Property>currentNode).valueToken.end) {\n\t\tconst singlePropertyValue = getSelectionFromProperty(document, currentNode, startOffset, endOffset, false, 'prev');\n\t\tif (singlePropertyValue) {\n\t\t\treturn singlePropertyValue;\n\t\t}\n\t}\n\n\tif (currentNode.type === 'property' || !currentNode.firstChild ||\n\t\t(currentNode.type === 'rule' && startOffset <= currentNode.firstChild.start)) {\n\t\treturn getSelectionFromNode(document, currentNode);\n\t}\n\n\t// Select the child that appears just before the cursor\n\tlet prevNode: CssNode | undefined = currentNode.firstChild;\n\twhile (prevNode.nextSibling && startOffset >= prevNode.nextSibling.end) {\n\t\tprevNode = prevNode.nextSibling;\n\t}\n\tprevNode = <CssNode | undefined>getDeepestFlatNode(prevNode);\n\n\treturn getSelectionFromProperty(document, prevNode, startOffset, endOffset, false, 'prev');\n}\n\n\nfunction getSelectionFromNode(document: vscode.TextDocument, node: Node | undefined): vscode.Selection | undefined {\n\tif (!node) {\n\t\treturn;\n\t}\n\n\tconst nodeToSelect = node.type === 'rule' ? (<Rule>node).selectorToken : node;\n\treturn offsetRangeToSelection(document, nodeToSelect.start, nodeToSelect.end);\n}\n\n\nfunction getSelectionFromProperty(document: vscode.TextDocument, node: Node | undefined, selectionStart: number, selectionEnd: number, selectFullValue: boolean, direction: string): vscode.Selection | undefined {\n\tif (!node || node.type !== 'property') {\n\t\treturn;\n\t}\n\tconst propertyNode = <Property>node;\n\n\tconst propertyValue = propertyNode.valueToken.stream.substring(propertyNode.valueToken.start, propertyNode.valueToken.end);\n\tselectFullValue = selectFullValue ||\n\t\t(direction === 'prev' && selectionStart === propertyNode.valueToken.start && selectionEnd < propertyNode.valueToken.end);\n\n\tif (selectFullValue) {\n\t\treturn offsetRangeToSelection(document, propertyNode.valueToken.start, propertyNode.valueToken.end);\n\t}\n\n\tlet pos: number = -1;\n\tif (direction === 'prev') {\n\t\tif (selectionStart === propertyNode.valueToken.start) {\n\t\t\treturn;\n\t\t}\n\t\tconst selectionStartChar = document.positionAt(selectionStart).character;\n\t\tconst tokenStartChar = document.positionAt(propertyNode.valueToken.start).character;\n\t\tpos = selectionStart > propertyNode.valueToken.end ? propertyValue.length :\n\t\t\tselectionStartChar - tokenStartChar;\n\t} else if (direction === 'next') {\n\t\tif (selectionEnd === propertyNode.valueToken.end &&\n\t\t\t(selectionStart > propertyNode.valueToken.start || !propertyValue.includes(' '))) {\n\t\t\treturn;\n\t\t}\n\t\tconst selectionEndChar = document.positionAt(selectionEnd).character;\n\t\tconst tokenStartChar = document.positionAt(propertyNode.valueToken.start).character;\n\t\tpos = selectionEnd === propertyNode.valueToken.end ? -1 :\n\t\t\tselectionEndChar - tokenStartChar - 1;\n\t}\n\n\n\tconst [newSelectionStartOffset, newSelectionEndOffset] = direction === 'prev' ? findPrevWord(propertyValue, pos) : findNextWord(propertyValue, pos);\n\tif (!newSelectionStartOffset && !newSelectionEndOffset) {\n\t\treturn;\n\t}\n\n\tconst tokenStart = document.positionAt(propertyNode.valueToken.start);\n\tconst newSelectionStart = tokenStart.translate(0, newSelectionStartOffset);\n\tconst newSelectionEnd = tokenStart.translate(0, newSelectionEndOffset);\n\n\treturn new vscode.Selection(newSelectionStart, newSelectionEnd);\n}\n\n\n\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* Based on @sergeche's work in his emmet plugin */\n\nimport * as vscode from 'vscode';\nimport evaluate, { extract } from '@emmetio/math-expression';\n\nexport function evaluateMathExpression(): Thenable<boolean> {\n\tif (!vscode.window.activeTextEditor) {\n\t\tvscode.window.showInformationMessage('No editor is active');\n\t\treturn Promise.resolve(false);\n\t}\n\tconst editor = vscode.window.activeTextEditor;\n\treturn editor.edit(editBuilder => {\n\t\teditor.selections.forEach(selection => {\n\t\t\t// startpos always comes before endpos\n\t\t\tconst startpos = selection.isReversed ? selection.active : selection.anchor;\n\t\t\tconst endpos = selection.isReversed ? selection.anchor : selection.active;\n\t\t\tconst selectionText = editor.document.getText(new vscode.Range(startpos, endpos));\n\n\t\t\ttry {\n\t\t\t\tif (selectionText) {\n\t\t\t\t\t// respect selections\n\t\t\t\t\tconst result = String(evaluate(selectionText));\n\t\t\t\t\teditBuilder.replace(new vscode.Range(startpos, endpos), result);\n\t\t\t\t} else {\n\t\t\t\t\t// no selection made, extract expression from line\n\t\t\t\t\tconst lineToSelectionEnd = editor.document.getText(new vscode.Range(new vscode.Position(selection.end.line, 0), endpos));\n\t\t\t\t\tconst extractedIndices = extract(lineToSelectionEnd);\n\t\t\t\t\tif (!extractedIndices) {\n\t\t\t\t\t\tthrow new Error('Invalid extracted indices');\n\t\t\t\t\t}\n\t\t\t\t\tconst result = String(evaluate(lineToSelectionEnd.substr(extractedIndices[0], extractedIndices[1])));\n\t\t\t\t\tconst rangeToReplace = new vscode.Range(\n\t\t\t\t\t\tnew vscode.Position(selection.end.line, extractedIndices[0]),\n\t\t\t\t\t\tnew vscode.Position(selection.end.line, extractedIndices[1])\n\t\t\t\t\t);\n\t\t\t\t\teditBuilder.replace(rangeToReplace, result);\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\tvscode.window.showErrorMessage('Could not evaluate expression');\n\t\t\t\t// Ignore error since most likely it's because of non-math expression\n\t\t\t\tconsole.warn('Math evaluation error', err);\n\t\t\t}\n\t\t});\n\t});\n}\n","import Scanner, { isWhiteSpace, isNumber, isSpace } from '@emmetio/scanner';\n\nconst nullary = token(\"null\" /* Null */, 0);\n/**\n * Parses given expression in forward direction\n */\nfunction parse(expr) {\n const scanner = typeof expr === 'string' ? new Scanner(expr) : expr;\n let ch;\n let priority = 0;\n let expected = (1 /* Primary */ | 4 /* LParen */ | 16 /* Sign */);\n const tokens = [];\n while (!scanner.eof()) {\n scanner.eatWhile(isWhiteSpace);\n scanner.start = scanner.pos;\n if (consumeNumber(scanner)) {\n if ((expected & 1 /* Primary */) === 0) {\n error('Unexpected number', scanner);\n }\n tokens.push(number(scanner.current()));\n expected = (2 /* Operator */ | 8 /* RParen */);\n }\n else if (isOperator(scanner.peek())) {\n ch = scanner.next();\n if (isSign(ch) && (expected & 16 /* Sign */)) {\n if (isNegativeSign(ch)) {\n tokens.push(op1(ch, priority));\n }\n expected = (1 /* Primary */ | 4 /* LParen */ | 16 /* Sign */);\n }\n else {\n if ((expected & 2 /* Operator */) === 0) {\n error('Unexpected operator', scanner);\n }\n tokens.push(op2(ch, priority));\n expected = (1 /* Primary */ | 4 /* LParen */ | 16 /* Sign */);\n }\n }\n else if (scanner.eat(40 /* LeftParenthesis */)) {\n if ((expected & 4 /* LParen */) === 0) {\n error('Unexpected \"(\"', scanner);\n }\n priority += 10;\n expected = (1 /* Primary */ | 4 /* LParen */ | 16 /* Sign */ | 32 /* NullaryCall */);\n }\n else if (scanner.eat(41 /* RightParenthesis */)) {\n priority -= 10;\n if (expected & 32 /* NullaryCall */) {\n tokens.push(nullary);\n }\n else if ((expected & 8 /* RParen */) === 0) {\n error('Unexpected \")\"', scanner);\n }\n expected = (2 /* Operator */ | 8 /* RParen */ | 4 /* LParen */);\n }\n else {\n error('Unknown character', scanner);\n }\n }\n if (priority < 0 || priority >= 10) {\n error('Unmatched \"()\"', scanner);\n }\n const result = orderTokens(tokens);\n if (result === null) {\n error('Parity', scanner);\n }\n return result;\n}\n/**\n * Consumes number from given stream\n * @return Returns `true` if number was consumed\n */\nfunction consumeNumber(scanner) {\n const start = scanner.pos;\n if (scanner.eat(46 /* Dot */) && scanner.eatWhile(isNumber)) {\n // short decimal notation: .025\n return true;\n }\n if (scanner.eatWhile(isNumber) && (!scanner.eat(46 /* Dot */) || scanner.eatWhile(isNumber))) {\n // either integer or decimal: 10, 10.25\n return true;\n }\n scanner.pos = start;\n return false;\n}\n/**\n * Orders parsed tokens (operands and operators) in given array so that they are\n * laid off in order of execution\n */\nfunction orderTokens(tokens) {\n const operators = [];\n const operands = [];\n let nOperators = 0;\n for (let i = 0; i < tokens.length; i++) {\n const t = tokens[i];\n if (t.type === \"num\" /* Number */) {\n operands.push(t);\n }\n else {\n nOperators += t.type === \"op1\" /* Op1 */ ? 1 : 2;\n while (operators.length) {\n if (t.priority <= operators[operators.length - 1].priority) {\n operands.push(operators.pop());\n }\n else {\n break;\n }\n }\n operators.push(t);\n }\n }\n return nOperators + 1 === operands.length + operators.length\n ? operands.concat(operators.reverse())\n : null /* parity */;\n}\n/**\n * Number token factory\n */\nfunction number(value, priority) {\n return token(\"num\" /* Number */, parseFloat(value), priority);\n}\n/**\n * Unary operator factory\n * @param value Operator character code\n * @param priority Operator execution priority\n */\nfunction op1(value, priority = 0) {\n if (value === 45 /* Minus */) {\n priority += 2;\n }\n return token(\"op1\" /* Op1 */, value, priority);\n}\n/**\n * Binary operator factory\n * @param value Operator character code\n * @param priority Operator execution priority\n */\nfunction op2(value, priority = 0) {\n if (value === 42 /* Multiply */) {\n priority += 1;\n }\n else if (value === 47 /* Divide */ || value === 92 /* IntDivide */) {\n priority += 2;\n }\n return token(\"op2\" /* Op2 */, value, priority);\n}\nfunction error(name, scanner) {\n if (scanner) {\n name += ` at column ${scanner.pos} of expression`;\n }\n throw new Error(name);\n}\nfunction isSign(ch) {\n return isPositiveSign(ch) || isNegativeSign(ch);\n}\nfunction isPositiveSign(ch) {\n return ch === 43 /* Plus */;\n}\nfunction isNegativeSign(ch) {\n return ch === 45 /* Minus */;\n}\nfunction isOperator(ch) {\n return ch === 43 /* Plus */ || ch === 45 /* Minus */ || ch === 42 /* Multiply */\n || ch === 47 /* Divide */ || ch === 92 /* IntDivide */;\n}\nfunction token(type, value, priority = 0) {\n return { type, value, priority };\n}\n\nconst defaultOptions = {\n lookAhead: true,\n whitespace: true\n};\nfunction extract(text, pos = text.length, options) {\n const opt = Object.assign(Object.assign({}, defaultOptions), options);\n const scanner = { text, pos };\n let ch;\n if (opt.lookAhead && cur(scanner) === 41 /* RightParenthesis */) {\n // Basically, we should consume right parenthesis only with optional whitespace\n scanner.pos++;\n const len = text.length;\n while (scanner.pos < len) {\n ch = cur(scanner);\n if (ch !== 41 /* RightParenthesis */ && !(opt.whitespace && isSpace(ch))) {\n break;\n }\n scanner.pos++;\n }\n }\n const end = scanner.pos;\n let braces = 0;\n while (scanner.pos >= 0) {\n if (number$1(scanner)) {\n continue;\n }\n ch = prev(scanner);\n if (ch === 41 /* RightParenthesis */) {\n braces++;\n }\n else if (ch === 40 /* LeftParenthesis */) {\n if (!braces) {\n break;\n }\n braces--;\n }\n else if (!((opt.whitespace && isSpace(ch)) || isSign(ch) || isOperator(ch))) {\n break;\n }\n scanner.pos--;\n }\n if (scanner.pos !== end && !braces) {\n // Trim whitespace\n while (isSpace(cur(scanner))) {\n scanner.pos++;\n }\n return [scanner.pos, end];\n }\n return null;\n}\n/**\n * Backward-consumes number from given scanner, if possible\n */\nfunction number$1(scanner) {\n if (isNumber(prev(scanner))) {\n scanner.pos--;\n let dot = false;\n let ch;\n while (scanner.pos >= 0) {\n ch = prev(scanner);\n if (ch === 46 /* . */) {\n if (dot) {\n // Decimal delimiter already consumed, abort\n break;\n }\n dot = true;\n }\n else if (!isNumber(ch)) {\n break;\n }\n scanner.pos--;\n }\n return true;\n }\n return false;\n}\nfunction prev(scanner) {\n return scanner.text.charCodeAt(scanner.pos - 1);\n}\nfunction cur(scanner) {\n return scanner.text.charCodeAt(scanner.pos);\n}\n\nconst ops1 = {\n [45 /* Minus */]: num => -num\n};\nconst ops2 = {\n [43 /* Plus */]: (a, b) => a + b,\n [45 /* Minus */]: (a, b) => a - b,\n [42 /* Multiply */]: (a, b) => a * b,\n [47 /* Divide */]: (a, b) => a / b,\n [92 /* IntDivide */]: (a, b) => Math.floor(a / b)\n};\n/**\n * Evaluates given math expression\n * @param expr Expression to evaluate\n */\nfunction evaluate(expr) {\n if (!Array.isArray(expr)) {\n expr = parse(expr);\n }\n if (!expr || !expr.length) {\n return null;\n }\n const nStack = [];\n let n1;\n let n2;\n let f;\n for (let i = 0, il = expr.length; i < il; i++) {\n const token = expr[i];\n if (token.type === \"num\" /* Number */) {\n nStack.push(token.value);\n }\n else if (token.type === \"op2\" /* Op2 */) {\n n2 = nStack.pop();\n n1 = nStack.pop();\n f = ops2[token.value];\n nStack.push(f(n1, n2));\n }\n else if (token.type === \"op1\" /* Op1 */) {\n n1 = nStack.pop();\n f = ops1[token.value];\n nStack.push(f(n1));\n }\n else {\n throw new Error('Invalid expression');\n }\n }\n if (nStack.length > 1) {\n throw new Error('Invalid Expression (parity)');\n }\n return nStack[0];\n}\n\nexport default evaluate;\nexport { extract, parse };\n//# sourceMappingURL=math.es.js.map\n","const defaultQuotedOptions = {\n escape: 92,\n throws: false\n};\n/**\n * Check if given code is a number\n */\nfunction isNumber(code) {\n return code > 47 && code < 58;\n}\n/**\n * Check if given character code is alpha code (letter through A to Z)\n */\nfunction isAlpha(code, from, to) {\n from = from || 65; // A\n to = to || 90; // Z\n code &= ~32; // quick hack to convert any char code to uppercase char code\n return code >= from && code <= to;\n}\n/**\n * Check if given character code is alpha-numeric (letter through A to Z or number)\n */\nfunction isAlphaNumeric(code) {\n return isNumber(code) || isAlpha(code);\n}\nfunction isAlphaNumericWord(code) {\n return isNumber(code) || isAlphaWord(code);\n}\nfunction isAlphaWord(code) {\n return code === 95 /* _ */ || isAlpha(code);\n}\n/**\n * Check for Umlauts i.e. ä, Ä, ö, Ö, ü and Ü\n */\nfunction isUmlaut(code) {\n return code === 196\n || code == 214\n || code === 220\n || code === 228\n || code === 246\n || code === 252;\n}\n/**\n * Check if given character code is a white-space character: a space character\n * or line breaks\n */\nfunction isWhiteSpace(code) {\n return code === 32 /* space */\n || code === 9 /* tab */\n || code === 160; /* non-breaking space */\n}\n/**\n * Check if given character code is a space character\n */\nfunction isSpace(code) {\n return isWhiteSpace(code)\n || code === 10 /* LF */\n || code === 13; /* CR */\n}\n/**\n * Consumes 'single' or \"double\"-quoted string from given string, if possible\n * @return `true` if quoted string was consumed. The contents of quoted string\n * will be available as `stream.current()`\n */\nfunction eatQuoted(stream, options) {\n options = Object.assign(Object.assign({}, defaultQuotedOptions), options);\n const start = stream.pos;\n const quote = stream.peek();\n if (stream.eat(isQuote)) {\n while (!stream.eof()) {\n switch (stream.next()) {\n case quote:\n stream.start = start;\n return true;\n case options.escape:\n stream.next();\n break;\n }\n }\n // If we’re here then stream wasn’t properly consumed.\n // Revert stream and decide what to do\n stream.pos = start;\n if (options.throws) {\n throw stream.error('Unable to consume quoted string');\n }\n }\n return false;\n}\n/**\n * Check if given character code is a quote character\n */\nfunction isQuote(code) {\n return code === 39 /* ' */ || code === 34 /* \" */;\n}\n/**\n * Eats paired characters substring, for example `(foo)` or `[bar]`\n * @param open Character code of pair opening\n * @param close Character code of pair closing\n * @return Returns `true` if character pair was successfully consumed, it’s\n * content will be available as `stream.current()`\n */\nfunction eatPair(stream, open, close, options) {\n options = Object.assign(Object.assign({}, defaultQuotedOptions), options);\n const start = stream.pos;\n if (stream.eat(open)) {\n let stack = 1;\n let ch;\n while (!stream.eof()) {\n if (eatQuoted(stream, options)) {\n continue;\n }\n ch = stream.next();\n if (ch === open) {\n stack++;\n }\n else if (ch === close) {\n stack--;\n if (!stack) {\n stream.start = start;\n return true;\n }\n }\n else if (ch === options.escape) {\n stream.next();\n }\n }\n // If we’re here then paired character can’t be consumed\n stream.pos = start;\n if (options.throws) {\n throw stream.error(`Unable to find matching pair for ${String.fromCharCode(open)}`);\n }\n }\n return false;\n}\n\n/**\n * A streaming, character code-based string reader\n */\nclass Scanner {\n constructor(str, start, end) {\n if (end == null && typeof str === 'string') {\n end = str.length;\n }\n this.string = str;\n this.pos = this.start = start || 0;\n this.end = end || 0;\n }\n /**\n * Returns true only if the stream is at the end of the file.\n */\n eof() {\n return this.pos >= this.end;\n }\n /**\n * Creates a new stream instance which is limited to given `start` and `end`\n * range. E.g. its `eof()` method will look at `end` property, not actual\n * stream end\n */\n limit(start, end) {\n return new Scanner(this.string, start, end);\n }\n /**\n * Returns the next character code in the stream without advancing it.\n * Will return NaN at the end of the file.\n */\n peek() {\n return this.string.charCodeAt(this.pos);\n }\n /**\n * Returns the next character in the stream and advances it.\n * Also returns <code>undefined</code> when no more characters are available.\n */\n next() {\n if (this.pos < this.string.length) {\n return this.string.charCodeAt(this.pos++);\n }\n }\n /**\n * `match` can be a character code or a function that takes a character code\n * and returns a boolean. If the next character in the stream 'matches'\n * the given argument, it is consumed and returned.\n * Otherwise, `false` is returned.\n */\n eat(match) {\n const ch = this.peek();\n const ok = typeof match === 'function' ? match(ch) : ch === match;\n if (ok) {\n this.next();\n }\n return ok;\n }\n /**\n * Repeatedly calls <code>eat</code> with the given argument, until it\n * fails. Returns <code>true</code> if any characters were eaten.\n */\n eatWhile(match) {\n const start = this.pos;\n while (!this.eof() && this.eat(match)) { /* */ }\n return this.pos !== start;\n }\n /**\n * Backs up the stream n characters. Backing it up further than the\n * start of the current token will cause things to break, so be careful.\n */\n backUp(n) {\n this.pos -= (n || 1);\n }\n /**\n * Get the string between the start of the current token and the\n * current stream position.\n */\n current() {\n return this.substring(this.start, this.pos);\n }\n /**\n * Returns substring for given range\n */\n substring(start, end) {\n return this.string.slice(start, end);\n }\n /**\n * Creates error object with current stream state\n */\n error(message, pos = this.pos) {\n return new ScannerError(`${message} at ${pos + 1}`, pos, this.string);\n }\n}\nclass ScannerError extends Error {\n constructor(message, pos, str) {\n super(message);\n this.pos = pos;\n this.string = str;\n }\n}\n\nexport { ScannerError, Scanner as default, eatPair, eatQuoted, isAlpha, isAlphaNumeric, isAlphaNumericWord, isAlphaWord, isNumber, isQuote, isSpace, isUmlaut, isWhiteSpace };\n//# sourceMappingURL=scanner.js.map\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* Based on @sergeche's work in his emmet plugin */\n\nimport * as vscode from 'vscode';\n\nconst reNumber = /[0-9]/;\n\n/**\n * Incerement number under caret of given editor\n */\nexport function incrementDecrement(delta: number): Thenable<boolean> | undefined {\n\tif (!vscode.window.activeTextEditor) {\n\t\tvscode.window.showInformationMessage('No editor is active');\n\t\treturn;\n\t}\n\tconst editor = vscode.window.activeTextEditor;\n\n\treturn editor.edit(editBuilder => {\n\t\teditor.selections.forEach(selection => {\n\t\t\tconst rangeToReplace = locate(editor.document, selection.isReversed ? selection.anchor : selection.active);\n\t\t\tif (!rangeToReplace) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst text = editor.document.getText(rangeToReplace);\n\t\t\tif (isValidNumber(text)) {\n\t\t\t\teditBuilder.replace(rangeToReplace, update(text, delta));\n\t\t\t}\n\t\t});\n\t});\n}\n\n/**\n * Updates given number with `delta` and returns string formatted according\n * to original string format\n */\nexport function update(numString: string, delta: number): string {\n\tlet m: RegExpMatchArray | null;\n\tconst decimals = (m = numString.match(/\\.(\\d+)$/)) ? m[1].length : 1;\n\tlet output = String((parseFloat(numString) + delta).toFixed(decimals)).replace(/\\.0+$/, '');\n\n\tif (m = numString.match(/^\\-?(0\\d+)/)) {\n\t\t// padded number: preserve padding\n\t\toutput = output.replace(/^(\\-?)(\\d+)/, (_, minus, prefix) =>\n\t\t\tminus + '0'.repeat(Math.max(0, (m ? m[1].length : 0) - prefix.length)) + prefix);\n\t}\n\n\tif (/^\\-?\\./.test(numString)) {\n\t\t// omit integer part\n\t\toutput = output.replace(/^(\\-?)0+/, '$1');\n\t}\n\n\treturn output;\n}\n\n/**\n * Locates number from given position in the document\n *\n * @return Range of number or `undefined` if not found\n */\nexport function locate(document: vscode.TextDocument, pos: vscode.Position): vscode.Range | undefined {\n\n\tconst line = document.lineAt(pos.line).text;\n\tlet start = pos.character;\n\tlet end = pos.character;\n\tlet hadDot = false, hadMinus = false;\n\tlet ch;\n\n\twhile (start > 0) {\n\t\tch = line[--start];\n\t\tif (ch === '-') {\n\t\t\thadMinus = true;\n\t\t\tbreak;\n\t\t} else if (ch === '.' && !hadDot) {\n\t\t\thadDot = true;\n\t\t} else if (!reNumber.test(ch)) {\n\t\t\tstart++;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif (line[end] === '-' && !hadMinus) {\n\t\tend++;\n\t}\n\n\twhile (end < line.length) {\n\t\tch = line[end++];\n\t\tif (ch === '.' && !hadDot && reNumber.test(line[end])) {\n\t\t\t// A dot must be followed by a number. Otherwise stop parsing\n\t\t\thadDot = true;\n\t\t} else if (!reNumber.test(ch)) {\n\t\t\tend--;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// ensure that found range contains valid number\n\tif (start !== end && isValidNumber(line.slice(start, end))) {\n\t\treturn new vscode.Range(pos.line, start, pos.line, end);\n\t}\n\n\treturn;\n}\n\n/**\n * Check if given string contains valid number\n */\nfunction isValidNumber(str: string): boolean {\n\treturn str ? !isNaN(parseFloat(str)) : false;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { window, TextEditor } from 'vscode';\nimport { getCssPropertyFromRule, getCssPropertyFromDocument, offsetRangeToVsRange } from './util';\nimport { Property, Rule } from 'EmmetFlatNode';\n\nconst vendorPrefixes = ['-webkit-', '-moz-', '-ms-', '-o-', ''];\n\nexport function reflectCssValue(): Thenable<boolean> | undefined {\n\tconst editor = window.activeTextEditor;\n\tif (!editor) {\n\t\twindow.showInformationMessage('No editor is active.');\n\t\treturn;\n\t}\n\n\tconst node = getCssPropertyFromDocument(editor, editor.selection.active);\n\tif (!node) {\n\t\treturn;\n\t}\n\n\treturn updateCSSNode(editor, node);\n}\n\nfunction updateCSSNode(editor: TextEditor, property: Property): Thenable<boolean> {\n\tconst rule: Rule = property.parent;\n\tlet currentPrefix = '';\n\n\t// Find vendor prefix of given property node\n\tfor (const prefix of vendorPrefixes) {\n\t\tif (property.name.startsWith(prefix)) {\n\t\t\tcurrentPrefix = prefix;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tconst propertyName = property.name.substr(currentPrefix.length);\n\tconst propertyValue = property.value;\n\n\treturn editor.edit(builder => {\n\t\t// Find properties with vendor prefixes, update each\n\t\tvendorPrefixes.forEach(prefix => {\n\t\t\tif (prefix === currentPrefix) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst vendorProperty = getCssPropertyFromRule(rule, prefix + propertyName);\n\t\t\tif (vendorProperty) {\n\t\t\t\tconst rangeToReplace = offsetRangeToVsRange(editor.document, vendorProperty.valueToken.start, vendorProperty.valueToken.end);\n\t\t\t\tbuilder.replace(rangeToReplace, propertyValue);\n\t\t\t}\n\t\t});\n\t});\n}\n","// 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","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as vscode from 'vscode';\nimport { activateEmmetExtension } from '../emmetCommon';\n\nexport function activate(context: vscode.ExtensionContext) {\n\tactivateEmmetExtension(context);\n}\n"],"names":[],"sourceRoot":""}
|