PageSourceSearch

https://mybridge.com/_next/static/chunks/2500.45be3b0a5c897e32.js

js mybridge.com collected 2026-10-01 15:28:20 UTC 151,996 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2500],{2500:(t,e,i)=>{self,t.exports=function(t){var e={303:(t,e,i)=>{t.exports=i(302),i(200),i(630),i(16),i(677),i(635),i(166),i(140),i(922)},635:(t,e,i)=>{var r,a,s;!function(o){"use strict";a=[i(302),i(677)],void 0===(s="function"==typeof(r=function(t){var e=t.ExifMap.prototype;e.tags={256:"ImageWidth",257:"ImageHeight",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",34665:{36864:"ExifVersion",40960:"FlashpixVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",42240:"Gamma",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",37500:"MakerNote",37510:"UserComment",40964:"RelatedSoundFile",36867:"DateTimeOriginal",36868:"DateTimeDigitized",36880:"OffsetTime",36881:"OffsetTimeOriginal",36882:"OffsetTimeDigitized",37520:"SubSecTime",37521:"SubSecTimeOriginal",37522:"SubSecTimeDigitized",33434:"ExposureTime",33437:"FNumber",34850:"ExposureProgram",34852:"SpectralSensitivity",34855:"PhotographicSensitivity",34856:"OECF",34864:"SensitivityType",34865:"StandardOutputSensitivity",34866:"RecommendedExposureIndex",34867:"ISOSpeed",34868:"ISOSpeedLatitudeyyy",34869:"ISOSpeedLatitudezzz",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:"E
1xposureMode",41987:"WhiteBalance",41988:"DigitalZoomRatio",41989:"FocalLengthIn35mmFilm",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",42016:"ImageUniqueID",42032:"CameraOwnerName",42033:"BodySerialNumber",42034:"LensSpecification",42035:"LensMake",42036:"LensModel",42037:"LensSerialNumber"},34853:{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",31:"GPSHPositioningError"},40965:{1:"InteroperabilityIndex"}},e.tags.ifd1=e.tags,e.stringValues={ExposureProgram:{0:"Undefined",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:"Undefined",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"},ComponentsConfiguration:{0:"",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"},Orientation:{1:"Original",2:"Horizontal flip",3:"Rotate 180\xb0 CCW",4:"Vertical flip",5:"Vertical flip + Rotate 90\xb0 CW",6:"Rotate 90\xb0 CW",7:"Horizontal flip + Rotate 90\xb0 CW",8:"Rotate 90\xb0 CCW"}},e.getText=function(t){var e=this.get(t);switch(t){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":case"Orientation":return this.stringValues[t][e];case"ExifVersion":case"FlashpixVersion":if(!e)return;return String.fromCharCode(e[0],e[1],e[2],e[3]);case"ComponentsConfiguration":if(!e)return;return this.stringValues[t][e[0]]+this.stringValues[t][e[1]]+this.stringValues[t][e[2]]+this.stringValues[t][e[3]];case"GPSVersionID":if(!e)return;return e[0]+"."+e[1]+"."+e[2]+"."+e[3]}return String(e)},e.getAll=function(){var t,e,i,r={};for(t in this)Object.prototype.hasOwnProperty.call(this,t)&&((e=this[t])&&e.getAll?r[this.ifds[t].name]=e.getAll():(i=this.tags[t])&&(r[i]=this.getText(i)));return r},e.getName=function(t){var e=this.tags[t];return"object"==typeof e?this.ifds[t].name:e},function(){var t,i,r,a=e.tags;for(t in a)if(Object.prototype.hasOwnProperty.call(a,t))if(i=e.ifds[t])for(t in r=a[t])Object.prototype.hasOwnProperty.call(r,t)&&(i.map[r[t]]=Number(t));else e.map[a[t]]=Number(t)}()})?r.apply(e,a):r)||(t.exports=s)}()},677:(t,e,i)=>{var r,a,s;!function(o){"use strict";a=[i(302),i(630)],void 0===(s="function"==typeof(r=function(t){function e(t){t&&(Object.defineProperty(this,"map",{value:this.ifds[t].map}),Object.defineProperty(this,"tags",{value:this.tags&&this.tags[t]||{}}))}e.prototype.map={Orientation:274,Thumbnail:"ifd1",Blob:513,Exif:34665,GPSInfo:34853,Interoperability:40965}
1,e.prototype.ifds={ifd1:{name:"Thumbnail",map:e.prototype.map},34665:{name:"Exif",map:{}},34853:{name:"GPSInfo",map:{}},40965:{name:"Interoperability",map:{}}},e.prototype.get=function(t){return this[t]||this[this.map[t]]};var i={1:{getValue:function(t,e){return t.getUint8(e)},size:1},2:{getValue:function(t,e){return String.fromCharCode(t.getUint8(e))},size:1,ascii:!0},3:{getValue:function(t,e,i){return t.getUint16(e,i)},size:2},4:{getValue:function(t,e,i){return t.getUint32(e,i)},size:4},5:{getValue:function(t,e,i){return t.getUint32(e,i)/t.getUint32(e+4,i)},size:8},9:{getValue:function(t,e,i){return t.getInt32(e,i)},size:4},10:{getValue:function(t,e,i){return t.getInt32(e,i)/t.getInt32(e+4,i)},size:8}};function r(t,e,i){return(!t||t[i])&&(!e||!0!==e[i])}function a(t,e,a,s,o,h,l,c){var d,u,g,f,p,m;if(a+6>t.byteLength)console.log("Invalid Exif data: Invalid directory offset.");else{if(!((u=a+2+12*(d=t.getUint16(a,s)))+4>t.byteLength)){for(g=0;g<d;g+=1)f=a+2+12*g,r(l,c,p=t.getUint16(f,s))&&(m=function(t,e,r,a,s,o){var h,l,c,d,u,g,f=i[a];if(f){if(!((l=(h=f.size*s)>4?e+t.getUint32(r+8,o):r+8)+h>t.byteLength)){if(1===s)return f.getValue(t,l,o);for(c=[],d=0;d<s;d+=1)c[d]=f.getValue(t,l+d*f.size,o);if(f.ascii){for(u="",d=0;d<c.length&&"\0"!==(g=c[d]);d+=1)u+=g;return u}return c}console.log("Invalid Exif data: Invalid data offset.")}else console.log("Invalid Exif data: Invalid tag type.")}(t,e,f,t.getUint16(f+2,s),t.getUint32(f+4,s),s),o[p]=m,h&&(h[p]=f));return t.getUint32(u,s)}console.log("Invalid Exif data: Invalid directory size.")}}i[7]=i[1],t.parseExifData=function(i,s,o,h,l){if(!l.disableExif){var c,d,u,g=l.includeExifTags,f=l.excludeExifTags||{34665:{37500:!0}},p=s+10;if(0x45786966===i.getUint32(s+4))if(p+8>i.byteLength)console.log("Invalid Exif data: Invalid segment size.");else if(0===i.getUint16(s+8)){switch(i.getUint16(p)){case 18761:c=!0;break;case 19789:c=!1;break;default:return void console.log("Invalid Exif data: Invalid byte alignment marker.")}42===i.getUint16(p+2,c)?(d=i.getUint32(p+4,c),h.exif=new e,l.disableExifOffsets||(h.exifOffsets=new e,h.exifTiffOffset=p,h.exifLittleEndian=c),(d=a(i,p,p+d,c,h.exif,h.exifOffsets,g,f))&&r(g,f,"ifd1")&&(h.exif.ifd1=d,h.exifOffsets&&(h.exifOffsets.ifd1=p+d)),Object.keys(h.exif.ifds).forEach(function(t){var r,s;r=c,(s=h.exif[t])&&(h.exif[t]=new e(t),h.exifOffsets&&(h.exifOffsets[t]=new e(t)),a(i,p,p+s,r,h.exif[t],h.exifOffsets&&h.exifOffsets[t],g&&g[t],f&&f[t]))}),(u=h.exif.ifd1)&&u[513]&&(u[513]=function(e,i,r){if(r){if(!(i+r>e.byteLength))return new Blob([t.bufferSlice.call(e.buffer,i,i+r)],{type:"image/jpeg"});console.log("Invalid Exif data: Invalid thumbnail data.")}}(i,p+u[513],u[514]))):console.log("Invalid Exif data: Missing TIFF marker.")}else console.log("Invalid Exif data: Missing byte alignment offset.")}},t.metaDataParsers.jpeg[65505].push(t.parseExifData),t.exifWriters={274:function(t,e,i){var r=e.exifOffsets[274];return r&&new DataView(t,r+8,2).setUint16(0,i,e.exifLittleEndian),t}},t.writeExifData=function(e,i,r,a){return t.exifWriters[i.exif.map[r]](e,i,a)},t.ExifMap=e})?r.apply(e,a):r)||(t.exports=s)}()},16:(t,e,i)=>{var r,a,s;!function(o){"use strict";a=[i(302)],void 0===(s="function"==typeof(r=function(t){var e=t.global;e.fetch&&e.Request&&e.Response&&e.Response.prototype.blob?t.fetchBlob=function(t,i,r){function a(t){return t.blob()}if(e.Promise&&"function"!=typeof i)return fetch(new Request(t,i)).then(a);fetch(new Request(t,r)).then(a).then(i).catch(function(t){i(null,t)})}:e.XMLHttpRequest&&""===(new XMLHttpRequest).responseType&&(t.fetchBlob=function(t,i,r){function a(e,i){r=r||{};var a=new XMLHttpRequest;a.open(r.method||"GET",t),r.headers&&Object.keys(r.headers).forEach(function(t){a.setRequestHeader(t,r.headers[t])}),a.withCredentials="include"===r.credentials,a.responseType="blob",a.onload=function(){e(a.response)},a.onerror=a.onabort=a.ontimeout=function(t){e===i?i(null,t):i(t)},a.send(r.body)}return e.Promise&&"function"!=typeof i?(r=i,new Promise(a)):a(i,i)})})?r.apply(e,a):r)||(t.exports=s)}()},140:(t,e,i)=>{var r,a,s;!function(o){"use strict";a=[i(302),i(166)],void 0===(s="function"==typeof(r=function(t){var e=t.Ipt
1cMap.prototype;e.tags={0:"ApplicationRecordVersion",3:"ObjectTypeReference",4:"ObjectAttributeReference",5:"ObjectName",7:"EditStatus",8:"EditorialUpdate",10:"Urgency",12:"SubjectReference",15:"Category",20:"SupplementalCategories",22:"FixtureIdentifier",25:"Keywords",26:"ContentLocationCode",27:"ContentLocationName",30:"ReleaseDate",35:"ReleaseTime",37:"ExpirationDate",38:"ExpirationTime",40:"SpecialInstructions",42:"ActionAdvised",45:"ReferenceService",47:"ReferenceDate",50:"ReferenceNumber",55:"DateCreated",60:"TimeCreated",62:"DigitalCreationDate",63:"DigitalCreationTime",65:"OriginatingProgram",70:"ProgramVersion",75:"ObjectCycle",80:"Byline",85:"BylineTitle",90:"City",92:"Sublocation",95:"State",100:"CountryCode",101:"Country",103:"OriginalTransmissionReference",105:"Headline",110:"Credit",115:"Source",116:"CopyrightNotice",118:"Contact",120:"Caption",121:"LocalCaption",122:"Writer",125:"RasterizedCaption",130:"ImageType",131:"ImageOrientation",135:"LanguageIdentifier",150:"AudioType",151:"AudioSamplingRate",152:"AudioSamplingResolution",153:"AudioDuration",154:"AudioOutcue",184:"JobID",185:"MasterDocumentID",186:"ShortDocumentID",187:"UniqueDocumentID",188:"OwnerID",200:"ObjectPreviewFileFormat",201:"ObjectPreviewFileVersion",202:"ObjectPreviewData",221:"Prefs",225:"ClassifyState",228:"Similarity
1Index",230:"DocumentNotes",231:"DocumentHistory",232:"ExifCameraInfo",255:"CatalogSets"},e.stringValues={10:{0:"0 (reserved)",1:"1 (most urgent)",2:"2",3:"3",4:"4",5:"5 (normal urgency)",6:"6",7:"7",8:"8 (least urgent)",9:"9 (user-defined priority)"},75:{a:"Morning",b:"Both Morning and Evening",p:"Evening"},131:{L:"Landscape",P:"Portrait",S:"Square"}},e.getText=function(t){var e=this.get(t),i=this.map[t],r=this.stringValues[i];return r?r[e]:String(e)},e.getAll=function(){var t,e,i={};for(t in this)Object.prototype.hasOwnProperty.call(this,t)&&(e=this.tags[t])&&(i[e]=this.getText(e));return i},e.getName=function(t){return this.tags[t]},function(){var t,i=e.tags,r=e.map||{};for(t in i)Object.prototype.hasOwnProperty.call(i,t)&&(r[i[t]]=Number(t))}()})?r.apply(e,a):r)||(t.exports=s)}()},166:(t,e,i)=>{var r,a,s;!function(o){"use strict";a=[i(302),i(630)],void 0===(s="function"==typeof(r=function(t){function e(){}e.prototype.map={ObjectName:5},e.prototype.types={0:"Uint16",200:"Uint16",201:"Uint16",202:"binary"},e.prototype.get=function(t){return this[t]||this[this.map[t]]},t.parseIptcData=function(t,i,r,a,s){if(!s.disableIptc)for(var o,h=i+r;i+8<h;){if(o=i,0x3842494d===t.getUint32(o)&&1028===t.getUint16(o+4)){var l=function(t,e){var i=t.getUint8(e+7);return i%2!=0&&(i+=1),0===i&&(i=4),i}(t,i),c=i+8+l;if(c>h){console.log("Invalid IPTC data: Invalid segment offset.");break}var d=t.getUint16(i+6+l);if(i+d>h){console.log("Invalid IPTC data: Invalid segment size.");break}return a.iptc=new e,s.disableIptcOffsets||(a.iptcOffsets=new e),void function(t,e,i,r,a,s){for(var o,h,l,c,d,u,g=e+i,f=e;f<g;)28===t.getUint8(f)&&2===t.getUint8(f+1)&&(u=t.getUint8(f+2),a&&!a[u]||s&&s[u]||(d=t.getInt16(f+3),o=r.iptc,h=f+5,c="binary"===o.types[u]?new Blob([t.buffer.slice(h,h+d)]):"Uint16"===o.types[u]?t.getUint16(h):function(t,e,i){for(var r="",a=e+i,s=e;s<a;s+=1)r+=String.fromCharCode(t.getUint8(s));return r}(t,h,d),r.iptc[u]=(l=r.iptc[u],void 0===l?c:l instanceof Array?(l.push(c),l):[l,c]),r.iptcOffsets&&(r.iptcOffsets[u]=f))),f+=1}(t,c,d,a,s.includeIptcTags,s.excludeIptcTags||{202:!0})}i+=1}},t.metaDataParsers.jpeg[65517].push(t.parseIptcData),t.IptcMap=e})?r.apply(e,a):r)||(t.exports=s)}()},630:(t,e,i)=>{var r,a,s;!function(o){"use strict";a=[i(302)],void 0===(s="function"==typeof(r=function(t){var e=t.global,i=t.transform,r=e.Blob&&(Blob.prototype.slice||Blob.prototype.webkitSlice||Blob.prototype.mozSlice),a=e.ArrayBuffer&&ArrayBuffer.prototype.slice||function(t,e){e=e||this.byteLength-t;var i=new Uint8Array(this,t,e),r=new Uint8Array(e);return r.set(i),r.buffer},s={jpeg:{65505:[],65517:[]}};function o(i,o,h,l){var c=this;function d(o,d){if(!(e.DataView&&r&&i&&i.size>=12&&"image/jpeg"===i.type))return o(l);var u=h.maxMetaDataSize||262144;t.readFile(r.call(i,0,u),function(t){var e=new DataView(t);if(65496!==e.getUint16(0))return d(Error("Invalid JPEG file: Missing JPEG marker."));for(var i,r,u,g,f=2,p=e.byteLength-4,m=f;f<p&&((i=e.getUint16(f))>=65504&&i<=65519||65534===i);){if(f+(r=e.getUint16(f+2)+2)>e.byteLength){console.log("Invalid JPEG metadata: Invalid segment size.");break}if((u=s.jpeg[i])&&!h.disableMetaDataParsers)for(g=0;g<u.length;g+=1)u[g].call(c,e,f,r,l,h);m=f+=r}!h.disableImageHead&&m>6&&(l.imageHead=a.call(t,0,m)),o(l)},d,"readAsArrayBuffer")||o(l)}return h=h||{},e.Promise&&"function"!=typeof o?(l=h=o||{},new Promise(d)):(l=l||{},d(o,o))}function h(t,e,i){return t&&e&&i?new Blob([i,r.call(t,e.byteLength)],{type:"image/jpeg"}):null}t.transform=function(r,a,s,h,l){t.requiresMetaData(a)?o(h,function(o){o!==l&&(e.console&&console.log(o),o=l),i.call(t,r,a,s,h,o)},a,l=l||{}):i.apply(t,arguments)},t.blobSlice=r,t.bufferSlice=a,t.replaceHead=function(t,i,r){var a={maxMetaDataSize:256,disableMetaDataParsers:!0};if(!r&&e.Promise)return o(t,a).then(function(e){return h(t,e.imageHead,i)});o(t,function(e){r(h(t,e.imageHead,i))},a)},t.parseMetaData=o,t.metaDataParsers=s})?r.apply(e,a):r)||(t.exports=s)}()},922:(t,e,i)=>{var r,a,s;!function(o){"use strict";a=[i(302),i(200),i(630)],void 0===(s="function"==typeof(r=function(t){var e=t.transform,i=t.requiresCanvas,r=t.requiresMetaData,a=t.transformCoordinates,s=t.getTransformedOptions;function o(e,i){var r=e&&e.orientation;return!0===r&&!t.orientation||1===r&&t.orientation||(!i||t.orientation)&&r>1&&r<9}function h(t,e){return t!==e&&(1===t&&e>1&&e<9||t>1&&t<9)}function l(t,e){if(e>1&&e<9)switch(t){case 2:case 4:return e>4;case 5:case 7:return e%2==0;case 6:case 8:return 2===e||4===e||5===e||7===e}return!1}(function(t){if(t.global.document){var e=document.createElement("img");e.onload=function(){if(t.orientation=2===e.width&&3===e.height,t.orientation){var i=t.createCanvas(1,1,!0).getContext("2d");i.drawImage(e,1,1,1,1,0,0,1,1),t.orientationCropBug="255,255,255,255"!==i.getImageData(0,0,1,1).data.toString()}},e.src="data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAIAAwMBEQACEQEDEQH/xABRAAEAAAAAAAAAAAAAAAAAAAAKEAEBAQADAQEAAAAAAAAAAAAGBQQDCAkCBwEBAAAAAAAAAAAAAAAAAAAAABEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8AG8T9NfSMEVMhQvoP3fFiRZ+MTHDifa/95OFSZU5OzRzxkyejv8ciEfhSceSXGjS8eSdLnZc2HDm4M3BxcXwH
1/9k="}})(t),t.requiresCanvas=function(e){return o(e)||i.call(t,e)},t.requiresMetaData=function(e){return o(e,!0)||r.call(t,e)},t.transform=function(i,r,a,s,o){e.call(t,i,r,function(e,i){if(i){var r=t.orientation&&i.exif&&i.exif.get("Orientation");if(r>4&&r<9){var s=i.originalWidth,o=i.originalHeight;i.originalWidth=o,i.originalHeight=s}}a(e,i)},s,o)},t.getTransformedOptions=function(e,i,r){var a=s.call(t,e,i),o=r.exif&&r.exif.get("Orientation"),c=a.orientation,d=t.orientation&&o;if(!0===c&&(c=o),!h(c,d))return a;var u=a.top,g=a.right,f=a.bottom,p=a.left,m={};for(var v in a)Object.prototype.hasOwnProperty.call(a,v)&&(m[v]=a[v]);if(m.orientation=c,(c>4&&!(d>4)||c<5&&d>4)&&(m.maxWidth=a.maxHeight,m.maxHeight=a.maxWidth,m.minWidth=a.minHeight,m.minHeight=a.minWidth,m.sourceWidth=a.sourceHeight,m.sourceHeight=a.sourceWidth),d>1){switch(d){case 2:g=a.left,p=a.right;break;case 3:u=a.bottom,g=a.left,f=a.top,p=a.right;break;case 4:u=a.bottom,f=a.top;break;case 5:u=a.left,g=a.bottom,f=a.right,p=a.top;break;case 6:u=a.left,g=a.top,f=a.right,p=a.bottom;break;case 7:u=a.right,g=a.top,f=a.left,p=a.bottom;break;case 8:u=a.right,g=a.bottom,f=a.left,p=a.top}if(l(c,d)){var y=u,b=g;u=f,g=p,f=y,p=b}}switch(m.top=u,m.right=g,m.bottom=f,m.left=p,c){case 2:m.right=p,m.left=g;break;case 3:m.top=f,m.right=p,m.bottom=u,m.left=g;break;case 4:m.top=f,m.bottom=u;break;case 5:m.top=p,m.right=f,m.bottom=g,m.left=u;break;case 6:m.top=g,m.right=f,m.bottom=p,m.left=u;break;case 7:m.top=g,m.right=u,m.bottom=p,m.left=f;break;case 8:m.top=p,m.right=u,m.bottom=g,m.left=f}return m},t.transformCoordinates=function(e,i,r){a.call(t,e,i,r);var s=i.orientation,o=t.orientation&&r.exif&&r.exif.get("Orientation");if(h(s,o)){var c=e.getContext("2d"),d=e.width,u=e.height,g=d,f=u;switch((s>4&&!(o>4)||s<5&&o>4)&&(e.width=u,e.height=d),s>4&&(g=u,f=d),o){case 2:c.translate(g,0),c.scale(-1,1);break;case 3:c.translate(g,f),c.rotate(Math.PI);break;case 4:c.translate(0,f),c.scale(1,-1);break;case 5:c.rotate(-.5*Math.PI),c.scale(-1,1);break;case 6:c.rotate(-.5*Math.PI),c.translate(-g,0);break;case 7:c.rotate(-.5*Math.PI),c.translate(-g,f),c.scale(1,-1);break;case 8:c.rotate(.5*Math.PI),c.translate(0,-f)}switch(l(s,o)&&(c.translate(g,f),c.rotate(Math.PI)),s){case 2:c.translate(d,0),c.scale(-1,1);break;case 3:c.translate(d,u),c.rotate(Math.PI);break;case 4:c.translate(0,u),c.scale(1,-1);break;case 5:c.rotate(.5*Math.PI),c.scale(1,-1);break;case 6:c.rotate(.5*Math.PI),c.translate(0,-u);break;case 7:c.rotate(.5*Math.PI),c.translate(d,-u),c.scale(-1,1);break;case 8:c.rotate(-.5*Math.PI),c.translate(-d,0)}}}})?r.apply(e,a):r)||(t.exports=s)}()},200:(t,e,i)=>{var r,a,s;!function(o){"use strict";a=[i(302)],void 0===(s="function"==typeof(r=function(t){var e=t.transform;t.createCanvas=function(e,i,r){if(r&&t.global.OffscreenCanvas)return new OffscreenCanvas(e,i);var a=document.createElement("canvas");return a.width=e,a.height=i,a},t.transform=function(i,r,a,s,o){e.call(t,t.scale(i,r,o),r,a,s,o)},t.transformCoordinates=function(){},t.getTransformedOptions=function(t,e){var i,r,a,s,o=e.aspectRatio;if(!o)return e;for(r in i={},e)Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r]);return i.crop=!0,(a=t.naturalWidth||t.width)/(s=t.naturalHeight||t.height)>o?(i.maxWidth=s*o,i.maxHeight=s):(i.maxWidth=a,i.maxHeight=a/o),i},t.drawImage=function(t,e,i,r,a,s,o,h,l){var c=e.getContext("2d");return!1===l.imageSmoothingEnabled?(c.msImageSmoothingEnabled=!1,c.imageSmoothingEnabled=!1):l.imageSmoothingQuality&&(c.imageSmoothingQuality=l.imageSmoothingQuality),c.drawImage(t,i,r,a,s,0,0,o,h),c},t.requiresCanvas=function(t){return t.canvas||t.crop||!!t.aspectRatio},t.scale=function(e,i,r){i=i||{},r=r||{};var a,s,o,h,l,c,d,u,g,f,p,m,v=e.getContext||t.requiresCanvas(i)&&!!t.global.HTMLCanvasElement,y=e.naturalWidth||e.width,b=e.naturalHeight||e.height,C=y,_=b;function S(){var t=Math.max((o||C)/C,(h||_)/_);t>1&&(C*=t,_*=t)}function w(){var t=Math.min((a||C)/C,(s||_)/_);t<1&&(C*=t,_*=t)}if(v&&(d=(i=t.getTransformedOptions(e,i,r)).left||0,u=i.top||0,i.sourceWidth?(l=i.sourceWidth,void 0!==i.right&&void 0===i.left&&(d=y-l-i.right)):l=y-d-(i.right||0),i.sourceHeight?(c=i.sourceHeight,void 0!==i.bottom&&void 0===i.top&&(u=b-c-i.bottom)):c=b-u-(i.bottom||0),C=l,_=c),a=i.maxWidth,s=i.maxHeight,o=i.minWidth,h=i.minHeight,v&&a&&s&&i.crop?(C=a,_=s,(p=l/c-a/s)<0?(c=s*l/a,void 0===i.top&&void 0===i.bottom&&(u=(b-c)/2)):p>0&&(l=a*c/s,void 0===i.left&&void 0===i.right&&(d=(y-l)/2))):((i.contain||i.cover)&&(o=a=a||o,h=s=s||h),i.cover?(w(),S()):(S(),w())),v){if((g=i.pixelRatio)>1&&(!e.style.width||Math.floor(parseFloat(e.style.width,10))!==Math.floor(y/g))&&(C*=g,_*=g),t.orientationCropBug&&!e.getContext&&(d||u||l!==y||c!==b)&&(p=e,e=t.createCanvas(y,b,!0),t.drawImage(p,e,0,0,y,b,y,b,i)),(f=i.downsamplingRatio)>0&&f<1&&C<l&&_<c)for(;l*f>C;)m=t.createCanvas(l*f,c*f,!0),t.drawImage(e,m,d,u,l,c,m.width,m.height,i),d=0,u=0,l=m.width,c=m.height,e=m;return m=t.createCanvas(C,_),t.transformCoordinates(m,i,r),g>1&&(m.style.width=m.width/g+"px"),t.drawImage(e,m,d,u,l,c,C,_,i).setTransform(1,0,0,1,0,0),m}return e.width=C,e.height=_,e}})?r.apply(e,a):r)||(t.exports=s)}()}
1,302:function(t,e,i){var r;!function(a){"use strict";var s=a.URL||a.webkitURL;function o(t){return!!s&&s.createObjectURL(t)}function h(t){return!!s&&s.revokeObjectURL(t)}function l(t,e){!t||"blob:"!==t.slice(0,5)||e&&e.noRevoke||h(t)}function c(t,e,i,r){if(!a.FileReader)return!1;var s=new FileReader;s.onload=function(){e.call(s,this.result)},i&&(s.onabort=s.onerror=function(){i.call(s,this.error)});var o=s[r||"readAsDataURL"];return o?(o.call(s,t),s):void 0}function d(t,e){return Object.prototype.toString.call(e)==="[object "+t+"]"}function u(t,e,i){function r(e,r){var s,h=document.createElement("img");function g(t,i){e!==r?t instanceof Error?r(t):((i=i||{}).image=t,e(i)):e&&e(t,i)}function f(e,r){r&&a.console&&console.log(r),e&&d("Blob",e)?s=o(t=e):(s=t,i&&i.crossOrigin&&(h.crossOrigin=i.crossOrigin)),h.src=s}return h.onerror=function(t){l(s,i),r&&r.call(h,t)},h.onload=function(){l(s,i);var e={originalWidth:h.naturalWidth||h.width,originalHeight:h.naturalHeight||h.height};try{u.transform(h,i,g,t,e)}catch(t){r&&r(t)}},"string"==typeof t?(u.requiresMetaData(i)?u.fetchBlob(t,f,i):f(),h):d("Blob",t)||d("File",t)?(s=o(t))?(h.src=s,h):c(t,function(t){h.src=t},r):void 0}return a.Promise&&"function"!=typeof e?(i=e,new Promise(r)):r(e,e)}u.requiresMetaData=function(t){return t&&t.meta},u.fetchBlob=function(t,e){e()},u.transform=function(t,e,i,r,a){i(t,a)},u.global=a,u.readFile=c,u.isInstanceOf=d,u.createObjectURL=o,u.revokeObjectURL=h,void 0===(r=(function(){return u}).call(e,i,e,t))||(t.exports=r)}("undefined"!=typeof window&&window||this)},918:function(t,e){var i;(function(){var r=function(t){return t instanceof r?t:this instanceof r?void(this.EXIFwrapped=t):new r(t)};t.exports&&(e=t.exports=r),e.EXIF=r;var a=r.Tags={36864:"ExifVersion",40960:"FlashpixVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",37500:"MakerNote",37510:"UserComment",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:"E
1xposureMode",41987:"WhiteBalance",41988:"DigitalZoomRation",41989:"FocalLengthIn35mmFilm",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",40965:"InteroperabilityIFDPointer",42016:"ImageUniqueID"},s=r.TiffTags={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"},o=r.GPSTags={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"},h=r.IFD1Tags={256:"ImageWidth",257:"ImageHeight",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",273:"StripOffsets",274:"Orientation",277:"SamplesPerPixel",278:"RowsPerStrip",279:"StripByteCounts",282:"XResolution",283:"YResolution",284:"PlanarConfiguration",296:"ResolutionUnit",513:"JpegIFOffset",514:"JpegIFByteCount",529:"YCbCrCoefficients",530:"YCbCrSubSampling",531:"YCbCrPositioning",532:"ReferenceBlackWhite"},l=r.StringValues={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"}};function c(t){return!!t.exifdata}function d(t){var e=new DataView(t);if(255!=e.getUint8(0)||216!=e.getUint8(1))return!1;for(var i=2,r=t.byteLength;i<r;){if(255!=e.getUint8(i))return!1;if(225==e.getUint8(i+1))return function(t,e){if("Exif"!=f(t,e,4))return!1;var i,r,c,d,u,p=e+6;if(18761==t.getUint16(p))i=!1;else{if(19789!=t.getUint16(p))return!1;i=!0}if(42!=t.getUint16(p+2,!i))return!1;var m=t.getUint32(p+4,!i);if(m<8)return!1;if((r=g(t,p,p+m,s,i)).ExifIFDPointer)for(c in d=g(t,p,p+r.ExifIFDPointer,a,i)){switch(c){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":d[c]=l[c][d[c]];break;case"ExifVersion":case"FlashpixVersion":d[c]=String.fromCharCode(d[c][0],d[c][1],d[c][2],d[c][3]);break;case"ComponentsConfiguration":d[c]=l.Components[d[c][0]]+l.Components[d[c][1]]+l.Components[d[c][2]]+l.Components[d[c][3]]}r[c]=d[c]}if(r.GPSInfoIFDPointer)for(c in u=g(t,p,p+r.GPSInfoIFDPointer,o,i))"GPSVersionID"===c&&(u[c]=u[c][0]+"."+u[c][1]+"."+u[c][2]+"."+u[c][3]),r[c]=u[c];
1return r.thumbnail=function(t,e,i,r){var a,s,o=(a=e+i,s=t.getUint16(a,!r),t.getUint32(a+2+12*s,!r));if(!o||o>t.byteLength)return{};var l=g(t,e,e+o,h,r);if(l.Compression)switch(l.Compression){case 6:if(l.JpegIFOffset&&l.JpegIFByteCount){var c=e+l.JpegIFOffset,d=l.JpegIFByteCount;l.blob=new Blob([new Uint8Array(t.buffer,c,d)],{type:"image/jpeg"})}break;case 1:console.log("Thumbnail image format is TIFF, which is not implemented.");break;default:console.log("Unknown thumbnail image format '%s'",l.Compression)}else 2==l.PhotometricInterpretation&&console.log("Thumbnail image format is RGB, which is not implemented.");return l}(t,p,m,i),r}(e,i+4,e.getUint16(i+2));i+=2+e.getUint16(i+2)}}var u={120:"caption",110:"credit",25:"keywords",55:"dateCreated",80:"byline",85:"bylineTitle",122:"captionWriter",105:"headline",116:"copyright",15:"category"};function g(t,e,i,r,a){var s,o,h=t.getUint16(i,!a),l={};for(o=0;o<h;o++)s=i+12*o+2,l[r[t.getUint16(s,!a)]]=function(t,e,i,r,a){var s,o,h,l,c,d,u=t.getUint16(e+2,!a),g=t.getUint32(e+4,!a),p=t.getUint32(e+8,!a)+i;switch(u){case 1:case 7:if(1==g)return t.getUint8(e+8,!a);for(s=g>4?p:e+8,o=[],l=0;l<g;l++)o[l]=t.getUint8(s+l);return o;case 2:return f(t,s=g>4?p:e+8,g-1);case 3:if(1==g)return t.getUint16(e+8,!a);for(s=g>2?p:e+8,o=[],l=0;l<g;l++)o[l]=t.getUint16(s+2*l,!a);return o;case 4:if(1==g)return t.getUint32(e+8,!a);for(o=[],l=0;l<g;l++)o[l]=t.getUint32(p+4*l,!a);return o;case 5:if(1==g)return(h=new Number((c=t.getUint32(p,!a))/(d=t.getUint32(p+4,!a)))).numerator=c,h.denominator=d,h;for(o=[],l=0;l<g;l++)c=t.getUint32(p+8*l,!a),d=t.getUint32(p+4+8*l,!a),o[l]=new Number(c/d),o[l].numerator=c,o[l].denominator=d;return o;case 9:if(1==g)return t.getInt32(e+8,!a);for(o=[],l=0;l<g;l++)o[l]=t.getInt32(p+4*l,!a);return o;case 10:if(1==g)return t.getInt32(p,!a)/t.getInt32(p+4,!a);for(o=[],l=0;l<g;l++)o[l]=t.getInt32(p+8*l,!a)/t.getInt32(p+4+8*l,!a);return o}}(t,s,e,0,a);return l}function f(t,e,i){var r="";for(n=e;n<e+i;n++)r+=String.fromCharCode(t.getUint8(n));return r}function p(t){var e={};if(1==t.nodeType){if(t.attributes.length>0){e["@attributes"]={};for(var i=0;i<t.attributes.length;i++){var r=t.attributes.item(i);e["@attributes"][r.nodeName]=r.nodeValue}}}else if(3==t.nodeType)return t.nodeValue;if(t.hasChildNodes())for(var a=0;a<t.childNodes.length;a++){var s=t.childNodes.item(a),o=s.nodeName;if(null==e[o])e[o]=p(s);else{if(null==e[o].push){var h=e[o];e[o]=[],e[o].push(h)}e[o].push(p(s))}}return e}r.enableXmp=function(){r.isXmpEnabled=!0},r.disableXmp=function(){r.isXmpEnabled=!1},r.getData=function(t,e){return!((self.Image&&t instanceof self.Image||self.HTMLImageElement&&t instanceof self.HTMLImageElement)&&!t.complete||(c(t)?e&&e.call(t):function(t,e){function i(i){t.exifdata=d(i)||{},t.iptcdata=function(t){var e,i=new DataView(t);if(255!=i.getUint8(0)||216!=i.getUint8(1))return!1;for(var r=2,a=t.byteLength;r<a;){if(e=r,56===i.getUint8(e)&&66===i.getUint8(e+1)&&73===i.getUint8(e+2)&&77===i.getUint8(e+3)&&4===i.getUint8(e+4)&&4===i.getUint8(e+5)){var s=i.getUint8(r+7);return s%2!=0&&(s+=1),0===s&&(s=4),function(t,e,i){for(var r,a,s,o,h=new DataView(t),l={},c=e;c<e+i;)28===h.getUint8(c)&&2===h.getUint8(c+1)&&(o=h.getUint8(c+2))in u&&(s=h.getInt16(c+3),a=u[o],r=f(h,c+5,s),l.hasOwnProperty(a)?l[a]instanceof Array?l[a].push(r):l[a]=[l[a],r]:l[a]=r),c++;return l}(t,r+8+s,i.getUint16(r+6+s))}r++}}(i)||{},r.isXmpEnabled&&(t.xmpdata=function(t){if("DOMParser"in self){var e=new DataView(t);if(255!=e.getUint8(0)||216!=e.getUint8(1))return!1;for(var i=2,r=t.byteLength,a=new DOMParser;i<r-4;){if("http"==f(e,i,4)){var s=i-1,o=e.getUint16(i-2)-1,h=f(e,s,o),l=h.indexOf("xmpmeta>")+8,c=(h=h.substring(h.indexOf("<x:xmpmeta"),l)).indexOf("x:xmpmeta")+10;return h=h.slice(0,c)+'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.
10/" xmlns:xapGImg="http://ns.adobe.com/xap/1.0/g/img/" xmlns:Iptc4xmpExt="http://iptc.org/std/Iptc4xmpExt/2008-02-29/" '+h.slice(c),function(t){try{var e={};if(t.children.length>0)for(var i=0;i<t.children.length;i++){var r=t.children.item(i),a=r.attributes;for(var s in a){var o=a[s],h=o.nodeName,l=o.nodeValue;void 0!==h&&(e[h]=l)}var c=r.nodeName;if(void 0===e[c])e[c]=p(r);else{if(void 0===e[c].push){var d=e[c];e[c]=[],e[c].push(d)}e[c].push(p(r))}}else e=t.textContent;return e}catch(t){console.log(t.message)}}(a.parseFromString(h,"text/xml"))}i++}}}(i)||{}),e&&e.call(t)}if(t.src)if(/^data\:/i.test(t.src))i(function(t,e){e=e||t.match(/^data\:([^\;]+)\;base64,/im)[1]||"",t=t.replace(/^data\:([^\;]+)\;base64,/gim,"");for(var i=atob(t),r=i.length,a=new ArrayBuffer(r),s=new Uint8Array(a),o=0;o<r;o++)s[o]=i.charCodeAt(o);return a}(t.src));else if(/^blob\:/i.test(t.src)){var a,s;(o=new FileReader).onload=function(t){i(t.target.result)},a=t.src,(s=new XMLHttpRequest).open("GET",a,!0),s.responseType="blob",s.onload=function(t){var e;200!=this.status&&0!==this.status||(e=this.response,o.readAsArrayBuffer(e))},s.send()}else{var o,h=new XMLHttpRequest;h.onload=function(){if(200!=this.status&&0!==this.status)throw"Could not load image";i(h.response),h=null},h.open("GET",t.src,!0),h.responseType="arraybuffer",h.send(null)}else self.FileReader&&(t instanceof self.Blob||t instanceof self.File)&&((o=new FileReader).onload=function(t){i(t.target.result)},o.readAsArrayBuffer(t))}(t,e),0))},r.getTag=function(t,e){if(c(t))return t.exifdata[e]},r.getIptcTag=function(t,e){if(c(t))return t.iptcdata[e]},r.getAllTags=function(t){if(!c(t))return{};var e,i=t.exifdata,r={};for(e in i)i.hasOwnProperty(e)&&(r[e]=i[e]);return r},r.getAllIptcTags=function(t){if(!c(t))return{};
1var e,i=t.iptcdata,r={};for(e in i)i.hasOwnProperty(e)&&(r[e]=i[e]);return r},r.pretty=function(t){if(!c(t))return"";var e,i=t.exifdata,r="";for(e in i)i.hasOwnProperty(e)&&("object"==typeof i[e]?i[e]instanceof Number?r+=e+" : "+i[e]+" ["+i[e].numerator+"/"+i[e].denominator+"]\r\n":r+=e+" : ["+i[e].length+" values]\r\n":r+=e+" : "+i[e]+"\r\n");return r},r.readFromBinaryFile=function(t){return d(t)},void 0===(i=(function(){return r}).apply(e,[]))||(t.exports=i)}).call(this)},297:e=>{"use strict";e.exports=t}},r={};function a(t){if(r[t])return r[t].exports;var i=r[t]={exports:{}};return e[t].call(i.exports,i,i.exports,a),i.exports}a.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return a.d(e,{a:e}),e},a.d=(t,e)=>{for(var i in e)a.o(e,i)&&!a.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),a.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var s={};return(()=>{"use strict";let t;a.r(s),a.d(s,{default:()=>eo});var e=a(297),r=a.n(e),o=Math.PI/180;let h=void 0!==i.g?i.g:"undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope?self:{},l={_global:h,version:"8.3.5",isBrowser:"undefined"!=typeof window&&("[object Window]"===({}).toString.call(window)||"[object global]"===({}).toString.call(window)),isUnminified:/param/.test((function(t){}).toString()),dblClickWindow:400,getAngle:t=>l.angleDeg?t*o:t,enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:"undefined"!=typeof window&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging:()=>l.DD.isDragging,isDragReady:()=>!!l.DD.node,document:h.document,_injectGlobal(t){h.Konva=t}},c=t=>{l[t.prototype.getClassName()]=t};l._injectGlobal(l);class d{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new d(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){var e=this.m;return{x:e[0]*t.x+e[2]*t.y+e[4],y:e[1]*t.x+e[3]*t.y+e[5]}}translate(t,e){return this.m[4]+=this.m[0]*t+this.m[2]*e,this.m[5]+=this.m[1]*t+this.m[3]*e,this}scale(t,e){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=e,this.m[3]*=e,this}rotate(t){var e=Math.cos(t),i=Math.sin(t),r=this.m[0]*e+this.m[2]*i,a=this.m[1]*e+this.m[3]*i,s=-(this.m[0]*i)+this.m[2]*e,o=-(this.m[1]*i)+this.m[3]*e;return this.m[0]=r,this.m[1]=a,this.m[2]=s,this.m[3]=o,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,e){var i=this.m[0]+this.m[2]*e,r=this.m[1]+this.m[3]*e,a=this.m[2]+this.m[0]*t,s=this.m[3]+this.m[1]*t;return this.m[0]=i,this.m[1]=r,this.m[2]=a,this.m[3]=s,this}multiply(t){var e=this.m[0]*t.m[0]+this.m[2]*t.m[1],i=this.m[1]*t.m[0]+this.m[3]*t.m[1],r=this.m[0]*t.m[2]+this.m[2]*t.m[3],a=this.m[1]*t.m[2]+this.m[3]*t.m[3],s=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],o=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=e,this.m[1]=i,this.m[2]=r,this.m[3]=a,this.m[4]=s,this.m[5]=o,this}invert(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),e=this.m[3]*t,i=-this.m[1]*t,r=-this.m[2]*t,a=this.m[0]*t,s=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),o=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=e,this.m[1]=i,this.m[2]=r,this.m[3]=a,this.m[4]=s,this.m[5]=o,this}getMatrix(){return this.m}setAbsolutePosition(t,e){var i=this.m[0],r=this.m[1],a=this.m[2],s=this.m[3],o=this.m[4],h=(i*(e-this.m[5])-r*(t-o))/(i*s-r*a);return this.translate((t-o-a*h)/i,h)}decompose(){var t=this.m[0],e=this.m[1],i=this.m[2],r=this.m[3],a=t*r-e*i;let s={x:this.m[4],y:this.m[5],rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(0!=t||0!=e){var o=Math.sqrt(t*t+e*e);s.rotation=e>0?Math.acos(t/o):-Math.acos(t/o),s.scaleX=o,s.scaleY=a/o,s.skewX=(t*i+e*r)/a,s.skewY=0}
1else if(0!=i||0!=r){var h=Math.sqrt(i*i+r*r);s.rotation=Math.PI/2-(r>0?Math.acos(-i/h):-Math.acos(i/h)),s.scaleX=a/h,s.scaleY=h,s.skewX=0,s.skewY=(t*i+e*r)/a}return s.rotation=b._getRotation(s.rotation),s}}var u=Math.PI/180,g=180/Math.PI,f="Konva error: ",p={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},m=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,v=[];let y="undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||function(t){setTimeout(t,60)},b={_isElement:t=>!(!t||1!=t.nodeType),_isFunction:t=>!!(t&&t.constructor&&t.call&&t.apply),_isPlainObject:t=>!!t&&t.constructor===Object,_isArray:t=>"[object Array]"===Object.prototype.toString.call(t),_isNumber:t=>"[object Number]"===Object.prototype.toString.call(t)&&!isNaN(t)&&isFinite(t),_isString:t=>"[object String]"===Object.prototype.toString.call(t),_isBoolean:t=>"[object Boolean]"===Object.prototype.toString.call(t),isObject:t=>t instanceof Object,isValidSelector(t){if("string"!=typeof t)return!1;var e=t[0];return"#"===e||"."===e||e===e.toUpperCase()},_sign:t=>0===t||t>
10?1:-1,requestAnimFrame(t){v.push(t),1===v.length&&y(function(){let t=v;v=[],t.forEach(function(t){t()})})},createCanvasElement(){var t=document.createElement("canvas");try{t.style=t.style||{}}catch(t){}return t},createImageElement:()=>document.createElement("img"),_isInDocument(t){for(;t=t.parentNode;)if(t==document)return!0;return!1},_urlToImage(t,e){var i=b.createImageElement();i.onload=function(){e(i)},i.src=t},_rgbToHex:(t,e,i)=>(0x1000000+(t<<16)+(e<<8)+i).toString(16).slice(1),_hexToRgb(t){var e=parseInt(t=t.replace("#",""),16);return{r:e>>16&255,g:e>>8&255,b:255&e}},getRandomColor(){for(var t=(0xffffff*Math.random()|0).toString(16);t.length<6;)t="0"+t;return"#"+t},getRGB(t){var e;return t in p?{r:(e=p[t])[0],g:e[1],b:e[2]}:"#"===t[0]?this._hexToRgb(t.substring(1)):"rgb("===t.substr(0,4)?{r:parseInt((e=m.exec(t.replace(/ /g,"")))[1],10),g:parseInt(e[2],10),b:parseInt(e[3],10)}:{r:0,g:0,b:0}},colorToRGBA:t=>(t=t||"black",b._namedColorToRBA(t)||b._hex3ColorToRGBA(t)||b._hex6ColorToRGBA(t)||b._rgbColorToRGBA(t)||b._rgbaColorToRGBA(t)||b._hslColorToRGBA(t)),_namedColorToRBA(t){var e=p[t.toLowerCase()];return e?{r:e[0],g:e[1],b:e[2],a:1}:null},_rgbColorToRGBA(t){if(0===t.indexOf("rgb(")){var e=(t=t.match(/rgb\(([^)]+)\)/)[1]).split(/ *, */).map(Number);return{r:e[0],g:e[1],b:e[2],a:1}}},_rgbaColorToRGBA(t){if(0===t.indexOf("rgba(")){var e=(t=t.match(/rgba\(([^)]+)\)/)[1]).split(/ *, */).map((t,e)=>"%"===t.slice(-1)?3===e?parseInt(t)/100:parseInt(t)/100*255:Number(t));return{r:e[0],g:e[1],b:e[2],a:e[3]}}},_hex6ColorToRGBA(t){if("#"===t[0]&&7===t.length)return{r:parseInt(t.slice(1,3),16),g:parseInt(t.slice(3,5),16),b:parseInt(t.slice(5,7),16),a:1}},_hex3ColorToRGBA(t){if("#"===t[0]&&4===t.length)return{r:parseInt(t[1]+t[1],16),g:parseInt(t[2]+t[2],16),b:parseInt(t[3]+t[3],16),a:1}},_hslColorToRGBA(t){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(t)){let e,i,r,[a,...s]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(t),o=Number(s[0])/360,h=Number(s[1])/100,l=Number(s[2])/100;if(0===h)return{r:Math.round(r=255*l),g:Math.round(r),b:Math.round(r),a:1};e=l<.5?l*(1+h):l+h-l*h;let c=2*l-e,d=[0,0,0];for(let t=0;t<3;t++)(i=o+-(1/3*(t-1)))<0&&i++,i>1&&i--,r=6*i<1?c+6*(e-c)*i:2*i<1?e:3*i<2?c+(e-c)*(2/3-i)*6:c,d[t]=255*r;return{r:Math.round(d[0]),g:Math.round(d[1]),b:Math.round(d[2]),a:1}}},haveIntersection:(t,e)=>!(e.x>t.x+t.width||e.x+e.width<t.x||e.y>t.y+t.height||e.y+e.height<t.y),cloneObject(t){var e={};for(var i in t)this._isPlainObject(t[i])?e[i]=this.cloneObject(t[i]):this._isArray(t[i])?e[i]=this.cloneArray(t[i]):e[i]=t[i];return e},cloneArray:t=>t.slice(0),degToRad:t=>t*u,radToDeg:t=>t*g,_degToRad:t=>(b.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),b.degToRad(t)),_radToDeg:t=>(b.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),b.radToDeg(t)),_getRotation:t=>l.angleDeg?b.radToDeg(t):t,_capitalize:t=>t.charAt(0).toUpperCase()+t.slice(1),throw(t){throw Error(f+t)},error(t){console.error(f+t)},warn(t){l.showWarnings&&console.warn("Konva warning: "+t)},each(t,e){for(var i in t)e(i,t[i])},_inRange:(t,e,i)=>e<=t&&t<i,_getProjectionToSegment(t,e,i,r,a,s){var o,h,l,c=(t-i)*(t-i)+(e-r)*(e-r);if(0==c)o=t,h=e,l=(a-i)*(a-i)+(s-r)*(s-r);else{var d=((a-t)*(i-t)+(s-e)*(r-e))/c;d<0?(o=t,h=e,l=(t-a)*(t-a)+(e-s)*(e-s)):d>1?(o=i,h=r,l=(i-a)*(i-a)+(r-s)*(r-s)):l=((o=t+d*(i-t))-a)*(o-a)+((h=e+d*(r-e))-s)*(h-s)}return[o,h,l]},_getProjectionToLine(t,e,i){var r=b.cloneObject(t),a=Number.MAX_VALUE;return e.forEach(function(s,o){if(i||o!==e.length-1){var h=e[(o+1)%e.length],l=b._getProjectionToSegment(s.x,s.y,h.x,h.y,t.x,t.y),c=l[0],d=l[1],u=l[2];u<a&&(r.x=c,r.y=d,a=u)}}),r},_prepareArrayForTween(t,e,i){var r,a=[],s=[];if(t.length>e.length){var o=e;e=t,t=o}for(r=0;r<t.length;r+=2)a.push({x:t[r],y:t[r+1]});for(r=0;r<e.length;r+=2)s.push({x:e[r],y:e[r+1]});var h=[];return s.forEach(function(t){var e=b._getProjectionToLine(t,a,i);h.push(e.x),h.push(e.y)}),h},_prepareToStringify(t){var e;for(var i in t.visitedByCircularReferenceRemoval=!0,t)if(t.hasOwnProperty(i)&&t[i]&&"object"==typeof t[i]){if
1(e=Object.getOwnPropertyDescriptor(t,i),t[i].visitedByCircularReferenceRemoval||b._isElement(t[i])){if(!e.configurable)return null;delete t[i]}else if(null===b._prepareToStringify(t[i])){if(!e.configurable)return null;delete t[i]}}return delete t.visitedByCircularReferenceRemoval,t},_assign(t,e){for(var i in e)t[i]=e[i];return t},_getFirstPointerId:t=>t.touches?t.changedTouches[0].identifier:t.pointerId||999};function C(t){return b._isString(t)?'"'+t+'"':"[object Number]"===Object.prototype.toString.call(t)||b._isBoolean(t)?t:Object.prototype.toString.call(t)}function _(){if(l.isUnminified)return function(t,e){return b._isNumber(t)||b.warn(C(t)+' is a not valid value for "'+e+'" attribute. The value should be a number.'),t}}function S(){if(l.isUnminified)return function(t,e){return b._isString(t)||b.warn(C(t)+' is a not valid value for "'+e+'" attribute. The value should be a string.'),t}}function w(){if(l.isUnminified)return function(t,e){let i=b._isString(t),r="[object CanvasGradient]"===Object.prototype.toString.call(t)||t&&t.addColorStop;
1return i||r||b.warn(C(t)+' is a not valid value for "'+e+'" attribute. The value should be a string or a native gradient.'),t}}function x(){if(l.isUnminified)return function(t,e){return!0===t||!1===t||b.warn(C(t)+' is a not valid value for "'+e+'" attribute. The value should be a boolean.'),t}}let P={addGetterSetter(t,e,i,r,a){P.addGetter(t,e,i),P.addSetter(t,e,r,a),P.addOverloadedGetterSetter(t,e)},addGetter(t,e,i){var r="get"+b._capitalize(e);t.prototype[r]=t.prototype[r]||function(){var t=this.attrs[e];return void 0===t?i:t}},addSetter(t,e,i,r){var a="set"+b._capitalize(e);t.prototype[a]||P.overWriteSetter(t,e,i,r)},overWriteSetter(t,e,i,r){var a="set"+b._capitalize(e);t.prototype[a]=function(t){return i&&null!=t&&(t=i.call(this,t,e)),this._setAttr(e,t),r&&r.call(this),this}},addComponentsGetterSetter(t,e,i,r,a){var s,o,h=i.length,c=b._capitalize,d="get"+c(e),u="set"+c(e);t.prototype[d]=function(){var t={};for(s=0;s<h;s++)t[o=i[s]]=this.getAttr(e+c(o));return t};var g=function(t){if(l.isUnminified)return function(e,i){return b.isObject(e)||b.warn(C(e)+' is a not val
1id value for "'+i+'" attribute. The value should be an object with properties '+t),e}}(i);t.prototype[u]=function(t){var i,s=this.attrs[e];for(i in r&&(t=r.call(this,t)),g&&g.call(this,t,e),t)t.hasOwnProperty(i)&&this._setAttr(e+c(i),t[i]);return this._fireChangeEvent(e,s,t),a&&a.call(this),this},P.addOverloadedGetterSetter(t,e)},addOverloadedGetterSetter(t,e){var i=b._capitalize(e),r="set"+i,a="get"+i;t.prototype[e]=function(){return arguments.length?(this[r](arguments[0]),this):this[a]()}},addDeprecatedGetterSetter(t,e,i,r){b.error("Adding deprecated "+e);var a="get"+b._capitalize(e),s=e+" property is deprecated and will be removed soon. Look at Konva change log for more information.";t.prototype[a]=function(){b.error(s);var t=this.attrs[e];return void 0===t?i:t},P.addSetter(t,e,r,function(){b.error(s)}),P.addOverloadedGetterSetter(t,e)},backCompat(t,e){b.each(e,function(e,i){var r=t.prototype[i],a="get"+b._capitalize(e),s="set"+b._capitalize(e);function o(){r.apply(this,arguments),b.error('"'+e+'" method is deprecated and will be removed soon. Use ""'+i+'" instead.')}t.prototype[e]=o,t.prototype[a]=o,t.prototype[s]=o})},afterSetFilter(){this._filterUpToDate=!1}};var A,k=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"];class E{constructor(t){this.canvas=t,this._context=t._canvas.getContext("2d"),l.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(t){t.fillEnabled()&&this._fill(t)}_fill(t){}strokeShape(t){t.hasStroke()&&this._stroke(t)}_stroke(t){}fillStrokeShape(t){t.attrs.fillAfterStrokeEnabled?(this.strokeShape(t),this.fillShape(t)):(this.fillShape(t),this.strokeShape(t))}getTrace(t,e){var i,r,a,s,o=this.traceArr,h=o.length,l="";for(i=0;i<h;i++)(a=(r=o[i]).method)?(s=r.args,l+=a,t?l+="()":b._isArray(s[0])?l+="(["+s.join(",")+"])":(e&&(s=s.map(t=>"number"==typeof t?Math.floor(t):t)),l+="("+s.join(",")+")")):(l+=r.property,t||(l+="="+r.val)),l+=";";return l}clearTrace(){this.traceArr=[]}_trace(t){var e=this.traceArr;e.push(t),e.length>=100&&e.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(+t,0,0,+t,0,0)}getCanvas(){return this.canvas}clear(t){var e=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,e.getWidth()/e.pixelRatio,e.getHeight()/e.pixelRatio)}_applyLineCap(t){var e=t.getLineCap();e&&this.setAttr("lineCap",e)}_applyOpacity(t){var e=t.getAbsoluteOpacity();1!==e&&this.setAttr("globalAlpha",e)}_applyLineJoin(t){var e=t.attrs.lineJoin;e&&this.setAttr("lineJoin",e)}setAttr(t,e){this._context[t]=e}arc(t,e,i,r,a,s){this._context.arc(t,e,i,r,a,s)}arcTo(t,e,i,r,a){this._context.arcTo(t,e,i,r,a)}beginPath(){this._context.beginPath()}bezierCurveTo(t,e,i,r,a,s){this._context.bezierCurveTo(t,e,i,r,a,s)}clearRect(t,e,i,r){this._context.clearRect(t,e,i,r)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(t,e){var i=arguments;return 2===i.length?this._context.createImageData(t,e):1===i.length?this._context.createImageData(t):void 0}createLinearGradient(t,e,i,r){return this._context.createLinearGradient(t,e,i,r)}createPattern(t,e){return this._context.createPattern(t,e)}createRadialGradient(t,e,i,r,a,s){return this._context.createRadialGradient(t,e,i,r,a,s)}drawImage(t,e,i,r,a,s,o,h,l){var c=arguments,d=this._context;3===c.length?d.drawImage(t,e,i):5===c.length?d.drawImage(t,e,i,r,a):9===c.length&&d.drawImage(t,e,i,r,a,s,o,h,l)}ellipse(t,e,i,r,a,s,o,h){this._context.ellipse(t,e,i,r,a,s,o,h)}isPointInPath(t,e){return this._context.isPointInPath(t,e)}fill(t){t?this._context.fill(t):this._context.fill()}fillRect(t,e,i,r){this._context.fillRect(t,e,i,r)}strokeRect(t,e,i,r){this._context.strokeRect(t,e,i,r)}fillText(t,e,i,r){r?this._context.fillText(t,e,i,r):this._context.fillText(t,e,i)}measureText(t){return this._context.measureText(t)}
1getImageData(t,e,i,r){return this._context.getImageData(t,e,i,r)}lineTo(t,e){this._context.lineTo(t,e)}moveTo(t,e){this._context.moveTo(t,e)}rect(t,e,i,r){this._context.rect(t,e,i,r)}putImageData(t,e,i){this._context.putImageData(t,e,i)}quadraticCurveTo(t,e,i,r){this._context.quadraticCurveTo(t,e,i,r)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,e){this._context.scale(t,e)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,e,i,r,a,s){this._context.setTransform(t,e,i,r,a,s)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,e,i,r){this._context.strokeText(t,e,i,r)}transform(t,e,i,r,a,s){this._context.transform(t,e,i,r,a,s)}translate(t,e){this._context.translate(t,e)}_enableTrace(){var t,e,i=this,r=k.length,a=this.setAttr,s=function(t){var r,a=i[t];i[t]=function(){return e=function(t){var e,i,r=[],a=t.length;for(e=0;e<a;e++)i=t[e],b._isNumber(i)?i=Math.round(1e3*i)/1e3:b._isString(i)||(i+=""),r.push(i);return r}(Array.prototype.slice.call(arguments,0)),r=a.apply(i,arguments),i._trace({method:t,args:e}),r}};for(t=0;t<r;t++)s(k[t]);i.setAttr=function(){a.apply(i,arguments);var t=arguments[0],e=arguments[1];"shadowOffsetX"!==t&&"shadowOffsetY"!==t&&"shadowBlur"!==t||(e/=this.canvas.getPixelRatio()),i._trace({property:t,val:e})}}_applyGlobalCompositeOperation(t){let e=t.attrs.globalCompositeOperation;e&&"source-over"!==e&&this.setAttr("globalCompositeOperation",e)}}["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled"].forEach(function(t){Object.defineProperty(E.prototype,t,{get(){return this._context[t]},set(e){this._context[t]=e}})});class D extends E{_fillColor(t){var e=t.fill();this.setAttr("fillStyle",e),t._fillFunc(this)}_fillPattern(t){this.setAttr("fillStyle",t._getFillPattern()),t._fillFunc(this)}_fillLinearGradient(t){var e=t._getLinearGradient();e&&(this.setAttr("fillStyle",e),t._fillFunc(this))}_fillRadialGradient(t){var e=t._getRadialGradient();e&&(this.setAttr("fillStyle",e),t._fillFunc(this))}_fill(t){var e=t.fill(),i=t.getFillPriority();if(e&&"color"===i)this._fillColor(t);else{var r=t.getFillPatternImage();if(r&&"pattern"===i)this._fillPattern(t);else{var a=t.getFillLinearGradientColorStops();if(a&&"linear-gradient"===i)this._fillLinearGradient(t);else{var s=t.getFillRadialGradientColorStops();s&&"radial-gradient"===i?this._fillRadialGradient(t):e?this._fillColor(t):r?this._fillPattern(t):a?this._fillLinearGradient(t):s&&this._fillRadialGradient(t)}}}}_strokeLinearGradient(t){var e=t.getStrokeLinearGradientStartPoint(),i=t.getStrokeLinearGradientEndPoint(),r=t.getStrokeLinearGradientColorStops(),a=this.createLinearGradient(e.x,e.y,i.x,i.y);if(r){for(var s=0;s<r.length;s+=2)a.addColorStop(r[s],r[s+1]);this.setAttr("strokeStyle",a)}}_stroke(t){var e=t.dash(),i=t.getStrokeScaleEnabled();if(t.hasStroke()){if(!i){this.save();var r=this.getCanvas().getPixelRatio();this.setTransform(r,0,0,r,0,0)}this._applyLineCap(t),e&&t.dashEnabled()&&(this.setLineDash(e),this.setAttr("lineDashOffset",t.dashOffset())),this.setAttr("lineWidth",t.strokeWidth()),t.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)"),t.getStrokeLinearGradientColorStops()?this._strokeLinearGradient(t):this.setAttr("strokeStyle",t.stroke()),t._strokeFunc(this),i||this.restore()}}_applyShadow(t){var e,i,r,a=null!=(e=t.getShadowRGBA())?e:"black",s=null!=(i=t.getShadowBlur())?i:5,o=null!=(r=t.getShadowOffset())?r:{x:0,y:0},h=t.getAbsoluteScale(),l=this.canvas.getPixelRatio(),c=h.x*l,d=h.y*l;this.setAttr("shadowColor",a),this.setAttr("shadowBlur",s*Math.min(Math.abs(c),Math.abs(d))),this.setAttr("shadowOffsetX",o.x*c),this.setAttr("shadowOffsetY",o.y*d)}}class T extends E{_fill(t){this.save(),this.setAttr("fillStyle",t.colorKey),t._fillFuncHit(this),this.restore(
1)}strokeShape(t){t.hasHitStroke()&&this._stroke(t)}_stroke(t){if(t.hasHitStroke()){var e=t.getStrokeScaleEnabled();if(!e){this.save();var i=this.getCanvas().getPixelRatio();this.setTransform(i,0,0,i,0,0)}this._applyLineCap(t);var r=t.hitStrokeWidth(),a="auto"===r?t.strokeWidth():r;this.setAttr("lineWidth",a),this.setAttr("strokeStyle",t.colorKey),t._strokeFuncHit(this),e||this.restore()}}}class I{constructor(t){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;var e=(t||{}).pixelRatio||l.pixelRatio||function(){if(A)return A;var t=b.createCanvasElement().getContext("2d");return A=(l._global.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)}();this.pixelRatio=e,this._canvas=b.createCanvasElement(),this._canvas.style.padding="0",this._canvas.style.margin="0",this._canvas.style.border="0",this._canvas.style.background="transparent",this._canvas.style.position="absolute",this._canvas.style.top="0",this._canvas.style.left="0"}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(t){var e=this.pixelRatio;this.pixelRatio=t,this.setSize(this.getWidth()/e,this.getHeight()/e)}setWidth(t){this.width=this._canvas.width=t*this.pixelRatio,this._canvas.style.width=t+"px";var e=this.pixelRatio;this.getContext()._context.scale(e,e)}setHeight(t){this.height=this._canvas.height=t*this.pixelRatio,this._canvas.style.height=t+"px";var e=this.pixelRatio;this.getContext()._context.scale(e,e)}getWidth(){return this.width}getHeight(){return this.height}setSize(t,e){this.setWidth(t||0),this.setHeight(e||0)}toDataURL(t,e){try{return this._canvas.toDataURL(t,e)}catch(t){try{return this._canvas.toDataURL()}catch(t){return b.error("Unable to get data URL. "+t.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}}P.addGetterSetter(I,"pixelRatio",void 0,_());class R extends I{constructor(t={width:0,height:0}){super(t),this.context=new D(this),this.setSize(t.width,t.height)}}class L extends I{constructor(t={width:0,height:0}){super(t),this.hitCanvas=!0,this.context=new T(this),this.setSize(t.width,t.height)}}let O={get isDragging(){var G=!1;return O._dragElements.forEach(t=>{"dragging"===t.dragStatus&&(G=!0)}),G},justDragged:!1,get node(){var M;return O._dragElements.forEach(t=>{M=t.node}),M},_dragElements:new Map,_drag(t){let e=[];O._dragElements.forEach((i,r)=>{let{node:a}=i,s=a.getStage();s.setPointersPositions(t),void 0===i.pointerId&&(i.pointerId=b._getFirstPointerId(t));let o=s._changedPointerPositions.find(t=>t.id===i.pointerId);if(o){if("dragging"!==i.dragStatus){var h=a.dragDistance();if(Math.max(Math.abs(o.x-i.startPointerPos.x),Math.abs(o.y-i.startPointerPos.y))<h||(a.startDrag({evt:t}),!a.isDragging()))return}a._setDragPosition(t,i),e.push(a)}}),e.forEach(e=>{e.fire("dragmove",{type:"dragmove",target:e,evt:t},!0)})},_endDragBefore(t){O._dragElements.forEach(e=>{let{node:i}=e,r=i.getStage();if(t&&r.setPointersPositions(t),!r._changedPointerPositions.find(t=>t.id===e.pointerId))return;"dragging"!==e.dragStatus&&"stopped"!==e.dragStatus||(O.justDragged=!0,l._mouseListenClick=!1,l._touchListenClick=!1,l._pointerListenClick=!1,e.dragStatus="stopped");let a=e.node.getLayer()||e.node instanceof l.Stage&&e.node;a&&a.batchDraw()})},_endDragAfter(t){O._dragElements.forEach((e,i)=>{"stopped"===e.dragStatus&&e.node.fire("dragend",{type:"dragend",target:e.node,evt:t},!0),"dragging"!==e.dragStatus&&O._dragElements.delete(i)})}};l.isBrowser&&(window.addEventListener("mouseup",O._endDragBefore,!0),window.addEventListener("touchend",O._endDragBefore,!0),window.addEventListener("mousemove",O._drag),window.addEventListener("touchmove",O._drag),window.addEventListener("mouseup",O._endDragAfter,!1),window.addEventListener("touchend",O._endDragAfter,!1));var F="absoluteOpacity",B="allEventListeners",U="absoluteTransform",j="absoluteScale",H="canvas",N="listening",W="mouseenter",z="mouseleave",Y="Shape",X="stage",V="transform",q="visible";let Q=1;class K{constructor(t){this._id=Q++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===V||t===U)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,e){var i=this._cache.get(t);return(void 0===i||(t===V||t===U)&&!0===i.dirty)&&(i=e.call(this),this._cache.set(t,i)),i}_calculate(t,e,i){if(!this._attachedDepsListeners.get(t)){let i=e.map(t=>t+"Change.konva").join(" ");this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,i)}_getCanvasCache(){return this._cache.get(H)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===U&&this.fire("absoluteTransformChange")}clearCache(){return this._cache.delete(H),this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var e=t||{},i={};void 0!==e.x&&void 0!==e.y&&void 0!==e.width&&void 0!==e.height||(i=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var r=Math.ceil(e.width||i.width),a=Math.ceil(e.height||i.height),s=e.pixelRatio,o=void 0===e.x?Math.floor(i.x):e.x,h=void 0===e.y?Math.floor(i.y):e.y,l=e.offset||0,c=e.drawBorder||!1,d=e.hitCanvasPixelRatio||1;if(r&&a){o-=l,h-=l;var u=new R({pixelRatio:s,width:r+=2*l+1,height:a+=2*l+1}),g=new R({pixelRatio:s,width:0,height:0}),f=new L({pixelRatio:d,width:r,height:a}),p=u.getContext(),m=f.getContext();return f.isCache=!0,u.isCache=!0,this._cache.delete(H),this._filterUpToDate=!1,!1===e.imageSmoothingEnabled&&(u.getContext()._context.
1imageSmoothingEnabled=!1,g.getContext()._context.imageSmoothingEnabled=!1),p.save(),m.save(),p.translate(-o,-h),m.translate(-o,-h),this._isUnderCache=!0,this._clearSelfAndDescendantCache(F),this._clearSelfAndDescendantCache(j),this.drawScene(u,this),this.drawHit(f,this),this._isUnderCache=!1,p.restore(),m.restore(),c&&(p.save(),p.beginPath(),p.rect(0,0,r,a),p.closePath(),p.setAttr("strokeStyle","red"),p.setAttr("lineWidth",5),p.stroke(),p.restore()),this._cache.set(H,{scene:u,filter:g,hit:f,x:o,y:h}),this._requestDraw(),this}b.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.")}isCached(){return this._cache.has(H)}getClientRect(t){throw Error('abstract "getClientRect" method call')}_transformedRect(t,e){var i,r,a,s,o=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],h=this.getAbsoluteTransform(e);return o.forEach(function(t){var e=h.point(t);void 0===i&&(i=a=e.x,r=s=e.y),i=Math.min(i,e.x),r=Math.min(r,e.y),a=Math.max(a,e.x),s=Math.max(s,e.y)}),{x:i,y:r,width:a-i,height:s-r}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);let e=this._getCanvasCache();t.translate(e.x,e.y);var i=this._getCachedSceneCanvas(),r=i.pixelRatio;t.drawImage(i._canvas,0,0,i.width/r,i.height/r),t.restore()}_drawCachedHitCanvas(t){var e=this._getCanvasCache(),i=e.hit;t.save(),t.translate(e.x,e.y),t.drawImage(i._canvas,0,0,i.width/i.pixelRatio,i.height/i.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t,e,i,r,a=this.filters(),s=this._getCanvasCache(),o=s.scene,h=s.filter,l=h.getContext();if(a){if(!this._filterUpToDate){var c=o.pixelRatio;h.setSize(o.width/o.pixelRatio,o.height/o.pixelRatio);try{for(t=a.length,l.clear(),l.drawImage(o._canvas,0,0,o.getWidth()/c,o.getHeight()/c),e=l.getImageData(0,0,h.getWidth(),h.getHeight()),i=0;i<t;i++)"function"==typeof(r=a[i])?(r.call(this,e),l.putImageData(e,0,0)):b.error("Filter should be type of function, but got "+typeof r+" instead. Please check correct filters")}catch(t){b.error("Unable to apply filter. "+t.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}this._filterUpToDate=!0}return h}return o}on(t,e){if(this._cache&&this._cache.delete(B),3==arguments.length)return this._delegate.apply(this,arguments);var i,r,a,s,o=t.split(" "),h=o.length;for(i=0;i<h;i++)a=(r=o[i].split("."))[0],s=r[1]||"",this.eventListeners[a]||(this.eventListeners[a]=[]),this.eventListeners[a].push({name:s,handler:e});return this}off(t,e){var i,r,a,s,o,h=(t||"").split(" "),l=h.length;if(this._cache&&this._cache.delete(B),!t)for(r in this.eventListeners)this._off(r);for(i=0;i<l;i++)if(s=(a=h[i].split("."))[0],o=a[1],s)this.eventListeners[s]&&this._off(s,o,e);else for(r in this.eventListeners)this._off(r,o,e);return this}dispatchEvent(t){var e={target:this,type:t.type,evt:t};return this.fire(t.type,e),this}addEventListener(t,e){return this.on(t,function(t){e.call(this,t.evt)}),this}removeEventListener(t){return this.off(t),this}_delegate(t,e,i){var r=this;this.on(t,function(t){for(var a=t.target.findAncestors(e,!0,r),s=0;s<a.length;s++)(t=b.cloneObject(t)).currentTarget=a[s],i.call(a[s],t)})}
1remove(){return this.isDragging()&&this.stopDrag(),O._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(U),this._clearSelfAndDescendantCache(F),this._clearSelfAndDescendantCache(j),this._clearSelfAndDescendantCache(X),this._clearSelfAndDescendantCache(q),this._clearSelfAndDescendantCache(N)}_remove(){this._clearCaches();var t=this.getParent();t&&t.children&&(t.children.splice(this.index,1),t._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this}getAttr(t){var e="get"+b._capitalize(t);return b._isFunction(this[e])?this[e]():this.attrs[t]}getAncestors(){for(var t=this.getParent(),e=[];t;)e.push(t),t=t.getParent();return e}getAttrs(){return this.attrs||{}}setAttrs(t){return this._batchTransformChanges(()=>{var e,i;if(!t)return this;for(e in t)"children"!==e&&(i="set"+b._capitalize(e),b._isFunction(this[i])?this[i](t[e]):this._setAttr(e,t[e]))}),this}isListening(){return this._getCache(N,this._isListening)}_isListening(t){if(!this.listening())return!1;let e=this.getParent();return!e||e===t||this===t||e._isListening(t)}isVisible(){return this._getCache(q,this._isVisible)}_isVisible(t){if(!this.visible())return!1;let e=this.getParent();return!e||e===t||this===t||e._isVisible(t)}shouldDrawHit(t,e=!1){if(t)return this._isVisible(t)&&this._isListening(t);var i=this.getLayer(),r=!1;O._dragElements.forEach(t=>{"dragging"===t.dragStatus&&("Stage"===t.node.nodeType||t.node.getLayer()===i)&&(r=!0)});var a=!e&&!l.hitOnDragEnabled&&r;return this.isListening()&&this.isVisible()&&!a}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t,e,i,r,a=this.getDepth(),s=this,o=0;return"Stage"!==s.nodeType&&function h(l){for(t=[],e=l.length,i=0;i<e;i++)r=l[i],o++,r.nodeType!==Y&&(t=t.concat(r.getChildren().slice())),r._id===s._id&&(i=e);t.length>0&&t[0].getDepth()<=a&&h(t)}(s.getStage().getChildren()),o}getDepth(){for(var t=0,e=this.parent;e;)t++,e=e.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(V),this._clearSelfAndDescendantCache(U)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var e=this.getAbsoluteTransform().copy();return e.invert(),e.point(t)}getAbsolutePosition(t){let e=!1,i=this.parent;for(;i;){if(i.isCached()){e=!0;break}i=i.parent}e&&!t&&(t=!0);var r=this.getAbsoluteTransform(t).getMatrix(),a=new d,s=this.offset();return a.m=r.slice(),a.translate(s.x,s.y),a.getTranslation()}setAbsolutePosition(t){var e=this._clearTransform();this.attrs.x=e.x,this.attrs.y=e.y,delete e.x,delete e.y,this._clearCache(V);var i=this._getAbsoluteTransform().copy();return i.invert(),i.translate(t.x,t.y),t={x:this.attrs.x+i.getTranslation().x,y:this.attrs.y+i.getTranslation().y},this._setTransform(e),this.setPosition({x:t.x,y:t.y}),this._clearCache(V),this._clearSelfAndDescendantCache(U),this}_setTransform(t){var e;for(e in t)this.attrs[e]=t[e]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var e=t.x,i=t.y,r=this.x(),a=this.y();return void 0!==e&&(r+=e),void 0!==i&&(a+=i),this.setPosition({x:r,y:a}),this}_eachAncestorReverse(t,e){var i,r,a=[],s=this.getParent();if(!e||e._id!==this._id){for(a.unshift(this);s&&(!e||s._id!==e._id);)a.unshift(s),s=s.parent;for(i=a.length,r=0;r<i;r++)t(a[r])}}rotate(t){return this.rotation(this.rotation()+t),this}moveToTop(){if(!this.parent)return b.warn("Node has no parent. moveToTop function is ignored."),!1;var t=this.index;return t<this.parent.getChildren().length-1&&(this.parent.children.splice(t,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0)}moveUp(){if(!this.parent)return b.warn("Node has no parent. moveUp function is ignored."),!1;var t=this.index;return t<this.parent.getChildren().length-1&&(this.parent.children.splice(t,1),this.parent.children.splice(t+1,0,this),this.parent._setChildrenIndices(),!0)}moveDown(){if(!this.parent)return b.warn("Node has no parent. moveDown function is ignored."),!1;var t=this.index;return t>0&&(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0)}moveToBottom(){if(!this.parent)return b.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0&&(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0)}setZIndex(t){if(!this.parent)return b.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&b.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var e=this.index;return this.parent.children.splice(e,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(F,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),e=this.getParent();return e&&!e._isUnderCache&&(t*=e.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t,e,i,r,a={},s=this.getAttrs();for(t in a.attrs={},s)e=s[t],(!b.isObject(e)||b._isPlainObject(e)||b._isArray(e))&&(i="function"==typeof this[t]&&this[t],delete s[t],r=i?i.call(this):null,s[t]=e,r!==e&&(a.attrs[t]=e));return a.className=this.getClassName(),b._prepareToStringify(a)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,e,i){var r=[];e&&this._isMatch(t)&&r.push(this);for(var a=this.parent;a&&a!==i;)a._isMatch(t)&&r.push(a),a=a.parent;return r}isAncestorOf(t){return!1}
1findAncestor(t,e,i){return this.findAncestors(t,e,i)[0]}_isMatch(t){if(!t)return!1;if("function"==typeof t)return t(this);var e,i,r=t.replace(/ /g,"").split(","),a=r.length;for(e=0;e<a;e++)if(i=r[e],b.isValidSelector(i)||(b.warn('Selector "'+i+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),b.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),b.warn("Konva is awesome, right?")),"#"===i.charAt(0)){if(this.id()===i.slice(1))return!0}else if("."===i.charAt(0)){if(this.hasName(i.slice(1)))return!0}else if(this.className===i||this.nodeType===i)return!0;return!1}getLayer(){var t=this.getParent();return t?t.getLayer():null}getStage(){return this._getCache(X,this._getStage)}_getStage(){var t=this.getParent();return t?t.getStage():void 0}fire(t,e={},i){return e.target=e.target||this,i?this._fireAndBubble(t,e):this._fire(t,e),this}getAbsoluteTransform(t){return t?this._getAbsoluteTransform(t):this._getCache(U,this._getAbsoluteTransform)}_getAbsoluteTransform(t){if(t)return e=new d,this._eachAncestorReverse(function(t){var i=t.transformsEnabled();"all"===i?e.multiply(t.getTransform()):"position"===i&&e.translate(t.x()-t.offsetX(),t.y()-t.offsetY())},t),e;e=this._cache.get(U)||new d,this.parent?this.parent.getAbsoluteTransform().copyInto(e):e.reset();var e,i=this.transformsEnabled();if("all"===i)e.multiply(this.getTransform());else if("position"===i){let t=this.attrs.x||0,i=this.attrs.y||0,r=this.attrs.offsetX||0,a=this.attrs.offsetY||0;e.translate(t-r,i-a)}return e.dirty=!1,e}getAbsoluteScale(t){for(var e=this;e;)e._isUnderCache&&(t=e),e=e.getParent();let i=this.getAbsoluteTransform(t).decompose();return{x:i.scaleX,y:i.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(V,this._getTransform)}_getTransform(){var t,e,i=this._cache.get(V)||new d;i.reset();var r=this.x(),a=this.y(),s=l.getAngle(this.rotation()),o=null!=(t=this.attrs.scaleX)?t:1,h=null!=(e=this.attrs.scaleY)?e:1,c=this.attrs.skewX||0,u=this.attrs.skewY||0,g=this.attrs.offsetX||0,f=this.attrs.offsetY||0;return 0===r&&0===a||i.translate(r,a),0!==s&&i.rotate(s),0===c&&0===u||i.skew(c,u),1===o&&1===h||i.scale(o,h),0===g&&0===f||i.translate(-1*g,-1*f),i.dirty=!1,i}clone(t){var e,i,r,a,s,o=b.cloneObject(this.attrs);for(e in t)o[e]=t[e];var h=new this.constructor(o);for(e in this.eventListeners)for(r=(i=this.eventListeners[e]).length,a=0;a<r;a++)0>(s=i[a]).name.indexOf("konva")&&(h.eventListeners[e]||(h.eventListeners[e]=[]),h.eventListeners[e].push(s));return h}_toKonvaCanvas(t){t=t||{};var e=this.getClientRect(),i=this.getStage(),r=void 0!==t.x?t.x:Math.floor(e.x),a=void 0!==t.y?t.y:Math.floor(e.y),s=t.pixelRatio||1,o=new R({width:t.width||Math.ceil(e.width)||(i?i.width():0),height:t.height||Math.ceil(e.height)||(i?i.height():0),pixelRatio:s}),h=o.getContext();return h.save(),(r||a)&&h.translate(-1*r,-1*a),this.drawScene(o),h.restore(),o}toCanvas(t){return this._toKonvaCanvas(t)._canvas}toDataURL(t){var e=(t=t||{}).mimeType||null,i=t.quality||null,r=this._toKonvaCanvas(t).toDataURL(e,i);return t.callback&&t.callback(r),r}toImage(t){if(!t||!t.callback)throw"callback required for toImage method config argument";var e=t.callback;delete t.callback,b._urlToImage(this.toDataURL(t),function(t){e(t)})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return void 0!==this.attrs.dragDistance?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():l.dragDistance}_off(t,e,i){var r,a,s,o=this.eventListeners[t];for(r=0;r<o.length;r++)if(a=o[r].name,s=o[r].handler,!("konva"===a&&"konva"!==e||e&&a!==e||i&&i!==s)){if(o.splice(r,1),0===o.length){delete this.eventListeners[t];break}r--}}_fireChangeEvent(t,e,i){this._fire(t+"Change",{oldVal:e,newVal:i})}addName(t){if(!this.hasName(t)){var e=this.name();this.name(e?e+" "+t:t)}return this}hasName(t){if(!t)return!1;let e=this.name();return!!e&&-1!==(e||"").split(/\s/g).indexOf(t)}removeName(t){var e=(this.name()||"").split(/\s/g),i=e.indexOf(t);return -1!==i&&(e.splice(i,1),this.name(e.join(" "))),this}setAttr(t,e){var i=this["set"+b._capitalize(t)];return b._isFunction(i)?i.call(this,e):this._setAttr(t,e),this}_requestDraw(){if(l.autoDrawEnabled){let t=this.getLayer()||this.get
1Stage();null==t||t.batchDraw()}}_setAttr(t,e){var i=this.attrs[t];(i!==e||b.isObject(e))&&(null==e?delete this.attrs[t]:this.attrs[t]=e,this._shouldFireChangeEvents&&this._fireChangeEvent(t,i,e),this._requestDraw())}_setComponentAttr(t,e,i){var r;void 0!==i&&((r=this.attrs[t])||(this.attrs[t]=this.getAttr(t)),this.attrs[t][e]=i,this._fireChangeEvent(t,r,i))}_fireAndBubble(t,e,i){if(e&&this.nodeType===Y&&(e.target=this),t!==W&&t!==z||!(i&&(this===i||this.isAncestorOf&&this.isAncestorOf(i))||"Stage"===this.nodeType&&!i)){this._fire(t,e);var r=(t===W||t===z)&&i&&i.isAncestorOf&&i.isAncestorOf(this)&&!i.isAncestorOf(this.parent);(e&&!e.cancelBubble||!e)&&this.parent&&this.parent.isListening()&&!r&&(i&&i.parent?this._fireAndBubble.call(this.parent,t,e,i):this._fireAndBubble.call(this.parent,t,e))}}_getProtoListeners(t){let e=this._cache.get(B);if(!e){e={};let t=Object.getPrototypeOf(this);for(;t;)if(t.eventListeners){for(var i in t.eventListeners){let r=t.eventListeners[i],a=e[i]||[];e[i]=r.concat(a)}t=Object.getPrototypeOf(t)}else t=Object.getPrototypeOf(t);this._cache.set(B,e)}return e[t]}_fire(t,e){(e=e||{}).currentTarget=this,e.type=t;let i=this._getProtoListeners(t);if(i)for(var r=0;r<i.length;r++)i[r].handler.call(this,e);let a=this.eventListeners[t];if(a)for(r=0;r<a.length;r++)a[r].handler.call(this,e)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(t){var e=t?t.pointerId:void 0,i=this.getStage(),r=this.getAbsolutePosition(),a=i._getPointerById(e)||i._changedPointerPositions[0]||r;O._dragElements.set(this._id,{node:this,startPointerPos:a,offset:{x:a.x-r.x,y:a.y-r.y},dragStatus:"ready",pointerId:e})}startDrag(t,e=!0){O._dragElements.has(this._id)||this._createDragElement(t),O._dragElements.get(this._id).dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:t&&t.evt},e)}_setDragPosition(t,e){let i=this.getStage()._getPointerById(e.pointerId);if(i){var r={x:i.x-e.offset.x,y:i.y-e.offset.y},a=this.dragBoundFunc();if(void 0!==a){let e=a.call(this,r,t);e?r=e:b.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}this._lastPos&&this._lastPos.x===r.x&&this._lastPos.y===r.y||(this.setAbsolutePosition(r),this._requestDraw()),this._lastPos=r}}stopDrag(t){let e=O._dragElements.get(this._id);e&&(e.dragStatus="stopped"),O._endDragBefore(t),O._endDragAfter(t)}setDraggable(t){this._setAttr("draggable",t),this._dragChange()}isDragging(){let t=O._dragElements.get(this._id);return!!t&&"dragging"===t.dragStatus}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",function(t){if((void 0===t.evt.button||l.dragButtons.indexOf(t.evt.button)>=0)&&!this.isDragging()){var e=!1;O._dragElements.forEach(t=>{this.isAncestorOf(t.node)&&(e=!0)}),e||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{if(this._dragCleanup(),!this.getStage())return;let t=O._dragElements.get(this._id),e=t&&"dragging"===t.dragStatus,i=t&&"ready"===t.dragStatus;
1e?this.stopDrag():i&&O._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){let e=this.getStage();if(!e)return!1;let i={x:-t.x,y:-t.y,width:e.width()+2*t.x,height:e.height()+2*t.y};return b.haveIntersection(i,this.getClientRect())}static create(t,e){return b._isString(t)&&(t=JSON.parse(t)),this._createNode(t,e)}static _createNode(t,e){var i,r,a,s=K.prototype.getClassName.call(t),o=t.children;if(e&&(t.attrs.container=e),l[s]||(b.warn('Can not find a node with class name "'+s+'". Fallback to "Shape".'),s="Shape"),i=new(0,l[s])(t.attrs),o)for(r=o.length,a=0;a<r;a++)i.add(K._createNode(o[a]));return i}}K.prototype.nodeType="Node",K.prototype._attrsAffectingSize=[],K.prototype.eventListeners={},K.prototype.on.call(K.prototype,"xChange.konva yChange.konva scaleXChange.konva scaleYChange.konva skewXChange.konva skewYChange.konva rotationChange.konva offsetXChange.konva offsetYChange.konva transformsEnabledChange.konva",function(){this._batchingTransformChange?this._needClearTransformCache=!0:(this._clearCache(V),this._clearSelfAndDescendantCache(U))}),K.prototype.on.call(K.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(q)}),K.prototype.on.call(K.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(N)}),K.prototype.on.call(K.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(F)});let J=P.addGetterSetter;J(K,"zIndex"),J(K,"absolutePosition"),J(K,"position"),J(K,"x",0,_()),J(K,"y",0,_()),J(K,"globalCompositeOperation","source-over",S()),J(K,"opacity",1,_()),J(K,"name","",S()),J(K,"id","",S()),J(K,"rotation",0,_()),P.addComponentsGetterSetter(K,"scale",["x","y"]),J(K,"scaleX",1,_()),J(K,"scaleY",1,_()),P.addComponentsGetterSetter(K,"skew",["x","y"]),J(K,"skewX",0,_()),J(K,"skewY",0,_()),P.addComponentsGetterSetter(K,"offset",["x","y"]),J(K,"offsetX",0,_()),J(K,"offsetY",0,_()),J(K,"dragDistance",null,_()),J(K,"width",0,_()),J(K,"height",0,_()),J(K,"listening",!0,x()),J(K,"preventDefault",!0,x()),J(K,"filters",null,function(t){return this._filterUpToDate=!1,t}),J(K,"visible",!0,x()),J(K,"transformsEnabled","all",S()),J(K,"size"),J(K,"dragBoundFunc"),J(K,"draggable",!1,x()),P.backCompat(K,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"});class Z extends K{constructor(){super(...arguments),this.children=[]}getChildren(t){if(!t)return this.children||[];let e=this.children||[];var i=[];return e.forEach(function(e){t(e)&&i.push(e)}),i}hasChildren(){return this.getChildren().length>0}
1removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.add(arguments[e]);return this}var i=t[0];return i.getParent()?i.moveTo(this):(this._validateAdd(i),i.index=this.getChildren().length,i.parent=this,i._clearCaches(),this.getChildren().push(i),this._fire("add",{child:i}),this._requestDraw()),this}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(t){return this._generalFind(t,!1)}findOne(t){var e=this._generalFind(t,!0);return e.length>0?e[0]:void 0}_generalFind(t,e){var i=[];return this._descendants(r=>{let a=r._isMatch(t);return a&&i.push(r),!(!a||!e)}),i}_descendants(t){for(let e of this.getChildren())if(t(e)||e.hasChildren()&&e._descendants(t))return!0;return!1}toObject(){var t=K.prototype.toObject.call(this);
1return t.children=[],this.getChildren().forEach(e=>{t.children.push(e.toObject())}),t}isAncestorOf(t){for(var e=t.getParent();e;){if(e._id===this._id)return!0;e=e.getParent()}return!1}clone(t){var e=K.prototype.clone.call(this,t);return this.getChildren().forEach(function(t){e.add(t.clone())}),e}getAllIntersections(t){var e=[];return this.find("Shape").forEach(function(i){i.isVisible()&&i.intersects(t)&&e.push(i)}),e}_clearSelfAndDescendantCache(t){var e;super._clearSelfAndDescendantCache(t),this.isCached()||null==(e=this.children)||e.forEach(function(e){e._clearSelfAndDescendantCache(t)})}_setChildrenIndices(){var t;null==(t=this.children)||t.forEach(function(t,e){t.index=e}),this._requestDraw()}drawScene(t,e){var i=this.getLayer(),r=t||i&&i.getCanvas(),a=r&&r.getContext(),s=this._getCanvasCache(),o=s&&s.scene,h=r&&r.isCache;if(!this.isVisible()&&!h)return this;if(o){a.save();var l=this.getAbsoluteTransform(e).getMatrix();a.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedSceneCanvas(a),a.restore()}else this._drawChildren("drawScene",r,e);return this}drawHit(t,e){if(!this.shouldDrawHit(e))return this;var i=this.getLayer(),r=t||i&&i.hitCanvas,a=r&&r.getContext(),s=this._getCanvasCache();if(s&&s.hit){a.save();var o=this.getAbsoluteTransform(e).getMatrix();a.transform(o[0],o[1],o[2],o[3],o[4],o[5]),this._drawCachedHitCanvas(a),a.restore()}else this._drawChildren("drawHit",r,e);return this}_drawChildren(t,e,i){var r,a=e&&e.getContext(),s=this.clipWidth(),o=this.clipHeight(),h=this.clipFunc(),l=s&&o||h;let c=i===this;if(l){a.save();var d=this.getAbsoluteTransform(i),u=d.getMatrix();if(a.transform(u[0],u[1],u[2],u[3],u[4],u[5]),a.beginPath(),h)h.call(this,a,this);else{var g=this.clipX(),f=this.clipY();a.rect(g,f,s,o)}a.clip(),u=d.copy().invert().getMatrix(),a.transform(u[0],u[1],u[2],u[3],u[4],u[5])}var p=!c&&"source-over"!==this.globalCompositeOperation()&&"drawScene"===t;p&&(a.save(),a._applyGlobalCompositeOperation(this)),null==(r=this.children)||r.forEach(function(r){r[t](e,i)}),p&&a.restore(),l&&a.restore()}getClientRect(t){var e,i,r,a,s,o,h=(t=t||{}).skipTransform,l=t.relativeTo,c=this;null==(e=this.children)||e.forEach(function(e){if(e.visible()){var o=e.getClientRect({relativeTo:c,skipShadow:t.skipShadow,skipStroke:t.skipStroke});0===o.width&&0===o.height||(void 0===i?(i=o.x,r=o.y,a=o.x+o.width,s=o.y+o.height):(i=Math.min(i,o.x),r=Math.min(r,o.y),a=Math.max(a,o.x+o.width),s=Math.max(s,o.y+o.height)))}});for(var d=this.find("Shape"),u=!1,g=0;g<d.length;g++)if(d[g]._isVisible(this)){u=!0;break}return o=u&&void 0!==i?{x:i,y:r,width:a-i,height:s-r}:{x:0,y:0,width:0,height:0},h?o:this._transformedRect(o,l)}}P.addComponentsGetterSetter(Z,"clip",["x","y","width","height"]),P.addGetterSetter(Z,"clipX",void 0,_()),P.addGetterSetter(Z,"clipY",void 0,_()),P.addGetterSetter(Z,"clipWidth",void 0,_()),P.addGetterSetter(Z,"clipHeight",void 0,_()),P.addGetterSetter(Z,"clipFunc");let $=new Map,tt=void 0!==l._global.PointerEvent;function te(t){return{evt:t,pointerId:t.pointerId}}function ti(t,e){tr(t),e.getStage()&&($.set(t,e),tt&&e._fire("gotpointercapture",te(new PointerEvent("gotpointercapture"))))}function tr(t,e){let i=$.get(t);if(!i)return;let r=i.getStage();r&&r.content,$.delete(t),tt&&i._fire("lostpointercapture",te(new PointerEvent("lostpointercapture")))}var ta="mouseleave",tn="mouseover",ts="mouseenter",to="mousemove",th="mousedown",tl="mou
1seup",tc="pointermove",td="pointerdown",tu="pointerup",tg="pointercancel",tf="pointerout",tp="pointerleave",tm="pointerover",tv="pointerenter",ty="contextmenu",tb="touchstart",tC="touchend",t_="touchmove",tS="touchcancel",tw="wheel",tx=[[ts,"_pointerenter"],[th,"_pointerdown"],[to,"_pointermove"],[tl,"_pointerup"],[ta,"_pointerleave"],[tb,"_pointerdown"],[t_,"_pointermove"],[tC,"_pointerup"],[tS,"_pointercancel"],[tn,"_pointerover"],[tw,"_wheel"],[ty,"_contextmenu"],[td,"_pointerdown"],[tc,"_pointermove"],[tu,"_pointerup"],[tg,"_pointercancel"],["lostpointercapture","_lostpointercapture"]];let tP={[tf]:"mouseout",[tp]:ta,[tm]:tn,[tv]:ts,[tc]:to,[td]:th,[tu]:tl,[tg]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},tA={[tf]:"touchout",[tp]:"touchleave",[tm]:"touchover",[tv]:"touchenter",[tc]:t_,[td]:tb,[tu]:tC,[tg]:tS,pointerclick:"tap",pointerdblclick:"dbltap"},tk={[tf]:tf,[tp]:tp,[tm]:tm,[tv]:tv,[tc]:tc,[td]:td,[tu]:tu,[tg]:tg,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"},tE=t=>t.indexOf("pointer")>=0?"pointer":t.indexOf("touch")>=0?"touch":"mouse",tD=t=>{let e=tE(t);return"pointer"===e?l.pointerEventsEnabled&&tk:"touch"===e?tA:"mouse"===e?tP:void 0};function tT(t={}){return(t.clipFunc||t.clipWidth||t.clipHeight)&&b.warn("Stage does not support clipping. Please use clip for Layers or Groups."),t}let tI=[];class tR extends Z{constructor(t){super(tT(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),tI.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{tT(this.attrs)}),this._checkVisibility()}_validateAdd(t){let e="Layer"===t.getType(),i="FastLayer"===t.getType();e||i||b.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;let t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if("string"==typeof t){if("."===t.charAt(0)){var e,i=t.slice(1);t=document.getElementsByClassName(i)[0]}else e="#"!==t.charAt(0)?t:t.slice(1),t=document.getElementById(e);if(!t)throw"Can not find container in document with id "+e}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t,e=this.children,i=e.length;for(t=0;t<i;t++)e[t].clear();return this}clone(t){return t||(t={}),t.container="undefined"!=typeof document&&document.createElement("div"),Z.prototype.clone.call(this,t)}destroy(){super.destroy();var t=this.content;t&&b._isInDocument(t)&&this.container().removeChild(t);var e=tI.indexOf(this);return e>-1&&tI.splice(e,1),this}getPointerPosition(){let t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(b.warn("Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);"),null)}_getPointerById(t){return this._pointerPositions.find(e=>e.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){(t=t||{}).x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var e=new R({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),i=e.getContext()._context,r=this.children;return(t.x||t.y)&&i.translate(-1*t.x,-1*t.y),r.forEach(function(e){if(e.isVisible()){var r=e._toKonvaCanvas(t);i.drawImage(r._canvas,t.x,t.y,r.getWidth()/r.getPixelRatio(),r.getHeight()/r.getPixelRatio())}}),e}getIntersection(t){if(!t)return null;var e,i=this.children;for(e=i.length-1;e>=0;e--){let r=i[e].getIntersection(t);if(r)return r}return null}_resizeDOM(){var t=this.width(),e=this.height();this.content&&(this.content.style.width=t+"px",this.content.style.height=e+"px"),this.bufferCanvas.setSize(t,e),this.bufferHitCanvas.setSize(t,e),this.children.forEach(i=>{i.setSize({width:t,height:e}),i.draw()})}add(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.add(arguments[e]);return this}super.add(t);var i=this.children.length;return i>5&&b.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),l.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return $.get(t)===this}setPointerCapture(t){ti(t,this)}releaseCapture(t){tr(t)}getLayers(){return this.children}_bindContentEvents(){l.isBrowser&&tx.forEach(([t,e])=>{this.content.addEventListener(t,t=>{this[e](t)})})}_pointerenter(t){this.setPointersPositions(t);let e=tD(t.type);this._fire(e.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);let e=tD(t.type);this._fire(e.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let e=this[t+"targetShape"];return e&&!e.getStage()&&(e=null),e}_pointerleave(t){let e=tD(t.type),i=tE(t.type);if(e){this.setPointersPositions(t);var r=this._getTargetShape(i),a=!O.isDragging||l.hitOnDragEnabled;r&&a?(r._fireAndBubble(e.pointerout,{evt:t}),r._fireAndBubble(e.pointerleave,{evt:t}),this._fire(e.pointerleave,{evt:t,target:this,currentTarget:this}),this[i+"targetShape"]=null):a&&(this._fire(e.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(e.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){let e=tD(t.type),i=tE(t.type);if(e){this.setPointersPositions(t);var r=!1;this._changedPointerPositions.forEach(a=>{var s=this.getIntersection(a);if(O.justDragged=!1,l["_"+i+"ListenClick"]=!0,!s||!s.isListening())return;l.capturePointerEventsEnabled&&s.setPointerCapture(a.id),this[i+"ClickStartShape"]=s,s._fireAndBubble(e.pointerdown,{evt:t,pointerId:a.id}),r=!0;let o=t.type.indexOf("touch")>=0;s.preventDefault()&&t.cancelable&&o&&t.preventDefault()}),r||this._fire(e.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){let e=tD(t.type),i=tE(t.type);
1if(!e||(O.isDragging&&O.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t),O.isDragging&&!l.hitOnDragEnabled))return;var r={};let a=!1;var s=this._getTargetShape(i);this._changedPointerPositions.forEach(o=>{let h=(d=o.id,$.get(d)||this.getIntersection(o)),l=o.id,c={evt:t,pointerId:l};var d,u=s!==h;if(u&&s&&(s._fireAndBubble(e.pointerout,Object.assign({},c),h),s._fireAndBubble(e.pointerleave,Object.assign({},c),h)),h){if(r[h._id])return;r[h._id]=!0}h&&h.isListening()?(a=!0,u&&(h._fireAndBubble(e.pointerover,Object.assign({},c),s),h._fireAndBubble(e.pointerenter,Object.assign({},c),s),this[i+"targetShape"]=h),h._fireAndBubble(e.pointermove,Object.assign({},c))):s&&(this._fire(e.pointerover,{evt:t,target:this,currentTarget:this,pointerId:l}),this[i+"targetShape"]=null)}),a||this._fire(e.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){let e=tD(t.type),i=tE(t.type);if(!e)return;this.setPointersPositions(t);let r=this[i+"ClickStartShape"],a=this[i+"ClickEndShape"];var s={};let o=!1;this._changedPointerPositions.forEach(h=>{var c;let d=(c=h.id,$.get(c)||this.getIntersection(h));if(d){if(d.releaseCapture(h.id),s[d._id])return;s[d._id]=!0}let u=h.id,g={evt:t,pointerId:u},f=!1;l["_"+i+"InDblClickWindow"]?(f=!0,clearTimeout(this[i+"DblTimeout"])):O.justDragged||(l["_"+i+"InDblClickWindow"]=!0,clearTimeout(this[i+"DblTimeout"])),this[i+"DblTimeout"]=setTimeout(function(){l["_"+i+"InDblClickWindow"]=!1},l.dblClickWindow),d&&d.isListening()?(o=!0,this[i+"ClickEndShape"]=d,d._fireAndBubble(e.pointerup,Object.assign({},g)),l["_"+i+"ListenClick"]&&r&&r===d&&(d._fireAndBubble(e.pointerclick,Object.assign({},g)),f&&a&&a===d&&d._fireAndBubble(e.pointerdblclick,Object.assign({},g)))):(this[i+"ClickEndShape"]=null,l["_"+i+"ListenClick"]&&this._fire(e.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:u}),f&&this._fire(e.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:u}))}),o||this._fire(e.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),l["_"+i+"ListenClick"]=!1,t.cancelable&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var e=this.getIntersection(this.getPointerPosition());e&&e.isListening()?e._fireAndBubble(ty,{evt:t}):this._fire(ty,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var e=this.getIntersection(this.getPointerPosition());e&&e.isListening()?e._fireAndBubble(tw,{evt:t}):this._fire(tw,{evt:t,target:this,currentTarget:this})}_pointercancel(t){var e;this.setPointersPositions(t);let i=(e=t.pointerId,$.get(e)||this.getIntersection(this.getPointerPosition()));i&&i._fireAndBubble(tu,te(t)),tr(t.pointerId)}_lostpointercapture(t){tr(t.pointerId)}setPointersPositions(t){var e=this._getContentPosition(),i=null,r=null;void 0!==(t=t||window.event).touches?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,t=>{this._pointerPositions.push({id:t.identifier,x:(t.clientX-e.left)/e.scaleX,y:(t.clientY-e.top)/e.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,t=>{this._changedPointerPositions.push({id:t.identifier,x:(t.clientX-e.left)/e.scaleX,y:(t.clientY-e.top)/e.scaleY})})):(i=(t.clientX-e.left)/e.scaleX,r=(t.clientY-e.top)/e.scaleY,this.pointerPos={x:i,y:r},this._pointerPositions=[{x:i,y:r,id:b._getFirstPointerId(t)}],this._changedPointerPositions=[{x:i,y:r,id:b._getFirstPointerId(t)}])}_setPointerPosition(t){b.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new R({width:this.width(),height:this.height()}),this.bufferHitCanvas=new L({pixelRatio:1,width:this.width(),height:this.height()}),l.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return b.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}
1batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}tR.prototype.nodeType="Stage",c(tR),P.addGetterSetter(tR,"container");var tL="hasShadow",tO="shadowRGBA",tG="patternImage",tM="linearGradient",tF="radialGradient";function tB(){return t||(t=b.createCanvasElement().getContext("2d"))}let tU={};class tj extends K{constructor(t){let e;for(super(t);!(e=b.getRandomColor())||e in tU;);this.colorKey=e,tU[e]=this}getContext(){return b.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return b.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(tL,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&0!==this.shadowOpacity()&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(tG,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){let t=tB().createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(t&&t.setTransform){let e=new d;e.translate(this.fillPatternX(),this.fillPatternY()),e.rotate(l.getAngle(this.fillPatternRotation())),e.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),e.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());let i=e.getMatrix(),r="undefined"==typeof DOMMatrix?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);t.setTransform(r)}return t}}_getLinearGradient(){return this._getCache(tM,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var e=tB(),i=this.fillLinearGradientStartPoint(),r=this.fillLinearGradientEndPoint(),a=e.createLinearGradient(i.x,i.y,r.x,r.y),s=0;s<t.length;s+=2)a.addColorStop(t[s],t[s+1]);return a}}_getRadialGradient(){return this._getCache(tF,this.__getRadialGradient)}__getRadialGradient(){var t=this.fillRadialGradientColorStops();if(t){for(var e=tB(),i=this.fillRadialGradientStartPoint(),r=this.fillRadialGradientEndPoint(),a=e.createRadialGradient(i.x,i.y,this.fillRadialGradientStartRadius(),r.x,r.y,this.fillRadialGradientEndRadius()),s=0;s<t.length;s+=2)a.addColorStop(t[s],t[s+1]);return a}}getShadowRGBA(){return this._getCache(tO,this._getShadowRGBA)}_getShadowRGBA(){if(this.hasShadow()){var t=b.colorToRGBA(this.shadowColor());return"rgba("+t.r+","+t.g+","+t.b+","+t.a*(this.shadowOpacity()||1)+")"}}hasFill(){return this._calculate("hasFill",["fillEnabled","fill","fillPatternImage","fillLinearGradientColorStops","fillRadialGradientColorStops"],()=>this.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!(!this.stroke()&&!this.strokeLinearGradientColorStops()))}hasHitStroke(){let t=this.hitStrokeWidth();return"auto"===t?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var e=this.getStage().bufferHitCanvas;return e.getContext().clear(),this.drawHit(e,null,!0),e.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data[3]>0}destroy(){return K.prototype.destroy.call(this),delete tU[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var e;if(!this.getStage()||null!=(e=this.attrs.perfectDrawEnabled)&&!e)return!1;let i=t||this.hasFill(),r=this.hasStroke(),a=1!==this.getAbsoluteOpacity();if(i&&r&&a)return!0;let s=this.hasShadow(),o=this.shadowForStrokeEnabled();return!!(i&&r&&s&&o)}setStrokeHitEnabled(t){b.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return 0!==this.hitStrokeWidth()}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){let e=t.skipTransform,i=t.relativeTo,r=this.getSelfRect(),a=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,s=r.width+a,o=r.height+a,h=!t.skipShadow&&this.hasShadow(),l=h?this.shadowOffsetX():0,c=h?this.shadowOffsetY():0,d=s+Math.abs(l),u=o+Math.abs(c),g=h&&this.shadowBlur()||0,f={width:d+2*g,height:u+2*g,x:-(a/2+g)+Math.min(l,0)+r.x,y:-(a/2+g)+Math.min(c,0)+r.y};
1return e?f:this._transformedRect(f,i)}drawScene(t,e){var i,r,a=this.getLayer(),s=t||a.getCanvas(),o=s.getContext(),h=this._getCanvasCache(),l=this.getSceneFunc(),c=this.hasShadow(),d=s.isCache,u=e===this;if(!this.isVisible()&&!u)return this;if(h){o.save();var g=this.getAbsoluteTransform(e).getMatrix();return o.transform(g[0],g[1],g[2],g[3],g[4],g[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!l)return this;if(o.save(),this._useBufferCanvas()&&!d){(r=(i=this.getStage().bufferCanvas).getContext()).clear(),r.save(),r._applyLineJoin(this);var f=this.getAbsoluteTransform(e).getMatrix();r.transform(f[0],f[1],f[2],f[3],f[4],f[5]),l.call(this,r,this),r.restore();var p=i.pixelRatio;c&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(i._canvas,0,0,i.width/p,i.height/p)}else o._applyLineJoin(this),u||(f=this.getAbsoluteTransform(e).getMatrix(),o.transform(f[0],f[1],f[2],f[3],f[4],f[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)),c&&o._applyShadow(this),l.call(this,o,this);
1return o.restore(),this}drawHit(t,e,i=!1){if(!this.shouldDrawHit(e,i))return this;var r=this.getLayer(),a=t||r.hitCanvas,s=a&&a.getContext(),o=this.hitFunc()||this.sceneFunc(),h=this._getCanvasCache(),l=h&&h.hit;if(this.colorKey||b.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),l){s.save();var c=this.getAbsoluteTransform(e).getMatrix();return s.transform(c[0],c[1],c[2],c[3],c[4],c[5]),this._drawCachedHitCanvas(s),s.restore(),this}if(!o)return this;if(s.save(),s._applyLineJoin(this),this!==e){var d=this.getAbsoluteTransform(e).getMatrix();s.transform(d[0],d[1],d[2],d[3],d[4],d[5])}return o.call(this,s,this),s.restore(),this}drawHitFromCache(t=0){var e,i,r,a,s,o=this._getCanvasCache(),h=this._getCachedSceneCanvas(),l=o.hit,c=l.getContext(),d=l.getWidth(),u=l.getHeight();c.clear(),c.drawImage(h._canvas,0,0,d,u);try{for(r=(i=(e=c.getImageData(0,0,d,u)).data).length,a=b._hexToRgb(this.colorKey),s=0;s<r;s+=4)i[s+3]>t?(i[s]=a.r,i[s+1]=a.g,i[s+2]=a.b,i[s+3]=255):i[s+3]=0;c.putImageData(e,0,0)}catch(t){b.error("Unable to draw hit graph from cached scene canvas. "+t.message)}return this}hasPointerCapture(t){return $.get(t)===this}setPointerCapture(t){ti(t,this)}releaseCapture(t){tr(t)}}tj.prototype._fillFunc=function(t){t.fill()},tj.prototype._strokeFunc=function(t){t.stroke()},tj.prototype._fillFuncHit=function(t){t.fill()},tj.prototype._strokeFuncHit=function(t){t.stroke()},tj.prototype._centroid=!1,tj.prototype.nodeType="Shape",c(tj),tj.prototype.eventListeners={},tj.prototype.on.call(tj.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",function(){this._clearCache(tL)}),tj.prototype.on.call(tj.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",function(){this._clearCache(tO)}),tj.prototype.on.call(tj.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",function(){this._clearCache(tG)}),tj.prototype.on.call(tj.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",function(){this._clearCache(tM)}),tj.prototype.on.call(tj.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",function(){this._clearCache(tF)}),P.addGetterSetter(tj,"stroke",void 0,w()),P.addGetterSetter(tj,"strokeWidth",2,_()),P.addGetterSetter(tj,"fillAfterStrokeEnabled",!1),P.addGetterSetter(tj,"hitStrokeWidth","auto",function(){if(l.isUnminified)return function(t,e){return b._isNumber(t)||"auto"===t||b.warn(C(t)+' is a not val
1id value for "'+e+'" attribute. The value should be a number or "auto".'),t}}()),P.addGetterSetter(tj,"strokeHitEnabled",!0,x()),P.addGetterSetter(tj,"perfectDrawEnabled",!0,x()),P.addGetterSetter(tj,"shadowForStrokeEnabled",!0,x()),P.addGetterSetter(tj,"lineJoin"),P.addGetterSetter(tj,"lineCap"),P.addGetterSetter(tj,"sceneFunc"),P.addGetterSetter(tj,"hitFunc"),P.addGetterSetter(tj,"dash"),P.addGetterSetter(tj,"dashOffset",0,_()),P.addGetterSetter(tj,"shadowColor",void 0,S()),P.addGetterSetter(tj,"shadowBlur",0,_()),P.addGetterSetter(tj,"shadowOpacity",1,_()),P.addComponentsGetterSetter(tj,"shadowOffset",["x","y"]),P.addGetterSetter(tj,"shadowOffsetX",0,_()),P.addGetterSetter(tj,"shadowOffsetY",0,_()),P.addGetterSetter(tj,"fillPatternImage"),P.addGetterSetter(tj,"fill",void 0,w()),P.addGetterSetter(tj,"fillPatternX",0,_()),P.addGetterSetter(tj,"fillPatternY",0,_()),P.addGetterSetter(tj,"fillLinearGradientColorStops"),P.addGetterSetter(tj,"strokeLinearGradientColorStops"),P.addGetterSetter(tj,"fillRadialGradientStartRadius",0),P.addGetterSetter(tj,"fillRadialGradientEndRadius",0),P.addGetterSetter(tj,"fillRadialGradientColorStops"),P.addGetterSetter(tj,"fillPatternRepeat","repeat"),P.addGetterSetter(tj,"fillEnabled",!0),P.addGetterSetter(tj,"strokeEnabled",!0),P.addGetterSetter(tj,"shadowEnabled",!0),P.addGetterSetter(tj,"dashEnabled",!0),P.addGetterSetter(tj,"strokeScaleEnabled",!0),P.addGetterSetter(tj,"fillPriority","color"),P.addComponentsGetterSetter(tj,"fillPatternOffset",["x","y"]),P.addGetterSetter(tj,"fillPatternOffsetX",0,_()),P.addGetterSetter(tj,"fillPatternOffsetY",0,_()),P.addComponentsGetterSetter(tj,"fillPatternScale",["x","y"]),P.addGetterSetter(tj,"fillPatternScaleX",1,_()),P.addGetterSetter(tj,"fillPatternScaleY",1,_()),P.addComponentsGetterSetter(tj,"fillLinearGradientStartPoint",["x","y"]),P.addComponentsGetterSetter(tj,"strokeLinearGradientStartPoint",["x","y"]),P.addGetterSetter(tj,"fillLinearGradientStartPointX",0),P.addGetterSetter(tj,"strokeLinearGradientStartPointX",0),P.addGetterSetter(tj,"fillLinearGradientStartPointY",0),P.addGetterSetter(tj,"strokeLinearGradientStartPointY",0),P.addComponentsGetterSetter(tj,"fillLinearGradientEndPoint",["x","y"]),P.addComponentsGetterSetter(tj,"strokeLinearGradientEndPoint",["x","y"]),P.addGetterSetter(tj,"fillLinearGradientEndPointX",0),P.addGetterSetter(tj,"strokeLinearGradientEndPointX",0),P.addGetterSetter(tj,"fillLinearGradientEndPointY",0),P.addGetterSetter(tj,"strokeLinearGradientEndPointY",0),P.addComponentsGetterSetter(tj,"fillRadialGradientStartPoint",["x","y"]),P.addGetterSetter(tj,"fillRadialGradientStartPointX",0),P.addGetterSetter(tj,"fillRadialGradientStartPointY",0),P.addComponentsGetterSetter(tj,"fillRadialGradientEndPoint",["x","y"]),P.addGetterSetter(tj,"fillRadialGradientEndPointX",0),P.addGetterSetter(tj,"fillRadialGradientEndPointY",0),P.addGetterSetter(tj,"fillPatternRotation",0),P.backCompat(tj,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var tH=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],tN=tH.length;class tW extends Z{constructor(t){super(t),this.canvas=new R,this.hitCanvas=new L({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var e=this.getStage();return e&&e.content&&(e.content.removeChild(this.getNativeCanvasElement()),t<e.children.length-1?e.content.insertBefore(this.getNativeCanvasElement(),e.children[t+1].getCanvas()._canvas):e.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){K.prototype.moveToTop.call(this);var t=this.getStage();return t&&t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){if(!K.prototype.moveUp.call(this))return!1;var t=this.getStage();return!(!t||!t.content||(t.content.removeChild(this.getNativeCanvasElement()),this.index<t.children.length-1?t.content.insertBefore(this.getNativeCanvasElement(),t.children[this.index+1].getCanvas()._canvas):t.content.appendChild(this.getNativeCanvasElement()),0))}moveDown(){if(K.prototype.moveDown.call(this)){var t=this.getStage();if(t){var e=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),e[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(K.prototype.moveToBottom.call(this)){var t=this.getStage();if(t){var e=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),e[1].getCanvas()._canvas))}return!0}return!1}
1getLayer(){return this}remove(){var t=this.getNativeCanvasElement();return K.prototype.remove.call(this),t&&t.parentNode&&b._isInDocument(t)&&t.parentNode.removeChild(t),this}getStage(){return this.parent}setSize({width:t,height:e}){return this.canvas.setSize(t,e),this.hitCanvas.setSize(t,e),this._setSmoothEnabled(),this}_validateAdd(t){var e=t.getType();"Group"!==e&&"Shape"!==e&&b.throw("You may only add groups and shapes to a layer.")}_toKonvaCanvas(t){return(t=t||{}).width=t.width||this.getWidth(),t.height=t.height||this.getHeight(),t.x=void 0!==t.x?t.x:this.x(),t.y=void 0!==t.y?t.y:this.y(),K.prototype._toKonvaCanvas.call(this,t)}_checkVisibility(){let t=this.visible();this.canvas._canvas.style.display=t?"block":"none"}_setSmoothEnabled(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}getWidth(){if(this.parent)return this.parent.width()}setWidth(){b.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){b.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,b.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var e=1,i=!1;;){for(let r=0;r<tN;r++){let a=tH[r],s=this._getIntersection({x:t.x+a.x*e,y:t.y+a.y*e}),o=s.shape;if(o)return o;if(i=!!s.antialiased,!s.antialiased)break}if(!i)return null;e+=1}}_getIntersection(t){let e=this.hitCanvas.pixelRatio,i=this.hitCanvas.context.getImageData(Math.round(t.x*e),Math.round(t.y*e),1,1).data,r=i[3];if(255===r){let t=tU["#"+b._rgbToHex(i[0],i[1],i[2])];return t?{shape:t}:{antialiased:!0}}return r>0?{antialiased:!0}:{}}drawScene(t,e){var i=this.getLayer(),r=t||i&&i.getCanvas();return this._fire("beforeDraw",{node:this}),this.clearBeforeDraw()&&r.getContext().clear(),Z.prototype.drawScene.call(this,r,e),this._fire("draw",{node:this}),this}drawHit(t,e){var i=this.getLayer(),r=t||i&&i.hitCanvas;return i&&i.clearBeforeDraw()&&i.getHitCanvas().getContext().clear(),Z.prototype.drawHit.call(this,r,e),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){b.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return b.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(this.parent&&this.parent.content){var t=this.parent;this.hitCanvas._canvas.parentNode?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}}tW.prototype.nodeType="Layer",c(tW),P.addGetterSetter(tW,"imageSmoothingEnabled",!0),P.addGetterSetter(tW,"clearBeforeDraw",!0),P.addGetterSetter(tW,"hitGraphEnabled",!0,x());class tz extends tW{constructor(t){super(t),this.listening(!1),b.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}tz.prototype.nodeType="FastLayer",c(tz);class tY extends Z{_validateAdd(t){var e=t.getType();"Group"!==e&&"Shape"!==e&&b.throw("You may only add groups and shapes to groups.")}}tY.prototype.nodeType="Group",c(tY);var tX=h.performance&&h.performance.now?function(){return h.performance.now()}:function(){return(new Date).getTime()};class tV{constructor(t,e){this.id=tV.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:tX(),frameRate:0},this.func=t,this.setLayers(e)}setLayers(t){var e;return e=t?t.length>0?t:[t]:[],this.layers=e,this}getLayers(){return this.layers}addLayer(t){var e,i=this.layers,r=i.length;for(e=0;e<r;e++)if(i[e]._id===t._id)return!1;return this.layers.push(t),!0}isRunning(){var t,e=tV.animations,i=e.length;for(t=0;t<i;t++)if(e[t].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=tX(),tV._addAnimation(this),this}stop(){return tV._removeAnimation(this),this}_updateFrameObject(t){this.frame.timeDiff=t-this.frame.lastTime,this.frame.lastTime=t,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(t){this.animations.push(t),this._handleAnimation()}static _removeAnimation(t){var e,i=t.id,r=this.animations,a=r.length;for(e=0;e<a;e++)if(r[e].id===i){this.animations.splice(e,1);break}}static _runFrames(){var t,e,i,r,a,s,o,h,l={},c=this.animations;for(r=0;r<c.length;r++)if(e=(t=c[r]).layers,i=t.func,t._updateFrameObject(tX()),s=e.length,!i||!1!==i.call(t,t.frame))for(a=0;a<s;a++)void 0!==(o=e[a])._id&&(l[o._id]=o);for(h in l)l.hasOwnProperty(h)&&l[h].batchDraw()}static _animationLoop(){tV.animations.length?(tV._runFrames(),b.requestAnimFrame
1(tV._animationLoop)):tV.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,b.requestAnimFrame(this._animationLoop))}}tV.animations=[],tV.animIdCounter=0,tV.animRunning=!1;var tq={node:1,duration:1,easing:1,onFinish:1,yoyo:1},tQ=0,tK=["fill","stroke","shadowColor"];class tJ{constructor(t,e,i,r,a,s,o){this.prop=t,this.propFunc=e,this.begin=r,this._pos=r,this.duration=s,this._change=0,this.prevPos=0,this.yoyo=o,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=i,this._change=a-this.begin,this.pause()}fire(t){var e=this[t];e&&e()}setTime(t){t>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return void 0===t&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=2,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=3,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var t=this.getTimer()-this._startTime;2===this.state?this.setTime(t):3===this.state&&this.setTime(this.duration-t)}pause(){this.state=1,this.fire("onPause")}getTimer(){return(new Date).getTime()}}class tZ{constructor(t){var e,i,r=this,a=t.node,s=a._id,o=t.easing||t$.Linear,h=!!t.yoyo;e=void 0===t.duration?.3:0===t.duration?.001:t.duration,this.node=a,this._id=tQ++;var c=a.getLayer()||(a instanceof l.Stage?a.getLayers():null);for(i in c||b.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new tV(function(){r.tween.onEnterFrame()},c),this.tween=new tJ(i,function(t){r._tweenFunc(t)},o,0,1,1e3*e,h),this._addListeners(),tZ.attrs[s]||(tZ.attrs[s]={}),tZ.attrs[s][this._id]||(tZ.attrs[s][this._id]={}),tZ.tweens[s]||(tZ.tweens[s]={}),t)void 0===tq[i]&&this._addAttr(i,t[i]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,e){var i,r,a,s,o,h,l,c,d=this.node,u=d._id;if((a=tZ.tweens[u][t])&&delete tZ.attrs[u][a][t],i=d.getAttr(t),b._isArray(e))if(r=[],o=Math.max(e.length,i.length),"points"===t&&e.length!==i.length&&(e.length>i.length?(l=i,i=b._prepareArrayForTween(i,e,d.closed())):(h=e,e=b._prepareArrayForTween(e,i,d.closed()))),0===t.indexOf("fill"))for(s=0;s<o;s++)if(s%2==0)r.push(e[s]-i[s]);else{var g=b.colorToRGBA(i[s]);c=b.colorToRGBA(e[s]),i[s]=g,r.push({r:c.r-g.r,g:c.g-g.g,b:c.b-g.b,a:c.a-g.a})}else for(s=0;s<o;s++)r.push(e[s]-i[s]);else -1!==tK.indexOf(t)?(i=b.colorToRGBA(i),r={r:(c=b.colorToRGBA(e)).r-i.r,g:c.g-i.g,b:c.b-i.b,a:c.a-i.a}):r=e-i;tZ.attrs[u][this._id][t]={start:i,diff:r,end:e,trueEnd:h,trueStart:l},tZ.tweens[u][t]=this._id}_tweenFunc(t){var e,i,r,a,s,o,h,l,c=this.node,d=tZ.attrs[c._id][this._id];for(e in d){if(r=(i=d[e]).start,a=i.diff,l=i.end,b._isArray(r))if(s=[],h=Math.max(r.length,l.length),0===e.indexOf("fill"))for(o=0;o<h;o++)o%2==0?s.push((r[o]||0)+a[o]*t):s.push("rgba("+Math.round(r[o].r+a[o].r*t)+","+Math.round(r[o].g+a[o].g*t)+","+Math.round(r[o].b+a[o].b*t)+","+(r[o].a+a[o].a*t)+")");else for(o=0;o<h;o++)s.push((r[o]||0)+a[o]*t);else s=-1!==tK.indexOf(e)?"rgba("+Math.round(r.r+a.r*t)+","+Math.round(r.g+a.g*t)+","+Math.round(r.b+a.b*t)+","+(r.a+a.a*t)+")":r+a*t;c.setAttr(e,s)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,e=tZ.attrs[t._id][this._id];e.points&&e.points.trueEnd&&t.setAttr("points",e.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,e=tZ.attrs[t._id][this._id];e.points&&e.points.trueStart&&t.points(e.points.trueStart),this.onReset&&this.onReset()}
1,this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(1e3*t),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t,e=this.node._id,i=this._id,r=tZ.tweens[e];for(t in this.pause(),r)delete tZ.tweens[e][t];delete tZ.attrs[e][i]}}tZ.attrs={},tZ.tweens={},K.prototype.to=function(t){var e=t.onFinish;t.node=this,t.onFinish=function(){this.destroy(),e&&e()},new tZ(t).play()};let t$={BackEaseIn:(t,e,i,r)=>i*(t/=r)*t*(2.70158*t-1.70158)+e,BackEaseOut:(t,e,i,r)=>i*((t=t/r-1)*t*(2.70158*t+1.70158)+1)+e,BackEaseInOut(t,e,i,r){var a=1.70158;return(t/=r/2)<1?i/2*(t*t*((1+(a*=1.525))*t-a))+e:i/2*((t-=2)*t*((1+(a*=1.525))*t+a)+2)+e},ElasticEaseIn(t,e,i,r,a,s){var o=0;return 0===t?e:1==(t/=r)?e+i:(s||(s=.3*r),!a||a<Math.abs(i)?(a=i,o=s/4):o=s/(2*Math.PI)*Math.asin(i/a),-a*Math.pow(2,10*(t-=1))*Math.sin(2*Math.PI*(t*r-o)/s)+e)},ElasticEaseOut(t,e,i,r,a,s){var o=0;return 0===t?e:1==(t/=r)?e+i:(s||(s=.3*r),!a||a<Math.abs(i)?(a=i,o=s/4):o=s/(2*Math.PI)*Math.asin(i/a),a*Math.pow(2,-10*t)*Math.sin(2*Math.PI*(t*r-o)/s)+i+e)},ElasticEaseInOut(t,e,i,r,a,s){var o=0;return 0===t?e:2==(t/=r/2)?e+i:(s||(s=.3*1.5*r),!a||a<Math.abs(i)?(a=i,o=s/4):o=s/(2*Math.PI)*Math.asin(i/a),t<1?-(a*Math.pow(2,10*(t-=1))*Math.sin(2*Math.PI*(t*r-o)/s)*.5)+e:a*Math.pow(2,-10*(t-=1))*Math.sin(2*Math.PI*(t*r-o)/s)*.5+i+e)},BounceEaseOut:(t,e,i,r)=>(t/=r)<1/2.75?7.5625*t*t*i+e:t<2/2.75?i*(7.5625*(t-=1.5/2.75)*t+.75)+e:t<2.5/2.75?i*(7.5625*(t-=2.25/2.75)*t+.9375)+e:i*(7.5625*(t-=2.625/2.75)*t+.984375)+e,BounceEaseIn:(t,e,i,r)=>i-t$.BounceEaseOut(r-t,0,i,r)+e,BounceEaseInOut:(t,e,i,r)=>t<r/2?.5*t$.BounceEaseIn(2*t,0,i,r)+e:.5*t$.BounceEaseOut(2*t-r,0,i,r)+.5*i+e,EaseIn:(t,e,i,r)=>i*(t/=r)*t+e,EaseOut:(t,e,i,r)=>-i*(t/=r)*(t-2)+e,EaseInOut:(t,e,i,r)=>(t/=r/2)<1?i/2*t*t+e:-i/2*(--t*(t-2)-1)+e,StrongEaseIn:(t,e,i,r)=>i*(t/=r)*t*t*t*t+e,StrongEaseOut:(t,e,i,r)=>i*((t=t/r-1)*t*t*t*t+1)+e,StrongEaseInOut:(t,e,i,r)=>(t/=r/2)<1?i/2*t*t*t*t*t+e:i/2*((t-=2)*t*t*t*t+2)+e,Linear:(t,e,i,r)=>i*t/r+e},t0=b._assign(l,{Util:b,Transform:d,Node:K,Container:Z,Stage:tR,stages:tI,Layer:tW,FastLayer:tz,Group:tY,DD:O,Shape:tj,shapes:tU,Animation:tV,Tween:tZ,Easings:t$,Context:E,Canvas:I});var t1=a(918),t2=a.n(t1),t5=a(303),t3=a.n(t5);class t4 extends tj{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){let t=this.image();t&&t.complete||t&&4===t.readyState||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){let e,i=this.getWidth(),r=this.getHeight(),a=this.attrs.image;if(a){let t=this.attrs.cropWidth,s=this.attrs.cropHeight;e=t&&s?[a,this.cropX(),this.cropY(),t,s,0,0,i,r]:[a,0,0,i,r]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,i,r),t.closePath(),t.fillStrokeShape(this)),a&&t.drawImage.apply(t,e)}_hitFunc(t){var e=this.width(),i=this.height();t.beginPath(),t.rect(0,0,e,i),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,e;return null!=(t=this.attrs.width)?t:null==(e=this.image())?void 0:e.width}getHeight(){var t,e;return null!=(t=this.attrs.height)?t:null==(e=this.image())?void 0:e.height}static fromURL(t,e,i=null){var r=b.createImageElement();r.onload=function(){e(new t4({image:r}))},r.onerror=i,r.crossOrigin="Anonymous",r.src=t}}t4.prototype.className="Image",c(t4),P.addGetterSetter(t4,"image"),P.addComponentsGetterSetter(t4,"crop",["x","y","width","height"]),P.addGetterSetter(t4,"cropX",0,_()),P.addGetterSetter(t4,"cropY",0,_()),P.addGetterSetter(t4,"cropWidth",0,_()),P.addGetterSetter(t4,"cropHeight",0,_());class t6 extends tj{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,2*Math.PI,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return 2*this.radius()}getHeight(){return 2*this.radius()}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}t6.prototype._centroid=!0,t6.prototype.className="Circle",t6.prototype._attrsAffectingSize=["radiu
1s"],c(t6),P.addGetterSetter(t6,"radius",0,_());class t8 extends tj{_sceneFunc(t){var e=this.cornerRadius(),i=this.width(),r=this.height();if(t.beginPath(),e){let a=0,s=0,o=0,h=0;"number"==typeof e?a=s=o=h=Math.min(e,i/2,r/2):(a=Math.min(e[0]||0,i/2,r/2),s=Math.min(e[1]||0,i/2,r/2),h=Math.min(e[2]||0,i/2,r/2),o=Math.min(e[3]||0,i/2,r/2)),t.moveTo(a,0),t.lineTo(i-s,0),t.arc(i-s,s,s,3*Math.PI/2,0,!1),t.lineTo(i,r-h),t.arc(i-h,r-h,h,0,Math.PI/2,!1),t.lineTo(o,r),t.arc(o,r-o,o,Math.PI/2,Math.PI,!1),t.lineTo(0,a),t.arc(a,a,a,Math.PI,3*Math.PI/2,!1)}else t.rect(0,0,i,r);t.closePath(),t.fillStrokeShape(this)}}t8.prototype.className="Rect",c(t8),P.addGetterSetter(t8,"cornerRadius",0,function(t){if(l.isUnminified)return function(t,e){let i=b._isNumber(t),r=b._isArray(t)&&4==t.length;return i||r||b.warn(C(t)+' is a not valid value for "'+e+'" attribute. The value should be a number or Array<number>(4)'),t}}());class t7 extends tj{constructor(t){super(t),this.dataArray=[],this.pathLength=0,this.dataArray=t7.parsePathData(this.data()),this.pathLength=0;for(var e=0;e<this.dataArray.length;++e)this.pathLength+=this.dataArray[e].pathLength;this.on("dataChange.konva",function(){this.dataArray=t7.parsePathData(this.data()),this.pathLength=0;for(var t=0;t<this.dataArray.length;++t)this.pathLength+=this.dataArray[t].pathLength})}_sceneFunc(t){var e=this.dataArray;t.beginPath();for(var i=!1,r=0;r<e.length;r++){var a=e[r].command,s=e[r].points;switch(a){case"L":t.lineTo(s[0],s[1]);break;case"M":t.moveTo(s[0],s[1]);break;case"C":t.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);break;case"Q":t.quadraticCurveTo(s[0],s[1],s[2],s[3]);break;case"A":var o=s[0],h=s[1],l=s[2],c=s[3],d=s[4],u=s[5],g=s[6],f=s[7],p=l>c?l:c,m=l>c?1:l/c,v=l>c?c/l:1;t.translate(o,h),t.rotate(g),t.scale(m,v),t.arc(0,0,p,d,d+u,1-f),t.scale(1/m,1/v),t.rotate(-g),t.translate(-o,-h);break;case"z":i=!0,t.closePath()}}i||this.hasFill()?t.fillStrokeShape(this):t.strokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(e){if("A"===e.command){var i=e.points[4],r=e.points[5],a=e.points[4]+r,s=Math.PI/180;if(Math.abs(i-a)<s&&(s=Math.abs(i-a)),r<0)for(let r=i-s;r>a;r-=s){let i=t7.getPointOnEllipticalArc(e.points[0],e.points[1],e.points[2],e.points[3],r,0);t.push(i.x,i.y)}else for(let r=i+s;r<a;r+=s){let i=t7.getPointOnEllipticalArc(e.points[0],e.points[1],e.points[2],e.points[3],r,0);t.push(i.x,i.y)}}else if("C"===e.command)for(let i=0;i<=1;i+=.01){let r=t7.getPointOnCubicBezier(i,e.start.x,e.start.y,e.points[0],e.points[1],e.points[2],e.points[3],e.points[4],e.points[5]);t.push(r.x,r.y)}else t=t.concat(e.points)});for(var e,i,r=t[0],a=t[0],s=t[1],o=t[1],h=0;h<t.length/2;h++)e=t[2*h],i=t[2*h+1],isNaN(e)||(r=Math.min(r,e),a=Math.max(a,e)),isNaN(i)||(s=Math.min(s,i),o=Math.max(o,i));return{x:r,y:s,width:a-r,height:o-s}}getLength(){return this.pathLength}getPointAtLength(t){var e,i=0,r=this.dataArray.length;if(!r)return null;for(;i<r&&t>this.dataArray[i].pathLength;)t-=this.dataArray[i].pathLength,++i;if(i===r)return{x:(e=this.dataArray[i-1].points.slice(-2))[0],y:e[1]};if(t<.01)return{x:(e=this.dataArray[i].points.slice(0,2))[0],y:e[1]};var a=this.dataArray[i],s=a.points;switch(a.command){case"L":return t7.getPointOnLine(t,a.start.x,a.start.y,s[0],s[1]);case"C":return t7.getPointOnCubicBezier(t/a.pathLength,a.start.x,a.start.y,s[0],s[1],s[2],s[3],s[4],s[5]);case"Q":return t7.getPointOnQuadraticBezier(t/a.pathLength,a.start.x,a.start.y,s[0],s[1],s[2],s[3]);case"A":var o=s[0],h=s[1],l=s[2],c=s[3],d=s[4],u=s[5],g=s[6];return d+=u*t/a.pathLength,t7.getPointOnEllipticalArc(o,h,l,c,d,g)}return null}static getLineLength(t,e,i,r){return Math.sqrt((i-t)*(i-t)+(r-e)*(r-e))}static getPointOnLine(t,e,i,r,a,s,o){void 0===s&&(s=e),void 0===o&&(o=i);var h=(a-i)/(r-e+1e-8),l=Math.sqrt(t*t/(1+h*h));r<e&&(l*=-1);var c,d=h*l;if(r===e)c={x:s,y:o+d};else if((o-i)/(s-e+1e-8)===h)c={x:s+l,y:o+d};else{var u,g,f=this.getLineLength(e,i,r,a),p=(s-e)*(r-e)+(o-i)*(a-i);u=e+(p/=f*f)*(r-e),g=i+p*(a-i);var m=this.getLineLength(s,o,u,g),v=Math.sqrt(t*t-m*m);l=Math.sqrt(v*v/(1+h*h)),r<e&&(l*=-1),c={x:u+l,y:g+(d=h*l)}}return c}static getPointOnCubicBezier(t,e,i,r,a,s,o,h,l){function c(t){return 3*t*(1-t)*(1-t)}return{x:t*t*t*h+3*t*t*(1-t)*s+r*c(t)+(1-t)*(1-t)*(1-t)*e,y:t*t*t*l+3*t*t*(1-t)*o+a*c(t)+(1-t)*(1-t)*(1-t)*i}}static getPointOnQuadraticBezier(t,e,i,r,a,s,o){return{x:t*t*s+2*t*(1-t)*r+(1-t)*(1-t)*e,y:t*t*o+2*t*(1-t)*a+(1-t)*(1-t)*i}}static getPointOnEllipticalArc(t,e,i,r,a,s){var o=Math.cos(s),h=Math.sin(s),l=i*Math.cos(a),c=r*Math.sin(a);return{x:t+(l*o-c*h),y:e+(l*h+c*o)}}static parsePathData(t){if(!t)return[];var e=t,i=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];e=e.replace(RegExp(" ","g"),",");for(var r=0;r<i.length;r++)e=e.replace(RegExp(i[r],"g"),"|"+i[r]);var a,s=e.split("|"),o=[],h=[],l=0,c=0,d=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi;for(r=1;r<s.length;r++){var u=s[r],g=u.charAt(0);for(u=u.slice(1),h.length=0;a=d.exec(u);)h.push(a[0]);for(var f=[],p=0,m=h.length;p<m;p++)if("00"!==h[p]){var v=parseFloat(h[p]);isNaN(v)?f.push(0):f.push(v)}else f.push(0,0);for(;f.length>0&&!isNaN(f[0]);){var y,b,C,_,S,w,x,P,A,k,E=null,D=[],T=l,I=c;switch(g){case"l":l+=f.shift(),c+=f.shift(),E="L",D.push(l,c);break;case"L":l=f.shift(),c=f.shift(),D.push(l,c);break;case"m":var R=f.shift(),L=f.shift();if(l+=R,c+=L,E="M",o.length>2&&"z"===o[o.length-1].command){for(var O=o.length-2;O>=0;O--)if("M"===o[O].command){l=o[O].points[0]+R,c=o[O].points[1]+L;break}}D.push(l,c),g="l";break;case"M":l=f.shift(),c=f.shift(),E="M",D.push(l,c),g="L";break;case"h":l+=f.shift(),E="L",D.push(l,c);break;case"H":l=f.shift(),E="L",D.push(l,c);break;case"v":c+=f.shift(),E="L",D.push(l,c);break;case"V":c=f.shift(),E="L",D.push(l,c);break;case"C":D.push(f.shift(),f.shift(),f.shift(),f.shift()),l=f.shift(),c=f.shift(),D.push(l,c);break;case"c":D.push(l+f.shift(),c+f.shift(),l+f.shift(),c+f.shift()),l+=f.shift(),c+=f.shift(),E="C",D.push(l,c);break;case"S":b=l,C=c,"C"===(y=o[o.length-1]).command&&(b=l+(l-y.points[2]),C=c+(c-y.points[3])),D.push(b,C,f.shift(),f.shift()),l=f.shift(),c=f.shift(),E="C",D.push(l,c);break;case"s":b=l,C=c,"C"===(y=o[o.length-1]).command&&(b=l+(l-y.points[2]),C=c+(c-y.points[3])),D.push(b,C,l+f.shift(),c+f.shift()),l+=f.shift(),c+=f.shift(),E="C",D.push(l,c);break;case"Q":D.push(f.shift(),f.shift()),l=f.shift(),c=f.shift(),D.push(l,c);break;case"q":D.push(l+f.shift(),c+f.shift()),l+=f.shift(),c+=f.shift(),E="Q",D.push(l,c);break;case"T":b=l,C=c,"Q"===(y=o[o.length-1]).command&&(b=l+(l-y.points[0]),C=c+(c-y.points[1])),l=f.shift(),c=f.shift(),E="Q",D.push(b,C,l,c);break;case"t":b=l,C=c,"Q"===(y=o[o.length-1]).command&&(b=l+(l-y.points[0]),C=c+(c-y.points[1])),l+=f.shift(),c+=f.shift(),E="Q",D.push(b,C,l,c);break;case"A":_=f.shift(),S=f.shift(),w=f.shift(),x=f.shift(),P=f.shift(),A=l,k=c,l=f.shift(),c=f.shift(),E="A",D=this.convertEndpointToCenterParameterization(A,k,l,c,x,P,_,S,w);break;case"a":_=f.shift(),S=f.shift(),w=f.shift(),x=f.shift(),P=f.shift(),A=l,k=c,l+=f.shift(),c+=f.shift(),E="A",D=this.convertEndpointToCenterParameterization(A,k,l,c,x,P,_,S,w)}o.push({command:E||g,points:D,start:{x:T,y:I},pathLength:this.calcLength(T,I,E||g,D)})}"z"!==g&&"Z"!==g||o.push({command:"z",points:[],start:void 0,pathLength:0})}return o}static calcLength(t,e,i,r){var a,s,o,h;switch(i){case"L":return t7.getLineLength(t,e,r[0],r[1]);case"C":for(a=0,s=t7.getPointOnCubicBezier(0,t,e,r[0],r[1],r[2],r[3],r[4],r[5]),h=.01;h<=1;h+=.01)o=t7.getPointOnCubicBezier(h,t,e,r[0],r[1],r[2],r[3],r[4],r[5]),a+=t7.getLineLength(s.x,s.y,o.x,o.y),s=o;return a;case"Q":for(a=0,s=t7.getPointOnQuadraticBezier(0,t,e,r[0],r[1],r[2],r[3]),h=.01;h<=1;h+=.01)o=t7.getPointOnQuadraticBezier(h,t,e,r[0],r[1],r[2],r[3]),a+=t7.getLineLength(s.x,s.y,o.x,o.y),s=o;return a;case"A":a=0;var l=r[4],c=r[5],d=r[4]+c,u=Math.PI/180;
1if(Math.abs(l-d)<u&&(u=Math.abs(l-d)),s=t7.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],l,0),c<0)for(h=l-u;h>d;h-=u)o=t7.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],h,0),a+=t7.getLineLength(s.x,s.y,o.x,o.y),s=o;else for(h=l+u;h<d;h+=u)o=t7.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],h,0),a+=t7.getLineLength(s.x,s.y,o.x,o.y),s=o;return o=t7.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],d,0),a+t7.getLineLength(s.x,s.y,o.x,o.y)}return 0}static convertEndpointToCenterParameterization(t,e,i,r,a,s,o,h,l){var c=Math.PI/180*l,d=Math.cos(c)*(t-i)/2+Math.sin(c)*(e-r)/2,u=-1*Math.sin(c)*(t-i)/2+Math.cos(c)*(e-r)/2,g=d*d/(o*o)+u*u/(h*h);g>1&&(o*=Math.sqrt(g),h*=Math.sqrt(g));var f=Math.sqrt((o*o*(h*h)-o*o*(u*u)-h*h*(d*d))/(o*o*(u*u)+h*h*(d*d)));a===s&&(f*=-1),isNaN(f)&&(f=0);var p=f*o*u/h,m=-(f*h)*d/o,v=(t+i)/2+Math.cos(c)*p-Math.sin(c)*m,y=(e+r)/2+Math.sin(c)*p+Math.cos(c)*m,b=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},C=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(b(t)*b(e))},_=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(C(t,e))},S=_([1,0],[(d-p)/o,(u-m)/h]),w=[(d-p)/o,(u-m)/h],x=[(-1*d-p)/o,(-1*u-m)/h],P=_(w,x);return -1>=C(w,x)&&(P=Math.PI),C(w,x)>=1&&(P=0),0===s&&P>0&&(P-=2*Math.PI),1===s&&P<0&&(P+=2*Math.PI),[v,y,o,h,S,P,c,s]}}function t9(t){return(t9="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function et(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,r)}return i}function ee(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?et(Object(i),!0).forEach(function(e){en(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):et(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}function ei(t,e){return(ei=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function er(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ea(t){return(ea=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function en(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}t7.prototype.className="Path",t7.prototype._attrsAffectingSize=["data"],c(t7),P.addGetterSetter(t7,"data");var es=function(t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");s.prototype=Object.create(t&&t.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),t&&ei(s,t);var e,i,a=(i=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=ea(s);return t=i?Reflect.construct(e,arguments,ea(this).constructor):e.apply(this,arguments),t&&("object"===t9(t)||"function"==typeof t)?t:er(this)});function s(t){if(!(this instanceof s))throw TypeError("Cannot call a class as a function");var e,i=(e=a.call(this,t)).generateHash("avatar_container"),r=e.generateHash("avatar_loader");return e.onFileLoad=e.onFileLoad.bind(er(e)),e.onCloseClick=e.onCloseClick.bind(er(e)),e.state={imgWidth:0,imgHeight:0,scale:1,containerId:i,loaderId:r,lastMouseY:0,showLoader:!(e.props.src||e.props.img)},e}return e=[{key:"generateHash",value:function(t){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return t+"-"+e()+"-"+e()+"-"+e()}},{key:"onCloseCallback",value:function(){this.props.onClose()}},{key:"onCropCallback",value:function(t){this.props.onCrop(t)}},{key:"onFileLoadCallback",value:function(t){this.props.onFileLoad(t)}},{key:"onBeforeFileLoadCallback",value:function(t){this.props.onBeforeFileLoad(t)}},{key:"onImageLoadCallback",value:function(t){this.props.onImageLoad(t)}},{key:"componentDidMount",value:function(){var t=this;if(!this.state.showLoader){var e=this.props.img||new Image;e.crossOrigin="Anonymous",!this.props.img&&this.props.src&&(e.src=this.props.src),this.setState({image:e},function(){if(t.image.complete)return t.init();t.image.onload=function(){t.onImageLoadCallback(t.image),t.init()}})}}},{key:"componentDidUpdate",value:function(t,e){t.src!==this.props.src&&(this.image.src=this.props.src)}},{key:"onFileLoad",value:function(t){if(t.preventDefault(),this.onBeforeFileLoadCallback(t),t.target.value){var e=t.target.files[0];this.onFileLoadCallback(e);var i=this;t2().getData(e,function(){var t=t2().getTag(this,"Orientation");t3()(e,function(t,r){i.setState({image:t,file:e,showLoader:!1},function(){i.init()})},{orientation:t,meta:!0})})}}},{key:"onCloseClick",value:function(){var t=this;this.setState({showLoader:!0},function(){return t.onCloseCallback()})}},{key:"init",value:function(){var t,e,i=this.props,r=i.height,a=i.minCropRadius,s=i.cropRadius,o=this.image.width,h=this.image.height,l=h/o,c=this.props,d=c.imageWidth,u=c.imageHeight;
1u&&d&&console.warn("The imageWidth and imageHeight properties can not be set together, using only imageWidth."),u&&!d?e=(t=u||h)/l:d?t=(e=d)*l||h:e=(t=r||h)/l;var g=t/h,f=Math.max(a,s||Math.min(e,t)/3);this.setState({imgWidth:e,imgHeight:t,scale:g,cropRadius:f},this.initCanvas)}},{key:"initCanvas",value:function(){var t=this,e=this.initStage(),i=this.initBackground(),r=this.initShading(),a=this.initCrop(),s=this.initCropStroke(),o=this.initResize(),h=this.initResizeIcon(),l=new t0.Layer;l.add(i),l.add(r),l.add(s),l.add(a),l.add(o),l.add(h),e.add(l);var c=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return a.radius()-t},d=function(t){return a.x()-c(t)<0},u=function(t){return a.y()-c(t)<0},g=function(t){return a.x()+c(t)>e.width()},f=function(t){return a.y()+c(t)>e.height()},p=function(e){return c(e)>=t.minCropRadius?e:a.radius()-t.minCropRadius},m=function(t){return t+.86*a.radius()},v=function(t){return t-.5*a.radius()},y=function(t,e){o.x(m(t)-8),o.y(v(e)-8),h.x(m(t)-8),h.y(v(e)-10)},b=function(){if(t.props.exportAsSquare){var e=new t0.Image({image:t.image}),r=e.width()/i.width(),s=e.height()/i.height(),o=2*a.radius()*r,h=2*a.radius()*s,l=t.props.exportSize?t.props.exportSize/o:void 0;return e.toDataURL({x:(a.x()-a.radius())*r,y:(a.y()-a.radius())*s,width:o,height:h,pixelRatio:l,mimeType:t.props.exportMimeType,quality:t.props.exportQuality})}var c=2*a.radius(),d=2*a.radius(),u=t.props.exportSize?t.props.exportSize/c:void 0;return a.toDataURL({x:a.x()-a.radius(),y:a.y()-a.radius(),width:c,height:d,pixelRatio:u,mimeType:t.props.exportMimeType,quality:t.props.exportQuality})},C=function(t){var e=t>0||!(d(t)||g(t)||f(t)||u(t))?t:0;s.radius(s.radius()-p(e)),a.radius(a.radius()-p(e)),o.fire("resize")};this.onCropCallback(b()),a.on("dragmove",function(){return a.fire("resize")}),a.on("dragend",function(){return t.onCropCallback(b())}),a.on("resize",function(){var i=d()?a.radius()+1:g()?e.width()-a.radius()-1:a.x(),r=u()?a.radius()+1:f()?e.height()-a.radius()-1:a.y();y(i,r),a.setFillPatternOffset({x:i/t.scale,y:r/t.scale}),a.x(i),s.x(i),a.y(r),s.y(r)}),a.on("mouseenter",function(){return e.container().style.cursor="move"}),a.on("mouseleave",function(){return e.container().style.cursor="default"}),a.on("dragstart",function(){return e.container().style.cursor="move"}),a.on("dragend",function(){return e.container().style.cursor="default"}),o.on("touchstart",function(e){o.on("dragmove",function(i){"touchmove"===i.evt.type&&C((i.evt.changedTouches[0].pageY-e.evt.changedTouches[0].pageY||0)*t.mobileScaleSpeed)})}),o.on("dragmove",function(e){if("touchmove"!==e.evt.type){var i=e.evt.y,r=i?i-t.state.lastMouseY:void 0,a=e.evt.movementY||r||0;t.setState({lastMouseY:i}),C(a)}}),o.on("dragend",function(){return t.onCropCallback(b())}),o.on("resize",function(){return y(a.x(),a.y())}),o.on("mouseenter",function(){return e.container().style.cursor="nesw-resize"}),o.on("mouseleave",function(){return e.container().style.cursor="default"}),o.on("dragstart",function(i){t.setState({lastMouseY:i.evt.y}),e.container().style.cursor="nesw-resize"}),o.on("dragend",function(){return e.container().style.cursor="default"})}},{key:"initStage",value:function(){return new t0.Stage({container:this.containerId,width:this.width,height:this.height})}}
1,{key:"initBackground",value:function(){return new t0.Image({x:0,y:0,width:this.width,height:this.height,image:this.image})}},{key:"initShading",value:function(){return new t0.Rect({x:0,y:0,width:this.width,height:this.height,fill:this.shadingColor,strokeWidth:4,opacity:this.shadingOpacity})}},{key:"initCrop",value:function(){return new t0.Circle({x:this.halfWidth,y:this.halfHeight,radius:this.cropRadius,fillPatternImage:this.image,fillPatternOffset:{x:this.halfWidth/this.scale,y:this.halfHeight/this.scale},fillPatternScale:{x:this.scale,y:this.scale},opacity:1,draggable:!0,dashEnabled:!0,dash:[10,5]})}},{key:"initCropStroke",value:function(){return new t0.Circle({x:this.halfWidth,y:this.halfHeight,radius:this.cropRadius,stroke:this.cropColor,strokeWidth:this.lineWidth,strokeScaleEnabled:!0,dashEnabled:!0,dash:[10,5]})}},{key:"initResize",value:function(){return new t0.Rect({x:this.halfWidth+.86*this.cropRadius-8,y:this.halfHeight+-.5*this.cropRadius-8,width:16,height:16,draggable:!0,dragBoundFunc:function(t){return{x:this.getAbsolutePosition().x,y:t.y}}})}},{key:"initResizeIcon",value:function(){return new t0.Path({x:this.halfWidth+.86*this.cropRadius-8,y:this.halfHeight+-.5*this.cropRadius-10,data:"M47.624,0.124l12.021,9.73L44.5,24.5l10,10l14.661-15.161l9.963,12.285v-31.5H47.624z M24.5,44.5   L9.847,59.653L0,47.5V79h31.5l-12.153-9.847L34.5,54.5L24.5,44.5z",fill:this.cropColor,scale:{x:.2,y:.2}})}},{key:"render",value:function(){var t=this,e=this.props,i=e.width,a=e.height,s={display:"flex",justifyContent:"center",backgroundColor:this.backgroundColor,width:i||this.width,position:"relative"},o=this.props.label,h=ee(ee({},this.props.labelStyle),{lineHeight:(a||200)+"px"}),l=ee(ee({},this.props.borderStyle),{width:i||200,height:a||200});return r().createElement("div",null,this.state.showLoader?r().createElement("div",{style:l},r().createElement("input",{onChange:function(e){return t.onFileLoad(e)},name:this.loaderId,type:"file",id:this.loaderId,style:{width:.1,height:.1,opacity:0,overflow:"hidden",position:"absolute",zIndex:-1},accept:this.mimeTypes}),r().createElement("label",{htmlFor:this.loaderId,style:h},o)):r().createElement("div",{style:s},r().createElement("svg",{onClick:this.onCloseClick,style:{position:"absolute",zIndex:999,cursor:"pointer",left:"10px",top:"10px"},viewBox:"0 0 475.2 475.2",width:"20px",height:"20px"},r().createElement("g",null,r().createElement("path",{d:"M405.6,69.6C360.7,24.7,301.1,0,237.6,0s-123.1,24.7-168,69.6S0,174.1,0,237.6s24.7,123.1,69.6,168s104.5,69.6,168,69.6    s123.1-24.7,168-69.6s69.6-104.5,69.6-168S450.5,114.5,405.6,69.6z M386.5,386.5c-39.8,39.8-92.7,61.7-148.9,61.7    s-109.1-21.9-148.9-61.7c-82.1-82.1-82.1-215.7,0-297.8C128.5,48.9,181.4,27,237.6,27s109.1,21.9,148.9,61.7    C468.6,170.8,468.6,304.4,386.5,386.5z",fill:this.closeIconColor}),r().createElement("path",{d:"M342.3,132.9c-5.3-5.3-13.8-5.3-19.1,0l-85.6,85.6L152,132.9c-5.3-5.3-13.8-5.3-19.1,0c-5.3,5.3-5.3,13.8,0,19.1    l85.6,85.6l-85.6,85.6c-5.3,5.3-5.3,13.8,0,19.1c2.6,2.6,6.1,4,9.5,4s6.9-1.3,9.5-4l85.6-85.6l85.6,85.6c2.6,2.6,6.1,4,9.5,4    c3.5,0,6.9-1.3,9.5-4c5.3-5.3,5.3-13.8,0-19.1l-85.4-85.6l85.6-85.6C347.6,146.7,347.6,138.2,342.3,132.9z",fill:this.closeIconColor}))),r().createElement("div",{id:this.containerId})))}},{key:"lineWidth",get:function(){return this.props.lineWidth}},{key:"containerId",get:function(){return this.state.containerId}},{key:"closeIconColor",get:function(){return this.props.closeIconColor}},{key:"cropColor",get:function(){return this.props.cropColor}},{key:"loaderId",get:function(){return this.state.loaderId}},{key:"mimeTypes",get:function(){return this.props.mimeTypes}},{key:"backgroundColor",get:function(){return this.props.backgroundColor}},{key:"shadingColor",get:function(){return this.props.shadingColor}},{key:"shadingOpacity",get:function(){return this.props.shadingOpacity}},{key:"mobileScaleSpeed",get:function(){return this.props.mobileScaleSpeed}},{key:"cropRadius",get:function(){return this.state.cropRadius}},{key:"minCropRadius",get:function(){return this.props.minCropRadius}},{key:"scale",get:function(){return this.state.scale}},{key:"width",get:function(){return this.state.imgWidth}},{key:"halfWidth",get:function(){return this.state.imgWidth/2}},{key:"height",get:function(){return this.state.imgHeight}},{key:"halfHeight",get:function(){return this.state.imgHeight/2}},{key:"image",get:function(){return this.state.image}}],function(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(s.prototype,e),s}(r().Component);en(es,"defaultProps",{shadingColor:"grey",shadingOpacity:.6,cropColor:"white",closeIconColor:"white",lineWidth:4,minCropRadius:30,backgroundColor:"grey",mimeTypes:"image/jpeg,image/png",exportAsSquare:!1,exportSize:void 0,exportMimeType:"image/png",exportQuality:1,mobileScaleSpeed:.5,onClose:function(){},onCrop:function(){},onFileLoad:function(){},onImageLoad:function(){},onBeforeFileLoad:function(){}
1,label:"Choose a file",labelStyle:{fontSize:"1.25em",fontWeight:"700",color:"black",display:"inline-block",fontFamily:"sans-serif",cursor:"pointer"},borderStyle:{border:"2px solid #979797",borderStyle:"dashed",borderRadius:"8px",textAlign:"center"}});let eo=es})(),s}(i(14232))}}]);
2//# sourceMappingURL=2500.45be3b0a5c897e32.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.