@mapcatch/util 1.0.9 → 1.0.10-a
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.
- package/CHANGELOG.md +8 -1
- package/dist/catchUtil.min.esm.js +9906 -10852
- package/dist/catchUtil.min.js +25 -27
- package/package.json +1 -2
- package/src/constants/bmap_types.js +2 -2
- package/src/constants/crs_types.js +22 -0
- package/src/constants/default_layers.js +9 -9
- package/src/constants/index.js +3 -2
- package/src/constants/layer_folders.js +4 -4
- package/src/constants/measurement_fields.js +198 -0
- package/src/gl-operations/shaders/fragment/convertDem.js +2 -2
- package/src/gl-operations/shaders/fragment/convolutionSmooth.js +2 -2
- package/src/gl-operations/shaders/fragment/diffCalc.js +2 -2
- package/src/gl-operations/shaders/fragment/drawResult.js +2 -2
- package/src/gl-operations/shaders/fragment/hillshading/hsAdvAmbientShadows.js +2 -2
- package/src/gl-operations/shaders/fragment/hillshading/hsAdvFinalBaselayer.js +2 -2
- package/src/gl-operations/shaders/fragment/hillshading/hsAdvNormals.js +2 -2
- package/src/gl-operations/shaders/fragment/hillshading/hsAdvSoftShadows.js +2 -2
- package/src/gl-operations/shaders/fragment/interpolateColor.js +2 -2
- package/src/gl-operations/shaders/fragment/interpolateColorOnly.js +2 -2
- package/src/gl-operations/shaders/fragment/interpolateValue.js +2 -2
- package/src/gl-operations/shaders/fragment/multiAnalyze1Calc.js +2 -2
- package/src/gl-operations/shaders/fragment/multiAnalyze2Calc.js +2 -2
- package/src/gl-operations/shaders/fragment/multiAnalyze3Calc.js +2 -2
- package/src/gl-operations/shaders/fragment/multiAnalyze4Calc.js +2 -2
- package/src/gl-operations/shaders/fragment/multiAnalyze5Calc.js +2 -2
- package/src/gl-operations/shaders/fragment/multiAnalyze6Calc.js +2 -2
- package/src/gl-operations/shaders/vertex/double.js +2 -2
- package/src/gl-operations/shaders/vertex/multi3.js +2 -2
- package/src/gl-operations/shaders/vertex/multi4.js +2 -2
- package/src/gl-operations/shaders/vertex/multi5.js +2 -2
- package/src/gl-operations/shaders/vertex/multi6.js +2 -2
- package/src/gl-operations/shaders/vertex/singleNotTransformed.js +2 -2
- package/src/index.js +0 -2
- package/src/util.js +31 -51
- package/src/constants/map_view_mode.js +0 -10
- package/src/exif/exif.js +0 -37
- package/src/exif/gps_tags.js +0 -33
- package/src/exif/ifd1_tags.js +0 -22
- package/src/exif/index.js +0 -33
- package/src/exif/iptc_field_map.js +0 -12
- package/src/exif/parse_image.js +0 -445
- package/src/exif/string_values.js +0 -137
- package/src/exif/tags.js +0 -75
- package/src/exif/tiff_tags.js +0 -35
- package/src/exif/util.js +0 -108
- package/src/image-size/detector.js +0 -24
- package/src/image-size/fromFile.js +0 -55
- package/src/image-size/index.js +0 -2
- package/src/image-size/lookup.js +0 -37
- package/src/image-size/types/bmp.js +0 -10
- package/src/image-size/types/cur.js +0 -16
- package/src/image-size/types/dds.js +0 -10
- package/src/image-size/types/gif.js +0 -11
- package/src/image-size/types/heif.js +0 -35
- package/src/image-size/types/icns.js +0 -112
- package/src/image-size/types/ico.js +0 -74
- package/src/image-size/types/index.js +0 -43
- package/src/image-size/types/j2c.js +0 -11
- package/src/image-size/types/jp2.js +0 -22
- package/src/image-size/types/jpg.js +0 -157
- package/src/image-size/types/ktx.js +0 -18
- package/src/image-size/types/png.js +0 -36
- package/src/image-size/types/pnm.js +0 -74
- package/src/image-size/types/psd.js +0 -10
- package/src/image-size/types/svg.js +0 -100
- package/src/image-size/types/tga.js +0 -14
- package/src/image-size/types/tiff.js +0 -92
- package/src/image-size/types/utils.js +0 -83
- package/src/image-size/types/webp.js +0 -67
package/dist/catchUtil.min.js
CHANGED
|
@@ -1,50 +1,48 @@
|
|
|
1
|
-
(function(ir,di){typeof exports=="object"&&typeof module<"u"?di(exports):typeof define=="function"&&define.amd?define(["exports"],di):(ir=typeof globalThis<"u"?globalThis:ir||self,di(ir.catchUtil={}))})(this,function(ir){"use strict";const di={imageHasData(t){return!!t.exifdata},getStringFromDB(t,n,i){for(var a="",f=n;f<n+i;f++)a+=String.fromCharCode(t.getUint8(f));return a},xml2Object(t){try{var n={};if(t.children.length>0)for(var i=0;i<t.children.length;i++){var a=t.children.item(i),f=a.attributes;for(var s in f){var l=f[s],d=l.nodeName,v=l.nodeValue;d!==void 0&&(n[d]=v)}var I=a.nodeName;if(typeof n[I]>"u")n[I]=this.xml2json(a);else{if(typeof n[I].push>"u"){var B=n[I];n[I]=[],n[I].push(B)}n[I].push(this.xml2json(a))}}else n=t.textContent;return n}catch(p){console.log(p.message)}},xml2json(t){var n={};if(t.nodeType==1){if(t.attributes.length>0){n["@attributes"]={};for(var i=0;i<t.attributes.length;i++){var a=t.attributes.item(i);n["@attributes"][a.nodeName]=a.nodeValue}}}else if(t.nodeType==3)return t.nodeValue;if(t.hasChildNodes())for(var f=0;f<t.childNodes.length;f++){var s=t.childNodes.item(f),l=s.nodeName;if(n[l]==null)n[l]=this.xml2json(s);else{if(n[l].push==null){var d=n[l];n[l]=[],n[l].push(d)}n[l].push(this.xml2json(s))}}return n},objectURLToBlob(t,n){var i=new XMLHttpRequest;i.open("GET",t,!0),i.responseType="blob",i.onload=function(a){(this.status==200||this.status===0)&&n(this.response)},i.send()},base64ToArrayBuffer(t,n){n=n||t.match(/^data\:([^\;]+)\;base64,/mi)[1]||"",t=t.replace(/^data\:([^\;]+)\;base64,/gmi,"");for(var i=atob(t),a=i.length,f=new ArrayBuffer(a),s=new Uint8Array(f),l=0;l<a;l++)s[l]=i.charCodeAt(l);return f}},X_={256:"ImageWidth",257:"ImageHeight",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer",40965:"InteroperabilityIFDPointer",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",274:"Orientation",277:"SamplesPerPixel",284:"PlanarConfiguration",530:"YCbCrSubSampling",531:"YCbCrPositioning",282:"XResolution",283:"YResolution",296:"ResolutionUnit",273:"StripOffsets",278:"RowsPerStrip",279:"StripByteCounts",513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",301:"TransferFunction",318:"WhitePoint",319:"PrimaryChromaticities",529:"YCbCrCoefficients",532:"ReferenceBlackWhite",306:"DateTime",270:"ImageDescription",271:"Make",272:"Model",305:"Software",315:"Artist",33432:"Copyright"},q_={36864:"ExifVersion",40960:"FlashpixVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",40964:"RelatedSoundFile",36867:"DateTimeOriginal",36868:"DateTimeDigitized",37520:"SubsecTime",37521:"SubsecTimeOriginal",37522:"SubsecTimeDigitized",33434:"ExposureTime",33437:"FNumber",34850:"ExposureProgram",34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:"OECF",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureBias",37381:"MaxApertureValue",37382:"SubjectDistance",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37396:"SubjectArea",37386:"FocalLength",41483:"FlashEnergy",41484:"SpatialFrequencyResponse",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41492:"SubjectLocation",41493:"ExposureIndex",41495:"SensingMethod",41728:"FileSource",41729:"SceneType",41730:"CFAPattern",41985:"CustomRendered",41986:"ExposureMode",41987:"WhiteBalance",41988:"DigitalZoomRation",41989:"FocalLengthIn35mmFilm",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",40965:"InteroperabilityIFDPointer",42016:"ImageUniqueID"},zf={ExposureProgram:{0:"Not defined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},SensingMethod:{1:"Not defined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},SceneType:{1:"Directly photographed"},CustomRendered:{0:"Normal process",1:"Custom process"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},GainControl:{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},SubjectDistanceRange:{0:"Unknown",1:"Macro",2:"Close view",3:"Distant view"},FileSource:{3:"DSC"},Components:{0:"",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"}},K_={0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude",5:"GPSAltitudeRef",6:"GPSAltitude",7:"GPSTimeStamp",8:"GPSSatellites",9:"GPSStatus",10:"GPSMeasureMode",11:"GPSDOP",12:"GPSSpeedRef",13:"GPSSpeed",14:"GPSTrackRef",15:"GPSTrack",16:"GPSImgDirectionRef",17:"GPSImgDirection",18:"GPSMapDatum",19:"GPSDestLatitudeRef",20:"GPSDestLatitude",21:"GPSDestLongitudeRef",22:"GPSDestLongitude",23:"GPSDestBearingRef",24:"GPSDestBearing",25:"GPSDestDistanceRef",26:"GPSDestDistance",27:"GPSProcessingMethod",28:"GPSAreaInformation",29:"GPSDateStamp",30:"GPSDifferential"},j_=new TextDecoder,$r=(t,n=0,i=t.length)=>j_.decode(t.slice(n,i)),Bs=(t,n=0,i=t.length)=>t.slice(n,i).reduce((a,f)=>a+("0"+f.toString(16)).slice(-2),""),S0=(t,n=0)=>{const i=t[n]+t[n+1]*256;return i|(i&2**15)*131070},su=(t,n=0)=>t[n]*2**8+t[n+1],ti=(t,n=0)=>t[n]+t[n+1]*2**8,A0=(t,n=0)=>t[n]+t[n+1]*2**8+t[n+2]*2**16,Q_=(t,n=0)=>t[n]+t[n+1]*2**8+t[n+2]*2**16+(t[n+3]<<24),bn=(t,n=0)=>t[n]*2**24+t[n+1]*2**16+t[n+2]*2**8+t[n+3],Ko=(t,n=0)=>t[n]+t[n+1]*2**8+t[n+2]*2**16+t[n+3]*2**24,J_={readUInt16BE:su,readUInt16LE:ti,readUInt32BE:bn,readUInt32LE:Ko};function Ui(t,n,i,a){i=i||0;const f=a?"BE":"LE",s="readUInt"+n+f;return J_[s](t,i)}function ep(t,n){if(t.length-n<4)return;const i=bn(t,n);if(!(t.length-n<i))return{name:$r(t,4+n,8+n),offset:n,size:i}}function jo(t,n,i){for(;i<t.length;){const a=ep(t,i);if(!a)break;if(a.name===n)return a;i+=a.size}}const tp={validate:t=>$r(t,0,2)==="BM",calculate:t=>({height:Math.abs(Q_(t,22)),width:Ko(t,18)})},rp=1,np=2+2+2,ip=1+1+1+1+2+2+4+4;function T0(t,n){const i=t[n];return i===0?256:i}function E0(t,n){const i=np+n*ip;return{height:T0(t,i+1),width:T0(t,i)}}const D0={validate(t){const n=ti(t,0),i=ti(t,4);return n!==0||i===0?!1:ti(t,2)===rp},calculate(t){const n=ti(t,4),i=E0(t,0);if(n===1)return i;const a=[i];for(let f=1;f<n;f+=1)a.push(E0(t,f));return{height:i.height,images:a,width:i.width}}},ap=2,op={validate(t){const n=ti(t,0),i=ti(t,4);return n!==0||i===0?!1:ti(t,2)===ap},calculate:t=>D0.calculate(t)},sp={validate:t=>Ko(t,0)===542327876,calculate:t=>({height:Ko(t,12),width:Ko(t,16)})},fp=/^GIF8[79]a/,lp={validate:t=>fp.test($r(t,0,6)),calculate:t=>({height:ti(t,8),width:ti(t,6)})},up={avif:"avif",mif1:"heif",msf1:"heif",heic:"heic",heix:"heic",hevc:"heic",hevx:"heic"},cp={validate(t){const n=$r(t,4,8),i=$r(t,8,12);return n==="ftyp"&&i in up},calculate(t){const n=jo(t,"meta",0),i=n&&jo(t,"iprp",n.offset+12),a=i&&jo(t,"ipco",i.offset+8),f=a&&jo(t,"ispe",a.offset+8);if(f)return{height:bn(t,f.offset+16),width:bn(t,f.offset+12),type:$r(t,8,12)};throw new TypeError("Invalid HEIF, no size found")}},hp=4+4,dp=4,vp=4,_p={ICON:32,"ICN#":32,"icm#":16,icm4:16,icm8:16,"ics#":16,ics4:16,ics8:16,is32:16,s8mk:16,icp4:16,icl4:32,icl8:32,il32:32,l8mk:32,icp5:32,ic11:32,ich4:48,ich8:48,ih32:48,h8mk:48,icp6:64,ic12:32,it32:128,t8mk:128,ic07:128,ic08:256,ic13:256,ic09:512,ic14:512,ic10:1024};function L0(t,n){const i=n+vp;return[$r(t,n,i),bn(t,i)]}function R0(t){const n=_p[t];return{width:n,height:n,type:t}}const pp={validate:t=>$r(t,0,4)==="icns",calculate(t){const n=t.length,i=bn(t,dp);let a=hp,f=L0(t,a),s=R0(f[0]);if(a+=f[1],a===i)return s;const l={height:s.height,images:[s],width:s.width};for(;a<i&&a<n;)f=L0(t,a),s=R0(f[0]),a+=f[1],l.images.push(s);return l}},mp={validate:t=>Bs(t,0,4)==="ff4fff51",calculate:t=>({height:bn(t,12),width:bn(t,8)})},gp={validate(t){if(bn(t,4)!==1783636e3||bn(t,0)<1)return!1;const n=jo(t,"ftyp",0);return n?bn(t,n.offset+4)===1718909296:!1},calculate(t){const n=jo(t,"jp2h",0),i=n&&jo(t,"ihdr",n.offset+8);if(i)return{height:bn(t,i.offset+8),width:bn(t,i.offset+12)};throw new TypeError("Unsupported JPEG 2000 format")}},yp="45786966",xp=2,Xc=6,bp=2,wp="4d4d",Sp="4949",C0=12,Ap=2;function Tp(t){return Bs(t,2,6)===yp}function Ep(t,n){return{height:su(t,n),width:su(t,n+2)}}function Dp(t,n){const a=Xc+8,f=Ui(t,16,a,n);for(let s=0;s<f;s++){const l=a+Ap+s*C0,d=l+C0;if(l>t.length)return;const v=t.slice(l,d);if(Ui(v,16,0,n)===274)return Ui(v,16,2,n)!==3||Ui(v,32,4,n)!==1?void 0:Ui(v,16,8,n)}}function Lp(t,n){const i=t.slice(xp,n),a=Bs(i,Xc,Xc+bp),f=a===wp;if(f||a===Sp)return Dp(i,f)}function Rp(t,n){if(n>t.length)throw new TypeError("Corrupt JPG, exceeded buffer limits");if(t[n]!==255)throw new TypeError("Invalid JPG, marker table corrupted")}const Cp={validate:t=>Bs(t,0,2)==="ffd8",calculate(t){t=t.slice(4);let n,i;for(;t.length;){const a=su(t,0);if(Tp(t)&&(n=Lp(t,a)),Rp(t,a),i=t[a+1],i===192||i===193||i===194){const f=Ep(t,a+5);return n?{height:f.height,orientation:n,width:f.width}:f}t=t.slice(a+2)}throw new TypeError("Invalid JPG, no size found")}},Op={validate:t=>{const n=$r(t,1,7);return["KTX 11","KTX 20"].includes(n)},calculate:t=>{const n=t[5]===49?"ktx":"ktx2",i=n==="ktx"?36:20;return{height:Ko(t,i+4),width:Ko(t,i),type:n}}},Ip=`PNG\r
|
|
2
|
-
|
|
3
|
-
`,Mp="IHDR",O0="CgBI",Fp={validate(t){if(Ip===$r(t,1,8)){let n=$r(t,12,16);if(n===O0&&(n=$r(t,28,32)),n!==Mp)throw new TypeError("Invalid PNG");return!0}return!1},calculate(t){return $r(t,12,16)===O0?{height:bn(t,36),width:bn(t,32)}:{height:bn(t,20),width:bn(t,16)}}},I0={P1:"pbm/ascii",P2:"pgm/ascii",P3:"ppm/ascii",P4:"pbm",P5:"pgm",P6:"ppm",P7:"pam",PF:"pfm"},M0={default:t=>{let n=[];for(;t.length>0;){const i=t.shift();if(i[0]!=="#"){n=i.split(" ");break}}if(n.length===2)return{height:parseInt(n[1],10),width:parseInt(n[0],10)};throw new TypeError("Invalid PNM")},pam:t=>{const n={};for(;t.length>0;){const i=t.shift();if(i.length>16||i.charCodeAt(0)>128)continue;const[a,f]=i.split(" ");if(a&&f&&(n[a.toLowerCase()]=parseInt(f,10)),n.height&&n.width)break}if(n.height&&n.width)return{height:n.height,width:n.width};throw new TypeError("Invalid PAM")}},kp={validate:t=>$r(t,0,2)in I0,calculate(t){const n=$r(t,0,2),i=I0[n],a=$r(t,3).split(/[\r\n]+/);return(M0[i]||M0.default)(a)}},Pp={validate:t=>$r(t,0,4)==="8BPS",calculate:t=>({height:bn(t,14),width:bn(t,18)})},F0=/<svg\s([^>"']|"[^"]*"|'[^']*')*>/,fu={height:/\sheight=(['"])([^%]+?)\1/,root:F0,viewbox:/\sviewBox=(['"])(.+?)\1/i,width:/\swidth=(['"])([^%]+?)\1/},qc=2.54,k0={in:96,cm:96/qc,em:16,ex:8,m:96/qc*100,mm:96/qc/10,pc:96/72/12,pt:96/72,px:1},Np=new RegExp(`^([0-9.]+(?:e\\d+)?)(${Object.keys(k0).join("|")})?$`);function lu(t){const n=Np.exec(t);if(!!n)return Math.round(Number(n[1])*(k0[n[2]]||1))}function Bp(t){const n=t.split(" ");return{height:lu(n[3]),width:lu(n[2])}}function Gp(t){const n=t.match(fu.width),i=t.match(fu.height),a=t.match(fu.viewbox);return{height:i&&lu(i[2]),viewbox:a&&Bp(a[2]),width:n&&lu(n[2])}}function Up(t){return{height:t.height,width:t.width}}function Yp(t,n){const i=n.width/n.height;return t.width?{height:Math.floor(t.width/i),width:t.width}:t.height?{height:t.height,width:Math.floor(t.height*i)}:{height:n.height,width:n.width}}const Hp={validate:t=>F0.test($r(t,0,1e3)),calculate(t){const n=$r(t).match(fu.root);if(n){const i=Gp(n[0]);if(i.width&&i.height)return Up(i);if(i.viewbox)return Yp(i,i.viewbox)}throw new TypeError("Invalid SVG")}},zp={validate(t){return ti(t,0)===0&&ti(t,4)===0},calculate(t){return{height:ti(t,14),width:ti(t,12)}}};function Wp(t,n){const i=Ui(t,32,4,n);return t.slice(i+2)}function Vp(t,n){const i=Ui(t,16,8,n);return(Ui(t,16,10,n)<<16)+i}function $p(t){if(t.length>24)return t.slice(12)}function Zp(t,n){const i={};let a=t;for(;a&&a.length;){const f=Ui(a,16,0,n),s=Ui(a,16,2,n),l=Ui(a,32,4,n);if(f===0)break;l===1&&(s===3||s===4)&&(i[f]=Vp(a,n)),a=$p(a)}return i}function Xp(t){const n=$r(t,0,2);if(n==="II")return"LE";if(n==="MM")return"BE"}const qp=["49492a00","4d4d002a"],Kp={validate:t=>qp.includes(Bs(t,0,4)),calculate(t){const n=Xp(t)==="BE",i=Wp(t,n),a=Zp(i,n),f=a[256],s=a[257];if(!f||!s)throw new TypeError("Invalid Tiff. Missing tags");return{height:s,width:f}}};function jp(t){return{height:1+A0(t,7),width:1+A0(t,4)}}function Qp(t){return{height:1+((t[4]&15)<<10|t[3]<<2|(t[2]&192)>>6),width:1+((t[2]&63)<<8|t[1])}}function Jp(t){return{height:S0(t,8)&16383,width:S0(t,6)&16383}}const em={validate(t){const n=$r(t,0,4)==="RIFF",i=$r(t,8,12)==="WEBP",a=$r(t,12,15)==="VP8";return n&&i&&a},calculate(t){const n=$r(t,12,16);if(t=t.slice(20,30),n==="VP8X"){const a=t[0],f=(a&192)===0,s=(a&1)===0;if(f&&s)return jp(t);throw new TypeError("Invalid WebP")}if(n==="VP8 "&&t[0]!==47)return Jp(t);const i=Bs(t,3,6);if(n==="VP8L"&&i!=="9d012a")return Qp(t);throw new TypeError("Invalid WebP")}},uu=new Map([["bmp",tp],["cur",op],["dds",sp],["gif",lp],["heif",cp],["icns",pp],["ico",D0],["j2c",mp],["jp2",gp],["jpg",Cp],["ktx",Op],["png",Fp],["pnm",kp],["psd",Pp],["svg",Hp],["tga",zp],["tiff",Kp],["webp",em]]),tm=Array.from(uu.keys()),rm=new Map([[56,"psd"],[66,"bmp"],[68,"dds"],[71,"gif"],[73,"tiff"],[77,"tiff"],[82,"webp"],[105,"icns"],[137,"png"],[255,"jpg"]]);function nm(t){const n=t[0],i=rm.get(n);return i&&uu.get(i).validate(t)?i:tm.find(a=>uu.get(a).validate(t))}const im={disabledTypes:[]};function P0(t){var i;const n=nm(t);if(typeof n<"u"){if(im.disabledTypes.indexOf(n)>-1)throw new TypeError("disabled file type: "+n);const a=uu.get(n).calculate(t);if(a!==void 0)return a.type=(i=a.type)!=null?i:n,a}throw new TypeError("unsupported file type: "+n)}var am=!1;const om=function(t,n){return(self.Image&&t instanceof self.Image||self.HTMLImageElement&&t instanceof self.HTMLImageElement)&&!t.complete?(n(null,new Error("\u4E0D\u652F\u6301\u7684\u683C\u5F0F")),!1):(di.imageHasData(t)?n&&n(t):sm(t,n),!0)};function sm(t,n){function i(l){try{var d=fm(l);t.exifdata=d||{};var v;n&&n(t)}catch(I){n(null,I)}}if(t.src)if(/^data\:/i.test(t.src)){var a=di.base64ToArrayBuffer(t.src);i(a)}else if(/^blob\:/i.test(t.src)){var f=new FileReader;f.onload=function(l){i(l.target.result)},di.objectURLToBlob(t.src,function(l){f.readAsArrayBuffer(l)})}else{var s=new XMLHttpRequest;s.onload=function(){if(this.status==200||this.status===0)i(s.response);else throw"Could not load image";s=null},s.open("GET",t.src,!0),s.responseType="arraybuffer",s.send(null)}else if(self.FileReader&&(t instanceof self.Blob||t instanceof self.File)){var f=new FileReader;f.onload=function(d){i(d.target.result)},f.readAsArrayBuffer(t)}}function fm(t){var n=new DataView(t);let i={};for(var a=2,f=t.byteLength,s;a<f&&n.getUint8(a)==255;){if(s=n.getUint8(a+1),s==225){i=lm(n,a+4,n.getUint16(a+2)-2);break}a+=2+n.getUint16(a+2)}let l=P0(new Uint8Array(t));return Object.assign(i,{PixelXDimension:l.width,PixelYDimension:l.height}),i}function JS(t){if("DOMParser"in self){var n=new DataView(t);if(n.getUint8(0)!=255||n.getUint8(1)!=216)return!1;for(var i=2,a=t.byteLength,f=new DOMParser;i<a-4;)if(di.getStringFromDB(n,i,4)=="http"){var s=i-1,l=n.getUint16(i-2)-1,d=di.getStringFromDB(n,s,l),v=d.indexOf("xmpmeta>")+8;d=d.substring(d.indexOf("<x:xmpmeta"),v);var I=d.indexOf("x:xmpmeta")+10;d=d.slice(0,I)+'xmlns:Iptc4xmpCore="http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tiff="http://ns.adobe.com/tiff/1.0/" xmlns:plus="http://schemas.android.com/apk/lib/com.google.android.gms.plus" xmlns:ext="http://www.gettyimages.com/xsltExtension/1.0" xmlns:exif="http://ns.adobe.com/exif/1.0/" xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#" xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#" xmlns:crs="http://ns.adobe.com/camera-raw-settings/1.0/" xmlns:xapGImg="http://ns.adobe.com/xap/1.0/g/img/" xmlns:Iptc4xmpExt="http://iptc.org/std/Iptc4xmpExt/2008-02-29/" '+d.slice(I);var B=f.parseFromString(d,"text/xml");return di.xml2Object(B)}else i++}}function lm(t,n){if(di.getStringFromDB(t,n,4)!="Exif")return!1;var i,a,f,s,l,d=n+6;if(t.getUint16(d)==18761)i=!1;else if(t.getUint16(d)==19789)i=!0;else return!1;if(t.getUint16(d+2,!i)!=42)return!1;var v=t.getUint32(d+4,!i);if(v<8)return!1;if(a=Kc(t,d,d+v,X_,i),a.ExifIFDPointer){s=Kc(t,d,d+a.ExifIFDPointer,q_,i);for(f in s){switch(f){case"LightSource":case"Flash":case"MeteringMode":case"ExposureProgram":case"SensingMethod":case"SceneCaptureType":case"SceneType":case"CustomRendered":case"WhiteBalance":case"GainControl":case"Contrast":case"Saturation":case"Sharpness":case"SubjectDistanceRange":case"FileSource":s[f]=zf[f][s[f]];break;case"ExifVersion":case"FlashpixVersion":s[f]=String.fromCharCode(s[f][0],s[f][1],s[f][2],s[f][3]);break;case"ComponentsConfiguration":s[f]=zf.Components[s[f][0]]+zf.Components[s[f][1]]+zf.Components[s[f][2]]+zf.Components[s[f][3]];break}a[f]=s[f]}}if(a.GPSInfoIFDPointer){l=Kc(t,d,d+a.GPSInfoIFDPointer,K_,i);for(f in l){switch(f){case"GPSVersionID":l[f]=l[f][0]+"."+l[f][1]+"."+l[f][2]+"."+l[f][3];break}a[f]=l[f]}}return a}function Kc(t,n,i,a,f){var s=t.getUint16(i,!f),l={},d,v,I;for(I=0;I<s;I++)d=i+I*12+2,v=a[t.getUint16(d,!f)],l[v]=um(t,d,n,i,f);return l}function um(t,n,i,a,f){var s=t.getUint16(n+2,!f),l=t.getUint32(n+4,!f),d=t.getUint32(n+8,!f)+i,v,I,B,p,U,q;switch(s){case 1:case 7:if(l==1)return t.getUint8(n+8,!f);for(v=l>4?d:n+8,I=[],p=0;p<l;p++)I[p]=t.getUint8(v+p);return I;case 2:return v=l>4?d:n+8,di.getStringFromDB(t,v,l-1);case 3:if(l==1)return t.getUint16(n+8,!f);for(v=l>2?d:n+8,I=[],p=0;p<l;p++)I[p]=t.getUint16(v+2*p,!f);return I;case 4:if(l==1)return t.getUint32(n+8,!f);for(I=[],p=0;p<l;p++)I[p]=t.getUint32(d+4*p,!f);return I;case 5:if(l==1)return U=t.getUint32(d,!f),q=t.getUint32(d+4,!f),B=new Number(U/q),B.numerator=U,B.denominator=q,B;for(I=[],p=0;p<l;p++)U=t.getUint32(d+8*p,!f),q=t.getUint32(d+4+8*p,!f),I[p]=new Number(U/q),I[p].numerator=U,I[p].denominator=q;return I;case 9:if(l==1)return t.getInt32(n+8,!f);for(I=[],p=0;p<l;p++)I[p]=t.getInt32(d+4*p,!f);return I;case 10:if(l==1)return t.getInt32(d,!f)/t.getInt32(d+4,!f);for(I=[],p=0;p<l;p++)I[p]=t.getInt32(d+8*p,!f)/t.getInt32(d+4+8*p,!f);return I}}const cm=function(t){if(!di.imageHasData(t))return{};var n,i=t.exifdata,a={};for(n in i)i.hasOwnProperty(n)&&(a[n]=i[n]);return a},jc=t=>new Promise((n,i)=>{if(t.type==="image/jpeg"){let f=t.slice(0,524288);f.name=t.name,om(f,function(s,l){if(l){i(l);return}let d=cm(s),v=JSON.parse(JSON.stringify(d).replaceAll("\\u0000",""))||{};n(v)})}else{var a=new FileReader;a.onload=function(f){let s=new Uint8Array(f.target.result),l=P0(s);n({PixelXDimension:l.width,PixelYDimension:l.height})},a.readAsArrayBuffer(t)}});let cu;const hm=new Uint8Array(16);function dm(){if(!cu&&(cu=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!cu))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return cu(hm)}const Bn=[];for(let t=0;t<256;++t)Bn.push((t+256).toString(16).slice(1));function vm(t,n=0){return(Bn[t[n+0]]+Bn[t[n+1]]+Bn[t[n+2]]+Bn[t[n+3]]+"-"+Bn[t[n+4]]+Bn[t[n+5]]+"-"+Bn[t[n+6]]+Bn[t[n+7]]+"-"+Bn[t[n+8]]+Bn[t[n+9]]+"-"+Bn[t[n+10]]+Bn[t[n+11]]+Bn[t[n+12]]+Bn[t[n+13]]+Bn[t[n+14]]+Bn[t[n+15]]).toLowerCase()}const N0={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function _m(t,n,i){if(N0.randomUUID&&!n&&!t)return N0.randomUUID();t=t||{};const a=t.random||(t.rng||dm)();if(a[6]=a[6]&15|64,a[8]=a[8]&63|128,n){i=i||0;for(let f=0;f<16;++f)n[i+f]=a[f];return n}return vm(a)}//! moment.js
|
|
4
|
-
//! version : 2.29.4
|
|
1
|
+
(function(ir,cf){typeof exports=="object"&&typeof module<"u"?cf(exports):typeof define=="function"&&define.amd?define(["exports"],cf):(ir=typeof globalThis<"u"?globalThis:ir||self,cf(ir.catchUtil={}))})(this,function(ir){"use strict";let cf;const m_=new Uint8Array(16);function g_(){if(!cf&&(cf=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!cf))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return cf(m_)}const Nn=[];for(let t=0;t<256;++t)Nn.push((t+256).toString(16).slice(1));function y_(t,n=0){return Nn[t[n+0]]+Nn[t[n+1]]+Nn[t[n+2]]+Nn[t[n+3]]+"-"+Nn[t[n+4]]+Nn[t[n+5]]+"-"+Nn[t[n+6]]+Nn[t[n+7]]+"-"+Nn[t[n+8]]+Nn[t[n+9]]+"-"+Nn[t[n+10]]+Nn[t[n+11]]+Nn[t[n+12]]+Nn[t[n+13]]+Nn[t[n+14]]+Nn[t[n+15]]}const f0={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function b_(t,n,i){if(f0.randomUUID&&!n&&!t)return f0.randomUUID();t=t||{};const f=t.random||(t.rng||g_)();if(f[6]=f[6]&15|64,f[8]=f[8]&63|128,n){i=i||0;for(let h=0;h<16;++h)n[i+h]=f[h];return n}return y_(f)}//! moment.js
|
|
2
|
+
//! version : 2.30.1
|
|
5
3
|
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
|
6
4
|
//! license : MIT
|
|
7
5
|
//! momentjs.com
|
|
8
|
-
var
|
|
9
|
-
[`+s+"] ";for(
|
|
10
|
-
Arguments: `+Array.prototype.slice.call(
|
|
11
|
-
`+new Error().stack),i=!1}return n.apply(this,arguments)},n)}var H0={};function z0(t,n){_t.deprecationHandler!=null&&_t.deprecationHandler(t,n),H0[t]||(Y0(n),H0[t]=!0)}_t.suppressDeprecationWarnings=!1,_t.deprecationHandler=null;function la(t){return typeof Function<"u"&&t instanceof Function||Object.prototype.toString.call(t)==="[object Function]"}function gm(t){var n,i;for(i in t)Sr(t,i)&&(n=t[i],la(n)?this[i]=n:this["_"+i]=n);this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function nh(t,n){var i=go({},t),a;for(a in n)Sr(n,a)&&(Qo(t[a])&&Qo(n[a])?(i[a]={},go(i[a],t[a]),go(i[a],n[a])):n[a]!=null?i[a]=n[a]:delete i[a]);for(a in t)Sr(t,a)&&!Sr(n,a)&&Qo(t[a])&&(i[a]=go({},i[a]));return i}function ih(t){t!=null&&this.set(t)}var ah;Object.keys?ah=Object.keys:ah=function(t){var n,i=[];for(n in t)Sr(t,n)&&i.push(n);return i};var ym={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function xm(t,n,i){var a=this._calendar[t]||this._calendar.sameElse;return la(a)?a.call(n,i):a}function ua(t,n,i){var a=""+Math.abs(t),f=n-a.length,s=t>=0;return(s?i?"+":"":"-")+Math.pow(10,Math.max(0,f)).toString().substr(1)+a}var oh=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,du=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,sh={},Gs={};function Ft(t,n,i,a){var f=a;typeof a=="string"&&(f=function(){return this[a]()}),t&&(Gs[t]=f),n&&(Gs[n[0]]=function(){return ua(f.apply(this,arguments),n[1],n[2])}),i&&(Gs[i]=function(){return this.localeData().ordinal(f.apply(this,arguments),t)})}function bm(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function wm(t){var n=t.match(oh),i,a;for(i=0,a=n.length;i<a;i++)Gs[n[i]]?n[i]=Gs[n[i]]:n[i]=bm(n[i]);return function(f){var s="",l;for(l=0;l<a;l++)s+=la(n[l])?n[l].call(f,t):n[l];return s}}function vu(t,n){return t.isValid()?(n=W0(n,t.localeData()),sh[n]=sh[n]||wm(n),sh[n](t)):t.localeData().invalidDate()}function W0(t,n){var i=5;function a(f){return n.longDateFormat(f)||f}for(du.lastIndex=0;i>=0&&du.test(t);)t=t.replace(du,a),du.lastIndex=0,i-=1;return t}var Sm={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function Am(t){var n=this._longDateFormat[t],i=this._longDateFormat[t.toUpperCase()];return n||!i?n:(this._longDateFormat[t]=i.match(oh).map(function(a){return a==="MMMM"||a==="MM"||a==="DD"||a==="dddd"?a.slice(1):a}).join(""),this._longDateFormat[t])}var Tm="Invalid date";function Em(){return this._invalidDate}var Dm="%d",Lm=/\d{1,2}/;function Rm(t){return this._ordinal.replace("%d",t)}var Cm={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Om(t,n,i,a){var f=this._relativeTime[i];return la(f)?f(t,n,i,a):f.replace(/%d/i,t)}function Im(t,n){var i=this._relativeTime[t>0?"future":"past"];return la(i)?i(n):i.replace(/%s/i,n)}var $f={};function zn(t,n){var i=t.toLowerCase();$f[i]=$f[i+"s"]=$f[n]=t}function Oi(t){return typeof t=="string"?$f[t]||$f[t.toLowerCase()]:void 0}function fh(t){var n={},i,a;for(a in t)Sr(t,a)&&(i=Oi(a),i&&(n[i]=t[a]));return n}var V0={};function Wn(t,n){V0[t]=n}function Mm(t){var n=[],i;for(i in t)Sr(t,i)&&n.push({unit:i,priority:V0[i]});return n.sort(function(a,f){return a.priority-f.priority}),n}function _u(t){return t%4===0&&t%100!==0||t%400===0}function Ii(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function fr(t){var n=+t,i=0;return n!==0&&isFinite(n)&&(i=Ii(n)),i}function Us(t,n){return function(i){return i!=null?($0(this,t,i),_t.updateOffset(this,n),this):pu(this,t)}}function pu(t,n){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+n]():NaN}function $0(t,n,i){t.isValid()&&!isNaN(i)&&(n==="FullYear"&&_u(t.year())&&t.month()===1&&t.date()===29?(i=fr(i),t._d["set"+(t._isUTC?"UTC":"")+n](i,t.month(),Su(i,t.month()))):t._d["set"+(t._isUTC?"UTC":"")+n](i))}function Fm(t){return t=Oi(t),la(this[t])?this[t]():this}function km(t,n){if(typeof t=="object"){t=fh(t);var i=Mm(t),a,f=i.length;for(a=0;a<f;a++)this[i[a].unit](t[i[a].unit])}else if(t=Oi(t),la(this[t]))return this[t](n);return this}var Z0=/\d/,vi=/\d\d/,X0=/\d{3}/,lh=/\d{4}/,mu=/[+-]?\d{6}/,Gr=/\d\d?/,q0=/\d\d\d\d?/,K0=/\d\d\d\d\d\d?/,gu=/\d{1,3}/,uh=/\d{1,4}/,yu=/[+-]?\d{1,6}/,Ys=/\d+/,xu=/[+-]?\d+/,Pm=/Z|[+-]\d\d:?\d\d/gi,bu=/Z|[+-]\d\d(?::?\d\d)?/gi,Nm=/[+-]?\d+(\.\d{1,3})?/,Zf=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,wu;wu={};function bt(t,n,i){wu[t]=la(n)?n:function(a,f){return a&&i?i:n}}function Bm(t,n){return Sr(wu,t)?wu[t](n._strict,n._locale):new RegExp(Gm(t))}function Gm(t){return _i(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(n,i,a,f,s){return i||a||f||s}))}function _i(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var ch={};function Mr(t,n){var i,a=n,f;for(typeof t=="string"&&(t=[t]),Ra(n)&&(a=function(s,l){l[n]=fr(s)}),f=t.length,i=0;i<f;i++)ch[t[i]]=a}function Xf(t,n){Mr(t,function(i,a,f,s){f._w=f._w||{},n(i,f._w,f,s)})}function Um(t,n,i){n!=null&&Sr(ch,t)&&ch[t](n,i._a,i,t)}var Vn=0,Ca=1,ca=2,wn=3,zi=4,Oa=5,Jo=6,Ym=7,Hm=8;function zm(t,n){return(t%n+n)%n}var an;Array.prototype.indexOf?an=Array.prototype.indexOf:an=function(t){var n;for(n=0;n<this.length;++n)if(this[n]===t)return n;return-1};function Su(t,n){if(isNaN(t)||isNaN(n))return NaN;var i=zm(n,12);return t+=(n-i)/12,i===1?_u(t)?29:28:31-i%7%2}Ft("M",["MM",2],"Mo",function(){return this.month()+1}),Ft("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),Ft("MMMM",0,0,function(t){return this.localeData().months(this,t)}),zn("month","M"),Wn("month",8),bt("M",Gr),bt("MM",Gr,vi),bt("MMM",function(t,n){return n.monthsShortRegex(t)}),bt("MMMM",function(t,n){return n.monthsRegex(t)}),Mr(["M","MM"],function(t,n){n[Ca]=fr(t)-1}),Mr(["MMM","MMMM"],function(t,n,i,a){var f=i._locale.monthsParse(t,a,i._strict);f!=null?n[Ca]=f:tr(i).invalidMonth=t});var Wm="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),j0="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Q0=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Vm=Zf,$m=Zf;function Zm(t,n){return t?Yi(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||Q0).test(n)?"format":"standalone"][t.month()]:Yi(this._months)?this._months:this._months.standalone}function Xm(t,n){return t?Yi(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[Q0.test(n)?"format":"standalone"][t.month()]:Yi(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function qm(t,n,i){var a,f,s,l=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],a=0;a<12;++a)s=fa([2e3,a]),this._shortMonthsParse[a]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[a]=this.months(s,"").toLocaleLowerCase();return i?n==="MMM"?(f=an.call(this._shortMonthsParse,l),f!==-1?f:null):(f=an.call(this._longMonthsParse,l),f!==-1?f:null):n==="MMM"?(f=an.call(this._shortMonthsParse,l),f!==-1?f:(f=an.call(this._longMonthsParse,l),f!==-1?f:null)):(f=an.call(this._longMonthsParse,l),f!==-1?f:(f=an.call(this._shortMonthsParse,l),f!==-1?f:null))}function Km(t,n,i){var a,f,s;if(this._monthsParseExact)return qm.call(this,t,n,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),a=0;a<12;a++){if(f=fa([2e3,a]),i&&!this._longMonthsParse[a]&&(this._longMonthsParse[a]=new RegExp("^"+this.months(f,"").replace(".","")+"$","i"),this._shortMonthsParse[a]=new RegExp("^"+this.monthsShort(f,"").replace(".","")+"$","i")),!i&&!this._monthsParse[a]&&(s="^"+this.months(f,"")+"|^"+this.monthsShort(f,""),this._monthsParse[a]=new RegExp(s.replace(".",""),"i")),i&&n==="MMMM"&&this._longMonthsParse[a].test(t))return a;if(i&&n==="MMM"&&this._shortMonthsParse[a].test(t))return a;if(!i&&this._monthsParse[a].test(t))return a}}function J0(t,n){var i;if(!t.isValid())return t;if(typeof n=="string"){if(/^\d+$/.test(n))n=fr(n);else if(n=t.localeData().monthsParse(n),!Ra(n))return t}return i=Math.min(t.date(),Su(t.year(),n)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](n,i),t}function ev(t){return t!=null?(J0(this,t),_t.updateOffset(this,!0),this):pu(this,"Month")}function jm(){return Su(this.year(),this.month())}function Qm(t){return this._monthsParseExact?(Sr(this,"_monthsRegex")||tv.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(Sr(this,"_monthsShortRegex")||(this._monthsShortRegex=Vm),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)}function Jm(t){return this._monthsParseExact?(Sr(this,"_monthsRegex")||tv.call(this),t?this._monthsStrictRegex:this._monthsRegex):(Sr(this,"_monthsRegex")||(this._monthsRegex=$m),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)}function tv(){function t(l,d){return d.length-l.length}var n=[],i=[],a=[],f,s;for(f=0;f<12;f++)s=fa([2e3,f]),n.push(this.monthsShort(s,"")),i.push(this.months(s,"")),a.push(this.months(s,"")),a.push(this.monthsShort(s,""));for(n.sort(t),i.sort(t),a.sort(t),f=0;f<12;f++)n[f]=_i(n[f]),i[f]=_i(i[f]);for(f=0;f<24;f++)a[f]=_i(a[f]);this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")}Ft("Y",0,0,function(){var t=this.year();return t<=9999?ua(t,4):"+"+t}),Ft(0,["YY",2],0,function(){return this.year()%100}),Ft(0,["YYYY",4],0,"year"),Ft(0,["YYYYY",5],0,"year"),Ft(0,["YYYYYY",6,!0],0,"year"),zn("year","y"),Wn("year",1),bt("Y",xu),bt("YY",Gr,vi),bt("YYYY",uh,lh),bt("YYYYY",yu,mu),bt("YYYYYY",yu,mu),Mr(["YYYYY","YYYYYY"],Vn),Mr("YYYY",function(t,n){n[Vn]=t.length===2?_t.parseTwoDigitYear(t):fr(t)}),Mr("YY",function(t,n){n[Vn]=_t.parseTwoDigitYear(t)}),Mr("Y",function(t,n){n[Vn]=parseInt(t,10)});function qf(t){return _u(t)?366:365}_t.parseTwoDigitYear=function(t){return fr(t)+(fr(t)>68?1900:2e3)};var rv=Us("FullYear",!0);function e1(){return _u(this.year())}function t1(t,n,i,a,f,s,l){var d;return t<100&&t>=0?(d=new Date(t+400,n,i,a,f,s,l),isFinite(d.getFullYear())&&d.setFullYear(t)):d=new Date(t,n,i,a,f,s,l),d}function Kf(t){var n,i;return t<100&&t>=0?(i=Array.prototype.slice.call(arguments),i[0]=t+400,n=new Date(Date.UTC.apply(null,i)),isFinite(n.getUTCFullYear())&&n.setUTCFullYear(t)):n=new Date(Date.UTC.apply(null,arguments)),n}function Au(t,n,i){var a=7+n-i,f=(7+Kf(t,0,a).getUTCDay()-n)%7;return-f+a-1}function nv(t,n,i,a,f){var s=(7+i-a)%7,l=Au(t,a,f),d=1+7*(n-1)+s+l,v,I;return d<=0?(v=t-1,I=qf(v)+d):d>qf(t)?(v=t+1,I=d-qf(t)):(v=t,I=d),{year:v,dayOfYear:I}}function jf(t,n,i){var a=Au(t.year(),n,i),f=Math.floor((t.dayOfYear()-a-1)/7)+1,s,l;return f<1?(l=t.year()-1,s=f+Ia(l,n,i)):f>Ia(t.year(),n,i)?(s=f-Ia(t.year(),n,i),l=t.year()+1):(l=t.year(),s=f),{week:s,year:l}}function Ia(t,n,i){var a=Au(t,n,i),f=Au(t+1,n,i);return(qf(t)-a+f)/7}Ft("w",["ww",2],"wo","week"),Ft("W",["WW",2],"Wo","isoWeek"),zn("week","w"),zn("isoWeek","W"),Wn("week",5),Wn("isoWeek",5),bt("w",Gr),bt("ww",Gr,vi),bt("W",Gr),bt("WW",Gr,vi),Xf(["w","ww","W","WW"],function(t,n,i,a){n[a.substr(0,1)]=fr(t)});function r1(t){return jf(t,this._week.dow,this._week.doy).week}var n1={dow:0,doy:6};function i1(){return this._week.dow}function a1(){return this._week.doy}function o1(t){var n=this.localeData().week(this);return t==null?n:this.add((t-n)*7,"d")}function s1(t){var n=jf(this,1,4).week;return t==null?n:this.add((t-n)*7,"d")}Ft("d",0,"do","day"),Ft("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),Ft("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),Ft("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),Ft("e",0,0,"weekday"),Ft("E",0,0,"isoWeekday"),zn("day","d"),zn("weekday","e"),zn("isoWeekday","E"),Wn("day",11),Wn("weekday",11),Wn("isoWeekday",11),bt("d",Gr),bt("e",Gr),bt("E",Gr),bt("dd",function(t,n){return n.weekdaysMinRegex(t)}),bt("ddd",function(t,n){return n.weekdaysShortRegex(t)}),bt("dddd",function(t,n){return n.weekdaysRegex(t)}),Xf(["dd","ddd","dddd"],function(t,n,i,a){var f=i._locale.weekdaysParse(t,a,i._strict);f!=null?n.d=f:tr(i).invalidWeekday=t}),Xf(["d","e","E"],function(t,n,i,a){n[a]=fr(t)});function f1(t,n){return typeof t!="string"?t:isNaN(t)?(t=n.weekdaysParse(t),typeof t=="number"?t:null):parseInt(t,10)}function l1(t,n){return typeof t=="string"?n.weekdaysParse(t)%7||7:isNaN(t)?null:t}function hh(t,n){return t.slice(n,7).concat(t.slice(0,n))}var u1="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),iv="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),c1="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),h1=Zf,d1=Zf,v1=Zf;function _1(t,n){var i=Yi(this._weekdays)?this._weekdays:this._weekdays[t&&t!==!0&&this._weekdays.isFormat.test(n)?"format":"standalone"];return t===!0?hh(i,this._week.dow):t?i[t.day()]:i}function p1(t){return t===!0?hh(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort}function m1(t){return t===!0?hh(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin}function g1(t,n,i){var a,f,s,l=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],a=0;a<7;++a)s=fa([2e3,1]).day(a),this._minWeekdaysParse[a]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[a]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[a]=this.weekdays(s,"").toLocaleLowerCase();return i?n==="dddd"?(f=an.call(this._weekdaysParse,l),f!==-1?f:null):n==="ddd"?(f=an.call(this._shortWeekdaysParse,l),f!==-1?f:null):(f=an.call(this._minWeekdaysParse,l),f!==-1?f:null):n==="dddd"?(f=an.call(this._weekdaysParse,l),f!==-1||(f=an.call(this._shortWeekdaysParse,l),f!==-1)?f:(f=an.call(this._minWeekdaysParse,l),f!==-1?f:null)):n==="ddd"?(f=an.call(this._shortWeekdaysParse,l),f!==-1||(f=an.call(this._weekdaysParse,l),f!==-1)?f:(f=an.call(this._minWeekdaysParse,l),f!==-1?f:null)):(f=an.call(this._minWeekdaysParse,l),f!==-1||(f=an.call(this._weekdaysParse,l),f!==-1)?f:(f=an.call(this._shortWeekdaysParse,l),f!==-1?f:null))}function y1(t,n,i){var a,f,s;if(this._weekdaysParseExact)return g1.call(this,t,n,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),a=0;a<7;a++){if(f=fa([2e3,1]).day(a),i&&!this._fullWeekdaysParse[a]&&(this._fullWeekdaysParse[a]=new RegExp("^"+this.weekdays(f,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[a]=new RegExp("^"+this.weekdaysShort(f,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[a]=new RegExp("^"+this.weekdaysMin(f,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[a]||(s="^"+this.weekdays(f,"")+"|^"+this.weekdaysShort(f,"")+"|^"+this.weekdaysMin(f,""),this._weekdaysParse[a]=new RegExp(s.replace(".",""),"i")),i&&n==="dddd"&&this._fullWeekdaysParse[a].test(t))return a;if(i&&n==="ddd"&&this._shortWeekdaysParse[a].test(t))return a;if(i&&n==="dd"&&this._minWeekdaysParse[a].test(t))return a;if(!i&&this._weekdaysParse[a].test(t))return a}}function x1(t){if(!this.isValid())return t!=null?this:NaN;var n=this._isUTC?this._d.getUTCDay():this._d.getDay();return t!=null?(t=f1(t,this.localeData()),this.add(t-n,"d")):n}function b1(t){if(!this.isValid())return t!=null?this:NaN;var n=(this.day()+7-this.localeData()._week.dow)%7;return t==null?n:this.add(t-n,"d")}function w1(t){if(!this.isValid())return t!=null?this:NaN;if(t!=null){var n=l1(t,this.localeData());return this.day(this.day()%7?n:n-7)}else return this.day()||7}function S1(t){return this._weekdaysParseExact?(Sr(this,"_weekdaysRegex")||dh.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(Sr(this,"_weekdaysRegex")||(this._weekdaysRegex=h1),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function A1(t){return this._weekdaysParseExact?(Sr(this,"_weekdaysRegex")||dh.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Sr(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=d1),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function T1(t){return this._weekdaysParseExact?(Sr(this,"_weekdaysRegex")||dh.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Sr(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=v1),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function dh(){function t(B,p){return p.length-B.length}var n=[],i=[],a=[],f=[],s,l,d,v,I;for(s=0;s<7;s++)l=fa([2e3,1]).day(s),d=_i(this.weekdaysMin(l,"")),v=_i(this.weekdaysShort(l,"")),I=_i(this.weekdays(l,"")),n.push(d),i.push(v),a.push(I),f.push(d),f.push(v),f.push(I);n.sort(t),i.sort(t),a.sort(t),f.sort(t),this._weekdaysRegex=new RegExp("^("+f.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+n.join("|")+")","i")}function vh(){return this.hours()%12||12}function E1(){return this.hours()||24}Ft("H",["HH",2],0,"hour"),Ft("h",["hh",2],0,vh),Ft("k",["kk",2],0,E1),Ft("hmm",0,0,function(){return""+vh.apply(this)+ua(this.minutes(),2)}),Ft("hmmss",0,0,function(){return""+vh.apply(this)+ua(this.minutes(),2)+ua(this.seconds(),2)}),Ft("Hmm",0,0,function(){return""+this.hours()+ua(this.minutes(),2)}),Ft("Hmmss",0,0,function(){return""+this.hours()+ua(this.minutes(),2)+ua(this.seconds(),2)});function av(t,n){Ft(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),n)})}av("a",!0),av("A",!1),zn("hour","h"),Wn("hour",13);function ov(t,n){return n._meridiemParse}bt("a",ov),bt("A",ov),bt("H",Gr),bt("h",Gr),bt("k",Gr),bt("HH",Gr,vi),bt("hh",Gr,vi),bt("kk",Gr,vi),bt("hmm",q0),bt("hmmss",K0),bt("Hmm",q0),bt("Hmmss",K0),Mr(["H","HH"],wn),Mr(["k","kk"],function(t,n,i){var a=fr(t);n[wn]=a===24?0:a}),Mr(["a","A"],function(t,n,i){i._isPm=i._locale.isPM(t),i._meridiem=t}),Mr(["h","hh"],function(t,n,i){n[wn]=fr(t),tr(i).bigHour=!0}),Mr("hmm",function(t,n,i){var a=t.length-2;n[wn]=fr(t.substr(0,a)),n[zi]=fr(t.substr(a)),tr(i).bigHour=!0}),Mr("hmmss",function(t,n,i){var a=t.length-4,f=t.length-2;n[wn]=fr(t.substr(0,a)),n[zi]=fr(t.substr(a,2)),n[Oa]=fr(t.substr(f)),tr(i).bigHour=!0}),Mr("Hmm",function(t,n,i){var a=t.length-2;n[wn]=fr(t.substr(0,a)),n[zi]=fr(t.substr(a))}),Mr("Hmmss",function(t,n,i){var a=t.length-4,f=t.length-2;n[wn]=fr(t.substr(0,a)),n[zi]=fr(t.substr(a,2)),n[Oa]=fr(t.substr(f))});function D1(t){return(t+"").toLowerCase().charAt(0)==="p"}var L1=/[ap]\.?m?\.?/i,R1=Us("Hours",!0);function C1(t,n,i){return t>11?i?"pm":"PM":i?"am":"AM"}var sv={calendar:ym,longDateFormat:Sm,invalidDate:Tm,ordinal:Dm,dayOfMonthOrdinalParse:Lm,relativeTime:Cm,months:Wm,monthsShort:j0,week:n1,weekdays:u1,weekdaysMin:c1,weekdaysShort:iv,meridiemParse:L1},Zr={},Qf={},Jf;function O1(t,n){var i,a=Math.min(t.length,n.length);for(i=0;i<a;i+=1)if(t[i]!==n[i])return i;return a}function fv(t){return t&&t.toLowerCase().replace("_","-")}function I1(t){for(var n=0,i,a,f,s;n<t.length;){for(s=fv(t[n]).split("-"),i=s.length,a=fv(t[n+1]),a=a?a.split("-"):null;i>0;){if(f=Tu(s.slice(0,i).join("-")),f)return f;if(a&&a.length>=i&&O1(s,a)>=i-1)break;i--}n++}return Jf}function M1(t){return t.match("^[^/\\\\]*$")!=null}function Tu(t){var n=null,i;if(Zr[t]===void 0&&typeof module<"u"&&module&&module.exports&&M1(t))try{n=Jf._abbr,i=require,i("./locale/"+t),yo(n)}catch{Zr[t]=null}return Zr[t]}function yo(t,n){var i;return t&&(ri(n)?i=Ma(t):i=_h(t,n),i?Jf=i:typeof console<"u"&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),Jf._abbr}function _h(t,n){if(n!==null){var i,a=sv;if(n.abbr=t,Zr[t]!=null)z0("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),a=Zr[t]._config;else if(n.parentLocale!=null)if(Zr[n.parentLocale]!=null)a=Zr[n.parentLocale]._config;else if(i=Tu(n.parentLocale),i!=null)a=i._config;else return Qf[n.parentLocale]||(Qf[n.parentLocale]=[]),Qf[n.parentLocale].push({name:t,config:n}),null;return Zr[t]=new ih(nh(a,n)),Qf[t]&&Qf[t].forEach(function(f){_h(f.name,f.config)}),yo(t),Zr[t]}else return delete Zr[t],null}function F1(t,n){if(n!=null){var i,a,f=sv;Zr[t]!=null&&Zr[t].parentLocale!=null?Zr[t].set(nh(Zr[t]._config,n)):(a=Tu(t),a!=null&&(f=a._config),n=nh(f,n),a==null&&(n.abbr=t),i=new ih(n),i.parentLocale=Zr[t],Zr[t]=i),yo(t)}else Zr[t]!=null&&(Zr[t].parentLocale!=null?(Zr[t]=Zr[t].parentLocale,t===yo()&&yo(t)):Zr[t]!=null&&delete Zr[t]);return Zr[t]}function Ma(t){var n;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Jf;if(!Yi(t)){if(n=Tu(t),n)return n;t=[t]}return I1(t)}function k1(){return ah(Zr)}function ph(t){var n,i=t._a;return i&&tr(t).overflow===-2&&(n=i[Ca]<0||i[Ca]>11?Ca:i[ca]<1||i[ca]>Su(i[Vn],i[Ca])?ca:i[wn]<0||i[wn]>24||i[wn]===24&&(i[zi]!==0||i[Oa]!==0||i[Jo]!==0)?wn:i[zi]<0||i[zi]>59?zi:i[Oa]<0||i[Oa]>59?Oa:i[Jo]<0||i[Jo]>999?Jo:-1,tr(t)._overflowDayOfYear&&(n<Vn||n>ca)&&(n=ca),tr(t)._overflowWeeks&&n===-1&&(n=Ym),tr(t)._overflowWeekday&&n===-1&&(n=Hm),tr(t).overflow=n),t}var P1=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,N1=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,B1=/Z|[+-]\d\d(?::?\d\d)?/,Eu=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],mh=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],G1=/^\/?Date\((-?\d+)/i,U1=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Y1={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function lv(t){var n,i,a=t._i,f=P1.exec(a)||N1.exec(a),s,l,d,v,I=Eu.length,B=mh.length;if(f){for(tr(t).iso=!0,n=0,i=I;n<i;n++)if(Eu[n][1].exec(f[1])){l=Eu[n][0],s=Eu[n][2]!==!1;break}if(l==null){t._isValid=!1;return}if(f[3]){for(n=0,i=B;n<i;n++)if(mh[n][1].exec(f[3])){d=(f[2]||" ")+mh[n][0];break}if(d==null){t._isValid=!1;return}}if(!s&&d!=null){t._isValid=!1;return}if(f[4])if(B1.exec(f[4]))v="Z";else{t._isValid=!1;return}t._f=l+(d||"")+(v||""),yh(t)}else t._isValid=!1}function H1(t,n,i,a,f,s){var l=[z1(t),j0.indexOf(n),parseInt(i,10),parseInt(a,10),parseInt(f,10)];return s&&l.push(parseInt(s,10)),l}function z1(t){var n=parseInt(t,10);return n<=49?2e3+n:n<=999?1900+n:n}function W1(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function V1(t,n,i){if(t){var a=iv.indexOf(t),f=new Date(n[0],n[1],n[2]).getDay();if(a!==f)return tr(i).weekdayMismatch=!0,i._isValid=!1,!1}return!0}function $1(t,n,i){if(t)return Y1[t];if(n)return 0;var a=parseInt(i,10),f=a%100,s=(a-f)/100;return s*60+f}function uv(t){var n=U1.exec(W1(t._i)),i;if(n){if(i=H1(n[4],n[3],n[2],n[5],n[6],n[7]),!V1(n[1],i,t))return;t._a=i,t._tzm=$1(n[8],n[9],n[10]),t._d=Kf.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),tr(t).rfc2822=!0}else t._isValid=!1}function Z1(t){var n=G1.exec(t._i);if(n!==null){t._d=new Date(+n[1]);return}if(lv(t),t._isValid===!1)delete t._isValid;else return;if(uv(t),t._isValid===!1)delete t._isValid;else return;t._strict?t._isValid=!1:_t.createFromInputFallback(t)}_t.createFromInputFallback=Ci("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))});function Hs(t,n,i){return t!=null?t:n!=null?n:i}function X1(t){var n=new Date(_t.now());return t._useUTC?[n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()]:[n.getFullYear(),n.getMonth(),n.getDate()]}function gh(t){var n,i,a=[],f,s,l;if(!t._d){for(f=X1(t),t._w&&t._a[ca]==null&&t._a[Ca]==null&&q1(t),t._dayOfYear!=null&&(l=Hs(t._a[Vn],f[Vn]),(t._dayOfYear>qf(l)||t._dayOfYear===0)&&(tr(t)._overflowDayOfYear=!0),i=Kf(l,0,t._dayOfYear),t._a[Ca]=i.getUTCMonth(),t._a[ca]=i.getUTCDate()),n=0;n<3&&t._a[n]==null;++n)t._a[n]=a[n]=f[n];for(;n<7;n++)t._a[n]=a[n]=t._a[n]==null?n===2?1:0:t._a[n];t._a[wn]===24&&t._a[zi]===0&&t._a[Oa]===0&&t._a[Jo]===0&&(t._nextDay=!0,t._a[wn]=0),t._d=(t._useUTC?Kf:t1).apply(null,a),s=t._useUTC?t._d.getUTCDay():t._d.getDay(),t._tzm!=null&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[wn]=24),t._w&&typeof t._w.d<"u"&&t._w.d!==s&&(tr(t).weekdayMismatch=!0)}}function q1(t){var n,i,a,f,s,l,d,v,I;n=t._w,n.GG!=null||n.W!=null||n.E!=null?(s=1,l=4,i=Hs(n.GG,t._a[Vn],jf(Ur(),1,4).year),a=Hs(n.W,1),f=Hs(n.E,1),(f<1||f>7)&&(v=!0)):(s=t._locale._week.dow,l=t._locale._week.doy,I=jf(Ur(),s,l),i=Hs(n.gg,t._a[Vn],I.year),a=Hs(n.w,I.week),n.d!=null?(f=n.d,(f<0||f>6)&&(v=!0)):n.e!=null?(f=n.e+s,(n.e<0||n.e>6)&&(v=!0)):f=s),a<1||a>Ia(i,s,l)?tr(t)._overflowWeeks=!0:v!=null?tr(t)._overflowWeekday=!0:(d=nv(i,a,f,s,l),t._a[Vn]=d.year,t._dayOfYear=d.dayOfYear)}_t.ISO_8601=function(){},_t.RFC_2822=function(){};function yh(t){if(t._f===_t.ISO_8601){lv(t);return}if(t._f===_t.RFC_2822){uv(t);return}t._a=[],tr(t).empty=!0;var n=""+t._i,i,a,f,s,l,d=n.length,v=0,I,B;for(f=W0(t._f,t._locale).match(oh)||[],B=f.length,i=0;i<B;i++)s=f[i],a=(n.match(Bm(s,t))||[])[0],a&&(l=n.substr(0,n.indexOf(a)),l.length>0&&tr(t).unusedInput.push(l),n=n.slice(n.indexOf(a)+a.length),v+=a.length),Gs[s]?(a?tr(t).empty=!1:tr(t).unusedTokens.push(s),Um(s,a,t)):t._strict&&!a&&tr(t).unusedTokens.push(s);tr(t).charsLeftOver=d-v,n.length>0&&tr(t).unusedInput.push(n),t._a[wn]<=12&&tr(t).bigHour===!0&&t._a[wn]>0&&(tr(t).bigHour=void 0),tr(t).parsedDateParts=t._a.slice(0),tr(t).meridiem=t._meridiem,t._a[wn]=K1(t._locale,t._a[wn],t._meridiem),I=tr(t).era,I!==null&&(t._a[Vn]=t._locale.erasConvertYear(I,t._a[Vn])),gh(t),ph(t)}function K1(t,n,i){var a;return i==null?n:t.meridiemHour!=null?t.meridiemHour(n,i):(t.isPM!=null&&(a=t.isPM(i),a&&n<12&&(n+=12),!a&&n===12&&(n=0)),n)}function j1(t){var n,i,a,f,s,l,d=!1,v=t._f.length;if(v===0){tr(t).invalidFormat=!0,t._d=new Date(NaN);return}for(f=0;f<v;f++)s=0,l=!1,n=rh({},t),t._useUTC!=null&&(n._useUTC=t._useUTC),n._f=t._f[f],yh(n),eh(n)&&(l=!0),s+=tr(n).charsLeftOver,s+=tr(n).unusedTokens.length*10,tr(n).score=s,d?s<a&&(a=s,i=n):(a==null||s<a||l)&&(a=s,i=n,l&&(d=!0));go(t,i||n)}function Q1(t){if(!t._d){var n=fh(t._i),i=n.day===void 0?n.date:n.day;t._a=G0([n.year,n.month,i,n.hour,n.minute,n.second,n.millisecond],function(a){return a&&parseInt(a,10)}),gh(t)}}function J1(t){var n=new Vf(ph(cv(t)));return n._nextDay&&(n.add(1,"d"),n._nextDay=void 0),n}function cv(t){var n=t._i,i=t._f;return t._locale=t._locale||Ma(t._l),n===null||i===void 0&&n===""?hu({nullInput:!0}):(typeof n=="string"&&(t._i=n=t._locale.preparse(n)),Hi(n)?new Vf(ph(n)):(Wf(n)?t._d=n:Yi(i)?j1(t):i?yh(t):eg(t),eh(t)||(t._d=null),t))}function eg(t){var n=t._i;ri(n)?t._d=new Date(_t.now()):Wf(n)?t._d=new Date(n.valueOf()):typeof n=="string"?Z1(t):Yi(n)?(t._a=G0(n.slice(0),function(i){return parseInt(i,10)}),gh(t)):Qo(n)?Q1(t):Ra(n)?t._d=new Date(n):_t.createFromInputFallback(t)}function hv(t,n,i,a,f){var s={};return(n===!0||n===!1)&&(a=n,n=void 0),(i===!0||i===!1)&&(a=i,i=void 0),(Qo(t)&&Qc(t)||Yi(t)&&t.length===0)&&(t=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=f,s._l=i,s._i=t,s._f=n,s._strict=a,J1(s)}function Ur(t,n,i,a){return hv(t,n,i,a,!1)}var tg=Ci("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=Ur.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:hu()}),rg=Ci("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=Ur.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:hu()});function dv(t,n){var i,a;if(n.length===1&&Yi(n[0])&&(n=n[0]),!n.length)return Ur();for(i=n[0],a=1;a<n.length;++a)(!n[a].isValid()||n[a][t](i))&&(i=n[a]);return i}function ng(){var t=[].slice.call(arguments,0);return dv("isBefore",t)}function ig(){var t=[].slice.call(arguments,0);return dv("isAfter",t)}var ag=function(){return Date.now?Date.now():+new Date},el=["year","quarter","month","week","day","hour","minute","second","millisecond"];function og(t){var n,i=!1,a,f=el.length;for(n in t)if(Sr(t,n)&&!(an.call(el,n)!==-1&&(t[n]==null||!isNaN(t[n]))))return!1;for(a=0;a<f;++a)if(t[el[a]]){if(i)return!1;parseFloat(t[el[a]])!==fr(t[el[a]])&&(i=!0)}return!0}function sg(){return this._isValid}function fg(){return Wi(NaN)}function Du(t){var n=fh(t),i=n.year||0,a=n.quarter||0,f=n.month||0,s=n.week||n.isoWeek||0,l=n.day||0,d=n.hour||0,v=n.minute||0,I=n.second||0,B=n.millisecond||0;this._isValid=og(n),this._milliseconds=+B+I*1e3+v*6e4+d*1e3*60*60,this._days=+l+s*7,this._months=+f+a*3+i*12,this._data={},this._locale=Ma(),this._bubble()}function Lu(t){return t instanceof Du}function xh(t){return t<0?Math.round(-1*t)*-1:Math.round(t)}function lg(t,n,i){var a=Math.min(t.length,n.length),f=Math.abs(t.length-n.length),s=0,l;for(l=0;l<a;l++)(i&&t[l]!==n[l]||!i&&fr(t[l])!==fr(n[l]))&&s++;return s+f}function vv(t,n){Ft(t,0,0,function(){var i=this.utcOffset(),a="+";return i<0&&(i=-i,a="-"),a+ua(~~(i/60),2)+n+ua(~~i%60,2)})}vv("Z",":"),vv("ZZ",""),bt("Z",bu),bt("ZZ",bu),Mr(["Z","ZZ"],function(t,n,i){i._useUTC=!0,i._tzm=bh(bu,t)});var ug=/([\+\-]|\d\d)/gi;function bh(t,n){var i=(n||"").match(t),a,f,s;return i===null?null:(a=i[i.length-1]||[],f=(a+"").match(ug)||["-",0,0],s=+(f[1]*60)+fr(f[2]),s===0?0:f[0]==="+"?s:-s)}function wh(t,n){var i,a;return n._isUTC?(i=n.clone(),a=(Hi(t)||Wf(t)?t.valueOf():Ur(t).valueOf())-i.valueOf(),i._d.setTime(i._d.valueOf()+a),_t.updateOffset(i,!1),i):Ur(t).local()}function Sh(t){return-Math.round(t._d.getTimezoneOffset())}_t.updateOffset=function(){};function cg(t,n,i){var a=this._offset||0,f;if(!this.isValid())return t!=null?this:NaN;if(t!=null){if(typeof t=="string"){if(t=bh(bu,t),t===null)return this}else Math.abs(t)<16&&!i&&(t=t*60);return!this._isUTC&&n&&(f=Sh(this)),this._offset=t,this._isUTC=!0,f!=null&&this.add(f,"m"),a!==t&&(!n||this._changeInProgress?gv(this,Wi(t-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,_t.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?a:Sh(this)}function hg(t,n){return t!=null?(typeof t!="string"&&(t=-t),this.utcOffset(t,n),this):-this.utcOffset()}function dg(t){return this.utcOffset(0,t)}function vg(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Sh(this),"m")),this}function _g(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var t=bh(Pm,this._i);t!=null?this.utcOffset(t):this.utcOffset(0,!0)}return this}function pg(t){return this.isValid()?(t=t?Ur(t).utcOffset():0,(this.utcOffset()-t)%60===0):!1}function mg(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function gg(){if(!ri(this._isDSTShifted))return this._isDSTShifted;var t={},n;return rh(t,this),t=cv(t),t._a?(n=t._isUTC?fa(t._a):Ur(t._a),this._isDSTShifted=this.isValid()&&lg(t._a,n.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function yg(){return this.isValid()?!this._isUTC:!1}function xg(){return this.isValid()?this._isUTC:!1}function _v(){return this.isValid()?this._isUTC&&this._offset===0:!1}var bg=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,wg=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Wi(t,n){var i=t,a=null,f,s,l;return Lu(t)?i={ms:t._milliseconds,d:t._days,M:t._months}:Ra(t)||!isNaN(+t)?(i={},n?i[n]=+t:i.milliseconds=+t):(a=bg.exec(t))?(f=a[1]==="-"?-1:1,i={y:0,d:fr(a[ca])*f,h:fr(a[wn])*f,m:fr(a[zi])*f,s:fr(a[Oa])*f,ms:fr(xh(a[Jo]*1e3))*f}):(a=wg.exec(t))?(f=a[1]==="-"?-1:1,i={y:es(a[2],f),M:es(a[3],f),w:es(a[4],f),d:es(a[5],f),h:es(a[6],f),m:es(a[7],f),s:es(a[8],f)}):i==null?i={}:typeof i=="object"&&("from"in i||"to"in i)&&(l=Sg(Ur(i.from),Ur(i.to)),i={},i.ms=l.milliseconds,i.M=l.months),s=new Du(i),Lu(t)&&Sr(t,"_locale")&&(s._locale=t._locale),Lu(t)&&Sr(t,"_isValid")&&(s._isValid=t._isValid),s}Wi.fn=Du.prototype,Wi.invalid=fg;function es(t,n){var i=t&&parseFloat(t.replace(",","."));return(isNaN(i)?0:i)*n}function pv(t,n){var i={};return i.months=n.month()-t.month()+(n.year()-t.year())*12,t.clone().add(i.months,"M").isAfter(n)&&--i.months,i.milliseconds=+n-+t.clone().add(i.months,"M"),i}function Sg(t,n){var i;return t.isValid()&&n.isValid()?(n=wh(n,t),t.isBefore(n)?i=pv(t,n):(i=pv(n,t),i.milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}function mv(t,n){return function(i,a){var f,s;return a!==null&&!isNaN(+a)&&(z0(n,"moment()."+n+"(period, number) is deprecated. Please use moment()."+n+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=i,i=a,a=s),f=Wi(i,a),gv(this,f,t),this}}function gv(t,n,i,a){var f=n._milliseconds,s=xh(n._days),l=xh(n._months);!t.isValid()||(a=a==null?!0:a,l&&J0(t,pu(t,"Month")+l*i),s&&$0(t,"Date",pu(t,"Date")+s*i),f&&t._d.setTime(t._d.valueOf()+f*i),a&&_t.updateOffset(t,s||l))}var Ag=mv(1,"add"),Tg=mv(-1,"subtract");function yv(t){return typeof t=="string"||t instanceof String}function Eg(t){return Hi(t)||Wf(t)||yv(t)||Ra(t)||Lg(t)||Dg(t)||t===null||t===void 0}function Dg(t){var n=Qo(t)&&!Qc(t),i=!1,a=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],f,s,l=a.length;for(f=0;f<l;f+=1)s=a[f],i=i||Sr(t,s);return n&&i}function Lg(t){var n=Yi(t),i=!1;return n&&(i=t.filter(function(a){return!Ra(a)&&yv(t)}).length===0),n&&i}function Rg(t){var n=Qo(t)&&!Qc(t),i=!1,a=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],f,s;for(f=0;f<a.length;f+=1)s=a[f],i=i||Sr(t,s);return n&&i}function Cg(t,n){var i=t.diff(n,"days",!0);return i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse"}function Og(t,n){arguments.length===1&&(arguments[0]?Eg(arguments[0])?(t=arguments[0],n=void 0):Rg(arguments[0])&&(n=arguments[0],t=void 0):(t=void 0,n=void 0));var i=t||Ur(),a=wh(i,this).startOf("day"),f=_t.calendarFormat(this,a)||"sameElse",s=n&&(la(n[f])?n[f].call(this,i):n[f]);return this.format(s||this.localeData().calendar(f,this,Ur(i)))}function Ig(){return new Vf(this)}function Mg(t,n){var i=Hi(t)?t:Ur(t);return this.isValid()&&i.isValid()?(n=Oi(n)||"millisecond",n==="millisecond"?this.valueOf()>i.valueOf():i.valueOf()<this.clone().startOf(n).valueOf()):!1}function Fg(t,n){var i=Hi(t)?t:Ur(t);return this.isValid()&&i.isValid()?(n=Oi(n)||"millisecond",n==="millisecond"?this.valueOf()<i.valueOf():this.clone().endOf(n).valueOf()<i.valueOf()):!1}function kg(t,n,i,a){var f=Hi(t)?t:Ur(t),s=Hi(n)?n:Ur(n);return this.isValid()&&f.isValid()&&s.isValid()?(a=a||"()",(a[0]==="("?this.isAfter(f,i):!this.isBefore(f,i))&&(a[1]===")"?this.isBefore(s,i):!this.isAfter(s,i))):!1}function Pg(t,n){var i=Hi(t)?t:Ur(t),a;return this.isValid()&&i.isValid()?(n=Oi(n)||"millisecond",n==="millisecond"?this.valueOf()===i.valueOf():(a=i.valueOf(),this.clone().startOf(n).valueOf()<=a&&a<=this.clone().endOf(n).valueOf())):!1}function Ng(t,n){return this.isSame(t,n)||this.isAfter(t,n)}function Bg(t,n){return this.isSame(t,n)||this.isBefore(t,n)}function Gg(t,n,i){var a,f,s;if(!this.isValid())return NaN;if(a=wh(t,this),!a.isValid())return NaN;switch(f=(a.utcOffset()-this.utcOffset())*6e4,n=Oi(n),n){case"year":s=Ru(this,a)/12;break;case"month":s=Ru(this,a);break;case"quarter":s=Ru(this,a)/3;break;case"second":s=(this-a)/1e3;break;case"minute":s=(this-a)/6e4;break;case"hour":s=(this-a)/36e5;break;case"day":s=(this-a-f)/864e5;break;case"week":s=(this-a-f)/6048e5;break;default:s=this-a}return i?s:Ii(s)}function Ru(t,n){if(t.date()<n.date())return-Ru(n,t);var i=(n.year()-t.year())*12+(n.month()-t.month()),a=t.clone().add(i,"months"),f,s;return n-a<0?(f=t.clone().add(i-1,"months"),s=(n-a)/(a-f)):(f=t.clone().add(i+1,"months"),s=(n-a)/(f-a)),-(i+s)||0}_t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",_t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Ug(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Yg(t){if(!this.isValid())return null;var n=t!==!0,i=n?this.clone().utc():this;return i.year()<0||i.year()>9999?vu(i,n?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):la(Date.prototype.toISOString)?n?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",vu(i,"Z")):vu(i,n?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Hg(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",n="",i,a,f,s;return this.isLocal()||(t=this.utcOffset()===0?"moment.utc":"moment.parseZone",n="Z"),i="["+t+'("]',a=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",f="-MM-DD[T]HH:mm:ss.SSS",s=n+'[")]',this.format(i+a+f+s)}function zg(t){t||(t=this.isUtc()?_t.defaultFormatUtc:_t.defaultFormat);var n=vu(this,t);return this.localeData().postformat(n)}function Wg(t,n){return this.isValid()&&(Hi(t)&&t.isValid()||Ur(t).isValid())?Wi({to:this,from:t}).locale(this.locale()).humanize(!n):this.localeData().invalidDate()}function Vg(t){return this.from(Ur(),t)}function $g(t,n){return this.isValid()&&(Hi(t)&&t.isValid()||Ur(t).isValid())?Wi({from:this,to:t}).locale(this.locale()).humanize(!n):this.localeData().invalidDate()}function Zg(t){return this.to(Ur(),t)}function xv(t){var n;return t===void 0?this._locale._abbr:(n=Ma(t),n!=null&&(this._locale=n),this)}var bv=Ci("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return t===void 0?this.localeData():this.locale(t)});function wv(){return this._locale}var Cu=1e3,zs=60*Cu,Ou=60*zs,Sv=(365*400+97)*24*Ou;function Ws(t,n){return(t%n+n)%n}function Av(t,n,i){return t<100&&t>=0?new Date(t+400,n,i)-Sv:new Date(t,n,i).valueOf()}function Tv(t,n,i){return t<100&&t>=0?Date.UTC(t+400,n,i)-Sv:Date.UTC(t,n,i)}function Xg(t){var n,i;if(t=Oi(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(i=this._isUTC?Tv:Av,t){case"year":n=i(this.year(),0,1);break;case"quarter":n=i(this.year(),this.month()-this.month()%3,1);break;case"month":n=i(this.year(),this.month(),1);break;case"week":n=i(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":n=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":n=i(this.year(),this.month(),this.date());break;case"hour":n=this._d.valueOf(),n-=Ws(n+(this._isUTC?0:this.utcOffset()*zs),Ou);break;case"minute":n=this._d.valueOf(),n-=Ws(n,zs);break;case"second":n=this._d.valueOf(),n-=Ws(n,Cu);break}return this._d.setTime(n),_t.updateOffset(this,!0),this}function qg(t){var n,i;if(t=Oi(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(i=this._isUTC?Tv:Av,t){case"year":n=i(this.year()+1,0,1)-1;break;case"quarter":n=i(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":n=i(this.year(),this.month()+1,1)-1;break;case"week":n=i(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":n=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":n=i(this.year(),this.month(),this.date()+1)-1;break;case"hour":n=this._d.valueOf(),n+=Ou-Ws(n+(this._isUTC?0:this.utcOffset()*zs),Ou)-1;break;case"minute":n=this._d.valueOf(),n+=zs-Ws(n,zs)-1;break;case"second":n=this._d.valueOf(),n+=Cu-Ws(n,Cu)-1;break}return this._d.setTime(n),_t.updateOffset(this,!0),this}function Kg(){return this._d.valueOf()-(this._offset||0)*6e4}function jg(){return Math.floor(this.valueOf()/1e3)}function Qg(){return new Date(this.valueOf())}function Jg(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function ey(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function ty(){return this.isValid()?this.toISOString():null}function ry(){return eh(this)}function ny(){return go({},tr(this))}function iy(){return tr(this).overflow}function ay(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Ft("N",0,0,"eraAbbr"),Ft("NN",0,0,"eraAbbr"),Ft("NNN",0,0,"eraAbbr"),Ft("NNNN",0,0,"eraName"),Ft("NNNNN",0,0,"eraNarrow"),Ft("y",["y",1],"yo","eraYear"),Ft("y",["yy",2],0,"eraYear"),Ft("y",["yyy",3],0,"eraYear"),Ft("y",["yyyy",4],0,"eraYear"),bt("N",Ah),bt("NN",Ah),bt("NNN",Ah),bt("NNNN",py),bt("NNNNN",my),Mr(["N","NN","NNN","NNNN","NNNNN"],function(t,n,i,a){var f=i._locale.erasParse(t,a,i._strict);f?tr(i).era=f:tr(i).invalidEra=t}),bt("y",Ys),bt("yy",Ys),bt("yyy",Ys),bt("yyyy",Ys),bt("yo",gy),Mr(["y","yy","yyy","yyyy"],Vn),Mr(["yo"],function(t,n,i,a){var f;i._locale._eraYearOrdinalRegex&&(f=t.match(i._locale._eraYearOrdinalRegex)),i._locale.eraYearOrdinalParse?n[Vn]=i._locale.eraYearOrdinalParse(t,f):n[Vn]=parseInt(t,10)});function oy(t,n){var i,a,f,s=this._eras||Ma("en")._eras;for(i=0,a=s.length;i<a;++i){switch(typeof s[i].since){case"string":f=_t(s[i].since).startOf("day"),s[i].since=f.valueOf();break}switch(typeof s[i].until){case"undefined":s[i].until=1/0;break;case"string":f=_t(s[i].until).startOf("day").valueOf(),s[i].until=f.valueOf();break}}return s}function sy(t,n,i){var a,f,s=this.eras(),l,d,v;for(t=t.toUpperCase(),a=0,f=s.length;a<f;++a)if(l=s[a].name.toUpperCase(),d=s[a].abbr.toUpperCase(),v=s[a].narrow.toUpperCase(),i)switch(n){case"N":case"NN":case"NNN":if(d===t)return s[a];break;case"NNNN":if(l===t)return s[a];break;case"NNNNN":if(v===t)return s[a];break}else if([l,d,v].indexOf(t)>=0)return s[a]}function fy(t,n){var i=t.since<=t.until?1:-1;return n===void 0?_t(t.since).year():_t(t.since).year()+(n-t.offset)*i}function ly(){var t,n,i,a=this.localeData().eras();for(t=0,n=a.length;t<n;++t)if(i=this.clone().startOf("day").valueOf(),a[t].since<=i&&i<=a[t].until||a[t].until<=i&&i<=a[t].since)return a[t].name;return""}function uy(){var t,n,i,a=this.localeData().eras();for(t=0,n=a.length;t<n;++t)if(i=this.clone().startOf("day").valueOf(),a[t].since<=i&&i<=a[t].until||a[t].until<=i&&i<=a[t].since)return a[t].narrow;return""}function cy(){var t,n,i,a=this.localeData().eras();for(t=0,n=a.length;t<n;++t)if(i=this.clone().startOf("day").valueOf(),a[t].since<=i&&i<=a[t].until||a[t].until<=i&&i<=a[t].since)return a[t].abbr;return""}function hy(){var t,n,i,a,f=this.localeData().eras();for(t=0,n=f.length;t<n;++t)if(i=f[t].since<=f[t].until?1:-1,a=this.clone().startOf("day").valueOf(),f[t].since<=a&&a<=f[t].until||f[t].until<=a&&a<=f[t].since)return(this.year()-_t(f[t].since).year())*i+f[t].offset;return this.year()}function dy(t){return Sr(this,"_erasNameRegex")||Th.call(this),t?this._erasNameRegex:this._erasRegex}function vy(t){return Sr(this,"_erasAbbrRegex")||Th.call(this),t?this._erasAbbrRegex:this._erasRegex}function _y(t){return Sr(this,"_erasNarrowRegex")||Th.call(this),t?this._erasNarrowRegex:this._erasRegex}function Ah(t,n){return n.erasAbbrRegex(t)}function py(t,n){return n.erasNameRegex(t)}function my(t,n){return n.erasNarrowRegex(t)}function gy(t,n){return n._eraYearOrdinalRegex||Ys}function Th(){var t=[],n=[],i=[],a=[],f,s,l=this.eras();for(f=0,s=l.length;f<s;++f)n.push(_i(l[f].name)),t.push(_i(l[f].abbr)),i.push(_i(l[f].narrow)),a.push(_i(l[f].name)),a.push(_i(l[f].abbr)),a.push(_i(l[f].narrow));this._erasRegex=new RegExp("^("+a.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+n.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+t.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+i.join("|")+")","i")}Ft(0,["gg",2],0,function(){return this.weekYear()%100}),Ft(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Iu(t,n){Ft(0,[t,t.length],0,n)}Iu("gggg","weekYear"),Iu("ggggg","weekYear"),Iu("GGGG","isoWeekYear"),Iu("GGGGG","isoWeekYear"),zn("weekYear","gg"),zn("isoWeekYear","GG"),Wn("weekYear",1),Wn("isoWeekYear",1),bt("G",xu),bt("g",xu),bt("GG",Gr,vi),bt("gg",Gr,vi),bt("GGGG",uh,lh),bt("gggg",uh,lh),bt("GGGGG",yu,mu),bt("ggggg",yu,mu),Xf(["gggg","ggggg","GGGG","GGGGG"],function(t,n,i,a){n[a.substr(0,2)]=fr(t)}),Xf(["gg","GG"],function(t,n,i,a){n[a]=_t.parseTwoDigitYear(t)});function yy(t){return Ev.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function xy(t){return Ev.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function by(){return Ia(this.year(),1,4)}function wy(){return Ia(this.isoWeekYear(),1,4)}function Sy(){var t=this.localeData()._week;return Ia(this.year(),t.dow,t.doy)}function Ay(){var t=this.localeData()._week;return Ia(this.weekYear(),t.dow,t.doy)}function Ev(t,n,i,a,f){var s;return t==null?jf(this,a,f).year:(s=Ia(t,a,f),n>s&&(n=s),Ty.call(this,t,n,i,a,f))}function Ty(t,n,i,a,f){var s=nv(t,n,i,a,f),l=Kf(s.year,0,s.dayOfYear);return this.year(l.getUTCFullYear()),this.month(l.getUTCMonth()),this.date(l.getUTCDate()),this}Ft("Q",0,"Qo","quarter"),zn("quarter","Q"),Wn("quarter",7),bt("Q",Z0),Mr("Q",function(t,n){n[Ca]=(fr(t)-1)*3});function Ey(t){return t==null?Math.ceil((this.month()+1)/3):this.month((t-1)*3+this.month()%3)}Ft("D",["DD",2],"Do","date"),zn("date","D"),Wn("date",9),bt("D",Gr),bt("DD",Gr,vi),bt("Do",function(t,n){return t?n._dayOfMonthOrdinalParse||n._ordinalParse:n._dayOfMonthOrdinalParseLenient}),Mr(["D","DD"],ca),Mr("Do",function(t,n){n[ca]=fr(t.match(Gr)[0])});var Dv=Us("Date",!0);Ft("DDD",["DDDD",3],"DDDo","dayOfYear"),zn("dayOfYear","DDD"),Wn("dayOfYear",4),bt("DDD",gu),bt("DDDD",X0),Mr(["DDD","DDDD"],function(t,n,i){i._dayOfYear=fr(t)});function Dy(t){var n=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return t==null?n:this.add(t-n,"d")}Ft("m",["mm",2],0,"minute"),zn("minute","m"),Wn("minute",14),bt("m",Gr),bt("mm",Gr,vi),Mr(["m","mm"],zi);var Ly=Us("Minutes",!1);Ft("s",["ss",2],0,"second"),zn("second","s"),Wn("second",15),bt("s",Gr),bt("ss",Gr,vi),Mr(["s","ss"],Oa);var Ry=Us("Seconds",!1);Ft("S",0,0,function(){return~~(this.millisecond()/100)}),Ft(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),Ft(0,["SSS",3],0,"millisecond"),Ft(0,["SSSS",4],0,function(){return this.millisecond()*10}),Ft(0,["SSSSS",5],0,function(){return this.millisecond()*100}),Ft(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),Ft(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),Ft(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),Ft(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),zn("millisecond","ms"),Wn("millisecond",16),bt("S",gu,Z0),bt("SS",gu,vi),bt("SSS",gu,X0);var xo,Lv;for(xo="SSSS";xo.length<=9;xo+="S")bt(xo,Ys);function Cy(t,n){n[Jo]=fr(("0."+t)*1e3)}for(xo="S";xo.length<=9;xo+="S")Mr(xo,Cy);Lv=Us("Milliseconds",!1),Ft("z",0,0,"zoneAbbr"),Ft("zz",0,0,"zoneName");function Oy(){return this._isUTC?"UTC":""}function Iy(){return this._isUTC?"Coordinated Universal Time":""}var et=Vf.prototype;et.add=Ag,et.calendar=Og,et.clone=Ig,et.diff=Gg,et.endOf=qg,et.format=zg,et.from=Wg,et.fromNow=Vg,et.to=$g,et.toNow=Zg,et.get=Fm,et.invalidAt=iy,et.isAfter=Mg,et.isBefore=Fg,et.isBetween=kg,et.isSame=Pg,et.isSameOrAfter=Ng,et.isSameOrBefore=Bg,et.isValid=ry,et.lang=bv,et.locale=xv,et.localeData=wv,et.max=rg,et.min=tg,et.parsingFlags=ny,et.set=km,et.startOf=Xg,et.subtract=Tg,et.toArray=Jg,et.toObject=ey,et.toDate=Qg,et.toISOString=Yg,et.inspect=Hg,typeof Symbol<"u"&&Symbol.for!=null&&(et[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),et.toJSON=ty,et.toString=Ug,et.unix=jg,et.valueOf=Kg,et.creationData=ay,et.eraName=ly,et.eraNarrow=uy,et.eraAbbr=cy,et.eraYear=hy,et.year=rv,et.isLeapYear=e1,et.weekYear=yy,et.isoWeekYear=xy,et.quarter=et.quarters=Ey,et.month=ev,et.daysInMonth=jm,et.week=et.weeks=o1,et.isoWeek=et.isoWeeks=s1,et.weeksInYear=Sy,et.weeksInWeekYear=Ay,et.isoWeeksInYear=by,et.isoWeeksInISOWeekYear=wy,et.date=Dv,et.day=et.days=x1,et.weekday=b1,et.isoWeekday=w1,et.dayOfYear=Dy,et.hour=et.hours=R1,et.minute=et.minutes=Ly,et.second=et.seconds=Ry,et.millisecond=et.milliseconds=Lv,et.utcOffset=cg,et.utc=dg,et.local=vg,et.parseZone=_g,et.hasAlignedHourOffset=pg,et.isDST=mg,et.isLocal=yg,et.isUtcOffset=xg,et.isUtc=_v,et.isUTC=_v,et.zoneAbbr=Oy,et.zoneName=Iy,et.dates=Ci("dates accessor is deprecated. Use date instead.",Dv),et.months=Ci("months accessor is deprecated. Use month instead",ev),et.years=Ci("years accessor is deprecated. Use year instead",rv),et.zone=Ci("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",hg),et.isDSTShifted=Ci("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",gg);function My(t){return Ur(t*1e3)}function Fy(){return Ur.apply(null,arguments).parseZone()}function Rv(t){return t}var Ar=ih.prototype;Ar.calendar=xm,Ar.longDateFormat=Am,Ar.invalidDate=Em,Ar.ordinal=Rm,Ar.preparse=Rv,Ar.postformat=Rv,Ar.relativeTime=Om,Ar.pastFuture=Im,Ar.set=gm,Ar.eras=oy,Ar.erasParse=sy,Ar.erasConvertYear=fy,Ar.erasAbbrRegex=vy,Ar.erasNameRegex=dy,Ar.erasNarrowRegex=_y,Ar.months=Zm,Ar.monthsShort=Xm,Ar.monthsParse=Km,Ar.monthsRegex=Jm,Ar.monthsShortRegex=Qm,Ar.week=r1,Ar.firstDayOfYear=a1,Ar.firstDayOfWeek=i1,Ar.weekdays=_1,Ar.weekdaysMin=m1,Ar.weekdaysShort=p1,Ar.weekdaysParse=y1,Ar.weekdaysRegex=S1,Ar.weekdaysShortRegex=A1,Ar.weekdaysMinRegex=T1,Ar.isPM=D1,Ar.meridiem=C1;function Mu(t,n,i,a){var f=Ma(),s=fa().set(a,n);return f[i](s,t)}function Cv(t,n,i){if(Ra(t)&&(n=t,t=void 0),t=t||"",n!=null)return Mu(t,n,i,"month");var a,f=[];for(a=0;a<12;a++)f[a]=Mu(t,a,i,"month");return f}function Eh(t,n,i,a){typeof t=="boolean"?(Ra(n)&&(i=n,n=void 0),n=n||""):(n=t,i=n,t=!1,Ra(n)&&(i=n,n=void 0),n=n||"");var f=Ma(),s=t?f._week.dow:0,l,d=[];if(i!=null)return Mu(n,(i+s)%7,a,"day");for(l=0;l<7;l++)d[l]=Mu(n,(l+s)%7,a,"day");return d}function ky(t,n){return Cv(t,n,"months")}function Py(t,n){return Cv(t,n,"monthsShort")}function Ny(t,n,i){return Eh(t,n,i,"weekdays")}function By(t,n,i){return Eh(t,n,i,"weekdaysShort")}function Gy(t,n,i){return Eh(t,n,i,"weekdaysMin")}yo("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var n=t%10,i=fr(t%100/10)===1?"th":n===1?"st":n===2?"nd":n===3?"rd":"th";return t+i}}),_t.lang=Ci("moment.lang is deprecated. Use moment.locale instead.",yo),_t.langData=Ci("moment.langData is deprecated. Use moment.localeData instead.",Ma);var Fa=Math.abs;function Uy(){var t=this._data;return this._milliseconds=Fa(this._milliseconds),this._days=Fa(this._days),this._months=Fa(this._months),t.milliseconds=Fa(t.milliseconds),t.seconds=Fa(t.seconds),t.minutes=Fa(t.minutes),t.hours=Fa(t.hours),t.months=Fa(t.months),t.years=Fa(t.years),this}function Ov(t,n,i,a){var f=Wi(n,i);return t._milliseconds+=a*f._milliseconds,t._days+=a*f._days,t._months+=a*f._months,t._bubble()}function Yy(t,n){return Ov(this,t,n,1)}function Hy(t,n){return Ov(this,t,n,-1)}function Iv(t){return t<0?Math.floor(t):Math.ceil(t)}function zy(){var t=this._milliseconds,n=this._days,i=this._months,a=this._data,f,s,l,d,v;return t>=0&&n>=0&&i>=0||t<=0&&n<=0&&i<=0||(t+=Iv(Dh(i)+n)*864e5,n=0,i=0),a.milliseconds=t%1e3,f=Ii(t/1e3),a.seconds=f%60,s=Ii(f/60),a.minutes=s%60,l=Ii(s/60),a.hours=l%24,n+=Ii(l/24),v=Ii(Mv(n)),i+=v,n-=Iv(Dh(v)),d=Ii(i/12),i%=12,a.days=n,a.months=i,a.years=d,this}function Mv(t){return t*4800/146097}function Dh(t){return t*146097/4800}function Wy(t){if(!this.isValid())return NaN;var n,i,a=this._milliseconds;if(t=Oi(t),t==="month"||t==="quarter"||t==="year")switch(n=this._days+a/864e5,i=this._months+Mv(n),t){case"month":return i;case"quarter":return i/3;case"year":return i/12}else switch(n=this._days+Math.round(Dh(this._months)),t){case"week":return n/7+a/6048e5;case"day":return n+a/864e5;case"hour":return n*24+a/36e5;case"minute":return n*1440+a/6e4;case"second":return n*86400+a/1e3;case"millisecond":return Math.floor(n*864e5)+a;default:throw new Error("Unknown unit "+t)}}function Vy(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+fr(this._months/12)*31536e6:NaN}function ka(t){return function(){return this.as(t)}}var $y=ka("ms"),Zy=ka("s"),Xy=ka("m"),qy=ka("h"),Ky=ka("d"),jy=ka("w"),Qy=ka("M"),Jy=ka("Q"),ex=ka("y");function tx(){return Wi(this)}function rx(t){return t=Oi(t),this.isValid()?this[t+"s"]():NaN}function ts(t){return function(){return this.isValid()?this._data[t]:NaN}}var nx=ts("milliseconds"),ix=ts("seconds"),ax=ts("minutes"),ox=ts("hours"),sx=ts("days"),fx=ts("months"),lx=ts("years");function ux(){return Ii(this.days()/7)}var Pa=Math.round,Vs={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function cx(t,n,i,a,f){return f.relativeTime(n||1,!!i,t,a)}function hx(t,n,i,a){var f=Wi(t).abs(),s=Pa(f.as("s")),l=Pa(f.as("m")),d=Pa(f.as("h")),v=Pa(f.as("d")),I=Pa(f.as("M")),B=Pa(f.as("w")),p=Pa(f.as("y")),U=s<=i.ss&&["s",s]||s<i.s&&["ss",s]||l<=1&&["m"]||l<i.m&&["mm",l]||d<=1&&["h"]||d<i.h&&["hh",d]||v<=1&&["d"]||v<i.d&&["dd",v];return i.w!=null&&(U=U||B<=1&&["w"]||B<i.w&&["ww",B]),U=U||I<=1&&["M"]||I<i.M&&["MM",I]||p<=1&&["y"]||["yy",p],U[2]=n,U[3]=+t>0,U[4]=a,cx.apply(null,U)}function dx(t){return t===void 0?Pa:typeof t=="function"?(Pa=t,!0):!1}function vx(t,n){return Vs[t]===void 0?!1:n===void 0?Vs[t]:(Vs[t]=n,t==="s"&&(Vs.ss=n-1),!0)}function _x(t,n){if(!this.isValid())return this.localeData().invalidDate();var i=!1,a=Vs,f,s;return typeof t=="object"&&(n=t,t=!1),typeof t=="boolean"&&(i=t),typeof n=="object"&&(a=Object.assign({},Vs,n),n.s!=null&&n.ss==null&&(a.ss=n.s-1)),f=this.localeData(),s=hx(this,!i,a,f),i&&(s=f.pastFuture(+this,s)),f.postformat(s)}var Lh=Math.abs;function $s(t){return(t>0)-(t<0)||+t}function Fu(){if(!this.isValid())return this.localeData().invalidDate();var t=Lh(this._milliseconds)/1e3,n=Lh(this._days),i=Lh(this._months),a,f,s,l,d=this.asSeconds(),v,I,B,p;return d?(a=Ii(t/60),f=Ii(a/60),t%=60,a%=60,s=Ii(i/12),i%=12,l=t?t.toFixed(3).replace(/\.?0+$/,""):"",v=d<0?"-":"",I=$s(this._months)!==$s(d)?"-":"",B=$s(this._days)!==$s(d)?"-":"",p=$s(this._milliseconds)!==$s(d)?"-":"",v+"P"+(s?I+s+"Y":"")+(i?I+i+"M":"")+(n?B+n+"D":"")+(f||a||t?"T":"")+(f?p+f+"H":"")+(a?p+a+"M":"")+(t?p+l+"S":"")):"P0D"}var xr=Du.prototype;xr.isValid=sg,xr.abs=Uy,xr.add=Yy,xr.subtract=Hy,xr.as=Wy,xr.asMilliseconds=$y,xr.asSeconds=Zy,xr.asMinutes=Xy,xr.asHours=qy,xr.asDays=Ky,xr.asWeeks=jy,xr.asMonths=Qy,xr.asQuarters=Jy,xr.asYears=ex,xr.valueOf=Vy,xr._bubble=zy,xr.clone=tx,xr.get=rx,xr.milliseconds=nx,xr.seconds=ix,xr.minutes=ax,xr.hours=ox,xr.days=sx,xr.weeks=ux,xr.months=fx,xr.years=lx,xr.humanize=_x,xr.toISOString=Fu,xr.toString=Fu,xr.toJSON=Fu,xr.locale=xv,xr.localeData=wv,xr.toIsoString=Ci("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Fu),xr.lang=bv,Ft("X",0,0,"unix"),Ft("x",0,0,"valueOf"),bt("x",xu),bt("X",Nm),Mr("X",function(t,n,i){i._d=new Date(parseFloat(t)*1e3)}),Mr("x",function(t,n,i){i._d=new Date(fr(t))});//! moment.js
|
|
12
|
-
_t.version="2.
|
|
6
|
+
var s0;function _t(){return s0.apply(null,arguments)}function x_(t){s0=t}function ki(t){return t instanceof Array||Object.prototype.toString.call(t)==="[object Array]"}function Vf(t){return t!=null&&Object.prototype.toString.call(t)==="[object Object]"}function Sr(t,n){return Object.prototype.hasOwnProperty.call(t,n)}function Fc(t){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(t).length===0;var n;for(n in t)if(Sr(t,n))return!1;return!0}function jn(t){return t===void 0}function xa(t){return typeof t=="number"||Object.prototype.toString.call(t)==="[object Number]"}function No(t){return t instanceof Date||Object.prototype.toString.call(t)==="[object Date]"}function o0(t,n){var i=[],f,h=t.length;for(f=0;f<h;++f)i.push(n(t[f],f));return i}function hf(t,n){for(var i in n)Sr(n,i)&&(t[i]=n[i]);return Sr(n,"toString")&&(t.toString=n.toString),Sr(n,"valueOf")&&(t.valueOf=n.valueOf),t}function ea(t,n,i,f){return F0(t,n,i,f,!0).utc()}function w_(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function tr(t){return t._pf==null&&(t._pf=w_()),t._pf}var Nc;Array.prototype.some?Nc=Array.prototype.some:Nc=function(t){var n=Object(this),i=n.length>>>0,f;for(f=0;f<i;f++)if(f in n&&t.call(this,n[f],f,n))return!0;return!1};function Bc(t){var n=null,i=!1,f=t._d&&!isNaN(t._d.getTime());if(f&&(n=tr(t),i=Nc.call(n.parsedDateParts,function(h){return h!=null}),f=n.overflow<0&&!n.empty&&!n.invalidEra&&!n.invalidMonth&&!n.invalidWeekday&&!n.weekdayMismatch&&!n.nullInput&&!n.invalidFormat&&!n.userInvalidated&&(!n.meridiem||n.meridiem&&i),t._strict&&(f=f&&n.charsLeftOver===0&&n.unusedTokens.length===0&&n.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(t))t._isValid=f;else return f;return t._isValid}function eu(t){var n=ea(NaN);return t!=null?hf(tr(n),t):tr(n).userInvalidated=!0,n}var l0=_t.momentProperties=[],Pc=!1;function Gc(t,n){var i,f,h,s=l0.length;if(jn(n._isAMomentObject)||(t._isAMomentObject=n._isAMomentObject),jn(n._i)||(t._i=n._i),jn(n._f)||(t._f=n._f),jn(n._l)||(t._l=n._l),jn(n._strict)||(t._strict=n._strict),jn(n._tzm)||(t._tzm=n._tzm),jn(n._isUTC)||(t._isUTC=n._isUTC),jn(n._offset)||(t._offset=n._offset),jn(n._pf)||(t._pf=tr(n)),jn(n._locale)||(t._locale=n._locale),s>0)for(i=0;i<s;i++)f=l0[i],h=n[f],jn(h)||(t[f]=h);return t}function Bo(t){Gc(this,t),this._d=new Date(t._d!=null?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),Pc===!1&&(Pc=!0,_t.updateOffset(this),Pc=!1)}function Ii(t){return t instanceof Bo||t!=null&&t._isAMomentObject!=null}function u0(t){_t.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+t)}function Si(t,n){var i=!0;return hf(function(){if(_t.deprecationHandler!=null&&_t.deprecationHandler(null,t),i){var f=[],h,s,u,d=arguments.length;for(s=0;s<d;s++){if(h="",typeof arguments[s]=="object"){h+=`
|
|
7
|
+
[`+s+"] ";for(u in arguments[0])Sr(arguments[0],u)&&(h+=u+": "+arguments[0][u]+", ");h=h.slice(0,-2)}else h=arguments[s];f.push(h)}u0(t+`
|
|
8
|
+
Arguments: `+Array.prototype.slice.call(f).join("")+`
|
|
9
|
+
`+new Error().stack),i=!1}return n.apply(this,arguments)},n)}var c0={};function h0(t,n){_t.deprecationHandler!=null&&_t.deprecationHandler(t,n),c0[t]||(u0(n),c0[t]=!0)}_t.suppressDeprecationWarnings=!1,_t.deprecationHandler=null;function ta(t){return typeof Function<"u"&&t instanceof Function||Object.prototype.toString.call(t)==="[object Function]"}function S_(t){var n,i;for(i in t)Sr(t,i)&&(n=t[i],ta(n)?this[i]=n:this["_"+i]=n);this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Uc(t,n){var i=hf({},t),f;for(f in n)Sr(n,f)&&(Vf(t[f])&&Vf(n[f])?(i[f]={},hf(i[f],t[f]),hf(i[f],n[f])):n[f]!=null?i[f]=n[f]:delete i[f]);for(f in t)Sr(t,f)&&!Sr(n,f)&&Vf(t[f])&&(i[f]=hf({},i[f]));return i}function Yc(t){t!=null&&this.set(t)}var Hc;Object.keys?Hc=Object.keys:Hc=function(t){var n,i=[];for(n in t)Sr(t,n)&&i.push(n);return i};var T_={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function E_(t,n,i){var f=this._calendar[t]||this._calendar.sameElse;return ta(f)?f.call(n,i):f}function ra(t,n,i){var f=""+Math.abs(t),h=n-f.length,s=t>=0;return(s?i?"+":"":"-")+Math.pow(10,Math.max(0,h)).toString().substr(1)+f}var zc=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,tu=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Wc={},Cs={};function It(t,n,i,f){var h=f;typeof f=="string"&&(h=function(){return this[f]()}),t&&(Cs[t]=h),n&&(Cs[n[0]]=function(){return ra(h.apply(this,arguments),n[1],n[2])}),i&&(Cs[i]=function(){return this.localeData().ordinal(h.apply(this,arguments),t)})}function A_(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function D_(t){var n=t.match(zc),i,f;for(i=0,f=n.length;i<f;i++)Cs[n[i]]?n[i]=Cs[n[i]]:n[i]=A_(n[i]);return function(h){var s="",u;for(u=0;u<f;u++)s+=ta(n[u])?n[u].call(h,t):n[u];return s}}function ru(t,n){return t.isValid()?(n=d0(n,t.localeData()),Wc[n]=Wc[n]||D_(n),Wc[n](t)):t.localeData().invalidDate()}function d0(t,n){var i=5;function f(h){return n.longDateFormat(h)||h}for(tu.lastIndex=0;i>=0&&tu.test(t);)t=t.replace(tu,f),tu.lastIndex=0,i-=1;return t}var L_={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function O_(t){var n=this._longDateFormat[t],i=this._longDateFormat[t.toUpperCase()];return n||!i?n:(this._longDateFormat[t]=i.match(zc).map(function(f){return f==="MMMM"||f==="MM"||f==="DD"||f==="dddd"?f.slice(1):f}).join(""),this._longDateFormat[t])}var R_="Invalid date";function C_(){return this._invalidDate}var M_="%d",k_=/\d{1,2}/;function I_(t){return this._ordinal.replace("%d",t)}var F_={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function N_(t,n,i,f){var h=this._relativeTime[i];return ta(h)?h(t,n,i,f):h.replace(/%d/i,t)}function B_(t,n){var i=this._relativeTime[t>0?"future":"past"];return ta(i)?i(n):i.replace(/%s/i,n)}var v0={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function Ti(t){return typeof t=="string"?v0[t]||v0[t.toLowerCase()]:void 0}function Vc(t){var n={},i,f;for(f in t)Sr(t,f)&&(i=Ti(f),i&&(n[i]=t[f]));return n}var P_={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function G_(t){var n=[],i;for(i in t)Sr(t,i)&&n.push({unit:i,priority:P_[i]});return n.sort(function(f,h){return f.priority-h.priority}),n}var _0=/\d/,oi=/\d\d/,p0=/\d{3}/,$c=/\d{4}/,nu=/[+-]?\d{6}/,Gr=/\d\d?/,m0=/\d\d\d\d?/,g0=/\d\d\d\d\d\d?/,iu=/\d{1,3}/,Zc=/\d{1,4}/,au=/[+-]?\d{1,6}/,Ms=/\d+/,fu=/[+-]?\d+/,U_=/Z|[+-]\d\d:?\d\d/gi,su=/Z|[+-]\d\d(?::?\d\d)?/gi,Y_=/[+-]?\d+(\.\d{1,3})?/,Po=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ks=/^[1-9]\d?/,Xc=/^([1-9]\d|\d)/,ou;ou={};function xt(t,n,i){ou[t]=ta(n)?n:function(f,h){return f&&i?i:n}}function H_(t,n){return Sr(ou,t)?ou[t](n._strict,n._locale):new RegExp(z_(t))}function z_(t){return wa(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(n,i,f,h,s){return i||f||h||s}))}function wa(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Ei(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function _r(t){var n=+t,i=0;return n!==0&&isFinite(n)&&(i=Ei(n)),i}var qc={};function kr(t,n){var i,f=n,h;for(typeof t=="string"&&(t=[t]),xa(n)&&(f=function(s,u){u[n]=_r(s)}),h=t.length,i=0;i<h;i++)qc[t[i]]=f}function Go(t,n){kr(t,function(i,f,h,s){h._w=h._w||{},n(i,h._w,h,s)})}function W_(t,n,i){n!=null&&Sr(qc,t)&&qc[t](n,i._a,i,t)}function lu(t){return t%4===0&&t%100!==0||t%400===0}var Yn=0,Sa=1,na=2,bn=3,Fi=4,Ta=5,$f=6,V_=7,$_=8;It("Y",0,0,function(){var t=this.year();return t<=9999?ra(t,4):"+"+t}),It(0,["YY",2],0,function(){return this.year()%100}),It(0,["YYYY",4],0,"year"),It(0,["YYYYY",5],0,"year"),It(0,["YYYYYY",6,!0],0,"year"),xt("Y",fu),xt("YY",Gr,oi),xt("YYYY",Zc,$c),xt("YYYYY",au,nu),xt("YYYYYY",au,nu),kr(["YYYYY","YYYYYY"],Yn),kr("YYYY",function(t,n){n[Yn]=t.length===2?_t.parseTwoDigitYear(t):_r(t)}),kr("YY",function(t,n){n[Yn]=_t.parseTwoDigitYear(t)}),kr("Y",function(t,n){n[Yn]=parseInt(t,10)});function Uo(t){return lu(t)?366:365}_t.parseTwoDigitYear=function(t){return _r(t)+(_r(t)>68?1900:2e3)};var y0=Is("FullYear",!0);function Z_(){return lu(this.year())}function Is(t,n){return function(i){return i!=null?(b0(this,t,i),_t.updateOffset(this,n),this):Yo(this,t)}}function Yo(t,n){if(!t.isValid())return NaN;var i=t._d,f=t._isUTC;switch(n){case"Milliseconds":return f?i.getUTCMilliseconds():i.getMilliseconds();case"Seconds":return f?i.getUTCSeconds():i.getSeconds();case"Minutes":return f?i.getUTCMinutes():i.getMinutes();case"Hours":return f?i.getUTCHours():i.getHours();case"Date":return f?i.getUTCDate():i.getDate();case"Day":return f?i.getUTCDay():i.getDay();case"Month":return f?i.getUTCMonth():i.getMonth();case"FullYear":return f?i.getUTCFullYear():i.getFullYear();default:return NaN}}function b0(t,n,i){var f,h,s,u,d;if(!(!t.isValid()||isNaN(i))){switch(f=t._d,h=t._isUTC,n){case"Milliseconds":return void(h?f.setUTCMilliseconds(i):f.setMilliseconds(i));case"Seconds":return void(h?f.setUTCSeconds(i):f.setSeconds(i));case"Minutes":return void(h?f.setUTCMinutes(i):f.setMinutes(i));case"Hours":return void(h?f.setUTCHours(i):f.setHours(i));case"Date":return void(h?f.setUTCDate(i):f.setDate(i));case"FullYear":break;default:return}s=i,u=t.month(),d=t.date(),d=d===29&&u===1&&!lu(s)?28:d,h?f.setUTCFullYear(s,u,d):f.setFullYear(s,u,d)}}function X_(t){return t=Ti(t),ta(this[t])?this[t]():this}function q_(t,n){if(typeof t=="object"){t=Vc(t);var i=G_(t),f,h=i.length;for(f=0;f<h;f++)this[i[f].unit](t[i[f].unit])}else if(t=Ti(t),ta(this[t]))return this[t](n);return this}function K_(t,n){return(t%n+n)%n}var nn;Array.prototype.indexOf?nn=Array.prototype.indexOf:nn=function(t){var n;for(n=0;n<this.length;++n)if(this[n]===t)return n;return-1};function Kc(t,n){if(isNaN(t)||isNaN(n))return NaN;var i=K_(n,12);return t+=(n-i)/12,i===1?lu(t)?29:28:31-i%7%2}It("M",["MM",2],"Mo",function(){return this.month()+1}),It("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),It("MMMM",0,0,function(t){return this.localeData().months(this,t)}),xt("M",Gr,ks),xt("MM",Gr,oi),xt("MMM",function(t,n){return n.monthsShortRegex(t)}),xt("MMMM",function(t,n){return n.monthsRegex(t)}),kr(["M","MM"],function(t,n){n[Sa]=_r(t)-1}),kr(["MMM","MMMM"],function(t,n,i,f){var h=i._locale.monthsParse(t,f,i._strict);h!=null?n[Sa]=h:tr(i).invalidMonth=t});var j_="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),x0="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),w0=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Q_=Po,J_=Po;function ep(t,n){return t?ki(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||w0).test(n)?"format":"standalone"][t.month()]:ki(this._months)?this._months:this._months.standalone}function tp(t,n){return t?ki(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[w0.test(n)?"format":"standalone"][t.month()]:ki(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function rp(t,n,i){var f,h,s,u=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],f=0;f<12;++f)s=ea([2e3,f]),this._shortMonthsParse[f]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[f]=this.months(s,"").toLocaleLowerCase();return i?n==="MMM"?(h=nn.call(this._shortMonthsParse,u),h!==-1?h:null):(h=nn.call(this._longMonthsParse,u),h!==-1?h:null):n==="MMM"?(h=nn.call(this._shortMonthsParse,u),h!==-1?h:(h=nn.call(this._longMonthsParse,u),h!==-1?h:null)):(h=nn.call(this._longMonthsParse,u),h!==-1?h:(h=nn.call(this._shortMonthsParse,u),h!==-1?h:null))}function np(t,n,i){var f,h,s;if(this._monthsParseExact)return rp.call(this,t,n,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),f=0;f<12;f++){if(h=ea([2e3,f]),i&&!this._longMonthsParse[f]&&(this._longMonthsParse[f]=new RegExp("^"+this.months(h,"").replace(".","")+"$","i"),this._shortMonthsParse[f]=new RegExp("^"+this.monthsShort(h,"").replace(".","")+"$","i")),!i&&!this._monthsParse[f]&&(s="^"+this.months(h,"")+"|^"+this.monthsShort(h,""),this._monthsParse[f]=new RegExp(s.replace(".",""),"i")),i&&n==="MMMM"&&this._longMonthsParse[f].test(t))return f;if(i&&n==="MMM"&&this._shortMonthsParse[f].test(t))return f;if(!i&&this._monthsParse[f].test(t))return f}}function S0(t,n){if(!t.isValid())return t;if(typeof n=="string"){if(/^\d+$/.test(n))n=_r(n);else if(n=t.localeData().monthsParse(n),!xa(n))return t}var i=n,f=t.date();return f=f<29?f:Math.min(f,Kc(t.year(),i)),t._isUTC?t._d.setUTCMonth(i,f):t._d.setMonth(i,f),t}function T0(t){return t!=null?(S0(this,t),_t.updateOffset(this,!0),this):Yo(this,"Month")}function ip(){return Kc(this.year(),this.month())}function ap(t){return this._monthsParseExact?(Sr(this,"_monthsRegex")||E0.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(Sr(this,"_monthsShortRegex")||(this._monthsShortRegex=Q_),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)}function fp(t){return this._monthsParseExact?(Sr(this,"_monthsRegex")||E0.call(this),t?this._monthsStrictRegex:this._monthsRegex):(Sr(this,"_monthsRegex")||(this._monthsRegex=J_),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)}function E0(){function t(v,M){return M.length-v.length}var n=[],i=[],f=[],h,s,u,d;for(h=0;h<12;h++)s=ea([2e3,h]),u=wa(this.monthsShort(s,"")),d=wa(this.months(s,"")),n.push(u),i.push(d),f.push(d),f.push(u);n.sort(t),i.sort(t),f.sort(t),this._monthsRegex=new RegExp("^("+f.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")}function sp(t,n,i,f,h,s,u){var d;return t<100&&t>=0?(d=new Date(t+400,n,i,f,h,s,u),isFinite(d.getFullYear())&&d.setFullYear(t)):d=new Date(t,n,i,f,h,s,u),d}function Ho(t){var n,i;return t<100&&t>=0?(i=Array.prototype.slice.call(arguments),i[0]=t+400,n=new Date(Date.UTC.apply(null,i)),isFinite(n.getUTCFullYear())&&n.setUTCFullYear(t)):n=new Date(Date.UTC.apply(null,arguments)),n}function uu(t,n,i){var f=7+n-i,h=(7+Ho(t,0,f).getUTCDay()-n)%7;return-h+f-1}function A0(t,n,i,f,h){var s=(7+i-f)%7,u=uu(t,f,h),d=1+7*(n-1)+s+u,v,M;return d<=0?(v=t-1,M=Uo(v)+d):d>Uo(t)?(v=t+1,M=d-Uo(t)):(v=t,M=d),{year:v,dayOfYear:M}}function zo(t,n,i){var f=uu(t.year(),n,i),h=Math.floor((t.dayOfYear()-f-1)/7)+1,s,u;return h<1?(u=t.year()-1,s=h+Ea(u,n,i)):h>Ea(t.year(),n,i)?(s=h-Ea(t.year(),n,i),u=t.year()+1):(u=t.year(),s=h),{week:s,year:u}}function Ea(t,n,i){var f=uu(t,n,i),h=uu(t+1,n,i);return(Uo(t)-f+h)/7}It("w",["ww",2],"wo","week"),It("W",["WW",2],"Wo","isoWeek"),xt("w",Gr,ks),xt("ww",Gr,oi),xt("W",Gr,ks),xt("WW",Gr,oi),Go(["w","ww","W","WW"],function(t,n,i,f){n[f.substr(0,1)]=_r(t)});function op(t){return zo(t,this._week.dow,this._week.doy).week}var lp={dow:0,doy:6};function up(){return this._week.dow}function cp(){return this._week.doy}function hp(t){var n=this.localeData().week(this);return t==null?n:this.add((t-n)*7,"d")}function dp(t){var n=zo(this,1,4).week;return t==null?n:this.add((t-n)*7,"d")}It("d",0,"do","day"),It("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),It("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),It("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),It("e",0,0,"weekday"),It("E",0,0,"isoWeekday"),xt("d",Gr),xt("e",Gr),xt("E",Gr),xt("dd",function(t,n){return n.weekdaysMinRegex(t)}),xt("ddd",function(t,n){return n.weekdaysShortRegex(t)}),xt("dddd",function(t,n){return n.weekdaysRegex(t)}),Go(["dd","ddd","dddd"],function(t,n,i,f){var h=i._locale.weekdaysParse(t,f,i._strict);h!=null?n.d=h:tr(i).invalidWeekday=t}),Go(["d","e","E"],function(t,n,i,f){n[f]=_r(t)});function vp(t,n){return typeof t!="string"?t:isNaN(t)?(t=n.weekdaysParse(t),typeof t=="number"?t:null):parseInt(t,10)}function _p(t,n){return typeof t=="string"?n.weekdaysParse(t)%7||7:isNaN(t)?null:t}function jc(t,n){return t.slice(n,7).concat(t.slice(0,n))}var pp="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),D0="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),mp="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),gp=Po,yp=Po,bp=Po;function xp(t,n){var i=ki(this._weekdays)?this._weekdays:this._weekdays[t&&t!==!0&&this._weekdays.isFormat.test(n)?"format":"standalone"];return t===!0?jc(i,this._week.dow):t?i[t.day()]:i}function wp(t){return t===!0?jc(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort}function Sp(t){return t===!0?jc(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin}function Tp(t,n,i){var f,h,s,u=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],f=0;f<7;++f)s=ea([2e3,1]).day(f),this._minWeekdaysParse[f]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[f]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[f]=this.weekdays(s,"").toLocaleLowerCase();return i?n==="dddd"?(h=nn.call(this._weekdaysParse,u),h!==-1?h:null):n==="ddd"?(h=nn.call(this._shortWeekdaysParse,u),h!==-1?h:null):(h=nn.call(this._minWeekdaysParse,u),h!==-1?h:null):n==="dddd"?(h=nn.call(this._weekdaysParse,u),h!==-1||(h=nn.call(this._shortWeekdaysParse,u),h!==-1)?h:(h=nn.call(this._minWeekdaysParse,u),h!==-1?h:null)):n==="ddd"?(h=nn.call(this._shortWeekdaysParse,u),h!==-1||(h=nn.call(this._weekdaysParse,u),h!==-1)?h:(h=nn.call(this._minWeekdaysParse,u),h!==-1?h:null)):(h=nn.call(this._minWeekdaysParse,u),h!==-1||(h=nn.call(this._weekdaysParse,u),h!==-1)?h:(h=nn.call(this._shortWeekdaysParse,u),h!==-1?h:null))}function Ep(t,n,i){var f,h,s;if(this._weekdaysParseExact)return Tp.call(this,t,n,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),f=0;f<7;f++){if(h=ea([2e3,1]).day(f),i&&!this._fullWeekdaysParse[f]&&(this._fullWeekdaysParse[f]=new RegExp("^"+this.weekdays(h,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[f]=new RegExp("^"+this.weekdaysShort(h,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[f]=new RegExp("^"+this.weekdaysMin(h,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[f]||(s="^"+this.weekdays(h,"")+"|^"+this.weekdaysShort(h,"")+"|^"+this.weekdaysMin(h,""),this._weekdaysParse[f]=new RegExp(s.replace(".",""),"i")),i&&n==="dddd"&&this._fullWeekdaysParse[f].test(t))return f;if(i&&n==="ddd"&&this._shortWeekdaysParse[f].test(t))return f;if(i&&n==="dd"&&this._minWeekdaysParse[f].test(t))return f;if(!i&&this._weekdaysParse[f].test(t))return f}}function Ap(t){if(!this.isValid())return t!=null?this:NaN;var n=Yo(this,"Day");return t!=null?(t=vp(t,this.localeData()),this.add(t-n,"d")):n}function Dp(t){if(!this.isValid())return t!=null?this:NaN;var n=(this.day()+7-this.localeData()._week.dow)%7;return t==null?n:this.add(t-n,"d")}function Lp(t){if(!this.isValid())return t!=null?this:NaN;if(t!=null){var n=_p(t,this.localeData());return this.day(this.day()%7?n:n-7)}else return this.day()||7}function Op(t){return this._weekdaysParseExact?(Sr(this,"_weekdaysRegex")||Qc.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(Sr(this,"_weekdaysRegex")||(this._weekdaysRegex=gp),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function Rp(t){return this._weekdaysParseExact?(Sr(this,"_weekdaysRegex")||Qc.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Sr(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=yp),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Cp(t){return this._weekdaysParseExact?(Sr(this,"_weekdaysRegex")||Qc.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Sr(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=bp),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Qc(){function t(k,g){return g.length-k.length}var n=[],i=[],f=[],h=[],s,u,d,v,M;for(s=0;s<7;s++)u=ea([2e3,1]).day(s),d=wa(this.weekdaysMin(u,"")),v=wa(this.weekdaysShort(u,"")),M=wa(this.weekdays(u,"")),n.push(d),i.push(v),f.push(M),h.push(d),h.push(v),h.push(M);n.sort(t),i.sort(t),f.sort(t),h.sort(t),this._weekdaysRegex=new RegExp("^("+h.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+f.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+n.join("|")+")","i")}function Jc(){return this.hours()%12||12}function Mp(){return this.hours()||24}It("H",["HH",2],0,"hour"),It("h",["hh",2],0,Jc),It("k",["kk",2],0,Mp),It("hmm",0,0,function(){return""+Jc.apply(this)+ra(this.minutes(),2)}),It("hmmss",0,0,function(){return""+Jc.apply(this)+ra(this.minutes(),2)+ra(this.seconds(),2)}),It("Hmm",0,0,function(){return""+this.hours()+ra(this.minutes(),2)}),It("Hmmss",0,0,function(){return""+this.hours()+ra(this.minutes(),2)+ra(this.seconds(),2)});function L0(t,n){It(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),n)})}L0("a",!0),L0("A",!1);function O0(t,n){return n._meridiemParse}xt("a",O0),xt("A",O0),xt("H",Gr,Xc),xt("h",Gr,ks),xt("k",Gr,ks),xt("HH",Gr,oi),xt("hh",Gr,oi),xt("kk",Gr,oi),xt("hmm",m0),xt("hmmss",g0),xt("Hmm",m0),xt("Hmmss",g0),kr(["H","HH"],bn),kr(["k","kk"],function(t,n,i){var f=_r(t);n[bn]=f===24?0:f}),kr(["a","A"],function(t,n,i){i._isPm=i._locale.isPM(t),i._meridiem=t}),kr(["h","hh"],function(t,n,i){n[bn]=_r(t),tr(i).bigHour=!0}),kr("hmm",function(t,n,i){var f=t.length-2;n[bn]=_r(t.substr(0,f)),n[Fi]=_r(t.substr(f)),tr(i).bigHour=!0}),kr("hmmss",function(t,n,i){var f=t.length-4,h=t.length-2;n[bn]=_r(t.substr(0,f)),n[Fi]=_r(t.substr(f,2)),n[Ta]=_r(t.substr(h)),tr(i).bigHour=!0}),kr("Hmm",function(t,n,i){var f=t.length-2;n[bn]=_r(t.substr(0,f)),n[Fi]=_r(t.substr(f))}),kr("Hmmss",function(t,n,i){var f=t.length-4,h=t.length-2;n[bn]=_r(t.substr(0,f)),n[Fi]=_r(t.substr(f,2)),n[Ta]=_r(t.substr(h))});function kp(t){return(t+"").toLowerCase().charAt(0)==="p"}var Ip=/[ap]\.?m?\.?/i,Fp=Is("Hours",!0);function Np(t,n,i){return t>11?i?"pm":"PM":i?"am":"AM"}var R0={calendar:T_,longDateFormat:L_,invalidDate:R_,ordinal:M_,dayOfMonthOrdinalParse:k_,relativeTime:F_,months:j_,monthsShort:x0,week:lp,weekdays:pp,weekdaysMin:mp,weekdaysShort:D0,meridiemParse:Ip},$r={},Wo={},Vo;function Bp(t,n){var i,f=Math.min(t.length,n.length);for(i=0;i<f;i+=1)if(t[i]!==n[i])return i;return f}function C0(t){return t&&t.toLowerCase().replace("_","-")}function Pp(t){for(var n=0,i,f,h,s;n<t.length;){for(s=C0(t[n]).split("-"),i=s.length,f=C0(t[n+1]),f=f?f.split("-"):null;i>0;){if(h=cu(s.slice(0,i).join("-")),h)return h;if(f&&f.length>=i&&Bp(s,f)>=i-1)break;i--}n++}return Vo}function Gp(t){return!!(t&&t.match("^[^/\\\\]*$"))}function cu(t){var n=null,i;if($r[t]===void 0&&typeof module<"u"&&module&&module.exports&&Gp(t))try{n=Vo._abbr,i=require,i("./locale/"+t),df(n)}catch{$r[t]=null}return $r[t]}function df(t,n){var i;return t&&(jn(n)?i=Aa(t):i=eh(t,n),i?Vo=i:typeof console<"u"&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),Vo._abbr}function eh(t,n){if(n!==null){var i,f=R0;if(n.abbr=t,$r[t]!=null)h0("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),f=$r[t]._config;else if(n.parentLocale!=null)if($r[n.parentLocale]!=null)f=$r[n.parentLocale]._config;else if(i=cu(n.parentLocale),i!=null)f=i._config;else return Wo[n.parentLocale]||(Wo[n.parentLocale]=[]),Wo[n.parentLocale].push({name:t,config:n}),null;return $r[t]=new Yc(Uc(f,n)),Wo[t]&&Wo[t].forEach(function(h){eh(h.name,h.config)}),df(t),$r[t]}else return delete $r[t],null}function Up(t,n){if(n!=null){var i,f,h=R0;$r[t]!=null&&$r[t].parentLocale!=null?$r[t].set(Uc($r[t]._config,n)):(f=cu(t),f!=null&&(h=f._config),n=Uc(h,n),f==null&&(n.abbr=t),i=new Yc(n),i.parentLocale=$r[t],$r[t]=i),df(t)}else $r[t]!=null&&($r[t].parentLocale!=null?($r[t]=$r[t].parentLocale,t===df()&&df(t)):$r[t]!=null&&delete $r[t]);return $r[t]}function Aa(t){var n;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Vo;if(!ki(t)){if(n=cu(t),n)return n;t=[t]}return Pp(t)}function Yp(){return Hc($r)}function th(t){var n,i=t._a;return i&&tr(t).overflow===-2&&(n=i[Sa]<0||i[Sa]>11?Sa:i[na]<1||i[na]>Kc(i[Yn],i[Sa])?na:i[bn]<0||i[bn]>24||i[bn]===24&&(i[Fi]!==0||i[Ta]!==0||i[$f]!==0)?bn:i[Fi]<0||i[Fi]>59?Fi:i[Ta]<0||i[Ta]>59?Ta:i[$f]<0||i[$f]>999?$f:-1,tr(t)._overflowDayOfYear&&(n<Yn||n>na)&&(n=na),tr(t)._overflowWeeks&&n===-1&&(n=V_),tr(t)._overflowWeekday&&n===-1&&(n=$_),tr(t).overflow=n),t}var Hp=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,zp=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Wp=/Z|[+-]\d\d(?::?\d\d)?/,hu=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],rh=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Vp=/^\/?Date\((-?\d+)/i,$p=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Zp={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function M0(t){var n,i,f=t._i,h=Hp.exec(f)||zp.exec(f),s,u,d,v,M=hu.length,k=rh.length;if(h){for(tr(t).iso=!0,n=0,i=M;n<i;n++)if(hu[n][1].exec(h[1])){u=hu[n][0],s=hu[n][2]!==!1;break}if(u==null){t._isValid=!1;return}if(h[3]){for(n=0,i=k;n<i;n++)if(rh[n][1].exec(h[3])){d=(h[2]||" ")+rh[n][0];break}if(d==null){t._isValid=!1;return}}if(!s&&d!=null){t._isValid=!1;return}if(h[4])if(Wp.exec(h[4]))v="Z";else{t._isValid=!1;return}t._f=u+(d||"")+(v||""),ih(t)}else t._isValid=!1}function Xp(t,n,i,f,h,s){var u=[qp(t),x0.indexOf(n),parseInt(i,10),parseInt(f,10),parseInt(h,10)];return s&&u.push(parseInt(s,10)),u}function qp(t){var n=parseInt(t,10);return n<=49?2e3+n:n<=999?1900+n:n}function Kp(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function jp(t,n,i){if(t){var f=D0.indexOf(t),h=new Date(n[0],n[1],n[2]).getDay();if(f!==h)return tr(i).weekdayMismatch=!0,i._isValid=!1,!1}return!0}function Qp(t,n,i){if(t)return Zp[t];if(n)return 0;var f=parseInt(i,10),h=f%100,s=(f-h)/100;return s*60+h}function k0(t){var n=$p.exec(Kp(t._i)),i;if(n){if(i=Xp(n[4],n[3],n[2],n[5],n[6],n[7]),!jp(n[1],i,t))return;t._a=i,t._tzm=Qp(n[8],n[9],n[10]),t._d=Ho.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),tr(t).rfc2822=!0}else t._isValid=!1}function Jp(t){var n=Vp.exec(t._i);if(n!==null){t._d=new Date(+n[1]);return}if(M0(t),t._isValid===!1)delete t._isValid;else return;if(k0(t),t._isValid===!1)delete t._isValid;else return;t._strict?t._isValid=!1:_t.createFromInputFallback(t)}_t.createFromInputFallback=Si("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))});function Fs(t,n,i){return t!=null?t:n!=null?n:i}function em(t){var n=new Date(_t.now());return t._useUTC?[n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()]:[n.getFullYear(),n.getMonth(),n.getDate()]}function nh(t){var n,i,f=[],h,s,u;if(!t._d){for(h=em(t),t._w&&t._a[na]==null&&t._a[Sa]==null&&tm(t),t._dayOfYear!=null&&(u=Fs(t._a[Yn],h[Yn]),(t._dayOfYear>Uo(u)||t._dayOfYear===0)&&(tr(t)._overflowDayOfYear=!0),i=Ho(u,0,t._dayOfYear),t._a[Sa]=i.getUTCMonth(),t._a[na]=i.getUTCDate()),n=0;n<3&&t._a[n]==null;++n)t._a[n]=f[n]=h[n];for(;n<7;n++)t._a[n]=f[n]=t._a[n]==null?n===2?1:0:t._a[n];t._a[bn]===24&&t._a[Fi]===0&&t._a[Ta]===0&&t._a[$f]===0&&(t._nextDay=!0,t._a[bn]=0),t._d=(t._useUTC?Ho:sp).apply(null,f),s=t._useUTC?t._d.getUTCDay():t._d.getDay(),t._tzm!=null&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[bn]=24),t._w&&typeof t._w.d<"u"&&t._w.d!==s&&(tr(t).weekdayMismatch=!0)}}function tm(t){var n,i,f,h,s,u,d,v,M;n=t._w,n.GG!=null||n.W!=null||n.E!=null?(s=1,u=4,i=Fs(n.GG,t._a[Yn],zo(Ur(),1,4).year),f=Fs(n.W,1),h=Fs(n.E,1),(h<1||h>7)&&(v=!0)):(s=t._locale._week.dow,u=t._locale._week.doy,M=zo(Ur(),s,u),i=Fs(n.gg,t._a[Yn],M.year),f=Fs(n.w,M.week),n.d!=null?(h=n.d,(h<0||h>6)&&(v=!0)):n.e!=null?(h=n.e+s,(n.e<0||n.e>6)&&(v=!0)):h=s),f<1||f>Ea(i,s,u)?tr(t)._overflowWeeks=!0:v!=null?tr(t)._overflowWeekday=!0:(d=A0(i,f,h,s,u),t._a[Yn]=d.year,t._dayOfYear=d.dayOfYear)}_t.ISO_8601=function(){},_t.RFC_2822=function(){};function ih(t){if(t._f===_t.ISO_8601){M0(t);return}if(t._f===_t.RFC_2822){k0(t);return}t._a=[],tr(t).empty=!0;var n=""+t._i,i,f,h,s,u,d=n.length,v=0,M,k;for(h=d0(t._f,t._locale).match(zc)||[],k=h.length,i=0;i<k;i++)s=h[i],f=(n.match(H_(s,t))||[])[0],f&&(u=n.substr(0,n.indexOf(f)),u.length>0&&tr(t).unusedInput.push(u),n=n.slice(n.indexOf(f)+f.length),v+=f.length),Cs[s]?(f?tr(t).empty=!1:tr(t).unusedTokens.push(s),W_(s,f,t)):t._strict&&!f&&tr(t).unusedTokens.push(s);tr(t).charsLeftOver=d-v,n.length>0&&tr(t).unusedInput.push(n),t._a[bn]<=12&&tr(t).bigHour===!0&&t._a[bn]>0&&(tr(t).bigHour=void 0),tr(t).parsedDateParts=t._a.slice(0),tr(t).meridiem=t._meridiem,t._a[bn]=rm(t._locale,t._a[bn],t._meridiem),M=tr(t).era,M!==null&&(t._a[Yn]=t._locale.erasConvertYear(M,t._a[Yn])),nh(t),th(t)}function rm(t,n,i){var f;return i==null?n:t.meridiemHour!=null?t.meridiemHour(n,i):(t.isPM!=null&&(f=t.isPM(i),f&&n<12&&(n+=12),!f&&n===12&&(n=0)),n)}function nm(t){var n,i,f,h,s,u,d=!1,v=t._f.length;if(v===0){tr(t).invalidFormat=!0,t._d=new Date(NaN);return}for(h=0;h<v;h++)s=0,u=!1,n=Gc({},t),t._useUTC!=null&&(n._useUTC=t._useUTC),n._f=t._f[h],ih(n),Bc(n)&&(u=!0),s+=tr(n).charsLeftOver,s+=tr(n).unusedTokens.length*10,tr(n).score=s,d?s<f&&(f=s,i=n):(f==null||s<f||u)&&(f=s,i=n,u&&(d=!0));hf(t,i||n)}function im(t){if(!t._d){var n=Vc(t._i),i=n.day===void 0?n.date:n.day;t._a=o0([n.year,n.month,i,n.hour,n.minute,n.second,n.millisecond],function(f){return f&&parseInt(f,10)}),nh(t)}}function am(t){var n=new Bo(th(I0(t)));return n._nextDay&&(n.add(1,"d"),n._nextDay=void 0),n}function I0(t){var n=t._i,i=t._f;return t._locale=t._locale||Aa(t._l),n===null||i===void 0&&n===""?eu({nullInput:!0}):(typeof n=="string"&&(t._i=n=t._locale.preparse(n)),Ii(n)?new Bo(th(n)):(No(n)?t._d=n:ki(i)?nm(t):i?ih(t):fm(t),Bc(t)||(t._d=null),t))}function fm(t){var n=t._i;jn(n)?t._d=new Date(_t.now()):No(n)?t._d=new Date(n.valueOf()):typeof n=="string"?Jp(t):ki(n)?(t._a=o0(n.slice(0),function(i){return parseInt(i,10)}),nh(t)):Vf(n)?im(t):xa(n)?t._d=new Date(n):_t.createFromInputFallback(t)}function F0(t,n,i,f,h){var s={};return(n===!0||n===!1)&&(f=n,n=void 0),(i===!0||i===!1)&&(f=i,i=void 0),(Vf(t)&&Fc(t)||ki(t)&&t.length===0)&&(t=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=h,s._l=i,s._i=t,s._f=n,s._strict=f,am(s)}function Ur(t,n,i,f){return F0(t,n,i,f,!1)}var sm=Si("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=Ur.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:eu()}),om=Si("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=Ur.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:eu()});function N0(t,n){var i,f;if(n.length===1&&ki(n[0])&&(n=n[0]),!n.length)return Ur();for(i=n[0],f=1;f<n.length;++f)(!n[f].isValid()||n[f][t](i))&&(i=n[f]);return i}function lm(){var t=[].slice.call(arguments,0);return N0("isBefore",t)}function um(){var t=[].slice.call(arguments,0);return N0("isAfter",t)}var cm=function(){return Date.now?Date.now():+new Date},$o=["year","quarter","month","week","day","hour","minute","second","millisecond"];function hm(t){var n,i=!1,f,h=$o.length;for(n in t)if(Sr(t,n)&&!(nn.call($o,n)!==-1&&(t[n]==null||!isNaN(t[n]))))return!1;for(f=0;f<h;++f)if(t[$o[f]]){if(i)return!1;parseFloat(t[$o[f]])!==_r(t[$o[f]])&&(i=!0)}return!0}function dm(){return this._isValid}function vm(){return Ni(NaN)}function du(t){var n=Vc(t),i=n.year||0,f=n.quarter||0,h=n.month||0,s=n.week||n.isoWeek||0,u=n.day||0,d=n.hour||0,v=n.minute||0,M=n.second||0,k=n.millisecond||0;this._isValid=hm(n),this._milliseconds=+k+M*1e3+v*6e4+d*1e3*60*60,this._days=+u+s*7,this._months=+h+f*3+i*12,this._data={},this._locale=Aa(),this._bubble()}function vu(t){return t instanceof du}function ah(t){return t<0?Math.round(-1*t)*-1:Math.round(t)}function _m(t,n,i){var f=Math.min(t.length,n.length),h=Math.abs(t.length-n.length),s=0,u;for(u=0;u<f;u++)(i&&t[u]!==n[u]||!i&&_r(t[u])!==_r(n[u]))&&s++;return s+h}function B0(t,n){It(t,0,0,function(){var i=this.utcOffset(),f="+";return i<0&&(i=-i,f="-"),f+ra(~~(i/60),2)+n+ra(~~i%60,2)})}B0("Z",":"),B0("ZZ",""),xt("Z",su),xt("ZZ",su),kr(["Z","ZZ"],function(t,n,i){i._useUTC=!0,i._tzm=fh(su,t)});var pm=/([\+\-]|\d\d)/gi;function fh(t,n){var i=(n||"").match(t),f,h,s;return i===null?null:(f=i[i.length-1]||[],h=(f+"").match(pm)||["-",0,0],s=+(h[1]*60)+_r(h[2]),s===0?0:h[0]==="+"?s:-s)}function sh(t,n){var i,f;return n._isUTC?(i=n.clone(),f=(Ii(t)||No(t)?t.valueOf():Ur(t).valueOf())-i.valueOf(),i._d.setTime(i._d.valueOf()+f),_t.updateOffset(i,!1),i):Ur(t).local()}function oh(t){return-Math.round(t._d.getTimezoneOffset())}_t.updateOffset=function(){};function mm(t,n,i){var f=this._offset||0,h;if(!this.isValid())return t!=null?this:NaN;if(t!=null){if(typeof t=="string"){if(t=fh(su,t),t===null)return this}else Math.abs(t)<16&&!i&&(t=t*60);return!this._isUTC&&n&&(h=oh(this)),this._offset=t,this._isUTC=!0,h!=null&&this.add(h,"m"),f!==t&&(!n||this._changeInProgress?Y0(this,Ni(t-f,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,_t.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?f:oh(this)}function gm(t,n){return t!=null?(typeof t!="string"&&(t=-t),this.utcOffset(t,n),this):-this.utcOffset()}function ym(t){return this.utcOffset(0,t)}function bm(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(oh(this),"m")),this}function xm(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var t=fh(U_,this._i);t!=null?this.utcOffset(t):this.utcOffset(0,!0)}return this}function wm(t){return this.isValid()?(t=t?Ur(t).utcOffset():0,(this.utcOffset()-t)%60===0):!1}function Sm(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Tm(){if(!jn(this._isDSTShifted))return this._isDSTShifted;var t={},n;return Gc(t,this),t=I0(t),t._a?(n=t._isUTC?ea(t._a):Ur(t._a),this._isDSTShifted=this.isValid()&&_m(t._a,n.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Em(){return this.isValid()?!this._isUTC:!1}function Am(){return this.isValid()?this._isUTC:!1}function P0(){return this.isValid()?this._isUTC&&this._offset===0:!1}var Dm=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Lm=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ni(t,n){var i=t,f=null,h,s,u;return vu(t)?i={ms:t._milliseconds,d:t._days,M:t._months}:xa(t)||!isNaN(+t)?(i={},n?i[n]=+t:i.milliseconds=+t):(f=Dm.exec(t))?(h=f[1]==="-"?-1:1,i={y:0,d:_r(f[na])*h,h:_r(f[bn])*h,m:_r(f[Fi])*h,s:_r(f[Ta])*h,ms:_r(ah(f[$f]*1e3))*h}):(f=Lm.exec(t))?(h=f[1]==="-"?-1:1,i={y:Zf(f[2],h),M:Zf(f[3],h),w:Zf(f[4],h),d:Zf(f[5],h),h:Zf(f[6],h),m:Zf(f[7],h),s:Zf(f[8],h)}):i==null?i={}:typeof i=="object"&&("from"in i||"to"in i)&&(u=Om(Ur(i.from),Ur(i.to)),i={},i.ms=u.milliseconds,i.M=u.months),s=new du(i),vu(t)&&Sr(t,"_locale")&&(s._locale=t._locale),vu(t)&&Sr(t,"_isValid")&&(s._isValid=t._isValid),s}Ni.fn=du.prototype,Ni.invalid=vm;function Zf(t,n){var i=t&&parseFloat(t.replace(",","."));return(isNaN(i)?0:i)*n}function G0(t,n){var i={};return i.months=n.month()-t.month()+(n.year()-t.year())*12,t.clone().add(i.months,"M").isAfter(n)&&--i.months,i.milliseconds=+n-+t.clone().add(i.months,"M"),i}function Om(t,n){var i;return t.isValid()&&n.isValid()?(n=sh(n,t),t.isBefore(n)?i=G0(t,n):(i=G0(n,t),i.milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}function U0(t,n){return function(i,f){var h,s;return f!==null&&!isNaN(+f)&&(h0(n,"moment()."+n+"(period, number) is deprecated. Please use moment()."+n+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=i,i=f,f=s),h=Ni(i,f),Y0(this,h,t),this}}function Y0(t,n,i,f){var h=n._milliseconds,s=ah(n._days),u=ah(n._months);!t.isValid()||(f=f==null?!0:f,u&&S0(t,Yo(t,"Month")+u*i),s&&b0(t,"Date",Yo(t,"Date")+s*i),h&&t._d.setTime(t._d.valueOf()+h*i),f&&_t.updateOffset(t,s||u))}var Rm=U0(1,"add"),Cm=U0(-1,"subtract");function H0(t){return typeof t=="string"||t instanceof String}function Mm(t){return Ii(t)||No(t)||H0(t)||xa(t)||Im(t)||km(t)||t===null||t===void 0}function km(t){var n=Vf(t)&&!Fc(t),i=!1,f=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],h,s,u=f.length;for(h=0;h<u;h+=1)s=f[h],i=i||Sr(t,s);return n&&i}function Im(t){var n=ki(t),i=!1;return n&&(i=t.filter(function(f){return!xa(f)&&H0(t)}).length===0),n&&i}function Fm(t){var n=Vf(t)&&!Fc(t),i=!1,f=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],h,s;for(h=0;h<f.length;h+=1)s=f[h],i=i||Sr(t,s);return n&&i}function Nm(t,n){var i=t.diff(n,"days",!0);return i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse"}function Bm(t,n){arguments.length===1&&(arguments[0]?Mm(arguments[0])?(t=arguments[0],n=void 0):Fm(arguments[0])&&(n=arguments[0],t=void 0):(t=void 0,n=void 0));var i=t||Ur(),f=sh(i,this).startOf("day"),h=_t.calendarFormat(this,f)||"sameElse",s=n&&(ta(n[h])?n[h].call(this,i):n[h]);return this.format(s||this.localeData().calendar(h,this,Ur(i)))}function Pm(){return new Bo(this)}function Gm(t,n){var i=Ii(t)?t:Ur(t);return this.isValid()&&i.isValid()?(n=Ti(n)||"millisecond",n==="millisecond"?this.valueOf()>i.valueOf():i.valueOf()<this.clone().startOf(n).valueOf()):!1}function Um(t,n){var i=Ii(t)?t:Ur(t);return this.isValid()&&i.isValid()?(n=Ti(n)||"millisecond",n==="millisecond"?this.valueOf()<i.valueOf():this.clone().endOf(n).valueOf()<i.valueOf()):!1}function Ym(t,n,i,f){var h=Ii(t)?t:Ur(t),s=Ii(n)?n:Ur(n);return this.isValid()&&h.isValid()&&s.isValid()?(f=f||"()",(f[0]==="("?this.isAfter(h,i):!this.isBefore(h,i))&&(f[1]===")"?this.isBefore(s,i):!this.isAfter(s,i))):!1}function Hm(t,n){var i=Ii(t)?t:Ur(t),f;return this.isValid()&&i.isValid()?(n=Ti(n)||"millisecond",n==="millisecond"?this.valueOf()===i.valueOf():(f=i.valueOf(),this.clone().startOf(n).valueOf()<=f&&f<=this.clone().endOf(n).valueOf())):!1}function zm(t,n){return this.isSame(t,n)||this.isAfter(t,n)}function Wm(t,n){return this.isSame(t,n)||this.isBefore(t,n)}function Vm(t,n,i){var f,h,s;if(!this.isValid())return NaN;if(f=sh(t,this),!f.isValid())return NaN;switch(h=(f.utcOffset()-this.utcOffset())*6e4,n=Ti(n),n){case"year":s=_u(this,f)/12;break;case"month":s=_u(this,f);break;case"quarter":s=_u(this,f)/3;break;case"second":s=(this-f)/1e3;break;case"minute":s=(this-f)/6e4;break;case"hour":s=(this-f)/36e5;break;case"day":s=(this-f-h)/864e5;break;case"week":s=(this-f-h)/6048e5;break;default:s=this-f}return i?s:Ei(s)}function _u(t,n){if(t.date()<n.date())return-_u(n,t);var i=(n.year()-t.year())*12+(n.month()-t.month()),f=t.clone().add(i,"months"),h,s;return n-f<0?(h=t.clone().add(i-1,"months"),s=(n-f)/(f-h)):(h=t.clone().add(i+1,"months"),s=(n-f)/(h-f)),-(i+s)||0}_t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",_t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function $m(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Zm(t){if(!this.isValid())return null;var n=t!==!0,i=n?this.clone().utc():this;return i.year()<0||i.year()>9999?ru(i,n?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):ta(Date.prototype.toISOString)?n?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",ru(i,"Z")):ru(i,n?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Xm(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",n="",i,f,h,s;return this.isLocal()||(t=this.utcOffset()===0?"moment.utc":"moment.parseZone",n="Z"),i="["+t+'("]',f=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",h="-MM-DD[T]HH:mm:ss.SSS",s=n+'[")]',this.format(i+f+h+s)}function qm(t){t||(t=this.isUtc()?_t.defaultFormatUtc:_t.defaultFormat);var n=ru(this,t);return this.localeData().postformat(n)}function Km(t,n){return this.isValid()&&(Ii(t)&&t.isValid()||Ur(t).isValid())?Ni({to:this,from:t}).locale(this.locale()).humanize(!n):this.localeData().invalidDate()}function jm(t){return this.from(Ur(),t)}function Qm(t,n){return this.isValid()&&(Ii(t)&&t.isValid()||Ur(t).isValid())?Ni({from:this,to:t}).locale(this.locale()).humanize(!n):this.localeData().invalidDate()}function Jm(t){return this.to(Ur(),t)}function z0(t){var n;return t===void 0?this._locale._abbr:(n=Aa(t),n!=null&&(this._locale=n),this)}var W0=Si("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return t===void 0?this.localeData():this.locale(t)});function V0(){return this._locale}var pu=1e3,Ns=60*pu,mu=60*Ns,$0=(365*400+97)*24*mu;function Bs(t,n){return(t%n+n)%n}function Z0(t,n,i){return t<100&&t>=0?new Date(t+400,n,i)-$0:new Date(t,n,i).valueOf()}function X0(t,n,i){return t<100&&t>=0?Date.UTC(t+400,n,i)-$0:Date.UTC(t,n,i)}function e1(t){var n,i;if(t=Ti(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(i=this._isUTC?X0:Z0,t){case"year":n=i(this.year(),0,1);break;case"quarter":n=i(this.year(),this.month()-this.month()%3,1);break;case"month":n=i(this.year(),this.month(),1);break;case"week":n=i(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":n=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":n=i(this.year(),this.month(),this.date());break;case"hour":n=this._d.valueOf(),n-=Bs(n+(this._isUTC?0:this.utcOffset()*Ns),mu);break;case"minute":n=this._d.valueOf(),n-=Bs(n,Ns);break;case"second":n=this._d.valueOf(),n-=Bs(n,pu);break}return this._d.setTime(n),_t.updateOffset(this,!0),this}function t1(t){var n,i;if(t=Ti(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(i=this._isUTC?X0:Z0,t){case"year":n=i(this.year()+1,0,1)-1;break;case"quarter":n=i(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":n=i(this.year(),this.month()+1,1)-1;break;case"week":n=i(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":n=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":n=i(this.year(),this.month(),this.date()+1)-1;break;case"hour":n=this._d.valueOf(),n+=mu-Bs(n+(this._isUTC?0:this.utcOffset()*Ns),mu)-1;break;case"minute":n=this._d.valueOf(),n+=Ns-Bs(n,Ns)-1;break;case"second":n=this._d.valueOf(),n+=pu-Bs(n,pu)-1;break}return this._d.setTime(n),_t.updateOffset(this,!0),this}function r1(){return this._d.valueOf()-(this._offset||0)*6e4}function n1(){return Math.floor(this.valueOf()/1e3)}function i1(){return new Date(this.valueOf())}function a1(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function f1(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function s1(){return this.isValid()?this.toISOString():null}function o1(){return Bc(this)}function l1(){return hf({},tr(this))}function u1(){return tr(this).overflow}function c1(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}It("N",0,0,"eraAbbr"),It("NN",0,0,"eraAbbr"),It("NNN",0,0,"eraAbbr"),It("NNNN",0,0,"eraName"),It("NNNNN",0,0,"eraNarrow"),It("y",["y",1],"yo","eraYear"),It("y",["yy",2],0,"eraYear"),It("y",["yyy",3],0,"eraYear"),It("y",["yyyy",4],0,"eraYear"),xt("N",lh),xt("NN",lh),xt("NNN",lh),xt("NNNN",w1),xt("NNNNN",S1),kr(["N","NN","NNN","NNNN","NNNNN"],function(t,n,i,f){var h=i._locale.erasParse(t,f,i._strict);h?tr(i).era=h:tr(i).invalidEra=t}),xt("y",Ms),xt("yy",Ms),xt("yyy",Ms),xt("yyyy",Ms),xt("yo",T1),kr(["y","yy","yyy","yyyy"],Yn),kr(["yo"],function(t,n,i,f){var h;i._locale._eraYearOrdinalRegex&&(h=t.match(i._locale._eraYearOrdinalRegex)),i._locale.eraYearOrdinalParse?n[Yn]=i._locale.eraYearOrdinalParse(t,h):n[Yn]=parseInt(t,10)});function h1(t,n){var i,f,h,s=this._eras||Aa("en")._eras;for(i=0,f=s.length;i<f;++i){switch(typeof s[i].since){case"string":h=_t(s[i].since).startOf("day"),s[i].since=h.valueOf();break}switch(typeof s[i].until){case"undefined":s[i].until=1/0;break;case"string":h=_t(s[i].until).startOf("day").valueOf(),s[i].until=h.valueOf();break}}return s}function d1(t,n,i){var f,h,s=this.eras(),u,d,v;for(t=t.toUpperCase(),f=0,h=s.length;f<h;++f)if(u=s[f].name.toUpperCase(),d=s[f].abbr.toUpperCase(),v=s[f].narrow.toUpperCase(),i)switch(n){case"N":case"NN":case"NNN":if(d===t)return s[f];break;case"NNNN":if(u===t)return s[f];break;case"NNNNN":if(v===t)return s[f];break}else if([u,d,v].indexOf(t)>=0)return s[f]}function v1(t,n){var i=t.since<=t.until?1:-1;return n===void 0?_t(t.since).year():_t(t.since).year()+(n-t.offset)*i}function _1(){var t,n,i,f=this.localeData().eras();for(t=0,n=f.length;t<n;++t)if(i=this.clone().startOf("day").valueOf(),f[t].since<=i&&i<=f[t].until||f[t].until<=i&&i<=f[t].since)return f[t].name;return""}function p1(){var t,n,i,f=this.localeData().eras();for(t=0,n=f.length;t<n;++t)if(i=this.clone().startOf("day").valueOf(),f[t].since<=i&&i<=f[t].until||f[t].until<=i&&i<=f[t].since)return f[t].narrow;return""}function m1(){var t,n,i,f=this.localeData().eras();for(t=0,n=f.length;t<n;++t)if(i=this.clone().startOf("day").valueOf(),f[t].since<=i&&i<=f[t].until||f[t].until<=i&&i<=f[t].since)return f[t].abbr;return""}function g1(){var t,n,i,f,h=this.localeData().eras();for(t=0,n=h.length;t<n;++t)if(i=h[t].since<=h[t].until?1:-1,f=this.clone().startOf("day").valueOf(),h[t].since<=f&&f<=h[t].until||h[t].until<=f&&f<=h[t].since)return(this.year()-_t(h[t].since).year())*i+h[t].offset;return this.year()}function y1(t){return Sr(this,"_erasNameRegex")||uh.call(this),t?this._erasNameRegex:this._erasRegex}function b1(t){return Sr(this,"_erasAbbrRegex")||uh.call(this),t?this._erasAbbrRegex:this._erasRegex}function x1(t){return Sr(this,"_erasNarrowRegex")||uh.call(this),t?this._erasNarrowRegex:this._erasRegex}function lh(t,n){return n.erasAbbrRegex(t)}function w1(t,n){return n.erasNameRegex(t)}function S1(t,n){return n.erasNarrowRegex(t)}function T1(t,n){return n._eraYearOrdinalRegex||Ms}function uh(){var t=[],n=[],i=[],f=[],h,s,u,d,v,M=this.eras();for(h=0,s=M.length;h<s;++h)u=wa(M[h].name),d=wa(M[h].abbr),v=wa(M[h].narrow),n.push(u),t.push(d),i.push(v),f.push(u),f.push(d),f.push(v);this._erasRegex=new RegExp("^("+f.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+n.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+t.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+i.join("|")+")","i")}It(0,["gg",2],0,function(){return this.weekYear()%100}),It(0,["GG",2],0,function(){return this.isoWeekYear()%100});function gu(t,n){It(0,[t,t.length],0,n)}gu("gggg","weekYear"),gu("ggggg","weekYear"),gu("GGGG","isoWeekYear"),gu("GGGGG","isoWeekYear"),xt("G",fu),xt("g",fu),xt("GG",Gr,oi),xt("gg",Gr,oi),xt("GGGG",Zc,$c),xt("gggg",Zc,$c),xt("GGGGG",au,nu),xt("ggggg",au,nu),Go(["gggg","ggggg","GGGG","GGGGG"],function(t,n,i,f){n[f.substr(0,2)]=_r(t)}),Go(["gg","GG"],function(t,n,i,f){n[f]=_t.parseTwoDigitYear(t)});function E1(t){return q0.call(this,t,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function A1(t){return q0.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function D1(){return Ea(this.year(),1,4)}function L1(){return Ea(this.isoWeekYear(),1,4)}function O1(){var t=this.localeData()._week;return Ea(this.year(),t.dow,t.doy)}function R1(){var t=this.localeData()._week;return Ea(this.weekYear(),t.dow,t.doy)}function q0(t,n,i,f,h){var s;return t==null?zo(this,f,h).year:(s=Ea(t,f,h),n>s&&(n=s),C1.call(this,t,n,i,f,h))}function C1(t,n,i,f,h){var s=A0(t,n,i,f,h),u=Ho(s.year,0,s.dayOfYear);return this.year(u.getUTCFullYear()),this.month(u.getUTCMonth()),this.date(u.getUTCDate()),this}It("Q",0,"Qo","quarter"),xt("Q",_0),kr("Q",function(t,n){n[Sa]=(_r(t)-1)*3});function M1(t){return t==null?Math.ceil((this.month()+1)/3):this.month((t-1)*3+this.month()%3)}It("D",["DD",2],"Do","date"),xt("D",Gr,ks),xt("DD",Gr,oi),xt("Do",function(t,n){return t?n._dayOfMonthOrdinalParse||n._ordinalParse:n._dayOfMonthOrdinalParseLenient}),kr(["D","DD"],na),kr("Do",function(t,n){n[na]=_r(t.match(Gr)[0])});var K0=Is("Date",!0);It("DDD",["DDDD",3],"DDDo","dayOfYear"),xt("DDD",iu),xt("DDDD",p0),kr(["DDD","DDDD"],function(t,n,i){i._dayOfYear=_r(t)});function k1(t){var n=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return t==null?n:this.add(t-n,"d")}It("m",["mm",2],0,"minute"),xt("m",Gr,Xc),xt("mm",Gr,oi),kr(["m","mm"],Fi);var I1=Is("Minutes",!1);It("s",["ss",2],0,"second"),xt("s",Gr,Xc),xt("ss",Gr,oi),kr(["s","ss"],Ta);var F1=Is("Seconds",!1);It("S",0,0,function(){return~~(this.millisecond()/100)}),It(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),It(0,["SSS",3],0,"millisecond"),It(0,["SSSS",4],0,function(){return this.millisecond()*10}),It(0,["SSSSS",5],0,function(){return this.millisecond()*100}),It(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),It(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),It(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),It(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),xt("S",iu,_0),xt("SS",iu,oi),xt("SSS",iu,p0);var vf,j0;for(vf="SSSS";vf.length<=9;vf+="S")xt(vf,Ms);function N1(t,n){n[$f]=_r(("0."+t)*1e3)}for(vf="S";vf.length<=9;vf+="S")kr(vf,N1);j0=Is("Milliseconds",!1),It("z",0,0,"zoneAbbr"),It("zz",0,0,"zoneName");function B1(){return this._isUTC?"UTC":""}function P1(){return this._isUTC?"Coordinated Universal Time":""}var et=Bo.prototype;et.add=Rm,et.calendar=Bm,et.clone=Pm,et.diff=Vm,et.endOf=t1,et.format=qm,et.from=Km,et.fromNow=jm,et.to=Qm,et.toNow=Jm,et.get=X_,et.invalidAt=u1,et.isAfter=Gm,et.isBefore=Um,et.isBetween=Ym,et.isSame=Hm,et.isSameOrAfter=zm,et.isSameOrBefore=Wm,et.isValid=o1,et.lang=W0,et.locale=z0,et.localeData=V0,et.max=om,et.min=sm,et.parsingFlags=l1,et.set=q_,et.startOf=e1,et.subtract=Cm,et.toArray=a1,et.toObject=f1,et.toDate=i1,et.toISOString=Zm,et.inspect=Xm,typeof Symbol<"u"&&Symbol.for!=null&&(et[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),et.toJSON=s1,et.toString=$m,et.unix=n1,et.valueOf=r1,et.creationData=c1,et.eraName=_1,et.eraNarrow=p1,et.eraAbbr=m1,et.eraYear=g1,et.year=y0,et.isLeapYear=Z_,et.weekYear=E1,et.isoWeekYear=A1,et.quarter=et.quarters=M1,et.month=T0,et.daysInMonth=ip,et.week=et.weeks=hp,et.isoWeek=et.isoWeeks=dp,et.weeksInYear=O1,et.weeksInWeekYear=R1,et.isoWeeksInYear=D1,et.isoWeeksInISOWeekYear=L1,et.date=K0,et.day=et.days=Ap,et.weekday=Dp,et.isoWeekday=Lp,et.dayOfYear=k1,et.hour=et.hours=Fp,et.minute=et.minutes=I1,et.second=et.seconds=F1,et.millisecond=et.milliseconds=j0,et.utcOffset=mm,et.utc=ym,et.local=bm,et.parseZone=xm,et.hasAlignedHourOffset=wm,et.isDST=Sm,et.isLocal=Em,et.isUtcOffset=Am,et.isUtc=P0,et.isUTC=P0,et.zoneAbbr=B1,et.zoneName=P1,et.dates=Si("dates accessor is deprecated. Use date instead.",K0),et.months=Si("months accessor is deprecated. Use month instead",T0),et.years=Si("years accessor is deprecated. Use year instead",y0),et.zone=Si("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",gm),et.isDSTShifted=Si("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Tm);function G1(t){return Ur(t*1e3)}function U1(){return Ur.apply(null,arguments).parseZone()}function Q0(t){return t}var Tr=Yc.prototype;Tr.calendar=E_,Tr.longDateFormat=O_,Tr.invalidDate=C_,Tr.ordinal=I_,Tr.preparse=Q0,Tr.postformat=Q0,Tr.relativeTime=N_,Tr.pastFuture=B_,Tr.set=S_,Tr.eras=h1,Tr.erasParse=d1,Tr.erasConvertYear=v1,Tr.erasAbbrRegex=b1,Tr.erasNameRegex=y1,Tr.erasNarrowRegex=x1,Tr.months=ep,Tr.monthsShort=tp,Tr.monthsParse=np,Tr.monthsRegex=fp,Tr.monthsShortRegex=ap,Tr.week=op,Tr.firstDayOfYear=cp,Tr.firstDayOfWeek=up,Tr.weekdays=xp,Tr.weekdaysMin=Sp,Tr.weekdaysShort=wp,Tr.weekdaysParse=Ep,Tr.weekdaysRegex=Op,Tr.weekdaysShortRegex=Rp,Tr.weekdaysMinRegex=Cp,Tr.isPM=kp,Tr.meridiem=Np;function yu(t,n,i,f){var h=Aa(),s=ea().set(f,n);return h[i](s,t)}function J0(t,n,i){if(xa(t)&&(n=t,t=void 0),t=t||"",n!=null)return yu(t,n,i,"month");var f,h=[];for(f=0;f<12;f++)h[f]=yu(t,f,i,"month");return h}function ch(t,n,i,f){typeof t=="boolean"?(xa(n)&&(i=n,n=void 0),n=n||""):(n=t,i=n,t=!1,xa(n)&&(i=n,n=void 0),n=n||"");var h=Aa(),s=t?h._week.dow:0,u,d=[];if(i!=null)return yu(n,(i+s)%7,f,"day");for(u=0;u<7;u++)d[u]=yu(n,(u+s)%7,f,"day");return d}function Y1(t,n){return J0(t,n,"months")}function H1(t,n){return J0(t,n,"monthsShort")}function z1(t,n,i){return ch(t,n,i,"weekdays")}function W1(t,n,i){return ch(t,n,i,"weekdaysShort")}function V1(t,n,i){return ch(t,n,i,"weekdaysMin")}df("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var n=t%10,i=_r(t%100/10)===1?"th":n===1?"st":n===2?"nd":n===3?"rd":"th";return t+i}}),_t.lang=Si("moment.lang is deprecated. Use moment.locale instead.",df),_t.langData=Si("moment.langData is deprecated. Use moment.localeData instead.",Aa);var Da=Math.abs;function $1(){var t=this._data;return this._milliseconds=Da(this._milliseconds),this._days=Da(this._days),this._months=Da(this._months),t.milliseconds=Da(t.milliseconds),t.seconds=Da(t.seconds),t.minutes=Da(t.minutes),t.hours=Da(t.hours),t.months=Da(t.months),t.years=Da(t.years),this}function ev(t,n,i,f){var h=Ni(n,i);return t._milliseconds+=f*h._milliseconds,t._days+=f*h._days,t._months+=f*h._months,t._bubble()}function Z1(t,n){return ev(this,t,n,1)}function X1(t,n){return ev(this,t,n,-1)}function tv(t){return t<0?Math.floor(t):Math.ceil(t)}function q1(){var t=this._milliseconds,n=this._days,i=this._months,f=this._data,h,s,u,d,v;return t>=0&&n>=0&&i>=0||t<=0&&n<=0&&i<=0||(t+=tv(hh(i)+n)*864e5,n=0,i=0),f.milliseconds=t%1e3,h=Ei(t/1e3),f.seconds=h%60,s=Ei(h/60),f.minutes=s%60,u=Ei(s/60),f.hours=u%24,n+=Ei(u/24),v=Ei(rv(n)),i+=v,n-=tv(hh(v)),d=Ei(i/12),i%=12,f.days=n,f.months=i,f.years=d,this}function rv(t){return t*4800/146097}function hh(t){return t*146097/4800}function K1(t){if(!this.isValid())return NaN;var n,i,f=this._milliseconds;if(t=Ti(t),t==="month"||t==="quarter"||t==="year")switch(n=this._days+f/864e5,i=this._months+rv(n),t){case"month":return i;case"quarter":return i/3;case"year":return i/12}else switch(n=this._days+Math.round(hh(this._months)),t){case"week":return n/7+f/6048e5;case"day":return n+f/864e5;case"hour":return n*24+f/36e5;case"minute":return n*1440+f/6e4;case"second":return n*86400+f/1e3;case"millisecond":return Math.floor(n*864e5)+f;default:throw new Error("Unknown unit "+t)}}function La(t){return function(){return this.as(t)}}var nv=La("ms"),j1=La("s"),Q1=La("m"),J1=La("h"),eg=La("d"),tg=La("w"),rg=La("M"),ng=La("Q"),ig=La("y"),ag=nv;function fg(){return Ni(this)}function sg(t){return t=Ti(t),this.isValid()?this[t+"s"]():NaN}function Xf(t){return function(){return this.isValid()?this._data[t]:NaN}}var og=Xf("milliseconds"),lg=Xf("seconds"),ug=Xf("minutes"),cg=Xf("hours"),hg=Xf("days"),dg=Xf("months"),vg=Xf("years");function _g(){return Ei(this.days()/7)}var Oa=Math.round,Ps={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function pg(t,n,i,f,h){return h.relativeTime(n||1,!!i,t,f)}function mg(t,n,i,f){var h=Ni(t).abs(),s=Oa(h.as("s")),u=Oa(h.as("m")),d=Oa(h.as("h")),v=Oa(h.as("d")),M=Oa(h.as("M")),k=Oa(h.as("w")),g=Oa(h.as("y")),F=s<=i.ss&&["s",s]||s<i.s&&["ss",s]||u<=1&&["m"]||u<i.m&&["mm",u]||d<=1&&["h"]||d<i.h&&["hh",d]||v<=1&&["d"]||v<i.d&&["dd",v];return i.w!=null&&(F=F||k<=1&&["w"]||k<i.w&&["ww",k]),F=F||M<=1&&["M"]||M<i.M&&["MM",M]||g<=1&&["y"]||["yy",g],F[2]=n,F[3]=+t>0,F[4]=f,pg.apply(null,F)}function gg(t){return t===void 0?Oa:typeof t=="function"?(Oa=t,!0):!1}function yg(t,n){return Ps[t]===void 0?!1:n===void 0?Ps[t]:(Ps[t]=n,t==="s"&&(Ps.ss=n-1),!0)}function bg(t,n){if(!this.isValid())return this.localeData().invalidDate();var i=!1,f=Ps,h,s;return typeof t=="object"&&(n=t,t=!1),typeof t=="boolean"&&(i=t),typeof n=="object"&&(f=Object.assign({},Ps,n),n.s!=null&&n.ss==null&&(f.ss=n.s-1)),h=this.localeData(),s=mg(this,!i,f,h),i&&(s=h.pastFuture(+this,s)),h.postformat(s)}var dh=Math.abs;function Gs(t){return(t>0)-(t<0)||+t}function bu(){if(!this.isValid())return this.localeData().invalidDate();var t=dh(this._milliseconds)/1e3,n=dh(this._days),i=dh(this._months),f,h,s,u,d=this.asSeconds(),v,M,k,g;return d?(f=Ei(t/60),h=Ei(f/60),t%=60,f%=60,s=Ei(i/12),i%=12,u=t?t.toFixed(3).replace(/\.?0+$/,""):"",v=d<0?"-":"",M=Gs(this._months)!==Gs(d)?"-":"",k=Gs(this._days)!==Gs(d)?"-":"",g=Gs(this._milliseconds)!==Gs(d)?"-":"",v+"P"+(s?M+s+"Y":"")+(i?M+i+"M":"")+(n?k+n+"D":"")+(h||f||t?"T":"")+(h?g+h+"H":"")+(f?g+f+"M":"")+(t?g+u+"S":"")):"P0D"}var br=du.prototype;br.isValid=dm,br.abs=$1,br.add=Z1,br.subtract=X1,br.as=K1,br.asMilliseconds=nv,br.asSeconds=j1,br.asMinutes=Q1,br.asHours=J1,br.asDays=eg,br.asWeeks=tg,br.asMonths=rg,br.asQuarters=ng,br.asYears=ig,br.valueOf=ag,br._bubble=q1,br.clone=fg,br.get=sg,br.milliseconds=og,br.seconds=lg,br.minutes=ug,br.hours=cg,br.days=hg,br.weeks=_g,br.months=dg,br.years=vg,br.humanize=bg,br.toISOString=bu,br.toString=bu,br.toJSON=bu,br.locale=z0,br.localeData=V0,br.toIsoString=Si("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",bu),br.lang=W0,It("X",0,0,"unix"),It("x",0,0,"valueOf"),xt("x",fu),xt("X",Y_),kr("X",function(t,n,i){i._d=new Date(parseFloat(t)*1e3)}),kr("x",function(t,n,i){i._d=new Date(_r(t))});//! moment.js
|
|
10
|
+
_t.version="2.30.1",x_(Ur),_t.fn=et,_t.min=lm,_t.max=um,_t.now=cm,_t.utc=ea,_t.unix=G1,_t.months=Y1,_t.isDate=No,_t.locale=df,_t.invalid=eu,_t.duration=Ni,_t.isMoment=Ii,_t.weekdays=z1,_t.parseZone=U1,_t.localeData=Aa,_t.isDuration=vu,_t.monthsShort=H1,_t.weekdaysMin=V1,_t.defineLocale=eh,_t.updateLocale=Up,_t.locales=Yp,_t.weekdaysShort=W1,_t.normalizeUnits=Ti,_t.relativeTimeRounding=gg,_t.relativeTimeThreshold=yg,_t.calendarFormat=Nm,_t.prototype=et,_t.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};var Us=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ys={exports:{}};/**
|
|
13
11
|
* @license
|
|
14
12
|
* Lodash <https://lodash.com/>
|
|
15
13
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
16
14
|
* Released under MIT license <https://lodash.com/license>
|
|
17
15
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
18
16
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
19
|
-
*/(function(t,n){(function(){var i,a="4.17.21",f=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",d="Invalid `variable` option passed into `_.template`",v="__lodash_hash_undefined__",I=500,B="__lodash_placeholder__",p=1,U=2,q=4,D=1,pe=2,ue=1,x=2,A=4,g=8,b=16,P=32,F=64,J=128,Te=256,nt=512,ut=30,it="...",st=800,tt=16,Re=1,Ot=2,xt=3,Ie=1/0,Ze=9007199254740991,St=17976931348623157e292,$t=0/0,Wt=4294967295,Qt=Wt-1,sr=Wt>>>1,br=[["ary",J],["bind",ue],["bindKey",x],["curry",g],["curryRight",b],["flip",nt],["partial",P],["partialRight",F],["rearg",Te]],lr="[object Arguments]",Kt="[object Array]",wr="[object AsyncFunction]",Gt="[object Boolean]",Mt="[object Date]",dn="[object DOMException]",Qr="[object Error]",kt="[object Function]",Nr="[object GeneratorFunction]",Fr="[object Map]",Xr="[object Number]",Jr="[object Null]",ar="[object Object]",Pt="[object Promise]",Dn="[object Proxy]",Ln="[object RegExp]",en="[object Set]",on="[object String]",E="[object Symbol]",pi="[object Undefined]",vn="[object WeakMap]",Zi="[object WeakSet]",Gn="[object ArrayBuffer]",Tr="[object DataView]",Rn="[object Float32Array]",Un="[object Float64Array]",C="[object Int8Array]",Ue="[object Int16Array]",Xe="[object Int32Array]",dt="[object Uint8Array]",Z="[object Uint8ClampedArray]",we="[object Uint16Array]",m="[object Uint32Array]",He=/\b__p \+= '';/g,Nt=/\b(__p \+=) '' \+/g,u=/(__e\(.*?\)|\b__t\)) \+\n'';/g,de=/&(?:amp|lt|gt|quot|#39);/g,ye=/[&<>"']/g,w=RegExp(de.source),V=RegExp(ye.source),ce=/<%-([\s\S]+?)%>/g,Et=/<%([\s\S]+?)%>/g,at=/<%=([\s\S]+?)%>/g,mt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ur=/^\w*$/,mi=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,kr=/[\\^$.*+?()[\]{}|]/g,dr=RegExp(kr.source),Yr=/^\s+/,_n=/\s/,Cn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Na=/\{\n\/\* \[wrapped with (.+)\] \*/,Ba=/,? & /,jt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,$n=/[()=,{}\[\]\/\s]/,sn=/\\(\\)?/g,gi=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Kn=/\w*$/,js=/^[-+]0x[0-9a-f]+$/i,Xh=/^0b[01]+$/i,qh=/^\[object .+?Constructor\]$/,Kh=/^0o[0-7]+$/i,jh=/^(?:0|[1-9]\d*)$/,Qh=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Qs=/($^)/,Jh=/['\n\r\u2028\u2029\\]/g,Js="\\ud800-\\udfff",ed="\\u0300-\\u036f",td="\\ufe20-\\ufe2f",rd="\\u20d0-\\u20ff",Nu=ed+td+rd,Bu="\\u2700-\\u27bf",Gu="a-z\\xdf-\\xf6\\xf8-\\xff",nd="\\xac\\xb1\\xd7\\xf7",id="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ad="\\u2000-\\u206f",od=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Uu="A-Z\\xc0-\\xd6\\xd8-\\xde",Yu="\\ufe0e\\ufe0f",Hu=nd+id+ad+od,rl="['\u2019]",ef="["+Js+"]",nl="["+Hu+"]",tf="["+Nu+"]",zu="\\d+",as="["+Bu+"]",rf="["+Gu+"]",il="[^"+Js+Hu+zu+Bu+Gu+Uu+"]",os="\\ud83c[\\udffb-\\udfff]",sd="(?:"+tf+"|"+os+")",Wu="[^"+Js+"]",al="(?:\\ud83c[\\udde6-\\uddff]){2}",ol="[\\ud800-\\udbff][\\udc00-\\udfff]",On="["+Uu+"]",Zn="\\u200d",ss="(?:"+rf+"|"+il+")",fd="(?:"+On+"|"+il+")",Vu="(?:"+rl+"(?:d|ll|m|re|s|t|ve))?",sl="(?:"+rl+"(?:D|LL|M|RE|S|T|VE))?",fl=sd+"?",$u="["+Yu+"]?",ld="(?:"+Zn+"(?:"+[Wu,al,ol].join("|")+")"+$u+fl+")*",ll="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ud="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Zu=$u+fl+ld,cd="(?:"+[as,al,ol].join("|")+")"+Zu,hd="(?:"+[Wu+tf+"?",tf,al,ol,ef].join("|")+")",dd=RegExp(rl,"g"),vd=RegExp(tf,"g"),ul=RegExp(os+"(?="+os+")|"+hd+Zu,"g"),_d=RegExp([On+"?"+rf+"+"+Vu+"(?="+[nl,On,"$"].join("|")+")",fd+"+"+sl+"(?="+[nl,On+ss,"$"].join("|")+")",On+"?"+ss+"+"+Vu,On+"+"+sl,ud,ll,zu,cd].join("|"),"g"),Ga=RegExp("["+Zn+Js+Nu+Yu+"]"),pd=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,md=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],nf=-1,Cr={};Cr[Rn]=Cr[Un]=Cr[C]=Cr[Ue]=Cr[Xe]=Cr[dt]=Cr[Z]=Cr[we]=Cr[m]=!0,Cr[lr]=Cr[Kt]=Cr[Gn]=Cr[Gt]=Cr[Tr]=Cr[Mt]=Cr[Qr]=Cr[kt]=Cr[Fr]=Cr[Xr]=Cr[ar]=Cr[Ln]=Cr[en]=Cr[on]=Cr[vn]=!1;var Or={};Or[lr]=Or[Kt]=Or[Gn]=Or[Tr]=Or[Gt]=Or[Mt]=Or[Rn]=Or[Un]=Or[C]=Or[Ue]=Or[Xe]=Or[Fr]=Or[Xr]=Or[ar]=Or[Ln]=Or[en]=Or[on]=Or[E]=Or[dt]=Or[Z]=Or[we]=Or[m]=!0,Or[Qr]=Or[kt]=Or[vn]=!1;var Xu={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},gd={"&":"&","<":"<",">":">",'"':""","'":"'"},cl={"&":"&","<":"<",">":">",""":'"',"'":"'"},hl={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ha=parseFloat,af=parseInt,dl=typeof Zs=="object"&&Zs&&Zs.Object===Object&&Zs,qu=typeof self=="object"&&self&&self.Object===Object&&self,Sn=dl||qu||Function("return this")(),vl=n&&!n.nodeType&&n,Ua=vl&&!0&&t&&!t.nodeType&&t,Ku=Ua&&Ua.exports===vl,_l=Ku&&dl.process,ii=function(){try{var te=Ua&&Ua.require&&Ua.require("util").types;return te||_l&&_l.binding&&_l.binding("util")}catch{}}(),ju=ii&&ii.isArrayBuffer,Xi=ii&&ii.isDate,Qu=ii&&ii.isMap,Ju=ii&&ii.isRegExp,Ao=ii&&ii.isSet,ec=ii&&ii.isTypedArray;function pn(te,Ee,ve){switch(ve.length){case 0:return te.call(Ee);case 1:return te.call(Ee,ve[0]);case 2:return te.call(Ee,ve[0],ve[1]);case 3:return te.call(Ee,ve[0],ve[1],ve[2])}return te.apply(Ee,ve)}function tc(te,Ee,ve,gt){for(var Zt=-1,mr=te==null?0:te.length;++Zt<mr;){var fn=te[Zt];Ee(gt,fn,ve(fn),te)}return gt}function An(te,Ee){for(var ve=-1,gt=te==null?0:te.length;++ve<gt&&Ee(te[ve],ve,te)!==!1;);return te}function rc(te,Ee){for(var ve=te==null?0:te.length;ve--&&Ee(te[ve],ve,te)!==!1;);return te}function da(te,Ee){for(var ve=-1,gt=te==null?0:te.length;++ve<gt;)if(!Ee(te[ve],ve,te))return!1;return!0}function Fi(te,Ee){for(var ve=-1,gt=te==null?0:te.length,Zt=0,mr=[];++ve<gt;){var fn=te[ve];Ee(fn,ve,te)&&(mr[Zt++]=fn)}return mr}function of(te,Ee){var ve=te==null?0:te.length;return!!ve&&Ki(te,Ee,0)>-1}function pl(te,Ee,ve){for(var gt=-1,Zt=te==null?0:te.length;++gt<Zt;)if(ve(Ee,te[gt]))return!0;return!1}function Br(te,Ee){for(var ve=-1,gt=te==null?0:te.length,Zt=Array(gt);++ve<gt;)Zt[ve]=Ee(te[ve],ve,te);return Zt}function qi(te,Ee){for(var ve=-1,gt=Ee.length,Zt=te.length;++ve<gt;)te[Zt+ve]=Ee[ve];return te}function ml(te,Ee,ve,gt){var Zt=-1,mr=te==null?0:te.length;for(gt&&mr&&(ve=te[++Zt]);++Zt<mr;)ve=Ee(ve,te[Zt],Zt,te);return ve}function yd(te,Ee,ve,gt){var Zt=te==null?0:te.length;for(gt&&Zt&&(ve=te[--Zt]);Zt--;)ve=Ee(ve,te[Zt],Zt,te);return ve}function sf(te,Ee){for(var ve=-1,gt=te==null?0:te.length;++ve<gt;)if(Ee(te[ve],ve,te))return!0;return!1}var Pr=Ha("length");function nc(te){return te.split("")}function xd(te){return te.match(jt)||[]}function yi(te,Ee,ve){var gt;return ve(te,function(Zt,mr,fn){if(Ee(Zt,mr,fn))return gt=mr,!1}),gt}function To(te,Ee,ve,gt){for(var Zt=te.length,mr=ve+(gt?1:-1);gt?mr--:++mr<Zt;)if(Ee(te[mr],mr,te))return mr;return-1}function Ki(te,Ee,ve){return Ee===Ee?Lo(te,Ee,ve):To(te,ff,ve)}function Ya(te,Ee,ve,gt){for(var Zt=ve-1,mr=te.length;++Zt<mr;)if(gt(te[Zt],Ee))return Zt;return-1}function ff(te){return te!==te}function fs(te,Ee){var ve=te==null?0:te.length;return ve?lf(te,Ee)/ve:$t}function Ha(te){return function(Ee){return Ee==null?i:Ee[te]}}function Eo(te){return function(Ee){return te==null?i:te[Ee]}}function gl(te,Ee,ve,gt,Zt){return Zt(te,function(mr,fn,Er){ve=gt?(gt=!1,mr):Ee(ve,mr,fn,Er)}),ve}function yl(te,Ee){var ve=te.length;for(te.sort(Ee);ve--;)te[ve]=te[ve].value;return te}function lf(te,Ee){for(var ve,gt=-1,Zt=te.length;++gt<Zt;){var mr=Ee(te[gt]);mr!==i&&(ve=ve===i?mr:ve+mr)}return ve}function xl(te,Ee){for(var ve=-1,gt=Array(te);++ve<te;)gt[ve]=Ee(ve);return gt}function bd(te,Ee){return Br(Ee,function(ve){return[ve,te[ve]]})}function ic(te){return te&&te.slice(0,fc(te)+1).replace(Yr,"")}function jn(te){return function(Ee){return te(Ee)}}function ls(te,Ee){return Br(Ee,function(ve){return te[ve]})}function va(te,Ee){return te.has(Ee)}function uf(te,Ee){for(var ve=-1,gt=te.length;++ve<gt&&Ki(Ee,te[ve],0)>-1;);return ve}function cf(te,Ee){for(var ve=te.length;ve--&&Ki(Ee,te[ve],0)>-1;);return ve}function Do(te,Ee){for(var ve=te.length,gt=0;ve--;)te[ve]===Ee&&++gt;return gt}var bl=Eo(Xu),wl=Eo(gd);function Sl(te){return"\\"+hl[te]}function Al(te,Ee){return te==null?i:te[Ee]}function za(te){return Ga.test(te)}function ac(te){return pd.test(te)}function oc(te){for(var Ee,ve=[];!(Ee=te.next()).done;)ve.push(Ee.value);return ve}function hf(te){var Ee=-1,ve=Array(te.size);return te.forEach(function(gt,Zt){ve[++Ee]=[Zt,gt]}),ve}function Tl(te,Ee){return function(ve){return te(Ee(ve))}}function ji(te,Ee){for(var ve=-1,gt=te.length,Zt=0,mr=[];++ve<gt;){var fn=te[ve];(fn===Ee||fn===B)&&(te[ve]=B,mr[Zt++]=ve)}return mr}function us(te){var Ee=-1,ve=Array(te.size);return te.forEach(function(gt){ve[++Ee]=gt}),ve}function sc(te){var Ee=-1,ve=Array(te.size);return te.forEach(function(gt){ve[++Ee]=[gt,gt]}),ve}function Lo(te,Ee,ve){for(var gt=ve-1,Zt=te.length;++gt<Zt;)if(te[gt]===Ee)return gt;return-1}function El(te,Ee,ve){for(var gt=ve+1;gt--;)if(te[gt]===Ee)return gt;return gt}function _a(te){return za(te)?Sd(te):Pr(te)}function Yn(te){return za(te)?Dl(te):nc(te)}function fc(te){for(var Ee=te.length;Ee--&&_n.test(te.charAt(Ee)););return Ee}var wd=Eo(cl);function Sd(te){for(var Ee=ul.lastIndex=0;ul.test(te);)++Ee;return Ee}function Dl(te){return te.match(ul)||[]}function Ad(te){return te.match(_d)||[]}var Td=function te(Ee){Ee=Ee==null?Sn:Ro.defaults(Sn.Object(),Ee,Ro.pick(Sn,md));var ve=Ee.Array,gt=Ee.Date,Zt=Ee.Error,mr=Ee.Function,fn=Ee.Math,Er=Ee.Object,Ll=Ee.RegExp,Ed=Ee.String,ai=Ee.TypeError,df=ve.prototype,Dd=mr.prototype,Co=Er.prototype,vf=Ee["__core-js_shared__"],cs=Dd.toString,gr=Co.hasOwnProperty,Ld=0,hs=function(){var e=/[^.]+$/.exec(vf&&vf.keys&&vf.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Hn=Co.toString,Oo=cs.call(Er),lc=Sn._,uc=Ll("^"+cs.call(gr).replace(kr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ds=Ku?Ee.Buffer:i,Qi=Ee.Symbol,vs=Ee.Uint8Array,Rl=ds?ds.allocUnsafe:i,_f=Tl(Er.getPrototypeOf,Er),Wa=Er.create,ln=Co.propertyIsEnumerable,_s=df.splice,Cl=Qi?Qi.isConcatSpreadable:i,xi=Qi?Qi.iterator:i,pa=Qi?Qi.toStringTag:i,ps=function(){try{var e=G(Er,"defineProperty");return e({},"",{}),e}catch{}}(),Rd=Ee.clearTimeout!==Sn.clearTimeout&&Ee.clearTimeout,Cd=gt&>.now!==Sn.Date.now&>.now,Od=Ee.setTimeout!==Sn.setTimeout&&Ee.setTimeout,pf=fn.ceil,Io=fn.floor,mf=Er.getOwnPropertySymbols,Id=ds?ds.isBuffer:i,Ol=Ee.isFinite,cc=df.join,Md=Tl(Er.keys,Er),qr=fn.max,In=fn.min,ma=gt.now,gf=Ee.parseInt,Il=fn.random,hc=df.reverse,yf=G(Ee,"DataView"),Mo=G(Ee,"Map"),xf=G(Ee,"Promise"),Va=G(Ee,"Set"),Fo=G(Ee,"WeakMap"),ko=G(Er,"create"),ms=Fo&&new Fo,Mn={},dc=pr(yf),Fd=pr(Mo),Ji=pr(xf),Ml=pr(Va),$a=pr(Fo),Za=Qi?Qi.prototype:i,Po=Za?Za.valueOf:i,Fl=Za?Za.toString:i;function S(e){if(nn(e)&&!Jt(e)&&!(e instanceof cr)){if(e instanceof oi)return e;if(gr.call(e,"__wrapped__"))return jr(e)}return new oi(e)}var Xa=function(){function e(){}return function(r){if(!rn(r))return{};if(Wa)return Wa(r);e.prototype=r;var o=new e;return e.prototype=i,o}}();function gs(){}function oi(e,r){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!r,this.__index__=0,this.__values__=i}S.templateSettings={escape:ce,evaluate:Et,interpolate:at,variable:"",imports:{_:S}},S.prototype=gs.prototype,S.prototype.constructor=S,oi.prototype=Xa(gs.prototype),oi.prototype.constructor=oi;function cr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Wt,this.__views__=[]}function kd(){var e=new cr(this.__wrapped__);return e.__actions__=kn(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=kn(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=kn(this.__views__),e}function Pd(){if(this.__filtered__){var e=new cr(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function Nd(){var e=this.__wrapped__.value(),r=this.__dir__,o=Jt(e),c=r<0,_=o?e.length:0,L=Le(0,_,this.__views__),z=L.start,$=L.end,ie=$-z,Fe=c?$:z-1,Pe=this.__iteratees__,ze=Pe.length,vt=0,Rt=In(ie,this.__takeCount__);if(!o||!c&&_==ie&&Rt==ie)return Ls(e,this.__actions__);var Yt=[];e:for(;ie--&&vt<Rt;){Fe+=r;for(var or=-1,Ht=e[Fe];++or<ze;){var _r=Pe[or],yr=_r.iteratee,Li=_r.type,ei=yr(Ht);if(Li==Ot)Ht=ei;else if(!ei){if(Li==Re)continue e;break e}}Yt[vt++]=Ht}return Yt}cr.prototype=Xa(gs.prototype),cr.prototype.constructor=cr;function qa(e){var r=-1,o=e==null?0:e.length;for(this.clear();++r<o;){var c=e[r];this.set(c[0],c[1])}}function Bd(){this.__data__=ko?ko(null):{},this.size=0}function vc(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}function _c(e){var r=this.__data__;if(ko){var o=r[e];return o===v?i:o}return gr.call(r,e)?r[e]:i}function Gd(e){var r=this.__data__;return ko?r[e]!==i:gr.call(r,e)}function Ud(e,r){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=ko&&r===i?v:r,this}qa.prototype.clear=Bd,qa.prototype.delete=vc,qa.prototype.get=_c,qa.prototype.has=Gd,qa.prototype.set=Ud;function bi(e){var r=-1,o=e==null?0:e.length;for(this.clear();++r<o;){var c=e[r];this.set(c[0],c[1])}}function bf(){this.__data__=[],this.size=0}function Yd(e){var r=this.__data__,o=ga(r,e);if(o<0)return!1;var c=r.length-1;return o==c?r.pop():_s.call(r,o,1),--this.size,!0}function Hd(e){var r=this.__data__,o=ga(r,e);return o<0?i:r[o][1]}function zd(e){return ga(this.__data__,e)>-1}function Wd(e,r){var o=this.__data__,c=ga(o,e);return c<0?(++this.size,o.push([e,r])):o[c][1]=r,this}bi.prototype.clear=bf,bi.prototype.delete=Yd,bi.prototype.get=Hd,bi.prototype.has=zd,bi.prototype.set=Wd;function ea(e){var r=-1,o=e==null?0:e.length;for(this.clear();++r<o;){var c=e[r];this.set(c[0],c[1])}}function pc(){this.size=0,this.__data__={hash:new qa,map:new(Mo||bi),string:new qa}}function Vd(e){var r=h(this,e).delete(e);return this.size-=r?1:0,r}function $d(e){return h(this,e).get(e)}function Zd(e){return h(this,e).has(e)}function Xd(e,r){var o=h(this,e),c=o.size;return o.set(e,r),this.size+=o.size==c?0:1,this}ea.prototype.clear=pc,ea.prototype.delete=Vd,ea.prototype.get=$d,ea.prototype.has=Zd,ea.prototype.set=Xd;function Ka(e){var r=-1,o=e==null?0:e.length;for(this.__data__=new ea;++r<o;)this.add(e[r])}function No(e){return this.__data__.set(e,v),this}function qd(e){return this.__data__.has(e)}Ka.prototype.add=Ka.prototype.push=No,Ka.prototype.has=qd;function wi(e){var r=this.__data__=new bi(e);this.size=r.size}function mc(){this.__data__=new bi,this.size=0}function wf(e){var r=this.__data__,o=r.delete(e);return this.size=r.size,o}function gc(e){return this.__data__.get(e)}function kl(e){return this.__data__.has(e)}function Kd(e,r){var o=this.__data__;if(o instanceof bi){var c=o.__data__;if(!Mo||c.length<f-1)return c.push([e,r]),this.size=++o.size,this;o=this.__data__=new ea(c)}return o.set(e,r),this.size=o.size,this}wi.prototype.clear=mc,wi.prototype.delete=wf,wi.prototype.get=gc,wi.prototype.has=kl,wi.prototype.set=Kd;function Pl(e,r){var o=Jt(e),c=!o&&Ns(e),_=!o&&!c&&qo(e),L=!o&&!c&&!_&&Yf(e),z=o||c||_||L,$=z?xl(e.length,Ed):[],ie=$.length;for(var Fe in e)(r||gr.call(e,Fe))&&!(z&&(Fe=="length"||_&&(Fe=="offset"||Fe=="parent")||L&&(Fe=="buffer"||Fe=="byteLength"||Fe=="byteOffset")||K(Fe,ie)))&&$.push(Fe);return $}function yc(e){var r=e.length;return r?e[Rf(0,r-1)]:i}function jd(e,r){return Lr(kn(e),ja(r,0,e.length))}function Qd(e){return Lr(kn(e))}function Nl(e,r,o){(o!==i&&!oa(e[r],o)||o===i&&!(r in e))&&Xn(e,r,o)}function ys(e,r,o){var c=e[r];(!(gr.call(e,r)&&oa(c,o))||o===i&&!(r in e))&&Xn(e,r,o)}function ga(e,r){for(var o=e.length;o--;)if(oa(e[o][0],r))return o;return-1}function Jd(e,r,o,c){return ki(e,function(_,L,z){r(c,_,o(_),z)}),c}function xs(e,r){return e&&Pi(r,Nn(r),e)}function e0(e,r){return e&&Pi(r,ci(r),e)}function Xn(e,r,o){r=="__proto__"&&ps?ps(e,r,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[r]=o}function ya(e,r){for(var o=-1,c=r.length,_=ve(c),L=e==null;++o<c;)_[o]=L?i:v0(e,r[o]);return _}function ja(e,r,o){return e===e&&(o!==i&&(e=e<=o?e:o),r!==i&&(e=e>=r?e:r)),e}function Tn(e,r,o,c,_,L){var z,$=r&p,ie=r&U,Fe=r&q;if(o&&(z=_?o(e,c,_,L):o(e)),z!==i)return z;if(!rn(e))return e;var Pe=Jt(e);if(Pe){if(z=Ge(e),!$)return kn(e,z)}else{var ze=fe(e),vt=ze==kt||ze==Nr;if(qo(e))return Cs(e,$);if(ze==ar||ze==lr||vt&&!_){if(z=ie||vt?{}:Be(e),!$)return ie?i0(e,e0(z,e)):n0(e,xs(z,e))}else{if(!Or[ze])return _?e:{};z=We(e,ze,$)}}L||(L=new wi);var Rt=L.get(e);if(Rt)return Rt;L.set(e,z),M_(e)?e.forEach(function(Ht){z.add(Tn(Ht,r,o,Ht,e,L))}):O_(e)&&e.forEach(function(Ht,_r){z.set(_r,Tn(Ht,r,o,_r,e,L))});var Yt=Fe?ie?Bf:Nf:ie?ci:Nn,or=Pe?i:Yt(e);return An(or||e,function(Ht,_r){or&&(_r=Ht,Ht=e[_r]),ys(z,_r,Tn(Ht,r,o,_r,e,L))}),z}function xc(e){var r=Nn(e);return function(o){return Qa(o,e,r)}}function Qa(e,r,o){var c=o.length;if(e==null)return!c;for(e=Er(e);c--;){var _=o[c],L=r[_],z=e[_];if(z===i&&!(_ in e)||!L(z))return!1}return!0}function Sf(e,r,o){if(typeof e!="function")throw new ai(l);return wt(function(){e.apply(i,o)},r)}function Ja(e,r,o,c){var _=-1,L=of,z=!0,$=e.length,ie=[],Fe=r.length;if(!$)return ie;o&&(r=Br(r,jn(o))),c?(L=pl,z=!1):r.length>=f&&(L=va,z=!1,r=new Ka(r));e:for(;++_<$;){var Pe=e[_],ze=o==null?Pe:o(Pe);if(Pe=c||Pe!==0?Pe:0,z&&ze===ze){for(var vt=Fe;vt--;)if(r[vt]===ze)continue e;ie.push(Pe)}else L(r,ze,c)||ie.push(Pe)}return ie}var ki=Jl(si),Af=Jl(bs,!0);function Bl(e,r){var o=!0;return ki(e,function(c,_,L){return o=!!r(c,_,L),o}),o}function eo(e,r,o){for(var c=-1,_=e.length;++c<_;){var L=e[c],z=r(L);if(z!=null&&($===i?z===z&&!Di(z):o(z,$)))var $=z,ie=L}return ie}function bc(e,r,o,c){var _=e.length;for(o=nr(o),o<0&&(o=-o>_?0:_+o),c=c===i||c>_?_:nr(c),c<0&&(c+=_),c=o>c?0:k_(c);o<c;)e[o++]=r;return e}function Gl(e,r){var o=[];return ki(e,function(c,_,L){r(c,_,L)&&o.push(c)}),o}function mn(e,r,o,c,_){var L=-1,z=e.length;for(o||(o=ke),_||(_=[]);++L<z;){var $=e[L];r>0&&o($)?r>1?mn($,r-1,o,c,_):qi(_,$):c||(_[_.length]=$)}return _}var Tf=eu(),Ul=eu(!0);function si(e,r){return e&&Tf(e,r,Nn)}function bs(e,r){return e&&Ul(e,r,Nn)}function ws(e,r){return Fi(r,function(o){return _o(e[o])})}function xa(e,r){r=Si(r,e);for(var o=0,c=r.length;e!=null&&o<c;)e=e[Dr(r[o++])];return o&&o==c?e:i}function Yl(e,r,o){var c=r(e);return Jt(e)?c:qi(c,o(e))}function Fn(e){return e==null?e===i?pi:Jr:pa&&pa in Er(e)?se(e):$e(e)}function Ss(e,r){return e>r}function wc(e,r){return e!=null&&gr.call(e,r)}function Sc(e,r){return e!=null&&r in Er(e)}function Hl(e,r,o){return e>=In(r,o)&&e<qr(r,o)}function As(e,r,o){for(var c=o?pl:of,_=e[0].length,L=e.length,z=L,$=ve(L),ie=1/0,Fe=[];z--;){var Pe=e[z];z&&r&&(Pe=Br(Pe,jn(r))),ie=In(Pe.length,ie),$[z]=!o&&(r||_>=120&&Pe.length>=120)?new Ka(z&&Pe):i}Pe=e[0];var ze=-1,vt=$[0];e:for(;++ze<_&&Fe.length<ie;){var Rt=Pe[ze],Yt=r?r(Rt):Rt;if(Rt=o||Rt!==0?Rt:0,!(vt?va(vt,Yt):c(Fe,Yt,o))){for(z=L;--z;){var or=$[z];if(!(or?va(or,Yt):c(e[z],Yt,o)))continue e}vt&&vt.push(Yt),Fe.push(Rt)}}return Fe}function Ac(e,r,o,c){return si(e,function(_,L,z){r(c,o(_),L,z)}),c}function to(e,r,o){r=Si(r,e),e=It(e,r);var c=e==null?e:e[Dr(Y(r))];return c==null?i:pn(c,e,o)}function zl(e){return nn(e)&&Fn(e)==lr}function Tc(e){return nn(e)&&Fn(e)==Gn}function Wl(e){return nn(e)&&Fn(e)==Mt}function Bo(e,r,o,c,_){return e===r?!0:e==null||r==null||!nn(e)&&!nn(r)?e!==e&&r!==r:Ec(e,r,o,c,Bo,_)}function Ec(e,r,o,c,_,L){var z=Jt(e),$=Jt(r),ie=z?Kt:fe(e),Fe=$?Kt:fe(r);ie=ie==lr?ar:ie,Fe=Fe==lr?ar:Fe;var Pe=ie==ar,ze=Fe==ar,vt=ie==Fe;if(vt&&qo(e)){if(!qo(r))return!1;z=!0,Pe=!1}if(vt&&!Pe)return L||(L=new wi),z||Yf(e)?Nc(e,r,o,c,_,L):f0(e,r,ie,o,c,_,L);if(!(o&D)){var Rt=Pe&&gr.call(e,"__wrapped__"),Yt=ze&&gr.call(r,"__wrapped__");if(Rt||Yt){var or=Rt?e.value():e,Ht=Yt?r.value():r;return L||(L=new wi),_(or,Ht,o,c,L)}}return vt?(L||(L=new wi),l0(e,r,o,c,_,L)):!1}function Vl(e){return nn(e)&&fe(e)==Fr}function Ts(e,r,o,c){var _=o.length,L=_,z=!c;if(e==null)return!L;for(e=Er(e);_--;){var $=o[_];if(z&&$[2]?$[1]!==e[$[0]]:!($[0]in e))return!1}for(;++_<L;){$=o[_];var ie=$[0],Fe=e[ie],Pe=$[1];if(z&&$[2]){if(Fe===i&&!(ie in e))return!1}else{var ze=new wi;if(c)var vt=c(Fe,Pe,ie,e,r,ze);if(!(vt===i?Bo(Pe,Fe,D|pe,c,ze):vt))return!1}}return!0}function Go(e){if(!rn(e)||Qe(e))return!1;var r=_o(e)?uc:qh;return r.test(pr(e))}function Dc(e){return nn(e)&&Fn(e)==Ln}function Ef(e){return nn(e)&&fe(e)==en}function ta(e){return nn(e)&&Vc(e.length)&&!!Cr[Fn(e)]}function Uo(e){return typeof e=="function"?e:e==null?hi:typeof e=="object"?Jt(e)?Sa(e[0],e[1]):wa(e):$_(e)}function ra(e){if(!pt(e))return Md(e);var r=[];for(var o in Er(e))gr.call(e,o)&&o!="constructor"&&r.push(o);return r}function Es(e){if(!rn(e))return Me(e);var r=pt(e),o=[];for(var c in e)c=="constructor"&&(r||!gr.call(e,c))||o.push(c);return o}function ro(e,r){return e<r}function ba(e,r){var o=-1,c=ui(e)?ve(e.length):[];return ki(e,function(_,L,z){c[++o]=r(_,L,z)}),c}function wa(e){var r=T(e);return r.length==1&&r[0][2]?ge(r[0][0],r[0][1]):function(o){return o===e||Ts(o,e,r)}}function Sa(e,r){return Oe(e)&&xe(r)?ge(Dr(e),r):function(o){var c=v0(o,e);return c===i&&c===r?_0(o,e):Bo(r,c,D|pe)}}function no(e,r,o,c,_){e!==r&&Tf(r,function(L,z){if(_||(_=new wi),rn(L))Df(e,r,z,o,no,c,_);else{var $=c?c(Ke(e,z),L,z+"",e,r,_):i;$===i&&($=L),Nl(e,z,$)}},ci)}function Df(e,r,o,c,_,L,z){var $=Ke(e,o),ie=Ke(r,o),Fe=z.get(ie);if(Fe){Nl(e,o,Fe);return}var Pe=L?L($,ie,o+"",e,r,z):i,ze=Pe===i;if(ze){var vt=Jt(ie),Rt=!vt&&qo(ie),Yt=!vt&&!Rt&&Yf(ie);Pe=ie,vt||Rt||Yt?Jt($)?Pe=$:cn($)?Pe=kn($):Rt?(ze=!1,Pe=Cs(ie,!0)):Yt?(ze=!1,Pe=Zo(ie,!0)):Pe=[]:ou(ie)||Ns(ie)?(Pe=$,Ns($)?Pe=P_($):(!rn($)||_o($))&&(Pe=Be(ie))):ze=!1}ze&&(z.set(ie,Pe),_(Pe,ie,c,L,z),z.delete(ie)),Nl(e,o,Pe)}function Yo(e,r){var o=e.length;if(!!o)return r+=r<0?o:0,K(r,o)?e[r]:i}function Lf(e,r,o){r.length?r=Br(r,function(L){return Jt(L)?function(z){return xa(z,L.length===1?L[0]:L)}:L}):r=[hi];var c=-1;r=Br(r,jn(Bt()));var _=ba(e,function(L,z,$){var ie=Br(r,function(Fe){return Fe(L)});return{criteria:ie,index:++c,value:L}});return yl(_,function(L,z){return Fs(L,z,o)})}function $l(e,r){return io(e,r,function(o,c){return _0(e,c)})}function io(e,r,o){for(var c=-1,_=r.length,L={};++c<_;){var z=r[c],$=xa(e,z);o($,z)&&Ds(L,Si(z,e),$)}return L}function Ho(e){return function(r){return xa(r,e)}}function Zl(e,r,o,c){var _=c?Ya:Ki,L=-1,z=r.length,$=e;for(e===r&&(r=kn(r)),o&&($=Br(e,jn(o)));++L<z;)for(var ie=0,Fe=r[L],Pe=o?o(Fe):Fe;(ie=_($,Pe,ie,c))>-1;)$!==e&&_s.call($,ie,1),_s.call(e,ie,1);return e}function Lc(e,r){for(var o=e?r.length:0,c=o-1;o--;){var _=r[o];if(o==c||_!==L){var L=_;K(_)?_s.call(e,_,1):Kl(e,_)}}return e}function Rf(e,r){return e+Io(Il()*(r-e+1))}function Rc(e,r,o,c){for(var _=-1,L=qr(pf((r-e)/(o||1)),0),z=ve(L);L--;)z[c?L:++_]=e,e+=o;return z}function Cf(e,r){var o="";if(!e||r<1||r>Ze)return o;do r%2&&(o+=e),r=Io(r/2),r&&(e+=e);while(r);return o}function rr(e,r){return Ct(qe(e,r,hi),e+"")}function zo(e){return yc(Hf(e))}function Xl(e,r){var o=Hf(e);return Lr(o,ja(r,0,o.length))}function Ds(e,r,o,c){if(!rn(e))return e;r=Si(r,e);for(var _=-1,L=r.length,z=L-1,$=e;$!=null&&++_<L;){var ie=Dr(r[_]),Fe=o;if(ie==="__proto__"||ie==="constructor"||ie==="prototype")return e;if(_!=z){var Pe=$[ie];Fe=c?c(Pe,ie,$):i,Fe===i&&(Fe=rn(Pe)?Pe:K(r[_+1])?[]:{})}ys($,ie,Fe),$=$[ie]}return e}var Cc=ms?function(e,r){return ms.set(e,r),e}:hi,Oc=ps?function(e,r){return ps(e,"toString",{configurable:!0,enumerable:!1,value:m0(r),writable:!0})}:hi;function t0(e){return Lr(Hf(e))}function fi(e,r,o){var c=-1,_=e.length;r<0&&(r=-r>_?0:_+r),o=o>_?_:o,o<0&&(o+=_),_=r>o?0:o-r>>>0,r>>>=0;for(var L=ve(_);++c<_;)L[c]=e[c+r];return L}function r0(e,r){var o;return ki(e,function(c,_,L){return o=r(c,_,L),!o}),!!o}function Of(e,r,o){var c=0,_=e==null?c:e.length;if(typeof r=="number"&&r===r&&_<=sr){for(;c<_;){var L=c+_>>>1,z=e[L];z!==null&&!Di(z)&&(o?z<=r:z<r)?c=L+1:_=L}return _}return ql(e,r,hi,o)}function ql(e,r,o,c){var _=0,L=e==null?0:e.length;if(L===0)return 0;r=o(r);for(var z=r!==r,$=r===null,ie=Di(r),Fe=r===i;_<L;){var Pe=Io((_+L)/2),ze=o(e[Pe]),vt=ze!==i,Rt=ze===null,Yt=ze===ze,or=Di(ze);if(z)var Ht=c||Yt;else Fe?Ht=Yt&&(c||vt):$?Ht=Yt&&vt&&(c||!Rt):ie?Ht=Yt&&vt&&!Rt&&(c||!or):Rt||or?Ht=!1:Ht=c?ze<=r:ze<r;Ht?_=Pe+1:L=Pe}return In(L,Qt)}function Ic(e,r){for(var o=-1,c=e.length,_=0,L=[];++o<c;){var z=e[o],$=r?r(z):z;if(!o||!oa($,ie)){var ie=$;L[_++]=z===0?0:z}}return L}function Mc(e){return typeof e=="number"?e:Di(e)?$t:+e}function Qn(e){if(typeof e=="string")return e;if(Jt(e))return Br(e,Qn)+"";if(Di(e))return Fl?Fl.call(e):"";var r=e+"";return r=="0"&&1/e==-Ie?"-0":r}function Aa(e,r,o){var c=-1,_=of,L=e.length,z=!0,$=[],ie=$;if(o)z=!1,_=pl;else if(L>=f){var Fe=r?null:o0(e);if(Fe)return us(Fe);z=!1,_=va,ie=new Ka}else ie=r?[]:$;e:for(;++c<L;){var Pe=e[c],ze=r?r(Pe):Pe;if(Pe=o||Pe!==0?Pe:0,z&&ze===ze){for(var vt=ie.length;vt--;)if(ie[vt]===ze)continue e;r&&ie.push(ze),$.push(Pe)}else _(ie,ze,o)||(ie!==$&&ie.push(ze),$.push(Pe))}return $}function Kl(e,r){return r=Si(r,e),e=It(e,r),e==null||delete e[Dr(Y(r))]}function If(e,r,o,c){return Ds(e,r,o(xa(e,r)),c)}function ao(e,r,o,c){for(var _=e.length,L=c?_:-1;(c?L--:++L<_)&&r(e[L],L,e););return o?fi(e,c?0:L,c?L+1:_):fi(e,c?L+1:0,c?_:L)}function Ls(e,r){var o=e;return o instanceof cr&&(o=o.value()),ml(r,function(c,_){return _.func.apply(_.thisArg,qi([c],_.args))},o)}function Wo(e,r,o){var c=e.length;if(c<2)return c?Aa(e[0]):[];for(var _=-1,L=ve(c);++_<c;)for(var z=e[_],$=-1;++$<c;)$!=_&&(L[_]=Ja(L[_]||z,e[$],r,o));return Aa(mn(L,1),r,o)}function Mf(e,r,o){for(var c=-1,_=e.length,L=r.length,z={};++c<_;){var $=c<L?r[c]:i;o(z,e[c],$)}return z}function Vo(e){return cn(e)?e:[]}function $o(e){return typeof e=="function"?e:hi}function Si(e,r){return Jt(e)?e:Oe(e,r)?[e]:Xt(Rr(e))}var jl=rr;function Ai(e,r,o){var c=e.length;return o=o===i?c:o,!r&&o>=c?e:fi(e,r,o)}var Rs=Rd||function(e){return Sn.clearTimeout(e)};function Cs(e,r){if(r)return e.slice();var o=e.length,c=Rl?Rl(o):new e.constructor(o);return e.copy(c),c}function oo(e){var r=new e.constructor(e.byteLength);return new vs(r).set(new vs(e)),r}function Os(e,r){var o=r?oo(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.byteLength)}function Is(e){var r=new e.constructor(e.source,Kn.exec(e));return r.lastIndex=e.lastIndex,r}function Ms(e){return Po?Er(Po.call(e)):{}}function Zo(e,r){var o=r?oo(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}function Ff(e,r){if(e!==r){var o=e!==i,c=e===null,_=e===e,L=Di(e),z=r!==i,$=r===null,ie=r===r,Fe=Di(r);if(!$&&!Fe&&!L&&e>r||L&&z&&ie&&!$&&!Fe||c&&z&&ie||!o&&ie||!_)return 1;if(!c&&!L&&!Fe&&e<r||Fe&&o&&_&&!c&&!L||$&&o&&_||!z&&_||!ie)return-1}return 0}function Fs(e,r,o){for(var c=-1,_=e.criteria,L=r.criteria,z=_.length,$=o.length;++c<z;){var ie=Ff(_[c],L[c]);if(ie){if(c>=$)return ie;var Fe=o[c];return ie*(Fe=="desc"?-1:1)}}return e.index-r.index}function Ta(e,r,o,c){for(var _=-1,L=e.length,z=o.length,$=-1,ie=r.length,Fe=qr(L-z,0),Pe=ve(ie+Fe),ze=!c;++$<ie;)Pe[$]=r[$];for(;++_<z;)(ze||_<L)&&(Pe[o[_]]=e[_]);for(;Fe--;)Pe[$++]=e[_++];return Pe}function Ql(e,r,o,c){for(var _=-1,L=e.length,z=-1,$=o.length,ie=-1,Fe=r.length,Pe=qr(L-$,0),ze=ve(Pe+Fe),vt=!c;++_<Pe;)ze[_]=e[_];for(var Rt=_;++ie<Fe;)ze[Rt+ie]=r[ie];for(;++z<$;)(vt||_<L)&&(ze[Rt+o[z]]=e[_++]);return ze}function kn(e,r){var o=-1,c=e.length;for(r||(r=ve(c));++o<c;)r[o]=e[o];return r}function Pi(e,r,o,c){var _=!o;o||(o={});for(var L=-1,z=r.length;++L<z;){var $=r[L],ie=c?c(o[$],e[$],$,o,e):i;ie===i&&(ie=e[$]),_?Xn(o,$,ie):ys(o,$,ie)}return o}function n0(e,r){return Pi(e,me(e),r)}function i0(e,r){return Pi(e,ae(e),r)}function Ti(e,r){return function(o,c){var _=Jt(o)?tc:Jd,L=r?r():{};return _(o,e,Bt(c,2),L)}}function so(e){return rr(function(r,o){var c=-1,_=o.length,L=_>1?o[_-1]:i,z=_>2?o[2]:i;for(L=e.length>3&&typeof L=="function"?(_--,L):i,z&&oe(o[0],o[1],z)&&(L=_<3?i:L,_=1),r=Er(r);++c<_;){var $=o[c];$&&e(r,$,c,L)}return r})}function Jl(e,r){return function(o,c){if(o==null)return o;if(!ui(o))return e(o,c);for(var _=o.length,L=r?_:-1,z=Er(o);(r?L--:++L<_)&&c(z[L],L,z)!==!1;);return o}}function eu(e){return function(r,o,c){for(var _=-1,L=Er(r),z=c(r),$=z.length;$--;){var ie=z[e?$:++_];if(o(L[ie],ie,L)===!1)break}return r}}function a0(e,r,o){var c=r&ue,_=qn(e);function L(){var z=this&&this!==Sn&&this instanceof L?_:e;return z.apply(c?o:this,arguments)}return L}function tu(e){return function(r){r=Rr(r);var o=za(r)?Yn(r):i,c=o?o[0]:r.charAt(0),_=o?Ai(o,1).join(""):r.slice(1);return c[e]()+_}}function Xo(e){return function(r){return ml(W_(z_(r).replace(dd,"")),e,"")}}function qn(e){return function(){var r=arguments;switch(r.length){case 0:return new e;case 1:return new e(r[0]);case 2:return new e(r[0],r[1]);case 3:return new e(r[0],r[1],r[2]);case 4:return new e(r[0],r[1],r[2],r[3]);case 5:return new e(r[0],r[1],r[2],r[3],r[4]);case 6:return new e(r[0],r[1],r[2],r[3],r[4],r[5]);case 7:return new e(r[0],r[1],r[2],r[3],r[4],r[5],r[6])}var o=Xa(e.prototype),c=e.apply(o,r);return rn(c)?c:o}}function Fc(e,r,o){var c=qn(e);function _(){for(var L=arguments.length,z=ve(L),$=L,ie=uo(_);$--;)z[$]=arguments[$];var Fe=L<3&&z[0]!==ie&&z[L-1]!==ie?[]:ji(z,ie);if(L-=Fe.length,L<o)return ru(e,r,ks,_.placeholder,i,z,Fe,i,i,o-L);var Pe=this&&this!==Sn&&this instanceof _?c:e;return pn(Pe,this,z)}return _}function fo(e){return function(r,o,c){var _=Er(r);if(!ui(r)){var L=Bt(o,3);r=Nn(r),o=function($){return L(_[$],$,_)}}var z=e(r,o,c);return z>-1?_[L?r[z]:z]:i}}function na(e){return Ni(function(r){var o=r.length,c=o,_=oi.prototype.thru;for(e&&r.reverse();c--;){var L=r[c];if(typeof L!="function")throw new ai(l);if(_&&!z&&Gf(L)=="wrapper")var z=new oi([],!0)}for(c=z?c:o;++c<o;){L=r[c];var $=Gf(L),ie=$=="wrapper"?au(L):i;ie&&Se(ie[0])&&ie[1]==(J|g|P|Te)&&!ie[4].length&&ie[9]==1?z=z[Gf(ie[0])].apply(z,ie[3]):z=L.length==1&&Se(L)?z[$]():z.thru(L)}return function(){var Fe=arguments,Pe=Fe[0];if(z&&Fe.length==1&&Jt(Pe))return z.plant(Pe).value();for(var ze=0,vt=o?r[ze].apply(this,Fe):Pe;++ze<o;)vt=r[ze].call(this,vt);return vt}})}function ks(e,r,o,c,_,L,z,$,ie,Fe){var Pe=r&J,ze=r&ue,vt=r&x,Rt=r&(g|b),Yt=r&nt,or=vt?i:qn(e);function Ht(){for(var _r=arguments.length,yr=ve(_r),Li=_r;Li--;)yr[Li]=arguments[Li];if(Rt)var ei=uo(Ht),Ri=Do(yr,ei);if(c&&(yr=Ta(yr,c,_,Rt)),L&&(yr=Ql(yr,L,z,Rt)),_r-=Ri,Rt&&_r<Fe){var hn=ji(yr,ei);return ru(e,r,ks,Ht.placeholder,o,yr,hn,$,ie,Fe-_r)}var sa=ze?o:this,mo=vt?sa[e]:e;return _r=yr.length,$?yr=Lt(yr,$):Yt&&_r>1&&yr.reverse(),Pe&&ie<_r&&(yr.length=ie),this&&this!==Sn&&this instanceof Ht&&(mo=or||qn(mo)),mo.apply(sa,yr)}return Ht}function kf(e,r){return function(o,c){return Ac(o,e,r(c),{})}}function lo(e,r){return function(o,c){var _;if(o===i&&c===i)return r;if(o!==i&&(_=o),c!==i){if(_===i)return c;typeof o=="string"||typeof c=="string"?(o=Qn(o),c=Qn(c)):(o=Mc(o),c=Mc(c)),_=e(o,c)}return _}}function Pf(e){return Ni(function(r){return r=Br(r,jn(Bt())),rr(function(o){var c=this;return e(r,function(_){return pn(_,c,o)})})})}function Hr(e,r){r=r===i?" ":Qn(r);var o=r.length;if(o<2)return o?Cf(r,e):r;var c=Cf(r,pf(e/_a(r)));return za(r)?Ai(Yn(c),0,e).join(""):c.slice(0,e)}function Ea(e,r,o,c){var _=r&ue,L=qn(e);function z(){for(var $=-1,ie=arguments.length,Fe=-1,Pe=c.length,ze=ve(Pe+ie),vt=this&&this!==Sn&&this instanceof z?L:e;++Fe<Pe;)ze[Fe]=c[Fe];for(;ie--;)ze[Fe++]=arguments[++$];return pn(vt,_?o:this,ze)}return z}function zr(e){return function(r,o,c){return c&&typeof c!="number"&&oe(r,o,c)&&(o=c=i),r=po(r),o===i?(o=r,r=0):o=po(o),c=c===i?r<o?1:-1:po(c),Rc(r,o,c,e)}}function En(e){return function(r,o){return typeof r=="string"&&typeof o=="string"||(r=Gi(r),o=Gi(o)),e(r,o)}}function ru(e,r,o,c,_,L,z,$,ie,Fe){var Pe=r&g,ze=Pe?z:i,vt=Pe?i:z,Rt=Pe?L:i,Yt=Pe?i:L;r|=Pe?P:F,r&=~(Pe?F:P),r&A||(r&=~(ue|x));var or=[e,r,_,Rt,ze,Yt,vt,$,ie,Fe],Ht=o.apply(i,or);return Se(e)&&Je(Ht,or),Ht.placeholder=c,Vt(Ht,e,r)}function nu(e){var r=fn[e];return function(o,c){if(o=Gi(o),c=c==null?0:In(nr(c),292),c&&Ol(o)){var _=(Rr(o)+"e").split("e"),L=r(_[0]+"e"+(+_[1]+c));return _=(Rr(L)+"e").split("e"),+(_[0]+"e"+(+_[1]-c))}return r(o)}}var o0=Va&&1/us(new Va([,-0]))[1]==Ie?function(e){return new Va(e)}:x0;function kc(e){return function(r){var o=fe(r);return o==Fr?hf(r):o==en?sc(r):bd(r,e(r))}}function ia(e,r,o,c,_,L,z,$){var ie=r&x;if(!ie&&typeof e!="function")throw new ai(l);var Fe=c?c.length:0;if(Fe||(r&=~(P|F),c=_=i),z=z===i?z:qr(nr(z),0),$=$===i?$:nr($),Fe-=_?_.length:0,r&F){var Pe=c,ze=_;c=_=i}var vt=ie?i:au(e),Rt=[e,r,o,c,_,Pe,ze,L,z,$];if(vt&&Ve(Rt,vt),e=Rt[0],r=Rt[1],o=Rt[2],c=Rt[3],_=Rt[4],$=Rt[9]=Rt[9]===i?ie?0:e.length:qr(Rt[9]-Fe,0),!$&&r&(g|b)&&(r&=~(g|b)),!r||r==ue)var Yt=a0(e,r,o);else r==g||r==b?Yt=Fc(e,r,$):(r==P||r==(ue|P))&&!_.length?Yt=Ea(e,r,o,c):Yt=ks.apply(i,Rt);var or=vt?Cc:Je;return Vt(or(Yt,Rt),e,r)}function iu(e,r,o,c){return e===i||oa(e,Co[o])&&!gr.call(c,o)?r:e}function Pc(e,r,o,c,_,L){return rn(e)&&rn(r)&&(L.set(r,e),no(e,r,i,Pc,L),L.delete(r)),e}function s0(e){return ou(e)?i:e}function Nc(e,r,o,c,_,L){var z=o&D,$=e.length,ie=r.length;if($!=ie&&!(z&&ie>$))return!1;var Fe=L.get(e),Pe=L.get(r);if(Fe&&Pe)return Fe==r&&Pe==e;var ze=-1,vt=!0,Rt=o&pe?new Ka:i;for(L.set(e,r),L.set(r,e);++ze<$;){var Yt=e[ze],or=r[ze];if(c)var Ht=z?c(or,Yt,ze,r,e,L):c(Yt,or,ze,e,r,L);if(Ht!==i){if(Ht)continue;vt=!1;break}if(Rt){if(!sf(r,function(_r,yr){if(!va(Rt,yr)&&(Yt===_r||_(Yt,_r,o,c,L)))return Rt.push(yr)})){vt=!1;break}}else if(!(Yt===or||_(Yt,or,o,c,L))){vt=!1;break}}return L.delete(e),L.delete(r),vt}function f0(e,r,o,c,_,L,z){switch(o){case Tr:if(e.byteLength!=r.byteLength||e.byteOffset!=r.byteOffset)return!1;e=e.buffer,r=r.buffer;case Gn:return!(e.byteLength!=r.byteLength||!L(new vs(e),new vs(r)));case Gt:case Mt:case Xr:return oa(+e,+r);case Qr:return e.name==r.name&&e.message==r.message;case Ln:case on:return e==r+"";case Fr:var $=hf;case en:var ie=c&D;if($||($=us),e.size!=r.size&&!ie)return!1;var Fe=z.get(e);if(Fe)return Fe==r;c|=pe,z.set(e,r);var Pe=Nc($(e),$(r),c,_,L,z);return z.delete(e),Pe;case E:if(Po)return Po.call(e)==Po.call(r)}return!1}function l0(e,r,o,c,_,L){var z=o&D,$=Nf(e),ie=$.length,Fe=Nf(r),Pe=Fe.length;if(ie!=Pe&&!z)return!1;for(var ze=ie;ze--;){var vt=$[ze];if(!(z?vt in r:gr.call(r,vt)))return!1}var Rt=L.get(e),Yt=L.get(r);if(Rt&&Yt)return Rt==r&&Yt==e;var or=!0;L.set(e,r),L.set(r,e);for(var Ht=z;++ze<ie;){vt=$[ze];var _r=e[vt],yr=r[vt];if(c)var Li=z?c(yr,_r,vt,r,e,L):c(_r,yr,vt,e,r,L);if(!(Li===i?_r===yr||_(_r,yr,o,c,L):Li)){or=!1;break}Ht||(Ht=vt=="constructor")}if(or&&!Ht){var ei=e.constructor,Ri=r.constructor;ei!=Ri&&"constructor"in e&&"constructor"in r&&!(typeof ei=="function"&&ei instanceof ei&&typeof Ri=="function"&&Ri instanceof Ri)&&(or=!1)}return L.delete(e),L.delete(r),or}function Ni(e){return Ct(qe(e,i,k),e+"")}function Nf(e){return Yl(e,Nn,me)}function Bf(e){return Yl(e,ci,ae)}var au=ms?function(e){return ms.get(e)}:x0;function Gf(e){for(var r=e.name+"",o=Mn[r],c=gr.call(Mn,r)?o.length:0;c--;){var _=o[c],L=_.func;if(L==null||L==e)return _.name}return r}function uo(e){var r=gr.call(S,"placeholder")?S:e;return r.placeholder}function Bt(){var e=S.iteratee||g0;return e=e===g0?Uo:e,arguments.length?e(arguments[0],arguments[1]):e}function h(e,r){var o=e.__data__;return rt(r)?o[typeof r=="string"?"string":"hash"]:o.map}function T(e){for(var r=Nn(e),o=r.length;o--;){var c=r[o],_=e[c];r[o]=[c,_,xe(_)]}return r}function G(e,r){var o=Al(e,r);return Go(o)?o:i}function se(e){var r=gr.call(e,pa),o=e[pa];try{e[pa]=i;var c=!0}catch{}var _=Hn.call(e);return c&&(r?e[pa]=o:delete e[pa]),_}var me=mf?function(e){return e==null?[]:(e=Er(e),Fi(mf(e),function(r){return ln.call(e,r)}))}:b0,ae=mf?function(e){for(var r=[];e;)qi(r,me(e)),e=_f(e);return r}:b0,fe=Fn;(yf&&fe(new yf(new ArrayBuffer(1)))!=Tr||Mo&&fe(new Mo)!=Fr||xf&&fe(xf.resolve())!=Pt||Va&&fe(new Va)!=en||Fo&&fe(new Fo)!=vn)&&(fe=function(e){var r=Fn(e),o=r==ar?e.constructor:i,c=o?pr(o):"";if(c)switch(c){case dc:return Tr;case Fd:return Fr;case Ji:return Pt;case Ml:return en;case $a:return vn}return r});function Le(e,r,o){for(var c=-1,_=o.length;++c<_;){var L=o[c],z=L.size;switch(L.type){case"drop":e+=z;break;case"dropRight":r-=z;break;case"take":r=In(r,e+z);break;case"takeRight":e=qr(e,r-z);break}}return{start:e,end:r}}function De(e){var r=e.match(Na);return r?r[1].split(Ba):[]}function Ne(e,r,o){r=Si(r,e);for(var c=-1,_=r.length,L=!1;++c<_;){var z=Dr(r[c]);if(!(L=e!=null&&o(e,z)))break;e=e[z]}return L||++c!=_?L:(_=e==null?0:e.length,!!_&&Vc(_)&&K(z,_)&&(Jt(e)||Ns(e)))}function Ge(e){var r=e.length,o=new e.constructor(r);return r&&typeof e[0]=="string"&&gr.call(e,"index")&&(o.index=e.index,o.input=e.input),o}function Be(e){return typeof e.constructor=="function"&&!pt(e)?Xa(_f(e)):{}}function We(e,r,o){var c=e.constructor;switch(r){case Gn:return oo(e);case Gt:case Mt:return new c(+e);case Tr:return Os(e,o);case Rn:case Un:case C:case Ue:case Xe:case dt:case Z:case we:case m:return Zo(e,o);case Fr:return new c;case Xr:case on:return new c(e);case Ln:return Is(e);case en:return new c;case E:return Ms(e)}}function Ce(e,r){var o=r.length;if(!o)return e;var c=o-1;return r[c]=(o>1?"& ":"")+r[c],r=r.join(o>2?", ":" "),e.replace(Cn,`{
|
|
17
|
+
*/(function(t,n){(function(){var i,f="4.17.21",h=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",d="Invalid `variable` option passed into `_.template`",v="__lodash_hash_undefined__",M=500,k="__lodash_placeholder__",g=1,F=2,$=4,S=1,de=2,se=1,I=2,U=4,te=8,ce=16,_e=32,we=64,ee=128,Ce=256,ut=512,ct=30,nt="...",ft=800,tt=16,Le=1,Ct=2,bt=3,Me=1/0,Ze=9007199254740991,St=17976931348623157e292,$t=0/0,Wt=4294967295,Qt=Wt-1,sr=Wt>>>1,xr=[["ary",ee],["bind",se],["bindKey",I],["curry",te],["curryRight",ce],["flip",ut],["partial",_e],["partialRight",we],["rearg",Ce]],or="[object Arguments]",Kt="[object Array]",wr="[object AsyncFunction]",Gt="[object Boolean]",kt="[object Date]",hn="[object DOMException]",jr="[object Error]",Ft="[object Function]",Br="[object GeneratorFunction]",Ir="[object Map]",Zr="[object Number]",Qr="[object Null]",ar="[object Object]",Nt="[object Promise]",En="[object Proxy]",An="[object RegExp]",Jr="[object Set]",an="[object String]",w="[object Symbol]",li="[object Undefined]",dn="[object WeakMap]",Gi="[object WeakSet]",Bn="[object ArrayBuffer]",Er="[object DataView]",Dn="[object Float32Array]",Pn="[object Float64Array]",A="[object Int8Array]",Ue="[object Int16Array]",Xe="[object Int32Array]",dt="[object Uint8Array]",z="[object Uint8ClampedArray]",xe="[object Uint16Array]",p="[object Uint32Array]",He=/\b__p \+= '';/g,Bt=/\b(__p \+=) '' \+/g,o=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ue=/&(?:amp|lt|gt|quot|#39);/g,ge=/[&<>"']/g,y=RegExp(ue.source),Y=RegExp(ge.source),oe=/<%-([\s\S]+?)%>/g,At=/<%([\s\S]+?)%>/g,it=/<%=([\s\S]+?)%>/g,mt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,lr=/^\w*$/,ui=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Fr=/[\\^$.*+?()[\]{}|]/g,hr=RegExp(Fr.source),Yr=/^\s+/,vn=/\s/,Ln=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ra=/\{\n\/\* \[wrapped with (.+)\] \*/,Ca=/,? & /,jt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Hn=/[()=,{}\[\]\/\s]/,fn=/\\(\\)?/g,ci=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,$n=/\w*$/,Ws=/^[-+]0x[0-9a-f]+$/i,Ch=/^0b[01]+$/i,Mh=/^\[object .+?Constructor\]$/,kh=/^0o[0-7]+$/i,Ih=/^(?:0|[1-9]\d*)$/,Fh=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Vs=/($^)/,Nh=/['\n\r\u2028\u2029\\]/g,$s="\\ud800-\\udfff",Bh="\\u0300-\\u036f",Ph="\\ufe20-\\ufe2f",Gh="\\u20d0-\\u20ff",Tu=Bh+Ph+Gh,Eu="\\u2700-\\u27bf",Au="a-z\\xdf-\\xf6\\xf8-\\xff",Uh="\\xac\\xb1\\xd7\\xf7",Yh="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Hh="\\u2000-\\u206f",zh=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Du="A-Z\\xc0-\\xd6\\xd8-\\xde",Lu="\\ufe0e\\ufe0f",Ou=Uh+Yh+Hh+zh,qo="['\u2019]",Zs="["+$s+"]",Ko="["+Ou+"]",Xs="["+Tu+"]",Ru="\\d+",Qf="["+Eu+"]",qs="["+Au+"]",jo="[^"+$s+Ou+Ru+Eu+Au+Du+"]",Jf="\\ud83c[\\udffb-\\udfff]",Wh="(?:"+Xs+"|"+Jf+")",Cu="[^"+$s+"]",Qo="(?:\\ud83c[\\udde6-\\uddff]){2}",Jo="[\\ud800-\\udbff][\\udc00-\\udfff]",On="["+Du+"]",zn="\\u200d",es="(?:"+qs+"|"+jo+")",Vh="(?:"+On+"|"+jo+")",Mu="(?:"+qo+"(?:d|ll|m|re|s|t|ve))?",el="(?:"+qo+"(?:D|LL|M|RE|S|T|VE))?",tl=Wh+"?",ku="["+Lu+"]?",$h="(?:"+zn+"(?:"+[Cu,Qo,Jo].join("|")+")"+ku+tl+")*",rl="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Zh="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Iu=ku+tl+$h,Xh="(?:"+[Qf,Qo,Jo].join("|")+")"+Iu,qh="(?:"+[Cu+Xs+"?",Xs,Qo,Jo,Zs].join("|")+")",Kh=RegExp(qo,"g"),jh=RegExp(Xs,"g"),nl=RegExp(Jf+"(?="+Jf+")|"+qh+Iu,"g"),Qh=RegExp([On+"?"+qs+"+"+Mu+"(?="+[Ko,On,"$"].join("|")+")",Vh+"+"+el+"(?="+[Ko,On+es,"$"].join("|")+")",On+"?"+es+"+"+Mu,On+"+"+el,Zh,rl,Ru,Xh].join("|"),"g"),Ma=RegExp("["+zn+$s+Tu+Lu+"]"),Jh=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ed=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ks=-1,Rr={};Rr[Dn]=Rr[Pn]=Rr[A]=Rr[Ue]=Rr[Xe]=Rr[dt]=Rr[z]=Rr[xe]=Rr[p]=!0,Rr[or]=Rr[Kt]=Rr[Bn]=Rr[Gt]=Rr[Er]=Rr[kt]=Rr[jr]=Rr[Ft]=Rr[Ir]=Rr[Zr]=Rr[ar]=Rr[An]=Rr[Jr]=Rr[an]=Rr[dn]=!1;var Cr={};Cr[or]=Cr[Kt]=Cr[Bn]=Cr[Er]=Cr[Gt]=Cr[kt]=Cr[Dn]=Cr[Pn]=Cr[A]=Cr[Ue]=Cr[Xe]=Cr[Ir]=Cr[Zr]=Cr[ar]=Cr[An]=Cr[Jr]=Cr[an]=Cr[w]=Cr[dt]=Cr[z]=Cr[xe]=Cr[p]=!0,Cr[jr]=Cr[Ft]=Cr[dn]=!1;var Fu={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},td={"&":"&","<":"<",">":">",'"':""","'":"'"},il={"&":"&","<":"<",">":">",""":'"',"'":"'"},al={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ia=parseFloat,js=parseInt,fl=typeof Us=="object"&&Us&&Us.Object===Object&&Us,Nu=typeof self=="object"&&self&&self.Object===Object&&self,xn=fl||Nu||Function("return this")(),sl=n&&!n.nodeType&&n,ka=sl&&!0&&t&&!t.nodeType&&t,Bu=ka&&ka.exports===sl,ol=Bu&&fl.process,Jn=function(){try{var K=ka&&ka.require&&ka.require("util").types;return K||ol&&ol.binding&&ol.binding("util")}catch{}}(),Pu=Jn&&Jn.isArrayBuffer,Ui=Jn&&Jn.isDate,Gu=Jn&&Jn.isMap,Uu=Jn&&Jn.isRegExp,yf=Jn&&Jn.isSet,Yu=Jn&&Jn.isTypedArray;function _n(K,Ee,he){switch(he.length){case 0:return K.call(Ee);case 1:return K.call(Ee,he[0]);case 2:return K.call(Ee,he[0],he[1]);case 3:return K.call(Ee,he[0],he[1],he[2])}return K.apply(Ee,he)}function Hu(K,Ee,he,gt){for(var Zt=-1,mr=K==null?0:K.length;++Zt<mr;){var sn=K[Zt];Ee(gt,sn,he(sn),K)}return gt}function wn(K,Ee){for(var he=-1,gt=K==null?0:K.length;++he<gt&&Ee(K[he],he,K)!==!1;);return K}function zu(K,Ee){for(var he=K==null?0:K.length;he--&&Ee(K[he],he,K)!==!1;);return K}function aa(K,Ee){for(var he=-1,gt=K==null?0:K.length;++he<gt;)if(!Ee(K[he],he,K))return!1;return!0}function Di(K,Ee){for(var he=-1,gt=K==null?0:K.length,Zt=0,mr=[];++he<gt;){var sn=K[he];Ee(sn,he,K)&&(mr[Zt++]=sn)}return mr}function Qs(K,Ee){var he=K==null?0:K.length;return!!he&&Hi(K,Ee,0)>-1}function ll(K,Ee,he){for(var gt=-1,Zt=K==null?0:K.length;++gt<Zt;)if(he(Ee,K[gt]))return!0;return!1}function Pr(K,Ee){for(var he=-1,gt=K==null?0:K.length,Zt=Array(gt);++he<gt;)Zt[he]=Ee(K[he],he,K);return Zt}function Yi(K,Ee){for(var he=-1,gt=Ee.length,Zt=K.length;++he<gt;)K[Zt+he]=Ee[he];return K}function ul(K,Ee,he,gt){var Zt=-1,mr=K==null?0:K.length;for(gt&&mr&&(he=K[++Zt]);++Zt<mr;)he=Ee(he,K[Zt],Zt,K);return he}function rd(K,Ee,he,gt){var Zt=K==null?0:K.length;for(gt&&Zt&&(he=K[--Zt]);Zt--;)he=Ee(he,K[Zt],Zt,K);return he}function Js(K,Ee){for(var he=-1,gt=K==null?0:K.length;++he<gt;)if(Ee(K[he],he,K))return!0;return!1}var Nr=Fa("length");function Wu(K){return K.split("")}function nd(K){return K.match(jt)||[]}function hi(K,Ee,he){var gt;return he(K,function(Zt,mr,sn){if(Ee(Zt,mr,sn))return gt=mr,!1}),gt}function bf(K,Ee,he,gt){for(var Zt=K.length,mr=he+(gt?1:-1);gt?mr--:++mr<Zt;)if(Ee(K[mr],mr,K))return mr;return-1}function Hi(K,Ee,he){return Ee===Ee?Sf(K,Ee,he):bf(K,eo,he)}function Ia(K,Ee,he,gt){for(var Zt=he-1,mr=K.length;++Zt<mr;)if(gt(K[Zt],Ee))return Zt;return-1}function eo(K){return K!==K}function ts(K,Ee){var he=K==null?0:K.length;return he?to(K,Ee)/he:$t}function Fa(K){return function(Ee){return Ee==null?i:Ee[K]}}function xf(K){return function(Ee){return K==null?i:K[Ee]}}function cl(K,Ee,he,gt,Zt){return Zt(K,function(mr,sn,Ar){he=gt?(gt=!1,mr):Ee(he,mr,sn,Ar)}),he}function hl(K,Ee){var he=K.length;for(K.sort(Ee);he--;)K[he]=K[he].value;return K}function to(K,Ee){for(var he,gt=-1,Zt=K.length;++gt<Zt;){var mr=Ee(K[gt]);mr!==i&&(he=he===i?mr:he+mr)}return he}function dl(K,Ee){for(var he=-1,gt=Array(K);++he<K;)gt[he]=Ee(he);return gt}function id(K,Ee){return Pr(Ee,function(he){return[he,K[he]]})}function Vu(K){return K&&K.slice(0,qu(K)+1).replace(Yr,"")}function Zn(K){return function(Ee){return K(Ee)}}function rs(K,Ee){return Pr(Ee,function(he){return K[he]})}function fa(K,Ee){return K.has(Ee)}function ro(K,Ee){for(var he=-1,gt=K.length;++he<gt&&Hi(Ee,K[he],0)>-1;);return he}function no(K,Ee){for(var he=K.length;he--&&Hi(Ee,K[he],0)>-1;);return he}function wf(K,Ee){for(var he=K.length,gt=0;he--;)K[he]===Ee&&++gt;return gt}var vl=xf(Fu),_l=xf(td);function pl(K){return"\\"+al[K]}function ml(K,Ee){return K==null?i:K[Ee]}function Na(K){return Ma.test(K)}function $u(K){return Jh.test(K)}function Zu(K){for(var Ee,he=[];!(Ee=K.next()).done;)he.push(Ee.value);return he}function io(K){var Ee=-1,he=Array(K.size);return K.forEach(function(gt,Zt){he[++Ee]=[Zt,gt]}),he}function gl(K,Ee){return function(he){return K(Ee(he))}}function zi(K,Ee){for(var he=-1,gt=K.length,Zt=0,mr=[];++he<gt;){var sn=K[he];(sn===Ee||sn===k)&&(K[he]=k,mr[Zt++]=he)}return mr}function ns(K){var Ee=-1,he=Array(K.size);return K.forEach(function(gt){he[++Ee]=gt}),he}function Xu(K){var Ee=-1,he=Array(K.size);return K.forEach(function(gt){he[++Ee]=[gt,gt]}),he}function Sf(K,Ee,he){for(var gt=he-1,Zt=K.length;++gt<Zt;)if(K[gt]===Ee)return gt;return-1}function yl(K,Ee,he){for(var gt=he+1;gt--;)if(K[gt]===Ee)return gt;return gt}function sa(K){return Na(K)?fd(K):Nr(K)}function Gn(K){return Na(K)?bl(K):Wu(K)}function qu(K){for(var Ee=K.length;Ee--&&vn.test(K.charAt(Ee)););return Ee}var ad=xf(il);function fd(K){for(var Ee=nl.lastIndex=0;nl.test(K);)++Ee;return Ee}function bl(K){return K.match(nl)||[]}function sd(K){return K.match(Qh)||[]}var od=function K(Ee){Ee=Ee==null?xn:Tf.defaults(xn.Object(),Ee,Tf.pick(xn,ed));var he=Ee.Array,gt=Ee.Date,Zt=Ee.Error,mr=Ee.Function,sn=Ee.Math,Ar=Ee.Object,xl=Ee.RegExp,ld=Ee.String,ei=Ee.TypeError,ao=he.prototype,ud=mr.prototype,Ef=Ar.prototype,fo=Ee["__core-js_shared__"],is=ud.toString,gr=Ef.hasOwnProperty,cd=0,as=function(){var e=/[^.]+$/.exec(fo&&fo.keys&&fo.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Un=Ef.toString,Af=is.call(Ar),Ku=xn._,ju=xl("^"+is.call(gr).replace(Fr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),fs=Bu?Ee.Buffer:i,Wi=Ee.Symbol,ss=Ee.Uint8Array,wl=fs?fs.allocUnsafe:i,so=gl(Ar.getPrototypeOf,Ar),Ba=Ar.create,on=Ef.propertyIsEnumerable,os=ao.splice,Sl=Wi?Wi.isConcatSpreadable:i,di=Wi?Wi.iterator:i,oa=Wi?Wi.toStringTag:i,ls=function(){try{var e=C(Ar,"defineProperty");return e({},"",{}),e}catch{}}(),hd=Ee.clearTimeout!==xn.clearTimeout&&Ee.clearTimeout,dd=gt&>.now!==xn.Date.now&>.now,vd=Ee.setTimeout!==xn.setTimeout&&Ee.setTimeout,oo=sn.ceil,Df=sn.floor,lo=Ar.getOwnPropertySymbols,_d=fs?fs.isBuffer:i,Tl=Ee.isFinite,Qu=ao.join,pd=gl(Ar.keys,Ar),Xr=sn.max,Rn=sn.min,la=gt.now,uo=Ee.parseInt,El=sn.random,Ju=ao.reverse,co=C(Ee,"DataView"),Lf=C(Ee,"Map"),ho=C(Ee,"Promise"),Pa=C(Ee,"Set"),Of=C(Ee,"WeakMap"),Rf=C(Ar,"create"),us=Of&&new Of,Cn={},ec=pr(co),md=pr(Lf),Vi=pr(ho),Al=pr(Pa),Ga=pr(Of),Ua=Wi?Wi.prototype:i,Cf=Ua?Ua.valueOf:i,Dl=Ua?Ua.toString:i;function b(e){if(rn(e)&&!Jt(e)&&!(e instanceof ur)){if(e instanceof ti)return e;if(gr.call(e,"__wrapped__"))return Kr(e)}return new ti(e)}var Ya=function(){function e(){}return function(r){if(!tn(r))return{};if(Ba)return Ba(r);e.prototype=r;var a=new e;return e.prototype=i,a}}();function cs(){}function ti(e,r){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!r,this.__index__=0,this.__values__=i}b.templateSettings={escape:oe,evaluate:At,interpolate:it,variable:"",imports:{_:b}},b.prototype=cs.prototype,b.prototype.constructor=b,ti.prototype=Ya(cs.prototype),ti.prototype.constructor=ti;function ur(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Wt,this.__views__=[]}function gd(){var e=new ur(this.__wrapped__);return e.__actions__=kn(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=kn(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=kn(this.__views__),e}function yd(){if(this.__filtered__){var e=new ur(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function bd(){var e=this.__wrapped__.value(),r=this.__dir__,a=Jt(e),l=r<0,_=a?e.length:0,T=De(0,_,this.__views__),P=T.start,H=T.end,J=H-P,Ie=l?H:P-1,Ne=this.__iteratees__,ze=Ne.length,vt=0,Ot=Rn(J,this.__takeCount__);if(!a||!l&&_==J&&Ot==J)return xs(e,this.__actions__);var Yt=[];e:for(;J--&&vt<Ot;){Ie+=r;for(var fr=-1,Ht=e[Ie];++fr<ze;){var vr=Ne[fr],yr=vr.iteratee,xi=vr.type,Kn=yr(Ht);if(xi==Ct)Ht=Kn;else if(!Kn){if(xi==Le)continue e;break e}}Yt[vt++]=Ht}return Yt}ur.prototype=Ya(cs.prototype),ur.prototype.constructor=ur;function Ha(e){var r=-1,a=e==null?0:e.length;for(this.clear();++r<a;){var l=e[r];this.set(l[0],l[1])}}function xd(){this.__data__=Rf?Rf(null):{},this.size=0}function tc(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}function rc(e){var r=this.__data__;if(Rf){var a=r[e];return a===v?i:a}return gr.call(r,e)?r[e]:i}function wd(e){var r=this.__data__;return Rf?r[e]!==i:gr.call(r,e)}function Sd(e,r){var a=this.__data__;return this.size+=this.has(e)?0:1,a[e]=Rf&&r===i?v:r,this}Ha.prototype.clear=xd,Ha.prototype.delete=tc,Ha.prototype.get=rc,Ha.prototype.has=wd,Ha.prototype.set=Sd;function vi(e){var r=-1,a=e==null?0:e.length;for(this.clear();++r<a;){var l=e[r];this.set(l[0],l[1])}}function vo(){this.__data__=[],this.size=0}function Td(e){var r=this.__data__,a=ua(r,e);if(a<0)return!1;var l=r.length-1;return a==l?r.pop():os.call(r,a,1),--this.size,!0}function Ed(e){var r=this.__data__,a=ua(r,e);return a<0?i:r[a][1]}function Ad(e){return ua(this.__data__,e)>-1}function Dd(e,r){var a=this.__data__,l=ua(a,e);return l<0?(++this.size,a.push([e,r])):a[l][1]=r,this}vi.prototype.clear=vo,vi.prototype.delete=Td,vi.prototype.get=Ed,vi.prototype.has=Ad,vi.prototype.set=Dd;function $i(e){var r=-1,a=e==null?0:e.length;for(this.clear();++r<a;){var l=e[r];this.set(l[0],l[1])}}function nc(){this.size=0,this.__data__={hash:new Ha,map:new(Lf||vi),string:new Ha}}function Ld(e){var r=c(this,e).delete(e);return this.size-=r?1:0,r}function Od(e){return c(this,e).get(e)}function Rd(e){return c(this,e).has(e)}function Cd(e,r){var a=c(this,e),l=a.size;return a.set(e,r),this.size+=a.size==l?0:1,this}$i.prototype.clear=nc,$i.prototype.delete=Ld,$i.prototype.get=Od,$i.prototype.has=Rd,$i.prototype.set=Cd;function za(e){var r=-1,a=e==null?0:e.length;for(this.__data__=new $i;++r<a;)this.add(e[r])}function Mf(e){return this.__data__.set(e,v),this}function Md(e){return this.__data__.has(e)}za.prototype.add=za.prototype.push=Mf,za.prototype.has=Md;function _i(e){var r=this.__data__=new vi(e);this.size=r.size}function ic(){this.__data__=new vi,this.size=0}function _o(e){var r=this.__data__,a=r.delete(e);return this.size=r.size,a}function ac(e){return this.__data__.get(e)}function Ll(e){return this.__data__.has(e)}function kd(e,r){var a=this.__data__;if(a instanceof vi){var l=a.__data__;if(!Lf||l.length<h-1)return l.push([e,r]),this.size=++a.size,this;a=this.__data__=new $i(l)}return a.set(e,r),this.size=a.size,this}_i.prototype.clear=ic,_i.prototype.delete=_o,_i.prototype.get=ac,_i.prototype.has=Ll,_i.prototype.set=kd;function Ol(e,r){var a=Jt(e),l=!a&&Rs(e),_=!a&&!l&&Wf(e),T=!a&&!l&&!_&&Io(e),P=a||l||_||T,H=P?dl(e.length,ld):[],J=H.length;for(var Ie in e)(r||gr.call(e,Ie))&&!(P&&(Ie=="length"||_&&(Ie=="offset"||Ie=="parent")||T&&(Ie=="buffer"||Ie=="byteLength"||Ie=="byteOffset")||V(Ie,J)))&&H.push(Ie);return H}function fc(e){var r=e.length;return r?e[wo(0,r-1)]:i}function Id(e,r){return Lr(kn(e),Wa(r,0,e.length))}function Fd(e){return Lr(kn(e))}function Rl(e,r,a){(a!==i&&!Qi(e[r],a)||a===i&&!(r in e))&&Wn(e,r,a)}function hs(e,r,a){var l=e[r];(!(gr.call(e,r)&&Qi(l,a))||a===i&&!(r in e))&&Wn(e,r,a)}function ua(e,r){for(var a=e.length;a--;)if(Qi(e[a][0],r))return a;return-1}function Nd(e,r,a,l){return Li(e,function(_,T,P){r(l,_,a(_),P)}),l}function ds(e,r){return e&&Oi(r,Fn(r),e)}function Bd(e,r){return e&&Oi(r,fi(r),e)}function Wn(e,r,a){r=="__proto__"&&ls?ls(e,r,{configurable:!0,enumerable:!0,value:a,writable:!0}):e[r]=a}function ca(e,r){for(var a=-1,l=r.length,_=he(l),T=e==null;++a<l;)_[a]=T?i:jd(e,r[a]);return _}function Wa(e,r,a){return e===e&&(a!==i&&(e=e<=a?e:a),r!==i&&(e=e>=r?e:r)),e}function Sn(e,r,a,l,_,T){var P,H=r&g,J=r&F,Ie=r&$;if(a&&(P=_?a(e,l,_,T):a(e)),P!==i)return P;if(!tn(e))return e;var Ne=Jt(e);if(Ne){if(P=Ge(e),!H)return kn(e,P)}else{var ze=ae(e),vt=ze==Ft||ze==Br;if(Wf(e))return Ss(e,H);if(ze==ar||ze==or||vt&&!_){if(P=J||vt?{}:Pe(e),!H)return J?Yd(e,Bd(P,e)):Ud(e,ds(P,e))}else{if(!Cr[ze])return _?e:{};P=We(e,ze,H)}}T||(T=new _i);var Ot=T.get(e);if(Ot)return Ot;T.set(e,P),r_(e)?e.forEach(function(Ht){P.add(Sn(Ht,r,a,Ht,e,T))}):e_(e)&&e.forEach(function(Ht,vr){P.set(vr,Sn(Ht,r,a,vr,e,T))});var Yt=Ie?J?Co:Ro:J?fi:Fn,fr=Ne?i:Yt(e);return wn(fr||e,function(Ht,vr){fr&&(vr=Ht,Ht=e[vr]),hs(P,vr,Sn(Ht,r,a,vr,e,T))}),P}function sc(e){var r=Fn(e);return function(a){return Va(a,e,r)}}function Va(e,r,a){var l=a.length;if(e==null)return!l;for(e=Ar(e);l--;){var _=a[l],T=r[_],P=e[_];if(P===i&&!(_ in e)||!T(P))return!1}return!0}function po(e,r,a){if(typeof e!="function")throw new ei(u);return wt(function(){e.apply(i,a)},r)}function $a(e,r,a,l){var _=-1,T=Qs,P=!0,H=e.length,J=[],Ie=r.length;if(!H)return J;a&&(r=Pr(r,Zn(a))),l?(T=ll,P=!1):r.length>=h&&(T=fa,P=!1,r=new za(r));e:for(;++_<H;){var Ne=e[_],ze=a==null?Ne:a(Ne);if(Ne=l||Ne!==0?Ne:0,P&&ze===ze){for(var vt=Ie;vt--;)if(r[vt]===ze)continue e;J.push(Ne)}else T(r,ze,l)||J.push(Ne)}return J}var Li=$l(ri),mo=$l(vs,!0);function Cl(e,r){var a=!0;return Li(e,function(l,_,T){return a=!!r(l,_,T),a}),a}function Za(e,r,a){for(var l=-1,_=e.length;++l<_;){var T=e[l],P=r(T);if(P!=null&&(H===i?P===P&&!bi(P):a(P,H)))var H=P,J=T}return J}function oc(e,r,a,l){var _=e.length;for(a=nr(a),a<0&&(a=-a>_?0:_+a),l=l===i||l>_?_:nr(l),l<0&&(l+=_),l=a>l?0:i_(l);a<l;)e[a++]=r;return e}function Ml(e,r){var a=[];return Li(e,function(l,_,T){r(l,_,T)&&a.push(l)}),a}function pn(e,r,a,l,_){var T=-1,P=e.length;for(a||(a=Fe),_||(_=[]);++T<P;){var H=e[T];r>0&&a(H)?r>1?pn(H,r-1,a,l,_):Yi(_,H):l||(_[_.length]=H)}return _}var go=Zl(),kl=Zl(!0);function ri(e,r){return e&&go(e,r,Fn)}function vs(e,r){return e&&kl(e,r,Fn)}function _s(e,r){return Di(r,function(a){return of(e[a])})}function ha(e,r){r=pi(r,e);for(var a=0,l=r.length;e!=null&&a<l;)e=e[Dr(r[a++])];return a&&a==l?e:i}function Il(e,r,a){var l=r(e);return Jt(e)?l:Yi(l,a(e))}function Mn(e){return e==null?e===i?li:Qr:oa&&oa in Ar(e)?ie(e):$e(e)}function ps(e,r){return e>r}function lc(e,r){return e!=null&&gr.call(e,r)}function uc(e,r){return e!=null&&r in Ar(e)}function Fl(e,r,a){return e>=Rn(r,a)&&e<Xr(r,a)}function ms(e,r,a){for(var l=a?ll:Qs,_=e[0].length,T=e.length,P=T,H=he(T),J=1/0,Ie=[];P--;){var Ne=e[P];P&&r&&(Ne=Pr(Ne,Zn(r))),J=Rn(Ne.length,J),H[P]=!a&&(r||_>=120&&Ne.length>=120)?new za(P&&Ne):i}Ne=e[0];var ze=-1,vt=H[0];e:for(;++ze<_&&Ie.length<J;){var Ot=Ne[ze],Yt=r?r(Ot):Ot;if(Ot=a||Ot!==0?Ot:0,!(vt?fa(vt,Yt):l(Ie,Yt,a))){for(P=T;--P;){var fr=H[P];if(!(fr?fa(fr,Yt):l(e[P],Yt,a)))continue e}vt&&vt.push(Yt),Ie.push(Ot)}}return Ie}function cc(e,r,a,l){return ri(e,function(_,T,P){r(l,a(_),T,P)}),l}function Xa(e,r,a){r=pi(r,e),e=Mt(e,r);var l=e==null?e:e[Dr(N(r))];return l==null?i:_n(l,e,a)}function Nl(e){return rn(e)&&Mn(e)==or}function hc(e){return rn(e)&&Mn(e)==Bn}function Bl(e){return rn(e)&&Mn(e)==kt}function kf(e,r,a,l,_){return e===r?!0:e==null||r==null||!rn(e)&&!rn(r)?e!==e&&r!==r:dc(e,r,a,l,kf,_)}function dc(e,r,a,l,_,T){var P=Jt(e),H=Jt(r),J=P?Kt:ae(e),Ie=H?Kt:ae(r);J=J==or?ar:J,Ie=Ie==or?ar:Ie;var Ne=J==ar,ze=Ie==ar,vt=J==Ie;if(vt&&Wf(e)){if(!Wf(r))return!1;P=!0,Ne=!1}if(vt&&!Ne)return T||(T=new _i),P||Io(e)?Tc(e,r,a,l,_,T):Vd(e,r,J,a,l,_,T);if(!(a&S)){var Ot=Ne&&gr.call(e,"__wrapped__"),Yt=ze&&gr.call(r,"__wrapped__");if(Ot||Yt){var fr=Ot?e.value():e,Ht=Yt?r.value():r;return T||(T=new _i),_(fr,Ht,a,l,T)}}return vt?(T||(T=new _i),$d(e,r,a,l,_,T)):!1}function Pl(e){return rn(e)&&ae(e)==Ir}function gs(e,r,a,l){var _=a.length,T=_,P=!l;if(e==null)return!T;for(e=Ar(e);_--;){var H=a[_];if(P&&H[2]?H[1]!==e[H[0]]:!(H[0]in e))return!1}for(;++_<T;){H=a[_];var J=H[0],Ie=e[J],Ne=H[1];if(P&&H[2]){if(Ie===i&&!(J in e))return!1}else{var ze=new _i;if(l)var vt=l(Ie,Ne,J,e,r,ze);if(!(vt===i?kf(Ne,Ie,S|de,l,ze):vt))return!1}}return!0}function If(e){if(!tn(e)||Qe(e))return!1;var r=of(e)?ju:Mh;return r.test(pr(e))}function vc(e){return rn(e)&&Mn(e)==An}function yo(e){return rn(e)&&ae(e)==Jr}function Zi(e){return rn(e)&&Mc(e.length)&&!!Rr[Mn(e)]}function Ff(e){return typeof e=="function"?e:e==null?si:typeof e=="object"?Jt(e)?_a(e[0],e[1]):va(e):__(e)}function Xi(e){if(!pt(e))return pd(e);var r=[];for(var a in Ar(e))gr.call(e,a)&&a!="constructor"&&r.push(a);return r}function ys(e){if(!tn(e))return ke(e);var r=pt(e),a=[];for(var l in e)l=="constructor"&&(r||!gr.call(e,l))||a.push(l);return a}function qa(e,r){return e<r}function da(e,r){var a=-1,l=ai(e)?he(e.length):[];return Li(e,function(_,T,P){l[++a]=r(_,T,P)}),l}function va(e){var r=x(e);return r.length==1&&r[0][2]?me(r[0][0],r[0][1]):function(a){return a===e||gs(a,e,r)}}function _a(e,r){return Re(e)&&ye(r)?me(Dr(e),r):function(a){var l=jd(a,e);return l===i&&l===r?Qd(a,e):kf(r,l,S|de)}}function Ka(e,r,a,l,_){e!==r&&go(r,function(T,P){if(_||(_=new _i),tn(T))bo(e,r,P,a,Ka,l,_);else{var H=l?l(Ke(e,P),T,P+"",e,r,_):i;H===i&&(H=T),Rl(e,P,H)}},fi)}function bo(e,r,a,l,_,T,P){var H=Ke(e,a),J=Ke(r,a),Ie=P.get(J);if(Ie){Rl(e,a,Ie);return}var Ne=T?T(H,J,a+"",e,r,P):i,ze=Ne===i;if(ze){var vt=Jt(J),Ot=!vt&&Wf(J),Yt=!vt&&!Ot&&Io(J);Ne=J,vt||Ot||Yt?Jt(H)?Ne=H:un(H)?Ne=kn(H):Ot?(ze=!1,Ne=Ss(J,!0)):Yt?(ze=!1,Ne=Hf(J,!0)):Ne=[]:Jl(J)||Rs(J)?(Ne=H,Rs(H)?Ne=a_(H):(!tn(H)||of(H))&&(Ne=Pe(J))):ze=!1}ze&&(P.set(J,Ne),_(Ne,J,l,T,P),P.delete(J)),Rl(e,a,Ne)}function Nf(e,r){var a=e.length;if(!!a)return r+=r<0?a:0,V(r,a)?e[r]:i}function xo(e,r,a){r.length?r=Pr(r,function(T){return Jt(T)?function(P){return ha(P,T.length===1?T[0]:T)}:T}):r=[si];var l=-1;r=Pr(r,Zn(Pt()));var _=da(e,function(T,P,H){var J=Pr(r,function(Ie){return Ie(T)});return{criteria:J,index:++l,value:T}});return hl(_,function(T,P){return Ds(T,P,a)})}function Gl(e,r){return ja(e,r,function(a,l){return Qd(e,l)})}function ja(e,r,a){for(var l=-1,_=r.length,T={};++l<_;){var P=r[l],H=ha(e,P);a(H,P)&&bs(T,pi(P,e),H)}return T}function Bf(e){return function(r){return ha(r,e)}}function Ul(e,r,a,l){var _=l?Ia:Hi,T=-1,P=r.length,H=e;for(e===r&&(r=kn(r)),a&&(H=Pr(e,Zn(a)));++T<P;)for(var J=0,Ie=r[T],Ne=a?a(Ie):Ie;(J=_(H,Ne,J,l))>-1;)H!==e&&os.call(H,J,1),os.call(e,J,1);return e}function _c(e,r){for(var a=e?r.length:0,l=a-1;a--;){var _=r[a];if(a==l||_!==T){var T=_;V(_)?os.call(e,_,1):zl(e,_)}}return e}function wo(e,r){return e+Df(El()*(r-e+1))}function pc(e,r,a,l){for(var _=-1,T=Xr(oo((r-e)/(a||1)),0),P=he(T);T--;)P[l?T:++_]=e,e+=a;return P}function So(e,r){var a="";if(!e||r<1||r>Ze)return a;do r%2&&(a+=e),r=Df(r/2),r&&(e+=e);while(r);return a}function rr(e,r){return Rt(qe(e,r,si),e+"")}function Pf(e){return fc(Fo(e))}function Yl(e,r){var a=Fo(e);return Lr(a,Wa(r,0,a.length))}function bs(e,r,a,l){if(!tn(e))return e;r=pi(r,e);for(var _=-1,T=r.length,P=T-1,H=e;H!=null&&++_<T;){var J=Dr(r[_]),Ie=a;if(J==="__proto__"||J==="constructor"||J==="prototype")return e;if(_!=P){var Ne=H[J];Ie=l?l(Ne,J,H):i,Ie===i&&(Ie=tn(Ne)?Ne:V(r[_+1])?[]:{})}hs(H,J,Ie),H=H[J]}return e}var mc=us?function(e,r){return us.set(e,r),e}:si,gc=ls?function(e,r){return ls(e,"toString",{configurable:!0,enumerable:!1,value:e0(r),writable:!0})}:si;function Pd(e){return Lr(Fo(e))}function ni(e,r,a){var l=-1,_=e.length;r<0&&(r=-r>_?0:_+r),a=a>_?_:a,a<0&&(a+=_),_=r>a?0:a-r>>>0,r>>>=0;for(var T=he(_);++l<_;)T[l]=e[l+r];return T}function Gd(e,r){var a;return Li(e,function(l,_,T){return a=r(l,_,T),!a}),!!a}function To(e,r,a){var l=0,_=e==null?l:e.length;if(typeof r=="number"&&r===r&&_<=sr){for(;l<_;){var T=l+_>>>1,P=e[T];P!==null&&!bi(P)&&(a?P<=r:P<r)?l=T+1:_=T}return _}return Hl(e,r,si,a)}function Hl(e,r,a,l){var _=0,T=e==null?0:e.length;if(T===0)return 0;r=a(r);for(var P=r!==r,H=r===null,J=bi(r),Ie=r===i;_<T;){var Ne=Df((_+T)/2),ze=a(e[Ne]),vt=ze!==i,Ot=ze===null,Yt=ze===ze,fr=bi(ze);if(P)var Ht=l||Yt;else Ie?Ht=Yt&&(l||vt):H?Ht=Yt&&vt&&(l||!Ot):J?Ht=Yt&&vt&&!Ot&&(l||!fr):Ot||fr?Ht=!1:Ht=l?ze<=r:ze<r;Ht?_=Ne+1:T=Ne}return Rn(T,Qt)}function yc(e,r){for(var a=-1,l=e.length,_=0,T=[];++a<l;){var P=e[a],H=r?r(P):P;if(!a||!Qi(H,J)){var J=H;T[_++]=P===0?0:P}}return T}function bc(e){return typeof e=="number"?e:bi(e)?$t:+e}function Xn(e){if(typeof e=="string")return e;if(Jt(e))return Pr(e,Xn)+"";if(bi(e))return Dl?Dl.call(e):"";var r=e+"";return r=="0"&&1/e==-Me?"-0":r}function pa(e,r,a){var l=-1,_=Qs,T=e.length,P=!0,H=[],J=H;if(a)P=!1,_=ll;else if(T>=h){var Ie=r?null:zd(e);if(Ie)return ns(Ie);P=!1,_=fa,J=new za}else J=r?[]:H;e:for(;++l<T;){var Ne=e[l],ze=r?r(Ne):Ne;if(Ne=a||Ne!==0?Ne:0,P&&ze===ze){for(var vt=J.length;vt--;)if(J[vt]===ze)continue e;r&&J.push(ze),H.push(Ne)}else _(J,ze,a)||(J!==H&&J.push(ze),H.push(Ne))}return H}function zl(e,r){return r=pi(r,e),e=Mt(e,r),e==null||delete e[Dr(N(r))]}function Eo(e,r,a,l){return bs(e,r,a(ha(e,r)),l)}function Qa(e,r,a,l){for(var _=e.length,T=l?_:-1;(l?T--:++T<_)&&r(e[T],T,e););return a?ni(e,l?0:T,l?T+1:_):ni(e,l?T+1:0,l?_:T)}function xs(e,r){var a=e;return a instanceof ur&&(a=a.value()),ul(r,function(l,_){return _.func.apply(_.thisArg,Yi([l],_.args))},a)}function Gf(e,r,a){var l=e.length;if(l<2)return l?pa(e[0]):[];for(var _=-1,T=he(l);++_<l;)for(var P=e[_],H=-1;++H<l;)H!=_&&(T[_]=$a(T[_]||P,e[H],r,a));return pa(pn(T,1),r,a)}function Ao(e,r,a){for(var l=-1,_=e.length,T=r.length,P={};++l<_;){var H=l<T?r[l]:i;a(P,e[l],H)}return P}function Uf(e){return un(e)?e:[]}function Yf(e){return typeof e=="function"?e:si}function pi(e,r){return Jt(e)?e:Re(e,r)?[e]:Xt(Or(e))}var Wl=rr;function mi(e,r,a){var l=e.length;return a=a===i?l:a,!r&&a>=l?e:ni(e,r,a)}var ws=hd||function(e){return xn.clearTimeout(e)};function Ss(e,r){if(r)return e.slice();var a=e.length,l=wl?wl(a):new e.constructor(a);return e.copy(l),l}function Ja(e){var r=new e.constructor(e.byteLength);return new ss(r).set(new ss(e)),r}function Ts(e,r){var a=r?Ja(e.buffer):e.buffer;return new e.constructor(a,e.byteOffset,e.byteLength)}function Es(e){var r=new e.constructor(e.source,$n.exec(e));return r.lastIndex=e.lastIndex,r}function As(e){return Cf?Ar(Cf.call(e)):{}}function Hf(e,r){var a=r?Ja(e.buffer):e.buffer;return new e.constructor(a,e.byteOffset,e.length)}function Do(e,r){if(e!==r){var a=e!==i,l=e===null,_=e===e,T=bi(e),P=r!==i,H=r===null,J=r===r,Ie=bi(r);if(!H&&!Ie&&!T&&e>r||T&&P&&J&&!H&&!Ie||l&&P&&J||!a&&J||!_)return 1;if(!l&&!T&&!Ie&&e<r||Ie&&a&&_&&!l&&!T||H&&a&&_||!P&&_||!J)return-1}return 0}function Ds(e,r,a){for(var l=-1,_=e.criteria,T=r.criteria,P=_.length,H=a.length;++l<P;){var J=Do(_[l],T[l]);if(J){if(l>=H)return J;var Ie=a[l];return J*(Ie=="desc"?-1:1)}}return e.index-r.index}function ma(e,r,a,l){for(var _=-1,T=e.length,P=a.length,H=-1,J=r.length,Ie=Xr(T-P,0),Ne=he(J+Ie),ze=!l;++H<J;)Ne[H]=r[H];for(;++_<P;)(ze||_<T)&&(Ne[a[_]]=e[_]);for(;Ie--;)Ne[H++]=e[_++];return Ne}function Vl(e,r,a,l){for(var _=-1,T=e.length,P=-1,H=a.length,J=-1,Ie=r.length,Ne=Xr(T-H,0),ze=he(Ne+Ie),vt=!l;++_<Ne;)ze[_]=e[_];for(var Ot=_;++J<Ie;)ze[Ot+J]=r[J];for(;++P<H;)(vt||_<T)&&(ze[Ot+a[P]]=e[_++]);return ze}function kn(e,r){var a=-1,l=e.length;for(r||(r=he(l));++a<l;)r[a]=e[a];return r}function Oi(e,r,a,l){var _=!a;a||(a={});for(var T=-1,P=r.length;++T<P;){var H=r[T],J=l?l(a[H],e[H],H,a,e):i;J===i&&(J=e[H]),_?Wn(a,H,J):hs(a,H,J)}return a}function Ud(e,r){return Oi(e,pe(e),r)}function Yd(e,r){return Oi(e,re(e),r)}function gi(e,r){return function(a,l){var _=Jt(a)?Hu:Nd,T=r?r():{};return _(a,e,Pt(l,2),T)}}function ef(e){return rr(function(r,a){var l=-1,_=a.length,T=_>1?a[_-1]:i,P=_>2?a[2]:i;for(T=e.length>3&&typeof T=="function"?(_--,T):i,P&&ne(a[0],a[1],P)&&(T=_<3?i:T,_=1),r=Ar(r);++l<_;){var H=a[l];H&&e(r,H,l,T)}return r})}function $l(e,r){return function(a,l){if(a==null)return a;if(!ai(a))return e(a,l);for(var _=a.length,T=r?_:-1,P=Ar(a);(r?T--:++T<_)&&l(P[T],T,P)!==!1;);return a}}function Zl(e){return function(r,a,l){for(var _=-1,T=Ar(r),P=l(r),H=P.length;H--;){var J=P[e?H:++_];if(a(T[J],J,T)===!1)break}return r}}function Hd(e,r,a){var l=r&se,_=Vn(e);function T(){var P=this&&this!==xn&&this instanceof T?_:e;return P.apply(l?a:this,arguments)}return T}function Xl(e){return function(r){r=Or(r);var a=Na(r)?Gn(r):i,l=a?a[0]:r.charAt(0),_=a?mi(a,1).join(""):r.slice(1);return l[e]()+_}}function zf(e){return function(r){return ul(d_(h_(r).replace(Kh,"")),e,"")}}function Vn(e){return function(){var r=arguments;switch(r.length){case 0:return new e;case 1:return new e(r[0]);case 2:return new e(r[0],r[1]);case 3:return new e(r[0],r[1],r[2]);case 4:return new e(r[0],r[1],r[2],r[3]);case 5:return new e(r[0],r[1],r[2],r[3],r[4]);case 6:return new e(r[0],r[1],r[2],r[3],r[4],r[5]);case 7:return new e(r[0],r[1],r[2],r[3],r[4],r[5],r[6])}var a=Ya(e.prototype),l=e.apply(a,r);return tn(l)?l:a}}function xc(e,r,a){var l=Vn(e);function _(){for(var T=arguments.length,P=he(T),H=T,J=nf(_);H--;)P[H]=arguments[H];var Ie=T<3&&P[0]!==J&&P[T-1]!==J?[]:zi(P,J);if(T-=Ie.length,T<a)return ql(e,r,Ls,_.placeholder,i,P,Ie,i,i,a-T);var Ne=this&&this!==xn&&this instanceof _?l:e;return _n(Ne,this,P)}return _}function tf(e){return function(r,a,l){var _=Ar(r);if(!ai(r)){var T=Pt(a,3);r=Fn(r),a=function(H){return T(_[H],H,_)}}var P=e(r,a,l);return P>-1?_[T?r[P]:P]:i}}function qi(e){return Ri(function(r){var a=r.length,l=a,_=ti.prototype.thru;for(e&&r.reverse();l--;){var T=r[l];if(typeof T!="function")throw new ei(u);if(_&&!P&&Mo(T)=="wrapper")var P=new ti([],!0)}for(l=P?l:a;++l<a;){T=r[l];var H=Mo(T),J=H=="wrapper"?Ql(T):i;J&&Se(J[0])&&J[1]==(ee|te|_e|Ce)&&!J[4].length&&J[9]==1?P=P[Mo(J[0])].apply(P,J[3]):P=T.length==1&&Se(T)?P[H]():P.thru(T)}return function(){var Ie=arguments,Ne=Ie[0];if(P&&Ie.length==1&&Jt(Ne))return P.plant(Ne).value();for(var ze=0,vt=a?r[ze].apply(this,Ie):Ne;++ze<a;)vt=r[ze].call(this,vt);return vt}})}function Ls(e,r,a,l,_,T,P,H,J,Ie){var Ne=r&ee,ze=r&se,vt=r&I,Ot=r&(te|ce),Yt=r&ut,fr=vt?i:Vn(e);function Ht(){for(var vr=arguments.length,yr=he(vr),xi=vr;xi--;)yr[xi]=arguments[xi];if(Ot)var Kn=nf(Ht),wi=wf(yr,Kn);if(l&&(yr=ma(yr,l,_,Ot)),T&&(yr=Vl(yr,T,P,Ot)),vr-=wi,Ot&&vr<Ie){var cn=zi(yr,Kn);return ql(e,r,Ls,Ht.placeholder,a,yr,cn,H,J,Ie-vr)}var Ji=ze?a:this,uf=vt?Ji[e]:e;return vr=yr.length,H?yr=Lt(yr,H):Yt&&vr>1&&yr.reverse(),Ne&&J<vr&&(yr.length=J),this&&this!==xn&&this instanceof Ht&&(uf=fr||Vn(uf)),uf.apply(Ji,yr)}return Ht}function Lo(e,r){return function(a,l){return cc(a,e,r(l),{})}}function rf(e,r){return function(a,l){var _;if(a===i&&l===i)return r;if(a!==i&&(_=a),l!==i){if(_===i)return l;typeof a=="string"||typeof l=="string"?(a=Xn(a),l=Xn(l)):(a=bc(a),l=bc(l)),_=e(a,l)}return _}}function Oo(e){return Ri(function(r){return r=Pr(r,Zn(Pt())),rr(function(a){var l=this;return e(r,function(_){return _n(_,l,a)})})})}function Hr(e,r){r=r===i?" ":Xn(r);var a=r.length;if(a<2)return a?So(r,e):r;var l=So(r,oo(e/sa(r)));return Na(r)?mi(Gn(l),0,e).join(""):l.slice(0,e)}function ga(e,r,a,l){var _=r&se,T=Vn(e);function P(){for(var H=-1,J=arguments.length,Ie=-1,Ne=l.length,ze=he(Ne+J),vt=this&&this!==xn&&this instanceof P?T:e;++Ie<Ne;)ze[Ie]=l[Ie];for(;J--;)ze[Ie++]=arguments[++H];return _n(vt,_?a:this,ze)}return P}function zr(e){return function(r,a,l){return l&&typeof l!="number"&&ne(r,a,l)&&(a=l=i),r=lf(r),a===i?(a=r,r=0):a=lf(a),l=l===i?r<a?1:-1:lf(l),pc(r,a,l,e)}}function Tn(e){return function(r,a){return typeof r=="string"&&typeof a=="string"||(r=Mi(r),a=Mi(a)),e(r,a)}}function ql(e,r,a,l,_,T,P,H,J,Ie){var Ne=r&te,ze=Ne?P:i,vt=Ne?i:P,Ot=Ne?T:i,Yt=Ne?i:T;r|=Ne?_e:we,r&=~(Ne?we:_e),r&U||(r&=~(se|I));var fr=[e,r,_,Ot,ze,Yt,vt,H,J,Ie],Ht=a.apply(i,fr);return Se(e)&&Je(Ht,fr),Ht.placeholder=l,Vt(Ht,e,r)}function Kl(e){var r=sn[e];return function(a,l){if(a=Mi(a),l=l==null?0:Rn(nr(l),292),l&&Tl(a)){var _=(Or(a)+"e").split("e"),T=r(_[0]+"e"+(+_[1]+l));return _=(Or(T)+"e").split("e"),+(_[0]+"e"+(+_[1]-l))}return r(a)}}var zd=Pa&&1/ns(new Pa([,-0]))[1]==Me?function(e){return new Pa(e)}:n0;function wc(e){return function(r){var a=ae(r);return a==Ir?io(r):a==Jr?Xu(r):id(r,e(r))}}function Ki(e,r,a,l,_,T,P,H){var J=r&I;if(!J&&typeof e!="function")throw new ei(u);var Ie=l?l.length:0;if(Ie||(r&=~(_e|we),l=_=i),P=P===i?P:Xr(nr(P),0),H=H===i?H:nr(H),Ie-=_?_.length:0,r&we){var Ne=l,ze=_;l=_=i}var vt=J?i:Ql(e),Ot=[e,r,a,l,_,Ne,ze,T,P,H];if(vt&&Ve(Ot,vt),e=Ot[0],r=Ot[1],a=Ot[2],l=Ot[3],_=Ot[4],H=Ot[9]=Ot[9]===i?J?0:e.length:Xr(Ot[9]-Ie,0),!H&&r&(te|ce)&&(r&=~(te|ce)),!r||r==se)var Yt=Hd(e,r,a);else r==te||r==ce?Yt=xc(e,r,H):(r==_e||r==(se|_e))&&!_.length?Yt=ga(e,r,a,l):Yt=Ls.apply(i,Ot);var fr=vt?mc:Je;return Vt(fr(Yt,Ot),e,r)}function jl(e,r,a,l){return e===i||Qi(e,Ef[a])&&!gr.call(l,a)?r:e}function Sc(e,r,a,l,_,T){return tn(e)&&tn(r)&&(T.set(r,e),Ka(e,r,i,Sc,T),T.delete(r)),e}function Wd(e){return Jl(e)?i:e}function Tc(e,r,a,l,_,T){var P=a&S,H=e.length,J=r.length;if(H!=J&&!(P&&J>H))return!1;var Ie=T.get(e),Ne=T.get(r);if(Ie&&Ne)return Ie==r&&Ne==e;var ze=-1,vt=!0,Ot=a&de?new za:i;for(T.set(e,r),T.set(r,e);++ze<H;){var Yt=e[ze],fr=r[ze];if(l)var Ht=P?l(fr,Yt,ze,r,e,T):l(Yt,fr,ze,e,r,T);if(Ht!==i){if(Ht)continue;vt=!1;break}if(Ot){if(!Js(r,function(vr,yr){if(!fa(Ot,yr)&&(Yt===vr||_(Yt,vr,a,l,T)))return Ot.push(yr)})){vt=!1;break}}else if(!(Yt===fr||_(Yt,fr,a,l,T))){vt=!1;break}}return T.delete(e),T.delete(r),vt}function Vd(e,r,a,l,_,T,P){switch(a){case Er:if(e.byteLength!=r.byteLength||e.byteOffset!=r.byteOffset)return!1;e=e.buffer,r=r.buffer;case Bn:return!(e.byteLength!=r.byteLength||!T(new ss(e),new ss(r)));case Gt:case kt:case Zr:return Qi(+e,+r);case jr:return e.name==r.name&&e.message==r.message;case An:case an:return e==r+"";case Ir:var H=io;case Jr:var J=l&S;if(H||(H=ns),e.size!=r.size&&!J)return!1;var Ie=P.get(e);if(Ie)return Ie==r;l|=de,P.set(e,r);var Ne=Tc(H(e),H(r),l,_,T,P);return P.delete(e),Ne;case w:if(Cf)return Cf.call(e)==Cf.call(r)}return!1}function $d(e,r,a,l,_,T){var P=a&S,H=Ro(e),J=H.length,Ie=Ro(r),Ne=Ie.length;if(J!=Ne&&!P)return!1;for(var ze=J;ze--;){var vt=H[ze];if(!(P?vt in r:gr.call(r,vt)))return!1}var Ot=T.get(e),Yt=T.get(r);if(Ot&&Yt)return Ot==r&&Yt==e;var fr=!0;T.set(e,r),T.set(r,e);for(var Ht=P;++ze<J;){vt=H[ze];var vr=e[vt],yr=r[vt];if(l)var xi=P?l(yr,vr,vt,r,e,T):l(vr,yr,vt,e,r,T);if(!(xi===i?vr===yr||_(vr,yr,a,l,T):xi)){fr=!1;break}Ht||(Ht=vt=="constructor")}if(fr&&!Ht){var Kn=e.constructor,wi=r.constructor;Kn!=wi&&"constructor"in e&&"constructor"in r&&!(typeof Kn=="function"&&Kn instanceof Kn&&typeof wi=="function"&&wi instanceof wi)&&(fr=!1)}return T.delete(e),T.delete(r),fr}function Ri(e){return Rt(qe(e,i,O),e+"")}function Ro(e){return Il(e,Fn,pe)}function Co(e){return Il(e,fi,re)}var Ql=us?function(e){return us.get(e)}:n0;function Mo(e){for(var r=e.name+"",a=Cn[r],l=gr.call(Cn,r)?a.length:0;l--;){var _=a[l],T=_.func;if(T==null||T==e)return _.name}return r}function nf(e){var r=gr.call(b,"placeholder")?b:e;return r.placeholder}function Pt(){var e=b.iteratee||t0;return e=e===t0?Ff:e,arguments.length?e(arguments[0],arguments[1]):e}function c(e,r){var a=e.__data__;return rt(r)?a[typeof r=="string"?"string":"hash"]:a.map}function x(e){for(var r=Fn(e),a=r.length;a--;){var l=r[a],_=e[l];r[a]=[l,_,ye(_)]}return r}function C(e,r){var a=ml(e,r);return If(a)?a:i}function ie(e){var r=gr.call(e,oa),a=e[oa];try{e[oa]=i;var l=!0}catch{}var _=Un.call(e);return l&&(r?e[oa]=a:delete e[oa]),_}var pe=lo?function(e){return e==null?[]:(e=Ar(e),Di(lo(e),function(r){return on.call(e,r)}))}:i0,re=lo?function(e){for(var r=[];e;)Yi(r,pe(e)),e=so(e);return r}:i0,ae=Mn;(co&&ae(new co(new ArrayBuffer(1)))!=Er||Lf&&ae(new Lf)!=Ir||ho&&ae(ho.resolve())!=Nt||Pa&&ae(new Pa)!=Jr||Of&&ae(new Of)!=dn)&&(ae=function(e){var r=Mn(e),a=r==ar?e.constructor:i,l=a?pr(a):"";if(l)switch(l){case ec:return Er;case md:return Ir;case Vi:return Nt;case Al:return Jr;case Ga:return dn}return r});function De(e,r,a){for(var l=-1,_=a.length;++l<_;){var T=a[l],P=T.size;switch(T.type){case"drop":e+=P;break;case"dropRight":r-=P;break;case"take":r=Rn(r,e+P);break;case"takeRight":e=Xr(e,r-P);break}}return{start:e,end:r}}function Ae(e){var r=e.match(Ra);return r?r[1].split(Ca):[]}function Be(e,r,a){r=pi(r,e);for(var l=-1,_=r.length,T=!1;++l<_;){var P=Dr(r[l]);if(!(T=e!=null&&a(e,P)))break;e=e[P]}return T||++l!=_?T:(_=e==null?0:e.length,!!_&&Mc(_)&&V(P,_)&&(Jt(e)||Rs(e)))}function Ge(e){var r=e.length,a=new e.constructor(r);return r&&typeof e[0]=="string"&&gr.call(e,"index")&&(a.index=e.index,a.input=e.input),a}function Pe(e){return typeof e.constructor=="function"&&!pt(e)?Ya(so(e)):{}}function We(e,r,a){var l=e.constructor;switch(r){case Bn:return Ja(e);case Gt:case kt:return new l(+e);case Er:return Ts(e,a);case Dn:case Pn:case A:case Ue:case Xe:case dt:case z:case xe:case p:return Hf(e,a);case Ir:return new l;case Zr:case an:return new l(e);case An:return Es(e);case Jr:return new l;case w:return As(e)}}function Oe(e,r){var a=r.length;if(!a)return e;var l=a-1;return r[l]=(a>1?"& ":"")+r[l],r=r.join(a>2?", ":" "),e.replace(Ln,`{
|
|
20
18
|
/* [wrapped with `+r+`] */
|
|
21
|
-
`)}function ke(e){return Jt(e)||Ns(e)||!!(Cl&&e&&e[Cl])}function K(e,r){var o=typeof e;return r=r==null?Ze:r,!!r&&(o=="number"||o!="symbol"&&jh.test(e))&&e>-1&&e%1==0&&e<r}function oe(e,r,o){if(!rn(o))return!1;var c=typeof r;return(c=="number"?ui(o)&&K(r,o.length):c=="string"&&r in o)?oa(o[r],e):!1}function Oe(e,r){if(Jt(e))return!1;var o=typeof e;return o=="number"||o=="symbol"||o=="boolean"||e==null||Di(e)?!0:ur.test(e)||!mt.test(e)||r!=null&&e in Er(r)}function rt(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}function Se(e){var r=Gf(e),o=S[r];if(typeof o!="function"||!(r in cr.prototype))return!1;if(e===o)return!0;var c=au(o);return!!c&&e===c[0]}function Qe(e){return!!hs&&hs in e}var je=vf?_o:w0;function pt(e){var r=e&&e.constructor,o=typeof r=="function"&&r.prototype||Co;return e===o}function xe(e){return e===e&&!rn(e)}function ge(e,r){return function(o){return o==null?!1:o[e]===r&&(r!==i||e in Er(o))}}function lt(e){var r=zc(e,function(c){return o.size===I&&o.clear(),c}),o=r.cache;return r}function Ve(e,r){var o=e[1],c=r[1],_=o|c,L=_<(ue|x|J),z=c==J&&o==g||c==J&&o==Te&&e[7].length<=r[8]||c==(J|Te)&&r[7].length<=r[8]&&o==g;if(!(L||z))return e;c&ue&&(e[2]=r[2],_|=o&ue?0:A);var $=r[3];if($){var ie=e[3];e[3]=ie?Ta(ie,$,r[4]):$,e[4]=ie?ji(e[3],B):r[4]}return $=r[5],$&&(ie=e[5],e[5]=ie?Ql(ie,$,r[6]):$,e[6]=ie?ji(e[5],B):r[6]),$=r[7],$&&(e[7]=$),c&J&&(e[8]=e[8]==null?r[8]:In(e[8],r[8])),e[9]==null&&(e[9]=r[9]),e[0]=r[0],e[1]=_,e}function Me(e){var r=[];if(e!=null)for(var o in Er(e))r.push(o);return r}function $e(e){return Hn.call(e)}function qe(e,r,o){return r=qr(r===i?e.length-1:r,0),function(){for(var c=arguments,_=-1,L=qr(c.length-r,0),z=ve(L);++_<L;)z[_]=c[r+_];_=-1;for(var $=ve(r+1);++_<r;)$[_]=c[_];return $[r]=o(z),pn(e,this,$)}}function It(e,r){return r.length<2?e:xa(e,fi(r,0,-1))}function Lt(e,r){for(var o=e.length,c=In(r.length,o),_=kn(e);c--;){var L=r[c];e[c]=K(L,o)?_[L]:i}return e}function Ke(e,r){if(!(r==="constructor"&&typeof e[r]=="function")&&r!="__proto__")return e[r]}var Je=Ir(Cc),wt=Od||function(e,r){return Sn.setTimeout(e,r)},Ct=Ir(Oc);function Vt(e,r,o){var c=r+"";return Ct(e,Ce(c,Kr(De(c),o)))}function Ir(e){var r=0,o=0;return function(){var c=ma(),_=tt-(c-o);if(o=c,_>0){if(++r>=st)return arguments[0]}else r=0;return e.apply(i,arguments)}}function Lr(e,r){var o=-1,c=e.length,_=c-1;for(r=r===i?c:r;++o<r;){var L=Rf(o,_),z=e[L];e[L]=e[o],e[o]=z}return e.length=r,e}var Xt=lt(function(e){var r=[];return e.charCodeAt(0)===46&&r.push(""),e.replace(mi,function(o,c,_,L){r.push(_?L.replace(sn,"$1"):c||o)}),r});function Dr(e){if(typeof e=="string"||Di(e))return e;var r=e+"";return r=="0"&&1/e==-Ie?"-0":r}function pr(e){if(e!=null){try{return cs.call(e)}catch{}try{return e+""}catch{}}return""}function Kr(e,r){return An(br,function(o){var c="_."+o[0];r&o[1]&&!of(e,c)&&e.push(c)}),e.sort()}function jr(e){if(e instanceof cr)return e.clone();var r=new oi(e.__wrapped__,e.__chain__);return r.__actions__=kn(e.__actions__),r.__index__=e.__index__,r.__values__=e.__values__,r}function tn(e,r,o){(o?oe(e,r,o):r===i)?r=1:r=qr(nr(r),0);var c=e==null?0:e.length;if(!c||r<1)return[];for(var _=0,L=0,z=ve(pf(c/r));_<c;)z[L++]=fi(e,_,_+=r);return z}function un(e){for(var r=-1,o=e==null?0:e.length,c=0,_=[];++r<o;){var L=e[r];L&&(_[c++]=L)}return _}function gn(){var e=arguments.length;if(!e)return[];for(var r=ve(e-1),o=arguments[0],c=e;c--;)r[c-1]=arguments[c];return qi(Jt(o)?kn(o):[o],mn(r,1))}var Wr=rr(function(e,r){return cn(e)?Ja(e,mn(r,1,cn,!0)):[]}),Ut=rr(function(e,r){var o=Y(r);return cn(o)&&(o=i),cn(e)?Ja(e,mn(r,1,cn,!0),Bt(o,2)):[]}),yn=rr(function(e,r){var o=Y(r);return cn(o)&&(o=i),cn(e)?Ja(e,mn(r,1,cn,!0),i,o):[]});function hr(e,r,o){var c=e==null?0:e.length;return c?(r=o||r===i?1:nr(r),fi(e,r<0?0:r,c)):[]}function At(e,r,o){var c=e==null?0:e.length;return c?(r=o||r===i?1:nr(r),r=c-r,fi(e,0,r<0?0:r)):[]}function qt(e,r){return e&&e.length?ao(e,Bt(r,3),!0,!0):[]}function er(e,r){return e&&e.length?ao(e,Bt(r,3),!0):[]}function Vr(e,r,o,c){var _=e==null?0:e.length;return _?(o&&typeof o!="number"&&oe(e,r,o)&&(o=0,c=_),bc(e,r,o,c)):[]}function Ei(e,r,o){var c=e==null?0:e.length;if(!c)return-1;var _=o==null?0:nr(o);return _<0&&(_=qr(c+_,0)),To(e,Bt(r,3),_)}function Da(e,r,o){var c=e==null?0:e.length;if(!c)return-1;var _=c-1;return o!==i&&(_=nr(o),_=o<0?qr(c+_,0):In(_,c-1)),To(e,Bt(r,3),_,!0)}function k(e){var r=e==null?0:e.length;return r?mn(e,1):[]}function le(e){var r=e==null?0:e.length;return r?mn(e,Ie):[]}function ne(e,r){var o=e==null?0:e.length;return o?(r=r===i?1:nr(r),mn(e,r)):[]}function ft(e){for(var r=-1,o=e==null?0:e.length,c={};++r<o;){var _=e[r];c[_[0]]=_[1]}return c}function zt(e){return e&&e.length?e[0]:i}function R(e,r,o){var c=e==null?0:e.length;if(!c)return-1;var _=o==null?0:nr(o);return _<0&&(_=qr(c+_,0)),Ki(e,r,_)}function y(e){var r=e==null?0:e.length;return r?fi(e,0,-1):[]}var H=rr(function(e){var r=Br(e,Vo);return r.length&&r[0]===e[0]?As(r):[]}),j=rr(function(e){var r=Y(e),o=Br(e,Vo);return r===Y(o)?r=i:o.pop(),o.length&&o[0]===e[0]?As(o,Bt(r,2)):[]}),Q=rr(function(e){var r=Y(e),o=Br(e,Vo);return r=typeof r=="function"?r:i,r&&o.pop(),o.length&&o[0]===e[0]?As(o,i,r):[]});function W(e,r){return e==null?"":cc.call(e,r)}function Y(e){var r=e==null?0:e.length;return r?e[r-1]:i}function X(e,r,o){var c=e==null?0:e.length;if(!c)return-1;var _=c;return o!==i&&(_=nr(o),_=_<0?qr(c+_,0):In(_,c-1)),r===r?El(e,r,_):To(e,ff,_,!0)}function O(e,r){return e&&e.length?Yo(e,nr(r)):i}var N=rr(M);function M(e,r){return e&&e.length&&r&&r.length?Zl(e,r):e}function re(e,r,o){return e&&e.length&&r&&r.length?Zl(e,r,Bt(o,2)):e}function ee(e,r,o){return e&&e.length&&r&&r.length?Zl(e,r,i,o):e}var _e=Ni(function(e,r){var o=e==null?0:e.length,c=ya(e,r);return Lc(e,Br(r,function(_){return K(_,o)?+_:_}).sort(Ff)),c});function be(e,r){var o=[];if(!(e&&e.length))return o;var c=-1,_=[],L=e.length;for(r=Bt(r,3);++c<L;){var z=e[c];r(z,c,e)&&(o.push(z),_.push(c))}return Lc(e,_),o}function Ye(e){return e==null?e:hc.call(e)}function Dt(e,r,o){var c=e==null?0:e.length;return c?(o&&typeof o!="number"&&oe(e,r,o)?(r=0,o=c):(r=r==null?0:nr(r),o=o===i?c:nr(o)),fi(e,r,o)):[]}function yt(e,r){return Of(e,r)}function ot(e,r,o){return ql(e,r,Bt(o,2))}function Ae(e,r){var o=e==null?0:e.length;if(o){var c=Of(e,r);if(c<o&&oa(e[c],r))return c}return-1}function he(e,r){return Of(e,r,!0)}function ht(e,r,o){return ql(e,r,Bt(o,2),!0)}function ct(e,r){var o=e==null?0:e.length;if(o){var c=Of(e,r,!0)-1;if(oa(e[c],r))return c}return-1}function Tt(e){return e&&e.length?Ic(e):[]}function vr(e,r){return e&&e.length?Ic(e,Bt(r,2)):[]}function xn(e){var r=e==null?0:e.length;return r?fi(e,1,r):[]}function co(e,r,o){return e&&e.length?(r=o||r===i?1:nr(r),fi(e,0,r<0?0:r)):[]}function aa(e,r,o){var c=e==null?0:e.length;return c?(r=o||r===i?1:nr(r),r=c-r,fi(e,r<0?0:r,c)):[]}function Bi(e,r){return e&&e.length?ao(e,Bt(r,3),!1,!0):[]}function La(e,r){return e&&e.length?ao(e,Bt(r,3)):[]}var ho=rr(function(e){return Aa(mn(e,1,cn,!0))}),Bc=rr(function(e){var r=Y(e);return cn(r)&&(r=i),Aa(mn(e,1,cn,!0),Bt(r,2))}),Jn=rr(function(e){var r=Y(e);return r=typeof r=="function"?r:i,Aa(mn(e,1,cn,!0),i,r)});function vo(e){return e&&e.length?Aa(e):[]}function li(e,r){return e&&e.length?Aa(e,Bt(r,2)):[]}function Gc(e,r){return r=typeof r=="function"?r:i,e&&e.length?Aa(e,i,r):[]}function Pn(e){if(!(e&&e.length))return[];var r=0;return e=Fi(e,function(o){if(cn(o))return r=qr(o.length,r),!0}),xl(r,function(o){return Br(e,Ha(o))})}function Ps(e,r){if(!(e&&e.length))return[];var o=Pn(e);return r==null?o:Br(o,function(c){return pn(r,i,c)})}var Uf=rr(function(e,r){return cn(e)?Ja(e,r):[]}),kb=rr(function(e){return Wo(Fi(e,cn))}),Pb=rr(function(e){var r=Y(e);return cn(r)&&(r=i),Wo(Fi(e,cn),Bt(r,2))}),Nb=rr(function(e){var r=Y(e);return r=typeof r=="function"?r:i,Wo(Fi(e,cn),i,r)}),Bb=rr(Pn);function Gb(e,r){return Mf(e||[],r||[],ys)}function Ub(e,r){return Mf(e||[],r||[],Ds)}var Yb=rr(function(e){var r=e.length,o=r>1?e[r-1]:i;return o=typeof o=="function"?(e.pop(),o):i,Ps(e,o)});function x_(e){var r=S(e);return r.__chain__=!0,r}function Hb(e,r){return r(e),e}function Uc(e,r){return r(e)}var zb=Ni(function(e){var r=e.length,o=r?e[0]:0,c=this.__wrapped__,_=function(L){return ya(L,e)};return r>1||this.__actions__.length||!(c instanceof cr)||!K(o)?this.thru(_):(c=c.slice(o,+o+(r?1:0)),c.__actions__.push({func:Uc,args:[_],thisArg:i}),new oi(c,this.__chain__).thru(function(L){return r&&!L.length&&L.push(i),L}))});function Wb(){return x_(this)}function Vb(){return new oi(this.value(),this.__chain__)}function $b(){this.__values__===i&&(this.__values__=F_(this.value()));var e=this.__index__>=this.__values__.length,r=e?i:this.__values__[this.__index__++];return{done:e,value:r}}function Zb(){return this}function Xb(e){for(var r,o=this;o instanceof gs;){var c=jr(o);c.__index__=0,c.__values__=i,r?_.__wrapped__=c:r=c;var _=c;o=o.__wrapped__}return _.__wrapped__=e,r}function qb(){var e=this.__wrapped__;if(e instanceof cr){var r=e;return this.__actions__.length&&(r=new cr(this)),r=r.reverse(),r.__actions__.push({func:Uc,args:[Ye],thisArg:i}),new oi(r,this.__chain__)}return this.thru(Ye)}function Kb(){return Ls(this.__wrapped__,this.__actions__)}var jb=Ti(function(e,r,o){gr.call(e,o)?++e[o]:Xn(e,o,1)});function Qb(e,r,o){var c=Jt(e)?da:Bl;return o&&oe(e,r,o)&&(r=i),c(e,Bt(r,3))}function Jb(e,r){var o=Jt(e)?Fi:Gl;return o(e,Bt(r,3))}var e2=fo(Ei),t2=fo(Da);function r2(e,r){return mn(Yc(e,r),1)}function n2(e,r){return mn(Yc(e,r),Ie)}function i2(e,r,o){return o=o===i?1:nr(o),mn(Yc(e,r),o)}function b_(e,r){var o=Jt(e)?An:ki;return o(e,Bt(r,3))}function w_(e,r){var o=Jt(e)?rc:Af;return o(e,Bt(r,3))}var a2=Ti(function(e,r,o){gr.call(e,o)?e[o].push(r):Xn(e,o,[r])});function o2(e,r,o,c){e=ui(e)?e:Hf(e),o=o&&!c?nr(o):0;var _=e.length;return o<0&&(o=qr(_+o,0)),$c(e)?o<=_&&e.indexOf(r,o)>-1:!!_&&Ki(e,r,o)>-1}var s2=rr(function(e,r,o){var c=-1,_=typeof r=="function",L=ui(e)?ve(e.length):[];return ki(e,function(z){L[++c]=_?pn(r,z,o):to(z,r,o)}),L}),f2=Ti(function(e,r,o){Xn(e,o,r)});function Yc(e,r){var o=Jt(e)?Br:ba;return o(e,Bt(r,3))}function l2(e,r,o,c){return e==null?[]:(Jt(r)||(r=r==null?[]:[r]),o=c?i:o,Jt(o)||(o=o==null?[]:[o]),Lf(e,r,o))}var u2=Ti(function(e,r,o){e[o?0:1].push(r)},function(){return[[],[]]});function c2(e,r,o){var c=Jt(e)?ml:gl,_=arguments.length<3;return c(e,Bt(r,4),o,_,ki)}function h2(e,r,o){var c=Jt(e)?yd:gl,_=arguments.length<3;return c(e,Bt(r,4),o,_,Af)}function d2(e,r){var o=Jt(e)?Fi:Gl;return o(e,Wc(Bt(r,3)))}function v2(e){var r=Jt(e)?yc:zo;return r(e)}function _2(e,r,o){(o?oe(e,r,o):r===i)?r=1:r=nr(r);var c=Jt(e)?jd:Xl;return c(e,r)}function p2(e){var r=Jt(e)?Qd:t0;return r(e)}function m2(e){if(e==null)return 0;if(ui(e))return $c(e)?_a(e):e.length;var r=fe(e);return r==Fr||r==en?e.size:ra(e).length}function g2(e,r,o){var c=Jt(e)?sf:r0;return o&&oe(e,r,o)&&(r=i),c(e,Bt(r,3))}var y2=rr(function(e,r){if(e==null)return[];var o=r.length;return o>1&&oe(e,r[0],r[1])?r=[]:o>2&&oe(r[0],r[1],r[2])&&(r=[r[0]]),Lf(e,mn(r,1),[])}),Hc=Cd||function(){return Sn.Date.now()};function x2(e,r){if(typeof r!="function")throw new ai(l);return e=nr(e),function(){if(--e<1)return r.apply(this,arguments)}}function S_(e,r,o){return r=o?i:r,r=e&&r==null?e.length:r,ia(e,J,i,i,i,i,r)}function A_(e,r){var o;if(typeof r!="function")throw new ai(l);return e=nr(e),function(){return--e>0&&(o=r.apply(this,arguments)),e<=1&&(r=i),o}}var u0=rr(function(e,r,o){var c=ue;if(o.length){var _=ji(o,uo(u0));c|=P}return ia(e,c,r,o,_)}),T_=rr(function(e,r,o){var c=ue|x;if(o.length){var _=ji(o,uo(T_));c|=P}return ia(r,c,e,o,_)});function E_(e,r,o){r=o?i:r;var c=ia(e,g,i,i,i,i,i,r);return c.placeholder=E_.placeholder,c}function D_(e,r,o){r=o?i:r;var c=ia(e,b,i,i,i,i,i,r);return c.placeholder=D_.placeholder,c}function L_(e,r,o){var c,_,L,z,$,ie,Fe=0,Pe=!1,ze=!1,vt=!0;if(typeof e!="function")throw new ai(l);r=Gi(r)||0,rn(o)&&(Pe=!!o.leading,ze="maxWait"in o,L=ze?qr(Gi(o.maxWait)||0,r):L,vt="trailing"in o?!!o.trailing:vt);function Rt(hn){var sa=c,mo=_;return c=_=i,Fe=hn,z=e.apply(mo,sa),z}function Yt(hn){return Fe=hn,$=wt(_r,r),Pe?Rt(hn):z}function or(hn){var sa=hn-ie,mo=hn-Fe,Z_=r-sa;return ze?In(Z_,L-mo):Z_}function Ht(hn){var sa=hn-ie,mo=hn-Fe;return ie===i||sa>=r||sa<0||ze&&mo>=L}function _r(){var hn=Hc();if(Ht(hn))return yr(hn);$=wt(_r,or(hn))}function yr(hn){return $=i,vt&&c?Rt(hn):(c=_=i,z)}function Li(){$!==i&&Rs($),Fe=0,c=ie=_=$=i}function ei(){return $===i?z:yr(Hc())}function Ri(){var hn=Hc(),sa=Ht(hn);if(c=arguments,_=this,ie=hn,sa){if($===i)return Yt(ie);if(ze)return Rs($),$=wt(_r,r),Rt(ie)}return $===i&&($=wt(_r,r)),z}return Ri.cancel=Li,Ri.flush=ei,Ri}var b2=rr(function(e,r){return Sf(e,1,r)}),w2=rr(function(e,r,o){return Sf(e,Gi(r)||0,o)});function S2(e){return ia(e,nt)}function zc(e,r){if(typeof e!="function"||r!=null&&typeof r!="function")throw new ai(l);var o=function(){var c=arguments,_=r?r.apply(this,c):c[0],L=o.cache;if(L.has(_))return L.get(_);var z=e.apply(this,c);return o.cache=L.set(_,z)||L,z};return o.cache=new(zc.Cache||ea),o}zc.Cache=ea;function Wc(e){if(typeof e!="function")throw new ai(l);return function(){var r=arguments;switch(r.length){case 0:return!e.call(this);case 1:return!e.call(this,r[0]);case 2:return!e.call(this,r[0],r[1]);case 3:return!e.call(this,r[0],r[1],r[2])}return!e.apply(this,r)}}function A2(e){return A_(2,e)}var T2=jl(function(e,r){r=r.length==1&&Jt(r[0])?Br(r[0],jn(Bt())):Br(mn(r,1),jn(Bt()));var o=r.length;return rr(function(c){for(var _=-1,L=In(c.length,o);++_<L;)c[_]=r[_].call(this,c[_]);return pn(e,this,c)})}),c0=rr(function(e,r){var o=ji(r,uo(c0));return ia(e,P,i,r,o)}),R_=rr(function(e,r){var o=ji(r,uo(R_));return ia(e,F,i,r,o)}),E2=Ni(function(e,r){return ia(e,Te,i,i,i,r)});function D2(e,r){if(typeof e!="function")throw new ai(l);return r=r===i?r:nr(r),rr(e,r)}function L2(e,r){if(typeof e!="function")throw new ai(l);return r=r==null?0:qr(nr(r),0),rr(function(o){var c=o[r],_=Ai(o,0,r);return c&&qi(_,c),pn(e,this,_)})}function R2(e,r,o){var c=!0,_=!0;if(typeof e!="function")throw new ai(l);return rn(o)&&(c="leading"in o?!!o.leading:c,_="trailing"in o?!!o.trailing:_),L_(e,r,{leading:c,maxWait:r,trailing:_})}function C2(e){return S_(e,1)}function O2(e,r){return c0($o(r),e)}function I2(){if(!arguments.length)return[];var e=arguments[0];return Jt(e)?e:[e]}function M2(e){return Tn(e,q)}function F2(e,r){return r=typeof r=="function"?r:i,Tn(e,q,r)}function k2(e){return Tn(e,p|q)}function P2(e,r){return r=typeof r=="function"?r:i,Tn(e,p|q,r)}function N2(e,r){return r==null||Qa(e,r,Nn(r))}function oa(e,r){return e===r||e!==e&&r!==r}var B2=En(Ss),G2=En(function(e,r){return e>=r}),Ns=zl(function(){return arguments}())?zl:function(e){return nn(e)&&gr.call(e,"callee")&&!ln.call(e,"callee")},Jt=ve.isArray,U2=ju?jn(ju):Tc;function ui(e){return e!=null&&Vc(e.length)&&!_o(e)}function cn(e){return nn(e)&&ui(e)}function Y2(e){return e===!0||e===!1||nn(e)&&Fn(e)==Gt}var qo=Id||w0,H2=Xi?jn(Xi):Wl;function z2(e){return nn(e)&&e.nodeType===1&&!ou(e)}function W2(e){if(e==null)return!0;if(ui(e)&&(Jt(e)||typeof e=="string"||typeof e.splice=="function"||qo(e)||Yf(e)||Ns(e)))return!e.length;var r=fe(e);if(r==Fr||r==en)return!e.size;if(pt(e))return!ra(e).length;for(var o in e)if(gr.call(e,o))return!1;return!0}function V2(e,r){return Bo(e,r)}function $2(e,r,o){o=typeof o=="function"?o:i;var c=o?o(e,r):i;return c===i?Bo(e,r,i,o):!!c}function h0(e){if(!nn(e))return!1;var r=Fn(e);return r==Qr||r==dn||typeof e.message=="string"&&typeof e.name=="string"&&!ou(e)}function Z2(e){return typeof e=="number"&&Ol(e)}function _o(e){if(!rn(e))return!1;var r=Fn(e);return r==kt||r==Nr||r==wr||r==Dn}function C_(e){return typeof e=="number"&&e==nr(e)}function Vc(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ze}function rn(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}function nn(e){return e!=null&&typeof e=="object"}var O_=Qu?jn(Qu):Vl;function X2(e,r){return e===r||Ts(e,r,T(r))}function q2(e,r,o){return o=typeof o=="function"?o:i,Ts(e,r,T(r),o)}function K2(e){return I_(e)&&e!=+e}function j2(e){if(je(e))throw new Zt(s);return Go(e)}function Q2(e){return e===null}function J2(e){return e==null}function I_(e){return typeof e=="number"||nn(e)&&Fn(e)==Xr}function ou(e){if(!nn(e)||Fn(e)!=ar)return!1;var r=_f(e);if(r===null)return!0;var o=gr.call(r,"constructor")&&r.constructor;return typeof o=="function"&&o instanceof o&&cs.call(o)==Oo}var d0=Ju?jn(Ju):Dc;function ew(e){return C_(e)&&e>=-Ze&&e<=Ze}var M_=Ao?jn(Ao):Ef;function $c(e){return typeof e=="string"||!Jt(e)&&nn(e)&&Fn(e)==on}function Di(e){return typeof e=="symbol"||nn(e)&&Fn(e)==E}var Yf=ec?jn(ec):ta;function tw(e){return e===i}function rw(e){return nn(e)&&fe(e)==vn}function nw(e){return nn(e)&&Fn(e)==Zi}var iw=En(ro),aw=En(function(e,r){return e<=r});function F_(e){if(!e)return[];if(ui(e))return $c(e)?Yn(e):kn(e);if(xi&&e[xi])return oc(e[xi]());var r=fe(e),o=r==Fr?hf:r==en?us:Hf;return o(e)}function po(e){if(!e)return e===0?e:0;if(e=Gi(e),e===Ie||e===-Ie){var r=e<0?-1:1;return r*St}return e===e?e:0}function nr(e){var r=po(e),o=r%1;return r===r?o?r-o:r:0}function k_(e){return e?ja(nr(e),0,Wt):0}function Gi(e){if(typeof e=="number")return e;if(Di(e))return $t;if(rn(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=rn(r)?r+"":r}if(typeof e!="string")return e===0?e:+e;e=ic(e);var o=Xh.test(e);return o||Kh.test(e)?af(e.slice(2),o?2:8):js.test(e)?$t:+e}function P_(e){return Pi(e,ci(e))}function ow(e){return e?ja(nr(e),-Ze,Ze):e===0?e:0}function Rr(e){return e==null?"":Qn(e)}var sw=so(function(e,r){if(pt(r)||ui(r)){Pi(r,Nn(r),e);return}for(var o in r)gr.call(r,o)&&ys(e,o,r[o])}),N_=so(function(e,r){Pi(r,ci(r),e)}),Zc=so(function(e,r,o,c){Pi(r,ci(r),e,c)}),fw=so(function(e,r,o,c){Pi(r,Nn(r),e,c)}),lw=Ni(ya);function uw(e,r){var o=Xa(e);return r==null?o:xs(o,r)}var cw=rr(function(e,r){e=Er(e);var o=-1,c=r.length,_=c>2?r[2]:i;for(_&&oe(r[0],r[1],_)&&(c=1);++o<c;)for(var L=r[o],z=ci(L),$=-1,ie=z.length;++$<ie;){var Fe=z[$],Pe=e[Fe];(Pe===i||oa(Pe,Co[Fe])&&!gr.call(e,Fe))&&(e[Fe]=L[Fe])}return e}),hw=rr(function(e){return e.push(i,Pc),pn(B_,i,e)});function dw(e,r){return yi(e,Bt(r,3),si)}function vw(e,r){return yi(e,Bt(r,3),bs)}function _w(e,r){return e==null?e:Tf(e,Bt(r,3),ci)}function pw(e,r){return e==null?e:Ul(e,Bt(r,3),ci)}function mw(e,r){return e&&si(e,Bt(r,3))}function gw(e,r){return e&&bs(e,Bt(r,3))}function yw(e){return e==null?[]:ws(e,Nn(e))}function xw(e){return e==null?[]:ws(e,ci(e))}function v0(e,r,o){var c=e==null?i:xa(e,r);return c===i?o:c}function bw(e,r){return e!=null&&Ne(e,r,wc)}function _0(e,r){return e!=null&&Ne(e,r,Sc)}var ww=kf(function(e,r,o){r!=null&&typeof r.toString!="function"&&(r=Hn.call(r)),e[r]=o},m0(hi)),Sw=kf(function(e,r,o){r!=null&&typeof r.toString!="function"&&(r=Hn.call(r)),gr.call(e,r)?e[r].push(o):e[r]=[o]},Bt),Aw=rr(to);function Nn(e){return ui(e)?Pl(e):ra(e)}function ci(e){return ui(e)?Pl(e,!0):Es(e)}function Tw(e,r){var o={};return r=Bt(r,3),si(e,function(c,_,L){Xn(o,r(c,_,L),c)}),o}function Ew(e,r){var o={};return r=Bt(r,3),si(e,function(c,_,L){Xn(o,_,r(c,_,L))}),o}var Dw=so(function(e,r,o){no(e,r,o)}),B_=so(function(e,r,o,c){no(e,r,o,c)}),Lw=Ni(function(e,r){var o={};if(e==null)return o;var c=!1;r=Br(r,function(L){return L=Si(L,e),c||(c=L.length>1),L}),Pi(e,Bf(e),o),c&&(o=Tn(o,p|U|q,s0));for(var _=r.length;_--;)Kl(o,r[_]);return o});function Rw(e,r){return G_(e,Wc(Bt(r)))}var Cw=Ni(function(e,r){return e==null?{}:$l(e,r)});function G_(e,r){if(e==null)return{};var o=Br(Bf(e),function(c){return[c]});return r=Bt(r),io(e,o,function(c,_){return r(c,_[0])})}function Ow(e,r,o){r=Si(r,e);var c=-1,_=r.length;for(_||(_=1,e=i);++c<_;){var L=e==null?i:e[Dr(r[c])];L===i&&(c=_,L=o),e=_o(L)?L.call(e):L}return e}function Iw(e,r,o){return e==null?e:Ds(e,r,o)}function Mw(e,r,o,c){return c=typeof c=="function"?c:i,e==null?e:Ds(e,r,o,c)}var U_=kc(Nn),Y_=kc(ci);function Fw(e,r,o){var c=Jt(e),_=c||qo(e)||Yf(e);if(r=Bt(r,4),o==null){var L=e&&e.constructor;_?o=c?new L:[]:rn(e)?o=_o(L)?Xa(_f(e)):{}:o={}}return(_?An:si)(e,function(z,$,ie){return r(o,z,$,ie)}),o}function kw(e,r){return e==null?!0:Kl(e,r)}function Pw(e,r,o){return e==null?e:If(e,r,$o(o))}function Nw(e,r,o,c){return c=typeof c=="function"?c:i,e==null?e:If(e,r,$o(o),c)}function Hf(e){return e==null?[]:ls(e,Nn(e))}function Bw(e){return e==null?[]:ls(e,ci(e))}function Gw(e,r,o){return o===i&&(o=r,r=i),o!==i&&(o=Gi(o),o=o===o?o:0),r!==i&&(r=Gi(r),r=r===r?r:0),ja(Gi(e),r,o)}function Uw(e,r,o){return r=po(r),o===i?(o=r,r=0):o=po(o),e=Gi(e),Hl(e,r,o)}function Yw(e,r,o){if(o&&typeof o!="boolean"&&oe(e,r,o)&&(r=o=i),o===i&&(typeof r=="boolean"?(o=r,r=i):typeof e=="boolean"&&(o=e,e=i)),e===i&&r===i?(e=0,r=1):(e=po(e),r===i?(r=e,e=0):r=po(r)),e>r){var c=e;e=r,r=c}if(o||e%1||r%1){var _=Il();return In(e+_*(r-e+ha("1e-"+((_+"").length-1))),r)}return Rf(e,r)}var Hw=Xo(function(e,r,o){return r=r.toLowerCase(),e+(o?H_(r):r)});function H_(e){return p0(Rr(e).toLowerCase())}function z_(e){return e=Rr(e),e&&e.replace(Qh,bl).replace(vd,"")}function zw(e,r,o){e=Rr(e),r=Qn(r);var c=e.length;o=o===i?c:ja(nr(o),0,c);var _=o;return o-=r.length,o>=0&&e.slice(o,_)==r}function Ww(e){return e=Rr(e),e&&V.test(e)?e.replace(ye,wl):e}function Vw(e){return e=Rr(e),e&&dr.test(e)?e.replace(kr,"\\$&"):e}var $w=Xo(function(e,r,o){return e+(o?"-":"")+r.toLowerCase()}),Zw=Xo(function(e,r,o){return e+(o?" ":"")+r.toLowerCase()}),Xw=tu("toLowerCase");function qw(e,r,o){e=Rr(e),r=nr(r);var c=r?_a(e):0;if(!r||c>=r)return e;var _=(r-c)/2;return Hr(Io(_),o)+e+Hr(pf(_),o)}function Kw(e,r,o){e=Rr(e),r=nr(r);var c=r?_a(e):0;return r&&c<r?e+Hr(r-c,o):e}function jw(e,r,o){e=Rr(e),r=nr(r);var c=r?_a(e):0;return r&&c<r?Hr(r-c,o)+e:e}function Qw(e,r,o){return o||r==null?r=0:r&&(r=+r),gf(Rr(e).replace(Yr,""),r||0)}function Jw(e,r,o){return(o?oe(e,r,o):r===i)?r=1:r=nr(r),Cf(Rr(e),r)}function eS(){var e=arguments,r=Rr(e[0]);return e.length<3?r:r.replace(e[1],e[2])}var tS=Xo(function(e,r,o){return e+(o?"_":"")+r.toLowerCase()});function rS(e,r,o){return o&&typeof o!="number"&&oe(e,r,o)&&(r=o=i),o=o===i?Wt:o>>>0,o?(e=Rr(e),e&&(typeof r=="string"||r!=null&&!d0(r))&&(r=Qn(r),!r&&za(e))?Ai(Yn(e),0,o):e.split(r,o)):[]}var nS=Xo(function(e,r,o){return e+(o?" ":"")+p0(r)});function iS(e,r,o){return e=Rr(e),o=o==null?0:ja(nr(o),0,e.length),r=Qn(r),e.slice(o,o+r.length)==r}function aS(e,r,o){var c=S.templateSettings;o&&oe(e,r,o)&&(r=i),e=Rr(e),r=Zc({},r,c,iu);var _=Zc({},r.imports,c.imports,iu),L=Nn(_),z=ls(_,L),$,ie,Fe=0,Pe=r.interpolate||Qs,ze="__p += '",vt=Ll((r.escape||Qs).source+"|"+Pe.source+"|"+(Pe===at?gi:Qs).source+"|"+(r.evaluate||Qs).source+"|$","g"),Rt="//# sourceURL="+(gr.call(r,"sourceURL")?(r.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++nf+"]")+`
|
|
22
|
-
`;e.replace(vt,function(Ht,
|
|
23
|
-
__e(`+
|
|
24
|
-
'`),
|
|
25
|
-
`+
|
|
19
|
+
`)}function Fe(e){return Jt(e)||Rs(e)||!!(Sl&&e&&e[Sl])}function V(e,r){var a=typeof e;return r=r==null?Ze:r,!!r&&(a=="number"||a!="symbol"&&Ih.test(e))&&e>-1&&e%1==0&&e<r}function ne(e,r,a){if(!tn(a))return!1;var l=typeof r;return(l=="number"?ai(a)&&V(r,a.length):l=="string"&&r in a)?Qi(a[r],e):!1}function Re(e,r){if(Jt(e))return!1;var a=typeof e;return a=="number"||a=="symbol"||a=="boolean"||e==null||bi(e)?!0:lr.test(e)||!mt.test(e)||r!=null&&e in Ar(r)}function rt(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}function Se(e){var r=Mo(e),a=b[r];if(typeof a!="function"||!(r in ur.prototype))return!1;if(e===a)return!0;var l=Ql(a);return!!l&&e===l[0]}function Qe(e){return!!as&&as in e}var je=fo?of:a0;function pt(e){var r=e&&e.constructor,a=typeof r=="function"&&r.prototype||Ef;return e===a}function ye(e){return e===e&&!tn(e)}function me(e,r){return function(a){return a==null?!1:a[e]===r&&(r!==i||e in Ar(a))}}function ot(e){var r=Rc(e,function(l){return a.size===M&&a.clear(),l}),a=r.cache;return r}function Ve(e,r){var a=e[1],l=r[1],_=a|l,T=_<(se|I|ee),P=l==ee&&a==te||l==ee&&a==Ce&&e[7].length<=r[8]||l==(ee|Ce)&&r[7].length<=r[8]&&a==te;if(!(T||P))return e;l&se&&(e[2]=r[2],_|=a&se?0:U);var H=r[3];if(H){var J=e[3];e[3]=J?ma(J,H,r[4]):H,e[4]=J?zi(e[3],k):r[4]}return H=r[5],H&&(J=e[5],e[5]=J?Vl(J,H,r[6]):H,e[6]=J?zi(e[5],k):r[6]),H=r[7],H&&(e[7]=H),l&ee&&(e[8]=e[8]==null?r[8]:Rn(e[8],r[8])),e[9]==null&&(e[9]=r[9]),e[0]=r[0],e[1]=_,e}function ke(e){var r=[];if(e!=null)for(var a in Ar(e))r.push(a);return r}function $e(e){return Un.call(e)}function qe(e,r,a){return r=Xr(r===i?e.length-1:r,0),function(){for(var l=arguments,_=-1,T=Xr(l.length-r,0),P=he(T);++_<T;)P[_]=l[r+_];_=-1;for(var H=he(r+1);++_<r;)H[_]=l[_];return H[r]=a(P),_n(e,this,H)}}function Mt(e,r){return r.length<2?e:ha(e,ni(r,0,-1))}function Lt(e,r){for(var a=e.length,l=Rn(r.length,a),_=kn(e);l--;){var T=r[l];e[l]=V(T,a)?_[T]:i}return e}function Ke(e,r){if(!(r==="constructor"&&typeof e[r]=="function")&&r!="__proto__")return e[r]}var Je=Mr(mc),wt=vd||function(e,r){return xn.setTimeout(e,r)},Rt=Mr(gc);function Vt(e,r,a){var l=r+"";return Rt(e,Oe(l,qr(Ae(l),a)))}function Mr(e){var r=0,a=0;return function(){var l=la(),_=tt-(l-a);if(a=l,_>0){if(++r>=ft)return arguments[0]}else r=0;return e.apply(i,arguments)}}function Lr(e,r){var a=-1,l=e.length,_=l-1;for(r=r===i?l:r;++a<r;){var T=wo(a,_),P=e[T];e[T]=e[a],e[a]=P}return e.length=r,e}var Xt=ot(function(e){var r=[];return e.charCodeAt(0)===46&&r.push(""),e.replace(ui,function(a,l,_,T){r.push(_?T.replace(fn,"$1"):l||a)}),r});function Dr(e){if(typeof e=="string"||bi(e))return e;var r=e+"";return r=="0"&&1/e==-Me?"-0":r}function pr(e){if(e!=null){try{return is.call(e)}catch{}try{return e+""}catch{}}return""}function qr(e,r){return wn(xr,function(a){var l="_."+a[0];r&a[1]&&!Qs(e,l)&&e.push(l)}),e.sort()}function Kr(e){if(e instanceof ur)return e.clone();var r=new ti(e.__wrapped__,e.__chain__);return r.__actions__=kn(e.__actions__),r.__index__=e.__index__,r.__values__=e.__values__,r}function en(e,r,a){(a?ne(e,r,a):r===i)?r=1:r=Xr(nr(r),0);var l=e==null?0:e.length;if(!l||r<1)return[];for(var _=0,T=0,P=he(oo(l/r));_<l;)P[T++]=ni(e,_,_+=r);return P}function ln(e){for(var r=-1,a=e==null?0:e.length,l=0,_=[];++r<a;){var T=e[r];T&&(_[l++]=T)}return _}function mn(){var e=arguments.length;if(!e)return[];for(var r=he(e-1),a=arguments[0],l=e;l--;)r[l-1]=arguments[l];return Yi(Jt(a)?kn(a):[a],pn(r,1))}var Wr=rr(function(e,r){return un(e)?$a(e,pn(r,1,un,!0)):[]}),Ut=rr(function(e,r){var a=N(r);return un(a)&&(a=i),un(e)?$a(e,pn(r,1,un,!0),Pt(a,2)):[]}),gn=rr(function(e,r){var a=N(r);return un(a)&&(a=i),un(e)?$a(e,pn(r,1,un,!0),i,a):[]});function cr(e,r,a){var l=e==null?0:e.length;return l?(r=a||r===i?1:nr(r),ni(e,r<0?0:r,l)):[]}function Tt(e,r,a){var l=e==null?0:e.length;return l?(r=a||r===i?1:nr(r),r=l-r,ni(e,0,r<0?0:r)):[]}function qt(e,r){return e&&e.length?Qa(e,Pt(r,3),!0,!0):[]}function er(e,r){return e&&e.length?Qa(e,Pt(r,3),!0):[]}function Vr(e,r,a,l){var _=e==null?0:e.length;return _?(a&&typeof a!="number"&&ne(e,r,a)&&(a=0,l=_),oc(e,r,a,l)):[]}function yi(e,r,a){var l=e==null?0:e.length;if(!l)return-1;var _=a==null?0:nr(a);return _<0&&(_=Xr(l+_,0)),bf(e,Pt(r,3),_)}function ya(e,r,a){var l=e==null?0:e.length;if(!l)return-1;var _=l-1;return a!==i&&(_=nr(a),_=a<0?Xr(l+_,0):Rn(_,l-1)),bf(e,Pt(r,3),_,!0)}function O(e){var r=e==null?0:e.length;return r?pn(e,1):[]}function fe(e){var r=e==null?0:e.length;return r?pn(e,Me):[]}function Q(e,r){var a=e==null?0:e.length;return a?(r=r===i?1:nr(r),pn(e,r)):[]}function st(e){for(var r=-1,a=e==null?0:e.length,l={};++r<a;){var _=e[r];l[_[0]]=_[1]}return l}function zt(e){return e&&e.length?e[0]:i}function E(e,r,a){var l=e==null?0:e.length;if(!l)return-1;var _=a==null?0:nr(a);return _<0&&(_=Xr(l+_,0)),Hi(e,r,_)}function m(e){var r=e==null?0:e.length;return r?ni(e,0,-1):[]}var B=rr(function(e){var r=Pr(e,Uf);return r.length&&r[0]===e[0]?ms(r):[]}),Z=rr(function(e){var r=N(e),a=Pr(e,Uf);return r===N(a)?r=i:a.pop(),a.length&&a[0]===e[0]?ms(a,Pt(r,2)):[]}),X=rr(function(e){var r=N(e),a=Pr(e,Uf);return r=typeof r=="function"?r:i,r&&a.pop(),a.length&&a[0]===e[0]?ms(a,i,r):[]});function G(e,r){return e==null?"":Qu.call(e,r)}function N(e){var r=e==null?0:e.length;return r?e[r-1]:i}function W(e,r,a){var l=e==null?0:e.length;if(!l)return-1;var _=l;return a!==i&&(_=nr(a),_=_<0?Xr(l+_,0):Rn(_,l-1)),r===r?yl(e,r,_):bf(e,eo,_,!0)}function D(e,r){return e&&e.length?Nf(e,nr(r)):i}var R=rr(L);function L(e,r){return e&&e.length&&r&&r.length?Ul(e,r):e}function j(e,r,a){return e&&e.length&&r&&r.length?Ul(e,r,Pt(a,2)):e}function q(e,r,a){return e&&e.length&&r&&r.length?Ul(e,r,i,a):e}var ve=Ri(function(e,r){var a=e==null?0:e.length,l=ca(e,r);return _c(e,Pr(r,function(_){return V(_,a)?+_:_}).sort(Do)),l});function be(e,r){var a=[];if(!(e&&e.length))return a;var l=-1,_=[],T=e.length;for(r=Pt(r,3);++l<T;){var P=e[l];r(P,l,e)&&(a.push(P),_.push(l))}return _c(e,_),a}function Ye(e){return e==null?e:Ju.call(e)}function Dt(e,r,a){var l=e==null?0:e.length;return l?(a&&typeof a!="number"&&ne(e,r,a)?(r=0,a=l):(r=r==null?0:nr(r),a=a===i?l:nr(a)),ni(e,r,a)):[]}function yt(e,r){return To(e,r)}function at(e,r,a){return Hl(e,r,Pt(a,2))}function Te(e,r){var a=e==null?0:e.length;if(a){var l=To(e,r);if(l<a&&Qi(e[l],r))return l}return-1}function le(e,r){return To(e,r,!0)}function ht(e,r,a){return Hl(e,r,Pt(a,2),!0)}function lt(e,r){var a=e==null?0:e.length;if(a){var l=To(e,r,!0)-1;if(Qi(e[l],r))return l}return-1}function Et(e){return e&&e.length?yc(e):[]}function dr(e,r){return e&&e.length?yc(e,Pt(r,2)):[]}function yn(e){var r=e==null?0:e.length;return r?ni(e,1,r):[]}function af(e,r,a){return e&&e.length?(r=a||r===i?1:nr(r),ni(e,0,r<0?0:r)):[]}function ji(e,r,a){var l=e==null?0:e.length;return l?(r=a||r===i?1:nr(r),r=l-r,ni(e,r<0?0:r,l)):[]}function Ci(e,r){return e&&e.length?Qa(e,Pt(r,3),!1,!0):[]}function ba(e,r){return e&&e.length?Qa(e,Pt(r,3)):[]}var ff=rr(function(e){return pa(pn(e,1,un,!0))}),Ec=rr(function(e){var r=N(e);return un(r)&&(r=i),pa(pn(e,1,un,!0),Pt(r,2))}),qn=rr(function(e){var r=N(e);return r=typeof r=="function"?r:i,pa(pn(e,1,un,!0),i,r)});function sf(e){return e&&e.length?pa(e):[]}function ii(e,r){return e&&e.length?pa(e,Pt(r,2)):[]}function Ac(e,r){return r=typeof r=="function"?r:i,e&&e.length?pa(e,i,r):[]}function In(e){if(!(e&&e.length))return[];var r=0;return e=Di(e,function(a){if(un(a))return r=Xr(a.length,r),!0}),dl(r,function(a){return Pr(e,Fa(a))})}function Os(e,r){if(!(e&&e.length))return[];var a=In(e);return r==null?a:Pr(a,function(l){return _n(r,i,l)})}var ko=rr(function(e,r){return un(e)?$a(e,r):[]}),$y=rr(function(e){return Gf(Di(e,un))}),Zy=rr(function(e){var r=N(e);return un(r)&&(r=i),Gf(Di(e,un),Pt(r,2))}),Xy=rr(function(e){var r=N(e);return r=typeof r=="function"?r:i,Gf(Di(e,un),i,r)}),qy=rr(In);function Ky(e,r){return Ao(e||[],r||[],hs)}function jy(e,r){return Ao(e||[],r||[],bs)}var Qy=rr(function(e){var r=e.length,a=r>1?e[r-1]:i;return a=typeof a=="function"?(e.pop(),a):i,Os(e,a)});function zv(e){var r=b(e);return r.__chain__=!0,r}function Jy(e,r){return r(e),e}function Dc(e,r){return r(e)}var eb=Ri(function(e){var r=e.length,a=r?e[0]:0,l=this.__wrapped__,_=function(T){return ca(T,e)};return r>1||this.__actions__.length||!(l instanceof ur)||!V(a)?this.thru(_):(l=l.slice(a,+a+(r?1:0)),l.__actions__.push({func:Dc,args:[_],thisArg:i}),new ti(l,this.__chain__).thru(function(T){return r&&!T.length&&T.push(i),T}))});function tb(){return zv(this)}function rb(){return new ti(this.value(),this.__chain__)}function nb(){this.__values__===i&&(this.__values__=n_(this.value()));var e=this.__index__>=this.__values__.length,r=e?i:this.__values__[this.__index__++];return{done:e,value:r}}function ib(){return this}function ab(e){for(var r,a=this;a instanceof cs;){var l=Kr(a);l.__index__=0,l.__values__=i,r?_.__wrapped__=l:r=l;var _=l;a=a.__wrapped__}return _.__wrapped__=e,r}function fb(){var e=this.__wrapped__;if(e instanceof ur){var r=e;return this.__actions__.length&&(r=new ur(this)),r=r.reverse(),r.__actions__.push({func:Dc,args:[Ye],thisArg:i}),new ti(r,this.__chain__)}return this.thru(Ye)}function sb(){return xs(this.__wrapped__,this.__actions__)}var ob=gi(function(e,r,a){gr.call(e,a)?++e[a]:Wn(e,a,1)});function lb(e,r,a){var l=Jt(e)?aa:Cl;return a&&ne(e,r,a)&&(r=i),l(e,Pt(r,3))}function ub(e,r){var a=Jt(e)?Di:Ml;return a(e,Pt(r,3))}var cb=tf(yi),hb=tf(ya);function db(e,r){return pn(Lc(e,r),1)}function vb(e,r){return pn(Lc(e,r),Me)}function _b(e,r,a){return a=a===i?1:nr(a),pn(Lc(e,r),a)}function Wv(e,r){var a=Jt(e)?wn:Li;return a(e,Pt(r,3))}function Vv(e,r){var a=Jt(e)?zu:mo;return a(e,Pt(r,3))}var pb=gi(function(e,r,a){gr.call(e,a)?e[a].push(r):Wn(e,a,[r])});function mb(e,r,a,l){e=ai(e)?e:Fo(e),a=a&&!l?nr(a):0;var _=e.length;return a<0&&(a=Xr(_+a,0)),kc(e)?a<=_&&e.indexOf(r,a)>-1:!!_&&Hi(e,r,a)>-1}var gb=rr(function(e,r,a){var l=-1,_=typeof r=="function",T=ai(e)?he(e.length):[];return Li(e,function(P){T[++l]=_?_n(r,P,a):Xa(P,r,a)}),T}),yb=gi(function(e,r,a){Wn(e,a,r)});function Lc(e,r){var a=Jt(e)?Pr:da;return a(e,Pt(r,3))}function bb(e,r,a,l){return e==null?[]:(Jt(r)||(r=r==null?[]:[r]),a=l?i:a,Jt(a)||(a=a==null?[]:[a]),xo(e,r,a))}var xb=gi(function(e,r,a){e[a?0:1].push(r)},function(){return[[],[]]});function wb(e,r,a){var l=Jt(e)?ul:cl,_=arguments.length<3;return l(e,Pt(r,4),a,_,Li)}function Sb(e,r,a){var l=Jt(e)?rd:cl,_=arguments.length<3;return l(e,Pt(r,4),a,_,mo)}function Tb(e,r){var a=Jt(e)?Di:Ml;return a(e,Cc(Pt(r,3)))}function Eb(e){var r=Jt(e)?fc:Pf;return r(e)}function Ab(e,r,a){(a?ne(e,r,a):r===i)?r=1:r=nr(r);var l=Jt(e)?Id:Yl;return l(e,r)}function Db(e){var r=Jt(e)?Fd:Pd;return r(e)}function Lb(e){if(e==null)return 0;if(ai(e))return kc(e)?sa(e):e.length;var r=ae(e);return r==Ir||r==Jr?e.size:Xi(e).length}function Ob(e,r,a){var l=Jt(e)?Js:Gd;return a&&ne(e,r,a)&&(r=i),l(e,Pt(r,3))}var Rb=rr(function(e,r){if(e==null)return[];var a=r.length;return a>1&&ne(e,r[0],r[1])?r=[]:a>2&&ne(r[0],r[1],r[2])&&(r=[r[0]]),xo(e,pn(r,1),[])}),Oc=dd||function(){return xn.Date.now()};function Cb(e,r){if(typeof r!="function")throw new ei(u);return e=nr(e),function(){if(--e<1)return r.apply(this,arguments)}}function $v(e,r,a){return r=a?i:r,r=e&&r==null?e.length:r,Ki(e,ee,i,i,i,i,r)}function Zv(e,r){var a;if(typeof r!="function")throw new ei(u);return e=nr(e),function(){return--e>0&&(a=r.apply(this,arguments)),e<=1&&(r=i),a}}var Zd=rr(function(e,r,a){var l=se;if(a.length){var _=zi(a,nf(Zd));l|=_e}return Ki(e,l,r,a,_)}),Xv=rr(function(e,r,a){var l=se|I;if(a.length){var _=zi(a,nf(Xv));l|=_e}return Ki(r,l,e,a,_)});function qv(e,r,a){r=a?i:r;var l=Ki(e,te,i,i,i,i,i,r);return l.placeholder=qv.placeholder,l}function Kv(e,r,a){r=a?i:r;var l=Ki(e,ce,i,i,i,i,i,r);return l.placeholder=Kv.placeholder,l}function jv(e,r,a){var l,_,T,P,H,J,Ie=0,Ne=!1,ze=!1,vt=!0;if(typeof e!="function")throw new ei(u);r=Mi(r)||0,tn(a)&&(Ne=!!a.leading,ze="maxWait"in a,T=ze?Xr(Mi(a.maxWait)||0,r):T,vt="trailing"in a?!!a.trailing:vt);function Ot(cn){var Ji=l,uf=_;return l=_=i,Ie=cn,P=e.apply(uf,Ji),P}function Yt(cn){return Ie=cn,H=wt(vr,r),Ne?Ot(cn):P}function fr(cn){var Ji=cn-J,uf=cn-Ie,p_=r-Ji;return ze?Rn(p_,T-uf):p_}function Ht(cn){var Ji=cn-J,uf=cn-Ie;return J===i||Ji>=r||Ji<0||ze&&uf>=T}function vr(){var cn=Oc();if(Ht(cn))return yr(cn);H=wt(vr,fr(cn))}function yr(cn){return H=i,vt&&l?Ot(cn):(l=_=i,P)}function xi(){H!==i&&ws(H),Ie=0,l=J=_=H=i}function Kn(){return H===i?P:yr(Oc())}function wi(){var cn=Oc(),Ji=Ht(cn);if(l=arguments,_=this,J=cn,Ji){if(H===i)return Yt(J);if(ze)return ws(H),H=wt(vr,r),Ot(J)}return H===i&&(H=wt(vr,r)),P}return wi.cancel=xi,wi.flush=Kn,wi}var Mb=rr(function(e,r){return po(e,1,r)}),kb=rr(function(e,r,a){return po(e,Mi(r)||0,a)});function Ib(e){return Ki(e,ut)}function Rc(e,r){if(typeof e!="function"||r!=null&&typeof r!="function")throw new ei(u);var a=function(){var l=arguments,_=r?r.apply(this,l):l[0],T=a.cache;if(T.has(_))return T.get(_);var P=e.apply(this,l);return a.cache=T.set(_,P)||T,P};return a.cache=new(Rc.Cache||$i),a}Rc.Cache=$i;function Cc(e){if(typeof e!="function")throw new ei(u);return function(){var r=arguments;switch(r.length){case 0:return!e.call(this);case 1:return!e.call(this,r[0]);case 2:return!e.call(this,r[0],r[1]);case 3:return!e.call(this,r[0],r[1],r[2])}return!e.apply(this,r)}}function Fb(e){return Zv(2,e)}var Nb=Wl(function(e,r){r=r.length==1&&Jt(r[0])?Pr(r[0],Zn(Pt())):Pr(pn(r,1),Zn(Pt()));var a=r.length;return rr(function(l){for(var _=-1,T=Rn(l.length,a);++_<T;)l[_]=r[_].call(this,l[_]);return _n(e,this,l)})}),Xd=rr(function(e,r){var a=zi(r,nf(Xd));return Ki(e,_e,i,r,a)}),Qv=rr(function(e,r){var a=zi(r,nf(Qv));return Ki(e,we,i,r,a)}),Bb=Ri(function(e,r){return Ki(e,Ce,i,i,i,r)});function Pb(e,r){if(typeof e!="function")throw new ei(u);return r=r===i?r:nr(r),rr(e,r)}function Gb(e,r){if(typeof e!="function")throw new ei(u);return r=r==null?0:Xr(nr(r),0),rr(function(a){var l=a[r],_=mi(a,0,r);return l&&Yi(_,l),_n(e,this,_)})}function Ub(e,r,a){var l=!0,_=!0;if(typeof e!="function")throw new ei(u);return tn(a)&&(l="leading"in a?!!a.leading:l,_="trailing"in a?!!a.trailing:_),jv(e,r,{leading:l,maxWait:r,trailing:_})}function Yb(e){return $v(e,1)}function Hb(e,r){return Xd(Yf(r),e)}function zb(){if(!arguments.length)return[];var e=arguments[0];return Jt(e)?e:[e]}function Wb(e){return Sn(e,$)}function Vb(e,r){return r=typeof r=="function"?r:i,Sn(e,$,r)}function $b(e){return Sn(e,g|$)}function Zb(e,r){return r=typeof r=="function"?r:i,Sn(e,g|$,r)}function Xb(e,r){return r==null||Va(e,r,Fn(r))}function Qi(e,r){return e===r||e!==e&&r!==r}var qb=Tn(ps),Kb=Tn(function(e,r){return e>=r}),Rs=Nl(function(){return arguments}())?Nl:function(e){return rn(e)&&gr.call(e,"callee")&&!on.call(e,"callee")},Jt=he.isArray,jb=Pu?Zn(Pu):hc;function ai(e){return e!=null&&Mc(e.length)&&!of(e)}function un(e){return rn(e)&&ai(e)}function Qb(e){return e===!0||e===!1||rn(e)&&Mn(e)==Gt}var Wf=_d||a0,Jb=Ui?Zn(Ui):Bl;function ex(e){return rn(e)&&e.nodeType===1&&!Jl(e)}function tx(e){if(e==null)return!0;if(ai(e)&&(Jt(e)||typeof e=="string"||typeof e.splice=="function"||Wf(e)||Io(e)||Rs(e)))return!e.length;var r=ae(e);if(r==Ir||r==Jr)return!e.size;if(pt(e))return!Xi(e).length;for(var a in e)if(gr.call(e,a))return!1;return!0}function rx(e,r){return kf(e,r)}function nx(e,r,a){a=typeof a=="function"?a:i;var l=a?a(e,r):i;return l===i?kf(e,r,i,a):!!l}function qd(e){if(!rn(e))return!1;var r=Mn(e);return r==jr||r==hn||typeof e.message=="string"&&typeof e.name=="string"&&!Jl(e)}function ix(e){return typeof e=="number"&&Tl(e)}function of(e){if(!tn(e))return!1;var r=Mn(e);return r==Ft||r==Br||r==wr||r==En}function Jv(e){return typeof e=="number"&&e==nr(e)}function Mc(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ze}function tn(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}function rn(e){return e!=null&&typeof e=="object"}var e_=Gu?Zn(Gu):Pl;function ax(e,r){return e===r||gs(e,r,x(r))}function fx(e,r,a){return a=typeof a=="function"?a:i,gs(e,r,x(r),a)}function sx(e){return t_(e)&&e!=+e}function ox(e){if(je(e))throw new Zt(s);return If(e)}function lx(e){return e===null}function ux(e){return e==null}function t_(e){return typeof e=="number"||rn(e)&&Mn(e)==Zr}function Jl(e){if(!rn(e)||Mn(e)!=ar)return!1;var r=so(e);if(r===null)return!0;var a=gr.call(r,"constructor")&&r.constructor;return typeof a=="function"&&a instanceof a&&is.call(a)==Af}var Kd=Uu?Zn(Uu):vc;function cx(e){return Jv(e)&&e>=-Ze&&e<=Ze}var r_=yf?Zn(yf):yo;function kc(e){return typeof e=="string"||!Jt(e)&&rn(e)&&Mn(e)==an}function bi(e){return typeof e=="symbol"||rn(e)&&Mn(e)==w}var Io=Yu?Zn(Yu):Zi;function hx(e){return e===i}function dx(e){return rn(e)&&ae(e)==dn}function vx(e){return rn(e)&&Mn(e)==Gi}var _x=Tn(qa),px=Tn(function(e,r){return e<=r});function n_(e){if(!e)return[];if(ai(e))return kc(e)?Gn(e):kn(e);if(di&&e[di])return Zu(e[di]());var r=ae(e),a=r==Ir?io:r==Jr?ns:Fo;return a(e)}function lf(e){if(!e)return e===0?e:0;if(e=Mi(e),e===Me||e===-Me){var r=e<0?-1:1;return r*St}return e===e?e:0}function nr(e){var r=lf(e),a=r%1;return r===r?a?r-a:r:0}function i_(e){return e?Wa(nr(e),0,Wt):0}function Mi(e){if(typeof e=="number")return e;if(bi(e))return $t;if(tn(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=tn(r)?r+"":r}if(typeof e!="string")return e===0?e:+e;e=Vu(e);var a=Ch.test(e);return a||kh.test(e)?js(e.slice(2),a?2:8):Ws.test(e)?$t:+e}function a_(e){return Oi(e,fi(e))}function mx(e){return e?Wa(nr(e),-Ze,Ze):e===0?e:0}function Or(e){return e==null?"":Xn(e)}var gx=ef(function(e,r){if(pt(r)||ai(r)){Oi(r,Fn(r),e);return}for(var a in r)gr.call(r,a)&&hs(e,a,r[a])}),f_=ef(function(e,r){Oi(r,fi(r),e)}),Ic=ef(function(e,r,a,l){Oi(r,fi(r),e,l)}),yx=ef(function(e,r,a,l){Oi(r,Fn(r),e,l)}),bx=Ri(ca);function xx(e,r){var a=Ya(e);return r==null?a:ds(a,r)}var wx=rr(function(e,r){e=Ar(e);var a=-1,l=r.length,_=l>2?r[2]:i;for(_&&ne(r[0],r[1],_)&&(l=1);++a<l;)for(var T=r[a],P=fi(T),H=-1,J=P.length;++H<J;){var Ie=P[H],Ne=e[Ie];(Ne===i||Qi(Ne,Ef[Ie])&&!gr.call(e,Ie))&&(e[Ie]=T[Ie])}return e}),Sx=rr(function(e){return e.push(i,Sc),_n(s_,i,e)});function Tx(e,r){return hi(e,Pt(r,3),ri)}function Ex(e,r){return hi(e,Pt(r,3),vs)}function Ax(e,r){return e==null?e:go(e,Pt(r,3),fi)}function Dx(e,r){return e==null?e:kl(e,Pt(r,3),fi)}function Lx(e,r){return e&&ri(e,Pt(r,3))}function Ox(e,r){return e&&vs(e,Pt(r,3))}function Rx(e){return e==null?[]:_s(e,Fn(e))}function Cx(e){return e==null?[]:_s(e,fi(e))}function jd(e,r,a){var l=e==null?i:ha(e,r);return l===i?a:l}function Mx(e,r){return e!=null&&Be(e,r,lc)}function Qd(e,r){return e!=null&&Be(e,r,uc)}var kx=Lo(function(e,r,a){r!=null&&typeof r.toString!="function"&&(r=Un.call(r)),e[r]=a},e0(si)),Ix=Lo(function(e,r,a){r!=null&&typeof r.toString!="function"&&(r=Un.call(r)),gr.call(e,r)?e[r].push(a):e[r]=[a]},Pt),Fx=rr(Xa);function Fn(e){return ai(e)?Ol(e):Xi(e)}function fi(e){return ai(e)?Ol(e,!0):ys(e)}function Nx(e,r){var a={};return r=Pt(r,3),ri(e,function(l,_,T){Wn(a,r(l,_,T),l)}),a}function Bx(e,r){var a={};return r=Pt(r,3),ri(e,function(l,_,T){Wn(a,_,r(l,_,T))}),a}var Px=ef(function(e,r,a){Ka(e,r,a)}),s_=ef(function(e,r,a,l){Ka(e,r,a,l)}),Gx=Ri(function(e,r){var a={};if(e==null)return a;var l=!1;r=Pr(r,function(T){return T=pi(T,e),l||(l=T.length>1),T}),Oi(e,Co(e),a),l&&(a=Sn(a,g|F|$,Wd));for(var _=r.length;_--;)zl(a,r[_]);return a});function Ux(e,r){return o_(e,Cc(Pt(r)))}var Yx=Ri(function(e,r){return e==null?{}:Gl(e,r)});function o_(e,r){if(e==null)return{};var a=Pr(Co(e),function(l){return[l]});return r=Pt(r),ja(e,a,function(l,_){return r(l,_[0])})}function Hx(e,r,a){r=pi(r,e);var l=-1,_=r.length;for(_||(_=1,e=i);++l<_;){var T=e==null?i:e[Dr(r[l])];T===i&&(l=_,T=a),e=of(T)?T.call(e):T}return e}function zx(e,r,a){return e==null?e:bs(e,r,a)}function Wx(e,r,a,l){return l=typeof l=="function"?l:i,e==null?e:bs(e,r,a,l)}var l_=wc(Fn),u_=wc(fi);function Vx(e,r,a){var l=Jt(e),_=l||Wf(e)||Io(e);if(r=Pt(r,4),a==null){var T=e&&e.constructor;_?a=l?new T:[]:tn(e)?a=of(T)?Ya(so(e)):{}:a={}}return(_?wn:ri)(e,function(P,H,J){return r(a,P,H,J)}),a}function $x(e,r){return e==null?!0:zl(e,r)}function Zx(e,r,a){return e==null?e:Eo(e,r,Yf(a))}function Xx(e,r,a,l){return l=typeof l=="function"?l:i,e==null?e:Eo(e,r,Yf(a),l)}function Fo(e){return e==null?[]:rs(e,Fn(e))}function qx(e){return e==null?[]:rs(e,fi(e))}function Kx(e,r,a){return a===i&&(a=r,r=i),a!==i&&(a=Mi(a),a=a===a?a:0),r!==i&&(r=Mi(r),r=r===r?r:0),Wa(Mi(e),r,a)}function jx(e,r,a){return r=lf(r),a===i?(a=r,r=0):a=lf(a),e=Mi(e),Fl(e,r,a)}function Qx(e,r,a){if(a&&typeof a!="boolean"&&ne(e,r,a)&&(r=a=i),a===i&&(typeof r=="boolean"?(a=r,r=i):typeof e=="boolean"&&(a=e,e=i)),e===i&&r===i?(e=0,r=1):(e=lf(e),r===i?(r=e,e=0):r=lf(r)),e>r){var l=e;e=r,r=l}if(a||e%1||r%1){var _=El();return Rn(e+_*(r-e+ia("1e-"+((_+"").length-1))),r)}return wo(e,r)}var Jx=zf(function(e,r,a){return r=r.toLowerCase(),e+(a?c_(r):r)});function c_(e){return Jd(Or(e).toLowerCase())}function h_(e){return e=Or(e),e&&e.replace(Fh,vl).replace(jh,"")}function ew(e,r,a){e=Or(e),r=Xn(r);var l=e.length;a=a===i?l:Wa(nr(a),0,l);var _=a;return a-=r.length,a>=0&&e.slice(a,_)==r}function tw(e){return e=Or(e),e&&Y.test(e)?e.replace(ge,_l):e}function rw(e){return e=Or(e),e&&hr.test(e)?e.replace(Fr,"\\$&"):e}var nw=zf(function(e,r,a){return e+(a?"-":"")+r.toLowerCase()}),iw=zf(function(e,r,a){return e+(a?" ":"")+r.toLowerCase()}),aw=Xl("toLowerCase");function fw(e,r,a){e=Or(e),r=nr(r);var l=r?sa(e):0;if(!r||l>=r)return e;var _=(r-l)/2;return Hr(Df(_),a)+e+Hr(oo(_),a)}function sw(e,r,a){e=Or(e),r=nr(r);var l=r?sa(e):0;return r&&l<r?e+Hr(r-l,a):e}function ow(e,r,a){e=Or(e),r=nr(r);var l=r?sa(e):0;return r&&l<r?Hr(r-l,a)+e:e}function lw(e,r,a){return a||r==null?r=0:r&&(r=+r),uo(Or(e).replace(Yr,""),r||0)}function uw(e,r,a){return(a?ne(e,r,a):r===i)?r=1:r=nr(r),So(Or(e),r)}function cw(){var e=arguments,r=Or(e[0]);return e.length<3?r:r.replace(e[1],e[2])}var hw=zf(function(e,r,a){return e+(a?"_":"")+r.toLowerCase()});function dw(e,r,a){return a&&typeof a!="number"&&ne(e,r,a)&&(r=a=i),a=a===i?Wt:a>>>0,a?(e=Or(e),e&&(typeof r=="string"||r!=null&&!Kd(r))&&(r=Xn(r),!r&&Na(e))?mi(Gn(e),0,a):e.split(r,a)):[]}var vw=zf(function(e,r,a){return e+(a?" ":"")+Jd(r)});function _w(e,r,a){return e=Or(e),a=a==null?0:Wa(nr(a),0,e.length),r=Xn(r),e.slice(a,a+r.length)==r}function pw(e,r,a){var l=b.templateSettings;a&&ne(e,r,a)&&(r=i),e=Or(e),r=Ic({},r,l,jl);var _=Ic({},r.imports,l.imports,jl),T=Fn(_),P=rs(_,T),H,J,Ie=0,Ne=r.interpolate||Vs,ze="__p += '",vt=xl((r.escape||Vs).source+"|"+Ne.source+"|"+(Ne===it?ci:Vs).source+"|"+(r.evaluate||Vs).source+"|$","g"),Ot="//# sourceURL="+(gr.call(r,"sourceURL")?(r.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ks+"]")+`
|
|
20
|
+
`;e.replace(vt,function(Ht,vr,yr,xi,Kn,wi){return yr||(yr=xi),ze+=e.slice(Ie,wi).replace(Nh,pl),vr&&(H=!0,ze+=`' +
|
|
21
|
+
__e(`+vr+`) +
|
|
22
|
+
'`),Kn&&(J=!0,ze+=`';
|
|
23
|
+
`+Kn+`;
|
|
26
24
|
__p += '`),yr&&(ze+=`' +
|
|
27
25
|
((__t = (`+yr+`)) == null ? '' : __t) +
|
|
28
|
-
'`),
|
|
26
|
+
'`),Ie=wi+Ht.length,Ht}),ze+=`';
|
|
29
27
|
`;var Yt=gr.call(r,"variable")&&r.variable;if(!Yt)ze=`with (obj) {
|
|
30
28
|
`+ze+`
|
|
31
29
|
}
|
|
32
|
-
`;else if(
|
|
30
|
+
`;else if(Hn.test(Yt))throw new Zt(d);ze=(J?ze.replace(He,""):ze).replace(Bt,"$1").replace(o,"$1;"),ze="function("+(Yt||"obj")+`) {
|
|
33
31
|
`+(Yt?"":`obj || (obj = {});
|
|
34
|
-
`)+"var __t, __p = ''"+(
|
|
32
|
+
`)+"var __t, __p = ''"+(H?", __e = _.escape":"")+(J?`, __j = Array.prototype.join;
|
|
35
33
|
function print() { __p += __j.call(arguments, '') }
|
|
36
34
|
`:`;
|
|
37
35
|
`)+ze+`return __p
|
|
38
|
-
}`;var or=V_(function(){return mr(L,Rt+"return "+ze).apply(i,z)});if(or.source=ze,h0(or))throw or;return or}function oS(e){return Rr(e).toLowerCase()}function sS(e){return Rr(e).toUpperCase()}function fS(e,r,o){if(e=Rr(e),e&&(o||r===i))return ic(e);if(!e||!(r=Qn(r)))return e;var c=Yn(e),_=Yn(r),L=uf(c,_),z=cf(c,_)+1;return Ai(c,L,z).join("")}function lS(e,r,o){if(e=Rr(e),e&&(o||r===i))return e.slice(0,fc(e)+1);if(!e||!(r=Qn(r)))return e;var c=Yn(e),_=cf(c,Yn(r))+1;return Ai(c,0,_).join("")}function uS(e,r,o){if(e=Rr(e),e&&(o||r===i))return e.replace(Yr,"");if(!e||!(r=Qn(r)))return e;var c=Yn(e),_=uf(c,Yn(r));return Ai(c,_).join("")}function cS(e,r){var o=ut,c=it;if(rn(r)){var _="separator"in r?r.separator:_;o="length"in r?nr(r.length):o,c="omission"in r?Qn(r.omission):c}e=Rr(e);var L=e.length;if(za(e)){var z=Yn(e);L=z.length}if(o>=L)return e;var $=o-_a(c);if($<1)return c;var ie=z?Ai(z,0,$).join(""):e.slice(0,$);if(_===i)return ie+c;if(z&&($+=ie.length-$),d0(_)){if(e.slice($).search(_)){var Fe,Pe=ie;for(_.global||(_=Ll(_.source,Rr(Kn.exec(_))+"g")),_.lastIndex=0;Fe=_.exec(Pe);)var ze=Fe.index;ie=ie.slice(0,ze===i?$:ze)}}else if(e.indexOf(Qn(_),$)!=$){var vt=ie.lastIndexOf(_);vt>-1&&(ie=ie.slice(0,vt))}return ie+c}function hS(e){return e=Rr(e),e&&w.test(e)?e.replace(de,wd):e}var dS=Xo(function(e,r,o){return e+(o?" ":"")+r.toUpperCase()}),p0=tu("toUpperCase");function W_(e,r,o){return e=Rr(e),r=o?i:r,r===i?ac(e)?Ad(e):xd(e):e.match(r)||[]}var V_=rr(function(e,r){try{return pn(e,i,r)}catch(o){return h0(o)?o:new Zt(o)}}),vS=Ni(function(e,r){return An(r,function(o){o=Dr(o),Xn(e,o,u0(e[o],e))}),e});function _S(e){var r=e==null?0:e.length,o=Bt();return e=r?Br(e,function(c){if(typeof c[1]!="function")throw new ai(l);return[o(c[0]),c[1]]}):[],rr(function(c){for(var _=-1;++_<r;){var L=e[_];if(pn(L[0],this,c))return pn(L[1],this,c)}})}function pS(e){return xc(Tn(e,p))}function m0(e){return function(){return e}}function mS(e,r){return e==null||e!==e?r:e}var gS=na(),yS=na(!0);function hi(e){return e}function g0(e){return Uo(typeof e=="function"?e:Tn(e,p))}function xS(e){return wa(Tn(e,p))}function bS(e,r){return Sa(e,Tn(r,p))}var wS=rr(function(e,r){return function(o){return to(o,e,r)}}),SS=rr(function(e,r){return function(o){return to(e,o,r)}});function y0(e,r,o){var c=Nn(r),_=ws(r,c);o==null&&!(rn(r)&&(_.length||!c.length))&&(o=r,r=e,e=this,_=ws(r,Nn(r)));var L=!(rn(o)&&"chain"in o)||!!o.chain,z=_o(e);return An(_,function($){var ie=r[$];e[$]=ie,z&&(e.prototype[$]=function(){var Fe=this.__chain__;if(L||Fe){var Pe=e(this.__wrapped__),ze=Pe.__actions__=kn(this.__actions__);return ze.push({func:ie,args:arguments,thisArg:e}),Pe.__chain__=Fe,Pe}return ie.apply(e,qi([this.value()],arguments))})}),e}function AS(){return Sn._===this&&(Sn._=lc),this}function x0(){}function TS(e){return e=nr(e),rr(function(r){return Yo(r,e)})}var ES=Pf(Br),DS=Pf(da),LS=Pf(sf);function $_(e){return Oe(e)?Ha(Dr(e)):Ho(e)}function RS(e){return function(r){return e==null?i:xa(e,r)}}var CS=zr(),OS=zr(!0);function b0(){return[]}function w0(){return!1}function IS(){return{}}function MS(){return""}function FS(){return!0}function kS(e,r){if(e=nr(e),e<1||e>Ze)return[];var o=Wt,c=In(e,Wt);r=Bt(r),e-=Wt;for(var _=xl(c,r);++o<e;)r(o);return _}function PS(e){return Jt(e)?Br(e,Dr):Di(e)?[e]:kn(Xt(Rr(e)))}function NS(e){var r=++Ld;return Rr(e)+r}var BS=lo(function(e,r){return e+r},0),GS=nu("ceil"),US=lo(function(e,r){return e/r},1),YS=nu("floor");function HS(e){return e&&e.length?eo(e,hi,Ss):i}function zS(e,r){return e&&e.length?eo(e,Bt(r,2),Ss):i}function WS(e){return fs(e,hi)}function VS(e,r){return fs(e,Bt(r,2))}function $S(e){return e&&e.length?eo(e,hi,ro):i}function ZS(e,r){return e&&e.length?eo(e,Bt(r,2),ro):i}var XS=lo(function(e,r){return e*r},1),qS=nu("round"),KS=lo(function(e,r){return e-r},0);function jS(e){return e&&e.length?lf(e,hi):0}function QS(e,r){return e&&e.length?lf(e,Bt(r,2)):0}return S.after=x2,S.ary=S_,S.assign=sw,S.assignIn=N_,S.assignInWith=Zc,S.assignWith=fw,S.at=lw,S.before=A_,S.bind=u0,S.bindAll=vS,S.bindKey=T_,S.castArray=I2,S.chain=x_,S.chunk=tn,S.compact=un,S.concat=gn,S.cond=_S,S.conforms=pS,S.constant=m0,S.countBy=jb,S.create=uw,S.curry=E_,S.curryRight=D_,S.debounce=L_,S.defaults=cw,S.defaultsDeep=hw,S.defer=b2,S.delay=w2,S.difference=Wr,S.differenceBy=Ut,S.differenceWith=yn,S.drop=hr,S.dropRight=At,S.dropRightWhile=qt,S.dropWhile=er,S.fill=Vr,S.filter=Jb,S.flatMap=r2,S.flatMapDeep=n2,S.flatMapDepth=i2,S.flatten=k,S.flattenDeep=le,S.flattenDepth=ne,S.flip=S2,S.flow=gS,S.flowRight=yS,S.fromPairs=ft,S.functions=yw,S.functionsIn=xw,S.groupBy=a2,S.initial=y,S.intersection=H,S.intersectionBy=j,S.intersectionWith=Q,S.invert=ww,S.invertBy=Sw,S.invokeMap=s2,S.iteratee=g0,S.keyBy=f2,S.keys=Nn,S.keysIn=ci,S.map=Yc,S.mapKeys=Tw,S.mapValues=Ew,S.matches=xS,S.matchesProperty=bS,S.memoize=zc,S.merge=Dw,S.mergeWith=B_,S.method=wS,S.methodOf=SS,S.mixin=y0,S.negate=Wc,S.nthArg=TS,S.omit=Lw,S.omitBy=Rw,S.once=A2,S.orderBy=l2,S.over=ES,S.overArgs=T2,S.overEvery=DS,S.overSome=LS,S.partial=c0,S.partialRight=R_,S.partition=u2,S.pick=Cw,S.pickBy=G_,S.property=$_,S.propertyOf=RS,S.pull=N,S.pullAll=M,S.pullAllBy=re,S.pullAllWith=ee,S.pullAt=_e,S.range=CS,S.rangeRight=OS,S.rearg=E2,S.reject=d2,S.remove=be,S.rest=D2,S.reverse=Ye,S.sampleSize=_2,S.set=Iw,S.setWith=Mw,S.shuffle=p2,S.slice=Dt,S.sortBy=y2,S.sortedUniq=Tt,S.sortedUniqBy=vr,S.split=rS,S.spread=L2,S.tail=xn,S.take=co,S.takeRight=aa,S.takeRightWhile=Bi,S.takeWhile=La,S.tap=Hb,S.throttle=R2,S.thru=Uc,S.toArray=F_,S.toPairs=U_,S.toPairsIn=Y_,S.toPath=PS,S.toPlainObject=P_,S.transform=Fw,S.unary=C2,S.union=ho,S.unionBy=Bc,S.unionWith=Jn,S.uniq=vo,S.uniqBy=li,S.uniqWith=Gc,S.unset=kw,S.unzip=Pn,S.unzipWith=Ps,S.update=Pw,S.updateWith=Nw,S.values=Hf,S.valuesIn=Bw,S.without=Uf,S.words=W_,S.wrap=O2,S.xor=kb,S.xorBy=Pb,S.xorWith=Nb,S.zip=Bb,S.zipObject=Gb,S.zipObjectDeep=Ub,S.zipWith=Yb,S.entries=U_,S.entriesIn=Y_,S.extend=N_,S.extendWith=Zc,y0(S,S),S.add=BS,S.attempt=V_,S.camelCase=Hw,S.capitalize=H_,S.ceil=GS,S.clamp=Gw,S.clone=M2,S.cloneDeep=k2,S.cloneDeepWith=P2,S.cloneWith=F2,S.conformsTo=N2,S.deburr=z_,S.defaultTo=mS,S.divide=US,S.endsWith=zw,S.eq=oa,S.escape=Ww,S.escapeRegExp=Vw,S.every=Qb,S.find=e2,S.findIndex=Ei,S.findKey=dw,S.findLast=t2,S.findLastIndex=Da,S.findLastKey=vw,S.floor=YS,S.forEach=b_,S.forEachRight=w_,S.forIn=_w,S.forInRight=pw,S.forOwn=mw,S.forOwnRight=gw,S.get=v0,S.gt=B2,S.gte=G2,S.has=bw,S.hasIn=_0,S.head=zt,S.identity=hi,S.includes=o2,S.indexOf=R,S.inRange=Uw,S.invoke=Aw,S.isArguments=Ns,S.isArray=Jt,S.isArrayBuffer=U2,S.isArrayLike=ui,S.isArrayLikeObject=cn,S.isBoolean=Y2,S.isBuffer=qo,S.isDate=H2,S.isElement=z2,S.isEmpty=W2,S.isEqual=V2,S.isEqualWith=$2,S.isError=h0,S.isFinite=Z2,S.isFunction=_o,S.isInteger=C_,S.isLength=Vc,S.isMap=O_,S.isMatch=X2,S.isMatchWith=q2,S.isNaN=K2,S.isNative=j2,S.isNil=J2,S.isNull=Q2,S.isNumber=I_,S.isObject=rn,S.isObjectLike=nn,S.isPlainObject=ou,S.isRegExp=d0,S.isSafeInteger=ew,S.isSet=M_,S.isString=$c,S.isSymbol=Di,S.isTypedArray=Yf,S.isUndefined=tw,S.isWeakMap=rw,S.isWeakSet=nw,S.join=W,S.kebabCase=$w,S.last=Y,S.lastIndexOf=X,S.lowerCase=Zw,S.lowerFirst=Xw,S.lt=iw,S.lte=aw,S.max=HS,S.maxBy=zS,S.mean=WS,S.meanBy=VS,S.min=$S,S.minBy=ZS,S.stubArray=b0,S.stubFalse=w0,S.stubObject=IS,S.stubString=MS,S.stubTrue=FS,S.multiply=XS,S.nth=O,S.noConflict=AS,S.noop=x0,S.now=Hc,S.pad=qw,S.padEnd=Kw,S.padStart=jw,S.parseInt=Qw,S.random=Yw,S.reduce=c2,S.reduceRight=h2,S.repeat=Jw,S.replace=eS,S.result=Ow,S.round=qS,S.runInContext=te,S.sample=v2,S.size=m2,S.snakeCase=tS,S.some=g2,S.sortedIndex=yt,S.sortedIndexBy=ot,S.sortedIndexOf=Ae,S.sortedLastIndex=he,S.sortedLastIndexBy=ht,S.sortedLastIndexOf=ct,S.startCase=nS,S.startsWith=iS,S.subtract=KS,S.sum=jS,S.sumBy=QS,S.template=aS,S.times=kS,S.toFinite=po,S.toInteger=nr,S.toLength=k_,S.toLower=oS,S.toNumber=Gi,S.toSafeInteger=ow,S.toString=Rr,S.toUpper=sS,S.trim=fS,S.trimEnd=lS,S.trimStart=uS,S.truncate=cS,S.unescape=hS,S.uniqueId=NS,S.upperCase=dS,S.upperFirst=p0,S.each=b_,S.eachRight=w_,S.first=zt,y0(S,function(){var e={};return si(S,function(r,o){gr.call(S.prototype,o)||(e[o]=r)}),e}(),{chain:!1}),S.VERSION=a,An(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){S[e].placeholder=S}),An(["drop","take"],function(e,r){cr.prototype[e]=function(o){o=o===i?1:qr(nr(o),0);var c=this.__filtered__&&!r?new cr(this):this.clone();return c.__filtered__?c.__takeCount__=In(o,c.__takeCount__):c.__views__.push({size:In(o,Wt),type:e+(c.__dir__<0?"Right":"")}),c},cr.prototype[e+"Right"]=function(o){return this.reverse()[e](o).reverse()}}),An(["filter","map","takeWhile"],function(e,r){var o=r+1,c=o==Re||o==xt;cr.prototype[e]=function(_){var L=this.clone();return L.__iteratees__.push({iteratee:Bt(_,3),type:o}),L.__filtered__=L.__filtered__||c,L}}),An(["head","last"],function(e,r){var o="take"+(r?"Right":"");cr.prototype[e]=function(){return this[o](1).value()[0]}}),An(["initial","tail"],function(e,r){var o="drop"+(r?"":"Right");cr.prototype[e]=function(){return this.__filtered__?new cr(this):this[o](1)}}),cr.prototype.compact=function(){return this.filter(hi)},cr.prototype.find=function(e){return this.filter(e).head()},cr.prototype.findLast=function(e){return this.reverse().find(e)},cr.prototype.invokeMap=rr(function(e,r){return typeof e=="function"?new cr(this):this.map(function(o){return to(o,e,r)})}),cr.prototype.reject=function(e){return this.filter(Wc(Bt(e)))},cr.prototype.slice=function(e,r){e=nr(e);var o=this;return o.__filtered__&&(e>0||r<0)?new cr(o):(e<0?o=o.takeRight(-e):e&&(o=o.drop(e)),r!==i&&(r=nr(r),o=r<0?o.dropRight(-r):o.take(r-e)),o)},cr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},cr.prototype.toArray=function(){return this.take(Wt)},si(cr.prototype,function(e,r){var o=/^(?:filter|find|map|reject)|While$/.test(r),c=/^(?:head|last)$/.test(r),_=S[c?"take"+(r=="last"?"Right":""):r],L=c||/^find/.test(r);!_||(S.prototype[r]=function(){var z=this.__wrapped__,$=c?[1]:arguments,ie=z instanceof cr,Fe=$[0],Pe=ie||Jt(z),ze=function(_r){var yr=_.apply(S,qi([_r],$));return c&&vt?yr[0]:yr};Pe&&o&&typeof Fe=="function"&&Fe.length!=1&&(ie=Pe=!1);var vt=this.__chain__,Rt=!!this.__actions__.length,Yt=L&&!vt,or=ie&&!Rt;if(!L&&Pe){z=or?z:new cr(this);var Ht=e.apply(z,$);return Ht.__actions__.push({func:Uc,args:[ze],thisArg:i}),new oi(Ht,vt)}return Yt&&or?e.apply(this,$):(Ht=this.thru(ze),Yt?c?Ht.value()[0]:Ht.value():Ht)})}),An(["pop","push","shift","sort","splice","unshift"],function(e){var r=df[e],o=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",c=/^(?:pop|shift)$/.test(e);S.prototype[e]=function(){var _=arguments;if(c&&!this.__chain__){var L=this.value();return r.apply(Jt(L)?L:[],_)}return this[o](function(z){return r.apply(Jt(z)?z:[],_)})}}),si(cr.prototype,function(e,r){var o=S[r];if(o){var c=o.name+"";gr.call(Mn,c)||(Mn[c]=[]),Mn[c].push({name:r,func:o})}}),Mn[ks(i,x).name]=[{name:"wrapper",func:i}],cr.prototype.clone=kd,cr.prototype.reverse=Pd,cr.prototype.value=Nd,S.prototype.at=zb,S.prototype.chain=Wb,S.prototype.commit=Vb,S.prototype.next=$b,S.prototype.plant=Xb,S.prototype.reverse=qb,S.prototype.toJSON=S.prototype.valueOf=S.prototype.value=Kb,S.prototype.first=S.prototype.head,xi&&(S.prototype[xi]=Zb),S},Ro=Td();Ua?((Ua.exports=Ro)._=Ro,vl._=Ro):Sn._=Ro}).call(Zs)})(Xs,Xs.exports);const bo=Xs.exports,Rh={normal:["FC6310R","FC6310"],infrared:["M3T"],multispectral:["FC6360"]};var ni=63710088e-1,kv={centimeters:ni*100,centimetres:ni*100,degrees:ni/111325,feet:ni*3.28084,inches:ni*39.37,kilometers:ni/1e3,kilometres:ni/1e3,meters:ni,metres:ni,miles:ni/1609.344,millimeters:ni*1e3,millimetres:ni*1e3,nauticalmiles:ni/1852,radians:1,yards:ni*1.0936};function mx(t,n,i){i===void 0&&(i={});var a={type:"Feature"};return(i.id===0||i.id)&&(a.id=i.id),i.bbox&&(a.bbox=i.bbox),a.properties=n||{},a.geometry=t,a}function gx(t,n,i){if(i===void 0&&(i={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Pv(t[0])||!Pv(t[1]))throw new Error("coordinates must contain numbers");var a={type:"Point",coordinates:t};return mx(a,n,i)}function yx(t,n){n===void 0&&(n="kilometers");var i=kv[n];if(!i)throw new Error(n+" units is invalid");return t*i}function xx(t,n){n===void 0&&(n="kilometers");var i=kv[n];if(!i)throw new Error(n+" units is invalid");return t/i}function Ch(t){var n=t%(2*Math.PI);return n*180/Math.PI}function Vi(t){var n=t%360;return n*Math.PI/180}function Pv(t){return!isNaN(t)&&t!==null&&!Array.isArray(t)}function tl(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if(t.type==="Feature"&&t.geometry!==null&&t.geometry.type==="Point")return t.geometry.coordinates;if(t.type==="Point")return t.coordinates}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function bx(t,n){return t.type==="FeatureCollection"?"FeatureCollection":t.type==="GeometryCollection"?"GeometryCollection":t.type==="Feature"&&t.geometry!==null?t.geometry.type:t.type}function Nv(t,n,i){i===void 0&&(i={});var a=tl(t),f=tl(n),s=Vi(f[1]-a[1]),l=Vi(f[0]-a[0]),d=Vi(a[1]),v=Vi(f[1]),I=Math.pow(Math.sin(s/2),2)+Math.pow(Math.sin(l/2),2)*Math.cos(d)*Math.cos(v);return yx(2*Math.atan2(Math.sqrt(I),Math.sqrt(1-I)),i.units)}function wx(t,n,i,a){a===void 0&&(a={});var f=tl(t),s=Vi(f[0]),l=Vi(f[1]),d=Vi(i),v=xx(n,a.units),I=Math.asin(Math.sin(l)*Math.cos(v)+Math.cos(l)*Math.sin(v)*Math.cos(d)),B=s+Math.atan2(Math.sin(d)*Math.sin(v)*Math.cos(l),Math.cos(v)-Math.sin(l)*Math.sin(I)),p=Ch(B),U=Ch(I);return gx([p,U],a.properties)}function Bv(t,n,i){if(i===void 0&&(i={}),i.final===!0)return Sx(t,n);var a=tl(t),f=tl(n),s=Vi(a[0]),l=Vi(f[0]),d=Vi(a[1]),v=Vi(f[1]),I=Math.sin(l-s)*Math.cos(v),B=Math.cos(d)*Math.sin(v)-Math.sin(d)*Math.cos(v)*Math.cos(l-s);return Ch(Math.atan2(I,B))}function Sx(t,n){var i=Bv(n,t);return i=(i+180)%360,i}function Ax(t,n){var i=Nv(t,n),a=Bv(t,n),f=wx(t,i/2,a);return f}const Gv=[{id:"annotation",type:"annotation",name:"\u6807\u6CE8",collapsed:!1,visible:!0,opacity:1},{id:"output",type:"output",name:"\u6210\u679C\u56FE\u5C42",collapsed:!1,visible:!0,opacity:1},{id:"dataset",type:"dataset",name:"\u6570\u636E\u96C6",collapsed:!1,visible:!0,opacity:1},{id:"overlay",type:"overlay",name:"\u8986\u76D6\u7269",collapsed:!1,visible:!0,opacity:1}],Tx=[{type:"image",img:"satellite",name:"\u5F71\u50CF\u5730\u56FE",items:[{type:"raster",tileSize:256,tiles:["https://t0.tianditu.gov.cn/DataServer?T=img_w&x={x}&y={y}&l={z}&tk=bfc12ce6bd94a4449ad626b8a0b709d0"],maxzoom:18,layerType:"bmap"},{type:"raster",tileSize:256,tiles:["https://t0.tianditu.gov.cn/DataServer?T=cia_w&x={x}&y={y}&l={z}&tk=bfc12ce6bd94a4449ad626b8a0b709d0"],maxzoom:18,layerType:"bmap"}]},{type:"vector_standard",img:"vector_standard",name:"\u77E2\u91CF\u5730\u56FE",items:[{type:"raster",tileSize:256,tiles:["https://t0.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=bfc12ce6bd94a4449ad626b8a0b709d0"],maxzoom:18,layerType:"bmap"},{type:"raster",tileSize:256,tiles:["https://t0.tianditu.gov.cn/DataServer?T=cva_w&x={x}&y={y}&l={z}&tk=bfc12ce6bd94a4449ad626b8a0b709d0"],maxzoom:18,layerType:"bmap"}]}],Ex=["#321644","#455dd1","#2eb4f2","#26eda6","#c3f134","#f8bd39","#e14209","#7a0403"],Dx=[{type:"dom",name:"\u6B63\u5C04\u5F71\u50CF\uFF08DOM\uFF09",group:"output",visible:!0,opacity:1,class:"image2d"},{type:"tmp",name:"\u6E29\u5EA6\u56FE",group:"output",visible:!0,opacity:1,class:"tmp"},{type:"dsm",name:"\u6570\u5B57\u8868\u9762\u6A21\u578B\uFF08DSM\uFF09",group:"output",visible:!1,opacity:.5,class:"image2d"},{type:"mesh3d",name:"\u4E09\u7EF4\u6A21\u578B",group:"output",visible:!0,opacity:1,class:"mesh3d"},{type:"ndvi",name:"\u690D\u88AB\u6307\u6570\uFF08NDVI\uFF09",group:"output",visible:!0,opacity:1,class:"ndvi"},{type:"photos",name:"\u7167\u7247",group:"dataset",visible:!1,opacity:1,class:"photos"}],Lx={dom:"tile",dsm:"dsm_tile",ndvi:"ndvi_tile",tmp:"tem_tile"},Rx={annotation:"icon-biaozhu",output:"icon-chengguo",dataset:"icon-photos",overlay:"icon-dataset",geojson:"icon-vector",raster:"icon-tuxiang",object:"icon-cube",dom:"icon-tuxiang",dsm:"icon-moxing",ndvi:"icon-zhishu",mesh3d:"icon-mesh",point_cloud:"icon-dianyun",photos:"icon-24gf-photoAlbum",point:"icon-locate",line:"icon-line",polygon:"icon-polygon"},Cx=[{name:"2d",icon:"icon-view_d"},{name:"3d",icon:"icon-view_d1"}],Ox={quality:"medium",output:{normal:[{type:"image2d",name:"\u4E8C\u7EF4\u6B63\u5C04\uFF08DOM+DSM\uFF09"},{type:"mesh3d",name:"\u4E09\u7EF4\u6A21\u578B\uFF083DTiles\uFF09"}],infrared:[{type:"tmp",name:"\u6E29\u5EA6\u56FE",required:!0}],multispectral:[{type:"image2d",name:"\u4E8C\u7EF4\u6B63\u5C04\uFF08DOM+DSM\uFF09"},{type:"ndvi",name:"\u690D\u88AB\u6307\u6570\uFF08NDVI\uFF09",required:!0}]}},Ix=[{type:"draw_point",mode:"draw_point",name:"\u6807\u70B9",icon:"icon-locate"},{type:"draw_line_string",mode:"draw_line_string",name:"\u6807\u7EBF",icon:"icon-line"},{type:"draw_polygon",mode:"draw_polygon",name:"\u6807\u9762",icon:"icon-polygon"}];function Mx(){return _m()}function Fx(t){return t?_t(t).format("YYYY-MM-DD HH:mm:ss"):"-"}function kx(){return _t().format("YYYY/M/D HH:mm:ss")}function Px(t){return t=parseInt(t),t=t.toString(),t.length>6?(t=(Number(t)/1e6).toFixed(2),t+" MB"):(t=(Number(t)/1e3).toFixed(2),t+" KB")}async function Nx(t){let n=await jc(t),{GPSAltitude:i,GPSLatitude:a,GPSLatitudeRef:f,GPSLongitude:s,GPSLongitudeRef:l,DateTimeOriginal:d,Model:v,PixelXDimension:I,PixelYDimension:B}=n,p=null;return s&&a&&(p={lng:Oh(l)*Ih(s),lat:Oh(f)*Ih(a),alt:+i}),{date:d&&d.split(" ")[0].replaceAll(":","-"),Model:v,width:I,height:B,position:p}}function Bx(t){return new Promise((n,i)=>{let a,f;jc(t).then(v=>{f=v,d()});let s=new FileReader,l=new px.ArrayBuffer;s.readAsArrayBuffer(t),s.onload=v=>{l.append(v.target.result),a=l.end(),d()};function d(){!a||!f||(n({md5:a,exif:f}),s=null,l=null)}})}function Oh(t){return t==="N"||t==="E"?1:-1}function Ih(t){return t[0]+t[1]/60+t[2]/3600}function Gx(t,n=[]){t=Uv(t),n=Uv(n);let i=[];for(let a of t){let{visible:f}=a;for(let s of a.items||[]){let{id:l,type:d,opacity:v,visible:I,color:B,geometry:p}=s;if(f||(I=!1),["point","line","polygon"].includes(d)&&i.find(pe=>pe[0]==="updateAnnotations"))continue;let U=ku(l,n);if(!U&&!I)continue;if(!U){["point","line","polygon"].includes(d)?i.push(["updateAnnotations",s]):i.push(["addLayer",s]);continue}let{opacity:q,visible:D}=U;bo.isEqual(s,U)||(["point","line","polygon"].includes(d)?i.push(["updateAnnotations",s]):v!==q||d==="geojson"&&!bo.isEqual(s.metadata,U.metadata)?i.push(["updateLayer",s]):I!==D&&i.push([I?"addLayer":"removeLayer",s]))}}for(let a of n)for(let f of a.items||[]){let{id:s,type:l}=f;ku(s,t)||(["point","line","polygon"].includes(l)?i.find(v=>v[0]==="updateAnnotations")||i.push(["updateAnnotations",f]):i.push(["removeLayer",f]))}return i}function ku(t,n){var i;for(let a of n){if(a.id===t)return a;if((i=a.items)!=null&&i.length){let f=ku(t,a.items);if(f)return f}}return null}function Uv(t){let n=bo.cloneDeep(t);for(let i of n)for(let a of i.items||[])i.visible||(a.visible=!1);return n}function Ux(t,n){let i=t.style._layers,a=t.style.order,{layerType:f}=n.metadata;return a.find(d=>{let v=i[d].metadata;return bo.isEmpty(v)&&(v={layerType:"dsm"}),l(f,n.id)<l(v.layerType,d)})||"";function l(d,v){const I=[["bmap"],["dom"],["ndvi"],["dsm"],["circle"],["annotation"],["label"]];let B=-1;return v.startsWith("gl-draw")?B=5:B=I.findIndex(p=>p.includes(d)),B===-1?100:B}}function Yx(t){if(!t)return!1;let{message:n="",msg:i=""}=t.data;return t.status==401&&(i.toLowerCase().includes("expired")||n.toLowerCase().includes("expired"))}function Hx(t){for(let n in Rh)if(Rh[n].includes(t))return n;return"normal"}function zx(t){let n=`\u5FEB\u7167${_t().format("YYYYMMDD")}${new Date().getTime()}.png`,i=document.createElement("a");i.href=t,i.download=n,document.body.appendChild(i),i.click(),document.body.removeChild(i)}function Wx(t){let n=bx(t);return["Point","MultiPoint"].includes(n)?"point":["LineString","MultiLineString"].includes(n)?"line":"polygon"}function Vx(t){let n=t[3]>128?0:1,i=-1*(1-n)+n,a=Math.floor((t[3]+.1)%128)*2+Math.floor((t[2]+.1)/128)-127,f=t[0]+t[1]*256+Math.floor((t[2]+.1)%128)*256*256;return i*(1+f/8388607)*Math.pow(2,a)}function $x(t){let{geometry:n}=t,i=bo.cloneDeep(t);return delete i.geometry,{id:i.id,type:"Feature",properties:i,geometry:bo.cloneDeep(n)}}function Zx(t,n){let i=[],a=n==="point"?"\u70B9\u6CE8\u8BB0":n==="line"?"\u7EBF\u6CE8\u8BB0":"\u9762\u6CE8\u8BB0";t.forEach(f=>{if(f.name===a){i.push(0);return}if(f.name.startsWith(`${a} `)){let s=Number(f.name.split(" ").pop());Number.isNaN(s)||i.push(s)}}),i=i.sort((f,s)=>f-s);for(let f=0;f<i.length;f++)if(i[f]!==f)return f===0?a:`${a} ${f}`;return i.length===0?a:`${a} ${i.length}`}function Xx(t){let n=t.geometry.coordinates,i=[];for(let v=1;v<n.length;v++)Nv(n[v-1],n[v],{units:"meters"})>30&&i.push([n[v-1],n[v]]);let a=[];if(i.length){let v=Math.floor(i.length/2);a=i[v]}else{let v=Math.floor(n.length/2-1);a=[n[v],n[v+1]]}let f=Mh(a[0]),s=Mh(a[1]),l=360-Math.atan((f.y-s.y)/(s.x-f.x))*180/Math.PI,d=Ax(a[0],a[1]);return d.properties=t.properties,d.properties.angle=l,d.geometry.coordinates.push(((a[0][2]||0)+(a[1][2]||0))/2),d}function Mh(t,n=12){let[i,a]=t,f=(180+i)/360,s=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+a*Math.PI/360)))/360;return{x:f*Math.pow(2,n)*512,y:s*Math.pow(2,n)*512}}function qx(t,n){n.forEach(i=>{t.loadImage(i,(a,f)=>{let s=i.split("/").pop().split(".")[0];if(!t.hasImage(s)){if(a)throw a;t.addImage(s,f)}})})}function Kx(t,n,i){var s;let a=bo.cloneDeep(((s=t.metadata)==null?void 0:s.groups)||Gv);return a.forEach(l=>l.items=[]),n.forEach(l=>{let d=bo.cloneDeep(l);d.group||d.group,a.find(I=>I.id===d.group).items.push(d)}),(t.status==="complete"?i:[]).forEach(l=>{let{group:d}=l,v=a.find(I=>I.id===d);!v||v.items.push(l)}),a}let wo=null;function Yv(t,n,i){i[t]=i[t]||[],i[t].push(n)}function Fh(t,n,i){if(i&&i[t]){const a=i[t].indexOf(n);a!==-1&&i[t].splice(a,1)}}function Hv(t,...n){for(const i of n)for(const a in i)t[a]=i[a];return t}function jx(t,n){return t.indexOf(n,t.length-n.length)!==-1}class Qx{constructor(){this._listeners=[],this._oneTimeListeners=[],this._eventedParent=null,this._eventedParentData=null}on(n,i){return this._listeners=this._listeners||{},Yv(n,i,this._listeners),this}off(n,i){if(!i){this._listeners={},this._oneTimeListeners={};return}return Fh(n,i,this._listeners),Fh(n,i,this._oneTimeListeners),this}once(n,i){return this._oneTimeListeners=this._oneTimeListeners||{},Yv(n,i,this._oneTimeListeners),this}fire(n,i){if(this.listens(n)){if(i=Hv({},i,{type:n,target:this}),wo){if(i.point&&wo===i.point.x+i.point.y){if(wo===i.point.x+i.point.y)return;wo=i.point.x+i.point.y}else if(i.feature){if(wo===i.x+i.y)return;wo=i.x+i.y}}else i.point?wo=i.point.x+i.point.y:i.feature&&(wo=i.x+i.y);const a=this._listeners&&this._listeners[n]?this._listeners[n].slice():[];for(let s=0;s<a.length;s++)a[s].call(this,i);const f=this._oneTimeListeners&&this._oneTimeListeners[n]?this._oneTimeListeners[n].slice():[];for(let s=0;s<f.length;s++)f[s].call(this,i),Fh(n,f[s],this._oneTimeListeners);this._eventedParent&&this._eventedParent.fire(n,Hv({},i,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData))}else jx(n,"error")&&console.error(i&&i.error||i||"Empty error event");return this}listens(n){return this._listeners&&this._listeners[n]&&this._listeners[n].length>0||this._oneTimeListeners&&this._oneTimeListeners[n]&&this._oneTimeListeners[n].length>0||this._eventedParent&&this._eventedParent.listens(n)}setEventedParent(n,i){return this._eventedParent=n,this._eventedParentData=i,this}}const Jx={tileFormat:"float32",tileSize:256,colorScale:[],sentinelValues:[],transitions:!1,transitionTimeMs:800,debug:!1,extraPixelLayers:0,colorscaleMaxLength:16,sentinelMaxLength:16,minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,glOperation:"none",multiLayers:0,operationUrlA:"",operationUrlB:"",operationUrlC:"",operationUrlD:"",operationUrlE:"",operationUrlF:"",filterLowA:0,filterHighA:1e5,filterLowB:0,filterHighB:1e5,filterLowC:0,filterHighC:1e5,filterLowD:0,filterHighD:1e5,filterLowE:0,filterHighE:1e5,filterLowF:0,filterHighF:1e5,multiplierA:1,multiplierB:1,multiplierC:1,multiplierD:1,multiplierE:1,multiplierF:1,hillshadeType:"none",hsSimpleZoomdelta:0,hsSimpleSlopescale:3,hsSimpleAzimuth:315,hsSimpleAltitude:70,hsAdvValueScale:1,hsAdvPixelScale:"auto",hsAdvSoftIterations:10,hsAdvAmbientIterations:10,hsAdvSunRadiusMultiplier:100,hsAdvFinalSoftMultiplier:1,hsAdvFinalAmbientMultiplier:.25,hsAdvBaselayerUrl:"",hsAdvSmoothInput:!1,hsAdvSmoothInputKernel:3,hsPregenUrl:"",_hillshadeOptions:{hillshadeType:"none"},contourType:"none",contourSmoothLines:!1,contourSmoothInput:!1,contourSmoothInputKernel:7,contourScaleFactor:1,contourInterval:25,contourIndexInterval:100,contourLineColor:"#000000",contourIlluminatedHighlightColor:"rgba(177,174,164,.5)",contourIlluminatedShadowColor:"#5b5143",contourIlluminatedShadowSize:2,contourLineWeight:.5,contourLineIndexWeight:2,contourIndexLabels:!1,contourLabelFont:"12px Arial",contourLabelDistance:250,contourHypso:!1,contourHypsoDomain:[0,1e3,2e3],contourHypsoColors:["#486341","#e5d9c9","#dddddd"],contourBathy:!1,contourBathyDomain:[-2e3,0],contourBathyColors:["#315d9b","#d5f2ff"],contourBathyShadowColor:"#4e5c66",contourBathyHighlightColor:"rgba(224, 242, 255, .5)"};function eb(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var kh={exports:{}},Ph={},zv;function So(){return zv||(zv=1,function(t){var n=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function i(s,l){return Object.prototype.hasOwnProperty.call(s,l)}t.assign=function(s){for(var l=Array.prototype.slice.call(arguments,1);l.length;){var d=l.shift();if(!!d){if(typeof d!="object")throw new TypeError(d+"must be non-object");for(var v in d)i(d,v)&&(s[v]=d[v])}}return s},t.shrinkBuf=function(s,l){return s.length===l?s:s.subarray?s.subarray(0,l):(s.length=l,s)};var a={arraySet:function(s,l,d,v,I){if(l.subarray&&s.subarray){s.set(l.subarray(d,d+v),I);return}for(var B=0;B<v;B++)s[I+B]=l[d+B]},flattenChunks:function(s){var l,d,v,I,B,p;for(v=0,l=0,d=s.length;l<d;l++)v+=s[l].length;for(p=new Uint8Array(v),I=0,l=0,d=s.length;l<d;l++)B=s[l],p.set(B,I),I+=B.length;return p}},f={arraySet:function(s,l,d,v,I){for(var B=0;B<v;B++)s[I+B]=l[d+B]},flattenChunks:function(s){return[].concat.apply([],s)}};t.setTyped=function(s){s?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,a)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,f))},t.setTyped(n)}(Ph)),Ph}var qs={},$i={},rs={},Wv;function tb(){if(Wv)return rs;Wv=1;var t=So(),n=4,i=0,a=1,f=2;function s(C){for(var Ue=C.length;--Ue>=0;)C[Ue]=0}var l=0,d=1,v=2,I=3,B=258,p=29,U=256,q=U+1+p,D=30,pe=19,ue=2*q+1,x=15,A=16,g=7,b=256,P=16,F=17,J=18,Te=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],nt=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],ut=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],it=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],st=512,tt=new Array((q+2)*2);s(tt);var Re=new Array(D*2);s(Re);var Ot=new Array(st);s(Ot);var xt=new Array(B-I+1);s(xt);var Ie=new Array(p);s(Ie);var Ze=new Array(D);s(Ze);function St(C,Ue,Xe,dt,Z){this.static_tree=C,this.extra_bits=Ue,this.extra_base=Xe,this.elems=dt,this.max_length=Z,this.has_stree=C&&C.length}var $t,Wt,Qt;function sr(C,Ue){this.dyn_tree=C,this.max_code=0,this.stat_desc=Ue}function br(C){return C<256?Ot[C]:Ot[256+(C>>>7)]}function lr(C,Ue){C.pending_buf[C.pending++]=Ue&255,C.pending_buf[C.pending++]=Ue>>>8&255}function Kt(C,Ue,Xe){C.bi_valid>A-Xe?(C.bi_buf|=Ue<<C.bi_valid&65535,lr(C,C.bi_buf),C.bi_buf=Ue>>A-C.bi_valid,C.bi_valid+=Xe-A):(C.bi_buf|=Ue<<C.bi_valid&65535,C.bi_valid+=Xe)}function wr(C,Ue,Xe){Kt(C,Xe[Ue*2],Xe[Ue*2+1])}function Gt(C,Ue){var Xe=0;do Xe|=C&1,C>>>=1,Xe<<=1;while(--Ue>0);return Xe>>>1}function Mt(C){C.bi_valid===16?(lr(C,C.bi_buf),C.bi_buf=0,C.bi_valid=0):C.bi_valid>=8&&(C.pending_buf[C.pending++]=C.bi_buf&255,C.bi_buf>>=8,C.bi_valid-=8)}function dn(C,Ue){var Xe=Ue.dyn_tree,dt=Ue.max_code,Z=Ue.stat_desc.static_tree,we=Ue.stat_desc.has_stree,m=Ue.stat_desc.extra_bits,He=Ue.stat_desc.extra_base,Nt=Ue.stat_desc.max_length,u,de,ye,w,V,ce,Et=0;for(w=0;w<=x;w++)C.bl_count[w]=0;for(Xe[C.heap[C.heap_max]*2+1]=0,u=C.heap_max+1;u<ue;u++)de=C.heap[u],w=Xe[Xe[de*2+1]*2+1]+1,w>Nt&&(w=Nt,Et++),Xe[de*2+1]=w,!(de>dt)&&(C.bl_count[w]++,V=0,de>=He&&(V=m[de-He]),ce=Xe[de*2],C.opt_len+=ce*(w+V),we&&(C.static_len+=ce*(Z[de*2+1]+V)));if(Et!==0){do{for(w=Nt-1;C.bl_count[w]===0;)w--;C.bl_count[w]--,C.bl_count[w+1]+=2,C.bl_count[Nt]--,Et-=2}while(Et>0);for(w=Nt;w!==0;w--)for(de=C.bl_count[w];de!==0;)ye=C.heap[--u],!(ye>dt)&&(Xe[ye*2+1]!==w&&(C.opt_len+=(w-Xe[ye*2+1])*Xe[ye*2],Xe[ye*2+1]=w),de--)}}function Qr(C,Ue,Xe){var dt=new Array(x+1),Z=0,we,m;for(we=1;we<=x;we++)dt[we]=Z=Z+Xe[we-1]<<1;for(m=0;m<=Ue;m++){var He=C[m*2+1];He!==0&&(C[m*2]=Gt(dt[He]++,He))}}function kt(){var C,Ue,Xe,dt,Z,we=new Array(x+1);for(Xe=0,dt=0;dt<p-1;dt++)for(Ie[dt]=Xe,C=0;C<1<<Te[dt];C++)xt[Xe++]=dt;for(xt[Xe-1]=dt,Z=0,dt=0;dt<16;dt++)for(Ze[dt]=Z,C=0;C<1<<nt[dt];C++)Ot[Z++]=dt;for(Z>>=7;dt<D;dt++)for(Ze[dt]=Z<<7,C=0;C<1<<nt[dt]-7;C++)Ot[256+Z++]=dt;for(Ue=0;Ue<=x;Ue++)we[Ue]=0;for(C=0;C<=143;)tt[C*2+1]=8,C++,we[8]++;for(;C<=255;)tt[C*2+1]=9,C++,we[9]++;for(;C<=279;)tt[C*2+1]=7,C++,we[7]++;for(;C<=287;)tt[C*2+1]=8,C++,we[8]++;for(Qr(tt,q+1,we),C=0;C<D;C++)Re[C*2+1]=5,Re[C*2]=Gt(C,5);$t=new St(tt,Te,U+1,q,x),Wt=new St(Re,nt,0,D,x),Qt=new St(new Array(0),ut,0,pe,g)}function Nr(C){var Ue;for(Ue=0;Ue<q;Ue++)C.dyn_ltree[Ue*2]=0;for(Ue=0;Ue<D;Ue++)C.dyn_dtree[Ue*2]=0;for(Ue=0;Ue<pe;Ue++)C.bl_tree[Ue*2]=0;C.dyn_ltree[b*2]=1,C.opt_len=C.static_len=0,C.last_lit=C.matches=0}function Fr(C){C.bi_valid>8?lr(C,C.bi_buf):C.bi_valid>0&&(C.pending_buf[C.pending++]=C.bi_buf),C.bi_buf=0,C.bi_valid=0}function Xr(C,Ue,Xe,dt){Fr(C),dt&&(lr(C,Xe),lr(C,~Xe)),t.arraySet(C.pending_buf,C.window,Ue,Xe,C.pending),C.pending+=Xe}function Jr(C,Ue,Xe,dt){var Z=Ue*2,we=Xe*2;return C[Z]<C[we]||C[Z]===C[we]&&dt[Ue]<=dt[Xe]}function ar(C,Ue,Xe){for(var dt=C.heap[Xe],Z=Xe<<1;Z<=C.heap_len&&(Z<C.heap_len&&Jr(Ue,C.heap[Z+1],C.heap[Z],C.depth)&&Z++,!Jr(Ue,dt,C.heap[Z],C.depth));)C.heap[Xe]=C.heap[Z],Xe=Z,Z<<=1;C.heap[Xe]=dt}function Pt(C,Ue,Xe){var dt,Z,we=0,m,He;if(C.last_lit!==0)do dt=C.pending_buf[C.d_buf+we*2]<<8|C.pending_buf[C.d_buf+we*2+1],Z=C.pending_buf[C.l_buf+we],we++,dt===0?wr(C,Z,Ue):(m=xt[Z],wr(C,m+U+1,Ue),He=Te[m],He!==0&&(Z-=Ie[m],Kt(C,Z,He)),dt--,m=br(dt),wr(C,m,Xe),He=nt[m],He!==0&&(dt-=Ze[m],Kt(C,dt,He)));while(we<C.last_lit);wr(C,b,Ue)}function Dn(C,Ue){var Xe=Ue.dyn_tree,dt=Ue.stat_desc.static_tree,Z=Ue.stat_desc.has_stree,we=Ue.stat_desc.elems,m,He,Nt=-1,u;for(C.heap_len=0,C.heap_max=ue,m=0;m<we;m++)Xe[m*2]!==0?(C.heap[++C.heap_len]=Nt=m,C.depth[m]=0):Xe[m*2+1]=0;for(;C.heap_len<2;)u=C.heap[++C.heap_len]=Nt<2?++Nt:0,Xe[u*2]=1,C.depth[u]=0,C.opt_len--,Z&&(C.static_len-=dt[u*2+1]);for(Ue.max_code=Nt,m=C.heap_len>>1;m>=1;m--)ar(C,Xe,m);u=we;do m=C.heap[1],C.heap[1]=C.heap[C.heap_len--],ar(C,Xe,1),He=C.heap[1],C.heap[--C.heap_max]=m,C.heap[--C.heap_max]=He,Xe[u*2]=Xe[m*2]+Xe[He*2],C.depth[u]=(C.depth[m]>=C.depth[He]?C.depth[m]:C.depth[He])+1,Xe[m*2+1]=Xe[He*2+1]=u,C.heap[1]=u++,ar(C,Xe,1);while(C.heap_len>=2);C.heap[--C.heap_max]=C.heap[1],dn(C,Ue),Qr(Xe,Nt,C.bl_count)}function Ln(C,Ue,Xe){var dt,Z=-1,we,m=Ue[0*2+1],He=0,Nt=7,u=4;for(m===0&&(Nt=138,u=3),Ue[(Xe+1)*2+1]=65535,dt=0;dt<=Xe;dt++)we=m,m=Ue[(dt+1)*2+1],!(++He<Nt&&we===m)&&(He<u?C.bl_tree[we*2]+=He:we!==0?(we!==Z&&C.bl_tree[we*2]++,C.bl_tree[P*2]++):He<=10?C.bl_tree[F*2]++:C.bl_tree[J*2]++,He=0,Z=we,m===0?(Nt=138,u=3):we===m?(Nt=6,u=3):(Nt=7,u=4))}function en(C,Ue,Xe){var dt,Z=-1,we,m=Ue[0*2+1],He=0,Nt=7,u=4;for(m===0&&(Nt=138,u=3),dt=0;dt<=Xe;dt++)if(we=m,m=Ue[(dt+1)*2+1],!(++He<Nt&&we===m)){if(He<u)do wr(C,we,C.bl_tree);while(--He!==0);else we!==0?(we!==Z&&(wr(C,we,C.bl_tree),He--),wr(C,P,C.bl_tree),Kt(C,He-3,2)):He<=10?(wr(C,F,C.bl_tree),Kt(C,He-3,3)):(wr(C,J,C.bl_tree),Kt(C,He-11,7));He=0,Z=we,m===0?(Nt=138,u=3):we===m?(Nt=6,u=3):(Nt=7,u=4)}}function on(C){var Ue;for(Ln(C,C.dyn_ltree,C.l_desc.max_code),Ln(C,C.dyn_dtree,C.d_desc.max_code),Dn(C,C.bl_desc),Ue=pe-1;Ue>=3&&C.bl_tree[it[Ue]*2+1]===0;Ue--);return C.opt_len+=3*(Ue+1)+5+5+4,Ue}function E(C,Ue,Xe,dt){var Z;for(Kt(C,Ue-257,5),Kt(C,Xe-1,5),Kt(C,dt-4,4),Z=0;Z<dt;Z++)Kt(C,C.bl_tree[it[Z]*2+1],3);en(C,C.dyn_ltree,Ue-1),en(C,C.dyn_dtree,Xe-1)}function pi(C){var Ue=4093624447,Xe;for(Xe=0;Xe<=31;Xe++,Ue>>>=1)if(Ue&1&&C.dyn_ltree[Xe*2]!==0)return i;if(C.dyn_ltree[9*2]!==0||C.dyn_ltree[10*2]!==0||C.dyn_ltree[13*2]!==0)return a;for(Xe=32;Xe<U;Xe++)if(C.dyn_ltree[Xe*2]!==0)return a;return i}var vn=!1;function Zi(C){vn||(kt(),vn=!0),C.l_desc=new sr(C.dyn_ltree,$t),C.d_desc=new sr(C.dyn_dtree,Wt),C.bl_desc=new sr(C.bl_tree,Qt),C.bi_buf=0,C.bi_valid=0,Nr(C)}function Gn(C,Ue,Xe,dt){Kt(C,(l<<1)+(dt?1:0),3),Xr(C,Ue,Xe,!0)}function Tr(C){Kt(C,d<<1,3),wr(C,b,tt),Mt(C)}function Rn(C,Ue,Xe,dt){var Z,we,m=0;C.level>0?(C.strm.data_type===f&&(C.strm.data_type=pi(C)),Dn(C,C.l_desc),Dn(C,C.d_desc),m=on(C),Z=C.opt_len+3+7>>>3,we=C.static_len+3+7>>>3,we<=Z&&(Z=we)):Z=we=Xe+5,Xe+4<=Z&&Ue!==-1?Gn(C,Ue,Xe,dt):C.strategy===n||we===Z?(Kt(C,(d<<1)+(dt?1:0),3),Pt(C,tt,Re)):(Kt(C,(v<<1)+(dt?1:0),3),E(C,C.l_desc.max_code+1,C.d_desc.max_code+1,m+1),Pt(C,C.dyn_ltree,C.dyn_dtree)),Nr(C),dt&&Fr(C)}function Un(C,Ue,Xe){return C.pending_buf[C.d_buf+C.last_lit*2]=Ue>>>8&255,C.pending_buf[C.d_buf+C.last_lit*2+1]=Ue&255,C.pending_buf[C.l_buf+C.last_lit]=Xe&255,C.last_lit++,Ue===0?C.dyn_ltree[Xe*2]++:(C.matches++,Ue--,C.dyn_ltree[(xt[Xe]+U+1)*2]++,C.dyn_dtree[br(Ue)*2]++),C.last_lit===C.lit_bufsize-1}return rs._tr_init=Zi,rs._tr_stored_block=Gn,rs._tr_flush_block=Rn,rs._tr_tally=Un,rs._tr_align=Tr,rs}var Nh,Vv;function $v(){if(Vv)return Nh;Vv=1;function t(n,i,a,f){for(var s=n&65535|0,l=n>>>16&65535|0,d=0;a!==0;){d=a>2e3?2e3:a,a-=d;do s=s+i[f++]|0,l=l+s|0;while(--d);s%=65521,l%=65521}return s|l<<16|0}return Nh=t,Nh}var Bh,Zv;function Xv(){if(Zv)return Bh;Zv=1;function t(){for(var a,f=[],s=0;s<256;s++){a=s;for(var l=0;l<8;l++)a=a&1?3988292384^a>>>1:a>>>1;f[s]=a}return f}var n=t();function i(a,f,s,l){var d=n,v=l+s;a^=-1;for(var I=l;I<v;I++)a=a>>>8^d[(a^f[I])&255];return a^-1}return Bh=i,Bh}var Gh,qv;function Uh(){return qv||(qv=1,Gh={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}),Gh}var Kv;function rb(){if(Kv)return $i;Kv=1;var t=So(),n=tb(),i=$v(),a=Xv(),f=Uh(),s=0,l=1,d=3,v=4,I=5,B=0,p=1,U=-2,q=-3,D=-5,pe=-1,ue=1,x=2,A=3,g=4,b=0,P=2,F=8,J=9,Te=15,nt=8,ut=29,it=256,st=it+1+ut,tt=30,Re=19,Ot=2*st+1,xt=15,Ie=3,Ze=258,St=Ze+Ie+1,$t=32,Wt=42,Qt=69,sr=73,br=91,lr=103,Kt=113,wr=666,Gt=1,Mt=2,dn=3,Qr=4,kt=3;function Nr(u,de){return u.msg=f[de],de}function Fr(u){return(u<<1)-(u>4?9:0)}function Xr(u){for(var de=u.length;--de>=0;)u[de]=0}function Jr(u){var de=u.state,ye=de.pending;ye>u.avail_out&&(ye=u.avail_out),ye!==0&&(t.arraySet(u.output,de.pending_buf,de.pending_out,ye,u.next_out),u.next_out+=ye,de.pending_out+=ye,u.total_out+=ye,u.avail_out-=ye,de.pending-=ye,de.pending===0&&(de.pending_out=0))}function ar(u,de){n._tr_flush_block(u,u.block_start>=0?u.block_start:-1,u.strstart-u.block_start,de),u.block_start=u.strstart,Jr(u.strm)}function Pt(u,de){u.pending_buf[u.pending++]=de}function Dn(u,de){u.pending_buf[u.pending++]=de>>>8&255,u.pending_buf[u.pending++]=de&255}function Ln(u,de,ye,w){var V=u.avail_in;return V>w&&(V=w),V===0?0:(u.avail_in-=V,t.arraySet(de,u.input,u.next_in,V,ye),u.state.wrap===1?u.adler=i(u.adler,de,V,ye):u.state.wrap===2&&(u.adler=a(u.adler,de,V,ye)),u.next_in+=V,u.total_in+=V,V)}function en(u,de){var ye=u.max_chain_length,w=u.strstart,V,ce,Et=u.prev_length,at=u.nice_match,mt=u.strstart>u.w_size-St?u.strstart-(u.w_size-St):0,ur=u.window,mi=u.w_mask,kr=u.prev,dr=u.strstart+Ze,Yr=ur[w+Et-1],_n=ur[w+Et];u.prev_length>=u.good_match&&(ye>>=2),at>u.lookahead&&(at=u.lookahead);do if(V=de,!(ur[V+Et]!==_n||ur[V+Et-1]!==Yr||ur[V]!==ur[w]||ur[++V]!==ur[w+1])){w+=2,V++;do;while(ur[++w]===ur[++V]&&ur[++w]===ur[++V]&&ur[++w]===ur[++V]&&ur[++w]===ur[++V]&&ur[++w]===ur[++V]&&ur[++w]===ur[++V]&&ur[++w]===ur[++V]&&ur[++w]===ur[++V]&&w<dr);if(ce=Ze-(dr-w),w=dr-Ze,ce>Et){if(u.match_start=de,Et=ce,ce>=at)break;Yr=ur[w+Et-1],_n=ur[w+Et]}}while((de=kr[de&mi])>mt&&--ye!==0);return Et<=u.lookahead?Et:u.lookahead}function on(u){var de=u.w_size,ye,w,V,ce,Et;do{if(ce=u.window_size-u.lookahead-u.strstart,u.strstart>=de+(de-St)){t.arraySet(u.window,u.window,de,de,0),u.match_start-=de,u.strstart-=de,u.block_start-=de,w=u.hash_size,ye=w;do V=u.head[--ye],u.head[ye]=V>=de?V-de:0;while(--w);w=de,ye=w;do V=u.prev[--ye],u.prev[ye]=V>=de?V-de:0;while(--w);ce+=de}if(u.strm.avail_in===0)break;if(w=Ln(u.strm,u.window,u.strstart+u.lookahead,ce),u.lookahead+=w,u.lookahead+u.insert>=Ie)for(Et=u.strstart-u.insert,u.ins_h=u.window[Et],u.ins_h=(u.ins_h<<u.hash_shift^u.window[Et+1])&u.hash_mask;u.insert&&(u.ins_h=(u.ins_h<<u.hash_shift^u.window[Et+Ie-1])&u.hash_mask,u.prev[Et&u.w_mask]=u.head[u.ins_h],u.head[u.ins_h]=Et,Et++,u.insert--,!(u.lookahead+u.insert<Ie)););}while(u.lookahead<St&&u.strm.avail_in!==0)}function E(u,de){var ye=65535;for(ye>u.pending_buf_size-5&&(ye=u.pending_buf_size-5);;){if(u.lookahead<=1){if(on(u),u.lookahead===0&&de===s)return Gt;if(u.lookahead===0)break}u.strstart+=u.lookahead,u.lookahead=0;var w=u.block_start+ye;if((u.strstart===0||u.strstart>=w)&&(u.lookahead=u.strstart-w,u.strstart=w,ar(u,!1),u.strm.avail_out===0)||u.strstart-u.block_start>=u.w_size-St&&(ar(u,!1),u.strm.avail_out===0))return Gt}return u.insert=0,de===v?(ar(u,!0),u.strm.avail_out===0?dn:Qr):(u.strstart>u.block_start&&(ar(u,!1),u.strm.avail_out===0),Gt)}function pi(u,de){for(var ye,w;;){if(u.lookahead<St){if(on(u),u.lookahead<St&&de===s)return Gt;if(u.lookahead===0)break}if(ye=0,u.lookahead>=Ie&&(u.ins_h=(u.ins_h<<u.hash_shift^u.window[u.strstart+Ie-1])&u.hash_mask,ye=u.prev[u.strstart&u.w_mask]=u.head[u.ins_h],u.head[u.ins_h]=u.strstart),ye!==0&&u.strstart-ye<=u.w_size-St&&(u.match_length=en(u,ye)),u.match_length>=Ie)if(w=n._tr_tally(u,u.strstart-u.match_start,u.match_length-Ie),u.lookahead-=u.match_length,u.match_length<=u.max_lazy_match&&u.lookahead>=Ie){u.match_length--;do u.strstart++,u.ins_h=(u.ins_h<<u.hash_shift^u.window[u.strstart+Ie-1])&u.hash_mask,ye=u.prev[u.strstart&u.w_mask]=u.head[u.ins_h],u.head[u.ins_h]=u.strstart;while(--u.match_length!==0);u.strstart++}else u.strstart+=u.match_length,u.match_length=0,u.ins_h=u.window[u.strstart],u.ins_h=(u.ins_h<<u.hash_shift^u.window[u.strstart+1])&u.hash_mask;else w=n._tr_tally(u,0,u.window[u.strstart]),u.lookahead--,u.strstart++;if(w&&(ar(u,!1),u.strm.avail_out===0))return Gt}return u.insert=u.strstart<Ie-1?u.strstart:Ie-1,de===v?(ar(u,!0),u.strm.avail_out===0?dn:Qr):u.last_lit&&(ar(u,!1),u.strm.avail_out===0)?Gt:Mt}function vn(u,de){for(var ye,w,V;;){if(u.lookahead<St){if(on(u),u.lookahead<St&&de===s)return Gt;if(u.lookahead===0)break}if(ye=0,u.lookahead>=Ie&&(u.ins_h=(u.ins_h<<u.hash_shift^u.window[u.strstart+Ie-1])&u.hash_mask,ye=u.prev[u.strstart&u.w_mask]=u.head[u.ins_h],u.head[u.ins_h]=u.strstart),u.prev_length=u.match_length,u.prev_match=u.match_start,u.match_length=Ie-1,ye!==0&&u.prev_length<u.max_lazy_match&&u.strstart-ye<=u.w_size-St&&(u.match_length=en(u,ye),u.match_length<=5&&(u.strategy===ue||u.match_length===Ie&&u.strstart-u.match_start>4096)&&(u.match_length=Ie-1)),u.prev_length>=Ie&&u.match_length<=u.prev_length){V=u.strstart+u.lookahead-Ie,w=n._tr_tally(u,u.strstart-1-u.prev_match,u.prev_length-Ie),u.lookahead-=u.prev_length-1,u.prev_length-=2;do++u.strstart<=V&&(u.ins_h=(u.ins_h<<u.hash_shift^u.window[u.strstart+Ie-1])&u.hash_mask,ye=u.prev[u.strstart&u.w_mask]=u.head[u.ins_h],u.head[u.ins_h]=u.strstart);while(--u.prev_length!==0);if(u.match_available=0,u.match_length=Ie-1,u.strstart++,w&&(ar(u,!1),u.strm.avail_out===0))return Gt}else if(u.match_available){if(w=n._tr_tally(u,0,u.window[u.strstart-1]),w&&ar(u,!1),u.strstart++,u.lookahead--,u.strm.avail_out===0)return Gt}else u.match_available=1,u.strstart++,u.lookahead--}return u.match_available&&(w=n._tr_tally(u,0,u.window[u.strstart-1]),u.match_available=0),u.insert=u.strstart<Ie-1?u.strstart:Ie-1,de===v?(ar(u,!0),u.strm.avail_out===0?dn:Qr):u.last_lit&&(ar(u,!1),u.strm.avail_out===0)?Gt:Mt}function Zi(u,de){for(var ye,w,V,ce,Et=u.window;;){if(u.lookahead<=Ze){if(on(u),u.lookahead<=Ze&&de===s)return Gt;if(u.lookahead===0)break}if(u.match_length=0,u.lookahead>=Ie&&u.strstart>0&&(V=u.strstart-1,w=Et[V],w===Et[++V]&&w===Et[++V]&&w===Et[++V])){ce=u.strstart+Ze;do;while(w===Et[++V]&&w===Et[++V]&&w===Et[++V]&&w===Et[++V]&&w===Et[++V]&&w===Et[++V]&&w===Et[++V]&&w===Et[++V]&&V<ce);u.match_length=Ze-(ce-V),u.match_length>u.lookahead&&(u.match_length=u.lookahead)}if(u.match_length>=Ie?(ye=n._tr_tally(u,1,u.match_length-Ie),u.lookahead-=u.match_length,u.strstart+=u.match_length,u.match_length=0):(ye=n._tr_tally(u,0,u.window[u.strstart]),u.lookahead--,u.strstart++),ye&&(ar(u,!1),u.strm.avail_out===0))return Gt}return u.insert=0,de===v?(ar(u,!0),u.strm.avail_out===0?dn:Qr):u.last_lit&&(ar(u,!1),u.strm.avail_out===0)?Gt:Mt}function Gn(u,de){for(var ye;;){if(u.lookahead===0&&(on(u),u.lookahead===0)){if(de===s)return Gt;break}if(u.match_length=0,ye=n._tr_tally(u,0,u.window[u.strstart]),u.lookahead--,u.strstart++,ye&&(ar(u,!1),u.strm.avail_out===0))return Gt}return u.insert=0,de===v?(ar(u,!0),u.strm.avail_out===0?dn:Qr):u.last_lit&&(ar(u,!1),u.strm.avail_out===0)?Gt:Mt}function Tr(u,de,ye,w,V){this.good_length=u,this.max_lazy=de,this.nice_length=ye,this.max_chain=w,this.func=V}var Rn;Rn=[new Tr(0,0,0,0,E),new Tr(4,4,8,4,pi),new Tr(4,5,16,8,pi),new Tr(4,6,32,32,pi),new Tr(4,4,16,16,vn),new Tr(8,16,32,32,vn),new Tr(8,16,128,128,vn),new Tr(8,32,128,256,vn),new Tr(32,128,258,1024,vn),new Tr(32,258,258,4096,vn)];function Un(u){u.window_size=2*u.w_size,Xr(u.head),u.max_lazy_match=Rn[u.level].max_lazy,u.good_match=Rn[u.level].good_length,u.nice_match=Rn[u.level].nice_length,u.max_chain_length=Rn[u.level].max_chain,u.strstart=0,u.block_start=0,u.lookahead=0,u.insert=0,u.match_length=u.prev_length=Ie-1,u.match_available=0,u.ins_h=0}function C(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=F,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new t.Buf16(Ot*2),this.dyn_dtree=new t.Buf16((2*tt+1)*2),this.bl_tree=new t.Buf16((2*Re+1)*2),Xr(this.dyn_ltree),Xr(this.dyn_dtree),Xr(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new t.Buf16(xt+1),this.heap=new t.Buf16(2*st+1),Xr(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new t.Buf16(2*st+1),Xr(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Ue(u){var de;return!u||!u.state?Nr(u,U):(u.total_in=u.total_out=0,u.data_type=P,de=u.state,de.pending=0,de.pending_out=0,de.wrap<0&&(de.wrap=-de.wrap),de.status=de.wrap?Wt:Kt,u.adler=de.wrap===2?0:1,de.last_flush=s,n._tr_init(de),B)}function Xe(u){var de=Ue(u);return de===B&&Un(u.state),de}function dt(u,de){return!u||!u.state||u.state.wrap!==2?U:(u.state.gzhead=de,B)}function Z(u,de,ye,w,V,ce){if(!u)return U;var Et=1;if(de===pe&&(de=6),w<0?(Et=0,w=-w):w>15&&(Et=2,w-=16),V<1||V>J||ye!==F||w<8||w>15||de<0||de>9||ce<0||ce>g)return Nr(u,U);w===8&&(w=9);var at=new C;return u.state=at,at.strm=u,at.wrap=Et,at.gzhead=null,at.w_bits=w,at.w_size=1<<at.w_bits,at.w_mask=at.w_size-1,at.hash_bits=V+7,at.hash_size=1<<at.hash_bits,at.hash_mask=at.hash_size-1,at.hash_shift=~~((at.hash_bits+Ie-1)/Ie),at.window=new t.Buf8(at.w_size*2),at.head=new t.Buf16(at.hash_size),at.prev=new t.Buf16(at.w_size),at.lit_bufsize=1<<V+6,at.pending_buf_size=at.lit_bufsize*4,at.pending_buf=new t.Buf8(at.pending_buf_size),at.d_buf=1*at.lit_bufsize,at.l_buf=(1+2)*at.lit_bufsize,at.level=de,at.strategy=ce,at.method=ye,Xe(u)}function we(u,de){return Z(u,de,F,Te,nt,b)}function m(u,de){var ye,w,V,ce;if(!u||!u.state||de>I||de<0)return u?Nr(u,U):U;if(w=u.state,!u.output||!u.input&&u.avail_in!==0||w.status===wr&&de!==v)return Nr(u,u.avail_out===0?D:U);if(w.strm=u,ye=w.last_flush,w.last_flush=de,w.status===Wt)if(w.wrap===2)u.adler=0,Pt(w,31),Pt(w,139),Pt(w,8),w.gzhead?(Pt(w,(w.gzhead.text?1:0)+(w.gzhead.hcrc?2:0)+(w.gzhead.extra?4:0)+(w.gzhead.name?8:0)+(w.gzhead.comment?16:0)),Pt(w,w.gzhead.time&255),Pt(w,w.gzhead.time>>8&255),Pt(w,w.gzhead.time>>16&255),Pt(w,w.gzhead.time>>24&255),Pt(w,w.level===9?2:w.strategy>=x||w.level<2?4:0),Pt(w,w.gzhead.os&255),w.gzhead.extra&&w.gzhead.extra.length&&(Pt(w,w.gzhead.extra.length&255),Pt(w,w.gzhead.extra.length>>8&255)),w.gzhead.hcrc&&(u.adler=a(u.adler,w.pending_buf,w.pending,0)),w.gzindex=0,w.status=Qt):(Pt(w,0),Pt(w,0),Pt(w,0),Pt(w,0),Pt(w,0),Pt(w,w.level===9?2:w.strategy>=x||w.level<2?4:0),Pt(w,kt),w.status=Kt);else{var Et=F+(w.w_bits-8<<4)<<8,at=-1;w.strategy>=x||w.level<2?at=0:w.level<6?at=1:w.level===6?at=2:at=3,Et|=at<<6,w.strstart!==0&&(Et|=$t),Et+=31-Et%31,w.status=Kt,Dn(w,Et),w.strstart!==0&&(Dn(w,u.adler>>>16),Dn(w,u.adler&65535)),u.adler=1}if(w.status===Qt)if(w.gzhead.extra){for(V=w.pending;w.gzindex<(w.gzhead.extra.length&65535)&&!(w.pending===w.pending_buf_size&&(w.gzhead.hcrc&&w.pending>V&&(u.adler=a(u.adler,w.pending_buf,w.pending-V,V)),Jr(u),V=w.pending,w.pending===w.pending_buf_size));)Pt(w,w.gzhead.extra[w.gzindex]&255),w.gzindex++;w.gzhead.hcrc&&w.pending>V&&(u.adler=a(u.adler,w.pending_buf,w.pending-V,V)),w.gzindex===w.gzhead.extra.length&&(w.gzindex=0,w.status=sr)}else w.status=sr;if(w.status===sr)if(w.gzhead.name){V=w.pending;do{if(w.pending===w.pending_buf_size&&(w.gzhead.hcrc&&w.pending>V&&(u.adler=a(u.adler,w.pending_buf,w.pending-V,V)),Jr(u),V=w.pending,w.pending===w.pending_buf_size)){ce=1;break}w.gzindex<w.gzhead.name.length?ce=w.gzhead.name.charCodeAt(w.gzindex++)&255:ce=0,Pt(w,ce)}while(ce!==0);w.gzhead.hcrc&&w.pending>V&&(u.adler=a(u.adler,w.pending_buf,w.pending-V,V)),ce===0&&(w.gzindex=0,w.status=br)}else w.status=br;if(w.status===br)if(w.gzhead.comment){V=w.pending;do{if(w.pending===w.pending_buf_size&&(w.gzhead.hcrc&&w.pending>V&&(u.adler=a(u.adler,w.pending_buf,w.pending-V,V)),Jr(u),V=w.pending,w.pending===w.pending_buf_size)){ce=1;break}w.gzindex<w.gzhead.comment.length?ce=w.gzhead.comment.charCodeAt(w.gzindex++)&255:ce=0,Pt(w,ce)}while(ce!==0);w.gzhead.hcrc&&w.pending>V&&(u.adler=a(u.adler,w.pending_buf,w.pending-V,V)),ce===0&&(w.status=lr)}else w.status=lr;if(w.status===lr&&(w.gzhead.hcrc?(w.pending+2>w.pending_buf_size&&Jr(u),w.pending+2<=w.pending_buf_size&&(Pt(w,u.adler&255),Pt(w,u.adler>>8&255),u.adler=0,w.status=Kt)):w.status=Kt),w.pending!==0){if(Jr(u),u.avail_out===0)return w.last_flush=-1,B}else if(u.avail_in===0&&Fr(de)<=Fr(ye)&&de!==v)return Nr(u,D);if(w.status===wr&&u.avail_in!==0)return Nr(u,D);if(u.avail_in!==0||w.lookahead!==0||de!==s&&w.status!==wr){var mt=w.strategy===x?Gn(w,de):w.strategy===A?Zi(w,de):Rn[w.level].func(w,de);if((mt===dn||mt===Qr)&&(w.status=wr),mt===Gt||mt===dn)return u.avail_out===0&&(w.last_flush=-1),B;if(mt===Mt&&(de===l?n._tr_align(w):de!==I&&(n._tr_stored_block(w,0,0,!1),de===d&&(Xr(w.head),w.lookahead===0&&(w.strstart=0,w.block_start=0,w.insert=0))),Jr(u),u.avail_out===0))return w.last_flush=-1,B}return de!==v?B:w.wrap<=0?p:(w.wrap===2?(Pt(w,u.adler&255),Pt(w,u.adler>>8&255),Pt(w,u.adler>>16&255),Pt(w,u.adler>>24&255),Pt(w,u.total_in&255),Pt(w,u.total_in>>8&255),Pt(w,u.total_in>>16&255),Pt(w,u.total_in>>24&255)):(Dn(w,u.adler>>>16),Dn(w,u.adler&65535)),Jr(u),w.wrap>0&&(w.wrap=-w.wrap),w.pending!==0?B:p)}function He(u){var de;return!u||!u.state?U:(de=u.state.status,de!==Wt&&de!==Qt&&de!==sr&&de!==br&&de!==lr&&de!==Kt&&de!==wr?Nr(u,U):(u.state=null,de===Kt?Nr(u,q):B))}function Nt(u,de){var ye=de.length,w,V,ce,Et,at,mt,ur,mi;if(!u||!u.state||(w=u.state,Et=w.wrap,Et===2||Et===1&&w.status!==Wt||w.lookahead))return U;for(Et===1&&(u.adler=i(u.adler,de,ye,0)),w.wrap=0,ye>=w.w_size&&(Et===0&&(Xr(w.head),w.strstart=0,w.block_start=0,w.insert=0),mi=new t.Buf8(w.w_size),t.arraySet(mi,de,ye-w.w_size,w.w_size,0),de=mi,ye=w.w_size),at=u.avail_in,mt=u.next_in,ur=u.input,u.avail_in=ye,u.next_in=0,u.input=de,on(w);w.lookahead>=Ie;){V=w.strstart,ce=w.lookahead-(Ie-1);do w.ins_h=(w.ins_h<<w.hash_shift^w.window[V+Ie-1])&w.hash_mask,w.prev[V&w.w_mask]=w.head[w.ins_h],w.head[w.ins_h]=V,V++;while(--ce);w.strstart=V,w.lookahead=Ie-1,on(w)}return w.strstart+=w.lookahead,w.block_start=w.strstart,w.insert=w.lookahead,w.lookahead=0,w.match_length=w.prev_length=Ie-1,w.match_available=0,u.next_in=mt,u.input=ur,u.avail_in=at,w.wrap=Et,B}return $i.deflateInit=we,$i.deflateInit2=Z,$i.deflateReset=Xe,$i.deflateResetKeep=Ue,$i.deflateSetHeader=dt,$i.deflate=m,$i.deflateEnd=He,$i.deflateSetDictionary=Nt,$i.deflateInfo="pako deflate (from Nodeca project)",$i}var ns={},jv;function Qv(){if(jv)return ns;jv=1;var t=So(),n=!0,i=!0;try{String.fromCharCode.apply(null,[0])}catch{n=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{i=!1}for(var a=new t.Buf8(256),f=0;f<256;f++)a[f]=f>=252?6:f>=248?5:f>=240?4:f>=224?3:f>=192?2:1;a[254]=a[254]=1,ns.string2buf=function(l){var d,v,I,B,p,U=l.length,q=0;for(B=0;B<U;B++)v=l.charCodeAt(B),(v&64512)===55296&&B+1<U&&(I=l.charCodeAt(B+1),(I&64512)===56320&&(v=65536+(v-55296<<10)+(I-56320),B++)),q+=v<128?1:v<2048?2:v<65536?3:4;for(d=new t.Buf8(q),p=0,B=0;p<q;B++)v=l.charCodeAt(B),(v&64512)===55296&&B+1<U&&(I=l.charCodeAt(B+1),(I&64512)===56320&&(v=65536+(v-55296<<10)+(I-56320),B++)),v<128?d[p++]=v:v<2048?(d[p++]=192|v>>>6,d[p++]=128|v&63):v<65536?(d[p++]=224|v>>>12,d[p++]=128|v>>>6&63,d[p++]=128|v&63):(d[p++]=240|v>>>18,d[p++]=128|v>>>12&63,d[p++]=128|v>>>6&63,d[p++]=128|v&63);return d};function s(l,d){if(d<65534&&(l.subarray&&i||!l.subarray&&n))return String.fromCharCode.apply(null,t.shrinkBuf(l,d));for(var v="",I=0;I<d;I++)v+=String.fromCharCode(l[I]);return v}return ns.buf2binstring=function(l){return s(l,l.length)},ns.binstring2buf=function(l){for(var d=new t.Buf8(l.length),v=0,I=d.length;v<I;v++)d[v]=l.charCodeAt(v);return d},ns.buf2string=function(l,d){var v,I,B,p,U=d||l.length,q=new Array(U*2);for(I=0,v=0;v<U;){if(B=l[v++],B<128){q[I++]=B;continue}if(p=a[B],p>4){q[I++]=65533,v+=p-1;continue}for(B&=p===2?31:p===3?15:7;p>1&&v<U;)B=B<<6|l[v++]&63,p--;if(p>1){q[I++]=65533;continue}B<65536?q[I++]=B:(B-=65536,q[I++]=55296|B>>10&1023,q[I++]=56320|B&1023)}return s(q,I)},ns.utf8border=function(l,d){var v;for(d=d||l.length,d>l.length&&(d=l.length),v=d-1;v>=0&&(l[v]&192)===128;)v--;return v<0||v===0?d:v+a[l[v]]>d?v:d},ns}var Yh,Jv;function e_(){if(Jv)return Yh;Jv=1;function t(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}return Yh=t,Yh}var t_;function nb(){if(t_)return qs;t_=1;var t=rb(),n=So(),i=Qv(),a=Uh(),f=e_(),s=Object.prototype.toString,l=0,d=4,v=0,I=1,B=2,p=-1,U=0,q=8;function D(A){if(!(this instanceof D))return new D(A);this.options=n.assign({level:p,method:q,chunkSize:16384,windowBits:15,memLevel:8,strategy:U,to:""},A||{});var g=this.options;g.raw&&g.windowBits>0?g.windowBits=-g.windowBits:g.gzip&&g.windowBits>0&&g.windowBits<16&&(g.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var b=t.deflateInit2(this.strm,g.level,g.method,g.windowBits,g.memLevel,g.strategy);if(b!==v)throw new Error(a[b]);if(g.header&&t.deflateSetHeader(this.strm,g.header),g.dictionary){var P;if(typeof g.dictionary=="string"?P=i.string2buf(g.dictionary):s.call(g.dictionary)==="[object ArrayBuffer]"?P=new Uint8Array(g.dictionary):P=g.dictionary,b=t.deflateSetDictionary(this.strm,P),b!==v)throw new Error(a[b]);this._dict_set=!0}}D.prototype.push=function(A,g){var b=this.strm,P=this.options.chunkSize,F,J;if(this.ended)return!1;J=g===~~g?g:g===!0?d:l,typeof A=="string"?b.input=i.string2buf(A):s.call(A)==="[object ArrayBuffer]"?b.input=new Uint8Array(A):b.input=A,b.next_in=0,b.avail_in=b.input.length;do{if(b.avail_out===0&&(b.output=new n.Buf8(P),b.next_out=0,b.avail_out=P),F=t.deflate(b,J),F!==I&&F!==v)return this.onEnd(F),this.ended=!0,!1;(b.avail_out===0||b.avail_in===0&&(J===d||J===B))&&(this.options.to==="string"?this.onData(i.buf2binstring(n.shrinkBuf(b.output,b.next_out))):this.onData(n.shrinkBuf(b.output,b.next_out)))}while((b.avail_in>0||b.avail_out===0)&&F!==I);return J===d?(F=t.deflateEnd(this.strm),this.onEnd(F),this.ended=!0,F===v):(J===B&&(this.onEnd(v),b.avail_out=0),!0)},D.prototype.onData=function(A){this.chunks.push(A)},D.prototype.onEnd=function(A){A===v&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=n.flattenChunks(this.chunks)),this.chunks=[],this.err=A,this.msg=this.strm.msg};function pe(A,g){var b=new D(g);if(b.push(A,!0),b.err)throw b.msg||a[b.err];return b.result}function ue(A,g){return g=g||{},g.raw=!0,pe(A,g)}function x(A,g){return g=g||{},g.gzip=!0,pe(A,g)}return qs.Deflate=D,qs.deflate=pe,qs.deflateRaw=ue,qs.gzip=x,qs}var Ks={},Mi={},Hh,r_;function ib(){if(r_)return Hh;r_=1;var t=30,n=12;return Hh=function(a,f){var s,l,d,v,I,B,p,U,q,D,pe,ue,x,A,g,b,P,F,J,Te,nt,ut,it,st,tt;s=a.state,l=a.next_in,st=a.input,d=l+(a.avail_in-5),v=a.next_out,tt=a.output,I=v-(f-a.avail_out),B=v+(a.avail_out-257),p=s.dmax,U=s.wsize,q=s.whave,D=s.wnext,pe=s.window,ue=s.hold,x=s.bits,A=s.lencode,g=s.distcode,b=(1<<s.lenbits)-1,P=(1<<s.distbits)-1;e:do{x<15&&(ue+=st[l++]<<x,x+=8,ue+=st[l++]<<x,x+=8),F=A[ue&b];t:for(;;){if(J=F>>>24,ue>>>=J,x-=J,J=F>>>16&255,J===0)tt[v++]=F&65535;else if(J&16){Te=F&65535,J&=15,J&&(x<J&&(ue+=st[l++]<<x,x+=8),Te+=ue&(1<<J)-1,ue>>>=J,x-=J),x<15&&(ue+=st[l++]<<x,x+=8,ue+=st[l++]<<x,x+=8),F=g[ue&P];r:for(;;){if(J=F>>>24,ue>>>=J,x-=J,J=F>>>16&255,J&16){if(nt=F&65535,J&=15,x<J&&(ue+=st[l++]<<x,x+=8,x<J&&(ue+=st[l++]<<x,x+=8)),nt+=ue&(1<<J)-1,nt>p){a.msg="invalid distance too far back",s.mode=t;break e}if(ue>>>=J,x-=J,J=v-I,nt>J){if(J=nt-J,J>q&&s.sane){a.msg="invalid distance too far back",s.mode=t;break e}if(ut=0,it=pe,D===0){if(ut+=U-J,J<Te){Te-=J;do tt[v++]=pe[ut++];while(--J);ut=v-nt,it=tt}}else if(D<J){if(ut+=U+D-J,J-=D,J<Te){Te-=J;do tt[v++]=pe[ut++];while(--J);if(ut=0,D<Te){J=D,Te-=J;do tt[v++]=pe[ut++];while(--J);ut=v-nt,it=tt}}}else if(ut+=D-J,J<Te){Te-=J;do tt[v++]=pe[ut++];while(--J);ut=v-nt,it=tt}for(;Te>2;)tt[v++]=it[ut++],tt[v++]=it[ut++],tt[v++]=it[ut++],Te-=3;Te&&(tt[v++]=it[ut++],Te>1&&(tt[v++]=it[ut++]))}else{ut=v-nt;do tt[v++]=tt[ut++],tt[v++]=tt[ut++],tt[v++]=tt[ut++],Te-=3;while(Te>2);Te&&(tt[v++]=tt[ut++],Te>1&&(tt[v++]=tt[ut++]))}}else if((J&64)===0){F=g[(F&65535)+(ue&(1<<J)-1)];continue r}else{a.msg="invalid distance code",s.mode=t;break e}break}}else if((J&64)===0){F=A[(F&65535)+(ue&(1<<J)-1)];continue t}else if(J&32){s.mode=n;break e}else{a.msg="invalid literal/length code",s.mode=t;break e}break}}while(l<d&&v<B);Te=x>>3,l-=Te,x-=Te<<3,ue&=(1<<x)-1,a.next_in=l,a.next_out=v,a.avail_in=l<d?5+(d-l):5-(l-d),a.avail_out=v<B?257+(B-v):257-(v-B),s.hold=ue,s.bits=x},Hh}var zh,n_;function ab(){if(n_)return zh;n_=1;var t=So(),n=15,i=852,a=592,f=0,s=1,l=2,d=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],v=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],I=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],B=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];return zh=function(U,q,D,pe,ue,x,A,g){var b=g.bits,P=0,F=0,J=0,Te=0,nt=0,ut=0,it=0,st=0,tt=0,Re=0,Ot,xt,Ie,Ze,St,$t=null,Wt=0,Qt,sr=new t.Buf16(n+1),br=new t.Buf16(n+1),lr=null,Kt=0,wr,Gt,Mt;for(P=0;P<=n;P++)sr[P]=0;for(F=0;F<pe;F++)sr[q[D+F]]++;for(nt=b,Te=n;Te>=1&&sr[Te]===0;Te--);if(nt>Te&&(nt=Te),Te===0)return ue[x++]=1<<24|64<<16|0,ue[x++]=1<<24|64<<16|0,g.bits=1,0;for(J=1;J<Te&&sr[J]===0;J++);for(nt<J&&(nt=J),st=1,P=1;P<=n;P++)if(st<<=1,st-=sr[P],st<0)return-1;if(st>0&&(U===f||Te!==1))return-1;for(br[1]=0,P=1;P<n;P++)br[P+1]=br[P]+sr[P];for(F=0;F<pe;F++)q[D+F]!==0&&(A[br[q[D+F]]++]=F);if(U===f?($t=lr=A,Qt=19):U===s?($t=d,Wt-=257,lr=v,Kt-=257,Qt=256):($t=I,lr=B,Qt=-1),Re=0,F=0,P=J,St=x,ut=nt,it=0,Ie=-1,tt=1<<nt,Ze=tt-1,U===s&&tt>i||U===l&&tt>a)return 1;for(;;){wr=P-it,A[F]<Qt?(Gt=0,Mt=A[F]):A[F]>Qt?(Gt=lr[Kt+A[F]],Mt=$t[Wt+A[F]]):(Gt=32+64,Mt=0),Ot=1<<P-it,xt=1<<ut,J=xt;do xt-=Ot,ue[St+(Re>>it)+xt]=wr<<24|Gt<<16|Mt|0;while(xt!==0);for(Ot=1<<P-1;Re&Ot;)Ot>>=1;if(Ot!==0?(Re&=Ot-1,Re+=Ot):Re=0,F++,--sr[P]===0){if(P===Te)break;P=q[D+A[F]]}if(P>nt&&(Re&Ze)!==Ie){for(it===0&&(it=nt),St+=J,ut=P-it,st=1<<ut;ut+it<Te&&(st-=sr[ut+it],!(st<=0));)ut++,st<<=1;if(tt+=1<<ut,U===s&&tt>i||U===l&&tt>a)return 1;Ie=Re&Ze,ue[Ie]=nt<<24|ut<<16|St-x|0}}return Re!==0&&(ue[St+Re]=P-it<<24|64<<16|0),g.bits=nt,0},zh}var i_;function ob(){if(i_)return Mi;i_=1;var t=So(),n=$v(),i=Xv(),a=ib(),f=ab(),s=0,l=1,d=2,v=4,I=5,B=6,p=0,U=1,q=2,D=-2,pe=-3,ue=-4,x=-5,A=8,g=1,b=2,P=3,F=4,J=5,Te=6,nt=7,ut=8,it=9,st=10,tt=11,Re=12,Ot=13,xt=14,Ie=15,Ze=16,St=17,$t=18,Wt=19,Qt=20,sr=21,br=22,lr=23,Kt=24,wr=25,Gt=26,Mt=27,dn=28,Qr=29,kt=30,Nr=31,Fr=32,Xr=852,Jr=592,ar=15,Pt=ar;function Dn(Z){return(Z>>>24&255)+(Z>>>8&65280)+((Z&65280)<<8)+((Z&255)<<24)}function Ln(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new t.Buf16(320),this.work=new t.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function en(Z){var we;return!Z||!Z.state?D:(we=Z.state,Z.total_in=Z.total_out=we.total=0,Z.msg="",we.wrap&&(Z.adler=we.wrap&1),we.mode=g,we.last=0,we.havedict=0,we.dmax=32768,we.head=null,we.hold=0,we.bits=0,we.lencode=we.lendyn=new t.Buf32(Xr),we.distcode=we.distdyn=new t.Buf32(Jr),we.sane=1,we.back=-1,p)}function on(Z){var we;return!Z||!Z.state?D:(we=Z.state,we.wsize=0,we.whave=0,we.wnext=0,en(Z))}function E(Z,we){var m,He;return!Z||!Z.state||(He=Z.state,we<0?(m=0,we=-we):(m=(we>>4)+1,we<48&&(we&=15)),we&&(we<8||we>15))?D:(He.window!==null&&He.wbits!==we&&(He.window=null),He.wrap=m,He.wbits=we,on(Z))}function pi(Z,we){var m,He;return Z?(He=new Ln,Z.state=He,He.window=null,m=E(Z,we),m!==p&&(Z.state=null),m):D}function vn(Z){return pi(Z,Pt)}var Zi=!0,Gn,Tr;function Rn(Z){if(Zi){var we;for(Gn=new t.Buf32(512),Tr=new t.Buf32(32),we=0;we<144;)Z.lens[we++]=8;for(;we<256;)Z.lens[we++]=9;for(;we<280;)Z.lens[we++]=7;for(;we<288;)Z.lens[we++]=8;for(f(l,Z.lens,0,288,Gn,0,Z.work,{bits:9}),we=0;we<32;)Z.lens[we++]=5;f(d,Z.lens,0,32,Tr,0,Z.work,{bits:5}),Zi=!1}Z.lencode=Gn,Z.lenbits=9,Z.distcode=Tr,Z.distbits=5}function Un(Z,we,m,He){var Nt,u=Z.state;return u.window===null&&(u.wsize=1<<u.wbits,u.wnext=0,u.whave=0,u.window=new t.Buf8(u.wsize)),He>=u.wsize?(t.arraySet(u.window,we,m-u.wsize,u.wsize,0),u.wnext=0,u.whave=u.wsize):(Nt=u.wsize-u.wnext,Nt>He&&(Nt=He),t.arraySet(u.window,we,m-He,Nt,u.wnext),He-=Nt,He?(t.arraySet(u.window,we,m-He,He,0),u.wnext=He,u.whave=u.wsize):(u.wnext+=Nt,u.wnext===u.wsize&&(u.wnext=0),u.whave<u.wsize&&(u.whave+=Nt))),0}function C(Z,we){var m,He,Nt,u,de,ye,w,V,ce,Et,at,mt,ur,mi,kr=0,dr,Yr,_n,Cn,Na,Ba,jt,$n,sn=new t.Buf8(4),gi,Kn,js=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!Z||!Z.state||!Z.output||!Z.input&&Z.avail_in!==0)return D;m=Z.state,m.mode===Re&&(m.mode=Ot),de=Z.next_out,Nt=Z.output,w=Z.avail_out,u=Z.next_in,He=Z.input,ye=Z.avail_in,V=m.hold,ce=m.bits,Et=ye,at=w,$n=p;e:for(;;)switch(m.mode){case g:if(m.wrap===0){m.mode=Ot;break}for(;ce<16;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}if(m.wrap&2&&V===35615){m.check=0,sn[0]=V&255,sn[1]=V>>>8&255,m.check=i(m.check,sn,2,0),V=0,ce=0,m.mode=b;break}if(m.flags=0,m.head&&(m.head.done=!1),!(m.wrap&1)||(((V&255)<<8)+(V>>8))%31){Z.msg="incorrect header check",m.mode=kt;break}if((V&15)!==A){Z.msg="unknown compression method",m.mode=kt;break}if(V>>>=4,ce-=4,jt=(V&15)+8,m.wbits===0)m.wbits=jt;else if(jt>m.wbits){Z.msg="invalid window size",m.mode=kt;break}m.dmax=1<<jt,Z.adler=m.check=1,m.mode=V&512?st:Re,V=0,ce=0;break;case b:for(;ce<16;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}if(m.flags=V,(m.flags&255)!==A){Z.msg="unknown compression method",m.mode=kt;break}if(m.flags&57344){Z.msg="unknown header flags set",m.mode=kt;break}m.head&&(m.head.text=V>>8&1),m.flags&512&&(sn[0]=V&255,sn[1]=V>>>8&255,m.check=i(m.check,sn,2,0)),V=0,ce=0,m.mode=P;case P:for(;ce<32;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}m.head&&(m.head.time=V),m.flags&512&&(sn[0]=V&255,sn[1]=V>>>8&255,sn[2]=V>>>16&255,sn[3]=V>>>24&255,m.check=i(m.check,sn,4,0)),V=0,ce=0,m.mode=F;case F:for(;ce<16;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}m.head&&(m.head.xflags=V&255,m.head.os=V>>8),m.flags&512&&(sn[0]=V&255,sn[1]=V>>>8&255,m.check=i(m.check,sn,2,0)),V=0,ce=0,m.mode=J;case J:if(m.flags&1024){for(;ce<16;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}m.length=V,m.head&&(m.head.extra_len=V),m.flags&512&&(sn[0]=V&255,sn[1]=V>>>8&255,m.check=i(m.check,sn,2,0)),V=0,ce=0}else m.head&&(m.head.extra=null);m.mode=Te;case Te:if(m.flags&1024&&(mt=m.length,mt>ye&&(mt=ye),mt&&(m.head&&(jt=m.head.extra_len-m.length,m.head.extra||(m.head.extra=new Array(m.head.extra_len)),t.arraySet(m.head.extra,He,u,mt,jt)),m.flags&512&&(m.check=i(m.check,He,mt,u)),ye-=mt,u+=mt,m.length-=mt),m.length))break e;m.length=0,m.mode=nt;case nt:if(m.flags&2048){if(ye===0)break e;mt=0;do jt=He[u+mt++],m.head&&jt&&m.length<65536&&(m.head.name+=String.fromCharCode(jt));while(jt&&mt<ye);if(m.flags&512&&(m.check=i(m.check,He,mt,u)),ye-=mt,u+=mt,jt)break e}else m.head&&(m.head.name=null);m.length=0,m.mode=ut;case ut:if(m.flags&4096){if(ye===0)break e;mt=0;do jt=He[u+mt++],m.head&&jt&&m.length<65536&&(m.head.comment+=String.fromCharCode(jt));while(jt&&mt<ye);if(m.flags&512&&(m.check=i(m.check,He,mt,u)),ye-=mt,u+=mt,jt)break e}else m.head&&(m.head.comment=null);m.mode=it;case it:if(m.flags&512){for(;ce<16;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}if(V!==(m.check&65535)){Z.msg="header crc mismatch",m.mode=kt;break}V=0,ce=0}m.head&&(m.head.hcrc=m.flags>>9&1,m.head.done=!0),Z.adler=m.check=0,m.mode=Re;break;case st:for(;ce<32;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}Z.adler=m.check=Dn(V),V=0,ce=0,m.mode=tt;case tt:if(m.havedict===0)return Z.next_out=de,Z.avail_out=w,Z.next_in=u,Z.avail_in=ye,m.hold=V,m.bits=ce,q;Z.adler=m.check=1,m.mode=Re;case Re:if(we===I||we===B)break e;case Ot:if(m.last){V>>>=ce&7,ce-=ce&7,m.mode=Mt;break}for(;ce<3;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}switch(m.last=V&1,V>>>=1,ce-=1,V&3){case 0:m.mode=xt;break;case 1:if(Rn(m),m.mode=Qt,we===B){V>>>=2,ce-=2;break e}break;case 2:m.mode=St;break;case 3:Z.msg="invalid block type",m.mode=kt}V>>>=2,ce-=2;break;case xt:for(V>>>=ce&7,ce-=ce&7;ce<32;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}if((V&65535)!==(V>>>16^65535)){Z.msg="invalid stored block lengths",m.mode=kt;break}if(m.length=V&65535,V=0,ce=0,m.mode=Ie,we===B)break e;case Ie:m.mode=Ze;case Ze:if(mt=m.length,mt){if(mt>ye&&(mt=ye),mt>w&&(mt=w),mt===0)break e;t.arraySet(Nt,He,u,mt,de),ye-=mt,u+=mt,w-=mt,de+=mt,m.length-=mt;break}m.mode=Re;break;case St:for(;ce<14;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}if(m.nlen=(V&31)+257,V>>>=5,ce-=5,m.ndist=(V&31)+1,V>>>=5,ce-=5,m.ncode=(V&15)+4,V>>>=4,ce-=4,m.nlen>286||m.ndist>30){Z.msg="too many length or distance symbols",m.mode=kt;break}m.have=0,m.mode=$t;case $t:for(;m.have<m.ncode;){for(;ce<3;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}m.lens[js[m.have++]]=V&7,V>>>=3,ce-=3}for(;m.have<19;)m.lens[js[m.have++]]=0;if(m.lencode=m.lendyn,m.lenbits=7,gi={bits:m.lenbits},$n=f(s,m.lens,0,19,m.lencode,0,m.work,gi),m.lenbits=gi.bits,$n){Z.msg="invalid code lengths set",m.mode=kt;break}m.have=0,m.mode=Wt;case Wt:for(;m.have<m.nlen+m.ndist;){for(;kr=m.lencode[V&(1<<m.lenbits)-1],dr=kr>>>24,Yr=kr>>>16&255,_n=kr&65535,!(dr<=ce);){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}if(_n<16)V>>>=dr,ce-=dr,m.lens[m.have++]=_n;else{if(_n===16){for(Kn=dr+2;ce<Kn;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}if(V>>>=dr,ce-=dr,m.have===0){Z.msg="invalid bit length repeat",m.mode=kt;break}jt=m.lens[m.have-1],mt=3+(V&3),V>>>=2,ce-=2}else if(_n===17){for(Kn=dr+3;ce<Kn;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}V>>>=dr,ce-=dr,jt=0,mt=3+(V&7),V>>>=3,ce-=3}else{for(Kn=dr+7;ce<Kn;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}V>>>=dr,ce-=dr,jt=0,mt=11+(V&127),V>>>=7,ce-=7}if(m.have+mt>m.nlen+m.ndist){Z.msg="invalid bit length repeat",m.mode=kt;break}for(;mt--;)m.lens[m.have++]=jt}}if(m.mode===kt)break;if(m.lens[256]===0){Z.msg="invalid code -- missing end-of-block",m.mode=kt;break}if(m.lenbits=9,gi={bits:m.lenbits},$n=f(l,m.lens,0,m.nlen,m.lencode,0,m.work,gi),m.lenbits=gi.bits,$n){Z.msg="invalid literal/lengths set",m.mode=kt;break}if(m.distbits=6,m.distcode=m.distdyn,gi={bits:m.distbits},$n=f(d,m.lens,m.nlen,m.ndist,m.distcode,0,m.work,gi),m.distbits=gi.bits,$n){Z.msg="invalid distances set",m.mode=kt;break}if(m.mode=Qt,we===B)break e;case Qt:m.mode=sr;case sr:if(ye>=6&&w>=258){Z.next_out=de,Z.avail_out=w,Z.next_in=u,Z.avail_in=ye,m.hold=V,m.bits=ce,a(Z,at),de=Z.next_out,Nt=Z.output,w=Z.avail_out,u=Z.next_in,He=Z.input,ye=Z.avail_in,V=m.hold,ce=m.bits,m.mode===Re&&(m.back=-1);break}for(m.back=0;kr=m.lencode[V&(1<<m.lenbits)-1],dr=kr>>>24,Yr=kr>>>16&255,_n=kr&65535,!(dr<=ce);){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}if(Yr&&(Yr&240)===0){for(Cn=dr,Na=Yr,Ba=_n;kr=m.lencode[Ba+((V&(1<<Cn+Na)-1)>>Cn)],dr=kr>>>24,Yr=kr>>>16&255,_n=kr&65535,!(Cn+dr<=ce);){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}V>>>=Cn,ce-=Cn,m.back+=Cn}if(V>>>=dr,ce-=dr,m.back+=dr,m.length=_n,Yr===0){m.mode=Gt;break}if(Yr&32){m.back=-1,m.mode=Re;break}if(Yr&64){Z.msg="invalid literal/length code",m.mode=kt;break}m.extra=Yr&15,m.mode=br;case br:if(m.extra){for(Kn=m.extra;ce<Kn;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}m.length+=V&(1<<m.extra)-1,V>>>=m.extra,ce-=m.extra,m.back+=m.extra}m.was=m.length,m.mode=lr;case lr:for(;kr=m.distcode[V&(1<<m.distbits)-1],dr=kr>>>24,Yr=kr>>>16&255,_n=kr&65535,!(dr<=ce);){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}if((Yr&240)===0){for(Cn=dr,Na=Yr,Ba=_n;kr=m.distcode[Ba+((V&(1<<Cn+Na)-1)>>Cn)],dr=kr>>>24,Yr=kr>>>16&255,_n=kr&65535,!(Cn+dr<=ce);){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}V>>>=Cn,ce-=Cn,m.back+=Cn}if(V>>>=dr,ce-=dr,m.back+=dr,Yr&64){Z.msg="invalid distance code",m.mode=kt;break}m.offset=_n,m.extra=Yr&15,m.mode=Kt;case Kt:if(m.extra){for(Kn=m.extra;ce<Kn;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}m.offset+=V&(1<<m.extra)-1,V>>>=m.extra,ce-=m.extra,m.back+=m.extra}if(m.offset>m.dmax){Z.msg="invalid distance too far back",m.mode=kt;break}m.mode=wr;case wr:if(w===0)break e;if(mt=at-w,m.offset>mt){if(mt=m.offset-mt,mt>m.whave&&m.sane){Z.msg="invalid distance too far back",m.mode=kt;break}mt>m.wnext?(mt-=m.wnext,ur=m.wsize-mt):ur=m.wnext-mt,mt>m.length&&(mt=m.length),mi=m.window}else mi=Nt,ur=de-m.offset,mt=m.length;mt>w&&(mt=w),w-=mt,m.length-=mt;do Nt[de++]=mi[ur++];while(--mt);m.length===0&&(m.mode=sr);break;case Gt:if(w===0)break e;Nt[de++]=m.length,w--,m.mode=sr;break;case Mt:if(m.wrap){for(;ce<32;){if(ye===0)break e;ye--,V|=He[u++]<<ce,ce+=8}if(at-=w,Z.total_out+=at,m.total+=at,at&&(Z.adler=m.check=m.flags?i(m.check,Nt,at,de-at):n(m.check,Nt,at,de-at)),at=w,(m.flags?V:Dn(V))!==m.check){Z.msg="incorrect data check",m.mode=kt;break}V=0,ce=0}m.mode=dn;case dn:if(m.wrap&&m.flags){for(;ce<32;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}if(V!==(m.total&4294967295)){Z.msg="incorrect length check",m.mode=kt;break}V=0,ce=0}m.mode=Qr;case Qr:$n=U;break e;case kt:$n=pe;break e;case Nr:return ue;case Fr:default:return D}return Z.next_out=de,Z.avail_out=w,Z.next_in=u,Z.avail_in=ye,m.hold=V,m.bits=ce,(m.wsize||at!==Z.avail_out&&m.mode<kt&&(m.mode<Mt||we!==v))&&Un(Z,Z.output,Z.next_out,at-Z.avail_out),Et-=Z.avail_in,at-=Z.avail_out,Z.total_in+=Et,Z.total_out+=at,m.total+=at,m.wrap&&at&&(Z.adler=m.check=m.flags?i(m.check,Nt,at,Z.next_out-at):n(m.check,Nt,at,Z.next_out-at)),Z.data_type=m.bits+(m.last?64:0)+(m.mode===Re?128:0)+(m.mode===Qt||m.mode===Ie?256:0),(Et===0&&at===0||we===v)&&$n===p&&($n=x),$n}function Ue(Z){if(!Z||!Z.state)return D;var we=Z.state;return we.window&&(we.window=null),Z.state=null,p}function Xe(Z,we){var m;return!Z||!Z.state||(m=Z.state,(m.wrap&2)===0)?D:(m.head=we,we.done=!1,p)}function dt(Z,we){var m=we.length,He,Nt,u;return!Z||!Z.state||(He=Z.state,He.wrap!==0&&He.mode!==tt)?D:He.mode===tt&&(Nt=1,Nt=n(Nt,we,m,0),Nt!==He.check)?pe:(u=Un(Z,we,m,m),u?(He.mode=Nr,ue):(He.havedict=1,p))}return Mi.inflateReset=on,Mi.inflateReset2=E,Mi.inflateResetKeep=en,Mi.inflateInit=vn,Mi.inflateInit2=pi,Mi.inflate=C,Mi.inflateEnd=Ue,Mi.inflateGetHeader=Xe,Mi.inflateSetDictionary=dt,Mi.inflateInfo="pako inflate (from Nodeca project)",Mi}var Wh,a_;function o_(){return a_||(a_=1,Wh={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}),Wh}var Vh,s_;function sb(){if(s_)return Vh;s_=1;function t(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}return Vh=t,Vh}var f_;function fb(){if(f_)return Ks;f_=1;var t=ob(),n=So(),i=Qv(),a=o_(),f=Uh(),s=e_(),l=sb(),d=Object.prototype.toString;function v(p){if(!(this instanceof v))return new v(p);this.options=n.assign({chunkSize:16384,windowBits:0,to:""},p||{});var U=this.options;U.raw&&U.windowBits>=0&&U.windowBits<16&&(U.windowBits=-U.windowBits,U.windowBits===0&&(U.windowBits=-15)),U.windowBits>=0&&U.windowBits<16&&!(p&&p.windowBits)&&(U.windowBits+=32),U.windowBits>15&&U.windowBits<48&&(U.windowBits&15)===0&&(U.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var q=t.inflateInit2(this.strm,U.windowBits);if(q!==a.Z_OK)throw new Error(f[q]);if(this.header=new l,t.inflateGetHeader(this.strm,this.header),U.dictionary&&(typeof U.dictionary=="string"?U.dictionary=i.string2buf(U.dictionary):d.call(U.dictionary)==="[object ArrayBuffer]"&&(U.dictionary=new Uint8Array(U.dictionary)),U.raw&&(q=t.inflateSetDictionary(this.strm,U.dictionary),q!==a.Z_OK)))throw new Error(f[q])}v.prototype.push=function(p,U){var q=this.strm,D=this.options.chunkSize,pe=this.options.dictionary,ue,x,A,g,b,P=!1;if(this.ended)return!1;x=U===~~U?U:U===!0?a.Z_FINISH:a.Z_NO_FLUSH,typeof p=="string"?q.input=i.binstring2buf(p):d.call(p)==="[object ArrayBuffer]"?q.input=new Uint8Array(p):q.input=p,q.next_in=0,q.avail_in=q.input.length;do{if(q.avail_out===0&&(q.output=new n.Buf8(D),q.next_out=0,q.avail_out=D),ue=t.inflate(q,a.Z_NO_FLUSH),ue===a.Z_NEED_DICT&&pe&&(ue=t.inflateSetDictionary(this.strm,pe)),ue===a.Z_BUF_ERROR&&P===!0&&(ue=a.Z_OK,P=!1),ue!==a.Z_STREAM_END&&ue!==a.Z_OK)return this.onEnd(ue),this.ended=!0,!1;q.next_out&&(q.avail_out===0||ue===a.Z_STREAM_END||q.avail_in===0&&(x===a.Z_FINISH||x===a.Z_SYNC_FLUSH))&&(this.options.to==="string"?(A=i.utf8border(q.output,q.next_out),g=q.next_out-A,b=i.buf2string(q.output,A),q.next_out=g,q.avail_out=D-g,g&&n.arraySet(q.output,q.output,A,g,0),this.onData(b)):this.onData(n.shrinkBuf(q.output,q.next_out))),q.avail_in===0&&q.avail_out===0&&(P=!0)}while((q.avail_in>0||q.avail_out===0)&&ue!==a.Z_STREAM_END);return ue===a.Z_STREAM_END&&(x=a.Z_FINISH),x===a.Z_FINISH?(ue=t.inflateEnd(this.strm),this.onEnd(ue),this.ended=!0,ue===a.Z_OK):(x===a.Z_SYNC_FLUSH&&(this.onEnd(a.Z_OK),q.avail_out=0),!0)},v.prototype.onData=function(p){this.chunks.push(p)},v.prototype.onEnd=function(p){p===a.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=n.flattenChunks(this.chunks)),this.chunks=[],this.err=p,this.msg=this.strm.msg};function I(p,U){var q=new v(U);if(q.push(p,!0),q.err)throw q.msg||f[q.err];return q.result}function B(p,U){return U=U||{},U.raw=!0,I(p,U)}return Ks.Inflate=v,Ks.inflate=I,Ks.inflateRaw=B,Ks.ungzip=I,Ks}var $h,l_;function lb(){if(l_)return $h;l_=1;var t=So().assign,n=nb(),i=fb(),a=o_(),f={};return t(f,n,i,a),$h=f,$h}(function(t){(function(){var n={},i;t.exports=n,typeof eb=="function"?i=lb():i=window.pako,function(a,f){a.toRGBA8=function(s){var l=s.width,d=s.height;if(s.tabs.acTL==null)return[a.toRGBA8.decodeImage(s.data,l,d,s).buffer];var v=[];s.frames[0].data==null&&(s.frames[0].data=s.data);for(var I,B=new Uint8Array(l*d*4),p=0;p<s.frames.length;p++){var U=s.frames[p],q=U.rect.x,D=U.rect.y,pe=U.rect.width,ue=U.rect.height,x=a.toRGBA8.decodeImage(U.data,pe,ue,s);if(p==0?I=x:U.blend==0?a._copyTile(x,pe,ue,I,l,d,q,D,0):U.blend==1&&a._copyTile(x,pe,ue,I,l,d,q,D,1),v.push(I.buffer),I=I.slice(0),U.dispose!=0){if(U.dispose==1)a._copyTile(B,pe,ue,I,l,d,q,D,0);else if(U.dispose==2){for(var A=p-1;s.frames[A].dispose==2;)A--;I=new Uint8Array(v[A]).slice(0)}}}return v},a.toRGBA8.decodeImage=function(s,l,d,v){var I=l*d,B=a.decode._getBPP(v),p=Math.ceil(l*B/8),U=new Uint8Array(I*4),q=new Uint32Array(U.buffer),D=v.ctype,pe=v.depth,ue=a._bin.readUshort;if(D==6){var x=I<<2;if(pe==8)for(var A=0;A<x;A++)U[A]=s[A];if(pe==16)for(var A=0;A<x;A++)U[A]=s[A<<1]}else if(D==2){var g=v.tabs.tRNS,b=-1,P=-1,F=-1;if(g&&(b=g[0],P=g[1],F=g[2]),pe==8)for(var A=0;A<I;A++){var J=A<<2,Te=A*3;U[J]=s[Te],U[J+1]=s[Te+1],U[J+2]=s[Te+2],U[J+3]=255,b!=-1&&s[Te]==b&&s[Te+1]==P&&s[Te+2]==F&&(U[J+3]=0)}if(pe==16)for(var A=0;A<I;A++){var J=A<<2,Te=A*6;U[J]=s[Te],U[J+1]=s[Te+2],U[J+2]=s[Te+4],U[J+3]=255,b!=-1&&ue(s,Te)==b&&ue(s,Te+2)==P&&ue(s,Te+4)==F&&(U[J+3]=0)}}else if(D==3){var nt=v.tabs.PLTE,ut=v.tabs.tRNS,it=ut?ut.length:0;if(pe==1)for(var st=0;st<d;st++)for(var tt=st*p,Re=st*l,A=0;A<l;A++){var J=Re+A<<2,Ot=s[tt+(A>>3)]>>7-((A&7)<<0)&1,xt=3*Ot;U[J]=nt[xt],U[J+1]=nt[xt+1],U[J+2]=nt[xt+2],U[J+3]=Ot<it?ut[Ot]:255}if(pe==2)for(var st=0;st<d;st++)for(var tt=st*p,Re=st*l,A=0;A<l;A++){var J=Re+A<<2,Ot=s[tt+(A>>2)]>>6-((A&3)<<1)&3,xt=3*Ot;U[J]=nt[xt],U[J+1]=nt[xt+1],U[J+2]=nt[xt+2],U[J+3]=Ot<it?ut[Ot]:255}if(pe==4)for(var st=0;st<d;st++)for(var tt=st*p,Re=st*l,A=0;A<l;A++){var J=Re+A<<2,Ot=s[tt+(A>>1)]>>4-((A&1)<<2)&15,xt=3*Ot;U[J]=nt[xt],U[J+1]=nt[xt+1],U[J+2]=nt[xt+2],U[J+3]=Ot<it?ut[Ot]:255}if(pe==8)for(var A=0;A<I;A++){var J=A<<2,Ot=s[A],xt=3*Ot;U[J]=nt[xt],U[J+1]=nt[xt+1],U[J+2]=nt[xt+2],U[J+3]=Ot<it?ut[Ot]:255}}else if(D==4){if(pe==8)for(var A=0;A<I;A++){var J=A<<2,Ie=A<<1,Ze=s[Ie];U[J]=Ze,U[J+1]=Ze,U[J+2]=Ze,U[J+3]=s[Ie+1]}if(pe==16)for(var A=0;A<I;A++){var J=A<<2,Ie=A<<2,Ze=s[Ie];U[J]=Ze,U[J+1]=Ze,U[J+2]=Ze,U[J+3]=s[Ie+2]}}else if(D==0){var b=v.tabs.tRNS?v.tabs.tRNS:-1;if(pe==1)for(var A=0;A<I;A++){var Ze=255*(s[A>>3]>>7-(A&7)&1),St=Ze==b*255?0:255;q[A]=St<<24|Ze<<16|Ze<<8|Ze}if(pe==2)for(var A=0;A<I;A++){var Ze=85*(s[A>>2]>>6-((A&3)<<1)&3),St=Ze==b*85?0:255;q[A]=St<<24|Ze<<16|Ze<<8|Ze}if(pe==4)for(var A=0;A<I;A++){var Ze=17*(s[A>>1]>>4-((A&1)<<2)&15),St=Ze==b*17?0:255;q[A]=St<<24|Ze<<16|Ze<<8|Ze}if(pe==8)for(var A=0;A<I;A++){var Ze=s[A],St=Ze==b?0:255;q[A]=St<<24|Ze<<16|Ze<<8|Ze}if(pe==16)for(var A=0;A<I;A++){var Ze=s[A<<1],St=ue(s,A<<1)==b?0:255;q[A]=St<<24|Ze<<16|Ze<<8|Ze}}return U},a.decode=function(s){for(var l=new Uint8Array(s),d=8,v=a._bin,I=v.readUshort,B=v.readUint,p={tabs:{},frames:[]},U=new Uint8Array(l.length),q=0,D,pe=0,ue=[137,80,78,71,13,10,26,10],x=0;x<8;x++)if(l[x]!=ue[x])throw"The input is not a PNG file!";for(;d<l.length;){var A=v.readUint(l,d);d+=4;var g=v.readASCII(l,d,4);if(d+=4,g=="IHDR")a.decode._IHDR(l,d,p);else if(g=="IDAT"){for(var x=0;x<A;x++)U[q+x]=l[d+x];q+=A}else if(g=="acTL")p.tabs[g]={num_frames:B(l,d),num_plays:B(l,d+4)},D=new Uint8Array(l.length);else if(g=="fcTL"){if(pe!=0){var b=p.frames[p.frames.length-1];b.data=a.decode._decompress(p,D.slice(0,pe),b.rect.width,b.rect.height),pe=0}var P={x:B(l,d+12),y:B(l,d+16),width:B(l,d+4),height:B(l,d+8)},F=I(l,d+22);F=I(l,d+20)/(F==0?100:F);var J={rect:P,delay:Math.round(F*1e3),dispose:l[d+24],blend:l[d+25]};p.frames.push(J)}else if(g=="fdAT"){for(var x=0;x<A-4;x++)D[pe+x]=l[d+x+4];pe+=A-4}else if(g=="pHYs")p.tabs[g]=[v.readUint(l,d),v.readUint(l,d+4),l[d+8]];else if(g=="cHRM"){p.tabs[g]=[];for(var x=0;x<8;x++)p.tabs[g].push(v.readUint(l,d+x*4))}else if(g=="tEXt"){p.tabs[g]==null&&(p.tabs[g]={});var Te=v.nextZero(l,d),nt=v.readASCII(l,d,Te-d),ut=v.readASCII(l,Te+1,d+A-Te-1);p.tabs[g][nt]=ut}else if(g=="iTXt"){p.tabs[g]==null&&(p.tabs[g]={});var Te=0,it=d;Te=v.nextZero(l,it);var nt=v.readASCII(l,it,Te-it);it=Te+1,l[it],l[it+1],it+=2,Te=v.nextZero(l,it),v.readASCII(l,it,Te-it),it=Te+1,Te=v.nextZero(l,it),v.readUTF8(l,it,Te-it),it=Te+1;var ut=v.readUTF8(l,it,A-(it-d));p.tabs[g][nt]=ut}else if(g=="PLTE")p.tabs[g]=v.readBytes(l,d,A);else if(g=="hIST"){var st=p.tabs.PLTE.length/3;p.tabs[g]=[];for(var x=0;x<st;x++)p.tabs[g].push(I(l,d+x*2))}else if(g=="tRNS")p.ctype==3?p.tabs[g]=v.readBytes(l,d,A):p.ctype==0?p.tabs[g]=I(l,d):p.ctype==2&&(p.tabs[g]=[I(l,d),I(l,d+2),I(l,d+4)]);else if(g=="gAMA")p.tabs[g]=v.readUint(l,d)/1e5;else if(g=="sRGB")p.tabs[g]=l[d];else if(g=="bKGD")p.ctype==0||p.ctype==4?p.tabs[g]=[I(l,d)]:p.ctype==2||p.ctype==6?p.tabs[g]=[I(l,d),I(l,d+2),I(l,d+4)]:p.ctype==3&&(p.tabs[g]=l[d]);else if(g=="IEND"){if(pe!=0){var b=p.frames[p.frames.length-1];b.data=a.decode._decompress(p,D.slice(0,pe),b.rect.width,b.rect.height),pe=0}p.data=a.decode._decompress(p,U,p.width,p.height);break}d+=A,v.readUint(l,d),d+=4}return delete p.compress,delete p.interlace,delete p.filter,p},a.decode._decompress=function(s,l,d,v){return s.compress==0&&(l=a.decode._inflate(l)),s.interlace==0?l=a.decode._filterZero(l,s,0,d,v):s.interlace==1&&(l=a.decode._readInterlace(l,s)),l},a.decode._inflate=function(s){return f.inflate(s)},a.decode._readInterlace=function(s,l){for(var d=l.width,v=l.height,I=a.decode._getBPP(l),B=I>>3,p=Math.ceil(d*I/8),U=new Uint8Array(v*p),q=0,D=[0,0,4,0,2,0,1],pe=[0,4,0,2,0,1,0],ue=[8,8,8,4,4,2,2],x=[8,8,4,4,2,2,1],A=0;A<7;){for(var g=ue[A],b=x[A],P=0,F=0,J=D[A];J<v;)J+=g,F++;for(var Te=pe[A];Te<d;)Te+=b,P++;var nt=Math.ceil(P*I/8);a.decode._filterZero(s,l,q,P,F);for(var ut=0,it=D[A];it<v;){for(var st=pe[A],tt=q+ut*nt<<3;st<d;){if(I==1){var Re=s[tt>>3];Re=Re>>7-(tt&7)&1,U[it*p+(st>>3)]|=Re<<7-((st&3)<<0)}if(I==2){var Re=s[tt>>3];Re=Re>>6-(tt&7)&3,U[it*p+(st>>2)]|=Re<<6-((st&3)<<1)}if(I==4){var Re=s[tt>>3];Re=Re>>4-(tt&7)&15,U[it*p+(st>>1)]|=Re<<4-((st&1)<<2)}if(I>=8)for(var Ot=it*p+st*B,xt=0;xt<B;xt++)U[Ot+xt]=s[(tt>>3)+xt];tt+=I,st+=b}ut++,it+=g}P*F!=0&&(q+=F*(1+nt)),A=A+1}return U},a.decode._getBPP=function(s){var l=[1,null,3,1,2,null,4][s.ctype];return l*s.depth},a.decode._filterZero=function(s,l,d,v,I){var B=a.decode._getBPP(l),p=Math.ceil(v*B/8),U=a.decode._paeth;B=Math.ceil(B/8);for(var q=0;q<I;q++){var D=d+q*p,pe=D+q+1,ue=s[pe-1];if(ue==0)for(var x=0;x<p;x++)s[D+x]=s[pe+x];else if(ue==1){for(var x=0;x<B;x++)s[D+x]=s[pe+x];for(var x=B;x<p;x++)s[D+x]=s[pe+x]+s[D+x-B]&255}else if(q==0){for(var x=0;x<B;x++)s[D+x]=s[pe+x];if(ue==2)for(var x=B;x<p;x++)s[D+x]=s[pe+x]&255;if(ue==3)for(var x=B;x<p;x++)s[D+x]=s[pe+x]+(s[D+x-B]>>1)&255;if(ue==4)for(var x=B;x<p;x++)s[D+x]=s[pe+x]+U(s[D+x-B],0,0)&255}else{if(ue==2)for(var x=0;x<p;x++)s[D+x]=s[pe+x]+s[D+x-p]&255;if(ue==3){for(var x=0;x<B;x++)s[D+x]=s[pe+x]+(s[D+x-p]>>1)&255;for(var x=B;x<p;x++)s[D+x]=s[pe+x]+(s[D+x-p]+s[D+x-B]>>1)&255}if(ue==4){for(var x=0;x<B;x++)s[D+x]=s[pe+x]+U(0,s[D+x-p],0)&255;for(var x=B;x<p;x++)s[D+x]=s[pe+x]+U(s[D+x-B],s[D+x-p],s[D+x-B-p])&255}}}return s},a.decode._paeth=function(s,l,d){var v=s+l-d,I=Math.abs(v-s),B=Math.abs(v-l),p=Math.abs(v-d);return I<=B&&I<=p?s:B<=p?l:d},a.decode._IHDR=function(s,l,d){var v=a._bin;d.width=v.readUint(s,l),l+=4,d.height=v.readUint(s,l),l+=4,d.depth=s[l],l++,d.ctype=s[l],l++,d.compress=s[l],l++,d.filter=s[l],l++,d.interlace=s[l],l++},a._bin={nextZero:function(s,l){for(;s[l]!=0;)l++;return l},readUshort:function(s,l){return s[l]<<8|s[l+1]},writeUshort:function(s,l,d){s[l]=d>>8&255,s[l+1]=d&255},readUint:function(s,l){return s[l]*(256*256*256)+(s[l+1]<<16|s[l+2]<<8|s[l+3])},writeUint:function(s,l,d){s[l]=d>>24&255,s[l+1]=d>>16&255,s[l+2]=d>>8&255,s[l+3]=d&255},readASCII:function(s,l,d){for(var v="",I=0;I<d;I++)v+=String.fromCharCode(s[l+I]);return v},writeASCII:function(s,l,d){for(var v=0;v<d.length;v++)s[l+v]=d.charCodeAt(v)},readBytes:function(s,l,d){for(var v=[],I=0;I<d;I++)v.push(s[l+I]);return v},pad:function(s){return s.length<2?"0"+s:s},readUTF8:function(s,l,d){for(var v="",I,B=0;B<d;B++)v+="%"+a._bin.pad(s[l+B].toString(16));try{I=decodeURIComponent(v)}catch{return a._bin.readASCII(s,l,d)}return I}},a._copyTile=function(s,l,d,v,I,B,p,U,q){for(var D=Math.min(l,I),pe=Math.min(d,B),ue=0,x=0,A=0;A<pe;A++)for(var g=0;g<D;g++)if(p>=0&&U>=0?(ue=A*l+g<<2,x=(U+A)*I+p+g<<2):(ue=(-U+A)*l-p+g<<2,x=A*I+g<<2),q==0)v[x]=s[ue],v[x+1]=s[ue+1],v[x+2]=s[ue+2],v[x+3]=s[ue+3];else if(q==1){var b=s[ue+3]*.00392156862745098,P=s[ue]*b,F=s[ue+1]*b,J=s[ue+2]*b,Te=v[x+3]*(1/255),nt=v[x]*Te,ut=v[x+1]*Te,it=v[x+2]*Te,st=1-b,tt=b+Te*st,Re=tt==0?0:1/tt;v[x+3]=255*tt,v[x+0]=(P+nt*st)*Re,v[x+1]=(F+ut*st)*Re,v[x+2]=(J+it*st)*Re}else if(q==2){var b=s[ue+3],P=s[ue],F=s[ue+1],J=s[ue+2],Te=v[x+3],nt=v[x],ut=v[x+1],it=v[x+2];b==Te&&P==nt&&F==ut&&J==it?(v[x]=0,v[x+1]=0,v[x+2]=0,v[x+3]=0):(v[x]=P,v[x+1]=F,v[x+2]=J,v[x+3]=b)}else if(q==3){var b=s[ue+3],P=s[ue],F=s[ue+1],J=s[ue+2],Te=v[x+3],nt=v[x],ut=v[x+1],it=v[x+2];if(b==Te&&P==nt&&F==ut&&J==it)continue;if(b<220&&Te>20)return!1}return!0},a.encode=function(s,l,d,v,I,B){v==null&&(v=0),B==null&&(B=!1);for(var p=new Uint8Array(s[0].byteLength*s.length+100),U=[137,80,78,71,13,10,26,10],q=0;q<8;q++)p[q]=U[q];var D=8,pe=a._bin,ue=a.crc.crc,x=pe.writeUint,A=pe.writeUshort,g=pe.writeASCII,b=a.encode.compressPNG(s,l,d,v,B);x(p,D,13),D+=4,g(p,D,"IHDR"),D+=4,x(p,D,l),D+=4,x(p,D,d),D+=4,p[D]=b.depth,D++,p[D]=b.ctype,D++,p[D]=0,D++,p[D]=0,D++,p[D]=0,D++,x(p,D,ue(p,D-17,17)),D+=4,x(p,D,1),D+=4,g(p,D,"sRGB"),D+=4,p[D]=1,D++,x(p,D,ue(p,D-5,5)),D+=4;var P=s.length>1;if(P&&(x(p,D,8),D+=4,g(p,D,"acTL"),D+=4,x(p,D,s.length),D+=4,x(p,D,0),D+=4,x(p,D,ue(p,D-12,12)),D+=4),b.ctype==3){var F=b.plte.length;x(p,D,F*3),D+=4,g(p,D,"PLTE"),D+=4;for(var q=0;q<F;q++){var J=q*3,Te=b.plte[q],nt=Te&255,ut=Te>>8&255,it=Te>>16&255;p[D+J+0]=nt,p[D+J+1]=ut,p[D+J+2]=it}if(D+=F*3,x(p,D,ue(p,D-F*3-4,F*3+4)),D+=4,b.gotAlpha){x(p,D,F),D+=4,g(p,D,"tRNS"),D+=4;for(var q=0;q<F;q++)p[D+q]=b.plte[q]>>24&255;D+=F,x(p,D,ue(p,D-F-4,F+4)),D+=4}}for(var st=0,tt=0;tt<b.frames.length;tt++){var Re=b.frames[tt];P&&(x(p,D,26),D+=4,g(p,D,"fcTL"),D+=4,x(p,D,st++),D+=4,x(p,D,Re.rect.width),D+=4,x(p,D,Re.rect.height),D+=4,x(p,D,Re.rect.x),D+=4,x(p,D,Re.rect.y),D+=4,A(p,D,I[tt]),D+=2,A(p,D,1e3),D+=2,p[D]=Re.dispose,D++,p[D]=Re.blend,D++,x(p,D,ue(p,D-30,30)),D+=4);var Ot=Re.cimg,F=Ot.length;x(p,D,F+(tt==0?0:4)),D+=4;var xt=D;g(p,D,tt==0?"IDAT":"fdAT"),D+=4,tt!=0&&(x(p,D,st++),D+=4);for(var q=0;q<F;q++)p[D+q]=Ot[q];D+=F,x(p,D,ue(p,xt,D-xt)),D+=4}return x(p,D,0),D+=4,g(p,D,"IEND"),D+=4,x(p,D,ue(p,D-4,4)),D+=4,p.buffer.slice(0,D)},a.encode.compressPNG=function(s,l,d,v,I){for(var B=a.encode.compress(s,l,d,v,!1,I),p=0;p<s.length;p++){var U=B.frames[p];U.rect.width;var q=U.rect.height,D=U.bpl,pe=U.bpp,ue=new Uint8Array(q*D+q);U.cimg=a.encode._filterZero(U.img,q,pe,D,ue)}return B},a.encode.compress=function(s,l,d,v,I,B){B==null&&(B=!1);for(var p=6,U=8,q=4,D=255,pe=0;pe<s.length;pe++)for(var ue=new Uint8Array(s[pe]),x=ue.length,A=0;A<x;A+=4)D&=ue[A+3];var g=D!=255,b={},P=[];if(s.length!=0&&(b[0]=0,P.push(0),v!=0&&v--),v!=0){var F=a.quantize(s,v,I);s=F.bufs;for(var A=0;A<F.plte.length;A++){var J=F.plte[A].est.rgba;b[J]==null&&(b[J]=P.length,P.push(J))}}else for(var pe=0;pe<s.length;pe++)for(var Te=new Uint32Array(s[pe]),x=Te.length,A=0;A<x;A++){var J=Te[A];if((A<l||J!=Te[A-1]&&J!=Te[A-l])&&b[J]==null&&(b[J]=P.length,P.push(J),P.length>=300))break}var nt=g?I:!1,ut=P.length;ut<=256&&B==!1&&(ut<=2?U=1:ut<=4?U=2:ut<=16?U=4:U=8,I&&(U=8),g=!0);for(var it=[],pe=0;pe<s.length;pe++){var st=new Uint8Array(s[pe]),tt=new Uint32Array(st.buffer),Re=0,Ot=0,xt=l,Ie=d,Ze=0;if(pe!=0&&!nt){for(var St=I||pe==1||it[it.length-2].dispose==2?1:2,$t=0,Wt=1e9,Qt=0;Qt<St;Qt++){for(var Qr=new Uint8Array(s[pe-1-Qt]),sr=new Uint32Array(s[pe-1-Qt]),br=l,lr=d,Kt=-1,wr=-1,Gt=0;Gt<d;Gt++)for(var Mt=0;Mt<l;Mt++){var A=Gt*l+Mt;tt[A]!=sr[A]&&(Mt<br&&(br=Mt),Mt>Kt&&(Kt=Mt),Gt<lr&&(lr=Gt),Gt>wr&&(wr=Gt))}var dn=Kt==-1?1:(Kt-br+1)*(wr-lr+1);dn<Wt&&(Wt=dn,$t=Qt,Kt==-1?(Re=Ot=0,xt=Ie=1):(Re=br,Ot=lr,xt=Kt-br+1,Ie=wr-lr+1))}var Qr=new Uint8Array(s[pe-1-$t]);$t==1&&(it[it.length-1].dispose=2);var kt=new Uint8Array(xt*Ie*4);new Uint32Array(kt.buffer),a._copyTile(Qr,l,d,kt,xt,Ie,-Re,-Ot,0),a._copyTile(st,l,d,kt,xt,Ie,-Re,-Ot,3)?(a._copyTile(st,l,d,kt,xt,Ie,-Re,-Ot,2),Ze=1):(a._copyTile(st,l,d,kt,xt,Ie,-Re,-Ot,0),Ze=0),st=kt,tt=new Uint32Array(st.buffer)}var Nr=4*xt;if(ut<=256&&B==!1){Nr=Math.ceil(U*xt/8);for(var kt=new Uint8Array(Nr*Ie),Gt=0;Gt<Ie;Gt++){var A=Gt*Nr,Fr=Gt*xt;if(U==8)for(var Mt=0;Mt<xt;Mt++)kt[A+Mt]=b[tt[Fr+Mt]];else if(U==4)for(var Mt=0;Mt<xt;Mt++)kt[A+(Mt>>1)]|=b[tt[Fr+Mt]]<<4-(Mt&1)*4;else if(U==2)for(var Mt=0;Mt<xt;Mt++)kt[A+(Mt>>2)]|=b[tt[Fr+Mt]]<<6-(Mt&3)*2;else if(U==1)for(var Mt=0;Mt<xt;Mt++)kt[A+(Mt>>3)]|=b[tt[Fr+Mt]]<<7-(Mt&7)*1}st=kt,p=3,q=1}else if(g==!1&&s.length==1){for(var kt=new Uint8Array(xt*Ie*3),Xr=xt*Ie,A=0;A<Xr;A++){var Jr=A*3,ar=A*4;kt[Jr]=st[ar],kt[Jr+1]=st[ar+1],kt[Jr+2]=st[ar+2]}st=kt,p=2,q=3,Nr=3*xt}it.push({rect:{x:Re,y:Ot,width:xt,height:Ie},img:st,bpl:Nr,bpp:q,blend:Ze,dispose:nt?1:0})}return{ctype:p,depth:U,plte:P,gotAlpha:g,frames:it}},a.encode._filterZero=function(s,l,d,v,I){for(var B=[],p=0;p<5;p++)if(!(l*v>5e5&&(p==2||p==3||p==4))){for(var U=0;U<l;U++)a.encode._filterLine(I,s,U,v,d,p);if(B.push(f.deflate(I)),d==1)break}for(var q,D=1e9,pe=0;pe<B.length;pe++)B[pe].length<D&&(q=pe,D=B[pe].length);return B[q]},a.encode._filterLine=function(s,l,d,v,I,B){var p=d*v,U=p+d,q=a.decode._paeth;if(s[U]=B,U++,B==0)for(var D=0;D<v;D++)s[U+D]=l[p+D];else if(B==1){for(var D=0;D<I;D++)s[U+D]=l[p+D];for(var D=I;D<v;D++)s[U+D]=l[p+D]-l[p+D-I]+256&255}else if(d==0){for(var D=0;D<I;D++)s[U+D]=l[p+D];if(B==2)for(var D=I;D<v;D++)s[U+D]=l[p+D];if(B==3)for(var D=I;D<v;D++)s[U+D]=l[p+D]-(l[p+D-I]>>1)+256&255;if(B==4)for(var D=I;D<v;D++)s[U+D]=l[p+D]-q(l[p+D-I],0,0)+256&255}else{if(B==2)for(var D=0;D<v;D++)s[U+D]=l[p+D]+256-l[p+D-v]&255;if(B==3){for(var D=0;D<I;D++)s[U+D]=l[p+D]+256-(l[p+D-v]>>1)&255;for(var D=I;D<v;D++)s[U+D]=l[p+D]+256-(l[p+D-v]+l[p+D-I]>>1)&255}if(B==4){for(var D=0;D<I;D++)s[U+D]=l[p+D]+256-q(0,l[p+D-v],0)&255;for(var D=I;D<v;D++)s[U+D]=l[p+D]+256-q(l[p+D-I],l[p+D-v],l[p+D-I-v])&255}}},a.crc={table:function(){for(var s=new Uint32Array(256),l=0;l<256;l++){for(var d=l,v=0;v<8;v++)d&1?d=3988292384^d>>>1:d=d>>>1;s[l]=d}return s}(),update:function(s,l,d,v){for(var I=0;I<v;I++)s=a.crc.table[(s^l[d+I])&255]^s>>>8;return s},crc:function(s,l,d){return a.crc.update(4294967295,s,l,d)^4294967295}},a.quantize=function(s,l,d){for(var v=[],I=0,B=0;B<s.length;B++)v.push(a.encode.alphaMul(new Uint8Array(s[B]),d)),I+=s[B].byteLength;for(var p=new Uint8Array(I),U=new Uint32Array(p.buffer),q=0,B=0;B<v.length;B++){for(var D=v[B],pe=D.length,ue=0;ue<pe;ue++)p[q+ue]=D[ue];q+=pe}var x={i0:0,i1:p.length,bst:null,est:null,tdst:0,left:null,right:null};x.bst=a.quantize.stats(p,x.i0,x.i1),x.est=a.quantize.estats(x.bst);for(var A=[x];A.length<l;){for(var g=0,b=0,B=0;B<A.length;B++)A[B].est.L>g&&(g=A[B].est.L,b=B);if(g<.001)break;var P=A[b],F=a.quantize.splitPixels(p,U,P.i0,P.i1,P.est.e,P.est.eMq255),J={i0:P.i0,i1:F,bst:null,est:null,tdst:0,left:null,right:null};J.bst=a.quantize.stats(p,J.i0,J.i1),J.est=a.quantize.estats(J.bst);var Te={i0:F,i1:P.i1,bst:null,est:null,tdst:0,left:null,right:null};Te.bst={R:[],m:[],N:P.bst.N-J.bst.N};for(var B=0;B<16;B++)Te.bst.R[B]=P.bst.R[B]-J.bst.R[B];for(var B=0;B<4;B++)Te.bst.m[B]=P.bst.m[B]-J.bst.m[B];Te.est=a.quantize.estats(Te.bst),P.left=J,P.right=Te,A[b]=J,A.push(Te)}A.sort(function(St,$t){return $t.bst.N-St.bst.N});for(var nt=0;nt<v.length;nt++){for(var ut=a.quantize.planeDst,it=new Uint8Array(v[nt].buffer),st=new Uint32Array(v[nt].buffer),tt=it.length,B=0;B<tt;B+=4){for(var Re=it[B]*.00392156862745098,Ot=it[B+1]*(1/255),xt=it[B+2]*(1/255),Ie=it[B+3]*(1/255),Ze=x;Ze.left;)Ze=ut(Ze.est,Re,Ot,xt,Ie)<=0?Ze.left:Ze.right;st[B>>2]=Ze.est.rgba}v[nt]=st.buffer}return{bufs:v,plte:A}},a.quantize.getNearest=function(s,l,d,v,I){if(s.left==null)return s.tdst=a.quantize.dist(s.est.q,l,d,v,I),s;var B=a.quantize.planeDst(s.est,l,d,v,I),p=s.left,U=s.right;B>0&&(p=s.right,U=s.left);var q=a.quantize.getNearest(p,l,d,v,I);if(q.tdst<=B*B)return q;var D=a.quantize.getNearest(U,l,d,v,I);return D.tdst<q.tdst?D:q},a.quantize.planeDst=function(s,l,d,v,I){var B=s.e;return B[0]*l+B[1]*d+B[2]*v+B[3]*I-s.eMq},a.quantize.dist=function(s,l,d,v,I){var B=l-s[0],p=d-s[1],U=v-s[2],q=I-s[3];return B*B+p*p+U*U+q*q},a.quantize.splitPixels=function(s,l,d,v,I,B){var p=a.quantize.vecDot;for(v-=4;d<v;){for(;p(s,d,I)<=B;)d+=4;for(;p(s,v,I)>B;)v-=4;if(d>=v)break;var U=l[d>>2];l[d>>2]=l[v>>2],l[v>>2]=U,d+=4,v-=4}for(;p(s,d,I)>B;)d-=4;return d+4},a.quantize.vecDot=function(s,l,d){return s[l]*d[0]+s[l+1]*d[1]+s[l+2]*d[2]+s[l+3]*d[3]},a.quantize.stats=function(s,l,d){for(var v=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],I=[0,0,0,0],B=d-l>>2,p=l;p<d;p+=4){var U=s[p]*.00392156862745098,q=s[p+1]*(1/255),D=s[p+2]*(1/255),pe=s[p+3]*(1/255);I[0]+=U,I[1]+=q,I[2]+=D,I[3]+=pe,v[0]+=U*U,v[1]+=U*q,v[2]+=U*D,v[3]+=U*pe,v[5]+=q*q,v[6]+=q*D,v[7]+=q*pe,v[10]+=D*D,v[11]+=D*pe,v[15]+=pe*pe}return v[4]=v[1],v[8]=v[2],v[12]=v[3],v[9]=v[6],v[13]=v[7],v[14]=v[11],{R:v,m:I,N:B}},a.quantize.estats=function(s){var l=s.R,d=s.m,v=s.N,I=d[0],B=d[1],p=d[2],U=d[3],q=v==0?0:1/v,D=[l[0]-I*I*q,l[1]-I*B*q,l[2]-I*p*q,l[3]-I*U*q,l[4]-B*I*q,l[5]-B*B*q,l[6]-B*p*q,l[7]-B*U*q,l[8]-p*I*q,l[9]-p*B*q,l[10]-p*p*q,l[11]-p*U*q,l[12]-U*I*q,l[13]-U*B*q,l[14]-U*p*q,l[15]-U*U*q],pe=D,ue=a.M4,x=[.5,.5,.5,.5],A=0,g=0;if(v!=0)for(var b=0;b<10&&(x=ue.multVec(pe,x),g=Math.sqrt(ue.dot(x,x)),x=ue.sml(1/g,x),!(Math.abs(g-A)<1e-9));b++)A=g;var P=[I*q,B*q,p*q,U*q],F=ue.dot(ue.sml(255,P),x),J=P[3]<.001?0:1/P[3];return{Cov:D,q:P,e:x,L:A,eMq255:F,eMq:ue.dot(x,P),rgba:(Math.round(255*P[3])<<24|Math.round(255*P[2]*J)<<16|Math.round(255*P[1]*J)<<8|Math.round(255*P[0]*J)<<0)>>>0}},a.M4={multVec:function(s,l){return[s[0]*l[0]+s[1]*l[1]+s[2]*l[2]+s[3]*l[3],s[4]*l[0]+s[5]*l[1]+s[6]*l[2]+s[7]*l[3],s[8]*l[0]+s[9]*l[1]+s[10]*l[2]+s[11]*l[3],s[12]*l[0]+s[13]*l[1]+s[14]*l[2]+s[15]*l[3]]},dot:function(s,l){return s[0]*l[0]+s[1]*l[1]+s[2]*l[2]+s[3]*l[3]},sml:function(s,l){return[s*l[0],s*l[1],s*l[2],s*l[3]]}},a.encode.alphaMul=function(s,l){for(var d=new Uint8Array(s.length),v=s.length>>2,I=0;I<v;I++){var B=I<<2,p=s[B+3];l&&(p=p<128?0:255);var U=p*(1/255);d[B+0]=s[B+0]*U,d[B+1]=s[B+1]*U,d[B+2]=s[B+2]*U,d[B+3]=p}return d}}(n,i)})()})(kh);var u_={exports:{}};(function(t,n){(function(i,a){t.exports=a()})(Zs,function(){var i=function(h){return h instanceof Uint8Array||h instanceof Uint16Array||h instanceof Uint32Array||h instanceof Int8Array||h instanceof Int16Array||h instanceof Int32Array||h instanceof Float32Array||h instanceof Float64Array||h instanceof Uint8ClampedArray},a=function(h,T){for(var G=Object.keys(T),se=0;se<G.length;++se)h[G[se]]=T[G[se]];return h},f=`
|
|
39
|
-
`;function s(
|
|
40
|
-
`),
|
|
41
|
-
`).forEach(function(
|
|
42
|
-
`,"color:red;text-decoration:underline;font-weight:bold"),Ge.lines.forEach(function(ke){if(ke.errors.length>0){Ce(x(ke.number,4)+"| ","background-color:yellow; font-weight:bold"),Ce(ke.line+f,"color:red; background-color:yellow; font-weight:bold");var K=0;ke.errors.forEach(function(oe){var Oe=oe.message,rt=/^\s*'(.*)'\s*:\s*(.*)$/.exec(Oe);if(rt){var Se=rt[1];switch(Oe=rt[2],Se){case"assign":Se="=";break}K=Math.max(ke.line.indexOf(Se,K),0)}else K=0;Ce(x("| ",6)),Ce(x("^^^",K+3)+f,"font-weight:bold"),Ce(x("| ",6)),Ce(Oe+f,"font-weight:bold")}),Ce(x("| ",6)+f)}else Ce(x(ke.number,4)+"| "),Ce(ke.line+f,"color:red")}),typeof document<"u"&&!window.chrome?(We[0]=Be.join("%c"),console.log.apply(console,We)):console.log(Be.join(""))}),d.raise("Error compiling "+fe+" shader, "+Le[0].name)}}function it(h,T,G,se,me){if(!h.getProgramParameter(T,h.LINK_STATUS)){var ae=h.getProgramInfoLog(T),fe=J(G,me),Le=J(se,me),De='Error linking program with vertex shader, "'+Le[0].name+'", and fragment shader "'+fe[0].name+'"';typeof document<"u"?console.log("%c"+De+f+"%c"+ae,"color:red;text-decoration:underline;font-weight:bold","color:red"):console.log(De+f+ae),d.raise(De)}}function st(h){h._commandRef=P()}function tt(h,T,G,se){st(h);function me(De){return De?se.id(De):0}h._fragId=me(h.static.frag),h._vertId=me(h.static.vert);function ae(De,Ne){Object.keys(Ne).forEach(function(Ge){De[se.id(Ge)]=!0})}var fe=h._uniformSet={};ae(fe,T.static),ae(fe,T.dynamic);var Le=h._attributeSet={};ae(Le,G.static),ae(Le,G.dynamic),h._hasCount="count"in h.static||"count"in h.dynamic||"elements"in h.static||"elements"in h.dynamic}function Re(h,T){var G=F();l(h+" in command "+(T||P())+(G==="unknown"?"":" called from "+G))}function Ot(h,T,G){h||Re(T,G||P())}function xt(h,T,G,se){h in T||Re("unknown parameter ("+h+")"+v(G)+". possible values: "+Object.keys(T).join(),se||P())}function Ie(h,T,G,se){p(h,T)||Re("invalid parameter type"+v(G)+". expected "+T+", got "+typeof h,se||P())}function Ze(h){h()}function St(h,T,G){h.texture?D(h.texture._texture.internalformat,T,"unsupported texture format for attachment"):D(h.renderbuffer._renderbuffer.format,G,"unsupported renderbuffer format for attachment")}var $t=33071,Wt=9728,Qt=9984,sr=9985,br=9986,lr=9987,Kt=5120,wr=5121,Gt=5122,Mt=5123,dn=5124,Qr=5125,kt=5126,Nr=32819,Fr=32820,Xr=33635,Jr=34042,ar=36193,Pt={};Pt[Kt]=Pt[wr]=1,Pt[Gt]=Pt[Mt]=Pt[ar]=Pt[Xr]=Pt[Nr]=Pt[Fr]=2,Pt[dn]=Pt[Qr]=Pt[kt]=Pt[Jr]=4;function Dn(h,T){return h===Fr||h===Nr||h===Xr?2:h===Jr?4:Pt[h]*T}function Ln(h){return!(h&h-1)&&!!h}function en(h,T,G){var se,me=T.width,ae=T.height,fe=T.channels;d(me>0&&me<=G.maxTextureSize&&ae>0&&ae<=G.maxTextureSize,"invalid texture shape"),(h.wrapS!==$t||h.wrapT!==$t)&&d(Ln(me)&&Ln(ae),"incompatible wrap mode for texture, both width and height must be power of 2"),T.mipmask===1?me!==1&&ae!==1&&d(h.minFilter!==Qt&&h.minFilter!==br&&h.minFilter!==sr&&h.minFilter!==lr,"min filter requires mipmap"):(d(Ln(me)&&Ln(ae),"texture must be a square power of 2 to support mipmapping"),d(T.mipmask===(me<<1)-1,"missing or incomplete mipmap data")),T.type===kt&&(G.extensions.indexOf("oes_texture_float_linear")<0&&d(h.minFilter===Wt&&h.magFilter===Wt,"filter not supported, must enable oes_texture_float_linear"),d(!h.genMipmaps,"mipmap generation not supported with float textures"));var Le=T.images;for(se=0;se<16;++se)if(Le[se]){var De=me>>se,Ne=ae>>se;d(T.mipmask&1<<se,"missing mipmap data");var Ge=Le[se];if(d(Ge.width===De&&Ge.height===Ne,"invalid shape for mip images"),d(Ge.format===T.format&&Ge.internalformat===T.internalformat&&Ge.type===T.type,"incompatible type for mip image"),!Ge.compressed)if(Ge.data){var Be=Math.ceil(Dn(Ge.type,fe)*De/Ge.unpackAlignment)*Ge.unpackAlignment;d(Ge.data.byteLength===Be*Ne,"invalid data for image, buffer size is inconsistent with image format")}else Ge.element||Ge.copy}else h.genMipmaps||d((T.mipmask&1<<se)===0,"extra mipmap data");T.compressed&&d(!h.genMipmaps,"mipmap generation for compressed images not supported")}function on(h,T,G,se){var me=h.width,ae=h.height,fe=h.channels;d(me>0&&me<=se.maxTextureSize&&ae>0&&ae<=se.maxTextureSize,"invalid texture shape"),d(me===ae,"cube map must be square"),d(T.wrapS===$t&&T.wrapT===$t,"wrap mode not supported by cube map");for(var Le=0;Le<G.length;++Le){var De=G[Le];d(De.width===me&&De.height===ae,"inconsistent cube map face shape"),T.genMipmaps&&(d(!De.compressed,"can not generate mipmap for compressed textures"),d(De.mipmask===1,"can not specify mipmaps and generate mipmaps"));for(var Ne=De.images,Ge=0;Ge<16;++Ge){var Be=Ne[Ge];if(Be){var We=me>>Ge,Ce=ae>>Ge;d(De.mipmask&1<<Ge,"missing mipmap data"),d(Be.width===We&&Be.height===Ce,"invalid shape for mip images"),d(Be.format===h.format&&Be.internalformat===h.internalformat&&Be.type===h.type,"incompatible type for mip image"),Be.compressed||(Be.data?d(Be.data.byteLength===We*Ce*Math.max(Dn(Be.type,fe),Be.unpackAlignment),"invalid data for image, buffer size is inconsistent with image format"):Be.element||Be.copy)}}}}var E=a(d,{optional:Ze,raise:l,commandRaise:Re,command:Ot,parameter:I,commandParameter:xt,constructor:ue,type:U,commandType:Ie,isTypedArray:B,nni:q,oneOf:D,shaderError:ut,linkError:it,callSite:F,saveCommandRef:st,saveDrawInfo:tt,framebufferFormat:St,guessCommand:P,texture2D:en,textureCube:on}),pi=0,vn=0,Zi=5,Gn=6;function Tr(h,T){this.id=pi++,this.type=h,this.data=T}function Rn(h){return h.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function Un(h){if(h.length===0)return[];var T=h.charAt(0),G=h.charAt(h.length-1);if(h.length>1&&T===G&&(T==='"'||T==="'"))return['"'+Rn(h.substr(1,h.length-2))+'"'];var se=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(h);if(se)return Un(h.substr(0,se.index)).concat(Un(se[1])).concat(Un(h.substr(se.index+se[0].length)));var me=h.split(".");if(me.length===1)return['"'+Rn(h)+'"'];for(var ae=[],fe=0;fe<me.length;++fe)ae=ae.concat(Un(me[fe]));return ae}function C(h){return"["+Un(h).join("][")+"]"}function Ue(h,T){return new Tr(h,C(T+""))}function Xe(h){return typeof h=="function"&&!h._reglType||h instanceof Tr}function dt(h,T){if(typeof h=="function")return new Tr(vn,h);if(typeof h=="number"||typeof h=="boolean")return new Tr(Zi,h);if(Array.isArray(h))return new Tr(Gn,h.map(function(G,se){return dt(G,T+"["+se+"]")}));if(h instanceof Tr)return h;E(!1,"invalid option type in uniform "+T)}var Z={DynamicVariable:Tr,define:Ue,isDynamic:Xe,unbox:dt,accessor:C},we={next:typeof requestAnimationFrame=="function"?function(h){return requestAnimationFrame(h)}:function(h){return setTimeout(h,16)},cancel:typeof cancelAnimationFrame=="function"?function(h){return cancelAnimationFrame(h)}:clearTimeout},m=typeof performance<"u"&&performance.now?function(){return performance.now()}:function(){return+new Date};function He(){var h={"":0},T=[""];return{id:function(G){var se=h[G];return se||(se=h[G]=T.length,T.push(G),se)},str:function(G){return T[G]}}}function Nt(h,T,G){var se=document.createElement("canvas");a(se.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),h.appendChild(se),h===document.body&&(se.style.position="absolute",a(h.style,{margin:0,padding:0}));function me(){var Le=window.innerWidth,De=window.innerHeight;if(h!==document.body){var Ne=se.getBoundingClientRect();Le=Ne.right-Ne.left,De=Ne.bottom-Ne.top}se.width=G*Le,se.height=G*De}var ae;h!==document.body&&typeof ResizeObserver=="function"?(ae=new ResizeObserver(function(){setTimeout(me)}),ae.observe(h)):window.addEventListener("resize",me,!1);function fe(){ae?ae.disconnect():window.removeEventListener("resize",me),h.removeChild(se)}return me(),{canvas:se,onDestroy:fe}}function u(h,T){function G(se){try{return h.getContext(se,T)}catch{return null}}return G("webgl")||G("experimental-webgl")||G("webgl-experimental")}function de(h){return typeof h.nodeName=="string"&&typeof h.appendChild=="function"&&typeof h.getBoundingClientRect=="function"}function ye(h){return typeof h.drawArrays=="function"||typeof h.drawElements=="function"}function w(h){return typeof h=="string"?h.split():(E(Array.isArray(h),"invalid extension array"),h)}function V(h){return typeof h=="string"?(E(typeof document<"u","not supported outside of DOM"),document.querySelector(h)):h}function ce(h){var T=h||{},G,se,me,ae,fe={},Le=[],De=[],Ne=typeof window>"u"?1:window.devicePixelRatio,Ge=!1,Be=function(ke){ke&&E.raise(ke)},We=function(){};if(typeof T=="string"?(E(typeof document<"u","selector queries only supported in DOM enviroments"),G=document.querySelector(T),E(G,"invalid query string for element")):typeof T=="object"?de(T)?G=T:ye(T)?(ae=T,me=ae.canvas):(E.constructor(T),"gl"in T?ae=T.gl:"canvas"in T?me=V(T.canvas):"container"in T&&(se=V(T.container)),"attributes"in T&&(fe=T.attributes,E.type(fe,"object","invalid context attributes")),"extensions"in T&&(Le=w(T.extensions)),"optionalExtensions"in T&&(De=w(T.optionalExtensions)),"onDone"in T&&(E.type(T.onDone,"function","invalid or missing onDone callback"),Be=T.onDone),"profile"in T&&(Ge=!!T.profile),"pixelRatio"in T&&(Ne=+T.pixelRatio,E(Ne>0,"invalid pixel ratio"))):E.raise("invalid arguments to regl"),G&&(G.nodeName.toLowerCase()==="canvas"?me=G:se=G),!ae){if(!me){E(typeof document<"u","must manually specify webgl context outside of DOM environments");var Ce=Nt(se||document.body,Be,Ne);if(!Ce)return null;me=Ce.canvas,We=Ce.onDestroy}fe.premultipliedAlpha===void 0&&(fe.premultipliedAlpha=!0),ae=u(me,fe)}return ae?{gl:ae,canvas:me,container:se,extensions:Le,optionalExtensions:De,pixelRatio:Ne,profile:Ge,onDone:Be,onDestroy:We}:(We(),Be("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function Et(h,T){var G={};function se(fe){E.type(fe,"string","extension name must be string");var Le=fe.toLowerCase(),De;try{De=G[Le]=h.getExtension(Le)}catch{}return!!De}for(var me=0;me<T.extensions.length;++me){var ae=T.extensions[me];if(!se(ae))return T.onDestroy(),T.onDone('"'+ae+'" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return T.optionalExtensions.forEach(se),{extensions:G,restore:function(){Object.keys(G).forEach(function(fe){if(G[fe]&&!se(fe))throw new Error("(regl): error restoring extension "+fe)})}}}function at(h,T){for(var G=Array(h),se=0;se<h;++se)G[se]=T(se);return G}var mt=5120,ur=5121,mi=5122,kr=5123,dr=5124,Yr=5125,_n=5126;function Cn(h){for(var T=16;T<=1<<28;T*=16)if(h<=T)return T;return 0}function Na(h){var T,G;return T=(h>65535)<<4,h>>>=T,G=(h>255)<<3,h>>>=G,T|=G,G=(h>15)<<2,h>>>=G,T|=G,G=(h>3)<<1,h>>>=G,T|=G,T|h>>1}function Ba(){var h=at(8,function(){return[]});function T(ae){var fe=Cn(ae),Le=h[Na(fe)>>2];return Le.length>0?Le.pop():new ArrayBuffer(fe)}function G(ae){h[Na(ae.byteLength)>>2].push(ae)}function se(ae,fe){var Le=null;switch(ae){case mt:Le=new Int8Array(T(fe),0,fe);break;case ur:Le=new Uint8Array(T(fe),0,fe);break;case mi:Le=new Int16Array(T(2*fe),0,fe);break;case kr:Le=new Uint16Array(T(2*fe),0,fe);break;case dr:Le=new Int32Array(T(4*fe),0,fe);break;case Yr:Le=new Uint32Array(T(4*fe),0,fe);break;case _n:Le=new Float32Array(T(4*fe),0,fe);break;default:return null}return Le.length!==fe?Le.subarray(0,fe):Le}function me(ae){G(ae.buffer)}return{alloc:T,free:G,allocType:se,freeType:me}}var jt=Ba();jt.zero=Ba();var $n=3408,sn=3410,gi=3411,Kn=3412,js=3413,Xh=3414,qh=3415,Kh=33901,jh=33902,Qh=3379,Qs=3386,Jh=34921,Js=36347,ed=36348,td=35661,rd=35660,Nu=34930,Bu=36349,Gu=34076,nd=34024,id=7936,ad=7937,od=7938,Uu=35724,Yu=34047,Hu=36063,rl=34852,ef=3553,nl=34067,tf=34069,zu=33984,as=6408,rf=5126,il=5121,os=36160,sd=36053,Wu=36064,al=16384,ol=function(h,T){var G=1;T.ext_texture_filter_anisotropic&&(G=h.getParameter(Yu));var se=1,me=1;T.webgl_draw_buffers&&(se=h.getParameter(rl),me=h.getParameter(Hu));var ae=!!T.oes_texture_float;if(ae){var fe=h.createTexture();h.bindTexture(ef,fe),h.texImage2D(ef,0,as,1,1,0,as,rf,null);var Le=h.createFramebuffer();if(h.bindFramebuffer(os,Le),h.framebufferTexture2D(os,Wu,ef,fe,0),h.bindTexture(ef,null),h.checkFramebufferStatus(os)!==sd)ae=!1;else{h.viewport(0,0,1,1),h.clearColor(1,0,0,1),h.clear(al);var De=jt.allocType(rf,4);h.readPixels(0,0,1,1,as,rf,De),h.getError()?ae=!1:(h.deleteFramebuffer(Le),h.deleteTexture(fe),ae=De[0]===1),jt.freeType(De)}}var Ne=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),Ge=!0;if(!Ne){var Be=h.createTexture(),We=jt.allocType(il,36);h.activeTexture(zu),h.bindTexture(nl,Be),h.texImage2D(tf,0,as,3,3,0,as,il,We),jt.freeType(We),h.bindTexture(nl,null),h.deleteTexture(Be),Ge=!h.getError()}return{colorBits:[h.getParameter(sn),h.getParameter(gi),h.getParameter(Kn),h.getParameter(js)],depthBits:h.getParameter(Xh),stencilBits:h.getParameter(qh),subpixelBits:h.getParameter($n),extensions:Object.keys(T).filter(function(Ce){return!!T[Ce]}),maxAnisotropic:G,maxDrawbuffers:se,maxColorAttachments:me,pointSizeDims:h.getParameter(Kh),lineWidthDims:h.getParameter(jh),maxViewportDims:h.getParameter(Qs),maxCombinedTextureUnits:h.getParameter(td),maxCubeMapSize:h.getParameter(Gu),maxRenderbufferSize:h.getParameter(nd),maxTextureUnits:h.getParameter(Nu),maxTextureSize:h.getParameter(Qh),maxAttributes:h.getParameter(Jh),maxVertexUniforms:h.getParameter(Js),maxVertexTextureUnits:h.getParameter(rd),maxVaryingVectors:h.getParameter(ed),maxFragmentUniforms:h.getParameter(Bu),glsl:h.getParameter(Uu),renderer:h.getParameter(ad),vendor:h.getParameter(id),version:h.getParameter(od),readFloat:ae,npotTextureCube:Ge}};function On(h){return!!h&&typeof h=="object"&&Array.isArray(h.shape)&&Array.isArray(h.stride)&&typeof h.offset=="number"&&h.shape.length===h.stride.length&&(Array.isArray(h.data)||i(h.data))}var Zn=function(h){return Object.keys(h).map(function(T){return h[T]})},ss={shape:ld,flatten:$u};function fd(h,T,G){for(var se=0;se<T;++se)G[se]=h[se]}function Vu(h,T,G,se){for(var me=0,ae=0;ae<T;++ae)for(var fe=h[ae],Le=0;Le<G;++Le)se[me++]=fe[Le]}function sl(h,T,G,se,me,ae){for(var fe=ae,Le=0;Le<T;++Le)for(var De=h[Le],Ne=0;Ne<G;++Ne)for(var Ge=De[Ne],Be=0;Be<se;++Be)me[fe++]=Ge[Be]}function fl(h,T,G,se,me){for(var ae=1,fe=G+1;fe<T.length;++fe)ae*=T[fe];var Le=T[G];if(T.length-G===4){var De=T[G+1],Ne=T[G+2],Ge=T[G+3];for(fe=0;fe<Le;++fe)sl(h[fe],De,Ne,Ge,se,me),me+=ae}else for(fe=0;fe<Le;++fe)fl(h[fe],T,G+1,se,me),me+=ae}function $u(h,T,G,se){var me=1;if(T.length)for(var ae=0;ae<T.length;++ae)me*=T[ae];else me=0;var fe=se||jt.allocType(G,me);switch(T.length){case 0:break;case 1:fd(h,T[0],fe);break;case 2:Vu(h,T[0],T[1],fe);break;case 3:sl(h,T[0],T[1],T[2],fe,0);break;default:fl(h,T,0,fe,0)}return fe}function ld(h){for(var T=[],G=h;G.length;G=G[0])T.push(G.length);return T}var ll={"[object Int8Array]":5120,"[object Int16Array]":5122,"[object Int32Array]":5124,"[object Uint8Array]":5121,"[object Uint8ClampedArray]":5121,"[object Uint16Array]":5123,"[object Uint32Array]":5125,"[object Float32Array]":5126,"[object Float64Array]":5121,"[object ArrayBuffer]":5121},ud=5120,Zu=5122,cd=5124,hd=5121,dd=5123,vd=5125,ul=5126,_d=5126,Ga={int8:ud,int16:Zu,int32:cd,uint8:hd,uint16:dd,uint32:vd,float:ul,float32:_d},pd=35048,md=35040,nf={dynamic:pd,stream:md,static:35044},Cr=ss.flatten,Or=ss.shape,Xu=35044,gd=35040,cl=5121,hl=5126,ha=[];ha[5120]=1,ha[5122]=2,ha[5124]=4,ha[5121]=1,ha[5123]=2,ha[5125]=4,ha[5126]=4;function af(h){return ll[Object.prototype.toString.call(h)]|0}function dl(h,T){for(var G=0;G<T.length;++G)h[G]=T[G]}function qu(h,T,G,se,me,ae,fe){for(var Le=0,De=0;De<G;++De)for(var Ne=0;Ne<se;++Ne)h[Le++]=T[me*De+ae*Ne+fe]}function Sn(h,T,G,se){var me=0,ae={};function fe(K){this.id=me++,this.buffer=h.createBuffer(),this.type=K,this.usage=Xu,this.byteLength=0,this.dimension=1,this.dtype=cl,this.persistentData=null,G.profile&&(this.stats={size:0})}fe.prototype.bind=function(){h.bindBuffer(this.type,this.buffer)},fe.prototype.destroy=function(){We(this)};var Le=[];function De(K,oe){var Oe=Le.pop();return Oe||(Oe=new fe(K)),Oe.bind(),Be(Oe,oe,gd,0,1,!1),Oe}function Ne(K){Le.push(K)}function Ge(K,oe,Oe){K.byteLength=oe.byteLength,h.bufferData(K.type,oe,Oe)}function Be(K,oe,Oe,rt,Se,Qe){var je;if(K.usage=Oe,Array.isArray(oe)){if(K.dtype=rt||hl,oe.length>0){var pt;if(Array.isArray(oe[0])){je=Or(oe);for(var xe=1,ge=1;ge<je.length;++ge)xe*=je[ge];K.dimension=xe,pt=Cr(oe,je,K.dtype),Ge(K,pt,Oe),Qe?K.persistentData=pt:jt.freeType(pt)}else if(typeof oe[0]=="number"){K.dimension=Se;var lt=jt.allocType(K.dtype,oe.length);dl(lt,oe),Ge(K,lt,Oe),Qe?K.persistentData=lt:jt.freeType(lt)}else i(oe[0])?(K.dimension=oe[0].length,K.dtype=rt||af(oe[0])||hl,pt=Cr(oe,[oe.length,oe[0].length],K.dtype),Ge(K,pt,Oe),Qe?K.persistentData=pt:jt.freeType(pt)):E.raise("invalid buffer data")}}else if(i(oe))K.dtype=rt||af(oe),K.dimension=Se,Ge(K,oe,Oe),Qe&&(K.persistentData=new Uint8Array(new Uint8Array(oe.buffer)));else if(On(oe)){je=oe.shape;var Ve=oe.stride,Me=oe.offset,$e=0,qe=0,It=0,Lt=0;je.length===1?($e=je[0],qe=1,It=Ve[0],Lt=0):je.length===2?($e=je[0],qe=je[1],It=Ve[0],Lt=Ve[1]):E.raise("invalid shape"),K.dtype=rt||af(oe.data)||hl,K.dimension=qe;var Ke=jt.allocType(K.dtype,$e*qe);qu(Ke,oe.data,$e,qe,It,Lt,Me),Ge(K,Ke,Oe),Qe?K.persistentData=Ke:jt.freeType(Ke)}else oe instanceof ArrayBuffer?(K.dtype=cl,K.dimension=Se,Ge(K,oe,Oe),Qe&&(K.persistentData=new Uint8Array(new Uint8Array(oe)))):E.raise("invalid buffer data")}function We(K){T.bufferCount--,se(K);var oe=K.buffer;E(oe,"buffer must not be deleted already"),h.deleteBuffer(oe),K.buffer=null,delete ae[K.id]}function Ce(K,oe,Oe,rt){T.bufferCount++;var Se=new fe(oe);ae[Se.id]=Se;function Qe(xe){var ge=Xu,lt=null,Ve=0,Me=0,$e=1;return Array.isArray(xe)||i(xe)||On(xe)||xe instanceof ArrayBuffer?lt=xe:typeof xe=="number"?Ve=xe|0:xe&&(E.type(xe,"object","buffer arguments must be an object, a number or an array"),"data"in xe&&(E(lt===null||Array.isArray(lt)||i(lt)||On(lt),"invalid data for buffer"),lt=xe.data),"usage"in xe&&(E.parameter(xe.usage,nf,"invalid buffer usage"),ge=nf[xe.usage]),"type"in xe&&(E.parameter(xe.type,Ga,"invalid buffer type"),Me=Ga[xe.type]),"dimension"in xe&&(E.type(xe.dimension,"number","invalid dimension"),$e=xe.dimension|0),"length"in xe&&(E.nni(Ve,"buffer length must be a nonnegative integer"),Ve=xe.length|0)),Se.bind(),lt?Be(Se,lt,ge,Me,$e,rt):(Ve&&h.bufferData(Se.type,Ve,ge),Se.dtype=Me||cl,Se.usage=ge,Se.dimension=$e,Se.byteLength=Ve),G.profile&&(Se.stats.size=Se.byteLength*ha[Se.dtype]),Qe}function je(xe,ge){E(ge+xe.byteLength<=Se.byteLength,"invalid buffer subdata call, buffer is too small. Can't write data of size "+xe.byteLength+" starting from offset "+ge+" to a buffer of size "+Se.byteLength),h.bufferSubData(Se.type,ge,xe)}function pt(xe,ge){var lt=(ge||0)|0,Ve;if(Se.bind(),i(xe)||xe instanceof ArrayBuffer)je(xe,lt);else if(Array.isArray(xe)){if(xe.length>0)if(typeof xe[0]=="number"){var Me=jt.allocType(Se.dtype,xe.length);dl(Me,xe),je(Me,lt),jt.freeType(Me)}else if(Array.isArray(xe[0])||i(xe[0])){Ve=Or(xe);var $e=Cr(xe,Ve,Se.dtype);je($e,lt),jt.freeType($e)}else E.raise("invalid buffer data")}else if(On(xe)){Ve=xe.shape;var qe=xe.stride,It=0,Lt=0,Ke=0,Je=0;Ve.length===1?(It=Ve[0],Lt=1,Ke=qe[0],Je=0):Ve.length===2?(It=Ve[0],Lt=Ve[1],Ke=qe[0],Je=qe[1]):E.raise("invalid shape");var wt=Array.isArray(xe.data)?Se.dtype:af(xe.data),Ct=jt.allocType(wt,It*Lt);qu(Ct,xe.data,It,Lt,Ke,Je,xe.offset),je(Ct,lt),jt.freeType(Ct)}else E.raise("invalid data for buffer subdata");return Qe}return Oe||Qe(K),Qe._reglType="buffer",Qe._buffer=Se,Qe.subdata=pt,G.profile&&(Qe.stats=Se.stats),Qe.destroy=function(){We(Se)},Qe}function ke(){Zn(ae).forEach(function(K){K.buffer=h.createBuffer(),h.bindBuffer(K.type,K.buffer),h.bufferData(K.type,K.persistentData||K.byteLength,K.usage)})}return G.profile&&(T.getTotalBufferSize=function(){var K=0;return Object.keys(ae).forEach(function(oe){K+=ae[oe].stats.size}),K}),{create:Ce,createStream:De,destroyStream:Ne,clear:function(){Zn(ae).forEach(We),Le.forEach(We)},getBuffer:function(K){return K&&K._buffer instanceof fe?K._buffer:null},restore:ke,_initBuffer:Be}}var vl=0,Ua=0,Ku=1,_l=1,ii=4,ju=4,Xi={points:vl,point:Ua,lines:Ku,line:_l,triangles:ii,triangle:ju,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Qu=0,Ju=1,Ao=4,ec=5120,pn=5121,tc=5122,An=5123,rc=5124,da=5125,Fi=34963,of=35040,pl=35044;function Br(h,T,G,se){var me={},ae=0,fe={uint8:pn,uint16:An};T.oes_element_index_uint&&(fe.uint32=da);function Le(ke){this.id=ae++,me[this.id]=this,this.buffer=ke,this.primType=Ao,this.vertCount=0,this.type=0}Le.prototype.bind=function(){this.buffer.bind()};var De=[];function Ne(ke){var K=De.pop();return K||(K=new Le(G.create(null,Fi,!0,!1)._buffer)),Be(K,ke,of,-1,-1,0,0),K}function Ge(ke){De.push(ke)}function Be(ke,K,oe,Oe,rt,Se,Qe){ke.buffer.bind();var je;if(K){var pt=Qe;!Qe&&(!i(K)||On(K)&&!i(K.data))&&(pt=T.oes_element_index_uint?da:An),G._initBuffer(ke.buffer,K,oe,pt,3)}else h.bufferData(Fi,Se,oe),ke.buffer.dtype=je||pn,ke.buffer.usage=oe,ke.buffer.dimension=3,ke.buffer.byteLength=Se;if(je=Qe,!Qe){switch(ke.buffer.dtype){case pn:case ec:je=pn;break;case An:case tc:je=An;break;case da:case rc:je=da;break;default:E.raise("unsupported type for element array")}ke.buffer.dtype=je}ke.type=je,E(je!==da||!!T.oes_element_index_uint,"32 bit element buffers not supported, enable oes_element_index_uint first");var xe=rt;xe<0&&(xe=ke.buffer.byteLength,je===An?xe>>=1:je===da&&(xe>>=2)),ke.vertCount=xe;var ge=Oe;if(Oe<0){ge=Ao;var lt=ke.buffer.dimension;lt===1&&(ge=Qu),lt===2&&(ge=Ju),lt===3&&(ge=Ao)}ke.primType=ge}function We(ke){se.elementsCount--,E(ke.buffer!==null,"must not double destroy elements"),delete me[ke.id],ke.buffer.destroy(),ke.buffer=null}function Ce(ke,K){var oe=G.create(null,Fi,!0),Oe=new Le(oe._buffer);se.elementsCount++;function rt(Se){if(!Se)oe(),Oe.primType=Ao,Oe.vertCount=0,Oe.type=pn;else if(typeof Se=="number")oe(Se),Oe.primType=Ao,Oe.vertCount=Se|0,Oe.type=pn;else{var Qe=null,je=pl,pt=-1,xe=-1,ge=0,lt=0;Array.isArray(Se)||i(Se)||On(Se)?Qe=Se:(E.type(Se,"object","invalid arguments for elements"),"data"in Se&&(Qe=Se.data,E(Array.isArray(Qe)||i(Qe)||On(Qe),"invalid data for element buffer")),"usage"in Se&&(E.parameter(Se.usage,nf,"invalid element buffer usage"),je=nf[Se.usage]),"primitive"in Se&&(E.parameter(Se.primitive,Xi,"invalid element buffer primitive"),pt=Xi[Se.primitive]),"count"in Se&&(E(typeof Se.count=="number"&&Se.count>=0,"invalid vertex count for elements"),xe=Se.count|0),"type"in Se&&(E.parameter(Se.type,fe,"invalid buffer type"),lt=fe[Se.type]),"length"in Se?ge=Se.length|0:(ge=xe,lt===An||lt===tc?ge*=2:(lt===da||lt===rc)&&(ge*=4))),Be(Oe,Qe,je,pt,xe,ge,lt)}return rt}return rt(ke),rt._reglType="elements",rt._elements=Oe,rt.subdata=function(Se,Qe){return oe.subdata(Se,Qe),rt},rt.destroy=function(){We(Oe)},rt}return{create:Ce,createStream:Ne,destroyStream:Ge,getElements:function(ke){return typeof ke=="function"&&ke._elements instanceof Le?ke._elements:null},clear:function(){Zn(me).forEach(We)}}}var qi=new Float32Array(1),ml=new Uint32Array(qi.buffer),yd=5123;function sf(h){for(var T=jt.allocType(yd,h.length),G=0;G<h.length;++G)if(isNaN(h[G]))T[G]=65535;else if(h[G]===1/0)T[G]=31744;else if(h[G]===-1/0)T[G]=64512;else{qi[0]=h[G];var se=ml[0],me=se>>>31<<15,ae=(se<<1>>>24)-127,fe=se>>13&(1<<10)-1;if(ae<-24)T[G]=me;else if(ae<-14){var Le=-14-ae;T[G]=me+(fe+(1<<10)>>Le)}else ae>15?T[G]=me+31744:T[G]=me+(ae+15<<10)+fe}return T}function Pr(h){return Array.isArray(h)||i(h)}var nc=function(h){return!(h&h-1)&&!!h},xd=34467,yi=3553,To=34067,Ki=34069,Ya=6408,ff=6406,fs=6407,Ha=6409,Eo=6410,gl=32854,yl=32855,lf=36194,xl=32819,bd=32820,ic=33635,jn=34042,ls=6402,va=34041,uf=35904,cf=35906,Do=36193,bl=33776,wl=33777,Sl=33778,Al=33779,za=35986,ac=35987,oc=34798,hf=35840,Tl=35841,ji=35842,us=35843,sc=36196,Lo=5121,El=5123,_a=5125,Yn=5126,fc=10242,wd=10243,Sd=10497,Dl=33071,Ad=33648,Td=10240,Ro=10241,te=9728,Ee=9729,ve=9984,gt=9985,Zt=9986,mr=9987,fn=33170,Er=4352,Ll=4353,Ed=4354,ai=34046,df=3317,Dd=37440,Co=37441,vf=37443,cs=37444,gr=33984,Ld=[ve,Zt,gt,mr],hs=[0,Ha,Eo,fs,Ya],Hn={};Hn[Ha]=Hn[ff]=Hn[ls]=1,Hn[va]=Hn[Eo]=2,Hn[fs]=Hn[uf]=3,Hn[Ya]=Hn[cf]=4;function Oo(h){return"[object "+h+"]"}var lc=Oo("HTMLCanvasElement"),uc=Oo("OffscreenCanvas"),ds=Oo("CanvasRenderingContext2D"),Qi=Oo("ImageBitmap"),vs=Oo("HTMLImageElement"),Rl=Oo("HTMLVideoElement"),_f=Object.keys(ll).concat([lc,uc,ds,Qi,vs,Rl]),Wa=[];Wa[Lo]=1,Wa[Yn]=4,Wa[Do]=2,Wa[El]=2,Wa[_a]=4;var ln=[];ln[gl]=2,ln[yl]=2,ln[lf]=2,ln[va]=4,ln[bl]=.5,ln[wl]=.5,ln[Sl]=1,ln[Al]=1,ln[za]=.5,ln[ac]=1,ln[oc]=1,ln[hf]=.5,ln[Tl]=.25,ln[ji]=.5,ln[us]=.25,ln[sc]=.5;function _s(h){return Array.isArray(h)&&(h.length===0||typeof h[0]=="number")}function Cl(h){if(!Array.isArray(h))return!1;var T=h.length;return!(T===0||!Pr(h[0]))}function xi(h){return Object.prototype.toString.call(h)}function pa(h){return xi(h)===lc}function ps(h){return xi(h)===uc}function Rd(h){return xi(h)===ds}function Cd(h){return xi(h)===Qi}function Od(h){return xi(h)===vs}function pf(h){return xi(h)===Rl}function Io(h){if(!h)return!1;var T=xi(h);return _f.indexOf(T)>=0?!0:_s(h)||Cl(h)||On(h)}function mf(h){return ll[Object.prototype.toString.call(h)]|0}function Id(h,T){var G=T.length;switch(h.type){case Lo:case El:case _a:case Yn:var se=jt.allocType(h.type,G);se.set(T),h.data=se;break;case Do:h.data=sf(T);break;default:E.raise("unsupported texture type, must specify a typed array")}}function Ol(h,T){return jt.allocType(h.type===Do?Yn:h.type,T)}function cc(h,T){h.type===Do?(h.data=sf(T),jt.freeType(T)):h.data=T}function Md(h,T,G,se,me,ae){for(var fe=h.width,Le=h.height,De=h.channels,Ne=fe*Le*De,Ge=Ol(h,Ne),Be=0,We=0;We<Le;++We)for(var Ce=0;Ce<fe;++Ce)for(var ke=0;ke<De;++ke)Ge[Be++]=T[G*Ce+se*We+me*ke+ae];cc(h,Ge)}function qr(h,T,G,se,me,ae){var fe;if(typeof ln[h]<"u"?fe=ln[h]:fe=Hn[h]*Wa[T],ae&&(fe*=6),me){for(var Le=0,De=G;De>=1;)Le+=fe*De*De,De/=2;return Le}else return fe*G*se}function In(h,T,G,se,me,ae,fe){var Le={"don't care":Er,"dont care":Er,nice:Ed,fast:Ll},De={repeat:Sd,clamp:Dl,mirror:Ad},Ne={nearest:te,linear:Ee},Ge=a({mipmap:mr,"nearest mipmap nearest":ve,"linear mipmap nearest":gt,"nearest mipmap linear":Zt,"linear mipmap linear":mr},Ne),Be={none:0,browser:cs},We={uint8:Lo,rgba4:xl,rgb565:ic,"rgb5 a1":bd},Ce={alpha:ff,luminance:Ha,"luminance alpha":Eo,rgb:fs,rgba:Ya,rgba4:gl,"rgb5 a1":yl,rgb565:lf},ke={};T.ext_srgb&&(Ce.srgb=uf,Ce.srgba=cf),T.oes_texture_float&&(We.float32=We.float=Yn),T.oes_texture_half_float&&(We.float16=We["half float"]=Do),T.webgl_depth_texture&&(a(Ce,{depth:ls,"depth stencil":va}),a(We,{uint16:El,uint32:_a,"depth stencil":jn})),T.webgl_compressed_texture_s3tc&&a(ke,{"rgb s3tc dxt1":bl,"rgba s3tc dxt1":wl,"rgba s3tc dxt3":Sl,"rgba s3tc dxt5":Al}),T.webgl_compressed_texture_atc&&a(ke,{"rgb atc":za,"rgba atc explicit alpha":ac,"rgba atc interpolated alpha":oc}),T.webgl_compressed_texture_pvrtc&&a(ke,{"rgb pvrtc 4bppv1":hf,"rgb pvrtc 2bppv1":Tl,"rgba pvrtc 4bppv1":ji,"rgba pvrtc 2bppv1":us}),T.webgl_compressed_texture_etc1&&(ke["rgb etc1"]=sc);var K=Array.prototype.slice.call(h.getParameter(xd));Object.keys(ke).forEach(function(k){var le=ke[k];K.indexOf(le)>=0&&(Ce[k]=le)});var oe=Object.keys(Ce);G.textureFormats=oe;var Oe=[];Object.keys(Ce).forEach(function(k){var le=Ce[k];Oe[le]=k});var rt=[];Object.keys(We).forEach(function(k){var le=We[k];rt[le]=k});var Se=[];Object.keys(Ne).forEach(function(k){var le=Ne[k];Se[le]=k});var Qe=[];Object.keys(Ge).forEach(function(k){var le=Ge[k];Qe[le]=k});var je=[];Object.keys(De).forEach(function(k){var le=De[k];je[le]=k});var pt=oe.reduce(function(k,le){var ne=Ce[le];return ne===Ha||ne===ff||ne===Ha||ne===Eo||ne===ls||ne===va||T.ext_srgb&&(ne===uf||ne===cf)?k[ne]=ne:ne===yl||le.indexOf("rgba")>=0?k[ne]=Ya:k[ne]=fs,k},{});function xe(){this.internalformat=Ya,this.format=Ya,this.type=Lo,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=cs,this.width=0,this.height=0,this.channels=0}function ge(k,le){k.internalformat=le.internalformat,k.format=le.format,k.type=le.type,k.compressed=le.compressed,k.premultiplyAlpha=le.premultiplyAlpha,k.flipY=le.flipY,k.unpackAlignment=le.unpackAlignment,k.colorSpace=le.colorSpace,k.width=le.width,k.height=le.height,k.channels=le.channels}function lt(k,le){if(!(typeof le!="object"||!le)){if("premultiplyAlpha"in le&&(E.type(le.premultiplyAlpha,"boolean","invalid premultiplyAlpha"),k.premultiplyAlpha=le.premultiplyAlpha),"flipY"in le&&(E.type(le.flipY,"boolean","invalid texture flip"),k.flipY=le.flipY),"alignment"in le&&(E.oneOf(le.alignment,[1,2,4,8],"invalid texture unpack alignment"),k.unpackAlignment=le.alignment),"colorSpace"in le&&(E.parameter(le.colorSpace,Be,"invalid colorSpace"),k.colorSpace=Be[le.colorSpace]),"type"in le){var ne=le.type;E(T.oes_texture_float||!(ne==="float"||ne==="float32"),"you must enable the OES_texture_float extension in order to use floating point textures."),E(T.oes_texture_half_float||!(ne==="half float"||ne==="float16"),"you must enable the OES_texture_half_float extension in order to use 16-bit floating point textures."),E(T.webgl_depth_texture||!(ne==="uint16"||ne==="uint32"||ne==="depth stencil"),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),E.parameter(ne,We,"invalid texture type"),k.type=We[ne]}var ft=k.width,zt=k.height,R=k.channels,y=!1;"shape"in le?(E(Array.isArray(le.shape)&&le.shape.length>=2,"shape must be an array"),ft=le.shape[0],zt=le.shape[1],le.shape.length===3&&(R=le.shape[2],E(R>0&&R<=4,"invalid number of channels"),y=!0),E(ft>=0&&ft<=G.maxTextureSize,"invalid width"),E(zt>=0&&zt<=G.maxTextureSize,"invalid height")):("radius"in le&&(ft=zt=le.radius,E(ft>=0&&ft<=G.maxTextureSize,"invalid radius")),"width"in le&&(ft=le.width,E(ft>=0&&ft<=G.maxTextureSize,"invalid width")),"height"in le&&(zt=le.height,E(zt>=0&&zt<=G.maxTextureSize,"invalid height")),"channels"in le&&(R=le.channels,E(R>0&&R<=4,"invalid number of channels"),y=!0)),k.width=ft|0,k.height=zt|0,k.channels=R|0;var H=!1;if("format"in le){var j=le.format;E(T.webgl_depth_texture||!(j==="depth"||j==="depth stencil"),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),E.parameter(j,Ce,"invalid texture format");var Q=k.internalformat=Ce[j];k.format=pt[Q],j in We&&("type"in le||(k.type=We[j])),j in ke&&(k.compressed=!0),H=!0}!y&&H?k.channels=Hn[k.format]:y&&!H?k.channels!==hs[k.format]&&(k.format=k.internalformat=hs[k.channels]):H&&y&&E(k.channels===Hn[k.format],"number of channels inconsistent with specified format")}}function Ve(k){h.pixelStorei(Dd,k.flipY),h.pixelStorei(Co,k.premultiplyAlpha),h.pixelStorei(vf,k.colorSpace),h.pixelStorei(df,k.unpackAlignment)}function Me(){xe.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function $e(k,le){var ne=null;if(Io(le)?ne=le:le&&(E.type(le,"object","invalid pixel data type"),lt(k,le),"x"in le&&(k.xOffset=le.x|0),"y"in le&&(k.yOffset=le.y|0),Io(le.data)&&(ne=le.data)),E(!k.compressed||ne instanceof Uint8Array,"compressed texture data must be stored in a uint8array"),le.copy){E(!ne,"can not specify copy and data field for the same texture");var ft=me.viewportWidth,zt=me.viewportHeight;k.width=k.width||ft-k.xOffset,k.height=k.height||zt-k.yOffset,k.needsCopy=!0,E(k.xOffset>=0&&k.xOffset<ft&&k.yOffset>=0&&k.yOffset<zt&&k.width>0&&k.width<=ft&&k.height>0&&k.height<=zt,"copy texture read out of bounds")}else if(!ne)k.width=k.width||1,k.height=k.height||1,k.channels=k.channels||4;else if(i(ne))k.channels=k.channels||4,k.data=ne,!("type"in le)&&k.type===Lo&&(k.type=mf(ne));else if(_s(ne))k.channels=k.channels||4,Id(k,ne),k.alignment=1,k.needsFree=!0;else if(On(ne)){var R=ne.data;!Array.isArray(R)&&k.type===Lo&&(k.type=mf(R));var y=ne.shape,H=ne.stride,j,Q,W,Y,X,O;y.length===3?(W=y[2],O=H[2]):(E(y.length===2,"invalid ndarray pixel data, must be 2 or 3D"),W=1,O=1),j=y[0],Q=y[1],Y=H[0],X=H[1],k.alignment=1,k.width=j,k.height=Q,k.channels=W,k.format=k.internalformat=hs[W],k.needsFree=!0,Md(k,R,Y,X,O,ne.offset)}else if(pa(ne)||ps(ne)||Rd(ne))pa(ne)||ps(ne)?k.element=ne:k.element=ne.canvas,k.width=k.element.width,k.height=k.element.height,k.channels=4;else if(Cd(ne))k.element=ne,k.width=ne.width,k.height=ne.height,k.channels=4;else if(Od(ne))k.element=ne,k.width=ne.naturalWidth,k.height=ne.naturalHeight,k.channels=4;else if(pf(ne))k.element=ne,k.width=ne.videoWidth,k.height=ne.videoHeight,k.channels=4;else if(Cl(ne)){var N=k.width||ne[0].length,M=k.height||ne.length,re=k.channels;Pr(ne[0][0])?re=re||ne[0][0].length:re=re||1;for(var ee=ss.shape(ne),_e=1,be=0;be<ee.length;++be)_e*=ee[be];var Ye=Ol(k,_e);ss.flatten(ne,ee,"",Ye),cc(k,Ye),k.alignment=1,k.width=N,k.height=M,k.channels=re,k.format=k.internalformat=hs[re],k.needsFree=!0}k.type===Yn?E(G.extensions.indexOf("oes_texture_float")>=0,"oes_texture_float extension not enabled"):k.type===Do&&E(G.extensions.indexOf("oes_texture_half_float")>=0,"oes_texture_half_float extension not enabled")}function qe(k,le,ne){var ft=k.element,zt=k.data,R=k.internalformat,y=k.format,H=k.type,j=k.width,Q=k.height;Ve(k),ft?h.texImage2D(le,ne,y,y,H,ft):k.compressed?h.compressedTexImage2D(le,ne,R,j,Q,0,zt):k.needsCopy?(se(),h.copyTexImage2D(le,ne,y,k.xOffset,k.yOffset,j,Q,0)):h.texImage2D(le,ne,y,j,Q,0,y,H,zt||null)}function It(k,le,ne,ft,zt){var R=k.element,y=k.data,H=k.internalformat,j=k.format,Q=k.type,W=k.width,Y=k.height;Ve(k),R?h.texSubImage2D(le,zt,ne,ft,j,Q,R):k.compressed?h.compressedTexSubImage2D(le,zt,ne,ft,H,W,Y,y):k.needsCopy?(se(),h.copyTexSubImage2D(le,zt,ne,ft,k.xOffset,k.yOffset,W,Y)):h.texSubImage2D(le,zt,ne,ft,W,Y,j,Q,y)}var Lt=[];function Ke(){return Lt.pop()||new Me}function Je(k){k.needsFree&&jt.freeType(k.data),Me.call(k),Lt.push(k)}function wt(){xe.call(this),this.genMipmaps=!1,this.mipmapHint=Er,this.mipmask=0,this.images=Array(16)}function Ct(k,le,ne){var ft=k.images[0]=Ke();k.mipmask=1,ft.width=k.width=le,ft.height=k.height=ne,ft.channels=k.channels=4}function Vt(k,le){var ne=null;if(Io(le))ne=k.images[0]=Ke(),ge(ne,k),$e(ne,le),k.mipmask=1;else if(lt(k,le),Array.isArray(le.mipmap))for(var ft=le.mipmap,zt=0;zt<ft.length;++zt)ne=k.images[zt]=Ke(),ge(ne,k),ne.width>>=zt,ne.height>>=zt,$e(ne,ft[zt]),k.mipmask|=1<<zt;else ne=k.images[0]=Ke(),ge(ne,k),$e(ne,le),k.mipmask=1;ge(k,k.images[0]),k.compressed&&(k.internalformat===bl||k.internalformat===wl||k.internalformat===Sl||k.internalformat===Al)&&E(k.width%4===0&&k.height%4===0,"for compressed texture formats, mipmap level 0 must have width and height that are a multiple of 4")}function Ir(k,le){for(var ne=k.images,ft=0;ft<ne.length;++ft){if(!ne[ft])return;qe(ne[ft],le,ft)}}var Lr=[];function Xt(){var k=Lr.pop()||new wt;xe.call(k),k.mipmask=0;for(var le=0;le<16;++le)k.images[le]=null;return k}function Dr(k){for(var le=k.images,ne=0;ne<le.length;++ne)le[ne]&&Je(le[ne]),le[ne]=null;Lr.push(k)}function pr(){this.minFilter=te,this.magFilter=te,this.wrapS=Dl,this.wrapT=Dl,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=Er}function Kr(k,le){if("min"in le){var ne=le.min;E.parameter(ne,Ge),k.minFilter=Ge[ne],Ld.indexOf(k.minFilter)>=0&&!("faces"in le)&&(k.genMipmaps=!0)}if("mag"in le){var ft=le.mag;E.parameter(ft,Ne),k.magFilter=Ne[ft]}var zt=k.wrapS,R=k.wrapT;if("wrap"in le){var y=le.wrap;typeof y=="string"?(E.parameter(y,De),zt=R=De[y]):Array.isArray(y)&&(E.parameter(y[0],De),E.parameter(y[1],De),zt=De[y[0]],R=De[y[1]])}else{if("wrapS"in le){var H=le.wrapS;E.parameter(H,De),zt=De[H]}if("wrapT"in le){var j=le.wrapT;E.parameter(j,De),R=De[j]}}if(k.wrapS=zt,k.wrapT=R,"anisotropic"in le){var Q=le.anisotropic;E(typeof Q=="number"&&Q>=1&&Q<=G.maxAnisotropic,"aniso samples must be between 1 and "),k.anisotropic=le.anisotropic}if("mipmap"in le){var W=!1;switch(typeof le.mipmap){case"string":E.parameter(le.mipmap,Le,"invalid mipmap hint"),k.mipmapHint=Le[le.mipmap],k.genMipmaps=!0,W=!0;break;case"boolean":W=k.genMipmaps=le.mipmap;break;case"object":E(Array.isArray(le.mipmap),"invalid mipmap type"),k.genMipmaps=!1,W=!0;break;default:E.raise("invalid mipmap type")}W&&!("min"in le)&&(k.minFilter=ve)}}function jr(k,le){h.texParameteri(le,Ro,k.minFilter),h.texParameteri(le,Td,k.magFilter),h.texParameteri(le,fc,k.wrapS),h.texParameteri(le,wd,k.wrapT),T.ext_texture_filter_anisotropic&&h.texParameteri(le,ai,k.anisotropic),k.genMipmaps&&(h.hint(fn,k.mipmapHint),h.generateMipmap(le))}var tn=0,un={},gn=G.maxTextureUnits,Wr=Array(gn).map(function(){return null});function Ut(k){xe.call(this),this.mipmask=0,this.internalformat=Ya,this.id=tn++,this.refCount=1,this.target=k,this.texture=h.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new pr,fe.profile&&(this.stats={size:0})}function yn(k){h.activeTexture(gr),h.bindTexture(k.target,k.texture)}function hr(){var k=Wr[0];k?h.bindTexture(k.target,k.texture):h.bindTexture(yi,null)}function At(k){var le=k.texture;E(le,"must not double destroy texture");var ne=k.unit,ft=k.target;ne>=0&&(h.activeTexture(gr+ne),h.bindTexture(ft,null),Wr[ne]=null),h.deleteTexture(le),k.texture=null,k.params=null,k.pixels=null,k.refCount=0,delete un[k.id],ae.textureCount--}a(Ut.prototype,{bind:function(){var k=this;k.bindCount+=1;var le=k.unit;if(le<0){for(var ne=0;ne<gn;++ne){var ft=Wr[ne];if(ft){if(ft.bindCount>0)continue;ft.unit=-1}Wr[ne]=k,le=ne;break}le>=gn&&E.raise("insufficient number of texture units"),fe.profile&&ae.maxTextureUnits<le+1&&(ae.maxTextureUnits=le+1),k.unit=le,h.activeTexture(gr+le),h.bindTexture(k.target,k.texture)}return le},unbind:function(){this.bindCount-=1},decRef:function(){--this.refCount<=0&&At(this)}});function qt(k,le){var ne=new Ut(yi);un[ne.id]=ne,ae.textureCount++;function ft(y,H){var j=ne.texInfo;pr.call(j);var Q=Xt();return typeof y=="number"?typeof H=="number"?Ct(Q,y|0,H|0):Ct(Q,y|0,y|0):y?(E.type(y,"object","invalid arguments to regl.texture"),Kr(j,y),Vt(Q,y)):Ct(Q,1,1),j.genMipmaps&&(Q.mipmask=(Q.width<<1)-1),ne.mipmask=Q.mipmask,ge(ne,Q),E.texture2D(j,Q,G),ne.internalformat=Q.internalformat,ft.width=Q.width,ft.height=Q.height,yn(ne),Ir(Q,yi),jr(j,yi),hr(),Dr(Q),fe.profile&&(ne.stats.size=qr(ne.internalformat,ne.type,Q.width,Q.height,j.genMipmaps,!1)),ft.format=Oe[ne.internalformat],ft.type=rt[ne.type],ft.mag=Se[j.magFilter],ft.min=Qe[j.minFilter],ft.wrapS=je[j.wrapS],ft.wrapT=je[j.wrapT],ft}function zt(y,H,j,Q){E(!!y,"must specify image data");var W=H|0,Y=j|0,X=Q|0,O=Ke();return ge(O,ne),O.width=0,O.height=0,$e(O,y),O.width=O.width||(ne.width>>X)-W,O.height=O.height||(ne.height>>X)-Y,E(ne.type===O.type&&ne.format===O.format&&ne.internalformat===O.internalformat,"incompatible format for texture.subimage"),E(W>=0&&Y>=0&&W+O.width<=ne.width&&Y+O.height<=ne.height,"texture.subimage write out of bounds"),E(ne.mipmask&1<<X,"missing mipmap data"),E(O.data||O.element||O.needsCopy,"missing image data"),yn(ne),It(O,yi,W,Y,X),hr(),Je(O),ft}function R(y,H){var j=y|0,Q=H|0||j;if(j===ne.width&&Q===ne.height)return ft;ft.width=ne.width=j,ft.height=ne.height=Q,yn(ne);for(var W=0;ne.mipmask>>W;++W){var Y=j>>W,X=Q>>W;if(!Y||!X)break;h.texImage2D(yi,W,ne.format,Y,X,0,ne.format,ne.type,null)}return hr(),fe.profile&&(ne.stats.size=qr(ne.internalformat,ne.type,j,Q,!1,!1)),ft}return ft(k,le),ft.subimage=zt,ft.resize=R,ft._reglType="texture2d",ft._texture=ne,fe.profile&&(ft.stats=ne.stats),ft.destroy=function(){ne.decRef()},ft}function er(k,le,ne,ft,zt,R){var y=new Ut(To);un[y.id]=y,ae.cubeCount++;var H=new Array(6);function j(Y,X,O,N,M,re){var ee,_e=y.texInfo;for(pr.call(_e),ee=0;ee<6;++ee)H[ee]=Xt();if(typeof Y=="number"||!Y){var be=Y|0||1;for(ee=0;ee<6;++ee)Ct(H[ee],be,be)}else if(typeof Y=="object")if(X)Vt(H[0],Y),Vt(H[1],X),Vt(H[2],O),Vt(H[3],N),Vt(H[4],M),Vt(H[5],re);else if(Kr(_e,Y),lt(y,Y),"faces"in Y){var Ye=Y.faces;for(E(Array.isArray(Ye)&&Ye.length===6,"cube faces must be a length 6 array"),ee=0;ee<6;++ee)E(typeof Ye[ee]=="object"&&!!Ye[ee],"invalid input for cube map face"),ge(H[ee],y),Vt(H[ee],Ye[ee])}else for(ee=0;ee<6;++ee)Vt(H[ee],Y);else E.raise("invalid arguments to cube map");for(ge(y,H[0]),E.optional(function(){G.npotTextureCube||E(nc(y.width)&&nc(y.height),"your browser does not support non power or two texture dimensions")}),_e.genMipmaps?y.mipmask=(H[0].width<<1)-1:y.mipmask=H[0].mipmask,E.textureCube(y,_e,H,G),y.internalformat=H[0].internalformat,j.width=H[0].width,j.height=H[0].height,yn(y),ee=0;ee<6;++ee)Ir(H[ee],Ki+ee);for(jr(_e,To),hr(),fe.profile&&(y.stats.size=qr(y.internalformat,y.type,j.width,j.height,_e.genMipmaps,!0)),j.format=Oe[y.internalformat],j.type=rt[y.type],j.mag=Se[_e.magFilter],j.min=Qe[_e.minFilter],j.wrapS=je[_e.wrapS],j.wrapT=je[_e.wrapT],ee=0;ee<6;++ee)Dr(H[ee]);return j}function Q(Y,X,O,N,M){E(!!X,"must specify image data"),E(typeof Y=="number"&&Y===(Y|0)&&Y>=0&&Y<6,"invalid face");var re=O|0,ee=N|0,_e=M|0,be=Ke();return ge(be,y),be.width=0,be.height=0,$e(be,X),be.width=be.width||(y.width>>_e)-re,be.height=be.height||(y.height>>_e)-ee,E(y.type===be.type&&y.format===be.format&&y.internalformat===be.internalformat,"incompatible format for texture.subimage"),E(re>=0&&ee>=0&&re+be.width<=y.width&&ee+be.height<=y.height,"texture.subimage write out of bounds"),E(y.mipmask&1<<_e,"missing mipmap data"),E(be.data||be.element||be.needsCopy,"missing image data"),yn(y),It(be,Ki+Y,re,ee,_e),hr(),Je(be),j}function W(Y){var X=Y|0;if(X!==y.width){j.width=y.width=X,j.height=y.height=X,yn(y);for(var O=0;O<6;++O)for(var N=0;y.mipmask>>N;++N)h.texImage2D(Ki+O,N,y.format,X>>N,X>>N,0,y.format,y.type,null);return hr(),fe.profile&&(y.stats.size=qr(y.internalformat,y.type,j.width,j.height,!1,!0)),j}}return j(k,le,ne,ft,zt,R),j.subimage=Q,j.resize=W,j._reglType="textureCube",j._texture=y,fe.profile&&(j.stats=y.stats),j.destroy=function(){y.decRef()},j}function Vr(){for(var k=0;k<gn;++k)h.activeTexture(gr+k),h.bindTexture(yi,null),Wr[k]=null;Zn(un).forEach(At),ae.cubeCount=0,ae.textureCount=0}fe.profile&&(ae.getTotalTextureSize=function(){var k=0;return Object.keys(un).forEach(function(le){k+=un[le].stats.size}),k});function Ei(){for(var k=0;k<gn;++k){var le=Wr[k];le&&(le.bindCount=0,le.unit=-1,Wr[k]=null)}Zn(un).forEach(function(ne){ne.texture=h.createTexture(),h.bindTexture(ne.target,ne.texture);for(var ft=0;ft<32;++ft)if((ne.mipmask&1<<ft)!==0)if(ne.target===yi)h.texImage2D(yi,ft,ne.internalformat,ne.width>>ft,ne.height>>ft,0,ne.internalformat,ne.type,null);else for(var zt=0;zt<6;++zt)h.texImage2D(Ki+zt,ft,ne.internalformat,ne.width>>ft,ne.height>>ft,0,ne.internalformat,ne.type,null);jr(ne.texInfo,ne.target)})}function Da(){for(var k=0;k<gn;++k){var le=Wr[k];le&&(le.bindCount=0,le.unit=-1,Wr[k]=null),h.activeTexture(gr+k),h.bindTexture(yi,null),h.bindTexture(To,null)}}return{create2D:qt,createCube:er,clear:Vr,getTexture:function(k){return null},restore:Ei,refresh:Da}}var ma=36161,gf=32854,Il=32855,hc=36194,yf=33189,Mo=36168,xf=34041,Va=35907,Fo=34836,ko=34842,ms=34843,Mn=[];Mn[gf]=2,Mn[Il]=2,Mn[hc]=2,Mn[yf]=2,Mn[Mo]=1,Mn[xf]=4,Mn[Va]=4,Mn[Fo]=16,Mn[ko]=8,Mn[ms]=6;function dc(h,T,G){return Mn[h]*T*G}var Fd=function(h,T,G,se,me){var ae={rgba4:gf,rgb565:hc,"rgb5 a1":Il,depth:yf,stencil:Mo,"depth stencil":xf};T.ext_srgb&&(ae.srgba=Va),T.ext_color_buffer_half_float&&(ae.rgba16f=ko,ae.rgb16f=ms),T.webgl_color_buffer_float&&(ae.rgba32f=Fo);var fe=[];Object.keys(ae).forEach(function(Ce){var ke=ae[Ce];fe[ke]=Ce});var Le=0,De={};function Ne(Ce){this.id=Le++,this.refCount=1,this.renderbuffer=Ce,this.format=gf,this.width=0,this.height=0,me.profile&&(this.stats={size:0})}Ne.prototype.decRef=function(){--this.refCount<=0&&Ge(this)};function Ge(Ce){var ke=Ce.renderbuffer;E(ke,"must not double destroy renderbuffer"),h.bindRenderbuffer(ma,null),h.deleteRenderbuffer(ke),Ce.renderbuffer=null,Ce.refCount=0,delete De[Ce.id],se.renderbufferCount--}function Be(Ce,ke){var K=new Ne(h.createRenderbuffer());De[K.id]=K,se.renderbufferCount++;function oe(rt,Se){var Qe=0,je=0,pt=gf;if(typeof rt=="object"&&rt){var xe=rt;if("shape"in xe){var ge=xe.shape;E(Array.isArray(ge)&&ge.length>=2,"invalid renderbuffer shape"),Qe=ge[0]|0,je=ge[1]|0}else"radius"in xe&&(Qe=je=xe.radius|0),"width"in xe&&(Qe=xe.width|0),"height"in xe&&(je=xe.height|0);"format"in xe&&(E.parameter(xe.format,ae,"invalid renderbuffer format"),pt=ae[xe.format])}else typeof rt=="number"?(Qe=rt|0,typeof Se=="number"?je=Se|0:je=Qe):rt?E.raise("invalid arguments to renderbuffer constructor"):Qe=je=1;if(E(Qe>0&&je>0&&Qe<=G.maxRenderbufferSize&&je<=G.maxRenderbufferSize,"invalid renderbuffer size"),!(Qe===K.width&&je===K.height&&pt===K.format))return oe.width=K.width=Qe,oe.height=K.height=je,K.format=pt,h.bindRenderbuffer(ma,K.renderbuffer),h.renderbufferStorage(ma,pt,Qe,je),E(h.getError()===0,"invalid render buffer format"),me.profile&&(K.stats.size=dc(K.format,K.width,K.height)),oe.format=fe[K.format],oe}function Oe(rt,Se){var Qe=rt|0,je=Se|0||Qe;return Qe===K.width&&je===K.height||(E(Qe>0&&je>0&&Qe<=G.maxRenderbufferSize&&je<=G.maxRenderbufferSize,"invalid renderbuffer size"),oe.width=K.width=Qe,oe.height=K.height=je,h.bindRenderbuffer(ma,K.renderbuffer),h.renderbufferStorage(ma,K.format,Qe,je),E(h.getError()===0,"invalid render buffer format"),me.profile&&(K.stats.size=dc(K.format,K.width,K.height))),oe}return oe(Ce,ke),oe.resize=Oe,oe._reglType="renderbuffer",oe._renderbuffer=K,me.profile&&(oe.stats=K.stats),oe.destroy=function(){K.decRef()},oe}me.profile&&(se.getTotalRenderbufferSize=function(){var Ce=0;return Object.keys(De).forEach(function(ke){Ce+=De[ke].stats.size}),Ce});function We(){Zn(De).forEach(function(Ce){Ce.renderbuffer=h.createRenderbuffer(),h.bindRenderbuffer(ma,Ce.renderbuffer),h.renderbufferStorage(ma,Ce.format,Ce.width,Ce.height)}),h.bindRenderbuffer(ma,null)}return{create:Be,clear:function(){Zn(De).forEach(Ge)},restore:We}},Ji=36160,Ml=36161,$a=3553,Za=34069,Po=36064,Fl=36096,S=36128,Xa=33306,gs=36053,oi=36054,cr=36055,kd=36057,Pd=36061,Nd=36193,qa=5121,Bd=5126,vc=6407,_c=6408,Gd=6402,Ud=[vc,_c],bi=[];bi[_c]=4,bi[vc]=3;var bf=[];bf[qa]=1,bf[Bd]=4,bf[Nd]=2;var Yd=32854,Hd=32855,zd=36194,Wd=33189,ea=36168,pc=34041,Vd=35907,$d=34836,Zd=34842,Xd=34843,Ka=[Yd,Hd,zd,Vd,Zd,Xd,$d],No={};No[gs]="complete",No[oi]="incomplete attachment",No[kd]="incomplete dimensions",No[cr]="incomplete, missing attachment",No[Pd]="unsupported";function qd(h,T,G,se,me,ae){var fe={cur:null,next:null,dirty:!1,setFBO:null},Le=["rgba"],De=["rgba4","rgb565","rgb5 a1"];T.ext_srgb&&De.push("srgba"),T.ext_color_buffer_half_float&&De.push("rgba16f","rgb16f"),T.webgl_color_buffer_float&&De.push("rgba32f");var Ne=["uint8"];T.oes_texture_half_float&&Ne.push("half float","float16"),T.oes_texture_float&&Ne.push("float","float32");function Ge(Me,$e,qe){this.target=Me,this.texture=$e,this.renderbuffer=qe;var It=0,Lt=0;$e?(It=$e.width,Lt=$e.height):qe&&(It=qe.width,Lt=qe.height),this.width=It,this.height=Lt}function Be(Me){Me&&(Me.texture&&Me.texture._texture.decRef(),Me.renderbuffer&&Me.renderbuffer._renderbuffer.decRef())}function We(Me,$e,qe){if(!!Me)if(Me.texture){var It=Me.texture._texture,Lt=Math.max(1,It.width),Ke=Math.max(1,It.height);E(Lt===$e&&Ke===qe,"inconsistent width/height for supplied texture"),It.refCount+=1}else{var Je=Me.renderbuffer._renderbuffer;E(Je.width===$e&&Je.height===qe,"inconsistent width/height for renderbuffer"),Je.refCount+=1}}function Ce(Me,$e){$e&&($e.texture?h.framebufferTexture2D(Ji,Me,$e.target,$e.texture._texture.texture,0):h.framebufferRenderbuffer(Ji,Me,Ml,$e.renderbuffer._renderbuffer.renderbuffer))}function ke(Me){var $e=$a,qe=null,It=null,Lt=Me;typeof Me=="object"&&(Lt=Me.data,"target"in Me&&($e=Me.target|0)),E.type(Lt,"function","invalid attachment data");var Ke=Lt._reglType;return Ke==="texture2d"?(qe=Lt,E($e===$a)):Ke==="textureCube"?(qe=Lt,E($e>=Za&&$e<Za+6,"invalid cube map target")):Ke==="renderbuffer"?(It=Lt,$e=Ml):E.raise("invalid regl object for attachment"),new Ge($e,qe,It)}function K(Me,$e,qe,It,Lt){if(qe){var Ke=se.create2D({width:Me,height:$e,format:It,type:Lt});return Ke._texture.refCount=0,new Ge($a,Ke,null)}else{var Je=me.create({width:Me,height:$e,format:It});return Je._renderbuffer.refCount=0,new Ge(Ml,null,Je)}}function oe(Me){return Me&&(Me.texture||Me.renderbuffer)}function Oe(Me,$e,qe){Me&&(Me.texture?Me.texture.resize($e,qe):Me.renderbuffer&&Me.renderbuffer.resize($e,qe),Me.width=$e,Me.height=qe)}var rt=0,Se={};function Qe(){this.id=rt++,Se[this.id]=this,this.framebuffer=h.createFramebuffer(),this.width=0,this.height=0,this.colorAttachments=[],this.depthAttachment=null,this.stencilAttachment=null,this.depthStencilAttachment=null}function je(Me){Me.colorAttachments.forEach(Be),Be(Me.depthAttachment),Be(Me.stencilAttachment),Be(Me.depthStencilAttachment)}function pt(Me){var $e=Me.framebuffer;E($e,"must not double destroy framebuffer"),h.deleteFramebuffer($e),Me.framebuffer=null,ae.framebufferCount--,delete Se[Me.id]}function xe(Me){var $e;h.bindFramebuffer(Ji,Me.framebuffer);var qe=Me.colorAttachments;for($e=0;$e<qe.length;++$e)Ce(Po+$e,qe[$e]);for($e=qe.length;$e<G.maxColorAttachments;++$e)h.framebufferTexture2D(Ji,Po+$e,$a,null,0);h.framebufferTexture2D(Ji,Xa,$a,null,0),h.framebufferTexture2D(Ji,Fl,$a,null,0),h.framebufferTexture2D(Ji,S,$a,null,0),Ce(Fl,Me.depthAttachment),Ce(S,Me.stencilAttachment),Ce(Xa,Me.depthStencilAttachment);var It=h.checkFramebufferStatus(Ji);!h.isContextLost()&&It!==gs&&E.raise("framebuffer configuration not supported, status = "+No[It]),h.bindFramebuffer(Ji,fe.next?fe.next.framebuffer:null),fe.cur=fe.next,h.getError()}function ge(Me,$e){var qe=new Qe;ae.framebufferCount++;function It(Ke,Je){var wt;E(fe.next!==qe,"can not update framebuffer which is currently in use");var Ct=0,Vt=0,Ir=!0,Lr=!0,Xt=null,Dr=!0,pr="rgba",Kr="uint8",jr=1,tn=null,un=null,gn=null,Wr=!1;if(typeof Ke=="number")Ct=Ke|0,Vt=Je|0||Ct;else if(!Ke)Ct=Vt=1;else{E.type(Ke,"object","invalid arguments for framebuffer");var Ut=Ke;if("shape"in Ut){var yn=Ut.shape;E(Array.isArray(yn)&&yn.length>=2,"invalid shape for framebuffer"),Ct=yn[0],Vt=yn[1]}else"radius"in Ut&&(Ct=Vt=Ut.radius),"width"in Ut&&(Ct=Ut.width),"height"in Ut&&(Vt=Ut.height);("color"in Ut||"colors"in Ut)&&(Xt=Ut.color||Ut.colors,Array.isArray(Xt)&&E(Xt.length===1||T.webgl_draw_buffers,"multiple render targets not supported")),Xt||("colorCount"in Ut&&(jr=Ut.colorCount|0,E(jr>0,"invalid color buffer count")),"colorTexture"in Ut&&(Dr=!!Ut.colorTexture,pr="rgba4"),"colorType"in Ut&&(Kr=Ut.colorType,Dr?(E(T.oes_texture_float||!(Kr==="float"||Kr==="float32"),"you must enable OES_texture_float in order to use floating point framebuffer objects"),E(T.oes_texture_half_float||!(Kr==="half float"||Kr==="float16"),"you must enable OES_texture_half_float in order to use 16-bit floating point framebuffer objects")):Kr==="half float"||Kr==="float16"?(E(T.ext_color_buffer_half_float,"you must enable EXT_color_buffer_half_float to use 16-bit render buffers"),pr="rgba16f"):(Kr==="float"||Kr==="float32")&&(E(T.webgl_color_buffer_float,"you must enable WEBGL_color_buffer_float in order to use 32-bit floating point renderbuffers"),pr="rgba32f"),E.oneOf(Kr,Ne,"invalid color type")),"colorFormat"in Ut&&(pr=Ut.colorFormat,Le.indexOf(pr)>=0?Dr=!0:De.indexOf(pr)>=0?Dr=!1:E.optional(function(){Dr?E.oneOf(Ut.colorFormat,Le,"invalid color format for texture"):E.oneOf(Ut.colorFormat,De,"invalid color format for renderbuffer")}))),("depthTexture"in Ut||"depthStencilTexture"in Ut)&&(Wr=!!(Ut.depthTexture||Ut.depthStencilTexture),E(!Wr||T.webgl_depth_texture,"webgl_depth_texture extension not supported")),"depth"in Ut&&(typeof Ut.depth=="boolean"?Ir=Ut.depth:(tn=Ut.depth,Lr=!1)),"stencil"in Ut&&(typeof Ut.stencil=="boolean"?Lr=Ut.stencil:(un=Ut.stencil,Ir=!1)),"depthStencil"in Ut&&(typeof Ut.depthStencil=="boolean"?Ir=Lr=Ut.depthStencil:(gn=Ut.depthStencil,Ir=!1,Lr=!1))}var hr=null,At=null,qt=null,er=null;if(Array.isArray(Xt))hr=Xt.map(ke);else if(Xt)hr=[ke(Xt)];else for(hr=new Array(jr),wt=0;wt<jr;++wt)hr[wt]=K(Ct,Vt,Dr,pr,Kr);E(T.webgl_draw_buffers||hr.length<=1,"you must enable the WEBGL_draw_buffers extension in order to use multiple color buffers."),E(hr.length<=G.maxColorAttachments,"too many color attachments, not supported"),Ct=Ct||hr[0].width,Vt=Vt||hr[0].height,tn?At=ke(tn):Ir&&!Lr&&(At=K(Ct,Vt,Wr,"depth","uint32")),un?qt=ke(un):Lr&&!Ir&&(qt=K(Ct,Vt,!1,"stencil","uint8")),gn?er=ke(gn):!tn&&!un&&Lr&&Ir&&(er=K(Ct,Vt,Wr,"depth stencil","depth stencil")),E(!!tn+!!un+!!gn<=1,"invalid framebuffer configuration, can specify exactly one depth/stencil attachment");var Vr=null;for(wt=0;wt<hr.length;++wt)if(We(hr[wt],Ct,Vt),E(!hr[wt]||hr[wt].texture&&Ud.indexOf(hr[wt].texture._texture.format)>=0||hr[wt].renderbuffer&&Ka.indexOf(hr[wt].renderbuffer._renderbuffer.format)>=0,"framebuffer color attachment "+wt+" is invalid"),hr[wt]&&hr[wt].texture){var Ei=bi[hr[wt].texture._texture.format]*bf[hr[wt].texture._texture.type];Vr===null?Vr=Ei:E(Vr===Ei,"all color attachments much have the same number of bits per pixel.")}return We(At,Ct,Vt),E(!At||At.texture&&At.texture._texture.format===Gd||At.renderbuffer&&At.renderbuffer._renderbuffer.format===Wd,"invalid depth attachment for framebuffer object"),We(qt,Ct,Vt),E(!qt||qt.renderbuffer&&qt.renderbuffer._renderbuffer.format===ea,"invalid stencil attachment for framebuffer object"),We(er,Ct,Vt),E(!er||er.texture&&er.texture._texture.format===pc||er.renderbuffer&&er.renderbuffer._renderbuffer.format===pc,"invalid depth-stencil attachment for framebuffer object"),je(qe),qe.width=Ct,qe.height=Vt,qe.colorAttachments=hr,qe.depthAttachment=At,qe.stencilAttachment=qt,qe.depthStencilAttachment=er,It.color=hr.map(oe),It.depth=oe(At),It.stencil=oe(qt),It.depthStencil=oe(er),It.width=qe.width,It.height=qe.height,xe(qe),It}function Lt(Ke,Je){E(fe.next!==qe,"can not resize a framebuffer which is currently in use");var wt=Math.max(Ke|0,1),Ct=Math.max(Je|0||wt,1);if(wt===qe.width&&Ct===qe.height)return It;for(var Vt=qe.colorAttachments,Ir=0;Ir<Vt.length;++Ir)Oe(Vt[Ir],wt,Ct);return Oe(qe.depthAttachment,wt,Ct),Oe(qe.stencilAttachment,wt,Ct),Oe(qe.depthStencilAttachment,wt,Ct),qe.width=It.width=wt,qe.height=It.height=Ct,xe(qe),It}return It(Me,$e),a(It,{resize:Lt,_reglType:"framebuffer",_framebuffer:qe,destroy:function(){pt(qe),je(qe)},use:function(Ke){fe.setFBO({framebuffer:It},Ke)}})}function lt(Me){var $e=Array(6);function qe(Lt){var Ke;E($e.indexOf(fe.next)<0,"can not update framebuffer which is currently in use");var Je={color:null},wt=0,Ct=null,Vt="rgba",Ir="uint8",Lr=1;if(typeof Lt=="number")wt=Lt|0;else if(!Lt)wt=1;else{E.type(Lt,"object","invalid arguments for framebuffer");var Xt=Lt;if("shape"in Xt){var Dr=Xt.shape;E(Array.isArray(Dr)&&Dr.length>=2,"invalid shape for framebuffer"),E(Dr[0]===Dr[1],"cube framebuffer must be square"),wt=Dr[0]}else"radius"in Xt&&(wt=Xt.radius|0),"width"in Xt?(wt=Xt.width|0,"height"in Xt&&E(Xt.height===wt,"must be square")):"height"in Xt&&(wt=Xt.height|0);("color"in Xt||"colors"in Xt)&&(Ct=Xt.color||Xt.colors,Array.isArray(Ct)&&E(Ct.length===1||T.webgl_draw_buffers,"multiple render targets not supported")),Ct||("colorCount"in Xt&&(Lr=Xt.colorCount|0,E(Lr>0,"invalid color buffer count")),"colorType"in Xt&&(E.oneOf(Xt.colorType,Ne,"invalid color type"),Ir=Xt.colorType),"colorFormat"in Xt&&(Vt=Xt.colorFormat,E.oneOf(Xt.colorFormat,Le,"invalid color format for texture"))),"depth"in Xt&&(Je.depth=Xt.depth),"stencil"in Xt&&(Je.stencil=Xt.stencil),"depthStencil"in Xt&&(Je.depthStencil=Xt.depthStencil)}var pr;if(Ct)if(Array.isArray(Ct))for(pr=[],Ke=0;Ke<Ct.length;++Ke)pr[Ke]=Ct[Ke];else pr=[Ct];else{pr=Array(Lr);var Kr={radius:wt,format:Vt,type:Ir};for(Ke=0;Ke<Lr;++Ke)pr[Ke]=se.createCube(Kr)}for(Je.color=Array(pr.length),Ke=0;Ke<pr.length;++Ke){var jr=pr[Ke];E(typeof jr=="function"&&jr._reglType==="textureCube","invalid cube map"),wt=wt||jr.width,E(jr.width===wt&&jr.height===wt,"invalid cube map shape"),Je.color[Ke]={target:Za,data:pr[Ke]}}for(Ke=0;Ke<6;++Ke){for(var tn=0;tn<pr.length;++tn)Je.color[tn].target=Za+Ke;Ke>0&&(Je.depth=$e[0].depth,Je.stencil=$e[0].stencil,Je.depthStencil=$e[0].depthStencil),$e[Ke]?$e[Ke](Je):$e[Ke]=ge(Je)}return a(qe,{width:wt,height:wt,color:pr})}function It(Lt){var Ke,Je=Lt|0;if(E(Je>0&&Je<=G.maxCubeMapSize,"invalid radius for cube fbo"),Je===qe.width)return qe;var wt=qe.color;for(Ke=0;Ke<wt.length;++Ke)wt[Ke].resize(Je);for(Ke=0;Ke<6;++Ke)$e[Ke].resize(Je);return qe.width=qe.height=Je,qe}return qe(Me),a(qe,{faces:$e,resize:It,_reglType:"framebufferCube",destroy:function(){$e.forEach(function(Lt){Lt.destroy()})}})}function Ve(){fe.cur=null,fe.next=null,fe.dirty=!0,Zn(Se).forEach(function(Me){Me.framebuffer=h.createFramebuffer(),xe(Me)})}return a(fe,{getFramebuffer:function(Me){if(typeof Me=="function"&&Me._reglType==="framebuffer"){var $e=Me._framebuffer;if($e instanceof Qe)return $e}return null},create:ge,createCube:lt,clear:function(){Zn(Se).forEach(pt)},restore:Ve})}var wi=5126,mc=34962,wf=34963,gc=["attributes","elements","offset","count","primitive","instances"];function kl(){this.state=0,this.x=0,this.y=0,this.z=0,this.w=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=wi,this.offset=0,this.stride=0,this.divisor=0}function Kd(h,T,G,se,me,ae,fe){for(var Le=G.maxAttributes,De=new Array(Le),Ne=0;Ne<Le;++Ne)De[Ne]=new kl;var Ge=0,Be={},We={Record:kl,scope:{},state:De,currentVAO:null,targetVAO:null,restore:ke()?je:function(){},createVAO:pt,getVAO:oe,destroyBuffer:Ce,setVAO:ke()?Oe:rt,clear:ke()?Se:function(){}};function Ce(xe){for(var ge=0;ge<De.length;++ge){var lt=De[ge];lt.buffer===xe&&(h.disableVertexAttribArray(ge),lt.buffer=null)}}function ke(){return T.oes_vertex_array_object}function K(){return T.angle_instanced_arrays}function oe(xe){return typeof xe=="function"&&xe._vao?xe._vao:null}function Oe(xe){if(xe!==We.currentVAO){var ge=ke();xe?ge.bindVertexArrayOES(xe.vao):ge.bindVertexArrayOES(null),We.currentVAO=xe}}function rt(xe){if(xe!==We.currentVAO){if(xe)xe.bindAttrs();else{for(var ge=K(),lt=0;lt<De.length;++lt){var Ve=De[lt];Ve.buffer?(h.enableVertexAttribArray(lt),Ve.buffer.bind(),h.vertexAttribPointer(lt,Ve.size,Ve.type,Ve.normalized,Ve.stride,Ve.offfset),ge&&Ve.divisor&&ge.vertexAttribDivisorANGLE(lt,Ve.divisor)):(h.disableVertexAttribArray(lt),h.vertexAttrib4f(lt,Ve.x,Ve.y,Ve.z,Ve.w))}fe.elements?h.bindBuffer(wf,fe.elements.buffer.buffer):h.bindBuffer(wf,null)}We.currentVAO=xe}}function Se(){Zn(Be).forEach(function(xe){xe.destroy()})}function Qe(){this.id=++Ge,this.attributes=[],this.elements=null,this.ownsElements=!1,this.count=0,this.offset=0,this.instances=-1,this.primitive=4;var xe=ke();xe?this.vao=xe.createVertexArrayOES():this.vao=null,Be[this.id]=this,this.buffers=[]}Qe.prototype.bindAttrs=function(){for(var xe=K(),ge=this.attributes,lt=0;lt<ge.length;++lt){var Ve=ge[lt];Ve.buffer?(h.enableVertexAttribArray(lt),h.bindBuffer(mc,Ve.buffer.buffer),h.vertexAttribPointer(lt,Ve.size,Ve.type,Ve.normalized,Ve.stride,Ve.offset),xe&&Ve.divisor&&xe.vertexAttribDivisorANGLE(lt,Ve.divisor)):(h.disableVertexAttribArray(lt),h.vertexAttrib4f(lt,Ve.x,Ve.y,Ve.z,Ve.w))}for(var Me=ge.length;Me<Le;++Me)h.disableVertexAttribArray(Me);var $e=ae.getElements(this.elements);$e?h.bindBuffer(wf,$e.buffer.buffer):h.bindBuffer(wf,null)},Qe.prototype.refresh=function(){var xe=ke();xe&&(xe.bindVertexArrayOES(this.vao),this.bindAttrs(),We.currentVAO=null,xe.bindVertexArrayOES(null))},Qe.prototype.destroy=function(){if(this.vao){var xe=ke();this===We.currentVAO&&(We.currentVAO=null,xe.bindVertexArrayOES(null)),xe.deleteVertexArrayOES(this.vao),this.vao=null}this.ownsElements&&(this.elements.destroy(),this.elements=null,this.ownsElements=!1),Be[this.id]&&(delete Be[this.id],se.vaoCount-=1)};function je(){var xe=ke();xe&&Zn(Be).forEach(function(ge){ge.refresh()})}function pt(xe){var ge=new Qe;se.vaoCount+=1;function lt(Ve){var Me;if(Array.isArray(Ve))Me=Ve,ge.elements&&ge.ownsElements&&ge.elements.destroy(),ge.elements=null,ge.ownsElements=!1,ge.offset=0,ge.count=0,ge.instances=-1,ge.primitive=4;else{if(E(typeof Ve=="object","invalid arguments for create vao"),E("attributes"in Ve,"must specify attributes for vao"),Ve.elements){var $e=Ve.elements;ge.ownsElements?typeof $e=="function"&&$e._reglType==="elements"?(ge.elements.destroy(),ge.ownsElements=!1):(ge.elements($e),ge.ownsElements=!1):ae.getElements(Ve.elements)?(ge.elements=Ve.elements,ge.ownsElements=!1):(ge.elements=ae.create(Ve.elements),ge.ownsElements=!0)}else ge.elements=null,ge.ownsElements=!1;Me=Ve.attributes,ge.offset=0,ge.count=-1,ge.instances=-1,ge.primitive=4,ge.elements&&(ge.count=ge.elements._elements.vertCount,ge.primitive=ge.elements._elements.primType),"offset"in Ve&&(ge.offset=Ve.offset|0),"count"in Ve&&(ge.count=Ve.count|0),"instances"in Ve&&(ge.instances=Ve.instances|0),"primitive"in Ve&&(E(Ve.primitive in Xi,"bad primitive type: "+Ve.primitive),ge.primitive=Xi[Ve.primitive]),E.optional(()=>{for(var Ir=Object.keys(Ve),Lr=0;Lr<Ir.length;++Lr)E(gc.indexOf(Ir[Lr])>=0,'invalid option for vao: "'+Ir[Lr]+'" valid options are '+gc)}),E(Array.isArray(Me),"attributes must be an array")}E(Me.length<Le,"too many attributes"),E(Me.length>0,"must specify at least one attribute");var qe={},It=ge.attributes;It.length=Me.length;for(var Lt=0;Lt<Me.length;++Lt){var Ke=Me[Lt],Je=It[Lt]=new kl,wt=Ke.data||Ke;if(Array.isArray(wt)||i(wt)||On(wt)){var Ct;ge.buffers[Lt]&&(Ct=ge.buffers[Lt],i(wt)&&Ct._buffer.byteLength>=wt.byteLength?Ct.subdata(wt):(Ct.destroy(),ge.buffers[Lt]=null)),ge.buffers[Lt]||(Ct=ge.buffers[Lt]=me.create(Ke,mc,!1,!0)),Je.buffer=me.getBuffer(Ct),Je.size=Je.buffer.dimension|0,Je.normalized=!1,Je.type=Je.buffer.dtype,Je.offset=0,Je.stride=0,Je.divisor=0,Je.state=1,qe[Lt]=1}else me.getBuffer(Ke)?(Je.buffer=me.getBuffer(Ke),Je.size=Je.buffer.dimension|0,Je.normalized=!1,Je.type=Je.buffer.dtype,Je.offset=0,Je.stride=0,Je.divisor=0,Je.state=1):me.getBuffer(Ke.buffer)?(Je.buffer=me.getBuffer(Ke.buffer),Je.size=(+Ke.size||Je.buffer.dimension)|0,Je.normalized=!!Ke.normalized||!1,"type"in Ke?(E.parameter(Ke.type,Ga,"invalid buffer type"),Je.type=Ga[Ke.type]):Je.type=Je.buffer.dtype,Je.offset=(Ke.offset||0)|0,Je.stride=(Ke.stride||0)|0,Je.divisor=(Ke.divisor||0)|0,Je.state=1,E(Je.size>=1&&Je.size<=4,"size must be between 1 and 4"),E(Je.offset>=0,"invalid offset"),E(Je.stride>=0&&Je.stride<=255,"stride must be between 0 and 255"),E(Je.divisor>=0,"divisor must be positive"),E(!Je.divisor||!!T.angle_instanced_arrays,"ANGLE_instanced_arrays must be enabled to use divisor")):"x"in Ke?(E(Lt>0,"first attribute must not be a constant"),Je.x=+Ke.x||0,Je.y=+Ke.y||0,Je.z=+Ke.z||0,Je.w=+Ke.w||0,Je.state=2):E(!1,"invalid attribute spec for location "+Lt)}for(var Vt=0;Vt<ge.buffers.length;++Vt)!qe[Vt]&&ge.buffers[Vt]&&(ge.buffers[Vt].destroy(),ge.buffers[Vt]=null);return ge.refresh(),lt}return lt.destroy=function(){for(var Ve=0;Ve<ge.buffers.length;++Ve)ge.buffers[Ve]&&ge.buffers[Ve].destroy();ge.buffers.length=0,ge.ownsElements&&(ge.elements.destroy(),ge.elements=null,ge.ownsElements=!1),ge.destroy()},lt._vao=ge,lt._reglType="vao",lt(xe)}return We}var Pl=35632,yc=35633,jd=35718,Qd=35721;function Nl(h,T,G,se){var me={},ae={};function fe(K,oe,Oe,rt){this.name=K,this.id=oe,this.location=Oe,this.info=rt}function Le(K,oe){for(var Oe=0;Oe<K.length;++Oe)if(K[Oe].id===oe.id){K[Oe].location=oe.location;return}K.push(oe)}function De(K,oe,Oe){var rt=K===Pl?me:ae,Se=rt[oe];if(!Se){var Qe=T.str(oe);Se=h.createShader(K),h.shaderSource(Se,Qe),h.compileShader(Se),E.shaderError(h,Se,Qe,K,Oe),rt[oe]=Se}return Se}var Ne={},Ge=[],Be=0;function We(K,oe){this.id=Be++,this.fragId=K,this.vertId=oe,this.program=null,this.uniforms=[],this.attributes=[],this.refCount=1,se.profile&&(this.stats={uniformsCount:0,attributesCount:0})}function Ce(K,oe,Oe){var rt,Se,Qe=De(Pl,K.fragId),je=De(yc,K.vertId),pt=K.program=h.createProgram();if(h.attachShader(pt,Qe),h.attachShader(pt,je),Oe)for(rt=0;rt<Oe.length;++rt){var xe=Oe[rt];h.bindAttribLocation(pt,xe[0],xe[1])}h.linkProgram(pt),E.linkError(h,pt,T.str(K.fragId),T.str(K.vertId),oe);var ge=h.getProgramParameter(pt,jd);se.profile&&(K.stats.uniformsCount=ge);var lt=K.uniforms;for(rt=0;rt<ge;++rt)if(Se=h.getActiveUniform(pt,rt),Se){if(Se.size>1)for(var Ve=0;Ve<Se.size;++Ve){var Me=Se.name.replace("[0]","["+Ve+"]");Le(lt,new fe(Me,T.id(Me),h.getUniformLocation(pt,Me),Se))}var $e=Se.name;Se.size>1&&($e=$e.replace("[0]","")),Le(lt,new fe($e,T.id($e),h.getUniformLocation(pt,$e),Se))}var qe=h.getProgramParameter(pt,Qd);se.profile&&(K.stats.attributesCount=qe);var It=K.attributes;for(rt=0;rt<qe;++rt)Se=h.getActiveAttrib(pt,rt),Se&&Le(It,new fe(Se.name,T.id(Se.name),h.getAttribLocation(pt,Se.name),Se))}se.profile&&(G.getMaxUniformsCount=function(){var K=0;return Ge.forEach(function(oe){oe.stats.uniformsCount>K&&(K=oe.stats.uniformsCount)}),K},G.getMaxAttributesCount=function(){var K=0;return Ge.forEach(function(oe){oe.stats.attributesCount>K&&(K=oe.stats.attributesCount)}),K});function ke(){me={},ae={};for(var K=0;K<Ge.length;++K)Ce(Ge[K],null,Ge[K].attributes.map(function(oe){return[oe.location,oe.name]}))}return{clear:function(){var K=h.deleteShader.bind(h);Zn(me).forEach(K),me={},Zn(ae).forEach(K),ae={},Ge.forEach(function(oe){h.deleteProgram(oe.program)}),Ge.length=0,Ne={},G.shaderCount=0},program:function(K,oe,Oe,rt){E.command(K>=0,"missing vertex shader",Oe),E.command(oe>=0,"missing fragment shader",Oe);var Se=Ne[oe];Se||(Se=Ne[oe]={});var Qe=Se[K];if(Qe&&(Qe.refCount++,!rt))return Qe;var je=new We(oe,K);return G.shaderCount++,Ce(je,Oe,rt),Qe||(Se[K]=je),Ge.push(je),a(je,{destroy:function(){if(je.refCount--,je.refCount<=0){h.deleteProgram(je.program);var pt=Ge.indexOf(je);Ge.splice(pt,1),G.shaderCount--}Se[je.vertId].refCount<=0&&(h.deleteShader(ae[je.vertId]),delete ae[je.vertId],delete Ne[je.fragId][je.vertId]),Object.keys(Ne[je.fragId]).length||(h.deleteShader(me[je.fragId]),delete me[je.fragId],delete Ne[je.fragId])}})},restore:ke,shader:De,frag:-1,vert:-1}}var ys=6408,ga=5121,Jd=3333,xs=5126;function e0(h,T,G,se,me,ae,fe){function Le(Ge){var Be;T.next===null?(E(me.preserveDrawingBuffer,'you must create a webgl context with "preserveDrawingBuffer":true in order to read pixels from the drawing buffer'),Be=ga):(E(T.next.colorAttachments[0].texture!==null,"You cannot read from a renderbuffer"),Be=T.next.colorAttachments[0].texture._texture.type,E.optional(function(){ae.oes_texture_float?(E(Be===ga||Be===xs,"Reading from a framebuffer is only allowed for the types 'uint8' and 'float'"),Be===xs&&E(fe.readFloat,"Reading 'float' values is not permitted in your browser. For a fallback, please see: https://www.npmjs.com/package/glsl-read-float")):E(Be===ga,"Reading from a framebuffer is only allowed for the type 'uint8'")}));var We=0,Ce=0,ke=se.framebufferWidth,K=se.framebufferHeight,oe=null;i(Ge)?oe=Ge:Ge&&(E.type(Ge,"object","invalid arguments to regl.read()"),We=Ge.x|0,Ce=Ge.y|0,E(We>=0&&We<se.framebufferWidth,"invalid x offset for regl.read"),E(Ce>=0&&Ce<se.framebufferHeight,"invalid y offset for regl.read"),ke=(Ge.width||se.framebufferWidth-We)|0,K=(Ge.height||se.framebufferHeight-Ce)|0,oe=Ge.data||null),oe&&(Be===ga?E(oe instanceof Uint8Array,"buffer must be 'Uint8Array' when reading from a framebuffer of type 'uint8'"):Be===xs&&E(oe instanceof Float32Array,"buffer must be 'Float32Array' when reading from a framebuffer of type 'float'")),E(ke>0&&ke+We<=se.framebufferWidth,"invalid width for read pixels"),E(K>0&&K+Ce<=se.framebufferHeight,"invalid height for read pixels"),G();var Oe=ke*K*4;return oe||(Be===ga?oe=new Uint8Array(Oe):Be===xs&&(oe=oe||new Float32Array(Oe))),E.isTypedArray(oe,"data buffer for regl.read() must be a typedarray"),E(oe.byteLength>=Oe,"data buffer for regl.read() too small"),h.pixelStorei(Jd,4),h.readPixels(We,Ce,ke,K,ys,Be,oe),oe}function De(Ge){var Be;return T.setFBO({framebuffer:Ge.framebuffer},function(){Be=Le(Ge)}),Be}function Ne(Ge){return!Ge||!("framebuffer"in Ge)?Le(Ge):De(Ge)}return Ne}function Xn(h){return Array.prototype.slice.call(h)}function ya(h){return Xn(h).join("")}function ja(){var h=0,T=[],G=[];function se(Be){for(var We=0;We<G.length;++We)if(G[We]===Be)return T[We];var Ce="g"+h++;return T.push(Ce),G.push(Be),Ce}function me(){var Be=[];function We(){Be.push.apply(Be,Xn(arguments))}var Ce=[];function ke(){var K="v"+h++;return Ce.push(K),arguments.length>0&&(Be.push(K,"="),Be.push.apply(Be,Xn(arguments)),Be.push(";")),K}return a(We,{def:ke,toString:function(){return ya([Ce.length>0?"var "+Ce.join(",")+";":"",ya(Be)])}})}function ae(){var Be=me(),We=me(),Ce=Be.toString,ke=We.toString;function K(oe,Oe){We(oe,Oe,"=",Be.def(oe,Oe),";")}return a(function(){Be.apply(Be,Xn(arguments))},{def:Be.def,entry:Be,exit:We,save:K,set:function(oe,Oe,rt){K(oe,Oe),Be(oe,Oe,"=",rt,";")},toString:function(){return Ce()+ke()}})}function fe(){var Be=ya(arguments),We=ae(),Ce=ae(),ke=We.toString,K=Ce.toString;return a(We,{then:function(){return We.apply(We,Xn(arguments)),this},else:function(){return Ce.apply(Ce,Xn(arguments)),this},toString:function(){var oe=K();return oe&&(oe="else{"+oe+"}"),ya(["if(",Be,"){",ke(),"}",oe])}})}var Le=me(),De={};function Ne(Be,We){var Ce=[];function ke(){var Se="a"+Ce.length;return Ce.push(Se),Se}We=We||0;for(var K=0;K<We;++K)ke();var oe=ae(),Oe=oe.toString,rt=De[Be]=a(oe,{arg:ke,toString:function(){return ya(["function(",Ce.join(),"){",Oe(),"}"])}});return rt}function Ge(){var Be=['"use strict";',Le,"return {"];Object.keys(De).forEach(function(ke){Be.push('"',ke,'":',De[ke].toString(),",")}),Be.push("}");var We=ya(Be).replace(/;/g,`;
|
|
36
|
+
}`;var fr=v_(function(){return mr(T,Ot+"return "+ze).apply(i,P)});if(fr.source=ze,qd(fr))throw fr;return fr}function mw(e){return Or(e).toLowerCase()}function gw(e){return Or(e).toUpperCase()}function yw(e,r,a){if(e=Or(e),e&&(a||r===i))return Vu(e);if(!e||!(r=Xn(r)))return e;var l=Gn(e),_=Gn(r),T=ro(l,_),P=no(l,_)+1;return mi(l,T,P).join("")}function bw(e,r,a){if(e=Or(e),e&&(a||r===i))return e.slice(0,qu(e)+1);if(!e||!(r=Xn(r)))return e;var l=Gn(e),_=no(l,Gn(r))+1;return mi(l,0,_).join("")}function xw(e,r,a){if(e=Or(e),e&&(a||r===i))return e.replace(Yr,"");if(!e||!(r=Xn(r)))return e;var l=Gn(e),_=ro(l,Gn(r));return mi(l,_).join("")}function ww(e,r){var a=ct,l=nt;if(tn(r)){var _="separator"in r?r.separator:_;a="length"in r?nr(r.length):a,l="omission"in r?Xn(r.omission):l}e=Or(e);var T=e.length;if(Na(e)){var P=Gn(e);T=P.length}if(a>=T)return e;var H=a-sa(l);if(H<1)return l;var J=P?mi(P,0,H).join(""):e.slice(0,H);if(_===i)return J+l;if(P&&(H+=J.length-H),Kd(_)){if(e.slice(H).search(_)){var Ie,Ne=J;for(_.global||(_=xl(_.source,Or($n.exec(_))+"g")),_.lastIndex=0;Ie=_.exec(Ne);)var ze=Ie.index;J=J.slice(0,ze===i?H:ze)}}else if(e.indexOf(Xn(_),H)!=H){var vt=J.lastIndexOf(_);vt>-1&&(J=J.slice(0,vt))}return J+l}function Sw(e){return e=Or(e),e&&y.test(e)?e.replace(ue,ad):e}var Tw=zf(function(e,r,a){return e+(a?" ":"")+r.toUpperCase()}),Jd=Xl("toUpperCase");function d_(e,r,a){return e=Or(e),r=a?i:r,r===i?$u(e)?sd(e):nd(e):e.match(r)||[]}var v_=rr(function(e,r){try{return _n(e,i,r)}catch(a){return qd(a)?a:new Zt(a)}}),Ew=Ri(function(e,r){return wn(r,function(a){a=Dr(a),Wn(e,a,Zd(e[a],e))}),e});function Aw(e){var r=e==null?0:e.length,a=Pt();return e=r?Pr(e,function(l){if(typeof l[1]!="function")throw new ei(u);return[a(l[0]),l[1]]}):[],rr(function(l){for(var _=-1;++_<r;){var T=e[_];if(_n(T[0],this,l))return _n(T[1],this,l)}})}function Dw(e){return sc(Sn(e,g))}function e0(e){return function(){return e}}function Lw(e,r){return e==null||e!==e?r:e}var Ow=qi(),Rw=qi(!0);function si(e){return e}function t0(e){return Ff(typeof e=="function"?e:Sn(e,g))}function Cw(e){return va(Sn(e,g))}function Mw(e,r){return _a(e,Sn(r,g))}var kw=rr(function(e,r){return function(a){return Xa(a,e,r)}}),Iw=rr(function(e,r){return function(a){return Xa(e,a,r)}});function r0(e,r,a){var l=Fn(r),_=_s(r,l);a==null&&!(tn(r)&&(_.length||!l.length))&&(a=r,r=e,e=this,_=_s(r,Fn(r)));var T=!(tn(a)&&"chain"in a)||!!a.chain,P=of(e);return wn(_,function(H){var J=r[H];e[H]=J,P&&(e.prototype[H]=function(){var Ie=this.__chain__;if(T||Ie){var Ne=e(this.__wrapped__),ze=Ne.__actions__=kn(this.__actions__);return ze.push({func:J,args:arguments,thisArg:e}),Ne.__chain__=Ie,Ne}return J.apply(e,Yi([this.value()],arguments))})}),e}function Fw(){return xn._===this&&(xn._=Ku),this}function n0(){}function Nw(e){return e=nr(e),rr(function(r){return Nf(r,e)})}var Bw=Oo(Pr),Pw=Oo(aa),Gw=Oo(Js);function __(e){return Re(e)?Fa(Dr(e)):Bf(e)}function Uw(e){return function(r){return e==null?i:ha(e,r)}}var Yw=zr(),Hw=zr(!0);function i0(){return[]}function a0(){return!1}function zw(){return{}}function Ww(){return""}function Vw(){return!0}function $w(e,r){if(e=nr(e),e<1||e>Ze)return[];var a=Wt,l=Rn(e,Wt);r=Pt(r),e-=Wt;for(var _=dl(l,r);++a<e;)r(a);return _}function Zw(e){return Jt(e)?Pr(e,Dr):bi(e)?[e]:kn(Xt(Or(e)))}function Xw(e){var r=++cd;return Or(e)+r}var qw=rf(function(e,r){return e+r},0),Kw=Kl("ceil"),jw=rf(function(e,r){return e/r},1),Qw=Kl("floor");function Jw(e){return e&&e.length?Za(e,si,ps):i}function e2(e,r){return e&&e.length?Za(e,Pt(r,2),ps):i}function t2(e){return ts(e,si)}function r2(e,r){return ts(e,Pt(r,2))}function n2(e){return e&&e.length?Za(e,si,qa):i}function i2(e,r){return e&&e.length?Za(e,Pt(r,2),qa):i}var a2=rf(function(e,r){return e*r},1),f2=Kl("round"),s2=rf(function(e,r){return e-r},0);function o2(e){return e&&e.length?to(e,si):0}function l2(e,r){return e&&e.length?to(e,Pt(r,2)):0}return b.after=Cb,b.ary=$v,b.assign=gx,b.assignIn=f_,b.assignInWith=Ic,b.assignWith=yx,b.at=bx,b.before=Zv,b.bind=Zd,b.bindAll=Ew,b.bindKey=Xv,b.castArray=zb,b.chain=zv,b.chunk=en,b.compact=ln,b.concat=mn,b.cond=Aw,b.conforms=Dw,b.constant=e0,b.countBy=ob,b.create=xx,b.curry=qv,b.curryRight=Kv,b.debounce=jv,b.defaults=wx,b.defaultsDeep=Sx,b.defer=Mb,b.delay=kb,b.difference=Wr,b.differenceBy=Ut,b.differenceWith=gn,b.drop=cr,b.dropRight=Tt,b.dropRightWhile=qt,b.dropWhile=er,b.fill=Vr,b.filter=ub,b.flatMap=db,b.flatMapDeep=vb,b.flatMapDepth=_b,b.flatten=O,b.flattenDeep=fe,b.flattenDepth=Q,b.flip=Ib,b.flow=Ow,b.flowRight=Rw,b.fromPairs=st,b.functions=Rx,b.functionsIn=Cx,b.groupBy=pb,b.initial=m,b.intersection=B,b.intersectionBy=Z,b.intersectionWith=X,b.invert=kx,b.invertBy=Ix,b.invokeMap=gb,b.iteratee=t0,b.keyBy=yb,b.keys=Fn,b.keysIn=fi,b.map=Lc,b.mapKeys=Nx,b.mapValues=Bx,b.matches=Cw,b.matchesProperty=Mw,b.memoize=Rc,b.merge=Px,b.mergeWith=s_,b.method=kw,b.methodOf=Iw,b.mixin=r0,b.negate=Cc,b.nthArg=Nw,b.omit=Gx,b.omitBy=Ux,b.once=Fb,b.orderBy=bb,b.over=Bw,b.overArgs=Nb,b.overEvery=Pw,b.overSome=Gw,b.partial=Xd,b.partialRight=Qv,b.partition=xb,b.pick=Yx,b.pickBy=o_,b.property=__,b.propertyOf=Uw,b.pull=R,b.pullAll=L,b.pullAllBy=j,b.pullAllWith=q,b.pullAt=ve,b.range=Yw,b.rangeRight=Hw,b.rearg=Bb,b.reject=Tb,b.remove=be,b.rest=Pb,b.reverse=Ye,b.sampleSize=Ab,b.set=zx,b.setWith=Wx,b.shuffle=Db,b.slice=Dt,b.sortBy=Rb,b.sortedUniq=Et,b.sortedUniqBy=dr,b.split=dw,b.spread=Gb,b.tail=yn,b.take=af,b.takeRight=ji,b.takeRightWhile=Ci,b.takeWhile=ba,b.tap=Jy,b.throttle=Ub,b.thru=Dc,b.toArray=n_,b.toPairs=l_,b.toPairsIn=u_,b.toPath=Zw,b.toPlainObject=a_,b.transform=Vx,b.unary=Yb,b.union=ff,b.unionBy=Ec,b.unionWith=qn,b.uniq=sf,b.uniqBy=ii,b.uniqWith=Ac,b.unset=$x,b.unzip=In,b.unzipWith=Os,b.update=Zx,b.updateWith=Xx,b.values=Fo,b.valuesIn=qx,b.without=ko,b.words=d_,b.wrap=Hb,b.xor=$y,b.xorBy=Zy,b.xorWith=Xy,b.zip=qy,b.zipObject=Ky,b.zipObjectDeep=jy,b.zipWith=Qy,b.entries=l_,b.entriesIn=u_,b.extend=f_,b.extendWith=Ic,r0(b,b),b.add=qw,b.attempt=v_,b.camelCase=Jx,b.capitalize=c_,b.ceil=Kw,b.clamp=Kx,b.clone=Wb,b.cloneDeep=$b,b.cloneDeepWith=Zb,b.cloneWith=Vb,b.conformsTo=Xb,b.deburr=h_,b.defaultTo=Lw,b.divide=jw,b.endsWith=ew,b.eq=Qi,b.escape=tw,b.escapeRegExp=rw,b.every=lb,b.find=cb,b.findIndex=yi,b.findKey=Tx,b.findLast=hb,b.findLastIndex=ya,b.findLastKey=Ex,b.floor=Qw,b.forEach=Wv,b.forEachRight=Vv,b.forIn=Ax,b.forInRight=Dx,b.forOwn=Lx,b.forOwnRight=Ox,b.get=jd,b.gt=qb,b.gte=Kb,b.has=Mx,b.hasIn=Qd,b.head=zt,b.identity=si,b.includes=mb,b.indexOf=E,b.inRange=jx,b.invoke=Fx,b.isArguments=Rs,b.isArray=Jt,b.isArrayBuffer=jb,b.isArrayLike=ai,b.isArrayLikeObject=un,b.isBoolean=Qb,b.isBuffer=Wf,b.isDate=Jb,b.isElement=ex,b.isEmpty=tx,b.isEqual=rx,b.isEqualWith=nx,b.isError=qd,b.isFinite=ix,b.isFunction=of,b.isInteger=Jv,b.isLength=Mc,b.isMap=e_,b.isMatch=ax,b.isMatchWith=fx,b.isNaN=sx,b.isNative=ox,b.isNil=ux,b.isNull=lx,b.isNumber=t_,b.isObject=tn,b.isObjectLike=rn,b.isPlainObject=Jl,b.isRegExp=Kd,b.isSafeInteger=cx,b.isSet=r_,b.isString=kc,b.isSymbol=bi,b.isTypedArray=Io,b.isUndefined=hx,b.isWeakMap=dx,b.isWeakSet=vx,b.join=G,b.kebabCase=nw,b.last=N,b.lastIndexOf=W,b.lowerCase=iw,b.lowerFirst=aw,b.lt=_x,b.lte=px,b.max=Jw,b.maxBy=e2,b.mean=t2,b.meanBy=r2,b.min=n2,b.minBy=i2,b.stubArray=i0,b.stubFalse=a0,b.stubObject=zw,b.stubString=Ww,b.stubTrue=Vw,b.multiply=a2,b.nth=D,b.noConflict=Fw,b.noop=n0,b.now=Oc,b.pad=fw,b.padEnd=sw,b.padStart=ow,b.parseInt=lw,b.random=Qx,b.reduce=wb,b.reduceRight=Sb,b.repeat=uw,b.replace=cw,b.result=Hx,b.round=f2,b.runInContext=K,b.sample=Eb,b.size=Lb,b.snakeCase=hw,b.some=Ob,b.sortedIndex=yt,b.sortedIndexBy=at,b.sortedIndexOf=Te,b.sortedLastIndex=le,b.sortedLastIndexBy=ht,b.sortedLastIndexOf=lt,b.startCase=vw,b.startsWith=_w,b.subtract=s2,b.sum=o2,b.sumBy=l2,b.template=pw,b.times=$w,b.toFinite=lf,b.toInteger=nr,b.toLength=i_,b.toLower=mw,b.toNumber=Mi,b.toSafeInteger=mx,b.toString=Or,b.toUpper=gw,b.trim=yw,b.trimEnd=bw,b.trimStart=xw,b.truncate=ww,b.unescape=Sw,b.uniqueId=Xw,b.upperCase=Tw,b.upperFirst=Jd,b.each=Wv,b.eachRight=Vv,b.first=zt,r0(b,function(){var e={};return ri(b,function(r,a){gr.call(b.prototype,a)||(e[a]=r)}),e}(),{chain:!1}),b.VERSION=f,wn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){b[e].placeholder=b}),wn(["drop","take"],function(e,r){ur.prototype[e]=function(a){a=a===i?1:Xr(nr(a),0);var l=this.__filtered__&&!r?new ur(this):this.clone();return l.__filtered__?l.__takeCount__=Rn(a,l.__takeCount__):l.__views__.push({size:Rn(a,Wt),type:e+(l.__dir__<0?"Right":"")}),l},ur.prototype[e+"Right"]=function(a){return this.reverse()[e](a).reverse()}}),wn(["filter","map","takeWhile"],function(e,r){var a=r+1,l=a==Le||a==bt;ur.prototype[e]=function(_){var T=this.clone();return T.__iteratees__.push({iteratee:Pt(_,3),type:a}),T.__filtered__=T.__filtered__||l,T}}),wn(["head","last"],function(e,r){var a="take"+(r?"Right":"");ur.prototype[e]=function(){return this[a](1).value()[0]}}),wn(["initial","tail"],function(e,r){var a="drop"+(r?"":"Right");ur.prototype[e]=function(){return this.__filtered__?new ur(this):this[a](1)}}),ur.prototype.compact=function(){return this.filter(si)},ur.prototype.find=function(e){return this.filter(e).head()},ur.prototype.findLast=function(e){return this.reverse().find(e)},ur.prototype.invokeMap=rr(function(e,r){return typeof e=="function"?new ur(this):this.map(function(a){return Xa(a,e,r)})}),ur.prototype.reject=function(e){return this.filter(Cc(Pt(e)))},ur.prototype.slice=function(e,r){e=nr(e);var a=this;return a.__filtered__&&(e>0||r<0)?new ur(a):(e<0?a=a.takeRight(-e):e&&(a=a.drop(e)),r!==i&&(r=nr(r),a=r<0?a.dropRight(-r):a.take(r-e)),a)},ur.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},ur.prototype.toArray=function(){return this.take(Wt)},ri(ur.prototype,function(e,r){var a=/^(?:filter|find|map|reject)|While$/.test(r),l=/^(?:head|last)$/.test(r),_=b[l?"take"+(r=="last"?"Right":""):r],T=l||/^find/.test(r);!_||(b.prototype[r]=function(){var P=this.__wrapped__,H=l?[1]:arguments,J=P instanceof ur,Ie=H[0],Ne=J||Jt(P),ze=function(vr){var yr=_.apply(b,Yi([vr],H));return l&&vt?yr[0]:yr};Ne&&a&&typeof Ie=="function"&&Ie.length!=1&&(J=Ne=!1);var vt=this.__chain__,Ot=!!this.__actions__.length,Yt=T&&!vt,fr=J&&!Ot;if(!T&&Ne){P=fr?P:new ur(this);var Ht=e.apply(P,H);return Ht.__actions__.push({func:Dc,args:[ze],thisArg:i}),new ti(Ht,vt)}return Yt&&fr?e.apply(this,H):(Ht=this.thru(ze),Yt?l?Ht.value()[0]:Ht.value():Ht)})}),wn(["pop","push","shift","sort","splice","unshift"],function(e){var r=ao[e],a=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",l=/^(?:pop|shift)$/.test(e);b.prototype[e]=function(){var _=arguments;if(l&&!this.__chain__){var T=this.value();return r.apply(Jt(T)?T:[],_)}return this[a](function(P){return r.apply(Jt(P)?P:[],_)})}}),ri(ur.prototype,function(e,r){var a=b[r];if(a){var l=a.name+"";gr.call(Cn,l)||(Cn[l]=[]),Cn[l].push({name:r,func:a})}}),Cn[Ls(i,I).name]=[{name:"wrapper",func:i}],ur.prototype.clone=gd,ur.prototype.reverse=yd,ur.prototype.value=bd,b.prototype.at=eb,b.prototype.chain=tb,b.prototype.commit=rb,b.prototype.next=nb,b.prototype.plant=ab,b.prototype.reverse=fb,b.prototype.toJSON=b.prototype.valueOf=b.prototype.value=sb,b.prototype.first=b.prototype.head,di&&(b.prototype[di]=ib),b},Tf=od();ka?((ka.exports=Tf)._=Tf,sl._=Tf):xn._=Tf}).call(Us)})(Ys,Ys.exports);const _f=Ys.exports,vh={normal:["FC6310R","FC6310"],infrared:["M3T"],multispectral:["FC6360"]};var Qn=63710088e-1,iv={centimeters:Qn*100,centimetres:Qn*100,degrees:Qn/111325,feet:Qn*3.28084,inches:Qn*39.37,kilometers:Qn/1e3,kilometres:Qn/1e3,meters:Qn,metres:Qn,miles:Qn/1609.344,millimeters:Qn*1e3,millimetres:Qn*1e3,nauticalmiles:Qn/1852,radians:1,yards:Qn*1.0936};function xg(t,n,i){i===void 0&&(i={});var f={type:"Feature"};return(i.id===0||i.id)&&(f.id=i.id),i.bbox&&(f.bbox=i.bbox),f.properties=n||{},f.geometry=t,f}function wg(t,n,i){if(i===void 0&&(i={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!av(t[0])||!av(t[1]))throw new Error("coordinates must contain numbers");var f={type:"Point",coordinates:t};return xg(f,n,i)}function Sg(t,n){n===void 0&&(n="kilometers");var i=iv[n];if(!i)throw new Error(n+" units is invalid");return t*i}function Tg(t,n){n===void 0&&(n="kilometers");var i=iv[n];if(!i)throw new Error(n+" units is invalid");return t/i}function _h(t){var n=t%(2*Math.PI);return n*180/Math.PI}function Bi(t){var n=t%360;return n*Math.PI/180}function av(t){return!isNaN(t)&&t!==null&&!Array.isArray(t)}function Zo(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if(t.type==="Feature"&&t.geometry!==null&&t.geometry.type==="Point")return t.geometry.coordinates;if(t.type==="Point")return t.coordinates}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function Eg(t,n){return t.type==="FeatureCollection"?"FeatureCollection":t.type==="GeometryCollection"?"GeometryCollection":t.type==="Feature"&&t.geometry!==null?t.geometry.type:t.type}function fv(t,n,i){i===void 0&&(i={});var f=Zo(t),h=Zo(n),s=Bi(h[1]-f[1]),u=Bi(h[0]-f[0]),d=Bi(f[1]),v=Bi(h[1]),M=Math.pow(Math.sin(s/2),2)+Math.pow(Math.sin(u/2),2)*Math.cos(d)*Math.cos(v);return Sg(2*Math.atan2(Math.sqrt(M),Math.sqrt(1-M)),i.units)}function Ag(t,n,i,f){f===void 0&&(f={});var h=Zo(t),s=Bi(h[0]),u=Bi(h[1]),d=Bi(i),v=Tg(n,f.units),M=Math.asin(Math.sin(u)*Math.cos(v)+Math.cos(u)*Math.sin(v)*Math.cos(d)),k=s+Math.atan2(Math.sin(d)*Math.sin(v)*Math.cos(u),Math.cos(v)-Math.sin(u)*Math.sin(M)),g=_h(k),F=_h(M);return wg([g,F],f.properties)}function sv(t,n,i){if(i===void 0&&(i={}),i.final===!0)return Dg(t,n);var f=Zo(t),h=Zo(n),s=Bi(f[0]),u=Bi(h[0]),d=Bi(f[1]),v=Bi(h[1]),M=Math.sin(u-s)*Math.cos(v),k=Math.cos(d)*Math.sin(v)-Math.sin(d)*Math.cos(v)*Math.cos(u-s);return _h(Math.atan2(M,k))}function Dg(t,n){var i=sv(n,t);return i=(i+180)%360,i}function Lg(t,n){var i=fv(t,n),f=sv(t,n),h=Ag(t,i/2,f);return h}const ov=[{id:"annotation",type:"annotation",name:"\u6807\u6CE8",collapsed:!1,visible:!0,opacity:1},{id:"output",type:"output",name:"\u6210\u679C\u56FE\u5C42",collapsed:!1,visible:!0,opacity:1},{id:"dataset",type:"dataset",name:"\u6570\u636E\u96C6",collapsed:!1,visible:!0,opacity:1},{id:"overlay",type:"overlay",name:"\u8986\u76D6\u7269",collapsed:!1,visible:!0,opacity:1}],Og=[{type:"image",img:"satellite",name:"\u5F71\u50CF\u5730\u56FE",items:[{type:"raster",tileSize:256,tiles:["http://ecn.t3.tiles.virtualearth.net/tiles/a{quadkey}.jpeg?g=1"],maxzoom:19,layerType:"bmap"},{type:"raster",tileSize:256,tiles:["https://t0.tianditu.gov.cn/DataServer?T=cia_w&x={x}&y={y}&l={z}&tk=bfc12ce6bd94a4449ad626b8a0b709d0"],maxzoom:18,layerType:"bmap"}]},{type:"vector_standard",img:"vector_standard",name:"\u77E2\u91CF\u5730\u56FE",items:[{type:"raster",tileSize:256,tiles:["https://t0.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=bfc12ce6bd94a4449ad626b8a0b709d0"],maxzoom:18,layerType:"bmap"},{type:"raster",tileSize:256,tiles:["https://t0.tianditu.gov.cn/DataServer?T=cva_w&x={x}&y={y}&l={z}&tk=bfc12ce6bd94a4449ad626b8a0b709d0"],maxzoom:18,layerType:"bmap"}]}],Rg=["#321644","#455dd1","#2eb4f2","#26eda6","#c3f134","#f8bd39","#e14209","#7a0403"],Cg=[{type:"dom",name:"\u6B63\u5C04\u5F71\u50CF\uFF08DOM\uFF09",group:"output",visible:!0,opacity:1,class:"image2d"},{type:"tmp",name:"\u6E29\u5EA6\u56FE",group:"output",visible:!0,opacity:1,class:"tmp"},{type:"dsm",name:"\u6570\u5B57\u8868\u9762\u6A21\u578B\uFF08DSM\uFF09",group:"output",visible:!1,opacity:.5,class:"image2d"},{type:"mesh3d",name:"\u4E09\u7EF4\u6A21\u578B",group:"output",visible:!0,opacity:1,class:"3d_tiles"},{type:"point_cloud",name:"\u4E09\u7EF4\u70B9\u4E91",group:"output",visible:!1,opacity:1,class:"pnts"},{type:"ndvi",name:"\u690D\u88AB\u6307\u6570\uFF08NDVI\uFF09",group:"output",visible:!0,opacity:1,class:"ndvi"},{type:"photos",name:"\u7167\u7247",group:"dataset",visible:!1,opacity:1,class:"photos"}],Mg={dom:"dom_tiles",dsm:"dsm_tiles",ndvi:"ndvi_tiles",tmp:"tem_tiles"},kg={annotation:"icon-biaozhu",output:"icon-chengguo",dataset:"icon-photos",overlay:"icon-dataset",geojson:"icon-vector",raster:"icon-tuxiang",object:"icon-cube",dom:"icon-tuxiang",dsm:"icon-moxing",ndvi:"icon-zhishu",mesh3d:"icon-mesh",point_cloud:"icon-dianyun",photos:"icon-24gf-photoAlbum",point:"icon-locate",line:"icon-line",polygon:"icon-polygon"},Ig={quality:"medium",output:{normal:[{type:"image2d",name:"\u4E8C\u7EF4\u6B63\u5C04\uFF08DOM+DSM\uFF09"},{type:"mesh3d",name:"\u4E09\u7EF4\u6A21\u578B\uFF083DTiles\uFF09"}],infrared:[{type:"tmp",name:"\u6E29\u5EA6\u56FE",required:!0}],multispectral:[{type:"image2d",name:"\u4E8C\u7EF4\u6B63\u5C04\uFF08DOM+DSM\uFF09"},{type:"ndvi",name:"\u690D\u88AB\u6307\u6570\uFF08NDVI\uFF09",required:!0}]}},Fg=[{type:"draw_point",mode:"draw_point",name:"\u6807\u70B9",icon:"icon-locate"},{type:"draw_line_string",mode:"draw_line_string",name:"\u6807\u7EBF",icon:"icon-line"},{type:"draw_polygon",mode:"draw_polygon",name:"\u6807\u9762",icon:"icon-polygon"}],Ng={normal:{point:[{field:"height",label:"\u9AD8\u7A0B",unit:"m"}],line:[{field:"distance2d",label:"\u5E73\u9762\u957F\u5EA6",unit:"m"},{field:"distance3d",label:"\u7A7A\u95F4\u957F\u5EA6",unit:"m"},{field:"slope_min",label:"\u6700\u5C0F\u5761\u5EA6",unit:"\xB0"},{field:"slope_max",label:"\u6700\u5927\u5761\u5EA6",unit:"\xB0"},{field:"height_min",label:"\u6700\u5C0F\u9AD8\u7A0B",unit:"m"},{field:"height_max",label:"\u6700\u5927\u9AD8\u7A0B",unit:"m"}],polygon:[{field:"area2d",label:"\u5E73\u9762\u9762\u79EF",unit:"\u33A1"},{field:"area3d",label:"\u7A7A\u95F4\u9762\u79EF",unit:"\u33A1"},{field:"distance2d",label:"\u5E73\u9762\u5468\u957F",unit:"m"},{field:"distance3d",label:"\u7A7A\u95F4\u5468\u957F",unit:"m"},{field:"height_min",label:"\u6700\u5C0F\u9AD8\u7A0B",unit:"m"},{field:"height_max",label:"\u6700\u5927\u9AD8\u7A0B",unit:"m"}]},infrared:{point:[{field:"temprature",label:"\u6E29\u5EA6",unit:"\u2103"}],line:[{field:"distance2d",label:"\u957F\u5EA6",unit:"m"},{field:"temprature_min",label:"\u6700\u4F4E\u6E29\u5EA6",unit:"\u2103"},{field:"temprature_max",label:"\u6700\u9AD8\u6E29\u5EA6",unit:"\u2103"}],polygon:[{field:"area2d",label:"\u9762\u79EF",unit:"\u33A1"},{field:"distance2d",label:"\u5468\u957F",unit:"m"},{field:"temprature_min",label:"\u6700\u4F4E\u6E29\u5EA6",unit:"\u2103"},{field:"temprature_max",label:"\u6700\u9AD8\u6E29\u5EA6",unit:"\u2103"}]},multispectral:{point:[{field:"height",label:"\u9AD8\u7A0B",unit:"m"}],line:[{field:"distance2d",label:"\u5E73\u9762\u957F\u5EA6",unit:"m"},{field:"distance3d",label:"\u7A7A\u95F4\u957F\u5EA6",unit:"m"},{field:"slope_min",label:"\u6700\u5C0F\u5761\u5EA6",unit:"\xB0"},{field:"slope_max",label:"\u6700\u5927\u5761\u5EA6",unit:"\xB0"},{field:"height_min",label:"\u6700\u5C0F\u9AD8\u7A0B",unit:"m"},{field:"height_max",label:"\u6700\u5927\u9AD8\u7A0B",unit:"m"}],polygon:[{field:"area2d",label:"\u5E73\u9762\u9762\u79EF",unit:"\u33A1"},{field:"area3d",label:"\u7A7A\u95F4\u9762\u79EF",unit:"\u33A1"},{field:"distance2d",label:"\u5E73\u9762\u5468\u957F",unit:"m"},{field:"distance3d",label:"\u7A7A\u95F4\u5468\u957F",unit:"m"},{field:"height_min",label:"\u6700\u5C0F\u9AD8\u7A0B",unit:"m"},{field:"height_max",label:"\u6700\u5927\u9AD8\u7A0B",unit:"m"}]}},Bg={LOCAL_ENU:{code:0,name:"LOCAL_ENU"},LOCAL:{code:1,name:"LOCAL"},GEOGCS:{code:2,name:"Geographic"},PROJCS:{code:3,name:"Projected"},GEOCCS:{code:4,name:"Geocentric"}};var Xo=typeof Float32Array<"u"?Float32Array:Array,lv=Math.random;Math.hypot||(Math.hypot=function(){for(var t=0,n=arguments.length;n--;)t+=arguments[n]*arguments[n];return Math.sqrt(t)});function pf(){var t=new Xo(16);return Xo!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function uv(t,n,i,f,h,s,u,d,v,M,k,g,F,$,S,de){var se=new Xo(16);return se[0]=t,se[1]=n,se[2]=i,se[3]=f,se[4]=h,se[5]=s,se[6]=u,se[7]=d,se[8]=v,se[9]=M,se[10]=k,se[11]=g,se[12]=F,se[13]=$,se[14]=S,se[15]=de,se}function Pg(t,n){if(t===n){var i=n[1],f=n[2],h=n[3],s=n[6],u=n[7],d=n[11];t[1]=n[4],t[2]=n[8],t[3]=n[12],t[4]=i,t[6]=n[9],t[7]=n[13],t[8]=f,t[9]=s,t[11]=n[14],t[12]=h,t[13]=u,t[14]=d}else t[0]=n[0],t[1]=n[4],t[2]=n[8],t[3]=n[12],t[4]=n[1],t[5]=n[5],t[6]=n[9],t[7]=n[13],t[8]=n[2],t[9]=n[6],t[10]=n[10],t[11]=n[14],t[12]=n[3],t[13]=n[7],t[14]=n[11],t[15]=n[15];return t}function xu(t,n,i){var f=n[0],h=n[1],s=n[2],u=n[3],d=n[4],v=n[5],M=n[6],k=n[7],g=n[8],F=n[9],$=n[10],S=n[11],de=n[12],se=n[13],I=n[14],U=n[15],te=i[0],ce=i[1],_e=i[2],we=i[3];return t[0]=te*f+ce*d+_e*g+we*de,t[1]=te*h+ce*v+_e*F+we*se,t[2]=te*s+ce*M+_e*$+we*I,t[3]=te*u+ce*k+_e*S+we*U,te=i[4],ce=i[5],_e=i[6],we=i[7],t[4]=te*f+ce*d+_e*g+we*de,t[5]=te*h+ce*v+_e*F+we*se,t[6]=te*s+ce*M+_e*$+we*I,t[7]=te*u+ce*k+_e*S+we*U,te=i[8],ce=i[9],_e=i[10],we=i[11],t[8]=te*f+ce*d+_e*g+we*de,t[9]=te*h+ce*v+_e*F+we*se,t[10]=te*s+ce*M+_e*$+we*I,t[11]=te*u+ce*k+_e*S+we*U,te=i[12],ce=i[13],_e=i[14],we=i[15],t[12]=te*f+ce*d+_e*g+we*de,t[13]=te*h+ce*v+_e*F+we*se,t[14]=te*s+ce*M+_e*$+we*I,t[15]=te*u+ce*k+_e*S+we*U,t}function Gg(t,n){var i=Math.sin(n),f=Math.cos(n);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=f,t[6]=i,t[7]=0,t[8]=0,t[9]=-i,t[10]=f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Ug(t,n){var i=Math.sin(n),f=Math.cos(n);return t[0]=f,t[1]=0,t[2]=-i,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=i,t[9]=0,t[10]=f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Yg(t,n){var i=Math.sin(n),f=Math.cos(n);return t[0]=f,t[1]=i,t[2]=0,t[3]=0,t[4]=-i,t[5]=f,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function qf(){var t=new Xo(3);return Xo!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function Hg(t,n,i){return t[0]=n[0]+i[0],t[1]=n[1]+i[1],t[2]=n[2]+i[2],t}function zg(t,n,i){return t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i,t}function cv(t,n){var i=n[0],f=n[1],h=n[2],s=i*i+f*f+h*h;return s>0&&(s=1/Math.sqrt(s)),t[0]=n[0]*s,t[1]=n[1]*s,t[2]=n[2]*s,t}function hv(t,n){n=n||1;var i=lv()*2*Math.PI,f=lv()*2-1,h=Math.sqrt(1-f*f)*n;return t[0]=Math.cos(i)*h,t[1]=Math.sin(i)*h,t[2]=f*n,t}(function(){var t=qf();return function(n,i,f,h,s,u){var d,v;for(i||(i=3),f||(f=0),h?v=Math.min(h*i+f,n.length):v=n.length,d=f;d<v;d+=i)t[0]=n[d],t[1]=n[d+1],t[2]=n[d+2],s(t,t,u),n[d]=t[0],n[d+1]=t[1],n[d+2]=t[2];return n}})();function Wg(){return b_()}function Vg(t){return t?_t(t).format("YYYY-MM-DD HH:mm:ss"):"-"}function $g(){return _t().format("YYYY/M/D HH:mm:ss")}function Zg(t){return t=parseInt(t),t=t.toString(),t.length>6?(t=(Number(t)/1e6).toFixed(2),t+" MB"):(t=(Number(t)/1e3).toFixed(2),t+" KB")}function Xg(t){return t==="N"||t==="E"?1:-1}function qg(t){return t[0]+t[1]/60+t[2]/3600}function Kg(t,n=[]){t=dv(t),n=dv(n);let i=[];for(let f of t){let{visible:h}=f;for(let s of f.items||[]){let{id:u,type:d,opacity:v,visible:M,color:k,geometry:g}=s;if(h||(M=!1),["point","line","polygon"].includes(d)&&i.find(de=>de[0]==="updateAnnotations"))continue;let F=wu(u,n);if(!F&&!M)continue;if(!F){["point","line","polygon"].includes(d)?i.push(["updateAnnotations",s]):i.push(["addLayer",s]);continue}let{opacity:$,visible:S}=F;_f.isEqual(s,F)||(["point","line","polygon"].includes(d)?i.push(["updateAnnotations",s]):v!==$||d==="geojson"&&!_f.isEqual(s.metadata,F.metadata)?i.push(["updateLayer",s]):M!==S&&i.push([M?"addLayer":"removeLayer",s]))}}for(let f of n)for(let h of f.items||[]){let{id:s,type:u}=h;wu(s,t)||(["point","line","polygon"].includes(u)?i.find(v=>v[0]==="updateAnnotations")||i.push(["updateAnnotations",h]):i.push(["removeLayer",h]))}return i}function wu(t,n){var i;for(let f of n){if(f.id===t)return f;if((i=f.items)!=null&&i.length){let h=wu(t,f.items);if(h)return h}}return null}function dv(t){let n=_f.cloneDeep(t);for(let i of n)for(let f of i.items||[])i.visible||(f.visible=!1);return n}function jg(t,n){let i=t.style._layers,f=t.style.order,{layerType:h}=n.metadata;return f.find(d=>{let v=i[d].metadata;return _f.isEmpty(v)&&(v={layerType:"dsm"}),u(h,n.id)<u(v.layerType,d)})||"";function u(d,v){const M=[["bmap"],["dom"],["ndvi"],["dsm"],["circle"],["annotation"],["label"]];let k=-1;return v.startsWith("gl-draw")?k=5:k=M.findIndex(g=>g.includes(d)),k===-1?100:k}}function Qg(t){if(!t)return!1;let{message:n="",msg:i=""}=t.data;return t.status==401&&(i.toLowerCase().includes("expired")||n.toLowerCase().includes("expired"))}function Jg(t){for(let n in vh)if(vh[n].includes(t))return n;return"normal"}function ey(t){let n=`\u5FEB\u7167${_t().format("YYYYMMDD")}${new Date().getTime()}.png`,i=document.createElement("a");i.href=t,i.download=n,document.body.appendChild(i),i.click(),document.body.removeChild(i)}function ty(t){let n=Eg(t);return["Point","MultiPoint"].includes(n)?"point":["LineString","MultiLineString"].includes(n)?"line":"polygon"}function ry(t){let n=t[3]>128?0:1,i=-1*(1-n)+n,f=Math.floor((t[3]+.1)%128)*2+Math.floor((t[2]+.1)/128)-127,h=t[0]+t[1]*256+Math.floor((t[2]+.1)%128)*256*256;return i*(1+h/8388607)*Math.pow(2,f)}function ny(t){let{geometry:n}=t,i=_f.cloneDeep(t);return delete i.geometry,{id:i.id,type:"Feature",properties:i,geometry:_f.cloneDeep(n)}}function iy(t,n){let i=[],f=n==="point"?"\u70B9\u6CE8\u8BB0":n==="line"?"\u7EBF\u6CE8\u8BB0":"\u9762\u6CE8\u8BB0";t.forEach(h=>{if(h.name===f){i.push(0);return}if(h.name.startsWith(`${f} `)){let s=Number(h.name.split(" ").pop());Number.isNaN(s)||i.push(s)}}),i=i.sort((h,s)=>h-s);for(let h=0;h<i.length;h++)if(i[h]!==h)return h===0?f:`${f} ${h}`;return i.length===0?f:`${f} ${i.length}`}function ay(t){let n=t.geometry.coordinates,i=[];for(let v=1;v<n.length;v++)fv(n[v-1],n[v],{units:"meters"})>30&&i.push([n[v-1],n[v]]);let f=[];if(i.length){let v=Math.floor(i.length/2);f=i[v]}else{let v=Math.floor(n.length/2-1);f=[n[v],n[v+1]]}let h=ph(f[0]),s=ph(f[1]),u=360-Math.atan((h.y-s.y)/(s.x-h.x))*180/Math.PI,d=Lg(f[0],f[1]);return d.properties=t.properties,d.properties.angle=u,d.geometry.coordinates.push(((f[0][2]||0)+(f[1][2]||0))/2),d}function ph(t,n=12){let[i,f]=t,h=(180+i)/360,s=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+f*Math.PI/360)))/360;return{x:h*Math.pow(2,n)*512,y:s*Math.pow(2,n)*512}}function fy(t,n){n.forEach(i=>{t.loadImage(i,(f,h)=>{let s=i.split("/").pop().split(".")[0];if(!t.hasImage(s)){if(f)throw f;t.addImage(s,h)}})})}function sy(t,n,i){var s;let f=_f.cloneDeep(((s=t.metadata)==null?void 0:s.groups)||ov);return f.forEach(u=>u.items=[]),n.forEach(u=>{let d=_f.cloneDeep(u);d.group||d.group,f.find(M=>M.id===d.group).items.push(d)}),(t.status==="complete"?i:[]).forEach(u=>{let{group:d}=u,v=f.find(M=>M.id===d);!v||v.items.push(u)}),f}function oy(t){for(let n=0;n<t.length;n++)if(Number.isNaN(t[n]))return!0;return!1}function ly(t,n,i){let f=[],h=uv(0,1,0,0,1,0,0,0,0,0,-1,0,0,0,0,1),s=uv(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),u=Yg(pf(),i*Math.PI/180),d=Ug(pf(),t*Math.PI/180),v=Gg(pf(),n*Math.PI/180),M=xu(pf(),xu(pf(),u,d),v),k=xu(pf(),xu(pf(),s,Pg(pf(),M)),h);for(let g=0;g<3;g++)for(let F=0;F<3;F++)f[g*3+F]=k[g+F*4];return f}let mf=null;function vv(t,n,i){i[t]=i[t]||[],i[t].push(n)}function mh(t,n,i){if(i&&i[t]){const f=i[t].indexOf(n);f!==-1&&i[t].splice(f,1)}}function _v(t,...n){for(const i of n)for(const f in i)t[f]=i[f];return t}function uy(t,n){return t.indexOf(n,t.length-n.length)!==-1}class cy{constructor(){this._listeners=[],this._oneTimeListeners=[],this._eventedParent=null,this._eventedParentData=null}on(n,i){return this._listeners=this._listeners||{},vv(n,i,this._listeners),this}off(n,i){if(!i){this._listeners={},this._oneTimeListeners={};return}return mh(n,i,this._listeners),mh(n,i,this._oneTimeListeners),this}once(n,i){return this._oneTimeListeners=this._oneTimeListeners||{},vv(n,i,this._oneTimeListeners),this}fire(n,i){if(this.listens(n)){if(i=_v({},i,{type:n,target:this}),mf){if(i.point&&mf===i.point.x+i.point.y){if(mf===i.point.x+i.point.y)return;mf=i.point.x+i.point.y}else if(i.feature){if(mf===i.x+i.y)return;mf=i.x+i.y}}else i.point?mf=i.point.x+i.point.y:i.feature&&(mf=i.x+i.y);const f=this._listeners&&this._listeners[n]?this._listeners[n].slice():[];for(let s=0;s<f.length;s++)f[s].call(this,i);const h=this._oneTimeListeners&&this._oneTimeListeners[n]?this._oneTimeListeners[n].slice():[];for(let s=0;s<h.length;s++)h[s].call(this,i),mh(n,h[s],this._oneTimeListeners);this._eventedParent&&this._eventedParent.fire(n,_v({},i,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData))}else uy(n,"error")&&console.error(i&&i.error||i||"Empty error event");return this}listens(n){return this._listeners&&this._listeners[n]&&this._listeners[n].length>0||this._oneTimeListeners&&this._oneTimeListeners[n]&&this._oneTimeListeners[n].length>0||this._eventedParent&&this._eventedParent.listens(n)}setEventedParent(n,i){return this._eventedParent=n,this._eventedParentData=i,this}}const hy={tileFormat:"float32",tileSize:256,colorScale:[],sentinelValues:[],transitions:!1,transitionTimeMs:800,debug:!1,extraPixelLayers:0,colorscaleMaxLength:16,sentinelMaxLength:16,minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,glOperation:"none",multiLayers:0,operationUrlA:"",operationUrlB:"",operationUrlC:"",operationUrlD:"",operationUrlE:"",operationUrlF:"",filterLowA:0,filterHighA:1e5,filterLowB:0,filterHighB:1e5,filterLowC:0,filterHighC:1e5,filterLowD:0,filterHighD:1e5,filterLowE:0,filterHighE:1e5,filterLowF:0,filterHighF:1e5,multiplierA:1,multiplierB:1,multiplierC:1,multiplierD:1,multiplierE:1,multiplierF:1,hillshadeType:"none",hsSimpleZoomdelta:0,hsSimpleSlopescale:3,hsSimpleAzimuth:315,hsSimpleAltitude:70,hsAdvValueScale:1,hsAdvPixelScale:"auto",hsAdvSoftIterations:10,hsAdvAmbientIterations:10,hsAdvSunRadiusMultiplier:100,hsAdvFinalSoftMultiplier:1,hsAdvFinalAmbientMultiplier:.25,hsAdvBaselayerUrl:"",hsAdvSmoothInput:!1,hsAdvSmoothInputKernel:3,hsPregenUrl:"",_hillshadeOptions:{hillshadeType:"none"},contourType:"none",contourSmoothLines:!1,contourSmoothInput:!1,contourSmoothInputKernel:7,contourScaleFactor:1,contourInterval:25,contourIndexInterval:100,contourLineColor:"#000000",contourIlluminatedHighlightColor:"rgba(177,174,164,.5)",contourIlluminatedShadowColor:"#5b5143",contourIlluminatedShadowSize:2,contourLineWeight:.5,contourLineIndexWeight:2,contourIndexLabels:!1,contourLabelFont:"12px Arial",contourLabelDistance:250,contourHypso:!1,contourHypsoDomain:[0,1e3,2e3],contourHypsoColors:["#486341","#e5d9c9","#dddddd"],contourBathy:!1,contourBathyDomain:[-2e3,0],contourBathyColors:["#315d9b","#d5f2ff"],contourBathyShadowColor:"#4e5c66",contourBathyHighlightColor:"rgba(224, 242, 255, .5)"};function dy(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var gh={exports:{}},yh={},pv;function gf(){return pv||(pv=1,function(t){var n=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function i(s,u){return Object.prototype.hasOwnProperty.call(s,u)}t.assign=function(s){for(var u=Array.prototype.slice.call(arguments,1);u.length;){var d=u.shift();if(!!d){if(typeof d!="object")throw new TypeError(d+"must be non-object");for(var v in d)i(d,v)&&(s[v]=d[v])}}return s},t.shrinkBuf=function(s,u){return s.length===u?s:s.subarray?s.subarray(0,u):(s.length=u,s)};var f={arraySet:function(s,u,d,v,M){if(u.subarray&&s.subarray){s.set(u.subarray(d,d+v),M);return}for(var k=0;k<v;k++)s[M+k]=u[d+k]},flattenChunks:function(s){var u,d,v,M,k,g;for(v=0,u=0,d=s.length;u<d;u++)v+=s[u].length;for(g=new Uint8Array(v),M=0,u=0,d=s.length;u<d;u++)k=s[u],g.set(k,M),M+=k.length;return g}},h={arraySet:function(s,u,d,v,M){for(var k=0;k<v;k++)s[M+k]=u[d+k]},flattenChunks:function(s){return[].concat.apply([],s)}};t.setTyped=function(s){s?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,f)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,h))},t.setTyped(n)}(yh)),yh}var Hs={},Pi={},Kf={},mv;function vy(){if(mv)return Kf;mv=1;var t=gf(),n=4,i=0,f=1,h=2;function s(A){for(var Ue=A.length;--Ue>=0;)A[Ue]=0}var u=0,d=1,v=2,M=3,k=258,g=29,F=256,$=F+1+g,S=30,de=19,se=2*$+1,I=15,U=16,te=7,ce=256,_e=16,we=17,ee=18,Ce=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],ut=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],ct=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],nt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],ft=512,tt=new Array(($+2)*2);s(tt);var Le=new Array(S*2);s(Le);var Ct=new Array(ft);s(Ct);var bt=new Array(k-M+1);s(bt);var Me=new Array(g);s(Me);var Ze=new Array(S);s(Ze);function St(A,Ue,Xe,dt,z){this.static_tree=A,this.extra_bits=Ue,this.extra_base=Xe,this.elems=dt,this.max_length=z,this.has_stree=A&&A.length}var $t,Wt,Qt;function sr(A,Ue){this.dyn_tree=A,this.max_code=0,this.stat_desc=Ue}function xr(A){return A<256?Ct[A]:Ct[256+(A>>>7)]}function or(A,Ue){A.pending_buf[A.pending++]=Ue&255,A.pending_buf[A.pending++]=Ue>>>8&255}function Kt(A,Ue,Xe){A.bi_valid>U-Xe?(A.bi_buf|=Ue<<A.bi_valid&65535,or(A,A.bi_buf),A.bi_buf=Ue>>U-A.bi_valid,A.bi_valid+=Xe-U):(A.bi_buf|=Ue<<A.bi_valid&65535,A.bi_valid+=Xe)}function wr(A,Ue,Xe){Kt(A,Xe[Ue*2],Xe[Ue*2+1])}function Gt(A,Ue){var Xe=0;do Xe|=A&1,A>>>=1,Xe<<=1;while(--Ue>0);return Xe>>>1}function kt(A){A.bi_valid===16?(or(A,A.bi_buf),A.bi_buf=0,A.bi_valid=0):A.bi_valid>=8&&(A.pending_buf[A.pending++]=A.bi_buf&255,A.bi_buf>>=8,A.bi_valid-=8)}function hn(A,Ue){var Xe=Ue.dyn_tree,dt=Ue.max_code,z=Ue.stat_desc.static_tree,xe=Ue.stat_desc.has_stree,p=Ue.stat_desc.extra_bits,He=Ue.stat_desc.extra_base,Bt=Ue.stat_desc.max_length,o,ue,ge,y,Y,oe,At=0;for(y=0;y<=I;y++)A.bl_count[y]=0;for(Xe[A.heap[A.heap_max]*2+1]=0,o=A.heap_max+1;o<se;o++)ue=A.heap[o],y=Xe[Xe[ue*2+1]*2+1]+1,y>Bt&&(y=Bt,At++),Xe[ue*2+1]=y,!(ue>dt)&&(A.bl_count[y]++,Y=0,ue>=He&&(Y=p[ue-He]),oe=Xe[ue*2],A.opt_len+=oe*(y+Y),xe&&(A.static_len+=oe*(z[ue*2+1]+Y)));if(At!==0){do{for(y=Bt-1;A.bl_count[y]===0;)y--;A.bl_count[y]--,A.bl_count[y+1]+=2,A.bl_count[Bt]--,At-=2}while(At>0);for(y=Bt;y!==0;y--)for(ue=A.bl_count[y];ue!==0;)ge=A.heap[--o],!(ge>dt)&&(Xe[ge*2+1]!==y&&(A.opt_len+=(y-Xe[ge*2+1])*Xe[ge*2],Xe[ge*2+1]=y),ue--)}}function jr(A,Ue,Xe){var dt=new Array(I+1),z=0,xe,p;for(xe=1;xe<=I;xe++)dt[xe]=z=z+Xe[xe-1]<<1;for(p=0;p<=Ue;p++){var He=A[p*2+1];He!==0&&(A[p*2]=Gt(dt[He]++,He))}}function Ft(){var A,Ue,Xe,dt,z,xe=new Array(I+1);for(Xe=0,dt=0;dt<g-1;dt++)for(Me[dt]=Xe,A=0;A<1<<Ce[dt];A++)bt[Xe++]=dt;for(bt[Xe-1]=dt,z=0,dt=0;dt<16;dt++)for(Ze[dt]=z,A=0;A<1<<ut[dt];A++)Ct[z++]=dt;for(z>>=7;dt<S;dt++)for(Ze[dt]=z<<7,A=0;A<1<<ut[dt]-7;A++)Ct[256+z++]=dt;for(Ue=0;Ue<=I;Ue++)xe[Ue]=0;for(A=0;A<=143;)tt[A*2+1]=8,A++,xe[8]++;for(;A<=255;)tt[A*2+1]=9,A++,xe[9]++;for(;A<=279;)tt[A*2+1]=7,A++,xe[7]++;for(;A<=287;)tt[A*2+1]=8,A++,xe[8]++;for(jr(tt,$+1,xe),A=0;A<S;A++)Le[A*2+1]=5,Le[A*2]=Gt(A,5);$t=new St(tt,Ce,F+1,$,I),Wt=new St(Le,ut,0,S,I),Qt=new St(new Array(0),ct,0,de,te)}function Br(A){var Ue;for(Ue=0;Ue<$;Ue++)A.dyn_ltree[Ue*2]=0;for(Ue=0;Ue<S;Ue++)A.dyn_dtree[Ue*2]=0;for(Ue=0;Ue<de;Ue++)A.bl_tree[Ue*2]=0;A.dyn_ltree[ce*2]=1,A.opt_len=A.static_len=0,A.last_lit=A.matches=0}function Ir(A){A.bi_valid>8?or(A,A.bi_buf):A.bi_valid>0&&(A.pending_buf[A.pending++]=A.bi_buf),A.bi_buf=0,A.bi_valid=0}function Zr(A,Ue,Xe,dt){Ir(A),dt&&(or(A,Xe),or(A,~Xe)),t.arraySet(A.pending_buf,A.window,Ue,Xe,A.pending),A.pending+=Xe}function Qr(A,Ue,Xe,dt){var z=Ue*2,xe=Xe*2;return A[z]<A[xe]||A[z]===A[xe]&&dt[Ue]<=dt[Xe]}function ar(A,Ue,Xe){for(var dt=A.heap[Xe],z=Xe<<1;z<=A.heap_len&&(z<A.heap_len&&Qr(Ue,A.heap[z+1],A.heap[z],A.depth)&&z++,!Qr(Ue,dt,A.heap[z],A.depth));)A.heap[Xe]=A.heap[z],Xe=z,z<<=1;A.heap[Xe]=dt}function Nt(A,Ue,Xe){var dt,z,xe=0,p,He;if(A.last_lit!==0)do dt=A.pending_buf[A.d_buf+xe*2]<<8|A.pending_buf[A.d_buf+xe*2+1],z=A.pending_buf[A.l_buf+xe],xe++,dt===0?wr(A,z,Ue):(p=bt[z],wr(A,p+F+1,Ue),He=Ce[p],He!==0&&(z-=Me[p],Kt(A,z,He)),dt--,p=xr(dt),wr(A,p,Xe),He=ut[p],He!==0&&(dt-=Ze[p],Kt(A,dt,He)));while(xe<A.last_lit);wr(A,ce,Ue)}function En(A,Ue){var Xe=Ue.dyn_tree,dt=Ue.stat_desc.static_tree,z=Ue.stat_desc.has_stree,xe=Ue.stat_desc.elems,p,He,Bt=-1,o;for(A.heap_len=0,A.heap_max=se,p=0;p<xe;p++)Xe[p*2]!==0?(A.heap[++A.heap_len]=Bt=p,A.depth[p]=0):Xe[p*2+1]=0;for(;A.heap_len<2;)o=A.heap[++A.heap_len]=Bt<2?++Bt:0,Xe[o*2]=1,A.depth[o]=0,A.opt_len--,z&&(A.static_len-=dt[o*2+1]);for(Ue.max_code=Bt,p=A.heap_len>>1;p>=1;p--)ar(A,Xe,p);o=xe;do p=A.heap[1],A.heap[1]=A.heap[A.heap_len--],ar(A,Xe,1),He=A.heap[1],A.heap[--A.heap_max]=p,A.heap[--A.heap_max]=He,Xe[o*2]=Xe[p*2]+Xe[He*2],A.depth[o]=(A.depth[p]>=A.depth[He]?A.depth[p]:A.depth[He])+1,Xe[p*2+1]=Xe[He*2+1]=o,A.heap[1]=o++,ar(A,Xe,1);while(A.heap_len>=2);A.heap[--A.heap_max]=A.heap[1],hn(A,Ue),jr(Xe,Bt,A.bl_count)}function An(A,Ue,Xe){var dt,z=-1,xe,p=Ue[0*2+1],He=0,Bt=7,o=4;for(p===0&&(Bt=138,o=3),Ue[(Xe+1)*2+1]=65535,dt=0;dt<=Xe;dt++)xe=p,p=Ue[(dt+1)*2+1],!(++He<Bt&&xe===p)&&(He<o?A.bl_tree[xe*2]+=He:xe!==0?(xe!==z&&A.bl_tree[xe*2]++,A.bl_tree[_e*2]++):He<=10?A.bl_tree[we*2]++:A.bl_tree[ee*2]++,He=0,z=xe,p===0?(Bt=138,o=3):xe===p?(Bt=6,o=3):(Bt=7,o=4))}function Jr(A,Ue,Xe){var dt,z=-1,xe,p=Ue[0*2+1],He=0,Bt=7,o=4;for(p===0&&(Bt=138,o=3),dt=0;dt<=Xe;dt++)if(xe=p,p=Ue[(dt+1)*2+1],!(++He<Bt&&xe===p)){if(He<o)do wr(A,xe,A.bl_tree);while(--He!==0);else xe!==0?(xe!==z&&(wr(A,xe,A.bl_tree),He--),wr(A,_e,A.bl_tree),Kt(A,He-3,2)):He<=10?(wr(A,we,A.bl_tree),Kt(A,He-3,3)):(wr(A,ee,A.bl_tree),Kt(A,He-11,7));He=0,z=xe,p===0?(Bt=138,o=3):xe===p?(Bt=6,o=3):(Bt=7,o=4)}}function an(A){var Ue;for(An(A,A.dyn_ltree,A.l_desc.max_code),An(A,A.dyn_dtree,A.d_desc.max_code),En(A,A.bl_desc),Ue=de-1;Ue>=3&&A.bl_tree[nt[Ue]*2+1]===0;Ue--);return A.opt_len+=3*(Ue+1)+5+5+4,Ue}function w(A,Ue,Xe,dt){var z;for(Kt(A,Ue-257,5),Kt(A,Xe-1,5),Kt(A,dt-4,4),z=0;z<dt;z++)Kt(A,A.bl_tree[nt[z]*2+1],3);Jr(A,A.dyn_ltree,Ue-1),Jr(A,A.dyn_dtree,Xe-1)}function li(A){var Ue=4093624447,Xe;for(Xe=0;Xe<=31;Xe++,Ue>>>=1)if(Ue&1&&A.dyn_ltree[Xe*2]!==0)return i;if(A.dyn_ltree[9*2]!==0||A.dyn_ltree[10*2]!==0||A.dyn_ltree[13*2]!==0)return f;for(Xe=32;Xe<F;Xe++)if(A.dyn_ltree[Xe*2]!==0)return f;return i}var dn=!1;function Gi(A){dn||(Ft(),dn=!0),A.l_desc=new sr(A.dyn_ltree,$t),A.d_desc=new sr(A.dyn_dtree,Wt),A.bl_desc=new sr(A.bl_tree,Qt),A.bi_buf=0,A.bi_valid=0,Br(A)}function Bn(A,Ue,Xe,dt){Kt(A,(u<<1)+(dt?1:0),3),Zr(A,Ue,Xe,!0)}function Er(A){Kt(A,d<<1,3),wr(A,ce,tt),kt(A)}function Dn(A,Ue,Xe,dt){var z,xe,p=0;A.level>0?(A.strm.data_type===h&&(A.strm.data_type=li(A)),En(A,A.l_desc),En(A,A.d_desc),p=an(A),z=A.opt_len+3+7>>>3,xe=A.static_len+3+7>>>3,xe<=z&&(z=xe)):z=xe=Xe+5,Xe+4<=z&&Ue!==-1?Bn(A,Ue,Xe,dt):A.strategy===n||xe===z?(Kt(A,(d<<1)+(dt?1:0),3),Nt(A,tt,Le)):(Kt(A,(v<<1)+(dt?1:0),3),w(A,A.l_desc.max_code+1,A.d_desc.max_code+1,p+1),Nt(A,A.dyn_ltree,A.dyn_dtree)),Br(A),dt&&Ir(A)}function Pn(A,Ue,Xe){return A.pending_buf[A.d_buf+A.last_lit*2]=Ue>>>8&255,A.pending_buf[A.d_buf+A.last_lit*2+1]=Ue&255,A.pending_buf[A.l_buf+A.last_lit]=Xe&255,A.last_lit++,Ue===0?A.dyn_ltree[Xe*2]++:(A.matches++,Ue--,A.dyn_ltree[(bt[Xe]+F+1)*2]++,A.dyn_dtree[xr(Ue)*2]++),A.last_lit===A.lit_bufsize-1}return Kf._tr_init=Gi,Kf._tr_stored_block=Bn,Kf._tr_flush_block=Dn,Kf._tr_tally=Pn,Kf._tr_align=Er,Kf}var bh,gv;function yv(){if(gv)return bh;gv=1;function t(n,i,f,h){for(var s=n&65535|0,u=n>>>16&65535|0,d=0;f!==0;){d=f>2e3?2e3:f,f-=d;do s=s+i[h++]|0,u=u+s|0;while(--d);s%=65521,u%=65521}return s|u<<16|0}return bh=t,bh}var xh,bv;function xv(){if(bv)return xh;bv=1;function t(){for(var f,h=[],s=0;s<256;s++){f=s;for(var u=0;u<8;u++)f=f&1?3988292384^f>>>1:f>>>1;h[s]=f}return h}var n=t();function i(f,h,s,u){var d=n,v=u+s;f^=-1;for(var M=u;M<v;M++)f=f>>>8^d[(f^h[M])&255];return f^-1}return xh=i,xh}var wh,wv;function Sh(){return wv||(wv=1,wh={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}),wh}var Sv;function _y(){if(Sv)return Pi;Sv=1;var t=gf(),n=vy(),i=yv(),f=xv(),h=Sh(),s=0,u=1,d=3,v=4,M=5,k=0,g=1,F=-2,$=-3,S=-5,de=-1,se=1,I=2,U=3,te=4,ce=0,_e=2,we=8,ee=9,Ce=15,ut=8,ct=29,nt=256,ft=nt+1+ct,tt=30,Le=19,Ct=2*ft+1,bt=15,Me=3,Ze=258,St=Ze+Me+1,$t=32,Wt=42,Qt=69,sr=73,xr=91,or=103,Kt=113,wr=666,Gt=1,kt=2,hn=3,jr=4,Ft=3;function Br(o,ue){return o.msg=h[ue],ue}function Ir(o){return(o<<1)-(o>4?9:0)}function Zr(o){for(var ue=o.length;--ue>=0;)o[ue]=0}function Qr(o){var ue=o.state,ge=ue.pending;ge>o.avail_out&&(ge=o.avail_out),ge!==0&&(t.arraySet(o.output,ue.pending_buf,ue.pending_out,ge,o.next_out),o.next_out+=ge,ue.pending_out+=ge,o.total_out+=ge,o.avail_out-=ge,ue.pending-=ge,ue.pending===0&&(ue.pending_out=0))}function ar(o,ue){n._tr_flush_block(o,o.block_start>=0?o.block_start:-1,o.strstart-o.block_start,ue),o.block_start=o.strstart,Qr(o.strm)}function Nt(o,ue){o.pending_buf[o.pending++]=ue}function En(o,ue){o.pending_buf[o.pending++]=ue>>>8&255,o.pending_buf[o.pending++]=ue&255}function An(o,ue,ge,y){var Y=o.avail_in;return Y>y&&(Y=y),Y===0?0:(o.avail_in-=Y,t.arraySet(ue,o.input,o.next_in,Y,ge),o.state.wrap===1?o.adler=i(o.adler,ue,Y,ge):o.state.wrap===2&&(o.adler=f(o.adler,ue,Y,ge)),o.next_in+=Y,o.total_in+=Y,Y)}function Jr(o,ue){var ge=o.max_chain_length,y=o.strstart,Y,oe,At=o.prev_length,it=o.nice_match,mt=o.strstart>o.w_size-St?o.strstart-(o.w_size-St):0,lr=o.window,ui=o.w_mask,Fr=o.prev,hr=o.strstart+Ze,Yr=lr[y+At-1],vn=lr[y+At];o.prev_length>=o.good_match&&(ge>>=2),it>o.lookahead&&(it=o.lookahead);do if(Y=ue,!(lr[Y+At]!==vn||lr[Y+At-1]!==Yr||lr[Y]!==lr[y]||lr[++Y]!==lr[y+1])){y+=2,Y++;do;while(lr[++y]===lr[++Y]&&lr[++y]===lr[++Y]&&lr[++y]===lr[++Y]&&lr[++y]===lr[++Y]&&lr[++y]===lr[++Y]&&lr[++y]===lr[++Y]&&lr[++y]===lr[++Y]&&lr[++y]===lr[++Y]&&y<hr);if(oe=Ze-(hr-y),y=hr-Ze,oe>At){if(o.match_start=ue,At=oe,oe>=it)break;Yr=lr[y+At-1],vn=lr[y+At]}}while((ue=Fr[ue&ui])>mt&&--ge!==0);return At<=o.lookahead?At:o.lookahead}function an(o){var ue=o.w_size,ge,y,Y,oe,At;do{if(oe=o.window_size-o.lookahead-o.strstart,o.strstart>=ue+(ue-St)){t.arraySet(o.window,o.window,ue,ue,0),o.match_start-=ue,o.strstart-=ue,o.block_start-=ue,y=o.hash_size,ge=y;do Y=o.head[--ge],o.head[ge]=Y>=ue?Y-ue:0;while(--y);y=ue,ge=y;do Y=o.prev[--ge],o.prev[ge]=Y>=ue?Y-ue:0;while(--y);oe+=ue}if(o.strm.avail_in===0)break;if(y=An(o.strm,o.window,o.strstart+o.lookahead,oe),o.lookahead+=y,o.lookahead+o.insert>=Me)for(At=o.strstart-o.insert,o.ins_h=o.window[At],o.ins_h=(o.ins_h<<o.hash_shift^o.window[At+1])&o.hash_mask;o.insert&&(o.ins_h=(o.ins_h<<o.hash_shift^o.window[At+Me-1])&o.hash_mask,o.prev[At&o.w_mask]=o.head[o.ins_h],o.head[o.ins_h]=At,At++,o.insert--,!(o.lookahead+o.insert<Me)););}while(o.lookahead<St&&o.strm.avail_in!==0)}function w(o,ue){var ge=65535;for(ge>o.pending_buf_size-5&&(ge=o.pending_buf_size-5);;){if(o.lookahead<=1){if(an(o),o.lookahead===0&&ue===s)return Gt;if(o.lookahead===0)break}o.strstart+=o.lookahead,o.lookahead=0;var y=o.block_start+ge;if((o.strstart===0||o.strstart>=y)&&(o.lookahead=o.strstart-y,o.strstart=y,ar(o,!1),o.strm.avail_out===0)||o.strstart-o.block_start>=o.w_size-St&&(ar(o,!1),o.strm.avail_out===0))return Gt}return o.insert=0,ue===v?(ar(o,!0),o.strm.avail_out===0?hn:jr):(o.strstart>o.block_start&&(ar(o,!1),o.strm.avail_out===0),Gt)}function li(o,ue){for(var ge,y;;){if(o.lookahead<St){if(an(o),o.lookahead<St&&ue===s)return Gt;if(o.lookahead===0)break}if(ge=0,o.lookahead>=Me&&(o.ins_h=(o.ins_h<<o.hash_shift^o.window[o.strstart+Me-1])&o.hash_mask,ge=o.prev[o.strstart&o.w_mask]=o.head[o.ins_h],o.head[o.ins_h]=o.strstart),ge!==0&&o.strstart-ge<=o.w_size-St&&(o.match_length=Jr(o,ge)),o.match_length>=Me)if(y=n._tr_tally(o,o.strstart-o.match_start,o.match_length-Me),o.lookahead-=o.match_length,o.match_length<=o.max_lazy_match&&o.lookahead>=Me){o.match_length--;do o.strstart++,o.ins_h=(o.ins_h<<o.hash_shift^o.window[o.strstart+Me-1])&o.hash_mask,ge=o.prev[o.strstart&o.w_mask]=o.head[o.ins_h],o.head[o.ins_h]=o.strstart;while(--o.match_length!==0);o.strstart++}else o.strstart+=o.match_length,o.match_length=0,o.ins_h=o.window[o.strstart],o.ins_h=(o.ins_h<<o.hash_shift^o.window[o.strstart+1])&o.hash_mask;else y=n._tr_tally(o,0,o.window[o.strstart]),o.lookahead--,o.strstart++;if(y&&(ar(o,!1),o.strm.avail_out===0))return Gt}return o.insert=o.strstart<Me-1?o.strstart:Me-1,ue===v?(ar(o,!0),o.strm.avail_out===0?hn:jr):o.last_lit&&(ar(o,!1),o.strm.avail_out===0)?Gt:kt}function dn(o,ue){for(var ge,y,Y;;){if(o.lookahead<St){if(an(o),o.lookahead<St&&ue===s)return Gt;if(o.lookahead===0)break}if(ge=0,o.lookahead>=Me&&(o.ins_h=(o.ins_h<<o.hash_shift^o.window[o.strstart+Me-1])&o.hash_mask,ge=o.prev[o.strstart&o.w_mask]=o.head[o.ins_h],o.head[o.ins_h]=o.strstart),o.prev_length=o.match_length,o.prev_match=o.match_start,o.match_length=Me-1,ge!==0&&o.prev_length<o.max_lazy_match&&o.strstart-ge<=o.w_size-St&&(o.match_length=Jr(o,ge),o.match_length<=5&&(o.strategy===se||o.match_length===Me&&o.strstart-o.match_start>4096)&&(o.match_length=Me-1)),o.prev_length>=Me&&o.match_length<=o.prev_length){Y=o.strstart+o.lookahead-Me,y=n._tr_tally(o,o.strstart-1-o.prev_match,o.prev_length-Me),o.lookahead-=o.prev_length-1,o.prev_length-=2;do++o.strstart<=Y&&(o.ins_h=(o.ins_h<<o.hash_shift^o.window[o.strstart+Me-1])&o.hash_mask,ge=o.prev[o.strstart&o.w_mask]=o.head[o.ins_h],o.head[o.ins_h]=o.strstart);while(--o.prev_length!==0);if(o.match_available=0,o.match_length=Me-1,o.strstart++,y&&(ar(o,!1),o.strm.avail_out===0))return Gt}else if(o.match_available){if(y=n._tr_tally(o,0,o.window[o.strstart-1]),y&&ar(o,!1),o.strstart++,o.lookahead--,o.strm.avail_out===0)return Gt}else o.match_available=1,o.strstart++,o.lookahead--}return o.match_available&&(y=n._tr_tally(o,0,o.window[o.strstart-1]),o.match_available=0),o.insert=o.strstart<Me-1?o.strstart:Me-1,ue===v?(ar(o,!0),o.strm.avail_out===0?hn:jr):o.last_lit&&(ar(o,!1),o.strm.avail_out===0)?Gt:kt}function Gi(o,ue){for(var ge,y,Y,oe,At=o.window;;){if(o.lookahead<=Ze){if(an(o),o.lookahead<=Ze&&ue===s)return Gt;if(o.lookahead===0)break}if(o.match_length=0,o.lookahead>=Me&&o.strstart>0&&(Y=o.strstart-1,y=At[Y],y===At[++Y]&&y===At[++Y]&&y===At[++Y])){oe=o.strstart+Ze;do;while(y===At[++Y]&&y===At[++Y]&&y===At[++Y]&&y===At[++Y]&&y===At[++Y]&&y===At[++Y]&&y===At[++Y]&&y===At[++Y]&&Y<oe);o.match_length=Ze-(oe-Y),o.match_length>o.lookahead&&(o.match_length=o.lookahead)}if(o.match_length>=Me?(ge=n._tr_tally(o,1,o.match_length-Me),o.lookahead-=o.match_length,o.strstart+=o.match_length,o.match_length=0):(ge=n._tr_tally(o,0,o.window[o.strstart]),o.lookahead--,o.strstart++),ge&&(ar(o,!1),o.strm.avail_out===0))return Gt}return o.insert=0,ue===v?(ar(o,!0),o.strm.avail_out===0?hn:jr):o.last_lit&&(ar(o,!1),o.strm.avail_out===0)?Gt:kt}function Bn(o,ue){for(var ge;;){if(o.lookahead===0&&(an(o),o.lookahead===0)){if(ue===s)return Gt;break}if(o.match_length=0,ge=n._tr_tally(o,0,o.window[o.strstart]),o.lookahead--,o.strstart++,ge&&(ar(o,!1),o.strm.avail_out===0))return Gt}return o.insert=0,ue===v?(ar(o,!0),o.strm.avail_out===0?hn:jr):o.last_lit&&(ar(o,!1),o.strm.avail_out===0)?Gt:kt}function Er(o,ue,ge,y,Y){this.good_length=o,this.max_lazy=ue,this.nice_length=ge,this.max_chain=y,this.func=Y}var Dn;Dn=[new Er(0,0,0,0,w),new Er(4,4,8,4,li),new Er(4,5,16,8,li),new Er(4,6,32,32,li),new Er(4,4,16,16,dn),new Er(8,16,32,32,dn),new Er(8,16,128,128,dn),new Er(8,32,128,256,dn),new Er(32,128,258,1024,dn),new Er(32,258,258,4096,dn)];function Pn(o){o.window_size=2*o.w_size,Zr(o.head),o.max_lazy_match=Dn[o.level].max_lazy,o.good_match=Dn[o.level].good_length,o.nice_match=Dn[o.level].nice_length,o.max_chain_length=Dn[o.level].max_chain,o.strstart=0,o.block_start=0,o.lookahead=0,o.insert=0,o.match_length=o.prev_length=Me-1,o.match_available=0,o.ins_h=0}function A(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=we,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new t.Buf16(Ct*2),this.dyn_dtree=new t.Buf16((2*tt+1)*2),this.bl_tree=new t.Buf16((2*Le+1)*2),Zr(this.dyn_ltree),Zr(this.dyn_dtree),Zr(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new t.Buf16(bt+1),this.heap=new t.Buf16(2*ft+1),Zr(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new t.Buf16(2*ft+1),Zr(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Ue(o){var ue;return!o||!o.state?Br(o,F):(o.total_in=o.total_out=0,o.data_type=_e,ue=o.state,ue.pending=0,ue.pending_out=0,ue.wrap<0&&(ue.wrap=-ue.wrap),ue.status=ue.wrap?Wt:Kt,o.adler=ue.wrap===2?0:1,ue.last_flush=s,n._tr_init(ue),k)}function Xe(o){var ue=Ue(o);return ue===k&&Pn(o.state),ue}function dt(o,ue){return!o||!o.state||o.state.wrap!==2?F:(o.state.gzhead=ue,k)}function z(o,ue,ge,y,Y,oe){if(!o)return F;var At=1;if(ue===de&&(ue=6),y<0?(At=0,y=-y):y>15&&(At=2,y-=16),Y<1||Y>ee||ge!==we||y<8||y>15||ue<0||ue>9||oe<0||oe>te)return Br(o,F);y===8&&(y=9);var it=new A;return o.state=it,it.strm=o,it.wrap=At,it.gzhead=null,it.w_bits=y,it.w_size=1<<it.w_bits,it.w_mask=it.w_size-1,it.hash_bits=Y+7,it.hash_size=1<<it.hash_bits,it.hash_mask=it.hash_size-1,it.hash_shift=~~((it.hash_bits+Me-1)/Me),it.window=new t.Buf8(it.w_size*2),it.head=new t.Buf16(it.hash_size),it.prev=new t.Buf16(it.w_size),it.lit_bufsize=1<<Y+6,it.pending_buf_size=it.lit_bufsize*4,it.pending_buf=new t.Buf8(it.pending_buf_size),it.d_buf=1*it.lit_bufsize,it.l_buf=(1+2)*it.lit_bufsize,it.level=ue,it.strategy=oe,it.method=ge,Xe(o)}function xe(o,ue){return z(o,ue,we,Ce,ut,ce)}function p(o,ue){var ge,y,Y,oe;if(!o||!o.state||ue>M||ue<0)return o?Br(o,F):F;if(y=o.state,!o.output||!o.input&&o.avail_in!==0||y.status===wr&&ue!==v)return Br(o,o.avail_out===0?S:F);if(y.strm=o,ge=y.last_flush,y.last_flush=ue,y.status===Wt)if(y.wrap===2)o.adler=0,Nt(y,31),Nt(y,139),Nt(y,8),y.gzhead?(Nt(y,(y.gzhead.text?1:0)+(y.gzhead.hcrc?2:0)+(y.gzhead.extra?4:0)+(y.gzhead.name?8:0)+(y.gzhead.comment?16:0)),Nt(y,y.gzhead.time&255),Nt(y,y.gzhead.time>>8&255),Nt(y,y.gzhead.time>>16&255),Nt(y,y.gzhead.time>>24&255),Nt(y,y.level===9?2:y.strategy>=I||y.level<2?4:0),Nt(y,y.gzhead.os&255),y.gzhead.extra&&y.gzhead.extra.length&&(Nt(y,y.gzhead.extra.length&255),Nt(y,y.gzhead.extra.length>>8&255)),y.gzhead.hcrc&&(o.adler=f(o.adler,y.pending_buf,y.pending,0)),y.gzindex=0,y.status=Qt):(Nt(y,0),Nt(y,0),Nt(y,0),Nt(y,0),Nt(y,0),Nt(y,y.level===9?2:y.strategy>=I||y.level<2?4:0),Nt(y,Ft),y.status=Kt);else{var At=we+(y.w_bits-8<<4)<<8,it=-1;y.strategy>=I||y.level<2?it=0:y.level<6?it=1:y.level===6?it=2:it=3,At|=it<<6,y.strstart!==0&&(At|=$t),At+=31-At%31,y.status=Kt,En(y,At),y.strstart!==0&&(En(y,o.adler>>>16),En(y,o.adler&65535)),o.adler=1}if(y.status===Qt)if(y.gzhead.extra){for(Y=y.pending;y.gzindex<(y.gzhead.extra.length&65535)&&!(y.pending===y.pending_buf_size&&(y.gzhead.hcrc&&y.pending>Y&&(o.adler=f(o.adler,y.pending_buf,y.pending-Y,Y)),Qr(o),Y=y.pending,y.pending===y.pending_buf_size));)Nt(y,y.gzhead.extra[y.gzindex]&255),y.gzindex++;y.gzhead.hcrc&&y.pending>Y&&(o.adler=f(o.adler,y.pending_buf,y.pending-Y,Y)),y.gzindex===y.gzhead.extra.length&&(y.gzindex=0,y.status=sr)}else y.status=sr;if(y.status===sr)if(y.gzhead.name){Y=y.pending;do{if(y.pending===y.pending_buf_size&&(y.gzhead.hcrc&&y.pending>Y&&(o.adler=f(o.adler,y.pending_buf,y.pending-Y,Y)),Qr(o),Y=y.pending,y.pending===y.pending_buf_size)){oe=1;break}y.gzindex<y.gzhead.name.length?oe=y.gzhead.name.charCodeAt(y.gzindex++)&255:oe=0,Nt(y,oe)}while(oe!==0);y.gzhead.hcrc&&y.pending>Y&&(o.adler=f(o.adler,y.pending_buf,y.pending-Y,Y)),oe===0&&(y.gzindex=0,y.status=xr)}else y.status=xr;if(y.status===xr)if(y.gzhead.comment){Y=y.pending;do{if(y.pending===y.pending_buf_size&&(y.gzhead.hcrc&&y.pending>Y&&(o.adler=f(o.adler,y.pending_buf,y.pending-Y,Y)),Qr(o),Y=y.pending,y.pending===y.pending_buf_size)){oe=1;break}y.gzindex<y.gzhead.comment.length?oe=y.gzhead.comment.charCodeAt(y.gzindex++)&255:oe=0,Nt(y,oe)}while(oe!==0);y.gzhead.hcrc&&y.pending>Y&&(o.adler=f(o.adler,y.pending_buf,y.pending-Y,Y)),oe===0&&(y.status=or)}else y.status=or;if(y.status===or&&(y.gzhead.hcrc?(y.pending+2>y.pending_buf_size&&Qr(o),y.pending+2<=y.pending_buf_size&&(Nt(y,o.adler&255),Nt(y,o.adler>>8&255),o.adler=0,y.status=Kt)):y.status=Kt),y.pending!==0){if(Qr(o),o.avail_out===0)return y.last_flush=-1,k}else if(o.avail_in===0&&Ir(ue)<=Ir(ge)&&ue!==v)return Br(o,S);if(y.status===wr&&o.avail_in!==0)return Br(o,S);if(o.avail_in!==0||y.lookahead!==0||ue!==s&&y.status!==wr){var mt=y.strategy===I?Bn(y,ue):y.strategy===U?Gi(y,ue):Dn[y.level].func(y,ue);if((mt===hn||mt===jr)&&(y.status=wr),mt===Gt||mt===hn)return o.avail_out===0&&(y.last_flush=-1),k;if(mt===kt&&(ue===u?n._tr_align(y):ue!==M&&(n._tr_stored_block(y,0,0,!1),ue===d&&(Zr(y.head),y.lookahead===0&&(y.strstart=0,y.block_start=0,y.insert=0))),Qr(o),o.avail_out===0))return y.last_flush=-1,k}return ue!==v?k:y.wrap<=0?g:(y.wrap===2?(Nt(y,o.adler&255),Nt(y,o.adler>>8&255),Nt(y,o.adler>>16&255),Nt(y,o.adler>>24&255),Nt(y,o.total_in&255),Nt(y,o.total_in>>8&255),Nt(y,o.total_in>>16&255),Nt(y,o.total_in>>24&255)):(En(y,o.adler>>>16),En(y,o.adler&65535)),Qr(o),y.wrap>0&&(y.wrap=-y.wrap),y.pending!==0?k:g)}function He(o){var ue;return!o||!o.state?F:(ue=o.state.status,ue!==Wt&&ue!==Qt&&ue!==sr&&ue!==xr&&ue!==or&&ue!==Kt&&ue!==wr?Br(o,F):(o.state=null,ue===Kt?Br(o,$):k))}function Bt(o,ue){var ge=ue.length,y,Y,oe,At,it,mt,lr,ui;if(!o||!o.state||(y=o.state,At=y.wrap,At===2||At===1&&y.status!==Wt||y.lookahead))return F;for(At===1&&(o.adler=i(o.adler,ue,ge,0)),y.wrap=0,ge>=y.w_size&&(At===0&&(Zr(y.head),y.strstart=0,y.block_start=0,y.insert=0),ui=new t.Buf8(y.w_size),t.arraySet(ui,ue,ge-y.w_size,y.w_size,0),ue=ui,ge=y.w_size),it=o.avail_in,mt=o.next_in,lr=o.input,o.avail_in=ge,o.next_in=0,o.input=ue,an(y);y.lookahead>=Me;){Y=y.strstart,oe=y.lookahead-(Me-1);do y.ins_h=(y.ins_h<<y.hash_shift^y.window[Y+Me-1])&y.hash_mask,y.prev[Y&y.w_mask]=y.head[y.ins_h],y.head[y.ins_h]=Y,Y++;while(--oe);y.strstart=Y,y.lookahead=Me-1,an(y)}return y.strstart+=y.lookahead,y.block_start=y.strstart,y.insert=y.lookahead,y.lookahead=0,y.match_length=y.prev_length=Me-1,y.match_available=0,o.next_in=mt,o.input=lr,o.avail_in=it,y.wrap=At,k}return Pi.deflateInit=xe,Pi.deflateInit2=z,Pi.deflateReset=Xe,Pi.deflateResetKeep=Ue,Pi.deflateSetHeader=dt,Pi.deflate=p,Pi.deflateEnd=He,Pi.deflateSetDictionary=Bt,Pi.deflateInfo="pako deflate (from Nodeca project)",Pi}var jf={},Tv;function Ev(){if(Tv)return jf;Tv=1;var t=gf(),n=!0,i=!0;try{String.fromCharCode.apply(null,[0])}catch{n=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{i=!1}for(var f=new t.Buf8(256),h=0;h<256;h++)f[h]=h>=252?6:h>=248?5:h>=240?4:h>=224?3:h>=192?2:1;f[254]=f[254]=1,jf.string2buf=function(u){var d,v,M,k,g,F=u.length,$=0;for(k=0;k<F;k++)v=u.charCodeAt(k),(v&64512)===55296&&k+1<F&&(M=u.charCodeAt(k+1),(M&64512)===56320&&(v=65536+(v-55296<<10)+(M-56320),k++)),$+=v<128?1:v<2048?2:v<65536?3:4;for(d=new t.Buf8($),g=0,k=0;g<$;k++)v=u.charCodeAt(k),(v&64512)===55296&&k+1<F&&(M=u.charCodeAt(k+1),(M&64512)===56320&&(v=65536+(v-55296<<10)+(M-56320),k++)),v<128?d[g++]=v:v<2048?(d[g++]=192|v>>>6,d[g++]=128|v&63):v<65536?(d[g++]=224|v>>>12,d[g++]=128|v>>>6&63,d[g++]=128|v&63):(d[g++]=240|v>>>18,d[g++]=128|v>>>12&63,d[g++]=128|v>>>6&63,d[g++]=128|v&63);return d};function s(u,d){if(d<65534&&(u.subarray&&i||!u.subarray&&n))return String.fromCharCode.apply(null,t.shrinkBuf(u,d));for(var v="",M=0;M<d;M++)v+=String.fromCharCode(u[M]);return v}return jf.buf2binstring=function(u){return s(u,u.length)},jf.binstring2buf=function(u){for(var d=new t.Buf8(u.length),v=0,M=d.length;v<M;v++)d[v]=u.charCodeAt(v);return d},jf.buf2string=function(u,d){var v,M,k,g,F=d||u.length,$=new Array(F*2);for(M=0,v=0;v<F;){if(k=u[v++],k<128){$[M++]=k;continue}if(g=f[k],g>4){$[M++]=65533,v+=g-1;continue}for(k&=g===2?31:g===3?15:7;g>1&&v<F;)k=k<<6|u[v++]&63,g--;if(g>1){$[M++]=65533;continue}k<65536?$[M++]=k:(k-=65536,$[M++]=55296|k>>10&1023,$[M++]=56320|k&1023)}return s($,M)},jf.utf8border=function(u,d){var v;for(d=d||u.length,d>u.length&&(d=u.length),v=d-1;v>=0&&(u[v]&192)===128;)v--;return v<0||v===0?d:v+f[u[v]]>d?v:d},jf}var Th,Av;function Dv(){if(Av)return Th;Av=1;function t(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}return Th=t,Th}var Lv;function py(){if(Lv)return Hs;Lv=1;var t=_y(),n=gf(),i=Ev(),f=Sh(),h=Dv(),s=Object.prototype.toString,u=0,d=4,v=0,M=1,k=2,g=-1,F=0,$=8;function S(U){if(!(this instanceof S))return new S(U);this.options=n.assign({level:g,method:$,chunkSize:16384,windowBits:15,memLevel:8,strategy:F,to:""},U||{});var te=this.options;te.raw&&te.windowBits>0?te.windowBits=-te.windowBits:te.gzip&&te.windowBits>0&&te.windowBits<16&&(te.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new h,this.strm.avail_out=0;var ce=t.deflateInit2(this.strm,te.level,te.method,te.windowBits,te.memLevel,te.strategy);if(ce!==v)throw new Error(f[ce]);if(te.header&&t.deflateSetHeader(this.strm,te.header),te.dictionary){var _e;if(typeof te.dictionary=="string"?_e=i.string2buf(te.dictionary):s.call(te.dictionary)==="[object ArrayBuffer]"?_e=new Uint8Array(te.dictionary):_e=te.dictionary,ce=t.deflateSetDictionary(this.strm,_e),ce!==v)throw new Error(f[ce]);this._dict_set=!0}}S.prototype.push=function(U,te){var ce=this.strm,_e=this.options.chunkSize,we,ee;if(this.ended)return!1;ee=te===~~te?te:te===!0?d:u,typeof U=="string"?ce.input=i.string2buf(U):s.call(U)==="[object ArrayBuffer]"?ce.input=new Uint8Array(U):ce.input=U,ce.next_in=0,ce.avail_in=ce.input.length;do{if(ce.avail_out===0&&(ce.output=new n.Buf8(_e),ce.next_out=0,ce.avail_out=_e),we=t.deflate(ce,ee),we!==M&&we!==v)return this.onEnd(we),this.ended=!0,!1;(ce.avail_out===0||ce.avail_in===0&&(ee===d||ee===k))&&(this.options.to==="string"?this.onData(i.buf2binstring(n.shrinkBuf(ce.output,ce.next_out))):this.onData(n.shrinkBuf(ce.output,ce.next_out)))}while((ce.avail_in>0||ce.avail_out===0)&&we!==M);return ee===d?(we=t.deflateEnd(this.strm),this.onEnd(we),this.ended=!0,we===v):(ee===k&&(this.onEnd(v),ce.avail_out=0),!0)},S.prototype.onData=function(U){this.chunks.push(U)},S.prototype.onEnd=function(U){U===v&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=n.flattenChunks(this.chunks)),this.chunks=[],this.err=U,this.msg=this.strm.msg};function de(U,te){var ce=new S(te);if(ce.push(U,!0),ce.err)throw ce.msg||f[ce.err];return ce.result}function se(U,te){return te=te||{},te.raw=!0,de(U,te)}function I(U,te){return te=te||{},te.gzip=!0,de(U,te)}return Hs.Deflate=S,Hs.deflate=de,Hs.deflateRaw=se,Hs.gzip=I,Hs}var zs={},Ai={},Eh,Ov;function my(){if(Ov)return Eh;Ov=1;var t=30,n=12;return Eh=function(f,h){var s,u,d,v,M,k,g,F,$,S,de,se,I,U,te,ce,_e,we,ee,Ce,ut,ct,nt,ft,tt;s=f.state,u=f.next_in,ft=f.input,d=u+(f.avail_in-5),v=f.next_out,tt=f.output,M=v-(h-f.avail_out),k=v+(f.avail_out-257),g=s.dmax,F=s.wsize,$=s.whave,S=s.wnext,de=s.window,se=s.hold,I=s.bits,U=s.lencode,te=s.distcode,ce=(1<<s.lenbits)-1,_e=(1<<s.distbits)-1;e:do{I<15&&(se+=ft[u++]<<I,I+=8,se+=ft[u++]<<I,I+=8),we=U[se&ce];t:for(;;){if(ee=we>>>24,se>>>=ee,I-=ee,ee=we>>>16&255,ee===0)tt[v++]=we&65535;else if(ee&16){Ce=we&65535,ee&=15,ee&&(I<ee&&(se+=ft[u++]<<I,I+=8),Ce+=se&(1<<ee)-1,se>>>=ee,I-=ee),I<15&&(se+=ft[u++]<<I,I+=8,se+=ft[u++]<<I,I+=8),we=te[se&_e];r:for(;;){if(ee=we>>>24,se>>>=ee,I-=ee,ee=we>>>16&255,ee&16){if(ut=we&65535,ee&=15,I<ee&&(se+=ft[u++]<<I,I+=8,I<ee&&(se+=ft[u++]<<I,I+=8)),ut+=se&(1<<ee)-1,ut>g){f.msg="invalid distance too far back",s.mode=t;break e}if(se>>>=ee,I-=ee,ee=v-M,ut>ee){if(ee=ut-ee,ee>$&&s.sane){f.msg="invalid distance too far back",s.mode=t;break e}if(ct=0,nt=de,S===0){if(ct+=F-ee,ee<Ce){Ce-=ee;do tt[v++]=de[ct++];while(--ee);ct=v-ut,nt=tt}}else if(S<ee){if(ct+=F+S-ee,ee-=S,ee<Ce){Ce-=ee;do tt[v++]=de[ct++];while(--ee);if(ct=0,S<Ce){ee=S,Ce-=ee;do tt[v++]=de[ct++];while(--ee);ct=v-ut,nt=tt}}}else if(ct+=S-ee,ee<Ce){Ce-=ee;do tt[v++]=de[ct++];while(--ee);ct=v-ut,nt=tt}for(;Ce>2;)tt[v++]=nt[ct++],tt[v++]=nt[ct++],tt[v++]=nt[ct++],Ce-=3;Ce&&(tt[v++]=nt[ct++],Ce>1&&(tt[v++]=nt[ct++]))}else{ct=v-ut;do tt[v++]=tt[ct++],tt[v++]=tt[ct++],tt[v++]=tt[ct++],Ce-=3;while(Ce>2);Ce&&(tt[v++]=tt[ct++],Ce>1&&(tt[v++]=tt[ct++]))}}else if((ee&64)===0){we=te[(we&65535)+(se&(1<<ee)-1)];continue r}else{f.msg="invalid distance code",s.mode=t;break e}break}}else if((ee&64)===0){we=U[(we&65535)+(se&(1<<ee)-1)];continue t}else if(ee&32){s.mode=n;break e}else{f.msg="invalid literal/length code",s.mode=t;break e}break}}while(u<d&&v<k);Ce=I>>3,u-=Ce,I-=Ce<<3,se&=(1<<I)-1,f.next_in=u,f.next_out=v,f.avail_in=u<d?5+(d-u):5-(u-d),f.avail_out=v<k?257+(k-v):257-(v-k),s.hold=se,s.bits=I},Eh}var Ah,Rv;function gy(){if(Rv)return Ah;Rv=1;var t=gf(),n=15,i=852,f=592,h=0,s=1,u=2,d=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],v=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],M=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],k=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];return Ah=function(F,$,S,de,se,I,U,te){var ce=te.bits,_e=0,we=0,ee=0,Ce=0,ut=0,ct=0,nt=0,ft=0,tt=0,Le=0,Ct,bt,Me,Ze,St,$t=null,Wt=0,Qt,sr=new t.Buf16(n+1),xr=new t.Buf16(n+1),or=null,Kt=0,wr,Gt,kt;for(_e=0;_e<=n;_e++)sr[_e]=0;for(we=0;we<de;we++)sr[$[S+we]]++;for(ut=ce,Ce=n;Ce>=1&&sr[Ce]===0;Ce--);if(ut>Ce&&(ut=Ce),Ce===0)return se[I++]=1<<24|64<<16|0,se[I++]=1<<24|64<<16|0,te.bits=1,0;for(ee=1;ee<Ce&&sr[ee]===0;ee++);for(ut<ee&&(ut=ee),ft=1,_e=1;_e<=n;_e++)if(ft<<=1,ft-=sr[_e],ft<0)return-1;if(ft>0&&(F===h||Ce!==1))return-1;for(xr[1]=0,_e=1;_e<n;_e++)xr[_e+1]=xr[_e]+sr[_e];for(we=0;we<de;we++)$[S+we]!==0&&(U[xr[$[S+we]]++]=we);if(F===h?($t=or=U,Qt=19):F===s?($t=d,Wt-=257,or=v,Kt-=257,Qt=256):($t=M,or=k,Qt=-1),Le=0,we=0,_e=ee,St=I,ct=ut,nt=0,Me=-1,tt=1<<ut,Ze=tt-1,F===s&&tt>i||F===u&&tt>f)return 1;for(;;){wr=_e-nt,U[we]<Qt?(Gt=0,kt=U[we]):U[we]>Qt?(Gt=or[Kt+U[we]],kt=$t[Wt+U[we]]):(Gt=32+64,kt=0),Ct=1<<_e-nt,bt=1<<ct,ee=bt;do bt-=Ct,se[St+(Le>>nt)+bt]=wr<<24|Gt<<16|kt|0;while(bt!==0);for(Ct=1<<_e-1;Le&Ct;)Ct>>=1;if(Ct!==0?(Le&=Ct-1,Le+=Ct):Le=0,we++,--sr[_e]===0){if(_e===Ce)break;_e=$[S+U[we]]}if(_e>ut&&(Le&Ze)!==Me){for(nt===0&&(nt=ut),St+=ee,ct=_e-nt,ft=1<<ct;ct+nt<Ce&&(ft-=sr[ct+nt],!(ft<=0));)ct++,ft<<=1;if(tt+=1<<ct,F===s&&tt>i||F===u&&tt>f)return 1;Me=Le&Ze,se[Me]=ut<<24|ct<<16|St-I|0}}return Le!==0&&(se[St+Le]=_e-nt<<24|64<<16|0),te.bits=ut,0},Ah}var Cv;function yy(){if(Cv)return Ai;Cv=1;var t=gf(),n=yv(),i=xv(),f=my(),h=gy(),s=0,u=1,d=2,v=4,M=5,k=6,g=0,F=1,$=2,S=-2,de=-3,se=-4,I=-5,U=8,te=1,ce=2,_e=3,we=4,ee=5,Ce=6,ut=7,ct=8,nt=9,ft=10,tt=11,Le=12,Ct=13,bt=14,Me=15,Ze=16,St=17,$t=18,Wt=19,Qt=20,sr=21,xr=22,or=23,Kt=24,wr=25,Gt=26,kt=27,hn=28,jr=29,Ft=30,Br=31,Ir=32,Zr=852,Qr=592,ar=15,Nt=ar;function En(z){return(z>>>24&255)+(z>>>8&65280)+((z&65280)<<8)+((z&255)<<24)}function An(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new t.Buf16(320),this.work=new t.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Jr(z){var xe;return!z||!z.state?S:(xe=z.state,z.total_in=z.total_out=xe.total=0,z.msg="",xe.wrap&&(z.adler=xe.wrap&1),xe.mode=te,xe.last=0,xe.havedict=0,xe.dmax=32768,xe.head=null,xe.hold=0,xe.bits=0,xe.lencode=xe.lendyn=new t.Buf32(Zr),xe.distcode=xe.distdyn=new t.Buf32(Qr),xe.sane=1,xe.back=-1,g)}function an(z){var xe;return!z||!z.state?S:(xe=z.state,xe.wsize=0,xe.whave=0,xe.wnext=0,Jr(z))}function w(z,xe){var p,He;return!z||!z.state||(He=z.state,xe<0?(p=0,xe=-xe):(p=(xe>>4)+1,xe<48&&(xe&=15)),xe&&(xe<8||xe>15))?S:(He.window!==null&&He.wbits!==xe&&(He.window=null),He.wrap=p,He.wbits=xe,an(z))}function li(z,xe){var p,He;return z?(He=new An,z.state=He,He.window=null,p=w(z,xe),p!==g&&(z.state=null),p):S}function dn(z){return li(z,Nt)}var Gi=!0,Bn,Er;function Dn(z){if(Gi){var xe;for(Bn=new t.Buf32(512),Er=new t.Buf32(32),xe=0;xe<144;)z.lens[xe++]=8;for(;xe<256;)z.lens[xe++]=9;for(;xe<280;)z.lens[xe++]=7;for(;xe<288;)z.lens[xe++]=8;for(h(u,z.lens,0,288,Bn,0,z.work,{bits:9}),xe=0;xe<32;)z.lens[xe++]=5;h(d,z.lens,0,32,Er,0,z.work,{bits:5}),Gi=!1}z.lencode=Bn,z.lenbits=9,z.distcode=Er,z.distbits=5}function Pn(z,xe,p,He){var Bt,o=z.state;return o.window===null&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new t.Buf8(o.wsize)),He>=o.wsize?(t.arraySet(o.window,xe,p-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(Bt=o.wsize-o.wnext,Bt>He&&(Bt=He),t.arraySet(o.window,xe,p-He,Bt,o.wnext),He-=Bt,He?(t.arraySet(o.window,xe,p-He,He,0),o.wnext=He,o.whave=o.wsize):(o.wnext+=Bt,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=Bt))),0}function A(z,xe){var p,He,Bt,o,ue,ge,y,Y,oe,At,it,mt,lr,ui,Fr=0,hr,Yr,vn,Ln,Ra,Ca,jt,Hn,fn=new t.Buf8(4),ci,$n,Ws=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!z||!z.state||!z.output||!z.input&&z.avail_in!==0)return S;p=z.state,p.mode===Le&&(p.mode=Ct),ue=z.next_out,Bt=z.output,y=z.avail_out,o=z.next_in,He=z.input,ge=z.avail_in,Y=p.hold,oe=p.bits,At=ge,it=y,Hn=g;e:for(;;)switch(p.mode){case te:if(p.wrap===0){p.mode=Ct;break}for(;oe<16;){if(ge===0)break e;ge--,Y+=He[o++]<<oe,oe+=8}if(p.wrap&2&&Y===35615){p.check=0,fn[0]=Y&255,fn[1]=Y>>>8&255,p.check=i(p.check,fn,2,0),Y=0,oe=0,p.mode=ce;break}if(p.flags=0,p.head&&(p.head.done=!1),!(p.wrap&1)||(((Y&255)<<8)+(Y>>8))%31){z.msg="incorrect header check",p.mode=Ft;break}if((Y&15)!==U){z.msg="unknown compression method",p.mode=Ft;break}if(Y>>>=4,oe-=4,jt=(Y&15)+8,p.wbits===0)p.wbits=jt;else if(jt>p.wbits){z.msg="invalid window size",p.mode=Ft;break}p.dmax=1<<jt,z.adler=p.check=1,p.mode=Y&512?ft:Le,Y=0,oe=0;break;case ce:for(;oe<16;){if(ge===0)break e;ge--,Y+=He[o++]<<oe,oe+=8}if(p.flags=Y,(p.flags&255)!==U){z.msg="unknown compression method",p.mode=Ft;break}if(p.flags&57344){z.msg="unknown header flags set",p.mode=Ft;break}p.head&&(p.head.text=Y>>8&1),p.flags&512&&(fn[0]=Y&255,fn[1]=Y>>>8&255,p.check=i(p.check,fn,2,0)),Y=0,oe=0,p.mode=_e;case _e:for(;oe<32;){if(ge===0)break e;ge--,Y+=He[o++]<<oe,oe+=8}p.head&&(p.head.time=Y),p.flags&512&&(fn[0]=Y&255,fn[1]=Y>>>8&255,fn[2]=Y>>>16&255,fn[3]=Y>>>24&255,p.check=i(p.check,fn,4,0)),Y=0,oe=0,p.mode=we;case we:for(;oe<16;){if(ge===0)break e;ge--,Y+=He[o++]<<oe,oe+=8}p.head&&(p.head.xflags=Y&255,p.head.os=Y>>8),p.flags&512&&(fn[0]=Y&255,fn[1]=Y>>>8&255,p.check=i(p.check,fn,2,0)),Y=0,oe=0,p.mode=ee;case ee:if(p.flags&1024){for(;oe<16;){if(ge===0)break e;ge--,Y+=He[o++]<<oe,oe+=8}p.length=Y,p.head&&(p.head.extra_len=Y),p.flags&512&&(fn[0]=Y&255,fn[1]=Y>>>8&255,p.check=i(p.check,fn,2,0)),Y=0,oe=0}else p.head&&(p.head.extra=null);p.mode=Ce;case Ce:if(p.flags&1024&&(mt=p.length,mt>ge&&(mt=ge),mt&&(p.head&&(jt=p.head.extra_len-p.length,p.head.extra||(p.head.extra=new Array(p.head.extra_len)),t.arraySet(p.head.extra,He,o,mt,jt)),p.flags&512&&(p.check=i(p.check,He,mt,o)),ge-=mt,o+=mt,p.length-=mt),p.length))break e;p.length=0,p.mode=ut;case ut:if(p.flags&2048){if(ge===0)break e;mt=0;do jt=He[o+mt++],p.head&&jt&&p.length<65536&&(p.head.name+=String.fromCharCode(jt));while(jt&&mt<ge);if(p.flags&512&&(p.check=i(p.check,He,mt,o)),ge-=mt,o+=mt,jt)break e}else p.head&&(p.head.name=null);p.length=0,p.mode=ct;case ct:if(p.flags&4096){if(ge===0)break e;mt=0;do jt=He[o+mt++],p.head&&jt&&p.length<65536&&(p.head.comment+=String.fromCharCode(jt));while(jt&&mt<ge);if(p.flags&512&&(p.check=i(p.check,He,mt,o)),ge-=mt,o+=mt,jt)break e}else p.head&&(p.head.comment=null);p.mode=nt;case nt:if(p.flags&512){for(;oe<16;){if(ge===0)break e;ge--,Y+=He[o++]<<oe,oe+=8}if(Y!==(p.check&65535)){z.msg="header crc mismatch",p.mode=Ft;break}Y=0,oe=0}p.head&&(p.head.hcrc=p.flags>>9&1,p.head.done=!0),z.adler=p.check=0,p.mode=Le;break;case ft:for(;oe<32;){if(ge===0)break e;ge--,Y+=He[o++]<<oe,oe+=8}z.adler=p.check=En(Y),Y=0,oe=0,p.mode=tt;case tt:if(p.havedict===0)return z.next_out=ue,z.avail_out=y,z.next_in=o,z.avail_in=ge,p.hold=Y,p.bits=oe,$;z.adler=p.check=1,p.mode=Le;case Le:if(xe===M||xe===k)break e;case Ct:if(p.last){Y>>>=oe&7,oe-=oe&7,p.mode=kt;break}for(;oe<3;){if(ge===0)break e;ge--,Y+=He[o++]<<oe,oe+=8}switch(p.last=Y&1,Y>>>=1,oe-=1,Y&3){case 0:p.mode=bt;break;case 1:if(Dn(p),p.mode=Qt,xe===k){Y>>>=2,oe-=2;break e}break;case 2:p.mode=St;break;case 3:z.msg="invalid block type",p.mode=Ft}Y>>>=2,oe-=2;break;case bt:for(Y>>>=oe&7,oe-=oe&7;oe<32;){if(ge===0)break e;ge--,Y+=He[o++]<<oe,oe+=8}if((Y&65535)!==(Y>>>16^65535)){z.msg="invalid stored block lengths",p.mode=Ft;break}if(p.length=Y&65535,Y=0,oe=0,p.mode=Me,xe===k)break e;case Me:p.mode=Ze;case Ze:if(mt=p.length,mt){if(mt>ge&&(mt=ge),mt>y&&(mt=y),mt===0)break e;t.arraySet(Bt,He,o,mt,ue),ge-=mt,o+=mt,y-=mt,ue+=mt,p.length-=mt;break}p.mode=Le;break;case St:for(;oe<14;){if(ge===0)break e;ge--,Y+=He[o++]<<oe,oe+=8}if(p.nlen=(Y&31)+257,Y>>>=5,oe-=5,p.ndist=(Y&31)+1,Y>>>=5,oe-=5,p.ncode=(Y&15)+4,Y>>>=4,oe-=4,p.nlen>286||p.ndist>30){z.msg="too many length or distance symbols",p.mode=Ft;break}p.have=0,p.mode=$t;case $t:for(;p.have<p.ncode;){for(;oe<3;){if(ge===0)break e;ge--,Y+=He[o++]<<oe,oe+=8}p.lens[Ws[p.have++]]=Y&7,Y>>>=3,oe-=3}for(;p.have<19;)p.lens[Ws[p.have++]]=0;if(p.lencode=p.lendyn,p.lenbits=7,ci={bits:p.lenbits},Hn=h(s,p.lens,0,19,p.lencode,0,p.work,ci),p.lenbits=ci.bits,Hn){z.msg="invalid code lengths set",p.mode=Ft;break}p.have=0,p.mode=Wt;case Wt:for(;p.have<p.nlen+p.ndist;){for(;Fr=p.lencode[Y&(1<<p.lenbits)-1],hr=Fr>>>24,Yr=Fr>>>16&255,vn=Fr&65535,!(hr<=oe);){if(ge===0)break e;ge--,Y+=He[o++]<<oe,oe+=8}if(vn<16)Y>>>=hr,oe-=hr,p.lens[p.have++]=vn;else{if(vn===16){for($n=hr+2;oe<$n;){if(ge===0)break e;ge--,Y+=He[o++]<<oe,oe+=8}if(Y>>>=hr,oe-=hr,p.have===0){z.msg="invalid bit length repeat",p.mode=Ft;break}jt=p.lens[p.have-1],mt=3+(Y&3),Y>>>=2,oe-=2}else if(vn===17){for($n=hr+3;oe<$n;){if(ge===0)break e;ge--,Y+=He[o++]<<oe,oe+=8}Y>>>=hr,oe-=hr,jt=0,mt=3+(Y&7),Y>>>=3,oe-=3}else{for($n=hr+7;oe<$n;){if(ge===0)break e;ge--,Y+=He[o++]<<oe,oe+=8}Y>>>=hr,oe-=hr,jt=0,mt=11+(Y&127),Y>>>=7,oe-=7}if(p.have+mt>p.nlen+p.ndist){z.msg="invalid bit length repeat",p.mode=Ft;break}for(;mt--;)p.lens[p.have++]=jt}}if(p.mode===Ft)break;if(p.lens[256]===0){z.msg="invalid code -- missing end-of-block",p.mode=Ft;break}if(p.lenbits=9,ci={bits:p.lenbits},Hn=h(u,p.lens,0,p.nlen,p.lencode,0,p.work,ci),p.lenbits=ci.bits,Hn){z.msg="invalid literal/lengths set",p.mode=Ft;break}if(p.distbits=6,p.distcode=p.distdyn,ci={bits:p.distbits},Hn=h(d,p.lens,p.nlen,p.ndist,p.distcode,0,p.work,ci),p.distbits=ci.bits,Hn){z.msg="invalid distances set",p.mode=Ft;break}if(p.mode=Qt,xe===k)break e;case Qt:p.mode=sr;case sr:if(ge>=6&&y>=258){z.next_out=ue,z.avail_out=y,z.next_in=o,z.avail_in=ge,p.hold=Y,p.bits=oe,f(z,it),ue=z.next_out,Bt=z.output,y=z.avail_out,o=z.next_in,He=z.input,ge=z.avail_in,Y=p.hold,oe=p.bits,p.mode===Le&&(p.back=-1);break}for(p.back=0;Fr=p.lencode[Y&(1<<p.lenbits)-1],hr=Fr>>>24,Yr=Fr>>>16&255,vn=Fr&65535,!(hr<=oe);){if(ge===0)break e;ge--,Y+=He[o++]<<oe,oe+=8}if(Yr&&(Yr&240)===0){for(Ln=hr,Ra=Yr,Ca=vn;Fr=p.lencode[Ca+((Y&(1<<Ln+Ra)-1)>>Ln)],hr=Fr>>>24,Yr=Fr>>>16&255,vn=Fr&65535,!(Ln+hr<=oe);){if(ge===0)break e;ge--,Y+=He[o++]<<oe,oe+=8}Y>>>=Ln,oe-=Ln,p.back+=Ln}if(Y>>>=hr,oe-=hr,p.back+=hr,p.length=vn,Yr===0){p.mode=Gt;break}if(Yr&32){p.back=-1,p.mode=Le;break}if(Yr&64){z.msg="invalid literal/length code",p.mode=Ft;break}p.extra=Yr&15,p.mode=xr;case xr:if(p.extra){for($n=p.extra;oe<$n;){if(ge===0)break e;ge--,Y+=He[o++]<<oe,oe+=8}p.length+=Y&(1<<p.extra)-1,Y>>>=p.extra,oe-=p.extra,p.back+=p.extra}p.was=p.length,p.mode=or;case or:for(;Fr=p.distcode[Y&(1<<p.distbits)-1],hr=Fr>>>24,Yr=Fr>>>16&255,vn=Fr&65535,!(hr<=oe);){if(ge===0)break e;ge--,Y+=He[o++]<<oe,oe+=8}if((Yr&240)===0){for(Ln=hr,Ra=Yr,Ca=vn;Fr=p.distcode[Ca+((Y&(1<<Ln+Ra)-1)>>Ln)],hr=Fr>>>24,Yr=Fr>>>16&255,vn=Fr&65535,!(Ln+hr<=oe);){if(ge===0)break e;ge--,Y+=He[o++]<<oe,oe+=8}Y>>>=Ln,oe-=Ln,p.back+=Ln}if(Y>>>=hr,oe-=hr,p.back+=hr,Yr&64){z.msg="invalid distance code",p.mode=Ft;break}p.offset=vn,p.extra=Yr&15,p.mode=Kt;case Kt:if(p.extra){for($n=p.extra;oe<$n;){if(ge===0)break e;ge--,Y+=He[o++]<<oe,oe+=8}p.offset+=Y&(1<<p.extra)-1,Y>>>=p.extra,oe-=p.extra,p.back+=p.extra}if(p.offset>p.dmax){z.msg="invalid distance too far back",p.mode=Ft;break}p.mode=wr;case wr:if(y===0)break e;if(mt=it-y,p.offset>mt){if(mt=p.offset-mt,mt>p.whave&&p.sane){z.msg="invalid distance too far back",p.mode=Ft;break}mt>p.wnext?(mt-=p.wnext,lr=p.wsize-mt):lr=p.wnext-mt,mt>p.length&&(mt=p.length),ui=p.window}else ui=Bt,lr=ue-p.offset,mt=p.length;mt>y&&(mt=y),y-=mt,p.length-=mt;do Bt[ue++]=ui[lr++];while(--mt);p.length===0&&(p.mode=sr);break;case Gt:if(y===0)break e;Bt[ue++]=p.length,y--,p.mode=sr;break;case kt:if(p.wrap){for(;oe<32;){if(ge===0)break e;ge--,Y|=He[o++]<<oe,oe+=8}if(it-=y,z.total_out+=it,p.total+=it,it&&(z.adler=p.check=p.flags?i(p.check,Bt,it,ue-it):n(p.check,Bt,it,ue-it)),it=y,(p.flags?Y:En(Y))!==p.check){z.msg="incorrect data check",p.mode=Ft;break}Y=0,oe=0}p.mode=hn;case hn:if(p.wrap&&p.flags){for(;oe<32;){if(ge===0)break e;ge--,Y+=He[o++]<<oe,oe+=8}if(Y!==(p.total&4294967295)){z.msg="incorrect length check",p.mode=Ft;break}Y=0,oe=0}p.mode=jr;case jr:Hn=F;break e;case Ft:Hn=de;break e;case Br:return se;case Ir:default:return S}return z.next_out=ue,z.avail_out=y,z.next_in=o,z.avail_in=ge,p.hold=Y,p.bits=oe,(p.wsize||it!==z.avail_out&&p.mode<Ft&&(p.mode<kt||xe!==v))&&Pn(z,z.output,z.next_out,it-z.avail_out),At-=z.avail_in,it-=z.avail_out,z.total_in+=At,z.total_out+=it,p.total+=it,p.wrap&&it&&(z.adler=p.check=p.flags?i(p.check,Bt,it,z.next_out-it):n(p.check,Bt,it,z.next_out-it)),z.data_type=p.bits+(p.last?64:0)+(p.mode===Le?128:0)+(p.mode===Qt||p.mode===Me?256:0),(At===0&&it===0||xe===v)&&Hn===g&&(Hn=I),Hn}function Ue(z){if(!z||!z.state)return S;var xe=z.state;return xe.window&&(xe.window=null),z.state=null,g}function Xe(z,xe){var p;return!z||!z.state||(p=z.state,(p.wrap&2)===0)?S:(p.head=xe,xe.done=!1,g)}function dt(z,xe){var p=xe.length,He,Bt,o;return!z||!z.state||(He=z.state,He.wrap!==0&&He.mode!==tt)?S:He.mode===tt&&(Bt=1,Bt=n(Bt,xe,p,0),Bt!==He.check)?de:(o=Pn(z,xe,p,p),o?(He.mode=Br,se):(He.havedict=1,g))}return Ai.inflateReset=an,Ai.inflateReset2=w,Ai.inflateResetKeep=Jr,Ai.inflateInit=dn,Ai.inflateInit2=li,Ai.inflate=A,Ai.inflateEnd=Ue,Ai.inflateGetHeader=Xe,Ai.inflateSetDictionary=dt,Ai.inflateInfo="pako inflate (from Nodeca project)",Ai}var Dh,Mv;function kv(){return Mv||(Mv=1,Dh={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}),Dh}var Lh,Iv;function by(){if(Iv)return Lh;Iv=1;function t(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}return Lh=t,Lh}var Fv;function xy(){if(Fv)return zs;Fv=1;var t=yy(),n=gf(),i=Ev(),f=kv(),h=Sh(),s=Dv(),u=by(),d=Object.prototype.toString;function v(g){if(!(this instanceof v))return new v(g);this.options=n.assign({chunkSize:16384,windowBits:0,to:""},g||{});var F=this.options;F.raw&&F.windowBits>=0&&F.windowBits<16&&(F.windowBits=-F.windowBits,F.windowBits===0&&(F.windowBits=-15)),F.windowBits>=0&&F.windowBits<16&&!(g&&g.windowBits)&&(F.windowBits+=32),F.windowBits>15&&F.windowBits<48&&(F.windowBits&15)===0&&(F.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var $=t.inflateInit2(this.strm,F.windowBits);if($!==f.Z_OK)throw new Error(h[$]);if(this.header=new u,t.inflateGetHeader(this.strm,this.header),F.dictionary&&(typeof F.dictionary=="string"?F.dictionary=i.string2buf(F.dictionary):d.call(F.dictionary)==="[object ArrayBuffer]"&&(F.dictionary=new Uint8Array(F.dictionary)),F.raw&&($=t.inflateSetDictionary(this.strm,F.dictionary),$!==f.Z_OK)))throw new Error(h[$])}v.prototype.push=function(g,F){var $=this.strm,S=this.options.chunkSize,de=this.options.dictionary,se,I,U,te,ce,_e=!1;if(this.ended)return!1;I=F===~~F?F:F===!0?f.Z_FINISH:f.Z_NO_FLUSH,typeof g=="string"?$.input=i.binstring2buf(g):d.call(g)==="[object ArrayBuffer]"?$.input=new Uint8Array(g):$.input=g,$.next_in=0,$.avail_in=$.input.length;do{if($.avail_out===0&&($.output=new n.Buf8(S),$.next_out=0,$.avail_out=S),se=t.inflate($,f.Z_NO_FLUSH),se===f.Z_NEED_DICT&&de&&(se=t.inflateSetDictionary(this.strm,de)),se===f.Z_BUF_ERROR&&_e===!0&&(se=f.Z_OK,_e=!1),se!==f.Z_STREAM_END&&se!==f.Z_OK)return this.onEnd(se),this.ended=!0,!1;$.next_out&&($.avail_out===0||se===f.Z_STREAM_END||$.avail_in===0&&(I===f.Z_FINISH||I===f.Z_SYNC_FLUSH))&&(this.options.to==="string"?(U=i.utf8border($.output,$.next_out),te=$.next_out-U,ce=i.buf2string($.output,U),$.next_out=te,$.avail_out=S-te,te&&n.arraySet($.output,$.output,U,te,0),this.onData(ce)):this.onData(n.shrinkBuf($.output,$.next_out))),$.avail_in===0&&$.avail_out===0&&(_e=!0)}while(($.avail_in>0||$.avail_out===0)&&se!==f.Z_STREAM_END);return se===f.Z_STREAM_END&&(I=f.Z_FINISH),I===f.Z_FINISH?(se=t.inflateEnd(this.strm),this.onEnd(se),this.ended=!0,se===f.Z_OK):(I===f.Z_SYNC_FLUSH&&(this.onEnd(f.Z_OK),$.avail_out=0),!0)},v.prototype.onData=function(g){this.chunks.push(g)},v.prototype.onEnd=function(g){g===f.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=n.flattenChunks(this.chunks)),this.chunks=[],this.err=g,this.msg=this.strm.msg};function M(g,F){var $=new v(F);if($.push(g,!0),$.err)throw $.msg||h[$.err];return $.result}function k(g,F){return F=F||{},F.raw=!0,M(g,F)}return zs.Inflate=v,zs.inflate=M,zs.inflateRaw=k,zs.ungzip=M,zs}var Oh,Nv;function wy(){if(Nv)return Oh;Nv=1;var t=gf().assign,n=py(),i=xy(),f=kv(),h={};return t(h,n,i,f),Oh=h,Oh}(function(t){(function(){var n={},i;t.exports=n,typeof dy=="function"?i=wy():i=window.pako,function(f,h){f.toRGBA8=function(s){var u=s.width,d=s.height;if(s.tabs.acTL==null)return[f.toRGBA8.decodeImage(s.data,u,d,s).buffer];var v=[];s.frames[0].data==null&&(s.frames[0].data=s.data);for(var M,k=new Uint8Array(u*d*4),g=0;g<s.frames.length;g++){var F=s.frames[g],$=F.rect.x,S=F.rect.y,de=F.rect.width,se=F.rect.height,I=f.toRGBA8.decodeImage(F.data,de,se,s);if(g==0?M=I:F.blend==0?f._copyTile(I,de,se,M,u,d,$,S,0):F.blend==1&&f._copyTile(I,de,se,M,u,d,$,S,1),v.push(M.buffer),M=M.slice(0),F.dispose!=0){if(F.dispose==1)f._copyTile(k,de,se,M,u,d,$,S,0);else if(F.dispose==2){for(var U=g-1;s.frames[U].dispose==2;)U--;M=new Uint8Array(v[U]).slice(0)}}}return v},f.toRGBA8.decodeImage=function(s,u,d,v){var M=u*d,k=f.decode._getBPP(v),g=Math.ceil(u*k/8),F=new Uint8Array(M*4),$=new Uint32Array(F.buffer),S=v.ctype,de=v.depth,se=f._bin.readUshort;if(S==6){var I=M<<2;if(de==8)for(var U=0;U<I;U++)F[U]=s[U];if(de==16)for(var U=0;U<I;U++)F[U]=s[U<<1]}else if(S==2){var te=v.tabs.tRNS,ce=-1,_e=-1,we=-1;if(te&&(ce=te[0],_e=te[1],we=te[2]),de==8)for(var U=0;U<M;U++){var ee=U<<2,Ce=U*3;F[ee]=s[Ce],F[ee+1]=s[Ce+1],F[ee+2]=s[Ce+2],F[ee+3]=255,ce!=-1&&s[Ce]==ce&&s[Ce+1]==_e&&s[Ce+2]==we&&(F[ee+3]=0)}if(de==16)for(var U=0;U<M;U++){var ee=U<<2,Ce=U*6;F[ee]=s[Ce],F[ee+1]=s[Ce+2],F[ee+2]=s[Ce+4],F[ee+3]=255,ce!=-1&&se(s,Ce)==ce&&se(s,Ce+2)==_e&&se(s,Ce+4)==we&&(F[ee+3]=0)}}else if(S==3){var ut=v.tabs.PLTE,ct=v.tabs.tRNS,nt=ct?ct.length:0;if(de==1)for(var ft=0;ft<d;ft++)for(var tt=ft*g,Le=ft*u,U=0;U<u;U++){var ee=Le+U<<2,Ct=s[tt+(U>>3)]>>7-((U&7)<<0)&1,bt=3*Ct;F[ee]=ut[bt],F[ee+1]=ut[bt+1],F[ee+2]=ut[bt+2],F[ee+3]=Ct<nt?ct[Ct]:255}if(de==2)for(var ft=0;ft<d;ft++)for(var tt=ft*g,Le=ft*u,U=0;U<u;U++){var ee=Le+U<<2,Ct=s[tt+(U>>2)]>>6-((U&3)<<1)&3,bt=3*Ct;F[ee]=ut[bt],F[ee+1]=ut[bt+1],F[ee+2]=ut[bt+2],F[ee+3]=Ct<nt?ct[Ct]:255}if(de==4)for(var ft=0;ft<d;ft++)for(var tt=ft*g,Le=ft*u,U=0;U<u;U++){var ee=Le+U<<2,Ct=s[tt+(U>>1)]>>4-((U&1)<<2)&15,bt=3*Ct;F[ee]=ut[bt],F[ee+1]=ut[bt+1],F[ee+2]=ut[bt+2],F[ee+3]=Ct<nt?ct[Ct]:255}if(de==8)for(var U=0;U<M;U++){var ee=U<<2,Ct=s[U],bt=3*Ct;F[ee]=ut[bt],F[ee+1]=ut[bt+1],F[ee+2]=ut[bt+2],F[ee+3]=Ct<nt?ct[Ct]:255}}else if(S==4){if(de==8)for(var U=0;U<M;U++){var ee=U<<2,Me=U<<1,Ze=s[Me];F[ee]=Ze,F[ee+1]=Ze,F[ee+2]=Ze,F[ee+3]=s[Me+1]}if(de==16)for(var U=0;U<M;U++){var ee=U<<2,Me=U<<2,Ze=s[Me];F[ee]=Ze,F[ee+1]=Ze,F[ee+2]=Ze,F[ee+3]=s[Me+2]}}else if(S==0){var ce=v.tabs.tRNS?v.tabs.tRNS:-1;if(de==1)for(var U=0;U<M;U++){var Ze=255*(s[U>>3]>>7-(U&7)&1),St=Ze==ce*255?0:255;$[U]=St<<24|Ze<<16|Ze<<8|Ze}if(de==2)for(var U=0;U<M;U++){var Ze=85*(s[U>>2]>>6-((U&3)<<1)&3),St=Ze==ce*85?0:255;$[U]=St<<24|Ze<<16|Ze<<8|Ze}if(de==4)for(var U=0;U<M;U++){var Ze=17*(s[U>>1]>>4-((U&1)<<2)&15),St=Ze==ce*17?0:255;$[U]=St<<24|Ze<<16|Ze<<8|Ze}if(de==8)for(var U=0;U<M;U++){var Ze=s[U],St=Ze==ce?0:255;$[U]=St<<24|Ze<<16|Ze<<8|Ze}if(de==16)for(var U=0;U<M;U++){var Ze=s[U<<1],St=se(s,U<<1)==ce?0:255;$[U]=St<<24|Ze<<16|Ze<<8|Ze}}return F},f.decode=function(s){for(var u=new Uint8Array(s),d=8,v=f._bin,M=v.readUshort,k=v.readUint,g={tabs:{},frames:[]},F=new Uint8Array(u.length),$=0,S,de=0,se=[137,80,78,71,13,10,26,10],I=0;I<8;I++)if(u[I]!=se[I])throw"The input is not a PNG file!";for(;d<u.length;){var U=v.readUint(u,d);d+=4;var te=v.readASCII(u,d,4);if(d+=4,te=="IHDR")f.decode._IHDR(u,d,g);else if(te=="IDAT"){for(var I=0;I<U;I++)F[$+I]=u[d+I];$+=U}else if(te=="acTL")g.tabs[te]={num_frames:k(u,d),num_plays:k(u,d+4)},S=new Uint8Array(u.length);else if(te=="fcTL"){if(de!=0){var ce=g.frames[g.frames.length-1];ce.data=f.decode._decompress(g,S.slice(0,de),ce.rect.width,ce.rect.height),de=0}var _e={x:k(u,d+12),y:k(u,d+16),width:k(u,d+4),height:k(u,d+8)},we=M(u,d+22);we=M(u,d+20)/(we==0?100:we);var ee={rect:_e,delay:Math.round(we*1e3),dispose:u[d+24],blend:u[d+25]};g.frames.push(ee)}else if(te=="fdAT"){for(var I=0;I<U-4;I++)S[de+I]=u[d+I+4];de+=U-4}else if(te=="pHYs")g.tabs[te]=[v.readUint(u,d),v.readUint(u,d+4),u[d+8]];else if(te=="cHRM"){g.tabs[te]=[];for(var I=0;I<8;I++)g.tabs[te].push(v.readUint(u,d+I*4))}else if(te=="tEXt"){g.tabs[te]==null&&(g.tabs[te]={});var Ce=v.nextZero(u,d),ut=v.readASCII(u,d,Ce-d),ct=v.readASCII(u,Ce+1,d+U-Ce-1);g.tabs[te][ut]=ct}else if(te=="iTXt"){g.tabs[te]==null&&(g.tabs[te]={});var Ce=0,nt=d;Ce=v.nextZero(u,nt);var ut=v.readASCII(u,nt,Ce-nt);nt=Ce+1,u[nt],u[nt+1],nt+=2,Ce=v.nextZero(u,nt),v.readASCII(u,nt,Ce-nt),nt=Ce+1,Ce=v.nextZero(u,nt),v.readUTF8(u,nt,Ce-nt),nt=Ce+1;var ct=v.readUTF8(u,nt,U-(nt-d));g.tabs[te][ut]=ct}else if(te=="PLTE")g.tabs[te]=v.readBytes(u,d,U);else if(te=="hIST"){var ft=g.tabs.PLTE.length/3;g.tabs[te]=[];for(var I=0;I<ft;I++)g.tabs[te].push(M(u,d+I*2))}else if(te=="tRNS")g.ctype==3?g.tabs[te]=v.readBytes(u,d,U):g.ctype==0?g.tabs[te]=M(u,d):g.ctype==2&&(g.tabs[te]=[M(u,d),M(u,d+2),M(u,d+4)]);else if(te=="gAMA")g.tabs[te]=v.readUint(u,d)/1e5;else if(te=="sRGB")g.tabs[te]=u[d];else if(te=="bKGD")g.ctype==0||g.ctype==4?g.tabs[te]=[M(u,d)]:g.ctype==2||g.ctype==6?g.tabs[te]=[M(u,d),M(u,d+2),M(u,d+4)]:g.ctype==3&&(g.tabs[te]=u[d]);else if(te=="IEND"){if(de!=0){var ce=g.frames[g.frames.length-1];ce.data=f.decode._decompress(g,S.slice(0,de),ce.rect.width,ce.rect.height),de=0}g.data=f.decode._decompress(g,F,g.width,g.height);break}d+=U,v.readUint(u,d),d+=4}return delete g.compress,delete g.interlace,delete g.filter,g},f.decode._decompress=function(s,u,d,v){return s.compress==0&&(u=f.decode._inflate(u)),s.interlace==0?u=f.decode._filterZero(u,s,0,d,v):s.interlace==1&&(u=f.decode._readInterlace(u,s)),u},f.decode._inflate=function(s){return h.inflate(s)},f.decode._readInterlace=function(s,u){for(var d=u.width,v=u.height,M=f.decode._getBPP(u),k=M>>3,g=Math.ceil(d*M/8),F=new Uint8Array(v*g),$=0,S=[0,0,4,0,2,0,1],de=[0,4,0,2,0,1,0],se=[8,8,8,4,4,2,2],I=[8,8,4,4,2,2,1],U=0;U<7;){for(var te=se[U],ce=I[U],_e=0,we=0,ee=S[U];ee<v;)ee+=te,we++;for(var Ce=de[U];Ce<d;)Ce+=ce,_e++;var ut=Math.ceil(_e*M/8);f.decode._filterZero(s,u,$,_e,we);for(var ct=0,nt=S[U];nt<v;){for(var ft=de[U],tt=$+ct*ut<<3;ft<d;){if(M==1){var Le=s[tt>>3];Le=Le>>7-(tt&7)&1,F[nt*g+(ft>>3)]|=Le<<7-((ft&3)<<0)}if(M==2){var Le=s[tt>>3];Le=Le>>6-(tt&7)&3,F[nt*g+(ft>>2)]|=Le<<6-((ft&3)<<1)}if(M==4){var Le=s[tt>>3];Le=Le>>4-(tt&7)&15,F[nt*g+(ft>>1)]|=Le<<4-((ft&1)<<2)}if(M>=8)for(var Ct=nt*g+ft*k,bt=0;bt<k;bt++)F[Ct+bt]=s[(tt>>3)+bt];tt+=M,ft+=ce}ct++,nt+=te}_e*we!=0&&($+=we*(1+ut)),U=U+1}return F},f.decode._getBPP=function(s){var u=[1,null,3,1,2,null,4][s.ctype];return u*s.depth},f.decode._filterZero=function(s,u,d,v,M){var k=f.decode._getBPP(u),g=Math.ceil(v*k/8),F=f.decode._paeth;k=Math.ceil(k/8);for(var $=0;$<M;$++){var S=d+$*g,de=S+$+1,se=s[de-1];if(se==0)for(var I=0;I<g;I++)s[S+I]=s[de+I];else if(se==1){for(var I=0;I<k;I++)s[S+I]=s[de+I];for(var I=k;I<g;I++)s[S+I]=s[de+I]+s[S+I-k]&255}else if($==0){for(var I=0;I<k;I++)s[S+I]=s[de+I];if(se==2)for(var I=k;I<g;I++)s[S+I]=s[de+I]&255;if(se==3)for(var I=k;I<g;I++)s[S+I]=s[de+I]+(s[S+I-k]>>1)&255;if(se==4)for(var I=k;I<g;I++)s[S+I]=s[de+I]+F(s[S+I-k],0,0)&255}else{if(se==2)for(var I=0;I<g;I++)s[S+I]=s[de+I]+s[S+I-g]&255;if(se==3){for(var I=0;I<k;I++)s[S+I]=s[de+I]+(s[S+I-g]>>1)&255;for(var I=k;I<g;I++)s[S+I]=s[de+I]+(s[S+I-g]+s[S+I-k]>>1)&255}if(se==4){for(var I=0;I<k;I++)s[S+I]=s[de+I]+F(0,s[S+I-g],0)&255;for(var I=k;I<g;I++)s[S+I]=s[de+I]+F(s[S+I-k],s[S+I-g],s[S+I-k-g])&255}}}return s},f.decode._paeth=function(s,u,d){var v=s+u-d,M=Math.abs(v-s),k=Math.abs(v-u),g=Math.abs(v-d);return M<=k&&M<=g?s:k<=g?u:d},f.decode._IHDR=function(s,u,d){var v=f._bin;d.width=v.readUint(s,u),u+=4,d.height=v.readUint(s,u),u+=4,d.depth=s[u],u++,d.ctype=s[u],u++,d.compress=s[u],u++,d.filter=s[u],u++,d.interlace=s[u],u++},f._bin={nextZero:function(s,u){for(;s[u]!=0;)u++;return u},readUshort:function(s,u){return s[u]<<8|s[u+1]},writeUshort:function(s,u,d){s[u]=d>>8&255,s[u+1]=d&255},readUint:function(s,u){return s[u]*(256*256*256)+(s[u+1]<<16|s[u+2]<<8|s[u+3])},writeUint:function(s,u,d){s[u]=d>>24&255,s[u+1]=d>>16&255,s[u+2]=d>>8&255,s[u+3]=d&255},readASCII:function(s,u,d){for(var v="",M=0;M<d;M++)v+=String.fromCharCode(s[u+M]);return v},writeASCII:function(s,u,d){for(var v=0;v<d.length;v++)s[u+v]=d.charCodeAt(v)},readBytes:function(s,u,d){for(var v=[],M=0;M<d;M++)v.push(s[u+M]);return v},pad:function(s){return s.length<2?"0"+s:s},readUTF8:function(s,u,d){for(var v="",M,k=0;k<d;k++)v+="%"+f._bin.pad(s[u+k].toString(16));try{M=decodeURIComponent(v)}catch{return f._bin.readASCII(s,u,d)}return M}},f._copyTile=function(s,u,d,v,M,k,g,F,$){for(var S=Math.min(u,M),de=Math.min(d,k),se=0,I=0,U=0;U<de;U++)for(var te=0;te<S;te++)if(g>=0&&F>=0?(se=U*u+te<<2,I=(F+U)*M+g+te<<2):(se=(-F+U)*u-g+te<<2,I=U*M+te<<2),$==0)v[I]=s[se],v[I+1]=s[se+1],v[I+2]=s[se+2],v[I+3]=s[se+3];else if($==1){var ce=s[se+3]*.00392156862745098,_e=s[se]*ce,we=s[se+1]*ce,ee=s[se+2]*ce,Ce=v[I+3]*(1/255),ut=v[I]*Ce,ct=v[I+1]*Ce,nt=v[I+2]*Ce,ft=1-ce,tt=ce+Ce*ft,Le=tt==0?0:1/tt;v[I+3]=255*tt,v[I+0]=(_e+ut*ft)*Le,v[I+1]=(we+ct*ft)*Le,v[I+2]=(ee+nt*ft)*Le}else if($==2){var ce=s[se+3],_e=s[se],we=s[se+1],ee=s[se+2],Ce=v[I+3],ut=v[I],ct=v[I+1],nt=v[I+2];ce==Ce&&_e==ut&&we==ct&&ee==nt?(v[I]=0,v[I+1]=0,v[I+2]=0,v[I+3]=0):(v[I]=_e,v[I+1]=we,v[I+2]=ee,v[I+3]=ce)}else if($==3){var ce=s[se+3],_e=s[se],we=s[se+1],ee=s[se+2],Ce=v[I+3],ut=v[I],ct=v[I+1],nt=v[I+2];if(ce==Ce&&_e==ut&&we==ct&&ee==nt)continue;if(ce<220&&Ce>20)return!1}return!0},f.encode=function(s,u,d,v,M,k){v==null&&(v=0),k==null&&(k=!1);for(var g=new Uint8Array(s[0].byteLength*s.length+100),F=[137,80,78,71,13,10,26,10],$=0;$<8;$++)g[$]=F[$];var S=8,de=f._bin,se=f.crc.crc,I=de.writeUint,U=de.writeUshort,te=de.writeASCII,ce=f.encode.compressPNG(s,u,d,v,k);I(g,S,13),S+=4,te(g,S,"IHDR"),S+=4,I(g,S,u),S+=4,I(g,S,d),S+=4,g[S]=ce.depth,S++,g[S]=ce.ctype,S++,g[S]=0,S++,g[S]=0,S++,g[S]=0,S++,I(g,S,se(g,S-17,17)),S+=4,I(g,S,1),S+=4,te(g,S,"sRGB"),S+=4,g[S]=1,S++,I(g,S,se(g,S-5,5)),S+=4;var _e=s.length>1;if(_e&&(I(g,S,8),S+=4,te(g,S,"acTL"),S+=4,I(g,S,s.length),S+=4,I(g,S,0),S+=4,I(g,S,se(g,S-12,12)),S+=4),ce.ctype==3){var we=ce.plte.length;I(g,S,we*3),S+=4,te(g,S,"PLTE"),S+=4;for(var $=0;$<we;$++){var ee=$*3,Ce=ce.plte[$],ut=Ce&255,ct=Ce>>8&255,nt=Ce>>16&255;g[S+ee+0]=ut,g[S+ee+1]=ct,g[S+ee+2]=nt}if(S+=we*3,I(g,S,se(g,S-we*3-4,we*3+4)),S+=4,ce.gotAlpha){I(g,S,we),S+=4,te(g,S,"tRNS"),S+=4;for(var $=0;$<we;$++)g[S+$]=ce.plte[$]>>24&255;S+=we,I(g,S,se(g,S-we-4,we+4)),S+=4}}for(var ft=0,tt=0;tt<ce.frames.length;tt++){var Le=ce.frames[tt];_e&&(I(g,S,26),S+=4,te(g,S,"fcTL"),S+=4,I(g,S,ft++),S+=4,I(g,S,Le.rect.width),S+=4,I(g,S,Le.rect.height),S+=4,I(g,S,Le.rect.x),S+=4,I(g,S,Le.rect.y),S+=4,U(g,S,M[tt]),S+=2,U(g,S,1e3),S+=2,g[S]=Le.dispose,S++,g[S]=Le.blend,S++,I(g,S,se(g,S-30,30)),S+=4);var Ct=Le.cimg,we=Ct.length;I(g,S,we+(tt==0?0:4)),S+=4;var bt=S;te(g,S,tt==0?"IDAT":"fdAT"),S+=4,tt!=0&&(I(g,S,ft++),S+=4);for(var $=0;$<we;$++)g[S+$]=Ct[$];S+=we,I(g,S,se(g,bt,S-bt)),S+=4}return I(g,S,0),S+=4,te(g,S,"IEND"),S+=4,I(g,S,se(g,S-4,4)),S+=4,g.buffer.slice(0,S)},f.encode.compressPNG=function(s,u,d,v,M){for(var k=f.encode.compress(s,u,d,v,!1,M),g=0;g<s.length;g++){var F=k.frames[g];F.rect.width;var $=F.rect.height,S=F.bpl,de=F.bpp,se=new Uint8Array($*S+$);F.cimg=f.encode._filterZero(F.img,$,de,S,se)}return k},f.encode.compress=function(s,u,d,v,M,k){k==null&&(k=!1);for(var g=6,F=8,$=4,S=255,de=0;de<s.length;de++)for(var se=new Uint8Array(s[de]),I=se.length,U=0;U<I;U+=4)S&=se[U+3];var te=S!=255,ce={},_e=[];if(s.length!=0&&(ce[0]=0,_e.push(0),v!=0&&v--),v!=0){var we=f.quantize(s,v,M);s=we.bufs;for(var U=0;U<we.plte.length;U++){var ee=we.plte[U].est.rgba;ce[ee]==null&&(ce[ee]=_e.length,_e.push(ee))}}else for(var de=0;de<s.length;de++)for(var Ce=new Uint32Array(s[de]),I=Ce.length,U=0;U<I;U++){var ee=Ce[U];if((U<u||ee!=Ce[U-1]&&ee!=Ce[U-u])&&ce[ee]==null&&(ce[ee]=_e.length,_e.push(ee),_e.length>=300))break}var ut=te?M:!1,ct=_e.length;ct<=256&&k==!1&&(ct<=2?F=1:ct<=4?F=2:ct<=16?F=4:F=8,M&&(F=8),te=!0);for(var nt=[],de=0;de<s.length;de++){var ft=new Uint8Array(s[de]),tt=new Uint32Array(ft.buffer),Le=0,Ct=0,bt=u,Me=d,Ze=0;if(de!=0&&!ut){for(var St=M||de==1||nt[nt.length-2].dispose==2?1:2,$t=0,Wt=1e9,Qt=0;Qt<St;Qt++){for(var jr=new Uint8Array(s[de-1-Qt]),sr=new Uint32Array(s[de-1-Qt]),xr=u,or=d,Kt=-1,wr=-1,Gt=0;Gt<d;Gt++)for(var kt=0;kt<u;kt++){var U=Gt*u+kt;tt[U]!=sr[U]&&(kt<xr&&(xr=kt),kt>Kt&&(Kt=kt),Gt<or&&(or=Gt),Gt>wr&&(wr=Gt))}var hn=Kt==-1?1:(Kt-xr+1)*(wr-or+1);hn<Wt&&(Wt=hn,$t=Qt,Kt==-1?(Le=Ct=0,bt=Me=1):(Le=xr,Ct=or,bt=Kt-xr+1,Me=wr-or+1))}var jr=new Uint8Array(s[de-1-$t]);$t==1&&(nt[nt.length-1].dispose=2);var Ft=new Uint8Array(bt*Me*4);new Uint32Array(Ft.buffer),f._copyTile(jr,u,d,Ft,bt,Me,-Le,-Ct,0),f._copyTile(ft,u,d,Ft,bt,Me,-Le,-Ct,3)?(f._copyTile(ft,u,d,Ft,bt,Me,-Le,-Ct,2),Ze=1):(f._copyTile(ft,u,d,Ft,bt,Me,-Le,-Ct,0),Ze=0),ft=Ft,tt=new Uint32Array(ft.buffer)}var Br=4*bt;if(ct<=256&&k==!1){Br=Math.ceil(F*bt/8);for(var Ft=new Uint8Array(Br*Me),Gt=0;Gt<Me;Gt++){var U=Gt*Br,Ir=Gt*bt;if(F==8)for(var kt=0;kt<bt;kt++)Ft[U+kt]=ce[tt[Ir+kt]];else if(F==4)for(var kt=0;kt<bt;kt++)Ft[U+(kt>>1)]|=ce[tt[Ir+kt]]<<4-(kt&1)*4;else if(F==2)for(var kt=0;kt<bt;kt++)Ft[U+(kt>>2)]|=ce[tt[Ir+kt]]<<6-(kt&3)*2;else if(F==1)for(var kt=0;kt<bt;kt++)Ft[U+(kt>>3)]|=ce[tt[Ir+kt]]<<7-(kt&7)*1}ft=Ft,g=3,$=1}else if(te==!1&&s.length==1){for(var Ft=new Uint8Array(bt*Me*3),Zr=bt*Me,U=0;U<Zr;U++){var Qr=U*3,ar=U*4;Ft[Qr]=ft[ar],Ft[Qr+1]=ft[ar+1],Ft[Qr+2]=ft[ar+2]}ft=Ft,g=2,$=3,Br=3*bt}nt.push({rect:{x:Le,y:Ct,width:bt,height:Me},img:ft,bpl:Br,bpp:$,blend:Ze,dispose:ut?1:0})}return{ctype:g,depth:F,plte:_e,gotAlpha:te,frames:nt}},f.encode._filterZero=function(s,u,d,v,M){for(var k=[],g=0;g<5;g++)if(!(u*v>5e5&&(g==2||g==3||g==4))){for(var F=0;F<u;F++)f.encode._filterLine(M,s,F,v,d,g);if(k.push(h.deflate(M)),d==1)break}for(var $,S=1e9,de=0;de<k.length;de++)k[de].length<S&&($=de,S=k[de].length);return k[$]},f.encode._filterLine=function(s,u,d,v,M,k){var g=d*v,F=g+d,$=f.decode._paeth;if(s[F]=k,F++,k==0)for(var S=0;S<v;S++)s[F+S]=u[g+S];else if(k==1){for(var S=0;S<M;S++)s[F+S]=u[g+S];for(var S=M;S<v;S++)s[F+S]=u[g+S]-u[g+S-M]+256&255}else if(d==0){for(var S=0;S<M;S++)s[F+S]=u[g+S];if(k==2)for(var S=M;S<v;S++)s[F+S]=u[g+S];if(k==3)for(var S=M;S<v;S++)s[F+S]=u[g+S]-(u[g+S-M]>>1)+256&255;if(k==4)for(var S=M;S<v;S++)s[F+S]=u[g+S]-$(u[g+S-M],0,0)+256&255}else{if(k==2)for(var S=0;S<v;S++)s[F+S]=u[g+S]+256-u[g+S-v]&255;if(k==3){for(var S=0;S<M;S++)s[F+S]=u[g+S]+256-(u[g+S-v]>>1)&255;for(var S=M;S<v;S++)s[F+S]=u[g+S]+256-(u[g+S-v]+u[g+S-M]>>1)&255}if(k==4){for(var S=0;S<M;S++)s[F+S]=u[g+S]+256-$(0,u[g+S-v],0)&255;for(var S=M;S<v;S++)s[F+S]=u[g+S]+256-$(u[g+S-M],u[g+S-v],u[g+S-M-v])&255}}},f.crc={table:function(){for(var s=new Uint32Array(256),u=0;u<256;u++){for(var d=u,v=0;v<8;v++)d&1?d=3988292384^d>>>1:d=d>>>1;s[u]=d}return s}(),update:function(s,u,d,v){for(var M=0;M<v;M++)s=f.crc.table[(s^u[d+M])&255]^s>>>8;return s},crc:function(s,u,d){return f.crc.update(4294967295,s,u,d)^4294967295}},f.quantize=function(s,u,d){for(var v=[],M=0,k=0;k<s.length;k++)v.push(f.encode.alphaMul(new Uint8Array(s[k]),d)),M+=s[k].byteLength;for(var g=new Uint8Array(M),F=new Uint32Array(g.buffer),$=0,k=0;k<v.length;k++){for(var S=v[k],de=S.length,se=0;se<de;se++)g[$+se]=S[se];$+=de}var I={i0:0,i1:g.length,bst:null,est:null,tdst:0,left:null,right:null};I.bst=f.quantize.stats(g,I.i0,I.i1),I.est=f.quantize.estats(I.bst);for(var U=[I];U.length<u;){for(var te=0,ce=0,k=0;k<U.length;k++)U[k].est.L>te&&(te=U[k].est.L,ce=k);if(te<.001)break;var _e=U[ce],we=f.quantize.splitPixels(g,F,_e.i0,_e.i1,_e.est.e,_e.est.eMq255),ee={i0:_e.i0,i1:we,bst:null,est:null,tdst:0,left:null,right:null};ee.bst=f.quantize.stats(g,ee.i0,ee.i1),ee.est=f.quantize.estats(ee.bst);var Ce={i0:we,i1:_e.i1,bst:null,est:null,tdst:0,left:null,right:null};Ce.bst={R:[],m:[],N:_e.bst.N-ee.bst.N};for(var k=0;k<16;k++)Ce.bst.R[k]=_e.bst.R[k]-ee.bst.R[k];for(var k=0;k<4;k++)Ce.bst.m[k]=_e.bst.m[k]-ee.bst.m[k];Ce.est=f.quantize.estats(Ce.bst),_e.left=ee,_e.right=Ce,U[ce]=ee,U.push(Ce)}U.sort(function(St,$t){return $t.bst.N-St.bst.N});for(var ut=0;ut<v.length;ut++){for(var ct=f.quantize.planeDst,nt=new Uint8Array(v[ut].buffer),ft=new Uint32Array(v[ut].buffer),tt=nt.length,k=0;k<tt;k+=4){for(var Le=nt[k]*.00392156862745098,Ct=nt[k+1]*(1/255),bt=nt[k+2]*(1/255),Me=nt[k+3]*(1/255),Ze=I;Ze.left;)Ze=ct(Ze.est,Le,Ct,bt,Me)<=0?Ze.left:Ze.right;ft[k>>2]=Ze.est.rgba}v[ut]=ft.buffer}return{bufs:v,plte:U}},f.quantize.getNearest=function(s,u,d,v,M){if(s.left==null)return s.tdst=f.quantize.dist(s.est.q,u,d,v,M),s;var k=f.quantize.planeDst(s.est,u,d,v,M),g=s.left,F=s.right;k>0&&(g=s.right,F=s.left);var $=f.quantize.getNearest(g,u,d,v,M);if($.tdst<=k*k)return $;var S=f.quantize.getNearest(F,u,d,v,M);return S.tdst<$.tdst?S:$},f.quantize.planeDst=function(s,u,d,v,M){var k=s.e;return k[0]*u+k[1]*d+k[2]*v+k[3]*M-s.eMq},f.quantize.dist=function(s,u,d,v,M){var k=u-s[0],g=d-s[1],F=v-s[2],$=M-s[3];return k*k+g*g+F*F+$*$},f.quantize.splitPixels=function(s,u,d,v,M,k){var g=f.quantize.vecDot;for(v-=4;d<v;){for(;g(s,d,M)<=k;)d+=4;for(;g(s,v,M)>k;)v-=4;if(d>=v)break;var F=u[d>>2];u[d>>2]=u[v>>2],u[v>>2]=F,d+=4,v-=4}for(;g(s,d,M)>k;)d-=4;return d+4},f.quantize.vecDot=function(s,u,d){return s[u]*d[0]+s[u+1]*d[1]+s[u+2]*d[2]+s[u+3]*d[3]},f.quantize.stats=function(s,u,d){for(var v=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],M=[0,0,0,0],k=d-u>>2,g=u;g<d;g+=4){var F=s[g]*.00392156862745098,$=s[g+1]*(1/255),S=s[g+2]*(1/255),de=s[g+3]*(1/255);M[0]+=F,M[1]+=$,M[2]+=S,M[3]+=de,v[0]+=F*F,v[1]+=F*$,v[2]+=F*S,v[3]+=F*de,v[5]+=$*$,v[6]+=$*S,v[7]+=$*de,v[10]+=S*S,v[11]+=S*de,v[15]+=de*de}return v[4]=v[1],v[8]=v[2],v[12]=v[3],v[9]=v[6],v[13]=v[7],v[14]=v[11],{R:v,m:M,N:k}},f.quantize.estats=function(s){var u=s.R,d=s.m,v=s.N,M=d[0],k=d[1],g=d[2],F=d[3],$=v==0?0:1/v,S=[u[0]-M*M*$,u[1]-M*k*$,u[2]-M*g*$,u[3]-M*F*$,u[4]-k*M*$,u[5]-k*k*$,u[6]-k*g*$,u[7]-k*F*$,u[8]-g*M*$,u[9]-g*k*$,u[10]-g*g*$,u[11]-g*F*$,u[12]-F*M*$,u[13]-F*k*$,u[14]-F*g*$,u[15]-F*F*$],de=S,se=f.M4,I=[.5,.5,.5,.5],U=0,te=0;if(v!=0)for(var ce=0;ce<10&&(I=se.multVec(de,I),te=Math.sqrt(se.dot(I,I)),I=se.sml(1/te,I),!(Math.abs(te-U)<1e-9));ce++)U=te;var _e=[M*$,k*$,g*$,F*$],we=se.dot(se.sml(255,_e),I),ee=_e[3]<.001?0:1/_e[3];return{Cov:S,q:_e,e:I,L:U,eMq255:we,eMq:se.dot(I,_e),rgba:(Math.round(255*_e[3])<<24|Math.round(255*_e[2]*ee)<<16|Math.round(255*_e[1]*ee)<<8|Math.round(255*_e[0]*ee)<<0)>>>0}},f.M4={multVec:function(s,u){return[s[0]*u[0]+s[1]*u[1]+s[2]*u[2]+s[3]*u[3],s[4]*u[0]+s[5]*u[1]+s[6]*u[2]+s[7]*u[3],s[8]*u[0]+s[9]*u[1]+s[10]*u[2]+s[11]*u[3],s[12]*u[0]+s[13]*u[1]+s[14]*u[2]+s[15]*u[3]]},dot:function(s,u){return s[0]*u[0]+s[1]*u[1]+s[2]*u[2]+s[3]*u[3]},sml:function(s,u){return[s*u[0],s*u[1],s*u[2],s*u[3]]}},f.encode.alphaMul=function(s,u){for(var d=new Uint8Array(s.length),v=s.length>>2,M=0;M<v;M++){var k=M<<2,g=s[k+3];u&&(g=g<128?0:255);var F=g*(1/255);d[k+0]=s[k+0]*F,d[k+1]=s[k+1]*F,d[k+2]=s[k+2]*F,d[k+3]=g}return d}}(n,i)})()})(gh);var Bv={exports:{}};(function(t,n){(function(i,f){t.exports=f()})(Us,function(){var i=function(c){return c instanceof Uint8Array||c instanceof Uint16Array||c instanceof Uint32Array||c instanceof Int8Array||c instanceof Int16Array||c instanceof Int32Array||c instanceof Float32Array||c instanceof Float64Array||c instanceof Uint8ClampedArray},f=function(c,x){for(var C=Object.keys(x),ie=0;ie<C.length;++ie)c[C[ie]]=x[C[ie]];return c},h=`
|
|
37
|
+
`;function s(c){return typeof atob<"u"?atob(c):"base64:"+c}function u(c){var x=new Error("(regl) "+c);throw console.error(x),x}function d(c,x){c||u(x)}function v(c){return c?": "+c:""}function M(c,x,C){c in x||u("unknown parameter ("+c+")"+v(C)+". possible values: "+Object.keys(x).join())}function k(c,x){i(c)||u("invalid parameter type"+v(x)+". must be a typed array")}function g(c,x){switch(x){case"number":return typeof c=="number";case"object":return typeof c=="object";case"string":return typeof c=="string";case"boolean":return typeof c=="boolean";case"function":return typeof c=="function";case"undefined":return typeof c>"u";case"symbol":return typeof c=="symbol"}}function F(c,x,C){g(c,x)||u("invalid parameter type"+v(C)+". expected "+x+", got "+typeof c)}function $(c,x){c>=0&&(c|0)===c||u("invalid parameter type, ("+c+")"+v(x)+". must be a nonnegative integer")}function S(c,x,C){x.indexOf(c)<0&&u("invalid value"+v(C)+". must be one of: "+x)}var de=["gl","canvas","container","attributes","pixelRatio","extensions","optionalExtensions","profile","onDone"];function se(c){Object.keys(c).forEach(function(x){de.indexOf(x)<0&&u('invalid regl constructor argument "'+x+'". must be one of '+de)})}function I(c,x){for(c=c+"";c.length<x;)c=" "+c;return c}function U(){this.name="unknown",this.lines=[],this.index={},this.hasErrors=!1}function te(c,x){this.number=c,this.line=x,this.errors=[]}function ce(c,x,C){this.file=c,this.line=x,this.message=C}function _e(){var c=new Error,x=(c.stack||c).toString(),C=/compileProcedure.*\n\s*at.*\((.*)\)/.exec(x);if(C)return C[1];var ie=/compileProcedure.*\n\s*at\s+(.*)(\n|$)/.exec(x);return ie?ie[1]:"unknown"}function we(){var c=new Error,x=(c.stack||c).toString(),C=/at REGLCommand.*\n\s+at.*\((.*)\)/.exec(x);if(C)return C[1];var ie=/at REGLCommand.*\n\s+at\s+(.*)\n/.exec(x);return ie?ie[1]:"unknown"}function ee(c,x){var C=c.split(`
|
|
38
|
+
`),ie=1,pe=0,re={unknown:new U,0:new U};re.unknown.name=re[0].name=x||_e(),re.unknown.lines.push(new te(0,""));for(var ae=0;ae<C.length;++ae){var De=C[ae],Ae=/^\s*#\s*(\w+)\s+(.+)\s*$/.exec(De);if(Ae)switch(Ae[1]){case"line":var Be=/(\d+)(\s+\d+)?/.exec(Ae[2]);Be&&(ie=Be[1]|0,Be[2]&&(pe=Be[2]|0,pe in re||(re[pe]=new U)));break;case"define":var Ge=/SHADER_NAME(_B64)?\s+(.*)$/.exec(Ae[2]);Ge&&(re[pe].name=Ge[1]?s(Ge[2]):Ge[2]);break}re[pe].lines.push(new te(ie++,De))}return Object.keys(re).forEach(function(Pe){var We=re[Pe];We.lines.forEach(function(Oe){We.index[Oe.number]=Oe})}),re}function Ce(c){var x=[];return c.split(`
|
|
39
|
+
`).forEach(function(C){if(!(C.length<5)){var ie=/^ERROR:\s+(\d+):(\d+):\s*(.*)$/.exec(C);ie?x.push(new ce(ie[1]|0,ie[2]|0,ie[3].trim())):C.length>0&&x.push(new ce("unknown",0,C))}}),x}function ut(c,x){x.forEach(function(C){var ie=c[C.file];if(ie){var pe=ie.index[C.line];if(pe){pe.errors.push(C),ie.hasErrors=!0;return}}c.unknown.hasErrors=!0,c.unknown.lines[0].errors.push(C)})}function ct(c,x,C,ie,pe){if(!c.getShaderParameter(x,c.COMPILE_STATUS)){var re=c.getShaderInfoLog(x),ae=ie===c.FRAGMENT_SHADER?"fragment":"vertex";Me(C,"string",ae+" shader source must be a string",pe);var De=ee(C,pe),Ae=Ce(re);ut(De,Ae),Object.keys(De).forEach(function(Be){var Ge=De[Be];if(!Ge.hasErrors)return;var Pe=[""],We=[""];function Oe(Fe,V){Pe.push(Fe),We.push(V||"")}Oe("file number "+Be+": "+Ge.name+`
|
|
40
|
+
`,"color:red;text-decoration:underline;font-weight:bold"),Ge.lines.forEach(function(Fe){if(Fe.errors.length>0){Oe(I(Fe.number,4)+"| ","background-color:yellow; font-weight:bold"),Oe(Fe.line+h,"color:red; background-color:yellow; font-weight:bold");var V=0;Fe.errors.forEach(function(ne){var Re=ne.message,rt=/^\s*'(.*)'\s*:\s*(.*)$/.exec(Re);if(rt){var Se=rt[1];switch(Re=rt[2],Se){case"assign":Se="=";break}V=Math.max(Fe.line.indexOf(Se,V),0)}else V=0;Oe(I("| ",6)),Oe(I("^^^",V+3)+h,"font-weight:bold"),Oe(I("| ",6)),Oe(Re+h,"font-weight:bold")}),Oe(I("| ",6)+h)}else Oe(I(Fe.number,4)+"| "),Oe(Fe.line+h,"color:red")}),typeof document<"u"&&!window.chrome?(We[0]=Pe.join("%c"),console.log.apply(console,We)):console.log(Pe.join(""))}),d.raise("Error compiling "+ae+" shader, "+De[0].name)}}function nt(c,x,C,ie,pe){if(!c.getProgramParameter(x,c.LINK_STATUS)){var re=c.getProgramInfoLog(x),ae=ee(C,pe),De=ee(ie,pe),Ae='Error linking program with vertex shader, "'+De[0].name+'", and fragment shader "'+ae[0].name+'"';typeof document<"u"?console.log("%c"+Ae+h+"%c"+re,"color:red;text-decoration:underline;font-weight:bold","color:red"):console.log(Ae+h+re),d.raise(Ae)}}function ft(c){c._commandRef=_e()}function tt(c,x,C,ie){ft(c);function pe(Ae){return Ae?ie.id(Ae):0}c._fragId=pe(c.static.frag),c._vertId=pe(c.static.vert);function re(Ae,Be){Object.keys(Be).forEach(function(Ge){Ae[ie.id(Ge)]=!0})}var ae=c._uniformSet={};re(ae,x.static),re(ae,x.dynamic);var De=c._attributeSet={};re(De,C.static),re(De,C.dynamic),c._hasCount="count"in c.static||"count"in c.dynamic||"elements"in c.static||"elements"in c.dynamic}function Le(c,x){var C=we();u(c+" in command "+(x||_e())+(C==="unknown"?"":" called from "+C))}function Ct(c,x,C){c||Le(x,C||_e())}function bt(c,x,C,ie){c in x||Le("unknown parameter ("+c+")"+v(C)+". possible values: "+Object.keys(x).join(),ie||_e())}function Me(c,x,C,ie){g(c,x)||Le("invalid parameter type"+v(C)+". expected "+x+", got "+typeof c,ie||_e())}function Ze(c){c()}function St(c,x,C){c.texture?S(c.texture._texture.internalformat,x,"unsupported texture format for attachment"):S(c.renderbuffer._renderbuffer.format,C,"unsupported renderbuffer format for attachment")}var $t=33071,Wt=9728,Qt=9984,sr=9985,xr=9986,or=9987,Kt=5120,wr=5121,Gt=5122,kt=5123,hn=5124,jr=5125,Ft=5126,Br=32819,Ir=32820,Zr=33635,Qr=34042,ar=36193,Nt={};Nt[Kt]=Nt[wr]=1,Nt[Gt]=Nt[kt]=Nt[ar]=Nt[Zr]=Nt[Br]=Nt[Ir]=2,Nt[hn]=Nt[jr]=Nt[Ft]=Nt[Qr]=4;function En(c,x){return c===Ir||c===Br||c===Zr?2:c===Qr?4:Nt[c]*x}function An(c){return!(c&c-1)&&!!c}function Jr(c,x,C){var ie,pe=x.width,re=x.height,ae=x.channels;d(pe>0&&pe<=C.maxTextureSize&&re>0&&re<=C.maxTextureSize,"invalid texture shape"),(c.wrapS!==$t||c.wrapT!==$t)&&d(An(pe)&&An(re),"incompatible wrap mode for texture, both width and height must be power of 2"),x.mipmask===1?pe!==1&&re!==1&&d(c.minFilter!==Qt&&c.minFilter!==xr&&c.minFilter!==sr&&c.minFilter!==or,"min filter requires mipmap"):(d(An(pe)&&An(re),"texture must be a square power of 2 to support mipmapping"),d(x.mipmask===(pe<<1)-1,"missing or incomplete mipmap data")),x.type===Ft&&(C.extensions.indexOf("oes_texture_float_linear")<0&&d(c.minFilter===Wt&&c.magFilter===Wt,"filter not supported, must enable oes_texture_float_linear"),d(!c.genMipmaps,"mipmap generation not supported with float textures"));var De=x.images;for(ie=0;ie<16;++ie)if(De[ie]){var Ae=pe>>ie,Be=re>>ie;d(x.mipmask&1<<ie,"missing mipmap data");var Ge=De[ie];if(d(Ge.width===Ae&&Ge.height===Be,"invalid shape for mip images"),d(Ge.format===x.format&&Ge.internalformat===x.internalformat&&Ge.type===x.type,"incompatible type for mip image"),!Ge.compressed)if(Ge.data){var Pe=Math.ceil(En(Ge.type,ae)*Ae/Ge.unpackAlignment)*Ge.unpackAlignment;d(Ge.data.byteLength===Pe*Be,"invalid data for image, buffer size is inconsistent with image format")}else Ge.element||Ge.copy}else c.genMipmaps||d((x.mipmask&1<<ie)===0,"extra mipmap data");x.compressed&&d(!c.genMipmaps,"mipmap generation for compressed images not supported")}function an(c,x,C,ie){var pe=c.width,re=c.height,ae=c.channels;d(pe>0&&pe<=ie.maxTextureSize&&re>0&&re<=ie.maxTextureSize,"invalid texture shape"),d(pe===re,"cube map must be square"),d(x.wrapS===$t&&x.wrapT===$t,"wrap mode not supported by cube map");for(var De=0;De<C.length;++De){var Ae=C[De];d(Ae.width===pe&&Ae.height===re,"inconsistent cube map face shape"),x.genMipmaps&&(d(!Ae.compressed,"can not generate mipmap for compressed textures"),d(Ae.mipmask===1,"can not specify mipmaps and generate mipmaps"));for(var Be=Ae.images,Ge=0;Ge<16;++Ge){var Pe=Be[Ge];if(Pe){var We=pe>>Ge,Oe=re>>Ge;d(Ae.mipmask&1<<Ge,"missing mipmap data"),d(Pe.width===We&&Pe.height===Oe,"invalid shape for mip images"),d(Pe.format===c.format&&Pe.internalformat===c.internalformat&&Pe.type===c.type,"incompatible type for mip image"),Pe.compressed||(Pe.data?d(Pe.data.byteLength===We*Oe*Math.max(En(Pe.type,ae),Pe.unpackAlignment),"invalid data for image, buffer size is inconsistent with image format"):Pe.element||Pe.copy)}}}}var w=f(d,{optional:Ze,raise:u,commandRaise:Le,command:Ct,parameter:M,commandParameter:bt,constructor:se,type:F,commandType:Me,isTypedArray:k,nni:$,oneOf:S,shaderError:ct,linkError:nt,callSite:we,saveCommandRef:ft,saveDrawInfo:tt,framebufferFormat:St,guessCommand:_e,texture2D:Jr,textureCube:an}),li=0,dn=0,Gi=5,Bn=6;function Er(c,x){this.id=li++,this.type=c,this.data=x}function Dn(c){return c.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function Pn(c){if(c.length===0)return[];var x=c.charAt(0),C=c.charAt(c.length-1);if(c.length>1&&x===C&&(x==='"'||x==="'"))return['"'+Dn(c.substr(1,c.length-2))+'"'];var ie=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(c);if(ie)return Pn(c.substr(0,ie.index)).concat(Pn(ie[1])).concat(Pn(c.substr(ie.index+ie[0].length)));var pe=c.split(".");if(pe.length===1)return['"'+Dn(c)+'"'];for(var re=[],ae=0;ae<pe.length;++ae)re=re.concat(Pn(pe[ae]));return re}function A(c){return"["+Pn(c).join("][")+"]"}function Ue(c,x){return new Er(c,A(x+""))}function Xe(c){return typeof c=="function"&&!c._reglType||c instanceof Er}function dt(c,x){if(typeof c=="function")return new Er(dn,c);if(typeof c=="number"||typeof c=="boolean")return new Er(Gi,c);if(Array.isArray(c))return new Er(Bn,c.map(function(C,ie){return dt(C,x+"["+ie+"]")}));if(c instanceof Er)return c;w(!1,"invalid option type in uniform "+x)}var z={DynamicVariable:Er,define:Ue,isDynamic:Xe,unbox:dt,accessor:A},xe={next:typeof requestAnimationFrame=="function"?function(c){return requestAnimationFrame(c)}:function(c){return setTimeout(c,16)},cancel:typeof cancelAnimationFrame=="function"?function(c){return cancelAnimationFrame(c)}:clearTimeout},p=typeof performance<"u"&&performance.now?function(){return performance.now()}:function(){return+new Date};function He(){var c={"":0},x=[""];return{id:function(C){var ie=c[C];return ie||(ie=c[C]=x.length,x.push(C),ie)},str:function(C){return x[C]}}}function Bt(c,x,C){var ie=document.createElement("canvas");f(ie.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),c.appendChild(ie),c===document.body&&(ie.style.position="absolute",f(c.style,{margin:0,padding:0}));function pe(){var De=window.innerWidth,Ae=window.innerHeight;if(c!==document.body){var Be=ie.getBoundingClientRect();De=Be.right-Be.left,Ae=Be.bottom-Be.top}ie.width=C*De,ie.height=C*Ae}var re;c!==document.body&&typeof ResizeObserver=="function"?(re=new ResizeObserver(function(){setTimeout(pe)}),re.observe(c)):window.addEventListener("resize",pe,!1);function ae(){re?re.disconnect():window.removeEventListener("resize",pe),c.removeChild(ie)}return pe(),{canvas:ie,onDestroy:ae}}function o(c,x){function C(ie){try{return c.getContext(ie,x)}catch{return null}}return C("webgl")||C("experimental-webgl")||C("webgl-experimental")}function ue(c){return typeof c.nodeName=="string"&&typeof c.appendChild=="function"&&typeof c.getBoundingClientRect=="function"}function ge(c){return typeof c.drawArrays=="function"||typeof c.drawElements=="function"}function y(c){return typeof c=="string"?c.split():(w(Array.isArray(c),"invalid extension array"),c)}function Y(c){return typeof c=="string"?(w(typeof document<"u","not supported outside of DOM"),document.querySelector(c)):c}function oe(c){var x=c||{},C,ie,pe,re,ae={},De=[],Ae=[],Be=typeof window>"u"?1:window.devicePixelRatio,Ge=!1,Pe=function(Fe){Fe&&w.raise(Fe)},We=function(){};if(typeof x=="string"?(w(typeof document<"u","selector queries only supported in DOM enviroments"),C=document.querySelector(x),w(C,"invalid query string for element")):typeof x=="object"?ue(x)?C=x:ge(x)?(re=x,pe=re.canvas):(w.constructor(x),"gl"in x?re=x.gl:"canvas"in x?pe=Y(x.canvas):"container"in x&&(ie=Y(x.container)),"attributes"in x&&(ae=x.attributes,w.type(ae,"object","invalid context attributes")),"extensions"in x&&(De=y(x.extensions)),"optionalExtensions"in x&&(Ae=y(x.optionalExtensions)),"onDone"in x&&(w.type(x.onDone,"function","invalid or missing onDone callback"),Pe=x.onDone),"profile"in x&&(Ge=!!x.profile),"pixelRatio"in x&&(Be=+x.pixelRatio,w(Be>0,"invalid pixel ratio"))):w.raise("invalid arguments to regl"),C&&(C.nodeName.toLowerCase()==="canvas"?pe=C:ie=C),!re){if(!pe){w(typeof document<"u","must manually specify webgl context outside of DOM environments");var Oe=Bt(ie||document.body,Pe,Be);if(!Oe)return null;pe=Oe.canvas,We=Oe.onDestroy}ae.premultipliedAlpha===void 0&&(ae.premultipliedAlpha=!0),re=o(pe,ae)}return re?{gl:re,canvas:pe,container:ie,extensions:De,optionalExtensions:Ae,pixelRatio:Be,profile:Ge,onDone:Pe,onDestroy:We}:(We(),Pe("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function At(c,x){var C={};function ie(ae){w.type(ae,"string","extension name must be string");var De=ae.toLowerCase(),Ae;try{Ae=C[De]=c.getExtension(De)}catch{}return!!Ae}for(var pe=0;pe<x.extensions.length;++pe){var re=x.extensions[pe];if(!ie(re))return x.onDestroy(),x.onDone('"'+re+'" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return x.optionalExtensions.forEach(ie),{extensions:C,restore:function(){Object.keys(C).forEach(function(ae){if(C[ae]&&!ie(ae))throw new Error("(regl): error restoring extension "+ae)})}}}function it(c,x){for(var C=Array(c),ie=0;ie<c;++ie)C[ie]=x(ie);return C}var mt=5120,lr=5121,ui=5122,Fr=5123,hr=5124,Yr=5125,vn=5126;function Ln(c){for(var x=16;x<=1<<28;x*=16)if(c<=x)return x;return 0}function Ra(c){var x,C;return x=(c>65535)<<4,c>>>=x,C=(c>255)<<3,c>>>=C,x|=C,C=(c>15)<<2,c>>>=C,x|=C,C=(c>3)<<1,c>>>=C,x|=C,x|c>>1}function Ca(){var c=it(8,function(){return[]});function x(re){var ae=Ln(re),De=c[Ra(ae)>>2];return De.length>0?De.pop():new ArrayBuffer(ae)}function C(re){c[Ra(re.byteLength)>>2].push(re)}function ie(re,ae){var De=null;switch(re){case mt:De=new Int8Array(x(ae),0,ae);break;case lr:De=new Uint8Array(x(ae),0,ae);break;case ui:De=new Int16Array(x(2*ae),0,ae);break;case Fr:De=new Uint16Array(x(2*ae),0,ae);break;case hr:De=new Int32Array(x(4*ae),0,ae);break;case Yr:De=new Uint32Array(x(4*ae),0,ae);break;case vn:De=new Float32Array(x(4*ae),0,ae);break;default:return null}return De.length!==ae?De.subarray(0,ae):De}function pe(re){C(re.buffer)}return{alloc:x,free:C,allocType:ie,freeType:pe}}var jt=Ca();jt.zero=Ca();var Hn=3408,fn=3410,ci=3411,$n=3412,Ws=3413,Ch=3414,Mh=3415,kh=33901,Ih=33902,Fh=3379,Vs=3386,Nh=34921,$s=36347,Bh=36348,Ph=35661,Gh=35660,Tu=34930,Eu=36349,Au=34076,Uh=34024,Yh=7936,Hh=7937,zh=7938,Du=35724,Lu=34047,Ou=36063,qo=34852,Zs=3553,Ko=34067,Xs=34069,Ru=33984,Qf=6408,qs=5126,jo=5121,Jf=36160,Wh=36053,Cu=36064,Qo=16384,Jo=function(c,x){var C=1;x.ext_texture_filter_anisotropic&&(C=c.getParameter(Lu));var ie=1,pe=1;x.webgl_draw_buffers&&(ie=c.getParameter(qo),pe=c.getParameter(Ou));var re=!!x.oes_texture_float;if(re){var ae=c.createTexture();c.bindTexture(Zs,ae),c.texImage2D(Zs,0,Qf,1,1,0,Qf,qs,null);var De=c.createFramebuffer();if(c.bindFramebuffer(Jf,De),c.framebufferTexture2D(Jf,Cu,Zs,ae,0),c.bindTexture(Zs,null),c.checkFramebufferStatus(Jf)!==Wh)re=!1;else{c.viewport(0,0,1,1),c.clearColor(1,0,0,1),c.clear(Qo);var Ae=jt.allocType(qs,4);c.readPixels(0,0,1,1,Qf,qs,Ae),c.getError()?re=!1:(c.deleteFramebuffer(De),c.deleteTexture(ae),re=Ae[0]===1),jt.freeType(Ae)}}var Be=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),Ge=!0;if(!Be){var Pe=c.createTexture(),We=jt.allocType(jo,36);c.activeTexture(Ru),c.bindTexture(Ko,Pe),c.texImage2D(Xs,0,Qf,3,3,0,Qf,jo,We),jt.freeType(We),c.bindTexture(Ko,null),c.deleteTexture(Pe),Ge=!c.getError()}return{colorBits:[c.getParameter(fn),c.getParameter(ci),c.getParameter($n),c.getParameter(Ws)],depthBits:c.getParameter(Ch),stencilBits:c.getParameter(Mh),subpixelBits:c.getParameter(Hn),extensions:Object.keys(x).filter(function(Oe){return!!x[Oe]}),maxAnisotropic:C,maxDrawbuffers:ie,maxColorAttachments:pe,pointSizeDims:c.getParameter(kh),lineWidthDims:c.getParameter(Ih),maxViewportDims:c.getParameter(Vs),maxCombinedTextureUnits:c.getParameter(Ph),maxCubeMapSize:c.getParameter(Au),maxRenderbufferSize:c.getParameter(Uh),maxTextureUnits:c.getParameter(Tu),maxTextureSize:c.getParameter(Fh),maxAttributes:c.getParameter(Nh),maxVertexUniforms:c.getParameter($s),maxVertexTextureUnits:c.getParameter(Gh),maxVaryingVectors:c.getParameter(Bh),maxFragmentUniforms:c.getParameter(Eu),glsl:c.getParameter(Du),renderer:c.getParameter(Hh),vendor:c.getParameter(Yh),version:c.getParameter(zh),readFloat:re,npotTextureCube:Ge}};function On(c){return!!c&&typeof c=="object"&&Array.isArray(c.shape)&&Array.isArray(c.stride)&&typeof c.offset=="number"&&c.shape.length===c.stride.length&&(Array.isArray(c.data)||i(c.data))}var zn=function(c){return Object.keys(c).map(function(x){return c[x]})},es={shape:$h,flatten:ku};function Vh(c,x,C){for(var ie=0;ie<x;++ie)C[ie]=c[ie]}function Mu(c,x,C,ie){for(var pe=0,re=0;re<x;++re)for(var ae=c[re],De=0;De<C;++De)ie[pe++]=ae[De]}function el(c,x,C,ie,pe,re){for(var ae=re,De=0;De<x;++De)for(var Ae=c[De],Be=0;Be<C;++Be)for(var Ge=Ae[Be],Pe=0;Pe<ie;++Pe)pe[ae++]=Ge[Pe]}function tl(c,x,C,ie,pe){for(var re=1,ae=C+1;ae<x.length;++ae)re*=x[ae];var De=x[C];if(x.length-C===4){var Ae=x[C+1],Be=x[C+2],Ge=x[C+3];for(ae=0;ae<De;++ae)el(c[ae],Ae,Be,Ge,ie,pe),pe+=re}else for(ae=0;ae<De;++ae)tl(c[ae],x,C+1,ie,pe),pe+=re}function ku(c,x,C,ie){var pe=1;if(x.length)for(var re=0;re<x.length;++re)pe*=x[re];else pe=0;var ae=ie||jt.allocType(C,pe);switch(x.length){case 0:break;case 1:Vh(c,x[0],ae);break;case 2:Mu(c,x[0],x[1],ae);break;case 3:el(c,x[0],x[1],x[2],ae,0);break;default:tl(c,x,0,ae,0)}return ae}function $h(c){for(var x=[],C=c;C.length;C=C[0])x.push(C.length);return x}var rl={"[object Int8Array]":5120,"[object Int16Array]":5122,"[object Int32Array]":5124,"[object Uint8Array]":5121,"[object Uint8ClampedArray]":5121,"[object Uint16Array]":5123,"[object Uint32Array]":5125,"[object Float32Array]":5126,"[object Float64Array]":5121,"[object ArrayBuffer]":5121},Zh=5120,Iu=5122,Xh=5124,qh=5121,Kh=5123,jh=5125,nl=5126,Qh=5126,Ma={int8:Zh,int16:Iu,int32:Xh,uint8:qh,uint16:Kh,uint32:jh,float:nl,float32:Qh},Jh=35048,ed=35040,Ks={dynamic:Jh,stream:ed,static:35044},Rr=es.flatten,Cr=es.shape,Fu=35044,td=35040,il=5121,al=5126,ia=[];ia[5120]=1,ia[5122]=2,ia[5124]=4,ia[5121]=1,ia[5123]=2,ia[5125]=4,ia[5126]=4;function js(c){return rl[Object.prototype.toString.call(c)]|0}function fl(c,x){for(var C=0;C<x.length;++C)c[C]=x[C]}function Nu(c,x,C,ie,pe,re,ae){for(var De=0,Ae=0;Ae<C;++Ae)for(var Be=0;Be<ie;++Be)c[De++]=x[pe*Ae+re*Be+ae]}function xn(c,x,C,ie){var pe=0,re={};function ae(V){this.id=pe++,this.buffer=c.createBuffer(),this.type=V,this.usage=Fu,this.byteLength=0,this.dimension=1,this.dtype=il,this.persistentData=null,C.profile&&(this.stats={size:0})}ae.prototype.bind=function(){c.bindBuffer(this.type,this.buffer)},ae.prototype.destroy=function(){We(this)};var De=[];function Ae(V,ne){var Re=De.pop();return Re||(Re=new ae(V)),Re.bind(),Pe(Re,ne,td,0,1,!1),Re}function Be(V){De.push(V)}function Ge(V,ne,Re){V.byteLength=ne.byteLength,c.bufferData(V.type,ne,Re)}function Pe(V,ne,Re,rt,Se,Qe){var je;if(V.usage=Re,Array.isArray(ne)){if(V.dtype=rt||al,ne.length>0){var pt;if(Array.isArray(ne[0])){je=Cr(ne);for(var ye=1,me=1;me<je.length;++me)ye*=je[me];V.dimension=ye,pt=Rr(ne,je,V.dtype),Ge(V,pt,Re),Qe?V.persistentData=pt:jt.freeType(pt)}else if(typeof ne[0]=="number"){V.dimension=Se;var ot=jt.allocType(V.dtype,ne.length);fl(ot,ne),Ge(V,ot,Re),Qe?V.persistentData=ot:jt.freeType(ot)}else i(ne[0])?(V.dimension=ne[0].length,V.dtype=rt||js(ne[0])||al,pt=Rr(ne,[ne.length,ne[0].length],V.dtype),Ge(V,pt,Re),Qe?V.persistentData=pt:jt.freeType(pt)):w.raise("invalid buffer data")}}else if(i(ne))V.dtype=rt||js(ne),V.dimension=Se,Ge(V,ne,Re),Qe&&(V.persistentData=new Uint8Array(new Uint8Array(ne.buffer)));else if(On(ne)){je=ne.shape;var Ve=ne.stride,ke=ne.offset,$e=0,qe=0,Mt=0,Lt=0;je.length===1?($e=je[0],qe=1,Mt=Ve[0],Lt=0):je.length===2?($e=je[0],qe=je[1],Mt=Ve[0],Lt=Ve[1]):w.raise("invalid shape"),V.dtype=rt||js(ne.data)||al,V.dimension=qe;var Ke=jt.allocType(V.dtype,$e*qe);Nu(Ke,ne.data,$e,qe,Mt,Lt,ke),Ge(V,Ke,Re),Qe?V.persistentData=Ke:jt.freeType(Ke)}else ne instanceof ArrayBuffer?(V.dtype=il,V.dimension=Se,Ge(V,ne,Re),Qe&&(V.persistentData=new Uint8Array(new Uint8Array(ne)))):w.raise("invalid buffer data")}function We(V){x.bufferCount--,ie(V);var ne=V.buffer;w(ne,"buffer must not be deleted already"),c.deleteBuffer(ne),V.buffer=null,delete re[V.id]}function Oe(V,ne,Re,rt){x.bufferCount++;var Se=new ae(ne);re[Se.id]=Se;function Qe(ye){var me=Fu,ot=null,Ve=0,ke=0,$e=1;return Array.isArray(ye)||i(ye)||On(ye)||ye instanceof ArrayBuffer?ot=ye:typeof ye=="number"?Ve=ye|0:ye&&(w.type(ye,"object","buffer arguments must be an object, a number or an array"),"data"in ye&&(w(ot===null||Array.isArray(ot)||i(ot)||On(ot),"invalid data for buffer"),ot=ye.data),"usage"in ye&&(w.parameter(ye.usage,Ks,"invalid buffer usage"),me=Ks[ye.usage]),"type"in ye&&(w.parameter(ye.type,Ma,"invalid buffer type"),ke=Ma[ye.type]),"dimension"in ye&&(w.type(ye.dimension,"number","invalid dimension"),$e=ye.dimension|0),"length"in ye&&(w.nni(Ve,"buffer length must be a nonnegative integer"),Ve=ye.length|0)),Se.bind(),ot?Pe(Se,ot,me,ke,$e,rt):(Ve&&c.bufferData(Se.type,Ve,me),Se.dtype=ke||il,Se.usage=me,Se.dimension=$e,Se.byteLength=Ve),C.profile&&(Se.stats.size=Se.byteLength*ia[Se.dtype]),Qe}function je(ye,me){w(me+ye.byteLength<=Se.byteLength,"invalid buffer subdata call, buffer is too small. Can't write data of size "+ye.byteLength+" starting from offset "+me+" to a buffer of size "+Se.byteLength),c.bufferSubData(Se.type,me,ye)}function pt(ye,me){var ot=(me||0)|0,Ve;if(Se.bind(),i(ye)||ye instanceof ArrayBuffer)je(ye,ot);else if(Array.isArray(ye)){if(ye.length>0)if(typeof ye[0]=="number"){var ke=jt.allocType(Se.dtype,ye.length);fl(ke,ye),je(ke,ot),jt.freeType(ke)}else if(Array.isArray(ye[0])||i(ye[0])){Ve=Cr(ye);var $e=Rr(ye,Ve,Se.dtype);je($e,ot),jt.freeType($e)}else w.raise("invalid buffer data")}else if(On(ye)){Ve=ye.shape;var qe=ye.stride,Mt=0,Lt=0,Ke=0,Je=0;Ve.length===1?(Mt=Ve[0],Lt=1,Ke=qe[0],Je=0):Ve.length===2?(Mt=Ve[0],Lt=Ve[1],Ke=qe[0],Je=qe[1]):w.raise("invalid shape");var wt=Array.isArray(ye.data)?Se.dtype:js(ye.data),Rt=jt.allocType(wt,Mt*Lt);Nu(Rt,ye.data,Mt,Lt,Ke,Je,ye.offset),je(Rt,ot),jt.freeType(Rt)}else w.raise("invalid data for buffer subdata");return Qe}return Re||Qe(V),Qe._reglType="buffer",Qe._buffer=Se,Qe.subdata=pt,C.profile&&(Qe.stats=Se.stats),Qe.destroy=function(){We(Se)},Qe}function Fe(){zn(re).forEach(function(V){V.buffer=c.createBuffer(),c.bindBuffer(V.type,V.buffer),c.bufferData(V.type,V.persistentData||V.byteLength,V.usage)})}return C.profile&&(x.getTotalBufferSize=function(){var V=0;return Object.keys(re).forEach(function(ne){V+=re[ne].stats.size}),V}),{create:Oe,createStream:Ae,destroyStream:Be,clear:function(){zn(re).forEach(We),De.forEach(We)},getBuffer:function(V){return V&&V._buffer instanceof ae?V._buffer:null},restore:Fe,_initBuffer:Pe}}var sl=0,ka=0,Bu=1,ol=1,Jn=4,Pu=4,Ui={points:sl,point:ka,lines:Bu,line:ol,triangles:Jn,triangle:Pu,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Gu=0,Uu=1,yf=4,Yu=5120,_n=5121,Hu=5122,wn=5123,zu=5124,aa=5125,Di=34963,Qs=35040,ll=35044;function Pr(c,x,C,ie){var pe={},re=0,ae={uint8:_n,uint16:wn};x.oes_element_index_uint&&(ae.uint32=aa);function De(Fe){this.id=re++,pe[this.id]=this,this.buffer=Fe,this.primType=yf,this.vertCount=0,this.type=0}De.prototype.bind=function(){this.buffer.bind()};var Ae=[];function Be(Fe){var V=Ae.pop();return V||(V=new De(C.create(null,Di,!0,!1)._buffer)),Pe(V,Fe,Qs,-1,-1,0,0),V}function Ge(Fe){Ae.push(Fe)}function Pe(Fe,V,ne,Re,rt,Se,Qe){Fe.buffer.bind();var je;if(V){var pt=Qe;!Qe&&(!i(V)||On(V)&&!i(V.data))&&(pt=x.oes_element_index_uint?aa:wn),C._initBuffer(Fe.buffer,V,ne,pt,3)}else c.bufferData(Di,Se,ne),Fe.buffer.dtype=je||_n,Fe.buffer.usage=ne,Fe.buffer.dimension=3,Fe.buffer.byteLength=Se;if(je=Qe,!Qe){switch(Fe.buffer.dtype){case _n:case Yu:je=_n;break;case wn:case Hu:je=wn;break;case aa:case zu:je=aa;break;default:w.raise("unsupported type for element array")}Fe.buffer.dtype=je}Fe.type=je,w(je!==aa||!!x.oes_element_index_uint,"32 bit element buffers not supported, enable oes_element_index_uint first");var ye=rt;ye<0&&(ye=Fe.buffer.byteLength,je===wn?ye>>=1:je===aa&&(ye>>=2)),Fe.vertCount=ye;var me=Re;if(Re<0){me=yf;var ot=Fe.buffer.dimension;ot===1&&(me=Gu),ot===2&&(me=Uu),ot===3&&(me=yf)}Fe.primType=me}function We(Fe){ie.elementsCount--,w(Fe.buffer!==null,"must not double destroy elements"),delete pe[Fe.id],Fe.buffer.destroy(),Fe.buffer=null}function Oe(Fe,V){var ne=C.create(null,Di,!0),Re=new De(ne._buffer);ie.elementsCount++;function rt(Se){if(!Se)ne(),Re.primType=yf,Re.vertCount=0,Re.type=_n;else if(typeof Se=="number")ne(Se),Re.primType=yf,Re.vertCount=Se|0,Re.type=_n;else{var Qe=null,je=ll,pt=-1,ye=-1,me=0,ot=0;Array.isArray(Se)||i(Se)||On(Se)?Qe=Se:(w.type(Se,"object","invalid arguments for elements"),"data"in Se&&(Qe=Se.data,w(Array.isArray(Qe)||i(Qe)||On(Qe),"invalid data for element buffer")),"usage"in Se&&(w.parameter(Se.usage,Ks,"invalid element buffer usage"),je=Ks[Se.usage]),"primitive"in Se&&(w.parameter(Se.primitive,Ui,"invalid element buffer primitive"),pt=Ui[Se.primitive]),"count"in Se&&(w(typeof Se.count=="number"&&Se.count>=0,"invalid vertex count for elements"),ye=Se.count|0),"type"in Se&&(w.parameter(Se.type,ae,"invalid buffer type"),ot=ae[Se.type]),"length"in Se?me=Se.length|0:(me=ye,ot===wn||ot===Hu?me*=2:(ot===aa||ot===zu)&&(me*=4))),Pe(Re,Qe,je,pt,ye,me,ot)}return rt}return rt(Fe),rt._reglType="elements",rt._elements=Re,rt.subdata=function(Se,Qe){return ne.subdata(Se,Qe),rt},rt.destroy=function(){We(Re)},rt}return{create:Oe,createStream:Be,destroyStream:Ge,getElements:function(Fe){return typeof Fe=="function"&&Fe._elements instanceof De?Fe._elements:null},clear:function(){zn(pe).forEach(We)}}}var Yi=new Float32Array(1),ul=new Uint32Array(Yi.buffer),rd=5123;function Js(c){for(var x=jt.allocType(rd,c.length),C=0;C<c.length;++C)if(isNaN(c[C]))x[C]=65535;else if(c[C]===1/0)x[C]=31744;else if(c[C]===-1/0)x[C]=64512;else{Yi[0]=c[C];var ie=ul[0],pe=ie>>>31<<15,re=(ie<<1>>>24)-127,ae=ie>>13&(1<<10)-1;if(re<-24)x[C]=pe;else if(re<-14){var De=-14-re;x[C]=pe+(ae+(1<<10)>>De)}else re>15?x[C]=pe+31744:x[C]=pe+(re+15<<10)+ae}return x}function Nr(c){return Array.isArray(c)||i(c)}var Wu=function(c){return!(c&c-1)&&!!c},nd=34467,hi=3553,bf=34067,Hi=34069,Ia=6408,eo=6406,ts=6407,Fa=6409,xf=6410,cl=32854,hl=32855,to=36194,dl=32819,id=32820,Vu=33635,Zn=34042,rs=6402,fa=34041,ro=35904,no=35906,wf=36193,vl=33776,_l=33777,pl=33778,ml=33779,Na=35986,$u=35987,Zu=34798,io=35840,gl=35841,zi=35842,ns=35843,Xu=36196,Sf=5121,yl=5123,sa=5125,Gn=5126,qu=10242,ad=10243,fd=10497,bl=33071,sd=33648,od=10240,Tf=10241,K=9728,Ee=9729,he=9984,gt=9985,Zt=9986,mr=9987,sn=33170,Ar=4352,xl=4353,ld=4354,ei=34046,ao=3317,ud=37440,Ef=37441,fo=37443,is=37444,gr=33984,cd=[he,Zt,gt,mr],as=[0,Fa,xf,ts,Ia],Un={};Un[Fa]=Un[eo]=Un[rs]=1,Un[fa]=Un[xf]=2,Un[ts]=Un[ro]=3,Un[Ia]=Un[no]=4;function Af(c){return"[object "+c+"]"}var Ku=Af("HTMLCanvasElement"),ju=Af("OffscreenCanvas"),fs=Af("CanvasRenderingContext2D"),Wi=Af("ImageBitmap"),ss=Af("HTMLImageElement"),wl=Af("HTMLVideoElement"),so=Object.keys(rl).concat([Ku,ju,fs,Wi,ss,wl]),Ba=[];Ba[Sf]=1,Ba[Gn]=4,Ba[wf]=2,Ba[yl]=2,Ba[sa]=4;var on=[];on[cl]=2,on[hl]=2,on[to]=2,on[fa]=4,on[vl]=.5,on[_l]=.5,on[pl]=1,on[ml]=1,on[Na]=.5,on[$u]=1,on[Zu]=1,on[io]=.5,on[gl]=.25,on[zi]=.5,on[ns]=.25,on[Xu]=.5;function os(c){return Array.isArray(c)&&(c.length===0||typeof c[0]=="number")}function Sl(c){if(!Array.isArray(c))return!1;var x=c.length;return!(x===0||!Nr(c[0]))}function di(c){return Object.prototype.toString.call(c)}function oa(c){return di(c)===Ku}function ls(c){return di(c)===ju}function hd(c){return di(c)===fs}function dd(c){return di(c)===Wi}function vd(c){return di(c)===ss}function oo(c){return di(c)===wl}function Df(c){if(!c)return!1;var x=di(c);return so.indexOf(x)>=0?!0:os(c)||Sl(c)||On(c)}function lo(c){return rl[Object.prototype.toString.call(c)]|0}function _d(c,x){var C=x.length;switch(c.type){case Sf:case yl:case sa:case Gn:var ie=jt.allocType(c.type,C);ie.set(x),c.data=ie;break;case wf:c.data=Js(x);break;default:w.raise("unsupported texture type, must specify a typed array")}}function Tl(c,x){return jt.allocType(c.type===wf?Gn:c.type,x)}function Qu(c,x){c.type===wf?(c.data=Js(x),jt.freeType(x)):c.data=x}function pd(c,x,C,ie,pe,re){for(var ae=c.width,De=c.height,Ae=c.channels,Be=ae*De*Ae,Ge=Tl(c,Be),Pe=0,We=0;We<De;++We)for(var Oe=0;Oe<ae;++Oe)for(var Fe=0;Fe<Ae;++Fe)Ge[Pe++]=x[C*Oe+ie*We+pe*Fe+re];Qu(c,Ge)}function Xr(c,x,C,ie,pe,re){var ae;if(typeof on[c]<"u"?ae=on[c]:ae=Un[c]*Ba[x],re&&(ae*=6),pe){for(var De=0,Ae=C;Ae>=1;)De+=ae*Ae*Ae,Ae/=2;return De}else return ae*C*ie}function Rn(c,x,C,ie,pe,re,ae){var De={"don't care":Ar,"dont care":Ar,nice:ld,fast:xl},Ae={repeat:fd,clamp:bl,mirror:sd},Be={nearest:K,linear:Ee},Ge=f({mipmap:mr,"nearest mipmap nearest":he,"linear mipmap nearest":gt,"nearest mipmap linear":Zt,"linear mipmap linear":mr},Be),Pe={none:0,browser:is},We={uint8:Sf,rgba4:dl,rgb565:Vu,"rgb5 a1":id},Oe={alpha:eo,luminance:Fa,"luminance alpha":xf,rgb:ts,rgba:Ia,rgba4:cl,"rgb5 a1":hl,rgb565:to},Fe={};x.ext_srgb&&(Oe.srgb=ro,Oe.srgba=no),x.oes_texture_float&&(We.float32=We.float=Gn),x.oes_texture_half_float&&(We.float16=We["half float"]=wf),x.webgl_depth_texture&&(f(Oe,{depth:rs,"depth stencil":fa}),f(We,{uint16:yl,uint32:sa,"depth stencil":Zn})),x.webgl_compressed_texture_s3tc&&f(Fe,{"rgb s3tc dxt1":vl,"rgba s3tc dxt1":_l,"rgba s3tc dxt3":pl,"rgba s3tc dxt5":ml}),x.webgl_compressed_texture_atc&&f(Fe,{"rgb atc":Na,"rgba atc explicit alpha":$u,"rgba atc interpolated alpha":Zu}),x.webgl_compressed_texture_pvrtc&&f(Fe,{"rgb pvrtc 4bppv1":io,"rgb pvrtc 2bppv1":gl,"rgba pvrtc 4bppv1":zi,"rgba pvrtc 2bppv1":ns}),x.webgl_compressed_texture_etc1&&(Fe["rgb etc1"]=Xu);var V=Array.prototype.slice.call(c.getParameter(nd));Object.keys(Fe).forEach(function(O){var fe=Fe[O];V.indexOf(fe)>=0&&(Oe[O]=fe)});var ne=Object.keys(Oe);C.textureFormats=ne;var Re=[];Object.keys(Oe).forEach(function(O){var fe=Oe[O];Re[fe]=O});var rt=[];Object.keys(We).forEach(function(O){var fe=We[O];rt[fe]=O});var Se=[];Object.keys(Be).forEach(function(O){var fe=Be[O];Se[fe]=O});var Qe=[];Object.keys(Ge).forEach(function(O){var fe=Ge[O];Qe[fe]=O});var je=[];Object.keys(Ae).forEach(function(O){var fe=Ae[O];je[fe]=O});var pt=ne.reduce(function(O,fe){var Q=Oe[fe];return Q===Fa||Q===eo||Q===Fa||Q===xf||Q===rs||Q===fa||x.ext_srgb&&(Q===ro||Q===no)?O[Q]=Q:Q===hl||fe.indexOf("rgba")>=0?O[Q]=Ia:O[Q]=ts,O},{});function ye(){this.internalformat=Ia,this.format=Ia,this.type=Sf,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=is,this.width=0,this.height=0,this.channels=0}function me(O,fe){O.internalformat=fe.internalformat,O.format=fe.format,O.type=fe.type,O.compressed=fe.compressed,O.premultiplyAlpha=fe.premultiplyAlpha,O.flipY=fe.flipY,O.unpackAlignment=fe.unpackAlignment,O.colorSpace=fe.colorSpace,O.width=fe.width,O.height=fe.height,O.channels=fe.channels}function ot(O,fe){if(!(typeof fe!="object"||!fe)){if("premultiplyAlpha"in fe&&(w.type(fe.premultiplyAlpha,"boolean","invalid premultiplyAlpha"),O.premultiplyAlpha=fe.premultiplyAlpha),"flipY"in fe&&(w.type(fe.flipY,"boolean","invalid texture flip"),O.flipY=fe.flipY),"alignment"in fe&&(w.oneOf(fe.alignment,[1,2,4,8],"invalid texture unpack alignment"),O.unpackAlignment=fe.alignment),"colorSpace"in fe&&(w.parameter(fe.colorSpace,Pe,"invalid colorSpace"),O.colorSpace=Pe[fe.colorSpace]),"type"in fe){var Q=fe.type;w(x.oes_texture_float||!(Q==="float"||Q==="float32"),"you must enable the OES_texture_float extension in order to use floating point textures."),w(x.oes_texture_half_float||!(Q==="half float"||Q==="float16"),"you must enable the OES_texture_half_float extension in order to use 16-bit floating point textures."),w(x.webgl_depth_texture||!(Q==="uint16"||Q==="uint32"||Q==="depth stencil"),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),w.parameter(Q,We,"invalid texture type"),O.type=We[Q]}var st=O.width,zt=O.height,E=O.channels,m=!1;"shape"in fe?(w(Array.isArray(fe.shape)&&fe.shape.length>=2,"shape must be an array"),st=fe.shape[0],zt=fe.shape[1],fe.shape.length===3&&(E=fe.shape[2],w(E>0&&E<=4,"invalid number of channels"),m=!0),w(st>=0&&st<=C.maxTextureSize,"invalid width"),w(zt>=0&&zt<=C.maxTextureSize,"invalid height")):("radius"in fe&&(st=zt=fe.radius,w(st>=0&&st<=C.maxTextureSize,"invalid radius")),"width"in fe&&(st=fe.width,w(st>=0&&st<=C.maxTextureSize,"invalid width")),"height"in fe&&(zt=fe.height,w(zt>=0&&zt<=C.maxTextureSize,"invalid height")),"channels"in fe&&(E=fe.channels,w(E>0&&E<=4,"invalid number of channels"),m=!0)),O.width=st|0,O.height=zt|0,O.channels=E|0;var B=!1;if("format"in fe){var Z=fe.format;w(x.webgl_depth_texture||!(Z==="depth"||Z==="depth stencil"),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),w.parameter(Z,Oe,"invalid texture format");var X=O.internalformat=Oe[Z];O.format=pt[X],Z in We&&("type"in fe||(O.type=We[Z])),Z in Fe&&(O.compressed=!0),B=!0}!m&&B?O.channels=Un[O.format]:m&&!B?O.channels!==as[O.format]&&(O.format=O.internalformat=as[O.channels]):B&&m&&w(O.channels===Un[O.format],"number of channels inconsistent with specified format")}}function Ve(O){c.pixelStorei(ud,O.flipY),c.pixelStorei(Ef,O.premultiplyAlpha),c.pixelStorei(fo,O.colorSpace),c.pixelStorei(ao,O.unpackAlignment)}function ke(){ye.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function $e(O,fe){var Q=null;if(Df(fe)?Q=fe:fe&&(w.type(fe,"object","invalid pixel data type"),ot(O,fe),"x"in fe&&(O.xOffset=fe.x|0),"y"in fe&&(O.yOffset=fe.y|0),Df(fe.data)&&(Q=fe.data)),w(!O.compressed||Q instanceof Uint8Array,"compressed texture data must be stored in a uint8array"),fe.copy){w(!Q,"can not specify copy and data field for the same texture");var st=pe.viewportWidth,zt=pe.viewportHeight;O.width=O.width||st-O.xOffset,O.height=O.height||zt-O.yOffset,O.needsCopy=!0,w(O.xOffset>=0&&O.xOffset<st&&O.yOffset>=0&&O.yOffset<zt&&O.width>0&&O.width<=st&&O.height>0&&O.height<=zt,"copy texture read out of bounds")}else if(!Q)O.width=O.width||1,O.height=O.height||1,O.channels=O.channels||4;else if(i(Q))O.channels=O.channels||4,O.data=Q,!("type"in fe)&&O.type===Sf&&(O.type=lo(Q));else if(os(Q))O.channels=O.channels||4,_d(O,Q),O.alignment=1,O.needsFree=!0;else if(On(Q)){var E=Q.data;!Array.isArray(E)&&O.type===Sf&&(O.type=lo(E));var m=Q.shape,B=Q.stride,Z,X,G,N,W,D;m.length===3?(G=m[2],D=B[2]):(w(m.length===2,"invalid ndarray pixel data, must be 2 or 3D"),G=1,D=1),Z=m[0],X=m[1],N=B[0],W=B[1],O.alignment=1,O.width=Z,O.height=X,O.channels=G,O.format=O.internalformat=as[G],O.needsFree=!0,pd(O,E,N,W,D,Q.offset)}else if(oa(Q)||ls(Q)||hd(Q))oa(Q)||ls(Q)?O.element=Q:O.element=Q.canvas,O.width=O.element.width,O.height=O.element.height,O.channels=4;else if(dd(Q))O.element=Q,O.width=Q.width,O.height=Q.height,O.channels=4;else if(vd(Q))O.element=Q,O.width=Q.naturalWidth,O.height=Q.naturalHeight,O.channels=4;else if(oo(Q))O.element=Q,O.width=Q.videoWidth,O.height=Q.videoHeight,O.channels=4;else if(Sl(Q)){var R=O.width||Q[0].length,L=O.height||Q.length,j=O.channels;Nr(Q[0][0])?j=j||Q[0][0].length:j=j||1;for(var q=es.shape(Q),ve=1,be=0;be<q.length;++be)ve*=q[be];var Ye=Tl(O,ve);es.flatten(Q,q,"",Ye),Qu(O,Ye),O.alignment=1,O.width=R,O.height=L,O.channels=j,O.format=O.internalformat=as[j],O.needsFree=!0}O.type===Gn?w(C.extensions.indexOf("oes_texture_float")>=0,"oes_texture_float extension not enabled"):O.type===wf&&w(C.extensions.indexOf("oes_texture_half_float")>=0,"oes_texture_half_float extension not enabled")}function qe(O,fe,Q){var st=O.element,zt=O.data,E=O.internalformat,m=O.format,B=O.type,Z=O.width,X=O.height;Ve(O),st?c.texImage2D(fe,Q,m,m,B,st):O.compressed?c.compressedTexImage2D(fe,Q,E,Z,X,0,zt):O.needsCopy?(ie(),c.copyTexImage2D(fe,Q,m,O.xOffset,O.yOffset,Z,X,0)):c.texImage2D(fe,Q,m,Z,X,0,m,B,zt||null)}function Mt(O,fe,Q,st,zt){var E=O.element,m=O.data,B=O.internalformat,Z=O.format,X=O.type,G=O.width,N=O.height;Ve(O),E?c.texSubImage2D(fe,zt,Q,st,Z,X,E):O.compressed?c.compressedTexSubImage2D(fe,zt,Q,st,B,G,N,m):O.needsCopy?(ie(),c.copyTexSubImage2D(fe,zt,Q,st,O.xOffset,O.yOffset,G,N)):c.texSubImage2D(fe,zt,Q,st,G,N,Z,X,m)}var Lt=[];function Ke(){return Lt.pop()||new ke}function Je(O){O.needsFree&&jt.freeType(O.data),ke.call(O),Lt.push(O)}function wt(){ye.call(this),this.genMipmaps=!1,this.mipmapHint=Ar,this.mipmask=0,this.images=Array(16)}function Rt(O,fe,Q){var st=O.images[0]=Ke();O.mipmask=1,st.width=O.width=fe,st.height=O.height=Q,st.channels=O.channels=4}function Vt(O,fe){var Q=null;if(Df(fe))Q=O.images[0]=Ke(),me(Q,O),$e(Q,fe),O.mipmask=1;else if(ot(O,fe),Array.isArray(fe.mipmap))for(var st=fe.mipmap,zt=0;zt<st.length;++zt)Q=O.images[zt]=Ke(),me(Q,O),Q.width>>=zt,Q.height>>=zt,$e(Q,st[zt]),O.mipmask|=1<<zt;else Q=O.images[0]=Ke(),me(Q,O),$e(Q,fe),O.mipmask=1;me(O,O.images[0]),O.compressed&&(O.internalformat===vl||O.internalformat===_l||O.internalformat===pl||O.internalformat===ml)&&w(O.width%4===0&&O.height%4===0,"for compressed texture formats, mipmap level 0 must have width and height that are a multiple of 4")}function Mr(O,fe){for(var Q=O.images,st=0;st<Q.length;++st){if(!Q[st])return;qe(Q[st],fe,st)}}var Lr=[];function Xt(){var O=Lr.pop()||new wt;ye.call(O),O.mipmask=0;for(var fe=0;fe<16;++fe)O.images[fe]=null;return O}function Dr(O){for(var fe=O.images,Q=0;Q<fe.length;++Q)fe[Q]&&Je(fe[Q]),fe[Q]=null;Lr.push(O)}function pr(){this.minFilter=K,this.magFilter=K,this.wrapS=bl,this.wrapT=bl,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=Ar}function qr(O,fe){if("min"in fe){var Q=fe.min;w.parameter(Q,Ge),O.minFilter=Ge[Q],cd.indexOf(O.minFilter)>=0&&!("faces"in fe)&&(O.genMipmaps=!0)}if("mag"in fe){var st=fe.mag;w.parameter(st,Be),O.magFilter=Be[st]}var zt=O.wrapS,E=O.wrapT;if("wrap"in fe){var m=fe.wrap;typeof m=="string"?(w.parameter(m,Ae),zt=E=Ae[m]):Array.isArray(m)&&(w.parameter(m[0],Ae),w.parameter(m[1],Ae),zt=Ae[m[0]],E=Ae[m[1]])}else{if("wrapS"in fe){var B=fe.wrapS;w.parameter(B,Ae),zt=Ae[B]}if("wrapT"in fe){var Z=fe.wrapT;w.parameter(Z,Ae),E=Ae[Z]}}if(O.wrapS=zt,O.wrapT=E,"anisotropic"in fe){var X=fe.anisotropic;w(typeof X=="number"&&X>=1&&X<=C.maxAnisotropic,"aniso samples must be between 1 and "),O.anisotropic=fe.anisotropic}if("mipmap"in fe){var G=!1;switch(typeof fe.mipmap){case"string":w.parameter(fe.mipmap,De,"invalid mipmap hint"),O.mipmapHint=De[fe.mipmap],O.genMipmaps=!0,G=!0;break;case"boolean":G=O.genMipmaps=fe.mipmap;break;case"object":w(Array.isArray(fe.mipmap),"invalid mipmap type"),O.genMipmaps=!1,G=!0;break;default:w.raise("invalid mipmap type")}G&&!("min"in fe)&&(O.minFilter=he)}}function Kr(O,fe){c.texParameteri(fe,Tf,O.minFilter),c.texParameteri(fe,od,O.magFilter),c.texParameteri(fe,qu,O.wrapS),c.texParameteri(fe,ad,O.wrapT),x.ext_texture_filter_anisotropic&&c.texParameteri(fe,ei,O.anisotropic),O.genMipmaps&&(c.hint(sn,O.mipmapHint),c.generateMipmap(fe))}var en=0,ln={},mn=C.maxTextureUnits,Wr=Array(mn).map(function(){return null});function Ut(O){ye.call(this),this.mipmask=0,this.internalformat=Ia,this.id=en++,this.refCount=1,this.target=O,this.texture=c.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new pr,ae.profile&&(this.stats={size:0})}function gn(O){c.activeTexture(gr),c.bindTexture(O.target,O.texture)}function cr(){var O=Wr[0];O?c.bindTexture(O.target,O.texture):c.bindTexture(hi,null)}function Tt(O){var fe=O.texture;w(fe,"must not double destroy texture");var Q=O.unit,st=O.target;Q>=0&&(c.activeTexture(gr+Q),c.bindTexture(st,null),Wr[Q]=null),c.deleteTexture(fe),O.texture=null,O.params=null,O.pixels=null,O.refCount=0,delete ln[O.id],re.textureCount--}f(Ut.prototype,{bind:function(){var O=this;O.bindCount+=1;var fe=O.unit;if(fe<0){for(var Q=0;Q<mn;++Q){var st=Wr[Q];if(st){if(st.bindCount>0)continue;st.unit=-1}Wr[Q]=O,fe=Q;break}fe>=mn&&w.raise("insufficient number of texture units"),ae.profile&&re.maxTextureUnits<fe+1&&(re.maxTextureUnits=fe+1),O.unit=fe,c.activeTexture(gr+fe),c.bindTexture(O.target,O.texture)}return fe},unbind:function(){this.bindCount-=1},decRef:function(){--this.refCount<=0&&Tt(this)}});function qt(O,fe){var Q=new Ut(hi);ln[Q.id]=Q,re.textureCount++;function st(m,B){var Z=Q.texInfo;pr.call(Z);var X=Xt();return typeof m=="number"?typeof B=="number"?Rt(X,m|0,B|0):Rt(X,m|0,m|0):m?(w.type(m,"object","invalid arguments to regl.texture"),qr(Z,m),Vt(X,m)):Rt(X,1,1),Z.genMipmaps&&(X.mipmask=(X.width<<1)-1),Q.mipmask=X.mipmask,me(Q,X),w.texture2D(Z,X,C),Q.internalformat=X.internalformat,st.width=X.width,st.height=X.height,gn(Q),Mr(X,hi),Kr(Z,hi),cr(),Dr(X),ae.profile&&(Q.stats.size=Xr(Q.internalformat,Q.type,X.width,X.height,Z.genMipmaps,!1)),st.format=Re[Q.internalformat],st.type=rt[Q.type],st.mag=Se[Z.magFilter],st.min=Qe[Z.minFilter],st.wrapS=je[Z.wrapS],st.wrapT=je[Z.wrapT],st}function zt(m,B,Z,X){w(!!m,"must specify image data");var G=B|0,N=Z|0,W=X|0,D=Ke();return me(D,Q),D.width=0,D.height=0,$e(D,m),D.width=D.width||(Q.width>>W)-G,D.height=D.height||(Q.height>>W)-N,w(Q.type===D.type&&Q.format===D.format&&Q.internalformat===D.internalformat,"incompatible format for texture.subimage"),w(G>=0&&N>=0&&G+D.width<=Q.width&&N+D.height<=Q.height,"texture.subimage write out of bounds"),w(Q.mipmask&1<<W,"missing mipmap data"),w(D.data||D.element||D.needsCopy,"missing image data"),gn(Q),Mt(D,hi,G,N,W),cr(),Je(D),st}function E(m,B){var Z=m|0,X=B|0||Z;if(Z===Q.width&&X===Q.height)return st;st.width=Q.width=Z,st.height=Q.height=X,gn(Q);for(var G=0;Q.mipmask>>G;++G){var N=Z>>G,W=X>>G;if(!N||!W)break;c.texImage2D(hi,G,Q.format,N,W,0,Q.format,Q.type,null)}return cr(),ae.profile&&(Q.stats.size=Xr(Q.internalformat,Q.type,Z,X,!1,!1)),st}return st(O,fe),st.subimage=zt,st.resize=E,st._reglType="texture2d",st._texture=Q,ae.profile&&(st.stats=Q.stats),st.destroy=function(){Q.decRef()},st}function er(O,fe,Q,st,zt,E){var m=new Ut(bf);ln[m.id]=m,re.cubeCount++;var B=new Array(6);function Z(N,W,D,R,L,j){var q,ve=m.texInfo;for(pr.call(ve),q=0;q<6;++q)B[q]=Xt();if(typeof N=="number"||!N){var be=N|0||1;for(q=0;q<6;++q)Rt(B[q],be,be)}else if(typeof N=="object")if(W)Vt(B[0],N),Vt(B[1],W),Vt(B[2],D),Vt(B[3],R),Vt(B[4],L),Vt(B[5],j);else if(qr(ve,N),ot(m,N),"faces"in N){var Ye=N.faces;for(w(Array.isArray(Ye)&&Ye.length===6,"cube faces must be a length 6 array"),q=0;q<6;++q)w(typeof Ye[q]=="object"&&!!Ye[q],"invalid input for cube map face"),me(B[q],m),Vt(B[q],Ye[q])}else for(q=0;q<6;++q)Vt(B[q],N);else w.raise("invalid arguments to cube map");for(me(m,B[0]),w.optional(function(){C.npotTextureCube||w(Wu(m.width)&&Wu(m.height),"your browser does not support non power or two texture dimensions")}),ve.genMipmaps?m.mipmask=(B[0].width<<1)-1:m.mipmask=B[0].mipmask,w.textureCube(m,ve,B,C),m.internalformat=B[0].internalformat,Z.width=B[0].width,Z.height=B[0].height,gn(m),q=0;q<6;++q)Mr(B[q],Hi+q);for(Kr(ve,bf),cr(),ae.profile&&(m.stats.size=Xr(m.internalformat,m.type,Z.width,Z.height,ve.genMipmaps,!0)),Z.format=Re[m.internalformat],Z.type=rt[m.type],Z.mag=Se[ve.magFilter],Z.min=Qe[ve.minFilter],Z.wrapS=je[ve.wrapS],Z.wrapT=je[ve.wrapT],q=0;q<6;++q)Dr(B[q]);return Z}function X(N,W,D,R,L){w(!!W,"must specify image data"),w(typeof N=="number"&&N===(N|0)&&N>=0&&N<6,"invalid face");var j=D|0,q=R|0,ve=L|0,be=Ke();return me(be,m),be.width=0,be.height=0,$e(be,W),be.width=be.width||(m.width>>ve)-j,be.height=be.height||(m.height>>ve)-q,w(m.type===be.type&&m.format===be.format&&m.internalformat===be.internalformat,"incompatible format for texture.subimage"),w(j>=0&&q>=0&&j+be.width<=m.width&&q+be.height<=m.height,"texture.subimage write out of bounds"),w(m.mipmask&1<<ve,"missing mipmap data"),w(be.data||be.element||be.needsCopy,"missing image data"),gn(m),Mt(be,Hi+N,j,q,ve),cr(),Je(be),Z}function G(N){var W=N|0;if(W!==m.width){Z.width=m.width=W,Z.height=m.height=W,gn(m);for(var D=0;D<6;++D)for(var R=0;m.mipmask>>R;++R)c.texImage2D(Hi+D,R,m.format,W>>R,W>>R,0,m.format,m.type,null);return cr(),ae.profile&&(m.stats.size=Xr(m.internalformat,m.type,Z.width,Z.height,!1,!0)),Z}}return Z(O,fe,Q,st,zt,E),Z.subimage=X,Z.resize=G,Z._reglType="textureCube",Z._texture=m,ae.profile&&(Z.stats=m.stats),Z.destroy=function(){m.decRef()},Z}function Vr(){for(var O=0;O<mn;++O)c.activeTexture(gr+O),c.bindTexture(hi,null),Wr[O]=null;zn(ln).forEach(Tt),re.cubeCount=0,re.textureCount=0}ae.profile&&(re.getTotalTextureSize=function(){var O=0;return Object.keys(ln).forEach(function(fe){O+=ln[fe].stats.size}),O});function yi(){for(var O=0;O<mn;++O){var fe=Wr[O];fe&&(fe.bindCount=0,fe.unit=-1,Wr[O]=null)}zn(ln).forEach(function(Q){Q.texture=c.createTexture(),c.bindTexture(Q.target,Q.texture);for(var st=0;st<32;++st)if((Q.mipmask&1<<st)!==0)if(Q.target===hi)c.texImage2D(hi,st,Q.internalformat,Q.width>>st,Q.height>>st,0,Q.internalformat,Q.type,null);else for(var zt=0;zt<6;++zt)c.texImage2D(Hi+zt,st,Q.internalformat,Q.width>>st,Q.height>>st,0,Q.internalformat,Q.type,null);Kr(Q.texInfo,Q.target)})}function ya(){for(var O=0;O<mn;++O){var fe=Wr[O];fe&&(fe.bindCount=0,fe.unit=-1,Wr[O]=null),c.activeTexture(gr+O),c.bindTexture(hi,null),c.bindTexture(bf,null)}}return{create2D:qt,createCube:er,clear:Vr,getTexture:function(O){return null},restore:yi,refresh:ya}}var la=36161,uo=32854,El=32855,Ju=36194,co=33189,Lf=36168,ho=34041,Pa=35907,Of=34836,Rf=34842,us=34843,Cn=[];Cn[uo]=2,Cn[El]=2,Cn[Ju]=2,Cn[co]=2,Cn[Lf]=1,Cn[ho]=4,Cn[Pa]=4,Cn[Of]=16,Cn[Rf]=8,Cn[us]=6;function ec(c,x,C){return Cn[c]*x*C}var md=function(c,x,C,ie,pe){var re={rgba4:uo,rgb565:Ju,"rgb5 a1":El,depth:co,stencil:Lf,"depth stencil":ho};x.ext_srgb&&(re.srgba=Pa),x.ext_color_buffer_half_float&&(re.rgba16f=Rf,re.rgb16f=us),x.webgl_color_buffer_float&&(re.rgba32f=Of);var ae=[];Object.keys(re).forEach(function(Oe){var Fe=re[Oe];ae[Fe]=Oe});var De=0,Ae={};function Be(Oe){this.id=De++,this.refCount=1,this.renderbuffer=Oe,this.format=uo,this.width=0,this.height=0,pe.profile&&(this.stats={size:0})}Be.prototype.decRef=function(){--this.refCount<=0&&Ge(this)};function Ge(Oe){var Fe=Oe.renderbuffer;w(Fe,"must not double destroy renderbuffer"),c.bindRenderbuffer(la,null),c.deleteRenderbuffer(Fe),Oe.renderbuffer=null,Oe.refCount=0,delete Ae[Oe.id],ie.renderbufferCount--}function Pe(Oe,Fe){var V=new Be(c.createRenderbuffer());Ae[V.id]=V,ie.renderbufferCount++;function ne(rt,Se){var Qe=0,je=0,pt=uo;if(typeof rt=="object"&&rt){var ye=rt;if("shape"in ye){var me=ye.shape;w(Array.isArray(me)&&me.length>=2,"invalid renderbuffer shape"),Qe=me[0]|0,je=me[1]|0}else"radius"in ye&&(Qe=je=ye.radius|0),"width"in ye&&(Qe=ye.width|0),"height"in ye&&(je=ye.height|0);"format"in ye&&(w.parameter(ye.format,re,"invalid renderbuffer format"),pt=re[ye.format])}else typeof rt=="number"?(Qe=rt|0,typeof Se=="number"?je=Se|0:je=Qe):rt?w.raise("invalid arguments to renderbuffer constructor"):Qe=je=1;if(w(Qe>0&&je>0&&Qe<=C.maxRenderbufferSize&&je<=C.maxRenderbufferSize,"invalid renderbuffer size"),!(Qe===V.width&&je===V.height&&pt===V.format))return ne.width=V.width=Qe,ne.height=V.height=je,V.format=pt,c.bindRenderbuffer(la,V.renderbuffer),c.renderbufferStorage(la,pt,Qe,je),w(c.getError()===0,"invalid render buffer format"),pe.profile&&(V.stats.size=ec(V.format,V.width,V.height)),ne.format=ae[V.format],ne}function Re(rt,Se){var Qe=rt|0,je=Se|0||Qe;return Qe===V.width&&je===V.height||(w(Qe>0&&je>0&&Qe<=C.maxRenderbufferSize&&je<=C.maxRenderbufferSize,"invalid renderbuffer size"),ne.width=V.width=Qe,ne.height=V.height=je,c.bindRenderbuffer(la,V.renderbuffer),c.renderbufferStorage(la,V.format,Qe,je),w(c.getError()===0,"invalid render buffer format"),pe.profile&&(V.stats.size=ec(V.format,V.width,V.height))),ne}return ne(Oe,Fe),ne.resize=Re,ne._reglType="renderbuffer",ne._renderbuffer=V,pe.profile&&(ne.stats=V.stats),ne.destroy=function(){V.decRef()},ne}pe.profile&&(ie.getTotalRenderbufferSize=function(){var Oe=0;return Object.keys(Ae).forEach(function(Fe){Oe+=Ae[Fe].stats.size}),Oe});function We(){zn(Ae).forEach(function(Oe){Oe.renderbuffer=c.createRenderbuffer(),c.bindRenderbuffer(la,Oe.renderbuffer),c.renderbufferStorage(la,Oe.format,Oe.width,Oe.height)}),c.bindRenderbuffer(la,null)}return{create:Pe,clear:function(){zn(Ae).forEach(Ge)},restore:We}},Vi=36160,Al=36161,Ga=3553,Ua=34069,Cf=36064,Dl=36096,b=36128,Ya=33306,cs=36053,ti=36054,ur=36055,gd=36057,yd=36061,bd=36193,Ha=5121,xd=5126,tc=6407,rc=6408,wd=6402,Sd=[tc,rc],vi=[];vi[rc]=4,vi[tc]=3;var vo=[];vo[Ha]=1,vo[xd]=4,vo[bd]=2;var Td=32854,Ed=32855,Ad=36194,Dd=33189,$i=36168,nc=34041,Ld=35907,Od=34836,Rd=34842,Cd=34843,za=[Td,Ed,Ad,Ld,Rd,Cd,Od],Mf={};Mf[cs]="complete",Mf[ti]="incomplete attachment",Mf[gd]="incomplete dimensions",Mf[ur]="incomplete, missing attachment",Mf[yd]="unsupported";function Md(c,x,C,ie,pe,re){var ae={cur:null,next:null,dirty:!1,setFBO:null},De=["rgba"],Ae=["rgba4","rgb565","rgb5 a1"];x.ext_srgb&&Ae.push("srgba"),x.ext_color_buffer_half_float&&Ae.push("rgba16f","rgb16f"),x.webgl_color_buffer_float&&Ae.push("rgba32f");var Be=["uint8"];x.oes_texture_half_float&&Be.push("half float","float16"),x.oes_texture_float&&Be.push("float","float32");function Ge(ke,$e,qe){this.target=ke,this.texture=$e,this.renderbuffer=qe;var Mt=0,Lt=0;$e?(Mt=$e.width,Lt=$e.height):qe&&(Mt=qe.width,Lt=qe.height),this.width=Mt,this.height=Lt}function Pe(ke){ke&&(ke.texture&&ke.texture._texture.decRef(),ke.renderbuffer&&ke.renderbuffer._renderbuffer.decRef())}function We(ke,$e,qe){if(!!ke)if(ke.texture){var Mt=ke.texture._texture,Lt=Math.max(1,Mt.width),Ke=Math.max(1,Mt.height);w(Lt===$e&&Ke===qe,"inconsistent width/height for supplied texture"),Mt.refCount+=1}else{var Je=ke.renderbuffer._renderbuffer;w(Je.width===$e&&Je.height===qe,"inconsistent width/height for renderbuffer"),Je.refCount+=1}}function Oe(ke,$e){$e&&($e.texture?c.framebufferTexture2D(Vi,ke,$e.target,$e.texture._texture.texture,0):c.framebufferRenderbuffer(Vi,ke,Al,$e.renderbuffer._renderbuffer.renderbuffer))}function Fe(ke){var $e=Ga,qe=null,Mt=null,Lt=ke;typeof ke=="object"&&(Lt=ke.data,"target"in ke&&($e=ke.target|0)),w.type(Lt,"function","invalid attachment data");var Ke=Lt._reglType;return Ke==="texture2d"?(qe=Lt,w($e===Ga)):Ke==="textureCube"?(qe=Lt,w($e>=Ua&&$e<Ua+6,"invalid cube map target")):Ke==="renderbuffer"?(Mt=Lt,$e=Al):w.raise("invalid regl object for attachment"),new Ge($e,qe,Mt)}function V(ke,$e,qe,Mt,Lt){if(qe){var Ke=ie.create2D({width:ke,height:$e,format:Mt,type:Lt});return Ke._texture.refCount=0,new Ge(Ga,Ke,null)}else{var Je=pe.create({width:ke,height:$e,format:Mt});return Je._renderbuffer.refCount=0,new Ge(Al,null,Je)}}function ne(ke){return ke&&(ke.texture||ke.renderbuffer)}function Re(ke,$e,qe){ke&&(ke.texture?ke.texture.resize($e,qe):ke.renderbuffer&&ke.renderbuffer.resize($e,qe),ke.width=$e,ke.height=qe)}var rt=0,Se={};function Qe(){this.id=rt++,Se[this.id]=this,this.framebuffer=c.createFramebuffer(),this.width=0,this.height=0,this.colorAttachments=[],this.depthAttachment=null,this.stencilAttachment=null,this.depthStencilAttachment=null}function je(ke){ke.colorAttachments.forEach(Pe),Pe(ke.depthAttachment),Pe(ke.stencilAttachment),Pe(ke.depthStencilAttachment)}function pt(ke){var $e=ke.framebuffer;w($e,"must not double destroy framebuffer"),c.deleteFramebuffer($e),ke.framebuffer=null,re.framebufferCount--,delete Se[ke.id]}function ye(ke){var $e;c.bindFramebuffer(Vi,ke.framebuffer);var qe=ke.colorAttachments;for($e=0;$e<qe.length;++$e)Oe(Cf+$e,qe[$e]);for($e=qe.length;$e<C.maxColorAttachments;++$e)c.framebufferTexture2D(Vi,Cf+$e,Ga,null,0);c.framebufferTexture2D(Vi,Ya,Ga,null,0),c.framebufferTexture2D(Vi,Dl,Ga,null,0),c.framebufferTexture2D(Vi,b,Ga,null,0),Oe(Dl,ke.depthAttachment),Oe(b,ke.stencilAttachment),Oe(Ya,ke.depthStencilAttachment);var Mt=c.checkFramebufferStatus(Vi);!c.isContextLost()&&Mt!==cs&&w.raise("framebuffer configuration not supported, status = "+Mf[Mt]),c.bindFramebuffer(Vi,ae.next?ae.next.framebuffer:null),ae.cur=ae.next,c.getError()}function me(ke,$e){var qe=new Qe;re.framebufferCount++;function Mt(Ke,Je){var wt;w(ae.next!==qe,"can not update framebuffer which is currently in use");var Rt=0,Vt=0,Mr=!0,Lr=!0,Xt=null,Dr=!0,pr="rgba",qr="uint8",Kr=1,en=null,ln=null,mn=null,Wr=!1;if(typeof Ke=="number")Rt=Ke|0,Vt=Je|0||Rt;else if(!Ke)Rt=Vt=1;else{w.type(Ke,"object","invalid arguments for framebuffer");var Ut=Ke;if("shape"in Ut){var gn=Ut.shape;w(Array.isArray(gn)&&gn.length>=2,"invalid shape for framebuffer"),Rt=gn[0],Vt=gn[1]}else"radius"in Ut&&(Rt=Vt=Ut.radius),"width"in Ut&&(Rt=Ut.width),"height"in Ut&&(Vt=Ut.height);("color"in Ut||"colors"in Ut)&&(Xt=Ut.color||Ut.colors,Array.isArray(Xt)&&w(Xt.length===1||x.webgl_draw_buffers,"multiple render targets not supported")),Xt||("colorCount"in Ut&&(Kr=Ut.colorCount|0,w(Kr>0,"invalid color buffer count")),"colorTexture"in Ut&&(Dr=!!Ut.colorTexture,pr="rgba4"),"colorType"in Ut&&(qr=Ut.colorType,Dr?(w(x.oes_texture_float||!(qr==="float"||qr==="float32"),"you must enable OES_texture_float in order to use floating point framebuffer objects"),w(x.oes_texture_half_float||!(qr==="half float"||qr==="float16"),"you must enable OES_texture_half_float in order to use 16-bit floating point framebuffer objects")):qr==="half float"||qr==="float16"?(w(x.ext_color_buffer_half_float,"you must enable EXT_color_buffer_half_float to use 16-bit render buffers"),pr="rgba16f"):(qr==="float"||qr==="float32")&&(w(x.webgl_color_buffer_float,"you must enable WEBGL_color_buffer_float in order to use 32-bit floating point renderbuffers"),pr="rgba32f"),w.oneOf(qr,Be,"invalid color type")),"colorFormat"in Ut&&(pr=Ut.colorFormat,De.indexOf(pr)>=0?Dr=!0:Ae.indexOf(pr)>=0?Dr=!1:w.optional(function(){Dr?w.oneOf(Ut.colorFormat,De,"invalid color format for texture"):w.oneOf(Ut.colorFormat,Ae,"invalid color format for renderbuffer")}))),("depthTexture"in Ut||"depthStencilTexture"in Ut)&&(Wr=!!(Ut.depthTexture||Ut.depthStencilTexture),w(!Wr||x.webgl_depth_texture,"webgl_depth_texture extension not supported")),"depth"in Ut&&(typeof Ut.depth=="boolean"?Mr=Ut.depth:(en=Ut.depth,Lr=!1)),"stencil"in Ut&&(typeof Ut.stencil=="boolean"?Lr=Ut.stencil:(ln=Ut.stencil,Mr=!1)),"depthStencil"in Ut&&(typeof Ut.depthStencil=="boolean"?Mr=Lr=Ut.depthStencil:(mn=Ut.depthStencil,Mr=!1,Lr=!1))}var cr=null,Tt=null,qt=null,er=null;if(Array.isArray(Xt))cr=Xt.map(Fe);else if(Xt)cr=[Fe(Xt)];else for(cr=new Array(Kr),wt=0;wt<Kr;++wt)cr[wt]=V(Rt,Vt,Dr,pr,qr);w(x.webgl_draw_buffers||cr.length<=1,"you must enable the WEBGL_draw_buffers extension in order to use multiple color buffers."),w(cr.length<=C.maxColorAttachments,"too many color attachments, not supported"),Rt=Rt||cr[0].width,Vt=Vt||cr[0].height,en?Tt=Fe(en):Mr&&!Lr&&(Tt=V(Rt,Vt,Wr,"depth","uint32")),ln?qt=Fe(ln):Lr&&!Mr&&(qt=V(Rt,Vt,!1,"stencil","uint8")),mn?er=Fe(mn):!en&&!ln&&Lr&&Mr&&(er=V(Rt,Vt,Wr,"depth stencil","depth stencil")),w(!!en+!!ln+!!mn<=1,"invalid framebuffer configuration, can specify exactly one depth/stencil attachment");var Vr=null;for(wt=0;wt<cr.length;++wt)if(We(cr[wt],Rt,Vt),w(!cr[wt]||cr[wt].texture&&Sd.indexOf(cr[wt].texture._texture.format)>=0||cr[wt].renderbuffer&&za.indexOf(cr[wt].renderbuffer._renderbuffer.format)>=0,"framebuffer color attachment "+wt+" is invalid"),cr[wt]&&cr[wt].texture){var yi=vi[cr[wt].texture._texture.format]*vo[cr[wt].texture._texture.type];Vr===null?Vr=yi:w(Vr===yi,"all color attachments much have the same number of bits per pixel.")}return We(Tt,Rt,Vt),w(!Tt||Tt.texture&&Tt.texture._texture.format===wd||Tt.renderbuffer&&Tt.renderbuffer._renderbuffer.format===Dd,"invalid depth attachment for framebuffer object"),We(qt,Rt,Vt),w(!qt||qt.renderbuffer&&qt.renderbuffer._renderbuffer.format===$i,"invalid stencil attachment for framebuffer object"),We(er,Rt,Vt),w(!er||er.texture&&er.texture._texture.format===nc||er.renderbuffer&&er.renderbuffer._renderbuffer.format===nc,"invalid depth-stencil attachment for framebuffer object"),je(qe),qe.width=Rt,qe.height=Vt,qe.colorAttachments=cr,qe.depthAttachment=Tt,qe.stencilAttachment=qt,qe.depthStencilAttachment=er,Mt.color=cr.map(ne),Mt.depth=ne(Tt),Mt.stencil=ne(qt),Mt.depthStencil=ne(er),Mt.width=qe.width,Mt.height=qe.height,ye(qe),Mt}function Lt(Ke,Je){w(ae.next!==qe,"can not resize a framebuffer which is currently in use");var wt=Math.max(Ke|0,1),Rt=Math.max(Je|0||wt,1);if(wt===qe.width&&Rt===qe.height)return Mt;for(var Vt=qe.colorAttachments,Mr=0;Mr<Vt.length;++Mr)Re(Vt[Mr],wt,Rt);return Re(qe.depthAttachment,wt,Rt),Re(qe.stencilAttachment,wt,Rt),Re(qe.depthStencilAttachment,wt,Rt),qe.width=Mt.width=wt,qe.height=Mt.height=Rt,ye(qe),Mt}return Mt(ke,$e),f(Mt,{resize:Lt,_reglType:"framebuffer",_framebuffer:qe,destroy:function(){pt(qe),je(qe)},use:function(Ke){ae.setFBO({framebuffer:Mt},Ke)}})}function ot(ke){var $e=Array(6);function qe(Lt){var Ke;w($e.indexOf(ae.next)<0,"can not update framebuffer which is currently in use");var Je={color:null},wt=0,Rt=null,Vt="rgba",Mr="uint8",Lr=1;if(typeof Lt=="number")wt=Lt|0;else if(!Lt)wt=1;else{w.type(Lt,"object","invalid arguments for framebuffer");var Xt=Lt;if("shape"in Xt){var Dr=Xt.shape;w(Array.isArray(Dr)&&Dr.length>=2,"invalid shape for framebuffer"),w(Dr[0]===Dr[1],"cube framebuffer must be square"),wt=Dr[0]}else"radius"in Xt&&(wt=Xt.radius|0),"width"in Xt?(wt=Xt.width|0,"height"in Xt&&w(Xt.height===wt,"must be square")):"height"in Xt&&(wt=Xt.height|0);("color"in Xt||"colors"in Xt)&&(Rt=Xt.color||Xt.colors,Array.isArray(Rt)&&w(Rt.length===1||x.webgl_draw_buffers,"multiple render targets not supported")),Rt||("colorCount"in Xt&&(Lr=Xt.colorCount|0,w(Lr>0,"invalid color buffer count")),"colorType"in Xt&&(w.oneOf(Xt.colorType,Be,"invalid color type"),Mr=Xt.colorType),"colorFormat"in Xt&&(Vt=Xt.colorFormat,w.oneOf(Xt.colorFormat,De,"invalid color format for texture"))),"depth"in Xt&&(Je.depth=Xt.depth),"stencil"in Xt&&(Je.stencil=Xt.stencil),"depthStencil"in Xt&&(Je.depthStencil=Xt.depthStencil)}var pr;if(Rt)if(Array.isArray(Rt))for(pr=[],Ke=0;Ke<Rt.length;++Ke)pr[Ke]=Rt[Ke];else pr=[Rt];else{pr=Array(Lr);var qr={radius:wt,format:Vt,type:Mr};for(Ke=0;Ke<Lr;++Ke)pr[Ke]=ie.createCube(qr)}for(Je.color=Array(pr.length),Ke=0;Ke<pr.length;++Ke){var Kr=pr[Ke];w(typeof Kr=="function"&&Kr._reglType==="textureCube","invalid cube map"),wt=wt||Kr.width,w(Kr.width===wt&&Kr.height===wt,"invalid cube map shape"),Je.color[Ke]={target:Ua,data:pr[Ke]}}for(Ke=0;Ke<6;++Ke){for(var en=0;en<pr.length;++en)Je.color[en].target=Ua+Ke;Ke>0&&(Je.depth=$e[0].depth,Je.stencil=$e[0].stencil,Je.depthStencil=$e[0].depthStencil),$e[Ke]?$e[Ke](Je):$e[Ke]=me(Je)}return f(qe,{width:wt,height:wt,color:pr})}function Mt(Lt){var Ke,Je=Lt|0;if(w(Je>0&&Je<=C.maxCubeMapSize,"invalid radius for cube fbo"),Je===qe.width)return qe;var wt=qe.color;for(Ke=0;Ke<wt.length;++Ke)wt[Ke].resize(Je);for(Ke=0;Ke<6;++Ke)$e[Ke].resize(Je);return qe.width=qe.height=Je,qe}return qe(ke),f(qe,{faces:$e,resize:Mt,_reglType:"framebufferCube",destroy:function(){$e.forEach(function(Lt){Lt.destroy()})}})}function Ve(){ae.cur=null,ae.next=null,ae.dirty=!0,zn(Se).forEach(function(ke){ke.framebuffer=c.createFramebuffer(),ye(ke)})}return f(ae,{getFramebuffer:function(ke){if(typeof ke=="function"&&ke._reglType==="framebuffer"){var $e=ke._framebuffer;if($e instanceof Qe)return $e}return null},create:me,createCube:ot,clear:function(){zn(Se).forEach(pt)},restore:Ve})}var _i=5126,ic=34962,_o=34963,ac=["attributes","elements","offset","count","primitive","instances"];function Ll(){this.state=0,this.x=0,this.y=0,this.z=0,this.w=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=_i,this.offset=0,this.stride=0,this.divisor=0}function kd(c,x,C,ie,pe,re,ae){for(var De=C.maxAttributes,Ae=new Array(De),Be=0;Be<De;++Be)Ae[Be]=new Ll;var Ge=0,Pe={},We={Record:Ll,scope:{},state:Ae,currentVAO:null,targetVAO:null,restore:Fe()?je:function(){},createVAO:pt,getVAO:ne,destroyBuffer:Oe,setVAO:Fe()?Re:rt,clear:Fe()?Se:function(){}};function Oe(ye){for(var me=0;me<Ae.length;++me){var ot=Ae[me];ot.buffer===ye&&(c.disableVertexAttribArray(me),ot.buffer=null)}}function Fe(){return x.oes_vertex_array_object}function V(){return x.angle_instanced_arrays}function ne(ye){return typeof ye=="function"&&ye._vao?ye._vao:null}function Re(ye){if(ye!==We.currentVAO){var me=Fe();ye?me.bindVertexArrayOES(ye.vao):me.bindVertexArrayOES(null),We.currentVAO=ye}}function rt(ye){if(ye!==We.currentVAO){if(ye)ye.bindAttrs();else{for(var me=V(),ot=0;ot<Ae.length;++ot){var Ve=Ae[ot];Ve.buffer?(c.enableVertexAttribArray(ot),Ve.buffer.bind(),c.vertexAttribPointer(ot,Ve.size,Ve.type,Ve.normalized,Ve.stride,Ve.offfset),me&&Ve.divisor&&me.vertexAttribDivisorANGLE(ot,Ve.divisor)):(c.disableVertexAttribArray(ot),c.vertexAttrib4f(ot,Ve.x,Ve.y,Ve.z,Ve.w))}ae.elements?c.bindBuffer(_o,ae.elements.buffer.buffer):c.bindBuffer(_o,null)}We.currentVAO=ye}}function Se(){zn(Pe).forEach(function(ye){ye.destroy()})}function Qe(){this.id=++Ge,this.attributes=[],this.elements=null,this.ownsElements=!1,this.count=0,this.offset=0,this.instances=-1,this.primitive=4;var ye=Fe();ye?this.vao=ye.createVertexArrayOES():this.vao=null,Pe[this.id]=this,this.buffers=[]}Qe.prototype.bindAttrs=function(){for(var ye=V(),me=this.attributes,ot=0;ot<me.length;++ot){var Ve=me[ot];Ve.buffer?(c.enableVertexAttribArray(ot),c.bindBuffer(ic,Ve.buffer.buffer),c.vertexAttribPointer(ot,Ve.size,Ve.type,Ve.normalized,Ve.stride,Ve.offset),ye&&Ve.divisor&&ye.vertexAttribDivisorANGLE(ot,Ve.divisor)):(c.disableVertexAttribArray(ot),c.vertexAttrib4f(ot,Ve.x,Ve.y,Ve.z,Ve.w))}for(var ke=me.length;ke<De;++ke)c.disableVertexAttribArray(ke);var $e=re.getElements(this.elements);$e?c.bindBuffer(_o,$e.buffer.buffer):c.bindBuffer(_o,null)},Qe.prototype.refresh=function(){var ye=Fe();ye&&(ye.bindVertexArrayOES(this.vao),this.bindAttrs(),We.currentVAO=null,ye.bindVertexArrayOES(null))},Qe.prototype.destroy=function(){if(this.vao){var ye=Fe();this===We.currentVAO&&(We.currentVAO=null,ye.bindVertexArrayOES(null)),ye.deleteVertexArrayOES(this.vao),this.vao=null}this.ownsElements&&(this.elements.destroy(),this.elements=null,this.ownsElements=!1),Pe[this.id]&&(delete Pe[this.id],ie.vaoCount-=1)};function je(){var ye=Fe();ye&&zn(Pe).forEach(function(me){me.refresh()})}function pt(ye){var me=new Qe;ie.vaoCount+=1;function ot(Ve){var ke;if(Array.isArray(Ve))ke=Ve,me.elements&&me.ownsElements&&me.elements.destroy(),me.elements=null,me.ownsElements=!1,me.offset=0,me.count=0,me.instances=-1,me.primitive=4;else{if(w(typeof Ve=="object","invalid arguments for create vao"),w("attributes"in Ve,"must specify attributes for vao"),Ve.elements){var $e=Ve.elements;me.ownsElements?typeof $e=="function"&&$e._reglType==="elements"?(me.elements.destroy(),me.ownsElements=!1):(me.elements($e),me.ownsElements=!1):re.getElements(Ve.elements)?(me.elements=Ve.elements,me.ownsElements=!1):(me.elements=re.create(Ve.elements),me.ownsElements=!0)}else me.elements=null,me.ownsElements=!1;ke=Ve.attributes,me.offset=0,me.count=-1,me.instances=-1,me.primitive=4,me.elements&&(me.count=me.elements._elements.vertCount,me.primitive=me.elements._elements.primType),"offset"in Ve&&(me.offset=Ve.offset|0),"count"in Ve&&(me.count=Ve.count|0),"instances"in Ve&&(me.instances=Ve.instances|0),"primitive"in Ve&&(w(Ve.primitive in Ui,"bad primitive type: "+Ve.primitive),me.primitive=Ui[Ve.primitive]),w.optional(()=>{for(var Mr=Object.keys(Ve),Lr=0;Lr<Mr.length;++Lr)w(ac.indexOf(Mr[Lr])>=0,'invalid option for vao: "'+Mr[Lr]+'" valid options are '+ac)}),w(Array.isArray(ke),"attributes must be an array")}w(ke.length<De,"too many attributes"),w(ke.length>0,"must specify at least one attribute");var qe={},Mt=me.attributes;Mt.length=ke.length;for(var Lt=0;Lt<ke.length;++Lt){var Ke=ke[Lt],Je=Mt[Lt]=new Ll,wt=Ke.data||Ke;if(Array.isArray(wt)||i(wt)||On(wt)){var Rt;me.buffers[Lt]&&(Rt=me.buffers[Lt],i(wt)&&Rt._buffer.byteLength>=wt.byteLength?Rt.subdata(wt):(Rt.destroy(),me.buffers[Lt]=null)),me.buffers[Lt]||(Rt=me.buffers[Lt]=pe.create(Ke,ic,!1,!0)),Je.buffer=pe.getBuffer(Rt),Je.size=Je.buffer.dimension|0,Je.normalized=!1,Je.type=Je.buffer.dtype,Je.offset=0,Je.stride=0,Je.divisor=0,Je.state=1,qe[Lt]=1}else pe.getBuffer(Ke)?(Je.buffer=pe.getBuffer(Ke),Je.size=Je.buffer.dimension|0,Je.normalized=!1,Je.type=Je.buffer.dtype,Je.offset=0,Je.stride=0,Je.divisor=0,Je.state=1):pe.getBuffer(Ke.buffer)?(Je.buffer=pe.getBuffer(Ke.buffer),Je.size=(+Ke.size||Je.buffer.dimension)|0,Je.normalized=!!Ke.normalized||!1,"type"in Ke?(w.parameter(Ke.type,Ma,"invalid buffer type"),Je.type=Ma[Ke.type]):Je.type=Je.buffer.dtype,Je.offset=(Ke.offset||0)|0,Je.stride=(Ke.stride||0)|0,Je.divisor=(Ke.divisor||0)|0,Je.state=1,w(Je.size>=1&&Je.size<=4,"size must be between 1 and 4"),w(Je.offset>=0,"invalid offset"),w(Je.stride>=0&&Je.stride<=255,"stride must be between 0 and 255"),w(Je.divisor>=0,"divisor must be positive"),w(!Je.divisor||!!x.angle_instanced_arrays,"ANGLE_instanced_arrays must be enabled to use divisor")):"x"in Ke?(w(Lt>0,"first attribute must not be a constant"),Je.x=+Ke.x||0,Je.y=+Ke.y||0,Je.z=+Ke.z||0,Je.w=+Ke.w||0,Je.state=2):w(!1,"invalid attribute spec for location "+Lt)}for(var Vt=0;Vt<me.buffers.length;++Vt)!qe[Vt]&&me.buffers[Vt]&&(me.buffers[Vt].destroy(),me.buffers[Vt]=null);return me.refresh(),ot}return ot.destroy=function(){for(var Ve=0;Ve<me.buffers.length;++Ve)me.buffers[Ve]&&me.buffers[Ve].destroy();me.buffers.length=0,me.ownsElements&&(me.elements.destroy(),me.elements=null,me.ownsElements=!1),me.destroy()},ot._vao=me,ot._reglType="vao",ot(ye)}return We}var Ol=35632,fc=35633,Id=35718,Fd=35721;function Rl(c,x,C,ie){var pe={},re={};function ae(V,ne,Re,rt){this.name=V,this.id=ne,this.location=Re,this.info=rt}function De(V,ne){for(var Re=0;Re<V.length;++Re)if(V[Re].id===ne.id){V[Re].location=ne.location;return}V.push(ne)}function Ae(V,ne,Re){var rt=V===Ol?pe:re,Se=rt[ne];if(!Se){var Qe=x.str(ne);Se=c.createShader(V),c.shaderSource(Se,Qe),c.compileShader(Se),w.shaderError(c,Se,Qe,V,Re),rt[ne]=Se}return Se}var Be={},Ge=[],Pe=0;function We(V,ne){this.id=Pe++,this.fragId=V,this.vertId=ne,this.program=null,this.uniforms=[],this.attributes=[],this.refCount=1,ie.profile&&(this.stats={uniformsCount:0,attributesCount:0})}function Oe(V,ne,Re){var rt,Se,Qe=Ae(Ol,V.fragId),je=Ae(fc,V.vertId),pt=V.program=c.createProgram();if(c.attachShader(pt,Qe),c.attachShader(pt,je),Re)for(rt=0;rt<Re.length;++rt){var ye=Re[rt];c.bindAttribLocation(pt,ye[0],ye[1])}c.linkProgram(pt),w.linkError(c,pt,x.str(V.fragId),x.str(V.vertId),ne);var me=c.getProgramParameter(pt,Id);ie.profile&&(V.stats.uniformsCount=me);var ot=V.uniforms;for(rt=0;rt<me;++rt)if(Se=c.getActiveUniform(pt,rt),Se){if(Se.size>1)for(var Ve=0;Ve<Se.size;++Ve){var ke=Se.name.replace("[0]","["+Ve+"]");De(ot,new ae(ke,x.id(ke),c.getUniformLocation(pt,ke),Se))}var $e=Se.name;Se.size>1&&($e=$e.replace("[0]","")),De(ot,new ae($e,x.id($e),c.getUniformLocation(pt,$e),Se))}var qe=c.getProgramParameter(pt,Fd);ie.profile&&(V.stats.attributesCount=qe);var Mt=V.attributes;for(rt=0;rt<qe;++rt)Se=c.getActiveAttrib(pt,rt),Se&&De(Mt,new ae(Se.name,x.id(Se.name),c.getAttribLocation(pt,Se.name),Se))}ie.profile&&(C.getMaxUniformsCount=function(){var V=0;return Ge.forEach(function(ne){ne.stats.uniformsCount>V&&(V=ne.stats.uniformsCount)}),V},C.getMaxAttributesCount=function(){var V=0;return Ge.forEach(function(ne){ne.stats.attributesCount>V&&(V=ne.stats.attributesCount)}),V});function Fe(){pe={},re={};for(var V=0;V<Ge.length;++V)Oe(Ge[V],null,Ge[V].attributes.map(function(ne){return[ne.location,ne.name]}))}return{clear:function(){var V=c.deleteShader.bind(c);zn(pe).forEach(V),pe={},zn(re).forEach(V),re={},Ge.forEach(function(ne){c.deleteProgram(ne.program)}),Ge.length=0,Be={},C.shaderCount=0},program:function(V,ne,Re,rt){w.command(V>=0,"missing vertex shader",Re),w.command(ne>=0,"missing fragment shader",Re);var Se=Be[ne];Se||(Se=Be[ne]={});var Qe=Se[V];if(Qe&&(Qe.refCount++,!rt))return Qe;var je=new We(ne,V);return C.shaderCount++,Oe(je,Re,rt),Qe||(Se[V]=je),Ge.push(je),f(je,{destroy:function(){if(je.refCount--,je.refCount<=0){c.deleteProgram(je.program);var pt=Ge.indexOf(je);Ge.splice(pt,1),C.shaderCount--}Se[je.vertId].refCount<=0&&(c.deleteShader(re[je.vertId]),delete re[je.vertId],delete Be[je.fragId][je.vertId]),Object.keys(Be[je.fragId]).length||(c.deleteShader(pe[je.fragId]),delete pe[je.fragId],delete Be[je.fragId])}})},restore:Fe,shader:Ae,frag:-1,vert:-1}}var hs=6408,ua=5121,Nd=3333,ds=5126;function Bd(c,x,C,ie,pe,re,ae){function De(Ge){var Pe;x.next===null?(w(pe.preserveDrawingBuffer,'you must create a webgl context with "preserveDrawingBuffer":true in order to read pixels from the drawing buffer'),Pe=ua):(w(x.next.colorAttachments[0].texture!==null,"You cannot read from a renderbuffer"),Pe=x.next.colorAttachments[0].texture._texture.type,w.optional(function(){re.oes_texture_float?(w(Pe===ua||Pe===ds,"Reading from a framebuffer is only allowed for the types 'uint8' and 'float'"),Pe===ds&&w(ae.readFloat,"Reading 'float' values is not permitted in your browser. For a fallback, please see: https://www.npmjs.com/package/glsl-read-float")):w(Pe===ua,"Reading from a framebuffer is only allowed for the type 'uint8'")}));var We=0,Oe=0,Fe=ie.framebufferWidth,V=ie.framebufferHeight,ne=null;i(Ge)?ne=Ge:Ge&&(w.type(Ge,"object","invalid arguments to regl.read()"),We=Ge.x|0,Oe=Ge.y|0,w(We>=0&&We<ie.framebufferWidth,"invalid x offset for regl.read"),w(Oe>=0&&Oe<ie.framebufferHeight,"invalid y offset for regl.read"),Fe=(Ge.width||ie.framebufferWidth-We)|0,V=(Ge.height||ie.framebufferHeight-Oe)|0,ne=Ge.data||null),ne&&(Pe===ua?w(ne instanceof Uint8Array,"buffer must be 'Uint8Array' when reading from a framebuffer of type 'uint8'"):Pe===ds&&w(ne instanceof Float32Array,"buffer must be 'Float32Array' when reading from a framebuffer of type 'float'")),w(Fe>0&&Fe+We<=ie.framebufferWidth,"invalid width for read pixels"),w(V>0&&V+Oe<=ie.framebufferHeight,"invalid height for read pixels"),C();var Re=Fe*V*4;return ne||(Pe===ua?ne=new Uint8Array(Re):Pe===ds&&(ne=ne||new Float32Array(Re))),w.isTypedArray(ne,"data buffer for regl.read() must be a typedarray"),w(ne.byteLength>=Re,"data buffer for regl.read() too small"),c.pixelStorei(Nd,4),c.readPixels(We,Oe,Fe,V,hs,Pe,ne),ne}function Ae(Ge){var Pe;return x.setFBO({framebuffer:Ge.framebuffer},function(){Pe=De(Ge)}),Pe}function Be(Ge){return!Ge||!("framebuffer"in Ge)?De(Ge):Ae(Ge)}return Be}function Wn(c){return Array.prototype.slice.call(c)}function ca(c){return Wn(c).join("")}function Wa(){var c=0,x=[],C=[];function ie(Pe){for(var We=0;We<C.length;++We)if(C[We]===Pe)return x[We];var Oe="g"+c++;return x.push(Oe),C.push(Pe),Oe}function pe(){var Pe=[];function We(){Pe.push.apply(Pe,Wn(arguments))}var Oe=[];function Fe(){var V="v"+c++;return Oe.push(V),arguments.length>0&&(Pe.push(V,"="),Pe.push.apply(Pe,Wn(arguments)),Pe.push(";")),V}return f(We,{def:Fe,toString:function(){return ca([Oe.length>0?"var "+Oe.join(",")+";":"",ca(Pe)])}})}function re(){var Pe=pe(),We=pe(),Oe=Pe.toString,Fe=We.toString;function V(ne,Re){We(ne,Re,"=",Pe.def(ne,Re),";")}return f(function(){Pe.apply(Pe,Wn(arguments))},{def:Pe.def,entry:Pe,exit:We,save:V,set:function(ne,Re,rt){V(ne,Re),Pe(ne,Re,"=",rt,";")},toString:function(){return Oe()+Fe()}})}function ae(){var Pe=ca(arguments),We=re(),Oe=re(),Fe=We.toString,V=Oe.toString;return f(We,{then:function(){return We.apply(We,Wn(arguments)),this},else:function(){return Oe.apply(Oe,Wn(arguments)),this},toString:function(){var ne=V();return ne&&(ne="else{"+ne+"}"),ca(["if(",Pe,"){",Fe(),"}",ne])}})}var De=pe(),Ae={};function Be(Pe,We){var Oe=[];function Fe(){var Se="a"+Oe.length;return Oe.push(Se),Se}We=We||0;for(var V=0;V<We;++V)Fe();var ne=re(),Re=ne.toString,rt=Ae[Pe]=f(ne,{arg:Fe,toString:function(){return ca(["function(",Oe.join(),"){",Re(),"}"])}});return rt}function Ge(){var Pe=['"use strict";',De,"return {"];Object.keys(Ae).forEach(function(Fe){Pe.push('"',Fe,'":',Ae[Fe].toString(),",")}),Pe.push("}");var We=ca(Pe).replace(/;/g,`;
|
|
43
41
|
`).replace(/}/g,`}
|
|
44
42
|
`).replace(/{/g,`{
|
|
45
|
-
`),Ce=Function.apply(null,T.concat(We));return Ce.apply(null,G)}return{global:Le,link:se,block:me,proc:Ne,scope:ae,cond:fe,compile:Ge}}var Tn="xyzw".split(""),xc=5121,Qa=1,Sf=2,Ja=0,ki=1,Af=2,Bl=3,eo=4,bc=5,Gl=6,mn="dither",Tf="blend.enable",Ul="blend.color",si="blend.equation",bs="blend.func",ws="depth.enable",xa="depth.func",Yl="depth.range",Fn="depth.mask",Ss="colorMask",wc="cull.enable",Sc="cull.face",Hl="frontFace",As="lineWidth",Ac="polygonOffset.enable",to="polygonOffset.offset",zl="sample.alpha",Tc="sample.enable",Wl="sample.coverage",Bo="stencil.enable",Ec="stencil.mask",Vl="stencil.func",Ts="stencil.opFront",Go="stencil.opBack",Dc="scissor.enable",Ef="scissor.box",ta="viewport",Uo="profile",ra="framebuffer",Es="vert",ro="frag",ba="elements",wa="primitive",Sa="count",no="offset",Df="instances",Yo="vao",Lf="Width",$l="Height",io=ra+Lf,Ho=ra+$l,Zl=ta+Lf,Lc=ta+$l,Rf="drawingBuffer",Rc=Rf+Lf,Cf=Rf+$l,rr=[bs,si,Vl,Ts,Go,Wl,ta,Ef,to],zo=34962,Xl=34963,Ds=35632,Cc=35633,Oc=3553,t0=34067,fi=2884,r0=3042,Of=3024,ql=2960,Ic=2929,Mc=3089,Qn=32823,Aa=32926,Kl=32928,If=5126,ao=35664,Ls=35665,Wo=35666,Mf=5124,Vo=35667,$o=35668,Si=35669,jl=35670,Ai=35671,Rs=35672,Cs=35673,oo=35674,Os=35675,Is=35676,Ms=35678,Zo=35680,Ff=4,Fs=1028,Ta=1029,Ql=2304,kn=2305,Pi=32775,n0=32776,i0=519,Ti=7680,so=0,Jl=1,eu=32774,a0=513,tu=36160,Xo=36064,qn={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Fc=["constant color, constant alpha","one minus constant color, constant alpha","constant color, one minus constant alpha","one minus constant color, one minus constant alpha","constant alpha, constant color","constant alpha, one minus constant color","one minus constant alpha, constant color","one minus constant alpha, one minus constant color"],fo={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},na={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},ks={frag:Ds,vert:Cc},kf={cw:Ql,ccw:kn};function lo(h){return Array.isArray(h)||i(h)||On(h)}function Pf(h){return h.sort(function(T,G){return T===ta?-1:G===ta?1:T<G?-1:1})}function Hr(h,T,G,se){this.thisDep=h,this.contextDep=T,this.propDep=G,this.append=se}function Ea(h){return h&&!(h.thisDep||h.contextDep||h.propDep)}function zr(h){return new Hr(!1,!1,!1,h)}function En(h,T){var G=h.type;if(G===Ja){var se=h.data.length;return new Hr(!0,se>=1,se>=2,T)}else if(G===eo){var me=h.data;return new Hr(me.thisDep,me.contextDep,me.propDep,T)}else{if(G===bc)return new Hr(!1,!1,!1,T);if(G===Gl){for(var ae=!1,fe=!1,Le=!1,De=0;De<h.data.length;++De){var Ne=h.data[De];if(Ne.type===ki)Le=!0;else if(Ne.type===Af)fe=!0;else if(Ne.type===Bl)ae=!0;else if(Ne.type===Ja){ae=!0;var Ge=Ne.data;Ge>=1&&(fe=!0),Ge>=2&&(Le=!0)}else Ne.type===eo&&(ae=ae||Ne.data.thisDep,fe=fe||Ne.data.contextDep,Le=Le||Ne.data.propDep)}return new Hr(ae,fe,Le,T)}else return new Hr(G===Bl,G===Af,G===ki,T)}}var ru=new Hr(!1,!1,!1,function(){});function nu(h,T,G,se,me,ae,fe,Le,De,Ne,Ge,Be,We,Ce,ke){var K=Ne.Record,oe={add:32774,subtract:32778,"reverse subtract":32779};G.ext_blend_minmax&&(oe.min=Pi,oe.max=n0);var Oe=G.angle_instanced_arrays,rt=G.webgl_draw_buffers,Se=G.oes_vertex_array_object,Qe={dirty:!0,profile:ke.profile},je={},pt=[],xe={},ge={};function lt(R){return R.replace(".","_")}function Ve(R,y,H){var j=lt(R);pt.push(R),je[j]=Qe[j]=!!H,xe[j]=y}function Me(R,y,H){var j=lt(R);pt.push(R),Array.isArray(H)?(Qe[j]=H.slice(),je[j]=H.slice()):Qe[j]=je[j]=H,ge[j]=y}Ve(mn,Of),Ve(Tf,r0),Me(Ul,"blendColor",[0,0,0,0]),Me(si,"blendEquationSeparate",[eu,eu]),Me(bs,"blendFuncSeparate",[Jl,so,Jl,so]),Ve(ws,Ic,!0),Me(xa,"depthFunc",a0),Me(Yl,"depthRange",[0,1]),Me(Fn,"depthMask",!0),Me(Ss,Ss,[!0,!0,!0,!0]),Ve(wc,fi),Me(Sc,"cullFace",Ta),Me(Hl,Hl,kn),Me(As,As,1),Ve(Ac,Qn),Me(to,"polygonOffset",[0,0]),Ve(zl,Aa),Ve(Tc,Kl),Me(Wl,"sampleCoverage",[1,!1]),Ve(Bo,ql),Me(Ec,"stencilMask",-1),Me(Vl,"stencilFunc",[i0,0,-1]),Me(Ts,"stencilOpSeparate",[Fs,Ti,Ti,Ti]),Me(Go,"stencilOpSeparate",[Ta,Ti,Ti,Ti]),Ve(Dc,Mc),Me(Ef,"scissor",[0,0,h.drawingBufferWidth,h.drawingBufferHeight]),Me(ta,ta,[0,0,h.drawingBufferWidth,h.drawingBufferHeight]);var $e={gl:h,context:We,strings:T,next:je,current:Qe,draw:Be,elements:ae,buffer:me,shader:Ge,attributes:Ne.state,vao:Ne,uniforms:De,framebuffer:Le,extensions:G,timer:Ce,isBufferArgs:lo},qe={primTypes:Xi,compareFuncs:fo,blendFuncs:qn,blendEquations:oe,stencilOps:na,glTypes:Ga,orientationType:kf};E.optional(function(){$e.isArrayLike=Pr}),rt&&(qe.backBuffer=[Ta],qe.drawBuffer=at(se.maxDrawbuffers,function(R){return R===0?[0]:at(R,function(y){return Xo+y})}));var It=0;function Lt(){var R=ja(),y=R.link,H=R.global;R.id=It++,R.batchId="0";var j=y($e),Q=R.shared={props:"a0"};Object.keys($e).forEach(function(N){Q[N]=H.def(j,".",N)}),E.optional(function(){R.CHECK=y(E),R.commandStr=E.guessCommand(),R.command=y(R.commandStr),R.assert=function(N,M,re){N("if(!(",M,"))",this.CHECK,".commandRaise(",y(re),",",this.command,");")},qe.invalidBlendCombinations=Fc});var W=R.next={},Y=R.current={};Object.keys(ge).forEach(function(N){Array.isArray(Qe[N])&&(W[N]=H.def(Q.next,".",N),Y[N]=H.def(Q.current,".",N))});var X=R.constants={};Object.keys(qe).forEach(function(N){X[N]=H.def(JSON.stringify(qe[N]))}),R.invoke=function(N,M){switch(M.type){case Ja:var re=["this",Q.context,Q.props,R.batchId];return N.def(y(M.data),".call(",re.slice(0,Math.max(M.data.length+1,4)),")");case ki:return N.def(Q.props,M.data);case Af:return N.def(Q.context,M.data);case Bl:return N.def("this",M.data);case eo:return M.data.append(R,N),M.data.ref;case bc:return M.data.toString();case Gl:return M.data.map(function(ee){return R.invoke(N,ee)})}},R.attribCache={};var O={};return R.scopeAttrib=function(N){var M=T.id(N);if(M in O)return O[M];var re=Ne.scope[M];re||(re=Ne.scope[M]=new K);var ee=O[M]=y(re);return ee},R}function Ke(R){var y=R.static,H=R.dynamic,j;if(Uo in y){var Q=!!y[Uo];j=zr(function(Y,X){return Q}),j.enable=Q}else if(Uo in H){var W=H[Uo];j=En(W,function(Y,X){return Y.invoke(X,W)})}return j}function Je(R,y){var H=R.static,j=R.dynamic;if(ra in H){var Q=H[ra];return Q?(Q=Le.getFramebuffer(Q),E.command(Q,"invalid framebuffer object"),zr(function(Y,X){var O=Y.link(Q),N=Y.shared;X.set(N.framebuffer,".next",O);var M=N.context;return X.set(M,"."+io,O+".width"),X.set(M,"."+Ho,O+".height"),O})):zr(function(Y,X){var O=Y.shared;X.set(O.framebuffer,".next","null");var N=O.context;return X.set(N,"."+io,N+"."+Rc),X.set(N,"."+Ho,N+"."+Cf),"null"})}else if(ra in j){var W=j[ra];return En(W,function(Y,X){var O=Y.invoke(X,W),N=Y.shared,M=N.framebuffer,re=X.def(M,".getFramebuffer(",O,")");E.optional(function(){Y.assert(X,"!"+O+"||"+re,"invalid framebuffer object")}),X.set(M,".next",re);var ee=N.context;return X.set(ee,"."+io,re+"?"+re+".width:"+ee+"."+Rc),X.set(ee,"."+Ho,re+"?"+re+".height:"+ee+"."+Cf),re})}else return null}function wt(R,y,H){var j=R.static,Q=R.dynamic;function W(O){if(O in j){var N=j[O];E.commandType(N,"object","invalid "+O,H.commandStr);var M=!0,re=N.x|0,ee=N.y|0,_e,be;return"width"in N?(_e=N.width|0,E.command(_e>=0,"invalid "+O,H.commandStr)):M=!1,"height"in N?(be=N.height|0,E.command(be>=0,"invalid "+O,H.commandStr)):M=!1,new Hr(!M&&y&&y.thisDep,!M&&y&&y.contextDep,!M&&y&&y.propDep,function(yt,ot){var Ae=yt.shared.context,he=_e;"width"in N||(he=ot.def(Ae,".",io,"-",re));var ht=be;return"height"in N||(ht=ot.def(Ae,".",Ho,"-",ee)),[re,ee,he,ht]})}else if(O in Q){var Ye=Q[O],Dt=En(Ye,function(yt,ot){var Ae=yt.invoke(ot,Ye);E.optional(function(){yt.assert(ot,Ae+"&&typeof "+Ae+'==="object"',"invalid "+O)});var he=yt.shared.context,ht=ot.def(Ae,".x|0"),ct=ot.def(Ae,".y|0"),Tt=ot.def('"width" in ',Ae,"?",Ae,".width|0:","(",he,".",io,"-",ht,")"),vr=ot.def('"height" in ',Ae,"?",Ae,".height|0:","(",he,".",Ho,"-",ct,")");return E.optional(function(){yt.assert(ot,Tt+">=0&&"+vr+">=0","invalid "+O)}),[ht,ct,Tt,vr]});return y&&(Dt.thisDep=Dt.thisDep||y.thisDep,Dt.contextDep=Dt.contextDep||y.contextDep,Dt.propDep=Dt.propDep||y.propDep),Dt}else return y?new Hr(y.thisDep,y.contextDep,y.propDep,function(yt,ot){var Ae=yt.shared.context;return[0,0,ot.def(Ae,".",io),ot.def(Ae,".",Ho)]}):null}var Y=W(ta);if(Y){var X=Y;Y=new Hr(Y.thisDep,Y.contextDep,Y.propDep,function(O,N){var M=X.append(O,N),re=O.shared.context;return N.set(re,"."+Zl,M[2]),N.set(re,"."+Lc,M[3]),M})}return{viewport:Y,scissor_box:W(Ef)}}function Ct(R,y){var H=R.static,j=typeof H[ro]=="string"&&typeof H[Es]=="string";if(j){if(Object.keys(y.dynamic).length>0)return null;var Q=y.static,W=Object.keys(Q);if(W.length>0&&typeof Q[W[0]]=="number"){for(var Y=[],X=0;X<W.length;++X)E(typeof Q[W[X]]=="number","must specify all vertex attribute locations when using vaos"),Y.push([Q[W[X]]|0,W[X]]);return Y}}return null}function Vt(R,y,H){var j=R.static,Q=R.dynamic;function W(M){if(M in j){var re=T.id(j[M]);E.optional(function(){Ge.shader(ks[M],re,E.guessCommand())});var ee=zr(function(){return re});return ee.id=re,ee}else if(M in Q){var _e=Q[M];return En(_e,function(be,Ye){var Dt=be.invoke(Ye,_e),yt=Ye.def(be.shared.strings,".id(",Dt,")");return E.optional(function(){Ye(be.shared.shader,".shader(",ks[M],",",yt,",",be.command,");")}),yt})}return null}var Y=W(ro),X=W(Es),O=null,N;return Ea(Y)&&Ea(X)?(O=Ge.program(X.id,Y.id,null,H),N=zr(function(M,re){return M.link(O)})):N=new Hr(Y&&Y.thisDep||X&&X.thisDep,Y&&Y.contextDep||X&&X.contextDep,Y&&Y.propDep||X&&X.propDep,function(M,re){var ee=M.shared.shader,_e;Y?_e=Y.append(M,re):_e=re.def(ee,".",ro);var be;X?be=X.append(M,re):be=re.def(ee,".",Es);var Ye=ee+".program("+be+","+_e;return E.optional(function(){Ye+=","+M.command}),re.def(Ye+")")}),{frag:Y,vert:X,progVar:N,program:O}}function Ir(R,y){var H=R.static,j=R.dynamic,Q={},W=!1;function Y(){if(Yo in H){var ot=H[Yo];return ot!==null&&Ne.getVAO(ot)===null&&(ot=Ne.createVAO(ot)),W=!0,Q.vao=ot,zr(function(he){var ht=Ne.getVAO(ot);return ht?he.link(ht):"null"})}else if(Yo in j){W=!0;var Ae=j[Yo];return En(Ae,function(he,ht){var ct=he.invoke(ht,Ae);return ht.def(he.shared.vao+".getVAO("+ct+")")})}return null}var X=Y(),O=!1;function N(){if(ba in H){var ot=H[ba];if(Q.elements=ot,lo(ot)){var Ae=Q.elements=ae.create(ot,!0);ot=ae.getElements(Ae),O=!0}else ot&&(ot=ae.getElements(ot),O=!0,E.command(ot,"invalid elements",y.commandStr));var he=zr(function(ct,Tt){if(ot){var vr=ct.link(ot);return ct.ELEMENTS=vr,vr}return ct.ELEMENTS=null,null});return he.value=ot,he}else if(ba in j){O=!0;var ht=j[ba];return En(ht,function(ct,Tt){var vr=ct.shared,xn=vr.isBufferArgs,co=vr.elements,aa=ct.invoke(Tt,ht),Bi=Tt.def("null"),La=Tt.def(xn,"(",aa,")"),ho=ct.cond(La).then(Bi,"=",co,".createStream(",aa,");").else(Bi,"=",co,".getElements(",aa,");");return E.optional(function(){ct.assert(ho.else,"!"+aa+"||"+Bi,"invalid elements")}),Tt.entry(ho),Tt.exit(ct.cond(La).then(co,".destroyStream(",Bi,");")),ct.ELEMENTS=Bi,Bi})}else if(W)return new Hr(X.thisDep,X.contextDep,X.propDep,function(ct,Tt){return Tt.def(ct.shared.vao+".currentVAO?"+ct.shared.elements+".getElements("+ct.shared.vao+".currentVAO.elements):null")});return null}var M=N();function re(){if(wa in H){var ot=H[wa];return Q.primitive=ot,E.commandParameter(ot,Xi,"invalid primitve",y.commandStr),zr(function(he,ht){return Xi[ot]})}else if(wa in j){var Ae=j[wa];return En(Ae,function(he,ht){var ct=he.constants.primTypes,Tt=he.invoke(ht,Ae);return E.optional(function(){he.assert(ht,Tt+" in "+ct,"invalid primitive, must be one of "+Object.keys(Xi))}),ht.def(ct,"[",Tt,"]")})}else{if(O)return Ea(M)?M.value?zr(function(he,ht){return ht.def(he.ELEMENTS,".primType")}):zr(function(){return Ff}):new Hr(M.thisDep,M.contextDep,M.propDep,function(he,ht){var ct=he.ELEMENTS;return ht.def(ct,"?",ct,".primType:",Ff)});if(W)return new Hr(X.thisDep,X.contextDep,X.propDep,function(he,ht){return ht.def(he.shared.vao+".currentVAO?"+he.shared.vao+".currentVAO.primitive:"+Ff)})}return null}function ee(ot,Ae){if(ot in H){var he=H[ot]|0;return Ae?Q.offset=he:Q.instances=he,E.command(!Ae||he>=0,"invalid "+ot,y.commandStr),zr(function(ct,Tt){return Ae&&(ct.OFFSET=he),he})}else if(ot in j){var ht=j[ot];return En(ht,function(ct,Tt){var vr=ct.invoke(Tt,ht);return Ae&&(ct.OFFSET=vr,E.optional(function(){ct.assert(Tt,vr+">=0","invalid "+ot)})),vr})}else if(Ae){if(O)return zr(function(ct,Tt){return ct.OFFSET=0,0});if(W)return new Hr(X.thisDep,X.contextDep,X.propDep,function(ct,Tt){return Tt.def(ct.shared.vao+".currentVAO?"+ct.shared.vao+".currentVAO.offset:0")})}else if(W)return new Hr(X.thisDep,X.contextDep,X.propDep,function(ct,Tt){return Tt.def(ct.shared.vao+".currentVAO?"+ct.shared.vao+".currentVAO.instances:-1")});return null}var _e=ee(no,!0);function be(){if(Sa in H){var ot=H[Sa]|0;return Q.count=ot,E.command(typeof ot=="number"&&ot>=0,"invalid vertex count",y.commandStr),zr(function(){return ot})}else if(Sa in j){var Ae=j[Sa];return En(Ae,function(Tt,vr){var xn=Tt.invoke(vr,Ae);return E.optional(function(){Tt.assert(vr,"typeof "+xn+'==="number"&&'+xn+">=0&&"+xn+"===("+xn+"|0)","invalid vertex count")}),xn})}else if(O)if(Ea(M)){if(M)return _e?new Hr(_e.thisDep,_e.contextDep,_e.propDep,function(Tt,vr){var xn=vr.def(Tt.ELEMENTS,".vertCount-",Tt.OFFSET);return E.optional(function(){Tt.assert(vr,xn+">=0","invalid vertex offset/element buffer too small")}),xn}):zr(function(Tt,vr){return vr.def(Tt.ELEMENTS,".vertCount")});var he=zr(function(){return-1});return E.optional(function(){he.MISSING=!0}),he}else{var ht=new Hr(M.thisDep||_e.thisDep,M.contextDep||_e.contextDep,M.propDep||_e.propDep,function(Tt,vr){var xn=Tt.ELEMENTS;return Tt.OFFSET?vr.def(xn,"?",xn,".vertCount-",Tt.OFFSET,":-1"):vr.def(xn,"?",xn,".vertCount:-1")});return E.optional(function(){ht.DYNAMIC=!0}),ht}else if(W){var ct=new Hr(X.thisDep,X.contextDep,X.propDep,function(Tt,vr){return vr.def(Tt.shared.vao,".currentVAO?",Tt.shared.vao,".currentVAO.count:-1")});return ct}return null}var Ye=re(),Dt=be(),yt=ee(Df,!1);return{elements:M,primitive:Ye,count:Dt,instances:yt,offset:_e,vao:X,vaoActive:W,elementsActive:O,static:Q}}function Lr(R,y){var H=R.static,j=R.dynamic,Q={};return pt.forEach(function(W){var Y=lt(W);function X(O,N){if(W in H){var M=O(H[W]);Q[Y]=zr(function(){return M})}else if(W in j){var re=j[W];Q[Y]=En(re,function(ee,_e){return N(ee,_e,ee.invoke(_e,re))})}}switch(W){case wc:case Tf:case mn:case Bo:case ws:case Dc:case Ac:case zl:case Tc:case Fn:return X(function(O){return E.commandType(O,"boolean",W,y.commandStr),O},function(O,N,M){return E.optional(function(){O.assert(N,"typeof "+M+'==="boolean"',"invalid flag "+W,O.commandStr)}),M});case xa:return X(function(O){return E.commandParameter(O,fo,"invalid "+W,y.commandStr),fo[O]},function(O,N,M){var re=O.constants.compareFuncs;return E.optional(function(){O.assert(N,M+" in "+re,"invalid "+W+", must be one of "+Object.keys(fo))}),N.def(re,"[",M,"]")});case Yl:return X(function(O){return E.command(Pr(O)&&O.length===2&&typeof O[0]=="number"&&typeof O[1]=="number"&&O[0]<=O[1],"depth range is 2d array",y.commandStr),O},function(O,N,M){E.optional(function(){O.assert(N,O.shared.isArrayLike+"("+M+")&&"+M+".length===2&&typeof "+M+'[0]==="number"&&typeof '+M+'[1]==="number"&&'+M+"[0]<="+M+"[1]","depth range must be a 2d array")});var re=N.def("+",M,"[0]"),ee=N.def("+",M,"[1]");return[re,ee]});case bs:return X(function(O){E.commandType(O,"object","blend.func",y.commandStr);var N="srcRGB"in O?O.srcRGB:O.src,M="srcAlpha"in O?O.srcAlpha:O.src,re="dstRGB"in O?O.dstRGB:O.dst,ee="dstAlpha"in O?O.dstAlpha:O.dst;return E.commandParameter(N,qn,Y+".srcRGB",y.commandStr),E.commandParameter(M,qn,Y+".srcAlpha",y.commandStr),E.commandParameter(re,qn,Y+".dstRGB",y.commandStr),E.commandParameter(ee,qn,Y+".dstAlpha",y.commandStr),E.command(Fc.indexOf(N+", "+re)===-1,"unallowed blending combination (srcRGB, dstRGB) = ("+N+", "+re+")",y.commandStr),[qn[N],qn[re],qn[M],qn[ee]]},function(O,N,M){var re=O.constants.blendFuncs;E.optional(function(){O.assert(N,M+"&&typeof "+M+'==="object"',"invalid blend func, must be an object")});function ee(Ae,he){var ht=N.def('"',Ae,he,'" in ',M,"?",M,".",Ae,he,":",M,".",Ae);return E.optional(function(){O.assert(N,ht+" in "+re,"invalid "+W+"."+Ae+he+", must be one of "+Object.keys(qn))}),ht}var _e=ee("src","RGB"),be=ee("dst","RGB");E.optional(function(){var Ae=O.constants.invalidBlendCombinations;O.assert(N,Ae+".indexOf("+_e+'+", "+'+be+") === -1 ","unallowed blending combination for (srcRGB, dstRGB)")});var Ye=N.def(re,"[",_e,"]"),Dt=N.def(re,"[",ee("src","Alpha"),"]"),yt=N.def(re,"[",be,"]"),ot=N.def(re,"[",ee("dst","Alpha"),"]");return[Ye,yt,Dt,ot]});case si:return X(function(O){if(typeof O=="string")return E.commandParameter(O,oe,"invalid "+W,y.commandStr),[oe[O],oe[O]];if(typeof O=="object")return E.commandParameter(O.rgb,oe,W+".rgb",y.commandStr),E.commandParameter(O.alpha,oe,W+".alpha",y.commandStr),[oe[O.rgb],oe[O.alpha]];E.commandRaise("invalid blend.equation",y.commandStr)},function(O,N,M){var re=O.constants.blendEquations,ee=N.def(),_e=N.def(),be=O.cond("typeof ",M,'==="string"');return E.optional(function(){function Ye(Dt,yt,ot){O.assert(Dt,ot+" in "+re,"invalid "+yt+", must be one of "+Object.keys(oe))}Ye(be.then,W,M),O.assert(be.else,M+"&&typeof "+M+'==="object"',"invalid "+W),Ye(be.else,W+".rgb",M+".rgb"),Ye(be.else,W+".alpha",M+".alpha")}),be.then(ee,"=",_e,"=",re,"[",M,"];"),be.else(ee,"=",re,"[",M,".rgb];",_e,"=",re,"[",M,".alpha];"),N(be),[ee,_e]});case Ul:return X(function(O){return E.command(Pr(O)&&O.length===4,"blend.color must be a 4d array",y.commandStr),at(4,function(N){return+O[N]})},function(O,N,M){return E.optional(function(){O.assert(N,O.shared.isArrayLike+"("+M+")&&"+M+".length===4","blend.color must be a 4d array")}),at(4,function(re){return N.def("+",M,"[",re,"]")})});case Ec:return X(function(O){return E.commandType(O,"number",Y,y.commandStr),O|0},function(O,N,M){return E.optional(function(){O.assert(N,"typeof "+M+'==="number"',"invalid stencil.mask")}),N.def(M,"|0")});case Vl:return X(function(O){E.commandType(O,"object",Y,y.commandStr);var N=O.cmp||"keep",M=O.ref||0,re="mask"in O?O.mask:-1;return E.commandParameter(N,fo,W+".cmp",y.commandStr),E.commandType(M,"number",W+".ref",y.commandStr),E.commandType(re,"number",W+".mask",y.commandStr),[fo[N],M,re]},function(O,N,M){var re=O.constants.compareFuncs;E.optional(function(){function Ye(){O.assert(N,Array.prototype.join.call(arguments,""),"invalid stencil.func")}Ye(M+"&&typeof ",M,'==="object"'),Ye('!("cmp" in ',M,")||(",M,".cmp in ",re,")")});var ee=N.def('"cmp" in ',M,"?",re,"[",M,".cmp]",":",Ti),_e=N.def(M,".ref|0"),be=N.def('"mask" in ',M,"?",M,".mask|0:-1");return[ee,_e,be]});case Ts:case Go:return X(function(O){E.commandType(O,"object",Y,y.commandStr);var N=O.fail||"keep",M=O.zfail||"keep",re=O.zpass||"keep";return E.commandParameter(N,na,W+".fail",y.commandStr),E.commandParameter(M,na,W+".zfail",y.commandStr),E.commandParameter(re,na,W+".zpass",y.commandStr),[W===Go?Ta:Fs,na[N],na[M],na[re]]},function(O,N,M){var re=O.constants.stencilOps;E.optional(function(){O.assert(N,M+"&&typeof "+M+'==="object"',"invalid "+W)});function ee(_e){return E.optional(function(){O.assert(N,'!("'+_e+'" in '+M+")||("+M+"."+_e+" in "+re+")","invalid "+W+"."+_e+", must be one of "+Object.keys(na))}),N.def('"',_e,'" in ',M,"?",re,"[",M,".",_e,"]:",Ti)}return[W===Go?Ta:Fs,ee("fail"),ee("zfail"),ee("zpass")]});case to:return X(function(O){E.commandType(O,"object",Y,y.commandStr);var N=O.factor|0,M=O.units|0;return E.commandType(N,"number",Y+".factor",y.commandStr),E.commandType(M,"number",Y+".units",y.commandStr),[N,M]},function(O,N,M){E.optional(function(){O.assert(N,M+"&&typeof "+M+'==="object"',"invalid "+W)});var re=N.def(M,".factor|0"),ee=N.def(M,".units|0");return[re,ee]});case Sc:return X(function(O){var N=0;return O==="front"?N=Fs:O==="back"&&(N=Ta),E.command(!!N,Y,y.commandStr),N},function(O,N,M){return E.optional(function(){O.assert(N,M+'==="front"||'+M+'==="back"',"invalid cull.face")}),N.def(M,'==="front"?',Fs,":",Ta)});case As:return X(function(O){return E.command(typeof O=="number"&&O>=se.lineWidthDims[0]&&O<=se.lineWidthDims[1],"invalid line width, must be a positive number between "+se.lineWidthDims[0]+" and "+se.lineWidthDims[1],y.commandStr),O},function(O,N,M){return E.optional(function(){O.assert(N,"typeof "+M+'==="number"&&'+M+">="+se.lineWidthDims[0]+"&&"+M+"<="+se.lineWidthDims[1],"invalid line width")}),M});case Hl:return X(function(O){return E.commandParameter(O,kf,Y,y.commandStr),kf[O]},function(O,N,M){return E.optional(function(){O.assert(N,M+'==="cw"||'+M+'==="ccw"',"invalid frontFace, must be one of cw,ccw")}),N.def(M+'==="cw"?'+Ql+":"+kn)});case Ss:return X(function(O){return E.command(Pr(O)&&O.length===4,"color.mask must be length 4 array",y.commandStr),O.map(function(N){return!!N})},function(O,N,M){return E.optional(function(){O.assert(N,O.shared.isArrayLike+"("+M+")&&"+M+".length===4","invalid color.mask")}),at(4,function(re){return"!!"+M+"["+re+"]"})});case Wl:return X(function(O){E.command(typeof O=="object"&&O,Y,y.commandStr);var N="value"in O?O.value:1,M=!!O.invert;return E.command(typeof N=="number"&&N>=0&&N<=1,"sample.coverage.value must be a number between 0 and 1",y.commandStr),[N,M]},function(O,N,M){E.optional(function(){O.assert(N,M+"&&typeof "+M+'==="object"',"invalid sample.coverage")});var re=N.def('"value" in ',M,"?+",M,".value:1"),ee=N.def("!!",M,".invert");return[re,ee]})}}),Q}function Xt(R,y){var H=R.static,j=R.dynamic,Q={};return Object.keys(H).forEach(function(W){var Y=H[W],X;if(typeof Y=="number"||typeof Y=="boolean")X=zr(function(){return Y});else if(typeof Y=="function"){var O=Y._reglType;O==="texture2d"||O==="textureCube"?X=zr(function(N){return N.link(Y)}):O==="framebuffer"||O==="framebufferCube"?(E.command(Y.color.length>0,'missing color attachment for framebuffer sent to uniform "'+W+'"',y.commandStr),X=zr(function(N){return N.link(Y.color[0])})):E.commandRaise('invalid data for uniform "'+W+'"',y.commandStr)}else Pr(Y)?X=zr(function(N){var M=N.global.def("[",at(Y.length,function(re){return E.command(typeof Y[re]=="number"||typeof Y[re]=="boolean","invalid uniform "+W,N.commandStr),Y[re]}),"]");return M}):E.commandRaise('invalid or missing data for uniform "'+W+'"',y.commandStr);X.value=Y,Q[W]=X}),Object.keys(j).forEach(function(W){var Y=j[W];Q[W]=En(Y,function(X,O){return X.invoke(O,Y)})}),Q}function Dr(R,y){var H=R.static,j=R.dynamic,Q={};return Object.keys(H).forEach(function(W){var Y=H[W],X=T.id(W),O=new K;if(lo(Y))O.state=Qa,O.buffer=me.getBuffer(me.create(Y,zo,!1,!0)),O.type=0;else{var N=me.getBuffer(Y);if(N)O.state=Qa,O.buffer=N,O.type=0;else if(E.command(typeof Y=="object"&&Y,"invalid data for attribute "+W,y.commandStr),"constant"in Y){var M=Y.constant;O.buffer="null",O.state=Sf,typeof M=="number"?O.x=M:(E.command(Pr(M)&&M.length>0&&M.length<=4,"invalid constant for attribute "+W,y.commandStr),Tn.forEach(function(yt,ot){ot<M.length&&(O[yt]=M[ot])}))}else{lo(Y.buffer)?N=me.getBuffer(me.create(Y.buffer,zo,!1,!0)):N=me.getBuffer(Y.buffer),E.command(!!N,'missing buffer for attribute "'+W+'"',y.commandStr);var re=Y.offset|0;E.command(re>=0,'invalid offset for attribute "'+W+'"',y.commandStr);var ee=Y.stride|0;E.command(ee>=0&&ee<256,'invalid stride for attribute "'+W+'", must be integer betweeen [0, 255]',y.commandStr);var _e=Y.size|0;E.command(!("size"in Y)||_e>0&&_e<=4,'invalid size for attribute "'+W+'", must be 1,2,3,4',y.commandStr);var be=!!Y.normalized,Ye=0;"type"in Y&&(E.commandParameter(Y.type,Ga,"invalid type for attribute "+W,y.commandStr),Ye=Ga[Y.type]);var Dt=Y.divisor|0;E.optional(function(){"divisor"in Y&&(E.command(Dt===0||Oe,'cannot specify divisor for attribute "'+W+'", instancing not supported',y.commandStr),E.command(Dt>=0,'invalid divisor for attribute "'+W+'"',y.commandStr));var yt=y.commandStr,ot=["buffer","offset","divisor","normalized","type","size","stride"];Object.keys(Y).forEach(function(Ae){E.command(ot.indexOf(Ae)>=0,'unknown parameter "'+Ae+'" for attribute pointer "'+W+'" (valid parameters are '+ot+")",yt)})}),O.buffer=N,O.state=Qa,O.size=_e,O.normalized=be,O.type=Ye||N.dtype,O.offset=re,O.stride=ee,O.divisor=Dt}}Q[W]=zr(function(yt,ot){var Ae=yt.attribCache;if(X in Ae)return Ae[X];var he={isStream:!1};return Object.keys(O).forEach(function(ht){he[ht]=O[ht]}),O.buffer&&(he.buffer=yt.link(O.buffer),he.type=he.type||he.buffer+".dtype"),Ae[X]=he,he})}),Object.keys(j).forEach(function(W){var Y=j[W];function X(O,N){var M=O.invoke(N,Y),re=O.shared,ee=O.constants,_e=re.isBufferArgs,be=re.buffer;E.optional(function(){O.assert(N,M+"&&(typeof "+M+'==="object"||typeof '+M+'==="function")&&('+_e+"("+M+")||"+be+".getBuffer("+M+")||"+be+".getBuffer("+M+".buffer)||"+_e+"("+M+'.buffer)||("constant" in '+M+"&&(typeof "+M+'.constant==="number"||'+re.isArrayLike+"("+M+".constant))))",'invalid dynamic attribute "'+W+'"')});var Ye={isStream:N.def(!1)},Dt=new K;Dt.state=Qa,Object.keys(Dt).forEach(function(he){Ye[he]=N.def(""+Dt[he])});var yt=Ye.buffer,ot=Ye.type;N("if(",_e,"(",M,")){",Ye.isStream,"=true;",yt,"=",be,".createStream(",zo,",",M,");",ot,"=",yt,".dtype;","}else{",yt,"=",be,".getBuffer(",M,");","if(",yt,"){",ot,"=",yt,".dtype;",'}else if("constant" in ',M,"){",Ye.state,"=",Sf,";","if(typeof "+M+'.constant === "number"){',Ye[Tn[0]],"=",M,".constant;",Tn.slice(1).map(function(he){return Ye[he]}).join("="),"=0;","}else{",Tn.map(function(he,ht){return Ye[he]+"="+M+".constant.length>"+ht+"?"+M+".constant["+ht+"]:0;"}).join(""),"}}else{","if(",_e,"(",M,".buffer)){",yt,"=",be,".createStream(",zo,",",M,".buffer);","}else{",yt,"=",be,".getBuffer(",M,".buffer);","}",ot,'="type" in ',M,"?",ee.glTypes,"[",M,".type]:",yt,".dtype;",Ye.normalized,"=!!",M,".normalized;");function Ae(he){N(Ye[he],"=",M,".",he,"|0;")}return Ae("size"),Ae("offset"),Ae("stride"),Ae("divisor"),N("}}"),N.exit("if(",Ye.isStream,"){",be,".destroyStream(",yt,");","}"),Ye}Q[W]=En(Y,X)}),Q}function pr(R){var y=R.static,H=R.dynamic,j={};return Object.keys(y).forEach(function(Q){var W=y[Q];j[Q]=zr(function(Y,X){return typeof W=="number"||typeof W=="boolean"?""+W:Y.link(W)})}),Object.keys(H).forEach(function(Q){var W=H[Q];j[Q]=En(W,function(Y,X){return Y.invoke(X,W)})}),j}function Kr(R,y,H,j,Q){var W=R.static,Y=R.dynamic;E.optional(function(){var Ae=[ra,Es,ro,ba,wa,no,Sa,Df,Uo,Yo].concat(pt);function he(ht){Object.keys(ht).forEach(function(ct){E.command(Ae.indexOf(ct)>=0,'unknown parameter "'+ct+'"',Q.commandStr)})}he(W),he(Y)});var X=Ct(R,y),O=Je(R),N=wt(R,O,Q),M=Ir(R,Q),re=Lr(R,Q),ee=Vt(R,Q,X);function _e(Ae){var he=N[Ae];he&&(re[Ae]=he)}_e(ta),_e(lt(Ef));var be=Object.keys(re).length>0,Ye={framebuffer:O,draw:M,shader:ee,state:re,dirty:be,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Ye.profile=Ke(R),Ye.uniforms=Xt(H,Q),Ye.drawVAO=Ye.scopeVAO=M.vao,!Ye.drawVAO&&ee.program&&!X&&G.angle_instanced_arrays&&M.static.elements){var Dt=!0,yt=ee.program.attributes.map(function(Ae){var he=y.static[Ae];return Dt=Dt&&!!he,he});if(Dt&&yt.length>0){var ot=Ne.getVAO(Ne.createVAO({attributes:yt,elements:M.static.elements}));Ye.drawVAO=new Hr(null,null,null,function(Ae,he){return Ae.link(ot)}),Ye.useVAO=!0}}return X?Ye.useVAO=!0:Ye.attributes=Dr(y,Q),Ye.context=pr(j),Ye}function jr(R,y,H){var j=R.shared,Q=j.context,W=R.scope();Object.keys(H).forEach(function(Y){y.save(Q,"."+Y);var X=H[Y],O=X.append(R,y);Array.isArray(O)?W(Q,".",Y,"=[",O.join(),"];"):W(Q,".",Y,"=",O,";")}),y(W)}function tn(R,y,H,j){var Q=R.shared,W=Q.gl,Y=Q.framebuffer,X;rt&&(X=y.def(Q.extensions,".webgl_draw_buffers"));var O=R.constants,N=O.drawBuffer,M=O.backBuffer,re;H?re=H.append(R,y):re=y.def(Y,".next"),j||y("if(",re,"!==",Y,".cur){"),y("if(",re,"){",W,".bindFramebuffer(",tu,",",re,".framebuffer);"),rt&&y(X,".drawBuffersWEBGL(",N,"[",re,".colorAttachments.length]);"),y("}else{",W,".bindFramebuffer(",tu,",null);"),rt&&y(X,".drawBuffersWEBGL(",M,");"),y("}",Y,".cur=",re,";"),j||y("}")}function un(R,y,H){var j=R.shared,Q=j.gl,W=R.current,Y=R.next,X=j.current,O=j.next,N=R.cond(X,".dirty");pt.forEach(function(M){var re=lt(M);if(!(re in H.state)){var ee,_e;if(re in Y){ee=Y[re],_e=W[re];var be=at(Qe[re].length,function(Dt){return N.def(ee,"[",Dt,"]")});N(R.cond(be.map(function(Dt,yt){return Dt+"!=="+_e+"["+yt+"]"}).join("||")).then(Q,".",ge[re],"(",be,");",be.map(function(Dt,yt){return _e+"["+yt+"]="+Dt}).join(";"),";"))}else{ee=N.def(O,".",re);var Ye=R.cond(ee,"!==",X,".",re);N(Ye),re in xe?Ye(R.cond(ee).then(Q,".enable(",xe[re],");").else(Q,".disable(",xe[re],");"),X,".",re,"=",ee,";"):Ye(Q,".",ge[re],"(",ee,");",X,".",re,"=",ee,";")}}}),Object.keys(H.state).length===0&&N(X,".dirty=false;"),y(N)}function gn(R,y,H,j){var Q=R.shared,W=R.current,Y=Q.current,X=Q.gl;Pf(Object.keys(H)).forEach(function(O){var N=H[O];if(!(j&&!j(N))){var M=N.append(R,y);if(xe[O]){var re=xe[O];Ea(N)?M?y(X,".enable(",re,");"):y(X,".disable(",re,");"):y(R.cond(M).then(X,".enable(",re,");").else(X,".disable(",re,");")),y(Y,".",O,"=",M,";")}else if(Pr(M)){var ee=W[O];y(X,".",ge[O],"(",M,");",M.map(function(_e,be){return ee+"["+be+"]="+_e}).join(";"),";")}else y(X,".",ge[O],"(",M,");",Y,".",O,"=",M,";")}})}function Wr(R,y){Oe&&(R.instancing=y.def(R.shared.extensions,".angle_instanced_arrays"))}function Ut(R,y,H,j,Q){var W=R.shared,Y=R.stats,X=W.current,O=W.timer,N=H.profile;function M(){return typeof performance>"u"?"Date.now()":"performance.now()"}var re,ee;function _e(Ae){re=y.def(),Ae(re,"=",M(),";"),typeof Q=="string"?Ae(Y,".count+=",Q,";"):Ae(Y,".count++;"),Ce&&(j?(ee=y.def(),Ae(ee,"=",O,".getNumPendingQueries();")):Ae(O,".beginQuery(",Y,");"))}function be(Ae){Ae(Y,".cpuTime+=",M(),"-",re,";"),Ce&&(j?Ae(O,".pushScopeStats(",ee,",",O,".getNumPendingQueries(),",Y,");"):Ae(O,".endQuery();"))}function Ye(Ae){var he=y.def(X,".profile");y(X,".profile=",Ae,";"),y.exit(X,".profile=",he,";")}var Dt;if(N){if(Ea(N)){N.enable?(_e(y),be(y.exit),Ye("true")):Ye("false");return}Dt=N.append(R,y),Ye(Dt)}else Dt=y.def(X,".profile");var yt=R.block();_e(yt),y("if(",Dt,"){",yt,"}");var ot=R.block();be(ot),y.exit("if(",Dt,"){",ot,"}")}function yn(R,y,H,j,Q){var W=R.shared;function Y(O){switch(O){case ao:case Vo:case Ai:return 2;case Ls:case $o:case Rs:return 3;case Wo:case Si:case Cs:return 4;default:return 1}}function X(O,N,M){var re=W.gl,ee=y.def(O,".location"),_e=y.def(W.attributes,"[",ee,"]"),be=M.state,Ye=M.buffer,Dt=[M.x,M.y,M.z,M.w],yt=["buffer","normalized","offset","stride"];function ot(){y("if(!",_e,".buffer){",re,".enableVertexAttribArray(",ee,");}");var he=M.type,ht;if(M.size?ht=y.def(M.size,"||",N):ht=N,y("if(",_e,".type!==",he,"||",_e,".size!==",ht,"||",yt.map(function(Tt){return _e+"."+Tt+"!=="+M[Tt]}).join("||"),"){",re,".bindBuffer(",zo,",",Ye,".buffer);",re,".vertexAttribPointer(",[ee,ht,he,M.normalized,M.stride,M.offset],");",_e,".type=",he,";",_e,".size=",ht,";",yt.map(function(Tt){return _e+"."+Tt+"="+M[Tt]+";"}).join(""),"}"),Oe){var ct=M.divisor;y("if(",_e,".divisor!==",ct,"){",R.instancing,".vertexAttribDivisorANGLE(",[ee,ct],");",_e,".divisor=",ct,";}")}}function Ae(){y("if(",_e,".buffer){",re,".disableVertexAttribArray(",ee,");",_e,".buffer=null;","}if(",Tn.map(function(he,ht){return _e+"."+he+"!=="+Dt[ht]}).join("||"),"){",re,".vertexAttrib4f(",ee,",",Dt,");",Tn.map(function(he,ht){return _e+"."+he+"="+Dt[ht]+";"}).join(""),"}")}be===Qa?ot():be===Sf?Ae():(y("if(",be,"===",Qa,"){"),ot(),y("}else{"),Ae(),y("}"))}j.forEach(function(O){var N=O.name,M=H.attributes[N],re;if(M){if(!Q(M))return;re=M.append(R,y)}else{if(!Q(ru))return;var ee=R.scopeAttrib(N);E.optional(function(){R.assert(y,ee+".state","missing attribute "+N)}),re={},Object.keys(new K).forEach(function(_e){re[_e]=y.def(ee,".",_e)})}X(R.link(O),Y(O.info.type),re)})}function hr(R,y,H,j,Q,W){for(var Y=R.shared,X=Y.gl,O={},N,M=0;M<j.length;++M){var re=j[M],ee=re.name,_e=re.info.type,be=re.info.size,Ye=H.uniforms[ee];if(be>1){if(!Ye)continue;var Dt=ee.replace("[0]","");if(O[Dt])continue;O[Dt]=1}var yt=R.link(re),ot=yt+".location",Ae;if(Ye){if(!Q(Ye))continue;if(Ea(Ye)){var he=Ye.value;if(E.command(he!==null&&typeof he<"u",'missing uniform "'+ee+'"',R.commandStr),_e===Ms||_e===Zo){E.command(typeof he=="function"&&(_e===Ms&&(he._reglType==="texture2d"||he._reglType==="framebuffer")||_e===Zo&&(he._reglType==="textureCube"||he._reglType==="framebufferCube")),"invalid texture for uniform "+ee,R.commandStr);var ht=R.link(he._texture||he.color[0]._texture);y(X,".uniform1i(",ot,",",ht+".bind());"),y.exit(ht,".unbind();")}else if(_e===oo||_e===Os||_e===Is){E.optional(function(){E.command(Pr(he),"invalid matrix for uniform "+ee,R.commandStr),E.command(_e===oo&&he.length===4||_e===Os&&he.length===9||_e===Is&&he.length===16,"invalid length for matrix uniform "+ee,R.commandStr)});var ct=R.global.def("new Float32Array(["+Array.prototype.slice.call(he)+"])"),Tt=2;_e===Os?Tt=3:_e===Is&&(Tt=4),y(X,".uniformMatrix",Tt,"fv(",ot,",false,",ct,");")}else{switch(_e){case If:be===1?E.commandType(he,"number","uniform "+ee,R.commandStr):E.command(Pr(he)&&he.length===be,"uniform "+ee,R.commandStr),N="1f";break;case ao:E.command(Pr(he)&&he.length&&he.length%2===0&&he.length<=be*2,"uniform "+ee,R.commandStr),N="2f";break;case Ls:E.command(Pr(he)&&he.length&&he.length%3===0&&he.length<=be*3,"uniform "+ee,R.commandStr),N="3f";break;case Wo:E.command(Pr(he)&&he.length&&he.length%4===0&&he.length<=be*4,"uniform "+ee,R.commandStr),N="4f";break;case jl:be===1?E.commandType(he,"boolean","uniform "+ee,R.commandStr):E.command(Pr(he)&&he.length===be,"uniform "+ee,R.commandStr),N="1i";break;case Mf:be===1?E.commandType(he,"number","uniform "+ee,R.commandStr):E.command(Pr(he)&&he.length===be,"uniform "+ee,R.commandStr),N="1i";break;case Ai:E.command(Pr(he)&&he.length&&he.length%2===0&&he.length<=be*2,"uniform "+ee,R.commandStr),N="2i";break;case Vo:E.command(Pr(he)&&he.length&&he.length%2===0&&he.length<=be*2,"uniform "+ee,R.commandStr),N="2i";break;case Rs:E.command(Pr(he)&&he.length&&he.length%3===0&&he.length<=be*3,"uniform "+ee,R.commandStr),N="3i";break;case $o:E.command(Pr(he)&&he.length&&he.length%3===0&&he.length<=be*3,"uniform "+ee,R.commandStr),N="3i";break;case Cs:E.command(Pr(he)&&he.length&&he.length%4===0&&he.length<=be*4,"uniform "+ee,R.commandStr),N="4i";break;case Si:E.command(Pr(he)&&he.length&&he.length%4===0&&he.length<=be*4,"uniform "+ee,R.commandStr),N="4i";break}be>1?(N+="v",he=R.global.def("["+Array.prototype.slice.call(he)+"]")):he=Pr(he)?Array.prototype.slice.call(he):he,y(X,".uniform",N,"(",ot,",",he,");")}continue}else Ae=Ye.append(R,y)}else{if(!Q(ru))continue;Ae=y.def(Y.uniforms,"[",T.id(ee),"]")}_e===Ms?(E(!Array.isArray(Ae),"must specify a scalar prop for textures"),y("if(",Ae,"&&",Ae,'._reglType==="framebuffer"){',Ae,"=",Ae,".color[0];","}")):_e===Zo&&(E(!Array.isArray(Ae),"must specify a scalar prop for cube maps"),y("if(",Ae,"&&",Ae,'._reglType==="framebufferCube"){',Ae,"=",Ae,".color[0];","}")),E.optional(function(){function Jn(Pn,Ps){R.assert(y,Pn,'bad data or missing for uniform "'+ee+'". '+Ps)}function vo(Pn,Ps){Ps===1&&E(!Array.isArray(Ae),"must not specify an array type for uniform"),Jn("Array.isArray("+Ae+") && typeof "+Ae+'[0]===" '+Pn+'" || typeof '+Ae+'==="'+Pn+'"',"invalid type, expected "+Pn)}function li(Pn,Ps,Uf){Array.isArray(Ae)?E(Ae.length&&Ae.length%Pn===0&&Ae.length<=Pn*Uf,"must have length of "+(Uf===1?"":"n * ")+Pn):Jn(Y.isArrayLike+"("+Ae+")&&"+Ae+".length && "+Ae+".length % "+Pn+" === 0 && "+Ae+".length<="+Pn*Uf,"invalid vector, should have length of "+(Uf===1?"":"n * ")+Pn,R.commandStr)}function Gc(Pn){E(!Array.isArray(Ae),"must not specify a value type"),Jn("typeof "+Ae+'==="function"&&'+Ae+'._reglType==="texture'+(Pn===Oc?"2d":"Cube")+'"',"invalid texture type",R.commandStr)}switch(_e){case Mf:vo("number",be);break;case Vo:li(2,"number",be);break;case $o:li(3,"number",be);break;case Si:li(4,"number",be);break;case If:vo("number",be);break;case ao:li(2,"number",be);break;case Ls:li(3,"number",be);break;case Wo:li(4,"number",be);break;case jl:vo("boolean",be);break;case Ai:li(2,"boolean",be);break;case Rs:li(3,"boolean",be);break;case Cs:li(4,"boolean",be);break;case oo:li(4,"number",be);break;case Os:li(9,"number",be);break;case Is:li(16,"number",be);break;case Ms:Gc(Oc);break;case Zo:Gc(t0);break}});var vr=1;switch(_e){case Ms:case Zo:var xn=y.def(Ae,"._texture");y(X,".uniform1i(",ot,",",xn,".bind());"),y.exit(xn,".unbind();");continue;case Mf:case jl:N="1i";break;case Vo:case Ai:N="2i",vr=2;break;case $o:case Rs:N="3i",vr=3;break;case Si:case Cs:N="4i",vr=4;break;case If:N="1f";break;case ao:N="2f",vr=2;break;case Ls:N="3f",vr=3;break;case Wo:N="4f",vr=4;break;case oo:N="Matrix2fv";break;case Os:N="Matrix3fv";break;case Is:N="Matrix4fv";break}if(N.indexOf("Matrix")===-1&&be>1&&(N+="v",vr=1),N.charAt(0)==="M"){y(X,".uniform",N,"(",ot,",");var co=Math.pow(_e-oo+2,2),aa=R.global.def("new Float32Array(",co,")");Array.isArray(Ae)?y("false,(",at(co,function(Jn){return aa+"["+Jn+"]="+Ae[Jn]}),",",aa,")"):y("false,(Array.isArray(",Ae,")||",Ae," instanceof Float32Array)?",Ae,":(",at(co,function(Jn){return aa+"["+Jn+"]="+Ae+"["+Jn+"]"}),",",aa,")"),y(");")}else if(vr>1){for(var Bi=[],La=[],ho=0;ho<vr;++ho)Array.isArray(Ae)?La.push(Ae[ho]):La.push(y.def(Ae+"["+ho+"]")),W&&Bi.push(y.def());W&&y("if(!",R.batchId,"||",Bi.map(function(Jn,vo){return Jn+"!=="+La[vo]}).join("||"),"){",Bi.map(function(Jn,vo){return Jn+"="+La[vo]+";"}).join("")),y(X,".uniform",N,"(",ot,",",La.join(","),");"),W&&y("}")}else{if(E(!Array.isArray(Ae),"uniform value must not be an array"),W){var Bc=y.def();y("if(!",R.batchId,"||",Bc,"!==",Ae,"){",Bc,"=",Ae,";")}y(X,".uniform",N,"(",ot,",",Ae,");"),W&&y("}")}}}function At(R,y,H,j){var Q=R.shared,W=Q.gl,Y=Q.draw,X=j.draw;function O(){var ht=X.elements,ct,Tt=y;return ht?((ht.contextDep&&j.contextDynamic||ht.propDep)&&(Tt=H),ct=ht.append(R,Tt),X.elementsActive&&Tt("if("+ct+")"+W+".bindBuffer("+Xl+","+ct+".buffer.buffer);")):(ct=Tt.def(),Tt(ct,"=",Y,".",ba,";","if(",ct,"){",W,".bindBuffer(",Xl,",",ct,".buffer.buffer);}","else if(",Q.vao,".currentVAO){",ct,"=",R.shared.elements+".getElements("+Q.vao,".currentVAO.elements);",Se?"":"if("+ct+")"+W+".bindBuffer("+Xl+","+ct+".buffer.buffer);","}")),ct}function N(){var ht=X.count,ct,Tt=y;return ht?((ht.contextDep&&j.contextDynamic||ht.propDep)&&(Tt=H),ct=ht.append(R,Tt),E.optional(function(){ht.MISSING&&R.assert(y,"false","missing vertex count"),ht.DYNAMIC&&R.assert(Tt,ct+">=0","missing vertex count")})):(ct=Tt.def(Y,".",Sa),E.optional(function(){R.assert(Tt,ct+">=0","missing vertex count")})),ct}var M=O();function re(ht){var ct=X[ht];return ct?ct.contextDep&&j.contextDynamic||ct.propDep?ct.append(R,H):ct.append(R,y):y.def(Y,".",ht)}var ee=re(wa),_e=re(no),be=N();if(typeof be=="number"){if(be===0)return}else H("if(",be,"){"),H.exit("}");var Ye,Dt;Oe&&(Ye=re(Df),Dt=R.instancing);var yt=M+".type",ot=X.elements&&Ea(X.elements)&&!X.vaoActive;function Ae(){function ht(){H(Dt,".drawElementsInstancedANGLE(",[ee,be,yt,_e+"<<(("+yt+"-"+xc+")>>1)",Ye],");")}function ct(){H(Dt,".drawArraysInstancedANGLE(",[ee,_e,be,Ye],");")}M&&M!=="null"?ot?ht():(H("if(",M,"){"),ht(),H("}else{"),ct(),H("}")):ct()}function he(){function ht(){H(W+".drawElements("+[ee,be,yt,_e+"<<(("+yt+"-"+xc+")>>1)"]+");")}function ct(){H(W+".drawArrays("+[ee,_e,be]+");")}M&&M!=="null"?ot?ht():(H("if(",M,"){"),ht(),H("}else{"),ct(),H("}")):ct()}Oe&&(typeof Ye!="number"||Ye>=0)?typeof Ye=="string"?(H("if(",Ye,">0){"),Ae(),H("}else if(",Ye,"<0){"),he(),H("}")):Ae():he()}function qt(R,y,H,j,Q){var W=Lt(),Y=W.proc("body",Q);return E.optional(function(){W.commandStr=y.commandStr,W.command=W.link(y.commandStr)}),Oe&&(W.instancing=Y.def(W.shared.extensions,".angle_instanced_arrays")),R(W,Y,H,j),W.compile().body}function er(R,y,H,j){Wr(R,y),H.useVAO?H.drawVAO?y(R.shared.vao,".setVAO(",H.drawVAO.append(R,y),");"):y(R.shared.vao,".setVAO(",R.shared.vao,".targetVAO);"):(y(R.shared.vao,".setVAO(null);"),yn(R,y,H,j.attributes,function(){return!0})),hr(R,y,H,j.uniforms,function(){return!0},!1),At(R,y,y,H)}function Vr(R,y){var H=R.proc("draw",1);Wr(R,H),jr(R,H,y.context),tn(R,H,y.framebuffer),un(R,H,y),gn(R,H,y.state),Ut(R,H,y,!1,!0);var j=y.shader.progVar.append(R,H);if(H(R.shared.gl,".useProgram(",j,".program);"),y.shader.program)er(R,H,y,y.shader.program);else{H(R.shared.vao,".setVAO(null);");var Q=R.global.def("{}"),W=H.def(j,".id"),Y=H.def(Q,"[",W,"]");H(R.cond(Y).then(Y,".call(this,a0);").else(Y,"=",Q,"[",W,"]=",R.link(function(X){return qt(er,R,y,X,1)}),"(",j,");",Y,".call(this,a0);"))}Object.keys(y.state).length>0&&H(R.shared.current,".dirty=true;"),R.shared.vao&&H(R.shared.vao,".setVAO(null);")}function Ei(R,y,H,j){R.batchId="a1",Wr(R,y);function Q(){return!0}yn(R,y,H,j.attributes,Q),hr(R,y,H,j.uniforms,Q,!1),At(R,y,y,H)}function Da(R,y,H,j){Wr(R,y);var Q=H.contextDep,W=y.def(),Y="a0",X="a1",O=y.def();R.shared.props=O,R.batchId=W;var N=R.scope(),M=R.scope();y(N.entry,"for(",W,"=0;",W,"<",X,";++",W,"){",O,"=",Y,"[",W,"];",M,"}",N.exit);function re(yt){return yt.contextDep&&Q||yt.propDep}function ee(yt){return!re(yt)}if(H.needsContext&&jr(R,M,H.context),H.needsFramebuffer&&tn(R,M,H.framebuffer),gn(R,M,H.state,re),H.profile&&re(H.profile)&&Ut(R,M,H,!1,!0),j)H.useVAO?H.drawVAO?re(H.drawVAO)?M(R.shared.vao,".setVAO(",H.drawVAO.append(R,M),");"):N(R.shared.vao,".setVAO(",H.drawVAO.append(R,N),");"):N(R.shared.vao,".setVAO(",R.shared.vao,".targetVAO);"):(N(R.shared.vao,".setVAO(null);"),yn(R,N,H,j.attributes,ee),yn(R,M,H,j.attributes,re)),hr(R,N,H,j.uniforms,ee,!1),hr(R,M,H,j.uniforms,re,!0),At(R,N,M,H);else{var _e=R.global.def("{}"),be=H.shader.progVar.append(R,M),Ye=M.def(be,".id"),Dt=M.def(_e,"[",Ye,"]");M(R.shared.gl,".useProgram(",be,".program);","if(!",Dt,"){",Dt,"=",_e,"[",Ye,"]=",R.link(function(yt){return qt(Ei,R,H,yt,2)}),"(",be,");}",Dt,".call(this,a0[",W,"],",W,");")}}function k(R,y){var H=R.proc("batch",2);R.batchId="0",Wr(R,H);var j=!1,Q=!0;Object.keys(y.context).forEach(function(_e){j=j||y.context[_e].propDep}),j||(jr(R,H,y.context),Q=!1);var W=y.framebuffer,Y=!1;W?(W.propDep?j=Y=!0:W.contextDep&&j&&(Y=!0),Y||tn(R,H,W)):tn(R,H,null),y.state.viewport&&y.state.viewport.propDep&&(j=!0);function X(_e){return _e.contextDep&&j||_e.propDep}un(R,H,y),gn(R,H,y.state,function(_e){return!X(_e)}),(!y.profile||!X(y.profile))&&Ut(R,H,y,!1,"a1"),y.contextDep=j,y.needsContext=Q,y.needsFramebuffer=Y;var O=y.shader.progVar;if(O.contextDep&&j||O.propDep)Da(R,H,y,null);else{var N=O.append(R,H);if(H(R.shared.gl,".useProgram(",N,".program);"),y.shader.program)Da(R,H,y,y.shader.program);else{H(R.shared.vao,".setVAO(null);");var M=R.global.def("{}"),re=H.def(N,".id"),ee=H.def(M,"[",re,"]");H(R.cond(ee).then(ee,".call(this,a0,a1);").else(ee,"=",M,"[",re,"]=",R.link(function(_e){return qt(Da,R,y,_e,2)}),"(",N,");",ee,".call(this,a0,a1);"))}}Object.keys(y.state).length>0&&H(R.shared.current,".dirty=true;"),R.shared.vao&&H(R.shared.vao,".setVAO(null);")}function le(R,y){var H=R.proc("scope",3);R.batchId="a2";var j=R.shared,Q=j.current;jr(R,H,y.context),y.framebuffer&&y.framebuffer.append(R,H),Pf(Object.keys(y.state)).forEach(function(Y){var X=y.state[Y],O=X.append(R,H);Pr(O)?O.forEach(function(N,M){H.set(R.next[Y],"["+M+"]",N)}):H.set(j.next,"."+Y,O)}),Ut(R,H,y,!0,!0),[ba,no,Sa,Df,wa].forEach(function(Y){var X=y.draw[Y];!X||H.set(j.draw,"."+Y,""+X.append(R,H))}),Object.keys(y.uniforms).forEach(function(Y){var X=y.uniforms[Y].append(R,H);Array.isArray(X)&&(X="["+X.join()+"]"),H.set(j.uniforms,"["+T.id(Y)+"]",X)}),Object.keys(y.attributes).forEach(function(Y){var X=y.attributes[Y].append(R,H),O=R.scopeAttrib(Y);Object.keys(new K).forEach(function(N){H.set(O,"."+N,X[N])})}),y.scopeVAO&&H.set(j.vao,".targetVAO",y.scopeVAO.append(R,H));function W(Y){var X=y.shader[Y];X&&H.set(j.shader,"."+Y,X.append(R,H))}W(Es),W(ro),Object.keys(y.state).length>0&&(H(Q,".dirty=true;"),H.exit(Q,".dirty=true;")),H("a1(",R.shared.context,",a0,",R.batchId,");")}function ne(R){if(!(typeof R!="object"||Pr(R))){for(var y=Object.keys(R),H=0;H<y.length;++H)if(Z.isDynamic(R[y[H]]))return!0;return!1}}function ft(R,y,H){var j=y.static[H];if(!j||!ne(j))return;var Q=R.global,W=Object.keys(j),Y=!1,X=!1,O=!1,N=R.global.def("{}");W.forEach(function(re){var ee=j[re];if(Z.isDynamic(ee)){typeof ee=="function"&&(ee=j[re]=Z.unbox(ee));var _e=En(ee,null);Y=Y||_e.thisDep,O=O||_e.propDep,X=X||_e.contextDep}else{switch(Q(N,".",re,"="),typeof ee){case"number":Q(ee);break;case"string":Q('"',ee,'"');break;case"object":Array.isArray(ee)&&Q("[",ee.join(),"]");break;default:Q(R.link(ee));break}Q(";")}});function M(re,ee){W.forEach(function(_e){var be=j[_e];if(!!Z.isDynamic(be)){var Ye=re.invoke(ee,be);ee(N,".",_e,"=",Ye,";")}})}y.dynamic[H]=new Z.DynamicVariable(eo,{thisDep:Y,contextDep:X,propDep:O,ref:N,append:M}),delete y.static[H]}function zt(R,y,H,j,Q){var W=Lt();W.stats=W.link(Q),Object.keys(y.static).forEach(function(X){ft(W,y,X)}),rr.forEach(function(X){ft(W,R,X)});var Y=Kr(R,y,H,j,W);return Vr(W,Y),le(W,Y),k(W,Y),a(W.compile(),{destroy:function(){Y.shader.program.destroy()}})}return{next:je,current:Qe,procs:function(){var R=Lt(),y=R.proc("poll"),H=R.proc("refresh"),j=R.block();y(j),H(j);var Q=R.shared,W=Q.gl,Y=Q.next,X=Q.current;j(X,".dirty=false;"),tn(R,y),tn(R,H,null,!0);var O;Oe&&(O=R.link(Oe)),G.oes_vertex_array_object&&H(R.link(G.oes_vertex_array_object),".bindVertexArrayOES(null);");for(var N=0;N<se.maxAttributes;++N){var M=H.def(Q.attributes,"[",N,"]"),re=R.cond(M,".buffer");re.then(W,".enableVertexAttribArray(",N,");",W,".bindBuffer(",zo,",",M,".buffer.buffer);",W,".vertexAttribPointer(",N,",",M,".size,",M,".type,",M,".normalized,",M,".stride,",M,".offset);").else(W,".disableVertexAttribArray(",N,");",W,".vertexAttrib4f(",N,",",M,".x,",M,".y,",M,".z,",M,".w);",M,".buffer=null;"),H(re),Oe&&H(O,".vertexAttribDivisorANGLE(",N,",",M,".divisor);")}return H(R.shared.vao,".currentVAO=null;",R.shared.vao,".setVAO(",R.shared.vao,".targetVAO);"),Object.keys(xe).forEach(function(ee){var _e=xe[ee],be=j.def(Y,".",ee),Ye=R.block();Ye("if(",be,"){",W,".enable(",_e,")}else{",W,".disable(",_e,")}",X,".",ee,"=",be,";"),H(Ye),y("if(",be,"!==",X,".",ee,"){",Ye,"}")}),Object.keys(ge).forEach(function(ee){var _e=ge[ee],be=Qe[ee],Ye,Dt,yt=R.block();if(yt(W,".",_e,"("),Pr(be)){var ot=be.length;Ye=R.global.def(Y,".",ee),Dt=R.global.def(X,".",ee),yt(at(ot,function(Ae){return Ye+"["+Ae+"]"}),");",at(ot,function(Ae){return Dt+"["+Ae+"]="+Ye+"["+Ae+"];"}).join("")),y("if(",at(ot,function(Ae){return Ye+"["+Ae+"]!=="+Dt+"["+Ae+"]"}).join("||"),"){",yt,"}")}else Ye=j.def(Y,".",ee),Dt=j.def(X,".",ee),yt(Ye,");",X,".",ee,"=",Ye,";"),y("if(",Ye,"!==",Dt,"){",yt,"}");H(yt)}),R.compile()}(),compile:zt}}function o0(){return{vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0}}var kc=34918,ia=34919,iu=35007,Pc=function(h,T){if(!T.ext_disjoint_timer_query)return null;var G=[];function se(){return G.pop()||T.ext_disjoint_timer_query.createQueryEXT()}function me(Oe){G.push(Oe)}var ae=[];function fe(Oe){var rt=se();T.ext_disjoint_timer_query.beginQueryEXT(iu,rt),ae.push(rt),Ce(ae.length-1,ae.length,Oe)}function Le(){T.ext_disjoint_timer_query.endQueryEXT(iu)}function De(){this.startQueryIndex=-1,this.endQueryIndex=-1,this.sum=0,this.stats=null}var Ne=[];function Ge(){return Ne.pop()||new De}function Be(Oe){Ne.push(Oe)}var We=[];function Ce(Oe,rt,Se){var Qe=Ge();Qe.startQueryIndex=Oe,Qe.endQueryIndex=rt,Qe.sum=0,Qe.stats=Se,We.push(Qe)}var ke=[],K=[];function oe(){var Oe,rt,Se=ae.length;if(Se!==0){K.length=Math.max(K.length,Se+1),ke.length=Math.max(ke.length,Se+1),ke[0]=0,K[0]=0;var Qe=0;for(Oe=0,rt=0;rt<ae.length;++rt){var je=ae[rt];T.ext_disjoint_timer_query.getQueryObjectEXT(je,ia)?(Qe+=T.ext_disjoint_timer_query.getQueryObjectEXT(je,kc),me(je)):ae[Oe++]=je,ke[rt+1]=Qe,K[rt+1]=Oe}for(ae.length=Oe,Oe=0,rt=0;rt<We.length;++rt){var pt=We[rt],xe=pt.startQueryIndex,ge=pt.endQueryIndex;pt.sum+=ke[ge]-ke[xe];var lt=K[xe],Ve=K[ge];Ve===lt?(pt.stats.gpuTime+=pt.sum/1e6,Be(pt)):(pt.startQueryIndex=lt,pt.endQueryIndex=Ve,We[Oe++]=pt)}We.length=Oe}}return{beginQuery:fe,endQuery:Le,pushScopeStats:Ce,update:oe,getNumPendingQueries:function(){return ae.length},clear:function(){G.push.apply(G,ae);for(var Oe=0;Oe<G.length;Oe++)T.ext_disjoint_timer_query.deleteQueryEXT(G[Oe]);ae.length=0,G.length=0},restore:function(){ae.length=0,G.length=0}}},s0=16384,Nc=256,f0=1024,l0=34962,Ni="webglcontextlost",Nf="webglcontextrestored",Bf=1,au=2,Gf=3;function uo(h,T){for(var G=0;G<h.length;++G)if(h[G]===T)return G;return-1}function Bt(h){var T=ce(h);if(!T)return null;var G=T.gl,se=G.getContextAttributes(),me=G.isContextLost(),ae=Et(G,T);if(!ae)return null;var fe=He(),Le=o0(),De=ae.extensions,Ne=Pc(G,De),Ge=m(),Be=G.drawingBufferWidth,We=G.drawingBufferHeight,Ce={tick:0,time:0,viewportWidth:Be,viewportHeight:We,framebufferWidth:Be,framebufferHeight:We,drawingBufferWidth:Be,drawingBufferHeight:We,pixelRatio:T.pixelRatio},ke={},K={elements:null,primitive:4,count:-1,offset:0,instances:-1},oe=ol(G,De),Oe=Sn(G,Le,T,Qe),rt=Br(G,De,Oe,Le),Se=Kd(G,De,oe,Le,Oe,rt,K);function Qe(At){return Se.destroyBuffer(At)}var je=Nl(G,fe,Le,T),pt=In(G,De,oe,function(){lt.procs.poll()},Ce,Le,T),xe=Fd(G,De,oe,Le,T),ge=qd(G,De,oe,pt,xe,Le),lt=nu(G,fe,De,oe,Oe,rt,pt,ge,ke,Se,je,K,Ce,Ne,T),Ve=e0(G,ge,lt.procs.poll,Ce,se,De,oe),Me=lt.next,$e=G.canvas,qe=[],It=[],Lt=[],Ke=[T.onDestroy],Je=null;function wt(){if(qe.length===0){Ne&&Ne.update(),Je=null;return}Je=we.next(wt),gn();for(var At=qe.length-1;At>=0;--At){var qt=qe[At];qt&&qt(Ce,null,0)}G.flush(),Ne&&Ne.update()}function Ct(){!Je&&qe.length>0&&(Je=we.next(wt))}function Vt(){Je&&(we.cancel(wt),Je=null)}function Ir(At){At.preventDefault(),me=!0,Vt(),It.forEach(function(qt){qt()})}function Lr(At){G.getError(),me=!1,ae.restore(),je.restore(),Oe.restore(),pt.restore(),xe.restore(),ge.restore(),Se.restore(),Ne&&Ne.restore(),lt.procs.refresh(),Ct(),Lt.forEach(function(qt){qt()})}$e&&($e.addEventListener(Ni,Ir,!1),$e.addEventListener(Nf,Lr,!1));function Xt(){qe.length=0,Vt(),$e&&($e.removeEventListener(Ni,Ir),$e.removeEventListener(Nf,Lr)),je.clear(),ge.clear(),xe.clear(),Se.clear(),pt.clear(),rt.clear(),Oe.clear(),Ne&&Ne.clear(),Ke.forEach(function(At){At()})}function Dr(At){E(!!At,"invalid args to regl({...})"),E.type(At,"object","invalid args to regl({...})");function qt(Q){var W=a({},Q);delete W.uniforms,delete W.attributes,delete W.context,delete W.vao,"stencil"in W&&W.stencil.op&&(W.stencil.opBack=W.stencil.opFront=W.stencil.op,delete W.stencil.op);function Y(X){if(X in W){var O=W[X];delete W[X],Object.keys(O).forEach(function(N){W[X+"."+N]=O[N]})}}return Y("blend"),Y("depth"),Y("cull"),Y("stencil"),Y("polygonOffset"),Y("scissor"),Y("sample"),"vao"in Q&&(W.vao=Q.vao),W}function er(Q,W){var Y={},X={};return Object.keys(Q).forEach(function(O){var N=Q[O];if(Z.isDynamic(N)){X[O]=Z.unbox(N,O);return}else if(W&&Array.isArray(N)){for(var M=0;M<N.length;++M)if(Z.isDynamic(N[M])){X[O]=Z.unbox(N,O);return}}Y[O]=N}),{dynamic:X,static:Y}}var Vr=er(At.context||{},!0),Ei=er(At.uniforms||{},!0),Da=er(At.attributes||{},!1),k=er(qt(At),!1),le={gpuTime:0,cpuTime:0,count:0},ne=lt.compile(k,Da,Ei,Vr,le),ft=ne.draw,zt=ne.batch,R=ne.scope,y=[];function H(Q){for(;y.length<Q;)y.push(null);return y}function j(Q,W){var Y;if(me&&E.raise("context lost"),typeof Q=="function")return R.call(this,null,Q,0);if(typeof W=="function")if(typeof Q=="number")for(Y=0;Y<Q;++Y)R.call(this,null,W,Y);else if(Array.isArray(Q))for(Y=0;Y<Q.length;++Y)R.call(this,Q[Y],W,Y);else return R.call(this,Q,W,0);else if(typeof Q=="number"){if(Q>0)return zt.call(this,H(Q|0),Q|0)}else if(Array.isArray(Q)){if(Q.length)return zt.call(this,Q,Q.length)}else return ft.call(this,Q)}return a(j,{stats:le,destroy:function(){ne.destroy()}})}var pr=ge.setFBO=Dr({framebuffer:Z.define.call(null,Bf,"framebuffer")});function Kr(At,qt){var er=0;lt.procs.poll();var Vr=qt.color;Vr&&(G.clearColor(+Vr[0]||0,+Vr[1]||0,+Vr[2]||0,+Vr[3]||0),er|=s0),"depth"in qt&&(G.clearDepth(+qt.depth),er|=Nc),"stencil"in qt&&(G.clearStencil(qt.stencil|0),er|=f0),E(!!er,"called regl.clear with no buffer specified"),G.clear(er)}function jr(At){if(E(typeof At=="object"&&At,"regl.clear() takes an object as input"),"framebuffer"in At)if(At.framebuffer&&At.framebuffer_reglType==="framebufferCube")for(var qt=0;qt<6;++qt)pr(a({framebuffer:At.framebuffer.faces[qt]},At),Kr);else pr(At,Kr);else Kr(null,At)}function tn(At){E.type(At,"function","regl.frame() callback must be a function"),qe.push(At);function qt(){var er=uo(qe,At);E(er>=0,"cannot cancel a frame twice");function Vr(){var Ei=uo(qe,Vr);qe[Ei]=qe[qe.length-1],qe.length-=1,qe.length<=0&&Vt()}qe[er]=Vr}return Ct(),{cancel:qt}}function un(){var At=Me.viewport,qt=Me.scissor_box;At[0]=At[1]=qt[0]=qt[1]=0,Ce.viewportWidth=Ce.framebufferWidth=Ce.drawingBufferWidth=At[2]=qt[2]=G.drawingBufferWidth,Ce.viewportHeight=Ce.framebufferHeight=Ce.drawingBufferHeight=At[3]=qt[3]=G.drawingBufferHeight}function gn(){Ce.tick+=1,Ce.time=Ut(),un(),lt.procs.poll()}function Wr(){pt.refresh(),un(),lt.procs.refresh(),Ne&&Ne.update()}function Ut(){return(m()-Ge)/1e3}Wr();function yn(At,qt){E.type(qt,"function","listener callback must be a function");var er;switch(At){case"frame":return tn(qt);case"lost":er=It;break;case"restore":er=Lt;break;case"destroy":er=Ke;break;default:E.raise("invalid event, must be one of frame,lost,restore,destroy")}return er.push(qt),{cancel:function(){for(var Vr=0;Vr<er.length;++Vr)if(er[Vr]===qt){er[Vr]=er[er.length-1],er.pop();return}}}}var hr=a(Dr,{clear:jr,prop:Z.define.bind(null,Bf),context:Z.define.bind(null,au),this:Z.define.bind(null,Gf),draw:Dr({}),buffer:function(At){return Oe.create(At,l0,!1,!1)},elements:function(At){return rt.create(At,!1)},texture:pt.create2D,cube:pt.createCube,renderbuffer:xe.create,framebuffer:ge.create,framebufferCube:ge.createCube,vao:Se.createVAO,attributes:se,frame:tn,on:yn,limits:oe,hasExtension:function(At){return oe.extensions.indexOf(At.toLowerCase())>=0},read:Ve,destroy:Xt,_gl:G,_refresh:Wr,poll:function(){gn(),Ne&&Ne.update()},now:Ut,stats:Le});return T.onDone(null,hr),hr}return Bt})})(u_);const ub=u_.exports,cb=[0,0,0,0],hb=1024,db=1496e8,vb=40075016686e-3,_b=695508e3,pb=.017453292519943295,mb=.0333334,gb=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/,yb=/(?:#)[0-9a-f]{8}|(?:#)[0-9a-f]{6}|(?:#)[0-9a-f]{4}|(?:#)[0-9a-f]{3}/ig;function c_(){const t=new Uint8Array([170,187]);return new Uint16Array(t.buffer)[0]===48042}function h_(...t){if(t.length===1){const[n]=t;return new Array(n).fill(void 0).map((i,a)=>a)}else{const[n,i,a=1]=t;if(a===0)throw new Error("Argument step must be nonzero.");const f=[];for(let s=n;a>0?s<i:s>i;s+=a)f.push(s);return f}}async function d_(t,n,i){return new Promise((a,f)=>{const s=new XMLHttpRequest;s.open("GET",t,!0),s.responseType="arraybuffer",s.addEventListener("load",()=>{a(s.response)}),s.addEventListener("error",f),s.send(null)}).then(a=>{const f=kh.exports.decode(a),s=kh.exports.toRGBA8(f)[0];return new Uint8Array(s)}).catch(()=>Zh(n,i))}function xb(t,n){return t.byteLength!==n.byteLength?!1:t.every((i,a)=>i===n[a])}function bb(t,n){const i=2/t,a=-2/n;return[i,0,0,0,0,a,0,0,0,0,1,0,-1,1,0,1]}function wb(t){const[{x:n,y:i},{x:a,y:f}]=t;return[[n,i],[a,i],[n,f],[a,f]]}const Zh=Xs.exports.memoize((t,n=256)=>{const i=new Float32Array(n*n);return i.fill(t),new Uint8Array(i.buffer)});function Sb(t,n){return`${Object.keys(n).map(a=>`#define ${a} ${n[a]}
|
|
43
|
+
`),Oe=Function.apply(null,x.concat(We));return Oe.apply(null,C)}return{global:De,link:ie,block:pe,proc:Be,scope:re,cond:ae,compile:Ge}}var Sn="xyzw".split(""),sc=5121,Va=1,po=2,$a=0,Li=1,mo=2,Cl=3,Za=4,oc=5,Ml=6,pn="dither",go="blend.enable",kl="blend.color",ri="blend.equation",vs="blend.func",_s="depth.enable",ha="depth.func",Il="depth.range",Mn="depth.mask",ps="colorMask",lc="cull.enable",uc="cull.face",Fl="frontFace",ms="lineWidth",cc="polygonOffset.enable",Xa="polygonOffset.offset",Nl="sample.alpha",hc="sample.enable",Bl="sample.coverage",kf="stencil.enable",dc="stencil.mask",Pl="stencil.func",gs="stencil.opFront",If="stencil.opBack",vc="scissor.enable",yo="scissor.box",Zi="viewport",Ff="profile",Xi="framebuffer",ys="vert",qa="frag",da="elements",va="primitive",_a="count",Ka="offset",bo="instances",Nf="vao",xo="Width",Gl="Height",ja=Xi+xo,Bf=Xi+Gl,Ul=Zi+xo,_c=Zi+Gl,wo="drawingBuffer",pc=wo+xo,So=wo+Gl,rr=[vs,ri,Pl,gs,If,Bl,Zi,yo,Xa],Pf=34962,Yl=34963,bs=35632,mc=35633,gc=3553,Pd=34067,ni=2884,Gd=3042,To=3024,Hl=2960,yc=2929,bc=3089,Xn=32823,pa=32926,zl=32928,Eo=5126,Qa=35664,xs=35665,Gf=35666,Ao=5124,Uf=35667,Yf=35668,pi=35669,Wl=35670,mi=35671,ws=35672,Ss=35673,Ja=35674,Ts=35675,Es=35676,As=35678,Hf=35680,Do=4,Ds=1028,ma=1029,Vl=2304,kn=2305,Oi=32775,Ud=32776,Yd=519,gi=7680,ef=0,$l=1,Zl=32774,Hd=513,Xl=36160,zf=36064,Vn={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},xc=["constant color, constant alpha","one minus constant color, constant alpha","constant color, one minus constant alpha","one minus constant color, one minus constant alpha","constant alpha, constant color","constant alpha, one minus constant color","one minus constant alpha, constant color","one minus constant alpha, one minus constant color"],tf={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},qi={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Ls={frag:bs,vert:mc},Lo={cw:Vl,ccw:kn};function rf(c){return Array.isArray(c)||i(c)||On(c)}function Oo(c){return c.sort(function(x,C){return x===Zi?-1:C===Zi?1:x<C?-1:1})}function Hr(c,x,C,ie){this.thisDep=c,this.contextDep=x,this.propDep=C,this.append=ie}function ga(c){return c&&!(c.thisDep||c.contextDep||c.propDep)}function zr(c){return new Hr(!1,!1,!1,c)}function Tn(c,x){var C=c.type;if(C===$a){var ie=c.data.length;return new Hr(!0,ie>=1,ie>=2,x)}else if(C===Za){var pe=c.data;return new Hr(pe.thisDep,pe.contextDep,pe.propDep,x)}else{if(C===oc)return new Hr(!1,!1,!1,x);if(C===Ml){for(var re=!1,ae=!1,De=!1,Ae=0;Ae<c.data.length;++Ae){var Be=c.data[Ae];if(Be.type===Li)De=!0;else if(Be.type===mo)ae=!0;else if(Be.type===Cl)re=!0;else if(Be.type===$a){re=!0;var Ge=Be.data;Ge>=1&&(ae=!0),Ge>=2&&(De=!0)}else Be.type===Za&&(re=re||Be.data.thisDep,ae=ae||Be.data.contextDep,De=De||Be.data.propDep)}return new Hr(re,ae,De,x)}else return new Hr(C===Cl,C===mo,C===Li,x)}}var ql=new Hr(!1,!1,!1,function(){});function Kl(c,x,C,ie,pe,re,ae,De,Ae,Be,Ge,Pe,We,Oe,Fe){var V=Be.Record,ne={add:32774,subtract:32778,"reverse subtract":32779};C.ext_blend_minmax&&(ne.min=Oi,ne.max=Ud);var Re=C.angle_instanced_arrays,rt=C.webgl_draw_buffers,Se=C.oes_vertex_array_object,Qe={dirty:!0,profile:Fe.profile},je={},pt=[],ye={},me={};function ot(E){return E.replace(".","_")}function Ve(E,m,B){var Z=ot(E);pt.push(E),je[Z]=Qe[Z]=!!B,ye[Z]=m}function ke(E,m,B){var Z=ot(E);pt.push(E),Array.isArray(B)?(Qe[Z]=B.slice(),je[Z]=B.slice()):Qe[Z]=je[Z]=B,me[Z]=m}Ve(pn,To),Ve(go,Gd),ke(kl,"blendColor",[0,0,0,0]),ke(ri,"blendEquationSeparate",[Zl,Zl]),ke(vs,"blendFuncSeparate",[$l,ef,$l,ef]),Ve(_s,yc,!0),ke(ha,"depthFunc",Hd),ke(Il,"depthRange",[0,1]),ke(Mn,"depthMask",!0),ke(ps,ps,[!0,!0,!0,!0]),Ve(lc,ni),ke(uc,"cullFace",ma),ke(Fl,Fl,kn),ke(ms,ms,1),Ve(cc,Xn),ke(Xa,"polygonOffset",[0,0]),Ve(Nl,pa),Ve(hc,zl),ke(Bl,"sampleCoverage",[1,!1]),Ve(kf,Hl),ke(dc,"stencilMask",-1),ke(Pl,"stencilFunc",[Yd,0,-1]),ke(gs,"stencilOpSeparate",[Ds,gi,gi,gi]),ke(If,"stencilOpSeparate",[ma,gi,gi,gi]),Ve(vc,bc),ke(yo,"scissor",[0,0,c.drawingBufferWidth,c.drawingBufferHeight]),ke(Zi,Zi,[0,0,c.drawingBufferWidth,c.drawingBufferHeight]);var $e={gl:c,context:We,strings:x,next:je,current:Qe,draw:Pe,elements:re,buffer:pe,shader:Ge,attributes:Be.state,vao:Be,uniforms:Ae,framebuffer:De,extensions:C,timer:Oe,isBufferArgs:rf},qe={primTypes:Ui,compareFuncs:tf,blendFuncs:Vn,blendEquations:ne,stencilOps:qi,glTypes:Ma,orientationType:Lo};w.optional(function(){$e.isArrayLike=Nr}),rt&&(qe.backBuffer=[ma],qe.drawBuffer=it(ie.maxDrawbuffers,function(E){return E===0?[0]:it(E,function(m){return zf+m})}));var Mt=0;function Lt(){var E=Wa(),m=E.link,B=E.global;E.id=Mt++,E.batchId="0";var Z=m($e),X=E.shared={props:"a0"};Object.keys($e).forEach(function(R){X[R]=B.def(Z,".",R)}),w.optional(function(){E.CHECK=m(w),E.commandStr=w.guessCommand(),E.command=m(E.commandStr),E.assert=function(R,L,j){R("if(!(",L,"))",this.CHECK,".commandRaise(",m(j),",",this.command,");")},qe.invalidBlendCombinations=xc});var G=E.next={},N=E.current={};Object.keys(me).forEach(function(R){Array.isArray(Qe[R])&&(G[R]=B.def(X.next,".",R),N[R]=B.def(X.current,".",R))});var W=E.constants={};Object.keys(qe).forEach(function(R){W[R]=B.def(JSON.stringify(qe[R]))}),E.invoke=function(R,L){switch(L.type){case $a:var j=["this",X.context,X.props,E.batchId];return R.def(m(L.data),".call(",j.slice(0,Math.max(L.data.length+1,4)),")");case Li:return R.def(X.props,L.data);case mo:return R.def(X.context,L.data);case Cl:return R.def("this",L.data);case Za:return L.data.append(E,R),L.data.ref;case oc:return L.data.toString();case Ml:return L.data.map(function(q){return E.invoke(R,q)})}},E.attribCache={};var D={};return E.scopeAttrib=function(R){var L=x.id(R);if(L in D)return D[L];var j=Be.scope[L];j||(j=Be.scope[L]=new V);var q=D[L]=m(j);return q},E}function Ke(E){var m=E.static,B=E.dynamic,Z;if(Ff in m){var X=!!m[Ff];Z=zr(function(N,W){return X}),Z.enable=X}else if(Ff in B){var G=B[Ff];Z=Tn(G,function(N,W){return N.invoke(W,G)})}return Z}function Je(E,m){var B=E.static,Z=E.dynamic;if(Xi in B){var X=B[Xi];return X?(X=De.getFramebuffer(X),w.command(X,"invalid framebuffer object"),zr(function(N,W){var D=N.link(X),R=N.shared;W.set(R.framebuffer,".next",D);var L=R.context;return W.set(L,"."+ja,D+".width"),W.set(L,"."+Bf,D+".height"),D})):zr(function(N,W){var D=N.shared;W.set(D.framebuffer,".next","null");var R=D.context;return W.set(R,"."+ja,R+"."+pc),W.set(R,"."+Bf,R+"."+So),"null"})}else if(Xi in Z){var G=Z[Xi];return Tn(G,function(N,W){var D=N.invoke(W,G),R=N.shared,L=R.framebuffer,j=W.def(L,".getFramebuffer(",D,")");w.optional(function(){N.assert(W,"!"+D+"||"+j,"invalid framebuffer object")}),W.set(L,".next",j);var q=R.context;return W.set(q,"."+ja,j+"?"+j+".width:"+q+"."+pc),W.set(q,"."+Bf,j+"?"+j+".height:"+q+"."+So),j})}else return null}function wt(E,m,B){var Z=E.static,X=E.dynamic;function G(D){if(D in Z){var R=Z[D];w.commandType(R,"object","invalid "+D,B.commandStr);var L=!0,j=R.x|0,q=R.y|0,ve,be;return"width"in R?(ve=R.width|0,w.command(ve>=0,"invalid "+D,B.commandStr)):L=!1,"height"in R?(be=R.height|0,w.command(be>=0,"invalid "+D,B.commandStr)):L=!1,new Hr(!L&&m&&m.thisDep,!L&&m&&m.contextDep,!L&&m&&m.propDep,function(yt,at){var Te=yt.shared.context,le=ve;"width"in R||(le=at.def(Te,".",ja,"-",j));var ht=be;return"height"in R||(ht=at.def(Te,".",Bf,"-",q)),[j,q,le,ht]})}else if(D in X){var Ye=X[D],Dt=Tn(Ye,function(yt,at){var Te=yt.invoke(at,Ye);w.optional(function(){yt.assert(at,Te+"&&typeof "+Te+'==="object"',"invalid "+D)});var le=yt.shared.context,ht=at.def(Te,".x|0"),lt=at.def(Te,".y|0"),Et=at.def('"width" in ',Te,"?",Te,".width|0:","(",le,".",ja,"-",ht,")"),dr=at.def('"height" in ',Te,"?",Te,".height|0:","(",le,".",Bf,"-",lt,")");return w.optional(function(){yt.assert(at,Et+">=0&&"+dr+">=0","invalid "+D)}),[ht,lt,Et,dr]});return m&&(Dt.thisDep=Dt.thisDep||m.thisDep,Dt.contextDep=Dt.contextDep||m.contextDep,Dt.propDep=Dt.propDep||m.propDep),Dt}else return m?new Hr(m.thisDep,m.contextDep,m.propDep,function(yt,at){var Te=yt.shared.context;return[0,0,at.def(Te,".",ja),at.def(Te,".",Bf)]}):null}var N=G(Zi);if(N){var W=N;N=new Hr(N.thisDep,N.contextDep,N.propDep,function(D,R){var L=W.append(D,R),j=D.shared.context;return R.set(j,"."+Ul,L[2]),R.set(j,"."+_c,L[3]),L})}return{viewport:N,scissor_box:G(yo)}}function Rt(E,m){var B=E.static,Z=typeof B[qa]=="string"&&typeof B[ys]=="string";if(Z){if(Object.keys(m.dynamic).length>0)return null;var X=m.static,G=Object.keys(X);if(G.length>0&&typeof X[G[0]]=="number"){for(var N=[],W=0;W<G.length;++W)w(typeof X[G[W]]=="number","must specify all vertex attribute locations when using vaos"),N.push([X[G[W]]|0,G[W]]);return N}}return null}function Vt(E,m,B){var Z=E.static,X=E.dynamic;function G(L){if(L in Z){var j=x.id(Z[L]);w.optional(function(){Ge.shader(Ls[L],j,w.guessCommand())});var q=zr(function(){return j});return q.id=j,q}else if(L in X){var ve=X[L];return Tn(ve,function(be,Ye){var Dt=be.invoke(Ye,ve),yt=Ye.def(be.shared.strings,".id(",Dt,")");return w.optional(function(){Ye(be.shared.shader,".shader(",Ls[L],",",yt,",",be.command,");")}),yt})}return null}var N=G(qa),W=G(ys),D=null,R;return ga(N)&&ga(W)?(D=Ge.program(W.id,N.id,null,B),R=zr(function(L,j){return L.link(D)})):R=new Hr(N&&N.thisDep||W&&W.thisDep,N&&N.contextDep||W&&W.contextDep,N&&N.propDep||W&&W.propDep,function(L,j){var q=L.shared.shader,ve;N?ve=N.append(L,j):ve=j.def(q,".",qa);var be;W?be=W.append(L,j):be=j.def(q,".",ys);var Ye=q+".program("+be+","+ve;return w.optional(function(){Ye+=","+L.command}),j.def(Ye+")")}),{frag:N,vert:W,progVar:R,program:D}}function Mr(E,m){var B=E.static,Z=E.dynamic,X={},G=!1;function N(){if(Nf in B){var at=B[Nf];return at!==null&&Be.getVAO(at)===null&&(at=Be.createVAO(at)),G=!0,X.vao=at,zr(function(le){var ht=Be.getVAO(at);return ht?le.link(ht):"null"})}else if(Nf in Z){G=!0;var Te=Z[Nf];return Tn(Te,function(le,ht){var lt=le.invoke(ht,Te);return ht.def(le.shared.vao+".getVAO("+lt+")")})}return null}var W=N(),D=!1;function R(){if(da in B){var at=B[da];if(X.elements=at,rf(at)){var Te=X.elements=re.create(at,!0);at=re.getElements(Te),D=!0}else at&&(at=re.getElements(at),D=!0,w.command(at,"invalid elements",m.commandStr));var le=zr(function(lt,Et){if(at){var dr=lt.link(at);return lt.ELEMENTS=dr,dr}return lt.ELEMENTS=null,null});return le.value=at,le}else if(da in Z){D=!0;var ht=Z[da];return Tn(ht,function(lt,Et){var dr=lt.shared,yn=dr.isBufferArgs,af=dr.elements,ji=lt.invoke(Et,ht),Ci=Et.def("null"),ba=Et.def(yn,"(",ji,")"),ff=lt.cond(ba).then(Ci,"=",af,".createStream(",ji,");").else(Ci,"=",af,".getElements(",ji,");");return w.optional(function(){lt.assert(ff.else,"!"+ji+"||"+Ci,"invalid elements")}),Et.entry(ff),Et.exit(lt.cond(ba).then(af,".destroyStream(",Ci,");")),lt.ELEMENTS=Ci,Ci})}else if(G)return new Hr(W.thisDep,W.contextDep,W.propDep,function(lt,Et){return Et.def(lt.shared.vao+".currentVAO?"+lt.shared.elements+".getElements("+lt.shared.vao+".currentVAO.elements):null")});return null}var L=R();function j(){if(va in B){var at=B[va];return X.primitive=at,w.commandParameter(at,Ui,"invalid primitve",m.commandStr),zr(function(le,ht){return Ui[at]})}else if(va in Z){var Te=Z[va];return Tn(Te,function(le,ht){var lt=le.constants.primTypes,Et=le.invoke(ht,Te);return w.optional(function(){le.assert(ht,Et+" in "+lt,"invalid primitive, must be one of "+Object.keys(Ui))}),ht.def(lt,"[",Et,"]")})}else{if(D)return ga(L)?L.value?zr(function(le,ht){return ht.def(le.ELEMENTS,".primType")}):zr(function(){return Do}):new Hr(L.thisDep,L.contextDep,L.propDep,function(le,ht){var lt=le.ELEMENTS;return ht.def(lt,"?",lt,".primType:",Do)});if(G)return new Hr(W.thisDep,W.contextDep,W.propDep,function(le,ht){return ht.def(le.shared.vao+".currentVAO?"+le.shared.vao+".currentVAO.primitive:"+Do)})}return null}function q(at,Te){if(at in B){var le=B[at]|0;return Te?X.offset=le:X.instances=le,w.command(!Te||le>=0,"invalid "+at,m.commandStr),zr(function(lt,Et){return Te&&(lt.OFFSET=le),le})}else if(at in Z){var ht=Z[at];return Tn(ht,function(lt,Et){var dr=lt.invoke(Et,ht);return Te&&(lt.OFFSET=dr,w.optional(function(){lt.assert(Et,dr+">=0","invalid "+at)})),dr})}else if(Te){if(D)return zr(function(lt,Et){return lt.OFFSET=0,0});if(G)return new Hr(W.thisDep,W.contextDep,W.propDep,function(lt,Et){return Et.def(lt.shared.vao+".currentVAO?"+lt.shared.vao+".currentVAO.offset:0")})}else if(G)return new Hr(W.thisDep,W.contextDep,W.propDep,function(lt,Et){return Et.def(lt.shared.vao+".currentVAO?"+lt.shared.vao+".currentVAO.instances:-1")});return null}var ve=q(Ka,!0);function be(){if(_a in B){var at=B[_a]|0;return X.count=at,w.command(typeof at=="number"&&at>=0,"invalid vertex count",m.commandStr),zr(function(){return at})}else if(_a in Z){var Te=Z[_a];return Tn(Te,function(Et,dr){var yn=Et.invoke(dr,Te);return w.optional(function(){Et.assert(dr,"typeof "+yn+'==="number"&&'+yn+">=0&&"+yn+"===("+yn+"|0)","invalid vertex count")}),yn})}else if(D)if(ga(L)){if(L)return ve?new Hr(ve.thisDep,ve.contextDep,ve.propDep,function(Et,dr){var yn=dr.def(Et.ELEMENTS,".vertCount-",Et.OFFSET);return w.optional(function(){Et.assert(dr,yn+">=0","invalid vertex offset/element buffer too small")}),yn}):zr(function(Et,dr){return dr.def(Et.ELEMENTS,".vertCount")});var le=zr(function(){return-1});return w.optional(function(){le.MISSING=!0}),le}else{var ht=new Hr(L.thisDep||ve.thisDep,L.contextDep||ve.contextDep,L.propDep||ve.propDep,function(Et,dr){var yn=Et.ELEMENTS;return Et.OFFSET?dr.def(yn,"?",yn,".vertCount-",Et.OFFSET,":-1"):dr.def(yn,"?",yn,".vertCount:-1")});return w.optional(function(){ht.DYNAMIC=!0}),ht}else if(G){var lt=new Hr(W.thisDep,W.contextDep,W.propDep,function(Et,dr){return dr.def(Et.shared.vao,".currentVAO?",Et.shared.vao,".currentVAO.count:-1")});return lt}return null}var Ye=j(),Dt=be(),yt=q(bo,!1);return{elements:L,primitive:Ye,count:Dt,instances:yt,offset:ve,vao:W,vaoActive:G,elementsActive:D,static:X}}function Lr(E,m){var B=E.static,Z=E.dynamic,X={};return pt.forEach(function(G){var N=ot(G);function W(D,R){if(G in B){var L=D(B[G]);X[N]=zr(function(){return L})}else if(G in Z){var j=Z[G];X[N]=Tn(j,function(q,ve){return R(q,ve,q.invoke(ve,j))})}}switch(G){case lc:case go:case pn:case kf:case _s:case vc:case cc:case Nl:case hc:case Mn:return W(function(D){return w.commandType(D,"boolean",G,m.commandStr),D},function(D,R,L){return w.optional(function(){D.assert(R,"typeof "+L+'==="boolean"',"invalid flag "+G,D.commandStr)}),L});case ha:return W(function(D){return w.commandParameter(D,tf,"invalid "+G,m.commandStr),tf[D]},function(D,R,L){var j=D.constants.compareFuncs;return w.optional(function(){D.assert(R,L+" in "+j,"invalid "+G+", must be one of "+Object.keys(tf))}),R.def(j,"[",L,"]")});case Il:return W(function(D){return w.command(Nr(D)&&D.length===2&&typeof D[0]=="number"&&typeof D[1]=="number"&&D[0]<=D[1],"depth range is 2d array",m.commandStr),D},function(D,R,L){w.optional(function(){D.assert(R,D.shared.isArrayLike+"("+L+")&&"+L+".length===2&&typeof "+L+'[0]==="number"&&typeof '+L+'[1]==="number"&&'+L+"[0]<="+L+"[1]","depth range must be a 2d array")});var j=R.def("+",L,"[0]"),q=R.def("+",L,"[1]");return[j,q]});case vs:return W(function(D){w.commandType(D,"object","blend.func",m.commandStr);var R="srcRGB"in D?D.srcRGB:D.src,L="srcAlpha"in D?D.srcAlpha:D.src,j="dstRGB"in D?D.dstRGB:D.dst,q="dstAlpha"in D?D.dstAlpha:D.dst;return w.commandParameter(R,Vn,N+".srcRGB",m.commandStr),w.commandParameter(L,Vn,N+".srcAlpha",m.commandStr),w.commandParameter(j,Vn,N+".dstRGB",m.commandStr),w.commandParameter(q,Vn,N+".dstAlpha",m.commandStr),w.command(xc.indexOf(R+", "+j)===-1,"unallowed blending combination (srcRGB, dstRGB) = ("+R+", "+j+")",m.commandStr),[Vn[R],Vn[j],Vn[L],Vn[q]]},function(D,R,L){var j=D.constants.blendFuncs;w.optional(function(){D.assert(R,L+"&&typeof "+L+'==="object"',"invalid blend func, must be an object")});function q(Te,le){var ht=R.def('"',Te,le,'" in ',L,"?",L,".",Te,le,":",L,".",Te);return w.optional(function(){D.assert(R,ht+" in "+j,"invalid "+G+"."+Te+le+", must be one of "+Object.keys(Vn))}),ht}var ve=q("src","RGB"),be=q("dst","RGB");w.optional(function(){var Te=D.constants.invalidBlendCombinations;D.assert(R,Te+".indexOf("+ve+'+", "+'+be+") === -1 ","unallowed blending combination for (srcRGB, dstRGB)")});var Ye=R.def(j,"[",ve,"]"),Dt=R.def(j,"[",q("src","Alpha"),"]"),yt=R.def(j,"[",be,"]"),at=R.def(j,"[",q("dst","Alpha"),"]");return[Ye,yt,Dt,at]});case ri:return W(function(D){if(typeof D=="string")return w.commandParameter(D,ne,"invalid "+G,m.commandStr),[ne[D],ne[D]];if(typeof D=="object")return w.commandParameter(D.rgb,ne,G+".rgb",m.commandStr),w.commandParameter(D.alpha,ne,G+".alpha",m.commandStr),[ne[D.rgb],ne[D.alpha]];w.commandRaise("invalid blend.equation",m.commandStr)},function(D,R,L){var j=D.constants.blendEquations,q=R.def(),ve=R.def(),be=D.cond("typeof ",L,'==="string"');return w.optional(function(){function Ye(Dt,yt,at){D.assert(Dt,at+" in "+j,"invalid "+yt+", must be one of "+Object.keys(ne))}Ye(be.then,G,L),D.assert(be.else,L+"&&typeof "+L+'==="object"',"invalid "+G),Ye(be.else,G+".rgb",L+".rgb"),Ye(be.else,G+".alpha",L+".alpha")}),be.then(q,"=",ve,"=",j,"[",L,"];"),be.else(q,"=",j,"[",L,".rgb];",ve,"=",j,"[",L,".alpha];"),R(be),[q,ve]});case kl:return W(function(D){return w.command(Nr(D)&&D.length===4,"blend.color must be a 4d array",m.commandStr),it(4,function(R){return+D[R]})},function(D,R,L){return w.optional(function(){D.assert(R,D.shared.isArrayLike+"("+L+")&&"+L+".length===4","blend.color must be a 4d array")}),it(4,function(j){return R.def("+",L,"[",j,"]")})});case dc:return W(function(D){return w.commandType(D,"number",N,m.commandStr),D|0},function(D,R,L){return w.optional(function(){D.assert(R,"typeof "+L+'==="number"',"invalid stencil.mask")}),R.def(L,"|0")});case Pl:return W(function(D){w.commandType(D,"object",N,m.commandStr);var R=D.cmp||"keep",L=D.ref||0,j="mask"in D?D.mask:-1;return w.commandParameter(R,tf,G+".cmp",m.commandStr),w.commandType(L,"number",G+".ref",m.commandStr),w.commandType(j,"number",G+".mask",m.commandStr),[tf[R],L,j]},function(D,R,L){var j=D.constants.compareFuncs;w.optional(function(){function Ye(){D.assert(R,Array.prototype.join.call(arguments,""),"invalid stencil.func")}Ye(L+"&&typeof ",L,'==="object"'),Ye('!("cmp" in ',L,")||(",L,".cmp in ",j,")")});var q=R.def('"cmp" in ',L,"?",j,"[",L,".cmp]",":",gi),ve=R.def(L,".ref|0"),be=R.def('"mask" in ',L,"?",L,".mask|0:-1");return[q,ve,be]});case gs:case If:return W(function(D){w.commandType(D,"object",N,m.commandStr);var R=D.fail||"keep",L=D.zfail||"keep",j=D.zpass||"keep";return w.commandParameter(R,qi,G+".fail",m.commandStr),w.commandParameter(L,qi,G+".zfail",m.commandStr),w.commandParameter(j,qi,G+".zpass",m.commandStr),[G===If?ma:Ds,qi[R],qi[L],qi[j]]},function(D,R,L){var j=D.constants.stencilOps;w.optional(function(){D.assert(R,L+"&&typeof "+L+'==="object"',"invalid "+G)});function q(ve){return w.optional(function(){D.assert(R,'!("'+ve+'" in '+L+")||("+L+"."+ve+" in "+j+")","invalid "+G+"."+ve+", must be one of "+Object.keys(qi))}),R.def('"',ve,'" in ',L,"?",j,"[",L,".",ve,"]:",gi)}return[G===If?ma:Ds,q("fail"),q("zfail"),q("zpass")]});case Xa:return W(function(D){w.commandType(D,"object",N,m.commandStr);var R=D.factor|0,L=D.units|0;return w.commandType(R,"number",N+".factor",m.commandStr),w.commandType(L,"number",N+".units",m.commandStr),[R,L]},function(D,R,L){w.optional(function(){D.assert(R,L+"&&typeof "+L+'==="object"',"invalid "+G)});var j=R.def(L,".factor|0"),q=R.def(L,".units|0");return[j,q]});case uc:return W(function(D){var R=0;return D==="front"?R=Ds:D==="back"&&(R=ma),w.command(!!R,N,m.commandStr),R},function(D,R,L){return w.optional(function(){D.assert(R,L+'==="front"||'+L+'==="back"',"invalid cull.face")}),R.def(L,'==="front"?',Ds,":",ma)});case ms:return W(function(D){return w.command(typeof D=="number"&&D>=ie.lineWidthDims[0]&&D<=ie.lineWidthDims[1],"invalid line width, must be a positive number between "+ie.lineWidthDims[0]+" and "+ie.lineWidthDims[1],m.commandStr),D},function(D,R,L){return w.optional(function(){D.assert(R,"typeof "+L+'==="number"&&'+L+">="+ie.lineWidthDims[0]+"&&"+L+"<="+ie.lineWidthDims[1],"invalid line width")}),L});case Fl:return W(function(D){return w.commandParameter(D,Lo,N,m.commandStr),Lo[D]},function(D,R,L){return w.optional(function(){D.assert(R,L+'==="cw"||'+L+'==="ccw"',"invalid frontFace, must be one of cw,ccw")}),R.def(L+'==="cw"?'+Vl+":"+kn)});case ps:return W(function(D){return w.command(Nr(D)&&D.length===4,"color.mask must be length 4 array",m.commandStr),D.map(function(R){return!!R})},function(D,R,L){return w.optional(function(){D.assert(R,D.shared.isArrayLike+"("+L+")&&"+L+".length===4","invalid color.mask")}),it(4,function(j){return"!!"+L+"["+j+"]"})});case Bl:return W(function(D){w.command(typeof D=="object"&&D,N,m.commandStr);var R="value"in D?D.value:1,L=!!D.invert;return w.command(typeof R=="number"&&R>=0&&R<=1,"sample.coverage.value must be a number between 0 and 1",m.commandStr),[R,L]},function(D,R,L){w.optional(function(){D.assert(R,L+"&&typeof "+L+'==="object"',"invalid sample.coverage")});var j=R.def('"value" in ',L,"?+",L,".value:1"),q=R.def("!!",L,".invert");return[j,q]})}}),X}function Xt(E,m){var B=E.static,Z=E.dynamic,X={};return Object.keys(B).forEach(function(G){var N=B[G],W;if(typeof N=="number"||typeof N=="boolean")W=zr(function(){return N});else if(typeof N=="function"){var D=N._reglType;D==="texture2d"||D==="textureCube"?W=zr(function(R){return R.link(N)}):D==="framebuffer"||D==="framebufferCube"?(w.command(N.color.length>0,'missing color attachment for framebuffer sent to uniform "'+G+'"',m.commandStr),W=zr(function(R){return R.link(N.color[0])})):w.commandRaise('invalid data for uniform "'+G+'"',m.commandStr)}else Nr(N)?W=zr(function(R){var L=R.global.def("[",it(N.length,function(j){return w.command(typeof N[j]=="number"||typeof N[j]=="boolean","invalid uniform "+G,R.commandStr),N[j]}),"]");return L}):w.commandRaise('invalid or missing data for uniform "'+G+'"',m.commandStr);W.value=N,X[G]=W}),Object.keys(Z).forEach(function(G){var N=Z[G];X[G]=Tn(N,function(W,D){return W.invoke(D,N)})}),X}function Dr(E,m){var B=E.static,Z=E.dynamic,X={};return Object.keys(B).forEach(function(G){var N=B[G],W=x.id(G),D=new V;if(rf(N))D.state=Va,D.buffer=pe.getBuffer(pe.create(N,Pf,!1,!0)),D.type=0;else{var R=pe.getBuffer(N);if(R)D.state=Va,D.buffer=R,D.type=0;else if(w.command(typeof N=="object"&&N,"invalid data for attribute "+G,m.commandStr),"constant"in N){var L=N.constant;D.buffer="null",D.state=po,typeof L=="number"?D.x=L:(w.command(Nr(L)&&L.length>0&&L.length<=4,"invalid constant for attribute "+G,m.commandStr),Sn.forEach(function(yt,at){at<L.length&&(D[yt]=L[at])}))}else{rf(N.buffer)?R=pe.getBuffer(pe.create(N.buffer,Pf,!1,!0)):R=pe.getBuffer(N.buffer),w.command(!!R,'missing buffer for attribute "'+G+'"',m.commandStr);var j=N.offset|0;w.command(j>=0,'invalid offset for attribute "'+G+'"',m.commandStr);var q=N.stride|0;w.command(q>=0&&q<256,'invalid stride for attribute "'+G+'", must be integer betweeen [0, 255]',m.commandStr);var ve=N.size|0;w.command(!("size"in N)||ve>0&&ve<=4,'invalid size for attribute "'+G+'", must be 1,2,3,4',m.commandStr);var be=!!N.normalized,Ye=0;"type"in N&&(w.commandParameter(N.type,Ma,"invalid type for attribute "+G,m.commandStr),Ye=Ma[N.type]);var Dt=N.divisor|0;w.optional(function(){"divisor"in N&&(w.command(Dt===0||Re,'cannot specify divisor for attribute "'+G+'", instancing not supported',m.commandStr),w.command(Dt>=0,'invalid divisor for attribute "'+G+'"',m.commandStr));var yt=m.commandStr,at=["buffer","offset","divisor","normalized","type","size","stride"];Object.keys(N).forEach(function(Te){w.command(at.indexOf(Te)>=0,'unknown parameter "'+Te+'" for attribute pointer "'+G+'" (valid parameters are '+at+")",yt)})}),D.buffer=R,D.state=Va,D.size=ve,D.normalized=be,D.type=Ye||R.dtype,D.offset=j,D.stride=q,D.divisor=Dt}}X[G]=zr(function(yt,at){var Te=yt.attribCache;if(W in Te)return Te[W];var le={isStream:!1};return Object.keys(D).forEach(function(ht){le[ht]=D[ht]}),D.buffer&&(le.buffer=yt.link(D.buffer),le.type=le.type||le.buffer+".dtype"),Te[W]=le,le})}),Object.keys(Z).forEach(function(G){var N=Z[G];function W(D,R){var L=D.invoke(R,N),j=D.shared,q=D.constants,ve=j.isBufferArgs,be=j.buffer;w.optional(function(){D.assert(R,L+"&&(typeof "+L+'==="object"||typeof '+L+'==="function")&&('+ve+"("+L+")||"+be+".getBuffer("+L+")||"+be+".getBuffer("+L+".buffer)||"+ve+"("+L+'.buffer)||("constant" in '+L+"&&(typeof "+L+'.constant==="number"||'+j.isArrayLike+"("+L+".constant))))",'invalid dynamic attribute "'+G+'"')});var Ye={isStream:R.def(!1)},Dt=new V;Dt.state=Va,Object.keys(Dt).forEach(function(le){Ye[le]=R.def(""+Dt[le])});var yt=Ye.buffer,at=Ye.type;R("if(",ve,"(",L,")){",Ye.isStream,"=true;",yt,"=",be,".createStream(",Pf,",",L,");",at,"=",yt,".dtype;","}else{",yt,"=",be,".getBuffer(",L,");","if(",yt,"){",at,"=",yt,".dtype;",'}else if("constant" in ',L,"){",Ye.state,"=",po,";","if(typeof "+L+'.constant === "number"){',Ye[Sn[0]],"=",L,".constant;",Sn.slice(1).map(function(le){return Ye[le]}).join("="),"=0;","}else{",Sn.map(function(le,ht){return Ye[le]+"="+L+".constant.length>"+ht+"?"+L+".constant["+ht+"]:0;"}).join(""),"}}else{","if(",ve,"(",L,".buffer)){",yt,"=",be,".createStream(",Pf,",",L,".buffer);","}else{",yt,"=",be,".getBuffer(",L,".buffer);","}",at,'="type" in ',L,"?",q.glTypes,"[",L,".type]:",yt,".dtype;",Ye.normalized,"=!!",L,".normalized;");function Te(le){R(Ye[le],"=",L,".",le,"|0;")}return Te("size"),Te("offset"),Te("stride"),Te("divisor"),R("}}"),R.exit("if(",Ye.isStream,"){",be,".destroyStream(",yt,");","}"),Ye}X[G]=Tn(N,W)}),X}function pr(E){var m=E.static,B=E.dynamic,Z={};return Object.keys(m).forEach(function(X){var G=m[X];Z[X]=zr(function(N,W){return typeof G=="number"||typeof G=="boolean"?""+G:N.link(G)})}),Object.keys(B).forEach(function(X){var G=B[X];Z[X]=Tn(G,function(N,W){return N.invoke(W,G)})}),Z}function qr(E,m,B,Z,X){var G=E.static,N=E.dynamic;w.optional(function(){var Te=[Xi,ys,qa,da,va,Ka,_a,bo,Ff,Nf].concat(pt);function le(ht){Object.keys(ht).forEach(function(lt){w.command(Te.indexOf(lt)>=0,'unknown parameter "'+lt+'"',X.commandStr)})}le(G),le(N)});var W=Rt(E,m),D=Je(E),R=wt(E,D,X),L=Mr(E,X),j=Lr(E,X),q=Vt(E,X,W);function ve(Te){var le=R[Te];le&&(j[Te]=le)}ve(Zi),ve(ot(yo));var be=Object.keys(j).length>0,Ye={framebuffer:D,draw:L,shader:q,state:j,dirty:be,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Ye.profile=Ke(E),Ye.uniforms=Xt(B,X),Ye.drawVAO=Ye.scopeVAO=L.vao,!Ye.drawVAO&&q.program&&!W&&C.angle_instanced_arrays&&L.static.elements){var Dt=!0,yt=q.program.attributes.map(function(Te){var le=m.static[Te];return Dt=Dt&&!!le,le});if(Dt&&yt.length>0){var at=Be.getVAO(Be.createVAO({attributes:yt,elements:L.static.elements}));Ye.drawVAO=new Hr(null,null,null,function(Te,le){return Te.link(at)}),Ye.useVAO=!0}}return W?Ye.useVAO=!0:Ye.attributes=Dr(m,X),Ye.context=pr(Z),Ye}function Kr(E,m,B){var Z=E.shared,X=Z.context,G=E.scope();Object.keys(B).forEach(function(N){m.save(X,"."+N);var W=B[N],D=W.append(E,m);Array.isArray(D)?G(X,".",N,"=[",D.join(),"];"):G(X,".",N,"=",D,";")}),m(G)}function en(E,m,B,Z){var X=E.shared,G=X.gl,N=X.framebuffer,W;rt&&(W=m.def(X.extensions,".webgl_draw_buffers"));var D=E.constants,R=D.drawBuffer,L=D.backBuffer,j;B?j=B.append(E,m):j=m.def(N,".next"),Z||m("if(",j,"!==",N,".cur){"),m("if(",j,"){",G,".bindFramebuffer(",Xl,",",j,".framebuffer);"),rt&&m(W,".drawBuffersWEBGL(",R,"[",j,".colorAttachments.length]);"),m("}else{",G,".bindFramebuffer(",Xl,",null);"),rt&&m(W,".drawBuffersWEBGL(",L,");"),m("}",N,".cur=",j,";"),Z||m("}")}function ln(E,m,B){var Z=E.shared,X=Z.gl,G=E.current,N=E.next,W=Z.current,D=Z.next,R=E.cond(W,".dirty");pt.forEach(function(L){var j=ot(L);if(!(j in B.state)){var q,ve;if(j in N){q=N[j],ve=G[j];var be=it(Qe[j].length,function(Dt){return R.def(q,"[",Dt,"]")});R(E.cond(be.map(function(Dt,yt){return Dt+"!=="+ve+"["+yt+"]"}).join("||")).then(X,".",me[j],"(",be,");",be.map(function(Dt,yt){return ve+"["+yt+"]="+Dt}).join(";"),";"))}else{q=R.def(D,".",j);var Ye=E.cond(q,"!==",W,".",j);R(Ye),j in ye?Ye(E.cond(q).then(X,".enable(",ye[j],");").else(X,".disable(",ye[j],");"),W,".",j,"=",q,";"):Ye(X,".",me[j],"(",q,");",W,".",j,"=",q,";")}}}),Object.keys(B.state).length===0&&R(W,".dirty=false;"),m(R)}function mn(E,m,B,Z){var X=E.shared,G=E.current,N=X.current,W=X.gl;Oo(Object.keys(B)).forEach(function(D){var R=B[D];if(!(Z&&!Z(R))){var L=R.append(E,m);if(ye[D]){var j=ye[D];ga(R)?L?m(W,".enable(",j,");"):m(W,".disable(",j,");"):m(E.cond(L).then(W,".enable(",j,");").else(W,".disable(",j,");")),m(N,".",D,"=",L,";")}else if(Nr(L)){var q=G[D];m(W,".",me[D],"(",L,");",L.map(function(ve,be){return q+"["+be+"]="+ve}).join(";"),";")}else m(W,".",me[D],"(",L,");",N,".",D,"=",L,";")}})}function Wr(E,m){Re&&(E.instancing=m.def(E.shared.extensions,".angle_instanced_arrays"))}function Ut(E,m,B,Z,X){var G=E.shared,N=E.stats,W=G.current,D=G.timer,R=B.profile;function L(){return typeof performance>"u"?"Date.now()":"performance.now()"}var j,q;function ve(Te){j=m.def(),Te(j,"=",L(),";"),typeof X=="string"?Te(N,".count+=",X,";"):Te(N,".count++;"),Oe&&(Z?(q=m.def(),Te(q,"=",D,".getNumPendingQueries();")):Te(D,".beginQuery(",N,");"))}function be(Te){Te(N,".cpuTime+=",L(),"-",j,";"),Oe&&(Z?Te(D,".pushScopeStats(",q,",",D,".getNumPendingQueries(),",N,");"):Te(D,".endQuery();"))}function Ye(Te){var le=m.def(W,".profile");m(W,".profile=",Te,";"),m.exit(W,".profile=",le,";")}var Dt;if(R){if(ga(R)){R.enable?(ve(m),be(m.exit),Ye("true")):Ye("false");return}Dt=R.append(E,m),Ye(Dt)}else Dt=m.def(W,".profile");var yt=E.block();ve(yt),m("if(",Dt,"){",yt,"}");var at=E.block();be(at),m.exit("if(",Dt,"){",at,"}")}function gn(E,m,B,Z,X){var G=E.shared;function N(D){switch(D){case Qa:case Uf:case mi:return 2;case xs:case Yf:case ws:return 3;case Gf:case pi:case Ss:return 4;default:return 1}}function W(D,R,L){var j=G.gl,q=m.def(D,".location"),ve=m.def(G.attributes,"[",q,"]"),be=L.state,Ye=L.buffer,Dt=[L.x,L.y,L.z,L.w],yt=["buffer","normalized","offset","stride"];function at(){m("if(!",ve,".buffer){",j,".enableVertexAttribArray(",q,");}");var le=L.type,ht;if(L.size?ht=m.def(L.size,"||",R):ht=R,m("if(",ve,".type!==",le,"||",ve,".size!==",ht,"||",yt.map(function(Et){return ve+"."+Et+"!=="+L[Et]}).join("||"),"){",j,".bindBuffer(",Pf,",",Ye,".buffer);",j,".vertexAttribPointer(",[q,ht,le,L.normalized,L.stride,L.offset],");",ve,".type=",le,";",ve,".size=",ht,";",yt.map(function(Et){return ve+"."+Et+"="+L[Et]+";"}).join(""),"}"),Re){var lt=L.divisor;m("if(",ve,".divisor!==",lt,"){",E.instancing,".vertexAttribDivisorANGLE(",[q,lt],");",ve,".divisor=",lt,";}")}}function Te(){m("if(",ve,".buffer){",j,".disableVertexAttribArray(",q,");",ve,".buffer=null;","}if(",Sn.map(function(le,ht){return ve+"."+le+"!=="+Dt[ht]}).join("||"),"){",j,".vertexAttrib4f(",q,",",Dt,");",Sn.map(function(le,ht){return ve+"."+le+"="+Dt[ht]+";"}).join(""),"}")}be===Va?at():be===po?Te():(m("if(",be,"===",Va,"){"),at(),m("}else{"),Te(),m("}"))}Z.forEach(function(D){var R=D.name,L=B.attributes[R],j;if(L){if(!X(L))return;j=L.append(E,m)}else{if(!X(ql))return;var q=E.scopeAttrib(R);w.optional(function(){E.assert(m,q+".state","missing attribute "+R)}),j={},Object.keys(new V).forEach(function(ve){j[ve]=m.def(q,".",ve)})}W(E.link(D),N(D.info.type),j)})}function cr(E,m,B,Z,X,G){for(var N=E.shared,W=N.gl,D={},R,L=0;L<Z.length;++L){var j=Z[L],q=j.name,ve=j.info.type,be=j.info.size,Ye=B.uniforms[q];if(be>1){if(!Ye)continue;var Dt=q.replace("[0]","");if(D[Dt])continue;D[Dt]=1}var yt=E.link(j),at=yt+".location",Te;if(Ye){if(!X(Ye))continue;if(ga(Ye)){var le=Ye.value;if(w.command(le!==null&&typeof le<"u",'missing uniform "'+q+'"',E.commandStr),ve===As||ve===Hf){w.command(typeof le=="function"&&(ve===As&&(le._reglType==="texture2d"||le._reglType==="framebuffer")||ve===Hf&&(le._reglType==="textureCube"||le._reglType==="framebufferCube")),"invalid texture for uniform "+q,E.commandStr);var ht=E.link(le._texture||le.color[0]._texture);m(W,".uniform1i(",at,",",ht+".bind());"),m.exit(ht,".unbind();")}else if(ve===Ja||ve===Ts||ve===Es){w.optional(function(){w.command(Nr(le),"invalid matrix for uniform "+q,E.commandStr),w.command(ve===Ja&&le.length===4||ve===Ts&&le.length===9||ve===Es&&le.length===16,"invalid length for matrix uniform "+q,E.commandStr)});var lt=E.global.def("new Float32Array(["+Array.prototype.slice.call(le)+"])"),Et=2;ve===Ts?Et=3:ve===Es&&(Et=4),m(W,".uniformMatrix",Et,"fv(",at,",false,",lt,");")}else{switch(ve){case Eo:be===1?w.commandType(le,"number","uniform "+q,E.commandStr):w.command(Nr(le)&&le.length===be,"uniform "+q,E.commandStr),R="1f";break;case Qa:w.command(Nr(le)&&le.length&&le.length%2===0&&le.length<=be*2,"uniform "+q,E.commandStr),R="2f";break;case xs:w.command(Nr(le)&&le.length&&le.length%3===0&&le.length<=be*3,"uniform "+q,E.commandStr),R="3f";break;case Gf:w.command(Nr(le)&&le.length&&le.length%4===0&&le.length<=be*4,"uniform "+q,E.commandStr),R="4f";break;case Wl:be===1?w.commandType(le,"boolean","uniform "+q,E.commandStr):w.command(Nr(le)&&le.length===be,"uniform "+q,E.commandStr),R="1i";break;case Ao:be===1?w.commandType(le,"number","uniform "+q,E.commandStr):w.command(Nr(le)&&le.length===be,"uniform "+q,E.commandStr),R="1i";break;case mi:w.command(Nr(le)&&le.length&&le.length%2===0&&le.length<=be*2,"uniform "+q,E.commandStr),R="2i";break;case Uf:w.command(Nr(le)&&le.length&&le.length%2===0&&le.length<=be*2,"uniform "+q,E.commandStr),R="2i";break;case ws:w.command(Nr(le)&&le.length&&le.length%3===0&&le.length<=be*3,"uniform "+q,E.commandStr),R="3i";break;case Yf:w.command(Nr(le)&&le.length&&le.length%3===0&&le.length<=be*3,"uniform "+q,E.commandStr),R="3i";break;case Ss:w.command(Nr(le)&&le.length&&le.length%4===0&&le.length<=be*4,"uniform "+q,E.commandStr),R="4i";break;case pi:w.command(Nr(le)&&le.length&&le.length%4===0&&le.length<=be*4,"uniform "+q,E.commandStr),R="4i";break}be>1?(R+="v",le=E.global.def("["+Array.prototype.slice.call(le)+"]")):le=Nr(le)?Array.prototype.slice.call(le):le,m(W,".uniform",R,"(",at,",",le,");")}continue}else Te=Ye.append(E,m)}else{if(!X(ql))continue;Te=m.def(N.uniforms,"[",x.id(q),"]")}ve===As?(w(!Array.isArray(Te),"must specify a scalar prop for textures"),m("if(",Te,"&&",Te,'._reglType==="framebuffer"){',Te,"=",Te,".color[0];","}")):ve===Hf&&(w(!Array.isArray(Te),"must specify a scalar prop for cube maps"),m("if(",Te,"&&",Te,'._reglType==="framebufferCube"){',Te,"=",Te,".color[0];","}")),w.optional(function(){function qn(In,Os){E.assert(m,In,'bad data or missing for uniform "'+q+'". '+Os)}function sf(In,Os){Os===1&&w(!Array.isArray(Te),"must not specify an array type for uniform"),qn("Array.isArray("+Te+") && typeof "+Te+'[0]===" '+In+'" || typeof '+Te+'==="'+In+'"',"invalid type, expected "+In)}function ii(In,Os,ko){Array.isArray(Te)?w(Te.length&&Te.length%In===0&&Te.length<=In*ko,"must have length of "+(ko===1?"":"n * ")+In):qn(N.isArrayLike+"("+Te+")&&"+Te+".length && "+Te+".length % "+In+" === 0 && "+Te+".length<="+In*ko,"invalid vector, should have length of "+(ko===1?"":"n * ")+In,E.commandStr)}function Ac(In){w(!Array.isArray(Te),"must not specify a value type"),qn("typeof "+Te+'==="function"&&'+Te+'._reglType==="texture'+(In===gc?"2d":"Cube")+'"',"invalid texture type",E.commandStr)}switch(ve){case Ao:sf("number",be);break;case Uf:ii(2,"number",be);break;case Yf:ii(3,"number",be);break;case pi:ii(4,"number",be);break;case Eo:sf("number",be);break;case Qa:ii(2,"number",be);break;case xs:ii(3,"number",be);break;case Gf:ii(4,"number",be);break;case Wl:sf("boolean",be);break;case mi:ii(2,"boolean",be);break;case ws:ii(3,"boolean",be);break;case Ss:ii(4,"boolean",be);break;case Ja:ii(4,"number",be);break;case Ts:ii(9,"number",be);break;case Es:ii(16,"number",be);break;case As:Ac(gc);break;case Hf:Ac(Pd);break}});var dr=1;switch(ve){case As:case Hf:var yn=m.def(Te,"._texture");m(W,".uniform1i(",at,",",yn,".bind());"),m.exit(yn,".unbind();");continue;case Ao:case Wl:R="1i";break;case Uf:case mi:R="2i",dr=2;break;case Yf:case ws:R="3i",dr=3;break;case pi:case Ss:R="4i",dr=4;break;case Eo:R="1f";break;case Qa:R="2f",dr=2;break;case xs:R="3f",dr=3;break;case Gf:R="4f",dr=4;break;case Ja:R="Matrix2fv";break;case Ts:R="Matrix3fv";break;case Es:R="Matrix4fv";break}if(R.indexOf("Matrix")===-1&&be>1&&(R+="v",dr=1),R.charAt(0)==="M"){m(W,".uniform",R,"(",at,",");var af=Math.pow(ve-Ja+2,2),ji=E.global.def("new Float32Array(",af,")");Array.isArray(Te)?m("false,(",it(af,function(qn){return ji+"["+qn+"]="+Te[qn]}),",",ji,")"):m("false,(Array.isArray(",Te,")||",Te," instanceof Float32Array)?",Te,":(",it(af,function(qn){return ji+"["+qn+"]="+Te+"["+qn+"]"}),",",ji,")"),m(");")}else if(dr>1){for(var Ci=[],ba=[],ff=0;ff<dr;++ff)Array.isArray(Te)?ba.push(Te[ff]):ba.push(m.def(Te+"["+ff+"]")),G&&Ci.push(m.def());G&&m("if(!",E.batchId,"||",Ci.map(function(qn,sf){return qn+"!=="+ba[sf]}).join("||"),"){",Ci.map(function(qn,sf){return qn+"="+ba[sf]+";"}).join("")),m(W,".uniform",R,"(",at,",",ba.join(","),");"),G&&m("}")}else{if(w(!Array.isArray(Te),"uniform value must not be an array"),G){var Ec=m.def();m("if(!",E.batchId,"||",Ec,"!==",Te,"){",Ec,"=",Te,";")}m(W,".uniform",R,"(",at,",",Te,");"),G&&m("}")}}}function Tt(E,m,B,Z){var X=E.shared,G=X.gl,N=X.draw,W=Z.draw;function D(){var ht=W.elements,lt,Et=m;return ht?((ht.contextDep&&Z.contextDynamic||ht.propDep)&&(Et=B),lt=ht.append(E,Et),W.elementsActive&&Et("if("+lt+")"+G+".bindBuffer("+Yl+","+lt+".buffer.buffer);")):(lt=Et.def(),Et(lt,"=",N,".",da,";","if(",lt,"){",G,".bindBuffer(",Yl,",",lt,".buffer.buffer);}","else if(",X.vao,".currentVAO){",lt,"=",E.shared.elements+".getElements("+X.vao,".currentVAO.elements);",Se?"":"if("+lt+")"+G+".bindBuffer("+Yl+","+lt+".buffer.buffer);","}")),lt}function R(){var ht=W.count,lt,Et=m;return ht?((ht.contextDep&&Z.contextDynamic||ht.propDep)&&(Et=B),lt=ht.append(E,Et),w.optional(function(){ht.MISSING&&E.assert(m,"false","missing vertex count"),ht.DYNAMIC&&E.assert(Et,lt+">=0","missing vertex count")})):(lt=Et.def(N,".",_a),w.optional(function(){E.assert(Et,lt+">=0","missing vertex count")})),lt}var L=D();function j(ht){var lt=W[ht];return lt?lt.contextDep&&Z.contextDynamic||lt.propDep?lt.append(E,B):lt.append(E,m):m.def(N,".",ht)}var q=j(va),ve=j(Ka),be=R();if(typeof be=="number"){if(be===0)return}else B("if(",be,"){"),B.exit("}");var Ye,Dt;Re&&(Ye=j(bo),Dt=E.instancing);var yt=L+".type",at=W.elements&&ga(W.elements)&&!W.vaoActive;function Te(){function ht(){B(Dt,".drawElementsInstancedANGLE(",[q,be,yt,ve+"<<(("+yt+"-"+sc+")>>1)",Ye],");")}function lt(){B(Dt,".drawArraysInstancedANGLE(",[q,ve,be,Ye],");")}L&&L!=="null"?at?ht():(B("if(",L,"){"),ht(),B("}else{"),lt(),B("}")):lt()}function le(){function ht(){B(G+".drawElements("+[q,be,yt,ve+"<<(("+yt+"-"+sc+")>>1)"]+");")}function lt(){B(G+".drawArrays("+[q,ve,be]+");")}L&&L!=="null"?at?ht():(B("if(",L,"){"),ht(),B("}else{"),lt(),B("}")):lt()}Re&&(typeof Ye!="number"||Ye>=0)?typeof Ye=="string"?(B("if(",Ye,">0){"),Te(),B("}else if(",Ye,"<0){"),le(),B("}")):Te():le()}function qt(E,m,B,Z,X){var G=Lt(),N=G.proc("body",X);return w.optional(function(){G.commandStr=m.commandStr,G.command=G.link(m.commandStr)}),Re&&(G.instancing=N.def(G.shared.extensions,".angle_instanced_arrays")),E(G,N,B,Z),G.compile().body}function er(E,m,B,Z){Wr(E,m),B.useVAO?B.drawVAO?m(E.shared.vao,".setVAO(",B.drawVAO.append(E,m),");"):m(E.shared.vao,".setVAO(",E.shared.vao,".targetVAO);"):(m(E.shared.vao,".setVAO(null);"),gn(E,m,B,Z.attributes,function(){return!0})),cr(E,m,B,Z.uniforms,function(){return!0},!1),Tt(E,m,m,B)}function Vr(E,m){var B=E.proc("draw",1);Wr(E,B),Kr(E,B,m.context),en(E,B,m.framebuffer),ln(E,B,m),mn(E,B,m.state),Ut(E,B,m,!1,!0);var Z=m.shader.progVar.append(E,B);if(B(E.shared.gl,".useProgram(",Z,".program);"),m.shader.program)er(E,B,m,m.shader.program);else{B(E.shared.vao,".setVAO(null);");var X=E.global.def("{}"),G=B.def(Z,".id"),N=B.def(X,"[",G,"]");B(E.cond(N).then(N,".call(this,a0);").else(N,"=",X,"[",G,"]=",E.link(function(W){return qt(er,E,m,W,1)}),"(",Z,");",N,".call(this,a0);"))}Object.keys(m.state).length>0&&B(E.shared.current,".dirty=true;"),E.shared.vao&&B(E.shared.vao,".setVAO(null);")}function yi(E,m,B,Z){E.batchId="a1",Wr(E,m);function X(){return!0}gn(E,m,B,Z.attributes,X),cr(E,m,B,Z.uniforms,X,!1),Tt(E,m,m,B)}function ya(E,m,B,Z){Wr(E,m);var X=B.contextDep,G=m.def(),N="a0",W="a1",D=m.def();E.shared.props=D,E.batchId=G;var R=E.scope(),L=E.scope();m(R.entry,"for(",G,"=0;",G,"<",W,";++",G,"){",D,"=",N,"[",G,"];",L,"}",R.exit);function j(yt){return yt.contextDep&&X||yt.propDep}function q(yt){return!j(yt)}if(B.needsContext&&Kr(E,L,B.context),B.needsFramebuffer&&en(E,L,B.framebuffer),mn(E,L,B.state,j),B.profile&&j(B.profile)&&Ut(E,L,B,!1,!0),Z)B.useVAO?B.drawVAO?j(B.drawVAO)?L(E.shared.vao,".setVAO(",B.drawVAO.append(E,L),");"):R(E.shared.vao,".setVAO(",B.drawVAO.append(E,R),");"):R(E.shared.vao,".setVAO(",E.shared.vao,".targetVAO);"):(R(E.shared.vao,".setVAO(null);"),gn(E,R,B,Z.attributes,q),gn(E,L,B,Z.attributes,j)),cr(E,R,B,Z.uniforms,q,!1),cr(E,L,B,Z.uniforms,j,!0),Tt(E,R,L,B);else{var ve=E.global.def("{}"),be=B.shader.progVar.append(E,L),Ye=L.def(be,".id"),Dt=L.def(ve,"[",Ye,"]");L(E.shared.gl,".useProgram(",be,".program);","if(!",Dt,"){",Dt,"=",ve,"[",Ye,"]=",E.link(function(yt){return qt(yi,E,B,yt,2)}),"(",be,");}",Dt,".call(this,a0[",G,"],",G,");")}}function O(E,m){var B=E.proc("batch",2);E.batchId="0",Wr(E,B);var Z=!1,X=!0;Object.keys(m.context).forEach(function(ve){Z=Z||m.context[ve].propDep}),Z||(Kr(E,B,m.context),X=!1);var G=m.framebuffer,N=!1;G?(G.propDep?Z=N=!0:G.contextDep&&Z&&(N=!0),N||en(E,B,G)):en(E,B,null),m.state.viewport&&m.state.viewport.propDep&&(Z=!0);function W(ve){return ve.contextDep&&Z||ve.propDep}ln(E,B,m),mn(E,B,m.state,function(ve){return!W(ve)}),(!m.profile||!W(m.profile))&&Ut(E,B,m,!1,"a1"),m.contextDep=Z,m.needsContext=X,m.needsFramebuffer=N;var D=m.shader.progVar;if(D.contextDep&&Z||D.propDep)ya(E,B,m,null);else{var R=D.append(E,B);if(B(E.shared.gl,".useProgram(",R,".program);"),m.shader.program)ya(E,B,m,m.shader.program);else{B(E.shared.vao,".setVAO(null);");var L=E.global.def("{}"),j=B.def(R,".id"),q=B.def(L,"[",j,"]");B(E.cond(q).then(q,".call(this,a0,a1);").else(q,"=",L,"[",j,"]=",E.link(function(ve){return qt(ya,E,m,ve,2)}),"(",R,");",q,".call(this,a0,a1);"))}}Object.keys(m.state).length>0&&B(E.shared.current,".dirty=true;"),E.shared.vao&&B(E.shared.vao,".setVAO(null);")}function fe(E,m){var B=E.proc("scope",3);E.batchId="a2";var Z=E.shared,X=Z.current;Kr(E,B,m.context),m.framebuffer&&m.framebuffer.append(E,B),Oo(Object.keys(m.state)).forEach(function(N){var W=m.state[N],D=W.append(E,B);Nr(D)?D.forEach(function(R,L){B.set(E.next[N],"["+L+"]",R)}):B.set(Z.next,"."+N,D)}),Ut(E,B,m,!0,!0),[da,Ka,_a,bo,va].forEach(function(N){var W=m.draw[N];!W||B.set(Z.draw,"."+N,""+W.append(E,B))}),Object.keys(m.uniforms).forEach(function(N){var W=m.uniforms[N].append(E,B);Array.isArray(W)&&(W="["+W.join()+"]"),B.set(Z.uniforms,"["+x.id(N)+"]",W)}),Object.keys(m.attributes).forEach(function(N){var W=m.attributes[N].append(E,B),D=E.scopeAttrib(N);Object.keys(new V).forEach(function(R){B.set(D,"."+R,W[R])})}),m.scopeVAO&&B.set(Z.vao,".targetVAO",m.scopeVAO.append(E,B));function G(N){var W=m.shader[N];W&&B.set(Z.shader,"."+N,W.append(E,B))}G(ys),G(qa),Object.keys(m.state).length>0&&(B(X,".dirty=true;"),B.exit(X,".dirty=true;")),B("a1(",E.shared.context,",a0,",E.batchId,");")}function Q(E){if(!(typeof E!="object"||Nr(E))){for(var m=Object.keys(E),B=0;B<m.length;++B)if(z.isDynamic(E[m[B]]))return!0;return!1}}function st(E,m,B){var Z=m.static[B];if(!Z||!Q(Z))return;var X=E.global,G=Object.keys(Z),N=!1,W=!1,D=!1,R=E.global.def("{}");G.forEach(function(j){var q=Z[j];if(z.isDynamic(q)){typeof q=="function"&&(q=Z[j]=z.unbox(q));var ve=Tn(q,null);N=N||ve.thisDep,D=D||ve.propDep,W=W||ve.contextDep}else{switch(X(R,".",j,"="),typeof q){case"number":X(q);break;case"string":X('"',q,'"');break;case"object":Array.isArray(q)&&X("[",q.join(),"]");break;default:X(E.link(q));break}X(";")}});function L(j,q){G.forEach(function(ve){var be=Z[ve];if(!!z.isDynamic(be)){var Ye=j.invoke(q,be);q(R,".",ve,"=",Ye,";")}})}m.dynamic[B]=new z.DynamicVariable(Za,{thisDep:N,contextDep:W,propDep:D,ref:R,append:L}),delete m.static[B]}function zt(E,m,B,Z,X){var G=Lt();G.stats=G.link(X),Object.keys(m.static).forEach(function(W){st(G,m,W)}),rr.forEach(function(W){st(G,E,W)});var N=qr(E,m,B,Z,G);return Vr(G,N),fe(G,N),O(G,N),f(G.compile(),{destroy:function(){N.shader.program.destroy()}})}return{next:je,current:Qe,procs:function(){var E=Lt(),m=E.proc("poll"),B=E.proc("refresh"),Z=E.block();m(Z),B(Z);var X=E.shared,G=X.gl,N=X.next,W=X.current;Z(W,".dirty=false;"),en(E,m),en(E,B,null,!0);var D;Re&&(D=E.link(Re)),C.oes_vertex_array_object&&B(E.link(C.oes_vertex_array_object),".bindVertexArrayOES(null);");for(var R=0;R<ie.maxAttributes;++R){var L=B.def(X.attributes,"[",R,"]"),j=E.cond(L,".buffer");j.then(G,".enableVertexAttribArray(",R,");",G,".bindBuffer(",Pf,",",L,".buffer.buffer);",G,".vertexAttribPointer(",R,",",L,".size,",L,".type,",L,".normalized,",L,".stride,",L,".offset);").else(G,".disableVertexAttribArray(",R,");",G,".vertexAttrib4f(",R,",",L,".x,",L,".y,",L,".z,",L,".w);",L,".buffer=null;"),B(j),Re&&B(D,".vertexAttribDivisorANGLE(",R,",",L,".divisor);")}return B(E.shared.vao,".currentVAO=null;",E.shared.vao,".setVAO(",E.shared.vao,".targetVAO);"),Object.keys(ye).forEach(function(q){var ve=ye[q],be=Z.def(N,".",q),Ye=E.block();Ye("if(",be,"){",G,".enable(",ve,")}else{",G,".disable(",ve,")}",W,".",q,"=",be,";"),B(Ye),m("if(",be,"!==",W,".",q,"){",Ye,"}")}),Object.keys(me).forEach(function(q){var ve=me[q],be=Qe[q],Ye,Dt,yt=E.block();if(yt(G,".",ve,"("),Nr(be)){var at=be.length;Ye=E.global.def(N,".",q),Dt=E.global.def(W,".",q),yt(it(at,function(Te){return Ye+"["+Te+"]"}),");",it(at,function(Te){return Dt+"["+Te+"]="+Ye+"["+Te+"];"}).join("")),m("if(",it(at,function(Te){return Ye+"["+Te+"]!=="+Dt+"["+Te+"]"}).join("||"),"){",yt,"}")}else Ye=Z.def(N,".",q),Dt=Z.def(W,".",q),yt(Ye,");",W,".",q,"=",Ye,";"),m("if(",Ye,"!==",Dt,"){",yt,"}");B(yt)}),E.compile()}(),compile:zt}}function zd(){return{vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0}}var wc=34918,Ki=34919,jl=35007,Sc=function(c,x){if(!x.ext_disjoint_timer_query)return null;var C=[];function ie(){return C.pop()||x.ext_disjoint_timer_query.createQueryEXT()}function pe(Re){C.push(Re)}var re=[];function ae(Re){var rt=ie();x.ext_disjoint_timer_query.beginQueryEXT(jl,rt),re.push(rt),Oe(re.length-1,re.length,Re)}function De(){x.ext_disjoint_timer_query.endQueryEXT(jl)}function Ae(){this.startQueryIndex=-1,this.endQueryIndex=-1,this.sum=0,this.stats=null}var Be=[];function Ge(){return Be.pop()||new Ae}function Pe(Re){Be.push(Re)}var We=[];function Oe(Re,rt,Se){var Qe=Ge();Qe.startQueryIndex=Re,Qe.endQueryIndex=rt,Qe.sum=0,Qe.stats=Se,We.push(Qe)}var Fe=[],V=[];function ne(){var Re,rt,Se=re.length;if(Se!==0){V.length=Math.max(V.length,Se+1),Fe.length=Math.max(Fe.length,Se+1),Fe[0]=0,V[0]=0;var Qe=0;for(Re=0,rt=0;rt<re.length;++rt){var je=re[rt];x.ext_disjoint_timer_query.getQueryObjectEXT(je,Ki)?(Qe+=x.ext_disjoint_timer_query.getQueryObjectEXT(je,wc),pe(je)):re[Re++]=je,Fe[rt+1]=Qe,V[rt+1]=Re}for(re.length=Re,Re=0,rt=0;rt<We.length;++rt){var pt=We[rt],ye=pt.startQueryIndex,me=pt.endQueryIndex;pt.sum+=Fe[me]-Fe[ye];var ot=V[ye],Ve=V[me];Ve===ot?(pt.stats.gpuTime+=pt.sum/1e6,Pe(pt)):(pt.startQueryIndex=ot,pt.endQueryIndex=Ve,We[Re++]=pt)}We.length=Re}}return{beginQuery:ae,endQuery:De,pushScopeStats:Oe,update:ne,getNumPendingQueries:function(){return re.length},clear:function(){C.push.apply(C,re);for(var Re=0;Re<C.length;Re++)x.ext_disjoint_timer_query.deleteQueryEXT(C[Re]);re.length=0,C.length=0},restore:function(){re.length=0,C.length=0}}},Wd=16384,Tc=256,Vd=1024,$d=34962,Ri="webglcontextlost",Ro="webglcontextrestored",Co=1,Ql=2,Mo=3;function nf(c,x){for(var C=0;C<c.length;++C)if(c[C]===x)return C;return-1}function Pt(c){var x=oe(c);if(!x)return null;var C=x.gl,ie=C.getContextAttributes(),pe=C.isContextLost(),re=At(C,x);if(!re)return null;var ae=He(),De=zd(),Ae=re.extensions,Be=Sc(C,Ae),Ge=p(),Pe=C.drawingBufferWidth,We=C.drawingBufferHeight,Oe={tick:0,time:0,viewportWidth:Pe,viewportHeight:We,framebufferWidth:Pe,framebufferHeight:We,drawingBufferWidth:Pe,drawingBufferHeight:We,pixelRatio:x.pixelRatio},Fe={},V={elements:null,primitive:4,count:-1,offset:0,instances:-1},ne=Jo(C,Ae),Re=xn(C,De,x,Qe),rt=Pr(C,Ae,Re,De),Se=kd(C,Ae,ne,De,Re,rt,V);function Qe(Tt){return Se.destroyBuffer(Tt)}var je=Rl(C,ae,De,x),pt=Rn(C,Ae,ne,function(){ot.procs.poll()},Oe,De,x),ye=md(C,Ae,ne,De,x),me=Md(C,Ae,ne,pt,ye,De),ot=Kl(C,ae,Ae,ne,Re,rt,pt,me,Fe,Se,je,V,Oe,Be,x),Ve=Bd(C,me,ot.procs.poll,Oe,ie,Ae,ne),ke=ot.next,$e=C.canvas,qe=[],Mt=[],Lt=[],Ke=[x.onDestroy],Je=null;function wt(){if(qe.length===0){Be&&Be.update(),Je=null;return}Je=xe.next(wt),mn();for(var Tt=qe.length-1;Tt>=0;--Tt){var qt=qe[Tt];qt&&qt(Oe,null,0)}C.flush(),Be&&Be.update()}function Rt(){!Je&&qe.length>0&&(Je=xe.next(wt))}function Vt(){Je&&(xe.cancel(wt),Je=null)}function Mr(Tt){Tt.preventDefault(),pe=!0,Vt(),Mt.forEach(function(qt){qt()})}function Lr(Tt){C.getError(),pe=!1,re.restore(),je.restore(),Re.restore(),pt.restore(),ye.restore(),me.restore(),Se.restore(),Be&&Be.restore(),ot.procs.refresh(),Rt(),Lt.forEach(function(qt){qt()})}$e&&($e.addEventListener(Ri,Mr,!1),$e.addEventListener(Ro,Lr,!1));function Xt(){qe.length=0,Vt(),$e&&($e.removeEventListener(Ri,Mr),$e.removeEventListener(Ro,Lr)),je.clear(),me.clear(),ye.clear(),Se.clear(),pt.clear(),rt.clear(),Re.clear(),Be&&Be.clear(),Ke.forEach(function(Tt){Tt()})}function Dr(Tt){w(!!Tt,"invalid args to regl({...})"),w.type(Tt,"object","invalid args to regl({...})");function qt(X){var G=f({},X);delete G.uniforms,delete G.attributes,delete G.context,delete G.vao,"stencil"in G&&G.stencil.op&&(G.stencil.opBack=G.stencil.opFront=G.stencil.op,delete G.stencil.op);function N(W){if(W in G){var D=G[W];delete G[W],Object.keys(D).forEach(function(R){G[W+"."+R]=D[R]})}}return N("blend"),N("depth"),N("cull"),N("stencil"),N("polygonOffset"),N("scissor"),N("sample"),"vao"in X&&(G.vao=X.vao),G}function er(X,G){var N={},W={};return Object.keys(X).forEach(function(D){var R=X[D];if(z.isDynamic(R)){W[D]=z.unbox(R,D);return}else if(G&&Array.isArray(R)){for(var L=0;L<R.length;++L)if(z.isDynamic(R[L])){W[D]=z.unbox(R,D);return}}N[D]=R}),{dynamic:W,static:N}}var Vr=er(Tt.context||{},!0),yi=er(Tt.uniforms||{},!0),ya=er(Tt.attributes||{},!1),O=er(qt(Tt),!1),fe={gpuTime:0,cpuTime:0,count:0},Q=ot.compile(O,ya,yi,Vr,fe),st=Q.draw,zt=Q.batch,E=Q.scope,m=[];function B(X){for(;m.length<X;)m.push(null);return m}function Z(X,G){var N;if(pe&&w.raise("context lost"),typeof X=="function")return E.call(this,null,X,0);if(typeof G=="function")if(typeof X=="number")for(N=0;N<X;++N)E.call(this,null,G,N);else if(Array.isArray(X))for(N=0;N<X.length;++N)E.call(this,X[N],G,N);else return E.call(this,X,G,0);else if(typeof X=="number"){if(X>0)return zt.call(this,B(X|0),X|0)}else if(Array.isArray(X)){if(X.length)return zt.call(this,X,X.length)}else return st.call(this,X)}return f(Z,{stats:fe,destroy:function(){Q.destroy()}})}var pr=me.setFBO=Dr({framebuffer:z.define.call(null,Co,"framebuffer")});function qr(Tt,qt){var er=0;ot.procs.poll();var Vr=qt.color;Vr&&(C.clearColor(+Vr[0]||0,+Vr[1]||0,+Vr[2]||0,+Vr[3]||0),er|=Wd),"depth"in qt&&(C.clearDepth(+qt.depth),er|=Tc),"stencil"in qt&&(C.clearStencil(qt.stencil|0),er|=Vd),w(!!er,"called regl.clear with no buffer specified"),C.clear(er)}function Kr(Tt){if(w(typeof Tt=="object"&&Tt,"regl.clear() takes an object as input"),"framebuffer"in Tt)if(Tt.framebuffer&&Tt.framebuffer_reglType==="framebufferCube")for(var qt=0;qt<6;++qt)pr(f({framebuffer:Tt.framebuffer.faces[qt]},Tt),qr);else pr(Tt,qr);else qr(null,Tt)}function en(Tt){w.type(Tt,"function","regl.frame() callback must be a function"),qe.push(Tt);function qt(){var er=nf(qe,Tt);w(er>=0,"cannot cancel a frame twice");function Vr(){var yi=nf(qe,Vr);qe[yi]=qe[qe.length-1],qe.length-=1,qe.length<=0&&Vt()}qe[er]=Vr}return Rt(),{cancel:qt}}function ln(){var Tt=ke.viewport,qt=ke.scissor_box;Tt[0]=Tt[1]=qt[0]=qt[1]=0,Oe.viewportWidth=Oe.framebufferWidth=Oe.drawingBufferWidth=Tt[2]=qt[2]=C.drawingBufferWidth,Oe.viewportHeight=Oe.framebufferHeight=Oe.drawingBufferHeight=Tt[3]=qt[3]=C.drawingBufferHeight}function mn(){Oe.tick+=1,Oe.time=Ut(),ln(),ot.procs.poll()}function Wr(){pt.refresh(),ln(),ot.procs.refresh(),Be&&Be.update()}function Ut(){return(p()-Ge)/1e3}Wr();function gn(Tt,qt){w.type(qt,"function","listener callback must be a function");var er;switch(Tt){case"frame":return en(qt);case"lost":er=Mt;break;case"restore":er=Lt;break;case"destroy":er=Ke;break;default:w.raise("invalid event, must be one of frame,lost,restore,destroy")}return er.push(qt),{cancel:function(){for(var Vr=0;Vr<er.length;++Vr)if(er[Vr]===qt){er[Vr]=er[er.length-1],er.pop();return}}}}var cr=f(Dr,{clear:Kr,prop:z.define.bind(null,Co),context:z.define.bind(null,Ql),this:z.define.bind(null,Mo),draw:Dr({}),buffer:function(Tt){return Re.create(Tt,$d,!1,!1)},elements:function(Tt){return rt.create(Tt,!1)},texture:pt.create2D,cube:pt.createCube,renderbuffer:ye.create,framebuffer:me.create,framebufferCube:me.createCube,vao:Se.createVAO,attributes:ie,frame:en,on:gn,limits:ne,hasExtension:function(Tt){return ne.extensions.indexOf(Tt.toLowerCase())>=0},read:Ve,destroy:Xt,_gl:C,_refresh:Wr,poll:function(){mn(),Be&&Be.update()},now:Ut,stats:De});return x.onDone(null,cr),cr}return Pt})})(Bv);const Sy=Bv.exports,Ty=[0,0,0,0],Ey=1024,Ay=1496e8,Dy=40075016686e-3,Ly=695508e3,Oy=.017453292519943295,Ry=.0333334,Cy=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/,My=/(?:#)[0-9a-f]{8}|(?:#)[0-9a-f]{6}|(?:#)[0-9a-f]{4}|(?:#)[0-9a-f]{3}/ig;function Pv(){const t=new Uint8Array([170,187]);return new Uint16Array(t.buffer)[0]===48042}function Gv(...t){if(t.length===1){const[n]=t;return new Array(n).fill(void 0).map((i,f)=>f)}else{const[n,i,f=1]=t;if(f===0)throw new Error("Argument step must be nonzero.");const h=[];for(let s=n;f>0?s<i:s>i;s+=f)h.push(s);return h}}async function Uv(t,n,i){return new Promise((f,h)=>{const s=new XMLHttpRequest;s.open("GET",t,!0),s.responseType="arraybuffer",s.addEventListener("load",()=>{f(s.response)}),s.addEventListener("error",h),s.send(null)}).then(f=>{const h=gh.exports.decode(f),s=gh.exports.toRGBA8(h)[0];return new Uint8Array(s)}).catch(()=>Rh(n,i))}function ky(t,n){return t.byteLength!==n.byteLength?!1:t.every((i,f)=>i===n[f])}function Iy(t,n){const i=2/t,f=-2/n;return[i,0,0,0,0,f,0,0,0,0,1,0,-1,1,0,1]}function Fy(t){const[{x:n,y:i},{x:f,y:h}]=t;return[[n,i],[f,i],[n,h],[f,h]]}const Rh=Ys.exports.memoize((t,n=256)=>{const i=new Float32Array(n*n);return i.fill(t),new Uint8Array(i.buffer)});function Ny(t,n){return`${Object.keys(n).map(f=>`#define ${f} ${n[f]}
|
|
46
44
|
`).join("")}
|
|
47
|
-
${t}`}const
|
|
45
|
+
${t}`}const By=t=>{const n=t.length===9,i=n?24:16,f=parseInt(t.slice(1),16),h=f>>i&255,s=f>>i-8&255,u=f>>i-16&255,d=n?f>>i-24&255:255;return[h,s,u,d]};function Py(t){if(t==="transparent")return[0,0,0,0];const n=t.match(Cy),i=t.match(My);if(n!==null){const[,f,h,s]=n;return[+f,+h,+s,255]}else{if(i!==null)return By(t);throw new Error(`'${t}' is not a valid RGB or hex color expression.`)}}const Gy=t=>{const n=[];let i=[];for(let d=0;d<t.length;d++){n.push(t[d].offset);const v=Py(t[d].color);i=i.concat(v)}const f=new Float32Array(n),h=new Uint8Array(f.buffer),s=Array.from(h);return i.concat(s)};function Su(t,n){const i=Gy(t);let f;return t.length===0?f=n.texture({shape:[2,2]}):f=n.texture({width:t.length,height:2,data:i}),f}class Yv{constructor(n,i=256,f,h=!1,s="rgba",u="uint8"){const d=Math.floor(f/i),v=d*i,M=d*d,k=n.texture({width:v,height:v,flipY:h,format:s,type:u}),g=new Map,F=this.allTextureCoordinates(d,i);Object.assign(this,{tileSize:i,tilesAcross:d,pixelsAcross:v,tileCapacity:M,texture:k,contents:g,available:F})}addTile(n,i){const{available:f,contents:h,texture:s,tileSize:u}=this,d=this.hashTileCoordinates(n);if(h.has(d)){const g=h.get(d);return h.delete(d),h.set(d,g),this.formatOutputTextureCoordinates(g)}if(Ys.exports.isEmpty(f)){const g=h.keys().next().value;this.removeByHashKey(g)}const v=f.pop();h.set(d,v);const{x:M,y:k}=v;return s.subimage({data:i,width:u,height:u},M,k),this.formatOutputTextureCoordinates(v)}removeTile(n){this.removeByHashKey(this.hashTileCoordinates(n))}clearTiles(){for(const n of Array.from(this.contents.keys()))this.removeByHashKey(n)}destroy(){this.texture.destroy()}removeByHashKey(n){if(this.contents.has(n)){const i=this.contents.get(n);this.contents.delete(n),this.available.push(i)}}formatOutputTextureCoordinates(n){const{x:i,y:f}=n,{pixelsAcross:h,tileSize:s}=this;return[{x:i/h,y:f/h},{x:(i+s)/h,y:(f+s)/h}]}hashTileCoordinates({x:n,y:i,z:f}){return`${n}:${i}:${f}`}getTextureCoordinates(n){const i=this.hashTileCoordinates(n),f=this.contents.get(i);return this.formatOutputTextureCoordinates(f)}allTextureCoordinates(n,i){return Ys.exports.flatMap(Gv(n),f=>Gv(n).map(h=>({x:f*i,y:h*i})))}}const Uy=`#define GLSLIFY 1
|
|
48
46
|
uniform mat4 transformMatrix;
|
|
49
47
|
|
|
50
48
|
attribute vec2 position;
|
|
@@ -55,7 +53,7 @@ varying vec2 vTexCoord;
|
|
|
55
53
|
void main() {
|
|
56
54
|
vTexCoord = texCoord;
|
|
57
55
|
gl_Position = transformMatrix * vec4(position, 0.0, 1.0);
|
|
58
|
-
}`,
|
|
56
|
+
}`,Yy=`#ifdef GL_FRAGMENT_PRECISION_HIGH
|
|
59
57
|
precision highp float;
|
|
60
58
|
#else
|
|
61
59
|
precision mediump float;
|
|
@@ -281,4 +279,4 @@ void main() {
|
|
|
281
279
|
}
|
|
282
280
|
|
|
283
281
|
gl_FragColor = clr;
|
|
284
|
-
}`;function Ob(t,n,i){return t({...n,vert:Rb,frag:Sb(Cb,i),uniforms:{...n.uniforms,scaleLength:t.prop("scaleLength"),sentinelLength:t.prop("sentinelLength"),scaleColormap:t.prop("scaleColormap"),sentinelColormap:t.prop("sentinelColormap"),texture:(a,{texture:f})=>f,enableSimpleHillshade:(a,{enableSimpleHillshade:f})=>f,offset:0,azimuth:0,altitude:0,slopescale:0,deg2rad:pb,slopeFactor:mb,tileSize:0,textureSize:0,textureBounds:[0,0,0,0]},attributes:{...n.attributes,texCoord:(a,{textureBounds:f})=>wb(f)}})}c_();const Ib=c_();function Mb(t,n){return{uniforms:{nodataValue:n,littleEndian:Ib,transformMatrix:({viewportWidth:i,viewportHeight:a})=>bb(i,a)},attributes:{position:(i,{canvasCoordinates:a})=>{const[f,s]=a,[l,d]=[f+t,s+t];return[[f,s],[l,s],[f,d],[l,d]]}},depth:{enable:!1},primitive:"triangle strip",count:4,viewport:(i,{canvasSize:[a,f]})=>({width:a,height:f})}}class y_{constructor(n,i,a,f,s,l,d){const v=document.createElement("canvas");let I=hb,B=1024;const p=ub({canvas:v,optionalExtensions:["OES_texture_float","WEBGL_color_buffer_float"],onDone:function(D,pe){if(D){console.log(D);return}else pe.limits.maxTextureSize>2048&&(I=2048),pe.limits.maxTextureSize>4096&&(I=4096),pe.limits.maxTextureSize>8192&&(I=8192),B=I;pe.limits.maxFragmentUniforms===261&&console.warn("Software rendering detected. Many features of this plugin will fail. If you have a GPU, check if drivers are installed ok?")}}),U=Mb(i,a),q={SCALE_MAX_LENGTH:l,SENTINEL_MAX_LENGTH:d};Object.assign(this,{gloperations:n,canvas:v,regl:p,tileSize:i,nodataValue:a,maxTextureDimension:I,normalTextureDimension:B,scaleInput:f,sentinelInput:s,scaleColormap:Pu(f,p),sentinelColormap:Pu(s,p),textureManager:new v_(p,i,B,!1),drawTile:Ob(p,U,q)})}renderTile({coords:n,pixelData:i},a,f){const{regl:s,textureManager:l,tileSize:d}=this;this.setCanvasSize(d,d);const v=l.addTile(n,i);s.clear({color:cb});const I=a.hsSimpleZoomdelta||0,p=Math.max(.5,2**(f+I)/2048)/l.texture.width;return a.hillshadeType==="none"?this.drawTile({canvasSize:[d,d],canvasCoordinates:[0,0],textureBounds:v,texture:l.texture,scaleLength:this.scaleInput.length,sentinelLength:this.sentinelInput.length,scaleColormap:this.scaleColormap,sentinelColormap:this.sentinelColormap,enableSimpleHillshade:!1}):a.hillshadeType==="simple"&&this.drawTileHsSimple({scaleLength:this.scaleInput.length,sentinelLength:this.sentinelInput.length,scaleColormap:this.scaleColormap,sentinelColormap:this.sentinelColormap,canvasSize:[d,d],canvasCoordinates:[0,0],textureBounds:v,texture:l.texture,textureSize:l.texture.width,tileSize:d,offset:p,enableSimpleHillshade:!0,azimuth:a.hsSimpleAzimuth,altitude:a.hsSimpleAltitude,slopescale:a.hsSimpleSlopescale}),[0,0]}setCanvasSize(n,i){Object.assign(this.canvas,{width:n,height:i})}generateAmbientDirections(n){const i=[];for(let a=0;a<n;a++){const f=g_(is(),Math.random());i.push(f)}this.ambientDirections=i}generateSunDirections(n,i){const a=[];for(let f=0;f<n;f++){const s=m_(is(),Db(is(),Lb(is(),m_(is(),[1,1,1]),db),g_(is(),_b*i)));a.push(s)}this.sunDirections=a}updateColorscale(n){this.scaleInputPrevious=this.scaleInput,this.scaleInput=n,this.scaleColormapPrevious=this.scaleColormap,this.scaleColormap=Pu(n,this.regl)}updateSentinels(n){this.sentinelInputPrevious=this.sentinelInput,this.sentinelInput=n,this.sentinelColormapPrevious=this.sentinelColormap,this.sentinelColormap=Pu(n,this.regl)}setMaxTextureDimension(n){const{textureManager:i,tileSize:a,regl:f}=this;i.destroy(),Object.assign(this,{maxTextureDimension:n,textureManager:new v_(f,a,n,!1)})}}class Fb{constructor(n){this.options=Object.assign({},Jx,n),this._checkColorScaleAndSentinels(),this.setHillshadeOptions();const{nodataValue:i,tileSize:a}=this.options;this._renderer=new y_(this,a,i,this.options.colorScale,this.options.sentinelValues,this.options.colorscaleMaxLength,this.options.sentinelMaxLength),this._renderer.generateAmbientDirections(this.options.hsAdvAmbientIterations),this._renderer.generateSunDirections(this.options.hsAdvSoftIterations,this.options.hsAdvSunRadiusMultiplier)}updateOptions(n){const{url:i,glOperation:a,operationUrlA:f,operationUrlB:s,operationUrlC:l,operationUrlD:d,operationUrlE:v,operationUrlF:I,colorScale:B,sentinelValues:p,filterLowA:U,filterHighA:q,filterLowB:D,filterHighB:pe,filterLowC:ue,filterHighC:x,filterLowD:A,filterHighD:g,filterLowE:b,filterHighE:P,filterLowF:F,filterHighF:J,multiplierA:Te,multiplierB:nt,multiplierC:ut,multiplierD:it,multiplierE:st,multiplierF:tt,multiLayers:Re,hsPregenUrl:Ot,hillshadeType:xt,hsAdvValueScale:Ie,hsAdvPixelScale:Ze,hsSimpleSlopescale:St,hsSimpleAzimuth:$t,hsSimpleAltitude:Wt,hsAdvSoftIterations:Qt,hsAdvAmbientIterations:sr,hsAdvSunRadiusMultiplier:br,hsAdvFinalSoftMultiplier:lr,hsAdvFinalAmbientMultiplier:Kt,hsAdvBaselayerUrl:wr,hsAdvSmoothInput:Gt,hsAdvSmoothInputKernel:Mt,contourInterval:dn,contourIndexInterval:Qr,contourLineColor:kt,contourLineWeight:Nr,contourLineIndexWeight:Fr,contourType:Xr,contourSmoothLines:Jr,contourSmoothInput:ar,contourSmoothInputKernel:Pt,contourIlluminatedHighlightColor:Dn,contourIlluminatedShadowColor:Ln,contourIlluminatedShadowSize:en,contourHypso:on,contourHypsoDomain:E,contourHypsoColors:pi,contourBathy:vn,contourBathyDomain:Zi,contourBathyColors:Gn,contourBathyShadowColor:Tr,contourBathyHighlightColor:Rn,contourIndexLabels:Un,contourLabelFont:C,contourLabelDistance:Ue,colorscaleMaxLength:Xe,sentinelMaxLength:dt}=this.options;if(Object.assign(this.options,n),this.options.colorscaleMaxLength!==Xe||this.options.sentinelMaxLength!==dt){const Z=this._tileSizeAsNumber(),we=new y_(this,Z,this.options.nodataValue,this.options.colorScale,this.options.sentinelValues,this.options.colorscaleMaxLength,this.options.sentinelMaxLength);this._renderer.regl.destroy(),delete this._renderer,Object.assign(this,{_renderer:we})}this._checkColorScaleAndSentinels(),this.options.colorScale!==B&&this._renderer.updateColorscale(this.options.colorScale),this.options.sentinelValues!==p&&this._renderer.updateSentinels(this.options.sentinelValues),this.options.hsAdvAmbientIterations!==sr&&this._renderer.generateAmbientDirections(this.options.hsAdvAmbientIterations),(this.options.hsAdvSoftIterations!==Qt||this.options.hsAdvSunRadiusMultiplier!==br)&&this._renderer.generateSunDirections(this.options.hsAdvSoftIterations,this.options.hsAdvSunRadiusMultiplier),this.setHillshadeOptions(),this.options.extraPixelLayers>0&&this.options.glOperation==="none"&&this._maybeLoadExtraLayers(f,s,l,d),this.options.hillshadeType!==xt&&(this.options.hillshadeType==="simple"?this._renderer.setMaxTextureDimension(this._tileSizeAsNumber()):xt==="simple"&&this._renderer.setMaxTextureDimension(this._renderer.findMaxTextureDimension())),this.options.url!==i&&this._renderer.textureManager.clearTiles(),this.options.hsAdvBaselayerUrl!==wr&&this._renderer.textureManagerHillshade.clearTiles()}createTile(n){const{extraPixelLayers:i,tileSize:a,url:f,hsPregenUrl:s,operationUrlA:l,operationUrlB:d,operationUrlC:v,operationUrlD:I,operationUrlE:B,operationUrlF:p,filterLowA:U,filterHighA:q,filterLowB:D,filterHighB:pe,filterLowC:ue,filterHighC:x,filterLowD:A,filterHighD:g,filterLowE:b,filterHighE:P,filterLowF:F,filterHighF:J,multiplierA:Te,multiplierB:nt,multiplierC:ut,multiplierD:it,multiplierE:st,multiplierF:tt}=this.options,Re=document.createElement("canvas");return Object.assign(Re,{className:"gl-tile",width:a,height:a}),new Promise((Ot,xt)=>{this.options.glOperation==="none"?(i===1&&this._fetchTileData(n,l).then(Ie=>{this.options.debug&&console.log("createTile - extraPixelLayers === 1"),Re.pixelDataA=Ie}),this._fetchTileData(n,f).then(Ie=>{this.options.debug&&console.log("_fetchTileData with no operation");let[Ze,St]=this._renderer.renderTile({coords:n,pixelData:Ie},this.options._hillshadeOptions,n.z);Re.pixelData=Ie,this._copyToTileCanvas(Re,Ze,St),Ot(Re)})):this.options.glOperation==="diff"?Promise.all([this._fetchTileData(n,l),this._fetchTileData(n,d)]).then(Ie=>{this.options.debug&&console.log("_fetchTileData with diff");const Ze=Ie[0],St=Ie[1],[$t,Wt,Qt]=this._renderer.renderTileDiff({coords:n,pixelData:Ze},{coords:n,pixelData:St});Re.pixelData=Qt,Re.pixelDataA=Ze,Re.pixelDataB=St,this._copyToTileCanvas(Re,$t,Wt)}):this.options.glOperation==="multi"&&this.options.multiLayers===1?Promise.all([this._fetchTileData(n,l)]).then(Ie=>{this.options.debug&&console.log("_fetchTileData with multi");const Ze=Ie[0],[St,$t,Wt]=this._renderer.renderTileMulti1({coords:n,pixelData:Ze},U,q,Te);Re.pixelData=Wt,Re.pixelDataA=Ze,this._copyToTileCanvas(Re,St,$t)}):this.options.glOperation==="multi"&&this.options.multiLayers===2?Promise.all([this._fetchTileData(n,l),this._fetchTileData(n,d)]).then(Ie=>{this.options.debug&&console.log("_fetchTileData with multi");const Ze=Ie[0],St=Ie[1],[$t,Wt,Qt]=this._renderer.renderTileMulti2({coords:n,pixelData:Ze},{coords:n,pixelData:St},U,q,D,pe,Te,nt);Re.pixelData=Qt,Re.pixelDataA=Ze,Re.pixelDataB=St,this._copyToTileCanvas(Re,$t,Wt)}):this.options.glOperation==="multi"&&this.options.multiLayers===3?Promise.all([this._fetchTileData(n,l),this._fetchTileData(n,d),this._fetchTileData(n,v)]).then(Ie=>{this.options.debug&&console.log("_fetchTileData with multi");const Ze=Ie[0],St=Ie[1],$t=Ie[2],[Wt,Qt,sr]=this._renderer.renderTileMulti3({coords:n,pixelData:Ze},{coords:n,pixelData:St},{coords:n,pixelData:$t},U,q,D,pe,ue,x,Te,nt,ut);Re.pixelData=sr,Re.pixelDataA=Ze,Re.pixelDataB=St,Re.pixelDataC=$t,this._copyToTileCanvas(Re,Wt,Qt)}):this.options.glOperation==="multi"&&this.options.multiLayers===4?Promise.all([this._fetchTileData(n,l),this._fetchTileData(n,d),this._fetchTileData(n,v),this._fetchTileData(n,I)]).then(Ie=>{this.options.debug&&console.log("_fetchTileData with multi");const Ze=Ie[0],St=Ie[1],$t=Ie[2],Wt=Ie[3],[Qt,sr,br]=this._renderer.renderTileMulti4({coords:n,pixelData:Ze},{coords:n,pixelData:St},{coords:n,pixelData:$t},{coords:n,pixelData:Wt},U,q,D,pe,ue,x,A,g,Te,nt,ut,it);Re.pixelData=br,Re.pixelDataA=Ze,Re.pixelDataB=St,Re.pixelDataC=$t,Re.pixelDataD=Wt,this._copyToTileCanvas(Re,Qt,sr)}):this.options.glOperation==="multi"&&this.options.multiLayers===5?Promise.all([this._fetchTileData(n,l),this._fetchTileData(n,d),this._fetchTileData(n,v),this._fetchTileData(n,I),this._fetchTileData(n,B)]).then(Ie=>{this.options.debug&&console.log("_fetchTileData with multi");const Ze=Ie[0],St=Ie[1],$t=Ie[2],Wt=Ie[3],Qt=Ie[4],[sr,br,lr]=this._renderer.renderTileMulti5({coords:n,pixelData:Ze},{coords:n,pixelData:St},{coords:n,pixelData:$t},{coords:n,pixelData:Wt},{coords:n,pixelData:Qt},U,q,D,pe,ue,x,A,g,b,P,Te,nt,ut,it,st);Re.pixelData=lr,Re.pixelDataA=Ze,Re.pixelDataB=St,Re.pixelDataC=$t,Re.pixelDataD=Wt,Re.pixelDataE=Qt,this._copyToTileCanvas(Re,sr,br)}):this.options.glOperation==="multi"&&this.options.multiLayers===6&&Promise.all([this._fetchTileData(n,l),this._fetchTileData(n,d),this._fetchTileData(n,v),this._fetchTileData(n,I),this._fetchTileData(n,B),this._fetchTileData(n,p)]).then(Ie=>{this.options.debug&&console.log("_fetchTileData with multi");const Ze=Ie[0],St=Ie[1],$t=Ie[2],Wt=Ie[3],Qt=Ie[4],sr=Ie[5],[br,lr,Kt]=this._renderer.renderTileMulti6({coords:n,pixelData:Ze},{coords:n,pixelData:St},{coords:n,pixelData:$t},{coords:n,pixelData:Wt},{coords:n,pixelData:Qt},{coords:n,pixelData:sr},U,q,D,pe,ue,x,A,g,b,P,F,J,Te,nt,ut,it,st,tt);Re.pixelData=Kt,Re.pixelDataA=Ze,Re.pixelDataB=St,Re.pixelDataC=$t,Re.pixelDataD=Wt,Re.pixelDataE=Qt,Re.pixelDataF=sr,this._copyToTileCanvas(Re,br,lr)})})}_checkColorScaleAndSentinels(){const{colorScale:n,sentinelValues:i,colorscaleMaxLength:a,sentinelMaxLength:f}=this.options;if(n.length===0&&i.length===0)throw new Error("Either `colorScale` or `sentinelValues` must be of non-zero length.");if(n.length>a)throw new Error(`Color scale length ${n.length} exceeds the maximum, ${a}.`);if(i.length>f)throw new Error(`Sentinel values length ${i.length} exceeds the maximum, ${f}.`)}setHillshadeOptions(){this.options._hillshadeOptions={hillshadeType:this.options.hillshadeType,hsAdvValueScale:this.options.hsAdvValueScale,hsAdvPixelScale:this.options.hsAdvPixelScale,hsSimpleSlopescale:this.options.hsSimpleSlopescale,hsSimpleAzimuth:this.options.hsSimpleAzimuth,hsSimpleAltitude:this.options.hsSimpleAltitude,hsSimpleZoomdelta:this.options.hsSimpleZoomdelta,hsAdvSoftIterations:this.options.hsAdvSoftIterations,hsAdvAmbientIterations:this.options.hsAdvAmbientIterations,hsAdvSunRadiusMultiplier:this.options.hsAdvSunRadiusMultiplier,hsAdvFinalSoftMultiplier:this.options.hsAdvFinalSoftMultiplier,hsAdvFinalAmbientMultiplier:this.options.hsAdvFinalAmbientMultiplier,hsAdvBaselayerUrl:this.options.hsAdvBaselayerUrl,hsAdvSmoothInput:this.options.hsAdvSmoothInput,hsAdvSmoothInputKernel:this.options.hsAdvSmoothInputKernel,hsPregenUrl:this.options.hsPregenUrl}}_tileSizeAsNumber(){return this.options.tileSize}async _fetchTileData(n,i,a=this.options.tileFormat){if(a==="float32"||a==="image")return d_(this.getTileUrl(n,i),this.options.nodataValue,this._tileSizeAsNumber());if(a==="dem"){const f=Zh(this.options.nodataValue,this._tileSizeAsNumber()),s=await d_(this.getTileUrl(n,i),this.options.nodataValue,this._tileSizeAsNumber());return xb(s,f)?s:this._renderer.renderConvertDem(s)}return Zh(this.options.nodataValue,this._tileSizeAsNumber())}_copyToTileCanvas(n,i,a){const f=this._tileSizeAsNumber(),s=n.getContext("2d");if(s===null)throw new Error("Tile canvas 2D context is null.");s.clearRect(0,0,f,f),s.drawImage(this._renderer.canvas,i,a,f,f,0,0,f,f)}getTileUrl(n,i){return i.replace(/{z}/g,String(n.z)).replace(/{x}/g,String(n.x)).replace(/{y}/g,String(n.y))}_getPixelScale(n){let{bbox:{east:i,south:a,west:f,north:s},z:l}=n,d=1,v=(a+s)/2;return this.options.hsAdvPixelScale==="auto"?d=vb*Math.abs(Math.cos(v/180*Math.PI))/Math.pow(2,l+8):typeof this.options.hsAdvPixelScale=="number"&&(d=this.options.hsAdvPixelScale/(this._tileSizeAsNumber()*2**l)),d}}ir.Event=Qx,ir.GLOperations=Fb,ir.addIcons2Map=qx,ir.bmapTypes=Tx,ir.cameras=Rh,ir.colors=Ex,ir.defaultLayers=Dx,ir.diffLayers=Gx,ir.downloadImage=zx,ir.findNodeInTree=ku,ir.formatDate=Fx,ir.formatFileSize=Px,ir.formatLocalDate=kx,ir.generateId=Mx,ir.getAnnotationFeature=$x,ir.getAnnotationName=Zx,ir.getBeforeId=Ux,ir.getDataType=Hx,ir.getGeoCoordOperator=Oh,ir.getGeometryType=Wx,ir.getLineLabelFeature=Xx,ir.getPhotoInfo=Nx,ir.getPhotoMeta=Bx,ir.getPhotoTags=jc,ir.getTaskTreeList=Kx,ir.isTokenExpired=Yx,ir.layerFolders=Lx,ir.layerGroups=Gv,ir.layerIcons=Rx,ir.mapViewModes=Cx,ir.project=Mh,ir.rgbaToFloat=Vx,ir.taskParams=Ox,ir.toRadian=Ih,ir.tools=Ix,Object.defineProperties(ir,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
282
|
+
}`;function Hy(t,n,i){return t({...n,vert:Uy,frag:Ny(Yy,i),uniforms:{...n.uniforms,scaleLength:t.prop("scaleLength"),sentinelLength:t.prop("sentinelLength"),scaleColormap:t.prop("scaleColormap"),sentinelColormap:t.prop("sentinelColormap"),texture:(f,{texture:h})=>h,enableSimpleHillshade:(f,{enableSimpleHillshade:h})=>h,offset:0,azimuth:0,altitude:0,slopescale:0,deg2rad:Oy,slopeFactor:Ry,tileSize:0,textureSize:0,textureBounds:[0,0,0,0]},attributes:{...n.attributes,texCoord:(f,{textureBounds:h})=>Fy(h)}})}Pv();const zy=Pv();function Wy(t,n){return{uniforms:{nodataValue:n,littleEndian:zy,transformMatrix:({viewportWidth:i,viewportHeight:f})=>Iy(i,f)},attributes:{position:(i,{canvasCoordinates:f})=>{const[h,s]=f,[u,d]=[h+t,s+t];return[[h,s],[u,s],[h,d],[u,d]]}},depth:{enable:!1},primitive:"triangle strip",count:4,viewport:(i,{canvasSize:[f,h]})=>({width:f,height:h})}}class Hv{constructor(n,i,f,h,s,u,d){const v=document.createElement("canvas");let M=Ey,k=1024;const g=Sy({canvas:v,optionalExtensions:["OES_texture_float","WEBGL_color_buffer_float"],onDone:function(S,de){if(S){console.log(S);return}else de.limits.maxTextureSize>2048&&(M=2048),de.limits.maxTextureSize>4096&&(M=4096),de.limits.maxTextureSize>8192&&(M=8192),k=M;de.limits.maxFragmentUniforms===261&&console.warn("Software rendering detected. Many features of this plugin will fail. If you have a GPU, check if drivers are installed ok?")}}),F=Wy(i,f),$={SCALE_MAX_LENGTH:u,SENTINEL_MAX_LENGTH:d};Object.assign(this,{gloperations:n,canvas:v,regl:g,tileSize:i,nodataValue:f,maxTextureDimension:M,normalTextureDimension:k,scaleInput:h,sentinelInput:s,scaleColormap:Su(h,g),sentinelColormap:Su(s,g),textureManager:new Yv(g,i,k,!1),drawTile:Hy(g,F,$)})}renderTile({coords:n,pixelData:i},f,h){const{regl:s,textureManager:u,tileSize:d}=this;this.setCanvasSize(d,d);const v=u.addTile(n,i);s.clear({color:Ty});const M=f.hsSimpleZoomdelta||0,g=Math.max(.5,2**(h+M)/2048)/u.texture.width;return f.hillshadeType==="none"?this.drawTile({canvasSize:[d,d],canvasCoordinates:[0,0],textureBounds:v,texture:u.texture,scaleLength:this.scaleInput.length,sentinelLength:this.sentinelInput.length,scaleColormap:this.scaleColormap,sentinelColormap:this.sentinelColormap,enableSimpleHillshade:!1}):f.hillshadeType==="simple"&&this.drawTileHsSimple({scaleLength:this.scaleInput.length,sentinelLength:this.sentinelInput.length,scaleColormap:this.scaleColormap,sentinelColormap:this.sentinelColormap,canvasSize:[d,d],canvasCoordinates:[0,0],textureBounds:v,texture:u.texture,textureSize:u.texture.width,tileSize:d,offset:g,enableSimpleHillshade:!0,azimuth:f.hsSimpleAzimuth,altitude:f.hsSimpleAltitude,slopescale:f.hsSimpleSlopescale}),[0,0]}setCanvasSize(n,i){Object.assign(this.canvas,{width:n,height:i})}generateAmbientDirections(n){const i=[];for(let f=0;f<n;f++){const h=hv(qf(),Math.random());i.push(h)}this.ambientDirections=i}generateSunDirections(n,i){const f=[];for(let h=0;h<n;h++){const s=cv(qf(),Hg(qf(),zg(qf(),cv(qf(),[1,1,1]),Ay),hv(qf(),Ly*i)));f.push(s)}this.sunDirections=f}updateColorscale(n){this.scaleInputPrevious=this.scaleInput,this.scaleInput=n,this.scaleColormapPrevious=this.scaleColormap,this.scaleColormap=Su(n,this.regl)}updateSentinels(n){this.sentinelInputPrevious=this.sentinelInput,this.sentinelInput=n,this.sentinelColormapPrevious=this.sentinelColormap,this.sentinelColormap=Su(n,this.regl)}setMaxTextureDimension(n){const{textureManager:i,tileSize:f,regl:h}=this;i.destroy(),Object.assign(this,{maxTextureDimension:n,textureManager:new Yv(h,f,n,!1)})}}class Vy{constructor(n){this.options=Object.assign({},hy,n),this._checkColorScaleAndSentinels(),this.setHillshadeOptions();const{nodataValue:i,tileSize:f}=this.options;this._renderer=new Hv(this,f,i,this.options.colorScale,this.options.sentinelValues,this.options.colorscaleMaxLength,this.options.sentinelMaxLength),this._renderer.generateAmbientDirections(this.options.hsAdvAmbientIterations),this._renderer.generateSunDirections(this.options.hsAdvSoftIterations,this.options.hsAdvSunRadiusMultiplier)}updateOptions(n){const{url:i,glOperation:f,operationUrlA:h,operationUrlB:s,operationUrlC:u,operationUrlD:d,operationUrlE:v,operationUrlF:M,colorScale:k,sentinelValues:g,filterLowA:F,filterHighA:$,filterLowB:S,filterHighB:de,filterLowC:se,filterHighC:I,filterLowD:U,filterHighD:te,filterLowE:ce,filterHighE:_e,filterLowF:we,filterHighF:ee,multiplierA:Ce,multiplierB:ut,multiplierC:ct,multiplierD:nt,multiplierE:ft,multiplierF:tt,multiLayers:Le,hsPregenUrl:Ct,hillshadeType:bt,hsAdvValueScale:Me,hsAdvPixelScale:Ze,hsSimpleSlopescale:St,hsSimpleAzimuth:$t,hsSimpleAltitude:Wt,hsAdvSoftIterations:Qt,hsAdvAmbientIterations:sr,hsAdvSunRadiusMultiplier:xr,hsAdvFinalSoftMultiplier:or,hsAdvFinalAmbientMultiplier:Kt,hsAdvBaselayerUrl:wr,hsAdvSmoothInput:Gt,hsAdvSmoothInputKernel:kt,contourInterval:hn,contourIndexInterval:jr,contourLineColor:Ft,contourLineWeight:Br,contourLineIndexWeight:Ir,contourType:Zr,contourSmoothLines:Qr,contourSmoothInput:ar,contourSmoothInputKernel:Nt,contourIlluminatedHighlightColor:En,contourIlluminatedShadowColor:An,contourIlluminatedShadowSize:Jr,contourHypso:an,contourHypsoDomain:w,contourHypsoColors:li,contourBathy:dn,contourBathyDomain:Gi,contourBathyColors:Bn,contourBathyShadowColor:Er,contourBathyHighlightColor:Dn,contourIndexLabels:Pn,contourLabelFont:A,contourLabelDistance:Ue,colorscaleMaxLength:Xe,sentinelMaxLength:dt}=this.options;if(Object.assign(this.options,n),this.options.colorscaleMaxLength!==Xe||this.options.sentinelMaxLength!==dt){const z=this._tileSizeAsNumber(),xe=new Hv(this,z,this.options.nodataValue,this.options.colorScale,this.options.sentinelValues,this.options.colorscaleMaxLength,this.options.sentinelMaxLength);this._renderer.regl.destroy(),delete this._renderer,Object.assign(this,{_renderer:xe})}this._checkColorScaleAndSentinels(),this.options.colorScale!==k&&this._renderer.updateColorscale(this.options.colorScale),this.options.sentinelValues!==g&&this._renderer.updateSentinels(this.options.sentinelValues),this.options.hsAdvAmbientIterations!==sr&&this._renderer.generateAmbientDirections(this.options.hsAdvAmbientIterations),(this.options.hsAdvSoftIterations!==Qt||this.options.hsAdvSunRadiusMultiplier!==xr)&&this._renderer.generateSunDirections(this.options.hsAdvSoftIterations,this.options.hsAdvSunRadiusMultiplier),this.setHillshadeOptions(),this.options.extraPixelLayers>0&&this.options.glOperation==="none"&&this._maybeLoadExtraLayers(h,s,u,d),this.options.hillshadeType!==bt&&(this.options.hillshadeType==="simple"?this._renderer.setMaxTextureDimension(this._tileSizeAsNumber()):bt==="simple"&&this._renderer.setMaxTextureDimension(this._renderer.findMaxTextureDimension())),this.options.url!==i&&this._renderer.textureManager.clearTiles(),this.options.hsAdvBaselayerUrl!==wr&&this._renderer.textureManagerHillshade.clearTiles()}createTile(n){const{extraPixelLayers:i,tileSize:f,url:h,hsPregenUrl:s,operationUrlA:u,operationUrlB:d,operationUrlC:v,operationUrlD:M,operationUrlE:k,operationUrlF:g,filterLowA:F,filterHighA:$,filterLowB:S,filterHighB:de,filterLowC:se,filterHighC:I,filterLowD:U,filterHighD:te,filterLowE:ce,filterHighE:_e,filterLowF:we,filterHighF:ee,multiplierA:Ce,multiplierB:ut,multiplierC:ct,multiplierD:nt,multiplierE:ft,multiplierF:tt}=this.options,Le=document.createElement("canvas");return Object.assign(Le,{className:"gl-tile",width:f,height:f}),new Promise((Ct,bt)=>{this.options.glOperation==="none"?(i===1&&this._fetchTileData(n,u).then(Me=>{this.options.debug&&console.log("createTile - extraPixelLayers === 1"),Le.pixelDataA=Me}),this._fetchTileData(n,h).then(Me=>{this.options.debug&&console.log("_fetchTileData with no operation");let[Ze,St]=this._renderer.renderTile({coords:n,pixelData:Me},this.options._hillshadeOptions,n.z);Le.pixelData=Me,this._copyToTileCanvas(Le,Ze,St),Ct(Le)})):this.options.glOperation==="diff"?Promise.all([this._fetchTileData(n,u),this._fetchTileData(n,d)]).then(Me=>{this.options.debug&&console.log("_fetchTileData with diff");const Ze=Me[0],St=Me[1],[$t,Wt,Qt]=this._renderer.renderTileDiff({coords:n,pixelData:Ze},{coords:n,pixelData:St});Le.pixelData=Qt,Le.pixelDataA=Ze,Le.pixelDataB=St,this._copyToTileCanvas(Le,$t,Wt)}):this.options.glOperation==="multi"&&this.options.multiLayers===1?Promise.all([this._fetchTileData(n,u)]).then(Me=>{this.options.debug&&console.log("_fetchTileData with multi");const Ze=Me[0],[St,$t,Wt]=this._renderer.renderTileMulti1({coords:n,pixelData:Ze},F,$,Ce);Le.pixelData=Wt,Le.pixelDataA=Ze,this._copyToTileCanvas(Le,St,$t)}):this.options.glOperation==="multi"&&this.options.multiLayers===2?Promise.all([this._fetchTileData(n,u),this._fetchTileData(n,d)]).then(Me=>{this.options.debug&&console.log("_fetchTileData with multi");const Ze=Me[0],St=Me[1],[$t,Wt,Qt]=this._renderer.renderTileMulti2({coords:n,pixelData:Ze},{coords:n,pixelData:St},F,$,S,de,Ce,ut);Le.pixelData=Qt,Le.pixelDataA=Ze,Le.pixelDataB=St,this._copyToTileCanvas(Le,$t,Wt)}):this.options.glOperation==="multi"&&this.options.multiLayers===3?Promise.all([this._fetchTileData(n,u),this._fetchTileData(n,d),this._fetchTileData(n,v)]).then(Me=>{this.options.debug&&console.log("_fetchTileData with multi");const Ze=Me[0],St=Me[1],$t=Me[2],[Wt,Qt,sr]=this._renderer.renderTileMulti3({coords:n,pixelData:Ze},{coords:n,pixelData:St},{coords:n,pixelData:$t},F,$,S,de,se,I,Ce,ut,ct);Le.pixelData=sr,Le.pixelDataA=Ze,Le.pixelDataB=St,Le.pixelDataC=$t,this._copyToTileCanvas(Le,Wt,Qt)}):this.options.glOperation==="multi"&&this.options.multiLayers===4?Promise.all([this._fetchTileData(n,u),this._fetchTileData(n,d),this._fetchTileData(n,v),this._fetchTileData(n,M)]).then(Me=>{this.options.debug&&console.log("_fetchTileData with multi");const Ze=Me[0],St=Me[1],$t=Me[2],Wt=Me[3],[Qt,sr,xr]=this._renderer.renderTileMulti4({coords:n,pixelData:Ze},{coords:n,pixelData:St},{coords:n,pixelData:$t},{coords:n,pixelData:Wt},F,$,S,de,se,I,U,te,Ce,ut,ct,nt);Le.pixelData=xr,Le.pixelDataA=Ze,Le.pixelDataB=St,Le.pixelDataC=$t,Le.pixelDataD=Wt,this._copyToTileCanvas(Le,Qt,sr)}):this.options.glOperation==="multi"&&this.options.multiLayers===5?Promise.all([this._fetchTileData(n,u),this._fetchTileData(n,d),this._fetchTileData(n,v),this._fetchTileData(n,M),this._fetchTileData(n,k)]).then(Me=>{this.options.debug&&console.log("_fetchTileData with multi");const Ze=Me[0],St=Me[1],$t=Me[2],Wt=Me[3],Qt=Me[4],[sr,xr,or]=this._renderer.renderTileMulti5({coords:n,pixelData:Ze},{coords:n,pixelData:St},{coords:n,pixelData:$t},{coords:n,pixelData:Wt},{coords:n,pixelData:Qt},F,$,S,de,se,I,U,te,ce,_e,Ce,ut,ct,nt,ft);Le.pixelData=or,Le.pixelDataA=Ze,Le.pixelDataB=St,Le.pixelDataC=$t,Le.pixelDataD=Wt,Le.pixelDataE=Qt,this._copyToTileCanvas(Le,sr,xr)}):this.options.glOperation==="multi"&&this.options.multiLayers===6&&Promise.all([this._fetchTileData(n,u),this._fetchTileData(n,d),this._fetchTileData(n,v),this._fetchTileData(n,M),this._fetchTileData(n,k),this._fetchTileData(n,g)]).then(Me=>{this.options.debug&&console.log("_fetchTileData with multi");const Ze=Me[0],St=Me[1],$t=Me[2],Wt=Me[3],Qt=Me[4],sr=Me[5],[xr,or,Kt]=this._renderer.renderTileMulti6({coords:n,pixelData:Ze},{coords:n,pixelData:St},{coords:n,pixelData:$t},{coords:n,pixelData:Wt},{coords:n,pixelData:Qt},{coords:n,pixelData:sr},F,$,S,de,se,I,U,te,ce,_e,we,ee,Ce,ut,ct,nt,ft,tt);Le.pixelData=Kt,Le.pixelDataA=Ze,Le.pixelDataB=St,Le.pixelDataC=$t,Le.pixelDataD=Wt,Le.pixelDataE=Qt,Le.pixelDataF=sr,this._copyToTileCanvas(Le,xr,or)})})}_checkColorScaleAndSentinels(){const{colorScale:n,sentinelValues:i,colorscaleMaxLength:f,sentinelMaxLength:h}=this.options;if(n.length===0&&i.length===0)throw new Error("Either `colorScale` or `sentinelValues` must be of non-zero length.");if(n.length>f)throw new Error(`Color scale length ${n.length} exceeds the maximum, ${f}.`);if(i.length>h)throw new Error(`Sentinel values length ${i.length} exceeds the maximum, ${h}.`)}setHillshadeOptions(){this.options._hillshadeOptions={hillshadeType:this.options.hillshadeType,hsAdvValueScale:this.options.hsAdvValueScale,hsAdvPixelScale:this.options.hsAdvPixelScale,hsSimpleSlopescale:this.options.hsSimpleSlopescale,hsSimpleAzimuth:this.options.hsSimpleAzimuth,hsSimpleAltitude:this.options.hsSimpleAltitude,hsSimpleZoomdelta:this.options.hsSimpleZoomdelta,hsAdvSoftIterations:this.options.hsAdvSoftIterations,hsAdvAmbientIterations:this.options.hsAdvAmbientIterations,hsAdvSunRadiusMultiplier:this.options.hsAdvSunRadiusMultiplier,hsAdvFinalSoftMultiplier:this.options.hsAdvFinalSoftMultiplier,hsAdvFinalAmbientMultiplier:this.options.hsAdvFinalAmbientMultiplier,hsAdvBaselayerUrl:this.options.hsAdvBaselayerUrl,hsAdvSmoothInput:this.options.hsAdvSmoothInput,hsAdvSmoothInputKernel:this.options.hsAdvSmoothInputKernel,hsPregenUrl:this.options.hsPregenUrl}}_tileSizeAsNumber(){return this.options.tileSize}async _fetchTileData(n,i,f=this.options.tileFormat){if(f==="float32"||f==="image")return Uv(this.getTileUrl(n,i),this.options.nodataValue,this._tileSizeAsNumber());if(f==="dem"){const h=Rh(this.options.nodataValue,this._tileSizeAsNumber()),s=await Uv(this.getTileUrl(n,i),this.options.nodataValue,this._tileSizeAsNumber());return ky(s,h)?s:this._renderer.renderConvertDem(s)}return Rh(this.options.nodataValue,this._tileSizeAsNumber())}_copyToTileCanvas(n,i,f){const h=this._tileSizeAsNumber(),s=n.getContext("2d");if(s===null)throw new Error("Tile canvas 2D context is null.");s.clearRect(0,0,h,h),s.drawImage(this._renderer.canvas,i,f,h,h,0,0,h,h)}getTileUrl(n,i){return i.replace(/{z}/g,String(n.z)).replace(/{x}/g,String(n.x)).replace(/{y}/g,String(n.y))}_getPixelScale(n){let{bbox:{east:i,south:f,west:h,north:s},z:u}=n,d=1,v=(f+s)/2;return this.options.hsAdvPixelScale==="auto"?d=Dy*Math.abs(Math.cos(v/180*Math.PI))/Math.pow(2,u+8):typeof this.options.hsAdvPixelScale=="number"&&(d=this.options.hsAdvPixelScale/(this._tileSizeAsNumber()*2**u)),d}}ir.Event=cy,ir.GLOperations=Vy,ir.addIcons2Map=fy,ir.bmapTypes=Og,ir.cameras=vh,ir.colors=Rg,ir.crsTypes=Bg,ir.defaultLayers=Cg,ir.diffLayers=Kg,ir.downloadImage=ey,ir.findNodeInTree=wu,ir.formatDate=Vg,ir.formatFileSize=Zg,ir.formatLocalDate=$g,ir.generateId=Wg,ir.getAnnotationFeature=ny,ir.getAnnotationName=iy,ir.getBeforeId=jg,ir.getDataType=Jg,ir.getGeoCoordOperator=Xg,ir.getGeometryType=ty,ir.getLineLabelFeature=ay,ir.getRotationMatrix=ly,ir.getTaskTreeList=sy,ir.hasNaN=oy,ir.isTokenExpired=Qg,ir.layerFolders=Mg,ir.layerGroups=ov,ir.layerIcons=kg,ir.measurementFields=Ng,ir.project=ph,ir.rgbaToFloat=ry,ir.taskParams=Ig,ir.toRadian=qg,ir.tools=Fg,Object.defineProperties(ir,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|