/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports"],(function(e){"use strict";function n(e,n,t,r=!0){if(n%4!=0||t%4!=0){const i=new ArrayBuffer(4*Math.ceil(t/4)),o=new Uint8Array(i),l=new Uint8Array(e,n,t);if(r)for(let e=0;e<o.length;e+=4)o[e]=l[e+3],o[e+1]=l[e+2],o[e+2]=l[e+1],o[e+3]=l[e];else o.set(l);return new Uint32Array(o.buffer)}if(r){const r=new Uint8Array(e,n,t),i=new Uint8Array(r.length);for(let e=0;e<i.length;e+=4)i[e]=r[e+3],i[e+1]=r[e+2],i[e+2]=r[e+1],i[e+3]=r[e];return new Uint32Array(i.buffer)}return new Uint32Array(e,n,t/4)}function t(){const e=[];for(let n=0;n<=257;n++)e[n]=[n];return e}function r(e,n){for(let t=0;t<n.length;t++)e.push(n[t])}const i=new Set;function o(e,o,l,s=!0){const f=n(e,o,l,s);let u=9,a=t(),c=32,d=a.length,h=[],g=1,w=f[0],y=0;const A=f.length,U=8*(4*A-l),b=[];for(;null!=w;){if(c>=u)c-=u,y=w>>>32-u,w<<=u;else{y=w>>>32-c,w=f[g++];const e=u-c;c=32-e,y=(y<<e)+(w>>>c),w<<=e}if(257===y)break;if(256===y){u=9,a=t(),d=a.length,h=[];continue}const e=a[y];if(null==e){if(y>a.length)throw"data integrity issue: code does not exist on code page";h.push(h[0]),a[d++]=h.slice(),r(b,h)}else r(b,e),h.push(e[0]),h.length>1&&(a[d++]=h.slice()),h=e.slice();if(i.has(d)&&u++,0===c&&(w=f[g++],c=32),g>A||g===A&&c<=U)break}return new Uint8Array(b)}i.add(511),i.add(1023),i.add(2047),i.add(4095),i.add(8191),e.decode=o,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
