Newer
Older
osm-data / lib / ol6.14.1-dist / 226.ol.js
"use strict";(self.webpackChunkol=self.webpackChunkol||[]).push([[226],{165:function(r,n,t){function e(r,n){var t=r.length-n,e=0;do{for(var o=n;o>0;o--)r[e+n]+=r[e],e++;t-=n}while(t>0)}function o(r,n,t){for(var e=0,o=r.length,i=o/t;o>n;){for(var u=n;u>0;--u)r[e+n]+=r[e],++e;o-=n}for(var c=r.slice(),f=0;f<i;++f)for(var a=0;a<t;++a)r[t*f+a]=c[(t-a-1)*i+f]}function i(r,n,t,i,u,c){if(!n||1===n)return r;for(var f=0;f<u.length;++f){if(u[f]%8!=0)throw new Error("When decoding with predictor, only multiple of 8 bits are supported.");if(u[f]!==u[0])throw new Error("When decoding with predictor, all samples must have the same size.")}for(var a=u[0]/8,s=2===c?1:u.length,l=0;l<i&&!(l*s*t*a>=r.byteLength);++l){var v=void 0;if(2===n){switch(u[0]){case 8:v=new Uint8Array(r,l*s*t*a,s*t*a);break;case 16:v=new Uint16Array(r,l*s*t*a,s*t*a/2);break;case 32:v=new Uint32Array(r,l*s*t*a,s*t*a/4);break;default:throw new Error("Predictor 2 not allowed with ".concat(u[0]," bits per sample."))}e(v,s)}else 3===n&&o(v=new Uint8Array(r,l*s*t*a,s*t*a),s,a)}return r}function u(r,n,t,e,o,i,u){try{var c=r[i](u),f=c.value}catch(r){return void t(r)}c.done?n(f):Promise.resolve(f).then(e,o)}function c(r,n){for(var t=0;t<n.length;t++){var e=n[t];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(r,e.key,e)}}t.d(n,{Z:function(){return f}});var f=function(){function r(){!function(r,n){if(!(r instanceof n))throw new TypeError("Cannot call a class as a function")}(this,r)}var n,t,e,o,f;return n=r,(t=[{key:"decode",value:(o=regeneratorRuntime.mark((function r(n,t){var e,o,u,c,f;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.decodeBlock(t);case 2:if(e=r.sent,1===(o=n.Predictor||1)){r.next=9;break}return u=!n.StripOffsets,c=u?n.TileWidth:n.ImageWidth,f=u?n.TileLength:n.RowsPerStrip||n.ImageLength,r.abrupt("return",i(e,o,c,f,n.BitsPerSample,n.PlanarConfiguration));case 9:return r.abrupt("return",e);case 10:case"end":return r.stop()}}),r,this)})),f=function(){var r=this,n=arguments;return new Promise((function(t,e){var i=o.apply(r,n);function c(r){u(i,t,e,c,f,"next",r)}function f(r){u(i,t,e,c,f,"throw",r)}c(void 0)}))},function(r,n){return f.apply(this,arguments)})}])&&c(n.prototype,t),e&&c(n,e),Object.defineProperty(n,"prototype",{writable:!1}),r}()},966:function(r,n,t){function e(r){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(r)}function o(r,n){if(!(r instanceof n))throw new TypeError("Cannot call a class as a function")}function i(r,n){for(var t=0;t<n.length;t++){var e=n[t];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(r,e.key,e)}}function u(r,n){return(u=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r})(r,n)}function c(r){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(r){return!1}}();return function(){var t,e=a(r);if(n){var o=a(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return f(this,t)}}function f(r,n){if(n&&("object"===e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(void 0===r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(r)}function a(r){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(r)}t.r(n),t.d(n,{default:function(){return s}});var s=function(r){!function(r,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(n&&n.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),n&&u(r,n)}(a,r);var n,t,e,f=c(a);function a(){return o(this,a),f.apply(this,arguments)}return n=a,(t=[{key:"decodeBlock",value:function(r){return r}}])&&i(n.prototype,t),e&&i(n,e),Object.defineProperty(n,"prototype",{writable:!1}),a}(t(165).Z)}}]);
//# sourceMappingURL=226.ol.js.map