@jinntec/fore 1.0.0-3 → 1.0.0-4

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/dist/fore-all.js CHANGED
@@ -1,4 +1,4 @@
1
- function e(e,t,n,r){const a={op:t,func:n,data:r};return e.push(a),a}function t(e,t){return e}class n{constructor(){this.program=[]}test(t,n){return e(this.program,5,t,void 0===n?null:n)}jump(t){return e(this.program,3,null,t)}record(n,r){return e(this.program,4,void 0===r?t:r,n)}bad(t=1){return e(this.program,1,null,t)}accept(){return e(this.program,0,null,null)}fail(t){return e(this.program,2,t||null,null)}}class r{constructor(e,t,n){this.programLength=e,this.maxFromByPc=t,this.maxSurvivorFromByPc=n}static fromProgram(e){const t=e.length,n=[],a=[];return e.forEach(e=>{n.push(0),a.push(0)}),e.forEach((e,r)=>{switch(e.op){case 2:if(null===e.func)return;if(r+1>=t)throw new Error("Invalid program: program could run past end");n[r+1]+=1;break;case 1:case 4:if(r+1>=t)throw new Error("Invalid program: program could run past end");n[r+1]+=1;break;case 3:e.data.forEach(e=>{if(e<0||e>=t)throw new Error("Invalid program: program could run past end");n[e]+=1});break;case 5:if(r+1>=t)throw new Error("Invalid program: program could run past end");a[r+1]+=1;break;case 0:a[r]+=1}}),new r(t,n,a)}static createStub(e){const t=[],n=[];for(let r=0;r<e;++r)t.push(e),n.push(e);return new r(e,t,n)}}class a{constructor(e){this.acceptingTraces=e,this.success=e.length>0}}class i{constructor(e){this.t=0,this.i=0,this.h=new Uint16Array(e),this.l=new Uint8Array(e)}getBadness(e){return this.l[e]}add(e,t){this.l[e]=t>255?255:t;const n=function(e,t,n,r,a){let i=r,o=a;for(;i<o;){const r=i+o>>>1;n<t[e[r]]?o=r:i=r+1}return i}(this.h,this.l,t,this.i,this.t);this.h.copyWithin(n+1,n,this.t),this.h[n]=e,this.t+=1}reschedule(e,t){const n=Math.max(this.l[e],t>255?255:t);if(this.l[e]!==n){const t=this.h.indexOf(e,this.i);if(t<0||t>=this.t)return void(this.l[e]=n);this.h.copyWithin(t,t+1,this.t),this.t-=1,this.add(e,n)}}getNextPc(){return this.i>=this.t?null:this.h[this.i++]}reset(){this.t=0,this.i=0,this.l.fill(0)}}class o{constructor(e){this.o=[];let t=e.length;e.forEach(e=>{this.o.push(e>0?t:-1),t+=e}),this.u=new Uint16Array(t)}clear(){this.u.fill(0,0,this.o.length)}add(e,t){const n=this.u[t],r=this.o[t];this.u[t]+=1,this.u[r+n]=e}has(e){return this.u[e]>0}forEach(e,t){const n=this.u[e],r=this.o[e];for(let e=r;e<r+n;++e)t(this.u[e])}}function s(e,t,n=!1){return null===e?t:Array.isArray(e)?(-1===e.indexOf(t)&&(n&&(e=e.slice()),e.push(t)),e):e===t?e:[e,t]}class u{constructor(e,t){this.prefixes=e,this.record=t}}function l(e,t){let n;if(null===t){if(!Array.isArray(e))return e;n=e}else n=e===u.EMPTY?[]:Array.isArray(e)?e:[e];return new u(n,t)}u.EMPTY=new u([],null);class c{constructor(e){this.p=[],this.v=[];for(let t=0;t<e;++t)this.p.push(0),this.v.push(null)}mergeTraces(e,t,n,r,a,i){let o=!1;return n.forEach(t,t=>{const n=this.trace(t,r,a,i);var u,l,c;l=n,c=o,e=null===(u=e)?l:null===l?u:Array.isArray(l)?l.reduce((e,t)=>s(e,t,e===l),u):s(u,l,c),o=e===n}),e}trace(e,t,n,r){switch(this.p[e]){case 2:return this.v[e];case 1:return null}this.p[e]=1;let a=null;const i=t[e];if(null!==i)a=i;else if(!n.has(e))throw new Error("Trace without source at pc "+e);if(a=this.mergeTraces(a,e,n,t,n,r),null!==a){const t=r[e];null!==t&&(a=l(a,t))}return this.v[e]=a,this.p[e]=2,a}buildSurvivorTraces(e,t,n,r,a){for(let i=0,o=e.length;i<o;++i){if(!n.has(i)){t[i]=null;continue}this.v.fill(null),this.p.fill(0);const o=this.mergeTraces(null,i,n,e,r,a);if(null===o)throw new Error("No non-cyclic paths found to survivor "+i);t[i]=l(o,null)}this.v.fill(null)}}class h{constructor(e){this.g=[],this.k=[],this.m=[],this.A=new o(e.maxFromByPc),this.T=new o(e.maxSurvivorFromByPc),this.S=new c(e.programLength);for(let t=0;t<e.programLength;++t)this.g.push(null),this.k.push(null),this.m.push(null);this.k[0]=u.EMPTY}reset(e){this.A.clear(),this.T.clear(),this.g.fill(null),e&&(this.k.fill(null),this.m.fill(null),this.k[0]=u.EMPTY)}record(e,t){this.g[e]=t}has(e){return this.A.has(e)||null!==this.k[e]}add(e,t){this.A.add(e,t)}hasSurvivor(e){return this.T.has(e)}addSurvivor(e,t){this.T.add(e,t)}buildSurvivorTraces(){const e=this.k;this.S.buildSurvivorTraces(e,this.m,this.T,this.A,this.g),this.k=this.m,this.m=e}getTraces(e){const t=e.reduce((e,t)=>s(e,this.k[t]),null);return null===t?[]:Array.isArray(t)?t:[t]}}class p{constructor(e){this.I=[],this.N=new i(e.programLength),this.M=new i(e.programLength),this.P=new h(e)}reset(){this.N.reset(),this.N.add(0,0),this.I.length=0,this.P.reset(!0)}getNextThreadPc(){return this.N.getNextPc()}step(e,t,n){const r=this.P.has(t);this.P.add(e,t);const a=this.N.getBadness(e)+n;r?this.N.reschedule(t,a):this.N.add(t,a)}stepToNextGeneration(e,t){const n=this.P.hasSurvivor(t);this.P.addSurvivor(e,t);const r=this.N.getBadness(e);n?this.M.reschedule(t,r):this.M.add(t,r)}accept(e){this.I.push(e),this.P.addSurvivor(e,e)}fail(e){}record(e,t){this.P.record(e,t)}nextGeneration(){this.P.buildSurvivorTraces(),this.P.reset(!1);const e=this.N;e.reset(),this.N=this.M,this.M=e}getAcceptingTraces(){return this.P.getTraces(this.I)}}class f{constructor(e){this.U=[],this.G=e,this.V=r.fromProgram(e),this.U.push(new p(this.V))}execute(e,t){const n=this.U.pop()||new p(this.V);n.reset();const r=e.length;let i,o=-1;do{let a=n.getNextThreadPc();if(null===a)break;for(++o,i=o>=r?null:e[o];null!==a;){const e=this.G[a];switch(e.op){case 0:null===i?n.accept(a):n.fail(a);break;case 2:{const r=e.func;if(null===r||r(t)){n.fail(a);break}n.step(a,a+1,0);break}case 1:n.step(a,a+1,e.data);break;case 5:if(null===i){n.fail(a);break}if(!(0,e.func)(i,e.data,t)){n.fail(a);break}n.stepToNextGeneration(a,a+1);break;case 3:{const t=e.data,r=t.length;if(0===r){n.fail(a);break}for(let e=0;e<r;++e)n.step(a,t[e],0);break}case 4:{const r=(0,e.func)(e.data,o,t);null!=r&&n.record(a,r),n.step(a,a+1,0);break}}a=n.getNextThreadPc()}n.nextGeneration()}while(null!==i);const s=new a(n.getAcceptingTraces());return n.reset(),this.U.push(n),s}}function d(e){return t=>t===e}function m(e,t){if(null===e||null===t)throw new Error("unescaped hyphen may not be used as a range endpoint");if(t<e)throw new Error("character range is in the wrong order");return n=>e<=n&&n<=t}function v(e){return!0}function g(){return!1}function y(e,t){return n=>e(n)||t(n)}function w(e,t){switch(t.kind){case"predicate":return void e.test(t.value);case"regexp":return void A(e,t.value,!1)}}function A(e,t,n){const r=e.program.length,a=e.jump([]);n&&(a.data.push(e.program.length),e.test(()=>!0),e.jump([r]));const i=[];if(t.forEach(t=>{a.data.push(e.program.length),function(e,t){t.forEach(t=>{!function(e,t){const[n,{min:r,max:a}]=t;if(null!==a){for(let t=0;t<r;++t)w(e,n);for(let t=r;t<a;++t){const t=e.jump([]);t.data.push(e.program.length),w(e,n),t.data.push(e.program.length)}}else if(r>0){for(let t=0;t<r-1;++t)w(e,n);const t=e.program.length;w(e,n),e.jump([t]).data.push(e.program.length)}else{const t=e.program.length,r=e.jump([]);r.data.push(e.program.length),w(e,n),e.jump([t]),r.data.push(e.program.length)}}(e,t)})}(e,t),i.push(e.jump([]))}),i.forEach(t=>{t.data.push(e.program.length)}),n){const t=e.program.length,n=e.jump([]);n.data.push(e.program.length),e.test(()=>!0),e.jump([t]),n.data.push(e.program.length)}}function x(e,t){return{success:!0,offset:e,value:t}}function b(e){return x(e,void 0)}function E(e,t,n=!1){return{success:!1,offset:e,expected:t,fatal:n}}function B(e){return(t,n)=>{const r=n+e.length;return t.slice(n,r)===e?x(r,e):E(n,[e])}}function N(e,t){return(n,r)=>{const a=e(n,r);return a.success?x(a.offset,t(a.value)):a}}function C(e,t,n){return(r,a)=>{const i=e(r,a);return i.success?t(i.value)?i:E(a,n):i.offset===a?E(a,n):i}}function T(e){return(t,n)=>{let r=null;for(const a of e){const e=a(t,n);if(e.success)return e;if(null===r||e.offset>r.offset?r=e:e.offset===r.offset&&(r.expected=r.expected.concat(e.expected)),e.fatal)break}return r||E(n,[])}}function I(e){return(t,n)=>{const r=e(t,n);return r.success||r.fatal?r:x(n,null)}}function O(e){return(t,n)=>{let r=[],a=n;for(;;){const n=e(t,a);if(!n.success){if(n.fatal)return n;break}r.push(n.value),a=n.offset}return x(a,r)}}function S(e,t,n){return(r,a)=>{const i=e(r,a);if(!i.success)return i;const o=t(r,i.offset);return o.success?x(o.offset,n(i.value,o.value)):o}}function R(e){return S(e,O(e),(e,t)=>[e].concat(t))}function D(e,t){return e}function M(e,t){return t}function G(e,t){return S(e,t,M)}function U(e,t){return S(e,t,D)}function F(e,t,n,r=!1){return G(e,r?H(U(t,n)):U(t,n))}function P(e,t){return(n,r)=>e(n,r).success?E(r,t):b(r)}function H(e){return(t,n)=>{const r=e(t,n);return r.success?r:E(r.offset,r.expected,!0)}}const j=(e,t)=>e.length===t?b(t):E(t,["end of input"]),X=["Lu","Ll","Lt","Lm","Lo","Mn","Mc","Me","Nd","Nl","No","Pc","Pd","Ps","Pe","Pi","Pf","Po","Zs","Zl","Zp","Sm","Sc","Sk","So","Cc","Cf","Co","Cn"],_={};function L(e){return e.codePointAt(0)}"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("").forEach((e,t)=>{_[e]=t});const k=e=>-1===e||-2===e;function q(e){return t=>!k(t)&&!e(t)}function Y(e,t){return null===t?e:n=>e(n)&&!t(n)}const V=function(e,t){const n=new Map;let r=0;return["BasicLatin","Latin-1Supplement","LatinExtended-A","LatinExtended-B","IPAExtensions","SpacingModifierLetters","CombiningDiacriticalMarks","GreekandCoptic|Greek","Cyrillic","CyrillicSupplement","Armenian","Hebrew","Arabic","Syriac","ArabicSupplement","Thaana","NKo","Samaritan","Mandaic","SyriacSupplement",null,"ArabicExtended-A","Devanagari","Bengali","Gurmukhi","Gujarati","Oriya","Tamil","Telugu","Kannada","Malayalam","Sinhala","Thai","Lao","Tibetan","Myanmar","Georgian","HangulJamo","Ethiopic","EthiopicSupplement","Cherokee","UnifiedCanadianAboriginalSyllabics","Ogham","Runic","Tagalog","Hanunoo","Buhid","Tagbanwa","Khmer","Mongolian","UnifiedCanadianAboriginalSyllabicsExtended","Limbu","TaiLe","NewTaiLue","KhmerSymbols","Buginese","TaiTham","CombiningDiacriticalMarksExtended","Balinese","Sundanese","Batak","Lepcha","OlChiki","CyrillicExtended-C","GeorgianExtended","SundaneseSupplement","VedicExtensions","PhoneticExtensions","PhoneticExtensionsSupplement","CombiningDiacriticalMarksSupplement","LatinExtendedAdditional","GreekExtended","GeneralPunctuation","SuperscriptsandSubscripts","CurrencySymbols","CombiningDiacriticalMarksforSymbols|CombiningMarksforSymbols","LetterlikeSymbols","NumberForms","Arrows","MathematicalOperators","MiscellaneousTechnical","ControlPictures","OpticalCharacterRecognition","EnclosedAlphanumerics","BoxDrawing","BlockElements","GeometricShapes","MiscellaneousSymbols","Dingbats","MiscellaneousMathematicalSymbols-A","SupplementalArrows-A","BraillePatterns","SupplementalArrows-B","MiscellaneousMathematicalSymbols-B","SupplementalMathematicalOperators","MiscellaneousSymbolsandArrows","Glagolitic","LatinExtended-C","Coptic","GeorgianSupplement","Tifinagh","EthiopicExtended","CyrillicExtended-A","SupplementalPunctuation","CJKRadicalsSupplement","KangxiRadicals",null,"IdeographicDescriptionCharacters","CJKSymbolsandPunctuation","Hiragana","Katakana","Bopomofo","HangulCompatibilityJamo","Kanbun","BopomofoExtended","CJKStrokes","KatakanaPhoneticExtensions","EnclosedCJKLettersandMonths","CJKCompatibility","CJKUnifiedIdeographsExtensionA","YijingHexagramSymbols","CJKUnifiedIdeographs","YiSyllables","YiRadicals","Lisu","Vai","CyrillicExtended-B","Bamum","ModifierToneLetters","LatinExtended-D","SylotiNagri","CommonIndicNumberForms","Phags-pa","Saurashtra","DevanagariExtended","KayahLi","Rejang","HangulJamoExtended-A","Javanese","MyanmarExtended-B","Cham","MyanmarExtended-A","TaiViet","MeeteiMayekExtensions","EthiopicExtended-A","LatinExtended-E","CherokeeSupplement","MeeteiMayek","HangulSyllables","HangulJamoExtended-B","HighSurrogates","HighPrivateUseSurrogates","LowSurrogates","PrivateUseArea|PrivateUse","CJKCompatibilityIdeographs","AlphabeticPresentationForms","ArabicPresentationForms-A","VariationSelectors","VerticalForms","CombiningHalfMarks","CJKCompatibilityForms","SmallFormVariants","ArabicPresentationForms-B","HalfwidthandFullwidthForms","Specials","LinearBSyllabary","LinearBIdeograms","AegeanNumbers","AncientGreekNumbers","AncientSymbols","PhaistosDisc",null,"Lycian","Carian","CopticEpactNumbers","OldItalic","Gothic","OldPermic","Ugaritic","OldPersian",null,"Deseret","Shavian","Osmanya","Osage","Elbasan","CaucasianAlbanian",null,"LinearA",null,"CypriotSyllabary","ImperialAramaic","Palmyrene","Nabataean",null,"Hatran","Phoenician","Lydian",null,"MeroiticHieroglyphs","MeroiticCursive","Kharoshthi","OldSouthArabian","OldNorthArabian",null,"Manichaean","Avestan","InscriptionalParthian","InscriptionalPahlavi","PsalterPahlavi",null,"OldTurkic",null,"OldHungarian","HanifiRohingya",null,"RumiNumeralSymbols",null,"OldSogdian","Sogdian",null,"Elymaic","Brahmi","Kaithi","SoraSompeng","Chakma","Mahajani","Sharada","SinhalaArchaicNumbers","Khojki",null,"Multani","Khudawadi","Grantha",null,"Newa","Tirhuta",null,"Siddham","Modi","MongolianSupplement","Takri",null,"Ahom",null,"Dogra",null,"WarangCiti",null,"Nandinagari","ZanabazarSquare","Soyombo",null,"PauCinHau",null,"Bhaiksuki","Marchen",null,"MasaramGondi","GunjalaGondi",null,"Makasar",null,"TamilSupplement","Cuneiform","CuneiformNumbersandPunctuation","EarlyDynasticCuneiform",null,"EgyptianHieroglyphs","EgyptianHieroglyphFormatControls",null,"AnatolianHieroglyphs",null,"BamumSupplement","Mro",null,"BassaVah","PahawhHmong",null,"Medefaidrin",null,"Miao",null,"IdeographicSymbolsandPunctuation","Tangut","TangutComponents",null,"KanaSupplement","KanaExtended-A","SmallKanaExtension","Nushu",null,"Duployan","ShorthandFormatControls",null,"ByzantineMusicalSymbols","MusicalSymbols","AncientGreekMusicalNotation",null,"MayanNumerals","TaiXuanJingSymbols","CountingRodNumerals",null,"MathematicalAlphanumericSymbols","SuttonSignWriting",null,"GlagoliticSupplement",null,"NyiakengPuachueHmong",null,"Wancho",null,"MendeKikakui",null,"Adlam",null,"IndicSiyaqNumbers",null,"OttomanSiyaqNumbers",null,"ArabicMathematicalAlphabeticSymbols",null,"MahjongTiles","DominoTiles","PlayingCards","EnclosedAlphanumericSupplement","EnclosedIdeographicSupplement","MiscellaneousSymbolsandPictographs","Emoticons","OrnamentalDingbats","TransportandMapSymbols","AlchemicalSymbols","GeometricShapesExtended","SupplementalArrows-C","SupplementalSymbolsandPictographs","ChessSymbols","SymbolsandPictographsExtended-A",null,"CJKUnifiedIdeographsExtensionB",null,"CJKUnifiedIdeographsExtensionC","CJKUnifiedIdeographsExtensionD","CJKUnifiedIdeographsExtensionE","CJKUnifiedIdeographsExtensionF",null,"CJKCompatibilityIdeographsSupplement",null,"Tags",null,"VariationSelectorsSupplement",null,"SupplementaryPrivateUseArea-A|PrivateUse","SupplementaryPrivateUseArea-B|PrivateUse"].forEach((e,a)=>{const i=t[a];null!==e&&e.split("|").forEach(e=>{const t=n.get(e),a=m(r,r+i-1);n.set(e,t?y(t,a):a)}),r+=i}),n}(0,[128,128,128,208,96,80,112,144,256,48,96,112,256,80,48,64,64,64,32,16,48,96,128,128,128,128,128,128,128,128,128,128,128,128,256,160,96,256,384,32,96,640,32,96,32,32,32,32,128,176,80,80,48,96,32,32,144,80,128,64,64,80,48,16,48,16,48,128,64,64,256,256,112,48,48,48,80,64,112,256,256,64,32,160,128,32,96,256,192,48,16,256,128,128,256,256,96,32,128,48,80,96,32,128,128,224,16,16,64,96,96,48,96,16,32,48,16,256,256,6592,64,20992,1168,64,48,320,96,96,32,224,48,16,64,96,32,48,48,32,96,32,96,32,96,32,48,64,80,64,11184,80,896,128,1024,6400,512,80,688,16,16,16,32,32,144,240,16,128,128,64,80,64,48,128,32,64,32,48,32,48,32,64,32,80,48,48,80,48,64,144,384,128,64,32,32,48,48,32,32,32,64,32,96,96,32,32,32,64,64,32,32,48,80,80,48,128,64,288,32,128,48,64,112,32,128,80,48,80,48,96,32,80,48,48,80,128,128,128,96,160,128,96,32,80,48,64,192,80,80,96,160,96,80,96,16,64,256,112,80,64,96,80,304,32,192,64,1024,128,208,2736,1072,16,4032,640,8576,576,48,96,48,144,688,96,96,160,64,32,6144,768,9472,256,48,64,400,2304,160,16,4944,256,256,80,144,32,96,32,128,1024,688,1360,48,208,80,368,64,1280,224,32,96,784,80,64,80,176,256,256,48,112,96,256,256,768,80,48,128,128,128,256,256,112,144,1280,42720,32,4160,224,5776,7488,3088,544,722400,128,128,240,65040,65536,65536]),Q=function(e){const t=new Map,n="bfUATCYATCPAQATAXATAOATBKJTBXCTBCZPATAQAZANAZADZPAXAQAXAbgUATAYDaATAZAaAGARAXAcAaAZAaAXAMBZADATBZAMAGASAMCTACWXACGDXXADHA3DAAPDAAtCAAFDBCAADCAABCCDBCCABCAABCCDCCAABCAAFCAADDAABCAABCBADCBDBGACADCGDCAEADACAEADACAEADAAPDAARDACAEADAABCBA7DFCAABCBDBABCCAJjDBAAGADaFRZDFLZNFEZGFAZAFAZQnvBAAADFAZACADABBFADCTACABDZBCATACCBACABACAABCQBACIDiCADBCCDCAXDDCADAXAABCBDBCyDvAhaAHEJBA1CAANDAgfBAABAClBBFATFDoTAOABBaBYABAHsOAHATAHBTAHBTAHABHGaBDGDTBBKcFXCTBYATBaBHKTAcABATBGfFAGJHUKJTDGBHAmiBAATAGAHGcAaAHFFBHBaAHDGBKJGCaBGATNBAcAGAHAGdHaBBmYBAAHKGABNKJGgHIFBaATCFABBHAYBGVHDFAHIFAHCFAHEBBTOBAGYHCBBTABAGKB0GUBAGHBUHOcAHfIAG1HAIAHAGAICHHIDHAIBGAHGGJHBTBKJTAFAGOHAIBBAGHBBGBBBGVBAGGBAGABCGDBBHAGAICHDBBIBBBIBHAGABHIABDGBBAGCHBBBKJGBYBMFaAYAGATAHABBHBIABAGFBDGBBBGVBAGGBAGBBAGBBAGBBBHABAICHBBDHBBBHCBCHABGGDBAGABGKJHBGCHATABJHBIABAGIBAGCBAGVBAGGBAGBBAGEBBHAGAICHEBAHBIABAIBHABBGABOGBHBBBKJTAYABGGAHFBAHAIBBAGHBBGBBBGVBAGGBAGBBAGEBBHAGAIAHAIAHDBBIBBBIBHABHHAIABDGBBAGCHBBBKJaAGAMFBJHAGABAGFBCGCBAGDBCGBBAGABAGBBCGBBCGCBCGLBDIBHAIBBCICBAICHABBGABFIABNKJMCaFYAaABEHAICHAGHBAGCBAGWBAGPBCGAHCIDBAHCBAHDBGHBBAGCBEGBHBBBKJBGTAMGaAGAHAIBTAGHBAGCBAGWBAGJBAGEBBHAGAIAHAIEBAHAIBBAIBHBBGIBBGGABAGBHBBBKJBAGBBMHBIBBAGHBAGCBAGoHBGAICHDBAICBAICHAGAaABDGCIAMGGCHBBBKJMIaAGFBBIBBAGRBCGXBAGIBAGABBGGBCHABDICHCBAHABAIHBFKJBBIBTABLGvHAGBHGBDYAGFFAHHTAKJTBBkGBBAGABAGEBAGXBAGABAGJHAGBHIGABBGEBAFABAHFBBKJBBGDBfGAaCTOaATAaCHBaFKJMJaAHAaAHAaAHAPAQAPAQAIBGHBAGjBDHNIAHETAHBGEHKBAHjBAaHHAaFBAaBTEaDTBBkGqIBHDIAHFIAHBIBHBGAKJTFGFIBHBGDHCGAICGBIGGCHDGMHAIBHBIFHAGAIAKJICHAaBClBACABECABBDqTAFADCmIFAABAGDBBGGBAGABAGDBBGoBAGDBBGgBAGDBBGGBAGABAGDBBGOBAG4BAGDBBmCBAABBHCTIMTBCGPaJBFiVBAABBDFBBOAmrJAAaATAGQUAGZPAQABCmKBAATCLCGHBGGMBAGDHCBKGRHCTBBIGRHBBLGMBAGCBAHBBLGzHBIAHGIHHAIBHKTCFATCYAGAHABBKJBFMJBFTFOATDHCcABAKJBFGiFAG0BGGEHBGhHAGABEmFBAABJGeBAHCIDHBICBDIBHAIFHCBDaABCTBKJGdBBGEBKGrBDGZBFKJMABCahGWHBIBHABBTBG0IAHAIAHGBAHAIAHAIBHHIFHJBBHAKJBFKJBFTGFATFBBHNJAhABAAHDIAGuHAIAHEIAHAIEHAIBGGBDKJTGaJHIaIBCHBIAGdIAHDIBHBIAHCGBKJGrHAIAHBICHAIAHCIBBHTDGjIHHHIBHBBCTEKJBCGCKJGdFFTBDIBGCqBBCCTHBHHCTAHMIAHGGDHAGFHAGBIAHBGABEDrF+DMFADhFkH5BAHEgVCAADHghBAADHCHDFBBCFBBDHCHDHCHDFBBCFBBDHBACABACABACABACADHCHDNBBDHEHDHEHDHEHDEBADBCDEAZADAZCDCBADBCDEAZCDDBBDBCDBAZCDHCEZCBBDCBADBCDEAZBBAUKcEOFTBRASAPARBSAPARATHVAWAcEUATIRASATDNBTCXAPAQATKXATANATJUAcEBAcJMAFABBMFXCPAQAFAMJXCPAQABAFMBCYfBPHMJDHAJCHLBOaBCAaDCAaBDACCDBCCDAaACAaBXACEaFCAaACAaACAaACDaADACDDAGDDAaBDBCBXECADDaAXAaBDAaAMPLiCADALDMAaBBDXEaEXBaDXAaBXAaBXAaGXAaeXBaBXAaAXAae3LEAAaHPAQAPAQAaTXBaGPAQA6QBAAXAadXYanXF6EBAABYaKBUM76NBAAMV62CAAXAaIXAa1XH6uBAAXA63DAAPAQAPAQAPAQAPAQAPAQAPAQAPAQAMdarXEPAQAXePAQAPAQAPAQAPAQAPAQAXP6/DAA3CCAAPAQAPAQAPAQAPAQAPAQAPAQAPAQAPAQAPAQAPAQAPAQAX+PAQAPAQAXfPAQA3BEAAavXUaBXFamBBafBB6nBAACuBADuBAABCCDBAFCCADDACADFFBCBgjBAADAaFADHCCADABETDMATBDlBADABEDABBG3BGFATABNHAGWBIGGBAGGBAGGBAGGBAGGBAGGBAGGBAGGBAHfTBRASARASATCRASATARASATIOATBOATARASATBRASAPAQAPAQAPAQAPAQATEFATJOBTDOATAPATMBvaZBA6YBAABL6VDAABZaLBDUATCaAFAGALAPAQAPAQAPAQAPAQAPAQAaBPAQAPAQAPAQAPAQAOAPAQBaALIHDIBOAFEaBLCFAGATAaBBAmVBAABBHBZBFBGAOAmZBAATAFCGABEGqBAmdBAABAaBMDaJGaBEajBLGPaeBAMJadMHaAMOafMJamMO6/EAAm1mBABJa/mvHFABPGUFAm2RAABCa2BIGnFFTBmLEAAFATCGPKJGBBTAtGAHAJCTAHJTAFAAbFBHBmFBAALJHBTFBHZWFIZBANDBA9FADHADCAAJFAZBADGAADDBATCDABCDALBBABCCBvGAFBDAGGHAGCHAGDHAGWIBHBIAaDBDMFaBYAaABFGzTDBHIBGxIPHBBHTBKJBFHRGFTCGATAGBHAKJGbHHTBGWHKIBBKTAGcBCHCIAGuHAIBHDIBHBICTMBAFAKJBDTBGEHAFAGIKJGEBAGoHFIBHBIBHBBIGCHAGHHAIABBKJBBTDGPFAGFaCGAIAHAIAGxHAGAHCGBHBGEHBGAHAGABXGBFATBGKIAHBIBTBGAFBIAHABJGFBBGFBBGFBIGGBAGGBADqZAFDDHBHjPBAAGiIBHAIBHAIBTAIAHABBKJBFmjuCABLGWBDGwhDgAA9/jBAmtFAABBmpBAABlDGBLDEBEGAHAGJXAGMBAGEBAGABAGBBAGBBAmrBAAZPBQmqFAAQAPABPG/BBG1BnGLYAaABBHPTGPAQATABFHPTAOBNBPAQAPAQAPAQAPAQAPAQAPAQAPAQAPAQATBPAQATDNCTCBATDOAPAQAPAQAPAQATCXAOAXCBATAYATBBDGEBAmGCAABBcABATCYATCPAQATAXATAOATBKJTBXCTBCZPATAQAZANAZADZPAXAQAXAPAQATAPAQATBGJFAGsFBGeBCGFBBGFBBGFBBGCBCYBXAZAaAYBBAaAXDaBBJcCaBBBGLBAGZBAGSBAGBBAGOBBGNBhm6BAABETCBDMsBCaIL0MDaQMBaCBAaLBDaABuasHAhBCAAGcBCGwBOHAMaBDGfMDBIGTLAGHLABEGlHEBEGdBATAGjBDGHTALEBpCnDnmNBAABBKJBFCjBDDjBDGnBHGzBKTAhPCAAm2EAABIGVBJGHhXCAAGFBBGABAGrBAGBBCGABBGWBATAMHGWaBMGGeBHMIBvGSBAGBBEMEGVMFBCTAGZBETAB/G3BDMBGBMPBBMtGAHCBAHBBEHDGDBAGCBAGcBBHCBDHAMIBGTIBGGcMBTAGcMCBfGHaAGbHBBDMETGBIG1BCTGGVBBMHGSBEMHGRBGTDBLMGhPBAAmIBAAB2CyBMDyBGMFGjHDBHKJhlEAAMehACAAGcMJGABHGVHKMDTEhFCAAGWBIIAHAIAG0HOTGBDMTKJBOHCIAGsICHDIBHBTBcATDBKcABBGYBGKJBFHCGjHEIAHHBAKJTDGAIBBIGiHATBGABIHBIAGvICHIIBGDTDHDTABBKJGATAGATCBAMTBKGRBAGYICHCIBHAIAHBTFHAhABAAGGBAGABAGDBAGOBAGJTABFGuHAICHHBEKJBFHBIBBAGHBBGBBBGVBAGGBAGBBAGEBAHBGAIBHAIDBBIBBBICBBGABFIABEGEIBBBHGBCHEhKCAAG0ICHHIBHCIAHAGDTEKJBATABATAHAGABfGvICHFIAHAIDHBIAHBGBTAGABHKJhlCAAGuICHDBBIDHBIAHBTWGDHBBhGvICHHIBHAIAHBTCGABKKJBFTMBSGqHAIAHAIBHFIAHAGABGKJB1GaBBHCIBHDIAHEBDKJMBTCaAh/CAAGrICHIIAHBTAhjBAACfDfKJMIBLGAhfCAAGHBBGmICHDBBHBIDHAGATAGAIABaGAHJGnHFIAGAHDTHHABHGAHFIBHCGtHMIAHBTCGATEBcG4hGEAAGIBAGkIAHGBAHFIAHAGATEBJKJMSBCTBGdBBHVBAIAHGIAHBIAHBhIBAAGGBAGBBAGlHFBCHABAHBBAHGGAHABHKJBFGFBAGBBAGfIEBAHBBAIBHAIAHAGABGKJh1EAAGSHBIBTBhGDAAMUaHYDaQBMTAmZOAAhlBAAruBAABATEBKmDDAAh7qAAmuQAABAcIhG/AAmGJAAh4GCAm4IAABGGeBAKJBDTBhfBAAGdBBHETABJGvHGTEaDFDTAaABJKJBAMGBAGUBEGShvKAACfDfMWTDhkBAAmKBAABDHAGAI2BGHDFMB/FBTAFABbm3fBABHmyLAAhMUCAmeEAABwGCBQGDBHmLGAAhDkAAmqBAABEGMBCGIBGGJBBaAHBTAcDhbNBA61DAABJamBBa7IBHCaCIFcHHHaBHGadHDa6BW6BBAAHCaAhZCAAMTBL6WBAABIMYhGCAACZDZCZDGBADRCZDZCABACBBBCABBCBBBCDBACHDDBADABADGBADKCZDZCBBACDBBCHBACGBADZCBBACDBACEBACABCCGBADZCZDZCZDZCZDZCZDZCZDZCZDbBBCYXADYXADFCYXADYXADFCYXADYXADFCYXADYXADFCYXADYXADFCADABBKx6/HAAH2aDHxaHHAaNHAaBTEBOHEBAHOhPVAAHGBAHQBBHGBAHBBAHEhUDAAGsBCHGFGBBKJBDGAaAhvFAAGrHDKJBEYAh/TAAmEDAABBMIHGBoChDhHGFABDKJBDTBhQMAAM6aAMCYAMDhLBAAMsaAMOhBDAAGDBAGaBAGBBAGABBGABAGJBAGDBAGABAGABFGABDGABAGABAGABAGCBAGBBAGABBGABAGABAGABAGABAGABAGBBAGABBGDBAGGBAGDBAGDBAGABAGJBAGQBEGCBAGEBAGQBzXBhNEAAarBD6jBAABLaOBBaOBAaOBAakBJMMBC6cBAABCa8B4acBMarBDaIBGaBBNaFhZCAA66DAAZE6VLAABJaMBCaKBE6zBAABL6YBAABGaLBTaLBDa3BHaJBFanBHadhRBAAaLBA6kBAABAaDBCaoBBaFBCacBB6GCAABLaNBBaDBDaCBEaCBMaFhpVAAmWbKABom0ABABKmdDAABBmBaBABNmw0BAhewAAmdIAAhiXwCcABd8fBAAh/BAAnvDAAhP4PA99/PABB99/PA".split(""),r=X.map(()=>[]);let a=0,i=0;for(;i<n.length;){const e=_[n[i]],t=(31&e)-2;let o=1+_[n[i+1]];switch(32&e?(o+=_[n[i+2]]<<6,o+=_[n[i+3]]<<12,o+=_[n[i+4]]<<18,i+=5):i+=2,t){case-2:{let e=0;for(let t=a;t<a+o;++t)r[e].push(d(t)),e=(e+1)%2;break}case-1:break;default:{const e=r[t];1===o?e.push(d(a)):e.push(m(a,a+o-1));break}}a+=o}const o=new Map;return X.forEach((e,n)=>{const a=r[n].reduce(y,g);t.set(e,a);const i=e.charAt(0),s=o.get(i)||[];o.set(i,s),s.push(a)}),o.forEach((e,n)=>{t.set(n,e.reduce(y,g))}),t}();function J(e){return 32===e||9===e||10===e||13===e}const K=[d(L(":")),m(L("A"),L("Z")),d(L("_")),m(L("a"),L("z")),m(192,214),m(216,246),m(192,214),m(216,246),m(248,767),m(880,893),m(895,8191),m(8204,8205),m(8304,8591),m(11264,12271),m(12289,55295),m(63744,64975),m(65008,65533),m(65536,983039)].reduce(y),z=[K,d(L("-")),d(L(".")),m(L("0"),L("9")),d(183),m(768,879),m(8255,8256)].reduce(y),W=Q.get("Nd"),Z=q(W),$=Y(m(0,1114111),[Q.get("P"),Q.get("Z"),Q.get("C")].reduce(y)),ee=q($);function te(e){return 10!==e&&13!==e&&!k(e)}const ne={s:J,S:q(J),i:K,I:q(K),c:z,C:q(z),d:W,D:Z,w:$,W:ee},re=B("*"),ae=B("\\"),ie=B("{"),oe=B("}"),se=B("["),ue=B("]"),le=B("^"),ce=B("$"),he=B(","),pe=B("-"),fe=B("("),de=B(")"),me=B("."),ve=B("|"),ge=B("+"),ye=B("?"),we=B("-["),Ae=L("0");function xe(e){function t(e){return new Set(e.split("").map(e=>L(e)))}function n(e,t){const n=e.codePointAt(t);return void 0===n?E(t,["any character"]):x(t+String.fromCodePoint(n).length,n)}const r="xpath"===e.language?G(ae,T([N(B("n"),()=>10),N(B("r"),()=>13),N(B("t"),()=>9),N(T([ae,ve,me,pe,le,ye,re,ge,ie,oe,ce,fe,de,se,ue]),e=>L(e))])):G(ae,T([N(B("n"),()=>10),N(B("r"),()=>13),N(B("t"),()=>9),N(T([ae,ve,me,pe,le,ye,re,ge,ie,oe,fe,de,se,ue]),e=>L(e))]));function a(e,r){const a=t(r);return S(B(e),I(C(n,e=>a.has(e),r.split(""))),(e,t)=>function(e){const t=Q.get(e);if(null==t)throw new Error(e+" is not a valid unicode category");return t}(null===t?e:e+String.fromCodePoint(t)))}const i=T([a("L","ultmo"),a("M","nce"),a("N","dlo"),a("P","cdseifo"),a("Z","slp"),a("S","mcko"),a("C","cfon")]),o=[m(L("a"),L("z")),m(L("A"),L("Z")),m(L("0"),L("9")),d(45)].reduce(y),s=T([i,N(G(B("Is"),function(e){return(t,n)=>{const r=e(t,n);return r.success?x(r.offset,t.slice(n,r.offset)):r}}(R(C(n,o,["block identifier"])))),t=>function(e,t){const n=V.get(e);if(void 0===n){if(t)return v;throw new Error(`The unicode block identifier "${e}" is not known.`)}return n}(t,"xpath"!==e.language))]),u=F(B("\\p{"),s,oe,!0),l=N(F(B("\\P{"),s,oe,!0),q),c=G(ae,N(T("sSiIcCdDwW".split("").map(e=>B(e))),e=>ne[e])),h=N(me,()=>te),p=T([c,u,l]),f=t("\\[]"),g=T([r,C(n,e=>!f.has(e),["unescaped character"])]),w=T([N(pe,()=>null),g]),A=S(w,G(pe,w),m);function b(e,t){return[e].concat(t||[])}const M=N(function(e){return(t,n)=>{const r=e(t,n);return r.success?x(n,r.value):r}}(T([ue,we])),()=>null),X=L("-"),_=T([N(U(U(pe,P(se,["not ["])),M),()=>X),G(P(pe,["not -"]),g)]),k=T([S(N(_,d),T([function(e,t){return k(e,t)},M]),b),S(T([A,p]),T([K,M]),b)]),J=T([S(N(g,d),T([k,M]),b),S(T([A,p]),T([K,M]),b)]);function K(e,t){return J(e,t)}const z=N(J,e=>e.reduce(y)),W=N(G(le,z),q),Z=S(T([G(P(le,["not ^"]),z),W]),I(G(pe,(function(e,t){return $(e,t)}))),Y),$=F(se,Z,ue,!0),ee="xpath"===e.language?T([N(r,d),p,$,h,N(le,()=>e=>-1===e),N(ce,()=>e=>-2===e)]):T([N(r,d),p,$,h]),xe="xpath"===e.language?t(".\\?*+{}()|^$[]"):t(".\\?*+{}()|[]"),be=C(n,e=>!xe.has(e),["NormalChar"]),Ee=N(G(ae,S(N(C(n,m(L("1"),L("9")),["digit"]),e=>e-Ae),O(N(C(n,m(Ae,L("9")),["digit"]),e=>e-Ae)),(e,t)=>{t.reduce((e,t)=>10*e+t,e)})),e=>{throw new Error("Backreferences in XPath patterns are not yet implemented.")}),Be="xpath"===e.language?T([N(be,e=>({kind:"predicate",value:d(e)})),N(ee,e=>({kind:"predicate",value:e})),N(F(fe,G(I(B("?:")),Se),de,!0),e=>({kind:"regexp",value:e})),Ee]):T([N(be,e=>({kind:"predicate",value:d(e)})),N(ee,e=>({kind:"predicate",value:e})),N(F(fe,Se,de,!0),e=>({kind:"regexp",value:e}))]),Ne=N(R(N(C(n,m(Ae,L("9")),["digit"]),e=>e-Ae)),e=>e.reduce((e,t)=>10*e+t)),Ce=T([S(Ne,G(he,Ne),(e,t)=>{if(t<e)throw new Error("quantifier range is in the wrong order");return{min:e,max:t}}),S(Ne,he,e=>({min:e,max:null})),N(Ne,e=>({min:e,max:e}))]),Te="xpath"===e.language?S(T([N(ye,()=>({min:0,max:1})),N(re,()=>({min:0,max:null})),N(ge,()=>({min:1,max:null})),F(ie,Ce,oe,!0)]),I(ye),(e,t)=>e):T([N(ye,()=>({min:0,max:1})),N(re,()=>({min:0,max:null})),N(ge,()=>({min:1,max:null})),F(ie,Ce,oe,!0)]),Ie=O(S(Be,N(I(Te),e=>null===e?{min:1,max:1}:e),(e,t)=>[e,t])),Oe=S(Ie,O(G(ve,H(Ie))),(e,t)=>[e].concat(t));function Se(e,t){return Oe(e,t)}const Re=function(e){return S(e,j,D)}(Oe);return function(e){let t;try{t=Re(e,0)}catch(t){throw new Error(`Error parsing pattern "${e}": ${t.message}`)}return t.success?t.value:function(e,t,n){const r=n.map(e=>`"${e}"`);throw new Error(`Error parsing pattern "${e}" at offset ${t}: expected ${r.length>1?"one of "+r.join(", "):r[0]} but found "${e.slice(t,t+1)}"`)}(e,t.offset,t.expected)}}function be(e){return[...e].map(e=>e.codePointAt(0))}const Ee=function(e){const t={};var n;function r(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}var a="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){return e==Array.prototype||e==Object.prototype||(e[t]=n.value),e};var i=function(e){e=["object"==typeof globalThis&&globalThis,e,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var t=0;t<e.length;++t){var n=e[t];if(n&&n.Math==Math)return n}throw Error("Cannot find global object")}(this);function o(e,t){if(t)e:{var n=i;e=e.split(".");for(var r=0;r<e.length-1;r++){var o=e[r];if(!(o in n))break e;n=n[o]}(t=t(r=n[e=e[e.length-1]]))!=r&&null!=t&&a(n,e,{configurable:!0,writable:!0,value:t})}}function s(e){return(e={next:e})[Symbol.iterator]=function(){return this},e}function u(e){var t="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];return t?t.call(e):{next:r(e)}}function l(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function c(e){return e instanceof Array?e:l(u(e))}o("Symbol",(function(e){function t(e,t){this.h=e,a(this,"description",{configurable:!0,writable:!0,value:t})}if(e)return e;t.prototype.toString=function(){return this.h};var n=0;return function e(r){if(this instanceof e)throw new TypeError("Symbol is not a constructor");return new t("jscomp_symbol_"+(r||"")+"_"+n++,r)}})),o("Symbol.iterator",(function(e){if(e)return e;e=Symbol("Symbol.iterator");for(var t="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),n=0;n<t.length;n++){var o=i[t[n]];"function"==typeof o&&"function"!=typeof o.prototype[e]&&a(o.prototype,e,{configurable:!0,writable:!0,value:function(){return s(r(this))}})}return e})),o("Symbol.asyncIterator",(function(e){return e||Symbol("Symbol.asyncIterator")}));var h,p="function"==typeof Object.create?Object.create:function(e){function t(){}return t.prototype=e,new t};if("function"==typeof Object.setPrototypeOf)h=Object.setPrototypeOf;else{var f;e:{var d={};try{d.__proto__={a:!0},f=d.a;break e}catch(e){}f=!1}h=f?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw new TypeError(e+" is not extensible");return e}:null}var m=h;function v(e,t){if(e.prototype=p(t.prototype),e.prototype.constructor=e,m)m(e,t);else for(var n in t)if("prototype"!=n)if(Object.defineProperties){var r=Object.getOwnPropertyDescriptor(t,n);r&&Object.defineProperty(e,n,r)}else e[n]=t[n];e.Bc=t.prototype}function g(){this.J=!1,this.o=null,this.v=void 0,this.h=1,this.N=0,this.B=null}function y(e){if(e.J)throw new TypeError("Generator is already running");e.J=!0}function w(e,t){e.B={kc:t,nc:!0},e.h=e.N}function A(e){this.h=new g,this.o=e}function x(e,t,n,r){try{var a=t.call(e.h.o,n);if(!(a instanceof Object))throw new TypeError("Iterator result "+a+" is not an object");if(!a.done)return e.h.J=!1,a;var i=a.value}catch(t){return e.h.o=null,w(e.h,t),b(e)}return e.h.o=null,r.call(e.h,i),b(e)}function b(e){for(;e.h.h;)try{var t=e.o(e.h);if(t)return e.h.J=!1,{value:t.value,done:!1}}catch(t){e.h.v=void 0,w(e.h,t)}if(e.h.J=!1,e.h.B){if(t=e.h.B,e.h.B=null,t.nc)throw t.kc;return{value:t.return,done:!0}}return{value:void 0,done:!0}}function E(e){this.next=function(t){return y(e.h),e.h.o?t=x(e,e.h.o.next,t,e.h.C):(e.h.C(t),t=b(e)),t},this.throw=function(t){return y(e.h),e.h.o?t=x(e,e.h.o.throw,t,e.h.C):(w(e.h,t),t=b(e)),t},this.return=function(t){return function(e,t){y(e.h);var n=e.h.o;return n?x(e,"return"in n?n.return:function(e){return{value:e,done:!0}},t,e.h.return):(e.h.return(t),b(e))}(e,t)},this[Symbol.iterator]=function(){return this}}function B(e,t){return Object.prototype.hasOwnProperty.call(e,t)}g.prototype.C=function(e){this.v=e},g.prototype.return=function(e){this.B={return:e},this.h=this.N},o("Promise",(function(e){function t(e){this.o=0,this.B=void 0,this.h=[],this.N=!1;var t=this.J();try{e(t.resolve,t.reject)}catch(e){t.reject(e)}}function n(){this.h=null}function r(e){return e instanceof t?e:new t((function(t){t(e)}))}if(e)return e;n.prototype.o=function(e){if(null==this.h){this.h=[];var t=this;this.B((function(){t.v()}))}this.h.push(e)};var a=i.setTimeout;n.prototype.B=function(e){a(e,0)},n.prototype.v=function(){for(;this.h&&this.h.length;){var e=this.h;this.h=[];for(var t=0;t<e.length;++t){var n=e[t];e[t]=null;try{n()}catch(e){this.J(e)}}}this.h=null},n.prototype.J=function(e){this.B((function(){throw e}))},t.prototype.J=function(){function e(e){return function(r){n||(n=!0,e.call(t,r))}}var t=this,n=!1;return{resolve:e(this.mb),reject:e(this.v)}},t.prototype.mb=function(e){if(e===this)this.v(new TypeError("A Promise cannot resolve to itself"));else if(e instanceof t)this.wb(e);else{e:switch(typeof e){case"object":var n=null!=e;break e;case"function":n=!0;break e;default:n=!1}n?this.ua(e):this.C(e)}},t.prototype.ua=function(e){var t=void 0;try{t=e.then}catch(e){return void this.v(e)}"function"==typeof t?this.Wb(t,e):this.C(e)},t.prototype.v=function(e){this.ka(2,e)},t.prototype.C=function(e){this.ka(1,e)},t.prototype.ka=function(e,t){if(0!=this.o)throw Error("Cannot settle("+e+", "+t+"): Promise already settled in state"+this.o);this.o=e,this.B=t,2===this.o&&this.vb(),this.na()},t.prototype.vb=function(){var e=this;a((function(){if(e.Ya()){var t=i.console;void 0!==t&&t.error(e.B)}}),1)},t.prototype.Ya=function(){if(this.N)return!1;var e=i.CustomEvent,t=i.Event,n=i.dispatchEvent;return void 0===n||("function"==typeof e?e=new e("unhandledrejection",{cancelable:!0}):"function"==typeof t?e=new t("unhandledrejection",{cancelable:!0}):(e=i.document.createEvent("CustomEvent")).initCustomEvent("unhandledrejection",!1,!0,e),e.promise=this,e.reason=this.B,n(e))},t.prototype.na=function(){if(null!=this.h){for(var e=0;e<this.h.length;++e)o.o(this.h[e]);this.h=null}};var o=new n;return t.prototype.wb=function(e){var t=this.J();e.nb(t.resolve,t.reject)},t.prototype.Wb=function(e,t){var n=this.J();try{e.call(t,n.resolve,n.reject)}catch(e){n.reject(e)}},t.prototype.then=function(e,n){function r(e,t){return"function"==typeof e?function(t){try{a(e(t))}catch(e){i(e)}}:t}var a,i,o=new t((function(e,t){a=e,i=t}));return this.nb(r(e,a),r(n,i)),o},t.prototype.catch=function(e){return this.then(void 0,e)},t.prototype.nb=function(e,t){function n(){switch(r.o){case 1:e(r.B);break;case 2:t(r.B);break;default:throw Error("Unexpected state: "+r.o)}}var r=this;null==this.h?o.o(n):this.h.push(n),this.N=!0},t.resolve=r,t.reject=function(e){return new t((function(t,n){n(e)}))},t.race=function(e){return new t((function(t,n){for(var a=u(e),i=a.next();!i.done;i=a.next())r(i.value).nb(t,n)}))},t.all=function(e){var n=u(e),a=n.next();return a.done?r([]):new t((function(e,t){function i(t){return function(n){o[t]=n,0==--s&&e(o)}}var o=[],s=0;do{o.push(void 0),s++,r(a.value).nb(i(o.length-1),t),a=n.next()}while(!a.done)}))},t}));var N="function"==typeof Object.assign?Object.assign:function(e,t){for(var n=1;n<arguments.length;n++){var r=arguments[n];if(r)for(var a in r)B(r,a)&&(e[a]=r[a])}return e};function C(e,t,n){if(null==e)throw new TypeError("The 'this' value for String.prototype."+n+" must not be null or undefined");if(t instanceof RegExp)throw new TypeError("First argument to String.prototype."+n+" must not be a regular expression");return e+""}function T(e,t){return e=void 0!==e?String(e):" ",0<t&&e?e.repeat(Math.ceil(t/e.length)).substring(0,t):""}function I(e,t,n){e instanceof String&&(e=String(e));for(var r=e.length,a=0;a<r;a++){var i=e[a];if(t.call(n,i,a,e))return{Hb:a,Pb:i}}return{Hb:-1,Pb:void 0}}function O(e){return e||Array.prototype.fill}function S(e,t){e instanceof String&&(e+="");var n=0,r=!1,a={next:function(){if(!r&&n<e.length){var a=n++;return{value:t(a,e[a]),done:!1}}return r=!0,{done:!0,value:void 0}}};return a[Symbol.iterator]=function(){return a},a}function R(e,t){if(!("0"!==e&&"-0"!==e||"0"!==t&&"-0"!==t))return 0;var n=/(?:\+|(-))?(\d+)?(?:\.(\d+))?/;e=n.exec(e+"");var r=n.exec(t+""),a=!e[1],i=!r[1];return t=(e[2]||"").replace(/^0*/,""),n=(r[2]||"").replace(/^0*/,""),e=e[3]||"",r=r[3]||"",a&&!i?1:!a&&i?-1:(a=a&&i,t.length>n.length?a?1:-1:t.length<n.length?a?-1:1:t>n?a?1:-1:t<n?a?-1:1:(t=Math.max(e.length,r.length),(n=e.padEnd(t,"0"))>(t=r.padEnd(t,"0"))?a?1:-1:n<t?a?-1:1:0))}function D(e,t){return!(-1<(e=e.toString()).indexOf(".")&&0===t)&&(!(e=/^[-+]?0*([1-9]\d*)?(?:\.((?:\d*[1-9])*)0*)?$/.exec(e))[2]||e[2].length<=t)}function M(e,t){switch(t){case"required":return/(Z)|([+-])([01]\d):([0-5]\d)$/.test(e.toString());case"prohibited":return!/(Z)|([+-])([01]\d):([0-5]\d)$/.test(e.toString());case"optional":return!0}}function G(e){switch(e){case 1:case 0:case 6:case 3:return{};case 4:return{la:D,ra:function(e,t){return 1>R(e,t)},zc:function(e,t){return 0>R(e,t)},sa:function(e,t){return-1<R(e,t)},Ac:function(e,t){return 0<R(e,t)}};case 18:return{};case 9:case 8:case 7:case 11:case 12:case 13:case 15:case 14:return{xa:M};case 22:case 21:case 20:case 23:case 44:return{};default:return null}}o("Object.assign",(function(e){return e||N})),o("String.prototype.repeat",(function(e){return e||function(e){var t=C(this,null,"repeat");if(0>e||1342177279<e)throw new RangeError("Invalid count value");e|=0;for(var n="";e;)1&e&&(n+=t),(e>>>=1)&&(t+=t);return n}})),o("String.prototype.padEnd",(function(e){return e||function(e,t){var n=C(this,null,"padStart");return n+T(t,e-n.length)}})),o("WeakMap",(function(e){function t(e){if(this.h=(l+=Math.random()+1).toString(),e){e=u(e);for(var t;!(t=e.next()).done;)t=t.value,this.set(t[0],t[1])}}function n(){}function r(e){var t=typeof e;return"object"===t&&null!==e||"function"===t}function i(e){if(!B(e,s)){var t=new n;a(e,s,{value:t})}}function o(e){var t=Object[e];t&&(Object[e]=function(e){return e instanceof n?e:(Object.isExtensible(e)&&i(e),t(e))})}if(function(){if(!e||!Object.seal)return!1;try{var t=Object.seal({}),n=Object.seal({}),r=new e([[t,2],[n,3]]);return 2==r.get(t)&&3==r.get(n)&&(r.delete(t),r.set(n,4),!r.has(t)&&4==r.get(n))}catch(e){return!1}}())return e;var s="$jscomp_hidden_"+Math.random();o("freeze"),o("preventExtensions"),o("seal");var l=0;return t.prototype.set=function(e,t){if(!r(e))throw Error("Invalid WeakMap key");if(i(e),!B(e,s))throw Error("WeakMap key fail: "+e);return e[s][this.h]=t,this},t.prototype.get=function(e){return r(e)&&B(e,s)?e[s][this.h]:void 0},t.prototype.has=function(e){return r(e)&&B(e,s)&&B(e[s],this.h)},t.prototype.delete=function(e){return!!(r(e)&&B(e,s)&&B(e[s],this.h))&&delete e[s][this.h]},t})),o("Map",(function(e){function t(){var e={};return e.Ba=e.next=e.head=e}function n(e,t){var n=e.h;return s((function(){if(n){for(;n.head!=e.h;)n=n.Ba;for(;n.next!=n.head;)return n=n.next,{done:!1,value:t(n)};n=null}return{done:!0,value:void 0}}))}function r(e,t){var n=t&&typeof t;"object"==n||"function"==n?i.has(t)?n=i.get(t):(n=""+ ++o,i.set(t,n)):n="p_"+t;var r=e.o[n];if(r&&B(e.o,n))for(e=0;e<r.length;e++){var a=r[e];if(t!=t&&a.key!=a.key||t===a.key)return{id:n,list:r,index:e,ja:a}}return{id:n,list:r,index:-1,ja:void 0}}function a(e){if(this.o={},this.h=t(),this.size=0,e){e=u(e);for(var n;!(n=e.next()).done;)n=n.value,this.set(n[0],n[1])}}if(function(){if(!e||"function"!=typeof e||!e.prototype.entries||"function"!=typeof Object.seal)return!1;try{var t=Object.seal({x:4}),n=new e(u([[t,"s"]]));if("s"!=n.get(t)||1!=n.size||n.get({x:4})||n.set({x:4},"t")!=n||2!=n.size)return!1;var r=n.entries(),a=r.next();return!a.done&&a.value[0]==t&&"s"==a.value[1]&&!((a=r.next()).done||4!=a.value[0].x||"t"!=a.value[1]||!r.next().done)}catch(e){return!1}}())return e;var i=new WeakMap;a.prototype.set=function(e,t){var n=r(this,e=0===e?0:e);return n.list||(n.list=this.o[n.id]=[]),n.ja?n.ja.value=t:(n.ja={next:this.h,Ba:this.h.Ba,head:this.h,key:e,value:t},n.list.push(n.ja),this.h.Ba.next=n.ja,this.h.Ba=n.ja,this.size++),this},a.prototype.delete=function(e){return!(!(e=r(this,e)).ja||!e.list)&&(e.list.splice(e.index,1),e.list.length||delete this.o[e.id],e.ja.Ba.next=e.ja.next,e.ja.next.Ba=e.ja.Ba,e.ja.head=null,this.size--,!0)},a.prototype.clear=function(){this.o={},this.h=this.h.Ba=t(),this.size=0},a.prototype.has=function(e){return!!r(this,e).ja},a.prototype.get=function(e){return(e=r(this,e).ja)&&e.value},a.prototype.entries=function(){return n(this,(function(e){return[e.key,e.value]}))},a.prototype.keys=function(){return n(this,(function(e){return e.key}))},a.prototype.values=function(){return n(this,(function(e){return e.value}))},a.prototype.forEach=function(e,t){for(var n,r=this.entries();!(n=r.next()).done;)n=n.value,e.call(t,n[1],n[0],this)},a.prototype[Symbol.iterator]=a.prototype.entries;var o=0;return a})),o("Array.prototype.find",(function(e){return e||function(e,t){return I(this,e,t).Pb}})),o("String.prototype.startsWith",(function(e){return e||function(e,t){var n=C(this,e,"startsWith"),r=n.length,a=e.length;t=Math.max(0,Math.min(0|t,n.length));for(var i=0;i<a&&t<r;)if(n[t++]!=e[i++])return!1;return i>=a}})),o("Array.prototype.fill",(function(e){return e||function(e,t,n){var r=this.length||0;for(0>t&&(t=Math.max(0,r+t)),(null==n||n>r)&&(n=r),0>(n=Number(n))&&(n=Math.max(0,r+n)),t=Number(t||0);t<n;t++)this[t]=e;return this}})),o("Int8Array.prototype.fill",O),o("Uint8Array.prototype.fill",O),o("Uint8ClampedArray.prototype.fill",O),o("Int16Array.prototype.fill",O),o("Uint16Array.prototype.fill",O),o("Int32Array.prototype.fill",O),o("Uint32Array.prototype.fill",O),o("Float32Array.prototype.fill",O),o("Float64Array.prototype.fill",O),o("Array.from",(function(e){return e||function(e,t,n){t=null!=t?t:function(e){return e};var r=[],a="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];if("function"==typeof a){e=a.call(e);for(var i=0;!(a=e.next()).done;)r.push(t.call(n,a.value,i++))}else for(a=e.length,i=0;i<a;i++)r.push(t.call(n,e[i],i));return r}})),o("Object.is",(function(e){return e||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}})),o("Array.prototype.includes",(function(e){return e||function(e,t){var n=this;n instanceof String&&(n=String(n));var r=n.length;for(0>(t=t||0)&&(t=Math.max(t+r,0));t<r;t++){var a=n[t];if(a===e||Object.is(a,e))return!0}return!1}})),o("String.prototype.includes",(function(e){return e||function(e,t){return-1!==C(this,e,"includes").indexOf(e,t||0)}})),o("Number.MAX_SAFE_INTEGER",(function(){return 9007199254740991})),o("Number.MIN_SAFE_INTEGER",(function(){return-9007199254740991})),o("Math.trunc",(function(e){return e||function(e){if(e=Number(e),isNaN(e)||1/0===e||-1/0===e||0===e)return e;var t=Math.floor(Math.abs(e));return 0>e?-t:t}})),o("Number.isFinite",(function(e){return e||function(e){return"number"==typeof e&&(!isNaN(e)&&1/0!==e&&-1/0!==e)}})),o("String.prototype.padStart",(function(e){return e||function(e,t){var n=C(this,null,"padStart");return T(t,e-n.length)+n}})),o("Array.prototype.keys",(function(e){return e||function(){return S(this,(function(e){return e}))}})),o("Number.isInteger",(function(e){return e||function(e){return!!Number.isFinite(e)&&e===Math.floor(e)}})),o("Number.isSafeInteger",(function(e){return e||function(e){return Number.isInteger(e)&&Math.abs(e)<=Number.MAX_SAFE_INTEGER}})),o("Array.prototype.findIndex",(function(e){return e||function(e,t){return I(this,e,t).Hb}})),o("String.prototype.endsWith",(function(e){return e||function(e,t){var n=C(this,e,"endsWith");void 0===t&&(t=n.length),t=Math.max(0,Math.min(0|t,n.length));for(var r=e.length;0<r&&0<t;)if(n[--t]!=e[--r])return!1;return 0>=r}})),o("String.fromCodePoint",(function(e){return e||function(e){for(var t="",n=0;n<arguments.length;n++){var r=Number(arguments[n]);if(0>r||1114111<r||r!==Math.floor(r))throw new RangeError("invalid_code_point "+r);65535>=r?t+=String.fromCharCode(r):(r-=65536,t+=String.fromCharCode(r>>>10&1023|55296),t+=String.fromCharCode(1023&r|56320))}return t}})),o("String.prototype.codePointAt",(function(e){return e||function(e){var t=C(this,null,"codePointAt"),n=t.length;if(0<=(e=Number(e)||0)&&e<n){e|=0;var r=t.charCodeAt(e);return 55296>r||56319<r||e+1===n||(56320>(e=t.charCodeAt(e+1))||57343<e)?r:1024*(r-55296)+e+9216}}})),o("Set",(function(e){function t(e){if(this.h=new Map,e){e=u(e);for(var t;!(t=e.next()).done;)this.add(t.value)}this.size=this.h.size}return function(){if(!e||"function"!=typeof e||!e.prototype.entries||"function"!=typeof Object.seal)return!1;try{var t=Object.seal({x:4}),n=new e(u([t]));if(!n.has(t)||1!=n.size||n.add(t)!=n||1!=n.size||n.add({x:4})!=n||2!=n.size)return!1;var r=n.entries(),a=r.next();return!a.done&&a.value[0]==t&&a.value[1]==t&&(!(a=r.next()).done&&a.value[0]!=t&&4==a.value[0].x&&a.value[1]==a.value[0]&&r.next().done)}catch(e){return!1}}()?e:(t.prototype.add=function(e){return e=0===e?0:e,this.h.set(e,e),this.size=this.h.size,this},t.prototype.delete=function(e){return e=this.h.delete(e),this.size=this.h.size,e},t.prototype.clear=function(){this.h.clear(),this.size=0},t.prototype.has=function(e){return this.h.has(e)},t.prototype.entries=function(){return this.h.entries()},t.prototype.values=function(){return this.h.values()},t.prototype.keys=t.prototype.values,t.prototype[Symbol.iterator]=t.prototype.values,t.prototype.forEach=function(e,t){var n=this;this.h.forEach((function(r){return e.call(t,r,r,n)}))},t)})),o("Math.log10",(function(e){return e||function(e){return Math.log(e)/Math.LN10}})),o("Number.isNaN",(function(e){return e||function(e){return"number"==typeof e&&isNaN(e)}})),o("Object.values",(function(e){return e||function(e){var t,n=[];for(t in e)B(e,t)&&n.push(e[t]);return n}})),o("Array.prototype.values",(function(e){return e||function(){return S(this,(function(e,t){return t}))}})),o("Object.getOwnPropertySymbols",(function(e){return e||function(){return[]}}));var U={},F={};function P(e){return/^([+-]?(\d*(\.\d*)?([eE][+-]?\d*)?|INF)|NaN)$/.test(e)}function H(e){return/^[_:A-Za-z][-._:A-Za-z0-9]*$/.test(e)}function j(e){return H(e)&&/^[_A-Za-z]([-._A-Za-z0-9])*$/.test(e)}function X(e){return 1===(e=e.split(":")).length?j(e[0]):2===e.length&&(j(e[0])&&j(e[1]))}function _(e){return!/[\u0009\u000A\u000D]/.test(e)}function L(e){return j(e)}var k=new Map([[45,function(){return!0}],[46,function(){return!0}],[1,function(){return!0}],[0,function(e){return/^(0|1|true|false)$/.test(e)}],[6,function(e){return P(e)}],[3,P],[4,function(e){return/^[+-]?\d*(\.\d*)?$/.test(e)}],[18,function(e){return/^(-)?P(\d+Y)?(\d+M)?(\d+D)?(T(\d+H)?(\d+M)?(\d+(\.\d*)?S)?)?$/.test(e)}],[9,function(e){return/^-?([1-9][0-9]{3,}|0[0-9]{3})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T(([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?|(24:00:00(\.0+)?))(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?$/.test(e)}],[8,function(e){return/^(([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?|(24:00:00(\.0+)?))(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?$/.test(e)}],[7,function(e){return/^-?([1-9][0-9]{3,}|0[0-9]{3})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?$/.test(e)}],[11,function(e){return/^-?([1-9][0-9]{3,}|0[0-9]{3})-(0[1-9]|1[0-2])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?$/.test(e)}],[12,function(e){return/^-?([1-9][0-9]{3,}|0[0-9]{3})(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?$/.test(e)}],[13,function(e){return/^--(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?$/.test(e)}],[15,function(e){return/^---(0[1-9]|[12][0-9]|3[01])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?$/.test(e)}],[14,function(e){return/^--(0[1-9]|1[0-2])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?$/.test(e)}],[22,function(e){return/^([0-9A-Fa-f]{2})*$/.test(e)}],[21,function(e){return new RegExp(/^((([A-Za-z0-9+/] ?){4})*((([A-Za-z0-9+/] ?){3}[A-Za-z0-9+/])|(([A-Za-z0-9+/] ?){2}[AEIMQUYcgkosw048] ?=)|(([A-Za-z0-9+/] ?)[AQgw] ?= ?=)))?$/).test(e)}],[20,function(){return!0}],[44,X],[48,_],[52,function(e){return _(e)&&!/^ | {2,}| $/.test(e)}],[51,function(e){return/^[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*$/.test(e)}],[50,function(e){return/^[-._:A-Za-z0-9]+$/.test(e)}],[25,H],[23,X],[24,j],[42,L],[41,L],[26,function(e){return j(e)}],[5,function(e){return/^[+-]?\d+$/.test(e)}],[16,function(e){return/^-?P[0-9]+(Y([0-9]+M)?|M)$/.test(e)}],[17,function(e){return/^-?P([0-9]+D)?(T([0-9]+H)?([0-9]+M)?([0-9]+(\.[0-9]+)?S)?)?$/.test(e)}]]),q=Object.create(null);function Y(e,t){if(!q[t])throw Error("Unknown type");return{type:t,value:e}}[{D:0,name:59},{D:0,name:46,parent:59,L:{whiteSpace:"preserve"}},{D:0,name:19,parent:46},{D:0,name:1,parent:46},{D:0,name:0,parent:46,L:{whiteSpace:"collapse"}},{D:0,name:4,parent:46,L:{whiteSpace:"collapse"}},{D:0,name:6,parent:46,L:{whiteSpace:"collapse"}},{D:0,name:3,parent:46,L:{whiteSpace:"collapse"}},{D:0,name:18,parent:46,L:{whiteSpace:"collapse"}},{D:0,name:9,parent:46,L:{xa:"optional",whiteSpace:"collapse"}},{D:0,name:8,parent:46,L:{xa:"optional",whiteSpace:"collapse"}},{D:0,name:7,parent:46,L:{xa:"optional",whiteSpace:"collapse"}},{D:0,name:11,parent:46,L:{xa:"optional",whiteSpace:"collapse"}},{D:0,name:12,parent:46,L:{xa:"optional",whiteSpace:"collapse"}},{D:0,name:13,parent:46,L:{xa:"optional",whiteSpace:"collapse"}},{D:0,name:15,parent:46,L:{xa:"optional",whiteSpace:"collapse"}},{D:0,name:14,parent:46,L:{xa:"optional",whiteSpace:"collapse"}},{D:0,name:22,parent:46,L:{whiteSpace:"collapse"}},{D:0,name:21,parent:46,L:{whiteSpace:"collapse"}},{D:0,name:20,parent:46,L:{whiteSpace:"collapse"}},{D:0,name:23,parent:46,L:{whiteSpace:"collapse"}},{D:0,name:44,parent:46,L:{whiteSpace:"collapse"}},{D:1,name:10,V:9,L:{whiteSpace:"collapse",xa:"required"}},{D:1,name:48,V:1,L:{whiteSpace:"replace"}},{D:1,name:52,V:48,L:{whiteSpace:"collapse"}},{D:1,name:51,V:52,L:{whiteSpace:"collapse"}},{D:1,name:50,V:52,L:{whiteSpace:"collapse"}},{D:2,name:49,type:50,L:{minLength:1,whiteSpace:"collapse"}},{D:1,name:25,V:52,L:{whiteSpace:"collapse"}},{D:1,name:24,V:25,L:{whiteSpace:"collapse"}},{D:1,name:42,V:24,L:{whiteSpace:"collapse"}},{D:1,name:41,V:24,L:{whiteSpace:"collapse"}},{D:2,name:43,type:41,L:{minLength:1,whiteSpace:"collapse"}},{D:1,name:26,V:24,L:{whiteSpace:"collapse"}},{D:2,name:40,type:26,L:{minLength:1,whiteSpace:"collapse"}},{D:0,name:5,parent:4,L:{la:0,whiteSpace:"collapse"}},{D:1,name:27,V:5,L:{la:0,ra:"0",whiteSpace:"collapse"}},{D:1,name:28,V:27,L:{la:0,ra:"-1",whiteSpace:"collapse"}},{D:1,name:31,V:5,L:{la:0,ra:"9223372036854775807",sa:"-9223372036854775808",whiteSpace:"collapse"}},{D:1,name:32,V:31,L:{la:0,ra:"2147483647",sa:"-2147483648",whiteSpace:"collapse"}},{D:1,name:33,V:32,L:{la:0,ra:"32767",sa:"-32768",whiteSpace:"collapse"}},{D:1,name:34,V:33,L:{la:0,ra:"127",sa:"-128",whiteSpace:"collapse"}},{D:1,name:30,V:5,L:{la:0,sa:"0",whiteSpace:"collapse"}},{D:1,name:36,V:30,L:{la:0,ra:"18446744073709551615",sa:"0",whiteSpace:"collapse"}},{D:1,name:35,V:36,L:{la:0,ra:"4294967295",sa:"0",whiteSpace:"collapse"}},{D:1,name:38,V:35,L:{la:0,ra:"65535",sa:"0",whiteSpace:"collapse"}},{D:1,name:37,V:38,L:{la:0,ra:"255",sa:"0",whiteSpace:"collapse"}},{D:1,name:29,V:30,L:{la:0,sa:"1",whiteSpace:"collapse"}},{D:1,name:16,V:18,L:{whiteSpace:"collapse"}},{D:1,name:17,V:18,L:{whiteSpace:"collapse"}},{D:1,name:60,V:59},{D:3,name:39,Ha:[]},{D:1,name:61,V:60},{D:1,name:62,V:60},{D:0,name:53,parent:59},{D:1,name:54,V:53},{D:1,name:58,V:53},{D:1,name:47,V:53},{D:1,name:56,V:53},{D:1,name:57,V:53},{D:1,name:55,V:53},{D:3,name:2,Ha:[4,5,6,3]}].forEach((function(e){var t=e.name,n=e.L||{};if(0===e.D){e=e.parent?q[e.parent]:null;var r=k.get(t)||null;q[t]={D:0,type:t,Ia:n,parent:e,fb:r,Ka:G(t),Ha:[]}}else 1===e.D?(e=q[e.V],r=k.get(t)||null,q[t]={D:1,type:t,Ia:n,parent:e,fb:r,Ka:e.Ka,Ha:[]}):2===e.D?q[t]={D:2,type:t,Ia:n,parent:q[e.type],fb:null,Ka:U,Ha:[]}:(e=e.Ha.map((function(e){return q[e]})),q[t]={D:3,type:t,Ia:n,parent:null,fb:null,Ka:F,Ha:e})}));var V=Y(!0,0),Q=Y(!1,0);function J(){return Error("FORG0006: A wrong argument type was specified in a function call.")}function K(e,t){this.done=e,this.value=t}var z=new K(!0,void 0);function W(e){return new K(!1,e)}function Z(e,t){return e===t||function e(t,n){if(3===n.D)return!!n.Ha.find((function(n){return e(t,n)}));for(;t;){if(t.type===n.type)return!0;if(3===t.D)return!!t.Ha.find((function(e){return Z(e.type,n.type)}));t=t.parent}return!1}(q[e],q[t])}function $(e){this.o=se,this.h=e;var t=-1;this.value={next:function(){return++t>=e.length?z:W(e[t])}}}function ee(){this.value={next:function(){return z}}}function te(e){var t=e.value;if(Z(e.type,53))return!0;if(Z(e.type,0))return t;if(Z(e.type,1)||Z(e.type,20)||Z(e.type,19))return 0!==t.length;if(Z(e.type,2))return!isNaN(t)&&0!==t;throw J()}function ne(e,t){var n=this;this.J=se,this.value={next:function(t){return null!==n.o&&n.h>=n.o?z:void 0!==n.B[n.h]?W(n.B[n.h++]):(t=e.next(t)).done?(n.o=n.h,t):((n.v||2>n.h)&&(n.B[n.h]=t.value),n.h++,t)}},this.v=!1,this.B=[],this.h=0,this.o=void 0===t?null:t}function re(e,t){e.h=void 0===t?0:t}function ae(e){this.B=se,this.h=e;var t=!1;this.value={next:function(){return t?z:(t=!0,W(e))}},this.o=null}(n=$.prototype).pb=function(){return this},n.filter=function(e){var t=this,n=-1;return this.o.create({next:function(){for(n++;n<t.h.length&&!e(t.h[n],n,t);)n++;return n>=t.h.length?z:W(t.h[n])}})},n.first=function(){return this.h[0]},n.S=function(){return this.h},n.getEffectiveBooleanValue=function(){if(Z(this.h[0].type,53))return!0;throw J()},n.ya=function(){return this.h.length},n.F=function(){return!1},n.za=function(){return!1},n.map=function(e){var t=this,n=-1;return this.o.create({next:function(){return++n>=t.h.length?z:W(e(t.h[n],n,t))}},this.h.length)},n.M=function(e){return e(this.h)},n.aa=function(e){return e.multiple?e.multiple(this):e.default(this)},(n=ee.prototype).pb=function(){return this},n.filter=function(){return this},n.first=function(){return null},n.S=function(){return[]},n.getEffectiveBooleanValue=function(){return!1},n.ya=function(){return 0},n.F=function(){return!0},n.za=function(){return!1},n.map=function(){return this},n.M=function(e){return e([])},n.aa=function(e){return e.empty?e.empty(this):e.default(this)},(n=ne.prototype).pb=function(){return this.J.create(this.S())},n.filter=function(e){var t=this,n=-1,r=this.value;return this.J.create({next:function(a){n++;for(var i=r.next(a);!i.done&&!e(i.value,n,t);)n++,i=r.next(a);return i}})},n.first=function(){if(void 0!==this.B[0])return this.B[0];var e=this.value.next(0);return re(this),e.done?null:e.value},n.S=function(){if(this.h>this.B.length&&this.o!==this.B.length)throw Error("Implementation error: Sequence Iterator has progressed.");var e=this.value;this.v=!0;for(var t=e.next(0);!t.done;)t=e.next(0);return this.B},n.getEffectiveBooleanValue=function(){var e=this.value,t=this.h;re(this);var n=e.next(0);if(n.done)return re(this,t),!1;if(Z((n=n.value).type,53))return re(this,t),!0;if(!e.next(0).done)throw J();return re(this,t),te(n)},n.ya=function(e){if(null!==this.o)return this.o;if(void 0!==e&&e)return-1;e=this.h;var t=this.S().length;return re(this,e),t},n.F=function(){return 0===this.o||null===this.first()},n.za=function(){if(null!==this.o)return 1===this.o;var e=this.value,t=this.h;return re(this),e.next(0).done?(re(this,t),!1):(e=e.next(0),re(this,t),e.done)},n.map=function(e){var t=this,n=0,r=this.value;return this.J.create({next:function(a){return(a=r.next(a)).done?z:W(e(a.value,n++,t))}},this.o)},n.M=function(e,t){var n,r=this.value,a=[],i=!0;return function(){for(var o=r.next(i?0:t);!o.done;o=r.next(t))i=!1,a.push(o.value);n=e(a).value}(),this.J.create({next:function(){return n.next(0)}})},n.aa=function(e){function t(e){r=e.value,-1!==(e=e.ya(!0))&&(n.o=e)}var n=this,r=null;return this.J.create({next:function(a){return r?r.next(a):n.F()?(t(e.empty?e.empty(n):e.default(n)),r.next(a)):n.za()?(t(e.s?e.s(n):e.default(n)),r.next(a)):(t(e.multiple?e.multiple(n):e.default(n)),r.next(a))}})},(n=ae.prototype).pb=function(){return this},n.filter=function(e){return e(this.h,0,this)?this:this.B.create()},n.first=function(){return this.h},n.S=function(){return[this.h]},n.getEffectiveBooleanValue=function(){return null===this.o&&(this.o=te(this.h)),this.o},n.ya=function(){return 1},n.F=function(){return!1},n.za=function(){return!0},n.map=function(e){return this.B.create(e(this.h,0,this))},n.M=function(e){return e([this.h])},n.aa=function(e){return e.s?e.s(this):e.default(this)};var ie=new ee;function oe(e,t){if(null===(e=void 0===e?null:e))return ie;if(Array.isArray(e))switch(e.length){case 0:return ie;case 1:return new ae(e[0]);default:return new $(e)}return e.next?new ne(e,void 0===t?null:t):new ae(e)}var se={create:oe,s:function(e){return new ae(e)},empty:function(){return oe()},$:function(){return oe(V)},U:function(){return oe(Q)}};function ue(e){var t=[],n=e.value;return function(){var e=0;return se.create({next:function(){if(void 0!==t[e])return t[e++];var r=n.next(0);return r.done?r:t[e++]=r}})}}function le(e,t){this.type=e,this.value=t}var ce={},he=(ce[0]="xs:boolean",ce[1]="xs:string",ce[2]="xs:numeric",ce[3]="xs:double",ce[4]="xs:decimal",ce[5]="xs:integer",ce[6]="xs:float",ce[7]="xs:date",ce[8]="xs:time",ce[9]="xs:dateTime",ce[10]="xs:dateTimeStamp",ce[11]="xs:gYearMonth",ce[12]="xs:gYear",ce[13]="xs:gMonthDay",ce[14]="xs:gMonth",ce[15]="xs:gDay",ce[16]="xs:yearMonthDuration",ce[17]="xs:dayTimeDuration",ce[18]="xs:duration",ce[19]="xs:untypedAtomic",ce[20]="xs:anyURI",ce[21]="xs:base64Binary",ce[22]="xs:hexBinary",ce[23]="xs:QName",ce[24]="xs:NCName",ce[25]="xs:Name",ce[26]="xs:ENTITY",ce[27]="xs:nonPositiveInteger",ce[28]="xs:negativeInteger",ce[29]="xs:positiveInteger",ce[30]="xs:nonNegativeInteger",ce[31]="xs:long",ce[32]="xs:int",ce[33]="xs:short",ce[34]="xs:byte",ce[35]="xs:unsignedInt",ce[36]="xs:unsignedLong",ce[37]="xs:unsignedByte",ce[38]="xs:unsignedShort",ce[39]="xs:error",ce[40]="xs:ENTITIES",ce[41]="xs:IDREF",ce[42]="xs:ID",ce[43]="xs:IDFREFS",ce[44]="xs:NOTATION",ce[45]="xs:anySimpleType",ce[46]="xs:anyAtomicType",ce[47]="attribute()",ce[48]="xs:normalizedString",ce[49]="xs:NMTOKENS",ce[50]="xs:NMTOKEN",ce[51]="xs:language",ce[52]="xs:token",ce[53]="node()",ce[54]="element()",ce[55]="document-node()",ce[56]="text()",ce[57]="processing-instruction()",ce[58]="comment()",ce[59]="item()",ce[60]="function(*)",ce[61]="map(*)",ce[62]="array(*)",ce),pe={"xs:boolean":0,"xs:string":1,"xs:numeric":2,"xs:double":3,"xs:decimal":4,"xs:integer":5,"xs:float":6,"xs:date":7,"xs:time":8,"xs:dateTime":9,"xs:dateTimeStamp":10,"xs:gYearMonth":11,"xs:gYear":12,"xs:gMonthDay":13,"xs:gMonth":14,"xs:gDay":15,"xs:yearMonthDuration":16,"xs:dayTimeDuration":17,"xs:duration":18,"xs:untypedAtomic":19,"xs:anyURI":20,"xs:base64Binary":21,"xs:hexBinary":22,"xs:QName":23,"xs:NCName":24,"xs:Name":25,"xs:ENTITY":26,"xs:nonPositiveInteger":27,"xs:negativeInteger":28,"xs:positiveInteger":29,"xs:nonNegativeInteger":30,"xs:long":31,"xs:int":32,"xs:short":33,"xs:byte":34,"xs:unsignedInt":35,"xs:unsignedLong":36,"xs:unsignedByte":37,"xs:unsignedShort":38,"xs:error":39,"xs:ENTITIES":40,"xs:IDREF":41,"xs:ID":42,"xs:IDREFS":43,"xs:NOTATION":44,"xs:anySimpleType":45,"xs:anyAtomicType":46,"attribute()":47,"xs:normalizedString":48,"xs:NMTOKENS":49,"xs:NMTOKEN":50,"xs:language":51,"xs:token":52,"node()":53,"element()":54,"document-node()":55,"text()":56,"processing-instruction()":57,"comment()":58,"item()":59,"function(*)":60,"map(*)":61,"array(*)":62};function fe(e){return 2===e.g?he[e.type]+"*":1===e.g?he[e.type]+"+":0===e.g?he[e.type]+"?":he[e.type]}function de(e){if(!e.startsWith("xs:")&&0<=e.indexOf(":"))throw Error("XPST0081: Invalid prefix for input "+e);var t=pe[e];if(void 0===t)throw Error('XPST0051: The type "'+e+'" could not be found');return t}function me(e){switch(e[e.length-1]){case"*":return{type:de(e.substr(0,e.length-1)),g:2};case"?":return{type:de(e.substr(0,e.length-1)),g:0};case"+":return{type:de(e.substr(0,e.length-1)),g:1};default:return{type:de(e),g:3}}}function ve(e,t,n){this.namespaceURI=t||null,this.prefix=e||"",this.localName=n}function ge(e){var t=e.l,n=e.arity,r=void 0!==e.Oa&&e.Oa,a=void 0!==e.I&&e.I,i=e.localName,o=e.namespaceURI,s=e.j;for(e=e.value,le.call(this,60,null),this.value=e,this.I=a,a=-1,e=0;e<t.length;e++)4===t[e]&&(a=e);-1<a&&(e=Array(n-(t.length-1)).fill(t[a-1]),t=t.slice(0,a).concat(e)),this.o=t,this.B=n,this.N=r,this.J=i,this.v=o,this.C=s}function ye(e,t){var n=[];return 2!==e&&1!==e||n.push("type-1-or-type-2"),n.push("type-"+e),t&&n.push("name-"+t),n}function we(e){var t=e.node.nodeType;if(2===t||1===t)var n=e.node.localName;return ye(t,n)}function Ae(e){var t=e.nodeType;if(2===t||1===t)var n=e.localName;return ye(t,n)}function xe(){}function be(){}ve.prototype.va=function(){return this.prefix?this.prefix+":"+this.localName:this.localName},v(ge,le),ge.prototype.Oa=function(){return this.N},xe.prototype.getAllAttributes=function(e,t){return t=void 0===t?null:t,1!==e.nodeType?[]:(e=Array.from(e.attributes),null===t?e:e.filter((function(e){return Ae(e).includes(t)})))},xe.prototype.getAttribute=function(e,t){return 1!==e.nodeType?null:e.getAttribute(t)},xe.prototype.getChildNodes=function(e,t){return t=void 0===t?null:t,e=Array.from(e.childNodes),null===t?e:e.filter((function(e){return Ae(e).includes(t)}))},xe.prototype.getData=function(e){return 2===e.nodeType?e.value:e.data},xe.prototype.getFirstChild=function(e,t){for(t=void 0===t?null:t,e=e.firstChild;e;e=e.nextSibling)if(null===t||Ae(e).includes(t))return e;return null},xe.prototype.getLastChild=function(e,t){for(t=void 0===t?null:t,e=e.lastChild;e;e=e.previousSibling)if(null===t||Ae(e).includes(t))return e;return null},xe.prototype.getNextSibling=function(e,t){for(t=void 0===t?null:t,e=e.nextSibling;e;e=e.nextSibling)if(null===t||Ae(e).includes(t))return e;return null},xe.prototype.getParentNode=function(e,t){return t=void 0===t?null:t,(e=2===e.nodeType?e.ownerElement:e.parentNode)&&(null===t||Ae(e).includes(t))?e:null},xe.prototype.getPreviousSibling=function(e,t){for(t=void 0===t?null:t,e=e.previousSibling;e;e=e.previousSibling)if(null===t||Ae(e).includes(t))return e;return null},(n=be.prototype).insertBefore=function(e,t,n){return e.insertBefore(t,n)},n.removeAttributeNS=function(e,t,n){return e.removeAttributeNS(t,n)},n.removeChild=function(e,t){return e.removeChild(t)},n.setAttributeNS=function(e,t,n,r){e.setAttributeNS(t,n,r)},n.setData=function(e,t){e.data=t};var Ee=new be;function Be(e){this.h=e}function Ne(e){return void 0!==e.Pa}function Ce(e,t,n){var r=null;return t&&(Ne(t.node)?r={G:t.G,offset:n,parent:t.node}:t.G&&(r=t.G)),{node:e,G:r}}function Te(e){this.h=e,this.o=[]}function Ie(e,t,n){return e.getAllAttributes(t.node,void 0===n?null:n).map((function(e){return Ce(e,t,e.nodeName)}))}function Oe(e,t,n){return Ne(t=t.node)?(e=t.attributes.find((function(e){return n===e.name})))?e.value:null:(e=e.h.getAttribute(t,n))?e:null}function Se(e,t,n){return e.getChildNodes(t.node,void 0===n?null:n).map((function(e,n){return Ce(e,t,n)}))}function Re(e,t){return e.getData(t.node)}function De(e,t,n){var r=t.node;return Ne(r)?e=r.childNodes[0]:((n=e.h.getFirstChild(r,void 0===n?null:n))&&10===n.nodeType&&(n=e.h.getNextSibling(n)),e=n),e?Ce(e,t,0):null}function Me(e,t,n){n=void 0===n?null:n;var r=t.node;return Ne(r)?(e=r.childNodes.length-1,r=r.childNodes[e]):((r=e.h.getLastChild(r,n))&&10===r.nodeType&&(r=e.h.getPreviousSibling(r)),e=e.getChildNodes(t.node,n).length-1),r?Ce(r,t,e):null}function Ge(e,t,n){n=void 0===n?null:n;var r=t.node,a=t.G;if(Ne(r)){if(a)var i=a.offset+1,o=a.parent.childNodes[i]}else{if(!a){for(o=r;o&&(!(o=e.h.getNextSibling(o,n))||10===o.nodeType););return o?{node:o,G:null}:null}i=a.offset+1;var s=Ue(e,t,null);o=e.getChildNodes(s.node,n)[i]}return o?Ce(o,s||Ue(e,t,n),i):null}function Ue(e,t,n){n=void 0===n?null:n;var r=t.node,a=t.G;if(a)"number"==typeof a.offset&&r===a.parent.childNodes[a.offset]||"string"==typeof a.offset&&r===a.parent.attributes.find((function(e){return a.offset===e.nodeName}))?(e=a.parent,t=a.G):(e=e.getParentNode(r,n),t=a);else{if(Ne(r))return null;e=e.getParentNode(r,n),t=null}return e?{node:e,G:t}:null}function Fe(e,t,n){n=void 0===n?null:n;var r=t.node,a=t.G;if(Ne(r)){if(a)var i=a.offset-1,o=a.parent.childNodes[i]}else{if(!a){for(o=r;o&&(!(o=e.h.getPreviousSibling(o,n))||10===o.nodeType););return o?{node:o,G:null}:null}i=a.offset-1;var s=Ue(e,t,null);o=e.getChildNodes(s.node,n)[i]}return o?Ce(o,s||Ue(e,t,n),i):null}function Pe(e,t,n,r,a){return a.M((function(e){var t=u(e).next().value;return r.M((function(e){e=u(e).next().value;var n=t.value;if(0>=n||n>e.R.length)throw Error("FOAY0001: array position out of bounds.");return e.R[n-1]()}))}))}function He(e){ge.call(this,{value:function(e,n,r,a){return Pe(0,0,0,se.s(t),a)},localName:"get",namespaceURI:"http://www.w3.org/2005/xpath-functions/array",l:[{type:5,g:3}],arity:1,j:{type:59,g:2}});var t=this;this.type=62,this.R=e}function je(e){switch(e.node.nodeType){case 2:return 47;case 1:return 54;case 3:case 4:return 56;case 7:return 57;case 8:return 58;case 9:return 55;default:return 53}}function Xe(e){return{type:je(e),value:e}}function _e(e,t){return t(e=e.map((function(e){return e.first()})))}function Le(e,t){var n=Z(e.type,1)||Z(e.type,20)||Z(e.type,19),r=Z(t.type,1)||Z(t.type,20)||Z(t.type,19);return n&&r?e.value===t.value:(n=Z(e.type,4)||Z(e.type,3)||Z(e.type,6),r=Z(t.type,4)||Z(t.type,3)||Z(t.type,6),n&&r?!(!isNaN(e.value)||!isNaN(t.value))||e.value===t.value:(n=Z(e.type,0)||Z(e.type,22)||Z(e.type,18)||Z(e.type,23)||Z(e.type,44),r=Z(t.type,0)||Z(t.type,22)||Z(t.type,18)||Z(t.type,23)||Z(t.type,44),!(!n||!r)&&e.value===t.value))}function ke(e,t,n,r,a){return _e([r,a],(function(e){var t=(e=u(e)).next().value,n=e.next().value;return(e=t.h.find((function(e){return Le(e.key,n)})))?e.value():se.empty()}))}function qe(e){ge.call(this,{l:[{type:59,g:3}],arity:1,localName:"get",namespaceURI:"http://www.w3.org/2005/xpath-functions/map",value:function(e,n,r,a){return ke(0,0,0,se.s(t),a)},j:{type:59,g:2}});var t=this;this.type=61,this.h=e}function Ye(){}function Ve(e,t){return e.ab()===t.ab()&&e.bb()===t.bb()}function Qe(e){if(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER)throw Error("FODT0002: Number of seconds given to construct DayTimeDuration overflows MAX_SAFE_INTEGER or MIN_SAFE_INTEGER");this.ea=e}function Je(e){var t=Math.abs(e.Za()),n=Math.abs(e.getHours()),r=Math.abs(e.getMinutes());return n=(n?n+"H":"")+(r?r+"M":"")+((e=Math.abs(e.getSeconds()))?e+"S":""),(t=t?t+"D":"")&&n?t+"T"+n:t||(n?"T"+n:"T0S")}function Ke(e,t,n,r,a,i){return e=86400*e+3600*t+60*n+r+a,new Qe(i||0===e?e:-e)}function ze(e){return(e=/^(-)?P(\d+Y)?(\d+M)?(\d+D)?(?:T(\d+H)?(\d+M)?(\d+(\.\d*)?S)?)?$/.exec(e))?Ke(e[4]?parseInt(e[4],10):0,e[5]?parseInt(e[5],10):0,e[6]?parseInt(e[6],10):0,e[7]?parseInt(e[7],10):0,e[8]?parseFloat(e[8]):0,!e[1]):null}function We(e){return"Z"===(e=/^(Z)|([+-])([01]\d):([0-5]\d)$/.exec(e))[1]?Ke(0,0,0,0,0,!0):Ke(0,e[3]?parseInt(e[3],10):0,e[4]?parseInt(e[4],10):0,0,0,"+"===e[2])}function Ze(e,t){if(isNaN(t))throw Error("FOCA0005: Cannot multiply xs:dayTimeDuration by NaN");if((e=e.ea*t)>Number.MAX_SAFE_INTEGER||!Number.isFinite(e))throw Error("FODT0002: Value overflow while multiplying xs:dayTimeDuration");return new Qe(e<Number.MIN_SAFE_INTEGER||Object.is(-0,e)?0:e)}function $e(e){return e?parseInt(e,10):null}function et(e){var t=(e+="").startsWith("-");return t&&(e=e.substring(1)),(t?"-":"")+e.padStart(4,"0")}function tt(e){return(e+"").padStart(2,"0")}function nt(e){return 1===(e+="").split(".")[0].length&&(e=e.padStart(e.length+1,"0")),e}function rt(e){return 0===e.getHours()&&0===e.getMinutes()?"Z":(e.oa()?"+":"-")+tt(Math.abs(e.getHours()))+":"+tt(Math.abs(e.getMinutes()))}function at(e,t,n,r,a,i,o,s,u){this.B=e,this.h=t,this.o=n+(24===r?1:0),this.v=24===r?0:r,this.C=a,this.J=i,this.pa=o,this.ba=s,this.type=void 0===u?9:u}function it(e,t){switch(t){case 15:return new at(1972,12,e.o,0,0,0,0,e.ba,15);case 14:return new at(1972,e.h,1,0,0,0,0,e.ba,14);case 12:return new at(e.B,1,1,0,0,0,0,e.ba,12);case 13:return new at(1972,e.h,e.o,0,0,0,0,e.ba,13);case 11:return new at(e.B,e.h,1,0,0,0,0,e.ba,11);case 8:return new at(1972,12,31,e.v,e.C,e.J,e.pa,e.ba,8);case 7:return new at(e.B,e.h,e.o,0,0,0,0,e.ba,7);default:return new at(e.B,e.h,e.o,e.v,e.C,e.J,e.pa,e.ba,9)}}function ot(e,t){return t=e.ba||t||We("Z"),new Date(Date.UTC(e.B,e.h-1,e.o,e.v-t.getHours(),e.C-t.getMinutes(),e.J+e.pa))}function st(e){var t=/^(?:(-?\d{4,}))?(?:--?(\d\d))?(?:-{1,3}(\d\d))?(T)?(?:(\d\d):(\d\d):(\d\d))?(\.\d+)?(Z|(?:[+-]\d\d:\d\d))?$/.exec(e);e=t[1]?parseInt(t[1],10):null;var n=$e(t[2]),r=$e(t[3]),a=t[4],i=$e(t[5]),o=$e(t[6]),s=$e(t[7]),u=t[8]?parseFloat(t[8]):0;if(t=t[9]?We(t[9]):null,e&&(-271821>e||273860<e))throw Error("FODT0001: Datetime year is out of bounds");return a?new at(e,n,r,i,o,s,u,t,9):null!==i&&null!==o&&null!==s?new at(1972,12,31,i,o,s,u,t,8):null!==e&&null!==n&&null!==r?new at(e,n,r,0,0,0,0,t,7):null!==e&&null!==n?new at(e,n,1,0,0,0,0,t,11):null!==n&&null!==r?new at(1972,n,r,0,0,0,0,t,13):null!==e?new at(e,1,1,0,0,0,0,t,12):null!==n?new at(1972,n,1,0,0,0,0,t,14):new at(1972,12,r,0,0,0,0,t,15)}function ut(e,t,n){var r=ot(e,n).getTime();return r===(n=ot(t,n).getTime())?e.pa===t.pa?0:e.pa>t.pa?1:-1:r>n?1:-1}function lt(e,t,n){return 0===ut(e,t,n)}function ct(e,t,n){return new Qe(e=(ot(e,n).getTime()-ot(t,n).getTime())/1e3)}function ht(e){throw Error("Not implemented: adding durations to "+he[e.type])}function pt(e){throw Error("Not implemented: subtracting durations from "+he[e.type])}function ft(e,t){if("number"!=typeof e&&("string"!=typeof e||!k.get(t)(e)))throw Error("Cannot convert JavaScript value '"+e+"' to the XPath type "+he[t]+" since it is not valid.")}function dt(e,t,n){if(null===t)return null;switch(e){case 0:return t?V:Q;case 1:return Y(t+"",1);case 3:case 2:return ft(t,3),Y(+t,3);case 4:return ft(t,e),Y(+t,4);case 5:return ft(t,e),Y(0|t,5);case 6:return ft(t,e),Y(+t,6);case 7:case 8:case 9:case 11:case 12:case 13:case 14:case 15:if(!(t instanceof Date))throw Error("The JavaScript value "+t+" with type "+typeof t+" is not a valid type to be converted to an XPath "+he[e]+".");return Y(it(st(t.toISOString()),e),e);case 53:case 47:case 55:case 54:case 56:case 57:case 58:if("object"!=typeof t||!("nodeType"in t))throw Error("The JavaScript value "+t+" with type "+typeof t+" is not a valid type to be converted to an XPath "+he[e]+".");return Xe({node:t,G:null});case 59:return function e(t,n){if(null===t)return null;switch(typeof t){case"boolean":return t?V:Q;case"number":return Y(t,3);case"string":return Y(t,1);case"object":return"nodeType"in t?Xe({node:t,G:null}):Array.isArray(t)?new He(t.map((function(t){return void 0===t?function(){return se.empty()}:ue(t=null===(t=e(t))?se.empty():se.s(t))}))):new qe(Object.keys(t).filter((function(e){return void 0!==t[e]})).map((function(n){var r=e(t[n]);return r=null===r?se.empty():se.s(r),{key:Y(n,1),value:ue(r)}})))}throw Error("Value "+String(t)+' of type "'+typeof t+'" is not adaptable to an XPath value.')}(t);default:throw Error('Values of the type "'+e+'" can not be adapted to equivalent XPath values.')}}function mt(e,t,n){if(0===n.g)return null===(t=dt(n.type,t))?[]:[t];if(2===n.g||1===n.g){if(!Array.isArray(t))throw Error("The JavaScript value "+t+" should be an array if it is to be converted to "+fe(n)+".");return t.map((function(e){return dt(n.type,e)})).filter((function(e){return null!==e}))}var r=dt(n.type,t);if(null===r)throw Error("The JavaScript value "+t+" should be a single entry if it is to be converted to "+fe(n)+".");return[r]}function vt(e,t,n){return n=void 0===n?{type:59,g:0}:n,se.create(mt(0,t,n))}function gt(e,t){this.h=t=void 0===t?{xb:null,Bb:null,qb:!1}:t,this.Ga=e.Ga,this.wa=e.wa,this.O=e.O,this.ta=e.ta||Object.create(null)}function yt(e,t){var n=0,r=t.value;return{next:function(a){return(a=r.next(a)).done?z:W(xt(e,n++,a.value,t))}}}function wt(e){return e.h.qb||(e.h.qb=!0,e.h.xb=st((new Date).toISOString()),e.h.Bb=ze("PT0S")),e.h.xb}function At(e){return e.h.qb||(e.h.qb=!0,e.h.xb=st((new Date).toISOString()),e.h.Bb=ze("PT0S")),e.h.Bb}function xt(e,t,n,r){return new gt({O:n,Ga:t,wa:r||e.wa,ta:e.ta},e.h)}function bt(e,t){return new gt({O:e.O,Ga:e.Ga,wa:e.wa,ta:Object.assign(Object.create(null),e.ta,t)},e.h)}function Et(e,t,n,r,a,i){var o=new Map;this.debug=e,this.h=t,this.o=n,this.B=r,this.J=a,this.C=o,this.v=i,this.Ta=!0}function Bt(e){var t=0,n=null,r=!0;return se.create({next:function(a){for(;t<e.length;){n||(n=e[t].value,r=!0);var i=n.next(r?0:a);if(r=!1,!i.done)return i;t++,n=null}return z}})}function Nt(e,t,n){return Error("FORG0001: Cannot cast "+e+" to "+he[t]+(n?", "+n:""))}function Ct(e){return Error("XPTY0004: "+e)}function Tt(e){return Error("FOTY0013: Atomization is not supported for "+he[e]+".")}function It(e){return Error("XPST0081: The prefix "+e+" could not be resolved.")}function Ot(e,t){if(Z(e.type,46)||Z(e.type,19)||Z(e.type,0)||Z(e.type,4)||Z(e.type,3)||Z(e.type,6)||Z(e.type,5)||Z(e.type,2)||Z(e.type,23)||Z(e.type,1))return se.create(e);var n=t.h;if(Z(e.type,53)){var r=e.value;if(2===r.node.nodeType||3===r.node.nodeType)return se.create(Y(Re(n,r),19));if(8===r.node.nodeType||7===r.node.nodeType)return se.create(Y(Re(n,r),1));var a=[];return function e(t){if(8!==r.node.nodeType&&7!==r.node.nodeType){var i=t.nodeType;3===i||4===i?a.push(n.getData(t)):1!==i&&9!==i||n.getChildNodes(t).forEach((function(t){e(t)}))}}(r.node),se.create(Y(a.join(""),19))}if(Z(e.type,60)&&!Z(e.type,62))throw Tt(e.type);if(Z(e.type,62))return Bt(e.R.map((function(e){return St(e(),t)})));throw Error("Atomizing "+e.type+" is not implemented.")}function St(e,t){var n=!1,r=e.value,a=null;return se.create({next:function(){for(;!n;){if(!a){var e=r.next(0);if(e.done){n=!0;break}a=Ot(e.value,t).value}if(!(e=a.next(0)).done)return e;a=null}return z}})}function Rt(e){for(e=q[e];e&&0!==e.D;)e=e.parent;return e?e.type:null}function Dt(e,t){var n=(t=q[t]).Ia;if(!n||!n.whiteSpace)return t.parent?Dt(e,t.parent.type):e;switch(t.Ia.whiteSpace){case"replace":return e.replace(/[\u0009\u000A\u000D]/g," ");case"collapse":return e.replace(/[\u0009\u000A\u000D]/g," ").replace(/ {2,}/g," ").replace(/^ | $/g,"")}return e}function Mt(e,t){for(t=q[t];t&&null===t.fb;){if(2===t.D||3===t.D)return!0;t=t.parent}return!t||t.fb(e)}function Gt(e,t){for(;e;){if(e.Ka&&e.Ka[t])return e.Ka[t];e=e.parent}return function(){return!0}}function Ut(e,t){return e(2)?function(e){return{u:!0,value:e}}:e(0)?function(e){return{u:!0,value:e?1:0}}:e(1)||e(19)?function(e){switch(e){case"NaN":return{u:!0,value:NaN};case"INF":case"+INF":return{u:!0,value:1/0};case"-INF":return{u:!0,value:-1/0};case"0":case"+0":return{u:!0,value:0};case"-0":return{u:!0,value:-0}}var n=parseFloat(e);return isNaN(n)?{u:!1,error:Nt(e,t)}:{u:!0,value:n}}:function(){return{u:!1,error:Error("XPTY0004: Casting not supported from given type to "+t+" or any of its derived types.")}}}function Ft(e){if(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER)throw Error("FODT0002: Number of months given to construct YearMonthDuration overflows MAX_SAFE_INTEGER or MIN_SAFE_INTEGER");this.ha=e}function Pt(e){var t=Math.abs(e.cb());return(t?t+"Y":"")+((e=Math.abs(e.$a()))?e+"M":"")||"0M"}function Ht(e){var t=/^(-)?P(\d+Y)?(\d+M)?(\d+D)?(?:T(\d+H)?(\d+M)?(\d+(\.\d*)?S)?)?$/.exec(e);if(t){if(e=!t[1],(t=12*(t[2]?parseInt(t[2],10):0)+(t[3]?parseInt(t[3],10):0))>Number.MAX_SAFE_INTEGER||!Number.isFinite(t))throw Error("FODT0002: Value overflow while constructing xs:yearMonthDuration");e=new Ft(e||0===t?t:-t)}else e=null;return e}function jt(e,t){if(isNaN(t))throw Error("FOCA0005: Cannot multiply xs:yearMonthDuration by NaN");if((e=Math.round(e.ha*t))>Number.MAX_SAFE_INTEGER||!Number.isFinite(e))throw Error("FODT0002: Value overflow while constructing xs:yearMonthDuration");return new Ft(e<Number.MIN_SAFE_INTEGER||0===e?0:e)}function Xt(e,t){this.Sa=e,this.Fa=t}(n=Be.prototype).insertBefore=function(e,t,n){return this.h.insertBefore(e,t,n)},n.removeAttributeNS=function(e,t,n){return this.h.removeAttributeNS(e,t,n)},n.removeChild=function(e,t){return this.h.removeChild(e,t)},n.setAttributeNS=function(e,t,n,r){this.h.setAttributeNS(e,t,n,r)},n.setData=function(e,t){this.h.setData(e,t)},Te.prototype.getAllAttributes=function(e,t){return Ne(e)?e.attributes:this.h.getAllAttributes(e,void 0===t?null:t)},Te.prototype.getChildNodes=function(e,t){return t=Ne(e)?e.childNodes:this.h.getChildNodes(e,void 0===t?null:t),9===e.nodeType?t.filter((function(e){return 10!==e.nodeType})):t},Te.prototype.getData=function(e){return Ne(e)?2===e.nodeType?e.value:e.data:this.h.getData(e)||""},Te.prototype.getParentNode=function(e,t){return this.h.getParentNode(e,void 0===t?null:t)},v(He,ge),v(qe,ge),(n=Ye.prototype).Za=function(){return 0},n.getHours=function(){return 0},n.getMinutes=function(){return 0},n.$a=function(){return 0},n.ab=function(){return 0},n.bb=function(){return 0},n.getSeconds=function(){return 0},n.cb=function(){return 0},n.oa=function(){return!0},v(Qe,Ye),(n=Qe.prototype).Za=function(){return Math.trunc(this.ea/86400)},n.getHours=function(){return Math.trunc(this.ea%86400/3600)},n.getMinutes=function(){return Math.trunc(this.ea%3600/60)},n.bb=function(){return this.ea},n.getSeconds=function(){var e=this.ea%60;return Object.is(-0,e)?0:e},n.oa=function(){return!Object.is(-0,this.ea)&&0<=this.ea},n.toString=function(){return(this.oa()?"P":"-P")+Je(this)},(n=at.prototype).getDay=function(){return this.o},n.getHours=function(){return this.v},n.getMinutes=function(){return this.C},n.getMonth=function(){return this.h},n.getSeconds=function(){return this.J},n.getYear=function(){return this.B},n.toString=function(){switch(this.type){case 9:return et(this.B)+"-"+tt(this.h)+"-"+tt(this.o)+"T"+tt(this.v)+":"+tt(this.C)+":"+nt(this.J+this.pa)+(this.ba?rt(this.ba):"");case 7:return et(this.B)+"-"+tt(this.h)+"-"+tt(this.o)+(this.ba?rt(this.ba):"");case 8:return tt(this.v)+":"+tt(this.C)+":"+nt(this.J+this.pa)+(this.ba?rt(this.ba):"");case 15:return"---"+tt(this.o)+(this.ba?rt(this.ba):"");case 14:return"--"+tt(this.h)+(this.ba?rt(this.ba):"");case 13:return"--"+tt(this.h)+"-"+tt(this.o)+(this.ba?rt(this.ba):"");case 12:return et(this.B)+(this.ba?rt(this.ba):"");case 11:return et(this.B)+"-"+tt(this.h)+(this.ba?rt(this.ba):"")}throw Error("Unexpected subType")},v(Ft,Ye),(n=Ft.prototype).$a=function(){var e=this.ha%12;return 0===e?0:e},n.ab=function(){return this.ha},n.cb=function(){return Math.trunc(this.ha/12)},n.oa=function(){return!Object.is(-0,this.ha)&&0<=this.ha},n.toString=function(){return(this.oa()?"P":"-P")+Pt(this)},v(Xt,Ye),(n=Xt.prototype).Za=function(){return this.Fa.Za()},n.getHours=function(){return this.Fa.getHours()},n.getMinutes=function(){return this.Fa.getMinutes()},n.$a=function(){return this.Sa.$a()},n.ab=function(){return this.Sa.ab()},n.bb=function(){return this.Fa.bb()},n.getSeconds=function(){return this.Fa.getSeconds()},n.cb=function(){return this.Sa.cb()},n.oa=function(){return this.Sa.oa()&&this.Fa.oa()},n.toString=function(){var e=this.oa()?"P":"-P",t=Pt(this.Sa),n=Je(this.Fa);return"0M"===t?e+n:"T0S"===n?e+t:e+t+n};var _t=[3,6,4,5];function Lt(e){if(e(1)||e(19))return function(e){return{u:!0,value:e+""}};if(e(20))return function(e){return{u:!0,value:e}};if(e(23))return function(e){return{u:!0,value:e.prefix?e.prefix+":"+e.localName:e.localName}};if(e(44))return function(e){return{u:!0,value:e.toString()}};if(e(2)){if(e(5)||e(4))return function(e){return{u:!0,value:(e+"").replace("e","E")}};if(e(6)||e(3))return function(e){return isNaN(e)?{u:!0,value:"NaN"}:isFinite(e)?Object.is(e,-0)?{u:!0,value:"-0"}:{u:!0,value:(e+"").replace("e","E").replace("E+","E")}:{u:!0,value:(0>e?"-":"")+"INF"}}}return e(9)||e(7)||e(8)||e(15)||e(14)||e(13)||e(12)||e(11)||e(16)||e(17)||e(18)?function(e){return{u:!0,value:e.toString()}}:e(22)?function(e){return{u:!0,value:e.toUpperCase()}}:function(e){return{u:!0,value:e+""}}}var kt=[2,5,17,16];function qt(e,t){function n(t){return Z(e,t)}if(39===t)return function(){return{u:!1,error:Error("FORG0001: Casting to xs:error is always invalid.")}};switch(t){case 19:return function(e){var t=Lt(e);return function(e){return(e=t(e)).u?{u:!0,value:Y(e.value,19)}:e}}(n);case 1:return function(e){var t=Lt(e);return function(e){return(e=t(e)).u?{u:!0,value:Y(e.value,1)}:e}}(n);case 6:return function(e){var t=Ut(e,6);return function(e){return(e=t(e)).u?{u:!0,value:Y(e.value,6)}:e}}(n);case 3:return function(e){var t=Ut(e,3);return function(e){return(e=t(e)).u?{u:!0,value:Y(e.value,3)}:e}}(n);case 4:return function(e){return e(5)?function(e){return{u:!0,value:Y(e,4)}}:e(6)||e(3)?function(e){return isNaN(e)||!isFinite(e)?{u:!1,error:Error("FOCA0002: Can not cast "+e+" to xs:decimal")}:Math.abs(e)>Number.MAX_VALUE?{u:!1,error:Error("FOAR0002: Can not cast "+e+" to xs:decimal, it is out of bounds for JavaScript numbers")}:{u:!0,value:Y(e,4)}}:e(0)?function(e){return{u:!0,value:Y(e?1:0,4)}}:e(1)||e(19)?function(e){var t=parseFloat(e);return!isNaN(t)||isFinite(t)?{u:!0,value:Y(t,4)}:{u:!1,error:Error("FORG0001: Can not cast "+e+" to xs:decimal")}}:function(){return{u:!1,error:Error("XPTY0004: Casting not supported from given type to xs:decimal or any of its derived types.")}}}(n);case 5:return function(e){return e(0)?function(e){return{u:!0,value:Y(e?1:0,5)}}:e(2)?function(e){var t=Math.trunc(e);return!isFinite(t)||isNaN(t)?{u:!1,error:Error("FOCA0002: can not cast "+e+" to xs:integer")}:Number.isSafeInteger(t)?{u:!0,value:Y(t,5)}:{u:!1,error:Error("FOAR0002: can not cast "+e+" to xs:integer, it is out of bounds for JavaScript numbers.")}}:e(1)||e(19)?function(e){var t=parseInt(e,10);return isNaN(t)?{u:!1,error:Nt(e,5)}:Number.isSafeInteger(t)?{u:!0,value:Y(t,5)}:{u:!1,error:Error("FOCA0003: can not cast "+e+" to xs:integer, it is out of bounds for JavaScript numbers.")}}:function(){return{u:!1,error:Error("XPTY0004: Casting not supported from given type to xs:integer or any of its derived types.")}}}(n);case 2:return function(e){var t=qt;return function(n){for(var r=u(_t),a=r.next();!a.done;a=r.next())if((a=t(e,a.value)(n)).u)return a;return{u:!1,error:Error('XPTY0004: Casting not supported from "'+n+'" given type to xs:numeric or any of its derived types.')}}}(e);case 18:return function(e){return e(16)?function(e){return{u:!0,value:Y(new Xt(e,new Qe(e.oa()?0:-0)),18)}}:e(17)?function(e){return{u:!0,value:Y(e=new Xt(new Ft(e.oa()?0:-0),e),18)}}:e(18)?function(e){return{u:!0,value:Y(e,18)}}:e(19)||e(1)?function(e){return{u:!0,value:Y(new Xt(Ht(e),ze(e)),18)}}:function(){return{u:!1,error:Error("XPTY0004: Casting not supported from given type to xs:duration or any of its derived types.")}}}(n);case 16:return function(e){return e(18)&&!e(17)?function(e){return{u:!0,value:Y(e.Sa,16)}}:e(17)?function(){return{u:!0,value:Y(Ht("P0M"),16)}}:e(19)||e(1)?function(e){var t=Ht(e);return t?{u:!0,value:Y(t,16)}:{u:!1,error:Nt(e,16)}}:function(){return{u:!1,error:Error("XPTY0004: Casting not supported from given type to xs:yearMonthDuration or any of its derived types.")}}}(n);case 17:return function(e){return e(18)&&!e(16)?function(e){return{u:!0,value:Y(e.Fa,17)}}:e(16)?function(){return{u:!0,value:Y(ze("PT0.0S"),17)}}:e(19)||e(1)?function(e){var t=ze(e);return t?{u:!0,value:Y(t,17)}:{u:!1,error:Error("FORG0001: Can not cast "+e+" to xs:dayTimeDuration")}}:function(){return{u:!1,error:Error("XPTY0004: Casting not supported from given type to xs:dayTimeDuration or any of its derived types.")}}}(n);case 9:return function(e){return e(7)?function(e){return{u:!0,value:Y(it(e,9),9)}}:e(19)||e(1)?function(e){return{u:!0,value:Y(st(e),9)}}:function(){return{u:!1,error:Error("XPTY0004: Casting not supported from given type to xs:dateTime or any of its derived types.")}}}(n);case 8:return function(e){return e(9)?function(e){return{u:!0,value:Y(it(e,8),8)}}:e(19)||e(1)?function(e){return{u:!0,value:Y(st(e),8)}}:function(){return{u:!1,error:Error("XPTY0004: Casting not supported from given type to xs:time or any of its derived types.")}}}(n);case 7:return function(e){return e(9)?function(e){return{u:!0,value:Y(it(e,7),7)}}:e(19)||e(1)?function(e){return{u:!0,value:Y(st(e),7)}}:function(){return{u:!1,error:Error("XPTY0004: Casting not supported from given type to xs:date or any of its derived types.")}}}(n);case 11:return function(e){return e(7)||e(9)?function(e){return{u:!0,value:Y(it(e,11),11)}}:e(19)||e(1)?function(e){return{u:!0,value:Y(st(e),11)}}:function(){return{u:!1,error:Error("XPTY0004: Casting not supported from given type to xs:gYearMonth or any of its derived types.")}}}(n);case 12:return function(e){return e(7)||e(9)?function(e){return{u:!0,value:Y(it(e,12),12)}}:e(19)||e(1)?function(e){return{u:!0,value:Y(st(e),12)}}:function(){return{u:!1,error:Error("XPTY0004: Casting not supported from given type to xs:gYear or any of its derived types.")}}}(n);case 13:return function(e){return e(7)||e(9)?function(e){return{u:!0,value:Y(it(e,13),13)}}:e(19)||e(1)?function(e){return{u:!0,value:Y(st(e),13)}}:function(){return{u:!1,error:Error("XPTY0004: Casting not supported from given type to xs:gMonthDay or any of its derived types.")}}}(n);case 15:return function(e){return e(7)||e(9)?function(e){return{u:!0,value:Y(it(e,15),15)}}:e(19)||e(1)?function(e){return{u:!0,value:Y(st(e),15)}}:function(){return{u:!1,error:Error("XPTY0004: Casting not supported from given type to xs:gDay or any of its derived types.")}}}(n);case 14:return function(e){return e(7)||e(9)?function(e){return{u:!0,value:Y(it(e,14),14)}}:e(19)||e(1)?function(e){return{u:!0,value:Y(st(e),14)}}:function(){return{u:!1,error:Error("XPTY0004: Casting not supported from given type to xs:gMonth or any of its derived types.")}}}(n);case 0:return function(e){return e(2)?function(e){return{u:!0,value:0===e||isNaN(e)?Q:V}}:e(1)||e(19)?function(e){switch(e){case"true":case"1":return{u:!0,value:V};case"false":case"0":return{u:!0,value:Q};default:return{u:!1,error:Error("XPTY0004: Casting not supported from given type to xs:boolean or any of its derived types.")}}}:function(){return{u:!1,error:Error("XPTY0004: Casting not supported from given type to xs:boolean or any of its derived types.")}}}(n);case 21:return function(e){return e(22)?function(e){for(var t="",n=0;n<e.length;n+=2)t+=String.fromCharCode(parseInt(e.substr(n,2),16));return{u:!0,value:Y(btoa(t),21)}}:e(1)||e(19)?function(e){return{u:!0,value:Y(e,21)}}:function(){return{error:Error("XPTY0004: Casting not supported from given type to xs:base64Binary or any of its derived types."),u:!1}}}(n);case 22:return function(e){return e(21)?function(e){for(var t="",n=0,r=(e=atob(e)).length;n<r;n++)t+=Number(e.charCodeAt(n)).toString(16);return{u:!0,value:Y(t.toUpperCase(),22)}}:e(1)||e(19)?function(e){return{u:!0,value:Y(e,22)}}:function(){return{u:!1,error:Error("XPTY0004: Casting not supported from given type to xs:hexBinary or any of its derived types.")}}}(n);case 20:return function(e){return e(1)||e(19)?function(e){return{u:!0,value:Y(e,20)}}:function(){return{u:!1,error:Error("XPTY0004: Casting not supported from given type to xs:anyURI or any of its derived types.")}}}(n);case 23:throw Error("Casting to xs:QName is not implemented.")}return function(){return{u:!1,error:Error("XPTY0004: Casting not supported from "+e+" to "+t+".")}}}var Yt=Object.create(null);function Vt(e,t){if(19===e&&1===t)return function(e){return{u:!0,value:Y(e,1)}};if(44===t)return function(){return{u:!1,error:Error("XPST0080: Casting to xs:NOTATION is not permitted.")}};if(39===t)return function(){return{u:!1,error:Error("FORG0001: Casting to xs:error is not permitted.")}};if(45===e||45===t)return function(){return{u:!1,error:Error("XPST0080: Casting from or to xs:anySimpleType is not permitted.")}};if(46===e||46===t)return function(){return{u:!1,error:Error("XPST0080: Casting from or to xs:anyAtomicType is not permitted.")}};if(Z(e,60)&&1===t)return function(){return{u:!1,error:Error("FOTY0014: Casting from function item to xs:string is not permitted.")}};if(e===t)return function(e){return{u:!0,value:{type:t,value:e}}};var n=kt.includes(e)?e:Rt(e),r=kt.includes(t)?t:Rt(t);if(null===r||null===n)return function(){return{u:!1,error:Error("XPST0081: Can not cast: type "+(r?he[e]:he[t])+" is unknown.")}};var a=[];return 1!==n&&19!==n||a.push((function(e){var n=Dt(e,t);return Mt(n,t)?{u:!0,value:n}:{u:!1,error:Nt(e,t,"pattern validation failed.")}})),n!==r&&(a.push(qt(n,r)),a.push((function(e){return{u:!0,value:e.value}}))),19!==r&&1!==r||a.push((function(e){return Mt(e,t)?{u:!0,value:e}:{u:!1,error:Nt(e,t,"pattern validation failed.")}})),a.push((function(e){return function(e,t){for(var n=q[t];n;){if(n.Ia&&!Object.keys(n.Ia).every((function(t){if("whiteSpace"===t)return!0;var r=Gt(n,t);return!r||r(e,n.Ia[t])})))return!1;n=n.parent}return!0}(e,t)?{u:!0,value:e}:{u:!1,error:Nt(e,t,"pattern validation failed.")}})),a.push((function(e){return{u:!0,value:{type:t,value:e}}})),function(e){e={u:!0,value:e};for(var t=0,n=a.length;t<n&&!1!==(e=a[t](e.value)).u;++t);return e}}function Qt(e,t){var n=e.type+1e4*t,r=Yt[n];return r||(r=Yt[n]=Vt(e.type,t)),r.call(void 0,e.value,t)}function Jt(e,t){if(!0===(e=Qt(e,t)).u)return e.value;throw e.error}function Kt(e){var t=!1;return{next:function(){return t?z:(t=!0,W(e))}}}function zt(e,t){return!!(e===t||e.node===t.node&&function e(t,n){return t===n||!(!t||!n||t.offset!==n.offset||t.parent!==n.parent)&&e(t.G,n.G)}(e.G,t.G))}function Wt(e,t){for(var n=[];t;t=Ue(e,t,null))n.unshift(t);return n}function Zt(e,t){for(var n=[];t;t=e.getParentNode(t,null))n.unshift(t);return n}function $t(e,t,n,r){if(n.G||r.G||Ne(n.node)||Ne(r.node)){if(zt(n,r))return 0;n=Wt(t,n),r=Wt(t,r);var a=n[0],i=r[0];if(!zt(a,i))return t=e.findIndex((function(e){return zt(e,a)})),n=e.findIndex((function(e){return zt(e,i)})),-1===t&&(t=e.push(a)),-1===n&&(n=e.push(i)),t-n;e=1;for(var o=Math.min(n.length,r.length);e<o&&zt(n[e],r[e]);++e);return n[e]?r[e]?function(e,t,n){var r=Ue(e,t,null);e=Se(e,r,null),r=0;for(var a=e.length;r<a;++r){var i=e[r];if(zt(i,t))return-1;if(zt(i,n))return 1}}(t,n[e],r[e]):1:-1}if((n=n.node)===(r=r.node))return 0;if(n=Zt(t,n),r=Zt(t,r),n[0]!==r[0]){var s={node:n[0],G:null},u={node:r[0],G:null};return t=e.findIndex((function(e){return zt(e,s)})),n=e.findIndex((function(e){return zt(e,u)})),-1===t&&(t=e.push(s)),-1===n&&(n=e.push(u)),t-n}for(o=1,e=Math.min(n.length,r.length);o<e&&n[o]===r[o];++o);if(e=n[o],n=r[o],!e)return-1;if(!n)return 1;for(t=t.getChildNodes(r[o-1],null),r=0,o=t.length;r<o;++r){var l=t[r];if(l===e)return-1;if(l===n)return 1}}function en(e,t,n,r){var a=Z(n.type,47),i=Z(r.type,47);if(a&&!i){if(zt(n=Ue(t,n.value),r=r.value))return 1}else if(i&&!a){if(zt(n=n.value,r=Ue(t,r.value)))return-1}else if(a&&i){if(zt(Ue(t,r.value),Ue(t,n.value)))return n.value.node.localName>r.value.node.localName?1:-1;n=Ue(t,n.value),r=Ue(t,r.value)}else n=n.value,r=r.value;return $t(e,t,n,r)}function tn(e,t,n){return en(e.o,e,t,n)}function nn(e,t){return function e(t,n){if(n=void 0===n?rn:n,1>=t.length)return t;var r=Math.floor(t.length/2),a=e(t.slice(0,r),n);for(t=e(t.slice(r),n),r=[];a.length&&t.length;)0>n(a[0],t[0])?r.push(a.shift()):r.push(t.shift());return r.concat(a.concat(t))}(t,(function(t,n){return en(e.o,e,t,n)})).filter((function(e,t,n){return 0===t||!zt(e.value,n[t-1].value)}))}function rn(e,t){return e<t?-1:0}var an=e;function on(e,t,n,r,a){if(Z(e.type,t.type))return e;if(Z(t.type,46)&&Z(e.type,53)&&(e=Ot(e,n).first()),Z(e.type,t.type)||46===t.type)return e;if(Z(e.type,19)){if(!(n=Jt(e,t.type)))throw Error("XPTY0004 Unable to convert "+(a?"return":"argument")+" of type "+he[e.type]+" to type "+fe(t)+" while calling "+r);return n}if(!(n=function(e,t){if(Z(e.type,2)){if(Z(e.type,6))return 3===t?Y(e.value,3):null;if(Z(e.type,4)){if(6===t)return Y(e.value,6);if(3===t)return Y(e.value,3)}return null}return Z(e.type,20)&&1===t?Y(e.value,1):null}(e,t.type)))throw Error("XPTY0004 Unable to cast "+(a?"return":"argument")+" of type "+he[e.type]+" to type "+fe(t)+" while calling "+r);return n}function sn(e,t,n,r,a){return 0===e.g?t.aa({default:function(){return t.map((function(t){return on(t,e,n,r,a)}))},multiple:function(){throw Error("XPTY0004: Multiplicity of "+(a?"function return value":"function argument")+" of type "+he[e.type]+(e.type||"")+" for "+r+' is incorrect. Expected "?", but got "+".')}}):1===e.g?t.aa({empty:function(){throw Error("XPTY0004: Multiplicity of "+(a?"function return value":"function argument")+" of type "+he[e.type]+(e.type||"")+" for "+r+' is incorrect. Expected "+", but got "empty-sequence()"')},default:function(){return t.map((function(t){return on(t,e,n,r,a)}))}}):2===e.g?t.map((function(t){return on(t,e,n,r,a)})):t.aa({s:function(){return t.map((function(t){return on(t,e,n,r,a)}))},default:function(){throw Error("XPTY0004: Multiplicity of "+(a?"function return value":"function argument")+" of type "+he[e.type]+(e.type||"")+" for "+r+" is incorrect. Expected exactly one")}})}function un(e,t){return Z(e,5)?Y(t,5):Z(e,6)?Y(t,6):Z(e,3)?Y(t,3):Y(t,4)}function ln(e,t,n,r,a,i){var o=!1;return se.create({next:function(){if(o)return z;var t,n=a.first();if(!n)return o=!0,z;if((Z(n.type,6)||Z(n.type,3))&&(0===n.value||isNaN(n.value)||1/0===n.value||-1/0===n.value))return o=!0,W(n);if(t=i?i.first().value:0,o=!0,function(e){if(Math.floor(e)===e||isNaN(e))return 0;var t=(e=/\d+(?:\.(\d*))?(?:[Ee](-)?(\d+))*/.exec(e+""))[1]?e[1].length:0;return e[3]?e[2]?t+parseInt(e[3],10):0>(e=t-parseInt(e[3],10))?0:e:t}(n.value)<t)return W(n);var r=[5,4,3,6].find((function(e){return Z(n.type,e)}));switch(t=function(e,t,n){return t&&0==e*n%1%.5?0==Math.floor(e*n)%2?Math.floor(e*n)/n:Math.ceil(e*n)/n:Math.round(e*n)/n}(Jt(n,4).value,e,Math.pow(10,t)),r){case 4:return W(Y(t,4));case 3:return W(Y(t,3));case 6:return W(Y(t,6));case 5:return W(Y(t,5))}}})}function cn(e,t,n,r){return St(r,t).aa({empty:function(){return se.s(Y(NaN,3))},s:function(){var e=Qt(r.first(),3);return e.u?se.s(e.value):se.s(Y(NaN,3))},multiple:function(){throw Error("fn:number may only be called with zero or one values")}})}function hn(e,t,n,r){return r.F()?r:(e=r.S(),se.s(e[Math.floor(Math.random()*e.length)]))}var pn=[{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"abs",l:[{type:2,g:0}],j:{type:2,g:0},m:function(e,t,n,r){return r.map((function(e){return un(e.type,Math.abs(e.value))}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"ceiling",l:[{type:2,g:0}],j:{type:2,g:0},m:function(e,t,n,r){return r.map((function(e){return un(e.type,Math.ceil(e.value))}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"floor",l:[{type:2,g:0}],j:{type:2,g:0},m:function(e,t,n,r){return r.map((function(e){return un(e.type,Math.floor(e.value))}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"round",l:[{type:2,g:0}],j:{type:2,g:0},m:ln.bind(null,!1)},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"round",l:[{type:2,g:0},{type:5,g:3}],j:{type:2,g:0},m:ln.bind(null,!1)},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"round-half-to-even",l:[{type:2,g:0}],j:{type:2,g:0},m:ln.bind(null,!0)},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"round-half-to-even",l:[{type:2,g:0},{type:5,g:3}],j:{type:2,g:0},m:ln.bind(null,!0)},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"number",l:[{type:46,g:0}],j:{type:3,g:3},m:cn},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"number",l:[],j:{type:3,g:3},m:function(e,t,n){var r=e.O&&sn({type:46,g:0},se.s(e.O),t,"fn:number",!1);if(!r)throw Error("XPDY0002: fn:number needs an atomizable context item.");return cn(0,t,0,r)}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"random-number-generator",l:[],j:{type:61,g:3},m:function e(){return se.s(new qe([{key:Y("number",1),value:function(){return se.s(Y(Math.random(),3))}},{key:Y("next",1),value:function(){return se.s(new ge({value:e,Oa:!0,localName:"",namespaceURI:"",l:[],arity:0,j:{type:61,g:3}}))}},{key:Y("permute",1),value:function(){return se.s(new ge({value:hn,Oa:!0,localName:"",namespaceURI:"",l:[{type:59,g:2}],arity:1,j:{type:59,g:2}}))}}]))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"random-number-generator",l:[{type:46,g:0}],j:{type:61,g:3},m:function(){throw Error("Not implemented: Specifying a seed is not supported")}}];function fn(){throw Error("FOCH0002: No collations are supported")}function dn(e,t,n,r){if(null===t.O)throw Error("XPDY0002: The function which was called depends on dynamic context, which is absent.");return e(t,n,r,se.s(t.O))}function mn(e,t,n,r){return r.aa({empty:function(){return se.s(Y("",1))},default:function(){return r.map((function(e){if(Z(e.type,53)){var n=Ot(e,t).first();return Z(e.type,47)?Jt(n,1):n}return Jt(e,1)}))}})}function vn(e,t,n,r,a){return _e([a],(function(e){var n=u(e).next().value;return St(r,t).M((function(e){return e=e.map((function(e){return Jt(e,1).value})).join(n.value),se.s(Y(e,1))}))}))}function gn(e,t,n,r){return r.F()?se.s(Y(0,5)):(e=r.first().value,se.s(Y(Array.from(e).length,5)))}function yn(e,t,n,r,a,i){var o=ln(!1,0,0,0,a,null),s=null!==i?ln(!1,0,0,0,i,null):null,u=!1,l=null,c=null,h=null;return se.create({next:function(){return u?z:l||null!==(l=r.first())?(c||(c=o.first()),!h&&i&&(h=null,h=s.first()),u=!0,W(Y(Array.from(l.value).slice(Math.max(c.value-1,0),i?c.value+h.value-1:void 0).join(""),1))):(u=!0,W(Y("",1)))}})}function wn(e,t,n,r,a){if(r.F()||0===r.first().value.length)return se.empty();e=r.first().value,a=a.first().value;try{var i=new RegExp(a)}catch(e){throw Error("FORX0002: "+e)}return se.create(e.split(i).map((function(e){return Y(e,1)})))}function An(e,t,n,r){return r.F()?se.s(Y("",1)):(e=r.first().value.trim(),se.s(Y(e.replace(/\s+/g," "),1)))}var xn=new Map,bn=[{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"compare",l:[{type:1,g:0},{type:1,g:0}],j:{type:5,g:0},m:function(e,t,n,r,a){return r.F()||a.F()?se.empty():(e=r.first().value)>(a=a.first().value)?se.s(Y(1,5)):e<a?se.s(Y(-1,5)):se.s(Y(0,5))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"compare",l:[{type:1,g:0},{type:1,g:0},{type:1,g:3}],j:{type:5,g:0},m:fn},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"concat",l:[{type:46,g:0},{type:46,g:0},4],j:{type:1,g:3},m:function(e,t,n,r){for(var a=[],i=3;i<arguments.length;++i)a[i-3]=arguments[i];return _e(a=a.map((function(e){return St(e,t).M((function(e){return se.s(Y(e.map((function(e){return null===e?"":Jt(e,1).value})).join(""),1))}))})),(function(e){return se.s(Y(e.map((function(e){return e.value})).join(""),1))}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"contains",l:[{type:1,g:0},{type:1,g:0},{type:1,g:0}],j:{type:0,g:3},m:fn},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"contains",l:[{type:1,g:0},{type:1,g:0}],j:{type:0,g:3},m:function(e,t,n,r,a){return e=r.F()?"":r.first().value,0===(a=a.F()?"":a.first().value).length?se.$():0===e.length?se.U():e.includes(a)?se.$():se.U()}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"ends-with",l:[{type:1,g:0},{type:1,g:0}],j:{type:0,g:3},m:function(e,t,n,r,a){return 0===(e=a.F()?"":a.first().value).length?se.$():0===(r=r.F()?"":r.first().value).length?se.U():r.endsWith(e)?se.$():se.U()}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"ends-with",l:[{type:1,g:0},{type:1,g:0},{type:1,g:3}],j:{type:0,g:3},m:fn},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"normalize-space",l:[{type:1,g:0}],j:{type:1,g:3},m:An},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"normalize-space",l:[],j:{type:1,g:3},m:dn.bind(null,(function(e,t,n,r){return An(e,0,0,mn(0,t,0,r))}))},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"starts-with",l:[{type:1,g:0},{type:1,g:0}],j:{type:0,g:3},m:function(e,t,n,r,a){return 0===(e=a.F()?"":a.first().value).length?se.$():0===(r=r.F()?"":r.first().value).length?se.U():r.startsWith(e)?se.$():se.U()}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"starts-with",l:[{type:1,g:0},{type:1,g:0},{type:1,g:3}],j:{type:0,g:3},m:fn},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"string",l:[{type:59,g:0}],j:{type:1,g:3},m:mn},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"string",l:[],j:{type:1,g:3},m:dn.bind(null,mn)},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"substring-before",l:[{type:1,g:0},{type:1,g:0}],j:{type:1,g:3},m:function(e,t,n,r,a){return e=r.F()?"":r.first().value,""===(a=a.F()?"":a.first().value)||-1===(a=e.indexOf(a))?se.s(Y("",1)):se.s(Y(e.substring(0,a),1))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"substring-after",l:[{type:1,g:0},{type:1,g:0}],j:{type:1,g:3},m:function(e,t,n,r,a){return e=r.F()?"":r.first().value,""===(a=a.F()?"":a.first().value)?se.s(Y(e,1)):-1===(t=e.indexOf(a))?se.s(Y("",1)):se.s(Y(e.substring(t+a.length),1))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"substring",l:[{type:1,g:0},{type:3,g:3}],j:{type:1,g:3},m:yn},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"substring",l:[{type:1,g:0},{type:3,g:3},{type:3,g:3}],j:{type:1,g:3},m:yn},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"upper-case",l:[{type:1,g:0}],j:{type:1,g:3},m:function(e,t,n,r){return r.F()?se.s(Y("",1)):r.map((function(e){return Y(e.value.toUpperCase(),1)}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"lower-case",l:[{type:1,g:0}],j:{type:1,g:3},m:function(e,t,n,r){return r.F()?se.s(Y("",1)):r.map((function(e){return Y(e.value.toLowerCase(),1)}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"string-join",l:[{type:46,g:2},{type:1,g:3}],j:{type:1,g:3},m:vn},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"string-join",l:[{type:46,g:2}],j:{type:1,g:3},m:function(e,t,n,r){return vn(0,t,0,r,se.s(Y("",1)))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"string-length",l:[{type:1,g:0}],j:{type:5,g:3},m:gn},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"string-length",l:[],j:{type:5,g:3},m:dn.bind(null,(function(e,t,n,r){return gn(e,0,0,mn(0,t,0,r))}))},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"tokenize",l:[{type:1,g:0},{type:1,g:3},{type:1,g:3}],j:{type:1,g:2},m:function(){throw Error("Not implemented: Using flags in tokenize is not supported")}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"tokenize",l:[{type:1,g:0},{type:1,g:3}],j:{type:1,g:2},m:wn},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"tokenize",l:[{type:1,g:0}],j:{type:1,g:2},m:function(e,t,n,r){return wn(e,0,0,An(e,0,0,r),se.s(Y(" ",1)))}},{l:[{type:1,g:0},{type:1,g:3},{type:1,g:3}],m:function(e,t,n,r,a,i){return _e([r,a,i],(function(e){var t=u(e),n=t.next().value;e=t.next().value,t=t.next().value,n=Array.from(n?n.value:"");var r=Array.from(e.value),a=Array.from(t.value);return e=n.map((function(e){return r.includes(e)?(e=r.indexOf(e))<=a.length?a[e]:void 0:e})),se.s(Y(e.join(""),1))}))},localName:"translate",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:1,g:3}},{l:[{type:5,g:2}],m:function(e,t,n,r){return r.M((function(e){return e=e.map((function(e){if(9===(e=e.value)||10===e||13===e||32<=e&&55295>=e||57344<=e&&65533>=e||65536<=e&&1114111>=e)return String.fromCodePoint(e);throw Error("FOCH0001")})).join(""),se.s(Y(e,1))}))},localName:"codepoints-to-string",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:1,g:3}},{l:[{type:1,g:0}],m:function(e,t,n,r){return _e([r],(function(e){return 0===(e=(e=u(e).next().value)?e.value.split(""):[]).length?se.empty():se.create(e.map((function(e){return Y(e.codePointAt(0),5)})))}))},localName:"string-to-codepoints",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:5,g:2}},{l:[{type:1,g:0}],m:function(e,t,n,r){return _e([r],(function(e){return null===(e=u(e).next().value)||0===e.value.length?se.create(Y("",1)):se.create(Y(encodeURIComponent(e.value).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})),1))}))},localName:"encode-for-uri",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:1,g:3}},{l:[{type:1,g:0}],m:function(e,t,n,r){return _e([r],(function(e){return null===(e=u(e).next().value)||0===e.value.length?se.create(Y("",1)):se.create(Y(e.value.replace(/([\u00A0-\uD7FF\uE000-\uFDCF\uFDF0-\uFFEF "<>{}|\\^`/\n\u007f\u0080-\u009f]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,(function(e){return encodeURI(e)})),1))}))},localName:"iri-to-uri",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:1,g:3}},{l:[{type:1,g:0},{type:1,g:0}],m:function(e,t,n,r,a){return _e([r,a],(function(e){var t=u(e);if(e=t.next().value,t=t.next().value,null===e||null===t)return se.empty();if(e=e.value,t=t.value,e.length!==t.length)return se.U();e=e.split(""),t=t.split("");for(var n=0;n<e.length;n++)if(e[n].codePointAt(0)!==t[n].codePointAt(0))return se.U();return se.$()}))},localName:"codepoint-equal",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:0,g:0}},{l:[{type:1,g:0},{type:1,g:3}],m:function(e,t,n,r,a){return _e([r,a],(function(e){var t=(e=u(e)).next().value;e=e.next().value,t=t?t.value:"";var n=e.value,r=xn.get(n);if(!r)try{r=an.compile(e.value,{language:"xpath"}),xn.set(n,r)}catch(e){throw Error("FORX0002: "+e)}return r(t)?se.$():se.U()}))},localName:"matches",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:0,g:3}}];function En(e,t,n,r){if(null===t.O)throw Error("XPDY0002: The function which was called depends on dynamic context, which is absent.");return e(t,n,r,se.s(t.O))}function Bn(e,t,n,r){return _e([r],(function(e){if(null===(e=u(e).next().value))return se.empty();switch((e=e.value).node.nodeType){case 1:case 2:return se.s(Y(new ve(e.node.prefix,e.node.namespaceURI,e.node.localName),23));case 7:return se.s(Y(new ve("","",e.node.target),23));default:return se.empty()}}))}function Nn(e,t,n,r){return r.aa({default:function(){return mn(0,t,0,Bn(0,0,0,r))},empty:function(){return se.empty()}})}function Cn(e,t,n,r){return St(r,t)}function Tn(e,t,n,r){return _e([r],(function(e){return null!==(e=(e=u(e).next().value)?e.value:null)&&De(t.h,e,null)?se.$():se.U()}))}function In(e,t,n,r){return _e([r],(function(e){function n(e){for(var t=0,n=e;null!==n;)(e.node.nodeType!==n.node.nodeType?0:1===n.node.nodeType?n.node.localName===e.node.localName&&n.node.namespaceURI===e.node.namespaceURI:7===n.node.nodeType?n.node.target===e.node.target:1)&&t++,n=Fe(a,n,null);return t}var r=u(e).next().value;if(null===r)return se.empty();var a=t.h;for(e="",r=r.value;null!==Ue(t.h,r,null);r=Ue(t.h,r,null))switch(r.node.nodeType){case 1:var i=r;e="/Q{"+(i.node.namespaceURI||"")+"}"+i.node.localName+"["+n(i)+"]"+e;break;case 2:e="/@"+((i=r).node.namespaceURI?"Q{"+i.node.namespaceURI+"}":"")+i.node.localName+e;break;case 3:e="/text()["+n(r)+"]"+e;break;case 7:e="/processing-instruction("+(i=r).node.target+")["+n(i)+"]"+e;break;case 8:e="/comment()["+n(r)+"]"+e}return 9===r.node.nodeType?se.create(Y(e||"/",1)):se.create(Y("Q{http://www.w3.org/2005/xpath-functions}root()"+e,1))}))}function On(e,t,n,r){return r.map((function(e){return Y(e.value.node.namespaceURI||"",20)}))}function Sn(e,t,n,r){return r.aa({default:function(){return r.map((function(e){return 7===e.value.node.nodeType?Y(e.value.node.target,1):Y(e.value.node.localName||"",1)}))},empty:function(){return se.s(Y("",1))}})}function Rn(e,t,n){if(2===t.node.nodeType)return zt(t,n);for(;n;){if(zt(t,n))return!0;if(9===n.node.nodeType)break;n=Ue(e,n,null)}return!1}function Dn(e,t,n,r){return r.map((function(e){if(!Z(e.type,53))throw Error("XPTY0004 Argument passed to fn:root() should be of the type node()");for(e=e.value;e;){var n=e;e=Ue(t.h,n,null)}return Xe(n)}))}var Mn=[{l:[{type:53,g:0}],m:Nn,localName:"name",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:1,g:0}},{l:[],m:En.bind(null,Nn),localName:"name",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:1,g:3}},{l:[{type:53,g:3}],m:On,localName:"namespace-uri",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:20,g:3}},{l:[],m:En.bind(null,On),localName:"namespace-uri",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:20,g:3}},{l:[{type:53,g:2}],m:function(e,t,n,r){return r.M((function(e){return e.length?(e=nn(t.h,e).reduceRight((function(e,n,r,a){return r===a.length-1?(e.push(n),e):(Rn(t.h,n.value,e[0].value)||e.unshift(n),e)}),[]),se.create(e)):se.empty()}))},localName:"innermost",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:53,g:2}},{l:[{type:53,g:2}],m:function(e,t,n,r){return r.M((function(e){return e.length?(e=nn(t.h,e).reduce((function(e,n,r){return 0===r?(e.push(n),e):(Rn(t.h,e[e.length-1].value,n.value)||e.push(n),e)}),[]),se.create(e)):se.empty()}),1)},localName:"outermost",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:53,g:2}},{l:[{type:53,g:0}],m:Tn,localName:"has-children",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:0,g:3}},{l:[],m:En.bind(null,Tn),localName:"has-children",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:0,g:3}},{l:[{type:53,g:0}],m:In,localName:"path",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:1,g:0}},{l:[],m:En.bind(null,In),localName:"path",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:1,g:0}},{l:[{type:53,g:0}],m:Bn,localName:"node-name",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:23,g:0}},{l:[],m:En.bind(null,Bn),localName:"node-name",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:23,g:0}},{l:[{type:53,g:0}],m:Sn,localName:"local-name",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:1,g:3}},{l:[],m:En.bind(null,Sn),localName:"local-name",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:1,g:3}},{l:[{type:53,g:0}],m:Dn,localName:"root",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:53,g:0}},{l:[],m:En.bind(null,Dn),localName:"root",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:53,g:0}},{l:[],m:En.bind(null,Cn),localName:"data",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:46,g:2}},{l:[{type:59,g:2}],m:Cn,localName:"data",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:46,g:2}}];function Gn(e,t){var n=0,r=e.length,a=!1,i=null;return{next:function(){if(!a){for(;n<r;){i||(i=t(e[n],n,e));var o=i.next(0);if(i=null,!o.value)return W(!1);n++}return a=!0,W(!0)}return z}}}function Un(e){return 1===(e=e.node.nodeType)||3===e}function Fn(e,t){if((Z(e.type,4)||Z(e.type,6))&&(Z(t.type,4)||Z(t.type,6))){var n=Jt(e,6),r=Jt(t,6);return n.value===r.value||isNaN(e.value)&&isNaN(t.value)}return(Z(e.type,4)||Z(e.type,6)||Z(e.type,3))&&(Z(t.type,4)||Z(t.type,6)||Z(t.type,3))?(n=Jt(e,3),r=Jt(t,3),n.value===r.value||isNaN(e.value)&&isNaN(t.value)):Z(e.type,23)&&Z(t.type,23)?e.value.namespaceURI===t.value.namespaceURI&&e.value.localName===t.value.localName:(Z(e.type,9)||Z(e.type,7)||Z(e.type,8)||Z(e.type,11)||Z(e.type,12)||Z(e.type,13)||Z(e.type,14)||Z(e.type,15))&&(Z(t.type,9)||Z(t.type,7)||Z(t.type,8)||Z(t.type,11)||Z(t.type,12)||Z(t.type,13)||Z(t.type,14)||Z(t.type,15))?lt(e.value,t.value):e.value===t.value}function Pn(e,t,n){return n=u([t,n].map((function(t){return{type:1,value:t.reduce((function(t,n){return t+Ot(n,e).first().value}),"")}}))),W(Fn(t=n.next().value,n=n.next().value))}function Hn(e,t,n,r){for(;e.value&&Z(e.value.type,56);){t.push(e.value);var a=Ge(r,e.value.value);if(e=n.next(0),a&&3!==a.node.nodeType)break}return e}function jn(e,t,n,r,a){var i,o=t.h,s=r.value,u=a.value,l=null,c=null,h=null,p=[],f=[];return{next:function(){for(;!i;)if(l||(l=s.next(0)),l=Hn(l,p,s,o),c||(c=u.next(0)),c=Hn(c,f,u,o),p.length||f.length){var r=Pn(t,p,f);if(p.length=0,f.length=0,!1===r.value)return i=!0,r}else{if(l.done||c.done)return i=!0,W(l.done===c.done);if(h||(h=_n(e,t,n,l.value,c.value)),r=h.next(0),h=null,!1===r.value)return i=!0,r;c=l=null}return z}}}function Xn(e,t,n,r,a){return r=Se(t.h,r.value),a=Se(t.h,a.value),r=r.filter((function(e){return Un(e)})),a=a.filter((function(e){return Un(e)})),jn(e,t,n,r=se.create(r.map((function(e){return Xe(e)}))),a=se.create(a.map((function(e){return Xe(e)}))))}function _n(e,t,n,r,a){if(Z(r.type,46)&&Z(a.type,46))return Kt(Fn(r,a));if(Z(r.type,61)&&Z(a.type,61))return function(e,t,n,r,a){return r.h.length!==a.h.length?Kt(!1):Gn(r.h,(function(r){var i=a.h.find((function(e){return Fn(e.key,r.key)}));return i?jn(e,t,n,r.value(),i.value()):Kt(!1)}))}(e,t,n,r,a);if(Z(r.type,62)&&Z(a.type,62))return function(e,t,n,r,a){return r.R.length!==a.R.length?Kt(!1):Gn(r.R,(function(r,i){return i=a.R[i],jn(e,t,n,r(),i())}))}(e,t,n,r,a);if(Z(r.type,53)&&Z(a.type,53)){if(Z(r.type,55)&&Z(a.type,55))return Xn(e,t,n,r,a);if(Z(r.type,54)&&Z(a.type,54))return function(e,t,n,r,a){var i=jn(e,t,n,Bn(0,0,0,se.s(r)),Bn(0,0,0,se.s(a))),o=Xn(e,t,n,r,a);r=Ie(t.h,r.value).filter((function(e){return"http://www.w3.org/2000/xmlns/"!==e.node.namespaceURI})).sort((function(e,t){return e.node.nodeName>t.node.nodeName?1:-1})).map((function(e){return Xe(e)})),a=Ie(t.h,a.value).filter((function(e){return"http://www.w3.org/2000/xmlns/"!==e.node.namespaceURI})).sort((function(e,t){return e.node.nodeName>t.node.nodeName?1:-1})).map((function(e){return Xe(e)}));var s=jn(e,t,n,se.create(r),se.create(a)),u=!1;return{next:function(){if(u)return z;var e=i.next(0);return(e.done||!1!==e.value)&&((e=s.next(0)).done||!1!==e.value)?(e=o.next(0),u=!0,e):(u=!0,e)}}}(e,t,n,r,a);if(Z(r.type,47)&&Z(a.type,47)||Z(r.type,57)&&Z(a.type,57)||Z(r.type,58)&&Z(a.type,58))return function(e,t,n,r,a){var i=jn(e,t,n,Bn(0,0,0,se.s(r)),Bn(0,0,0,se.s(a))),o=!1;return{next:function(){if(o)return z;var e=i.next(0);return e.done||!1!==e.value?W(Fn(Ot(r,t).first(),Ot(a,t).first())):(o=!0,e)}}}(e,t,n,r,a)}return Kt(!1)}function Ln(e){return Error("XUST0001: "+(void 0===e?"Can not execute an updating expression in a non-updating context.":e))}function kn(e){return Error("XUTY0004: The attribute "+e.name+'="'+e.value+'" follows a node that is not an attribute node.')}function qn(){return Error("XUTY0005: The target of a insert expression with into must be a single element or document node.")}function Yn(){return Error("XUTY0006: The target of a insert expression with before or after must be a single element, text, comment, or processing instruction node.")}function Vn(){return Error("XUTY0008: The target of a replace expression must be a single element, attribute, text, comment, or processing instruction node.")}function Qn(){return Error("XUTY0012: The target of a rename expression must be a single element, attribute, or processing instruction node.")}function Jn(e){return Error("XUDY0017: The target "+e.outerHTML+" is used in more than one replace value of expression.")}function Kn(e){return Error("XUDY0021: Applying the updates will result in the XDM instance violating constraint: '"+e+"'")}function zn(e){return Error("XUDY0023: The namespace binding "+e+" is conflicting.")}function Wn(e){return Error("XUDY0024: The namespace binding "+e+" is conflicting.")}function Zn(){return Error("XUDY0027: The target for an insert, replace, or rename expression expression should not be empty.")}function $n(e,t,n,r,a){n=void 0===n?{A:!1,Z:!1,T:"unsorted",subtree:!1}:n,this.K=e,this.B=n.T||"unsorted",this.subtree=!!n.subtree,this.Z=!!n.Z,this.A=!!n.A,this.J=t,this.I=!1,this.Ya=null,this.wb=void 0!==r&&r,this.type=a}function er(e,t,n){return t&&null!==t.O&&e.A?(null===e.Ya&&(e.Ya=ue(e.evaluate(null,n).pb())),e=e.Ya()):e=e.evaluate(t,n),e}function tr(e,t){this.H=e,this.fa=t}function nr(e){e&&"nodeType"in e&&("function"==typeof(e=e.ownerDocument||e).createElementNS&&"function"==typeof e.createProcessingInstruction&&"function"==typeof e.createTextNode&&"function"==typeof e.createComment&&(this.h=e)),this.h||(this.h=null)}function rr(e,t,n){t.forEach((function(t){n.insertBefore(e.node,t.node,null)}))}function ar(e,t,n,r){var a=Ue(n,e),i=e.node.nodeType;if(2===i){if(t.some((function(e){return 2!==e.node.nodeType})))throw Error('Constraint "If $target is an attribute node, $replacement must consist of zero or more attribute nodes." failed.');var o=a?a.node:null;r.removeAttributeNS(o,e.node.namespaceURI,e.node.nodeName),t.forEach((function(e){var t=e.node.nodeName;if(Oe(n,a,t))throw Kn("An attribute "+t+" already exists.");r.setAttributeNS(o,e.node.namespaceURI,t,Re(n,e))}))}if(1===i||3===i||8===i||7===i){var s=(i=Ge(n,e))?i.node:null;r.removeChild(a.node,e.node),t.forEach((function(e){r.insertBefore(a.node,e.node,s)}))}}function ir(e,t,n,r){if(function(e,t){function n(e){return new ve(e.node.prefix,e.node.namespaceURI,e.node.localName)}function r(t,n){var r=new Set;e.filter((function(e){return e.type===t})).map((function(e){return e.target})).forEach((function(e){e=e?e.node:null,r.has(e)&&n(e),r.add(e)}))}r("rename",(function(e){throw Error("XUDY0015: The target "+e.outerHTML+" is used in more than one rename expression.")})),r("replaceNode",(function(e){throw Error("XUDY0016: The target "+e.outerHTML+" is used in more than one replace expression.")})),r("replaceValue",(function(e){throw Jn(e)})),r("replaceElementContent",(function(e){throw Jn(e)}));var a=new Map;e.filter((function(e){return"replaceNode"===e.type&&2===e.target.node.nodeType})).forEach((function(e){var r=Ue(t,e.target);r=r?r.node:null;var i=a.get(r);i?i.push.apply(i,c(e.o.map(n))):a.set(r,e.o.map(n))})),e.filter((function(e){return"rename"===e.type&&2===e.target.node.nodeType})).forEach((function(e){var n=Ue(t,e.target);if(n){n=n.node;var r=a.get(n);r?r.push(e.o):a.set(n,[e.o])}})),a.forEach((function(e){var t={};e.forEach((function(e){if(t[e.prefix]||(t[e.prefix]=e.namespaceURI),t[e.prefix]!==e.namespaceURI)throw Wn(e.namespaceURI)}))}))}(e,t),e.filter((function(e){return-1!==["insertInto","insertAttributes","replaceValue","rename"].indexOf(e.type)})).forEach((function(e){switch(e.type){case"insertInto":rr(e.target,e.content,r);break;case"insertAttributes":!function(e,t,n,r){t.forEach((function(t){var a=t.node.nodeName;if(Oe(n,e,a))throw Kn("An attribute "+a+" already exists.");r.setAttributeNS(e.node,t.node.namespaceURI,a,Re(n,t))}))}(e.target,e.content,t,r);break;case"rename":!function(e,t,n,r,a){switch(r||(r=new nr(e?e.node:null)),e.node.nodeType){case 1:var i=n.getAllAttributes(e.node),o=n.getChildNodes(e.node),s=r.createElementNS(t.namespaceURI,t.va()),u={node:s,G:null};i.forEach((function(e){a.setAttributeNS(s,e.namespaceURI,e.nodeName,e.value)})),o.forEach((function(e){a.insertBefore(s,e,null)}));break;case 2:(t=r.createAttributeNS(t.namespaceURI,t.va())).value=Re(n,e),u={node:t,G:null};break;case 7:u={node:r.createProcessingInstruction(t.va(),Re(n,e)),G:null}}if(!Ue(n,e))throw Error("Not supported: renaming detached nodes.");ar(e,[u],n,a)}(e.target,e.o,t,n,r);break;case"replaceValue":var a=e.target;if(e=e.o,2===a.node.nodeType){var i=Ue(t,a);i?r.setAttributeNS(i.node,a.node.namespaceURI,a.node.nodeName,e):a.node.value=e}else r.setData(a.node,e)}})),e.filter((function(e){return-1!==["insertBefore","insertAfter","insertIntoAsFirst","insertIntoAsLast"].indexOf(e.type)})).forEach((function(e){switch(e.type){case"insertAfter":!function(e,t,n,r){var a=Ue(n,e).node,i=(e=Ge(n,e))?e.node:null;t.forEach((function(e){r.insertBefore(a,e.node,i)}))}(e.target,e.content,t,r);break;case"insertBefore":!function(e,t,n,r){var a=Ue(n,e).node;t.forEach((function(t){r.insertBefore(a,t.node,e.node)}))}(e.target,e.content,t,r);break;case"insertIntoAsFirst":!function(e,t,n,r){var a=(n=De(n,e))?n.node:null;t.forEach((function(t){r.insertBefore(e.node,t.node,a)}))}(e.target,e.content,t,r);break;case"insertIntoAsLast":rr(e.target,e.content,r)}})),e.filter((function(e){return"replaceNode"===e.type})).forEach((function(e){ar(e.target,e.o,t,r)})),e.filter((function(e){return"replaceElementContent"===e.type})).forEach((function(e){!function(e,t,n,r){n.getChildNodes(e.node).forEach((function(t){return r.removeChild(e.node,t)})),t&&r.insertBefore(e.node,t.node,null)}(e.target,e.text,t,r)})),e.filter((function(e){return"delete"===e.type})).forEach((function(e){e=e.target;var n=Ue(t,e);(n=n?n.node:null)&&(2===e.node.nodeType?r.removeAttributeNS(n,e.node.namespaceURI,e.node.nodeName):r.removeChild(n,e.node))})),e.some((function(e){return"put"===e.type})))throw Error('Not implemented: the execution for pendingUpdate "put" is not yet implemented.')}function or(e,t){for(var n=[],r=1;r<arguments.length;++r)n[r-1]=arguments[r];return e.concat.apply(e,c(n.filter(Boolean)))}function sr(e,t,n,r){$n.call(this,e,t,n,!0,r),this.I=!0}function ur(e){return e.I?function(t,n){return e.o(t,n)}:function(t,n){var r=e.evaluate(t,n);return{next:function(){return W({fa:[],H:r.S()})}}}}function lr(e,t){return t((e=e.next(0)).value.fa),se.create(e.value.H)}function cr(e,t,n,r){sr.call(this,e,t,n,r),this.I=this.J.some((function(e){return e.I}))}$n.prototype.Y=function(){return null},$n.prototype.P=function(e){if(this.J.forEach((function(t){return t.P(e)})),!this.wb&&this.J.some((function(e){return e.I})))throw Ln()},(n=nr.prototype).createAttributeNS=function(e,t){if(!this.h)throw Error("Please pass a node factory if an XQuery script uses node constructors");return this.h.createAttributeNS(e,t)},n.createCDATASection=function(e){if(!this.h)throw Error("Please pass a node factory if an XQuery script uses node constructors");return this.h.createCDATASection(e)},n.createComment=function(e){if(!this.h)throw Error("Please pass a node factory if an XQuery script uses node constructors");return this.h.createComment(e)},n.createDocument=function(){if(!this.h)throw Error("Please pass a node factory if an XQuery script uses node constructors");return this.h.implementation.createDocument(null,null,null)},n.createElementNS=function(e,t){if(!this.h)throw Error("Please pass a node factory if an XQuery script uses node constructors");return this.h.createElementNS(e,t)},n.createProcessingInstruction=function(e,t){if(!this.h)throw Error("Please pass a node factory if an XQuery script uses node constructors");return this.h.createProcessingInstruction(e,t)},n.createTextNode=function(e){if(!this.h)throw Error("Please pass a node factory if an XQuery script uses node constructors");return this.h.createTextNode(e)},v(sr,$n),sr.prototype.evaluate=function(){throw Ln()},v(cr,sr),cr.prototype.evaluate=function(e,t){return this.v(e,t,this.J.map((function(e){return function(n){return e.evaluate(n,t)}})))},cr.prototype.o=function(e,t){var n=[],r=this.v(e,t,this.J.map((function(e){return e.I?function(r){return lr(r=e.o(r,t),(function(e){return n=or(n,e)}))}:function(n){return e.evaluate(n,t)}}))),a=!1;return{next:function(){if(a)return z;var e=r.S();return a=!0,W(new tr(e,n))}}},cr.prototype.P=function(e){sr.prototype.P.call(this,e),function(e){e.J.some((function(e){return e.I}))&&(e.I=!0)}(this)};var hr=["external","attribute","nodeName","nodeType","universal"],pr=hr.length;function fr(e){if(this.h=hr.map((function(t){return e[t]||0})),Object.keys(e).some((function(e){return!hr.includes(e)})))throw Error("Invalid specificity kind passed")}function dr(e,t){for(var n=0;n<pr;++n){if(t.h[n]<e.h[n])return 1;if(t.h[n]>e.h[n])return-1}return 0}function mr(){return Ct("Expected base expression of a function call to evaluate to a sequence of single function item")}function vr(e,t,n,r){for(var a=[],i=0;i<t.length;++i)if(null===t[i])a.push(null);else{var o=sn(e[i],t[i],n,r,!1);a.push(o)}return a}function gr(e,t){if(!Z(e.type,60))throw Ct("Expected base expression to evaluate to a function item");if(e.B!==t)throw mr();return e}function yr(e,t,n,r,a,i,o){var s=0;return a=a.map((function(e){return e?null:i[s++](n)})),0<=(a=vr(e.o,a,r,e.J)).indexOf(null)?function(e,t){var n=e.value,r=t.map((function(e){return null===e?null:ue(e)}));return t=new ge({l:t=t.reduce((function(t,n,r){return null===n&&t.push(e.o[r]),t}),[]),arity:t.length,Oa:!0,I:e.I,localName:"boundFunction",namespaceURI:e.v,j:e.C,value:function(e,t,a){var i=Array.from(arguments).slice(3),o=r.map((function(e){return null===e?i.shift():e()}));return n.apply(void 0,[e,t,a].concat(o))}}),se.s(t)}(e,a):(t=t.apply(void 0,[n,r,o].concat(c(a))),sn(e.C,t,r,e.J,!0))}function wr(e,t,n){var r={};cr.call(this,new fr((r.external=1,r)),[e].concat(t.filter((function(e){return!!e}))),{T:"unsorted",Z:!1,subtree:!1,A:!1},n),this.ka=t.length,this.N=t.map((function(e){return null===e})),this.C=null,this.na=e,this.ua=t}function Ar(e,t,n,r,a,i){return _e([r,a,i],(function(e){var t=u(e);e=t.next().value;var n=t.next().value;if(t=t.next().value,n=n.value,t=t.value,n>e.R.length||0>=n)throw Error("FOAY0001: subarray start out of bounds.");if(0>t)throw Error("FOAY0002: subarray length out of bounds.");if(n+t>e.R.length+1)throw Error("FOAY0001: subarray start + length out of bounds.");return se.s(new He(e.R.slice(n-1,t+n-1)))}))}function xr(e,t,n,r,a){return _e([r],(function(e){var t=u(e).next().value;return a.M((function(e){e=e.map((function(e){return e.value})).sort((function(e,t){return t-e})).filter((function(e,t,n){return n[t-1]!==e}));for(var n=t.R.concat(),r=0,a=e.length;r<a;++r){var i=e[r];if(i>t.R.length||0>=i)throw Error("FOAY0001: subarray position out of bounds.");n.splice(i-1,1)}return se.s(new He(n))}))}))}function br(e){return Z(e,1)||Z(e,20)||Z(e,19)}function Er(e,t,n,r){return r.sort((function(r,a){return jn(e,t,n,se.create(r),se.create(a)).next(0).value?0:function e(t,n,r,a,i){return 0===a.length?0!==i.length:0!==i.length&&_n(t,n,r,a[0],i[0]).next(0).value?e(t,n,r,a.slice(1),i.slice(1)):a[0].value!=a[0].value||(br(a[0].type)&&0!==i.length&&br(i[0].type)||0!==i.length)&&a[0].value<i[0].value}(e,t,n,r,a)?-1:1})),se.s(new He(r.map((function(e){return function(){return se.create(e)}}))))}function Br(e,t){return Z(t.type,62)?t.R.reduce((function(e,t){return t().M((function(t){return t.reduce(Br,e)}))}),e):Bt([e,se.s(t)])}fr.prototype.add=function(e){var t=this;return new fr(hr.reduce((function(n,r,a){return n[r]=t.h[a]+e.h[a],n}),Object.create(null)))},v(wr,cr),wr.prototype.o=function(e,t){var n=this;if(!this.h||!this.h.I)return cr.prototype.o.call(this,e,t);var r=[],a=yr(this.h,(function(e,t,a,i){for(var o=[],s=3;s<arguments.length;++s)o[s-3]=arguments[s];return lr(n.h.value.apply(n.h,[e,t,a].concat(c(o))),(function(e){r=or(r,e)}))}),e,t,this.N,this.ua.map((function(n){return function(){return n.I?lr(n.o(e,t),(function(e){r=or(r,e)})):er(n,e,t)}})),this.C),i=!1;return{next:function(){if(i)return z;var e=a.S();return i=!0,W({fa:r,H:e})}}},wr.prototype.v=function(e,t,n){var r=this,a=(n=u(n)).next().value,i=l(n);if(this.h)return yr(this.h,(function(e,t,n,a){for(var i=[],o=3;o<arguments.length;++o)i[o-3]=arguments[o];return r.h.value.apply(r.h,[e,t,n].concat(c(i)))}),e,t,this.N,i,this.C);var o=a(e);return o.aa({default:function(){throw mr()},s:function(){return o.M((function(n){if((n=gr(n=u(n).next().value,r.ka)).I)throw Error("XUDY0038: The function returned by the PrimaryExpr of a dynamic function invocation can not be an updating function");return yr(n,n.value,e,t,r.N,i,r.C)}))}})},wr.prototype.P=function(e){if(this.C=Po(e),cr.prototype.P.call(this,e),this.na.A){if(!(e=er(this.na,null,null)).za())throw mr();this.h=gr(e.first(),this.ka),this.h.I&&(this.I=!0)}};var Nr=[{namespaceURI:"http://www.w3.org/2005/xpath-functions/array",localName:"size",l:[{type:62,g:3}],j:{type:5,g:3},m:function(e,t,n,r){return _e([r],(function(e){return e=u(e).next().value,se.s(Y(e.R.length,5))}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/array",localName:"get",l:[{type:62,g:3},{type:5,g:3}],j:{type:59,g:2},m:Pe},{namespaceURI:"http://www.w3.org/2005/xpath-functions/array",localName:"put",l:[{type:62,g:3},{type:5,g:3},{type:59,g:2}],j:{type:62,g:3},m:function(e,t,n,r,a,i){return _e([a,r],(function(e){var t=u(e);if(e=t.next().value,t=t.next().value,0>=(e=e.value)||e>t.R.length)throw Error("FOAY0001: array position out of bounds.");return(t=t.R.concat()).splice(e-1,1,ue(i)),se.s(new He(t))}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/array",localName:"append",l:[{type:62,g:3},{type:59,g:2}],j:{type:62,g:3},m:function(e,t,n,r,a){return _e([r],(function(e){return e=u(e).next().value.R.concat([ue(a)]),se.s(new He(e))}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/array",localName:"subarray",l:[{type:62,g:3},{type:5,g:3},{type:5,g:3}],j:{type:62,g:3},m:Ar},{namespaceURI:"http://www.w3.org/2005/xpath-functions/array",localName:"subarray",l:[{type:62,g:3},{type:5,g:3}],j:{type:62,g:3},m:function(e,t,n,r,a){var i=se.s(Y(r.first().value.length-a.first().value+1,5));return Ar(0,0,0,r,a,i)}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/array",localName:"remove",l:[{type:62,g:3},{type:5,g:2}],j:{type:62,g:3},m:xr},{namespaceURI:"http://www.w3.org/2005/xpath-functions/array",localName:"insert-before",l:[{type:62,g:3},{type:5,g:3},{type:59,g:2}],j:{type:62,g:3},m:function(e,t,n,r,a,i){return _e([r,a],(function(e){var t=u(e);if(e=t.next().value,(t=t.next().value.value)>e.R.length+1||0>=t)throw Error("FOAY0001: subarray position out of bounds.");return(e=e.R.concat()).splice(t-1,0,ue(i)),se.s(new He(e))}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/array",localName:"head",l:[{type:62,g:3}],j:{type:59,g:2},m:function(e,t,n,r){return Pe(0,0,0,r,se.s(Y(1,5)))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/array",localName:"tail",l:[{type:62,g:3}],j:{type:59,g:2},m:function(e,t,n,r){return xr(0,0,0,r,se.s(Y(1,5)))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/array",localName:"reverse",l:[{type:62,g:3}],j:{type:62,g:3},m:function(e,t,n,r){return _e([r],(function(e){return e=u(e).next().value,se.s(new He(e.R.concat().reverse()))}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/array",localName:"join",l:[{type:62,g:2}],j:{type:62,g:3},m:function(e,t,n,r){return r.M((function(e){return e=e.reduce((function(e,t){return e.concat(t.R)}),[]),se.s(new He(e))}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/array",localName:"for-each",l:[{type:62,g:3},{type:60,g:3}],j:{type:62,g:3},m:function(e,t,n,r,a){return _e([r,a],(function(r){var a=(r=u(r)).next().value,i=r.next().value;if(1!==i.B)throw Ct("The callback passed into array:for-each has a wrong arity.");return r=a.R.map((function(r){return ue(i.value.call(void 0,e,t,n,vr(i.o,[r()],t,"array:for-each")[0]))})),se.s(new He(r))}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/array",localName:"filter",l:[{type:62,g:3},{type:60,g:3}],j:{type:62,g:3},m:function(e,t,n,r,a){return _e([r,a],(function(r){var a=(r=u(r)).next().value,i=r.next().value;if(1!==i.B)throw Ct("The callback passed into array:filter has a wrong arity.");var o=a.R.map((function(r){return r=vr(i.o,[r()],t,"array:filter")[0],(0,i.value)(e,t,n,r)})),s=[],l=!1;return se.create({next:function(){if(l)return z;for(var e=0,t=a.R.length;e<t;++e){var n=o[e].getEffectiveBooleanValue();s[e]=n}return e=a.R.filter((function(e,t){return s[t]})),l=!0,W(new He(e))}})}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/array",localName:"fold-left",l:[{type:62,g:3},{type:59,g:2},{type:60,g:3}],j:{type:59,g:2},m:function(e,t,n,r,a,i){return _e([r,i],(function(r){var i=(r=u(r)).next().value,o=r.next().value;if(2!==o.B)throw Ct("The callback passed into array:fold-left has a wrong arity.");return i.R.reduce((function(r,a){return a=vr(o.o,[a()],t,"array:fold-left")[0],o.value.call(void 0,e,t,n,r,a)}),a)}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/array",localName:"fold-right",l:[{type:62,g:3},{type:59,g:2},{type:60,g:3}],j:{type:59,g:2},m:function(e,t,n,r,a,i){return _e([r,i],(function(r){var i=(r=u(r)).next().value,o=r.next().value;if(2!==o.B)throw Ct("The callback passed into array:fold-right has a wrong arity.");return i.R.reduceRight((function(r,a){return a=vr(o.o,[a()],t,"array:fold-right")[0],o.value.call(void 0,e,t,n,r,a)}),a)}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/array",localName:"for-each-pair",l:[{type:62,g:3},{type:62,g:3},{type:60,g:3}],j:{type:62,g:3},m:function(e,t,n,r,a,i){return _e([r,a,i],(function(r){var a=u(r);r=a.next().value;var i=a.next().value;if(2!==(a=a.next().value).B)throw Ct("The callback passed into array:for-each-pair has a wrong arity.");for(var o=[],s=0,l=Math.min(r.R.length,i.R.length);s<l;++s){var c=u(vr(a.o,[r.R[s](),i.R[s]()],t,"array:for-each-pair")),h=c.next().value;c=c.next().value,o[s]=ue(a.value.call(void 0,e,t,n,h,c))}return se.s(new He(o))}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/array",localName:"sort",l:[{type:62,g:3}],j:{type:62,g:3},m:function(e,t,n,r){return _e([r],(function(r){return r=u(r).next().value.R.map((function(e){return e().S()})),Er(e,t,n,r)}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/array",localName:"flatten",l:[{type:59,g:2}],j:{type:59,g:2},m:function(e,t,n,r){return r.M((function(e){return e.reduce(Br,se.empty())}))}}];function Cr(e,t,n,r,a){return a.F()?a:se.s(Jt(a.first(),e))}var Tr=[{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"untypedAtomic",l:[{type:46,g:0}],j:{type:19,g:0},m:Cr.bind(null,19)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"error",l:[{type:46,g:0}],j:{type:39,g:0},m:Cr.bind(null,39)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"string",l:[{type:46,g:0}],j:{type:1,g:0},m:Cr.bind(null,1)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"boolean",l:[{type:46,g:0}],j:{type:0,g:0},m:Cr.bind(null,0)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"decimal",l:[{type:46,g:0}],j:{type:4,g:0},m:Cr.bind(null,4)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"float",l:[{type:46,g:0}],j:{type:6,g:0},m:Cr.bind(null,6)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"double",l:[{type:46,g:0}],j:{type:3,g:0},m:Cr.bind(null,3)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"duration",l:[{type:46,g:0}],j:{type:18,g:0},m:Cr.bind(null,18)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"dateTime",l:[{type:46,g:0}],j:{type:9,g:0},m:Cr.bind(null,9)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"dateTimeStamp",l:[{type:46,g:0}],j:{type:10,g:0},m:Cr.bind(null,10)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"time",l:[{type:46,g:0}],j:{type:8,g:0},m:Cr.bind(null,8)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"date",l:[{type:46,g:0}],j:{type:7,g:0},m:Cr.bind(null,7)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"gYearMonth",l:[{type:46,g:0}],j:{type:11,g:0},m:Cr.bind(null,11)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"gYear",l:[{type:46,g:0}],j:{type:12,g:0},m:Cr.bind(null,12)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"gMonthDay",l:[{type:46,g:0}],j:{type:13,g:0},m:Cr.bind(null,13)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"gDay",l:[{type:46,g:0}],j:{type:15,g:0},m:Cr.bind(null,15)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"gMonth",l:[{type:46,g:0}],j:{type:14,g:0},m:Cr.bind(null,14)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"hexBinary",l:[{type:46,g:0}],j:{type:22,g:0},m:Cr.bind(null,22)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"base64Binary",l:[{type:46,g:0}],j:{type:21,g:0},m:Cr.bind(null,21)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"QName",l:[{type:46,g:0}],j:{type:23,g:0},m:function(e,t,n,r){if(r.F())return r;if(Z((e=r.first()).type,2))throw Error("XPTY0004: The provided QName is not a string-like value.");if(!Mt(e=Dt(e=Jt(e,1).value,23),23))throw Error("FORG0001: The provided QName is invalid.");if(!e.includes(":"))return n=n.ga(""),se.s(Y(new ve("",n,e),23));if(t=(r=u(e.split(":"))).next().value,r=r.next().value,!(n=n.ga(t)))throw Error("FONS0004: The value "+e+" can not be cast to a QName. Did you mean to use fn:QName?");return se.s(Y(new ve(t,n,r),23))}},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"anyURI",l:[{type:46,g:0}],j:{type:20,g:0},m:Cr.bind(null,20)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"normalizedString",l:[{type:46,g:0}],j:{type:48,g:0},m:Cr.bind(null,48)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"token",l:[{type:46,g:0}],j:{type:52,g:0},m:Cr.bind(null,52)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"language",l:[{type:46,g:0}],j:{type:51,g:0},m:Cr.bind(null,51)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"NMTOKEN",l:[{type:46,g:0}],j:{type:50,g:0},m:Cr.bind(null,50)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"NMTOKENS",l:[{type:46,g:0}],j:{type:49,g:2},m:Cr.bind(null,49)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"Name",l:[{type:46,g:0}],j:{type:25,g:0},m:Cr.bind(null,25)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"NCName",l:[{type:46,g:0}],j:{type:24,g:0},m:Cr.bind(null,24)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"ID",l:[{type:46,g:0}],j:{type:42,g:0},m:Cr.bind(null,42)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"IDREF",l:[{type:46,g:0}],j:{type:41,g:0},m:Cr.bind(null,41)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"IDREFS",l:[{type:46,g:0}],j:{type:43,g:2},m:Cr.bind(null,43)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"ENTITY",l:[{type:46,g:0}],j:{type:26,g:0},m:Cr.bind(null,26)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"ENTITIES",l:[{type:46,g:0}],j:{type:40,g:2},m:Cr.bind(null,40)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"integer",l:[{type:46,g:0}],j:{type:5,g:0},m:Cr.bind(null,5)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"nonPositiveInteger",l:[{type:46,g:0}],j:{type:27,g:0},m:Cr.bind(null,27)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"negativeInteger",l:[{type:46,g:0}],j:{type:28,g:0},m:Cr.bind(null,28)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"long",l:[{type:46,g:0}],j:{type:31,g:0},m:Cr.bind(null,31)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"int",l:[{type:46,g:0}],j:{type:32,g:0},m:Cr.bind(null,32)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"short",l:[{type:46,g:0}],j:{type:33,g:0},m:Cr.bind(null,33)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"byte",l:[{type:46,g:0}],j:{type:34,g:0},m:Cr.bind(null,34)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"nonNegativeInteger",l:[{type:46,g:0}],j:{type:30,g:0},m:Cr.bind(null,30)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"unsignedLong",l:[{type:46,g:0}],j:{type:36,g:0},m:Cr.bind(null,36)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"unsignedInt",l:[{type:46,g:0}],j:{type:35,g:0},m:Cr.bind(null,35)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"unsignedShort",l:[{type:46,g:0}],j:{type:38,g:0},m:Cr.bind(null,38)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"unsignedByte",l:[{type:46,g:0}],j:{type:37,g:0},m:Cr.bind(null,37)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"positiveInteger",l:[{type:46,g:0}],j:{type:29,g:0},m:Cr.bind(null,29)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"yearMonthDuration",l:[{type:46,g:0}],j:{type:16,g:0},m:Cr.bind(null,16)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"dayTimeDuration",l:[{type:46,g:0}],j:{type:17,g:0},m:Cr.bind(null,17)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"dateTimeStamp",l:[{type:46,g:0}],j:{type:10,g:0},m:Cr.bind(null,10)}];function Ir(e,t,n,r){return r.F()?r:se.s(Y(r.first().value.getYear(),5))}function Or(e,t,n,r){return r.F()?r:se.s(Y(r.first().value.getMonth(),5))}function Sr(e,t,n,r){return r.F()?r:se.s(Y(r.first().value.getDay(),5))}function Rr(e,t,n,r){return r.F()?r:se.s(Y(r.first().value.getHours(),5))}function Dr(e,t,n,r){return r.F()?r:se.s(Y(r.first().value.getMinutes(),5))}function Mr(e,t,n,r){return r.F()||(t=(e=se).s,r=r.first().value,r=t.call(e,Y(r.J+r.pa,4))),r}function Gr(e,t,n,r){return r.F()?r:(e=r.first().value.ba)?se.s(Y(e,17)):se.empty()}var Ur=[{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"dateTime",l:[{type:7,g:0},{type:8,g:0}],j:{type:9,g:0},m:function(e,t,n,r,a){if(r.F())return r;if(a.F())return a;if(e=r.first().value,a=a.first().value,t=e.ba,n=a.ba,t||n){if(!t||n)if(!t&&n)t=n;else if(!Ve(t,n))throw Error("FORG0008: fn:dateTime: got a date and time value with different timezones.")}else t=null;return se.s(Y(new at(e.getYear(),e.getMonth(),e.getDay(),a.getHours(),a.getMinutes(),a.getSeconds(),a.pa,t),9))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"year-from-dateTime",l:[{type:9,g:0}],j:{type:5,g:0},m:Ir},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"month-from-dateTime",l:[{type:9,g:0}],j:{type:5,g:0},m:Or},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"day-from-dateTime",l:[{type:9,g:0}],j:{type:5,g:0},m:Sr},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"hours-from-dateTime",l:[{type:9,g:0}],j:{type:5,g:0},m:Rr},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"minutes-from-dateTime",l:[{type:9,g:0}],j:{type:5,g:0},m:Dr},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"seconds-from-dateTime",l:[{type:9,g:0}],j:{type:4,g:0},m:Mr},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"timezone-from-dateTime",l:[{type:9,g:0}],j:{type:17,g:0},m:Gr},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"year-from-date",l:[{type:7,g:0}],j:{type:5,g:0},m:Ir},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"month-from-date",l:[{type:7,g:0}],j:{type:5,g:0},m:Or},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"day-from-date",l:[{type:7,g:0}],j:{type:5,g:0},m:Sr},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"timezone-from-date",l:[{type:7,g:0}],j:{type:17,g:0},m:Gr},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"hours-from-time",l:[{type:8,g:0}],j:{type:5,g:0},m:Rr},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"minutes-from-time",l:[{type:8,g:0}],j:{type:5,g:0},m:Dr},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"seconds-from-time",l:[{type:8,g:0}],j:{type:4,g:0},m:Mr},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"timezone-from-time",l:[{type:8,g:0}],j:{type:17,g:0},m:Gr}];function Fr(e,t,n,r,a){return r.M((function(e){for(var n=St(se.create(e),t).map((function(e){return Jt(e,1)})).S(),r="",i=0;i<n.length;i++)r+="{type: "+n[i].type+", value: "+n[i].value+"}\n";return void 0!==a&&(r+=a.first().value),t.v.trace(r),se.create(e)}))}var Pr=[{l:[{type:59,g:2}],m:Fr,localName:"trace",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:59,g:2}},{l:[{type:59,g:2},{type:1,g:3}],m:Fr,localName:"trace",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:59,g:2}}];function Hr(e,t){e=Error.call(this,e),this.message=e.message,"stack"in e&&(this.stack=e.stack),this.position={end:{da:t.end.da,line:t.end.line,offset:t.end.offset},start:{da:t.start.da,line:t.start.line,offset:t.start.offset}}}function jr(e,t){if(t instanceof Error)throw t;var n=function e(t){return t.h instanceof Error?t.location:e(t.h)}(t);e=e.replace("\r","").split("\n");var r=Math.floor(Math.log10(Math.min(n.end.line+2,e.length)))+1;throw e=e.reduce((function(e,t,a){var i=a+1;if(2<n.start.line-i||2<i-n.end.line)return e;if(a=Array(r).fill(" ",0,Math.floor(Math.log10(i))+1-r).join("")+i+": ",e.push(a+t),i>=n.start.line&&i<=n.end.line){var o=i<n.end.line?t.length+a.length:n.end.da-1+a.length;i=i>n.start.line?a.length:n.start.da-1+a.length,e.push(Array(a.length+t.length).fill(" ",0,i).fill("^",i,o).join(""))}return e}),[]),t=function e(t){var n=t.h instanceof Hr?["Inner error:",t.h.message]:t.h instanceof Error?[t.h.toString()]:e(t.h);return n.push(" at <"+t.o+">:"+t.location.start.line+":"+t.location.start.da+" - "+t.location.end.line+":"+t.location.end.da),n}(t).join("\n"),new Hr(e.join("\n")+"\n\n"+t,n)}function Xr(e,t){"*"===t||Array.isArray(t)||(t=[t]);for(var n=1;n<e.length;++n)if(Array.isArray(e[n])){var r=e[n];if("*"===t||t.includes(r[0]))return r}return null}function _r(e){return 2>e.length?"":"object"==typeof e[1]?e[2]||"":e[1]||""}function Lr(e,t){return Array.isArray(e)?"object"!=typeof(e=e[1])||Array.isArray(e)?null:t in e?e[t]:null:null}function kr(e,t){return t.reduce(Xr,e)}function qr(e,t){for(var n=[],r=1;r<e.length;++r)if(Array.isArray(e[r])){var a=e[r];"*"!==t&&a[0]!==t||n.push(a)}return n}function Yr(e){return{localName:_r(e),namespaceURI:Lr(e,"URI"),prefix:Lr(e,"prefix")||""}}function Vr(e){var t=Xr(e,"typeDeclaration");if(!t||Xr(t,"voidSequenceType"))return{type:59,g:2};e={type:function e(n){switch(n[0]){case"documentTest":return 55;case"elementTest":return 54;case"attributeTest":return 47;case"piTest":return 57;case"commentTest":return 58;case"textTest":return 56;case"anyKindTest":return 53;case"anyItemType":return 59;case"anyFunctionTest":case"functionTest":case"typedFunctionTest":return 60;case"anyMapTest":case"typedMapTest":return 61;case"anyArrayTest":case"typedArrayTest":return 62;case"atomicType":return de([Lr(n,"prefix"),_r(n)].join(":"));case"parenthesizedItemType":return e(Xr(n,"*"));default:throw Error('Type declaration "'+Xr(t,"*")[0]+'" is not supported.')}}(Xr(t,"*")),g:3};var n=null,r=Xr(t,"occurrenceIndicator");switch(r&&(n=_r(r)),n){case"*":return e.g=2,e;case"?":return e.g=0,e;case"+":return e.g=1,e;case"":case null:return e}}function Qr(e,t){if("object"!=typeof e[1]||Array.isArray(e[1])){var n={};n.type=t,e.splice(1,0,n)}else e[1].type=t}function Jr(e,t){var n={};$n.call(this,new fr((n.external=1,n)),e,{A:e.every((function(e){return e.A}))},!1,t),this.h=e}function Kr(e,t){var n={};$n.call(this,new fr((n.external=1,n)),e,{A:e.every((function(e){return e.A}))},!1,t),this.h=e}function zr(e){if(null===e)throw Error("XPDY0002: context is absent, it needs to be present to use axes.");if(!Z(e.type,53))throw Error("XPTY0020: Axes can only be applied to nodes.");return e.value}function Wr(e,t){t=t||{Na:!1},$n.call(this,e.K,[e],{T:"reverse-sorted",Z:!1,subtree:!1,A:!1}),this.h=e,this.o=!!t.Na}function Zr(e){var t={};$n.call(this,new fr((t.attribute=1,t)),[e],{T:"unsorted",subtree:!0,Z:!0,A:!1}),this.h=e}function $r(e){$n.call(this,e.K,[e],{T:"sorted",subtree:!0,Z:!0,A:!1}),this.h=e}function ea(e,t,n){var r=t.node.nodeType;if(1!==r&&9!==r)return{next:function(){return z}};var a=De(e,t,n);return{next:function(){if(!a)return z;var t=a;return a=Ge(e,a,n),W(t)}}}function ta(e,t){t=t||{Na:!1},$n.call(this,e.K,[e],{A:!1,Z:!1,T:"sorted",subtree:!0}),this.h=e,this.o=!!t.Na,this.v=(e=this.h.Y())&&(e.startsWith("name-")||"type-1"===e)?"type-1":null}function na(e,t,n){var r=e.node.nodeType;if(1!==r&&9!==r)return e;for(r=Me(t,e,n);null!==r;){if(1!==r.node.nodeType)return r;r=Me(t,e=r,n)}return e}function ra(e,t,n,r){if(void 0!==n&&n){var a=t,i=!1;return{next:function(){if(i)return z;if(zt(a,t))return zt(a=na(t,e,r),t)?(i=!0,z):W(Xe(a));var n=a.node.nodeType,o=9===n||2===n?null:Fe(e,a,r);return null!==o?W(Xe(a=na(o,e,r))):zt(a=9===n?null:Ue(e,a,r),t)?(i=!0,z):W(Xe(a))}}}var o=[ea(e,t,r)];return{next:function(){if(!o.length)return z;for(var t=o[0].next(0);t.done;){if(o.shift(),!o.length)return z;t=o[0].next(0)}return o.unshift(ea(e,t.value,r)),W(Xe(t.value))}}}function aa(e){$n.call(this,e.K,[e],{T:"sorted",Z:!0,subtree:!1,A:!1}),this.h=e,this.o=(e=this.h.Y())&&(e.startsWith("name-")||"type-1"===e)?"type-1":null}function ia(e){$n.call(this,e.K,[e],{T:"sorted",Z:!0,subtree:!1,A:!1}),this.h=e}function oa(e){$n.call(this,e.K,[e],{T:"reverse-sorted",Z:!0,subtree:!0,A:!1}),this.h=e}function sa(e){$n.call(this,e.K,[e],{A:!1,Z:!0,T:"reverse-sorted",subtree:!1}),this.h=e,this.o=(e=this.h.Y())&&(e.startsWith("name-")||"type-1"===e)?"type-1":null}function ua(e){$n.call(this,e.K,[e],{A:!1,Z:!0,T:"reverse-sorted",subtree:!1}),this.h=e}function la(e){$n.call(this,e.K,[e],{T:"sorted",subtree:!0,Z:!0,A:!1}),this.h=e}function ca(e,t,n,r){var a=e.K.add(t.K).add(n.K);cr.call(this,a,[e,t,n],{A:e.A&&t.A&&n.A,Z:t.Z===n.Z&&t.Z,T:t.B===n.B?t.B:"unsorted",subtree:t.subtree===n.subtree&&t.subtree},r),this.h=e}function ha(e,t,n){this.location=e,this.o=t,this.h=n}function pa(e,t,n){cr.call(this,n.K,[n],{A:n.A,Z:n.Z,T:n.B,subtree:n.subtree}),this.h=t,this.C={end:{da:e.end.da,line:e.end.line,offset:e.end.offset},start:{da:e.start.da,line:e.start.line,offset:e.start.offset}}}function fa(e,t,n,r){$n.call(this,e,t,n,!0),this.h=r,this.I=this.h.I}function da(e,t,n,r){fa.call(this,t.K.add(r.K),[t,r],{A:!1},r),this.N=e.prefix,this.ka=e.namespaceURI,this.vb=e.localName,this.mb=null,this.v=n,this.ua=null,this.na=t}function ma(e,t,n){var r={};$n.call(this,new fr((r.external=1,r)),[n],{A:!1,T:"unsorted"}),this.N=e.map((function(e){return e.name})),this.v=e.map((function(e){return e.type})),this.o=null,this.C=t,this.h=n}function va(e,t,n){if(fa.call(this,t.K.add(n.K),[t,n],{A:!1,Z:n.Z,T:n.B,subtree:n.subtree},n),e.prefix||e.namespaceURI)throw Error("Not implemented: let expressions with namespace usage.");this.v=e.prefix,this.N=e.namespaceURI,this.ua=e.localName,this.ka=t,this.na=null}function ga(e,t){switch($n.call(this,new fr({}),[],{A:!0,T:"sorted"},!1,t),t.type){case 5:var n=Y(parseInt(e,10),t.type);break;case 1:n=Y(e,t.type);break;case 4:case 3:n=Y(parseFloat(e),t.type);break;default:throw new TypeError("Type "+t+" not expected in a literal")}this.h=function(){return se.s(n)}}function ya(e,t){var n={};$n.call(this,new fr((n.external=1,n)),e.reduce((function(e,t){return e.concat(t.key,t.value)}),[]),{A:!1},!1,t),this.h=e}v(Hr,Error),v(Jr,$n),Jr.prototype.evaluate=function(e,t){return 0===this.h.length?se.s(new He([])):er(this.h[0],e,t).M((function(e){return se.s(new He(e.map((function(e){return ue(se.s(e))}))))}))},v(Kr,$n),Kr.prototype.evaluate=function(e,t){return se.s(new He(this.h.map((function(n){return ue(er(n,e,t))}))))},v(Wr,$n),Wr.prototype.evaluate=function(e,t){var n=this;t=t.h,e=zr(e.O);var r=this.h.Y();return r=r&&(r.startsWith("name-")||"type-1"===r)?"type-1":null,se.create(function(e,t,n){var r=t;return{next:function(){if(!r)return z;var t=r;return r=Ue(e,t,n),W(Xe(t))}}}(t,this.o?e:Ue(t,e,r),r)).filter((function(e){return n.h.h(e)}))},v(Zr,$n),Zr.prototype.evaluate=function(e,t){var n=this;return t=t.h,1!==(e=zr(e.O)).node.nodeType?se.empty():(e=Ie(t,e,this.h.Y()).filter((function(e){return"http://www.w3.org/2000/xmlns/"!==e.node.namespaceURI})).map((function(e){return Xe(e)})).filter((function(e){return n.h.h(e)})),se.create(e))},Zr.prototype.Y=function(){return"type-1"},v($r,$n),$r.prototype.evaluate=function(e,t){var n=this;t=t.h;var r=(e=zr(e.O)).node.nodeType,a=[];return 1!==r&&9!==r||Se(t,e,this.h.Y()).forEach((function(e){return a.push(Xe(e))})),se.create(a).filter((function(e){return n.h.h(e)}))},v(ta,$n),ta.prototype.evaluate=function(e,t){var n=this;return e=function(e,t,n){var r=[Kt(t)];return{next:function(t){if(0<r.length&&0!=(1&t)&&r.shift(),!r.length)return z;for(t=r[0].next(0);t.done;){if(r.shift(),!r.length)return z;t=r[0].next(0)}return r.unshift(ea(e,t.value,n)),W(Xe(t.value))}}}(t=t.h,e=zr(e.O),this.v),this.o||e.next(0),se.create(e).filter((function(e){return n.h.h(e)}))},v(aa,$n),aa.prototype.evaluate=function(e,t){var n=this;return t=t.h,e=zr(e.O),se.create(function(e,t,n){for(var r=[];t&&9!==t.node.nodeType;t=Ue(e,t,null)){var a=Ge(e,t,n);a&&r.push(a)}var i=null;return{next:function(){for(;i||r.length;){if(!i){i=ra(e,r[0],!1,n);var t=W(Xe(r[0])),a=Ge(e,r[0],n);return a?r[0]=a:r.shift(),t}if(!(t=i.next(0)).done)return t;i=null}return z}}}(t,e,this.o)).filter((function(e){return n.h.h(e)}))},v(ia,$n),ia.prototype.evaluate=function(e,t){var n=this;return t=t.h,e=zr(e.O),se.create(function(e,t,n){return{next:function(){return(t=t&&Ge(e,t,n))?W(Xe(t)):z}}}(t,e,this.h.Y())).filter((function(e){return n.h.h(e)}))},v(oa,$n),oa.prototype.evaluate=function(e,t){return(e=Ue(t=t.h,e=zr(e.O),this.h.Y()))?(e=Xe(e),this.h.h(e)?se.s(e):se.empty()):se.empty()},v(sa,$n),sa.prototype.evaluate=function(e,t){var n=this;return t=t.h,e=zr(e.O),se.create(function(e,t,n){for(var r=[];t&&9!==t.node.nodeType;t=Ue(e,t,null)){var a=Fe(e,t,n);null!==a&&r.push(a)}var i=null;return{next:function(){for(;i||r.length;){i||(i=ra(e,r[0],!0,n));var t=i.next(0);if(t.done){i=null,t=Fe(e,r[0],n);var a=W(Xe(r[0]));return null===t?r.shift():r[0]=t,a}return t}return z}}}(t,e,this.o)).filter((function(e){return n.h.h(e)}))},v(ua,$n),ua.prototype.evaluate=function(e,t){var n=this;return t=t.h,e=zr(e.O),se.create(function(e,t,n){return{next:function(){return(t=t&&Fe(e,t,n))?W(Xe(t)):z}}}(t,e,this.h.Y())).filter((function(e){return n.h.h(e)}))},v(la,$n),la.prototype.evaluate=function(e){return zr(e.O),this.h.h(e.O)?se.s(e.O):se.empty()},la.prototype.Y=function(){return this.h.Y()},v(ca,cr),ca.prototype.v=function(e,t,n){var r=null,a=n[0](e);return se.create({next:function(t){return r||(r=(a.getEffectiveBooleanValue()?n[1](e):n[2](e)).value),r.next(t)}})},ca.prototype.P=function(e){if(cr.prototype.P.call(this,e),this.h.I)throw Ln()},v(pa,cr),pa.prototype.v=function(e,t,n){var r=this;t=u(n).next().value;try{var a=t(e)}catch(e){throw new ha(this.C,this.h,e)}return se.create({next:function(e){try{return a.value.next(e)}catch(e){throw new ha(r.C,r.h,e)}}})},pa.prototype.P=function(e){try{cr.prototype.P.call(this,e)}catch(e){throw new ha(this.C,this.h,e)}},v(fa,$n),fa.prototype.evaluate=function(e,t){var n=this;return this.C(e,Kt(e),t,(function(r){if(n.h instanceof fa)return function e(t,n,r,a){return t.C(n,r,a,(function(r){if(t.h instanceof fa)return e(t.h,n,r,a);var i=null;return se.create({next:function(){for(;;){if(!i){var e=r.next(0);if(e.done)return z;i=er(t.h,e.value,a).value}if(!(e=i.next(0)).done)return e;i=null}}})}))}(n.h,e,r,t);var a=null;return se.create({next:function(e){for(;;){if(!a){var i=r.next(0);if(i.done)return z;a=er(n.h,i.value,t).value}if(!(i=a.next(e)).done)return i;a=null}}})}))},fa.prototype.o=function(e,t){return function e(t,n,r,a){var i=[],o=t.C(n,r,a,(function(r){if(t.h instanceof fa)return lr(e(t.h,n,r,a),(function(e){return i=e}));var o=null;return se.create({next:function(){for(;;){if(!o){var e=r.next(0);if(e.done)return z;e=t.h.o(e.value,a),o=lr(e,(function(e){return i=or(i,e)})).value}if(!(e=o.next(0)).done)return e;o=null}}})})),s=!1;return{next:function(){if(s)return z;var e=o.S();return s=!0,W(new tr(e,i))}}}(this,e,Kt(e),t)},fa.prototype.P=function(e){$n.prototype.P.call(this,e),this.I=this.h.I;for(var t=(e=u(this.J)).next();!t.done;t=e.next())if((t=t.value)!==this.h&&t.I)throw Ln()},v(da,fa),da.prototype.C=function(e,t,n,r){var a=this,i=null,o=null,s=0;return r({next:function(){for(var e={};;){if(!i){var r=t.next(0);if(r.done)return z;o=r.value,s=0,i=er(a.na,o,n).value}if(e.hb=i.next(0),!e.hb.done)return s++,(r={})[a.mb]=function(e){return function(){return se.s(e.hb.value)}}(e),e=r,a.ua&&(e[a.ua]=function(){return se.s(new le(5,s))}),W(bt(o,e));i=null,e={hb:e.hb}}}})},da.prototype.P=function(e){if(this.N&&(this.ka=e.ga(this.N),!this.ka&&this.N))throw Error("XPST0081: Could not resolve namespace for prefix "+this.N+" in a for expression");if(this.na.P(e),Ho(e),this.mb=Xo(e,this.ka,this.vb),this.v){if(this.v.prefix&&(this.v.namespaceURI=e.ga(this.v.prefix),!this.v.namespaceURI&&this.v.prefix))throw Error("XPST0081: Could not resolve namespace for prefix "+this.N+" in the positionalVariableBinding in a for expression");this.ua=Xo(e,this.v.namespaceURI,this.v.localName)}if(this.h.P(e),Lo(e),this.na.I)throw Ln();this.h.I&&(this.I=!0)},v(ma,$n),ma.prototype.evaluate=function(e,t){var n=this,r=new ge({l:this.v,arity:this.v.length,Oa:!0,I:this.h.I,localName:"dynamic-function",namespaceURI:"",j:this.C,value:function(r,a,i,o){for(var s=[],u=3;u<arguments.length;++u)s[u-3]=arguments[u];return u=bt(xt(e,-1,null,se.empty()),n.o.reduce((function(e,t,n){return e[t]=ue(s[n]),e}),Object.create(null))),er(n.h,u,t)}});return se.s(r)},ma.prototype.P=function(e){if(Ho(e),this.o=this.N.map((function(t){return Xo(e,t.namespaceURI,t.localName)})),this.h.P(e),Lo(e),this.h.I)throw Error("Not implemented: inline functions can not yet be updating.")},v(va,fa),va.prototype.C=function(e,t,n,r){var a=this;return r({next:function(){var e=t.next(0);if(e.done)return z;var r={};return W(e=bt(e=e.value,(r[a.na]=ue(er(a.ka,e,n)),r)))}})},va.prototype.P=function(e){if(this.v&&(this.N=e.ga(this.v),!this.N&&this.v))throw Error("XPST0081: Could not resolve namespace for prefix "+this.v+" using in a for expression");if(this.ka.P(e),Ho(e),this.na=Xo(e,this.N,this.ua),this.h.P(e),Lo(e),this.I=this.h.I,this.ka.I)throw Ln()},v(ga,$n),ga.prototype.evaluate=function(){return this.h()},v(ya,$n),ya.prototype.evaluate=function(e,t){var n=this;return _e(this.h.map((function(n){return St(er(n.key,e,t),t).aa({default:function(){throw Error("XPTY0004: A key of a map should be a single atomizable value.")},s:function(e){return e}})})),(function(r){return se.s(new qe(r.map((function(r,a){return{key:r,value:ue(er(n.h[a].value,e,t))}}))))}))};var wa=Object.create(null);function Aa(e,t){for(var n=[],r=0;r<e.length+1;++r)n[r]=[];return function r(a,i){if(0===a)return i;if(0===i)return a;if(void 0!==n[a][i])return n[a][i];var o=0;return e[a-1]!==t[i-1]&&(o=1),o=Math.min(r(a-1,i)+1,r(a,i-1)+1,r(a-1,i-1)+o),n[a][i]=o}(e.length,t.length)}function xa(e){var t=wa[e]?wa[e]:Object.keys(wa).map((function(t){return{name:t,yb:Aa(e,t.slice(t.lastIndexOf(":")+1))}})).sort((function(e,t){return e.yb-t.yb})).slice(0,5).filter((function(t){return t.yb<e.length/2})).reduce((function(e,t){return e.concat(wa[t.name])}),[]).slice(0,5);return t.length?t.map((function(e){return'"Q{'+e.namespaceURI+"}"+e.localName+" ("+e.l.map((function(e){return 4===e?"...":fe(e)})).join(", ")+')"'})).reduce((function(e,t,n,r){return 0===n?e+t:e+(n!==r.length-1?", ":" or ")+t}),"Did you mean ")+"?":"No similar functions found."}function ba(e,t,n,r,a){wa[e+":"+t]||(wa[e+":"+t]=[]),wa[e+":"+t].push({l:n,arity:n.length,m:a,I:!1,localName:t,namespaceURI:e,j:r})}function Ea(e,t,n){var r={};$n.call(this,new fr((r.external=1,r)),[],{A:!0},!1,n),this.o=t,this.v=e,this.h=null}function Ba(e,t,n){return(e<<20)+(t<<12)+(n.charCodeAt(0)<<8)+n.charCodeAt(1)}v(Ea,$n),Ea.prototype.evaluate=function(){var e=new ge({l:this.h.l,I:this.h.I,arity:this.o,localName:this.h.localName,namespaceURI:this.h.namespaceURI,j:this.h.j,value:this.h.m});return se.s(e)},Ea.prototype.P=function(e){var t=this.v.namespaceURI,n=this.v.localName,r=this.v.prefix;if(!t){var a=e.Qa({localName:n,prefix:r},this.o);if(!a)throw Error("XPST0017: The function "+(r?r+":":"")+n+" with arity "+this.o+" could not be resolved. "+xa(n));t=a.namespaceURI,n=a.localName}if(this.h=e.Aa(t,n,this.o)||null,!this.h)throw e=this.v,Error("XPST0017: Function "+(e.namespaceURI?"Q{"+e.namespaceURI+"}":e.prefix?e.prefix+":":"")+e.localName+" with arity of "+this.o+" not registered. "+xa(n));$n.prototype.P.call(this,e)};var Na={},Ca=(Na[Ba(2,2,"idivOp")]=5,Na[Ba(16,16,"addOp")]=16,Na[Ba(16,16,"subtractOp")]=16,Na[Ba(16,16,"divOp")]=4,Na[Ba(16,2,"multiplyOp")]=16,Na[Ba(16,2,"divOp")]=16,Na[Ba(2,16,"multiplyOp")]=16,Na[Ba(17,17,"addOp")]=17,Na[Ba(17,17,"subtractOp")]=17,Na[Ba(17,17,"divOp")]=4,Na[Ba(17,2,"multiplyOp")]=17,Na[Ba(17,2,"divOp")]=17,Na[Ba(2,17,"multiplyOp")]=17,Na[Ba(9,9,"subtractOp")]=17,Na[Ba(7,7,"subtractOp")]=17,Na[Ba(8,8,"subtractOp")]=17,Na[Ba(9,16,"addOp")]=9,Na[Ba(9,16,"subtractOp")]=9,Na[Ba(9,17,"addOp")]=9,Na[Ba(9,17,"subtractOp")]=9,Na[Ba(7,16,"addOp")]=7,Na[Ba(7,16,"subtractOp")]=7,Na[Ba(7,17,"addOp")]=7,Na[Ba(7,17,"subtractOp")]=7,Na[Ba(8,17,"addOp")]=8,Na[Ba(8,17,"subtractOp")]=8,Na[Ba(9,16,"addOp")]=9,Na[Ba(9,16,"subtractOp")]=9,Na[Ba(9,17,"addOp")]=9,Na[Ba(9,17,"subtractOp")]=9,Na[Ba(7,17,"addOp")]=7,Na[Ba(7,17,"subtractOp")]=7,Na[Ba(7,16,"addOp")]=7,Na[Ba(7,16,"subtractOp")]=7,Na[Ba(8,17,"addOp")]=8,Na[Ba(8,17,"subtractOp")]=8,Na),Ta={},Ia=(Ta[Ba(2,2,"addOp")]=function(e,t){return e+t},Ta[Ba(2,2,"subtractOp")]=function(e,t){return e-t},Ta[Ba(2,2,"multiplyOp")]=function(e,t){return e*t},Ta[Ba(2,2,"divOp")]=function(e,t){return e/t},Ta[Ba(2,2,"modOp")]=function(e,t){return e%t},Ta[Ba(2,2,"idivOp")]=function(e,t){return Math.trunc(e/t)},Ta[Ba(16,16,"addOp")]=function(e,t){return new Ft(e.ha+t.ha)},Ta[Ba(16,16,"subtractOp")]=function(e,t){return new Ft(e.ha-t.ha)},Ta[Ba(16,16,"divOp")]=function(e,t){return e.ha/t.ha},Ta[Ba(16,2,"multiplyOp")]=jt,Ta[Ba(16,2,"divOp")]=function(e,t){if(isNaN(t))throw Error("FOCA0005: Cannot divide xs:yearMonthDuration by NaN");if((e=Math.round(e.ha/t))>Number.MAX_SAFE_INTEGER||!Number.isFinite(e))throw Error("FODT0002: Value overflow while dividing xs:yearMonthDuration");return new Ft(e<Number.MIN_SAFE_INTEGER||0===e?0:e)},Ta[Ba(2,16,"multiplyOp")]=function(e,t){return jt(t,e)},Ta[Ba(17,17,"addOp")]=function(e,t){return new Qe(e.ea+t.ea)},Ta[Ba(17,17,"subtractOp")]=function(e,t){return new Qe(e.ea-t.ea)},Ta[Ba(17,17,"divOp")]=function(e,t){if(0===t.ea)throw Error("FOAR0001: Division by 0");return e.ea/t.ea},Ta[Ba(17,2,"multiplyOp")]=Ze,Ta[Ba(17,2,"divOp")]=function(e,t){if(isNaN(t))throw Error("FOCA0005: Cannot divide xs:dayTimeDuration by NaN");if((e=e.ea/t)>Number.MAX_SAFE_INTEGER||!Number.isFinite(e))throw Error("FODT0002: Value overflow while dividing xs:dayTimeDuration");return new Qe(e<Number.MIN_SAFE_INTEGER||Object.is(-0,e)?0:e)},Ta[Ba(2,17,"multiplyOp")]=function(e,t){return Ze(t,e)},Ta[Ba(9,9,"subtractOp")]=ct,Ta[Ba(7,7,"subtractOp")]=ct,Ta[Ba(8,8,"subtractOp")]=ct,Ta[Ba(9,16,"addOp")]=ht,Ta[Ba(9,16,"subtractOp")]=pt,Ta[Ba(9,17,"addOp")]=ht,Ta[Ba(9,17,"subtractOp")]=pt,Ta[Ba(7,16,"addOp")]=ht,Ta[Ba(7,16,"subtractOp")]=pt,Ta[Ba(7,17,"addOp")]=ht,Ta[Ba(7,17,"subtractOp")]=pt,Ta[Ba(8,17,"addOp")]=ht,Ta[Ba(8,17,"subtractOp")]=pt,Ta[Ba(9,16,"addOp")]=ht,Ta[Ba(9,16,"subtractOp")]=pt,Ta[Ba(9,17,"addOp")]=ht,Ta[Ba(9,17,"subtractOp")]=pt,Ta[Ba(7,17,"addOp")]=ht,Ta[Ba(7,17,"subtractOp")]=pt,Ta[Ba(7,16,"addOp")]=ht,Ta[Ba(7,16,"subtractOp")]=pt,Ta[Ba(8,17,"addOp")]=ht,Ta[Ba(8,17,"subtractOp")]=pt,Ta);function Oa(e,t){return Z(e,5)&&Z(t,5)?5:Z(e,4)&&Z(t,4)?4:Z(e,6)&&Z(t,6)?6:3}var Sa=[2,16,17,9,7,8];function Ra(e,t,n){function r(e,t){return{W:a?a(e):e,X:i?i(t):t}}var a=null,i=null;Z(t,19)&&(a=function(e){return Jt(e,3)},t=3),Z(n,19)&&(i=function(e){return Jt(e,3)},n=3);var o=Sa.filter((function(e){return Z(t,e)})),s=Sa.filter((function(e){return Z(n,e)}));if(o.includes(2)&&s.includes(2)){var l=Ia[Ba(2,2,e)],c=Ca[Ba(2,2,e)];return c||(c=Oa(t,n)),"divOp"===e&&5===c&&(c=4),"idivOp"===e?Da(r,l)[0]:function(e,t){return e=r(e,t),Y(l(e.W.value,e.X.value),c)}}for(var h=(o=u(o)).next();!h.done;h=o.next()){h=h.value;for(var p={},f=u(s),d=f.next();!d.done;p={ib:p.ib,lb:p.lb},d=f.next())if(d=d.value,p.ib=Ia[Ba(h,d,e)],p.lb=Ca[Ba(h,d,e)],p.ib&&void 0!==p.lb)return function(e){return function(t,n){return t=r(t,n),Y(e.ib(t.W.value,t.X.value),e.lb)}}(p)}}function Da(e,t){return[function(n,r){if(n=(r=e(n,r)).W,0===(r=r.X).value)throw Error("FOAR0001: Divisor of idiv operator cannot be (-)0");if(Number.isNaN(n.value)||Number.isNaN(r.value)||!Number.isFinite(n.value))throw Error("FOAR0002: One of the operands of idiv is NaN or the first operand is (-)INF");return Number.isFinite(n.value)&&!Number.isFinite(r.value)?Y(0,5):Y(t(n.value,r.value),5)},5]}var Ma=Object.create(null);function Ga(e,t,n,r,a){$n.call(this,t.K.add(n.K),[t,n],{A:!1},!1,r),this.v=t,this.C=n,this.h=e,this.o=a}v(Ga,$n),Ga.prototype.evaluate=function(e,t){var n=this;return St(er(this.v,e,t),t).M((function(r){return 0===r.length?se.empty():St(er(n.C,e,t),t).M((function(e){if(0===e.length)return se.empty();if(1<r.length||1<e.length)throw Error('XPTY0004: the operands of the "'+n.h+'" operator should be empty or singleton.');var t=r[0];if(e=e[0],n.o&&n.type)return se.s(n.o(t,e));var a=t.type,i=e.type,o=n.h,s=a+"~"+i+"~"+o,u=Ma[s];if(u||(u=Ma[s]=Ra(o,a,i)),!(a=u))throw Error("XPTY0004: "+n.h+" not available for types "+he[t.type]+" and "+he[e.type]);return se.s(a(t,e))}))}))};var Ua={},Fa=(Ua[5]=5,Ua[27]=5,Ua[28]=5,Ua[31]=5,Ua[32]=5,Ua[33]=5,Ua[34]=5,Ua[30]=5,Ua[36]=5,Ua[35]=5,Ua[38]=5,Ua[37]=5,Ua[29]=5,Ua[4]=4,Ua[6]=6,Ua[3]=3,Ua);function Pa(e,t,n){$n.call(this,t.K,[t],{A:!1},!1,n),this.o=t,this.h=e}function Ha(e,t){$n.call(this,e.reduce((function(e,t){return e.add(t.K)}),new fr({})),e,{A:e.every((function(e){return e.A}))},!1,t),this.h=e}function ja(e,t){var n,r=e.reduce((function(e,t){return 0<dr(e,t.K)?e:t.K}),new fr({}));for($n.call(this,r,e,{A:e.every((function(e){return e.A}))},!1,t),t=0;t<e.length&&(void 0===n&&(n=e[t].Y()),null!==n);++t)if(n!==e[t].Y()){n=null;break}this.o=n,this.h=e}function Xa(e,t,n){function r(e,t){return{W:o?o(e):e,X:s?s(t):t}}function a(e){return Z(t,e)&&Z(n,e)}function i(e){return 0<e.filter((function(e){return Z(t,e)})).length&&0<e.filter((function(e){return Z(n,e)})).length}var o=null,s=null;if(Z(t,19)&&Z(n,19)?t=n=1:Z(t,19)?(o=function(e){return Jt(e,n)},t=n):Z(n,19)&&(s=function(e){return Jt(e,t)},n=t),Z(t,23)&&Z(n,23))return function(e,t){if("eqOp"===e)return function(e,n){return e=(n=t(e,n)).W,n=n.X,e.value.namespaceURI===n.value.namespaceURI&&e.value.localName===n.value.localName};if("neOp"===e)return function(e,n){return e=(n=t(e,n)).W,n=n.X,e.value.namespaceURI!==n.value.namespaceURI||e.value.localName!==n.value.localName};throw Error('XPTY0004: Only the "eq" and "ne" comparison is defined for xs:QName')}(e,r);if(a(0)||i([1,47,61])||i([2,47,61])||a(20)||a(22)||a(21)||i([1,20])){var u=function(e,t){switch(e){case"eqOp":return function(e,n){return(e=t(e,n)).W.value===e.X.value};case"neOp":return function(e,n){return(e=t(e,n)).W.value!==e.X.value};case"ltOp":return function(e,n){return(e=t(e,n)).W.value<e.X.value};case"leOp":return function(e,n){return(e=t(e,n)).W.value<=e.X.value};case"gtOp":return function(e,n){return(e=t(e,n)).W.value>e.X.value};case"geOp":return function(e,n){return(e=t(e,n)).W.value>=e.X.value}}}(e,r);if(void 0!==u)return u}if(a(16)&&void 0!==(u=function(e,t){switch(e){case"ltOp":return function(e,n){return(e=t(e,n)).W.value.ha<e.X.value.ha};case"leOp":return function(e,n){return e=(n=t(e,n)).W,n=n.X,Ve(e.value,n.value)||e.value.ha<n.value.ha};case"gtOp":return function(e,n){return(e=t(e,n)).W.value.ha>e.X.value.ha};case"geOp":return function(e,n){return e=(n=t(e,n)).W,n=n.X,Ve(e.value,n.value)||e.value.ha>n.value.ha}}}(e,r))||a(17)&&void 0!==(u=function(e,t){switch(e){case"eqOp":return function(e,n){return Ve((e=t(e,n)).W.value,e.X.value)};case"ltOp":return function(e,n){return(e=t(e,n)).W.value.ea<e.X.value.ea};case"leOp":return function(e,n){return e=(n=t(e,n)).W,n=n.X,Ve(e.value,n.value)||e.value.ea<n.value.ea};case"gtOp":return function(e,n){return(e=t(e,n)).W.value.ea>e.X.value.ea};case"geOp":return function(e,n){return e=(n=t(e,n)).W,n=n.X,Ve(e.value,n.value)||e.value.ea>n.value.ea}}}(e,r))||a(18)&&void 0!==(u=function(e,t){switch(e){case"eqOp":return function(e,n){return Ve((e=t(e,n)).W.value,e.X.value)};case"neOp":return function(e,n){return!Ve((e=t(e,n)).W.value,e.X.value)}}}(e,r)))return u;if((a(9)||a(7)||a(8))&&void 0!==(u=function(e,t){switch(e){case"eqOp":return function(e,n,r){return lt((e=t(e,n)).W.value,e.X.value,At(r))};case"neOp":return function(e,n,r){return!lt((e=t(e,n)).W.value,e.X.value,At(r))};case"ltOp":return function(e,n,r){return e=t(e,n),r=At(r),0>ut(e.W.value,e.X.value,r)};case"leOp":return function(e,n,r){var a;return e=(n=t(e,n)).W,n=n.X,(a=lt(e.value,n.value,At(r)))||(r=At(r),a=0>ut(e.value,n.value,r)),a};case"gtOp":return function(e,n,r){return e=t(e,n),r=At(r),0<ut(e.W.value,e.X.value,r)};case"geOp":return function(e,n,r){var a;return e=(n=t(e,n)).W,n=n.X,(a=lt(e.value,n.value,At(r)))||(r=At(r),a=0<ut(e.value,n.value,r)),a}}}(e,r)))return u;if((a(11)||a(12)||a(13)||a(14)||a(15))&&void 0!==(u=function(e,t){switch(e){case"eqOp":return function(e,n,r){return lt((e=t(e,n)).W.value,e.X.value,At(r))};case"neOp":return function(e,n,r){return!lt((e=t(e,n)).W.value,e.X.value,At(r))}}}(e,r)))return u;throw Error("XPTY0004: "+e+" not available for "+he[t]+" and "+he[n])}v(Pa,$n),Pa.prototype.evaluate=function(e,t){var n=this;return St(er(this.o,e,t),t).M((function(e){if(0===e.length)return se.empty();var t=e[0];if(n.type)return e="+"===n.h?+t.value:-t.value,0===t.type&&(e=Number.NaN),se.s(Y(e,n.type.type));if(1<e.length)throw Error("XPTY0004: The operand to a unary operator must be a sequence with a length less than one");return Z(t.type,19)?(t=Jt(t,3).value,se.s(Y("+"===n.h?t:-t,3))):Z(t.type,2)?"+"===n.h?se.s(t):se.s(Y(-1*t.value,Fa[t.type])):se.s(Y(Number.NaN,3))}))},v(Ha,$n),Ha.prototype.evaluate=function(e,t){var n=this,r=0,a=null,i=!1,o=null;if(null!==e){var s=e.O;null!==s&&Z(s.type,53)&&(o=we(s.value))}return se.create({next:function(){if(!i){for(;r<n.h.length;){if(!a){var s=n.h[r];if(null!==o&&null!==s.Y()&&!o.includes(s.Y()))return r++,i=!0,W(Q);a=er(s,e,t)}if(!1===a.getEffectiveBooleanValue())return i=!0,W(Q);a=null,r++}return i=!0,W(V)}return z}})},Ha.prototype.Y=function(){for(var e=0,t=this.h.length;e<t;++e){var n=this.h[e].Y();if(n)return n}return null},v(ja,$n),ja.prototype.evaluate=function(e,t){var n=this,r=0,a=null,i=!1,o=null;if(null!==e){var s=e.O;null!==s&&Z(s.type,53)&&(o=we(s.value))}return se.create({next:function(){if(!i){for(;r<n.h.length;){if(!a){var s=n.h[r];if(null!==o&&null!==s.Y()&&!o.includes(s.Y())){r++;continue}a=er(s,e,t)}if(!0===a.getEffectiveBooleanValue())return i=!0,W(V);a=null,r++}return i=!0,W(Q)}return z}})},ja.prototype.Y=function(){return this.o};var _a=Object.create(null);function La(e,t,n){var r=t+"~"+n+"~"+e,a=_a[r];return a||(a=_a[r]=Xa(e,t,n)),a}function ka(e,t,n){try{var r=La(e,t,n);return function(e,t,n){if(1<e.ya()||1<t.ya())throw Error("XPTY0004: Sequences to compare are not singleton.");return r(e.first(),t.first(),n)}}catch(e){}}var qa={},Ya=(qa.equalOp="eqOp",qa.notEqualOp="neOp",qa.lessThanOrEqualOp="leOp",qa.lessThanOp="ltOp",qa.greaterThanOrEqualOp="geOp",qa.greaterThanOp="gtOp",qa);function Va(e,t){var n,r;return(Z(e,19)||Z(t,19))&&(Z(e,2)?r=3:Z(t,2)?n=3:Z(e,17)?r=17:Z(t,17)?n=17:Z(e,16)?r=16:Z(t,16)?n=16:Z(e,19)?n=t:Z(t,19)&&(r=e)),[n,r]}function Qa(e,t,n,r){if(!Z(n,53)||!Z(r,53))throw Error("XPTY0004: Sequences to compare are not nodes");switch(e){case"isOp":return function(e,t){return e!==t||47!==e&&53!==e&&54!==e&&55!==e&&56!==e&&57!==e&&58!==e?function(){return!1}:function(e,t){return zt(e.first().value,t.first().value)}}(n,r);case"nodeBeforeOp":return t?function(e,n){return 0>tn(t,e.first(),n.first())}:void 0;case"nodeAfterOp":return t?function(e,n){return 0<tn(t,e.first(),n.first())}:void 0;default:throw Error("Unexpected operator")}}function Ja(e,t,n,r,a){switch($n.call(this,t.K.add(n.K),[t,n],{A:!1}),this.C=t,this.N=n,e){case"equalOp":case"notEqualOp":case"lessThanOrEqualOp":case"lessThanOp":case"greaterThanOrEqualOp":case"greaterThanOp":if(this.h="generalCompare",t=[59,62,46,53],r&&a&&!t.includes(r.type)&&!t.includes(a.type)){if(3===r.g&&3===a.g)r=ka(e,r.type,a.type);else{n=Ya[e];var i=u(Va(r.type,a.type));t=i.next().value,i=i.next().value,n=La(n,r.type,a.type),r=0===r.g&&0===a.g?function(e,t,n){return function(r,a,i){return!r.F()&&!a.F()&&(r=r.first(),a=a.first(),e&&(r=Jt(r,e)),t&&(a=Jt(a,t)),n(r,a,i))}}(t,i,n):function(e,t,n){return function(r,a,i){return a.M((function(a){return r.filter((function(r){for(var o=0,s=a.length;o<s;++o){var u=a[o];if(e&&(r=Jt(r,e)),t&&(u=Jt(u,t)),n(r,u,i))return!0}return!1})).aa({default:function(){return se.$()},empty:function(){return se.U()}})})).getEffectiveBooleanValue()}}(t,i,n)}this.o=r}break;case"eqOp":case"neOp":case"ltOp":case"leOp":case"gtOp":case"geOp":this.h="valueCompare",r&&a&&(this.o=ka(e,r.type,a.type));break;default:this.h="nodeCompare",r&&a&&(this.o=Qa(e,void 0,r.type,a.type))}this.v=e}function Ka(e,t,n,r){return n.M((function(n){if(n.some((function(e){return!Z(e.type,53)})))throw Error("XPTY0004: Sequences given to "+e+" should only contain nodes.");return"sorted"===r?se.create(n):"reverse-sorted"===r?se.create(n.reverse()):se.create(nn(t,n))}))}function za(e,t,n,r){$n.call(this,0<dr(t.K,n.K)?t.K:n.K,[t,n],{A:t.A&&n.A},!1,r),this.h=e,this.o=t,this.v=n}function Wa(e,t){cr.call(this,e.reduce((function(e,t){return e.add(t.K)}),new fr({})),e,{T:"unsorted",A:e.every((function(e){return e.A}))},t)}function Za(e,t,n){$n.call(this,new fr({}).add(e.K),[e,t],{A:e.A&&t.A},!1,n),this.h=e,this.o=t}function $a(e,t,n){if($n.call(this,e.K,[e],{A:!1}),this.h=de(t.prefix?t.prefix+":"+t.localName:t.localName),46===this.h||45===this.h||44===this.h)throw Error("XPST0080: Casting to xs:anyAtomicType, xs:anySimpleType or xs:NOTATION is not permitted.");if(t.namespaceURI)throw Error("Not implemented: castable as expressions with a namespace URI.");this.v=e,this.o=n}function ei(e,t,n){if($n.call(this,e.K,[e],{A:!1}),this.h=de(t.prefix?t.prefix+":"+t.localName:t.localName),46===this.h||45===this.h||44===this.h)throw Error("XPST0080: Casting to xs:anyAtomicType, xs:anySimpleType or xs:NOTATION is not permitted.");if(t.namespaceURI)throw Error("Not implemented: casting expressions with a namespace URI.");this.v=e,this.o=n}function ti(e,t){var n=e.value,r=null,a=!1;return se.create({next:function(){for(;!a;){if(!r){var e=n.next(0);if(e.done)return a=!0,W(V);r=t(e.value)}if(e=r.getEffectiveBooleanValue(),r=null,!1===e)return a=!0,W(Q)}return z}})}function ni(e,t,n,r){$n.call(this,e.K,[e],{A:!1},!1,r),this.v=e,this.o=t,this.h=n}function ri(e,t){return!(null===e||null===t||!Z(e.type,53)||!Z(t.type,53))&&zt(e.value,t.value)}function ai(e){var t=e.next(0);if(t.done)return se.empty();var n=null,r=null;return se.create({next:function(a){if(t.done)return z;n||(n=t.value.value);do{var i=n.next(a);if(i.done){if((t=e.next(0)).done)return i;n=t.value.value}}while(i.done||ri(i.value,r));return r=i.value,i}})}function ii(e,t){var n=[];!function(){for(var e=t.next(0),r={};!e.done;)r.jb=e.value.value,(e={current:r.jb.next(0),next:function(e){return function(t){return e.jb.next(t)}}(r)}).current.done||n.push(e),e=t.next(0),r={jb:r.jb}}();var r=null,a=!1,i={};return se.create((i[Symbol.iterator]=function(){return this},i.next=function(){a||(a=!0,n.every((function(e){return Z(e.current.value.type,53)}))&&n.sort((function(t,n){return tn(e,t.current.value,n.current.value)})));do{if(!n.length)return z;var t=n.shift(),i=t.current;if(t.current=t.next(0),!Z(i.value.type,53))return i;if(!t.current.done){for(var o=0,s=n.length-1,u=0;o<=s;){u=Math.floor((o+s)/2);var l=tn(e,t.current.value,n[u].current.value);if(0===l){o=u;break}0<l?o=u+1:s=u-1}n.splice(o,0,t)}}while(ri(i.value,r));return r=i.value,i},i))}function oi(e,t){var n=e.reduce((function(e,t){return 0<dr(e,t.K)?e:t.K}),new fr({}));$n.call(this,n,e,{A:e.every((function(e){return e.A}))},!1,t),this.h=e}function si(e){return e.every((function(e){return null===e||Z(e.type,5)||Z(e.type,4)}))||null!==e.map((function(e){return e?Rt(e.type):null})).reduce((function(e,t){return null===t||t===e?e:null}))?e:e.every((function(e){return null===e||Z(e.type,1)||Z(e.type,20)}))?e.map((function(e){return e?Jt(e,1):null})):e.every((function(e){return null===e||Z(e.type,4)||Z(e.type,6)}))?e.map((function(e){return e?Jt(e,6):e})):e.every((function(e){return null===e||Z(e.type,4)||Z(e.type,6)||Z(e.type,3)}))?e.map((function(e){return e?Jt(e,3):e})):null}function ui(e){return Error("XPTY0004: "+e)}function li(e,t){return e=2===e.node.nodeType?e.node.nodeName+'="'+Re(t,e)+'"':e.node.outerHTML,Error("XQTY0024: The node "+e+" follows a node that is not an attribute node or a namespace node.")}function ci(){return Error("XQST0045: Functions and variables may not be declared in one of the reserved namespace URIs.")}function hi(){return Error("XQST0060: Functions declared in a module or as an external function must reside in a namespace.")}function pi(){return Error("XQST0070: The prefixes xml and xmlns may not be used in a namespace declaration or be bound to another namespaceURI.")}function fi(e){return Error('XQDY0074: The value "'+e+'" of a name expressions cannot be converted to an expanded QName.')}function di(e){return Error('XPST0081: The prefix "'+e+'" could not be resolved')}function mi(e,t){var n=new fr({});fa.call(this,n,[t].concat(c(e.map((function(e){return e.ia})))),{A:!1,Z:!1,T:"unsorted",subtree:!1},t),this.v=e}function vi(e){$n.call(this,e?e.K:new fr({}),e?[e]:[],{T:"sorted",subtree:!1,Z:!1,A:!1}),this.h=e}function gi(e){$n.call(this,new fr({}),[],{T:"sorted"},!1,e)}function yi(e,t){var n=e.every((function(e){return e.Z})),r=e.every((function(e){return e.subtree}));$n.call(this,e.reduce((function(e,t){return e.add(t.K)}),new fr({})),e,{A:!1,Z:n,T:t?"sorted":"unsorted",subtree:r}),this.h=e,this.o=t}function wi(e,t){$n.call(this,e.K.add(t.K),[e,t],{A:e.A&&t.A,Z:e.Z,T:e.B,subtree:e.subtree}),this.o=e,this.h=t}function Ai(e,t,n){if(n=[n],Z(e.type,62))if("*"===t)n.push.apply(n,c(e.R.map((function(e){return e()}))));else{if(!Z(t.type,5))throw ui("The key specifier is not an integer.");var r=t.value;if(e.R.length<r||0>=r)throw Error("FOAY0001: Array index out of bounds");n.push(e.R[r-1]())}else{if(!Z(e.type,61))throw ui("The provided context item is not a map or an array.");"*"===t?n.push.apply(n,c(e.h.map((function(e){return e.value()})))):(e=e.h.find((function(e){return Le(e.key,t)})))&&n.push(e.value())}return Bt(n)}function xi(e,t,n,r,a){return"*"===t?Ai(e,t,n):Bt([n,t=ue(t=er(t,r,a))().M((function(t){return t.reduce((function(t,n){return Ai(e,n,t)}),new ee)}))])}function bi(e,t){$n.call(this,e.K,[e].concat("*"===t?[]:[t]),{A:e.A,T:e.B,subtree:e.subtree}),this.h=e,this.o=t}function Ei(e,t){var n={};$n.call(this,new fr((n.external=1,n)),"*"===e?[]:[e],{A:!1},!1,t),this.h=e}function Bi(e,t,n,r){var a=t.map((function(e){return e.eb}));t=t.map((function(e){return e.name}));var i=a.reduce((function(e,t){return e.add(t.K)}),n.K);$n.call(this,i,a.concat(n),{A:!1},!1,r),this.o=e,this.v=t,this.C=a,this.N=n,this.h=null}function Ni(e){$n.call(this,e,[],{A:!1})}function Ci(e){var t={};Ni.call(this,new fr((t.nodeType=1,t))),this.o=e}function Ti(e,t){t=void 0===t?{kind:null}:t;var n=e.prefix,r=e.namespaceURI,a={};"*"!==(e=e.localName)&&(a.nodeName=1),a.nodeType=1,Ni.call(this,new fr(a)),this.o=e,this.C=r,this.v=n||(r?null:""),this.N=t.kind}function Ii(e){var t={};Ni.call(this,new fr((t.nodeName=1,t))),this.o=e}function Oi(e){Ni.call(this,new fr({})),this.o=e}function Si(e,t,n){$n.call(this,new fr({}),[],{A:!1,T:"unsorted"}),this.o=n,this.v=t||void 0,this.C=e,this.h=null}function Ri(e,t){var n=new fr({});fa.call(this,n,[e,t],{A:!1,Z:!1,T:"unsorted",subtree:!1},t),this.v=e}function Di(e,t){var n=t.h,r=t.o,a=t.B;switch(e.node.nodeType){case 1:var i=r.createElementNS(e.node.namespaceURI,e.node.nodeName);for(n.getAllAttributes(e.node).forEach((function(e){return a.setAttributeNS(i,e.namespaceURI,e.nodeName,e.value)})),e=(r=u(Se(n,e))).next();!e.done;e=r.next())e=Di(e.value,t),a.insertBefore(i,e.node,null);return{node:i,G:null};case 2:return(t=r.createAttributeNS(e.node.namespaceURI,e.node.nodeName)).value=Re(n,e),{node:t,G:null};case 4:return{node:r.createCDATASection(Re(n,e)),G:null};case 8:return{node:r.createComment(Re(n,e)),G:null};case 9:for(r=r.createDocument(),e=(n=u(Se(n,e))).next();!e.done;e=n.next())e=Di(e.value,t),a.insertBefore(r,e.node,null);return{node:r,G:null};case 7:return{node:r.createProcessingInstruction(e.node.target,Re(n,e)),G:null};case 3:return{node:r.createTextNode(Re(n,e)),G:null}}}function Mi(e,t){var n=t.B,r=t.o,a=t.h;if(!Ne(e.node))return Di(e,t).node;switch(e.node.nodeType){case 2:return(r=r.createAttributeNS(e.node.namespaceURI,e.node.nodeName)).value=Re(a,e),r;case 8:return r.createComment(Re(a,e));case 1:var i=e.node.prefix,o=e.node.localName,s=r.createElementNS(e.node.namespaceURI,i?i+":"+o:o);return Se(a,e).forEach((function(e){e=Mi(e,t),n.insertBefore(s,e,null)})),Ie(a,e).forEach((function(e){n.setAttributeNS(s,e.node.namespaceURI,e.node.nodeName,Re(a,e))})),s.normalize(),s;case 7:return r.createProcessingInstruction(e.node.target,Re(a,e));case 3:return r.createTextNode(Re(a,e))}}function Gi(e,t,n){var r=e.node;if(!(Ne(r)||n||e.G))return r;n=t.C,e=function(e,t,n){var r=e;for(e=Ue(n,r);null!==e;){if(2===r.node.nodeType)t.push(r.node.nodeName);else{var a=Se(n,e);t.push(a.findIndex((function(e){return zt(e,r)})))}e=Ue(n,r=e)}return r}(e,r=[],t.h);var a=n.get(e.node);return a||(a={node:Mi(e,t),G:null},n.set(e.node,a)),function(e,t,n){for(var r={};0<t.length;)r.Xa=t.pop(),e="string"==typeof r.Xa?Ie(n,e).find(function(e){return function(t){return t.node.nodeName===e.Xa}}(r)):Se(n,e)[r.Xa],r={Xa:r.Xa};return e.node}(a,r,t.h)}function Ui(e){this.type=e}function Fi(e){this.type="delete",this.target=e}function Pi(e,t,n){this.type=n,this.target=e,this.content=t}function Hi(e,t){Pi.call(this,e,t,"insertAfter")}function ji(e,t){this.type="insertAttributes",this.target=e,this.content=t}function Xi(e,t){Pi.call(this,e,t,"insertBefore")}function _i(e,t){Pi.call(this,e,t,"insertIntoAsFirst")}function Li(e,t){Pi.call(this,e,t,"insertIntoAsLast")}function ki(e,t){Pi.call(this,e,t,"insertInto")}function qi(e,t){this.type="rename",this.target=e,this.o=t.va?t:new ve(t.prefix,t.namespaceURI,t.localName)}function Yi(e,t){this.type="replaceElementContent",this.target=e,this.text=t}function Vi(e,t){this.type="replaceNode",this.target=e,this.o=t}function Qi(e,t){this.type="replaceValue",this.target=e,this.o=t}function Ji(e,t){return new Vi(e,t)}function Ki(e){sr.call(this,new fr({}),[e],{A:!1,T:"unsorted"}),this.h=e}function zi(e,t,n){var r=[],a=[],i=!1;return e.forEach((function(e){i=function e(t,n,r,a,i,o){var s=n.h;return t.reduce((function e(t,n){return Z(n.type,62)?(n.R.forEach((function(n){return n().S().forEach((function(n){return e(t,n)}))})),t):(t.push(n),t)}),[]).forEach((function(t,u,l){if(Z(t.type,47)){if(i)throw o(t.value,s);r.push(t.value.node)}else if(Z(t.type,46)||Z(t.type,53)&&3===t.value.node.nodeType){var c=Z(t.type,46)?Jt(Ot(t,n).first(),1).value:Re(s,t.value);0!==u&&Z(l[u-1].type,46)&&Z(t.type,46)?(a.push({data:" "+c,Pa:!0,nodeType:3}),i=!0):c&&(a.push({data:""+c,Pa:!0,nodeType:3}),i=!0)}else if(Z(t.type,55)){var h=[];Se(s,t.value).forEach((function(e){return h.push(Xe(e))})),i=e(h,n,r,a,i,o)}else{if(!Z(t.type,53)){if(Z(t.type,60))throw Tt(t.type);throw Error("Atomizing "+t.type+" is not implemented.")}a.push(t.value.node),i=!0}})),i}(e,t,r,a,i,n)})),{attributes:r,Ua:a}}function Wi(e,t,n,r,a){var i=[];switch(e){case 4:r.length&&i.push(new ji(t,r)),a.length&&i.push(new _i(t,a));break;case 5:r.length&&i.push(new ji(t,r)),a.length&&i.push(new Li(t,a));break;case 3:r.length&&i.push(new ji(t,r)),a.length&&i.push(new ki(t,a));break;case 2:r.length&&i.push(new ji(n,r)),a.length&&i.push(new Xi(t,a));break;case 1:r.length&&i.push(new ji(n,r)),a.length&&i.push(new Hi(t,a))}return i}function Zi(e,t,n){sr.call(this,new fr({}),[e,n],{A:!1,T:"unsorted"}),this.C=e,this.h=t,this.v=n}function $i(){return Ct("Casting not supported from given type to a single xs:string or xs:untypedAtomic or any of its derived types.")}v(Ja,$n),Ja.prototype.evaluate=function(e,t){var n=this,r=er(this.C,e,t),a=er(this.N,e,t);if(this.o){if("nodeCompare"===this.h)return r.F()||a.F()?se.empty():this.o(r,a,e)?se.$():se.U();var i=St(r,t),o=St(a,t);return i.F()||o.F()?"valueCompare"===this.h?se.empty():se.U():this.o(i,o,e)?se.$():se.U()}return r.aa({empty:function(){return"valueCompare"===n.h||"nodeCompare"===n.h?se.empty():se.U()},default:function(){return a.aa({empty:function(){return"valueCompare"===n.h||"nodeCompare"===n.h?se.empty():se.U()},default:function(){if("nodeCompare"===n.h)return r.aa({default:function(){throw Error("XPTY0004: Sequences to compare are not singleton")},s:function(){return function(e,t,n,r,a){return n.aa({default:function(){throw Error("XPTY0004: Sequences to compare are not singleton")},s:function(){return _e([t,n],(function(i){var o=u(i);return i=o.next().value,o=o.next().value,Qa(e.v,r.h,i.type,o.type)(t,n,a)?se.$():se.U()}))}})}(n,r,a,t,e)}});var i=St(r,t),o=St(a,t);return"valueCompare"===n.h?i.aa({s:function(){return o.aa({s:function(){return i.M((function(t){var r=u(t).next().value;return o.M((function(t){return t=u(t).next().value,La(n.v,r.type,t.type)(r,t,e)?se.$():se.U()}))}))},default:function(){throw Error("XPTY0004: Sequences to compare are not singleton.")}})},default:function(){throw Error("XPTY0004: Sequences to compare are not singleton.")}}):function(e,t,n,r){return e=Ya[e],n.M((function(n){return t.filter((function(t){for(var a=0,i=n.length;a<i;++a){var o=n[a],s=u(Va(t.type,o.type)),l=s.next().value;if(s=s.next().value,l?t=Jt(t,l):s&&(o=Jt(o,s)),La(e,t.type,o.type)(t,o,r))return!0}return!1})).aa({default:function(){return se.$()},empty:function(){return se.U()}})}))}(n.v,i,o,e)}})}})},v(za,$n),za.prototype.evaluate=function(e,t){var n=this,r=Ka(this.h,t.h,er(this.o,e,t),this.o.B);e=Ka(this.h,t.h,er(this.v,e,t),this.v.B);var a=r.value,i=e.value,o=null,s=null,u=!1,l=!1;return se.create({next:function(){if(u)return z;for(;!l;){if(!o){var e=a.next(0);if(e.done)return u=!0,z;o=e.value}if(!s){if((e=i.next(0)).done){l=!0;break}s=e.value}if(zt(o.value,s.value)){if(e=W(o),s=o=null,"intersectOp"===n.h)return e}else if(0>tn(t.h,o,s)){if(e=W(o),o=null,"exceptOp"===n.h)return e}else s=null}return"exceptOp"===n.h?null!==o?(e=W(o),o=null,e):a.next(0):(u=!0,z)}})},v(Wa,cr),Wa.prototype.v=function(e,t,n){return n.length?Bt(n.map((function(t){return t(e)}))):se.empty()},v(Za,$n),Za.prototype.evaluate=function(e,t){var n=this,r=yt(e,er(this.h,e,t)),a=null,i=null,o=!1;return se.create({next:function(e){for(;!o;){if(!a&&(a=r.next(e)).done)return o=!0,z;i||(i=er(n.o,a.value,t));var s=i.value.next(e);if(!s.done)return s;a=i=null}}})},v($a,$n),$a.prototype.evaluate=function(e,t){var n=this,r=St(er(this.v,e,t),t);return r.aa({empty:function(){return n.o?se.$():se.U()},s:function(){return r.map((function(e){return Qt(e,n.h).u?V:Q}))},multiple:function(){return se.U()}})},v(ei,$n),ei.prototype.evaluate=function(e,t){var n=this,r=St(er(this.v,e,t),t);return r.aa({empty:function(){if(!n.o)throw Error("XPTY0004: Sequence to cast is empty while target type is singleton.");return se.empty()},s:function(){return r.map((function(e){return Jt(e,n.h)}))},multiple:function(){throw Error("XPTY0004: Sequence to cast is not singleton or empty.")}})},v(ni,$n),ni.prototype.evaluate=function(e,t){var n=this,r=er(this.v,e,t);return r.aa({empty:function(){return"?"===n.h||"*"===n.h?se.$():se.U()},multiple:function(){return"+"===n.h||"*"===n.h?ti(r,(function(r){var a=se.s(r);return r=xt(e,0,r,a),er(n.o,r,t)})):se.U()},s:function(){return ti(r,(function(r){var a=se.s(r);return r=xt(e,0,r,a),er(n.o,r,t)}))}})},v(oi,$n),oi.prototype.evaluate=function(e,t){var n=this;if(this.h.every((function(e){return"sorted"===e.B}))){var r=0;return ii(t.h,{next:function(){return r>=n.h.length?z:W(er(n.h[r++],e,t))}}).map((function(e){if(!Z(e.type,53))throw Error("XPTY0004: The sequences to union are not of type node()*");return e}))}return Bt(this.h.map((function(n){return er(n,e,t)}))).M((function(e){if(e.some((function(e){return!Z(e.type,53)})))throw Error("XPTY0004: The sequences to union are not of type node()*");return e=nn(t.h,e),se.create(e)}))},v(mi,fa),mi.prototype.C=function(e,t,n,r){if(this.v[1])throw Error("More than one order spec is not supported for the order by clause.");var a,i,o=[],s=!1,l=null,c=this.v[0];return se.create({next:function(){if(!s){for(var h=t.next(0);!h.done;)o.push(h.value),h=t.next(0);if((h=o.map((function(e){return c.ia.evaluate(e,n)})).map((function(e){return St(e,n)}))).find((function(e){return!e.F()&&!e.za()})))throw ui("Order by only accepts empty or singleton sequences");if(function(e){return(e=e.find((function(e){return!!e})))?Rt(e.type):null}(a=(a=h.map((function(e){return e.first()}))).map((function(e){return null===e?e:Z(19,e.type)?Jt(e,1):e})))&&!(a=si(a)))throw ui("Could not cast values");h=a.length,i=a.map((function(e,t){return t}));for(var p=0;p<h;p++)if(p+1!==h)for(var f=p;0<=f;f--){var d=f,m=f+1;if(m!==h){var v=a[i[d]],g=a[i[m]];if(null!==g||null!==v){if(c.mc){if(null===v)continue;if(null===g&&null!==v){v=u([i[m],i[d]]),i[d]=v.next().value,i[m]=v.next().value;continue}if(isNaN(g.value)&&null!==v&&!isNaN(v.value)){v=u([i[m],i[d]]),i[d]=v.next().value,i[m]=v.next().value;continue}}else{if(null===g)continue;if(null===v&&null!==g){v=u([i[m],i[d]]),i[d]=v.next().value,i[m]=v.next().value;continue}if(isNaN(v.value)&&null!==g&&!isNaN(g.value)){v=u([i[m],i[d]]),i[d]=v.next().value,i[m]=v.next().value;continue}}La("gtOp",v.type,g.type)(v,g,e)&&(v=u([i[m],i[d]]),i[d]=v.next().value,i[m]=v.next().value)}}}var y=c.Ib?0:a.length-1;l=r({next:function(){return c.Ib?y>=a.length?z:W(o[i[y++]]):0>y?z:W(o[i[y--]])}}).value,s=!0}return l.next(0)}})},v(vi,$n),vi.prototype.evaluate=function(e,t){if(null===e.O)throw Error("XPDY0002: context is absent, it needs to be present to use paths.");for(var n=t.h,r=e.O.value;9!==r.node.nodeType;)if(null===(r=Ue(n,r)))throw Error("XPDY0050: the root node of the context node is not a document node.");return n=se.s(Xe(r)),this.h?er(this.h,xt(e,0,n.first(),n),t):n},v(gi,$n),gi.prototype.evaluate=function(e){if(null===e.O)throw Error('XPDY0002: context is absent, it needs to be present to use the "." operator');return se.s(e.O)},v(yi,$n),yi.prototype.evaluate=function(e,t){var n=this,r=!0;return this.h.reduce((function(a,i,o){var s=null===a?Kt(e):yt(e,a);if(a={next:function(e){if((e=s.next(e)).done)return z;if(null!==e.value.O&&!Z(e.value.O.type,53)&&0<o)throw Error("XPTY0019: The result of E1 in a path expression E1/E2 should not evaluate to a sequence of nodes.");return W(er(i,e.value,t))}},n.o)switch(i.B){case"reverse-sorted":var u=a;a={next:function(e){return(e=u.next(e)).done?e:W(e.value.M((function(e){return se.create(e.reverse())})))}};case"sorted":if(i.subtree&&r){var l=ai(a);break}l=ii(t.h,a);break;case"unsorted":return ai(a).M((function(e){return se.create(function(e,t){var n=!1,r=!1;if(t.forEach((function(e){Z(e.type,53)?n=!0:r=!0})),r&&n)throw Error("XPTY0018: The path operator should either return nodes or non-nodes. Mixed sequences are not allowed.");return n?nn(e,t):t}(t.h,e))}))}else l=ai(a);return r=r&&i.Z,l}),null)},yi.prototype.Y=function(){return this.h[0].Y()},v(wi,$n),wi.prototype.evaluate=function(e,t){var n=this,r=er(this.o,e,t);if(this.h.A){var a=er(this.h,e,t);if(a.F())return a;var i=a.first();if(Z(i.type,2)){var o=i.value;if(!Number.isInteger(o))return se.empty();var s=r.value,u=!1;return se.create({next:function(){if(!u){for(var e=s.next(0);!e.done;e=s.next(0))if(1==o--)return u=!0,e;u=!0}return z}})}return a.getEffectiveBooleanValue()?r:se.empty()}var l=r.value,c=null,h=0,p=null;return se.create({next:function(a){for(var i=!1;(!c||!c.done)&&(c||(c=l.next(i?0:a),i=!0),!c.done);){p||(p=er(n.h,xt(e,h,c.value,r),t));var o=p.first();o=null!==o&&(Z(o.type,2)?o.value===h+1:p.getEffectiveBooleanValue()),p=null;var s=c.value;if(c=null,h++,o)return W(s)}return c}})},wi.prototype.Y=function(){return this.o.Y()},v(bi,$n),bi.prototype.evaluate=function(e,t){var n=this;return er(this.h,e,t).M((function(r){return r.reduce((function(r,a){return xi(a,n.o,r,e,t)}),new ee)}))},bi.prototype.Y=function(){return this.h.Y()},v(Ei,$n),Ei.prototype.evaluate=function(e,t){return xi(e.O,this.h,new ee,e,t)},v(Bi,$n),Bi.prototype.evaluate=function(e,t){var n=this,r=e,a=this.h.map((function(a,i){var o=er(n.C[i],r,t).S();return r=bt(e,((i={})[a]=function(){return se.create(o)},i)),o}));if(a.some((function(e){return 0===e.length})))return"every"===this.o?se.$():se.U();var i=Array(a.length).fill(0);i[0]=-1;for(var o=!0;o;){o=!1;for(var s=0,u=i.length;s<u;++s){var l=a[s];if(!(++i[s]>l.length-1)){for(o=Object.create(null),s={},u=0;u<i.length;s={ub:s.ub},u++)s.ub=a[u][i[u]],o[this.h[u]]=function(e){return function(){return se.s(e.ub)}}(s);if(o=bt(e,o),(o=er(this.N,o,t)).getEffectiveBooleanValue()&&"some"===this.o)return se.$();if(!o.getEffectiveBooleanValue()&&"every"===this.o)return se.U();o=!0;break}i[s]=0}}return"every"===this.o?se.$():se.U()},Bi.prototype.P=function(e){this.h=[];for(var t=0,n=this.v.length;t<n;++t){this.C[t].P(e),Ho(e);var r=this.v[t],a=r.prefix?e.ga(r.prefix):null;r=Xo(e,a,r.localName),this.h[t]=r}for(this.N.P(e),t=0,n=this.v.length;t<n;++t)Lo(e)},v(Ni,$n),Ni.prototype.evaluate=function(e){return this.h(e.O)?se.$():se.U()},v(Ci,Ni),Ci.prototype.h=function(e){return!!Z(e.type,53)&&(e=e.value.node.nodeType,3===this.o&&4===e||this.o===e)},Ci.prototype.Y=function(){return"type-"+this.o},v(Ti,Ni),Ti.prototype.h=function(e){var t=Z(e.type,54),n=Z(e.type,47);return!(!t&&!n)&&(e=e.value,!(null!==this.N&&(1===this.N&&!t||2===this.N&&!n))&&(null===this.v&&""!==this.C&&"*"===this.o||("*"===this.v?"*"===this.o||this.o===e.node.localName:("*"===this.o||this.o===e.node.localName)&&(e.node.namespaceURI||null)===((""===this.v?t?this.C:null:this.C)||null))))},Ti.prototype.Y=function(){return"*"===this.o?null===this.N?"type-1-or-type-2":"type-"+this.N:"name-"+this.o},Ti.prototype.P=function(e){if(null===this.C&&"*"!==this.v&&(this.C=e.ga(this.v||"")||null,!this.C&&this.v))throw Error("XPST0081: The prefix "+this.v+" could not be resolved.")},v(Ii,Ni),Ii.prototype.h=function(e){return Z(e.type,57)&&e.value.node.target===this.o},Ii.prototype.Y=function(){return"type-7"},v(Oi,Ni),Oi.prototype.h=function(e){return Z(e.type,de(this.o.prefix?this.o.prefix+":"+this.o.localName:this.o.localName))},v(Si,$n),Si.prototype.evaluate=function(e,t){if(!e.ta[this.h]){if(this.N)return this.N(e,t);throw Error("XQDY0054: The variable "+this.o+" is declared but not in scope.")}return e.ta[this.h]()},Si.prototype.P=function(e){if(this.C&&(this.v=e.ga(this.C)),this.h=e.rb(this.v||void 0,this.o),!this.h)throw Error("XPST0008, The variable "+this.o+" is not in scope.");(e=e.Da[this.h])&&(this.N=e)},v(Ri,fa),Ri.prototype.C=function(e,t,n,r){var a=this,i=null,o=null;return r({next:function(){for(;;){if(!o){var e=t.next(0);if(e.done)return z;i=e.value,o=er(a.v,i,n)}e=o.getEffectiveBooleanValue();var r=i;if(o=i=null,e)return W(r)}}})},v(Fi,Ui),Fi.prototype.h=function(e){var t={};return t.type=this.type,t.target=Gi(this.target,e,!1),t},v(Pi,Ui),Pi.prototype.h=function(e){var t={};return t.type=this.type,t.target=Gi(this.target,e,!1),t.content=this.content.map((function(t){return Gi(t,e,!0)})),t},v(Hi,Pi),v(ji,Ui),ji.prototype.h=function(e){var t={};return t.type=this.type,t.target=Gi(this.target,e,!1),t.content=this.content.map((function(t){return Gi(t,e,!0)})),t},v(Xi,Pi),v(_i,Pi),v(Li,Pi),v(ki,Pi),v(qi,Ui),qi.prototype.h=function(e){var t={},n={};return n.type=this.type,n.target=Gi(this.target,e,!1),n.newName=(t.prefix=this.o.prefix,t.namespaceURI=this.o.namespaceURI,t.localName=this.o.localName,t),n},v(Yi,Ui),Yi.prototype.h=function(e){var t={};return t.type=this.type,t.target=Gi(this.target,e,!1),t.text=this.text?Gi(this.text,e,!0):null,t},v(Vi,Ui),Vi.prototype.h=function(e){var t={};return t.type=this.type,t.target=Gi(this.target,e,!1),t.replacement=this.o.map((function(t){return Gi(t,e,!0)})),t},v(Qi,Ui),Qi.prototype.h=function(e){var t={};return t.type=this.type,t.target=Gi(this.target,e,!1),t["string-value"]=this.o,t},v(Ki,sr),Ki.prototype.o=function(e,t){var n,r,a=ur(this.h)(e,t),i=t.h;return{next:function(){if(!n){var e=a.next(0);if(e.value.H.some((function(e){return!Z(e.type,53)})))throw Error("XUTY0007: The target of a delete expression must be a sequence of zero or more nodes.");n=e.value.H,r=e.value.fa}return W({fa:or((n=n.filter((function(e){return Ue(i,e.value)}))).map((function(e){return new Fi(e.value)})),r),H:[]})}}},v(Zi,sr),Zi.prototype.o=function(e,t){var n,r,a,i,o,s,u=this,l=ur(this.C)(e,t),c=ur(this.v)(e,t),h=t.h;return{next:function(){if(!n){var e=l.next(0),p=zi([e.value.H],t,kn);n=p.attributes.map((function(e){return{node:e,G:null}})),r=p.Ua.map((function(e){return{node:e,G:null}})),a=e.value.fa}if(!i){if(0===(e=c.next(0)).value.H.length)throw Zn();if(3<=u.h){if(1!==e.value.H.length)throw qn();if(!Z(e.value.H[0].type,54)&&!Z(e.value.H[0].type,55))throw qn()}else{if(1!==e.value.H.length)throw Yn();if(!(Z(e.value.H[0].type,54)||Z(e.value.H[0].type,56)||Z(e.value.H[0].type,58)||Z(e.value.H[0].type,57)))throw Yn();if(null===(s=Ue(h,e.value.H[0].value,null)))throw Error("XUDY0029: The target "+e.value.H[0].value.outerHTML+" for inserting a node before or after must have a parent.")}i=e.value.H[0],o=e.value.fa}if(n.length){if(3<=u.h){if(!Z(i.type,54))throw Error("XUTY0022: An insert expression specifies the insertion of an attribute node into a document node.")}else if(1!==s.node.nodeType)throw Error("XUDY0030: An insert expression specifies the insertion of an attribute node before or after a child of a document node.");n.reduce((function(e,t){var n=t.node.prefix||"",r=t.node.prefix||"",a=t.node.namespaceURI,o=r?i.value.node.lookupNamespaceURI(r):null;if(o&&o!==a)throw zn(a);if((r=e[r])&&a!==r)throw Wn(a);return e[n]=t.node.namespaceURI,e}),{})}return W({H:[],fa:or(Wi(u.h,i.value,s||null,n,r),a,o)})}}};var eo=/([A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])/,to=new RegExp(eo.source+new RegExp("("+eo.source+"|[-.0-9·̀-ͯ‿⁀])").source+"*","g");function no(e){return!!(e=e.match(to))&&1===e.length}function ro(e,t){return St(t,e).aa({s:function(e){if(Z((e=e.first()).type,1)||Z(e.type,19)){if(!no(e.value))throw Error('XQDY0041: The value "'+e.value+'" of a name expressions cannot be converted to a NCName.');return se.s(e)}throw $i()},default:function(){throw $i()}}).value}function ao(e,t,n){return St(n,t).aa({s:function(t){if(Z((t=t.first()).type,23))return se.s(t);if(Z(t.type,1)||Z(t.type,19)){if(1===(t=t.value.split(":")).length)t=t[0];else{var n=t[0],r=e.ga(n);t=t[1]}if(!no(t)||n&&!no(n))throw fi(n?n+":"+t:t);if(n&&!r)throw fi(n+":"+t);return se.s({type:23,value:new ve(n,r,t)})}throw $i()},default:function(){throw $i()}}).value}function io(e,t){sr.call(this,new fr({}),[e,t],{A:!1,T:"unsorted"}),this.v=e,this.C=t,this.h=void 0}function oo(e,t,n){sr.call(this,new fr({}),[t,n],{A:!1,T:"unsorted"}),this.C=e,this.h=t,this.v=n}function so(e){switch(e.type){case"delete":return new Fi({node:e.target,G:null});case"insertAfter":return new Hi({node:e.target,G:null},e.content.map((function(e){return{node:e,G:null}})));case"insertBefore":return new Xi({node:e.target,G:null},e.content.map((function(e){return{node:e,G:null}})));case"insertInto":return new ki({node:e.target,G:null},e.content.map((function(e){return{node:e,G:null}})));case"insertIntoAsFirst":return new _i({node:e.target,G:null},e.content.map((function(e){return{node:e,G:null}})));case"insertIntoAsLast":return new Li({node:e.target,G:null},e.content.map((function(e){return{node:e,G:null}})));case"insertAttributes":return new ji({node:e.target,G:null},e.content.map((function(e){return{node:e,G:null}})));case"rename":return new qi({node:e.target,G:null},e.newName);case"replaceNode":return new Vi({node:e.target,G:null},e.replacement.map((function(e){return{node:e,G:null}})));case"replaceValue":return new Qi({node:e.target,G:null},e["string-value"]);case"replaceElementContent":return new Yi({node:e.target,G:null},e.text?{node:e.text,G:null}:null);default:throw Error('Unexpected type "'+e.type+'" when parsing a transferable pending update.')}}function uo(e,t,n){sr.call(this,new fr({}),e.reduce((function(e,t){return e.push(t.eb),e}),[t,n]),{A:!1,T:"unsorted"}),this.h=e,this.C=t,this.v=n,this.I=null}function lo(e,t){return{node:{nodeType:2,Pa:!0,nodeName:e.va(),namespaceURI:e.namespaceURI,prefix:e.prefix,localName:e.localName,name:e.va(),value:t},G:null}}function co(e,t){var n=t.tb||[];n=n.concat(e.Ja||[]),$n.call(this,new fr({}),n,{A:!1,T:"unsorted"}),e.Ja?this.o=e.Ja:this.name=new ve(e.prefix,e.namespaceURI,e.localName),this.h=t,this.v=void 0}function ho(e){$n.call(this,e?e.K:new fr({}),e?[e]:[],{A:!1,T:"unsorted"}),this.h=e}function po(e,t,n,r){$n.call(this,new fr({}),r.concat(t).concat(e.Ja||[]),{A:!1,T:"unsorted"}),e.Ja?this.o=e.Ja:this.h=new ve(e.prefix,e.namespaceURI,e.localName),this.N=n.reduce((function(e,t){if(t.prefix in e)throw Error("XQST0071: The namespace declaration with the prefix "+t.prefix+" has already been declared on the constructed element.");return e[t.prefix]=t.uri,e}),{}),this.C=t,this.ka=r,this.v=void 0}function fo(e){if(/^xml$/i.test(e))throw Error('XQDY0064: The target of a created PI may not be "'+e+'"')}function mo(e,t){return{node:{data:t,Pa:!0,nodeName:e,nodeType:7,target:e},G:null}}function vo(e,t){var n=e.Db?[e.Db].concat(t):[t];$n.call(this,n.reduce((function(e,t){return e.add(t.K)}),new fr({})),n,{A:!1,T:"unsorted"}),this.h=e,this.o=t}function go(e){$n.call(this,e?e.K:new fr({}),e?[e]:[],{A:!1,T:"unsorted"}),this.h=e}function yo(e,t,n,r){var a,i=new fr({});cr.call(this,i,(a=[e].concat(c(t.map((function(e){return e.jc}))),[n])).concat.apply(a,c(t.map((function(e){return e.Ob.map((function(e){return e.Nb}))})))),{A:!1,Z:!1,T:"unsorted",subtree:!1},r),this.C=e,this.h=t.length,this.N=t.map((function(e){return e.Ob}))}v(io,sr),io.prototype.o=function(e,t){var n=this,r=ur(this.v)(e,t),a=ur(this.C)(e,t);return{next:function(){var e=r.next(0),i=e.value.H;if(0===i.length)throw Zn();if(1!==i.length)throw Qn();if(!Z(i[0].type,54)&&!Z(i[0].type,47)&&!Z(i[0].type,57))throw Qn();i=i[0];var o=a.next(0);e:{var s=n.h,u=se.create(o.value.H);switch(i.type){case 54:if(s=ao(s,t,u).next(0).value.value,(u=i.value.node.lookupNamespaceURI(s.prefix))&&u!==s.namespaceURI)throw zn(s.namespaceURI);break e;case 47:if((s=ao(s,t,u).next(0).value.value).namespaceURI&&(u=i.value.node.lookupNamespaceURI(s.prefix))&&u!==s.namespaceURI)throw zn(s.namespaceURI);break e;case 57:s=new ve("",null,s=ro(t,u).next(0).value.value);break e}s=void 0}return W({H:[],fa:or([new qi(i.value,s)],e.value.fa,o.value.fa)})}}},io.prototype.P=function(e){this.h=Po(e),sr.prototype.P.call(this,e)},v(oo,sr),oo.prototype.o=function(e,t){var n=ur(this.h)(e,t);return e=ur(this.v)(e,t),this.C?function(e,t,n){var r,a,i,o,s=!1;return{next:function(){if(s)return z;if(!i){var u=n.next(0),l=St(se.create(u.value.H),e).map((function(e){return Jt(e,1)})).S().map((function(e){return e.value})).join(" ");i=0===l.length?null:{node:e.o.createTextNode(l),G:null},o=u.value.fa}if(!r){if(0===(u=t.next(0)).value.H.length)throw Zn();if(1!==u.value.H.length)throw Vn();if(!(Z(u.value.H[0].type,54)||Z(u.value.H[0].type,47)||Z(u.value.H[0].type,56)||Z(u.value.H[0].type,58)||Z(u.value.H[0].type,57)))throw Vn();r=u.value.H[0],a=u.value.fa}if(Z(r.type,54))return s=!0,W({H:[],fa:or([new Yi(r.value,i)],o,a)});if(Z(r.type,47)||Z(r.type,56)||Z(r.type,58)||Z(r.type,57)){if(u=i?Re(e.h,i):"",Z(r.type,58)&&(u.includes("--")||u.endsWith("-")))throw Error('XQDY0072: The content "'+u+'" for a comment node contains two adjacent hyphens or ends with a hyphen.');if(Z(r.type,57)&&u.includes("?>"))throw Error('XQDY0026: The content "'+u+'" for a processing instruction node contains "?>".');return s=!0,W({H:[],fa:or([new Qi(r.value,u)],o,a)})}}}}(t,n,e):function(e,t,n){var r,a,i;return{next:function(){if(!r){var o=n.next(0),s=zi([o.value.H],e,Wn);r={attributes:s.attributes.map((function(e){return{node:e,G:null}})),Ua:s.Ua.map((function(e){return{node:e,G:null}}))},a=o.value.fa}if(0===(s=t.next(0)).value.H.length)throw Zn();if(1!==s.value.H.length)throw Vn();if(!(Z(s.value.H[0].type,54)||Z(s.value.H[0].type,47)||Z(s.value.H[0].type,56)||Z(s.value.H[0].type,58)||Z(s.value.H[0].type,57)))throw Vn();if(null===(i=Ue(e.h,s.value.H[0].value,null)))throw Error("XUDY0009: The target "+s.value.H[0].value.outerHTML+" for replacing a node must have a parent.");if(o=s.value.H[0],s=s.value.fa,Z(o.type,47)){if(r.Ua.length)throw Error("XUTY0011: When replacing an attribute the new value must be zero or more attribute nodes.");r.attributes.reduce((function(e,t){var n=t.node.prefix||"";t=t.node.namespaceURI;var r=i.node.lookupNamespaceURI(n);if(r&&r!==t)throw zn(t);if((r=e[n])&&t!==r)throw Wn(t);return e[n]=t,e}),{})}else if(r.attributes.length)throw Error("XUTY0010: When replacing an an element, text, comment, or processing instruction node the new value must be a single node.");return W({H:[],fa:or([Ji(o.value,[].concat(r.attributes,r.Ua))],a,s)})}}}(t,n,e)},v(uo,sr),uo.prototype.evaluate=function(e,t){return lr(e=this.o(e,t),(function(){}))},uo.prototype.o=function(e,t){var n,r,a,i=this,o=t.h,s=t.o,u=t.B,l=[],h=[],p=[];return{next:function(){if(h.length!==i.h.length)for(var f={},d=h.length;d<i.h.length;f={gb:f.gb},d++){var m=i.h[d],v=l[d];if(v||(l[d]=v=ur(m.eb)(e,t)),1!==(v=v.next(0)).value.H.length||!Z(v.value.H[0].type,53))throw Error("XUTY0013: The source expression of a copy modify expression must return a single node.");f.gb=Xe(Di(v.value.H[0].value,t)),h.push(f.gb.value),p.push(v.value.fa),e=bt(e,((v={})[m.sc]=function(e){return function(){return se.s(e.gb)}}(f),v))}return a||(n||(n=ur(i.C)(e,t)),a=n.next(0).value.fa),a.forEach((function(e){if(e.target&&!function e(t,n,r){if(n.find((function(e){return zt(e,t)})))return!0;var a=Ue(r,t);return!!a&&e(a,n,r)}(e.target,h,o))throw Error("XUDY0014: The target "+e.target.node.outerHTML+" must be a node created by the copy clause.");if("put"===e.type)throw Error("XUDY0037: The modify expression of a copy modify expression can not contain a fn:put.")})),ir(f=a.map((function(e){return so(e=e.h(t))})),o,s,u),r||(r=ur(i.v)(e,t)),W({H:(f=r.next(0)).value.H,fa:or.apply(null,[f.value.fa].concat(c(p)))})}}},uo.prototype.P=function(e){Ho(e),this.h.forEach((function(t){return t.sc=Xo(e,t.Qb.namespaceURI,t.Qb.localName)})),sr.prototype.P.call(this,e),Lo(e),this.I=this.h.some((function(e){return e.eb.I}))||this.v.I},v(co,$n),co.prototype.evaluate=function(e,t){var n,r,a,i=this,o=!1;return se.create({next:function(){if(o)return z;if(!r){if(i.o){if(!n){var s=i.o.evaluate(e,t);n=ao(i.v,t,s)}r=n.next(0).value.value}else r=i.name;if(r&&("xmlns"===r.prefix||!r.prefix&&"xmlns"===r.localName||"http://www.w3.org/2000/xmlns/"===r.namespaceURI||"xml"===r.prefix&&"http://www.w3.org/XML/1998/namespace"!==r.namespaceURI||r.prefix&&"xml"!==r.prefix&&"http://www.w3.org/XML/1998/namespace"===r.namespaceURI))throw Error('XQDY0044: The node name "'+r.va()+'" is invalid for a computed attribute constructor.')}return i.h.tb?(s=i.h.tb,a||(a=Bt(s.map((function(n){return St(n.evaluate(e,t),t).M((function(e){return se.s(Y(e.map((function(e){return e.value})).join(" "),1))}))}))).M((function(e){return se.s(Xe(lo(r,e.map((function(e){return e.value})).join(""))))})).value),a.next(0)):(o=!0,W(Xe(lo(r,i.h.value))))}})},co.prototype.P=function(e){if(this.v=Po(e),this.name&&this.name.prefix&&!this.name.namespaceURI){var t=e.ga(this.name.prefix);if(void 0===t&&this.name.prefix)throw It(this.name.prefix);this.name.namespaceURI=t||null}$n.prototype.P.call(this,e)},v(ho,$n),ho.prototype.evaluate=function(e,t){var n={data:"",Pa:!0,nodeType:8},r={node:n,G:null};return this.h?St(e=er(this.h,e,t),t).M((function(e){if(-1!==(e=e.map((function(e){return Jt(e,1).value})).join(" ")).indexOf("--\x3e"))throw Error('XQDY0072: The contents of the data of a comment may not include "--\x3e"');return n.data=e,se.s(Xe(r))})):se.s(Xe(r))},v(po,$n),po.prototype.evaluate=function(e,t){var n,r,a,i,o,s=this,u=!1,l=!1,c=!1;return se.create({next:function(){if(c)return z;if(u||(n||(n=Bt(s.C.map((function(n){return er(n,e,t)})))),r=n.S(),u=!0),!l){a||(a=s.ka.map((function(n){return er(n,e,t)})));for(var h=[],p=0;p<a.length;p++){var f=a[p].S();h.push(f)}i=h,l=!0}if(s.o&&(o||(h=s.o.evaluate(e,t),o=ao(s.v,t,h)),h=o.next(0),s.h=h.value.value),"xmlns"===s.h.prefix||"http://www.w3.org/2000/xmlns/"===s.h.namespaceURI||"xml"===s.h.prefix&&"http://www.w3.org/XML/1998/namespace"!==s.h.namespaceURI||s.h.prefix&&"xml"!==s.h.prefix&&"http://www.w3.org/XML/1998/namespace"===s.h.namespaceURI)throw Error('XQDY0096: The node name "'+s.h.va()+'" is invalid for a computed element constructor.');var d={nodeType:1,Pa:!0,attributes:[],childNodes:[],nodeName:s.h.va(),namespaceURI:s.h.namespaceURI,prefix:s.h.prefix,localName:s.h.localName};for(h={node:d,G:null},r.forEach((function(e){d.attributes.push(e.value.node)})),(p=zi(i,t,li)).attributes.forEach((function(e){if(d.attributes.find((function(t){return t.namespaceURI===e.namespaceURI&&t.localName===e.localName})))throw Error("XQDY0025: The attribute "+e.name+" does not have an unique name in the constructed element.");d.attributes.push(e)})),p.Ua.forEach((function(e){d.childNodes.push(e)})),p=0;p<d.childNodes.length;p++)if(Ne(f=d.childNodes[p])&&3===f.nodeType){var m=d.childNodes[p-1];m&&Ne(m)&&3===m.nodeType&&(m.data+=f.data,d.childNodes.splice(p,1),p--)}return c=!0,W(Xe(h))}})},po.prototype.P=function(e){var t=this;if(Ho(e),Object.keys(this.N).forEach((function(n){e.o[e.h][n]=t.N[n]})),this.J.forEach((function(t){return t.P(e)})),this.C.reduce((function(t,n){if(n.name){if(n="Q{"+(n.name.namespaceURI||e.ga(n.name.prefix))+"}"+n.name.localName,t.includes(n))throw Error("XQST0040: The attribute "+n+" does not have an unique name in the constructed element.");t.push(n)}return t}),[]),this.h){var n=e.ga(this.h.prefix);if(void 0===n&&this.h.prefix)throw It(this.h.prefix);this.h.namespaceURI=n||null}this.v=Po(e),Lo(e)},v(vo,$n),vo.prototype.evaluate=function(e,t){var n=this;return St(er(this.o,e,t),t).M((function(r){var a=r.map((function(e){return Jt(e,1).value})).join(" ");if(-1!==a.indexOf("?>"))throw Error('XQDY0026: The contents of the data of a processing instruction may not include "?>"');if(null!==n.h.Mb)return fo(r=n.h.Mb),se.s(Xe(mo(r,a)));r=er(n.h.Db,e,t);var i=ro(t,r);return se.create({next:function(){var e=i.next(0);return e.done?e:(fo(e=e.value.value),W(Xe(mo(e,a))))}})}))},v(go,$n),go.prototype.evaluate=function(e,t){return this.h?St(e=er(this.h,e,t),t).M((function(e){return 0===e.length?se.empty():(e={node:{data:e.map((function(e){return Jt(e,1).value})).join(" "),Pa:!0,nodeType:3},G:null},se.s(Xe(e)))})):se.empty()},v(yo,cr),yo.prototype.v=function(e,t,n){var r=this;return n[0](e).M((function(a){for(var i=0;i<r.h;i++)if(r.N[i].some((function(n){switch(n.pc){case"?":if(1<a.length)return!1;break;case"*":break;case"+":if(1>a.length)return!1;break;default:if(1!==a.length)return!1}var r=se.create(a);return a.every((function(a,i){return a=xt(e,i,a,r),er(n.Nb,a,t).getEffectiveBooleanValue()}))})))return n[i+1](e);return n[r.h+1](e)}))},yo.prototype.P=function(e){if(cr.prototype.P.call(this,e),this.C.I)throw Ln()};var wo={ca:!1,qa:!1},Ao={ca:!0,qa:!1},xo={ca:!0,qa:!0};function bo(e){return e.ca?e.qa?xo:Ao:wo}function Eo(e,t){switch(e[0]){case"andOp":var n=Lr(e,"type");return new Ha(No("andOp",e,bo(t)),n);case"orOp":return n=Lr(e,"type"),new ja(No("orOp",e,bo(t)),n);case"unaryPlusOp":return n=Xr(Xr(e,"operand"),"*"),e=Lr(e,"type"),new Pa("+",Eo(n,t),e);case"unaryMinusOp":return n=Xr(Xr(e,"operand"),"*"),e=Lr(e,"type"),new Pa("-",Eo(n,t),e);case"addOp":case"subtractOp":case"multiplyOp":case"divOp":case"idivOp":case"modOp":var r=e[0],a=Eo(kr(e,["firstOperand","*"]),bo(t));t=Eo(kr(e,["secondOperand","*"]),bo(t));var i=Lr(e,"type"),o=Lr(kr(e,["firstOperand","*"]),"type"),s=Lr(kr(e,["secondOperand","*"]),"type");return o&&s&&Lr(e,"type")&&(n=Ra(r,o.type,s.type)),new Ga(r,a,t,i,n);case"sequenceExpr":return function(e,t){var n=qr(e,"*").map((function(e){return Eo(e,t)}));return 1===n.length?n[0]:(n=Lr(e,"type"),new Wa(qr(e,"*").map((function(e){return Eo(e,t)})),n))}(e,t);case"unionOp":return n=Lr(e,"type"),new oi([Eo(kr(e,["firstOperand","*"]),bo(t)),Eo(kr(e,["secondOperand","*"]),bo(t))],n);case"exceptOp":case"intersectOp":return n=Lr(e,"type"),new za(e[0],Eo(kr(e,["firstOperand","*"]),bo(t)),Eo(kr(e,["secondOperand","*"]),bo(t)),n);case"stringConcatenateOp":return function(e,t){var n=Lr(e,"type");return new wr(new Ea({localName:"concat",namespaceURI:"http://www.w3.org/2005/xpath-functions",prefix:""},(e=[Xr(e,"firstOperand")[1],Xr(e,"secondOperand")[1]]).length,n),e.map((function(e){return Eo(e,bo(t))})),n)}(e,t);case"rangeSequenceExpr":return function(e,t){var n=Lr(e,"type");return new wr(new Ea({localName:"to",namespaceURI:"http://fontoxpath/operators",prefix:""},(e=[Xr(e,"startExpr")[1],Xr(e,"endExpr")[1]]).length,n),e.map((function(e){return Eo(e,bo(t))})),n)}(e,t);case"equalOp":case"notEqualOp":case"lessThanOrEqualOp":case"lessThanOp":case"greaterThanOrEqualOp":case"greaterThanOp":case"eqOp":case"neOp":case"ltOp":case"leOp":case"gtOp":case"geOp":case"isOp":case"nodeBeforeOp":case"nodeAfterOp":return n=kr(e,["firstOperand","*"]),r=kr(e,["secondOperand","*"]),a=Lr(n,"type"),i=Lr(r,"type"),new Ja(e[0],Eo(n,bo(t)),Eo(r,bo(t)),a,i);case"pathExpr":return function(e,t){var n=Lr(e,"type"),r=qr(e,"stepExpr"),a=!1,i=r.map((function(e){var r=Xr(e,"xpathAxis");if(r){a=!0;var i=Xr(e,"attributeTest anyElementTest piTest documentTest elementTest commentTest namespaceTest anyKindTest textTest anyFunctionTest typedFunctionTest schemaAttributeTest atomicType anyItemType parenthesizedItemType typedMapTest typedArrayTest nameTest Wildcard".split(" "));switch(i=Bo(i),_r(r)){case"ancestor":var o=new Wr(i,{Na:!1});break;case"ancestor-or-self":o=new Wr(i,{Na:!0});break;case"attribute":o=new Zr(i);break;case"child":o=new $r(i);break;case"descendant":o=new ta(i,{Na:!1});break;case"descendant-or-self":o=new ta(i,{Na:!0});break;case"parent":o=new oa(i);break;case"following-sibling":o=new ia(i);break;case"preceding-sibling":o=new ua(i);break;case"following":o=new aa(i);break;case"preceding":o=new sa(i);break;case"self":o=new la(i)}}else o=Eo(o=kr(e,["filterExpr","*"]),bo(t));for(r=(e=u(e=qr(e,"*"))).next();!r.done;r=e.next())switch(r=r.value,r[0]){case"lookup":o=new bi(o,Co(r,t));break;case"predicate":case"predicates":o=qr(r,"*").reduce((function(e,n){return new wi(e,Eo(n,bo(t)))}),o)}return o.type=n,o}));return e=Xr(e,"rootExpr"),!(r=a||null!==e||1<r.length)&&1===i.length||!e&&1===i.length&&"sorted"===i[0].B?i[0]:e&&0===i.length?new vi(null):(i=new yi(i,r),e?new vi(i):i)}(e,t);case"contextItemExpr":return new gi(e=Lr(e,"type"));case"functionCallExpr":return function(e,t){var n=Xr(e,"functionName"),r=qr(Xr(e,"arguments"),"*");return e=Lr(e,"type"),new wr(new Ea(Yr(n),r.length,e),r.map((function(e){return"argumentPlaceholder"===e[0]?null:Eo(e,t)})),e)}(e,t);case"inlineFunctionExpr":return function(e,t){var n=qr(Xr(e,"paramList"),"*"),r=kr(e,["functionBody","*"]),a=Lr(e,"type");return new ma(n.map((function(e){return{name:Yr(Xr(e,"varName")),type:Vr(e)}})),Vr(e),r?Eo(r,t):new Wa([],a))}(e,t);case"arrowExpr":return function(e,t){var n=Lr(e,"type"),r=kr(e,["argExpr","*"]);e=qr(e,"*").slice(1),r=[Eo(r,t)];for(var a=0;a<e.length;a++)if("arguments"!==e[a][0]){if("arguments"===e[a+1][0]){var i=qr(e[a+1],"*");r=r.concat(i.map((function(e){return"argumentPlaceholder"===e[0]?null:Eo(e,t)})))}i="EQName"===e[a][0]?new Ea(Yr(e[a]),r.length,n):Eo(e[a],bo(t)),r=[new wr(i,r,n)]}return r[0]}(e,t);case"dynamicFunctionInvocationExpr":return function(e,t){var n=kr(e,["functionItem","*"]),r=Lr(e,"type");e=Xr(e,"arguments");var a=[];return e&&(a=qr(e,"*").map((function(e){return"argumentPlaceholder"===e[0]?null:Eo(e,t)}))),new wr(Eo(n,t),a,r)}(e,t);case"namedFunctionRef":return t=Xr(e,"functionName"),n=Lr(e,"type"),e=_r(kr(e,["integerConstantExpr","value"])),new Ea(Yr(t),parseInt(e,10),n);case"integerConstantExpr":return new ga(_r(Xr(e,"value")),{type:5,g:3});case"stringConstantExpr":return new ga(_r(Xr(e,"value")),{type:1,g:3});case"decimalConstantExpr":return new ga(_r(Xr(e,"value")),{type:4,g:3});case"doubleConstantExpr":return new ga(_r(Xr(e,"value")),{type:3,g:3});case"varRef":return new Si((e=Yr(Xr(e,"name"))).prefix,e.namespaceURI,e.localName);case"flworExpr":return function(e,t){var n=qr(e,"*");if(e=Xr(n[n.length-1],"*"),1<(n=n.slice(0,-1)).length&&!t.ca)throw Error("XPST0003: Use of XQuery FLWOR expressions in XPath is no allowed");return n.reduceRight((function(e,n){switch(n[0]){case"forClause":for(var r=(n=qr(n,"*")).length-1;0<=r;--r){var a=n[r],i=kr(a,["forExpr","*"]),o=Xr(a,"positionalVariableBinding");e=new da(Yr(kr(a,["typedVariableBinding","varName"])),Eo(i,bo(t)),o?Yr(o):null,e)}return e;case"letClause":for(r=(n=qr(n,"*")).length-1;0<=r;--r)i=kr(a=n[r],["letExpr","*"]),e=new va(Yr(kr(a,["typedVariableBinding","varName"])),Eo(i,bo(t)),e);return e;case"whereClause":for(r=(n=qr(n,"*")).length-1;0<=r;--r)e=new Ri(Eo(n[r],t),e);return e;case"windowClause":case"groupByClause":throw Error("Not implemented: "+n[0]+" is not implemented yet.");case"orderByClause":return function(e,t,n){return new mi((e=qr(e,"*")).filter((function(e){return"stable"!==e[0]})).map((function(e){var n=Xr(e,"orderModifier"),r=n?Xr(n,"orderingKind"):null;return n=n?Xr(n,"emptyOrderingMode"):null,r=!r||"ascending"===_r(r),n=!n||"empty least"===_r(n),{ia:Eo(kr(e,["orderByExpr","*"]),t),Ib:r,mc:n}})),n)}(n,t,e);case"countClause":throw Error("Not implemented: "+n[0]+" is not implemented yet.");default:throw Error("Not implemented: "+n[0]+" is not supported in a flwor expression")}}),Eo(e,t))}(e,t);case"quantifiedExpr":return function(e,t){var n=Lr(e,"type"),r=_r(Xr(e,"quantifier")),a=kr(e,["predicateExpr","*"]);return e=qr(e,"quantifiedExprInClause").map((function(e){return{name:Yr(kr(e,["typedVariableBinding","varName"])),eb:Eo(e=kr(e,["sourceExpr","*"]),bo(t))}})),new Bi(r,e,Eo(a,bo(t)),n)}(e,t);case"ifThenElseExpr":return n=Lr(e,"type"),new ca(Eo(Xr(Xr(e,"ifClause"),"*"),bo(t)),Eo(Xr(Xr(e,"thenClause"),"*"),t),Eo(Xr(Xr(e,"elseClause"),"*"),t),n);case"instanceOfExpr":return n=Eo(kr(e,["argExpr","*"]),t),r=kr(e,["sequenceType","*"]),a=kr(e,["sequenceType","occurrenceIndicator"]),e=Lr(e,"type"),new ni(n,Eo(r,bo(t)),a?_r(a):"",e);case"castExpr":return t=Eo(Xr(Xr(e,"argExpr"),"*"),bo(t)),n=Xr(e,"singleType"),new ei(t,e=Yr(Xr(n,"atomicType")),n=null!==Xr(n,"optional"));case"castableExpr":return t=Eo(Xr(Xr(e,"argExpr"),"*"),bo(t)),n=Xr(e,"singleType"),new $a(t,e=Yr(Xr(n,"atomicType")),n=null!==Xr(n,"optional"));case"simpleMapExpr":return function(e,t){var n=Lr(e,"type");return qr(e,"*").reduce((function(e,r){return null===e?Eo(r,bo(t)):new Za(e,Eo(r,bo(t)),n)}),null)}(e,t);case"mapConstructor":return function(e,t){var n=Lr(e,"type");return new ya(qr(e,"mapConstructorEntry").map((function(e){return{key:Eo(kr(e,["mapKeyExpr","*"]),bo(t)),value:Eo(kr(e,["mapValueExpr","*"]),bo(t))}})),n)}(e,t);case"arrayConstructor":return function(e,t){var n=Lr(e,"type"),r=qr(e=Xr(e,"*"),"arrayElem").map((function(e){return Eo(Xr(e,"*"),bo(t))}));switch(e[0]){case"curlyArray":return new Jr(r,n);case"squareArray":return new Kr(r,n);default:throw Error("Unrecognized arrayType: "+e[0])}}(e,t);case"unaryLookup":return n=Lr(e,"type"),new Ei(Co(e,t),n);case"typeswitchExpr":return function(e,t){if(!t.ca)throw Error("XPST0003: Use of XQuery functionality is not allowed in XPath context");var n=Lr(e,"type"),r=Eo(Xr(Xr(e,"argExpr"),"*"),t),a=qr(e,"typeswitchExprCaseClause").map((function(e){var n=0===qr(e,"sequenceTypeUnion").length?[Xr(e,"sequenceType")]:qr(Xr(e,"sequenceTypeUnion"),"sequenceType");return{jc:Eo(kr(e,["resultExpr","*"]),t),Ob:n.map((function(e){var n=Xr(e,"occurrenceIndicator");return{pc:n?_r(n):"",Nb:Eo(Xr(e,"*"),t)}}))}}));return e=Eo(kr(e,["typeswitchExprDefaultClause","resultExpr","*"]),t),new yo(r,a,e,n)}(e,t);case"elementConstructor":return function(e,t){if(!t.ca)throw Error("XPST0003: Use of XQuery functionality is not allowed in XPath context");var n=Yr(Xr(e,"tagName")),r=Xr(e,"attributeList"),a=r?qr(r,"attributeConstructor").map((function(e){return Eo(e,bo(t))})):[];return r=r?qr(r,"namespaceDeclaration").map((function(e){var t=Xr(e,"prefix");return{prefix:t?_r(t):"",uri:_r(Xr(e,"uri"))}})):[],e=(e=Xr(e,"elementContent"))?qr(e,"*").map((function(e){return Eo(e,bo(t))})):[],new po(n,a,r,e)}(e,t);case"attributeConstructor":return function(e,t){if(!t.ca)throw Error("XPST0003: Use of XQuery functionality is not allowed in XPath context");var n=Yr(Xr(e,"attributeName")),r=Xr(e,"attributeValue");return r=r?_r(r):null,e=(e=Xr(e,"attributeValueExpr"))?qr(e,"*").map((function(e){return Eo(e,bo(t))})):null,new co(n,{value:r,tb:e})}(e,t);case"computedAttributeConstructor":return(n=Xr(e,"tagName"))?n=Yr(n):(n=Xr(e,"tagNameExpr"),n={Ja:Eo(Xr(n,"*"),bo(t))}),new co(n,{tb:[e=Eo(Xr(Xr(e,"valueExpr"),"*"),bo(t))]});case"computedCommentConstructor":if(!t.ca)throw Error("XPST0003: Use of XQuery functionality is not allowed in XPath context");return new ho(e=(e=Xr(e,"argExpr"))?Eo(Xr(e,"*"),bo(t)):null);case"computedTextConstructor":if(!t.ca)throw Error("XPST0003: Use of XQuery functionality is not allowed in XPath context");return new go(e=(e=Xr(e,"argExpr"))?Eo(Xr(e,"*"),bo(t)):null);case"computedElementConstructor":return function(e,t){var n=Xr(e,"tagName");return n?n=Yr(n):(n=Xr(e,"tagNameExpr"),n={Ja:Eo(Xr(n,"*"),bo(t))}),e=(e=Xr(e,"contentExpr"))?qr(e,"*").map((function(e){return Eo(e,bo(t))})):[],new po(n,[],[],e)}(e,t);case"computedPIConstructor":if(!t.ca)throw Error("XPST0003: Use of XQuery functionality is not allowed in XPath context");return n=Xr(e,"piTargetExpr"),r=Xr(e,"piTarget"),a=Xr(e,"piValueExpr"),e=Lr(e,"type"),new vo({Db:n?Eo(Xr(n,"*"),bo(t)):null,Mb:r?_r(r):null},a?Eo(Xr(a,"*"),bo(t)):new Wa([],e));case"CDataSection":return new ga(_r(e),{type:1,g:3});case"deleteExpr":return new Ki(e=Eo(kr(e,["targetExpr","*"]),t));case"insertExpr":switch(n=Eo(kr(e,["sourceExpr","*"]),t),(a=qr(e,"*")[1])[0]){case"insertAfter":r=1;break;case"insertBefore":r=2;break;case"insertInto":r=(r=Xr(a,"*"))?"insertAsFirst"===r[0]?4:5:3}return new Zi(n,r,e=Eo(kr(e,["targetExpr","*"]),t));case"renameExpr":return new io(n=Eo(kr(e,["targetExpr","*"]),t),e=Eo(kr(e,["newNameExpr","*"]),t));case"replaceExpr":return new oo(n=!!Xr(e,"replaceValue"),r=Eo(kr(e,["targetExpr","*"]),t),e=Eo(kr(e,["replacementExpr","*"]),t));case"transformExpr":return function(e,t){var n=qr(Xr(e,"transformCopies"),"transformCopy").map((function(e){var n=Yr(Xr(Xr(e,"varRef"),"name"));return{eb:Eo(Xr(Xr(e,"copySource"),"*"),t),Qb:new ve(n.prefix,n.namespaceURI,n.localName)}})),r=Eo(Xr(Xr(e,"modifyExpr"),"*"),t);return e=Eo(Xr(Xr(e,"returnExpr"),"*"),t),new uo(n,r,e)}(e,t);case"x:stackTrace":for(n=e[1],e=e[2];"x:stackTrace"===e[0];)e=e[2];return new pa(n,e[0],Eo(e,t));default:return Bo(e)}}function Bo(e){switch(e[0]){case"nameTest":return new Ti(Yr(e));case"piTest":return(e=Xr(e,"piTarget"))?new Ii(_r(e)):new Ci(7);case"commentTest":return new Ci(8);case"textTest":return new Ci(3);case"documentTest":return new Ci(9);case"attributeTest":var t=(e=Xr(e,"attributeName"))&&Xr(e,"star");return!e||t?new Ci(2):new Ti(Yr(Xr(e,"QName")),{kind:2});case"elementTest":return t=(e=Xr(e,"elementName"))&&Xr(e,"star"),!e||t?new Ci(1):new Ti(Yr(Xr(e,"QName")),{kind:1});case"anyKindTest":return new Oi({prefix:"",namespaceURI:null,localName:"node()"});case"anyMapTest":return new Oi({prefix:"",namespaceURI:null,localName:"map(*)"});case"anyArrayTest":return new Oi({prefix:"",namespaceURI:null,localName:"array(*)"});case"Wildcard":return Xr(e,"star")?(t=Xr(e,"uri"))?e=new Ti({localName:"*",namespaceURI:_r(t),prefix:""}):(t=Xr(e,"NCName"),e="star"===Xr(e,"*")[0]?new Ti({localName:_r(t),namespaceURI:null,prefix:"*"}):new Ti({localName:"*",namespaceURI:null,prefix:_r(t)})):e=new Ti({localName:"*",namespaceURI:null,prefix:"*"}),e;case"atomicType":return new Oi(e=Yr(e));case"anyItemType":return new Oi({prefix:"",namespaceURI:null,localName:"item()"});default:throw Error("No selector counterpart for: "+e[0]+".")}}function No(e,t,n){var r=[];return function t(a){var i=Xr(a,"firstOperand")[1];a=Xr(a,"secondOperand")[1],i[0]===e?t(i):r.push(Eo(i,n)),a[0]===e?t(a):r.push(Eo(a,n))}(t),r}function Co(e,t){switch((e=Xr(e,"*"))[0]){case"NCName":return new ga(_r(e),{type:1,g:3});case"star":return"*";default:return Eo(e,bo(t))}}function To(e,t){return Eo(e,t)}var Io={};!function(e){(function(){!function(e){function t(e,n,r,a){return e=Error.call(this,e),Object.setPrototypeOf&&Object.setPrototypeOf(e,t.prototype),e.wc=n,e.xc=r,e.location=a,e.name="SyntaxError",e}function n(e,t,n){return n=n||" ",e.length>t?e:(t-=e.length,e+(n+=n.repeat(t)).slice(0,t))}!function(e,t){function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n}(t,Error),t.prototype.format=function(e){var t="Error: "+this.message;if(this.location){var r,a=null;for(r=0;r<e.length;r++)if(e[r].source===this.location.source){a=e[r].text.split(/\r\n|\n|\r/g);break}if(e=this.location.start,r=this.location.source+":"+e.line+":"+e.da,a){var i=this.location.end,o=n("",e.line.toString().length);a=a[e.line-1],i=e.line===i.line?i.da:a.length+1,t+="\n --\x3e "+r+"\n"+o+" |\n"+e.line+" | "+a+"\n"+o+" | "+n("",e.da-1)+n("",i-e.da,"^")}else t+="\n at "+r}return t},t.ic=function(e,t){function n(e){return e.charCodeAt(0).toString(16).toUpperCase()}function r(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+n(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+n(e)}))}function a(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+n(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+n(e)}))}function i(e){return o[e.type](e)}var o={literal:function(e){return'"'+r(e.text)+'"'},class:function(e){var t=e.rc.map((function(e){return Array.isArray(e)?a(e[0])+"-"+a(e[1]):a(e)}));return"["+(e.lc?"^":"")+t+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(e){return e.description}};return"Expected "+function(e){var t,n;if((e=e.map(i)).sort(),0<e.length){for(n=t=1;t<e.length;t++)e[t-1]!==e[t]&&(e[n]=e[t],n++);e.length=n}switch(e.length){case 1:return e[0];case 2:return e[0]+" or "+e[1];default:return e.slice(0,-1).join(", ")+", or "+e[e.length-1]}}(e)+" but "+(t?'"'+r(t)+'"':"end of input")+" found."},e.tc={SyntaxError:t,parse:function(e,n){function r(e,t,n){return["decimalFormatParam",["decimalFormatParamName",t],["decimalFormatParamValue",n]]}function a(e,t){return{type:"literal",text:e,ignoreCase:t}}function i(e,t,n){return{type:"class",rc:e,lc:t,ignoreCase:n}}function o(t){var n,r=Jl[t];if(r)return r;for(n=t-1;!Jl[n];)n--;for(r={line:(r=Jl[n]).line,da:r.da};n<t;)10===e.charCodeAt(n)?(r.line++,r.da=1):r.da++,n++;return Jl[t]=r}function s(e,t){var n=o(e),r=o(t);return{source:tt,start:{offset:e,line:n.line,da:n.da},end:{offset:t,line:r.line,da:r.da}}}function u(e){Vl<Kl||(Vl>Kl&&(Kl=Vl,zl=[]),zl.push(e))}function l(){var t,n,r=233*Vl;if(t=Zl[r])return Vl=t.i,t.result;t=Vl,He();var a=233*Vl+2;if(n=Zl[a])Vl=n.i,a=n.result;else{if(n=Vl,e.substr(Vl,6)===at){var i=at;Vl+=6}else i=et,0===Wl&&u(Ni);if(i!==et){if(He(),i=Vl,e.substr(Vl,8)===it){var o=it;Vl+=8}else o=et,0===Wl&&u(Ci);if(o!==et?(o=je())!==et?(o=Ce())!==et?(Ql=i,i=["encoding",o]):(Vl=i,i=et):(Vl=i,i=et):(Vl=i,i=et),i===et)if(i=Vl,e.substr(Vl,7)===ot?(o=ot,Vl+=7):(o=et,0===Wl&&u(Ti)),o!==et)if((o=je())!==et)if((o=Ce())!==et){var s=Vl,l=je();l!==et?(e.substr(Vl,8)===it?(l=it,Vl+=8):(l=et,0===Wl&&u(Ci)),l!==et?(l=je())!==et?(l=Ce())!==et?(Ql=s,s=l):(Vl=s,s=et):(Vl=s,s=et):(Vl=s,s=et)):(Vl=s,s=et),s===et&&(s=null),Ql=i,i=[["version",o]].concat(s?[["encoding",s]]:[])}else Vl=i,i=et;else Vl=i,i=et;else Vl=i,i=et;i!==et?(He(),(o=h())!==et?(Ql=n,n=["versionDecl"].concat(i)):(Vl=n,n=et)):(Vl=n,n=et)}else Vl=n,n=et;Zl[a]={i:Vl,result:n},a=n}if(a===et&&(a=null),He(),i=Zl[n=233*Vl+3])Vl=i.i,n=i.result;else{if(i=Vl,s=Zl[o=233*Vl+4])Vl=s.i,o=s.result;else{if(s=Vl,e.substr(Vl,6)===st?(l=st,Vl+=6):(l=et,0===Wl&&u(Ii)),l!==et)if((l=je())!==et)if(e.substr(Vl,9)===ut?(l=ut,Vl+=9):(l=et,0===Wl&&u(Oi)),l!==et)if((l=je())!==et){l=Vl;var p=Me();if((l=p!==et?e.substring(l,Vl):p)!==et)if(He(),61===e.charCodeAt(Vl)?(p=lt,Vl++):(p=et,0===Wl&&u(Si)),p!==et)if(He(),(p=Ce())!==et)He(),h()!==et?(Ql=s,s=["moduleDecl",["prefix",l],["uri",p]]):(Vl=s,s=et);else Vl=s,s=et;else Vl=s,s=et;else Vl=s,s=et}else Vl=s,s=et;else Vl=s,s=et;else Vl=s,s=et;else Vl=s,s=et;Zl[o]={i:Vl,result:s},o=s}o!==et?(He(),s=c(),Ql=i,i=["libraryModule",o].concat(s?[s]:[])):(Vl=i,i=et),Zl[n]={i:Vl,result:i},n=i}return n===et&&((i=Zl[n=233*Vl+1])?(Vl=i.i,n=i.result):(i=Vl,o=c(),He(),(l=Zl[s=233*Vl+36])?(Vl=l.i,s=l.result):(l=Vl,(p=C())!==et&&(Ql=l,p=["queryBody",p]),l=p,Zl[s]={i:Vl,result:l},s=l),s!==et?(Ql=i,i=["mainModule"].concat(o?[o]:[],[s])):(Vl=i,i=et),Zl[n]={i:Vl,result:i},n=i)),n!==et?(He(),Ql=t,t=["module"].concat(a?[a]:[],[n])):(Vl=t,t=et),Zl[r]={i:Vl,result:t},t}function c(){var e,t=233*Vl+5;if(e=Zl[t])return Vl=e.i,e.result;e=Vl;var n=[],r=Vl,a=v();if(a===et&&((a=p())===et&&((a=m())===et&&(a=d()))),a!==et){He();var i=h();i!==et?(He(),Ql=r,r=a):(Vl=r,r=et)}else Vl=r,r=et;for(;r!==et;)n.push(r),r=Vl,(a=v())===et&&((a=p())===et&&((a=m())===et&&(a=d()))),a!==et?(He(),(i=h())!==et?(He(),Ql=r,r=a):(Vl=r,r=et)):(Vl=r,r=et);if(r=[],a=Vl,(i=A())===et&&((i=g())===et&&(i=N())),i!==et){He();var o=h();o!==et?(He(),Ql=a,a=i):(Vl=a,a=et)}else Vl=a,a=et;for(;a!==et;)r.push(a),a=Vl,(i=A())===et&&((i=g())===et&&(i=N())),i!==et?(He(),(o=h())!==et?(He(),Ql=a,a=i):(Vl=a,a=et)):(Vl=a,a=et);return Ql=e,e=0===n.length&&0===r.length?null:["prolog"].concat(n,r),Zl[t]={i:Vl,result:e},e}function h(){var t,n=233*Vl+6;return(t=Zl[n])?(Vl=t.i,t.result):(59===e.charCodeAt(Vl)?(t=ct,Vl++):(t=et,0===Wl&&u(Ri)),Zl[n]={i:Vl,result:t},t)}function p(){var t,n,a=233*Vl+7;if(t=Zl[a])return Vl=t.i,t.result;if(n=Zl[t=233*Vl+8])Vl=n.i,t=n.result;else{if(n=Vl,e.substr(Vl,7)===ht){var i=ht;Vl+=7}else i=et,0===Wl&&u(Di);i!==et?(i=je())!==et?(e.substr(Vl,14)===pt?(i=pt,Vl+=14):(i=et,0===Wl&&u(Mi)),i!==et?(i=je())!==et?(e.substr(Vl,8)===ft?(i=ft,Vl+=8):(i=et,0===Wl&&u(Gi)),i===et&&(e.substr(Vl,5)===dt?(i=dt,Vl+=5):(i=et,0===Wl&&u(Ui))),i!==et?(Ql=n,n=["boundarySpaceDecl",i]):(Vl=n,n=et)):(Vl=n,n=et):(Vl=n,n=et)):(Vl=n,n=et):(Vl=n,n=et),Zl[t]={i:Vl,result:n},t=n}if(t===et&&((n=Zl[t=233*Vl+9])?(Vl=n.i,t=n.result):(n=Vl,e.substr(Vl,7)===ht?(i=ht,Vl+=7):(i=et,0===Wl&&u(Di)),i!==et?(i=je())!==et?(e.substr(Vl,7)===mt?(i=mt,Vl+=7):(i=et,0===Wl&&u(Fi)),i!==et?(i=je())!==et?(e.substr(Vl,9)===vt?(i=vt,Vl+=9):(i=et,0===Wl&&u(Pi)),i!==et?(i=je())!==et?(i=Ce())!==et?(Ql=n,n=["defaultCollationDecl",i]):(Vl=n,n=et):(Vl=n,n=et):(Vl=n,n=et)):(Vl=n,n=et):(Vl=n,n=et)):(Vl=n,n=et):(Vl=n,n=et),Zl[t]={i:Vl,result:n},t=n),t===et&&((n=Zl[t=233*Vl+10])?(Vl=n.i,t=n.result):(n=Vl,e.substr(Vl,7)===ht?(i=ht,Vl+=7):(i=et,0===Wl&&u(Di)),i!==et?(i=je())!==et?(e.substr(Vl,8)===gt?(i=gt,Vl+=8):(i=et,0===Wl&&u(Hi)),i!==et?(i=je())!==et?(i=Ce())!==et?(Ql=n,n=["baseUriDecl",i]):(Vl=n,n=et):(Vl=n,n=et):(Vl=n,n=et)):(Vl=n,n=et):(Vl=n,n=et),Zl[t]={i:Vl,result:n},t=n),t===et&&((n=Zl[t=233*Vl+11])?(Vl=n.i,t=n.result):(n=Vl,e.substr(Vl,7)===ht?(i=ht,Vl+=7):(i=et,0===Wl&&u(Di)),i!==et?(i=je())!==et?(e.substr(Vl,12)===yt?(i=yt,Vl+=12):(i=et,0===Wl&&u(ji)),i!==et?(i=je())!==et?(e.substr(Vl,5)===dt?(i=dt,Vl+=5):(i=et,0===Wl&&u(Ui)),i===et&&(e.substr(Vl,8)===ft?(i=ft,Vl+=8):(i=et,0===Wl&&u(Gi))),i!==et?(Ql=n,n=["constructionDecl",i]):(Vl=n,n=et)):(Vl=n,n=et):(Vl=n,n=et)):(Vl=n,n=et):(Vl=n,n=et),Zl[t]={i:Vl,result:n},t=n),t===et&&((n=Zl[t=233*Vl+12])?(Vl=n.i,t=n.result):(n=Vl,e.substr(Vl,7)===ht?(i=ht,Vl+=7):(i=et,0===Wl&&u(Di)),i!==et?(i=je())!==et?(e.substr(Vl,8)===wt?(i=wt,Vl+=8):(i=et,0===Wl&&u(Xi)),i!==et?(i=je())!==et?(e.substr(Vl,7)===At?(i=At,Vl+=7):(i=et,0===Wl&&u(_i)),i===et&&(e.substr(Vl,9)===xt?(i=xt,Vl+=9):(i=et,0===Wl&&u(Li))),i!==et?(Ql=n,n=["orderingModeDecl",i]):(Vl=n,n=et)):(Vl=n,n=et):(Vl=n,n=et)):(Vl=n,n=et):(Vl=n,n=et),Zl[t]={i:Vl,result:n},t=n),t===et&&((n=Zl[t=233*Vl+13])?(Vl=n.i,t=n.result):(n=Vl,e.substr(Vl,7)===ht?(i=ht,Vl+=7):(i=et,0===Wl&&u(Di)),i!==et?(i=je())!==et?(e.substr(Vl,7)===mt?(i=mt,Vl+=7):(i=et,0===Wl&&u(Fi)),i!==et?(i=je())!==et?(e.substr(Vl,5)===bt?(i=bt,Vl+=5):(i=et,0===Wl&&u(ki)),i!==et?(i=je())!==et?(e.substr(Vl,5)===Et?(i=Et,Vl+=5):(i=et,0===Wl&&u(qi)),i!==et?(i=je())!==et?(e.substr(Vl,8)===Bt?(i=Bt,Vl+=8):(i=et,0===Wl&&u(Yi)),i===et&&(e.substr(Vl,5)===Nt?(i=Nt,Vl+=5):(i=et,0===Wl&&u(Vi))),i!==et?(Ql=n,n=["emptyOrderDecl",i]):(Vl=n,n=et)):(Vl=n,n=et):(Vl=n,n=et)):(Vl=n,n=et):(Vl=n,n=et)):(Vl=n,n=et):(Vl=n,n=et)):(Vl=n,n=et):(Vl=n,n=et),Zl[t]={i:Vl,result:n},t=n),t===et)))))){var o;if(n=Zl[t=233*Vl+14])Vl=n.i,t=n.result;else{var s;if(n=Vl,e.substr(Vl,7)===ht?(i=ht,Vl+=7):(i=et,0===Wl&&u(Di)),i!==et)if((i=je())!==et)if(e.substr(Vl,15)===Ct?(i=Ct,Vl+=15):(i=et,0===Wl&&u(Qi)),i!==et)if((i=je())!==et)if((o=Zl[i=233*Vl+15])?(Vl=o.i,i=o.result):(e.substr(Vl,8)===ft?(o=ft,Vl+=8):(o=et,0===Wl&&u(Gi)),o===et&&(e.substr(Vl,11)===It?(o=It,Vl+=11):(o=et,0===Wl&&u(Ki))),Zl[i]={i:Vl,result:o},i=o),i!==et)if(He(),44===e.charCodeAt(Vl)?(o=Tt,Vl++):(o=et,0===Wl&&u(Ji)),o!==et)He(),(s=Zl[o=233*Vl+16])?(Vl=s.i,o=s.result):(e.substr(Vl,7)===Ot?(s=Ot,Vl+=7):(s=et,0===Wl&&u(zi)),s===et&&(e.substr(Vl,10)===St?(s=St,Vl+=10):(s=et,0===Wl&&u(Wi))),Zl[o]={i:Vl,result:s},o=s),o!==et?(Ql=n,n=["copyNamespacesDecl",["preserveMode",i],["inheritMode",o]]):(Vl=n,n=et);else Vl=n,n=et;else Vl=n,n=et;else Vl=n,n=et;else Vl=n,n=et;else Vl=n,n=et;else Vl=n,n=et;Zl[t]={i:Vl,result:n},t=n}if(t===et)if(n=Zl[t=233*Vl+17])Vl=n.i,t=n.result;else{if(n=Vl,e.substr(Vl,7)===ht?(i=ht,Vl+=7):(i=et,0===Wl&&u(Di)),i!==et)if((i=je())!==et){if(i=Vl,e.substr(Vl,14)===Rt?(o=Rt,Vl+=14):(o=et,0===Wl&&u(Zi)),o!==et)if((s=je())!==et){var l=Be();l!==et?(Ql=i,i=["decimalFormatName"].concat(l)):(Vl=i,i=et)}else Vl=i,i=et;else Vl=i,i=et;if(i===et&&(i=Vl,e.substr(Vl,7)===mt?(o=mt,Vl+=7):(o=et,0===Wl&&u(Fi)),o!==et?(s=je())!==et?(e.substr(Vl,14)===Rt?(l=Rt,Vl+=14):(l=et,0===Wl&&u(Zi)),l!==et?(Ql=i,i=null):(Vl=i,i=et)):(Vl=i,i=et):(Vl=i,i=et)),i!==et){if(o=[],s=Vl,(l=je())!==et)if((l=f())!==et){var c=je();c!==et?(61===e.charCodeAt(Vl)?(c=lt,Vl++):(c=et,0===Wl&&u(Si)),c!==et?(c=je())!==et?(c=Ce())!==et?(Ql=s,s=r(0,l,c)):(Vl=s,s=et):(Vl=s,s=et):(Vl=s,s=et)):(Vl=s,s=et)}else Vl=s,s=et;else Vl=s,s=et;for(;s!==et;)o.push(s),s=Vl,(l=je())!==et?(l=f())!==et?(c=je())!==et?(61===e.charCodeAt(Vl)?(c=lt,Vl++):(c=et,0===Wl&&u(Si)),c!==et?(c=je())!==et?(c=Ce())!==et?(Ql=s,s=r(0,l,c)):(Vl=s,s=et):(Vl=s,s=et):(Vl=s,s=et)):(Vl=s,s=et):(Vl=s,s=et):(Vl=s,s=et);Ql=n,n=["decimalFormatDecl"].concat(i?[i]:[],o)}else Vl=n,n=et}else Vl=n,n=et;else Vl=n,n=et;Zl[t]={i:Vl,result:n},t=n}}return Zl[a]={i:Vl,result:t},t}function f(){var t,n=233*Vl+18;return(t=Zl[n])?(Vl=t.i,t.result):(e.substr(Vl,17)===Dt?(t=Dt,Vl+=17):(t=et,0===Wl&&u($i)),t===et&&(e.substr(Vl,18)===Mt?(t=Mt,Vl+=18):(t=et,0===Wl&&u(eo)),t===et&&(e.substr(Vl,8)===Gt?(t=Gt,Vl+=8):(t=et,0===Wl&&u(to)),t===et&&(e.substr(Vl,10)===Ut?(t=Ut,Vl+=10):(t=et,0===Wl&&u(no)),t===et&&(e.substr(Vl,3)===Ft?(t=Ft,Vl+=3):(t=et,0===Wl&&u(ro)),t===et&&(e.substr(Vl,7)===Pt?(t=Pt,Vl+=7):(t=et,0===Wl&&u(ao)),t===et&&(e.substr(Vl,9)===Ht?(t=Ht,Vl+=9):(t=et,0===Wl&&u(io)),t===et&&(e.substr(Vl,10)===jt?(t=jt,Vl+=10):(t=et,0===Wl&&u(oo)),t===et&&(e.substr(Vl,5)===Xt?(t=Xt,Vl+=5):(t=et,0===Wl&&u(so)),t===et&&(e.substr(Vl,17)===_t?(t=_t,Vl+=17):(t=et,0===Wl&&u(uo)),t===et&&(e.substr(Vl,18)===Lt?(t=Lt,Vl+=18):(t=et,0===Wl&&u(lo)))))))))))),Zl[n]={i:Vl,result:t},t)}function d(){var t,n,r,a=233*Vl+19;if(t=Zl[a])return Vl=t.i,t.result;if(n=Zl[t=233*Vl+20])Vl=n.i,t=n.result;else{if(n=Vl,e.substr(Vl,6)===kt){var i=kt;Vl+=6}else i=et,0===Wl&&u(co);if(i!==et)if((i=je())!==et)if(e.substr(Vl,6)===qt?(i=qt,Vl+=6):(i=et,0===Wl&&u(ho)),i!==et){i=Vl;var o=je();if(o!==et){if(r=Zl[o=233*Vl+21])Vl=r.i,o=r.result;else{if(r=Vl,e.substr(Vl,9)===ut){var s=ut;Vl+=9}else s=et,0===Wl&&u(Oi);if(s!==et){var l=je();if(l!==et){var c=Me();if(c!==et){if(He(),61===e.charCodeAt(Vl)){var h=lt;Vl++}else h=et,0===Wl&&u(Si);h!==et?(Ql=r,r=["namespacePrefix",c]):(Vl=r,r=et)}else Vl=r,r=et}else Vl=r,r=et}else Vl=r,r=et;if(r===et){if(s=r=Vl,e.substr(Vl,7)===mt?(l=mt,Vl+=7):(l=et,0===Wl&&u(Fi)),l!==et)if((c=je())!==et){if(e.substr(Vl,7)===Vt){var p=Vt;Vl+=7}else p=et,0===Wl&&u(fo);if(p!==et)if((h=je())!==et){if(e.substr(Vl,9)===ut){var f=ut;Vl+=9}else f=et,0===Wl&&u(Oi);if(f!==et){var d=Ve();d!==et?s=l=[l,c,p,h,f,d]:(Vl=s,s=et)}else Vl=s,s=et}else Vl=s,s=et;else Vl=s,s=et}else Vl=s,s=et;else Vl=s,s=et;s!==et&&(Ql=r,s=["defaultElementNamespace"]),r=s}Zl[o]={i:Vl,result:r},o=r}o!==et?(Ql=i,i=o):(Vl=i,i=et)}else Vl=i,i=et;if(i===et&&(i=null),He(),(o=Ce())!==et){if(r=Vl,(s=je())!==et)if(e.substr(Vl,2)===Yt?(s=Yt,Vl+=2):(s=et,0===Wl&&u(po)),s!==et)if((s=je())!==et)if((s=Ce())!==et){for(l=[],c=Vl,(p=je())!==et?(44===e.charCodeAt(Vl)?(p=Tt,Vl++):(p=et,0===Wl&&u(Ji)),p!==et?(p=je())!==et?(p=Ce())!==et?(Ql=c,c=p):(Vl=c,c=et):(Vl=c,c=et):(Vl=c,c=et)):(Vl=c,c=et);c!==et;)l.push(c),c=Vl,(p=je())!==et?(44===e.charCodeAt(Vl)?(p=Tt,Vl++):(p=et,0===Wl&&u(Ji)),p!==et?(p=je())!==et?(p=Ce())!==et?(Ql=c,c=p):(Vl=c,c=et):(Vl=c,c=et):(Vl=c,c=et)):(Vl=c,c=et);Ql=r,r=[s].concat(l)}else Vl=r,r=et;else Vl=r,r=et;else Vl=r,r=et;else Vl=r,r=et;r===et&&(r=null),Ql=n,n=["schemaImport"].concat(i?[i]:[],[["targetNamespace",o]],r?[r]:[])}else Vl=n,n=et}else Vl=n,n=et;else Vl=n,n=et;else Vl=n,n=et;Zl[t]={i:Vl,result:n},t=n}if(t===et)if(n=Zl[t=233*Vl+22])Vl=n.i,t=n.result;else{if(n=Vl,e.substr(Vl,6)===kt?(i=kt,Vl+=6):(i=et,0===Wl&&u(co)),i!==et)if((i=je())!==et)if(e.substr(Vl,6)===st?(i=st,Vl+=6):(i=et,0===Wl&&u(Ii)),i!==et)if(i=Vl,(o=je())!==et?(e.substr(Vl,9)===ut?(o=ut,Vl+=9):(o=et,0===Wl&&u(Oi)),o!==et?(r=je())!==et?(s=Vl,(s=(l=Me())!==et?e.substring(s,Vl):l)!==et?(He(),61===e.charCodeAt(Vl)?(l=lt,Vl++):(l=et,0===Wl&&u(Si)),l!==et?(Ql=i,i=s):(Vl=i,i=et)):(Vl=i,i=et)):(Vl=i,i=et):(Vl=i,i=et)):(Vl=i,i=et),i===et&&(i=null),He(),(o=Ce())!==et){if(r=Vl,(s=je())!==et)if(e.substr(Vl,2)===Yt?(l=Yt,Vl+=2):(l=et,0===Wl&&u(po)),l!==et)if((l=je())!==et)if((s=Ce())!==et)for(r=[],s=Vl,l=He(),44===e.charCodeAt(Vl)?(c=Tt,Vl++):(c=et,0===Wl&&u(Ji)),c!==et?(p=He(),(h=Ce())!==et?s=l=[l,c,p,h]:(Vl=s,s=et)):(Vl=s,s=et);s!==et;)r.push(s),s=Vl,l=He(),44===e.charCodeAt(Vl)?(c=Tt,Vl++):(c=et,0===Wl&&u(Ji)),c!==et?(p=He(),(h=Ce())!==et?s=l=[l,c,p,h]:(Vl=s,s=et)):(Vl=s,s=et);else Vl=r;else Vl=r;else Vl=r;else Vl=r;Ql=n,n=["moduleImport",["namespacePrefix",i],["targetNamespace",o]]}else Vl=n,n=et;else Vl=n,n=et;else Vl=n,n=et;else Vl=n,n=et;Zl[t]={i:Vl,result:n},t=n}return Zl[a]={i:Vl,result:t},t}function m(){var t,n=233*Vl+23;if(t=Zl[n])return Vl=t.i,t.result;if(t=Vl,e.substr(Vl,7)===ht){var r=ht;Vl+=7}else r=et,0===Wl&&u(Di);if(r!==et)if((r=je())!==et)if(e.substr(Vl,9)===ut?(r=ut,Vl+=9):(r=et,0===Wl&&u(Oi)),r!==et)if((r=je())!==et)if((r=Me())!==et){if(He(),61===e.charCodeAt(Vl)){var a=lt;Vl++}else a=et,0===Wl&&u(Si);a!==et?(He(),(a=Ce())!==et?(Ql=t,t=["namespaceDecl",["prefix",r],["uri",a]]):(Vl=t,t=et)):(Vl=t,t=et)}else Vl=t,t=et;else Vl=t,t=et;else Vl=t,t=et;else Vl=t,t=et;else Vl=t,t=et;return Zl[n]={i:Vl,result:t},t}function v(){var t,n=233*Vl+24;if(t=Zl[n])return Vl=t.i,t.result;if(t=Vl,e.substr(Vl,7)===ht){var r=ht;Vl+=7}else r=et,0===Wl&&u(Di);if(r!==et)if((r=je())!==et)if(e.substr(Vl,7)===mt?(r=mt,Vl+=7):(r=et,0===Wl&&u(Fi)),r!==et)if((r=je())!==et)if(e.substr(Vl,7)===Vt?(r=Vt,Vl+=7):(r=et,0===Wl&&u(fo)),r===et&&(e.substr(Vl,8)===Qt?(r=Qt,Vl+=8):(r=et,0===Wl&&u(mo))),r!==et){var a=je();a!==et?(e.substr(Vl,9)===ut?(a=ut,Vl+=9):(a=et,0===Wl&&u(Oi)),a!==et?(a=je())!==et?(a=Ce())!==et?(Ql=t,t=["defaultNamespaceDecl",["defaultNamespaceCategory",r],["uri",a]]):(Vl=t,t=et):(Vl=t,t=et):(Vl=t,t=et)):(Vl=t,t=et)}else Vl=t,t=et;else Vl=t,t=et;else Vl=t,t=et;else Vl=t,t=et;else Vl=t,t=et;return Zl[n]={i:Vl,result:t},t}function g(){var t,n=233*Vl+25;if(t=Zl[n])return Vl=t.i,t.result;if(t=Vl,e.substr(Vl,7)===ht){var r=ht;Vl+=7}else r=et,0===Wl&&u(Di);if(r!==et)if((r=je())!==et){r=[];var a=Vl,i=w();if(i===et&&(i=y()),i!==et){var o=je();o!==et?(Ql=a,a=i):(Vl=a,a=et)}else Vl=a,a=et;for(;a!==et;)r.push(a),a=Vl,(i=w())===et&&(i=y()),i!==et?(o=je())!==et?(Ql=a,a=i):(Vl=a,a=et):(Vl=a,a=et);if(i=Zl[a=233*Vl+28])Vl=i.i,a=i.result;else{if(i=Vl,e.substr(Vl,8)===Zt?(o=Zt,Vl+=8):(o=et,0===Wl&&u(Ao)),o!==et)if((o=je())!==et)if(36===e.charCodeAt(Vl)?(o=$t,Vl++):(o=et,0===Wl&&u(xo)),o!==et)if(He(),(o=Be())!==et){var s=Vl;He();var l=me();l!==et?(Ql=s,s=l):(Vl=s,s=et),s===et&&(s=null);var c=Vl;if(He(),e.substr(Vl,2)===en?(l=en,Vl+=2):(l=et,0===Wl&&u(bo)),l!==et?(He(),(l=T())!==et?(Ql=c,c=["varValue",l]):(Vl=c,c=et)):(Vl=c,c=et),c===et)if(c=Vl,(l=je())!==et)if(e.substr(Vl,8)===tn?(l=tn,Vl+=8):(l=et,0===Wl&&u(Eo)),l!==et){if(l=Vl,He(),e.substr(Vl,2)===en){var h=en;Vl+=2}else h=et,0===Wl&&u(bo);h!==et?(He(),(h=T())!==et?(Ql=l,l=["varValue",h]):(Vl=l,l=et)):(Vl=l,l=et),l===et&&(l=null),Ql=c,c=["external"].concat(l?[l]:[])}else Vl=c,c=et;else Vl=c,c=et;c!==et?(Ql=i,i=["varDecl",["varName"].concat(o)].concat(s?[s]:[],[c])):(Vl=i,i=et)}else Vl=i,i=et;else Vl=i,i=et;else Vl=i,i=et;else Vl=i,i=et;Zl[a]={i:Vl,result:i},a=i}a===et&&((i=Zl[a=233*Vl+30])?(Vl=i.i,a=i.result):(i=Vl,e.substr(Vl,8)===Qt?(o=Qt,Vl+=8):(o=et,0===Wl&&u(mo)),o!==et?(o=je())!==et?(s=Vl,Wl++,o=Ye(),Wl--,o===et?s=void 0:(Vl=s,s=et),s!==et?(o=Be())!==et?(He(),40===e.charCodeAt(Vl)?(s=zt,Vl++):(s=et,0===Wl&&u(yo)),s!==et?(He(),(s=x())===et&&(s=null),He(),41===e.charCodeAt(Vl)?(c=Wt,Vl++):(c=et,0===Wl&&u(wo)),c!==et?(c=Vl,(l=je())!==et?(e.substr(Vl,2)===an?(l=an,Vl+=2):(l=et,0===Wl&&u(Co)),l!==et?(h=je())!==et?(l=ve())!==et?(Ql=c,c=l):(Vl=c,c=et):(Vl=c,c=et):(Vl=c,c=et)):(Vl=c,c=et),c===et&&(c=null),He(),l=Vl,(h=E())!==et&&(Ql=l,h=["functionBody",h]),(l=h)===et&&(l=Vl,e.substr(Vl,8)===tn?(h=tn,Vl+=8):(h=et,0===Wl&&u(Eo)),h!==et&&(Ql=l,h=["externalDefinition"]),l=h),l!==et?(Ql=i,i=["functionDecl",["functionName"].concat(o),["paramList"].concat(s||[])].concat(c?[["typeDeclaration"].concat(c)]:[],[l])):(Vl=i,i=et)):(Vl=i,i=et)):(Vl=i,i=et)):(Vl=i,i=et):(Vl=i,i=et)):(Vl=i,i=et):(Vl=i,i=et),Zl[a]={i:Vl,result:i},a=i)),a!==et?(Ql=t,t=[a[0]].concat(r,a.slice(1))):(Vl=t,t=et)}else Vl=t,t=et;else Vl=t,t=et;return Zl[n]={i:Vl,result:t},t}function y(){var t,n=233*Vl+26;if(t=Zl[n])return Vl=t.i,t.result;if(t=Vl,e.substr(Vl,8)===Jt){var r=Jt;Vl+=8}else r=et,0===Wl&&u(vo);return r!==et&&(Ql=t,r=["annotation",["annotationName","updating"]]),t=r,Zl[n]={i:Vl,result:t},t}function w(){var t,n=233*Vl+27;if(t=Zl[n])return Vl=t.i,t.result;if(t=Vl,37===e.charCodeAt(Vl)){var r=Kt;Vl++}else r=et,0===Wl&&u(go);if(r!==et)if(He(),(r=Be())!==et){var a=Vl;if(He(),40===e.charCodeAt(Vl)){var i=zt;Vl++}else i=et,0===Wl&&u(yo);if(i!==et)if(He(),(i=re())!==et){var o=[],s=Vl;if(He(),44===e.charCodeAt(Vl)){var l=Tt;Vl++}else l=et,0===Wl&&u(Ji);for(l!==et?(He(),(l=re())!==et?(Ql=s,s=l):(Vl=s,s=et)):(Vl=s,s=et);s!==et;)o.push(s),s=Vl,He(),44===e.charCodeAt(Vl)?(l=Tt,Vl++):(l=et,0===Wl&&u(Ji)),l!==et?(He(),(l=re())!==et?(Ql=s,s=l):(Vl=s,s=et)):(Vl=s,s=et);He(),41===e.charCodeAt(Vl)?(s=Wt,Vl++):(s=et,0===Wl&&u(wo)),s!==et?(Ql=a,a=i.concat(o)):(Vl=a,a=et)}else Vl=a,a=et;else Vl=a,a=et;a===et&&(a=null),Ql=t,t=["annotation",["annotationName"].concat(r)].concat(a?["arguments",a]:[])}else Vl=t,t=et;else Vl=t,t=et;return Zl[n]={i:Vl,result:t},t}function A(){var t,n=233*Vl+29;if(t=Zl[n])return Vl=t.i,t.result;if(t=Vl,e.substr(Vl,7)===ht){var r=ht;Vl+=7}else r=et,0===Wl&&u(Di);if(r!==et)if((r=je())!==et)if(e.substr(Vl,7)===nn?(r=nn,Vl+=7):(r=et,0===Wl&&u(Bo)),r!==et)if((r=je())!==et)if(e.substr(Vl,4)===rn?(r=rn,Vl+=4):(r=et,0===Wl&&u(No)),r!==et){var a=Vl,i=je();if(i!==et)if(e.substr(Vl,2)===an?(r=an,Vl+=2):(r=et,0===Wl&&u(Co)),r!==et){var o=ge();o!==et||(Vl=a)}else Vl=a;else Vl=a;if(i=Vl,r=He(),e.substr(Vl,2)===en?(o=en,Vl+=2):(o=et,0===Wl&&u(bo)),o!==et){a=He();var s=T();s!==et?i=r=[r,o,a,s]:(Vl=i,i=et)}else Vl=i,i=et;if(i===et)if(i=Vl,(r=je())!==et)if(e.substr(Vl,8)===tn?(o=tn,Vl+=8):(o=et,0===Wl&&u(Eo)),o!==et){if(a=Vl,s=He(),e.substr(Vl,2)===en?(i=en,Vl+=2):(i=et,0===Wl&&u(bo)),i!==et){var l=He(),c=T();c!==et?a=s=[s,i,l,c]:(Vl=a,a=et)}else Vl=a,a=et;a===et&&(a=null),i=r=[r,o,a]}else Vl=i,i=et;else Vl=i,i=et;i!==et?(Ql=t,t={type:"contextItemDecl"}):(Vl=t,t=et)}else Vl=t,t=et;else Vl=t,t=et;else Vl=t,t=et;else Vl=t,t=et;else Vl=t,t=et;return Zl[n]={i:Vl,result:t},t}function x(){var t,n=233*Vl+31;if(t=Zl[n])return Vl=t.i,t.result;t=Vl;var r=b();if(r!==et){var a=[],i=Vl;if(He(),44===e.charCodeAt(Vl)){var o=Tt;Vl++}else o=et,0===Wl&&u(Ji);for(o!==et?(He(),(o=b())!==et?(Ql=i,i=o):(Vl=i,i=et)):(Vl=i,i=et);i!==et;)a.push(i),i=Vl,He(),44===e.charCodeAt(Vl)?(o=Tt,Vl++):(o=et,0===Wl&&u(Ji)),o!==et?(He(),(o=b())!==et?(Ql=i,i=o):(Vl=i,i=et)):(Vl=i,i=et);Ql=t,t=[r].concat(a)}else Vl=t,t=et;return Zl[n]={i:Vl,result:t},t}function b(){var t,n=233*Vl+32;if(t=Zl[n])return Vl=t.i,t.result;if(t=Vl,36===e.charCodeAt(Vl)){var r=$t;Vl++}else r=et,0===Wl&&u(xo);if(r!==et)if((r=Be())!==et){var a=Vl,i=je();i!==et?(i=me())!==et?(Ql=a,a=i):(Vl=a,a=et):(Vl=a,a=et),a===et&&(a=null),Ql=t,t=["param",["varName"].concat(r)].concat(a?[a]:[])}else Vl=t,t=et;else Vl=t,t=et;return Zl[n]={i:Vl,result:t},t}function E(){var e,t=233*Vl+33;if(e=Zl[t])return Vl=e.i,e.result;e=Vl;var n=B();return n!==et&&(Ql=e,n=n||["sequenceExpr"]),e=n,Zl[t]={i:Vl,result:e},e}function B(){var t,n=233*Vl+34;if(t=Zl[n])return Vl=t.i,t.result;if(t=Vl,123===e.charCodeAt(Vl)){var r=on;Vl++}else r=et,0===Wl&&u(To);if(r!==et){if(He(),(r=C())===et&&(r=null),He(),125===e.charCodeAt(Vl)){var a=sn;Vl++}else a=et,0===Wl&&u(Io);a!==et?(Ql=t,t=r||null):(Vl=t,t=et)}else Vl=t,t=et;return Zl[n]={i:Vl,result:t},t}function N(){var t,n=233*Vl+35;if(t=Zl[n])return Vl=t.i,t.result;if(t=Vl,e.substr(Vl,7)===ht){var r=ht;Vl+=7}else r=et,0===Wl&&u(Di);return r!==et?(r=je())!==et?(e.substr(Vl,6)===un?(r=un,Vl+=6):(r=et,0===Wl&&u(Oo)),r!==et?(r=je())!==et?(r=Be())!==et?(r=je())!==et?(r=Ce())!==et?(Ql=t,t={type:"optionDecl"}):(Vl=t,t=et):(Vl=t,t=et):(Vl=t,t=et):(Vl=t,t=et):(Vl=t,t=et)):(Vl=t,t=et):(Vl=t,t=et),Zl[n]={i:Vl,result:t},t}function C(){var t,n=233*Vl+37;if(t=Zl[n])return Vl=t.i,t.result;t=Vl;var r=T();if(r!==et){var a=[],i=Vl;if(He(),44===e.charCodeAt(Vl)){var o=Tt;Vl++}else o=et,0===Wl&&u(Ji);for(o!==et?(He(),(o=T())!==et?(Ql=i,i=o):(Vl=i,i=et)):(Vl=i,i=et);i!==et;)a.push(i),i=Vl,He(),44===e.charCodeAt(Vl)?(o=Tt,Vl++):(o=et,0===Wl&&u(Ji)),o!==et?(He(),(o=T())!==et?(Ql=i,i=o):(Vl=i,i=et)):(Vl=i,i=et);Ql=t,t=0===a.length?r:["sequenceExpr",r].concat(a)}else Vl=t,t=et;return Zl[n]={i:Vl,result:t},t}function T(){var t=233*Vl+38,n=Zl[t];if(n)return Vl=n.i,n.result;var r=Vl,a=233*Vl+39,i=Zl[a];if(i){Vl=i.i;var o=i.result}else{var s=Vl,l=I();if(l!==et){var c=[],h=Vl,p=He(),f=O();for(f!==et?(Ql=h,h=f):(Vl=h,h=et);h!==et;)c.push(h),h=Vl,p=He(),(f=O())!==et?(Ql=h,h=f):(Vl=h,h=et);h=He();var d=233*Vl+58,m=Zl[d];if(m)Vl=m.i,p=m.result;else{var v=Vl;if(e.substr(Vl,6)===wn){var g=wn;Vl+=6}else g=et,0===Wl&&u(Xo);if(g!==et){He();var y=T();y!==et?(Ql=v,v=["returnClause",y]):(Vl=v,v=et)}else Vl=v,v=et;Zl[d]={i:Vl,result:v},p=v}p!==et?(Ql=s,s=["flworExpr",l].concat(c,[p])):(Vl=s,s=et)}else Vl=s,s=et;Zl[a]={i:Vl,result:s},o=s}if(o!==et&&(Ql=r,o=$e(o)),(r=o)===et){r=Vl;var w=233*Vl+59,A=Zl[w];if(A)Vl=A.i,o=A.result;else{var x=Vl;if(e.substr(Vl,4)===An){var b=An;Vl+=4}else b=et,0===Wl&&u(_o);if(b===et&&(e.substr(Vl,5)===xn?(b=xn,Vl+=5):(b=et,0===Wl&&u(Lo))),b!==et)if(je()!==et){var E=233*Vl+60,B=Zl[E];if(B){Vl=B.i;var N=B.result}else{var S=Vl,R=G();if(R!==et){var D=[],M=Vl;if(He(),44===e.charCodeAt(Vl)){var P=Tt;Vl++}else P=et,0===Wl&&u(Ji);if(P!==et){He();var H=G();H!==et?(Ql=M,M=H):(Vl=M,M=et)}else Vl=M,M=et;for(;M!==et;)D.push(M),M=Vl,He(),44===e.charCodeAt(Vl)?(P=Tt,Vl++):(P=et,0===Wl&&u(Ji)),P!==et?(He(),(H=G())!==et?(Ql=M,M=H):(Vl=M,M=et)):(Vl=M,M=et);Ql=S,S=[R].concat(D)}else Vl=S,S=et;Zl[E]={i:Vl,result:S},N=S}if(N!==et)if(je()!==et){if(e.substr(Vl,9)===bn){var j=bn;Vl+=9}else j=et,0===Wl&&u(ko);if(j!==et)if(je()!==et){var X=T();X!==et?(Ql=x,x=["quantifiedExpr",["quantifier",b]].concat(N,[["predicateExpr",X]])):(Vl=x,x=et)}else Vl=x,x=et;else Vl=x,x=et}else Vl=x,x=et;else Vl=x,x=et}else Vl=x,x=et;else Vl=x,x=et;Zl[w]={i:Vl,result:x},o=x}if(o!==et&&(Ql=r,o=$e(o)),(r=o)===et){r=Vl;var _=233*Vl+62,L=Zl[_];if(L)Vl=L.i,o=L.result;else{var k=Vl;if(e.substr(Vl,10)===En){var q=En;Vl+=10}else q=et,0===Wl&&u(qo);if(q!==et){if(He(),40===e.charCodeAt(Vl)){var Y=zt;Vl++}else Y=et,0===Wl&&u(yo);if(Y!==et){var V=C();if(V!==et){if(41===e.charCodeAt(Vl)){var Q=Wt;Vl++}else Q=et,0===Wl&&u(wo);if(Q!==et){He();var J=[],K=Vl,z=U();if(z!==et){var W=He();Ql=K,K=z}else Vl=K,K=et;if(K!==et)for(;K!==et;)J.push(K),K=Vl,(z=U())!==et?(W=He(),Ql=K,K=z):(Vl=K,K=et);else J=et;if(J!==et)if(e.substr(Vl,7)===mt?(K=mt,Vl+=7):(K=et,0===Wl&&u(Fi)),K!==et)if((z=je())!==et){if(W=Vl,36===e.charCodeAt(Vl)){var Z=$t;Vl++}else Z=et,0===Wl&&u(xo);if(Z!==et){var $=Be();if($!==et){var ee=je();ee!==et?(Ql=W,W=$):(Vl=W,W=et)}else Vl=W,W=et}else Vl=W,W=et;W===et&&(W=null),e.substr(Vl,6)===wn?(Z=wn,Vl+=6):(Z=et,0===Wl&&u(Xo)),Z!==et?($=je())!==et?(ee=T())!==et?(Ql=k,k=["typeswitchExpr",["argExpr",V]].concat(J,[["typeswitchExprDefaultClause"].concat(W||[],[["resultExpr",ee]])])):(Vl=k,k=et):(Vl=k,k=et):(Vl=k,k=et)}else Vl=k,k=et;else Vl=k,k=et;else Vl=k,k=et}else Vl=k,k=et}else Vl=k,k=et}else Vl=k,k=et}else Vl=k,k=et;Zl[_]={i:Vl,result:k},o=k}if(o!==et&&(Ql=r,o=$e(o)),(r=o)===et){r=Vl;var te=233*Vl+65,ne=Zl[te];if(ne)Vl=ne.i,o=ne.result;else{var re=Vl;if(e.substr(Vl,2)===Cn){var ae=Cn;Vl+=2}else ae=et,0===Wl&&u(Qo);if(ae!==et){if(He(),40===e.charCodeAt(Vl)){var ie=zt;Vl++}else ie=et,0===Wl&&u(yo);if(ie!==et){He();var oe=C();if(oe!==et){if(He(),41===e.charCodeAt(Vl)){var se=Wt;Vl++}else se=et,0===Wl&&u(wo);if(se!==et){if(He(),e.substr(Vl,4)===Tn){var ue=Tn;Vl+=4}else ue=et,0===Wl&&u(Jo);if(ue!==et)if(Ve()!==et){He();var le=T();if(le!==et){if(He(),e.substr(Vl,4)===In){var ce=In;Vl+=4}else ce=et,0===Wl&&u(Ko);if(ce!==et)if(Ve()!==et){He();var he=T();he!==et?(Ql=re,re=["ifThenElseExpr",["ifClause",oe],["thenClause",le],["elseClause",he]]):(Vl=re,re=et)}else Vl=re,re=et;else Vl=re,re=et}else Vl=re,re=et}else Vl=re,re=et;else Vl=re,re=et}else Vl=re,re=et}else Vl=re,re=et}else Vl=re,re=et}else Vl=re,re=et;Zl[te]={i:Vl,result:re},o=re}if(o!==et&&(Ql=r,o=$e(o)),(r=o)===et){r=Vl;var pe=233*Vl+214,fe=Zl[pe];if(fe)Vl=fe.i,o=fe.result;else{var de=Vl;if(e.substr(Vl,6)===ja){var me=ja;Vl+=6}else me=et,0===Wl&&u(Bl);if(me!==et)if(je()!==et){if(e.substr(Vl,5)===Xa){var ve=Xa;Vl+=5}else ve=et,0===Wl&&u(Nl);if(ve===et&&(e.substr(Vl,4)===_a?(ve=_a,Vl+=4):(ve=et,0===Wl&&u(Cl))),ve!==et)if(je()!==et){var ge=T();if(ge!==et)if(je()!==et){var ye,we=233*Vl+213,Ae=Zl[we];if(Ae){Vl=Ae.i;var xe=Ae.result}else{var be=ye=Vl;if(e.substr(Vl,2)===an){var Ee=an;Vl+=2}else Ee=et,0===Wl&&u(Co);if(Ee!==et)if(je()!==et){var Ne=Vl;if(e.substr(Vl,5)===Ga){var Ce=Ga;Vl+=5}else Ce=et,0===Wl&&u(wl);Ce!==et&&(Ql=Ne,Ce=["insertAsFirst"]),(Ne=Ce)===et&&(Ne=Vl,e.substr(Vl,4)===Ua?(Ce=Ua,Vl+=4):(Ce=et,0===Wl&&u(Al)),Ce!==et&&(Ql=Ne,Ce=["insertAsLast"]),Ne=Ce),Ne!==et?(Ce=je())!==et?(Ql=be,be=Ne):(Vl=be,be=et):(Vl=be,be=et)}else Vl=be,be=et;else Vl=be,be=et;be===et&&(be=null),e.substr(Vl,4)===Fa?(Ee=Fa,Vl+=4):(Ee=et,0===Wl&&u(xl)),Ee!==et?(Ql=ye,ye=be?["insertInto",be]:["insertInto"]):(Vl=ye,ye=et),ye===et&&(ye=Vl,e.substr(Vl,5)===Pa?(be=Pa,Vl+=5):(be=et,0===Wl&&u(bl)),be!==et&&(Ql=ye,be=["insertAfter"]),(ye=be)===et&&(ye=Vl,e.substr(Vl,6)===Ha?(be=Ha,Vl+=6):(be=et,0===Wl&&u(El)),be!==et&&(Ql=ye,be=["insertBefore"]),ye=be)),Zl[we]={i:Vl,result:ye},xe=ye}if(xe!==et)if(je()!==et){var Te=T();Te!==et?(Ql=de,de=["insertExpr",["sourceExpr",ge],xe,["targetExpr",Te]]):(Vl=de,de=et)}else Vl=de,de=et;else Vl=de,de=et}else Vl=de,de=et;else Vl=de,de=et}else Vl=de,de=et;else Vl=de,de=et}else Vl=de,de=et;else Vl=de,de=et;Zl[pe]={i:Vl,result:de},o=de}if(o!==et&&(Ql=r,o=$e(o)),(r=o)===et){r=Vl;var Ie=233*Vl+215,Oe=Zl[Ie];if(Oe)Vl=Oe.i,o=Oe.result;else{var Se=Vl;if(e.substr(Vl,6)===La){var Re=La;Vl+=6}else Re=et,0===Wl&&u(Tl);if(Re!==et)if(je()!==et){if(e.substr(Vl,5)===Xa){var De=Xa;Vl+=5}else De=et,0===Wl&&u(Nl);if(De===et&&(e.substr(Vl,4)===_a?(De=_a,Vl+=4):(De=et,0===Wl&&u(Cl))),De!==et)if(je()!==et){var Me=T();Me!==et?(Ql=Se,Se=["deleteExpr",["targetExpr",Me]]):(Vl=Se,Se=et)}else Vl=Se,Se=et;else Vl=Se,Se=et}else Vl=Se,Se=et;else Vl=Se,Se=et;Zl[Ie]={i:Vl,result:Se},o=Se}if(o!==et&&(Ql=r,o=$e(o)),(r=o)===et){r=Vl;var Ge=233*Vl+217,Ue=Zl[Ge];if(Ue)Vl=Ue.i,o=Ue.result;else{var Fe=Vl;if(e.substr(Vl,6)===Va){var Xe=Va;Vl+=6}else Xe=et,0===Wl&&u(Rl);if(Xe!==et)if(je()!==et){if(e.substr(Vl,4)===_a){var _e=_a;Vl+=4}else _e=et,0===Wl&&u(Cl);if(_e!==et){He();var Le=T();if(Le!==et)if(je()!==et){if(e.substr(Vl,2)===an){var ke=an;Vl+=2}else ke=et,0===Wl&&u(Co);if(ke!==et)if(je()!==et){var qe=T();qe!==et?(Ql=Fe,Fe=["renameExpr",["targetExpr",Le],["newNameExpr",qe]]):(Vl=Fe,Fe=et)}else Vl=Fe,Fe=et;else Vl=Fe,Fe=et}else Vl=Fe,Fe=et;else Vl=Fe,Fe=et}else Vl=Fe,Fe=et}else Vl=Fe,Fe=et;else Vl=Fe,Fe=et;Zl[Ge]={i:Vl,result:Fe},o=Fe}if(o!==et&&(Ql=r,o=$e(o)),(r=o)===et){r=Vl;var Ye=233*Vl+216,Je=Zl[Ye];if(Je)Vl=Je.i,o=Je.result;else{var Ke=Vl;if(e.substr(Vl,7)===ka){var ze=ka;Vl+=7}else ze=et,0===Wl&&u(Il);if(ze!==et)if(je()!==et){var We=Vl;if(e.substr(Vl,5)===qa){var Ze=qa;Vl+=5}else Ze=et,0===Wl&&u(Ol);if(Ze!==et){var tt=je();if(tt!==et){if(e.substr(Vl,2)===kn){var nt=kn;Vl+=2}else nt=et,0===Wl&&u(cs);if(nt!==et){var rt=je();rt!==et?We=Ze=[Ze,tt,nt,rt]:(Vl=We,We=et)}else Vl=We,We=et}else Vl=We,We=et}else Vl=We,We=et;if(We===et&&(We=null),e.substr(Vl,4)===_a?(Ze=_a,Vl+=4):(Ze=et,0===Wl&&u(Cl)),Ze!==et)if((tt=je())!==et)if((nt=T())!==et)if((rt=je())!==et){if(e.substr(Vl,4)===Ya){var at=Ya;Vl+=4}else at=et,0===Wl&&u(Sl);if(at!==et)if(je()!==et){var it=T();it!==et?(Ql=Ke,Ke=We?["replaceExpr",["replaceValue"],["targetExpr",nt],["replacementExpr",it]]:["replaceExpr",["targetExpr",nt],["replacementExpr",it]]):(Vl=Ke,Ke=et)}else Vl=Ke,Ke=et;else Vl=Ke,Ke=et}else Vl=Ke,Ke=et;else Vl=Ke,Ke=et;else Vl=Ke,Ke=et;else Vl=Ke,Ke=et}else Vl=Ke,Ke=et;else Vl=Ke,Ke=et;Zl[Ye]={i:Vl,result:Ke},o=Ke}if(o!==et&&(Ql=r,o=$e(o)),(r=o)===et){r=Vl;var ot=233*Vl+218,st=Zl[ot];if(st)Vl=st.i,o=st.result;else{var ut=Vl;if(e.substr(Vl,4)===Qa){var lt=Qa;Vl+=4}else lt=et,0===Wl&&u(Dl);if(lt!==et)if(je()!==et){var ct=Pe();if(ct!==et){var ht=[],pt=Vl,ft=He();if(44===e.charCodeAt(Vl)){var dt=Tt;Vl++}else dt=et,0===Wl&&u(Ji);if(dt!==et){var vt=He(),gt=Pe();gt!==et?(Ql=pt,pt=gt):(Vl=pt,pt=et)}else Vl=pt,pt=et;for(;pt!==et;)ht.push(pt),pt=Vl,ft=He(),44===e.charCodeAt(Vl)?(dt=Tt,Vl++):(dt=et,0===Wl&&u(Ji)),dt!==et?(vt=He(),(gt=Pe())!==et?(Ql=pt,pt=gt):(Vl=pt,pt=et)):(Vl=pt,pt=et);if(pt=He(),e.substr(Vl,6)===Ja?(ft=Ja,Vl+=6):(ft=et,0===Wl&&u(Ml)),ft!==et)if((dt=je())!==et)if((vt=T())!==et)if((gt=je())!==et){if(e.substr(Vl,6)===wn){var yt=wn;Vl+=6}else yt=et,0===Wl&&u(Xo);if(yt!==et)if(je()!==et){var wt=T();wt!==et?(Ql=ut,ut=["transformExpr",["transformCopies",ct].concat(ht),["modifyExpr",vt],["returnExpr",wt]]):(Vl=ut,ut=et)}else Vl=ut,ut=et;else Vl=ut,ut=et}else Vl=ut,ut=et;else Vl=ut,ut=et;else Vl=ut,ut=et;else Vl=ut,ut=et}else Vl=ut,ut=et}else Vl=ut,ut=et;else Vl=ut,ut=et;Zl[ot]={i:Vl,result:ut},o=ut}if(o!==et&&(Ql=r,o=$e(o)),(r=o)===et){r=Vl;var At=233*Vl+66,xt=Zl[At];if(xt)Vl=xt.i,o=xt.result;else{var bt=Vl,Et=F();if(Et!==et){var Bt=[],Nt=Vl;if(He(),e.substr(Vl,2)===On){var Ct=On;Vl+=2}else Ct=et,0===Wl&&u(zo);if(Ct!==et){var It=Ve();if(It!==et){He();var Ot=F();Ot!==et?(Ql=Nt,Nt=Ot):(Vl=Nt,Nt=et)}else Vl=Nt,Nt=et}else Vl=Nt,Nt=et;for(;Nt!==et;)Bt.push(Nt),Nt=Vl,He(),e.substr(Vl,2)===On?(Ct=On,Vl+=2):(Ct=et,0===Wl&&u(zo)),Ct!==et?(It=Ve())!==et?(He(),(Ot=F())!==et?(Ql=Nt,Nt=Ot):(Vl=Nt,Nt=et)):(Vl=Nt,Nt=et):(Vl=Nt,Nt=et);Ql=bt,bt=Qe("orOp",Et,Bt)}else Vl=bt,bt=et;Zl[At]={i:Vl,result:bt},o=bt}o!==et&&(Ql=r,o=$e(o)),r=o}}}}}}}}}return Zl[t]={i:Vl,result:r},r}function I(){var t,n,r=233*Vl+40;if(t=Zl[r])return Vl=t.i,t.result;if(n=Zl[t=233*Vl+42])Vl=n.i,t=n.result;else{if(n=Vl,e.substr(Vl,3)===ln){var a=ln;Vl+=3}else a=et,0===Wl&&u(So);if(a!==et)if((a=je())!==et)if((a=S())!==et){var i=[],o=Vl;if(He(),44===e.charCodeAt(Vl)){var s=Tt;Vl++}else s=et,0===Wl&&u(Ji);for(s!==et?(He(),(s=S())!==et?(Ql=o,o=s):(Vl=o,o=et)):(Vl=o,o=et);o!==et;)i.push(o),o=Vl,He(),44===e.charCodeAt(Vl)?(s=Tt,Vl++):(s=et,0===Wl&&u(Ji)),s!==et?(He(),(s=S())!==et?(Ql=o,o=s):(Vl=o,o=et)):(Vl=o,o=et);Ql=n,n=["forClause",a].concat(i)}else Vl=n,n=et;else Vl=n,n=et;else Vl=n,n=et;Zl[t]={i:Vl,result:n},t=n}if(t===et)if(n=Zl[t=233*Vl+46])Vl=n.i,t=n.result;else{if(n=Vl,e.substr(Vl,3)===pn?(a=pn,Vl+=3):(a=et,0===Wl&&u(Mo)),a!==et)if(He(),(a=R())!==et){for(He(),i=[],o=Vl,44===e.charCodeAt(Vl)?(s=Tt,Vl++):(s=et,0===Wl&&u(Ji)),s!==et?(He(),(s=R())!==et?(Ql=o,o=s):(Vl=o,o=et)):(Vl=o,o=et);o!==et;)i.push(o),o=Vl,44===e.charCodeAt(Vl)?(s=Tt,Vl++):(s=et,0===Wl&&u(Ji)),s!==et?(He(),(s=R())!==et?(Ql=o,o=s):(Vl=o,o=et)):(Vl=o,o=et);Ql=n,n=["letClause",a].concat(i)}else Vl=n,n=et;else Vl=n,n=et;Zl[t]={i:Vl,result:n},t=n}return Zl[r]={i:Vl,result:t},t}function O(){var t,n=233*Vl+41;if(t=Zl[n])return Vl=t.i,t.result;if((t=I())===et){var r;if(r=Zl[t=233*Vl+48])Vl=r.i,t=r.result;else{if(r=Vl,e.substr(Vl,5)===fn){var a=fn;Vl+=5}else a=et,0===Wl&&u(Go);a!==et?(a=Ve())!==et?(He(),(a=T())!==et?(Ql=r,r=["whereClause",a]):(Vl=r,r=et)):(Vl=r,r=et):(Vl=r,r=et),Zl[t]={i:Vl,result:r},t=r}if(t===et){if(r=Zl[t=233*Vl+49])Vl=r.i,t=r.result;else{if(r=Vl,e.substr(Vl,5)===dn?(a=dn,Vl+=5):(a=et,0===Wl&&u(Uo)),a!==et)if((a=je())!==et)if(e.substr(Vl,2)===mn?(a=mn,Vl+=2):(a=et,0===Wl&&u(Fo)),a!==et){var i;if(He(),i=Zl[a=233*Vl+50])Vl=i.i,a=i.result;else{i=Vl;var o=D();if(o!==et){var s=[],l=Vl;if(He(),44===e.charCodeAt(Vl)){var c=Tt;Vl++}else c=et,0===Wl&&u(Ji);for(c!==et?(He(),(c=D())!==et?(Ql=l,l=c):(Vl=l,l=et)):(Vl=l,l=et);l!==et;)s.push(l),l=Vl,He(),44===e.charCodeAt(Vl)?(c=Tt,Vl++):(c=et,0===Wl&&u(Ji)),c!==et?(He(),(c=D())!==et?(Ql=l,l=c):(Vl=l,l=et)):(Vl=l,l=et);Ql=i,i=[o].concat(s)}else Vl=i,i=et;Zl[a]={i:Vl,result:i},a=i}a!==et?(Ql=r,r=["groupByClause"].concat(a)):(Vl=r,r=et)}else Vl=r,r=et;else Vl=r,r=et;else Vl=r,r=et;Zl[t]={i:Vl,result:r},t=r}if(t===et)if(r=Zl[t=233*Vl+54])Vl=r.i,t=r.result;else{if(a=r=Vl,e.substr(Vl,5)===bt?(i=bt,Vl+=5):(i=et,0===Wl&&u(ki)),i!==et?(i=je())!==et?(e.substr(Vl,2)===mn?(i=mn,Vl+=2):(i=et,0===Wl&&u(Fo)),i!==et?(Ql=a,a=!1):(Vl=a,a=et)):(Vl=a,a=et):(Vl=a,a=et),a===et&&(a=Vl,e.substr(Vl,6)===vn?(i=vn,Vl+=6):(i=et,0===Wl&&u(Po)),i!==et?(i=je())!==et?(e.substr(Vl,5)===bt?(i=bt,Vl+=5):(i=et,0===Wl&&u(ki)),i!==et?(i=je())!==et?(e.substr(Vl,2)===mn?(i=mn,Vl+=2):(i=et,0===Wl&&u(Fo)),i!==et?(Ql=a,a=!0):(Vl=a,a=et)):(Vl=a,a=et):(Vl=a,a=et)):(Vl=a,a=et):(Vl=a,a=et)),a!==et){if(He(),o=Zl[i=233*Vl+55])Vl=o.i,i=o.result;else{if(o=Vl,(s=M())!==et){if(l=[],c=Vl,He(),44===e.charCodeAt(Vl)){var h=Tt;Vl++}else h=et,0===Wl&&u(Ji);for(h!==et?(He(),(h=M())!==et?(Ql=c,c=h):(Vl=c,c=et)):(Vl=c,c=et);c!==et;)l.push(c),c=Vl,He(),44===e.charCodeAt(Vl)?(h=Tt,Vl++):(h=et,0===Wl&&u(Ji)),h!==et?(He(),(h=M())!==et?(Ql=c,c=h):(Vl=c,c=et)):(Vl=c,c=et);Ql=o,o=[s].concat(l)}else Vl=o,o=et;Zl[i]={i:Vl,result:o},i=o}i!==et?(Ql=r,r=["orderByClause"].concat(a?[["stable"]]:[],i)):(Vl=r,r=et)}else Vl=r,r=et;Zl[t]={i:Vl,result:r},t=r}}}return Zl[n]={i:Vl,result:t},t}function S(){var t,n,r=233*Vl+43;if(t=Zl[r])return Vl=t.i,t.result;if(t=Vl,36===e.charCodeAt(Vl)){var a=$t;Vl++}else a=et,0===Wl&&u(xo);if(a!==et)if((a=Be())!==et){He();var i=me();i===et&&(i=null),He();var o=233*Vl+44;if(n=Zl[o])Vl=n.i,o=n.result;else{if(n=Vl,e.substr(Vl,8)===hn){var s=hn;Vl+=8}else s=et,0===Wl&&u(Do);if(s!==et){var l=je();if(l!==et){if(e.substr(Vl,5)===Et){var c=Et;Vl+=5}else c=et,0===Wl&&u(qi);c!==et?n=s=[s,l,c]:(Vl=n,n=et)}else Vl=n,n=et}else Vl=n,n=et;Zl[o]={i:Vl,result:n},o=n}o===et&&(o=null),He(),(s=Zl[n=233*Vl+45])?(Vl=s.i,n=s.result):(s=Vl,e.substr(Vl,2)===Yt?(l=Yt,Vl+=2):(l=et,0===Wl&&u(po)),l!==et?(l=je())!==et?(36===e.charCodeAt(Vl)?(l=$t,Vl++):(l=et,0===Wl&&u(xo)),l!==et?(l=Be())!==et?(Ql=s,s=["positionalVariableBinding"].concat(l)):(Vl=s,s=et):(Vl=s,s=et)):(Vl=s,s=et):(Vl=s,s=et),Zl[n]={i:Vl,result:s},n=s),n===et&&(n=null),He(),e.substr(Vl,2)===cn?(s=cn,Vl+=2):(s=et,0===Wl&&u(Ro)),s!==et?(He(),(s=T())!==et?(Ql=t,t=["forClauseItem",["typedVariableBinding",["varName"].concat(a,i?[i]:[])]].concat(o?[["allowingEmpty"]]:[],n?[n]:[],[["forExpr",s]])):(Vl=t,t=et)):(Vl=t,t=et)}else Vl=t,t=et;else Vl=t,t=et;return Zl[r]={i:Vl,result:t},t}function R(){var t,n=233*Vl+47;if(t=Zl[n])return Vl=t.i,t.result;if(t=Vl,36===e.charCodeAt(Vl)){var r=$t;Vl++}else r=et,0===Wl&&u(xo);if(r!==et)if((r=Be())!==et){He();var a=me();if(a===et&&(a=null),He(),e.substr(Vl,2)===en){var i=en;Vl+=2}else i=et,0===Wl&&u(bo);i!==et?(He(),(i=T())!==et?(Ql=t,t=["letClauseItem",["typedVariableBinding",["varName"].concat(r)].concat(a?[a]:[]),["letExpr",i]]):(Vl=t,t=et)):(Vl=t,t=et)}else Vl=t,t=et;else Vl=t,t=et;return Zl[n]={i:Vl,result:t},t}function D(){var t,n,r=233*Vl+51;if(t=Zl[r])return Vl=t.i,t.result;t=Vl;var a=233*Vl+53;if(n=Zl[a])Vl=n.i,a=n.result;else{if(n=Vl,36===e.charCodeAt(Vl)){var i=$t;Vl++}else i=et,0===Wl&&u(xo);i!==et?(i=Be())!==et?(Ql=n,n=["varName"].concat(i)):(Vl=n,n=et):(Vl=n,n=et),Zl[a]={i:Vl,result:n},a=n}if(a!==et){if(i=Zl[n=233*Vl+52])Vl=i.i,n=i.result;else{i=Vl,He();var o=me();if(o===et&&(o=null),He(),e.substr(Vl,2)===en){var s=en;Vl+=2}else s=et,0===Wl&&u(bo);s!==et?(He(),(s=T())!==et?(Ql=i,i=["groupVarInitialize"].concat(o?[["typeDeclaration"].concat(o)]:[],[["varValue",s]])):(Vl=i,i=et)):(Vl=i,i=et),Zl[n]={i:Vl,result:i},n=i}n===et&&(n=null),i=Vl,He(),e.substr(Vl,9)===vt?(o=vt,Vl+=9):(o=et,0===Wl&&u(Pi)),o!==et?(He(),(o=Ce())!==et?(Ql=i,i=["collation",o]):(Vl=i,i=et)):(Vl=i,i=et),i===et&&(i=null),Ql=t,t=["groupingSpec",a].concat(n?[n]:[],i?[i]:[])}else Vl=t,t=et;return Zl[r]={i:Vl,result:t},t}function M(){var t,n=233*Vl+56;if(t=Zl[n])return Vl=t.i,t.result;t=Vl;var r=T();if(r!==et){var a;He();var i=233*Vl+57;if(a=Zl[i])Vl=a.i,i=a.result;else{if(a=Vl,e.substr(Vl,9)===gn){var o=gn;Vl+=9}else o=et,0===Wl&&u(Ho);o===et&&(e.substr(Vl,10)===yn?(o=yn,Vl+=10):(o=et,0===Wl&&u(jo))),o===et&&(o=null),He();var s=Vl;if(e.substr(Vl,5)===Et){var l=Et;Vl+=5}else l=et,0===Wl&&u(qi);if(l!==et){He();var c=Vl;if(e.substr(Vl,8)===Bt){var h=Bt;Vl+=8}else h=et,0===Wl&&u(Yi);h!==et&&(Ql=c,h="empty greatest"),(c=h)===et&&(c=Vl,e.substr(Vl,5)===Nt?(h=Nt,Vl+=5):(h=et,0===Wl&&u(Vi)),h!==et&&(Ql=c,h="empty least"),c=h),c!==et?(Ql=s,s=c):(Vl=s,s=et)}else Vl=s,s=et;if(s===et&&(s=null),He(),l=Vl,e.substr(Vl,9)===vt?(c=vt,Vl+=9):(c=et,0===Wl&&u(Pi)),c!==et){h=He();var p=Ce();p!==et?l=c=[c,h,p]:(Vl=l,l=et)}else Vl=l,l=et;l===et&&(l=null),Ql=a,a=o||s||l?["orderModifier"].concat(o?[["orderingKind",o]]:[],s?[["emptyOrderingMode",s]]:[],l?[["collation",l]]:[]):null,Zl[i]={i:Vl,result:a},i=a}Ql=t,t=["orderBySpec",["orderByExpr",r]].concat(i?[i]:[])}else Vl=t,t=et;return Zl[n]={i:Vl,result:t},t}function G(){var t,n=233*Vl+61;if(t=Zl[n])return Vl=t.i,t.result;if(t=Vl,36===e.charCodeAt(Vl)){var r=$t;Vl++}else r=et,0===Wl&&u(xo);if(r!==et)if((r=Be())!==et){var a=Vl,i=je();i!==et?(i=me())!==et?(Ql=a,a=i):(Vl=a,a=et):(Vl=a,a=et),a===et&&(a=null),(i=je())!==et?(e.substr(Vl,2)===cn?(i=cn,Vl+=2):(i=et,0===Wl&&u(Ro)),i!==et?(i=je())!==et?(i=T())!==et?(Ql=t,t=["quantifiedExprInClause",["typedVariableBinding",["varName"].concat(r)].concat(a?[a]:[]),["sourceExpr",i]]):(Vl=t,t=et):(Vl=t,t=et):(Vl=t,t=et)):(Vl=t,t=et)}else Vl=t,t=et;else Vl=t,t=et;return Zl[n]={i:Vl,result:t},t}function U(){var t,n=233*Vl+63;if(t=Zl[n])return Vl=t.i,t.result;if(t=Vl,e.substr(Vl,4)===Bn){var r=Bn;Vl+=4}else r=et,0===Wl&&u(Yo);if(r!==et){if(He(),r=Vl,36===e.charCodeAt(Vl)){var a=$t;Vl++}else a=et,0===Wl&&u(xo);if(a!==et)if((a=Be())!==et){var i=je();i!==et?(e.substr(Vl,2)===an?(i=an,Vl+=2):(i=et,0===Wl&&u(Co)),i!==et?(Ql=r,r=a):(Vl=r,r=et)):(Vl=r,r=et)}else Vl=r,r=et;else Vl=r,r=et;if(r===et&&(r=null),He(),i=Zl[a=233*Vl+64])Vl=i.i,a=i.result;else{i=Vl;var o=ve();if(o!==et){var s=[],l=Vl;if(He(),124===e.charCodeAt(Vl)){var c=Nn;Vl++}else c=et,0===Wl&&u(Vo);for(c!==et?(He(),(c=ve())!==et?(Ql=l,l=c):(Vl=l,l=et)):(Vl=l,l=et);l!==et;)s.push(l),l=Vl,He(),124===e.charCodeAt(Vl)?(c=Nn,Vl++):(c=et,0===Wl&&u(Vo)),c!==et?(He(),(c=ve())!==et?(Ql=l,l=c):(Vl=l,l=et)):(Vl=l,l=et);Ql=i,i=function(e,t){return t.length?[["sequenceTypeUnion",["sequenceType"].concat(e)].concat(t.map((function(e){return["sequenceType"].concat(e)})))]:[["sequenceType"].concat(e)]}(o,s)}else Vl=i,i=et;Zl[a]={i:Vl,result:i},a=i}a!==et?(i=je())!==et?(e.substr(Vl,6)===wn?(i=wn,Vl+=6):(i=et,0===Wl&&u(Xo)),i!==et?(i=je())!==et?(i=T())!==et?(Ql=t,t=["typeswitchExprCaseClause"].concat(r?[["variableBinding"].concat(r)]:[],a,[["resultExpr",i]])):(Vl=t,t=et):(Vl=t,t=et):(Vl=t,t=et)):(Vl=t,t=et):(Vl=t,t=et)}else Vl=t,t=et;return Zl[n]={i:Vl,result:t},t}function F(){var t,n=233*Vl+67;if(t=Zl[n])return Vl=t.i,t.result;t=Vl;var r=P();if(r!==et){var a=[],i=Vl;if(He(),e.substr(Vl,3)===Sn){var o=Sn;Vl+=3}else o=et,0===Wl&&u(Wo);for(o!==et?(o=Ve())!==et?(He(),(o=P())!==et?(Ql=i,i=o):(Vl=i,i=et)):(Vl=i,i=et):(Vl=i,i=et);i!==et;)a.push(i),i=Vl,He(),e.substr(Vl,3)===Sn?(o=Sn,Vl+=3):(o=et,0===Wl&&u(Wo)),o!==et?(o=Ve())!==et?(He(),(o=P())!==et?(Ql=i,i=o):(Vl=i,i=et)):(Vl=i,i=et):(Vl=i,i=et);Ql=t,t=Qe("andOp",r,a)}else Vl=t,t=et;return Zl[n]={i:Vl,result:t},t}function P(){var t,n,r=233*Vl+68;if(t=Zl[r])return Vl=t.i,t.result;t=Vl;var a=H();if(a!==et){var i=Vl;He();var o=233*Vl+83;if(n=Zl[o])Vl=n.i,o=n.result;else{if(n=Vl,e.substr(Vl,2)===$n){var s=$n;Vl+=2}else s=et,0===Wl&&u(As);s!==et?(s=Ve())!==et?(Ql=n,n="eqOp"):(Vl=n,n=et):(Vl=n,n=et),n===et&&(n=Vl,e.substr(Vl,2)===er?(s=er,Vl+=2):(s=et,0===Wl&&u(xs)),s!==et?(s=Ve())!==et?(Ql=n,n="neOp"):(Vl=n,n=et):(Vl=n,n=et),n===et&&(n=Vl,e.substr(Vl,2)===tr?(s=tr,Vl+=2):(s=et,0===Wl&&u(bs)),s!==et?(s=Ve())!==et?(Ql=n,n="ltOp"):(Vl=n,n=et):(Vl=n,n=et),n===et&&(n=Vl,e.substr(Vl,2)===nr?(s=nr,Vl+=2):(s=et,0===Wl&&u(Es)),s!==et?(s=Ve())!==et?(Ql=n,n="leOp"):(Vl=n,n=et):(Vl=n,n=et),n===et&&(n=Vl,e.substr(Vl,2)===rr?(s=rr,Vl+=2):(s=et,0===Wl&&u(Bs)),s!==et?(s=Ve())!==et?(Ql=n,n="gtOp"):(Vl=n,n=et):(Vl=n,n=et),n===et&&(n=Vl,e.substr(Vl,2)===ar?(s=ar,Vl+=2):(s=et,0===Wl&&u(Ns)),s!==et?(s=Ve())!==et?(Ql=n,n="geOp"):(Vl=n,n=et):(Vl=n,n=et)))))),Zl[o]={i:Vl,result:n},o=n}o===et&&((n=Zl[o=233*Vl+84])?(Vl=n.i,o=n.result):(n=Vl,e.substr(Vl,2)===ir?(s=ir,Vl+=2):(s=et,0===Wl&&u(Cs)),s!==et?(s=Ve())!==et?(Ql=n,n="isOp"):(Vl=n,n=et):(Vl=n,n=et),n===et&&(n=Vl,e.substr(Vl,2)===or?(s=or,Vl+=2):(s=et,0===Wl&&u(Ts)),s!==et&&(Ql=n,s="nodeBeforeOp"),(n=s)===et&&(n=Vl,e.substr(Vl,2)===sr?(s=sr,Vl+=2):(s=et,0===Wl&&u(Is)),s!==et&&(Ql=n,s="nodeAfterOp"),n=s)),Zl[o]={i:Vl,result:n},o=n),o===et&&((n=Zl[o=233*Vl+82])?(Vl=n.i,o=n.result):(n=Vl,61===e.charCodeAt(Vl)?(s=lt,Vl++):(s=et,0===Wl&&u(Si)),s!==et&&(Ql=n,s="equalOp"),(n=s)===et&&(n=Vl,e.substr(Vl,2)===Jn?(s=Jn,Vl+=2):(s=et,0===Wl&&u(ms)),s!==et&&(Ql=n,s="notEqualOp"),(n=s)===et&&(n=Vl,e.substr(Vl,2)===Kn?(s=Kn,Vl+=2):(s=et,0===Wl&&u(vs)),s!==et&&(Ql=n,s="lessThanOrEqualOp"),(n=s)===et&&(n=Vl,60===e.charCodeAt(Vl)?(s=zn,Vl++):(s=et,0===Wl&&u(gs)),s!==et&&(Ql=n,s="lessThanOp"),(n=s)===et&&(n=Vl,e.substr(Vl,2)===Wn?(s=Wn,Vl+=2):(s=et,0===Wl&&u(ys)),s!==et&&(Ql=n,s="greaterThanOrEqualOp"),(n=s)===et&&(n=Vl,62===e.charCodeAt(Vl)?(s=Zn,Vl++):(s=et,0===Wl&&u(ws)),s!==et&&(Ql=n,s="greaterThanOp"),n=s))))),Zl[o]={i:Vl,result:n},o=n))),o!==et?(He(),(n=H())!==et?(Ql=i,i=[o,n]):(Vl=i,i=et)):(Vl=i,i=et),i===et&&(i=null),Ql=t,t=i?[i[0],["firstOperand",a],["secondOperand",i[1]]]:a}else Vl=t,t=et;return Zl[r]={i:Vl,result:t},t}function H(){var t,n=233*Vl+69;if(t=Zl[n])return Vl=t.i,t.result;t=Vl;var r=j();if(r!==et){var a=[],i=Vl;if(He(),e.substr(Vl,2)===Rn){var o=Rn;Vl+=2}else o=et,0===Wl&&u(Zo);for(o!==et?(He(),(o=j())!==et?(Ql=i,i=o):(Vl=i,i=et)):(Vl=i,i=et);i!==et;)a.push(i),i=Vl,He(),e.substr(Vl,2)===Rn?(o=Rn,Vl+=2):(o=et,0===Wl&&u(Zo)),o!==et?(He(),(o=j())!==et?(Ql=i,i=o):(Vl=i,i=et)):(Vl=i,i=et);Ql=t,t=Qe("stringConcatenateOp",r,a)}else Vl=t,t=et;return Zl[n]={i:Vl,result:t},t}function j(){var t,n=233*Vl+70;if(t=Zl[n])return Vl=t.i,t.result;t=Vl;var r=X();if(r!==et){var a=Vl;if(He(),e.substr(Vl,2)===Dn){var i=Dn;Vl+=2}else i=et,0===Wl&&u($o);i!==et?(i=Ve())!==et?(He(),(i=X())!==et?(Ql=a,a=i):(Vl=a,a=et)):(Vl=a,a=et):(Vl=a,a=et),a===et&&(a=null),Ql=t,t=null===a?r:["rangeSequenceExpr",["startExpr",r],["endExpr",a]]}else Vl=t,t=et;return Zl[n]={i:Vl,result:t},t}function X(){var t,n=233*Vl+71;if(t=Zl[n])return Vl=t.i,t.result;t=Vl;var r=_();if(r!==et){var a=[],i=Vl;He();var o=Vl;if(45===e.charCodeAt(Vl)){var s=Mn;Vl++}else s=et,0===Wl&&u(es);for(s!==et&&(Ql=o,s="subtractOp"),(o=s)===et&&(o=Vl,43===e.charCodeAt(Vl)?(s=Gn,Vl++):(s=et,0===Wl&&u(ts)),s!==et&&(Ql=o,s="addOp"),o=s),o!==et?(He(),(s=_())!==et?(Ql=i,i=[o,s]):(Vl=i,i=et)):(Vl=i,i=et);i!==et;)a.push(i),i=Vl,He(),o=Vl,45===e.charCodeAt(Vl)?(s=Mn,Vl++):(s=et,0===Wl&&u(es)),s!==et&&(Ql=o,s="subtractOp"),(o=s)===et&&(o=Vl,43===e.charCodeAt(Vl)?(s=Gn,Vl++):(s=et,0===Wl&&u(ts)),s!==et&&(Ql=o,s="addOp"),o=s),o!==et?(He(),(s=_())!==et?(Ql=i,i=[o,s]):(Vl=i,i=et)):(Vl=i,i=et);Ql=t,t=function(e,t){return t.reduce((function(e,t){return[t[0],["firstOperand",e],["secondOperand",t[1]]]}),e)}(r,a)}else Vl=t,t=et;return Zl[n]={i:Vl,result:t},t}function _(){var t,n=233*Vl+72;if(t=Zl[n])return Vl=t.i,t.result;t=Vl;var r=L();if(r!==et){var a=[],i=Vl;He();var o=Vl;if(42===e.charCodeAt(Vl)){var s=Un;Vl++}else s=et,0===Wl&&u(ns);for(s!==et&&(Ql=o,s="multiplyOp"),(o=s)===et&&(o=Vl,e.substr(Vl,3)===Fn?(s=Fn,Vl+=3):(s=et,0===Wl&&u(rs)),s!==et?(s=Ve())!==et?(Ql=o,o="divOp"):(Vl=o,o=et):(Vl=o,o=et),o===et&&(o=Vl,e.substr(Vl,4)===Pn?(s=Pn,Vl+=4):(s=et,0===Wl&&u(as)),s!==et?(s=Ve())!==et?(Ql=o,o="idivOp"):(Vl=o,o=et):(Vl=o,o=et),o===et&&(o=Vl,e.substr(Vl,3)===Hn?(s=Hn,Vl+=3):(s=et,0===Wl&&u(is)),s!==et?(s=Ve())!==et?(Ql=o,o="modOp"):(Vl=o,o=et):(Vl=o,o=et)))),o!==et?(He(),(s=L())!==et?(Ql=i,i=[o,s]):(Vl=i,i=et)):(Vl=i,i=et);i!==et;)a.push(i),i=Vl,He(),o=Vl,42===e.charCodeAt(Vl)?(s=Un,Vl++):(s=et,0===Wl&&u(ns)),s!==et&&(Ql=o,s="multiplyOp"),(o=s)===et&&(o=Vl,e.substr(Vl,3)===Fn?(s=Fn,Vl+=3):(s=et,0===Wl&&u(rs)),s!==et?(s=Ve())!==et?(Ql=o,o="divOp"):(Vl=o,o=et):(Vl=o,o=et),o===et&&(o=Vl,e.substr(Vl,4)===Pn?(s=Pn,Vl+=4):(s=et,0===Wl&&u(as)),s!==et?(s=Ve())!==et?(Ql=o,o="idivOp"):(Vl=o,o=et):(Vl=o,o=et),o===et&&(o=Vl,e.substr(Vl,3)===Hn?(s=Hn,Vl+=3):(s=et,0===Wl&&u(is)),s!==et?(s=Ve())!==et?(Ql=o,o="modOp"):(Vl=o,o=et):(Vl=o,o=et)))),o!==et?(He(),(s=L())!==et?(Ql=i,i=[o,s]):(Vl=i,i=et)):(Vl=i,i=et);Ql=t,t=function(e,t){return t.reduce((function(e,t){return[t[0],["firstOperand",e],["secondOperand",t[1]]]}),e)}(r,a)}else Vl=t,t=et;return Zl[n]={i:Vl,result:t},t}function L(){var t,n=233*Vl+73;if(t=Zl[n])return Vl=t.i,t.result;t=Vl;var r=k();if(r!==et){var a=[],i=Vl;if(He(),124===e.charCodeAt(Vl)){var o=Nn;Vl++}else o=et,0===Wl&&u(Vo);if(o===et){if(o=Vl,e.substr(Vl,5)===jn){var s=jn;Vl+=5}else s=et,0===Wl&&u(os);if(s!==et){var l=Ve();l!==et?o=s=[s,l]:(Vl=o,o=et)}else Vl=o,o=et}for(o!==et?(He(),(l=k())!==et?(Ql=i,i=l):(Vl=i,i=et)):(Vl=i,i=et);i!==et;)a.push(i),i=Vl,He(),124===e.charCodeAt(Vl)?(o=Nn,Vl++):(o=et,0===Wl&&u(Vo)),o===et&&(o=Vl,e.substr(Vl,5)===jn?(s=jn,Vl+=5):(s=et,0===Wl&&u(os)),s!==et?(l=Ve())!==et?o=s=[s,l]:(Vl=o,o=et):(Vl=o,o=et)),o!==et?(He(),(l=k())!==et?(Ql=i,i=l):(Vl=i,i=et)):(Vl=i,i=et);Ql=t,t=Qe("unionOp",r,a)}else Vl=t,t=et;return Zl[n]={i:Vl,result:t},t}function k(){var t,n,r=233*Vl+74;if(t=Zl[r])return Vl=t.i,t.result;t=Vl;var a=233*Vl+75;if(n=Zl[a])Vl=n.i,a=n.result;else{n=Vl;var i=q();if(i!==et){var o=Vl;if(He(),e.substr(Vl,8)===Ln){var s=Ln;Vl+=8}else s=et,0===Wl&&u(ls);s!==et?(s=je())!==et?(e.substr(Vl,2)===kn?(s=kn,Vl+=2):(s=et,0===Wl&&u(cs)),s!==et?(s=Ve())!==et?(He(),(s=ve())!==et?(Ql=o,o=s):(Vl=o,o=et)):(Vl=o,o=et):(Vl=o,o=et)):(Vl=o,o=et):(Vl=o,o=et),o===et&&(o=null),Ql=n,n=o?["instanceOfExpr",["argExpr",i],["sequenceType"].concat(o)]:i}else Vl=n,n=et;n===et&&(n=q()),Zl[a]={i:Vl,result:n},a=n}if(a!==et){for(n=[],i=Vl,He(),o=Vl,e.substr(Vl,9)===Xn?(s=Xn,Vl+=9):(s=et,0===Wl&&u(ss)),s!==et&&(Ql=o,s="intersectOp"),(o=s)===et&&(o=Vl,e.substr(Vl,6)===_n?(s=_n,Vl+=6):(s=et,0===Wl&&u(us)),s!==et&&(Ql=o,s="exceptOp"),o=s),o!==et?(s=Ve())!==et?(He(),(s=k())!==et?(Ql=i,i=[o,s]):(Vl=i,i=et)):(Vl=i,i=et):(Vl=i,i=et);i!==et;)n.push(i),i=Vl,He(),o=Vl,e.substr(Vl,9)===Xn?(s=Xn,Vl+=9):(s=et,0===Wl&&u(ss)),s!==et&&(Ql=o,s="intersectOp"),(o=s)===et&&(o=Vl,e.substr(Vl,6)===_n?(s=_n,Vl+=6):(s=et,0===Wl&&u(us)),s!==et&&(Ql=o,s="exceptOp"),o=s),o!==et?(s=Ve())!==et?(He(),(s=k())!==et?(Ql=i,i=[o,s]):(Vl=i,i=et)):(Vl=i,i=et):(Vl=i,i=et);Ql=t,t=function(e,t){return t.reduce((function(e,t){return[t[0],["firstOperand",e],["secondOperand",t[1]]]}),e)}(a,n)}else Vl=t,t=et;return Zl[r]={i:Vl,result:t},t}function q(){var t,n,r,a=233*Vl+76;if(t=Zl[a])return Vl=t.i,t.result;t=Vl;var i=233*Vl+77;if(n=Zl[i])Vl=n.i,i=n.result;else{var o;n=Vl;var s=233*Vl+78;if(r=Zl[s])Vl=r.i,s=r.result;else{r=Vl;var l=233*Vl+79;if(o=Zl[l])Vl=o.i,l=o.result;else{o=Vl;var c=function t(){var n,r=233*Vl+80;if(n=Zl[r])return Vl=n.i,n.result;if(n=Vl,45===e.charCodeAt(Vl)){var a=Mn;Vl++}else a=et,0===Wl&&u(es);if(a!==et?(He(),(a=t())!==et?(Ql=n,n=["unaryMinusOp",["operand",a]]):(Vl=n,n=et)):(Vl=n,n=et),n===et&&(n=Vl,43===e.charCodeAt(Vl)?(a=Gn,Vl++):(a=et,0===Wl&&u(ts)),a!==et?(He(),(a=t())!==et?(Ql=n,n=["unaryPlusOp",["operand",a]]):(Vl=n,n=et)):(Vl=n,n=et),n===et))if(a=Zl[n=233*Vl+81])Vl=a.i,n=a.result;else{var i,o;if(i=Zl[a=233*Vl+85])Vl=i.i,a=i.result;else{if(i=Vl,e.substr(Vl,8)===ur){var s=ur;Vl+=8}else s=et,0===Wl&&u(Os);if(s!==et){s=Vl,He();var l=233*Vl+86;(o=Zl[l])?(Vl=o.i,l=o.result):(e.substr(Vl,3)===cr?(o=cr,Vl+=3):(o=et,0===Wl&&u(Rs)),o===et&&(e.substr(Vl,6)===hr?(o=hr,Vl+=6):(o=et,0===Wl&&u(Ds))),Zl[l]={i:Vl,result:o},l=o),l!==et?(Ql=s,s=["validationMode",l]):(Vl=s,s=et),s===et&&(s=Vl,He(),e.substr(Vl,4)===lr?(l=lr,Vl+=4):(l=et,0===Wl&&u(Ss)),l!==et?(He(),(l=Be())!==et?(Ql=s,s=["type"].concat(l)):(Vl=s,s=et)):(Vl=s,s=et)),s===et&&(s=null),He(),123===e.charCodeAt(Vl)?(l=on,Vl++):(l=et,0===Wl&&u(To)),l!==et?(He(),(l=C())!==et?(He(),125===e.charCodeAt(Vl)?(o=sn,Vl++):(o=et,0===Wl&&u(Io)),o!==et?(Ql=i,i=["validateExpr"].concat(s?[s]:[],[["argExpr",l]])):(Vl=i,i=et)):(Vl=i,i=et)):(Vl=i,i=et)}else Vl=i,i=et;Zl[a]={i:Vl,result:i},a=i}if(a===et){if(i=Zl[a=233*Vl+87])Vl=i.i,a=i.result;else{if(i=Vl,s=[],(l=Y())!==et)for(;l!==et;)s.push(l),l=Y();else s=et;s!==et?(He(),123===e.charCodeAt(Vl)?(l=on,Vl++):(l=et,0===Wl&&u(To)),l!==et?(He(),C(),He(),125===e.charCodeAt(Vl)?(l=sn,Vl++):(l=et,0===Wl&&u(Io)),l!==et?(Ql=i,i=["extensionExpr"].concat(s)):(Vl=i,i=et)):(Vl=i,i=et)):(Vl=i,i=et),Zl[a]={i:Vl,result:i},a=i}if(a===et)if(i=Zl[a=233*Vl+90])Vl=i.i,a=i.result;else{if(i=Vl,(s=V())!==et){if(l=[],o=Vl,He(),33===e.charCodeAt(Vl)){var c=dr;Vl++}else c=et,0===Wl&&u(Us);for(c!==et?(He(),(c=V())!==et?(Ql=o,o=c):(Vl=o,o=et)):(Vl=o,o=et);o!==et;)l.push(o),o=Vl,He(),33===e.charCodeAt(Vl)?(c=dr,Vl++):(c=et,0===Wl&&u(Us)),c!==et?(He(),(c=V())!==et?(Ql=o,o=c):(Vl=o,o=et)):(Vl=o,o=et);Ql=i,i=function(e,t){return 0===t.length?$e(e):$e(["simpleMapExpr","pathExpr"===e[0]?e:["pathExpr",["stepExpr",["filterExpr",We(e)]]]].concat(t.map((function(e){return"pathExpr"===e[0]?e:["pathExpr",["stepExpr",["filterExpr",We(e)]]]}))))}(s,l)}else Vl=i,i=et;Zl[a]={i:Vl,result:i},a=i}}Zl[n]={i:Vl,result:a},n=a}return Zl[r]={i:Vl,result:n},n}();if(c!==et){var h=[],p=Vl;if(He(),e.substr(Vl,2)===Qn){var f=Qn;Vl+=2}else f=et,0===Wl&&u(ds);if(f!==et)if(He(),(f=te())!==et){He();var d=W();d!==et?(Ql=p,p=[f,d]):(Vl=p,p=et)}else Vl=p,p=et;else Vl=p,p=et;for(;p!==et;)h.push(p),p=Vl,He(),e.substr(Vl,2)===Qn?(f=Qn,Vl+=2):(f=et,0===Wl&&u(ds)),f!==et?(He(),(f=te())!==et?(He(),(d=W())!==et?(Ql=p,p=[f,d]):(Vl=p,p=et)):(Vl=p,p=et)):(Vl=p,p=et);Ql=o,o=function(e,t){return t.reduce((function(e,t){return["arrowExpr",["argExpr",e],t[0],["arguments"].concat(t[1])]}),e)}(c,h)}else Vl=o,o=et;Zl[l]={i:Vl,result:o},l=o}l!==et?(o=Vl,He(),e.substr(Vl,4)===Vn?(c=Vn,Vl+=4):(c=et,0===Wl&&u(fs)),c!==et?(c=je())!==et?(e.substr(Vl,2)===an?(c=an,Vl+=2):(c=et,0===Wl&&u(Co)),c!==et?(c=Ve())!==et?(He(),(c=de())!==et?(Ql=o,o=c):(Vl=o,o=et)):(Vl=o,o=et):(Vl=o,o=et)):(Vl=o,o=et):(Vl=o,o=et),o===et&&(o=null),Ql=r,r=o?["castExpr",["argExpr",l],o]:l):(Vl=r,r=et),Zl[s]={i:Vl,result:r},s=r}s!==et?(r=Vl,He(),e.substr(Vl,8)===Yn?(l=Yn,Vl+=8):(l=et,0===Wl&&u(ps)),l!==et?(l=je())!==et?(e.substr(Vl,2)===an?(l=an,Vl+=2):(l=et,0===Wl&&u(Co)),l!==et?(l=Ve())!==et?(He(),(l=de())!==et?(Ql=r,r=l):(Vl=r,r=et)):(Vl=r,r=et):(Vl=r,r=et)):(Vl=r,r=et):(Vl=r,r=et),r===et&&(r=null),Ql=n,n=r?["castableExpr",["argExpr",s],r]:s):(Vl=n,n=et),Zl[i]={i:Vl,result:n},i=n}return i!==et?(n=Vl,He(),e.substr(Vl,5)===qn?(s=qn,Vl+=5):(s=et,0===Wl&&u(hs)),s!==et?(s=je())!==et?(e.substr(Vl,2)===an?(s=an,Vl+=2):(s=et,0===Wl&&u(Co)),s!==et?(s=Ve())!==et?(He(),(s=ve())!==et?(Ql=n,n=s):(Vl=n,n=et)):(Vl=n,n=et):(Vl=n,n=et)):(Vl=n,n=et):(Vl=n,n=et),n===et&&(n=null),Ql=t,t=n?["treatExpr",["argExpr",i],["sequenceType"].concat(n)]:i):(Vl=t,t=et),Zl[a]={i:Vl,result:t},t}function Y(){var t,n=233*Vl+88;if(t=Zl[n])return Vl=t.i,t.result;if(t=Vl,e.substr(Vl,2)===pr){var r=pr;Vl+=2}else r=et,0===Wl&&u(Ms);if(r!==et)if(je(),(r=Be())!==et){var a=Vl,i=je();if(i!==et){var o;if(o=Zl[i=233*Vl+89])Vl=o.i,i=o.result;else{o=Vl;var s=[],l=Vl,c=Ge();if(c!==et){var h=Vl;if(Wl++,e.substr(Vl,2)===fr){var p=fr;Vl+=2}else p=et,0===Wl&&u(Gs);Wl--,p===et?h=void 0:(Vl=h,h=et),h!==et?(Ql=l,l=c):(Vl=l,l=et)}else Vl=l,l=et;for(;l!==et;)s.push(l),l=Vl,(c=Ge())!==et?(h=Vl,Wl++,e.substr(Vl,2)===fr?(p=fr,Vl+=2):(p=et,0===Wl&&u(Gs)),Wl--,p===et?h=void 0:(Vl=h,h=et),h!==et?(Ql=l,l=c):(Vl=l,l=et)):(Vl=l,l=et);Ql=o,o=s=s.join(""),Zl[i]={i:Vl,result:o},i=o}Ql=a,a=i}else Vl=a,a=et;a===et&&(a=null),He(),e.substr(Vl,2)===fr?(i=fr,Vl+=2):(i=et,0===Wl&&u(Gs)),i!==et?(Ql=t,t=a?["pragma",["pragmaName",r],["pragmaContents",a]]:["pragma",["pragmaName",r]]):(Vl=t,t=et)}else Vl=t,t=et;else Vl=t,t=et;return Zl[n]={i:Vl,result:t},t}function V(){var t,r,a=233*Vl+91;if(t=Zl[a])return Vl=t.i,t.result;if(r=Zl[t=233*Vl+92])Vl=r.i,t=r.result;else{r=Vl;var i=J();if(i!==et){He();var o=K();if(o!==et){He();var s=Q();s!==et?(Ql=r,r=["pathExpr",i,o].concat(s)):(Vl=r,r=et)}else Vl=r,r=et}else Vl=r,r=et;if(r===et&&(r=Vl,(i=J())!==et?(He(),47===e.charCodeAt(Vl)?(o=mr,Vl++):(o=et,0===Wl&&u(Fs)),o!==et?(He(),(s=Q())!==et?(Ql=r,r=["pathExpr",i].concat(s)):(Vl=r,r=et)):(Vl=r,r=et)):(Vl=r,r=et),r===et)){if(i=Zl[r=233*Vl+98])Vl=i.i,r=i.result;else{if(i=Vl,(o=ne())!==et){s=Vl,Wl++;var l=Vl,c=He(),h=Z();h!==et?l=c=[c,h]:(Vl=l,l=et),l===et&&(l=Vl,c=He(),(h=W())!==et?l=c=[c,h]:(Vl=l,l=et),l===et&&(l=Vl,c=He(),(h=$())!==et?l=c=[c,h]:(Vl=l,l=et))),Wl--,l===et?s=void 0:(Vl=s,s=et),s!==et?(Ql=i,i=o):(Vl=i,i=et)}else Vl=i,i=et;Zl[r]={i:Vl,result:i},r=i}r===et&&(r=Vl,(i=J())!==et&&(Ql=r,i=["pathExpr",i]),r=i)}Zl[t]={i:Vl,result:r},t=r}return t===et&&((r=Zl[t=233*Vl+95])?(Vl=r.i,t=r.result):(r=Vl,47===e.charCodeAt(Vl)?(o=mr,Vl++):(o=et,0===Wl&&u(Fs)),o!==et?(He(),(i=Q())!==et?(Ql=r,r=["pathExpr",["rootExpr"]].concat(i)):(Vl=r,r=et)):(Vl=r,r=et),r===et&&(r=Vl,(o=K())!==et?(He(),(i=Q())!==et?(Ql=r,r=["pathExpr",["rootExpr"],o].concat(i)):(Vl=r,r=et)):(Vl=r,r=et),r===et&&(r=Vl,47===e.charCodeAt(Vl)?(o=mr,Vl++):(o=et,0===Wl&&u(Fs)),o!==et?(o=Vl,Wl++,i=Vl,s=He(),Ql=l=Vl,(c=(c=n.Ra)?void 0:et)!==et?(ai.test(e.charAt(Vl))?(h=e.charAt(Vl),Vl++):(h=et,0===Wl&&u(Ps)),h!==et?l=c=[c,h]:(Vl=l,l=et)):(Vl=l,l=et),l!==et?i=s=[s,l]:(Vl=i,i=et),i===et&&(Ql=i=Vl,(s=(s=!n.Ra)?void 0:et)!==et?(ii.test(e.charAt(Vl))?(l=e.charAt(Vl),Vl++):(l=et,0===Wl&&u(Hs)),l!==et?i=s=[s,l]:(Vl=i,i=et)):(Vl=i,i=et)),Wl--,i===et?o=void 0:(Vl=o,o=et),o!==et?(Ql=r,r=["pathExpr",["rootExpr"]]):(Vl=r,r=et)):(Vl=r,r=et))),Zl[t]={i:Vl,result:r},t=r)),Zl[a]={i:Vl,result:t},t}function Q(){var t,n=233*Vl+93;if(t=Zl[n])return Vl=t.i,t.result;t=Vl;var r=J();if(r!==et){He();var a=K();if(a!==et){He();var i=Q();i!==et?(Ql=t,t=[r,a].concat(i)):(Vl=t,t=et)}else Vl=t,t=et}else Vl=t,t=et;return t===et&&(t=Vl,(r=J())!==et?(He(),47===e.charCodeAt(Vl)?(a=mr,Vl++):(a=et,0===Wl&&u(Fs)),a!==et?(He(),(i=Q())!==et?(Ql=t,t=[r].concat(i)):(Vl=t,t=et)):(Vl=t,t=et)):(Vl=t,t=et),t===et&&(t=Vl,(r=J())!==et&&(Ql=t,r=[r]),t=r)),Zl[n]={i:Vl,result:t},t}function J(){var t,n,r=233*Vl+94;if(t=Zl[r])return Vl=t.i,t.result;t=Vl;var a=233*Vl+97;if(n=Zl[a])Vl=n.i,a=n.result;else{var i=n=Vl,o=ne();if(o!==et&&(Ql=i,o=We(o)),(i=o)!==et){o=[];var s=Vl;He();var l=Z();for(l!==et?(Ql=s,s=["predicate",l]):(Vl=s,s=et),s===et&&(s=Vl,He(),(l=W())!==et?(Ql=s,s=["argumentList",l]):(Vl=s,s=et),s===et&&(s=Vl,He(),(l=$())!==et?(Ql=s,s=l):(Vl=s,s=et)));s!==et;)o.push(s),s=Vl,He(),(l=Z())!==et?(Ql=s,s=["predicate",l]):(Vl=s,s=et),s===et&&(s=Vl,He(),(l=W())!==et?(Ql=s,s=["argumentList",l]):(Vl=s,s=et),s===et&&(s=Vl,He(),(l=$())!==et?(Ql=s,s=l):(Vl=s,s=et)));Ql=n,n=function(e,t){function n(){s&&1===i.length?o.push(["predicate",i[0]]):0!==i.length&&o.push(["predicates"].concat(i)),i.length=0}function r(e){n(),0!==o.length?("sequenceExpr"===a[0]&&2<a.length&&(a=["sequenceExpr",a]),a=[["filterExpr",a]].concat(o)):a=e?[["filterExpr",a]]:[a],o.length=0}var a=e,i=[],o=[],s=!1;return t.forEach((function(e){"predicate"===e[0]?i.push(e[1]):"lookup"===e[0]?(s=!0,n(),o.push(e)):"argumentList"===e[0]&&(r(!1),1<a.length&&(a=[["sequenceExpr",["pathExpr",["stepExpr"].concat(a)]]]),a=["dynamicFunctionInvocationExpr",["functionItem"].concat(a)].concat(e[1].length?[["arguments"].concat(e[1])]:[]))})),r(!0),a}(i,o)}else Vl=n,n=et;Zl[a]={i:Vl,result:n},a=n}if(a!==et&&(Ql=t,a=["stepExpr"].concat(a)),(t=a)===et)if(a=Zl[t=233*Vl+99])Vl=a.i,t=a.result;else{if(a=Vl,i=Zl[n=233*Vl+103])Vl=i.i,n=i.result;else{if(i=Vl,s=Zl[o=233*Vl+104])Vl=s.i,o=s.result;else{if(l=s=Vl,e.substr(Vl,6)===Cr){var c=Cr;Vl+=6}else c=et,0===Wl&&u(Ks);if(c!==et){if(e.substr(Vl,2)===yr){var h=yr;Vl+=2}else h=et,0===Wl&&u(_s);h!==et?l=c=[c,h]:(Vl=l,l=et)}else Vl=l,l=et;l!==et&&(Ql=s,l="parent"),(s=l)===et&&(l=s=Vl,e.substr(Vl,8)===Tr?(c=Tr,Vl+=8):(c=et,0===Wl&&u(zs)),c!==et?(e.substr(Vl,2)===yr?(h=yr,Vl+=2):(h=et,0===Wl&&u(_s)),h!==et?l=c=[c,h]:(Vl=l,l=et)):(Vl=l,l=et),l!==et&&(Ql=s,l="ancestor"),(s=l)===et&&(l=s=Vl,e.substr(Vl,17)===Ir?(c=Ir,Vl+=17):(c=et,0===Wl&&u(Ws)),c!==et?(e.substr(Vl,2)===yr?(h=yr,Vl+=2):(h=et,0===Wl&&u(_s)),h!==et?l=c=[c,h]:(Vl=l,l=et)):(Vl=l,l=et),l!==et&&(Ql=s,l="preceding-sibling"),(s=l)===et&&(l=s=Vl,e.substr(Vl,9)===Or?(c=Or,Vl+=9):(c=et,0===Wl&&u(Zs)),c!==et?(e.substr(Vl,2)===yr?(h=yr,Vl+=2):(h=et,0===Wl&&u(_s)),h!==et?l=c=[c,h]:(Vl=l,l=et)):(Vl=l,l=et),l!==et&&(Ql=s,l="preceding"),(s=l)===et&&(l=s=Vl,e.substr(Vl,16)===Sr?(c=Sr,Vl+=16):(c=et,0===Wl&&u($s)),c!==et?(e.substr(Vl,2)===yr?(h=yr,Vl+=2):(h=et,0===Wl&&u(_s)),h!==et?l=c=[c,h]:(Vl=l,l=et)):(Vl=l,l=et),l!==et&&(Ql=s,l="ancestor-or-self"),s=l)))),Zl[o]={i:Vl,result:s},o=s}o!==et?(s=z())!==et?(Ql=i,i=["stepExpr",["xpathAxis",o],s]):(Vl=i,i=et):(Vl=i,i=et),i===et&&(i=Vl,(s=Zl[o=233*Vl+105])?(Vl=s.i,o=s.result):(s=Vl,e.substr(Vl,2)===Rr?(l=Rr,Vl+=2):(l=et,0===Wl&&u(eu)),l!==et&&(Ql=s,l=["stepExpr",["xpathAxis","parent"],["anyKindTest"]]),s=l,Zl[o]={i:Vl,result:s},o=s),o!==et&&(Ql=i),i=o),Zl[n]={i:Vl,result:i},n=i}if(n===et&&((i=Zl[n=233*Vl+100])?(Vl=i.i,n=i.result):(i=Vl,(s=Zl[o=233*Vl+101])?(Vl=s.i,o=s.result):(l=s=Vl,e.substr(Vl,5)===gr?(c=gr,Vl+=5):(c=et,0===Wl&&u(Xs)),c!==et?(e.substr(Vl,2)===yr?(h=yr,Vl+=2):(h=et,0===Wl&&u(_s)),h!==et?l=c=[c,h]:(Vl=l,l=et)):(Vl=l,l=et),l!==et&&(Ql=s,l="child"),(s=l)===et&&(l=s=Vl,e.substr(Vl,10)===wr?(c=wr,Vl+=10):(c=et,0===Wl&&u(Ls)),c!==et?(e.substr(Vl,2)===yr?(h=yr,Vl+=2):(h=et,0===Wl&&u(_s)),h!==et?l=c=[c,h]:(Vl=l,l=et)):(Vl=l,l=et),l!==et&&(Ql=s,l="descendant"),(s=l)===et&&(l=s=Vl,e.substr(Vl,9)===Ar?(c=Ar,Vl+=9):(c=et,0===Wl&&u(ks)),c!==et?(e.substr(Vl,2)===yr?(h=yr,Vl+=2):(h=et,0===Wl&&u(_s)),h!==et?l=c=[c,h]:(Vl=l,l=et)):(Vl=l,l=et),l!==et&&(Ql=s,l="attribute"),(s=l)===et&&(l=s=Vl,e.substr(Vl,4)===xr?(c=xr,Vl+=4):(c=et,0===Wl&&u(qs)),c!==et?(e.substr(Vl,2)===yr?(h=yr,Vl+=2):(h=et,0===Wl&&u(_s)),h!==et?l=c=[c,h]:(Vl=l,l=et)):(Vl=l,l=et),l!==et&&(Ql=s,l="self"),(s=l)===et&&(l=s=Vl,e.substr(Vl,18)===br?(c=br,Vl+=18):(c=et,0===Wl&&u(Ys)),c!==et?(e.substr(Vl,2)===yr?(h=yr,Vl+=2):(h=et,0===Wl&&u(_s)),h!==et?l=c=[c,h]:(Vl=l,l=et)):(Vl=l,l=et),l!==et&&(Ql=s,l="descendant-or-self"),(s=l)===et&&(l=s=Vl,e.substr(Vl,17)===Er?(c=Er,Vl+=17):(c=et,0===Wl&&u(Vs)),c!==et?(e.substr(Vl,2)===yr?(h=yr,Vl+=2):(h=et,0===Wl&&u(_s)),h!==et?l=c=[c,h]:(Vl=l,l=et)):(Vl=l,l=et),l!==et&&(Ql=s,l="following-sibling"),(s=l)===et&&(l=s=Vl,e.substr(Vl,9)===Br?(c=Br,Vl+=9):(c=et,0===Wl&&u(Qs)),c!==et?(e.substr(Vl,2)===yr?(h=yr,Vl+=2):(h=et,0===Wl&&u(_s)),h!==et?l=c=[c,h]:(Vl=l,l=et)):(Vl=l,l=et),l!==et&&(Ql=s,l="following"),s=l)))))),Zl[o]={i:Vl,result:s},o=s),o!==et?(s=z())!==et?(Ql=i,i=["stepExpr",["xpathAxis",o],s]):(Vl=i,i=et):(Vl=i,i=et),i===et&&((o=Zl[i=233*Vl+102])?(Vl=o.i,i=o.result):(o=Vl,64===e.charCodeAt(Vl)?(s=Nr,Vl++):(s=et,0===Wl&&u(Js)),s===et&&(s=null),(l=z())!==et?(Ql=o,o=s||"attributeTest"===l[0]||"schemaAttributeTest"===l[0]?["stepExpr",["xpathAxis","attribute"],l]:["stepExpr",["xpathAxis","child"],l]):(Vl=o,o=et),Zl[i]={i:Vl,result:o},i=o)),Zl[n]={i:Vl,result:i},n=i)),n!==et){if(o=Zl[i=233*Vl+110])Vl=o.i,i=o.result;else{for(o=Vl,s=[],l=Vl,He(),(c=Z())!==et?(Ql=l,l=c):(Vl=l,l=et);l!==et;)s.push(l),l=Vl,He(),(c=Z())!==et?(Ql=l,l=c):(Vl=l,l=et);Ql=o,o=s=s.length?["predicates"].concat(s):[],Zl[i]={i:Vl,result:o},i=o}Ql=a,a=0===i.length?n:n.concat([i])}else Vl=a,a=et;Zl[t]={i:Vl,result:a},t=a}return Zl[r]={i:Vl,result:t},t}function K(){var t,n=233*Vl+96;if(t=Zl[n])return Vl=t.i,t.result;if(t=Vl,e.substr(Vl,2)===vr){var r=vr;Vl+=2}else r=et,0===Wl&&u(js);return r!==et&&(Ql=t,r=["stepExpr",["xpathAxis","descendant-or-self"],["anyKindTest"]]),t=r,Zl[n]={i:Vl,result:t},t}function z(){var t,n,r,a=233*Vl+106;if(t=Zl[a])return Vl=t.i,t.result;if((t=we())===et)if(n=Zl[t=233*Vl+107])Vl=n.i,t=n.result;else{if(r=Zl[n=233*Vl+108])Vl=r.i,n=r.result;else{if(r=Vl,e.substr(Vl,2)===Dr){var i=Dr;Vl+=2}else i=et,0===Wl&&u(tu);if(i!==et){var o=Me();o!==et?(Ql=r,r=["Wildcard",["star"],["NCName",o]]):(Vl=r,r=et)}else Vl=r,r=et;r===et&&(r=Vl,42===e.charCodeAt(Vl)?(i=Un,Vl++):(i=et,0===Wl&&u(ns)),i!==et&&(Ql=r,i=["Wildcard"]),(r=i)===et&&(r=Vl,(i=Te())!==et?(42===e.charCodeAt(Vl)?(o=Un,Vl++):(o=et,0===Wl&&u(ns)),o!==et?(Ql=r,r=["Wildcard",["uri",i],["star"]]):(Vl=r,r=et)):(Vl=r,r=et),r===et&&(r=Vl,(i=Me())!==et?(e.substr(Vl,2)===Mr?(o=Mr,Vl+=2):(o=et,0===Wl&&u(nu)),o!==et?(Ql=r,r=["Wildcard",["NCName",i],["star"]]):(Vl=r,r=et)):(Vl=r,r=et)))),Zl[n]={i:Vl,result:r},n=r}n===et&&(n=Vl,(r=Be())!==et&&(Ql=n,r=["nameTest"].concat(r)),n=r),Zl[t]={i:Vl,result:n},t=n}return Zl[a]={i:Vl,result:t},t}function W(){var t,n=233*Vl+109;if(t=Zl[n])return Vl=t.i,t.result;if(t=Vl,40===e.charCodeAt(Vl)){var r=zt;Vl++}else r=et,0===Wl&&u(yo);if(r!==et){He(),r=Vl;var a=oe();if(a!==et){var i=[],o=Vl;if(He(),44===e.charCodeAt(Vl)){var s=Tt;Vl++}else s=et,0===Wl&&u(Ji);for(s!==et?(He(),(s=oe())!==et?(Ql=o,o=s):(Vl=o,o=et)):(Vl=o,o=et);o!==et;)i.push(o),o=Vl,He(),44===e.charCodeAt(Vl)?(s=Tt,Vl++):(s=et,0===Wl&&u(Ji)),s!==et?(He(),(s=oe())!==et?(Ql=o,o=s):(Vl=o,o=et)):(Vl=o,o=et);Ql=r,r=[a].concat(i)}else Vl=r,r=et;r===et&&(r=null),He(),41===e.charCodeAt(Vl)?(i=Wt,Vl++):(i=et,0===Wl&&u(wo)),i!==et?(Ql=t,t=r||[]):(Vl=t,t=et)}else Vl=t,t=et;return Zl[n]={i:Vl,result:t},t}function Z(){var t,n=233*Vl+111;if(t=Zl[n])return Vl=t.i,t.result;if(t=Vl,91===e.charCodeAt(Vl)){var r=Gr;Vl++}else r=et,0===Wl&&u(ru);if(r!==et)if(He(),(r=C())!==et){if(He(),93===e.charCodeAt(Vl)){var a=Ur;Vl++}else a=et,0===Wl&&u(au);a!==et?(Ql=t,t=r):(Vl=t,t=et)}else Vl=t,t=et;else Vl=t,t=et;return Zl[n]={i:Vl,result:t},t}function $(){var t,n=233*Vl+112;if(t=Zl[n])return Vl=t.i,t.result;if(t=Vl,63===e.charCodeAt(Vl)){var r=Fr;Vl++}else r=et,0===Wl&&u(iu);return r!==et?(He(),(r=ee())!==et?(Ql=t,t="*"===r?["lookup",["star"]]:"string"==typeof r?["lookup",["NCName",r]]:["lookup",r]):(Vl=t,t=et)):(Vl=t,t=et),Zl[n]={i:Vl,result:t},t}function ee(){var t,n=233*Vl+113;return(t=Zl[n])?(Vl=t.i,t.result):((t=Me())===et&&((t=Ne())===et&&((t=ie())===et&&(42===e.charCodeAt(Vl)?(t=Un,Vl++):(t=et,0===Wl&&u(ns))))),Zl[n]={i:Vl,result:t},t)}function te(){var e,t=233*Vl+114;if(e=Zl[t])return Vl=e.i,e.result;e=Vl;var n=Be();return n!==et&&(Ql=e,n=["EQName"].concat(n)),(e=n)===et&&((e=ae())===et&&(e=ie())),Zl[t]={i:Vl,result:e},e}function ne(){var t=233*Vl+115,n=Zl[t];if(n)return Vl=n.i,n.result;var r=re();if(r===et&&((r=ae())===et&&(r=ie())===et)){var a=233*Vl+120,i=Zl[a];if(i)Vl=i.i,r=i.result;else{var o=Vl;if(46===e.charCodeAt(Vl)){var s=Pr;Vl++}else s=et,0===Wl&&u(su);if(s!==et){var l=Vl;if(Wl++,46===e.charCodeAt(Vl)){var c=Pr;Vl++}else c=et,0===Wl&&u(su);Wl--,c===et?l=void 0:(Vl=l,l=et),l!==et?(Ql=o,o=["contextItemExpr"]):(Vl=o,o=et)}else Vl=o,o=et;Zl[a]={i:Vl,result:o},r=o}if(r===et){var h,p=233*Vl+121,f=Zl[p];if(f)Vl=f.i,r=f.result;else{var d=h=Vl;Wl++;var m=Vl,v=Ye();if(v!==et){var g=He();if(40===e.charCodeAt(Vl)){var y=zt;Vl++}else y=et,0===Wl&&u(yo);y!==et?m=v=[v,g,y]:(Vl=m,m=et)}else Vl=m,m=et;Wl--,m===et?d=void 0:(Vl=d,d=et),d!==et?(m=Be())!==et?(He(),(g=W())!==et?(Ql=h,h=["functionCallExpr",["functionName"].concat(m),["arguments"].concat(g)]):(Vl=h,h=et)):(Vl=h,h=et):(Vl=h,h=et),Zl[p]={i:Vl,result:h},r=h}if(r===et){var A=233*Vl+124,b=Zl[A];if(b)Vl=b.i,r=b.result;else{var N=se();if(N===et){var I=233*Vl+140,O=Zl[I];if(O)Vl=O.i,N=O.result;else{var S=233*Vl+141,R=Zl[S];if(R){Vl=R.i;var D=R.result}else{var M=Vl;if(e.substr(Vl,8)===zr){var G=zr;Vl+=8}else G=et,0===Wl&&u(Au);if(G!==et){He();var U=B();U!==et?(Ql=M,M=U?["computedDocumentConstructor",["argExpr",U]]:["computedDocumentConstructor"]):(Vl=M,M=et)}else Vl=M,M=et;Zl[S]={i:Vl,result:M},D=M}if(D===et){var F=233*Vl+142,P=Zl[F];if(P)Vl=P.i,D=P.result;else{var H=Vl;if(e.substr(Vl,7)===Vt){var j=Vt;Vl+=7}else j=et,0===Wl&&u(fo);if(j!==et){He();var X=Vl,_=Be();if(_!==et&&(Ql=X,_=["tagName"].concat(_)),(X=_)===et)if(X=Vl,123===e.charCodeAt(Vl)?(_=on,Vl++):(_=et,0===Wl&&u(To)),_!==et){He();var L=C();if(L!==et){if(He(),125===e.charCodeAt(Vl)){var k=sn;Vl++}else k=et,0===Wl&&u(Io);k!==et?(Ql=X,X=["tagNameExpr",L]):(Vl=X,X=et)}else Vl=X,X=et}else Vl=X,X=et;if(X!==et){He();var q=233*Vl+143,Y=Zl[q];if(Y){Vl=Y.i;var V=Y.result}else{var Q=Vl,J=B();J!==et&&(Ql=Q,J=J?[["contentExpr",J]]:[]),Q=J,Zl[q]={i:Vl,result:Q},V=Q}V!==et?(Ql=H,H=["computedElementConstructor",X].concat(V)):(Vl=H,H=et)}else Vl=H,H=et}else Vl=H,H=et;Zl[F]={i:Vl,result:H},D=H}if(D===et){var K=233*Vl+144,z=Zl[K];if(z)Vl=z.i,D=z.result;else{var Z=Vl;if(e.substr(Vl,9)===Ar){var $=Ar;Vl+=9}else $=et,0===Wl&&u(ks);if($!==et){var te=Vl;if(Ve()!==et){He();var ne=Be();ne!==et?(Ql=te,te=["tagName"].concat(ne)):(Vl=te,te=et)}else Vl=te,te=et;if(te===et){if(te=Vl,He(),123===e.charCodeAt(Vl)){var oe=on;Vl++}else oe=et,0===Wl&&u(To);if(oe!==et){He();var ue=C();if(ue!==et){if(He(),125===e.charCodeAt(Vl)){var le=sn;Vl++}else le=et,0===Wl&&u(Io);le!==et?(Ql=te,te=["tagNameExpr",ue]):(Vl=te,te=et)}else Vl=te,te=et}else Vl=te,te=et}te!==et?(He(),(oe=B())!==et?(Ql=Z,Z=["computedAttributeConstructor",te].concat([["valueExpr",oe||["sequenceExpr"]]])):(Vl=Z,Z=et)):(Vl=Z,Z=et)}else Vl=Z,Z=et;Zl[K]={i:Vl,result:Z},D=Z}if(D===et){var ce=233*Vl+145,he=Zl[ce];if(he)Vl=he.i,D=he.result;else{var pe=Vl;if(e.substr(Vl,9)===ut){var de=ut;Vl+=9}else de=et,0===Wl&&u(Oi);if(de!==et){He();var me=233*Vl+146,ge=Zl[me];if(ge){Vl=ge.i;var ye=ge.result}else{var we=Vl,Ae=Me();Ae!==et&&(Ql=we,Ae=["prefix",Ae]),we=Ae,Zl[me]={i:Vl,result:we},ye=we}if(ye===et){var xe=233*Vl+147,be=Zl[xe];if(be)Vl=be.i,ye=be.result;else{var Ee=Vl,Ce=B();Ce!==et&&(Ql=Ee,Ce=Ce?[["prefixExpr",Ce]]:[]),Ee=Ce,Zl[xe]={i:Vl,result:Ee},ye=Ee}}if(ye!==et){He();var Te=233*Vl+148,Ie=Zl[Te];if(Ie){Vl=Ie.i;var Oe=Ie.result}else{var Se=Vl,Re=B();Re!==et&&(Ql=Se,Re=Re?[["URIExpr",Re]]:[]),Se=Re,Zl[Te]={i:Vl,result:Se},Oe=Se}Oe!==et?(Ql=pe,pe=["computedNamespaceConstructor"].concat(ye,Oe)):(Vl=pe,pe=et)}else Vl=pe,pe=et}else Vl=pe,pe=et;Zl[ce]={i:Vl,result:pe},D=pe}if(D===et){var De=233*Vl+149,Ge=Zl[De];if(Ge)Vl=Ge.i,D=Ge.result;else{var Ue=Vl;if(e.substr(Vl,4)===Wr){var Fe=Wr;Vl+=4}else Fe=et,0===Wl&&u(xu);if(Fe!==et){He();var Pe=B();Pe!==et?(Ql=Ue,Ue=["computedTextConstructor"].concat(Pe?[["argExpr",Pe]]:[])):(Vl=Ue,Ue=et)}else Vl=Ue,Ue=et;Zl[De]={i:Vl,result:Ue},D=Ue}if(D===et){var Xe=233*Vl+150,_e=Zl[Xe];if(_e)Vl=_e.i,D=_e.result;else{var Le=Vl;if(e.substr(Vl,7)===Zr){var ke=Zr;Vl+=7}else ke=et,0===Wl&&u(bu);if(ke!==et){He();var qe=B();qe!==et?(Ql=Le,Le=["computedCommentConstructor"].concat(qe?[["argExpr",qe]]:[])):(Vl=Le,Le=et)}else Vl=Le,Le=et;Zl[Xe]={i:Vl,result:Le},D=Le}if(D===et){var Qe=233*Vl+151,Je=Zl[Qe];if(Je)Vl=Je.i,D=Je.result;else{var Ke=Vl;if(e.substr(Vl,22)===$r){var ze=$r;Vl+=22}else ze=et,0===Wl&&u(Eu);if(ze!==et){He();var We=Vl,Ze=Me();if(Ze!==et&&(Ql=We,Ze=["piTarget",Ze]),(We=Ze)===et)if(We=Vl,123===e.charCodeAt(Vl)?(Ze=on,Vl++):(Ze=et,0===Wl&&u(To)),Ze!==et){He();var $e=C();if($e!==et){if(He(),125===e.charCodeAt(Vl)){var tt=sn;Vl++}else tt=et,0===Wl&&u(Io);tt!==et?(Ql=We,We=["piTargetExpr",$e]):(Vl=We,We=et)}else Vl=We,We=et}else Vl=We,We=et;if(We!==et){He();var nt=B();nt!==et?(Ql=Ke,Ke=["computedPIConstructor",We].concat(nt?[["piValueExpr",nt]]:[])):(Vl=Ke,Ke=et)}else Vl=Ke,Ke=et}else Vl=Ke,Ke=et;Zl[Qe]={i:Vl,result:Ke},D=Ke}}}}}}}Zl[I]={i:Vl,result:D},N=D}}Zl[A]={i:Vl,result:N},r=N}if(r===et){var rt=233*Vl+152,at=Zl[rt];if(at)Vl=at.i,r=at.result;else{var it=233*Vl+153,ot=Zl[it];if(ot){Vl=ot.i;var st=ot.result}else{var lt=Vl,ct=Be();if(ct!==et){if(35===e.charCodeAt(Vl)){var ht=ea;Vl++}else ht=et,0===Wl&&u(Bu);if(ht!==et){var pt=Ne();pt!==et?(Ql=lt,lt=["namedFunctionRef",["functionName"].concat(ct),pt]):(Vl=lt,lt=et)}else Vl=lt,lt=et}else Vl=lt,lt=et;Zl[it]={i:Vl,result:lt},st=lt}if(st===et){var ft,dt=233*Vl+154,mt=Zl[dt];if(mt)Vl=mt.i,st=mt.result;else{var vt=Vl,gt=[];for(ft=w();ft!==et;)gt.push(ft),ft=w();if(He(),e.substr(Vl,8)===Qt){var yt=Qt;Vl+=8}else yt=et,0===Wl&&u(mo);if(yt!==et){if(He(),40===e.charCodeAt(Vl)){var wt=zt;Vl++}else wt=et,0===Wl&&u(yo);if(wt!==et){He();var At=x();if(At===et&&(At=null),He(),41===e.charCodeAt(Vl)){var xt=Wt;Vl++}else xt=et,0===Wl&&u(wo);if(xt!==et){He();var bt=Vl;if(e.substr(Vl,2)===an){var Et=an;Vl+=2}else Et=et,0===Wl&&u(Co);if(Et!==et)if(je()!==et){var Bt=ve();Bt!==et?(He(),Ql=bt,bt=["typeDeclaration"].concat(Bt)):(Vl=bt,bt=et)}else Vl=bt,bt=et;else Vl=bt,bt=et;bt===et&&(bt=null),(Et=E())!==et?(Ql=vt,vt=["inlineFunctionExpr"].concat(gt,[["paramList"].concat(At||[])],bt?[bt]:[],[["functionBody",Et]])):(Vl=vt,vt=et)}else Vl=vt,vt=et}else Vl=vt,vt=et}else Vl=vt,vt=et;Zl[dt]={i:Vl,result:vt},st=vt}}Zl[rt]={i:Vl,result:st},r=st}if(r===et){var Nt=233*Vl+155,Ct=Zl[Nt];if(Ct)Vl=Ct.i,r=Ct.result;else{var It=Vl;if(e.substr(Vl,3)===ta){var Ot=ta;Vl+=3}else Ot=et,0===Wl&&u(Nu);if(Ot!==et){if(He(),123===e.charCodeAt(Vl)){var St=on;Vl++}else St=et,0===Wl&&u(To);if(St!==et){He();var Rt=Vl,Dt=fe();if(Dt!==et){var Mt=[],Gt=Vl;if(He(),44===e.charCodeAt(Vl)){var Ut=Tt;Vl++}else Ut=et,0===Wl&&u(Ji);if(Ut!==et){He();var Ft=fe();Ft!==et?(Ql=Gt,Gt=Ft):(Vl=Gt,Gt=et)}else Vl=Gt,Gt=et;for(;Gt!==et;)Mt.push(Gt),Gt=Vl,He(),44===e.charCodeAt(Vl)?(Ut=Tt,Vl++):(Ut=et,0===Wl&&u(Ji)),Ut!==et?(He(),(Ft=fe())!==et?(Ql=Gt,Gt=Ft):(Vl=Gt,Gt=et)):(Vl=Gt,Gt=et);Ql=Rt,Rt=[Dt].concat(Mt)}else Vl=Rt,Rt=et;Rt===et&&(Rt=null),He(),125===e.charCodeAt(Vl)?(Mt=sn,Vl++):(Mt=et,0===Wl&&u(Io)),Mt!==et?(Ql=It,It=Rt?["mapConstructor"].concat(Rt):["mapConstructor"]):(Vl=It,It=et)}else Vl=It,It=et}else Vl=It,It=et;Zl[Nt]={i:Vl,result:It},r=It}if(r===et){var Pt=233*Vl+159,Ht=Zl[Pt];if(Ht)Vl=Ht.i,r=Ht.result;else{var jt=Vl,Xt=233*Vl+160,_t=Zl[Xt];if(_t){Vl=_t.i;var Lt=_t.result}else{var kt=Vl;if(91===e.charCodeAt(Vl)){var qt=Gr;Vl++}else qt=et,0===Wl&&u(ru);if(qt!==et){He();var Yt=Vl,Jt=T();if(Jt!==et){He();var Kt=[],Zt=Vl;if(44===e.charCodeAt(Vl)){var $t=Tt;Vl++}else $t=et,0===Wl&&u(Ji);if($t!==et){He();var en=T();en!==et?(Ql=Zt,Zt=en):(Vl=Zt,Zt=et)}else Vl=Zt,Zt=et;for(;Zt!==et;)Kt.push(Zt),Zt=Vl,44===e.charCodeAt(Vl)?($t=Tt,Vl++):($t=et,0===Wl&&u(Ji)),$t!==et?(He(),(en=T())!==et?(Ql=Zt,Zt=en):(Vl=Zt,Zt=et)):(Vl=Zt,Zt=et);Ql=Yt,Yt=function(e,t){return[e].concat(t).map((function(e){return["arrayElem",e]}))}(Jt,Kt)}else Vl=Yt,Yt=et;if(Yt===et&&(Yt=null),He(),93===e.charCodeAt(Vl)){var tn=Ur;Vl++}else tn=et,0===Wl&&u(au);tn!==et?(Ql=kt,kt=["squareArray"].concat(Yt)):(Vl=kt,kt=et)}else Vl=kt,kt=et;Zl[Xt]={i:Vl,result:kt},Lt=kt}if(Lt!==et&&(Ql=jt,Lt=["arrayConstructor",Lt]),(jt=Lt)===et){jt=Vl;var nn=233*Vl+161,rn=Zl[nn];if(rn)Vl=rn.i,Lt=rn.result;else{var un=Vl;if(e.substr(Vl,5)===ra){var ln=ra;Vl+=5}else ln=et,0===Wl&&u(Tu);if(ln!==et){He();var cn=B();cn!==et?(Ql=un,un=["curlyArray"].concat(cn?[["arrayElem",cn]]:[])):(Vl=un,un=et)}else Vl=un,un=et;Zl[nn]={i:Vl,result:un},Lt=un}Lt!==et&&(Ql=jt,Lt=["arrayConstructor",Lt]),jt=Lt}Zl[Pt]={i:Vl,result:jt},r=jt}if(r===et){var hn=233*Vl+162,pn=Zl[hn];if(pn)Vl=pn.i,r=pn.result;else{var fn=Vl;if(63===e.charCodeAt(Vl)){var dn=Fr;Vl++}else dn=et,0===Wl&&u(iu);if(dn!==et){He();var mn=ee();mn!==et?(Ql=fn,fn="*"===mn?["unaryLookup",["star"]]:"string"==typeof mn?["unaryLookup",["NCName",mn]]:["unaryLookup",mn]):(Vl=fn,fn=et)}else Vl=fn,fn=et;Zl[hn]={i:Vl,result:fn},r=fn}}}}}}}}return Zl[t]={i:Vl,result:r},r}function re(){var t,n,r,a,i=233*Vl+116;if(t=Zl[i])return Vl=t.i,t.result;if(n=Zl[t=233*Vl+117])Vl=n.i,t=n.result;else{var o;n=Vl;var s=233*Vl+195;if(r=Zl[s])Vl=r.i,s=r.result;else{var l=o=a=r=Vl;if(46===e.charCodeAt(Vl)){var c=Pr;Vl++}else c=et,0===Wl&&u(su);if(c!==et){var h=Ue();h!==et?l=c=[c,h]:(Vl=l,l=et)}else Vl=l,l=et;if(l===et)if(l=Vl,(c=Ue())!==et){if(h=Vl,46===e.charCodeAt(Vl)){var p=Pr;Vl++}else p=et,0===Wl&&u(su);if(p!==et){for(l=[],si.test(e.charAt(Vl))?(h=e.charAt(Vl),Vl++):(h=et,0===Wl&&u(_u));h!==et;)l.push(h),si.test(e.charAt(Vl))?(h=e.charAt(Vl),Vl++):(h=et,0===Wl&&u(_u));h=p=[p,l]}else Vl=h,h=et;h===et&&(h=null),l=c=[c,h]}else Vl=l,l=et;l!==et?(ui.test(e.charAt(Vl))?(c=e.charAt(Vl),Vl++):(c=et,0===Wl&&u(Lu)),c!==et?(li.test(e.charAt(Vl))?(h=e.charAt(Vl),Vl++):(h=et,0===Wl&&u(ku)),h===et&&(h=null),(p=Ue())!==et?o=l=[l,c,h,p]:(Vl=o,o=et)):(Vl=o,o=et)):(Vl=o,o=et),(a=o!==et?e.substring(a,Vl):o)!==et&&(Ql=r,a=["doubleConstantExpr",["value",a]]),r=a,Zl[s]={i:Vl,result:r},s=r}s===et&&((r=Zl[s=233*Vl+194])?(Vl=r.i,s=r.result):(p=a=r=Vl,46===e.charCodeAt(Vl)?(o=Pr,Vl++):(o=et,0===Wl&&u(su)),o!==et?(c=Ue())!==et?p=o=[o,c]:(Vl=p,p=et):(Vl=p,p=et),(a=p!==et?e.substring(a,Vl):p)!==et&&(Ql=r,a=["decimalConstantExpr",["value",a]]),(r=a)===et&&(p=a=r=Vl,(o=Ue())!==et?(46===e.charCodeAt(Vl)?(c=Pr,Vl++):(c=et,0===Wl&&u(su)),c!==et?((p=Ue())===et&&(p=null),p=o=[o,c,p]):(Vl=p,p=et)):(Vl=p,p=et),(a=p!==et?e.substring(a,Vl):p)!==et&&(Ql=r,a=["decimalConstantExpr",["value",a]]),r=a),Zl[s]={i:Vl,result:r},s=r),s===et&&(s=Ne())),s!==et?(r=Vl,Wl++,oi.test(e.charAt(Vl))?(a=e.charAt(Vl),Vl++):(a=et,0===Wl&&u(ou)),Wl--,a===et?r=void 0:(Vl=r,r=et),r!==et?(Ql=n,n=s):(Vl=n,n=et)):(Vl=n,n=et),Zl[t]={i:Vl,result:n},t=n}return t===et&&(t=Vl,(n=Ce())!==et&&(Ql=t,n=["stringConstantExpr",["value",Ke(n)]]),t=n),Zl[i]={i:Vl,result:t},t}function ae(){var t,n=233*Vl+118;if(t=Zl[n])return Vl=t.i,t.result;if(t=Vl,36===e.charCodeAt(Vl)){var r=$t;Vl++}else r=et,0===Wl&&u(xo);return r!==et?(r=Be())!==et?(Ql=t,t=["varRef",["name"].concat(r)]):(Vl=t,t=et):(Vl=t,t=et),Zl[n]={i:Vl,result:t},t}function ie(){var t,n=233*Vl+119;if(t=Zl[n])return Vl=t.i,t.result;if(t=Vl,40===e.charCodeAt(Vl)){var r=zt;Vl++}else r=et,0===Wl&&u(yo);if(r!==et)if(He(),(r=C())!==et){if(He(),41===e.charCodeAt(Vl)){var a=Wt;Vl++}else a=et,0===Wl&&u(wo);a!==et?(Ql=t,t=r):(Vl=t,t=et)}else Vl=t,t=et;else Vl=t,t=et;return t===et&&(t=Vl,40===e.charCodeAt(Vl)?(r=zt,Vl++):(r=et,0===Wl&&u(yo)),r!==et?(He(),41===e.charCodeAt(Vl)?(r=Wt,Vl++):(r=et,0===Wl&&u(wo)),r!==et?(Ql=t,t=["sequenceExpr"]):(Vl=t,t=et)):(Vl=t,t=et)),Zl[n]={i:Vl,result:t},t}function oe(){var t,n,r=233*Vl+122;if(t=Zl[r])return Vl=t.i,t.result;if((t=T())===et)if(n=Zl[t=233*Vl+123])Vl=n.i,t=n.result;else{if(n=Vl,63===e.charCodeAt(Vl)){var a=Fr;Vl++}else a=et,0===Wl&&u(iu);a!==et&&(Ql=n,a=["argumentPlaceholder"]),n=a,Zl[t]={i:Vl,result:n},t=n}return Zl[r]={i:Vl,result:t},t}function se(){var t,n,r,a=233*Vl+125;if(t=Zl[a])return Vl=t.i,t.result;if(n=Zl[t=233*Vl+126])Vl=n.i,t=n.result;else{if(n=Vl,60===e.charCodeAt(Vl)){var i=zn;Vl++}else i=et,0===Wl&&u(gs);if(i!==et)if((i=De())!==et){var o=233*Vl+127;if(r=Zl[o])Vl=r.i,o=r.result;else{r=Vl;var s=[],l=Vl,c=Xe();for(c!==et?((c=ue())===et&&(c=null),Ql=l,l=c):(Vl=l,l=et);l!==et;)s.push(l),l=Vl,(c=Xe())!==et?((c=ue())===et&&(c=null),Ql=l,l=c):(Vl=l,l=et);Ql=r,r=s=s.filter(Boolean),Zl[o]={i:Vl,result:r},o=r}if(s=Vl,e.substr(Vl,2)===Hr?(r=Hr,Vl+=2):(r=et,0===Wl&&u(uu)),r!==et&&(Ql=s,r=null),(s=r)===et)if(s=Vl,62===e.charCodeAt(Vl)?(r=Zn,Vl++):(r=et,0===Wl&&u(ws)),r!==et){for(r=[],l=he();l!==et;)r.push(l),l=he();He(),e.substr(Vl,2)===jr?(l=jr,Vl+=2):(l=et,0===Wl&&u(lu)),l!==et?(l=De())!==et?(Xe(),62===e.charCodeAt(Vl)?(c=Zn,Vl++):(c=et,0===Wl&&u(ws)),c!==et?(Ql=s,(s=1===i.length?i[0]:i[0].prefix+":"+i[1])!==(l=1===l.length?l[0]:l[0].prefix+":"+l[1])&&Ze("XQST0118",'The start and the end tag of an element constructor must be equal. "'+s+'" does not match "'+l+'"'),s=ze(r,!0,!0)):(Vl=s,s=et)):(Vl=s,s=et):(Vl=s,s=et)}else Vl=s,s=et;s!==et?(Ql=n,n=["elementConstructor",["tagName"].concat(i)].concat(o.length?[["attributeList"].concat(o)]:[],s&&s.length?[["elementContent"].concat(s)]:[])):(Vl=n,n=et)}else Vl=n,n=et;else Vl=n,n=et;Zl[t]={i:Vl,result:n},t=n}if(t===et){if(n=Zl[t=233*Vl+134])Vl=n.i,t=n.result;else{if(n=Vl,e.substr(Vl,4)===qr?(i=qr,Vl+=4):(i=et,0===Wl&&u(du)),i!==et){if(i=Vl,r=Zl[o=233*Vl+135])Vl=r.i;else{if(r=[],l=s=Vl,Wl++,45===e.charCodeAt(Vl)?(c=Mn,Vl++):(c=et,0===Wl&&u(es)),Wl--,c===et?l=void 0:(Vl=l,l=et),l!==et?(c=Ge())!==et?s=l=[l,c]:(Vl=s,s=et):(Vl=s,s=et),s===et)if(s=Vl,45===e.charCodeAt(Vl)?(l=Mn,Vl++):(l=et,0===Wl&&u(es)),l!==et){var h=c=Vl;if(Wl++,45===e.charCodeAt(Vl)){var p=Mn;Vl++}else p=et,0===Wl&&u(es);Wl--,p===et?h=void 0:(Vl=h,h=et),h!==et?(p=Ge())!==et?c=h=[h,p]:(Vl=c,c=et):(Vl=c,c=et),c!==et?s=l=[l,c]:(Vl=s,s=et)}else Vl=s,s=et;for(;s!==et;)r.push(s),l=s=Vl,Wl++,45===e.charCodeAt(Vl)?(c=Mn,Vl++):(c=et,0===Wl&&u(es)),Wl--,c===et?l=void 0:(Vl=l,l=et),l!==et?(c=Ge())!==et?s=l=[l,c]:(Vl=s,s=et):(Vl=s,s=et),s===et&&(s=Vl,45===e.charCodeAt(Vl)?(l=Mn,Vl++):(l=et,0===Wl&&u(es)),l!==et?(h=c=Vl,Wl++,45===e.charCodeAt(Vl)?(p=Mn,Vl++):(p=et,0===Wl&&u(es)),Wl--,p===et?h=void 0:(Vl=h,h=et),h!==et?(p=Ge())!==et?c=h=[h,p]:(Vl=c,c=et):(Vl=c,c=et),c!==et?s=l=[l,c]:(Vl=s,s=et)):(Vl=s,s=et));Zl[o]={i:Vl,result:r}}i=e.substring(i,Vl),e.substr(Vl,3)===Yr?(o=Yr,Vl+=3):(o=et,0===Wl&&u(mu)),o!==et?(Ql=n,n=["computedCommentConstructor",["argExpr",["stringConstantExpr",["value",i]]]]):(Vl=n,n=et)}else Vl=n,n=et;Zl[t]={i:Vl,result:n},t=n}if(t===et)if(n=Zl[t=233*Vl+136])Vl=n.i,t=n.result;else{if(n=Vl,e.substr(Vl,2)===Vr?(i=Vr,Vl+=2):(i=et,0===Wl&&u(vu)),i!==et){if(i=Vl,r=Zl[o=233*Vl+206])Vl=r.i,o=r.result;else{if(s=r=Vl,Wl++,l=Vl,88===e.charCodeAt(Vl)?(c=Ca,Vl++):(c=et,0===Wl&&u(sl)),c===et&&(120===e.charCodeAt(Vl)?(c=Ta,Vl++):(c=et,0===Wl&&u(ul))),c!==et?(77===e.charCodeAt(Vl)?(h=Ia,Vl++):(h=et,0===Wl&&u(ll)),h===et&&(109===e.charCodeAt(Vl)?(h=Oa,Vl++):(h=et,0===Wl&&u(cl))),h!==et?(76===e.charCodeAt(Vl)?(p=Sa,Vl++):(p=et,0===Wl&&u(hl)),p===et&&(108===e.charCodeAt(Vl)?(p=Ra,Vl++):(p=et,0===Wl&&u(pl))),p!==et?l=c=[c,h,p]:(Vl=l,l=et)):(Vl=l,l=et)):(Vl=l,l=et),Wl--,l===et?s=void 0:(Vl=s,s=et),s!==et){var f;if(c=Zl[l=233*Vl+230])Vl=c.i,l=c.result;else{if(h=c=Vl,(f=Zl[p=233*Vl+229])?(Vl=f.i,p=f.result):((f=Le())===et&&(58===e.charCodeAt(Vl)?(f=na,Vl++):(f=et,0===Wl&&u(Cu))),Zl[p]={i:Vl,result:f},p=f),p!==et){for(h=[],f=qe();f!==et;)h.push(f),f=qe();h=p=[p,h]}else Vl=h,h=et;c=h!==et?e.substring(c,Vl):h,Zl[l]={i:Vl,result:c},l=c}l!==et?r=s=[s,l]:(Vl=r,r=et)}else Vl=r,r=et;Zl[o]={i:Vl,result:r},o=r}if((i=o!==et?e.substring(i,Vl):o)!==et){if(o=Vl,(r=Xe())!==et){if(r=Vl,l=Zl[s=233*Vl+137])Vl=l.i;else{for(l=[],h=c=Vl,Wl++,e.substr(Vl,2)===Qr?(p=Qr,Vl+=2):(p=et,0===Wl&&u(gu)),Wl--,p===et?h=void 0:(Vl=h,h=et),h!==et?(p=Ge())!==et?c=h=[h,p]:(Vl=c,c=et):(Vl=c,c=et);c!==et;)l.push(c),h=c=Vl,Wl++,e.substr(Vl,2)===Qr?(p=Qr,Vl+=2):(p=et,0===Wl&&u(gu)),Wl--,p===et?h=void 0:(Vl=h,h=et),h!==et?(p=Ge())!==et?c=h=[h,p]:(Vl=c,c=et):(Vl=c,c=et);Zl[s]={i:Vl,result:l}}r=e.substring(r,Vl),Ql=o,o=r}else Vl=o,o=et;o===et&&(o=null),e.substr(Vl,2)===Qr?(r=Qr,Vl+=2):(r=et,0===Wl&&u(gu)),r!==et?(Ql=n,n=["computedPIConstructor",["piTarget",i],["piValueExpr",["stringConstantExpr",["value",o]]]]):(Vl=n,n=et)}else Vl=n,n=et}else Vl=n,n=et;Zl[t]={i:Vl,result:n},t=n}}return Zl[a]={i:Vl,result:t},t}function ue(){var t,n=233*Vl+128;if(t=Zl[n])return Vl=t.i,t.result;var r=Vl;if((t=De())!==et){if(Xe(),61===e.charCodeAt(Vl)){var a=lt;Vl++}else a=et,0===Wl&&u(Si);if(a!==et){var i;if(Xe(),i=Zl[a=233*Vl+129])Vl=i.i,a=i.result;else{if(i=Vl,34===e.charCodeAt(Vl)){var o=Xr;Vl++}else o=et,0===Wl&&u(cu);if(o!==et){o=[];var s=Oe();for(s===et&&(s=le());s!==et;)o.push(s),(s=Oe())===et&&(s=le());34===e.charCodeAt(Vl)?(s=Xr,Vl++):(s=et,0===Wl&&u(cu)),s!==et?(Ql=i,i=ze(o,!1,!1)):(Vl=i,i=et)}else Vl=i,i=et;if(i===et)if(i=Vl,39===e.charCodeAt(Vl)?(o=_r,Vl++):(o=et,0===Wl&&u(hu)),o!==et){for(o=[],(s=Se())===et&&(s=ce());s!==et;)o.push(s),(s=Se())===et&&(s=ce());39===e.charCodeAt(Vl)?(s=_r,Vl++):(s=et,0===Wl&&u(hu)),s!==et?(Ql=i,i=ze(o,!1,!1)):(Vl=i,i=et)}else Vl=i,i=et;Zl[a]={i:Vl,result:i},a=i}a!==et?(Ql=r,r=a,1===t.length&&"xmlns"===t[0]?(r.length&&"string"!=typeof r[0]&&Ze("XQST0022","A namespace declaration may not contain enclosed expressions"),r=["namespaceDeclaration",r.length?["uri",r[0]]:["uri"]]):"xmlns"===t[0].prefix?(r.length&&"string"!=typeof r[0]&&Ze("XQST0022","The namespace declaration for 'xmlns:"+t[1]+"' may not contain enclosed expressions"),r=["namespaceDeclaration",["prefix",t[1]],r.length?["uri",r[0]]:["uri"]]):r=["attributeConstructor",["attributeName"].concat(t),0===r.length?["attributeValue"]:1===r.length&&"string"==typeof r[0]?["attributeValue",r[0]]:["attributeValueExpr"].concat(r)]):(Vl=r,r=et)}else Vl=r,r=et}else Vl=r,r=et;return Zl[n]={i:Vl,result:r},r}function le(){var t,n,r=233*Vl+130;if(t=Zl[r])return Vl=t.i,t.result;t=Vl;var a=233*Vl+203;if(n=Zl[a])Vl=n.i,a=n.result;else{var i=n=Vl;if(Wl++,vi.test(e.charAt(Vl))){var o=e.charAt(Vl);Vl++}else o=et,0===Wl&&u(rl);Wl--,o===et?i=void 0:(Vl=i,i=et),i!==et?(o=Ge())!==et?(Ql=n,n=o):(Vl=n,n=et):(Vl=n,n=et),Zl[a]={i:Vl,result:n},a=n}return a!==et&&(Ql=t,a=a.replace(/[\x20\x0D\x0A\x09]/g," ")),(t=a)===et&&(t=pe()),Zl[r]={i:Vl,result:t},t}function ce(){var t,n,r=233*Vl+131;if(t=Zl[r])return Vl=t.i,t.result;t=Vl;var a=233*Vl+204;if(n=Zl[a])Vl=n.i,a=n.result;else{var i=n=Vl;if(Wl++,gi.test(e.charAt(Vl))){var o=e.charAt(Vl);Vl++}else o=et,0===Wl&&u(al);Wl--,o===et?i=void 0:(Vl=i,i=et),i!==et?(o=Ge())!==et?(Ql=n,n=o):(Vl=n,n=et):(Vl=n,n=et),Zl[a]={i:Vl,result:n},a=n}return a!==et&&(Ql=t,a=a.replace(/[\x20\x0D\x0A\x09]/g," ")),(t=a)===et&&(t=pe()),Zl[r]={i:Vl,result:t},t}function he(){var t,n,r=233*Vl+132;if(t=Zl[r])return Vl=t.i,t.result;t=Vl;var a=233*Vl+138;if(n=Zl[a])Vl=n.i,a=n.result;else{if(n=Vl,e.substr(Vl,9)===Jr){var i=Jr;Vl+=9}else i=et,0===Wl&&u(yu);if(i!==et){var o,s;i=Vl;var l=233*Vl+139;if(o=Zl[l])Vl=o.i;else{o=[];var c=s=Vl;if(Wl++,e.substr(Vl,3)===Kr){var h=Kr;Vl+=3}else h=et,0===Wl&&u(wu);for(Wl--,h===et?c=void 0:(Vl=c,c=et),c!==et?(h=Ge())!==et?s=c=[c,h]:(Vl=s,s=et):(Vl=s,s=et);s!==et;)o.push(s),c=s=Vl,Wl++,e.substr(Vl,3)===Kr?(h=Kr,Vl+=3):(h=et,0===Wl&&u(wu)),Wl--,h===et?c=void 0:(Vl=c,c=et),c!==et?(h=Ge())!==et?s=c=[c,h]:(Vl=s,s=et):(Vl=s,s=et);Zl[l]={i:Vl,result:o}}i=e.substring(i,Vl),e.substr(Vl,3)===Kr?(l=Kr,Vl+=3):(l=et,0===Wl&&u(wu)),l!==et?(Ql=n,n=["CDataSection",i]):(Vl=n,n=et)}else Vl=n,n=et;Zl[a]={i:Vl,result:n},a=n}return a!==et&&(Ql=t),(t=a)===et&&(t=Vl,(a=se())!==et&&(Ql=t),(t=a)===et&&(t=Vl,(a=pe())!==et&&(Ql=t),(t=a)===et&&(a=t=Vl,(i=Zl[n=233*Vl+202])?(Vl=i.i,n=i.result):(l=i=Vl,Wl++,mi.test(e.charAt(Vl))?(o=e.charAt(Vl),Vl++):(o=et,0===Wl&&u(nl)),Wl--,o===et?l=void 0:(Vl=l,l=et),l!==et?(o=Ge())!==et?i=l=[l,o]:(Vl=i,i=et):(Vl=i,i=et),Zl[n]={i:Vl,result:i},n=i),(a=n!==et?e.substring(a,Vl):n)!==et&&(Ql=t),t=a))),Zl[r]={i:Vl,result:t},t}function pe(){var t,n=233*Vl+133;if(t=Zl[n])return Vl=t.i,t.result;if((t=Ie())===et&&(t=Re())===et){if(t=Vl,e.substr(Vl,2)===Lr){var r=Lr;Vl+=2}else r=et,0===Wl&&u(pu);r!==et&&(Ql=t,r="{"),(t=r)===et&&(t=Vl,e.substr(Vl,2)===kr?(r=kr,Vl+=2):(r=et,0===Wl&&u(fu)),r!==et&&(Ql=t,r="}"),(t=r)===et&&(t=Vl,(r=B())!==et&&(Ql=t,r=r||["sequenceExpr"]),t=r))}return Zl[n]={i:Vl,result:t},t}function fe(){var t,n,r=233*Vl+156;if(t=Zl[r])return Vl=t.i,t.result;t=Vl;var a=233*Vl+157;if(n=Zl[a])Vl=n.i,a=n.result;else{n=Vl;var i=T();i!==et&&(Ql=n,i=["mapKeyExpr",i]),n=i,Zl[a]={i:Vl,result:n},a=n}if(a!==et)if(He(),58===e.charCodeAt(Vl)?(n=na,Vl++):(n=et,0===Wl&&u(Cu)),n!==et){if(He(),i=Zl[n=233*Vl+158])Vl=i.i,n=i.result;else{i=Vl;var o=T();o!==et&&(Ql=i,o=["mapValueExpr",o]),i=o,Zl[n]={i:Vl,result:i},n=i}n!==et?(Ql=t,t=["mapConstructorEntry",a,n]):(Vl=t,t=et)}else Vl=t,t=et;else Vl=t,t=et;return Zl[r]={i:Vl,result:t},t}function de(){var t,n=233*Vl+163;if(t=Zl[n])return Vl=t.i,t.result;t=Vl;var r=Be();if(r!==et){if(63===e.charCodeAt(Vl)){var a=Fr;Vl++}else a=et,0===Wl&&u(iu);a===et&&(a=null),Ql=t,t=a?["singleType",["atomicType"].concat(r),["optional"]]:["singleType",["atomicType"].concat(r)]}else Vl=t,t=et;return Zl[n]={i:Vl,result:t},t}function me(){var t,n=233*Vl+164;if(t=Zl[n])return Vl=t.i,t.result;if(t=Vl,e.substr(Vl,2)===an){var r=an;Vl+=2}else r=et,0===Wl&&u(Co);return r!==et?(r=je())!==et?(r=ve())!==et?(Ql=t,t=["typeDeclaration"].concat(r)):(Vl=t,t=et):(Vl=t,t=et):(Vl=t,t=et),Zl[n]={i:Vl,result:t},t}function ve(){var t,n=233*Vl+165;if(t=Zl[n])return Vl=t.i,t.result;if(t=Vl,e.substr(Vl,16)===aa){var r=aa;Vl+=16}else r=et,0===Wl&&u(Iu);if(r!==et&&(Ql=t,r=[["voidSequenceType"]]),(t=r)===et)if(t=Vl,(r=ge())!==et){var a,i=Vl;He();var o=233*Vl+166;(a=Zl[o])?(Vl=a.i,o=a.result):(63===e.charCodeAt(Vl)?(a=Fr,Vl++):(a=et,0===Wl&&u(iu)),a===et&&(42===e.charCodeAt(Vl)?(a=Un,Vl++):(a=et,0===Wl&&u(ns)),a===et&&(43===e.charCodeAt(Vl)?(a=Gn,Vl++):(a=et,0===Wl&&u(ts)))),Zl[o]={i:Vl,result:a},o=a),o!==et?(Ql=i,i=o):(Vl=i,i=et),i===et&&(i=null),Ql=t,t=[r].concat(i?[["occurrenceIndicator",i]]:[])}else Vl=t,t=et;return Zl[n]={i:Vl,result:t},t}function ge(){var t,n=233*Vl+167;if(t=Zl[n])return Vl=t.i,t.result;if((t=we())===et){if(t=Vl,e.substr(Vl,6)===ia){var r=ia;Vl+=6}else r=et,0===Wl&&u(Ou);if(r!==et&&(Ql=t,r=["anyItemType"]),(t=r)===et){var a;if(r=Zl[t=233*Vl+182])Vl=r.i,t=r.result;else{r=Vl;var i,o=[];for(a=w();a!==et;)o.push(a),a=w();if(i=Zl[a=233*Vl+183])Vl=i.i,a=i.result;else{if(i=Vl,e.substr(Vl,8)===Qt){var s=Qt;Vl+=8}else s=et,0===Wl&&u(mo);s!==et?(He(),40===e.charCodeAt(Vl)?(s=zt,Vl++):(s=et,0===Wl&&u(yo)),s!==et?(He(),42===e.charCodeAt(Vl)?(s=Un,Vl++):(s=et,0===Wl&&u(ns)),s!==et?(He(),41===e.charCodeAt(Vl)?(s=Wt,Vl++):(s=et,0===Wl&&u(wo)),s!==et?(Ql=i,i=["anyFunctionTest"]):(Vl=i,i=et)):(Vl=i,i=et)):(Vl=i,i=et)):(Vl=i,i=et),Zl[a]={i:Vl,result:i},a=i}if(a===et)if(i=Zl[a=233*Vl+184])Vl=i.i,a=i.result;else{if(i=Vl,e.substr(Vl,8)===Qt?(s=Qt,Vl+=8):(s=et,0===Wl&&u(mo)),s!==et)if(He(),40===e.charCodeAt(Vl)?(s=zt,Vl++):(s=et,0===Wl&&u(yo)),s!==et){He(),s=Vl;var l=ve();if(l!==et){var c=[],h=Vl;if(44===e.charCodeAt(Vl)){var p=Tt;Vl++}else p=et,0===Wl&&u(Ji);for(p!==et?(He(),(p=ve())!==et?(Ql=h,h=p):(Vl=h,h=et)):(Vl=h,h=et);h!==et;)c.push(h),h=Vl,44===e.charCodeAt(Vl)?(p=Tt,Vl++):(p=et,0===Wl&&u(Ji)),p!==et?(He(),(p=ve())!==et?(Ql=h,h=p):(Vl=h,h=et)):(Vl=h,h=et);Ql=s,s=l.concat.apply(l,c)}else Vl=s,s=et;s===et&&(s=null),He(),41===e.charCodeAt(Vl)?(c=Wt,Vl++):(c=et,0===Wl&&u(wo)),c!==et?(h=je())!==et?(e.substr(Vl,2)===an?(p=an,Vl+=2):(p=et,0===Wl&&u(Co)),p!==et?(l=je())!==et?(p=ve())!==et?(Ql=i,i=["typedFunctionTest",["paramTypeList",["sequenceType"].concat(s)],["sequenceType"].concat(p)]):(Vl=i,i=et):(Vl=i,i=et):(Vl=i,i=et)):(Vl=i,i=et):(Vl=i,i=et)}else Vl=i,i=et;else Vl=i,i=et;Zl[a]={i:Vl,result:i},a=i}a!==et?(Ql=r,r=[a[0]].concat(o,a.slice(1))):(Vl=r,r=et),Zl[t]={i:Vl,result:r},t=r}t===et&&((r=Zl[t=233*Vl+185])?(Vl=r.i,t=r.result):((o=Zl[r=233*Vl+186])?(Vl=o.i,r=o.result):(o=Vl,e.substr(Vl,3)===ta?(a=ta,Vl+=3):(a=et,0===Wl&&u(Nu)),a!==et?(He(),40===e.charCodeAt(Vl)?(a=zt,Vl++):(a=et,0===Wl&&u(yo)),a!==et?(He(),42===e.charCodeAt(Vl)?(a=Un,Vl++):(a=et,0===Wl&&u(ns)),a!==et?(He(),41===e.charCodeAt(Vl)?(a=Wt,Vl++):(a=et,0===Wl&&u(wo)),a!==et?(Ql=o,o=["anyMapTest"]):(Vl=o,o=et)):(Vl=o,o=et)):(Vl=o,o=et)):(Vl=o,o=et),Zl[r]={i:Vl,result:o},r=o),r===et&&((o=Zl[r=233*Vl+187])?(Vl=o.i,r=o.result):(o=Vl,e.substr(Vl,3)===ta?(a=ta,Vl+=3):(a=et,0===Wl&&u(Nu)),a!==et?(He(),40===e.charCodeAt(Vl)?(a=zt,Vl++):(a=et,0===Wl&&u(yo)),a!==et?(He(),(a=ye())!==et?(He(),44===e.charCodeAt(Vl)?(i=Tt,Vl++):(i=et,0===Wl&&u(Ji)),i!==et?(He(),(i=ve())!==et?(He(),41===e.charCodeAt(Vl)?(s=Wt,Vl++):(s=et,0===Wl&&u(wo)),s!==et?(Ql=o,o=["typedMapTest",a,["sequenceType"].concat(i)]):(Vl=o,o=et)):(Vl=o,o=et)):(Vl=o,o=et)):(Vl=o,o=et)):(Vl=o,o=et)):(Vl=o,o=et),Zl[r]={i:Vl,result:o},r=o)),Zl[t]={i:Vl,result:r},t=r),t===et&&((r=Zl[t=233*Vl+188])?(Vl=r.i,t=r.result):((o=Zl[r=233*Vl+189])?(Vl=o.i,r=o.result):(o=Vl,e.substr(Vl,5)===ra?(a=ra,Vl+=5):(a=et,0===Wl&&u(Tu)),a!==et?(He(),40===e.charCodeAt(Vl)?(a=zt,Vl++):(a=et,0===Wl&&u(yo)),a!==et?(He(),42===e.charCodeAt(Vl)?(a=Un,Vl++):(a=et,0===Wl&&u(ns)),a!==et?(He(),41===e.charCodeAt(Vl)?(a=Wt,Vl++):(a=et,0===Wl&&u(wo)),a!==et?(Ql=o,o=["anyArrayTest"]):(Vl=o,o=et)):(Vl=o,o=et)):(Vl=o,o=et)):(Vl=o,o=et),Zl[r]={i:Vl,result:o},r=o),r===et&&((o=Zl[r=233*Vl+190])?(Vl=o.i,r=o.result):(o=Vl,e.substr(Vl,5)===ra?(a=ra,Vl+=5):(a=et,0===Wl&&u(Tu)),a!==et?(He(),40===e.charCodeAt(Vl)?(a=zt,Vl++):(a=et,0===Wl&&u(yo)),a!==et?(He(),(a=ve())!==et?(He(),41===e.charCodeAt(Vl)?(i=Wt,Vl++):(i=et,0===Wl&&u(wo)),i!==et?(Ql=o,o=["typedArrayTest",["sequenceType"].concat(a)]):(Vl=o,o=et)):(Vl=o,o=et)):(Vl=o,o=et)):(Vl=o,o=et),Zl[r]={i:Vl,result:o},r=o)),Zl[t]={i:Vl,result:r},t=r),t===et&&((t=ye())===et&&((r=Zl[t=233*Vl+191])?(Vl=r.i,t=r.result):(r=Vl,40===e.charCodeAt(Vl)?(o=zt,Vl++):(o=et,0===Wl&&u(yo)),o!==et?(He(),(o=ge())!==et?(He(),41===e.charCodeAt(Vl)?(a=Wt,Vl++):(a=et,0===Wl&&u(wo)),a!==et?(Ql=r,r=["parenthesizedItemType",o]):(Vl=r,r=et)):(Vl=r,r=et)):(Vl=r,r=et),Zl[t]={i:Vl,result:r},t=r)))))}}return Zl[n]={i:Vl,result:t},t}function ye(){var e,t=233*Vl+168;if(e=Zl[t])return Vl=e.i,e.result;e=Vl;var n=Be();return n!==et&&(Ql=e,n=["atomicType"].concat(n)),e=n,Zl[t]={i:Vl,result:e},e}function we(){var t,n,r=233*Vl+169;if(t=Zl[r])return Vl=t.i,t.result;if(n=Zl[t=233*Vl+171])Vl=n.i,t=n.result;else{if(n=Vl,e.substr(Vl,14)===sa){var a=sa;Vl+=14}else a=et,0===Wl&&u(Ru);if(a!==et){if(He(),(a=xe())===et&&(a=Ee()),a===et&&(a=null),He(),41===e.charCodeAt(Vl)){var i=Wt;Vl++}else i=et,0===Wl&&u(wo);i!==et?(Ql=n,n=["documentTest"].concat(a?[a]:[])):(Vl=n,n=et)}else Vl=n,n=et;Zl[t]={i:Vl,result:n},t=n}if(t===et&&(t=xe())===et){if(n=Zl[t=233*Vl+176])Vl=n.i,t=n.result;else{if(n=Vl,e.substr(Vl,10)===fa?(a=fa,Vl+=10):(a=et,0===Wl&&u(Pu)),a!==et)if(He(),(a=Ae())!==et)if(He(),44===e.charCodeAt(Vl)?(i=Tt,Vl++):(i=et,0===Wl&&u(Ji)),i!==et)if(He(),(i=Be())!==et){if(He(),41===e.charCodeAt(Vl)){var o=Wt;Vl++}else o=et,0===Wl&&u(wo);o!==et?(Ql=n,n=["attributeTest",["attributeName",a],["typeName"].concat(i)]):(Vl=n,n=et)}else Vl=n,n=et;else Vl=n,n=et;else Vl=n,n=et;else Vl=n,n=et;n===et&&(n=Vl,e.substr(Vl,10)===fa?(a=fa,Vl+=10):(a=et,0===Wl&&u(Pu)),a!==et?(He(),(a=Ae())!==et?(He(),41===e.charCodeAt(Vl)?(i=Wt,Vl++):(i=et,0===Wl&&u(wo)),i!==et?(Ql=n,n=["attributeTest",["attributeName",a]]):(Vl=n,n=et)):(Vl=n,n=et)):(Vl=n,n=et),n===et&&(n=Vl,e.substr(Vl,11)===da?(a=da,Vl+=11):(a=et,0===Wl&&u(Hu)),a!==et&&(Ql=n,a=["attributeTest"]),n=a)),Zl[t]={i:Vl,result:n},t=n}t===et&&((t=Ee())===et&&((n=Zl[t=233*Vl+178])?(Vl=n.i,t=n.result):(n=Vl,e.substr(Vl,17)===ma?(a=ma,Vl+=17):(a=et,0===Wl&&u(ju)),a!==et?(He(),(a=Be())!==et?(He(),41===e.charCodeAt(Vl)?(i=Wt,Vl++):(i=et,0===Wl&&u(wo)),i!==et?(Ql=n,n=["schemaAttributeTest"].concat(a)):(Vl=n,n=et)):(Vl=n,n=et)):(Vl=n,n=et),Zl[t]={i:Vl,result:n},t=n),t===et&&((n=Zl[t=233*Vl+175])?(Vl=n.i,t=n.result):(n=Vl,e.substr(Vl,23)===ha?(a=ha,Vl+=23):(a=et,0===Wl&&u(Uu)),a!==et?(He(),(a=Me())!==et?(He(),41===e.charCodeAt(Vl)?(i=Wt,Vl++):(i=et,0===Wl&&u(wo)),i!==et?(Ql=n,n=["piTest",["piTarget",a]]):(Vl=n,n=et)):(Vl=n,n=et)):(Vl=n,n=et),n===et&&(n=Vl,e.substr(Vl,23)===ha?(a=ha,Vl+=23):(a=et,0===Wl&&u(Uu)),a!==et?(He(),(a=Ce())!==et?(He(),41===e.charCodeAt(Vl)?(i=Wt,Vl++):(i=et,0===Wl&&u(wo)),i!==et?(Ql=n,n=["piTest",["piTarget",a]]):(Vl=n,n=et)):(Vl=n,n=et)):(Vl=n,n=et),n===et&&(n=Vl,e.substr(Vl,24)===pa?(a=pa,Vl+=24):(a=et,0===Wl&&u(Fu)),a!==et&&(Ql=n,a=["piTest"]),n=a)),Zl[t]={i:Vl,result:n},t=n),t===et&&((n=Zl[t=233*Vl+173])?(Vl=n.i,t=n.result):(n=Vl,e.substr(Vl,9)===la?(a=la,Vl+=9):(a=et,0===Wl&&u(Mu)),a!==et&&(Ql=n,a=["commentTest"]),n=a,Zl[t]={i:Vl,result:n},t=n),t===et&&((n=Zl[t=233*Vl+172])?(Vl=n.i,t=n.result):(n=Vl,e.substr(Vl,6)===ua?(a=ua,Vl+=6):(a=et,0===Wl&&u(Du)),a!==et&&(Ql=n,a=["textTest"]),n=a,Zl[t]={i:Vl,result:n},t=n),t===et&&((n=Zl[t=233*Vl+174])?(Vl=n.i,t=n.result):(n=Vl,e.substr(Vl,16)===ca?(a=ca,Vl+=16):(a=et,0===Wl&&u(Gu)),a!==et&&(Ql=n,a=["namespaceTest"]),n=a,Zl[t]={i:Vl,result:n},t=n),t===et&&((n=Zl[t=233*Vl+170])?(Vl=n.i,t=n.result):(n=Vl,e.substr(Vl,6)===oa?(a=oa,Vl+=6):(a=et,0===Wl&&u(Su)),a!==et&&(Ql=n,a=["anyKindTest"]),n=a,Zl[t]={i:Vl,result:n},t=n))))))))}return Zl[r]={i:Vl,result:t},t}function Ae(){var t,n=233*Vl+177;if(t=Zl[n])return Vl=t.i,t.result;t=Vl;var r=Be();return r!==et&&(Ql=t,r=["QName"].concat(r)),(t=r)===et&&(t=Vl,42===e.charCodeAt(Vl)?(r=Un,Vl++):(r=et,0===Wl&&u(ns)),r!==et&&(Ql=t,r=["star"]),t=r),Zl[n]={i:Vl,result:t},t}function xe(){var t,n=233*Vl+179;if(t=Zl[n])return Vl=t.i,t.result;if(t=Vl,e.substr(Vl,7)===Vt){var r=Vt;Vl+=7}else r=et,0===Wl&&u(fo);if(r!==et)if(He(),40===e.charCodeAt(Vl)?(r=zt,Vl++):(r=et,0===Wl&&u(yo)),r!==et)if(He(),(r=be())!==et){if(He(),44===e.charCodeAt(Vl)){var a=Tt;Vl++}else a=et,0===Wl&&u(Ji);if(a!==et)if(He(),(a=Be())!==et){if(He(),41===e.charCodeAt(Vl)){var i=Wt;Vl++}else i=et,0===Wl&&u(wo);i!==et?(Ql=t,t=["elementTest",["elementName",r],["typeName"].concat(a)]):(Vl=t,t=et)}else Vl=t,t=et;else Vl=t,t=et}else Vl=t,t=et;else Vl=t,t=et;else Vl=t,t=et;return t===et&&(t=Vl,e.substr(Vl,7)===Vt?(r=Vt,Vl+=7):(r=et,0===Wl&&u(fo)),r!==et?(He(),40===e.charCodeAt(Vl)?(r=zt,Vl++):(r=et,0===Wl&&u(yo)),r!==et?(He(),(r=be())!==et?(He(),41===e.charCodeAt(Vl)?(a=Wt,Vl++):(a=et,0===Wl&&u(wo)),a!==et?(Ql=t,t=["elementTest",["elementName",r]]):(Vl=t,t=et)):(Vl=t,t=et)):(Vl=t,t=et)):(Vl=t,t=et),t===et&&(t=Vl,e.substr(Vl,7)===Vt?(r=Vt,Vl+=7):(r=et,0===Wl&&u(fo)),r!==et?(He(),40===e.charCodeAt(Vl)?(r=zt,Vl++):(r=et,0===Wl&&u(yo)),r!==et?(He(),41===e.charCodeAt(Vl)?(r=Wt,Vl++):(r=et,0===Wl&&u(wo)),r!==et?(Ql=t,t=["elementTest"]):(Vl=t,t=et)):(Vl=t,t=et)):(Vl=t,t=et))),Zl[n]={i:Vl,result:t},t}function be(){var t,n=233*Vl+180;if(t=Zl[n])return Vl=t.i,t.result;t=Vl;var r=Be();return r!==et&&(Ql=t,r=["QName"].concat(r)),(t=r)===et&&(t=Vl,42===e.charCodeAt(Vl)?(r=Un,Vl++):(r=et,0===Wl&&u(ns)),r!==et&&(Ql=t,r=["star"]),t=r),Zl[n]={i:Vl,result:t},t}function Ee(){var t,n=233*Vl+181;if(t=Zl[n])return Vl=t.i,t.result;if(t=Vl,e.substr(Vl,14)===va){var r=va;Vl+=14}else r=et,0===Wl&&u(Xu);if(r!==et)if(He(),40===e.charCodeAt(Vl)?(r=zt,Vl++):(r=et,0===Wl&&u(yo)),r!==et)if((r=Be())!==et){if(41===e.charCodeAt(Vl)){var a=Wt;Vl++}else a=et,0===Wl&&u(wo);a!==et?(Ql=t,t=["schemaElementTest"].concat(r)):(Vl=t,t=et)}else Vl=t,t=et;else Vl=t,t=et;else Vl=t,t=et;return Zl[n]={i:Vl,result:t},t}function Be(){var e,t,n=233*Vl+192;if(e=Zl[n])return Vl=e.i,e.result;e=Vl;var r=233*Vl+197;if(t=Zl[r])Vl=t.i,r=t.result;else{t=Vl;var a=Te();if(a!==et){var i=Me();i!==et?(Ql=t,t=[a,i]):(Vl=t,t=et)}else Vl=t,t=et;Zl[r]={i:Vl,result:t},r=t}return r!==et&&(Ql=e,e=r,r=[((r={}).prefix=null,r.URI=e[0],r),e[1]]),(e=r)===et&&(e=De()),Zl[n]={i:Vl,result:e},e}function Ne(){var e,t=233*Vl+193;if(e=Zl[t])return Vl=e.i,e.result;e=Vl;var n=Ue();return n!==et&&(Ql=e,n=["integerConstantExpr",["value",n]]),e=n,Zl[t]={i:Vl,result:e},e}function Ce(){var t,r,a=233*Vl+196;if(t=Zl[a])return Vl=t.i,t.result;if(Ql=t=Vl,(r=(r=n.Ra)?void 0:et)!==et)if(34===e.charCodeAt(Vl)?(r=Xr,Vl++):(r=et,0===Wl&&u(cu)),r!==et){r=[];var i=Ie();for(i===et&&((i=Re())===et&&((i=Oe())===et&&(ci.test(e.charAt(Vl))?(i=e.charAt(Vl),Vl++):(i=et,0===Wl&&u(qu)))));i!==et;)r.push(i),(i=Ie())===et&&((i=Re())===et&&((i=Oe())===et&&(ci.test(e.charAt(Vl))?(i=e.charAt(Vl),Vl++):(i=et,0===Wl&&u(qu)))));34===e.charCodeAt(Vl)?(i=Xr,Vl++):(i=et,0===Wl&&u(cu)),i!==et?(Ql=t,t=r.join("")):(Vl=t,t=et)}else Vl=t,t=et;else Vl=t,t=et;if(t===et){if(Ql=t=Vl,(r=(r=n.Ra)?void 0:et)!==et)if(39===e.charCodeAt(Vl)?(r=_r,Vl++):(r=et,0===Wl&&u(hu)),r!==et){for(r=[],(i=Ie())===et&&((i=Re())===et&&((i=Se())===et&&(hi.test(e.charAt(Vl))?(i=e.charAt(Vl),Vl++):(i=et,0===Wl&&u(Yu)))));i!==et;)r.push(i),(i=Ie())===et&&((i=Re())===et&&((i=Se())===et&&(hi.test(e.charAt(Vl))?(i=e.charAt(Vl),Vl++):(i=et,0===Wl&&u(Yu)))));39===e.charCodeAt(Vl)?(i=_r,Vl++):(i=et,0===Wl&&u(hu)),i!==et?(Ql=t,t=r.join("")):(Vl=t,t=et)}else Vl=t,t=et;else Vl=t,t=et;if(t===et){if(Ql=t=Vl,(r=(r=!n.Ra)?void 0:et)!==et)if(34===e.charCodeAt(Vl)?(r=Xr,Vl++):(r=et,0===Wl&&u(cu)),r!==et){for(r=[],(i=Oe())===et&&(pi.test(e.charAt(Vl))?(i=e.charAt(Vl),Vl++):(i=et,0===Wl&&u(Vu)));i!==et;)r.push(i),(i=Oe())===et&&(pi.test(e.charAt(Vl))?(i=e.charAt(Vl),Vl++):(i=et,0===Wl&&u(Vu)));34===e.charCodeAt(Vl)?(i=Xr,Vl++):(i=et,0===Wl&&u(cu)),i!==et?(Ql=t,t=r.join("")):(Vl=t,t=et)}else Vl=t,t=et;else Vl=t,t=et;if(t===et)if(Ql=t=Vl,(r=(r=!n.Ra)?void 0:et)!==et)if(39===e.charCodeAt(Vl)?(r=_r,Vl++):(r=et,0===Wl&&u(hu)),r!==et){for(r=[],(i=Se())===et&&(fi.test(e.charAt(Vl))?(i=e.charAt(Vl),Vl++):(i=et,0===Wl&&u(Qu)));i!==et;)r.push(i),(i=Se())===et&&(fi.test(e.charAt(Vl))?(i=e.charAt(Vl),Vl++):(i=et,0===Wl&&u(Qu)));39===e.charCodeAt(Vl)?(i=_r,Vl++):(i=et,0===Wl&&u(hu)),i!==et?(Ql=t,t=r.join("")):(Vl=t,t=et)}else Vl=t,t=et;else Vl=t,t=et}}return Zl[a]={i:Vl,result:t},t}function Te(){var t,n=233*Vl+198;if(t=Zl[n])return Vl=t.i,t.result;if(t=Vl,81===e.charCodeAt(Vl)){var r=ga;Vl++}else r=et,0===Wl&&u(Ju);if(r!==et)if(He(),123===e.charCodeAt(Vl)?(r=on,Vl++):(r=et,0===Wl&&u(To)),r!==et){if(r=[],di.test(e.charAt(Vl))){var a=e.charAt(Vl);Vl++}else a=et,0===Wl&&u(Ku);for(;a!==et;)r.push(a),di.test(e.charAt(Vl))?(a=e.charAt(Vl),Vl++):(a=et,0===Wl&&u(Ku));125===e.charCodeAt(Vl)?(a=sn,Vl++):(a=et,0===Wl&&u(Io)),a!==et?(Ql=t,t=r.join("").replace(/\s+/g," ").trim()):(Vl=t,t=et)}else Vl=t,t=et;else Vl=t,t=et;return Zl[n]={i:Vl,result:t},t}function Ie(){var t,n=233*Vl+199;if(t=Zl[n])return Vl=t.i,t.result;var r=t=Vl;if(38===e.charCodeAt(Vl)){var a=ya;Vl++}else a=et,0===Wl&&u(zu);if(a!==et){if(e.substr(Vl,2)===tr){var i=tr;Vl+=2}else i=et,0===Wl&&u(bs);if(i===et&&(e.substr(Vl,2)===rr?(i=rr,Vl+=2):(i=et,0===Wl&&u(Bs)),i===et&&(e.substr(Vl,3)===wa?(i=wa,Vl+=3):(i=et,0===Wl&&u(Wu)),i===et&&(e.substr(Vl,4)===Aa?(i=Aa,Vl+=4):(i=et,0===Wl&&u(Zu)),i===et&&(e.substr(Vl,4)===xa?(i=xa,Vl+=4):(i=et,0===Wl&&u($u)))))),i!==et){if(59===e.charCodeAt(Vl)){var o=ct;Vl++}else o=et,0===Wl&&u(Ri);o!==et?r=a=[a,i,o]:(Vl=r,r=et)}else Vl=r,r=et}else Vl=r,r=et;return t=r!==et?e.substring(t,Vl):r,Zl[n]={i:Vl,result:t},t}function Oe(){var t,n=233*Vl+200;if(t=Zl[n])return Vl=t.i,t.result;if(t=Vl,e.substr(Vl,2)===ba){var r=ba;Vl+=2}else r=et,0===Wl&&u(el);return r!==et&&(Ql=t,r='"'),t=r,Zl[n]={i:Vl,result:t},t}function Se(){var t,n=233*Vl+201;if(t=Zl[n])return Vl=t.i,t.result;if(t=Vl,e.substr(Vl,2)===Ea){var r=Ea;Vl+=2}else r=et,0===Wl&&u(tl);return r!==et&&(Ql=t,r="'"),t=r,Zl[n]={i:Vl,result:t},t}function Re(){var t,n=233*Vl+207;if(t=Zl[n])return Vl=t.i,t.result;var r=t=Vl;if(e.substr(Vl,3)===Da){var a=Da;Vl+=3}else a=et,0===Wl&&u(fl);if(a!==et){var i=[];if(yi.test(e.charAt(Vl))){var o=e.charAt(Vl);Vl++}else o=et,0===Wl&&u(dl);if(o!==et)for(;o!==et;)i.push(o),yi.test(e.charAt(Vl))?(o=e.charAt(Vl),Vl++):(o=et,0===Wl&&u(dl));else i=et;i!==et?(59===e.charCodeAt(Vl)?(o=ct,Vl++):(o=et,0===Wl&&u(Ri)),o!==et?r=a=[a,i,o]:(Vl=r,r=et)):(Vl=r,r=et)}else Vl=r,r=et;if((t=r!==et?e.substring(t,Vl):r)===et){if(r=t=Vl,e.substr(Vl,2)===Ma?(a=Ma,Vl+=2):(a=et,0===Wl&&u(ml)),a!==et){if(i=[],si.test(e.charAt(Vl))?(o=e.charAt(Vl),Vl++):(o=et,0===Wl&&u(_u)),o!==et)for(;o!==et;)i.push(o),si.test(e.charAt(Vl))?(o=e.charAt(Vl),Vl++):(o=et,0===Wl&&u(_u));else i=et;i!==et?(59===e.charCodeAt(Vl)?(o=ct,Vl++):(o=et,0===Wl&&u(Ri)),o!==et?r=a=[a,i,o]:(Vl=r,r=et)):(Vl=r,r=et)}else Vl=r,r=et;t=r!==et?e.substring(t,Vl):r}return Zl[n]={i:Vl,result:t},t}function De(){var t,n,r=233*Vl+208;if(t=Zl[r])return Vl=t.i,t.result;if(n=Zl[t=233*Vl+224])Vl=n.i,t=n.result;else{var a=Vl;if((n=Me())!==et){if(58===e.charCodeAt(Vl)){var i=na;Vl++}else i=et,0===Wl&&u(Cu);i!==et?(i=Me())!==et?(Ql=a,a=[((a={}).prefix=n,a),i]):(Vl=a,a=et):(Vl=a,a=et)}else Vl=a,a=et;Zl[t]={i:Vl,result:a},t=a}return t===et&&((n=Zl[t=233*Vl+225])?(Vl=n.i,t=n.result):(n=Vl,(a=Me())!==et&&(Ql=n,a=[a]),n=a,Zl[t]={i:Vl,result:n},t=n)),Zl[r]={i:Vl,result:t},t}function Me(){var e,t,n=233*Vl+209;if(e=Zl[n])return Vl=e.i,e.result;e=Vl;var r=Le();if(r!==et){var a=[];for(t=ke();t!==et;)a.push(t),t=ke();Ql=e,e=r+a.join("")}else Vl=e,e=et;return Zl[n]={i:Vl,result:e},e}function Ge(){var t,n=233*Vl+210;if(t=Zl[n])return Vl=t.i,t.result;if(wi.test(e.charAt(Vl))?(t=e.charAt(Vl),Vl++):(t=et,0===Wl&&u(vl)),t===et){if(t=Vl,Ai.test(e.charAt(Vl))){var r=e.charAt(Vl);Vl++}else r=et,0===Wl&&u(gl);if(r!==et){if(xi.test(e.charAt(Vl))){var a=e.charAt(Vl);Vl++}else a=et,0===Wl&&u(yl);a!==et?t=r=[r,a]:(Vl=t,t=et)}else Vl=t,t=et}return Zl[n]={i:Vl,result:t},t}function Ue(){var t,n=233*Vl+211;if(t=Zl[n])return Vl=t.i,t.result;t=Vl;var r=[];if(si.test(e.charAt(Vl))){var a=e.charAt(Vl);Vl++}else a=et,0===Wl&&u(_u);if(a!==et)for(;a!==et;)r.push(a),si.test(e.charAt(Vl))?(a=e.charAt(Vl),Vl++):(a=et,0===Wl&&u(_u));else r=et;return r!==et&&(Ql=t,r=r.join("")),t=r,Zl[n]={i:Vl,result:t},t}function Fe(){var t,n=233*Vl+212;if(t=Zl[n])return Vl=t.i,t.result;var r=t=Vl;if(Wl++,e.substr(Vl,2)===Ba){var a=Ba;Vl+=2}else a=et,0===Wl&&u(il);if(Wl--,a===et?r=void 0:(Vl=r,r=et),r!==et){if(a=Vl,Wl++,e.substr(Vl,2)===Na){var i=Na;Vl+=2}else i=et,0===Wl&&u(ol);Wl--,i===et?a=void 0:(Vl=a,a=et),a!==et?(i=Ge())!==et?t=r=[r,a,i]:(Vl=t,t=et):(Vl=t,t=et)}else Vl=t,t=et;return Zl[n]={i:Vl,result:t},t}function Pe(){var t,n=233*Vl+219;if(t=Zl[n])return Vl=t.i,t.result;t=Vl;var r=ae();if(r!==et){if(He(),e.substr(Vl,2)===en){var a=en;Vl+=2}else a=et,0===Wl&&u(bo);a!==et?(He(),(a=T())!==et?(Ql=t,t=["transformCopy",r,["copySource",a]]):(Vl=t,t=et)):(Vl=t,t=et)}else Vl=t,t=et;return Zl[n]={i:Vl,result:t},t}function He(){var e,t,n=233*Vl+220;if(e=Zl[n])return Vl=e.i,e.result;for(e=[],t=_e();t!==et;)e.push(t),t=_e();return Zl[n]={i:Vl,result:e},e}function je(){var e,t=233*Vl+221;if(e=Zl[t])return Vl=e.i,e.result;e=[];var n=_e();if(n!==et)for(;n!==et;)e.push(n),n=_e();else e=et;return Zl[t]={i:Vl,result:e},e}function Xe(){var t,n=233*Vl+222;if(t=Zl[n])return Vl=t.i,t.result;if(t=[],32===e.charCodeAt(Vl)){var r=Ka;Vl++}else r=et,0===Wl&&u(Gl);if(r===et&&(9===e.charCodeAt(Vl)?(r=za,Vl++):(r=et,0===Wl&&u(Ul)),r===et&&(13===e.charCodeAt(Vl)?(r=Wa,Vl++):(r=et,0===Wl&&u(Fl)),r===et&&(10===e.charCodeAt(Vl)?(r=Za,Vl++):(r=et,0===Wl&&u(Pl))))),r!==et)for(;r!==et;)t.push(r),32===e.charCodeAt(Vl)?(r=Ka,Vl++):(r=et,0===Wl&&u(Gl)),r===et&&(9===e.charCodeAt(Vl)?(r=za,Vl++):(r=et,0===Wl&&u(Ul)),r===et&&(13===e.charCodeAt(Vl)?(r=Wa,Vl++):(r=et,0===Wl&&u(Fl)),r===et&&(10===e.charCodeAt(Vl)?(r=Za,Vl++):(r=et,0===Wl&&u(Pl)))));else t=et;return Zl[n]={i:Vl,result:t},t}function _e(){var t,n=233*Vl+223;return(t=Zl[n])?(Vl=t.i,t.result):(32===e.charCodeAt(Vl)?(t=Ka,Vl++):(t=et,0===Wl&&u(Gl)),t===et&&(9===e.charCodeAt(Vl)?(t=za,Vl++):(t=et,0===Wl&&u(Ul)),t===et&&(13===e.charCodeAt(Vl)?(t=Wa,Vl++):(t=et,0===Wl&&u(Fl)),t===et&&(10===e.charCodeAt(Vl)?(t=Za,Vl++):(t=et,0===Wl&&u(Pl)),t===et&&(t=function t(){var n,r=233*Vl+205;if(n=Zl[r])return Vl=n.i,n.result;if(n=Vl,e.substr(Vl,2)===Ba){var a=Ba;Vl+=2}else a=et,0===Wl&&u(il);if(a!==et){var i=[],o=Fe();for(o===et&&(o=t());o!==et;)i.push(o),(o=Fe())===et&&(o=t());e.substr(Vl,2)===Na?(o=Na,Vl+=2):(o=et,0===Wl&&u(ol)),o!==et?n=a=[a,i,o]:(Vl=n,n=et)}else Vl=n,n=et;return Zl[r]={i:Vl,result:n},n}())))),Zl[n]={i:Vl,result:t},t)}function Le(){var t,n=233*Vl+226;if(t=Zl[n])return Vl=t.i,t.result;if(bi.test(e.charAt(Vl))?(t=e.charAt(Vl),Vl++):(t=et,0===Wl&&u(Hl)),t===et){if(t=Vl,Ei.test(e.charAt(Vl))){var r=e.charAt(Vl);Vl++}else r=et,0===Wl&&u(jl);if(r!==et){if(xi.test(e.charAt(Vl))){var a=e.charAt(Vl);Vl++}else a=et,0===Wl&&u(yl);a!==et?t=r=[r,a]:(Vl=t,t=et)}else Vl=t,t=et}return Zl[n]={i:Vl,result:t},t}function ke(){var t,n=233*Vl+227;return(t=Zl[n])?(Vl=t.i,t.result):((t=Le())===et&&(Bi.test(e.charAt(Vl))?(t=e.charAt(Vl),Vl++):(t=et,0===Wl&&u(Xl))),Zl[n]={i:Vl,result:t},t)}function qe(){var t,n=233*Vl+228;return(t=Zl[n])?(Vl=t.i,t.result):((t=ke())===et&&(58===e.charCodeAt(Vl)?(t=na,Vl++):(t=et,0===Wl&&u(Cu))),Zl[n]={i:Vl,result:t},t)}function Ye(){var t,n=233*Vl+231;return(t=Zl[n])?(Vl=t.i,t.result):(e.substr(Vl,5)===ra?(t=ra,Vl+=5):(t=et,0===Wl&&u(Tu)),t===et&&(e.substr(Vl,9)===Ar?(t=Ar,Vl+=9):(t=et,0===Wl&&u(ks)),t===et&&(e.substr(Vl,7)===Zr?(t=Zr,Vl+=7):(t=et,0===Wl&&u(bu)),t===et&&(e.substr(Vl,13)===$a?(t=$a,Vl+=13):(t=et,0===Wl&&u(_l)),t===et&&(e.substr(Vl,7)===Vt?(t=Vt,Vl+=7):(t=et,0===Wl&&u(fo)),t===et&&(e.substr(Vl,14)===ei?(t=ei,Vl+=14):(t=et,0===Wl&&u(Ll)),t===et&&(e.substr(Vl,8)===Qt?(t=Qt,Vl+=8):(t=et,0===Wl&&u(mo)),t===et&&(e.substr(Vl,2)===Cn?(t=Cn,Vl+=2):(t=et,0===Wl&&u(Qo)),t===et&&(e.substr(Vl,4)===rn?(t=rn,Vl+=4):(t=et,0===Wl&&u(No)),t===et&&(e.substr(Vl,3)===ta?(t=ta,Vl+=3):(t=et,0===Wl&&u(Nu)),t===et&&(e.substr(Vl,14)===ti?(t=ti,Vl+=14):(t=et,0===Wl&&u(kl)),t===et&&(e.substr(Vl,4)===_a?(t=_a,Vl+=4):(t=et,0===Wl&&u(Cl)),t===et&&(e.substr(Vl,22)===$r?(t=$r,Vl+=22):(t=et,0===Wl&&u(Eu)),t===et&&(e.substr(Vl,16)===ni?(t=ni,Vl+=16):(t=et,0===Wl&&u(ql)),t===et&&(e.substr(Vl,14)===va?(t=va,Vl+=14):(t=et,0===Wl&&u(Xu)),t===et&&(e.substr(Vl,6)===ri?(t=ri,Vl+=6):(t=et,0===Wl&&u(Yl)),t===et&&(e.substr(Vl,4)===Wr?(t=Wr,Vl+=4):(t=et,0===Wl&&u(xu)),t===et&&(e.substr(Vl,10)===En?(t=En,Vl+=10):(t=et,0===Wl&&u(qo))))))))))))))))))),Zl[n]={i:Vl,result:t},t)}function Ve(){var t,n=233*Vl+232;if(t=Zl[n])return Vl=t.i,t.result;if(t=Vl,Wl++,40===e.charCodeAt(Vl)){var r=zt;Vl++}else r=et,0===Wl&&u(yo);return r===et&&(34===e.charCodeAt(Vl)?(r=Xr,Vl++):(r=et,0===Wl&&u(cu)),r===et&&(39===e.charCodeAt(Vl)?(r=_r,Vl++):(r=et,0===Wl&&u(hu)),r===et&&(r=_e()))),Wl--,r!==et?(Vl=t,t=void 0):t=et,Zl[n]={i:Vl,result:t},t}function Qe(e,t,n){return n.reduce((function(t,n){return[e,["firstOperand",t],["secondOperand",n]]}),t)}function Je(e){1<=e&&55295>=e||57344<=e&&65533>=e||65536<=e&&1114111>=e||Ze("XQST0090","The character reference "+e+" ("+e.toString(16)+") does not reference a valid codePoint.")}function Ke(e){return n.Ra?e.replace(/(&[^;]+);/g,(function(e){if(/^&#x/.test(e))return Je(e=parseInt(e.slice(3,-1),16)),String.fromCodePoint(e);if(/^&#/.test(e))return Je(e=parseInt(e.slice(2,-1),10)),String.fromCodePoint(e);switch(e){case"&lt;":return"<";case"&gt;":return">";case"&amp;":return"&";case"&quot;":return String.fromCharCode(34);case"&apos;":return String.fromCharCode(39)}Ze("XPST0003",'Unknown character reference: "'+e+'"')})):e}function ze(e,t,n){if(!e.length)return[];for(var r=[e[0]],a=1;a<e.length;++a)"string"==typeof r[r.length-1]&&"string"==typeof e[a]?r[r.length-1]+=e[a]:r.push(e[a]);if("string"==typeof r[0]&&0===r.length)return[];if(!(r=r.reduce((function(e,t,a){if("string"!=typeof t)e.push(t);else if(n&&/^\s*$/.test(t)){var i=r[a+1];(i&&"CDataSection"===i[0]||(a=r[a-1])&&"CDataSection"===a[0])&&e.push(Ke(t))}else e.push(Ke(t));return e}),[])).length)return r;if(1<r.length||t)for(a=0;a<r.length;a++)"string"==typeof r[a]&&(r[a]=["stringConstantExpr",["value",r[a]]]);return r}function We(e){switch(e[0]){case"constantExpr":case"varRef":case"contextItemExpr":case"functionCallExpr":case"sequenceExpr":case"elementConstructor":case"computedElementConstructor":case"computedAttributeConstructor":case"computedDocumentConstructor":case"computedTextConstructor":case"computedCommentConstructor":case"computedNamespaceConstructor":case"computedPIConstructor":case"orderedExpr":case"unorderedExpr":case"namedFunctionRef":case"inlineFunctionExpr":case"dynamicFunctionInvocationExpr":case"mapConstructor":case"arrayConstructor":case"stringConstructor":case"unaryLookup":return e}return["sequenceExpr",e]}function Ze(e,t){throw Error(e+": "+t)}function $e(e){return n.qc?["x:stackTrace",s(Ql,Vl),e]:e}var et={},tt=(n=void 0!==n?n:{}).yc,nt={Module:l},rt=l,at="xquery",it="encoding",ot="version",st="module",ut="namespace",lt="=",ct=";",ht="declare",pt="boundary-space",ft="preserve",dt="strip",mt="default",vt="collation",gt="base-uri",yt="construction",wt="ordering",At="ordered",xt="unordered",bt="order",Et="empty",Bt="greatest",Nt="least",Ct="copy-namespaces",Tt=",",It="no-preserve",Ot="inherit",St="no-inherit",Rt="decimal-format",Dt="decimal-separator",Mt="grouping-separator",Gt="infinity",Ut="minus-sign",Ft="NaN",Pt="percent",Ht="per-mille",jt="zero-digit",Xt="digit",_t="pattern-separator",Lt="exponent-separator",kt="import",qt="schema",Yt="at",Vt="element",Qt="function",Jt="updating",Kt="%",zt="(",Wt=")",Zt="variable",$t="$",en=":=",tn="external",nn="context",rn="item",an="as",on="{",sn="}",un="option",ln="for",cn="in",hn="allowing",pn="let",fn="where",dn="group",mn="by",vn="stable",gn="ascending",yn="descending",wn="return",An="some",xn="every",bn="satisfies",En="typeswitch",Bn="case",Nn="|",Cn="if",Tn="then",In="else",On="or",Sn="and",Rn="||",Dn="to",Mn="-",Gn="+",Un="*",Fn="div",Pn="idiv",Hn="mod",jn="union",Xn="intersect",_n="except",Ln="instance",kn="of",qn="treat",Yn="castable",Vn="cast",Qn="=>",Jn="!=",Kn="<=",zn="<",Wn=">=",Zn=">",$n="eq",er="ne",tr="lt",nr="le",rr="gt",ar="ge",ir="is",or="<<",sr=">>",ur="validate",lr="type",cr="lax",hr="strict",pr="(#",fr="#)",dr="!",mr="/",vr="//",gr="child",yr="::",wr="descendant",Ar="attribute",xr="self",br="descendant-or-self",Er="following-sibling",Br="following",Nr="@",Cr="parent",Tr="ancestor",Ir="preceding-sibling",Or="preceding",Sr="ancestor-or-self",Rr="..",Dr="*:",Mr=":*",Gr="[",Ur="]",Fr="?",Pr=".",Hr="/>",jr="</",Xr='"',_r="'",Lr="{{",kr="}}",qr="\x3c!--",Yr="--\x3e",Vr="<?",Qr="?>",Jr="<![CDATA[",Kr="]]>",zr="document",Wr="text",Zr="comment",$r="processing-instruction",ea="#",ta="map",na=":",ra="array",aa="empty-sequence()",ia="item()",oa="node()",sa="document-node(",ua="text()",la="comment()",ca="namespace-node()",ha="processing-instruction(",pa="processing-instruction()",fa="attribute(",da="attribute()",ma="schema-attribute(",va="schema-element",ga="Q",ya="&",wa="amp",Aa="quot",xa="apos",ba='""',Ea="''",Ba="(:",Na=":)",Ca="X",Ta="x",Ia="M",Oa="m",Sa="L",Ra="l",Da="&#x",Ma="&#",Ga="first",Ua="last",Fa="into",Pa="after",Ha="before",ja="insert",Xa="nodes",_a="node",La="delete",ka="replace",qa="value",Ya="with",Va="rename",Qa="copy",Ja="modify",Ka=" ",za="\t",Wa="\r",Za="\n",$a="document-node",ei="empty-sequence",ti="namespace-node",ni="schema-attribute",ri="switch",ai=/^[*<a-zA-Z]/,ii=/^[*a-zA-Z]/,oi=/^[a-zA-Z]/,si=/^[0-9]/,ui=/^[eE]/,li=/^[+\-]/,ci=/^[^"&]/,hi=/^[^'&]/,pi=/^[^"]/,fi=/^[^']/,di=/^[^{}]/,mi=/^[{}<&]/,vi=/^["{}<&]/,gi=/^['{}<&]/,yi=/^[0-9a-fA-F]/,wi=/^[\t\n\r -\uD7FF\uE000\uFFFD]/,Ai=/^[\uD800-\uDBFF]/,xi=/^[\uDC00-\uDFFF]/,bi=/^[A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Ei=/^[\uD800-\uDB7F]/,Bi=/^[\-.0-9\xB7\u0300-\u036F\u203F\u2040]/,Ni=a("xquery",!1),Ci=a("encoding",!1),Ti=a("version",!1),Ii=a("module",!1),Oi=a("namespace",!1),Si=a("=",!1),Ri=a(";",!1),Di=a("declare",!1),Mi=a("boundary-space",!1),Gi=a("preserve",!1),Ui=a("strip",!1),Fi=a("default",!1),Pi=a("collation",!1),Hi=a("base-uri",!1),ji=a("construction",!1),Xi=a("ordering",!1),_i=a("ordered",!1),Li=a("unordered",!1),ki=a("order",!1),qi=a("empty",!1),Yi=a("greatest",!1),Vi=a("least",!1),Qi=a("copy-namespaces",!1),Ji=a(",",!1),Ki=a("no-preserve",!1),zi=a("inherit",!1),Wi=a("no-inherit",!1),Zi=a("decimal-format",!1),$i=a("decimal-separator",!1),eo=a("grouping-separator",!1),to=a("infinity",!1),no=a("minus-sign",!1),ro=a("NaN",!1),ao=a("percent",!1),io=a("per-mille",!1),oo=a("zero-digit",!1),so=a("digit",!1),uo=a("pattern-separator",!1),lo=a("exponent-separator",!1),co=a("import",!1),ho=a("schema",!1),po=a("at",!1),fo=a("element",!1),mo=a("function",!1),vo=a("updating",!1),go=a("%",!1),yo=a("(",!1),wo=a(")",!1),Ao=a("variable",!1),xo=a("$",!1),bo=a(":=",!1),Eo=a("external",!1),Bo=a("context",!1),No=a("item",!1),Co=a("as",!1),To=a("{",!1),Io=a("}",!1),Oo=a("option",!1),So=a("for",!1),Ro=a("in",!1),Do=a("allowing",!1),Mo=a("let",!1),Go=a("where",!1),Uo=a("group",!1),Fo=a("by",!1),Po=a("stable",!1),Ho=a("ascending",!1),jo=a("descending",!1),Xo=a("return",!1),_o=a("some",!1),Lo=a("every",!1),ko=a("satisfies",!1),qo=a("typeswitch",!1),Yo=a("case",!1),Vo=a("|",!1),Qo=a("if",!1),Jo=a("then",!1),Ko=a("else",!1),zo=a("or",!1),Wo=a("and",!1),Zo=a("||",!1),$o=a("to",!1),es=a("-",!1),ts=a("+",!1),ns=a("*",!1),rs=a("div",!1),as=a("idiv",!1),is=a("mod",!1),os=a("union",!1),ss=a("intersect",!1),us=a("except",!1),ls=a("instance",!1),cs=a("of",!1),hs=a("treat",!1),ps=a("castable",!1),fs=a("cast",!1),ds=a("=>",!1),ms=a("!=",!1),vs=a("<=",!1),gs=a("<",!1),ys=a(">=",!1),ws=a(">",!1),As=a("eq",!1),xs=a("ne",!1),bs=a("lt",!1),Es=a("le",!1),Bs=a("gt",!1),Ns=a("ge",!1),Cs=a("is",!1),Ts=a("<<",!1),Is=a(">>",!1),Os=a("validate",!1),Ss=a("type",!1),Rs=a("lax",!1),Ds=a("strict",!1),Ms=a("(#",!1),Gs=a("#)",!1),Us=a("!",!1),Fs=a("/",!1),Ps=i(["*","<",["a","z"],["A","Z"]],!1,!1),Hs=i(["*",["a","z"],["A","Z"]],!1,!1),js=a("//",!1),Xs=a("child",!1),_s=a("::",!1),Ls=a("descendant",!1),ks=a("attribute",!1),qs=a("self",!1),Ys=a("descendant-or-self",!1),Vs=a("following-sibling",!1),Qs=a("following",!1),Js=a("@",!1),Ks=a("parent",!1),zs=a("ancestor",!1),Ws=a("preceding-sibling",!1),Zs=a("preceding",!1),$s=a("ancestor-or-self",!1),eu=a("..",!1),tu=a("*:",!1),nu=a(":*",!1),ru=a("[",!1),au=a("]",!1),iu=a("?",!1),ou=i([["a","z"],["A","Z"]],!1,!1),su=a(".",!1),uu=a("/>",!1),lu=a("</",!1),cu=a('"',!1),hu=a("'",!1),pu=a("{{",!1),fu=a("}}",!1),du=a("\x3c!--",!1),mu=a("--\x3e",!1),vu=a("<?",!1),gu=a("?>",!1),yu=a("<![CDATA[",!1),wu=a("]]>",!1),Au=a("document",!1),xu=a("text",!1),bu=a("comment",!1),Eu=a("processing-instruction",!1),Bu=a("#",!1),Nu=a("map",!1),Cu=a(":",!1),Tu=a("array",!1),Iu=a("empty-sequence()",!1),Ou=a("item()",!1),Su=a("node()",!1),Ru=a("document-node(",!1),Du=a("text()",!1),Mu=a("comment()",!1),Gu=a("namespace-node()",!1),Uu=a("processing-instruction(",!1),Fu=a("processing-instruction()",!1),Pu=a("attribute(",!1),Hu=a("attribute()",!1),ju=a("schema-attribute(",!1),Xu=a("schema-element",!1),_u=i([["0","9"]],!1,!1),Lu=i(["e","E"],!1,!1),ku=i(["+","-"],!1,!1),qu=i(['"',"&"],!0,!1),Yu=i(["'","&"],!0,!1),Vu=i(['"'],!0,!1),Qu=i(["'"],!0,!1),Ju=a("Q",!1),Ku=i(["{","}"],!0,!1),zu=a("&",!1),Wu=a("amp",!1),Zu=a("quot",!1),$u=a("apos",!1),el=a('""',!1),tl=a("''",!1),nl=i(["{","}","<","&"],!1,!1),rl=i(['"',"{","}","<","&"],!1,!1),al=i(["'","{","}","<","&"],!1,!1),il=a("(:",!1),ol=a(":)",!1),sl=a("X",!1),ul=a("x",!1),ll=a("M",!1),cl=a("m",!1),hl=a("L",!1),pl=a("l",!1),fl=a("&#x",!1),dl=i([["0","9"],["a","f"],["A","F"]],!1,!1),ml=a("&#",!1),vl=i(["\t","\n","\r",[" ","퟿"],"","�"],!1,!1),gl=i([["\ud800","\udbff"]],!1,!1),yl=i([["\udc00","\udfff"]],!1,!1),wl=a("first",!1),Al=a("last",!1),xl=a("into",!1),bl=a("after",!1),El=a("before",!1),Bl=a("insert",!1),Nl=a("nodes",!1),Cl=a("node",!1),Tl=a("delete",!1),Il=a("replace",!1),Ol=a("value",!1),Sl=a("with",!1),Rl=a("rename",!1),Dl=a("copy",!1),Ml=a("modify",!1),Gl=a(" ",!1),Ul=a("\t",!1),Fl=a("\r",!1),Pl=a("\n",!1),Hl=i([["A","Z"],"_",["a","z"],["À","Ö"],["Ø","ö"],["ø","˿"],["Ͱ","ͽ"],["Ϳ","῿"],"‌","‍",["⁰","↏"],["Ⰰ","⿯"],["、","퟿"],["豈","﷏"],["ﷰ","�"]],!1,!1),jl=i([["\ud800","\udb7f"]],!1,!1),Xl=i(["-",".",["0","9"],"·",["̀","ͯ"],"‿","⁀"],!1,!1),_l=a("document-node",!1),Ll=a("empty-sequence",!1),kl=a("namespace-node",!1),ql=a("schema-attribute",!1),Yl=a("switch",!1),Vl=0,Ql=0,Jl=[{line:1,da:1}],Kl=0,zl=[],Wl=0,Zl={};if("startRule"in n){if(!(n.Kb in nt))throw Error("Can't start parsing from rule \""+n.Kb+'".');rt=nt[n.Kb]}var $l=rt();if($l!==et&&Vl===e.length)return $l;throw $l!==et&&Vl<e.length&&u({type:"end"}),function(e,n,r){return new t(t.ic(e,n),e,n,r)}(zl,Kl<e.length?e.charAt(Kl):null,Kl<e.length?s(Kl,Kl+1):s(Kl,Kl))}}}(this)}).call(e)}(Io);var Oo=Io.tc,So=Oo.parse,Ro=Oo.SyntaxError,Do=Object.create(null);function Mo(e,t){var n=t.ca?"XQuery":"XPath",r=t.debug?null:Do[n+"~"+e]||null;try{if(r)var a=r;else a=So(e,{Ra:!!t.ca,qc:!!t.debug}),t.debug||(Do[n+"~"+e]=a);return a}catch(t){if(t instanceof Ro)throw Error('XPST0003: Unable to parse: "'+e+'".\n'+t.message+"\n"+e.slice(0,t.location.start.offset)+"[Error is around here]"+e.slice(t.location.start.offset));throw t}}function Go(e,t){return"Q{"+(e||"")+"}"+t}function Uo(e,t){for(var n=e.length-1;0<=n;--n)if(t in e[n])return e[n][t]}function Fo(e){this.B=e,this.C=this.h=0,this.o=[Object.create(null)],this.v=Object.create(null),this.J=null,this.Da=e.Da,this.Ca=e.Ca}function Po(e){for(var t=new Fo(e.B),n=0;n<e.h+1;++n)t.o=[Object.assign(Object.create(null),t.o[0],e.o[n])],t.Ca=[Object.assign(Object.create(null),t.Ca[0],e.Ca[n])],t.v=Object.assign(Object.create(null),e.v),t.Da=e.Da,t.J=e.J;return t}function Ho(e){e.C++,e.h++,e.o[e.h]=Object.create(null),e.Ca[e.h]=Object.create(null)}function jo(e,t,n,r,a){if(r=Go(t,n)+"~"+r,e.v[r])throw Error('XQST0049: The function or variable "Q{'+t+"}"+n+'" is declared more than once.');e.v[r]=a}function Xo(e,t,n){return t=Go(t||"",n),e.Ca[e.h][t]=t+"["+e.C+"]"}function _o(e,t,n,r){e.Da[Go(t||"",n)+"["+e.C+"]"]=r}function Lo(e){e.o.length=e.h,e.Ca.length=e.h,e.h--}Fo.prototype.Aa=function(e,t,n,r){r=void 0!==r&&r;var a=this.v[Go(e,t)+"~"+n];return!a||r&&a.Cb?null===this.B?null:this.B.Aa(e,t,n,r):a},Fo.prototype.rb=function(e,t){var n=Uo(this.Ca,Go(e,t));return n||this.B.rb(e,t)},Fo.prototype.Qa=function(e,t){var n=e.prefix,r=e.localName;return!n&&this.J?{localName:r,namespaceURI:this.J}:n&&(n=this.ga(n,!1))?{localName:r,namespaceURI:n}:this.B.Qa(e,t)},Fo.prototype.ga=function(e,t){var n=Uo(this.o,e);return void 0===n?null===this.B?void 0:this.B.ga(e,void 0===t||t):n};var ko=Object.create(null);function qo(e,t){var n=ko[e];n||(n=ko[e]={La:[],Va:[]}),n.La=n.La.concat(t.La),n.Va=n.Va.concat(t.Va)}function Yo(e,t){var n=ko[t];if(!n)throw Error("XQST0051: No modules found with the namespace uri "+t);n.La.forEach((function(n){return jo(e,t,n.localName,n.arity,n.Gb)})),n.Va.forEach((function(n){Xo(e,t,n.localName),_o(e,t,n.localName,(function(e,t){return er(n.ia,e,t)}))}))}var Vo="http://www.w3.org/XML/1998/namespace http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2005/xpath-functions http://www.w3.org/2005/xpath-functions/math http://www.w3.org/2012/xquery http://www.w3.org/2005/xpath-functions/array http://www.w3.org/2005/xpath-functions/map".split(" ");function Qo(e,t){var n=[],r=[];qr(e,"*").forEach((function(e){switch(e[0]){case"moduleImport":case"namespaceDecl":case"defaultNamespaceDecl":case"functionDecl":case"varDecl":break;default:throw Error("Not implemented: only module imports, namespace declarations, and function declarations are implemented in XQuery modules")}}));var a=new Set;qr(e,"moduleImport").forEach((function(e){var n=_r(Xr(e,"namespacePrefix"));if(e=_r(Xr(e,"targetNamespace")),a.has(e))throw Error('XQST0047: The namespace "'+e+'" is imported more than once.');a.add(e),t.o[t.h][n]=e,Yo(t,e)})),qr(e,"namespaceDecl").forEach((function(e){var n=_r(Xr(e,"prefix"));if(e=_r(Xr(e,"uri")),"xml"===n||"xmlns"===n)throw pi();if("http://www.w3.org/XML/1998/namespace"===e||"http://www.w3.org/2000/xmlns/"===e)throw pi();t.o[t.h][n]=e}));var i=qr(e,"defaultNamespaceDecl").filter((function(e){if("function"===(e=_r(Xr(e,"defaultNamespaceCategory"))))return e;if("element"===e)throw Error("Not Implemented: default namespace element.")}));if(1===i.length){if(!(i=_r(Xr(Xr(e,"defaultNamespaceDecl"),"uri"))))throw hi();if("http://www.w3.org/XML/1998/namespace"===i||"http://www.w3.org/2000/xmlns/"===i)throw pi();t.J=i}else if(1<i.length)throw Error("XQST0066: A Prolog may contain at most one default function namespace declaration.");qr(e,"functionDecl").forEach((function(e){var a=Xr(e,"functionName"),i=Lr(a,"prefix"),o=Lr(a,"URI"),s=_r(a);if(null===o&&(!(o=null===i?t.J||"http://www.w3.org/2005/xpath-functions":t.ga(i))&&i))throw di(i);if(Vo.includes(o))throw ci();if(a=(i=qr(e,"annotation").map((function(e){return Xr(e,"annotationName")}))).every((function(e){return!Lr(e,"URI")&&"private"!==_r(e)})),i=i.some((function(e){return!Lr(e,"URI")&&"updating"===_r(e)})),!o)throw hi();var u,l=Vr(e),h=qr(Xr(e,"paramList"),"param"),p=h.map((function(e){return Xr(e,"varName")})),f=h.map((function(e){return Vr(e)}));if(e=Xr(e,"functionBody")){if(t.Aa(o,s,f.length))throw Error("XQST0049: The function Q{"+o+"}"+s+"#"+f.length+" has already been declared.");var d=To(e[1],{qa:!1,ca:!0}),m=new Fo(t),v=p.map((function(e){var n=Lr(e,"URI"),r=Lr(e,"prefix");return e=_r(e),r&&null===n&&(n=t.ga(r||"")),Xo(m,n,e)}));u=i?{l:f,arity:p.length,m:function(e,t,n,r){for(var a=[],i=3;i<arguments.length;++i)a[i-3]=arguments[i];return i=bt(xt(e,-1,null,se.empty()),v.reduce((function(e,t,n){return e[t]=ue(a[n]),e}),Object.create(null))),d.o(i,t)},Cb:!1,I:!0,localName:s,namespaceURI:o,j:l}:{l:f,arity:p.length,m:function(e,t,n,r){for(var a=[],i=3;i<arguments.length;++i)a[i-3]=arguments[i];return i=bt(xt(e,-1,null,se.empty()),v.reduce((function(e,t,n){return e[t]=ue(a[n]),e}),Object.create(null))),er(d,i,t)},Cb:!1,I:!1,localName:s,namespaceURI:o,j:l},n.push({ia:d,Lb:m}),a&&r.push({arity:p.length,ia:d,Gb:u,localName:s,namespaceURI:o})}else{if(i)throw Error("Updating external function declarations are not supported");u={l:f,arity:p.length,m:function(e,t,n,r){for(var a=[],i=3;i<arguments.length;++i)a[i-3]=arguments[i];if(!(i=n.Aa(o,s,p.length,!0)))throw Error("XPST0017: Function Q{"+o+"}"+s+" with arity of "+p.length+" not registered. "+xa(s));if(i.j.type!==l.type||i.l.some((function(e,t){return e.type!==f[t].type})))throw Error("External function declaration types do not match actual function");return i.m.apply(i,[e,t,n].concat(c(a)))},Cb:!0,I:!1,localName:s,namespaceURI:o,j:l}}jo(t,o,s,p.length,u)}));var o=[];return qr(e,"varDecl").forEach((function(e){var r=Yr(Xr(e,"varName")),a=r.namespaceURI;if(null===a&&(!(a=t.ga(r.prefix))&&r.prefix))throw di(r.prefix);if(Vo.includes(a))throw ci();var i,s,u=Xr(e,"external");if(e=Xr(e,"varValue"),null!==u?null!==(u=Xr(u,"varValue"))&&(i=Xr(u,"*")):null!==e&&(i=Xr(e,"*")),i&&(s=To(i,{qa:!1,ca:!0})),o.some((function(e){return e.namespaceURI===a&&e.localName===r.localName})))throw Error("XQST0049: The variable "+(a?"Q{"+a+"}":"")+r.localName+" has already been declared.");if(Xo(t,a||"",r.localName),i&&!function(e,t,n){return(e=e.Da[Go(t,n)])?e:null}(t,a||"",r.localName)){var l=null;_o(t,a,r.localName,(function(e,t){return l?l():(l=ue(er(s,e,t)))()})),n.push({ia:s,Lb:t}),o.push({ia:s,localName:r.localName,namespaceURI:a})}})),n.forEach((function(e){e.ia.P(e.Lb)})),r.forEach((function(e){if(!e.Gb.I&&e.ia.I)throw Ln("The function Q{"+e.namespaceURI+"}"+e.localName+" is updating but the %updating annotation is missing.")})),{La:r,Va:o}}function Jo(e,t,n){var r=kr(e,["forClauseItem","typedVariableBinding","varName"])[1];(e=kr(e,["forClauseItem","forExpr","sequenceExpr"]))&&((e=qr(e,"*").map((function(e){return n(e,t)}))).includes(void 0)||e.includes(null)||1===(e=Ko(e)).length&&ss(t,r,e[0]))}function Ko(e){return e.filter((function(e,t,n){return n.findIndex((function(t){return t.type===e.type&&t.g===e.g}))===t}))}function zo(e,t,n){var r=qr(e,"*"),a=Xr(e,"atomicType");if(!a)return{type:59,g:2};if(de(Lr(a,"prefix")+":"+a[2])===t.type)if(1===r.length){if(3===t.g)return n}else if(e=Xr(e,"occurrenceIndicator")[1],t.g===function(e){switch(e){case"*":return 2;case"?":return 0;case"+":return 1;default:return 3}}(e))return n}function Wo(e,t){Zo(e,t)}function Zo(e,t){var n=is.get(e[0]);if(n)return n(e,t);for(n=1;n<e.length;n++)e[n]&&Zo(e[n],t)}function $o(e,t){var n=Zo(Xr(e,"firstOperand")[1],t),r=Zo(Xr(e,"secondOperand")[1],t),a=e[0];if(n&&r){if(!(t=function(e,t,n){var r=[2,53,59,46,47];if(r.includes(t)||r.includes(n))return 2;var a=null,i=null;Z(t,19)&&(a=function(e){return Jt(e,3)},t=3),Z(n,19)&&(i=function(e){return Jt(e,3)},n=3);var o=Sa.filter((function(e){return Z(t,e)}));if(r=Sa.filter((function(e){return Z(n,e)})),o.includes(2)&&r.includes(2))return void 0===(r=Ca[Ba(2,2,e)])&&(r=Oa(t,n)),"divOp"===e&&5===r&&(r=4),"idivOp"===e?Da((function(e,t){return{W:a?a(e):e,X:i?i(t):t}}),(function(e,t){return Math.trunc(e/t)}))[1]:r;for(var s=(o=u(o)).next();!s.done;s=o.next()){s=s.value;for(var l=u(r),c=l.next();!c.done;c=l.next())if(void 0!==(c=Ca[Ba(s,c.value,e)]))return c}}(a,n.type,r.type)))throw Error("XPTY0004: "+a+" not available for types "+fe(n)+" and "+fe(r));n={type:t,g:n.g},2!==t&&59!==t&&Qr(e,n),e=n}else e={type:2,g:3};return e}function es(e,t){Zo(Xr(e,"firstOperand")[1],t),Zo(Xr(e,"secondOperand")[1],t);e:{switch(e[0]){case"orOp":case"andOp":Qr(e,t={type:0,g:3}),e=t;break e}e=void 0}return e}function ts(e,t){Zo(Xr(e,"firstOperand")[1],t),Zo(Xr(e,"secondOperand")[1],t);e:{switch(e[0]){case"unionOp":case"intersectOp":case"exceptOp":Qr(e,t={type:53,g:2}),e=t;break e}e=void 0}return e}function ns(e,t){return Zo(Xr(e,"firstOperand")[1],t),Zo(Xr(e,"secondOperand")[1],t),Qr(e,t={type:0,g:3}),t}function rs(e,t){return Zo(Xr(e,"firstOperand")[1],t),Zo(Xr(e,"secondOperand")[1],t),Qr(e,t={type:0,g:3}),t}function as(e,t){return Zo(Xr(e,"firstOperand")[1],t),Zo(Xr(e,"secondOperand")[1],t),Qr(e,t={type:0,g:3}),t}var is=new Map([["unaryMinusOp",function(e,t){return(t=Zo(Xr(e,"operand")[1],t))?Z(t.type,2)?(Qr(e,t={type:t.type,g:t.g}),e=t):(Qr(e,t={type:3,g:3}),e=t):(Qr(e,t={type:2,g:2}),e=t),e}],["unaryPlusOp",function(e,t){return(t=Zo(Xr(e,"operand")[1],t))?Z(t.type,2)?(Qr(e,t={type:t.type,g:t.g}),e=t):(Qr(e,t={type:3,g:3}),e=t):(Qr(e,t={type:2,g:2}),e=t),e}],["addOp",$o],["subtractOp",$o],["divOp",$o],["idivOp",$o],["modOp",$o],["multiplyOp",$o],["andOp",es],["orOp",es],["sequenceExpr",function(e,t){var n=qr(e,"*"),r=n.map((function(e){return Zo(e,t)}));return function(e,t,n){if(0===t)var r={type:53,g:2};else n.includes(void 0)||n.includes(null)?r={type:59,g:2}:r=1<(t=Ko(n)).length?{type:59,g:2}:{type:t[0].type,g:2};return r&&59!==r.type&&Qr(e,r),r}(e,n.length,r)}],["unionOp",ts],["intersectOp",ts],["exceptOp",ts],["stringConcatenateOp",function(e,t){return Zo(Xr(e,"firstOperand")[1],t),Zo(Xr(e,"secondOperand")[1],t),Qr(e,t={type:1,g:3}),t}],["rangeSequenceExpr",function(e,t){return Zo(Xr(e,"startExpr")[1],t),Zo(Xr(e,"endExpr")[1],t),Qr(e,t={type:5,g:1}),t}],["equalOp",ns],["notEqualOp",ns],["lessThanOrEqualOp",ns],["lessThanOp",ns],["greaterThanOrEqualOp",ns],["greaterThanOp",ns],["eqOp",rs],["neOp",rs],["ltOp",rs],["leOp",rs],["gtOp",rs],["geOp",rs],["isOp",as],["nodeBeforeOp",as],["nodeAfterOp",as],["pathExpr",function(e,t){var n=Xr(e,"rootExpr");return n&&n[1]&&Zo(n[1],t),qr(e,"stepExpr").map((function(e){return Zo(e,t)})),function(e){var t=qr(e,"stepExpr");if(!t)return{type:59,g:2};for(var n=(t=u(t)).next();!n.done;n=t.next()){var r=n.value;if(n=void 0,r){for(var a=qr(r,"*"),i=(a=u(a)).next();!i.done;i=a.next())switch(i=i.value,i[0]){case"filterExpr":n=Lr(kr(i,["*"]),"type");break;case"xpathAxis":e:{switch(i[1]){case"attribute":n={type:47,g:2};break e;case"child":case"decendant":case"self":case"descendant-or-self":case"following-sibling":case"following":case"namespace":case"parent":case"ancestor":case"preceding-sibling":case"preceding":case"ancestor-or-self":n={type:53,g:2};break e}n=void 0}}n&&59!==n.type&&Qr(r,n)}r=Lr(r,"type")}return r&&59!==r.type&&Qr(e,r),r}(e)}],["contextItemExpr",function(){return{type:59,g:2}}],["ifThenElseExpr",function(e,t){Zo(Xr(Xr(e,"ifClause"),"*"),t);var n=Zo(Xr(Xr(e,"thenClause"),"*"),t);return t=Zo(Xr(Xr(e,"elseClause"),"*"),t),n&&t&&n.type===t.type&&n.g===t.g?(59!==n.type&&Qr(e,n),e=n):e={type:59,g:2},e}],["instanceOfExpr",function(e,t){return Zo(Xr(e,"argExpr"),t),Zo(Xr(e,"sequenceType"),t),Qr(e,t={type:0,g:3}),t}],["integerConstantExpr",function(e){var t={type:5,g:3};return Qr(e,t),t}],["doubleConstantExpr",function(e){var t={type:3,g:3};return Qr(e,t),t}],["decimalConstantExpr",function(e){var t={type:4,g:3};return Qr(e,t),t}],["stringConstantExpr",function(e){var t={type:1,g:3};return Qr(e,t),t}],["functionCallExpr",function(e,t){return qr(Xr(e,"arguments"),"*").map((function(e){return Zo(e,t)})),function(e,t){if(!t||!t.ma)return{type:59,g:2};var n=Yr(Xr(e,"functionName")),r=n.localName,a=n.prefix;return n=qr(Xr(e,"arguments"),"*"),(r=t.ma.Qa({localName:r,prefix:a},n.length))&&(t=t.ma.Aa(r.namespaceURI,r.localName,n.length))?(59!==t.j.type&&Qr(e,t.j),t.j):{type:59,g:2}}(e,t)}],["arrowExpr",function(e,t){return Zo(Xr(e,"argExpr")[1],t),function(e,t){if(!t||!t.ma)return{type:59,g:2};var n=Xr(e,"EQName");if(!n)return{type:59,g:2};var r=Yr(n);n=r.localName;var a=r.prefix;return r=qr(Xr(e,"arguments"),"*"),(n=t.ma.Qa({localName:n,prefix:a},r.length))&&(t=t.ma.Aa(n.namespaceURI,n.localName,r.length+1))?(59!==t.j.type&&Qr(e,t.j),t.j):{type:59,g:2}}(e,t)}],["dynamicFunctionInvocationExpr",function(e,t){return Zo(kr(e,["functionItem","*"]),t),(e=Xr(e,"arguments"))&&Zo(e,t),{type:59,g:2}}],["namedFunctionRef",function(e,t){return function(e,t){if(!t||!t.ma)return{type:59,g:2};var n=Yr(Xr(e,"functionName")),r=n.localName,a=n.namespaceURI,i=n.prefix;if(n=Number(kr(e,["integerConstantExpr","value"])[1]),!a){if(!(a=t.ma.Qa({localName:r,prefix:i},n)))return{type:59,g:2};r=a.localName,a=a.namespaceURI}return(t=t.ma.Aa(a,r,n)||null)?(59!==t.j.type&&Qr(e,t.j),t.j):{type:59,g:2}}(e,t)}],["inlineFunctionExpr",function(e,t){return Zo(Xr(e,"functionBody")[1],t),Qr(e,t={type:60,g:3}),t}],["castExpr",function(e){var t=kr(e,["singleType","atomicType"]);return 59!==(t={type:de(t=Lr(t,"prefix")+":"+t[2]),g:3}).type&&Qr(e,t),t}],["castableExpr",function(e){var t={type:0,g:3};return Qr(e,t),t}],["simpleMapExpr",function(e,t){for(var n,r=qr(e,"pathExpr"),a=0;a<r.length;a++)n=Zo(r[a],t);return null!=n?(59!==(t={type:n.type,g:2}).type&&Qr(e,t),e=t):e={type:59,g:2},e}],["mapConstructor",function(e,t){return qr(e,"mapConstructorEntry").map((function(e){return{key:Zo(kr(e,["mapKeyExpr","*"]),t),value:Zo(kr(e,["mapValueExpr","*"]),t)}})),function(e){var t={type:61,g:3};return Qr(e,t),t}(e)}],["arrayConstructor",function(e,t){return qr(Xr(e,"*"),"arrayElem").map((function(e){return Zo(e,t)})),function(e){var t={type:62,g:3};return Qr(e,t),t}(e)}],["unaryLookup",function(e){return Xr(e,"NCName"),{type:59,g:2}}],["typeswitchExpr",function(e,t){return function(e,t,n,r){if(!t||n.includes(void 0))return{type:59,g:2};for(var a=qr(e,"typeswitchExprCaseClause"),i=0;i<n.length;i++){var o=Xr(a[i],"*");switch(o[0]){case"sequenceType":if(o=zo(o,t,n[i]))return 59!==o.type&&Qr(e,o),o;continue;case"sequenceTypeUnion":for(r=qr(o,"*"),a=0;2>a;a++)if(o=zo(r[a],t,n[i]))return 59!==o.type&&Qr(e,o),o;default:return{type:59,g:2}}}return 59!==r.type&&Qr(e,r),r}(e,Zo(Xr(e,"argExpr")[1],t),qr(e,"typeswitchExprCaseClause").map((function(e){return Zo(kr(e,["resultExpr"])[1],t)})),Zo(kr(e,["typeswitchExprDefaultClause","resultExpr"])[1],t))}],["quantifiedExpr",function(e,t){return qr(e,"*").map((function(e){return Zo(e,t)})),function(e){var t={type:0,g:3};return Qr(e,t),t}(e)}],["x:stackTrace",function(e,t){return Zo((e=qr(e,"*"))[0],t)}],["queryBody",function(e,t){return Zo(e[1],t)}],["flworExpr",function(e,t){return function(e,t){for(var n=Zo,r=!1,a=1;a<e.length;a++)switch(e[a][0]){case"letClause":us(t);var i=e[a],o=t,s=n;ss(o,kr(i,["letClauseItem","typedVariableBinding","varName"])[1],s=s((i=kr(i,["letClauseItem","letExpr"]))[1],o));break;case"forClause":r=!0,us(t),Jo(e[a],t,n);break;case"whereClause":us(t),n(o=e[a],t),Qr(o,{type:0,g:3});break;case"orderByClause":us(t);break;case"returnClause":return o=n,Qr(n=kr(a=e[a],["*"]),t=o(n,t)),Qr(a,t),(n=t)?(r&&(n={type:n.type,g:2}),59!==n.type&&Qr(e,n),n):{type:59,g:2};default:return(n=n(e[a],t))?(r&&(n={type:n.type,g:2}),59!==n.type&&Qr(e,n),n):{type:59,g:2}}if(!(0<t.h))throw Error("Variable scope out of bound");t.h--,t.o.pop()}(e,t)}],["varRef",function(e,t){e:{for(var n=e[1][1],r=t.h;0<=r;){t=t.o[r][n];break e}throw Error("XPST0008, The variable "+n+" is not in scope.")}return t&&59!==t.type&&Qr(e,t),t}]]);function os(e){this.h=0,this.ma=e,this.o=[{}]}function ss(e,t,n){if(e.o[e.h][t])throw Error("Another variable of in the scope "+e.h+" with the same name "+t+" already exists");e.o[e.h][t]=n}function us(e){e.h++,e.o.push({})}var ls={},cs=(ls.xml="http://www.w3.org/XML/1998/namespace",ls.xs="http://www.w3.org/2001/XMLSchema",ls.fn="http://www.w3.org/2005/xpath-functions",ls.map="http://www.w3.org/2005/xpath-functions/map",ls.array="http://www.w3.org/2005/xpath-functions/array",ls.math="http://www.w3.org/2005/xpath-functions/math",ls.fontoxpath="http://fontoxml.com/fontoxpath",ls.local="http://www.w3.org/2005/xquery-local-functions",ls);function hs(e,t,n){this.Ca=[Object.create(null)],this.Da=Object.create(null),this.v=e,this.C=Object.keys(t).reduce((function(e,n){return void 0===t[n]||(e[n]="Q{}"+n+"[0]"),e}),Object.create(null)),this.o=Object.create(null),this.h=Object.create(null),this.J=n,this.B=[]}function ps(e,t,n){if(1!==t.node.nodeType&&9!==t.node.nodeType)return[];var r=Se(e,t).reduce((function(t,r){for(var a=(r=u(ps(e,r,n))).next();!a.done;a=r.next())t.push(a.value);return t}),[]);return n(t)&&r.unshift(t),r}function fs(e,t,n,r,a){if(!(e=a.first()))throw Error("XPDY0002: The context is absent, it needs to be present to use id function.");if(!Z(e.type,53))throw Ct("The context item is not a node, it needs to be node to use id function.");var i=t.h,o=r.S().reduce((function(e,t){return t.value.split(/\s+/).forEach((function(t){e[t]=!0})),e}),Object.create(null));for(t=e.value;9!==t.node.nodeType;)if(null===(t=Ue(i,t)))throw Error("FODC0001: the root node of the target node is not a document node.");return t=ps(i,t,(function(e){return 1===e.node.nodeType&&(!(!(e=Oe(i,e,"id"))||!o[e])&&(o[e]=!1,!0))})),se.create(t.map((function(e){return Xe(e)})))}function ds(e,t,n,r,a){if(!(e=a.first()))throw Error("XPDY0002: The context is absent, it needs to be present to use idref function.");if(!Z(e.type,53))throw Ct("The context item is not a node, it needs to be node to use idref function.");var i=t.h,o=r.S().reduce((function(e,t){return e[t.value]=!0,e}),Object.create(null));for(t=e.value;9!==t.node.nodeType;)if(null===(t=Ue(i,t)))throw Error("FODC0001: the root node of the context node is not a document node.");return t=ps(i,t,(function(e){return 1===e.node.nodeType&&(!!(e=Oe(i,e,"idref"))&&e.split(/\s+/).some((function(e){return o[e]})))})),se.create(t.map((function(e){return Xe(e)})))}function ms(e,t,n,r,a){var i=(e=ke(0,0,0,a,se.s(Y("duplicates",1)))).F()?"use-first":e.first().value;return r.M((function(e){return se.s(new qe(e.reduce((function(e,t){return t.h.forEach((function(t){var n=e.findIndex((function(e){return Le(e.key,t.key)}));if(0<=n)switch(i){case"reject":throw Error("FOJS0003: Duplicate encountered when merging maps.");case"use-last":return void e.splice(n,1,t);case"combine":return void e.splice(n,1,{key:t.key,value:ue(se.create(e[n].value().S().concat(t.value().S())))});default:return}e.push(t)})),e}),[])))}))}function vs(e,t,n){var r=1,a=e.value;e=e.ya(!0);var i=null,o=Math.max(t-1,0);return-1!==e&&(i=Math.max(0,(null===n?e:Math.max(0,Math.min(e,n+(t-1))))-o)),se.create({next:function(e){for(;r<t;)a.next(e),r++;return null!==n&&r>=t+n?z:(e=a.next(e),r++,e)}},i)}function gs(e){return e.map((function(e){return Z(e.type,19)?Jt(e,3):e}))}function ys(e){if((e=gs(e)).some((function(e){return Number.isNaN(e.value)})))return[Y(NaN,3)];if(!(e=si(e)))throw Error("FORG0006: Incompatible types to be converted to a common type");return e}function ws(e,t,n,r,a,i){return _e([a,i],(function(e){var t=u(e);if(e=t.next().value,t=t.next().value,1/0===e.value)return se.empty();if(-1/0===e.value)return t&&1/0===t.value?se.empty():r;if(t){if(isNaN(t.value))return se.empty();1/0===t.value&&(t=null)}return isNaN(e.value)?se.empty():vs(r,Math.round(e.value),t?Math.round(t.value):null)}))}function As(e,t,n,r,a){if(r.F())return a;if(!(e=si(e=gs(r.S()))))throw Error("FORG0006: Incompatible types to be converted to a common type");if(!e.every((function(e){return Z(e.type,2)})))throw Error("FORG0006: items passed to fn:sum are not all numeric.");return t=e.reduce((function(e,t){return e+t.value}),0),e.every((function(e){return Z(e.type,5)}))?se.s(Y(t,5)):e.every((function(e){return Z(e.type,3)}))?se.s(Y(t,3)):e.every((function(e){return Z(e.type,4)}))?se.s(Y(t,4)):se.s(Y(t,6))}hs.prototype.Aa=function(e,t,n){return function(e,t,n){var r=wa[e+":"+t];return r&&(r=r.find((function(e){return e.l.some((function(e){return 4===e}))?e.l.length-1<=n:e.l.length===n})))?{l:r.l,arity:n,m:r.m,I:r.I,localName:t,namespaceURI:e,j:r.j}:null}(e,t,n)},hs.prototype.rb=function(e,t){return e?null:(e=this.C[t],this.o[t]||(this.o[t]={name:t}),e)},hs.prototype.Qa=function(e,t){var n=this.J(e,t);if(n)this.B.push({oc:e,arity:t,Jb:n});else if(t=this.ga(e.prefix,!0))return{namespaceURI:t,localName:e.localName};return n},hs.prototype.ga=function(e,t){return void 0===t||t?cs[e]?cs[e]:(t=this.v(e),this.h[e]||(this.h[e]={namespaceURI:t,prefix:e}),void 0!==t||e?t:null):null};var xs=[].concat(Nr,[{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"boolean",l:[{type:59,g:2}],j:{type:0,g:3},m:function(e,t,n,r){return r.getEffectiveBooleanValue()?se.$():se.U()}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"true",l:[],j:{type:0,g:3},m:function(){return se.$()}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"not",l:[{type:59,g:2}],j:{type:0,g:3},m:function(e,t,n,r){return!1===r.getEffectiveBooleanValue()?se.$():se.U()}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"false",l:[],j:{type:0,g:3},m:function(){return se.U()}}],[{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"last",l:[],j:{type:5,g:3},m:function(e){if(null===e.O)throw Error("XPDY0002: The fn:last() function depends on dynamic context, which is absent.");var t=!1;return se.create({next:function(){if(t)return z;var n=e.wa.ya();return t=!0,W(Y(n,5))}},1)}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"position",l:[],j:{type:5,g:3},m:function(e){if(null===e.O)throw Error("XPDY0002: The fn:position() function depends on dynamic context, which is absent.");return se.s(Y(e.Ga+1,5))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"current-dateTime",l:[],j:{type:10,g:3},m:function(e){return se.s(Y(wt(e),10))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"current-date",l:[],j:{type:7,g:3},m:function(e){return se.s(Y(it(wt(e),7),7))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"current-time",l:[],j:{type:8,g:3},m:function(e){return se.s(Y(it(wt(e),8),8))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"implicit-timezone",l:[],j:{type:17,g:3},m:function(e){return se.s(Y(At(e),17))}}],Tr,Ur,Pr,[{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"years-from-duration",l:[{type:18,g:0}],j:{type:5,g:0},m:function(e,t,n,r){return r.F()?r:se.s(Y(r.first().value.cb(),5))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"months-from-duration",l:[{type:18,g:0}],j:{type:5,g:0},m:function(e,t,n,r){return r.F()?r:se.s(Y(r.first().value.$a(),5))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"days-from-duration",l:[{type:18,g:0}],j:{type:5,g:0},m:function(e,t,n,r){return r.F()?r:se.s(Y(r.first().value.Za(),5))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"hours-from-duration",l:[{type:18,g:0}],j:{type:5,g:0},m:function(e,t,n,r){return r.F()?r:se.s(Y(r.first().value.getHours(),5))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"minutes-from-duration",l:[{type:18,g:0}],j:{type:5,g:0},m:function(e,t,n,r){return r.F()?r:se.s(Y(r.first().value.getMinutes(),5))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"seconds-from-duration",l:[{type:18,g:0}],j:{type:4,g:0},m:function(e,t,n,r){return r.F()?r:se.s(Y(r.first().value.getSeconds(),4))}}],[{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"id",l:[{type:1,g:2},{type:53,g:3}],j:{type:54,g:2},m:fs},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"id",l:[{type:1,g:2}],j:{type:54,g:2},m:function(e,t,n,r){return fs(e,t,0,r,se.s(e.O))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"idref",l:[{type:1,g:2},{type:53,g:3}],j:{type:53,g:2},m:ds},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"idref",l:[{type:1,g:2}],j:{type:53,g:2},m:function(e,t,n,r){return ds(e,t,0,r,se.s(e.O))}}],[{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"parse-json",l:[{type:1,g:3}],j:{type:59,g:0},m:function(e,t,n,r){try{var a=JSON.parse(r.first().value)}catch(e){throw Error("FOJS0001: parsed JSON string contains illegal JSON.")}return function e(t){switch(typeof t){case"object":return Array.isArray(t)?se.s(new He(t.map((function(t){return ue(e(t))})))):null===t?se.empty():se.s(new qe(Object.keys(t).map((function(n){return{key:Y(n,1),value:ue(e(t[n]))}}))));case"number":return se.s(Y(t,3));case"string":return se.s(Y(t,1));case"boolean":return t?se.$():se.U();default:throw Error("Unexpected type in JSON parse")}}(a)}}],[{namespaceURI:"http://www.w3.org/2005/xpath-functions/map",localName:"contains",l:[{type:61,g:3},{type:46,g:3}],j:{type:0,g:3},m:function(e,t,n,r,a){return _e([r,a],(function(e){var t=(e=u(e)).next().value,n=e.next().value;return t.h.some((function(e){return Le(e.key,n)}))?se.$():se.U()}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/map",localName:"entry",l:[{type:46,g:3},{type:59,g:2}],j:{type:61,g:3},m:function(e,t,n,r,a){return r.map((function(e){return new qe([{key:e,value:ue(a)}])}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/map",localName:"for-each",l:[{type:61,g:3},{type:59,g:2}],j:{type:59,g:2},m:function(e,t,n,r,a){return _e([r,a],(function(r){var a=(r=u(r)).next().value,i=r.next().value;return Bt(a.h.map((function(r){return i.value.call(void 0,e,t,n,se.s(r.key),r.value())})))}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/map",localName:"get",l:[{type:61,g:3},{type:46,g:3}],j:{type:59,g:2},m:ke},{namespaceURI:"http://www.w3.org/2005/xpath-functions/map",localName:"keys",l:[{type:61,g:3}],j:{type:46,g:2},m:function(e,t,n,r){return _e([r],(function(e){return e=u(e).next().value,se.create(e.h.map((function(e){return e.key})))}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/map",localName:"merge",l:[{type:61,g:2},{type:61,g:3}],j:{type:61,g:3},m:ms},{namespaceURI:"http://www.w3.org/2005/xpath-functions/map",localName:"merge",l:[{type:61,g:2}],j:{type:61,g:3},m:function(e,t,n,r){return ms(e,0,0,r,se.s(new qe([{key:Y("duplicates",1),value:function(){return se.s(Y("use-first",1))}}])))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/map",localName:"put",l:[{type:61,g:3},{type:46,g:3},{type:59,g:2}],j:{type:61,g:3},m:function(e,t,n,r,a,i){return _e([r,a],(function(e){var t=(e=u(e)).next().value,n=e.next().value;return e=t.h.concat(),0<=(t=e.findIndex((function(e){return Le(e.key,n)})))?e.splice(t,1,{key:n,value:ue(i)}):e.push({key:n,value:ue(i)}),se.s(new qe(e))}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/map",localName:"remove",l:[{type:61,g:3},{type:46,g:2}],j:{type:61,g:3},m:function(e,t,n,r,a){return _e([r],(function(e){var t=u(e).next().value.h.concat();return a.M((function(e){return e.forEach((function(e){var n=t.findIndex((function(t){return Le(t.key,e)}));0<=n&&t.splice(n,1)})),se.s(new qe(t))}))}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/map",localName:"size",l:[{type:61,g:3}],j:{type:5,g:3},m:function(e,t,n,r){return r.map((function(e){return Y(e.h.length,5)}))}}],[{namespaceURI:"http://www.w3.org/2005/xpath-functions/math",localName:"pi",l:[],j:{type:3,g:3},m:function(){return se.s(Y(Math.PI,3))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/math",localName:"exp",l:[{type:3,g:0}],j:{type:3,g:0},m:function(e,t,n,r){return r.map((function(e){return Y(Math.pow(Math.E,e.value),3)}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/math",localName:"exp10",l:[{type:3,g:0}],j:{type:3,g:0},m:function(e,t,n,r){return r.map((function(e){return Y(Math.pow(10,e.value),3)}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/math",localName:"log",l:[{type:3,g:0}],j:{type:3,g:0},m:function(e,t,n,r){return r.map((function(e){return Y(Math.log(e.value),3)}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/math",localName:"log10",l:[{type:3,g:0}],j:{type:3,g:0},m:function(e,t,n,r){return r.map((function(e){return Y(Math.log10(e.value),3)}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/math",localName:"pow",l:[{type:3,g:0},{type:2,g:3}],j:{type:3,g:0},m:function(e,t,n,r,a){return a.M((function(e){var t=u(e).next().value;return r.map((function(e){return 1!==Math.abs(e.value)||Number.isFinite(t.value)?Y(Math.pow(e.value,t.value),3):Y(1,3)}))}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/math",localName:"sqrt",l:[{type:3,g:0}],j:{type:3,g:0},m:function(e,t,n,r){return r.map((function(e){return Y(Math.sqrt(e.value),3)}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/math",localName:"sin",l:[{type:3,g:0}],j:{type:3,g:0},m:function(e,t,n,r){return r.map((function(e){return Y(Math.sin(e.value),3)}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/math",localName:"cos",l:[{type:3,g:0}],j:{type:3,g:0},m:function(e,t,n,r){return r.map((function(e){return Y(Math.cos(e.value),3)}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/math",localName:"tan",l:[{type:3,g:0}],j:{type:3,g:0},m:function(e,t,n,r){return r.map((function(e){return Y(Math.tan(e.value),3)}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/math",localName:"asin",l:[{type:3,g:0}],j:{type:3,g:0},m:function(e,t,n,r){return r.map((function(e){return Y(Math.asin(e.value),3)}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/math",localName:"acos",l:[{type:3,g:0}],j:{type:3,g:0},m:function(e,t,n,r){return r.map((function(e){return Y(Math.acos(e.value),3)}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/math",localName:"atan",l:[{type:3,g:0}],j:{type:3,g:0},m:function(e,t,n,r){return r.map((function(e){return Y(Math.atan(e.value),3)}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/math",localName:"atan2",l:[{type:3,g:0},{type:3,g:3}],j:{type:3,g:0},m:function(e,t,n,r,a){return a.M((function(e){var t=u(e).next().value;return r.map((function(e){return Y(Math.atan2(e.value,t.value),3)}))}))}}],Mn,pn,[{namespaceURI:"http://fontoxpath/operators",localName:"to",l:[{type:5,g:0},{type:5,g:0}],j:{type:5,g:2},m:function(e,t,n,r,a){if(e=r.first(),a=a.first(),null===e||null===a)return se.empty();var i=e.value;return a=a.value,i>a?se.empty():se.create({next:function(){return W(Y(i++,5))}},a-i+1)}}],[{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"QName",l:[{type:1,g:0},{type:1,g:3}],j:{type:23,g:3},m:function(e,t,n,r,a){return _e([r,a],(function(e){var t=u(e);if(e=t.next().value,!Mt(t=t.next().value.value,23))throw Error("FOCA0002: The provided QName is invalid.");if(null===(e=e&&e.value||null)&&t.includes(":"))throw Error("FOCA0002: The URI of a QName may not be empty if a prefix is provided.");if(r.F())return se.s(Y(new ve("",null,t),23));if(!t.includes(":"))return se.s(Y(new ve("",e,t),23));var n=u(t.split(":"));return t=n.next().value,n=n.next().value,se.s(Y(new ve(t,e,n),23))}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"prefix-from-QName",l:[{type:23,g:0}],j:{type:24,g:0},m:function(e,t,n,r){return _e([r],(function(e){return null===(e=u(e).next().value)?se.empty():(e=e.value).prefix?se.s(Y(e.prefix,24)):se.empty()}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"local-name-from-QName",l:[{type:23,g:0}],j:{type:24,g:0},m:function(e,t,n,r){return r.map((function(e){return Y(e.value.localName,24)}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"namespace-uri-from-QName",l:[{type:23,g:0}],j:{type:20,g:0},m:function(e,t,n,r){return r.map((function(e){return Y(e.value.namespaceURI||"",20)}))}}],[{l:[{type:59,g:2}],m:function(e,t,n,r){return r.aa({empty:function(){return se.$()},multiple:function(){return se.U()},s:function(){return se.U()}})},localName:"empty",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:0,g:3}},{l:[{type:59,g:2}],m:function(e,t,n,r){return r.aa({empty:function(){return se.U()},multiple:function(){return se.$()},s:function(){return se.$()}})},localName:"exists",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:0,g:3}},{l:[{type:59,g:2}],m:function(e,t,n,r){return vs(r,1,1)},localName:"head",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:59,g:0}},{l:[{type:59,g:2}],m:function(e,t,n,r){return vs(r,2,null)},localName:"tail",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:59,g:2}},{l:[{type:59,g:2},{type:5,g:3},{type:59,g:2}],m:function(e,t,n,r,a,i){return r.F()?i:i.F()?r:(e=r.S(),0>(a=a.first().value-1)?a=0:a>e.length&&(a=e.length),t=e.slice(a),se.create(e.slice(0,a).concat(i.S(),t)))},localName:"insert-before",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:59,g:2}},{l:[{type:59,g:2},{type:5,g:3}],m:function(e,t,n,r,a){return e=a.first().value,!(r=r.S()).length||1>e||e>r.length||r.splice(e-1,1),se.create(r)},localName:"remove",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:59,g:2}},{l:[{type:59,g:2}],m:function(e,t,n,r){return r.M((function(e){return se.create(e.reverse())}))},localName:"reverse",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:59,g:2}},{l:[{type:59,g:2},{type:3,g:3}],m:function(e,t,n,r,a){return ws(0,0,0,r,a,se.empty())},localName:"subsequence",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:59,g:2}},{l:[{type:59,g:2},{type:3,g:3},{type:3,g:3}],m:ws,localName:"subsequence",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:59,g:2}},{l:[{type:59,g:2}],m:function(e,t,n,r){return r},localName:"unordered",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:59,g:2}},{l:[{type:46,g:2},{type:46,g:3}],m:function(e,t,n,r,a){return a.M((function(n){var a=u(n).next().value;return St(r,t).map((function(t,n){return La("eqOp",t.type,a.type)(t,a,e)?Y(n+1,5):Y(-1,5)})).filter((function(e){return-1!==e.value}))}))},localName:"index-of",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:5,g:2}},{l:[{type:46,g:2},{type:46,g:3},{type:1,g:3}],m:function(){throw Error("FOCH0002: No collations are supported")},localName:"index-of",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:5,g:2}},{l:[{type:59,g:2},{type:59,g:2}],m:function(e,t,n,r,a){var i=!1,o=jn(e,t,n,r,a);return se.create({next:function(){if(i)return z;var e=o.next(0);return e.done?e:(i=!0,W(Y(e.value,0)))}})},localName:"deep-equal",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:0,g:3}},{l:[{type:59,g:2},{type:59,g:2},{type:1,g:3}],m:function(){throw Error("FOCH0002: No collations are supported")},localName:"deep-equal",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:0,g:3}},{l:[{type:59,g:2}],m:function(e,t,n,r){var a=!1;return se.create({next:function(){if(a)return z;var e=r.ya();return a=!0,W(Y(e,5))}})},localName:"count",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:5,g:3}},{l:[{type:46,g:2}],m:function(e,t,n,r){if(r.F())return r;if(!(e=si(e=gs(r.S()))))throw Error("FORG0006: Incompatible types to be converted to a common type");if(!e.every((function(e){return Z(e.type,2)})))throw Error("FORG0006: items passed to fn:avg are not all numeric.");return t=e.reduce((function(e,t){return e+t.value}),0)/e.length,e.every((function(e){return Z(e.type,5)||Z(e.type,3)}))?se.s(Y(t,3)):e.every((function(e){return Z(e.type,4)}))?se.s(Y(t,4)):se.s(Y(t,6))},localName:"avg",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:46,g:0}},{l:[{type:46,g:2}],m:function(e,t,n,r){return r.F()?r:(e=ys(r.S()),se.s(e.reduce((function(e,t){return e.value<t.value?t:e}))))},localName:"max",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:46,g:0}},{l:[{type:46,g:2},{type:1,g:3}],m:function(){throw Error("FOCH0002: No collations are supported")},localName:"max",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:46,g:0}},{l:[{type:46,g:2}],m:function(e,t,n,r){return r.F()?r:(e=ys(r.S()),se.s(e.reduce((function(e,t){return e.value>t.value?t:e}))))},localName:"min",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:46,g:0}},{l:[{type:46,g:2},{type:1,g:3}],m:function(){throw Error("FOCH0002: No collations are supported")},localName:"min",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:46,g:0}},{l:[{type:46,g:2}],m:function(e,t,n,r){return As(e,t,0,r,se.s(Y(0,5)))},localName:"sum",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:46,g:3}},{l:[{type:46,g:2},{type:46,g:0}],m:As,localName:"sum",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:46,g:0}},{l:[{type:59,g:2}],m:function(e,t,n,r){if(!r.F()&&!r.za())throw Error("FORG0003: The argument passed to fn:zero-or-one contained more than one item.");return r},localName:"zero-or-one",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:59,g:0}},{l:[{type:59,g:2}],m:function(e,t,n,r){if(r.F())throw Error("FORG0004: The argument passed to fn:one-or-more was empty.");return r},localName:"one-or-more",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:59,g:1}},{l:[{type:59,g:2}],m:function(e,t,n,r){if(!r.za())throw Error("FORG0005: The argument passed to fn:exactly-one is empty or contained more than one item.");return r},localName:"exactly-one",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:59,g:3}},{l:[{type:59,g:2},{type:60,g:3}],m:function(e,t,n,r,a){if(r.F())return r;var i=a.first(),o=i.o;if(1!==o.length)throw Error("XPTY0004: signature of function passed to fn:filter is incompatible.");return r.filter((function(r){if(r=sn(o[0],se.s(r),t,"fn:filter",!1),!(r=i.value.call(void 0,e,t,n,r)).za()||!Z(r.first().type,0))throw Error("XPTY0004: signature of function passed to fn:filter is incompatible.");return r.first().value}))},localName:"filter",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:59,g:2}},{l:[{type:59,g:2},{type:60,g:3}],m:function(e,t,n,r,a){if(r.F())return r;var i=a.first(),o=i.o;if(1!==o.length)throw Error("XPTY0004: signature of function passed to fn:for-each is incompatible.");var s,u=r.value;return se.create({next:function(r){for(;;){if(!s){var a=u.next(0);if(a.done)return a;a=sn(o[0],se.s(a.value),t,"fn:for-each",!1),s=i.value.call(void 0,e,t,n,a).value}if(!(a=s.next(r)).done)return a;s=null}}})},localName:"for-each",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:59,g:2}},{l:[{type:59,g:2},{type:59,g:2},{type:60,g:3}],m:function(e,t,n,r,a,i){if(r.F())return r;var o=i.first(),s=o.o;if(2!==s.length)throw Error("XPTY0004: signature of function passed to fn:fold-left is incompatible.");return r.M((function(r){return r.reduce((function(r,a){return r=sn(s[0],r,t,"fn:fold-left",!1),a=sn(s[1],se.s(a),t,"fn:fold-left",!1),o.value.call(void 0,e,t,n,r,a)}),a)}))},localName:"fold-left",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:59,g:2}},{l:[{type:59,g:2},{type:59,g:2},{type:60,g:3}],m:function(e,t,n,r,a,i){if(r.F())return r;var o=i.first(),s=o.o;if(2!==s.length)throw Error("XPTY0004: signature of function passed to fn:fold-right is incompatible.");return r.M((function(r){return r.reduceRight((function(r,a){return r=sn(s[0],r,t,"fn:fold-right",!1),a=sn(s[1],se.s(a),t,"fn:fold-right",!1),o.value.call(void 0,e,t,n,a,r)}),a)}))},localName:"fold-right",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:59,g:2}}],bn,[{l:[{type:1,g:3},{type:61,g:3}],m:function(e,t,n,r,a){var i,o;return se.create({next:function(){if(!i){o=r.value.next(0).value.value;var e=a.first().h.reduce((function(e,t){return e[t.key.value]=ue(t.value()),e}),Object.create(null)),s=e["."]?e["."]():se.empty();delete e["."];var u=new hs((function(e){return n.ga(e)}),Object.keys(e).reduce((function(e,t){return e[t]=t,e}),{}),(function(e,t){return n.Qa(e,t)})),l=new Fo(u),c=Mo(o,{ca:!1,debug:t.debug});t.Ta&&Wo(c,new os(l));var h=kr(c,["mainModule","prolog"]);h&&Qo(h,l),c=To(c=kr(c,["mainModule","queryBody","*"]),{qa:!1,ca:!0});try{c.P(l)}catch(e){jr(o,e)}l=Object.keys(e).reduce((function(t,n){return t[u.rb(null,n)]=e[n],t}),Object.create(null)),s=new gt(s=s.F()?{O:null,Ga:-1,wa:s,ta:l}:{O:s.first(),Ga:0,wa:s,ta:l});try{i=c.evaluate(s,t).value}catch(e){jr(o,e)}}try{return i.next(0)}catch(e){jr(o,e)}}})},localName:"evaluate",namespaceURI:"http://fontoxml.com/fontoxpath",j:{type:59,g:2}},{l:[],m:function(){return se.s(Y("3.20.4",1))},localName:"version",namespaceURI:"http://fontoxml.com/fontoxpath",j:{type:1,g:3}}],[{l:[{type:23,g:3},{type:5,g:3}],m:function(e,t,n,r,a){return _e([r,a],(function(e){var t=u(e);e=t.next().value,t=t.next().value;var r=n.Aa(e.value.namespaceURI,e.value.localName,t.value);return null===r?se.empty():(e=new ge({l:r.l,arity:t.value,localName:e.value.localName,namespaceURI:e.value.namespaceURI,j:r.j,value:r.m}),se.s(e))}))},localName:"function-lookup",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{g:0,type:60}},{l:[{type:60,g:3}],m:function(e,t,n,r){return _e([r],(function(e){return(e=u(e).next().value).Oa()?se.empty():se.s(Y(new ve("",e.v,e.J),23))}))},localName:"function-name",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:23,g:0}},{l:[{type:60,g:3}],m:function(e,t,n,r){return _e([r],(function(e){return e=u(e).next().value,se.s(Y(e.B,5))}))},localName:"function-arity",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:5,g:3}}]);function bs(e){this.h=e}(n=bs.prototype).createAttributeNS=function(e,t){return this.h.createAttributeNS(e,t)},n.createCDATASection=function(e){return this.h.createCDATASection(e)},n.createComment=function(e){return this.h.createComment(e)},n.createDocument=function(){return this.h.createDocument()},n.createElementNS=function(e,t){return this.h.createElementNS(e,t)},n.createProcessingInstruction=function(e,t){return this.h.createProcessingInstruction(e,t)},n.createTextNode=function(e){return this.h.createTextNode(e)};var Es=Object.create(null),Bs=Object.create(null);function Ns(e,t,n,r,a,i){this.J=e,this.v=t,this.h=n,this.B=r,this.o=a,this.C=i}function Cs(e,t){return e+(t?"_DEBUG":"")}function Ts(e,t,n){return t=Cs(t,n),(n=Bs[e])?n[t]||null:(e=Es[e])&&(e=e[t])&&0!==e.length?e[0].h:null}function Is(e,t,n,r,a,i,o){!function(e,t,n,r){t=Cs(t,n),(e=Bs[e])&&(n=e[t])&&n===r&&delete e[t]}(e,t,i,a);var s=Es[e];s||(s=Es[e]=Object.create(null)),(t=s[e=Cs(t,i)])||(t=s[e]=[]),t.push(new Ns(Object.values(n.h),Object.values(n.o),a,Object.keys(r).map((function(e){return{namespaceURI:r[e],prefix:e}})),o,n.B))}function Os(e,t,n,r,a,i,o){var s=t.ca?"XQuery":"XPath",u=t.ob?null:function(e,t,n,r,a,i,o,s){var u=Es[e];return u?(u=u[t=Cs(t,i)])&&(u=u.find((function(e){return e.o===o&&e.J.every((function(e){return n(e.prefix)===e.namespaceURI}))&&e.v.every((function(e){return void 0!==r[e.name]}))&&e.B.every((function(e){return a[e.prefix]===e.namespaceURI}))&&e.C.every((function(e){var t=s(e.oc,e.arity);return t&&t.namespaceURI===e.Jb.namespaceURI&&t.localName===e.Jb.localName}))})))?{ia:u.h,sb:!1}:(e=Bs[e]&&Bs[e][t])?{ia:e,sb:!0}:null:(e=Ts(e,t,i))?{ia:e,sb:!0}:null}(e,s,n,r,a,t.debug,i,o),l=new Fo(n=new hs(n,r,o));if(null!==u)r=u.ia;else{if(r=Mo(e,t),o=new os(l),t.Ta&&Zo(r,o),!(o=Xr(r,"mainModule")))throw Error("Can not execute a library module.");if(r=Xr(o,"prolog"),o=kr(o,["queryBody","*"]),r){if(!t.ca)throw Error("XPST0003: Use of XQuery functionality is not allowed in XPath context");Qo(r,l)}r=Eo(o,t)}return(null===u||u.sb)&&(Object.keys(a).forEach((function(e){var t=a[e];Yo(l,t),l.o[l.h][e]=t})),r.P(l),t.ob||Is(e,s,n,a,r,t.debug,i)),{ia:r,ma:l}}var Ss=Symbol("IS_XPATH_VALUE_SYMBOL");function Rs(e){return e&&"object"==typeof e&&"lookupNamespaceURI"in e?function(t){return e.lookupNamespaceURI(t||null)}:function(){return null}}function Ds(e){return e.replace(/(\x0D\x0A)|(\x0D(?!\x0A))/g,String.fromCharCode(10))}function Ms(e){return function(t){var n=t.localName;return t.prefix?null:{namespaceURI:e,localName:n}}}function Gs(e,t,n,r,a,i){var o,s,l,c,h,p;null==r&&(r=r||{}),a?(o=a.logger||{trace:console.log.bind(console)},s=a.documentWriter,l=a.moduleImports,c=a.namespaceResolver,h=a.functionNameResolver,p=a.nodesFactory):(o={trace:console.log.bind(console)},l={},c=null,p=null,s=null,h=void 0);var f=new Te(null===n?new xe:n);e=Ds(e),n=l||Object.create(null),l=a.defaultFunctionNamespaceURI||"http://www.w3.org/2005/xpath-functions";var d=Os(e,i,c||Rs(t),r,n,l,h||Ms(l));for(e=t?vt(0,t):se.empty(),t=!p&&i.ca?new nr(t):new bs(p),s=s?new Be(s):Ee,p=Object.keys(r).reduce((function(e,t){var n=r[t];return e["Q{}"+t+"[0]"]=n&&"object"==typeof n&&Ss in n?function(){return se.create(n.Eb)}:function(){return vt(0,r[t])},e}),Object.create(null)),c={},n=(h=u(Object.keys(d.ma.Da))).next();!n.done;c={Wa:c.Wa},n=h.next())c.Wa=n.value,p[c.Wa]||(p[c.Wa]=function(e){return function(){return(0,d.ma.Da[e.Wa])(m,v)}}(c));var m=new gt({O:e.first(),Ga:0,wa:e,ta:p}),v=new Et(i.debug,f,t,s,a.currentContext,o);return{zb:m,Ab:v,ia:d.ia}}function Us(e,t){var n={},r=0,a=!1,i=null;return{next:function(){if(a)return z;for(var o={};r<e.h.length;){e:{var s=e.h[r].key.value;if(!i){o.kb=e.h[r];var u=o.kb.value().aa({default:function(e){return e},multiple:function(e){return function(){throw Error("Serialization error: The value of an entry in a map is expected to be a single item or an empty sequence. Use arrays when putting multiple values in a map. The value of the key "+e.kb.key.value+" holds multiple items")}}(o)}).first();if(null===u){n[s]=null,r++;break e}i=Ps(u,t)}u=i.next(0),i=null,n[s]=u.value,r++}o={kb:o.kb}}return a=!0,W(n)}}}function Fs(e,t){var n=[],r=0,a=!1,i=null;return{next:function(){if(a)return z;for(;r<e.R.length;){if(!i){var o=e.R[r]().aa({default:function(e){return e},multiple:function(){throw Error("Serialization error: The value of an entry in an array is expected to be a single item or an empty sequence. Use nested arrays when putting multiple values in an array.")}}).first();if(null===o){n[r++]=null;continue}i=Ps(o,t)}o=i.next(0),i=null,n[r++]=o.value}return a=!0,W(n)}}}function Ps(e,t){if(Z(e.type,61))return Us(e,t);if(Z(e.type,62))return Fs(e,t);if(Z(e.type,23)){var n=e.value;return{next:function(){return W("Q{"+(n.namespaceURI||"")+"}"+n.localName)}}}switch(e.type){case 7:case 8:case 9:case 11:case 12:case 13:case 14:case 15:var r=e.value;return{next:function(){return W(ot(r))}};case 47:case 53:case 54:case 55:case 56:case 57:case 58:var a=e.value;return{next:function(){return W(Gi(a,t,!1))}};default:return{next:function(){return W(e.value)}}}}xs.forEach((function(e){ba(e.namespaceURI,e.localName,e.l,e.j,e.m)}));var Hs={ANY:0,NUMBER:1,STRING:2,BOOLEAN:3,NODES:7,FIRST_NODE:9,STRINGS:10,MAP:11,ARRAY:12,NUMBERS:13,ASYNC_ITERATOR:99};function js(e,t,n,r){switch(n){case 3:return t.getEffectiveBooleanValue();case 2:return(t=St(t,r).S()).length?t.map((function(e){return Jt(e,1).value})).join(" "):"";case 10:return(t=St(t,r).S()).length?t.map((function(e){return e.value+""})):[];case 1:return null!==(t=t.first())&&Z(t.type,2)?t.value:NaN;case 9:if(null===(t=t.first()))return null;if(!Z(t.type,53))throw Error("Expected XPath "+e+" to resolve to Node. Got "+t.type);return Gi(t.value,r,!1);case 7:if(!(t=t.S()).every((function(e){return Z(e.type,53)})))throw Error("Expected XPath "+e+" to resolve to a sequence of Nodes.");return t.map((function(e){return Gi(e.value,r,!1)}));case 11:if(1!==(t=t.S()).length)throw Error("Expected XPath "+e+" to resolve to a single map.");if(!Z((t=t[0]).type,61))throw Error("Expected XPath "+e+" to resolve to a map");return Us(t,r).next(0).value;case 12:if(1!==(t=t.S()).length)throw Error("Expected XPath "+e+" to resolve to a single array.");if(!Z((t=t[0]).type,62))throw Error("Expected XPath "+e+" to resolve to an array");return Fs(t,r).next(0).value;case 13:return t.S().map((function(t){if(!Z(t.type,2))throw Error("Expected XPath "+e+" to resolve to numbers");return t.value}));case 99:var a=t.value,i=null,o=!1,s=function(){for(;!o;){if(!i){var e=a.next(0);if(e.done){o=!0;break}i=Ps(e.value,r)}return e=i.next(0),i=null,e}return Promise.resolve({done:!0,value:null})};return"asyncIterator"in Symbol?((t={})[Symbol.asyncIterator]=function(){return this},t.next=function(){return new Promise((function(e){return e(s())})).catch((function(t){jr(e,t)}))},t=t):t={next:function(){return new Promise((function(e){return e(s())}))}},t;default:return(t=t.S()).every((function(e){return Z(e.type,53)&&!Z(e.type,47)}))?1===(t=t.map((function(e){return Gi(e.value,r,!1)}))).length?t[0]:t:1===t.length?Z((t=t[0]).type,62)?Fs(t,r).next(0).value:Z(t.type,61)?Us(t,r).next(0).value:Ot(t,r).first().value:St(se.create(t),r).S().map((function(e){return e.value}))}}Hs[Hs.ANY]="ANY",Hs[Hs.NUMBER]="NUMBER",Hs[Hs.STRING]="STRING",Hs[Hs.BOOLEAN]="BOOLEAN",Hs[Hs.NODES]="NODES",Hs[Hs.FIRST_NODE]="FIRST_NODE",Hs[Hs.STRINGS]="STRINGS",Hs[Hs.MAP]="MAP",Hs[Hs.ARRAY]="ARRAY",Hs[Hs.NUMBERS]="NUMBERS",Hs[Hs.ASYNC_ITERATOR]="ASYNC_ITERATOR";var Xs=!1,_s=null,Ls={getPerformanceSummary:function(){var e=_s.getEntriesByType("measure").filter((function(e){return e.name.startsWith("XPath: ")}));return Array.from(e.reduce((function(e,t){var n=t.name.substring(7);return e.has(n)?((n=e.get(n)).times+=1,n.totalDuration+=t.duration):e.set(n,{xpath:n,times:1,totalDuration:t.duration,average:0}),e}),new Map).values()).map((function(e){return e.average=e.totalDuration/e.times,e})).sort((function(e,t){return t.totalDuration-e.totalDuration}))},setPerformanceImplementation:function(e){_s=e},startProfiling:function(){if(null===_s)throw Error("Performance API object must be set using `profiler.setPerformanceImplementation` before starting to profile");_s.clearMarks(),_s.clearMeasures(),Xs=!0},stopProfiling:function(){Xs=!1}},ks=0;function qs(e,t,n,r,a,i){if(a=a||0,!e||"string"!=typeof e)throw new TypeError("Failed to execute 'evaluateXPath': xpathExpression must be a string.");i=i||{};try{var o=Gs(e,t,n||null,r||{},i,{qa:"XQueryUpdate3.1"===i.language,ca:"XQuery3.1"===i.language||"XQueryUpdate3.1"===i.language,debug:!!i.debug,ob:!!i.disableCache,Ta:!!i.annotateAst}),s=o.zb,u=o.Ab,l=o.ia}catch(t){jr(e,t)}if(l.I)throw Error("XUST0001: Updating expressions should be evaluated as updating expressions");if(3===a&&t&&"nodeType"in t&&(n=l.Y(),t=Ae(t),null!==n&&!t.includes(n)))return!1;try{Xs&&(_s.mark(e+(0===ks?"":"@"+ks)),ks++);var c=js(e,er(l,s,u),a,u);return Xs&&(a=e+(0===--ks?"":"@"+ks),_s.measure("XPath: "+e,a),_s.clearMarks(a)),c}catch(t){jr(e,t)}}Object.assign(qs,{ANY_TYPE:0,NUMBER_TYPE:1,STRING_TYPE:2,BOOLEAN_TYPE:3,Zb:7,Vb:9,cc:10,Xb:11,Sb:12,Tb:99,$b:13,hc:"XQueryUpdate3.1",vc:"XQuery3.1",uc:"XPath3.1"});var Ys={};function Vs(e,t,n,r,a){return qs(e,t,n,r,qs.Tb,a)}function Qs(e,t,n,r){var a={};return a.pendingUpdateList=e.fa.map((function(e){return e.h(r)})),a.xdmValue=js(t,se.create(e.H),n,r),a}function Js(e,t,n){switch(t.type){case 0:return[e,{type:0}];case 1:return[e,{type:1}];case 3:return[""+Js(e+"("+(n||"contextItem")+")",t.j,n)[0],t.j];case 4:return[e,{type:4}];case 5:throw Error("Trying to get value of generated code with type None");default:throw Error("Unreachable! Trying to get compiled value of unsupported GeneratedCodeType.")}}function Ks(e,t,n){return{code:e,Ma:t,isAstAccepted:!0,Ea:n}}function zs(e){return{isAstAccepted:!1,reason:e}}function Ws(e,t,n,r){switch(r=void 0===r?"contextItem":r,n.type){case 0:case 1:return Ks("!!"+e,{type:0},[t]);case 3:return(e=Ws(e+"("+r+")","",n.j,r)).isAstAccepted?Ks("!!"+e.code,e.Ma,[t]):e;case 4:return Ks("(() => {\n\t\t\t\t\tconst result = "+e+".next();\n\t\t\t\t\treturn result.done ? false : !!result.value; \n\t\t\t\t})()",{type:0});case 5:throw Error("Trying to get value of generated code with type None");default:throw Error("Unreachable! Trying to get compiled value of unsupported GeneratedCodeType.")}}Object.assign(qs,(Ys.ANY_TYPE=0,Ys.NUMBER_TYPE=1,Ys.STRING_TYPE=2,Ys.BOOLEAN_TYPE=3,Ys.NODES_TYPE=7,Ys.FIRST_NODE_TYPE=9,Ys.STRINGS_TYPE=10,Ys.MAP_TYPE=11,Ys.ARRAY_TYPE=12,Ys.ASYNC_ITERATOR_TYPE=99,Ys.NUMBERS_TYPE=13,Ys.XQUERY_UPDATE_3_1_LANGUAGE="XQueryUpdate3.1",Ys.XQUERY_3_1_LANGUAGE="XQuery3.1",Ys.XPATH_3_1_LANGUAGE="XPath3.1",Ys));var Zs={DONE_TOKEN:z,getEffectiveBooleanValue:te,isSubtypeOf:Z,ready:W},$s={bc:"pathExpr",Rb:"andOp",ac:"orOp",dc:"stringConstantExpr"},eu=Object.values($s);function tu(e,t,n,r,a){return e=Xr(e,n),(e=Xr(e,eu))?(t+=n,(r=r.Fb(e,t,r)).isAstAccepted?0===a?Ws(t,r.code,r.Ma):Ks(t,r.Ma,[r.code]):r):zs("Unsupported: a base expression used with an operand.")}function nu(e,t,n){return 4===t&&(e+=".next().value"),47===n&&(e="(function () { const attr = "+e+"; return attr ? domFacade.getData(attr) : null})()"),e}function ru(e,t,n,r,a){var i=Lr(Xr(e,"firstOperand")[1],"type");if(e=Lr(Xr(e,"secondOperand")[1],"type"),!i||!e)return zs("Left or right type of compare are not found, annotation failed.");var o=[47,1];if(!o.includes(i.type)||!o.includes(e.type))return zs("Unsupported types in compare: ["+he[i.type]+", "+he[e.type]+"]");if(!n.isAstAccepted)return n;if(!r.isAstAccepted)return r;if(!i||!e)return zs("Operands in compare weren't annotated");if(!(o=new Map([["eqOp","==="],["neOp","!=="]])).has(t))return zs(t+" not yet implemented");t=o.get(t),o=Js(n.code,n.Ma);var s=Js(r.code,r.Ma);return Ks("function "+a+"(contextItem) {\n\t\t\t\t"+n.Ea.join("\n")+"\n\t\t\t \t"+r.Ea.join("\n")+"\n\t \t \treturn "+nu(o[0],o[1].type,i.type)+" "+t+" "+nu(s[0],s[1].type,e.type)+";\n\t\t}",{type:3,j:{type:0}})}var au={},iu=(au.equalOp="eqOp",au.notEqualOp="neOp",au.lessThanOrEqualOp="leOp",au.lessThanOp="ltOp",au.greaterThanOrEqualOp="geOp",au.greaterThanOp="gtOp",au);function ou(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function su(e,t,n,r){var a=tu(e,t,"firstOperand",n,0);return a.isAstAccepted?(e=tu(e,t,"secondOperand",n,0)).isAstAccepted?Ks("\n\tfunction "+t+"(contextItem) {\n\t\t"+a.Ea.join("\n")+"\n\t\t"+e.Ea.join("\n")+"\n\t\treturn "+a.code+" "+r+" "+e.code+";\n\t}\n\t",{type:3,j:{type:0}}):e:a}function uu(e){for(var t=[],n=0;n<arguments.length;++n)t[n]=arguments[n];return t.filter((function(e){return""!==e})).join(" && ")}function lu(e,t,n,r,a,i){var o=1!==n?"i"+n+" = 0;":"";return Ks("\n\t"+i+"\n\twhile ("+uu(a+n,"i"+n+" < "+a+n+".length")+") {\n\t\tconst contextItem"+n+" = "+a+n+"[i"+n+"];\n\t\tif (!("+(e=uu("contextItem"+n,e,t))+")) {\n\t\t\ti"+n+"++;\n\t\t\tcontinue;\n\t\t}\n\t\t"+r+"\n\t}\n\t"+o+"\n\t",{type:2},["let i"+n+" = 0;"])}function cu(e,t,n,r,a){return Ks("\n\t\t"+a+"\n\t\tif ("+(e=uu("i"+n+" === 0","contextItem"+n,e,t))+") {\n\t\t\t"+r+"\n\t\t}\n\t\t",{type:2},["let i"+n+" = 0;"])}var hu={ec:"textTest",Ub:"elementTest",Yb:"nameTest",fc:"Wildcard"},pu=Object.values(hu);function fu(e,t,n){var r=null===t.namespaceURI;if(null===t.namespaceURI&&"*"!==t.prefix&&(t.namespaceURI=n.ga(t.prefix||"")||null,!t.namespaceURI&&t.prefix))throw Error("XPST0081: The prefix "+t.prefix+" could not be resolved.");n=t.prefix;var a=t.namespaceURI;t=t.localName;var i=e+".nodeType\n\t\t&& ("+e+".nodeType === /*ELEMENT_NODE*/ 1\n\t\t|| "+e+".nodeType === /*ATTRIBUTE_NODE*/ 2)";return Ks("*"===n?"*"===t?i:i+" && "+e+".localName === "+ou(t):(t="*"!==t?i+" && "+e+".localName === "+ou(t)+" && ":"")+"("+e+".namespaceURI || null) === ("+(r=r&&!n?e+".nodeType\n&& "+e+".nodeType === /*ELEMENT_NODE*/ 1 ? "+ou(a)+" : null":ou(a))+" || null)",{type:0})}function du(e,t,n){var r=e[0];switch(r){case hu.Ub:return r=(e=Xr(e,"elementName"))&&Xr(e,"star"),null===e||r?t=Ks(t+".nodeType === /*ELEMENT_NODE*/ 1",{type:0}):t=fu(t,e=Yr(Xr(e,"QName")),n),t;case hu.ec:return Ks(t+".nodeType === /*TEXT_NODE*/ 3",{type:0});case hu.Yb:return fu(t,Yr(e),n);case hu.fc:return Xr(e,"star")?(r=Xr(e,"uri"))?t=fu(t,{localName:"*",namespaceURI:_r(r),prefix:""},n):(r=Xr(e,"NCName"),t="star"===Xr(e,"*")[0]?fu(t,{localName:_r(r),namespaceURI:null,prefix:"*"},n):fu(t,{localName:"*",namespaceURI:null,prefix:_r(r)},n)):t=fu(t,{localName:"*",namespaceURI:null,prefix:"*"},n),t;default:return zs("Unsupported: the test '"+r+"'.")}}function mu(e,t,n){var r=e[0];switch(r){case $s.bc:return r="",Xr(e,"rootExpr")&&(r="\n\t\tlet documentNode = contextItem;\n\t\twhile (documentNode.nodeType !== /*DOCUMENT_NODE*/9) {\n\t\t\tdocumentNode = domFacade.getParentNode(documentNode);\n\t\t\tif (documentNode === null) {\n\t\t\t\tthrow new Error('XPDY0050: the root node of the context node is not a document node.');\n\t\t\t}\n\t\t}\n\t\tcontextItem = documentNode;\n\t\t"),(e=function(e,t){if(0===e.length)return Ks("\n\t\t\tif (!hasReturned) {\n\t\t\t\thasReturned = true;\n\t\t\t\treturn ready(contextItem);\n\t\t\t}\n\t\t\t",{type:2},["let hasReturned = false;"]);for(var n="",r=[],a=e.length-1;0<=a;a--){var i=e[a],o=a+1,s=Xr(i,"predicates");e:{var u=t,l="",h=[];if(s){s=qr(s,"*");for(var p=0;p<s.length;p++){var f="step"+o+"_predicate"+p,d=u.Fb(s[p],f,u);if(!d.isAstAccepted){u=d;break e}if(!(f=Ws(f,"",d.Ma,"contextItem"+o)).isAstAccepted){u=f;break e}l=0===p?l+f.code:l+" && "+f.code,h.push(d.code)}u=Ks(l,{type:0},h)}else u=Ks("",{type:5},h)}if(!u.isAstAccepted)return u;if(!(l=Xr(i,"xpathAxis")))return zs("Unsupported: filter expressions.");if(!(h=Xr(i,pu)))return zs("Unsupported: the test in the '"+i+"' step.");if(n=a===e.length-1?"i"+o+"++;\n\t\t\t\t\t return ready(contextItem"+o+");":n+"\n\t\t\t\t\t i"+o+"++;",!(h=du(h,"contextItem"+o,t)).isAstAccepted)return h;e:switch(h=h.code,s=u.code,l=_r(l),l){case"attribute":o=lu(h,s,o,n,"attributeNodes","\n\tlet attributeNodes"+o+";\n\tif (contextItem && contextItem"+(o-1)+".nodeType === /*ELEMENT_NODE*/ 1) {\n\t\tattributeNodes"+o+" = domFacade.getAllAttributes(contextItem"+(o-1)+");\n\t}\n\t");break e;case"child":o=lu(h,s,o,n,"childNodes","const childNodes"+o+" = domFacade.getChildNodes(contextItem"+(o-1)+");");break e;case"parent":o=cu(h,s,o,n,"\n\tconst contextItem"+o+" = domFacade.getParentNode(contextItem"+(o-1)+");\n\t");break e;case"self":o=cu(h,s,o,n,"const contextItem"+o+" = contextItem"+(o-1)+";");break e;default:o=zs("Unsupported: the "+l+" axis")}if(!o.isAstAccepted)return o;if(r.push.apply(r,[].concat(c(o.Ea),c(u.Ea))),n=o.code,0<qr(i,"lookup").length)return zs("Unsupported: lookups.")}return Ks("const contextItem0 = contextItem;"+n,{type:2},r)}(qr(e,"stepExpr"),n)).isAstAccepted?Ks("\n\tfunction "+t+"(contextItem) {\n\t\t"+r+"\n\t\t"+e.Ea.join("\n")+"\n\t\tconst next = () => {\n\t\t\t"+e.code+"\n\t\t\treturn DONE_TOKEN;\n\t\t};\n\t\treturn {\n\t\t\tnext,\n\t\t\t[Symbol.iterator]() { return this; }\n\t\t};\n\t}\n\t",{type:3,j:{type:4}}):e;case $s.Rb:return su(e,t,n,"&&");case $s.ac:return su(e,t,n,"||");case $s.dc:return Ks("const "+t+" = "+(e=ou(e=Xr(e,"value")[1]))+";",{type:1});case"equalOp":case"notEqualOp":case"lessThanOrEqualOp":case"lessThanOp":case"greaterThanOrEqualOp":case"greaterThanOp":case"eqOp":case"neOp":case"ltOp":case"leOp":case"gtOp":case"geOp":case"isOp":case"nodeBeforeOp":case"nodeAfterOp":e:{var a=tu(e,t,"firstOperand",n);if(a.isAstAccepted)if((n=tu(e,t,"secondOperand",n)).isAstAccepted)switch(r){case"eqOp":case"neOp":case"ltOp":case"leOp":case"gtOp":case"geOp":case"isOp":t=ru(e,r,a,n,t);break e;case"equalOp":case"notEqualOp":case"lessThanOrEqualOp":case"lessThanOp":case"greaterThanOrEqualOp":case"greaterThanOp":Xr(e,"firstOperand");var i=Lr(e,"type");Xr(e,"secondOperand");var o=Lr(e,"type");t=i&&o?3===i.g&&3===o.g?ru(e,iu[r],a,n,t):zs("generalCompare with sequences is still in development"):zs("types of compare are not known");break e;default:t=zs("Unsupported compare type")}else t=n;else t=a}return t;default:return zs("Unsupported: the base expression '"+r+"'.")}}function vu(e,t,n){var r=Xr(e,"mainModule");if(!r)return zs("Unsupported: Can not execute a library module.");if(Xr(r,"prolog"))return zs("Unsupported: XQuery.");var a=kr(r,["queryBody","*"]);return n.Fb=mu,!1===(n=mu(a,"compiledXPathExpression",n)).isAstAccepted?n:(r=n.Ea?n.Ea.join("\n"):"",a=Lr(a,"type"),!1===(t=function(e,t,n){switch(e){case 9:if(e=(n=u(Js("compiledXPathExpression",t))).next().value,4!==n.next().value.type)throw Error("Trying access generated code as an iterator while this is not the case.");return Ks("\n\tconst firstResult = "+e+".next();\n\tif (!firstResult.done) {\n\t\treturn firstResult.value\n\t}\n\treturn null;\n\t",{type:2});case 7:return e=(n=u(Js("compiledXPathExpression",t))).next().value,4!==n.next().value.type?Ks("return [];",{type:2}):Ks("\n\tconst nodes = [];\n\tfor (const node of "+e+") {\n\t\tnodes.push(node);\n\t}\n\treturn nodes;\n\t",{type:2});case 3:return(n=Ws("compiledXPathExpression","",t)).isAstAccepted?Ks("return "+n.code+";",{type:2}):n;case 2:return void 0===n?n=zs("Full AST wasn't annotated so we cannot correctly emit a string return"):Z(n,1)||Z(n,47)?n=Ks("return "+nu(e=(t=u(Js("compiledXPathExpression",t))).next().value,(t=t.next().value).type,n)+" || '';",{type:2}):n=zs("Not implemented: returning anything but strings and attributes from codegen"),n;default:return zs("Unsupported: the return type '"+e+"'.")}}(t,n.Ma,a?a.type:void 0)).isAstAccepted?t:(t=r+n.code+t.code,n="\n\treturn (contextItem, domFacade, runtimeLib) => {\n\t\tconst {\n\t\t\tDONE_TOKEN,\n\t\t\tValueType,\n\t\t\tXPDY0002,\n\t\t\tdeterminePredicateTruthValue,\n\t\t\tisSubtypeOf,\n\t\t\tready,\n\t\t\tatomize,\n\t\t} = runtimeLib;",function e(t){var n=qr(t,"*");if("pathExpr"===t[0])return!0;for(t=u(n),n=t.next();!n.done;n=t.next())if(e(n.value))return!0;return!1}(e)&&(n+='\n\t\tif (!contextItem) {\n\t\t\tthrow XPDY0002("Context is needed to evaluate the given path expression.");\n\t\t}\n\n\t\tif (!contextItem.nodeType) {\n\t\t\tthrow new Error("Context item must be subtype of node().");\n\t\t}\n\t\t'),{code:n+(t+"}\n//# sourceURL=generated.js"),isAstAccepted:!0}))}var gu={},yu=(gu["http://www.w3.org/2005/XQueryX"]="xqx",gu["http://www.w3.org/2007/xquery-update-10"]="xquf",gu);function wu(e,t,n){var r=e.stack;r&&(r.includes(e.message)&&(r=r.substr(r.indexOf(e.message)+e.message.length).trim()),(r=r.split("\n")).splice(10),r=(r=r.map((function(e){return e.startsWith(" ")||e.startsWith("\t")?e:" "+e}))).join("\n")),e=Error.call(this,"Custom XPath function Q{"+n+"}"+t+" raised:\n"+e.message+"\n"+r),this.message=e.message,"stack"in e&&(this.stack=e.stack)}function Au(e,t,n){return 0===t.g?e.F()?null:Ps(e.first(),n).next(0).value:2===t.g||1===t.g?e.S().map((function(e){if(Z(e.type,47))throw Error("Cannot pass attribute nodes to custom functions");return Ps(e,n).next(0).value})):Ps(e.first(),n).next(0).value}function xu(e){var t=Ts(e,"XPath",!1);if(t)return t;if(Zo(t=Mo(e,{ca:!1}),new os(void 0)),null===(t=kr(t,["mainModule","queryBody","*"])))throw Error("Library modules do not have a specificity");t=To(t,{qa:!1,ca:!1});var n=Cs("XPath",!1);if(Bs[e])Bs[e][n]=t;else{var r={};Bs[e]=(r[n]=t,r)}return t}v(wu,Error);var bu=new xe;return void 0!==t&&(t.compareSpecificity=function(e,t){return dr(xu(e).K,xu(t).K)},t.compileXPathToJavaScript=function(e,t,n){return n=n||{},t=t||0,Zo(e=Mo(e=Ds(e),{ca:"XQuery3.1"===n.language||"XQueryUpdate3.1"===n.language,debug:!1}),new os(new Fo(new hs((n={ga:n.namespaceResolver||Rs(null)}).ga,{},Ms("http://www.w3.org/2005/xpath-functions"))))),vu(e,t,n)},t.domFacade=bu,t.evaluateXPath=qs,t.evaluateXPathToArray=function(e,t,n,r,a){return qs(e,t,n,r,qs.Sb,a)},t.evaluateXPathToAsyncIterator=Vs,t.evaluateXPathToBoolean=function(e,t,n,r,a){return qs(e,t,n,r,qs.BOOLEAN_TYPE,a)},t.evaluateXPathToFirstNode=function(e,t,n,r,a){return qs(e,t,n,r,qs.Vb,a)},t.evaluateXPathToMap=function(e,t,n,r,a){return qs(e,t,n,r,qs.Xb,a)},t.evaluateXPathToNodes=function(e,t,n,r,a){return qs(e,t,n,r,qs.Zb,a)},t.evaluateXPathToNumber=function(e,t,n,r,a){return qs(e,t,n,r,qs.NUMBER_TYPE,a)},t.evaluateXPathToNumbers=function(e,t,n,r,a){return qs(e,t,n,r,qs.$b,a)},t.evaluateXPathToString=function(e,t,n,r,a){return qs(e,t,n,r,qs.STRING_TYPE,a)},t.evaluateXPathToStrings=function(e,t,n,r,a){return qs(e,t,n,r,qs.cc,a)},t.evaluateUpdatingExpression=function(e,t,n,r,a){var i,o,s,u,l,c,h,p,f,d;return function(e){function t(t){return e.next(t)}function n(t){return e.throw(t)}return new Promise((function(r,a){!function e(i){i.done?r(i.value):Promise.resolve(i.value).then(t,n).then(e,a)}(e.next())}))}(new E(new A((function(m){switch(m.h){case 1:a=a||{};try{u=Gs(e,t,n||null,r||{},a||{},{qa:!0,ca:!0,debug:!!a.debug,ob:!!a.disableCache,Ta:!!a.annotateAst}),i=u.zb,o=u.Ab,s=u.ia}catch(t){jr(e,t)}if(s.I){m.h=2;break}l=[];var v=(c=Vs(e,t,n,r,Object.assign(Object.assign({},a),{language:"XQueryUpdate3.1"}))).next();return m.h=3,{value:v};case 3:h=m.v;case 4:if(h.done){m.h=6;break}return l.push(h.value),v=c.next(),m.h=7,{value:v};case 7:h=m.v,m.h=4;break;case 6:return p={},m.return(Promise.resolve((p.pendingUpdateList=[],p.xdmValue=l,p)));case 2:try{d=s.o(i,o),f=d.next(0)}catch(t){jr(e,t)}return m.return(Qs(f.value,e,a.returnType,o))}}))))},t.evaluateUpdatingExpressionSync=function(e,t,n,r,a){a=a||{};try{var i=Gs(e,t,n||null,r||{},a||{},{qa:!0,ca:!0,debug:!!a.debug,ob:!!a.disableCache,Ta:!!a.annotateAst}),o=i.zb,s=i.Ab,u=i.ia}catch(t){jr(e,t)}if(!u.I)return o={},(s={}).pendingUpdateList=[],s.xdmValue=qs(e,t,n,r,a.j,Object.assign(Object.assign({},a),(o.language=qs.hc,o))),s;try{var l=u.o(o,s).next(0)}catch(t){jr(e,t)}return Qs(l.value,e,a.returnType,s)},t.executeJavaScriptCompiledXPath=function(e,t,n){return n=n||new xe,e()(t,n,Zs)},t.executePendingUpdateList=function(e,t,n,r){t=new Te(t||new xe),r=r?new Be(r):Ee,n=n?n=new bs(n):null,ir(e=e.map(so),t,n,r)},t.getBucketForSelector=function(e){return xu(e).Y()},t.getBucketsForNode=Ae,t.precompileXPath=function(e){return Promise.resolve(e)},t.registerXQueryModule=function(e,t){if(Wo(t=Mo(e,{ca:!0,debug:(t=void 0===t?{debug:!1}:t).debug}),new os(void 0)),!(t=Xr(t,"libraryModule")))throw Error("XQuery module must be declared in a library module.");var n=Xr(t,"moduleDecl"),r=Xr(n,"uri"),a=_r(r);if(r=_r(n=Xr(n,"prefix")),(n=new Fo(new hs((function(){return null}),Object.create(null),Ms("http://www.w3.org/2005/xpath-functions")))).o[n.h][r]=a,null!==(t=Xr(t,"prolog"))){try{var i=Qo(t,n)}catch(t){jr(e,t)}i.La.forEach((function(e){if(a!==e.namespaceURI)throw Error("XQST0048: Functions and variables declared in a module must reside in the module target namespace.")})),qo(a,i)}else qo(a,{La:[],Va:[]});return a},t.registerCustomXPathFunction=function(e,t,n,r){var a=(e=function(e){if("object"==typeof e)return e;if(2!==(e=e.split(":")).length)throw Error("Do not register custom functions in the default function namespace");var t=u(e);e=t.next().value,t=t.next().value;var n=cs[e];if(!n){if(n="generated_namespace_uri_"+e,cs[e])throw Error("Prefix already registered: Do not register the same prefix twice.");cs[e]=n}return{localName:t,namespaceURI:n}}(e)).namespaceURI,i=e.localName;if(!a)throw hi();var o=t.map((function(e){return me(e)})),s=me(n);ba(a,i,o,s,(function(e,t,n){var u=Array.from(arguments);u.splice(0,3),u=u.map((function(e,n){return Au(e,o[n],t)}));var l={};l.currentContext=t.J,l.domFacade=t.h.h,l=l;try{var h=r.apply(void 0,[l].concat(c(u)))}catch(e){throw new wu(e,i,a)}return h&&"object"==typeof h&&Object.getOwnPropertySymbols(h).includes(Ss)?se.create(h.Eb):vt(t.h,h,s)}))},t.parseScript=function(e,t,n,r){return r=void 0===r?Ee:r,e=Mo(e,{ca:"XQueryUpdate3.1"===t.language,debug:t.debug}),t.Ta&&Zo(e,new os(void 0)),function e(t,n,r,a){if("string"==typeof r)return 0===r.length?null:n.createTextNode(r);if(!Array.isArray(r))throw new TypeError("JsonML element should be an array or string");var i=r[0];switch(i){case"copySource":case"insertAfter":case"insertAsFirst":case"insertAsLast":case"insertBefore":case"insertInto":case"modifyExpr":case"newNameExpr":case"replacementExpr":case"replaceValue":case"returnExpr":case"sourceExpr":case"targetExpr":case"transformCopies":case"transformCopy":a=a||"http://www.w3.org/2005/XQueryX";break;case"deleteExpr":case"insertExpr":case"renameExpr":case"replaceExpr":case"transformExpr":a="http://www.w3.org/2007/xquery-update-10";break;default:a="http://www.w3.org/2005/XQueryX"}i=n.createElementNS(a,yu[a]+":"+i);var o=r[1],s=1;if("object"==typeof o&&!Array.isArray(o)){for(var u in o)null!==o[u]&&("type"===u?t.setAttributeNS(i,a,"fontoxpath:"+u,fe(o[u])):t.setAttributeNS(i,a,yu[a]+":"+u,o[u]));s=2}for(u=s,o=r.length;u<o;++u)null!==(s=e(t,n,r[u],a))&&t.insertBefore(i,s,null);return i}(r,n,e,null)},t.profiler=Ls,t.createTypedValueFactory=function(e){return function(t,n){return t=mt(new Te(null===n?new xe:n),t,me(e)),(n={})[Ss]=!0,n.Eb=t,n}},t.Language={XPATH_3_1_LANGUAGE:"XPath3.1",XQUERY_3_1_LANGUAGE:"XQuery3.1",XQUERY_UPDATE_3_1_LANGUAGE:"XQueryUpdate3.1"},t.ReturnType=Hs),t}.call("undefined"==typeof window?void 0:window,Object.freeze({__proto__:null,compile:function(e,t={language:"xsd"}){const r=xe(t)(e),a=function(e){const t=new n;return e(t),new f(t.program)}(e=>{A(e,r,"xpath"===t.language),e.accept()});return function(e){const n="xpath"===t.language?[-1,...be(e),-2]:be(e);return a.execute(n).success}}})),Be=(Ee.compareSpecificity,Ee.compileXPathToJavaScript,Ee.createTypedValueFactory,Ee.domFacade,Ee.evaluateUpdatingExpression,Ee.evaluateUpdatingExpressionSync,Ee.evaluateXPath),Ne=(Ee.evaluateXPathToArray,Ee.evaluateXPathToAsyncIterator,Ee.evaluateXPathToBoolean),Ce=Ee.evaluateXPathToFirstNode,Te=(Ee.evaluateXPathToMap,Ee.evaluateXPathToNodes),Ie=Ee.evaluateXPathToNumber,Oe=(Ee.evaluateXPathToNumbers,Ee.evaluateXPathToString),Se=Ee.evaluateXPathToStrings,Re=(Ee.executeJavaScriptCompiledXPath,Ee.executePendingUpdateList,Ee.getBucketForSelector,Ee.getBucketsForNode),De=(Ee.Language,Ee.parseScript),Me=(Ee.precompileXPath,Ee.profiler,Ee.registerCustomXPathFunction),Ge=Ee.registerXQueryModule;Ee.ReturnType;class Ue{constructor(e){this._onNodeTouched=e}getAllAttributes(e){return Array.from(e.attributes)}getAttribute(e,t){return e.getAttribute(t)}getChildNodes(e,t){const n=Array.from(e.childNodes).filter(e=>!t||Re(e).includes(t));return n.forEach(e=>this._onNodeTouched(e)),n}getData(e){return e.nodeType===Node.ATTRIBUTE_NODE?(this._onNodeTouched(e),e.value):(this._onNodeTouched(e.parentNode),e.data)}getFirstChild(e,t){const n=Array.from(this.getChildNodes()).filter(e=>!t||Re(e).includes(t))[0];return n||null}getLastChild(e,t){const n=e.getChildNodes().filter(e=>!t||Re(e).includes(t)),r=n[n.length-1];return r||null}getNextSibling(e,t){for(let{nextSibling:n}=e;n;n=n.nextSibling)if(Re(n).includes(t))return n;return null}getParentNode(e){return e.parentNode}getPreviousSibling(e,t){for(let{previousSibling:n}=e;n;n=n.previousSibling)if(Re(n).includes(t))return n;return null}}class Fe{static getParentBindingElement(e){if(e.parentNode&&e.parentNode.nodeType!==Node.DOCUMENT_NODE){if(e.parentNode.hasAttribute("ref"))return e.parentNode;Fe.getParentBindingElement(e.parentNode)}return null}static isAbsolutePath(e){return null!=e&&(e.startsWith("/")||e.startsWith("instance("))}static isRepeated(e){return e.parentElement.closest("fx-repeatitem")}static isSelfReference(e){return"."===e||"./text()"===e||"text()"===e||""===e||null===e}static getDefaultInstance(e){const t=Fe.getForeElement(e).querySelector("fx-instance");if(!t)throw new Error("no default instance present");return t}static getForeElement(e){if("FX-FORE"===e.nodeName)return e;if(e.parentNode)return Fe.getForeElement(e.parentNode);throw new Error("no Fore element present")}static getInstanceId(e){if(!e)return"default";if(e.startsWith("instance(")){const t=e.substring(e.indexOf("(")+1);return t.substring(1,t.indexOf(")")-1)}return"default"}static getPath(e){const t=Be("path()",e);return Fe.shortenPath(t)}static shortenPath(e){const t=e.replaceAll(/(Q{(.*?)\})/g,""),n=t.substring(1,t.length);return n.substring(n.indexOf("/"),t.length)}static getBasePath(e){return e.split(":")[0]}}function Pe(e,t,n,r){const a={};return function(i){if(a[i])return;const o={},s=[],u=[];for(u.push({node:i,processed:!1});u.length>0;){const i=u[u.length-1],{processed:l}=i,{node:c}=i;if(l)u.pop(),s.pop(),o[c]=!1,a[c]=!0,t&&0!==e[c].length||n.push(c);else{if(a[c]){u.pop();continue}if(o[c]){if(r){u.pop();continue}s.push(c),window.dispatchEvent(new CustomEvent("compute-exception",{composed:!0,bubbles:!0,detail:{path:s,message:"cyclic graph"}}))}o[c]=!0,s.push(c);const t=e[c];for(let e=t.length-1;e>=0;e-=1)u.push({node:t[e],processed:!1});i.processed=!0}}}}function He(e){this.nodes={},this.outgoingEdges={},this.incomingEdges={},this.circular=e&&!!e.circular}He.prototype={size(){return Object.keys(this.nodes).length},addNode(e,t){this.hasNode(e)||(this.nodes[e]=2===arguments.length?t:e,this.outgoingEdges[e]=[],this.incomingEdges[e]=[])},removeNode(e){this.hasNode(e)&&(delete this.nodes[e],delete this.outgoingEdges[e],delete this.incomingEdges[e],[this.incomingEdges,this.outgoingEdges].forEach(t=>{Object.keys(t).forEach(n=>{const r=t[n].indexOf(e);r>=0&&t[n].splice(r,1)},this)}))},hasNode(e){return Object.prototype.hasOwnProperty.call(this.nodes,e)},getNodeData(e){if(this.hasNode(e))return this.nodes[e];throw new Error("Node does not exist: "+e)},setNodeData(e,t){if(!this.hasNode(e))throw new Error("Node does not exist: "+e);this.nodes[e]=t},addDependency(e,t){if(!this.hasNode(e))throw new Error("Node does not exist: "+e);if(!this.hasNode(t))throw new Error("Node does not exist: "+t);return-1===this.outgoingEdges[e].indexOf(t)&&this.outgoingEdges[e].push(t),-1===this.incomingEdges[t].indexOf(e)&&this.incomingEdges[t].push(e),!0},removeDependency(e,t){let n;this.hasNode(e)&&(n=this.outgoingEdges[e].indexOf(t),n>=0&&this.outgoingEdges[e].splice(n,1)),this.hasNode(t)&&(n=this.incomingEdges[t].indexOf(e),n>=0&&this.incomingEdges[t].splice(n,1))},clone(){const e=this,t=new He;return Object.keys(e.nodes).forEach(n=>{t.nodes[n]=e.nodes[n],t.outgoingEdges[n]=e.outgoingEdges[n].slice(0),t.incomingEdges[n]=e.incomingEdges[n].slice(0)}),t},directDependenciesOf(e){if(this.hasNode(e))return this.outgoingEdges[e].slice(0);throw new Error("Node does not exist: "+e)},directDependantsOf(e){if(this.hasNode(e))return this.incomingEdges[e].slice(0);throw new Error("Node does not exist: "+e)},dependenciesOf(e,t){if(this.hasNode(e)){const n=[];Pe(this.outgoingEdges,t,n,this.circular)(e);const r=n.indexOf(e);return r>=0&&n.splice(r,1),n}throw new Error("Node does not exist: "+e)},dependantsOf(e,t){if(this.hasNode(e)){const n=[];Pe(this.incomingEdges,t,n,this.circular)(e);const r=n.indexOf(e);return r>=0&&n.splice(r,1),n}throw new Error("Node does not exist: "+e)},entryNodes(){const e=this;return Object.keys(this.nodes).filter(t=>0===e.incomingEdges[t].length)},overallOrder(e){const t=this,n=[],r=Object.keys(this.nodes);if(0===r.length)return n;if(!this.circular){const e=Pe(this.outgoingEdges,!1,[],this.circular);r.forEach(t=>{e(t)})}const a=Pe(this.outgoingEdges,e,n,this.circular);return r.filter(e=>0===t.incomingEdges[e].length).forEach(e=>{a(e)}),this.circular&&r.filter(e=>-1===n.indexOf(e)).forEach(e=>a(e)),n}},He.prototype.directDependentsOf=He.prototype.directDependantsOf,He.prototype.dependentsOf=He.prototype.dependantsOf;class je{static get ACTION_ELEMENTS(){return["FX-DELETE","FX-DISPATCH","FX-INSERT","FX-LOAD","FX-MESSAGE","FX-REBUILD","FX-RECALCULATE","FX-REFRESH","FX-RENEW","FX-REPLACE","FX-RESET","FX-RETAIN","FX-RETURN","FX-REVALIDATE","FX-SEND","FX-SETFOCUS","FX-SETINDEX","FX-SETVALUE","FX-TOGGLE","FX-UPDATE"]}static createUUID(){const e=[];for(let t=0;t<36;t+=1)e[t]="0123456789abcdef".substr(Math.floor(16*Math.random()),1);e[14]="4",e[19]="0123456789abcdef".substr(3&e[19]|8,1),e[8]=e[13]=e[18]=e[23]="-";return e.join("")}static get XFORMS_NAMESPACE_URI(){return"http://www.w3.org/2002/xforms"}static isActionElement(e){return je.ACTION_ELEMENTS.includes(e)}static get UI_ELEMENTS(){return["FX-ALERT","FX-CONTROL","FX-BUTTON","FX-CONTROL","FX-DIALOG","FX-FILENAME","FX-MEDIATYPE","FX-GROUP","FX-HINT","FX-INPUT","FX-ITEMS","FX-LABEL","FX-OUTPUT","FX-RANGE","FX-REPEAT","FX-REPEATITEM","FX-SWITCH","FX-SECRET","FX-SELECT","FX-SUBMIT","FX-TEXTAREA","FX-TRIGGER","FX-UPLOAD"]}static isUiElement(e){je.UI_ELEMENTS.includes(e);return je.UI_ELEMENTS.includes(e)}static async refreshChildren(e,t){return new Promise(n=>{const{children:r}=e;r&&Array.from(r).forEach(e=>{je.isUiElement(e.nodeName)&&"function"==typeof e.refresh?e.refresh():"FX-MODEL"!==e.nodeName.toUpperCase()&&je.refreshChildren(e,t)}),n("done")})}static isRepeated(e){return null!==e.closest("fx-repeatitem")}static getRepeatTarget(e,t){return e.closest("fx-repeatitem").querySelector("#"+t)}static getContentType(e,t){return"urlencoded-post"===t?"application/x-www-form-urlencoded; charset=UTF-8":"xml"===e.type?"application/xml; charset=UTF-8":"json"===e.type?"application/json":null}static fadeInElement(e){let t=()=>(e.getAnimations&&e.getAnimations().map(e=>e.finish()),t=e.animate({opacity:[0,1]},600),t.finished);return t()}static fadeOutElement(e){let t=()=>(e.getAnimations&&e.getAnimations().map(e=>e.finish()),t=e.animate({opacity:[1,0]},2600),t.finished);return t()}static dispatch(e,t,n){const r=new CustomEvent(t,{composed:!0,bubbles:!0,detail:n});e.dispatchEvent(r)}}je.READONLY_DEFAULT=!1,je.REQUIRED_DEFAULT=!1,je.RELEVANT_DEFAULT=!0,je.CONSTRAINT_DEFAULT=!0,je.TYPE_DEFAULT="xs:string";const Xe="http://www.w3.org/2002/xforms",_e=new Map;function Le(e,t,n){return _e.has(e)?_e.get(e).set(t,n):_e.set(e,new Map)}const ke=e=>{if(!e)return"http://www.w3.org/1999/xhtml"};function qe(e,t){const n=(r=e,a=t,_e.has(r)&&_e.get(r).get(a)||null);var r,a;if(n)return n;const i=(new DOMParser).parseFromString("<xml />","text/xml"),o=De(e,{},i);let s=Se('descendant::xqx:functionCallExpr\n\t\t\t\t[xqx:functionName = "instance"]\n\t\t\t\t/xqx:arguments\n\t\t\t\t/xqx:stringConstantExpr\n\t\t\t\t/xqx:value',o,null,{},{namespaceResolver:e=>"xqx"===e?"http://www.w3.org/2005/XQueryX":void 0});if(0===s.length){const n=Ce("ancestor::*[@ref][1]",t);if(n){const r=qe(n.getAttribute("ref"),n);return Le(e,t,r),r}s=["default"]}if(1===s.length){let n;if("default"===s[0]){const e=Ce("ancestor-or-self::fx-fore",t,null,null,{namespaceResolver:ke});n=e&&e.querySelector("fx-instance")}else n=$e(s[0],t,"fx-instance");if(n&&n.hasAttribute("xpath-default-namespace")){const r=n.getAttribute("xpath-default-namespace"),a=e=>{if(!e)return r};return Le(e,t,a),a}}s.length;const u=Oe("ancestor-or-self::*/@xpath-default-namespace[last()]",t)||"",l=function(e){return""===e?u:Oe('ancestor-or-self::*/@*[name() = "xmlns:" || $prefix][last()]',t,null,{prefix:e})};return Le(e,t,l),l}function Ye(e,t,n){return(t&&t.ownerDocument||t)===window.document?ke:qe(e,n)}function Ve({prefix:e,localName:t},n){switch(t){case"context":case"base64encode":case"boolean-from-string":case"current":case"depends":case"event":case"index":case"instance":case"log":case"logtree":return{namespaceURI:Xe,localName:t};default:return""===e||"fn"===e?{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:t}:"local"===e?{namespaceURI:"http://www.w3.org/2005/xquery-local-functions",localName:t}:null}}function Qe(e,t,n,r={}){const a=Ye(e,t,n);return Be(e,t,null,r,"xs:anyType",{currentContext:{formElement:n,variables:r},moduleImports:{xf:Xe},functionNameResolver:Ve,namespaceResolver:a})}function Je(e,t,n){const r=Ye(e,t,n);return Ce(e,t,null,{},{defaultFunctionNamespaceURI:Xe,moduleImports:{xf:Xe},currentContext:{formElement:n},namespaceResolver:r})}function Ke(e,t,n){const r=Ye(e,t,n);return Te(e,t,null,{},{currentContext:{formElement:n},functionNameResolver:Ve,moduleImports:{xf:Xe},namespaceResolver:r})}function ze(e,t,n){const r=Ye(e,t,n);return Ne(e,t,null,{},{currentContext:{formElement:n},functionNameResolver:Ve,moduleImports:{xf:Xe},namespaceResolver:r})}function We(e,t,n,r=null,a=n){const i=Ye(e,t,n);return Oe(e,t,r,{},{currentContext:{formElement:n},functionNameResolver:Ve,moduleImports:{xf:Xe},namespaceResolver:i})}function Ze(e,t,n,r=null,a=n){const i=Ye(e,t,n);return Ie(e,t,r,{},{currentContext:{formElement:n},functionNameResolver:Ve,moduleImports:{xf:Xe},namespaceResolver:i})}function $e(e,t,n=null){const r=Te("outermost(ancestor-or-self::fx-fore[1]/(descendant::xf-fore|descendant::*[@id = $id]))[not(self::fx-fore)]",t,null,{id:e},{namespaceResolver:ke});if(0===r.length)return null;if(1===r.length&&Ne("(ancestor::fx-fore | ancestor::fx-repeat)[last()]/self::fx-fore",r[0],null,null,{namespaceResolver:ke})){const e=r[0];return n&&e.localName!==n?null:e}for(const e of Te("ancestor::fx-repeatitem => reverse()",t,null,null,{namespaceResolver:ke})){const t=r.filter(t=>e.contains(t));switch(t.length){case 0:break;case 1:{const e=t[0];return n&&e.localName!==n?null:e}default:{const e=t.find(e=>Te("every $ancestor of ancestor::fx-repeatitem satisfies $ancestor is $ancestor/../child::fx-repeatitem[../@repeat-index]",e,null,{}));return e?n&&e.localName!==n?null:e:null}}}return null}const et=(e,t)=>{const n=e.currentContext.formElement;if(t){const e=$e(t,n);if(e){if("FX-REPEAT"===e.nodeName){const{nodeset:t}=e;for(let r=n;r;r=r.parentNode)if(r.parentNode===e){return t[Array.from(r.parentNode.children).indexOf(r)]}}return e.nodeset}}const r=Fe.getParentBindingElement(n);n.nodeName;return r||n.getInScopeContext()};Me({namespaceURI:Xe,localName:"context"},[],"item()?",et),Me({namespaceURI:Xe,localName:"context"},["xs:string"],"item()?",et),Me({namespaceURI:Xe,localName:"log"},["xs:string?"],"xs:string?",(e,t)=>{const{formElement:n}=e.currentContext,r=$e(t,n,"fx-instance");if(r&&"json"!==r.getAttribute("type")){return function(e){const t=(new DOMParser).parseFromString(e,"application/xml"),n=(new DOMParser).parseFromString(['<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">',' <xsl:strip-space elements="*"/>',' <xsl:template match="para[content-style][not(text())]">',' <xsl:value-of select="normalize-space(.)"/>'," </xsl:template>",' <xsl:template match="node()|@*">',' <xsl:copy><xsl:apply-templates select="node()|@*"/></xsl:copy>'," </xsl:template>",' <xsl:output indent="yes"/>',"</xsl:stylesheet>"].join("\n"),"application/xml"),r=new XSLTProcessor;r.importStylesheet(n);const a=r.transformToDocument(t);return(new XMLSerializer).serializeToString(a)}((new XMLSerializer).serializeToString(r.getDefaultContext()))}return null}),Me({namespaceURI:Xe,localName:"logtree"},["xs:string?"],"element()?",(e,t)=>{const{formElement:n}=e.currentContext,r=$e(t,n,"fx-instance");if(r){const t=document.createElement("div");t.setAttribute("class","logtree");const n=e.currentContext.formElement,a=n.querySelector(".logtree");a&&a.parentNode.removeChild(a);const i=function e(t,n){if(n&&n.nodeType===Node.ELEMENT_NODE&&n.children){const r=document.createElement("details");r.setAttribute("data-path",n.nodeName);const a=document.createElement("summary");let i,o=" <"+n.nodeName;Array.from(n.attributes).forEach(e=>{o+=` ${e.nodeName}="${e.nodeValue}"`}),n.firstChild&&n.firstChild.nodeType===Node.TEXT_NODE&&""!==n.firstChild.data.trim()?(i=n.firstChild.nodeValue,o+=`>${i}</${n.nodeName}>`):o+=">",a.textContent=o,r.appendChild(a),0!==n.childElementCount?r.setAttribute("open","open"):a.setAttribute("style","list-style:none;"),t.appendChild(r),Array.from(n.children).forEach(t=>{e(r,t)})}}(t,r.getDefaultContext());i&&n.appendChild(i)}return null});const tt=(e,t)=>{const n=Ce("ancestor-or-self::fx-fore",e.currentContext.formElement,null,null,{namespaceResolver:ke}),r=t?$e(t,n,"fx-instance"):n.querySelector("fx-instance");if(r){return r.getDefaultContext()}return null};Me({namespaceURI:Xe,localName:"index"},["xs:string?"],"xs:integer?",(e,t)=>{const{formElement:n}=e.currentContext;if(null===t)return 1;const r=$e(t,n,"fx-repeat");return r?r.getAttribute("index"):Number(1)}),Me({namespaceURI:Xe,localName:"instance"},[],"item()?",e=>tt(e,null)),Me({namespaceURI:Xe,localName:"instance"},["xs:string?"],"item()?",tt),Me({namespaceURI:Xe,localName:"depends"},["node()*"],"item()?",(e,t)=>t[0]),Me({namespaceURI:Xe,localName:"event"},["xs:string?"],"item()?",(e,t)=>(e.currentContext.variables[t].nodeType,e.currentContext.variables[t])),Ge(`\n module namespace xf="${Xe}";\n\n declare %public function xf:boolean-from-string($str as xs:string) as xs:boolean {\n lower-case($str) = "true" or $str = "1"\n };\n`),Me({namespaceURI:Xe,localName:"base64encode"},["xs:string?"],"xs:string?",(e,t)=>btoa(t));class nt extends HTMLElement{constructor(){super(),this.model=this.parentNode,this.attachShadow({mode:"open"})}connectedCallback(){this.hasAttribute("src")&&(this.src=this.getAttribute("src")),this.hasAttribute("id")?this.id=this.getAttribute("id"):this.id="default",this.hasAttribute("type")?this.type=this.getAttribute("type"):this.type="xml";this.shadowRoot.innerHTML="\n <style>\n \n :host {\n display: none;\n }\n :host * {\n display:none;\n }\n ::slotted(*){\n display:none;\n }\n \n </style>\n \n \n "}async init(){await this._initInstance().then(()=>(this.dispatchEvent(new CustomEvent("instance-loaded",{composed:!0,bubbles:!0,detail:{instance:this}})),this))}evalXPath(e){const t=this.parentElement.parentElement;return Je(e,this.getDefaultContext(),t)}getInstanceData(){return this.instanceData||this._createInstanceData(),this.instanceData}setInstanceData(e){e?this.instanceData=e:this._createInstanceData()}getDefaultContext(){return"xml"===this.type?this.instanceData.firstElementChild:this.instanceData}async _initInstance(){if("#querystring"===this.src){const e=new URLSearchParams(location.search),t=(new DOMParser).parseFromString("<data></data>","application/xml"),n=t.firstElementChild;for(const r of e){const e=t.createElement(r[0]);e.appendChild(t.createTextNode(r[1])),n.appendChild(e)}this.instanceData=t}else this.src?await this._loadData():0!==this.childNodes.length&&this._useInlineData()}_createInstanceData(){if("xml"===this.type){const e=(new DOMParser).parseFromString("<data></data>","application/xml");this.instanceData=e}"json"===this.type&&(this.instanceData={})}async _loadData(){const e=""+this.src,t=je.getContentType(this,"get");await fetch(e,{method:"GET",mode:"cors",credentials:"include",headers:{"Content-Type":t}}).then(e=>{const t=e.headers.get("content-type").toLowerCase();return t.startsWith("text/html")?e.text().then(e=>(new DOMParser).parseFromString(e,"text/html")):t.startsWith("text/plain")||t.startsWith("text/markdown")?e.text():t.startsWith("application/json")?e.json():t.startsWith("application/xml")?e.text().then(e=>(new DOMParser).parseFromString(e,"application/xml")):"done"}).then(e=>{e.nodeType,this.instanceData=e}).catch(e=>{throw new Error("failed loading data "+e)})}_getContentType(){return"xml"===this.type?"application/xml":"json"===this.type?"application/json":null}_useInlineData(){if("xml"===this.type){const e=(new DOMParser).parseFromString(this.innerHTML,"application/xml");this.instanceData=e}else"json"===this.type?this.instanceData=JSON.parse(this.textContent):"html"===this.type?this.instanceData=this.firstElementChild.children:"text"===this.type&&(this.instanceData=this.textContent)}_handleResponse(){const e=this.shadowRoot.getElementById("loader"),t=(new DOMParser).parseFromString(e.lastResponse,"application/xml");this.instanceData=t}_handleError(){this.shadowRoot.getElementById("loader")}}customElements.define("fx-instance",nt);class rt{constructor(e,t,n,r,a,i,o,s,u){this.path=e,this.ref=t,this.constraint=i,this.readonly=n,this.relevant=r,this.required=a,this.type=o,this.node=s,this.bind=u,this.changed=!1,this.alerts=[],this.boundControls=[]}get value(){return this.node.nodeType?this.node.nodeType===Node.ATTRIBUTE_NODE?this.node.nodeValue:this.node.textContent:this.node}set value(e){e.nodeType===Node.DOCUMENT_NODE?this.node.appendChild(e.firstElementChild):e.nodeType===Node.ELEMENT_NODE?this.node.appendChild(e):this.node.nodeType===Node.ATTRIBUTE_NODE?this.node.nodeValue=e:this.node.textContent=e}addAlert(e){this.alerts.push(e)}cleanAlerts(){this.alerts=[]}}class at extends HTMLElement{constructor(){super(),this.instances=[],this.modelItems=[],this.defaultContext={},this.changed=[],this.inited=!1,this.modelConstructed=!1,this.attachShadow({mode:"open"}),this.computes=0}get formElement(){return this.parentElement}connectedCallback(){this.shadowRoot.innerHTML="\n <slot></slot>\n ",this.addEventListener("model-construct-done",e=>{this.modelConstructed=!0}),this.skipUpdate=!1}static lazyCreateModelItem(e,t,n){let r,a={};if(null==n)return null;a=n.nodeType===n.TEXT_NODE?n.parentNode:n,n.nodeType?r=Fe.getPath(n):(r=null,a=n);const i=new rt(r,t,je.READONLY_DEFAULT,je.RELEVANT_DEFAULT,je.REQUIRED_DEFAULT,je.CONSTRAINT_DEFAULT,je.TYPE_DEFAULT,a,this);return e.registerModelItem(i),i}modelConstruct(){this.dispatchEvent(new CustomEvent("model-construct",{detail:this}));const e=this.querySelectorAll("fx-instance");if(e.length>0){const t=[];e.forEach(e=>{t.push(e.init())}),Promise.all(t).then(()=>{this.instances=Array.from(e),this.updateModel(),this.inited=!0,this.dispatchEvent(new CustomEvent("model-construct-done",{composed:!0,bubbles:!0,detail:{model:this}}))})}else this.dispatchEvent(new CustomEvent("model-construct-done",{composed:!0,bubbles:!0,detail:{model:this}}));this.inited=!0}registerModelItem(e){this.modelItems.push(e)}updateModel(){this.rebuild(),this.skipUpdate||(this.recalculate(),this.revalidate())}rebuild(){this.mainGraph=new He(!1),this.modelItems=[];const e=this.querySelectorAll("fx-model > fx-bind");0!==e.length?(e.forEach(e=>{e.init(this)}),this.dispatchEvent(new CustomEvent("rebuild-done",{detail:{maingraph:this.mainGraph}}))):this.skipUpdate=!0}recalculate(){if(this.computes=0,this.subgraph=new He(!1),0!==this.changed.length){this.changed.forEach(e=>{if(this.subgraph.addNode(e.path,e.node),this.mainGraph.hasNode(e.path)){const t=this.mainGraph.dependantsOf(e.path,!1).reverse();0!==t.length&&t.forEach(t=>{const n=this.mainGraph.getNodeData(t);if(this.subgraph.addNode(t,n),t.includes(":")){const r=t.substring(0,t.indexOf(":"));this.subgraph.addNode(r,n);0!==this.mainGraph.dependentsOf(e.path,!1).indexOf(t)&&this.subgraph.addDependency(t,e.path)}})}});this.subgraph.overallOrder(!1).forEach(e=>{if(this.mainGraph.hasNode(e)){const t=this.mainGraph.getNodeData(e);this.compute(t,e)}});const e=[...this.changed];this.formElement.toRefresh=e,this.changed=[],this.dispatchEvent(new CustomEvent("recalculate-done",{detail:{subgraph:this.subgraph}}))}else{this.mainGraph.overallOrder(!1).forEach(e=>{const t=this.mainGraph.getNodeData(e);this.compute(t,e)})}}compute(e,t){const n=this.getModelItem(e);if(n&&t.includes(":")){const e=t.split(":")[1];if(e)if("calculate"===e){const t=Qe(n.bind[e],n.node,this);n.value=t,n.readonly=!0}else if("constraint"!==e&&"type"!==e){const t=n.bind[e];if(t){const r=ze(t,n.node,this);n[e]=r}}this.computes+=1}}revalidate(){let e=!0;return this.modelItems.forEach(t=>{const{bind:n}=t;if(n&&"function"==typeof n.hasAttribute&&n.hasAttribute("constraint")){const r=n.getAttribute("constraint");if(r){const a=ze(r,t.node,this);if(t.constraint=a,this.formElement.addToRefresh(t),a||(e=!1),!this.modelConstructed){const e=n.getAlert();e&&t.addAlert(e)}}}}),e}getModelItem(e){return this.modelItems.find(t=>t.node===e)}getDefaultContext(){return this.instances[0].getDefaultContext()}getDefaultInstance(){return this.instances[0]}getDefaultInstanceData(){return this.instances[0].instanceData}getInstance(e){return Array.from(this.instances).find(t=>t.id===e)}evalBinding(e){return this.instances[0].evalXPath(e)}}function it(e){return e.closest("fx-fore")}function ot(e,t){const n=e.closest("[ref]");if(null!==n)return n.nodeset;const r=function(e){return it(e).getModel()}(e);if(Fe.isAbsolutePath(t)){const e=Fe.getInstanceId(t);return r.getInstance(e).getDefaultContext()}return null!==r.getDefaultInstance()&&r.inited?r.getDefaultInstance().getDefaultContext():[]}function st(e,t){const n=function(e){return e.nodeType===Node.ATTRIBUTE_NODE?e.ownerElement:e.nodeType===Node.ELEMENT_NODE?e:e.parentNode}(e),r=n.closest("fx-repeatitem");if(r)return r.nodeset;if(e.nodeType===Node.ATTRIBUTE_NODE&&"ref"===e.nodeName){if(e.ownerElement.hasAttribute("context")){const r=ot(e.ownerElement.parentNode,t);return Je(e.ownerElement.getAttribute("context"),r,it(n))}return ot(n.parentNode,t)}return ot(n,t)}customElements.define("fx-model",at);const ut=e=>class extends e{static get properties(){return{context:{type:Object},model:{type:Object},modelItem:{type:Object},nodeset:{type:Object},ref:{type:String}}}constructor(){super(),this.context=null,this.model=null,this.modelItem={},this.ref=this.hasAttribute("ref")?this.getAttribute("ref"):""}getModel(){if(this.model)return this.model;return this.getOwnerForm().querySelector("fx-model")}getOwnerForm(){let e=this;for(;e&&e.parentNode;){if("FX-FORE"===e.nodeName.toUpperCase())return e;e=e.parentNode instanceof DocumentFragment?e.parentNode.host:e.parentNode}return e}evalInContext(){const e=st(this.getAttributeNode("ref")||this,this.ref);if(e)if(""===this.ref)this.nodeset=e;else if(Array.isArray(e))this.nodeset=Je(this.ref,e[0],this);else{const{nodeType:t}=e;this.nodeset=t?Je(this.ref,e,this):Qe(this.ref,e,this)}}isNotBound(){return!this.hasAttribute("ref")}isBound(){return this.hasAttribute("ref")}getBindingExpr(){if(this.hasAttribute("ref"))return this.getAttribute("ref");const e=this.parentNode.closest("[ref]");return e?e.getAttribute("ref"):"instance()"}getInstance(){if(this.ref.startsWith("instance(")){const e=Fe.getInstanceId(this.ref);return this.getModel().getInstance(e)}return this.getModel().getInstance("default")}_getParentBindingElement(e){if(e.parentNode.host){const{host:t}=e.parentNode;if(t.hasAttribute("ref"))return t}else if(e.parentNode){if(e.parentNode.hasAttribute("ref"))return this.parentNode;this._getParentBindingElement(this.parentNode)}return null}getModelItem(){const e=this.getModel().getModelItem(this.nodeset);e&&(this.modelItem=e);let t;if(this.closest("fx-repeatitem")){const{index:e}=this.closest("fx-repeatitem");t=Array.isArray(this.nodeset)?this.getModel().getModelItem(this.nodeset[e-1]):this.getModel().getModelItem(this.nodeset)}else t=this.getModel().getModelItem(this.nodeset);return t||at.lazyCreateModelItem(this.getModel(),this.ref,this.nodeset)}getValue(){if(this.hasAttribute("value")){const e=this.getAttribute("value");try{return We(e,st(this,e),this.getOwnerForm())}catch(e){this.dispatch("error",{message:e})}}return this.textContent?this.textContent:null}getInScopeContext(){return st(this.getAttributeNode("ref")||this,this.ref)}dispatch(e,t){const n=new CustomEvent(e,{composed:!0,bubbles:!0,detail:t});this.dispatchEvent(n)}};class lt extends(ut(HTMLElement)){constructor(){super(),this.nodeset=[],this.model={},this.contextNode={},this.inited=!1}connectedCallback(){this.ref=this.getAttribute("ref"),this.readonly=this.getAttribute("readonly"),this.required=this.getAttribute("required"),this.relevant=this.getAttribute("relevant"),this.type=this.hasAttribute("type")?this.getAttribute("type"):lt.TYPE_DEFAULT,this.calculate=this.getAttribute("calculate")}init(e){this.model=e,this.instanceId=this._getInstanceId(),this.bindType=this.getModel().getInstance(this.instanceId).type,"xml"===this.bindType&&(this._evalInContext(),this._buildBindGraph(),this._createModelItems()),this._processChildren(e)}_buildBindGraph(){"xml"===this.bindType&&this.nodeset.forEach(e=>{const t=Fe.getPath(e);this.model.mainGraph.addNode(t,e),this.calculate&&(this.model.mainGraph.addNode(t+":calculate",e),this.model.mainGraph.addDependency(t,t+":calculate"));const n=this._getReferencesForProperty(this.calculate,e);if(0!==n.length&&this._addDependencies(n,e,t,"calculate"),!this.calculate){const n=this._getReferencesForProperty(this.readonly,e);0!==n.length?this._addDependencies(n,e,t,"readonly"):this.readonly&&this.model.mainGraph.addNode(t+":readonly",e)}const r=this._getReferencesForProperty(this.required,e);0!==r.length?this._addDependencies(r,e,t,"required"):this.required&&this.model.mainGraph.addNode(t+":required",e);const a=this._getReferencesForProperty(this.relevant,e);0!==a.length?this._addDependencies(a,e,t,"relevant"):this.relevant&&this.model.mainGraph.addNode(t+":relevant",e);const i=this._getReferencesForProperty(this.constraint,e);0!==i.length?this._addDependencies(i,e,t,"constraint"):this.constraint&&this.model.mainGraph.addNode(t+":constraint",e)})}_addDependencies(e,t,n,r){const a=`${n}:${r}`;0!==e.length?(this.model.mainGraph.hasNode(a)||this.model.mainGraph.addNode(a,t),e.forEach(e=>{const t=Fe.getPath(e);t.endsWith("text()[1]")||(this.model.mainGraph.hasNode(t)||this.model.mainGraph.addNode(t,e),this.model.mainGraph.addDependency(a,t))})):this.model.mainGraph.addNode(a,t)}_processChildren(e){const t=this.querySelectorAll(":scope > fx-bind");Array.from(t).forEach(t=>{t.init(e)})}getAlert(){if(this.hasAttribute("alert"))return this.getAttribute("alert");const e=this.querySelector("fx-alert");return e?e.innerHTML:null}_evalInContext(){const e=st(this.getAttributeNode("ref")||this,this.ref);if(this.nodeset=[],""===this.ref||null===this.ref)this.nodeset=e;else if(Array.isArray(e))e.forEach(t=>{if(Fe.isSelfReference(this.ref))this.nodeset=e;else if(this.ref){Ke(this.ref,t,this.getOwnerForm()).forEach(e=>{this.nodeset.push(e)})}});else{"xml"===this.getModel().getInstance(this.instanceId).type?this.nodeset=Ke(this.ref,e,this.getOwnerForm()):this.nodeset=this.ref}}_createModelItems(){Array.isArray(this.nodeset)?Array.from(this.nodeset).forEach(e=>{this._createModelItem(e)}):this._createModelItem(this.nodeset)}static lazyCreateModelitems(e,t,n){Array.isArray(n)?Array.from(n).forEach(n=>{lt.lazyCreateModelItem(e,t,n)}):lt.lazyCreateModelItem(e,t,n)}_createModelItem(e){if(Fe.isSelfReference(this.ref)){const e=this.parentElement.closest("fx-bind[ref]");return void(e&&(e.required=this.required))}const t=e,n=Fe.getPath(e),r=new rt(n,this.getBindingExpr(),lt.READONLY_DEFAULT,lt.RELEVANT_DEFAULT,lt.REQUIRED_DEFAULT,lt.CONSTRAINT_DEFAULT,this.type,t,this);this.getModel().registerModelItem(r)}_getReferencesForProperty(e){if(e){const t=new Set,n=new Ue(e=>t.add(e));return this.nodeset.forEach(t=>{We(e,t,this.getOwnerForm(),n)}),Array.from(t.values())}return[]}_initBooleanModelItemProperty(e,t){return ze(this[e],t,this)}static shortenPath(e){const t=e.split("/");let n="";for(let e=2;e<t.length;e+=1){const r=t[e];if(-1!==r.indexOf("{}")){n+="/"+r.split("{}")[1]}else n+="/"+r}return n}_getInstanceId(){const e=this.getBindingExpr();return e.startsWith("instance(")?(this.instanceId=Fe.getInstanceId(e),this.instanceId):this.instanceId?this.instanceId:"default"}}lt.READONLY_DEFAULT=!1,lt.REQUIRED_DEFAULT=!1,lt.RELEVANT_DEFAULT=!0,lt.CONSTRAINT_DEFAULT=!0,lt.TYPE_DEFAULT="xs:string",customElements.define("fx-bind",lt);
1
+ function e(e,t,n,r){const a={op:t,func:n,data:r};return e.push(a),a}function t(e,t){return e}class n{constructor(){this.program=[]}test(t,n){return e(this.program,5,t,void 0===n?null:n)}jump(t){return e(this.program,3,null,t)}record(n,r){return e(this.program,4,void 0===r?t:r,n)}bad(t=1){return e(this.program,1,null,t)}accept(){return e(this.program,0,null,null)}fail(t){return e(this.program,2,t||null,null)}}class r{constructor(e,t,n){this.programLength=e,this.maxFromByPc=t,this.maxSurvivorFromByPc=n}static fromProgram(e){const t=e.length,n=[],a=[];return e.forEach(e=>{n.push(0),a.push(0)}),e.forEach((e,r)=>{switch(e.op){case 2:if(null===e.func)return;if(r+1>=t)throw new Error("Invalid program: program could run past end");n[r+1]+=1;break;case 1:case 4:if(r+1>=t)throw new Error("Invalid program: program could run past end");n[r+1]+=1;break;case 3:e.data.forEach(e=>{if(e<0||e>=t)throw new Error("Invalid program: program could run past end");n[e]+=1});break;case 5:if(r+1>=t)throw new Error("Invalid program: program could run past end");a[r+1]+=1;break;case 0:a[r]+=1}}),new r(t,n,a)}static createStub(e){const t=[],n=[];for(let r=0;r<e;++r)t.push(e),n.push(e);return new r(e,t,n)}}class a{constructor(e){this.acceptingTraces=e,this.success=e.length>0}}class i{constructor(e){this.t=0,this.i=0,this.h=new Uint16Array(e),this.l=new Uint8Array(e)}getBadness(e){return this.l[e]}add(e,t){this.l[e]=t>255?255:t;const n=function(e,t,n,r,a){let i=r,o=a;for(;i<o;){const r=i+o>>>1;n<t[e[r]]?o=r:i=r+1}return i}(this.h,this.l,t,this.i,this.t);this.h.copyWithin(n+1,n,this.t),this.h[n]=e,this.t+=1}reschedule(e,t){const n=Math.max(this.l[e],t>255?255:t);if(this.l[e]!==n){const t=this.h.indexOf(e,this.i);if(t<0||t>=this.t)return void(this.l[e]=n);this.h.copyWithin(t,t+1,this.t),this.t-=1,this.add(e,n)}}getNextPc(){return this.i>=this.t?null:this.h[this.i++]}reset(){this.t=0,this.i=0,this.l.fill(0)}}class o{constructor(e){this.o=[];let t=e.length;e.forEach(e=>{this.o.push(e>0?t:-1),t+=e}),this.u=new Uint16Array(t)}clear(){this.u.fill(0,0,this.o.length)}add(e,t){const n=this.u[t],r=this.o[t];this.u[t]+=1,this.u[r+n]=e}has(e){return this.u[e]>0}forEach(e,t){const n=this.u[e],r=this.o[e];for(let e=r;e<r+n;++e)t(this.u[e])}}function s(e,t,n=!1){return null===e?t:Array.isArray(e)?(-1===e.indexOf(t)&&(n&&(e=e.slice()),e.push(t)),e):e===t?e:[e,t]}class u{constructor(e,t){this.prefixes=e,this.record=t}}function l(e,t){let n;if(null===t){if(!Array.isArray(e))return e;n=e}else n=e===u.EMPTY?[]:Array.isArray(e)?e:[e];return new u(n,t)}u.EMPTY=new u([],null);class c{constructor(e){this.p=[],this.v=[];for(let t=0;t<e;++t)this.p.push(0),this.v.push(null)}mergeTraces(e,t,n,r,a,i){let o=!1;return n.forEach(t,t=>{const n=this.trace(t,r,a,i);var u,l,c;l=n,c=o,e=null===(u=e)?l:null===l?u:Array.isArray(l)?l.reduce((e,t)=>s(e,t,e===l),u):s(u,l,c),o=e===n}),e}trace(e,t,n,r){switch(this.p[e]){case 2:return this.v[e];case 1:return null}this.p[e]=1;let a=null;const i=t[e];if(null!==i)a=i;else if(!n.has(e))throw new Error("Trace without source at pc "+e);if(a=this.mergeTraces(a,e,n,t,n,r),null!==a){const t=r[e];null!==t&&(a=l(a,t))}return this.v[e]=a,this.p[e]=2,a}buildSurvivorTraces(e,t,n,r,a){for(let i=0,o=e.length;i<o;++i){if(!n.has(i)){t[i]=null;continue}this.v.fill(null),this.p.fill(0);const o=this.mergeTraces(null,i,n,e,r,a);if(null===o)throw new Error("No non-cyclic paths found to survivor "+i);t[i]=l(o,null)}this.v.fill(null)}}class h{constructor(e){this.g=[],this.k=[],this.m=[],this.A=new o(e.maxFromByPc),this.T=new o(e.maxSurvivorFromByPc),this.S=new c(e.programLength);for(let t=0;t<e.programLength;++t)this.g.push(null),this.k.push(null),this.m.push(null);this.k[0]=u.EMPTY}reset(e){this.A.clear(),this.T.clear(),this.g.fill(null),e&&(this.k.fill(null),this.m.fill(null),this.k[0]=u.EMPTY)}record(e,t){this.g[e]=t}has(e){return this.A.has(e)||null!==this.k[e]}add(e,t){this.A.add(e,t)}hasSurvivor(e){return this.T.has(e)}addSurvivor(e,t){this.T.add(e,t)}buildSurvivorTraces(){const e=this.k;this.S.buildSurvivorTraces(e,this.m,this.T,this.A,this.g),this.k=this.m,this.m=e}getTraces(e){const t=e.reduce((e,t)=>s(e,this.k[t]),null);return null===t?[]:Array.isArray(t)?t:[t]}}class p{constructor(e){this.I=[],this.N=new i(e.programLength),this.M=new i(e.programLength),this.P=new h(e)}reset(){this.N.reset(),this.N.add(0,0),this.I.length=0,this.P.reset(!0)}getNextThreadPc(){return this.N.getNextPc()}step(e,t,n){const r=this.P.has(t);this.P.add(e,t);const a=this.N.getBadness(e)+n;r?this.N.reschedule(t,a):this.N.add(t,a)}stepToNextGeneration(e,t){const n=this.P.hasSurvivor(t);this.P.addSurvivor(e,t);const r=this.N.getBadness(e);n?this.M.reschedule(t,r):this.M.add(t,r)}accept(e){this.I.push(e),this.P.addSurvivor(e,e)}fail(e){}record(e,t){this.P.record(e,t)}nextGeneration(){this.P.buildSurvivorTraces(),this.P.reset(!1);const e=this.N;e.reset(),this.N=this.M,this.M=e}getAcceptingTraces(){return this.P.getTraces(this.I)}}class f{constructor(e){this.U=[],this.G=e,this.V=r.fromProgram(e),this.U.push(new p(this.V))}execute(e,t){const n=this.U.pop()||new p(this.V);n.reset();const r=e.length;let i,o=-1;do{let a=n.getNextThreadPc();if(null===a)break;for(++o,i=o>=r?null:e[o];null!==a;){const e=this.G[a];switch(e.op){case 0:null===i?n.accept(a):n.fail(a);break;case 2:{const r=e.func;if(null===r||r(t)){n.fail(a);break}n.step(a,a+1,0);break}case 1:n.step(a,a+1,e.data);break;case 5:if(null===i){n.fail(a);break}if(!(0,e.func)(i,e.data,t)){n.fail(a);break}n.stepToNextGeneration(a,a+1);break;case 3:{const t=e.data,r=t.length;if(0===r){n.fail(a);break}for(let e=0;e<r;++e)n.step(a,t[e],0);break}case 4:{const r=(0,e.func)(e.data,o,t);null!=r&&n.record(a,r),n.step(a,a+1,0);break}}a=n.getNextThreadPc()}n.nextGeneration()}while(null!==i);const s=new a(n.getAcceptingTraces());return n.reset(),this.U.push(n),s}}function d(e){return t=>t===e}function m(e,t){if(null===e||null===t)throw new Error("unescaped hyphen may not be used as a range endpoint");if(t<e)throw new Error("character range is in the wrong order");return n=>e<=n&&n<=t}function v(e){return!0}function g(){return!1}function y(e,t){return n=>e(n)||t(n)}function w(e,t){switch(t.kind){case"predicate":return void e.test(t.value);case"regexp":return void A(e,t.value,!1)}}function A(e,t,n){const r=e.program.length,a=e.jump([]);n&&(a.data.push(e.program.length),e.test(()=>!0),e.jump([r]));const i=[];if(t.forEach(t=>{a.data.push(e.program.length),function(e,t){t.forEach(t=>{!function(e,t){const[n,{min:r,max:a}]=t;if(null!==a){for(let t=0;t<r;++t)w(e,n);for(let t=r;t<a;++t){const t=e.jump([]);t.data.push(e.program.length),w(e,n),t.data.push(e.program.length)}}else if(r>0){for(let t=0;t<r-1;++t)w(e,n);const t=e.program.length;w(e,n),e.jump([t]).data.push(e.program.length)}else{const t=e.program.length,r=e.jump([]);r.data.push(e.program.length),w(e,n),e.jump([t]),r.data.push(e.program.length)}}(e,t)})}(e,t),i.push(e.jump([]))}),i.forEach(t=>{t.data.push(e.program.length)}),n){const t=e.program.length,n=e.jump([]);n.data.push(e.program.length),e.test(()=>!0),e.jump([t]),n.data.push(e.program.length)}}function x(e,t){return{success:!0,offset:e,value:t}}function b(e){return x(e,void 0)}function E(e,t,n=!1){return{success:!1,offset:e,expected:t,fatal:n}}function B(e){return(t,n)=>{const r=n+e.length;return t.slice(n,r)===e?x(r,e):E(n,[e])}}function N(e,t){return(n,r)=>{const a=e(n,r);return a.success?x(a.offset,t(a.value)):a}}function C(e,t,n){return(r,a)=>{const i=e(r,a);return i.success?t(i.value)?i:E(a,n):i.offset===a?E(a,n):i}}function T(e){return(t,n)=>{let r=null;for(const a of e){const e=a(t,n);if(e.success)return e;if(null===r||e.offset>r.offset?r=e:e.offset===r.offset&&(r.expected=r.expected.concat(e.expected)),e.fatal)break}return r||E(n,[])}}function I(e){return(t,n)=>{const r=e(t,n);return r.success||r.fatal?r:x(n,null)}}function O(e){return(t,n)=>{let r=[],a=n;for(;;){const n=e(t,a);if(!n.success){if(n.fatal)return n;break}r.push(n.value),a=n.offset}return x(a,r)}}function S(e,t,n){return(r,a)=>{const i=e(r,a);if(!i.success)return i;const o=t(r,i.offset);return o.success?x(o.offset,n(i.value,o.value)):o}}function R(e){return S(e,O(e),(e,t)=>[e].concat(t))}function D(e,t){return e}function M(e,t){return t}function G(e,t){return S(e,t,M)}function U(e,t){return S(e,t,D)}function F(e,t,n,r=!1){return G(e,r?H(U(t,n)):U(t,n))}function P(e,t){return(n,r)=>e(n,r).success?E(r,t):b(r)}function H(e){return(t,n)=>{const r=e(t,n);return r.success?r:E(r.offset,r.expected,!0)}}const j=(e,t)=>e.length===t?b(t):E(t,["end of input"]),X=["Lu","Ll","Lt","Lm","Lo","Mn","Mc","Me","Nd","Nl","No","Pc","Pd","Ps","Pe","Pi","Pf","Po","Zs","Zl","Zp","Sm","Sc","Sk","So","Cc","Cf","Co","Cn"],_={};function L(e){return e.codePointAt(0)}"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("").forEach((e,t)=>{_[e]=t});const k=e=>-1===e||-2===e;function q(e){return t=>!k(t)&&!e(t)}function V(e,t){return null===t?e:n=>e(n)&&!t(n)}const Y=function(e,t){const n=new Map;let r=0;return["BasicLatin","Latin-1Supplement","LatinExtended-A","LatinExtended-B","IPAExtensions","SpacingModifierLetters","CombiningDiacriticalMarks","GreekandCoptic|Greek","Cyrillic","CyrillicSupplement","Armenian","Hebrew","Arabic","Syriac","ArabicSupplement","Thaana","NKo","Samaritan","Mandaic","SyriacSupplement",null,"ArabicExtended-A","Devanagari","Bengali","Gurmukhi","Gujarati","Oriya","Tamil","Telugu","Kannada","Malayalam","Sinhala","Thai","Lao","Tibetan","Myanmar","Georgian","HangulJamo","Ethiopic","EthiopicSupplement","Cherokee","UnifiedCanadianAboriginalSyllabics","Ogham","Runic","Tagalog","Hanunoo","Buhid","Tagbanwa","Khmer","Mongolian","UnifiedCanadianAboriginalSyllabicsExtended","Limbu","TaiLe","NewTaiLue","KhmerSymbols","Buginese","TaiTham","CombiningDiacriticalMarksExtended","Balinese","Sundanese","Batak","Lepcha","OlChiki","CyrillicExtended-C","GeorgianExtended","SundaneseSupplement","VedicExtensions","PhoneticExtensions","PhoneticExtensionsSupplement","CombiningDiacriticalMarksSupplement","LatinExtendedAdditional","GreekExtended","GeneralPunctuation","SuperscriptsandSubscripts","CurrencySymbols","CombiningDiacriticalMarksforSymbols|CombiningMarksforSymbols","LetterlikeSymbols","NumberForms","Arrows","MathematicalOperators","MiscellaneousTechnical","ControlPictures","OpticalCharacterRecognition","EnclosedAlphanumerics","BoxDrawing","BlockElements","GeometricShapes","MiscellaneousSymbols","Dingbats","MiscellaneousMathematicalSymbols-A","SupplementalArrows-A","BraillePatterns","SupplementalArrows-B","MiscellaneousMathematicalSymbols-B","SupplementalMathematicalOperators","MiscellaneousSymbolsandArrows","Glagolitic","LatinExtended-C","Coptic","GeorgianSupplement","Tifinagh","EthiopicExtended","CyrillicExtended-A","SupplementalPunctuation","CJKRadicalsSupplement","KangxiRadicals",null,"IdeographicDescriptionCharacters","CJKSymbolsandPunctuation","Hiragana","Katakana","Bopomofo","HangulCompatibilityJamo","Kanbun","BopomofoExtended","CJKStrokes","KatakanaPhoneticExtensions","EnclosedCJKLettersandMonths","CJKCompatibility","CJKUnifiedIdeographsExtensionA","YijingHexagramSymbols","CJKUnifiedIdeographs","YiSyllables","YiRadicals","Lisu","Vai","CyrillicExtended-B","Bamum","ModifierToneLetters","LatinExtended-D","SylotiNagri","CommonIndicNumberForms","Phags-pa","Saurashtra","DevanagariExtended","KayahLi","Rejang","HangulJamoExtended-A","Javanese","MyanmarExtended-B","Cham","MyanmarExtended-A","TaiViet","MeeteiMayekExtensions","EthiopicExtended-A","LatinExtended-E","CherokeeSupplement","MeeteiMayek","HangulSyllables","HangulJamoExtended-B","HighSurrogates","HighPrivateUseSurrogates","LowSurrogates","PrivateUseArea|PrivateUse","CJKCompatibilityIdeographs","AlphabeticPresentationForms","ArabicPresentationForms-A","VariationSelectors","VerticalForms","CombiningHalfMarks","CJKCompatibilityForms","SmallFormVariants","ArabicPresentationForms-B","HalfwidthandFullwidthForms","Specials","LinearBSyllabary","LinearBIdeograms","AegeanNumbers","AncientGreekNumbers","AncientSymbols","PhaistosDisc",null,"Lycian","Carian","CopticEpactNumbers","OldItalic","Gothic","OldPermic","Ugaritic","OldPersian",null,"Deseret","Shavian","Osmanya","Osage","Elbasan","CaucasianAlbanian",null,"LinearA",null,"CypriotSyllabary","ImperialAramaic","Palmyrene","Nabataean",null,"Hatran","Phoenician","Lydian",null,"MeroiticHieroglyphs","MeroiticCursive","Kharoshthi","OldSouthArabian","OldNorthArabian",null,"Manichaean","Avestan","InscriptionalParthian","InscriptionalPahlavi","PsalterPahlavi",null,"OldTurkic",null,"OldHungarian","HanifiRohingya",null,"RumiNumeralSymbols",null,"OldSogdian","Sogdian",null,"Elymaic","Brahmi","Kaithi","SoraSompeng","Chakma","Mahajani","Sharada","SinhalaArchaicNumbers","Khojki",null,"Multani","Khudawadi","Grantha",null,"Newa","Tirhuta",null,"Siddham","Modi","MongolianSupplement","Takri",null,"Ahom",null,"Dogra",null,"WarangCiti",null,"Nandinagari","ZanabazarSquare","Soyombo",null,"PauCinHau",null,"Bhaiksuki","Marchen",null,"MasaramGondi","GunjalaGondi",null,"Makasar",null,"TamilSupplement","Cuneiform","CuneiformNumbersandPunctuation","EarlyDynasticCuneiform",null,"EgyptianHieroglyphs","EgyptianHieroglyphFormatControls",null,"AnatolianHieroglyphs",null,"BamumSupplement","Mro",null,"BassaVah","PahawhHmong",null,"Medefaidrin",null,"Miao",null,"IdeographicSymbolsandPunctuation","Tangut","TangutComponents",null,"KanaSupplement","KanaExtended-A","SmallKanaExtension","Nushu",null,"Duployan","ShorthandFormatControls",null,"ByzantineMusicalSymbols","MusicalSymbols","AncientGreekMusicalNotation",null,"MayanNumerals","TaiXuanJingSymbols","CountingRodNumerals",null,"MathematicalAlphanumericSymbols","SuttonSignWriting",null,"GlagoliticSupplement",null,"NyiakengPuachueHmong",null,"Wancho",null,"MendeKikakui",null,"Adlam",null,"IndicSiyaqNumbers",null,"OttomanSiyaqNumbers",null,"ArabicMathematicalAlphabeticSymbols",null,"MahjongTiles","DominoTiles","PlayingCards","EnclosedAlphanumericSupplement","EnclosedIdeographicSupplement","MiscellaneousSymbolsandPictographs","Emoticons","OrnamentalDingbats","TransportandMapSymbols","AlchemicalSymbols","GeometricShapesExtended","SupplementalArrows-C","SupplementalSymbolsandPictographs","ChessSymbols","SymbolsandPictographsExtended-A",null,"CJKUnifiedIdeographsExtensionB",null,"CJKUnifiedIdeographsExtensionC","CJKUnifiedIdeographsExtensionD","CJKUnifiedIdeographsExtensionE","CJKUnifiedIdeographsExtensionF",null,"CJKCompatibilityIdeographsSupplement",null,"Tags",null,"VariationSelectorsSupplement",null,"SupplementaryPrivateUseArea-A|PrivateUse","SupplementaryPrivateUseArea-B|PrivateUse"].forEach((e,a)=>{const i=t[a];null!==e&&e.split("|").forEach(e=>{const t=n.get(e),a=m(r,r+i-1);n.set(e,t?y(t,a):a)}),r+=i}),n}(0,[128,128,128,208,96,80,112,144,256,48,96,112,256,80,48,64,64,64,32,16,48,96,128,128,128,128,128,128,128,128,128,128,128,128,256,160,96,256,384,32,96,640,32,96,32,32,32,32,128,176,80,80,48,96,32,32,144,80,128,64,64,80,48,16,48,16,48,128,64,64,256,256,112,48,48,48,80,64,112,256,256,64,32,160,128,32,96,256,192,48,16,256,128,128,256,256,96,32,128,48,80,96,32,128,128,224,16,16,64,96,96,48,96,16,32,48,16,256,256,6592,64,20992,1168,64,48,320,96,96,32,224,48,16,64,96,32,48,48,32,96,32,96,32,96,32,48,64,80,64,11184,80,896,128,1024,6400,512,80,688,16,16,16,32,32,144,240,16,128,128,64,80,64,48,128,32,64,32,48,32,48,32,64,32,80,48,48,80,48,64,144,384,128,64,32,32,48,48,32,32,32,64,32,96,96,32,32,32,64,64,32,32,48,80,80,48,128,64,288,32,128,48,64,112,32,128,80,48,80,48,96,32,80,48,48,80,128,128,128,96,160,128,96,32,80,48,64,192,80,80,96,160,96,80,96,16,64,256,112,80,64,96,80,304,32,192,64,1024,128,208,2736,1072,16,4032,640,8576,576,48,96,48,144,688,96,96,160,64,32,6144,768,9472,256,48,64,400,2304,160,16,4944,256,256,80,144,32,96,32,128,1024,688,1360,48,208,80,368,64,1280,224,32,96,784,80,64,80,176,256,256,48,112,96,256,256,768,80,48,128,128,128,256,256,112,144,1280,42720,32,4160,224,5776,7488,3088,544,722400,128,128,240,65040,65536,65536]),Q=function(e){const t=new Map,n="bfUATCYATCPAQATAXATAOATBKJTBXCTBCZPATAQAZANAZADZPAXAQAXAbgUATAYDaATAZAaAGARAXAcAaAZAaAXAMBZADATBZAMAGASAMCTACWXACGDXXADHA3DAAPDAAtCAAFDBCAADCAABCCDBCCABCAABCCDCCAABCAAFCAADDAABCAABCBADCBDBGACADCGDCAEADACAEADACAEADAAPDAARDACAEADAABCBA7DFCAABCBDBABCCAJjDBAAGADaFRZDFLZNFEZGFAZAFAZQnvBAAADFAZACADABBFADCTACABDZBCATACCBACABACAABCQBACIDiCADBCCDCAXDDCADAXAABCBDBCyDvAhaAHEJBA1CAANDAgfBAABAClBBFATFDoTAOABBaBYABAHsOAHATAHBTAHBTAHABHGaBDGDTBBKcFXCTBYATBaBHKTAcABATBGfFAGJHUKJTDGBHAmiBAATAGAHGcAaAHFFBHBaAHDGBKJGCaBGATNBAcAGAHAGdHaBBmYBAAHKGABNKJGgHIFBaATCFABBHAYBGVHDFAHIFAHCFAHEBBTOBAGYHCBBTABAGKB0GUBAGHBUHOcAHfIAG1HAIAHAGAICHHIDHAIBGAHGGJHBTBKJTAFAGOHAIBBAGHBBGBBBGVBAGGBAGABCGDBBHAGAICHDBBIBBBIBHAGABHIABDGBBAGCHBBBKJGBYBMFaAYAGATAHABBHBIABAGFBDGBBBGVBAGGBAGBBAGBBAGBBBHABAICHBBDHBBBHCBCHABGGDBAGABGKJHBGCHATABJHBIABAGIBAGCBAGVBAGGBAGBBAGEBBHAGAICHEBAHBIABAIBHABBGABOGBHBBBKJTAYABGGAHFBAHAIBBAGHBBGBBBGVBAGGBAGBBAGEBBHAGAIAHAIAHDBBIBBBIBHABHHAIABDGBBAGCHBBBKJaAGAMFBJHAGABAGFBCGCBAGDBCGBBAGABAGBBCGBBCGCBCGLBDIBHAIBBCICBAICHABBGABFIABNKJMCaFYAaABEHAICHAGHBAGCBAGWBAGPBCGAHCIDBAHCBAHDBGHBBAGCBEGBHBBBKJBGTAMGaAGAHAIBTAGHBAGCBAGWBAGJBAGEBBHAGAIAHAIEBAHAIBBAIBHBBGIBBGGABAGBHBBBKJBAGBBMHBIBBAGHBAGCBAGoHBGAICHDBAICBAICHAGAaABDGCIAMGGCHBBBKJMIaAGFBBIBBAGRBCGXBAGIBAGABBGGBCHABDICHCBAHABAIHBFKJBBIBTABLGvHAGBHGBDYAGFFAHHTAKJTBBkGBBAGABAGEBAGXBAGABAGJHAGBHIGABBGEBAFABAHFBBKJBBGDBfGAaCTOaATAaCHBaFKJMJaAHAaAHAaAHAPAQAPAQAIBGHBAGjBDHNIAHETAHBGEHKBAHjBAaHHAaFBAaBTEaDTBBkGqIBHDIAHFIAHBIBHBGAKJTFGFIBHBGDHCGAICGBIGGCHDGMHAIBHBIFHAGAIAKJICHAaBClBACABECABBDqTAFADCmIFAABAGDBBGGBAGABAGDBBGoBAGDBBGgBAGDBBGGBAGABAGDBBGOBAG4BAGDBBmCBAABBHCTIMTBCGPaJBFiVBAABBDFBBOAmrJAAaATAGQUAGZPAQABCmKBAATCLCGHBGGMBAGDHCBKGRHCTBBIGRHBBLGMBAGCBAHBBLGzHBIAHGIHHAIBHKTCFATCYAGAHABBKJBFMJBFTFOATDHCcABAKJBFGiFAG0BGGEHBGhHAGABEmFBAABJGeBAHCIDHBICBDIBHAIFHCBDaABCTBKJGdBBGEBKGrBDGZBFKJMABCahGWHBIBHABBTBG0IAHAIAHGBAHAIAHAIBHHIFHJBBHAKJBFKJBFTGFATFBBHNJAhABAAHDIAGuHAIAHEIAHAIEHAIBGGBDKJTGaJHIaIBCHBIAGdIAHDIBHBIAHCGBKJGrHAIAHBICHAIAHCIBBHTDGjIHHHIBHBBCTEKJBCGCKJGdFFTBDIBGCqBBCCTHBHHCTAHMIAHGGDHAGFHAGBIAHBGABEDrF+DMFADhFkH5BAHEgVCAADHghBAADHCHDFBBCFBBDHCHDHCHDFBBCFBBDHBACABACABACABACADHCHDNBBDHEHDHEHDHEHDEBADBCDEAZADAZCDCBADBCDEAZCDDBBDBCDBAZCDHCEZCBBDCBADBCDEAZBBAUKcEOFTBRASAPARBSAPARATHVAWAcEUATIRASATDNBTCXAPAQATKXATANATJUAcEBAcJMAFABBMFXCPAQAFAMJXCPAQABAFMBCYfBPHMJDHAJCHLBOaBCAaDCAaBDACCDBCCDAaACAaBXACEaFCAaACAaACAaACDaADACDDAGDDAaBDBCBXECADDaAXAaBDAaAMPLiCADALDMAaBBDXEaEXBaDXAaBXAaBXAaGXAaeXBaBXAaAXAae3LEAAaHPAQAPAQAaTXBaGPAQA6QBAAXAadXYanXF6EBAABYaKBUM76NBAAMV62CAAXAaIXAa1XH6uBAAXA63DAAPAQAPAQAPAQAPAQAPAQAPAQAPAQAMdarXEPAQAXePAQAPAQAPAQAPAQAPAQAXP6/DAA3CCAAPAQAPAQAPAQAPAQAPAQAPAQAPAQAPAQAPAQAPAQAPAQAX+PAQAPAQAXfPAQA3BEAAavXUaBXFamBBafBB6nBAACuBADuBAABCCDBAFCCADDACADFFBCBgjBAADAaFADHCCADABETDMATBDlBADABEDABBG3BGFATABNHAGWBIGGBAGGBAGGBAGGBAGGBAGGBAGGBAGGBAHfTBRASARASATCRASATARASATIOATBOATARASATBRASAPAQAPAQAPAQAPAQATEFATJOBTDOATAPATMBvaZBA6YBAABL6VDAABZaLBDUATCaAFAGALAPAQAPAQAPAQAPAQAPAQAaBPAQAPAQAPAQAPAQAOAPAQBaALIHDIBOAFEaBLCFAGATAaBBAmVBAABBHBZBFBGAOAmZBAATAFCGABEGqBAmdBAABAaBMDaJGaBEajBLGPaeBAMJadMHaAMOafMJamMO6/EAAm1mBABJa/mvHFABPGUFAm2RAABCa2BIGnFFTBmLEAAFATCGPKJGBBTAtGAHAJCTAHJTAFAAbFBHBmFBAALJHBTFBHZWFIZBANDBA9FADHADCAAJFAZBADGAADDBATCDABCDALBBABCCBvGAFBDAGGHAGCHAGDHAGWIBHBIAaDBDMFaBYAaABFGzTDBHIBGxIPHBBHTBKJBFHRGFTCGATAGBHAKJGbHHTBGWHKIBBKTAGcBCHCIAGuHAIBHDIBHBICTMBAFAKJBDTBGEHAFAGIKJGEBAGoHFIBHBIBHBBIGCHAGHHAIABBKJBBTDGPFAGFaCGAIAHAIAGxHAGAHCGBHBGEHBGAHAGABXGBFATBGKIAHBIBTBGAFBIAHABJGFBBGFBBGFBIGGBAGGBADqZAFDDHBHjPBAAGiIBHAIBHAIBTAIAHABBKJBFmjuCABLGWBDGwhDgAA9/jBAmtFAABBmpBAABlDGBLDEBEGAHAGJXAGMBAGEBAGABAGBBAGBBAmrBAAZPBQmqFAAQAPABPG/BBG1BnGLYAaABBHPTGPAQATABFHPTAOBNBPAQAPAQAPAQAPAQAPAQAPAQAPAQAPAQATBPAQATDNCTCBATDOAPAQAPAQAPAQATCXAOAXCBATAYATBBDGEBAmGCAABBcABATCYATCPAQATAXATAOATBKJTBXCTBCZPATAQAZANAZADZPAXAQAXAPAQATAPAQATBGJFAGsFBGeBCGFBBGFBBGFBBGCBCYBXAZAaAYBBAaAXDaBBJcCaBBBGLBAGZBAGSBAGBBAGOBBGNBhm6BAABETCBDMsBCaIL0MDaQMBaCBAaLBDaABuasHAhBCAAGcBCGwBOHAMaBDGfMDBIGTLAGHLABEGlHEBEGdBATAGjBDGHTALEBpCnDnmNBAABBKJBFCjBDDjBDGnBHGzBKTAhPCAAm2EAABIGVBJGHhXCAAGFBBGABAGrBAGBBCGABBGWBATAMHGWaBMGGeBHMIBvGSBAGBBEMEGVMFBCTAGZBETAB/G3BDMBGBMPBBMtGAHCBAHBBEHDGDBAGCBAGcBBHCBDHAMIBGTIBGGcMBTAGcMCBfGHaAGbHBBDMETGBIG1BCTGGVBBMHGSBEMHGRBGTDBLMGhPBAAmIBAAB2CyBMDyBGMFGjHDBHKJhlEAAMehACAAGcMJGABHGVHKMDTEhFCAAGWBIIAHAIAG0HOTGBDMTKJBOHCIAGsICHDIBHBTBcATDBKcABBGYBGKJBFHCGjHEIAHHBAKJTDGAIBBIGiHATBGABIHBIAGvICHIIBGDTDHDTABBKJGATAGATCBAMTBKGRBAGYICHCIBHAIAHBTFHAhABAAGGBAGABAGDBAGOBAGJTABFGuHAICHHBEKJBFHBIBBAGHBBGBBBGVBAGGBAGBBAGEBAHBGAIBHAIDBBIBBBICBBGABFIABEGEIBBBHGBCHEhKCAAG0ICHHIBHCIAHAGDTEKJBATABATAHAGABfGvICHFIAHAIDHBIAHBGBTAGABHKJhlCAAGuICHDBBIDHBIAHBTWGDHBBhGvICHHIBHAIAHBTCGABKKJBFTMBSGqHAIAHAIBHFIAHAGABGKJB1GaBBHCIBHDIAHEBDKJMBTCaAh/CAAGrICHIIAHBTAhjBAACfDfKJMIBLGAhfCAAGHBBGmICHDBBHBIDHAGATAGAIABaGAHJGnHFIAGAHDTHHABHGAHFIBHCGtHMIAHBTCGATEBcG4hGEAAGIBAGkIAHGBAHFIAHAGATEBJKJMSBCTBGdBBHVBAIAHGIAHBIAHBhIBAAGGBAGBBAGlHFBCHABAHBBAHGGAHABHKJBFGFBAGBBAGfIEBAHBBAIBHAIAHAGABGKJh1EAAGSHBIBTBhGDAAMUaHYDaQBMTAmZOAAhlBAAruBAABATEBKmDDAAh7qAAmuQAABAcIhG/AAmGJAAh4GCAm4IAABGGeBAKJBDTBhfBAAGdBBHETABJGvHGTEaDFDTAaABJKJBAMGBAGUBEGShvKAACfDfMWTDhkBAAmKBAABDHAGAI2BGHDFMB/FBTAFABbm3fBABHmyLAAhMUCAmeEAABwGCBQGDBHmLGAAhDkAAmqBAABEGMBCGIBGGJBBaAHBTAcDhbNBA61DAABJamBBa7IBHCaCIFcHHHaBHGadHDa6BW6BBAAHCaAhZCAAMTBL6WBAABIMYhGCAACZDZCZDGBADRCZDZCABACBBBCABBCBBBCDBACHDDBADABADGBADKCZDZCBBACDBBCHBACGBADZCBBACDBACEBACABCCGBADZCZDZCZDZCZDZCZDZCZDZCZDbBBCYXADYXADFCYXADYXADFCYXADYXADFCYXADYXADFCYXADYXADFCADABBKx6/HAAH2aDHxaHHAaNHAaBTEBOHEBAHOhPVAAHGBAHQBBHGBAHBBAHEhUDAAGsBCHGFGBBKJBDGAaAhvFAAGrHDKJBEYAh/TAAmEDAABBMIHGBoChDhHGFABDKJBDTBhQMAAM6aAMCYAMDhLBAAMsaAMOhBDAAGDBAGaBAGBBAGABBGABAGJBAGDBAGABAGABFGABDGABAGABAGABAGCBAGBBAGABBGABAGABAGABAGABAGABAGBBAGABBGDBAGGBAGDBAGDBAGABAGJBAGQBEGCBAGEBAGQBzXBhNEAAarBD6jBAABLaOBBaOBAaOBAakBJMMBC6cBAABCa8B4acBMarBDaIBGaBBNaFhZCAA66DAAZE6VLAABJaMBCaKBE6zBAABL6YBAABGaLBTaLBDa3BHaJBFanBHadhRBAAaLBA6kBAABAaDBCaoBBaFBCacBB6GCAABLaNBBaDBDaCBEaCBMaFhpVAAmWbKABom0ABABKmdDAABBmBaBABNmw0BAhewAAmdIAAhiXwCcABd8fBAAh/BAAnvDAAhP4PA99/PABB99/PA".split(""),r=X.map(()=>[]);let a=0,i=0;for(;i<n.length;){const e=_[n[i]],t=(31&e)-2;let o=1+_[n[i+1]];switch(32&e?(o+=_[n[i+2]]<<6,o+=_[n[i+3]]<<12,o+=_[n[i+4]]<<18,i+=5):i+=2,t){case-2:{let e=0;for(let t=a;t<a+o;++t)r[e].push(d(t)),e=(e+1)%2;break}case-1:break;default:{const e=r[t];1===o?e.push(d(a)):e.push(m(a,a+o-1));break}}a+=o}const o=new Map;return X.forEach((e,n)=>{const a=r[n].reduce(y,g);t.set(e,a);const i=e.charAt(0),s=o.get(i)||[];o.set(i,s),s.push(a)}),o.forEach((e,n)=>{t.set(n,e.reduce(y,g))}),t}();function J(e){return 32===e||9===e||10===e||13===e}const K=[d(L(":")),m(L("A"),L("Z")),d(L("_")),m(L("a"),L("z")),m(192,214),m(216,246),m(192,214),m(216,246),m(248,767),m(880,893),m(895,8191),m(8204,8205),m(8304,8591),m(11264,12271),m(12289,55295),m(63744,64975),m(65008,65533),m(65536,983039)].reduce(y),z=[K,d(L("-")),d(L(".")),m(L("0"),L("9")),d(183),m(768,879),m(8255,8256)].reduce(y),W=Q.get("Nd"),Z=q(W),$=V(m(0,1114111),[Q.get("P"),Q.get("Z"),Q.get("C")].reduce(y)),ee=q($);function te(e){return 10!==e&&13!==e&&!k(e)}const ne={s:J,S:q(J),i:K,I:q(K),c:z,C:q(z),d:W,D:Z,w:$,W:ee},re=B("*"),ae=B("\\"),ie=B("{"),oe=B("}"),se=B("["),ue=B("]"),le=B("^"),ce=B("$"),he=B(","),pe=B("-"),fe=B("("),de=B(")"),me=B("."),ve=B("|"),ge=B("+"),ye=B("?"),we=B("-["),Ae=L("0");function xe(e){function t(e){return new Set(e.split("").map(e=>L(e)))}function n(e,t){const n=e.codePointAt(t);return void 0===n?E(t,["any character"]):x(t+String.fromCodePoint(n).length,n)}const r="xpath"===e.language?G(ae,T([N(B("n"),()=>10),N(B("r"),()=>13),N(B("t"),()=>9),N(T([ae,ve,me,pe,le,ye,re,ge,ie,oe,ce,fe,de,se,ue]),e=>L(e))])):G(ae,T([N(B("n"),()=>10),N(B("r"),()=>13),N(B("t"),()=>9),N(T([ae,ve,me,pe,le,ye,re,ge,ie,oe,fe,de,se,ue]),e=>L(e))]));function a(e,r){const a=t(r);return S(B(e),I(C(n,e=>a.has(e),r.split(""))),(e,t)=>function(e){const t=Q.get(e);if(null==t)throw new Error(e+" is not a valid unicode category");return t}(null===t?e:e+String.fromCodePoint(t)))}const i=T([a("L","ultmo"),a("M","nce"),a("N","dlo"),a("P","cdseifo"),a("Z","slp"),a("S","mcko"),a("C","cfon")]),o=[m(L("a"),L("z")),m(L("A"),L("Z")),m(L("0"),L("9")),d(45)].reduce(y),s=T([i,N(G(B("Is"),function(e){return(t,n)=>{const r=e(t,n);return r.success?x(r.offset,t.slice(n,r.offset)):r}}(R(C(n,o,["block identifier"])))),t=>function(e,t){const n=Y.get(e);if(void 0===n){if(t)return v;throw new Error(`The unicode block identifier "${e}" is not known.`)}return n}(t,"xpath"!==e.language))]),u=F(B("\\p{"),s,oe,!0),l=N(F(B("\\P{"),s,oe,!0),q),c=G(ae,N(T("sSiIcCdDwW".split("").map(e=>B(e))),e=>ne[e])),h=N(me,()=>te),p=T([c,u,l]),f=t("\\[]"),g=T([r,C(n,e=>!f.has(e),["unescaped character"])]),w=T([N(pe,()=>null),g]),A=S(w,G(pe,w),m);function b(e,t){return[e].concat(t||[])}const M=N(function(e){return(t,n)=>{const r=e(t,n);return r.success?x(n,r.value):r}}(T([ue,we])),()=>null),X=L("-"),_=T([N(U(U(pe,P(se,["not ["])),M),()=>X),G(P(pe,["not -"]),g)]),k=T([S(N(_,d),T([function(e,t){return k(e,t)},M]),b),S(T([A,p]),T([K,M]),b)]),J=T([S(N(g,d),T([k,M]),b),S(T([A,p]),T([K,M]),b)]);function K(e,t){return J(e,t)}const z=N(J,e=>e.reduce(y)),W=N(G(le,z),q),Z=S(T([G(P(le,["not ^"]),z),W]),I(G(pe,(function(e,t){return $(e,t)}))),V),$=F(se,Z,ue,!0),ee="xpath"===e.language?T([N(r,d),p,$,h,N(le,()=>e=>-1===e),N(ce,()=>e=>-2===e)]):T([N(r,d),p,$,h]),xe="xpath"===e.language?t(".\\?*+{}()|^$[]"):t(".\\?*+{}()|[]"),be=C(n,e=>!xe.has(e),["NormalChar"]),Ee=N(G(ae,S(N(C(n,m(L("1"),L("9")),["digit"]),e=>e-Ae),O(N(C(n,m(Ae,L("9")),["digit"]),e=>e-Ae)),(e,t)=>{t.reduce((e,t)=>10*e+t,e)})),e=>{throw new Error("Backreferences in XPath patterns are not yet implemented.")}),Be="xpath"===e.language?T([N(be,e=>({kind:"predicate",value:d(e)})),N(ee,e=>({kind:"predicate",value:e})),N(F(fe,G(I(B("?:")),Se),de,!0),e=>({kind:"regexp",value:e})),Ee]):T([N(be,e=>({kind:"predicate",value:d(e)})),N(ee,e=>({kind:"predicate",value:e})),N(F(fe,Se,de,!0),e=>({kind:"regexp",value:e}))]),Ne=N(R(N(C(n,m(Ae,L("9")),["digit"]),e=>e-Ae)),e=>e.reduce((e,t)=>10*e+t)),Ce=T([S(Ne,G(he,Ne),(e,t)=>{if(t<e)throw new Error("quantifier range is in the wrong order");return{min:e,max:t}}),S(Ne,he,e=>({min:e,max:null})),N(Ne,e=>({min:e,max:e}))]),Te="xpath"===e.language?S(T([N(ye,()=>({min:0,max:1})),N(re,()=>({min:0,max:null})),N(ge,()=>({min:1,max:null})),F(ie,Ce,oe,!0)]),I(ye),(e,t)=>e):T([N(ye,()=>({min:0,max:1})),N(re,()=>({min:0,max:null})),N(ge,()=>({min:1,max:null})),F(ie,Ce,oe,!0)]),Ie=O(S(Be,N(I(Te),e=>null===e?{min:1,max:1}:e),(e,t)=>[e,t])),Oe=S(Ie,O(G(ve,H(Ie))),(e,t)=>[e].concat(t));function Se(e,t){return Oe(e,t)}const Re=function(e){return S(e,j,D)}(Oe);return function(e){let t;try{t=Re(e,0)}catch(t){throw new Error(`Error parsing pattern "${e}": ${t.message}`)}return t.success?t.value:function(e,t,n){const r=n.map(e=>`"${e}"`);throw new Error(`Error parsing pattern "${e}" at offset ${t}: expected ${r.length>1?"one of "+r.join(", "):r[0]} but found "${e.slice(t,t+1)}"`)}(e,t.offset,t.expected)}}function be(e){return[...e].map(e=>e.codePointAt(0))}const Ee=function(e){const t={};var n;function r(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}var a="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){return e==Array.prototype||e==Object.prototype||(e[t]=n.value),e};var i=function(e){e=["object"==typeof globalThis&&globalThis,e,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var t=0;t<e.length;++t){var n=e[t];if(n&&n.Math==Math)return n}throw Error("Cannot find global object")}(this);function o(e,t){if(t)e:{var n=i;e=e.split(".");for(var r=0;r<e.length-1;r++){var o=e[r];if(!(o in n))break e;n=n[o]}(t=t(r=n[e=e[e.length-1]]))!=r&&null!=t&&a(n,e,{configurable:!0,writable:!0,value:t})}}function s(e){return(e={next:e})[Symbol.iterator]=function(){return this},e}function u(e){var t="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];return t?t.call(e):{next:r(e)}}function l(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function c(e){return e instanceof Array?e:l(u(e))}o("Symbol",(function(e){function t(e,t){this.h=e,a(this,"description",{configurable:!0,writable:!0,value:t})}if(e)return e;t.prototype.toString=function(){return this.h};var n=0;return function e(r){if(this instanceof e)throw new TypeError("Symbol is not a constructor");return new t("jscomp_symbol_"+(r||"")+"_"+n++,r)}})),o("Symbol.iterator",(function(e){if(e)return e;e=Symbol("Symbol.iterator");for(var t="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),n=0;n<t.length;n++){var o=i[t[n]];"function"==typeof o&&"function"!=typeof o.prototype[e]&&a(o.prototype,e,{configurable:!0,writable:!0,value:function(){return s(r(this))}})}return e})),o("Symbol.asyncIterator",(function(e){return e||Symbol("Symbol.asyncIterator")}));var h,p="function"==typeof Object.create?Object.create:function(e){function t(){}return t.prototype=e,new t};if("function"==typeof Object.setPrototypeOf)h=Object.setPrototypeOf;else{var f;e:{var d={};try{d.__proto__={a:!0},f=d.a;break e}catch(e){}f=!1}h=f?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw new TypeError(e+" is not extensible");return e}:null}var m=h;function v(e,t){if(e.prototype=p(t.prototype),e.prototype.constructor=e,m)m(e,t);else for(var n in t)if("prototype"!=n)if(Object.defineProperties){var r=Object.getOwnPropertyDescriptor(t,n);r&&Object.defineProperty(e,n,r)}else e[n]=t[n];e.Bc=t.prototype}function g(){this.J=!1,this.o=null,this.v=void 0,this.h=1,this.N=0,this.B=null}function y(e){if(e.J)throw new TypeError("Generator is already running");e.J=!0}function w(e,t){e.B={kc:t,nc:!0},e.h=e.N}function A(e){this.h=new g,this.o=e}function x(e,t,n,r){try{var a=t.call(e.h.o,n);if(!(a instanceof Object))throw new TypeError("Iterator result "+a+" is not an object");if(!a.done)return e.h.J=!1,a;var i=a.value}catch(t){return e.h.o=null,w(e.h,t),b(e)}return e.h.o=null,r.call(e.h,i),b(e)}function b(e){for(;e.h.h;)try{var t=e.o(e.h);if(t)return e.h.J=!1,{value:t.value,done:!1}}catch(t){e.h.v=void 0,w(e.h,t)}if(e.h.J=!1,e.h.B){if(t=e.h.B,e.h.B=null,t.nc)throw t.kc;return{value:t.return,done:!0}}return{value:void 0,done:!0}}function E(e){this.next=function(t){return y(e.h),e.h.o?t=x(e,e.h.o.next,t,e.h.C):(e.h.C(t),t=b(e)),t},this.throw=function(t){return y(e.h),e.h.o?t=x(e,e.h.o.throw,t,e.h.C):(w(e.h,t),t=b(e)),t},this.return=function(t){return function(e,t){y(e.h);var n=e.h.o;return n?x(e,"return"in n?n.return:function(e){return{value:e,done:!0}},t,e.h.return):(e.h.return(t),b(e))}(e,t)},this[Symbol.iterator]=function(){return this}}function B(e,t){return Object.prototype.hasOwnProperty.call(e,t)}g.prototype.C=function(e){this.v=e},g.prototype.return=function(e){this.B={return:e},this.h=this.N},o("Promise",(function(e){function t(e){this.o=0,this.B=void 0,this.h=[],this.N=!1;var t=this.J();try{e(t.resolve,t.reject)}catch(e){t.reject(e)}}function n(){this.h=null}function r(e){return e instanceof t?e:new t((function(t){t(e)}))}if(e)return e;n.prototype.o=function(e){if(null==this.h){this.h=[];var t=this;this.B((function(){t.v()}))}this.h.push(e)};var a=i.setTimeout;n.prototype.B=function(e){a(e,0)},n.prototype.v=function(){for(;this.h&&this.h.length;){var e=this.h;this.h=[];for(var t=0;t<e.length;++t){var n=e[t];e[t]=null;try{n()}catch(e){this.J(e)}}}this.h=null},n.prototype.J=function(e){this.B((function(){throw e}))},t.prototype.J=function(){function e(e){return function(r){n||(n=!0,e.call(t,r))}}var t=this,n=!1;return{resolve:e(this.mb),reject:e(this.v)}},t.prototype.mb=function(e){if(e===this)this.v(new TypeError("A Promise cannot resolve to itself"));else if(e instanceof t)this.wb(e);else{e:switch(typeof e){case"object":var n=null!=e;break e;case"function":n=!0;break e;default:n=!1}n?this.ua(e):this.C(e)}},t.prototype.ua=function(e){var t=void 0;try{t=e.then}catch(e){return void this.v(e)}"function"==typeof t?this.Wb(t,e):this.C(e)},t.prototype.v=function(e){this.ka(2,e)},t.prototype.C=function(e){this.ka(1,e)},t.prototype.ka=function(e,t){if(0!=this.o)throw Error("Cannot settle("+e+", "+t+"): Promise already settled in state"+this.o);this.o=e,this.B=t,2===this.o&&this.vb(),this.na()},t.prototype.vb=function(){var e=this;a((function(){if(e.Ya()){var t=i.console;void 0!==t&&t.error(e.B)}}),1)},t.prototype.Ya=function(){if(this.N)return!1;var e=i.CustomEvent,t=i.Event,n=i.dispatchEvent;return void 0===n||("function"==typeof e?e=new e("unhandledrejection",{cancelable:!0}):"function"==typeof t?e=new t("unhandledrejection",{cancelable:!0}):(e=i.document.createEvent("CustomEvent")).initCustomEvent("unhandledrejection",!1,!0,e),e.promise=this,e.reason=this.B,n(e))},t.prototype.na=function(){if(null!=this.h){for(var e=0;e<this.h.length;++e)o.o(this.h[e]);this.h=null}};var o=new n;return t.prototype.wb=function(e){var t=this.J();e.nb(t.resolve,t.reject)},t.prototype.Wb=function(e,t){var n=this.J();try{e.call(t,n.resolve,n.reject)}catch(e){n.reject(e)}},t.prototype.then=function(e,n){function r(e,t){return"function"==typeof e?function(t){try{a(e(t))}catch(e){i(e)}}:t}var a,i,o=new t((function(e,t){a=e,i=t}));return this.nb(r(e,a),r(n,i)),o},t.prototype.catch=function(e){return this.then(void 0,e)},t.prototype.nb=function(e,t){function n(){switch(r.o){case 1:e(r.B);break;case 2:t(r.B);break;default:throw Error("Unexpected state: "+r.o)}}var r=this;null==this.h?o.o(n):this.h.push(n),this.N=!0},t.resolve=r,t.reject=function(e){return new t((function(t,n){n(e)}))},t.race=function(e){return new t((function(t,n){for(var a=u(e),i=a.next();!i.done;i=a.next())r(i.value).nb(t,n)}))},t.all=function(e){var n=u(e),a=n.next();return a.done?r([]):new t((function(e,t){function i(t){return function(n){o[t]=n,0==--s&&e(o)}}var o=[],s=0;do{o.push(void 0),s++,r(a.value).nb(i(o.length-1),t),a=n.next()}while(!a.done)}))},t}));var N="function"==typeof Object.assign?Object.assign:function(e,t){for(var n=1;n<arguments.length;n++){var r=arguments[n];if(r)for(var a in r)B(r,a)&&(e[a]=r[a])}return e};function C(e,t,n){if(null==e)throw new TypeError("The 'this' value for String.prototype."+n+" must not be null or undefined");if(t instanceof RegExp)throw new TypeError("First argument to String.prototype."+n+" must not be a regular expression");return e+""}function T(e,t){return e=void 0!==e?String(e):" ",0<t&&e?e.repeat(Math.ceil(t/e.length)).substring(0,t):""}function I(e,t,n){e instanceof String&&(e=String(e));for(var r=e.length,a=0;a<r;a++){var i=e[a];if(t.call(n,i,a,e))return{Hb:a,Pb:i}}return{Hb:-1,Pb:void 0}}function O(e){return e||Array.prototype.fill}function S(e,t){e instanceof String&&(e+="");var n=0,r=!1,a={next:function(){if(!r&&n<e.length){var a=n++;return{value:t(a,e[a]),done:!1}}return r=!0,{done:!0,value:void 0}}};return a[Symbol.iterator]=function(){return a},a}function R(e,t){if(!("0"!==e&&"-0"!==e||"0"!==t&&"-0"!==t))return 0;var n=/(?:\+|(-))?(\d+)?(?:\.(\d+))?/;e=n.exec(e+"");var r=n.exec(t+""),a=!e[1],i=!r[1];return t=(e[2]||"").replace(/^0*/,""),n=(r[2]||"").replace(/^0*/,""),e=e[3]||"",r=r[3]||"",a&&!i?1:!a&&i?-1:(a=a&&i,t.length>n.length?a?1:-1:t.length<n.length?a?-1:1:t>n?a?1:-1:t<n?a?-1:1:(t=Math.max(e.length,r.length),(n=e.padEnd(t,"0"))>(t=r.padEnd(t,"0"))?a?1:-1:n<t?a?-1:1:0))}function D(e,t){return!(-1<(e=e.toString()).indexOf(".")&&0===t)&&(!(e=/^[-+]?0*([1-9]\d*)?(?:\.((?:\d*[1-9])*)0*)?$/.exec(e))[2]||e[2].length<=t)}function M(e,t){switch(t){case"required":return/(Z)|([+-])([01]\d):([0-5]\d)$/.test(e.toString());case"prohibited":return!/(Z)|([+-])([01]\d):([0-5]\d)$/.test(e.toString());case"optional":return!0}}function G(e){switch(e){case 1:case 0:case 6:case 3:return{};case 4:return{la:D,ra:function(e,t){return 1>R(e,t)},zc:function(e,t){return 0>R(e,t)},sa:function(e,t){return-1<R(e,t)},Ac:function(e,t){return 0<R(e,t)}};case 18:return{};case 9:case 8:case 7:case 11:case 12:case 13:case 15:case 14:return{xa:M};case 22:case 21:case 20:case 23:case 44:return{};default:return null}}o("Object.assign",(function(e){return e||N})),o("String.prototype.repeat",(function(e){return e||function(e){var t=C(this,null,"repeat");if(0>e||1342177279<e)throw new RangeError("Invalid count value");e|=0;for(var n="";e;)1&e&&(n+=t),(e>>>=1)&&(t+=t);return n}})),o("String.prototype.padEnd",(function(e){return e||function(e,t){var n=C(this,null,"padStart");return n+T(t,e-n.length)}})),o("WeakMap",(function(e){function t(e){if(this.h=(l+=Math.random()+1).toString(),e){e=u(e);for(var t;!(t=e.next()).done;)t=t.value,this.set(t[0],t[1])}}function n(){}function r(e){var t=typeof e;return"object"===t&&null!==e||"function"===t}function i(e){if(!B(e,s)){var t=new n;a(e,s,{value:t})}}function o(e){var t=Object[e];t&&(Object[e]=function(e){return e instanceof n?e:(Object.isExtensible(e)&&i(e),t(e))})}if(function(){if(!e||!Object.seal)return!1;try{var t=Object.seal({}),n=Object.seal({}),r=new e([[t,2],[n,3]]);return 2==r.get(t)&&3==r.get(n)&&(r.delete(t),r.set(n,4),!r.has(t)&&4==r.get(n))}catch(e){return!1}}())return e;var s="$jscomp_hidden_"+Math.random();o("freeze"),o("preventExtensions"),o("seal");var l=0;return t.prototype.set=function(e,t){if(!r(e))throw Error("Invalid WeakMap key");if(i(e),!B(e,s))throw Error("WeakMap key fail: "+e);return e[s][this.h]=t,this},t.prototype.get=function(e){return r(e)&&B(e,s)?e[s][this.h]:void 0},t.prototype.has=function(e){return r(e)&&B(e,s)&&B(e[s],this.h)},t.prototype.delete=function(e){return!!(r(e)&&B(e,s)&&B(e[s],this.h))&&delete e[s][this.h]},t})),o("Map",(function(e){function t(){var e={};return e.Ba=e.next=e.head=e}function n(e,t){var n=e.h;return s((function(){if(n){for(;n.head!=e.h;)n=n.Ba;for(;n.next!=n.head;)return n=n.next,{done:!1,value:t(n)};n=null}return{done:!0,value:void 0}}))}function r(e,t){var n=t&&typeof t;"object"==n||"function"==n?i.has(t)?n=i.get(t):(n=""+ ++o,i.set(t,n)):n="p_"+t;var r=e.o[n];if(r&&B(e.o,n))for(e=0;e<r.length;e++){var a=r[e];if(t!=t&&a.key!=a.key||t===a.key)return{id:n,list:r,index:e,ja:a}}return{id:n,list:r,index:-1,ja:void 0}}function a(e){if(this.o={},this.h=t(),this.size=0,e){e=u(e);for(var n;!(n=e.next()).done;)n=n.value,this.set(n[0],n[1])}}if(function(){if(!e||"function"!=typeof e||!e.prototype.entries||"function"!=typeof Object.seal)return!1;try{var t=Object.seal({x:4}),n=new e(u([[t,"s"]]));if("s"!=n.get(t)||1!=n.size||n.get({x:4})||n.set({x:4},"t")!=n||2!=n.size)return!1;var r=n.entries(),a=r.next();return!a.done&&a.value[0]==t&&"s"==a.value[1]&&!((a=r.next()).done||4!=a.value[0].x||"t"!=a.value[1]||!r.next().done)}catch(e){return!1}}())return e;var i=new WeakMap;a.prototype.set=function(e,t){var n=r(this,e=0===e?0:e);return n.list||(n.list=this.o[n.id]=[]),n.ja?n.ja.value=t:(n.ja={next:this.h,Ba:this.h.Ba,head:this.h,key:e,value:t},n.list.push(n.ja),this.h.Ba.next=n.ja,this.h.Ba=n.ja,this.size++),this},a.prototype.delete=function(e){return!(!(e=r(this,e)).ja||!e.list)&&(e.list.splice(e.index,1),e.list.length||delete this.o[e.id],e.ja.Ba.next=e.ja.next,e.ja.next.Ba=e.ja.Ba,e.ja.head=null,this.size--,!0)},a.prototype.clear=function(){this.o={},this.h=this.h.Ba=t(),this.size=0},a.prototype.has=function(e){return!!r(this,e).ja},a.prototype.get=function(e){return(e=r(this,e).ja)&&e.value},a.prototype.entries=function(){return n(this,(function(e){return[e.key,e.value]}))},a.prototype.keys=function(){return n(this,(function(e){return e.key}))},a.prototype.values=function(){return n(this,(function(e){return e.value}))},a.prototype.forEach=function(e,t){for(var n,r=this.entries();!(n=r.next()).done;)n=n.value,e.call(t,n[1],n[0],this)},a.prototype[Symbol.iterator]=a.prototype.entries;var o=0;return a})),o("Array.prototype.find",(function(e){return e||function(e,t){return I(this,e,t).Pb}})),o("String.prototype.startsWith",(function(e){return e||function(e,t){var n=C(this,e,"startsWith"),r=n.length,a=e.length;t=Math.max(0,Math.min(0|t,n.length));for(var i=0;i<a&&t<r;)if(n[t++]!=e[i++])return!1;return i>=a}})),o("Array.prototype.fill",(function(e){return e||function(e,t,n){var r=this.length||0;for(0>t&&(t=Math.max(0,r+t)),(null==n||n>r)&&(n=r),0>(n=Number(n))&&(n=Math.max(0,r+n)),t=Number(t||0);t<n;t++)this[t]=e;return this}})),o("Int8Array.prototype.fill",O),o("Uint8Array.prototype.fill",O),o("Uint8ClampedArray.prototype.fill",O),o("Int16Array.prototype.fill",O),o("Uint16Array.prototype.fill",O),o("Int32Array.prototype.fill",O),o("Uint32Array.prototype.fill",O),o("Float32Array.prototype.fill",O),o("Float64Array.prototype.fill",O),o("Array.from",(function(e){return e||function(e,t,n){t=null!=t?t:function(e){return e};var r=[],a="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];if("function"==typeof a){e=a.call(e);for(var i=0;!(a=e.next()).done;)r.push(t.call(n,a.value,i++))}else for(a=e.length,i=0;i<a;i++)r.push(t.call(n,e[i],i));return r}})),o("Object.is",(function(e){return e||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}})),o("Array.prototype.includes",(function(e){return e||function(e,t){var n=this;n instanceof String&&(n=String(n));var r=n.length;for(0>(t=t||0)&&(t=Math.max(t+r,0));t<r;t++){var a=n[t];if(a===e||Object.is(a,e))return!0}return!1}})),o("String.prototype.includes",(function(e){return e||function(e,t){return-1!==C(this,e,"includes").indexOf(e,t||0)}})),o("Number.MAX_SAFE_INTEGER",(function(){return 9007199254740991})),o("Number.MIN_SAFE_INTEGER",(function(){return-9007199254740991})),o("Math.trunc",(function(e){return e||function(e){if(e=Number(e),isNaN(e)||1/0===e||-1/0===e||0===e)return e;var t=Math.floor(Math.abs(e));return 0>e?-t:t}})),o("Number.isFinite",(function(e){return e||function(e){return"number"==typeof e&&(!isNaN(e)&&1/0!==e&&-1/0!==e)}})),o("String.prototype.padStart",(function(e){return e||function(e,t){var n=C(this,null,"padStart");return T(t,e-n.length)+n}})),o("Array.prototype.keys",(function(e){return e||function(){return S(this,(function(e){return e}))}})),o("Number.isInteger",(function(e){return e||function(e){return!!Number.isFinite(e)&&e===Math.floor(e)}})),o("Number.isSafeInteger",(function(e){return e||function(e){return Number.isInteger(e)&&Math.abs(e)<=Number.MAX_SAFE_INTEGER}})),o("Array.prototype.findIndex",(function(e){return e||function(e,t){return I(this,e,t).Hb}})),o("String.prototype.endsWith",(function(e){return e||function(e,t){var n=C(this,e,"endsWith");void 0===t&&(t=n.length),t=Math.max(0,Math.min(0|t,n.length));for(var r=e.length;0<r&&0<t;)if(n[--t]!=e[--r])return!1;return 0>=r}})),o("String.fromCodePoint",(function(e){return e||function(e){for(var t="",n=0;n<arguments.length;n++){var r=Number(arguments[n]);if(0>r||1114111<r||r!==Math.floor(r))throw new RangeError("invalid_code_point "+r);65535>=r?t+=String.fromCharCode(r):(r-=65536,t+=String.fromCharCode(r>>>10&1023|55296),t+=String.fromCharCode(1023&r|56320))}return t}})),o("String.prototype.codePointAt",(function(e){return e||function(e){var t=C(this,null,"codePointAt"),n=t.length;if(0<=(e=Number(e)||0)&&e<n){e|=0;var r=t.charCodeAt(e);return 55296>r||56319<r||e+1===n||(56320>(e=t.charCodeAt(e+1))||57343<e)?r:1024*(r-55296)+e+9216}}})),o("Set",(function(e){function t(e){if(this.h=new Map,e){e=u(e);for(var t;!(t=e.next()).done;)this.add(t.value)}this.size=this.h.size}return function(){if(!e||"function"!=typeof e||!e.prototype.entries||"function"!=typeof Object.seal)return!1;try{var t=Object.seal({x:4}),n=new e(u([t]));if(!n.has(t)||1!=n.size||n.add(t)!=n||1!=n.size||n.add({x:4})!=n||2!=n.size)return!1;var r=n.entries(),a=r.next();return!a.done&&a.value[0]==t&&a.value[1]==t&&(!(a=r.next()).done&&a.value[0]!=t&&4==a.value[0].x&&a.value[1]==a.value[0]&&r.next().done)}catch(e){return!1}}()?e:(t.prototype.add=function(e){return e=0===e?0:e,this.h.set(e,e),this.size=this.h.size,this},t.prototype.delete=function(e){return e=this.h.delete(e),this.size=this.h.size,e},t.prototype.clear=function(){this.h.clear(),this.size=0},t.prototype.has=function(e){return this.h.has(e)},t.prototype.entries=function(){return this.h.entries()},t.prototype.values=function(){return this.h.values()},t.prototype.keys=t.prototype.values,t.prototype[Symbol.iterator]=t.prototype.values,t.prototype.forEach=function(e,t){var n=this;this.h.forEach((function(r){return e.call(t,r,r,n)}))},t)})),o("Math.log10",(function(e){return e||function(e){return Math.log(e)/Math.LN10}})),o("Number.isNaN",(function(e){return e||function(e){return"number"==typeof e&&isNaN(e)}})),o("Object.values",(function(e){return e||function(e){var t,n=[];for(t in e)B(e,t)&&n.push(e[t]);return n}})),o("Array.prototype.values",(function(e){return e||function(){return S(this,(function(e,t){return t}))}})),o("Object.getOwnPropertySymbols",(function(e){return e||function(){return[]}}));var U={},F={};function P(e){return/^([+-]?(\d*(\.\d*)?([eE][+-]?\d*)?|INF)|NaN)$/.test(e)}function H(e){return/^[_:A-Za-z][-._:A-Za-z0-9]*$/.test(e)}function j(e){return H(e)&&/^[_A-Za-z]([-._A-Za-z0-9])*$/.test(e)}function X(e){return 1===(e=e.split(":")).length?j(e[0]):2===e.length&&(j(e[0])&&j(e[1]))}function _(e){return!/[\u0009\u000A\u000D]/.test(e)}function L(e){return j(e)}var k=new Map([[45,function(){return!0}],[46,function(){return!0}],[1,function(){return!0}],[0,function(e){return/^(0|1|true|false)$/.test(e)}],[6,function(e){return P(e)}],[3,P],[4,function(e){return/^[+-]?\d*(\.\d*)?$/.test(e)}],[18,function(e){return/^(-)?P(\d+Y)?(\d+M)?(\d+D)?(T(\d+H)?(\d+M)?(\d+(\.\d*)?S)?)?$/.test(e)}],[9,function(e){return/^-?([1-9][0-9]{3,}|0[0-9]{3})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T(([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?|(24:00:00(\.0+)?))(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?$/.test(e)}],[8,function(e){return/^(([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?|(24:00:00(\.0+)?))(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?$/.test(e)}],[7,function(e){return/^-?([1-9][0-9]{3,}|0[0-9]{3})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?$/.test(e)}],[11,function(e){return/^-?([1-9][0-9]{3,}|0[0-9]{3})-(0[1-9]|1[0-2])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?$/.test(e)}],[12,function(e){return/^-?([1-9][0-9]{3,}|0[0-9]{3})(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?$/.test(e)}],[13,function(e){return/^--(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?$/.test(e)}],[15,function(e){return/^---(0[1-9]|[12][0-9]|3[01])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?$/.test(e)}],[14,function(e){return/^--(0[1-9]|1[0-2])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?$/.test(e)}],[22,function(e){return/^([0-9A-Fa-f]{2})*$/.test(e)}],[21,function(e){return new RegExp(/^((([A-Za-z0-9+/] ?){4})*((([A-Za-z0-9+/] ?){3}[A-Za-z0-9+/])|(([A-Za-z0-9+/] ?){2}[AEIMQUYcgkosw048] ?=)|(([A-Za-z0-9+/] ?)[AQgw] ?= ?=)))?$/).test(e)}],[20,function(){return!0}],[44,X],[48,_],[52,function(e){return _(e)&&!/^ | {2,}| $/.test(e)}],[51,function(e){return/^[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*$/.test(e)}],[50,function(e){return/^[-._:A-Za-z0-9]+$/.test(e)}],[25,H],[23,X],[24,j],[42,L],[41,L],[26,function(e){return j(e)}],[5,function(e){return/^[+-]?\d+$/.test(e)}],[16,function(e){return/^-?P[0-9]+(Y([0-9]+M)?|M)$/.test(e)}],[17,function(e){return/^-?P([0-9]+D)?(T([0-9]+H)?([0-9]+M)?([0-9]+(\.[0-9]+)?S)?)?$/.test(e)}]]),q=Object.create(null);function V(e,t){if(!q[t])throw Error("Unknown type");return{type:t,value:e}}[{D:0,name:59},{D:0,name:46,parent:59,L:{whiteSpace:"preserve"}},{D:0,name:19,parent:46},{D:0,name:1,parent:46},{D:0,name:0,parent:46,L:{whiteSpace:"collapse"}},{D:0,name:4,parent:46,L:{whiteSpace:"collapse"}},{D:0,name:6,parent:46,L:{whiteSpace:"collapse"}},{D:0,name:3,parent:46,L:{whiteSpace:"collapse"}},{D:0,name:18,parent:46,L:{whiteSpace:"collapse"}},{D:0,name:9,parent:46,L:{xa:"optional",whiteSpace:"collapse"}},{D:0,name:8,parent:46,L:{xa:"optional",whiteSpace:"collapse"}},{D:0,name:7,parent:46,L:{xa:"optional",whiteSpace:"collapse"}},{D:0,name:11,parent:46,L:{xa:"optional",whiteSpace:"collapse"}},{D:0,name:12,parent:46,L:{xa:"optional",whiteSpace:"collapse"}},{D:0,name:13,parent:46,L:{xa:"optional",whiteSpace:"collapse"}},{D:0,name:15,parent:46,L:{xa:"optional",whiteSpace:"collapse"}},{D:0,name:14,parent:46,L:{xa:"optional",whiteSpace:"collapse"}},{D:0,name:22,parent:46,L:{whiteSpace:"collapse"}},{D:0,name:21,parent:46,L:{whiteSpace:"collapse"}},{D:0,name:20,parent:46,L:{whiteSpace:"collapse"}},{D:0,name:23,parent:46,L:{whiteSpace:"collapse"}},{D:0,name:44,parent:46,L:{whiteSpace:"collapse"}},{D:1,name:10,V:9,L:{whiteSpace:"collapse",xa:"required"}},{D:1,name:48,V:1,L:{whiteSpace:"replace"}},{D:1,name:52,V:48,L:{whiteSpace:"collapse"}},{D:1,name:51,V:52,L:{whiteSpace:"collapse"}},{D:1,name:50,V:52,L:{whiteSpace:"collapse"}},{D:2,name:49,type:50,L:{minLength:1,whiteSpace:"collapse"}},{D:1,name:25,V:52,L:{whiteSpace:"collapse"}},{D:1,name:24,V:25,L:{whiteSpace:"collapse"}},{D:1,name:42,V:24,L:{whiteSpace:"collapse"}},{D:1,name:41,V:24,L:{whiteSpace:"collapse"}},{D:2,name:43,type:41,L:{minLength:1,whiteSpace:"collapse"}},{D:1,name:26,V:24,L:{whiteSpace:"collapse"}},{D:2,name:40,type:26,L:{minLength:1,whiteSpace:"collapse"}},{D:0,name:5,parent:4,L:{la:0,whiteSpace:"collapse"}},{D:1,name:27,V:5,L:{la:0,ra:"0",whiteSpace:"collapse"}},{D:1,name:28,V:27,L:{la:0,ra:"-1",whiteSpace:"collapse"}},{D:1,name:31,V:5,L:{la:0,ra:"9223372036854775807",sa:"-9223372036854775808",whiteSpace:"collapse"}},{D:1,name:32,V:31,L:{la:0,ra:"2147483647",sa:"-2147483648",whiteSpace:"collapse"}},{D:1,name:33,V:32,L:{la:0,ra:"32767",sa:"-32768",whiteSpace:"collapse"}},{D:1,name:34,V:33,L:{la:0,ra:"127",sa:"-128",whiteSpace:"collapse"}},{D:1,name:30,V:5,L:{la:0,sa:"0",whiteSpace:"collapse"}},{D:1,name:36,V:30,L:{la:0,ra:"18446744073709551615",sa:"0",whiteSpace:"collapse"}},{D:1,name:35,V:36,L:{la:0,ra:"4294967295",sa:"0",whiteSpace:"collapse"}},{D:1,name:38,V:35,L:{la:0,ra:"65535",sa:"0",whiteSpace:"collapse"}},{D:1,name:37,V:38,L:{la:0,ra:"255",sa:"0",whiteSpace:"collapse"}},{D:1,name:29,V:30,L:{la:0,sa:"1",whiteSpace:"collapse"}},{D:1,name:16,V:18,L:{whiteSpace:"collapse"}},{D:1,name:17,V:18,L:{whiteSpace:"collapse"}},{D:1,name:60,V:59},{D:3,name:39,Ha:[]},{D:1,name:61,V:60},{D:1,name:62,V:60},{D:0,name:53,parent:59},{D:1,name:54,V:53},{D:1,name:58,V:53},{D:1,name:47,V:53},{D:1,name:56,V:53},{D:1,name:57,V:53},{D:1,name:55,V:53},{D:3,name:2,Ha:[4,5,6,3]}].forEach((function(e){var t=e.name,n=e.L||{};if(0===e.D){e=e.parent?q[e.parent]:null;var r=k.get(t)||null;q[t]={D:0,type:t,Ia:n,parent:e,fb:r,Ka:G(t),Ha:[]}}else 1===e.D?(e=q[e.V],r=k.get(t)||null,q[t]={D:1,type:t,Ia:n,parent:e,fb:r,Ka:e.Ka,Ha:[]}):2===e.D?q[t]={D:2,type:t,Ia:n,parent:q[e.type],fb:null,Ka:U,Ha:[]}:(e=e.Ha.map((function(e){return q[e]})),q[t]={D:3,type:t,Ia:n,parent:null,fb:null,Ka:F,Ha:e})}));var Y=V(!0,0),Q=V(!1,0);function J(){return Error("FORG0006: A wrong argument type was specified in a function call.")}function K(e,t){this.done=e,this.value=t}var z=new K(!0,void 0);function W(e){return new K(!1,e)}function Z(e,t){return e===t||function e(t,n){if(3===n.D)return!!n.Ha.find((function(n){return e(t,n)}));for(;t;){if(t.type===n.type)return!0;if(3===t.D)return!!t.Ha.find((function(e){return Z(e.type,n.type)}));t=t.parent}return!1}(q[e],q[t])}function $(e){this.o=se,this.h=e;var t=-1;this.value={next:function(){return++t>=e.length?z:W(e[t])}}}function ee(){this.value={next:function(){return z}}}function te(e){var t=e.value;if(Z(e.type,53))return!0;if(Z(e.type,0))return t;if(Z(e.type,1)||Z(e.type,20)||Z(e.type,19))return 0!==t.length;if(Z(e.type,2))return!isNaN(t)&&0!==t;throw J()}function ne(e,t){var n=this;this.J=se,this.value={next:function(t){return null!==n.o&&n.h>=n.o?z:void 0!==n.B[n.h]?W(n.B[n.h++]):(t=e.next(t)).done?(n.o=n.h,t):((n.v||2>n.h)&&(n.B[n.h]=t.value),n.h++,t)}},this.v=!1,this.B=[],this.h=0,this.o=void 0===t?null:t}function re(e,t){e.h=void 0===t?0:t}function ae(e){this.B=se,this.h=e;var t=!1;this.value={next:function(){return t?z:(t=!0,W(e))}},this.o=null}(n=$.prototype).pb=function(){return this},n.filter=function(e){var t=this,n=-1;return this.o.create({next:function(){for(n++;n<t.h.length&&!e(t.h[n],n,t);)n++;return n>=t.h.length?z:W(t.h[n])}})},n.first=function(){return this.h[0]},n.S=function(){return this.h},n.getEffectiveBooleanValue=function(){if(Z(this.h[0].type,53))return!0;throw J()},n.ya=function(){return this.h.length},n.F=function(){return!1},n.za=function(){return!1},n.map=function(e){var t=this,n=-1;return this.o.create({next:function(){return++n>=t.h.length?z:W(e(t.h[n],n,t))}},this.h.length)},n.M=function(e){return e(this.h)},n.aa=function(e){return e.multiple?e.multiple(this):e.default(this)},(n=ee.prototype).pb=function(){return this},n.filter=function(){return this},n.first=function(){return null},n.S=function(){return[]},n.getEffectiveBooleanValue=function(){return!1},n.ya=function(){return 0},n.F=function(){return!0},n.za=function(){return!1},n.map=function(){return this},n.M=function(e){return e([])},n.aa=function(e){return e.empty?e.empty(this):e.default(this)},(n=ne.prototype).pb=function(){return this.J.create(this.S())},n.filter=function(e){var t=this,n=-1,r=this.value;return this.J.create({next:function(a){n++;for(var i=r.next(a);!i.done&&!e(i.value,n,t);)n++,i=r.next(a);return i}})},n.first=function(){if(void 0!==this.B[0])return this.B[0];var e=this.value.next(0);return re(this),e.done?null:e.value},n.S=function(){if(this.h>this.B.length&&this.o!==this.B.length)throw Error("Implementation error: Sequence Iterator has progressed.");var e=this.value;this.v=!0;for(var t=e.next(0);!t.done;)t=e.next(0);return this.B},n.getEffectiveBooleanValue=function(){var e=this.value,t=this.h;re(this);var n=e.next(0);if(n.done)return re(this,t),!1;if(Z((n=n.value).type,53))return re(this,t),!0;if(!e.next(0).done)throw J();return re(this,t),te(n)},n.ya=function(e){if(null!==this.o)return this.o;if(void 0!==e&&e)return-1;e=this.h;var t=this.S().length;return re(this,e),t},n.F=function(){return 0===this.o||null===this.first()},n.za=function(){if(null!==this.o)return 1===this.o;var e=this.value,t=this.h;return re(this),e.next(0).done?(re(this,t),!1):(e=e.next(0),re(this,t),e.done)},n.map=function(e){var t=this,n=0,r=this.value;return this.J.create({next:function(a){return(a=r.next(a)).done?z:W(e(a.value,n++,t))}},this.o)},n.M=function(e,t){var n,r=this.value,a=[],i=!0;return function(){for(var o=r.next(i?0:t);!o.done;o=r.next(t))i=!1,a.push(o.value);n=e(a).value}(),this.J.create({next:function(){return n.next(0)}})},n.aa=function(e){function t(e){r=e.value,-1!==(e=e.ya(!0))&&(n.o=e)}var n=this,r=null;return this.J.create({next:function(a){return r?r.next(a):n.F()?(t(e.empty?e.empty(n):e.default(n)),r.next(a)):n.za()?(t(e.s?e.s(n):e.default(n)),r.next(a)):(t(e.multiple?e.multiple(n):e.default(n)),r.next(a))}})},(n=ae.prototype).pb=function(){return this},n.filter=function(e){return e(this.h,0,this)?this:this.B.create()},n.first=function(){return this.h},n.S=function(){return[this.h]},n.getEffectiveBooleanValue=function(){return null===this.o&&(this.o=te(this.h)),this.o},n.ya=function(){return 1},n.F=function(){return!1},n.za=function(){return!0},n.map=function(e){return this.B.create(e(this.h,0,this))},n.M=function(e){return e([this.h])},n.aa=function(e){return e.s?e.s(this):e.default(this)};var ie=new ee;function oe(e,t){if(null===(e=void 0===e?null:e))return ie;if(Array.isArray(e))switch(e.length){case 0:return ie;case 1:return new ae(e[0]);default:return new $(e)}return e.next?new ne(e,void 0===t?null:t):new ae(e)}var se={create:oe,s:function(e){return new ae(e)},empty:function(){return oe()},$:function(){return oe(Y)},U:function(){return oe(Q)}};function ue(e){var t=[],n=e.value;return function(){var e=0;return se.create({next:function(){if(void 0!==t[e])return t[e++];var r=n.next(0);return r.done?r:t[e++]=r}})}}function le(e,t){this.type=e,this.value=t}var ce={},he=(ce[0]="xs:boolean",ce[1]="xs:string",ce[2]="xs:numeric",ce[3]="xs:double",ce[4]="xs:decimal",ce[5]="xs:integer",ce[6]="xs:float",ce[7]="xs:date",ce[8]="xs:time",ce[9]="xs:dateTime",ce[10]="xs:dateTimeStamp",ce[11]="xs:gYearMonth",ce[12]="xs:gYear",ce[13]="xs:gMonthDay",ce[14]="xs:gMonth",ce[15]="xs:gDay",ce[16]="xs:yearMonthDuration",ce[17]="xs:dayTimeDuration",ce[18]="xs:duration",ce[19]="xs:untypedAtomic",ce[20]="xs:anyURI",ce[21]="xs:base64Binary",ce[22]="xs:hexBinary",ce[23]="xs:QName",ce[24]="xs:NCName",ce[25]="xs:Name",ce[26]="xs:ENTITY",ce[27]="xs:nonPositiveInteger",ce[28]="xs:negativeInteger",ce[29]="xs:positiveInteger",ce[30]="xs:nonNegativeInteger",ce[31]="xs:long",ce[32]="xs:int",ce[33]="xs:short",ce[34]="xs:byte",ce[35]="xs:unsignedInt",ce[36]="xs:unsignedLong",ce[37]="xs:unsignedByte",ce[38]="xs:unsignedShort",ce[39]="xs:error",ce[40]="xs:ENTITIES",ce[41]="xs:IDREF",ce[42]="xs:ID",ce[43]="xs:IDFREFS",ce[44]="xs:NOTATION",ce[45]="xs:anySimpleType",ce[46]="xs:anyAtomicType",ce[47]="attribute()",ce[48]="xs:normalizedString",ce[49]="xs:NMTOKENS",ce[50]="xs:NMTOKEN",ce[51]="xs:language",ce[52]="xs:token",ce[53]="node()",ce[54]="element()",ce[55]="document-node()",ce[56]="text()",ce[57]="processing-instruction()",ce[58]="comment()",ce[59]="item()",ce[60]="function(*)",ce[61]="map(*)",ce[62]="array(*)",ce),pe={"xs:boolean":0,"xs:string":1,"xs:numeric":2,"xs:double":3,"xs:decimal":4,"xs:integer":5,"xs:float":6,"xs:date":7,"xs:time":8,"xs:dateTime":9,"xs:dateTimeStamp":10,"xs:gYearMonth":11,"xs:gYear":12,"xs:gMonthDay":13,"xs:gMonth":14,"xs:gDay":15,"xs:yearMonthDuration":16,"xs:dayTimeDuration":17,"xs:duration":18,"xs:untypedAtomic":19,"xs:anyURI":20,"xs:base64Binary":21,"xs:hexBinary":22,"xs:QName":23,"xs:NCName":24,"xs:Name":25,"xs:ENTITY":26,"xs:nonPositiveInteger":27,"xs:negativeInteger":28,"xs:positiveInteger":29,"xs:nonNegativeInteger":30,"xs:long":31,"xs:int":32,"xs:short":33,"xs:byte":34,"xs:unsignedInt":35,"xs:unsignedLong":36,"xs:unsignedByte":37,"xs:unsignedShort":38,"xs:error":39,"xs:ENTITIES":40,"xs:IDREF":41,"xs:ID":42,"xs:IDREFS":43,"xs:NOTATION":44,"xs:anySimpleType":45,"xs:anyAtomicType":46,"attribute()":47,"xs:normalizedString":48,"xs:NMTOKENS":49,"xs:NMTOKEN":50,"xs:language":51,"xs:token":52,"node()":53,"element()":54,"document-node()":55,"text()":56,"processing-instruction()":57,"comment()":58,"item()":59,"function(*)":60,"map(*)":61,"array(*)":62};function fe(e){return 2===e.g?he[e.type]+"*":1===e.g?he[e.type]+"+":0===e.g?he[e.type]+"?":he[e.type]}function de(e){if(!e.startsWith("xs:")&&0<=e.indexOf(":"))throw Error("XPST0081: Invalid prefix for input "+e);var t=pe[e];if(void 0===t)throw Error('XPST0051: The type "'+e+'" could not be found');return t}function me(e){switch(e[e.length-1]){case"*":return{type:de(e.substr(0,e.length-1)),g:2};case"?":return{type:de(e.substr(0,e.length-1)),g:0};case"+":return{type:de(e.substr(0,e.length-1)),g:1};default:return{type:de(e),g:3}}}function ve(e,t,n){this.namespaceURI=t||null,this.prefix=e||"",this.localName=n}function ge(e){var t=e.l,n=e.arity,r=void 0!==e.Oa&&e.Oa,a=void 0!==e.I&&e.I,i=e.localName,o=e.namespaceURI,s=e.j;for(e=e.value,le.call(this,60,null),this.value=e,this.I=a,a=-1,e=0;e<t.length;e++)4===t[e]&&(a=e);-1<a&&(e=Array(n-(t.length-1)).fill(t[a-1]),t=t.slice(0,a).concat(e)),this.o=t,this.B=n,this.N=r,this.J=i,this.v=o,this.C=s}function ye(e,t){var n=[];return 2!==e&&1!==e||n.push("type-1-or-type-2"),n.push("type-"+e),t&&n.push("name-"+t),n}function we(e){var t=e.node.nodeType;if(2===t||1===t)var n=e.node.localName;return ye(t,n)}function Ae(e){var t=e.nodeType;if(2===t||1===t)var n=e.localName;return ye(t,n)}function xe(){}function be(){}ve.prototype.va=function(){return this.prefix?this.prefix+":"+this.localName:this.localName},v(ge,le),ge.prototype.Oa=function(){return this.N},xe.prototype.getAllAttributes=function(e,t){return t=void 0===t?null:t,1!==e.nodeType?[]:(e=Array.from(e.attributes),null===t?e:e.filter((function(e){return Ae(e).includes(t)})))},xe.prototype.getAttribute=function(e,t){return 1!==e.nodeType?null:e.getAttribute(t)},xe.prototype.getChildNodes=function(e,t){return t=void 0===t?null:t,e=Array.from(e.childNodes),null===t?e:e.filter((function(e){return Ae(e).includes(t)}))},xe.prototype.getData=function(e){return 2===e.nodeType?e.value:e.data},xe.prototype.getFirstChild=function(e,t){for(t=void 0===t?null:t,e=e.firstChild;e;e=e.nextSibling)if(null===t||Ae(e).includes(t))return e;return null},xe.prototype.getLastChild=function(e,t){for(t=void 0===t?null:t,e=e.lastChild;e;e=e.previousSibling)if(null===t||Ae(e).includes(t))return e;return null},xe.prototype.getNextSibling=function(e,t){for(t=void 0===t?null:t,e=e.nextSibling;e;e=e.nextSibling)if(null===t||Ae(e).includes(t))return e;return null},xe.prototype.getParentNode=function(e,t){return t=void 0===t?null:t,(e=2===e.nodeType?e.ownerElement:e.parentNode)&&(null===t||Ae(e).includes(t))?e:null},xe.prototype.getPreviousSibling=function(e,t){for(t=void 0===t?null:t,e=e.previousSibling;e;e=e.previousSibling)if(null===t||Ae(e).includes(t))return e;return null},(n=be.prototype).insertBefore=function(e,t,n){return e.insertBefore(t,n)},n.removeAttributeNS=function(e,t,n){return e.removeAttributeNS(t,n)},n.removeChild=function(e,t){return e.removeChild(t)},n.setAttributeNS=function(e,t,n,r){e.setAttributeNS(t,n,r)},n.setData=function(e,t){e.data=t};var Ee=new be;function Be(e){this.h=e}function Ne(e){return void 0!==e.Pa}function Ce(e,t,n){var r=null;return t&&(Ne(t.node)?r={G:t.G,offset:n,parent:t.node}:t.G&&(r=t.G)),{node:e,G:r}}function Te(e){this.h=e,this.o=[]}function Ie(e,t,n){return e.getAllAttributes(t.node,void 0===n?null:n).map((function(e){return Ce(e,t,e.nodeName)}))}function Oe(e,t,n){return Ne(t=t.node)?(e=t.attributes.find((function(e){return n===e.name})))?e.value:null:(e=e.h.getAttribute(t,n))?e:null}function Se(e,t,n){return e.getChildNodes(t.node,void 0===n?null:n).map((function(e,n){return Ce(e,t,n)}))}function Re(e,t){return e.getData(t.node)}function De(e,t,n){var r=t.node;return Ne(r)?e=r.childNodes[0]:((n=e.h.getFirstChild(r,void 0===n?null:n))&&10===n.nodeType&&(n=e.h.getNextSibling(n)),e=n),e?Ce(e,t,0):null}function Me(e,t,n){n=void 0===n?null:n;var r=t.node;return Ne(r)?(e=r.childNodes.length-1,r=r.childNodes[e]):((r=e.h.getLastChild(r,n))&&10===r.nodeType&&(r=e.h.getPreviousSibling(r)),e=e.getChildNodes(t.node,n).length-1),r?Ce(r,t,e):null}function Ge(e,t,n){n=void 0===n?null:n;var r=t.node,a=t.G;if(Ne(r)){if(a)var i=a.offset+1,o=a.parent.childNodes[i]}else{if(!a){for(o=r;o&&(!(o=e.h.getNextSibling(o,n))||10===o.nodeType););return o?{node:o,G:null}:null}i=a.offset+1;var s=Ue(e,t,null);o=e.getChildNodes(s.node,n)[i]}return o?Ce(o,s||Ue(e,t,n),i):null}function Ue(e,t,n){n=void 0===n?null:n;var r=t.node,a=t.G;if(a)"number"==typeof a.offset&&r===a.parent.childNodes[a.offset]||"string"==typeof a.offset&&r===a.parent.attributes.find((function(e){return a.offset===e.nodeName}))?(e=a.parent,t=a.G):(e=e.getParentNode(r,n),t=a);else{if(Ne(r))return null;e=e.getParentNode(r,n),t=null}return e?{node:e,G:t}:null}function Fe(e,t,n){n=void 0===n?null:n;var r=t.node,a=t.G;if(Ne(r)){if(a)var i=a.offset-1,o=a.parent.childNodes[i]}else{if(!a){for(o=r;o&&(!(o=e.h.getPreviousSibling(o,n))||10===o.nodeType););return o?{node:o,G:null}:null}i=a.offset-1;var s=Ue(e,t,null);o=e.getChildNodes(s.node,n)[i]}return o?Ce(o,s||Ue(e,t,n),i):null}function Pe(e,t,n,r,a){return a.M((function(e){var t=u(e).next().value;return r.M((function(e){e=u(e).next().value;var n=t.value;if(0>=n||n>e.R.length)throw Error("FOAY0001: array position out of bounds.");return e.R[n-1]()}))}))}function He(e){ge.call(this,{value:function(e,n,r,a){return Pe(0,0,0,se.s(t),a)},localName:"get",namespaceURI:"http://www.w3.org/2005/xpath-functions/array",l:[{type:5,g:3}],arity:1,j:{type:59,g:2}});var t=this;this.type=62,this.R=e}function je(e){switch(e.node.nodeType){case 2:return 47;case 1:return 54;case 3:case 4:return 56;case 7:return 57;case 8:return 58;case 9:return 55;default:return 53}}function Xe(e){return{type:je(e),value:e}}function _e(e,t){return t(e=e.map((function(e){return e.first()})))}function Le(e,t){var n=Z(e.type,1)||Z(e.type,20)||Z(e.type,19),r=Z(t.type,1)||Z(t.type,20)||Z(t.type,19);return n&&r?e.value===t.value:(n=Z(e.type,4)||Z(e.type,3)||Z(e.type,6),r=Z(t.type,4)||Z(t.type,3)||Z(t.type,6),n&&r?!(!isNaN(e.value)||!isNaN(t.value))||e.value===t.value:(n=Z(e.type,0)||Z(e.type,22)||Z(e.type,18)||Z(e.type,23)||Z(e.type,44),r=Z(t.type,0)||Z(t.type,22)||Z(t.type,18)||Z(t.type,23)||Z(t.type,44),!(!n||!r)&&e.value===t.value))}function ke(e,t,n,r,a){return _e([r,a],(function(e){var t=(e=u(e)).next().value,n=e.next().value;return(e=t.h.find((function(e){return Le(e.key,n)})))?e.value():se.empty()}))}function qe(e){ge.call(this,{l:[{type:59,g:3}],arity:1,localName:"get",namespaceURI:"http://www.w3.org/2005/xpath-functions/map",value:function(e,n,r,a){return ke(0,0,0,se.s(t),a)},j:{type:59,g:2}});var t=this;this.type=61,this.h=e}function Ve(){}function Ye(e,t){return e.ab()===t.ab()&&e.bb()===t.bb()}function Qe(e){if(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER)throw Error("FODT0002: Number of seconds given to construct DayTimeDuration overflows MAX_SAFE_INTEGER or MIN_SAFE_INTEGER");this.ea=e}function Je(e){var t=Math.abs(e.Za()),n=Math.abs(e.getHours()),r=Math.abs(e.getMinutes());return n=(n?n+"H":"")+(r?r+"M":"")+((e=Math.abs(e.getSeconds()))?e+"S":""),(t=t?t+"D":"")&&n?t+"T"+n:t||(n?"T"+n:"T0S")}function Ke(e,t,n,r,a,i){return e=86400*e+3600*t+60*n+r+a,new Qe(i||0===e?e:-e)}function ze(e){return(e=/^(-)?P(\d+Y)?(\d+M)?(\d+D)?(?:T(\d+H)?(\d+M)?(\d+(\.\d*)?S)?)?$/.exec(e))?Ke(e[4]?parseInt(e[4],10):0,e[5]?parseInt(e[5],10):0,e[6]?parseInt(e[6],10):0,e[7]?parseInt(e[7],10):0,e[8]?parseFloat(e[8]):0,!e[1]):null}function We(e){return"Z"===(e=/^(Z)|([+-])([01]\d):([0-5]\d)$/.exec(e))[1]?Ke(0,0,0,0,0,!0):Ke(0,e[3]?parseInt(e[3],10):0,e[4]?parseInt(e[4],10):0,0,0,"+"===e[2])}function Ze(e,t){if(isNaN(t))throw Error("FOCA0005: Cannot multiply xs:dayTimeDuration by NaN");if((e=e.ea*t)>Number.MAX_SAFE_INTEGER||!Number.isFinite(e))throw Error("FODT0002: Value overflow while multiplying xs:dayTimeDuration");return new Qe(e<Number.MIN_SAFE_INTEGER||Object.is(-0,e)?0:e)}function $e(e){return e?parseInt(e,10):null}function et(e){var t=(e+="").startsWith("-");return t&&(e=e.substring(1)),(t?"-":"")+e.padStart(4,"0")}function tt(e){return(e+"").padStart(2,"0")}function nt(e){return 1===(e+="").split(".")[0].length&&(e=e.padStart(e.length+1,"0")),e}function rt(e){return 0===e.getHours()&&0===e.getMinutes()?"Z":(e.oa()?"+":"-")+tt(Math.abs(e.getHours()))+":"+tt(Math.abs(e.getMinutes()))}function at(e,t,n,r,a,i,o,s,u){this.B=e,this.h=t,this.o=n+(24===r?1:0),this.v=24===r?0:r,this.C=a,this.J=i,this.pa=o,this.ba=s,this.type=void 0===u?9:u}function it(e,t){switch(t){case 15:return new at(1972,12,e.o,0,0,0,0,e.ba,15);case 14:return new at(1972,e.h,1,0,0,0,0,e.ba,14);case 12:return new at(e.B,1,1,0,0,0,0,e.ba,12);case 13:return new at(1972,e.h,e.o,0,0,0,0,e.ba,13);case 11:return new at(e.B,e.h,1,0,0,0,0,e.ba,11);case 8:return new at(1972,12,31,e.v,e.C,e.J,e.pa,e.ba,8);case 7:return new at(e.B,e.h,e.o,0,0,0,0,e.ba,7);default:return new at(e.B,e.h,e.o,e.v,e.C,e.J,e.pa,e.ba,9)}}function ot(e,t){return t=e.ba||t||We("Z"),new Date(Date.UTC(e.B,e.h-1,e.o,e.v-t.getHours(),e.C-t.getMinutes(),e.J+e.pa))}function st(e){var t=/^(?:(-?\d{4,}))?(?:--?(\d\d))?(?:-{1,3}(\d\d))?(T)?(?:(\d\d):(\d\d):(\d\d))?(\.\d+)?(Z|(?:[+-]\d\d:\d\d))?$/.exec(e);e=t[1]?parseInt(t[1],10):null;var n=$e(t[2]),r=$e(t[3]),a=t[4],i=$e(t[5]),o=$e(t[6]),s=$e(t[7]),u=t[8]?parseFloat(t[8]):0;if(t=t[9]?We(t[9]):null,e&&(-271821>e||273860<e))throw Error("FODT0001: Datetime year is out of bounds");return a?new at(e,n,r,i,o,s,u,t,9):null!==i&&null!==o&&null!==s?new at(1972,12,31,i,o,s,u,t,8):null!==e&&null!==n&&null!==r?new at(e,n,r,0,0,0,0,t,7):null!==e&&null!==n?new at(e,n,1,0,0,0,0,t,11):null!==n&&null!==r?new at(1972,n,r,0,0,0,0,t,13):null!==e?new at(e,1,1,0,0,0,0,t,12):null!==n?new at(1972,n,1,0,0,0,0,t,14):new at(1972,12,r,0,0,0,0,t,15)}function ut(e,t,n){var r=ot(e,n).getTime();return r===(n=ot(t,n).getTime())?e.pa===t.pa?0:e.pa>t.pa?1:-1:r>n?1:-1}function lt(e,t,n){return 0===ut(e,t,n)}function ct(e,t,n){return new Qe(e=(ot(e,n).getTime()-ot(t,n).getTime())/1e3)}function ht(e){throw Error("Not implemented: adding durations to "+he[e.type])}function pt(e){throw Error("Not implemented: subtracting durations from "+he[e.type])}function ft(e,t){if("number"!=typeof e&&("string"!=typeof e||!k.get(t)(e)))throw Error("Cannot convert JavaScript value '"+e+"' to the XPath type "+he[t]+" since it is not valid.")}function dt(e,t,n){if(null===t)return null;switch(e){case 0:return t?Y:Q;case 1:return V(t+"",1);case 3:case 2:return ft(t,3),V(+t,3);case 4:return ft(t,e),V(+t,4);case 5:return ft(t,e),V(0|t,5);case 6:return ft(t,e),V(+t,6);case 7:case 8:case 9:case 11:case 12:case 13:case 14:case 15:if(!(t instanceof Date))throw Error("The JavaScript value "+t+" with type "+typeof t+" is not a valid type to be converted to an XPath "+he[e]+".");return V(it(st(t.toISOString()),e),e);case 53:case 47:case 55:case 54:case 56:case 57:case 58:if("object"!=typeof t||!("nodeType"in t))throw Error("The JavaScript value "+t+" with type "+typeof t+" is not a valid type to be converted to an XPath "+he[e]+".");return Xe({node:t,G:null});case 59:return function e(t,n){if(null===t)return null;switch(typeof t){case"boolean":return t?Y:Q;case"number":return V(t,3);case"string":return V(t,1);case"object":return"nodeType"in t?Xe({node:t,G:null}):Array.isArray(t)?new He(t.map((function(t){return void 0===t?function(){return se.empty()}:ue(t=null===(t=e(t))?se.empty():se.s(t))}))):new qe(Object.keys(t).filter((function(e){return void 0!==t[e]})).map((function(n){var r=e(t[n]);return r=null===r?se.empty():se.s(r),{key:V(n,1),value:ue(r)}})))}throw Error("Value "+String(t)+' of type "'+typeof t+'" is not adaptable to an XPath value.')}(t);default:throw Error('Values of the type "'+e+'" can not be adapted to equivalent XPath values.')}}function mt(e,t,n){if(0===n.g)return null===(t=dt(n.type,t))?[]:[t];if(2===n.g||1===n.g){if(!Array.isArray(t))throw Error("The JavaScript value "+t+" should be an array if it is to be converted to "+fe(n)+".");return t.map((function(e){return dt(n.type,e)})).filter((function(e){return null!==e}))}var r=dt(n.type,t);if(null===r)throw Error("The JavaScript value "+t+" should be a single entry if it is to be converted to "+fe(n)+".");return[r]}function vt(e,t,n){return n=void 0===n?{type:59,g:0}:n,se.create(mt(0,t,n))}function gt(e,t){this.h=t=void 0===t?{xb:null,Bb:null,qb:!1}:t,this.Ga=e.Ga,this.wa=e.wa,this.O=e.O,this.ta=e.ta||Object.create(null)}function yt(e,t){var n=0,r=t.value;return{next:function(a){return(a=r.next(a)).done?z:W(xt(e,n++,a.value,t))}}}function wt(e){return e.h.qb||(e.h.qb=!0,e.h.xb=st((new Date).toISOString()),e.h.Bb=ze("PT0S")),e.h.xb}function At(e){return e.h.qb||(e.h.qb=!0,e.h.xb=st((new Date).toISOString()),e.h.Bb=ze("PT0S")),e.h.Bb}function xt(e,t,n,r){return new gt({O:n,Ga:t,wa:r||e.wa,ta:e.ta},e.h)}function bt(e,t){return new gt({O:e.O,Ga:e.Ga,wa:e.wa,ta:Object.assign(Object.create(null),e.ta,t)},e.h)}function Et(e,t,n,r,a,i){var o=new Map;this.debug=e,this.h=t,this.o=n,this.B=r,this.J=a,this.C=o,this.v=i,this.Ta=!0}function Bt(e){var t=0,n=null,r=!0;return se.create({next:function(a){for(;t<e.length;){n||(n=e[t].value,r=!0);var i=n.next(r?0:a);if(r=!1,!i.done)return i;t++,n=null}return z}})}function Nt(e,t,n){return Error("FORG0001: Cannot cast "+e+" to "+he[t]+(n?", "+n:""))}function Ct(e){return Error("XPTY0004: "+e)}function Tt(e){return Error("FOTY0013: Atomization is not supported for "+he[e]+".")}function It(e){return Error("XPST0081: The prefix "+e+" could not be resolved.")}function Ot(e,t){if(Z(e.type,46)||Z(e.type,19)||Z(e.type,0)||Z(e.type,4)||Z(e.type,3)||Z(e.type,6)||Z(e.type,5)||Z(e.type,2)||Z(e.type,23)||Z(e.type,1))return se.create(e);var n=t.h;if(Z(e.type,53)){var r=e.value;if(2===r.node.nodeType||3===r.node.nodeType)return se.create(V(Re(n,r),19));if(8===r.node.nodeType||7===r.node.nodeType)return se.create(V(Re(n,r),1));var a=[];return function e(t){if(8!==r.node.nodeType&&7!==r.node.nodeType){var i=t.nodeType;3===i||4===i?a.push(n.getData(t)):1!==i&&9!==i||n.getChildNodes(t).forEach((function(t){e(t)}))}}(r.node),se.create(V(a.join(""),19))}if(Z(e.type,60)&&!Z(e.type,62))throw Tt(e.type);if(Z(e.type,62))return Bt(e.R.map((function(e){return St(e(),t)})));throw Error("Atomizing "+e.type+" is not implemented.")}function St(e,t){var n=!1,r=e.value,a=null;return se.create({next:function(){for(;!n;){if(!a){var e=r.next(0);if(e.done){n=!0;break}a=Ot(e.value,t).value}if(!(e=a.next(0)).done)return e;a=null}return z}})}function Rt(e){for(e=q[e];e&&0!==e.D;)e=e.parent;return e?e.type:null}function Dt(e,t){var n=(t=q[t]).Ia;if(!n||!n.whiteSpace)return t.parent?Dt(e,t.parent.type):e;switch(t.Ia.whiteSpace){case"replace":return e.replace(/[\u0009\u000A\u000D]/g," ");case"collapse":return e.replace(/[\u0009\u000A\u000D]/g," ").replace(/ {2,}/g," ").replace(/^ | $/g,"")}return e}function Mt(e,t){for(t=q[t];t&&null===t.fb;){if(2===t.D||3===t.D)return!0;t=t.parent}return!t||t.fb(e)}function Gt(e,t){for(;e;){if(e.Ka&&e.Ka[t])return e.Ka[t];e=e.parent}return function(){return!0}}function Ut(e,t){return e(2)?function(e){return{u:!0,value:e}}:e(0)?function(e){return{u:!0,value:e?1:0}}:e(1)||e(19)?function(e){switch(e){case"NaN":return{u:!0,value:NaN};case"INF":case"+INF":return{u:!0,value:1/0};case"-INF":return{u:!0,value:-1/0};case"0":case"+0":return{u:!0,value:0};case"-0":return{u:!0,value:-0}}var n=parseFloat(e);return isNaN(n)?{u:!1,error:Nt(e,t)}:{u:!0,value:n}}:function(){return{u:!1,error:Error("XPTY0004: Casting not supported from given type to "+t+" or any of its derived types.")}}}function Ft(e){if(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER)throw Error("FODT0002: Number of months given to construct YearMonthDuration overflows MAX_SAFE_INTEGER or MIN_SAFE_INTEGER");this.ha=e}function Pt(e){var t=Math.abs(e.cb());return(t?t+"Y":"")+((e=Math.abs(e.$a()))?e+"M":"")||"0M"}function Ht(e){var t=/^(-)?P(\d+Y)?(\d+M)?(\d+D)?(?:T(\d+H)?(\d+M)?(\d+(\.\d*)?S)?)?$/.exec(e);if(t){if(e=!t[1],(t=12*(t[2]?parseInt(t[2],10):0)+(t[3]?parseInt(t[3],10):0))>Number.MAX_SAFE_INTEGER||!Number.isFinite(t))throw Error("FODT0002: Value overflow while constructing xs:yearMonthDuration");e=new Ft(e||0===t?t:-t)}else e=null;return e}function jt(e,t){if(isNaN(t))throw Error("FOCA0005: Cannot multiply xs:yearMonthDuration by NaN");if((e=Math.round(e.ha*t))>Number.MAX_SAFE_INTEGER||!Number.isFinite(e))throw Error("FODT0002: Value overflow while constructing xs:yearMonthDuration");return new Ft(e<Number.MIN_SAFE_INTEGER||0===e?0:e)}function Xt(e,t){this.Sa=e,this.Fa=t}(n=Be.prototype).insertBefore=function(e,t,n){return this.h.insertBefore(e,t,n)},n.removeAttributeNS=function(e,t,n){return this.h.removeAttributeNS(e,t,n)},n.removeChild=function(e,t){return this.h.removeChild(e,t)},n.setAttributeNS=function(e,t,n,r){this.h.setAttributeNS(e,t,n,r)},n.setData=function(e,t){this.h.setData(e,t)},Te.prototype.getAllAttributes=function(e,t){return Ne(e)?e.attributes:this.h.getAllAttributes(e,void 0===t?null:t)},Te.prototype.getChildNodes=function(e,t){return t=Ne(e)?e.childNodes:this.h.getChildNodes(e,void 0===t?null:t),9===e.nodeType?t.filter((function(e){return 10!==e.nodeType})):t},Te.prototype.getData=function(e){return Ne(e)?2===e.nodeType?e.value:e.data:this.h.getData(e)||""},Te.prototype.getParentNode=function(e,t){return this.h.getParentNode(e,void 0===t?null:t)},v(He,ge),v(qe,ge),(n=Ve.prototype).Za=function(){return 0},n.getHours=function(){return 0},n.getMinutes=function(){return 0},n.$a=function(){return 0},n.ab=function(){return 0},n.bb=function(){return 0},n.getSeconds=function(){return 0},n.cb=function(){return 0},n.oa=function(){return!0},v(Qe,Ve),(n=Qe.prototype).Za=function(){return Math.trunc(this.ea/86400)},n.getHours=function(){return Math.trunc(this.ea%86400/3600)},n.getMinutes=function(){return Math.trunc(this.ea%3600/60)},n.bb=function(){return this.ea},n.getSeconds=function(){var e=this.ea%60;return Object.is(-0,e)?0:e},n.oa=function(){return!Object.is(-0,this.ea)&&0<=this.ea},n.toString=function(){return(this.oa()?"P":"-P")+Je(this)},(n=at.prototype).getDay=function(){return this.o},n.getHours=function(){return this.v},n.getMinutes=function(){return this.C},n.getMonth=function(){return this.h},n.getSeconds=function(){return this.J},n.getYear=function(){return this.B},n.toString=function(){switch(this.type){case 9:return et(this.B)+"-"+tt(this.h)+"-"+tt(this.o)+"T"+tt(this.v)+":"+tt(this.C)+":"+nt(this.J+this.pa)+(this.ba?rt(this.ba):"");case 7:return et(this.B)+"-"+tt(this.h)+"-"+tt(this.o)+(this.ba?rt(this.ba):"");case 8:return tt(this.v)+":"+tt(this.C)+":"+nt(this.J+this.pa)+(this.ba?rt(this.ba):"");case 15:return"---"+tt(this.o)+(this.ba?rt(this.ba):"");case 14:return"--"+tt(this.h)+(this.ba?rt(this.ba):"");case 13:return"--"+tt(this.h)+"-"+tt(this.o)+(this.ba?rt(this.ba):"");case 12:return et(this.B)+(this.ba?rt(this.ba):"");case 11:return et(this.B)+"-"+tt(this.h)+(this.ba?rt(this.ba):"")}throw Error("Unexpected subType")},v(Ft,Ve),(n=Ft.prototype).$a=function(){var e=this.ha%12;return 0===e?0:e},n.ab=function(){return this.ha},n.cb=function(){return Math.trunc(this.ha/12)},n.oa=function(){return!Object.is(-0,this.ha)&&0<=this.ha},n.toString=function(){return(this.oa()?"P":"-P")+Pt(this)},v(Xt,Ve),(n=Xt.prototype).Za=function(){return this.Fa.Za()},n.getHours=function(){return this.Fa.getHours()},n.getMinutes=function(){return this.Fa.getMinutes()},n.$a=function(){return this.Sa.$a()},n.ab=function(){return this.Sa.ab()},n.bb=function(){return this.Fa.bb()},n.getSeconds=function(){return this.Fa.getSeconds()},n.cb=function(){return this.Sa.cb()},n.oa=function(){return this.Sa.oa()&&this.Fa.oa()},n.toString=function(){var e=this.oa()?"P":"-P",t=Pt(this.Sa),n=Je(this.Fa);return"0M"===t?e+n:"T0S"===n?e+t:e+t+n};var _t=[3,6,4,5];function Lt(e){if(e(1)||e(19))return function(e){return{u:!0,value:e+""}};if(e(20))return function(e){return{u:!0,value:e}};if(e(23))return function(e){return{u:!0,value:e.prefix?e.prefix+":"+e.localName:e.localName}};if(e(44))return function(e){return{u:!0,value:e.toString()}};if(e(2)){if(e(5)||e(4))return function(e){return{u:!0,value:(e+"").replace("e","E")}};if(e(6)||e(3))return function(e){return isNaN(e)?{u:!0,value:"NaN"}:isFinite(e)?Object.is(e,-0)?{u:!0,value:"-0"}:{u:!0,value:(e+"").replace("e","E").replace("E+","E")}:{u:!0,value:(0>e?"-":"")+"INF"}}}return e(9)||e(7)||e(8)||e(15)||e(14)||e(13)||e(12)||e(11)||e(16)||e(17)||e(18)?function(e){return{u:!0,value:e.toString()}}:e(22)?function(e){return{u:!0,value:e.toUpperCase()}}:function(e){return{u:!0,value:e+""}}}var kt=[2,5,17,16];function qt(e,t){function n(t){return Z(e,t)}if(39===t)return function(){return{u:!1,error:Error("FORG0001: Casting to xs:error is always invalid.")}};switch(t){case 19:return function(e){var t=Lt(e);return function(e){return(e=t(e)).u?{u:!0,value:V(e.value,19)}:e}}(n);case 1:return function(e){var t=Lt(e);return function(e){return(e=t(e)).u?{u:!0,value:V(e.value,1)}:e}}(n);case 6:return function(e){var t=Ut(e,6);return function(e){return(e=t(e)).u?{u:!0,value:V(e.value,6)}:e}}(n);case 3:return function(e){var t=Ut(e,3);return function(e){return(e=t(e)).u?{u:!0,value:V(e.value,3)}:e}}(n);case 4:return function(e){return e(5)?function(e){return{u:!0,value:V(e,4)}}:e(6)||e(3)?function(e){return isNaN(e)||!isFinite(e)?{u:!1,error:Error("FOCA0002: Can not cast "+e+" to xs:decimal")}:Math.abs(e)>Number.MAX_VALUE?{u:!1,error:Error("FOAR0002: Can not cast "+e+" to xs:decimal, it is out of bounds for JavaScript numbers")}:{u:!0,value:V(e,4)}}:e(0)?function(e){return{u:!0,value:V(e?1:0,4)}}:e(1)||e(19)?function(e){var t=parseFloat(e);return!isNaN(t)||isFinite(t)?{u:!0,value:V(t,4)}:{u:!1,error:Error("FORG0001: Can not cast "+e+" to xs:decimal")}}:function(){return{u:!1,error:Error("XPTY0004: Casting not supported from given type to xs:decimal or any of its derived types.")}}}(n);case 5:return function(e){return e(0)?function(e){return{u:!0,value:V(e?1:0,5)}}:e(2)?function(e){var t=Math.trunc(e);return!isFinite(t)||isNaN(t)?{u:!1,error:Error("FOCA0002: can not cast "+e+" to xs:integer")}:Number.isSafeInteger(t)?{u:!0,value:V(t,5)}:{u:!1,error:Error("FOAR0002: can not cast "+e+" to xs:integer, it is out of bounds for JavaScript numbers.")}}:e(1)||e(19)?function(e){var t=parseInt(e,10);return isNaN(t)?{u:!1,error:Nt(e,5)}:Number.isSafeInteger(t)?{u:!0,value:V(t,5)}:{u:!1,error:Error("FOCA0003: can not cast "+e+" to xs:integer, it is out of bounds for JavaScript numbers.")}}:function(){return{u:!1,error:Error("XPTY0004: Casting not supported from given type to xs:integer or any of its derived types.")}}}(n);case 2:return function(e){var t=qt;return function(n){for(var r=u(_t),a=r.next();!a.done;a=r.next())if((a=t(e,a.value)(n)).u)return a;return{u:!1,error:Error('XPTY0004: Casting not supported from "'+n+'" given type to xs:numeric or any of its derived types.')}}}(e);case 18:return function(e){return e(16)?function(e){return{u:!0,value:V(new Xt(e,new Qe(e.oa()?0:-0)),18)}}:e(17)?function(e){return{u:!0,value:V(e=new Xt(new Ft(e.oa()?0:-0),e),18)}}:e(18)?function(e){return{u:!0,value:V(e,18)}}:e(19)||e(1)?function(e){return{u:!0,value:V(new Xt(Ht(e),ze(e)),18)}}:function(){return{u:!1,error:Error("XPTY0004: Casting not supported from given type to xs:duration or any of its derived types.")}}}(n);case 16:return function(e){return e(18)&&!e(17)?function(e){return{u:!0,value:V(e.Sa,16)}}:e(17)?function(){return{u:!0,value:V(Ht("P0M"),16)}}:e(19)||e(1)?function(e){var t=Ht(e);return t?{u:!0,value:V(t,16)}:{u:!1,error:Nt(e,16)}}:function(){return{u:!1,error:Error("XPTY0004: Casting not supported from given type to xs:yearMonthDuration or any of its derived types.")}}}(n);case 17:return function(e){return e(18)&&!e(16)?function(e){return{u:!0,value:V(e.Fa,17)}}:e(16)?function(){return{u:!0,value:V(ze("PT0.0S"),17)}}:e(19)||e(1)?function(e){var t=ze(e);return t?{u:!0,value:V(t,17)}:{u:!1,error:Error("FORG0001: Can not cast "+e+" to xs:dayTimeDuration")}}:function(){return{u:!1,error:Error("XPTY0004: Casting not supported from given type to xs:dayTimeDuration or any of its derived types.")}}}(n);case 9:return function(e){return e(7)?function(e){return{u:!0,value:V(it(e,9),9)}}:e(19)||e(1)?function(e){return{u:!0,value:V(st(e),9)}}:function(){return{u:!1,error:Error("XPTY0004: Casting not supported from given type to xs:dateTime or any of its derived types.")}}}(n);case 8:return function(e){return e(9)?function(e){return{u:!0,value:V(it(e,8),8)}}:e(19)||e(1)?function(e){return{u:!0,value:V(st(e),8)}}:function(){return{u:!1,error:Error("XPTY0004: Casting not supported from given type to xs:time or any of its derived types.")}}}(n);case 7:return function(e){return e(9)?function(e){return{u:!0,value:V(it(e,7),7)}}:e(19)||e(1)?function(e){return{u:!0,value:V(st(e),7)}}:function(){return{u:!1,error:Error("XPTY0004: Casting not supported from given type to xs:date or any of its derived types.")}}}(n);case 11:return function(e){return e(7)||e(9)?function(e){return{u:!0,value:V(it(e,11),11)}}:e(19)||e(1)?function(e){return{u:!0,value:V(st(e),11)}}:function(){return{u:!1,error:Error("XPTY0004: Casting not supported from given type to xs:gYearMonth or any of its derived types.")}}}(n);case 12:return function(e){return e(7)||e(9)?function(e){return{u:!0,value:V(it(e,12),12)}}:e(19)||e(1)?function(e){return{u:!0,value:V(st(e),12)}}:function(){return{u:!1,error:Error("XPTY0004: Casting not supported from given type to xs:gYear or any of its derived types.")}}}(n);case 13:return function(e){return e(7)||e(9)?function(e){return{u:!0,value:V(it(e,13),13)}}:e(19)||e(1)?function(e){return{u:!0,value:V(st(e),13)}}:function(){return{u:!1,error:Error("XPTY0004: Casting not supported from given type to xs:gMonthDay or any of its derived types.")}}}(n);case 15:return function(e){return e(7)||e(9)?function(e){return{u:!0,value:V(it(e,15),15)}}:e(19)||e(1)?function(e){return{u:!0,value:V(st(e),15)}}:function(){return{u:!1,error:Error("XPTY0004: Casting not supported from given type to xs:gDay or any of its derived types.")}}}(n);case 14:return function(e){return e(7)||e(9)?function(e){return{u:!0,value:V(it(e,14),14)}}:e(19)||e(1)?function(e){return{u:!0,value:V(st(e),14)}}:function(){return{u:!1,error:Error("XPTY0004: Casting not supported from given type to xs:gMonth or any of its derived types.")}}}(n);case 0:return function(e){return e(2)?function(e){return{u:!0,value:0===e||isNaN(e)?Q:Y}}:e(1)||e(19)?function(e){switch(e){case"true":case"1":return{u:!0,value:Y};case"false":case"0":return{u:!0,value:Q};default:return{u:!1,error:Error("XPTY0004: Casting not supported from given type to xs:boolean or any of its derived types.")}}}:function(){return{u:!1,error:Error("XPTY0004: Casting not supported from given type to xs:boolean or any of its derived types.")}}}(n);case 21:return function(e){return e(22)?function(e){for(var t="",n=0;n<e.length;n+=2)t+=String.fromCharCode(parseInt(e.substr(n,2),16));return{u:!0,value:V(btoa(t),21)}}:e(1)||e(19)?function(e){return{u:!0,value:V(e,21)}}:function(){return{error:Error("XPTY0004: Casting not supported from given type to xs:base64Binary or any of its derived types."),u:!1}}}(n);case 22:return function(e){return e(21)?function(e){for(var t="",n=0,r=(e=atob(e)).length;n<r;n++)t+=Number(e.charCodeAt(n)).toString(16);return{u:!0,value:V(t.toUpperCase(),22)}}:e(1)||e(19)?function(e){return{u:!0,value:V(e,22)}}:function(){return{u:!1,error:Error("XPTY0004: Casting not supported from given type to xs:hexBinary or any of its derived types.")}}}(n);case 20:return function(e){return e(1)||e(19)?function(e){return{u:!0,value:V(e,20)}}:function(){return{u:!1,error:Error("XPTY0004: Casting not supported from given type to xs:anyURI or any of its derived types.")}}}(n);case 23:throw Error("Casting to xs:QName is not implemented.")}return function(){return{u:!1,error:Error("XPTY0004: Casting not supported from "+e+" to "+t+".")}}}var Vt=Object.create(null);function Yt(e,t){if(19===e&&1===t)return function(e){return{u:!0,value:V(e,1)}};if(44===t)return function(){return{u:!1,error:Error("XPST0080: Casting to xs:NOTATION is not permitted.")}};if(39===t)return function(){return{u:!1,error:Error("FORG0001: Casting to xs:error is not permitted.")}};if(45===e||45===t)return function(){return{u:!1,error:Error("XPST0080: Casting from or to xs:anySimpleType is not permitted.")}};if(46===e||46===t)return function(){return{u:!1,error:Error("XPST0080: Casting from or to xs:anyAtomicType is not permitted.")}};if(Z(e,60)&&1===t)return function(){return{u:!1,error:Error("FOTY0014: Casting from function item to xs:string is not permitted.")}};if(e===t)return function(e){return{u:!0,value:{type:t,value:e}}};var n=kt.includes(e)?e:Rt(e),r=kt.includes(t)?t:Rt(t);if(null===r||null===n)return function(){return{u:!1,error:Error("XPST0081: Can not cast: type "+(r?he[e]:he[t])+" is unknown.")}};var a=[];return 1!==n&&19!==n||a.push((function(e){var n=Dt(e,t);return Mt(n,t)?{u:!0,value:n}:{u:!1,error:Nt(e,t,"pattern validation failed.")}})),n!==r&&(a.push(qt(n,r)),a.push((function(e){return{u:!0,value:e.value}}))),19!==r&&1!==r||a.push((function(e){return Mt(e,t)?{u:!0,value:e}:{u:!1,error:Nt(e,t,"pattern validation failed.")}})),a.push((function(e){return function(e,t){for(var n=q[t];n;){if(n.Ia&&!Object.keys(n.Ia).every((function(t){if("whiteSpace"===t)return!0;var r=Gt(n,t);return!r||r(e,n.Ia[t])})))return!1;n=n.parent}return!0}(e,t)?{u:!0,value:e}:{u:!1,error:Nt(e,t,"pattern validation failed.")}})),a.push((function(e){return{u:!0,value:{type:t,value:e}}})),function(e){e={u:!0,value:e};for(var t=0,n=a.length;t<n&&!1!==(e=a[t](e.value)).u;++t);return e}}function Qt(e,t){var n=e.type+1e4*t,r=Vt[n];return r||(r=Vt[n]=Yt(e.type,t)),r.call(void 0,e.value,t)}function Jt(e,t){if(!0===(e=Qt(e,t)).u)return e.value;throw e.error}function Kt(e){var t=!1;return{next:function(){return t?z:(t=!0,W(e))}}}function zt(e,t){return!!(e===t||e.node===t.node&&function e(t,n){return t===n||!(!t||!n||t.offset!==n.offset||t.parent!==n.parent)&&e(t.G,n.G)}(e.G,t.G))}function Wt(e,t){for(var n=[];t;t=Ue(e,t,null))n.unshift(t);return n}function Zt(e,t){for(var n=[];t;t=e.getParentNode(t,null))n.unshift(t);return n}function $t(e,t,n,r){if(n.G||r.G||Ne(n.node)||Ne(r.node)){if(zt(n,r))return 0;n=Wt(t,n),r=Wt(t,r);var a=n[0],i=r[0];if(!zt(a,i))return t=e.findIndex((function(e){return zt(e,a)})),n=e.findIndex((function(e){return zt(e,i)})),-1===t&&(t=e.push(a)),-1===n&&(n=e.push(i)),t-n;e=1;for(var o=Math.min(n.length,r.length);e<o&&zt(n[e],r[e]);++e);return n[e]?r[e]?function(e,t,n){var r=Ue(e,t,null);e=Se(e,r,null),r=0;for(var a=e.length;r<a;++r){var i=e[r];if(zt(i,t))return-1;if(zt(i,n))return 1}}(t,n[e],r[e]):1:-1}if((n=n.node)===(r=r.node))return 0;if(n=Zt(t,n),r=Zt(t,r),n[0]!==r[0]){var s={node:n[0],G:null},u={node:r[0],G:null};return t=e.findIndex((function(e){return zt(e,s)})),n=e.findIndex((function(e){return zt(e,u)})),-1===t&&(t=e.push(s)),-1===n&&(n=e.push(u)),t-n}for(o=1,e=Math.min(n.length,r.length);o<e&&n[o]===r[o];++o);if(e=n[o],n=r[o],!e)return-1;if(!n)return 1;for(t=t.getChildNodes(r[o-1],null),r=0,o=t.length;r<o;++r){var l=t[r];if(l===e)return-1;if(l===n)return 1}}function en(e,t,n,r){var a=Z(n.type,47),i=Z(r.type,47);if(a&&!i){if(zt(n=Ue(t,n.value),r=r.value))return 1}else if(i&&!a){if(zt(n=n.value,r=Ue(t,r.value)))return-1}else if(a&&i){if(zt(Ue(t,r.value),Ue(t,n.value)))return n.value.node.localName>r.value.node.localName?1:-1;n=Ue(t,n.value),r=Ue(t,r.value)}else n=n.value,r=r.value;return $t(e,t,n,r)}function tn(e,t,n){return en(e.o,e,t,n)}function nn(e,t){return function e(t,n){if(n=void 0===n?rn:n,1>=t.length)return t;var r=Math.floor(t.length/2),a=e(t.slice(0,r),n);for(t=e(t.slice(r),n),r=[];a.length&&t.length;)0>n(a[0],t[0])?r.push(a.shift()):r.push(t.shift());return r.concat(a.concat(t))}(t,(function(t,n){return en(e.o,e,t,n)})).filter((function(e,t,n){return 0===t||!zt(e.value,n[t-1].value)}))}function rn(e,t){return e<t?-1:0}var an=e;function on(e,t,n,r,a){if(Z(e.type,t.type))return e;if(Z(t.type,46)&&Z(e.type,53)&&(e=Ot(e,n).first()),Z(e.type,t.type)||46===t.type)return e;if(Z(e.type,19)){if(!(n=Jt(e,t.type)))throw Error("XPTY0004 Unable to convert "+(a?"return":"argument")+" of type "+he[e.type]+" to type "+fe(t)+" while calling "+r);return n}if(!(n=function(e,t){if(Z(e.type,2)){if(Z(e.type,6))return 3===t?V(e.value,3):null;if(Z(e.type,4)){if(6===t)return V(e.value,6);if(3===t)return V(e.value,3)}return null}return Z(e.type,20)&&1===t?V(e.value,1):null}(e,t.type)))throw Error("XPTY0004 Unable to cast "+(a?"return":"argument")+" of type "+he[e.type]+" to type "+fe(t)+" while calling "+r);return n}function sn(e,t,n,r,a){return 0===e.g?t.aa({default:function(){return t.map((function(t){return on(t,e,n,r,a)}))},multiple:function(){throw Error("XPTY0004: Multiplicity of "+(a?"function return value":"function argument")+" of type "+he[e.type]+(e.type||"")+" for "+r+' is incorrect. Expected "?", but got "+".')}}):1===e.g?t.aa({empty:function(){throw Error("XPTY0004: Multiplicity of "+(a?"function return value":"function argument")+" of type "+he[e.type]+(e.type||"")+" for "+r+' is incorrect. Expected "+", but got "empty-sequence()"')},default:function(){return t.map((function(t){return on(t,e,n,r,a)}))}}):2===e.g?t.map((function(t){return on(t,e,n,r,a)})):t.aa({s:function(){return t.map((function(t){return on(t,e,n,r,a)}))},default:function(){throw Error("XPTY0004: Multiplicity of "+(a?"function return value":"function argument")+" of type "+he[e.type]+(e.type||"")+" for "+r+" is incorrect. Expected exactly one")}})}function un(e,t){return Z(e,5)?V(t,5):Z(e,6)?V(t,6):Z(e,3)?V(t,3):V(t,4)}function ln(e,t,n,r,a,i){var o=!1;return se.create({next:function(){if(o)return z;var t,n=a.first();if(!n)return o=!0,z;if((Z(n.type,6)||Z(n.type,3))&&(0===n.value||isNaN(n.value)||1/0===n.value||-1/0===n.value))return o=!0,W(n);if(t=i?i.first().value:0,o=!0,function(e){if(Math.floor(e)===e||isNaN(e))return 0;var t=(e=/\d+(?:\.(\d*))?(?:[Ee](-)?(\d+))*/.exec(e+""))[1]?e[1].length:0;return e[3]?e[2]?t+parseInt(e[3],10):0>(e=t-parseInt(e[3],10))?0:e:t}(n.value)<t)return W(n);var r=[5,4,3,6].find((function(e){return Z(n.type,e)}));switch(t=function(e,t,n){return t&&0==e*n%1%.5?0==Math.floor(e*n)%2?Math.floor(e*n)/n:Math.ceil(e*n)/n:Math.round(e*n)/n}(Jt(n,4).value,e,Math.pow(10,t)),r){case 4:return W(V(t,4));case 3:return W(V(t,3));case 6:return W(V(t,6));case 5:return W(V(t,5))}}})}function cn(e,t,n,r){return St(r,t).aa({empty:function(){return se.s(V(NaN,3))},s:function(){var e=Qt(r.first(),3);return e.u?se.s(e.value):se.s(V(NaN,3))},multiple:function(){throw Error("fn:number may only be called with zero or one values")}})}function hn(e,t,n,r){return r.F()?r:(e=r.S(),se.s(e[Math.floor(Math.random()*e.length)]))}var pn=[{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"abs",l:[{type:2,g:0}],j:{type:2,g:0},m:function(e,t,n,r){return r.map((function(e){return un(e.type,Math.abs(e.value))}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"ceiling",l:[{type:2,g:0}],j:{type:2,g:0},m:function(e,t,n,r){return r.map((function(e){return un(e.type,Math.ceil(e.value))}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"floor",l:[{type:2,g:0}],j:{type:2,g:0},m:function(e,t,n,r){return r.map((function(e){return un(e.type,Math.floor(e.value))}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"round",l:[{type:2,g:0}],j:{type:2,g:0},m:ln.bind(null,!1)},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"round",l:[{type:2,g:0},{type:5,g:3}],j:{type:2,g:0},m:ln.bind(null,!1)},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"round-half-to-even",l:[{type:2,g:0}],j:{type:2,g:0},m:ln.bind(null,!0)},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"round-half-to-even",l:[{type:2,g:0},{type:5,g:3}],j:{type:2,g:0},m:ln.bind(null,!0)},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"number",l:[{type:46,g:0}],j:{type:3,g:3},m:cn},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"number",l:[],j:{type:3,g:3},m:function(e,t,n){var r=e.O&&sn({type:46,g:0},se.s(e.O),t,"fn:number",!1);if(!r)throw Error("XPDY0002: fn:number needs an atomizable context item.");return cn(0,t,0,r)}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"random-number-generator",l:[],j:{type:61,g:3},m:function e(){return se.s(new qe([{key:V("number",1),value:function(){return se.s(V(Math.random(),3))}},{key:V("next",1),value:function(){return se.s(new ge({value:e,Oa:!0,localName:"",namespaceURI:"",l:[],arity:0,j:{type:61,g:3}}))}},{key:V("permute",1),value:function(){return se.s(new ge({value:hn,Oa:!0,localName:"",namespaceURI:"",l:[{type:59,g:2}],arity:1,j:{type:59,g:2}}))}}]))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"random-number-generator",l:[{type:46,g:0}],j:{type:61,g:3},m:function(){throw Error("Not implemented: Specifying a seed is not supported")}}];function fn(){throw Error("FOCH0002: No collations are supported")}function dn(e,t,n,r){if(null===t.O)throw Error("XPDY0002: The function which was called depends on dynamic context, which is absent.");return e(t,n,r,se.s(t.O))}function mn(e,t,n,r){return r.aa({empty:function(){return se.s(V("",1))},default:function(){return r.map((function(e){if(Z(e.type,53)){var n=Ot(e,t).first();return Z(e.type,47)?Jt(n,1):n}return Jt(e,1)}))}})}function vn(e,t,n,r,a){return _e([a],(function(e){var n=u(e).next().value;return St(r,t).M((function(e){return e=e.map((function(e){return Jt(e,1).value})).join(n.value),se.s(V(e,1))}))}))}function gn(e,t,n,r){return r.F()?se.s(V(0,5)):(e=r.first().value,se.s(V(Array.from(e).length,5)))}function yn(e,t,n,r,a,i){var o=ln(!1,0,0,0,a,null),s=null!==i?ln(!1,0,0,0,i,null):null,u=!1,l=null,c=null,h=null;return se.create({next:function(){return u?z:l||null!==(l=r.first())?(c||(c=o.first()),!h&&i&&(h=null,h=s.first()),u=!0,W(V(Array.from(l.value).slice(Math.max(c.value-1,0),i?c.value+h.value-1:void 0).join(""),1))):(u=!0,W(V("",1)))}})}function wn(e,t,n,r,a){if(r.F()||0===r.first().value.length)return se.empty();e=r.first().value,a=a.first().value;try{var i=new RegExp(a)}catch(e){throw Error("FORX0002: "+e)}return se.create(e.split(i).map((function(e){return V(e,1)})))}function An(e,t,n,r){return r.F()?se.s(V("",1)):(e=r.first().value.trim(),se.s(V(e.replace(/\s+/g," "),1)))}var xn=new Map,bn=[{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"compare",l:[{type:1,g:0},{type:1,g:0}],j:{type:5,g:0},m:function(e,t,n,r,a){return r.F()||a.F()?se.empty():(e=r.first().value)>(a=a.first().value)?se.s(V(1,5)):e<a?se.s(V(-1,5)):se.s(V(0,5))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"compare",l:[{type:1,g:0},{type:1,g:0},{type:1,g:3}],j:{type:5,g:0},m:fn},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"concat",l:[{type:46,g:0},{type:46,g:0},4],j:{type:1,g:3},m:function(e,t,n,r){for(var a=[],i=3;i<arguments.length;++i)a[i-3]=arguments[i];return _e(a=a.map((function(e){return St(e,t).M((function(e){return se.s(V(e.map((function(e){return null===e?"":Jt(e,1).value})).join(""),1))}))})),(function(e){return se.s(V(e.map((function(e){return e.value})).join(""),1))}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"contains",l:[{type:1,g:0},{type:1,g:0},{type:1,g:0}],j:{type:0,g:3},m:fn},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"contains",l:[{type:1,g:0},{type:1,g:0}],j:{type:0,g:3},m:function(e,t,n,r,a){return e=r.F()?"":r.first().value,0===(a=a.F()?"":a.first().value).length?se.$():0===e.length?se.U():e.includes(a)?se.$():se.U()}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"ends-with",l:[{type:1,g:0},{type:1,g:0}],j:{type:0,g:3},m:function(e,t,n,r,a){return 0===(e=a.F()?"":a.first().value).length?se.$():0===(r=r.F()?"":r.first().value).length?se.U():r.endsWith(e)?se.$():se.U()}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"ends-with",l:[{type:1,g:0},{type:1,g:0},{type:1,g:3}],j:{type:0,g:3},m:fn},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"normalize-space",l:[{type:1,g:0}],j:{type:1,g:3},m:An},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"normalize-space",l:[],j:{type:1,g:3},m:dn.bind(null,(function(e,t,n,r){return An(e,0,0,mn(0,t,0,r))}))},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"starts-with",l:[{type:1,g:0},{type:1,g:0}],j:{type:0,g:3},m:function(e,t,n,r,a){return 0===(e=a.F()?"":a.first().value).length?se.$():0===(r=r.F()?"":r.first().value).length?se.U():r.startsWith(e)?se.$():se.U()}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"starts-with",l:[{type:1,g:0},{type:1,g:0},{type:1,g:3}],j:{type:0,g:3},m:fn},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"string",l:[{type:59,g:0}],j:{type:1,g:3},m:mn},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"string",l:[],j:{type:1,g:3},m:dn.bind(null,mn)},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"substring-before",l:[{type:1,g:0},{type:1,g:0}],j:{type:1,g:3},m:function(e,t,n,r,a){return e=r.F()?"":r.first().value,""===(a=a.F()?"":a.first().value)||-1===(a=e.indexOf(a))?se.s(V("",1)):se.s(V(e.substring(0,a),1))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"substring-after",l:[{type:1,g:0},{type:1,g:0}],j:{type:1,g:3},m:function(e,t,n,r,a){return e=r.F()?"":r.first().value,""===(a=a.F()?"":a.first().value)?se.s(V(e,1)):-1===(t=e.indexOf(a))?se.s(V("",1)):se.s(V(e.substring(t+a.length),1))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"substring",l:[{type:1,g:0},{type:3,g:3}],j:{type:1,g:3},m:yn},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"substring",l:[{type:1,g:0},{type:3,g:3},{type:3,g:3}],j:{type:1,g:3},m:yn},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"upper-case",l:[{type:1,g:0}],j:{type:1,g:3},m:function(e,t,n,r){return r.F()?se.s(V("",1)):r.map((function(e){return V(e.value.toUpperCase(),1)}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"lower-case",l:[{type:1,g:0}],j:{type:1,g:3},m:function(e,t,n,r){return r.F()?se.s(V("",1)):r.map((function(e){return V(e.value.toLowerCase(),1)}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"string-join",l:[{type:46,g:2},{type:1,g:3}],j:{type:1,g:3},m:vn},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"string-join",l:[{type:46,g:2}],j:{type:1,g:3},m:function(e,t,n,r){return vn(0,t,0,r,se.s(V("",1)))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"string-length",l:[{type:1,g:0}],j:{type:5,g:3},m:gn},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"string-length",l:[],j:{type:5,g:3},m:dn.bind(null,(function(e,t,n,r){return gn(e,0,0,mn(0,t,0,r))}))},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"tokenize",l:[{type:1,g:0},{type:1,g:3},{type:1,g:3}],j:{type:1,g:2},m:function(){throw Error("Not implemented: Using flags in tokenize is not supported")}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"tokenize",l:[{type:1,g:0},{type:1,g:3}],j:{type:1,g:2},m:wn},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"tokenize",l:[{type:1,g:0}],j:{type:1,g:2},m:function(e,t,n,r){return wn(e,0,0,An(e,0,0,r),se.s(V(" ",1)))}},{l:[{type:1,g:0},{type:1,g:3},{type:1,g:3}],m:function(e,t,n,r,a,i){return _e([r,a,i],(function(e){var t=u(e),n=t.next().value;e=t.next().value,t=t.next().value,n=Array.from(n?n.value:"");var r=Array.from(e.value),a=Array.from(t.value);return e=n.map((function(e){return r.includes(e)?(e=r.indexOf(e))<=a.length?a[e]:void 0:e})),se.s(V(e.join(""),1))}))},localName:"translate",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:1,g:3}},{l:[{type:5,g:2}],m:function(e,t,n,r){return r.M((function(e){return e=e.map((function(e){if(9===(e=e.value)||10===e||13===e||32<=e&&55295>=e||57344<=e&&65533>=e||65536<=e&&1114111>=e)return String.fromCodePoint(e);throw Error("FOCH0001")})).join(""),se.s(V(e,1))}))},localName:"codepoints-to-string",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:1,g:3}},{l:[{type:1,g:0}],m:function(e,t,n,r){return _e([r],(function(e){return 0===(e=(e=u(e).next().value)?e.value.split(""):[]).length?se.empty():se.create(e.map((function(e){return V(e.codePointAt(0),5)})))}))},localName:"string-to-codepoints",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:5,g:2}},{l:[{type:1,g:0}],m:function(e,t,n,r){return _e([r],(function(e){return null===(e=u(e).next().value)||0===e.value.length?se.create(V("",1)):se.create(V(encodeURIComponent(e.value).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})),1))}))},localName:"encode-for-uri",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:1,g:3}},{l:[{type:1,g:0}],m:function(e,t,n,r){return _e([r],(function(e){return null===(e=u(e).next().value)||0===e.value.length?se.create(V("",1)):se.create(V(e.value.replace(/([\u00A0-\uD7FF\uE000-\uFDCF\uFDF0-\uFFEF "<>{}|\\^`/\n\u007f\u0080-\u009f]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,(function(e){return encodeURI(e)})),1))}))},localName:"iri-to-uri",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:1,g:3}},{l:[{type:1,g:0},{type:1,g:0}],m:function(e,t,n,r,a){return _e([r,a],(function(e){var t=u(e);if(e=t.next().value,t=t.next().value,null===e||null===t)return se.empty();if(e=e.value,t=t.value,e.length!==t.length)return se.U();e=e.split(""),t=t.split("");for(var n=0;n<e.length;n++)if(e[n].codePointAt(0)!==t[n].codePointAt(0))return se.U();return se.$()}))},localName:"codepoint-equal",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:0,g:0}},{l:[{type:1,g:0},{type:1,g:3}],m:function(e,t,n,r,a){return _e([r,a],(function(e){var t=(e=u(e)).next().value;e=e.next().value,t=t?t.value:"";var n=e.value,r=xn.get(n);if(!r)try{r=an.compile(e.value,{language:"xpath"}),xn.set(n,r)}catch(e){throw Error("FORX0002: "+e)}return r(t)?se.$():se.U()}))},localName:"matches",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:0,g:3}}];function En(e,t,n,r){if(null===t.O)throw Error("XPDY0002: The function which was called depends on dynamic context, which is absent.");return e(t,n,r,se.s(t.O))}function Bn(e,t,n,r){return _e([r],(function(e){if(null===(e=u(e).next().value))return se.empty();switch((e=e.value).node.nodeType){case 1:case 2:return se.s(V(new ve(e.node.prefix,e.node.namespaceURI,e.node.localName),23));case 7:return se.s(V(new ve("","",e.node.target),23));default:return se.empty()}}))}function Nn(e,t,n,r){return r.aa({default:function(){return mn(0,t,0,Bn(0,0,0,r))},empty:function(){return se.empty()}})}function Cn(e,t,n,r){return St(r,t)}function Tn(e,t,n,r){return _e([r],(function(e){return null!==(e=(e=u(e).next().value)?e.value:null)&&De(t.h,e,null)?se.$():se.U()}))}function In(e,t,n,r){return _e([r],(function(e){function n(e){for(var t=0,n=e;null!==n;)(e.node.nodeType!==n.node.nodeType?0:1===n.node.nodeType?n.node.localName===e.node.localName&&n.node.namespaceURI===e.node.namespaceURI:7===n.node.nodeType?n.node.target===e.node.target:1)&&t++,n=Fe(a,n,null);return t}var r=u(e).next().value;if(null===r)return se.empty();var a=t.h;for(e="",r=r.value;null!==Ue(t.h,r,null);r=Ue(t.h,r,null))switch(r.node.nodeType){case 1:var i=r;e="/Q{"+(i.node.namespaceURI||"")+"}"+i.node.localName+"["+n(i)+"]"+e;break;case 2:e="/@"+((i=r).node.namespaceURI?"Q{"+i.node.namespaceURI+"}":"")+i.node.localName+e;break;case 3:e="/text()["+n(r)+"]"+e;break;case 7:e="/processing-instruction("+(i=r).node.target+")["+n(i)+"]"+e;break;case 8:e="/comment()["+n(r)+"]"+e}return 9===r.node.nodeType?se.create(V(e||"/",1)):se.create(V("Q{http://www.w3.org/2005/xpath-functions}root()"+e,1))}))}function On(e,t,n,r){return r.map((function(e){return V(e.value.node.namespaceURI||"",20)}))}function Sn(e,t,n,r){return r.aa({default:function(){return r.map((function(e){return 7===e.value.node.nodeType?V(e.value.node.target,1):V(e.value.node.localName||"",1)}))},empty:function(){return se.s(V("",1))}})}function Rn(e,t,n){if(2===t.node.nodeType)return zt(t,n);for(;n;){if(zt(t,n))return!0;if(9===n.node.nodeType)break;n=Ue(e,n,null)}return!1}function Dn(e,t,n,r){return r.map((function(e){if(!Z(e.type,53))throw Error("XPTY0004 Argument passed to fn:root() should be of the type node()");for(e=e.value;e;){var n=e;e=Ue(t.h,n,null)}return Xe(n)}))}var Mn=[{l:[{type:53,g:0}],m:Nn,localName:"name",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:1,g:0}},{l:[],m:En.bind(null,Nn),localName:"name",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:1,g:3}},{l:[{type:53,g:3}],m:On,localName:"namespace-uri",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:20,g:3}},{l:[],m:En.bind(null,On),localName:"namespace-uri",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:20,g:3}},{l:[{type:53,g:2}],m:function(e,t,n,r){return r.M((function(e){return e.length?(e=nn(t.h,e).reduceRight((function(e,n,r,a){return r===a.length-1?(e.push(n),e):(Rn(t.h,n.value,e[0].value)||e.unshift(n),e)}),[]),se.create(e)):se.empty()}))},localName:"innermost",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:53,g:2}},{l:[{type:53,g:2}],m:function(e,t,n,r){return r.M((function(e){return e.length?(e=nn(t.h,e).reduce((function(e,n,r){return 0===r?(e.push(n),e):(Rn(t.h,e[e.length-1].value,n.value)||e.push(n),e)}),[]),se.create(e)):se.empty()}),1)},localName:"outermost",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:53,g:2}},{l:[{type:53,g:0}],m:Tn,localName:"has-children",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:0,g:3}},{l:[],m:En.bind(null,Tn),localName:"has-children",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:0,g:3}},{l:[{type:53,g:0}],m:In,localName:"path",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:1,g:0}},{l:[],m:En.bind(null,In),localName:"path",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:1,g:0}},{l:[{type:53,g:0}],m:Bn,localName:"node-name",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:23,g:0}},{l:[],m:En.bind(null,Bn),localName:"node-name",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:23,g:0}},{l:[{type:53,g:0}],m:Sn,localName:"local-name",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:1,g:3}},{l:[],m:En.bind(null,Sn),localName:"local-name",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:1,g:3}},{l:[{type:53,g:0}],m:Dn,localName:"root",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:53,g:0}},{l:[],m:En.bind(null,Dn),localName:"root",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:53,g:0}},{l:[],m:En.bind(null,Cn),localName:"data",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:46,g:2}},{l:[{type:59,g:2}],m:Cn,localName:"data",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:46,g:2}}];function Gn(e,t){var n=0,r=e.length,a=!1,i=null;return{next:function(){if(!a){for(;n<r;){i||(i=t(e[n],n,e));var o=i.next(0);if(i=null,!o.value)return W(!1);n++}return a=!0,W(!0)}return z}}}function Un(e){return 1===(e=e.node.nodeType)||3===e}function Fn(e,t){if((Z(e.type,4)||Z(e.type,6))&&(Z(t.type,4)||Z(t.type,6))){var n=Jt(e,6),r=Jt(t,6);return n.value===r.value||isNaN(e.value)&&isNaN(t.value)}return(Z(e.type,4)||Z(e.type,6)||Z(e.type,3))&&(Z(t.type,4)||Z(t.type,6)||Z(t.type,3))?(n=Jt(e,3),r=Jt(t,3),n.value===r.value||isNaN(e.value)&&isNaN(t.value)):Z(e.type,23)&&Z(t.type,23)?e.value.namespaceURI===t.value.namespaceURI&&e.value.localName===t.value.localName:(Z(e.type,9)||Z(e.type,7)||Z(e.type,8)||Z(e.type,11)||Z(e.type,12)||Z(e.type,13)||Z(e.type,14)||Z(e.type,15))&&(Z(t.type,9)||Z(t.type,7)||Z(t.type,8)||Z(t.type,11)||Z(t.type,12)||Z(t.type,13)||Z(t.type,14)||Z(t.type,15))?lt(e.value,t.value):e.value===t.value}function Pn(e,t,n){return n=u([t,n].map((function(t){return{type:1,value:t.reduce((function(t,n){return t+Ot(n,e).first().value}),"")}}))),W(Fn(t=n.next().value,n=n.next().value))}function Hn(e,t,n,r){for(;e.value&&Z(e.value.type,56);){t.push(e.value);var a=Ge(r,e.value.value);if(e=n.next(0),a&&3!==a.node.nodeType)break}return e}function jn(e,t,n,r,a){var i,o=t.h,s=r.value,u=a.value,l=null,c=null,h=null,p=[],f=[];return{next:function(){for(;!i;)if(l||(l=s.next(0)),l=Hn(l,p,s,o),c||(c=u.next(0)),c=Hn(c,f,u,o),p.length||f.length){var r=Pn(t,p,f);if(p.length=0,f.length=0,!1===r.value)return i=!0,r}else{if(l.done||c.done)return i=!0,W(l.done===c.done);if(h||(h=_n(e,t,n,l.value,c.value)),r=h.next(0),h=null,!1===r.value)return i=!0,r;c=l=null}return z}}}function Xn(e,t,n,r,a){return r=Se(t.h,r.value),a=Se(t.h,a.value),r=r.filter((function(e){return Un(e)})),a=a.filter((function(e){return Un(e)})),jn(e,t,n,r=se.create(r.map((function(e){return Xe(e)}))),a=se.create(a.map((function(e){return Xe(e)}))))}function _n(e,t,n,r,a){if(Z(r.type,46)&&Z(a.type,46))return Kt(Fn(r,a));if(Z(r.type,61)&&Z(a.type,61))return function(e,t,n,r,a){return r.h.length!==a.h.length?Kt(!1):Gn(r.h,(function(r){var i=a.h.find((function(e){return Fn(e.key,r.key)}));return i?jn(e,t,n,r.value(),i.value()):Kt(!1)}))}(e,t,n,r,a);if(Z(r.type,62)&&Z(a.type,62))return function(e,t,n,r,a){return r.R.length!==a.R.length?Kt(!1):Gn(r.R,(function(r,i){return i=a.R[i],jn(e,t,n,r(),i())}))}(e,t,n,r,a);if(Z(r.type,53)&&Z(a.type,53)){if(Z(r.type,55)&&Z(a.type,55))return Xn(e,t,n,r,a);if(Z(r.type,54)&&Z(a.type,54))return function(e,t,n,r,a){var i=jn(e,t,n,Bn(0,0,0,se.s(r)),Bn(0,0,0,se.s(a))),o=Xn(e,t,n,r,a);r=Ie(t.h,r.value).filter((function(e){return"http://www.w3.org/2000/xmlns/"!==e.node.namespaceURI})).sort((function(e,t){return e.node.nodeName>t.node.nodeName?1:-1})).map((function(e){return Xe(e)})),a=Ie(t.h,a.value).filter((function(e){return"http://www.w3.org/2000/xmlns/"!==e.node.namespaceURI})).sort((function(e,t){return e.node.nodeName>t.node.nodeName?1:-1})).map((function(e){return Xe(e)}));var s=jn(e,t,n,se.create(r),se.create(a)),u=!1;return{next:function(){if(u)return z;var e=i.next(0);return(e.done||!1!==e.value)&&((e=s.next(0)).done||!1!==e.value)?(e=o.next(0),u=!0,e):(u=!0,e)}}}(e,t,n,r,a);if(Z(r.type,47)&&Z(a.type,47)||Z(r.type,57)&&Z(a.type,57)||Z(r.type,58)&&Z(a.type,58))return function(e,t,n,r,a){var i=jn(e,t,n,Bn(0,0,0,se.s(r)),Bn(0,0,0,se.s(a))),o=!1;return{next:function(){if(o)return z;var e=i.next(0);return e.done||!1!==e.value?W(Fn(Ot(r,t).first(),Ot(a,t).first())):(o=!0,e)}}}(e,t,n,r,a)}return Kt(!1)}function Ln(e){return Error("XUST0001: "+(void 0===e?"Can not execute an updating expression in a non-updating context.":e))}function kn(e){return Error("XUTY0004: The attribute "+e.name+'="'+e.value+'" follows a node that is not an attribute node.')}function qn(){return Error("XUTY0005: The target of a insert expression with into must be a single element or document node.")}function Vn(){return Error("XUTY0006: The target of a insert expression with before or after must be a single element, text, comment, or processing instruction node.")}function Yn(){return Error("XUTY0008: The target of a replace expression must be a single element, attribute, text, comment, or processing instruction node.")}function Qn(){return Error("XUTY0012: The target of a rename expression must be a single element, attribute, or processing instruction node.")}function Jn(e){return Error("XUDY0017: The target "+e.outerHTML+" is used in more than one replace value of expression.")}function Kn(e){return Error("XUDY0021: Applying the updates will result in the XDM instance violating constraint: '"+e+"'")}function zn(e){return Error("XUDY0023: The namespace binding "+e+" is conflicting.")}function Wn(e){return Error("XUDY0024: The namespace binding "+e+" is conflicting.")}function Zn(){return Error("XUDY0027: The target for an insert, replace, or rename expression expression should not be empty.")}function $n(e,t,n,r,a){n=void 0===n?{A:!1,Z:!1,T:"unsorted",subtree:!1}:n,this.K=e,this.B=n.T||"unsorted",this.subtree=!!n.subtree,this.Z=!!n.Z,this.A=!!n.A,this.J=t,this.I=!1,this.Ya=null,this.wb=void 0!==r&&r,this.type=a}function er(e,t,n){return t&&null!==t.O&&e.A?(null===e.Ya&&(e.Ya=ue(e.evaluate(null,n).pb())),e=e.Ya()):e=e.evaluate(t,n),e}function tr(e,t){this.H=e,this.fa=t}function nr(e){e&&"nodeType"in e&&("function"==typeof(e=e.ownerDocument||e).createElementNS&&"function"==typeof e.createProcessingInstruction&&"function"==typeof e.createTextNode&&"function"==typeof e.createComment&&(this.h=e)),this.h||(this.h=null)}function rr(e,t,n){t.forEach((function(t){n.insertBefore(e.node,t.node,null)}))}function ar(e,t,n,r){var a=Ue(n,e),i=e.node.nodeType;if(2===i){if(t.some((function(e){return 2!==e.node.nodeType})))throw Error('Constraint "If $target is an attribute node, $replacement must consist of zero or more attribute nodes." failed.');var o=a?a.node:null;r.removeAttributeNS(o,e.node.namespaceURI,e.node.nodeName),t.forEach((function(e){var t=e.node.nodeName;if(Oe(n,a,t))throw Kn("An attribute "+t+" already exists.");r.setAttributeNS(o,e.node.namespaceURI,t,Re(n,e))}))}if(1===i||3===i||8===i||7===i){var s=(i=Ge(n,e))?i.node:null;r.removeChild(a.node,e.node),t.forEach((function(e){r.insertBefore(a.node,e.node,s)}))}}function ir(e,t,n,r){if(function(e,t){function n(e){return new ve(e.node.prefix,e.node.namespaceURI,e.node.localName)}function r(t,n){var r=new Set;e.filter((function(e){return e.type===t})).map((function(e){return e.target})).forEach((function(e){e=e?e.node:null,r.has(e)&&n(e),r.add(e)}))}r("rename",(function(e){throw Error("XUDY0015: The target "+e.outerHTML+" is used in more than one rename expression.")})),r("replaceNode",(function(e){throw Error("XUDY0016: The target "+e.outerHTML+" is used in more than one replace expression.")})),r("replaceValue",(function(e){throw Jn(e)})),r("replaceElementContent",(function(e){throw Jn(e)}));var a=new Map;e.filter((function(e){return"replaceNode"===e.type&&2===e.target.node.nodeType})).forEach((function(e){var r=Ue(t,e.target);r=r?r.node:null;var i=a.get(r);i?i.push.apply(i,c(e.o.map(n))):a.set(r,e.o.map(n))})),e.filter((function(e){return"rename"===e.type&&2===e.target.node.nodeType})).forEach((function(e){var n=Ue(t,e.target);if(n){n=n.node;var r=a.get(n);r?r.push(e.o):a.set(n,[e.o])}})),a.forEach((function(e){var t={};e.forEach((function(e){if(t[e.prefix]||(t[e.prefix]=e.namespaceURI),t[e.prefix]!==e.namespaceURI)throw Wn(e.namespaceURI)}))}))}(e,t),e.filter((function(e){return-1!==["insertInto","insertAttributes","replaceValue","rename"].indexOf(e.type)})).forEach((function(e){switch(e.type){case"insertInto":rr(e.target,e.content,r);break;case"insertAttributes":!function(e,t,n,r){t.forEach((function(t){var a=t.node.nodeName;if(Oe(n,e,a))throw Kn("An attribute "+a+" already exists.");r.setAttributeNS(e.node,t.node.namespaceURI,a,Re(n,t))}))}(e.target,e.content,t,r);break;case"rename":!function(e,t,n,r,a){switch(r||(r=new nr(e?e.node:null)),e.node.nodeType){case 1:var i=n.getAllAttributes(e.node),o=n.getChildNodes(e.node),s=r.createElementNS(t.namespaceURI,t.va()),u={node:s,G:null};i.forEach((function(e){a.setAttributeNS(s,e.namespaceURI,e.nodeName,e.value)})),o.forEach((function(e){a.insertBefore(s,e,null)}));break;case 2:(t=r.createAttributeNS(t.namespaceURI,t.va())).value=Re(n,e),u={node:t,G:null};break;case 7:u={node:r.createProcessingInstruction(t.va(),Re(n,e)),G:null}}if(!Ue(n,e))throw Error("Not supported: renaming detached nodes.");ar(e,[u],n,a)}(e.target,e.o,t,n,r);break;case"replaceValue":var a=e.target;if(e=e.o,2===a.node.nodeType){var i=Ue(t,a);i?r.setAttributeNS(i.node,a.node.namespaceURI,a.node.nodeName,e):a.node.value=e}else r.setData(a.node,e)}})),e.filter((function(e){return-1!==["insertBefore","insertAfter","insertIntoAsFirst","insertIntoAsLast"].indexOf(e.type)})).forEach((function(e){switch(e.type){case"insertAfter":!function(e,t,n,r){var a=Ue(n,e).node,i=(e=Ge(n,e))?e.node:null;t.forEach((function(e){r.insertBefore(a,e.node,i)}))}(e.target,e.content,t,r);break;case"insertBefore":!function(e,t,n,r){var a=Ue(n,e).node;t.forEach((function(t){r.insertBefore(a,t.node,e.node)}))}(e.target,e.content,t,r);break;case"insertIntoAsFirst":!function(e,t,n,r){var a=(n=De(n,e))?n.node:null;t.forEach((function(t){r.insertBefore(e.node,t.node,a)}))}(e.target,e.content,t,r);break;case"insertIntoAsLast":rr(e.target,e.content,r)}})),e.filter((function(e){return"replaceNode"===e.type})).forEach((function(e){ar(e.target,e.o,t,r)})),e.filter((function(e){return"replaceElementContent"===e.type})).forEach((function(e){!function(e,t,n,r){n.getChildNodes(e.node).forEach((function(t){return r.removeChild(e.node,t)})),t&&r.insertBefore(e.node,t.node,null)}(e.target,e.text,t,r)})),e.filter((function(e){return"delete"===e.type})).forEach((function(e){e=e.target;var n=Ue(t,e);(n=n?n.node:null)&&(2===e.node.nodeType?r.removeAttributeNS(n,e.node.namespaceURI,e.node.nodeName):r.removeChild(n,e.node))})),e.some((function(e){return"put"===e.type})))throw Error('Not implemented: the execution for pendingUpdate "put" is not yet implemented.')}function or(e,t){for(var n=[],r=1;r<arguments.length;++r)n[r-1]=arguments[r];return e.concat.apply(e,c(n.filter(Boolean)))}function sr(e,t,n,r){$n.call(this,e,t,n,!0,r),this.I=!0}function ur(e){return e.I?function(t,n){return e.o(t,n)}:function(t,n){var r=e.evaluate(t,n);return{next:function(){return W({fa:[],H:r.S()})}}}}function lr(e,t){return t((e=e.next(0)).value.fa),se.create(e.value.H)}function cr(e,t,n,r){sr.call(this,e,t,n,r),this.I=this.J.some((function(e){return e.I}))}$n.prototype.Y=function(){return null},$n.prototype.P=function(e){if(this.J.forEach((function(t){return t.P(e)})),!this.wb&&this.J.some((function(e){return e.I})))throw Ln()},(n=nr.prototype).createAttributeNS=function(e,t){if(!this.h)throw Error("Please pass a node factory if an XQuery script uses node constructors");return this.h.createAttributeNS(e,t)},n.createCDATASection=function(e){if(!this.h)throw Error("Please pass a node factory if an XQuery script uses node constructors");return this.h.createCDATASection(e)},n.createComment=function(e){if(!this.h)throw Error("Please pass a node factory if an XQuery script uses node constructors");return this.h.createComment(e)},n.createDocument=function(){if(!this.h)throw Error("Please pass a node factory if an XQuery script uses node constructors");return this.h.implementation.createDocument(null,null,null)},n.createElementNS=function(e,t){if(!this.h)throw Error("Please pass a node factory if an XQuery script uses node constructors");return this.h.createElementNS(e,t)},n.createProcessingInstruction=function(e,t){if(!this.h)throw Error("Please pass a node factory if an XQuery script uses node constructors");return this.h.createProcessingInstruction(e,t)},n.createTextNode=function(e){if(!this.h)throw Error("Please pass a node factory if an XQuery script uses node constructors");return this.h.createTextNode(e)},v(sr,$n),sr.prototype.evaluate=function(){throw Ln()},v(cr,sr),cr.prototype.evaluate=function(e,t){return this.v(e,t,this.J.map((function(e){return function(n){return e.evaluate(n,t)}})))},cr.prototype.o=function(e,t){var n=[],r=this.v(e,t,this.J.map((function(e){return e.I?function(r){return lr(r=e.o(r,t),(function(e){return n=or(n,e)}))}:function(n){return e.evaluate(n,t)}}))),a=!1;return{next:function(){if(a)return z;var e=r.S();return a=!0,W(new tr(e,n))}}},cr.prototype.P=function(e){sr.prototype.P.call(this,e),function(e){e.J.some((function(e){return e.I}))&&(e.I=!0)}(this)};var hr=["external","attribute","nodeName","nodeType","universal"],pr=hr.length;function fr(e){if(this.h=hr.map((function(t){return e[t]||0})),Object.keys(e).some((function(e){return!hr.includes(e)})))throw Error("Invalid specificity kind passed")}function dr(e,t){for(var n=0;n<pr;++n){if(t.h[n]<e.h[n])return 1;if(t.h[n]>e.h[n])return-1}return 0}function mr(){return Ct("Expected base expression of a function call to evaluate to a sequence of single function item")}function vr(e,t,n,r){for(var a=[],i=0;i<t.length;++i)if(null===t[i])a.push(null);else{var o=sn(e[i],t[i],n,r,!1);a.push(o)}return a}function gr(e,t){if(!Z(e.type,60))throw Ct("Expected base expression to evaluate to a function item");if(e.B!==t)throw mr();return e}function yr(e,t,n,r,a,i,o){var s=0;return a=a.map((function(e){return e?null:i[s++](n)})),0<=(a=vr(e.o,a,r,e.J)).indexOf(null)?function(e,t){var n=e.value,r=t.map((function(e){return null===e?null:ue(e)}));return t=new ge({l:t=t.reduce((function(t,n,r){return null===n&&t.push(e.o[r]),t}),[]),arity:t.length,Oa:!0,I:e.I,localName:"boundFunction",namespaceURI:e.v,j:e.C,value:function(e,t,a){var i=Array.from(arguments).slice(3),o=r.map((function(e){return null===e?i.shift():e()}));return n.apply(void 0,[e,t,a].concat(o))}}),se.s(t)}(e,a):(t=t.apply(void 0,[n,r,o].concat(c(a))),sn(e.C,t,r,e.J,!0))}function wr(e,t,n){var r={};cr.call(this,new fr((r.external=1,r)),[e].concat(t.filter((function(e){return!!e}))),{T:"unsorted",Z:!1,subtree:!1,A:!1},n),this.ka=t.length,this.N=t.map((function(e){return null===e})),this.C=null,this.na=e,this.ua=t}function Ar(e,t,n,r,a,i){return _e([r,a,i],(function(e){var t=u(e);e=t.next().value;var n=t.next().value;if(t=t.next().value,n=n.value,t=t.value,n>e.R.length||0>=n)throw Error("FOAY0001: subarray start out of bounds.");if(0>t)throw Error("FOAY0002: subarray length out of bounds.");if(n+t>e.R.length+1)throw Error("FOAY0001: subarray start + length out of bounds.");return se.s(new He(e.R.slice(n-1,t+n-1)))}))}function xr(e,t,n,r,a){return _e([r],(function(e){var t=u(e).next().value;return a.M((function(e){e=e.map((function(e){return e.value})).sort((function(e,t){return t-e})).filter((function(e,t,n){return n[t-1]!==e}));for(var n=t.R.concat(),r=0,a=e.length;r<a;++r){var i=e[r];if(i>t.R.length||0>=i)throw Error("FOAY0001: subarray position out of bounds.");n.splice(i-1,1)}return se.s(new He(n))}))}))}function br(e){return Z(e,1)||Z(e,20)||Z(e,19)}function Er(e,t,n,r){return r.sort((function(r,a){return jn(e,t,n,se.create(r),se.create(a)).next(0).value?0:function e(t,n,r,a,i){return 0===a.length?0!==i.length:0!==i.length&&_n(t,n,r,a[0],i[0]).next(0).value?e(t,n,r,a.slice(1),i.slice(1)):a[0].value!=a[0].value||(br(a[0].type)&&0!==i.length&&br(i[0].type)||0!==i.length)&&a[0].value<i[0].value}(e,t,n,r,a)?-1:1})),se.s(new He(r.map((function(e){return function(){return se.create(e)}}))))}function Br(e,t){return Z(t.type,62)?t.R.reduce((function(e,t){return t().M((function(t){return t.reduce(Br,e)}))}),e):Bt([e,se.s(t)])}fr.prototype.add=function(e){var t=this;return new fr(hr.reduce((function(n,r,a){return n[r]=t.h[a]+e.h[a],n}),Object.create(null)))},v(wr,cr),wr.prototype.o=function(e,t){var n=this;if(!this.h||!this.h.I)return cr.prototype.o.call(this,e,t);var r=[],a=yr(this.h,(function(e,t,a,i){for(var o=[],s=3;s<arguments.length;++s)o[s-3]=arguments[s];return lr(n.h.value.apply(n.h,[e,t,a].concat(c(o))),(function(e){r=or(r,e)}))}),e,t,this.N,this.ua.map((function(n){return function(){return n.I?lr(n.o(e,t),(function(e){r=or(r,e)})):er(n,e,t)}})),this.C),i=!1;return{next:function(){if(i)return z;var e=a.S();return i=!0,W({fa:r,H:e})}}},wr.prototype.v=function(e,t,n){var r=this,a=(n=u(n)).next().value,i=l(n);if(this.h)return yr(this.h,(function(e,t,n,a){for(var i=[],o=3;o<arguments.length;++o)i[o-3]=arguments[o];return r.h.value.apply(r.h,[e,t,n].concat(c(i)))}),e,t,this.N,i,this.C);var o=a(e);return o.aa({default:function(){throw mr()},s:function(){return o.M((function(n){if((n=gr(n=u(n).next().value,r.ka)).I)throw Error("XUDY0038: The function returned by the PrimaryExpr of a dynamic function invocation can not be an updating function");return yr(n,n.value,e,t,r.N,i,r.C)}))}})},wr.prototype.P=function(e){if(this.C=Po(e),cr.prototype.P.call(this,e),this.na.A){if(!(e=er(this.na,null,null)).za())throw mr();this.h=gr(e.first(),this.ka),this.h.I&&(this.I=!0)}};var Nr=[{namespaceURI:"http://www.w3.org/2005/xpath-functions/array",localName:"size",l:[{type:62,g:3}],j:{type:5,g:3},m:function(e,t,n,r){return _e([r],(function(e){return e=u(e).next().value,se.s(V(e.R.length,5))}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/array",localName:"get",l:[{type:62,g:3},{type:5,g:3}],j:{type:59,g:2},m:Pe},{namespaceURI:"http://www.w3.org/2005/xpath-functions/array",localName:"put",l:[{type:62,g:3},{type:5,g:3},{type:59,g:2}],j:{type:62,g:3},m:function(e,t,n,r,a,i){return _e([a,r],(function(e){var t=u(e);if(e=t.next().value,t=t.next().value,0>=(e=e.value)||e>t.R.length)throw Error("FOAY0001: array position out of bounds.");return(t=t.R.concat()).splice(e-1,1,ue(i)),se.s(new He(t))}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/array",localName:"append",l:[{type:62,g:3},{type:59,g:2}],j:{type:62,g:3},m:function(e,t,n,r,a){return _e([r],(function(e){return e=u(e).next().value.R.concat([ue(a)]),se.s(new He(e))}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/array",localName:"subarray",l:[{type:62,g:3},{type:5,g:3},{type:5,g:3}],j:{type:62,g:3},m:Ar},{namespaceURI:"http://www.w3.org/2005/xpath-functions/array",localName:"subarray",l:[{type:62,g:3},{type:5,g:3}],j:{type:62,g:3},m:function(e,t,n,r,a){var i=se.s(V(r.first().value.length-a.first().value+1,5));return Ar(0,0,0,r,a,i)}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/array",localName:"remove",l:[{type:62,g:3},{type:5,g:2}],j:{type:62,g:3},m:xr},{namespaceURI:"http://www.w3.org/2005/xpath-functions/array",localName:"insert-before",l:[{type:62,g:3},{type:5,g:3},{type:59,g:2}],j:{type:62,g:3},m:function(e,t,n,r,a,i){return _e([r,a],(function(e){var t=u(e);if(e=t.next().value,(t=t.next().value.value)>e.R.length+1||0>=t)throw Error("FOAY0001: subarray position out of bounds.");return(e=e.R.concat()).splice(t-1,0,ue(i)),se.s(new He(e))}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/array",localName:"head",l:[{type:62,g:3}],j:{type:59,g:2},m:function(e,t,n,r){return Pe(0,0,0,r,se.s(V(1,5)))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/array",localName:"tail",l:[{type:62,g:3}],j:{type:59,g:2},m:function(e,t,n,r){return xr(0,0,0,r,se.s(V(1,5)))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/array",localName:"reverse",l:[{type:62,g:3}],j:{type:62,g:3},m:function(e,t,n,r){return _e([r],(function(e){return e=u(e).next().value,se.s(new He(e.R.concat().reverse()))}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/array",localName:"join",l:[{type:62,g:2}],j:{type:62,g:3},m:function(e,t,n,r){return r.M((function(e){return e=e.reduce((function(e,t){return e.concat(t.R)}),[]),se.s(new He(e))}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/array",localName:"for-each",l:[{type:62,g:3},{type:60,g:3}],j:{type:62,g:3},m:function(e,t,n,r,a){return _e([r,a],(function(r){var a=(r=u(r)).next().value,i=r.next().value;if(1!==i.B)throw Ct("The callback passed into array:for-each has a wrong arity.");return r=a.R.map((function(r){return ue(i.value.call(void 0,e,t,n,vr(i.o,[r()],t,"array:for-each")[0]))})),se.s(new He(r))}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/array",localName:"filter",l:[{type:62,g:3},{type:60,g:3}],j:{type:62,g:3},m:function(e,t,n,r,a){return _e([r,a],(function(r){var a=(r=u(r)).next().value,i=r.next().value;if(1!==i.B)throw Ct("The callback passed into array:filter has a wrong arity.");var o=a.R.map((function(r){return r=vr(i.o,[r()],t,"array:filter")[0],(0,i.value)(e,t,n,r)})),s=[],l=!1;return se.create({next:function(){if(l)return z;for(var e=0,t=a.R.length;e<t;++e){var n=o[e].getEffectiveBooleanValue();s[e]=n}return e=a.R.filter((function(e,t){return s[t]})),l=!0,W(new He(e))}})}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/array",localName:"fold-left",l:[{type:62,g:3},{type:59,g:2},{type:60,g:3}],j:{type:59,g:2},m:function(e,t,n,r,a,i){return _e([r,i],(function(r){var i=(r=u(r)).next().value,o=r.next().value;if(2!==o.B)throw Ct("The callback passed into array:fold-left has a wrong arity.");return i.R.reduce((function(r,a){return a=vr(o.o,[a()],t,"array:fold-left")[0],o.value.call(void 0,e,t,n,r,a)}),a)}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/array",localName:"fold-right",l:[{type:62,g:3},{type:59,g:2},{type:60,g:3}],j:{type:59,g:2},m:function(e,t,n,r,a,i){return _e([r,i],(function(r){var i=(r=u(r)).next().value,o=r.next().value;if(2!==o.B)throw Ct("The callback passed into array:fold-right has a wrong arity.");return i.R.reduceRight((function(r,a){return a=vr(o.o,[a()],t,"array:fold-right")[0],o.value.call(void 0,e,t,n,r,a)}),a)}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/array",localName:"for-each-pair",l:[{type:62,g:3},{type:62,g:3},{type:60,g:3}],j:{type:62,g:3},m:function(e,t,n,r,a,i){return _e([r,a,i],(function(r){var a=u(r);r=a.next().value;var i=a.next().value;if(2!==(a=a.next().value).B)throw Ct("The callback passed into array:for-each-pair has a wrong arity.");for(var o=[],s=0,l=Math.min(r.R.length,i.R.length);s<l;++s){var c=u(vr(a.o,[r.R[s](),i.R[s]()],t,"array:for-each-pair")),h=c.next().value;c=c.next().value,o[s]=ue(a.value.call(void 0,e,t,n,h,c))}return se.s(new He(o))}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/array",localName:"sort",l:[{type:62,g:3}],j:{type:62,g:3},m:function(e,t,n,r){return _e([r],(function(r){return r=u(r).next().value.R.map((function(e){return e().S()})),Er(e,t,n,r)}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/array",localName:"flatten",l:[{type:59,g:2}],j:{type:59,g:2},m:function(e,t,n,r){return r.M((function(e){return e.reduce(Br,se.empty())}))}}];function Cr(e,t,n,r,a){return a.F()?a:se.s(Jt(a.first(),e))}var Tr=[{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"untypedAtomic",l:[{type:46,g:0}],j:{type:19,g:0},m:Cr.bind(null,19)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"error",l:[{type:46,g:0}],j:{type:39,g:0},m:Cr.bind(null,39)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"string",l:[{type:46,g:0}],j:{type:1,g:0},m:Cr.bind(null,1)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"boolean",l:[{type:46,g:0}],j:{type:0,g:0},m:Cr.bind(null,0)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"decimal",l:[{type:46,g:0}],j:{type:4,g:0},m:Cr.bind(null,4)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"float",l:[{type:46,g:0}],j:{type:6,g:0},m:Cr.bind(null,6)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"double",l:[{type:46,g:0}],j:{type:3,g:0},m:Cr.bind(null,3)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"duration",l:[{type:46,g:0}],j:{type:18,g:0},m:Cr.bind(null,18)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"dateTime",l:[{type:46,g:0}],j:{type:9,g:0},m:Cr.bind(null,9)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"dateTimeStamp",l:[{type:46,g:0}],j:{type:10,g:0},m:Cr.bind(null,10)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"time",l:[{type:46,g:0}],j:{type:8,g:0},m:Cr.bind(null,8)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"date",l:[{type:46,g:0}],j:{type:7,g:0},m:Cr.bind(null,7)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"gYearMonth",l:[{type:46,g:0}],j:{type:11,g:0},m:Cr.bind(null,11)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"gYear",l:[{type:46,g:0}],j:{type:12,g:0},m:Cr.bind(null,12)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"gMonthDay",l:[{type:46,g:0}],j:{type:13,g:0},m:Cr.bind(null,13)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"gDay",l:[{type:46,g:0}],j:{type:15,g:0},m:Cr.bind(null,15)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"gMonth",l:[{type:46,g:0}],j:{type:14,g:0},m:Cr.bind(null,14)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"hexBinary",l:[{type:46,g:0}],j:{type:22,g:0},m:Cr.bind(null,22)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"base64Binary",l:[{type:46,g:0}],j:{type:21,g:0},m:Cr.bind(null,21)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"QName",l:[{type:46,g:0}],j:{type:23,g:0},m:function(e,t,n,r){if(r.F())return r;if(Z((e=r.first()).type,2))throw Error("XPTY0004: The provided QName is not a string-like value.");if(!Mt(e=Dt(e=Jt(e,1).value,23),23))throw Error("FORG0001: The provided QName is invalid.");if(!e.includes(":"))return n=n.ga(""),se.s(V(new ve("",n,e),23));if(t=(r=u(e.split(":"))).next().value,r=r.next().value,!(n=n.ga(t)))throw Error("FONS0004: The value "+e+" can not be cast to a QName. Did you mean to use fn:QName?");return se.s(V(new ve(t,n,r),23))}},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"anyURI",l:[{type:46,g:0}],j:{type:20,g:0},m:Cr.bind(null,20)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"normalizedString",l:[{type:46,g:0}],j:{type:48,g:0},m:Cr.bind(null,48)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"token",l:[{type:46,g:0}],j:{type:52,g:0},m:Cr.bind(null,52)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"language",l:[{type:46,g:0}],j:{type:51,g:0},m:Cr.bind(null,51)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"NMTOKEN",l:[{type:46,g:0}],j:{type:50,g:0},m:Cr.bind(null,50)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"NMTOKENS",l:[{type:46,g:0}],j:{type:49,g:2},m:Cr.bind(null,49)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"Name",l:[{type:46,g:0}],j:{type:25,g:0},m:Cr.bind(null,25)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"NCName",l:[{type:46,g:0}],j:{type:24,g:0},m:Cr.bind(null,24)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"ID",l:[{type:46,g:0}],j:{type:42,g:0},m:Cr.bind(null,42)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"IDREF",l:[{type:46,g:0}],j:{type:41,g:0},m:Cr.bind(null,41)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"IDREFS",l:[{type:46,g:0}],j:{type:43,g:2},m:Cr.bind(null,43)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"ENTITY",l:[{type:46,g:0}],j:{type:26,g:0},m:Cr.bind(null,26)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"ENTITIES",l:[{type:46,g:0}],j:{type:40,g:2},m:Cr.bind(null,40)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"integer",l:[{type:46,g:0}],j:{type:5,g:0},m:Cr.bind(null,5)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"nonPositiveInteger",l:[{type:46,g:0}],j:{type:27,g:0},m:Cr.bind(null,27)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"negativeInteger",l:[{type:46,g:0}],j:{type:28,g:0},m:Cr.bind(null,28)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"long",l:[{type:46,g:0}],j:{type:31,g:0},m:Cr.bind(null,31)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"int",l:[{type:46,g:0}],j:{type:32,g:0},m:Cr.bind(null,32)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"short",l:[{type:46,g:0}],j:{type:33,g:0},m:Cr.bind(null,33)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"byte",l:[{type:46,g:0}],j:{type:34,g:0},m:Cr.bind(null,34)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"nonNegativeInteger",l:[{type:46,g:0}],j:{type:30,g:0},m:Cr.bind(null,30)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"unsignedLong",l:[{type:46,g:0}],j:{type:36,g:0},m:Cr.bind(null,36)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"unsignedInt",l:[{type:46,g:0}],j:{type:35,g:0},m:Cr.bind(null,35)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"unsignedShort",l:[{type:46,g:0}],j:{type:38,g:0},m:Cr.bind(null,38)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"unsignedByte",l:[{type:46,g:0}],j:{type:37,g:0},m:Cr.bind(null,37)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"positiveInteger",l:[{type:46,g:0}],j:{type:29,g:0},m:Cr.bind(null,29)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"yearMonthDuration",l:[{type:46,g:0}],j:{type:16,g:0},m:Cr.bind(null,16)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"dayTimeDuration",l:[{type:46,g:0}],j:{type:17,g:0},m:Cr.bind(null,17)},{namespaceURI:"http://www.w3.org/2001/XMLSchema",localName:"dateTimeStamp",l:[{type:46,g:0}],j:{type:10,g:0},m:Cr.bind(null,10)}];function Ir(e,t,n,r){return r.F()?r:se.s(V(r.first().value.getYear(),5))}function Or(e,t,n,r){return r.F()?r:se.s(V(r.first().value.getMonth(),5))}function Sr(e,t,n,r){return r.F()?r:se.s(V(r.first().value.getDay(),5))}function Rr(e,t,n,r){return r.F()?r:se.s(V(r.first().value.getHours(),5))}function Dr(e,t,n,r){return r.F()?r:se.s(V(r.first().value.getMinutes(),5))}function Mr(e,t,n,r){return r.F()||(t=(e=se).s,r=r.first().value,r=t.call(e,V(r.J+r.pa,4))),r}function Gr(e,t,n,r){return r.F()?r:(e=r.first().value.ba)?se.s(V(e,17)):se.empty()}var Ur=[{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"dateTime",l:[{type:7,g:0},{type:8,g:0}],j:{type:9,g:0},m:function(e,t,n,r,a){if(r.F())return r;if(a.F())return a;if(e=r.first().value,a=a.first().value,t=e.ba,n=a.ba,t||n){if(!t||n)if(!t&&n)t=n;else if(!Ye(t,n))throw Error("FORG0008: fn:dateTime: got a date and time value with different timezones.")}else t=null;return se.s(V(new at(e.getYear(),e.getMonth(),e.getDay(),a.getHours(),a.getMinutes(),a.getSeconds(),a.pa,t),9))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"year-from-dateTime",l:[{type:9,g:0}],j:{type:5,g:0},m:Ir},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"month-from-dateTime",l:[{type:9,g:0}],j:{type:5,g:0},m:Or},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"day-from-dateTime",l:[{type:9,g:0}],j:{type:5,g:0},m:Sr},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"hours-from-dateTime",l:[{type:9,g:0}],j:{type:5,g:0},m:Rr},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"minutes-from-dateTime",l:[{type:9,g:0}],j:{type:5,g:0},m:Dr},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"seconds-from-dateTime",l:[{type:9,g:0}],j:{type:4,g:0},m:Mr},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"timezone-from-dateTime",l:[{type:9,g:0}],j:{type:17,g:0},m:Gr},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"year-from-date",l:[{type:7,g:0}],j:{type:5,g:0},m:Ir},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"month-from-date",l:[{type:7,g:0}],j:{type:5,g:0},m:Or},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"day-from-date",l:[{type:7,g:0}],j:{type:5,g:0},m:Sr},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"timezone-from-date",l:[{type:7,g:0}],j:{type:17,g:0},m:Gr},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"hours-from-time",l:[{type:8,g:0}],j:{type:5,g:0},m:Rr},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"minutes-from-time",l:[{type:8,g:0}],j:{type:5,g:0},m:Dr},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"seconds-from-time",l:[{type:8,g:0}],j:{type:4,g:0},m:Mr},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"timezone-from-time",l:[{type:8,g:0}],j:{type:17,g:0},m:Gr}];function Fr(e,t,n,r,a){return r.M((function(e){for(var n=St(se.create(e),t).map((function(e){return Jt(e,1)})).S(),r="",i=0;i<n.length;i++)r+="{type: "+n[i].type+", value: "+n[i].value+"}\n";return void 0!==a&&(r+=a.first().value),t.v.trace(r),se.create(e)}))}var Pr=[{l:[{type:59,g:2}],m:Fr,localName:"trace",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:59,g:2}},{l:[{type:59,g:2},{type:1,g:3}],m:Fr,localName:"trace",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:59,g:2}}];function Hr(e,t){e=Error.call(this,e),this.message=e.message,"stack"in e&&(this.stack=e.stack),this.position={end:{da:t.end.da,line:t.end.line,offset:t.end.offset},start:{da:t.start.da,line:t.start.line,offset:t.start.offset}}}function jr(e,t){if(t instanceof Error)throw t;var n=function e(t){return t.h instanceof Error?t.location:e(t.h)}(t);e=e.replace("\r","").split("\n");var r=Math.floor(Math.log10(Math.min(n.end.line+2,e.length)))+1;throw e=e.reduce((function(e,t,a){var i=a+1;if(2<n.start.line-i||2<i-n.end.line)return e;if(a=Array(r).fill(" ",0,Math.floor(Math.log10(i))+1-r).join("")+i+": ",e.push(a+t),i>=n.start.line&&i<=n.end.line){var o=i<n.end.line?t.length+a.length:n.end.da-1+a.length;i=i>n.start.line?a.length:n.start.da-1+a.length,e.push(Array(a.length+t.length).fill(" ",0,i).fill("^",i,o).join(""))}return e}),[]),t=function e(t){var n=t.h instanceof Hr?["Inner error:",t.h.message]:t.h instanceof Error?[t.h.toString()]:e(t.h);return n.push(" at <"+t.o+">:"+t.location.start.line+":"+t.location.start.da+" - "+t.location.end.line+":"+t.location.end.da),n}(t).join("\n"),new Hr(e.join("\n")+"\n\n"+t,n)}function Xr(e,t){"*"===t||Array.isArray(t)||(t=[t]);for(var n=1;n<e.length;++n)if(Array.isArray(e[n])){var r=e[n];if("*"===t||t.includes(r[0]))return r}return null}function _r(e){return 2>e.length?"":"object"==typeof e[1]?e[2]||"":e[1]||""}function Lr(e,t){return Array.isArray(e)?"object"!=typeof(e=e[1])||Array.isArray(e)?null:t in e?e[t]:null:null}function kr(e,t){return t.reduce(Xr,e)}function qr(e,t){for(var n=[],r=1;r<e.length;++r)if(Array.isArray(e[r])){var a=e[r];"*"!==t&&a[0]!==t||n.push(a)}return n}function Vr(e){return{localName:_r(e),namespaceURI:Lr(e,"URI"),prefix:Lr(e,"prefix")||""}}function Yr(e){var t=Xr(e,"typeDeclaration");if(!t||Xr(t,"voidSequenceType"))return{type:59,g:2};e={type:function e(n){switch(n[0]){case"documentTest":return 55;case"elementTest":return 54;case"attributeTest":return 47;case"piTest":return 57;case"commentTest":return 58;case"textTest":return 56;case"anyKindTest":return 53;case"anyItemType":return 59;case"anyFunctionTest":case"functionTest":case"typedFunctionTest":return 60;case"anyMapTest":case"typedMapTest":return 61;case"anyArrayTest":case"typedArrayTest":return 62;case"atomicType":return de([Lr(n,"prefix"),_r(n)].join(":"));case"parenthesizedItemType":return e(Xr(n,"*"));default:throw Error('Type declaration "'+Xr(t,"*")[0]+'" is not supported.')}}(Xr(t,"*")),g:3};var n=null,r=Xr(t,"occurrenceIndicator");switch(r&&(n=_r(r)),n){case"*":return e.g=2,e;case"?":return e.g=0,e;case"+":return e.g=1,e;case"":case null:return e}}function Qr(e,t){if("object"!=typeof e[1]||Array.isArray(e[1])){var n={};n.type=t,e.splice(1,0,n)}else e[1].type=t}function Jr(e,t){var n={};$n.call(this,new fr((n.external=1,n)),e,{A:e.every((function(e){return e.A}))},!1,t),this.h=e}function Kr(e,t){var n={};$n.call(this,new fr((n.external=1,n)),e,{A:e.every((function(e){return e.A}))},!1,t),this.h=e}function zr(e){if(null===e)throw Error("XPDY0002: context is absent, it needs to be present to use axes.");if(!Z(e.type,53))throw Error("XPTY0020: Axes can only be applied to nodes.");return e.value}function Wr(e,t){t=t||{Na:!1},$n.call(this,e.K,[e],{T:"reverse-sorted",Z:!1,subtree:!1,A:!1}),this.h=e,this.o=!!t.Na}function Zr(e){var t={};$n.call(this,new fr((t.attribute=1,t)),[e],{T:"unsorted",subtree:!0,Z:!0,A:!1}),this.h=e}function $r(e){$n.call(this,e.K,[e],{T:"sorted",subtree:!0,Z:!0,A:!1}),this.h=e}function ea(e,t,n){var r=t.node.nodeType;if(1!==r&&9!==r)return{next:function(){return z}};var a=De(e,t,n);return{next:function(){if(!a)return z;var t=a;return a=Ge(e,a,n),W(t)}}}function ta(e,t){t=t||{Na:!1},$n.call(this,e.K,[e],{A:!1,Z:!1,T:"sorted",subtree:!0}),this.h=e,this.o=!!t.Na,this.v=(e=this.h.Y())&&(e.startsWith("name-")||"type-1"===e)?"type-1":null}function na(e,t,n){var r=e.node.nodeType;if(1!==r&&9!==r)return e;for(r=Me(t,e,n);null!==r;){if(1!==r.node.nodeType)return r;r=Me(t,e=r,n)}return e}function ra(e,t,n,r){if(void 0!==n&&n){var a=t,i=!1;return{next:function(){if(i)return z;if(zt(a,t))return zt(a=na(t,e,r),t)?(i=!0,z):W(Xe(a));var n=a.node.nodeType,o=9===n||2===n?null:Fe(e,a,r);return null!==o?W(Xe(a=na(o,e,r))):zt(a=9===n?null:Ue(e,a,r),t)?(i=!0,z):W(Xe(a))}}}var o=[ea(e,t,r)];return{next:function(){if(!o.length)return z;for(var t=o[0].next(0);t.done;){if(o.shift(),!o.length)return z;t=o[0].next(0)}return o.unshift(ea(e,t.value,r)),W(Xe(t.value))}}}function aa(e){$n.call(this,e.K,[e],{T:"sorted",Z:!0,subtree:!1,A:!1}),this.h=e,this.o=(e=this.h.Y())&&(e.startsWith("name-")||"type-1"===e)?"type-1":null}function ia(e){$n.call(this,e.K,[e],{T:"sorted",Z:!0,subtree:!1,A:!1}),this.h=e}function oa(e){$n.call(this,e.K,[e],{T:"reverse-sorted",Z:!0,subtree:!0,A:!1}),this.h=e}function sa(e){$n.call(this,e.K,[e],{A:!1,Z:!0,T:"reverse-sorted",subtree:!1}),this.h=e,this.o=(e=this.h.Y())&&(e.startsWith("name-")||"type-1"===e)?"type-1":null}function ua(e){$n.call(this,e.K,[e],{A:!1,Z:!0,T:"reverse-sorted",subtree:!1}),this.h=e}function la(e){$n.call(this,e.K,[e],{T:"sorted",subtree:!0,Z:!0,A:!1}),this.h=e}function ca(e,t,n,r){var a=e.K.add(t.K).add(n.K);cr.call(this,a,[e,t,n],{A:e.A&&t.A&&n.A,Z:t.Z===n.Z&&t.Z,T:t.B===n.B?t.B:"unsorted",subtree:t.subtree===n.subtree&&t.subtree},r),this.h=e}function ha(e,t,n){this.location=e,this.o=t,this.h=n}function pa(e,t,n){cr.call(this,n.K,[n],{A:n.A,Z:n.Z,T:n.B,subtree:n.subtree}),this.h=t,this.C={end:{da:e.end.da,line:e.end.line,offset:e.end.offset},start:{da:e.start.da,line:e.start.line,offset:e.start.offset}}}function fa(e,t,n,r){$n.call(this,e,t,n,!0),this.h=r,this.I=this.h.I}function da(e,t,n,r){fa.call(this,t.K.add(r.K),[t,r],{A:!1},r),this.N=e.prefix,this.ka=e.namespaceURI,this.vb=e.localName,this.mb=null,this.v=n,this.ua=null,this.na=t}function ma(e,t,n){var r={};$n.call(this,new fr((r.external=1,r)),[n],{A:!1,T:"unsorted"}),this.N=e.map((function(e){return e.name})),this.v=e.map((function(e){return e.type})),this.o=null,this.C=t,this.h=n}function va(e,t,n){if(fa.call(this,t.K.add(n.K),[t,n],{A:!1,Z:n.Z,T:n.B,subtree:n.subtree},n),e.prefix||e.namespaceURI)throw Error("Not implemented: let expressions with namespace usage.");this.v=e.prefix,this.N=e.namespaceURI,this.ua=e.localName,this.ka=t,this.na=null}function ga(e,t){switch($n.call(this,new fr({}),[],{A:!0,T:"sorted"},!1,t),t.type){case 5:var n=V(parseInt(e,10),t.type);break;case 1:n=V(e,t.type);break;case 4:case 3:n=V(parseFloat(e),t.type);break;default:throw new TypeError("Type "+t+" not expected in a literal")}this.h=function(){return se.s(n)}}function ya(e,t){var n={};$n.call(this,new fr((n.external=1,n)),e.reduce((function(e,t){return e.concat(t.key,t.value)}),[]),{A:!1},!1,t),this.h=e}v(Hr,Error),v(Jr,$n),Jr.prototype.evaluate=function(e,t){return 0===this.h.length?se.s(new He([])):er(this.h[0],e,t).M((function(e){return se.s(new He(e.map((function(e){return ue(se.s(e))}))))}))},v(Kr,$n),Kr.prototype.evaluate=function(e,t){return se.s(new He(this.h.map((function(n){return ue(er(n,e,t))}))))},v(Wr,$n),Wr.prototype.evaluate=function(e,t){var n=this;t=t.h,e=zr(e.O);var r=this.h.Y();return r=r&&(r.startsWith("name-")||"type-1"===r)?"type-1":null,se.create(function(e,t,n){var r=t;return{next:function(){if(!r)return z;var t=r;return r=Ue(e,t,n),W(Xe(t))}}}(t,this.o?e:Ue(t,e,r),r)).filter((function(e){return n.h.h(e)}))},v(Zr,$n),Zr.prototype.evaluate=function(e,t){var n=this;return t=t.h,1!==(e=zr(e.O)).node.nodeType?se.empty():(e=Ie(t,e,this.h.Y()).filter((function(e){return"http://www.w3.org/2000/xmlns/"!==e.node.namespaceURI})).map((function(e){return Xe(e)})).filter((function(e){return n.h.h(e)})),se.create(e))},Zr.prototype.Y=function(){return"type-1"},v($r,$n),$r.prototype.evaluate=function(e,t){var n=this;t=t.h;var r=(e=zr(e.O)).node.nodeType,a=[];return 1!==r&&9!==r||Se(t,e,this.h.Y()).forEach((function(e){return a.push(Xe(e))})),se.create(a).filter((function(e){return n.h.h(e)}))},v(ta,$n),ta.prototype.evaluate=function(e,t){var n=this;return e=function(e,t,n){var r=[Kt(t)];return{next:function(t){if(0<r.length&&0!=(1&t)&&r.shift(),!r.length)return z;for(t=r[0].next(0);t.done;){if(r.shift(),!r.length)return z;t=r[0].next(0)}return r.unshift(ea(e,t.value,n)),W(Xe(t.value))}}}(t=t.h,e=zr(e.O),this.v),this.o||e.next(0),se.create(e).filter((function(e){return n.h.h(e)}))},v(aa,$n),aa.prototype.evaluate=function(e,t){var n=this;return t=t.h,e=zr(e.O),se.create(function(e,t,n){for(var r=[];t&&9!==t.node.nodeType;t=Ue(e,t,null)){var a=Ge(e,t,n);a&&r.push(a)}var i=null;return{next:function(){for(;i||r.length;){if(!i){i=ra(e,r[0],!1,n);var t=W(Xe(r[0])),a=Ge(e,r[0],n);return a?r[0]=a:r.shift(),t}if(!(t=i.next(0)).done)return t;i=null}return z}}}(t,e,this.o)).filter((function(e){return n.h.h(e)}))},v(ia,$n),ia.prototype.evaluate=function(e,t){var n=this;return t=t.h,e=zr(e.O),se.create(function(e,t,n){return{next:function(){return(t=t&&Ge(e,t,n))?W(Xe(t)):z}}}(t,e,this.h.Y())).filter((function(e){return n.h.h(e)}))},v(oa,$n),oa.prototype.evaluate=function(e,t){return(e=Ue(t=t.h,e=zr(e.O),this.h.Y()))?(e=Xe(e),this.h.h(e)?se.s(e):se.empty()):se.empty()},v(sa,$n),sa.prototype.evaluate=function(e,t){var n=this;return t=t.h,e=zr(e.O),se.create(function(e,t,n){for(var r=[];t&&9!==t.node.nodeType;t=Ue(e,t,null)){var a=Fe(e,t,n);null!==a&&r.push(a)}var i=null;return{next:function(){for(;i||r.length;){i||(i=ra(e,r[0],!0,n));var t=i.next(0);if(t.done){i=null,t=Fe(e,r[0],n);var a=W(Xe(r[0]));return null===t?r.shift():r[0]=t,a}return t}return z}}}(t,e,this.o)).filter((function(e){return n.h.h(e)}))},v(ua,$n),ua.prototype.evaluate=function(e,t){var n=this;return t=t.h,e=zr(e.O),se.create(function(e,t,n){return{next:function(){return(t=t&&Fe(e,t,n))?W(Xe(t)):z}}}(t,e,this.h.Y())).filter((function(e){return n.h.h(e)}))},v(la,$n),la.prototype.evaluate=function(e){return zr(e.O),this.h.h(e.O)?se.s(e.O):se.empty()},la.prototype.Y=function(){return this.h.Y()},v(ca,cr),ca.prototype.v=function(e,t,n){var r=null,a=n[0](e);return se.create({next:function(t){return r||(r=(a.getEffectiveBooleanValue()?n[1](e):n[2](e)).value),r.next(t)}})},ca.prototype.P=function(e){if(cr.prototype.P.call(this,e),this.h.I)throw Ln()},v(pa,cr),pa.prototype.v=function(e,t,n){var r=this;t=u(n).next().value;try{var a=t(e)}catch(e){throw new ha(this.C,this.h,e)}return se.create({next:function(e){try{return a.value.next(e)}catch(e){throw new ha(r.C,r.h,e)}}})},pa.prototype.P=function(e){try{cr.prototype.P.call(this,e)}catch(e){throw new ha(this.C,this.h,e)}},v(fa,$n),fa.prototype.evaluate=function(e,t){var n=this;return this.C(e,Kt(e),t,(function(r){if(n.h instanceof fa)return function e(t,n,r,a){return t.C(n,r,a,(function(r){if(t.h instanceof fa)return e(t.h,n,r,a);var i=null;return se.create({next:function(){for(;;){if(!i){var e=r.next(0);if(e.done)return z;i=er(t.h,e.value,a).value}if(!(e=i.next(0)).done)return e;i=null}}})}))}(n.h,e,r,t);var a=null;return se.create({next:function(e){for(;;){if(!a){var i=r.next(0);if(i.done)return z;a=er(n.h,i.value,t).value}if(!(i=a.next(e)).done)return i;a=null}}})}))},fa.prototype.o=function(e,t){return function e(t,n,r,a){var i=[],o=t.C(n,r,a,(function(r){if(t.h instanceof fa)return lr(e(t.h,n,r,a),(function(e){return i=e}));var o=null;return se.create({next:function(){for(;;){if(!o){var e=r.next(0);if(e.done)return z;e=t.h.o(e.value,a),o=lr(e,(function(e){return i=or(i,e)})).value}if(!(e=o.next(0)).done)return e;o=null}}})})),s=!1;return{next:function(){if(s)return z;var e=o.S();return s=!0,W(new tr(e,i))}}}(this,e,Kt(e),t)},fa.prototype.P=function(e){$n.prototype.P.call(this,e),this.I=this.h.I;for(var t=(e=u(this.J)).next();!t.done;t=e.next())if((t=t.value)!==this.h&&t.I)throw Ln()},v(da,fa),da.prototype.C=function(e,t,n,r){var a=this,i=null,o=null,s=0;return r({next:function(){for(var e={};;){if(!i){var r=t.next(0);if(r.done)return z;o=r.value,s=0,i=er(a.na,o,n).value}if(e.hb=i.next(0),!e.hb.done)return s++,(r={})[a.mb]=function(e){return function(){return se.s(e.hb.value)}}(e),e=r,a.ua&&(e[a.ua]=function(){return se.s(new le(5,s))}),W(bt(o,e));i=null,e={hb:e.hb}}}})},da.prototype.P=function(e){if(this.N&&(this.ka=e.ga(this.N),!this.ka&&this.N))throw Error("XPST0081: Could not resolve namespace for prefix "+this.N+" in a for expression");if(this.na.P(e),Ho(e),this.mb=Xo(e,this.ka,this.vb),this.v){if(this.v.prefix&&(this.v.namespaceURI=e.ga(this.v.prefix),!this.v.namespaceURI&&this.v.prefix))throw Error("XPST0081: Could not resolve namespace for prefix "+this.N+" in the positionalVariableBinding in a for expression");this.ua=Xo(e,this.v.namespaceURI,this.v.localName)}if(this.h.P(e),Lo(e),this.na.I)throw Ln();this.h.I&&(this.I=!0)},v(ma,$n),ma.prototype.evaluate=function(e,t){var n=this,r=new ge({l:this.v,arity:this.v.length,Oa:!0,I:this.h.I,localName:"dynamic-function",namespaceURI:"",j:this.C,value:function(r,a,i,o){for(var s=[],u=3;u<arguments.length;++u)s[u-3]=arguments[u];return u=bt(xt(e,-1,null,se.empty()),n.o.reduce((function(e,t,n){return e[t]=ue(s[n]),e}),Object.create(null))),er(n.h,u,t)}});return se.s(r)},ma.prototype.P=function(e){if(Ho(e),this.o=this.N.map((function(t){return Xo(e,t.namespaceURI,t.localName)})),this.h.P(e),Lo(e),this.h.I)throw Error("Not implemented: inline functions can not yet be updating.")},v(va,fa),va.prototype.C=function(e,t,n,r){var a=this;return r({next:function(){var e=t.next(0);if(e.done)return z;var r={};return W(e=bt(e=e.value,(r[a.na]=ue(er(a.ka,e,n)),r)))}})},va.prototype.P=function(e){if(this.v&&(this.N=e.ga(this.v),!this.N&&this.v))throw Error("XPST0081: Could not resolve namespace for prefix "+this.v+" using in a for expression");if(this.ka.P(e),Ho(e),this.na=Xo(e,this.N,this.ua),this.h.P(e),Lo(e),this.I=this.h.I,this.ka.I)throw Ln()},v(ga,$n),ga.prototype.evaluate=function(){return this.h()},v(ya,$n),ya.prototype.evaluate=function(e,t){var n=this;return _e(this.h.map((function(n){return St(er(n.key,e,t),t).aa({default:function(){throw Error("XPTY0004: A key of a map should be a single atomizable value.")},s:function(e){return e}})})),(function(r){return se.s(new qe(r.map((function(r,a){return{key:r,value:ue(er(n.h[a].value,e,t))}}))))}))};var wa=Object.create(null);function Aa(e,t){for(var n=[],r=0;r<e.length+1;++r)n[r]=[];return function r(a,i){if(0===a)return i;if(0===i)return a;if(void 0!==n[a][i])return n[a][i];var o=0;return e[a-1]!==t[i-1]&&(o=1),o=Math.min(r(a-1,i)+1,r(a,i-1)+1,r(a-1,i-1)+o),n[a][i]=o}(e.length,t.length)}function xa(e){var t=wa[e]?wa[e]:Object.keys(wa).map((function(t){return{name:t,yb:Aa(e,t.slice(t.lastIndexOf(":")+1))}})).sort((function(e,t){return e.yb-t.yb})).slice(0,5).filter((function(t){return t.yb<e.length/2})).reduce((function(e,t){return e.concat(wa[t.name])}),[]).slice(0,5);return t.length?t.map((function(e){return'"Q{'+e.namespaceURI+"}"+e.localName+" ("+e.l.map((function(e){return 4===e?"...":fe(e)})).join(", ")+')"'})).reduce((function(e,t,n,r){return 0===n?e+t:e+(n!==r.length-1?", ":" or ")+t}),"Did you mean ")+"?":"No similar functions found."}function ba(e,t,n,r,a){wa[e+":"+t]||(wa[e+":"+t]=[]),wa[e+":"+t].push({l:n,arity:n.length,m:a,I:!1,localName:t,namespaceURI:e,j:r})}function Ea(e,t,n){var r={};$n.call(this,new fr((r.external=1,r)),[],{A:!0},!1,n),this.o=t,this.v=e,this.h=null}function Ba(e,t,n){return(e<<20)+(t<<12)+(n.charCodeAt(0)<<8)+n.charCodeAt(1)}v(Ea,$n),Ea.prototype.evaluate=function(){var e=new ge({l:this.h.l,I:this.h.I,arity:this.o,localName:this.h.localName,namespaceURI:this.h.namespaceURI,j:this.h.j,value:this.h.m});return se.s(e)},Ea.prototype.P=function(e){var t=this.v.namespaceURI,n=this.v.localName,r=this.v.prefix;if(!t){var a=e.Qa({localName:n,prefix:r},this.o);if(!a)throw Error("XPST0017: The function "+(r?r+":":"")+n+" with arity "+this.o+" could not be resolved. "+xa(n));t=a.namespaceURI,n=a.localName}if(this.h=e.Aa(t,n,this.o)||null,!this.h)throw e=this.v,Error("XPST0017: Function "+(e.namespaceURI?"Q{"+e.namespaceURI+"}":e.prefix?e.prefix+":":"")+e.localName+" with arity of "+this.o+" not registered. "+xa(n));$n.prototype.P.call(this,e)};var Na={},Ca=(Na[Ba(2,2,"idivOp")]=5,Na[Ba(16,16,"addOp")]=16,Na[Ba(16,16,"subtractOp")]=16,Na[Ba(16,16,"divOp")]=4,Na[Ba(16,2,"multiplyOp")]=16,Na[Ba(16,2,"divOp")]=16,Na[Ba(2,16,"multiplyOp")]=16,Na[Ba(17,17,"addOp")]=17,Na[Ba(17,17,"subtractOp")]=17,Na[Ba(17,17,"divOp")]=4,Na[Ba(17,2,"multiplyOp")]=17,Na[Ba(17,2,"divOp")]=17,Na[Ba(2,17,"multiplyOp")]=17,Na[Ba(9,9,"subtractOp")]=17,Na[Ba(7,7,"subtractOp")]=17,Na[Ba(8,8,"subtractOp")]=17,Na[Ba(9,16,"addOp")]=9,Na[Ba(9,16,"subtractOp")]=9,Na[Ba(9,17,"addOp")]=9,Na[Ba(9,17,"subtractOp")]=9,Na[Ba(7,16,"addOp")]=7,Na[Ba(7,16,"subtractOp")]=7,Na[Ba(7,17,"addOp")]=7,Na[Ba(7,17,"subtractOp")]=7,Na[Ba(8,17,"addOp")]=8,Na[Ba(8,17,"subtractOp")]=8,Na[Ba(9,16,"addOp")]=9,Na[Ba(9,16,"subtractOp")]=9,Na[Ba(9,17,"addOp")]=9,Na[Ba(9,17,"subtractOp")]=9,Na[Ba(7,17,"addOp")]=7,Na[Ba(7,17,"subtractOp")]=7,Na[Ba(7,16,"addOp")]=7,Na[Ba(7,16,"subtractOp")]=7,Na[Ba(8,17,"addOp")]=8,Na[Ba(8,17,"subtractOp")]=8,Na),Ta={},Ia=(Ta[Ba(2,2,"addOp")]=function(e,t){return e+t},Ta[Ba(2,2,"subtractOp")]=function(e,t){return e-t},Ta[Ba(2,2,"multiplyOp")]=function(e,t){return e*t},Ta[Ba(2,2,"divOp")]=function(e,t){return e/t},Ta[Ba(2,2,"modOp")]=function(e,t){return e%t},Ta[Ba(2,2,"idivOp")]=function(e,t){return Math.trunc(e/t)},Ta[Ba(16,16,"addOp")]=function(e,t){return new Ft(e.ha+t.ha)},Ta[Ba(16,16,"subtractOp")]=function(e,t){return new Ft(e.ha-t.ha)},Ta[Ba(16,16,"divOp")]=function(e,t){return e.ha/t.ha},Ta[Ba(16,2,"multiplyOp")]=jt,Ta[Ba(16,2,"divOp")]=function(e,t){if(isNaN(t))throw Error("FOCA0005: Cannot divide xs:yearMonthDuration by NaN");if((e=Math.round(e.ha/t))>Number.MAX_SAFE_INTEGER||!Number.isFinite(e))throw Error("FODT0002: Value overflow while dividing xs:yearMonthDuration");return new Ft(e<Number.MIN_SAFE_INTEGER||0===e?0:e)},Ta[Ba(2,16,"multiplyOp")]=function(e,t){return jt(t,e)},Ta[Ba(17,17,"addOp")]=function(e,t){return new Qe(e.ea+t.ea)},Ta[Ba(17,17,"subtractOp")]=function(e,t){return new Qe(e.ea-t.ea)},Ta[Ba(17,17,"divOp")]=function(e,t){if(0===t.ea)throw Error("FOAR0001: Division by 0");return e.ea/t.ea},Ta[Ba(17,2,"multiplyOp")]=Ze,Ta[Ba(17,2,"divOp")]=function(e,t){if(isNaN(t))throw Error("FOCA0005: Cannot divide xs:dayTimeDuration by NaN");if((e=e.ea/t)>Number.MAX_SAFE_INTEGER||!Number.isFinite(e))throw Error("FODT0002: Value overflow while dividing xs:dayTimeDuration");return new Qe(e<Number.MIN_SAFE_INTEGER||Object.is(-0,e)?0:e)},Ta[Ba(2,17,"multiplyOp")]=function(e,t){return Ze(t,e)},Ta[Ba(9,9,"subtractOp")]=ct,Ta[Ba(7,7,"subtractOp")]=ct,Ta[Ba(8,8,"subtractOp")]=ct,Ta[Ba(9,16,"addOp")]=ht,Ta[Ba(9,16,"subtractOp")]=pt,Ta[Ba(9,17,"addOp")]=ht,Ta[Ba(9,17,"subtractOp")]=pt,Ta[Ba(7,16,"addOp")]=ht,Ta[Ba(7,16,"subtractOp")]=pt,Ta[Ba(7,17,"addOp")]=ht,Ta[Ba(7,17,"subtractOp")]=pt,Ta[Ba(8,17,"addOp")]=ht,Ta[Ba(8,17,"subtractOp")]=pt,Ta[Ba(9,16,"addOp")]=ht,Ta[Ba(9,16,"subtractOp")]=pt,Ta[Ba(9,17,"addOp")]=ht,Ta[Ba(9,17,"subtractOp")]=pt,Ta[Ba(7,17,"addOp")]=ht,Ta[Ba(7,17,"subtractOp")]=pt,Ta[Ba(7,16,"addOp")]=ht,Ta[Ba(7,16,"subtractOp")]=pt,Ta[Ba(8,17,"addOp")]=ht,Ta[Ba(8,17,"subtractOp")]=pt,Ta);function Oa(e,t){return Z(e,5)&&Z(t,5)?5:Z(e,4)&&Z(t,4)?4:Z(e,6)&&Z(t,6)?6:3}var Sa=[2,16,17,9,7,8];function Ra(e,t,n){function r(e,t){return{W:a?a(e):e,X:i?i(t):t}}var a=null,i=null;Z(t,19)&&(a=function(e){return Jt(e,3)},t=3),Z(n,19)&&(i=function(e){return Jt(e,3)},n=3);var o=Sa.filter((function(e){return Z(t,e)})),s=Sa.filter((function(e){return Z(n,e)}));if(o.includes(2)&&s.includes(2)){var l=Ia[Ba(2,2,e)],c=Ca[Ba(2,2,e)];return c||(c=Oa(t,n)),"divOp"===e&&5===c&&(c=4),"idivOp"===e?Da(r,l)[0]:function(e,t){return e=r(e,t),V(l(e.W.value,e.X.value),c)}}for(var h=(o=u(o)).next();!h.done;h=o.next()){h=h.value;for(var p={},f=u(s),d=f.next();!d.done;p={ib:p.ib,lb:p.lb},d=f.next())if(d=d.value,p.ib=Ia[Ba(h,d,e)],p.lb=Ca[Ba(h,d,e)],p.ib&&void 0!==p.lb)return function(e){return function(t,n){return t=r(t,n),V(e.ib(t.W.value,t.X.value),e.lb)}}(p)}}function Da(e,t){return[function(n,r){if(n=(r=e(n,r)).W,0===(r=r.X).value)throw Error("FOAR0001: Divisor of idiv operator cannot be (-)0");if(Number.isNaN(n.value)||Number.isNaN(r.value)||!Number.isFinite(n.value))throw Error("FOAR0002: One of the operands of idiv is NaN or the first operand is (-)INF");return Number.isFinite(n.value)&&!Number.isFinite(r.value)?V(0,5):V(t(n.value,r.value),5)},5]}var Ma=Object.create(null);function Ga(e,t,n,r,a){$n.call(this,t.K.add(n.K),[t,n],{A:!1},!1,r),this.v=t,this.C=n,this.h=e,this.o=a}v(Ga,$n),Ga.prototype.evaluate=function(e,t){var n=this;return St(er(this.v,e,t),t).M((function(r){return 0===r.length?se.empty():St(er(n.C,e,t),t).M((function(e){if(0===e.length)return se.empty();if(1<r.length||1<e.length)throw Error('XPTY0004: the operands of the "'+n.h+'" operator should be empty or singleton.');var t=r[0];if(e=e[0],n.o&&n.type)return se.s(n.o(t,e));var a=t.type,i=e.type,o=n.h,s=a+"~"+i+"~"+o,u=Ma[s];if(u||(u=Ma[s]=Ra(o,a,i)),!(a=u))throw Error("XPTY0004: "+n.h+" not available for types "+he[t.type]+" and "+he[e.type]);return se.s(a(t,e))}))}))};var Ua={},Fa=(Ua[5]=5,Ua[27]=5,Ua[28]=5,Ua[31]=5,Ua[32]=5,Ua[33]=5,Ua[34]=5,Ua[30]=5,Ua[36]=5,Ua[35]=5,Ua[38]=5,Ua[37]=5,Ua[29]=5,Ua[4]=4,Ua[6]=6,Ua[3]=3,Ua);function Pa(e,t,n){$n.call(this,t.K,[t],{A:!1},!1,n),this.o=t,this.h=e}function Ha(e,t){$n.call(this,e.reduce((function(e,t){return e.add(t.K)}),new fr({})),e,{A:e.every((function(e){return e.A}))},!1,t),this.h=e}function ja(e,t){var n,r=e.reduce((function(e,t){return 0<dr(e,t.K)?e:t.K}),new fr({}));for($n.call(this,r,e,{A:e.every((function(e){return e.A}))},!1,t),t=0;t<e.length&&(void 0===n&&(n=e[t].Y()),null!==n);++t)if(n!==e[t].Y()){n=null;break}this.o=n,this.h=e}function Xa(e,t,n){function r(e,t){return{W:o?o(e):e,X:s?s(t):t}}function a(e){return Z(t,e)&&Z(n,e)}function i(e){return 0<e.filter((function(e){return Z(t,e)})).length&&0<e.filter((function(e){return Z(n,e)})).length}var o=null,s=null;if(Z(t,19)&&Z(n,19)?t=n=1:Z(t,19)?(o=function(e){return Jt(e,n)},t=n):Z(n,19)&&(s=function(e){return Jt(e,t)},n=t),Z(t,23)&&Z(n,23))return function(e,t){if("eqOp"===e)return function(e,n){return e=(n=t(e,n)).W,n=n.X,e.value.namespaceURI===n.value.namespaceURI&&e.value.localName===n.value.localName};if("neOp"===e)return function(e,n){return e=(n=t(e,n)).W,n=n.X,e.value.namespaceURI!==n.value.namespaceURI||e.value.localName!==n.value.localName};throw Error('XPTY0004: Only the "eq" and "ne" comparison is defined for xs:QName')}(e,r);if(a(0)||i([1,47,61])||i([2,47,61])||a(20)||a(22)||a(21)||i([1,20])){var u=function(e,t){switch(e){case"eqOp":return function(e,n){return(e=t(e,n)).W.value===e.X.value};case"neOp":return function(e,n){return(e=t(e,n)).W.value!==e.X.value};case"ltOp":return function(e,n){return(e=t(e,n)).W.value<e.X.value};case"leOp":return function(e,n){return(e=t(e,n)).W.value<=e.X.value};case"gtOp":return function(e,n){return(e=t(e,n)).W.value>e.X.value};case"geOp":return function(e,n){return(e=t(e,n)).W.value>=e.X.value}}}(e,r);if(void 0!==u)return u}if(a(16)&&void 0!==(u=function(e,t){switch(e){case"ltOp":return function(e,n){return(e=t(e,n)).W.value.ha<e.X.value.ha};case"leOp":return function(e,n){return e=(n=t(e,n)).W,n=n.X,Ye(e.value,n.value)||e.value.ha<n.value.ha};case"gtOp":return function(e,n){return(e=t(e,n)).W.value.ha>e.X.value.ha};case"geOp":return function(e,n){return e=(n=t(e,n)).W,n=n.X,Ye(e.value,n.value)||e.value.ha>n.value.ha}}}(e,r))||a(17)&&void 0!==(u=function(e,t){switch(e){case"eqOp":return function(e,n){return Ye((e=t(e,n)).W.value,e.X.value)};case"ltOp":return function(e,n){return(e=t(e,n)).W.value.ea<e.X.value.ea};case"leOp":return function(e,n){return e=(n=t(e,n)).W,n=n.X,Ye(e.value,n.value)||e.value.ea<n.value.ea};case"gtOp":return function(e,n){return(e=t(e,n)).W.value.ea>e.X.value.ea};case"geOp":return function(e,n){return e=(n=t(e,n)).W,n=n.X,Ye(e.value,n.value)||e.value.ea>n.value.ea}}}(e,r))||a(18)&&void 0!==(u=function(e,t){switch(e){case"eqOp":return function(e,n){return Ye((e=t(e,n)).W.value,e.X.value)};case"neOp":return function(e,n){return!Ye((e=t(e,n)).W.value,e.X.value)}}}(e,r)))return u;if((a(9)||a(7)||a(8))&&void 0!==(u=function(e,t){switch(e){case"eqOp":return function(e,n,r){return lt((e=t(e,n)).W.value,e.X.value,At(r))};case"neOp":return function(e,n,r){return!lt((e=t(e,n)).W.value,e.X.value,At(r))};case"ltOp":return function(e,n,r){return e=t(e,n),r=At(r),0>ut(e.W.value,e.X.value,r)};case"leOp":return function(e,n,r){var a;return e=(n=t(e,n)).W,n=n.X,(a=lt(e.value,n.value,At(r)))||(r=At(r),a=0>ut(e.value,n.value,r)),a};case"gtOp":return function(e,n,r){return e=t(e,n),r=At(r),0<ut(e.W.value,e.X.value,r)};case"geOp":return function(e,n,r){var a;return e=(n=t(e,n)).W,n=n.X,(a=lt(e.value,n.value,At(r)))||(r=At(r),a=0<ut(e.value,n.value,r)),a}}}(e,r)))return u;if((a(11)||a(12)||a(13)||a(14)||a(15))&&void 0!==(u=function(e,t){switch(e){case"eqOp":return function(e,n,r){return lt((e=t(e,n)).W.value,e.X.value,At(r))};case"neOp":return function(e,n,r){return!lt((e=t(e,n)).W.value,e.X.value,At(r))}}}(e,r)))return u;throw Error("XPTY0004: "+e+" not available for "+he[t]+" and "+he[n])}v(Pa,$n),Pa.prototype.evaluate=function(e,t){var n=this;return St(er(this.o,e,t),t).M((function(e){if(0===e.length)return se.empty();var t=e[0];if(n.type)return e="+"===n.h?+t.value:-t.value,0===t.type&&(e=Number.NaN),se.s(V(e,n.type.type));if(1<e.length)throw Error("XPTY0004: The operand to a unary operator must be a sequence with a length less than one");return Z(t.type,19)?(t=Jt(t,3).value,se.s(V("+"===n.h?t:-t,3))):Z(t.type,2)?"+"===n.h?se.s(t):se.s(V(-1*t.value,Fa[t.type])):se.s(V(Number.NaN,3))}))},v(Ha,$n),Ha.prototype.evaluate=function(e,t){var n=this,r=0,a=null,i=!1,o=null;if(null!==e){var s=e.O;null!==s&&Z(s.type,53)&&(o=we(s.value))}return se.create({next:function(){if(!i){for(;r<n.h.length;){if(!a){var s=n.h[r];if(null!==o&&null!==s.Y()&&!o.includes(s.Y()))return r++,i=!0,W(Q);a=er(s,e,t)}if(!1===a.getEffectiveBooleanValue())return i=!0,W(Q);a=null,r++}return i=!0,W(Y)}return z}})},Ha.prototype.Y=function(){for(var e=0,t=this.h.length;e<t;++e){var n=this.h[e].Y();if(n)return n}return null},v(ja,$n),ja.prototype.evaluate=function(e,t){var n=this,r=0,a=null,i=!1,o=null;if(null!==e){var s=e.O;null!==s&&Z(s.type,53)&&(o=we(s.value))}return se.create({next:function(){if(!i){for(;r<n.h.length;){if(!a){var s=n.h[r];if(null!==o&&null!==s.Y()&&!o.includes(s.Y())){r++;continue}a=er(s,e,t)}if(!0===a.getEffectiveBooleanValue())return i=!0,W(Y);a=null,r++}return i=!0,W(Q)}return z}})},ja.prototype.Y=function(){return this.o};var _a=Object.create(null);function La(e,t,n){var r=t+"~"+n+"~"+e,a=_a[r];return a||(a=_a[r]=Xa(e,t,n)),a}function ka(e,t,n){try{var r=La(e,t,n);return function(e,t,n){if(1<e.ya()||1<t.ya())throw Error("XPTY0004: Sequences to compare are not singleton.");return r(e.first(),t.first(),n)}}catch(e){}}var qa={},Va=(qa.equalOp="eqOp",qa.notEqualOp="neOp",qa.lessThanOrEqualOp="leOp",qa.lessThanOp="ltOp",qa.greaterThanOrEqualOp="geOp",qa.greaterThanOp="gtOp",qa);function Ya(e,t){var n,r;return(Z(e,19)||Z(t,19))&&(Z(e,2)?r=3:Z(t,2)?n=3:Z(e,17)?r=17:Z(t,17)?n=17:Z(e,16)?r=16:Z(t,16)?n=16:Z(e,19)?n=t:Z(t,19)&&(r=e)),[n,r]}function Qa(e,t,n,r){if(!Z(n,53)||!Z(r,53))throw Error("XPTY0004: Sequences to compare are not nodes");switch(e){case"isOp":return function(e,t){return e!==t||47!==e&&53!==e&&54!==e&&55!==e&&56!==e&&57!==e&&58!==e?function(){return!1}:function(e,t){return zt(e.first().value,t.first().value)}}(n,r);case"nodeBeforeOp":return t?function(e,n){return 0>tn(t,e.first(),n.first())}:void 0;case"nodeAfterOp":return t?function(e,n){return 0<tn(t,e.first(),n.first())}:void 0;default:throw Error("Unexpected operator")}}function Ja(e,t,n,r,a){switch($n.call(this,t.K.add(n.K),[t,n],{A:!1}),this.C=t,this.N=n,e){case"equalOp":case"notEqualOp":case"lessThanOrEqualOp":case"lessThanOp":case"greaterThanOrEqualOp":case"greaterThanOp":if(this.h="generalCompare",t=[59,62,46,53],r&&a&&!t.includes(r.type)&&!t.includes(a.type)){if(3===r.g&&3===a.g)r=ka(e,r.type,a.type);else{n=Va[e];var i=u(Ya(r.type,a.type));t=i.next().value,i=i.next().value,n=La(n,r.type,a.type),r=0===r.g&&0===a.g?function(e,t,n){return function(r,a,i){return!r.F()&&!a.F()&&(r=r.first(),a=a.first(),e&&(r=Jt(r,e)),t&&(a=Jt(a,t)),n(r,a,i))}}(t,i,n):function(e,t,n){return function(r,a,i){return a.M((function(a){return r.filter((function(r){for(var o=0,s=a.length;o<s;++o){var u=a[o];if(e&&(r=Jt(r,e)),t&&(u=Jt(u,t)),n(r,u,i))return!0}return!1})).aa({default:function(){return se.$()},empty:function(){return se.U()}})})).getEffectiveBooleanValue()}}(t,i,n)}this.o=r}break;case"eqOp":case"neOp":case"ltOp":case"leOp":case"gtOp":case"geOp":this.h="valueCompare",r&&a&&(this.o=ka(e,r.type,a.type));break;default:this.h="nodeCompare",r&&a&&(this.o=Qa(e,void 0,r.type,a.type))}this.v=e}function Ka(e,t,n,r){return n.M((function(n){if(n.some((function(e){return!Z(e.type,53)})))throw Error("XPTY0004: Sequences given to "+e+" should only contain nodes.");return"sorted"===r?se.create(n):"reverse-sorted"===r?se.create(n.reverse()):se.create(nn(t,n))}))}function za(e,t,n,r){$n.call(this,0<dr(t.K,n.K)?t.K:n.K,[t,n],{A:t.A&&n.A},!1,r),this.h=e,this.o=t,this.v=n}function Wa(e,t){cr.call(this,e.reduce((function(e,t){return e.add(t.K)}),new fr({})),e,{T:"unsorted",A:e.every((function(e){return e.A}))},t)}function Za(e,t,n){$n.call(this,new fr({}).add(e.K),[e,t],{A:e.A&&t.A},!1,n),this.h=e,this.o=t}function $a(e,t,n){if($n.call(this,e.K,[e],{A:!1}),this.h=de(t.prefix?t.prefix+":"+t.localName:t.localName),46===this.h||45===this.h||44===this.h)throw Error("XPST0080: Casting to xs:anyAtomicType, xs:anySimpleType or xs:NOTATION is not permitted.");if(t.namespaceURI)throw Error("Not implemented: castable as expressions with a namespace URI.");this.v=e,this.o=n}function ei(e,t,n){if($n.call(this,e.K,[e],{A:!1}),this.h=de(t.prefix?t.prefix+":"+t.localName:t.localName),46===this.h||45===this.h||44===this.h)throw Error("XPST0080: Casting to xs:anyAtomicType, xs:anySimpleType or xs:NOTATION is not permitted.");if(t.namespaceURI)throw Error("Not implemented: casting expressions with a namespace URI.");this.v=e,this.o=n}function ti(e,t){var n=e.value,r=null,a=!1;return se.create({next:function(){for(;!a;){if(!r){var e=n.next(0);if(e.done)return a=!0,W(Y);r=t(e.value)}if(e=r.getEffectiveBooleanValue(),r=null,!1===e)return a=!0,W(Q)}return z}})}function ni(e,t,n,r){$n.call(this,e.K,[e],{A:!1},!1,r),this.v=e,this.o=t,this.h=n}function ri(e,t){return!(null===e||null===t||!Z(e.type,53)||!Z(t.type,53))&&zt(e.value,t.value)}function ai(e){var t=e.next(0);if(t.done)return se.empty();var n=null,r=null;return se.create({next:function(a){if(t.done)return z;n||(n=t.value.value);do{var i=n.next(a);if(i.done){if((t=e.next(0)).done)return i;n=t.value.value}}while(i.done||ri(i.value,r));return r=i.value,i}})}function ii(e,t){var n=[];!function(){for(var e=t.next(0),r={};!e.done;)r.jb=e.value.value,(e={current:r.jb.next(0),next:function(e){return function(t){return e.jb.next(t)}}(r)}).current.done||n.push(e),e=t.next(0),r={jb:r.jb}}();var r=null,a=!1,i={};return se.create((i[Symbol.iterator]=function(){return this},i.next=function(){a||(a=!0,n.every((function(e){return Z(e.current.value.type,53)}))&&n.sort((function(t,n){return tn(e,t.current.value,n.current.value)})));do{if(!n.length)return z;var t=n.shift(),i=t.current;if(t.current=t.next(0),!Z(i.value.type,53))return i;if(!t.current.done){for(var o=0,s=n.length-1,u=0;o<=s;){u=Math.floor((o+s)/2);var l=tn(e,t.current.value,n[u].current.value);if(0===l){o=u;break}0<l?o=u+1:s=u-1}n.splice(o,0,t)}}while(ri(i.value,r));return r=i.value,i},i))}function oi(e,t){var n=e.reduce((function(e,t){return 0<dr(e,t.K)?e:t.K}),new fr({}));$n.call(this,n,e,{A:e.every((function(e){return e.A}))},!1,t),this.h=e}function si(e){return e.every((function(e){return null===e||Z(e.type,5)||Z(e.type,4)}))||null!==e.map((function(e){return e?Rt(e.type):null})).reduce((function(e,t){return null===t||t===e?e:null}))?e:e.every((function(e){return null===e||Z(e.type,1)||Z(e.type,20)}))?e.map((function(e){return e?Jt(e,1):null})):e.every((function(e){return null===e||Z(e.type,4)||Z(e.type,6)}))?e.map((function(e){return e?Jt(e,6):e})):e.every((function(e){return null===e||Z(e.type,4)||Z(e.type,6)||Z(e.type,3)}))?e.map((function(e){return e?Jt(e,3):e})):null}function ui(e){return Error("XPTY0004: "+e)}function li(e,t){return e=2===e.node.nodeType?e.node.nodeName+'="'+Re(t,e)+'"':e.node.outerHTML,Error("XQTY0024: The node "+e+" follows a node that is not an attribute node or a namespace node.")}function ci(){return Error("XQST0045: Functions and variables may not be declared in one of the reserved namespace URIs.")}function hi(){return Error("XQST0060: Functions declared in a module or as an external function must reside in a namespace.")}function pi(){return Error("XQST0070: The prefixes xml and xmlns may not be used in a namespace declaration or be bound to another namespaceURI.")}function fi(e){return Error('XQDY0074: The value "'+e+'" of a name expressions cannot be converted to an expanded QName.')}function di(e){return Error('XPST0081: The prefix "'+e+'" could not be resolved')}function mi(e,t){var n=new fr({});fa.call(this,n,[t].concat(c(e.map((function(e){return e.ia})))),{A:!1,Z:!1,T:"unsorted",subtree:!1},t),this.v=e}function vi(e){$n.call(this,e?e.K:new fr({}),e?[e]:[],{T:"sorted",subtree:!1,Z:!1,A:!1}),this.h=e}function gi(e){$n.call(this,new fr({}),[],{T:"sorted"},!1,e)}function yi(e,t){var n=e.every((function(e){return e.Z})),r=e.every((function(e){return e.subtree}));$n.call(this,e.reduce((function(e,t){return e.add(t.K)}),new fr({})),e,{A:!1,Z:n,T:t?"sorted":"unsorted",subtree:r}),this.h=e,this.o=t}function wi(e,t){$n.call(this,e.K.add(t.K),[e,t],{A:e.A&&t.A,Z:e.Z,T:e.B,subtree:e.subtree}),this.o=e,this.h=t}function Ai(e,t,n){if(n=[n],Z(e.type,62))if("*"===t)n.push.apply(n,c(e.R.map((function(e){return e()}))));else{if(!Z(t.type,5))throw ui("The key specifier is not an integer.");var r=t.value;if(e.R.length<r||0>=r)throw Error("FOAY0001: Array index out of bounds");n.push(e.R[r-1]())}else{if(!Z(e.type,61))throw ui("The provided context item is not a map or an array.");"*"===t?n.push.apply(n,c(e.h.map((function(e){return e.value()})))):(e=e.h.find((function(e){return Le(e.key,t)})))&&n.push(e.value())}return Bt(n)}function xi(e,t,n,r,a){return"*"===t?Ai(e,t,n):Bt([n,t=ue(t=er(t,r,a))().M((function(t){return t.reduce((function(t,n){return Ai(e,n,t)}),new ee)}))])}function bi(e,t){$n.call(this,e.K,[e].concat("*"===t?[]:[t]),{A:e.A,T:e.B,subtree:e.subtree}),this.h=e,this.o=t}function Ei(e,t){var n={};$n.call(this,new fr((n.external=1,n)),"*"===e?[]:[e],{A:!1},!1,t),this.h=e}function Bi(e,t,n,r){var a=t.map((function(e){return e.eb}));t=t.map((function(e){return e.name}));var i=a.reduce((function(e,t){return e.add(t.K)}),n.K);$n.call(this,i,a.concat(n),{A:!1},!1,r),this.o=e,this.v=t,this.C=a,this.N=n,this.h=null}function Ni(e){$n.call(this,e,[],{A:!1})}function Ci(e){var t={};Ni.call(this,new fr((t.nodeType=1,t))),this.o=e}function Ti(e,t){t=void 0===t?{kind:null}:t;var n=e.prefix,r=e.namespaceURI,a={};"*"!==(e=e.localName)&&(a.nodeName=1),a.nodeType=1,Ni.call(this,new fr(a)),this.o=e,this.C=r,this.v=n||(r?null:""),this.N=t.kind}function Ii(e){var t={};Ni.call(this,new fr((t.nodeName=1,t))),this.o=e}function Oi(e){Ni.call(this,new fr({})),this.o=e}function Si(e,t,n){$n.call(this,new fr({}),[],{A:!1,T:"unsorted"}),this.o=n,this.v=t||void 0,this.C=e,this.h=null}function Ri(e,t){var n=new fr({});fa.call(this,n,[e,t],{A:!1,Z:!1,T:"unsorted",subtree:!1},t),this.v=e}function Di(e,t){var n=t.h,r=t.o,a=t.B;switch(e.node.nodeType){case 1:var i=r.createElementNS(e.node.namespaceURI,e.node.nodeName);for(n.getAllAttributes(e.node).forEach((function(e){return a.setAttributeNS(i,e.namespaceURI,e.nodeName,e.value)})),e=(r=u(Se(n,e))).next();!e.done;e=r.next())e=Di(e.value,t),a.insertBefore(i,e.node,null);return{node:i,G:null};case 2:return(t=r.createAttributeNS(e.node.namespaceURI,e.node.nodeName)).value=Re(n,e),{node:t,G:null};case 4:return{node:r.createCDATASection(Re(n,e)),G:null};case 8:return{node:r.createComment(Re(n,e)),G:null};case 9:for(r=r.createDocument(),e=(n=u(Se(n,e))).next();!e.done;e=n.next())e=Di(e.value,t),a.insertBefore(r,e.node,null);return{node:r,G:null};case 7:return{node:r.createProcessingInstruction(e.node.target,Re(n,e)),G:null};case 3:return{node:r.createTextNode(Re(n,e)),G:null}}}function Mi(e,t){var n=t.B,r=t.o,a=t.h;if(!Ne(e.node))return Di(e,t).node;switch(e.node.nodeType){case 2:return(r=r.createAttributeNS(e.node.namespaceURI,e.node.nodeName)).value=Re(a,e),r;case 8:return r.createComment(Re(a,e));case 1:var i=e.node.prefix,o=e.node.localName,s=r.createElementNS(e.node.namespaceURI,i?i+":"+o:o);return Se(a,e).forEach((function(e){e=Mi(e,t),n.insertBefore(s,e,null)})),Ie(a,e).forEach((function(e){n.setAttributeNS(s,e.node.namespaceURI,e.node.nodeName,Re(a,e))})),s.normalize(),s;case 7:return r.createProcessingInstruction(e.node.target,Re(a,e));case 3:return r.createTextNode(Re(a,e))}}function Gi(e,t,n){var r=e.node;if(!(Ne(r)||n||e.G))return r;n=t.C,e=function(e,t,n){var r=e;for(e=Ue(n,r);null!==e;){if(2===r.node.nodeType)t.push(r.node.nodeName);else{var a=Se(n,e);t.push(a.findIndex((function(e){return zt(e,r)})))}e=Ue(n,r=e)}return r}(e,r=[],t.h);var a=n.get(e.node);return a||(a={node:Mi(e,t),G:null},n.set(e.node,a)),function(e,t,n){for(var r={};0<t.length;)r.Xa=t.pop(),e="string"==typeof r.Xa?Ie(n,e).find(function(e){return function(t){return t.node.nodeName===e.Xa}}(r)):Se(n,e)[r.Xa],r={Xa:r.Xa};return e.node}(a,r,t.h)}function Ui(e){this.type=e}function Fi(e){this.type="delete",this.target=e}function Pi(e,t,n){this.type=n,this.target=e,this.content=t}function Hi(e,t){Pi.call(this,e,t,"insertAfter")}function ji(e,t){this.type="insertAttributes",this.target=e,this.content=t}function Xi(e,t){Pi.call(this,e,t,"insertBefore")}function _i(e,t){Pi.call(this,e,t,"insertIntoAsFirst")}function Li(e,t){Pi.call(this,e,t,"insertIntoAsLast")}function ki(e,t){Pi.call(this,e,t,"insertInto")}function qi(e,t){this.type="rename",this.target=e,this.o=t.va?t:new ve(t.prefix,t.namespaceURI,t.localName)}function Vi(e,t){this.type="replaceElementContent",this.target=e,this.text=t}function Yi(e,t){this.type="replaceNode",this.target=e,this.o=t}function Qi(e,t){this.type="replaceValue",this.target=e,this.o=t}function Ji(e,t){return new Yi(e,t)}function Ki(e){sr.call(this,new fr({}),[e],{A:!1,T:"unsorted"}),this.h=e}function zi(e,t,n){var r=[],a=[],i=!1;return e.forEach((function(e){i=function e(t,n,r,a,i,o){var s=n.h;return t.reduce((function e(t,n){return Z(n.type,62)?(n.R.forEach((function(n){return n().S().forEach((function(n){return e(t,n)}))})),t):(t.push(n),t)}),[]).forEach((function(t,u,l){if(Z(t.type,47)){if(i)throw o(t.value,s);r.push(t.value.node)}else if(Z(t.type,46)||Z(t.type,53)&&3===t.value.node.nodeType){var c=Z(t.type,46)?Jt(Ot(t,n).first(),1).value:Re(s,t.value);0!==u&&Z(l[u-1].type,46)&&Z(t.type,46)?(a.push({data:" "+c,Pa:!0,nodeType:3}),i=!0):c&&(a.push({data:""+c,Pa:!0,nodeType:3}),i=!0)}else if(Z(t.type,55)){var h=[];Se(s,t.value).forEach((function(e){return h.push(Xe(e))})),i=e(h,n,r,a,i,o)}else{if(!Z(t.type,53)){if(Z(t.type,60))throw Tt(t.type);throw Error("Atomizing "+t.type+" is not implemented.")}a.push(t.value.node),i=!0}})),i}(e,t,r,a,i,n)})),{attributes:r,Ua:a}}function Wi(e,t,n,r,a){var i=[];switch(e){case 4:r.length&&i.push(new ji(t,r)),a.length&&i.push(new _i(t,a));break;case 5:r.length&&i.push(new ji(t,r)),a.length&&i.push(new Li(t,a));break;case 3:r.length&&i.push(new ji(t,r)),a.length&&i.push(new ki(t,a));break;case 2:r.length&&i.push(new ji(n,r)),a.length&&i.push(new Xi(t,a));break;case 1:r.length&&i.push(new ji(n,r)),a.length&&i.push(new Hi(t,a))}return i}function Zi(e,t,n){sr.call(this,new fr({}),[e,n],{A:!1,T:"unsorted"}),this.C=e,this.h=t,this.v=n}function $i(){return Ct("Casting not supported from given type to a single xs:string or xs:untypedAtomic or any of its derived types.")}v(Ja,$n),Ja.prototype.evaluate=function(e,t){var n=this,r=er(this.C,e,t),a=er(this.N,e,t);if(this.o){if("nodeCompare"===this.h)return r.F()||a.F()?se.empty():this.o(r,a,e)?se.$():se.U();var i=St(r,t),o=St(a,t);return i.F()||o.F()?"valueCompare"===this.h?se.empty():se.U():this.o(i,o,e)?se.$():se.U()}return r.aa({empty:function(){return"valueCompare"===n.h||"nodeCompare"===n.h?se.empty():se.U()},default:function(){return a.aa({empty:function(){return"valueCompare"===n.h||"nodeCompare"===n.h?se.empty():se.U()},default:function(){if("nodeCompare"===n.h)return r.aa({default:function(){throw Error("XPTY0004: Sequences to compare are not singleton")},s:function(){return function(e,t,n,r,a){return n.aa({default:function(){throw Error("XPTY0004: Sequences to compare are not singleton")},s:function(){return _e([t,n],(function(i){var o=u(i);return i=o.next().value,o=o.next().value,Qa(e.v,r.h,i.type,o.type)(t,n,a)?se.$():se.U()}))}})}(n,r,a,t,e)}});var i=St(r,t),o=St(a,t);return"valueCompare"===n.h?i.aa({s:function(){return o.aa({s:function(){return i.M((function(t){var r=u(t).next().value;return o.M((function(t){return t=u(t).next().value,La(n.v,r.type,t.type)(r,t,e)?se.$():se.U()}))}))},default:function(){throw Error("XPTY0004: Sequences to compare are not singleton.")}})},default:function(){throw Error("XPTY0004: Sequences to compare are not singleton.")}}):function(e,t,n,r){return e=Va[e],n.M((function(n){return t.filter((function(t){for(var a=0,i=n.length;a<i;++a){var o=n[a],s=u(Ya(t.type,o.type)),l=s.next().value;if(s=s.next().value,l?t=Jt(t,l):s&&(o=Jt(o,s)),La(e,t.type,o.type)(t,o,r))return!0}return!1})).aa({default:function(){return se.$()},empty:function(){return se.U()}})}))}(n.v,i,o,e)}})}})},v(za,$n),za.prototype.evaluate=function(e,t){var n=this,r=Ka(this.h,t.h,er(this.o,e,t),this.o.B);e=Ka(this.h,t.h,er(this.v,e,t),this.v.B);var a=r.value,i=e.value,o=null,s=null,u=!1,l=!1;return se.create({next:function(){if(u)return z;for(;!l;){if(!o){var e=a.next(0);if(e.done)return u=!0,z;o=e.value}if(!s){if((e=i.next(0)).done){l=!0;break}s=e.value}if(zt(o.value,s.value)){if(e=W(o),s=o=null,"intersectOp"===n.h)return e}else if(0>tn(t.h,o,s)){if(e=W(o),o=null,"exceptOp"===n.h)return e}else s=null}return"exceptOp"===n.h?null!==o?(e=W(o),o=null,e):a.next(0):(u=!0,z)}})},v(Wa,cr),Wa.prototype.v=function(e,t,n){return n.length?Bt(n.map((function(t){return t(e)}))):se.empty()},v(Za,$n),Za.prototype.evaluate=function(e,t){var n=this,r=yt(e,er(this.h,e,t)),a=null,i=null,o=!1;return se.create({next:function(e){for(;!o;){if(!a&&(a=r.next(e)).done)return o=!0,z;i||(i=er(n.o,a.value,t));var s=i.value.next(e);if(!s.done)return s;a=i=null}}})},v($a,$n),$a.prototype.evaluate=function(e,t){var n=this,r=St(er(this.v,e,t),t);return r.aa({empty:function(){return n.o?se.$():se.U()},s:function(){return r.map((function(e){return Qt(e,n.h).u?Y:Q}))},multiple:function(){return se.U()}})},v(ei,$n),ei.prototype.evaluate=function(e,t){var n=this,r=St(er(this.v,e,t),t);return r.aa({empty:function(){if(!n.o)throw Error("XPTY0004: Sequence to cast is empty while target type is singleton.");return se.empty()},s:function(){return r.map((function(e){return Jt(e,n.h)}))},multiple:function(){throw Error("XPTY0004: Sequence to cast is not singleton or empty.")}})},v(ni,$n),ni.prototype.evaluate=function(e,t){var n=this,r=er(this.v,e,t);return r.aa({empty:function(){return"?"===n.h||"*"===n.h?se.$():se.U()},multiple:function(){return"+"===n.h||"*"===n.h?ti(r,(function(r){var a=se.s(r);return r=xt(e,0,r,a),er(n.o,r,t)})):se.U()},s:function(){return ti(r,(function(r){var a=se.s(r);return r=xt(e,0,r,a),er(n.o,r,t)}))}})},v(oi,$n),oi.prototype.evaluate=function(e,t){var n=this;if(this.h.every((function(e){return"sorted"===e.B}))){var r=0;return ii(t.h,{next:function(){return r>=n.h.length?z:W(er(n.h[r++],e,t))}}).map((function(e){if(!Z(e.type,53))throw Error("XPTY0004: The sequences to union are not of type node()*");return e}))}return Bt(this.h.map((function(n){return er(n,e,t)}))).M((function(e){if(e.some((function(e){return!Z(e.type,53)})))throw Error("XPTY0004: The sequences to union are not of type node()*");return e=nn(t.h,e),se.create(e)}))},v(mi,fa),mi.prototype.C=function(e,t,n,r){if(this.v[1])throw Error("More than one order spec is not supported for the order by clause.");var a,i,o=[],s=!1,l=null,c=this.v[0];return se.create({next:function(){if(!s){for(var h=t.next(0);!h.done;)o.push(h.value),h=t.next(0);if((h=o.map((function(e){return c.ia.evaluate(e,n)})).map((function(e){return St(e,n)}))).find((function(e){return!e.F()&&!e.za()})))throw ui("Order by only accepts empty or singleton sequences");if(function(e){return(e=e.find((function(e){return!!e})))?Rt(e.type):null}(a=(a=h.map((function(e){return e.first()}))).map((function(e){return null===e?e:Z(19,e.type)?Jt(e,1):e})))&&!(a=si(a)))throw ui("Could not cast values");h=a.length,i=a.map((function(e,t){return t}));for(var p=0;p<h;p++)if(p+1!==h)for(var f=p;0<=f;f--){var d=f,m=f+1;if(m!==h){var v=a[i[d]],g=a[i[m]];if(null!==g||null!==v){if(c.mc){if(null===v)continue;if(null===g&&null!==v){v=u([i[m],i[d]]),i[d]=v.next().value,i[m]=v.next().value;continue}if(isNaN(g.value)&&null!==v&&!isNaN(v.value)){v=u([i[m],i[d]]),i[d]=v.next().value,i[m]=v.next().value;continue}}else{if(null===g)continue;if(null===v&&null!==g){v=u([i[m],i[d]]),i[d]=v.next().value,i[m]=v.next().value;continue}if(isNaN(v.value)&&null!==g&&!isNaN(g.value)){v=u([i[m],i[d]]),i[d]=v.next().value,i[m]=v.next().value;continue}}La("gtOp",v.type,g.type)(v,g,e)&&(v=u([i[m],i[d]]),i[d]=v.next().value,i[m]=v.next().value)}}}var y=c.Ib?0:a.length-1;l=r({next:function(){return c.Ib?y>=a.length?z:W(o[i[y++]]):0>y?z:W(o[i[y--]])}}).value,s=!0}return l.next(0)}})},v(vi,$n),vi.prototype.evaluate=function(e,t){if(null===e.O)throw Error("XPDY0002: context is absent, it needs to be present to use paths.");for(var n=t.h,r=e.O.value;9!==r.node.nodeType;)if(null===(r=Ue(n,r)))throw Error("XPDY0050: the root node of the context node is not a document node.");return n=se.s(Xe(r)),this.h?er(this.h,xt(e,0,n.first(),n),t):n},v(gi,$n),gi.prototype.evaluate=function(e){if(null===e.O)throw Error('XPDY0002: context is absent, it needs to be present to use the "." operator');return se.s(e.O)},v(yi,$n),yi.prototype.evaluate=function(e,t){var n=this,r=!0;return this.h.reduce((function(a,i,o){var s=null===a?Kt(e):yt(e,a);if(a={next:function(e){if((e=s.next(e)).done)return z;if(null!==e.value.O&&!Z(e.value.O.type,53)&&0<o)throw Error("XPTY0019: The result of E1 in a path expression E1/E2 should not evaluate to a sequence of nodes.");return W(er(i,e.value,t))}},n.o)switch(i.B){case"reverse-sorted":var u=a;a={next:function(e){return(e=u.next(e)).done?e:W(e.value.M((function(e){return se.create(e.reverse())})))}};case"sorted":if(i.subtree&&r){var l=ai(a);break}l=ii(t.h,a);break;case"unsorted":return ai(a).M((function(e){return se.create(function(e,t){var n=!1,r=!1;if(t.forEach((function(e){Z(e.type,53)?n=!0:r=!0})),r&&n)throw Error("XPTY0018: The path operator should either return nodes or non-nodes. Mixed sequences are not allowed.");return n?nn(e,t):t}(t.h,e))}))}else l=ai(a);return r=r&&i.Z,l}),null)},yi.prototype.Y=function(){return this.h[0].Y()},v(wi,$n),wi.prototype.evaluate=function(e,t){var n=this,r=er(this.o,e,t);if(this.h.A){var a=er(this.h,e,t);if(a.F())return a;var i=a.first();if(Z(i.type,2)){var o=i.value;if(!Number.isInteger(o))return se.empty();var s=r.value,u=!1;return se.create({next:function(){if(!u){for(var e=s.next(0);!e.done;e=s.next(0))if(1==o--)return u=!0,e;u=!0}return z}})}return a.getEffectiveBooleanValue()?r:se.empty()}var l=r.value,c=null,h=0,p=null;return se.create({next:function(a){for(var i=!1;(!c||!c.done)&&(c||(c=l.next(i?0:a),i=!0),!c.done);){p||(p=er(n.h,xt(e,h,c.value,r),t));var o=p.first();o=null!==o&&(Z(o.type,2)?o.value===h+1:p.getEffectiveBooleanValue()),p=null;var s=c.value;if(c=null,h++,o)return W(s)}return c}})},wi.prototype.Y=function(){return this.o.Y()},v(bi,$n),bi.prototype.evaluate=function(e,t){var n=this;return er(this.h,e,t).M((function(r){return r.reduce((function(r,a){return xi(a,n.o,r,e,t)}),new ee)}))},bi.prototype.Y=function(){return this.h.Y()},v(Ei,$n),Ei.prototype.evaluate=function(e,t){return xi(e.O,this.h,new ee,e,t)},v(Bi,$n),Bi.prototype.evaluate=function(e,t){var n=this,r=e,a=this.h.map((function(a,i){var o=er(n.C[i],r,t).S();return r=bt(e,((i={})[a]=function(){return se.create(o)},i)),o}));if(a.some((function(e){return 0===e.length})))return"every"===this.o?se.$():se.U();var i=Array(a.length).fill(0);i[0]=-1;for(var o=!0;o;){o=!1;for(var s=0,u=i.length;s<u;++s){var l=a[s];if(!(++i[s]>l.length-1)){for(o=Object.create(null),s={},u=0;u<i.length;s={ub:s.ub},u++)s.ub=a[u][i[u]],o[this.h[u]]=function(e){return function(){return se.s(e.ub)}}(s);if(o=bt(e,o),(o=er(this.N,o,t)).getEffectiveBooleanValue()&&"some"===this.o)return se.$();if(!o.getEffectiveBooleanValue()&&"every"===this.o)return se.U();o=!0;break}i[s]=0}}return"every"===this.o?se.$():se.U()},Bi.prototype.P=function(e){this.h=[];for(var t=0,n=this.v.length;t<n;++t){this.C[t].P(e),Ho(e);var r=this.v[t],a=r.prefix?e.ga(r.prefix):null;r=Xo(e,a,r.localName),this.h[t]=r}for(this.N.P(e),t=0,n=this.v.length;t<n;++t)Lo(e)},v(Ni,$n),Ni.prototype.evaluate=function(e){return this.h(e.O)?se.$():se.U()},v(Ci,Ni),Ci.prototype.h=function(e){return!!Z(e.type,53)&&(e=e.value.node.nodeType,3===this.o&&4===e||this.o===e)},Ci.prototype.Y=function(){return"type-"+this.o},v(Ti,Ni),Ti.prototype.h=function(e){var t=Z(e.type,54),n=Z(e.type,47);return!(!t&&!n)&&(e=e.value,!(null!==this.N&&(1===this.N&&!t||2===this.N&&!n))&&(null===this.v&&""!==this.C&&"*"===this.o||("*"===this.v?"*"===this.o||this.o===e.node.localName:("*"===this.o||this.o===e.node.localName)&&(e.node.namespaceURI||null)===((""===this.v?t?this.C:null:this.C)||null))))},Ti.prototype.Y=function(){return"*"===this.o?null===this.N?"type-1-or-type-2":"type-"+this.N:"name-"+this.o},Ti.prototype.P=function(e){if(null===this.C&&"*"!==this.v&&(this.C=e.ga(this.v||"")||null,!this.C&&this.v))throw Error("XPST0081: The prefix "+this.v+" could not be resolved.")},v(Ii,Ni),Ii.prototype.h=function(e){return Z(e.type,57)&&e.value.node.target===this.o},Ii.prototype.Y=function(){return"type-7"},v(Oi,Ni),Oi.prototype.h=function(e){return Z(e.type,de(this.o.prefix?this.o.prefix+":"+this.o.localName:this.o.localName))},v(Si,$n),Si.prototype.evaluate=function(e,t){if(!e.ta[this.h]){if(this.N)return this.N(e,t);throw Error("XQDY0054: The variable "+this.o+" is declared but not in scope.")}return e.ta[this.h]()},Si.prototype.P=function(e){if(this.C&&(this.v=e.ga(this.C)),this.h=e.rb(this.v||void 0,this.o),!this.h)throw Error("XPST0008, The variable "+this.o+" is not in scope.");(e=e.Da[this.h])&&(this.N=e)},v(Ri,fa),Ri.prototype.C=function(e,t,n,r){var a=this,i=null,o=null;return r({next:function(){for(;;){if(!o){var e=t.next(0);if(e.done)return z;i=e.value,o=er(a.v,i,n)}e=o.getEffectiveBooleanValue();var r=i;if(o=i=null,e)return W(r)}}})},v(Fi,Ui),Fi.prototype.h=function(e){var t={};return t.type=this.type,t.target=Gi(this.target,e,!1),t},v(Pi,Ui),Pi.prototype.h=function(e){var t={};return t.type=this.type,t.target=Gi(this.target,e,!1),t.content=this.content.map((function(t){return Gi(t,e,!0)})),t},v(Hi,Pi),v(ji,Ui),ji.prototype.h=function(e){var t={};return t.type=this.type,t.target=Gi(this.target,e,!1),t.content=this.content.map((function(t){return Gi(t,e,!0)})),t},v(Xi,Pi),v(_i,Pi),v(Li,Pi),v(ki,Pi),v(qi,Ui),qi.prototype.h=function(e){var t={},n={};return n.type=this.type,n.target=Gi(this.target,e,!1),n.newName=(t.prefix=this.o.prefix,t.namespaceURI=this.o.namespaceURI,t.localName=this.o.localName,t),n},v(Vi,Ui),Vi.prototype.h=function(e){var t={};return t.type=this.type,t.target=Gi(this.target,e,!1),t.text=this.text?Gi(this.text,e,!0):null,t},v(Yi,Ui),Yi.prototype.h=function(e){var t={};return t.type=this.type,t.target=Gi(this.target,e,!1),t.replacement=this.o.map((function(t){return Gi(t,e,!0)})),t},v(Qi,Ui),Qi.prototype.h=function(e){var t={};return t.type=this.type,t.target=Gi(this.target,e,!1),t["string-value"]=this.o,t},v(Ki,sr),Ki.prototype.o=function(e,t){var n,r,a=ur(this.h)(e,t),i=t.h;return{next:function(){if(!n){var e=a.next(0);if(e.value.H.some((function(e){return!Z(e.type,53)})))throw Error("XUTY0007: The target of a delete expression must be a sequence of zero or more nodes.");n=e.value.H,r=e.value.fa}return W({fa:or((n=n.filter((function(e){return Ue(i,e.value)}))).map((function(e){return new Fi(e.value)})),r),H:[]})}}},v(Zi,sr),Zi.prototype.o=function(e,t){var n,r,a,i,o,s,u=this,l=ur(this.C)(e,t),c=ur(this.v)(e,t),h=t.h;return{next:function(){if(!n){var e=l.next(0),p=zi([e.value.H],t,kn);n=p.attributes.map((function(e){return{node:e,G:null}})),r=p.Ua.map((function(e){return{node:e,G:null}})),a=e.value.fa}if(!i){if(0===(e=c.next(0)).value.H.length)throw Zn();if(3<=u.h){if(1!==e.value.H.length)throw qn();if(!Z(e.value.H[0].type,54)&&!Z(e.value.H[0].type,55))throw qn()}else{if(1!==e.value.H.length)throw Vn();if(!(Z(e.value.H[0].type,54)||Z(e.value.H[0].type,56)||Z(e.value.H[0].type,58)||Z(e.value.H[0].type,57)))throw Vn();if(null===(s=Ue(h,e.value.H[0].value,null)))throw Error("XUDY0029: The target "+e.value.H[0].value.outerHTML+" for inserting a node before or after must have a parent.")}i=e.value.H[0],o=e.value.fa}if(n.length){if(3<=u.h){if(!Z(i.type,54))throw Error("XUTY0022: An insert expression specifies the insertion of an attribute node into a document node.")}else if(1!==s.node.nodeType)throw Error("XUDY0030: An insert expression specifies the insertion of an attribute node before or after a child of a document node.");n.reduce((function(e,t){var n=t.node.prefix||"",r=t.node.prefix||"",a=t.node.namespaceURI,o=r?i.value.node.lookupNamespaceURI(r):null;if(o&&o!==a)throw zn(a);if((r=e[r])&&a!==r)throw Wn(a);return e[n]=t.node.namespaceURI,e}),{})}return W({H:[],fa:or(Wi(u.h,i.value,s||null,n,r),a,o)})}}};var eo=/([A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])/,to=new RegExp(eo.source+new RegExp("("+eo.source+"|[-.0-9·̀-ͯ‿⁀])").source+"*","g");function no(e){return!!(e=e.match(to))&&1===e.length}function ro(e,t){return St(t,e).aa({s:function(e){if(Z((e=e.first()).type,1)||Z(e.type,19)){if(!no(e.value))throw Error('XQDY0041: The value "'+e.value+'" of a name expressions cannot be converted to a NCName.');return se.s(e)}throw $i()},default:function(){throw $i()}}).value}function ao(e,t,n){return St(n,t).aa({s:function(t){if(Z((t=t.first()).type,23))return se.s(t);if(Z(t.type,1)||Z(t.type,19)){if(1===(t=t.value.split(":")).length)t=t[0];else{var n=t[0],r=e.ga(n);t=t[1]}if(!no(t)||n&&!no(n))throw fi(n?n+":"+t:t);if(n&&!r)throw fi(n+":"+t);return se.s({type:23,value:new ve(n,r,t)})}throw $i()},default:function(){throw $i()}}).value}function io(e,t){sr.call(this,new fr({}),[e,t],{A:!1,T:"unsorted"}),this.v=e,this.C=t,this.h=void 0}function oo(e,t,n){sr.call(this,new fr({}),[t,n],{A:!1,T:"unsorted"}),this.C=e,this.h=t,this.v=n}function so(e){switch(e.type){case"delete":return new Fi({node:e.target,G:null});case"insertAfter":return new Hi({node:e.target,G:null},e.content.map((function(e){return{node:e,G:null}})));case"insertBefore":return new Xi({node:e.target,G:null},e.content.map((function(e){return{node:e,G:null}})));case"insertInto":return new ki({node:e.target,G:null},e.content.map((function(e){return{node:e,G:null}})));case"insertIntoAsFirst":return new _i({node:e.target,G:null},e.content.map((function(e){return{node:e,G:null}})));case"insertIntoAsLast":return new Li({node:e.target,G:null},e.content.map((function(e){return{node:e,G:null}})));case"insertAttributes":return new ji({node:e.target,G:null},e.content.map((function(e){return{node:e,G:null}})));case"rename":return new qi({node:e.target,G:null},e.newName);case"replaceNode":return new Yi({node:e.target,G:null},e.replacement.map((function(e){return{node:e,G:null}})));case"replaceValue":return new Qi({node:e.target,G:null},e["string-value"]);case"replaceElementContent":return new Vi({node:e.target,G:null},e.text?{node:e.text,G:null}:null);default:throw Error('Unexpected type "'+e.type+'" when parsing a transferable pending update.')}}function uo(e,t,n){sr.call(this,new fr({}),e.reduce((function(e,t){return e.push(t.eb),e}),[t,n]),{A:!1,T:"unsorted"}),this.h=e,this.C=t,this.v=n,this.I=null}function lo(e,t){return{node:{nodeType:2,Pa:!0,nodeName:e.va(),namespaceURI:e.namespaceURI,prefix:e.prefix,localName:e.localName,name:e.va(),value:t},G:null}}function co(e,t){var n=t.tb||[];n=n.concat(e.Ja||[]),$n.call(this,new fr({}),n,{A:!1,T:"unsorted"}),e.Ja?this.o=e.Ja:this.name=new ve(e.prefix,e.namespaceURI,e.localName),this.h=t,this.v=void 0}function ho(e){$n.call(this,e?e.K:new fr({}),e?[e]:[],{A:!1,T:"unsorted"}),this.h=e}function po(e,t,n,r){$n.call(this,new fr({}),r.concat(t).concat(e.Ja||[]),{A:!1,T:"unsorted"}),e.Ja?this.o=e.Ja:this.h=new ve(e.prefix,e.namespaceURI,e.localName),this.N=n.reduce((function(e,t){if(t.prefix in e)throw Error("XQST0071: The namespace declaration with the prefix "+t.prefix+" has already been declared on the constructed element.");return e[t.prefix]=t.uri,e}),{}),this.C=t,this.ka=r,this.v=void 0}function fo(e){if(/^xml$/i.test(e))throw Error('XQDY0064: The target of a created PI may not be "'+e+'"')}function mo(e,t){return{node:{data:t,Pa:!0,nodeName:e,nodeType:7,target:e},G:null}}function vo(e,t){var n=e.Db?[e.Db].concat(t):[t];$n.call(this,n.reduce((function(e,t){return e.add(t.K)}),new fr({})),n,{A:!1,T:"unsorted"}),this.h=e,this.o=t}function go(e){$n.call(this,e?e.K:new fr({}),e?[e]:[],{A:!1,T:"unsorted"}),this.h=e}function yo(e,t,n,r){var a,i=new fr({});cr.call(this,i,(a=[e].concat(c(t.map((function(e){return e.jc}))),[n])).concat.apply(a,c(t.map((function(e){return e.Ob.map((function(e){return e.Nb}))})))),{A:!1,Z:!1,T:"unsorted",subtree:!1},r),this.C=e,this.h=t.length,this.N=t.map((function(e){return e.Ob}))}v(io,sr),io.prototype.o=function(e,t){var n=this,r=ur(this.v)(e,t),a=ur(this.C)(e,t);return{next:function(){var e=r.next(0),i=e.value.H;if(0===i.length)throw Zn();if(1!==i.length)throw Qn();if(!Z(i[0].type,54)&&!Z(i[0].type,47)&&!Z(i[0].type,57))throw Qn();i=i[0];var o=a.next(0);e:{var s=n.h,u=se.create(o.value.H);switch(i.type){case 54:if(s=ao(s,t,u).next(0).value.value,(u=i.value.node.lookupNamespaceURI(s.prefix))&&u!==s.namespaceURI)throw zn(s.namespaceURI);break e;case 47:if((s=ao(s,t,u).next(0).value.value).namespaceURI&&(u=i.value.node.lookupNamespaceURI(s.prefix))&&u!==s.namespaceURI)throw zn(s.namespaceURI);break e;case 57:s=new ve("",null,s=ro(t,u).next(0).value.value);break e}s=void 0}return W({H:[],fa:or([new qi(i.value,s)],e.value.fa,o.value.fa)})}}},io.prototype.P=function(e){this.h=Po(e),sr.prototype.P.call(this,e)},v(oo,sr),oo.prototype.o=function(e,t){var n=ur(this.h)(e,t);return e=ur(this.v)(e,t),this.C?function(e,t,n){var r,a,i,o,s=!1;return{next:function(){if(s)return z;if(!i){var u=n.next(0),l=St(se.create(u.value.H),e).map((function(e){return Jt(e,1)})).S().map((function(e){return e.value})).join(" ");i=0===l.length?null:{node:e.o.createTextNode(l),G:null},o=u.value.fa}if(!r){if(0===(u=t.next(0)).value.H.length)throw Zn();if(1!==u.value.H.length)throw Yn();if(!(Z(u.value.H[0].type,54)||Z(u.value.H[0].type,47)||Z(u.value.H[0].type,56)||Z(u.value.H[0].type,58)||Z(u.value.H[0].type,57)))throw Yn();r=u.value.H[0],a=u.value.fa}if(Z(r.type,54))return s=!0,W({H:[],fa:or([new Vi(r.value,i)],o,a)});if(Z(r.type,47)||Z(r.type,56)||Z(r.type,58)||Z(r.type,57)){if(u=i?Re(e.h,i):"",Z(r.type,58)&&(u.includes("--")||u.endsWith("-")))throw Error('XQDY0072: The content "'+u+'" for a comment node contains two adjacent hyphens or ends with a hyphen.');if(Z(r.type,57)&&u.includes("?>"))throw Error('XQDY0026: The content "'+u+'" for a processing instruction node contains "?>".');return s=!0,W({H:[],fa:or([new Qi(r.value,u)],o,a)})}}}}(t,n,e):function(e,t,n){var r,a,i;return{next:function(){if(!r){var o=n.next(0),s=zi([o.value.H],e,Wn);r={attributes:s.attributes.map((function(e){return{node:e,G:null}})),Ua:s.Ua.map((function(e){return{node:e,G:null}}))},a=o.value.fa}if(0===(s=t.next(0)).value.H.length)throw Zn();if(1!==s.value.H.length)throw Yn();if(!(Z(s.value.H[0].type,54)||Z(s.value.H[0].type,47)||Z(s.value.H[0].type,56)||Z(s.value.H[0].type,58)||Z(s.value.H[0].type,57)))throw Yn();if(null===(i=Ue(e.h,s.value.H[0].value,null)))throw Error("XUDY0009: The target "+s.value.H[0].value.outerHTML+" for replacing a node must have a parent.");if(o=s.value.H[0],s=s.value.fa,Z(o.type,47)){if(r.Ua.length)throw Error("XUTY0011: When replacing an attribute the new value must be zero or more attribute nodes.");r.attributes.reduce((function(e,t){var n=t.node.prefix||"";t=t.node.namespaceURI;var r=i.node.lookupNamespaceURI(n);if(r&&r!==t)throw zn(t);if((r=e[n])&&t!==r)throw Wn(t);return e[n]=t,e}),{})}else if(r.attributes.length)throw Error("XUTY0010: When replacing an an element, text, comment, or processing instruction node the new value must be a single node.");return W({H:[],fa:or([Ji(o.value,[].concat(r.attributes,r.Ua))],a,s)})}}}(t,n,e)},v(uo,sr),uo.prototype.evaluate=function(e,t){return lr(e=this.o(e,t),(function(){}))},uo.prototype.o=function(e,t){var n,r,a,i=this,o=t.h,s=t.o,u=t.B,l=[],h=[],p=[];return{next:function(){if(h.length!==i.h.length)for(var f={},d=h.length;d<i.h.length;f={gb:f.gb},d++){var m=i.h[d],v=l[d];if(v||(l[d]=v=ur(m.eb)(e,t)),1!==(v=v.next(0)).value.H.length||!Z(v.value.H[0].type,53))throw Error("XUTY0013: The source expression of a copy modify expression must return a single node.");f.gb=Xe(Di(v.value.H[0].value,t)),h.push(f.gb.value),p.push(v.value.fa),e=bt(e,((v={})[m.sc]=function(e){return function(){return se.s(e.gb)}}(f),v))}return a||(n||(n=ur(i.C)(e,t)),a=n.next(0).value.fa),a.forEach((function(e){if(e.target&&!function e(t,n,r){if(n.find((function(e){return zt(e,t)})))return!0;var a=Ue(r,t);return!!a&&e(a,n,r)}(e.target,h,o))throw Error("XUDY0014: The target "+e.target.node.outerHTML+" must be a node created by the copy clause.");if("put"===e.type)throw Error("XUDY0037: The modify expression of a copy modify expression can not contain a fn:put.")})),ir(f=a.map((function(e){return so(e=e.h(t))})),o,s,u),r||(r=ur(i.v)(e,t)),W({H:(f=r.next(0)).value.H,fa:or.apply(null,[f.value.fa].concat(c(p)))})}}},uo.prototype.P=function(e){Ho(e),this.h.forEach((function(t){return t.sc=Xo(e,t.Qb.namespaceURI,t.Qb.localName)})),sr.prototype.P.call(this,e),Lo(e),this.I=this.h.some((function(e){return e.eb.I}))||this.v.I},v(co,$n),co.prototype.evaluate=function(e,t){var n,r,a,i=this,o=!1;return se.create({next:function(){if(o)return z;if(!r){if(i.o){if(!n){var s=i.o.evaluate(e,t);n=ao(i.v,t,s)}r=n.next(0).value.value}else r=i.name;if(r&&("xmlns"===r.prefix||!r.prefix&&"xmlns"===r.localName||"http://www.w3.org/2000/xmlns/"===r.namespaceURI||"xml"===r.prefix&&"http://www.w3.org/XML/1998/namespace"!==r.namespaceURI||r.prefix&&"xml"!==r.prefix&&"http://www.w3.org/XML/1998/namespace"===r.namespaceURI))throw Error('XQDY0044: The node name "'+r.va()+'" is invalid for a computed attribute constructor.')}return i.h.tb?(s=i.h.tb,a||(a=Bt(s.map((function(n){return St(n.evaluate(e,t),t).M((function(e){return se.s(V(e.map((function(e){return e.value})).join(" "),1))}))}))).M((function(e){return se.s(Xe(lo(r,e.map((function(e){return e.value})).join(""))))})).value),a.next(0)):(o=!0,W(Xe(lo(r,i.h.value))))}})},co.prototype.P=function(e){if(this.v=Po(e),this.name&&this.name.prefix&&!this.name.namespaceURI){var t=e.ga(this.name.prefix);if(void 0===t&&this.name.prefix)throw It(this.name.prefix);this.name.namespaceURI=t||null}$n.prototype.P.call(this,e)},v(ho,$n),ho.prototype.evaluate=function(e,t){var n={data:"",Pa:!0,nodeType:8},r={node:n,G:null};return this.h?St(e=er(this.h,e,t),t).M((function(e){if(-1!==(e=e.map((function(e){return Jt(e,1).value})).join(" ")).indexOf("--\x3e"))throw Error('XQDY0072: The contents of the data of a comment may not include "--\x3e"');return n.data=e,se.s(Xe(r))})):se.s(Xe(r))},v(po,$n),po.prototype.evaluate=function(e,t){var n,r,a,i,o,s=this,u=!1,l=!1,c=!1;return se.create({next:function(){if(c)return z;if(u||(n||(n=Bt(s.C.map((function(n){return er(n,e,t)})))),r=n.S(),u=!0),!l){a||(a=s.ka.map((function(n){return er(n,e,t)})));for(var h=[],p=0;p<a.length;p++){var f=a[p].S();h.push(f)}i=h,l=!0}if(s.o&&(o||(h=s.o.evaluate(e,t),o=ao(s.v,t,h)),h=o.next(0),s.h=h.value.value),"xmlns"===s.h.prefix||"http://www.w3.org/2000/xmlns/"===s.h.namespaceURI||"xml"===s.h.prefix&&"http://www.w3.org/XML/1998/namespace"!==s.h.namespaceURI||s.h.prefix&&"xml"!==s.h.prefix&&"http://www.w3.org/XML/1998/namespace"===s.h.namespaceURI)throw Error('XQDY0096: The node name "'+s.h.va()+'" is invalid for a computed element constructor.');var d={nodeType:1,Pa:!0,attributes:[],childNodes:[],nodeName:s.h.va(),namespaceURI:s.h.namespaceURI,prefix:s.h.prefix,localName:s.h.localName};for(h={node:d,G:null},r.forEach((function(e){d.attributes.push(e.value.node)})),(p=zi(i,t,li)).attributes.forEach((function(e){if(d.attributes.find((function(t){return t.namespaceURI===e.namespaceURI&&t.localName===e.localName})))throw Error("XQDY0025: The attribute "+e.name+" does not have an unique name in the constructed element.");d.attributes.push(e)})),p.Ua.forEach((function(e){d.childNodes.push(e)})),p=0;p<d.childNodes.length;p++)if(Ne(f=d.childNodes[p])&&3===f.nodeType){var m=d.childNodes[p-1];m&&Ne(m)&&3===m.nodeType&&(m.data+=f.data,d.childNodes.splice(p,1),p--)}return c=!0,W(Xe(h))}})},po.prototype.P=function(e){var t=this;if(Ho(e),Object.keys(this.N).forEach((function(n){e.o[e.h][n]=t.N[n]})),this.J.forEach((function(t){return t.P(e)})),this.C.reduce((function(t,n){if(n.name){if(n="Q{"+(n.name.namespaceURI||e.ga(n.name.prefix))+"}"+n.name.localName,t.includes(n))throw Error("XQST0040: The attribute "+n+" does not have an unique name in the constructed element.");t.push(n)}return t}),[]),this.h){var n=e.ga(this.h.prefix);if(void 0===n&&this.h.prefix)throw It(this.h.prefix);this.h.namespaceURI=n||null}this.v=Po(e),Lo(e)},v(vo,$n),vo.prototype.evaluate=function(e,t){var n=this;return St(er(this.o,e,t),t).M((function(r){var a=r.map((function(e){return Jt(e,1).value})).join(" ");if(-1!==a.indexOf("?>"))throw Error('XQDY0026: The contents of the data of a processing instruction may not include "?>"');if(null!==n.h.Mb)return fo(r=n.h.Mb),se.s(Xe(mo(r,a)));r=er(n.h.Db,e,t);var i=ro(t,r);return se.create({next:function(){var e=i.next(0);return e.done?e:(fo(e=e.value.value),W(Xe(mo(e,a))))}})}))},v(go,$n),go.prototype.evaluate=function(e,t){return this.h?St(e=er(this.h,e,t),t).M((function(e){return 0===e.length?se.empty():(e={node:{data:e.map((function(e){return Jt(e,1).value})).join(" "),Pa:!0,nodeType:3},G:null},se.s(Xe(e)))})):se.empty()},v(yo,cr),yo.prototype.v=function(e,t,n){var r=this;return n[0](e).M((function(a){for(var i=0;i<r.h;i++)if(r.N[i].some((function(n){switch(n.pc){case"?":if(1<a.length)return!1;break;case"*":break;case"+":if(1>a.length)return!1;break;default:if(1!==a.length)return!1}var r=se.create(a);return a.every((function(a,i){return a=xt(e,i,a,r),er(n.Nb,a,t).getEffectiveBooleanValue()}))})))return n[i+1](e);return n[r.h+1](e)}))},yo.prototype.P=function(e){if(cr.prototype.P.call(this,e),this.C.I)throw Ln()};var wo={ca:!1,qa:!1},Ao={ca:!0,qa:!1},xo={ca:!0,qa:!0};function bo(e){return e.ca?e.qa?xo:Ao:wo}function Eo(e,t){switch(e[0]){case"andOp":var n=Lr(e,"type");return new Ha(No("andOp",e,bo(t)),n);case"orOp":return n=Lr(e,"type"),new ja(No("orOp",e,bo(t)),n);case"unaryPlusOp":return n=Xr(Xr(e,"operand"),"*"),e=Lr(e,"type"),new Pa("+",Eo(n,t),e);case"unaryMinusOp":return n=Xr(Xr(e,"operand"),"*"),e=Lr(e,"type"),new Pa("-",Eo(n,t),e);case"addOp":case"subtractOp":case"multiplyOp":case"divOp":case"idivOp":case"modOp":var r=e[0],a=Eo(kr(e,["firstOperand","*"]),bo(t));t=Eo(kr(e,["secondOperand","*"]),bo(t));var i=Lr(e,"type"),o=Lr(kr(e,["firstOperand","*"]),"type"),s=Lr(kr(e,["secondOperand","*"]),"type");return o&&s&&Lr(e,"type")&&(n=Ra(r,o.type,s.type)),new Ga(r,a,t,i,n);case"sequenceExpr":return function(e,t){var n=qr(e,"*").map((function(e){return Eo(e,t)}));return 1===n.length?n[0]:(n=Lr(e,"type"),new Wa(qr(e,"*").map((function(e){return Eo(e,t)})),n))}(e,t);case"unionOp":return n=Lr(e,"type"),new oi([Eo(kr(e,["firstOperand","*"]),bo(t)),Eo(kr(e,["secondOperand","*"]),bo(t))],n);case"exceptOp":case"intersectOp":return n=Lr(e,"type"),new za(e[0],Eo(kr(e,["firstOperand","*"]),bo(t)),Eo(kr(e,["secondOperand","*"]),bo(t)),n);case"stringConcatenateOp":return function(e,t){var n=Lr(e,"type");return new wr(new Ea({localName:"concat",namespaceURI:"http://www.w3.org/2005/xpath-functions",prefix:""},(e=[Xr(e,"firstOperand")[1],Xr(e,"secondOperand")[1]]).length,n),e.map((function(e){return Eo(e,bo(t))})),n)}(e,t);case"rangeSequenceExpr":return function(e,t){var n=Lr(e,"type");return new wr(new Ea({localName:"to",namespaceURI:"http://fontoxpath/operators",prefix:""},(e=[Xr(e,"startExpr")[1],Xr(e,"endExpr")[1]]).length,n),e.map((function(e){return Eo(e,bo(t))})),n)}(e,t);case"equalOp":case"notEqualOp":case"lessThanOrEqualOp":case"lessThanOp":case"greaterThanOrEqualOp":case"greaterThanOp":case"eqOp":case"neOp":case"ltOp":case"leOp":case"gtOp":case"geOp":case"isOp":case"nodeBeforeOp":case"nodeAfterOp":return n=kr(e,["firstOperand","*"]),r=kr(e,["secondOperand","*"]),a=Lr(n,"type"),i=Lr(r,"type"),new Ja(e[0],Eo(n,bo(t)),Eo(r,bo(t)),a,i);case"pathExpr":return function(e,t){var n=Lr(e,"type"),r=qr(e,"stepExpr"),a=!1,i=r.map((function(e){var r=Xr(e,"xpathAxis");if(r){a=!0;var i=Xr(e,"attributeTest anyElementTest piTest documentTest elementTest commentTest namespaceTest anyKindTest textTest anyFunctionTest typedFunctionTest schemaAttributeTest atomicType anyItemType parenthesizedItemType typedMapTest typedArrayTest nameTest Wildcard".split(" "));switch(i=Bo(i),_r(r)){case"ancestor":var o=new Wr(i,{Na:!1});break;case"ancestor-or-self":o=new Wr(i,{Na:!0});break;case"attribute":o=new Zr(i);break;case"child":o=new $r(i);break;case"descendant":o=new ta(i,{Na:!1});break;case"descendant-or-self":o=new ta(i,{Na:!0});break;case"parent":o=new oa(i);break;case"following-sibling":o=new ia(i);break;case"preceding-sibling":o=new ua(i);break;case"following":o=new aa(i);break;case"preceding":o=new sa(i);break;case"self":o=new la(i)}}else o=Eo(o=kr(e,["filterExpr","*"]),bo(t));for(r=(e=u(e=qr(e,"*"))).next();!r.done;r=e.next())switch(r=r.value,r[0]){case"lookup":o=new bi(o,Co(r,t));break;case"predicate":case"predicates":o=qr(r,"*").reduce((function(e,n){return new wi(e,Eo(n,bo(t)))}),o)}return o.type=n,o}));return e=Xr(e,"rootExpr"),!(r=a||null!==e||1<r.length)&&1===i.length||!e&&1===i.length&&"sorted"===i[0].B?i[0]:e&&0===i.length?new vi(null):(i=new yi(i,r),e?new vi(i):i)}(e,t);case"contextItemExpr":return new gi(e=Lr(e,"type"));case"functionCallExpr":return function(e,t){var n=Xr(e,"functionName"),r=qr(Xr(e,"arguments"),"*");return e=Lr(e,"type"),new wr(new Ea(Vr(n),r.length,e),r.map((function(e){return"argumentPlaceholder"===e[0]?null:Eo(e,t)})),e)}(e,t);case"inlineFunctionExpr":return function(e,t){var n=qr(Xr(e,"paramList"),"*"),r=kr(e,["functionBody","*"]),a=Lr(e,"type");return new ma(n.map((function(e){return{name:Vr(Xr(e,"varName")),type:Yr(e)}})),Yr(e),r?Eo(r,t):new Wa([],a))}(e,t);case"arrowExpr":return function(e,t){var n=Lr(e,"type"),r=kr(e,["argExpr","*"]);e=qr(e,"*").slice(1),r=[Eo(r,t)];for(var a=0;a<e.length;a++)if("arguments"!==e[a][0]){if("arguments"===e[a+1][0]){var i=qr(e[a+1],"*");r=r.concat(i.map((function(e){return"argumentPlaceholder"===e[0]?null:Eo(e,t)})))}i="EQName"===e[a][0]?new Ea(Vr(e[a]),r.length,n):Eo(e[a],bo(t)),r=[new wr(i,r,n)]}return r[0]}(e,t);case"dynamicFunctionInvocationExpr":return function(e,t){var n=kr(e,["functionItem","*"]),r=Lr(e,"type");e=Xr(e,"arguments");var a=[];return e&&(a=qr(e,"*").map((function(e){return"argumentPlaceholder"===e[0]?null:Eo(e,t)}))),new wr(Eo(n,t),a,r)}(e,t);case"namedFunctionRef":return t=Xr(e,"functionName"),n=Lr(e,"type"),e=_r(kr(e,["integerConstantExpr","value"])),new Ea(Vr(t),parseInt(e,10),n);case"integerConstantExpr":return new ga(_r(Xr(e,"value")),{type:5,g:3});case"stringConstantExpr":return new ga(_r(Xr(e,"value")),{type:1,g:3});case"decimalConstantExpr":return new ga(_r(Xr(e,"value")),{type:4,g:3});case"doubleConstantExpr":return new ga(_r(Xr(e,"value")),{type:3,g:3});case"varRef":return new Si((e=Vr(Xr(e,"name"))).prefix,e.namespaceURI,e.localName);case"flworExpr":return function(e,t){var n=qr(e,"*");if(e=Xr(n[n.length-1],"*"),1<(n=n.slice(0,-1)).length&&!t.ca)throw Error("XPST0003: Use of XQuery FLWOR expressions in XPath is no allowed");return n.reduceRight((function(e,n){switch(n[0]){case"forClause":for(var r=(n=qr(n,"*")).length-1;0<=r;--r){var a=n[r],i=kr(a,["forExpr","*"]),o=Xr(a,"positionalVariableBinding");e=new da(Vr(kr(a,["typedVariableBinding","varName"])),Eo(i,bo(t)),o?Vr(o):null,e)}return e;case"letClause":for(r=(n=qr(n,"*")).length-1;0<=r;--r)i=kr(a=n[r],["letExpr","*"]),e=new va(Vr(kr(a,["typedVariableBinding","varName"])),Eo(i,bo(t)),e);return e;case"whereClause":for(r=(n=qr(n,"*")).length-1;0<=r;--r)e=new Ri(Eo(n[r],t),e);return e;case"windowClause":case"groupByClause":throw Error("Not implemented: "+n[0]+" is not implemented yet.");case"orderByClause":return function(e,t,n){return new mi((e=qr(e,"*")).filter((function(e){return"stable"!==e[0]})).map((function(e){var n=Xr(e,"orderModifier"),r=n?Xr(n,"orderingKind"):null;return n=n?Xr(n,"emptyOrderingMode"):null,r=!r||"ascending"===_r(r),n=!n||"empty least"===_r(n),{ia:Eo(kr(e,["orderByExpr","*"]),t),Ib:r,mc:n}})),n)}(n,t,e);case"countClause":throw Error("Not implemented: "+n[0]+" is not implemented yet.");default:throw Error("Not implemented: "+n[0]+" is not supported in a flwor expression")}}),Eo(e,t))}(e,t);case"quantifiedExpr":return function(e,t){var n=Lr(e,"type"),r=_r(Xr(e,"quantifier")),a=kr(e,["predicateExpr","*"]);return e=qr(e,"quantifiedExprInClause").map((function(e){return{name:Vr(kr(e,["typedVariableBinding","varName"])),eb:Eo(e=kr(e,["sourceExpr","*"]),bo(t))}})),new Bi(r,e,Eo(a,bo(t)),n)}(e,t);case"ifThenElseExpr":return n=Lr(e,"type"),new ca(Eo(Xr(Xr(e,"ifClause"),"*"),bo(t)),Eo(Xr(Xr(e,"thenClause"),"*"),t),Eo(Xr(Xr(e,"elseClause"),"*"),t),n);case"instanceOfExpr":return n=Eo(kr(e,["argExpr","*"]),t),r=kr(e,["sequenceType","*"]),a=kr(e,["sequenceType","occurrenceIndicator"]),e=Lr(e,"type"),new ni(n,Eo(r,bo(t)),a?_r(a):"",e);case"castExpr":return t=Eo(Xr(Xr(e,"argExpr"),"*"),bo(t)),n=Xr(e,"singleType"),new ei(t,e=Vr(Xr(n,"atomicType")),n=null!==Xr(n,"optional"));case"castableExpr":return t=Eo(Xr(Xr(e,"argExpr"),"*"),bo(t)),n=Xr(e,"singleType"),new $a(t,e=Vr(Xr(n,"atomicType")),n=null!==Xr(n,"optional"));case"simpleMapExpr":return function(e,t){var n=Lr(e,"type");return qr(e,"*").reduce((function(e,r){return null===e?Eo(r,bo(t)):new Za(e,Eo(r,bo(t)),n)}),null)}(e,t);case"mapConstructor":return function(e,t){var n=Lr(e,"type");return new ya(qr(e,"mapConstructorEntry").map((function(e){return{key:Eo(kr(e,["mapKeyExpr","*"]),bo(t)),value:Eo(kr(e,["mapValueExpr","*"]),bo(t))}})),n)}(e,t);case"arrayConstructor":return function(e,t){var n=Lr(e,"type"),r=qr(e=Xr(e,"*"),"arrayElem").map((function(e){return Eo(Xr(e,"*"),bo(t))}));switch(e[0]){case"curlyArray":return new Jr(r,n);case"squareArray":return new Kr(r,n);default:throw Error("Unrecognized arrayType: "+e[0])}}(e,t);case"unaryLookup":return n=Lr(e,"type"),new Ei(Co(e,t),n);case"typeswitchExpr":return function(e,t){if(!t.ca)throw Error("XPST0003: Use of XQuery functionality is not allowed in XPath context");var n=Lr(e,"type"),r=Eo(Xr(Xr(e,"argExpr"),"*"),t),a=qr(e,"typeswitchExprCaseClause").map((function(e){var n=0===qr(e,"sequenceTypeUnion").length?[Xr(e,"sequenceType")]:qr(Xr(e,"sequenceTypeUnion"),"sequenceType");return{jc:Eo(kr(e,["resultExpr","*"]),t),Ob:n.map((function(e){var n=Xr(e,"occurrenceIndicator");return{pc:n?_r(n):"",Nb:Eo(Xr(e,"*"),t)}}))}}));return e=Eo(kr(e,["typeswitchExprDefaultClause","resultExpr","*"]),t),new yo(r,a,e,n)}(e,t);case"elementConstructor":return function(e,t){if(!t.ca)throw Error("XPST0003: Use of XQuery functionality is not allowed in XPath context");var n=Vr(Xr(e,"tagName")),r=Xr(e,"attributeList"),a=r?qr(r,"attributeConstructor").map((function(e){return Eo(e,bo(t))})):[];return r=r?qr(r,"namespaceDeclaration").map((function(e){var t=Xr(e,"prefix");return{prefix:t?_r(t):"",uri:_r(Xr(e,"uri"))}})):[],e=(e=Xr(e,"elementContent"))?qr(e,"*").map((function(e){return Eo(e,bo(t))})):[],new po(n,a,r,e)}(e,t);case"attributeConstructor":return function(e,t){if(!t.ca)throw Error("XPST0003: Use of XQuery functionality is not allowed in XPath context");var n=Vr(Xr(e,"attributeName")),r=Xr(e,"attributeValue");return r=r?_r(r):null,e=(e=Xr(e,"attributeValueExpr"))?qr(e,"*").map((function(e){return Eo(e,bo(t))})):null,new co(n,{value:r,tb:e})}(e,t);case"computedAttributeConstructor":return(n=Xr(e,"tagName"))?n=Vr(n):(n=Xr(e,"tagNameExpr"),n={Ja:Eo(Xr(n,"*"),bo(t))}),new co(n,{tb:[e=Eo(Xr(Xr(e,"valueExpr"),"*"),bo(t))]});case"computedCommentConstructor":if(!t.ca)throw Error("XPST0003: Use of XQuery functionality is not allowed in XPath context");return new ho(e=(e=Xr(e,"argExpr"))?Eo(Xr(e,"*"),bo(t)):null);case"computedTextConstructor":if(!t.ca)throw Error("XPST0003: Use of XQuery functionality is not allowed in XPath context");return new go(e=(e=Xr(e,"argExpr"))?Eo(Xr(e,"*"),bo(t)):null);case"computedElementConstructor":return function(e,t){var n=Xr(e,"tagName");return n?n=Vr(n):(n=Xr(e,"tagNameExpr"),n={Ja:Eo(Xr(n,"*"),bo(t))}),e=(e=Xr(e,"contentExpr"))?qr(e,"*").map((function(e){return Eo(e,bo(t))})):[],new po(n,[],[],e)}(e,t);case"computedPIConstructor":if(!t.ca)throw Error("XPST0003: Use of XQuery functionality is not allowed in XPath context");return n=Xr(e,"piTargetExpr"),r=Xr(e,"piTarget"),a=Xr(e,"piValueExpr"),e=Lr(e,"type"),new vo({Db:n?Eo(Xr(n,"*"),bo(t)):null,Mb:r?_r(r):null},a?Eo(Xr(a,"*"),bo(t)):new Wa([],e));case"CDataSection":return new ga(_r(e),{type:1,g:3});case"deleteExpr":return new Ki(e=Eo(kr(e,["targetExpr","*"]),t));case"insertExpr":switch(n=Eo(kr(e,["sourceExpr","*"]),t),(a=qr(e,"*")[1])[0]){case"insertAfter":r=1;break;case"insertBefore":r=2;break;case"insertInto":r=(r=Xr(a,"*"))?"insertAsFirst"===r[0]?4:5:3}return new Zi(n,r,e=Eo(kr(e,["targetExpr","*"]),t));case"renameExpr":return new io(n=Eo(kr(e,["targetExpr","*"]),t),e=Eo(kr(e,["newNameExpr","*"]),t));case"replaceExpr":return new oo(n=!!Xr(e,"replaceValue"),r=Eo(kr(e,["targetExpr","*"]),t),e=Eo(kr(e,["replacementExpr","*"]),t));case"transformExpr":return function(e,t){var n=qr(Xr(e,"transformCopies"),"transformCopy").map((function(e){var n=Vr(Xr(Xr(e,"varRef"),"name"));return{eb:Eo(Xr(Xr(e,"copySource"),"*"),t),Qb:new ve(n.prefix,n.namespaceURI,n.localName)}})),r=Eo(Xr(Xr(e,"modifyExpr"),"*"),t);return e=Eo(Xr(Xr(e,"returnExpr"),"*"),t),new uo(n,r,e)}(e,t);case"x:stackTrace":for(n=e[1],e=e[2];"x:stackTrace"===e[0];)e=e[2];return new pa(n,e[0],Eo(e,t));default:return Bo(e)}}function Bo(e){switch(e[0]){case"nameTest":return new Ti(Vr(e));case"piTest":return(e=Xr(e,"piTarget"))?new Ii(_r(e)):new Ci(7);case"commentTest":return new Ci(8);case"textTest":return new Ci(3);case"documentTest":return new Ci(9);case"attributeTest":var t=(e=Xr(e,"attributeName"))&&Xr(e,"star");return!e||t?new Ci(2):new Ti(Vr(Xr(e,"QName")),{kind:2});case"elementTest":return t=(e=Xr(e,"elementName"))&&Xr(e,"star"),!e||t?new Ci(1):new Ti(Vr(Xr(e,"QName")),{kind:1});case"anyKindTest":return new Oi({prefix:"",namespaceURI:null,localName:"node()"});case"anyMapTest":return new Oi({prefix:"",namespaceURI:null,localName:"map(*)"});case"anyArrayTest":return new Oi({prefix:"",namespaceURI:null,localName:"array(*)"});case"Wildcard":return Xr(e,"star")?(t=Xr(e,"uri"))?e=new Ti({localName:"*",namespaceURI:_r(t),prefix:""}):(t=Xr(e,"NCName"),e="star"===Xr(e,"*")[0]?new Ti({localName:_r(t),namespaceURI:null,prefix:"*"}):new Ti({localName:"*",namespaceURI:null,prefix:_r(t)})):e=new Ti({localName:"*",namespaceURI:null,prefix:"*"}),e;case"atomicType":return new Oi(e=Vr(e));case"anyItemType":return new Oi({prefix:"",namespaceURI:null,localName:"item()"});default:throw Error("No selector counterpart for: "+e[0]+".")}}function No(e,t,n){var r=[];return function t(a){var i=Xr(a,"firstOperand")[1];a=Xr(a,"secondOperand")[1],i[0]===e?t(i):r.push(Eo(i,n)),a[0]===e?t(a):r.push(Eo(a,n))}(t),r}function Co(e,t){switch((e=Xr(e,"*"))[0]){case"NCName":return new ga(_r(e),{type:1,g:3});case"star":return"*";default:return Eo(e,bo(t))}}function To(e,t){return Eo(e,t)}var Io={};!function(e){(function(){!function(e){function t(e,n,r,a){return e=Error.call(this,e),Object.setPrototypeOf&&Object.setPrototypeOf(e,t.prototype),e.wc=n,e.xc=r,e.location=a,e.name="SyntaxError",e}function n(e,t,n){return n=n||" ",e.length>t?e:(t-=e.length,e+(n+=n.repeat(t)).slice(0,t))}!function(e,t){function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n}(t,Error),t.prototype.format=function(e){var t="Error: "+this.message;if(this.location){var r,a=null;for(r=0;r<e.length;r++)if(e[r].source===this.location.source){a=e[r].text.split(/\r\n|\n|\r/g);break}if(e=this.location.start,r=this.location.source+":"+e.line+":"+e.da,a){var i=this.location.end,o=n("",e.line.toString().length);a=a[e.line-1],i=e.line===i.line?i.da:a.length+1,t+="\n --\x3e "+r+"\n"+o+" |\n"+e.line+" | "+a+"\n"+o+" | "+n("",e.da-1)+n("",i-e.da,"^")}else t+="\n at "+r}return t},t.ic=function(e,t){function n(e){return e.charCodeAt(0).toString(16).toUpperCase()}function r(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+n(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+n(e)}))}function a(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+n(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+n(e)}))}function i(e){return o[e.type](e)}var o={literal:function(e){return'"'+r(e.text)+'"'},class:function(e){var t=e.rc.map((function(e){return Array.isArray(e)?a(e[0])+"-"+a(e[1]):a(e)}));return"["+(e.lc?"^":"")+t+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(e){return e.description}};return"Expected "+function(e){var t,n;if((e=e.map(i)).sort(),0<e.length){for(n=t=1;t<e.length;t++)e[t-1]!==e[t]&&(e[n]=e[t],n++);e.length=n}switch(e.length){case 1:return e[0];case 2:return e[0]+" or "+e[1];default:return e.slice(0,-1).join(", ")+", or "+e[e.length-1]}}(e)+" but "+(t?'"'+r(t)+'"':"end of input")+" found."},e.tc={SyntaxError:t,parse:function(e,n){function r(e,t,n){return["decimalFormatParam",["decimalFormatParamName",t],["decimalFormatParamValue",n]]}function a(e,t){return{type:"literal",text:e,ignoreCase:t}}function i(e,t,n){return{type:"class",rc:e,lc:t,ignoreCase:n}}function o(t){var n,r=Jl[t];if(r)return r;for(n=t-1;!Jl[n];)n--;for(r={line:(r=Jl[n]).line,da:r.da};n<t;)10===e.charCodeAt(n)?(r.line++,r.da=1):r.da++,n++;return Jl[t]=r}function s(e,t){var n=o(e),r=o(t);return{source:tt,start:{offset:e,line:n.line,da:n.da},end:{offset:t,line:r.line,da:r.da}}}function u(e){Yl<Kl||(Yl>Kl&&(Kl=Yl,zl=[]),zl.push(e))}function l(){var t,n,r=233*Yl;if(t=Zl[r])return Yl=t.i,t.result;t=Yl,He();var a=233*Yl+2;if(n=Zl[a])Yl=n.i,a=n.result;else{if(n=Yl,e.substr(Yl,6)===at){var i=at;Yl+=6}else i=et,0===Wl&&u(Ni);if(i!==et){if(He(),i=Yl,e.substr(Yl,8)===it){var o=it;Yl+=8}else o=et,0===Wl&&u(Ci);if(o!==et?(o=je())!==et?(o=Ce())!==et?(Ql=i,i=["encoding",o]):(Yl=i,i=et):(Yl=i,i=et):(Yl=i,i=et),i===et)if(i=Yl,e.substr(Yl,7)===ot?(o=ot,Yl+=7):(o=et,0===Wl&&u(Ti)),o!==et)if((o=je())!==et)if((o=Ce())!==et){var s=Yl,l=je();l!==et?(e.substr(Yl,8)===it?(l=it,Yl+=8):(l=et,0===Wl&&u(Ci)),l!==et?(l=je())!==et?(l=Ce())!==et?(Ql=s,s=l):(Yl=s,s=et):(Yl=s,s=et):(Yl=s,s=et)):(Yl=s,s=et),s===et&&(s=null),Ql=i,i=[["version",o]].concat(s?[["encoding",s]]:[])}else Yl=i,i=et;else Yl=i,i=et;else Yl=i,i=et;i!==et?(He(),(o=h())!==et?(Ql=n,n=["versionDecl"].concat(i)):(Yl=n,n=et)):(Yl=n,n=et)}else Yl=n,n=et;Zl[a]={i:Yl,result:n},a=n}if(a===et&&(a=null),He(),i=Zl[n=233*Yl+3])Yl=i.i,n=i.result;else{if(i=Yl,s=Zl[o=233*Yl+4])Yl=s.i,o=s.result;else{if(s=Yl,e.substr(Yl,6)===st?(l=st,Yl+=6):(l=et,0===Wl&&u(Ii)),l!==et)if((l=je())!==et)if(e.substr(Yl,9)===ut?(l=ut,Yl+=9):(l=et,0===Wl&&u(Oi)),l!==et)if((l=je())!==et){l=Yl;var p=Me();if((l=p!==et?e.substring(l,Yl):p)!==et)if(He(),61===e.charCodeAt(Yl)?(p=lt,Yl++):(p=et,0===Wl&&u(Si)),p!==et)if(He(),(p=Ce())!==et)He(),h()!==et?(Ql=s,s=["moduleDecl",["prefix",l],["uri",p]]):(Yl=s,s=et);else Yl=s,s=et;else Yl=s,s=et;else Yl=s,s=et}else Yl=s,s=et;else Yl=s,s=et;else Yl=s,s=et;else Yl=s,s=et;Zl[o]={i:Yl,result:s},o=s}o!==et?(He(),s=c(),Ql=i,i=["libraryModule",o].concat(s?[s]:[])):(Yl=i,i=et),Zl[n]={i:Yl,result:i},n=i}return n===et&&((i=Zl[n=233*Yl+1])?(Yl=i.i,n=i.result):(i=Yl,o=c(),He(),(l=Zl[s=233*Yl+36])?(Yl=l.i,s=l.result):(l=Yl,(p=C())!==et&&(Ql=l,p=["queryBody",p]),l=p,Zl[s]={i:Yl,result:l},s=l),s!==et?(Ql=i,i=["mainModule"].concat(o?[o]:[],[s])):(Yl=i,i=et),Zl[n]={i:Yl,result:i},n=i)),n!==et?(He(),Ql=t,t=["module"].concat(a?[a]:[],[n])):(Yl=t,t=et),Zl[r]={i:Yl,result:t},t}function c(){var e,t=233*Yl+5;if(e=Zl[t])return Yl=e.i,e.result;e=Yl;var n=[],r=Yl,a=v();if(a===et&&((a=p())===et&&((a=m())===et&&(a=d()))),a!==et){He();var i=h();i!==et?(He(),Ql=r,r=a):(Yl=r,r=et)}else Yl=r,r=et;for(;r!==et;)n.push(r),r=Yl,(a=v())===et&&((a=p())===et&&((a=m())===et&&(a=d()))),a!==et?(He(),(i=h())!==et?(He(),Ql=r,r=a):(Yl=r,r=et)):(Yl=r,r=et);if(r=[],a=Yl,(i=A())===et&&((i=g())===et&&(i=N())),i!==et){He();var o=h();o!==et?(He(),Ql=a,a=i):(Yl=a,a=et)}else Yl=a,a=et;for(;a!==et;)r.push(a),a=Yl,(i=A())===et&&((i=g())===et&&(i=N())),i!==et?(He(),(o=h())!==et?(He(),Ql=a,a=i):(Yl=a,a=et)):(Yl=a,a=et);return Ql=e,e=0===n.length&&0===r.length?null:["prolog"].concat(n,r),Zl[t]={i:Yl,result:e},e}function h(){var t,n=233*Yl+6;return(t=Zl[n])?(Yl=t.i,t.result):(59===e.charCodeAt(Yl)?(t=ct,Yl++):(t=et,0===Wl&&u(Ri)),Zl[n]={i:Yl,result:t},t)}function p(){var t,n,a=233*Yl+7;if(t=Zl[a])return Yl=t.i,t.result;if(n=Zl[t=233*Yl+8])Yl=n.i,t=n.result;else{if(n=Yl,e.substr(Yl,7)===ht){var i=ht;Yl+=7}else i=et,0===Wl&&u(Di);i!==et?(i=je())!==et?(e.substr(Yl,14)===pt?(i=pt,Yl+=14):(i=et,0===Wl&&u(Mi)),i!==et?(i=je())!==et?(e.substr(Yl,8)===ft?(i=ft,Yl+=8):(i=et,0===Wl&&u(Gi)),i===et&&(e.substr(Yl,5)===dt?(i=dt,Yl+=5):(i=et,0===Wl&&u(Ui))),i!==et?(Ql=n,n=["boundarySpaceDecl",i]):(Yl=n,n=et)):(Yl=n,n=et):(Yl=n,n=et)):(Yl=n,n=et):(Yl=n,n=et),Zl[t]={i:Yl,result:n},t=n}if(t===et&&((n=Zl[t=233*Yl+9])?(Yl=n.i,t=n.result):(n=Yl,e.substr(Yl,7)===ht?(i=ht,Yl+=7):(i=et,0===Wl&&u(Di)),i!==et?(i=je())!==et?(e.substr(Yl,7)===mt?(i=mt,Yl+=7):(i=et,0===Wl&&u(Fi)),i!==et?(i=je())!==et?(e.substr(Yl,9)===vt?(i=vt,Yl+=9):(i=et,0===Wl&&u(Pi)),i!==et?(i=je())!==et?(i=Ce())!==et?(Ql=n,n=["defaultCollationDecl",i]):(Yl=n,n=et):(Yl=n,n=et):(Yl=n,n=et)):(Yl=n,n=et):(Yl=n,n=et)):(Yl=n,n=et):(Yl=n,n=et),Zl[t]={i:Yl,result:n},t=n),t===et&&((n=Zl[t=233*Yl+10])?(Yl=n.i,t=n.result):(n=Yl,e.substr(Yl,7)===ht?(i=ht,Yl+=7):(i=et,0===Wl&&u(Di)),i!==et?(i=je())!==et?(e.substr(Yl,8)===gt?(i=gt,Yl+=8):(i=et,0===Wl&&u(Hi)),i!==et?(i=je())!==et?(i=Ce())!==et?(Ql=n,n=["baseUriDecl",i]):(Yl=n,n=et):(Yl=n,n=et):(Yl=n,n=et)):(Yl=n,n=et):(Yl=n,n=et),Zl[t]={i:Yl,result:n},t=n),t===et&&((n=Zl[t=233*Yl+11])?(Yl=n.i,t=n.result):(n=Yl,e.substr(Yl,7)===ht?(i=ht,Yl+=7):(i=et,0===Wl&&u(Di)),i!==et?(i=je())!==et?(e.substr(Yl,12)===yt?(i=yt,Yl+=12):(i=et,0===Wl&&u(ji)),i!==et?(i=je())!==et?(e.substr(Yl,5)===dt?(i=dt,Yl+=5):(i=et,0===Wl&&u(Ui)),i===et&&(e.substr(Yl,8)===ft?(i=ft,Yl+=8):(i=et,0===Wl&&u(Gi))),i!==et?(Ql=n,n=["constructionDecl",i]):(Yl=n,n=et)):(Yl=n,n=et):(Yl=n,n=et)):(Yl=n,n=et):(Yl=n,n=et),Zl[t]={i:Yl,result:n},t=n),t===et&&((n=Zl[t=233*Yl+12])?(Yl=n.i,t=n.result):(n=Yl,e.substr(Yl,7)===ht?(i=ht,Yl+=7):(i=et,0===Wl&&u(Di)),i!==et?(i=je())!==et?(e.substr(Yl,8)===wt?(i=wt,Yl+=8):(i=et,0===Wl&&u(Xi)),i!==et?(i=je())!==et?(e.substr(Yl,7)===At?(i=At,Yl+=7):(i=et,0===Wl&&u(_i)),i===et&&(e.substr(Yl,9)===xt?(i=xt,Yl+=9):(i=et,0===Wl&&u(Li))),i!==et?(Ql=n,n=["orderingModeDecl",i]):(Yl=n,n=et)):(Yl=n,n=et):(Yl=n,n=et)):(Yl=n,n=et):(Yl=n,n=et),Zl[t]={i:Yl,result:n},t=n),t===et&&((n=Zl[t=233*Yl+13])?(Yl=n.i,t=n.result):(n=Yl,e.substr(Yl,7)===ht?(i=ht,Yl+=7):(i=et,0===Wl&&u(Di)),i!==et?(i=je())!==et?(e.substr(Yl,7)===mt?(i=mt,Yl+=7):(i=et,0===Wl&&u(Fi)),i!==et?(i=je())!==et?(e.substr(Yl,5)===bt?(i=bt,Yl+=5):(i=et,0===Wl&&u(ki)),i!==et?(i=je())!==et?(e.substr(Yl,5)===Et?(i=Et,Yl+=5):(i=et,0===Wl&&u(qi)),i!==et?(i=je())!==et?(e.substr(Yl,8)===Bt?(i=Bt,Yl+=8):(i=et,0===Wl&&u(Vi)),i===et&&(e.substr(Yl,5)===Nt?(i=Nt,Yl+=5):(i=et,0===Wl&&u(Yi))),i!==et?(Ql=n,n=["emptyOrderDecl",i]):(Yl=n,n=et)):(Yl=n,n=et):(Yl=n,n=et)):(Yl=n,n=et):(Yl=n,n=et)):(Yl=n,n=et):(Yl=n,n=et)):(Yl=n,n=et):(Yl=n,n=et),Zl[t]={i:Yl,result:n},t=n),t===et)))))){var o;if(n=Zl[t=233*Yl+14])Yl=n.i,t=n.result;else{var s;if(n=Yl,e.substr(Yl,7)===ht?(i=ht,Yl+=7):(i=et,0===Wl&&u(Di)),i!==et)if((i=je())!==et)if(e.substr(Yl,15)===Ct?(i=Ct,Yl+=15):(i=et,0===Wl&&u(Qi)),i!==et)if((i=je())!==et)if((o=Zl[i=233*Yl+15])?(Yl=o.i,i=o.result):(e.substr(Yl,8)===ft?(o=ft,Yl+=8):(o=et,0===Wl&&u(Gi)),o===et&&(e.substr(Yl,11)===It?(o=It,Yl+=11):(o=et,0===Wl&&u(Ki))),Zl[i]={i:Yl,result:o},i=o),i!==et)if(He(),44===e.charCodeAt(Yl)?(o=Tt,Yl++):(o=et,0===Wl&&u(Ji)),o!==et)He(),(s=Zl[o=233*Yl+16])?(Yl=s.i,o=s.result):(e.substr(Yl,7)===Ot?(s=Ot,Yl+=7):(s=et,0===Wl&&u(zi)),s===et&&(e.substr(Yl,10)===St?(s=St,Yl+=10):(s=et,0===Wl&&u(Wi))),Zl[o]={i:Yl,result:s},o=s),o!==et?(Ql=n,n=["copyNamespacesDecl",["preserveMode",i],["inheritMode",o]]):(Yl=n,n=et);else Yl=n,n=et;else Yl=n,n=et;else Yl=n,n=et;else Yl=n,n=et;else Yl=n,n=et;else Yl=n,n=et;Zl[t]={i:Yl,result:n},t=n}if(t===et)if(n=Zl[t=233*Yl+17])Yl=n.i,t=n.result;else{if(n=Yl,e.substr(Yl,7)===ht?(i=ht,Yl+=7):(i=et,0===Wl&&u(Di)),i!==et)if((i=je())!==et){if(i=Yl,e.substr(Yl,14)===Rt?(o=Rt,Yl+=14):(o=et,0===Wl&&u(Zi)),o!==et)if((s=je())!==et){var l=Be();l!==et?(Ql=i,i=["decimalFormatName"].concat(l)):(Yl=i,i=et)}else Yl=i,i=et;else Yl=i,i=et;if(i===et&&(i=Yl,e.substr(Yl,7)===mt?(o=mt,Yl+=7):(o=et,0===Wl&&u(Fi)),o!==et?(s=je())!==et?(e.substr(Yl,14)===Rt?(l=Rt,Yl+=14):(l=et,0===Wl&&u(Zi)),l!==et?(Ql=i,i=null):(Yl=i,i=et)):(Yl=i,i=et):(Yl=i,i=et)),i!==et){if(o=[],s=Yl,(l=je())!==et)if((l=f())!==et){var c=je();c!==et?(61===e.charCodeAt(Yl)?(c=lt,Yl++):(c=et,0===Wl&&u(Si)),c!==et?(c=je())!==et?(c=Ce())!==et?(Ql=s,s=r(0,l,c)):(Yl=s,s=et):(Yl=s,s=et):(Yl=s,s=et)):(Yl=s,s=et)}else Yl=s,s=et;else Yl=s,s=et;for(;s!==et;)o.push(s),s=Yl,(l=je())!==et?(l=f())!==et?(c=je())!==et?(61===e.charCodeAt(Yl)?(c=lt,Yl++):(c=et,0===Wl&&u(Si)),c!==et?(c=je())!==et?(c=Ce())!==et?(Ql=s,s=r(0,l,c)):(Yl=s,s=et):(Yl=s,s=et):(Yl=s,s=et)):(Yl=s,s=et):(Yl=s,s=et):(Yl=s,s=et);Ql=n,n=["decimalFormatDecl"].concat(i?[i]:[],o)}else Yl=n,n=et}else Yl=n,n=et;else Yl=n,n=et;Zl[t]={i:Yl,result:n},t=n}}return Zl[a]={i:Yl,result:t},t}function f(){var t,n=233*Yl+18;return(t=Zl[n])?(Yl=t.i,t.result):(e.substr(Yl,17)===Dt?(t=Dt,Yl+=17):(t=et,0===Wl&&u($i)),t===et&&(e.substr(Yl,18)===Mt?(t=Mt,Yl+=18):(t=et,0===Wl&&u(eo)),t===et&&(e.substr(Yl,8)===Gt?(t=Gt,Yl+=8):(t=et,0===Wl&&u(to)),t===et&&(e.substr(Yl,10)===Ut?(t=Ut,Yl+=10):(t=et,0===Wl&&u(no)),t===et&&(e.substr(Yl,3)===Ft?(t=Ft,Yl+=3):(t=et,0===Wl&&u(ro)),t===et&&(e.substr(Yl,7)===Pt?(t=Pt,Yl+=7):(t=et,0===Wl&&u(ao)),t===et&&(e.substr(Yl,9)===Ht?(t=Ht,Yl+=9):(t=et,0===Wl&&u(io)),t===et&&(e.substr(Yl,10)===jt?(t=jt,Yl+=10):(t=et,0===Wl&&u(oo)),t===et&&(e.substr(Yl,5)===Xt?(t=Xt,Yl+=5):(t=et,0===Wl&&u(so)),t===et&&(e.substr(Yl,17)===_t?(t=_t,Yl+=17):(t=et,0===Wl&&u(uo)),t===et&&(e.substr(Yl,18)===Lt?(t=Lt,Yl+=18):(t=et,0===Wl&&u(lo)))))))))))),Zl[n]={i:Yl,result:t},t)}function d(){var t,n,r,a=233*Yl+19;if(t=Zl[a])return Yl=t.i,t.result;if(n=Zl[t=233*Yl+20])Yl=n.i,t=n.result;else{if(n=Yl,e.substr(Yl,6)===kt){var i=kt;Yl+=6}else i=et,0===Wl&&u(co);if(i!==et)if((i=je())!==et)if(e.substr(Yl,6)===qt?(i=qt,Yl+=6):(i=et,0===Wl&&u(ho)),i!==et){i=Yl;var o=je();if(o!==et){if(r=Zl[o=233*Yl+21])Yl=r.i,o=r.result;else{if(r=Yl,e.substr(Yl,9)===ut){var s=ut;Yl+=9}else s=et,0===Wl&&u(Oi);if(s!==et){var l=je();if(l!==et){var c=Me();if(c!==et){if(He(),61===e.charCodeAt(Yl)){var h=lt;Yl++}else h=et,0===Wl&&u(Si);h!==et?(Ql=r,r=["namespacePrefix",c]):(Yl=r,r=et)}else Yl=r,r=et}else Yl=r,r=et}else Yl=r,r=et;if(r===et){if(s=r=Yl,e.substr(Yl,7)===mt?(l=mt,Yl+=7):(l=et,0===Wl&&u(Fi)),l!==et)if((c=je())!==et){if(e.substr(Yl,7)===Yt){var p=Yt;Yl+=7}else p=et,0===Wl&&u(fo);if(p!==et)if((h=je())!==et){if(e.substr(Yl,9)===ut){var f=ut;Yl+=9}else f=et,0===Wl&&u(Oi);if(f!==et){var d=Ye();d!==et?s=l=[l,c,p,h,f,d]:(Yl=s,s=et)}else Yl=s,s=et}else Yl=s,s=et;else Yl=s,s=et}else Yl=s,s=et;else Yl=s,s=et;s!==et&&(Ql=r,s=["defaultElementNamespace"]),r=s}Zl[o]={i:Yl,result:r},o=r}o!==et?(Ql=i,i=o):(Yl=i,i=et)}else Yl=i,i=et;if(i===et&&(i=null),He(),(o=Ce())!==et){if(r=Yl,(s=je())!==et)if(e.substr(Yl,2)===Vt?(s=Vt,Yl+=2):(s=et,0===Wl&&u(po)),s!==et)if((s=je())!==et)if((s=Ce())!==et){for(l=[],c=Yl,(p=je())!==et?(44===e.charCodeAt(Yl)?(p=Tt,Yl++):(p=et,0===Wl&&u(Ji)),p!==et?(p=je())!==et?(p=Ce())!==et?(Ql=c,c=p):(Yl=c,c=et):(Yl=c,c=et):(Yl=c,c=et)):(Yl=c,c=et);c!==et;)l.push(c),c=Yl,(p=je())!==et?(44===e.charCodeAt(Yl)?(p=Tt,Yl++):(p=et,0===Wl&&u(Ji)),p!==et?(p=je())!==et?(p=Ce())!==et?(Ql=c,c=p):(Yl=c,c=et):(Yl=c,c=et):(Yl=c,c=et)):(Yl=c,c=et);Ql=r,r=[s].concat(l)}else Yl=r,r=et;else Yl=r,r=et;else Yl=r,r=et;else Yl=r,r=et;r===et&&(r=null),Ql=n,n=["schemaImport"].concat(i?[i]:[],[["targetNamespace",o]],r?[r]:[])}else Yl=n,n=et}else Yl=n,n=et;else Yl=n,n=et;else Yl=n,n=et;Zl[t]={i:Yl,result:n},t=n}if(t===et)if(n=Zl[t=233*Yl+22])Yl=n.i,t=n.result;else{if(n=Yl,e.substr(Yl,6)===kt?(i=kt,Yl+=6):(i=et,0===Wl&&u(co)),i!==et)if((i=je())!==et)if(e.substr(Yl,6)===st?(i=st,Yl+=6):(i=et,0===Wl&&u(Ii)),i!==et)if(i=Yl,(o=je())!==et?(e.substr(Yl,9)===ut?(o=ut,Yl+=9):(o=et,0===Wl&&u(Oi)),o!==et?(r=je())!==et?(s=Yl,(s=(l=Me())!==et?e.substring(s,Yl):l)!==et?(He(),61===e.charCodeAt(Yl)?(l=lt,Yl++):(l=et,0===Wl&&u(Si)),l!==et?(Ql=i,i=s):(Yl=i,i=et)):(Yl=i,i=et)):(Yl=i,i=et):(Yl=i,i=et)):(Yl=i,i=et),i===et&&(i=null),He(),(o=Ce())!==et){if(r=Yl,(s=je())!==et)if(e.substr(Yl,2)===Vt?(l=Vt,Yl+=2):(l=et,0===Wl&&u(po)),l!==et)if((l=je())!==et)if((s=Ce())!==et)for(r=[],s=Yl,l=He(),44===e.charCodeAt(Yl)?(c=Tt,Yl++):(c=et,0===Wl&&u(Ji)),c!==et?(p=He(),(h=Ce())!==et?s=l=[l,c,p,h]:(Yl=s,s=et)):(Yl=s,s=et);s!==et;)r.push(s),s=Yl,l=He(),44===e.charCodeAt(Yl)?(c=Tt,Yl++):(c=et,0===Wl&&u(Ji)),c!==et?(p=He(),(h=Ce())!==et?s=l=[l,c,p,h]:(Yl=s,s=et)):(Yl=s,s=et);else Yl=r;else Yl=r;else Yl=r;else Yl=r;Ql=n,n=["moduleImport",["namespacePrefix",i],["targetNamespace",o]]}else Yl=n,n=et;else Yl=n,n=et;else Yl=n,n=et;else Yl=n,n=et;Zl[t]={i:Yl,result:n},t=n}return Zl[a]={i:Yl,result:t},t}function m(){var t,n=233*Yl+23;if(t=Zl[n])return Yl=t.i,t.result;if(t=Yl,e.substr(Yl,7)===ht){var r=ht;Yl+=7}else r=et,0===Wl&&u(Di);if(r!==et)if((r=je())!==et)if(e.substr(Yl,9)===ut?(r=ut,Yl+=9):(r=et,0===Wl&&u(Oi)),r!==et)if((r=je())!==et)if((r=Me())!==et){if(He(),61===e.charCodeAt(Yl)){var a=lt;Yl++}else a=et,0===Wl&&u(Si);a!==et?(He(),(a=Ce())!==et?(Ql=t,t=["namespaceDecl",["prefix",r],["uri",a]]):(Yl=t,t=et)):(Yl=t,t=et)}else Yl=t,t=et;else Yl=t,t=et;else Yl=t,t=et;else Yl=t,t=et;else Yl=t,t=et;return Zl[n]={i:Yl,result:t},t}function v(){var t,n=233*Yl+24;if(t=Zl[n])return Yl=t.i,t.result;if(t=Yl,e.substr(Yl,7)===ht){var r=ht;Yl+=7}else r=et,0===Wl&&u(Di);if(r!==et)if((r=je())!==et)if(e.substr(Yl,7)===mt?(r=mt,Yl+=7):(r=et,0===Wl&&u(Fi)),r!==et)if((r=je())!==et)if(e.substr(Yl,7)===Yt?(r=Yt,Yl+=7):(r=et,0===Wl&&u(fo)),r===et&&(e.substr(Yl,8)===Qt?(r=Qt,Yl+=8):(r=et,0===Wl&&u(mo))),r!==et){var a=je();a!==et?(e.substr(Yl,9)===ut?(a=ut,Yl+=9):(a=et,0===Wl&&u(Oi)),a!==et?(a=je())!==et?(a=Ce())!==et?(Ql=t,t=["defaultNamespaceDecl",["defaultNamespaceCategory",r],["uri",a]]):(Yl=t,t=et):(Yl=t,t=et):(Yl=t,t=et)):(Yl=t,t=et)}else Yl=t,t=et;else Yl=t,t=et;else Yl=t,t=et;else Yl=t,t=et;else Yl=t,t=et;return Zl[n]={i:Yl,result:t},t}function g(){var t,n=233*Yl+25;if(t=Zl[n])return Yl=t.i,t.result;if(t=Yl,e.substr(Yl,7)===ht){var r=ht;Yl+=7}else r=et,0===Wl&&u(Di);if(r!==et)if((r=je())!==et){r=[];var a=Yl,i=w();if(i===et&&(i=y()),i!==et){var o=je();o!==et?(Ql=a,a=i):(Yl=a,a=et)}else Yl=a,a=et;for(;a!==et;)r.push(a),a=Yl,(i=w())===et&&(i=y()),i!==et?(o=je())!==et?(Ql=a,a=i):(Yl=a,a=et):(Yl=a,a=et);if(i=Zl[a=233*Yl+28])Yl=i.i,a=i.result;else{if(i=Yl,e.substr(Yl,8)===Zt?(o=Zt,Yl+=8):(o=et,0===Wl&&u(Ao)),o!==et)if((o=je())!==et)if(36===e.charCodeAt(Yl)?(o=$t,Yl++):(o=et,0===Wl&&u(xo)),o!==et)if(He(),(o=Be())!==et){var s=Yl;He();var l=me();l!==et?(Ql=s,s=l):(Yl=s,s=et),s===et&&(s=null);var c=Yl;if(He(),e.substr(Yl,2)===en?(l=en,Yl+=2):(l=et,0===Wl&&u(bo)),l!==et?(He(),(l=T())!==et?(Ql=c,c=["varValue",l]):(Yl=c,c=et)):(Yl=c,c=et),c===et)if(c=Yl,(l=je())!==et)if(e.substr(Yl,8)===tn?(l=tn,Yl+=8):(l=et,0===Wl&&u(Eo)),l!==et){if(l=Yl,He(),e.substr(Yl,2)===en){var h=en;Yl+=2}else h=et,0===Wl&&u(bo);h!==et?(He(),(h=T())!==et?(Ql=l,l=["varValue",h]):(Yl=l,l=et)):(Yl=l,l=et),l===et&&(l=null),Ql=c,c=["external"].concat(l?[l]:[])}else Yl=c,c=et;else Yl=c,c=et;c!==et?(Ql=i,i=["varDecl",["varName"].concat(o)].concat(s?[s]:[],[c])):(Yl=i,i=et)}else Yl=i,i=et;else Yl=i,i=et;else Yl=i,i=et;else Yl=i,i=et;Zl[a]={i:Yl,result:i},a=i}a===et&&((i=Zl[a=233*Yl+30])?(Yl=i.i,a=i.result):(i=Yl,e.substr(Yl,8)===Qt?(o=Qt,Yl+=8):(o=et,0===Wl&&u(mo)),o!==et?(o=je())!==et?(s=Yl,Wl++,o=Ve(),Wl--,o===et?s=void 0:(Yl=s,s=et),s!==et?(o=Be())!==et?(He(),40===e.charCodeAt(Yl)?(s=zt,Yl++):(s=et,0===Wl&&u(yo)),s!==et?(He(),(s=x())===et&&(s=null),He(),41===e.charCodeAt(Yl)?(c=Wt,Yl++):(c=et,0===Wl&&u(wo)),c!==et?(c=Yl,(l=je())!==et?(e.substr(Yl,2)===an?(l=an,Yl+=2):(l=et,0===Wl&&u(Co)),l!==et?(h=je())!==et?(l=ve())!==et?(Ql=c,c=l):(Yl=c,c=et):(Yl=c,c=et):(Yl=c,c=et)):(Yl=c,c=et),c===et&&(c=null),He(),l=Yl,(h=E())!==et&&(Ql=l,h=["functionBody",h]),(l=h)===et&&(l=Yl,e.substr(Yl,8)===tn?(h=tn,Yl+=8):(h=et,0===Wl&&u(Eo)),h!==et&&(Ql=l,h=["externalDefinition"]),l=h),l!==et?(Ql=i,i=["functionDecl",["functionName"].concat(o),["paramList"].concat(s||[])].concat(c?[["typeDeclaration"].concat(c)]:[],[l])):(Yl=i,i=et)):(Yl=i,i=et)):(Yl=i,i=et)):(Yl=i,i=et):(Yl=i,i=et)):(Yl=i,i=et):(Yl=i,i=et),Zl[a]={i:Yl,result:i},a=i)),a!==et?(Ql=t,t=[a[0]].concat(r,a.slice(1))):(Yl=t,t=et)}else Yl=t,t=et;else Yl=t,t=et;return Zl[n]={i:Yl,result:t},t}function y(){var t,n=233*Yl+26;if(t=Zl[n])return Yl=t.i,t.result;if(t=Yl,e.substr(Yl,8)===Jt){var r=Jt;Yl+=8}else r=et,0===Wl&&u(vo);return r!==et&&(Ql=t,r=["annotation",["annotationName","updating"]]),t=r,Zl[n]={i:Yl,result:t},t}function w(){var t,n=233*Yl+27;if(t=Zl[n])return Yl=t.i,t.result;if(t=Yl,37===e.charCodeAt(Yl)){var r=Kt;Yl++}else r=et,0===Wl&&u(go);if(r!==et)if(He(),(r=Be())!==et){var a=Yl;if(He(),40===e.charCodeAt(Yl)){var i=zt;Yl++}else i=et,0===Wl&&u(yo);if(i!==et)if(He(),(i=re())!==et){var o=[],s=Yl;if(He(),44===e.charCodeAt(Yl)){var l=Tt;Yl++}else l=et,0===Wl&&u(Ji);for(l!==et?(He(),(l=re())!==et?(Ql=s,s=l):(Yl=s,s=et)):(Yl=s,s=et);s!==et;)o.push(s),s=Yl,He(),44===e.charCodeAt(Yl)?(l=Tt,Yl++):(l=et,0===Wl&&u(Ji)),l!==et?(He(),(l=re())!==et?(Ql=s,s=l):(Yl=s,s=et)):(Yl=s,s=et);He(),41===e.charCodeAt(Yl)?(s=Wt,Yl++):(s=et,0===Wl&&u(wo)),s!==et?(Ql=a,a=i.concat(o)):(Yl=a,a=et)}else Yl=a,a=et;else Yl=a,a=et;a===et&&(a=null),Ql=t,t=["annotation",["annotationName"].concat(r)].concat(a?["arguments",a]:[])}else Yl=t,t=et;else Yl=t,t=et;return Zl[n]={i:Yl,result:t},t}function A(){var t,n=233*Yl+29;if(t=Zl[n])return Yl=t.i,t.result;if(t=Yl,e.substr(Yl,7)===ht){var r=ht;Yl+=7}else r=et,0===Wl&&u(Di);if(r!==et)if((r=je())!==et)if(e.substr(Yl,7)===nn?(r=nn,Yl+=7):(r=et,0===Wl&&u(Bo)),r!==et)if((r=je())!==et)if(e.substr(Yl,4)===rn?(r=rn,Yl+=4):(r=et,0===Wl&&u(No)),r!==et){var a=Yl,i=je();if(i!==et)if(e.substr(Yl,2)===an?(r=an,Yl+=2):(r=et,0===Wl&&u(Co)),r!==et){var o=ge();o!==et||(Yl=a)}else Yl=a;else Yl=a;if(i=Yl,r=He(),e.substr(Yl,2)===en?(o=en,Yl+=2):(o=et,0===Wl&&u(bo)),o!==et){a=He();var s=T();s!==et?i=r=[r,o,a,s]:(Yl=i,i=et)}else Yl=i,i=et;if(i===et)if(i=Yl,(r=je())!==et)if(e.substr(Yl,8)===tn?(o=tn,Yl+=8):(o=et,0===Wl&&u(Eo)),o!==et){if(a=Yl,s=He(),e.substr(Yl,2)===en?(i=en,Yl+=2):(i=et,0===Wl&&u(bo)),i!==et){var l=He(),c=T();c!==et?a=s=[s,i,l,c]:(Yl=a,a=et)}else Yl=a,a=et;a===et&&(a=null),i=r=[r,o,a]}else Yl=i,i=et;else Yl=i,i=et;i!==et?(Ql=t,t={type:"contextItemDecl"}):(Yl=t,t=et)}else Yl=t,t=et;else Yl=t,t=et;else Yl=t,t=et;else Yl=t,t=et;else Yl=t,t=et;return Zl[n]={i:Yl,result:t},t}function x(){var t,n=233*Yl+31;if(t=Zl[n])return Yl=t.i,t.result;t=Yl;var r=b();if(r!==et){var a=[],i=Yl;if(He(),44===e.charCodeAt(Yl)){var o=Tt;Yl++}else o=et,0===Wl&&u(Ji);for(o!==et?(He(),(o=b())!==et?(Ql=i,i=o):(Yl=i,i=et)):(Yl=i,i=et);i!==et;)a.push(i),i=Yl,He(),44===e.charCodeAt(Yl)?(o=Tt,Yl++):(o=et,0===Wl&&u(Ji)),o!==et?(He(),(o=b())!==et?(Ql=i,i=o):(Yl=i,i=et)):(Yl=i,i=et);Ql=t,t=[r].concat(a)}else Yl=t,t=et;return Zl[n]={i:Yl,result:t},t}function b(){var t,n=233*Yl+32;if(t=Zl[n])return Yl=t.i,t.result;if(t=Yl,36===e.charCodeAt(Yl)){var r=$t;Yl++}else r=et,0===Wl&&u(xo);if(r!==et)if((r=Be())!==et){var a=Yl,i=je();i!==et?(i=me())!==et?(Ql=a,a=i):(Yl=a,a=et):(Yl=a,a=et),a===et&&(a=null),Ql=t,t=["param",["varName"].concat(r)].concat(a?[a]:[])}else Yl=t,t=et;else Yl=t,t=et;return Zl[n]={i:Yl,result:t},t}function E(){var e,t=233*Yl+33;if(e=Zl[t])return Yl=e.i,e.result;e=Yl;var n=B();return n!==et&&(Ql=e,n=n||["sequenceExpr"]),e=n,Zl[t]={i:Yl,result:e},e}function B(){var t,n=233*Yl+34;if(t=Zl[n])return Yl=t.i,t.result;if(t=Yl,123===e.charCodeAt(Yl)){var r=on;Yl++}else r=et,0===Wl&&u(To);if(r!==et){if(He(),(r=C())===et&&(r=null),He(),125===e.charCodeAt(Yl)){var a=sn;Yl++}else a=et,0===Wl&&u(Io);a!==et?(Ql=t,t=r||null):(Yl=t,t=et)}else Yl=t,t=et;return Zl[n]={i:Yl,result:t},t}function N(){var t,n=233*Yl+35;if(t=Zl[n])return Yl=t.i,t.result;if(t=Yl,e.substr(Yl,7)===ht){var r=ht;Yl+=7}else r=et,0===Wl&&u(Di);return r!==et?(r=je())!==et?(e.substr(Yl,6)===un?(r=un,Yl+=6):(r=et,0===Wl&&u(Oo)),r!==et?(r=je())!==et?(r=Be())!==et?(r=je())!==et?(r=Ce())!==et?(Ql=t,t={type:"optionDecl"}):(Yl=t,t=et):(Yl=t,t=et):(Yl=t,t=et):(Yl=t,t=et):(Yl=t,t=et)):(Yl=t,t=et):(Yl=t,t=et),Zl[n]={i:Yl,result:t},t}function C(){var t,n=233*Yl+37;if(t=Zl[n])return Yl=t.i,t.result;t=Yl;var r=T();if(r!==et){var a=[],i=Yl;if(He(),44===e.charCodeAt(Yl)){var o=Tt;Yl++}else o=et,0===Wl&&u(Ji);for(o!==et?(He(),(o=T())!==et?(Ql=i,i=o):(Yl=i,i=et)):(Yl=i,i=et);i!==et;)a.push(i),i=Yl,He(),44===e.charCodeAt(Yl)?(o=Tt,Yl++):(o=et,0===Wl&&u(Ji)),o!==et?(He(),(o=T())!==et?(Ql=i,i=o):(Yl=i,i=et)):(Yl=i,i=et);Ql=t,t=0===a.length?r:["sequenceExpr",r].concat(a)}else Yl=t,t=et;return Zl[n]={i:Yl,result:t},t}function T(){var t=233*Yl+38,n=Zl[t];if(n)return Yl=n.i,n.result;var r=Yl,a=233*Yl+39,i=Zl[a];if(i){Yl=i.i;var o=i.result}else{var s=Yl,l=I();if(l!==et){var c=[],h=Yl,p=He(),f=O();for(f!==et?(Ql=h,h=f):(Yl=h,h=et);h!==et;)c.push(h),h=Yl,p=He(),(f=O())!==et?(Ql=h,h=f):(Yl=h,h=et);h=He();var d=233*Yl+58,m=Zl[d];if(m)Yl=m.i,p=m.result;else{var v=Yl;if(e.substr(Yl,6)===wn){var g=wn;Yl+=6}else g=et,0===Wl&&u(Xo);if(g!==et){He();var y=T();y!==et?(Ql=v,v=["returnClause",y]):(Yl=v,v=et)}else Yl=v,v=et;Zl[d]={i:Yl,result:v},p=v}p!==et?(Ql=s,s=["flworExpr",l].concat(c,[p])):(Yl=s,s=et)}else Yl=s,s=et;Zl[a]={i:Yl,result:s},o=s}if(o!==et&&(Ql=r,o=$e(o)),(r=o)===et){r=Yl;var w=233*Yl+59,A=Zl[w];if(A)Yl=A.i,o=A.result;else{var x=Yl;if(e.substr(Yl,4)===An){var b=An;Yl+=4}else b=et,0===Wl&&u(_o);if(b===et&&(e.substr(Yl,5)===xn?(b=xn,Yl+=5):(b=et,0===Wl&&u(Lo))),b!==et)if(je()!==et){var E=233*Yl+60,B=Zl[E];if(B){Yl=B.i;var N=B.result}else{var S=Yl,R=G();if(R!==et){var D=[],M=Yl;if(He(),44===e.charCodeAt(Yl)){var P=Tt;Yl++}else P=et,0===Wl&&u(Ji);if(P!==et){He();var H=G();H!==et?(Ql=M,M=H):(Yl=M,M=et)}else Yl=M,M=et;for(;M!==et;)D.push(M),M=Yl,He(),44===e.charCodeAt(Yl)?(P=Tt,Yl++):(P=et,0===Wl&&u(Ji)),P!==et?(He(),(H=G())!==et?(Ql=M,M=H):(Yl=M,M=et)):(Yl=M,M=et);Ql=S,S=[R].concat(D)}else Yl=S,S=et;Zl[E]={i:Yl,result:S},N=S}if(N!==et)if(je()!==et){if(e.substr(Yl,9)===bn){var j=bn;Yl+=9}else j=et,0===Wl&&u(ko);if(j!==et)if(je()!==et){var X=T();X!==et?(Ql=x,x=["quantifiedExpr",["quantifier",b]].concat(N,[["predicateExpr",X]])):(Yl=x,x=et)}else Yl=x,x=et;else Yl=x,x=et}else Yl=x,x=et;else Yl=x,x=et}else Yl=x,x=et;else Yl=x,x=et;Zl[w]={i:Yl,result:x},o=x}if(o!==et&&(Ql=r,o=$e(o)),(r=o)===et){r=Yl;var _=233*Yl+62,L=Zl[_];if(L)Yl=L.i,o=L.result;else{var k=Yl;if(e.substr(Yl,10)===En){var q=En;Yl+=10}else q=et,0===Wl&&u(qo);if(q!==et){if(He(),40===e.charCodeAt(Yl)){var V=zt;Yl++}else V=et,0===Wl&&u(yo);if(V!==et){var Y=C();if(Y!==et){if(41===e.charCodeAt(Yl)){var Q=Wt;Yl++}else Q=et,0===Wl&&u(wo);if(Q!==et){He();var J=[],K=Yl,z=U();if(z!==et){var W=He();Ql=K,K=z}else Yl=K,K=et;if(K!==et)for(;K!==et;)J.push(K),K=Yl,(z=U())!==et?(W=He(),Ql=K,K=z):(Yl=K,K=et);else J=et;if(J!==et)if(e.substr(Yl,7)===mt?(K=mt,Yl+=7):(K=et,0===Wl&&u(Fi)),K!==et)if((z=je())!==et){if(W=Yl,36===e.charCodeAt(Yl)){var Z=$t;Yl++}else Z=et,0===Wl&&u(xo);if(Z!==et){var $=Be();if($!==et){var ee=je();ee!==et?(Ql=W,W=$):(Yl=W,W=et)}else Yl=W,W=et}else Yl=W,W=et;W===et&&(W=null),e.substr(Yl,6)===wn?(Z=wn,Yl+=6):(Z=et,0===Wl&&u(Xo)),Z!==et?($=je())!==et?(ee=T())!==et?(Ql=k,k=["typeswitchExpr",["argExpr",Y]].concat(J,[["typeswitchExprDefaultClause"].concat(W||[],[["resultExpr",ee]])])):(Yl=k,k=et):(Yl=k,k=et):(Yl=k,k=et)}else Yl=k,k=et;else Yl=k,k=et;else Yl=k,k=et}else Yl=k,k=et}else Yl=k,k=et}else Yl=k,k=et}else Yl=k,k=et;Zl[_]={i:Yl,result:k},o=k}if(o!==et&&(Ql=r,o=$e(o)),(r=o)===et){r=Yl;var te=233*Yl+65,ne=Zl[te];if(ne)Yl=ne.i,o=ne.result;else{var re=Yl;if(e.substr(Yl,2)===Cn){var ae=Cn;Yl+=2}else ae=et,0===Wl&&u(Qo);if(ae!==et){if(He(),40===e.charCodeAt(Yl)){var ie=zt;Yl++}else ie=et,0===Wl&&u(yo);if(ie!==et){He();var oe=C();if(oe!==et){if(He(),41===e.charCodeAt(Yl)){var se=Wt;Yl++}else se=et,0===Wl&&u(wo);if(se!==et){if(He(),e.substr(Yl,4)===Tn){var ue=Tn;Yl+=4}else ue=et,0===Wl&&u(Jo);if(ue!==et)if(Ye()!==et){He();var le=T();if(le!==et){if(He(),e.substr(Yl,4)===In){var ce=In;Yl+=4}else ce=et,0===Wl&&u(Ko);if(ce!==et)if(Ye()!==et){He();var he=T();he!==et?(Ql=re,re=["ifThenElseExpr",["ifClause",oe],["thenClause",le],["elseClause",he]]):(Yl=re,re=et)}else Yl=re,re=et;else Yl=re,re=et}else Yl=re,re=et}else Yl=re,re=et;else Yl=re,re=et}else Yl=re,re=et}else Yl=re,re=et}else Yl=re,re=et}else Yl=re,re=et;Zl[te]={i:Yl,result:re},o=re}if(o!==et&&(Ql=r,o=$e(o)),(r=o)===et){r=Yl;var pe=233*Yl+214,fe=Zl[pe];if(fe)Yl=fe.i,o=fe.result;else{var de=Yl;if(e.substr(Yl,6)===ja){var me=ja;Yl+=6}else me=et,0===Wl&&u(Bl);if(me!==et)if(je()!==et){if(e.substr(Yl,5)===Xa){var ve=Xa;Yl+=5}else ve=et,0===Wl&&u(Nl);if(ve===et&&(e.substr(Yl,4)===_a?(ve=_a,Yl+=4):(ve=et,0===Wl&&u(Cl))),ve!==et)if(je()!==et){var ge=T();if(ge!==et)if(je()!==et){var ye,we=233*Yl+213,Ae=Zl[we];if(Ae){Yl=Ae.i;var xe=Ae.result}else{var be=ye=Yl;if(e.substr(Yl,2)===an){var Ee=an;Yl+=2}else Ee=et,0===Wl&&u(Co);if(Ee!==et)if(je()!==et){var Ne=Yl;if(e.substr(Yl,5)===Ga){var Ce=Ga;Yl+=5}else Ce=et,0===Wl&&u(wl);Ce!==et&&(Ql=Ne,Ce=["insertAsFirst"]),(Ne=Ce)===et&&(Ne=Yl,e.substr(Yl,4)===Ua?(Ce=Ua,Yl+=4):(Ce=et,0===Wl&&u(Al)),Ce!==et&&(Ql=Ne,Ce=["insertAsLast"]),Ne=Ce),Ne!==et?(Ce=je())!==et?(Ql=be,be=Ne):(Yl=be,be=et):(Yl=be,be=et)}else Yl=be,be=et;else Yl=be,be=et;be===et&&(be=null),e.substr(Yl,4)===Fa?(Ee=Fa,Yl+=4):(Ee=et,0===Wl&&u(xl)),Ee!==et?(Ql=ye,ye=be?["insertInto",be]:["insertInto"]):(Yl=ye,ye=et),ye===et&&(ye=Yl,e.substr(Yl,5)===Pa?(be=Pa,Yl+=5):(be=et,0===Wl&&u(bl)),be!==et&&(Ql=ye,be=["insertAfter"]),(ye=be)===et&&(ye=Yl,e.substr(Yl,6)===Ha?(be=Ha,Yl+=6):(be=et,0===Wl&&u(El)),be!==et&&(Ql=ye,be=["insertBefore"]),ye=be)),Zl[we]={i:Yl,result:ye},xe=ye}if(xe!==et)if(je()!==et){var Te=T();Te!==et?(Ql=de,de=["insertExpr",["sourceExpr",ge],xe,["targetExpr",Te]]):(Yl=de,de=et)}else Yl=de,de=et;else Yl=de,de=et}else Yl=de,de=et;else Yl=de,de=et}else Yl=de,de=et;else Yl=de,de=et}else Yl=de,de=et;else Yl=de,de=et;Zl[pe]={i:Yl,result:de},o=de}if(o!==et&&(Ql=r,o=$e(o)),(r=o)===et){r=Yl;var Ie=233*Yl+215,Oe=Zl[Ie];if(Oe)Yl=Oe.i,o=Oe.result;else{var Se=Yl;if(e.substr(Yl,6)===La){var Re=La;Yl+=6}else Re=et,0===Wl&&u(Tl);if(Re!==et)if(je()!==et){if(e.substr(Yl,5)===Xa){var De=Xa;Yl+=5}else De=et,0===Wl&&u(Nl);if(De===et&&(e.substr(Yl,4)===_a?(De=_a,Yl+=4):(De=et,0===Wl&&u(Cl))),De!==et)if(je()!==et){var Me=T();Me!==et?(Ql=Se,Se=["deleteExpr",["targetExpr",Me]]):(Yl=Se,Se=et)}else Yl=Se,Se=et;else Yl=Se,Se=et}else Yl=Se,Se=et;else Yl=Se,Se=et;Zl[Ie]={i:Yl,result:Se},o=Se}if(o!==et&&(Ql=r,o=$e(o)),(r=o)===et){r=Yl;var Ge=233*Yl+217,Ue=Zl[Ge];if(Ue)Yl=Ue.i,o=Ue.result;else{var Fe=Yl;if(e.substr(Yl,6)===Ya){var Xe=Ya;Yl+=6}else Xe=et,0===Wl&&u(Rl);if(Xe!==et)if(je()!==et){if(e.substr(Yl,4)===_a){var _e=_a;Yl+=4}else _e=et,0===Wl&&u(Cl);if(_e!==et){He();var Le=T();if(Le!==et)if(je()!==et){if(e.substr(Yl,2)===an){var ke=an;Yl+=2}else ke=et,0===Wl&&u(Co);if(ke!==et)if(je()!==et){var qe=T();qe!==et?(Ql=Fe,Fe=["renameExpr",["targetExpr",Le],["newNameExpr",qe]]):(Yl=Fe,Fe=et)}else Yl=Fe,Fe=et;else Yl=Fe,Fe=et}else Yl=Fe,Fe=et;else Yl=Fe,Fe=et}else Yl=Fe,Fe=et}else Yl=Fe,Fe=et;else Yl=Fe,Fe=et;Zl[Ge]={i:Yl,result:Fe},o=Fe}if(o!==et&&(Ql=r,o=$e(o)),(r=o)===et){r=Yl;var Ve=233*Yl+216,Je=Zl[Ve];if(Je)Yl=Je.i,o=Je.result;else{var Ke=Yl;if(e.substr(Yl,7)===ka){var ze=ka;Yl+=7}else ze=et,0===Wl&&u(Il);if(ze!==et)if(je()!==et){var We=Yl;if(e.substr(Yl,5)===qa){var Ze=qa;Yl+=5}else Ze=et,0===Wl&&u(Ol);if(Ze!==et){var tt=je();if(tt!==et){if(e.substr(Yl,2)===kn){var nt=kn;Yl+=2}else nt=et,0===Wl&&u(cs);if(nt!==et){var rt=je();rt!==et?We=Ze=[Ze,tt,nt,rt]:(Yl=We,We=et)}else Yl=We,We=et}else Yl=We,We=et}else Yl=We,We=et;if(We===et&&(We=null),e.substr(Yl,4)===_a?(Ze=_a,Yl+=4):(Ze=et,0===Wl&&u(Cl)),Ze!==et)if((tt=je())!==et)if((nt=T())!==et)if((rt=je())!==et){if(e.substr(Yl,4)===Va){var at=Va;Yl+=4}else at=et,0===Wl&&u(Sl);if(at!==et)if(je()!==et){var it=T();it!==et?(Ql=Ke,Ke=We?["replaceExpr",["replaceValue"],["targetExpr",nt],["replacementExpr",it]]:["replaceExpr",["targetExpr",nt],["replacementExpr",it]]):(Yl=Ke,Ke=et)}else Yl=Ke,Ke=et;else Yl=Ke,Ke=et}else Yl=Ke,Ke=et;else Yl=Ke,Ke=et;else Yl=Ke,Ke=et;else Yl=Ke,Ke=et}else Yl=Ke,Ke=et;else Yl=Ke,Ke=et;Zl[Ve]={i:Yl,result:Ke},o=Ke}if(o!==et&&(Ql=r,o=$e(o)),(r=o)===et){r=Yl;var ot=233*Yl+218,st=Zl[ot];if(st)Yl=st.i,o=st.result;else{var ut=Yl;if(e.substr(Yl,4)===Qa){var lt=Qa;Yl+=4}else lt=et,0===Wl&&u(Dl);if(lt!==et)if(je()!==et){var ct=Pe();if(ct!==et){var ht=[],pt=Yl,ft=He();if(44===e.charCodeAt(Yl)){var dt=Tt;Yl++}else dt=et,0===Wl&&u(Ji);if(dt!==et){var vt=He(),gt=Pe();gt!==et?(Ql=pt,pt=gt):(Yl=pt,pt=et)}else Yl=pt,pt=et;for(;pt!==et;)ht.push(pt),pt=Yl,ft=He(),44===e.charCodeAt(Yl)?(dt=Tt,Yl++):(dt=et,0===Wl&&u(Ji)),dt!==et?(vt=He(),(gt=Pe())!==et?(Ql=pt,pt=gt):(Yl=pt,pt=et)):(Yl=pt,pt=et);if(pt=He(),e.substr(Yl,6)===Ja?(ft=Ja,Yl+=6):(ft=et,0===Wl&&u(Ml)),ft!==et)if((dt=je())!==et)if((vt=T())!==et)if((gt=je())!==et){if(e.substr(Yl,6)===wn){var yt=wn;Yl+=6}else yt=et,0===Wl&&u(Xo);if(yt!==et)if(je()!==et){var wt=T();wt!==et?(Ql=ut,ut=["transformExpr",["transformCopies",ct].concat(ht),["modifyExpr",vt],["returnExpr",wt]]):(Yl=ut,ut=et)}else Yl=ut,ut=et;else Yl=ut,ut=et}else Yl=ut,ut=et;else Yl=ut,ut=et;else Yl=ut,ut=et;else Yl=ut,ut=et}else Yl=ut,ut=et}else Yl=ut,ut=et;else Yl=ut,ut=et;Zl[ot]={i:Yl,result:ut},o=ut}if(o!==et&&(Ql=r,o=$e(o)),(r=o)===et){r=Yl;var At=233*Yl+66,xt=Zl[At];if(xt)Yl=xt.i,o=xt.result;else{var bt=Yl,Et=F();if(Et!==et){var Bt=[],Nt=Yl;if(He(),e.substr(Yl,2)===On){var Ct=On;Yl+=2}else Ct=et,0===Wl&&u(zo);if(Ct!==et){var It=Ye();if(It!==et){He();var Ot=F();Ot!==et?(Ql=Nt,Nt=Ot):(Yl=Nt,Nt=et)}else Yl=Nt,Nt=et}else Yl=Nt,Nt=et;for(;Nt!==et;)Bt.push(Nt),Nt=Yl,He(),e.substr(Yl,2)===On?(Ct=On,Yl+=2):(Ct=et,0===Wl&&u(zo)),Ct!==et?(It=Ye())!==et?(He(),(Ot=F())!==et?(Ql=Nt,Nt=Ot):(Yl=Nt,Nt=et)):(Yl=Nt,Nt=et):(Yl=Nt,Nt=et);Ql=bt,bt=Qe("orOp",Et,Bt)}else Yl=bt,bt=et;Zl[At]={i:Yl,result:bt},o=bt}o!==et&&(Ql=r,o=$e(o)),r=o}}}}}}}}}return Zl[t]={i:Yl,result:r},r}function I(){var t,n,r=233*Yl+40;if(t=Zl[r])return Yl=t.i,t.result;if(n=Zl[t=233*Yl+42])Yl=n.i,t=n.result;else{if(n=Yl,e.substr(Yl,3)===ln){var a=ln;Yl+=3}else a=et,0===Wl&&u(So);if(a!==et)if((a=je())!==et)if((a=S())!==et){var i=[],o=Yl;if(He(),44===e.charCodeAt(Yl)){var s=Tt;Yl++}else s=et,0===Wl&&u(Ji);for(s!==et?(He(),(s=S())!==et?(Ql=o,o=s):(Yl=o,o=et)):(Yl=o,o=et);o!==et;)i.push(o),o=Yl,He(),44===e.charCodeAt(Yl)?(s=Tt,Yl++):(s=et,0===Wl&&u(Ji)),s!==et?(He(),(s=S())!==et?(Ql=o,o=s):(Yl=o,o=et)):(Yl=o,o=et);Ql=n,n=["forClause",a].concat(i)}else Yl=n,n=et;else Yl=n,n=et;else Yl=n,n=et;Zl[t]={i:Yl,result:n},t=n}if(t===et)if(n=Zl[t=233*Yl+46])Yl=n.i,t=n.result;else{if(n=Yl,e.substr(Yl,3)===pn?(a=pn,Yl+=3):(a=et,0===Wl&&u(Mo)),a!==et)if(He(),(a=R())!==et){for(He(),i=[],o=Yl,44===e.charCodeAt(Yl)?(s=Tt,Yl++):(s=et,0===Wl&&u(Ji)),s!==et?(He(),(s=R())!==et?(Ql=o,o=s):(Yl=o,o=et)):(Yl=o,o=et);o!==et;)i.push(o),o=Yl,44===e.charCodeAt(Yl)?(s=Tt,Yl++):(s=et,0===Wl&&u(Ji)),s!==et?(He(),(s=R())!==et?(Ql=o,o=s):(Yl=o,o=et)):(Yl=o,o=et);Ql=n,n=["letClause",a].concat(i)}else Yl=n,n=et;else Yl=n,n=et;Zl[t]={i:Yl,result:n},t=n}return Zl[r]={i:Yl,result:t},t}function O(){var t,n=233*Yl+41;if(t=Zl[n])return Yl=t.i,t.result;if((t=I())===et){var r;if(r=Zl[t=233*Yl+48])Yl=r.i,t=r.result;else{if(r=Yl,e.substr(Yl,5)===fn){var a=fn;Yl+=5}else a=et,0===Wl&&u(Go);a!==et?(a=Ye())!==et?(He(),(a=T())!==et?(Ql=r,r=["whereClause",a]):(Yl=r,r=et)):(Yl=r,r=et):(Yl=r,r=et),Zl[t]={i:Yl,result:r},t=r}if(t===et){if(r=Zl[t=233*Yl+49])Yl=r.i,t=r.result;else{if(r=Yl,e.substr(Yl,5)===dn?(a=dn,Yl+=5):(a=et,0===Wl&&u(Uo)),a!==et)if((a=je())!==et)if(e.substr(Yl,2)===mn?(a=mn,Yl+=2):(a=et,0===Wl&&u(Fo)),a!==et){var i;if(He(),i=Zl[a=233*Yl+50])Yl=i.i,a=i.result;else{i=Yl;var o=D();if(o!==et){var s=[],l=Yl;if(He(),44===e.charCodeAt(Yl)){var c=Tt;Yl++}else c=et,0===Wl&&u(Ji);for(c!==et?(He(),(c=D())!==et?(Ql=l,l=c):(Yl=l,l=et)):(Yl=l,l=et);l!==et;)s.push(l),l=Yl,He(),44===e.charCodeAt(Yl)?(c=Tt,Yl++):(c=et,0===Wl&&u(Ji)),c!==et?(He(),(c=D())!==et?(Ql=l,l=c):(Yl=l,l=et)):(Yl=l,l=et);Ql=i,i=[o].concat(s)}else Yl=i,i=et;Zl[a]={i:Yl,result:i},a=i}a!==et?(Ql=r,r=["groupByClause"].concat(a)):(Yl=r,r=et)}else Yl=r,r=et;else Yl=r,r=et;else Yl=r,r=et;Zl[t]={i:Yl,result:r},t=r}if(t===et)if(r=Zl[t=233*Yl+54])Yl=r.i,t=r.result;else{if(a=r=Yl,e.substr(Yl,5)===bt?(i=bt,Yl+=5):(i=et,0===Wl&&u(ki)),i!==et?(i=je())!==et?(e.substr(Yl,2)===mn?(i=mn,Yl+=2):(i=et,0===Wl&&u(Fo)),i!==et?(Ql=a,a=!1):(Yl=a,a=et)):(Yl=a,a=et):(Yl=a,a=et),a===et&&(a=Yl,e.substr(Yl,6)===vn?(i=vn,Yl+=6):(i=et,0===Wl&&u(Po)),i!==et?(i=je())!==et?(e.substr(Yl,5)===bt?(i=bt,Yl+=5):(i=et,0===Wl&&u(ki)),i!==et?(i=je())!==et?(e.substr(Yl,2)===mn?(i=mn,Yl+=2):(i=et,0===Wl&&u(Fo)),i!==et?(Ql=a,a=!0):(Yl=a,a=et)):(Yl=a,a=et):(Yl=a,a=et)):(Yl=a,a=et):(Yl=a,a=et)),a!==et){if(He(),o=Zl[i=233*Yl+55])Yl=o.i,i=o.result;else{if(o=Yl,(s=M())!==et){if(l=[],c=Yl,He(),44===e.charCodeAt(Yl)){var h=Tt;Yl++}else h=et,0===Wl&&u(Ji);for(h!==et?(He(),(h=M())!==et?(Ql=c,c=h):(Yl=c,c=et)):(Yl=c,c=et);c!==et;)l.push(c),c=Yl,He(),44===e.charCodeAt(Yl)?(h=Tt,Yl++):(h=et,0===Wl&&u(Ji)),h!==et?(He(),(h=M())!==et?(Ql=c,c=h):(Yl=c,c=et)):(Yl=c,c=et);Ql=o,o=[s].concat(l)}else Yl=o,o=et;Zl[i]={i:Yl,result:o},i=o}i!==et?(Ql=r,r=["orderByClause"].concat(a?[["stable"]]:[],i)):(Yl=r,r=et)}else Yl=r,r=et;Zl[t]={i:Yl,result:r},t=r}}}return Zl[n]={i:Yl,result:t},t}function S(){var t,n,r=233*Yl+43;if(t=Zl[r])return Yl=t.i,t.result;if(t=Yl,36===e.charCodeAt(Yl)){var a=$t;Yl++}else a=et,0===Wl&&u(xo);if(a!==et)if((a=Be())!==et){He();var i=me();i===et&&(i=null),He();var o=233*Yl+44;if(n=Zl[o])Yl=n.i,o=n.result;else{if(n=Yl,e.substr(Yl,8)===hn){var s=hn;Yl+=8}else s=et,0===Wl&&u(Do);if(s!==et){var l=je();if(l!==et){if(e.substr(Yl,5)===Et){var c=Et;Yl+=5}else c=et,0===Wl&&u(qi);c!==et?n=s=[s,l,c]:(Yl=n,n=et)}else Yl=n,n=et}else Yl=n,n=et;Zl[o]={i:Yl,result:n},o=n}o===et&&(o=null),He(),(s=Zl[n=233*Yl+45])?(Yl=s.i,n=s.result):(s=Yl,e.substr(Yl,2)===Vt?(l=Vt,Yl+=2):(l=et,0===Wl&&u(po)),l!==et?(l=je())!==et?(36===e.charCodeAt(Yl)?(l=$t,Yl++):(l=et,0===Wl&&u(xo)),l!==et?(l=Be())!==et?(Ql=s,s=["positionalVariableBinding"].concat(l)):(Yl=s,s=et):(Yl=s,s=et)):(Yl=s,s=et):(Yl=s,s=et),Zl[n]={i:Yl,result:s},n=s),n===et&&(n=null),He(),e.substr(Yl,2)===cn?(s=cn,Yl+=2):(s=et,0===Wl&&u(Ro)),s!==et?(He(),(s=T())!==et?(Ql=t,t=["forClauseItem",["typedVariableBinding",["varName"].concat(a,i?[i]:[])]].concat(o?[["allowingEmpty"]]:[],n?[n]:[],[["forExpr",s]])):(Yl=t,t=et)):(Yl=t,t=et)}else Yl=t,t=et;else Yl=t,t=et;return Zl[r]={i:Yl,result:t},t}function R(){var t,n=233*Yl+47;if(t=Zl[n])return Yl=t.i,t.result;if(t=Yl,36===e.charCodeAt(Yl)){var r=$t;Yl++}else r=et,0===Wl&&u(xo);if(r!==et)if((r=Be())!==et){He();var a=me();if(a===et&&(a=null),He(),e.substr(Yl,2)===en){var i=en;Yl+=2}else i=et,0===Wl&&u(bo);i!==et?(He(),(i=T())!==et?(Ql=t,t=["letClauseItem",["typedVariableBinding",["varName"].concat(r)].concat(a?[a]:[]),["letExpr",i]]):(Yl=t,t=et)):(Yl=t,t=et)}else Yl=t,t=et;else Yl=t,t=et;return Zl[n]={i:Yl,result:t},t}function D(){var t,n,r=233*Yl+51;if(t=Zl[r])return Yl=t.i,t.result;t=Yl;var a=233*Yl+53;if(n=Zl[a])Yl=n.i,a=n.result;else{if(n=Yl,36===e.charCodeAt(Yl)){var i=$t;Yl++}else i=et,0===Wl&&u(xo);i!==et?(i=Be())!==et?(Ql=n,n=["varName"].concat(i)):(Yl=n,n=et):(Yl=n,n=et),Zl[a]={i:Yl,result:n},a=n}if(a!==et){if(i=Zl[n=233*Yl+52])Yl=i.i,n=i.result;else{i=Yl,He();var o=me();if(o===et&&(o=null),He(),e.substr(Yl,2)===en){var s=en;Yl+=2}else s=et,0===Wl&&u(bo);s!==et?(He(),(s=T())!==et?(Ql=i,i=["groupVarInitialize"].concat(o?[["typeDeclaration"].concat(o)]:[],[["varValue",s]])):(Yl=i,i=et)):(Yl=i,i=et),Zl[n]={i:Yl,result:i},n=i}n===et&&(n=null),i=Yl,He(),e.substr(Yl,9)===vt?(o=vt,Yl+=9):(o=et,0===Wl&&u(Pi)),o!==et?(He(),(o=Ce())!==et?(Ql=i,i=["collation",o]):(Yl=i,i=et)):(Yl=i,i=et),i===et&&(i=null),Ql=t,t=["groupingSpec",a].concat(n?[n]:[],i?[i]:[])}else Yl=t,t=et;return Zl[r]={i:Yl,result:t},t}function M(){var t,n=233*Yl+56;if(t=Zl[n])return Yl=t.i,t.result;t=Yl;var r=T();if(r!==et){var a;He();var i=233*Yl+57;if(a=Zl[i])Yl=a.i,i=a.result;else{if(a=Yl,e.substr(Yl,9)===gn){var o=gn;Yl+=9}else o=et,0===Wl&&u(Ho);o===et&&(e.substr(Yl,10)===yn?(o=yn,Yl+=10):(o=et,0===Wl&&u(jo))),o===et&&(o=null),He();var s=Yl;if(e.substr(Yl,5)===Et){var l=Et;Yl+=5}else l=et,0===Wl&&u(qi);if(l!==et){He();var c=Yl;if(e.substr(Yl,8)===Bt){var h=Bt;Yl+=8}else h=et,0===Wl&&u(Vi);h!==et&&(Ql=c,h="empty greatest"),(c=h)===et&&(c=Yl,e.substr(Yl,5)===Nt?(h=Nt,Yl+=5):(h=et,0===Wl&&u(Yi)),h!==et&&(Ql=c,h="empty least"),c=h),c!==et?(Ql=s,s=c):(Yl=s,s=et)}else Yl=s,s=et;if(s===et&&(s=null),He(),l=Yl,e.substr(Yl,9)===vt?(c=vt,Yl+=9):(c=et,0===Wl&&u(Pi)),c!==et){h=He();var p=Ce();p!==et?l=c=[c,h,p]:(Yl=l,l=et)}else Yl=l,l=et;l===et&&(l=null),Ql=a,a=o||s||l?["orderModifier"].concat(o?[["orderingKind",o]]:[],s?[["emptyOrderingMode",s]]:[],l?[["collation",l]]:[]):null,Zl[i]={i:Yl,result:a},i=a}Ql=t,t=["orderBySpec",["orderByExpr",r]].concat(i?[i]:[])}else Yl=t,t=et;return Zl[n]={i:Yl,result:t},t}function G(){var t,n=233*Yl+61;if(t=Zl[n])return Yl=t.i,t.result;if(t=Yl,36===e.charCodeAt(Yl)){var r=$t;Yl++}else r=et,0===Wl&&u(xo);if(r!==et)if((r=Be())!==et){var a=Yl,i=je();i!==et?(i=me())!==et?(Ql=a,a=i):(Yl=a,a=et):(Yl=a,a=et),a===et&&(a=null),(i=je())!==et?(e.substr(Yl,2)===cn?(i=cn,Yl+=2):(i=et,0===Wl&&u(Ro)),i!==et?(i=je())!==et?(i=T())!==et?(Ql=t,t=["quantifiedExprInClause",["typedVariableBinding",["varName"].concat(r)].concat(a?[a]:[]),["sourceExpr",i]]):(Yl=t,t=et):(Yl=t,t=et):(Yl=t,t=et)):(Yl=t,t=et)}else Yl=t,t=et;else Yl=t,t=et;return Zl[n]={i:Yl,result:t},t}function U(){var t,n=233*Yl+63;if(t=Zl[n])return Yl=t.i,t.result;if(t=Yl,e.substr(Yl,4)===Bn){var r=Bn;Yl+=4}else r=et,0===Wl&&u(Vo);if(r!==et){if(He(),r=Yl,36===e.charCodeAt(Yl)){var a=$t;Yl++}else a=et,0===Wl&&u(xo);if(a!==et)if((a=Be())!==et){var i=je();i!==et?(e.substr(Yl,2)===an?(i=an,Yl+=2):(i=et,0===Wl&&u(Co)),i!==et?(Ql=r,r=a):(Yl=r,r=et)):(Yl=r,r=et)}else Yl=r,r=et;else Yl=r,r=et;if(r===et&&(r=null),He(),i=Zl[a=233*Yl+64])Yl=i.i,a=i.result;else{i=Yl;var o=ve();if(o!==et){var s=[],l=Yl;if(He(),124===e.charCodeAt(Yl)){var c=Nn;Yl++}else c=et,0===Wl&&u(Yo);for(c!==et?(He(),(c=ve())!==et?(Ql=l,l=c):(Yl=l,l=et)):(Yl=l,l=et);l!==et;)s.push(l),l=Yl,He(),124===e.charCodeAt(Yl)?(c=Nn,Yl++):(c=et,0===Wl&&u(Yo)),c!==et?(He(),(c=ve())!==et?(Ql=l,l=c):(Yl=l,l=et)):(Yl=l,l=et);Ql=i,i=function(e,t){return t.length?[["sequenceTypeUnion",["sequenceType"].concat(e)].concat(t.map((function(e){return["sequenceType"].concat(e)})))]:[["sequenceType"].concat(e)]}(o,s)}else Yl=i,i=et;Zl[a]={i:Yl,result:i},a=i}a!==et?(i=je())!==et?(e.substr(Yl,6)===wn?(i=wn,Yl+=6):(i=et,0===Wl&&u(Xo)),i!==et?(i=je())!==et?(i=T())!==et?(Ql=t,t=["typeswitchExprCaseClause"].concat(r?[["variableBinding"].concat(r)]:[],a,[["resultExpr",i]])):(Yl=t,t=et):(Yl=t,t=et):(Yl=t,t=et)):(Yl=t,t=et):(Yl=t,t=et)}else Yl=t,t=et;return Zl[n]={i:Yl,result:t},t}function F(){var t,n=233*Yl+67;if(t=Zl[n])return Yl=t.i,t.result;t=Yl;var r=P();if(r!==et){var a=[],i=Yl;if(He(),e.substr(Yl,3)===Sn){var o=Sn;Yl+=3}else o=et,0===Wl&&u(Wo);for(o!==et?(o=Ye())!==et?(He(),(o=P())!==et?(Ql=i,i=o):(Yl=i,i=et)):(Yl=i,i=et):(Yl=i,i=et);i!==et;)a.push(i),i=Yl,He(),e.substr(Yl,3)===Sn?(o=Sn,Yl+=3):(o=et,0===Wl&&u(Wo)),o!==et?(o=Ye())!==et?(He(),(o=P())!==et?(Ql=i,i=o):(Yl=i,i=et)):(Yl=i,i=et):(Yl=i,i=et);Ql=t,t=Qe("andOp",r,a)}else Yl=t,t=et;return Zl[n]={i:Yl,result:t},t}function P(){var t,n,r=233*Yl+68;if(t=Zl[r])return Yl=t.i,t.result;t=Yl;var a=H();if(a!==et){var i=Yl;He();var o=233*Yl+83;if(n=Zl[o])Yl=n.i,o=n.result;else{if(n=Yl,e.substr(Yl,2)===$n){var s=$n;Yl+=2}else s=et,0===Wl&&u(As);s!==et?(s=Ye())!==et?(Ql=n,n="eqOp"):(Yl=n,n=et):(Yl=n,n=et),n===et&&(n=Yl,e.substr(Yl,2)===er?(s=er,Yl+=2):(s=et,0===Wl&&u(xs)),s!==et?(s=Ye())!==et?(Ql=n,n="neOp"):(Yl=n,n=et):(Yl=n,n=et),n===et&&(n=Yl,e.substr(Yl,2)===tr?(s=tr,Yl+=2):(s=et,0===Wl&&u(bs)),s!==et?(s=Ye())!==et?(Ql=n,n="ltOp"):(Yl=n,n=et):(Yl=n,n=et),n===et&&(n=Yl,e.substr(Yl,2)===nr?(s=nr,Yl+=2):(s=et,0===Wl&&u(Es)),s!==et?(s=Ye())!==et?(Ql=n,n="leOp"):(Yl=n,n=et):(Yl=n,n=et),n===et&&(n=Yl,e.substr(Yl,2)===rr?(s=rr,Yl+=2):(s=et,0===Wl&&u(Bs)),s!==et?(s=Ye())!==et?(Ql=n,n="gtOp"):(Yl=n,n=et):(Yl=n,n=et),n===et&&(n=Yl,e.substr(Yl,2)===ar?(s=ar,Yl+=2):(s=et,0===Wl&&u(Ns)),s!==et?(s=Ye())!==et?(Ql=n,n="geOp"):(Yl=n,n=et):(Yl=n,n=et)))))),Zl[o]={i:Yl,result:n},o=n}o===et&&((n=Zl[o=233*Yl+84])?(Yl=n.i,o=n.result):(n=Yl,e.substr(Yl,2)===ir?(s=ir,Yl+=2):(s=et,0===Wl&&u(Cs)),s!==et?(s=Ye())!==et?(Ql=n,n="isOp"):(Yl=n,n=et):(Yl=n,n=et),n===et&&(n=Yl,e.substr(Yl,2)===or?(s=or,Yl+=2):(s=et,0===Wl&&u(Ts)),s!==et&&(Ql=n,s="nodeBeforeOp"),(n=s)===et&&(n=Yl,e.substr(Yl,2)===sr?(s=sr,Yl+=2):(s=et,0===Wl&&u(Is)),s!==et&&(Ql=n,s="nodeAfterOp"),n=s)),Zl[o]={i:Yl,result:n},o=n),o===et&&((n=Zl[o=233*Yl+82])?(Yl=n.i,o=n.result):(n=Yl,61===e.charCodeAt(Yl)?(s=lt,Yl++):(s=et,0===Wl&&u(Si)),s!==et&&(Ql=n,s="equalOp"),(n=s)===et&&(n=Yl,e.substr(Yl,2)===Jn?(s=Jn,Yl+=2):(s=et,0===Wl&&u(ms)),s!==et&&(Ql=n,s="notEqualOp"),(n=s)===et&&(n=Yl,e.substr(Yl,2)===Kn?(s=Kn,Yl+=2):(s=et,0===Wl&&u(vs)),s!==et&&(Ql=n,s="lessThanOrEqualOp"),(n=s)===et&&(n=Yl,60===e.charCodeAt(Yl)?(s=zn,Yl++):(s=et,0===Wl&&u(gs)),s!==et&&(Ql=n,s="lessThanOp"),(n=s)===et&&(n=Yl,e.substr(Yl,2)===Wn?(s=Wn,Yl+=2):(s=et,0===Wl&&u(ys)),s!==et&&(Ql=n,s="greaterThanOrEqualOp"),(n=s)===et&&(n=Yl,62===e.charCodeAt(Yl)?(s=Zn,Yl++):(s=et,0===Wl&&u(ws)),s!==et&&(Ql=n,s="greaterThanOp"),n=s))))),Zl[o]={i:Yl,result:n},o=n))),o!==et?(He(),(n=H())!==et?(Ql=i,i=[o,n]):(Yl=i,i=et)):(Yl=i,i=et),i===et&&(i=null),Ql=t,t=i?[i[0],["firstOperand",a],["secondOperand",i[1]]]:a}else Yl=t,t=et;return Zl[r]={i:Yl,result:t},t}function H(){var t,n=233*Yl+69;if(t=Zl[n])return Yl=t.i,t.result;t=Yl;var r=j();if(r!==et){var a=[],i=Yl;if(He(),e.substr(Yl,2)===Rn){var o=Rn;Yl+=2}else o=et,0===Wl&&u(Zo);for(o!==et?(He(),(o=j())!==et?(Ql=i,i=o):(Yl=i,i=et)):(Yl=i,i=et);i!==et;)a.push(i),i=Yl,He(),e.substr(Yl,2)===Rn?(o=Rn,Yl+=2):(o=et,0===Wl&&u(Zo)),o!==et?(He(),(o=j())!==et?(Ql=i,i=o):(Yl=i,i=et)):(Yl=i,i=et);Ql=t,t=Qe("stringConcatenateOp",r,a)}else Yl=t,t=et;return Zl[n]={i:Yl,result:t},t}function j(){var t,n=233*Yl+70;if(t=Zl[n])return Yl=t.i,t.result;t=Yl;var r=X();if(r!==et){var a=Yl;if(He(),e.substr(Yl,2)===Dn){var i=Dn;Yl+=2}else i=et,0===Wl&&u($o);i!==et?(i=Ye())!==et?(He(),(i=X())!==et?(Ql=a,a=i):(Yl=a,a=et)):(Yl=a,a=et):(Yl=a,a=et),a===et&&(a=null),Ql=t,t=null===a?r:["rangeSequenceExpr",["startExpr",r],["endExpr",a]]}else Yl=t,t=et;return Zl[n]={i:Yl,result:t},t}function X(){var t,n=233*Yl+71;if(t=Zl[n])return Yl=t.i,t.result;t=Yl;var r=_();if(r!==et){var a=[],i=Yl;He();var o=Yl;if(45===e.charCodeAt(Yl)){var s=Mn;Yl++}else s=et,0===Wl&&u(es);for(s!==et&&(Ql=o,s="subtractOp"),(o=s)===et&&(o=Yl,43===e.charCodeAt(Yl)?(s=Gn,Yl++):(s=et,0===Wl&&u(ts)),s!==et&&(Ql=o,s="addOp"),o=s),o!==et?(He(),(s=_())!==et?(Ql=i,i=[o,s]):(Yl=i,i=et)):(Yl=i,i=et);i!==et;)a.push(i),i=Yl,He(),o=Yl,45===e.charCodeAt(Yl)?(s=Mn,Yl++):(s=et,0===Wl&&u(es)),s!==et&&(Ql=o,s="subtractOp"),(o=s)===et&&(o=Yl,43===e.charCodeAt(Yl)?(s=Gn,Yl++):(s=et,0===Wl&&u(ts)),s!==et&&(Ql=o,s="addOp"),o=s),o!==et?(He(),(s=_())!==et?(Ql=i,i=[o,s]):(Yl=i,i=et)):(Yl=i,i=et);Ql=t,t=function(e,t){return t.reduce((function(e,t){return[t[0],["firstOperand",e],["secondOperand",t[1]]]}),e)}(r,a)}else Yl=t,t=et;return Zl[n]={i:Yl,result:t},t}function _(){var t,n=233*Yl+72;if(t=Zl[n])return Yl=t.i,t.result;t=Yl;var r=L();if(r!==et){var a=[],i=Yl;He();var o=Yl;if(42===e.charCodeAt(Yl)){var s=Un;Yl++}else s=et,0===Wl&&u(ns);for(s!==et&&(Ql=o,s="multiplyOp"),(o=s)===et&&(o=Yl,e.substr(Yl,3)===Fn?(s=Fn,Yl+=3):(s=et,0===Wl&&u(rs)),s!==et?(s=Ye())!==et?(Ql=o,o="divOp"):(Yl=o,o=et):(Yl=o,o=et),o===et&&(o=Yl,e.substr(Yl,4)===Pn?(s=Pn,Yl+=4):(s=et,0===Wl&&u(as)),s!==et?(s=Ye())!==et?(Ql=o,o="idivOp"):(Yl=o,o=et):(Yl=o,o=et),o===et&&(o=Yl,e.substr(Yl,3)===Hn?(s=Hn,Yl+=3):(s=et,0===Wl&&u(is)),s!==et?(s=Ye())!==et?(Ql=o,o="modOp"):(Yl=o,o=et):(Yl=o,o=et)))),o!==et?(He(),(s=L())!==et?(Ql=i,i=[o,s]):(Yl=i,i=et)):(Yl=i,i=et);i!==et;)a.push(i),i=Yl,He(),o=Yl,42===e.charCodeAt(Yl)?(s=Un,Yl++):(s=et,0===Wl&&u(ns)),s!==et&&(Ql=o,s="multiplyOp"),(o=s)===et&&(o=Yl,e.substr(Yl,3)===Fn?(s=Fn,Yl+=3):(s=et,0===Wl&&u(rs)),s!==et?(s=Ye())!==et?(Ql=o,o="divOp"):(Yl=o,o=et):(Yl=o,o=et),o===et&&(o=Yl,e.substr(Yl,4)===Pn?(s=Pn,Yl+=4):(s=et,0===Wl&&u(as)),s!==et?(s=Ye())!==et?(Ql=o,o="idivOp"):(Yl=o,o=et):(Yl=o,o=et),o===et&&(o=Yl,e.substr(Yl,3)===Hn?(s=Hn,Yl+=3):(s=et,0===Wl&&u(is)),s!==et?(s=Ye())!==et?(Ql=o,o="modOp"):(Yl=o,o=et):(Yl=o,o=et)))),o!==et?(He(),(s=L())!==et?(Ql=i,i=[o,s]):(Yl=i,i=et)):(Yl=i,i=et);Ql=t,t=function(e,t){return t.reduce((function(e,t){return[t[0],["firstOperand",e],["secondOperand",t[1]]]}),e)}(r,a)}else Yl=t,t=et;return Zl[n]={i:Yl,result:t},t}function L(){var t,n=233*Yl+73;if(t=Zl[n])return Yl=t.i,t.result;t=Yl;var r=k();if(r!==et){var a=[],i=Yl;if(He(),124===e.charCodeAt(Yl)){var o=Nn;Yl++}else o=et,0===Wl&&u(Yo);if(o===et){if(o=Yl,e.substr(Yl,5)===jn){var s=jn;Yl+=5}else s=et,0===Wl&&u(os);if(s!==et){var l=Ye();l!==et?o=s=[s,l]:(Yl=o,o=et)}else Yl=o,o=et}for(o!==et?(He(),(l=k())!==et?(Ql=i,i=l):(Yl=i,i=et)):(Yl=i,i=et);i!==et;)a.push(i),i=Yl,He(),124===e.charCodeAt(Yl)?(o=Nn,Yl++):(o=et,0===Wl&&u(Yo)),o===et&&(o=Yl,e.substr(Yl,5)===jn?(s=jn,Yl+=5):(s=et,0===Wl&&u(os)),s!==et?(l=Ye())!==et?o=s=[s,l]:(Yl=o,o=et):(Yl=o,o=et)),o!==et?(He(),(l=k())!==et?(Ql=i,i=l):(Yl=i,i=et)):(Yl=i,i=et);Ql=t,t=Qe("unionOp",r,a)}else Yl=t,t=et;return Zl[n]={i:Yl,result:t},t}function k(){var t,n,r=233*Yl+74;if(t=Zl[r])return Yl=t.i,t.result;t=Yl;var a=233*Yl+75;if(n=Zl[a])Yl=n.i,a=n.result;else{n=Yl;var i=q();if(i!==et){var o=Yl;if(He(),e.substr(Yl,8)===Ln){var s=Ln;Yl+=8}else s=et,0===Wl&&u(ls);s!==et?(s=je())!==et?(e.substr(Yl,2)===kn?(s=kn,Yl+=2):(s=et,0===Wl&&u(cs)),s!==et?(s=Ye())!==et?(He(),(s=ve())!==et?(Ql=o,o=s):(Yl=o,o=et)):(Yl=o,o=et):(Yl=o,o=et)):(Yl=o,o=et):(Yl=o,o=et),o===et&&(o=null),Ql=n,n=o?["instanceOfExpr",["argExpr",i],["sequenceType"].concat(o)]:i}else Yl=n,n=et;n===et&&(n=q()),Zl[a]={i:Yl,result:n},a=n}if(a!==et){for(n=[],i=Yl,He(),o=Yl,e.substr(Yl,9)===Xn?(s=Xn,Yl+=9):(s=et,0===Wl&&u(ss)),s!==et&&(Ql=o,s="intersectOp"),(o=s)===et&&(o=Yl,e.substr(Yl,6)===_n?(s=_n,Yl+=6):(s=et,0===Wl&&u(us)),s!==et&&(Ql=o,s="exceptOp"),o=s),o!==et?(s=Ye())!==et?(He(),(s=k())!==et?(Ql=i,i=[o,s]):(Yl=i,i=et)):(Yl=i,i=et):(Yl=i,i=et);i!==et;)n.push(i),i=Yl,He(),o=Yl,e.substr(Yl,9)===Xn?(s=Xn,Yl+=9):(s=et,0===Wl&&u(ss)),s!==et&&(Ql=o,s="intersectOp"),(o=s)===et&&(o=Yl,e.substr(Yl,6)===_n?(s=_n,Yl+=6):(s=et,0===Wl&&u(us)),s!==et&&(Ql=o,s="exceptOp"),o=s),o!==et?(s=Ye())!==et?(He(),(s=k())!==et?(Ql=i,i=[o,s]):(Yl=i,i=et)):(Yl=i,i=et):(Yl=i,i=et);Ql=t,t=function(e,t){return t.reduce((function(e,t){return[t[0],["firstOperand",e],["secondOperand",t[1]]]}),e)}(a,n)}else Yl=t,t=et;return Zl[r]={i:Yl,result:t},t}function q(){var t,n,r,a=233*Yl+76;if(t=Zl[a])return Yl=t.i,t.result;t=Yl;var i=233*Yl+77;if(n=Zl[i])Yl=n.i,i=n.result;else{var o;n=Yl;var s=233*Yl+78;if(r=Zl[s])Yl=r.i,s=r.result;else{r=Yl;var l=233*Yl+79;if(o=Zl[l])Yl=o.i,l=o.result;else{o=Yl;var c=function t(){var n,r=233*Yl+80;if(n=Zl[r])return Yl=n.i,n.result;if(n=Yl,45===e.charCodeAt(Yl)){var a=Mn;Yl++}else a=et,0===Wl&&u(es);if(a!==et?(He(),(a=t())!==et?(Ql=n,n=["unaryMinusOp",["operand",a]]):(Yl=n,n=et)):(Yl=n,n=et),n===et&&(n=Yl,43===e.charCodeAt(Yl)?(a=Gn,Yl++):(a=et,0===Wl&&u(ts)),a!==et?(He(),(a=t())!==et?(Ql=n,n=["unaryPlusOp",["operand",a]]):(Yl=n,n=et)):(Yl=n,n=et),n===et))if(a=Zl[n=233*Yl+81])Yl=a.i,n=a.result;else{var i,o;if(i=Zl[a=233*Yl+85])Yl=i.i,a=i.result;else{if(i=Yl,e.substr(Yl,8)===ur){var s=ur;Yl+=8}else s=et,0===Wl&&u(Os);if(s!==et){s=Yl,He();var l=233*Yl+86;(o=Zl[l])?(Yl=o.i,l=o.result):(e.substr(Yl,3)===cr?(o=cr,Yl+=3):(o=et,0===Wl&&u(Rs)),o===et&&(e.substr(Yl,6)===hr?(o=hr,Yl+=6):(o=et,0===Wl&&u(Ds))),Zl[l]={i:Yl,result:o},l=o),l!==et?(Ql=s,s=["validationMode",l]):(Yl=s,s=et),s===et&&(s=Yl,He(),e.substr(Yl,4)===lr?(l=lr,Yl+=4):(l=et,0===Wl&&u(Ss)),l!==et?(He(),(l=Be())!==et?(Ql=s,s=["type"].concat(l)):(Yl=s,s=et)):(Yl=s,s=et)),s===et&&(s=null),He(),123===e.charCodeAt(Yl)?(l=on,Yl++):(l=et,0===Wl&&u(To)),l!==et?(He(),(l=C())!==et?(He(),125===e.charCodeAt(Yl)?(o=sn,Yl++):(o=et,0===Wl&&u(Io)),o!==et?(Ql=i,i=["validateExpr"].concat(s?[s]:[],[["argExpr",l]])):(Yl=i,i=et)):(Yl=i,i=et)):(Yl=i,i=et)}else Yl=i,i=et;Zl[a]={i:Yl,result:i},a=i}if(a===et){if(i=Zl[a=233*Yl+87])Yl=i.i,a=i.result;else{if(i=Yl,s=[],(l=V())!==et)for(;l!==et;)s.push(l),l=V();else s=et;s!==et?(He(),123===e.charCodeAt(Yl)?(l=on,Yl++):(l=et,0===Wl&&u(To)),l!==et?(He(),C(),He(),125===e.charCodeAt(Yl)?(l=sn,Yl++):(l=et,0===Wl&&u(Io)),l!==et?(Ql=i,i=["extensionExpr"].concat(s)):(Yl=i,i=et)):(Yl=i,i=et)):(Yl=i,i=et),Zl[a]={i:Yl,result:i},a=i}if(a===et)if(i=Zl[a=233*Yl+90])Yl=i.i,a=i.result;else{if(i=Yl,(s=Y())!==et){if(l=[],o=Yl,He(),33===e.charCodeAt(Yl)){var c=dr;Yl++}else c=et,0===Wl&&u(Us);for(c!==et?(He(),(c=Y())!==et?(Ql=o,o=c):(Yl=o,o=et)):(Yl=o,o=et);o!==et;)l.push(o),o=Yl,He(),33===e.charCodeAt(Yl)?(c=dr,Yl++):(c=et,0===Wl&&u(Us)),c!==et?(He(),(c=Y())!==et?(Ql=o,o=c):(Yl=o,o=et)):(Yl=o,o=et);Ql=i,i=function(e,t){return 0===t.length?$e(e):$e(["simpleMapExpr","pathExpr"===e[0]?e:["pathExpr",["stepExpr",["filterExpr",We(e)]]]].concat(t.map((function(e){return"pathExpr"===e[0]?e:["pathExpr",["stepExpr",["filterExpr",We(e)]]]}))))}(s,l)}else Yl=i,i=et;Zl[a]={i:Yl,result:i},a=i}}Zl[n]={i:Yl,result:a},n=a}return Zl[r]={i:Yl,result:n},n}();if(c!==et){var h=[],p=Yl;if(He(),e.substr(Yl,2)===Qn){var f=Qn;Yl+=2}else f=et,0===Wl&&u(ds);if(f!==et)if(He(),(f=te())!==et){He();var d=W();d!==et?(Ql=p,p=[f,d]):(Yl=p,p=et)}else Yl=p,p=et;else Yl=p,p=et;for(;p!==et;)h.push(p),p=Yl,He(),e.substr(Yl,2)===Qn?(f=Qn,Yl+=2):(f=et,0===Wl&&u(ds)),f!==et?(He(),(f=te())!==et?(He(),(d=W())!==et?(Ql=p,p=[f,d]):(Yl=p,p=et)):(Yl=p,p=et)):(Yl=p,p=et);Ql=o,o=function(e,t){return t.reduce((function(e,t){return["arrowExpr",["argExpr",e],t[0],["arguments"].concat(t[1])]}),e)}(c,h)}else Yl=o,o=et;Zl[l]={i:Yl,result:o},l=o}l!==et?(o=Yl,He(),e.substr(Yl,4)===Yn?(c=Yn,Yl+=4):(c=et,0===Wl&&u(fs)),c!==et?(c=je())!==et?(e.substr(Yl,2)===an?(c=an,Yl+=2):(c=et,0===Wl&&u(Co)),c!==et?(c=Ye())!==et?(He(),(c=de())!==et?(Ql=o,o=c):(Yl=o,o=et)):(Yl=o,o=et):(Yl=o,o=et)):(Yl=o,o=et):(Yl=o,o=et),o===et&&(o=null),Ql=r,r=o?["castExpr",["argExpr",l],o]:l):(Yl=r,r=et),Zl[s]={i:Yl,result:r},s=r}s!==et?(r=Yl,He(),e.substr(Yl,8)===Vn?(l=Vn,Yl+=8):(l=et,0===Wl&&u(ps)),l!==et?(l=je())!==et?(e.substr(Yl,2)===an?(l=an,Yl+=2):(l=et,0===Wl&&u(Co)),l!==et?(l=Ye())!==et?(He(),(l=de())!==et?(Ql=r,r=l):(Yl=r,r=et)):(Yl=r,r=et):(Yl=r,r=et)):(Yl=r,r=et):(Yl=r,r=et),r===et&&(r=null),Ql=n,n=r?["castableExpr",["argExpr",s],r]:s):(Yl=n,n=et),Zl[i]={i:Yl,result:n},i=n}return i!==et?(n=Yl,He(),e.substr(Yl,5)===qn?(s=qn,Yl+=5):(s=et,0===Wl&&u(hs)),s!==et?(s=je())!==et?(e.substr(Yl,2)===an?(s=an,Yl+=2):(s=et,0===Wl&&u(Co)),s!==et?(s=Ye())!==et?(He(),(s=ve())!==et?(Ql=n,n=s):(Yl=n,n=et)):(Yl=n,n=et):(Yl=n,n=et)):(Yl=n,n=et):(Yl=n,n=et),n===et&&(n=null),Ql=t,t=n?["treatExpr",["argExpr",i],["sequenceType"].concat(n)]:i):(Yl=t,t=et),Zl[a]={i:Yl,result:t},t}function V(){var t,n=233*Yl+88;if(t=Zl[n])return Yl=t.i,t.result;if(t=Yl,e.substr(Yl,2)===pr){var r=pr;Yl+=2}else r=et,0===Wl&&u(Ms);if(r!==et)if(je(),(r=Be())!==et){var a=Yl,i=je();if(i!==et){var o;if(o=Zl[i=233*Yl+89])Yl=o.i,i=o.result;else{o=Yl;var s=[],l=Yl,c=Ge();if(c!==et){var h=Yl;if(Wl++,e.substr(Yl,2)===fr){var p=fr;Yl+=2}else p=et,0===Wl&&u(Gs);Wl--,p===et?h=void 0:(Yl=h,h=et),h!==et?(Ql=l,l=c):(Yl=l,l=et)}else Yl=l,l=et;for(;l!==et;)s.push(l),l=Yl,(c=Ge())!==et?(h=Yl,Wl++,e.substr(Yl,2)===fr?(p=fr,Yl+=2):(p=et,0===Wl&&u(Gs)),Wl--,p===et?h=void 0:(Yl=h,h=et),h!==et?(Ql=l,l=c):(Yl=l,l=et)):(Yl=l,l=et);Ql=o,o=s=s.join(""),Zl[i]={i:Yl,result:o},i=o}Ql=a,a=i}else Yl=a,a=et;a===et&&(a=null),He(),e.substr(Yl,2)===fr?(i=fr,Yl+=2):(i=et,0===Wl&&u(Gs)),i!==et?(Ql=t,t=a?["pragma",["pragmaName",r],["pragmaContents",a]]:["pragma",["pragmaName",r]]):(Yl=t,t=et)}else Yl=t,t=et;else Yl=t,t=et;return Zl[n]={i:Yl,result:t},t}function Y(){var t,r,a=233*Yl+91;if(t=Zl[a])return Yl=t.i,t.result;if(r=Zl[t=233*Yl+92])Yl=r.i,t=r.result;else{r=Yl;var i=J();if(i!==et){He();var o=K();if(o!==et){He();var s=Q();s!==et?(Ql=r,r=["pathExpr",i,o].concat(s)):(Yl=r,r=et)}else Yl=r,r=et}else Yl=r,r=et;if(r===et&&(r=Yl,(i=J())!==et?(He(),47===e.charCodeAt(Yl)?(o=mr,Yl++):(o=et,0===Wl&&u(Fs)),o!==et?(He(),(s=Q())!==et?(Ql=r,r=["pathExpr",i].concat(s)):(Yl=r,r=et)):(Yl=r,r=et)):(Yl=r,r=et),r===et)){if(i=Zl[r=233*Yl+98])Yl=i.i,r=i.result;else{if(i=Yl,(o=ne())!==et){s=Yl,Wl++;var l=Yl,c=He(),h=Z();h!==et?l=c=[c,h]:(Yl=l,l=et),l===et&&(l=Yl,c=He(),(h=W())!==et?l=c=[c,h]:(Yl=l,l=et),l===et&&(l=Yl,c=He(),(h=$())!==et?l=c=[c,h]:(Yl=l,l=et))),Wl--,l===et?s=void 0:(Yl=s,s=et),s!==et?(Ql=i,i=o):(Yl=i,i=et)}else Yl=i,i=et;Zl[r]={i:Yl,result:i},r=i}r===et&&(r=Yl,(i=J())!==et&&(Ql=r,i=["pathExpr",i]),r=i)}Zl[t]={i:Yl,result:r},t=r}return t===et&&((r=Zl[t=233*Yl+95])?(Yl=r.i,t=r.result):(r=Yl,47===e.charCodeAt(Yl)?(o=mr,Yl++):(o=et,0===Wl&&u(Fs)),o!==et?(He(),(i=Q())!==et?(Ql=r,r=["pathExpr",["rootExpr"]].concat(i)):(Yl=r,r=et)):(Yl=r,r=et),r===et&&(r=Yl,(o=K())!==et?(He(),(i=Q())!==et?(Ql=r,r=["pathExpr",["rootExpr"],o].concat(i)):(Yl=r,r=et)):(Yl=r,r=et),r===et&&(r=Yl,47===e.charCodeAt(Yl)?(o=mr,Yl++):(o=et,0===Wl&&u(Fs)),o!==et?(o=Yl,Wl++,i=Yl,s=He(),Ql=l=Yl,(c=(c=n.Ra)?void 0:et)!==et?(ai.test(e.charAt(Yl))?(h=e.charAt(Yl),Yl++):(h=et,0===Wl&&u(Ps)),h!==et?l=c=[c,h]:(Yl=l,l=et)):(Yl=l,l=et),l!==et?i=s=[s,l]:(Yl=i,i=et),i===et&&(Ql=i=Yl,(s=(s=!n.Ra)?void 0:et)!==et?(ii.test(e.charAt(Yl))?(l=e.charAt(Yl),Yl++):(l=et,0===Wl&&u(Hs)),l!==et?i=s=[s,l]:(Yl=i,i=et)):(Yl=i,i=et)),Wl--,i===et?o=void 0:(Yl=o,o=et),o!==et?(Ql=r,r=["pathExpr",["rootExpr"]]):(Yl=r,r=et)):(Yl=r,r=et))),Zl[t]={i:Yl,result:r},t=r)),Zl[a]={i:Yl,result:t},t}function Q(){var t,n=233*Yl+93;if(t=Zl[n])return Yl=t.i,t.result;t=Yl;var r=J();if(r!==et){He();var a=K();if(a!==et){He();var i=Q();i!==et?(Ql=t,t=[r,a].concat(i)):(Yl=t,t=et)}else Yl=t,t=et}else Yl=t,t=et;return t===et&&(t=Yl,(r=J())!==et?(He(),47===e.charCodeAt(Yl)?(a=mr,Yl++):(a=et,0===Wl&&u(Fs)),a!==et?(He(),(i=Q())!==et?(Ql=t,t=[r].concat(i)):(Yl=t,t=et)):(Yl=t,t=et)):(Yl=t,t=et),t===et&&(t=Yl,(r=J())!==et&&(Ql=t,r=[r]),t=r)),Zl[n]={i:Yl,result:t},t}function J(){var t,n,r=233*Yl+94;if(t=Zl[r])return Yl=t.i,t.result;t=Yl;var a=233*Yl+97;if(n=Zl[a])Yl=n.i,a=n.result;else{var i=n=Yl,o=ne();if(o!==et&&(Ql=i,o=We(o)),(i=o)!==et){o=[];var s=Yl;He();var l=Z();for(l!==et?(Ql=s,s=["predicate",l]):(Yl=s,s=et),s===et&&(s=Yl,He(),(l=W())!==et?(Ql=s,s=["argumentList",l]):(Yl=s,s=et),s===et&&(s=Yl,He(),(l=$())!==et?(Ql=s,s=l):(Yl=s,s=et)));s!==et;)o.push(s),s=Yl,He(),(l=Z())!==et?(Ql=s,s=["predicate",l]):(Yl=s,s=et),s===et&&(s=Yl,He(),(l=W())!==et?(Ql=s,s=["argumentList",l]):(Yl=s,s=et),s===et&&(s=Yl,He(),(l=$())!==et?(Ql=s,s=l):(Yl=s,s=et)));Ql=n,n=function(e,t){function n(){s&&1===i.length?o.push(["predicate",i[0]]):0!==i.length&&o.push(["predicates"].concat(i)),i.length=0}function r(e){n(),0!==o.length?("sequenceExpr"===a[0]&&2<a.length&&(a=["sequenceExpr",a]),a=[["filterExpr",a]].concat(o)):a=e?[["filterExpr",a]]:[a],o.length=0}var a=e,i=[],o=[],s=!1;return t.forEach((function(e){"predicate"===e[0]?i.push(e[1]):"lookup"===e[0]?(s=!0,n(),o.push(e)):"argumentList"===e[0]&&(r(!1),1<a.length&&(a=[["sequenceExpr",["pathExpr",["stepExpr"].concat(a)]]]),a=["dynamicFunctionInvocationExpr",["functionItem"].concat(a)].concat(e[1].length?[["arguments"].concat(e[1])]:[]))})),r(!0),a}(i,o)}else Yl=n,n=et;Zl[a]={i:Yl,result:n},a=n}if(a!==et&&(Ql=t,a=["stepExpr"].concat(a)),(t=a)===et)if(a=Zl[t=233*Yl+99])Yl=a.i,t=a.result;else{if(a=Yl,i=Zl[n=233*Yl+103])Yl=i.i,n=i.result;else{if(i=Yl,s=Zl[o=233*Yl+104])Yl=s.i,o=s.result;else{if(l=s=Yl,e.substr(Yl,6)===Cr){var c=Cr;Yl+=6}else c=et,0===Wl&&u(Ks);if(c!==et){if(e.substr(Yl,2)===yr){var h=yr;Yl+=2}else h=et,0===Wl&&u(_s);h!==et?l=c=[c,h]:(Yl=l,l=et)}else Yl=l,l=et;l!==et&&(Ql=s,l="parent"),(s=l)===et&&(l=s=Yl,e.substr(Yl,8)===Tr?(c=Tr,Yl+=8):(c=et,0===Wl&&u(zs)),c!==et?(e.substr(Yl,2)===yr?(h=yr,Yl+=2):(h=et,0===Wl&&u(_s)),h!==et?l=c=[c,h]:(Yl=l,l=et)):(Yl=l,l=et),l!==et&&(Ql=s,l="ancestor"),(s=l)===et&&(l=s=Yl,e.substr(Yl,17)===Ir?(c=Ir,Yl+=17):(c=et,0===Wl&&u(Ws)),c!==et?(e.substr(Yl,2)===yr?(h=yr,Yl+=2):(h=et,0===Wl&&u(_s)),h!==et?l=c=[c,h]:(Yl=l,l=et)):(Yl=l,l=et),l!==et&&(Ql=s,l="preceding-sibling"),(s=l)===et&&(l=s=Yl,e.substr(Yl,9)===Or?(c=Or,Yl+=9):(c=et,0===Wl&&u(Zs)),c!==et?(e.substr(Yl,2)===yr?(h=yr,Yl+=2):(h=et,0===Wl&&u(_s)),h!==et?l=c=[c,h]:(Yl=l,l=et)):(Yl=l,l=et),l!==et&&(Ql=s,l="preceding"),(s=l)===et&&(l=s=Yl,e.substr(Yl,16)===Sr?(c=Sr,Yl+=16):(c=et,0===Wl&&u($s)),c!==et?(e.substr(Yl,2)===yr?(h=yr,Yl+=2):(h=et,0===Wl&&u(_s)),h!==et?l=c=[c,h]:(Yl=l,l=et)):(Yl=l,l=et),l!==et&&(Ql=s,l="ancestor-or-self"),s=l)))),Zl[o]={i:Yl,result:s},o=s}o!==et?(s=z())!==et?(Ql=i,i=["stepExpr",["xpathAxis",o],s]):(Yl=i,i=et):(Yl=i,i=et),i===et&&(i=Yl,(s=Zl[o=233*Yl+105])?(Yl=s.i,o=s.result):(s=Yl,e.substr(Yl,2)===Rr?(l=Rr,Yl+=2):(l=et,0===Wl&&u(eu)),l!==et&&(Ql=s,l=["stepExpr",["xpathAxis","parent"],["anyKindTest"]]),s=l,Zl[o]={i:Yl,result:s},o=s),o!==et&&(Ql=i),i=o),Zl[n]={i:Yl,result:i},n=i}if(n===et&&((i=Zl[n=233*Yl+100])?(Yl=i.i,n=i.result):(i=Yl,(s=Zl[o=233*Yl+101])?(Yl=s.i,o=s.result):(l=s=Yl,e.substr(Yl,5)===gr?(c=gr,Yl+=5):(c=et,0===Wl&&u(Xs)),c!==et?(e.substr(Yl,2)===yr?(h=yr,Yl+=2):(h=et,0===Wl&&u(_s)),h!==et?l=c=[c,h]:(Yl=l,l=et)):(Yl=l,l=et),l!==et&&(Ql=s,l="child"),(s=l)===et&&(l=s=Yl,e.substr(Yl,10)===wr?(c=wr,Yl+=10):(c=et,0===Wl&&u(Ls)),c!==et?(e.substr(Yl,2)===yr?(h=yr,Yl+=2):(h=et,0===Wl&&u(_s)),h!==et?l=c=[c,h]:(Yl=l,l=et)):(Yl=l,l=et),l!==et&&(Ql=s,l="descendant"),(s=l)===et&&(l=s=Yl,e.substr(Yl,9)===Ar?(c=Ar,Yl+=9):(c=et,0===Wl&&u(ks)),c!==et?(e.substr(Yl,2)===yr?(h=yr,Yl+=2):(h=et,0===Wl&&u(_s)),h!==et?l=c=[c,h]:(Yl=l,l=et)):(Yl=l,l=et),l!==et&&(Ql=s,l="attribute"),(s=l)===et&&(l=s=Yl,e.substr(Yl,4)===xr?(c=xr,Yl+=4):(c=et,0===Wl&&u(qs)),c!==et?(e.substr(Yl,2)===yr?(h=yr,Yl+=2):(h=et,0===Wl&&u(_s)),h!==et?l=c=[c,h]:(Yl=l,l=et)):(Yl=l,l=et),l!==et&&(Ql=s,l="self"),(s=l)===et&&(l=s=Yl,e.substr(Yl,18)===br?(c=br,Yl+=18):(c=et,0===Wl&&u(Vs)),c!==et?(e.substr(Yl,2)===yr?(h=yr,Yl+=2):(h=et,0===Wl&&u(_s)),h!==et?l=c=[c,h]:(Yl=l,l=et)):(Yl=l,l=et),l!==et&&(Ql=s,l="descendant-or-self"),(s=l)===et&&(l=s=Yl,e.substr(Yl,17)===Er?(c=Er,Yl+=17):(c=et,0===Wl&&u(Ys)),c!==et?(e.substr(Yl,2)===yr?(h=yr,Yl+=2):(h=et,0===Wl&&u(_s)),h!==et?l=c=[c,h]:(Yl=l,l=et)):(Yl=l,l=et),l!==et&&(Ql=s,l="following-sibling"),(s=l)===et&&(l=s=Yl,e.substr(Yl,9)===Br?(c=Br,Yl+=9):(c=et,0===Wl&&u(Qs)),c!==et?(e.substr(Yl,2)===yr?(h=yr,Yl+=2):(h=et,0===Wl&&u(_s)),h!==et?l=c=[c,h]:(Yl=l,l=et)):(Yl=l,l=et),l!==et&&(Ql=s,l="following"),s=l)))))),Zl[o]={i:Yl,result:s},o=s),o!==et?(s=z())!==et?(Ql=i,i=["stepExpr",["xpathAxis",o],s]):(Yl=i,i=et):(Yl=i,i=et),i===et&&((o=Zl[i=233*Yl+102])?(Yl=o.i,i=o.result):(o=Yl,64===e.charCodeAt(Yl)?(s=Nr,Yl++):(s=et,0===Wl&&u(Js)),s===et&&(s=null),(l=z())!==et?(Ql=o,o=s||"attributeTest"===l[0]||"schemaAttributeTest"===l[0]?["stepExpr",["xpathAxis","attribute"],l]:["stepExpr",["xpathAxis","child"],l]):(Yl=o,o=et),Zl[i]={i:Yl,result:o},i=o)),Zl[n]={i:Yl,result:i},n=i)),n!==et){if(o=Zl[i=233*Yl+110])Yl=o.i,i=o.result;else{for(o=Yl,s=[],l=Yl,He(),(c=Z())!==et?(Ql=l,l=c):(Yl=l,l=et);l!==et;)s.push(l),l=Yl,He(),(c=Z())!==et?(Ql=l,l=c):(Yl=l,l=et);Ql=o,o=s=s.length?["predicates"].concat(s):[],Zl[i]={i:Yl,result:o},i=o}Ql=a,a=0===i.length?n:n.concat([i])}else Yl=a,a=et;Zl[t]={i:Yl,result:a},t=a}return Zl[r]={i:Yl,result:t},t}function K(){var t,n=233*Yl+96;if(t=Zl[n])return Yl=t.i,t.result;if(t=Yl,e.substr(Yl,2)===vr){var r=vr;Yl+=2}else r=et,0===Wl&&u(js);return r!==et&&(Ql=t,r=["stepExpr",["xpathAxis","descendant-or-self"],["anyKindTest"]]),t=r,Zl[n]={i:Yl,result:t},t}function z(){var t,n,r,a=233*Yl+106;if(t=Zl[a])return Yl=t.i,t.result;if((t=we())===et)if(n=Zl[t=233*Yl+107])Yl=n.i,t=n.result;else{if(r=Zl[n=233*Yl+108])Yl=r.i,n=r.result;else{if(r=Yl,e.substr(Yl,2)===Dr){var i=Dr;Yl+=2}else i=et,0===Wl&&u(tu);if(i!==et){var o=Me();o!==et?(Ql=r,r=["Wildcard",["star"],["NCName",o]]):(Yl=r,r=et)}else Yl=r,r=et;r===et&&(r=Yl,42===e.charCodeAt(Yl)?(i=Un,Yl++):(i=et,0===Wl&&u(ns)),i!==et&&(Ql=r,i=["Wildcard"]),(r=i)===et&&(r=Yl,(i=Te())!==et?(42===e.charCodeAt(Yl)?(o=Un,Yl++):(o=et,0===Wl&&u(ns)),o!==et?(Ql=r,r=["Wildcard",["uri",i],["star"]]):(Yl=r,r=et)):(Yl=r,r=et),r===et&&(r=Yl,(i=Me())!==et?(e.substr(Yl,2)===Mr?(o=Mr,Yl+=2):(o=et,0===Wl&&u(nu)),o!==et?(Ql=r,r=["Wildcard",["NCName",i],["star"]]):(Yl=r,r=et)):(Yl=r,r=et)))),Zl[n]={i:Yl,result:r},n=r}n===et&&(n=Yl,(r=Be())!==et&&(Ql=n,r=["nameTest"].concat(r)),n=r),Zl[t]={i:Yl,result:n},t=n}return Zl[a]={i:Yl,result:t},t}function W(){var t,n=233*Yl+109;if(t=Zl[n])return Yl=t.i,t.result;if(t=Yl,40===e.charCodeAt(Yl)){var r=zt;Yl++}else r=et,0===Wl&&u(yo);if(r!==et){He(),r=Yl;var a=oe();if(a!==et){var i=[],o=Yl;if(He(),44===e.charCodeAt(Yl)){var s=Tt;Yl++}else s=et,0===Wl&&u(Ji);for(s!==et?(He(),(s=oe())!==et?(Ql=o,o=s):(Yl=o,o=et)):(Yl=o,o=et);o!==et;)i.push(o),o=Yl,He(),44===e.charCodeAt(Yl)?(s=Tt,Yl++):(s=et,0===Wl&&u(Ji)),s!==et?(He(),(s=oe())!==et?(Ql=o,o=s):(Yl=o,o=et)):(Yl=o,o=et);Ql=r,r=[a].concat(i)}else Yl=r,r=et;r===et&&(r=null),He(),41===e.charCodeAt(Yl)?(i=Wt,Yl++):(i=et,0===Wl&&u(wo)),i!==et?(Ql=t,t=r||[]):(Yl=t,t=et)}else Yl=t,t=et;return Zl[n]={i:Yl,result:t},t}function Z(){var t,n=233*Yl+111;if(t=Zl[n])return Yl=t.i,t.result;if(t=Yl,91===e.charCodeAt(Yl)){var r=Gr;Yl++}else r=et,0===Wl&&u(ru);if(r!==et)if(He(),(r=C())!==et){if(He(),93===e.charCodeAt(Yl)){var a=Ur;Yl++}else a=et,0===Wl&&u(au);a!==et?(Ql=t,t=r):(Yl=t,t=et)}else Yl=t,t=et;else Yl=t,t=et;return Zl[n]={i:Yl,result:t},t}function $(){var t,n=233*Yl+112;if(t=Zl[n])return Yl=t.i,t.result;if(t=Yl,63===e.charCodeAt(Yl)){var r=Fr;Yl++}else r=et,0===Wl&&u(iu);return r!==et?(He(),(r=ee())!==et?(Ql=t,t="*"===r?["lookup",["star"]]:"string"==typeof r?["lookup",["NCName",r]]:["lookup",r]):(Yl=t,t=et)):(Yl=t,t=et),Zl[n]={i:Yl,result:t},t}function ee(){var t,n=233*Yl+113;return(t=Zl[n])?(Yl=t.i,t.result):((t=Me())===et&&((t=Ne())===et&&((t=ie())===et&&(42===e.charCodeAt(Yl)?(t=Un,Yl++):(t=et,0===Wl&&u(ns))))),Zl[n]={i:Yl,result:t},t)}function te(){var e,t=233*Yl+114;if(e=Zl[t])return Yl=e.i,e.result;e=Yl;var n=Be();return n!==et&&(Ql=e,n=["EQName"].concat(n)),(e=n)===et&&((e=ae())===et&&(e=ie())),Zl[t]={i:Yl,result:e},e}function ne(){var t=233*Yl+115,n=Zl[t];if(n)return Yl=n.i,n.result;var r=re();if(r===et&&((r=ae())===et&&(r=ie())===et)){var a=233*Yl+120,i=Zl[a];if(i)Yl=i.i,r=i.result;else{var o=Yl;if(46===e.charCodeAt(Yl)){var s=Pr;Yl++}else s=et,0===Wl&&u(su);if(s!==et){var l=Yl;if(Wl++,46===e.charCodeAt(Yl)){var c=Pr;Yl++}else c=et,0===Wl&&u(su);Wl--,c===et?l=void 0:(Yl=l,l=et),l!==et?(Ql=o,o=["contextItemExpr"]):(Yl=o,o=et)}else Yl=o,o=et;Zl[a]={i:Yl,result:o},r=o}if(r===et){var h,p=233*Yl+121,f=Zl[p];if(f)Yl=f.i,r=f.result;else{var d=h=Yl;Wl++;var m=Yl,v=Ve();if(v!==et){var g=He();if(40===e.charCodeAt(Yl)){var y=zt;Yl++}else y=et,0===Wl&&u(yo);y!==et?m=v=[v,g,y]:(Yl=m,m=et)}else Yl=m,m=et;Wl--,m===et?d=void 0:(Yl=d,d=et),d!==et?(m=Be())!==et?(He(),(g=W())!==et?(Ql=h,h=["functionCallExpr",["functionName"].concat(m),["arguments"].concat(g)]):(Yl=h,h=et)):(Yl=h,h=et):(Yl=h,h=et),Zl[p]={i:Yl,result:h},r=h}if(r===et){var A=233*Yl+124,b=Zl[A];if(b)Yl=b.i,r=b.result;else{var N=se();if(N===et){var I=233*Yl+140,O=Zl[I];if(O)Yl=O.i,N=O.result;else{var S=233*Yl+141,R=Zl[S];if(R){Yl=R.i;var D=R.result}else{var M=Yl;if(e.substr(Yl,8)===zr){var G=zr;Yl+=8}else G=et,0===Wl&&u(Au);if(G!==et){He();var U=B();U!==et?(Ql=M,M=U?["computedDocumentConstructor",["argExpr",U]]:["computedDocumentConstructor"]):(Yl=M,M=et)}else Yl=M,M=et;Zl[S]={i:Yl,result:M},D=M}if(D===et){var F=233*Yl+142,P=Zl[F];if(P)Yl=P.i,D=P.result;else{var H=Yl;if(e.substr(Yl,7)===Yt){var j=Yt;Yl+=7}else j=et,0===Wl&&u(fo);if(j!==et){He();var X=Yl,_=Be();if(_!==et&&(Ql=X,_=["tagName"].concat(_)),(X=_)===et)if(X=Yl,123===e.charCodeAt(Yl)?(_=on,Yl++):(_=et,0===Wl&&u(To)),_!==et){He();var L=C();if(L!==et){if(He(),125===e.charCodeAt(Yl)){var k=sn;Yl++}else k=et,0===Wl&&u(Io);k!==et?(Ql=X,X=["tagNameExpr",L]):(Yl=X,X=et)}else Yl=X,X=et}else Yl=X,X=et;if(X!==et){He();var q=233*Yl+143,V=Zl[q];if(V){Yl=V.i;var Y=V.result}else{var Q=Yl,J=B();J!==et&&(Ql=Q,J=J?[["contentExpr",J]]:[]),Q=J,Zl[q]={i:Yl,result:Q},Y=Q}Y!==et?(Ql=H,H=["computedElementConstructor",X].concat(Y)):(Yl=H,H=et)}else Yl=H,H=et}else Yl=H,H=et;Zl[F]={i:Yl,result:H},D=H}if(D===et){var K=233*Yl+144,z=Zl[K];if(z)Yl=z.i,D=z.result;else{var Z=Yl;if(e.substr(Yl,9)===Ar){var $=Ar;Yl+=9}else $=et,0===Wl&&u(ks);if($!==et){var te=Yl;if(Ye()!==et){He();var ne=Be();ne!==et?(Ql=te,te=["tagName"].concat(ne)):(Yl=te,te=et)}else Yl=te,te=et;if(te===et){if(te=Yl,He(),123===e.charCodeAt(Yl)){var oe=on;Yl++}else oe=et,0===Wl&&u(To);if(oe!==et){He();var ue=C();if(ue!==et){if(He(),125===e.charCodeAt(Yl)){var le=sn;Yl++}else le=et,0===Wl&&u(Io);le!==et?(Ql=te,te=["tagNameExpr",ue]):(Yl=te,te=et)}else Yl=te,te=et}else Yl=te,te=et}te!==et?(He(),(oe=B())!==et?(Ql=Z,Z=["computedAttributeConstructor",te].concat([["valueExpr",oe||["sequenceExpr"]]])):(Yl=Z,Z=et)):(Yl=Z,Z=et)}else Yl=Z,Z=et;Zl[K]={i:Yl,result:Z},D=Z}if(D===et){var ce=233*Yl+145,he=Zl[ce];if(he)Yl=he.i,D=he.result;else{var pe=Yl;if(e.substr(Yl,9)===ut){var de=ut;Yl+=9}else de=et,0===Wl&&u(Oi);if(de!==et){He();var me=233*Yl+146,ge=Zl[me];if(ge){Yl=ge.i;var ye=ge.result}else{var we=Yl,Ae=Me();Ae!==et&&(Ql=we,Ae=["prefix",Ae]),we=Ae,Zl[me]={i:Yl,result:we},ye=we}if(ye===et){var xe=233*Yl+147,be=Zl[xe];if(be)Yl=be.i,ye=be.result;else{var Ee=Yl,Ce=B();Ce!==et&&(Ql=Ee,Ce=Ce?[["prefixExpr",Ce]]:[]),Ee=Ce,Zl[xe]={i:Yl,result:Ee},ye=Ee}}if(ye!==et){He();var Te=233*Yl+148,Ie=Zl[Te];if(Ie){Yl=Ie.i;var Oe=Ie.result}else{var Se=Yl,Re=B();Re!==et&&(Ql=Se,Re=Re?[["URIExpr",Re]]:[]),Se=Re,Zl[Te]={i:Yl,result:Se},Oe=Se}Oe!==et?(Ql=pe,pe=["computedNamespaceConstructor"].concat(ye,Oe)):(Yl=pe,pe=et)}else Yl=pe,pe=et}else Yl=pe,pe=et;Zl[ce]={i:Yl,result:pe},D=pe}if(D===et){var De=233*Yl+149,Ge=Zl[De];if(Ge)Yl=Ge.i,D=Ge.result;else{var Ue=Yl;if(e.substr(Yl,4)===Wr){var Fe=Wr;Yl+=4}else Fe=et,0===Wl&&u(xu);if(Fe!==et){He();var Pe=B();Pe!==et?(Ql=Ue,Ue=["computedTextConstructor"].concat(Pe?[["argExpr",Pe]]:[])):(Yl=Ue,Ue=et)}else Yl=Ue,Ue=et;Zl[De]={i:Yl,result:Ue},D=Ue}if(D===et){var Xe=233*Yl+150,_e=Zl[Xe];if(_e)Yl=_e.i,D=_e.result;else{var Le=Yl;if(e.substr(Yl,7)===Zr){var ke=Zr;Yl+=7}else ke=et,0===Wl&&u(bu);if(ke!==et){He();var qe=B();qe!==et?(Ql=Le,Le=["computedCommentConstructor"].concat(qe?[["argExpr",qe]]:[])):(Yl=Le,Le=et)}else Yl=Le,Le=et;Zl[Xe]={i:Yl,result:Le},D=Le}if(D===et){var Qe=233*Yl+151,Je=Zl[Qe];if(Je)Yl=Je.i,D=Je.result;else{var Ke=Yl;if(e.substr(Yl,22)===$r){var ze=$r;Yl+=22}else ze=et,0===Wl&&u(Eu);if(ze!==et){He();var We=Yl,Ze=Me();if(Ze!==et&&(Ql=We,Ze=["piTarget",Ze]),(We=Ze)===et)if(We=Yl,123===e.charCodeAt(Yl)?(Ze=on,Yl++):(Ze=et,0===Wl&&u(To)),Ze!==et){He();var $e=C();if($e!==et){if(He(),125===e.charCodeAt(Yl)){var tt=sn;Yl++}else tt=et,0===Wl&&u(Io);tt!==et?(Ql=We,We=["piTargetExpr",$e]):(Yl=We,We=et)}else Yl=We,We=et}else Yl=We,We=et;if(We!==et){He();var nt=B();nt!==et?(Ql=Ke,Ke=["computedPIConstructor",We].concat(nt?[["piValueExpr",nt]]:[])):(Yl=Ke,Ke=et)}else Yl=Ke,Ke=et}else Yl=Ke,Ke=et;Zl[Qe]={i:Yl,result:Ke},D=Ke}}}}}}}Zl[I]={i:Yl,result:D},N=D}}Zl[A]={i:Yl,result:N},r=N}if(r===et){var rt=233*Yl+152,at=Zl[rt];if(at)Yl=at.i,r=at.result;else{var it=233*Yl+153,ot=Zl[it];if(ot){Yl=ot.i;var st=ot.result}else{var lt=Yl,ct=Be();if(ct!==et){if(35===e.charCodeAt(Yl)){var ht=ea;Yl++}else ht=et,0===Wl&&u(Bu);if(ht!==et){var pt=Ne();pt!==et?(Ql=lt,lt=["namedFunctionRef",["functionName"].concat(ct),pt]):(Yl=lt,lt=et)}else Yl=lt,lt=et}else Yl=lt,lt=et;Zl[it]={i:Yl,result:lt},st=lt}if(st===et){var ft,dt=233*Yl+154,mt=Zl[dt];if(mt)Yl=mt.i,st=mt.result;else{var vt=Yl,gt=[];for(ft=w();ft!==et;)gt.push(ft),ft=w();if(He(),e.substr(Yl,8)===Qt){var yt=Qt;Yl+=8}else yt=et,0===Wl&&u(mo);if(yt!==et){if(He(),40===e.charCodeAt(Yl)){var wt=zt;Yl++}else wt=et,0===Wl&&u(yo);if(wt!==et){He();var At=x();if(At===et&&(At=null),He(),41===e.charCodeAt(Yl)){var xt=Wt;Yl++}else xt=et,0===Wl&&u(wo);if(xt!==et){He();var bt=Yl;if(e.substr(Yl,2)===an){var Et=an;Yl+=2}else Et=et,0===Wl&&u(Co);if(Et!==et)if(je()!==et){var Bt=ve();Bt!==et?(He(),Ql=bt,bt=["typeDeclaration"].concat(Bt)):(Yl=bt,bt=et)}else Yl=bt,bt=et;else Yl=bt,bt=et;bt===et&&(bt=null),(Et=E())!==et?(Ql=vt,vt=["inlineFunctionExpr"].concat(gt,[["paramList"].concat(At||[])],bt?[bt]:[],[["functionBody",Et]])):(Yl=vt,vt=et)}else Yl=vt,vt=et}else Yl=vt,vt=et}else Yl=vt,vt=et;Zl[dt]={i:Yl,result:vt},st=vt}}Zl[rt]={i:Yl,result:st},r=st}if(r===et){var Nt=233*Yl+155,Ct=Zl[Nt];if(Ct)Yl=Ct.i,r=Ct.result;else{var It=Yl;if(e.substr(Yl,3)===ta){var Ot=ta;Yl+=3}else Ot=et,0===Wl&&u(Nu);if(Ot!==et){if(He(),123===e.charCodeAt(Yl)){var St=on;Yl++}else St=et,0===Wl&&u(To);if(St!==et){He();var Rt=Yl,Dt=fe();if(Dt!==et){var Mt=[],Gt=Yl;if(He(),44===e.charCodeAt(Yl)){var Ut=Tt;Yl++}else Ut=et,0===Wl&&u(Ji);if(Ut!==et){He();var Ft=fe();Ft!==et?(Ql=Gt,Gt=Ft):(Yl=Gt,Gt=et)}else Yl=Gt,Gt=et;for(;Gt!==et;)Mt.push(Gt),Gt=Yl,He(),44===e.charCodeAt(Yl)?(Ut=Tt,Yl++):(Ut=et,0===Wl&&u(Ji)),Ut!==et?(He(),(Ft=fe())!==et?(Ql=Gt,Gt=Ft):(Yl=Gt,Gt=et)):(Yl=Gt,Gt=et);Ql=Rt,Rt=[Dt].concat(Mt)}else Yl=Rt,Rt=et;Rt===et&&(Rt=null),He(),125===e.charCodeAt(Yl)?(Mt=sn,Yl++):(Mt=et,0===Wl&&u(Io)),Mt!==et?(Ql=It,It=Rt?["mapConstructor"].concat(Rt):["mapConstructor"]):(Yl=It,It=et)}else Yl=It,It=et}else Yl=It,It=et;Zl[Nt]={i:Yl,result:It},r=It}if(r===et){var Pt=233*Yl+159,Ht=Zl[Pt];if(Ht)Yl=Ht.i,r=Ht.result;else{var jt=Yl,Xt=233*Yl+160,_t=Zl[Xt];if(_t){Yl=_t.i;var Lt=_t.result}else{var kt=Yl;if(91===e.charCodeAt(Yl)){var qt=Gr;Yl++}else qt=et,0===Wl&&u(ru);if(qt!==et){He();var Vt=Yl,Jt=T();if(Jt!==et){He();var Kt=[],Zt=Yl;if(44===e.charCodeAt(Yl)){var $t=Tt;Yl++}else $t=et,0===Wl&&u(Ji);if($t!==et){He();var en=T();en!==et?(Ql=Zt,Zt=en):(Yl=Zt,Zt=et)}else Yl=Zt,Zt=et;for(;Zt!==et;)Kt.push(Zt),Zt=Yl,44===e.charCodeAt(Yl)?($t=Tt,Yl++):($t=et,0===Wl&&u(Ji)),$t!==et?(He(),(en=T())!==et?(Ql=Zt,Zt=en):(Yl=Zt,Zt=et)):(Yl=Zt,Zt=et);Ql=Vt,Vt=function(e,t){return[e].concat(t).map((function(e){return["arrayElem",e]}))}(Jt,Kt)}else Yl=Vt,Vt=et;if(Vt===et&&(Vt=null),He(),93===e.charCodeAt(Yl)){var tn=Ur;Yl++}else tn=et,0===Wl&&u(au);tn!==et?(Ql=kt,kt=["squareArray"].concat(Vt)):(Yl=kt,kt=et)}else Yl=kt,kt=et;Zl[Xt]={i:Yl,result:kt},Lt=kt}if(Lt!==et&&(Ql=jt,Lt=["arrayConstructor",Lt]),(jt=Lt)===et){jt=Yl;var nn=233*Yl+161,rn=Zl[nn];if(rn)Yl=rn.i,Lt=rn.result;else{var un=Yl;if(e.substr(Yl,5)===ra){var ln=ra;Yl+=5}else ln=et,0===Wl&&u(Tu);if(ln!==et){He();var cn=B();cn!==et?(Ql=un,un=["curlyArray"].concat(cn?[["arrayElem",cn]]:[])):(Yl=un,un=et)}else Yl=un,un=et;Zl[nn]={i:Yl,result:un},Lt=un}Lt!==et&&(Ql=jt,Lt=["arrayConstructor",Lt]),jt=Lt}Zl[Pt]={i:Yl,result:jt},r=jt}if(r===et){var hn=233*Yl+162,pn=Zl[hn];if(pn)Yl=pn.i,r=pn.result;else{var fn=Yl;if(63===e.charCodeAt(Yl)){var dn=Fr;Yl++}else dn=et,0===Wl&&u(iu);if(dn!==et){He();var mn=ee();mn!==et?(Ql=fn,fn="*"===mn?["unaryLookup",["star"]]:"string"==typeof mn?["unaryLookup",["NCName",mn]]:["unaryLookup",mn]):(Yl=fn,fn=et)}else Yl=fn,fn=et;Zl[hn]={i:Yl,result:fn},r=fn}}}}}}}}return Zl[t]={i:Yl,result:r},r}function re(){var t,n,r,a,i=233*Yl+116;if(t=Zl[i])return Yl=t.i,t.result;if(n=Zl[t=233*Yl+117])Yl=n.i,t=n.result;else{var o;n=Yl;var s=233*Yl+195;if(r=Zl[s])Yl=r.i,s=r.result;else{var l=o=a=r=Yl;if(46===e.charCodeAt(Yl)){var c=Pr;Yl++}else c=et,0===Wl&&u(su);if(c!==et){var h=Ue();h!==et?l=c=[c,h]:(Yl=l,l=et)}else Yl=l,l=et;if(l===et)if(l=Yl,(c=Ue())!==et){if(h=Yl,46===e.charCodeAt(Yl)){var p=Pr;Yl++}else p=et,0===Wl&&u(su);if(p!==et){for(l=[],si.test(e.charAt(Yl))?(h=e.charAt(Yl),Yl++):(h=et,0===Wl&&u(_u));h!==et;)l.push(h),si.test(e.charAt(Yl))?(h=e.charAt(Yl),Yl++):(h=et,0===Wl&&u(_u));h=p=[p,l]}else Yl=h,h=et;h===et&&(h=null),l=c=[c,h]}else Yl=l,l=et;l!==et?(ui.test(e.charAt(Yl))?(c=e.charAt(Yl),Yl++):(c=et,0===Wl&&u(Lu)),c!==et?(li.test(e.charAt(Yl))?(h=e.charAt(Yl),Yl++):(h=et,0===Wl&&u(ku)),h===et&&(h=null),(p=Ue())!==et?o=l=[l,c,h,p]:(Yl=o,o=et)):(Yl=o,o=et)):(Yl=o,o=et),(a=o!==et?e.substring(a,Yl):o)!==et&&(Ql=r,a=["doubleConstantExpr",["value",a]]),r=a,Zl[s]={i:Yl,result:r},s=r}s===et&&((r=Zl[s=233*Yl+194])?(Yl=r.i,s=r.result):(p=a=r=Yl,46===e.charCodeAt(Yl)?(o=Pr,Yl++):(o=et,0===Wl&&u(su)),o!==et?(c=Ue())!==et?p=o=[o,c]:(Yl=p,p=et):(Yl=p,p=et),(a=p!==et?e.substring(a,Yl):p)!==et&&(Ql=r,a=["decimalConstantExpr",["value",a]]),(r=a)===et&&(p=a=r=Yl,(o=Ue())!==et?(46===e.charCodeAt(Yl)?(c=Pr,Yl++):(c=et,0===Wl&&u(su)),c!==et?((p=Ue())===et&&(p=null),p=o=[o,c,p]):(Yl=p,p=et)):(Yl=p,p=et),(a=p!==et?e.substring(a,Yl):p)!==et&&(Ql=r,a=["decimalConstantExpr",["value",a]]),r=a),Zl[s]={i:Yl,result:r},s=r),s===et&&(s=Ne())),s!==et?(r=Yl,Wl++,oi.test(e.charAt(Yl))?(a=e.charAt(Yl),Yl++):(a=et,0===Wl&&u(ou)),Wl--,a===et?r=void 0:(Yl=r,r=et),r!==et?(Ql=n,n=s):(Yl=n,n=et)):(Yl=n,n=et),Zl[t]={i:Yl,result:n},t=n}return t===et&&(t=Yl,(n=Ce())!==et&&(Ql=t,n=["stringConstantExpr",["value",Ke(n)]]),t=n),Zl[i]={i:Yl,result:t},t}function ae(){var t,n=233*Yl+118;if(t=Zl[n])return Yl=t.i,t.result;if(t=Yl,36===e.charCodeAt(Yl)){var r=$t;Yl++}else r=et,0===Wl&&u(xo);return r!==et?(r=Be())!==et?(Ql=t,t=["varRef",["name"].concat(r)]):(Yl=t,t=et):(Yl=t,t=et),Zl[n]={i:Yl,result:t},t}function ie(){var t,n=233*Yl+119;if(t=Zl[n])return Yl=t.i,t.result;if(t=Yl,40===e.charCodeAt(Yl)){var r=zt;Yl++}else r=et,0===Wl&&u(yo);if(r!==et)if(He(),(r=C())!==et){if(He(),41===e.charCodeAt(Yl)){var a=Wt;Yl++}else a=et,0===Wl&&u(wo);a!==et?(Ql=t,t=r):(Yl=t,t=et)}else Yl=t,t=et;else Yl=t,t=et;return t===et&&(t=Yl,40===e.charCodeAt(Yl)?(r=zt,Yl++):(r=et,0===Wl&&u(yo)),r!==et?(He(),41===e.charCodeAt(Yl)?(r=Wt,Yl++):(r=et,0===Wl&&u(wo)),r!==et?(Ql=t,t=["sequenceExpr"]):(Yl=t,t=et)):(Yl=t,t=et)),Zl[n]={i:Yl,result:t},t}function oe(){var t,n,r=233*Yl+122;if(t=Zl[r])return Yl=t.i,t.result;if((t=T())===et)if(n=Zl[t=233*Yl+123])Yl=n.i,t=n.result;else{if(n=Yl,63===e.charCodeAt(Yl)){var a=Fr;Yl++}else a=et,0===Wl&&u(iu);a!==et&&(Ql=n,a=["argumentPlaceholder"]),n=a,Zl[t]={i:Yl,result:n},t=n}return Zl[r]={i:Yl,result:t},t}function se(){var t,n,r,a=233*Yl+125;if(t=Zl[a])return Yl=t.i,t.result;if(n=Zl[t=233*Yl+126])Yl=n.i,t=n.result;else{if(n=Yl,60===e.charCodeAt(Yl)){var i=zn;Yl++}else i=et,0===Wl&&u(gs);if(i!==et)if((i=De())!==et){var o=233*Yl+127;if(r=Zl[o])Yl=r.i,o=r.result;else{r=Yl;var s=[],l=Yl,c=Xe();for(c!==et?((c=ue())===et&&(c=null),Ql=l,l=c):(Yl=l,l=et);l!==et;)s.push(l),l=Yl,(c=Xe())!==et?((c=ue())===et&&(c=null),Ql=l,l=c):(Yl=l,l=et);Ql=r,r=s=s.filter(Boolean),Zl[o]={i:Yl,result:r},o=r}if(s=Yl,e.substr(Yl,2)===Hr?(r=Hr,Yl+=2):(r=et,0===Wl&&u(uu)),r!==et&&(Ql=s,r=null),(s=r)===et)if(s=Yl,62===e.charCodeAt(Yl)?(r=Zn,Yl++):(r=et,0===Wl&&u(ws)),r!==et){for(r=[],l=he();l!==et;)r.push(l),l=he();He(),e.substr(Yl,2)===jr?(l=jr,Yl+=2):(l=et,0===Wl&&u(lu)),l!==et?(l=De())!==et?(Xe(),62===e.charCodeAt(Yl)?(c=Zn,Yl++):(c=et,0===Wl&&u(ws)),c!==et?(Ql=s,(s=1===i.length?i[0]:i[0].prefix+":"+i[1])!==(l=1===l.length?l[0]:l[0].prefix+":"+l[1])&&Ze("XQST0118",'The start and the end tag of an element constructor must be equal. "'+s+'" does not match "'+l+'"'),s=ze(r,!0,!0)):(Yl=s,s=et)):(Yl=s,s=et):(Yl=s,s=et)}else Yl=s,s=et;s!==et?(Ql=n,n=["elementConstructor",["tagName"].concat(i)].concat(o.length?[["attributeList"].concat(o)]:[],s&&s.length?[["elementContent"].concat(s)]:[])):(Yl=n,n=et)}else Yl=n,n=et;else Yl=n,n=et;Zl[t]={i:Yl,result:n},t=n}if(t===et){if(n=Zl[t=233*Yl+134])Yl=n.i,t=n.result;else{if(n=Yl,e.substr(Yl,4)===qr?(i=qr,Yl+=4):(i=et,0===Wl&&u(du)),i!==et){if(i=Yl,r=Zl[o=233*Yl+135])Yl=r.i;else{if(r=[],l=s=Yl,Wl++,45===e.charCodeAt(Yl)?(c=Mn,Yl++):(c=et,0===Wl&&u(es)),Wl--,c===et?l=void 0:(Yl=l,l=et),l!==et?(c=Ge())!==et?s=l=[l,c]:(Yl=s,s=et):(Yl=s,s=et),s===et)if(s=Yl,45===e.charCodeAt(Yl)?(l=Mn,Yl++):(l=et,0===Wl&&u(es)),l!==et){var h=c=Yl;if(Wl++,45===e.charCodeAt(Yl)){var p=Mn;Yl++}else p=et,0===Wl&&u(es);Wl--,p===et?h=void 0:(Yl=h,h=et),h!==et?(p=Ge())!==et?c=h=[h,p]:(Yl=c,c=et):(Yl=c,c=et),c!==et?s=l=[l,c]:(Yl=s,s=et)}else Yl=s,s=et;for(;s!==et;)r.push(s),l=s=Yl,Wl++,45===e.charCodeAt(Yl)?(c=Mn,Yl++):(c=et,0===Wl&&u(es)),Wl--,c===et?l=void 0:(Yl=l,l=et),l!==et?(c=Ge())!==et?s=l=[l,c]:(Yl=s,s=et):(Yl=s,s=et),s===et&&(s=Yl,45===e.charCodeAt(Yl)?(l=Mn,Yl++):(l=et,0===Wl&&u(es)),l!==et?(h=c=Yl,Wl++,45===e.charCodeAt(Yl)?(p=Mn,Yl++):(p=et,0===Wl&&u(es)),Wl--,p===et?h=void 0:(Yl=h,h=et),h!==et?(p=Ge())!==et?c=h=[h,p]:(Yl=c,c=et):(Yl=c,c=et),c!==et?s=l=[l,c]:(Yl=s,s=et)):(Yl=s,s=et));Zl[o]={i:Yl,result:r}}i=e.substring(i,Yl),e.substr(Yl,3)===Vr?(o=Vr,Yl+=3):(o=et,0===Wl&&u(mu)),o!==et?(Ql=n,n=["computedCommentConstructor",["argExpr",["stringConstantExpr",["value",i]]]]):(Yl=n,n=et)}else Yl=n,n=et;Zl[t]={i:Yl,result:n},t=n}if(t===et)if(n=Zl[t=233*Yl+136])Yl=n.i,t=n.result;else{if(n=Yl,e.substr(Yl,2)===Yr?(i=Yr,Yl+=2):(i=et,0===Wl&&u(vu)),i!==et){if(i=Yl,r=Zl[o=233*Yl+206])Yl=r.i,o=r.result;else{if(s=r=Yl,Wl++,l=Yl,88===e.charCodeAt(Yl)?(c=Ca,Yl++):(c=et,0===Wl&&u(sl)),c===et&&(120===e.charCodeAt(Yl)?(c=Ta,Yl++):(c=et,0===Wl&&u(ul))),c!==et?(77===e.charCodeAt(Yl)?(h=Ia,Yl++):(h=et,0===Wl&&u(ll)),h===et&&(109===e.charCodeAt(Yl)?(h=Oa,Yl++):(h=et,0===Wl&&u(cl))),h!==et?(76===e.charCodeAt(Yl)?(p=Sa,Yl++):(p=et,0===Wl&&u(hl)),p===et&&(108===e.charCodeAt(Yl)?(p=Ra,Yl++):(p=et,0===Wl&&u(pl))),p!==et?l=c=[c,h,p]:(Yl=l,l=et)):(Yl=l,l=et)):(Yl=l,l=et),Wl--,l===et?s=void 0:(Yl=s,s=et),s!==et){var f;if(c=Zl[l=233*Yl+230])Yl=c.i,l=c.result;else{if(h=c=Yl,(f=Zl[p=233*Yl+229])?(Yl=f.i,p=f.result):((f=Le())===et&&(58===e.charCodeAt(Yl)?(f=na,Yl++):(f=et,0===Wl&&u(Cu))),Zl[p]={i:Yl,result:f},p=f),p!==et){for(h=[],f=qe();f!==et;)h.push(f),f=qe();h=p=[p,h]}else Yl=h,h=et;c=h!==et?e.substring(c,Yl):h,Zl[l]={i:Yl,result:c},l=c}l!==et?r=s=[s,l]:(Yl=r,r=et)}else Yl=r,r=et;Zl[o]={i:Yl,result:r},o=r}if((i=o!==et?e.substring(i,Yl):o)!==et){if(o=Yl,(r=Xe())!==et){if(r=Yl,l=Zl[s=233*Yl+137])Yl=l.i;else{for(l=[],h=c=Yl,Wl++,e.substr(Yl,2)===Qr?(p=Qr,Yl+=2):(p=et,0===Wl&&u(gu)),Wl--,p===et?h=void 0:(Yl=h,h=et),h!==et?(p=Ge())!==et?c=h=[h,p]:(Yl=c,c=et):(Yl=c,c=et);c!==et;)l.push(c),h=c=Yl,Wl++,e.substr(Yl,2)===Qr?(p=Qr,Yl+=2):(p=et,0===Wl&&u(gu)),Wl--,p===et?h=void 0:(Yl=h,h=et),h!==et?(p=Ge())!==et?c=h=[h,p]:(Yl=c,c=et):(Yl=c,c=et);Zl[s]={i:Yl,result:l}}r=e.substring(r,Yl),Ql=o,o=r}else Yl=o,o=et;o===et&&(o=null),e.substr(Yl,2)===Qr?(r=Qr,Yl+=2):(r=et,0===Wl&&u(gu)),r!==et?(Ql=n,n=["computedPIConstructor",["piTarget",i],["piValueExpr",["stringConstantExpr",["value",o]]]]):(Yl=n,n=et)}else Yl=n,n=et}else Yl=n,n=et;Zl[t]={i:Yl,result:n},t=n}}return Zl[a]={i:Yl,result:t},t}function ue(){var t,n=233*Yl+128;if(t=Zl[n])return Yl=t.i,t.result;var r=Yl;if((t=De())!==et){if(Xe(),61===e.charCodeAt(Yl)){var a=lt;Yl++}else a=et,0===Wl&&u(Si);if(a!==et){var i;if(Xe(),i=Zl[a=233*Yl+129])Yl=i.i,a=i.result;else{if(i=Yl,34===e.charCodeAt(Yl)){var o=Xr;Yl++}else o=et,0===Wl&&u(cu);if(o!==et){o=[];var s=Oe();for(s===et&&(s=le());s!==et;)o.push(s),(s=Oe())===et&&(s=le());34===e.charCodeAt(Yl)?(s=Xr,Yl++):(s=et,0===Wl&&u(cu)),s!==et?(Ql=i,i=ze(o,!1,!1)):(Yl=i,i=et)}else Yl=i,i=et;if(i===et)if(i=Yl,39===e.charCodeAt(Yl)?(o=_r,Yl++):(o=et,0===Wl&&u(hu)),o!==et){for(o=[],(s=Se())===et&&(s=ce());s!==et;)o.push(s),(s=Se())===et&&(s=ce());39===e.charCodeAt(Yl)?(s=_r,Yl++):(s=et,0===Wl&&u(hu)),s!==et?(Ql=i,i=ze(o,!1,!1)):(Yl=i,i=et)}else Yl=i,i=et;Zl[a]={i:Yl,result:i},a=i}a!==et?(Ql=r,r=a,1===t.length&&"xmlns"===t[0]?(r.length&&"string"!=typeof r[0]&&Ze("XQST0022","A namespace declaration may not contain enclosed expressions"),r=["namespaceDeclaration",r.length?["uri",r[0]]:["uri"]]):"xmlns"===t[0].prefix?(r.length&&"string"!=typeof r[0]&&Ze("XQST0022","The namespace declaration for 'xmlns:"+t[1]+"' may not contain enclosed expressions"),r=["namespaceDeclaration",["prefix",t[1]],r.length?["uri",r[0]]:["uri"]]):r=["attributeConstructor",["attributeName"].concat(t),0===r.length?["attributeValue"]:1===r.length&&"string"==typeof r[0]?["attributeValue",r[0]]:["attributeValueExpr"].concat(r)]):(Yl=r,r=et)}else Yl=r,r=et}else Yl=r,r=et;return Zl[n]={i:Yl,result:r},r}function le(){var t,n,r=233*Yl+130;if(t=Zl[r])return Yl=t.i,t.result;t=Yl;var a=233*Yl+203;if(n=Zl[a])Yl=n.i,a=n.result;else{var i=n=Yl;if(Wl++,vi.test(e.charAt(Yl))){var o=e.charAt(Yl);Yl++}else o=et,0===Wl&&u(rl);Wl--,o===et?i=void 0:(Yl=i,i=et),i!==et?(o=Ge())!==et?(Ql=n,n=o):(Yl=n,n=et):(Yl=n,n=et),Zl[a]={i:Yl,result:n},a=n}return a!==et&&(Ql=t,a=a.replace(/[\x20\x0D\x0A\x09]/g," ")),(t=a)===et&&(t=pe()),Zl[r]={i:Yl,result:t},t}function ce(){var t,n,r=233*Yl+131;if(t=Zl[r])return Yl=t.i,t.result;t=Yl;var a=233*Yl+204;if(n=Zl[a])Yl=n.i,a=n.result;else{var i=n=Yl;if(Wl++,gi.test(e.charAt(Yl))){var o=e.charAt(Yl);Yl++}else o=et,0===Wl&&u(al);Wl--,o===et?i=void 0:(Yl=i,i=et),i!==et?(o=Ge())!==et?(Ql=n,n=o):(Yl=n,n=et):(Yl=n,n=et),Zl[a]={i:Yl,result:n},a=n}return a!==et&&(Ql=t,a=a.replace(/[\x20\x0D\x0A\x09]/g," ")),(t=a)===et&&(t=pe()),Zl[r]={i:Yl,result:t},t}function he(){var t,n,r=233*Yl+132;if(t=Zl[r])return Yl=t.i,t.result;t=Yl;var a=233*Yl+138;if(n=Zl[a])Yl=n.i,a=n.result;else{if(n=Yl,e.substr(Yl,9)===Jr){var i=Jr;Yl+=9}else i=et,0===Wl&&u(yu);if(i!==et){var o,s;i=Yl;var l=233*Yl+139;if(o=Zl[l])Yl=o.i;else{o=[];var c=s=Yl;if(Wl++,e.substr(Yl,3)===Kr){var h=Kr;Yl+=3}else h=et,0===Wl&&u(wu);for(Wl--,h===et?c=void 0:(Yl=c,c=et),c!==et?(h=Ge())!==et?s=c=[c,h]:(Yl=s,s=et):(Yl=s,s=et);s!==et;)o.push(s),c=s=Yl,Wl++,e.substr(Yl,3)===Kr?(h=Kr,Yl+=3):(h=et,0===Wl&&u(wu)),Wl--,h===et?c=void 0:(Yl=c,c=et),c!==et?(h=Ge())!==et?s=c=[c,h]:(Yl=s,s=et):(Yl=s,s=et);Zl[l]={i:Yl,result:o}}i=e.substring(i,Yl),e.substr(Yl,3)===Kr?(l=Kr,Yl+=3):(l=et,0===Wl&&u(wu)),l!==et?(Ql=n,n=["CDataSection",i]):(Yl=n,n=et)}else Yl=n,n=et;Zl[a]={i:Yl,result:n},a=n}return a!==et&&(Ql=t),(t=a)===et&&(t=Yl,(a=se())!==et&&(Ql=t),(t=a)===et&&(t=Yl,(a=pe())!==et&&(Ql=t),(t=a)===et&&(a=t=Yl,(i=Zl[n=233*Yl+202])?(Yl=i.i,n=i.result):(l=i=Yl,Wl++,mi.test(e.charAt(Yl))?(o=e.charAt(Yl),Yl++):(o=et,0===Wl&&u(nl)),Wl--,o===et?l=void 0:(Yl=l,l=et),l!==et?(o=Ge())!==et?i=l=[l,o]:(Yl=i,i=et):(Yl=i,i=et),Zl[n]={i:Yl,result:i},n=i),(a=n!==et?e.substring(a,Yl):n)!==et&&(Ql=t),t=a))),Zl[r]={i:Yl,result:t},t}function pe(){var t,n=233*Yl+133;if(t=Zl[n])return Yl=t.i,t.result;if((t=Ie())===et&&(t=Re())===et){if(t=Yl,e.substr(Yl,2)===Lr){var r=Lr;Yl+=2}else r=et,0===Wl&&u(pu);r!==et&&(Ql=t,r="{"),(t=r)===et&&(t=Yl,e.substr(Yl,2)===kr?(r=kr,Yl+=2):(r=et,0===Wl&&u(fu)),r!==et&&(Ql=t,r="}"),(t=r)===et&&(t=Yl,(r=B())!==et&&(Ql=t,r=r||["sequenceExpr"]),t=r))}return Zl[n]={i:Yl,result:t},t}function fe(){var t,n,r=233*Yl+156;if(t=Zl[r])return Yl=t.i,t.result;t=Yl;var a=233*Yl+157;if(n=Zl[a])Yl=n.i,a=n.result;else{n=Yl;var i=T();i!==et&&(Ql=n,i=["mapKeyExpr",i]),n=i,Zl[a]={i:Yl,result:n},a=n}if(a!==et)if(He(),58===e.charCodeAt(Yl)?(n=na,Yl++):(n=et,0===Wl&&u(Cu)),n!==et){if(He(),i=Zl[n=233*Yl+158])Yl=i.i,n=i.result;else{i=Yl;var o=T();o!==et&&(Ql=i,o=["mapValueExpr",o]),i=o,Zl[n]={i:Yl,result:i},n=i}n!==et?(Ql=t,t=["mapConstructorEntry",a,n]):(Yl=t,t=et)}else Yl=t,t=et;else Yl=t,t=et;return Zl[r]={i:Yl,result:t},t}function de(){var t,n=233*Yl+163;if(t=Zl[n])return Yl=t.i,t.result;t=Yl;var r=Be();if(r!==et){if(63===e.charCodeAt(Yl)){var a=Fr;Yl++}else a=et,0===Wl&&u(iu);a===et&&(a=null),Ql=t,t=a?["singleType",["atomicType"].concat(r),["optional"]]:["singleType",["atomicType"].concat(r)]}else Yl=t,t=et;return Zl[n]={i:Yl,result:t},t}function me(){var t,n=233*Yl+164;if(t=Zl[n])return Yl=t.i,t.result;if(t=Yl,e.substr(Yl,2)===an){var r=an;Yl+=2}else r=et,0===Wl&&u(Co);return r!==et?(r=je())!==et?(r=ve())!==et?(Ql=t,t=["typeDeclaration"].concat(r)):(Yl=t,t=et):(Yl=t,t=et):(Yl=t,t=et),Zl[n]={i:Yl,result:t},t}function ve(){var t,n=233*Yl+165;if(t=Zl[n])return Yl=t.i,t.result;if(t=Yl,e.substr(Yl,16)===aa){var r=aa;Yl+=16}else r=et,0===Wl&&u(Iu);if(r!==et&&(Ql=t,r=[["voidSequenceType"]]),(t=r)===et)if(t=Yl,(r=ge())!==et){var a,i=Yl;He();var o=233*Yl+166;(a=Zl[o])?(Yl=a.i,o=a.result):(63===e.charCodeAt(Yl)?(a=Fr,Yl++):(a=et,0===Wl&&u(iu)),a===et&&(42===e.charCodeAt(Yl)?(a=Un,Yl++):(a=et,0===Wl&&u(ns)),a===et&&(43===e.charCodeAt(Yl)?(a=Gn,Yl++):(a=et,0===Wl&&u(ts)))),Zl[o]={i:Yl,result:a},o=a),o!==et?(Ql=i,i=o):(Yl=i,i=et),i===et&&(i=null),Ql=t,t=[r].concat(i?[["occurrenceIndicator",i]]:[])}else Yl=t,t=et;return Zl[n]={i:Yl,result:t},t}function ge(){var t,n=233*Yl+167;if(t=Zl[n])return Yl=t.i,t.result;if((t=we())===et){if(t=Yl,e.substr(Yl,6)===ia){var r=ia;Yl+=6}else r=et,0===Wl&&u(Ou);if(r!==et&&(Ql=t,r=["anyItemType"]),(t=r)===et){var a;if(r=Zl[t=233*Yl+182])Yl=r.i,t=r.result;else{r=Yl;var i,o=[];for(a=w();a!==et;)o.push(a),a=w();if(i=Zl[a=233*Yl+183])Yl=i.i,a=i.result;else{if(i=Yl,e.substr(Yl,8)===Qt){var s=Qt;Yl+=8}else s=et,0===Wl&&u(mo);s!==et?(He(),40===e.charCodeAt(Yl)?(s=zt,Yl++):(s=et,0===Wl&&u(yo)),s!==et?(He(),42===e.charCodeAt(Yl)?(s=Un,Yl++):(s=et,0===Wl&&u(ns)),s!==et?(He(),41===e.charCodeAt(Yl)?(s=Wt,Yl++):(s=et,0===Wl&&u(wo)),s!==et?(Ql=i,i=["anyFunctionTest"]):(Yl=i,i=et)):(Yl=i,i=et)):(Yl=i,i=et)):(Yl=i,i=et),Zl[a]={i:Yl,result:i},a=i}if(a===et)if(i=Zl[a=233*Yl+184])Yl=i.i,a=i.result;else{if(i=Yl,e.substr(Yl,8)===Qt?(s=Qt,Yl+=8):(s=et,0===Wl&&u(mo)),s!==et)if(He(),40===e.charCodeAt(Yl)?(s=zt,Yl++):(s=et,0===Wl&&u(yo)),s!==et){He(),s=Yl;var l=ve();if(l!==et){var c=[],h=Yl;if(44===e.charCodeAt(Yl)){var p=Tt;Yl++}else p=et,0===Wl&&u(Ji);for(p!==et?(He(),(p=ve())!==et?(Ql=h,h=p):(Yl=h,h=et)):(Yl=h,h=et);h!==et;)c.push(h),h=Yl,44===e.charCodeAt(Yl)?(p=Tt,Yl++):(p=et,0===Wl&&u(Ji)),p!==et?(He(),(p=ve())!==et?(Ql=h,h=p):(Yl=h,h=et)):(Yl=h,h=et);Ql=s,s=l.concat.apply(l,c)}else Yl=s,s=et;s===et&&(s=null),He(),41===e.charCodeAt(Yl)?(c=Wt,Yl++):(c=et,0===Wl&&u(wo)),c!==et?(h=je())!==et?(e.substr(Yl,2)===an?(p=an,Yl+=2):(p=et,0===Wl&&u(Co)),p!==et?(l=je())!==et?(p=ve())!==et?(Ql=i,i=["typedFunctionTest",["paramTypeList",["sequenceType"].concat(s)],["sequenceType"].concat(p)]):(Yl=i,i=et):(Yl=i,i=et):(Yl=i,i=et)):(Yl=i,i=et):(Yl=i,i=et)}else Yl=i,i=et;else Yl=i,i=et;Zl[a]={i:Yl,result:i},a=i}a!==et?(Ql=r,r=[a[0]].concat(o,a.slice(1))):(Yl=r,r=et),Zl[t]={i:Yl,result:r},t=r}t===et&&((r=Zl[t=233*Yl+185])?(Yl=r.i,t=r.result):((o=Zl[r=233*Yl+186])?(Yl=o.i,r=o.result):(o=Yl,e.substr(Yl,3)===ta?(a=ta,Yl+=3):(a=et,0===Wl&&u(Nu)),a!==et?(He(),40===e.charCodeAt(Yl)?(a=zt,Yl++):(a=et,0===Wl&&u(yo)),a!==et?(He(),42===e.charCodeAt(Yl)?(a=Un,Yl++):(a=et,0===Wl&&u(ns)),a!==et?(He(),41===e.charCodeAt(Yl)?(a=Wt,Yl++):(a=et,0===Wl&&u(wo)),a!==et?(Ql=o,o=["anyMapTest"]):(Yl=o,o=et)):(Yl=o,o=et)):(Yl=o,o=et)):(Yl=o,o=et),Zl[r]={i:Yl,result:o},r=o),r===et&&((o=Zl[r=233*Yl+187])?(Yl=o.i,r=o.result):(o=Yl,e.substr(Yl,3)===ta?(a=ta,Yl+=3):(a=et,0===Wl&&u(Nu)),a!==et?(He(),40===e.charCodeAt(Yl)?(a=zt,Yl++):(a=et,0===Wl&&u(yo)),a!==et?(He(),(a=ye())!==et?(He(),44===e.charCodeAt(Yl)?(i=Tt,Yl++):(i=et,0===Wl&&u(Ji)),i!==et?(He(),(i=ve())!==et?(He(),41===e.charCodeAt(Yl)?(s=Wt,Yl++):(s=et,0===Wl&&u(wo)),s!==et?(Ql=o,o=["typedMapTest",a,["sequenceType"].concat(i)]):(Yl=o,o=et)):(Yl=o,o=et)):(Yl=o,o=et)):(Yl=o,o=et)):(Yl=o,o=et)):(Yl=o,o=et),Zl[r]={i:Yl,result:o},r=o)),Zl[t]={i:Yl,result:r},t=r),t===et&&((r=Zl[t=233*Yl+188])?(Yl=r.i,t=r.result):((o=Zl[r=233*Yl+189])?(Yl=o.i,r=o.result):(o=Yl,e.substr(Yl,5)===ra?(a=ra,Yl+=5):(a=et,0===Wl&&u(Tu)),a!==et?(He(),40===e.charCodeAt(Yl)?(a=zt,Yl++):(a=et,0===Wl&&u(yo)),a!==et?(He(),42===e.charCodeAt(Yl)?(a=Un,Yl++):(a=et,0===Wl&&u(ns)),a!==et?(He(),41===e.charCodeAt(Yl)?(a=Wt,Yl++):(a=et,0===Wl&&u(wo)),a!==et?(Ql=o,o=["anyArrayTest"]):(Yl=o,o=et)):(Yl=o,o=et)):(Yl=o,o=et)):(Yl=o,o=et),Zl[r]={i:Yl,result:o},r=o),r===et&&((o=Zl[r=233*Yl+190])?(Yl=o.i,r=o.result):(o=Yl,e.substr(Yl,5)===ra?(a=ra,Yl+=5):(a=et,0===Wl&&u(Tu)),a!==et?(He(),40===e.charCodeAt(Yl)?(a=zt,Yl++):(a=et,0===Wl&&u(yo)),a!==et?(He(),(a=ve())!==et?(He(),41===e.charCodeAt(Yl)?(i=Wt,Yl++):(i=et,0===Wl&&u(wo)),i!==et?(Ql=o,o=["typedArrayTest",["sequenceType"].concat(a)]):(Yl=o,o=et)):(Yl=o,o=et)):(Yl=o,o=et)):(Yl=o,o=et),Zl[r]={i:Yl,result:o},r=o)),Zl[t]={i:Yl,result:r},t=r),t===et&&((t=ye())===et&&((r=Zl[t=233*Yl+191])?(Yl=r.i,t=r.result):(r=Yl,40===e.charCodeAt(Yl)?(o=zt,Yl++):(o=et,0===Wl&&u(yo)),o!==et?(He(),(o=ge())!==et?(He(),41===e.charCodeAt(Yl)?(a=Wt,Yl++):(a=et,0===Wl&&u(wo)),a!==et?(Ql=r,r=["parenthesizedItemType",o]):(Yl=r,r=et)):(Yl=r,r=et)):(Yl=r,r=et),Zl[t]={i:Yl,result:r},t=r)))))}}return Zl[n]={i:Yl,result:t},t}function ye(){var e,t=233*Yl+168;if(e=Zl[t])return Yl=e.i,e.result;e=Yl;var n=Be();return n!==et&&(Ql=e,n=["atomicType"].concat(n)),e=n,Zl[t]={i:Yl,result:e},e}function we(){var t,n,r=233*Yl+169;if(t=Zl[r])return Yl=t.i,t.result;if(n=Zl[t=233*Yl+171])Yl=n.i,t=n.result;else{if(n=Yl,e.substr(Yl,14)===sa){var a=sa;Yl+=14}else a=et,0===Wl&&u(Ru);if(a!==et){if(He(),(a=xe())===et&&(a=Ee()),a===et&&(a=null),He(),41===e.charCodeAt(Yl)){var i=Wt;Yl++}else i=et,0===Wl&&u(wo);i!==et?(Ql=n,n=["documentTest"].concat(a?[a]:[])):(Yl=n,n=et)}else Yl=n,n=et;Zl[t]={i:Yl,result:n},t=n}if(t===et&&(t=xe())===et){if(n=Zl[t=233*Yl+176])Yl=n.i,t=n.result;else{if(n=Yl,e.substr(Yl,10)===fa?(a=fa,Yl+=10):(a=et,0===Wl&&u(Pu)),a!==et)if(He(),(a=Ae())!==et)if(He(),44===e.charCodeAt(Yl)?(i=Tt,Yl++):(i=et,0===Wl&&u(Ji)),i!==et)if(He(),(i=Be())!==et){if(He(),41===e.charCodeAt(Yl)){var o=Wt;Yl++}else o=et,0===Wl&&u(wo);o!==et?(Ql=n,n=["attributeTest",["attributeName",a],["typeName"].concat(i)]):(Yl=n,n=et)}else Yl=n,n=et;else Yl=n,n=et;else Yl=n,n=et;else Yl=n,n=et;n===et&&(n=Yl,e.substr(Yl,10)===fa?(a=fa,Yl+=10):(a=et,0===Wl&&u(Pu)),a!==et?(He(),(a=Ae())!==et?(He(),41===e.charCodeAt(Yl)?(i=Wt,Yl++):(i=et,0===Wl&&u(wo)),i!==et?(Ql=n,n=["attributeTest",["attributeName",a]]):(Yl=n,n=et)):(Yl=n,n=et)):(Yl=n,n=et),n===et&&(n=Yl,e.substr(Yl,11)===da?(a=da,Yl+=11):(a=et,0===Wl&&u(Hu)),a!==et&&(Ql=n,a=["attributeTest"]),n=a)),Zl[t]={i:Yl,result:n},t=n}t===et&&((t=Ee())===et&&((n=Zl[t=233*Yl+178])?(Yl=n.i,t=n.result):(n=Yl,e.substr(Yl,17)===ma?(a=ma,Yl+=17):(a=et,0===Wl&&u(ju)),a!==et?(He(),(a=Be())!==et?(He(),41===e.charCodeAt(Yl)?(i=Wt,Yl++):(i=et,0===Wl&&u(wo)),i!==et?(Ql=n,n=["schemaAttributeTest"].concat(a)):(Yl=n,n=et)):(Yl=n,n=et)):(Yl=n,n=et),Zl[t]={i:Yl,result:n},t=n),t===et&&((n=Zl[t=233*Yl+175])?(Yl=n.i,t=n.result):(n=Yl,e.substr(Yl,23)===ha?(a=ha,Yl+=23):(a=et,0===Wl&&u(Uu)),a!==et?(He(),(a=Me())!==et?(He(),41===e.charCodeAt(Yl)?(i=Wt,Yl++):(i=et,0===Wl&&u(wo)),i!==et?(Ql=n,n=["piTest",["piTarget",a]]):(Yl=n,n=et)):(Yl=n,n=et)):(Yl=n,n=et),n===et&&(n=Yl,e.substr(Yl,23)===ha?(a=ha,Yl+=23):(a=et,0===Wl&&u(Uu)),a!==et?(He(),(a=Ce())!==et?(He(),41===e.charCodeAt(Yl)?(i=Wt,Yl++):(i=et,0===Wl&&u(wo)),i!==et?(Ql=n,n=["piTest",["piTarget",a]]):(Yl=n,n=et)):(Yl=n,n=et)):(Yl=n,n=et),n===et&&(n=Yl,e.substr(Yl,24)===pa?(a=pa,Yl+=24):(a=et,0===Wl&&u(Fu)),a!==et&&(Ql=n,a=["piTest"]),n=a)),Zl[t]={i:Yl,result:n},t=n),t===et&&((n=Zl[t=233*Yl+173])?(Yl=n.i,t=n.result):(n=Yl,e.substr(Yl,9)===la?(a=la,Yl+=9):(a=et,0===Wl&&u(Mu)),a!==et&&(Ql=n,a=["commentTest"]),n=a,Zl[t]={i:Yl,result:n},t=n),t===et&&((n=Zl[t=233*Yl+172])?(Yl=n.i,t=n.result):(n=Yl,e.substr(Yl,6)===ua?(a=ua,Yl+=6):(a=et,0===Wl&&u(Du)),a!==et&&(Ql=n,a=["textTest"]),n=a,Zl[t]={i:Yl,result:n},t=n),t===et&&((n=Zl[t=233*Yl+174])?(Yl=n.i,t=n.result):(n=Yl,e.substr(Yl,16)===ca?(a=ca,Yl+=16):(a=et,0===Wl&&u(Gu)),a!==et&&(Ql=n,a=["namespaceTest"]),n=a,Zl[t]={i:Yl,result:n},t=n),t===et&&((n=Zl[t=233*Yl+170])?(Yl=n.i,t=n.result):(n=Yl,e.substr(Yl,6)===oa?(a=oa,Yl+=6):(a=et,0===Wl&&u(Su)),a!==et&&(Ql=n,a=["anyKindTest"]),n=a,Zl[t]={i:Yl,result:n},t=n))))))))}return Zl[r]={i:Yl,result:t},t}function Ae(){var t,n=233*Yl+177;if(t=Zl[n])return Yl=t.i,t.result;t=Yl;var r=Be();return r!==et&&(Ql=t,r=["QName"].concat(r)),(t=r)===et&&(t=Yl,42===e.charCodeAt(Yl)?(r=Un,Yl++):(r=et,0===Wl&&u(ns)),r!==et&&(Ql=t,r=["star"]),t=r),Zl[n]={i:Yl,result:t},t}function xe(){var t,n=233*Yl+179;if(t=Zl[n])return Yl=t.i,t.result;if(t=Yl,e.substr(Yl,7)===Yt){var r=Yt;Yl+=7}else r=et,0===Wl&&u(fo);if(r!==et)if(He(),40===e.charCodeAt(Yl)?(r=zt,Yl++):(r=et,0===Wl&&u(yo)),r!==et)if(He(),(r=be())!==et){if(He(),44===e.charCodeAt(Yl)){var a=Tt;Yl++}else a=et,0===Wl&&u(Ji);if(a!==et)if(He(),(a=Be())!==et){if(He(),41===e.charCodeAt(Yl)){var i=Wt;Yl++}else i=et,0===Wl&&u(wo);i!==et?(Ql=t,t=["elementTest",["elementName",r],["typeName"].concat(a)]):(Yl=t,t=et)}else Yl=t,t=et;else Yl=t,t=et}else Yl=t,t=et;else Yl=t,t=et;else Yl=t,t=et;return t===et&&(t=Yl,e.substr(Yl,7)===Yt?(r=Yt,Yl+=7):(r=et,0===Wl&&u(fo)),r!==et?(He(),40===e.charCodeAt(Yl)?(r=zt,Yl++):(r=et,0===Wl&&u(yo)),r!==et?(He(),(r=be())!==et?(He(),41===e.charCodeAt(Yl)?(a=Wt,Yl++):(a=et,0===Wl&&u(wo)),a!==et?(Ql=t,t=["elementTest",["elementName",r]]):(Yl=t,t=et)):(Yl=t,t=et)):(Yl=t,t=et)):(Yl=t,t=et),t===et&&(t=Yl,e.substr(Yl,7)===Yt?(r=Yt,Yl+=7):(r=et,0===Wl&&u(fo)),r!==et?(He(),40===e.charCodeAt(Yl)?(r=zt,Yl++):(r=et,0===Wl&&u(yo)),r!==et?(He(),41===e.charCodeAt(Yl)?(r=Wt,Yl++):(r=et,0===Wl&&u(wo)),r!==et?(Ql=t,t=["elementTest"]):(Yl=t,t=et)):(Yl=t,t=et)):(Yl=t,t=et))),Zl[n]={i:Yl,result:t},t}function be(){var t,n=233*Yl+180;if(t=Zl[n])return Yl=t.i,t.result;t=Yl;var r=Be();return r!==et&&(Ql=t,r=["QName"].concat(r)),(t=r)===et&&(t=Yl,42===e.charCodeAt(Yl)?(r=Un,Yl++):(r=et,0===Wl&&u(ns)),r!==et&&(Ql=t,r=["star"]),t=r),Zl[n]={i:Yl,result:t},t}function Ee(){var t,n=233*Yl+181;if(t=Zl[n])return Yl=t.i,t.result;if(t=Yl,e.substr(Yl,14)===va){var r=va;Yl+=14}else r=et,0===Wl&&u(Xu);if(r!==et)if(He(),40===e.charCodeAt(Yl)?(r=zt,Yl++):(r=et,0===Wl&&u(yo)),r!==et)if((r=Be())!==et){if(41===e.charCodeAt(Yl)){var a=Wt;Yl++}else a=et,0===Wl&&u(wo);a!==et?(Ql=t,t=["schemaElementTest"].concat(r)):(Yl=t,t=et)}else Yl=t,t=et;else Yl=t,t=et;else Yl=t,t=et;return Zl[n]={i:Yl,result:t},t}function Be(){var e,t,n=233*Yl+192;if(e=Zl[n])return Yl=e.i,e.result;e=Yl;var r=233*Yl+197;if(t=Zl[r])Yl=t.i,r=t.result;else{t=Yl;var a=Te();if(a!==et){var i=Me();i!==et?(Ql=t,t=[a,i]):(Yl=t,t=et)}else Yl=t,t=et;Zl[r]={i:Yl,result:t},r=t}return r!==et&&(Ql=e,e=r,r=[((r={}).prefix=null,r.URI=e[0],r),e[1]]),(e=r)===et&&(e=De()),Zl[n]={i:Yl,result:e},e}function Ne(){var e,t=233*Yl+193;if(e=Zl[t])return Yl=e.i,e.result;e=Yl;var n=Ue();return n!==et&&(Ql=e,n=["integerConstantExpr",["value",n]]),e=n,Zl[t]={i:Yl,result:e},e}function Ce(){var t,r,a=233*Yl+196;if(t=Zl[a])return Yl=t.i,t.result;if(Ql=t=Yl,(r=(r=n.Ra)?void 0:et)!==et)if(34===e.charCodeAt(Yl)?(r=Xr,Yl++):(r=et,0===Wl&&u(cu)),r!==et){r=[];var i=Ie();for(i===et&&((i=Re())===et&&((i=Oe())===et&&(ci.test(e.charAt(Yl))?(i=e.charAt(Yl),Yl++):(i=et,0===Wl&&u(qu)))));i!==et;)r.push(i),(i=Ie())===et&&((i=Re())===et&&((i=Oe())===et&&(ci.test(e.charAt(Yl))?(i=e.charAt(Yl),Yl++):(i=et,0===Wl&&u(qu)))));34===e.charCodeAt(Yl)?(i=Xr,Yl++):(i=et,0===Wl&&u(cu)),i!==et?(Ql=t,t=r.join("")):(Yl=t,t=et)}else Yl=t,t=et;else Yl=t,t=et;if(t===et){if(Ql=t=Yl,(r=(r=n.Ra)?void 0:et)!==et)if(39===e.charCodeAt(Yl)?(r=_r,Yl++):(r=et,0===Wl&&u(hu)),r!==et){for(r=[],(i=Ie())===et&&((i=Re())===et&&((i=Se())===et&&(hi.test(e.charAt(Yl))?(i=e.charAt(Yl),Yl++):(i=et,0===Wl&&u(Vu)))));i!==et;)r.push(i),(i=Ie())===et&&((i=Re())===et&&((i=Se())===et&&(hi.test(e.charAt(Yl))?(i=e.charAt(Yl),Yl++):(i=et,0===Wl&&u(Vu)))));39===e.charCodeAt(Yl)?(i=_r,Yl++):(i=et,0===Wl&&u(hu)),i!==et?(Ql=t,t=r.join("")):(Yl=t,t=et)}else Yl=t,t=et;else Yl=t,t=et;if(t===et){if(Ql=t=Yl,(r=(r=!n.Ra)?void 0:et)!==et)if(34===e.charCodeAt(Yl)?(r=Xr,Yl++):(r=et,0===Wl&&u(cu)),r!==et){for(r=[],(i=Oe())===et&&(pi.test(e.charAt(Yl))?(i=e.charAt(Yl),Yl++):(i=et,0===Wl&&u(Yu)));i!==et;)r.push(i),(i=Oe())===et&&(pi.test(e.charAt(Yl))?(i=e.charAt(Yl),Yl++):(i=et,0===Wl&&u(Yu)));34===e.charCodeAt(Yl)?(i=Xr,Yl++):(i=et,0===Wl&&u(cu)),i!==et?(Ql=t,t=r.join("")):(Yl=t,t=et)}else Yl=t,t=et;else Yl=t,t=et;if(t===et)if(Ql=t=Yl,(r=(r=!n.Ra)?void 0:et)!==et)if(39===e.charCodeAt(Yl)?(r=_r,Yl++):(r=et,0===Wl&&u(hu)),r!==et){for(r=[],(i=Se())===et&&(fi.test(e.charAt(Yl))?(i=e.charAt(Yl),Yl++):(i=et,0===Wl&&u(Qu)));i!==et;)r.push(i),(i=Se())===et&&(fi.test(e.charAt(Yl))?(i=e.charAt(Yl),Yl++):(i=et,0===Wl&&u(Qu)));39===e.charCodeAt(Yl)?(i=_r,Yl++):(i=et,0===Wl&&u(hu)),i!==et?(Ql=t,t=r.join("")):(Yl=t,t=et)}else Yl=t,t=et;else Yl=t,t=et}}return Zl[a]={i:Yl,result:t},t}function Te(){var t,n=233*Yl+198;if(t=Zl[n])return Yl=t.i,t.result;if(t=Yl,81===e.charCodeAt(Yl)){var r=ga;Yl++}else r=et,0===Wl&&u(Ju);if(r!==et)if(He(),123===e.charCodeAt(Yl)?(r=on,Yl++):(r=et,0===Wl&&u(To)),r!==et){if(r=[],di.test(e.charAt(Yl))){var a=e.charAt(Yl);Yl++}else a=et,0===Wl&&u(Ku);for(;a!==et;)r.push(a),di.test(e.charAt(Yl))?(a=e.charAt(Yl),Yl++):(a=et,0===Wl&&u(Ku));125===e.charCodeAt(Yl)?(a=sn,Yl++):(a=et,0===Wl&&u(Io)),a!==et?(Ql=t,t=r.join("").replace(/\s+/g," ").trim()):(Yl=t,t=et)}else Yl=t,t=et;else Yl=t,t=et;return Zl[n]={i:Yl,result:t},t}function Ie(){var t,n=233*Yl+199;if(t=Zl[n])return Yl=t.i,t.result;var r=t=Yl;if(38===e.charCodeAt(Yl)){var a=ya;Yl++}else a=et,0===Wl&&u(zu);if(a!==et){if(e.substr(Yl,2)===tr){var i=tr;Yl+=2}else i=et,0===Wl&&u(bs);if(i===et&&(e.substr(Yl,2)===rr?(i=rr,Yl+=2):(i=et,0===Wl&&u(Bs)),i===et&&(e.substr(Yl,3)===wa?(i=wa,Yl+=3):(i=et,0===Wl&&u(Wu)),i===et&&(e.substr(Yl,4)===Aa?(i=Aa,Yl+=4):(i=et,0===Wl&&u(Zu)),i===et&&(e.substr(Yl,4)===xa?(i=xa,Yl+=4):(i=et,0===Wl&&u($u)))))),i!==et){if(59===e.charCodeAt(Yl)){var o=ct;Yl++}else o=et,0===Wl&&u(Ri);o!==et?r=a=[a,i,o]:(Yl=r,r=et)}else Yl=r,r=et}else Yl=r,r=et;return t=r!==et?e.substring(t,Yl):r,Zl[n]={i:Yl,result:t},t}function Oe(){var t,n=233*Yl+200;if(t=Zl[n])return Yl=t.i,t.result;if(t=Yl,e.substr(Yl,2)===ba){var r=ba;Yl+=2}else r=et,0===Wl&&u(el);return r!==et&&(Ql=t,r='"'),t=r,Zl[n]={i:Yl,result:t},t}function Se(){var t,n=233*Yl+201;if(t=Zl[n])return Yl=t.i,t.result;if(t=Yl,e.substr(Yl,2)===Ea){var r=Ea;Yl+=2}else r=et,0===Wl&&u(tl);return r!==et&&(Ql=t,r="'"),t=r,Zl[n]={i:Yl,result:t},t}function Re(){var t,n=233*Yl+207;if(t=Zl[n])return Yl=t.i,t.result;var r=t=Yl;if(e.substr(Yl,3)===Da){var a=Da;Yl+=3}else a=et,0===Wl&&u(fl);if(a!==et){var i=[];if(yi.test(e.charAt(Yl))){var o=e.charAt(Yl);Yl++}else o=et,0===Wl&&u(dl);if(o!==et)for(;o!==et;)i.push(o),yi.test(e.charAt(Yl))?(o=e.charAt(Yl),Yl++):(o=et,0===Wl&&u(dl));else i=et;i!==et?(59===e.charCodeAt(Yl)?(o=ct,Yl++):(o=et,0===Wl&&u(Ri)),o!==et?r=a=[a,i,o]:(Yl=r,r=et)):(Yl=r,r=et)}else Yl=r,r=et;if((t=r!==et?e.substring(t,Yl):r)===et){if(r=t=Yl,e.substr(Yl,2)===Ma?(a=Ma,Yl+=2):(a=et,0===Wl&&u(ml)),a!==et){if(i=[],si.test(e.charAt(Yl))?(o=e.charAt(Yl),Yl++):(o=et,0===Wl&&u(_u)),o!==et)for(;o!==et;)i.push(o),si.test(e.charAt(Yl))?(o=e.charAt(Yl),Yl++):(o=et,0===Wl&&u(_u));else i=et;i!==et?(59===e.charCodeAt(Yl)?(o=ct,Yl++):(o=et,0===Wl&&u(Ri)),o!==et?r=a=[a,i,o]:(Yl=r,r=et)):(Yl=r,r=et)}else Yl=r,r=et;t=r!==et?e.substring(t,Yl):r}return Zl[n]={i:Yl,result:t},t}function De(){var t,n,r=233*Yl+208;if(t=Zl[r])return Yl=t.i,t.result;if(n=Zl[t=233*Yl+224])Yl=n.i,t=n.result;else{var a=Yl;if((n=Me())!==et){if(58===e.charCodeAt(Yl)){var i=na;Yl++}else i=et,0===Wl&&u(Cu);i!==et?(i=Me())!==et?(Ql=a,a=[((a={}).prefix=n,a),i]):(Yl=a,a=et):(Yl=a,a=et)}else Yl=a,a=et;Zl[t]={i:Yl,result:a},t=a}return t===et&&((n=Zl[t=233*Yl+225])?(Yl=n.i,t=n.result):(n=Yl,(a=Me())!==et&&(Ql=n,a=[a]),n=a,Zl[t]={i:Yl,result:n},t=n)),Zl[r]={i:Yl,result:t},t}function Me(){var e,t,n=233*Yl+209;if(e=Zl[n])return Yl=e.i,e.result;e=Yl;var r=Le();if(r!==et){var a=[];for(t=ke();t!==et;)a.push(t),t=ke();Ql=e,e=r+a.join("")}else Yl=e,e=et;return Zl[n]={i:Yl,result:e},e}function Ge(){var t,n=233*Yl+210;if(t=Zl[n])return Yl=t.i,t.result;if(wi.test(e.charAt(Yl))?(t=e.charAt(Yl),Yl++):(t=et,0===Wl&&u(vl)),t===et){if(t=Yl,Ai.test(e.charAt(Yl))){var r=e.charAt(Yl);Yl++}else r=et,0===Wl&&u(gl);if(r!==et){if(xi.test(e.charAt(Yl))){var a=e.charAt(Yl);Yl++}else a=et,0===Wl&&u(yl);a!==et?t=r=[r,a]:(Yl=t,t=et)}else Yl=t,t=et}return Zl[n]={i:Yl,result:t},t}function Ue(){var t,n=233*Yl+211;if(t=Zl[n])return Yl=t.i,t.result;t=Yl;var r=[];if(si.test(e.charAt(Yl))){var a=e.charAt(Yl);Yl++}else a=et,0===Wl&&u(_u);if(a!==et)for(;a!==et;)r.push(a),si.test(e.charAt(Yl))?(a=e.charAt(Yl),Yl++):(a=et,0===Wl&&u(_u));else r=et;return r!==et&&(Ql=t,r=r.join("")),t=r,Zl[n]={i:Yl,result:t},t}function Fe(){var t,n=233*Yl+212;if(t=Zl[n])return Yl=t.i,t.result;var r=t=Yl;if(Wl++,e.substr(Yl,2)===Ba){var a=Ba;Yl+=2}else a=et,0===Wl&&u(il);if(Wl--,a===et?r=void 0:(Yl=r,r=et),r!==et){if(a=Yl,Wl++,e.substr(Yl,2)===Na){var i=Na;Yl+=2}else i=et,0===Wl&&u(ol);Wl--,i===et?a=void 0:(Yl=a,a=et),a!==et?(i=Ge())!==et?t=r=[r,a,i]:(Yl=t,t=et):(Yl=t,t=et)}else Yl=t,t=et;return Zl[n]={i:Yl,result:t},t}function Pe(){var t,n=233*Yl+219;if(t=Zl[n])return Yl=t.i,t.result;t=Yl;var r=ae();if(r!==et){if(He(),e.substr(Yl,2)===en){var a=en;Yl+=2}else a=et,0===Wl&&u(bo);a!==et?(He(),(a=T())!==et?(Ql=t,t=["transformCopy",r,["copySource",a]]):(Yl=t,t=et)):(Yl=t,t=et)}else Yl=t,t=et;return Zl[n]={i:Yl,result:t},t}function He(){var e,t,n=233*Yl+220;if(e=Zl[n])return Yl=e.i,e.result;for(e=[],t=_e();t!==et;)e.push(t),t=_e();return Zl[n]={i:Yl,result:e},e}function je(){var e,t=233*Yl+221;if(e=Zl[t])return Yl=e.i,e.result;e=[];var n=_e();if(n!==et)for(;n!==et;)e.push(n),n=_e();else e=et;return Zl[t]={i:Yl,result:e},e}function Xe(){var t,n=233*Yl+222;if(t=Zl[n])return Yl=t.i,t.result;if(t=[],32===e.charCodeAt(Yl)){var r=Ka;Yl++}else r=et,0===Wl&&u(Gl);if(r===et&&(9===e.charCodeAt(Yl)?(r=za,Yl++):(r=et,0===Wl&&u(Ul)),r===et&&(13===e.charCodeAt(Yl)?(r=Wa,Yl++):(r=et,0===Wl&&u(Fl)),r===et&&(10===e.charCodeAt(Yl)?(r=Za,Yl++):(r=et,0===Wl&&u(Pl))))),r!==et)for(;r!==et;)t.push(r),32===e.charCodeAt(Yl)?(r=Ka,Yl++):(r=et,0===Wl&&u(Gl)),r===et&&(9===e.charCodeAt(Yl)?(r=za,Yl++):(r=et,0===Wl&&u(Ul)),r===et&&(13===e.charCodeAt(Yl)?(r=Wa,Yl++):(r=et,0===Wl&&u(Fl)),r===et&&(10===e.charCodeAt(Yl)?(r=Za,Yl++):(r=et,0===Wl&&u(Pl)))));else t=et;return Zl[n]={i:Yl,result:t},t}function _e(){var t,n=233*Yl+223;return(t=Zl[n])?(Yl=t.i,t.result):(32===e.charCodeAt(Yl)?(t=Ka,Yl++):(t=et,0===Wl&&u(Gl)),t===et&&(9===e.charCodeAt(Yl)?(t=za,Yl++):(t=et,0===Wl&&u(Ul)),t===et&&(13===e.charCodeAt(Yl)?(t=Wa,Yl++):(t=et,0===Wl&&u(Fl)),t===et&&(10===e.charCodeAt(Yl)?(t=Za,Yl++):(t=et,0===Wl&&u(Pl)),t===et&&(t=function t(){var n,r=233*Yl+205;if(n=Zl[r])return Yl=n.i,n.result;if(n=Yl,e.substr(Yl,2)===Ba){var a=Ba;Yl+=2}else a=et,0===Wl&&u(il);if(a!==et){var i=[],o=Fe();for(o===et&&(o=t());o!==et;)i.push(o),(o=Fe())===et&&(o=t());e.substr(Yl,2)===Na?(o=Na,Yl+=2):(o=et,0===Wl&&u(ol)),o!==et?n=a=[a,i,o]:(Yl=n,n=et)}else Yl=n,n=et;return Zl[r]={i:Yl,result:n},n}())))),Zl[n]={i:Yl,result:t},t)}function Le(){var t,n=233*Yl+226;if(t=Zl[n])return Yl=t.i,t.result;if(bi.test(e.charAt(Yl))?(t=e.charAt(Yl),Yl++):(t=et,0===Wl&&u(Hl)),t===et){if(t=Yl,Ei.test(e.charAt(Yl))){var r=e.charAt(Yl);Yl++}else r=et,0===Wl&&u(jl);if(r!==et){if(xi.test(e.charAt(Yl))){var a=e.charAt(Yl);Yl++}else a=et,0===Wl&&u(yl);a!==et?t=r=[r,a]:(Yl=t,t=et)}else Yl=t,t=et}return Zl[n]={i:Yl,result:t},t}function ke(){var t,n=233*Yl+227;return(t=Zl[n])?(Yl=t.i,t.result):((t=Le())===et&&(Bi.test(e.charAt(Yl))?(t=e.charAt(Yl),Yl++):(t=et,0===Wl&&u(Xl))),Zl[n]={i:Yl,result:t},t)}function qe(){var t,n=233*Yl+228;return(t=Zl[n])?(Yl=t.i,t.result):((t=ke())===et&&(58===e.charCodeAt(Yl)?(t=na,Yl++):(t=et,0===Wl&&u(Cu))),Zl[n]={i:Yl,result:t},t)}function Ve(){var t,n=233*Yl+231;return(t=Zl[n])?(Yl=t.i,t.result):(e.substr(Yl,5)===ra?(t=ra,Yl+=5):(t=et,0===Wl&&u(Tu)),t===et&&(e.substr(Yl,9)===Ar?(t=Ar,Yl+=9):(t=et,0===Wl&&u(ks)),t===et&&(e.substr(Yl,7)===Zr?(t=Zr,Yl+=7):(t=et,0===Wl&&u(bu)),t===et&&(e.substr(Yl,13)===$a?(t=$a,Yl+=13):(t=et,0===Wl&&u(_l)),t===et&&(e.substr(Yl,7)===Yt?(t=Yt,Yl+=7):(t=et,0===Wl&&u(fo)),t===et&&(e.substr(Yl,14)===ei?(t=ei,Yl+=14):(t=et,0===Wl&&u(Ll)),t===et&&(e.substr(Yl,8)===Qt?(t=Qt,Yl+=8):(t=et,0===Wl&&u(mo)),t===et&&(e.substr(Yl,2)===Cn?(t=Cn,Yl+=2):(t=et,0===Wl&&u(Qo)),t===et&&(e.substr(Yl,4)===rn?(t=rn,Yl+=4):(t=et,0===Wl&&u(No)),t===et&&(e.substr(Yl,3)===ta?(t=ta,Yl+=3):(t=et,0===Wl&&u(Nu)),t===et&&(e.substr(Yl,14)===ti?(t=ti,Yl+=14):(t=et,0===Wl&&u(kl)),t===et&&(e.substr(Yl,4)===_a?(t=_a,Yl+=4):(t=et,0===Wl&&u(Cl)),t===et&&(e.substr(Yl,22)===$r?(t=$r,Yl+=22):(t=et,0===Wl&&u(Eu)),t===et&&(e.substr(Yl,16)===ni?(t=ni,Yl+=16):(t=et,0===Wl&&u(ql)),t===et&&(e.substr(Yl,14)===va?(t=va,Yl+=14):(t=et,0===Wl&&u(Xu)),t===et&&(e.substr(Yl,6)===ri?(t=ri,Yl+=6):(t=et,0===Wl&&u(Vl)),t===et&&(e.substr(Yl,4)===Wr?(t=Wr,Yl+=4):(t=et,0===Wl&&u(xu)),t===et&&(e.substr(Yl,10)===En?(t=En,Yl+=10):(t=et,0===Wl&&u(qo))))))))))))))))))),Zl[n]={i:Yl,result:t},t)}function Ye(){var t,n=233*Yl+232;if(t=Zl[n])return Yl=t.i,t.result;if(t=Yl,Wl++,40===e.charCodeAt(Yl)){var r=zt;Yl++}else r=et,0===Wl&&u(yo);return r===et&&(34===e.charCodeAt(Yl)?(r=Xr,Yl++):(r=et,0===Wl&&u(cu)),r===et&&(39===e.charCodeAt(Yl)?(r=_r,Yl++):(r=et,0===Wl&&u(hu)),r===et&&(r=_e()))),Wl--,r!==et?(Yl=t,t=void 0):t=et,Zl[n]={i:Yl,result:t},t}function Qe(e,t,n){return n.reduce((function(t,n){return[e,["firstOperand",t],["secondOperand",n]]}),t)}function Je(e){1<=e&&55295>=e||57344<=e&&65533>=e||65536<=e&&1114111>=e||Ze("XQST0090","The character reference "+e+" ("+e.toString(16)+") does not reference a valid codePoint.")}function Ke(e){return n.Ra?e.replace(/(&[^;]+);/g,(function(e){if(/^&#x/.test(e))return Je(e=parseInt(e.slice(3,-1),16)),String.fromCodePoint(e);if(/^&#/.test(e))return Je(e=parseInt(e.slice(2,-1),10)),String.fromCodePoint(e);switch(e){case"&lt;":return"<";case"&gt;":return">";case"&amp;":return"&";case"&quot;":return String.fromCharCode(34);case"&apos;":return String.fromCharCode(39)}Ze("XPST0003",'Unknown character reference: "'+e+'"')})):e}function ze(e,t,n){if(!e.length)return[];for(var r=[e[0]],a=1;a<e.length;++a)"string"==typeof r[r.length-1]&&"string"==typeof e[a]?r[r.length-1]+=e[a]:r.push(e[a]);if("string"==typeof r[0]&&0===r.length)return[];if(!(r=r.reduce((function(e,t,a){if("string"!=typeof t)e.push(t);else if(n&&/^\s*$/.test(t)){var i=r[a+1];(i&&"CDataSection"===i[0]||(a=r[a-1])&&"CDataSection"===a[0])&&e.push(Ke(t))}else e.push(Ke(t));return e}),[])).length)return r;if(1<r.length||t)for(a=0;a<r.length;a++)"string"==typeof r[a]&&(r[a]=["stringConstantExpr",["value",r[a]]]);return r}function We(e){switch(e[0]){case"constantExpr":case"varRef":case"contextItemExpr":case"functionCallExpr":case"sequenceExpr":case"elementConstructor":case"computedElementConstructor":case"computedAttributeConstructor":case"computedDocumentConstructor":case"computedTextConstructor":case"computedCommentConstructor":case"computedNamespaceConstructor":case"computedPIConstructor":case"orderedExpr":case"unorderedExpr":case"namedFunctionRef":case"inlineFunctionExpr":case"dynamicFunctionInvocationExpr":case"mapConstructor":case"arrayConstructor":case"stringConstructor":case"unaryLookup":return e}return["sequenceExpr",e]}function Ze(e,t){throw Error(e+": "+t)}function $e(e){return n.qc?["x:stackTrace",s(Ql,Yl),e]:e}var et={},tt=(n=void 0!==n?n:{}).yc,nt={Module:l},rt=l,at="xquery",it="encoding",ot="version",st="module",ut="namespace",lt="=",ct=";",ht="declare",pt="boundary-space",ft="preserve",dt="strip",mt="default",vt="collation",gt="base-uri",yt="construction",wt="ordering",At="ordered",xt="unordered",bt="order",Et="empty",Bt="greatest",Nt="least",Ct="copy-namespaces",Tt=",",It="no-preserve",Ot="inherit",St="no-inherit",Rt="decimal-format",Dt="decimal-separator",Mt="grouping-separator",Gt="infinity",Ut="minus-sign",Ft="NaN",Pt="percent",Ht="per-mille",jt="zero-digit",Xt="digit",_t="pattern-separator",Lt="exponent-separator",kt="import",qt="schema",Vt="at",Yt="element",Qt="function",Jt="updating",Kt="%",zt="(",Wt=")",Zt="variable",$t="$",en=":=",tn="external",nn="context",rn="item",an="as",on="{",sn="}",un="option",ln="for",cn="in",hn="allowing",pn="let",fn="where",dn="group",mn="by",vn="stable",gn="ascending",yn="descending",wn="return",An="some",xn="every",bn="satisfies",En="typeswitch",Bn="case",Nn="|",Cn="if",Tn="then",In="else",On="or",Sn="and",Rn="||",Dn="to",Mn="-",Gn="+",Un="*",Fn="div",Pn="idiv",Hn="mod",jn="union",Xn="intersect",_n="except",Ln="instance",kn="of",qn="treat",Vn="castable",Yn="cast",Qn="=>",Jn="!=",Kn="<=",zn="<",Wn=">=",Zn=">",$n="eq",er="ne",tr="lt",nr="le",rr="gt",ar="ge",ir="is",or="<<",sr=">>",ur="validate",lr="type",cr="lax",hr="strict",pr="(#",fr="#)",dr="!",mr="/",vr="//",gr="child",yr="::",wr="descendant",Ar="attribute",xr="self",br="descendant-or-self",Er="following-sibling",Br="following",Nr="@",Cr="parent",Tr="ancestor",Ir="preceding-sibling",Or="preceding",Sr="ancestor-or-self",Rr="..",Dr="*:",Mr=":*",Gr="[",Ur="]",Fr="?",Pr=".",Hr="/>",jr="</",Xr='"',_r="'",Lr="{{",kr="}}",qr="\x3c!--",Vr="--\x3e",Yr="<?",Qr="?>",Jr="<![CDATA[",Kr="]]>",zr="document",Wr="text",Zr="comment",$r="processing-instruction",ea="#",ta="map",na=":",ra="array",aa="empty-sequence()",ia="item()",oa="node()",sa="document-node(",ua="text()",la="comment()",ca="namespace-node()",ha="processing-instruction(",pa="processing-instruction()",fa="attribute(",da="attribute()",ma="schema-attribute(",va="schema-element",ga="Q",ya="&",wa="amp",Aa="quot",xa="apos",ba='""',Ea="''",Ba="(:",Na=":)",Ca="X",Ta="x",Ia="M",Oa="m",Sa="L",Ra="l",Da="&#x",Ma="&#",Ga="first",Ua="last",Fa="into",Pa="after",Ha="before",ja="insert",Xa="nodes",_a="node",La="delete",ka="replace",qa="value",Va="with",Ya="rename",Qa="copy",Ja="modify",Ka=" ",za="\t",Wa="\r",Za="\n",$a="document-node",ei="empty-sequence",ti="namespace-node",ni="schema-attribute",ri="switch",ai=/^[*<a-zA-Z]/,ii=/^[*a-zA-Z]/,oi=/^[a-zA-Z]/,si=/^[0-9]/,ui=/^[eE]/,li=/^[+\-]/,ci=/^[^"&]/,hi=/^[^'&]/,pi=/^[^"]/,fi=/^[^']/,di=/^[^{}]/,mi=/^[{}<&]/,vi=/^["{}<&]/,gi=/^['{}<&]/,yi=/^[0-9a-fA-F]/,wi=/^[\t\n\r -\uD7FF\uE000\uFFFD]/,Ai=/^[\uD800-\uDBFF]/,xi=/^[\uDC00-\uDFFF]/,bi=/^[A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Ei=/^[\uD800-\uDB7F]/,Bi=/^[\-.0-9\xB7\u0300-\u036F\u203F\u2040]/,Ni=a("xquery",!1),Ci=a("encoding",!1),Ti=a("version",!1),Ii=a("module",!1),Oi=a("namespace",!1),Si=a("=",!1),Ri=a(";",!1),Di=a("declare",!1),Mi=a("boundary-space",!1),Gi=a("preserve",!1),Ui=a("strip",!1),Fi=a("default",!1),Pi=a("collation",!1),Hi=a("base-uri",!1),ji=a("construction",!1),Xi=a("ordering",!1),_i=a("ordered",!1),Li=a("unordered",!1),ki=a("order",!1),qi=a("empty",!1),Vi=a("greatest",!1),Yi=a("least",!1),Qi=a("copy-namespaces",!1),Ji=a(",",!1),Ki=a("no-preserve",!1),zi=a("inherit",!1),Wi=a("no-inherit",!1),Zi=a("decimal-format",!1),$i=a("decimal-separator",!1),eo=a("grouping-separator",!1),to=a("infinity",!1),no=a("minus-sign",!1),ro=a("NaN",!1),ao=a("percent",!1),io=a("per-mille",!1),oo=a("zero-digit",!1),so=a("digit",!1),uo=a("pattern-separator",!1),lo=a("exponent-separator",!1),co=a("import",!1),ho=a("schema",!1),po=a("at",!1),fo=a("element",!1),mo=a("function",!1),vo=a("updating",!1),go=a("%",!1),yo=a("(",!1),wo=a(")",!1),Ao=a("variable",!1),xo=a("$",!1),bo=a(":=",!1),Eo=a("external",!1),Bo=a("context",!1),No=a("item",!1),Co=a("as",!1),To=a("{",!1),Io=a("}",!1),Oo=a("option",!1),So=a("for",!1),Ro=a("in",!1),Do=a("allowing",!1),Mo=a("let",!1),Go=a("where",!1),Uo=a("group",!1),Fo=a("by",!1),Po=a("stable",!1),Ho=a("ascending",!1),jo=a("descending",!1),Xo=a("return",!1),_o=a("some",!1),Lo=a("every",!1),ko=a("satisfies",!1),qo=a("typeswitch",!1),Vo=a("case",!1),Yo=a("|",!1),Qo=a("if",!1),Jo=a("then",!1),Ko=a("else",!1),zo=a("or",!1),Wo=a("and",!1),Zo=a("||",!1),$o=a("to",!1),es=a("-",!1),ts=a("+",!1),ns=a("*",!1),rs=a("div",!1),as=a("idiv",!1),is=a("mod",!1),os=a("union",!1),ss=a("intersect",!1),us=a("except",!1),ls=a("instance",!1),cs=a("of",!1),hs=a("treat",!1),ps=a("castable",!1),fs=a("cast",!1),ds=a("=>",!1),ms=a("!=",!1),vs=a("<=",!1),gs=a("<",!1),ys=a(">=",!1),ws=a(">",!1),As=a("eq",!1),xs=a("ne",!1),bs=a("lt",!1),Es=a("le",!1),Bs=a("gt",!1),Ns=a("ge",!1),Cs=a("is",!1),Ts=a("<<",!1),Is=a(">>",!1),Os=a("validate",!1),Ss=a("type",!1),Rs=a("lax",!1),Ds=a("strict",!1),Ms=a("(#",!1),Gs=a("#)",!1),Us=a("!",!1),Fs=a("/",!1),Ps=i(["*","<",["a","z"],["A","Z"]],!1,!1),Hs=i(["*",["a","z"],["A","Z"]],!1,!1),js=a("//",!1),Xs=a("child",!1),_s=a("::",!1),Ls=a("descendant",!1),ks=a("attribute",!1),qs=a("self",!1),Vs=a("descendant-or-self",!1),Ys=a("following-sibling",!1),Qs=a("following",!1),Js=a("@",!1),Ks=a("parent",!1),zs=a("ancestor",!1),Ws=a("preceding-sibling",!1),Zs=a("preceding",!1),$s=a("ancestor-or-self",!1),eu=a("..",!1),tu=a("*:",!1),nu=a(":*",!1),ru=a("[",!1),au=a("]",!1),iu=a("?",!1),ou=i([["a","z"],["A","Z"]],!1,!1),su=a(".",!1),uu=a("/>",!1),lu=a("</",!1),cu=a('"',!1),hu=a("'",!1),pu=a("{{",!1),fu=a("}}",!1),du=a("\x3c!--",!1),mu=a("--\x3e",!1),vu=a("<?",!1),gu=a("?>",!1),yu=a("<![CDATA[",!1),wu=a("]]>",!1),Au=a("document",!1),xu=a("text",!1),bu=a("comment",!1),Eu=a("processing-instruction",!1),Bu=a("#",!1),Nu=a("map",!1),Cu=a(":",!1),Tu=a("array",!1),Iu=a("empty-sequence()",!1),Ou=a("item()",!1),Su=a("node()",!1),Ru=a("document-node(",!1),Du=a("text()",!1),Mu=a("comment()",!1),Gu=a("namespace-node()",!1),Uu=a("processing-instruction(",!1),Fu=a("processing-instruction()",!1),Pu=a("attribute(",!1),Hu=a("attribute()",!1),ju=a("schema-attribute(",!1),Xu=a("schema-element",!1),_u=i([["0","9"]],!1,!1),Lu=i(["e","E"],!1,!1),ku=i(["+","-"],!1,!1),qu=i(['"',"&"],!0,!1),Vu=i(["'","&"],!0,!1),Yu=i(['"'],!0,!1),Qu=i(["'"],!0,!1),Ju=a("Q",!1),Ku=i(["{","}"],!0,!1),zu=a("&",!1),Wu=a("amp",!1),Zu=a("quot",!1),$u=a("apos",!1),el=a('""',!1),tl=a("''",!1),nl=i(["{","}","<","&"],!1,!1),rl=i(['"',"{","}","<","&"],!1,!1),al=i(["'","{","}","<","&"],!1,!1),il=a("(:",!1),ol=a(":)",!1),sl=a("X",!1),ul=a("x",!1),ll=a("M",!1),cl=a("m",!1),hl=a("L",!1),pl=a("l",!1),fl=a("&#x",!1),dl=i([["0","9"],["a","f"],["A","F"]],!1,!1),ml=a("&#",!1),vl=i(["\t","\n","\r",[" ","퟿"],"","�"],!1,!1),gl=i([["\ud800","\udbff"]],!1,!1),yl=i([["\udc00","\udfff"]],!1,!1),wl=a("first",!1),Al=a("last",!1),xl=a("into",!1),bl=a("after",!1),El=a("before",!1),Bl=a("insert",!1),Nl=a("nodes",!1),Cl=a("node",!1),Tl=a("delete",!1),Il=a("replace",!1),Ol=a("value",!1),Sl=a("with",!1),Rl=a("rename",!1),Dl=a("copy",!1),Ml=a("modify",!1),Gl=a(" ",!1),Ul=a("\t",!1),Fl=a("\r",!1),Pl=a("\n",!1),Hl=i([["A","Z"],"_",["a","z"],["À","Ö"],["Ø","ö"],["ø","˿"],["Ͱ","ͽ"],["Ϳ","῿"],"‌","‍",["⁰","↏"],["Ⰰ","⿯"],["、","퟿"],["豈","﷏"],["ﷰ","�"]],!1,!1),jl=i([["\ud800","\udb7f"]],!1,!1),Xl=i(["-",".",["0","9"],"·",["̀","ͯ"],"‿","⁀"],!1,!1),_l=a("document-node",!1),Ll=a("empty-sequence",!1),kl=a("namespace-node",!1),ql=a("schema-attribute",!1),Vl=a("switch",!1),Yl=0,Ql=0,Jl=[{line:1,da:1}],Kl=0,zl=[],Wl=0,Zl={};if("startRule"in n){if(!(n.Kb in nt))throw Error("Can't start parsing from rule \""+n.Kb+'".');rt=nt[n.Kb]}var $l=rt();if($l!==et&&Yl===e.length)return $l;throw $l!==et&&Yl<e.length&&u({type:"end"}),function(e,n,r){return new t(t.ic(e,n),e,n,r)}(zl,Kl<e.length?e.charAt(Kl):null,Kl<e.length?s(Kl,Kl+1):s(Kl,Kl))}}}(this)}).call(e)}(Io);var Oo=Io.tc,So=Oo.parse,Ro=Oo.SyntaxError,Do=Object.create(null);function Mo(e,t){var n=t.ca?"XQuery":"XPath",r=t.debug?null:Do[n+"~"+e]||null;try{if(r)var a=r;else a=So(e,{Ra:!!t.ca,qc:!!t.debug}),t.debug||(Do[n+"~"+e]=a);return a}catch(t){if(t instanceof Ro)throw Error('XPST0003: Unable to parse: "'+e+'".\n'+t.message+"\n"+e.slice(0,t.location.start.offset)+"[Error is around here]"+e.slice(t.location.start.offset));throw t}}function Go(e,t){return"Q{"+(e||"")+"}"+t}function Uo(e,t){for(var n=e.length-1;0<=n;--n)if(t in e[n])return e[n][t]}function Fo(e){this.B=e,this.C=this.h=0,this.o=[Object.create(null)],this.v=Object.create(null),this.J=null,this.Da=e.Da,this.Ca=e.Ca}function Po(e){for(var t=new Fo(e.B),n=0;n<e.h+1;++n)t.o=[Object.assign(Object.create(null),t.o[0],e.o[n])],t.Ca=[Object.assign(Object.create(null),t.Ca[0],e.Ca[n])],t.v=Object.assign(Object.create(null),e.v),t.Da=e.Da,t.J=e.J;return t}function Ho(e){e.C++,e.h++,e.o[e.h]=Object.create(null),e.Ca[e.h]=Object.create(null)}function jo(e,t,n,r,a){if(r=Go(t,n)+"~"+r,e.v[r])throw Error('XQST0049: The function or variable "Q{'+t+"}"+n+'" is declared more than once.');e.v[r]=a}function Xo(e,t,n){return t=Go(t||"",n),e.Ca[e.h][t]=t+"["+e.C+"]"}function _o(e,t,n,r){e.Da[Go(t||"",n)+"["+e.C+"]"]=r}function Lo(e){e.o.length=e.h,e.Ca.length=e.h,e.h--}Fo.prototype.Aa=function(e,t,n,r){r=void 0!==r&&r;var a=this.v[Go(e,t)+"~"+n];return!a||r&&a.Cb?null===this.B?null:this.B.Aa(e,t,n,r):a},Fo.prototype.rb=function(e,t){var n=Uo(this.Ca,Go(e,t));return n||this.B.rb(e,t)},Fo.prototype.Qa=function(e,t){var n=e.prefix,r=e.localName;return!n&&this.J?{localName:r,namespaceURI:this.J}:n&&(n=this.ga(n,!1))?{localName:r,namespaceURI:n}:this.B.Qa(e,t)},Fo.prototype.ga=function(e,t){var n=Uo(this.o,e);return void 0===n?null===this.B?void 0:this.B.ga(e,void 0===t||t):n};var ko=Object.create(null);function qo(e,t){var n=ko[e];n||(n=ko[e]={La:[],Va:[]}),n.La=n.La.concat(t.La),n.Va=n.Va.concat(t.Va)}function Vo(e,t){var n=ko[t];if(!n)throw Error("XQST0051: No modules found with the namespace uri "+t);n.La.forEach((function(n){return jo(e,t,n.localName,n.arity,n.Gb)})),n.Va.forEach((function(n){Xo(e,t,n.localName),_o(e,t,n.localName,(function(e,t){return er(n.ia,e,t)}))}))}var Yo="http://www.w3.org/XML/1998/namespace http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2005/xpath-functions http://www.w3.org/2005/xpath-functions/math http://www.w3.org/2012/xquery http://www.w3.org/2005/xpath-functions/array http://www.w3.org/2005/xpath-functions/map".split(" ");function Qo(e,t){var n=[],r=[];qr(e,"*").forEach((function(e){switch(e[0]){case"moduleImport":case"namespaceDecl":case"defaultNamespaceDecl":case"functionDecl":case"varDecl":break;default:throw Error("Not implemented: only module imports, namespace declarations, and function declarations are implemented in XQuery modules")}}));var a=new Set;qr(e,"moduleImport").forEach((function(e){var n=_r(Xr(e,"namespacePrefix"));if(e=_r(Xr(e,"targetNamespace")),a.has(e))throw Error('XQST0047: The namespace "'+e+'" is imported more than once.');a.add(e),t.o[t.h][n]=e,Vo(t,e)})),qr(e,"namespaceDecl").forEach((function(e){var n=_r(Xr(e,"prefix"));if(e=_r(Xr(e,"uri")),"xml"===n||"xmlns"===n)throw pi();if("http://www.w3.org/XML/1998/namespace"===e||"http://www.w3.org/2000/xmlns/"===e)throw pi();t.o[t.h][n]=e}));var i=qr(e,"defaultNamespaceDecl").filter((function(e){if("function"===(e=_r(Xr(e,"defaultNamespaceCategory"))))return e;if("element"===e)throw Error("Not Implemented: default namespace element.")}));if(1===i.length){if(!(i=_r(Xr(Xr(e,"defaultNamespaceDecl"),"uri"))))throw hi();if("http://www.w3.org/XML/1998/namespace"===i||"http://www.w3.org/2000/xmlns/"===i)throw pi();t.J=i}else if(1<i.length)throw Error("XQST0066: A Prolog may contain at most one default function namespace declaration.");qr(e,"functionDecl").forEach((function(e){var a=Xr(e,"functionName"),i=Lr(a,"prefix"),o=Lr(a,"URI"),s=_r(a);if(null===o&&(!(o=null===i?t.J||"http://www.w3.org/2005/xpath-functions":t.ga(i))&&i))throw di(i);if(Yo.includes(o))throw ci();if(a=(i=qr(e,"annotation").map((function(e){return Xr(e,"annotationName")}))).every((function(e){return!Lr(e,"URI")&&"private"!==_r(e)})),i=i.some((function(e){return!Lr(e,"URI")&&"updating"===_r(e)})),!o)throw hi();var u,l=Yr(e),h=qr(Xr(e,"paramList"),"param"),p=h.map((function(e){return Xr(e,"varName")})),f=h.map((function(e){return Yr(e)}));if(e=Xr(e,"functionBody")){if(t.Aa(o,s,f.length))throw Error("XQST0049: The function Q{"+o+"}"+s+"#"+f.length+" has already been declared.");var d=To(e[1],{qa:!1,ca:!0}),m=new Fo(t),v=p.map((function(e){var n=Lr(e,"URI"),r=Lr(e,"prefix");return e=_r(e),r&&null===n&&(n=t.ga(r||"")),Xo(m,n,e)}));u=i?{l:f,arity:p.length,m:function(e,t,n,r){for(var a=[],i=3;i<arguments.length;++i)a[i-3]=arguments[i];return i=bt(xt(e,-1,null,se.empty()),v.reduce((function(e,t,n){return e[t]=ue(a[n]),e}),Object.create(null))),d.o(i,t)},Cb:!1,I:!0,localName:s,namespaceURI:o,j:l}:{l:f,arity:p.length,m:function(e,t,n,r){for(var a=[],i=3;i<arguments.length;++i)a[i-3]=arguments[i];return i=bt(xt(e,-1,null,se.empty()),v.reduce((function(e,t,n){return e[t]=ue(a[n]),e}),Object.create(null))),er(d,i,t)},Cb:!1,I:!1,localName:s,namespaceURI:o,j:l},n.push({ia:d,Lb:m}),a&&r.push({arity:p.length,ia:d,Gb:u,localName:s,namespaceURI:o})}else{if(i)throw Error("Updating external function declarations are not supported");u={l:f,arity:p.length,m:function(e,t,n,r){for(var a=[],i=3;i<arguments.length;++i)a[i-3]=arguments[i];if(!(i=n.Aa(o,s,p.length,!0)))throw Error("XPST0017: Function Q{"+o+"}"+s+" with arity of "+p.length+" not registered. "+xa(s));if(i.j.type!==l.type||i.l.some((function(e,t){return e.type!==f[t].type})))throw Error("External function declaration types do not match actual function");return i.m.apply(i,[e,t,n].concat(c(a)))},Cb:!0,I:!1,localName:s,namespaceURI:o,j:l}}jo(t,o,s,p.length,u)}));var o=[];return qr(e,"varDecl").forEach((function(e){var r=Vr(Xr(e,"varName")),a=r.namespaceURI;if(null===a&&(!(a=t.ga(r.prefix))&&r.prefix))throw di(r.prefix);if(Yo.includes(a))throw ci();var i,s,u=Xr(e,"external");if(e=Xr(e,"varValue"),null!==u?null!==(u=Xr(u,"varValue"))&&(i=Xr(u,"*")):null!==e&&(i=Xr(e,"*")),i&&(s=To(i,{qa:!1,ca:!0})),o.some((function(e){return e.namespaceURI===a&&e.localName===r.localName})))throw Error("XQST0049: The variable "+(a?"Q{"+a+"}":"")+r.localName+" has already been declared.");if(Xo(t,a||"",r.localName),i&&!function(e,t,n){return(e=e.Da[Go(t,n)])?e:null}(t,a||"",r.localName)){var l=null;_o(t,a,r.localName,(function(e,t){return l?l():(l=ue(er(s,e,t)))()})),n.push({ia:s,Lb:t}),o.push({ia:s,localName:r.localName,namespaceURI:a})}})),n.forEach((function(e){e.ia.P(e.Lb)})),r.forEach((function(e){if(!e.Gb.I&&e.ia.I)throw Ln("The function Q{"+e.namespaceURI+"}"+e.localName+" is updating but the %updating annotation is missing.")})),{La:r,Va:o}}function Jo(e,t,n){var r=kr(e,["forClauseItem","typedVariableBinding","varName"])[1];(e=kr(e,["forClauseItem","forExpr","sequenceExpr"]))&&((e=qr(e,"*").map((function(e){return n(e,t)}))).includes(void 0)||e.includes(null)||1===(e=Ko(e)).length&&ss(t,r,e[0]))}function Ko(e){return e.filter((function(e,t,n){return n.findIndex((function(t){return t.type===e.type&&t.g===e.g}))===t}))}function zo(e,t,n){var r=qr(e,"*"),a=Xr(e,"atomicType");if(!a)return{type:59,g:2};if(de(Lr(a,"prefix")+":"+a[2])===t.type)if(1===r.length){if(3===t.g)return n}else if(e=Xr(e,"occurrenceIndicator")[1],t.g===function(e){switch(e){case"*":return 2;case"?":return 0;case"+":return 1;default:return 3}}(e))return n}function Wo(e,t){Zo(e,t)}function Zo(e,t){var n=is.get(e[0]);if(n)return n(e,t);for(n=1;n<e.length;n++)e[n]&&Zo(e[n],t)}function $o(e,t){var n=Zo(Xr(e,"firstOperand")[1],t),r=Zo(Xr(e,"secondOperand")[1],t),a=e[0];if(n&&r){if(!(t=function(e,t,n){var r=[2,53,59,46,47];if(r.includes(t)||r.includes(n))return 2;var a=null,i=null;Z(t,19)&&(a=function(e){return Jt(e,3)},t=3),Z(n,19)&&(i=function(e){return Jt(e,3)},n=3);var o=Sa.filter((function(e){return Z(t,e)}));if(r=Sa.filter((function(e){return Z(n,e)})),o.includes(2)&&r.includes(2))return void 0===(r=Ca[Ba(2,2,e)])&&(r=Oa(t,n)),"divOp"===e&&5===r&&(r=4),"idivOp"===e?Da((function(e,t){return{W:a?a(e):e,X:i?i(t):t}}),(function(e,t){return Math.trunc(e/t)}))[1]:r;for(var s=(o=u(o)).next();!s.done;s=o.next()){s=s.value;for(var l=u(r),c=l.next();!c.done;c=l.next())if(void 0!==(c=Ca[Ba(s,c.value,e)]))return c}}(a,n.type,r.type)))throw Error("XPTY0004: "+a+" not available for types "+fe(n)+" and "+fe(r));n={type:t,g:n.g},2!==t&&59!==t&&Qr(e,n),e=n}else e={type:2,g:3};return e}function es(e,t){Zo(Xr(e,"firstOperand")[1],t),Zo(Xr(e,"secondOperand")[1],t);e:{switch(e[0]){case"orOp":case"andOp":Qr(e,t={type:0,g:3}),e=t;break e}e=void 0}return e}function ts(e,t){Zo(Xr(e,"firstOperand")[1],t),Zo(Xr(e,"secondOperand")[1],t);e:{switch(e[0]){case"unionOp":case"intersectOp":case"exceptOp":Qr(e,t={type:53,g:2}),e=t;break e}e=void 0}return e}function ns(e,t){return Zo(Xr(e,"firstOperand")[1],t),Zo(Xr(e,"secondOperand")[1],t),Qr(e,t={type:0,g:3}),t}function rs(e,t){return Zo(Xr(e,"firstOperand")[1],t),Zo(Xr(e,"secondOperand")[1],t),Qr(e,t={type:0,g:3}),t}function as(e,t){return Zo(Xr(e,"firstOperand")[1],t),Zo(Xr(e,"secondOperand")[1],t),Qr(e,t={type:0,g:3}),t}var is=new Map([["unaryMinusOp",function(e,t){return(t=Zo(Xr(e,"operand")[1],t))?Z(t.type,2)?(Qr(e,t={type:t.type,g:t.g}),e=t):(Qr(e,t={type:3,g:3}),e=t):(Qr(e,t={type:2,g:2}),e=t),e}],["unaryPlusOp",function(e,t){return(t=Zo(Xr(e,"operand")[1],t))?Z(t.type,2)?(Qr(e,t={type:t.type,g:t.g}),e=t):(Qr(e,t={type:3,g:3}),e=t):(Qr(e,t={type:2,g:2}),e=t),e}],["addOp",$o],["subtractOp",$o],["divOp",$o],["idivOp",$o],["modOp",$o],["multiplyOp",$o],["andOp",es],["orOp",es],["sequenceExpr",function(e,t){var n=qr(e,"*"),r=n.map((function(e){return Zo(e,t)}));return function(e,t,n){if(0===t)var r={type:53,g:2};else n.includes(void 0)||n.includes(null)?r={type:59,g:2}:r=1<(t=Ko(n)).length?{type:59,g:2}:{type:t[0].type,g:2};return r&&59!==r.type&&Qr(e,r),r}(e,n.length,r)}],["unionOp",ts],["intersectOp",ts],["exceptOp",ts],["stringConcatenateOp",function(e,t){return Zo(Xr(e,"firstOperand")[1],t),Zo(Xr(e,"secondOperand")[1],t),Qr(e,t={type:1,g:3}),t}],["rangeSequenceExpr",function(e,t){return Zo(Xr(e,"startExpr")[1],t),Zo(Xr(e,"endExpr")[1],t),Qr(e,t={type:5,g:1}),t}],["equalOp",ns],["notEqualOp",ns],["lessThanOrEqualOp",ns],["lessThanOp",ns],["greaterThanOrEqualOp",ns],["greaterThanOp",ns],["eqOp",rs],["neOp",rs],["ltOp",rs],["leOp",rs],["gtOp",rs],["geOp",rs],["isOp",as],["nodeBeforeOp",as],["nodeAfterOp",as],["pathExpr",function(e,t){var n=Xr(e,"rootExpr");return n&&n[1]&&Zo(n[1],t),qr(e,"stepExpr").map((function(e){return Zo(e,t)})),function(e){var t=qr(e,"stepExpr");if(!t)return{type:59,g:2};for(var n=(t=u(t)).next();!n.done;n=t.next()){var r=n.value;if(n=void 0,r){for(var a=qr(r,"*"),i=(a=u(a)).next();!i.done;i=a.next())switch(i=i.value,i[0]){case"filterExpr":n=Lr(kr(i,["*"]),"type");break;case"xpathAxis":e:{switch(i[1]){case"attribute":n={type:47,g:2};break e;case"child":case"decendant":case"self":case"descendant-or-self":case"following-sibling":case"following":case"namespace":case"parent":case"ancestor":case"preceding-sibling":case"preceding":case"ancestor-or-self":n={type:53,g:2};break e}n=void 0}}n&&59!==n.type&&Qr(r,n)}r=Lr(r,"type")}return r&&59!==r.type&&Qr(e,r),r}(e)}],["contextItemExpr",function(){return{type:59,g:2}}],["ifThenElseExpr",function(e,t){Zo(Xr(Xr(e,"ifClause"),"*"),t);var n=Zo(Xr(Xr(e,"thenClause"),"*"),t);return t=Zo(Xr(Xr(e,"elseClause"),"*"),t),n&&t&&n.type===t.type&&n.g===t.g?(59!==n.type&&Qr(e,n),e=n):e={type:59,g:2},e}],["instanceOfExpr",function(e,t){return Zo(Xr(e,"argExpr"),t),Zo(Xr(e,"sequenceType"),t),Qr(e,t={type:0,g:3}),t}],["integerConstantExpr",function(e){var t={type:5,g:3};return Qr(e,t),t}],["doubleConstantExpr",function(e){var t={type:3,g:3};return Qr(e,t),t}],["decimalConstantExpr",function(e){var t={type:4,g:3};return Qr(e,t),t}],["stringConstantExpr",function(e){var t={type:1,g:3};return Qr(e,t),t}],["functionCallExpr",function(e,t){return qr(Xr(e,"arguments"),"*").map((function(e){return Zo(e,t)})),function(e,t){if(!t||!t.ma)return{type:59,g:2};var n=Vr(Xr(e,"functionName")),r=n.localName,a=n.prefix;return n=qr(Xr(e,"arguments"),"*"),(r=t.ma.Qa({localName:r,prefix:a},n.length))&&(t=t.ma.Aa(r.namespaceURI,r.localName,n.length))?(59!==t.j.type&&Qr(e,t.j),t.j):{type:59,g:2}}(e,t)}],["arrowExpr",function(e,t){return Zo(Xr(e,"argExpr")[1],t),function(e,t){if(!t||!t.ma)return{type:59,g:2};var n=Xr(e,"EQName");if(!n)return{type:59,g:2};var r=Vr(n);n=r.localName;var a=r.prefix;return r=qr(Xr(e,"arguments"),"*"),(n=t.ma.Qa({localName:n,prefix:a},r.length))&&(t=t.ma.Aa(n.namespaceURI,n.localName,r.length+1))?(59!==t.j.type&&Qr(e,t.j),t.j):{type:59,g:2}}(e,t)}],["dynamicFunctionInvocationExpr",function(e,t){return Zo(kr(e,["functionItem","*"]),t),(e=Xr(e,"arguments"))&&Zo(e,t),{type:59,g:2}}],["namedFunctionRef",function(e,t){return function(e,t){if(!t||!t.ma)return{type:59,g:2};var n=Vr(Xr(e,"functionName")),r=n.localName,a=n.namespaceURI,i=n.prefix;if(n=Number(kr(e,["integerConstantExpr","value"])[1]),!a){if(!(a=t.ma.Qa({localName:r,prefix:i},n)))return{type:59,g:2};r=a.localName,a=a.namespaceURI}return(t=t.ma.Aa(a,r,n)||null)?(59!==t.j.type&&Qr(e,t.j),t.j):{type:59,g:2}}(e,t)}],["inlineFunctionExpr",function(e,t){return Zo(Xr(e,"functionBody")[1],t),Qr(e,t={type:60,g:3}),t}],["castExpr",function(e){var t=kr(e,["singleType","atomicType"]);return 59!==(t={type:de(t=Lr(t,"prefix")+":"+t[2]),g:3}).type&&Qr(e,t),t}],["castableExpr",function(e){var t={type:0,g:3};return Qr(e,t),t}],["simpleMapExpr",function(e,t){for(var n,r=qr(e,"pathExpr"),a=0;a<r.length;a++)n=Zo(r[a],t);return null!=n?(59!==(t={type:n.type,g:2}).type&&Qr(e,t),e=t):e={type:59,g:2},e}],["mapConstructor",function(e,t){return qr(e,"mapConstructorEntry").map((function(e){return{key:Zo(kr(e,["mapKeyExpr","*"]),t),value:Zo(kr(e,["mapValueExpr","*"]),t)}})),function(e){var t={type:61,g:3};return Qr(e,t),t}(e)}],["arrayConstructor",function(e,t){return qr(Xr(e,"*"),"arrayElem").map((function(e){return Zo(e,t)})),function(e){var t={type:62,g:3};return Qr(e,t),t}(e)}],["unaryLookup",function(e){return Xr(e,"NCName"),{type:59,g:2}}],["typeswitchExpr",function(e,t){return function(e,t,n,r){if(!t||n.includes(void 0))return{type:59,g:2};for(var a=qr(e,"typeswitchExprCaseClause"),i=0;i<n.length;i++){var o=Xr(a[i],"*");switch(o[0]){case"sequenceType":if(o=zo(o,t,n[i]))return 59!==o.type&&Qr(e,o),o;continue;case"sequenceTypeUnion":for(r=qr(o,"*"),a=0;2>a;a++)if(o=zo(r[a],t,n[i]))return 59!==o.type&&Qr(e,o),o;default:return{type:59,g:2}}}return 59!==r.type&&Qr(e,r),r}(e,Zo(Xr(e,"argExpr")[1],t),qr(e,"typeswitchExprCaseClause").map((function(e){return Zo(kr(e,["resultExpr"])[1],t)})),Zo(kr(e,["typeswitchExprDefaultClause","resultExpr"])[1],t))}],["quantifiedExpr",function(e,t){return qr(e,"*").map((function(e){return Zo(e,t)})),function(e){var t={type:0,g:3};return Qr(e,t),t}(e)}],["x:stackTrace",function(e,t){return Zo((e=qr(e,"*"))[0],t)}],["queryBody",function(e,t){return Zo(e[1],t)}],["flworExpr",function(e,t){return function(e,t){for(var n=Zo,r=!1,a=1;a<e.length;a++)switch(e[a][0]){case"letClause":us(t);var i=e[a],o=t,s=n;ss(o,kr(i,["letClauseItem","typedVariableBinding","varName"])[1],s=s((i=kr(i,["letClauseItem","letExpr"]))[1],o));break;case"forClause":r=!0,us(t),Jo(e[a],t,n);break;case"whereClause":us(t),n(o=e[a],t),Qr(o,{type:0,g:3});break;case"orderByClause":us(t);break;case"returnClause":return o=n,Qr(n=kr(a=e[a],["*"]),t=o(n,t)),Qr(a,t),(n=t)?(r&&(n={type:n.type,g:2}),59!==n.type&&Qr(e,n),n):{type:59,g:2};default:return(n=n(e[a],t))?(r&&(n={type:n.type,g:2}),59!==n.type&&Qr(e,n),n):{type:59,g:2}}if(!(0<t.h))throw Error("Variable scope out of bound");t.h--,t.o.pop()}(e,t)}],["varRef",function(e,t){e:{for(var n=e[1][1],r=t.h;0<=r;){t=t.o[r][n];break e}throw Error("XPST0008, The variable "+n+" is not in scope.")}return t&&59!==t.type&&Qr(e,t),t}]]);function os(e){this.h=0,this.ma=e,this.o=[{}]}function ss(e,t,n){if(e.o[e.h][t])throw Error("Another variable of in the scope "+e.h+" with the same name "+t+" already exists");e.o[e.h][t]=n}function us(e){e.h++,e.o.push({})}var ls={},cs=(ls.xml="http://www.w3.org/XML/1998/namespace",ls.xs="http://www.w3.org/2001/XMLSchema",ls.fn="http://www.w3.org/2005/xpath-functions",ls.map="http://www.w3.org/2005/xpath-functions/map",ls.array="http://www.w3.org/2005/xpath-functions/array",ls.math="http://www.w3.org/2005/xpath-functions/math",ls.fontoxpath="http://fontoxml.com/fontoxpath",ls.local="http://www.w3.org/2005/xquery-local-functions",ls);function hs(e,t,n){this.Ca=[Object.create(null)],this.Da=Object.create(null),this.v=e,this.C=Object.keys(t).reduce((function(e,n){return void 0===t[n]||(e[n]="Q{}"+n+"[0]"),e}),Object.create(null)),this.o=Object.create(null),this.h=Object.create(null),this.J=n,this.B=[]}function ps(e,t,n){if(1!==t.node.nodeType&&9!==t.node.nodeType)return[];var r=Se(e,t).reduce((function(t,r){for(var a=(r=u(ps(e,r,n))).next();!a.done;a=r.next())t.push(a.value);return t}),[]);return n(t)&&r.unshift(t),r}function fs(e,t,n,r,a){if(!(e=a.first()))throw Error("XPDY0002: The context is absent, it needs to be present to use id function.");if(!Z(e.type,53))throw Ct("The context item is not a node, it needs to be node to use id function.");var i=t.h,o=r.S().reduce((function(e,t){return t.value.split(/\s+/).forEach((function(t){e[t]=!0})),e}),Object.create(null));for(t=e.value;9!==t.node.nodeType;)if(null===(t=Ue(i,t)))throw Error("FODC0001: the root node of the target node is not a document node.");return t=ps(i,t,(function(e){return 1===e.node.nodeType&&(!(!(e=Oe(i,e,"id"))||!o[e])&&(o[e]=!1,!0))})),se.create(t.map((function(e){return Xe(e)})))}function ds(e,t,n,r,a){if(!(e=a.first()))throw Error("XPDY0002: The context is absent, it needs to be present to use idref function.");if(!Z(e.type,53))throw Ct("The context item is not a node, it needs to be node to use idref function.");var i=t.h,o=r.S().reduce((function(e,t){return e[t.value]=!0,e}),Object.create(null));for(t=e.value;9!==t.node.nodeType;)if(null===(t=Ue(i,t)))throw Error("FODC0001: the root node of the context node is not a document node.");return t=ps(i,t,(function(e){return 1===e.node.nodeType&&(!!(e=Oe(i,e,"idref"))&&e.split(/\s+/).some((function(e){return o[e]})))})),se.create(t.map((function(e){return Xe(e)})))}function ms(e,t,n,r,a){var i=(e=ke(0,0,0,a,se.s(V("duplicates",1)))).F()?"use-first":e.first().value;return r.M((function(e){return se.s(new qe(e.reduce((function(e,t){return t.h.forEach((function(t){var n=e.findIndex((function(e){return Le(e.key,t.key)}));if(0<=n)switch(i){case"reject":throw Error("FOJS0003: Duplicate encountered when merging maps.");case"use-last":return void e.splice(n,1,t);case"combine":return void e.splice(n,1,{key:t.key,value:ue(se.create(e[n].value().S().concat(t.value().S())))});default:return}e.push(t)})),e}),[])))}))}function vs(e,t,n){var r=1,a=e.value;e=e.ya(!0);var i=null,o=Math.max(t-1,0);return-1!==e&&(i=Math.max(0,(null===n?e:Math.max(0,Math.min(e,n+(t-1))))-o)),se.create({next:function(e){for(;r<t;)a.next(e),r++;return null!==n&&r>=t+n?z:(e=a.next(e),r++,e)}},i)}function gs(e){return e.map((function(e){return Z(e.type,19)?Jt(e,3):e}))}function ys(e){if((e=gs(e)).some((function(e){return Number.isNaN(e.value)})))return[V(NaN,3)];if(!(e=si(e)))throw Error("FORG0006: Incompatible types to be converted to a common type");return e}function ws(e,t,n,r,a,i){return _e([a,i],(function(e){var t=u(e);if(e=t.next().value,t=t.next().value,1/0===e.value)return se.empty();if(-1/0===e.value)return t&&1/0===t.value?se.empty():r;if(t){if(isNaN(t.value))return se.empty();1/0===t.value&&(t=null)}return isNaN(e.value)?se.empty():vs(r,Math.round(e.value),t?Math.round(t.value):null)}))}function As(e,t,n,r,a){if(r.F())return a;if(!(e=si(e=gs(r.S()))))throw Error("FORG0006: Incompatible types to be converted to a common type");if(!e.every((function(e){return Z(e.type,2)})))throw Error("FORG0006: items passed to fn:sum are not all numeric.");return t=e.reduce((function(e,t){return e+t.value}),0),e.every((function(e){return Z(e.type,5)}))?se.s(V(t,5)):e.every((function(e){return Z(e.type,3)}))?se.s(V(t,3)):e.every((function(e){return Z(e.type,4)}))?se.s(V(t,4)):se.s(V(t,6))}hs.prototype.Aa=function(e,t,n){return function(e,t,n){var r=wa[e+":"+t];return r&&(r=r.find((function(e){return e.l.some((function(e){return 4===e}))?e.l.length-1<=n:e.l.length===n})))?{l:r.l,arity:n,m:r.m,I:r.I,localName:t,namespaceURI:e,j:r.j}:null}(e,t,n)},hs.prototype.rb=function(e,t){return e?null:(e=this.C[t],this.o[t]||(this.o[t]={name:t}),e)},hs.prototype.Qa=function(e,t){var n=this.J(e,t);if(n)this.B.push({oc:e,arity:t,Jb:n});else if(t=this.ga(e.prefix,!0))return{namespaceURI:t,localName:e.localName};return n},hs.prototype.ga=function(e,t){return void 0===t||t?cs[e]?cs[e]:(t=this.v(e),this.h[e]||(this.h[e]={namespaceURI:t,prefix:e}),void 0!==t||e?t:null):null};var xs=[].concat(Nr,[{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"boolean",l:[{type:59,g:2}],j:{type:0,g:3},m:function(e,t,n,r){return r.getEffectiveBooleanValue()?se.$():se.U()}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"true",l:[],j:{type:0,g:3},m:function(){return se.$()}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"not",l:[{type:59,g:2}],j:{type:0,g:3},m:function(e,t,n,r){return!1===r.getEffectiveBooleanValue()?se.$():se.U()}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"false",l:[],j:{type:0,g:3},m:function(){return se.U()}}],[{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"last",l:[],j:{type:5,g:3},m:function(e){if(null===e.O)throw Error("XPDY0002: The fn:last() function depends on dynamic context, which is absent.");var t=!1;return se.create({next:function(){if(t)return z;var n=e.wa.ya();return t=!0,W(V(n,5))}},1)}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"position",l:[],j:{type:5,g:3},m:function(e){if(null===e.O)throw Error("XPDY0002: The fn:position() function depends on dynamic context, which is absent.");return se.s(V(e.Ga+1,5))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"current-dateTime",l:[],j:{type:10,g:3},m:function(e){return se.s(V(wt(e),10))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"current-date",l:[],j:{type:7,g:3},m:function(e){return se.s(V(it(wt(e),7),7))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"current-time",l:[],j:{type:8,g:3},m:function(e){return se.s(V(it(wt(e),8),8))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"implicit-timezone",l:[],j:{type:17,g:3},m:function(e){return se.s(V(At(e),17))}}],Tr,Ur,Pr,[{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"years-from-duration",l:[{type:18,g:0}],j:{type:5,g:0},m:function(e,t,n,r){return r.F()?r:se.s(V(r.first().value.cb(),5))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"months-from-duration",l:[{type:18,g:0}],j:{type:5,g:0},m:function(e,t,n,r){return r.F()?r:se.s(V(r.first().value.$a(),5))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"days-from-duration",l:[{type:18,g:0}],j:{type:5,g:0},m:function(e,t,n,r){return r.F()?r:se.s(V(r.first().value.Za(),5))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"hours-from-duration",l:[{type:18,g:0}],j:{type:5,g:0},m:function(e,t,n,r){return r.F()?r:se.s(V(r.first().value.getHours(),5))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"minutes-from-duration",l:[{type:18,g:0}],j:{type:5,g:0},m:function(e,t,n,r){return r.F()?r:se.s(V(r.first().value.getMinutes(),5))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"seconds-from-duration",l:[{type:18,g:0}],j:{type:4,g:0},m:function(e,t,n,r){return r.F()?r:se.s(V(r.first().value.getSeconds(),4))}}],[{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"id",l:[{type:1,g:2},{type:53,g:3}],j:{type:54,g:2},m:fs},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"id",l:[{type:1,g:2}],j:{type:54,g:2},m:function(e,t,n,r){return fs(e,t,0,r,se.s(e.O))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"idref",l:[{type:1,g:2},{type:53,g:3}],j:{type:53,g:2},m:ds},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"idref",l:[{type:1,g:2}],j:{type:53,g:2},m:function(e,t,n,r){return ds(e,t,0,r,se.s(e.O))}}],[{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"parse-json",l:[{type:1,g:3}],j:{type:59,g:0},m:function(e,t,n,r){try{var a=JSON.parse(r.first().value)}catch(e){throw Error("FOJS0001: parsed JSON string contains illegal JSON.")}return function e(t){switch(typeof t){case"object":return Array.isArray(t)?se.s(new He(t.map((function(t){return ue(e(t))})))):null===t?se.empty():se.s(new qe(Object.keys(t).map((function(n){return{key:V(n,1),value:ue(e(t[n]))}}))));case"number":return se.s(V(t,3));case"string":return se.s(V(t,1));case"boolean":return t?se.$():se.U();default:throw Error("Unexpected type in JSON parse")}}(a)}}],[{namespaceURI:"http://www.w3.org/2005/xpath-functions/map",localName:"contains",l:[{type:61,g:3},{type:46,g:3}],j:{type:0,g:3},m:function(e,t,n,r,a){return _e([r,a],(function(e){var t=(e=u(e)).next().value,n=e.next().value;return t.h.some((function(e){return Le(e.key,n)}))?se.$():se.U()}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/map",localName:"entry",l:[{type:46,g:3},{type:59,g:2}],j:{type:61,g:3},m:function(e,t,n,r,a){return r.map((function(e){return new qe([{key:e,value:ue(a)}])}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/map",localName:"for-each",l:[{type:61,g:3},{type:59,g:2}],j:{type:59,g:2},m:function(e,t,n,r,a){return _e([r,a],(function(r){var a=(r=u(r)).next().value,i=r.next().value;return Bt(a.h.map((function(r){return i.value.call(void 0,e,t,n,se.s(r.key),r.value())})))}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/map",localName:"get",l:[{type:61,g:3},{type:46,g:3}],j:{type:59,g:2},m:ke},{namespaceURI:"http://www.w3.org/2005/xpath-functions/map",localName:"keys",l:[{type:61,g:3}],j:{type:46,g:2},m:function(e,t,n,r){return _e([r],(function(e){return e=u(e).next().value,se.create(e.h.map((function(e){return e.key})))}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/map",localName:"merge",l:[{type:61,g:2},{type:61,g:3}],j:{type:61,g:3},m:ms},{namespaceURI:"http://www.w3.org/2005/xpath-functions/map",localName:"merge",l:[{type:61,g:2}],j:{type:61,g:3},m:function(e,t,n,r){return ms(e,0,0,r,se.s(new qe([{key:V("duplicates",1),value:function(){return se.s(V("use-first",1))}}])))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/map",localName:"put",l:[{type:61,g:3},{type:46,g:3},{type:59,g:2}],j:{type:61,g:3},m:function(e,t,n,r,a,i){return _e([r,a],(function(e){var t=(e=u(e)).next().value,n=e.next().value;return e=t.h.concat(),0<=(t=e.findIndex((function(e){return Le(e.key,n)})))?e.splice(t,1,{key:n,value:ue(i)}):e.push({key:n,value:ue(i)}),se.s(new qe(e))}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/map",localName:"remove",l:[{type:61,g:3},{type:46,g:2}],j:{type:61,g:3},m:function(e,t,n,r,a){return _e([r],(function(e){var t=u(e).next().value.h.concat();return a.M((function(e){return e.forEach((function(e){var n=t.findIndex((function(t){return Le(t.key,e)}));0<=n&&t.splice(n,1)})),se.s(new qe(t))}))}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/map",localName:"size",l:[{type:61,g:3}],j:{type:5,g:3},m:function(e,t,n,r){return r.map((function(e){return V(e.h.length,5)}))}}],[{namespaceURI:"http://www.w3.org/2005/xpath-functions/math",localName:"pi",l:[],j:{type:3,g:3},m:function(){return se.s(V(Math.PI,3))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/math",localName:"exp",l:[{type:3,g:0}],j:{type:3,g:0},m:function(e,t,n,r){return r.map((function(e){return V(Math.pow(Math.E,e.value),3)}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/math",localName:"exp10",l:[{type:3,g:0}],j:{type:3,g:0},m:function(e,t,n,r){return r.map((function(e){return V(Math.pow(10,e.value),3)}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/math",localName:"log",l:[{type:3,g:0}],j:{type:3,g:0},m:function(e,t,n,r){return r.map((function(e){return V(Math.log(e.value),3)}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/math",localName:"log10",l:[{type:3,g:0}],j:{type:3,g:0},m:function(e,t,n,r){return r.map((function(e){return V(Math.log10(e.value),3)}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/math",localName:"pow",l:[{type:3,g:0},{type:2,g:3}],j:{type:3,g:0},m:function(e,t,n,r,a){return a.M((function(e){var t=u(e).next().value;return r.map((function(e){return 1!==Math.abs(e.value)||Number.isFinite(t.value)?V(Math.pow(e.value,t.value),3):V(1,3)}))}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/math",localName:"sqrt",l:[{type:3,g:0}],j:{type:3,g:0},m:function(e,t,n,r){return r.map((function(e){return V(Math.sqrt(e.value),3)}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/math",localName:"sin",l:[{type:3,g:0}],j:{type:3,g:0},m:function(e,t,n,r){return r.map((function(e){return V(Math.sin(e.value),3)}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/math",localName:"cos",l:[{type:3,g:0}],j:{type:3,g:0},m:function(e,t,n,r){return r.map((function(e){return V(Math.cos(e.value),3)}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/math",localName:"tan",l:[{type:3,g:0}],j:{type:3,g:0},m:function(e,t,n,r){return r.map((function(e){return V(Math.tan(e.value),3)}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/math",localName:"asin",l:[{type:3,g:0}],j:{type:3,g:0},m:function(e,t,n,r){return r.map((function(e){return V(Math.asin(e.value),3)}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/math",localName:"acos",l:[{type:3,g:0}],j:{type:3,g:0},m:function(e,t,n,r){return r.map((function(e){return V(Math.acos(e.value),3)}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/math",localName:"atan",l:[{type:3,g:0}],j:{type:3,g:0},m:function(e,t,n,r){return r.map((function(e){return V(Math.atan(e.value),3)}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions/math",localName:"atan2",l:[{type:3,g:0},{type:3,g:3}],j:{type:3,g:0},m:function(e,t,n,r,a){return a.M((function(e){var t=u(e).next().value;return r.map((function(e){return V(Math.atan2(e.value,t.value),3)}))}))}}],Mn,pn,[{namespaceURI:"http://fontoxpath/operators",localName:"to",l:[{type:5,g:0},{type:5,g:0}],j:{type:5,g:2},m:function(e,t,n,r,a){if(e=r.first(),a=a.first(),null===e||null===a)return se.empty();var i=e.value;return a=a.value,i>a?se.empty():se.create({next:function(){return W(V(i++,5))}},a-i+1)}}],[{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"QName",l:[{type:1,g:0},{type:1,g:3}],j:{type:23,g:3},m:function(e,t,n,r,a){return _e([r,a],(function(e){var t=u(e);if(e=t.next().value,!Mt(t=t.next().value.value,23))throw Error("FOCA0002: The provided QName is invalid.");if(null===(e=e&&e.value||null)&&t.includes(":"))throw Error("FOCA0002: The URI of a QName may not be empty if a prefix is provided.");if(r.F())return se.s(V(new ve("",null,t),23));if(!t.includes(":"))return se.s(V(new ve("",e,t),23));var n=u(t.split(":"));return t=n.next().value,n=n.next().value,se.s(V(new ve(t,e,n),23))}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"prefix-from-QName",l:[{type:23,g:0}],j:{type:24,g:0},m:function(e,t,n,r){return _e([r],(function(e){return null===(e=u(e).next().value)?se.empty():(e=e.value).prefix?se.s(V(e.prefix,24)):se.empty()}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"local-name-from-QName",l:[{type:23,g:0}],j:{type:24,g:0},m:function(e,t,n,r){return r.map((function(e){return V(e.value.localName,24)}))}},{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:"namespace-uri-from-QName",l:[{type:23,g:0}],j:{type:20,g:0},m:function(e,t,n,r){return r.map((function(e){return V(e.value.namespaceURI||"",20)}))}}],[{l:[{type:59,g:2}],m:function(e,t,n,r){return r.aa({empty:function(){return se.$()},multiple:function(){return se.U()},s:function(){return se.U()}})},localName:"empty",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:0,g:3}},{l:[{type:59,g:2}],m:function(e,t,n,r){return r.aa({empty:function(){return se.U()},multiple:function(){return se.$()},s:function(){return se.$()}})},localName:"exists",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:0,g:3}},{l:[{type:59,g:2}],m:function(e,t,n,r){return vs(r,1,1)},localName:"head",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:59,g:0}},{l:[{type:59,g:2}],m:function(e,t,n,r){return vs(r,2,null)},localName:"tail",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:59,g:2}},{l:[{type:59,g:2},{type:5,g:3},{type:59,g:2}],m:function(e,t,n,r,a,i){return r.F()?i:i.F()?r:(e=r.S(),0>(a=a.first().value-1)?a=0:a>e.length&&(a=e.length),t=e.slice(a),se.create(e.slice(0,a).concat(i.S(),t)))},localName:"insert-before",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:59,g:2}},{l:[{type:59,g:2},{type:5,g:3}],m:function(e,t,n,r,a){return e=a.first().value,!(r=r.S()).length||1>e||e>r.length||r.splice(e-1,1),se.create(r)},localName:"remove",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:59,g:2}},{l:[{type:59,g:2}],m:function(e,t,n,r){return r.M((function(e){return se.create(e.reverse())}))},localName:"reverse",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:59,g:2}},{l:[{type:59,g:2},{type:3,g:3}],m:function(e,t,n,r,a){return ws(0,0,0,r,a,se.empty())},localName:"subsequence",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:59,g:2}},{l:[{type:59,g:2},{type:3,g:3},{type:3,g:3}],m:ws,localName:"subsequence",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:59,g:2}},{l:[{type:59,g:2}],m:function(e,t,n,r){return r},localName:"unordered",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:59,g:2}},{l:[{type:46,g:2},{type:46,g:3}],m:function(e,t,n,r,a){return a.M((function(n){var a=u(n).next().value;return St(r,t).map((function(t,n){return La("eqOp",t.type,a.type)(t,a,e)?V(n+1,5):V(-1,5)})).filter((function(e){return-1!==e.value}))}))},localName:"index-of",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:5,g:2}},{l:[{type:46,g:2},{type:46,g:3},{type:1,g:3}],m:function(){throw Error("FOCH0002: No collations are supported")},localName:"index-of",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:5,g:2}},{l:[{type:59,g:2},{type:59,g:2}],m:function(e,t,n,r,a){var i=!1,o=jn(e,t,n,r,a);return se.create({next:function(){if(i)return z;var e=o.next(0);return e.done?e:(i=!0,W(V(e.value,0)))}})},localName:"deep-equal",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:0,g:3}},{l:[{type:59,g:2},{type:59,g:2},{type:1,g:3}],m:function(){throw Error("FOCH0002: No collations are supported")},localName:"deep-equal",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:0,g:3}},{l:[{type:59,g:2}],m:function(e,t,n,r){var a=!1;return se.create({next:function(){if(a)return z;var e=r.ya();return a=!0,W(V(e,5))}})},localName:"count",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:5,g:3}},{l:[{type:46,g:2}],m:function(e,t,n,r){if(r.F())return r;if(!(e=si(e=gs(r.S()))))throw Error("FORG0006: Incompatible types to be converted to a common type");if(!e.every((function(e){return Z(e.type,2)})))throw Error("FORG0006: items passed to fn:avg are not all numeric.");return t=e.reduce((function(e,t){return e+t.value}),0)/e.length,e.every((function(e){return Z(e.type,5)||Z(e.type,3)}))?se.s(V(t,3)):e.every((function(e){return Z(e.type,4)}))?se.s(V(t,4)):se.s(V(t,6))},localName:"avg",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:46,g:0}},{l:[{type:46,g:2}],m:function(e,t,n,r){return r.F()?r:(e=ys(r.S()),se.s(e.reduce((function(e,t){return e.value<t.value?t:e}))))},localName:"max",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:46,g:0}},{l:[{type:46,g:2},{type:1,g:3}],m:function(){throw Error("FOCH0002: No collations are supported")},localName:"max",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:46,g:0}},{l:[{type:46,g:2}],m:function(e,t,n,r){return r.F()?r:(e=ys(r.S()),se.s(e.reduce((function(e,t){return e.value>t.value?t:e}))))},localName:"min",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:46,g:0}},{l:[{type:46,g:2},{type:1,g:3}],m:function(){throw Error("FOCH0002: No collations are supported")},localName:"min",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:46,g:0}},{l:[{type:46,g:2}],m:function(e,t,n,r){return As(e,t,0,r,se.s(V(0,5)))},localName:"sum",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:46,g:3}},{l:[{type:46,g:2},{type:46,g:0}],m:As,localName:"sum",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:46,g:0}},{l:[{type:59,g:2}],m:function(e,t,n,r){if(!r.F()&&!r.za())throw Error("FORG0003: The argument passed to fn:zero-or-one contained more than one item.");return r},localName:"zero-or-one",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:59,g:0}},{l:[{type:59,g:2}],m:function(e,t,n,r){if(r.F())throw Error("FORG0004: The argument passed to fn:one-or-more was empty.");return r},localName:"one-or-more",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:59,g:1}},{l:[{type:59,g:2}],m:function(e,t,n,r){if(!r.za())throw Error("FORG0005: The argument passed to fn:exactly-one is empty or contained more than one item.");return r},localName:"exactly-one",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:59,g:3}},{l:[{type:59,g:2},{type:60,g:3}],m:function(e,t,n,r,a){if(r.F())return r;var i=a.first(),o=i.o;if(1!==o.length)throw Error("XPTY0004: signature of function passed to fn:filter is incompatible.");return r.filter((function(r){if(r=sn(o[0],se.s(r),t,"fn:filter",!1),!(r=i.value.call(void 0,e,t,n,r)).za()||!Z(r.first().type,0))throw Error("XPTY0004: signature of function passed to fn:filter is incompatible.");return r.first().value}))},localName:"filter",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:59,g:2}},{l:[{type:59,g:2},{type:60,g:3}],m:function(e,t,n,r,a){if(r.F())return r;var i=a.first(),o=i.o;if(1!==o.length)throw Error("XPTY0004: signature of function passed to fn:for-each is incompatible.");var s,u=r.value;return se.create({next:function(r){for(;;){if(!s){var a=u.next(0);if(a.done)return a;a=sn(o[0],se.s(a.value),t,"fn:for-each",!1),s=i.value.call(void 0,e,t,n,a).value}if(!(a=s.next(r)).done)return a;s=null}}})},localName:"for-each",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:59,g:2}},{l:[{type:59,g:2},{type:59,g:2},{type:60,g:3}],m:function(e,t,n,r,a,i){if(r.F())return r;var o=i.first(),s=o.o;if(2!==s.length)throw Error("XPTY0004: signature of function passed to fn:fold-left is incompatible.");return r.M((function(r){return r.reduce((function(r,a){return r=sn(s[0],r,t,"fn:fold-left",!1),a=sn(s[1],se.s(a),t,"fn:fold-left",!1),o.value.call(void 0,e,t,n,r,a)}),a)}))},localName:"fold-left",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:59,g:2}},{l:[{type:59,g:2},{type:59,g:2},{type:60,g:3}],m:function(e,t,n,r,a,i){if(r.F())return r;var o=i.first(),s=o.o;if(2!==s.length)throw Error("XPTY0004: signature of function passed to fn:fold-right is incompatible.");return r.M((function(r){return r.reduceRight((function(r,a){return r=sn(s[0],r,t,"fn:fold-right",!1),a=sn(s[1],se.s(a),t,"fn:fold-right",!1),o.value.call(void 0,e,t,n,a,r)}),a)}))},localName:"fold-right",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:59,g:2}}],bn,[{l:[{type:1,g:3},{type:61,g:3}],m:function(e,t,n,r,a){var i,o;return se.create({next:function(){if(!i){o=r.value.next(0).value.value;var e=a.first().h.reduce((function(e,t){return e[t.key.value]=ue(t.value()),e}),Object.create(null)),s=e["."]?e["."]():se.empty();delete e["."];var u=new hs((function(e){return n.ga(e)}),Object.keys(e).reduce((function(e,t){return e[t]=t,e}),{}),(function(e,t){return n.Qa(e,t)})),l=new Fo(u),c=Mo(o,{ca:!1,debug:t.debug});t.Ta&&Wo(c,new os(l));var h=kr(c,["mainModule","prolog"]);h&&Qo(h,l),c=To(c=kr(c,["mainModule","queryBody","*"]),{qa:!1,ca:!0});try{c.P(l)}catch(e){jr(o,e)}l=Object.keys(e).reduce((function(t,n){return t[u.rb(null,n)]=e[n],t}),Object.create(null)),s=new gt(s=s.F()?{O:null,Ga:-1,wa:s,ta:l}:{O:s.first(),Ga:0,wa:s,ta:l});try{i=c.evaluate(s,t).value}catch(e){jr(o,e)}}try{return i.next(0)}catch(e){jr(o,e)}}})},localName:"evaluate",namespaceURI:"http://fontoxml.com/fontoxpath",j:{type:59,g:2}},{l:[],m:function(){return se.s(V("3.20.4",1))},localName:"version",namespaceURI:"http://fontoxml.com/fontoxpath",j:{type:1,g:3}}],[{l:[{type:23,g:3},{type:5,g:3}],m:function(e,t,n,r,a){return _e([r,a],(function(e){var t=u(e);e=t.next().value,t=t.next().value;var r=n.Aa(e.value.namespaceURI,e.value.localName,t.value);return null===r?se.empty():(e=new ge({l:r.l,arity:t.value,localName:e.value.localName,namespaceURI:e.value.namespaceURI,j:r.j,value:r.m}),se.s(e))}))},localName:"function-lookup",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{g:0,type:60}},{l:[{type:60,g:3}],m:function(e,t,n,r){return _e([r],(function(e){return(e=u(e).next().value).Oa()?se.empty():se.s(V(new ve("",e.v,e.J),23))}))},localName:"function-name",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:23,g:0}},{l:[{type:60,g:3}],m:function(e,t,n,r){return _e([r],(function(e){return e=u(e).next().value,se.s(V(e.B,5))}))},localName:"function-arity",namespaceURI:"http://www.w3.org/2005/xpath-functions",j:{type:5,g:3}}]);function bs(e){this.h=e}(n=bs.prototype).createAttributeNS=function(e,t){return this.h.createAttributeNS(e,t)},n.createCDATASection=function(e){return this.h.createCDATASection(e)},n.createComment=function(e){return this.h.createComment(e)},n.createDocument=function(){return this.h.createDocument()},n.createElementNS=function(e,t){return this.h.createElementNS(e,t)},n.createProcessingInstruction=function(e,t){return this.h.createProcessingInstruction(e,t)},n.createTextNode=function(e){return this.h.createTextNode(e)};var Es=Object.create(null),Bs=Object.create(null);function Ns(e,t,n,r,a,i){this.J=e,this.v=t,this.h=n,this.B=r,this.o=a,this.C=i}function Cs(e,t){return e+(t?"_DEBUG":"")}function Ts(e,t,n){return t=Cs(t,n),(n=Bs[e])?n[t]||null:(e=Es[e])&&(e=e[t])&&0!==e.length?e[0].h:null}function Is(e,t,n,r,a,i,o){!function(e,t,n,r){t=Cs(t,n),(e=Bs[e])&&(n=e[t])&&n===r&&delete e[t]}(e,t,i,a);var s=Es[e];s||(s=Es[e]=Object.create(null)),(t=s[e=Cs(t,i)])||(t=s[e]=[]),t.push(new Ns(Object.values(n.h),Object.values(n.o),a,Object.keys(r).map((function(e){return{namespaceURI:r[e],prefix:e}})),o,n.B))}function Os(e,t,n,r,a,i,o){var s=t.ca?"XQuery":"XPath",u=t.ob?null:function(e,t,n,r,a,i,o,s){var u=Es[e];return u?(u=u[t=Cs(t,i)])&&(u=u.find((function(e){return e.o===o&&e.J.every((function(e){return n(e.prefix)===e.namespaceURI}))&&e.v.every((function(e){return void 0!==r[e.name]}))&&e.B.every((function(e){return a[e.prefix]===e.namespaceURI}))&&e.C.every((function(e){var t=s(e.oc,e.arity);return t&&t.namespaceURI===e.Jb.namespaceURI&&t.localName===e.Jb.localName}))})))?{ia:u.h,sb:!1}:(e=Bs[e]&&Bs[e][t])?{ia:e,sb:!0}:null:(e=Ts(e,t,i))?{ia:e,sb:!0}:null}(e,s,n,r,a,t.debug,i,o),l=new Fo(n=new hs(n,r,o));if(null!==u)r=u.ia;else{if(r=Mo(e,t),o=new os(l),t.Ta&&Zo(r,o),!(o=Xr(r,"mainModule")))throw Error("Can not execute a library module.");if(r=Xr(o,"prolog"),o=kr(o,["queryBody","*"]),r){if(!t.ca)throw Error("XPST0003: Use of XQuery functionality is not allowed in XPath context");Qo(r,l)}r=Eo(o,t)}return(null===u||u.sb)&&(Object.keys(a).forEach((function(e){var t=a[e];Vo(l,t),l.o[l.h][e]=t})),r.P(l),t.ob||Is(e,s,n,a,r,t.debug,i)),{ia:r,ma:l}}var Ss=Symbol("IS_XPATH_VALUE_SYMBOL");function Rs(e){return e&&"object"==typeof e&&"lookupNamespaceURI"in e?function(t){return e.lookupNamespaceURI(t||null)}:function(){return null}}function Ds(e){return e.replace(/(\x0D\x0A)|(\x0D(?!\x0A))/g,String.fromCharCode(10))}function Ms(e){return function(t){var n=t.localName;return t.prefix?null:{namespaceURI:e,localName:n}}}function Gs(e,t,n,r,a,i){var o,s,l,c,h,p;null==r&&(r=r||{}),a?(o=a.logger||{trace:console.log.bind(console)},s=a.documentWriter,l=a.moduleImports,c=a.namespaceResolver,h=a.functionNameResolver,p=a.nodesFactory):(o={trace:console.log.bind(console)},l={},c=null,p=null,s=null,h=void 0);var f=new Te(null===n?new xe:n);e=Ds(e),n=l||Object.create(null),l=a.defaultFunctionNamespaceURI||"http://www.w3.org/2005/xpath-functions";var d=Os(e,i,c||Rs(t),r,n,l,h||Ms(l));for(e=t?vt(0,t):se.empty(),t=!p&&i.ca?new nr(t):new bs(p),s=s?new Be(s):Ee,p=Object.keys(r).reduce((function(e,t){var n=r[t];return e["Q{}"+t+"[0]"]=n&&"object"==typeof n&&Ss in n?function(){return se.create(n.Eb)}:function(){return vt(0,r[t])},e}),Object.create(null)),c={},n=(h=u(Object.keys(d.ma.Da))).next();!n.done;c={Wa:c.Wa},n=h.next())c.Wa=n.value,p[c.Wa]||(p[c.Wa]=function(e){return function(){return(0,d.ma.Da[e.Wa])(m,v)}}(c));var m=new gt({O:e.first(),Ga:0,wa:e,ta:p}),v=new Et(i.debug,f,t,s,a.currentContext,o);return{zb:m,Ab:v,ia:d.ia}}function Us(e,t){var n={},r=0,a=!1,i=null;return{next:function(){if(a)return z;for(var o={};r<e.h.length;){e:{var s=e.h[r].key.value;if(!i){o.kb=e.h[r];var u=o.kb.value().aa({default:function(e){return e},multiple:function(e){return function(){throw Error("Serialization error: The value of an entry in a map is expected to be a single item or an empty sequence. Use arrays when putting multiple values in a map. The value of the key "+e.kb.key.value+" holds multiple items")}}(o)}).first();if(null===u){n[s]=null,r++;break e}i=Ps(u,t)}u=i.next(0),i=null,n[s]=u.value,r++}o={kb:o.kb}}return a=!0,W(n)}}}function Fs(e,t){var n=[],r=0,a=!1,i=null;return{next:function(){if(a)return z;for(;r<e.R.length;){if(!i){var o=e.R[r]().aa({default:function(e){return e},multiple:function(){throw Error("Serialization error: The value of an entry in an array is expected to be a single item or an empty sequence. Use nested arrays when putting multiple values in an array.")}}).first();if(null===o){n[r++]=null;continue}i=Ps(o,t)}o=i.next(0),i=null,n[r++]=o.value}return a=!0,W(n)}}}function Ps(e,t){if(Z(e.type,61))return Us(e,t);if(Z(e.type,62))return Fs(e,t);if(Z(e.type,23)){var n=e.value;return{next:function(){return W("Q{"+(n.namespaceURI||"")+"}"+n.localName)}}}switch(e.type){case 7:case 8:case 9:case 11:case 12:case 13:case 14:case 15:var r=e.value;return{next:function(){return W(ot(r))}};case 47:case 53:case 54:case 55:case 56:case 57:case 58:var a=e.value;return{next:function(){return W(Gi(a,t,!1))}};default:return{next:function(){return W(e.value)}}}}xs.forEach((function(e){ba(e.namespaceURI,e.localName,e.l,e.j,e.m)}));var Hs={ANY:0,NUMBER:1,STRING:2,BOOLEAN:3,NODES:7,FIRST_NODE:9,STRINGS:10,MAP:11,ARRAY:12,NUMBERS:13,ASYNC_ITERATOR:99};function js(e,t,n,r){switch(n){case 3:return t.getEffectiveBooleanValue();case 2:return(t=St(t,r).S()).length?t.map((function(e){return Jt(e,1).value})).join(" "):"";case 10:return(t=St(t,r).S()).length?t.map((function(e){return e.value+""})):[];case 1:return null!==(t=t.first())&&Z(t.type,2)?t.value:NaN;case 9:if(null===(t=t.first()))return null;if(!Z(t.type,53))throw Error("Expected XPath "+e+" to resolve to Node. Got "+t.type);return Gi(t.value,r,!1);case 7:if(!(t=t.S()).every((function(e){return Z(e.type,53)})))throw Error("Expected XPath "+e+" to resolve to a sequence of Nodes.");return t.map((function(e){return Gi(e.value,r,!1)}));case 11:if(1!==(t=t.S()).length)throw Error("Expected XPath "+e+" to resolve to a single map.");if(!Z((t=t[0]).type,61))throw Error("Expected XPath "+e+" to resolve to a map");return Us(t,r).next(0).value;case 12:if(1!==(t=t.S()).length)throw Error("Expected XPath "+e+" to resolve to a single array.");if(!Z((t=t[0]).type,62))throw Error("Expected XPath "+e+" to resolve to an array");return Fs(t,r).next(0).value;case 13:return t.S().map((function(t){if(!Z(t.type,2))throw Error("Expected XPath "+e+" to resolve to numbers");return t.value}));case 99:var a=t.value,i=null,o=!1,s=function(){for(;!o;){if(!i){var e=a.next(0);if(e.done){o=!0;break}i=Ps(e.value,r)}return e=i.next(0),i=null,e}return Promise.resolve({done:!0,value:null})};return"asyncIterator"in Symbol?((t={})[Symbol.asyncIterator]=function(){return this},t.next=function(){return new Promise((function(e){return e(s())})).catch((function(t){jr(e,t)}))},t=t):t={next:function(){return new Promise((function(e){return e(s())}))}},t;default:return(t=t.S()).every((function(e){return Z(e.type,53)&&!Z(e.type,47)}))?1===(t=t.map((function(e){return Gi(e.value,r,!1)}))).length?t[0]:t:1===t.length?Z((t=t[0]).type,62)?Fs(t,r).next(0).value:Z(t.type,61)?Us(t,r).next(0).value:Ot(t,r).first().value:St(se.create(t),r).S().map((function(e){return e.value}))}}Hs[Hs.ANY]="ANY",Hs[Hs.NUMBER]="NUMBER",Hs[Hs.STRING]="STRING",Hs[Hs.BOOLEAN]="BOOLEAN",Hs[Hs.NODES]="NODES",Hs[Hs.FIRST_NODE]="FIRST_NODE",Hs[Hs.STRINGS]="STRINGS",Hs[Hs.MAP]="MAP",Hs[Hs.ARRAY]="ARRAY",Hs[Hs.NUMBERS]="NUMBERS",Hs[Hs.ASYNC_ITERATOR]="ASYNC_ITERATOR";var Xs=!1,_s=null,Ls={getPerformanceSummary:function(){var e=_s.getEntriesByType("measure").filter((function(e){return e.name.startsWith("XPath: ")}));return Array.from(e.reduce((function(e,t){var n=t.name.substring(7);return e.has(n)?((n=e.get(n)).times+=1,n.totalDuration+=t.duration):e.set(n,{xpath:n,times:1,totalDuration:t.duration,average:0}),e}),new Map).values()).map((function(e){return e.average=e.totalDuration/e.times,e})).sort((function(e,t){return t.totalDuration-e.totalDuration}))},setPerformanceImplementation:function(e){_s=e},startProfiling:function(){if(null===_s)throw Error("Performance API object must be set using `profiler.setPerformanceImplementation` before starting to profile");_s.clearMarks(),_s.clearMeasures(),Xs=!0},stopProfiling:function(){Xs=!1}},ks=0;function qs(e,t,n,r,a,i){if(a=a||0,!e||"string"!=typeof e)throw new TypeError("Failed to execute 'evaluateXPath': xpathExpression must be a string.");i=i||{};try{var o=Gs(e,t,n||null,r||{},i,{qa:"XQueryUpdate3.1"===i.language,ca:"XQuery3.1"===i.language||"XQueryUpdate3.1"===i.language,debug:!!i.debug,ob:!!i.disableCache,Ta:!!i.annotateAst}),s=o.zb,u=o.Ab,l=o.ia}catch(t){jr(e,t)}if(l.I)throw Error("XUST0001: Updating expressions should be evaluated as updating expressions");if(3===a&&t&&"nodeType"in t&&(n=l.Y(),t=Ae(t),null!==n&&!t.includes(n)))return!1;try{Xs&&(_s.mark(e+(0===ks?"":"@"+ks)),ks++);var c=js(e,er(l,s,u),a,u);return Xs&&(a=e+(0===--ks?"":"@"+ks),_s.measure("XPath: "+e,a),_s.clearMarks(a)),c}catch(t){jr(e,t)}}Object.assign(qs,{ANY_TYPE:0,NUMBER_TYPE:1,STRING_TYPE:2,BOOLEAN_TYPE:3,Zb:7,Vb:9,cc:10,Xb:11,Sb:12,Tb:99,$b:13,hc:"XQueryUpdate3.1",vc:"XQuery3.1",uc:"XPath3.1"});var Vs={};function Ys(e,t,n,r,a){return qs(e,t,n,r,qs.Tb,a)}function Qs(e,t,n,r){var a={};return a.pendingUpdateList=e.fa.map((function(e){return e.h(r)})),a.xdmValue=js(t,se.create(e.H),n,r),a}function Js(e,t,n){switch(t.type){case 0:return[e,{type:0}];case 1:return[e,{type:1}];case 3:return[""+Js(e+"("+(n||"contextItem")+")",t.j,n)[0],t.j];case 4:return[e,{type:4}];case 5:throw Error("Trying to get value of generated code with type None");default:throw Error("Unreachable! Trying to get compiled value of unsupported GeneratedCodeType.")}}function Ks(e,t,n){return{code:e,Ma:t,isAstAccepted:!0,Ea:n}}function zs(e){return{isAstAccepted:!1,reason:e}}function Ws(e,t,n,r){switch(r=void 0===r?"contextItem":r,n.type){case 0:case 1:return Ks("!!"+e,{type:0},[t]);case 3:return(e=Ws(e+"("+r+")","",n.j,r)).isAstAccepted?Ks("!!"+e.code,e.Ma,[t]):e;case 4:return Ks("(() => {\n\t\t\t\t\tconst result = "+e+".next();\n\t\t\t\t\treturn result.done ? false : !!result.value; \n\t\t\t\t})()",{type:0});case 5:throw Error("Trying to get value of generated code with type None");default:throw Error("Unreachable! Trying to get compiled value of unsupported GeneratedCodeType.")}}Object.assign(qs,(Vs.ANY_TYPE=0,Vs.NUMBER_TYPE=1,Vs.STRING_TYPE=2,Vs.BOOLEAN_TYPE=3,Vs.NODES_TYPE=7,Vs.FIRST_NODE_TYPE=9,Vs.STRINGS_TYPE=10,Vs.MAP_TYPE=11,Vs.ARRAY_TYPE=12,Vs.ASYNC_ITERATOR_TYPE=99,Vs.NUMBERS_TYPE=13,Vs.XQUERY_UPDATE_3_1_LANGUAGE="XQueryUpdate3.1",Vs.XQUERY_3_1_LANGUAGE="XQuery3.1",Vs.XPATH_3_1_LANGUAGE="XPath3.1",Vs));var Zs={DONE_TOKEN:z,getEffectiveBooleanValue:te,isSubtypeOf:Z,ready:W},$s={bc:"pathExpr",Rb:"andOp",ac:"orOp",dc:"stringConstantExpr"},eu=Object.values($s);function tu(e,t,n,r,a){return e=Xr(e,n),(e=Xr(e,eu))?(t+=n,(r=r.Fb(e,t,r)).isAstAccepted?0===a?Ws(t,r.code,r.Ma):Ks(t,r.Ma,[r.code]):r):zs("Unsupported: a base expression used with an operand.")}function nu(e,t,n){return 4===t&&(e+=".next().value"),47===n&&(e="(function () { const attr = "+e+"; return attr ? domFacade.getData(attr) : null})()"),e}function ru(e,t,n,r,a){var i=Lr(Xr(e,"firstOperand")[1],"type");if(e=Lr(Xr(e,"secondOperand")[1],"type"),!i||!e)return zs("Left or right type of compare are not found, annotation failed.");var o=[47,1];if(!o.includes(i.type)||!o.includes(e.type))return zs("Unsupported types in compare: ["+he[i.type]+", "+he[e.type]+"]");if(!n.isAstAccepted)return n;if(!r.isAstAccepted)return r;if(!i||!e)return zs("Operands in compare weren't annotated");if(!(o=new Map([["eqOp","==="],["neOp","!=="]])).has(t))return zs(t+" not yet implemented");t=o.get(t),o=Js(n.code,n.Ma);var s=Js(r.code,r.Ma);return Ks("function "+a+"(contextItem) {\n\t\t\t\t"+n.Ea.join("\n")+"\n\t\t\t \t"+r.Ea.join("\n")+"\n\t \t \treturn "+nu(o[0],o[1].type,i.type)+" "+t+" "+nu(s[0],s[1].type,e.type)+";\n\t\t}",{type:3,j:{type:0}})}var au={},iu=(au.equalOp="eqOp",au.notEqualOp="neOp",au.lessThanOrEqualOp="leOp",au.lessThanOp="ltOp",au.greaterThanOrEqualOp="geOp",au.greaterThanOp="gtOp",au);function ou(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function su(e,t,n,r){var a=tu(e,t,"firstOperand",n,0);return a.isAstAccepted?(e=tu(e,t,"secondOperand",n,0)).isAstAccepted?Ks("\n\tfunction "+t+"(contextItem) {\n\t\t"+a.Ea.join("\n")+"\n\t\t"+e.Ea.join("\n")+"\n\t\treturn "+a.code+" "+r+" "+e.code+";\n\t}\n\t",{type:3,j:{type:0}}):e:a}function uu(e){for(var t=[],n=0;n<arguments.length;++n)t[n]=arguments[n];return t.filter((function(e){return""!==e})).join(" && ")}function lu(e,t,n,r,a,i){var o=1!==n?"i"+n+" = 0;":"";return Ks("\n\t"+i+"\n\twhile ("+uu(a+n,"i"+n+" < "+a+n+".length")+") {\n\t\tconst contextItem"+n+" = "+a+n+"[i"+n+"];\n\t\tif (!("+(e=uu("contextItem"+n,e,t))+")) {\n\t\t\ti"+n+"++;\n\t\t\tcontinue;\n\t\t}\n\t\t"+r+"\n\t}\n\t"+o+"\n\t",{type:2},["let i"+n+" = 0;"])}function cu(e,t,n,r,a){return Ks("\n\t\t"+a+"\n\t\tif ("+(e=uu("i"+n+" === 0","contextItem"+n,e,t))+") {\n\t\t\t"+r+"\n\t\t}\n\t\t",{type:2},["let i"+n+" = 0;"])}var hu={ec:"textTest",Ub:"elementTest",Yb:"nameTest",fc:"Wildcard"},pu=Object.values(hu);function fu(e,t,n){var r=null===t.namespaceURI;if(null===t.namespaceURI&&"*"!==t.prefix&&(t.namespaceURI=n.ga(t.prefix||"")||null,!t.namespaceURI&&t.prefix))throw Error("XPST0081: The prefix "+t.prefix+" could not be resolved.");n=t.prefix;var a=t.namespaceURI;t=t.localName;var i=e+".nodeType\n\t\t&& ("+e+".nodeType === /*ELEMENT_NODE*/ 1\n\t\t|| "+e+".nodeType === /*ATTRIBUTE_NODE*/ 2)";return Ks("*"===n?"*"===t?i:i+" && "+e+".localName === "+ou(t):(t="*"!==t?i+" && "+e+".localName === "+ou(t)+" && ":"")+"("+e+".namespaceURI || null) === ("+(r=r&&!n?e+".nodeType\n&& "+e+".nodeType === /*ELEMENT_NODE*/ 1 ? "+ou(a)+" : null":ou(a))+" || null)",{type:0})}function du(e,t,n){var r=e[0];switch(r){case hu.Ub:return r=(e=Xr(e,"elementName"))&&Xr(e,"star"),null===e||r?t=Ks(t+".nodeType === /*ELEMENT_NODE*/ 1",{type:0}):t=fu(t,e=Vr(Xr(e,"QName")),n),t;case hu.ec:return Ks(t+".nodeType === /*TEXT_NODE*/ 3",{type:0});case hu.Yb:return fu(t,Vr(e),n);case hu.fc:return Xr(e,"star")?(r=Xr(e,"uri"))?t=fu(t,{localName:"*",namespaceURI:_r(r),prefix:""},n):(r=Xr(e,"NCName"),t="star"===Xr(e,"*")[0]?fu(t,{localName:_r(r),namespaceURI:null,prefix:"*"},n):fu(t,{localName:"*",namespaceURI:null,prefix:_r(r)},n)):t=fu(t,{localName:"*",namespaceURI:null,prefix:"*"},n),t;default:return zs("Unsupported: the test '"+r+"'.")}}function mu(e,t,n){var r=e[0];switch(r){case $s.bc:return r="",Xr(e,"rootExpr")&&(r="\n\t\tlet documentNode = contextItem;\n\t\twhile (documentNode.nodeType !== /*DOCUMENT_NODE*/9) {\n\t\t\tdocumentNode = domFacade.getParentNode(documentNode);\n\t\t\tif (documentNode === null) {\n\t\t\t\tthrow new Error('XPDY0050: the root node of the context node is not a document node.');\n\t\t\t}\n\t\t}\n\t\tcontextItem = documentNode;\n\t\t"),(e=function(e,t){if(0===e.length)return Ks("\n\t\t\tif (!hasReturned) {\n\t\t\t\thasReturned = true;\n\t\t\t\treturn ready(contextItem);\n\t\t\t}\n\t\t\t",{type:2},["let hasReturned = false;"]);for(var n="",r=[],a=e.length-1;0<=a;a--){var i=e[a],o=a+1,s=Xr(i,"predicates");e:{var u=t,l="",h=[];if(s){s=qr(s,"*");for(var p=0;p<s.length;p++){var f="step"+o+"_predicate"+p,d=u.Fb(s[p],f,u);if(!d.isAstAccepted){u=d;break e}if(!(f=Ws(f,"",d.Ma,"contextItem"+o)).isAstAccepted){u=f;break e}l=0===p?l+f.code:l+" && "+f.code,h.push(d.code)}u=Ks(l,{type:0},h)}else u=Ks("",{type:5},h)}if(!u.isAstAccepted)return u;if(!(l=Xr(i,"xpathAxis")))return zs("Unsupported: filter expressions.");if(!(h=Xr(i,pu)))return zs("Unsupported: the test in the '"+i+"' step.");if(n=a===e.length-1?"i"+o+"++;\n\t\t\t\t\t return ready(contextItem"+o+");":n+"\n\t\t\t\t\t i"+o+"++;",!(h=du(h,"contextItem"+o,t)).isAstAccepted)return h;e:switch(h=h.code,s=u.code,l=_r(l),l){case"attribute":o=lu(h,s,o,n,"attributeNodes","\n\tlet attributeNodes"+o+";\n\tif (contextItem && contextItem"+(o-1)+".nodeType === /*ELEMENT_NODE*/ 1) {\n\t\tattributeNodes"+o+" = domFacade.getAllAttributes(contextItem"+(o-1)+");\n\t}\n\t");break e;case"child":o=lu(h,s,o,n,"childNodes","const childNodes"+o+" = domFacade.getChildNodes(contextItem"+(o-1)+");");break e;case"parent":o=cu(h,s,o,n,"\n\tconst contextItem"+o+" = domFacade.getParentNode(contextItem"+(o-1)+");\n\t");break e;case"self":o=cu(h,s,o,n,"const contextItem"+o+" = contextItem"+(o-1)+";");break e;default:o=zs("Unsupported: the "+l+" axis")}if(!o.isAstAccepted)return o;if(r.push.apply(r,[].concat(c(o.Ea),c(u.Ea))),n=o.code,0<qr(i,"lookup").length)return zs("Unsupported: lookups.")}return Ks("const contextItem0 = contextItem;"+n,{type:2},r)}(qr(e,"stepExpr"),n)).isAstAccepted?Ks("\n\tfunction "+t+"(contextItem) {\n\t\t"+r+"\n\t\t"+e.Ea.join("\n")+"\n\t\tconst next = () => {\n\t\t\t"+e.code+"\n\t\t\treturn DONE_TOKEN;\n\t\t};\n\t\treturn {\n\t\t\tnext,\n\t\t\t[Symbol.iterator]() { return this; }\n\t\t};\n\t}\n\t",{type:3,j:{type:4}}):e;case $s.Rb:return su(e,t,n,"&&");case $s.ac:return su(e,t,n,"||");case $s.dc:return Ks("const "+t+" = "+(e=ou(e=Xr(e,"value")[1]))+";",{type:1});case"equalOp":case"notEqualOp":case"lessThanOrEqualOp":case"lessThanOp":case"greaterThanOrEqualOp":case"greaterThanOp":case"eqOp":case"neOp":case"ltOp":case"leOp":case"gtOp":case"geOp":case"isOp":case"nodeBeforeOp":case"nodeAfterOp":e:{var a=tu(e,t,"firstOperand",n);if(a.isAstAccepted)if((n=tu(e,t,"secondOperand",n)).isAstAccepted)switch(r){case"eqOp":case"neOp":case"ltOp":case"leOp":case"gtOp":case"geOp":case"isOp":t=ru(e,r,a,n,t);break e;case"equalOp":case"notEqualOp":case"lessThanOrEqualOp":case"lessThanOp":case"greaterThanOrEqualOp":case"greaterThanOp":Xr(e,"firstOperand");var i=Lr(e,"type");Xr(e,"secondOperand");var o=Lr(e,"type");t=i&&o?3===i.g&&3===o.g?ru(e,iu[r],a,n,t):zs("generalCompare with sequences is still in development"):zs("types of compare are not known");break e;default:t=zs("Unsupported compare type")}else t=n;else t=a}return t;default:return zs("Unsupported: the base expression '"+r+"'.")}}function vu(e,t,n){var r=Xr(e,"mainModule");if(!r)return zs("Unsupported: Can not execute a library module.");if(Xr(r,"prolog"))return zs("Unsupported: XQuery.");var a=kr(r,["queryBody","*"]);return n.Fb=mu,!1===(n=mu(a,"compiledXPathExpression",n)).isAstAccepted?n:(r=n.Ea?n.Ea.join("\n"):"",a=Lr(a,"type"),!1===(t=function(e,t,n){switch(e){case 9:if(e=(n=u(Js("compiledXPathExpression",t))).next().value,4!==n.next().value.type)throw Error("Trying access generated code as an iterator while this is not the case.");return Ks("\n\tconst firstResult = "+e+".next();\n\tif (!firstResult.done) {\n\t\treturn firstResult.value\n\t}\n\treturn null;\n\t",{type:2});case 7:return e=(n=u(Js("compiledXPathExpression",t))).next().value,4!==n.next().value.type?Ks("return [];",{type:2}):Ks("\n\tconst nodes = [];\n\tfor (const node of "+e+") {\n\t\tnodes.push(node);\n\t}\n\treturn nodes;\n\t",{type:2});case 3:return(n=Ws("compiledXPathExpression","",t)).isAstAccepted?Ks("return "+n.code+";",{type:2}):n;case 2:return void 0===n?n=zs("Full AST wasn't annotated so we cannot correctly emit a string return"):Z(n,1)||Z(n,47)?n=Ks("return "+nu(e=(t=u(Js("compiledXPathExpression",t))).next().value,(t=t.next().value).type,n)+" || '';",{type:2}):n=zs("Not implemented: returning anything but strings and attributes from codegen"),n;default:return zs("Unsupported: the return type '"+e+"'.")}}(t,n.Ma,a?a.type:void 0)).isAstAccepted?t:(t=r+n.code+t.code,n="\n\treturn (contextItem, domFacade, runtimeLib) => {\n\t\tconst {\n\t\t\tDONE_TOKEN,\n\t\t\tValueType,\n\t\t\tXPDY0002,\n\t\t\tdeterminePredicateTruthValue,\n\t\t\tisSubtypeOf,\n\t\t\tready,\n\t\t\tatomize,\n\t\t} = runtimeLib;",function e(t){var n=qr(t,"*");if("pathExpr"===t[0])return!0;for(t=u(n),n=t.next();!n.done;n=t.next())if(e(n.value))return!0;return!1}(e)&&(n+='\n\t\tif (!contextItem) {\n\t\t\tthrow XPDY0002("Context is needed to evaluate the given path expression.");\n\t\t}\n\n\t\tif (!contextItem.nodeType) {\n\t\t\tthrow new Error("Context item must be subtype of node().");\n\t\t}\n\t\t'),{code:n+(t+"}\n//# sourceURL=generated.js"),isAstAccepted:!0}))}var gu={},yu=(gu["http://www.w3.org/2005/XQueryX"]="xqx",gu["http://www.w3.org/2007/xquery-update-10"]="xquf",gu);function wu(e,t,n){var r=e.stack;r&&(r.includes(e.message)&&(r=r.substr(r.indexOf(e.message)+e.message.length).trim()),(r=r.split("\n")).splice(10),r=(r=r.map((function(e){return e.startsWith(" ")||e.startsWith("\t")?e:" "+e}))).join("\n")),e=Error.call(this,"Custom XPath function Q{"+n+"}"+t+" raised:\n"+e.message+"\n"+r),this.message=e.message,"stack"in e&&(this.stack=e.stack)}function Au(e,t,n){return 0===t.g?e.F()?null:Ps(e.first(),n).next(0).value:2===t.g||1===t.g?e.S().map((function(e){if(Z(e.type,47))throw Error("Cannot pass attribute nodes to custom functions");return Ps(e,n).next(0).value})):Ps(e.first(),n).next(0).value}function xu(e){var t=Ts(e,"XPath",!1);if(t)return t;if(Zo(t=Mo(e,{ca:!1}),new os(void 0)),null===(t=kr(t,["mainModule","queryBody","*"])))throw Error("Library modules do not have a specificity");t=To(t,{qa:!1,ca:!1});var n=Cs("XPath",!1);if(Bs[e])Bs[e][n]=t;else{var r={};Bs[e]=(r[n]=t,r)}return t}v(wu,Error);var bu=new xe;return void 0!==t&&(t.compareSpecificity=function(e,t){return dr(xu(e).K,xu(t).K)},t.compileXPathToJavaScript=function(e,t,n){return n=n||{},t=t||0,Zo(e=Mo(e=Ds(e),{ca:"XQuery3.1"===n.language||"XQueryUpdate3.1"===n.language,debug:!1}),new os(new Fo(new hs((n={ga:n.namespaceResolver||Rs(null)}).ga,{},Ms("http://www.w3.org/2005/xpath-functions"))))),vu(e,t,n)},t.domFacade=bu,t.evaluateXPath=qs,t.evaluateXPathToArray=function(e,t,n,r,a){return qs(e,t,n,r,qs.Sb,a)},t.evaluateXPathToAsyncIterator=Ys,t.evaluateXPathToBoolean=function(e,t,n,r,a){return qs(e,t,n,r,qs.BOOLEAN_TYPE,a)},t.evaluateXPathToFirstNode=function(e,t,n,r,a){return qs(e,t,n,r,qs.Vb,a)},t.evaluateXPathToMap=function(e,t,n,r,a){return qs(e,t,n,r,qs.Xb,a)},t.evaluateXPathToNodes=function(e,t,n,r,a){return qs(e,t,n,r,qs.Zb,a)},t.evaluateXPathToNumber=function(e,t,n,r,a){return qs(e,t,n,r,qs.NUMBER_TYPE,a)},t.evaluateXPathToNumbers=function(e,t,n,r,a){return qs(e,t,n,r,qs.$b,a)},t.evaluateXPathToString=function(e,t,n,r,a){return qs(e,t,n,r,qs.STRING_TYPE,a)},t.evaluateXPathToStrings=function(e,t,n,r,a){return qs(e,t,n,r,qs.cc,a)},t.evaluateUpdatingExpression=function(e,t,n,r,a){var i,o,s,u,l,c,h,p,f,d;return function(e){function t(t){return e.next(t)}function n(t){return e.throw(t)}return new Promise((function(r,a){!function e(i){i.done?r(i.value):Promise.resolve(i.value).then(t,n).then(e,a)}(e.next())}))}(new E(new A((function(m){switch(m.h){case 1:a=a||{};try{u=Gs(e,t,n||null,r||{},a||{},{qa:!0,ca:!0,debug:!!a.debug,ob:!!a.disableCache,Ta:!!a.annotateAst}),i=u.zb,o=u.Ab,s=u.ia}catch(t){jr(e,t)}if(s.I){m.h=2;break}l=[];var v=(c=Ys(e,t,n,r,Object.assign(Object.assign({},a),{language:"XQueryUpdate3.1"}))).next();return m.h=3,{value:v};case 3:h=m.v;case 4:if(h.done){m.h=6;break}return l.push(h.value),v=c.next(),m.h=7,{value:v};case 7:h=m.v,m.h=4;break;case 6:return p={},m.return(Promise.resolve((p.pendingUpdateList=[],p.xdmValue=l,p)));case 2:try{d=s.o(i,o),f=d.next(0)}catch(t){jr(e,t)}return m.return(Qs(f.value,e,a.returnType,o))}}))))},t.evaluateUpdatingExpressionSync=function(e,t,n,r,a){a=a||{};try{var i=Gs(e,t,n||null,r||{},a||{},{qa:!0,ca:!0,debug:!!a.debug,ob:!!a.disableCache,Ta:!!a.annotateAst}),o=i.zb,s=i.Ab,u=i.ia}catch(t){jr(e,t)}if(!u.I)return o={},(s={}).pendingUpdateList=[],s.xdmValue=qs(e,t,n,r,a.j,Object.assign(Object.assign({},a),(o.language=qs.hc,o))),s;try{var l=u.o(o,s).next(0)}catch(t){jr(e,t)}return Qs(l.value,e,a.returnType,s)},t.executeJavaScriptCompiledXPath=function(e,t,n){return n=n||new xe,e()(t,n,Zs)},t.executePendingUpdateList=function(e,t,n,r){t=new Te(t||new xe),r=r?new Be(r):Ee,n=n?n=new bs(n):null,ir(e=e.map(so),t,n,r)},t.getBucketForSelector=function(e){return xu(e).Y()},t.getBucketsForNode=Ae,t.precompileXPath=function(e){return Promise.resolve(e)},t.registerXQueryModule=function(e,t){if(Wo(t=Mo(e,{ca:!0,debug:(t=void 0===t?{debug:!1}:t).debug}),new os(void 0)),!(t=Xr(t,"libraryModule")))throw Error("XQuery module must be declared in a library module.");var n=Xr(t,"moduleDecl"),r=Xr(n,"uri"),a=_r(r);if(r=_r(n=Xr(n,"prefix")),(n=new Fo(new hs((function(){return null}),Object.create(null),Ms("http://www.w3.org/2005/xpath-functions")))).o[n.h][r]=a,null!==(t=Xr(t,"prolog"))){try{var i=Qo(t,n)}catch(t){jr(e,t)}i.La.forEach((function(e){if(a!==e.namespaceURI)throw Error("XQST0048: Functions and variables declared in a module must reside in the module target namespace.")})),qo(a,i)}else qo(a,{La:[],Va:[]});return a},t.registerCustomXPathFunction=function(e,t,n,r){var a=(e=function(e){if("object"==typeof e)return e;if(2!==(e=e.split(":")).length)throw Error("Do not register custom functions in the default function namespace");var t=u(e);e=t.next().value,t=t.next().value;var n=cs[e];if(!n){if(n="generated_namespace_uri_"+e,cs[e])throw Error("Prefix already registered: Do not register the same prefix twice.");cs[e]=n}return{localName:t,namespaceURI:n}}(e)).namespaceURI,i=e.localName;if(!a)throw hi();var o=t.map((function(e){return me(e)})),s=me(n);ba(a,i,o,s,(function(e,t,n){var u=Array.from(arguments);u.splice(0,3),u=u.map((function(e,n){return Au(e,o[n],t)}));var l={};l.currentContext=t.J,l.domFacade=t.h.h,l=l;try{var h=r.apply(void 0,[l].concat(c(u)))}catch(e){throw new wu(e,i,a)}return h&&"object"==typeof h&&Object.getOwnPropertySymbols(h).includes(Ss)?se.create(h.Eb):vt(t.h,h,s)}))},t.parseScript=function(e,t,n,r){return r=void 0===r?Ee:r,e=Mo(e,{ca:"XQueryUpdate3.1"===t.language,debug:t.debug}),t.Ta&&Zo(e,new os(void 0)),function e(t,n,r,a){if("string"==typeof r)return 0===r.length?null:n.createTextNode(r);if(!Array.isArray(r))throw new TypeError("JsonML element should be an array or string");var i=r[0];switch(i){case"copySource":case"insertAfter":case"insertAsFirst":case"insertAsLast":case"insertBefore":case"insertInto":case"modifyExpr":case"newNameExpr":case"replacementExpr":case"replaceValue":case"returnExpr":case"sourceExpr":case"targetExpr":case"transformCopies":case"transformCopy":a=a||"http://www.w3.org/2005/XQueryX";break;case"deleteExpr":case"insertExpr":case"renameExpr":case"replaceExpr":case"transformExpr":a="http://www.w3.org/2007/xquery-update-10";break;default:a="http://www.w3.org/2005/XQueryX"}i=n.createElementNS(a,yu[a]+":"+i);var o=r[1],s=1;if("object"==typeof o&&!Array.isArray(o)){for(var u in o)null!==o[u]&&("type"===u?t.setAttributeNS(i,a,"fontoxpath:"+u,fe(o[u])):t.setAttributeNS(i,a,yu[a]+":"+u,o[u]));s=2}for(u=s,o=r.length;u<o;++u)null!==(s=e(t,n,r[u],a))&&t.insertBefore(i,s,null);return i}(r,n,e,null)},t.profiler=Ls,t.createTypedValueFactory=function(e){return function(t,n){return t=mt(new Te(null===n?new xe:n),t,me(e)),(n={})[Ss]=!0,n.Eb=t,n}},t.Language={XPATH_3_1_LANGUAGE:"XPath3.1",XQUERY_3_1_LANGUAGE:"XQuery3.1",XQUERY_UPDATE_3_1_LANGUAGE:"XQueryUpdate3.1"},t.ReturnType=Hs),t}.call("undefined"==typeof window?void 0:window,Object.freeze({__proto__:null,compile:function(e,t={language:"xsd"}){const r=xe(t)(e),a=function(e){const t=new n;return e(t),new f(t.program)}(e=>{A(e,r,"xpath"===t.language),e.accept()});return function(e){const n="xpath"===t.language?[-1,...be(e),-2]:be(e);return a.execute(n).success}}})),Be=(Ee.compareSpecificity,Ee.compileXPathToJavaScript,Ee.createTypedValueFactory,Ee.domFacade,Ee.evaluateUpdatingExpression,Ee.evaluateUpdatingExpressionSync,Ee.evaluateXPath),Ne=(Ee.evaluateXPathToArray,Ee.evaluateXPathToAsyncIterator,Ee.evaluateXPathToBoolean),Ce=Ee.evaluateXPathToFirstNode,Te=(Ee.evaluateXPathToMap,Ee.evaluateXPathToNodes),Ie=Ee.evaluateXPathToNumber,Oe=(Ee.evaluateXPathToNumbers,Ee.evaluateXPathToString),Se=Ee.evaluateXPathToStrings,Re=(Ee.executeJavaScriptCompiledXPath,Ee.executePendingUpdateList,Ee.getBucketForSelector,Ee.getBucketsForNode),De=(Ee.Language,Ee.parseScript),Me=(Ee.precompileXPath,Ee.profiler,Ee.registerCustomXPathFunction),Ge=Ee.registerXQueryModule;Ee.ReturnType;class Ue{constructor(e){this._onNodeTouched=e}getAllAttributes(e){return Array.from(e.attributes)}getAttribute(e,t){return e.getAttribute(t)}getChildNodes(e,t){const n=Array.from(e.childNodes).filter(e=>!t||Re(e).includes(t));return n.forEach(e=>this._onNodeTouched(e)),n}getData(e){return e.nodeType===Node.ATTRIBUTE_NODE?(this._onNodeTouched(e),e.value):(this._onNodeTouched(e.parentNode),e.data)}getFirstChild(e,t){const n=Array.from(this.getChildNodes()).filter(e=>!t||Re(e).includes(t))[0];return n||null}getLastChild(e,t){const n=e.getChildNodes().filter(e=>!t||Re(e).includes(t)),r=n[n.length-1];return r||null}getNextSibling(e,t){for(let{nextSibling:n}=e;n;n=n.nextSibling)if(Re(n).includes(t))return n;return null}getParentNode(e){return e.parentNode}getPreviousSibling(e,t){for(let{previousSibling:n}=e;n;n=n.previousSibling)if(Re(n).includes(t))return n;return null}}class Fe{static getParentBindingElement(e){if(e.parentNode&&e.parentNode.nodeType!==Node.DOCUMENT_NODE){if(e.parentNode.hasAttribute("ref"))return e.parentNode;Fe.getParentBindingElement(e.parentNode)}return null}static isAbsolutePath(e){return null!=e&&(e.startsWith("/")||e.startsWith("instance("))}static isRepeated(e){return e.parentElement.closest("fx-repeatitem")}static isSelfReference(e){return"."===e||"./text()"===e||"text()"===e||""===e||null===e}static getDefaultInstance(e){const t=Fe.getForeElement(e).querySelector("fx-instance");if(!t)throw new Error("no default instance present");return t}static getForeElement(e){if("FX-FORE"===e.nodeName)return e;if(e.parentNode)return Fe.getForeElement(e.parentNode);throw new Error("no Fore element present")}static getInstanceId(e){if(!e)return"default";if(e.startsWith("instance(")){const t=e.substring(e.indexOf("(")+1);return t.substring(1,t.indexOf(")")-1)}return"default"}static getPath(e){const t=Be("path()",e);return Fe.shortenPath(t)}static shortenPath(e){const t=e.replaceAll(/(Q{(.*?)\})/g,""),n=t.substring(1,t.length);return n.substring(n.indexOf("/"),t.length)}static getBasePath(e){return e.split(":")[0]}}function Pe(e,t,n,r){const a={};return function(i){if(a[i])return;const o={},s=[],u=[];for(u.push({node:i,processed:!1});u.length>0;){const i=u[u.length-1],{processed:l}=i,{node:c}=i;if(l)u.pop(),s.pop(),o[c]=!1,a[c]=!0,t&&0!==e[c].length||n.push(c);else{if(a[c]){u.pop();continue}if(o[c]){if(r){u.pop();continue}s.push(c),window.dispatchEvent(new CustomEvent("compute-exception",{composed:!0,bubbles:!0,detail:{path:s,message:"cyclic graph"}}))}o[c]=!0,s.push(c);const t=e[c];for(let e=t.length-1;e>=0;e-=1)u.push({node:t[e],processed:!1});i.processed=!0}}}}function He(e){this.nodes={},this.outgoingEdges={},this.incomingEdges={},this.circular=e&&!!e.circular}He.prototype={size(){return Object.keys(this.nodes).length},addNode(e,t){this.hasNode(e)||(this.nodes[e]=2===arguments.length?t:e,this.outgoingEdges[e]=[],this.incomingEdges[e]=[])},removeNode(e){this.hasNode(e)&&(delete this.nodes[e],delete this.outgoingEdges[e],delete this.incomingEdges[e],[this.incomingEdges,this.outgoingEdges].forEach(t=>{Object.keys(t).forEach(n=>{const r=t[n].indexOf(e);r>=0&&t[n].splice(r,1)},this)}))},hasNode(e){return Object.prototype.hasOwnProperty.call(this.nodes,e)},getNodeData(e){if(this.hasNode(e))return this.nodes[e];throw new Error("Node does not exist: "+e)},setNodeData(e,t){if(!this.hasNode(e))throw new Error("Node does not exist: "+e);this.nodes[e]=t},addDependency(e,t){if(!this.hasNode(e))throw new Error("Node does not exist: "+e);if(!this.hasNode(t))throw new Error("Node does not exist: "+t);return-1===this.outgoingEdges[e].indexOf(t)&&this.outgoingEdges[e].push(t),-1===this.incomingEdges[t].indexOf(e)&&this.incomingEdges[t].push(e),!0},removeDependency(e,t){let n;this.hasNode(e)&&(n=this.outgoingEdges[e].indexOf(t),n>=0&&this.outgoingEdges[e].splice(n,1)),this.hasNode(t)&&(n=this.incomingEdges[t].indexOf(e),n>=0&&this.incomingEdges[t].splice(n,1))},clone(){const e=this,t=new He;return Object.keys(e.nodes).forEach(n=>{t.nodes[n]=e.nodes[n],t.outgoingEdges[n]=e.outgoingEdges[n].slice(0),t.incomingEdges[n]=e.incomingEdges[n].slice(0)}),t},directDependenciesOf(e){if(this.hasNode(e))return this.outgoingEdges[e].slice(0);throw new Error("Node does not exist: "+e)},directDependantsOf(e){if(this.hasNode(e))return this.incomingEdges[e].slice(0);throw new Error("Node does not exist: "+e)},dependenciesOf(e,t){if(this.hasNode(e)){const n=[];Pe(this.outgoingEdges,t,n,this.circular)(e);const r=n.indexOf(e);return r>=0&&n.splice(r,1),n}throw new Error("Node does not exist: "+e)},dependantsOf(e,t){if(this.hasNode(e)){const n=[];Pe(this.incomingEdges,t,n,this.circular)(e);const r=n.indexOf(e);return r>=0&&n.splice(r,1),n}throw new Error("Node does not exist: "+e)},entryNodes(){const e=this;return Object.keys(this.nodes).filter(t=>0===e.incomingEdges[t].length)},overallOrder(e){const t=this,n=[],r=Object.keys(this.nodes);if(0===r.length)return n;if(!this.circular){const e=Pe(this.outgoingEdges,!1,[],this.circular);r.forEach(t=>{e(t)})}const a=Pe(this.outgoingEdges,e,n,this.circular);return r.filter(e=>0===t.incomingEdges[e].length).forEach(e=>{a(e)}),this.circular&&r.filter(e=>-1===n.indexOf(e)).forEach(e=>a(e)),n}},He.prototype.directDependentsOf=He.prototype.directDependantsOf,He.prototype.dependentsOf=He.prototype.dependantsOf;class je{static get ACTION_ELEMENTS(){return["FX-DELETE","FX-DISPATCH","FX-HIDE","FX-INSERT","FX-LOAD","FX-MESSAGE","FX-REBUILD","FX-RECALCULATE","FX-REFRESH","FX-RENEW","FX-REPLACE","FX-RESET","FX-RETAIN","FX-RETURN","FX-REVALIDATE","FX-SEND","FX-SETFOCUS","FX-SETINDEX","FX-SETVALUE","FX-SHOW","FX-TOGGLE","FX-UPDATE"]}static createUUID(){const e=[];for(let t=0;t<36;t+=1)e[t]="0123456789abcdef".substr(Math.floor(16*Math.random()),1);e[14]="4",e[19]="0123456789abcdef".substr(3&e[19]|8,1),e[8]=e[13]=e[18]=e[23]="-";return e.join("")}static get XFORMS_NAMESPACE_URI(){return"http://www.w3.org/2002/xforms"}static isActionElement(e){return je.ACTION_ELEMENTS.includes(e)}static get UI_ELEMENTS(){return["FX-ALERT","FX-CONTROL","FX-BUTTON","FX-CONTROL","FX-DIALOG","FX-FILENAME","FX-MEDIATYPE","FX-GROUP","FX-HINT","FX-INPUT","FX-ITEMS","FX-LABEL","FX-OUTPUT","FX-RANGE","FX-REPEAT","FX-REPEATITEM","FX-SWITCH","FX-SECRET","FX-SELECT","FX-SUBMIT","FX-TEXTAREA","FX-TRIGGER","FX-UPLOAD","FX-VAR"]}static isUiElement(e){je.UI_ELEMENTS.includes(e);return je.UI_ELEMENTS.includes(e)}static async refreshChildren(e,t){return new Promise(n=>{const{children:r}=e;r&&Array.from(r).forEach(e=>{je.isUiElement(e.nodeName)&&"function"==typeof e.refresh?e.refresh():"FX-MODEL"!==e.nodeName.toUpperCase()&&je.refreshChildren(e,t)}),n("done")})}static isRepeated(e){return null!==e.closest("fx-repeatitem")}static getRepeatTarget(e,t){return e.closest("fx-repeatitem").querySelector("#"+t)}static getContentType(e,t){return"urlencoded-post"===t?"application/x-www-form-urlencoded; charset=UTF-8":"xml"===e.type?"application/xml; charset=UTF-8":"json"===e.type?"application/json":null}static fadeInElement(e){let t=()=>(e.getAnimations&&e.getAnimations().map(e=>e.finish()),t=e.animate({opacity:[0,1]},600),t.finished);return t()}static fadeOutElement(e){let t=()=>(e.getAnimations&&e.getAnimations().map(e=>e.finish()),t=e.animate({opacity:[1,0]},2600),t.finished);return t()}static dispatch(e,t,n){const r=new CustomEvent(t,{composed:!0,bubbles:!0,detail:n});e.dispatchEvent(r)}}je.READONLY_DEFAULT=!1,je.REQUIRED_DEFAULT=!1,je.RELEVANT_DEFAULT=!0,je.CONSTRAINT_DEFAULT=!0,je.TYPE_DEFAULT="xs:string";const Xe="http://www.w3.org/2002/xforms",_e=new Map;function Le(e,t,n){return _e.has(e)?_e.get(e).set(t,n):_e.set(e,new Map)}const ke=e=>{if(!e)return"http://www.w3.org/1999/xhtml"};function qe(e,t){const n=(r=e,a=t,_e.has(r)&&_e.get(r).get(a)||null);var r,a;if(n)return n;const i=(new DOMParser).parseFromString("<xml />","text/xml"),o=De(e,{},i);let s=Se('descendant::xqx:functionCallExpr\n\t\t\t\t[xqx:functionName = "instance"]\n\t\t\t\t/xqx:arguments\n\t\t\t\t/xqx:stringConstantExpr\n\t\t\t\t/xqx:value',o,null,{},{namespaceResolver:e=>"xqx"===e?"http://www.w3.org/2005/XQueryX":void 0});if(0===s.length){const n=Ce("ancestor::*[@ref][1]",t);if(n){const r=qe(n.getAttribute("ref"),n);return Le(e,t,r),r}s=["default"]}if(1===s.length){let n;if("default"===s[0]){const e=Ce("ancestor-or-self::fx-fore",t,null,null,{namespaceResolver:ke});n=e&&e.querySelector("fx-instance")}else n=et(s[0],t,"fx-instance");if(n&&n.hasAttribute("xpath-default-namespace")){const r=n.getAttribute("xpath-default-namespace"),a=e=>{if(!e)return r};return Le(e,t,a),a}}s.length;const u=Oe("ancestor-or-self::*/@xpath-default-namespace[last()]",t)||"",l=function(e){return""===e?u:Oe('ancestor-or-self::*/@*[name() = "xmlns:" || $prefix][last()]',t,null,{prefix:e})};return Le(e,t,l),l}function Ve(e,t,n){return(t&&t.ownerDocument||t)===window.document?ke:qe(e,n)}function Ye({prefix:e,localName:t},n){switch(t){case"context":case"base64encode":case"boolean-from-string":case"current":case"depends":case"event":case"index":case"instance":case"log":case"logtree":return{namespaceURI:Xe,localName:t};default:return""===e||"fn"===e?{namespaceURI:"http://www.w3.org/2005/xpath-functions",localName:t}:"local"===e?{namespaceURI:"http://www.w3.org/2005/xquery-local-functions",localName:t}:null}}function Qe(e){let t=e;for(;t&&!("inScopeVariables"in t);)t=t.parentNode;if(!t)return{};const n={};for(const e of t.inScopeVariables.keys()){const r=t.inScopeVariables.get(e);n[e]=r.value}return n}function Je(e,t,n,r={}){const a=Ve(e,t,n),i=Qe(n);return Be(e,t,null,{...i,...r},"xs:anyType",{currentContext:{formElement:n,variables:r},moduleImports:{xf:Xe},functionNameResolver:Ye,namespaceResolver:a})}function Ke(e,t,n){const r=Ve(e,t,n),a=Qe(n);return Ce(e,t,null,a,{defaultFunctionNamespaceURI:Xe,moduleImports:{xf:Xe},currentContext:{formElement:n},namespaceResolver:r})}function ze(e,t,n){const r=Ve(e,t,n),a=Qe(n);return Te(e,t,null,a,{currentContext:{formElement:n},functionNameResolver:Ye,moduleImports:{xf:Xe},namespaceResolver:r})}function We(e,t,n){const r=Ve(e,t,n),a=Qe(n);return Ne(e,t,null,a,{currentContext:{formElement:n},functionNameResolver:Ye,moduleImports:{xf:Xe},namespaceResolver:r})}function Ze(e,t,n,r=null,a=n){const i=Ve(e,t,n),o=Qe(n);return Oe(e,t,r,o,{currentContext:{formElement:n},functionNameResolver:Ye,moduleImports:{xf:Xe},namespaceResolver:i})}function $e(e,t,n,r=null,a=n){const i=Ve(e,t,n),o=Qe(n);return Ie(e,t,r,o,{currentContext:{formElement:n},functionNameResolver:Ye,moduleImports:{xf:Xe},namespaceResolver:i})}function et(e,t,n=null){const r=Te("outermost(ancestor-or-self::fx-fore[1]/(descendant::xf-fore|descendant::*[@id = $id]))[not(self::fx-fore)]",t,null,{id:e},{namespaceResolver:ke});if(0===r.length)return null;if(1===r.length&&Ne("(ancestor::fx-fore | ancestor::fx-repeat)[last()]/self::fx-fore",r[0],null,null,{namespaceResolver:ke})){const e=r[0];return n&&e.localName!==n?null:e}for(const e of Te("ancestor::fx-repeatitem => reverse()",t,null,null,{namespaceResolver:ke})){const t=r.filter(t=>e.contains(t));switch(t.length){case 0:break;case 1:{const e=t[0];return n&&e.localName!==n?null:e}default:{const e=t.find(e=>Te("every $ancestor of ancestor::fx-repeatitem satisfies $ancestor is $ancestor/../child::fx-repeatitem[../@repeat-index]",e,null,{}));return e?n&&e.localName!==n?null:e:null}}}return null}const tt=(e,t)=>{const n=e.currentContext.formElement;if(t){const e=et(t,n);if(e){if("FX-REPEAT"===e.nodeName){const{nodeset:t}=e;for(let r=n;r;r=r.parentNode)if(r.parentNode===e){return t[Array.from(r.parentNode.children).indexOf(r)]}}return e.nodeset}}const r=Fe.getParentBindingElement(n);n.nodeName;return r||n.getInScopeContext()};Me({namespaceURI:Xe,localName:"context"},[],"item()?",tt),Me({namespaceURI:Xe,localName:"context"},["xs:string"],"item()?",tt),Me({namespaceURI:Xe,localName:"log"},["xs:string?"],"xs:string?",(e,t)=>{const{formElement:n}=e.currentContext,r=et(t,n,"fx-instance");if(r&&"json"!==r.getAttribute("type")){return function(e){const t=(new DOMParser).parseFromString(e,"application/xml"),n=(new DOMParser).parseFromString(['<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">',' <xsl:strip-space elements="*"/>',' <xsl:template match="para[content-style][not(text())]">',' <xsl:value-of select="normalize-space(.)"/>'," </xsl:template>",' <xsl:template match="node()|@*">',' <xsl:copy><xsl:apply-templates select="node()|@*"/></xsl:copy>'," </xsl:template>",' <xsl:output indent="yes"/>',"</xsl:stylesheet>"].join("\n"),"application/xml"),r=new XSLTProcessor;r.importStylesheet(n);const a=r.transformToDocument(t);return(new XMLSerializer).serializeToString(a)}((new XMLSerializer).serializeToString(r.getDefaultContext()))}return null}),Me({namespaceURI:Xe,localName:"logtree"},["xs:string?"],"element()?",(e,t)=>{const{formElement:n}=e.currentContext,r=et(t,n,"fx-instance");if(r){const t=document.createElement("div");t.setAttribute("class","logtree");const n=e.currentContext.formElement,a=n.querySelector(".logtree");a&&a.parentNode.removeChild(a);const i=function e(t,n){if(n&&n.nodeType===Node.ELEMENT_NODE&&n.children){const r=document.createElement("details");r.setAttribute("data-path",n.nodeName);const a=document.createElement("summary");let i,o=" <"+n.nodeName;Array.from(n.attributes).forEach(e=>{o+=` ${e.nodeName}="${e.nodeValue}"`}),n.firstChild&&n.firstChild.nodeType===Node.TEXT_NODE&&""!==n.firstChild.data.trim()?(i=n.firstChild.nodeValue,o+=`>${i}</${n.nodeName}>`):o+=">",a.textContent=o,r.appendChild(a),0!==n.childElementCount?r.setAttribute("open","open"):a.setAttribute("style","list-style:none;"),t.appendChild(r),Array.from(n.children).forEach(t=>{e(r,t)})}}(t,r.getDefaultContext());i&&n.appendChild(i)}return null});const nt=(e,t)=>{const n=Ce("ancestor-or-self::fx-fore",e.currentContext.formElement,null,null,{namespaceResolver:ke}),r=t?et(t,n,"fx-instance"):n.querySelector("fx-instance");if(r){return r.getDefaultContext()}return null};Me({namespaceURI:Xe,localName:"index"},["xs:string?"],"xs:integer?",(e,t)=>{const{formElement:n}=e.currentContext;if(null===t)return 1;const r=et(t,n,"fx-repeat");return r?r.getAttribute("index"):Number(1)}),Me({namespaceURI:Xe,localName:"instance"},[],"item()?",e=>nt(e,null)),Me({namespaceURI:Xe,localName:"instance"},["xs:string?"],"item()?",nt),Me({namespaceURI:Xe,localName:"depends"},["node()*"],"item()?",(e,t)=>t[0]),Me({namespaceURI:Xe,localName:"event"},["xs:string?"],"item()?",(e,t)=>(e.currentContext.variables[t].nodeType,e.currentContext.variables[t])),Ge(`\n module namespace xf="${Xe}";\n\n declare %public function xf:boolean-from-string($str as xs:string) as xs:boolean {\n lower-case($str) = "true" or $str = "1"\n };\n`),Me({namespaceURI:Xe,localName:"base64encode"},["xs:string?"],"xs:string?",(e,t)=>btoa(t));class rt extends HTMLElement{constructor(){super(),this.model=this.parentNode,this.attachShadow({mode:"open"})}connectedCallback(){this.hasAttribute("src")&&(this.src=this.getAttribute("src")),this.hasAttribute("id")?this.id=this.getAttribute("id"):this.id="default",this.hasAttribute("type")?this.type=this.getAttribute("type"):this.type="xml";this.shadowRoot.innerHTML="\n <style>\n \n :host {\n display: none;\n }\n :host * {\n display:none;\n }\n ::slotted(*){\n display:none;\n }\n \n </style>\n \n \n "}async init(){await this._initInstance().then(()=>(this.dispatchEvent(new CustomEvent("instance-loaded",{composed:!0,bubbles:!0,detail:{instance:this}})),this))}evalXPath(e){const t=this.parentElement.parentElement;return Ke(e,this.getDefaultContext(),t)}getInstanceData(){return this.instanceData||this._createInstanceData(),this.instanceData}setInstanceData(e){e?this.instanceData=e:this._createInstanceData()}getDefaultContext(){return"xml"===this.type?this.instanceData.firstElementChild:this.instanceData}async _initInstance(){if("#querystring"===this.src){const e=new URLSearchParams(location.search),t=(new DOMParser).parseFromString("<data></data>","application/xml"),n=t.firstElementChild;for(const r of e){const e=t.createElement(r[0]);e.appendChild(t.createTextNode(r[1])),n.appendChild(e)}this.instanceData=t}else this.src?await this._loadData():0!==this.childNodes.length&&this._useInlineData()}_createInstanceData(){if("xml"===this.type){const e=(new DOMParser).parseFromString("<data></data>","application/xml");this.instanceData=e}"json"===this.type&&(this.instanceData={})}async _loadData(){const e=""+this.src,t=je.getContentType(this,"get");await fetch(e,{method:"GET",mode:"cors",credentials:"include",headers:{"Content-Type":t}}).then(e=>{const t=e.headers.get("content-type").toLowerCase();return t.startsWith("text/html")?e.text().then(e=>(new DOMParser).parseFromString(e,"text/html")):t.startsWith("text/plain")||t.startsWith("text/markdown")?e.text():t.startsWith("application/json")?e.json():t.startsWith("application/xml")?e.text().then(e=>(new DOMParser).parseFromString(e,"application/xml")):"done"}).then(e=>{e.nodeType,this.instanceData=e}).catch(e=>{throw new Error("failed loading data "+e)})}_getContentType(){return"xml"===this.type?"application/xml":"json"===this.type?"application/json":null}_useInlineData(){if("xml"===this.type){const e=(new DOMParser).parseFromString(this.innerHTML,"application/xml");this.instanceData=e}else"json"===this.type?this.instanceData=JSON.parse(this.textContent):"html"===this.type?this.instanceData=this.firstElementChild.children:"text"===this.type&&(this.instanceData=this.textContent)}_handleResponse(){const e=this.shadowRoot.getElementById("loader"),t=(new DOMParser).parseFromString(e.lastResponse,"application/xml");this.instanceData=t}_handleError(){this.shadowRoot.getElementById("loader")}}customElements.define("fx-instance",rt);class at{constructor(e,t,n,r,a,i,o,s,u){this.path=e,this.ref=t,this.constraint=i,this.readonly=n,this.relevant=r,this.required=a,this.type=o,this.node=s,this.bind=u,this.changed=!1,this.alerts=[],this.boundControls=[]}get value(){return this.node.nodeType?this.node.nodeType===Node.ATTRIBUTE_NODE?this.node.nodeValue:this.node.textContent:this.node}set value(e){e.nodeType===Node.DOCUMENT_NODE?this.node.appendChild(e.firstElementChild):e.nodeType===Node.ELEMENT_NODE?this.node.appendChild(e):this.node.nodeType===Node.ATTRIBUTE_NODE?this.node.nodeValue=e:this.node.textContent=e}addAlert(e){this.alerts.push(e)}cleanAlerts(){this.alerts=[]}}class it extends HTMLElement{constructor(){super(),this.instances=[],this.modelItems=[],this.defaultContext={},this.changed=[],this.inited=!1,this.modelConstructed=!1,this.attachShadow({mode:"open"}),this.computes=0}get formElement(){return this.parentElement}connectedCallback(){this.shadowRoot.innerHTML="\n <slot></slot>\n ",this.addEventListener("model-construct-done",e=>{this.modelConstructed=!0}),this.skipUpdate=!1}static lazyCreateModelItem(e,t,n){let r,a={};if(null==n)return null;a=n.nodeType===n.TEXT_NODE?n.parentNode:n,n.nodeType?r=Fe.getPath(n):(r=null,a=n);const i=new at(r,t,je.READONLY_DEFAULT,je.RELEVANT_DEFAULT,je.REQUIRED_DEFAULT,je.CONSTRAINT_DEFAULT,je.TYPE_DEFAULT,a,this);return e.registerModelItem(i),i}modelConstruct(){this.dispatchEvent(new CustomEvent("model-construct",{detail:this}));const e=this.querySelectorAll("fx-instance");if(e.length>0){const t=[];e.forEach(e=>{t.push(e.init())}),Promise.all(t).then(()=>{this.instances=Array.from(e),this.updateModel(),this.inited=!0,this.dispatchEvent(new CustomEvent("model-construct-done",{composed:!0,bubbles:!0,detail:{model:this}}))})}else this.dispatchEvent(new CustomEvent("model-construct-done",{composed:!0,bubbles:!0,detail:{model:this}}));this.inited=!0}registerModelItem(e){this.modelItems.push(e)}updateModel(){this.rebuild(),this.skipUpdate||(this.recalculate(),this.revalidate())}rebuild(){this.mainGraph=new He(!1),this.modelItems=[];const e=this.querySelectorAll("fx-model > fx-bind");0!==e.length?(e.forEach(e=>{e.init(this)}),this.dispatchEvent(new CustomEvent("rebuild-done",{detail:{maingraph:this.mainGraph}}))):this.skipUpdate=!0}recalculate(){if(this.computes=0,this.subgraph=new He(!1),0!==this.changed.length){this.changed.forEach(e=>{if(this.subgraph.addNode(e.path,e.node),this.mainGraph.hasNode(e.path)){const t=this.mainGraph.dependantsOf(e.path,!1).reverse();0!==t.length&&t.forEach(t=>{const n=this.mainGraph.getNodeData(t);if(this.subgraph.addNode(t,n),t.includes(":")){const r=t.substring(0,t.indexOf(":"));this.subgraph.addNode(r,n);0!==this.mainGraph.dependentsOf(e.path,!1).indexOf(t)&&this.subgraph.addDependency(t,e.path)}})}});this.subgraph.overallOrder(!1).forEach(e=>{if(this.mainGraph.hasNode(e)){const t=this.mainGraph.getNodeData(e);this.compute(t,e)}});const e=[...this.changed];this.formElement.toRefresh=e,this.changed=[],this.dispatchEvent(new CustomEvent("recalculate-done",{detail:{subgraph:this.subgraph}}))}else{this.mainGraph.overallOrder(!1).forEach(e=>{const t=this.mainGraph.getNodeData(e);this.compute(t,e)})}}compute(e,t){const n=this.getModelItem(e);if(n&&t.includes(":")){const e=t.split(":")[1];if(e)if("calculate"===e){const t=Je(n.bind[e],n.node,this);n.value=t,n.readonly=!0}else if("constraint"!==e&&"type"!==e){const t=n.bind[e];if(t){const r=We(t,n.node,this);n[e]=r}}this.computes+=1}}revalidate(){let e=!0;return this.modelItems.forEach(t=>{const{bind:n}=t;if(n&&"function"==typeof n.hasAttribute&&n.hasAttribute("constraint")){const r=n.getAttribute("constraint");if(r){const a=We(r,t.node,this);if(t.constraint=a,this.formElement.addToRefresh(t),a||(e=!1),!this.modelConstructed){const e=n.getAlert();e&&t.addAlert(e)}}}}),e}getModelItem(e){return this.modelItems.find(t=>t.node===e)}getDefaultContext(){return this.instances[0].getDefaultContext()}getDefaultInstance(){return this.instances[0]}getDefaultInstanceData(){return this.instances[0].instanceData}getInstance(e){return Array.from(this.instances).find(t=>t.id===e)}evalBinding(e){return this.instances[0].evalXPath(e)}}function ot(e){return e.closest("fx-fore")}function st(e,t){const n=e.closest("[ref]");if(null!==n)return n.nodeset;const r=function(e){return ot(e).getModel()}(e);if(Fe.isAbsolutePath(t)){const e=Fe.getInstanceId(t);return r.getInstance(e).getDefaultContext()}return null!==r.getDefaultInstance()&&r.inited?r.getDefaultInstance().getDefaultContext():[]}function ut(e,t){const n=function(e){return e.nodeType===Node.ATTRIBUTE_NODE?e.ownerElement:e.nodeType===Node.ELEMENT_NODE?e:e.parentNode}(e),r=n.closest("fx-repeatitem");if(r)return r.nodeset;if(e.nodeType===Node.ATTRIBUTE_NODE&&"ref"===e.nodeName){if(e.ownerElement.hasAttribute("context")){const r=st(e.ownerElement.parentNode,t);return Ke(e.ownerElement.getAttribute("context"),r,ot(n))}return st(n.parentNode,t)}return st(n,t)}customElements.define("fx-model",it);const lt=e=>class extends e{static get properties(){return{context:{type:Object},model:{type:Object},modelItem:{type:Object},nodeset:{type:Object},ref:{type:String},inScopeVariables:{type:Map}}}constructor(){super(),this.context=null,this.model=null,this.modelItem={},this.ref=this.hasAttribute("ref")?this.getAttribute("ref"):"",this.inScopeVariables=null}getModel(){if(this.model)return this.model;return this.getOwnerForm().querySelector("fx-model")}getOwnerForm(){let e=this;for(;e&&e.parentNode;){if("FX-FORE"===e.nodeName.toUpperCase())return e;e=e.parentNode instanceof DocumentFragment?e.parentNode.host:e.parentNode}return e}evalInContext(){const e=ut(this.getAttributeNode("ref")||this,this.ref);if(e)if(""===this.ref)this.nodeset=e;else if(Array.isArray(e))this.nodeset=Ke(this.ref,e[0],this);else{const{nodeType:t}=e;this.nodeset=t?Ke(this.ref,e,this):Je(this.ref,e,this)}}isNotBound(){return!this.hasAttribute("ref")}isBound(){return this.hasAttribute("ref")}getBindingExpr(){if(this.hasAttribute("ref"))return this.getAttribute("ref");const e=this.parentNode.closest("[ref]");return e?e.getAttribute("ref"):"instance()"}getInstance(){if(this.ref.startsWith("instance(")){const e=Fe.getInstanceId(this.ref);return this.getModel().getInstance(e)}return this.getModel().getInstance("default")}_getParentBindingElement(e){if(e.parentNode.host){const{host:t}=e.parentNode;if(t.hasAttribute("ref"))return t}else if(e.parentNode){if(e.parentNode.hasAttribute("ref"))return this.parentNode;this._getParentBindingElement(this.parentNode)}return null}getModelItem(){const e=this.getModel().getModelItem(this.nodeset);e&&(this.modelItem=e);let t;if(this.closest("fx-repeatitem")){const{index:e}=this.closest("fx-repeatitem");t=Array.isArray(this.nodeset)?this.getModel().getModelItem(this.nodeset[e-1]):this.getModel().getModelItem(this.nodeset)}else t=this.getModel().getModelItem(this.nodeset);return t||it.lazyCreateModelItem(this.getModel(),this.ref,this.nodeset)}getValue(){if(this.hasAttribute("value")){const e=this.getAttribute("value");try{return Ze(e,ut(this,e),this.getOwnerForm())}catch(e){this.dispatch("error",{message:e})}}return this.textContent?this.textContent:null}getInScopeContext(){return ut(this.getAttributeNode("ref")||this,this.ref)}setInScopeVariables(e){this.inScopeVariables=e}dispatch(e,t){const n=new CustomEvent(e,{composed:!0,bubbles:!0,detail:t});this.dispatchEvent(n)}};class ct extends(lt(HTMLElement)){constructor(){super(),this.nodeset=[],this.model={},this.contextNode={},this.inited=!1}connectedCallback(){this.ref=this.getAttribute("ref"),this.readonly=this.getAttribute("readonly"),this.required=this.getAttribute("required"),this.relevant=this.getAttribute("relevant"),this.type=this.hasAttribute("type")?this.getAttribute("type"):ct.TYPE_DEFAULT,this.calculate=this.getAttribute("calculate")}init(e){this.model=e,this.instanceId=this._getInstanceId(),this.bindType=this.getModel().getInstance(this.instanceId).type,"xml"===this.bindType&&(this._evalInContext(),this._buildBindGraph(),this._createModelItems()),this._processChildren(e)}_buildBindGraph(){"xml"===this.bindType&&this.nodeset.forEach(e=>{const t=Fe.getPath(e);this.model.mainGraph.addNode(t,e),this.calculate&&(this.model.mainGraph.addNode(t+":calculate",e),this.model.mainGraph.addDependency(t,t+":calculate"));const n=this._getReferencesForProperty(this.calculate,e);if(0!==n.length&&this._addDependencies(n,e,t,"calculate"),!this.calculate){const n=this._getReferencesForProperty(this.readonly,e);0!==n.length?this._addDependencies(n,e,t,"readonly"):this.readonly&&this.model.mainGraph.addNode(t+":readonly",e)}const r=this._getReferencesForProperty(this.required,e);0!==r.length?this._addDependencies(r,e,t,"required"):this.required&&this.model.mainGraph.addNode(t+":required",e);const a=this._getReferencesForProperty(this.relevant,e);0!==a.length?this._addDependencies(a,e,t,"relevant"):this.relevant&&this.model.mainGraph.addNode(t+":relevant",e);const i=this._getReferencesForProperty(this.constraint,e);0!==i.length?this._addDependencies(i,e,t,"constraint"):this.constraint&&this.model.mainGraph.addNode(t+":constraint",e)})}_addDependencies(e,t,n,r){const a=`${n}:${r}`;0!==e.length?(this.model.mainGraph.hasNode(a)||this.model.mainGraph.addNode(a,t),e.forEach(e=>{const t=Fe.getPath(e);t.endsWith("text()[1]")||(this.model.mainGraph.hasNode(t)||this.model.mainGraph.addNode(t,e),this.model.mainGraph.addDependency(a,t))})):this.model.mainGraph.addNode(a,t)}_processChildren(e){const t=this.querySelectorAll(":scope > fx-bind");Array.from(t).forEach(t=>{t.init(e)})}getAlert(){if(this.hasAttribute("alert"))return this.getAttribute("alert");const e=this.querySelector("fx-alert");return e?e.innerHTML:null}_evalInContext(){const e=ut(this.getAttributeNode("ref")||this,this.ref);if(this.nodeset=[],""===this.ref||null===this.ref)this.nodeset=e;else if(Array.isArray(e))e.forEach(t=>{if(Fe.isSelfReference(this.ref))this.nodeset=e;else if(this.ref){ze(this.ref,t,this.getOwnerForm()).forEach(e=>{this.nodeset.push(e)})}});else{"xml"===this.getModel().getInstance(this.instanceId).type?this.nodeset=ze(this.ref,e,this.getOwnerForm()):this.nodeset=this.ref}}_createModelItems(){Array.isArray(this.nodeset)?Array.from(this.nodeset).forEach(e=>{this._createModelItem(e)}):this._createModelItem(this.nodeset)}static lazyCreateModelitems(e,t,n){Array.isArray(n)?Array.from(n).forEach(n=>{ct.lazyCreateModelItem(e,t,n)}):ct.lazyCreateModelItem(e,t,n)}_createModelItem(e){if(Fe.isSelfReference(this.ref)){const e=this.parentElement.closest("fx-bind[ref]");return void(e&&(e.required=this.required))}const t=e,n=Fe.getPath(e),r=new at(n,this.getBindingExpr(),ct.READONLY_DEFAULT,ct.RELEVANT_DEFAULT,ct.REQUIRED_DEFAULT,ct.CONSTRAINT_DEFAULT,this.type,t,this);this.getModel().registerModelItem(r)}_getReferencesForProperty(e){if(e){const t=new Set,n=new Ue(e=>t.add(e));return this.nodeset.forEach(t=>{Ze(e,t,this.getOwnerForm(),n)}),Array.from(t.values())}return[]}_initBooleanModelItemProperty(e,t){return We(this[e],t,this)}static shortenPath(e){const t=e.split("/");let n="";for(let e=2;e<t.length;e+=1){const r=t[e];if(-1!==r.indexOf("{}")){n+="/"+r.split("{}")[1]}else n+="/"+r}return n}_getInstanceId(){const e=this.getBindingExpr();return e.startsWith("instance(")?(this.instanceId=Fe.getInstanceId(e),this.instanceId):this.instanceId?this.instanceId:"default"}}ct.READONLY_DEFAULT=!1,ct.REQUIRED_DEFAULT=!1,ct.RELEVANT_DEFAULT=!0,ct.CONSTRAINT_DEFAULT=!0,ct.TYPE_DEFAULT="xs:string",customElements.define("fx-bind",ct);
2
2
  /*!
3
3
  * Toastify js 1.11.0
4
4
  * https://github.com/apvarun/toastify-js
@@ -6,7 +6,7 @@ function e(e,t,n,r){const a={op:t,func:n,data:r};return e.push(a),a}function t(e
6
6
  *
7
7
  * Copyright (C) 2018 Varun A P
8
8
  */
9
- class ct{constructor(e){this.defaults={oldestFirst:!0,text:"Toastify is awesome!",node:void 0,duration:3e3,selector:void 0,callback:function(){},destination:void 0,newWindow:!1,close:!1,gravity:"toastify-top",positionLeft:!1,position:"",backgroundColor:"",avatar:"",className:"",stopOnFocus:!0,onClick:function(){},offset:{x:0,y:0},escapeMarkup:!0,style:{background:""}},this.version="1.11.0",this.options={},this.toastElement=null,this._rootElement=document.body,this._init(e)}showToast(){if(this.toastElement=this._buildToast(),"string"==typeof this.options.selector?this._rootElement=document.getElementById(this.options.selector):this.options.selector instanceof HTMLElement||this.options.selector instanceof ShadowRoot?this._rootElement=this.options.selector:this._rootElement=document.body,!this._rootElement)throw"Root element is not defined";return this._rootElement.insertBefore(this.toastElement,this._rootElement.firstChild),this._reposition(),this.options.duration>0&&(this.toastElement.timeOutValue=window.setTimeout(()=>{this._removeElement(this.toastElement)},this.options.duration)),this}hideToast(){this.toastElement.timeOutValue&&clearTimeout(this.toastElement.timeOutValue),this._removeElement(this.toastElement)}_init(e){this.options=Object.assign(this.defaults,e),this.options.backgroundColor,this.toastElement=null,this.options.gravity="bottom"===e.gravity?"toastify-bottom":"toastify-top",this.options.stopOnFocus=void 0===e.stopOnFocus||e.stopOnFocus,this.options.style.background=this.options.style.background||e.backgroundColor}_buildToast(){if(!this.options)throw"Toastify is not initialized";let e=document.createElement("div");e.className="toastify on "+this.options.className,e.className+=" toastify-"+this.options.position,e.className+=" "+this.options.gravity;for(const t in this.options.style)e.style[t]=this.options.style[t];if(this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)e.appendChild(this.options.node);else if(this.options.escapeMarkup?e.innerText=this.options.text:e.innerHTML=this.options.text,""!==this.options.avatar){let t=document.createElement("img");t.src=this.options.avatar,t.className="toastify-avatar","left"==this.options.position?e.appendChild(t):e.insertAdjacentElement("afterbegin",t)}if(!0===this.options.close){let t=document.createElement("span");t.innerHTML="&#10006;",t.className="toast-close",t.addEventListener("click",e=>{e.stopPropagation(),this._removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)});const n=window.innerWidth>0?window.innerWidth:screen.width;"left"==this.options.position&&n>360?e.insertAdjacentElement("afterbegin",t):e.appendChild(t)}if(this.options.stopOnFocus&&this.options.duration>0&&(e.addEventListener("mouseover",t=>{window.clearTimeout(e.timeOutValue)}),e.addEventListener("mouseleave",()=>{e.timeOutValue=window.setTimeout(()=>{this._removeElement(e)},this.options.duration)})),void 0!==this.options.destination&&e.addEventListener("click",e=>{e.stopPropagation(),!0===this.options.newWindow?window.open(this.options.destination,"_blank"):window.location=this.options.destination}),"function"==typeof this.options.onClick&&void 0===this.options.destination&&e.addEventListener("click",e=>{e.stopPropagation(),this.options.onClick()}),"object"==typeof this.options.offset){const t=this._getAxisOffsetAValue("x",this.options),n=this._getAxisOffsetAValue("y",this.options),r="left"==this.options.position?t:"-"+t,a="toastify-top"==this.options.gravity?n:"-"+n;e.style.transform=`translate(${r},${a})`}return e}_removeElement(e){e.className=e.className.replace(" on",""),window.setTimeout(()=>{this.options.node&&this.options.node.parentNode&&this.options.node.parentNode.removeChild(this.options.node),e.parentNode&&e.parentNode.removeChild(e),this.options.callback.call(e),this._reposition()},400)}_reposition(){let e,t={top:15,bottom:15},n={top:15,bottom:15},r={top:15,bottom:15},a=this._rootElement.querySelectorAll(".toastify");for(let i=0;i<a.length;i++){e=!0===a[i].classList.contains("toastify-top")?"toastify-top":"toastify-bottom";let o=a[i].offsetHeight;e=e.substr(9,e.length-1);let s=15;(window.innerWidth>0?window.innerWidth:screen.width)<=360?(a[i].style[e]=r[e]+"px",r[e]+=o+s):!0===a[i].classList.contains("toastify-left")?(a[i].style[e]=t[e]+"px",t[e]+=o+s):(a[i].style[e]=n[e]+"px",n[e]+=o+s)}}_getAxisOffsetAValue(e,t){return t.offset[e]?isNaN(t.offset[e])?t.offset[e]:t.offset[e]+"px":"0px"}}function ht(e){return new ct(e)}class pt extends HTMLElement{static get properties(){return{avatar:{type:String},backgroundColor:{type:String},callback:{type:String},classProp:{type:String},close:{type:Boolean},destination:{type:String},duration:{type:Number},escapeMarkup:{type:Boolean},gravity:{type:String},newWindow:{type:Boolean},oldestFirst:{type:Boolean},position:{type:String},selector:{type:String},stopOnFocus:{type:Boolean},text:{type:String}}}constructor(){super(),this.attachShadow({mode:"open"})}_initVar(e,t){return this.hasAttribute(e)?this.getAttribute(e):t}connectedCallback(){this.avatar=this._initVar("avatar",""),this.backgroundColor=this._initVar("backgroundColor",""),this.callback=this._initVar("callback",{}),this.classProp=this._initVar("data-class",""),this.close="true"===this._initVar("close",!1),this.destination=this._initVar("destination",""),this.duration=Number(this._initVar("duration",3e3)),this.escapeMarkup="true"===this._initVar("escapeMarkup",!0),this.gravity=this._initVar("gravity","top"),this.newWindow="true"===this._initVar("newWindow",!1),this.oldestFirst="true"===this._initVar("oldestFirst",!0),this.position=this._initVar("position","right"),this.stopOnFocus=this._initVar("stopOnFocus",!0),this.text=this._initVar("text","");this.shadowRoot.innerHTML=`\n <style>\n \n :host{\n display:none;\n }\n \n </style>\n ${this.renderHTML}\n `,this.addEventListener("jinn-toast",e=>{this.showToast(e.detail.text)})}showToast(e){new ht({avatar:this.avatar,className:this.classProp,close:this.close,destination:this.destination,duration:this.duration,escapeMarkup:this.escapeMarkup,gravity:this.gravity,newWindow:this.newWindow,oldestFirst:this.oldestFirst,position:this.position,node:this.shadowRoot,stopOnFocus:this.stopOnFocus,text:e}).showToast()}renderHTML(){return"\n <slot></slot>\n "}}window.customElements.define("jinn-toast",pt);class ft extends HTMLElement{static get properties(){return{lazyRefresh:{type:Boolean},model:{type:Object},ready:{type:Boolean}}}constructor(){super(),this.model={},this.addEventListener("model-construct-done",this._handleModelConstructDone),this.addEventListener("message",this._displayMessage),this.addEventListener("error",this._displayError),window.addEventListener("compute-exception",e=>{}),this.ready=!1,this.storedTemplateExpressionByNode=new Map;this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML='\n <style>\n \n :host {\n // display: none;\n height:auto;\n padding:var(--model-element-padding);\n font-family:Roboto, sans-serif;\n color:var(--paper-grey-900);\n }\n :host ::slotted(fx-model){\n display:none;\n }\n :host(.fx-ready){\n animation: fadein .4s forwards;\n display:block;\n }\n\n #modalMessage .dialogActions{\n text-align:center;\n }\n .overlay {\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n background: rgba(0, 0, 0, 0.7);\n transition: all 500ms;\n visibility: hidden;\n opacity: 0;\n z-index:10;\n }\n .overlay.show {\n visibility: visible;\n opacity: 1;\n }\n \n .popup {\n margin: 70px auto;\n background: #fff;\n border-radius: 5px;\n width: 30%;\n position: relative;\n transition: all 5s ease-in-out;\n padding: 20px;\n\n }\n .popup h2 {\n margin-top: 0;\n width:100%;\n background:#eee;\n position:absolute;\n top:0;\n right:0;\n left:0;\n height:40px;\n border-radius: 5px;\n\n }\n .popup .close {\n position: absolute;\n top: 3px;\n right: 10px;\n transition: all 200ms;\n font-size: 30px;\n font-weight: bold;\n text-decoration: none;\n color: #333;\n }\n .popup .close:focus{\n outline:none;\n }\n \n .popup .close:hover {\n color: #06D85F;\n }\n #messageContent{\n margin-top:40px;\n }\n @keyframes fadein {\n 0% {\n opacity:0;\n }\n 100% {\n opacity:1;\n }\n }\n \n </style>\n \n <jinn-toast id="message" gravity="bottom" position="left"></jinn-toast>\n <jinn-toast id="error" text="error" duration="-1" data-class="error" close="true" position="left" gravity="bottom"></jinn-toast>\n <slot></slot>\n <div id="modalMessage" class="overlay">\n <div class="popup">\n <h2></h2>\n <a class="close" href="#" onclick="event.target.parentNode.parentNode.classList.remove(\'show\')" autofocus>&times;</a>\n <div id="messageContent"></div>\n </div>\n </div>\n \n ',this.toRefresh=[],this.initialRun=!0,this.someInstanceDataStructureChanged=!1}connectedCallback(){if(this.lazyRefresh=this.hasAttribute("refresh-on-view"),this.lazyRefresh){const e={root:null,rootMargin:"0px",threshold:.3};this.intersectionObserver=new IntersectionObserver(this.handleIntersect,e)}if(this.src=this.hasAttribute("src")?this.getAttribute("src"):null,this.src)return void this._loadFromSrc();this.shadowRoot.querySelector("slot").addEventListener("slotchange",e=>{let t=e.target.assignedElements().find(e=>"FX-MODEL"===e.nodeName.toUpperCase());if(!t){const e=document.createElement("FX-model");this.appendChild(e),t=e}t.inited||(this.src,t.modelConstruct()),this.model=t}),this.addEventListener("path-mutated",e=>{this.someInstanceDataStructureChanged=!0})}addToRefresh(e){this.toRefresh.find(t=>t.path===e.path)||this.toRefresh.push(e)}_loadFromSrc(){fetch(this.src,{method:"GET",mode:"cors",credentials:"include",headers:{"Content-Type":"text/html"}}).then(e=>e.headers.get("content-type").toLowerCase().startsWith("text/html")?e.text().then(e=>(new DOMParser).parseFromString(e,"text/html")):"done").then(e=>{const t=e.querySelector("fx-fore");t||this.dispatchEvent(new CustomEvent("error",{detail:{message:`Fore element not found in '${this.src}'. Maybe wrapped within 'template' element?`}})),t.setAttribute("from-src",this.src),this.replaceWith(t)}).catch(e=>{this.dispatchEvent(new CustomEvent("error",{detail:{message:`'${this.src}' not found or does not contain Fore element.`}}))})}handleIntersect(e,t){e.forEach(e=>{const{target:t}=e;e.isIntersecting&&(t.classList.add("loaded"),"function"==typeof t.refresh?t.refresh(t,!0):je.refreshChildren(t,!0))}),e[0].target.getOwnerForm().dispatchEvent(new CustomEvent("refresh-done"))}evaluateToNodes(e,t){return Ke(e,t,this)}disconnectedCallback(){}async refresh(e){this.initialRun||0===this.toRefresh.length?je.refreshChildren(this,!0):(this.toRefresh.forEach(e=>{const t=e.boundControls;t&&t.forEach(e=>{e.refresh()});const n=this.getModel().mainGraph;if(n&&n.hasNode(e.path)){const t=this.getModel().mainGraph.dependentsOf(e.path,!1);0!==t.length&&t.forEach(e=>{const t=Fe.getBasePath(e);this.getModel().modelItems.find(e=>e.path===t).boundControls.forEach(e=>{e.refresh()})})}}),this.toRefresh=[]),(this.initialRun||this.someInstanceDataStructureChanged)&&(this._updateTemplateExpressions(),this.someInstanceDataStructureChanged=!1),this._processTemplateExpressions(),this.dispatchEvent(new CustomEvent("refresh-done"))}_updateTemplateExpressions(){const e=Ke("(descendant-or-self::*/(text(), @*))[matches(.,'\\{.*\\}')] except descendant-or-self::fx-model/descendant-or-self::node()/(., @*)",this,this);this.storedTemplateExpressions||(this.storedTemplateExpressions=[]),Array.from(e).forEach(e=>{if(this.storedTemplateExpressionByNode.has(e))return;const t=this._getTemplateExpression(e);this.storedTemplateExpressionByNode.set(e,t)}),this._processTemplateExpressions()}_processTemplateExpressions(){for(const e of this.storedTemplateExpressionByNode.keys())this._processTemplateExpression({node:e,expr:this.storedTemplateExpressionByNode.get(e)})}_processTemplateExpression(e){const{expr:t}=e,{node:n}=e;this.evaluateTemplateExpression(t,n,this)}evaluateTemplateExpression(e,t){if("{}"===e)return;const n=e.match(/{[^}]*}/g);t.nodeType===t.TEXT_NODE?t.parentNode:t.ownerElement;n&&n.forEach(n=>{let r=n.substring(1,n.length-1);const a=st(t,r);if(!a){(t.nodeType===Node.TEXT_NODE||t.nodeType===Node.ATTRIBUTE_NODE)&&t.parentNode;return}const i=Fe.getInstanceId(r),o=this.getModel().getInstance(i);try{const i=We(r,a,t,null,o),s=e.replaceAll(n,i);if(t.nodeType===Node.ATTRIBUTE_NODE){t.ownerElement.setAttribute(t.nodeName,s)}else t.nodeType===Node.TEXT_NODE&&(t.textContent=s);s.includes("{")&&(r=s.substring(1,s.length),this.evaluateTemplateExpression(s,t))}catch(e){this.dispatchEvent(new CustomEvent("error",{detail:e}))}})}_getTemplateExpression(e){return e.nodeType===Node.ATTRIBUTE_NODE?e.value:e.nodeType===Node.TEXT_NODE?e.textContent.trim():null}_handleModelConstructDone(){this._initUI()}async _lazyCreateInstance(){const e=this.querySelector("fx-model");if(0===e.instances.length){const t=document.createElement("fx-instance");e.appendChild(t);const n=document.implementation.createDocument(null,"data",null);this._generateInstance(this,n.firstElementChild),t.instanceData=n,e.instances.push(t)}}_generateInstance(e,t){if(e.hasAttribute("ref")&&!je.isActionElement(e.nodeName)){const n=e.getAttribute("ref");if(n.includes("/")){n.split("/").forEach(n=>{t=this._generateNode(t,n,e)})}else t=this._generateNode(t,n,e)}if(e.hasChildNodes()){const n=e.children;for(let e=0;e<n.length;e+=1)this._generateInstance(n[e],t)}return t}_generateNode(e,t,n){const r=e.ownerDocument.createElement(t);return 0===n.children.length&&(r.textContent=n.textContent),e.appendChild(r),e=r}async _initUI(){await this._lazyCreateInstance(),await this.refresh(),this.classList.add("fx-ready"),this.ready=!0,this.initialRun=!1,this.dispatchEvent(new CustomEvent("ready",{}))}registerLazyElement(e){this.intersectionObserver&&this.intersectionObserver.observe(e)}unRegisterLazyElement(e){this.intersectionObserver&&this.intersectionObserver.unobserve(e)}getModel(){return this.querySelector("fx-model")}_displayMessage(e){const{level:t}=e.detail,n=e.detail.message;this._showMessage(t,n)}_displayError(e){const t=e.detail.message;this.shadowRoot.querySelector("#error").showToast(t)}_showMessage(e,t){if("modal"===e)this.shadowRoot.getElementById("messageContent").innerText=t,this.shadowRoot.getElementById("modalMessage").classList.add("show");else if("modeless"===e)this.shadowRoot.querySelector("#message").showToast(t);else{this.shadowRoot.querySelector("#message").showToast(t)}}}customElements.define("fx-fore",ft);class dt extends(ut(HTMLElement)){constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.methods=["get","put","post","delete","head","urlencoded-post"],this.model=this.parentNode,this.hasAttribute("id"),this.id=this.getAttribute("id"),this.instance=this.hasAttribute("instance")?this.getAttribute("instance"):null,this.into=this.hasAttribute("into")?this.getAttribute("into"):null,this.method=this.hasAttribute("method")?this.getAttribute("method"):"get",this.nonrelevant=this.hasAttribute("nonrelevant")?this.getAttribute("nonrelevant"):"remove",this.replace=this.hasAttribute("replace")?this.getAttribute("replace"):"all",this.serialization=this.hasAttribute("serialization")?this.getAttribute("serialization"):"xml",this.hasAttribute("url"),this.url=this.getAttribute("url"),this.targetref=this.hasAttribute("targetref")?this.getAttribute("targetref"):null,this.mediatype=this.hasAttribute("mediatype")?this.getAttribute("mediatype"):"application/xml",this.validate=this.getAttribute("validate")?this.getAttribute("validate"):"true",this.shadowRoot.innerHTML=this.renderHTML()}renderHTML(){return"\n <slot></slot>\n "}async submit(){await this.dispatch("submit",{submission:this}),this._submit()}async _submit(){this.evalInContext();const e=this.getModel();if(e.recalculate(),this.validate){if(!e.revalidate())return this.dispatch("submit-error",{}),void this.getModel().parentNode.refresh()}await this._serializeAndSend()}_evaluateAttributeTemplateExpression(e,t){const n=e.match(/{[^}]*}/g);return n&&n.forEach(n=>{const r=n.substring(1,n.length-1),a=We(r,st(t,r),this.getOwnerForm()),i=e.replaceAll(n,a);e=i}),e}async _serializeAndSend(){const e=this._evaluateAttributeTemplateExpression(this.url,this),t=this.getInstance();if("xml"!==t.type)return;let n;if("none"===this.serialization)n=void 0;else{const e=this.selectRelevant();n=this._serialize(t.type,e)}if("get"===this.method.toLowerCase()&&(n=void 0),"#echo"===e){let e;return e=n?(new DOMParser).parseFromString(n,"application/xml"):void 0,this._handleResponse(e),void this.dispatch("submit-done",{})}const r=this._getHeaders();if("urlencoded-post"===this.method&&(this.method="post"),!this.methods.includes(this.method.toLowerCase()))return void this.dispatch("error",{message:"Unknown method "+this.method});const a=await fetch(e,{method:this.method,mode:"cors",credentials:"include",headers:r,body:n});if(!a.ok||a.status>400)return void this.dispatch("submit-error",{message:"Error while submitting "+this.id});const i=a.headers.get("content-type").toLowerCase();if(i.startsWith("text/plain")||i.startsWith("text/html")||i.startsWith("text/markdown")){const e=await a.text();this._handleResponse(e)}else if(i.startsWith("application/json")){const e=await a.json();this._handleResponse(e)}else if(i.startsWith("application/xml")){const e=await a.text(),t=(new DOMParser).parseFromString(e,"application/xml");this._handleResponse(t)}else{const e=await a.blob();this._handleResponse(e)}this.dispatch("submit-done",{})}_serialize(e,t){if("urlencoded-post"===this.method){const e=new URLSearchParams;return Array.from(t.children).forEach(t=>{e.append(t.nodeName,t.textContent)}),e}if("xml"===e){return(new XMLSerializer).serializeToString(t)}throw new Error("unknown instance type ",e)}_getHeaders(){const e=new Headers,t=this.getInstance(),n=je.getContentType(t,this.method);e.append("Content-Type",n),e.has("Accept")&&e.delete("Accept");const r=this.querySelectorAll("fx-header");return Array.from(r).forEach(t=>{const{name:n}=t,r=t.getValue();e.append(n,r)}),e}_getUrlExpr(){return this.storedTemplateExpressions.find(e=>"url"===e.node.nodeName)}_getTargetInstance(){let e;if(e=this.instance?this.model.getInstance(this.instance):this.model.getInstance("default"),!e)throw new Error("target instance not found: "+e);return e}_handleResponse(e){if("instance"===this.replace){const t=this._getTargetInstance();if(!t)throw new Error("target instance not found: "+t);if(this.targetref){const n=Qe(this.targetref,t.instanceData.firstElementChild,this),r=e.firstElementChild;n.parentNode.replaceChild(r,n)}else if(this.into){Qe(this.into,t.instanceData.firstElementChild,this).innerHTML=e}else{const n=e;t.instanceData=n}this.model.updateModel(),this.getOwnerForm().refresh()}if("all"===this.replace&&(document.getElementsByTagName("html")[0].innerHTML=e),"target"===this.replace){const t=this.getAttribute("target");document.querySelector(t).innerHTML=e}"redirect"===this.replace&&(window.location.href=e)}selectRelevant(){if("keep"===this.nonrelevant)return this.nodeset;const e=this.getModel().getModelItem(this.nodeset);if(e&&!e.relevant)return null;const t=(new DOMParser).parseFromString("<data></data>","application/xml").firstElementChild;if(0===this.nodeset.children.length&&this._isRelevant(this.nodeset))return this.nodeset;return this._filterRelevant(this.nodeset,t)}_filterRelevant(e,t){const{childNodes:n}=e;return Array.from(n).forEach(e=>{if(this._isRelevant(e)){const n=e.cloneNode(!1);t.appendChild(n);const{attributes:r}=e;return r&&Array.from(r).forEach(e=>{this._isRelevant(e)?n.setAttribute(e.nodeName,e.value):"empty"===this.nonrelevant?n.setAttribute(e.nodeName,""):n.removeAttribute(e.nodeName)}),this._filterRelevant(e,n)}return null}),t}_isRelevant(e){const t=this.getModel().getModelItem(e);return!(t&&!t.relevant)}_handleError(){this.dispatch("submit-error",{})}}customElements.define("fx-submission",dt);class mt extends(ut(HTMLElement)){constructor(){if(super(),this.style.display="none",this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML="",!this.hasAttribute("name"))throw new Error('required attribute "name" missing');this.name=this.getAttribute("name")}connectedCallback(){this.shadowRoot.innerHTML=""}}customElements.define("fx-header",mt);class vt extends(ut(HTMLElement)){constructor(){super(),this.value="",this.display=this.style.display,this.required=!1,this.readonly=!1,this.widget=null}getWidget(){throw new Error("You have to implement the method getWidget!")}async refresh(e){const t=this.value;if(!this.isNotBound()&&(this.evalInContext(),this.isBound())){if(null===this.nodeset)return void(this.style.display="none");if(this.modelItem=this.getModelItem(),this.modelItem instanceof rt){if(this.value=this.modelItem.value,this.modelItem.boundControls.includes(this)||this.modelItem.boundControls.push(this),await this.updateWidgetValue(),this.handleModelItemProperties(),!this.getOwnerForm().ready)return;t!==this.value&&this.dispatch("value-changed",{path:this.modelItem.path})}}}async updateWidgetValue(){throw new Error("You have to implement the method updateWidgetValue!")}handleModelItemProperties(){this.handleRequired(),this.handleReadonly(),this.getOwnerForm().ready&&this.handleValid(),this.handleRelevant()}_getForm(){return this.getModel().parentNode}_dispatchEvent(e){this.getOwnerForm().ready&&this.dispatch(e,{})}handleRequired(){this.widget=this.getWidget(),this.isRequired()!==this.modelItem.required&&(this.modelItem.required?(this.widget.setAttribute("required","required"),this.classList.add("required"),this._dispatchEvent("required")):(this.widget.removeAttribute("required"),this.required=!1,this.classList.toggle("required"),this._dispatchEvent("optional")))}handleReadonly(){this.isReadonly()!==this.modelItem.readonly&&(this.modelItem.readonly&&(this.widget.setAttribute("readonly","readonly"),this.classList.toggle("readonly"),this._dispatchEvent("readonly")),this.modelItem.readonly||(this.widget.removeAttribute("readonly"),this.classList.toggle("readonly"),this._dispatchEvent("readwrite")))}handleValid(){const e=this.querySelector("fx-alert");if(this.isValid()!==this.modelItem.constraint)if(this.modelItem.constraint)this.classList.remove("invalid"),e&&(e.style.display="none"),this._dispatchEvent("valid");else{if(this.classList.add("invalid"),e&&(e.style.display="block"),0!==this.modelItem.alerts.length){const{alerts:e}=this.modelItem;this.querySelector("fx-alert")||e.forEach(e=>{const t=document.createElement("fx-alert");t.innerHTML=e,this.appendChild(t),t.style.display="block"})}this._dispatchEvent("invalid")}}handleRelevant(){this.isEnabled()!==this.modelItem.relevant&&(this.modelItem.relevant?(this._dispatchEvent("relevant"),this.style.display=this.display):(this._dispatchEvent("nonrelevant"),this.style.display="none"))}isRequired(){return!!this.widget.hasAttribute("required")}isValid(){return!this.classList.contains("invalid")}isReadonly(){return!!this.widget.hasAttribute("readonly")}isEnabled(){return"none"!==this.style.display}_fadeOut(e){e.style.opacity=1,function t(){(e.style.opacity-=.1)<0?e.style.display="none":requestAnimationFrame(t)}()}_fadeIn(e,t){e.style.opacity=0,e.style.display=t||"block",function t(){let n=parseFloat(e.style.opacity);(n+=.1)>1||(e.style.opacity=n,requestAnimationFrame(t))}()}}window.customElements.define("fx-abstract-control",vt);customElements.define("fx-alert",class extends vt{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.shadowRoot.innerHTML="\n <style>\n \n :host {\n height: auto;\n font-size: 0.8em;\n font-weight: 400;\n color: red;\n display: none;\n }\n \n </style>\n \n <slot></slot>\n \n "}async updateWidgetValue(){this.innerHTML=this.value}});class gt extends vt{constructor(){super(),this.inited=!1,this.attachShadow({mode:"open"})}connectedCallback(){this.updateEvent=this.hasAttribute("update-event")?this.getAttribute("update-event"):"blur",this.valueProp=this.hasAttribute("value-prop")?this.getAttribute("value-prop"):"value",this.label=this.hasAttribute("label")?this.getAttribute("label"):null;this.shadowRoot.innerHTML=`\n <style>\n \n :host{\n display:inline-block;\n }\n \n </style>\n ${this.renderHTML(this.ref)}\n `,this.widget=this.getWidget(),"enter"===this.updateEvent&&(this.widget.addEventListener("keyup",e=>{13===e.keyCode&&(e.preventDefault(),this.setValue(this.widget[this.valueProp]))}),this.updateEvent="blur"),this.widget.addEventListener(this.updateEvent,()=>{this.setValue(this.widget[this.valueProp])});this.shadowRoot.querySelector("slot");this.template=this.querySelector("template")}setValue(e){const t=this.getModelItem(),n=this.shadowRoot.getElementById("setvalue");n.setValue(t,e),n.actionPerformed()}renderHTML(e){return`\n ${this.label?""+this.label:""}\n <slot></slot>\n <fx-setvalue id="setvalue" ref="${e}"></fx-setvalue>\n `}getWidget(){if(this.widget)return this.widget;let e=this.querySelector(".widget");if(e||(e=this.querySelector("input")),!e){const e=document.createElement("input");return e.classList.add("widget"),e.setAttribute("type","text"),this.appendChild(e),e}return e}async updateWidgetValue(){if("checked"===this.valueProp)"true"===this.value?this.widget.checked=!0:this.widget.checked=!1;else{let{widget:e}=this;e||(e=this),e.value=this.value}}getTemplate(){return this.querySelector("template")}async refresh(e){super.refresh();const t=this.getWidget();if(t.hasAttribute("ref")){const e=t.getAttribute("ref"),n=Qe(e,st(this,e),this),{children:r}=t;if(Array.from(r).forEach(e=>{"template"!==e.nodeName.toLowerCase()&&e.parentNode.removeChild(e)}),this.template)if(n.length)Array.from(n).forEach(e=>{const t=this.createEntry();this.updateEntry(t,e)});else{const e=this.createEntry();this.updateEntry(e,n)}}je.refreshChildren(this,e)}updateEntry(e,t){if("SELECT"!==this.widget.nodeName)return;const n=this._getValueAttribute(e),r=n.value,a=Qe(r.substring(1,r.length-1),t,e);n.value=a,this.value===a&&e.setAttribute("selected","selected");const i=e.textContent,o=We(i.substring(1,i.length-1),t,e);e.textContent=o}createEntry(){const e=this.template.content.firstElementChild.cloneNode(!0),t=document.importNode(e,!0);return this.template.parentNode.appendChild(t),t}_getValueAttribute(e){let t;return Array.from(e.attributes).forEach(e=>{-1!==e.value.indexOf("{")&&(t=e)}),t}}window.customElements.define("fx-control",gt);class yt extends(ut(HTMLElement)){constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.shadowRoot.innerHTML="\n <style>\n \n :host {\n display: block;\n }\n \n </style>\n \n <slot></slot>\n \n ",this.getOwnerForm().registerLazyElement(this)}refresh(e){!e&&this.hasAttribute("refresh-on-view")||(this.isBound()&&(this.evalInContext(),this.modelItem=this.getModelItem()),this._getForm().ready&&this.handleModelItemProperties(),je.refreshChildren(this,e))}handleModelItemProperties(){this.handleReadonly(),this.handleRelevant()}_getForm(){return this.getModel().parentNode}handleReadonly(){this.isReadonly()!==this.modelItem.readonly&&(this.modelItem.readonly&&(this.setAttribute("readonly","readonly"),this.dispatchEvent(new CustomEvent("readonly",{}))),this.modelItem.readonly||(this.removeAttribute("readonly"),this.dispatchEvent(new CustomEvent("readwrite",{}))))}handleRelevant(){this.modelItem&&this.isEnabled()!==this.modelItem.enabled&&(this.modelItem.enabled?this.dispatchEvent(new CustomEvent("enabled",{})):this.dispatchEvent(new CustomEvent("disabled",{})))}isReadonly(){return!!this.hasAttribute("readonly")}isEnabled(){return"none"!==this.style.display}}window.customElements.define("fx-container",yt);
9
+ class ht{constructor(e){this.defaults={oldestFirst:!0,text:"Toastify is awesome!",node:void 0,duration:3e3,selector:void 0,callback:function(){},destination:void 0,newWindow:!1,close:!1,gravity:"toastify-top",positionLeft:!1,position:"",backgroundColor:"",avatar:"",className:"",stopOnFocus:!0,onClick:function(){},offset:{x:0,y:0},escapeMarkup:!0,style:{background:""}},this.version="1.11.0",this.options={},this.toastElement=null,this._rootElement=document.body,this._init(e)}showToast(){if(this.toastElement=this._buildToast(),"string"==typeof this.options.selector?this._rootElement=document.getElementById(this.options.selector):this.options.selector instanceof HTMLElement||this.options.selector instanceof ShadowRoot?this._rootElement=this.options.selector:this._rootElement=document.body,!this._rootElement)throw"Root element is not defined";return this._rootElement.insertBefore(this.toastElement,this._rootElement.firstChild),this._reposition(),this.options.duration>0&&(this.toastElement.timeOutValue=window.setTimeout(()=>{this._removeElement(this.toastElement)},this.options.duration)),this}hideToast(){this.toastElement.timeOutValue&&clearTimeout(this.toastElement.timeOutValue),this._removeElement(this.toastElement)}_init(e){this.options=Object.assign(this.defaults,e),this.options.backgroundColor,this.toastElement=null,this.options.gravity="bottom"===e.gravity?"toastify-bottom":"toastify-top",this.options.stopOnFocus=void 0===e.stopOnFocus||e.stopOnFocus,this.options.style.background=this.options.style.background||e.backgroundColor}_buildToast(){if(!this.options)throw"Toastify is not initialized";let e=document.createElement("div");e.className="toastify on "+this.options.className,e.className+=" toastify-"+this.options.position,e.className+=" "+this.options.gravity;for(const t in this.options.style)e.style[t]=this.options.style[t];if(this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)e.appendChild(this.options.node);else if(this.options.escapeMarkup?e.innerText=this.options.text:e.innerHTML=this.options.text,""!==this.options.avatar){let t=document.createElement("img");t.src=this.options.avatar,t.className="toastify-avatar","left"==this.options.position?e.appendChild(t):e.insertAdjacentElement("afterbegin",t)}if(!0===this.options.close){let t=document.createElement("span");t.innerHTML="&#10006;",t.className="toast-close",t.addEventListener("click",e=>{e.stopPropagation(),this._removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)});const n=window.innerWidth>0?window.innerWidth:screen.width;"left"==this.options.position&&n>360?e.insertAdjacentElement("afterbegin",t):e.appendChild(t)}if(this.options.stopOnFocus&&this.options.duration>0&&(e.addEventListener("mouseover",t=>{window.clearTimeout(e.timeOutValue)}),e.addEventListener("mouseleave",()=>{e.timeOutValue=window.setTimeout(()=>{this._removeElement(e)},this.options.duration)})),void 0!==this.options.destination&&e.addEventListener("click",e=>{e.stopPropagation(),!0===this.options.newWindow?window.open(this.options.destination,"_blank"):window.location=this.options.destination}),"function"==typeof this.options.onClick&&void 0===this.options.destination&&e.addEventListener("click",e=>{e.stopPropagation(),this.options.onClick()}),"object"==typeof this.options.offset){const t=this._getAxisOffsetAValue("x",this.options),n=this._getAxisOffsetAValue("y",this.options),r="left"==this.options.position?t:"-"+t,a="toastify-top"==this.options.gravity?n:"-"+n;e.style.transform=`translate(${r},${a})`}return e}_removeElement(e){e.className=e.className.replace(" on",""),window.setTimeout(()=>{this.options.node&&this.options.node.parentNode&&this.options.node.parentNode.removeChild(this.options.node),e.parentNode&&e.parentNode.removeChild(e),this.options.callback.call(e),this._reposition()},400)}_reposition(){let e,t={top:15,bottom:15},n={top:15,bottom:15},r={top:15,bottom:15},a=this._rootElement.querySelectorAll(".toastify");for(let i=0;i<a.length;i++){e=!0===a[i].classList.contains("toastify-top")?"toastify-top":"toastify-bottom";let o=a[i].offsetHeight;e=e.substr(9,e.length-1);let s=15;(window.innerWidth>0?window.innerWidth:screen.width)<=360?(a[i].style[e]=r[e]+"px",r[e]+=o+s):!0===a[i].classList.contains("toastify-left")?(a[i].style[e]=t[e]+"px",t[e]+=o+s):(a[i].style[e]=n[e]+"px",n[e]+=o+s)}}_getAxisOffsetAValue(e,t){return t.offset[e]?isNaN(t.offset[e])?t.offset[e]:t.offset[e]+"px":"0px"}}function pt(e){return new ht(e)}class ft extends HTMLElement{static get properties(){return{avatar:{type:String},backgroundColor:{type:String},callback:{type:String},classProp:{type:String},close:{type:Boolean},destination:{type:String},duration:{type:Number},escapeMarkup:{type:Boolean},gravity:{type:String},newWindow:{type:Boolean},oldestFirst:{type:Boolean},position:{type:String},selector:{type:String},stopOnFocus:{type:Boolean},text:{type:String}}}constructor(){super(),this.attachShadow({mode:"open"})}_initVar(e,t){return this.hasAttribute(e)?this.getAttribute(e):t}connectedCallback(){this.avatar=this._initVar("avatar",""),this.backgroundColor=this._initVar("backgroundColor",""),this.callback=this._initVar("callback",{}),this.classProp=this._initVar("data-class",""),this.close="true"===this._initVar("close",!1),this.destination=this._initVar("destination",""),this.duration=Number(this._initVar("duration",3e3)),this.escapeMarkup="true"===this._initVar("escapeMarkup",!0),this.gravity=this._initVar("gravity","top"),this.newWindow="true"===this._initVar("newWindow",!1),this.oldestFirst="true"===this._initVar("oldestFirst",!0),this.position=this._initVar("position","right"),this.stopOnFocus=this._initVar("stopOnFocus",!0),this.text=this._initVar("text","");this.shadowRoot.innerHTML=`\n <style>\n \n :host{\n display:none;\n }\n \n </style>\n ${this.renderHTML}\n `,this.addEventListener("jinn-toast",e=>{this.showToast(e.detail.text)})}showToast(e){new pt({avatar:this.avatar,className:this.classProp,close:this.close,destination:this.destination,duration:this.duration,escapeMarkup:this.escapeMarkup,gravity:this.gravity,newWindow:this.newWindow,oldestFirst:this.oldestFirst,position:this.position,node:this.shadowRoot,stopOnFocus:this.stopOnFocus,text:e}).showToast()}renderHTML(){return"\n <slot></slot>\n "}}window.customElements.define("jinn-toast",ft);class dt extends HTMLElement{static get properties(){return{lazyRefresh:{type:Boolean},model:{type:Object},ready:{type:Boolean}}}constructor(){super(),this.model={},this.addEventListener("model-construct-done",this._handleModelConstructDone),this.addEventListener("message",this._displayMessage),this.addEventListener("error",this._displayError),window.addEventListener("compute-exception",e=>{}),this.ready=!1,this.storedTemplateExpressionByNode=new Map;this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML='\n <style>\n \n :host {\n // display: none;\n height:auto;\n padding:var(--model-element-padding);\n font-family:Roboto, sans-serif;\n color:var(--paper-grey-900);\n }\n :host ::slotted(fx-model){\n display:none;\n }\n :host(.fx-ready){\n animation: fadein .4s forwards;\n display:block;\n }\n\n #modalMessage .dialogActions{\n text-align:center;\n }\n .overlay {\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n background: rgba(0, 0, 0, 0.7);\n transition: all 500ms;\n visibility: hidden;\n opacity: 0;\n z-index:10;\n }\n .overlay.show {\n visibility: visible;\n opacity: 1;\n }\n\n .popup {\n margin: 70px auto;\n background: #fff;\n border-radius: 5px;\n width: 30%;\n position: relative;\n transition: all 5s ease-in-out;\n padding: 20px;\n\n }\n .popup h2 {\n margin-top: 0;\n width:100%;\n background:#eee;\n position:absolute;\n top:0;\n right:0;\n left:0;\n height:40px;\n border-radius: 5px;\n\n }\n .popup .close {\n position: absolute;\n top: 3px;\n right: 10px;\n transition: all 200ms;\n font-size: 30px;\n font-weight: bold;\n text-decoration: none;\n color: #333;\n }\n .popup .close:focus{\n outline:none;\n }\n\n .popup .close:hover {\n color: #06D85F;\n }\n #messageContent{\n margin-top:40px;\n }\n @keyframes fadein {\n 0% {\n opacity:0;\n }\n 100% {\n opacity:1;\n }\n }\n \n </style>\n \n <jinn-toast id="message" gravity="bottom" position="left"></jinn-toast>\n <jinn-toast id="error" text="error" duration="-1" data-class="error" close="true" position="left" gravity="bottom"></jinn-toast>\n <slot></slot>\n <div id="modalMessage" class="overlay">\n <div class="popup">\n <h2></h2>\n <a class="close" href="#" onclick="event.target.parentNode.parentNode.classList.remove(\'show\')" autofocus>&times;</a>\n <div id="messageContent"></div>\n </div>\n </div>\n \n ',this.toRefresh=[],this.initialRun=!0,this.someInstanceDataStructureChanged=!1}connectedCallback(){if(this.lazyRefresh=this.hasAttribute("refresh-on-view"),this.lazyRefresh){const e={root:null,rootMargin:"0px",threshold:.3};this.intersectionObserver=new IntersectionObserver(this.handleIntersect,e)}if(this.src=this.hasAttribute("src")?this.getAttribute("src"):null,this.src)return void this._loadFromSrc();this.shadowRoot.querySelector("slot").addEventListener("slotchange",e=>{let t=e.target.assignedElements().find(e=>"FX-MODEL"===e.nodeName.toUpperCase());if(!t){const e=document.createElement("FX-model");this.appendChild(e),t=e}t.inited||(this.src,t.modelConstruct()),this.model=t}),this.addEventListener("path-mutated",e=>{this.someInstanceDataStructureChanged=!0})}addToRefresh(e){this.toRefresh.find(t=>t.path===e.path)||this.toRefresh.push(e)}_loadFromSrc(){fetch(this.src,{method:"GET",mode:"cors",credentials:"include",headers:{"Content-Type":"text/html"}}).then(e=>e.headers.get("content-type").toLowerCase().startsWith("text/html")?e.text().then(e=>(new DOMParser).parseFromString(e,"text/html")):"done").then(e=>{const t=e.querySelector("fx-fore");t||this.dispatchEvent(new CustomEvent("error",{detail:{message:`Fore element not found in '${this.src}'. Maybe wrapped within 'template' element?`}})),t.setAttribute("from-src",this.src),this.replaceWith(t)}).catch(e=>{this.dispatchEvent(new CustomEvent("error",{detail:{message:`'${this.src}' not found or does not contain Fore element.`}}))})}handleIntersect(e,t){e.forEach(e=>{const{target:t}=e;e.isIntersecting&&(t.classList.add("loaded"),"function"==typeof t.refresh?t.refresh(t,!0):je.refreshChildren(t,!0))}),e[0].target.getOwnerForm().dispatchEvent(new CustomEvent("refresh-done"))}evaluateToNodes(e,t){return ze(e,t,this)}disconnectedCallback(){}async refresh(e){this.initialRun||0===this.toRefresh.length?je.refreshChildren(this,!0):(this.toRefresh.forEach(e=>{const t=e.boundControls;t&&t.forEach(e=>{e.refresh()});const n=this.getModel().mainGraph;if(n&&n.hasNode(e.path)){const t=this.getModel().mainGraph.dependentsOf(e.path,!1);0!==t.length&&t.forEach(e=>{const t=Fe.getBasePath(e);this.getModel().modelItems.find(e=>e.path===t).boundControls.forEach(e=>{e.refresh()})})}}),this.toRefresh=[]),(this.initialRun||this.someInstanceDataStructureChanged)&&(this._updateTemplateExpressions(),this.someInstanceDataStructureChanged=!1),this._processTemplateExpressions(),this.dispatchEvent(new CustomEvent("refresh-done"))}_updateTemplateExpressions(){const e=ze("(descendant-or-self::*/(text(), @*))[matches(.,'\\{.*\\}')] except descendant-or-self::fx-model/descendant-or-self::node()/(., @*)",this,this);this.storedTemplateExpressions||(this.storedTemplateExpressions=[]),Array.from(e).forEach(e=>{if(this.storedTemplateExpressionByNode.has(e))return;const t=this._getTemplateExpression(e);this.storedTemplateExpressionByNode.set(e,t)}),this._processTemplateExpressions()}_processTemplateExpressions(){for(const e of this.storedTemplateExpressionByNode.keys())this._processTemplateExpression({node:e,expr:this.storedTemplateExpressionByNode.get(e)})}_processTemplateExpression(e){const{expr:t}=e,{node:n}=e;this.evaluateTemplateExpression(t,n,this)}evaluateTemplateExpression(e,t){if("{}"===e)return;const n=e.match(/{[^}]*}/g);t.nodeType===t.TEXT_NODE?t.parentNode:t.ownerElement;n&&n.forEach(n=>{let r=n.substring(1,n.length-1);const a=ut(t,r);if(!a){(t.nodeType===Node.TEXT_NODE||t.nodeType===Node.ATTRIBUTE_NODE)&&t.parentNode;return}const i=Fe.getInstanceId(r),o=this.getModel().getInstance(i);try{const i=Ze(r,a,t,null,o),s=e.replaceAll(n,i);if(t.nodeType===Node.ATTRIBUTE_NODE){t.ownerElement.setAttribute(t.nodeName,s)}else t.nodeType===Node.TEXT_NODE&&(t.textContent=s);s.includes("{")&&(r=s.substring(1,s.length),this.evaluateTemplateExpression(s,t))}catch(e){this.dispatchEvent(new CustomEvent("error",{detail:e}))}})}_getTemplateExpression(e){return e.nodeType===Node.ATTRIBUTE_NODE?e.value:e.nodeType===Node.TEXT_NODE?e.textContent.trim():null}_handleModelConstructDone(){this._initUI()}async _lazyCreateInstance(){const e=this.querySelector("fx-model");if(0===e.instances.length){const t=document.createElement("fx-instance");e.appendChild(t);const n=document.implementation.createDocument(null,"data",null);this._generateInstance(this,n.firstElementChild),t.instanceData=n,e.instances.push(t)}}_generateInstance(e,t){if(e.hasAttribute("ref")&&!je.isActionElement(e.nodeName)){const n=e.getAttribute("ref");if(n.includes("/")){n.split("/").forEach(n=>{t=this._generateNode(t,n,e)})}else t=this._generateNode(t,n,e)}if(e.hasChildNodes()){const n=e.children;for(let e=0;e<n.length;e+=1)this._generateInstance(n[e],t)}return t}_generateNode(e,t,n){const r=e.ownerDocument.createElement(t);return 0===n.children.length&&(r.textContent=n.textContent),e.appendChild(r),e=r}async _initUI(){await this._lazyCreateInstance();const e=new Map;!function t(n){for(const r of n.children)"setInScopeVariables"in r&&r.setInScopeVariables(e),t(r)}(this),await this.refresh(),this.classList.add("fx-ready"),this.ready=!0,this.initialRun=!1,this.dispatchEvent(new CustomEvent("ready",{}))}registerLazyElement(e){this.intersectionObserver&&this.intersectionObserver.observe(e)}unRegisterLazyElement(e){this.intersectionObserver&&this.intersectionObserver.unobserve(e)}getModel(){return this.querySelector("fx-model")}_displayMessage(e){const{level:t}=e.detail,n=e.detail.message;this._showMessage(t,n)}_displayError(e){const t=e.detail.message;this.shadowRoot.querySelector("#error").showToast(t)}_showMessage(e,t){if("modal"===e)this.shadowRoot.getElementById("messageContent").innerText=t,this.shadowRoot.getElementById("modalMessage").classList.add("show");else if("modeless"===e)this.shadowRoot.querySelector("#message").showToast(t);else{this.shadowRoot.querySelector("#message").showToast(t)}}}customElements.define("fx-fore",dt);class mt extends(lt(HTMLElement)){constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.methods=["get","put","post","delete","head","urlencoded-post"],this.model=this.parentNode,this.hasAttribute("id"),this.id=this.getAttribute("id"),this.instance=this.hasAttribute("instance")?this.getAttribute("instance"):null,this.into=this.hasAttribute("into")?this.getAttribute("into"):null,this.method=this.hasAttribute("method")?this.getAttribute("method"):"get",this.nonrelevant=this.hasAttribute("nonrelevant")?this.getAttribute("nonrelevant"):"remove",this.replace=this.hasAttribute("replace")?this.getAttribute("replace"):"all",this.serialization=this.hasAttribute("serialization")?this.getAttribute("serialization"):"xml",this.hasAttribute("url"),this.url=this.getAttribute("url"),this.targetref=this.hasAttribute("targetref")?this.getAttribute("targetref"):null,this.mediatype=this.hasAttribute("mediatype")?this.getAttribute("mediatype"):"application/xml",this.validate=this.getAttribute("validate")?this.getAttribute("validate"):"true",this.shadowRoot.innerHTML=this.renderHTML()}renderHTML(){return"\n <slot></slot>\n "}async submit(){await this.dispatch("submit",{submission:this}),this._submit()}async _submit(){this.evalInContext();const e=this.getModel();if(e.recalculate(),this.validate){if(!e.revalidate())return this.dispatch("submit-error",{}),void this.getModel().parentNode.refresh()}await this._serializeAndSend()}_evaluateAttributeTemplateExpression(e,t){const n=e.match(/{[^}]*}/g);return n&&n.forEach(n=>{const r=n.substring(1,n.length-1),a=Ze(r,ut(t,r),this.getOwnerForm()),i=e.replaceAll(n,a);e=i}),e}async _serializeAndSend(){const e=this._evaluateAttributeTemplateExpression(this.url,this),t=this.getInstance();if("xml"!==t.type)return;let n;if("none"===this.serialization)n=void 0;else{const e=this.selectRelevant();n=this._serialize(t.type,e)}if("get"===this.method.toLowerCase()&&(n=void 0),"#echo"===e){let e;return e=n?(new DOMParser).parseFromString(n,"application/xml"):void 0,this._handleResponse(e),void this.dispatch("submit-done",{})}const r=this._getHeaders();if("urlencoded-post"===this.method&&(this.method="post"),!this.methods.includes(this.method.toLowerCase()))return void this.dispatch("error",{message:"Unknown method "+this.method});const a=await fetch(e,{method:this.method,mode:"cors",credentials:"include",headers:r,body:n});if(!a.ok||a.status>400)return void this.dispatch("submit-error",{message:"Error while submitting "+this.id});const i=a.headers.get("content-type").toLowerCase();if(i.startsWith("text/plain")||i.startsWith("text/html")||i.startsWith("text/markdown")){const e=await a.text();this._handleResponse(e)}else if(i.startsWith("application/json")){const e=await a.json();this._handleResponse(e)}else if(i.startsWith("application/xml")){const e=await a.text(),t=(new DOMParser).parseFromString(e,"application/xml");this._handleResponse(t)}else{const e=await a.blob();this._handleResponse(e)}this.dispatch("submit-done",{})}_serialize(e,t){if("urlencoded-post"===this.method){const e=new URLSearchParams;return Array.from(t.children).forEach(t=>{e.append(t.nodeName,t.textContent)}),e}if("xml"===e){return(new XMLSerializer).serializeToString(t)}throw new Error("unknown instance type ",e)}_getHeaders(){const e=new Headers,t=this.getInstance(),n=je.getContentType(t,this.method);e.append("Content-Type",n),e.has("Accept")&&e.delete("Accept");const r=this.querySelectorAll("fx-header");return Array.from(r).forEach(t=>{const{name:n}=t,r=t.getValue();e.append(n,r)}),e}_getUrlExpr(){return this.storedTemplateExpressions.find(e=>"url"===e.node.nodeName)}_getTargetInstance(){let e;if(e=this.instance?this.model.getInstance(this.instance):this.model.getInstance("default"),!e)throw new Error("target instance not found: "+e);return e}_handleResponse(e){if("instance"===this.replace){const t=this._getTargetInstance();if(!t)throw new Error("target instance not found: "+t);if(this.targetref){const n=Je(this.targetref,t.instanceData.firstElementChild,this),r=e.firstElementChild;n.parentNode.replaceChild(r,n)}else if(this.into){Je(this.into,t.instanceData.firstElementChild,this).innerHTML=e}else{const n=e;t.instanceData=n}this.model.updateModel(),this.getOwnerForm().refresh()}if("all"===this.replace&&(document.getElementsByTagName("html")[0].innerHTML=e),"target"===this.replace){const t=this.getAttribute("target");document.querySelector(t).innerHTML=e}"redirect"===this.replace&&(window.location.href=e)}selectRelevant(){if("keep"===this.nonrelevant)return this.nodeset;const e=this.getModel().getModelItem(this.nodeset);if(e&&!e.relevant)return null;const t=(new DOMParser).parseFromString("<data></data>","application/xml").firstElementChild;if(0===this.nodeset.children.length&&this._isRelevant(this.nodeset))return this.nodeset;return this._filterRelevant(this.nodeset,t)}_filterRelevant(e,t){const{childNodes:n}=e;return Array.from(n).forEach(e=>{if(this._isRelevant(e)){const n=e.cloneNode(!1);t.appendChild(n);const{attributes:r}=e;return r&&Array.from(r).forEach(e=>{this._isRelevant(e)?n.setAttribute(e.nodeName,e.value):"empty"===this.nonrelevant?n.setAttribute(e.nodeName,""):n.removeAttribute(e.nodeName)}),this._filterRelevant(e,n)}return null}),t}_isRelevant(e){const t=this.getModel().getModelItem(e);return!(t&&!t.relevant)}_handleError(){this.dispatch("submit-error",{})}}customElements.define("fx-submission",mt);class vt extends(lt(HTMLElement)){constructor(){if(super(),this.style.display="none",this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML="",!this.hasAttribute("name"))throw new Error('required attribute "name" missing');this.name=this.getAttribute("name")}connectedCallback(){this.shadowRoot.innerHTML=""}}customElements.define("fx-header",vt);class gt extends(lt(HTMLElement)){constructor(){super(),this.attachShadow({mode:"open"}),this.name="",this.valueQuery="",this.value=null}connectedCallback(){this.name=this.getAttribute("name"),this.valueQuery=this.getAttribute("value")}refresh(){const e=ut(this,this.valueQuery);this.value=Je(this.valueQuery,e,this,this.precedingVariables)}setInScopeVariables(e){e.has(this.name)?this.dispatch("xforms-binding-error"):(e.set(this.name,this),this.inScopeVariables=new Map(e))}}customElements.define("fx-var",gt);class yt extends(lt(HTMLElement)){constructor(){super(),this.value="",this.display=this.style.display,this.required=!1,this.readonly=!1,this.widget=null}getWidget(){throw new Error("You have to implement the method getWidget!")}async refresh(e){const t=this.value;if(!this.isNotBound()&&(this.evalInContext(),this.isBound())){if(null===this.nodeset)return void(this.style.display="none");if(this.modelItem=this.getModelItem(),this.modelItem instanceof at){if(this.value=this.modelItem.value,this.modelItem.boundControls.includes(this)||this.modelItem.boundControls.push(this),await this.updateWidgetValue(),this.handleModelItemProperties(),!this.getOwnerForm().ready)return;t!==this.value&&this.dispatch("value-changed",{path:this.modelItem.path})}}}async updateWidgetValue(){throw new Error("You have to implement the method updateWidgetValue!")}handleModelItemProperties(){this.handleRequired(),this.handleReadonly(),this.getOwnerForm().ready&&this.handleValid(),this.handleRelevant()}_getForm(){return this.getModel().parentNode}_dispatchEvent(e){this.getOwnerForm().ready&&this.dispatch(e,{})}handleRequired(){this.widget=this.getWidget(),this.isRequired()!==this.modelItem.required&&(this.modelItem.required?(this.widget.setAttribute("required","required"),this.classList.add("required"),this._dispatchEvent("required")):(this.widget.removeAttribute("required"),this.required=!1,this.classList.toggle("required"),this._dispatchEvent("optional")))}handleReadonly(){this.isReadonly()!==this.modelItem.readonly&&(this.modelItem.readonly&&(this.widget.setAttribute("readonly","readonly"),this.classList.toggle("readonly"),this._dispatchEvent("readonly")),this.modelItem.readonly||(this.widget.removeAttribute("readonly"),this.classList.toggle("readonly"),this._dispatchEvent("readwrite")))}handleValid(){const e=this.querySelector("fx-alert");if(this.isValid()!==this.modelItem.constraint)if(this.modelItem.constraint)this.classList.remove("invalid"),e&&(e.style.display="none"),this._dispatchEvent("valid");else{if(this.classList.add("invalid"),e&&(e.style.display="block"),0!==this.modelItem.alerts.length){const{alerts:e}=this.modelItem;this.querySelector("fx-alert")||e.forEach(e=>{const t=document.createElement("fx-alert");t.innerHTML=e,this.appendChild(t),t.style.display="block"})}this._dispatchEvent("invalid")}}handleRelevant(){this.isEnabled()!==this.modelItem.relevant&&(this.modelItem.relevant?(this._dispatchEvent("relevant"),this.style.display=this.display):(this._dispatchEvent("nonrelevant"),this.style.display="none"))}isRequired(){return!!this.widget.hasAttribute("required")}isValid(){return!this.classList.contains("invalid")}isReadonly(){return!!this.widget.hasAttribute("readonly")}isEnabled(){return"none"!==this.style.display}_fadeOut(e){e.style.opacity=1,function t(){(e.style.opacity-=.1)<0?e.style.display="none":requestAnimationFrame(t)}()}_fadeIn(e,t){e.style.opacity=0,e.style.display=t||"block",function t(){let n=parseFloat(e.style.opacity);(n+=.1)>1||(e.style.opacity=n,requestAnimationFrame(t))}()}}window.customElements.define("fx-abstract-control",yt);customElements.define("fx-alert",class extends yt{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.shadowRoot.innerHTML="\n <style>\n \n :host {\n height: auto;\n font-size: 0.8em;\n font-weight: 400;\n color: red;\n display: none;\n }\n \n </style>\n \n <slot></slot>\n \n "}async updateWidgetValue(){this.innerHTML=this.value}});class wt extends yt{constructor(){super(),this.inited=!1,this.attachShadow({mode:"open"})}connectedCallback(){this.updateEvent=this.hasAttribute("update-event")?this.getAttribute("update-event"):"blur",this.valueProp=this.hasAttribute("value-prop")?this.getAttribute("value-prop"):"value",this.label=this.hasAttribute("label")?this.getAttribute("label"):null;this.shadowRoot.innerHTML=`\n <style>\n \n :host{\n display:inline-block;\n }\n \n </style>\n ${this.renderHTML(this.ref)}\n `,this.widget=this.getWidget(),"enter"===this.updateEvent&&(this.widget.addEventListener("keyup",e=>{13===e.keyCode&&(e.preventDefault(),this.setValue(this.widget[this.valueProp]))}),this.updateEvent="blur"),this.widget.addEventListener(this.updateEvent,()=>{this.setValue(this.widget[this.valueProp])});this.shadowRoot.querySelector("slot");this.template=this.querySelector("template")}setValue(e){const t=this.getModelItem(),n=this.shadowRoot.getElementById("setvalue");n.setValue(t,e),n.actionPerformed()}renderHTML(e){return`\n ${this.label?""+this.label:""}\n <slot></slot>\n <fx-setvalue id="setvalue" ref="${e}"></fx-setvalue>\n `}getWidget(){if(this.widget)return this.widget;let e=this.querySelector(".widget");if(e||(e=this.querySelector("input")),!e){const e=document.createElement("input");return e.classList.add("widget"),e.setAttribute("type","text"),this.appendChild(e),e}return e}async updateWidgetValue(){if("checked"===this.valueProp)"true"===this.value?this.widget.checked=!0:this.widget.checked=!1;else{let{widget:e}=this;e||(e=this),e.value=this.value}}getTemplate(){return this.querySelector("template")}async refresh(e){super.refresh();const t=this.getWidget();if(t.hasAttribute("ref")){const e=t.getAttribute("ref"),n=Je(e,ut(this,e),this),{children:r}=t;if(Array.from(r).forEach(e=>{"template"!==e.nodeName.toLowerCase()&&e.parentNode.removeChild(e)}),this.template)if(n.length)Array.from(n).forEach(e=>{const t=this.createEntry();this.updateEntry(t,e)});else{const e=this.createEntry();this.updateEntry(e,n)}}je.refreshChildren(this,e)}updateEntry(e,t){if("SELECT"!==this.widget.nodeName)return;const n=this._getValueAttribute(e),r=n.value,a=Je(r.substring(1,r.length-1),t,e);n.value=a,this.value===a&&e.setAttribute("selected","selected");const i=e.textContent,o=Ze(i.substring(1,i.length-1),t,e);e.textContent=o}createEntry(){const e=this.template.content.firstElementChild.cloneNode(!0),t=document.importNode(e,!0);return this.template.parentNode.appendChild(t),t}_getValueAttribute(e){let t;return Array.from(e.attributes).forEach(e=>{-1!==e.value.indexOf("{")&&(t=e)}),t}}window.customElements.define("fx-control",wt);class At extends(lt(HTMLElement)){constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.shadowRoot.innerHTML="\n <style>\n \n :host {\n display: block;\n }\n \n </style>\n \n <slot></slot>\n \n ",this.getOwnerForm().registerLazyElement(this)}refresh(e){!e&&this.hasAttribute("refresh-on-view")||(this.isBound()&&(this.evalInContext(),this.modelItem=this.getModelItem()),this._getForm().ready&&this.handleModelItemProperties(),je.refreshChildren(this,e))}handleModelItemProperties(){this.handleReadonly(),this.handleRelevant()}_getForm(){return this.getModel().parentNode}handleReadonly(){this.isReadonly()!==this.modelItem.readonly&&(this.modelItem.readonly&&(this.setAttribute("readonly","readonly"),this.dispatchEvent(new CustomEvent("readonly",{}))),this.modelItem.readonly||(this.removeAttribute("readonly"),this.dispatchEvent(new CustomEvent("readwrite",{}))))}handleRelevant(){this.modelItem&&this.isEnabled()!==this.modelItem.enabled&&(this.modelItem.enabled?this.dispatchEvent(new CustomEvent("enabled",{})):this.dispatchEvent(new CustomEvent("disabled",{})))}isReadonly(){return!!this.hasAttribute("readonly")}isEnabled(){return"none"!==this.style.display}}window.customElements.define("fx-container",At);
10
10
  /**
11
11
  * @license
12
12
  * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -20,7 +20,7 @@ class ct{constructor(e){this.defaults={oldestFirst:!0,text:"Toastify is awesome!
20
20
  * subject to an additional IP rights grant found at
21
21
  * http://polymer.github.io/PATENTS.txt
22
22
  */
23
- const wt="undefined"!=typeof window&&null!=window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,At=`{{lit-${String(Math.random()).slice(2)}}}`,xt=`\x3c!--${At}--\x3e`,bt=e=>-1!==e.index,Et=()=>document.createComment(""),Bt=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/,Nt=new WeakMap,Ct=e=>"function"==typeof e&&Nt.has(e),Tt={},It={};
23
+ const xt="undefined"!=typeof window&&null!=window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,bt=`{{lit-${String(Math.random()).slice(2)}}}`,Et=`\x3c!--${bt}--\x3e`,Bt=e=>-1!==e.index,Nt=()=>document.createComment(""),Ct=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/,Tt=new WeakMap,It=e=>"function"==typeof e&&Tt.has(e),Ot={},St={};
24
24
  /**
25
25
  * @license
26
26
  * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -34,7 +34,7 @@ const wt="undefined"!=typeof window&&null!=window.customElements&&void 0!==windo
34
34
  * subject to an additional IP rights grant found at
35
35
  * http://polymer.github.io/PATENTS.txt
36
36
  */
37
- class Ot{constructor(e,t,n){this.__parts=[],this.template=e,this.processor=t,this.options=n}update(e){let t=0;for(const n of this.__parts)void 0!==n&&n.setValue(e[t]),t++;for(const e of this.__parts)void 0!==e&&e.commit()}_clone(){const e=wt?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),t=[],n=this.template.parts,r=document.createTreeWalker(e,133,null,!1);let a,i=0,o=0,s=r.nextNode();for(;i<n.length;)if(a=n[i],bt(a)){for(;o<a.index;)o++,"TEMPLATE"===s.nodeName&&(t.push(s),r.currentNode=s.content),null===(s=r.nextNode())&&(r.currentNode=t.pop(),s=r.nextNode());if("node"===a.type){const e=this.processor.handleTextExpression(this.options);e.insertAfterNode(s.previousSibling),this.__parts.push(e)}else this.__parts.push(...this.processor.handleAttributeExpressions(s,a.name,a.strings,this.options));i++}else this.__parts.push(void 0),i++;return wt&&(document.adoptNode(e),customElements.upgrade(e)),e}}
37
+ class Rt{constructor(e,t,n){this.__parts=[],this.template=e,this.processor=t,this.options=n}update(e){let t=0;for(const n of this.__parts)void 0!==n&&n.setValue(e[t]),t++;for(const e of this.__parts)void 0!==e&&e.commit()}_clone(){const e=xt?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),t=[],n=this.template.parts,r=document.createTreeWalker(e,133,null,!1);let a,i=0,o=0,s=r.nextNode();for(;i<n.length;)if(a=n[i],Bt(a)){for(;o<a.index;)o++,"TEMPLATE"===s.nodeName&&(t.push(s),r.currentNode=s.content),null===(s=r.nextNode())&&(r.currentNode=t.pop(),s=r.nextNode());if("node"===a.type){const e=this.processor.handleTextExpression(this.options);e.insertAfterNode(s.previousSibling),this.__parts.push(e)}else this.__parts.push(...this.processor.handleAttributeExpressions(s,a.name,a.strings,this.options));i++}else this.__parts.push(void 0),i++;return xt&&(document.adoptNode(e),customElements.upgrade(e)),e}}
38
38
  /**
39
39
  * @license
40
40
  * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -47,7 +47,7 @@ class Ot{constructor(e,t,n){this.__parts=[],this.template=e,this.processor=t,thi
47
47
  * Code distributed by Google as part of the polymer project is also
48
48
  * subject to an additional IP rights grant found at
49
49
  * http://polymer.github.io/PATENTS.txt
50
- */const St=window.trustedTypes&&trustedTypes.createPolicy("lit-html",{createHTML:e=>e}),Rt=` ${At} `;class Dt{constructor(e,t,n,r){this.strings=e,this.values=t,this.type=n,this.processor=r}getHTML(){const e=this.strings.length-1;let t="",n=!1;for(let r=0;r<e;r++){const e=this.strings[r],a=e.lastIndexOf("\x3c!--");n=(a>-1||n)&&-1===e.indexOf("--\x3e",a+1);const i=Bt.exec(e);t+=null===i?e+(n?Rt:xt):e.substr(0,i.index)+i[1]+i[2]+"$lit$"+i[3]+At}return t+=this.strings[e],t}getTemplateElement(){const e=document.createElement("template");let t=this.getHTML();return void 0!==St&&(t=St.createHTML(t)),e.innerHTML=t,e}}
50
+ */const Dt=window.trustedTypes&&trustedTypes.createPolicy("lit-html",{createHTML:e=>e}),Mt=` ${bt} `;class Gt{constructor(e,t,n,r){this.strings=e,this.values=t,this.type=n,this.processor=r}getHTML(){const e=this.strings.length-1;let t="",n=!1;for(let r=0;r<e;r++){const e=this.strings[r],a=e.lastIndexOf("\x3c!--");n=(a>-1||n)&&-1===e.indexOf("--\x3e",a+1);const i=Ct.exec(e);t+=null===i?e+(n?Mt:Et):e.substr(0,i.index)+i[1]+i[2]+"$lit$"+i[3]+bt}return t+=this.strings[e],t}getTemplateElement(){const e=document.createElement("template");let t=this.getHTML();return void 0!==Dt&&(t=Dt.createHTML(t)),e.innerHTML=t,e}}
51
51
  /**
52
52
  * @license
53
53
  * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -60,7 +60,7 @@ class Ot{constructor(e,t,n){this.__parts=[],this.template=e,this.processor=t,thi
60
60
  * Code distributed by Google as part of the polymer project is also
61
61
  * subject to an additional IP rights grant found at
62
62
  * http://polymer.github.io/PATENTS.txt
63
- */const Mt=e=>null===e||!("object"==typeof e||"function"==typeof e),Gt=e=>Array.isArray(e)||!(!e||!e[Symbol.iterator]);class Ut{constructor(e,t,n){this.dirty=!0,this.element=e,this.name=t,this.strings=n,this.parts=[];for(let e=0;e<n.length-1;e++)this.parts[e]=this._createPart()}_createPart(){return new Ft(this)}_getValue(){const e=this.strings,t=e.length-1,n=this.parts;if(1===t&&""===e[0]&&""===e[1]){const e=n[0].value;if("symbol"==typeof e)return String(e);if("string"==typeof e||!Gt(e))return e}let r="";for(let a=0;a<t;a++){r+=e[a];const t=n[a];if(void 0!==t){const e=t.value;if(Mt(e)||!Gt(e))r+="string"==typeof e?e:String(e);else for(const t of e)r+="string"==typeof t?t:String(t)}}return r+=e[t],r}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}class Ft{constructor(e){this.value=void 0,this.committer=e}setValue(e){e===Tt||Mt(e)&&e===this.value||(this.value=e,Ct(e)||(this.committer.dirty=!0))}commit(){for(;Ct(this.value);){const e=this.value;this.value=Tt,e(this)}this.value!==Tt&&this.committer.commit()}}class Pt{constructor(e){this.value=void 0,this.__pendingValue=void 0,this.options=e}appendInto(e){this.startNode=e.appendChild(Et()),this.endNode=e.appendChild(Et())}insertAfterNode(e){this.startNode=e,this.endNode=e.nextSibling}appendIntoPart(e){e.__insert(this.startNode=Et()),e.__insert(this.endNode=Et())}insertAfterPart(e){e.__insert(this.startNode=Et()),this.endNode=e.endNode,e.endNode=this.startNode}setValue(e){this.__pendingValue=e}commit(){if(null===this.startNode.parentNode)return;for(;Ct(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=Tt,e(this)}const e=this.__pendingValue;e!==Tt&&(Mt(e)?e!==this.value&&this.__commitText(e):e instanceof Dt?this.__commitTemplateResult(e):e instanceof Node?this.__commitNode(e):Gt(e)?this.__commitIterable(e):e===It?(this.value=It,this.clear()):this.__commitText(e))}__insert(e){this.endNode.parentNode.insertBefore(e,this.endNode)}__commitNode(e){this.value!==e&&(this.clear(),this.__insert(e),this.value=e)}__commitText(e){const t=this.startNode.nextSibling,n="string"==typeof(e=null==e?"":e)?e:String(e);t===this.endNode.previousSibling&&3===t.nodeType?t.data=n:this.__commitNode(document.createTextNode(n)),this.value=e}__commitTemplateResult(e){const t=this.options.templateFactory(e);if(this.value instanceof Ot&&this.value.template===t)this.value.update(e.values);else{const n=new Ot(t,e.processor,this.options),r=n._clone();n.update(e.values),this.__commitNode(r),this.value=n}}__commitIterable(e){Array.isArray(this.value)||(this.value=[],this.clear());const t=this.value;let n,r=0;for(const a of e)n=t[r],void 0===n&&(n=new Pt(this.options),t.push(n),0===r?n.appendIntoPart(this):n.insertAfterPart(t[r-1])),n.setValue(a),n.commit(),r++;r<t.length&&(t.length=r,this.clear(n&&n.endNode))}clear(e=this.startNode){((e,t,n=null)=>{for(;t!==n;){const n=t.nextSibling;e.removeChild(t),t=n}})(this.startNode.parentNode,e.nextSibling,this.endNode)}}class Ht{constructor(e,t,n){if(this.value=void 0,this.__pendingValue=void 0,2!==n.length||""!==n[0]||""!==n[1])throw new Error("Boolean attributes can only contain a single expression");this.element=e,this.name=t,this.strings=n}setValue(e){this.__pendingValue=e}commit(){for(;Ct(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=Tt,e(this)}if(this.__pendingValue===Tt)return;const e=!!this.__pendingValue;this.value!==e&&(e?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=e),this.__pendingValue=Tt}}class jt extends Ut{constructor(e,t,n){super(e,t,n),this.single=2===n.length&&""===n[0]&&""===n[1]}_createPart(){return new Xt(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class Xt extends Ft{}let _t=!1;(()=>{try{const e={get capture(){return _t=!0,!1}};window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){}})();class Lt{constructor(e,t,n){this.value=void 0,this.__pendingValue=void 0,this.element=e,this.eventName=t,this.eventContext=n,this.__boundHandleEvent=e=>this.handleEvent(e)}setValue(e){this.__pendingValue=e}commit(){for(;Ct(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=Tt,e(this)}if(this.__pendingValue===Tt)return;const e=this.__pendingValue,t=this.value,n=null==e||null!=t&&(e.capture!==t.capture||e.once!==t.once||e.passive!==t.passive),r=null!=e&&(null==t||n);n&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),r&&(this.__options=kt(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=Tt}handleEvent(e){"function"==typeof this.value?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}}const kt=e=>e&&(_t?{capture:e.capture,passive:e.passive,once:e.once}:e.capture)
63
+ */const Ut=e=>null===e||!("object"==typeof e||"function"==typeof e),Ft=e=>Array.isArray(e)||!(!e||!e[Symbol.iterator]);class Pt{constructor(e,t,n){this.dirty=!0,this.element=e,this.name=t,this.strings=n,this.parts=[];for(let e=0;e<n.length-1;e++)this.parts[e]=this._createPart()}_createPart(){return new Ht(this)}_getValue(){const e=this.strings,t=e.length-1,n=this.parts;if(1===t&&""===e[0]&&""===e[1]){const e=n[0].value;if("symbol"==typeof e)return String(e);if("string"==typeof e||!Ft(e))return e}let r="";for(let a=0;a<t;a++){r+=e[a];const t=n[a];if(void 0!==t){const e=t.value;if(Ut(e)||!Ft(e))r+="string"==typeof e?e:String(e);else for(const t of e)r+="string"==typeof t?t:String(t)}}return r+=e[t],r}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}class Ht{constructor(e){this.value=void 0,this.committer=e}setValue(e){e===Ot||Ut(e)&&e===this.value||(this.value=e,It(e)||(this.committer.dirty=!0))}commit(){for(;It(this.value);){const e=this.value;this.value=Ot,e(this)}this.value!==Ot&&this.committer.commit()}}class jt{constructor(e){this.value=void 0,this.__pendingValue=void 0,this.options=e}appendInto(e){this.startNode=e.appendChild(Nt()),this.endNode=e.appendChild(Nt())}insertAfterNode(e){this.startNode=e,this.endNode=e.nextSibling}appendIntoPart(e){e.__insert(this.startNode=Nt()),e.__insert(this.endNode=Nt())}insertAfterPart(e){e.__insert(this.startNode=Nt()),this.endNode=e.endNode,e.endNode=this.startNode}setValue(e){this.__pendingValue=e}commit(){if(null===this.startNode.parentNode)return;for(;It(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=Ot,e(this)}const e=this.__pendingValue;e!==Ot&&(Ut(e)?e!==this.value&&this.__commitText(e):e instanceof Gt?this.__commitTemplateResult(e):e instanceof Node?this.__commitNode(e):Ft(e)?this.__commitIterable(e):e===St?(this.value=St,this.clear()):this.__commitText(e))}__insert(e){this.endNode.parentNode.insertBefore(e,this.endNode)}__commitNode(e){this.value!==e&&(this.clear(),this.__insert(e),this.value=e)}__commitText(e){const t=this.startNode.nextSibling,n="string"==typeof(e=null==e?"":e)?e:String(e);t===this.endNode.previousSibling&&3===t.nodeType?t.data=n:this.__commitNode(document.createTextNode(n)),this.value=e}__commitTemplateResult(e){const t=this.options.templateFactory(e);if(this.value instanceof Rt&&this.value.template===t)this.value.update(e.values);else{const n=new Rt(t,e.processor,this.options),r=n._clone();n.update(e.values),this.__commitNode(r),this.value=n}}__commitIterable(e){Array.isArray(this.value)||(this.value=[],this.clear());const t=this.value;let n,r=0;for(const a of e)n=t[r],void 0===n&&(n=new jt(this.options),t.push(n),0===r?n.appendIntoPart(this):n.insertAfterPart(t[r-1])),n.setValue(a),n.commit(),r++;r<t.length&&(t.length=r,this.clear(n&&n.endNode))}clear(e=this.startNode){((e,t,n=null)=>{for(;t!==n;){const n=t.nextSibling;e.removeChild(t),t=n}})(this.startNode.parentNode,e.nextSibling,this.endNode)}}class Xt{constructor(e,t,n){if(this.value=void 0,this.__pendingValue=void 0,2!==n.length||""!==n[0]||""!==n[1])throw new Error("Boolean attributes can only contain a single expression");this.element=e,this.name=t,this.strings=n}setValue(e){this.__pendingValue=e}commit(){for(;It(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=Ot,e(this)}if(this.__pendingValue===Ot)return;const e=!!this.__pendingValue;this.value!==e&&(e?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=e),this.__pendingValue=Ot}}class _t extends Pt{constructor(e,t,n){super(e,t,n),this.single=2===n.length&&""===n[0]&&""===n[1]}_createPart(){return new Lt(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class Lt extends Ht{}let kt=!1;(()=>{try{const e={get capture(){return kt=!0,!1}};window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){}})();class qt{constructor(e,t,n){this.value=void 0,this.__pendingValue=void 0,this.element=e,this.eventName=t,this.eventContext=n,this.__boundHandleEvent=e=>this.handleEvent(e)}setValue(e){this.__pendingValue=e}commit(){for(;It(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=Ot,e(this)}if(this.__pendingValue===Ot)return;const e=this.__pendingValue,t=this.value,n=null==e||null!=t&&(e.capture!==t.capture||e.once!==t.once||e.passive!==t.passive),r=null!=e&&(null==t||n);n&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),r&&(this.__options=Vt(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=Ot}handleEvent(e){"function"==typeof this.value?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}}const Vt=e=>e&&(kt?{capture:e.capture,passive:e.passive,once:e.once}:e.capture)
64
64
  /**
65
65
  * @license
66
66
  * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -73,7 +73,7 @@ class Ot{constructor(e,t,n){this.__parts=[],this.template=e,this.processor=t,thi
73
73
  * Code distributed by Google as part of the polymer project is also
74
74
  * subject to an additional IP rights grant found at
75
75
  * http://polymer.github.io/PATENTS.txt
76
- */;const qt=new class{handleAttributeExpressions(e,t,n,r){const a=t[0];if("."===a){return new jt(e,t.slice(1),n).parts}if("@"===a)return[new Lt(e,t.slice(1),r.eventContext)];if("?"===a)return[new Ht(e,t.slice(1),n)];return new Ut(e,t,n).parts}handleTextExpression(e){return new Pt(e)}};
76
+ */;const Yt=new class{handleAttributeExpressions(e,t,n,r){const a=t[0];if("."===a){return new _t(e,t.slice(1),n).parts}if("@"===a)return[new qt(e,t.slice(1),r.eventContext)];if("?"===a)return[new Xt(e,t.slice(1),n)];return new Pt(e,t,n).parts}handleTextExpression(e){return new jt(e)}};
77
77
  /**
78
78
  * @license
79
79
  * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -86,7 +86,7 @@ class Ot{constructor(e,t,n){this.__parts=[],this.template=e,this.processor=t,thi
86
86
  * Code distributed by Google as part of the polymer project is also
87
87
  * subject to an additional IP rights grant found at
88
88
  * http://polymer.github.io/PATENTS.txt
89
- */"undefined"!=typeof window&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.4.1");const Yt=(e,...t)=>new Dt(e,t,"html",qt)
89
+ */"undefined"!=typeof window&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.4.1");const Qt=(e,...t)=>new Gt(e,t,"html",Yt)
90
90
  /**
91
91
  * @license
92
92
  * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -122,7 +122,7 @@ http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
122
122
  found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
123
123
  part of the polymer project is also subject to an additional IP rights grant
124
124
  found at http://polymer.github.io/PATENTS.txt
125
- */;const Vt=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Qt=Symbol();class Jt{constructor(e,t){if(t!==Qt)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e}get styleSheet(){return void 0===this._styleSheet&&(Vt?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}toString(){return this.cssText}}const Kt=(e,...t)=>{const n=t.reduce((t,n,r)=>t+(e=>{if(e instanceof Jt)return e.cssText;if("number"==typeof e)return e;throw new Error(`Value passed to 'css' function must be a 'css' function result: ${e}. Use 'unsafeCSS' to pass non-literal values, but\n take care to ensure page security.`)})(n)+e[r+1],e[0]);return new Jt(n,Qt)};
125
+ */;const Jt=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Kt=Symbol();class zt{constructor(e,t){if(t!==Kt)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e}get styleSheet(){return void 0===this._styleSheet&&(Jt?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}toString(){return this.cssText}}const Wt=(e,...t)=>{const n=t.reduce((t,n,r)=>t+(e=>{if(e instanceof zt)return e.cssText;if("number"==typeof e)return e;throw new Error(`Value passed to 'css' function must be a 'css' function result: ${e}. Use 'unsafeCSS' to pass non-literal values, but\n take care to ensure page security.`)})(n)+e[r+1],e[0]);return new zt(n,Kt)};
126
126
  /**
127
127
  * @license
128
128
  * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -136,5 +136,5 @@ found at http://polymer.github.io/PATENTS.txt
136
136
  * subject to an additional IP rights grant found at
137
137
  * http://polymer.github.io/PATENTS.txt
138
138
  */
139
- (window.litElementVersions||(window.litElementVersions=[])).push("2.4.0");window.customElements.define("fx-group",class extends yt{static get properties(){return{...super.properties,collapse:{type:Boolean,reflect:!0}}}constructor(){super(),this.collapse=!1}render(){return Yt`<slot></slot>`}handleModelItemProperties(){this.handleRelevant()}initializeChildren(e){Array.from(e.children).forEach(e=>{if(je.isUiElement(e.nodeName))e.init(this.model);else if(0!==e.children.length){Array.from(e.children).forEach(e=>{this.initializeChildren(e)})}})}});customElements.define("fx-hint",class extends vt{static get styles(){return Kt`:host{display:block;height:auto;font-size:.8em;font-weight:400;font-style:italic}`}static get properties(){return{...super.properties}}render(){return Yt`<slot></slot>`}});customElements.define("fx-output",class extends vt{static get properties(){return{...super.properties,valueAttr:{type:String}}}constructor(){super(),this.attachShadow({mode:"open"}),this.valueAttr=this.hasAttribute("value")?this.getAttribute("value"):null}connectedCallback(){this.shadowRoot.innerHTML='\n <style>\n \n :host {\n display: inline-block;\n }\n #widget {\n display: inline-block;\n }\n .label{\n display: inline-block;\n }\n table,tbody{\n width:100%;\n }\n th{\n text-align:left;\n }\n td{\n padding-right:1rem;\n }\n \n </style>\n \n <slot name="label"></slot>\n <span id="value">\n <slot id="main"></slot>\n </span>\n \n ',this.mediatype=this.hasAttribute("mediatype")?this.getAttribute("mediatype"):null,this.addEventListener("slotchange",e=>{})}async refresh(){this.ref&&await super.refresh(),this.valueAttr&&(this.value=this.getValue(),await this.updateWidgetValue())}getValue(){try{const e=st(this,this.valueAttr);return this.hasAttribute("html")?Qe(this.valueAttr,e,this):function(e,t,n,r=null,a=n){const i=Ye(e,t,n);return Se(e,t,r,{},{currentContext:{formElement:n},functionNameResolver:Ve,moduleImports:{xf:Xe},namespaceResolver:i})}(this.valueAttr,e,this)[0]}catch(e){this.dispatch("error",{message:e})}return null}getWidget(){return this.shadowRoot.getElementById("value")}async updateWidgetValue(){const e=this.shadowRoot.getElementById("value");if("markdown"===this.mediatype){const e=markdown(this.nodeset);this.innerHtml=e}if("html"!==this.mediatype)e.innerHTML=this.value;else{if(this.modelItem.node){const{node:e}=this.modelItem;return e.nodeType?void this.appendChild(e):void Object.entries(e).map(e=>{this.appendChild(e[1])})}e.innerHTML=this.value.outerHTML}}isReadonly(){return this.readonly=!0,this.readonly}});class zt extends(ut(HTMLElement)){static get properties(){return{inited:{type:Boolean}}}constructor(){super(),this.inited=!1,this.addEventListener("click",this._dispatchIndexChange),this.addEventListener("focusin",this._dispatchIndexChange),this.attachShadow({mode:"open",delegatesFocus:!0})}_handleFocus(){this.parentNode.setIndex(this.index)}_dispatchIndexChange(){this.parentNode&&this.parentNode.dispatchEvent(new CustomEvent("item-changed",{composed:!0,bubbles:!0,detail:{item:this}}))}connectedCallback(){this.display=this.style.display;this.shadowRoot.innerHTML="\n \n <slot></slot>\n \n ",this.getOwnerForm().registerLazyElement(this)}disconnectedCallback(){this.removeEventListener("click",this._dispatchIndexChange()),this.removeEventListener("focusin",this._handleFocus)}init(){this.inited=!0}getModelItem(){return super.getModelItem(),this.getModelItem()[this.index]}refresh(e){this.modelItem=this.getModel().getModelItem(this.nodeset),this.modelItem&&!this.modelItem.relevant?this.style.display="none":this.style.display=this.display,je.refreshChildren(this,e)}}window.customElements.define("fx-repeatitem",zt);class Wt extends(ut(HTMLElement)){static get properties(){return{...super.properties,index:{type:Number},template:{type:Object},focusOnCreate:{type:String},initDone:{type:Boolean},repeatIndex:{type:Number},nodeset:{type:Array}}}constructor(){super(),this.ref="",this.dataTemplate=[],this.focusOnCreate="",this.initDone=!1,this.repeatIndex=1,this.nodeset=[],this.inited=!1,this.index=1,this.repeatSize=0,this.attachShadow({mode:"open",delegatesFocus:!0})}get repeatSize(){return this.querySelectorAll(":scope > fx-repeatitem").length}set repeatSize(e){this.size=e}setIndex(e){this.index=e;const t=this.querySelectorAll(":scope > fx-repeatitem");this.applyIndex(t[this.index-1])}applyIndex(e){this._removeIndexMarker(),e&&e.setAttribute("repeat-index","")}get index(){return this.getAttribute("index")}set index(e){this.setAttribute("index",e)}connectedCallback(){this.ref=this.getAttribute("ref"),this.addEventListener("item-changed",e=>{const{item:t}=e.detail,n=Array.from(this.children).indexOf(t);this.applyIndex(this.children[n]),this.index=n+1}),this.addEventListener("index-changed",e=>{if(e.stopPropagation(),!e.target===this)return;const{index:t}=e.detail;this.index=t,this.applyIndex(this.children[t-1])}),document.addEventListener("insert",e=>{e.detail.insertedNodes;this.index=e.detail.position}),this.mutationObserver=new MutationObserver(e=>{if("childList"===e[0].type){const t=e[0].addedNodes[0];if(t){const e=Fe.getPath(t);this.dispatch("path-mutated",{path:e,index:this.index})}}}),this.getOwnerForm().registerLazyElement(this);this.shadowRoot.innerHTML='\n <style>\n \n :host{\n }\n .fade-out-bottom {\n -webkit-animation: fade-out-bottom 0.7s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;\n animation: fade-out-bottom 0.7s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;\n }\n .fade-out-bottom {\n -webkit-animation: fade-out-bottom 0.7s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;\n animation: fade-out-bottom 0.7s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;\n }\n \n </style>\n \n <slot name="header"></slot>\n <slot></slot>\n \n '}init(){this._evalNodeset(),this._initTemplate(),this._initRepeatItems(),this.setAttribute("index",this.index),this.inited=!0}_evalNodeset(){const e=st(this.getAttributeNode("ref")||this,this.ref);this.mutationObserver&&e.nodeName&&this.mutationObserver.observe(e,{childList:!0,subtree:!0});const t=Qe(this.ref,e,this.getOwnerForm());if(null!==t){if("object"==typeof t){if("nodeType"in t)return void(this.nodeset=[t]);if(Array.isArray(t))return void(this.nodeset=t)}throw new Error("Unexpected result of repeat nodeset: "+t)}this.nodeset=[]}async refresh(e){this.inited||this.init(),this._evalNodeset();const t=this.querySelectorAll(":scope > fx-repeatitem"),n=t.length;let r=1;Array.isArray(this.nodeset)&&(r=this.nodeset.length);const a=r;if(a<n)for(let e=n;e>a;e-=1){const n=t[e-1];n.parentNode.removeChild(n),this.getOwnerForm().unRegisterLazyElement(n)}if(a>n)for(let e=n+1;e<=a;e+=1){const t=document.createElement("fx-repeatitem"),n=this._clone();t.appendChild(n),this.appendChild(t),t.nodeset=this.nodeset[e-1],t.index=e}for(let e=0;e<n;e+=1){const n=t[e];this.getOwnerForm().registerLazyElement(n),n.nodeset!==this.nodeset[e]&&(n.nodeset=this.nodeset[e])}this.getOwnerForm().lazyRefresh&&!e||je.refreshChildren(this,e),this.setIndex(this.index)}_fadeOut(e){e.style.opacity=1,function t(){(e.style.opacity-=.1)<0?e.style.display="none":requestAnimationFrame(t)}()}_fadeIn(e){e&&(e.style.opacity=0,e.style.display=this.display,function t(){let n=parseFloat(e.style.opacity);(n+=.1)>1||(e.style.opacity=n,requestAnimationFrame(t))}())}_initTemplate(){this.template=this.querySelector("template"),null===this.template&&this.dispatchEvent(new CustomEvent("no-template-error",{composed:!0,bubbles:!0,detail:{message:"no template found for repeat:"+this.id}})),this.shadowRoot.appendChild(this.template)}_initRepeatItems(){this.nodeset.forEach((e,t)=>{const n=document.createElement("fx-repeatitem");n.nodeset=this.nodeset[t],n.index=t+1;const r=this._clone();n.appendChild(r),this.appendChild(n),1===n.index&&this.applyIndex(n)})}_clone(){this.template=this.shadowRoot.querySelector("template");const e=this.template.content.cloneNode(!0);return document.importNode(e,!0)}_removeIndexMarker(){Array.from(this.children).forEach(e=>{e.removeAttribute("repeat-index")})}}window.customElements.define("fx-repeat",Wt);window.customElements.define("fx-switch",class extends yt{connectedCallback(){super.connectedCallback&&super.connectedCallback();this.shadowRoot.innerHTML="\n <style>\n \n :host ::slotted(fx-case.selected-case){\n display: block !important;\n }\n \n </style>\n \n <slot></slot>\n \n "}refresh(){super.refresh();const e=this.querySelectorAll("fx-case");if(this.isBound())Array.from(e).forEach(e=>{e.getAttribute("name")===this.modelItem.value?e.classList.add("selected-case"):e.classList.remove("selected-case")});else{this.querySelector(".selected-case")||e[0].classList.add("selected-case")}je.refreshChildren(this)}toggle(e){const t=this.querySelectorAll("fx-case");Array.from(t).forEach(t=>{e===t?t.classList.add("selected-case"):t.classList.remove("selected-case")})}});customElements.define("fx-trigger",class extends vt{connectedCallback(){this.attachShadow({mode:"open"}),this.ref=this.hasAttribute("ref")?this.getAttribute("ref"):null;this.shadowRoot.innerHTML=`\n <style>\n \n :host {\n cursor:pointer;\n }\n \n </style>\n ${this.renderHTML()}\n `;const e=this.shadowRoot.querySelector("slot");e.addEventListener("slotchange",()=>{const t=e.assignedElements({flatten:!0});t[0].setAttribute("tabindex","0"),t[0].setAttribute("role","button");const n=t[0];n.addEventListener("click",e=>this.performActions(e)),this.widget=n,"BUTTON"!==n.nodeName&&n.addEventListener("keypress",e=>{"Space"!==e.code&&"Enter"!==e.code||this.performActions(e)})})}renderHTML(){return"\n <slot></slot>\n "}getWidget(){return this.widget}async updateWidgetValue(){return null}handleReadonly(){super.handleReadonly(),this.widget.hasAttribute("readonly")?this.widget.setAttribute("disabled","disabled"):this.widget.removeAttribute("disabled")}async performActions(e){const t=this.closest("fx-repeatitem");t&&t.click();(async()=>{for(let t=0;t<this.children.length;t+=1){const n=this.children[t];"function"==typeof n.execute&&await n.execute(e)}})()}});class Zt extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.hasAttribute("label")&&(this.label=this.getAttribute("label")),this.hasAttribute("name")&&(this.name=this.getAttribute("name")),this.hasAttribute("selected")&&(this.selected=this.getAttribute("selected"));const e=`\n ${this.label?`<span>${this.label}</span>`:""}\n <slot></slot>\n `;this.shadowRoot.innerHTML=`\n <style>\n \n :host {\n display: none;\n }\n \n </style>\n ${e}\n `,this.style.display="none"}}window.customElements.define("fx-case",Zt);class $t extends HTMLElement{connectedCallback(){const e=Array.from(document.querySelectorAll("fx-instance"));this.innerHTML=`\n <style>\n \n :host {\n display: block;\n width:100%;\n background:var(--inspector-bg);\n }\n pre{\n background:var(--inspector-pre-bg);\n color:var(--inspector-color);\n max-height:var(--inspector-instance-height,300px);\n overflow:scroll;\n }\n \n </style>\n <slot></slot>\n ${e.map((e,t)=>`\n <details ${0===t?"open":""}>\n <summary>${e.id}</summary>\n <pre>{log('${e.id}')}</pre>\n </details>\n `).join("")}\n `,this.addEventListener("slotchange",e=>{})}}customElements.define("fx-inspector",$t);class en extends HTMLElement{static get properties(){return{id:String}}constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.shadowRoot.innerHTML=this.render("\n :host {\n display: none;\n height: 100vh;\n width:100vw;\n position:fixed;\n left:0;\n top:0;\n right:0;\n bottom:0;\n }\n "),this.id=this.getAttribute("id");const e=this.querySelector(".close-dialog");e&&e.addEventListener("click",e=>{document.getElementById(this.id).classList.remove("show")}),this.focus()}render(e){return`\n <style>\n ${e}\n </style>\n <slot></slot>\n `}open(){window.addEventListener("keyup",e=>{"Escape"===e.key&&this.hide()},{once:!0}),this.classList.add("show")}hide(){this.classList.remove("show")}}customElements.define("fx-dialog",en);async function tn(e){return new Promise(t=>setTimeout(()=>t(),e))}customElements.define("fx-items",class extends gt{static get properties(){return{...super.properties,valueAttr:{type:String}}}constructor(){super(),this.valueAttr=this.hasAttribute("value")?this.getAttribute("value"):null}connectedCallback(){super.connectedCallback(),this.addEventListener("click",e=>{const t=this.querySelectorAll("[value]");let n;"LABEL"===e.target.nodeName&&(n=document.getElementById(e.target.getAttribute("for")),n.checked=!n.checked);let r="";Array.from(t).forEach(e=>{e.checked&&(r+=" "+e.getAttribute("value"))}),this.setAttribute("value",r.trim());const a=this.parentNode.closest("[ref]");if(!a)return;const i=a.getModelItem(),o=this.shadowRoot.getElementById("setvalue");o.setValue(i,r.trim()),o.actionPerformed()})}getWidget(){return this}async updateWidgetValue(){const e=this.parentNode.closest("[ref]");e&&(this.value=e.value),this.setAttribute("value",this.value)}updateEntry(e,t){const n=e.querySelector("label");n.textContent=t.textContent;const r=je.createUUID();n.setAttribute("for",r);const a=e.querySelector("[value]"),i=a.value,o=Qe(i.substring(1,i.length-1),t,e),s=` ${o} `,u=` ${this.getAttribute("value")} `;a.value=o,a.setAttribute("id",r),-1!==u.indexOf(s)&&(a.checked=!0)}});class nn extends(ut(HTMLElement)){static get properties(){return{...super.properties,detail:{type:Object},needsUpdate:{type:Boolean},event:{type:Object},target:{type:String},ifExpr:{type:String},whileExpr:{type:String},delay:{type:Number}}}constructor(){super(),this.detail={},this.needsUpdate=!1}connectedCallback(){this.style.display="none",this.repeatContext=void 0,this.hasAttribute("event")?this.event=this.getAttribute("event"):this.event="activate",this.target=this.getAttribute("target"),this.target?"#window"===this.target?window.addEventListener(this.event,e=>this.execute(e)):"#document"===this.target?document.addEventListener(this.event,e=>this.execute(e)):(this.targetElement=document.getElementById(this.target),this.targetElement.addEventListener(this.event,e=>this.execute(e))):(this.targetElement=this.parentNode,this.targetElement.addEventListener(this.event,e=>this.execute(e))),this.ifExpr=this.hasAttribute("if")?this.getAttribute("if"):null,this.whileExpr=this.hasAttribute("while")?this.getAttribute("while"):null,this.delay=this.hasAttribute("delay")?Number(this.getAttribute("delay")):0}async execute(e){if(e&&e.detail&&(this.detail=e.detail),this.needsUpdate=!1,this.evalInContext(),this.targetElement&&this.targetElement.nodeset&&(this.nodeset=this.targetElement.nodeset),!this.ifExpr||ze(this.ifExpr,this.nodeset,this.getOwnerForm())){if(this.whileExpr){const e=async()=>{await tn(this.delay||0),this.ownerDocument.contains(this)&&ze(this.whileExpr,this.nodeset,this.getOwnerForm())&&(this.perform(),await e())};return await e(),void this.actionPerformed()}!this.delay||(await tn(this.delay),this.ownerDocument.contains(this))?(this.perform(),this.actionPerformed()):this.actionPerformed()}}perform(){(this.isBound()||"FX-ACTION"===this.nodeName)&&this.evalInContext()}actionPerformed(){if(this.needsUpdate){const e=this.getModel();e.recalculate(),e.revalidate(),e.parentNode.refresh(!0),this.dispatchActionPerformed()}}dispatchActionPerformed(){this.dispatchEvent(new CustomEvent("action-performed",{composed:!0,bubbles:!0,detail:{}}))}}window.customElements.define("abstract-action",nn);window.customElements.define("fx-append",class extends nn{static get properties(){return{ref:{type:String},repeat:{type:String},clear:{type:String}}}constructor(){super(),this.repeat=""}connectedCallback(){super.connectedCallback(),this.ref=this.getAttribute("ref"),this.repeat=this.getAttribute("repeat")}perform(){super.perform(),this._dataFromTemplate(),this.needsUpdate=!0}actionPerformed(){super.actionPerformed(),this.dispatch()}_dataFromTemplate(){const e=this.getInScopeContext(),t=this.getOwnerForm().querySelector("#"+this.repeat),n=t.shadowRoot.querySelector("template"),r=e.ownerDocument.createElement(t.ref),a=this._generateInstance(n.content,r);e.appendChild(a)}dispatch(){let e;e=je.isRepeated(this)?je.getRepeatTarget(this,this.repeat):document.getElementById(this.repeat),e.dispatchEvent(new CustomEvent("index-changed",{composed:!0,bubbles:!0,detail:{index:e.nodeset.length}}))}_clear(e){let t=e.firstChild;const n=e.attributes;for(let e=0;e<n.length;e+=1)n[e].value="";for(;t;)1===t.nodeType&&t.hasAttributes()&&(t.textContent=""),this._clear(t),t=t.nextSibling}_generateInstance(e,t){if(1===e.nodeType&&e.hasAttribute("ref")){const n=e.getAttribute("ref");let r;"."===n||(n.startsWith("@")?t.setAttribute(n.substring(1),""):(r=document.createElement(n),t.appendChild(r),0===e.children.length&&(r.textContent=e.textContent)))}if(e.hasChildNodes()){const n=e.children;for(let e=0;e<n.length;e+=1)this._generateInstance(n[e],t)}return t}getInstanceId(){return this.ref.startsWith("instance(")?"not implemented":"default"}});window.customElements.define("fx-delete",class extends nn{constructor(){super(),this.repeatId=""}perform(){if(super.perform(),""===this.repeatId){const e=this.parentNode.closest("fx-repeatitem"),t=Array.from(e.parentNode.children).indexOf(e)+1;this.model=this.getModel();const n=this.parentNode.closest("fx-repeat");let r;r=Array.isArray(this.nodeset)?this.nodeset[t-1]:this.nodeset;r.parentNode.removeChild(r),e.parentNode.removeChild(e);const{repeatSize:a}=n;1===t||1===a?n.setIndex(1):t>a?n.setIndex(a):n.setIndex(t)}this.needsUpdate=!0}actionPerformed(){this.getModel().rebuild(),super.actionPerformed()}});window.customElements.define("fx-insert",class extends nn{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){super.connectedCallback&&super.connectedCallback();this.shadowRoot.innerHTML="\n <style>\n \n :host{\n display:none;\n }\n \n </style>\n <slot></slot>\n ",this.at=Number(this.hasAttribute("at")?this.getAttribute("at"):0),this.position=this.hasAttribute("position")?this.getAttribute("position"):"after",this.origin=this.hasAttribute("origin")?this.getAttribute("origin"):null,this.keepValues=!!this.hasAttribute("keep-values")}_cloneOriginSequence(e,t){let n;if(this.origin){let t;try{t=Je(this.origin,e,this.getOwnerForm()),Array.isArray(t)&&0===t.length&&(n=null),n=t.cloneNode(!0)}catch(e){}}else t&&(n=this._cloneTargetSequence(t),n&&!this.keepValues&&this._clear(n));return n}_getInsertIndex(e,t){return 0===t.length?null:this.hasAttribute("at")?Ze(this.getAttribute("at"),e,this.getOwnerForm()):t.length}perform(){const e=st(this.getAttributeNode("ref"),this.ref),t=Ke(this.ref,e,this.getOwnerForm()),n=this._cloneOriginSequence(e,t);if(!n)return;let r,a;if(0===t.length)r=e,e.appendChild(n),a=1;else{if(this.hasAttribute("at")?(a=Ze(this.getAttribute("at"),e,this.getOwnerForm()),r=t[a-1]):(a=t.length,r=t[t.length-1]),!r){a=1,r=t;a=Qe("count(preceding::*)",t,this.getOwnerForm())+1}this.position&&"before"===this.position&&r.parentNode.insertBefore(n,r),this.position&&"after"===this.position&&(a+=1,r.insertAdjacentElement("afterend",n))}document.dispatchEvent(new CustomEvent("insert",{composed:!0,bubbles:!0,detail:{insertedNodes:n,position:a}})),this.needsUpdate=!0}_cloneTargetSequence(e){return Array.isArray(e)&&0!==e.length?e[e.length-1].cloneNode(!0):!Array.isArray(e)&&e?e.cloneNode(!0):null}actionPerformed(){this.getModel().rebuild(),super.actionPerformed()}_clear(e){const t=e.attributes;for(let e=0;e<t.length;e+=1)t[e].value="";e.textContent&&(e.textContent="");let n=e.firstChild;for(;n;)1===n.nodeType&&n.hasAttributes()&&(n.textContent=""),this._clear(n),n=n.nextSibling}});window.customElements.define("fx-message",class extends nn{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){super.connectedCallback(),this.event=this.hasAttribute("event")?this.getAttribute("event"):"",this.level=this.hasAttribute("level")?this.getAttribute("level"):"ephemeral";this.shadowRoot.innerHTML=`\n <style>\n \n :host{\n display:none;\n }\n \n </style>\n ${this.renderHTML()}\n `}disconnectedCallback(){this.targetElement.removeEventListener(this.event,e=>this.execute(e))}renderHTML(){return"\n <slot></slot>\n "}perform(){let e;super.perform(),e=this.hasAttribute("value")?this.getValue():this.textContent,this.dispatchEvent(new CustomEvent("message",{composed:!0,bubbles:!0,detail:{level:this.level,message:e}}))}});window.customElements.define("fx-setvalue",class extends nn{static get properties(){return{...super.properties,ref:{type:String},valueAttr:{type:String}}}constructor(){super(),this.ref="",this.valueAttr=""}connectedCallback(){if(super.connectedCallback&&super.connectedCallback(),!this.hasAttribute("ref"))throw new Error('fx-setvalue must specify a "ref" attribute');this.ref=this.getAttribute("ref"),this.valueAttr=this.getAttribute("value")}perform(){super.perform();let{value:e}=this;e=null!==this.valueAttr?Qe(this.valueAttr,this.nodeset,this.getOwnerForm(),this.detail):""!==this.textContent?this.textContent:"";const t=this.getModelItem();this.setValue(t,e)}setValue(e,t){const n=e;n&&n.value!==t&&(n.value=t,this.getModel().changed.push(e),this.needsUpdate=!0)}});window.customElements.define("fx-send",class extends nn{constructor(){super(),this.value=""}connectedCallback(){super.connectedCallback(),this.submission=this.getAttribute("submission")}perform(){super.perform();const e=this.getModel().querySelector("#"+this.submission);if(null===e)throw this.dispatchEvent(new CustomEvent("error",{composed:!0,bubbles:!0,detail:{message:`fx-submission element with id: '${this.submission}' not found`}})),new Error(`submission with id: ${this.submission} not found`);e.submit()}});class rn extends nn{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this.src=this.hasAttribute("src")?this.getAttribute("src"):null;this.shadowRoot.innerHTML="\n <style>\n \n :host{\n display:none;\n }\n \n </style>\n <slot></slot>\n "}perform(){const{children:e}=this;if(this.src){this.innerHTML="";const e=document.createElement("script");e.src=this.src,this.appendChild(e)}else Array.from(e).forEach(e=>{e.detail=this.detail,e.execute()}),this.dispatchActionPerformed()}}window.customElements.define("fx-action",rn);window.customElements.define("fx-toggle",class extends rn{connectedCallback(){this.hasAttribute("case")&&(this.case=this.getAttribute("case"))}execute(){if(this.case){const e=this.getOwnerForm().querySelector("#"+this.case);e.parentNode.toggle(e)}}});window.customElements.define("fx-dispatch",class extends nn{constructor(){super(),this.name=null,this.targetid=null,this.details=null,this.attachShadow({mode:"open"})}connectedCallback(){if(super.connectedCallback(),this.name=this.getAttribute("name"),!this.name)throw new Error("no event specified for dispatch",this);this.targetid=this.hasAttribute("targetid")?this.getAttribute("targetid"):null}perform(){const e=this.querySelectorAll("fx-property"),t={};if(Array.from(e).forEach(e=>{const n=e.getAttribute("name"),r=e.getAttribute("value"),a=e.getAttribute("expr");if(a){if(r)throw new Error('if "expr" is given there must not be a "value" attribute');const e=Qe(a,this.getInScopeContext(),this.getOwnerForm());let i=null;if(e.nodeName){i=(new XMLSerializer).serializeToString(e)}t[n]=i||e}r&&(t[n]=r)}),this.targetid){let e;if(e=Fe.isRepeated(this)?$e(this.targetid,this.parentNode,null):document.getElementById(this.targetid),!e)throw new Error(`targetid ${this.targetid} does not exist in document`);e.dispatchEvent(new CustomEvent(this.name,{composed:!0,bubbles:!0,detail:t}))}else document.dispatchEvent(new CustomEvent(this.name,{composed:!0,bubbles:!0,detail:t}))}});window.customElements.define("fx-update",class extends nn{perform(){this.getModel().updateModel()}});window.customElements.define("fx-refresh",class extends nn{perform(){this.getOwnerForm().refresh()}});window.customElements.define("fx-confirm",class extends rn{connectedCallback(){this.message=this.hasAttribute("message")?this.getAttribute("message"):null}perform(){window.confirm(this.message)&&super.perform()}});window.customElements.define("fx-show",class extends rn{connectedCallback(){this.dialog=this.getAttribute("dialog"),this.dialog||this.dispatch("error",{message:"dialog does not exist"})}perform(){document.getElementById(this.dialog).open()}});window.customElements.define("fx-hide",class extends rn{connectedCallback(){this.dialog=this.getAttribute("dialog"),this.dialog||this.dispatch("error",{message:"dialog does not exist"})}perform(){document.getElementById(this.dialog).hide()}});class an extends(ut(HTMLElement)){constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.style.display="none",this.signature=this.hasAttribute("signature")?this.getAttribute("signature"):null,this.signature,this.type=this.hasAttribute("type")?this.getAttribute("type"):null,this.shadowRoot.innerHTML="<slot></slot>",this.override=this.hasAttribute("override")?this.getAttribute("override"):"true",this.functionBody=this.innerText;const e=this.getAttribute("type")||"text/xpath",t=this.signature.match(/(?:(?<prefix>[^:]*):)?(?<localName>[^(]+)\((?<params>(?:\(\)|[^)])*)\)(?: as (?<returnType>.*))?/);if(!t)throw new Error(`Function signature ${this.signature} could not be parsed`);const{prefix:n,localName:r,params:a,returnType:i}=t.groups,o="local"===n?{namespaceURI:"http://www.w3.org/2005/xquery-local-functions",localName:r}:`${n}:${r}`,s=a?a.split(",").map(e=>{const t=e.match(/(?<variableName>\$[^\s]+)(?:\sas\s(?<varType>.+))/);if(!t)throw new Error(`Param ${e} could not be parsed`);const{variableName:n,varType:r}=t.groups;return{variableName:n,variableType:r||"item()*"}}):[];switch(e){case"text/javascript":{const e=new Function("_domFacade",...s.map(e=>e.variableName),"form",this.functionBody);Me(o,s.map(e=>e.variableType),i||"item()*",(...t)=>e.apply(this.getInScopeContext(),[...t,this.getOwnerForm()]));break}case"text/xpath":{const e=(e,...t)=>Qe(this.functionBody,this.getInScopeContext(),this.getOwnerForm(),s.reduce((e,n,r)=>(e[n.variableName.replace("$","")]=t[r],e),{}));Me(o,s.map(e=>e.variableType),i||"item()*",e);break}default:throw new Error(`Unexpected mimetype ${e} for function`)}}}customElements.define("fx-function",an);
139
+ (window.litElementVersions||(window.litElementVersions=[])).push("2.4.0");window.customElements.define("fx-group",class extends At{static get properties(){return{...super.properties,collapse:{type:Boolean,reflect:!0}}}constructor(){super(),this.collapse=!1}render(){return Qt`<slot></slot>`}handleModelItemProperties(){this.handleRelevant()}initializeChildren(e){Array.from(e.children).forEach(e=>{if(je.isUiElement(e.nodeName))e.init(this.model);else if(0!==e.children.length){Array.from(e.children).forEach(e=>{this.initializeChildren(e)})}})}});customElements.define("fx-hint",class extends yt{static get styles(){return Wt`:host{display:block;height:auto;font-size:.8em;font-weight:400;font-style:italic}`}static get properties(){return{...super.properties}}render(){return Qt`<slot></slot>`}});customElements.define("fx-output",class extends yt{static get properties(){return{...super.properties,valueAttr:{type:String}}}constructor(){super(),this.attachShadow({mode:"open"}),this.valueAttr=this.hasAttribute("value")?this.getAttribute("value"):null}connectedCallback(){this.shadowRoot.innerHTML='\n <style>\n \n :host {\n display: inline-block;\n }\n #widget {\n display: inline-block;\n }\n .label{\n display: inline-block;\n }\n table,tbody{\n width:100%;\n }\n th{\n text-align:left;\n }\n td{\n padding-right:1rem;\n }\n \n </style>\n \n <slot name="label"></slot>\n <span id="value">\n <slot id="main"></slot>\n </span>\n \n ',this.mediatype=this.hasAttribute("mediatype")?this.getAttribute("mediatype"):null,this.addEventListener("slotchange",e=>{})}async refresh(){this.ref&&await super.refresh(),this.valueAttr&&(this.value=this.getValue(),await this.updateWidgetValue())}getValue(){try{const e=ut(this,this.valueAttr);return this.hasAttribute("html")?Je(this.valueAttr,e,this):function(e,t,n,r=null,a=n){const i=Ve(e,t,n);return Se(e,t,r,{},{currentContext:{formElement:n},functionNameResolver:Ye,moduleImports:{xf:Xe},namespaceResolver:i})}(this.valueAttr,e,this)[0]}catch(e){this.dispatch("error",{message:e})}return null}getWidget(){return this.shadowRoot.getElementById("value")}async updateWidgetValue(){const e=this.shadowRoot.getElementById("value");if("markdown"===this.mediatype){const e=markdown(this.nodeset);this.innerHtml=e}if("html"!==this.mediatype)e.innerHTML=this.value;else{if(this.modelItem.node){const{node:e}=this.modelItem;return e.nodeType?void this.appendChild(e):void Object.entries(e).map(e=>{this.appendChild(e[1])})}e.innerHTML=this.value.outerHTML}}isReadonly(){return this.readonly=!0,this.readonly}});class Zt extends(lt(HTMLElement)){static get properties(){return{inited:{type:Boolean}}}constructor(){super(),this.inited=!1,this.addEventListener("click",this._dispatchIndexChange),this.addEventListener("focusin",this._dispatchIndexChange),this.attachShadow({mode:"open",delegatesFocus:!0})}_handleFocus(){this.parentNode.setIndex(this.index)}_dispatchIndexChange(){this.parentNode&&this.parentNode.dispatchEvent(new CustomEvent("item-changed",{composed:!0,bubbles:!0,detail:{item:this}}))}connectedCallback(){this.display=this.style.display;this.shadowRoot.innerHTML="\n \n <slot></slot>\n \n ",this.getOwnerForm().registerLazyElement(this)}disconnectedCallback(){this.removeEventListener("click",this._dispatchIndexChange()),this.removeEventListener("focusin",this._handleFocus)}init(){this.inited=!0}getModelItem(){return super.getModelItem(),this.getModelItem()[this.index]}refresh(e){this.modelItem=this.getModel().getModelItem(this.nodeset),this.modelItem&&!this.modelItem.relevant?this.style.display="none":this.style.display=this.display,je.refreshChildren(this,e)}}window.customElements.define("fx-repeatitem",Zt);class $t extends(lt(HTMLElement)){static get properties(){return{...super.properties,index:{type:Number},template:{type:Object},focusOnCreate:{type:String},initDone:{type:Boolean},repeatIndex:{type:Number},nodeset:{type:Array}}}constructor(){super(),this.ref="",this.dataTemplate=[],this.focusOnCreate="",this.initDone=!1,this.repeatIndex=1,this.nodeset=[],this.inited=!1,this.index=1,this.repeatSize=0,this.attachShadow({mode:"open",delegatesFocus:!0})}get repeatSize(){return this.querySelectorAll(":scope > fx-repeatitem").length}set repeatSize(e){this.size=e}setIndex(e){this.index=e;const t=this.querySelectorAll(":scope > fx-repeatitem");this.applyIndex(t[this.index-1])}applyIndex(e){this._removeIndexMarker(),e&&e.setAttribute("repeat-index","")}get index(){return this.getAttribute("index")}set index(e){this.setAttribute("index",e)}connectedCallback(){this.ref=this.getAttribute("ref"),this.addEventListener("item-changed",e=>{const{item:t}=e.detail,n=Array.from(this.children).indexOf(t);this.applyIndex(this.children[n]),this.index=n+1}),this.addEventListener("index-changed",e=>{if(e.stopPropagation(),!e.target===this)return;const{index:t}=e.detail;this.index=t,this.applyIndex(this.children[t-1])}),document.addEventListener("insert",e=>{e.detail.insertedNodes;this.index=e.detail.position}),this.mutationObserver=new MutationObserver(e=>{if("childList"===e[0].type){const t=e[0].addedNodes[0];if(t){const e=Fe.getPath(t);this.dispatch("path-mutated",{path:e,index:this.index})}}}),this.getOwnerForm().registerLazyElement(this);this.shadowRoot.innerHTML='\n <style>\n \n :host{\n }\n .fade-out-bottom {\n -webkit-animation: fade-out-bottom 0.7s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;\n animation: fade-out-bottom 0.7s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;\n }\n .fade-out-bottom {\n -webkit-animation: fade-out-bottom 0.7s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;\n animation: fade-out-bottom 0.7s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;\n }\n \n </style>\n \n <slot name="header"></slot>\n <slot></slot>\n \n '}init(){this._evalNodeset(),this._initTemplate(),this._initRepeatItems(),this.setAttribute("index",this.index),this.inited=!0}_evalNodeset(){const e=ut(this.getAttributeNode("ref")||this,this.ref);this.mutationObserver&&e.nodeName&&this.mutationObserver.observe(e,{childList:!0,subtree:!0});const t=Je(this.ref,e,this.getOwnerForm());if(null!==t){if("object"==typeof t){if("nodeType"in t)return void(this.nodeset=[t]);if(Array.isArray(t))return void(this.nodeset=t)}throw new Error("Unexpected result of repeat nodeset: "+t)}this.nodeset=[]}async refresh(e){this.inited||this.init(),this._evalNodeset();const t=this.querySelectorAll(":scope > fx-repeatitem"),n=t.length;let r=1;Array.isArray(this.nodeset)&&(r=this.nodeset.length);const a=r;if(a<n)for(let e=n;e>a;e-=1){const n=t[e-1];n.parentNode.removeChild(n),this.getOwnerForm().unRegisterLazyElement(n)}if(a>n)for(let e=n+1;e<=a;e+=1){const t=document.createElement("fx-repeatitem"),n=this._clone();t.appendChild(n),this.appendChild(t),this._initVariables(t),t.nodeset=this.nodeset[e-1],t.index=e}for(let e=0;e<n;e+=1){const n=t[e];this.getOwnerForm().registerLazyElement(n),n.nodeset!==this.nodeset[e]&&(n.nodeset=this.nodeset[e])}this.getOwnerForm().lazyRefresh&&!e||je.refreshChildren(this,e),this.setIndex(this.index)}_fadeOut(e){e.style.opacity=1,function t(){(e.style.opacity-=.1)<0?e.style.display="none":requestAnimationFrame(t)}()}_fadeIn(e){e&&(e.style.opacity=0,e.style.display=this.display,function t(){let n=parseFloat(e.style.opacity);(n+=.1)>1||(e.style.opacity=n,requestAnimationFrame(t))}())}_initTemplate(){this.template=this.querySelector("template"),null===this.template&&this.dispatchEvent(new CustomEvent("no-template-error",{composed:!0,bubbles:!0,detail:{message:"no template found for repeat:"+this.id}})),this.shadowRoot.appendChild(this.template)}_initRepeatItems(){this.nodeset.forEach((e,t)=>{const n=document.createElement("fx-repeatitem");n.nodeset=this.nodeset[t],n.index=t+1;const r=this._clone();n.appendChild(r),this.appendChild(n),1===n.index&&this.applyIndex(n),this._initVariables(n)})}_initVariables(e){const t=new Map(this.inScopeVariables);e.setInScopeVariables(t),function e(n){for(const r of n.children)"setInScopeVariables"in r&&r.setInScopeVariables(t),e(r)}(e)}_clone(){this.template=this.shadowRoot.querySelector("template");const e=this.template.content.cloneNode(!0);return document.importNode(e,!0)}_removeIndexMarker(){Array.from(this.children).forEach(e=>{e.removeAttribute("repeat-index")})}setInScopeVariables(e){this.inScopeVariables=new Map(e)}}window.customElements.define("fx-repeat",$t);window.customElements.define("fx-switch",class extends At{connectedCallback(){super.connectedCallback&&super.connectedCallback();this.shadowRoot.innerHTML="\n <style>\n \n :host ::slotted(fx-case.selected-case){\n display: block !important;\n }\n \n </style>\n \n <slot></slot>\n \n "}refresh(){super.refresh();const e=this.querySelectorAll("fx-case");if(this.isBound())Array.from(e).forEach(e=>{e.getAttribute("name")===this.modelItem.value?e.classList.add("selected-case"):e.classList.remove("selected-case")});else{this.querySelector(".selected-case")||e[0].classList.add("selected-case")}je.refreshChildren(this)}toggle(e){const t=this.querySelectorAll("fx-case");Array.from(t).forEach(t=>{e===t?t.classList.add("selected-case"):t.classList.remove("selected-case")})}});customElements.define("fx-trigger",class extends yt{connectedCallback(){this.attachShadow({mode:"open"}),this.ref=this.hasAttribute("ref")?this.getAttribute("ref"):null;this.shadowRoot.innerHTML=`\n <style>\n \n :host {\n cursor:pointer;\n }\n \n </style>\n ${this.renderHTML()}\n `;const e=this.shadowRoot.querySelector("slot");e.addEventListener("slotchange",()=>{const t=e.assignedElements({flatten:!0});t[0].setAttribute("tabindex","0"),t[0].setAttribute("role","button");const n=t[0];n.addEventListener("click",e=>this.performActions(e)),this.widget=n,"BUTTON"!==n.nodeName&&n.addEventListener("keypress",e=>{"Space"!==e.code&&"Enter"!==e.code||this.performActions(e)})})}renderHTML(){return"\n <slot></slot>\n "}getWidget(){return this.widget}async updateWidgetValue(){return null}handleReadonly(){super.handleReadonly(),this.widget.hasAttribute("readonly")?this.widget.setAttribute("disabled","disabled"):this.widget.removeAttribute("disabled")}async performActions(e){const t=this.closest("fx-repeatitem");t&&t.click(),this.querySelectorAll("fx-var").forEach(e=>e.refresh());(async()=>{for(let t=0;t<this.children.length;t+=1){const n=this.children[t];"function"==typeof n.execute&&await n.execute(e)}})()}});class en extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.hasAttribute("label")&&(this.label=this.getAttribute("label")),this.hasAttribute("name")&&(this.name=this.getAttribute("name")),this.hasAttribute("selected")&&(this.selected=this.getAttribute("selected"));const e=`\n ${this.label?`<span>${this.label}</span>`:""}\n <slot></slot>\n `;this.shadowRoot.innerHTML=`\n <style>\n \n :host {\n display: none;\n }\n \n </style>\n ${e}\n `,this.style.display="none"}}window.customElements.define("fx-case",en);class tn extends HTMLElement{connectedCallback(){const e=Array.from(document.querySelectorAll("fx-instance"));this.innerHTML=`\n <style>\n \n :host {\n display: block;\n width:100%;\n background:var(--inspector-bg);\n }\n pre{\n background:var(--inspector-pre-bg);\n color:var(--inspector-color);\n max-height:var(--inspector-instance-height,300px);\n overflow:scroll;\n }\n \n </style>\n <slot></slot>\n ${e.map((e,t)=>`\n <details ${0===t?"open":""}>\n <summary>${e.id}</summary>\n <pre>{log('${e.id}')}</pre>\n </details>\n `).join("")}\n `,this.addEventListener("slotchange",e=>{})}}customElements.define("fx-inspector",tn);class nn extends HTMLElement{static get properties(){return{id:String}}constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.shadowRoot.innerHTML=this.render("\n :host {\n display: none;\n height: 100vh;\n width:100vw;\n position:fixed;\n left:0;\n top:0;\n right:0;\n bottom:0;\n }\n "),this.id=this.getAttribute("id");const e=this.querySelector(".close-dialog");e&&e.addEventListener("click",e=>{document.getElementById(this.id).classList.remove("show")}),this.focus()}render(e){return`\n <style>\n ${e}\n </style>\n <slot></slot>\n `}open(){window.addEventListener("keyup",e=>{"Escape"===e.key&&this.hide()},{once:!0}),this.classList.add("show")}hide(){this.classList.remove("show")}}customElements.define("fx-dialog",nn);async function rn(e){return new Promise(t=>setTimeout(()=>t(),e))}customElements.define("fx-items",class extends wt{static get properties(){return{...super.properties,valueAttr:{type:String}}}constructor(){super(),this.valueAttr=this.hasAttribute("value")?this.getAttribute("value"):null}connectedCallback(){super.connectedCallback(),this.addEventListener("click",e=>{const t=this.querySelectorAll("[value]");let n;"LABEL"===e.target.nodeName&&(n=document.getElementById(e.target.getAttribute("for")),n.checked=!n.checked);let r="";Array.from(t).forEach(e=>{e.checked&&(r+=" "+e.getAttribute("value"))}),this.setAttribute("value",r.trim());const a=this.parentNode.closest("[ref]");if(!a)return;const i=a.getModelItem(),o=this.shadowRoot.getElementById("setvalue");o.setValue(i,r.trim()),o.actionPerformed()})}getWidget(){return this}async updateWidgetValue(){const e=this.parentNode.closest("[ref]");e&&(this.value=e.value),this.setAttribute("value",this.value)}updateEntry(e,t){const n=e.querySelector("label");n.textContent=t.textContent;const r=je.createUUID();n.setAttribute("for",r);const a=e.querySelector("[value]"),i=a.value,o=Je(i.substring(1,i.length-1),t,e),s=` ${o} `,u=` ${this.getAttribute("value")} `;a.value=o,a.setAttribute("id",r),-1!==u.indexOf(s)&&(a.checked=!0)}});class an extends(lt(HTMLElement)){static get properties(){return{...super.properties,detail:{type:Object},needsUpdate:{type:Boolean},event:{type:Object},target:{type:String},ifExpr:{type:String},whileExpr:{type:String},delay:{type:Number}}}constructor(){super(),this.detail={},this.needsUpdate=!1}connectedCallback(){this.style.display="none",this.repeatContext=void 0,this.hasAttribute("event")?this.event=this.getAttribute("event"):this.event="activate",this.target=this.getAttribute("target"),this.target?"#window"===this.target?window.addEventListener(this.event,e=>this.execute(e)):"#document"===this.target?document.addEventListener(this.event,e=>this.execute(e)):(this.targetElement=document.getElementById(this.target),this.targetElement.addEventListener(this.event,e=>this.execute(e))):(this.targetElement=this.parentNode,this.targetElement.addEventListener(this.event,e=>this.execute(e))),this.ifExpr=this.hasAttribute("if")?this.getAttribute("if"):null,this.whileExpr=this.hasAttribute("while")?this.getAttribute("while"):null,this.delay=this.hasAttribute("delay")?Number(this.getAttribute("delay")):0}async execute(e){if(e&&e.detail&&(this.detail=e.detail),this.needsUpdate=!1,this.evalInContext(),this.targetElement&&this.targetElement.nodeset&&(this.nodeset=this.targetElement.nodeset),!this.ifExpr||We(this.ifExpr,this.nodeset,this)){if(this.whileExpr){const e=async()=>{await rn(this.delay||0),this.ownerDocument.contains(this)&&We(this.whileExpr,this.nodeset,this)&&(this.perform(),await e())};return await e(),void this.actionPerformed()}!this.delay||(await rn(this.delay),this.ownerDocument.contains(this))?(this.perform(),this.actionPerformed()):this.actionPerformed()}}perform(){(this.isBound()||"FX-ACTION"===this.nodeName)&&this.evalInContext()}actionPerformed(){if(this.needsUpdate){const e=this.getModel();e.recalculate(),e.revalidate(),e.parentNode.refresh(!0),this.dispatchActionPerformed()}}dispatchActionPerformed(){this.dispatchEvent(new CustomEvent("action-performed",{composed:!0,bubbles:!0,detail:{}}))}}window.customElements.define("abstract-action",an);window.customElements.define("fx-append",class extends an{static get properties(){return{ref:{type:String},repeat:{type:String},clear:{type:String}}}constructor(){super(),this.repeat=""}connectedCallback(){super.connectedCallback(),this.ref=this.getAttribute("ref"),this.repeat=this.getAttribute("repeat")}perform(){super.perform(),this._dataFromTemplate(),this.needsUpdate=!0}actionPerformed(){super.actionPerformed(),this.dispatch()}_dataFromTemplate(){const e=this.getInScopeContext(),t=this.getOwnerForm().querySelector("#"+this.repeat),n=t.shadowRoot.querySelector("template"),r=e.ownerDocument.createElement(t.ref),a=this._generateInstance(n.content,r);e.appendChild(a)}dispatch(){let e;e=je.isRepeated(this)?je.getRepeatTarget(this,this.repeat):document.getElementById(this.repeat),e.dispatchEvent(new CustomEvent("index-changed",{composed:!0,bubbles:!0,detail:{index:e.nodeset.length}}))}_clear(e){let t=e.firstChild;const n=e.attributes;for(let e=0;e<n.length;e+=1)n[e].value="";for(;t;)1===t.nodeType&&t.hasAttributes()&&(t.textContent=""),this._clear(t),t=t.nextSibling}_generateInstance(e,t){if(1===e.nodeType&&e.hasAttribute("ref")){const n=e.getAttribute("ref");let r;"."===n||(n.startsWith("@")?t.setAttribute(n.substring(1),""):(r=document.createElement(n),t.appendChild(r),0===e.children.length&&(r.textContent=e.textContent)))}if(e.hasChildNodes()){const n=e.children;for(let e=0;e<n.length;e+=1)this._generateInstance(n[e],t)}return t}getInstanceId(){return this.ref.startsWith("instance(")?"not implemented":"default"}});window.customElements.define("fx-delete",class extends an{constructor(){super(),this.repeatId=""}perform(){if(super.perform(),""===this.repeatId){const e=this.parentNode.closest("fx-repeatitem"),t=Array.from(e.parentNode.children).indexOf(e)+1;this.model=this.getModel();const n=this.parentNode.closest("fx-repeat");let r;r=Array.isArray(this.nodeset)?this.nodeset[t-1]:this.nodeset;r.parentNode.removeChild(r),e.parentNode.removeChild(e);const{repeatSize:a}=n;1===t||1===a?n.setIndex(1):t>a?n.setIndex(a):n.setIndex(t)}this.needsUpdate=!0}actionPerformed(){this.getModel().rebuild(),super.actionPerformed()}});window.customElements.define("fx-insert",class extends an{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){super.connectedCallback&&super.connectedCallback();this.shadowRoot.innerHTML="\n <style>\n \n :host{\n display:none;\n }\n \n </style>\n <slot></slot>\n ",this.at=Number(this.hasAttribute("at")?this.getAttribute("at"):0),this.position=this.hasAttribute("position")?this.getAttribute("position"):"after",this.origin=this.hasAttribute("origin")?this.getAttribute("origin"):null,this.keepValues=!!this.hasAttribute("keep-values")}_cloneOriginSequence(e,t){let n;if(this.origin){let t;try{t=Ke(this.origin,e,this.getOwnerForm()),Array.isArray(t)&&0===t.length&&(n=null),n=t.cloneNode(!0)}catch(e){}}else t&&(n=this._cloneTargetSequence(t),n&&!this.keepValues&&this._clear(n));return n}_getInsertIndex(e,t){return 0===t.length?null:this.hasAttribute("at")?$e(this.getAttribute("at"),e,this.getOwnerForm()):t.length}perform(){const e=ut(this.getAttributeNode("ref"),this.ref),t=ze(this.ref,e,this.getOwnerForm()),n=this._cloneOriginSequence(e,t);if(!n)return;let r,a;if(0===t.length)r=e,e.appendChild(n),a=1;else{if(this.hasAttribute("at")?(a=$e(this.getAttribute("at"),e,this.getOwnerForm()),r=t[a-1]):(a=t.length,r=t[t.length-1]),!r){a=1,r=t;a=Je("count(preceding::*)",t,this.getOwnerForm())+1}this.position&&"before"===this.position&&r.parentNode.insertBefore(n,r),this.position&&"after"===this.position&&(a+=1,r.insertAdjacentElement("afterend",n))}document.dispatchEvent(new CustomEvent("insert",{composed:!0,bubbles:!0,detail:{insertedNodes:n,position:a}})),this.needsUpdate=!0}_cloneTargetSequence(e){return Array.isArray(e)&&0!==e.length?e[e.length-1].cloneNode(!0):!Array.isArray(e)&&e?e.cloneNode(!0):null}actionPerformed(){this.getModel().rebuild(),super.actionPerformed()}_clear(e){const t=e.attributes;for(let e=0;e<t.length;e+=1)t[e].value="";e.textContent&&(e.textContent="");let n=e.firstChild;for(;n;)1===n.nodeType&&n.hasAttributes()&&(n.textContent=""),this._clear(n),n=n.nextSibling}});window.customElements.define("fx-message",class extends an{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){super.connectedCallback(),this.event=this.hasAttribute("event")?this.getAttribute("event"):"",this.level=this.hasAttribute("level")?this.getAttribute("level"):"ephemeral";this.shadowRoot.innerHTML=`\n <style>\n \n :host{\n display:none;\n }\n \n </style>\n ${this.renderHTML()}\n `}disconnectedCallback(){this.targetElement.removeEventListener(this.event,e=>this.execute(e))}renderHTML(){return"\n <slot></slot>\n "}perform(){let e;super.perform(),e=this.hasAttribute("value")?this.getValue():this.textContent,this.dispatchEvent(new CustomEvent("message",{composed:!0,bubbles:!0,detail:{level:this.level,message:e}}))}});window.customElements.define("fx-setvalue",class extends an{static get properties(){return{...super.properties,ref:{type:String},valueAttr:{type:String}}}constructor(){super(),this.ref="",this.valueAttr=""}connectedCallback(){if(super.connectedCallback&&super.connectedCallback(),!this.hasAttribute("ref"))throw new Error('fx-setvalue must specify a "ref" attribute');this.ref=this.getAttribute("ref"),this.valueAttr=this.getAttribute("value")}perform(){super.perform();let{value:e}=this;e=null!==this.valueAttr?Je(this.valueAttr,this.nodeset,this,this.detail):""!==this.textContent?this.textContent:"";const t=this.getModelItem();this.setValue(t,e)}setValue(e,t){const n=e;n&&n.value!==t&&(n.value=t,this.getModel().changed.push(e),this.needsUpdate=!0)}});window.customElements.define("fx-send",class extends an{constructor(){super(),this.value=""}connectedCallback(){super.connectedCallback(),this.submission=this.getAttribute("submission")}perform(){super.perform();const e=this.getModel().querySelector("#"+this.submission);if(null===e)throw this.dispatchEvent(new CustomEvent("error",{composed:!0,bubbles:!0,detail:{message:`fx-submission element with id: '${this.submission}' not found`}})),new Error(`submission with id: ${this.submission} not found`);e.submit()}});class on extends an{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this.src=this.hasAttribute("src")?this.getAttribute("src"):null;this.shadowRoot.innerHTML="\n <style>\n \n :host{\n display:none;\n }\n \n </style>\n <slot></slot>\n "}perform(){const{children:e}=this;if(this.src){this.innerHTML="";const e=document.createElement("script");e.src=this.src,this.appendChild(e)}else Array.from(e).forEach(e=>{if("fx-var"===e.localName)return;const t=e;t.detail=this.detail,t.execute()}),this.dispatchActionPerformed()}}window.customElements.define("fx-action",on);window.customElements.define("fx-toggle",class extends on{connectedCallback(){this.hasAttribute("case")&&(this.case=this.getAttribute("case"))}execute(){if(this.case){const e=this.getOwnerForm().querySelector("#"+this.case);e.parentNode.toggle(e)}}});window.customElements.define("fx-dispatch",class extends an{constructor(){super(),this.name=null,this.targetid=null,this.details=null,this.attachShadow({mode:"open"})}connectedCallback(){if(super.connectedCallback(),this.name=this.getAttribute("name"),!this.name)throw new Error("no event specified for dispatch",this);this.targetid=this.hasAttribute("targetid")?this.getAttribute("targetid"):null}perform(){const e=this.querySelectorAll("fx-property"),t={};if(Array.from(e).forEach(e=>{const n=e.getAttribute("name"),r=e.getAttribute("value"),a=e.getAttribute("expr");if(a){if(r)throw new Error('if "expr" is given there must not be a "value" attribute');const e=Je(a,this.getInScopeContext(),this.getOwnerForm());let i=null;if(e.nodeName){i=(new XMLSerializer).serializeToString(e)}t[n]=i||e}r&&(t[n]=r)}),this.targetid){let e;if(e=Fe.isRepeated(this)?et(this.targetid,this.parentNode,null):document.getElementById(this.targetid),!e)throw new Error(`targetid ${this.targetid} does not exist in document`);e.dispatchEvent(new CustomEvent(this.name,{composed:!0,bubbles:!0,detail:t}))}else document.dispatchEvent(new CustomEvent(this.name,{composed:!0,bubbles:!0,detail:t}))}});window.customElements.define("fx-update",class extends an{perform(){this.getModel().updateModel()}});window.customElements.define("fx-refresh",class extends an{perform(){this.getOwnerForm().refresh()}});window.customElements.define("fx-confirm",class extends on{connectedCallback(){this.message=this.hasAttribute("message")?this.getAttribute("message"):null}perform(){window.confirm(this.message)&&super.perform()}});window.customElements.define("fx-show",class extends on{connectedCallback(){this.dialog=this.getAttribute("dialog"),this.dialog||this.dispatch("error",{message:"dialog does not exist"})}perform(){document.getElementById(this.dialog).open()}});window.customElements.define("fx-hide",class extends on{connectedCallback(){this.dialog=this.getAttribute("dialog"),this.dialog||this.dispatch("error",{message:"dialog does not exist"})}perform(){document.getElementById(this.dialog).hide()}});class sn extends(lt(HTMLElement)){constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.style.display="none",this.signature=this.hasAttribute("signature")?this.getAttribute("signature"):null,this.signature,this.type=this.hasAttribute("type")?this.getAttribute("type"):null,this.shadowRoot.innerHTML="<slot></slot>",this.override=this.hasAttribute("override")?this.getAttribute("override"):"true",this.functionBody=this.innerText;const e=this.getAttribute("type")||"text/xpath",t=this.signature.match(/(?:(?<prefix>[^:]*):)?(?<localName>[^(]+)\((?<params>(?:\(\)|[^)])*)\)(?: as (?<returnType>.*))?/);if(!t)throw new Error(`Function signature ${this.signature} could not be parsed`);const{prefix:n,localName:r,params:a,returnType:i}=t.groups,o="local"===n?{namespaceURI:"http://www.w3.org/2005/xquery-local-functions",localName:r}:`${n}:${r}`,s=a?a.split(",").map(e=>{const t=e.match(/(?<variableName>\$[^\s]+)(?:\sas\s(?<varType>.+))/);if(!t)throw new Error(`Param ${e} could not be parsed`);const{variableName:n,varType:r}=t.groups;return{variableName:n,variableType:r||"item()*"}}):[];switch(e){case"text/javascript":{const e=new Function("_domFacade",...s.map(e=>e.variableName),"form",this.functionBody);Me(o,s.map(e=>e.variableType),i||"item()*",(...t)=>e.apply(this.getInScopeContext(),[...t,this.getOwnerForm()]));break}case"text/xpath":{const e=(e,...t)=>Je(this.functionBody,this.getInScopeContext(),this.getOwnerForm(),s.reduce((e,n,r)=>(e[n.variableName.replace("$","")]=t[r],e),{}));Me(o,s.map(e=>e.variableType),i||"item()*",e);break}default:throw new Error(`Unexpected mimetype ${e} for function`)}}}customElements.define("fx-function",sn);
140
140
  //# sourceMappingURL=fore-all.js.map