@arcgis/core 4.33.0-next.20250509 → 4.33.0-next.20250511

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.
Files changed (67) hide show
  1. package/applications/SceneViewer/sceneViewerUtils.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/06eb4832b6c86744e52e.js +1 -0
  4. package/assets/esri/core/workers/chunks/170c346cf5a18adb25b0.js +1 -0
  5. package/assets/esri/core/workers/chunks/253bcc3cc7bc4c2dc6ea.js +1 -0
  6. package/assets/esri/core/workers/chunks/{d874d24568b1acedebc4.js → 297d2c0a9d3f1e978318.js} +1 -1
  7. package/assets/esri/core/workers/chunks/4bd5cbf6e0be2fc7e84d.js +1 -0
  8. package/assets/esri/core/workers/chunks/{b1035bf4a016b1199236.js → 83d6a1b3db7d364d156b.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{7ed9a9c33a08ebba5570.js → 92cbe9af8a6c061bfb57.js} +1 -1
  10. package/assets/esri/core/workers/chunks/a1d697e2be1e892a666a.js +1 -0
  11. package/assets/esri/core/workers/chunks/{61c74a733718d667b071.js → d551f70560a2b1ef5696.js} +1 -1
  12. package/assets/esri/core/workers/chunks/f6a1fec33b0d81acce61.js +1 -0
  13. package/core/has.js +1 -1
  14. package/core/sql/StandardizedFunctions.js +1 -1
  15. package/core/sql/WhereGrammar.js +1 -1
  16. package/geometry/support/meshUtils/External.js +1 -1
  17. package/geometry/support/meshUtils/loadExternal.js +1 -1
  18. package/interfaces.d.ts +340 -14
  19. package/layers/SceneLayer.js +1 -1
  20. package/layers/VideoLayer.js +1 -1
  21. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  22. package/layers/graphics/sources/support/uploadAssets.js +1 -1
  23. package/layers/video/VideoController.js +1 -1
  24. package/package.json +1 -1
  25. package/rest/knowledgeGraph/wasmInterface/wasmToUpdateResponseFactories.js +1 -1
  26. package/rest/support/meshFeatureSet.js +1 -1
  27. package/smartMapping/renderers/size.js +1 -1
  28. package/smartMapping/renderers/support/spikeUtils.js +1 -1
  29. package/support/revision.js +1 -1
  30. package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
  31. package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
  32. package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
  33. package/views/2d/layers/features/layerAdapters/featureServiceUtils.js +1 -1
  34. package/views/2d/layers/features/sources/FeatureSource.js +1 -1
  35. package/views/3d/layers/DynamicLayerView3D.js +1 -1
  36. package/views/3d/layers/I3SMeshView3D.js +1 -1
  37. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  38. package/views/3d/layers/SceneLayerView3D.js +1 -1
  39. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  40. package/views/3d/layers/graphics/GraphicsDeconflictor.js +1 -1
  41. package/views/3d/layers/graphics/LabelDeconflictor.js +1 -1
  42. package/views/3d/layers/i3s/I3SQueryEngine.js +1 -1
  43. package/views/3d/layers/i3s/I3SQueryFeatureAdapter.js +1 -1
  44. package/views/3d/layers/i3s/I3SQueryResultGeometry.js +5 -0
  45. package/views/3d/webgl/ManagedFBOResource.js +1 -1
  46. package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
  47. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  48. package/views/interactive/keybindings.js +1 -1
  49. package/webdoc/IPSInfo.js +1 -1
  50. package/webdoc/ips/AppleIPSProperties.d.ts +4 -0
  51. package/webdoc/ips/AppleIPSProperties.js +5 -0
  52. package/webdoc/ips/Configuration.d.ts +4 -0
  53. package/webdoc/ips/Configuration.js +5 -0
  54. package/webdoc/ips/GNSSProperties.d.ts +4 -0
  55. package/webdoc/ips/GNSSProperties.js +5 -0
  56. package/webdoc/ips/PathSnappingProperties.d.ts +4 -0
  57. package/webdoc/ips/PathSnappingProperties.js +5 -0
  58. package/webdoc/ips/SmoothingProperties.d.ts +4 -0
  59. package/webdoc/ips/SmoothingProperties.js +5 -0
  60. package/widgets/Legend/support/sizeRampUtils.js +1 -1
  61. package/widgets/support/Selector2D/SelectionOperation.js +1 -1
  62. package/assets/esri/core/workers/chunks/46104db7f77952bb6c12.js +0 -1
  63. package/assets/esri/core/workers/chunks/47bbfc10c2a3b9e4bdd6.js +0 -1
  64. package/assets/esri/core/workers/chunks/49f0e53b3c9ba8451442.js +0 -1
  65. package/assets/esri/core/workers/chunks/5371df31553626528c69.js +0 -1
  66. package/assets/esri/core/workers/chunks/ad9bcd9dae45cdf90cbb.js +0 -1
  67. package/assets/esri/core/workers/chunks/c28d4717ed588c0d8bf1.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1384],{31384:(e,s,t)=>{t.d(s,{uploadAssets:()=>R});var o=t(78888),r=t(44208),n=t(53966),a=t(74887),i=t(78659),c=t(84952),l=t(13069),u=t(16930),p=t(63579),d=t(55726);const f={upload:{createFromFiles:.8,loadMesh:.2},uploadAssetBlobs:{prepareAssetItems:.9,uploadAssetItems:.1},uploadConvertibleSource:{uploadEditSource:.5,serviceAssetsToGlb:.5},uploadLocalMesh:{meshToAssetBlob:.5,uploadAssetBlobs:.5}};var m=t(60694),g=t(36563),h=t(91869);function w(e,s=e=>{},t){return new y(e,s,t)}class y{constructor(e,s=e=>{},t){if(this.onProgress=s,this.taskName=t,this._progressMap=new Map,this._startTime=void 0,this._timingsMap=new Map,"number"==typeof e){this._weights={};for(let s=0;s<e;s++){const t=s,o=1/e;this._weights[t]=o,this._progressMap.set(t,0)}}else this._weights=e;this.emitProgress()}emitProgress(){let e=0;for(const[s,t]of this._progressMap.entries())e+=t*this._weights[s];if(1===e&&(0,r.A)("enable-feature:esri-3dofl-upload-timings")){const e=Math.round(performance.now()-(this._startTime??0))/1e3;console.log(`${this.taskName} done in ${e} sec`);for(const[s,t]of this._timingsMap){const o=Math.round(t.end-t.start)/1e3,r=Math.round(o/e*100);console.log(this.taskName??"Task",{stepKey:s,stepTime:o,relativeTime:r})}}this.onProgress(e)}setProgress(e,s){if(this._progressMap.set(e,s),(0,r.A)("enable-feature:esri-3dofl-upload-timings")){const t=performance.now();this._startTime??=t;const o=(0,h.tE)(this._timingsMap,e,(()=>({start:t,end:0})));1===s&&(o.end=t)}this.emitProgress()}simulate(e,s){return A((s=>this.setProgress(e,s)),s)}makeOnProgress(e){return s=>this.setProgress(e,s)}}function A(e=e=>{},s=j){const t=performance.now();e(0);const o=setInterval((()=>{const o=performance.now()-t,r=1-Math.exp(-o/s);e(r)}),x);return(0,g.hA)((()=>{clearInterval(o),e(1)}))}function T(e,s=b){return(0,i.gr)((0,i.Kp)(e*P/s))}const b=10,v=10,P=8e-6,x=(0,i.l5)(50),j=(0,i.l5)(1e3),F=1e6,$=20*F,D=2e9,M=3;async function N({data:e,name:s,description:t},r,n){let i=null;try{const u=(0,c.fj)(r,"uploads"),p=(0,c.fj)(u,"info"),{data:d}=await(0,o.A)(p,{query:{f:"json"},responseType:"json"});(0,a.Te)(n);const f=(0,m.Wo)(r),g=d.maxUploadFileSize*F,h=f?D:g,y=f?Math.min($,g):$;if(e.size>h)throw new Error("Data too large");const A=(0,c.fj)(u,"register"),{data:b}=await(0,o.A)(A,{query:{f:"json",itemName:(l=s,l.replaceAll("/","_").replaceAll("\\","_")),description:t},responseType:"json",method:"post"});if((0,a.Te)(n),!b.success)throw new Error("Registration failed");const{itemID:v}=b.item;i=(0,c.fj)(u,v);const P=(0,c.fj)(i,"uploadPart"),x=Math.ceil(e.size/y),j=new Array;for(let s=0;s<x;++s)j.push(e.slice(s*y,Math.min((s+1)*y,e.size)));const N=j.slice().reverse(),S=new Array,E=w(x,n?.onProgress,"uploadItem"),k=async()=>{for(;0!==N.length;){const e=j.length-N.length,s=N.pop(),t=new FormData,r=E.simulate(e,T(s.size));try{t.append("f","json"),t.append("file",s),t.append("partId",`${e}`);const{data:r}=await(0,o.A)(P,{timeout:0,body:t,responseType:"json",method:"post"});if((0,a.Te)(n),!r.success)throw new Error("Part upload failed")}finally{r.remove()}}};for(let e=0;e<M&&0!==N.length;++e)S.push(k());await Promise.all(S);const R=(0,c.fj)(i,"commit"),{data:C}=await(0,o.A)(R,{query:{f:"json",parts:j.map(((e,s)=>s)).join(",")},responseType:"json",method:"post"});if((0,a.Te)(n),!C.success)throw new Error("Commit failed");return C.item}catch(e){if(null!=i){const e=(0,c.fj)(i,"delete");await(0,o.A)(e,{query:{f:"json"},responseType:"json",method:"post"})}throw e}var l}var S=t(20557),E=t(86390),k=t(77793);async function R(e,s,t){const o=e.length;if(!o)return t?.onProgress?.(1),[];const n=w(o,t?.onProgress,"uploadAssets");return Promise.all(e.map(((e,o)=>async function(e,{layer:s,ongoingUploads:t},o){const n=t.get(e);if(n)return n;if(!function(e){return!!e.infoFor3D&&!!e.url}(s))throw new d.Wt;if(function(e,s){const{parsedUrl:t}=s;return null!=t&&e.metadata.externalSources.some((e=>(0,p.eN)(e,t)))}(e,s))return o?.onProgress?.(1),e;const m=async function(e,s,t){const{metadata:o}=e,{displaySource:n}=o,m=C(n?.source,s,{checkForConversionRequired:(0,r.A)("enable-feature:georeferenced-uploads")}),g=null!=m?async function(e,s,t){return{source:{type:"service",assets:await I(e,s,t)},original:!0,unitConversionDisabled:!0}}(m,s,t):o.externalSources.length>0?async function(e,s,t){const o=q(s),{externalSources:n}=e.metadata,a=function(e,s){for(const t of e){const e=C(t.source,s);if(e)return e}return null}(n,s);if(!a)throw new d.xY;const l=w(f.uploadConvertibleSource,t?.onProgress,"uploadConvertibleSource"),m={type:"service",assets:await I(a,s,{onProgress:l.makeOnProgress("uploadEditSource")})};e.addExternalSources([{source:m,original:!0}]);const g=a.reduce(((e,{asset:s})=>s instanceof File?e+s.size:e),0),h=l.simulate("serviceAssetsToGlb",function(e,s=v){return(0,i.gr)((0,i.Kp)(e*P/s))}(g));try{const{source:n,transform:a,origin:i}=await async function({assets:e},s,t){const o=e.map((({assetName:e,parts:s})=>({assetName:e,assetHash:s[0].partHash})));let n;try{const e=(0,c.fj)(s.parsedUrl.path,"convert3D"),r=s.capabilities?.operations.supportsAsyncConvert3D;n=(await(r?Z:Y)(e,{query:{f:"json",assets:JSON.stringify(o),transportType:"esriTransportTypeUrl",targetFormat:t,async:r},responseType:"json",timeout:0})).data}catch(e){throw new d.MT}return function(e,s){const t={source:{type:"service",assets:s.assets.map((s=>{const t=(0,S.R_)(s.contentType,e.infoFor3D.supportedFormats);if(!t)throw new d.H2(t);return new p.Qp(s.assetName,s.contentType,[new p.Bq(s.assetURL,s.assetHash)])}))},origin:void 0,transform:void 0};if((0,r.A)("enable-feature:georeferenced-uploads")&&s.transform){if(t.transform=(0,k.f)(s.transform),s.spatialReference){const e=u.A.fromJSON(s.spatialReference);t.origin=(0,k.V)(s.transform,e)}}else t.transform=(0,E.Z)(e.spatialReference);return t}(s,n)}(m,s,o);return e.transform=a,i&&(e.metadata.georeferenced=!0,t?.useAssetOrigin&&(e.vertexSpace.origin=[i.x,i.y,i.z??0],e.spatialReference=i.spatialReference)),{source:n,unitConversionDisabled:!0}}finally{h.remove()}}(e,s,t):async function(e,s,t){const o=w(f.uploadLocalMesh,t?.onProgress,"uploadLocalMesh"),r=async function(e,s,t){const o=q(s),r=await e.load(t),n=await r.toBinaryGLTF({origin:r.origin,signal:t?.signal,ignoreLocalTransform:!0,unitConversionDisabled:!0});return(0,a.Te)(t),{blob:new Blob([n],{type:"model/gltf-binary"}),assetName:`${(0,l.yS)()}.glb`,assetType:o}}(e,s,{...t,onProgress:o.makeOnProgress("meshToAssetBlob")});return{source:{type:"service",assets:await U([r],s,{...t,onProgress:o.makeOnProgress("uploadAssetBlobs")})},extent:e.extent.clone(),original:!0}}(e,s,t),h=await g;return(0,a.Te)(t),e.addExternalSources([h]),e}(e,s,o);t.set(e,m);try{await m}finally{t.delete(e)}return e}(e,s,{...t,onProgress:n.makeOnProgress(o)}))))}function C(e,{infoFor3D:s},t={}){if(!e)return null;const o=(0,p.WN)(e);if(!o)return null;const{supportedFormats:r,editFormats:n}=s,a=new Array,i=(0,S.ND)(s),c=(0,S.nr)(s);let l=!1;for(const e of o){const s=_(e,r);if(!s)return null;const{assetType:o}=s;if(t.checkForConversionRequired&&(o===i||o===c))return null;n.includes(o)&&(l=!0),a.push(s)}return l?a:null}function _(e,s){const t=(0,p.fH)(e,s);return t?{asset:e,assetType:t}:null}async function I(e,s,t){return U(e.map((e=>async function(e,s){const{asset:t,assetType:o}=e;if(t instanceof File)return{blob:t,assetName:t.name,assetType:o};const r=await t.toBlob(s);return(0,a.Te)(s),{blob:r,assetName:t.assetName,assetType:o}}(e,t))),s,t)}async function U(e,s,t){const o=w(f.uploadAssetBlobs,t?.onProgress,"uploadAssetBlobs"),r=await function(e,s,t){const o=w(e.length,t?.onProgress,"prepareAssetItems");return Promise.all(e.map((async(e,r)=>{const i=async function(e,s,t){const{blob:o,assetType:r,assetName:i}=e;let l=null;try{const e=await N({data:o,name:i},s.url,t);(0,a.Te)(t),l={assetType:r,assetUploadId:e.itemID}}catch(e){(0,a.QP)(e),n.A.getLogger("esri.layers.graphics.sources.support.uploadAssets").warnOnce(`Service ${s.url} does not support the REST Uploads API.`)}if(!l){const e=await(0,c._0)(o);if((0,a.Te)(t),!e.isBase64)throw new d.$1;l={assetType:r,assetData:e.data}}if(!l)throw new d.WF;return{item:l,assetName:i}}(await e,s,{...t,onProgress:o.makeOnProgress(r)});return(0,a.Te)(t),i})))}(e,s,{...t,onProgress:o.makeOnProgress("prepareAssetItems")});(0,a.Te)(t);const i=r.map((({item:e})=>e)),{uploadResults:l}=await B(i,s,{...t,onProgress:o.makeOnProgress("uploadAssetItems")});return(0,a.Te)(t),e.map(((e,t)=>function(e,s,t){const{success:o}=s;if(!o){const{error:t}=s;throw new d.hK(e.assetName,t)}const{assetHash:r}=s,{assetName:n,item:{assetType:a}}=e,{infoFor3D:{supportedFormats:i}}=t,c=(0,S.Fm)(a,i);if(!c)throw new d.H2(a);return new p.Qp(n,c,[new p.Bq(`${t.parsedUrl.path}/assets/${r}`,r)])}(r[t],l[t],s)))}async function B(e,s,t){const r=A(t?.onProgress);try{const r=await(0,o.A)((0,c.fj)(s.parsedUrl.path,"uploadAssets"),{timeout:0,query:{f:"json",assets:JSON.stringify(e)},method:"post",responseType:"json"});if((0,a.Te)(t),r.data.uploadResults.length!==e.length)throw new d.nS(e.length,r.data.uploadResults.length);return r.data}finally{r.remove()}}function Y(e,s){return(0,o.A)(e,s)}async function Z(e,s){const t=(await(0,o.A)(e,s)).data.statusUrl;for(;;){const e=(await(0,o.A)(t,{query:{f:"json"},responseType:"json"})).data;switch(e.status){case"Completed":return(0,o.A)(e.resultUrl,{query:{f:"json"},responseType:"json"});case"CompletedWithErrors":throw new Error(e.status);case"Failed ImportChanges":case"InProgress":case"Pending":case"ExportAttachments":case"ExportChanges":case"ExportingData":case"ExportingSnapshot":case"ImportAttachments":case"ProvisioningReplica":case"UnRegisteringReplica":break;default:throw new Error}await(0,a.Pl)(O)}}function q({infoFor3D:e}){const s=(0,S.U9)(e);if(!s)throw new d.uh;return s}const O=(0,i.l5)(1e3)},55726:(e,s,t)=>{t.d(s,{$1:()=>l,H2:()=>f,MT:()=>m,VP:()=>g,WF:()=>u,Wt:()=>a,XQ:()=>h,hK:()=>d,nS:()=>p,uh:()=>i,xY:()=>c});var o=t(49186);const r="upload-assets",n=()=>new Error;class a extends o.A{constructor(){super(`${r}:unsupported`,"Layer does not support asset uploads.",n())}}class i extends o.A{constructor(){super(`${r}:no-glb-support`,"Layer does not support glb.",n())}}class c extends o.A{constructor(){super(`${r}:no-supported-source`,"No supported external source found",n())}}class l extends o.A{constructor(){super(`${r}:not-base-64`,"Expected gltf data in base64 format after conversion.",n())}}class u extends o.A{constructor(){super(`${r}:unable-to-prepare-options`,"Unable to prepare uploadAsset request options.",n())}}class p extends o.A{constructor(e,s){super(`${r}:bad-response`,`Bad response. Uploaded ${e} items and received ${s} results.`,n())}}class d extends o.A{constructor(e,s){super(`${r}-layer:upload-failed`,`Failed to upload mesh file ${e}. Error code: ${s?.code??"-1"}. Error message: ${s?.messages??"unknown"}`,n())}}class f extends o.A{constructor(e){super(`${r}-layer:unsupported-format`,`The service allowed us to upload an asset of FormatID ${e}, but it does not list it in its supported formats.`,n())}}class m extends o.A{constructor(){super(`${r}:convert3D-failed`,"convert3D failed.")}}class g extends o.A{constructor(){super("invalid-input:no-model","No supported model found")}}class h extends o.A{constructor(){super("invalid-input:multiple-models","Multiple supported models found")}}},77793:(e,s,t)=>{t.d(s,{V:()=>n,f:()=>a});var o=t(86738),r=t(73836);function n(e,s,t=i){return new o.A({x:e[t.originX],y:e[t.originY],z:e[t.originZ],spatialReference:s})}function a(e,s=i){return new r.A({translation:[e[s.translationX],-e[s.translationZ],e[s.translationY]],rotationAxis:[e[s.rotationX],-e[s.rotationZ],e[s.rotationY]],rotationAngle:e[s.rotationDeg],scale:[e[s.scaleX],e[s.scaleZ],e[s.scaleY]]})}const i={originX:"originX",originY:"originY",originZ:"originZ",translationX:"translationX",translationY:"translationY",translationZ:"translationZ",scaleX:"scaleX",scaleY:"scaleY",scaleZ:"scaleZ",rotationX:"rotationX",rotationY:"rotationY",rotationZ:"rotationZ",rotationDeg:"rotationDeg"}},86390:(e,s,t)=>{t.d(s,{Z:()=>n});var o=t(83047),r=t(73836);function n(e){const s=1/(0,o.GA)(e,1);return 1!==s?new r.A({scale:[s,s,s]}):void 0}}}]);
package/core/has.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- let e;function has(a){return"function"==typeof e[a]?e[a]=e[a](globalThis):e[a]}e=globalThis.dojoConfig?.has||globalThis.esriConfig?.has?{...globalThis.dojoConfig?.has,...globalThis.esriConfig?.has}:{},has.add=(a,d,r,o)=>{(o||void 0===e[a])&&(e[a]=d),r&&has(a)},has.cache=e,has.add("big-integer-warning-enabled",!0),has.add("esri-deprecation-warnings",!0),has.add("esri-tests-disable-screenshots",!1),has.add("esri-tests-use-full-window",!1),has.add("esri-tests-post-to-influx",!0),has.add("esri-cim-animations-enable-status","enabled"),has.add("esri-cim-animations-spotlight",!1),has.add("esri-cim-animations-freeze-time",!1),(()=>{has.add("host-webworker",void 0!==globalThis.WorkerGlobalScope&&self instanceof globalThis.WorkerGlobalScope);const e="undefined"!=typeof window&&"undefined"!=typeof location&&"undefined"!=typeof document&&window.location===location&&window.document===document;if(has.add("host-browser",e),has.add("host-node","object"==typeof globalThis.process&&globalThis.process.versions?.node&&globalThis.process.versions.v8),has.add("dom",e),has("host-browser")){const e=navigator,a=e.userAgent,d=e.appVersion,r=parseFloat(d);if(has.add("wp",parseFloat(a.split("Windows Phone")[1])||void 0),has.add("msapp",parseFloat(a.split("MSAppHost/")[1])||void 0),has.add("khtml",d.includes("Konqueror")?r:void 0),has.add("edge",parseFloat(a.split("Edge/")[1])||void 0),has.add("opr",parseFloat(a.split("OPR/")[1])||void 0),has.add("webkit",!has("wp")&&!has("edge")&&parseFloat(a.split("WebKit/")[1])||void 0),has.add("chrome",!has("edge")&&!has("opr")&&parseFloat(a.split("Chrome/")[1])||void 0),has.add("android",!has("wp")&&parseFloat(a.split("Android ")[1])||void 0),has.add("safari",!d.includes("Safari")||has("wp")||has("chrome")||has("android")||has("edge")||has("opr")?void 0:parseFloat(d.split("Version/")[1])),has.add("mac",d.includes("Macintosh")),!has("wp")&&/(iPhone|iPod|iPad)/.test(a)){const e=RegExp.$1.replace(/P/,"p"),d=/OS ([\d_]+)/.test(a)?RegExp.$1:"1",r=parseFloat(d.replace(/_/,".").replaceAll("_",""));has.add(e,r),has.add("ios",r)}has("webkit")||(!a.includes("Gecko")||has("wp")||has("khtml")||has("edge")||has.add("mozilla",r),has("mozilla")&&has.add("ff",parseFloat(a.split("Firefox/")[1]||a.split("Minefield/")[1])||void 0))}})(),(()=>{if(globalThis.navigator){const e=navigator.userAgent,a=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i.test(e),d=/iPhone/i.test(e);a&&has.add("esri-mobile",a),d&&has.add("esri-iPhone",d),has.add("esri-geolocation",!!navigator.geolocation)}has.add("esri-wasm","WebAssembly"in globalThis),has.add("esri-performance-mode-frames-between-render",20),has.add("esri-force-performance-mode",!1),has.add("esri-shared-array-buffer",(()=>{const e="SharedArrayBuffer"in globalThis,a=!1===globalThis.crossOriginIsolated;return e&&!a})),has.add("wasm-simd",(()=>{const e=[0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11];return WebAssembly.validate(new Uint8Array(e))})),has.add("esri-atomics","Atomics"in globalThis),has.add("esri-workers","Worker"in globalThis),has.add("web-feat:cache","caches"in globalThis),has.add("esri-workers-arraybuffer-transfer",!has("safari")||Number(has("safari"))>=12),has.add("workers-pool-size",8),has.add("featurelayer-simplify-thresholds",[.5,.5,.5,.5]),has.add("featurelayer-simplify-payload-size-factors",[1,1,4]),has.add("featurelayer-fast-triangulation-enabled",!0),has.add("featurelayer-animation-enabled",!0),has.add("featurelayer-snapshot-enabled",!0),has.add("featurelayer-snapshot-initial-tolerance",0),has.add("featurelayer-snapshot-point-min-threshold",8e4),has.add("featurelayer-snapshot-point-max-threshold",4e5),has.add("featurelayer-snapshot-multipoint-min-threshold",2e4),has.add("featurelayer-snapshot-multipoint-max-threshold",1e5),has.add("featurelayer-snapshot-polygon-min-threshold",1e3),has.add("featurelayer-snapshot-polygon-max-threshold",2e3),has.add("featurelayer-snapshot-polyline-min-threshold",1e3),has.add("featurelayer-snapshot-polyline-max-threshold",2e3),has.add("featurelayer-snapshot-max-vertex-count",25e4),has.add("featurelayer-snapshot-concurrency",4),has.add("featurelayer-snapshot-coverage",.1),has.add("featurelayer-query-max-depth",4),has.add("featurelayer-query-pausing-enabled",!1),has.add("featurelayer-query-tile-concurrency",4),has.add("featurelayer-query-tile-max-features",6e5),has.add("featurelayer-advanced-symbols",!1),has.add("featurelayer-pbf",!0),has.add("featurelayer-pbf-statistics",!1),has.add("feature-layers-workers",!0),has.add("feature-polyline-generalization-factor",1),has.add("mapview-transitions-duration",200),has.add("mapview-essential-goto-duration",200),has.add("mapview-srswitch-adjust-rotation-scale-threshold",24e6),has.add("mapserver-pbf-version-support",10.81),has.add("mapservice-popup-identify-max-tolerance",20),has.add("request-queue-concurrency-hosted",16),has.add("request-queue-concurrency-non-hosted",4),has.add("curve-densification-coarse-segments",128),has.add("curve-densification-max-segments",2e3),has.add("curve-densification-min-segments",3),has.add("curve-densification-pixel-deviation",.5),has.add("view-readyState-waiting-delay",1e3),has.add("gradient-depth-bias",.01),has.add("gradient-depth-epsilon",1e-8),has.add("enable-feature:esri-compress-textures",!0),has("host-webworker")||has("host-browser")&&(has.add("esri-csp-restrictions",(()=>{try{new Function}catch{return!0}return!1})),has.add("esri-image-decode",(()=>{if("decode"in new Image){const e=new Image;return e.src='data:image/svg+xml;charset=UTF-8,<svg version="1.1" xmlns="http://www.w3.org/2000/svg"></svg>',void e.decode().then((()=>{has.add("esri-image-decode",!0,!0,!0)})).catch((()=>{has.add("esri-image-decode",!1,!0,!0)}))}return!1})),has.add("esri-url-encodes-apostrophe",(()=>{const e=window.document.createElement("a");return e.href="?'",e.href.includes("?%27")})))})();export{has as default};
5
+ let e;function has(a){return"function"==typeof e[a]?e[a]=e[a](globalThis):e[a]}e=globalThis.dojoConfig?.has||globalThis.esriConfig?.has?{...globalThis.dojoConfig?.has,...globalThis.esriConfig?.has}:{},has.add=(a,d,r,o)=>{(o||void 0===e[a])&&(e[a]=d),r&&has(a)},has.cache=e,has.add("big-integer-warning-enabled",!0),has.add("esri-deprecation-warnings",!0),has.add("esri-tests-disable-screenshots",!1),has.add("esri-tests-use-full-window",!1),has.add("esri-tests-post-to-influx",!0),has.add("esri-cim-animations-enable-status","enabled"),has.add("esri-cim-animations-spotlight",!1),has.add("esri-cim-animations-freeze-time",!1),(()=>{has.add("host-webworker",void 0!==globalThis.WorkerGlobalScope&&self instanceof globalThis.WorkerGlobalScope);const e="undefined"!=typeof window&&"undefined"!=typeof location&&"undefined"!=typeof document&&window.location===location&&window.document===document;if(has.add("host-browser",e),has.add("host-node","object"==typeof globalThis.process&&globalThis.process.versions?.node&&globalThis.process.versions.v8),has.add("dom",e),has("host-browser")){const e=navigator,a=e.userAgent,d=e.appVersion,r=parseFloat(d);if(has.add("wp",parseFloat(a.split("Windows Phone")[1])||void 0),has.add("msapp",parseFloat(a.split("MSAppHost/")[1])||void 0),has.add("khtml",d.includes("Konqueror")?r:void 0),has.add("edge",parseFloat(a.split("Edge/")[1])||void 0),has.add("opr",parseFloat(a.split("OPR/")[1])||void 0),has.add("webkit",!has("wp")&&!has("edge")&&parseFloat(a.split("WebKit/")[1])||void 0),has.add("chrome",!has("edge")&&!has("opr")&&parseFloat(a.split("Chrome/")[1])||void 0),has.add("android",!has("wp")&&parseFloat(a.split("Android ")[1])||void 0),has.add("safari",!d.includes("Safari")||has("wp")||has("chrome")||has("android")||has("edge")||has("opr")?void 0:parseFloat(d.split("Version/")[1])),has.add("mac",d.includes("Macintosh")),!has("wp")&&/(iPhone|iPod|iPad)/.test(a)){const e=RegExp.$1.replace(/P/,"p"),d=/OS ([\d_]+)/.test(a)?RegExp.$1:"1",r=parseFloat(d.replace(/_/,".").replaceAll("_",""));has.add(e,r),has.add("ios",r)}has("webkit")||(!a.includes("Gecko")||has("wp")||has("khtml")||has("edge")||has.add("mozilla",r),has("mozilla")&&has.add("ff",parseFloat(a.split("Firefox/")[1]||a.split("Minefield/")[1])||void 0))}})(),(()=>{if(globalThis.navigator){const e=navigator.userAgent,a=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i.test(e),d=/iPhone/i.test(e);a&&has.add("esri-mobile",a),d&&has.add("esri-iPhone",d),has.add("esri-geolocation",!!navigator.geolocation)}has.add("esri-wasm","WebAssembly"in globalThis),has.add("esri-performance-mode-frames-between-render",20),has.add("esri-force-performance-mode",!1),has.add("esri-shared-array-buffer",(()=>{const e="SharedArrayBuffer"in globalThis,a=!1===globalThis.crossOriginIsolated;return e&&!a})),has.add("wasm-simd",(()=>{const e=[0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11];return WebAssembly.validate(new Uint8Array(e))})),has.add("esri-atomics","Atomics"in globalThis),has.add("esri-workers","Worker"in globalThis),has.add("web-feat:cache","caches"in globalThis),has.add("esri-workers-arraybuffer-transfer",!has("safari")||Number(has("safari"))>=12),has.add("workers-pool-size",8),has.add("featurelayer-simplify-thresholds",[.5,.5,.5,.5]),has.add("featurelayer-simplify-payload-size-factors",[1,1,4]),has.add("featurelayer-fast-triangulation-enabled",!0),has.add("featurelayer-animation-enabled",!0),has.add("featurelayer-snapshot-enabled",!0),has.add("featurelayer-snapshot-initial-tolerance",0),has.add("featurelayer-snapshot-point-min-threshold",8e4),has.add("featurelayer-snapshot-point-max-threshold",4e5),has.add("featurelayer-snapshot-multipoint-min-threshold",2e4),has.add("featurelayer-snapshot-multipoint-max-threshold",1e5),has.add("featurelayer-snapshot-polygon-min-threshold",1e3),has.add("featurelayer-snapshot-polygon-max-threshold",2e3),has.add("featurelayer-snapshot-polyline-min-threshold",1e3),has.add("featurelayer-snapshot-polyline-max-threshold",2e3),has.add("featurelayer-snapshot-max-vertex-count",25e4),has.add("featurelayer-snapshot-non-hosted-exceedslimit-enabled",!1),has.add("featurelayer-snapshot-concurrency",4),has.add("featurelayer-snapshot-coverage",.1),has.add("featurelayer-query-max-depth",4),has.add("featurelayer-query-pausing-enabled",!1),has.add("featurelayer-query-tile-concurrency",4),has.add("featurelayer-query-tile-max-features",6e5),has.add("featurelayer-advanced-symbols",!1),has.add("featurelayer-pbf",!0),has.add("featurelayer-pbf-statistics",!1),has.add("feature-layers-workers",!0),has.add("feature-polyline-generalization-factor",1),has.add("mapview-transitions-duration",200),has.add("mapview-essential-goto-duration",200),has.add("mapview-srswitch-adjust-rotation-scale-threshold",24e6),has.add("mapserver-pbf-version-support",10.81),has.add("mapservice-popup-identify-max-tolerance",20),has.add("request-queue-concurrency-hosted",16),has.add("request-queue-concurrency-non-hosted",4),has.add("curve-densification-coarse-segments",128),has.add("curve-densification-max-segments",2e3),has.add("curve-densification-min-segments",3),has.add("curve-densification-pixel-deviation",.5),has.add("view-readyState-waiting-delay",1e3),has.add("gradient-depth-bias",.01),has.add("gradient-depth-epsilon",1e-8),has.add("enable-feature:esri-compress-textures",!0),has("host-webworker")||has("host-browser")&&(has.add("esri-csp-restrictions",(()=>{try{new Function}catch{return!0}return!1})),has.add("esri-image-decode",(()=>{if("decode"in new Image){const e=new Image;return e.src='data:image/svg+xml;charset=UTF-8,<svg version="1.1" xmlns="http://www.w3.org/2000/svg"></svg>',void e.decode().then((()=>{has.add("esri-image-decode",!0,!0,!0)})).catch((()=>{has.add("esri-image-decode",!1,!0,!0)}))}return!1})),has.add("esri-url-encodes-apostrophe",(()=>{const e=window.document.createElement("a");return e.href="?'",e.href.includes("?%27")})))})();export{has as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{decimalAdjust as a}from"../mathUtils.js";import{escapeRegExpString as n}from"../string.js";import{DateOnly as e}from"./DateOnly.js";import{SqlError as t,SqlErrorCodes as r}from"./errorSupport.js";import{sqlCompare as l}from"./sqlCompareUtils.js";import{isDateTime as u,isDateOnly as s,isTimeOnly as m,isTimestampOffset as o,convertToExecutingTimeZone as i,parseTimestamp as c,parseTime as f}from"./sqlDateParsingUtils.js";import{TimeOnly as h}from"./TimeOnly.js";import{isString as P,isDate as w}from"../../support/guards.js";import{DateTime as C}from"luxon";function p(a,n,e){const l=T[a.toLowerCase()];if(null==l)throw new t(r.FunctionNotRecognized);if(n.length<l.minParams||n.length>l.maxParams)throw new t(r.InvalidParameterCount,{name:a.toUpperCase()});return l.evaluate(n,e)}function g(a,n){const e=T[a.toLowerCase()];return null!=e&&n>=e.minParams&&n<=e.maxParams}function M(a){return!w(a)&&(!s(a)&&(!u(a)&&(!m(a)&&!o(a))))}function x(a){return s(a)||m(a)?a.toString():o(a)?a.toSQLValue():u(a)?0===a.millisecond?a.toFormat("yyyy-LL-dd HH:mm:ss"):a.toSQL({includeOffset:!1}):w(a)?x(C.fromJSDate(a)):a.toString()}function E(a){if(w(a))return e.fromDateJS(a);if(u(a))return e.fromParts(a.year,a.month,a.day);if(s(a))return a;if(m(a))throw new t(r.CannotCastValue);if(o(a)){if(null===e.fromParts(a.year,a.month,a.day))throw new t(r.CannotCastValue)}if(P(a)){const n=e.fromReader(a);if(null!==n&&n.isValid)return n}throw new t(r.CannotCastValue)}function v(a,n,e){if(w(a))return i(a,n);if(u(a))return a;if(s(a))return a.toDateTimeLuxon("unknown");if(m(a))throw new t(r.CannotCastValue);if(o(a))return a;if(P(a))return c(a,"unknown",e);throw new t(r.CannotCastValue)}function N(a){if(w(a))return h.fromDateJS(a);if(u(a))return h.fromDateTime(a);if(s(a))throw new t(r.CannotCastValue);if(m(a))return a;if(o(a))return h.fromSqlTimeStampOffset(a);if(P(a))return f(a);throw new t(r.CannotCastValue)}const T={extract:{minParams:2,maxParams:2,evaluate:([a,n])=>{if(null==n)return null;if(w(n))switch(a.toUpperCase()){case"SECOND":return n.getSeconds();case"MINUTE":return n.getMinutes();case"HOUR":return n.getHours();case"DAY":return n.getDate();case"MONTH":return n.getMonth()+1;case"YEAR":return n.getFullYear();case"TIMEZONE_HOUR":case"TIMEZONE_MINUTE":return 0}else if(u(n))switch(a.toUpperCase()){case"SECOND":return n.second;case"MINUTE":return n.minute;case"HOUR":return n.hour;case"DAY":return n.day;case"MONTH":return n.month;case"YEAR":return n.year;case"TIMEZONE_HOUR":case"TIMEZONE_MINUTE":throw new t(r.InvalidFunctionParameters,{function:"EXTRACT"})}else if(s(n))switch(a.toUpperCase()){case"DAY":return n.day;case"MONTH":return n.month;case"YEAR":return n.year;case"TIMEZONE_HOUR":case"TIMEZONE_MINUTE":throw new t(r.InvalidFunctionParameters,{function:"EXTRACT"})}else if(m(n))switch(a.toUpperCase()){case"SECOND":return n.second;case"MINUTE":return n.minute;case"HOUR":return n.hour}else if(o(n))switch(a.toUpperCase()){case"SECOND":return n.second;case"MINUTE":return n.minute;case"HOUR":return n.hour;case"DAY":return n.day;case"MONTH":return n.month;case"YEAR":return n.year;case"TIMEZONE_HOUR":return n.timezoneOffsetHour;case"TIMEZONE_MINUTE":return n.timezoneOffsetMinutes}throw new t(r.InvalidFunctionParameters,{function:"EXTRACT"})}},substring:{minParams:2,maxParams:3,evaluate:a=>{if(2===a.length){const[n,e]=a;return null==n||null==e?null:n.toString().substring(e-1)}if(3===a.length){const[n,e,t]=a;return null==n||null==e||null==t?null:t<=0?"":n.toString().substring(e-1,e+t-1)}}},position:{minParams:2,maxParams:2,evaluate:([a,n])=>null==a||null==n?null:n.indexOf(a)+1},trim:{minParams:2,maxParams:3,evaluate:a=>{const e=3===a.length,l=e?a[1]:" ",u=e?a[2]:a[1];if(null==l||null==u)return null;const s=`(${n(l)})`;switch(a[0]){case"BOTH":return u.replaceAll(new RegExp(`^${s}*|${s}*$`,"g"),"");case"LEADING":return u.replaceAll(new RegExp(`^${s}*`,"g"),"");case"TRAILING":return u.replaceAll(new RegExp(`${s}*$`,"g"),"")}throw new t(r.InvalidFunctionParameters,{function:"TRIM"})}},abs:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:Math.abs(a[0])},ceiling:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:Math.ceil(a[0])},floor:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:Math.floor(a[0])},log:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:Math.log(a[0])},log10:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:Math.log(a[0])*Math.LOG10E},sin:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:Math.sin(a[0])},cos:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:Math.cos(a[0])},tan:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:Math.tan(a[0])},asin:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:Math.asin(a[0])},acos:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:Math.acos(a[0])},atan:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:Math.atan(a[0])},sign:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:a[0]>0?1:a[0]<0?-1:0},power:{minParams:2,maxParams:2,evaluate:a=>null==a[0]||null==a[1]?null:a[0]**a[1]},mod:{minParams:2,maxParams:2,evaluate:a=>null==a[0]||null==a[1]?null:a[0]%a[1]},round:{minParams:1,maxParams:2,evaluate:a=>{const n=a[0],e=2===a.length?10**a[1]:1;return null==n?null:Math.round(n*e)/e}},truncate:{minParams:1,maxParams:2,evaluate:n=>null==n[0]?null:1===n.length||0===n[1]?Math.trunc(n[0]):a("trunc",n[0],-Number(n[1]))},char_length:{minParams:1,maxParams:1,evaluate:a=>P(a[0])?a[0].length:0},concat:{minParams:1,maxParams:1/0,evaluate:a=>{let n="";for(let e=0;e<a.length;e++){if(null==a[e])return null;n+=a[e].toString()}return n}},lower:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:a[0].toString().toLowerCase()},upper:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:a[0].toString().toUpperCase()},coalesce:{minParams:1,maxParams:1/0,evaluate:a=>{for(const n of a)if(null!==n)return n;return null}},cosh:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:Math.cosh(a[0])},sinh:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:Math.sinh(a[0])},tanh:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:Math.tanh(a[0])},nullif:{minParams:2,maxParams:2,evaluate:a=>l(a[0],a[1],"=")?null:a[0]},cast:{minParams:2,maxParams:2,evaluate:(a,n)=>{const e=a[0],l=a[1];if(null===e)return null;switch(l.type){case"integer":{if(!M(e))throw new t(r.CannotCastValue);const a=parseInt(e,10);if(isNaN(a))throw new t(r.CannotCastValue);return a}case"smallint":{if(!M(e))throw new t(r.CannotCastValue);const a=parseInt(e,10);if(isNaN(a))throw new t(r.CannotCastValue);if(a>32767||a<-32767)throw new t(r.CannotCastValue);return a}case"float":case"real":{if(!M(e))throw new t(r.CannotCastValue);const a=parseFloat(e);if(isNaN(a))throw new t(r.CannotCastValue);return a}case"time":return N(e);case"date":return E(e);case"timestamp":return v(e,n,!0===l.withtimezone);case"varchar":{const a=x(e);if(a.length>l.size)throw new t(r.CannotCastValue);return a}default:throw new t(r.InvalidDataType)}}}};export{p as evaluateFunction,g as isStandardized};
5
+ import{decimalAdjust as a}from"../mathUtils.js";import{escapeRegExpString as e}from"../string.js";import{DateOnly as n}from"./DateOnly.js";import{SqlError as t,SqlErrorCodes as r}from"./errorSupport.js";import{sqlCompare as l}from"./sqlCompareUtils.js";import{isDateTime as u,isDateOnly as s,isTimeOnly as m,isTimestampOffset as o,convertToExecutingTimeZone as i,parseTimestamp as c,parseTime as f}from"./sqlDateParsingUtils.js";import{TimeOnly as h}from"./TimeOnly.js";import{isString as w,isDate as P}from"../../support/guards.js";import{DateTime as C}from"luxon";function E(a,e,n){const l=v[a.toLowerCase()];if(null==l)throw new t(r.FunctionNotRecognized);if(e.length<l.minParams||e.length>l.maxParams)throw new t(r.InvalidParameterCount,{name:a.toUpperCase()});return l.evaluate(e,n)}function p(a,e){const n=v[a.toLowerCase()];return null!=n&&e>=n.minParams&&e<=n.maxParams}function g(a){return!P(a)&&(!s(a)&&(!u(a)&&(!m(a)&&!o(a))))}function M(a){return s(a)||m(a)?a.toString():o(a)?a.toSQLValue():u(a)?0===a.millisecond?a.toFormat("yyyy-LL-dd HH:mm:ss"):a.toSQL({includeOffset:!1}):P(a)?M(C.fromJSDate(a)):a.toString()}function O(a){if(P(a))return n.fromDateJS(a);if(u(a))return n.fromParts(a.year,a.month,a.day);if(s(a))return a;if(m(a))throw new t(r.CannotCastValue);if(o(a)){if(null===n.fromParts(a.year,a.month,a.day))throw new t(r.CannotCastValue)}if(w(a)){const e=n.fromReader(a);if(null!==e&&e.isValid)return e}throw new t(r.CannotCastValue)}function x(a,e,n){if(P(a))return i(a,e);if(u(a))return a;if(s(a))return a.toDateTimeLuxon("unknown");if(m(a))throw new t(r.CannotCastValue);if(o(a))return a;if(w(a))return c(a,"unknown",n);throw new t(r.CannotCastValue)}function T(a){if(P(a))return h.fromDateJS(a);if(u(a))return h.fromDateTime(a);if(s(a))throw new t(r.CannotCastValue);if(m(a))return a;if(o(a))return h.fromSqlTimeStampOffset(a);if(w(a))return f(a);throw new t(r.CannotCastValue)}const v={extract:{minParams:2,maxParams:2,evaluate:([a,e])=>{if(null==e)return null;if(P(e))switch(a.toUpperCase()){case"SECOND":return e.getSeconds();case"MINUTE":return e.getMinutes();case"HOUR":return e.getHours();case"DAY":return e.getDate();case"MONTH":return e.getMonth()+1;case"YEAR":return e.getFullYear();case"TIMEZONE_HOUR":case"TIMEZONE_MINUTE":return 0;case"DOW":return C.fromJSDate(e,{zone:"system"}).weekday;case"DOY":return C.fromJSDate(e,{zone:"system"}).ordinal;case"WEEK":return C.fromJSDate(e,{zone:"system"}).weekNumber}else if(u(e))switch(a.toUpperCase()){case"SECOND":return e.second;case"MINUTE":return e.minute;case"HOUR":return e.hour;case"DAY":return e.day;case"MONTH":return e.month;case"YEAR":return e.year;case"TIMEZONE_HOUR":case"TIMEZONE_MINUTE":throw new t(r.InvalidFunctionParameters,{function:"EXTRACT"});case"DOW":return e.weekday;case"DOY":return e.ordinal;case"WEEK":return e.weekNumber}else if(s(e))switch(a.toUpperCase()){case"DAY":return e.day;case"MONTH":return e.month;case"YEAR":return e.year;case"TIMEZONE_HOUR":case"TIMEZONE_MINUTE":throw new t(r.InvalidFunctionParameters,{function:"EXTRACT"});case"DOW":return e.toDateTime("unknown").weekday;case"DOY":return e.toDateTime("unknown").ordinal;case"WEEK":return e.toDateTime("unknown").weekNumber}else if(m(e))switch(a.toUpperCase()){case"SECOND":return e.second;case"MINUTE":return e.minute;case"HOUR":return e.hour}else if(o(e))switch(a.toUpperCase()){case"SECOND":return e.second;case"MINUTE":return e.minute;case"HOUR":return e.hour;case"DAY":return e.day;case"MONTH":return e.month;case"YEAR":return e.year;case"TIMEZONE_HOUR":return e.timezoneOffsetHour;case"TIMEZONE_MINUTE":return e.timezoneOffsetMinutes;case"DOW":return e.toDateTime().weekday;case"DOY":return e.toDateTime().ordinal;case"WEEK":return e.toDateTime().weekNumber}throw new t(r.InvalidFunctionParameters,{function:"EXTRACT"})}},substring:{minParams:2,maxParams:3,evaluate:a=>{if(2===a.length){const[e,n]=a;return null==e||null==n?null:e.toString().substring(n-1)}if(3===a.length){const[e,n,t]=a;return null==e||null==n||null==t?null:t<=0?"":e.toString().substring(n-1,n+t-1)}}},position:{minParams:2,maxParams:2,evaluate:([a,e])=>null==a||null==e?null:e.indexOf(a)+1},trim:{minParams:2,maxParams:3,evaluate:a=>{const n=3===a.length,l=n?a[1]:" ",u=n?a[2]:a[1];if(null==l||null==u)return null;const s=`(${e(l)})`;switch(a[0]){case"BOTH":return u.replaceAll(new RegExp(`^${s}*|${s}*$`,"g"),"");case"LEADING":return u.replaceAll(new RegExp(`^${s}*`,"g"),"");case"TRAILING":return u.replaceAll(new RegExp(`${s}*$`,"g"),"")}throw new t(r.InvalidFunctionParameters,{function:"TRIM"})}},abs:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:Math.abs(a[0])},ceiling:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:Math.ceil(a[0])},floor:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:Math.floor(a[0])},log:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:Math.log(a[0])},log10:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:Math.log(a[0])*Math.LOG10E},sin:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:Math.sin(a[0])},cos:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:Math.cos(a[0])},tan:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:Math.tan(a[0])},asin:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:Math.asin(a[0])},acos:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:Math.acos(a[0])},atan:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:Math.atan(a[0])},sign:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:a[0]>0?1:a[0]<0?-1:0},power:{minParams:2,maxParams:2,evaluate:a=>null==a[0]||null==a[1]?null:a[0]**a[1]},mod:{minParams:2,maxParams:2,evaluate:a=>null==a[0]||null==a[1]?null:a[0]%a[1]},round:{minParams:1,maxParams:2,evaluate:a=>{const e=a[0],n=2===a.length?10**a[1]:1;return null==e?null:Math.round(e*n)/n}},truncate:{minParams:1,maxParams:2,evaluate:e=>null==e[0]?null:1===e.length||0===e[1]?Math.trunc(e[0]):a("trunc",e[0],-Number(e[1]))},char_length:{minParams:1,maxParams:1,evaluate:a=>w(a[0])?a[0].length:0},concat:{minParams:1,maxParams:1/0,evaluate:a=>{let e="";for(let n=0;n<a.length;n++){if(null==a[n])return null;e+=a[n].toString()}return e}},lower:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:a[0].toString().toLowerCase()},upper:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:a[0].toString().toUpperCase()},coalesce:{minParams:1,maxParams:1/0,evaluate:a=>{for(const e of a)if(null!==e)return e;return null}},cosh:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:Math.cosh(a[0])},sinh:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:Math.sinh(a[0])},tanh:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:Math.tanh(a[0])},nullif:{minParams:2,maxParams:2,evaluate:a=>l(a[0],a[1],"=")?null:a[0]},cast:{minParams:2,maxParams:2,evaluate:(a,e)=>{const n=a[0],l=a[1];if(null===n)return null;switch(l.type){case"integer":{if(!g(n))throw new t(r.CannotCastValue);const a=parseInt(n,10);if(isNaN(a))throw new t(r.CannotCastValue);return a}case"smallint":{if(!g(n))throw new t(r.CannotCastValue);const a=parseInt(n,10);if(isNaN(a))throw new t(r.CannotCastValue);if(a>32767||a<-32767)throw new t(r.CannotCastValue);return a}case"float":case"real":{if(!g(n))throw new t(r.CannotCastValue);const a=parseFloat(n);if(isNaN(a))throw new t(r.CannotCastValue);return a}case"time":return T(n);case"date":return O(n);case"timestamp":return x(n,e,!0===l.withtimezone);case"varchar":{const a=M(n);if(a.length>l.size)throw new t(r.CannotCastValue);return a}default:throw new t(r.InvalidDataType)}}}};export{E as evaluateFunction,p as isStandardized};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- class t extends SyntaxError{constructor(t,n,e,r){super(t),this.expected=n,this.found=e,this.location=r,this.name="SyntaxError"}format(t){let n="Error: "+this.message;if(this.location){let e=null;const r=t.find((t=>t.source===this.location.source));r&&(e=r.text.split(/\r\n|\n|\r/g));const o=this.location.start,u=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(o):o,i=this.location.source+":"+u.line+":"+u.column;if(e){const t=this.location.end,r="".padEnd(u.line.toString().length," "),c=e[o.line-1],l=(o.line===t.line?t.column:c.length+1)-o.column||1;n+="\n --\x3e "+i+"\n"+r+" |\n"+u.line+" | "+c+"\n"+r+" | "+"".padEnd(o.column-1," ")+"".padEnd(l,"^")}else n+="\n at "+i}return n}static buildMessage(t,n){function e(t){return t.codePointAt(0).toString(16).toUpperCase()}const r=Object.prototype.hasOwnProperty.call(RegExp.prototype,"unicode")?new RegExp("[\\p{C}\\p{Mn}\\p{Mc}]","gu"):null;function o(t){return r?t.replace(r,(t=>"\\u{"+e(t)+"}")):t}function u(t){return o(t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(t=>"\\x0"+e(t))).replace(/[\x10-\x1F\x7F-\x9F]/g,(t=>"\\x"+e(t))))}function i(t){return o(t.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,(t=>"\\x0"+e(t))).replace(/[\x10-\x1F\x7F-\x9F]/g,(t=>"\\x"+e(t))))}const c={literal:t=>'"'+u(t.text)+'"',class(t){const n=t.parts.map((t=>Array.isArray(t)?i(t[0])+"-"+i(t[1]):i(t)));return"["+(t.inverted?"^":"")+n.join("")+"]"+(t.unicode?"u":"")},any:()=>"any character",end:()=>"end of input",other:t=>t.description};function l(t){return c[t.type](t)}function a(t){const n=t.map(l);if(n.sort(),n.length>0){let t=1;for(let e=1;e<n.length;e++)n[e-1]!==n[e]&&(n[t]=n[e],t++);n.length=t}switch(n.length){case 1:return n[0];case 2:return n[0]+" or "+n[1];default:return n.slice(0,-1).join(", ")+", or "+n[n.length-1]}}function s(t){return t?'"'+u(t)+'"':"end of input"}return"Expected "+a(t)+" but "+s(n)+" found."}}function n(n,e){const r={},o=(e=void 0!==e?e:{}).grammarSource,u={start:iu};let i=iu;const c="!",l="=",a=">=",s=">",f="<=",p="<>",d="!=",v="||",y="@",h="'",g="N'",E="''",m=".",A="null",C="true",b="false",L="in",T="is",w="like",x="escape",N="not",R="and",I="or",O="between",F="from",S="for",M="substring",$="extract",U="trim",_="position",D="timestamp",H="date",P="time",Z="leading",j="trailing",z="both",k="cast",G="as",B="integer",q="int",V="smallint",W="float",Y="real",K="varchar",X="to",J="interval",Q="year",tt="timezone_hour",nt="timezone_minute",et="month",rt="day",ot="hour",ut="minute",it="second",ct="case",lt="end",at="when",st="then",ft="else",pt=",",dt="(",vt=")",yt="`",ht=/^[<-=]/,gt=/^[+\-]/,Et=/^[*\/]/,mt=/^[A-Za-z_\x80-\uFFFF]/,At=/^[A-Za-z0-9_]/,Ct=/^[A-Za-z0-9_.\x80-\uFFFF]/,bt=/^["]/,Lt=/^[^']/,Tt=/^[0-9]/,wt=/^[eE]/,xt=/^[ \t\n\r]/,Nt=/^[^`]/,Rt=Jo("!",!1),It=Jo("=",!1),Ot=Jo(">=",!1),Ft=Jo(">",!1),St=Jo("<=",!1),Mt=Jo("<>",!1),$t=Qo([["<","="]],!1,!1,!1),Ut=Jo("!=",!1),_t=Qo(["+","-"],!1,!1,!1),Dt=Jo("||",!1),Ht=Qo(["*","/"],!1,!1,!1),Pt=Qo([["A","Z"],["a","z"],"_",["€","￿"]],!1,!1,!1),Zt=Qo([["A","Z"],["a","z"],["0","9"],"_"],!1,!1,!1),jt=Qo([["A","Z"],["a","z"],["0","9"],"_",".",["€","￿"]],!1,!1,!1),zt=Qo(['"'],!1,!1,!1),kt=Jo("@",!1),Gt=Jo("'",!1),Bt=Jo("N'",!1),qt=Jo("''",!1),Vt=Qo(["'"],!0,!1,!1),Wt=Jo(".",!1),Yt=Qo([["0","9"]],!1,!1,!1),Kt=Qo(["e","E"],!1,!1,!1),Xt=Jo("NULL",!0),Jt=Jo("TRUE",!0),Qt=Jo("FALSE",!0),tn=Jo("IN",!0),nn=Jo("IS",!0),en=Jo("LIKE",!0),rn=Jo("ESCAPE",!0),on=Jo("NOT",!0),un=Jo("AND",!0),cn=Jo("OR",!0),ln=Jo("BETWEEN",!0),an=Jo("FROM",!0),sn=Jo("FOR",!0),fn=Jo("SUBSTRING",!0),pn=Jo("EXTRACT",!0),dn=Jo("TRIM",!0),vn=Jo("POSITION",!0),yn=Jo("TIMESTAMP",!0),hn=Jo("DATE",!0),gn=Jo("TIME",!0),En=Jo("LEADING",!0),mn=Jo("TRAILING",!0),An=Jo("BOTH",!0),Cn=Jo("CAST",!0),bn=Jo("AS",!0),Ln=Jo("INTEGER",!0),Tn=Jo("INT",!0),wn=Jo("SMALLINT",!0),xn=Jo("FLOAT",!0),Nn=Jo("REAL",!0),Rn=Jo("VARCHAR",!0),In=Jo("TO",!0),On=Jo("INTERVAL",!0),Fn=Jo("YEAR",!0),Sn=Jo("TIMEZONE_HOUR",!0),Mn=Jo("TIMEZONE_MINUTE",!0),$n=Jo("MONTH",!0),Un=Jo("DAY",!0),_n=Jo("HOUR",!0),Dn=Jo("MINUTE",!0),Hn=Jo("SECOND",!0),Pn=Jo("CASE",!0),Zn=Jo("END",!0),jn=Jo("WHEN",!0),zn=Jo("THEN",!0),kn=Jo("ELSE",!0),Gn=Jo(",",!1),Bn=Jo("(",!1),qn=Jo(")",!1),Vn=Qo([" ","\t","\n","\r"],!1,!1,!1),Wn=Jo("`",!1),Yn=Qo(["`"],!0,!1,!1);function Kn(t){return t}function Xn(t){return{type:"expression-list",location:Yo(),value:t}}function Jn(t,n,e){return{op:n,expr:e,location:Yo()}}function Qn(t,n){return xc(t,n)}function te(t,n,e){return{op:n,expr:e,location:Yo()}}function ne(t,n){return xc(t,n)}function ee(t){return Lc("NOT",t,Yo())}function re(t,n){if(""==n||null==n||null==n)return t;return"arithmetic"==n.type?xc(t,n.tail):Tc(n.op,t,n.right,n.escape,Yo())}function oe(t,n){return{op:t,expr:n,location:Yo()}}function ue(t){return{type:"arithmetic",tail:t}}function ie(t,n){return{op:t+"NOT",right:n}}function ce(t,n){return{op:t,right:n}}function le(t,n,e){return wc(Yo(),n,e)}function ae(t,n){return{op:"NOT"+t,right:n}}function se(t,n,e){return wc(Yo(),n,e)}function fe(t,n){return{op:t,right:n}}function pe(t){return t[0]+" "+t[2]}function de(t){return t[0]+" "+t[2]}function ve(t,n,e){return{op:t,right:n,escape:e.value}}function ye(t,n){return{op:t,right:n,escape:""}}function he(t,n){return{op:t,right:n}}function ge(t,n){return{op:t,right:n}}function Ee(t,n,e){return{op:n,expr:e,location:Yo()}}function me(t,n){return xc(t,n)}function Ae(t,n,e){return{op:n,expr:e,location:Yo()}}function Ce(t,n){return xc(t,n)}function be(t){return t.paren=!0,t}function Le(t){return/^CURRENT_DATE$/i.test(t)?{type:"current-time",location:Yo(),mode:"date"}:/^CURRENT_TIMESTAMP$/i.test(t)?{type:"current-time",location:Yo(),mode:"timestamp"}:/^CURRENT_TIME$/i.test(t)?{type:"current-time",location:Yo(),mode:"time"}:/^CURRENT_USER$/i.test(t)?{type:"current-user",location:Yo()}:{type:"column-reference",location:Yo(),table:"",column:t}}function Te(t){return{type:"column-reference",location:Yo(),table:"",column:t,delimited:!0}}function we(t){return t}function xe(t,n){return t+n.join("")}function Ne(t,n){return t+n.join("")}function Re(t){return t}function Ie(t){return t.join("")}function Oe(){return'"'}function Fe(t){return{type:"parameter",location:Yo(),value:t[1]}}function Se(t,n){return wc(Yo(),t,n)}function Me(t,n){return wc(Yo(),t,n)}function $e(t){return{type:"function",location:Yo(),name:"extract",args:t}}function Ue(t,n,e){return wc(Yo(),t,n,...e?[e]:[])}function _e(t,n,e){return wc(Yo(),t,n,e)}function De(t){return{type:"function",location:Yo(),name:"substring",args:t}}function He(t,n){return wc(Yo(),t,n)}function Pe(t,n){return wc(Yo(),t,n)}function Ze(t){return{type:"function",location:Yo(),name:"cast",args:t}}function je(){return{type:"data-type",location:Yo(),value:{type:"integer"}}}function ze(){return{type:"data-type",location:Yo(),value:{type:"smallint"}}}function ke(){return{type:"data-type",location:Yo(),value:{type:"float"}}}function Ge(){return{type:"data-type",location:Yo(),value:{type:"real"}}}function Be(){return{type:"data-type",location:Yo(),value:{type:"date"}}}function qe(){return{type:"data-type",location:Yo(),value:{type:"timestamp"}}}function Ve(){return{type:"data-type",location:Yo(),value:{type:"time"}}}function We(t){return{type:"data-type",location:Yo(),value:{type:"varchar",size:parseInt(t)}}}function Ye(t,n,e){return wc(Yo(),t,n,e)}function Ke(t,n){return wc(Yo(),t,n)}function Xe(t){return{type:"function",location:Yo(),name:"trim",args:t}}function Je(t){return{type:"string",location:Yo(),value:t??"BOTH"}}function Qe(t,n){return wc(Yo(),t,n)}function tr(t,n){return wc(Yo(),t,n)}function nr(t){return{type:"function",location:Yo(),name:"position",args:t}}function er(t,n){return{type:"function",location:Yo(),name:t,args:n}}function rr(t){return{type:"string",location:Yo(),value:t}}function or(t){return"string"===t.type&&Nc(t.value),{type:"timestamp",location:Yo(),value:t.value}}function ur(t){return"string"===t.type&&Rc(t.value),{type:"time",location:Yo(),value:t.value}}function ir(t,n,e){return{type:"interval",location:Yo(),value:n,qualifier:e,op:t}}function cr(t,n){return{type:"interval",location:Yo(),value:t,qualifier:n,op:""}}function lr(t,n){return{type:"interval-qualifier",location:Yo(),start:t,end:n}}function ar(t,n){return{type:"interval-period",location:Yo(),period:t.value,precision:n,secondary:null}}function sr(t){return{type:"interval-period",location:Yo(),period:t.value,precision:null,secondary:null}}function fr(t){return{type:"interval-period",location:Yo(),period:t.value,precision:null,secondary:null}}function pr(t,n){return{type:"interval-period",location:Yo(),period:"second",precision:t,secondary:n}}function dr(t){return{type:"interval-period",location:Yo(),period:"second",precision:t,secondary:null}}function vr(){return{type:"interval-period",location:Yo(),period:"second",precision:null,secondary:null}}function yr(t,n){return{type:"interval-period",location:Yo(),period:t.value,precision:n,secondary:null}}function hr(t){return{type:"interval-period",location:Yo(),period:t.value,precision:null,secondary:null}}function gr(t,n){return{type:"interval-period",location:Yo(),period:"second",precision:t,secondary:n}}function Er(t){return{type:"interval-period",location:Yo(),period:"second",precision:t,secondary:null}}function mr(){return{type:"interval-period",location:Yo(),period:"second",precision:null,secondary:null}}function Ar(){return{type:"string",location:Yo(),value:"day"}}function Cr(){return{type:"string",location:Yo(),value:"hour"}}function br(){return{type:"string",location:Yo(),value:"minute"}}function Lr(){return{type:"string",location:Yo(),value:"month"}}function Tr(){return{type:"string",location:Yo(),value:"year"}}function wr(t){return parseFloat(t)}function xr(t){return parseFloat(t)}function Nr(t){return"string"===t.type&&Ic(t.value),{type:"date",location:Yo(),value:t.value}}function Rr(){return{type:"null",location:Yo(),value:null}}function Ir(){return{type:"boolean",location:Yo(),value:!0}}function Or(){return{type:"boolean",location:Yo(),value:!1}}function Fr(){return"'"}function Sr(t){return{type:"string",location:Yo(),value:t.join("")}}function Mr(t,n){return{type:"case-expression",location:Yo(),format:"simple",operand:t,clauses:n,else:null,elseLocation:null}}function $r(t,n,e){return{type:"case-expression",location:Yo(),format:"simple",operand:t,clauses:n,else:e.value,elseLocation:e.location}}function Ur(t){return{type:"case-expression",location:Yo(),format:"searched",clauses:t,else:null,elseLocation:null}}function _r(t,n){return{type:"case-expression",location:Yo(),format:"searched",clauses:t,else:n.value,elseLocation:n.location}}function Dr(t,n){return{type:"when-clause",location:Yo(),operand:t,value:n}}function Hr(t,n){return{type:"when-clause",location:Yo(),operand:t,value:n}}function Pr(t){return{type:"else-clause",location:Yo(),value:t}}function Zr(t){return{type:"number",location:Yo(),value:t}}function jr(t,n,e){return parseFloat(t+n+e)}function zr(t,n){return parseFloat(t+n)}function kr(t,n){return parseFloat(t+n)}function Gr(t){return parseFloat(t)}function Br(t,n){return t[0]+n}function qr(t){return"."+(null!=t?t:"")}function Vr(t,n){return t+n}function Wr(t){return t.join("")}function Yr(t,n){return"e"+(null===n?"":n)}function Kr(){return"IN"}function Xr(){return"IS"}function Jr(){return"LIKE"}function Qr(){return"ESCAPE"}function to(){return"NOT"}function no(){return"AND"}function eo(){return"OR"}function ro(){return"BETWEEN"}function oo(){return"FROM"}function uo(){return"FOR"}function io(){return"SUBSTRING"}function co(){return"EXTRACT"}function lo(){return"TRIM"}function ao(){return"POSITION"}function so(){return"TIMESTAMP"}function fo(){return"DATE"}function po(){return"TIME"}function vo(){return"LEADING"}function yo(){return"TRAILING"}function ho(){return"BOTH"}function go(){return"CAST"}function Eo(){return"AS"}function mo(){return"INTEGER"}function Ao(){return"INT"}function Co(){return"SMALLINT"}function bo(){return"FLOAT"}function Lo(){return"REAL"}function To(){return"VARCHAR"}function wo(){return"TO"}function xo(){return"INTERVAL"}function No(){return"YEAR"}function Ro(){return"TIMEZONE_HOUR"}function Io(){return"TIMEZONE_MINUTE"}function Oo(){return"MONTH"}function Fo(){return"DAY"}function So(){return"HOUR"}function Mo(){return"MINUTE"}function $o(){return"SECOND"}function Uo(){return"CASE"}function _o(){return"END"}function Do(){return"WHEN"}function Ho(){return"THEN"}function Po(){return"ELSE"}function Zo(t){return t}function jo(t){return t.join("")}let zo=0|e.peg$currPos,ko=zo;const Go=[{line:1,column:1}];let Bo,qo=zo,Vo=e.peg$maxFailExpected||[],Wo=0|e.peg$silentFails;if(e.startRule){if(!(e.startRule in u))throw new Error("Can't start parsing from rule \""+e.startRule+'".');i=u[e.startRule]}function Yo(){return eu(ko,zo)}function Ko(t,n){throw ou(t,n=void 0!==n?n:eu(ko,zo))}function Xo(t=zo){const e=n.codePointAt(t);return void 0===e?"":String.fromCodePoint(e)}function Jo(t,n){return{type:"literal",text:t,ignoreCase:n}}function Qo(t,n,e,r){return{type:"class",parts:t,inverted:n,ignoreCase:e,unicode:r}}function tu(){return{type:"end"}}function nu(t){let e,r=Go[t];if(r)return r;if(t>=Go.length)e=Go.length-1;else for(e=t;!Go[--e];);for(r=Go[e],r={line:r.line,column:r.column};e<t;)10===n.charCodeAt(e)?(r.line++,r.column=1):r.column++,e++;return Go[t]=r,r}function eu(t,n,e){const r=nu(t),u=nu(n);return{source:o,start:{offset:t,line:r.line,column:r.column},end:{offset:n,line:u.line,column:u.column}}}function ru(t){zo<qo||(zo>qo&&(qo=zo,Vo=[]),Vo.push(t))}function ou(n,e){return new t(n,null,null,e)}function uu(n,e,r){return new t(t.buildMessage(n,e),n,e,r)}function iu(){let t,n;return t=zo,Ac(),n=lu(),n!==r?(Ac(),ko=t,t=Kn(n)):(zo=t,t=r),t}function cu(){let t,n,e,o,u,i,c,l;if(t=zo,n=Ec(),n!==r){for(Ac(),e=[],o=lu();o!==r;)e.push(o),o=zo,u=zo,i=Ac(),c=gc(),c!==r?(l=Ac(),i=[i,c,l],u=i):(zo=u,u=r),u!==r?(u=lu(),u===r?(zo=o,o=r):o=u):o=u;o=Ac(),u=mc(),u!==r?(ko=t,t=Xn(e)):(zo=t,t=r)}else zo=t,t=r;return t}function lu(){let t,n,e,o,u,i;if(t=zo,n=au(),n!==r){for(e=[],o=zo,Ac(),u=$i(),u!==r?(Ac(),i=au(),i!==r?(ko=o,o=Jn(n,u,i)):(zo=o,o=r)):(zo=o,o=r);o!==r;)e.push(o),o=zo,Ac(),u=$i(),u!==r?(Ac(),i=au(),i!==r?(ko=o,o=Jn(n,u,i)):(zo=o,o=r)):(zo=o,o=r);ko=t,t=Qn(n,e)}else zo=t,t=r;return t}function au(){let t,n,e,o,u,i;if(t=zo,n=su(),n!==r){for(e=[],o=zo,Ac(),u=Mi(),u!==r?(Ac(),i=su(),i!==r?(ko=o,o=te(n,u,i)):(zo=o,o=r)):(zo=o,o=r);o!==r;)e.push(o),o=zo,Ac(),u=Mi(),u!==r?(Ac(),i=su(),i!==r?(ko=o,o=te(n,u,i)):(zo=o,o=r)):(zo=o,o=r);ko=t,t=ne(n,e)}else zo=t,t=r;return t}function su(){let t,e,o,u,i;return t=zo,e=Si(),e===r&&(e=zo,33===n.charCodeAt(zo)?(o=c,zo++):(o=r,0===Wo&&ru(Rt)),o!==r?(u=zo,Wo++,61===n.charCodeAt(zo)?(i=l,zo++):(i=r,0===Wo&&ru(It)),Wo--,i===r?u=void 0:(zo=u,u=r),u!==r?(o=[o,u],e=o):(zo=e,e=r)):(zo=e,e=r)),e!==r?(o=Ac(),u=su(),u!==r?(ko=t,t=ee(u)):(zo=t,t=r)):(zo=t,t=r),t===r&&(t=fu()),t}function fu(){let t,n,e,o;return t=zo,n=Cu(),n!==r?(e=zo,Ac(),o=pu(),o!==r?e=o:(zo=e,e=r),e===r&&(e=null),ko=t,t=re(n,e)):(zo=t,t=r),t}function pu(){let t;return t=du(),t===r&&(t=Au(),t===r&&(t=hu(),t===r&&(t=yu(),t===r&&(t=mu())))),t}function du(){let t,n,e,o,u;if(t=zo,n=[],e=zo,Ac(),o=vu(),o!==r?(Ac(),u=Cu(),u!==r?(ko=e,e=oe(o,u)):(zo=e,e=r)):(zo=e,e=r),e!==r)for(;e!==r;)n.push(e),e=zo,Ac(),o=vu(),o!==r?(Ac(),u=Cu(),u!==r?(ko=e,e=oe(o,u)):(zo=e,e=r)):(zo=e,e=r);else n=r;return n!==r&&(ko=t,n=ue(n)),t=n,t}function vu(){let t;return n.substr(zo,2)===a?(t=a,zo+=2):(t=r,0===Wo&&ru(Ot)),t===r&&(62===n.charCodeAt(zo)?(t=s,zo++):(t=r,0===Wo&&ru(Ft)),t===r&&(n.substr(zo,2)===f?(t=f,zo+=2):(t=r,0===Wo&&ru(St)),t===r&&(n.substr(zo,2)===p?(t=p,zo+=2):(t=r,0===Wo&&ru(Mt)),t===r&&(t=n.charAt(zo),ht.test(t)?zo++:(t=r,0===Wo&&ru($t)),t===r&&(n.substr(zo,2)===d?(t=d,zo+=2):(t=r,0===Wo&&ru(Ut))))))),t}function yu(){let t,n,e,o;return t=zo,n=Ii(),n!==r?(Ac(),e=Si(),e!==r?(Ac(),o=Cu(),o!==r?(ko=t,t=ie(n,o)):(zo=t,t=r)):(zo=t,t=r)):(zo=t,t=r),t===r&&(t=zo,n=Ii(),n!==r?(Ac(),e=Cu(),e!==r?(ko=t,t=ce(n,e)):(zo=t,t=r)):(zo=t,t=r)),t}function hu(){let t,n,e,o,u,i,c,l;return t=zo,n=Si(),n!==r?(Ac(),e=Ui(),e!==r?(o=Ac(),u=zo,i=Cu(),i!==r?(Ac(),c=Mi(),c!==r?(Ac(),l=Cu(),l!==r?(ko=u,u=le(e,i,l)):(zo=u,u=r)):(zo=u,u=r)):(zo=u,u=r),u!==r?(ko=t,t=ae(e,u)):(zo=t,t=r)):(zo=t,t=r)):(zo=t,t=r),t===r&&(t=zo,n=Ui(),n!==r?(Ac(),e=zo,o=Cu(),o!==r?(u=Ac(),i=Mi(),i!==r?(Ac(),c=Cu(),c!==r?(ko=e,e=se(n,o,c)):(zo=e,e=r)):(zo=e,e=r)):(zo=e,e=r),e!==r?(ko=t,t=fe(n,e)):(zo=t,t=r)):(zo=t,t=r)),t}function gu(){let t,n,e,o,u;return t=zo,n=zo,e=Si(),e!==r?(o=Ac(),u=Oi(),u!==r?(e=[e,o,u],n=e):(zo=n,n=r)):(zo=n,n=r),n!==r&&(ko=t,n=pe(n)),t=n,t===r&&(t=Oi()),t}function Eu(){let t,n,e,o,u;return t=zo,n=zo,e=Si(),e!==r?(o=Ac(),u=Ri(),u!==r?(e=[e,o,u],n=e):(zo=n,n=r)):(zo=n,n=r),n!==r&&(ko=t,n=de(n)),t=n,t===r&&(t=Ri()),t}function mu(){let t,n,e,o,u;return t=zo,n=gu(),n!==r?(Ac(),e=ai(),e!==r?(Ac(),o=Fi(),o!==r?(Ac(),u=si(),u!==r?(ko=t,t=ve(n,e,u)):(zo=t,t=r)):(zo=t,t=r)):(zo=t,t=r)):(zo=t,t=r),t===r&&(t=zo,n=gu(),n!==r?(Ac(),e=ai(),e!==r?(ko=t,t=ye(n,e)):(zo=t,t=r)):(zo=t,t=r)),t}function Au(){let t,n,e;return t=zo,n=Eu(),n!==r?(Ac(),e=cu(),e!==r?(ko=t,t=he(n,e)):(zo=t,t=r)):(zo=t,t=r),t===r&&(t=zo,n=Eu(),n!==r?(Ac(),e=Pu(),e!==r?(ko=t,t=ge(n,e)):(zo=t,t=r)):(zo=t,t=r)),t}function Cu(){let t,n,e,o,u,i;if(t=zo,n=Lu(),n!==r){for(e=[],o=zo,Ac(),u=bu(),u!==r?(Ac(),i=Lu(),i!==r?(ko=o,o=Ee(n,u,i)):(zo=o,o=r)):(zo=o,o=r);o!==r;)e.push(o),o=zo,Ac(),u=bu(),u!==r?(Ac(),i=Lu(),i!==r?(ko=o,o=Ee(n,u,i)):(zo=o,o=r)):(zo=o,o=r);ko=t,t=me(n,e)}else zo=t,t=r;return t}function bu(){let t;return t=n.charAt(zo),gt.test(t)?zo++:(t=r,0===Wo&&ru(_t)),t===r&&(n.substr(zo,2)===v?(t=v,zo+=2):(t=r,0===Wo&&ru(Dt))),t}function Lu(){let t,n,e,o,u,i;if(t=zo,n=wu(),n!==r){for(e=[],o=zo,Ac(),u=Tu(),u!==r?(Ac(),i=wu(),i!==r?(ko=o,o=Ae(n,u,i)):(zo=o,o=r)):(zo=o,o=r);o!==r;)e.push(o),o=zo,Ac(),u=Tu(),u!==r?(Ac(),i=wu(),i!==r?(ko=o,o=Ae(n,u,i)):(zo=o,o=r)):(zo=o,o=r);ko=t,t=Ce(n,e)}else zo=t,t=r;return t}function Tu(){let t;return t=n.charAt(zo),Et.test(t)?zo++:(t=r,0===Wo&&ru(Ht)),t}function wu(){let t,n,e,o;return t=Yu(),t===r&&(t=Zu(),t===r&&(t=ju(),t===r&&(t=Gu(),t===r&&(t=qu(),t===r&&(t=zu(),t===r&&(t=Vu(),t===r&&(t=fi(),t===r&&(t=xu(),t===r&&(t=Pu(),t===r&&(t=zo,n=Ec(),n!==r?(Ac(),e=lu(),e!==r?(Ac(),o=mc(),o!==r?(ko=t,t=be(e)):(zo=t,t=r)):(zo=t,t=r)):(zo=t,t=r))))))))))),t}function xu(){let t,n;return t=zo,n=Nu(),n!==r&&(ko=t,n=Le(n)),t=n,t===r&&(t=zo,n=Mu(),n!==r&&(ko=t,n=Te(n)),t=n),t}function Nu(){let t,n;return t=zo,n=Ru(),n!==r&&(ko=t,n=we(n)),t=n,t}function Ru(){let t,n,e,o;if(t=zo,n=Ou(),n!==r){for(e=[],o=Su();o!==r;)e.push(o),o=Su();ko=t,t=xe(n,e)}else zo=t,t=r;return t}function Iu(){let t,n,e,o;if(t=zo,n=Ou(),n!==r){for(e=[],o=Fu();o!==r;)e.push(o),o=Fu();ko=t,t=Ne(n,e)}else zo=t,t=r;return t}function Ou(){let t;return t=n.charAt(zo),mt.test(t)?zo++:(t=r,0===Wo&&ru(Pt)),t}function Fu(){let t;return t=n.charAt(zo),At.test(t)?zo++:(t=r,0===Wo&&ru(Zt)),t}function Su(){let t;return t=n.charAt(zo),Ct.test(t)?zo++:(t=r,0===Wo&&ru(jt)),t}function Mu(){let t,n,e,o;return t=zo,n=Hu(),n!==r?(e=$u(),o=Hu(),o!==r?(ko=t,t=Re(e)):(zo=t,t=r)):(zo=t,t=r),t}function $u(){let t,n,e;for(t=zo,n=[],e=Uu();e!==r;)n.push(e),e=Uu();return ko=t,n=Ie(n),t=n,t}function Uu(){let t;return t=Du(),t===r&&(t=_u()),t}function _u(){let t,n,e;return t=zo,n=Hu(),n!==r?(e=Hu(),e!==r?(ko=t,t=Oe()):(zo=t,t=r)):(zo=t,t=r),t}function Du(){let t;return t=n.charAt(zo),Ct.test(t)?zo++:(t=r,0===Wo&&ru(jt)),t}function Hu(){let t;return t=n.charAt(zo),bt.test(t)?zo++:(t=r,0===Wo&&ru(zt)),t}function Pu(){let t,e,o,u;return t=zo,e=zo,64===n.charCodeAt(zo)?(o=y,zo++):(o=r,0===Wo&&ru(kt)),o!==r?(u=Iu(),u!==r?(o=[o,u],e=o):(zo=e,e=r)):(zo=e,e=r),e!==r&&(ko=t,e=Fe(e)),t=e,t}function Zu(){let t,n,e,o,u,i,c,l;return t=zo,n=Pi(),n!==r?(Ac(),e=zo,o=Ec(),o!==r?(Ac(),u=Wu(),u!==r?(Ac(),i=_i(),i!==r?(Ac(),c=lu(),c!==r?(Ac(),l=mc(),l!==r?(ko=e,e=Se(u,c)):(zo=e,e=r)):(zo=e,e=r)):(zo=e,e=r)):(zo=e,e=r)):(zo=e,e=r),e===r&&(e=zo,o=Ec(),o!==r?(Ac(),u=Wu(),u!==r?(Ac(),i=gc(),i!==r?(Ac(),c=lu(),c!==r?(Ac(),l=mc(),l!==r?(ko=e,e=Me(u,c)):(zo=e,e=r)):(zo=e,e=r)):(zo=e,e=r)):(zo=e,e=r)):(zo=e,e=r)),e!==r?(ko=t,t=$e(e)):(zo=t,t=r)):(zo=t,t=r),t}function ju(){let t,n,e,o,u,i,c,l,a,s,f;return t=zo,n=Hi(),n!==r?(Ac(),e=zo,o=Ec(),o!==r?(Ac(),u=lu(),u!==r?(Ac(),i=_i(),i!==r?(Ac(),c=lu(),c!==r?(Ac(),l=zo,a=Di(),a!==r?(s=Ac(),f=lu(),f!==r?(Ac(),l=f):(zo=l,l=r)):(zo=l,l=r),l===r&&(l=null),a=mc(),a!==r?(ko=e,e=Ue(u,c,l)):(zo=e,e=r)):(zo=e,e=r)):(zo=e,e=r)):(zo=e,e=r)):(zo=e,e=r),e===r&&(e=zo,o=Ec(),o!==r?(Ac(),u=lu(),u!==r?(Ac(),i=gc(),i!==r?(Ac(),c=lu(),c!==r?(Ac(),l=gc(),l!==r?(a=Ac(),s=lu(),s!==r?(f=mc(),f!==r?(ko=e,e=_e(u,c,s)):(zo=e,e=r)):(zo=e,e=r)):(zo=e,e=r)):(zo=e,e=r)):(zo=e,e=r)):(zo=e,e=r)):(zo=e,e=r)),e!==r?(ko=t,t=De(e)):(zo=t,t=r)):(zo=t,t=r),t}function zu(){let t,n,e,o,u,i,c,l;return t=zo,n=Wi(),n!==r?(Ac(),e=zo,o=Ec(),o!==r?(Ac(),u=lu(),u!==r?(Ac(),i=Yi(),i!==r?(Ac(),c=ku(),c!==r?(Ac(),l=mc(),l!==r?(ko=e,e=He(u,c)):(zo=e,e=r)):(zo=e,e=r)):(zo=e,e=r)):(zo=e,e=r)):(zo=e,e=r),e===r&&(e=zo,o=Ec(),o!==r?(Ac(),u=lu(),u!==r?(Ac(),i=gc(),i!==r?(Ac(),c=ku(),c!==r?(Ac(),l=mc(),l!==r?(ko=e,e=Pe(u,c)):(zo=e,e=r)):(zo=e,e=r)):(zo=e,e=r)):(zo=e,e=r)):(zo=e,e=r)),e!==r?(ko=t,t=Ze(e)):(zo=t,t=r)):(zo=t,t=r),t}function ku(){let t,n,e,o,u;return t=zo,n=Ki(),n===r&&(n=Xi()),n!==r&&(ko=t,n=je()),t=n,t===r&&(t=zo,n=Ji(),n!==r&&(ko=t,n=ze()),t=n,t===r&&(t=zo,n=Qi(),n!==r&&(ko=t,n=ke()),t=n,t===r&&(t=zo,n=tc(),n!==r&&(ko=t,n=Ge()),t=n,t===r&&(t=zo,n=ki(),n!==r&&(ko=t,n=Be()),t=n,t===r&&(t=zo,n=zi(),n!==r&&(ko=t,n=qe()),t=n,t===r&&(t=zo,n=Gi(),n!==r&&(ko=t,n=Ve()),t=n,t===r&&(t=zo,n=nc(),n!==r?(Ac(),e=Ec(),e!==r?(Ac(),o=bi(),o!==r?(Ac(),u=mc(),u!==r?(ko=t,t=We(o)):(zo=t,t=r)):(zo=t,t=r)):(zo=t,t=r)):(zo=t,t=r)))))))),t}function Gu(){let t,n,e,o,u,i,c,l,a;return t=zo,n=Zi(),n!==r?(Ac(),e=zo,o=Ec(),o!==r?(Ac(),u=Bu(),Ac(),i=lu(),i!==r?(Ac(),c=_i(),c!==r?(Ac(),l=lu(),l!==r?(Ac(),a=mc(),a!==r?(ko=e,e=Ye(u,i,l)):(zo=e,e=r)):(zo=e,e=r)):(zo=e,e=r)):(zo=e,e=r)):(zo=e,e=r),e===r&&(e=zo,o=Ec(),o!==r?(Ac(),u=Bu(),Ac(),i=lu(),i!==r?(Ac(),c=mc(),c!==r?(ko=e,e=Ke(u,i)):(zo=e,e=r)):(zo=e,e=r)):(zo=e,e=r)),e!==r?(ko=t,t=Xe(e)):(zo=t,t=r)):(zo=t,t=r),t}function Bu(){let t,n;return t=zo,n=Bi(),n===r&&(n=qi(),n===r&&(n=Vi())),n===r&&(n=null),ko=t,n=Je(n),t=n,t}function qu(){let t,n,e,o,u,i,c,l;return t=zo,n=ji(),n!==r?(Ac(),e=zo,o=Ec(),o!==r?(Ac(),u=lu(),u!==r?(Ac(),i=Ri(),i!==r?(Ac(),c=lu(),c!==r?(Ac(),l=mc(),l!==r?(ko=e,e=Qe(u,c)):(zo=e,e=r)):(zo=e,e=r)):(zo=e,e=r)):(zo=e,e=r)):(zo=e,e=r),e===r&&(e=zo,o=Ec(),o!==r?(Ac(),u=lu(),u!==r?(Ac(),i=gc(),i!==r?(Ac(),c=lu(),c!==r?(Ac(),l=mc(),l!==r?(ko=e,e=tr(u,c)):(zo=e,e=r)):(zo=e,e=r)):(zo=e,e=r)):(zo=e,e=r)):(zo=e,e=r)),e!==r?(ko=t,t=nr(e)):(zo=t,t=r)):(zo=t,t=r),t}function Vu(){let t,n,e,o;return t=zo,n=zo,Wo++,e=Pi(),Wo--,e===r?n=void 0:(zo=n,n=r),n!==r?(e=bc(),e!==r?(Ac(),o=cu(),o!==r?(ko=t,t=er(e,o)):(zo=t,t=r)):(zo=t,t=r)):(zo=t,t=r),t}function Wu(){let t,n;return t=zo,n=oc(),n===r&&(n=cc(),n===r&&(n=lc(),n===r&&(n=ac(),n===r&&(n=sc(),n===r&&(n=fc(),n===r&&(n=uc(),n===r&&(n=ic()))))))),n!==r&&(ko=t,n=rr(n)),t=n,t}function Yu(){let t;return t=si(),t===r&&(t=gi(),t===r&&(t=li(),t===r&&(t=ci(),t===r&&(t=ii(),t===r&&(t=Ku(),t===r&&(t=Ju(),t===r&&(t=Xu()))))))),t}function Ku(){let t,n,e;return t=zo,n=zi(),n!==r?(Ac(),e=ai(),e!==r?(ko=t,t=or(e)):(zo=t,t=r)):(zo=t,t=r),t}function Xu(){let t,n,e;return t=zo,n=Gi(),n!==r?(Ac(),e=ai(),e!==r?(ko=t,t=ur(e)):(zo=t,t=r)):(zo=t,t=r),t}function Ju(){let t,e,o,u,i;return t=zo,e=rc(),e!==r?(Ac(),o=n.charAt(zo),gt.test(o)?zo++:(o=r,0===Wo&&ru(_t)),o!==r?(Ac(),u=ai(),u!==r?(Ac(),i=Qu(),i!==r?(ko=t,t=ir(o,u,i)):(zo=t,t=r)):(zo=t,t=r)):(zo=t,t=r)):(zo=t,t=r),t===r&&(t=zo,e=rc(),e!==r?(Ac(),o=ai(),o!==r?(Ac(),u=Qu(),u!==r?(ko=t,t=cr(o,u)):(zo=t,t=r)):(zo=t,t=r)):(zo=t,t=r)),t}function Qu(){let t,n,e,o;return t=zo,n=ti(),n!==r?(Ac(),e=ec(),e!==r?(Ac(),o=ni(),o!==r?(ko=t,t=lr(n,o)):(zo=t,t=r)):(zo=t,t=r)):(zo=t,t=r),t===r&&(t=ei()),t}function ti(){let t,n,e,o,u;return t=zo,n=ri(),n!==r?(Ac(),e=Ec(),e!==r?(Ac(),o=ui(),o!==r?(Ac(),u=mc(),u!==r?(ko=t,t=ar(n,o)):(zo=t,t=r)):(zo=t,t=r)):(zo=t,t=r)):(zo=t,t=r),t===r&&(t=zo,n=ri(),n!==r&&(ko=t,n=sr(n)),t=n),t}function ni(){let t,n,e,o,u,i,c;return t=zo,n=ri(),n!==r&&(ko=t,n=fr(n)),t=n,t===r&&(t=zo,n=fc(),n!==r?(Ac(),e=Ec(),e!==r?(Ac(),o=ui(),o!==r?(Ac(),u=gc(),u!==r?(Ac(),i=oi(),i!==r?(Ac(),c=mc(),c!==r?(ko=t,t=pr(o,i)):(zo=t,t=r)):(zo=t,t=r)):(zo=t,t=r)):(zo=t,t=r)):(zo=t,t=r)):(zo=t,t=r),t===r&&(t=zo,n=fc(),n!==r?(Ac(),e=Ec(),e!==r?(Ac(),o=ui(),o!==r?(Ac(),u=mc(),u!==r?(ko=t,t=dr(o)):(zo=t,t=r)):(zo=t,t=r)):(zo=t,t=r)):(zo=t,t=r),t===r&&(t=zo,n=fc(),n!==r&&(ko=t,n=vr()),t=n))),t}function ei(){let t,n,e,o,u,i,c;return t=zo,n=ri(),n!==r?(Ac(),e=Ec(),e!==r?(Ac(),o=oi(),o!==r?(Ac(),u=mc(),u!==r?(ko=t,t=yr(n,o)):(zo=t,t=r)):(zo=t,t=r)):(zo=t,t=r)):(zo=t,t=r),t===r&&(t=zo,n=ri(),n!==r&&(ko=t,n=hr(n)),t=n,t===r&&(t=zo,n=fc(),n!==r?(Ac(),e=Ec(),e!==r?(Ac(),o=ui(),o!==r?(Ac(),u=gc(),u!==r?(Ac(),i=oi(),i!==r?(Ac(),c=mc(),c!==r?(ko=t,t=gr(o,i)):(zo=t,t=r)):(zo=t,t=r)):(zo=t,t=r)):(zo=t,t=r)):(zo=t,t=r)):(zo=t,t=r),t===r&&(t=zo,n=fc(),n!==r?(Ac(),e=Ec(),e!==r?(Ac(),o=oi(),o!==r?(Ac(),u=mc(),u!==r?(ko=t,t=Er(o)):(zo=t,t=r)):(zo=t,t=r)):(zo=t,t=r)):(zo=t,t=r),t===r&&(t=zo,n=fc(),n!==r&&(ko=t,n=mr()),t=n)))),t}function ri(){let t,n;return t=zo,n=lc(),n!==r&&(ko=t,n=Ar()),t=n,t===r&&(t=zo,n=ac(),n!==r&&(ko=t,n=Cr()),t=n,t===r&&(t=zo,n=sc(),n!==r&&(ko=t,n=br()),t=n,t===r&&(t=zo,n=cc(),n!==r&&(ko=t,n=Lr()),t=n,t===r&&(t=zo,n=oc(),n!==r&&(ko=t,n=Tr()),t=n)))),t}function oi(){let t,n;return t=zo,n=bi(),n!==r&&(ko=t,n=wr(n)),t=n,t}function ui(){let t,n;return t=zo,n=bi(),n!==r&&(ko=t,n=xr(n)),t=n,t}function ii(){let t,n,e;return t=zo,n=ki(),n!==r?(Ac(),e=ai(),e!==r?(ko=t,t=Nr(e)):(zo=t,t=r)):(zo=t,t=r),t}function ci(){let t,n;return t=zo,n=wi(),n!==r&&(ko=t,n=Rr()),t=n,t}function li(){let t,n;return t=zo,n=xi(),n!==r&&(ko=t,n=Ir()),t=n,t===r&&(t=zo,n=Ni(),n!==r&&(ko=t,n=Or()),t=n),t}function ai(){let t;return t=si(),t===r&&(t=Pu()),t}function si(){let t,e,o,u,i;if(t=zo,39===n.charCodeAt(zo)?(e=h,zo++):(e=r,0===Wo&&ru(Gt)),e===r&&(n.substr(zo,2)===g?(e=g,zo+=2):(e=r,0===Wo&&ru(Bt))),e!==r){for(o=[],u=zo,n.substr(zo,2)===E?(i=E,zo+=2):(i=r,0===Wo&&ru(qt)),i!==r&&(ko=u,i=Fr()),u=i,u===r&&(u=n.charAt(zo),Lt.test(u)?zo++:(u=r,0===Wo&&ru(Vt)));u!==r;)o.push(u),u=zo,n.substr(zo,2)===E?(i=E,zo+=2):(i=r,0===Wo&&ru(qt)),i!==r&&(ko=u,i=Fr()),u=i,u===r&&(u=n.charAt(zo),Lt.test(u)?zo++:(u=r,0===Wo&&ru(Vt)));39===n.charCodeAt(zo)?(u=h,zo++):(u=r,0===Wo&&ru(Gt)),u!==r?(ko=t,t=Sr(o)):(zo=t,t=r)}else zo=t,t=r;return t}function fi(){let t;return t=pi(),t===r&&(t=di()),t}function pi(){let t,n,e,o,u,i,c;if(t=zo,n=pc(),n!==r)if(Ac(),e=lu(),e!==r){for(Ac(),o=[],u=zo,i=yi(),i!==r?(c=Ac(),u=i):(zo=u,u=r);u!==r;)o.push(u),u=zo,i=yi(),i!==r?(c=Ac(),u=i):(zo=u,u=r);u=dc(),u!==r?(ko=t,t=Mr(e,o)):(zo=t,t=r)}else zo=t,t=r;else zo=t,t=r;if(t===r)if(t=zo,n=pc(),n!==r)if(Ac(),e=lu(),e!==r){for(Ac(),o=[],u=zo,i=yi(),i!==r?(c=Ac(),u=i):(zo=u,u=r);u!==r;)o.push(u),u=zo,i=yi(),i!==r?(c=Ac(),u=i):(zo=u,u=r);u=hi(),u!==r?(i=Ac(),c=dc(),c!==r?(ko=t,t=$r(e,o,u)):(zo=t,t=r)):(zo=t,t=r)}else zo=t,t=r;else zo=t,t=r;return t}function di(){let t,n,e,o,u,i;if(t=zo,n=pc(),n!==r){for(Ac(),e=[],o=zo,u=vi(),u!==r?(i=Ac(),o=u):(zo=o,o=r);o!==r;)e.push(o),o=zo,u=vi(),u!==r?(i=Ac(),o=u):(zo=o,o=r);o=dc(),o!==r?(ko=t,t=Ur(e)):(zo=t,t=r)}else zo=t,t=r;if(t===r)if(t=zo,n=pc(),n!==r){for(Ac(),e=[],o=zo,u=vi(),u!==r?(i=Ac(),o=u):(zo=o,o=r);o!==r;)e.push(o),o=zo,u=vi(),u!==r?(i=Ac(),o=u):(zo=o,o=r);o=hi(),o!==r?(u=Ac(),i=dc(),i!==r?(ko=t,t=_r(e,o)):(zo=t,t=r)):(zo=t,t=r)}else zo=t,t=r;return t}function vi(){let t,n,e,o,u;return t=zo,n=vc(),n!==r?(Ac(),e=lu(),e!==r?(Ac(),o=yc(),o!==r?(Ac(),u=lu(),u!==r?(ko=t,t=Dr(e,u)):(zo=t,t=r)):(zo=t,t=r)):(zo=t,t=r)):(zo=t,t=r),t}function yi(){let t,n,e,o,u;return t=zo,n=vc(),n!==r?(Ac(),e=lu(),e!==r?(Ac(),o=yc(),o!==r?(Ac(),u=lu(),u!==r?(ko=t,t=Hr(e,u)):(zo=t,t=r)):(zo=t,t=r)):(zo=t,t=r)):(zo=t,t=r),t}function hi(){let t,n,e;return t=zo,n=hc(),n!==r?(Ac(),e=lu(),e!==r?(ko=t,t=Pr(e)):(zo=t,t=r)):(zo=t,t=r),t}function gi(){let t,n,e,o;return t=zo,n=Ei(),n!==r?(e=zo,Wo++,o=Ou(),Wo--,o===r?e=void 0:(zo=e,e=r),e!==r?(ko=t,t=Zr(n)):(zo=t,t=r)):(zo=t,t=r),t}function Ei(){let t,n,e,o;return t=zo,n=mi(),n!==r?(e=Ai(),e!==r?(o=Ci(),o!==r?(ko=t,t=jr(n,e,o)):(zo=t,t=r)):(zo=t,t=r)):(zo=t,t=r),t===r&&(t=zo,n=mi(),n!==r?(e=Ai(),e!==r?(ko=t,t=zr(n,e)):(zo=t,t=r)):(zo=t,t=r),t===r&&(t=zo,n=mi(),n!==r?(e=Ci(),e!==r?(ko=t,t=kr(n,e)):(zo=t,t=r)):(zo=t,t=r),t===r&&(t=zo,n=mi(),n!==r&&(ko=t,n=Gr(n)),t=n))),t}function mi(){let t,e,o;return t=bi(),t===r&&(t=zo,e=n.charAt(zo),gt.test(e)?zo++:(e=r,0===Wo&&ru(_t)),e!==r?(o=bi(),o!==r?(ko=t,t=Br(e,o)):(zo=t,t=r)):(zo=t,t=r)),t}function Ai(){let t,e,o;return t=zo,46===n.charCodeAt(zo)?(e=m,zo++):(e=r,0===Wo&&ru(Wt)),e!==r?(o=bi(),o===r&&(o=null),ko=t,t=qr(o)):(zo=t,t=r),t}function Ci(){let t,n,e;return t=zo,n=Ti(),n!==r?(e=bi(),e!==r?(ko=t,t=Vr(n,e)):(zo=t,t=r)):(zo=t,t=r),t}function bi(){let t,n,e;if(t=zo,n=[],e=Li(),e!==r)for(;e!==r;)n.push(e),e=Li();else n=r;return n!==r&&(ko=t,n=Wr(n)),t=n,t}function Li(){let t;return t=n.charAt(zo),Tt.test(t)?zo++:(t=r,0===Wo&&ru(Yt)),t}function Ti(){let t,e,o;return t=zo,e=n.charAt(zo),wt.test(e)?zo++:(e=r,0===Wo&&ru(Kt)),e!==r?(o=n.charAt(zo),gt.test(o)?zo++:(o=r,0===Wo&&ru(_t)),o===r&&(o=null),ko=t,t=Yr(e,o)):(zo=t,t=r),t}function wi(){let t,e,o,u;return t=zo,e=n.substr(zo,4),e.toLowerCase()===A?zo+=4:(e=r,0===Wo&&ru(Xt)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(e=[e,o],t=e):(zo=t,t=r)):(zo=t,t=r),t}function xi(){let t,e,o,u;return t=zo,e=n.substr(zo,4),e.toLowerCase()===C?zo+=4:(e=r,0===Wo&&ru(Jt)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(e=[e,o],t=e):(zo=t,t=r)):(zo=t,t=r),t}function Ni(){let t,e,o,u;return t=zo,e=n.substr(zo,5),e.toLowerCase()===b?zo+=5:(e=r,0===Wo&&ru(Qt)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(e=[e,o],t=e):(zo=t,t=r)):(zo=t,t=r),t}function Ri(){let t,e,o,u;return t=zo,e=n.substr(zo,2),e.toLowerCase()===L?zo+=2:(e=r,0===Wo&&ru(tn)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=Kr()):(zo=t,t=r)):(zo=t,t=r),t}function Ii(){let t,e,o,u;return t=zo,e=n.substr(zo,2),e.toLowerCase()===T?zo+=2:(e=r,0===Wo&&ru(nn)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=Xr()):(zo=t,t=r)):(zo=t,t=r),t}function Oi(){let t,e,o,u;return t=zo,e=n.substr(zo,4),e.toLowerCase()===w?zo+=4:(e=r,0===Wo&&ru(en)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=Jr()):(zo=t,t=r)):(zo=t,t=r),t}function Fi(){let t,e,o,u;return t=zo,e=n.substr(zo,6),e.toLowerCase()===x?zo+=6:(e=r,0===Wo&&ru(rn)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=Qr()):(zo=t,t=r)):(zo=t,t=r),t}function Si(){let t,e,o,u;return t=zo,e=n.substr(zo,3),e.toLowerCase()===N?zo+=3:(e=r,0===Wo&&ru(on)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=to()):(zo=t,t=r)):(zo=t,t=r),t}function Mi(){let t,e,o,u;return t=zo,e=n.substr(zo,3),e.toLowerCase()===R?zo+=3:(e=r,0===Wo&&ru(un)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=no()):(zo=t,t=r)):(zo=t,t=r),t}function $i(){let t,e,o,u;return t=zo,e=n.substr(zo,2),e.toLowerCase()===I?zo+=2:(e=r,0===Wo&&ru(cn)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=eo()):(zo=t,t=r)):(zo=t,t=r),t}function Ui(){let t,e,o,u;return t=zo,e=n.substr(zo,7),e.toLowerCase()===O?zo+=7:(e=r,0===Wo&&ru(ln)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=ro()):(zo=t,t=r)):(zo=t,t=r),t}function _i(){let t,e,o,u;return t=zo,e=n.substr(zo,4),e.toLowerCase()===F?zo+=4:(e=r,0===Wo&&ru(an)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=oo()):(zo=t,t=r)):(zo=t,t=r),t}function Di(){let t,e,o,u;return t=zo,e=n.substr(zo,3),e.toLowerCase()===S?zo+=3:(e=r,0===Wo&&ru(sn)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=uo()):(zo=t,t=r)):(zo=t,t=r),t}function Hi(){let t,e,o,u;return t=zo,e=n.substr(zo,9),e.toLowerCase()===M?zo+=9:(e=r,0===Wo&&ru(fn)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=io()):(zo=t,t=r)):(zo=t,t=r),t}function Pi(){let t,e,o,u;return t=zo,e=n.substr(zo,7),e.toLowerCase()===$?zo+=7:(e=r,0===Wo&&ru(pn)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=co()):(zo=t,t=r)):(zo=t,t=r),t}function Zi(){let t,e,o,u;return t=zo,e=n.substr(zo,4),e.toLowerCase()===U?zo+=4:(e=r,0===Wo&&ru(dn)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=lo()):(zo=t,t=r)):(zo=t,t=r),t}function ji(){let t,e,o,u;return t=zo,e=n.substr(zo,8),e.toLowerCase()===_?zo+=8:(e=r,0===Wo&&ru(vn)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=ao()):(zo=t,t=r)):(zo=t,t=r),t}function zi(){let t,e,o,u;return t=zo,e=n.substr(zo,9),e.toLowerCase()===D?zo+=9:(e=r,0===Wo&&ru(yn)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=so()):(zo=t,t=r)):(zo=t,t=r),t}function ki(){let t,e,o,u;return t=zo,e=n.substr(zo,4),e.toLowerCase()===H?zo+=4:(e=r,0===Wo&&ru(hn)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=fo()):(zo=t,t=r)):(zo=t,t=r),t}function Gi(){let t,e,o,u;return t=zo,e=n.substr(zo,4),e.toLowerCase()===P?zo+=4:(e=r,0===Wo&&ru(gn)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=po()):(zo=t,t=r)):(zo=t,t=r),t}function Bi(){let t,e,o,u;return t=zo,e=n.substr(zo,7),e.toLowerCase()===Z?zo+=7:(e=r,0===Wo&&ru(En)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=vo()):(zo=t,t=r)):(zo=t,t=r),t}function qi(){let t,e,o,u;return t=zo,e=n.substr(zo,8),e.toLowerCase()===j?zo+=8:(e=r,0===Wo&&ru(mn)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=yo()):(zo=t,t=r)):(zo=t,t=r),t}function Vi(){let t,e,o,u;return t=zo,e=n.substr(zo,4),e.toLowerCase()===z?zo+=4:(e=r,0===Wo&&ru(An)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=ho()):(zo=t,t=r)):(zo=t,t=r),t}function Wi(){let t,e,o,u;return t=zo,e=n.substr(zo,4),e.toLowerCase()===k?zo+=4:(e=r,0===Wo&&ru(Cn)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=go()):(zo=t,t=r)):(zo=t,t=r),t}function Yi(){let t,e,o,u;return t=zo,e=n.substr(zo,2),e.toLowerCase()===G?zo+=2:(e=r,0===Wo&&ru(bn)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=Eo()):(zo=t,t=r)):(zo=t,t=r),t}function Ki(){let t,e,o,u;return t=zo,e=n.substr(zo,7),e.toLowerCase()===B?zo+=7:(e=r,0===Wo&&ru(Ln)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=mo()):(zo=t,t=r)):(zo=t,t=r),t}function Xi(){let t,e,o,u;return t=zo,e=n.substr(zo,3),e.toLowerCase()===q?zo+=3:(e=r,0===Wo&&ru(Tn)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=Ao()):(zo=t,t=r)):(zo=t,t=r),t}function Ji(){let t,e,o,u;return t=zo,e=n.substr(zo,8),e.toLowerCase()===V?zo+=8:(e=r,0===Wo&&ru(wn)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=Co()):(zo=t,t=r)):(zo=t,t=r),t}function Qi(){let t,e,o,u;return t=zo,e=n.substr(zo,5),e.toLowerCase()===W?zo+=5:(e=r,0===Wo&&ru(xn)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=bo()):(zo=t,t=r)):(zo=t,t=r),t}function tc(){let t,e,o,u;return t=zo,e=n.substr(zo,4),e.toLowerCase()===Y?zo+=4:(e=r,0===Wo&&ru(Nn)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=Lo()):(zo=t,t=r)):(zo=t,t=r),t}function nc(){let t,e,o,u;return t=zo,e=n.substr(zo,7),e.toLowerCase()===K?zo+=7:(e=r,0===Wo&&ru(Rn)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=To()):(zo=t,t=r)):(zo=t,t=r),t}function ec(){let t,e,o,u;return t=zo,e=n.substr(zo,2),e.toLowerCase()===X?zo+=2:(e=r,0===Wo&&ru(In)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=wo()):(zo=t,t=r)):(zo=t,t=r),t}function rc(){let t,e,o,u;return t=zo,e=n.substr(zo,8),e.toLowerCase()===J?zo+=8:(e=r,0===Wo&&ru(On)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=xo()):(zo=t,t=r)):(zo=t,t=r),t}function oc(){let t,e,o,u;return t=zo,e=n.substr(zo,4),e.toLowerCase()===Q?zo+=4:(e=r,0===Wo&&ru(Fn)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=No()):(zo=t,t=r)):(zo=t,t=r),t}function uc(){let t,e,o,u;return t=zo,e=n.substr(zo,13),e.toLowerCase()===tt?zo+=13:(e=r,0===Wo&&ru(Sn)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=Ro()):(zo=t,t=r)):(zo=t,t=r),t}function ic(){let t,e,o,u;return t=zo,e=n.substr(zo,15),e.toLowerCase()===nt?zo+=15:(e=r,0===Wo&&ru(Mn)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=Io()):(zo=t,t=r)):(zo=t,t=r),t}function cc(){let t,e,o,u;return t=zo,e=n.substr(zo,5),e.toLowerCase()===et?zo+=5:(e=r,0===Wo&&ru($n)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=Oo()):(zo=t,t=r)):(zo=t,t=r),t}function lc(){let t,e,o,u;return t=zo,e=n.substr(zo,3),e.toLowerCase()===rt?zo+=3:(e=r,0===Wo&&ru(Un)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=Fo()):(zo=t,t=r)):(zo=t,t=r),t}function ac(){let t,e,o,u;return t=zo,e=n.substr(zo,4),e.toLowerCase()===ot?zo+=4:(e=r,0===Wo&&ru(_n)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=So()):(zo=t,t=r)):(zo=t,t=r),t}function sc(){let t,e,o,u;return t=zo,e=n.substr(zo,6),e.toLowerCase()===ut?zo+=6:(e=r,0===Wo&&ru(Dn)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=Mo()):(zo=t,t=r)):(zo=t,t=r),t}function fc(){let t,e,o,u;return t=zo,e=n.substr(zo,6),e.toLowerCase()===it?zo+=6:(e=r,0===Wo&&ru(Hn)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=$o()):(zo=t,t=r)):(zo=t,t=r),t}function pc(){let t,e,o,u;return t=zo,e=n.substr(zo,4),e.toLowerCase()===ct?zo+=4:(e=r,0===Wo&&ru(Pn)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=Uo()):(zo=t,t=r)):(zo=t,t=r),t}function dc(){let t,e,o,u;return t=zo,e=n.substr(zo,3),e.toLowerCase()===lt?zo+=3:(e=r,0===Wo&&ru(Zn)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=_o()):(zo=t,t=r)):(zo=t,t=r),t}function vc(){let t,e,o,u;return t=zo,e=n.substr(zo,4),e.toLowerCase()===at?zo+=4:(e=r,0===Wo&&ru(jn)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=Do()):(zo=t,t=r)):(zo=t,t=r),t}function yc(){let t,e,o,u;return t=zo,e=n.substr(zo,4),e.toLowerCase()===st?zo+=4:(e=r,0===Wo&&ru(zn)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=Ho()):(zo=t,t=r)):(zo=t,t=r),t}function hc(){let t,e,o,u;return t=zo,e=n.substr(zo,4),e.toLowerCase()===ft?zo+=4:(e=r,0===Wo&&ru(kn)),e!==r?(o=zo,Wo++,u=Fu(),Wo--,u===r?o=void 0:(zo=o,o=r),o!==r?(ko=t,t=Po()):(zo=t,t=r)):(zo=t,t=r),t}function gc(){let t;return 44===n.charCodeAt(zo)?(t=pt,zo++):(t=r,0===Wo&&ru(Gn)),t}function Ec(){let t;return 40===n.charCodeAt(zo)?(t=dt,zo++):(t=r,0===Wo&&ru(Bn)),t}function mc(){let t;return 41===n.charCodeAt(zo)?(t=vt,zo++):(t=r,0===Wo&&ru(qn)),t}function Ac(){let t,n;for(t=[],n=Cc();n!==r;)t.push(n),n=Cc();return t}function Cc(){let t;return t=n.charAt(zo),xt.test(t)?zo++:(t=r,0===Wo&&ru(Vn)),t}function bc(){let t,e,o,u;if(t=zo,e=Iu(),e!==r&&(ko=t,e=Zo(e)),t=e,t===r)if(t=zo,96===n.charCodeAt(zo)?(e=yt,zo++):(e=r,0===Wo&&ru(Wn)),e!==r){if(o=[],u=n.charAt(zo),Nt.test(u)?zo++:(u=r,0===Wo&&ru(Yn)),u!==r)for(;u!==r;)o.push(u),u=n.charAt(zo),Nt.test(u)?zo++:(u=r,0===Wo&&ru(Yn));else o=r;o!==r?(96===n.charCodeAt(zo)?(u=yt,zo++):(u=r,0===Wo&&ru(Wn)),u!==r?(ko=t,t=jo(o)):(zo=t,t=r)):(zo=t,t=r)}else zo=t,t=r;return t}function Lc(t,n,e){return{type:"unary-expression",location:e,operator:t,expr:n}}function Tc(t,n,e,r,o){const u={type:"binary-expression",location:o,operator:t,left:n,right:e};return void 0!==r&&(u.escape=r),u}function wc(t,...n){return{type:"expression-list",location:t,value:n}}function xc(t,n){let e=t;for(const{op:r,expr:o,location:{end:u}}of n)e=Tc(r,e,o,void 0,{...e.location,end:u});return e}function Nc(t){!0!==/^(\d{4})-(\d{1,2})-(\d{1,2})$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})(\.[0-9]+)?$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})(\.[0-9]+)?[ ]{0,1}(\+|\-)(\d{1,2}):(\d{1,2})$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2})?[ ]{0,1}(\+|\-)(\d{1,2}):(\d{1,2})$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2})$/.test(t)&&Ko("Timestamp literal is invalid")}function Rc(t){!0!==/^(\d{1,2}):(\d{1,2}):(\d{1,2})$|^(\d{1,2}):(\d{1,2})$|^(\d{1,2}):(\d{1,2}):(\d{1,2}).([0-9]+)$/.test(t)&&Ko("Time literal is invalid")}function Ic(t){!0!==/^(\d{4})-(\d{1,2})-(\d{1,2})$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})(\.[0-9]+)?$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})(\.[0-9]+)?[ ]{0,1}(\+|\-)(\d{1,2}):(\d{1,2})$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2})?[ ]{0,1}(\+|\-)(\d{1,2}):(\d{1,2})$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2})$/.test(t)&&Ko("Date literal is invalid")}Bo=i();const Oc=Bo!==r&&zo===n.length;function Fc(){throw Bo!==r&&zo<n.length&&ru(tu()),uu(Vo,qo<n.length?Xo(qo):null,qo<n.length?eu(qo,qo+1):eu(qo,qo))}return e.peg$library?{peg$result:Bo,peg$currPos:zo,peg$FAILED:r,peg$maxFailExpected:Vo,peg$maxFailPos:qo,peg$success:Oc,peg$throw:Oc?void 0:Fc}:Oc?Bo:void Fc()}class e{static parse(t){return n(t)}}function r(t,n){if(null!=t)switch(n(t),t.type){case"when-clause":r(t.operand,n),r(t.value,n);break;case"case-expression":for(const e of t.clauses)r(e,n);"simple"===t.format&&r(t.operand,n),null!==t.else&&r(t.else,n);break;case"expression-list":for(const e of t.value)r(e,n);break;case"unary-expression":r(t.expr,n);break;case"binary-expression":r(t.left,n),r(t.right,n);break;case"function":r(t.args,n);break;case"interval":r(t.value,n),r(t.qualifier,n);break;case"interval-qualifier":r(t.start,n),r(t.end,n)}}export{e as WhereGrammar,r as visitAll};
5
+ class t extends SyntaxError{constructor(t,n,e,r){super(t),this.expected=n,this.found=e,this.location=r,this.name="SyntaxError"}format(t){let n="Error: "+this.message;if(this.location){let e=null;const r=t.find((t=>t.source===this.location.source));r&&(e=r.text.split(/\r\n|\n|\r/g));const o=this.location.start,u=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(o):o,i=this.location.source+":"+u.line+":"+u.column;if(e){const t=this.location.end,r="".padEnd(u.line.toString().length," "),c=e[o.line-1],l=(o.line===t.line?t.column:c.length+1)-o.column||1;n+="\n --\x3e "+i+"\n"+r+" |\n"+u.line+" | "+c+"\n"+r+" | "+"".padEnd(o.column-1," ")+"".padEnd(l,"^")}else n+="\n at "+i}return n}static buildMessage(t,n){function e(t){return t.codePointAt(0).toString(16).toUpperCase()}const r=Object.prototype.hasOwnProperty.call(RegExp.prototype,"unicode")?new RegExp("[\\p{C}\\p{Mn}\\p{Mc}]","gu"):null;function o(t){return r?t.replace(r,(t=>"\\u{"+e(t)+"}")):t}function u(t){return o(t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(t=>"\\x0"+e(t))).replace(/[\x10-\x1F\x7F-\x9F]/g,(t=>"\\x"+e(t))))}function i(t){return o(t.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,(t=>"\\x0"+e(t))).replace(/[\x10-\x1F\x7F-\x9F]/g,(t=>"\\x"+e(t))))}const c={literal:t=>'"'+u(t.text)+'"',class(t){const n=t.parts.map((t=>Array.isArray(t)?i(t[0])+"-"+i(t[1]):i(t)));return"["+(t.inverted?"^":"")+n.join("")+"]"+(t.unicode?"u":"")},any:()=>"any character",end:()=>"end of input",other:t=>t.description};function l(t){return c[t.type](t)}function s(t){const n=t.map(l);if(n.sort(),n.length>0){let t=1;for(let e=1;e<n.length;e++)n[e-1]!==n[e]&&(n[t]=n[e],t++);n.length=t}switch(n.length){case 1:return n[0];case 2:return n[0]+" or "+n[1];default:return n.slice(0,-1).join(", ")+", or "+n[n.length-1]}}function a(t){return t?'"'+u(t)+'"':"end of input"}return"Expected "+s(t)+" but "+a(n)+" found."}}function n(n,e){const r={},o=(e=void 0!==e?e:{}).grammarSource,u={start:yu};let i=yu;const c="!",l="=",s=">=",a=">",f="<=",p="<>",d="!=",v="||",y="@",h="'",g="N'",E="''",C=".",m="null",A="true",b="false",L="in",w="is",T="like",x="escape",N="not",R="and",I="or",O="between",F="from",S="for",M="substring",$="extract",D="trim",U="position",_="timestamp",H="date",P="time",Z="leading",j="trailing",k="both",z="cast",G="as",W="integer",B="int",Y="smallint",q="float",K="real",V="varchar",X="to",J="interval",Q="year",tt="timezone_hour",nt="timezone_minute",et="month",rt="day",ot="hour",ut="minute",it="second",ct="dow",lt="doy",st="week",at="case",ft="end",pt="when",dt="then",vt="else",yt=",",ht="(",gt=")",Et="`",Ct=/^[<-=]/,mt=/^[+\-]/,At=/^[*\/]/,bt=/^[A-Za-z_\x80-\uFFFF]/,Lt=/^[A-Za-z0-9_]/,wt=/^[A-Za-z0-9_.\x80-\uFFFF]/,Tt=/^["]/,xt=/^[^']/,Nt=/^[0-9]/,Rt=/^[eE]/,It=/^[ \t\n\r]/,Ot=/^[^`]/,Ft=cu("!",!1),St=cu("=",!1),Mt=cu(">=",!1),$t=cu(">",!1),Dt=cu("<=",!1),Ut=cu("<>",!1),_t=lu([["<","="]],!1,!1,!1),Ht=cu("!=",!1),Pt=lu(["+","-"],!1,!1,!1),Zt=cu("||",!1),jt=lu(["*","/"],!1,!1,!1),kt=lu([["A","Z"],["a","z"],"_",["€","￿"]],!1,!1,!1),zt=lu([["A","Z"],["a","z"],["0","9"],"_"],!1,!1,!1),Gt=lu([["A","Z"],["a","z"],["0","9"],"_",".",["€","￿"]],!1,!1,!1),Wt=lu(['"'],!1,!1,!1),Bt=cu("@",!1),Yt=cu("'",!1),qt=cu("N'",!1),Kt=cu("''",!1),Vt=lu(["'"],!0,!1,!1),Xt=cu(".",!1),Jt=lu([["0","9"]],!1,!1,!1),Qt=lu(["e","E"],!1,!1,!1),tn=cu("NULL",!0),nn=cu("TRUE",!0),en=cu("FALSE",!0),rn=cu("IN",!0),on=cu("IS",!0),un=cu("LIKE",!0),cn=cu("ESCAPE",!0),ln=cu("NOT",!0),sn=cu("AND",!0),an=cu("OR",!0),fn=cu("BETWEEN",!0),pn=cu("FROM",!0),dn=cu("FOR",!0),vn=cu("SUBSTRING",!0),yn=cu("EXTRACT",!0),hn=cu("TRIM",!0),gn=cu("POSITION",!0),En=cu("TIMESTAMP",!0),Cn=cu("DATE",!0),mn=cu("TIME",!0),An=cu("LEADING",!0),bn=cu("TRAILING",!0),Ln=cu("BOTH",!0),wn=cu("CAST",!0),Tn=cu("AS",!0),xn=cu("INTEGER",!0),Nn=cu("INT",!0),Rn=cu("SMALLINT",!0),In=cu("FLOAT",!0),On=cu("REAL",!0),Fn=cu("VARCHAR",!0),Sn=cu("TO",!0),Mn=cu("INTERVAL",!0),$n=cu("YEAR",!0),Dn=cu("TIMEZONE_HOUR",!0),Un=cu("TIMEZONE_MINUTE",!0),_n=cu("MONTH",!0),Hn=cu("DAY",!0),Pn=cu("HOUR",!0),Zn=cu("MINUTE",!0),jn=cu("SECOND",!0),kn=cu("DOW",!0),zn=cu("DOY",!0),Gn=cu("WEEK",!0),Wn=cu("CASE",!0),Bn=cu("END",!0),Yn=cu("WHEN",!0),qn=cu("THEN",!0),Kn=cu("ELSE",!0),Vn=cu(",",!1),Xn=cu("(",!1),Jn=cu(")",!1),Qn=lu([" ","\t","\n","\r"],!1,!1,!1),te=cu("`",!1),ne=lu(["`"],!0,!1,!1);function ee(t){return t}function re(t){return{type:"expression-list",location:ou(),value:t}}function oe(t,n,e){return{op:n,expr:e,location:ou()}}function ue(t,n){return Hc(t,n)}function ie(t,n,e){return{op:n,expr:e,location:ou()}}function ce(t,n){return Hc(t,n)}function le(t){return Dc("NOT",t,ou())}function se(t,n){if(""==n||null==n||null==n)return t;return"arithmetic"==n.type?Hc(t,n.tail):Uc(n.op,t,n.right,n.escape,ou())}function ae(t,n){return{op:t,expr:n,location:ou()}}function fe(t){return{type:"arithmetic",tail:t}}function pe(t,n){return{op:t+"NOT",right:n}}function de(t,n){return{op:t,right:n}}function ve(t,n,e){return _c(ou(),n,e)}function ye(t,n){return{op:"NOT"+t,right:n}}function he(t,n,e){return _c(ou(),n,e)}function ge(t,n){return{op:t,right:n}}function Ee(t){return t[0]+" "+t[2]}function Ce(t){return t[0]+" "+t[2]}function me(t,n,e){return{op:t,right:n,escape:e.value}}function Ae(t,n){return{op:t,right:n,escape:""}}function be(t,n){return{op:t,right:n}}function Le(t,n){return{op:t,right:n}}function we(t,n,e){return{op:n,expr:e,location:ou()}}function Te(t,n){return Hc(t,n)}function xe(t,n,e){return{op:n,expr:e,location:ou()}}function Ne(t,n){return Hc(t,n)}function Re(t){return t.paren=!0,t}function Ie(t){return/^CURRENT_DATE$/i.test(t)?{type:"current-time",location:ou(),mode:"date"}:/^CURRENT_TIMESTAMP$/i.test(t)?{type:"current-time",location:ou(),mode:"timestamp"}:/^CURRENT_TIME$/i.test(t)?{type:"current-time",location:ou(),mode:"time"}:/^CURRENT_USER$/i.test(t)?{type:"current-user",location:ou()}:{type:"column-reference",location:ou(),table:"",column:t}}function Oe(t){return{type:"column-reference",location:ou(),table:"",column:t,delimited:!0}}function Fe(t){return t}function Se(t,n){return t+n.join("")}function Me(t,n){return t+n.join("")}function $e(t){return t}function De(t){return t.join("")}function Ue(){return'"'}function _e(t){return{type:"parameter",location:ou(),value:t[1]}}function He(t,n){return _c(ou(),t,n)}function Pe(t,n){return _c(ou(),t,n)}function Ze(t){return{type:"function",location:ou(),name:"extract",args:t}}function je(t,n,e){return _c(ou(),t,n,...e?[e]:[])}function ke(t,n,e){return _c(ou(),t,n,e)}function ze(t){return{type:"function",location:ou(),name:"substring",args:t}}function Ge(t,n){return _c(ou(),t,n)}function We(t,n){return _c(ou(),t,n)}function Be(t){return{type:"function",location:ou(),name:"cast",args:t}}function Ye(){return{type:"data-type",location:ou(),value:{type:"integer"}}}function qe(){return{type:"data-type",location:ou(),value:{type:"smallint"}}}function Ke(){return{type:"data-type",location:ou(),value:{type:"float"}}}function Ve(){return{type:"data-type",location:ou(),value:{type:"real"}}}function Xe(){return{type:"data-type",location:ou(),value:{type:"date"}}}function Je(){return{type:"data-type",location:ou(),value:{type:"timestamp"}}}function Qe(){return{type:"data-type",location:ou(),value:{type:"time"}}}function tr(t){return{type:"data-type",location:ou(),value:{type:"varchar",size:parseInt(t)}}}function nr(t,n,e){return _c(ou(),t,n,e)}function er(t,n){return _c(ou(),t,n)}function rr(t){return{type:"function",location:ou(),name:"trim",args:t}}function or(t){return{type:"string",location:ou(),value:t??"BOTH"}}function ur(t,n){return _c(ou(),t,n)}function ir(t,n){return _c(ou(),t,n)}function cr(t){return{type:"function",location:ou(),name:"position",args:t}}function lr(t,n){return{type:"function",location:ou(),name:t,args:n}}function sr(t){return{type:"string",location:ou(),value:t}}function ar(t){return"string"===t.type&&Pc(t.value),{type:"timestamp",location:ou(),value:t.value}}function fr(t){return"string"===t.type&&Zc(t.value),{type:"time",location:ou(),value:t.value}}function pr(t,n,e){return{type:"interval",location:ou(),value:n,qualifier:e,op:t}}function dr(t,n){return{type:"interval",location:ou(),value:t,qualifier:n,op:""}}function vr(t,n){return{type:"interval-qualifier",location:ou(),start:t,end:n}}function yr(t,n){return{type:"interval-period",location:ou(),period:t.value,precision:n,secondary:null}}function hr(t){return{type:"interval-period",location:ou(),period:t.value,precision:null,secondary:null}}function gr(t){return{type:"interval-period",location:ou(),period:t.value,precision:null,secondary:null}}function Er(t,n){return{type:"interval-period",location:ou(),period:"second",precision:t,secondary:n}}function Cr(t){return{type:"interval-period",location:ou(),period:"second",precision:t,secondary:null}}function mr(){return{type:"interval-period",location:ou(),period:"second",precision:null,secondary:null}}function Ar(t,n){return{type:"interval-period",location:ou(),period:t.value,precision:n,secondary:null}}function br(t){return{type:"interval-period",location:ou(),period:t.value,precision:null,secondary:null}}function Lr(t,n){return{type:"interval-period",location:ou(),period:"second",precision:t,secondary:n}}function wr(t){return{type:"interval-period",location:ou(),period:"second",precision:t,secondary:null}}function Tr(){return{type:"interval-period",location:ou(),period:"second",precision:null,secondary:null}}function xr(){return{type:"string",location:ou(),value:"day"}}function Nr(){return{type:"string",location:ou(),value:"hour"}}function Rr(){return{type:"string",location:ou(),value:"minute"}}function Ir(){return{type:"string",location:ou(),value:"month"}}function Or(){return{type:"string",location:ou(),value:"year"}}function Fr(t){return parseFloat(t)}function Sr(t){return parseFloat(t)}function Mr(t){return"string"===t.type&&jc(t.value),{type:"date",location:ou(),value:t.value}}function $r(){return{type:"null",location:ou(),value:null}}function Dr(){return{type:"boolean",location:ou(),value:!0}}function Ur(){return{type:"boolean",location:ou(),value:!1}}function _r(){return"'"}function Hr(t){return{type:"string",location:ou(),value:t.join("")}}function Pr(t,n){return{type:"case-expression",location:ou(),format:"simple",operand:t,clauses:n,else:null,elseLocation:null}}function Zr(t,n,e){return{type:"case-expression",location:ou(),format:"simple",operand:t,clauses:n,else:e.value,elseLocation:e.location}}function jr(t){return{type:"case-expression",location:ou(),format:"searched",clauses:t,else:null,elseLocation:null}}function kr(t,n){return{type:"case-expression",location:ou(),format:"searched",clauses:t,else:n.value,elseLocation:n.location}}function zr(t,n){return{type:"when-clause",location:ou(),operand:t,value:n}}function Gr(t,n){return{type:"when-clause",location:ou(),operand:t,value:n}}function Wr(t){return{type:"else-clause",location:ou(),value:t}}function Br(t){return{type:"number",location:ou(),value:t}}function Yr(t,n,e){return parseFloat(t+n+e)}function qr(t,n){return parseFloat(t+n)}function Kr(t,n){return parseFloat(t+n)}function Vr(t){return parseFloat(t)}function Xr(t,n){return t[0]+n}function Jr(t){return"."+(null!=t?t:"")}function Qr(t,n){return t+n}function to(t){return t.join("")}function no(t,n){return"e"+(null===n?"":n)}function eo(){return"IN"}function ro(){return"IS"}function oo(){return"LIKE"}function uo(){return"ESCAPE"}function io(){return"NOT"}function co(){return"AND"}function lo(){return"OR"}function so(){return"BETWEEN"}function ao(){return"FROM"}function fo(){return"FOR"}function po(){return"SUBSTRING"}function vo(){return"EXTRACT"}function yo(){return"TRIM"}function ho(){return"POSITION"}function go(){return"TIMESTAMP"}function Eo(){return"DATE"}function Co(){return"TIME"}function mo(){return"LEADING"}function Ao(){return"TRAILING"}function bo(){return"BOTH"}function Lo(){return"CAST"}function wo(){return"AS"}function To(){return"INTEGER"}function xo(){return"INT"}function No(){return"SMALLINT"}function Ro(){return"FLOAT"}function Io(){return"REAL"}function Oo(){return"VARCHAR"}function Fo(){return"TO"}function So(){return"INTERVAL"}function Mo(){return"YEAR"}function $o(){return"TIMEZONE_HOUR"}function Do(){return"TIMEZONE_MINUTE"}function Uo(){return"MONTH"}function _o(){return"DAY"}function Ho(){return"HOUR"}function Po(){return"MINUTE"}function Zo(){return"SECOND"}function jo(){return"DOW"}function ko(){return"DOY"}function zo(){return"WEEK"}function Go(){return"CASE"}function Wo(){return"END"}function Bo(){return"WHEN"}function Yo(){return"THEN"}function qo(){return"ELSE"}function Ko(t){return t}function Vo(t){return t.join("")}let Xo=0|e.peg$currPos,Jo=Xo;const Qo=[{line:1,column:1}];let tu,nu=Xo,eu=e.peg$maxFailExpected||[],ru=0|e.peg$silentFails;if(e.startRule){if(!(e.startRule in u))throw new Error("Can't start parsing from rule \""+e.startRule+'".');i=u[e.startRule]}function ou(){return fu(Jo,Xo)}function uu(t,n){throw du(t,n=void 0!==n?n:fu(Jo,Xo))}function iu(t=Xo){const e=n.codePointAt(t);return void 0===e?"":String.fromCodePoint(e)}function cu(t,n){return{type:"literal",text:t,ignoreCase:n}}function lu(t,n,e,r){return{type:"class",parts:t,inverted:n,ignoreCase:e,unicode:r}}function su(){return{type:"end"}}function au(t){let e,r=Qo[t];if(r)return r;if(t>=Qo.length)e=Qo.length-1;else for(e=t;!Qo[--e];);for(r=Qo[e],r={line:r.line,column:r.column};e<t;)10===n.charCodeAt(e)?(r.line++,r.column=1):r.column++,e++;return Qo[t]=r,r}function fu(t,n,e){const r=au(t),u=au(n);return{source:o,start:{offset:t,line:r.line,column:r.column},end:{offset:n,line:u.line,column:u.column}}}function pu(t){Xo<nu||(Xo>nu&&(nu=Xo,eu=[]),eu.push(t))}function du(n,e){return new t(n,null,null,e)}function vu(n,e,r){return new t(t.buildMessage(n,e),n,e,r)}function yu(){let t,n;return t=Xo,Sc(),n=gu(),n!==r?(Sc(),Jo=t,t=ee(n)):(Xo=t,t=r),t}function hu(){let t,n,e,o,u,i,c,l;if(t=Xo,n=Oc(),n!==r){for(Sc(),e=[],o=gu();o!==r;)e.push(o),o=Xo,u=Xo,i=Sc(),c=Ic(),c!==r?(l=Sc(),i=[i,c,l],u=i):(Xo=u,u=r),u!==r?(u=gu(),u===r?(Xo=o,o=r):o=u):o=u;o=Sc(),u=Fc(),u!==r?(Jo=t,t=re(e)):(Xo=t,t=r)}else Xo=t,t=r;return t}function gu(){let t,n,e,o,u,i;if(t=Xo,n=Eu(),n!==r){for(e=[],o=Xo,Sc(),u=zi(),u!==r?(Sc(),i=Eu(),i!==r?(Jo=o,o=oe(n,u,i)):(Xo=o,o=r)):(Xo=o,o=r);o!==r;)e.push(o),o=Xo,Sc(),u=zi(),u!==r?(Sc(),i=Eu(),i!==r?(Jo=o,o=oe(n,u,i)):(Xo=o,o=r)):(Xo=o,o=r);Jo=t,t=ue(n,e)}else Xo=t,t=r;return t}function Eu(){let t,n,e,o,u,i;if(t=Xo,n=Cu(),n!==r){for(e=[],o=Xo,Sc(),u=ki(),u!==r?(Sc(),i=Cu(),i!==r?(Jo=o,o=ie(n,u,i)):(Xo=o,o=r)):(Xo=o,o=r);o!==r;)e.push(o),o=Xo,Sc(),u=ki(),u!==r?(Sc(),i=Cu(),i!==r?(Jo=o,o=ie(n,u,i)):(Xo=o,o=r)):(Xo=o,o=r);Jo=t,t=ce(n,e)}else Xo=t,t=r;return t}function Cu(){let t,e,o,u,i;return t=Xo,e=ji(),e===r&&(e=Xo,33===n.charCodeAt(Xo)?(o=c,Xo++):(o=r,0===ru&&pu(Ft)),o!==r?(u=Xo,ru++,61===n.charCodeAt(Xo)?(i=l,Xo++):(i=r,0===ru&&pu(St)),ru--,i===r?u=void 0:(Xo=u,u=r),u!==r?(o=[o,u],e=o):(Xo=e,e=r)):(Xo=e,e=r)),e!==r?(o=Sc(),u=Cu(),u!==r?(Jo=t,t=le(u)):(Xo=t,t=r)):(Xo=t,t=r),t===r&&(t=mu()),t}function mu(){let t,n,e,o;return t=Xo,n=Ou(),n!==r?(e=Xo,Sc(),o=Au(),o!==r?e=o:(Xo=e,e=r),e===r&&(e=null),Jo=t,t=se(n,e)):(Xo=t,t=r),t}function Au(){let t;return t=bu(),t===r&&(t=Iu(),t===r&&(t=Tu(),t===r&&(t=wu(),t===r&&(t=Ru())))),t}function bu(){let t,n,e,o,u;if(t=Xo,n=[],e=Xo,Sc(),o=Lu(),o!==r?(Sc(),u=Ou(),u!==r?(Jo=e,e=ae(o,u)):(Xo=e,e=r)):(Xo=e,e=r),e!==r)for(;e!==r;)n.push(e),e=Xo,Sc(),o=Lu(),o!==r?(Sc(),u=Ou(),u!==r?(Jo=e,e=ae(o,u)):(Xo=e,e=r)):(Xo=e,e=r);else n=r;return n!==r&&(Jo=t,n=fe(n)),t=n,t}function Lu(){let t;return n.substr(Xo,2)===s?(t=s,Xo+=2):(t=r,0===ru&&pu(Mt)),t===r&&(62===n.charCodeAt(Xo)?(t=a,Xo++):(t=r,0===ru&&pu($t)),t===r&&(n.substr(Xo,2)===f?(t=f,Xo+=2):(t=r,0===ru&&pu(Dt)),t===r&&(n.substr(Xo,2)===p?(t=p,Xo+=2):(t=r,0===ru&&pu(Ut)),t===r&&(t=n.charAt(Xo),Ct.test(t)?Xo++:(t=r,0===ru&&pu(_t)),t===r&&(n.substr(Xo,2)===d?(t=d,Xo+=2):(t=r,0===ru&&pu(Ht))))))),t}function wu(){let t,n,e,o;return t=Xo,n=Hi(),n!==r?(Sc(),e=ji(),e!==r?(Sc(),o=Ou(),o!==r?(Jo=t,t=pe(n,o)):(Xo=t,t=r)):(Xo=t,t=r)):(Xo=t,t=r),t===r&&(t=Xo,n=Hi(),n!==r?(Sc(),e=Ou(),e!==r?(Jo=t,t=de(n,e)):(Xo=t,t=r)):(Xo=t,t=r)),t}function Tu(){let t,n,e,o,u,i,c,l;return t=Xo,n=ji(),n!==r?(Sc(),e=Gi(),e!==r?(o=Sc(),u=Xo,i=Ou(),i!==r?(Sc(),c=ki(),c!==r?(Sc(),l=Ou(),l!==r?(Jo=u,u=ve(e,i,l)):(Xo=u,u=r)):(Xo=u,u=r)):(Xo=u,u=r),u!==r?(Jo=t,t=ye(e,u)):(Xo=t,t=r)):(Xo=t,t=r)):(Xo=t,t=r),t===r&&(t=Xo,n=Gi(),n!==r?(Sc(),e=Xo,o=Ou(),o!==r?(u=Sc(),i=ki(),i!==r?(Sc(),c=Ou(),c!==r?(Jo=e,e=he(n,o,c)):(Xo=e,e=r)):(Xo=e,e=r)):(Xo=e,e=r),e!==r?(Jo=t,t=ge(n,e)):(Xo=t,t=r)):(Xo=t,t=r)),t}function xu(){let t,n,e,o,u;return t=Xo,n=Xo,e=ji(),e!==r?(o=Sc(),u=Pi(),u!==r?(e=[e,o,u],n=e):(Xo=n,n=r)):(Xo=n,n=r),n!==r&&(Jo=t,n=Ee(n)),t=n,t===r&&(t=Pi()),t}function Nu(){let t,n,e,o,u;return t=Xo,n=Xo,e=ji(),e!==r?(o=Sc(),u=_i(),u!==r?(e=[e,o,u],n=e):(Xo=n,n=r)):(Xo=n,n=r),n!==r&&(Jo=t,n=Ce(n)),t=n,t===r&&(t=_i()),t}function Ru(){let t,n,e,o,u;return t=Xo,n=xu(),n!==r?(Sc(),e=Ei(),e!==r?(Sc(),o=Zi(),o!==r?(Sc(),u=Ci(),u!==r?(Jo=t,t=me(n,e,u)):(Xo=t,t=r)):(Xo=t,t=r)):(Xo=t,t=r)):(Xo=t,t=r),t===r&&(t=Xo,n=xu(),n!==r?(Sc(),e=Ei(),e!==r?(Jo=t,t=Ae(n,e)):(Xo=t,t=r)):(Xo=t,t=r)),t}function Iu(){let t,n,e;return t=Xo,n=Nu(),n!==r?(Sc(),e=hu(),e!==r?(Jo=t,t=be(n,e)):(Xo=t,t=r)):(Xo=t,t=r),t===r&&(t=Xo,n=Nu(),n!==r?(Sc(),e=qu(),e!==r?(Jo=t,t=Le(n,e)):(Xo=t,t=r)):(Xo=t,t=r)),t}function Ou(){let t,n,e,o,u,i;if(t=Xo,n=Su(),n!==r){for(e=[],o=Xo,Sc(),u=Fu(),u!==r?(Sc(),i=Su(),i!==r?(Jo=o,o=we(n,u,i)):(Xo=o,o=r)):(Xo=o,o=r);o!==r;)e.push(o),o=Xo,Sc(),u=Fu(),u!==r?(Sc(),i=Su(),i!==r?(Jo=o,o=we(n,u,i)):(Xo=o,o=r)):(Xo=o,o=r);Jo=t,t=Te(n,e)}else Xo=t,t=r;return t}function Fu(){let t;return t=n.charAt(Xo),mt.test(t)?Xo++:(t=r,0===ru&&pu(Pt)),t===r&&(n.substr(Xo,2)===v?(t=v,Xo+=2):(t=r,0===ru&&pu(Zt))),t}function Su(){let t,n,e,o,u,i;if(t=Xo,n=$u(),n!==r){for(e=[],o=Xo,Sc(),u=Mu(),u!==r?(Sc(),i=$u(),i!==r?(Jo=o,o=xe(n,u,i)):(Xo=o,o=r)):(Xo=o,o=r);o!==r;)e.push(o),o=Xo,Sc(),u=Mu(),u!==r?(Sc(),i=$u(),i!==r?(Jo=o,o=xe(n,u,i)):(Xo=o,o=r)):(Xo=o,o=r);Jo=t,t=Ne(n,e)}else Xo=t,t=r;return t}function Mu(){let t;return t=n.charAt(Xo),At.test(t)?Xo++:(t=r,0===ru&&pu(jt)),t}function $u(){let t,n,e,o;return t=oi(),t===r&&(t=Ku(),t===r&&(t=Vu(),t===r&&(t=Qu(),t===r&&(t=ni(),t===r&&(t=Xu(),t===r&&(t=ei(),t===r&&(t=mi(),t===r&&(t=Du(),t===r&&(t=qu(),t===r&&(t=Xo,n=Oc(),n!==r?(Sc(),e=gu(),e!==r?(Sc(),o=Fc(),o!==r?(Jo=t,t=Re(e)):(Xo=t,t=r)):(Xo=t,t=r)):(Xo=t,t=r))))))))))),t}function Du(){let t,n;return t=Xo,n=Uu(),n!==r&&(Jo=t,n=Ie(n)),t=n,t===r&&(t=Xo,n=ku(),n!==r&&(Jo=t,n=Oe(n)),t=n),t}function Uu(){let t,n;return t=Xo,n=_u(),n!==r&&(Jo=t,n=Fe(n)),t=n,t}function _u(){let t,n,e,o;if(t=Xo,n=Pu(),n!==r){for(e=[],o=ju();o!==r;)e.push(o),o=ju();Jo=t,t=Se(n,e)}else Xo=t,t=r;return t}function Hu(){let t,n,e,o;if(t=Xo,n=Pu(),n!==r){for(e=[],o=Zu();o!==r;)e.push(o),o=Zu();Jo=t,t=Me(n,e)}else Xo=t,t=r;return t}function Pu(){let t;return t=n.charAt(Xo),bt.test(t)?Xo++:(t=r,0===ru&&pu(kt)),t}function Zu(){let t;return t=n.charAt(Xo),Lt.test(t)?Xo++:(t=r,0===ru&&pu(zt)),t}function ju(){let t;return t=n.charAt(Xo),wt.test(t)?Xo++:(t=r,0===ru&&pu(Gt)),t}function ku(){let t,n,e,o;return t=Xo,n=Yu(),n!==r?(e=zu(),o=Yu(),o!==r?(Jo=t,t=$e(e)):(Xo=t,t=r)):(Xo=t,t=r),t}function zu(){let t,n,e;for(t=Xo,n=[],e=Gu();e!==r;)n.push(e),e=Gu();return Jo=t,n=De(n),t=n,t}function Gu(){let t;return t=Bu(),t===r&&(t=Wu()),t}function Wu(){let t,n,e;return t=Xo,n=Yu(),n!==r?(e=Yu(),e!==r?(Jo=t,t=Ue()):(Xo=t,t=r)):(Xo=t,t=r),t}function Bu(){let t;return t=n.charAt(Xo),wt.test(t)?Xo++:(t=r,0===ru&&pu(Gt)),t}function Yu(){let t;return t=n.charAt(Xo),Tt.test(t)?Xo++:(t=r,0===ru&&pu(Wt)),t}function qu(){let t,e,o,u;return t=Xo,e=Xo,64===n.charCodeAt(Xo)?(o=y,Xo++):(o=r,0===ru&&pu(Bt)),o!==r?(u=Hu(),u!==r?(o=[o,u],e=o):(Xo=e,e=r)):(Xo=e,e=r),e!==r&&(Jo=t,e=_e(e)),t=e,t}function Ku(){let t,n,e,o,u,i,c,l;return t=Xo,n=qi(),n!==r?(Sc(),e=Xo,o=Oc(),o!==r?(Sc(),u=ri(),u!==r?(Sc(),i=Wi(),i!==r?(Sc(),c=gu(),c!==r?(Sc(),l=Fc(),l!==r?(Jo=e,e=He(u,c)):(Xo=e,e=r)):(Xo=e,e=r)):(Xo=e,e=r)):(Xo=e,e=r)):(Xo=e,e=r),e===r&&(e=Xo,o=Oc(),o!==r?(Sc(),u=ri(),u!==r?(Sc(),i=Ic(),i!==r?(Sc(),c=gu(),c!==r?(Sc(),l=Fc(),l!==r?(Jo=e,e=Pe(u,c)):(Xo=e,e=r)):(Xo=e,e=r)):(Xo=e,e=r)):(Xo=e,e=r)):(Xo=e,e=r)),e!==r?(Jo=t,t=Ze(e)):(Xo=t,t=r)):(Xo=t,t=r),t}function Vu(){let t,n,e,o,u,i,c,l,s,a,f;return t=Xo,n=Yi(),n!==r?(Sc(),e=Xo,o=Oc(),o!==r?(Sc(),u=gu(),u!==r?(Sc(),i=Wi(),i!==r?(Sc(),c=gu(),c!==r?(Sc(),l=Xo,s=Bi(),s!==r?(a=Sc(),f=gu(),f!==r?(Sc(),l=f):(Xo=l,l=r)):(Xo=l,l=r),l===r&&(l=null),s=Fc(),s!==r?(Jo=e,e=je(u,c,l)):(Xo=e,e=r)):(Xo=e,e=r)):(Xo=e,e=r)):(Xo=e,e=r)):(Xo=e,e=r),e===r&&(e=Xo,o=Oc(),o!==r?(Sc(),u=gu(),u!==r?(Sc(),i=Ic(),i!==r?(Sc(),c=gu(),c!==r?(Sc(),l=Ic(),l!==r?(s=Sc(),a=gu(),a!==r?(f=Fc(),f!==r?(Jo=e,e=ke(u,c,a)):(Xo=e,e=r)):(Xo=e,e=r)):(Xo=e,e=r)):(Xo=e,e=r)):(Xo=e,e=r)):(Xo=e,e=r)):(Xo=e,e=r)),e!==r?(Jo=t,t=ze(e)):(Xo=t,t=r)):(Xo=t,t=r),t}function Xu(){let t,n,e,o,u,i,c,l;return t=Xo,n=rc(),n!==r?(Sc(),e=Xo,o=Oc(),o!==r?(Sc(),u=gu(),u!==r?(Sc(),i=oc(),i!==r?(Sc(),c=Ju(),c!==r?(Sc(),l=Fc(),l!==r?(Jo=e,e=Ge(u,c)):(Xo=e,e=r)):(Xo=e,e=r)):(Xo=e,e=r)):(Xo=e,e=r)):(Xo=e,e=r),e===r&&(e=Xo,o=Oc(),o!==r?(Sc(),u=gu(),u!==r?(Sc(),i=Ic(),i!==r?(Sc(),c=Ju(),c!==r?(Sc(),l=Fc(),l!==r?(Jo=e,e=We(u,c)):(Xo=e,e=r)):(Xo=e,e=r)):(Xo=e,e=r)):(Xo=e,e=r)):(Xo=e,e=r)),e!==r?(Jo=t,t=Be(e)):(Xo=t,t=r)):(Xo=t,t=r),t}function Ju(){let t,n,e,o,u;return t=Xo,n=uc(),n===r&&(n=ic()),n!==r&&(Jo=t,n=Ye()),t=n,t===r&&(t=Xo,n=cc(),n!==r&&(Jo=t,n=qe()),t=n,t===r&&(t=Xo,n=lc(),n!==r&&(Jo=t,n=Ke()),t=n,t===r&&(t=Xo,n=sc(),n!==r&&(Jo=t,n=Ve()),t=n,t===r&&(t=Xo,n=Ji(),n!==r&&(Jo=t,n=Xe()),t=n,t===r&&(t=Xo,n=Xi(),n!==r&&(Jo=t,n=Je()),t=n,t===r&&(t=Xo,n=Qi(),n!==r&&(Jo=t,n=Qe()),t=n,t===r&&(t=Xo,n=ac(),n!==r?(Sc(),e=Oc(),e!==r?(Sc(),o=Fi(),o!==r?(Sc(),u=Fc(),u!==r?(Jo=t,t=tr(o)):(Xo=t,t=r)):(Xo=t,t=r)):(Xo=t,t=r)):(Xo=t,t=r)))))))),t}function Qu(){let t,n,e,o,u,i,c,l,s;return t=Xo,n=Ki(),n!==r?(Sc(),e=Xo,o=Oc(),o!==r?(Sc(),u=ti(),Sc(),i=gu(),i!==r?(Sc(),c=Wi(),c!==r?(Sc(),l=gu(),l!==r?(Sc(),s=Fc(),s!==r?(Jo=e,e=nr(u,i,l)):(Xo=e,e=r)):(Xo=e,e=r)):(Xo=e,e=r)):(Xo=e,e=r)):(Xo=e,e=r),e===r&&(e=Xo,o=Oc(),o!==r?(Sc(),u=ti(),Sc(),i=gu(),i!==r?(Sc(),c=Fc(),c!==r?(Jo=e,e=er(u,i)):(Xo=e,e=r)):(Xo=e,e=r)):(Xo=e,e=r)),e!==r?(Jo=t,t=rr(e)):(Xo=t,t=r)):(Xo=t,t=r),t}function ti(){let t,n;return t=Xo,n=tc(),n===r&&(n=nc(),n===r&&(n=ec())),n===r&&(n=null),Jo=t,n=or(n),t=n,t}function ni(){let t,n,e,o,u,i,c,l;return t=Xo,n=Vi(),n!==r?(Sc(),e=Xo,o=Oc(),o!==r?(Sc(),u=gu(),u!==r?(Sc(),i=_i(),i!==r?(Sc(),c=gu(),c!==r?(Sc(),l=Fc(),l!==r?(Jo=e,e=ur(u,c)):(Xo=e,e=r)):(Xo=e,e=r)):(Xo=e,e=r)):(Xo=e,e=r)):(Xo=e,e=r),e===r&&(e=Xo,o=Oc(),o!==r?(Sc(),u=gu(),u!==r?(Sc(),i=Ic(),i!==r?(Sc(),c=gu(),c!==r?(Sc(),l=Fc(),l!==r?(Jo=e,e=ir(u,c)):(Xo=e,e=r)):(Xo=e,e=r)):(Xo=e,e=r)):(Xo=e,e=r)):(Xo=e,e=r)),e!==r?(Jo=t,t=cr(e)):(Xo=t,t=r)):(Xo=t,t=r),t}function ei(){let t,n,e,o;return t=Xo,n=Xo,ru++,e=qi(),ru--,e===r?n=void 0:(Xo=n,n=r),n!==r?(e=$c(),e!==r?(Sc(),o=hu(),o!==r?(Jo=t,t=lr(e,o)):(Xo=t,t=r)):(Xo=t,t=r)):(Xo=t,t=r),t}function ri(){let t,n;return t=Xo,n=dc(),n===r&&(n=hc(),n===r&&(n=gc(),n===r&&(n=Ec(),n===r&&(n=Cc(),n===r&&(n=mc(),n===r&&(n=vc(),n===r&&(n=yc(),n===r&&(n=Ac(),n===r&&(n=bc(),n===r&&(n=Lc())))))))))),n!==r&&(Jo=t,n=sr(n)),t=n,t}function oi(){let t;return t=Ci(),t===r&&(t=xi(),t===r&&(t=gi(),t===r&&(t=hi(),t===r&&(t=yi(),t===r&&(t=ui(),t===r&&(t=ci(),t===r&&(t=ii()))))))),t}function ui(){let t,n,e;return t=Xo,n=Xi(),n!==r?(Sc(),e=Ei(),e!==r?(Jo=t,t=ar(e)):(Xo=t,t=r)):(Xo=t,t=r),t}function ii(){let t,n,e;return t=Xo,n=Qi(),n!==r?(Sc(),e=Ei(),e!==r?(Jo=t,t=fr(e)):(Xo=t,t=r)):(Xo=t,t=r),t}function ci(){let t,e,o,u,i;return t=Xo,e=pc(),e!==r?(Sc(),o=n.charAt(Xo),mt.test(o)?Xo++:(o=r,0===ru&&pu(Pt)),o!==r?(Sc(),u=Ei(),u!==r?(Sc(),i=li(),i!==r?(Jo=t,t=pr(o,u,i)):(Xo=t,t=r)):(Xo=t,t=r)):(Xo=t,t=r)):(Xo=t,t=r),t===r&&(t=Xo,e=pc(),e!==r?(Sc(),o=Ei(),o!==r?(Sc(),u=li(),u!==r?(Jo=t,t=dr(o,u)):(Xo=t,t=r)):(Xo=t,t=r)):(Xo=t,t=r)),t}function li(){let t,n,e,o;return t=Xo,n=si(),n!==r?(Sc(),e=fc(),e!==r?(Sc(),o=ai(),o!==r?(Jo=t,t=vr(n,o)):(Xo=t,t=r)):(Xo=t,t=r)):(Xo=t,t=r),t===r&&(t=fi()),t}function si(){let t,n,e,o,u;return t=Xo,n=pi(),n!==r?(Sc(),e=Oc(),e!==r?(Sc(),o=vi(),o!==r?(Sc(),u=Fc(),u!==r?(Jo=t,t=yr(n,o)):(Xo=t,t=r)):(Xo=t,t=r)):(Xo=t,t=r)):(Xo=t,t=r),t===r&&(t=Xo,n=pi(),n!==r&&(Jo=t,n=hr(n)),t=n),t}function ai(){let t,n,e,o,u,i,c;return t=Xo,n=pi(),n!==r&&(Jo=t,n=gr(n)),t=n,t===r&&(t=Xo,n=mc(),n!==r?(Sc(),e=Oc(),e!==r?(Sc(),o=vi(),o!==r?(Sc(),u=Ic(),u!==r?(Sc(),i=di(),i!==r?(Sc(),c=Fc(),c!==r?(Jo=t,t=Er(o,i)):(Xo=t,t=r)):(Xo=t,t=r)):(Xo=t,t=r)):(Xo=t,t=r)):(Xo=t,t=r)):(Xo=t,t=r),t===r&&(t=Xo,n=mc(),n!==r?(Sc(),e=Oc(),e!==r?(Sc(),o=vi(),o!==r?(Sc(),u=Fc(),u!==r?(Jo=t,t=Cr(o)):(Xo=t,t=r)):(Xo=t,t=r)):(Xo=t,t=r)):(Xo=t,t=r),t===r&&(t=Xo,n=mc(),n!==r&&(Jo=t,n=mr()),t=n))),t}function fi(){let t,n,e,o,u,i,c;return t=Xo,n=pi(),n!==r?(Sc(),e=Oc(),e!==r?(Sc(),o=di(),o!==r?(Sc(),u=Fc(),u!==r?(Jo=t,t=Ar(n,o)):(Xo=t,t=r)):(Xo=t,t=r)):(Xo=t,t=r)):(Xo=t,t=r),t===r&&(t=Xo,n=pi(),n!==r&&(Jo=t,n=br(n)),t=n,t===r&&(t=Xo,n=mc(),n!==r?(Sc(),e=Oc(),e!==r?(Sc(),o=vi(),o!==r?(Sc(),u=Ic(),u!==r?(Sc(),i=di(),i!==r?(Sc(),c=Fc(),c!==r?(Jo=t,t=Lr(o,i)):(Xo=t,t=r)):(Xo=t,t=r)):(Xo=t,t=r)):(Xo=t,t=r)):(Xo=t,t=r)):(Xo=t,t=r),t===r&&(t=Xo,n=mc(),n!==r?(Sc(),e=Oc(),e!==r?(Sc(),o=di(),o!==r?(Sc(),u=Fc(),u!==r?(Jo=t,t=wr(o)):(Xo=t,t=r)):(Xo=t,t=r)):(Xo=t,t=r)):(Xo=t,t=r),t===r&&(t=Xo,n=mc(),n!==r&&(Jo=t,n=Tr()),t=n)))),t}function pi(){let t,n;return t=Xo,n=gc(),n!==r&&(Jo=t,n=xr()),t=n,t===r&&(t=Xo,n=Ec(),n!==r&&(Jo=t,n=Nr()),t=n,t===r&&(t=Xo,n=Cc(),n!==r&&(Jo=t,n=Rr()),t=n,t===r&&(t=Xo,n=hc(),n!==r&&(Jo=t,n=Ir()),t=n,t===r&&(t=Xo,n=dc(),n!==r&&(Jo=t,n=Or()),t=n)))),t}function di(){let t,n;return t=Xo,n=Fi(),n!==r&&(Jo=t,n=Fr(n)),t=n,t}function vi(){let t,n;return t=Xo,n=Fi(),n!==r&&(Jo=t,n=Sr(n)),t=n,t}function yi(){let t,n,e;return t=Xo,n=Ji(),n!==r?(Sc(),e=Ei(),e!==r?(Jo=t,t=Mr(e)):(Xo=t,t=r)):(Xo=t,t=r),t}function hi(){let t,n;return t=Xo,n=$i(),n!==r&&(Jo=t,n=$r()),t=n,t}function gi(){let t,n;return t=Xo,n=Di(),n!==r&&(Jo=t,n=Dr()),t=n,t===r&&(t=Xo,n=Ui(),n!==r&&(Jo=t,n=Ur()),t=n),t}function Ei(){let t;return t=Ci(),t===r&&(t=qu()),t}function Ci(){let t,e,o,u,i;if(t=Xo,39===n.charCodeAt(Xo)?(e=h,Xo++):(e=r,0===ru&&pu(Yt)),e===r&&(n.substr(Xo,2)===g?(e=g,Xo+=2):(e=r,0===ru&&pu(qt))),e!==r){for(o=[],u=Xo,n.substr(Xo,2)===E?(i=E,Xo+=2):(i=r,0===ru&&pu(Kt)),i!==r&&(Jo=u,i=_r()),u=i,u===r&&(u=n.charAt(Xo),xt.test(u)?Xo++:(u=r,0===ru&&pu(Vt)));u!==r;)o.push(u),u=Xo,n.substr(Xo,2)===E?(i=E,Xo+=2):(i=r,0===ru&&pu(Kt)),i!==r&&(Jo=u,i=_r()),u=i,u===r&&(u=n.charAt(Xo),xt.test(u)?Xo++:(u=r,0===ru&&pu(Vt)));39===n.charCodeAt(Xo)?(u=h,Xo++):(u=r,0===ru&&pu(Yt)),u!==r?(Jo=t,t=Hr(o)):(Xo=t,t=r)}else Xo=t,t=r;return t}function mi(){let t;return t=Ai(),t===r&&(t=bi()),t}function Ai(){let t,n,e,o,u,i,c;if(t=Xo,n=wc(),n!==r)if(Sc(),e=gu(),e!==r){for(Sc(),o=[],u=Xo,i=wi(),i!==r?(c=Sc(),u=i):(Xo=u,u=r);u!==r;)o.push(u),u=Xo,i=wi(),i!==r?(c=Sc(),u=i):(Xo=u,u=r);u=Tc(),u!==r?(Jo=t,t=Pr(e,o)):(Xo=t,t=r)}else Xo=t,t=r;else Xo=t,t=r;if(t===r)if(t=Xo,n=wc(),n!==r)if(Sc(),e=gu(),e!==r){for(Sc(),o=[],u=Xo,i=wi(),i!==r?(c=Sc(),u=i):(Xo=u,u=r);u!==r;)o.push(u),u=Xo,i=wi(),i!==r?(c=Sc(),u=i):(Xo=u,u=r);u=Ti(),u!==r?(i=Sc(),c=Tc(),c!==r?(Jo=t,t=Zr(e,o,u)):(Xo=t,t=r)):(Xo=t,t=r)}else Xo=t,t=r;else Xo=t,t=r;return t}function bi(){let t,n,e,o,u,i;if(t=Xo,n=wc(),n!==r){for(Sc(),e=[],o=Xo,u=Li(),u!==r?(i=Sc(),o=u):(Xo=o,o=r);o!==r;)e.push(o),o=Xo,u=Li(),u!==r?(i=Sc(),o=u):(Xo=o,o=r);o=Tc(),o!==r?(Jo=t,t=jr(e)):(Xo=t,t=r)}else Xo=t,t=r;if(t===r)if(t=Xo,n=wc(),n!==r){for(Sc(),e=[],o=Xo,u=Li(),u!==r?(i=Sc(),o=u):(Xo=o,o=r);o!==r;)e.push(o),o=Xo,u=Li(),u!==r?(i=Sc(),o=u):(Xo=o,o=r);o=Ti(),o!==r?(u=Sc(),i=Tc(),i!==r?(Jo=t,t=kr(e,o)):(Xo=t,t=r)):(Xo=t,t=r)}else Xo=t,t=r;return t}function Li(){let t,n,e,o,u;return t=Xo,n=xc(),n!==r?(Sc(),e=gu(),e!==r?(Sc(),o=Nc(),o!==r?(Sc(),u=gu(),u!==r?(Jo=t,t=zr(e,u)):(Xo=t,t=r)):(Xo=t,t=r)):(Xo=t,t=r)):(Xo=t,t=r),t}function wi(){let t,n,e,o,u;return t=Xo,n=xc(),n!==r?(Sc(),e=gu(),e!==r?(Sc(),o=Nc(),o!==r?(Sc(),u=gu(),u!==r?(Jo=t,t=Gr(e,u)):(Xo=t,t=r)):(Xo=t,t=r)):(Xo=t,t=r)):(Xo=t,t=r),t}function Ti(){let t,n,e;return t=Xo,n=Rc(),n!==r?(Sc(),e=gu(),e!==r?(Jo=t,t=Wr(e)):(Xo=t,t=r)):(Xo=t,t=r),t}function xi(){let t,n,e,o;return t=Xo,n=Ni(),n!==r?(e=Xo,ru++,o=Pu(),ru--,o===r?e=void 0:(Xo=e,e=r),e!==r?(Jo=t,t=Br(n)):(Xo=t,t=r)):(Xo=t,t=r),t}function Ni(){let t,n,e,o;return t=Xo,n=Ri(),n!==r?(e=Ii(),e!==r?(o=Oi(),o!==r?(Jo=t,t=Yr(n,e,o)):(Xo=t,t=r)):(Xo=t,t=r)):(Xo=t,t=r),t===r&&(t=Xo,n=Ri(),n!==r?(e=Ii(),e!==r?(Jo=t,t=qr(n,e)):(Xo=t,t=r)):(Xo=t,t=r),t===r&&(t=Xo,n=Ri(),n!==r?(e=Oi(),e!==r?(Jo=t,t=Kr(n,e)):(Xo=t,t=r)):(Xo=t,t=r),t===r&&(t=Xo,n=Ri(),n!==r&&(Jo=t,n=Vr(n)),t=n))),t}function Ri(){let t,e,o;return t=Fi(),t===r&&(t=Xo,e=n.charAt(Xo),mt.test(e)?Xo++:(e=r,0===ru&&pu(Pt)),e!==r?(o=Fi(),o!==r?(Jo=t,t=Xr(e,o)):(Xo=t,t=r)):(Xo=t,t=r)),t}function Ii(){let t,e,o;return t=Xo,46===n.charCodeAt(Xo)?(e=C,Xo++):(e=r,0===ru&&pu(Xt)),e!==r?(o=Fi(),o===r&&(o=null),Jo=t,t=Jr(o)):(Xo=t,t=r),t}function Oi(){let t,n,e;return t=Xo,n=Mi(),n!==r?(e=Fi(),e!==r?(Jo=t,t=Qr(n,e)):(Xo=t,t=r)):(Xo=t,t=r),t}function Fi(){let t,n,e;if(t=Xo,n=[],e=Si(),e!==r)for(;e!==r;)n.push(e),e=Si();else n=r;return n!==r&&(Jo=t,n=to(n)),t=n,t}function Si(){let t;return t=n.charAt(Xo),Nt.test(t)?Xo++:(t=r,0===ru&&pu(Jt)),t}function Mi(){let t,e,o;return t=Xo,e=n.charAt(Xo),Rt.test(e)?Xo++:(e=r,0===ru&&pu(Qt)),e!==r?(o=n.charAt(Xo),mt.test(o)?Xo++:(o=r,0===ru&&pu(Pt)),o===r&&(o=null),Jo=t,t=no(e,o)):(Xo=t,t=r),t}function $i(){let t,e,o,u;return t=Xo,e=n.substr(Xo,4),e.toLowerCase()===m?Xo+=4:(e=r,0===ru&&pu(tn)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(e=[e,o],t=e):(Xo=t,t=r)):(Xo=t,t=r),t}function Di(){let t,e,o,u;return t=Xo,e=n.substr(Xo,4),e.toLowerCase()===A?Xo+=4:(e=r,0===ru&&pu(nn)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(e=[e,o],t=e):(Xo=t,t=r)):(Xo=t,t=r),t}function Ui(){let t,e,o,u;return t=Xo,e=n.substr(Xo,5),e.toLowerCase()===b?Xo+=5:(e=r,0===ru&&pu(en)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(e=[e,o],t=e):(Xo=t,t=r)):(Xo=t,t=r),t}function _i(){let t,e,o,u;return t=Xo,e=n.substr(Xo,2),e.toLowerCase()===L?Xo+=2:(e=r,0===ru&&pu(rn)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=eo()):(Xo=t,t=r)):(Xo=t,t=r),t}function Hi(){let t,e,o,u;return t=Xo,e=n.substr(Xo,2),e.toLowerCase()===w?Xo+=2:(e=r,0===ru&&pu(on)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=ro()):(Xo=t,t=r)):(Xo=t,t=r),t}function Pi(){let t,e,o,u;return t=Xo,e=n.substr(Xo,4),e.toLowerCase()===T?Xo+=4:(e=r,0===ru&&pu(un)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=oo()):(Xo=t,t=r)):(Xo=t,t=r),t}function Zi(){let t,e,o,u;return t=Xo,e=n.substr(Xo,6),e.toLowerCase()===x?Xo+=6:(e=r,0===ru&&pu(cn)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=uo()):(Xo=t,t=r)):(Xo=t,t=r),t}function ji(){let t,e,o,u;return t=Xo,e=n.substr(Xo,3),e.toLowerCase()===N?Xo+=3:(e=r,0===ru&&pu(ln)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=io()):(Xo=t,t=r)):(Xo=t,t=r),t}function ki(){let t,e,o,u;return t=Xo,e=n.substr(Xo,3),e.toLowerCase()===R?Xo+=3:(e=r,0===ru&&pu(sn)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=co()):(Xo=t,t=r)):(Xo=t,t=r),t}function zi(){let t,e,o,u;return t=Xo,e=n.substr(Xo,2),e.toLowerCase()===I?Xo+=2:(e=r,0===ru&&pu(an)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=lo()):(Xo=t,t=r)):(Xo=t,t=r),t}function Gi(){let t,e,o,u;return t=Xo,e=n.substr(Xo,7),e.toLowerCase()===O?Xo+=7:(e=r,0===ru&&pu(fn)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=so()):(Xo=t,t=r)):(Xo=t,t=r),t}function Wi(){let t,e,o,u;return t=Xo,e=n.substr(Xo,4),e.toLowerCase()===F?Xo+=4:(e=r,0===ru&&pu(pn)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=ao()):(Xo=t,t=r)):(Xo=t,t=r),t}function Bi(){let t,e,o,u;return t=Xo,e=n.substr(Xo,3),e.toLowerCase()===S?Xo+=3:(e=r,0===ru&&pu(dn)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=fo()):(Xo=t,t=r)):(Xo=t,t=r),t}function Yi(){let t,e,o,u;return t=Xo,e=n.substr(Xo,9),e.toLowerCase()===M?Xo+=9:(e=r,0===ru&&pu(vn)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=po()):(Xo=t,t=r)):(Xo=t,t=r),t}function qi(){let t,e,o,u;return t=Xo,e=n.substr(Xo,7),e.toLowerCase()===$?Xo+=7:(e=r,0===ru&&pu(yn)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=vo()):(Xo=t,t=r)):(Xo=t,t=r),t}function Ki(){let t,e,o,u;return t=Xo,e=n.substr(Xo,4),e.toLowerCase()===D?Xo+=4:(e=r,0===ru&&pu(hn)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=yo()):(Xo=t,t=r)):(Xo=t,t=r),t}function Vi(){let t,e,o,u;return t=Xo,e=n.substr(Xo,8),e.toLowerCase()===U?Xo+=8:(e=r,0===ru&&pu(gn)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=ho()):(Xo=t,t=r)):(Xo=t,t=r),t}function Xi(){let t,e,o,u;return t=Xo,e=n.substr(Xo,9),e.toLowerCase()===_?Xo+=9:(e=r,0===ru&&pu(En)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=go()):(Xo=t,t=r)):(Xo=t,t=r),t}function Ji(){let t,e,o,u;return t=Xo,e=n.substr(Xo,4),e.toLowerCase()===H?Xo+=4:(e=r,0===ru&&pu(Cn)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=Eo()):(Xo=t,t=r)):(Xo=t,t=r),t}function Qi(){let t,e,o,u;return t=Xo,e=n.substr(Xo,4),e.toLowerCase()===P?Xo+=4:(e=r,0===ru&&pu(mn)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=Co()):(Xo=t,t=r)):(Xo=t,t=r),t}function tc(){let t,e,o,u;return t=Xo,e=n.substr(Xo,7),e.toLowerCase()===Z?Xo+=7:(e=r,0===ru&&pu(An)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=mo()):(Xo=t,t=r)):(Xo=t,t=r),t}function nc(){let t,e,o,u;return t=Xo,e=n.substr(Xo,8),e.toLowerCase()===j?Xo+=8:(e=r,0===ru&&pu(bn)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=Ao()):(Xo=t,t=r)):(Xo=t,t=r),t}function ec(){let t,e,o,u;return t=Xo,e=n.substr(Xo,4),e.toLowerCase()===k?Xo+=4:(e=r,0===ru&&pu(Ln)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=bo()):(Xo=t,t=r)):(Xo=t,t=r),t}function rc(){let t,e,o,u;return t=Xo,e=n.substr(Xo,4),e.toLowerCase()===z?Xo+=4:(e=r,0===ru&&pu(wn)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=Lo()):(Xo=t,t=r)):(Xo=t,t=r),t}function oc(){let t,e,o,u;return t=Xo,e=n.substr(Xo,2),e.toLowerCase()===G?Xo+=2:(e=r,0===ru&&pu(Tn)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=wo()):(Xo=t,t=r)):(Xo=t,t=r),t}function uc(){let t,e,o,u;return t=Xo,e=n.substr(Xo,7),e.toLowerCase()===W?Xo+=7:(e=r,0===ru&&pu(xn)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=To()):(Xo=t,t=r)):(Xo=t,t=r),t}function ic(){let t,e,o,u;return t=Xo,e=n.substr(Xo,3),e.toLowerCase()===B?Xo+=3:(e=r,0===ru&&pu(Nn)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=xo()):(Xo=t,t=r)):(Xo=t,t=r),t}function cc(){let t,e,o,u;return t=Xo,e=n.substr(Xo,8),e.toLowerCase()===Y?Xo+=8:(e=r,0===ru&&pu(Rn)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=No()):(Xo=t,t=r)):(Xo=t,t=r),t}function lc(){let t,e,o,u;return t=Xo,e=n.substr(Xo,5),e.toLowerCase()===q?Xo+=5:(e=r,0===ru&&pu(In)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=Ro()):(Xo=t,t=r)):(Xo=t,t=r),t}function sc(){let t,e,o,u;return t=Xo,e=n.substr(Xo,4),e.toLowerCase()===K?Xo+=4:(e=r,0===ru&&pu(On)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=Io()):(Xo=t,t=r)):(Xo=t,t=r),t}function ac(){let t,e,o,u;return t=Xo,e=n.substr(Xo,7),e.toLowerCase()===V?Xo+=7:(e=r,0===ru&&pu(Fn)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=Oo()):(Xo=t,t=r)):(Xo=t,t=r),t}function fc(){let t,e,o,u;return t=Xo,e=n.substr(Xo,2),e.toLowerCase()===X?Xo+=2:(e=r,0===ru&&pu(Sn)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=Fo()):(Xo=t,t=r)):(Xo=t,t=r),t}function pc(){let t,e,o,u;return t=Xo,e=n.substr(Xo,8),e.toLowerCase()===J?Xo+=8:(e=r,0===ru&&pu(Mn)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=So()):(Xo=t,t=r)):(Xo=t,t=r),t}function dc(){let t,e,o,u;return t=Xo,e=n.substr(Xo,4),e.toLowerCase()===Q?Xo+=4:(e=r,0===ru&&pu($n)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=Mo()):(Xo=t,t=r)):(Xo=t,t=r),t}function vc(){let t,e,o,u;return t=Xo,e=n.substr(Xo,13),e.toLowerCase()===tt?Xo+=13:(e=r,0===ru&&pu(Dn)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=$o()):(Xo=t,t=r)):(Xo=t,t=r),t}function yc(){let t,e,o,u;return t=Xo,e=n.substr(Xo,15),e.toLowerCase()===nt?Xo+=15:(e=r,0===ru&&pu(Un)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=Do()):(Xo=t,t=r)):(Xo=t,t=r),t}function hc(){let t,e,o,u;return t=Xo,e=n.substr(Xo,5),e.toLowerCase()===et?Xo+=5:(e=r,0===ru&&pu(_n)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=Uo()):(Xo=t,t=r)):(Xo=t,t=r),t}function gc(){let t,e,o,u;return t=Xo,e=n.substr(Xo,3),e.toLowerCase()===rt?Xo+=3:(e=r,0===ru&&pu(Hn)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=_o()):(Xo=t,t=r)):(Xo=t,t=r),t}function Ec(){let t,e,o,u;return t=Xo,e=n.substr(Xo,4),e.toLowerCase()===ot?Xo+=4:(e=r,0===ru&&pu(Pn)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=Ho()):(Xo=t,t=r)):(Xo=t,t=r),t}function Cc(){let t,e,o,u;return t=Xo,e=n.substr(Xo,6),e.toLowerCase()===ut?Xo+=6:(e=r,0===ru&&pu(Zn)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=Po()):(Xo=t,t=r)):(Xo=t,t=r),t}function mc(){let t,e,o,u;return t=Xo,e=n.substr(Xo,6),e.toLowerCase()===it?Xo+=6:(e=r,0===ru&&pu(jn)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=Zo()):(Xo=t,t=r)):(Xo=t,t=r),t}function Ac(){let t,e,o,u;return t=Xo,e=n.substr(Xo,3),e.toLowerCase()===ct?Xo+=3:(e=r,0===ru&&pu(kn)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=jo()):(Xo=t,t=r)):(Xo=t,t=r),t}function bc(){let t,e,o,u;return t=Xo,e=n.substr(Xo,3),e.toLowerCase()===lt?Xo+=3:(e=r,0===ru&&pu(zn)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=ko()):(Xo=t,t=r)):(Xo=t,t=r),t}function Lc(){let t,e,o,u;return t=Xo,e=n.substr(Xo,4),e.toLowerCase()===st?Xo+=4:(e=r,0===ru&&pu(Gn)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=zo()):(Xo=t,t=r)):(Xo=t,t=r),t}function wc(){let t,e,o,u;return t=Xo,e=n.substr(Xo,4),e.toLowerCase()===at?Xo+=4:(e=r,0===ru&&pu(Wn)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=Go()):(Xo=t,t=r)):(Xo=t,t=r),t}function Tc(){let t,e,o,u;return t=Xo,e=n.substr(Xo,3),e.toLowerCase()===ft?Xo+=3:(e=r,0===ru&&pu(Bn)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=Wo()):(Xo=t,t=r)):(Xo=t,t=r),t}function xc(){let t,e,o,u;return t=Xo,e=n.substr(Xo,4),e.toLowerCase()===pt?Xo+=4:(e=r,0===ru&&pu(Yn)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=Bo()):(Xo=t,t=r)):(Xo=t,t=r),t}function Nc(){let t,e,o,u;return t=Xo,e=n.substr(Xo,4),e.toLowerCase()===dt?Xo+=4:(e=r,0===ru&&pu(qn)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=Yo()):(Xo=t,t=r)):(Xo=t,t=r),t}function Rc(){let t,e,o,u;return t=Xo,e=n.substr(Xo,4),e.toLowerCase()===vt?Xo+=4:(e=r,0===ru&&pu(Kn)),e!==r?(o=Xo,ru++,u=Zu(),ru--,u===r?o=void 0:(Xo=o,o=r),o!==r?(Jo=t,t=qo()):(Xo=t,t=r)):(Xo=t,t=r),t}function Ic(){let t;return 44===n.charCodeAt(Xo)?(t=yt,Xo++):(t=r,0===ru&&pu(Vn)),t}function Oc(){let t;return 40===n.charCodeAt(Xo)?(t=ht,Xo++):(t=r,0===ru&&pu(Xn)),t}function Fc(){let t;return 41===n.charCodeAt(Xo)?(t=gt,Xo++):(t=r,0===ru&&pu(Jn)),t}function Sc(){let t,n;for(t=[],n=Mc();n!==r;)t.push(n),n=Mc();return t}function Mc(){let t;return t=n.charAt(Xo),It.test(t)?Xo++:(t=r,0===ru&&pu(Qn)),t}function $c(){let t,e,o,u;if(t=Xo,e=Hu(),e!==r&&(Jo=t,e=Ko(e)),t=e,t===r)if(t=Xo,96===n.charCodeAt(Xo)?(e=Et,Xo++):(e=r,0===ru&&pu(te)),e!==r){if(o=[],u=n.charAt(Xo),Ot.test(u)?Xo++:(u=r,0===ru&&pu(ne)),u!==r)for(;u!==r;)o.push(u),u=n.charAt(Xo),Ot.test(u)?Xo++:(u=r,0===ru&&pu(ne));else o=r;o!==r?(96===n.charCodeAt(Xo)?(u=Et,Xo++):(u=r,0===ru&&pu(te)),u!==r?(Jo=t,t=Vo(o)):(Xo=t,t=r)):(Xo=t,t=r)}else Xo=t,t=r;return t}function Dc(t,n,e){return{type:"unary-expression",location:e,operator:t,expr:n}}function Uc(t,n,e,r,o){const u={type:"binary-expression",location:o,operator:t,left:n,right:e};return void 0!==r&&(u.escape=r),u}function _c(t,...n){return{type:"expression-list",location:t,value:n}}function Hc(t,n){let e=t;for(const{op:r,expr:o,location:{end:u}}of n)e=Uc(r,e,o,void 0,{...e.location,end:u});return e}function Pc(t){!0!==/^(\d{4})-(\d{1,2})-(\d{1,2})$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})(\.[0-9]+)?$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})(\.[0-9]+)?[ ]{0,1}(\+|\-)(\d{1,2}):(\d{1,2})$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2})?[ ]{0,1}(\+|\-)(\d{1,2}):(\d{1,2})$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2})$/.test(t)&&uu("Timestamp literal is invalid")}function Zc(t){!0!==/^(\d{1,2}):(\d{1,2}):(\d{1,2})$|^(\d{1,2}):(\d{1,2})$|^(\d{1,2}):(\d{1,2}):(\d{1,2}).([0-9]+)$/.test(t)&&uu("Time literal is invalid")}function jc(t){!0!==/^(\d{4})-(\d{1,2})-(\d{1,2})$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})(\.[0-9]+)?$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})(\.[0-9]+)?[ ]{0,1}(\+|\-)(\d{1,2}):(\d{1,2})$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2})?[ ]{0,1}(\+|\-)(\d{1,2}):(\d{1,2})$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2})$/.test(t)&&uu("Date literal is invalid")}tu=i();const kc=tu!==r&&Xo===n.length;function zc(){throw tu!==r&&Xo<n.length&&pu(su()),vu(eu,nu<n.length?iu(nu):null,nu<n.length?fu(nu,nu+1):fu(nu,nu))}return e.peg$library?{peg$result:tu,peg$currPos:Xo,peg$FAILED:r,peg$maxFailExpected:eu,peg$maxFailPos:nu,peg$success:kc,peg$throw:kc?void 0:zc}:kc?tu:void zc()}class e{static parse(t){return n(t)}}function r(t,n){if(null!=t)switch(n(t),t.type){case"when-clause":r(t.operand,n),r(t.value,n);break;case"case-expression":for(const e of t.clauses)r(e,n);"simple"===t.format&&r(t.operand,n),null!==t.else&&r(t.else,n);break;case"expression-list":for(const e of t.value)r(e,n);break;case"unary-expression":r(t.expr,n);break;case"binary-expression":r(t.left,n),r(t.right,n);break;case"function":r(t.args,n);break;case"interval":r(t.value,n),r(t.qualifier,n);break;case"interval-qualifier":r(t.start,n),r(t.end,n)}}export{e as WhereGrammar,r as visitAll};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import t from"../../../request.js";import{equals as r}from"../../../core/arrayUtils.js";import{throwIfAborted as e}from"../../../core/promiseUtils.js";import{getFileFormatId as s,getMimeTypeOrFilenameFormatId as n}from"../../../layers/support/infoFor3D.js";class a{constructor(t,r,e){this.assetName=t,this.assetMimeType=r,this.parts=e}equals(t){return this===t||this.assetName===t.assetName&&this.assetMimeType===t.assetMimeType&&r(this.parts,t.parts,((t,r)=>t.equals(r)))}isOnService(t){return this.parts.every((r=>r.isOnService(t)))}makeHash(){let t="";for(const r of this.parts)t+=r.partHash;return t}async toBlob(t){const{parts:r}=this;if(1===r.length)return r[0].toBlob(t);const s=await Promise.all(r.map((r=>r.toBlob(t))));return e(t),new Blob(s)}}class i{constructor(t,r){this.partUrl=t,this.partHash=r}equals(t){return this===t||this.partUrl===t.partUrl&&this.partHash===t.partHash}isOnService(t){return this.partUrl.startsWith(`${t.path}/assets/`)}async toBlob(r){const{data:s}=await t(this.partUrl,{responseType:"blob"});return e(r),s}}function o(t){return l(t?.source)}function u(t){if(!Array.isArray(t))return!1;return t.every((t=>t instanceof a))}const c=/^(model\/gltf\+json)|(model\/gltf-binary)$/,f=/\.(gltf|glb)/i;function l(t){if(!t)return!1;if(Array.isArray(t)){return t.some(p)}return p(t)}function p(t){if(t instanceof File){const{type:r,name:e}=t;return c.test(r)||f.test(e)}return c.test(t.assetMimeType)||f.test(t.assetName)}function m(t,r){if(!t)return!1;const{source:e}=t;return y(e,r)}function h(t,r){if(t===r)return!0;const{source:e}=t,{source:s}=r;if(e===s)return!0;if(u(e)&&u(s)){if(e.length!==s.length)return!1;const t=(t,r)=>t.assetName<r.assetName?-1:t.assetName>r.assetName?1:0,r=[...e].sort(t),n=[...s].sort(t);for(let e=0;e<r.length;++e)if(!r[e].equals(n[e]))return!1;return!0}return!1}function y(t,r){if(Array.isArray(t)){const e=t;return e.length>0&&e.every((t=>g(t,r)))}return g(t,r)}function g(t,r){return t instanceof a&&t.isOnService(r)}function b(t,r){return t instanceof File?s(t,r):n(t.assetMimeType,t.assetName,r)}function N(t){return Array.isArray(t)?t:[t]}function A(t){return!!t.original}export{a as ServiceAsset,i as ServiceAssetPart,b as assetFormatId,g as assetIsOnService,m as externalIsOnService,N as externalSourceToMultiPart,h as externalSourcesAreEqual,p as isDisplayAsset,o as isDisplayExternal,l as isDisplaySource,A as isOriginalExternal,y as sourceIsOnService};
5
+ import s from"../../../request.js";import{equals as t}from"../../../core/arrayUtils.js";import"../../../core/has.js";import{throwIfAborted as e}from"../../../core/promiseUtils.js";import{getFileFormatId as r,getMimeTypeOrFilenameFormatId as a}from"../../../layers/support/infoFor3D.js";class i{constructor(s,t,e){this.assetName=s,this.assetMimeType=t,this.parts=e}equals(s){return this===s||this.assetName===s.assetName&&this.assetMimeType===s.assetMimeType&&t(this.parts,s.parts,((s,t)=>s.equals(t)))}isOnService(s){return this.parts.every((t=>t.isOnService(s)))}makeHash(){let s="";for(const t of this.parts)s+=t.partHash;return s}async toBlob(s){const{parts:t}=this;if(1===t.length)return t[0].toBlob(s);const r=await Promise.all(t.map((t=>t.toBlob(s))));return e(s),new Blob(r)}}class n{constructor(s,t){this.partUrl=s,this.partHash=t}equals(s){return this===s||this.partUrl===s.partUrl&&this.partHash===s.partHash}isOnService(s){return this.partUrl.startsWith(`${s.path}/assets/`)}async toBlob(t){const{data:r}=await s(this.partUrl,{responseType:"blob"});return e(t),r}}function o(s){return l(s?.source)}const c=/^(model\/gltf\+json)|(model\/gltf-binary)$/,u=/\.(gltf|glb)/i;function l(s){switch(s?.type){case"client":return Array.isArray(s.files)?s.files.some(p):p(s.files);case"service":return s.assets.some(p);case"loadable":return!0;default:return!1}}function p(s){if(s instanceof File){const{type:t,name:e}=s;return c.test(t)||u.test(e)}return c.test(s.assetMimeType)||u.test(s.assetName)}function f(s,t){if(!s)return!1;const{source:e}=s;return h(e,t)}function m(s,t){if(s===t)return!0;const{source:e}=s,{source:r}=t;if(e===r)return!0;if("service"===e.type&&"service"===r.type){if(e.assets.length!==r.assets.length)return!1;const s=(s,t)=>s.assetName<t.assetName?-1:s.assetName>t.assetName?1:0,t=[...e.assets].sort(s),a=[...r.assets].sort(s);for(let e=0;e<t.length;++e)if(!t[e].equals(a[e]))return!1;return!0}return!1}function h(s,t){return"service"===s.type&&s.assets.every((s=>s.isOnService(t)))}function y(s,t){return s instanceof File?r(s,t):a(s.assetMimeType,s.assetName,t)}function b(s){switch(s.type){case"client":return Array.isArray(s.files)?s.files:[s.files];case"service":return s.assets;case"loadable":return}}function v(s){return!!s.original}export{i as ServiceAsset,n as ServiceAssetPart,y as assetFormatId,f as externalIsOnService,b as externalSourceToMultiPart,m as externalSourcesAreEqual,p as isDisplayAsset,o as isDisplayExternal,l as isDisplaySource,v as isOriginalExternal};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../core/Error.js";import{whenOrAbort as t,throwIfAborted as s,allSettledValues as n,isAborted as r,createAbortError as o}from"../../../core/promiseUtils.js";import{removeFile as i,makeRelative as l}from"../../../core/urlUtils.js";import a from"../../Point.js";async function c(e,n,r){const{source:o}=n,{loadGLTFMesh:i}=await t(import("./loadGLTFMesh.js"),r),l=await f(o,r);s(r);const c=i(new a({x:0,y:0,z:0,spatialReference:e.spatialReference}),l.url,{resolveFile:u(l),signal:r?.signal,expectedType:l.type,unitConversionDisabled:n.unitConversionDisabled});c.then((()=>l.dispose()),(()=>l.dispose()));const{vertexAttributes:m,components:p}=await c;e.vertexAttributes=m,e.components=p}function u(e){const t=i(e.url);return s=>{const n=l(s,t,t),r=n?n.replace(/^ *\.\//,""):null;return(r?e.files.get(r):null)??s}}async function f(t,s){if(Array.isArray(t)){if(!t.length)throw new e("mesh-load-external:missing-assets","There must be at least one file to load");return t[0]instanceof File?y(t):h(t,s)}return p(t)}async function m(e,t){const{parts:n,assetMimeType:r,assetName:o}=e;if(1===n.length)return new v(n[0].partUrl);const i=await e.toBlob(t);return s(t),v.fromBlob(i,x(o,r))}function p(e){return v.fromBlob(e,x(e.name,e.type))}function y(e){return j(e.map((e=>({name:e.name,mimeType:e.type,source:p(e)}))))}async function h(e,t){const i=await n(e.map((async e=>{const n=await m(e);return s(t),{name:e.assetName,mimeType:e.assetMimeType,source:n}})));if(r(t))throw i.forEach((e=>e.source.dispose())),o();return j(i)}const d=/^model\/gltf\+json$/,g=/^model\/gltf-binary$/,w=/\.gltf$/i,b=/\.glb$/i;function T({mimeType:e,source:t,name:s}){return d.test(e)||w.test(s)?{url:t.url,type:"gltf"}:g.test(e)||b.test(s)?{url:t.url,type:"glb"}:null}function j(t){const s=new Map;let n=null,r=null;for(const e of t){const{source:t,name:o}=e;n??=T(e),"ESRI3DO_NORM.glb"===o&&(r=T(e)),s.set(o,t.url),t.files.forEach(((e,t)=>s.set(t,e)))}const o=r??n;if(null==o)throw new e("mesh-load-external:missing-files","Missing files to load external mesh source");return new v(o.url,(()=>t.forEach((({source:e})=>e.dispose()))),s,o.type)}class v{constructor(e,t=()=>{},s=new Map,n){this.url=e,this.dispose=t,this.files=s,this.type=n}static fromBlob(e,t){const s=URL.createObjectURL(e);return new v(s,(()=>URL.revokeObjectURL(s)),void 0,t)}}function x(e,t){return d.test(t)||w.test(e)?"gltf":g.test(t)||w.test(e)?"glb":void 0}export{c as loadExternal};
5
+ import{neverReached as e}from"../../../core/compilerUtils.js";import t from"../../../core/Error.js";import{whenOrAbort as s,throwIfAborted as r,allSettledValues as n,isAborted as o,createAbortError as i}from"../../../core/promiseUtils.js";import{removeFile as l,makeRelative as a}from"../../../core/urlUtils.js";import c from"../../Point.js";async function u(t,s,r){switch(s.source.type){case"client":case"service":return f(t,s,r);case"loadable":return s.source.load(t,r);default:e(s.source)}}async function f(e,t,n){const{source:o}=t,{loadGLTFMesh:i}=await s(import("./loadGLTFMesh.js"),n),l=await p(o,n);r(n);const a=i(new c({x:0,y:0,z:0,spatialReference:e.spatialReference}),l.url,{resolveFile:m(l),signal:n?.signal,expectedType:l.type,unitConversionDisabled:t.unitConversionDisabled});a.then((()=>l.dispose()),(()=>l.dispose()));const{vertexAttributes:u,components:f}=await a;e.vertexAttributes=u,e.components=f}function m(e){const t=l(e.url);return s=>{const r=a(s,t,t),n=r?r.replace(/^ *\.\//,""):null;return(n?e.files.get(n):null)??s}}async function p(e,s){switch(e.type){case"client":return Array.isArray(e.files)?y(e.files):h(e.files);case"service":return w(e.assets,s);default:throw new t("mesh-load-external:invalid-source","Invalid source type")}}async function d(e,t){const{parts:s,assetMimeType:n,assetName:o}=e;if(1===s.length)return new M(s[0].partUrl);const i=await e.toBlob(t);return r(t),M.fromBlob(i,R(o,n))}function h(e){return M.fromBlob(e,R(e.name,e.type))}function y(e){if(!e.length)throw new t("mesh-load-external:missing-assets","There must be at least one file to load");return j(e.map((e=>({name:e.name,mimeType:e.type,source:h(e)}))))}async function w(e,s){if(!e.length)throw new t("mesh-load-external:missing-assets","There must be at least one file to load");const l=await n(e.map((async e=>{const t=await d(e);return r(s),{name:e.assetName,mimeType:e.assetMimeType,source:t}})));if(o(s))throw l.forEach((e=>e.source.dispose())),i();return j(l)}const g=/^model\/gltf\+json$/,b=/^model\/gltf-binary$/,v=/\.gltf$/i,x=/\.glb$/i;function T({mimeType:e,source:t,name:s}){return g.test(e)||v.test(s)?{url:t.url,type:"gltf"}:b.test(e)||x.test(s)?{url:t.url,type:"glb"}:null}function j(e){const s=new Map;let r=null,n=null;for(const t of e){const{source:e,name:o}=t;r??=T(t),"ESRI3DO_NORM.glb"===o&&(n=T(t)),s.set(o,e.url),e.files.forEach(((e,t)=>s.set(t,e)))}const o=n??r;if(null==o)throw new t("mesh-load-external:missing-files","Missing files to load external mesh source");return new M(o.url,(()=>e.forEach((({source:e})=>e.dispose()))),s,o.type)}class M{constructor(e,t=()=>{},s=new Map,r){this.url=e,this.dispose=t,this.files=s,this.type=r}static fromBlob(e,t){const s=URL.createObjectURL(e);return new M(s,(()=>URL.revokeObjectURL(s)),void 0,t)}}function R(e,t){return g.test(t)||v.test(e)?"gltf":b.test(t)||v.test(e)?"glb":void 0}export{u as loadExternal};