UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

3 lines (2 loc) • 8.47 kB
/* COPYRIGHT Esri - https://js.arcgis.com/5.0.8/LICENSE.txt */ let t,e=null;function _(){return null!==e&&0!==e.byteLength||(e=new Uint8Array(t.memory.buffer)),e}let n=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});n.decode();const r=2146435072;let s=0;function i(t,e){return s+=e,s>=r&&(n=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),n.decode(),s=e),n.decode(_().subarray(t,t+e))}function a(t,e){return i(t>>>=0,e)}let o=0;const g=new TextEncoder;function c(t,e,n){if(void 0===n){const n=g.encode(t),r=e(n.length,1)>>>0;return _().subarray(r,r+n.length).set(n),o=n.length,r}let r=t.length,s=e(r,1)>>>0;const i=_();let a=0;for(;a<r;a++){const e=t.charCodeAt(a);if(e>127)break;i[s+a]=e}if(a!==r){0!==a&&(t=t.slice(a)),s=n(s,r,r=a+3*t.length,1)>>>0;const e=_().subarray(s+a,s+r);a+=g.encodeInto(t,e).written,s=n(s,r,a,1)>>>0}return o=a,s}"encodeInto"in g||(g.encodeInto=function(t,e){const _=g.encode(t);return e.set(_),{read:t.length,written:_.length}});let b=null;function w(){return(null===b||!0===b.buffer.detached||void 0===b.buffer.detached&&b.buffer!==t.memory.buffer)&&(b=new DataView(t.memory.buffer)),b}function f(){t.enableTracing()}function l(t,e){const n=e(1*t.length,1)>>>0;return _().set(t,n/1),o=t.length,n}function p(e){const _=t.__wbindgen_externrefs.get(e);return t.__externref_table_dealloc(e),_}let u=null;function d(){return null!==u&&0!==u.byteLength||(u=new Uint32Array(t.memory.buffer)),u}function h(t,e){const _=e(4*t.length,4)>>>0;return d().set(t,_/4),o=t.length,_}function y(e,_){e>>>=0;const n=w(),r=[];for(let s=e;s<e+4*_;s+=4)r.push(t.__wbindgen_externrefs.get(n.getUint32(s,!0)));return t.__externref_drop_slice(e,_),r}const m="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>t.__wbg_face_free(e>>>0,1));class v{static __wrap(t){t>>>=0;const e=Object.create(v.prototype);return e.__wbg_ptr=t,m.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,m.unregister(this),t}free(){const e=this.__destroy_into_raw();t.__wbg_face_free(e,0)}static parse(e){const _=l(e,t.__wbindgen_malloc),n=o,r=t.face_parse(_,n);if(r[2])throw p(r[1]);return v.__wrap(r[0])}static parseWoff2(e){const _=l(e,t.__wbindgen_malloc),n=o,r=t.face_parseWoff2(_,n);if(r[2])throw p(r[1]);return v.__wrap(r[0])}shape(e,_,n){const r=c(e,t.__wbindgen_malloc,t.__wbindgen_realloc),s=o,i=h(_,t.__wbindgen_malloc),a=o,g=t.face_shape(this.__wbg_ptr,r,s,i,a,n);var b=y(g[0],g[1]).slice();return t.__wbindgen_free(g[0],4*g[1],4),b}paintCurves(e,_,n,r){const s=t.face_paintCurves(this.__wbg_ptr,e,_,n,r);return 0===s?void 0:T.__wrap(s)}midline(){return t.face_midline(this.__wbg_ptr)}baseline(){return t.face_baseline(this.__wbg_ptr)}}Symbol.dispose&&(v.prototype[Symbol.dispose]=v.prototype.free);const A="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>t.__wbg_glyphdata_free(e>>>0,1));class O{static __wrap(t){t>>>=0;const e=Object.create(O.prototype);return e.__wbg_ptr=t,A.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,A.unregister(this),t}free(){const e=this.__destroy_into_raw();t.__wbg_glyphdata_free(e,0)}get glyphId(){return t.__wbg_get_glyphdata_glyphId(this.__wbg_ptr)>>>0}set glyphId(e){t.__wbg_set_glyphdata_glyphId(this.__wbg_ptr,e)}get cluster(){return t.__wbg_get_glyphdata_cluster(this.__wbg_ptr)>>>0}set cluster(e){t.__wbg_set_glyphdata_cluster(this.__wbg_ptr,e)}get unsafeToBreak(){return 0!==t.__wbg_get_glyphdata_unsafeToBreak(this.__wbg_ptr)}set unsafeToBreak(e){t.__wbg_set_glyphdata_unsafeToBreak(this.__wbg_ptr,e)}get xAdvance(){return t.__wbg_get_glyphdata_xAdvance(this.__wbg_ptr)}set xAdvance(e){t.__wbg_set_glyphdata_xAdvance(this.__wbg_ptr,e)}get yAdvance(){return t.__wbg_get_glyphdata_yAdvance(this.__wbg_ptr)}set yAdvance(e){t.__wbg_set_glyphdata_yAdvance(this.__wbg_ptr,e)}get xOffset(){return t.__wbg_get_glyphdata_xOffset(this.__wbg_ptr)}set xOffset(e){t.__wbg_set_glyphdata_xOffset(this.__wbg_ptr,e)}get yOffset(){return t.__wbg_get_glyphdata_yOffset(this.__wbg_ptr)}set yOffset(e){t.__wbg_set_glyphdata_yOffset(this.__wbg_ptr,e)}get isWhitespace(){return 0!==t.__wbg_get_glyphdata_isWhitespace(this.__wbg_ptr)}set isWhitespace(e){t.__wbg_set_glyphdata_isWhitespace(this.__wbg_ptr,e)}get isNewline(){return 0!==t.__wbg_get_glyphdata_isNewline(this.__wbg_ptr)}set isNewline(e){t.__wbg_set_glyphdata_isNewline(this.__wbg_ptr,e)}}Symbol.dispose&&(O.prototype[Symbol.dispose]=O.prototype.free);const x="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>t.__wbg_glyphrect_free(e>>>0,1));class T{static __wrap(t){t>>>=0;const e=Object.create(T.prototype);return e.__wbg_ptr=t,x.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,x.unregister(this),t}free(){const e=this.__destroy_into_raw();t.__wbg_glyphrect_free(e,0)}get width(){return t.__wbg_get_glyphdata_xAdvance(this.__wbg_ptr)}set width(e){t.__wbg_set_glyphdata_xAdvance(this.__wbg_ptr,e)}get height(){return t.__wbg_get_glyphdata_yAdvance(this.__wbg_ptr)}set height(e){t.__wbg_set_glyphdata_yAdvance(this.__wbg_ptr,e)}get top(){return t.__wbg_get_glyphdata_xOffset(this.__wbg_ptr)}set top(e){t.__wbg_set_glyphdata_xOffset(this.__wbg_ptr,e)}get left(){return t.__wbg_get_glyphdata_yOffset(this.__wbg_ptr)}set left(e){t.__wbg_set_glyphdata_yOffset(this.__wbg_ptr,e)}}Symbol.dispose&&(T.prototype[Symbol.dispose]=T.prototype.free);const W=new Set(["basic","cors","default"]);async function I(t,e){if("function"==typeof Response&&t instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(t,e)}catch(_){if(!(t.ok&&W.has(t.type))||"application/wasm"===t.headers.get("Content-Type"))throw _;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",_)}const n=await t.arrayBuffer();return await WebAssembly.instantiate(n,e)}{const _=await WebAssembly.instantiate(t,e);return _ instanceof WebAssembly.Instance?{instance:_,module:t}:_}}function R(){const e={wbg:{}};return e.wbg.__wbg___wbindgen_throw_b855445ff6a94295=function(t,e){throw new Error(a(t,e))},e.wbg.__wbg_beginPath_ae4169e263573dcd=function(t){t.beginPath()},e.wbg.__wbg_bezierCurveTo_3ad512ab3d4a1424=function(t,e,_,n,r,s,i){t.bezierCurveTo(e,_,n,r,s,i)},e.wbg.__wbg_closePath_bc64fd4702f5fc60=function(t){t.closePath()},e.wbg.__wbg_error_7534b8e9a36f1ab4=function(e,_){let n,r;try{n=e,r=_,console.error(a(e,_))}finally{t.__wbindgen_free(n,r,1)}},e.wbg.__wbg_fill_c1b94332a3f5eecc=function(t){t.fill()},e.wbg.__wbg_glyphdata_new=function(t){return O.__wrap(t)},e.wbg.__wbg_lineTo_1e83b5f2f38f15f9=function(t,e,_){t.lineTo(e,_)},e.wbg.__wbg_moveTo_8064f6a508217dcd=function(t,e,_){t.moveTo(e,_)},e.wbg.__wbg_new_8a6f238a6ece86ea=function(){return new Error},e.wbg.__wbg_quadraticCurveTo_fc736a90d9e7a806=function(t,e,_,n,r){t.quadraticCurveTo(e,_,n,r)},e.wbg.__wbg_stack_0ed75d68575b0f3c=function(e,_){const n=c(_.stack,t.__wbindgen_malloc,t.__wbindgen_realloc),r=o;w().setInt32(e+4,r,!0),w().setInt32(e+0,n,!0)},e.wbg.__wbindgen_cast_2241b6af4c4b2941=function(t,e){return a(t,e)},e.wbg.__wbindgen_init_externref_table=function(){const e=t.__wbindgen_externrefs,_=e.grow(4);e.set(0,void 0),e.set(_+0,void 0),e.set(_+1,null),e.set(_+2,!0),e.set(_+3,!1)},e}function S(_,n){return t=_.exports,k.__wbindgen_wasm_module=n,b=null,u=null,e=null,t.__wbindgen_start(),t}function j(e){if(void 0!==t)return t;void 0!==e&&(Object.getPrototypeOf(e)===Object.prototype?({module:e}=e):console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));const _=R();e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e));return S(new WebAssembly.Instance(e,_),e)}async function k(e){if(void 0!==t)return t;void 0!==e&&(Object.getPrototypeOf(e)===Object.prototype?({module_or_path:e}=e):console.warn("using deprecated parameters for the initialization function; pass a single object instead"));const _=R();("string"==typeof e||"function"==typeof Request&&e instanceof Request||"function"==typeof URL&&e instanceof URL)&&(e=fetch(e));const{instance:n,module:r}=await I(await e,_);return S(n,r)}export{v as Face,O as GlyphData,T as GlyphRect,k as default,f as enableTracing,j as initSync};