export function assert(r,o){if(r)throw new Error(o)}export function error(r){throw new Error(r)}export function isNumber(r){return!isNaN(r)&&null!==r&&!isArray(r)}export function isString(r){return"string"==typeof r}export function isObject(r){return!!r&&r.constructor===Object}export function isArray(r){return!!r&&"[object Array]"===Object.prototype.toString.call(r)}export function compose(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var e=r.length-1;return function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];for(var t=e,i=r[e].apply(null,o);t--;)i=r[t].call(null,i);return i}}export function coordEach(r,o,e){if(void 0===e&&(e=!1),null!==r)for(var n,t,i,u,a,f,l,c,s=0,y=0,g=r.type,b="FeatureCollection"===g,p="Feature"===g,v=b?r.o.length:1,P=0;P<v;P++){a=(c=!!(l=b?r.o[P].t:p?r.t:r)&&"GeometryCollection"===l.type)?l.i.length:1;for(var x=0;x<a;x++){var k=0,w=0;if(null!==(u=c?l.i[x]:l)){var M=u.type;switch(s=!e||"Polygon"!==M&&"MultiPolygon"!==M?0:1,M){case null:break;case"Point":if(!1===o(f=u.u,y,P,k,w))return!1;y++,k++;break;case"LineString":case"MultiPoint":for(f=u.u,n=0;n<f.length;n++){if(!1===o(f[n],y,P,k,w))return!1;y++,"MultiPoint"===M&&k++}"LineString"===M&&k++;break;case"Polygon":case"MultiLineString":for(f=u.u,n=0;n<f.length;n++){for(t=0;t<f[n].length-s;t++){if(!1===o(f[n][t],y,P,k,w))return!1;y++}"MultiLineString"===M&&k++,"Polygon"===M&&w++}"Polygon"===M&&k++;break;case"MultiPolygon":for(f=u.u,n=0;n<f.length;n++){for(w=0,t=0;t<f[n].length;t++){for(i=0;i<f[n][t].length-s;i++){if(!1===o(f[n][t][i],y,P,k,w))return!1;y++}w++}k++}break;case"GeometryCollection":for(n=0;n<u.i.length;n++)if(!1===coordEach(u.i[n],o,e))return!1;break;default:error("Unknown Geometry Type")}}}}}