/*! For license information please see main.1dc9b9d1.js.LICENSE.txt */ (()=>{var e={80559:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r={background:{default:"#f0f2f5"},text:{main:"#7b809a",focus:"#7b809a"},transparent:{main:"transparent"},white:{main:"#ffffff",focus:"#ffffff"},black:{light:"#000000",main:"#000000",focus:"#000000"},primary:{main:"#e91e63",focus:"#e91e63"},secondary:{main:"#7b809a",focus:"#8f93a9"},info:{main:"#1A73E8",focus:"#1662C4"},success:{main:"#4CAF50",focus:"#67bb6a"},warning:{main:"#fb8c00",focus:"#fc9d26"},error:{main:"#F44335",focus:"#f65f53"},light:{main:"#f0f2f5",focus:"#f0f2f5"},dark:{main:"#344767",focus:"#2c3c58"},grey:{100:"#f8f9fa",200:"#f0f2f5",300:"#dee2e6",400:"#ced4da",500:"#adb5bd",600:"#6c757d",700:"#495057",800:"#343a40",900:"#212529"},gradients:{primary:{main:"#EC407A",state:"#D81B60"},secondary:{main:"#747b8a",state:"#495361"},info:{main:"#49a3f1",state:"#1A73E8"},success:{main:"#66BB6A",state:"#43A047"},warning:{main:"#FFA726",state:"#FB8C00"},error:{main:"#EF5350",state:"#E53935"},light:{main:"#EBEFF4",state:"#CED4DA"},dark:{main:"#42424a",state:"#191919"}},socialMediaColors:{facebook:{main:"#3b5998",dark:"#344e86"},twitter:{main:"#55acee",dark:"#3ea1ec"},instagram:{main:"#125688",dark:"#0e456d"},linkedin:{main:"#0077b5",dark:"#00669c"},pinterest:{main:"#cc2127",dark:"#b21d22"},youtube:{main:"#e52d27",dark:"#d41f1a"},vimeo:{main:"#1ab7ea",dark:"#13a3d2"},slack:{main:"#3aaf85",dark:"#329874"},dribbble:{main:"#ea4c89",dark:"#e73177"},github:{main:"#24292e",dark:"#171a1d"},reddit:{main:"#ff4500",dark:"#e03d00"},tumblr:{main:"#35465c",dark:"#2a3749"}},badgeColors:{primary:{background:"#f8b3ca",text:"#cc084b"},secondary:{background:"#d7d9e1",text:"#6c757d"},info:{background:"#aecef7",text:"#095bc6"},success:{background:"#bce2be",text:"#339537"},warning:{background:"#ffd59f",text:"#c87000"},error:{background:"#fcd3d0",text:"#f61200"},light:{background:"#ffffff",text:"#c7d3de"},dark:{background:"#8097bf",text:"#1e2e4a"}},coloredShadows:{primary:"#e91e62",secondary:"#110e0e",info:"#00bbd4",success:"#4caf4f",warning:"#ff9900",error:"#f44336",light:"#adb5bd",dark:"#404040"},inputBorderColor:"#d2d6da",tabs:{indicator:{boxShadow:"#ddd"}}}},46626:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(80559),i=n(79948);const{dark:a}=r.A,o={fontFamily:'"Roboto", "Helvetica", "Arial", sans-serif',fontWeightLighter:100,fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:600,fontWeightBold:700,fontSizeXXS:(0,i.A)(10.4),fontSizeXS:(0,i.A)(12),fontSizeSM:(0,i.A)(14),fontSizeMD:(0,i.A)(16),fontSizeLG:(0,i.A)(18),fontSizeXL:(0,i.A)(20),fontSize2XL:(0,i.A)(24),fontSize3XL:(0,i.A)(30)},s={fontFamily:o.fontFamily,color:a.main,fontWeight:o.fontWeightBold},l={fontFamily:o.fontFamily,color:a.main,fontWeight:o.fontWeightLight,lineHeight:1.2},c={fontFamily:o.fontFamily,fontWeightLighter:o.fontWeightLighter,fontWeightLight:o.fontWeightLight,fontWeightRegular:o.fontWeightRegular,fontWeightMedium:o.fontWeightMedium,fontWeightBold:o.fontWeightBold,h1:{fontSize:(0,i.A)(48),lineHeight:1.25,...s},h2:{fontSize:(0,i.A)(36),lineHeight:1.3,...s},h3:{fontSize:(0,i.A)(30),lineHeight:1.375,...s},h4:{fontSize:(0,i.A)(24),lineHeight:1.375,...s},h5:{fontSize:(0,i.A)(20),lineHeight:1.375,...s},h6:{fontSize:(0,i.A)(16),lineHeight:1.625,...s},subtitle1:{fontFamily:o.fontFamily,fontSize:o.fontSizeXL,fontWeight:o.fontWeightLight,lineHeight:1.625},subtitle2:{fontFamily:o.fontFamily,fontSize:o.fontSizeMD,fontWeight:o.fontWeightLight,lineHeight:1.6},body1:{fontFamily:o.fontFamily,fontSize:o.fontSizeXL,fontWeight:o.fontWeightRegular,lineHeight:1.625},body2:{fontFamily:o.fontFamily,fontSize:o.fontSizeMD,fontWeight:o.fontWeightLight,lineHeight:1.6},button:{fontFamily:o.fontFamily,fontSize:o.fontSizeSM,fontWeight:o.fontWeightLight,lineHeight:1.5,textTransform:"uppercase"},caption:{fontFamily:o.fontFamily,fontSize:o.fontSizeXS,fontWeight:o.fontWeightLight,lineHeight:1.25},overline:{fontFamily:o.fontFamily},d1:{fontSize:(0,i.A)(80),...l},d2:{fontSize:(0,i.A)(72),...l},d3:{fontSize:(0,i.A)(64),...l},d4:{fontSize:(0,i.A)(56),...l},d5:{fontSize:(0,i.A)(48),...l},d6:{fontSize:(0,i.A)(40),...l},size:{xxs:o.fontSizeXXS,xs:o.fontSizeXS,sm:o.fontSizeSM,md:o.fontSizeMD,lg:o.fontSizeLG,xl:o.fontSizeXL,"2xl":o.fontSize2XL,"3xl":o.fontSize3XL},lineHeight:{sm:1.25,md:1.5,lg:2}}},79948:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=function(e){return e/(arguments.length>1&&void 0!==arguments[1]?arguments[1]:16)+"rem"}},50160:(e,t,n)=>{"use strict";n.d(t,{d:()=>i,z:()=>r});const r={title:{en:"UF BRAVO",zh:"\u4f5b\u5927BRAVO\u5e73\u53f0"},SimplifiedNavbar:{HomePage:{en:"HomePage",zh:"\u4e3b\u9875"},Dashboard:{en:"Dashboard",zh:"\u5e73\u53f0"},LoginRegister:{en:"Login/Register",zh:"\u767b\u9646/\u6ce8\u518c"},Login:{en:"Login",zh:"\u767b\u9646"},Logout:{en:"Logout",zh:"\u767b\u51fa"},Profile:{en:"Profile",zh:"\u8d26\u53f7\u4fe1\u606f"},Register:{en:"Register",zh:"\u6ce8\u518c"},Documentation:{en:"Documentation",zh:"\u8d44\u6599"},ChangeLanguage:{en:"Change Language",zh:"\u66f4\u6539\u8bed\u8a00"},ChangeBRAVOVersion:{en:"Redirect BRAVO Version",zh:"\u66f4\u6539\u7f51\u9875\u7248\u672c"},ChangeServer:{en:"Change Database Host",zh:"\u66f4\u6539\u6570\u636e\u5e93\u5730\u5740"},Localhost:{en:"localhost:3001 (Standard Port)",zh:"localhost:3001 (\u57fa\u7840\u7aef\u53e3)"},DemoServer:{en:"Demo Server",zh:"\u6d4b\u8bd5\u7528\u670d\u52a1\u5668"},CustomizedServer:{en:"Enter Customized Server Endpoint",zh:"\u81ea\u5236\u670d\u52a1\u5668"}},Register:{AccountRegister:{en:"Account Registration",zh:"\u8d26\u53f7\u6ce8\u518c"},UserName:{en:"Name",zh:"\u540d\u5b57"},Email:{en:"Email",zh:"\u90ae\u7bb1"},Password:{en:"Password",zh:"\u5bc6\u7801"},Register:{en:"Register",zh:"\u6ce8\u518c"},IndependentUser:{en:"Independent User",zh:"\u65e0\u6240\u5c5e"},SelectInstitute:{en:"Select Institute",zh:"\u9009\u62e9\u6240\u5c5e\u673a\u6784"},LoginAccount:{en:"Login Here",zh:"\u70b9\u6b64\u767b\u9646"},Agree:{en:"I agree the",zh:"\u6211\u540c\u610f\u8be5\u670d\u52a1\u5668\u7684"},Disclaimer:{en:"Terms and Conditions",zh:"\u6761\u6b3e\u4e0e\u7ec6\u5219"},DisclaimerContent:{en:"###################################\n\n #######################################\n\n ####################################",zh:'This is a demo website for the UF BRAVO Platform submitted for publication.\n Registered Accounts are by default "Researcher-only" accounts without ability to view identified data.\n The platform is hosted in a cloud-server and data are stored in cloud server to demonstrate long-term data analysis capability.\n Please upload data with that in mind and upload deidentified data only.'}},Login:{AccountLogin:{en:"Account Authentication",zh:"\u8d26\u53f7\u767b\u9646"},Email:{en:"Email",zh:"\u90ae\u7bb1"},Password:{en:"Password",zh:"\u5bc6\u7801"},Login:{en:"Login",zh:"\u767b\u9646"},NoAccount:{en:"Don't have an account?",zh:"\u6ca1\u6709\u8d26\u53f7\uff1f"},CreateAccount:{en:"Create Account",zh:"\u6ce8\u518c\u8d26\u53f7"},ResetPassword:{en:"Reset Password",zh:"\u91cd\u7f6e\u5bc6\u7801"}},HomePage:{title:{en:"Brain Recording And Visualization Online",zh:"Brain Recording And Visualization Online"}},Dashboard:{TitleMessage:{en:"Database Dashboard",zh:"\u670d\u52a1\u5668\u6570\u636e\u4e3b\u5e73\u53f0"},TitleMessageSub:{en:"An overview of our datbase statistic so far",zh:"\u76ee\u524d\u670d\u52a1\u5668\u5185\u7684\u6570\u636e\u603b\u7ed3"},TotalParticipants:{en:"Total Participants",zh:"\u75c5\u4eba\u6570"},TotalRecordings:{en:"Total Recordings",zh:"\u8111\u7535\u8bb0\u5f55\u603b\u6570"},TotalStorage:{en:"Storage Used",zh:"\u670d\u52a1\u5668\u5df2\u7528\u5bb9\u91cf"},ParticipantTable:{en:"Accessible Participants",zh:"\u53ef\u67e5\u8be2\u7684\u75c5\u4eba"},AddNewSession:{en:"Add New Sessions",zh:"\u4e0a\u4f20\u65b0\u6570\u636e"},SearchParticipant:{en:"Search Participants Here",zh:"\u68c0\u7d22\u75c5\u4eba\u6570\u636e"},SearchResult:{en:"Total Participant Count: ",zh:"\u68c0\u7d22\u6570\uff1a"},ParticipantTableName:{en:"Name",zh:"\u540d\u5b57"},ParticipantTableDiagnosis:{en:"Diagnosis",zh:"\u8bca\u65ad"},ParticipantTableDevice:{en:"Devices",zh:"\u4eea\u5668\u540d\u5b57"},ParticipantTableLastVisit:{en:"Last Visit Date",zh:"\u6700\u540e\u4f1a\u8bca\u65f6\u95f4"},ParticipantTableLastModified:{en:"Last Modified Date",zh:"\u6700\u540e\u4e0a\u4f20\u65f6\u95f4"},ParticipantTablePrevious:{en:"PREVIOUS",zh:"\u4e0a\u4e00\u9875"},ParticipantTableNext:{en:"NEXT",zh:"\u4e0b\u4e00\u9875"}},Surveys:{SurveyList:{en:"Available Surveys",zh:"Available Surveys"},AddNewSurvey:{en:"Add New Survey",zh:"Add New Survey"},EnterSurveyName:{en:"Enter Survey Name",zh:"Enter Survey Name"},SearchSurvey:{en:"Search Survey",zh:"Search Survey"},SurveyTableName:{en:"Name",zh:"\u540d\u5b57"},SurveyTableURL:{en:"URL",zh:"URL"},SurveyTableDate:{en:"Created Date",zh:"Created Date"},RedcapTableName:{en:"Redcap Survey Name",zh:"Redcap Survey \u540d\u5b57"},TwilioInfo:{en:"Twilio Info",zh:"Twilio Info"},CurrentSchedule:{en:"Current Schedule",zh:"Current Schedule"},ParticipantTablePrevious:{en:"PREVIOUS",zh:"\u4e0a\u4e00\u9875"},ParticipantTableNext:{en:"NEXT",zh:"\u4e0b\u4e00\u9875"}},ParticipantOverview:{EditParticipantInfo:{en:"Edit Participant Information",zh:"\u4fee\u6539\u75c5\u4eba\u4fe1\u606f"},EditDeviceInfo:{en:"Edit Device Information",zh:"\u4fee\u6539\u8109\u51b2\u53d1\u751f\u5668\u4fe1\u606f"},TagNames:{en:"Select or Add Tag Names",zh:"Select or Add Tag Names"},UploadNewSession:{en:"Upload New Sessions",zh:"\u4e0a\u4f20\u65b0\u6570\u636e"},AddNewDevice:{en:"Add New Device",zh:"\u6dfb\u52a0\u65b0\u8109\u51b2\u53d1\u751f\u5668"},DeleteParticipant:{en:"Delete Participant Entry",zh:"\u5220\u9664\u75c5\u4eba\u6570\u636e"},DeviceTable:{DeviceType:{en:"Device Type",zh:"\u8109\u51b2\u53d1\u751f\u5668\u7c7b\u578b"},DeviceName:{en:"Device Name",zh:"\u8109\u51b2\u53d1\u751f\u5668\u540d\u5b57"},Electrodes:{en:"Connected Electrodes",zh:"\u7535\u6781"},ElectrodeType:{en:"Electrode Type",zh:"Electrode Type"},ElectrodeChannel:{en:"Electrode Channel",zh:"Electrode Channel"},ImplantDate:{en:"Implant Date",zh:"\u690d\u5165\u65e5\u671f"},DeviceLocation:{en:"Device Location",zh:"\u690d\u5165\u4f4d\u7f6e"},LastAccessDate:{en:"Last Access Date",zh:"\u6700\u540e\u8bb0\u5f55\u65e5\u671f"},BatteryEOL:{en:"Battery EOL Estimate",zh:"\u9884\u6d4b\u7535\u91cf\u8017\u5c3d\u65e5\u671f"},BatteryPercent:{en:"Battery Percentage Remains",zh:"\u5269\u4f59\u7535\u91cf"}},ParticipantInformation:{Name:{en:"Name",zh:"\u59d3\u540d"},Diagnosis:{en:"Diagnosis",zh:"\u8bca\u65ad"},DOB:{en:"Date of Birth",zh:"\u51fa\u751f\u5e74\u6708\u65e5"},MRN:{en:"Medical Record Number",zh:"\u533b\u7597\u8bb0\u5f55\u53f7"},ClinicianNotes:{en:"Clinician Notes",zh:"\u533b\u62a4\u7b14\u8bb0"},ParkinsonsDisease:{en:"Parkinson's Disease",zh:"\u5e15\u91d1\u68ee\u75be\u75c5"},EssentialTremor:{en:"Essential Tremor",zh:"\u7279\u53d1\u6027\u9707\u98a4"},Dystonia:{en:"Dystonia",zh:"\u808c\u5f20\u529b\u969c\u788d"},Epilepsy:{en:"Epilepsy",zh:"\u766b\u75eb"},Other:{en:"Other Diagnosis",zh:"\u5176\u4ed6"},View:{en:"View",zh:"\u67e5\u770b"}}},TherapyHistory:{Table:{TableTitle:{en:"Detail Therapy Setting Table",zh:"\u8be6\u7ec6\u5386\u53f2\u8bb0\u5f55"},"Past Therapy":{en:"Past Therapy",zh:"\u5386\u53f2\u8bb0\u5f55"},"Pre-visit Therapy":{en:"Pre-visit Therapy",zh:"\u5c31\u8bca\u524d\u8bbe\u5b9a"},"Post-visit Therapy":{en:"Post-visit Therapy",zh:"\u5c31\u8bca\u540e\u8bbe\u5b9a"},CyclingOn:{en:"Cycling Stimulation",zh:"\u5faa\u73af\u523a\u6fc0"},CyclingOff:{en:"Continuous Stimulation",zh:"\u6301\u7eed\u523a\u6fc0"},ImpedanceTable:{en:"Electrode Impedance State",zh:"\u7535\u6781\u963b\u6297\u8bb0\u5f55"}},Figure:{TherapyChangeLog:{en:"Therapy Change Log",zh:"\u7597\u6cd5\u5386\u53f2\u8bb0\u5f55"},TherapyGroup:{en:"Therapy Group",zh:"\u7597\u6cd5\u8bbe\u7f6e"},ImpedanceHistory:{en:"Impedance History",zh:"Impedance History"},Impedance:{en:"Impedance",zh:"Impedance"}}},BrainSenseSurvey:{Select:{Session:{en:"Select Session to View",zh:"\u9009\u62e9\u8bb0\u5f55 - \u5bf9\u6bd4\u9891\u9053"},Channel:{en:"Select Channel to View",zh:"\u67e5\u770b\u9891\u9053 - \u8bb0\u5f55\u53d8\u8fc1"}},Figure:{BetaBand:{en:"Beta Band",zh:"\u03b2\u6ce2\u6bb5"}}},TherapeuticAnalysis:{Table:{TableTitle:{en:"Select Recording Date",zh:"\u9009\u62e9\u65e5\u671f"},StreamingTableDate:{en:"Recording Time",zh:"\u65e5\u671f"},StreamingTableChannels:{en:"Recording Channels",zh:""},StreamingTableTherapy:{en:"Therapy Overview",zh:""},StreamingTableRecordingDuration:{en:"Recording Duration",zh:"\u603b\u8bb0\u5f55\u65f6\u95f4"},StimMode:{en:"Mode",zh:"\u6a21\u5f0f"},AdaptiveMode:{en:"Adaptive Parameters",zh:"Adaptive Parameters"},Reference:{en:"Stimulation Reference",zh:"Stimulation Reference"}},Figure:{RawData:{en:"Neural Streaming Raw Data",zh:"\u8111\u7535\u6ce2\u8bb0\u5f55\u539f\u59cb\u6570\u636e"},CardiacFilter:{Add:{en:"Add Cardiac Filter",zh:"\u8fc7\u6ee4ECG"},Remove:{en:"Remove Cardiac Filter",zh:"\u53d6\u6d88\u8fc7\u6ee4ECG"}},Wavelet:{Add:{en:"Use Wavelet Transform",zh:"\u8fc7\u6ee4ECG"},Remove:{en:"Use Standard Spectrogram",zh:"\u53d6\u6d88\u8fc7\u6ee4ECG"}},SFFT:{en:"Use Short-time FFT Transform",zh:"Use Short-time FFT Transform"},TimeFrequencyAnalysis:{en:"Time-Frequency Analysis",zh:"\u65f6\u9891\u5206\u6790"},PowerChannel:{en:"Power Band",zh:"\u677f\u8f7d\u9891\u8c31\u80fd\u91cf"},Stimulation:{en:"Stimulation Amplitude",zh:"\u523a\u6fc0\u5e45\u5ea6"},EffectOfStim:{en:"Neural Response from Effect of Stimulation",zh:"\u8111\u7535\u523a\u6fc0\u540e\u7684\u795e\u7ecf\u53cd\u5e94"}}},IndefiniteStreaming:{Table:{TableTitle:{en:"Select Recording Date",zh:"\u9009\u62e9\u65e5\u671f"},IndefiniteStreamTableDate:{en:"Recordinhg Date",zh:"\u65e5\u671f"},IndefiniteStreamTableCheck:{en:"",zh:""},IndefiniteStreamTableDuration:{en:"Recording Duration",zh:"\u6301\u7eed\u8bb0\u5f55\u65f6\u95f4"},IndefiniteStreamTableRequestData:{en:"Display Result",zh:"\u663e\u793a\u6570\u636e"}}},ChronicBrainSense:{Select:{Device:{en:"Select Device to View",zh:"Select Device to View"},Channel:{en:"Select Channel to View",zh:"\u67e5\u770b\u9891\u9053"},Therapy:{en:"Select Therapy Group to View",zh:"\u6839\u636e\u6cbb\u7597\u7ec4\u67e5\u770b\u6570\u636e"}},Figure:{FigureTitle:{en:"Chronic Neural Activity Timeline",zh:"\u957f\u671f\u8111\u7535\u8bb0\u5f55\u65f6\u95f4\u7ebf"}}},SessionOverview:{SessionList:{en:"Session List",zh:"Session List"},SessionOverview:{en:"Session Overview",zh:"Session Overview"},SessionEMR:{en:"Format for EMR",zh:"Format for EMR"},SessionDate:{en:"Session Date",zh:"Session Date"},SessionName:{en:"JSON Filename",zh:"JSON Filename"},SessionData:{en:"Available Data",zh:"Available Data"},TherapyConfiguration:{en:"Therapy Configurations",zh:"Therapy Configurations"},PreviousTherapy:{en:"Previous Therapy Groups",zh:"Previous Therapy Groups"},NewTherapy:{en:"New Therapy Groups",zh:"New Therapy Groups"},LeftHemisphere:{en:"Left",zh:"Left"},RightHemisphere:{en:"Right",zh:"Right"},Select:{Session:{en:"Select Session to View",zh:"\u9009\u62e9\u8bb0\u5f55 - \u5bf9\u6bd4\u9891\u9053"},Channel:{en:"Select Channel to View",zh:"\u67e5\u770b\u9891\u9053 - \u8bb0\u5f55\u53d8\u8fc1"}},Figure:{BetaBand:{en:"Beta Band",zh:"\u03b2\u6ce2\u6bb5"}}},PatientEvents:{Select:{NormalizeEventCount:{en:"View Normalized Event Count (%)",zh:"\u6309\u767e\u5206\u6bd4\u663e\u793a\u8bb0\u5f55"}},Figure:{EventFrequency:{en:"Patient Events Frequency Timeline",zh:"\u6807\u8bb0\u4e8b\u4ef6\u8bb0\u5f55\u65f6\u95f4\u8868"},EventFrequencyTimeRange:{en:"Patient Events Frequency (Within Time-Range)",zh:"\u6807\u8bb0\u4e8b\u4ef6\u8bb0\u5f55\u65f6\u95f4\u8868\uff08\u9650\u5b9a\u65f6\u95f4\u8303\u56f4\uff09"},ClinicianEvents:{en:"Event Annotations",zh:"Event Annotations"}},Table:{Checked:{en:"",zh:""},EventName:{en:"Event Name",zh:"Event Name"},EventTime:{en:"Event Time",zh:"Event Time"},EventType:{en:"Event Type",zh:"Event Type"}}},AdaptiveStimulation:{Table:{SelectDevice:{en:"Select Device",zh:"Select Device"}},Figure:{ChronicAdaptive:{en:"Adaptive Stimulation Timeline",zh:"\u95ed\u73af\u6cbb\u7597\u65f6\u95f4\u8868"}}},CircadianThreshold:{AdaptiveGroups:{en:"Current Therapy Groups for Adaptive",zh:"Current Therapy Groups for Adaptive"},Figure:{ChronicAdaptive:{en:"Adaptive Stimulation Timeline",zh:"\u95ed\u73af\u6cbb\u7597\u65f6\u95f4\u8868"}}},ImageVisualization:{Title:{en:"3D Model Renderer",zh:"3D Model Renderer"},AddItem:{en:"Add Item",zh:"Add Item"}},TherapeuticPrediction:{Table:{StreamingTableDate:{en:"Recording Time",zh:"\u65e5\u671f"},RecordingDetails:{en:"Recording Details",zh:""},ModelOutcome:{en:"Model Features",zh:""},PredictedConfidence:{en:"Prediction Score",zh:""},SuggestedSettings:{en:"Suggested Settings: ",zh:"\u63a8\u8350\u8bbe\u5b9a\uff1a"},"Left Ring":{en:"Optimal Left Hemisphere Ring Stimulation",zh:"\u5de6\u8111\u534a\u7403 \u63a8\u8350\u8bbe\u5b9a\uff08360\xb0\uff09"},"Left Segment":{en:"Optimal Left Hemisphere Segmented Stimulation",zh:"\u5de6\u8111\u534a\u7403 \u63a8\u8350\u8bbe\u5b9a\uff08\u5206\u6bb5\uff09"},"Right Ring":{en:"Optimal Right Hemisphere Ring Stimulation",zh:"\u53f3\u8111\u534a\u7403 \u63a8\u8350\u8bbe\u5b9a\uff08360\xb0\uff09"},"Right Segment":{en:"Optimal Right Hemisphere Segmented Stimulation",zh:"\u53f3\u8111\u534a\u7403 \u63a8\u8350\u8bbe\u5b9a\uff08\u5206\u6bb5\uff09"},NoOptimalSettings:{en:"Cannot determine optimal therapy settings from these recordings.",zh:"\u65e0\u6cd5\u65ad\u5b9a\u6700\u4f73\u6cbb\u7597\u8bbe\u5b9a"},Monopolar:{en:"Monopolar",zh:""}},Figure:{FigureTitle:{en:"Chronic Neural Activity Timeline",zh:"\u957f\u671f\u8111\u7535\u8bb0\u5f55\u65f6\u95f4\u7ebf"}}},MultipleSegmentAnalysis:{Table:{Compare:{en:"Compare",zh:"Compare"}},Figure:{FigureTitle:{en:"Chronic Neural Activity Timeline",zh:"\u957f\u671f\u8111\u7535\u8bb0\u5f55\u65f6\u95f4\u7ebf"}}},Wearable:{Title:{en:"Pairing External Sensors",zh:"Pairing External Sensors"},NewPair:{en:"Pair New Device",zh:"Pair New Device"}},Breadcrumbs:{dashboard:{en:"Dashboard",zh:"\u4e3b\u5e73\u53f0"},"deidentification-table":{en:"Patient Lookup Table",zh:"Patient Lookup Table"},"access-permissions":{en:"Access Permission List",zh:"Access Permission List"},reports:{en:"Reports",zh:"\u6c47\u62a5"},experimental:{en:"Experimental",zh:"\u5b9e\u9a8c\u529f\u80fd"},"participant-overview":{en:"Participant Overview",zh:"\u75c5\u4eba\u6570\u636e\u603b\u7ed3"},"therapy-history":{en:"Past Therapy Settings",zh:"\u8fc7\u53bb\u6cbb\u7597\u8bb0\u5f55"},survey:{en:"BrainSense\u2122 Surveys",zh:"\u8111\u7535\u4fe1\u53f7\u6d4b\u91cf"},stream:{en:"Neural Activity Streaming",zh:"\u8111\u7535\u5b9e\u65f6\u8bb0\u5f55"},multistream:{en:"Multi-Channel Streaming",zh:"\u591a\u7ebf\u7a0b\u8111\u7535\u5b9e\u65f6\u8bb0\u5f55"},"chronic-recordings":{en:"Chronic Neural Activity Recordings",zh:"\u957f\u671f\u8111\u7535\u8bb0\u5f55"},"session-overview":{en:"Session Overview",zh:"Session Overview"},session:{en:"Clinic Session Reports",zh:"Clinic Session Reports"},"therapeutic-prediction":{en:"Predict Optimal Therapy Settings",zh:"\u8ba1\u7b97\u6700\u4f73\u7597\u6cd5"},"segment-analysis":{en:"Multiple Segment Analysis",zh:"Multiple Segment Analysis"},"patient-events":{en:"Patient Events",zh:"\u6807\u8bb0\u4e8b\u4ef6\u8bb0\u5f55"},adaptive:{en:"Adaptive Stimulation",zh:"\u95ed\u73af\u529f\u80fd"},circadian:{en:"Circadian Threshold",zh:"Circadian Threshold"},visualize:{en:"Image Visualization",zh:"Image Visualization"},wearable:{en:"Wearable Stream",zh:"Wearable Stream"},mobile:{en:"Mobile App Manager",zh:"Mobile App Manager"},analysis:{en:"Analysis Builder",zh:"Analysis Builder"},surveys:{en:"Surveys",zh:"Surveys"}},Routes:{Dashboard:{en:"Dashboard",zh:"\u4e3b\u5e73\u53f0"},StudyManagement:{en:"Study Management",zh:"\u7814\u7a76\u7ba1\u7406"},AsyncJobScheduleTable:{en:"Async Job Schedules",zh:"\u5f02\u6b65\u4f5c\u4e1a\u8c03\u5ea6"},ShareResearchAccess:{en:"Access Permission List",zh:"Access Permission List"},Experiments:{en:"Experiments",zh:"\u5b9e\u9a8c\u7edf\u8ba1"},Reports:{en:"Reports",zh:"\u6c47\u62a5"},UploadRawData:{en:"Upload Data",zh:"\u4e0a\u4f20\u6570\u636e"},UploadDeidentifiedData:{en:"Upload Deidentified Data",zh:"\u4e0a\u4f20\u6570\u636e\uff08\u65e0PHI\uff09"},GeneralReports:{en:"General Reports",zh:"\u666e\u901a\u62a5\u544a"},ImagingReports:{en:"Imaging Analysis Reports",zh:"\u8111\u6210\u50cf"},Experimental:{en:"Experimental",zh:"\u5b9e\u9a8c\u529f\u80fd"},ParticipantOverview:{en:"Participant Overview",zh:"\u75c5\u4eba\u6570\u636e\u603b\u7ed3"},TherapyHistory:{en:"Past Therapy Settings",zh:"\u8fc7\u53bb\u6cbb\u7597\u8bb0\u5f55"},BrainSenseSurvey:{en:"BrainSense\u2122 Surveys",zh:"\u8111\u7535\u4fe1\u53f7\u6d4b\u91cf"},BrainSenseStreaming:{en:"Neural Activity Streaming",zh:"\u8111\u7535\u5b9e\u65f6\u8bb0\u5f55"},IndefiniteStreaming:{en:"Multi-Channel Activity",zh:"\u591a\u7ebf\u7a0b\u8111\u7535\u5b9e\u65f6\u8bb0\u5f55"},ChronicRecordings:{en:"Chronic Neural Activity",zh:"\u957f\u671f\u8111\u7535\u8bb0\u5f55"},SessionOverview:{en:"Session Overview",zh:"Session Overview"},TherapeuticPrediction:{en:"Therapy Prediction",zh:"\u8ba1\u7b97\u6700\u4f73\u7597\u6cd5"},MultipleSegmentAnalysis:{en:"Multiple Segment Analysis",zh:"Multiple Segment Analysis"},ParticipantEvents:{en:"Patient Events",zh:"\u6807\u8bb0\u4e8b\u4ef6\u8bb0\u5f55"},AdaptiveStimulation:{en:"Adaptive Stimulation",zh:"\u95ed\u73af\u529f\u80fd"},CircadianThreshold:{en:"Circadian Threshold",zh:"Circadian Threshold"},ImageVisualization:{en:"Image Visualization",zh:"Image Visualization"},WearableStream:{en:"Wearable Stream",zh:"Wearable Stream"},MobileManager:{en:"Mobile App Manager",zh:"Mobile App Manager"},CustomizedAnalysis:{en:"Analysis Builder",zh:"Analysis Builder"},TremorStudy:{en:"Tremor Study",zh:"Tremor Study"},Surveys:{en:"Surveys",zh:"Surveys"}},Time:{Days:{en:"days.",zh:"\u5929"},Minutes:{en:"minutes",zh:"\u5206"},Seconds:{en:"sec.",zh:"\u79d2"}},Segments:{Ring:{en:"Ring Stim",zh:"\u73af"},"Segment A":{en:"Segment A",zh:"A\u6bb5"},"Segment B":{en:"Segment B",zh:"B\u6bb5"},"Segment C":{en:"Segment C",zh:"C\u6bb5"},"Segment AB":{en:"Segment AB",zh:"AB\u6bb5"},"Segment AC":{en:"Segment AC",zh:"AC\u6bb5"},"Segment BC":{en:"Segment BC",zh:"BC\u6bb5"}},WarningMessage:{WARNING:{en:"WARNING",zh:"\u8bf7\u6ce8\u610f\uff01"},DeletePatient:{Title:{en:"About to Delete a Patient Entry",zh:"\u5373\u5c06\u6e05\u9664\u75c5\u4eba\u6863\u6848"},Description:{en:"Are you sure you want to proceed?",zh:"\u8bf7\u786e\u5b9a\u8fd9\u662f\u4f60\u60f3\u505a\u7684"}},Confirm:{en:"Confirm",zh:"\u786e\u5b9a"},Cancel:{en:"Cancel",zh:"\u53d6\u6d88"},NoData:{en:"No Available Data",zh:"\u65e0\u6570\u636e"},Loading:{en:"Loading Data",zh:"\u8f7d\u5165\u4e2d"}},BrainRegions:{STN:{en:"Subthalamic Nuclei",zh:"\u4e18\u8111\u5e95\u6838"},GPi:{en:"Globus Pallidus Internus",zh:"\u5185\u82cd\u767d\u7403"},GPe:{en:"Globus Pallidus Externus",zh:"\u5916\u82cd\u767d\u7403"},VIM:{en:"VIM of Thalamus",zh:"\u4e18\u8111\u8179\u4e2d\u95f4\u6838"},GPI:{en:"Globus Pallius Internus",zh:"\u5185\u82cd\u767d\u7403"},Other:{en:"Other",zh:"Other"}},FigureStandardText:{Frequency:{en:"Frequency",zh:"\u9891\u7387"},Power:{en:"Power",zh:"\u529f\u7387"},Amplitude:{en:"Amplitude",zh:"\u6ce2\u5e45"},Stimulation:{en:"Stimulation Amplitude",zh:"\u7535\u91cf\u5e45\u5ea6"},Time:{en:"Time",zh:"\u65f6\u95f4"},Left:{en:"Left",zh:"\u5de6"},Right:{en:"Right",zh:"\u53f3"},Export:{en:"Export",zh:"\u5bfc\u51fa\u6570\u636e"}},FigureStandardUnit:{Hertz:{en:"Hz",zh:"\u8d6b"},dBHz:{en:"dB/Hz",zh:"\u5206\u8c9d/\u8d6b"},dB:{en:"dB",zh:"\u5206\u8c9d"},mV:{en:"mV",zh:"\u6beb\u4f0f"},uV:{en:"\u03bcV",zh:"\u5fae\u4f0f"},mA:{en:"mA",zh:"\u6beb\u5b89"},Local:{en:"Local Time",zh:"\u672c\u5730\u65f6\u95f4"},uV2Hz:{en:"\u03bcV2/Hz",zh:"\u5fae\u4f0f2/\u8d6b"},uS:{en:"\u03bcSec",zh:"\u5fae\u79d2"},AU:{en:"a.u.",zh:"\u65e0\u5355\u4f4d"}},ErrorMessage:{ERROR:{en:"ERROR",zh:"\u51fa\u9519"},INCORRECT_PASSWORD_OR_USERNAME:{en:"Incorrect password or username",zh:"\u9519\u8bef\u7684\u7528\u6237\u540d\u6216\u5bc6\u7801"},PASSWORD_LENGTH_ERROR:{en:"Password must be more than 8 characters",zh:"\u5bc6\u7801\u6700\u5c11\u4e3a8\u4f4d"},EMAIL_VALIDATION_ERROR:{en:"Email validation error.",zh:"\u90ae\u7bb1\u683c\u5f0f\u9519\u8bef"},EMAIL_USED_ERROR:{en:"Email already used.",zh:"\u63d0\u4ea4\u7684\u90ae\u7bb1\u5df2\u6ce8\u518c"},IMPROPER_SUBMISSION:{en:"Server does not accept your submission",zh:"\u63d0\u4ea4\u7684\u6570\u636e\u4e0d\u7b26\u5408\u540e\u53f0\u8981\u6c42"},DATA_NOT_FOUND:{en:"Cannot Load Selected Data. Data not found.",zh:"\u65e0\u6cd5\u8f7d\u5165\u9009\u62e9\u7684\u6570\u636e\uff0c\u6570\u636e\u5e93\u65e0\u6b64\u6570\u636e"},MALFORMATED_REQUEST:{en:"Malformated Request",zh:"\u4e0d\u5408\u89c4\u8303\u7684\u6570\u636e"},NOT_AVAILABLE_TO_DEMO:{en:"The requested data is not available for Demo",zh:"\u6d4b\u8bd5\u7528\u670d\u52a1\u5668\u65e0\u6cd5\u4f7f\u7528\u8be5\u529f\u80fd"},INTERNAL_SERVER_ERROR:{en:"Internal Server Error",zh:"\u540e\u53f0\u9519\u8bef"},ENDPOINT_NOT_EXIST:{en:"Server Endpoint does not exist.",zh:"\u65e0\u6cd5\u627e\u5230\u5bf9\u5e94\u670d\u52a1\u5668\u8282\u70b9"},PERMISSION_DENIED:{en:"You do not have the permission",zh:"\u4f60\u6ca1\u6709\u6743\u9650\u6d4f\u89c8"},CONNECTION_TIMEDOUT:{en:"Connection Timed-Out",zh:"\u8fde\u63a5\u5df2\u8d85\u65f6"},UNKNOWN_ERROR:{en:"Unknown Error",zh:"\u672a\u77e5\u9519\u8bef"}}},i=(e,t,n)=>e[t]?e[t][n]:t},37957:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var r=n(78982),i=n(36080),a=n(49989),o=n(52498),s=n(46626),l=n(7774),c=n(44414);function u(e){let{light:t}=e;const{size:n}=s.A,[u]=(0,l.mv)(),{miniSidenav:d}=u;return(0,c.jsx)(a.A,{bottom:0,pt:4,sx:e=>{let{breakpoints:t,transitions:n,functions:{pxToRem:r}}=e;return{p:3,position:"relative",[t.up("xl")]:{marginLeft:r(d?120:274),transition:n.create(["margin-left","margin-right"],{easing:n.easing.easeInOut,duration:n.duration.standard})}}},children:(0,c.jsx)(r.A,{children:(0,c.jsxs)(a.A,{width:"100%",display:"flex",flexDirection:{xs:"column",lg:"row"},justifyContent:"space-between",alignItems:"center",px:1.5,children:[(0,c.jsxs)(a.A,{display:"flex",justifyContent:"center",alignItems:"center",flexWrap:"wrap",color:t?"white":"text",fontSize:n.sm,children:["\xa9 ",1900+(new Date).getYear(),", Programmed by"," ","Jackson Cagle (Department of Neurology, University of Florida)."]}),(0,c.jsxs)(a.A,{component:"ul",sx:e=>{let{breakpoints:t}=e;return{display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"center",listStyle:"none",mt:3,mb:0,p:0,[t.up("lg")]:{mt:0}}},children:[(0,c.jsx)(a.A,{component:"li",pr:2,lineHeight:1,children:(0,c.jsx)(i.A,{href:"https://fixel.ufhealth.org/",target:"_blank",children:(0,c.jsx)(o.A,{variant:"button",fontWeight:"regular",color:t?"white":"dark",children:"Fixel Institute"})})}),(0,c.jsx)(a.A,{component:"li",px:2,lineHeight:1,children:(0,c.jsx)(i.A,{href:"https://fixel.ufhealth.org/about/",target:"_blank",children:(0,c.jsx)(o.A,{variant:"button",fontWeight:"regular",color:t?"white":"dark",children:"About Us"})})}),(0,c.jsx)(a.A,{component:"li",px:2,lineHeight:1,children:(0,c.jsx)(i.A,{href:"https://fixel.ufhealth.org/contact/",target:"_blank",children:(0,c.jsx)(o.A,{variant:"button",fontWeight:"regular",color:t?"white":"dark",children:"Contact Us"})})})]})]})})})}u.defaultProps={light:!1};const d=u},2588:(e,t,n)=>{"use strict";n.d(t,{A:()=>L});var r=n(9950),i=n(55158),a=n(98587),o=n(58168),s=n(2803),l=n(88465),c=n(88283),u=n(61676),d=n(48283),h=n(59254),f=n(1763),p=n(423);function m(e){return(0,p.A)("MuiCircularProgress",e)}(0,f.A)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var g=n(44414);const v=["className","color","disableShrink","size","style","thickness","value","variant"];let y,x,b,_,w=e=>e;const A=44,S=(0,c.i7)(y||(y=w` 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } `)),M=(0,c.i7)(x||(x=w` 0% { stroke-dasharray: 1px, 200px; stroke-dashoffset: 0; } 50% { stroke-dasharray: 100px, 200px; stroke-dashoffset: -15px; } 100% { stroke-dasharray: 100px, 200px; stroke-dashoffset: -125px; } `)),T=(0,h.Ay)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${(0,u.A)(n.color)}`]]}})((e=>{let{ownerState:t,theme:n}=e;return(0,o.A)({display:"inline-block"},"determinate"===t.variant&&{transition:n.transitions.create("transform")},"inherit"!==t.color&&{color:(n.vars||n).palette[t.color].main})}),(e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&(0,c.AH)(b||(b=w` animation: ${0} 1.4s linear infinite; `),S)})),k=(0,h.Ay)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),E=(0,h.Ay)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${(0,u.A)(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})((e=>{let{ownerState:t,theme:n}=e;return(0,o.A)({stroke:"currentColor"},"determinate"===t.variant&&{transition:n.transitions.create("stroke-dashoffset")},"indeterminate"===t.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})}),(e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&!t.disableShrink&&(0,c.AH)(_||(_=w` animation: ${0} 1.4s ease-in-out infinite; `),M)})),C=r.forwardRef((function(e,t){const n=(0,d.A)({props:e,name:"MuiCircularProgress"}),{className:r,color:i="primary",disableShrink:c=!1,size:h=40,style:f,thickness:p=3.6,value:y=0,variant:x="indeterminate"}=n,b=(0,a.A)(n,v),_=(0,o.A)({},n,{color:i,disableShrink:c,size:h,thickness:p,value:y,variant:x}),w=(e=>{const{classes:t,variant:n,color:r,disableShrink:i}=e,a={root:["root",n,`color${(0,u.A)(r)}`],svg:["svg"],circle:["circle",`circle${(0,u.A)(n)}`,i&&"circleDisableShrink"]};return(0,l.A)(a,m,t)})(_),S={},M={},C={};if("determinate"===x){const e=2*Math.PI*((A-p)/2);S.strokeDasharray=e.toFixed(3),C["aria-valuenow"]=Math.round(y),S.strokeDashoffset=`${((100-y)/100*e).toFixed(3)}px`,M.transform="rotate(-90deg)"}return(0,g.jsx)(T,(0,o.A)({className:(0,s.A)(w.root,r),style:(0,o.A)({width:h,height:h},M,f),ownerState:_,ref:t,role:"progressbar"},C,b,{children:(0,g.jsx)(k,{className:w.svg,ownerState:_,viewBox:"22 22 44 44",children:(0,g.jsx)(E,{className:w.circle,style:S,ownerState:_,cx:A,cy:A,r:(A-p)/2,fill:"none",strokeWidth:p})})}))}));var D=n(49989),R=n(52498),P=n(7774),O=n(50160);function L(e){let{message:t}=e;const[n,r]=(0,P.mv)(),{language:a}=n;return(0,g.jsx)(i.A,{sx:{color:"#FFFFFF",zIndex:e=>e.zIndex.drawer+1},open:!0,onClick:()=>{},children:(0,g.jsxs)(D.A,{display:"flex",alignItems:"center",flexDirection:"column",children:[(0,g.jsx)(R.A,{color:"white",fontWeight:"bold",fontSize:30,children:t||O.z.WarningMessage.Loading[a]}),(0,g.jsx)(C,{color:"info"})]})})}},39409:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(9950),i=n(11942),a=n.n(i),o=n(35027);const s=(0,n(59254).Ay)(o.A)((e=>{let{theme:t,ownerState:n}=e;const{palette:r,typography:i,borders:a,functions:o}=t,{color:s,circular:l,border:c,size:u,indicator:d,variant:h,container:f,children:p}=n,{white:m,dark:g,gradients:v,badgeColors:y}=r,{size:x,fontWeightBold:b}=i,{borderRadius:_,borderWidth:w}=a,{pxToRem:A,linearGradient:S}=o,M={xs:"0.45em 0.775em",sm:"0.55em 0.9em",md:"0.65em 1em",lg:"0.85em 1.375em"},T="xs"===u?x.xxs:x.xs,k=c?`${w[3]} solid ${m.main}`:"none",E=l?_.section:_.md;return{"& .MuiBadge-badge":{height:"auto",padding:M[u]||M.xs,fontSize:T,fontWeight:b,textTransform:"uppercase",lineHeight:1,textAlign:"center",whiteSpace:"nowrap",verticalAlign:"baseline",border:k,borderRadius:E,...d&&(e=>{let t=A(20),n=A(20);return"medium"===e?(t=A(24),n=A(24)):"large"===e&&(t=A(32),n=A(32)),{width:t,height:n,display:"grid",placeItems:"center",textAlign:"center",borderRadius:"50%",padding:0,border:k}})(u),..."gradient"===h&&(C=s,{background:v[C]?S(v[C].main,v[C].state):S(v.info.main,v.info.state),color:"light"===C?g.main:m.main}),..."contained"===h&&(e=>{const t=y[e]?y[e].background:y.info.background;let n=y[e]?y[e].text:y.info.text;return"light"===e&&(n=g.main),{background:t,color:n}})(s),...!p&&!f&&{position:"static",marginLeft:A(8),transform:"none",fontSize:A(9)},...f&&{position:"relative",transform:"none"}}};var C}));var l=n(44414);const c=(0,r.forwardRef)(((e,t)=>{let{color:n,variant:r,size:i,circular:a,indicator:o,border:c,container:u,children:d,...h}=e;return(0,l.jsx)(s,{...h,ownerState:{color:n,variant:r,size:i,circular:a,indicator:o,border:c,container:u,children:d},ref:t,color:"default",children:d})}));c.defaultProps={color:"info",variant:"gradient",size:"sm",circular:!1,indicator:!1,border:!1,children:!1,container:!1},c.propTypes={color:a().oneOf(["primary","secondary","info","success","warning","error","light","dark"]),variant:a().oneOf(["gradient","contained"]),size:a().oneOf(["xs","sm","md","lg"]),circular:a().bool,indicator:a().bool,border:a().bool,children:a().node,container:a().bool};const u=c},49989:(e,t,n)=>{"use strict";n.d(t,{A:()=>b});var r=n(9950),i=n(11942),a=n.n(i),o=n(58168),s=n(98587),l=n(2803),c=n(2199),u=n(70505),d=n(80237),h=n(7148),f=n(44414);const p=["className","component"];var m=n(44501);const g=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{defaultTheme:t,defaultClassName:n="MuiBox-root",generateClassName:i}=e,a=(0,c.Ay)("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(u.A);return r.forwardRef((function(e,r){const c=(0,h.A)(t),u=(0,d.A)(e),{className:m,component:g="div"}=u,v=(0,s.A)(u,p);return(0,f.jsx)(a,(0,o.A)({as:g,ref:r,className:(0,l.A)(m,i?i(n):n),theme:c},v))}))}({defaultTheme:(0,n(24436).A)(),defaultClassName:"MuiBox-root",generateClassName:m.A.generate}),v=g;const y=(0,n(59254).Ay)(v)((e=>{let{theme:t,ownerState:n}=e;const{palette:r,functions:i,borders:a,boxShadows:o}=t,{variant:s,bgColor:l,color:c,opacity:u,borderRadius:d,shadow:h,coloredShadow:f}=n,{gradients:p,grey:m,white:g}=r,{linearGradient:v}=i,{borderRadius:y}=a,{colored:x}=o,b={"grey-100":m[100],"grey-200":m[200],"grey-300":m[300],"grey-400":m[400],"grey-500":m[500],"grey-600":m[600],"grey-700":m[700],"grey-800":m[800],"grey-900":m[900]},_=["transparent","white","black","primary","secondary","info","success","warning","error","light","dark","text","grey-100","grey-200","grey-300","grey-400","grey-500","grey-600","grey-700","grey-800","grey-900"];let w=l;w="gradient"===s?["primary","secondary","info","success","warning","error","dark","light"].find((e=>e===l))?v(p[l].main,p[l].state):g.main:_.find((e=>e===l))?r[l]?r[l].main:b[l]:l;let A=c;_.find((e=>e===c))&&(A=r[c]?r[c].main:b[c]);let S=d;["xs","sm","md","lg","xl","xxl","section"].find((e=>e===d))&&(S=y[d]);let M="none";return["xs","sm","md","lg","xl","xxl","inset"].find((e=>e===h))?M=o[h]:f&&(M=x[f]?x[f]:"none"),{opacity:u,background:w,color:A,borderRadius:S,boxShadow:M}})),x=(0,r.forwardRef)(((e,t)=>{let{variant:n,bgColor:r,color:i,opacity:a,borderRadius:o,shadow:s,coloredShadow:l,...c}=e;return(0,f.jsx)(y,{...c,ref:t,ownerState:{variant:n,bgColor:r,color:i,opacity:a,borderRadius:o,shadow:s,coloredShadow:l}})}));x.defaultProps={variant:"contained",bgColor:"transparent",color:"dark",opacity:1,borderRadius:"none",shadow:"none",coloredShadow:"none"},x.propTypes={variant:a().oneOf(["contained","gradient"]),bgColor:a().string,color:a().string,opacity:a().number,borderRadius:a().string,shadow:a().string,coloredShadow:a().oneOf(["primary","secondary","info","success","warning","error","light","dark","none"])};const b=x},13792:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(9950),i=n(75165);const a=(0,n(59254).Ay)(i.A)((e=>{let{theme:t,ownerState:n}=e;const{palette:r,functions:i,borders:a,boxShadows:o}=t,{color:s,variant:l,size:c,circular:u,iconOnly:d,darkMode:h}=n,{white:f,text:p,transparent:m,gradients:g,grey:v}=r,{boxShadow:y,linearGradient:x,pxToRem:b,rgba:_}=i,{borderRadius:w}=a,{colored:A}=o;return{..."contained"===l&&(()=>{const e=r[s]?r[s].main:f.main,t=r[s]?r[s].focus:f.focus,n=A[s]?`${y([0,3],[3,0],r[s].main,.15)}, ${y([0,3],[1,-2],r[s].main,.2)}, ${y([0,1],[5,0],r[s].main,.15)}`:"none",i=A[s]?`${y([0,14],[26,-12],r[s].main,.4)}, ${y([0,4],[23,0],r[s].main,.15)}, ${y([0,8],[10,-5],r[s].main,.2)}`:"none";let a=f.main;h||"white"!==s&&"light"!==s&&r[s]?!h||"white"!==s&&"light"!==s&&r[s]||(a=v[600]):a=p.main;let o=f.main;return"white"===s?o=p.main:"primary"!==s&&"error"!==s&&"dark"!==s||(o=f.main),{background:e,color:a,boxShadow:n,"&:hover":{backgroundColor:e,boxShadow:i},"&:focus:not(:hover)":{backgroundColor:t,boxShadow:r[s]?y([0,0],[0,3.2],r[s].main,.5):y([0,0],[0,3.2],f.main,.5)},"&:disabled":{backgroundColor:e,color:o}}})(),..."outlined"===l&&(()=>{const e="white"===s?_(f.main,.1):m.main,t=r[s]?r[s].main:f.main,n=r[s]?y([0,0],[0,3.2],r[s].main,.5):y([0,0],[0,3.2],f.main,.5);let i=r[s]?r[s].main:_(f.main,.75);return"white"===s&&(i=_(f.main,.75)),{background:e,color:t,borderColor:i,"&:hover":{background:m.main,borderColor:t},"&:focus:not(:hover)":{background:m.main,boxShadow:n},"&:active:not(:hover)":{backgroundColor:t,color:f.main,opacity:.85},"&:disabled":{color:t,borderColor:t}}})(),..."gradient"===l&&(()=>{const e="white"!==s&&g[s]?x(g[s].main,g[s].state):f.main,t=A[s]?`${y([0,3],[3,0],r[s].main,.15)}, ${y([0,3],[1,-2],r[s].main,.2)}, ${y([0,1],[5,0],r[s].main,.15)}`:"none",n=A[s]?`${y([0,14],[26,-12],r[s].main,.4)}, ${y([0,4],[23,0],r[s].main,.15)}, ${y([0,8],[10,-5],r[s].main,.2)}`:"none";let i=f.main;return"white"===s?i=p.main:"light"===s&&(i=g.dark.state),{background:e,color:i,boxShadow:t,"&:hover":{boxShadow:n},"&:focus:not(:hover)":{boxShadow:t},"&:disabled":{background:e,color:i}}})(),..."text"===l&&(()=>{const e=r[s]?r[s].main:f.main,t=r[s]?r[s].focus:f.focus;return{color:e,"&:hover":{color:t},"&:focus:not(:hover)":{color:t}}})(),...u&&{borderRadius:w.section},...d&&(()=>{let e=b(38);"small"===c?e=b(25.4):"large"===c&&(e=b(52));let t=`${b(11)} ${b(11)} ${b(10)}`;return"small"===c?t=b(4.5):"large"===c&&(t=b(16)),{width:e,minWidth:e,height:e,minHeight:e,padding:t,"& .material-icons":{marginTop:0},"&:hover, &:focus, &:active":{transform:"none"}}})()}}));var o=n(7774),s=n(44414);const l=(0,r.forwardRef)(((e,t)=>{let{color:n,variant:r,size:i,circular:l,iconOnly:c,children:u,...d}=e;const[h]=(0,o.mv)(),{darkMode:f}=h;return(0,s.jsx)(a,{...d,ref:t,color:"primary",variant:"gradient"===r?"contained":r,size:i,ownerState:{color:n,variant:r,size:i,circular:l,iconOnly:c,darkMode:f},children:u})}));l.defaultProps={size:"medium",variant:"contained",color:"white",circular:!1,iconOnly:!1};const c=l},52688:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(51606),i=n(44414);const a=e=>{let{label:t,...n}=e;return(0,i.jsx)(r.A,{variant:"standard",label:t,fullWidth:!0,...n})}},51606:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(9950),i=n(11942),a=n.n(i),o=n(29925);const s=(0,n(59254).Ay)(o.A)((e=>{let{theme:t,ownerState:n}=e;const{palette:r,functions:i}=t,{error:a,success:o,disabled:s}=n,{grey:l,transparent:c,error:u,success:d}=r,{pxToRem:h}=i;return{backgroundColor:s?`${l[200]} !important`:c.main,pointerEvents:s?"none":"auto",...a&&{backgroundImage:"url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23F44335' viewBox='0 0 12 12'%3E%3Ccircle cx='6' cy='6' r='4.5'/%3E%3Cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3E%3Ccircle cx='6' cy='8.2' r='.6' fill='%23F44335' stroke='none'/%3E%3C/svg%3E\")",backgroundRepeat:"no-repeat",backgroundPosition:`right ${h(12)} center`,backgroundSize:`${h(16)} ${h(16)}`,"& .Mui-focused":{"& .MuiOutlinedInput-notchedOutline, &:after":{borderColor:u.main}},"& .MuiInputLabel-root.Mui-focused":{color:u.main}},...o&&{backgroundImage:"url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 8'%3E%3Cpath fill='%234CAF50' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3E%3C/svg%3E\")",backgroundRepeat:"no-repeat",backgroundPosition:`right ${h(12)} center`,backgroundSize:`${h(16)} ${h(16)}`,"& .Mui-focused":{"& .MuiOutlinedInput-notchedOutline, &:after":{borderColor:d.main}},"& .MuiInputLabel-root.Mui-focused":{color:d.main}}}}));var l=n(44414);const c=(0,r.forwardRef)(((e,t)=>{let{error:n,success:r,disabled:i,...a}=e;return(0,l.jsx)(s,{...a,ref:t,ownerState:{error:n,success:r,disabled:i}})}));c.defaultProps={error:!1,success:!1,disabled:!1},c.propTypes={error:a().bool,success:a().bool,disabled:a().bool};const u=c},17825:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var r=n(9950),i=n(49989),a=n(59254),o=n(13792);const s=(0,a.Ay)(o.A)((e=>{let{theme:t,ownerState:n}=e;const{borders:r,functions:i,typography:a,palette:o}=t,{variant:s,paginationSize:l,active:c}=n,{borderColor:u}=r,{pxToRem:d}=i,{fontWeightRegular:h,size:f}=a,{light:p}=o;let m=d(36);return"small"===l?m=d(30):"large"===l&&(m=d(46)),{borderColor:u,margin:`0 ${d(2)}`,pointerEvents:c?"none":"auto",fontWeight:h,fontSize:f.sm,width:m,minWidth:m,height:m,minHeight:m,"&:hover, &:focus, &:active":{transform:"none",boxShadow:("gradient"!==s||"contained"!==s)&&"none !important",opacity:"1 !important"},"&:hover":{backgroundColor:p.main,borderColor:u}}}));var l=n(44414);const c=(0,r.createContext)(),u=(0,r.forwardRef)(((e,t)=>{let{item:n,variant:a,color:o,size:u,active:d,children:h,...f}=e;const p=(0,r.useContext)(c),m=p?p.size:null,g=(0,r.useMemo)((()=>({variant:a,color:o,size:u})),[a,o,u]);return(0,l.jsx)(c.Provider,{value:g,children:n?(0,l.jsx)(s,{...f,ref:t,variant:d?p.variant:"outlined",color:d?p.color:"secondary",iconOnly:!0,circular:!0,ownerState:{variant:a,active:d,paginationSize:m},children:h}):(0,l.jsx)(i.A,{display:"flex",justifyContent:"flex-end",alignItems:"center",sx:{listStyle:"none"},children:h})})}));u.defaultProps={item:!1,variant:"gradient",color:"info",size:"medium",active:!1};const d=u},52498:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(9950),i=n(82053);const a=(0,n(59254).Ay)(i.A)((e=>{let{theme:t,ownerState:n}=e;const{palette:r,typography:i,functions:a}=t,{color:o,textTransform:s,verticalAlign:l,fontWeight:c,opacity:u,textGradient:d,darkMode:h}=n,{gradients:f,transparent:p,white:m}=r,{fontWeightLight:g,fontWeightRegular:v,fontWeightMedium:y,fontWeightBold:x}=i,{linearGradient:b}=a,_={light:g,regular:v,medium:y,bold:x};let w="inherit"!==o&&r[o]?r[o].main:"inherit";return!h||"inherit"!==o&&r[o]?h&&"dark"===o&&(w=m.main):w="inherit",{opacity:u,textTransform:s,verticalAlign:l,textDecoration:"none",color:w,fontWeight:_[c]&&_[c],...d&&{backgroundImage:"inherit"!==o&&"text"!==o&&"white"!==o&&f[o]?b(f[o].main,f[o].state):b(f.dark.main,f.dark.state),display:"inline-block",WebkitBackgroundClip:"text",WebkitTextFillColor:p.main,position:"relative",zIndex:1}}}));var o=n(7774),s=n(44414);const l=(0,r.forwardRef)(((e,t)=>{let{color:n,fontWeight:r,textTransform:i,verticalAlign:l,textGradient:c,opacity:u,children:d,...h}=e;const[f]=(0,o.mv)(),{darkMode:p}=f;return(0,s.jsx)(a,{...h,ref:t,ownerState:{color:n,textTransform:i,verticalAlign:l,fontWeight:r,opacity:u,textGradient:c,darkMode:p},children:d})}));l.defaultProps={color:"dark",fontWeight:!1,textTransform:"none",verticalAlign:"unset",textGradient:!1,opacity:1};const c=l},53758:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var r=n(96583),i=n(40033),a=n(28170),o=n(6493),s=n(49989),l=n(52498),c=n(13792),u=n(44414);function d(e){let{title:t,message:n,denyButton:d,cancelButton:h,handleClose:f,confirmText:p,handleConfirm:m,cancelText:g,handleCancel:v,denyText:y,handleDeny:x}=e;return(0,u.jsxs)(r.A,{open:!0,onClose:f,sx:{padding:15},PaperProps:{style:{padding:15}},children:[(0,u.jsx)(i.A,{children:(0,u.jsx)(l.A,{align:"center",fontSize:24,children:t})}),(0,u.jsx)(a.A,{sx:{paddingLeft:5,paddingRight:5},children:(0,u.jsx)(o.A,{sx:{textAlign:"center"},children:(0,u.jsx)(l.A,{variant:"p",align:"center",fontSize:20,children:n})})}),(0,u.jsxs)(s.A,{display:"flex",justifyContent:"space-around",sx:{paddingLeft:5,paddingRight:5,paddingTop:2,paddingBottom:2},children:[h?(0,u.jsx)(c.A,{variant:"gradient",color:"secondary",onClick:v,sx:{minWidth:100},children:g}):null,d?(0,u.jsx)(c.A,{variant:"gradient",color:h?"error":"secondary",onClick:x,sx:{minWidth:100},children:y}):null,(0,u.jsx)(c.A,{variant:"gradient",color:"info",onClick:m,sx:{minWidth:100},children:p})]})]})}d.defaultProps={title:"Alert",message:"Unknown Error",open:!0,cancelButton:!1,denyButton:!1,confirmText:"Confirm",cancelText:"Cancel",denyText:"No"}},64326:(e,t,n)=>{"use strict";n.d(t,{A:()=>se});var r=n(9950),i=n(13564),a=n(26689),o=n(97591),s=n(23266),l=n(4919),c=n(98587),u=n(58168),d=n(2803),h=n(88465),f=n(59254),p=n(48283),m=n(61676),g=n(2235),v=n(1763),y=n(423);function x(e){return(0,y.A)("MuiAppBar",e)}(0,v.A)("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent"]);var b=n(44414);const _=["className","color","enableColorOnDark","position"],w=(e,t)=>e?`${null==e?void 0:e.replace(")","")}, ${t})`:t,A=(0,f.Ay)(g.A,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${(0,m.A)(n.position)}`],t[`color${(0,m.A)(n.color)}`]]}})((e=>{let{theme:t,ownerState:n}=e;const r="light"===t.palette.mode?t.palette.grey[100]:t.palette.grey[900];return(0,u.A)({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},"fixed"===n.position&&{position:"fixed",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},"absolute"===n.position&&{position:"absolute",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0},"sticky"===n.position&&{position:"sticky",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0},"static"===n.position&&{position:"static"},"relative"===n.position&&{position:"relative"},!t.vars&&(0,u.A)({},"default"===n.color&&{backgroundColor:r,color:t.palette.getContrastText(r)},n.color&&"default"!==n.color&&"inherit"!==n.color&&"transparent"!==n.color&&{backgroundColor:t.palette[n.color].main,color:t.palette[n.color].contrastText},"inherit"===n.color&&{color:"inherit"},"dark"===t.palette.mode&&!n.enableColorOnDark&&{backgroundColor:null,color:null},"transparent"===n.color&&(0,u.A)({backgroundColor:"transparent",color:"inherit"},"dark"===t.palette.mode&&{backgroundImage:"none"})),t.vars&&(0,u.A)({},"default"===n.color&&{"--AppBar-background":n.enableColorOnDark?t.vars.palette.AppBar.defaultBg:w(t.vars.palette.AppBar.darkBg,t.vars.palette.AppBar.defaultBg),"--AppBar-color":n.enableColorOnDark?t.vars.palette.text.primary:w(t.vars.palette.AppBar.darkColor,t.vars.palette.text.primary)},n.color&&!n.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":n.enableColorOnDark?t.vars.palette[n.color].main:w(t.vars.palette.AppBar.darkBg,t.vars.palette[n.color].main),"--AppBar-color":n.enableColorOnDark?t.vars.palette[n.color].contrastText:w(t.vars.palette.AppBar.darkColor,t.vars.palette[n.color].contrastText)},{backgroundColor:"var(--AppBar-background)",color:"inherit"===n.color?"inherit":"var(--AppBar-color)"},"transparent"===n.color&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))})),S=r.forwardRef((function(e,t){const n=(0,p.A)({props:e,name:"MuiAppBar"}),{className:r,color:i="primary",enableColorOnDark:a=!1,position:o="fixed"}=n,s=(0,c.A)(n,_),l=(0,u.A)({},n,{color:i,position:o,enableColorOnDark:a}),f=(e=>{const{color:t,position:n,classes:r}=e,i={root:["root",`color${(0,m.A)(t)}`,`position${(0,m.A)(n)}`]};return(0,h.A)(i,x,r)})(l);return(0,b.jsx)(A,(0,u.A)({square:!0,component:"header",ownerState:l,elevation:4,className:(0,d.A)(f.root,r,"fixed"===o&&"mui-fixed"),ref:t},s))}));function M(e){return(0,y.A)("MuiToolbar",e)}(0,v.A)("MuiToolbar",["root","gutters","regular","dense"]);const T=["className","component","disableGutters","variant"],k=(0,f.Ay)("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,u.A)({position:"relative",display:"flex",alignItems:"center"},!n.disableGutters&&{paddingLeft:t.spacing(2),paddingRight:t.spacing(2),[t.breakpoints.up("sm")]:{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}},"dense"===n.variant&&{minHeight:48})}),(e=>{let{theme:t,ownerState:n}=e;return"regular"===n.variant&&t.mixins.toolbar})),E=r.forwardRef((function(e,t){const n=(0,p.A)({props:e,name:"MuiToolbar"}),{className:r,component:i="div",disableGutters:a=!1,variant:o="regular"}=n,s=(0,c.A)(n,T),l=(0,u.A)({},n,{component:i,disableGutters:a,variant:o}),f=(e=>{const{classes:t,disableGutters:n,variant:r}=e,i={root:["root",!n&&"gutters",r]};return(0,h.A)(i,M,t)})(l);return(0,b.jsx)(k,(0,u.A)({as:i,className:(0,d.A)(f.root,r),ref:t,ownerState:l},s))}));var C=n(25333),D=n(41413),R=n(65471);const P=(0,R.A)((0,b.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm.06 17v-2.01H12c-1.28 0-2.56-.49-3.54-1.46-1.71-1.71-1.92-4.35-.64-6.29l1.1 1.1c-.71 1.33-.53 3.01.59 4.13.7.7 1.62 1.03 2.54 1.01v-2.14l2.83 2.83L12.06 19zm4.11-4.24-1.1-1.1c.71-1.33.53-3.01-.59-4.13C13.79 8.84 12.9 8.5 12 8.5h-.06v2.15L9.11 7.83 11.94 5v2.02c1.3-.02 2.61.45 3.6 1.45 1.7 1.7 1.91 4.35.63 6.29z"}),"ChangeCircle");var O=n(35277),L=n(49989),I=(n(51606),n(39409)),z=(n(26429),n(82053)),N=n(97497);const F=(0,R.A)((0,b.jsx)("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz");var B=n(24184);const j=(0,f.Ay)(B.A)((e=>{let{theme:t}=e;return(0,u.A)({display:"flex",marginLeft:`calc(${t.spacing(1)} * 0.5)`,marginRight:`calc(${t.spacing(1)} * 0.5)`},"light"===t.palette.mode?{backgroundColor:t.palette.grey[100],color:t.palette.grey[700]}:{backgroundColor:t.palette.grey[700],color:t.palette.grey[100]},{borderRadius:2,"&:hover, &:focus":(0,u.A)({},"light"===t.palette.mode?{backgroundColor:t.palette.grey[200]}:{backgroundColor:t.palette.grey[600]}),"&:active":(0,u.A)({boxShadow:t.shadows[0]},"light"===t.palette.mode?{backgroundColor:(0,N.tL)(t.palette.grey[200],.12)}:{backgroundColor:(0,N.tL)(t.palette.grey[600],.12)})})})),U=(0,f.Ay)(F)({width:24,height:16});const V=function(e){const t=e;return(0,b.jsx)("li",{children:(0,b.jsx)(j,(0,u.A)({focusRipple:!0},e,{ownerState:t,children:(0,b.jsx)(U,{ownerState:t})}))})};function H(e){return(0,y.A)("MuiBreadcrumbs",e)}const W=(0,v.A)("MuiBreadcrumbs",["root","ol","li","separator"]),G=["children","className","component","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],q=(0,f.Ay)(z.A,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${W.li}`]:t.li},t.root]})({}),Y=(0,f.Ay)("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),$=(0,f.Ay)("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function X(e,t,n,r){return e.reduce(((i,a,o)=>(o{const{classes:t}=e;return(0,h.A)({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},H,t)})(_),A=r.useRef(null),S=r.Children.toArray(i).filter((e=>r.isValidElement(e))).map(((e,t)=>(0,b.jsx)("li",{className:w.li,children:e},`child-${t}`)));return(0,b.jsx)(q,(0,u.A)({ref:t,component:o,color:"text.secondary",className:(0,d.A)(w.root,a),ownerState:_},v,{children:(0,b.jsx)(Y,{className:w.ol,ref:A,ownerState:_,children:X(y||m&&S.length<=m?S:(e=>f+l>=e.length?e:[...e.slice(0,f),(0,b.jsx)(V,{"aria-label":s,onClick:()=>{x(!0);const e=A.current.querySelector("a[href],button,[tabindex]");e&&e.focus()}},"ellipsis"),...e.slice(e.length-l,e.length)])(S),w.separator,g,_)})}))}));var K=n(52498),J=n(7774),Q=n(50160);function ee(e){let{icon:t,title:n,route:r,light:i}=e;const[o]=(0,J.mv)(),{language:s}=o,c=r.slice(0,-1);let u="";return d=r[r.length-1],/^[0-9a-f]{8}[0-9a-f]{4}[4][0-9a-f]{3}[89ab][0-9a-f]{3}[0-9a-f]{12}$/i.test(d)?(u=r[r.length-1],(0,b.jsxs)(L.A,{mr:{xs:0,xl:8},children:[(0,b.jsxs)(Z,{sx:{"& .MuiBreadcrumbs-separator":{color:e=>{let{palette:{white:t,grey:n}}=e;return i?t.main:n[600]}}},children:[(0,b.jsx)(a.N_,{to:"/dashboard",children:(0,b.jsx)(K.A,{component:"span",variant:"body2",color:i?"white":"dark",opacity:i?.8:.5,sx:{lineHeight:0},children:(0,b.jsx)(l.A,{children:t})})}),r.slice(0,-2).map((e=>(0,b.jsx)(a.N_,{to:`/participant-overview/${u}`,children:(0,b.jsx)(K.A,{component:"span",variant:"button",fontWeight:"regular",textTransform:"capitalize",color:i?"white":"dark",opacity:i?.8:.5,sx:{lineHeight:0},children:Q.z.Breadcrumbs[e]?Q.z.Breadcrumbs[e][s]:e})},e))),(0,b.jsx)(K.A,{variant:"button",fontWeight:"regular",textTransform:"capitalize",color:i?"white":"dark",sx:{lineHeight:0},children:(0,Q.d)(Q.z.Breadcrumbs,r[r.length-2],s)})]}),(0,b.jsx)(K.A,{fontWeight:"bold",textTransform:"capitalize",variant:"h6",color:i?"white":"dark",noWrap:!0,children:(0,Q.d)(Q.z.Breadcrumbs,r[r.length-2],s)})]})):(0,b.jsxs)(L.A,{mr:{xs:0,xl:8},children:[(0,b.jsxs)(Z,{sx:{"& .MuiBreadcrumbs-separator":{color:e=>{let{palette:{white:t,grey:n}}=e;return i?t.main:n[600]}}},children:[(0,b.jsx)(a.N_,{to:"/dashboard",children:(0,b.jsx)(K.A,{component:"span",variant:"body2",color:i?"white":"dark",opacity:i?.8:.5,sx:{lineHeight:0},children:(0,b.jsx)(l.A,{children:t})})}),c.map((e=>(0,b.jsx)(a.N_,{to:`/${e}`,children:(0,b.jsx)(K.A,{component:"span",variant:"button",fontWeight:"regular",textTransform:"capitalize",color:i?"white":"dark",opacity:i?.8:.5,sx:{lineHeight:0},children:Q.z.Breadcrumbs[e]?Q.z.Breadcrumbs[e][s]:e})},e))),(0,b.jsx)(K.A,{variant:"button",fontWeight:"regular",textTransform:"capitalize",color:i?"white":"dark",sx:{lineHeight:0},children:(0,Q.d)(Q.z.Breadcrumbs,n,s)})]}),(0,b.jsx)(K.A,{fontWeight:"bold",textTransform:"capitalize",variant:"h6",color:i?"white":"dark",noWrap:!0,children:(0,Q.d)(Q.z.Breadcrumbs,n,s)})]});var d}ee.defaultProps={light:!1};const te=ee;n(13792);var ne=n(20572);const re=(e,t)=>{let{breakpoints:n}=e,{isMini:r}=t;return{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",[n.up("md")]:{justifyContent:r?"space-between":"stretch",width:r?"100%":"max-content"},[n.up("xl")]:{justifyContent:"stretch !important",width:"max-content !important"}}},ie=e=>{let{typography:{size:t},breakpoints:n}=e;return{px:1,"& .material-icons, .material-icons-round":{fontSize:`${t.xl} !important`},"& .MuiTypography-root":{display:"none",[n.up("sm")]:{display:"inline-block",lineHeight:1.2,ml:.5}}}},ae=e=>{let{breakpoints:t}=e;return{display:"inline-block",lineHeight:0,paddingLeft:3,[t.up("xl")]:{display:"none"}}};function oe(e){let{absolute:t,light:n,isMini:c,fixedNavbar:u}=e;const d=(0,i.Zp)(),[h,f]=(0,r.useState)(null),[p,m]=(0,r.useState)({queues:[],show:!1}),[g,v]=(0,r.useState)(),[y,x]=(0,J.mv)(),{miniSidenav:_,hideSidenav:w,transparentNavbar:A,darkMode:M,language:T,user:k}=y,[R,z]=(0,r.useState)(!1),[N,F]=(0,r.useState)(""),B=(0,i.zy)().pathname.split("/").slice(1);(0,r.useEffect)((()=>{if(0==Object.keys(k).length)return(0,J.NX)(x,"user",{}),(0,J.NX)(x,"participant_uid",null),void d("/",{replace:!1});let e=new WebSocket(ne.x.getServer().replace("http","ws")+"/socket/notification");return e.onerror=function(){console.log("Connection Error")},e.onopen=()=>{},e.onclose=()=>{console.log("Connection Closed")},e.onmessage=e=>{let t=JSON.parse(e.data);"QueueUpdate"===t.Notification&&("JobCompletion"===t.UpdateType||"JobUpdate"===t.UpdateType?m((e=>{for(let n in e.queues)e.queues[n].taskId==t.TaskID&&(e.queues[n].state=t.State,e.queues[n].descriptor={...e.queues[n].descriptor,Message:t.Message});return{...e}})):"NewJob"===t.UpdateType&&m((e=>(e.queues.push(t.NewJob),{...e}))))},()=>{e.close()}}),[]),(0,r.useEffect)((()=>{v(u?"sticky":"static")}),[x,u]);const j=()=>{F(""),z(null)},U=e=>{let{palette:{dark:t,white:r,text:i},functions:{rgba:a}}=e;return{color:()=>{let e=n||M?r.main:t.main;return A&&!n&&(e=M?a(i.main,.6):i.main),e}}};return(0,b.jsxs)(S,{position:t?"absolute":g,color:"inherit",sx:e=>function(e,t){const{palette:n,boxShadows:r,functions:i,transitions:a,breakpoints:o,borders:s}=e,{transparentNavbar:l,absolute:c,light:u,darkMode:d}=t,{dark:h,white:f,text:p,transparent:m,background:g}=n,{navbarBoxShadow:v}=r,{rgba:y,pxToRem:x}=i,{borderRadius:b}=s;return{boxShadow:l||c?"none":v,backdropFilter:l||c?"none":`saturate(200%) blur(${x(30)})`,backgroundColor:l||c?`${m.main} !important`:y(d?g.default:f.main,.8),color:()=>{let e;return e=u?f.main:l?p.main:h.main,e},top:c?0:x(12),minHeight:x(75),display:"grid",alignItems:"center",borderRadius:b.xl,paddingTop:x(8),paddingBottom:x(8),paddingRight:c?x(8):0,paddingLeft:c?x(16):0,"& > *":{transition:a.create("all",{easing:a.easing.easeInOut,duration:a.duration.standard})},"& .MuiToolbar-root":{display:"flex",justifyContent:"space-between",alignItems:"center",[o.up("sm")]:{minHeight:"auto",padding:`${x(4)} ${x(16)}`}}}}(e,{transparentNavbar:A,absolute:t,light:n,darkMode:M}),children:[h,(0,b.jsxs)(E,{sx:e=>(e=>{let{breakpoints:t}=e;return{flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",pt:.5,pb:.5,[t.up("md")]:{flexDirection:"row",alignItems:"center",paddingTop:"0",paddingBottom:"0"}}})(e),children:[(0,b.jsxs)(L.A,{color:"inherit",mb:{xs:1,md:0},sx:e=>re(e,{isMini:c}),children:[(0,b.jsx)(te,{icon:"home",title:B[B.length-1],route:B,light:n}),(0,b.jsx)(C.A,{sx:{display:{xs:"none",xl:"block"}},onClick:()=>(0,J.NX)(x,"miniSidenav",!_),size:"small",disableRipple:!0,children:(0,b.jsx)(l.A,{fontSize:"medium",sx:U,children:_?"menu":"menu_open"})}),(0,b.jsx)(C.A,{size:"small",disableRipple:!0,color:"inherit",sx:ae,onClick:()=>{(0,J.NX)(x,"hideSidenav",!w)},children:(0,b.jsx)(l.A,{sx:U,fontSize:"medium",children:w?"menu":"menu_open"})})]}),c?null:(0,b.jsxs)(L.A,{sx:e=>re(e,{isMini:c}),children:[(0,b.jsx)(L.A,{pr:1}),(0,b.jsxs)(L.A,{color:n?"white":"inherit",children:[(0,b.jsx)(C.A,{size:"small",disableRipple:!0,color:"inherit",sx:ie,"aria-controls":"notification-menu","aria-haspopup":"true",variant:"contained",onClick:e=>((e,t)=>{z(e.currentTarget),F(t)})(e,"ProfileMenu"),children:(0,b.jsx)(I.A,{badgeContent:null,color:"error",size:"xs",circular:!0,children:(0,b.jsx)(D.A,{src:""})})}),(0,b.jsxs)(o.A,{anchorEl:R,anchorReference:null,disableScrollLock:!0,anchorOrigin:{vertical:"bottom",horizontal:"left"},open:"ProfileMenu"===N,onClose:j,sx:{mt:2},children:[(0,b.jsx)(a.N_,{to:"/profile",children:(0,b.jsxs)(s.A,{children:[(0,b.jsx)(O.x$1,{fontSize:10,style:{paddingRight:15}}),(0,b.jsx)(K.A,{variant:"button",fontWeight:"regular",color:"text",children:"Profile"})]})}),(0,b.jsxs)(s.A,{onClick:()=>{ne.x.logout().then((e=>{ne.x.nullifyUser(),(0,J.NX)(x,"user",{}),(0,J.NX)(x,"report",""),(0,J.NX)(x,"participant_uid",null),d("/",{replace:!1})})).catch((e=>{401==e.response.status?(ne.x.nullifyUser(),(0,J.NX)(x,"user",{}),(0,J.NX)(x,"report",""),(0,J.NX)(x,"participant_uid",null),d("/",{replace:!1})):console.log(e)}))},children:[(0,b.jsx)(O.nCC,{fontSize:10,style:{paddingRight:15}}),(0,b.jsx)(K.A,{variant:"button",fontWeight:"regular",color:"text",children:Q.z.SimplifiedNavbar.Logout[T]})]})]}),(0,b.jsx)(o.A,{anchorEl:R,anchorReference:null,anchorOrigin:{vertical:"bottom",horizontal:"left"},open:"LanguageMenu"===N,onClose:j,sx:{mt:2},children:["English","\u4e2d\u6587"].map((e=>(0,b.jsxs)(s.A,{onClick:()=>(e=>{"English"===e?(0,J.NX)(x,"language","en"):"\u4e2d\u6587"===e&&(0,J.NX)(x,"language","zh"),j()})(e),children:[(0,b.jsx)(l.A,{sx:{mr:1},children:(0,b.jsx)(P,{})}),(0,b.jsx)(K.A,{variant:"button",fontWeight:"regular",color:"text",children:e})]},e)))})]})]})]})]})}oe.defaultProps={absolute:!1,light:!1,isMini:!1};const se=oe},47513:(e,t,n)=>{"use strict";n.d(t,{A:()=>k});var r=n(9950),i=n(58168),a=n(98587),o=n(2803),s=n(88465),l=n(59254),c=n(48283),u=n(1763),d=n(423);function h(e){return(0,d.A)("MuiFormGroup",e)}(0,u.A)("MuiFormGroup",["root","row","error"]);var f=n(39766),p=n(68624),m=n(44414);const g=["className","row"],v=(0,l.Ay)("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.row&&t.row]}})((e=>{let{ownerState:t}=e;return(0,i.A)({display:"flex",flexDirection:"column",flexWrap:"wrap"},t.row&&{flexDirection:"row"})})),y=r.forwardRef((function(e,t){const n=(0,c.A)({props:e,name:"MuiFormGroup"}),{className:r,row:l=!1}=n,u=(0,a.A)(n,g),d=(0,f.A)(),y=(0,p.A)({props:n,muiFormControl:d,states:["error"]}),x=(0,i.A)({},n,{row:l,error:y.error}),b=(e=>{const{classes:t,row:n,error:r}=e,i={root:["root",n&&"row",r&&"error"]};return(0,s.A)(i,h,t)})(x);return(0,m.jsx)(v,(0,i.A)({className:(0,o.A)(b.root,r),ownerState:x,ref:t},u))}));var x=n(31506),b=n(48733),_=n(57272),w=n(31014);const A=["actions","children","defaultValue","name","onChange","value"],S=r.forwardRef((function(e,t){const{actions:n,children:o,defaultValue:s,name:l,onChange:c,value:u}=e,d=(0,a.A)(e,A),h=r.useRef(null),[f,p]=(0,b.A)({controlled:u,default:s,name:"RadioGroup"});r.useImperativeHandle(n,(()=>({focus:()=>{let e=h.current.querySelector("input:not(:disabled):checked");e||(e=h.current.querySelector("input:not(:disabled)")),e&&e.focus()}})),[]);const g=(0,x.A)(t,h),v=(0,w.A)(l),S=r.useMemo((()=>({name:v,onChange(e){p(e.target.value),c&&c(e,e.target.value)},value:f})),[v,c,p,f]);return(0,m.jsx)(_.A.Provider,{value:S,children:(0,m.jsx)(y,(0,i.A)({role:"radiogroup",ref:g},d,{children:o}))})}));var M=n(16497),T=n(85815);const k=e=>{let{defaultValue:t,options:n,row:r,onChange:i}=e;return(0,m.jsx)(S,{value:t,row:r,onChange:i,children:n.map((e=>(0,m.jsx)(M.A,{value:e.value,control:(0,m.jsx)(T.A,{}),label:e.label},e.value)))})}},10551:(e,t,n)=>{"use strict";n(9950),n(20572),n(7774),n(50160),n(52498),n(13792),n(49989),n(17825),n(44414)},7774:(e,t,n)=>{"use strict";n.d(t,{NX:()=>u,mv:()=>c,uK:()=>l});var r=n(9950),i=n(20572),a=n(44414);const o=r.createContext();function s(e,t){return{...e,[t.name]:t.value}}function l(e){let{initialStates:t,children:n}=e;const[i,l]=r.useReducer(s,t),c=r.useMemo((()=>[i,l]),[i,l]);return(0,a.jsxs)(o.Provider,{value:c,children:[" ",n," "]})}function c(){const e=r.useContext(o);if(!e)throw new Error;return e}function u(e,t,n){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];i.x.setSession(t,n,r),e({name:t,value:n})}o.displayName="UF BRAVO Platform Context"},79700:(e,t,n)=>{"use strict";n.d(t,{ql:()=>r});const r=e=>{if("string"==typeof e)return e;for(var t="",n=0;n1&&(t+=" - ")}return t}},20572:(e,t,n)=>{"use strict";n.d(t,{x:()=>d});var r=n(96011),i=n.n(r);const a={INCORRECT_PASSWORD_OR_USERNAME:2001,PASSWORD_LENGTH_ERROR:2002,EMAIL_VALIDATION_ERROR:2003,EMAIL_USED_ERROR:2004,IMPROPER_SUBMISSION:3001,DATA_NOT_FOUND:3005,NOT_AVAILABLE_TO_DEMO:9898,PERMISSION_DENIED:9899,MALFORMATED_REQUEST:9999};var o=n(50160),s=n(53758),l=n(44414);const c={"UTC-12:00":"Etc/GMT+12","UTC-11:00":"Etc/GMT+11","UTC-10:00":"Etc/GMT+10","UTC-09:30":"Pacific/Marquesas","UTC-09:00":"Etc/GMT+9","UTC-08:00":"Etc/GMT+8","UTC-07:00":"Etc/GMT+7","UTC-06:00":"Etc/GMT+6","UTC-05:00":"Etc/GMT+5","UTC-04:00":"Etc/GMT+4","UTC-03:30":"America/St_Johns","UTC-03:00":"Etc/GMT+3","UTC-02:00":"Etc/GMT+2","UTC-01:00":"Etc/GMT+1","UTC+00:00":"Etc/GMT","UTC+01:00":"Etc/GMT-1","UTC+02:00":"Etc/GMT-2","UTC+03:00":"Etc/GMT-3","UTC+03:30":"Iran","UTC+04:00":"Etc/GMT-4","UTC+04:30":"Asia/Kabul","UTC+05:00":"Etc/GMT-5","UTC+05:30":"Asia/Colombo","UTC+05:45":"Asia/Kathmandu","UTC+06:00":"Etc/GMT-6","UTC+06:30":"Asia/Yangon","UTC+07:00":"Etc/GMT-7","UTC+08:00":"Etc/GMT-8","UTC+09:00":"Etc/GMT-9","UTC+09:30":"Australia/Darwin","UTC+10:00":"Etc/GMT-10","UTC+10:30":"Australia/LHI","UTC+11:00":"Etc/GMT-11","UTC+12:00":"Etc/GMT-12","UTC+13:00":"Etc/GMT-13","UTC+14:00":"Etc/GMT-14"},u={"UTC-12:00":-432e5,"UTC-11:00":-396e5,"UTC-10:00":-36e6,"UTC-09:30":-342e5,"UTC-09:00":-324e5,"UTC-08:00":-288e5,"UTC-07:00":-252e5,"UTC-06:00":-216e5,"UTC-05:00":-18e6,"UTC-04:00":-144e5,"UTC-03:30":-126e5,"UTC-03:00":-108e5,"UTC-02:00":-72e5,"UTC-01:00":-36e5,"UTC+00:00":0,"UTC+01:00":36e5,"UTC+02:00":72e5,"UTC+03:00":108e5,"UTC+03:30":126e5,"UTC+04:00":144e5,"UTC+04:30":162e5,"UTC+05:00":18e6,"UTC+05:30":198e5,"UTC+05:45":207e5,"UTC+06:00":216e5,"UTC+06:30":234e5,"UTC+07:00":252e5,"UTC+08:00":288e5,"UTC+09:00":324e5,"UTC+09:30":342e5,"UTC+10:00":36e6,"UTC+10:30":378e5,"UTC+11:00":396e5,"UTC+12:00":432e5,"UTC+13:00":468e5,"UTC+14:00":504e5},d=function(){let e="",t={language:"en"},n={},r=null,d=0;const h=(t,n,r,a,o)=>{let s="";return document.querySelector("[name=csrfmiddlewaretoken]")&&(s=document.querySelector("[name=csrfmiddlewaretoken]").value),i().post(e+t,n,{timeout:a,responseType:o,headers:{...r,"X-CSRFToken":s}})},f=()=>({...t,user:n}),p=(e,n,r)=>{r&&h("/api/updateSessions",{[e]:n}).catch((e=>console.log(e))),t[e]=n,t.lastActive=(new Date).getTime(),localStorage.setItem("sessionContext",JSON.stringify(t))};return{setServer:t=>{e=t,localStorage.setItem("serverAddress",e)},getServer:()=>e,setDecryptionPassword:(e,t)=>{if(""==e)return r=null,void(d=0);r=new fernet.Secret(e),d=t},decodeTimestamp:e=>Math.round(e+d),decodeMessage:e=>{if(!r)return e;var t=new fernet.Token({secret:r,token:e,ttl:0});try{return t.decode(),t.message}catch{return e}},getConnectionStatus:()=>({version:"",status:false}),getDownloadLink:(e,t)=>{let n=e;n+="?";for(let r in t)n+=r+"=",n+=t[r]+"&";return n.slice(0,-1)},query:h,displayError:(e,n,r)=>{if("string"===typeof e&&n)n((0,l.jsx)(s.A,{title:"ERROR",message:e,handleClose:()=>n(),handleConfirm:()=>r?r():n()}));else if(n&&e.response){var i=o.z.ErrorMessage.UNKNOWN_ERROR[t.language];if(500===e.response.status)i=o.z.ErrorMessage.INTERNAL_SERVER_ERROR[t.language];else if(405===e.response.status)i=o.z.ErrorMessage.ENDPOINT_NOT_EXIST[t.language];else if(404===e.response.status)i=o.z.ErrorMessage.ENDPOINT_NOT_EXIST[t.language];else if(403===e.response.status)i=o.z.ErrorMessage.PERMISSION_DENIED[t.language];else if(400===e.response.status){for(var c of Object.keys(a))if(a[c]==e.response.data.code){i=o.z.ErrorMessage[c][t.language];break}e.response.data.message?i=e.response.data.message:i==o.z.ErrorMessage.UNKNOWN_ERROR[t.language]&&console.log(e.response.data)}else 401==e.response.status?i=o.z.ErrorMessage.CONNECTION_TIMEDOUT[t.language]:console.log(e);n((0,l.jsx)(s.A,{title:"ERROR",message:i,handleClose:()=>n(),handleConfirm:()=>r?r():n()}))}else console.log(e),n((0,l.jsx)(s.A,{title:"ERROR",message:"Client Javascript Error",handleClose:()=>n(),handleConfirm:()=>r?r():n()}))},syncSession:async()=>{localStorage.getItem("sessionContext")&&(t=JSON.parse(localStorage.getItem("sessionContext")));const e=await h("/api/querySessions",{session:t});return t={...t,...e.data.session},localStorage.setItem("sessionContext",JSON.stringify(t)),t.TimeSeriesAnalysisLayout={},n=e.data.user,f()},getSession:f,setSession:p,getDateTimeOptions:e=>"DateFull"==e?{dateStyle:"full"}:"DateLong"==e?{dateStyle:"long"}:"DateNumeric"==e?{year:"numeric",month:"numeric",day:"numeric"}:{weekday:"long",year:"numeric",month:"long",day:"numeric"},getTimezoneName:e=>c[e]?{timeZone:c[e]}:{},getTimezoneOffset:(e,t)=>{const n=-6e4*new Date(e).getTimezoneOffset();return void 0===u[t]?0:n-u[t]},isSynced:()=>false,authenticate:(e,t,n)=>h("/api/login",{Email:e,Password:t,Persistent:!!n}),register:(e,t,n,r)=>{},nullifyUser:()=>{n={},t={},localStorage.getItem("sessionContext")&&localStorage.setItem("sessionContext",t)},logout:()=>h("/api/logout"),getUser:()=>n,setUser:e=>{n=e},setParticipantUID:e=>(t.participant_uid=e,!0),setPageIndex:(e,t)=>{p(e+"PageIndex",t,!1)}}}()},23922:(e,t,n)=>{"use strict";n.d(t,{s:()=>g,r:()=>m});var r=n(97055),i=n.n(r);const a={moduleType:"locale",name:"zh-CN",dictionary:{Autoscale:"\u81ea\u52a8\u7f29\u653e","Box Select":"\u77e9\u5f62\u6846\u9009","Click to enter Colorscale title":"\u70b9\u51fb\u8f93\u5165\u8272\u9636\u7684\u6807\u9898","Click to enter Component A title":"\u70b9\u51fb\u8f93\u5165\u7ec4\u4ef6A\u7684\u6807\u9898","Click to enter Component B title":"\u70b9\u51fb\u8f93\u5165\u7ec4\u4ef6B\u7684\u6807\u9898","Click to enter Component C title":"\u70b9\u51fb\u8f93\u5165\u7ec4\u4ef6C\u7684\u6807\u9898","Click to enter Plot title":"\u70b9\u51fb\u8f93\u5165\u56fe\u8868\u7684\u6807\u9898","Click to enter X axis title":"\u70b9\u51fb\u8f93\u5165X\u8f74\u7684\u6807\u9898","Click to enter Y axis title":"\u70b9\u51fb\u8f93\u5165Y\u8f74\u7684\u6807\u9898","Compare data on hover":"\u60ac\u505c\u65f6\u6bd4\u8f83\u6570\u636e","Double-click on legend to isolate one trace":"\u53cc\u51fb\u56fe\u4f8b\u6765\u7a81\u663e\u5bf9\u5e94\u8f68\u8ff9","Double-click to zoom back out":"\u53cc\u51fb\u8fd4\u56de\u7f29\u5c0f\u663e\u793a","Download plot as a png":"\u4e0b\u8f7d\u56fe\u8868\u4e3aPNG\u683c\u5f0f","Download plot":"\u4e0b\u8f7d\u56fe\u8868","Edit in Chart Studio":"\u5728Chart Studio\u4e2d\u7f16\u8f91","IE only supports svg. Changing format to svg.":"IE\u53ea\u652f\u6301SVG\u3002\u8f6c\u6362\u683c\u5f0f\u4e3aSVG\u3002","Lasso Select":"\u5957\u7d22\u9009\u62e9","Orbital rotation":"\u8f68\u9053\u65cb\u8f6c",Pan:"\u5e73\u79fb","Produced with Plotly.js":"\u7531Plotly.js\u751f\u6210",Reset:"\u91cd\u7f6e","Reset axes":"\u91cd\u7f6e\u8f74","Reset camera to default":"\u91cd\u7f6e\u955c\u5934\u89c6\u89d2\u4e3a\u9ed8\u8ba4\u72b6\u6001","Reset camera to last save":"\u91cd\u7f6e\u955c\u5934\u89c6\u89d2\u4e3a\u4e0a\u6b21\u4fdd\u5b58\u72b6\u6001","Reset view":"\u91cd\u7f6e\u89c6\u56fe","Reset views":"\u91cd\u7f6e\u89c6\u56fe","Show closest data on hover":"\u60ac\u505c\u65f6\u663e\u793a\u6700\u8fd1\u7684\u6570\u636e","Snapshot succeeded":"\u751f\u6210\u5feb\u7167\u6210\u529f","Sorry, there was a problem downloading your snapshot!":"\u62b1\u6b49\uff0c\u4e0b\u8f7d\u5feb\u7167\u51fa\u73b0\u95ee\u9898\uff01","Taking snapshot - this may take a few seconds":"\u6b63\u5728\u751f\u6210\u5feb\u7167 - \u53ef\u80fd\u9700\u8981\u51e0\u79d2\u949f",Zoom:"\u7f29\u653e","Zoom in":"\u653e\u5927","Zoom out":"\u7f29\u5c0f","close:":"\u5173\u95ed:",trace:"\u8e2a\u8ff9:","lat:":"\u7eac\u5ea6:","lon:":"\u7ecf\u5ea6:","q1:":"\u7b2c\u4e00\u56db\u5206\u4f4d\u6570:","q3:":"\u7b2c\u4e09\u56db\u5206\u4f4d\u6570:","source:":"\u6e90:","target:":"\u76ee\u6807:","lower fence:":"\u5185\u4fa7\u680f(lower fence):","upper fence:":"\u5916\u4fa7\u680f(upper fence):","max:":"\u6700\u5927\u503c:","mean \xb1 \u03c3:":"\u5e73\u5747\u6570 \xb1 \u6807\u51c6\u5dee\u03c3:","mean:":"\u5e73\u5747\u6570:","median:":"\u4e2d\u4f4d\u6570:","min:":"\u6700\u5c0f\u503c:","Turntable rotation":"\u65cb\u8f6c\u8f6c\u76d8:","Toggle Spike Lines":"\u5207\u6362\u663e\u793a\u6570\u636e\u70b9\u8f85\u52a9\u7ebf(Spike Lines)","open:":"\u6253\u5f00:","high:":"\u9ad8:","low:":"\u4f4e:","Toggle show closest data on hover":"\u5207\u6362\u60ac\u505c\u65f6\u663e\u793a\u6700\u8fd1\u7684\u6570\u636e\u70b9","incoming flow count:":"\u6d41\u5165\u6570\u91cf:","outgoing flow count:":"\u6d41\u51fa\u6570\u91cf:","kde:":"kde:","Click to enter radial axis title":"\u70b9\u51fb\u8f93\u5165\u5f84\u5411\u8f74\u6807\u9898","new text":"\u65b0\u5efa\u6587\u672c"},format:{days:["\u661f\u671f\u65e5","\u661f\u671f\u4e00","\u661f\u671f\u4e8c","\u661f\u671f\u4e09","\u661f\u671f\u56db","\u661f\u671f\u4e94","\u661f\u671f\u516d"],shortDays:["\u5468\u65e5","\u5468\u4e00","\u5468\u4e8c","\u5468\u4e09","\u5468\u56db","\u5468\u4e94","\u5468\u516d"],months:["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"],shortMonths:["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],date:"%Y-%m-%d"}},o={type:"scattergl",mode:"lines",line:{color:"rgb(0,0,0)",width:2},showlegend:!1,hovertemplate:""},s={type:"scattergl",mode:"markers",marker:{color:"rgb(0,0,0)",size:5},showlegend:!1,hovertemplate:""},l={fillcolor:"#33333344",line:{color:"transparent"},hoverinfo:"skip",type:"scatter",showlegend:!1},c={type:"histogram",marker:{},showlegend:!0,hovertemplate:""},u={type:"bar",marker:{},showlegend:!0,hovertemplate:""},d={type:"box",marker:{color:"rgb(46,20,105)"},line:{color:"rgb(46,20,105)"},showlegend:!1,hovertemplate:""},h={type:"heatmap",zsmooth:"best",colorscale:"jet",hovertemplate:""},f={title:{text:""},grid:{subplots:[["xy"]]},legend:{x:1,y:1,xanchor:"right",tracegroupgap:0},yaxis:{type:"linear",showgrid:!0,gridcolor:"#DDDDDD",showline:!0,linecolor:"#000000",showticklabels:!0,ticks:"outside",title:{text:"",font:{size:15}}},xaxis:{showgrid:!0,gridcolor:"#DDDDDD",showline:!0,linecolor:"#000000",showticklabels:!0,ticks:"outside",title:{text:"",font:{size:15}}},hovermode:"x",boxmode:"group",autosize:!0,annotations:[]},p=(e,t,n)=>{if(e[t])if("object"==typeof e[t]&&"object"==typeof n)for(let r in n)e[t]=p(e[t],r,n[r]);else e[t]=n;else e[t]=n;return e};function m(e,t,n){const r=e.length;if(n>=r||0===n)return{x:e,y:t};const i=[],a=[],o=(r-2)/(n-2);let s=0;i.push(e[s]),a.push(t[s]);for(let l=0;lp&&(p=n,m=i)}i.push(e[m]),a.push(t[m]),s=m}return i.push(e[r-1]),a.push(t[r-1]),{x:i,y:a}}class g{constructor(e,t){switch(this.traces=[],this.ax=[{xaxis:"x",yaxis:"y",xlayout:"xaxis",ylayout:"yaxis"}],this.coloraxis=[],this.gca=this.ax[0],this.layout=JSON.parse(JSON.stringify(f)),this.onClick=async e=>{},this.fresh=!0,this.divName=e,t){case"en":default:this.locale="en-US";break;case"zh":i().register(a),this.locale="zh-CN"}}clearData(){for(let e in this.ax)delete this.layout[this.ax[e].xlayout],delete this.layout[this.ax[e].ylayout];this.layout.annotations=[],this.traces=[]}subplots(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{sharex:!1,sharey:!1,colSpacing:.02,rowSpacing:.15};if(this.ax=[],n.sharex)var r=Array(t).fill(0).map(((e,t)=>t+1==1?"x":"x"+(t+1).toString()));else r=Array(t*e).fill(0).map(((e,t)=>t+1==1?"x":"x"+(t+1).toString()));if(n.colSpacing||(n.colSpacing=.02),n.rowSpacing||(n.rowSpacing=.15),n.sharey)var i=Array(e).fill(0).map(((e,t)=>t+1==1?"y":"y"+(t+1).toString()));else i=Array(e*t).fill(0).map(((e,t)=>t+1==1?"y":"y"+(t+1).toString()));this.layout.grid.subplots=Array(e).fill(0).map((()=>Array(t)));const a=1/t,o=1/e,s=a*n.colSpacing,l=o*n.rowSpacing;for(var c=0;c1?[a*u+s,a*(u+1)-s]:[0,1],ydomain:e>1?[1-(o*(c+1)-l),1-(o*c+l)]:[0,1]})}for(var p of this.ax)this.layout[p.xlayout]=JSON.parse(JSON.stringify(f.xaxis)),t>1&&(this.layout[p.xlayout].domain=p.xdomain),this.layout[p.ylayout]=JSON.parse(JSON.stringify(f.yaxis)),e>1&&(this.layout[p.ylayout].domain=p.ydomain);return this.gca=this.ax[0],this.ax}addDualYAxis(e){let t=2;for(let r in this.ax)parseInt(this.ax[r].ylayout.replace("yaxis",""))>=t&&(t+=1);let n={...e};return n.yaxis="y"+t.toFixed(0),n.ylayout="yaxis"+t.toFixed(0),this.ax.push(n),this.layout[n.ylayout]=JSON.parse(JSON.stringify(f.yaxis)),this.layout[n.ylayout].domain=n.ydomain,this.layout[n.ylayout].overlaying=e.yaxis,this.layout[n.ylayout].side="right",n}setSubplotId(e){for(let t in this.ax)this.ax[t].id=e[t]}getAxes(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!e)return this.ax;for(let t in this.ax)if(this.ax[t].id==e)return this.ax[t]}plot(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;var i=JSON.parse(JSON.stringify(o));for(var a of(i.x=e,i.y=t,i.type="scatter",i.mode="lines",Object.keys(n)))"linewidth"==a?i.line.width=n[a]:"color"==a?i.line.color=n[a]:"linedash"==a?i.line.dash=n[a]:"shape"==a?i.line.shape=n[a]:i[a]=n[a];return r?this.ax.includes(r)?this.gca=r:(console.log("WARNING: Ax Not Found"),r=this.gca):r=this.gca,i.xaxis=this.gca.xaxis,i.yaxis=this.gca.yaxis,this.traces.push(i),i}scatter(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;var i=JSON.parse(JSON.stringify(s));for(var a of(i.x=e,i.y=t,i.type="scatter",i.mode="markers",Object.keys(n)))"color"==a?i.marker.color=n[a]:"size"==a?i.marker.size=n[a]:i[a]=n[a];return r?this.ax.includes(r)?this.gca=r:(console.log("WARNING: Ax Not Found"),r=this.gca):r=this.gca,i.xaxis=this.gca.xaxis,i.yaxis=this.gca.yaxis,this.traces.push(i),i}shadedErrorBar(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null;var s=JSON.parse(JSON.stringify(o));for(var c of(s.x=e,s.y=t,s.type="scatter",s.mode="lines",Object.keys(r)))"linewidth"==c?s.line.width=r[c]:"color"==c?s.line.color=r[c]:"shape"==c?s.line.shape=r[c]:s[c]=r[c];a?this.ax.includes(a)?this.gca=a:(console.log("WARNING: Ax Not Found"),a=this.gca):a=this.gca,s.xaxis=this.gca.xaxis,s.yaxis=this.gca.yaxis,this.traces.push(s);for(var u=new Array(e.length),d=0;d3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;i?this.ax.includes(i)?this.gca=i:(console.log("WARNING: Ax Not Found"),i=this.gca):i=this.gca;for(var a=new Array(e.length),o=0;on?t[o]:n;var s=new Array(e.length);for(o=0;o3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;var a=JSON.parse(JSON.stringify(h));for(var o of(a.x=e,a.y=t,a.z=n,Object.keys(r)))"zlim"==o?(a.zmin=r[o][0],a.zmax=r[o][1]):a[o]=r[o];return i?this.ax.includes(i)?this.gca=i:(console.log("WARNING: Ax Not Found"),i=this.gca):i=this.gca,a.xaxis=this.gca.xaxis,a.yaxis=this.gca.yaxis,this.traces.push(a),a}bar(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;var a=JSON.parse(JSON.stringify(u));for(var o of(a.x=e,a.y=t,n.length>0&&(a.base=n),Object.keys(r)))"facecolor"==o?a.marker.color=r[o]:"color"==o?a.facecolor=r[o]:a[o]=r[o];return i?this.ax.includes(i)?this.gca=i:(console.log("WARNING: Ax Not Found"),i=this.gca):i=this.gca,a.xaxis=this.gca.xaxis,a.yaxis=this.gca.yaxis,this.traces.push(a),a}hist(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;var r=JSON.parse(JSON.stringify(c));for(var i of(r.x=e,Object.keys(t)))"facecolor"==i?r.marker.color=t[i]:"color"==i?r.facecolor=t[i]:r[i]=t[i];return n?this.ax.includes(n)?this.gca=n:(console.log("WARNING: Ax Not Found"),n=this.gca):n=this.gca,r.xaxis=this.gca.xaxis,r.yaxis=this.gca.yaxis,this.traces.push(r),r}box(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;var i=JSON.parse(JSON.stringify(d));for(var a of(i.x=e,i.y=t,Object.keys(n)))"linecolor"==a?i.line.color=n[a]:"markercolor"==a?i.marker.color=n[a]:i[a]=n[a];return r?this.ax.includes(r)?this.gca=r:(console.log("WARNING: Ax Not Found"),r=this.gca):r=this.gca,i.xaxis=this.gca.xaxis,i.yaxis=this.gca.yaxis,this.traces.push(i),i}addShadedArea(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;r?this.ax.includes(r)?this.gca=r:(console.log("WARNING: Ax Not Found"),r=this.gca):r=this.gca;var i=[];i=t||("log"==this.layout[this.gca.ylayout].type?[Math.pow(10,this.layout[this.gca.ylayout].range[0]),Math.pow(10,this.layout[this.gca.ylayout].range[1])]:this.layout[this.gca.ylayout].range),(a=JSON.parse(JSON.stringify(l))).xaxis=this.gca.xaxis,a.yaxis=this.gca.yaxis,a.x=e,a.y=new Array(e.length).fill(i[0]),a.fill="none",this.traces.push(a);var a=JSON.parse(JSON.stringify(l));for(var o of(a.xaxis=this.gca.xaxis,a.yaxis=this.gca.yaxis,a.x=e,a.y=new Array(e.length).fill(i[1]),Object.keys(n)))"color"==o?a.fillcolor=n[o]+a.fillcolor.slice(-2):"alpha"==o?a.fillcolor=a.fillcolor.slice(0,-2)+Math.round(255*n[o]).toString(16):a[o]=n[o];return a.fill="tonexty",this.traces.push(a),a}addText(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;var a={x:e,y:t,text:n,mode:"text"};for(var o of Object.keys(r))a[o]=r[o];return i?this.ax.includes(i)?this.gca=i:(console.log("WARNING: Ax Not Found"),i=this.gca):i=this.gca,a.xaxis=this.gca.xaxis,a.yaxis=this.gca.yaxis,this.traces.push(a),a}createColorAxis(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t="",n=this.coloraxis.length+1;for(var r of(t=1==n?"coloraxis":"coloraxis"+n.toString(),this.layout[t]={showscale:!0},this.coloraxis.push(t),Object.keys(e)))"clim"==r?(this.layout[t].cmin=e[r][0],this.layout[t].cmax=e[r][1]):this.layout[t][r]=e[r];return t}getColorAxis(){return this.coloraxis}setColorAxis(e,t){if(!e)return delete this.layout[t],void(this.coloraxis=this.coloraxis.filter((e=>e!=t)));for(var n of Object.keys(e))"clim"==n?(this.layout[t].cmin=e[n][0],this.layout[t].cmax=e[n][1]):this.layout[t][n]=e[n];return this.coloraxis}setClim(e,t){this.layout[t].cmin=e[0],this.layout[t].cmax=e[1]}setLegend(e){this.layout.legend={...this.layout.legend,...e}}setTitle(e){this.layout.title.text=e}setSubtitle(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t){const i=.5*(t.xdomain[0]+t.xdomain[1]),a=t.ydomain[1],o={text:e,font:{size:20},showarrow:!1,x:i,y:a,xref:"paper",yref:"paper",yanchor:"bottom",xanchor:"center"};var n=!1;for(var r in this.layout.annotations)this.layout.annotations[r].x==i&&this.layout.annotations[r].y==a&&(this.layout.annotations[r]=o,n=!0);n||this.layout.annotations.push(o)}else this.setTitle(e)}setXlabel(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{fontSize:15},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;n?this.ax.includes(n)?this.gca=n:(console.log("WARNING: Ax Not Found"),n=this.gca):n=this.gca,this.layout[n.xlayout].title={text:e,font:{size:t.fontSize}}}setYlabel(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{fontSize:15},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;n?this.ax.includes(n)?this.gca=n:(console.log("WARNING: Ax Not Found"),n=this.gca):n=this.gca,this.layout[n.ylayout].title={text:e,font:{size:t.fontSize}}}setXlim(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t?this.ax.includes(t)?this.gca=t:(console.log("WARNING: Ax Not Found"),t=this.gca):t=this.gca,this.layout[t.xlayout].range=e}setYlim(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;t?this.ax.includes(t)?this.gca=t:(console.log("WARNING: Ax Not Found"),t=this.gca):t=this.gca,n&&this.layout[t.ylayout].range?(this.layout[t.ylayout].range[0]>e[0]&&(this.layout[t.ylayout].range[0]=e[0]),this.layout[t.ylayout].range[1]0&&void 0!==arguments[0]?arguments[0]:null;return e?this.ax.includes(e)?this.gca=e:(console.log("WARNING: Ax Not Found"),e=this.gca):e=this.gca,this.layout[e.xlayout].range}getYlim(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e?this.ax.includes(e)?this.gca=e:(console.log("WARNING: Ax Not Found"),e=this.gca):e=this.gca,this.layout[e.ylayout].range}setTickValue(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;n?this.ax.includes(n)?this.gca=n:(console.log("WARNING: Ax Not Found"),n=this.gca):n=this.gca,this.layout[n[t+"layout"]].tickmode="array",this.layout[n[t+"layout"]].tickvals=e}setTickLabel(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;n?this.ax.includes(n)?this.gca=n:(console.log("WARNING: Ax Not Found"),n=this.gca):n=this.gca,this.layout[n[t+"layout"]].ticktext=e}setAxisProps(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;n?this.ax.includes(n)?this.gca=n:(console.log("WARNING: Ax Not Found"),n=this.gca):n=this.gca;for(let r in e)this.layout[n[t+"layout"]]=p(this.layout[n[t+"layout"]],r,e[r])}setLayoutProps(e){for(var t of Object.keys(e))"Object"==e[t].constructor.name?this.layout[t]={...this.layout[t],...e[t]}:this.layout[t]=e[t]}setScaleType(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;n?this.ax.includes(n)?this.gca=n:(console.log("WARNING: Ax Not Found"),n=this.gca):n=this.gca,"linear"==this.layout[n[t+"layout"]].type&&"log"==e&&this.layout[n[t+"layout"]].range&&(this.layout[n[t+"layout"]].range[0]=Math.log10(this.layout[n[t+"layout"]].range[0]),this.layout[n[t+"layout"]].range[1]=Math.log10(this.layout[n[t+"layout"]].range[1])),this.layout[n[t+"layout"]].type=e}updateAxes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t?this.ax.includes(t)?this.gca=t:(console.log("WARNING: Ax Not Found"),t=this.gca):t=this.gca;for(let n in this.traces)this.traces[n].id==e&&(this.traces[n].xaxis=this.gca.xaxis,this.traces[n].yaxis=this.gca.yaxis)}render(){const e={responsive:!0,locale:this.locale,toImageButtonOptions:{format:"png",scale:1},modeBarButtonsToAdd:[{name:"Download Vector File",icon:{width:857.1,height:1e3,path:"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z",transform:"matrix(1 0 0 -1 0 850)"},click:function(e){const t=window.getComputedStyle(e);i().toImage(e,{format:"svg",width:t.width.replace("px",""),height:t.height.replace("px","")}).then((t=>{var n=document.createElement("a");n.href=t,n.target="_blank",n.download=e.id+".svg",n.click()}))}},{name:"Download Raw Series",icon:{path:"M12 3C12.5523 3 13 3.44772 13 4V17.5858L18.2929 12.2929C18.6834 11.9024 19.3166 11.9024 19.7071 12.2929C20.0976 12.6834 20.0976 13.3166 19.7071 13.7071L12.7071 20.7071C12.3166 21.0976 11.6834 21.0976 11.2929 20.7071L4.29289 13.7071C3.90237 13.3166 3.90237 12.6834 4.29289 12.2929C4.68342 11.9024 5.31658 11.9024 5.70711 12.2929L11 17.5858V4C11 3.44772 11.4477 3 12 3Z",transform:"scale(0.7) translate(0, 0)"},click:function(e){var t="x, y, name\n";for(let r in e.data)if(["scatter","box"].includes(e.data[r].type))for(let n in e.data[r].x)t+=e.data[r].x[n]+","+e.data[r].y[n]+","+(e.data[r].name||" ")+"\n";var n=document.createElement("a");n.href="data:text/json;charset=utf-8,"+encodeURI(t),n.target="_blank",n.download=e.id+".csv",n.click()}}]},t=document.getElementById(this.divName);t&&(this.onClick=async e=>{const n=e.target.getBoundingClientRect();let r=this.ax[0];if(t._fullLayout.grid)for(let s in t._fullLayout.grid.subplots)t._fullLayout.grid.subplots[s][0]==e.target.dataset.subplot&&(r=this.ax[s]);const i=t._fullLayout[r.xlayout].p2d(e.clientX-n.left),a=t._fullLayout[r.ylayout].p2d(e.clientY-n.top),o=new CustomEvent("PlotlyClick",{detail:{divName:this.divName,x:i,y:a,ax:r}});document.dispatchEvent(o)},this.fresh?(i().newPlot(this.divName,this.traces,this.layout,e).then((()=>{t.on("plotly_relayout",(e=>{const t=new CustomEvent("PlotlyRelayout",{detail:e});document.dispatchEvent(t)}))})),this.fresh=!1):i().react(this.divName,this.traces,this.layout,e))}clearAxes(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;e?this.ax.includes(e)?this.gca=e:(console.log("WARNING: Ax Not Found"),e=this.gca):e=this.gca,this.traces=this.traces.filter((e=>!(e.xaxis==this.gca.xaxis&&e.yaxis==this.gca.yaxis)))}purge(){i().purge(this.divName),this.fresh=!0}refresh(){try{i().relayout(this.divName,{})}catch(e){return}}}},80419:(e,t,n)=>{"use strict";n.d(t,{mL:()=>v,gq:()=>y,Kx:()=>w,pl:()=>x,rQ:()=>C,vD:()=>A,Qm:()=>E,CG:()=>O,uz:()=>P,AS:()=>R,fW:()=>_});var r=n(13437),i=n(85442),a=n(9950),o=n(18495),s=n(58168),l=Object.defineProperty,c=(e,t,n)=>(((e,t,n)=>{t in e?l(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!==typeof t?t+"":t,n),n);const u=new r.Ray,d=new r.Plane,h=Math.cos(Math.PI/180*70),f=(e,t)=>(e%t+t)%t;class p extends r.EventDispatcher{constructor(e,t){super(),c(this,"object"),c(this,"domElement"),c(this,"enabled",!0),c(this,"target",new r.Vector3),c(this,"minDistance",0),c(this,"maxDistance",1/0),c(this,"minZoom",0),c(this,"maxZoom",1/0),c(this,"minPolarAngle",0),c(this,"maxPolarAngle",Math.PI),c(this,"minAzimuthAngle",-1/0),c(this,"maxAzimuthAngle",1/0),c(this,"enableDamping",!1),c(this,"dampingFactor",.05),c(this,"enableZoom",!0),c(this,"zoomSpeed",1),c(this,"enableRotate",!0),c(this,"rotateSpeed",1),c(this,"enablePan",!0),c(this,"panSpeed",1),c(this,"screenSpacePanning",!0),c(this,"keyPanSpeed",7),c(this,"zoomToCursor",!1),c(this,"autoRotate",!1),c(this,"autoRotateSpeed",2),c(this,"reverseOrbit",!1),c(this,"reverseHorizontalOrbit",!1),c(this,"reverseVerticalOrbit",!1),c(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),c(this,"mouseButtons",{LEFT:r.MOUSE.ROTATE,MIDDLE:r.MOUSE.DOLLY,RIGHT:r.MOUSE.PAN}),c(this,"touches",{ONE:r.TOUCH.ROTATE,TWO:r.TOUCH.DOLLY_PAN}),c(this,"target0"),c(this,"position0"),c(this,"zoom0"),c(this,"_domElementKeyEvents",null),c(this,"getPolarAngle"),c(this,"getAzimuthalAngle"),c(this,"setPolarAngle"),c(this,"setAzimuthalAngle"),c(this,"getDistance"),c(this,"getZoomScale"),c(this,"listenToKeyEvents"),c(this,"stopListenToKeyEvents"),c(this,"saveState"),c(this,"reset"),c(this,"update"),c(this,"connect"),c(this,"dispose"),c(this,"dollyIn"),c(this,"dollyOut"),c(this,"getScale"),c(this,"setScale"),this.object=e,this.domElement=t,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=()=>m.phi,this.getAzimuthalAngle=()=>m.theta,this.setPolarAngle=e=>{let t=f(e,2*Math.PI),r=m.phi;r<0&&(r+=2*Math.PI),t<0&&(t+=2*Math.PI);let i=Math.abs(t-r);2*Math.PI-i{let t=f(e,2*Math.PI),r=m.theta;r<0&&(r+=2*Math.PI),t<0&&(t+=2*Math.PI);let i=Math.abs(t-r);2*Math.PI-in.object.position.distanceTo(n.target),this.listenToKeyEvents=e=>{e.addEventListener("keydown",ne),this._domElementKeyEvents=e},this.stopListenToKeyEvents=()=>{this._domElementKeyEvents.removeEventListener("keydown",ne),this._domElementKeyEvents=null},this.saveState=()=>{n.target0.copy(n.target),n.position0.copy(n.object.position),n.zoom0=n.object.zoom},this.reset=()=>{n.target.copy(n.target0),n.object.position.copy(n.position0),n.object.zoom=n.zoom0,n.object.updateProjectionMatrix(),n.dispatchEvent(i),n.update(),l=s.NONE},this.update=(()=>{const t=new r.Vector3,a=new r.Vector3(0,1,0),o=(new r.Quaternion).setFromUnitVectors(e.up,a),c=o.clone().invert(),f=new r.Vector3,x=new r.Quaternion,b=2*Math.PI;return function(){const _=n.object.position;o.setFromUnitVectors(e.up,a),c.copy(o).invert(),t.copy(_).sub(n.target),t.applyQuaternion(o),m.setFromVector3(t),n.autoRotate&&l===s.NONE&&L(2*Math.PI/60/60*n.autoRotateSpeed),n.enableDamping?(m.theta+=g.theta*n.dampingFactor,m.phi+=g.phi*n.dampingFactor):(m.theta+=g.theta,m.phi+=g.phi);let w=n.minAzimuthAngle,A=n.maxAzimuthAngle;isFinite(w)&&isFinite(A)&&(w<-Math.PI?w+=b:w>Math.PI&&(w-=b),A<-Math.PI?A+=b:A>Math.PI&&(A-=b),m.theta=w<=A?Math.max(w,Math.min(A,m.theta)):m.theta>(w+A)/2?Math.max(w,m.theta):Math.min(A,m.theta)),m.phi=Math.max(n.minPolarAngle,Math.min(n.maxPolarAngle,m.phi)),m.makeSafe(),!0===n.enableDamping?n.target.addScaledVector(y,n.dampingFactor):n.target.add(y),n.zoomToCursor&&D||n.object.isOrthographicCamera?m.radius=H(m.radius):m.radius=H(m.radius*v),t.setFromSpherical(m),t.applyQuaternion(c),_.copy(n.target).add(t),n.object.matrixAutoUpdate||n.object.updateMatrix(),n.object.lookAt(n.target),!0===n.enableDamping?(g.theta*=1-n.dampingFactor,g.phi*=1-n.dampingFactor,y.multiplyScalar(1-n.dampingFactor)):(g.set(0,0,0),y.set(0,0,0));let S=!1;if(n.zoomToCursor&&D){let i=null;if(n.object instanceof r.PerspectiveCamera&&n.object.isPerspectiveCamera){const e=t.length();i=H(e*v);const r=e-i;n.object.position.addScaledVector(E,r),n.object.updateMatrixWorld()}else if(n.object.isOrthographicCamera){const e=new r.Vector3(C.x,C.y,0);e.unproject(n.object),n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/v)),n.object.updateProjectionMatrix(),S=!0;const a=new r.Vector3(C.x,C.y,0);a.unproject(n.object),n.object.position.sub(a).add(e),n.object.updateMatrixWorld(),i=t.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),n.zoomToCursor=!1;null!==i&&(n.screenSpacePanning?n.target.set(0,0,-1).transformDirection(n.object.matrix).multiplyScalar(i).add(n.object.position):(u.origin.copy(n.object.position),u.direction.set(0,0,-1).transformDirection(n.object.matrix),Math.abs(n.object.up.dot(u.direction))p||8*(1-x.dot(n.object.quaternion))>p)&&(n.dispatchEvent(i),f.copy(n.object.position),x.copy(n.object.quaternion),S=!1,!0)}})(),this.connect=e=>{n.domElement=e,n.domElement.style.touchAction="none",n.domElement.addEventListener("contextmenu",re),n.domElement.addEventListener("pointerdown",J),n.domElement.addEventListener("pointercancel",ee),n.domElement.addEventListener("wheel",te)},this.dispose=()=>{var e,t,r,i,a,o;n.domElement&&(n.domElement.style.touchAction="auto"),null==(e=n.domElement)||e.removeEventListener("contextmenu",re),null==(t=n.domElement)||t.removeEventListener("pointerdown",J),null==(r=n.domElement)||r.removeEventListener("pointercancel",ee),null==(i=n.domElement)||i.removeEventListener("wheel",te),null==(a=n.domElement)||a.ownerDocument.removeEventListener("pointermove",Q),null==(o=n.domElement)||o.ownerDocument.removeEventListener("pointerup",ee),null!==n._domElementKeyEvents&&n._domElementKeyEvents.removeEventListener("keydown",ne)};const n=this,i={type:"change"},a={type:"start"},o={type:"end"},s={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let l=s.NONE;const p=1e-6,m=new r.Spherical,g=new r.Spherical;let v=1;const y=new r.Vector3,x=new r.Vector2,b=new r.Vector2,_=new r.Vector2,w=new r.Vector2,A=new r.Vector2,S=new r.Vector2,M=new r.Vector2,T=new r.Vector2,k=new r.Vector2,E=new r.Vector3,C=new r.Vector2;let D=!1;const R=[],P={};function O(){return Math.pow(.95,n.zoomSpeed)}function L(e){n.reverseOrbit||n.reverseHorizontalOrbit?g.theta+=e:g.theta-=e}function I(e){n.reverseOrbit||n.reverseVerticalOrbit?g.phi+=e:g.phi-=e}const z=(()=>{const e=new r.Vector3;return function(t,n){e.setFromMatrixColumn(n,0),e.multiplyScalar(-t),y.add(e)}})(),N=(()=>{const e=new r.Vector3;return function(t,r){!0===n.screenSpacePanning?e.setFromMatrixColumn(r,1):(e.setFromMatrixColumn(r,0),e.crossVectors(n.object.up,e)),e.multiplyScalar(t),y.add(e)}})(),F=(()=>{const e=new r.Vector3;return function(t,i){const a=n.domElement;if(a&&n.object instanceof r.PerspectiveCamera&&n.object.isPerspectiveCamera){const r=n.object.position;e.copy(r).sub(n.target);let o=e.length();o*=Math.tan(n.object.fov/2*Math.PI/180),z(2*t*o/a.clientHeight,n.object.matrix),N(2*i*o/a.clientHeight,n.object.matrix)}else a&&n.object instanceof r.OrthographicCamera&&n.object.isOrthographicCamera?(z(t*(n.object.right-n.object.left)/n.object.zoom/a.clientWidth,n.object.matrix),N(i*(n.object.top-n.object.bottom)/n.object.zoom/a.clientHeight,n.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),n.enablePan=!1)}})();function B(e){n.object instanceof r.PerspectiveCamera&&n.object.isPerspectiveCamera||n.object instanceof r.OrthographicCamera&&n.object.isOrthographicCamera?v=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function j(e){B(v/e)}function U(e){B(v*e)}function V(e){if(!n.zoomToCursor||!n.domElement)return;D=!0;const t=n.domElement.getBoundingClientRect(),r=e.clientX-t.left,i=e.clientY-t.top,a=t.width,o=t.height;C.x=r/a*2-1,C.y=-i/o*2+1,E.set(C.x,C.y,1).unproject(n.object).sub(n.object.position).normalize()}function H(e){return Math.max(n.minDistance,Math.min(n.maxDistance,e))}function W(e){x.set(e.clientX,e.clientY)}function G(e){w.set(e.clientX,e.clientY)}function q(){if(1==R.length)x.set(R[0].pageX,R[0].pageY);else{const e=.5*(R[0].pageX+R[1].pageX),t=.5*(R[0].pageY+R[1].pageY);x.set(e,t)}}function Y(){if(1==R.length)w.set(R[0].pageX,R[0].pageY);else{const e=.5*(R[0].pageX+R[1].pageX),t=.5*(R[0].pageY+R[1].pageY);w.set(e,t)}}function $(){const e=R[0].pageX-R[1].pageX,t=R[0].pageY-R[1].pageY,n=Math.sqrt(e*e+t*t);M.set(0,n)}function X(e){if(1==R.length)b.set(e.pageX,e.pageY);else{const t=ae(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);b.set(n,r)}_.subVectors(b,x).multiplyScalar(n.rotateSpeed);const t=n.domElement;t&&(L(2*Math.PI*_.x/t.clientHeight),I(2*Math.PI*_.y/t.clientHeight)),x.copy(b)}function Z(e){if(1==R.length)A.set(e.pageX,e.pageY);else{const t=ae(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);A.set(n,r)}S.subVectors(A,w).multiplyScalar(n.panSpeed),F(S.x,S.y),w.copy(A)}function K(e){const t=ae(e),r=e.pageX-t.x,i=e.pageY-t.y,a=Math.sqrt(r*r+i*i);T.set(0,a),k.set(0,Math.pow(T.y/M.y,n.zoomSpeed)),j(k.y),M.copy(T)}function J(e){var t,i;!1!==n.enabled&&(0===R.length&&(null==(t=n.domElement)||t.ownerDocument.addEventListener("pointermove",Q),null==(i=n.domElement)||i.ownerDocument.addEventListener("pointerup",ee)),function(e){R.push(e)}(e),"touch"===e.pointerType?function(e){switch(ie(e),R.length){case 1:switch(n.touches.ONE){case r.TOUCH.ROTATE:if(!1===n.enableRotate)return;q(),l=s.TOUCH_ROTATE;break;case r.TOUCH.PAN:if(!1===n.enablePan)return;Y(),l=s.TOUCH_PAN;break;default:l=s.NONE}break;case 2:switch(n.touches.TWO){case r.TOUCH.DOLLY_PAN:if(!1===n.enableZoom&&!1===n.enablePan)return;n.enableZoom&&$(),n.enablePan&&Y(),l=s.TOUCH_DOLLY_PAN;break;case r.TOUCH.DOLLY_ROTATE:if(!1===n.enableZoom&&!1===n.enableRotate)return;n.enableZoom&&$(),n.enableRotate&&q(),l=s.TOUCH_DOLLY_ROTATE;break;default:l=s.NONE}break;default:l=s.NONE}l!==s.NONE&&n.dispatchEvent(a)}(e):function(e){let t;switch(e.button){case 0:t=n.mouseButtons.LEFT;break;case 1:t=n.mouseButtons.MIDDLE;break;case 2:t=n.mouseButtons.RIGHT;break;default:t=-1}switch(t){case r.MOUSE.DOLLY:if(!1===n.enableZoom)return;!function(e){V(e),M.set(e.clientX,e.clientY)}(e),l=s.DOLLY;break;case r.MOUSE.ROTATE:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===n.enablePan)return;G(e),l=s.PAN}else{if(!1===n.enableRotate)return;W(e),l=s.ROTATE}break;case r.MOUSE.PAN:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===n.enableRotate)return;W(e),l=s.ROTATE}else{if(!1===n.enablePan)return;G(e),l=s.PAN}break;default:l=s.NONE}l!==s.NONE&&n.dispatchEvent(a)}(e))}function Q(e){!1!==n.enabled&&("touch"===e.pointerType?function(e){switch(ie(e),l){case s.TOUCH_ROTATE:if(!1===n.enableRotate)return;X(e),n.update();break;case s.TOUCH_PAN:if(!1===n.enablePan)return;Z(e),n.update();break;case s.TOUCH_DOLLY_PAN:if(!1===n.enableZoom&&!1===n.enablePan)return;!function(e){n.enableZoom&&K(e),n.enablePan&&Z(e)}(e),n.update();break;case s.TOUCH_DOLLY_ROTATE:if(!1===n.enableZoom&&!1===n.enableRotate)return;!function(e){n.enableZoom&&K(e),n.enableRotate&&X(e)}(e),n.update();break;default:l=s.NONE}}(e):function(e){if(!1===n.enabled)return;switch(l){case s.ROTATE:if(!1===n.enableRotate)return;!function(e){b.set(e.clientX,e.clientY),_.subVectors(b,x).multiplyScalar(n.rotateSpeed);const t=n.domElement;t&&(L(2*Math.PI*_.x/t.clientHeight),I(2*Math.PI*_.y/t.clientHeight)),x.copy(b),n.update()}(e);break;case s.DOLLY:if(!1===n.enableZoom)return;!function(e){T.set(e.clientX,e.clientY),k.subVectors(T,M),k.y>0?j(O()):k.y<0&&U(O()),M.copy(T),n.update()}(e);break;case s.PAN:if(!1===n.enablePan)return;!function(e){A.set(e.clientX,e.clientY),S.subVectors(A,w).multiplyScalar(n.panSpeed),F(S.x,S.y),w.copy(A),n.update()}(e)}}(e))}function ee(e){var t,r,i;!function(e){delete P[e.pointerId];for(let t=0;t0&&j(O()),n.update()}(e),n.dispatchEvent(o))}function ne(e){!1!==n.enabled&&!1!==n.enablePan&&function(e){let t=!1;switch(e.code){case n.keys.UP:F(0,n.keyPanSpeed),t=!0;break;case n.keys.BOTTOM:F(0,-n.keyPanSpeed),t=!0;break;case n.keys.LEFT:F(n.keyPanSpeed,0),t=!0;break;case n.keys.RIGHT:F(-n.keyPanSpeed,0),t=!0}t&&(e.preventDefault(),n.update())}(e)}function re(e){!1!==n.enabled&&e.preventDefault()}function ie(e){let t=P[e.pointerId];void 0===t&&(t=new r.Vector2,P[e.pointerId]=t),t.set(e.pageX,e.pageY)}function ae(e){const t=e.pointerId===R[0].pointerId?R[1]:R[0];return P[t.pointerId]}this.dollyIn=function(){U(arguments.length>0&&void 0!==arguments[0]?arguments[0]:O()),n.update()},this.dollyOut=function(){j(arguments.length>0&&void 0!==arguments[0]?arguments[0]:O()),n.update()},this.getScale=()=>v,this.setScale=e=>{B(e),n.update()},this.getZoomScale=()=>O(),void 0!==t&&this.connect(t),this.update()}}const m=a.forwardRef(((e,t)=>{let{makeDefault:n,camera:r,regress:i,domElement:l,enableDamping:c=!0,keyEvents:u=!1,onChange:d,onStart:h,onEnd:f,...m}=e;const g=(0,o.D)((e=>e.invalidate)),v=(0,o.D)((e=>e.camera)),y=(0,o.D)((e=>e.gl)),x=(0,o.D)((e=>e.events)),b=(0,o.D)((e=>e.setEvents)),_=(0,o.D)((e=>e.set)),w=(0,o.D)((e=>e.get)),A=(0,o.D)((e=>e.performance)),S=r||v,M=l||x.connected||y.domElement,T=a.useMemo((()=>new p(S)),[S]);return(0,o.F)((()=>{T.enabled&&T.update()}),-1),a.useEffect((()=>(u&&T.connect(!0===u?M:u),T.connect(M),()=>{T.dispose()})),[u,M,i,T,g]),a.useEffect((()=>{const e=e=>{g(),i&&A.regress(),d&&d(e)},t=e=>{h&&h(e)},n=e=>{f&&f(e)};return T.addEventListener("change",e),T.addEventListener("start",t),T.addEventListener("end",n),()=>{T.removeEventListener("start",t),T.removeEventListener("end",n),T.removeEventListener("change",e)}}),[d,h,f,T,g,b]),a.useEffect((()=>{if(n){const e=w().controls;return _({controls:T}),()=>_({controls:e})}}),[n,T]),a.createElement("primitive",(0,s.A)({ref:t,object:T,enableDamping:c},m))}));var g=n(44414);const v=function(e){let{cameraLock:t}=e;const{camera:n,scene:r,gl:i}=(0,o.D)();return a.useEffect((()=>{n.position.set(-200,0,0),n.lookAt(0,0,0)}),[]),t?null:(0,g.jsx)(m,{makeDefault:!0,camera:n,domElement:i.domElement,minDistance:20,maxDistance:500,rotateSpeed:2,zoomSpeed:1,panSpeed:.5})};const y=function(e){let{length:t,origin:n}=e;const i=new r.Vector3(-1,0,0),a=new r.Vector3(0,0,1),o=new r.Vector3(0,1,0),s=new r.Vector3(n[0],n[1],n[2]);return[(0,g.jsx)("arrowHelper",{args:[i,s,t,"#FF0000"]},"xdir"),(0,g.jsx)("arrowHelper",{args:[a,s,t,"#00FF00"]},"ydir"),(0,g.jsx)("arrowHelper",{args:[o,s,t,"#0000FF"]},"zdir")]};const x=function(e){let{x:t,y:n,z:i,color:a,intensity:o}=e;const s=new r.OrthographicCamera(-1,1,1,-1,1,4);return(0,g.jsx)("directionalLight",{args:[a,o],position:[t,n,i],castShadow:!0,shadow:{bias:-.002,camera:s}})};var b=n(20572);const _=async(e,t,n)=>{const r=[];if("STL"==t.DataType){const i=await b.x.query("/api/downloadData",{ParticipantId:e,CacheType:"queryImageModel",DataId:t.Id,FileType:t.DataType},{},null,"arraybuffer"),a=R(i.data);r.push({id:t.Id,filename:t.Name,type:t.DataType,downloaded:!0,data:a,opacity:1,color:n||a.color,matrix:P(),show:!0})}else{if("Electrodes"==t.DataType){const r=await b.x.query("/api/queryImageSourceFiles",{RequestType:"GetPagination",ParticipantId:e,SourceId:t.Id,ElectrodeName:t.Name}),i=r.data[0].TargetPoint||[0,0,0],a=r.data[0].EntryPoint||[0,0,50],o={id:t.Id,filename:t.Name,type:t.DataType,downloaded:!0,subname:[],data:[],color:n,opacity:1,targetPt:i,entryPt:a,matrix:O(i,a),show:!0};for(let t of r.data){const n=await b.x.query("/api/downloadData",{ParticipantId:e,CacheType:"queryImageModel",DataId:t.SourceId,RecordingId:t.RecordingId},{},null,"arraybuffer"),r=R(n.data);o.subname.push(t.Name),o.data.push(r)}return[o]}if("TemplateElectrodes"==t.DataType){const r=await b.x.query("/api/queryImageSourceFiles",{RequestType:"GetPagination",ParticipantId:e,SourceId:t.Id,ElectrodeName:t.Name}),i=r.data[0].TargetPoint||[0,0,0],a=r.data[0].EntryPoint||[0,0,50],o={id:r.data[0].SourceId,filename:t.Name,type:"Electrodes",downloaded:!0,subname:[],data:[],color:n,opacity:1,targetPt:i,entryPt:a,matrix:O(i,a),show:!0};for(let t of r.data){const n=await b.x.query("/api/downloadData",{ParticipantId:e,CacheType:"queryImageModel",DataId:t.SourceId,RecordingId:t.RecordingId},{},null,"arraybuffer"),r=R(n.data);o.subname.push(t.Name),o.data.push(r)}return[o]}if("Blender Scene"==t.DataType)r.push({id:t.Id,filename:t.Name,type:t.DataType,downloaded:!1,data:b.x.getDownloadLink("/api/downloadData",{ParticipantId:e,CacheType:"queryImageModel",RecordingId:t.Id}),show:!0});else{if("volume"==t.type){return(await b.x.query("/api/queryImageModel",{Directory:e,FileName:t.file,FileMode:t.mode,FileType:t.type},{},null,"arraybuffer")).data}if("tracts"==t.type){const i=await b.x.query("/api/queryImageModel",{Directory:e,FileName:t.file,FileMode:t.mode,FileType:t.type});r.push({filename:t.file,type:t.type,downloaded:!0,data:i.data.points,thickness:1,color:n||"#FFFFFF",matrix:P(),show:!0})}else if("points"==t.type){const i=await b.x.query("/api/queryImageModel",{Directory:e,FileName:t.file,FileMode:t.mode,FileType:t.type});r.push({filename:t.file,type:t.type,downloaded:!0,data:i.data.points,thickness:1,color:n||"#FFFFFF",matrix:P(),show:!0})}else"sphere"==t.type&&r.push({filename:t.file,type:t.type,downloaded:!0,data:t.targetPoints,color:n||"#FFFFFF",matrix:P(),show:!0})}}return r};const w=function(e){let{geometry:t,material:n,matrix:i}=e;return(0,g.jsxs)("mesh",{castShadow:!0,matrixAutoUpdate:!1,matrix:i,children:[(0,g.jsx)("bufferGeometry",{attach:"geometry",attributes:{position:t.position,normal:t.normal}}),(0,g.jsx)("meshPhongMaterial",{transparent:!0,side:r.DoubleSide,opacity:n.opacity,color:n.color,specular:n.specular,shininess:n.shininess})]})};const A=function(e){let{pointArray:t,color:n,linewidth:i,matrix:a}=e;const o=[];for(var s of t)o.push(s[0],s[1],s[2]||0);return(0,g.jsxs)("line",{matrixAutoUpdate:!1,matrix:a,children:[(0,g.jsx)("bufferGeometry",{attributes:{position:new r.Float32BufferAttribute(o,3)}}),(0,g.jsx)("lineBasicMaterial",{color:n,linewidth:i})]})};function S(e,t,n){{const n=Math.floor((e-t[0])/(t[1]-t[0])*255);return[n,n,n,255]}}function M(e,t,n,i){const a=t*n,o=new Uint8Array(4*a);for(let r=0;r{const e=function(e,t,n,r){switch(r){case"x":{const r=new Array(t[1]*t[2]);for(var i=0;i{if(!y)return;const e=e=>{const r=T(d,u),a=i.xbf(i.UPj([u.position.x,u.position.y,u.position.z]));if("x"==n){const e=Math.floor(f+(r.x-b.x)*a);e<0&&(e=0),e>=t.dimensions[c]&&(e=t.dimensions[c]-1),p(e)}else if("y"==n){const e=Math.floor(f+(r.z-b.z)*a);e<0&&(e=0),e>=t.dimensions[c]&&(e=t.dimensions[c]-1),p(e)}else if("z"==n){const e=Math.floor(f+(r.y-b.y)*a);e<0&&(e=0),e>=t.dimensions[c]&&(e=t.dimensions[c]-1),p(e)}};return window.addEventListener("mousemove",e),window.addEventListener("mouseup",A),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",A)}}),[y]),!m)return null;if("z"==n){const e=new r.Matrix4;e.makeTranslation(-t.xRange._data[Math.floor(t.dimensions[0]/2)],-t.yRange._data[Math.floor(t.dimensions[1]/2)],-t.zRange._data[t.dimensions[2]-1]);const n=M(m,t.dimensions[0],t.dimensions[1],[t.windowLow,t.windowHigh]);n.minFilter=r.LinearFilter,n.wrapS=n.wrapT=r.ClampToEdgeWrapping,n.needsUpdate=!0;const i=(new r.Matrix4).makeTranslation(0,0,t.zRange._data[f]),a=(new r.Matrix4).makeRotationZ(Math.PI).premultiply(e).premultiply(s).multiply(i);return(0,g.jsxs)("mesh",{matrixAutoUpdate:!1,matrix:a,onPointerDown:w,onPointerUp:A,children:[(0,g.jsx)("planeGeometry",{args:[t.dimensions[0],t.dimensions[1]]}),(0,g.jsx)("meshBasicMaterial",{map:n,side:r.DoubleSide,transparent:!0})]})}if("y"==n){const e=new r.Matrix4;e.makeTranslation(-t.xRange._data[Math.floor(t.dimensions[0]/2)],0,-t.zRange._data[Math.floor(t.dimensions[2]/2)]);const n=M(m,t.dimensions[0],t.dimensions[2],[t.windowLow,t.windowHigh]);n.minFilter=r.LinearFilter,n.wrapS=n.wrapT=r.ClampToEdgeWrapping,n.needsUpdate=!0;const i=(new r.Matrix4).makeTranslation(0,0,t.yRange._data[f]),a=(new r.Matrix4).makeRotationX(Math.PI/2).premultiply(e).premultiply(s).multiply(i);return(0,g.jsxs)("mesh",{matrixAutoUpdate:!1,matrix:a,onPointerDown:w,onPointerUp:A,children:[(0,g.jsx)("planeGeometry",{args:[t.dimensions[0],t.dimensions[2]]}),(0,g.jsx)("meshBasicMaterial",{map:n,side:r.DoubleSide,transparent:!0})]})}if("x"==n){const e=new r.Matrix4;e.makeTranslation(0,-t.yRange._data[Math.floor(t.dimensions[1]/2)],-t.zRange._data[Math.floor(t.dimensions[2]/2)]);const n=M(m,t.dimensions[1],t.dimensions[2],[t.windowLow,t.windowHigh]);n.minFilter=r.LinearFilter,n.wrapS=n.wrapT=r.ClampToEdgeWrapping,n.needsUpdate=!0;const i=(new r.Matrix4).makeTranslation(0,0,t.xRange._data[f]),a=(new r.Matrix4).makeRotationY(-Math.PI/2).multiply((new r.Matrix4).makeRotationZ(-Math.PI/2)).premultiply(e).premultiply(s).multiply(i);return(0,g.jsxs)("mesh",{matrixAutoUpdate:!1,matrix:a,onPointerDown:w,onPointerUp:A,children:[(0,g.jsx)("planeGeometry",{args:[t.dimensions[1],t.dimensions[2]]}),(0,g.jsx)("meshBasicMaterial",{map:n,side:r.DoubleSide,transparent:!0})]})}}const E=function(e){let{data:t,matrix:n,cameraLock:a}=e;const o=new r.Matrix4;o.set(-1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);const s=i.mgz(i.WCD(i.UPj(t.matrix.toArray()).reshape([4,4]))),l=(new r.Matrix4).set(...s.reshape([16])._data),c=new r.BoxGeometry(t.xRange._data.length,t.yRange._data.length,t.zRange._data.length),u=new r.MeshBasicMaterial({color:65280}),d=new r.Mesh(c,u);return(0,g.jsxs)("group",{matrixAutoUpdate:!1,matrix:o,children:[(0,g.jsx)("boxHelper",{args:[d,16776960]}),(0,g.jsx)(k,{data:t,sliceIndex:50,axis:"z",matrix:l,cameraLock:a}),(0,g.jsx)(k,{data:t,sliceIndex:255,axis:"y",matrix:l,cameraLock:a}),(0,g.jsx)(k,{data:t,sliceIndex:255,axis:"x",matrix:l,cameraLock:a})]})};const C=function(e){let{pointArray:t,color:n,size:r,matrix:i}=e;return(0,g.jsxs)("mesh",{position:[Math.abs(t[0]),-t[1],t[2]],matrixAutoUpdate:!0,matrix:i,children:[(0,g.jsx)("sphereGeometry",{args:[r,32,32]}),(0,g.jsx)("meshStandardMaterial",{color:n})]})};function D(e,t,n,r){var i=[e.toString(16),t.toString(16),n.toString(16)];return i.forEach((function(e,t){1===e.length&&(i[t]="0"+e)})),"#"+i.join("")}const R=e=>{const t=new DataView(e),n=t.getUint32(80,!0);let i,a,o,s,l=!1;var c="#FFFFFF",u="LPS";for(let r=0;r<70;r++)1129270351==t.getUint32(r,!1)&&82==t.getUint8(r+4)&&61==t.getUint8(r+5)&&(c=D(t.getUint8(r+6),t.getUint8(r+7),t.getUint8(r+8)),i=t.getUint8(r+6)/255,a=t.getUint8(r+7)/255,o=t.getUint8(r+8)/255,s=t.getUint8(r+9)/255),1397768515==t.getUint32(r,!1)&&69==t.getUint8(r+4)&&61==t.getUint8(r+5)&&(76==t.getUint8(r+6)&&80==t.getUint8(r+7)&&83==t.getUint8(r+8)?u="LPS":82==t.getUint8(r+6)&&65==t.getUint8(r+7)&&83==t.getUint8(r+8)?u="RAS":console.log("Unaccounted Space Type"));const d=new Float32Array(3*n*3),h=new Float32Array(3*n*3);for(let r=0;r{const e=new r.Matrix4;return e.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),e},O=(e,t)=>{const n=i.UPj([[0,0,0,1],[0,1,0,1],[0,0,1,1],[1,0,0,1]]),a=i.UPj(i.KQr(e,[-1,-1,1])),o=i.UPj(i.KQr(t,[-1,-1,1])),s=i.ReH(o,a),l=i.Qrk(s,i.xbf(s)),c=i.Qrk(i.ReH(i.WQq(a,5),a),i.xbf(i.ReH(i.WQq(a,5),a))),u=i.Qrk(i.ReH(0,i.$An(l,c)),i.xbf(i.ReH(0,i.$An(l,c)))),d=i.Qrk(i.ReH(0,i.$An(u,l)),i.xbf(i.ReH(0,i.$An(u,l)))),h=i.UPj([a,i.WQq(l,a),i.WQq(d,a),i.WQq(u,a)]),f=i.XRe(h,[4,4],1),p=i.mgz(i.lwT(i.WCD(n),f)),m=new r.Matrix4;return m.set(...p.reshape([16])._data),m}},99867:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(9950),i=n(13564),a=n(49989),o=n(7774),s=n(44414);const l=function(e){let{children:t}=e;const[n,l]=(0,o.mv)(),{miniSidenav:c,hideSidenav:u}=n,{pathname:d}=(0,i.zy)();return(0,r.useEffect)((()=>{(0,o.NX)(l,"layout","dashboard"),document.body.style.overflow=null}),[d]),(0,s.jsx)(a.A,{sx:e=>{let{breakpoints:t,transitions:n,functions:{pxToRem:r}}=e;return{p:3,position:"relative",minHeight:"calc(100vh - 80px)",[t.up("xl")]:{marginLeft:r(c?120:274),transition:n.create(["margin-left","margin-right"],{easing:n.easing.easeInOut,duration:n.duration.standard})}}},children:t})}},88745:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(9950),i=n(13564),a=n(99867),o=n(64326),s=n(37957),l=(n(53758),n(20572),n(7774)),c=(n(50160),n(44414));function u(e){let{children:t}=e;const[n,u]=(0,l.mv)(),{language:d,authExpired:h}=n,{pathname:f}=((0,i.Zp)(),(0,i.zy)()),[p,m]=(0,r.useState)(null);return(0,r.useEffect)((()=>{}),[f,h]),(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)(a.A,{children:[p,(0,c.jsx)(o.A,{fixedNavbar:!0}),t]}),(0,c.jsx)(s.A,{})]})}},87524:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(9950),i=n(13564),a=n(49989),o=n(7774),s=n(44414);function l(e){let{background:t,sx:n,children:l}=e;const[,c]=(0,o.mv)(),{pathname:u}=(0,i.zy)();return(0,r.useEffect)((()=>{(0,o.NX)(c,"layout","page")}),[u]),(0,s.jsx)(a.A,{width:"100vw",height:"100%",minHeight:"100vh",bgColor:t,sx:n||{overflowY:"hidden"},children:l})}l.defaultProps={background:"default"};const c=l},53418:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(9950),i=n(13564),a=n(99867),o=n(87524),s=(n(64326),n(37957)),l=(n(53758),n(20572),n(7774)),c=(n(50160),n(44414));function u(e){let{viewOnly:t,children:n}=e;const[u,d]=(0,l.mv)(),{language:h,sessionState:f}=u,{pathname:p}=((0,i.Zp)(),(0,i.zy)()),[m,g]=(0,r.useState)(null);return(0,r.useEffect)((()=>{}),[p,f]),t?(0,c.jsx)(c.Fragment,{children:(0,c.jsxs)(o.A,{sx:{padding:5},children:[m,n]})}):(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)(a.A,{children:[m,n]}),(0,c.jsx)(s.A,{})]})}},26093:(e,t,n)=>{"use strict";n.d(t,{A:()=>K});var r=n(9950),i=n(11942),a=n.n(i),o=n(41413);const s=(0,n(59254).Ay)(o.A)((e=>{let{theme:t,ownerState:n}=e;const{palette:r,functions:i,typography:a,boxShadows:o}=t,{shadow:s,bgColor:l,size:c}=n,{gradients:u,transparent:d,white:h}=r,{pxToRem:f,linearGradient:p}=i,{size:m,fontWeightRegular:g}=a,v="transparent"===l?d.main:p(u[l].main,u[l].state);let y;switch(c){case"xs":y={width:f(24),height:f(24),fontSize:m.xs};break;case"sm":y={width:f(36),height:f(36),fontSize:m.sm};break;case"lg":y={width:f(58),height:f(58),fontSize:m.sm};break;case"xl":y={width:f(74),height:f(74),fontSize:m.md};break;case"xxl":y={width:f(110),height:f(110),fontSize:m.md};break;default:y={width:f(48),height:f(48),fontSize:m.md}}return{background:v,color:h.main,fontWeight:g,boxShadow:o[s],...y}}));var l=n(44414);const c=(0,r.forwardRef)(((e,t)=>{let{bgColor:n,size:r,shadow:i,...a}=e;return(0,l.jsx)(s,{ref:t,ownerState:{shadow:i,bgColor:n,size:r},...a})}));c.defaultProps={bgColor:"transparent",size:"md",shadow:"none"},c.propTypes={bgColor:a().oneOf(["transparent","primary","secondary","info","success","warning","error","light","dark"]),size:a().oneOf(["xs","sm","md","lg","xl","xxl"]),shadow:a().oneOf(["none","xs","sm","md","lg","xl","xxl","inset"])};var u=n(50327),d=n(35192);function h(e){return(0,d.k5)({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M0 13a1.5 1.5 0 0 0 1.5 1.5h13A1.5 1.5 0 0 0 16 13V6a1.5 1.5 0 0 0-1.5-1.5h-13A1.5 1.5 0 0 0 0 6zM2 3a.5.5 0 0 0 .5.5h11a.5.5 0 0 0 0-1h-11A.5.5 0 0 0 2 3m2-2a.5.5 0 0 0 .5.5h7a.5.5 0 0 0 0-1h-7A.5.5 0 0 0 4 1"},child:[]}]})(e)}function f(e){return(0,d.k5)({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"rect",attr:{width:"240",height:"240",x:"136",y:"136",rx:"56",ry:"56"},child:[]},{tag:"path",attr:{d:"M336 96V32a16 16 0 0 0-16-16H192a16 16 0 0 0-16 16v64a80.09 80.09 0 0 0-80 80v160a80.09 80.09 0 0 0 80 80v64a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-64a80.09 80.09 0 0 0 80-80V176a80.09 80.09 0 0 0-80-80zm56 224a72.08 72.08 0 0 1-72 72H192a72.08 72.08 0 0 1-72-72V192a72.08 72.08 0 0 1 72-72h128a72.08 72.08 0 0 1 72 72z"},child:[]}]})(e)}var p=n(35277);function m(e){return(0,d.k5)({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M225.24,174.74a12,12,0,0,1-1.58,16.89C205.49,206.71,189.06,212,174.15,212c-19.76,0-36.86-9.29-51.88-17.44-25.06-13.62-44.86-24.37-74.61.3a12,12,0,1,1-15.32-18.48c42.25-35,75-17.23,101.39-2.92,25.06,13.61,44.86,24.37,74.61-.3A12,12,0,0,1,225.24,174.74Zm-16.9-57.59c-29.75,24.67-49.55,13.91-74.61.3-26.35-14.3-59.14-32.11-101.39,2.92a12,12,0,0,0,15.32,18.48c29.75-24.67,49.55-13.92,74.61-.3,15,8.15,32.12,17.44,51.88,17.44,14.91,0,31.34-5.29,49.51-20.36a12,12,0,0,0-15.32-18.48ZM47.66,82.84c29.75-24.67,49.55-13.92,74.61-.3,15,8.15,32.12,17.44,51.88,17.44,14.91,0,31.34-5.29,49.51-20.36a12,12,0,0,0-15.32-18.48c-29.75,24.67-49.55,13.92-74.61.3-26.35-14.3-59.14-32.11-101.39,2.93A12,12,0,1,0,47.66,82.84Z"},child:[]}]})(e)}function g(e){return(0,d.k5)({tag:"svg",attr:{version:"1",viewBox:"0 0 48 48",enableBackground:"new 0 0 48 48"},child:[{tag:"path",attr:{fill:"#455A64",d:"M36,4H26c0,1.1-0.9,2-2,2s-2-0.9-2-2H12C9.8,4,8,5.8,8,8v32c0,2.2,1.8,4,4,4h24c2.2,0,4-1.8,4-4V8 C40,5.8,38.2,4,36,4z"},child:[]},{tag:"path",attr:{fill:"#fff",d:"M36,41H12c-0.6,0-1-0.4-1-1V8c0-0.6,0.4-1,1-1h24c0.6,0,1,0.4,1,1v32C37,40.6,36.6,41,36,41z"},child:[]},{tag:"g",attr:{fill:"#90A4AE"},child:[{tag:"path",attr:{d:"M26,4c0,1.1-0.9,2-2,2s-2-0.9-2-2h-7v4c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V4H26z"},child:[]},{tag:"path",attr:{d:"M24,0c-2.2,0-4,1.8-4,4s1.8,4,4,4s4-1.8,4-4S26.2,0,24,0z M24,6c-1.1,0-2-0.9-2-2s0.9-2,2-2s2,0.9,2,2 S25.1,6,24,6z"},child:[]}]},{tag:"g",attr:{fill:"#CFD8DC"},child:[{tag:"rect",attr:{x:"21",y:"20",width:"12",height:"2"},child:[]},{tag:"rect",attr:{x:"15",y:"19",width:"4",height:"4"},child:[]}]},{tag:"g",attr:{fill:"#03A9F4"},child:[{tag:"rect",attr:{x:"21",y:"29",width:"12",height:"2"},child:[]},{tag:"rect",attr:{x:"15",y:"28",width:"4",height:"4"},child:[]}]}]})(e)}var v=n(86255),y=n(39484),x=n(25513),b=n(79084),_=n(82570),w=n(42201);const A=(0,n(65471).A)((0,l.jsx)("path",{d:"m16 5-1.42 1.42-1.59-1.59V16h-1.98V4.83L9.42 6.42 8 5l4-4 4 4zm4 5v11c0 1.1-.9 2-2 2H6c-1.11 0-2-.9-2-2V10c0-1.11.89-2 2-2h3v2H6v11h12V10h-3V8h3c1.1 0 2 .89 2 2z"}),"IosShare");n(14415);const S=(0,r.lazy)((()=>Promise.all([n.e(311),n.e(490)]).then(n.bind(n,92813)))),M=(0,r.lazy)((()=>n.e(170).then(n.bind(n,30170)))),T=(0,r.lazy)((()=>Promise.all([n.e(960),n.e(844)]).then(n.bind(n,4844)))),k=(0,r.lazy)((()=>Promise.all([n.e(36),n.e(311),n.e(602),n.e(536),n.e(940),n.e(967)]).then(n.bind(n,17967)))),E=(0,r.lazy)((()=>Promise.all([n.e(36),n.e(311),n.e(602),n.e(875),n.e(940),n.e(740)]).then(n.bind(n,95740)))),C=(0,r.lazy)((()=>Promise.all([n.e(960),n.e(61),n.e(787)]).then(n.bind(n,38787)))),D=(0,r.lazy)((()=>n.e(698).then(n.bind(n,57698)))),R=(0,r.lazy)((()=>Promise.resolve().then(n.bind(n,35597)))),P=(0,r.lazy)((()=>Promise.resolve().then(n.bind(n,72662)))),O=(0,r.lazy)((()=>Promise.all([n.e(36),n.e(500)]).then(n.bind(n,91500)))),L=(0,r.lazy)((()=>Promise.all([n.e(755),n.e(22)]).then(n.bind(n,23022)))),I=(0,r.lazy)((()=>n.e(475).then(n.bind(n,78475)))),z=(0,r.lazy)((()=>n.e(349).then(n.bind(n,37349)))),N=(0,r.lazy)((()=>Promise.all([n.e(36),n.e(960),n.e(98)]).then(n.bind(n,18098)))),F=(0,r.lazy)((()=>n.e(434).then(n.bind(n,43053)))),B=(0,r.lazy)((()=>Promise.all([n.e(755),n.e(415)]).then(n.bind(n,34415)))),j=(0,r.lazy)((()=>Promise.all([n.e(536),n.e(978)]).then(n.bind(n,10978)))),U=(0,r.lazy)((()=>Promise.all([n.e(755),n.e(53)]).then(n.bind(n,12053)))),V=(0,r.lazy)((()=>n.e(947).then(n.bind(n,50947)))),H=(0,r.lazy)((()=>Promise.all([n.e(755),n.e(282),n.e(831)]).then(n.bind(n,32831)))),W=(0,r.lazy)((()=>Promise.all([n.e(755),n.e(36),n.e(534)]).then(n.bind(n,74534)))),G=(0,r.lazy)((()=>Promise.all([n.e(755),n.e(36),n.e(749)]).then(n.bind(n,64749)))),q=(0,r.lazy)((()=>n.e(584).then(n.bind(n,7584)))),Y=(0,r.lazy)((()=>n.e(618).then(n.bind(n,60618)))),$=(0,r.lazy)((()=>n.e(312).then(n.bind(n,23312)))),X=(0,r.lazy)((()=>n.e(324).then(n.bind(n,49324)))),Z=(0,r.lazy)((()=>n.e(302).then(n.bind(n,42302)))),K={Main:{children:[{type:"collapse",name:"Dashboard",key:"dashboard",component:(0,l.jsx)(S,{}),route:"/dashboard",icon:(0,l.jsx)(v.A,{}),noCollapse:!0},{type:"collapse",name:"UploadRawData",key:"upload-data",component:(0,l.jsx)(k,{}),route:"/upload-data",icon:(0,l.jsx)(A,{}),noCollapse:!0},{type:"collapse",name:"StudyManagement",key:"study-management",component:(0,l.jsx)(T,{}),route:"/study-management",icon:(0,l.jsx)(h,{}),noCollapse:!0},{type:"collapse",name:"Survey and Questionnaire",key:"SurveyList",component:(0,l.jsx)(D,{}),route:"/form-manager",icon:(0,l.jsx)(p.kkc,{}),noCollapse:!0},{type:"collapse",name:"Forms Editor",key:"SurveyEditor",component:(0,l.jsx)(R,{}),route:"/form-manager/:form_link",icon:(0,l.jsx)(p.kkc,{}),noCollapse:!0,hide:!0},{type:"collapse",name:"Forms Viewer",key:"SurveyViewer",component:(0,l.jsx)(P,{}),route:"/survey/:form_link",icon:(0,l.jsx)(p.kkc,{}),noCollapse:!0,hide:!0},{type:"collapse",name:"AsyncJobScheduleTable",key:"async-job-management",component:(0,l.jsx)(M,{}),route:"/async-job-management",icon:(0,l.jsx)(p.x3e,{}),noCollapse:!0}]},SurveyTabs:{children:[{type:"collapse",name:"Survey and Questionnaire",key:"SurveyList",component:(0,l.jsx)(D,{}),route:"/form-manager",icon:(0,l.jsx)(p.kkc,{}),noCollapse:!0},{type:"collapse",name:"Forms Editor",key:"SurveyEditor",component:(0,l.jsx)(R,{}),route:"/form-manager/:form_link",icon:(0,l.jsx)(p.kkc,{}),noCollapse:!0,hide:!0},{type:"collapse",name:"Forms Viewer",key:"SurveyViewer",component:(0,l.jsx)(P,{}),route:"/survey/:form_link",icon:(0,l.jsx)(p.kkc,{}),noCollapse:!0,hide:!0}]},StudyGroupAnalysis:{icon:(0,l.jsx)(x.A,{}),name:"Group Analysis",children:[{key:"ElectrodeIdentifier",name:"Monopolar vs Bipolar Survey",icon:(0,l.jsx)(w.A,{}),route:"/group-analysis/monopolar-bipolar-survey",component:(0,l.jsx)($,{})},{key:"SpectralAnalysisExaminationStreaming",name:"Stimulation-induced FTG",icon:(0,l.jsx)(w.A,{}),route:"/group-analysis/stimulation-induced-FTG",component:(0,l.jsx)(X,{})},{key:"SpectralAnalysisExaminationStreaming",name:"Baseline FTG",icon:(0,l.jsx)(w.A,{}),route:"/group-analysis/baseline-FTG",component:(0,l.jsx)(Z,{})},{key:"SurveyPeakIdentifier",name:"Annotating Peaks from PSD",icon:(0,l.jsx)(w.A,{}),route:"/group-analysis/annotating-peaks-from-PSD",component:(0,l.jsx)(Y,{})}]},GeneralReports:{icon:(0,l.jsx)(x.A,{}),name:"Brain Data",children:[{type:"collapse",name:"ParticipantOverview",key:"participant-overview",component:(0,l.jsx)(E,{}),route:"/participant-overview/:participant_uid",icon:(0,l.jsx)(_.A,{}),noCollapse:!1,hide:!0},{key:"therapyHistory",name:"Therapy History",icon:(0,l.jsx)(y.A,{}),route:"/reports/therapy-history/:participant_uid",component:(0,l.jsx)(j,{})},{key:"nerual-activity-snapshot",name:"Neural Activity Snapshot",icon:(0,l.jsx)(m,{}),route:"/reports/nerual-activity-snapshot/:participant_uid",component:(0,l.jsx)(U,{})},{key:"time-series-analysis",name:"Time-Series Analysis",icon:(0,l.jsx)(p.Ld5,{}),route:"/reports/time-series-analysis/:participant_uid",component:(0,l.jsx)(H,{})},{key:"chronic-neural-activity",name:"Chronic Neural Activity",icon:(0,l.jsx)(b.A,{}),route:"/reports/chronic-neural-activity/:participant_uid",component:(0,l.jsx)(W,{})},{key:"chronic-timeline",name:"Generic Timeline Report",icon:(0,l.jsx)(b.A,{}),route:"/reports/chronic-timeline/:participant_uid",component:(0,l.jsx)(G,{})},{key:"events",name:"Chronic Events",icon:(0,l.jsx)(u.Dtf,{}),route:"/reports/events/:participant_uid",component:(0,l.jsx)(V,{})}]},SurveyReports:{icon:(0,l.jsx)(g,{}),name:"Surveys and Questionnaires",children:[{type:"collapse",name:"ParticipantOverview",key:"participant-overview",component:(0,l.jsx)(E,{}),route:"/participant-overview/:participant_uid",icon:(0,l.jsx)(_.A,{}),noCollapse:!0,hide:!0},{key:"FormRecords",name:"Form Records",icon:(0,l.jsx)(p.kkc,{}),route:"/form-records/:participant_uid",component:(0,l.jsx)(O,{})}]},ExternalSensorReports:{icon:(0,l.jsx)(f,{}),name:"External Sensors",children:[{type:"collapse",name:"ParticipantOverview",key:"participant-overview",component:(0,l.jsx)(E,{}),route:"/participant-overview/:participant_uid",icon:(0,l.jsx)(_.A,{}),noCollapse:!0,hide:!0},{key:"FitbitDashboard",name:"Fitbit Dashboard",icon:(0,l.jsx)(u.W78,{}),route:"/fitbit/dashboard/:participant_uid",component:(0,l.jsx)(I,{})},{key:"OuraRingDashboard",name:"Oura Ring Dashboard",icon:(0,l.jsx)(p.eRw,{}),route:"/oura-ring/dashboard/:participant_uid",component:(0,l.jsx)(z,{})},{key:"EmpaticaDataExplorer",name:"Empatica Data Explorer",icon:(0,l.jsx)("img",{src:"https://www.empatica.com/website/assets/images/embraceplus/embraceplus_closed_side_hero-sm-xhdpi.png",width:"30pt",alt:"Empatica"}),route:"/empatica/data-explorer/:participant_uid",component:(0,l.jsx)(L,{})}]},ImagingReports:{icon:(0,l.jsx)(p.KuA,{}),name:"Imaging Reports",children:[{type:"collapse",name:"ParticipantOverview",key:"participant-overview",component:(0,l.jsx)(E,{}),route:"/participant-overview/:participant_uid",icon:(0,l.jsx)(_.A,{}),noCollapse:!0,hide:!0},{key:"3dImageViewer",name:"3D Image Viewer",icon:(0,l.jsx)(p.KuA,{}),route:"/image-visualization/:participant_uid",component:(0,l.jsx)(C,{})}]},CustomizedAnalysis:{icon:(0,l.jsx)(u.gRI,{}),name:"Customized Analysis",children:[{type:"collapse",name:"ParticipantOverview",key:"participant-overview",component:(0,l.jsx)(E,{}),route:"/participant-overview/:participant_uid",icon:(0,l.jsx)(_.A,{}),noCollapse:!0,hide:!0},{key:"AnalysisBuilder",name:"Analysis Builder",icon:(0,l.jsx)(u.gRI,{}),route:"/analysis-builder/:participant_uid",component:(0,l.jsx)(N,{})},{key:"AIHealthcare",name:"AI Healthcare",icon:(0,l.jsx)(u.gRI,{}),route:"/ai-healthcare/:participant_uid",component:(0,l.jsx)(F,{})},{key:"InClinicMedicationCycle",name:"In-clinic Medication Cycle",icon:(0,l.jsx)(u.gRI,{}),route:"/medication-cycle/:participant_uid",component:(0,l.jsx)(B,{})}]},DataManager:{icon:(0,l.jsx)(u.rrw,{}),name:"Data Manager",children:[{type:"collapse",name:"ParticipantOverview",key:"participant-overview",component:(0,l.jsx)(E,{}),route:"/participant-overview/:participant_uid",icon:(0,l.jsx)(_.A,{}),noCollapse:!0,hide:!0},{key:"ExistingSourceFiles",name:"Existing Source Files",icon:(0,l.jsx)(u.Y9e,{}),route:"/source-files/:participant_uid",component:(0,l.jsx)(q,{})}]}}},55082:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>w});var r=n(49230),i=n(9950),a=n(13564),o=n(60899),s=n(48089),l=n(39545),c=n(49989),u=n(52498),d=n(52688),h=n(2588),f=n(94116),p=(n(29144),n(23922)),m=n(50160),g=n(7774),v=n(44414);const y=function(e){let{dataToRender:t,selectedDevice:n,height:r,figureTitle:a}=e;const[o,s]=(0,g.mv)(),{language:l}=o,[u,d]=i.useState(!1),h=new p.s(a,l);i.useEffect((()=>{t&&(e=>{if(h.clearData(),h.fresh){var t=h.subplots(2*e.length,1,{sharex:!0,sharey:!0});for(var n in h.setXlabel(`${(0,m.d)(m.z.FigureStandardText,"Time",l)} (${(0,m.d)(m.z.FigureStandardUnit,"Local",l)})`,{fontSize:15},t[t.length-1]),e){if(h.setYlabel(`${(0,m.d)(m.z.FigureStandardText,"Power",l)} (${(0,m.d)(m.z.FigureStandardUnit,"AU",l)})`,{fontSize:15},t[2*n]),h.setYlabel("Percent On Time (%)",{fontSize:15},t[2*n+1]),h.setYlim([0,100],t[2*n+1]),e[n].Hemisphere===e[n].CustomName){const[r,i]=e[n].Hemisphere.split(" "),a=`${(0,m.d)(m.z.FigureStandardText,r,l)} ${(0,m.d)(m.z.BrainRegions,i,l)}`;h.setSubtitle(`${a}`,t[2*n])}else h.setSubtitle(`${e[n].CustomName}`,t[2*n]);h.setSubtitle(`${(0,m.d)(m.z.FigureStandardText,"Stimulation",l)}`,t[2*n+1])}h.setLegend({tracegroupgap:5}),h.setLayoutProps({hovermode:"xy"})}for(n=0;nnew Date(1e3*e[n].Timestamp[r][i])));h.plot(a,e[n].Power[r],{linewidth:1,color:"#000000",hovertemplate:" %{x}
"+i+"
%{y:.2f} "},t[2*n]),e[n].DutyCycle[r].length>0&&h.plot(a,e[n].DutyCycle[r],{linewidth:.5,color:"#AA0000",hovertemplate:" %{x}
"+i+"
%{y:.2f}% "},t[2*n+1]),s.hasOwnProperty("LFPThresholds")&&(20==s.LFPThresholds[0]&&30==s.LFPThresholds[1]&&0==s.CaptureAmplitudes[0]&&0==s.CaptureAmplitudes[1]||(h.plot([a[0],a[a.length-1]],[s.LFPThresholds[0],s.LFPThresholds[0]],{linewidth:2,color:"#f50057",hovertemplate:""},t[2*n]),s.LFPThresholds[0]!=s.LFPThresholds[1]&&h.plot([a[0],a[a.length-1]],[s.LFPThresholds[1],s.LFPThresholds[1]],{linewidth:2,color:"#1100AA",hovertemplate:""},t[2*n])))}}e?(h.render(),d(!0)):(h.purge(),d(!1))})(t.filter((e=>e.Device==n)))}),[t,n,l]);const y=(0,i.useCallback)((()=>{h.refresh()}),[]),{ref:x}=(0,f.uZ)({onResize:y,refreshMode:"debounce",refreshRate:50,skipOnMount:!1});return(0,v.jsx)(c.A,{ref:x,id:a,style:{marginTop:5,marginBottom:10,height:r,width:"100%",display:u?"":"none"}})};var x=n(88745),b=n(20572);const _=function(){const e=(0,a.Zp)(),[t,n]=(0,g.mv)(),{patientID:r,language:f}=t,[p,_]=(0,i.useState)(!1),[w,A]=(0,i.useState)([]),[S,M]=(0,i.useState)({current:null,list:[]}),[T,k]=(0,i.useState)(null);return(0,i.useEffect)((()=>{r?(k((0,v.jsx)(h.A,{})),b.x.query("/api/queryAdaptiveStimulation",{id:r,requestData:!0,timezoneOffset:60*(new Date).getTimezoneOffset()}).then((e=>{e.data.ChronicData.length>0&&(_(e.data.ChronicData),M({current:e.data.ChronicData[0].Device,list:e.data.ChronicData.map((e=>e.Device)).filter(((e,t,n)=>n.indexOf(e)===t))})),k(null)})).catch((e=>{b.x.displayError(e,k)}))):e("/dashboard",{replace:!1})}),[r]),(0,i.useEffect)((()=>{}),[p]),(0,v.jsxs)(v.Fragment,{children:[T,(0,v.jsx)(x.A,{children:(0,v.jsx)(c.A,{pt:3,children:(0,v.jsx)(c.A,{children:(0,v.jsx)(o.Ay,{container:!0,spacing:2,children:(0,v.jsx)(o.Ay,{item:!0,xs:12,children:(0,v.jsx)(s.A,{sx:{width:"100%"},children:(0,v.jsxs)(o.Ay,{container:!0,children:[(0,v.jsx)(o.Ay,{item:!0,xs:12,children:(0,v.jsx)(c.A,{p:2,children:(0,v.jsx)(u.A,{variant:"h6",fontSize:24,children:m.z.AdaptiveStimulation.Figure.ChronicAdaptive[f]})})}),(0,v.jsx)(o.Ay,{item:!0,xs:12,children:(0,v.jsx)(c.A,{p:2,children:(0,v.jsx)(l.A,{value:S.current,options:S.list,onChange:(e,t)=>M({...S,current:t}),renderInput:e=>(0,v.jsx)(d.A,{...e,label:m.z.AdaptiveStimulation.Table.SelectDevice[f],InputLabelProps:{shrink:!0}})})})}),(0,v.jsx)(o.Ay,{item:!0,xs:12,lg:12,children:p?(0,v.jsx)(y,{dataToRender:p,selectedDevice:S.current,height:800,events:w,figureTitle:"AdaptivePowerTrend"}):null})]})})})})})})})]})},w={name:"AdaptiveStimulation",key:"adaptive",icon:(0,v.jsx)(r.A,{style:{color:"white",margin:0,padding:0}}),route:"/experimental/adaptive",component:(0,v.jsx)(_,{}),identified:!0,deidentified:!0}},44711:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>S});var r=n(65471),i=n(44414);const a=(0,r.A)((0,i.jsx)("path",{d:"m22 5.72-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM7.88 3.39 6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM12.5 8H11v6l4.75 2.85.75-1.23-4-2.37V8zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"}),"AccessAlarm");var o=n(9950),s=n(13564),l=n(60899),c=n(48089),u=n(39545),d=n(49989),h=n(52498),f=(n(13792),n(52688)),p=n(2588),m=n(94116),g=n(85442),v=n(23922),y=n(50160),x=n(7774);const b=function(e){let{dataToRender:t,selector:n,height:r,figureTitle:a}=e;const[s,l]=(0,x.mv)(),{language:c}=s,[u,h]=o.useState(!1),[f,p]=o.useState(1e3),b=(0,o.useRef)();o.useEffect((()=>{Object.keys(n).length>0&&t&&b.current&&((e,t,n)=>{const r=b.current;if(r.clearData(),r.fresh){const e=r.subplots(2,1,{sharex:!0,sharey:!0});r.setXlabel(`${(0,y.d)(y.z.FigureStandardText,"Time",c)} (${(0,y.d)(y.z.FigureStandardUnit,"Local",c)})`,{fontSize:15},e[1]),r.setYlabel(`${(0,y.d)(y.z.FigureStandardText,"Power",c)} (${(0,y.d)(y.z.FigureStandardUnit,"AU",c)})`,{fontSize:15},e[0]),r.setYlabel(`${(0,y.d)(y.z.FigureStandardText,"Amplitude",c)} (${(0,y.d)(y.z.FigureStandardUnit,"mA",c)})`,{fontSize:15},e[1]),r.setYlim([0,5],e[1]),r.setSubtitle(`${t.therapyName}`,e[0]),r.setSubtitle(`${(0,y.d)(y.z.FigureStandardText,"Stimulation",c)}`,e[1]),r.setLegend({tracegroupgap:5,xanchor:"left",y:.5}),r.setLayoutProps({hovermode:"xy"})}var i=0,a=0;const o=r.getAxes();for(var s=0;s0){var d=Array(e[s].Timestamp[u].length).fill(0).map(((t,n)=>new Date(1e3*e[s].Timestamp[u][n])));r.plot(d,e[s].Power[u],{linewidth:2,color:"#000000",hovertemplate:" %{x}
%{y:.2f} "},o[0]),r.plot([d[0],d[e[s].Timestamp[u].length-1]],[n,n],{linewidth:2,color:"#FF0000",hovertemplate:" %{x}
%{y:.2f} "},o[0]);var f=Array(e[s].Timestamp[u].length).fill(e[s].Therapy[u][l].Amplitude).map(((t,r)=>e[s].Power[u][r] %{y:.2f} mA "},o[1])}}const p=a/i;r.setSubtitle(`Estimated ${(0,y.d)(y.z.FigureStandardText,"Stimulation",c)} (${(100*p).toFixed(2)}%)`,o[1]),e?(r.render(),h(!0)):(r.purge(),h(!1))})(t,n,f)}),[t,n,f,b.current,c]);const _=(0,o.useCallback)((()=>{b&&(b.current=new v.s(a,c),b.current.refresh())}),[b]),{ref:w}=(0,m.uZ)({onResize:_,refreshMode:"debounce",refreshRate:50,skipOnMount:!1});var A=null,S=!1;const M=e=>{S?(S=!1,clearTimeout(A)):(S=!0,A=setTimeout((function(){T(e.points[0].y),S=!1}),300))},T=e=>{p(e)};return o.useEffect((()=>{w.current.on&&w.current.on("plotly_click",M)}),[w.current,t]),(0,i.jsx)(d.A,{ref:w,id:a,style:{marginTop:5,marginBottom:10,height:r,width:"100%",display:u?"":"none"}})};var _=n(88745),w=n(20572);const A=function(){const e=(0,s.Zp)(),[t,n]=(0,x.mv)(),{patientID:r,language:a}=t,[m,g]=(0,o.useState)(!1),[v,A]=(0,o.useState)({current:null,list:[]}),[S,M]=(0,o.useState)([]),[T,k]=(0,o.useState)({}),[E,C]=(0,o.useState)({}),[D,R]=(0,o.useState)({}),[P,O]=(0,o.useState)(null);(0,o.useEffect)((()=>{r?(O((0,i.jsx)(p.A,{})),w.x.query("/api/queryChronicNeuralActivity",{id:r,requestData:!0,timezoneOffset:60*(new Date).getTimezoneOffset()}).then((e=>{e.data.ChronicData.length>0&&(L(e.data.ChronicData),g(e.data.ChronicData),A({current:e.data.ChronicData[0].Device,list:e.data.ChronicData.map((e=>e.Device)).filter(((e,t,n)=>n.indexOf(e)===t))})),O(null)})).catch((e=>{w.x.displayError(e,O)}))):e("/dashboard",{replace:!1})}),[r]);const L=e=>{const t=[];for(var n=0;n432&&(e[n].CustomName?t.push({label:e[n].Device+" "+e[n].CustomName+" "+e[n].CircadianPowers[r].Therapy,hemisphere:e[n].Device+" "+e[n].Hemisphere,therapyName:e[n].CircadianPowers[r].Therapy,value:e[n].Device+"//"+e[n].CustomName+"//"+e[n].CircadianPowers[r].Therapy}):t.push({label:e[n].Device+" "+e[n].Hemisphere+" "+e[n].CircadianPowers[r].Therapy,hemisphere:e[n].Device+" "+e[n].Hemisphere,therapyName:e[n].CircadianPowers[r].Therapy,value:e[n].Device+"//"+e[n].Hemisphere+"//"+e[n].CircadianPowers[r].Therapy}));t.length>0?k({...T,selector:t,currentValue:t[0]}):k({})};return(0,i.jsxs)(i.Fragment,{children:[P,(0,i.jsx)(_.A,{children:(0,i.jsx)(d.A,{pt:3,children:(0,i.jsx)(d.A,{children:(0,i.jsx)(l.Ay,{container:!0,spacing:2,children:(0,i.jsx)(l.Ay,{item:!0,xs:12,children:(0,i.jsx)(c.A,{sx:{width:"100%"},children:(0,i.jsx)(l.Ay,{container:!0,children:m?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.Ay,{item:!0,xs:12,children:(0,i.jsx)(d.A,{p:2,lineHeight:1,children:(0,i.jsx)(u.A,{options:T.selector,value:T.currentValue,onChange:(e,t)=>{k({...T,currentValue:t})},getOptionLabel:e=>e.label||"",renderInput:e=>(0,i.jsx)(f.A,{...e,label:y.z.ChronicBrainSense.Select.Therapy[a],InputLabelProps:{shrink:!0}})})})}),(0,i.jsx)(l.Ay,{item:!0,xs:12,lg:12,children:(0,i.jsx)(b,{dataToRender:m,selector:T.currentValue,height:700,figureTitle:"CircadianRhythmThreshold"})})]}):(0,i.jsx)(l.Ay,{item:!0,xs:12,children:(0,i.jsx)(d.A,{p:2,children:(0,i.jsx)(h.A,{variant:"h6",fontSize:24,children:y.z.WarningMessage.NoData[a]})})})})})})})})})})]})},S={name:"CircadianThreshold",key:"circadian",icon:(0,i.jsx)(a,{style:{color:"white",margin:0,padding:0}}),route:"/experimental/circadian",component:(0,i.jsx)(A,{}),identified:!0,deidentified:!0}},69643:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>tt});var r=n(49230),i=n(9950),a=n(13564),o=n(60899),s=n(48089),l=n(96583),c=n(28170),u=n(29925),d=n(25333),h=n(98587),f=n(58168),p=n(2803),m=n(88465),g=n(48283),v=n(59254),y=n(1763),x=n(423);function b(e){return(0,x.A)("MuiStepper",e)}(0,y.A)("MuiStepper",["root","horizontal","vertical","alternativeLabel"]);var _=n(61676);const w=i.createContext({});const A=w,S=i.createContext({});const M=S;function T(e){return(0,x.A)("MuiStepConnector",e)}(0,y.A)("MuiStepConnector",["root","horizontal","vertical","alternativeLabel","active","completed","disabled","line","lineHorizontal","lineVertical"]);var k=n(44414);const E=["className"],C=(0,v.Ay)("div",{name:"MuiStepConnector",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.completed&&t.completed]}})((e=>{let{ownerState:t}=e;return(0,f.A)({flex:"1 1 auto"},"vertical"===t.orientation&&{marginLeft:12},t.alternativeLabel&&{position:"absolute",top:12,left:"calc(-50% + 20px)",right:"calc(50% + 20px)"})})),D=(0,v.Ay)("span",{name:"MuiStepConnector",slot:"Line",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.line,t[`line${(0,_.A)(n.orientation)}`]]}})((e=>{let{ownerState:t,theme:n}=e;const r="light"===n.palette.mode?n.palette.grey[400]:n.palette.grey[600];return(0,f.A)({display:"block",borderColor:n.vars?n.vars.palette.StepConnector.border:r},"horizontal"===t.orientation&&{borderTopStyle:"solid",borderTopWidth:1},"vertical"===t.orientation&&{borderLeftStyle:"solid",borderLeftWidth:1,minHeight:24})})),R=i.forwardRef((function(e,t){const n=(0,g.A)({props:e,name:"MuiStepConnector"}),{className:r}=n,a=(0,h.A)(n,E),{alternativeLabel:o,orientation:s="horizontal"}=i.useContext(A),{active:l,disabled:c,completed:u}=i.useContext(M),d=(0,f.A)({},n,{alternativeLabel:o,orientation:s,active:l,completed:u,disabled:c}),v=(e=>{const{classes:t,orientation:n,alternativeLabel:r,active:i,completed:a,disabled:o}=e,s={root:["root",n,r&&"alternativeLabel",i&&"active",a&&"completed",o&&"disabled"],line:["line",`line${(0,_.A)(n)}`]};return(0,m.A)(s,T,t)})(d);return(0,k.jsx)(C,(0,f.A)({className:(0,p.A)(v.root,r),ref:t,ownerState:d},a,{children:(0,k.jsx)(D,{className:v.line,ownerState:d})}))})),P=["activeStep","alternativeLabel","children","className","component","connector","nonLinear","orientation"],O=(0,v.Ay)("div",{name:"MuiStepper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel]}})((e=>{let{ownerState:t}=e;return(0,f.A)({display:"flex"},"horizontal"===t.orientation&&{flexDirection:"row",alignItems:"center"},"vertical"===t.orientation&&{flexDirection:"column"},t.alternativeLabel&&{alignItems:"flex-start"})})),L=(0,k.jsx)(R,{}),I=i.forwardRef((function(e,t){const n=(0,g.A)({props:e,name:"MuiStepper"}),{activeStep:r=0,alternativeLabel:a=!1,children:o,className:s,component:l="div",connector:c=L,nonLinear:u=!1,orientation:d="horizontal"}=n,v=(0,h.A)(n,P),y=(0,f.A)({},n,{alternativeLabel:a,orientation:d,component:l}),x=(e=>{const{orientation:t,alternativeLabel:n,classes:r}=e,i={root:["root",t,n&&"alternativeLabel"]};return(0,m.A)(i,b,r)})(y),_=i.Children.toArray(o).filter(Boolean),w=_.map(((e,t)=>i.cloneElement(e,(0,f.A)({index:t,last:t+1===_.length},e.props)))),S=i.useMemo((()=>({activeStep:r,alternativeLabel:a,connector:c,nonLinear:u,orientation:d})),[r,a,c,u,d]);return(0,k.jsx)(A.Provider,{value:S,children:(0,k.jsx)(O,(0,f.A)({as:l,ownerState:y,className:(0,p.A)(x.root,s),ref:t},v,{children:w}))})}));function z(e){return(0,x.A)("MuiStep",e)}(0,y.A)("MuiStep",["root","horizontal","vertical","alternativeLabel","completed"]);const N=["active","children","className","component","completed","disabled","expanded","index","last"],F=(0,v.Ay)("div",{name:"MuiStep",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.completed&&t.completed]}})((e=>{let{ownerState:t}=e;return(0,f.A)({},"horizontal"===t.orientation&&{paddingLeft:8,paddingRight:8},t.alternativeLabel&&{flex:1,position:"relative"})})),B=i.forwardRef((function(e,t){const n=(0,g.A)({props:e,name:"MuiStep"}),{active:r,children:a,className:o,component:s="div",completed:l,disabled:c,expanded:u=!1,index:d,last:v}=n,y=(0,h.A)(n,N),{activeStep:x,connector:b,alternativeLabel:_,orientation:w,nonLinear:S}=i.useContext(A);let[T=!1,E=!1,C=!1]=[r,l,c];x===d?T=void 0===r||r:!S&&x>d?E=void 0===l||l:!S&&x({index:d,last:v,expanded:u,icon:d+1,active:T,completed:E,disabled:C})),[d,v,u,T,E,C]),R=(0,f.A)({},n,{active:T,orientation:w,alternativeLabel:_,completed:E,disabled:C,expanded:u,component:s}),P=(e=>{const{classes:t,orientation:n,alternativeLabel:r,completed:i}=e,a={root:["root",n,r&&"alternativeLabel",i&&"completed"]};return(0,m.A)(a,z,t)})(R),O=(0,k.jsxs)(F,(0,f.A)({as:s,className:(0,p.A)(P.root,o),ref:t,ownerState:R},y,{children:[b&&_&&0!==d?b:null,a]}));return(0,k.jsx)(M.Provider,{value:D,children:b&&!_&&0!==d?(0,k.jsxs)(i.Fragment,{children:[b,O]}):O})}));var j=n(24184),U=n(65471);const V=(0,U.A)((0,k.jsx)("path",{d:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z"}),"CheckCircle"),H=(0,U.A)((0,k.jsx)("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"Warning");var W=n(9360);function G(e){return(0,x.A)("MuiStepIcon",e)}const q=(0,y.A)("MuiStepIcon",["root","active","completed","error","text"]);var Y;const $=["active","className","completed","error","icon"],X=(0,v.Ay)(W.A,{name:"MuiStepIcon",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t}=e;return{display:"block",transition:t.transitions.create("color",{duration:t.transitions.duration.shortest}),color:(t.vars||t).palette.text.disabled,[`&.${q.completed}`]:{color:(t.vars||t).palette.primary.main},[`&.${q.active}`]:{color:(t.vars||t).palette.primary.main},[`&.${q.error}`]:{color:(t.vars||t).palette.error.main}}})),Z=(0,v.Ay)("text",{name:"MuiStepIcon",slot:"Text",overridesResolver:(e,t)=>t.text})((e=>{let{theme:t}=e;return{fill:(t.vars||t).palette.primary.contrastText,fontSize:t.typography.caption.fontSize,fontFamily:t.typography.fontFamily}})),K=i.forwardRef((function(e,t){const n=(0,g.A)({props:e,name:"MuiStepIcon"}),{active:r=!1,className:i,completed:a=!1,error:o=!1,icon:s}=n,l=(0,h.A)(n,$),c=(0,f.A)({},n,{active:r,completed:a,error:o}),u=(e=>{const{classes:t,active:n,completed:r,error:i}=e,a={root:["root",n&&"active",r&&"completed",i&&"error"],text:["text"]};return(0,m.A)(a,G,t)})(c);if("number"===typeof s||"string"===typeof s){const e=(0,p.A)(i,u.root);return o?(0,k.jsx)(X,(0,f.A)({as:H,className:e,ref:t,ownerState:c},l)):a?(0,k.jsx)(X,(0,f.A)({as:V,className:e,ref:t,ownerState:c},l)):(0,k.jsxs)(X,(0,f.A)({className:e,ref:t,ownerState:c},l,{children:[Y||(Y=(0,k.jsx)("circle",{cx:"12",cy:"12",r:"12"})),(0,k.jsx)(Z,{className:u.text,x:"12",y:"12",textAnchor:"middle",dominantBaseline:"central",ownerState:c,children:s})]}))}return s}));function J(e){return(0,x.A)("MuiStepLabel",e)}const Q=(0,y.A)("MuiStepLabel",["root","horizontal","vertical","label","active","completed","error","disabled","iconContainer","alternativeLabel","labelContainer"]),ee=["children","className","componentsProps","error","icon","optional","slotProps","StepIconComponent","StepIconProps"],te=(0,v.Ay)("span",{name:"MuiStepLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation]]}})((e=>{let{ownerState:t}=e;return(0,f.A)({display:"flex",alignItems:"center",[`&.${Q.alternativeLabel}`]:{flexDirection:"column"},[`&.${Q.disabled}`]:{cursor:"default"}},"vertical"===t.orientation&&{textAlign:"left",padding:"8px 0"})})),ne=(0,v.Ay)("span",{name:"MuiStepLabel",slot:"Label",overridesResolver:(e,t)=>t.label})((e=>{let{theme:t}=e;return(0,f.A)({},t.typography.body2,{display:"block",transition:t.transitions.create("color",{duration:t.transitions.duration.shortest}),[`&.${Q.active}`]:{color:(t.vars||t).palette.text.primary,fontWeight:500},[`&.${Q.completed}`]:{color:(t.vars||t).palette.text.primary,fontWeight:500},[`&.${Q.alternativeLabel}`]:{marginTop:16},[`&.${Q.error}`]:{color:(t.vars||t).palette.error.main}})})),re=(0,v.Ay)("span",{name:"MuiStepLabel",slot:"IconContainer",overridesResolver:(e,t)=>t.iconContainer})((()=>({flexShrink:0,display:"flex",paddingRight:8,[`&.${Q.alternativeLabel}`]:{paddingRight:0}}))),ie=(0,v.Ay)("span",{name:"MuiStepLabel",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})((e=>{let{theme:t}=e;return{width:"100%",color:(t.vars||t).palette.text.secondary,[`&.${Q.alternativeLabel}`]:{textAlign:"center"}}})),ae=i.forwardRef((function(e,t){var n;const r=(0,g.A)({props:e,name:"MuiStepLabel"}),{children:a,className:o,componentsProps:s={},error:l=!1,icon:c,optional:u,slotProps:d={},StepIconComponent:v,StepIconProps:y}=r,x=(0,h.A)(r,ee),{alternativeLabel:b,orientation:_}=i.useContext(A),{active:w,disabled:S,completed:T,icon:E}=i.useContext(M),C=c||E;let D=v;C&&!D&&(D=K);const R=(0,f.A)({},r,{active:w,alternativeLabel:b,completed:T,disabled:S,error:l,orientation:_}),P=(e=>{const{classes:t,orientation:n,active:r,completed:i,error:a,disabled:o,alternativeLabel:s}=e,l={root:["root",n,a&&"error",o&&"disabled",s&&"alternativeLabel"],label:["label",r&&"active",i&&"completed",a&&"error",o&&"disabled",s&&"alternativeLabel"],iconContainer:["iconContainer",r&&"active",i&&"completed",a&&"error",o&&"disabled",s&&"alternativeLabel"],labelContainer:["labelContainer",s&&"alternativeLabel"]};return(0,m.A)(l,J,t)})(R),O=null!=(n=d.label)?n:s.label;return(0,k.jsxs)(te,(0,f.A)({className:(0,p.A)(P.root,o),ref:t,ownerState:R},x,{children:[C||D?(0,k.jsx)(re,{className:P.iconContainer,ownerState:R,children:(0,k.jsx)(D,(0,f.A)({completed:T,active:w,error:l,icon:C},y))}):null,(0,k.jsxs)(ie,{className:P.labelContainer,ownerState:R,children:[a?(0,k.jsx)(ne,(0,f.A)({ownerState:R},O,{className:(0,p.A)(P.label,null==O?void 0:O.className),children:a})):null,u]})]}))}));ae.muiName="StepLabel";const oe=ae;var se=n(10834);function le(e){return(0,x.A)("MuiStepButton",e)}const ce=(0,y.A)("MuiStepButton",["root","horizontal","vertical","touchRipple"]),ue=["children","className","icon","optional"],de=(0,v.Ay)(j.A,{name:"MuiStepButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${ce.touchRipple}`]:t.touchRipple},t.root,t[n.orientation]]}})((e=>{let{ownerState:t}=e;return(0,f.A)({width:"100%",padding:"24px 16px",margin:"-24px -16px",boxSizing:"content-box"},"vertical"===t.orientation&&{justifyContent:"flex-start",padding:"8px",margin:"-8px"},{[`& .${ce.touchRipple}`]:{color:"rgba(0, 0, 0, 0.3)"}})})),he=i.forwardRef((function(e,t){const n=(0,g.A)({props:e,name:"MuiStepButton"}),{children:r,className:a,icon:o,optional:s}=n,l=(0,h.A)(n,ue),{disabled:c}=i.useContext(M),{orientation:u}=i.useContext(A),d=(0,f.A)({},n,{orientation:u}),v=(e=>{const{classes:t,orientation:n}=e,r={root:["root",n],touchRipple:["touchRipple"]};return(0,m.A)(r,le,t)})(d),y={icon:o,optional:s},x=(0,se.A)(r,["StepLabel"])?i.cloneElement(r,y):(0,k.jsx)(oe,(0,f.A)({},y,{children:r}));return(0,k.jsx)(de,(0,f.A)({focusRipple:!0,disabled:c,TouchRippleProps:{className:v.touchRipple},className:(0,p.A)(v.root,a),ref:t,ownerState:d},l,{children:x}))}));var fe=n(55858),pe=n(63698),me=n(47813),ge=n(53758),ve=n(13792),ye=n(49989),xe=n(52498),be=n(2588),_e=n(88745),we=n(20572),Ae=n(7774),Se=n(50160),Me=n(32610),Te=n(57357),ke=n(14195),Ee=n(93038),Ce=n(83563),De=n(39545),Re=n(56055),Pe=n(30412),Oe=n(40379),Le=n(94116),Ie=(n(29144),n(23922));const ze=function(e){let{dataToRender:t,configuration:n,onStreamClicked:r,height:a,figureTitle:o}=e;const[s,l]=(0,Ae.mv)(),{language:c}=s,[u,d]=i.useState(!1),h=new Ie.s(o,c);i.useEffect((()=>{t.Recordings.length>0?((e,t)=>{if(h.clearData(),h.fresh){var n=h.subplots(1,1,{sharex:!0,sharey:!0});h.setXlabel("Time (local time)",{fontSize:15},n[n.length-1]),h.setAxisProps({zeroline:!1},"y"),h.setTitle("Analysis Builder - Data Inclusion and Label"),h.setLegend({bgcolor:"transparent"}),h.setLayoutProps({hovermode:"xy"})}let r={},i=[],a=[],o=[],s=[0,0];e.map(((e,n)=>{let l=t[e.RecordingId]||{TimeShift:0,Type:"Signal",Label:""},c=Object.keys(r);c.includes(l.Type)||(r[l.Type]=c.length),i.push(r[l.Type]),a.push(new Date(1e3*e.Time+500*e.Duration+l.TimeShift)),""===l.Label?o.push("["+e.RecordingLabel+"]
"+e.RecordingType):o.push(l.Label),(1e3*e.Time+l.TimeShifts[1]||0==s[1])&&(s[1]=1e3*e.Time+1e3*e.Duration+l.TimeShift)})),h.setLayoutProps({shapes:e.map(((e,n)=>{let i=t[e.RecordingId]||{TimeShift:0,Type:"Signal"};return{type:"rect",xref:"x",x0:new Date(1e3*e.Time+i.TimeShift),x1:new Date(1e3*e.Time+1e3*e.Duration+i.TimeShift),y0:r[i.Type]-.3,y1:r[i.Type]+.3,line:{color:"#33c9dc",width:2},fillcolor:"#00bcd4",opacity:.4}}))}),h.addText(a,i,o),h.setXlim([new Date(s[0]-.1*(s[1]-s[0])),new Date(s[1]+.1*(s[1]-s[0]))]);const l=Object.keys(r);h.setYlim([-.5,Math.max(l.length,3)-.5]),h.setTickValue(l.map((e=>r[e])),"y"),h.setTickLabel(l.map((e=>e)),"y"),e?(h.render(),d(!0)):(h.purge(),d(!1))})(t.Recordings,t.Configuration.Descriptor):(h.purge(),d(!1))}),[t,n,c]);const f=(0,i.useCallback)((()=>{h.refresh()}),[]),{ref:p}=(0,Le.uZ)({onResize:f,refreshMode:"debounce",refreshRate:50,skipOnMount:!1});var m=null,g=!1;const v=e=>{g?(g=!1,clearTimeout(m)):(g=!0,m=setTimeout((function(){r(e),g=!1}),300))};return i.useEffect((()=>{p.current.on&&p.current.on("plotly_click",v)}),[p.current,t]),(0,k.jsx)(ye.A,{ref:p,id:o,style:{marginTop:5,marginBottom:10,height:a,width:"100%",display:u?"":"none"}})},Ne=(0,Pe.Z)();const Fe=function(e){let{analysisId:t,analysisData:n,updateAnalysisData:r}=e;const h=(0,a.Zp)(),[f,p]=(0,Ae.mv)(),{patientID:m,language:g}=f,[v,y]=(0,i.useState)(!1),[x,b]=(0,i.useState)([]),[_,w]=(0,i.useState)({value:"",type:"Signal",show:!1}),[A,S]=(0,i.useState)({configuration:{},show:!1}),[M,T]=(0,i.useState)({show:!1,name:"",id:""}),[E,C]=(0,i.useState)(null);return(0,i.useEffect)((()=>{m?(y(n),b(n.AvailableRecordings.sort(((e,t)=>e.RecordingLabel==t.RecordingLabel?t.Time-e.Time:e.RecordingLabel{let t=new Date(1e3*e.Time).toLocaleString();return t="ChronicLFPs"==e.RecordingType?"":"("+t+" / "+e.Duration.toFixed(0)+" seconds) ",{key:e.RecordingId,title:"["+e.RecordingLabel+"] - "+t+e.RecordingType,value:e.RecordingId}})))):h("/dashboard",{replace:!1})}),[m,t]),(0,i.useEffect)((()=>{}),[x]),v?(0,k.jsxs)(s.A,{width:"100%",style:{paddingTop:15,paddingBottom:15,paddingLeft:15,paddingRight:15},children:[E,(0,k.jsxs)(l.A,{open:M.show,onClose:()=>T({...M,show:!1}),children:[(0,k.jsx)(ye.A,{px:2,pt:2,children:(0,k.jsx)(xe.A,{variant:"h5",children:"Edit Channel Name"})}),(0,k.jsx)(c.A,{children:(0,k.jsx)(u.A,{variant:"standard",margin:"dense",id:"name",value:M.name,onChange:e=>T({...M,name:e.target.value}),fullWidth:!0})}),(0,k.jsxs)(ye.A,{style:{paddingLeft:15,paddingRight:15,paddingBottom:15},children:[(0,k.jsx)(ve.A,{color:"secondary",onClick:()=>T({...M,show:!1}),children:"Cancel"}),(0,k.jsx)(ve.A,{color:"info",onClick:()=>{Object.keys(A.configuration.Channels).includes(A.channels[M.id])||(A.configuration.Channels[A.channels[M.id]]={show:!0,name:A.channels[M.id]}),A.configuration.Channels[A.channels[M.id]].name=M.name,S({...A}),T({...M,show:!1})},style:{marginLeft:10},children:"Update"})]})]}),(0,k.jsxs)(l.A,{open:A.show,onClose:()=>S({...A,show:!1}),children:[(0,k.jsxs)(ye.A,{px:2,pt:2,children:[(0,k.jsx)(xe.A,{variant:"h5",children:"Configure Recording for Analysis"}),(0,k.jsx)(xe.A,{variant:"p",fontSize:15,children:A.title||""})]}),(0,k.jsxs)(c.A,{style:{minWidth:500},children:[(0,k.jsxs)(ye.A,{children:[(0,k.jsx)(u.A,{variant:"standard",margin:"dense",value:A.configuration.TimeShift,placeholder:"0",onChange:e=>S((t=>(t.configuration.TimeShift=e.target.value,{...t}))),label:"Time Adjustment (msec)",type:"number",autoComplete:"off",fullWidth:!0}),(0,k.jsx)(u.A,{variant:"standard",margin:"dense",value:A.configuration.Label,placeholder:A.title,onChange:e=>S((t=>(t.configuration.Label=e.target.value,{...t}))),label:"Recording Label (Description)",type:"text",autoComplete:"off",fullWidth:!0}),(0,k.jsx)(u.A,{variant:"standard",margin:"dense",value:A.configuration.Type,placeholder:"Signal",onChange:e=>S((t=>(t.configuration.Type=e.target.value,{...t}))),label:"Data Type (Grouping)",type:"text",autoComplete:"off",fullWidth:!0})]}),A.channels?(0,k.jsxs)(ye.A,{style:{width:"100%",height:400,bgcolor:"background.paper",marginTop:15},children:[(0,k.jsx)(xe.A,{variant:"h5",children:"Channels Selection"}),(0,k.jsx)(Re.Y1,{height:380,width:"100%",itemSize:36,itemCount:A.channels.length,overscanCount:5,children:e=>{let{index:t,style:n}=e,r=!0,i=A.channels[t];Object.keys(A.configuration.Channels).includes(A.channels[t])&&(r=A.configuration.Channels[A.channels[t]].show,i=A.configuration.Channels[A.channels[t]].name);var a=null,o=!1;return(0,k.jsx)(Me.Ay,{style:n,secondaryAction:(0,k.jsx)(d.A,{edge:"end","aria-label":"comments",onClick:()=>{T({...M,id:t,name:i,show:!0})},sx:{marginRight:1},children:(0,k.jsx)(Oe.A,{})}),disablePadding:!0,children:(0,k.jsxs)(Te.A,{onClick:()=>{o?(o=!1,(()=>{for(let e in A.channels)e!=t&&(Object.keys(A.configuration.Channels).includes(A.channels[e])||(A.configuration.Channels[A.channels[e]]={show:!0,name:A.channels[e]}),A.configuration.Channels[A.channels[e]].show=!A.configuration.Channels[A.channels[e]].show);S({...A})})(),clearTimeout(a)):(o=!0,a=setTimeout((function(){Object.keys(A.configuration.Channels).includes(A.channels[t])||(A.configuration.Channels[A.channels[t]]={show:!0,name:A.channels[t]}),A.configuration.Channels[A.channels[t]].show=!A.configuration.Channels[A.channels[t]].show,S({...A}),o=!1}),200))},dense:!0,children:[(0,k.jsx)(ke.A,{children:(0,k.jsx)(Ee.A,{edge:"start",checked:r,tabIndex:-1,disableRipple:!0})}),(0,k.jsx)(Ce.A,{primary:i})]})},t)}})]}):null]}),(0,k.jsxs)(ye.A,{px:2,py:2,style:{display:"flex",justifyContent:"space-between"},children:[(0,k.jsx)(ye.A,{px:2,py:2,style:{display:"flex",justifyContent:"space-between"},children:(0,k.jsx)(ve.A,{variant:"gradient",color:"error",onClick:()=>{n.Analysis.ProcessingQueued?C((0,k.jsx)(ge.A,{title:"Currently Processing",message:"Cannot update analysis until current queue is finished.",confirmText:"Confirm",handleClose:()=>C(null),handleDeny:()=>C(null),handleConfirm:()=>C(null)})):C((0,k.jsx)(ge.A,{title:"Remove Recording",message:"Are you sure you want to remove the recording from analysis? All configurations for this recording will be removed.",confirmText:"YES",denyText:"NO",denyButton:!0,handleClose:()=>C(null),handleDeny:()=>C(null),handleConfirm:()=>{we.x.query("/api/queryCustomizedAnalysis",{id:m,analysisId:t,removeRecording:A.recordingId}).then((e=>{y((e=>(e.Recordings=e.Recordings.filter((e=>e.RecordingId!=A.recordingId)),e.Configuration.Descriptor[A.recordingId]=null,r(e),{...e}))),S({...A,show:!1}),C(null)})).catch((e=>{we.x.displayError(e,C)}))}}))},children:"Delete"})}),(0,k.jsxs)(ye.A,{px:2,py:2,style:{display:"flex",justifyContent:"space-around"},children:[(0,k.jsx)(ve.A,{variant:"gradient",color:"secondary",onClick:()=>S({...A,show:!1}),children:"Cancel"}),(0,k.jsx)(ve.A,{variant:"gradient",color:"success",onClick:()=>{n.Analysis.ProcessingQueued?C((0,k.jsx)(ge.A,{title:"Currently Processing",message:"Cannot update analysis until current queue is finished.",confirmText:"Confirm",handleClose:()=>C(null),handleDeny:()=>C(null),handleConfirm:()=>C(null)})):(A.configuration.TimeShift=""===A.configuration.TimeShift?0:parseInt(A.configuration.TimeShift),we.x.query("/api/queryCustomizedAnalysis",{id:m,analysisId:t,updateRecording:A.recordingId,configuration:A.configuration}).then((e=>{y((e=>{e.Configuration.Descriptor[A.recordingId]=A.configuration;for(let t in e.Recordings)e.Recordings[t].RecordingId==A.recordingId&&delete e.Recordings[t].data;return r(e),{...e}})),S({...A,show:!1})})).catch((e=>{we.x.displayError(e,C)})))},children:"Update"})]})]})]}),(0,k.jsxs)(ye.A,{children:[(0,k.jsx)(xe.A,{fontWeight:"bold",fontSize:30,children:n.Analysis.AnalysisName}),(0,k.jsxs)(xe.A,{fontSize:18,children:["Last Modified: ",new Date(1e3*n.Analysis.AnalysisDate).toLocaleDateString()]})]}),(0,k.jsx)(ye.A,{pt:5,children:(0,k.jsxs)(o.Ay,{container:!0,spacing:3,children:[(0,k.jsxs)(o.Ay,{item:!0,xs:12,children:[(0,k.jsx)(De.A,{selectOnFocus:!0,clearOnBlur:!0,renderInput:e=>(0,k.jsx)(u.A,{...e,variant:"standard",placeholder:"Select Recordings"}),filterOptions:(e,t)=>{const n=Ne(e,t),{inputValue:r}=t;return n},getOptionLabel:e=>"string"===typeof e?e:e.inputValue?e.inputValue:e.title,isOptionEqualToValue:(e,t)=>e.value===t.value,freeSolo:!0,renderOption:(e,t)=>(0,k.jsx)("li",{...e,children:t.title}),value:_.value,options:x,onChange:(e,t)=>w({..._,value:t})}),(0,k.jsx)(u.A,{variant:"standard",margin:"dense",value:_.type,placeholder:"Signal",onChange:e=>w({..._,type:e.target.value}),label:"Input Data Type",type:"text",autoComplete:"off",fullWidth:!0}),(0,k.jsx)(ve.A,{variant:"gradient",color:"success",style:{minWidth:300,marginTop:15},onClick:()=>{var e;(e=_).value&&(n.Analysis.ProcessingQueued?C((0,k.jsx)(ge.A,{title:"Currently Processing",message:"Cannot update analysis until current queue is finished.",confirmText:"Confirm",handleClose:()=>C(null),handleDeny:()=>C(null),handleConfirm:()=>C(null)})):we.x.query("/api/queryCustomizedAnalysis",{id:m,analysisId:t,addRecording:e.value.value,recordingType:e.type}).then((e=>{y((t=>(t.Recordings=[...t.Recordings,e.data.recording],t.Configuration.Descriptor[e.data.recording.RecordingId]=e.data.configuration,r(t),{...t})))})).catch((e=>{we.x.displayError(e,C)})))},children:"Add"})]}),(0,k.jsx)(o.Ay,{item:!0,xs:12,children:(0,k.jsx)(ze,{dataToRender:v,onStreamClicked:e=>{let t=v.Recordings[e.points[0].pointIndex],n=v.Configuration.Descriptor[t.RecordingId]||{};S({...A,title:"["+t.RecordingLabel+"] - "+t.RecordingType,recordingId:t.RecordingId,configuration:n,channels:t.RecordingChannels,show:!0})},height:500,figureTitle:"Data To Analyze"})})]})})]}):null};const Be=function(e){let{dataToRender:t,configuration:n,onStreamClicked:r,figureTitle:a}=e;const[o,s]=(0,Ae.mv)(),{language:l}=o,[c,u]=i.useState(!1),d=new Ie.s(a,l);i.useEffect((()=>{t.length>0?((e,t)=>{d.clearData();for(let o in e)if(!e[o].data)return;if(d.fresh){var n=e.length,r=d.subplots(n,1,{sharex:!0,sharey:!1});for(var i in d.setXlabel("Time (local time)",{fontSize:15},r[r.length-1]),r)d.setSubtitle(`${t[e[i].RecordingId].Label||e[i].title}`,r[i]);d.setXlabel(`${(0,Se.d)(Se.z.FigureStandardText,"Time",l)} (${(0,Se.d)(Se.z.FigureStandardUnit,"Local",l)})`,{fontSize:15},r[r.length-1]),d.setLegend({xanchor:"left",tracegroupgap:10})}for(let o in e){let n=t[e[o].RecordingId]||{TimeShift:0,Type:"Signal",Label:""};var a=Array(e[o].data.Data[0].length).fill(0).map(((t,r)=>new Date(1e3*e[o].data.StartTime+r/e[o].data.SamplingRate*1e3+n.TimeShift)));let i=1;e[o].data.Data[0].length>3e5&&(i=Math.floor(e[o].data.Data[0].length/3e5));for(let s in e[o].data.ChannelNames)d.plot(a.filter(((e,t)=>t%i==0)),e[o].data.Data[s].filter(((e,t)=>t%i==0)),{linewidth:.5,hovertemplate:" %{y:.2f} (unit) ",name:t[e[o].RecordingId].Channels[e[o].data.ChannelNames[s]].name,showlegend:!0},r[o])}e?(d.render(),u(!0)):(d.purge(),u(!1))})(t,n.Configuration.Descriptor):(d.purge(),u(!1))}),[t,n,l]);const h=(0,i.useCallback)((()=>{d.refresh()}),[]),{ref:f}=(0,Le.uZ)({onResize:h,refreshMode:"debounce",refreshRate:50,skipOnMount:!1});return(0,k.jsx)(ye.A,{ref:f,id:a,style:{marginTop:5,marginBottom:10,height:300*t.length,width:"100%",display:c?"":"none"}})},je=(0,Pe.Z)(),Ue=e=>{let{data:t,handleUpdateConfig:n,handleRemoveRecording:r}=e;const[a,o]=(0,i.useState)(t);return(0,i.useEffect)((()=>{o((e=>{let n=e.map((e=>e.RecordingId));for(let r in t)n.includes(t[r].RecordingId)||e.push(t[r]);return[...e]}))}),[t]),a.map(((e,t)=>(0,k.jsxs)(ye.A,{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start"},children:[(0,k.jsx)(xe.A,{fontSize:15,style:{marginRight:10},children:`#${t+1}: `}),(0,k.jsx)(xe.A,{fontSize:15,fontWeight:"bold",children:e.title}),(0,k.jsx)(u.A,{variant:"standard",margin:"dense",value:e.TimeShift,placeholder:"0",onChange:e=>o((n=>(n[t].TimeShift=e.target.value,[...n]))),label:"Time Adjustment (msec)",type:"number",autoComplete:"off",style:{marginLeft:15,paddingBottom:15}}),(0,k.jsx)(ve.A,{variant:"gradient",color:"info",style:{marginLeft:15},onClick:()=>{n(a)},children:"Update"}),(0,k.jsx)(ve.A,{variant:"gradient",color:"error",style:{marginLeft:15},onClick:()=>{o([...a.filter((t=>t.RecordingId!=e.RecordingId))]),r([...a.filter((t=>t.RecordingId!=e.RecordingId))])},children:"Remove"})]},e.RecordingId)))};const Ve=function(e){let{analysisId:t,analysisData:n,updateAnalysisData:r}=e;const l=(0,a.Zp)(),[c,d]=(0,Ae.mv)(),{patientID:h,language:f}=c,[p,m]=(0,i.useState)(!1),[g,v]=(0,i.useState)([]),[y,x]=(0,i.useState)([]),[b,_]=(0,i.useState)(null),[w,A]=(0,i.useState)(null);return(0,i.useEffect)((()=>{h?(m(n),x(n.Recordings.sort(((e,t)=>e.RecordingLabel==t.RecordingLabel?t.Time-e.Time:e.RecordingLabel{const t=n.Configuration.Descriptor[e.RecordingId];return{key:e.RecordingId,title:"["+t.Type+"] - "+(t.Label||e.RecordingLabel+" "+e.RecordingId),value:e.RecordingId}})))):l("/dashboard",{replace:!1})}),[h,t]),(0,i.useEffect)((()=>{A((0,k.jsx)(be.A,{})),(async e=>{let n=!1;for(let i in e)if(!e[i].data)try{const r=await we.x.query("/api/queryRecordingsForAnalysis",{id:h,analysisId:t,requestRawData:e[i].RecordingId});e[i].data=r.data,n=!0}catch(r){return we.x.displayError(r,A),r}n&&v([...e])})(g).then((e=>{e?we.x.displayError(e,A):A(null)}))}),[g]),(0,i.useEffect)((()=>{v([])}),[n]),p?(0,k.jsxs)(s.A,{width:"100%",style:{paddingTop:15,paddingBottom:15,paddingLeft:15,paddingRight:15},children:[w,(0,k.jsxs)(ye.A,{children:[(0,k.jsxs)(xe.A,{fontWeight:"bold",fontSize:30,children:[p.Analysis.AnalysisName," "," - Precise Time Alignment"]}),(0,k.jsxs)(xe.A,{fontSize:18,children:["Last Modified: ",new Date(1e3*p.Analysis.AnalysisDate).toLocaleDateString()]})]}),(0,k.jsx)(ye.A,{pt:2,children:(0,k.jsxs)(o.Ay,{container:!0,spacing:3,children:[(0,k.jsx)(o.Ay,{item:!0,xs:12,children:(0,k.jsx)(Ue,{data:g,handleUpdateConfig:e=>{let i=!1;for(let r in e)parseInt(e[r].TimeShift)!=n.Configuration.Descriptor[e[r].RecordingId].TimeShift&&(i=!0,n.Configuration.Descriptor[e[r].RecordingId].TimeShift=parseInt(e[r].TimeShift),we.x.query("/api/queryCustomizedAnalysis",{id:h,analysisId:t,updateRecording:e[r].RecordingId,configuration:n.Configuration.Descriptor[e[r].RecordingId]}).then((e=>{})).catch((e=>{we.x.displayError(e,A)})));i&&r(n)},handleRemoveRecording:e=>{v([...e])}})}),(0,k.jsxs)(o.Ay,{item:!0,xs:12,children:[(0,k.jsx)(De.A,{selectOnFocus:!0,clearOnBlur:!0,renderInput:e=>(0,k.jsx)(u.A,{...e,variant:"standard",placeholder:"Select Recordings"}),filterOptions:(e,t)=>{const n=je(e,t),{inputValue:r}=t;return n},getOptionLabel:e=>"string"===typeof e?e:e.inputValue?e.inputValue:e.title,isOptionEqualToValue:(e,t)=>e.value===t.value,renderOption:(e,t)=>(0,k.jsx)("li",{...e,children:t.title}),value:b,options:y,onChange:(e,t)=>_(t)}),(0,k.jsx)(ve.A,{variant:"gradient",color:"success",style:{minWidth:300,marginTop:15},onClick:()=>{if(n.Analysis.ProcessingQueued)A((0,k.jsx)(ge.A,{title:"Currently Processing",message:"Cannot update analysis until current queue is finished.",confirmText:"Confirm",handleClose:()=>A(null),handleDeny:()=>A(null),handleConfirm:()=>A(null)}));else if(b){if(g.filter((e=>e.RecordingId==b.value)).length>0)return;let e=n.Recordings.filter((e=>e.RecordingId==b.value))[0];e.title=b.title,e.TimeShift=n.Configuration.Descriptor[e.RecordingId].TimeShift,v([...g,e])}},children:"Add to Display"})]}),(0,k.jsx)(o.Ay,{item:!0,xs:12,children:(0,k.jsx)(Be,{dataToRender:g,configuration:n,height:600,figureTitle:"PreciseTimeAlignmentView"})})]})})]}):null};var He=n(35027),We=n(84519),Ge=n(15255);const qe=(0,Pe.Z)(),Ye=e=>{let{currentState:t,newProcess:n,availableRecordings:r,updateConfiguration:a}=e;const[o,s]=(0,i.useState)(n?{targetRecording:"",highpass:"",lowpass:"",output:""}:t);return(0,k.jsxs)(ye.A,{style:{marginTop:20,paddingTop:5,paddingBottom:15},children:[(0,k.jsx)(De.A,{selectOnFocus:!0,clearOnBlur:!0,renderInput:e=>(0,k.jsx)(u.A,{...e,variant:"standard",placeholder:"Select Target Recording Type"}),filterOptions:(e,t)=>{const n=qe(e,t),{inputValue:r}=t;return n},isOptionEqualToValue:(e,t)=>e===t,renderOption:(e,t)=>(0,k.jsx)("li",{...e,children:t}),value:o.targetRecording,options:r,onChange:(e,t)=>s({...o,targetRecording:t})}),(0,k.jsx)(xe.A,{fontSize:15,style:{paddingTop:30},children:"Filter Range: "}),(0,k.jsxs)(ye.A,{style:{display:"flex",flexDirection:"row",alignItems:"center"},children:[(0,k.jsx)(u.A,{variant:"standard",margin:"dense",value:o.highpass,placeholder:"Disable",onChange:e=>s({...o,highpass:e.target.value}),label:"Highpass Filter (Default Disable)",type:"number",autoComplete:"off",fullWidth:!0}),(0,k.jsx)(u.A,{variant:"standard",margin:"dense",value:o.lowpass,placeholder:"Disable",onChange:e=>s({...o,lowpass:e.target.value}),label:"Lowpass Filter (Default Disable)",type:"number",autoComplete:"off",fullWidth:!0})]}),(0,k.jsx)(u.A,{variant:"standard",margin:"dense",value:o.output,placeholder:"Disable",onChange:e=>s({...o,output:e.target.value}),label:"Output Result Label",type:"text",autoComplete:"off",fullWidth:!0}),(0,k.jsxs)(ye.A,{style:{display:"flex",paddingLeft:15,paddingRight:15,paddingTop:15,justifyContent:"flex-end"},children:[(0,k.jsx)(ve.A,{color:"secondary",onClick:()=>a(!1),children:"Cancel"}),(0,k.jsx)(ve.A,{color:"info",onClick:()=>{""!==o.targetRecording&&""!==o.output&&a(o)},style:{marginLeft:10},children:n?"Add":"Update"})]})]})},$e=e=>{let{currentState:t,newProcess:n,updateConfiguration:r}=e;const[a,o]=(0,i.useState)(n?{output:""}:t);return(0,k.jsxs)(ye.A,{style:{marginTop:20,paddingTop:5,paddingBottom:15},children:[(0,k.jsx)(u.A,{variant:"standard",margin:"dense",value:a.output,placeholder:"Disable",onChange:e=>o({...a,output:e.target.value}),label:"Output Result Label",type:"text",autoComplete:"off",fullWidth:!0}),(0,k.jsxs)(ye.A,{style:{display:"flex",paddingLeft:15,paddingRight:15,paddingTop:15,justifyContent:"flex-end"},children:[(0,k.jsx)(ve.A,{color:"secondary",onClick:()=>r(!1),children:"Cancel"}),(0,k.jsx)(ve.A,{color:"info",onClick:()=>{r({output:a.output})},style:{marginLeft:10},children:n?"Add":"Update"})]})]})};const Xe=function(e){let{analysisId:t,analysisData:n,updateProcessingSteps:r,updateProcessingResult:h}=e;(0,a.Zp)();const[f,p]=(0,Ae.mv)(),{patientID:m,language:g}=f,[v,y]=(0,i.useState)(null),[x,b]=(0,i.useState)(!1),[_,w]=(0,i.useState)(n.Configuration.AnalysisSteps||[]),[A,S]=(0,i.useState)({show:!1,new:!1,type:{value:"",label:""},config:{}}),[M,T]=(0,i.useState)({show:!1,step:0,currentStep:0}),[E,C]=(0,i.useState)([]);(0,i.useEffect)((()=>{if(t){let e=[],t=Object.keys(n.Configuration.Descriptor);for(let r in t)e.includes(n.Configuration.Descriptor[t[r]].Type)||e.push(n.Configuration.Descriptor[t[r]].Type);C(e)}}),[t]);const D=e=>{var t;(S({...A,show:!1}),e)&&(n.Analysis.ProcessingQueued?y((0,k.jsx)(ge.A,{title:"Currently Processing",message:"Cannot update analysis until current queue is finished.",confirmText:"Confirm",handleClose:()=>y(null),handleDeny:()=>y(null),handleConfirm:()=>y(null)})):e&&(delete e.show,delete e.new,t={...A,config:e},n.Analysis.ProcessingQueued?y((0,k.jsx)(ge.A,{title:"Currently Processing",message:"Cannot update analysis until current queue is finished.",confirmText:"Confirm",handleClose:()=>y(null),handleDeny:()=>y(null),handleConfirm:()=>y(null)})):(delete t.show,delete t.new,w([..._,{...t,id:(0,Ge.A)()}])),S({...A,show:!1})))};return(0,i.useEffect)((()=>{_!==n.Configuration.AnalysisSteps&&(we.x.query("/api/queryCustomizedAnalysis",{updateAnalysisSteps:!0,id:m,analysisId:t,processingSteps:_}).then((e=>{h([])})).catch((e=>{we.x.displayError(e,y)})),r(_))}),[_]),(0,k.jsxs)(ye.A,{pt:3,children:[v,(0,k.jsxs)(ye.A,{children:[(0,k.jsx)(ye.A,{style:{marginBottom:25},children:(0,k.jsx)(ve.A,{fullWidth:!0,color:"success",style:{fontSize:25},onClick:()=>{we.x.query("/api/queryCustomizedAnalysis",{startAnalysis:!0,id:m,analysisId:t})},disabled:n.Analysis.ProcessingQueued,children:n.Analysis.ProcessingQueued?"Currently Processing":"Start Processing"})}),(0,k.jsxs)(o.Ay,{container:!0,spacing:2,children:[_.map(((e,t)=>(0,k.jsx)(o.Ay,{item:!0,xs:12,md:4,children:(0,k.jsx)(He.A,{badgeContent:`${t+1}`,color:"primary",anchorOrigin:{vertical:"top",horizontal:"left"},sx:{width:"100%"},children:(0,k.jsxs)(s.A,{sx:{width:"100%",padding:3},children:[(0,k.jsxs)(ye.A,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"start"},children:["filter"===e.type.value?(0,k.jsxs)(ye.A,{style:{flexDirection:"column"},children:[(0,k.jsxs)(ye.A,{children:[(0,k.jsx)(xe.A,{variant:"h4",fontFamily:"lato",fontWeight:"bold",children:e.type.label}),(0,k.jsx)(xe.A,{variant:"p",fontFamily:"lato",fontWeight:"regular",children:e.config.targetRecording})]}),(0,k.jsx)(ye.A,{children:(0,k.jsxs)(xe.A,{variant:"p",fontFamily:"lato",fontWeight:"regular",children:["Highpass: "+(""===e.config.highpass?"Disabled":e.config.highpass+" Hz"),(0,k.jsx)("br",{}),"Lowpass: "+(""===e.config.lowpass?"Disabled":e.config.lowpass+" Hz")]})})]}):null,"export"===e.type.value?(0,k.jsx)(ye.A,{style:{flexDirection:"column"},children:(0,k.jsx)(ye.A,{children:(0,k.jsx)(xe.A,{variant:"h4",fontFamily:"lato",fontWeight:"bold",children:e.type.label})})}):null,(0,k.jsxs)(ye.A,{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[(0,k.jsx)(d.A,{color:"info",size:"small",onClick:()=>T({show:!0,currentStep:t,step:t}),sx:{paddingX:1},children:(0,k.jsx)(We.A,{fontSize:"large"})}),(0,k.jsx)(d.A,{color:"error",size:"small",onClick:()=>{return t=e.id,void(n.Analysis.ProcessingQueued?y((0,k.jsx)(ge.A,{title:"Currently Processing",message:"Cannot update analysis until current queue is finished.",confirmText:"Confirm",handleClose:()=>y(null),handleDeny:()=>y(null),handleConfirm:()=>y(null)})):y((0,k.jsx)(ge.A,{title:"Remove Step",message:"Are you sure you want to remove this step from analysis?",confirmText:"YES",denyText:"NO",denyButton:!0,handleClose:()=>y(null),handleDeny:()=>y(null),handleConfirm:()=>{w((e=>(e=e.filter((e=>e.id!=t)),[...e]))),y(null)}})));var t},sx:{paddingX:1},children:(0,k.jsx)(me.A,{fontSize:"large"})})]})]}),(0,k.jsx)(ye.A,{style:{paddingTop:5},children:(0,k.jsxs)(xe.A,{variant:"h4",fontFamily:"lato",fontWeight:"bold",children:["Output Data: "," ",e.config.output]})})]})})},e.id))),(0,k.jsx)(o.Ay,{item:!0,xs:12,md:4,children:(0,k.jsx)(s.A,{sx:{width:"100%",height:"100%",borderStyle:"dashed",borderWidth:1,padding:3,justifyContent:"center",alignItems:"center",cursor:"pointer"},onClick:()=>S({show:!0,new:!0,type:{value:"",label:""},config:{}}),children:(0,k.jsx)(xe.A,{children:"Add New Step"})})})]}),(0,k.jsxs)(l.A,{open:A.show,onClose:()=>S({...A,show:!1}),children:[(0,k.jsx)(ye.A,{px:2,pt:2,children:(0,k.jsx)(xe.A,{variant:"h5",children:"Processing Configuration"})}),(0,k.jsxs)(c.A,{sx:{minWidth:500},children:[(0,k.jsx)(De.A,{selectOnFocus:!0,clearOnBlur:!0,renderInput:e=>(0,k.jsx)(u.A,{...e,variant:"standard",placeholder:"Select Processing Type"}),filterOptions:(e,t)=>{const n=qe(e,t),{inputValue:r}=t;return n},isOptionEqualToValue:(e,t)=>e.value===t.value,renderOption:(e,t)=>(0,k.jsx)("li",{...e,children:t.label}),value:A.type,options:[{value:"filter",label:"Apply Filter"},{value:"export",label:"Export Data"}],onChange:(e,t)=>{S(t?{...A,type:t}:{...A,type:{value:"",label:""}})}}),"filter"===A.type.value?(0,k.jsx)(Ye,{currentState:A.config,availableRecordings:E,newProcess:A.new,updateConfiguration:D}):null,"export"===A.type.value?(0,k.jsx)($e,{newProcess:A.new,updateConfiguration:D}):null,""===A.type.value?(0,k.jsx)(ve.A,{color:"secondary",style:{marginTop:15},onClick:()=>S({...A,show:!1}),children:"Cancel"}):null]})]}),(0,k.jsxs)(l.A,{open:M.show,onClose:()=>T({...M,show:!1}),children:[(0,k.jsx)(ye.A,{px:2,pt:2,children:(0,k.jsx)(xe.A,{variant:"h5",children:"Set Processing Order"})}),(0,k.jsx)(c.A,{sx:{minWidth:500},children:(0,k.jsx)(u.A,{variant:"standard",margin:"dense",value:M.step,placeholder:"Unchange",onChange:e=>T({...M,step:parseInt(e.target.value?e.target.value:"0")}),label:"Change Processing Order ID",type:"number",autoComplete:"off",fullWidth:!0})}),(0,k.jsxs)(ye.A,{style:{display:"flex",paddingLeft:15,paddingRight:15,paddingTop:15,paddingBottom:15,justifyContent:"flex-end"},children:[(0,k.jsx)(ve.A,{color:"secondary",onClick:()=>T({...M,show:!1}),children:"Cancel"}),(0,k.jsx)(ve.A,{color:"info",onClick:()=>{n.Analysis.ProcessingQueued?y((0,k.jsx)(ge.A,{title:"Currently Processing",message:"Cannot update analysis until current queue is finished.",confirmText:"Confirm",handleClose:()=>y(null),handleDeny:()=>y(null),handleConfirm:()=>y(null)})):(w((e=>{let t=Math.min(e.length-1,M.step),n=M.currentStep;return e.splice(t,0,e.splice(n,1)[0]),[...e]})),T({...M,show:!1}))},style:{marginLeft:10},children:"Update"})]})]})]})]})};const Ze=function(e){let{dataToRender:t,height:n,figureTitle:r}=e;const[a,o]=(0,Ae.mv)(),{language:s}=a,[l,c]=i.useState(!1),u=new Ie.s(r,s);i.useEffect((()=>{t&&((e,t)=>{if(u.clearData(),u.fresh){var n=t.ChannelNames.length,r=u.subplots(n,1,{sharex:!0,sharey:!0});for(var i in r)u.setSubtitle(t.ChannelNames[i],r[i]),u.setYlim(t.RecommendedYLimit[i],r[i]);u.setXlabel(`${(0,Se.d)(Se.z.FigureStandardText,"Time",s)} (${(0,Se.d)(Se.z.FigureStandardUnit,"Local",s)})`,{fontSize:15},r[r.length-1])}for(var i in e)for(var a in e[i].ChannelNames){var o=Array(e[i].Data.length).fill(0).map(((t,n)=>new Date(1e3*e[i].StartTime+1e3*n/e[i].SamplingRate)));for(var l in r){if(!r[l].title){r[l].title=e[i].ChannelNames[a],u.plot(o,e[i].Data.map((e=>e[a])),{linewidth:.5,hovertemplate:" %{y:.2f} "},r[l]);break}if(r[l].title==e[i].ChannelNames[a]){u.plot(o,e[i].Data.map((e=>e[a])),{linewidth:.5,hovertemplate:" %{y:.2f} "},r[l]);break}}}e?(u.render(),c(!0)):(u.purge(),c(!1))})(t.Data,t.GraphOptions,t.RecordingInfo)}),[t,s]);const d=(0,i.useCallback)((()=>{u.refresh()}),[]),{ref:h}=(0,Le.uZ)({onResize:d,refreshMode:"debounce",refreshRate:50,skipOnMount:!1});return(0,k.jsx)(ye.A,{ref:h,id:r,style:{marginTop:5,marginBottom:10,height:n,width:"100%",display:l?"":"none"}})};const Ke=function(e){let{data:t}=e;(0,a.Zp)();const[n,r]=(0,Ae.mv)(),{patientID:i,language:o}=n;return 0==Object.keys(t).length?null:"TimeDomain"==t.RecordingInfo.type?(0,k.jsx)(Ze,{dataToRender:t,height:700,figureTitle:"TimeDomainFigure"}):null},Je=(0,Pe.Z)();const Qe=function(e){let{analysisId:t,analysisData:n}=e;const r=(0,a.Zp)(),[l,c]=(0,Ae.mv)(),{patientID:d,language:h}=l,[f,p]=(0,i.useState)(!1),[m,g]=(0,i.useState)({}),[v,y]=(0,i.useState)([]),[x,b]=(0,i.useState)(null),[_,w]=(0,i.useState)(null);return(0,i.useEffect)((()=>{d?(p(n),y(n.Configuration.Results.map((e=>({type:e.Type,key:e.ProcessedData,title:"["+e.Type+"] "+e.ResultLabel,value:e.ProcessedData}))))):r("/dashboard",{replace:!1})}),[d,t,n]),(0,i.useEffect)((()=>{}),[x]),f?(0,k.jsxs)(s.A,{width:"100%",style:{paddingTop:15,paddingBottom:15,paddingLeft:15,paddingRight:15},children:[_,(0,k.jsxs)(ye.A,{children:[(0,k.jsxs)(xe.A,{fontWeight:"bold",fontSize:30,children:[f.Analysis.AnalysisName," "," - Result Viewer"]}),(0,k.jsxs)(xe.A,{fontSize:18,children:["Last Modified: ",new Date(1e3*f.Analysis.AnalysisDate).toLocaleDateString()]})]}),(0,k.jsx)(ye.A,{pt:2,children:(0,k.jsxs)(o.Ay,{container:!0,spacing:3,children:[(0,k.jsx)(o.Ay,{item:!0,xs:12}),(0,k.jsx)(o.Ay,{item:!0,xs:12,children:(0,k.jsx)(De.A,{selectOnFocus:!0,clearOnBlur:!0,renderInput:e=>(0,k.jsx)(u.A,{...e,variant:"standard",placeholder:"Select Recordings"}),filterOptions:(e,t)=>{const n=Je(e,t),{inputValue:r}=t;return n},getOptionLabel:e=>"string"===typeof e?e:e.inputValue?e.inputValue:e.title,isOptionEqualToValue:(e,t)=>e.value===t.value,renderOption:(e,t)=>(0,k.jsx)("li",{...e,children:t.title}),value:x,options:v,onChange:(e,t)=>b(t),disableClearable:!0})}),(0,k.jsxs)(o.Ay,{item:!0,xs:12,children:[x?(0,k.jsx)(ve.A,{color:"info",onClick:()=>{x&&(w((0,k.jsx)(be.A,{})),we.x.query("/api/queryCustomizedAnalysis",{id:d,requestResult:t,resultId:x.value,download:!0},{},null,"arraybuffer").then((e=>{w(null);const t=window.URL.createObjectURL(new Blob([e.data]));var n=document.createElement("a");n.href=t,n.target="_blank",n.download=x.title,n.click()})).catch((e=>{we.x.displayError(e,w)})))},style:{marginLeft:10},children:"AlignedData"===x.type?"Download":""}):null,(0,k.jsx)(Ke,{data:m})]})]})})]}):null};const et=function(){const e=(0,a.Zp)(),[t,n]=(0,Ae.mv)(),{patientID:r,language:h}=t,[f,p]=(0,i.useState)(!1),[m,g]=(0,i.useState)([]),[v,y]=(0,i.useState)(null),x=(0,i.useRef)();x.current=v;const[b,_]=(0,i.useState)(null),[w,A]=(0,i.useState)({index:0,step:"DataInclusion"}),[S,M]=(0,i.useState)({show:!1,name:""}),[T,E]=(0,i.useState)([]),[C,D]=(0,i.useState)({current:null,list:[]}),[R,P]=(0,i.useState)(null);return(0,i.useEffect)((()=>{let e=new WebSocket(we.x.getServer().replace("http","ws")+"/socket/notification");return e.onerror=function(){console.log("Connection Error")},e.onopen=()=>{},e.onclose=()=>{console.log("Connection Closed")},e.onmessage=e=>{let t=JSON.parse(e.data);"AnalysisUpdate"===t.Notification&&("StartProcessing"===t.State?x.current==t.TaskID&&_((e=>(e.Analysis.ProcessingQueued=!0,{...e}))):"EndProcessing"===t.State&&x.current==t.TaskID&&_((e=>(e.Analysis.ProcessingQueued=!1,e.Configuration.Results=t.Message,{...e}))))},()=>{e.close()}}),[]),(0,i.useEffect)((()=>{r?(P((0,k.jsx)(be.A,{})),we.x.query("/api/queryCustomizedAnalysis",{id:r,requestOverview:!0}).then((e=>{g(e.data),P(null)})).catch((e=>{we.x.displayError(e,P)}))):e("/dashboard",{replace:!1})}),[r]),(0,i.useEffect)((()=>{v&&(P((0,k.jsx)(be.A,{})),A({index:0,step:"DataInclusion"}),we.x.query("/api/queryCustomizedAnalysis",{id:r,requestAnalysis:v}).then((e=>{_(e.data),P(null)})).catch((e=>{we.x.displayError(e,P)})))}),[v]),(0,i.useEffect)((()=>{}),[b]),(0,k.jsxs)(k.Fragment,{children:[R,(0,k.jsx)(_e.A,{children:(0,k.jsxs)(ye.A,{pt:3,children:[(0,k.jsx)(ye.A,{children:(0,k.jsxs)(o.Ay,{container:!0,spacing:2,children:[m.map((e=>(0,k.jsx)(o.Ay,{item:!0,xs:6,md:4,children:(0,k.jsxs)(s.A,{sx:{width:"100%",padding:3,display:"flex",flexDirection:"column",justifyContent:"space-between",alignItems:"start"},children:[(0,k.jsxs)(ye.A,{children:[(0,k.jsx)(xe.A,{fontWeight:"bold",children:e.AnalysisName}),(0,k.jsx)(xe.A,{fontSize:15,children:new Date(1e3*e.AnalysisDate).toLocaleDateString()})]}),(0,k.jsxs)(l.A,{open:S.show,onClose:()=>M({...S,show:!1}),children:[(0,k.jsx)(ye.A,{px:2,pt:2,children:(0,k.jsx)(xe.A,{variant:"h5",children:"Edit Analysis Name"})}),(0,k.jsx)(c.A,{children:(0,k.jsx)(u.A,{variant:"standard",margin:"dense",id:"name",value:S.name,onChange:e=>M({...S,name:e.target.value}),fullWidth:!0})}),(0,k.jsxs)(ye.A,{style:{paddingLeft:15,paddingRight:15,paddingBottom:15},children:[(0,k.jsx)(ve.A,{color:"secondary",onClick:()=>M({...S,show:!1}),children:"Cancel"}),(0,k.jsx)(ve.A,{color:"info",onClick:()=>{return t=e.AnalysisID,void we.x.query("/api/queryCustomizedAnalysis",{editAnalysis:!0,id:r,analysisId:t,name:S.name}).then((e=>{g((e=>{for(let n in e)e[n].AnalysisID==t&&(e[n].AnalysisName=S.name);return[...e]})),v==t&&_((e=>(e.Analysis.AnalysisName=S.name,{...e}))),M({...S,show:!1})})).catch((e=>{we.x.displayError(e,P)}));var t},style:{marginLeft:10},children:"Update"})]})]}),(0,k.jsxs)(ye.A,{children:[(0,k.jsx)(d.A,{color:"info",size:"small",onClick:()=>M({name:e.AnalysisName,show:!0}),sx:{paddingX:1},children:(0,k.jsx)(fe.A,{fontSize:"large"})}),(0,k.jsx)(d.A,{color:"info",size:"small",onClick:()=>y(e.AnalysisID),sx:{paddingX:1},children:(0,k.jsx)(pe.A,{fontSize:"large"})}),(0,k.jsx)(d.A,{color:"error",size:"small",onClick:()=>(e=>{P((0,k.jsx)(ge.A,{title:"Remove Analysis",message:"Are you sure you want to remove the analysis? All configurations for this analysis will be removed and is not recoverable",confirmText:"YES",denyText:"NO",denyButton:!0,handleClose:()=>P(null),handleDeny:()=>P(null),handleConfirm:()=>{we.x.query("/api/queryCustomizedAnalysis",{requestNewAnalysis:!1,id:r,analysisId:e}).then((t=>{g([...m.filter((t=>t.AnalysisID!=e))]),P(null)})).catch((e=>{we.x.displayError(e,P)}))}}))})(e.AnalysisID),sx:{paddingX:1},children:(0,k.jsx)(me.A,{fontSize:"large"})})]})]})},e.AnalysisID))),(0,k.jsx)(o.Ay,{item:!0,xs:6,md:3,children:(0,k.jsx)(s.A,{sx:{width:"100%",height:"100%",borderStyle:"dashed",borderWidth:1,padding:3,justifyContent:"center",alignItems:"center",cursor:"pointer"},onClick:()=>{we.x.query("/api/queryCustomizedAnalysis",{requestNewAnalysis:!0,id:r}).then((e=>{g([...m,e.data]),P(null)})).catch((e=>{we.x.displayError(e,P)}))},children:(0,k.jsx)(xe.A,{children:"Add New Analysis"})})})]})}),v?(0,k.jsx)(ye.A,{pt:3,children:(0,k.jsx)(I,{nonLinear:!0,activeStep:w.index,children:[{label:"Data Inclusion",value:"DataInclusion"},{label:"Precise Time Alignment",value:"TimeAlignment",optional:!0},{label:"Analysis Processing",value:"AnalysisProcessing"},{label:"View Current Results",value:"ViewResult"}].map(((e,t)=>(0,k.jsx)(B,{completed:!1,children:(0,k.jsx)(he,{optional:e.optional?(0,k.jsx)(xe.A,{variant:"caption",children:"Optional"}):null,onClick:()=>{((e,t)=>{A({index:t,step:e})})(e.value,t)},children:e.label})},e.value)))})}):null,v&&b&&"DataInclusion"==w.step?(0,k.jsx)(ye.A,{pt:3,children:(0,k.jsx)(Fe,{analysisId:v,analysisData:b,updateAnalysisData:e=>{_({...e})}})}):null,v&&b&&"TimeAlignment"==w.step?(0,k.jsx)(ye.A,{pt:3,children:(0,k.jsx)(Ve,{analysisId:v,analysisData:b,updateAnalysisData:e=>{_({...e})}})}):null,v&&b&&"AnalysisProcessing"==w.step?(0,k.jsx)(ye.A,{pt:3,children:(0,k.jsx)(Xe,{analysisId:v,analysisData:b,updateProcessingSteps:e=>{_((t=>(t.Configuration.AnalysisSteps=e,{...t})))},updateProcessingResult:e=>{_((t=>(t.Configuration.Results=e,{...t})))}})}):null,v&&b&&"ViewResult"==w.step?(0,k.jsx)(ye.A,{pt:3,children:(0,k.jsx)(Qe,{analysisId:v,analysisData:b})}):null]})})]})},tt={name:"CustomizedAnalysis",key:"analysis",icon:(0,k.jsx)(r.A,{style:{color:"white",margin:0,padding:0}}),route:"/experimental/analysis",component:(0,k.jsx)(et,{}),identified:!0,deidentified:!0}},60186:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>I});var r=n(65471),i=n(44414);const a=(0,r.A)((0,i.jsx)("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}),"Photo");var o=n(9950),s=n(13564),l=n(60899),c=n(48089),u=n(53984),d=n(57357),h=n(14195),f=n(83563),p=n(25333),m=n(72362),g=n(96583),v=n(28170),y=n(29925);const x=(0,r.A)((0,i.jsx)("path",{d:"m18.25 7.6-5.5-3.18c-.46-.27-1.04-.27-1.5 0L5.75 7.6c-.46.27-.75.76-.75 1.3v6.35c0 .54.29 1.03.75 1.3l5.5 3.18c.46.27 1.04.27 1.5 0l5.5-3.18c.46-.27.75-.76.75-1.3V8.9c0-.54-.29-1.03-.75-1.3zM7 14.96v-4.62l4 2.32v4.61l-4-2.31zm5-4.03L8 8.61l4-2.31 4 2.31-4 2.32zm1 6.34v-4.61l4-2.32v4.62l-4 2.31zM7 2H3.5C2.67 2 2 2.67 2 3.5V7h2V4h3V2zm10 0h3.5c.83 0 1.5.67 1.5 1.5V7h-2V4h-3V2zM7 22H3.5c-.83 0-1.5-.67-1.5-1.5V17h2v3h3v2zm10 0h3.5c.83 0 1.5-.67 1.5-1.5V17h-2v3h-3v2z"}),"ViewInAr");var b=n(74864),_=n(25825),w=n(13437),A=n(75468),S=n(35277),M=(n(29144),n(49989)),T=n(52498),k=(n(47513),n(39409),n(13792)),E=(n(52688),n(2588)),C=n(80419),D=n(88745),R=n(20572),P=n(7774),O=n(50160);const L=function(){const e=(0,s.Zp)(),[t,n]=(0,P.mv)(),{patientID:r,language:a}=t,[L,I]=(0,o.useState)(!1),[z,N]=o.useState([]),[F,B]=o.useState([]),[j,U]=o.useState({}),[V,H]=(0,o.useState)({show:!1}),[W,G]=o.useState({item:""}),[q,Y]=o.useState({show:!1,item:"",targetPoint:[0,0,0],entryPoint:[10,10,10]}),[$,X]=o.useState(!1),[Z,K]=o.useState(null),[J,Q]=(0,o.useState)(null);(0,o.useEffect)((()=>{const e=new w.Matrix4;e.set(1,0,0,0,0,0,1,0,0,-1,0,0,0,0,0,1),K(e)}),[]),(0,o.useEffect)((()=>{r?(Q((0,i.jsx)(E.A,{})),R.x.query("/api/queryImageDirectory",{id:r}).then((e=>{N(e.data.availableModels),U(e.data.descriptor),Q(null)})).catch((e=>{R.x.displayError(e,Q)}))):e("/dashboard",{replace:!1})}),[r]),(0,o.useEffect)((()=>{}),[z,j]);const ee=e=>{for(var t in z)if(z[t].file==e.file)return t},te=async(e,t)=>{if(e.downloaded){for(var n in F)F[n].filename==e.file&&(F[n].show=!F[n].show);B([...F])}else{const i=await(0,C.fW)(r,e,t);if("electrode"===e.type){for(var n in F)"electrode"==F[n].type&&0}const a=ee(e);z[a].downloaded=!0,N(z),B([...F,...i])}H({...V,show:!1})},ne=()=>{X((e=>!e))};return(0,i.jsxs)(i.Fragment,{children:[J,(0,i.jsx)(D.A,{children:(0,i.jsxs)(M.A,{pt:3,children:[(0,i.jsx)(M.A,{children:(0,i.jsx)(l.Ay,{container:!0,spacing:2,children:(0,i.jsx)(l.Ay,{item:!0,xs:12,children:(0,i.jsx)(c.A,{sx:{width:"100%"},children:(0,i.jsxs)(l.Ay,{container:!0,children:[(0,i.jsxs)(l.Ay,{item:!0,xs:12,children:[(0,i.jsxs)(M.A,{display:"flex",justifyContent:"space-between",p:2,children:[(0,i.jsx)(T.A,{variant:"h6",fontSize:24,children:O.z.ImageVisualization.Title[a]}),(0,i.jsx)(M.A,{display:"flex",flexDirection:"column",children:(0,i.jsx)(k.A,{size:"medium",variant:"contained",color:"info",onClick:()=>H({...V,show:!0}),children:(0,O.d)(O.z.ImageVisualization,"AddItem",a)})})]}),(0,i.jsx)(u.A,{open:V.show,onClose:()=>H({...V,show:!1}),children:(0,i.jsxs)(M.A,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:400,maxHeight:600,overflow:"auto",bgcolor:"background.paper",border:"2px solid #000",boxShadow:24,p:4},children:[(0,i.jsx)(T.A,{variant:"h6",component:"h2",children:"Add Objects or Tracts"}),(0,i.jsx)(M.A,{children:(0,i.jsx)(l.Ay,{container:!0,spacing:2,children:z.map((e=>(0,i.jsx)(l.Ay,{item:!0,xs:12,style:{background:e.show?"#a2cf6e":""},children:(0,i.jsxs)(d.A,{onClick:()=>te(e),children:[(0,i.jsxs)(h.A,{children:["stl"===e.type?(0,i.jsx)(x,{}):null,"points"===e.type?(0,i.jsx)(b.A,{}):null,"tracts"===e.type?(0,i.jsx)(b.A,{}):null,"electrode"===e.type?(0,i.jsx)(x,{}):null]}),(0,i.jsx)(f.A,{primary:e.file})]})},e.file)))})})]})})]}),(0,i.jsx)(l.Ay,{item:!0,xs:12,children:(0,i.jsx)(l.Ay,{container:!0,children:z.map((e=>{let t=null;for(let n in F)F[n].filename==e.file&&(t=F[n]);return(0,i.jsx)(l.Ay,{item:!0,xs:12,sm:6,md:4,children:(0,i.jsxs)(M.A,{px:2,style:{display:"flex",flexDirection:"row",alignItems:"center"},children:[t?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(p.A,{style:{padding:0,marginRight:3,borderStyle:"solid",borderColor:"#000000",borderWidth:1,height:"100%"},onClick:t=>G({item:e.file,anchorEl:t.currentTarget}),children:(0,i.jsx)("img",{style:{background:t.color,padding:8,borderRadius:"50%"}})}),(0,i.jsx)(m.Ay,{open:W.item==e.file,onClose:()=>G({item:"",anchorEl:null}),anchorEl:W.anchorEl,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},PaperProps:{sx:{boxShadow:"none"}},children:(0,i.jsx)(_.W$,{color:t.color,onChange:t=>((e,t)=>{for(var n in F)if(F[n].filename==e){F[n].color=t.hex;break}B([...F])})(e.file,t)})})]}):null,(0,i.jsx)(T.A,{variant:"h6",fontSize:15,color:t?"dark":"light",style:{cursor:"pointer"},onClick:()=>te(e),children:e.file}),t?(0,i.jsx)(p.A,{variant:"contained",color:t.show?"info":"light",onClick:()=>te(e),children:(0,i.jsx)(S.Ny1,{fontSize:10})}):null,t&&"electrode"===e.type?(0,i.jsx)(p.A,{variant:"contained",color:"info",onClick:()=>Y({item:e.file,targetPoint:e.targetPt,entryPoint:e.entryPt,show:!0}),children:(0,i.jsx)(S.F7,{fontSize:10})}):null,t&&"volume"===e.type?(0,i.jsx)(p.A,{variant:"contained",color:$?"light":"info",onClick:ne,children:(0,i.jsx)(S.F7,{fontSize:10})}):null]})})}))})}),(0,i.jsx)(l.Ay,{item:!0,xs:12,children:(0,i.jsx)(M.A,{p:2,children:(0,i.jsxs)(A.Hl,{style:{height:"100%",height:"80vh",background:"#000000"},children:[(0,i.jsx)(C.mL,{cameraLock:$}),(0,i.jsx)(C.gq,{length:50,origin:[300,-300,-150]}),(0,i.jsx)(C.pl,{x:-100,y:-100,z:-100,color:16777215,intensity:.5}),(0,i.jsx)(C.pl,{x:100,y:100,z:100,color:16777215,intensity:.5}),(0,i.jsx)("hemisphereLight",{args:[16777215,16777215,.2],color:3376639,groundColor:16763008,position:[0,100,0]}),(0,i.jsx)("hemisphereLight",{args:[16777215,16777215,.2],color:3376639,groundColor:16763008,position:[0,-100,0]}),(0,i.jsx)("group",{matrixAutoUpdate:!1,matrix:Z,children:F.map((e=>{if(e.data&&e.show){if("stl"===e.type)return(0,i.jsx)(C.Kx,{geometry:e.data,material:{color:e.color,specular:1118481,shininess:200,opacity:.8},matrix:e.matrix},e.filename);if("electrode"===e.type){let t=(0,C.CG)(e.targetPts,e.entryPts);return(0,i.jsx)("group",{children:e.data.map(((n,r)=>(0,i.jsx)(C.Kx,{geometry:n,material:{color:e.subname[r].endsWith("shaft.stl")?e.color:"#FFFFFF",specular:1118481,shininess:200,opacity:e.opacity},matrix:t},e.subname[r])))},e.filename)}if("sphere"===e.type)return e.data.map(((t,n)=>(0,i.jsx)(C.rQ,{pointArray:t,color:e.color,size:.5,matrix:e.matrix},e.filename)));if("points"===e.type)return e.data.map(((t,n)=>(0,i.jsx)(C.vD,{pointArray:t,color:e.color,linewidth:e.thickness,matrix:e.matrix},e.filename+n)));if("tracts"===e.type)return e.data.map(((t,n)=>(0,i.jsx)(C.vD,{pointArray:t,color:e.color,linewidth:e.thickness,matrix:e.matrix},e.filename+n)));if("volume"===e.type)return(0,i.jsx)(C.Qm,{data:e.data,matrix:Z,cameraLock:$},e.filename)}}))})]})})})]})})})})}),(0,i.jsxs)(g.A,{open:q.show,onClose:()=>Y({...q,show:!1}),children:[(0,i.jsxs)(M.A,{px:2,pt:2,children:[(0,i.jsx)(T.A,{variant:"h5",children:"Edit Electrode Target/Entry Points"}),(0,i.jsx)(T.A,{variant:"p",fontSize:24,children:q.item})]}),(0,i.jsxs)(v.A,{style:{minWidth:500},children:[(0,i.jsx)(M.A,{style:{display:"flex",flexDirection:"row"},children:q.targetPoint.map(((e,t)=>(0,i.jsx)(y.A,{variant:"standard",margin:"dense",value:q.targetPoint[t],onChange:e=>Y((n=>(n.targetPoint[t]=e.target.value,{...n}))),label:"Target Position "+["x","y","z"][t]+":",type:"number",autoComplete:"off",fullWidth:!0})))}),(0,i.jsx)(M.A,{style:{display:"flex",flexDirection:"row"},children:q.entryPoint.map(((e,t)=>(0,i.jsx)(y.A,{variant:"standard",margin:"dense",value:q.entryPoint[t],onChange:e=>Y((n=>(n.entryPoint[t]=e.target.value,{...n}))),label:"Entry Position "+["x","y","z"][t]+":",type:"number",autoComplete:"off",fullWidth:!0})))})]}),(0,i.jsxs)(M.A,{px:2,py:2,style:{display:"flex",justifyContent:"flex-end"},children:[(0,i.jsx)(k.A,{variant:"gradient",color:"secondary",onClick:()=>Y({...q,show:!1}),children:"Cancel"}),(0,i.jsx)(k.A,{variant:"gradient",color:"success",style:{marginLeft:10},onClick:()=>{B((e=>{for(let t in e)e[t].filename==q.file&&(e[t].targetPts=q.targetPoint.map((e=>parseFloat(e))),e[t].entryPts=q.entryPoint.map((e=>parseFloat(e))));return[...e]})),Y({...q,show:!1})},children:"Update"})]})]})]})})]})},I={name:"ImageVisualization",key:"visualize",icon:(0,i.jsx)(a,{style:{color:"white",margin:0,padding:0}}),route:"/experimental/visualize",component:(0,i.jsx)(L,{}),identified:!0,deidentified:!0}},49574:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>vl});var r,i,a,o,s,l,c,u,d=n(69920),h=n(9950),f=n(13564),p=n(96583),m=n(28170),g=n(60899),v=n(82321),y=n(25333),x=n(48089),b=n(2334),_=n(35277),w=n(17119),A={},S=[],M=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function T(e,t){for(var n in t)e[n]=t[n];return e}function k(e){var t=e.parentNode;t&&t.removeChild(e)}function E(e,t,n){var i,a,o,s={};for(o in t)"key"==o?i=t[o]:"ref"==o?a=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?r.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===s[o]&&(s[o]=e.defaultProps[o]);return C(e,s,i,a,null)}function C(e,t,n,r,o){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++a:o};return null==o&&null!=i.vnode&&i.vnode(s),s}function D(e){return e.children}function R(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||M.test(t)?n:n+"px"}function P(e,t,n,r,i){var a;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||R(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||R(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])a=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=n,n?r||e.addEventListener(t,a?L:O,a):e.removeEventListener(t,a?L:O,a);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&-1==t.indexOf("-")?e.removeAttribute(t):e.setAttribute(t,n))}}function O(e){o=!0;try{return this.l[e.type+!1](i.event?i.event(e):e)}finally{o=!1}}function L(e){o=!0;try{return this.l[e.type+!0](i.event?i.event(e):e)}finally{o=!1}}function I(e,t){this.props=e,this.context=t}function z(e,t){if(null==t)return e.__?z(e.__,e.__.__k.indexOf(e)+1):null;for(var n;tt&&s.sort((function(e,t){return e.__v.__b-t.__v.__b})));j.__r=0}function U(e,t,n,r,i,a,o,s,l,c){var u,d,h,f,p,m,g,v=r&&r.__k||S,y=v.length;for(n.__k=[],u=0;u0?C(f.type,f.props,f.key,f.ref?f.ref:null,f.__v):f)){if(f.__=n,f.__b=n.__b+1,null===(h=v[u])||h&&f.key==h.key&&f.type===h.type)v[u]=void 0;else for(d=0;d=0;t--)if((n=e.__k[t])&&(r=G(n)))return r;return null}function q(e,t,n,r,a,o,s,l,c){var u,d,h,f,p,m,g,v,y,x,b,_,w,A,S,M=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(c=n.__h,l=t.__e=n.__e,t.__h=null,o=[l]),(u=i.__b)&&u(t);try{e:if("function"==typeof M){if(v=t.props,y=(u=M.contextType)&&r[u.__c],x=u?y?y.props.value:u.__:r,n.__c?g=(d=t.__c=n.__c).__=d.__E:("prototype"in M&&M.prototype.render?t.__c=d=new M(v,x):(t.__c=d=new I(v,x),d.constructor=M,d.render=K),y&&y.sub(d),d.props=v,d.state||(d.state={}),d.context=x,d.__n=r,h=d.__d=!0,d.__h=[],d._sb=[]),null==d.__s&&(d.__s=d.state),null!=M.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=T({},d.__s)),T(d.__s,M.getDerivedStateFromProps(v,d.__s))),f=d.props,p=d.state,d.__v=t,h)null==M.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==M.getDerivedStateFromProps&&v!==f&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(v,x),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(v,d.__s,x)||t.__v===n.__v){for(t.__v!==n.__v&&(d.props=v,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),b=0;b3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(e)}}),J(E(ke,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Ce(e,t){var n=E(Ee,{__v:e,i:t});return n.containerInfo=t,n}(Me.prototype=new I).__a=function(e){var t=this,n=Se(t.__v),r=t.o.get(e);return r[0]++,function(i){var a=function(){t.props.revealOrder?(r.push(i),Te(t,e,r)):i()};n?n(a):a()}},Me.prototype.render=function(e){this.u=null,this.o=new Map;var t=H(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},Me.prototype.componentDidUpdate=Me.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){Te(e,n,t)}))};var De="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Re=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Pe="undefined"!=typeof document,Oe=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};I.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(I.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var Le=i.event;function Ie(){}function ze(){return this.cancelBubble}function Ne(){return this.defaultPrevented}i.event=function(e){return Le&&(e=Le(e)),e.persist=Ie,e.isPropagationStopped=ze,e.isDefaultPrevented=Ne,e.nativeEvent=e};var Fe={configurable:!0,get:function(){return this.class}},Be=i.vnode;i.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){var i=-1===t.indexOf("-");for(var a in r={},n){var o=n[a];Pe&&"children"===a&&"noscript"===t||"value"===a&&"defaultValue"in n&&null==o||("defaultValue"===a&&"value"in n&&null==n.value?a="value":"download"===a&&!0===o?o="":/ondoubleclick/i.test(a)?a="ondblclick":/^onchange(textarea|input)/i.test(a+t)&&!Oe(n.type)?a="oninput":/^onfocus$/i.test(a)?a="onfocusin":/^onblur$/i.test(a)?a="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(a)?a=a.toLowerCase():i&&Re.test(a)?a=a.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===o&&(o=void 0),/^oninput$/i.test(a)&&(a=a.toLowerCase(),r[a]&&(a="oninputCapture")),r[a]=o)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=H(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=H(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,n.class!=n.className&&(Fe.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",Fe))}e.$$typeof=De,Be&&Be(e)};var je=i.__r;i.__r=function(e){je&&je(e),e.__c};const Ue=[],Ve=new Map;function He(e){Ue.push(e),Ve.forEach((t=>{Ge(t,e)}))}function We(e){let t=Ve.get(e);if(!t||!t.isConnected){if(t=e.querySelector("style[data-fullcalendar]"),!t){t=document.createElement("style"),t.setAttribute("data-fullcalendar","");const n=function(){void 0===qe&&(qe=function(){const e=document.querySelector('meta[name="csp-nonce"]');if(e&&e.hasAttribute("content"))return e.getAttribute("content");const t=document.querySelector("script[nonce]");if(t)return t.nonce||"";return""}());return qe}();n&&(t.nonce=n);const r=e===document?document.head:e,i=e===document?r.querySelector("script,link[rel=stylesheet],link[as=style],style"):r.firstChild;r.insertBefore(t,i)}Ve.set(e,t),function(e){for(const t of Ue)Ge(e,t)}(t)}}function Ge(e,t){const{sheet:n}=e,r=n.cssRules.length;t.split("}").forEach(((e,t)=>{(e=e.trim())&&n.insertRule(e+"}",r+t)}))}let qe;"undefined"!==typeof document&&We(document);function Ye(e){e.parentNode&&e.parentNode.removeChild(e)}function $e(e,t){if(e.closest)return e.closest(t);if(!document.documentElement.contains(e))return null;do{if(Xe(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}function Xe(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector).call(e,t)}He(':root{--fc-small-font-size:.85em;--fc-page-bg-color:#fff;--fc-neutral-bg-color:hsla(0,0%,82%,.3);--fc-neutral-text-color:grey;--fc-border-color:#ddd;--fc-button-text-color:#fff;--fc-button-bg-color:#2c3e50;--fc-button-border-color:#2c3e50;--fc-button-hover-bg-color:#1e2b37;--fc-button-hover-border-color:#1a252f;--fc-button-active-bg-color:#1a252f;--fc-button-active-border-color:#151e27;--fc-event-bg-color:#3788d8;--fc-event-border-color:#3788d8;--fc-event-text-color:#fff;--fc-event-selected-overlay-color:rgba(0,0,0,.25);--fc-more-link-bg-color:#d0d0d0;--fc-more-link-text-color:inherit;--fc-event-resizer-thickness:8px;--fc-event-resizer-dot-total-width:8px;--fc-event-resizer-dot-border-width:1px;--fc-non-business-color:hsla(0,0%,84%,.3);--fc-bg-event-color:#8fdf82;--fc-bg-event-opacity:0.3;--fc-highlight-color:rgba(188,232,241,.3);--fc-today-bg-color:rgba(255,220,40,.15);--fc-now-indicator-color:red}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc{display:flex;flex-direction:column;font-size:1em}.fc,.fc *,.fc :after,.fc :before{box-sizing:border-box}.fc table{border-collapse:collapse;border-spacing:0;font-size:1em}.fc th{text-align:center}.fc td,.fc th{padding:0;vertical-align:top}.fc a[data-navlink]{cursor:pointer}.fc a[data-navlink]:hover{text-decoration:underline}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-theme-standard td,.fc-theme-standard th{border:1px solid var(--fc-border-color)}.fc-liquid-hack td,.fc-liquid-hack th{position:relative}@font-face{font-family:fcicons;font-style:normal;font-weight:400;src:url("data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") format("truetype")}.fc-icon{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-family:fcicons!important;font-style:normal;font-variant:normal;font-weight:400;height:1em;line-height:1;text-align:center;text-transform:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:1em}.fc-icon-chevron-left:before{content:"\\e900"}.fc-icon-chevron-right:before{content:"\\e901"}.fc-icon-chevrons-left:before{content:"\\e902"}.fc-icon-chevrons-right:before{content:"\\e903"}.fc-icon-minus-square:before{content:"\\e904"}.fc-icon-plus-square:before{content:"\\e905"}.fc-icon-x:before{content:"\\e906"}.fc .fc-button{border-radius:0;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}.fc .fc-button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.fc .fc-button{-webkit-appearance:button}.fc .fc-button:not(:disabled){cursor:pointer}.fc .fc-button{background-color:transparent;border:1px solid transparent;border-radius:.25em;display:inline-block;font-size:1em;font-weight:400;line-height:1.5;padding:.4em .65em;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle}.fc .fc-button:hover{text-decoration:none}.fc .fc-button:focus{box-shadow:0 0 0 .2rem rgba(44,62,80,.25);outline:0}.fc .fc-button:disabled{opacity:.65}.fc .fc-button-primary{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:hover{background-color:var(--fc-button-hover-bg-color);border-color:var(--fc-button-hover-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:disabled{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button-primary:not(:disabled).fc-button-active,.fc .fc-button-primary:not(:disabled):active{background-color:var(--fc-button-active-bg-color);border-color:var(--fc-button-active-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:not(:disabled).fc-button-active:focus,.fc .fc-button-primary:not(:disabled):active:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button .fc-icon{font-size:1.5em;vertical-align:middle}.fc .fc-button-group{display:inline-flex;position:relative;vertical-align:middle}.fc .fc-button-group>.fc-button{flex:1 1 auto;position:relative}.fc .fc-button-group>.fc-button.fc-button-active,.fc .fc-button-group>.fc-button:active,.fc .fc-button-group>.fc-button:focus,.fc .fc-button-group>.fc-button:hover{z-index:1}.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px}.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:first-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.fc-direction-rtl .fc-button-group>.fc-button:not(:last-child){border-bottom-left-radius:0;border-top-left-radius:0}.fc .fc-toolbar{align-items:center;display:flex;justify-content:space-between}.fc .fc-toolbar.fc-header-toolbar{margin-bottom:1.5em}.fc .fc-toolbar.fc-footer-toolbar{margin-top:1.5em}.fc .fc-toolbar-title{font-size:1.75em;margin:0}.fc-direction-ltr .fc-toolbar>*>:not(:first-child){margin-left:.75em}.fc-direction-rtl .fc-toolbar>*>:not(:first-child){margin-right:.75em}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc .fc-scroller{-webkit-overflow-scrolling:touch;position:relative}.fc .fc-scroller-liquid{height:100%}.fc .fc-scroller-liquid-absolute{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-scroller-harness{direction:ltr;overflow:hidden;position:relative}.fc .fc-scroller-harness-liquid{height:100%}.fc-direction-rtl .fc-scroller-harness>.fc-scroller{direction:rtl}.fc-theme-standard .fc-scrollgrid{border:1px solid var(--fc-border-color)}.fc .fc-scrollgrid,.fc .fc-scrollgrid table{table-layout:fixed;width:100%}.fc .fc-scrollgrid table{border-left-style:hidden;border-right-style:hidden;border-top-style:hidden}.fc .fc-scrollgrid{border-bottom-width:0;border-collapse:separate;border-right-width:0}.fc .fc-scrollgrid-liquid{height:100%}.fc .fc-scrollgrid-section,.fc .fc-scrollgrid-section table,.fc .fc-scrollgrid-section>td{height:1px}.fc .fc-scrollgrid-section-liquid>td{height:100%}.fc .fc-scrollgrid-section>*{border-left-width:0;border-top-width:0}.fc .fc-scrollgrid-section-footer>*,.fc .fc-scrollgrid-section-header>*{border-bottom-width:0}.fc .fc-scrollgrid-section-body table,.fc .fc-scrollgrid-section-footer table{border-bottom-style:hidden}.fc .fc-scrollgrid-section-sticky>*{background:var(--fc-page-bg-color);position:sticky;z-index:3}.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky>*{top:0}.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky>*{bottom:0}.fc .fc-scrollgrid-sticky-shim{height:1px;margin-bottom:-1px}.fc-sticky{position:sticky}.fc .fc-view-harness{flex-grow:1;position:relative}.fc .fc-view-harness-active>.fc-view{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-col-header-cell-cushion{display:inline-block;padding:2px 4px}.fc .fc-bg-event,.fc .fc-highlight,.fc .fc-non-business{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-non-business{background:var(--fc-non-business-color)}.fc .fc-bg-event{background:var(--fc-bg-event-color);opacity:var(--fc-bg-event-opacity)}.fc .fc-bg-event .fc-event-title{font-size:var(--fc-small-font-size);font-style:italic;margin:.5em}.fc .fc-highlight{background:var(--fc-highlight-color)}.fc .fc-cell-shaded,.fc .fc-day-disabled{background:var(--fc-neutral-bg-color)}a.fc-event,a.fc-event:hover{text-decoration:none}.fc-event.fc-event-draggable,.fc-event[href]{cursor:pointer}.fc-event .fc-event-main{position:relative;z-index:2}.fc-event-dragging:not(.fc-event-selected){opacity:.75}.fc-event-dragging.fc-event-selected{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-event .fc-event-resizer{display:none;position:absolute;z-index:4}.fc-event-selected .fc-event-resizer,.fc-event:hover .fc-event-resizer{display:block}.fc-event-selected .fc-event-resizer{background:var(--fc-page-bg-color);border-color:inherit;border-radius:calc(var(--fc-event-resizer-dot-total-width)/2);border-style:solid;border-width:var(--fc-event-resizer-dot-border-width);height:var(--fc-event-resizer-dot-total-width);width:var(--fc-event-resizer-dot-total-width)}.fc-event-selected .fc-event-resizer:before{bottom:-20px;content:"";left:-20px;position:absolute;right:-20px;top:-20px}.fc-event-selected,.fc-event:focus{box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event-selected:before,.fc-event:focus:before{bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:3}.fc-event-selected:after,.fc-event:focus:after{background:var(--fc-event-selected-overlay-color);bottom:-1px;content:"";left:-1px;position:absolute;right:-1px;top:-1px;z-index:1}.fc-h-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-h-event .fc-event-main{color:var(--fc-event-text-color)}.fc-h-event .fc-event-main-frame{display:flex}.fc-h-event .fc-event-time{max-width:100%;overflow:hidden}.fc-h-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-width:0}.fc-h-event .fc-event-title{display:inline-block;left:0;max-width:100%;overflow:hidden;right:0;vertical-align:top}.fc-h-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end){border-bottom-left-radius:0;border-left-width:0;border-top-left-radius:0}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start){border-bottom-right-radius:0;border-right-width:0;border-top-right-radius:0}.fc-h-event:not(.fc-event-selected) .fc-event-resizer{bottom:0;top:0;width:var(--fc-event-resizer-thickness)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end{cursor:w-resize;left:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start{cursor:e-resize;right:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-h-event.fc-event-selected .fc-event-resizer{margin-top:calc(var(--fc-event-resizer-dot-total-width)*-.5);top:50%}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end{left:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start{right:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc .fc-popover{box-shadow:0 2px 6px rgba(0,0,0,.15);position:absolute;z-index:9999}.fc .fc-popover-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:3px 4px}.fc .fc-popover-title{margin:0 2px}.fc .fc-popover-close{cursor:pointer;font-size:1.1em;opacity:.65}.fc-theme-standard .fc-popover{background:var(--fc-page-bg-color);border:1px solid var(--fc-border-color)}.fc-theme-standard .fc-popover-header{background:var(--fc-neutral-bg-color)}');const Ze=/(top|left|right|bottom|width|height)$/i;function Ke(e,t){for(let n in t)Je(e,n,t[n])}function Je(e,t,n){null==n?e.style[t]="":"number"===typeof n&&Ze.test(t)?e.style[t]=`${n}px`:e.style[t]=n}function Qe(e){var t,n;return null!==(n=null===(t=e.composedPath)||void 0===t?void 0:t.call(e)[0])&&void 0!==n?n:e.target}let et=0;function tt(){return et+=1,"fc-dom-"+et}function nt(e){e.preventDefault()}function rt(e,t,n,r){let i=function(e,t){return n=>{let r=$e(n.target,e);r&&t.call(r,n,r)}}(n,r);return e.addEventListener(t,i),()=>{e.removeEventListener(t,i)}}const it=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];function at(e){return Object.assign({onClick:e},ot(e))}function ot(e){return{tabIndex:0,onKeyDown(t){"Enter"!==t.key&&" "!==t.key||(e(t),t.preventDefault())}}}let st=0;function lt(){return st+=1,String(st)}function ct(){document.body.classList.add("fc-not-allowed")}function ut(){document.body.classList.remove("fc-not-allowed")}function dt(e,t,n){return n.func?n.func(e,t):function(e,t){if(!e&&!t)return 0;if(null==t)return-1;if(null==e)return 1;if("string"===typeof e||"string"===typeof t)return String(e).localeCompare(String(t));return e-t}(e[n.field],t[n.field])*(n.order||1)}function ht(e,t){let n=String(e);return"000".substr(0,t-n.length)+n}function ft(e,t,n){return"function"===typeof e?e(...t):"string"===typeof e?t.reduce(((e,t,n)=>e.replace("$"+n,t||"")),e):n}function pt(e,t){return e-t}function mt(e){return e%1===0}function gt(e){let t=e.querySelector(".fc-scrollgrid-shrink-frame"),n=e.querySelector(".fc-scrollgrid-shrink-cushion");if(!t)throw new Error("needs fc-scrollgrid-shrink-frame className");if(!n)throw new Error("needs fc-scrollgrid-shrink-cushion className");return e.getBoundingClientRect().width-t.getBoundingClientRect().width+n.getBoundingClientRect().width}const vt=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function yt(e,t){return"string"===typeof e?function(e){let t=vt.exec(e);if(t){let e=t[1]?-1:1;return{years:0,months:0,days:e*(t[2]?parseInt(t[2],10):0),milliseconds:e*(60*(t[3]?parseInt(t[3],10):0)*60*1e3+60*(t[4]?parseInt(t[4],10):0)*1e3+1e3*(t[5]?parseInt(t[5],10):0)+(t[6]?parseInt(t[6],10):0))}}return null}(e):"object"===typeof e&&e?xt(e):"number"===typeof e?xt({[t||"milliseconds"]:e}):null}function xt(e){let t={years:e.years||e.year||0,months:e.months||e.month||0,days:e.days||e.day||0,milliseconds:60*(e.hours||e.hour||0)*60*1e3+60*(e.minutes||e.minute||0)*1e3+1e3*(e.seconds||e.second||0)+(e.milliseconds||e.millisecond||e.ms||0)},n=e.weeks||e.week;return n&&(t.days+=7*n,t.specifiedWeeks=!0),t}function bt(e){return _t(e)/864e5}function _t(e){return 31536e6*e.years+2592e6*e.months+864e5*e.days+e.milliseconds}function wt(e){let t=e.milliseconds;if(t){if(t%1e3!==0)return{unit:"millisecond",value:t};if(t%6e4!==0)return{unit:"second",value:t/1e3};if(t%36e5!==0)return{unit:"minute",value:t/6e4};if(t)return{unit:"hour",value:t/36e5}}return e.days?e.specifiedWeeks&&e.days%7===0?{unit:"week",value:e.days/7}:{unit:"day",value:e.days}:e.months?{unit:"month",value:e.months}:e.years?{unit:"year",value:e.years}:{unit:"millisecond",value:0}}const{hasOwnProperty:At}=Object.prototype;function St(e,t){let n={};if(t)for(let r in t)if(t[r]===bn){let t=[];for(let i=e.length-1;i>=0;i-=1){let a=e[i][r];if("object"===typeof a&&a)t.unshift(a);else if(void 0!==a){n[r]=a;break}}t.length&&(n[r]=St(t))}for(let r=e.length-1;r>=0;r-=1){let t=e[r];for(let e in t)e in n||(n[e]=t[e])}return n}function Mt(e,t){let n={};for(let r in e)t(e[r],r)&&(n[r]=e[r]);return n}function Tt(e,t){let n={};for(let r in e)n[r]=t(e[r],r);return n}function kt(e){let t={};for(let n of e)t[n]=!0;return t}function Et(e){let t=[];for(let n in e)t.push(e[n]);return t}function Ct(e,t){if(e===t)return!0;for(let n in e)if(At.call(e,n)&&!(n in t))return!1;for(let n in t)if(At.call(t,n)&&e[n]!==t[n])return!1;return!0}const Dt=/^on[A-Z]/;function Rt(e,t){let n=[];for(let r in e)At.call(e,r)&&(r in t||n.push(r));for(let r in t)At.call(t,r)&&e[r]!==t[r]&&n.push(r);return n}function Pt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e===t)return!0;for(let r in t)if(!(r in e)||!Ot(e[r],t[r],n[r]))return!1;for(let r in e)if(!(r in t))return!1;return!0}function Ot(e,t,n){return e===t||!0===n||!!n&&n(e,t)}function Lt(e,t,n){if(e===t)return!0;let r,i=e.length;if(i!==t.length)return!1;for(r=0;r1&&void 0!==arguments[1]&&arguments[1],n=e<0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),a=Math.round(r%60);return t?`${n+ht(i,2)}:${ht(a,2)}`:`GMT${n}${i}${a?`:${ht(a,2)}`:""}`}function Jt(e,t,n){let r,i;return function(){for(var a=arguments.length,o=new Array(a),s=0;s{if(r){if(!Ct(r,a)){n&&n(i);let r=e.call(this,a);t&&t(r,i)||(i=r)}}else i=e.call(this,a);return r=a,i}}const en={week:3,separator:0,omitZeroMinute:0,meridiem:0,omitCommas:0},tn={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},nn=/\s*([ap])\.?m\.?/i,rn=/,/g,an=/\s+/g,on=/\u200e/g,sn=/UTC|GMT/;class ln{constructor(e){let t={},n={},r=0;for(let i in e)i in en?(n[i]=e[i],r=Math.max(en[i],r)):(t[i]=e[i],i in tn&&(r=Math.max(tn[i],r)));this.standardDateProps=t,this.extendedSettings=n,this.severity=r,this.buildFormattingFunc=Jt(cn)}format(e,t){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,t)(e)}formatRange(e,t,n,r){let{standardDateProps:i,extendedSettings:a}=this,o=function(e,t,n){if(n.getMarkerYear(e)!==n.getMarkerYear(t))return 5;if(n.getMarkerMonth(e)!==n.getMarkerMonth(t))return 4;if(n.getMarkerDay(e)!==n.getMarkerDay(t))return 2;if(Xt(e)!==Xt(t))return 1;return 0}(e.marker,t.marker,n.calendarSystem);if(!o)return this.format(e,n);let s=o;!(s>1)||"numeric"!==i.year&&"2-digit"!==i.year||"numeric"!==i.month&&"2-digit"!==i.month||"numeric"!==i.day&&"2-digit"!==i.day||(s=1);let l=this.format(e,n),c=this.format(t,n);if(l===c)return l;let u=cn(function(e,t){let n={};for(let r in e)(!(r in tn)||tn[r]<=t)&&(n[r]=e[r]);return n}(i,s),a,n),d=u(e),h=u(t),f=function(e,t,n,r){let i=0;for(;iKt(e.timeZoneOffset):0===r&&t.week?e=>function(e,t,n,r,i){let a=[];"long"===i?a.push(n):"short"!==i&&"narrow"!==i||a.push(t);"long"!==i&&"short"!==i||a.push(" ");a.push(r.simpleNumberFormat.format(e)),"rtl"===r.options.direction&&a.reverse();return a.join("")}(n.computeWeekNumber(e.marker),n.weekText,n.weekTextLong,n.locale,t.week):function(e,t,n){e=Object.assign({},e),t=Object.assign({},t),function(e,t){e.timeZoneName&&(e.hour||(e.hour="2-digit"),e.minute||(e.minute="2-digit"));"long"===e.timeZoneName&&(e.timeZoneName="short");t.omitZeroMinute&&(e.second||e.millisecond)&&delete t.omitZeroMinute}(e,t),e.timeZone="UTC";let r,i=new Intl.DateTimeFormat(n.locale.codes,e);if(t.omitZeroMinute){let t=Object.assign({},e);delete t.minute,r=new Intl.DateTimeFormat(n.locale.codes,t)}return a=>{let o,{marker:s}=a;return o=r&&!s.getUTCMinutes()?r:i,function(e,t,n,r,i){e=e.replace(on,""),"short"===n.timeZoneName&&(e=function(e,t){let n=!1;e=e.replace(sn,(()=>(n=!0,t))),n||(e+=` ${t}`);return e}(e,"UTC"===i.timeZone||null==t.timeZoneOffset?"UTC":Kt(t.timeZoneOffset)));r.omitCommas&&(e=e.replace(rn,"").trim());r.omitZeroMinute&&(e=e.replace(":00",""));!1===r.meridiem?e=e.replace(nn,"").trim():"narrow"===r.meridiem?e=e.replace(nn,((e,t)=>t.toLocaleLowerCase())):"short"===r.meridiem?e=e.replace(nn,((e,t)=>`${t.toLocaleLowerCase()}m`)):"lowercase"===r.meridiem&&(e=e.replace(nn,(e=>e.toLocaleLowerCase())));return e=e.replace(an," "),e=e.trim(),e}(o.format(s),a,e,t,n)}}(e,t,n)}function un(e,t){let n=t.markerToArray(e.marker);return{marker:e.marker,timeZoneOffset:e.timeZoneOffset,array:n,year:n[0],month:n[1],day:n[2],hour:n[3],minute:n[4],second:n[5],millisecond:n[6]}}function dn(e,t,n,r){let i=un(e,n.calendarSystem);return{date:i,start:i,end:t?un(t,n.calendarSystem):null,timeZone:n.timeZone,localeCodes:n.locale.codes,defaultSeparator:r||n.defaultSeparator}}class hn{constructor(e){this.cmdStr=e}format(e,t,n){return t.cmdFormatter(this.cmdStr,dn(e,null,t,n))}formatRange(e,t,n,r){return n.cmdFormatter(this.cmdStr,dn(e,t,n,r))}}class fn{constructor(e){this.func=e}format(e,t,n){return this.func(dn(e,null,t,n))}formatRange(e,t,n,r){return this.func(dn(e,t,n,r))}}function pn(e){return"object"===typeof e&&e?new ln(e):"string"===typeof e?new hn(e):"function"===typeof e?new fn(e):null}const mn={navLinkDayClick:Mn,navLinkWeekClick:Mn,duration:yt,bootstrapFontAwesome:Mn,buttonIcons:Mn,customButtons:Mn,defaultAllDayEventDuration:yt,defaultTimedEventDuration:yt,nextDayThreshold:yt,scrollTime:yt,scrollTimeReset:Boolean,slotMinTime:yt,slotMaxTime:yt,dayPopoverFormat:pn,slotDuration:yt,snapDuration:yt,headerToolbar:Mn,footerToolbar:Mn,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:pn,dayHeaderClassNames:Mn,dayHeaderContent:Mn,dayHeaderDidMount:Mn,dayHeaderWillUnmount:Mn,dayCellClassNames:Mn,dayCellContent:Mn,dayCellDidMount:Mn,dayCellWillUnmount:Mn,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:Mn,weekNumbers:Boolean,weekNumberClassNames:Mn,weekNumberContent:Mn,weekNumberDidMount:Mn,weekNumberWillUnmount:Mn,editable:Boolean,viewClassNames:Mn,viewDidMount:Mn,viewWillUnmount:Mn,nowIndicator:Boolean,nowIndicatorClassNames:Mn,nowIndicatorContent:Mn,nowIndicatorDidMount:Mn,nowIndicatorWillUnmount:Mn,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:Mn,locale:Mn,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:Mn,eventOrder:function(e){let t,n,r=[],i=[];for("string"===typeof e?i=e.split(/\s*,\s*/):"function"===typeof e?i=[e]:Array.isArray(e)&&(i=e),t=0;t!o[e.defId].recurringDef));for(let l in o){let e=o[l];if(e.recurringDef){let{duration:n}=e.recurringDef;n||(n=e.allDay?a.defaultAllDayEventDuration:a.defaultTimedEventDuration);let o=En(e,n,t,r,i.recurringTypes);for(let e of o){let t=Tn(l,{start:e,end:r.add(e,n)});s[t.instanceId]=t}}}return{defs:o,instances:s}}function En(e,t,n,r,i){let a=i[e.recurringDef.typeId].expand(e.recurringDef.typeData,{start:r.subtract(n.start,t),end:n.end},r);return e.allDay&&(a=a.map(Ut)),a}function Cn(e,t,n,r,i,a){let o={defs:{},instances:{}},s=Gn(n);for(let l of e){let e=Hn(l,t,n,r,s,i,a);e&&Dn(e,o)}return o}function Dn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{defs:{},instances:{}};return t.defs[e.def.defId]=e.def,e.instance&&(t.instances[e.instance.instanceId]=e.instance),t}function Rn(e,t){let n=e.instances[t];if(n){let t=e.defs[n.defId],r=On(e,(e=>{return n=t,r=e,Boolean(n.groupId&&n.groupId===r.groupId);var n,r}));return r.defs[t.defId]=t,r.instances[n.instanceId]=n,r}return{defs:{},instances:{}}}function Pn(e,t){return{defs:Object.assign(Object.assign({},e.defs),t.defs),instances:Object.assign(Object.assign({},e.instances),t.instances)}}function On(e,t){let n=Mt(e.defs,t),r=Mt(e.instances,(e=>n[e.defId]));return{defs:n,instances:r}}function Ln(e){return Array.isArray(e)?e:"string"===typeof e?e.split(/\s+/):[]}const In={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:Mn,overlap:Mn,allow:Mn,className:Ln,classNames:Ln,color:String,backgroundColor:String,borderColor:String,textColor:String},zn={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]};function Nn(e,t){let n=function(e,t){return Array.isArray(e)?Cn(e,null,t,!0):"object"===typeof e&&e?Cn([e],null,t,!0):null!=e?String(e):null}(e.constraint,t);return{display:e.display||null,startEditable:null!=e.startEditable?e.startEditable:e.editable,durationEditable:null!=e.durationEditable?e.durationEditable:e.editable,constraints:null!=n?[n]:[],overlap:null!=e.overlap?e.overlap:null,allows:null!=e.allow?[e.allow]:[],backgroundColor:e.backgroundColor||e.color||"",borderColor:e.borderColor||e.color||"",textColor:e.textColor||"",classNames:(e.className||[]).concat(e.classNames||[])}}function Fn(e){return e.reduce(Bn,zn)}function Bn(e,t){return{display:null!=t.display?t.display:e.display,startEditable:null!=t.startEditable?t.startEditable:e.startEditable,durationEditable:null!=t.durationEditable?t.durationEditable:e.durationEditable,constraints:e.constraints.concat(t.constraints),overlap:"boolean"===typeof t.overlap?t.overlap:e.overlap,allows:e.allows.concat(t.allows),backgroundColor:t.backgroundColor||e.backgroundColor,borderColor:t.borderColor||e.borderColor,textColor:t.textColor||e.textColor,classNames:e.classNames.concat(t.classNames)}}const jn={id:String,groupId:String,title:String,url:String,interactive:Boolean},Un={start:Mn,end:Mn,date:Mn,allDay:Boolean},Vn=Object.assign(Object.assign(Object.assign({},jn),Un),{extendedProps:Mn});function Hn(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Gn(n),a=arguments.length>5?arguments[5]:void 0,o=arguments.length>6?arguments[6]:void 0,{refined:s,extra:l}=Wn(e,n,i),c=function(e,t){let n=null;e&&(n=e.defaultAllDay);null==n&&(n=t.options.defaultAllDay);return n}(t,n),u=function(e,t,n,r){for(let i=0;i2&&void 0!==arguments[2]?arguments[2]:Gn(t))}function Gn(e){return Object.assign(Object.assign(Object.assign({},In),Vn),e.pluginHooks.eventRefiners)}function qn(e,t,n,r,i,a,o){let s={title:e.title||"",groupId:e.groupId||"",publicId:e.id||"",url:e.url||"",recurringDef:null,defId:(o&&e.id?o[e.id]:"")||lt(),sourceId:n,allDay:r,hasEnd:i,interactive:e.interactive,ui:Nn(e,a),extendedProps:Object.assign(Object.assign({},e.extendedProps||{}),t)};for(let l of a.pluginHooks.eventDefMemberAdders)Object.assign(s,l(e));return Object.freeze(s.ui.classNames),Object.freeze(s.extendedProps),s}const Yn={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function $n(e,t){return Cn(function(e){let t;t=!0===e?[{}]:Array.isArray(e)?e.filter((e=>e.daysOfWeek)):"object"===typeof e&&e?[e]:[];return t=t.map((e=>Object.assign(Object.assign({},Yn),e))),t}(e),null,t)}function Xn(e){let t=Math.floor(Bt(e.start,e.end))||1,n=Ut(e.start);return{start:n,end:Nt(n,t)}}function Zn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yt(0),n=null,r=null;if(e.end){r=Ut(e.end);let n=e.end.valueOf()-r.valueOf();n&&n>=_t(t)&&(r=Nt(r,1))}return e.start&&(n=Ut(e.start),r&&r<=n&&(r=Nt(n,1))),{start:n,end:r}}function Kn(e,t,n,r){return"year"===r?yt(n.diffWholeYears(e,t),"year"):"month"===r?yt(n.diffWholeMonths(e,t),"month"):function(e,t){let n=Ut(e),r=Ut(t);return{years:0,months:0,days:Math.round(Bt(n,r)),milliseconds:t.valueOf()-r.valueOf()-(e.valueOf()-n.valueOf())}}(e,t)}function Jn(e,t){return e.left>=t.left&&e.left=t.top&&e.top
",e.querySelector("table").style.height="100px",e.querySelector("div").style.height="100%",document.body.appendChild(e);let t=e.querySelector("div").offsetHeight>0;return document.body.removeChild(e),t}()),er}function nr(e,t){let n,r,i=[],{start:a}=t;for(e.sort(rr),n=0;na&&i.push({start:a,end:r.start}),r.end>a&&(a=r.end);return at.start)&&(null===e.start||null===t.end||e.start=e.start)&&(null===e.end||null!==t.end&&t.end<=e.end)}function sr(e,t){return(null===e.start||t>=e.start)&&(null===e.end||tn:!!t&&e>=t.end)}}function cr(e,t){let n=["fc-day",`fc-day-${It[e.dow]}`];return e.isDisabled?n.push("fc-day-disabled"):(e.isToday&&(n.push("fc-day-today"),n.push(t.getClass("today"))),e.isPast&&n.push("fc-day-past"),e.isFuture&&n.push("fc-day-future"),e.isOther&&n.push("fc-day-other")),n}const ur=pn({year:"numeric",month:"long",day:"numeric"}),dr=pn({week:"long"});function hr(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"day",r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const{dateEnv:i,options:a,calendarApi:o}=e;let s=i.format(t,"week"===n?dr:ur);if(a.navLinks){let e=i.toDate(t);const l=e=>{let r="day"===n?a.navLinkDayClick:"week"===n?a.navLinkWeekClick:null;"function"===typeof r?r.call(o,i.toDate(t),e):("string"===typeof r&&(n=r),o.zoomTo(t,n))};return Object.assign({title:ft(a.navLinkHint,[s,e],s),"data-navlink":""},r?at(l):{onClick:l})}return{"aria-label":s}}let fr,pr=null;function mr(){return null===pr&&(pr=function(){let e=document.createElement("div");Ke(e,{position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}),e.innerHTML="
",document.body.appendChild(e);let t=e.firstChild.getBoundingClientRect().left>e.getBoundingClientRect().left;return Ye(e),t}()),pr}function gr(){return fr||(fr=function(){let e=document.createElement("div");e.style.overflow="scroll",e.style.position="absolute",e.style.top="-9999px",e.style.left="-9999px",document.body.appendChild(e);let t=vr(e);return document.body.removeChild(e),t}()),fr}function vr(e){return{x:e.offsetHeight-e.clientHeight,y:e.offsetWidth-e.clientWidth}}function yr(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=(arguments.length>2?arguments[2]:void 0)?e.getBoundingClientRect():xr(e),r=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=window.getComputedStyle(e),r=parseInt(n.borderLeftWidth,10)||0,i=parseInt(n.borderRightWidth,10)||0,a=parseInt(n.borderTopWidth,10)||0,o=parseInt(n.borderBottomWidth,10)||0,s=vr(e),l=s.y-r-i,c={borderLeft:r,borderRight:i,borderTop:a,borderBottom:o,scrollbarBottom:s.x-a-o,scrollbarLeft:0,scrollbarRight:0};return mr()&&"rtl"===n.direction?c.scrollbarLeft=l:c.scrollbarRight=l,t&&(c.paddingLeft=parseInt(n.paddingLeft,10)||0,c.paddingRight=parseInt(n.paddingRight,10)||0,c.paddingTop=parseInt(n.paddingTop,10)||0,c.paddingBottom=parseInt(n.paddingBottom,10)||0),c}(e,t),i={left:n.left+r.borderLeft+r.scrollbarLeft,right:n.right-r.borderRight-r.scrollbarRight,top:n.top+r.borderTop,bottom:n.bottom-r.borderBottom-r.scrollbarBottom};return t&&(i.left+=r.paddingLeft,i.right-=r.paddingRight,i.top+=r.paddingTop,i.bottom-=r.paddingBottom),i}function xr(e){let t=e.getBoundingClientRect();return{left:t.left+window.pageXOffset,top:t.top+window.pageYOffset,right:t.right+window.pageXOffset,bottom:t.bottom+window.pageYOffset}}function br(e){let t=[];for(;e instanceof HTMLElement;){let n=window.getComputedStyle(e);if("fixed"===n.position)break;/(auto|scroll)/.test(n.overflow+n.overflowY+n.overflowX)&&t.push(e),e=e.parentNode}return t}class _r{constructor(){this.handlers={},this.thisContext=null}setThisContext(e){this.thisContext=e}setOptions(e){this.options=e}on(e,t){!function(e,t,n){(e[t]||(e[t]=[])).push(n)}(this.handlers,e,t)}off(e,t){!function(e,t,n){n?e[t]&&(e[t]=e[t].filter((e=>e!==n))):delete e[t]}(this.handlers,e,t)}trigger(e){let t=this.handlers[e]||[],n=this.options&&this.options[e],r=[].concat(n||[],t);for(var i=arguments.length,a=new Array(i>1?i-1:0),o=1;o=n[t]&&e=n[t]&&e0}canScrollHorizontally(){return this.getMaxScrollLeft()>0}canScrollUp(){return this.getScrollTop()>0}canScrollDown(){return this.getScrollTop()0}canScrollRight(){return this.getScrollLeft(){this.props.value!==t.value&&e.forEach((e=>{e.context=t.value,e.forceUpdate()}))},this.sub=t=>{e.push(t);let n=t.componentWillUnmount;t.componentWillUnmount=()=>{e.splice(e.indexOf(t),1),n&&n.call(t)}}}return t},t}class Rr{constructor(e,t,n,r){this.execFunc=e,this.emitter=t,this.scrollTime=n,this.scrollTimeReset=r,this.handleScrollRequest=e=>{this.queuedRequest=Object.assign({},this.queuedRequest||{},e),this.drain()},t.on("_scrollRequest",this.handleScrollRequest),this.fireInitialScroll()}detach(){this.emitter.off("_scrollRequest",this.handleScrollRequest)}update(e){e&&this.scrollTimeReset?this.fireInitialScroll():this.drain()}fireInitialScroll(){this.handleScrollRequest({time:this.scrollTime})}drain(){this.queuedRequest&&this.execFunc(this.queuedRequest)&&(this.queuedRequest=null)}}const Pr=Dr({});function Or(e,t,n,r,i,a,o,s,l,c,u,d,h){return{dateEnv:i,options:n,pluginHooks:o,emitter:c,dispatch:s,getCurrentData:l,calendarApi:u,viewSpec:e,viewApi:t,dateProfileGenerator:r,theme:a,isRtl:"rtl"===n.direction,addResizeHandler(e){c.on("_resize",e)},removeResizeHandler(e){c.off("_resize",e)},createScrollResponder:e=>new Rr(e,c,yt(n.scrollTime),n.scrollTimeReset),registerInteractiveComponent:d,unregisterInteractiveComponent:h}}class Lr extends I{shouldComponentUpdate(e,t){return this.debug&&console.log(Rt(e,this.props),Rt(t,this.state)),!Pt(this.props,e,this.propEquality)||!Pt(this.state,t,this.stateEquality)}safeSetState(e){Pt(this.state,Object.assign(Object.assign({},this.state),e),this.stateEquality)||this.setState(e)}}Lr.addPropsEquality=function(e){let t=Object.create(this.prototype.propEquality);Object.assign(t,e),this.prototype.propEquality=t},Lr.addStateEquality=function(e){let t=Object.create(this.prototype.stateEquality);Object.assign(t,e),this.prototype.stateEquality=t},Lr.contextType=Pr,Lr.prototype.propEquality={},Lr.prototype.stateEquality={};class Ir extends Lr{}function zr(e,t){"function"===typeof e?e(t):e&&(e.current=t)}Ir.contextType=Pr;class Nr extends Ir{constructor(){super(...arguments),this.uid=lt()}prepareHits(){}queryHit(e,t,n,r){return null}isValidSegDownEl(e){return!this.props.eventDrag&&!this.props.eventResize&&!$e(e,".fc-event-mirror")}isValidDateDownEl(e){return!$e(e,".fc-event:not(.fc-bg-event)")&&!$e(e,".fc-more-link")&&!$e(e,"a[data-navlink]")&&!$e(e,".fc-popover")}}function Fr(e,t){return"function"===typeof e&&(e=e()),null==e?t.createNowMarker():t.createMarker(e)}class Br{constructor(e){this.props=e,this.nowDate=Fr(e.nowInput,e.dateEnv),this.initHiddenDays()}buildPrev(e,t,n){let{dateEnv:r}=this.props,i=r.subtract(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(i,-1,n)}buildNext(e,t,n){let{dateEnv:r}=this.props,i=r.add(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(i,1,n)}build(e,t){let n,r,i,a,o,s,l=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],{props:c}=this;return n=this.buildValidRange(),n=this.trimHiddenDays(n),l&&(e=function(e,t){return null!=t.start&&e=t.end?new Date(t.end.valueOf()-1):e}(e,n)),r=this.buildCurrentRangeInfo(e,t),i=/^(year|month|week|day)$/.test(r.unit),a=this.buildRenderRange(this.trimHiddenDays(r.range),r.unit,i),a=this.trimHiddenDays(a),o=a,c.showNonCurrentDates||(o=ir(o,r.range)),o=this.adjustActiveRange(o),o=ir(o,n),s=ar(r.range,n),sr(a,e)||(e=a.start),{currentDate:e,validRange:n,currentRange:r.range,currentRangeUnit:r.unit,isRangeAllDay:i,activeRange:o,renderRange:a,slotMinTime:c.slotMinTime,slotMaxTime:c.slotMaxTime,isValid:s,dateIncrement:this.buildDateIncrement(r.duration)}}buildValidRange(){let e=this.props.validRangeInput,t="function"===typeof e?e.call(this.props.calendarApi,this.nowDate):e;return this.refineRange(t)||{start:null,end:null}}buildCurrentRangeInfo(e,t){let n,{props:r}=this,i=null,a=null,o=null;return r.duration?(i=r.duration,a=r.durationUnit,o=this.buildRangeFromDuration(e,t,i,a)):(n=this.props.dayCount)?(a="day",o=this.buildRangeFromDayCount(e,t,n)):(o=this.buildCustomVisibleRange(e))?a=r.dateEnv.greatestWholeUnit(o.start,o.end).unit:(i=this.getFallbackDuration(),a=wt(i).unit,o=this.buildRangeFromDuration(e,t,i,a)),{duration:i,unit:a,range:o}}getFallbackDuration(){return yt({day:1})}adjustActiveRange(e){let{dateEnv:t,usesMinMaxTime:n,slotMinTime:r,slotMaxTime:i}=this.props,{start:a,end:o}=e;return n&&(bt(r)<0&&(a=Ut(a),a=t.add(a,r)),bt(i)>1&&(o=Ut(o),o=Nt(o,-1),o=t.add(o,i))),{start:a,end:o}}buildRangeFromDuration(e,t,n,r){let i,a,o,{dateEnv:s,dateAlignment:l}=this.props;if(!l){let{dateIncrement:e}=this.props;l=e&&_t(e)<_t(n)?wt(e).unit:r}function c(){i=s.startOf(e,l),a=s.add(i,n),o={start:i,end:a}}return bt(n)<=1&&this.isHiddenDay(i)&&(i=this.skipHiddenDays(i,t),i=Ut(i)),c(),this.trimHiddenDays(o)||(e=this.skipHiddenDays(e,t),c()),o}buildRangeFromDayCount(e,t,n){let r,{dateEnv:i,dateAlignment:a}=this.props,o=0,s=e;a&&(s=i.startOf(s,a)),s=Ut(s),s=this.skipHiddenDays(s,t),r=s;do{r=Nt(r,1),this.isHiddenDay(r)||(o+=1)}while(o1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(;this.isHiddenDayHash[(e.getUTCDay()+(n?t:0)+7)%7];)e=Nt(e,t);return e}}function jr(e,t,n){n.emitter.trigger("select",Object.assign(Object.assign({},Ur(e,n)),{jsEvent:t?t.origEvent:null,view:n.viewApi||n.calendarApi.view}))}function Ur(e,t){let n={};for(let a of t.pluginHooks.dateSpanTransforms)Object.assign(n,a(e,t));var r,i;return Object.assign(n,(r=e,i=t.dateEnv,Object.assign(Object.assign({},fi(r.range,i,r.allDay)),{allDay:r.allDay}))),n}function Vr(e,t,n){let{dateEnv:r,options:i}=n,a=t;return e?(a=Ut(a),a=r.add(a,i.defaultAllDayEventDuration)):a=r.add(a,i.defaultTimedEventDuration),a}function Hr(e,t,n,r){let i=Qr(e.defs,t),a={defs:{},instances:{}};for(let o in e.defs){let t=e.defs[o];a.defs[o]=Wr(t,i[o],n,r)}for(let o in e.instances){let t=e.instances[o],s=a.defs[t.defId];a.instances[o]=Gr(t,s,i[t.defId],n,r)}return a}function Wr(e,t,n,r){let i=n.standardProps||{};null==i.hasEnd&&t.durationEditable&&(n.startDelta||n.endDelta)&&(i.hasEnd=!0);let a=Object.assign(Object.assign(Object.assign({},e),i),{ui:Object.assign(Object.assign({},e.ui),i.ui)});n.extendedProps&&(a.extendedProps=Object.assign(Object.assign({},a.extendedProps),n.extendedProps));for(let o of r.pluginHooks.eventDefMutationAppliers)o(a,n,r);return!a.hasEnd&&r.options.forceEventDuration&&(a.hasEnd=!0),a}function Gr(e,t,n,r,i){let{dateEnv:a}=i,o=r.standardProps&&!0===r.standardProps.allDay,s=r.standardProps&&!1===r.standardProps.hasEnd,l=Object.assign({},e);return o&&(l.range=Xn(l.range)),r.datesDelta&&n.startEditable&&(l.range={start:a.add(l.range.start,r.datesDelta),end:a.add(l.range.end,r.datesDelta)}),r.startDelta&&n.durationEditable&&(l.range={start:a.add(l.range.start,r.startDelta),end:l.range.end}),r.endDelta&&n.durationEditable&&(l.range={start:l.range.start,end:a.add(l.range.end,r.endDelta)}),s&&(l.range={start:l.range.start,end:Vr(t.allDay,l.range.start,i)}),t.allDay&&(l.range={start:Ut(l.range.start),end:Ut(l.range.end)}),l.range.end1&&void 0!==arguments[1]?arguments[1]:{},{dateEnv:n}=this._context,r=n.createMarker(e);if(r&&this._instance){let e=Kn(this._instance.range.start,r,n,t.granularity);t.maintainDuration?this.mutate({datesDelta:e}):this.mutate({startDelta:e})}}setEnd(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{dateEnv:r}=this._context;if((null==e||(t=r.createMarker(e),t))&&this._instance)if(t){let e=Kn(this._instance.range.end,t,r,n.granularity);this.mutate({endDelta:e})}else this.mutate({standardProps:{hasEnd:!1}})}setDates(e,t){let n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{dateEnv:i}=this._context,a={allDay:r.allDay},o=i.createMarker(e);var s,l;if(o&&((null==t||(n=i.createMarker(t),n))&&this._instance)){let e=this._instance.range;!0===r.allDay&&(e=Xn(e));let t=Kn(e.start,o,i,r.granularity);if(n){let o=Kn(e.end,n,i,r.granularity);l=o,(s=t).years===l.years&&s.months===l.months&&s.days===l.days&&s.milliseconds===l.milliseconds?this.mutate({datesDelta:t,standardProps:a}):this.mutate({startDelta:t,endDelta:o,standardProps:a})}else a.hasEnd=!1,this.mutate({datesDelta:t,standardProps:a})}}moveStart(e){let t=yt(e);t&&this.mutate({startDelta:t})}moveEnd(e){let t=yt(e);t&&this.mutate({endDelta:t})}moveDates(e){let t=yt(e);t&&this.mutate({datesDelta:t})}setAllDay(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={allDay:e},{maintainDuration:r}=t;null==r&&(r=this._context.options.allDayMaintainDuration),this._def.allDay!==e&&(n.hasEnd=r),this.mutate({standardProps:n})}formatRange(e){let{dateEnv:t}=this._context,n=this._instance,r=pn(e);return this._def.hasEnd?t.formatRange(n.range.start,n.range.end,r,{forcedStartTzo:n.forcedStartTzo,forcedEndTzo:n.forcedEndTzo}):t.format(n.range.start,r,{forcedTzo:n.forcedStartTzo})}mutate(e){let t=this._instance;if(t){let n=this._def,r=this._context,{eventStore:i}=r.getCurrentData(),a=Rn(i,t.instanceId);a=Hr(a,{"":{display:"",startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]}},e,r);let o=new Yr(r,n,t);this._def=a.defs[n.defId],this._instance=a.instances[t.instanceId],r.dispatch({type:"MERGE_EVENTS",eventStore:a}),r.emitter.trigger("eventChange",{oldEvent:o,event:this,relatedEvents:Xr(a,r,t),revert(){r.dispatch({type:"RESET_EVENTS",eventStore:i})}})}}remove(){let e=this._context,t=$r(this);e.dispatch({type:"REMOVE_EVENTS",eventStore:t}),e.emitter.trigger("eventRemove",{event:this,relatedEvents:[],revert(){e.dispatch({type:"MERGE_EVENTS",eventStore:t})}})}get source(){let{sourceId:e}=this._def;return e?new qr(this._context,this._context.getCurrentData().eventSources[e]):null}get start(){return this._instance?this._context.dateEnv.toDate(this._instance.range.start):null}get end(){return this._instance&&this._def.hasEnd?this._context.dateEnv.toDate(this._instance.range.end):null}get startStr(){let e=this._instance;return e?this._context.dateEnv.formatIso(e.range.start,{omitTime:this._def.allDay,forcedTzo:e.forcedStartTzo}):""}get endStr(){let e=this._instance;return e&&this._def.hasEnd?this._context.dateEnv.formatIso(e.range.end,{omitTime:this._def.allDay,forcedTzo:e.forcedEndTzo}):""}get id(){return this._def.publicId}get groupId(){return this._def.groupId}get allDay(){return this._def.allDay}get title(){return this._def.title}get url(){return this._def.url}get display(){return this._def.ui.display||"auto"}get startEditable(){return this._def.ui.startEditable}get durationEditable(){return this._def.ui.durationEditable}get constraint(){return this._def.ui.constraints[0]||null}get overlap(){return this._def.ui.overlap}get allow(){return this._def.ui.allows[0]||null}get backgroundColor(){return this._def.ui.backgroundColor}get borderColor(){return this._def.ui.borderColor}get textColor(){return this._def.ui.textColor}get classNames(){return this._def.ui.classNames}get extendedProps(){return this._def.extendedProps}toPlainObject(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this._def,{ui:n}=t,{startStr:r,endStr:i}=this,a={allDay:t.allDay};return t.title&&(a.title=t.title),r&&(a.start=r),i&&(a.end=i),t.publicId&&(a.id=t.publicId),t.groupId&&(a.groupId=t.groupId),t.url&&(a.url=t.url),n.display&&"auto"!==n.display&&(a.display=n.display),e.collapseColor&&n.backgroundColor&&n.backgroundColor===n.borderColor?a.color=n.backgroundColor:(n.backgroundColor&&(a.backgroundColor=n.backgroundColor),n.borderColor&&(a.borderColor=n.borderColor)),n.textColor&&(a.textColor=n.textColor),n.classNames.length&&(a.classNames=n.classNames),Object.keys(t.extendedProps).length&&(e.collapseExtendedProps?Object.assign(a,t.extendedProps):a.extendedProps=t.extendedProps),a}toJSON(){return this.toPlainObject()}}function $r(e){let t=e._def,n=e._instance;return{defs:{[t.defId]:t},instances:n?{[n.instanceId]:n}:{}}}function Xr(e,t,n){let{defs:r,instances:i}=e,a=[],o=n?n.instanceId:"";for(let s in i){let e=i[s],n=r[e.defId];e.instanceId!==o&&a.push(new Yr(t,n,e))}return a}function Zr(e,t,n,r){let i={},a={},o={},s=[],l=[],c=Qr(e.defs,t);for(let u in e.defs){let t=e.defs[u];"inverse-background"===c[t.defId].display&&(t.groupId?(i[t.groupId]=[],o[t.groupId]||(o[t.groupId]=t)):a[u]=[])}for(let u in e.instances){let t=e.instances[u],o=e.defs[t.defId],d=c[o.defId],h=t.range,f=!o.allDay&&r?Zn(h,r):h,p=ir(f,n);p&&("inverse-background"===d.display?o.groupId?i[o.groupId].push(p):a[t.defId].push(p):"none"!==d.display&&("background"===d.display?s:l).push({def:o,ui:d,instance:t,range:p,isStart:f.start&&f.start.valueOf()===p.start.valueOf(),isEnd:f.end&&f.end.valueOf()===p.end.valueOf()}))}for(let u in i){let e=nr(i[u],n);for(let t of e){let e=o[u],n=c[e.defId];s.push({def:e,ui:n,instance:null,range:t,isStart:!1,isEnd:!1})}}for(let u in a){let t=nr(a[u],n);for(let n of t)s.push({def:e.defs[u],ui:c[u],instance:null,range:n,isStart:!1,isEnd:!1})}return{bg:s,fg:l}}function Kr(e,t){e.fcSeg=t}function Jr(e){return e.fcSeg||e.parentNode.fcSeg||null}function Qr(e,t){return Tt(e,(e=>ei(e,t)))}function ei(e,t){let n=[];return t[""]&&n.push(t[""]),t[e.defId]&&n.push(t[e.defId]),n.push(e.ui),Fn(n)}function ti(e,t){let n=e.map(ni);return n.sort(((e,n)=>function(e,t,n){let r,i;for(r=0;re._seg))}function ni(e){let{eventRange:t}=e,n=t.def,r=t.instance?t.instance.range:t.range,i=r.start?r.start.valueOf():0,a=r.end?r.end.valueOf():0;return Object.assign(Object.assign(Object.assign({},n.extendedProps),n),{id:n.publicId,start:i,end:a,duration:a-i,allDay:Number(n.allDay),_seg:e})}function ri(e,t){let{pluginHooks:n}=t,r=n.isDraggableTransformers,{def:i,ui:a}=e.eventRange,o=a.startEditable;for(let s of r)o=s(o,i,a,t);return o}function ii(e,t){return e.isStart&&e.eventRange.ui.durationEditable&&t.options.eventResizableFromStart}function ai(e,t){return e.isEnd&&e.eventRange.ui.durationEditable}function oi(e,t,n,r,i,a,o){let{dateEnv:s,options:l}=n,{displayEventTime:c,displayEventEnd:u}=l,d=e.eventRange.def,h=e.eventRange.instance;null==c&&(c=!1!==r),null==u&&(u=!1!==i);let f=h.range.start,p=h.range.end,m=a||e.start||e.eventRange.range.start,g=o||e.end||e.eventRange.range.end,v=Ut(f).valueOf()===Ut(m).valueOf(),y=Ut(Ft(p,-1)).valueOf()===Ut(Ft(g,-1)).valueOf();return c&&!d.allDay&&(v||y)?(m=v?f:m,g=y?p:g,u&&d.hasEnd?s.formatRange(m,g,t,{forcedStartTzo:a?null:h.forcedStartTzo,forcedEndTzo:o?null:h.forcedEndTzo}):s.format(m,t,{forcedTzo:a?null:h.forcedStartTzo})):""}function si(e,t,n){let r=e.eventRange.range;return{isPast:r.end<(n||t.start),isFuture:r.start>=(n||t.end),isToday:t&&sr(t,r.start)}}function li(e){let t=["fc-event"];return e.isMirror&&t.push("fc-event-mirror"),e.isDraggable&&t.push("fc-event-draggable"),(e.isStartResizable||e.isEndResizable)&&t.push("fc-event-resizable"),e.isDragging&&t.push("fc-event-dragging"),e.isResizing&&t.push("fc-event-resizing"),e.isSelected&&t.push("fc-event-selected"),e.isStart&&t.push("fc-event-start"),e.isEnd&&t.push("fc-event-end"),e.isPast&&t.push("fc-event-past"),e.isToday&&t.push("fc-event-today"),e.isFuture&&t.push("fc-event-future"),t}function ci(e,t){let{def:n,instance:r}=e.eventRange,{url:i}=n;if(i)return{href:i};let{emitter:a,options:o}=t,{eventInteractive:s}=o;return null==s&&(s=n.interactive,null==s&&(s=Boolean(a.hasHandlers("eventClick")))),s?ot((e=>{a.trigger("eventClick",{el:e.target,event:new Yr(t,n,r),jsEvent:e,view:t.viewApi})})):{}}const ui={start:Mn,end:Mn,allDay:Boolean};function di(e,t,n){let r=function(e,t){let{refined:n,extra:r}=Sn(e,ui),i=n.start?t.createMarkerMeta(n.start):null,a=n.end?t.createMarkerMeta(n.end):null,{allDay:o}=n;null==o&&(o=i&&i.isTimeUnspecified&&(!a||a.isTimeUnspecified));return Object.assign({range:{start:i?i.marker:null,end:a?a.marker:null},allDay:o},r)}(e,t),{range:i}=r;if(!i.start)return null;if(!i.end){if(null==n)return null;i.end=t.add(i.start,n)}return r}function hi(e,t,n){return Object.assign(Object.assign({},fi(e,t,n)),{timeZone:t.timeZone})}function fi(e,t,n){return{start:t.toDate(e.start),end:t.toDate(e.end),startStr:t.formatIso(e.start,{omitTime:n}),endStr:t.formatIso(e.end,{omitTime:n})}}let pi={};!function(e,t){pi[e]=t}("gregory",class{getMarkerYear(e){return e.getUTCFullYear()}getMarkerMonth(e){return e.getUTCMonth()}getMarkerDay(e){return e.getUTCDate()}arrayToMarker(e){return Yt(e)}markerToArray(e){return qt(e)}});const mi=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;class gi{constructor(e){let t=this.timeZone=e.timeZone,n="local"!==t&&"UTC"!==t;e.namedTimeZoneImpl&&n&&(this.namedTimeZoneImpl=new e.namedTimeZoneImpl(t)),this.canComputeOffset=Boolean(!n||this.namedTimeZoneImpl),this.calendarSystem=function(e){return new pi[e]}(e.calendarSystem),this.locale=e.locale,this.weekDow=e.locale.week.dow,this.weekDoy=e.locale.week.doy,"ISO"===e.weekNumberCalculation&&(this.weekDow=1,this.weekDoy=4),"number"===typeof e.firstDay&&(this.weekDow=e.firstDay),"function"===typeof e.weekNumberCalculation&&(this.weekNumberFunc=e.weekNumberCalculation),this.weekText=null!=e.weekText?e.weekText:e.locale.options.weekText,this.weekTextLong=(null!=e.weekTextLong?e.weekTextLong:e.locale.options.weekTextLong)||this.weekText,this.cmdFormatter=e.cmdFormatter,this.defaultSeparator=e.defaultSeparator}createMarker(e){let t=this.createMarkerMeta(e);return null===t?null:t.marker}createNowMarker(){return this.canComputeOffset?this.timestampToMarker((new Date).valueOf()):Yt(Wt(new Date))}createMarkerMeta(e){if("string"===typeof e)return this.parse(e);let t=null;return"number"===typeof e?t=this.timestampToMarker(e):e instanceof Date?(e=e.valueOf(),isNaN(e)||(t=this.timestampToMarker(e))):Array.isArray(e)&&(t=Yt(e)),null!==t&&$t(t)?{marker:t,isTimeUnspecified:!1,forcedTzo:null}:null}parse(e){let t=function(e){let t=mi.exec(e);if(t){let e=new Date(Date.UTC(Number(t[1]),t[3]?Number(t[3])-1:0,Number(t[5]||1),Number(t[7]||0),Number(t[8]||0),Number(t[10]||0),t[12]?1e3*Number(`0.${t[12]}`):0));if($t(e)){let n=null;return t[13]&&(n=("-"===t[15]?-1:1)*(60*Number(t[16]||0)+Number(t[18]||0))),{marker:e,isTimeUnspecified:!t[6],timeZoneOffset:n}}}return null}(e);if(null===t)return null;let{marker:n}=t,r=null;return null!==t.timeZoneOffset&&(this.canComputeOffset?n=this.timestampToMarker(n.valueOf()-60*t.timeZoneOffset*1e3):r=t.timeZoneOffset),{marker:n,isTimeUnspecified:t.isTimeUnspecified,forcedTzo:r}}getYear(e){return this.calendarSystem.getMarkerYear(e)}getMonth(e){return this.calendarSystem.getMarkerMonth(e)}getDay(e){return this.calendarSystem.getMarkerDay(e)}add(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]+=t.years,n[1]+=t.months,n[2]+=t.days,n[6]+=t.milliseconds,this.calendarSystem.arrayToMarker(n)}subtract(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]-=t.years,n[1]-=t.months,n[2]-=t.days,n[6]-=t.milliseconds,this.calendarSystem.arrayToMarker(n)}addYears(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]+=t,this.calendarSystem.arrayToMarker(n)}addMonths(e,t){let n=this.calendarSystem.markerToArray(e);return n[1]+=t,this.calendarSystem.arrayToMarker(n)}diffWholeYears(e,t){let{calendarSystem:n}=this;return Xt(e)===Xt(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)&&n.getMarkerMonth(e)===n.getMarkerMonth(t)?n.getMarkerYear(t)-n.getMarkerYear(e):null}diffWholeMonths(e,t){let{calendarSystem:n}=this;return Xt(e)===Xt(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)?n.getMarkerMonth(t)-n.getMarkerMonth(e)+12*(n.getMarkerYear(t)-n.getMarkerYear(e)):null}greatestWholeUnit(e,t){let n=this.diffWholeYears(e,t);return null!==n?{unit:"year",value:n}:(n=this.diffWholeMonths(e,t),null!==n?{unit:"month",value:n}:(n=function(e,t){let n=jt(e,t);return null!==n&&n%7===0?n/7:null}(e,t),null!==n?{unit:"week",value:n}:(n=jt(e,t),null!==n?{unit:"day",value:n}:(n=function(e,t){return(t.valueOf()-e.valueOf())/36e5}(e,t),mt(n)?{unit:"hour",value:n}:(n=function(e,t){return(t.valueOf()-e.valueOf())/6e4}(e,t),mt(n)?{unit:"minute",value:n}:(n=function(e,t){return(t.valueOf()-e.valueOf())/1e3}(e,t),mt(n)?{unit:"second",value:n}:{unit:"millisecond",value:t.valueOf()-e.valueOf()}))))))}countDurationsBetween(e,t,n){let r;return n.years&&(r=this.diffWholeYears(e,t),null!==r)?r/(bt(n)/365):n.months&&(r=this.diffWholeMonths(e,t),null!==r)?r/function(e){return bt(e)/30}(n):n.days&&(r=jt(e,t),null!==r)?r/bt(n):(t.valueOf()-e.valueOf())/_t(n)}startOf(e,t){return"year"===t?this.startOfYear(e):"month"===t?this.startOfMonth(e):"week"===t?this.startOfWeek(e):"day"===t?Ut(e):"hour"===t?function(e){return Yt([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours()])}(e):"minute"===t?function(e){return Yt([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes()])}(e):"second"===t?function(e){return Yt([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds()])}(e):null}startOfYear(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e)])}startOfMonth(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e)])}startOfWeek(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e),e.getUTCDate()-(e.getUTCDay()-this.weekDow+7)%7])}computeWeekNumber(e){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(e)):function(e,t,n){let r=e.getUTCFullYear(),i=Vt(e,r,t,n);if(i<1)return Vt(e,r-1,t,n);let a=Vt(e,r+1,t,n);return a>=1?Math.min(i,a):i}(e,this.weekDow,this.weekDoy)}format(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.format({marker:e,timeZoneOffset:null!=n.forcedTzo?n.forcedTzo:this.offsetForMarker(e)},this)}formatRange(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return r.isEndExclusive&&(t=Ft(t,-1)),n.formatRange({marker:e,timeZoneOffset:null!=r.forcedStartTzo?r.forcedStartTzo:this.offsetForMarker(e)},{marker:t,timeZoneOffset:null!=r.forcedEndTzo?r.forcedEndTzo:this.offsetForMarker(t)},this,r.defaultSeparator)}formatIso(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null;return t.omitTimeZoneOffset||(n=null!=t.forcedTzo?t.forcedTzo:this.offsetForMarker(e)),function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e.toISOString();return r=r.replace(".000",""),n&&(r=r.replace("T00:00:00Z","")),r.length>10&&(null==t?r=r.replace("Z",""):0!==t&&(r=r.replace("Z",Kt(t,!0)))),r}(e,n,t.omitTime)}timestampToMarker(e){return"local"===this.timeZone?Yt(Wt(new Date(e))):"UTC"!==this.timeZone&&this.namedTimeZoneImpl?Yt(this.namedTimeZoneImpl.timestampToArray(e)):new Date(e)}offsetForMarker(e){return"local"===this.timeZone?-Gt(qt(e)).getTimezoneOffset():"UTC"===this.timeZone?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(qt(e)):null}toDate(e,t){return"local"===this.timeZone?Gt(qt(e)):"UTC"===this.timeZone?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-1e3*this.namedTimeZoneImpl.offsetForArray(qt(e))*60):new Date(e.valueOf()-(t||0))}}class vi{constructor(){this.strictOrder=!1,this.allowReslicing=!1,this.maxCoord=-1,this.maxStackCnt=-1,this.levelCoords=[],this.entriesByLevel=[],this.stackCnts={}}addSegs(e){let t=[];for(let n of e)this.insertEntry(n,t);return t}insertEntry(e,t){let n=this.findInsertion(e);return this.isInsertionValid(n,e)?(this.insertEntryAt(e,n),1):this.handleInvalidInsertion(n,e,t)}isInsertionValid(e,t){return(-1===this.maxCoord||e.levelCoord+t.thickness<=this.maxCoord)&&(-1===this.maxStackCnt||e.stackCnto.end&&(r+=this.insertEntry({index:e.index,thickness:e.thickness,span:{start:o.end,end:a.end}},i)),r?(n.push({index:e.index,thickness:e.thickness,span:bi(o,a)},...i),r):(n.push(e),0)}insertEntryAt(e,t){let{entriesByLevel:n,levelCoords:r}=this;-1===t.lateral?(_i(r,t.level,t.levelCoord),_i(n,t.level,[e])):_i(n[t.level],t.lateral,e),this.stackCnts[xi(e)]=t.stackCnt}findInsertion(e){let{levelCoords:t,entriesByLevel:n,strictOrder:r,stackCnts:i}=this,a=t.length,o=0,s=-1,l=-1,c=null,u=0;for(let f=0;f=o+e.thickness)break;let d,h=n[f],p=wi(h,e.span.start,yi),m=p[0]+p[1];for(;(d=h[m])&&d.span.starto&&(o=e,c=d,s=f,l=m),e===o&&(u=Math.max(u,i[xi(d)]+1)),m+=1}}let d=0;if(c)for(d=s+1;dn(e[i-1]))return[i,0];for(;ro))return[a,1];r=a+1}}return[r,0]}class Ai{constructor(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}destroy(){}}function Si(e){return{[e.component.uid]:e}}const Mi={};class Ti{constructor(e,t){this.emitter=new _r}destroy(){}setMirrorIsVisible(e){}setMirrorNeedsRevert(e){}setAutoScrollEnabled(e){}}const ki={};Boolean;class Ei extends Ir{constructor(){super(...arguments),this.state={forPrint:!1},this.handleBeforePrint=()=>{this.setState({forPrint:!0})},this.handleAfterPrint=()=>{this.setState({forPrint:!1})}}render(){let{props:e}=this,{options:t}=e,{forPrint:n}=this.state,r=n||"auto"===t.height||"auto"===t.contentHeight,i=r||null==t.height?"":t.height,a=["fc",n?"fc-media-print":"fc-media-screen",`fc-direction-${t.direction}`,e.theme.getClass("root")];return tr()||a.push("fc-liquid-hack"),e.children(a,i,r,n)}componentDidMount(){let{emitter:e}=this.props;e.on("_beforeprint",this.handleBeforePrint),e.on("_afterprint",this.handleAfterPrint)}componentWillUnmount(){let{emitter:e}=this.props;e.off("_beforeprint",this.handleBeforePrint),e.off("_afterprint",this.handleAfterPrint)}}const Ci="fc-col-header-cell";function Di(e){return e.text}class Ri extends Ir{constructor(){super(...arguments),this.id=lt(),this.queuedDomNodes=[],this.currentDomNodes=[],this.handleEl=e=>{this.props.elRef&&zr(this.props.elRef,e)}}render(){const{props:e,context:t}=this,{options:n}=t,{customGenerator:r,defaultGenerator:i,renderProps:a}=e,o=Oi(e);let s,l,c=!1,u=[];if(null!=r){const e="function"===typeof r?r(a,E):r;if(!0===e)c=!0;else{const t=e&&"object"===typeof e;t&&"html"in e?o.dangerouslySetInnerHTML={__html:e.html}:t&&"domNodes"in e?u=Array.prototype.slice.call(e.domNodes):t||"function"===typeof e?l=e:s=e}}else c=!Pi(e.generatorName,n);return c&&i&&(s=i(a)),this.queuedDomNodes=u,this.currentGeneratorMeta=l,E(e.elTag,o,s)}componentDidMount(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentDidUpdate(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentWillUnmount(){this.triggerCustomRendering(!1)}triggerCustomRendering(e){var t;const{props:n,context:r}=this,{handleCustomRendering:i,customRenderingMetaMap:a}=r.options;if(i){const r=null!==(t=this.currentGeneratorMeta)&&void 0!==t?t:null===a||void 0===a?void 0:a[n.generatorName];r&&i(Object.assign(Object.assign({id:this.id,isActive:e,containerEl:this.base,reportNewContainerEl:this.handleEl,generatorMeta:r},n),{elClasses:(n.elClasses||[]).filter(Li)}))}}applyQueueudDomNodes(){const{queuedDomNodes:e,currentDomNodes:t}=this,n=this.base;if(!Lt(e,t)){t.forEach(Ye);for(let t of e)n.appendChild(t);this.currentDomNodes=e}}}function Pi(e,t){var n;return Boolean(t.handleCustomRendering&&e&&(null===(n=t.customRenderingMetaMap)||void 0===n?void 0:n[e]))}function Oi(e,t){const n=Object.assign(Object.assign({},e.elAttrs),{ref:e.elRef});return(e.elClasses||t)&&(n.className=(e.elClasses||[]).concat(t||[]).concat(n.className||[]).filter(Boolean).join(" ")),e.elStyle&&(n.style=e.elStyle),n}function Li(e){return Boolean(e)}Ri.addPropsEquality({elClasses:Lt,elStyle:Ct,elAttrs:function(e,t){const n=Rt(e,t);for(let r of n)if(!Dt.test(r))return!1;return!0},renderProps:Ct});const Ii=Dr(0);class zi extends I{constructor(){super(...arguments),this.InnerContent=Ni.bind(void 0,this),this.handleRootEl=e=>{this.rootEl=e,this.props.elRef&&zr(this.props.elRef,e)}}render(){const{props:e}=this,t=function(e,t){const n="function"===typeof e?e(t):e||[];return"string"===typeof n?[n]:n}(e.classNameGenerator,e.renderProps);if(e.children){const n=Oi(e,t),r=e.children(this.InnerContent,e.renderProps,n);return e.elTag?E(e.elTag,n,r):r}return E(Ri,Object.assign(Object.assign({},e),{elRef:this.handleRootEl,elTag:e.elTag||"div",elClasses:(e.elClasses||[]).concat(t),renderId:this.context}))}componentDidMount(){var e,t;null===(t=(e=this.props).didMount)||void 0===t||t.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.rootEl||this.base}))}componentWillUnmount(){var e,t;null===(t=(e=this.props).willUnmount)||void 0===t||t.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.rootEl||this.base}))}}function Ni(e,t){const n=e.props;return E(Ri,Object.assign({renderProps:n.renderProps,generatorName:n.generatorName,customGenerator:n.customGenerator,defaultGenerator:n.defaultGenerator,renderId:e.context},t))}zi.contextType=Ii;class Fi extends Ir{render(){let{dateEnv:e,options:t,theme:n,viewApi:r}=this.context,{props:i}=this,{date:a,dateProfile:o}=i,s=lr(a,i.todayRange,null,o),l=[Ci].concat(cr(s,n)),c=e.format(a,i.dayHeaderFormat),u=!s.isDisabled&&i.colCnt>1?hr(this.context,a):{},d=Object.assign(Object.assign(Object.assign({date:e.toDate(a),view:r},i.extraRenderProps),{text:c}),s);return E(zi,{elTag:"th",elClasses:l,elAttrs:Object.assign({role:"columnheader",colSpan:i.colSpan,"data-date":s.isDisabled?void 0:Zt(a)},i.extraDataAttrs),renderProps:d,generatorName:"dayHeaderContent",customGenerator:t.dayHeaderContent,defaultGenerator:Di,classNameGenerator:t.dayHeaderClassNames,didMount:t.dayHeaderDidMount,willUnmount:t.dayHeaderWillUnmount},(e=>E("div",{className:"fc-scrollgrid-sync-inner"},!s.isDisabled&&E(e,{elTag:"a",elAttrs:u,elClasses:["fc-col-header-cell-cushion",i.isSticky&&"fc-sticky"]}))))}}const Bi=pn({weekday:"long"});class ji extends Ir{render(){let{props:e}=this,{dateEnv:t,theme:n,viewApi:r,options:i}=this.context,a=Nt(new Date(2592e5),e.dow),o={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},s=t.format(a,e.dayHeaderFormat),l=Object.assign(Object.assign(Object.assign(Object.assign({date:a},o),{view:r}),e.extraRenderProps),{text:s});return E(zi,{elTag:"th",elClasses:[Ci,...cr(o,n),...e.extraClassNames||[]],elAttrs:Object.assign({role:"columnheader",colSpan:e.colSpan},e.extraDataAttrs),renderProps:l,generatorName:"dayHeaderContent",customGenerator:i.dayHeaderContent,defaultGenerator:Di,classNameGenerator:i.dayHeaderClassNames,didMount:i.dayHeaderDidMount,willUnmount:i.dayHeaderWillUnmount},(n=>E("div",{className:"fc-scrollgrid-sync-inner"},E(n,{elTag:"a",elClasses:["fc-col-header-cell-cushion",e.isSticky&&"fc-sticky"],elAttrs:{"aria-label":t.format(a,Bi)}}))))}}class Ui extends I{constructor(e,t){super(e,t),this.initialNowDate=Fr(t.options.now,t.dateEnv),this.initialNowQueriedMs=(new Date).valueOf(),this.state=this.computeTiming().currentState}render(){let{props:e,state:t}=this;return e.children(t.nowDate,t.todayRange)}componentDidMount(){this.setTimeout()}componentDidUpdate(e){e.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())}componentWillUnmount(){this.clearTimeout()}computeTiming(){let{props:e,context:t}=this,n=Ft(this.initialNowDate,(new Date).valueOf()-this.initialNowQueriedMs),r=t.dateEnv.startOf(n,e.unit),i=t.dateEnv.add(r,yt(1,e.unit)),a=i.valueOf()-n.valueOf();return a=Math.min(864e5,a),{currentState:{nowDate:r,todayRange:Vi(r)},nextState:{nowDate:i,todayRange:Vi(i)},waitMs:a}}setTimeout(){let{nextState:e,waitMs:t}=this.computeTiming();this.timeoutId=setTimeout((()=>{this.setState(e,(()=>{this.setTimeout()}))}),t)}clearTimeout(){this.timeoutId&&clearTimeout(this.timeoutId)}}function Vi(e){let t=Ut(e);return{start:t,end:Nt(t,1)}}Ui.contextType=Pr;class Hi extends Ir{constructor(){super(...arguments),this.createDayHeaderFormatter=Jt(Wi)}render(){let{context:e}=this,{dates:t,dateProfile:n,datesRepDistinctDays:r,renderIntro:i}=this.props,a=this.createDayHeaderFormatter(e.options.dayHeaderFormat,r,t.length);return E(Ui,{unit:"day"},((e,o)=>E("tr",{role:"row"},i&&i("day"),t.map((e=>r?E(Fi,{key:e.toISOString(),date:e,dateProfile:n,todayRange:o,colCnt:t.length,dayHeaderFormat:a}):E(ji,{key:e.getUTCDay(),dow:e.getUTCDay(),dayHeaderFormat:a}))))))}}function Wi(e,t,n){return e||function(e,t){return pn(!e||t>10?{weekday:"short"}:t>1?{weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}:{weekday:"long"})}(t,n)}class Gi{constructor(e,t){let n=e.start,{end:r}=e,i=[],a=[],o=-1;for(;n=t.length?t[t.length-1]+1:t[n]}}class qi{constructor(e,t){let n,r,i,{dates:a}=e;if(t){for(r=a[0].getUTCDay(),n=1;n4?a-4:0),s=4;s4?i-4:0),o=4;o4?i-4:0),o=4;o4?i-4:0),o=4;o4?a-4:0),s=4;s5?s-5:0),c=5;c!e.sourceId));case"REMOVE_ALL_EVENTS":return{defs:{},instances:{}};default:return e}}function Zi(e,t,n){let r=n.options.eventDataTransform,i=t?t.eventDataTransform:null;return i&&(e=Ki(e,i)),r&&(e=Ki(e,r)),e}function Ki(e,t){let n;if(t){n=[];for(let r of e){let e=t(r);e?n.push(e):null==e&&n.push(r)}}else n=e;return n}function Ji(e,t,n){let{defs:r}=e,i=Tt(e.instances,(e=>r[e.defId].allDay?e:Object.assign(Object.assign({},e),{range:{start:n.createMarker(t.toDate(e.range.start,e.forcedStartTzo)),end:n.createMarker(t.toDate(e.range.end,e.forcedEndTzo))},forcedStartTzo:n.canComputeOffset?null:e.forcedStartTzo,forcedEndTzo:n.canComputeOffset?null:e.forcedEndTzo})));return{defs:r,instances:i}}function Qi(e,t){return On(e,(e=>e.sourceId!==t))}function ea(e,t,n){let{instances:r}=e.mutatedEvents;for(let i in r)if(!or(t.validRange,r[i].range))return!1;return ta({eventDrag:e},n)}function ta(e,t){let n=t.getCurrentData(),r=Object.assign({businessHours:n.businessHours,dateSelection:"",eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:"",eventDrag:null,eventResize:null},e);return(t.pluginHooks.isPropsValid||na)(r,t)}function na(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;return!(e.eventDrag&&!function(e,t,n,r){let i=t.getCurrentData(),a=e.eventDrag,o=a.mutatedEvents,s=o.defs,l=o.instances,c=Qr(s,a.isEvent?e.eventUiBases:{"":i.selectionConfig});r&&(c=Tt(c,r));let u=(p=e.eventStore,m=a.affectedEvents.instances,{defs:p.defs,instances:Mt(p.instances,(e=>!m[e.instanceId]))}),d=u.defs,h=u.instances,f=Qr(d,e.eventUiBases);var p,m;for(let g in l){let r=l[g],o=r.range,p=c[r.defId],m=s[r.defId];if(!ra(p.constraints,o,u,e.businessHours,t))return!1;let{eventOverlap:v}=t.options,y="function"===typeof v?v:null;for(let e in h){let n=h[e];if(ar(o,n.range)){if(!1===f[n.defId].overlap&&a.isEvent)return!1;if(!1===p.overlap)return!1;if(y&&!y(new Yr(t,d[n.defId],n),new Yr(t,m,r)))return!1}}let x=i.eventStore;for(let e of p.allows){let i,a=Object.assign(Object.assign({},n),{range:r.range,allDay:m.allDay}),o=x.defs[m.defId],s=x.instances[g];if(i=o?new Yr(t,o,s):new Yr(t,m),!e(Ur(a,t),i))return!1}}return!0}(e,t,n,r))&&!(e.dateSelection&&!function(e,t,n,r){let i=e.eventStore,a=i.defs,o=i.instances,s=e.dateSelection,l=s.range,{selectionConfig:c}=t.getCurrentData();r&&(c=r(c));if(!ra(c.constraints,l,i,e.businessHours,t))return!1;let{selectOverlap:u}=t.options,d="function"===typeof u?u:null;for(let h in o){let e=o[h];if(ar(l,e.range)){if(!1===c.overlap)return!1;if(d&&!d(new Yr(t,a[e.defId],e),null))return!1}}for(let h of c.allows){if(!h(Ur(Object.assign(Object.assign({},n),s),t),null))return!1}return!0}(e,t,n,r))}function ra(e,t,n,r,i){for(let a of e)if(!oa(ia(a,t,n,r,i),t))return!1;return!0}function ia(e,t,n,r,i){return"businessHours"===e?aa(kn(r,t,i)):"string"===typeof e?aa(On(n,(t=>t.groupId===e))):"object"===typeof e&&e?aa(kn(e,t,i)):[]}function aa(e){let{instances:t}=e,n=[];for(let r in t)n.push(t[r].range);return n}function oa(e,t){for(let n of e)if(or(n,t))return!0;return!1}class sa extends Error{constructor(e,t){super(e),this.response=t}}class la{constructor(e){this.drainedOption=e,this.isRunning=!1,this.isDirty=!1,this.pauseDepths={},this.timeoutId=0}request(e){this.isDirty=!0,this.isPaused()||(this.clearTimeout(),null==e?this.tryDrain():this.timeoutId=setTimeout(this.tryDrain.bind(this),e))}pause(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",{pauseDepths:t}=this;t[e]=(t[e]||0)+1,this.clearTimeout()}resume(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,{pauseDepths:n}=this;if(e in n){if(t)delete n[e];else{n[e]-=1,n[e]<=0&&delete n[e]}this.tryDrain()}}isPaused(){return Object.keys(this.pauseDepths).length}tryDrain(){if(!this.isRunning&&!this.isPaused()){for(this.isRunning=!0;this.isDirty;)this.isDirty=!1,this.drained();this.isRunning=!1}}clear(){this.clearTimeout(),this.isDirty=!1,this.pauseDepths={}}clearTimeout(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=0)}drained(){this.drainedOption&&this.drainedOption()}}const ca=/^(visible|hidden)$/;class ua extends Ir{constructor(){super(...arguments),this.handleEl=e=>{this.el=e,zr(this.props.elRef,e)}}render(){let{props:e}=this,{liquid:t,liquidIsAbsolute:n}=e,r=t&&n,i=["fc-scroller"];return t&&(n?i.push("fc-scroller-liquid-absolute"):i.push("fc-scroller-liquid")),E("div",{ref:this.handleEl,className:i.join(" "),style:{overflowX:e.overflowX,overflowY:e.overflowY,left:r&&-(e.overcomeLeft||0)||"",right:r&&-(e.overcomeRight||0)||"",bottom:r&&-(e.overcomeBottom||0)||"",marginLeft:!r&&-(e.overcomeLeft||0)||"",marginRight:!r&&-(e.overcomeRight||0)||"",marginBottom:!r&&-(e.overcomeBottom||0)||"",maxHeight:e.maxHeight||""}},e.children)}needsXScrolling(){if(ca.test(this.props.overflowX))return!1;let{el:e}=this,t=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),{children:n}=e;for(let r=0;rt)return!0}return!1}needsYScrolling(){if(ca.test(this.props.overflowY))return!1;let{el:e}=this,t=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),{children:n}=e;for(let r=0;rt)return!0}return!1}getXScrollbarWidth(){return ca.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight}getYScrollbarWidth(){return ca.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth}}class da{constructor(e){this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=(e,t)=>{let{depths:n,currentMap:r}=this,i=!1,a=!1;null!==e?(i=t in r,r[t]=e,n[t]=(n[t]||0)+1,a=!0):(n[t]-=1,n[t]||(delete r[t],delete this.callbackMap[t],i=!0)),this.masterCallback&&(i&&this.masterCallback(null,String(t)),a&&this.masterCallback(e,String(t)))}}createRef(e){let t=this.callbackMap[e];return t||(t=this.callbackMap[e]=t=>{this.handleValue(t,String(e))}),t}collect(e,t,n){return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,i=[];null==n&&(n=Object.keys(e).length);for(let a=t;ae),pa),this.renderMicroColGroup=Jt(ma),this.scrollerRefs=new da,this.scrollerElRefs=new da(this._handleScrollerEl.bind(this)),this.state={shrinkWidth:null,forceYScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{}},this.handleSizing=()=>{this.safeSetState(Object.assign({shrinkWidth:this.computeShrinkWidth()},this.computeScrollerDims()))}}render(){let{props:e,state:t,context:n}=this,r=e.sections||[],i=this.processCols(e.cols),a=this.renderMicroColGroup(i,t.shrinkWidth),o=function(e,t){let n=["fc-scrollgrid",t.theme.getClass("table")];return e&&n.push("fc-scrollgrid-liquid"),n}(e.liquid,n);e.collapsibleWidth&&o.push("fc-scrollgrid-collapsible");let s,l=r.length,c=0,u=[],d=[],h=[];for(;c{}},r);return E(r?"th":"td",{ref:n.elRef,role:"presentation"},E("div",{className:"fc-scroller-harness"+(c?" fc-scroller-harness-liquid":"")},E(ua,{ref:this.scrollerRefs.createRef(d),elRef:this.scrollerElRefs.createRef(d),overflowY:u,overflowX:i.liquid?"hidden":"visible",maxHeight:e.maxHeight,liquid:c,liquidIsAbsolute:!0},h)))}_handleScrollerEl(e,t){let n=function(e,t){for(let n of e)if(n.key===t)return n;return null}(this.props.sections,t);n&&zr(n.chunk.scrollerElRef,e)}componentDidMount(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)}componentDidUpdate(){this.handleSizing()}componentWillUnmount(){this.context.removeResizeHandler(this.handleSizing)}computeShrinkWidth(){return function(e){for(let t of e)if("shrink"===t.width)return!0;return!1}(this.props.cols)?ha(this.scrollerElRefs.getAll()):0}computeScrollerDims(){let e=gr(),{scrollerRefs:t,scrollerElRefs:n}=this,r=!1,i={},a={};for(let o in t.currentMap){let e=t.currentMap[o];if(e&&e.needsYScrolling()){r=!0;break}}for(let o of this.props.sections){let t=o.key,s=n.currentMap[t];if(s){let n=s.parentNode;i[t]=Math.floor(n.getBoundingClientRect().width-(r?e.y:0)),a[t]=Math.floor(n.getBoundingClientRect().height)}}return{forceYScrollbars:r,scrollerClientWidths:i,scrollerClientHeights:a}}}ba.addStateEquality({scrollerClientWidths:Ct,scrollerClientHeights:Ct});class _a extends Ir{constructor(){super(...arguments),this.handleEl=e=>{this.el=e,e&&Kr(e,this.props.seg)}}render(){const{props:e,context:t}=this,{options:n}=t,{seg:r}=e,{eventRange:i}=r,{ui:a}=i,o={event:new Yr(t,i.def,i.instance),view:t.viewApi,timeText:e.timeText,textColor:a.textColor,backgroundColor:a.backgroundColor,borderColor:a.borderColor,isDraggable:!e.disableDragging&&ri(r,t),isStartResizable:!e.disableResizing&&ii(r,t),isEndResizable:!e.disableResizing&&ai(r),isMirror:Boolean(e.isDragging||e.isResizing||e.isDateSelecting),isStart:Boolean(r.isStart),isEnd:Boolean(r.isEnd),isPast:Boolean(e.isPast),isFuture:Boolean(e.isFuture),isToday:Boolean(e.isToday),isSelected:Boolean(e.isSelected),isDragging:Boolean(e.isDragging),isResizing:Boolean(e.isResizing)};return E(zi,Object.assign({},e,{elRef:this.handleEl,elClasses:[...li(o),...r.eventRange.ui.classNames,...e.elClasses||[]],renderProps:o,generatorName:"eventContent",customGenerator:n.eventContent,defaultGenerator:e.defaultGenerator,classNameGenerator:n.eventClassNames,didMount:n.eventDidMount,willUnmount:n.eventWillUnmount}))}componentDidUpdate(e){this.el&&this.props.seg!==e.seg&&Kr(this.el,this.props.seg)}}class wa extends Ir{render(){let{props:e,context:t}=this,{options:n}=t,{seg:r}=e,{ui:i}=r.eventRange,a=oi(r,n.eventTimeFormat||e.defaultTimeFormat,t,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return E(_a,Object.assign({},e,{elTag:"a",elStyle:{borderColor:i.borderColor,backgroundColor:i.backgroundColor},elAttrs:ci(r,t),defaultGenerator:Aa,timeText:a}),((e,t)=>E(D,null,E(e,{elTag:"div",elClasses:["fc-event-main"],elStyle:{color:t.textColor}}),Boolean(t.isStartResizable)&&E("div",{className:"fc-event-resizer fc-event-resizer-start"}),Boolean(t.isEndResizable)&&E("div",{className:"fc-event-resizer fc-event-resizer-end"}))))}}function Aa(e){return E("div",{className:"fc-event-main-frame"},e.timeText&&E("div",{className:"fc-event-time"},e.timeText),E("div",{className:"fc-event-title-container"},E("div",{className:"fc-event-title fc-sticky"},e.event.title||E(D,null,"\xa0"))))}const Sa=pn({day:"numeric"});class Ma extends Ir{constructor(){super(...arguments),this.refineRenderProps=Qt(ka)}render(){let{props:e,context:t}=this,{options:n}=t,r=this.refineRenderProps({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,isMonthStart:e.isMonthStart||!1,showDayNumber:e.showDayNumber,extraRenderProps:e.extraRenderProps,viewApi:t.viewApi,dateEnv:t.dateEnv,monthStartFormat:n.monthStartFormat});return E(zi,Object.assign({},e,{elClasses:[...cr(r,t.theme),...e.elClasses||[]],elAttrs:Object.assign(Object.assign({},e.elAttrs),r.isDisabled?{}:{"data-date":Zt(e.date)}),renderProps:r,generatorName:"dayCellContent",customGenerator:n.dayCellContent,defaultGenerator:e.defaultGenerator,classNameGenerator:r.isDisabled?void 0:n.dayCellClassNames,didMount:n.dayCellDidMount,willUnmount:n.dayCellWillUnmount}))}}function Ta(e){return Boolean(e.dayCellContent||Pi("dayCellContent",e))}function ka(e){let{date:t,dateEnv:n,dateProfile:r,isMonthStart:i}=e,a=lr(t,e.todayRange,null,r),o=e.showDayNumber?n.format(t,i?e.monthStartFormat:Sa):"";return Object.assign(Object.assign(Object.assign({date:n.toDate(t),view:e.viewApi},a),{isMonthStart:i,dayNumberText:o}),e.extraRenderProps)}class Ea extends Ir{render(){let{props:e}=this,{seg:t}=e;return E(_a,{elTag:"div",elClasses:["fc-bg-event"],elStyle:{backgroundColor:t.eventRange.ui.backgroundColor},defaultGenerator:Ca,seg:t,timeText:"",isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday,disableDragging:!0,disableResizing:!0})}}function Ca(e){let{title:t}=e.event;return t&&E("div",{className:"fc-event-title"},e.event.title)}function Da(e){return E("div",{className:`fc-${e}`})}const Ra=e=>E(Pr.Consumer,null,(t=>{let{dateEnv:n,options:r}=t,{date:i}=e,a=r.weekNumberFormat||e.defaultFormat,o={num:n.computeWeekNumber(i),text:n.format(i,a),date:i};return E(zi,Object.assign({},e,{renderProps:o,generatorName:"weekNumberContent",customGenerator:r.weekNumberContent,defaultGenerator:Pa,classNameGenerator:r.weekNumberClassNames,didMount:r.weekNumberDidMount,willUnmount:r.weekNumberWillUnmount}))}));function Pa(e){return e.text}class Oa extends Ir{constructor(){super(...arguments),this.state={titleId:tt()},this.handleRootEl=e=>{this.rootEl=e,this.props.elRef&&zr(this.props.elRef,e)},this.handleDocumentMouseDown=e=>{const t=Qe(e);this.rootEl.contains(t)||this.handleCloseClick()},this.handleDocumentKeyDown=e=>{"Escape"===e.key&&this.handleCloseClick()},this.handleCloseClick=()=>{let{onClose:e}=this.props;e&&e()}}render(){let{theme:e,options:t}=this.context,{props:n,state:r}=this,i=["fc-popover",e.getClass("popover")].concat(n.extraClassNames||[]);return Ce(E("div",Object.assign({},n.extraAttrs,{id:n.id,className:i.join(" "),"aria-labelledby":r.titleId,ref:this.handleRootEl}),E("div",{className:"fc-popover-header "+e.getClass("popoverHeader")},E("span",{className:"fc-popover-title",id:r.titleId},n.title),E("span",{className:"fc-popover-close "+e.getIconClass("close"),title:t.closeHint,onClick:this.handleCloseClick})),E("div",{className:"fc-popover-body "+e.getClass("popoverContent")},n.children)),n.parentEl)}componentDidMount(){document.addEventListener("mousedown",this.handleDocumentMouseDown),document.addEventListener("keydown",this.handleDocumentKeyDown),this.updateSize()}componentWillUnmount(){document.removeEventListener("mousedown",this.handleDocumentMouseDown),document.removeEventListener("keydown",this.handleDocumentKeyDown)}updateSize(){let{isRtl:e}=this.context,{alignmentEl:t,alignGridTop:n}=this.props,{rootEl:r}=this,i=function(e){let t=br(e),n=e.getBoundingClientRect();for(let r of t){let e=Qn(n,r.getBoundingClientRect());if(!e)return null;n=e}return n}(t);if(i){let a=r.getBoundingClientRect(),o=n?$e(t,".fc-scrollgrid").getBoundingClientRect().top:i.top,s=e?i.right-a.width:i.left;o=Math.max(o,10),s=Math.min(s,document.documentElement.clientWidth-10-a.width),s=Math.max(s,10);let l=r.offsetParent.getBoundingClientRect();Ke(r,{top:o-l.top,left:s-l.left})}}}class La extends Nr{constructor(){super(...arguments),this.handleRootEl=e=>{this.rootEl=e,e?this.context.registerInteractiveComponent(this,{el:e,useEventCenter:!1}):this.context.unregisterInteractiveComponent(this)}}render(){let{options:e,dateEnv:t}=this.context,{props:n}=this,{startDate:r,todayRange:i,dateProfile:a}=n,o=t.format(r,e.dayPopoverFormat);return E(Ma,{elRef:this.handleRootEl,date:r,dateProfile:a,todayRange:i},((t,r,i)=>E(Oa,{elRef:i.ref,id:n.id,title:o,extraClassNames:["fc-more-popover"].concat(i.className||[]),extraAttrs:i,parentEl:n.parentEl,alignmentEl:n.alignmentEl,alignGridTop:n.alignGridTop,onClose:n.onClose},Ta(e)&&E(t,{elTag:"div",elClasses:["fc-more-popover-misc"]}),n.children)))}queryHit(e,t,n,r){let{rootEl:i,props:a}=this;return e>=0&&e=0&&t{this.linkEl=e,this.props.elRef&&zr(this.props.elRef,e)},this.handleClick=e=>{let{props:t,context:n}=this,{moreLinkClick:r}=n.options,i=Na(t).start;function a(e){let{def:t,instance:r,range:i}=e.eventRange;return{event:new Yr(n,t,r),start:n.dateEnv.toDate(i.start),end:n.dateEnv.toDate(i.end),isStart:e.isStart,isEnd:e.isEnd}}"function"===typeof r&&(r=r({date:i,allDay:Boolean(t.allDayDate),allSegs:t.allSegs.map(a),hiddenSegs:t.hiddenSegs.map(a),jsEvent:e,view:n.viewApi})),r&&"popover"!==r?"string"===typeof r&&n.calendarApi.zoomTo(i,r):this.setState({isPopoverOpen:!0})},this.handlePopoverClose=()=>{this.setState({isPopoverOpen:!1})}}render(){let{props:e,state:t}=this;return E(Pr.Consumer,null,(n=>{let{viewApi:r,options:i,calendarApi:a}=n,{moreLinkText:o}=i,{moreCnt:s}=e,l=Na(e),c="function"===typeof o?o.call(a,s):`+${s} ${o}`,u=ft(i.moreLinkHint,[s],c),d={num:s,shortText:`+${s}`,text:c,view:r};return E(D,null,Boolean(e.moreCnt)&&E(zi,{elTag:e.elTag||"a",elRef:this.handleLinkEl,elClasses:[...e.elClasses||[],"fc-more-link"],elStyle:e.elStyle,elAttrs:Object.assign(Object.assign(Object.assign({},e.elAttrs),at(this.handleClick)),{title:u,"aria-expanded":t.isPopoverOpen,"aria-controls":t.isPopoverOpen?t.popoverId:""}),renderProps:d,generatorName:"moreLinkContent",customGenerator:i.moreLinkContent,defaultGenerator:e.defaultGenerator||za,classNameGenerator:i.moreLinkClassNames,didMount:i.moreLinkDidMount,willUnmount:i.moreLinkWillUnmount},e.children),t.isPopoverOpen&&E(La,{id:t.popoverId,startDate:l.start,endDate:l.end,dateProfile:e.dateProfile,todayRange:e.todayRange,extraDateSpan:e.extraDateSpan,parentEl:this.parentEl,alignmentEl:e.alignmentElRef?e.alignmentElRef.current:this.linkEl,alignGridTop:e.alignGridTop,forceTimed:e.forceTimed,onClose:this.handlePopoverClose},e.popoverContent()))}))}componentDidMount(){this.updateParentEl()}componentDidUpdate(){this.updateParentEl()}updateParentEl(){this.linkEl&&(this.parentEl=$e(this.linkEl,".fc-view-harness"))}}function za(e){return e.text}function Na(e){if(e.allDayDate)return{start:e.allDayDate,end:Nt(e.allDayDate,1)};let{hiddenSegs:t}=e;return{start:(n=t,n.reduce(Fa).eventRange.range.start),end:Ba(t)};var n}function Fa(e,t){return e.eventRange.range.startt.eventRange.range.end?e:t}class Ua extends Ir{render(){let{props:e,context:t}=this,{options:n}=t,r={view:t.viewApi};return E(zi,Object.assign({},e,{elTag:e.elTag||"div",elClasses:[...Va(e.viewSpec),...e.elClasses||[]],renderProps:r,classNameGenerator:n.viewClassNames,generatorName:void 0,didMount:n.viewDidMount,willUnmount:n.viewWillUnmount}),(()=>e.children))}}function Va(e){return[`fc-${e.type}-view`,"fc-view"]}const Ha={id:String,defaultAllDay:Boolean,url:String,format:String,events:Mn,eventDataTransform:Mn,success:Mn,failure:Mn};function Wa(e,t){let n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ga(t);if("string"===typeof e?n={url:e}:"function"===typeof e||Array.isArray(e)?n={events:e}:"object"===typeof e&&e&&(n=e),n){let{refined:i,extra:a}=Sn(n,r),o=function(e,t){let n=t.pluginHooks.eventSourceDefs;for(let r=n.length-1;r>=0;r-=1){let t=n[r].parseMeta(e);if(t)return{sourceDefId:r,meta:t}}return null}(i,t);if(o)return{_raw:e,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:i.defaultAllDay,eventDataTransform:i.eventDataTransform,success:i.success,failure:i.failure,publicId:i.id||"",sourceId:lt(),sourceDefId:o.sourceDefId,meta:o.meta,ui:Nn(i,t),extendedProps:a}}return null}function Ga(e){return Object.assign(Object.assign(Object.assign({},In),Ha),e.pluginHooks.eventSourceRefiners)}class qa{getCurrentData(){return this.currentDataManager.getCurrentData()}dispatch(e){this.currentDataManager.dispatch(e)}get view(){return this.getCurrentData().viewApi}batchRendering(e){e()}updateSize(){this.trigger("_resize",!0)}setOption(e,t){this.dispatch({type:"SET_OPTION",optionName:e,rawOptionValue:t})}getOption(e){return this.currentDataManager.currentCalendarOptionsInput[e]}getAvailableLocaleCodes(){return Object.keys(this.getCurrentData().availableRawLocales)}on(e,t){let{currentDataManager:n}=this;n.currentCalendarOptionsRefiners[e]?n.emitter.on(e,t):console.warn(`Unknown listener name '${e}'`)}off(e,t){this.currentDataManager.emitter.off(e,t)}trigger(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{if(this.unselect(),t)if(t.start&&t.end)this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e}),this.dispatch({type:"SET_OPTION",optionName:"visibleRange",rawOptionValue:t});else{let{dateEnv:n}=this.getCurrentData();this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e,dateMarker:n.createMarker(t)})}else this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e})}))}zoomTo(e,t){let n;t=t||"day",n=this.getCurrentData().viewSpecs[t]||this.getUnitViewSpec(t),this.unselect(),n?this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:n.type,dateMarker:e}):this.dispatch({type:"CHANGE_DATE",dateMarker:e})}getUnitViewSpec(e){let t,n,{viewSpecs:r,toolbarConfig:i}=this.getCurrentData(),a=[].concat(i.header?i.header.viewsWithButtons:[],i.footer?i.footer.viewsWithButtons:[]);for(let o in r)a.push(o);for(t=0;t{this.dispatch({type:"REMOVE_EVENTS",eventStore:$r(e)})}})}getEventById(e){let t=this.getCurrentData(),{defs:n,instances:r}=t.eventStore;e=String(e);for(let i in n){let a=n[i];if(a.publicId===e){if(a.recurringDef)return new Yr(t,a,null);for(let e in r){let n=r[e];if(n.defId===a.defId)return new Yr(t,a,n)}}}return null}getEvents(){let e=this.getCurrentData();return Xr(e.eventStore,e)}removeAllEvents(){this.dispatch({type:"REMOVE_ALL_EVENTS"})}getEventSources(){let e=this.getCurrentData(),t=e.eventSources,n=[];for(let r in t)n.push(new qr(e,t[r]));return n}getEventSourceById(e){let t=this.getCurrentData(),n=t.eventSources;e=String(e);for(let r in n)if(n[r].publicId===e)return new qr(t,n[r]);return null}addEventSource(e){let t=this.getCurrentData();if(e instanceof qr)return t.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e.internalEventSource]}),e;let n=Wa(e,t);return n?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[n]}),new qr(t,n)):null}removeAllEventSources(){this.dispatch({type:"REMOVE_ALL_EVENT_SOURCES"})}refetchEvents(){this.dispatch({type:"FETCH_EVENT_SOURCES",isRefetch:!0})}scrollToTime(e){let t=yt(e);t&&this.trigger("_scrollRequest",{time:t})}}class Ya{constructor(){this.handlers=[]}set(e){this.currentValue=e;for(let t of this.handlers)t(e)}subscribe(e){this.handlers.push(e),void 0!==this.currentValue&&e(this.currentValue)}}class $a extends Ya{constructor(){super(...arguments),this.map=new Map}handle(e){const{map:t}=this;let n=!1;e.isActive?(t.set(e.id,e),n=!0):t.has(e.id)&&(t.delete(e.id),n=!0),n&&this.set(t)}}const Xa=[],Za={code:"en",week:{dow:0,doy:4},direction:"ltr",buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day",list:"list"},weekText:"W",weekTextLong:"Week",closeHint:"Close",timeHint:"Time",eventHint:"Event",allDayText:"all-day",moreLinkText:"more",noEventsText:"No events to display"},Ka=Object.assign(Object.assign({},Za),{buttonHints:{prev:"Previous $0",next:"Next $0",today:(e,t)=>"day"===t?"Today":`This ${e}`},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint:e=>`Show ${e} more event${1===e?"":"s"}`});function Ja(e){let t=e.length>0?e[0].code:"en",n=Xa.concat(e),r={en:Ka};for(let i of n)r[i.code]=i;return{map:r,defaultCode:t}}function Qa(e,t){return"object"!==typeof e||Array.isArray(e)?function(e,t){let n=[].concat(e||[]),r=function(e,t){for(let n=0;n0;e-=1){let n=r.slice(0,e).join("-");if(t[n])return t[n]}}return null}(n,t)||Ka;return eo(e,n,r)}(e,t):eo(e.code,[e.code],e)}function eo(e,t,n){let r=St([Za,n],["buttonText"]);delete r.code;let{week:i}=r;return delete r.week,{codeArg:e,codes:t,week:i,simpleNumberFormat:new Intl.NumberFormat(e),options:r}}function to(e){return{id:lt(),name:e.name,premiumReleaseDate:e.premiumReleaseDate?new Date(e.premiumReleaseDate):void 0,deps:e.deps||[],reducers:e.reducers||[],isLoadingFuncs:e.isLoadingFuncs||[],contextInit:[].concat(e.contextInit||[]),eventRefiners:e.eventRefiners||{},eventDefMemberAdders:e.eventDefMemberAdders||[],eventSourceRefiners:e.eventSourceRefiners||{},isDraggableTransformers:e.isDraggableTransformers||[],eventDragMutationMassagers:e.eventDragMutationMassagers||[],eventDefMutationAppliers:e.eventDefMutationAppliers||[],dateSelectionTransformers:e.dateSelectionTransformers||[],datePointTransforms:e.datePointTransforms||[],dateSpanTransforms:e.dateSpanTransforms||[],views:e.views||{},viewPropsTransformers:e.viewPropsTransformers||[],isPropsValid:e.isPropsValid||null,externalDefTransforms:e.externalDefTransforms||[],viewContainerAppends:e.viewContainerAppends||[],eventDropTransformers:e.eventDropTransformers||[],componentInteractions:e.componentInteractions||[],calendarInteractions:e.calendarInteractions||[],themeClasses:e.themeClasses||{},eventSourceDefs:e.eventSourceDefs||[],cmdFormatter:e.cmdFormatter,recurringTypes:e.recurringTypes||[],namedTimeZonedImpl:e.namedTimeZonedImpl,initialView:e.initialView||"",elementDraggingImpl:e.elementDraggingImpl,optionChangeHandlers:e.optionChangeHandlers||{},scrollGridImpl:e.scrollGridImpl||null,listenerRefiners:e.listenerRefiners||{},optionRefiners:e.optionRefiners||{},propSetHandlers:e.propSetHandlers||{}}}function no(){let e,t=[],n=[];return(r,i)=>(e&&Lt(r,t)&&Lt(i,n)||(e=function(e,t){let n={},r={premiumReleaseDate:void 0,reducers:[],isLoadingFuncs:[],contextInit:[],eventRefiners:{},eventDefMemberAdders:[],eventSourceRefiners:{},isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],viewContainerAppends:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,initialView:"",elementDraggingImpl:null,optionChangeHandlers:{},scrollGridImpl:null,listenerRefiners:{},optionRefiners:{},propSetHandlers:{}};function i(e){for(let o of e){const e=o.name,s=n[e];void 0===s?(n[e]=o.id,i(o.deps),a=o,r={premiumReleaseDate:ro((t=r).premiumReleaseDate,a.premiumReleaseDate),reducers:t.reducers.concat(a.reducers),isLoadingFuncs:t.isLoadingFuncs.concat(a.isLoadingFuncs),contextInit:t.contextInit.concat(a.contextInit),eventRefiners:Object.assign(Object.assign({},t.eventRefiners),a.eventRefiners),eventDefMemberAdders:t.eventDefMemberAdders.concat(a.eventDefMemberAdders),eventSourceRefiners:Object.assign(Object.assign({},t.eventSourceRefiners),a.eventSourceRefiners),isDraggableTransformers:t.isDraggableTransformers.concat(a.isDraggableTransformers),eventDragMutationMassagers:t.eventDragMutationMassagers.concat(a.eventDragMutationMassagers),eventDefMutationAppliers:t.eventDefMutationAppliers.concat(a.eventDefMutationAppliers),dateSelectionTransformers:t.dateSelectionTransformers.concat(a.dateSelectionTransformers),datePointTransforms:t.datePointTransforms.concat(a.datePointTransforms),dateSpanTransforms:t.dateSpanTransforms.concat(a.dateSpanTransforms),views:Object.assign(Object.assign({},t.views),a.views),viewPropsTransformers:t.viewPropsTransformers.concat(a.viewPropsTransformers),isPropsValid:a.isPropsValid||t.isPropsValid,externalDefTransforms:t.externalDefTransforms.concat(a.externalDefTransforms),viewContainerAppends:t.viewContainerAppends.concat(a.viewContainerAppends),eventDropTransformers:t.eventDropTransformers.concat(a.eventDropTransformers),calendarInteractions:t.calendarInteractions.concat(a.calendarInteractions),componentInteractions:t.componentInteractions.concat(a.componentInteractions),themeClasses:Object.assign(Object.assign({},t.themeClasses),a.themeClasses),eventSourceDefs:t.eventSourceDefs.concat(a.eventSourceDefs),cmdFormatter:a.cmdFormatter||t.cmdFormatter,recurringTypes:t.recurringTypes.concat(a.recurringTypes),namedTimeZonedImpl:a.namedTimeZonedImpl||t.namedTimeZonedImpl,initialView:t.initialView||a.initialView,elementDraggingImpl:t.elementDraggingImpl||a.elementDraggingImpl,optionChangeHandlers:Object.assign(Object.assign({},t.optionChangeHandlers),a.optionChangeHandlers),scrollGridImpl:a.scrollGridImpl||t.scrollGridImpl,listenerRefiners:Object.assign(Object.assign({},t.listenerRefiners),a.listenerRefiners),optionRefiners:Object.assign(Object.assign({},t.optionRefiners),a.optionRefiners),propSetHandlers:Object.assign(Object.assign({},t.propSetHandlers),a.propSetHandlers)}):s!==o.id&&console.warn(`Duplicate plugin '${e}'`)}var t,a}return e&&i(e),i(t),r}(r,i)),t=r,n=i,e)}function ro(e,t){return void 0===e?t:void 0===t?e:new Date(Math.max(e.valueOf(),t.valueOf()))}class io extends kr{}function ao(e,t,n,r){if(t[e])return t[e];let i=function(e,t,n,r){let i=n[e],a=r[e],o=e=>i&&null!==i[e]?i[e]:a&&null!==a[e]?a[e]:null,s=o("component"),l=o("superType"),c=null;if(l){if(l===e)throw new Error("Can't have a custom view type that references itself");c=ao(l,t,n,r)}!s&&c&&(s=c.component);if(!s)return null;return{type:e,component:s,defaults:Object.assign(Object.assign({},c?c.defaults:{}),i?i.rawOptions:{}),overrides:Object.assign(Object.assign({},c?c.overrides:{}),a?a.rawOptions:{})}}(e,t,n,r);return i&&(t[e]=i),i}function oo(e){return Tt(e,so)}function so(e){let t="function"===typeof e?{component:e}:e,{component:n}=t;return t.content?n=lo(t):!n||n.prototype instanceof Ir||(n=lo(Object.assign(Object.assign({},t),{content:n}))),{superType:t.type,component:n,rawOptions:t}}function lo(e){return t=>E(Pr.Consumer,null,(n=>E(zi,{elTag:"div",elClasses:Va(n.viewSpec),renderProps:Object.assign(Object.assign({},t),{nextDayThreshold:n.options.nextDayThreshold}),generatorName:void 0,customGenerator:e.content,classNameGenerator:e.classNames,didMount:e.didMount,willUnmount:e.willUnmount})))}function co(e,t,n,r){let i=oo(e),a=oo(t.views),o=function(e,t){let n,r={};for(n in e)ao(n,r,e,t);for(n in t)ao(n,r,e,t);return r}(i,a);return Tt(o,(e=>function(e,t,n,r,i){let a=e.overrides.duration||e.defaults.duration||r.duration||n.duration,o=null,s="",l="",c={};if(a&&(o=function(e){let t=JSON.stringify(e),n=uo[t];void 0===n&&(n=yt(e),uo[t]=n);return n}(a),o)){let e=wt(o);s=e.unit,1===e.value&&(l=s,c=t[s]?t[s].rawOptions:{})}let u=t=>{let n=t.buttonText||{},r=e.defaults.buttonTextKey;return null!=r&&null!=n[r]?n[r]:null!=n[e.type]?n[e.type]:null!=n[l]?n[l]:null},d=t=>{let n=t.buttonHints||{},r=e.defaults.buttonTextKey;return null!=r&&null!=n[r]?n[r]:null!=n[e.type]?n[e.type]:null!=n[l]?n[l]:null};return{type:e.type,component:e.component,duration:o,durationUnit:s,singleUnit:l,optionDefaults:e.defaults,optionOverrides:Object.assign(Object.assign({},c),e.overrides),buttonTextOverride:u(r)||u(n)||e.overrides.buttonText,buttonTextDefault:u(i)||e.defaults.buttonText||u(gn)||e.type,buttonTitleOverride:d(r)||d(n)||e.overrides.buttonHint,buttonTitleDefault:d(i)||e.defaults.buttonHint||d(gn)}}(e,a,t,n,r)))}io.prototype.classes={root:"fc-theme-standard",tableCellShaded:"fc-cell-shaded",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active"},io.prototype.baseIconClass="fc-icon",io.prototype.iconClasses={close:"fc-icon-x",prev:"fc-icon-chevron-left",next:"fc-icon-chevron-right",prevYear:"fc-icon-chevrons-left",nextYear:"fc-icon-chevrons-right"},io.prototype.rtlIconClasses={prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"},io.prototype.iconOverrideOption="buttonIcons",io.prototype.iconOverrideCustomButtonOption="icon",io.prototype.iconOverridePrefix="fc-icon-";let uo={};function ho(e,t,n){let r=t?t.activeRange:null;return mo({},function(e,t){let n=Ga(t),r=[].concat(e.eventSources||[]),i=[];e.initialEvents&&r.unshift(e.initialEvents);e.events&&r.unshift(e.events);for(let a of r){let e=Wa(a,t,n);e&&i.push(e)}return i}(e,n),r,n)}function fo(e,t,n,r){let i=n?n.activeRange:null;switch(t.type){case"ADD_EVENT_SOURCES":return mo(e,t.sources,i,r);case"REMOVE_EVENT_SOURCE":return a=e,o=t.sourceId,Mt(a,(e=>e.sourceId!==o));case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return n?go(e,i,r):e;case"FETCH_EVENT_SOURCES":return vo(e,t.sourceIds?kt(t.sourceIds):xo(e,r),i,t.isRefetch||!1,r);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return function(e,t,n,r){let i=e[t];if(i&&n===i.latestFetchId)return Object.assign(Object.assign({},e),{[t]:Object.assign(Object.assign({},i),{isFetching:!1,fetchRange:r})});return e}(e,t.sourceId,t.fetchId,t.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return e}var a,o}function po(e){for(let t in e)if(e[t].isFetching)return!0;return!1}function mo(e,t,n,r){let i={};for(let a of t)i[a.sourceId]=a;return n&&(i=go(i,n,r)),Object.assign(Object.assign({},e),i)}function go(e,t,n){return vo(e,Mt(e,(e=>function(e,t,n){if(!bo(e,n))return!e.latestFetchId;return!n.options.lazyFetching||!e.fetchRange||e.isFetching||t.starte.fetchRange.end}(e,t,n))),t,!1,n)}function vo(e,t,n,r,i){let a={};for(let o in e){let s=e[o];t[o]?a[o]=yo(s,n,r,i):a[o]=s}return a}function yo(e,t,n,r){let{options:i,calendarApi:a}=r,o=r.pluginHooks.eventSourceDefs[e.sourceDefId],s=lt();return o.fetch({eventSource:e,range:t,isRefetch:n,context:r},(n=>{let{rawEvents:o}=n;i.eventSourceSuccess&&(o=i.eventSourceSuccess.call(a,o,n.response)||o),e.success&&(o=e.success.call(a,o,n.response)||o),r.dispatch({type:"RECEIVE_EVENTS",sourceId:e.sourceId,fetchId:s,fetchRange:t,rawEvents:o})}),(n=>{let o=!1;i.eventSourceFailure&&(i.eventSourceFailure.call(a,n),o=!0),e.failure&&(e.failure(n),o=!0),o||console.warn(n.message,n),r.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:e.sourceId,fetchId:s,fetchRange:t,error:n})})),Object.assign(Object.assign({},e),{isFetching:!0,latestFetchId:s})}function xo(e,t){return Mt(e,(e=>bo(e,t)))}function bo(e,t){return!t.pluginHooks.eventSourceDefs[e.sourceDefId].ignoreRange}function _o(e,t){switch(t.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return t.selection;default:return e}}function wo(e,t){switch(t.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return t.eventInstanceId;default:return e}}function Ao(e,t){let n;switch(t.type){case"UNSET_EVENT_DRAG":return null;case"SET_EVENT_DRAG":return n=t.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function So(e,t){let n;switch(t.type){case"UNSET_EVENT_RESIZE":return null;case"SET_EVENT_RESIZE":return n=t.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function Mo(e,t,n,r,i){return{header:e.headerToolbar?To(e.headerToolbar,e,t,n,r,i):null,footer:e.footerToolbar?To(e.footerToolbar,e,t,n,r,i):null}}function To(e,t,n,r,i,a){let o={},s=[],l=!1;for(let c in e){let u=ko(e[c],t,n,r,i,a);o[c]=u.widgets,s.push(...u.viewsWithButtons),l=l||u.hasTitle}return{sectionWidgets:o,viewsWithButtons:s,hasTitle:l}}function ko(e,t,n,r,i,a){let o="rtl"===t.direction,s=t.customButtons||{},l=n.buttonText||{},c=t.buttonText||{},u=n.buttonHints||{},d=t.buttonHints||{},h=e?e.split(" "):[],f=[],p=!1;return{widgets:h.map((e=>e.split(",").map((e=>{if("title"===e)return p=!0,{buttonName:e};let n,h,m,g,v,y;if(n=s[e])m=e=>{n.click&&n.click.call(e.target,e,e.target)},(g=r.getCustomButtonIconClass(n))||(g=r.getIconClass(e,o))||(v=n.text),y=n.hint||n.text;else if(h=i[e]){f.push(e),m=()=>{a.changeView(e)},(v=h.buttonTextOverride)||(g=r.getIconClass(e,o))||(v=h.buttonTextDefault);let n=h.buttonTextOverride||h.buttonTextDefault;y=ft(h.buttonTitleOverride||h.buttonTitleDefault||t.viewHint,[n,e],n)}else if(a[e])if(m=()=>{a[e]()},(v=l[e])||(g=r.getIconClass(e,o))||(v=c[e]),"prevYear"===e||"nextYear"===e){let t="prevYear"===e?"prev":"next";y=ft(u[t]||d[t],[c.year||"year","year"],c[e])}else y=t=>ft(u[e]||d[e],[c[t]||t,t],c[e]);return{buttonName:e,buttonClick:m,buttonIcon:g,buttonText:v,buttonHint:y}})))),viewsWithButtons:f,hasTitle:p}}class Eo{constructor(e,t,n){this.type=e,this.getCurrentData=t,this.dateEnv=n}get calendar(){return this.getCurrentData().calendarApi}get title(){return this.getCurrentData().viewTitle}get activeStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start)}get activeEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end)}get currentStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start)}get currentEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end)}getOption(e){return this.getCurrentData().options[e]}}const Co=to({name:"array-event-source",eventSourceDefs:[{ignoreRange:!0,parseMeta:e=>Array.isArray(e.events)?e.events:null,fetch(e,t){t({rawEvents:e.eventSource.meta})}}]});const Do=to({name:"func-event-source",eventSourceDefs:[{parseMeta:e=>"function"===typeof e.events?e.events:null,fetch(e,t,n){const{dateEnv:r}=e.context;!function(e,t,n){let r=!1,i=function(e){r||(r=!0,t(e))},a=function(e){r||(r=!0,n(e))},o=e(i,a);o&&"function"===typeof o.then&&o.then(i,a)}(e.eventSource.meta.bind(null,hi(e.range,r)),(e=>t({rawEvents:e})),n)}}]}),Ro={method:String,extraParams:Mn,startParam:String,endParam:String,timeZoneParam:String};let Po={parseMeta:e=>!e.url||"json"!==e.format&&e.format?null:{url:e.url,format:"json",method:(e.method||"GET").toUpperCase(),extraParams:e.extraParams,startParam:e.startParam,endParam:e.endParam,timeZoneParam:e.timeZoneParam},fetch(e,t,n){const{meta:r}=e.eventSource,i=function(e,t,n){let r,i,a,o,{dateEnv:s,options:l}=n,c={};r=e.startParam,null==r&&(r=l.startParam);i=e.endParam,null==i&&(i=l.endParam);a=e.timeZoneParam,null==a&&(a=l.timeZoneParam);o="function"===typeof e.extraParams?e.extraParams():e.extraParams||{};Object.assign(c,o),c[r]=s.formatIso(t.start),c[i]=s.formatIso(t.end),"local"!==s.timeZone&&(c[a]=s.timeZone);return c}(r,e.range,e.context);(function(e,t,n){const r={method:e=e.toUpperCase()};return"GET"===e?t+=(-1===t.indexOf("?")?"?":"&")+new URLSearchParams(n):(r.body=new URLSearchParams(n),r.headers={"Content-Type":"application/x-www-form-urlencoded"}),fetch(t,r).then((e=>{if(e.ok)return e.json().then((t=>[t,e]),(()=>{throw new sa("Failure parsing JSON",e)}));throw new sa("Request failed",e)}))})(r.method,r.url,i).then((e=>{let[n,r]=e;t({rawEvents:n,response:r})}),n)}};const Oo=to({name:"json-event-source",eventSourceRefiners:Ro,eventSourceDefs:[Po]});const Lo={daysOfWeek:Mn,startTime:yt,endTime:yt,duration:yt,startRecur:Mn,endRecur:Mn};const Io=to({name:"simple-recurring-event",recurringTypes:[{parse(e,t){if(e.daysOfWeek||e.startTime||e.endTime||e.startRecur||e.endRecur){let i,a={daysOfWeek:e.daysOfWeek||null,startTime:e.startTime||null,endTime:e.endTime||null,startRecur:e.startRecur?t.createMarker(e.startRecur):null,endRecur:e.endRecur?t.createMarker(e.endRecur):null};return e.duration&&(i=e.duration),!i&&e.startTime&&e.endTime&&(n=e.endTime,r=e.startTime,i={years:n.years-r.years,months:n.months-r.months,days:n.days-r.days,milliseconds:n.milliseconds-r.milliseconds}),{allDayGuess:Boolean(!e.startTime&&!e.endTime),duration:i,typeData:a}}var n,r;return null},expand(e,t,n){let r=ir(t,{start:e.startRecur,end:e.endRecur});return r?function(e,t,n,r){let i=e?kt(e):null,a=Ut(n.start),o=n.end,s=[];for(;apo(e.eventSources)],propSetHandlers:{dateProfile:function(e,t){t.emitter.trigger("datesSet",Object.assign(Object.assign({},hi(e.activeRange,t.dateEnv)),{view:t.viewApi}))},eventStore:function(e,t){let{emitter:n}=t;n.hasHandlers("eventsSet")&&n.trigger("eventsSet",Xr(e,t))}}})];class Bo{constructor(e,t){this.runTaskOption=e,this.drainedOption=t,this.queue=[],this.delayedRunner=new la(this.drain.bind(this))}request(e,t){this.queue.push(e),this.delayedRunner.request(t)}pause(e){this.delayedRunner.pause(e)}resume(e,t){this.delayedRunner.resume(e,t)}drain(){let{queue:e}=this;for(;e.length;){let t,n=[];for(;t=e.shift();)this.runTask(t),n.push(t);this.drained(n)}}runTask(e){this.runTaskOption&&this.runTaskOption(e)}drained(e){this.drainedOption&&this.drainedOption(e)}}function jo(e,t,n){let r;return r=/^(year|month)$/.test(e.currentRangeUnit)?e.currentRange:e.activeRange,n.formatRange(r.start,r.end,pn(t.titleFormat||function(e){let{currentRangeUnit:t}=e;if("year"===t)return{year:"numeric"};if("month"===t)return{year:"numeric",month:"long"};let n=jt(e.currentRange.start,e.currentRange.end);if(null!==n&&n>1)return{year:"numeric",month:"short",day:"numeric"};return{year:"numeric",month:"long",day:"numeric"}}(e)),{isEndExclusive:e.isRangeAllDay,defaultSeparator:t.titleRangeSeparator})}class Uo{constructor(e){this.computeCurrentViewData=Jt(this._computeCurrentViewData),this.organizeRawLocales=Jt(Ja),this.buildLocale=Jt(Qa),this.buildPluginHooks=no(),this.buildDateEnv=Jt(Vo),this.buildTheme=Jt(Ho),this.parseToolbars=Jt(Mo),this.buildViewSpecs=Jt(co),this.buildDateProfileGenerator=Qt(Wo),this.buildViewApi=Jt(Go),this.buildViewUiProps=Qt($o),this.buildEventUiBySource=Jt(qo,Ct),this.buildEventUiBases=Jt(Yo),this.parseContextBusinessHours=Qt(Zo),this.buildTitle=Jt(jo),this.emitter=new _r,this.actionRunner=new Bo(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.optionsForRefining=[],this.optionsForHandling=[],this.getCurrentData=()=>this.data,this.dispatch=e=>{this.actionRunner.request(e)},this.props=e,this.actionRunner.pause();let t={},n=this.computeOptionsData(e.optionOverrides,t,e.calendarApi),r=n.calendarOptions.initialView||n.pluginHooks.initialView,i=this.computeCurrentViewData(r,n,e.optionOverrides,t);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(i.options);let a=function(e,t){let n=e.initialDate;return null!=n?t.createMarker(n):Fr(e.now,t)}(n.calendarOptions,n.dateEnv),o=i.dateProfileGenerator.build(a);sr(o.activeRange,a)||(a=o.currentRange.start);let s={dateEnv:n.dateEnv,options:n.calendarOptions,pluginHooks:n.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData};for(let d of n.pluginHooks.contextInit)d(s);let l=ho(n.calendarOptions,o,s),c={dynamicOptionOverrides:t,currentViewType:r,currentDate:a,dateProfile:o,businessHours:this.parseContextBusinessHours(s),eventSources:l,eventUiBases:{},eventStore:{defs:{},instances:{}},renderableEventStore:{defs:{},instances:{}},dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(s).selectionConfig},u=Object.assign(Object.assign({},s),c);for(let d of n.pluginHooks.reducers)Object.assign(c,d(null,null,u));Xo(c,s)&&this.emitter.trigger("loading",!0),this.state=c,this.updateData(),this.actionRunner.resume()}resetOptions(e,t){let{props:n}=this;void 0===t?n.optionOverrides=e:(n.optionOverrides=Object.assign(Object.assign({},n.optionOverrides||{}),e),this.optionsForRefining.push(...t)),(void 0===t||t.length)&&this.actionRunner.request({type:"NOTHING"})}_handleAction(e){let{props:t,state:n,emitter:r}=this,i=function(e,t){return"SET_OPTION"===t.type?Object.assign(Object.assign({},e),{[t.optionName]:t.rawOptionValue}):e}(n.dynamicOptionOverrides,e),a=this.computeOptionsData(t.optionOverrides,i,t.calendarApi),o=function(e,t){"CHANGE_VIEW_TYPE"===t.type&&(e=t.viewType);return e}(n.currentViewType,e),s=this.computeCurrentViewData(o,a,t.optionOverrides,i);t.calendarApi.currentDataManager=this,r.setThisContext(t.calendarApi),r.setOptions(s.options);let l={dateEnv:a.dateEnv,options:a.calendarOptions,pluginHooks:a.pluginHooks,calendarApi:t.calendarApi,dispatch:this.dispatch,emitter:r,getCurrentData:this.getCurrentData},{currentDate:c,dateProfile:u}=n;this.data&&this.data.dateProfileGenerator!==s.dateProfileGenerator&&(u=s.dateProfileGenerator.build(c)),c=function(e,t){return"CHANGE_DATE"===t.type?t.dateMarker:e}(c,e),u=function(e,t,n,r){let i;switch(t.type){case"CHANGE_VIEW_TYPE":return r.build(t.dateMarker||n);case"CHANGE_DATE":return r.build(t.dateMarker);case"PREV":if(i=r.buildPrev(e,n),i.isValid)return i;break;case"NEXT":if(i=r.buildNext(e,n),i.isValid)return i}return e}(u,e,c,s.dateProfileGenerator),"PREV"!==e.type&&"NEXT"!==e.type&&sr(u.currentRange,c)||(c=u.currentRange.start);let d=fo(n.eventSources,e,u,l),h=Xi(n.eventStore,e,d,u,l),f=po(d)&&!s.options.progressiveEventRendering&&n.renderableEventStore||h,{eventUiSingleBase:p,selectionConfig:m}=this.buildViewUiProps(l),g=this.buildEventUiBySource(d),v={dynamicOptionOverrides:i,currentViewType:o,currentDate:c,dateProfile:u,eventSources:d,eventStore:h,renderableEventStore:f,selectionConfig:m,eventUiBases:this.buildEventUiBases(f.defs,p,g),businessHours:this.parseContextBusinessHours(l),dateSelection:_o(n.dateSelection,e),eventSelection:wo(n.eventSelection,e),eventDrag:Ao(n.eventDrag,e),eventResize:So(n.eventResize,e)},y=Object.assign(Object.assign({},l),v);for(let _ of a.pluginHooks.reducers)Object.assign(v,_(n,e,y));let x=Xo(n,l),b=Xo(v,l);!x&&b?r.trigger("loading",!0):x&&!b&&r.trigger("loading",!1),this.state=v,t.onAction&&t.onAction(e)}updateData(){let{props:e,state:t}=this,n=this.data,r=this.computeOptionsData(e.optionOverrides,t.dynamicOptionOverrides,e.calendarApi),i=this.computeCurrentViewData(t.currentViewType,r,e.optionOverrides,t.dynamicOptionOverrides),a=this.data=Object.assign(Object.assign(Object.assign({viewTitle:this.buildTitle(t.dateProfile,i.options,r.dateEnv),calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},r),i),t),o=r.pluginHooks.optionChangeHandlers,s=n&&n.calendarOptions,l=r.calendarOptions;if(s&&s!==l){s.timeZone!==l.timeZone&&(t.eventSources=a.eventSources=function(e,t,n){let r=t?t.activeRange:null;return vo(e,xo(e,n),r,!0,n)}(a.eventSources,t.dateProfile,a),t.eventStore=a.eventStore=Ji(a.eventStore,n.dateEnv,a.dateEnv),t.renderableEventStore=a.renderableEventStore=Ji(a.renderableEventStore,n.dateEnv,a.dateEnv));for(let e in o)-1===this.optionsForHandling.indexOf(e)&&s[e]===l[e]||o[e](l[e],a)}this.optionsForHandling=[],e.onData&&e.onData(a)}computeOptionsData(e,t,n){if(!this.optionsForRefining.length&&e===this.stableOptionOverrides&&t===this.stableDynamicOptionOverrides)return this.stableCalendarOptionsData;let{refinedOptions:r,pluginHooks:i,localeDefaults:a,availableLocaleData:o,extra:s}=this.processRawCalendarOptions(e,t);Ko(s);let l=this.buildDateEnv(r.timeZone,r.locale,r.weekNumberCalculation,r.firstDay,r.weekText,i,o,r.defaultRangeSeparator),c=this.buildViewSpecs(i.views,this.stableOptionOverrides,this.stableDynamicOptionOverrides,a),u=this.buildTheme(r,i),d=this.parseToolbars(r,this.stableOptionOverrides,u,c,n);return this.stableCalendarOptionsData={calendarOptions:r,pluginHooks:i,dateEnv:l,viewSpecs:c,theme:u,toolbarConfig:d,localeDefaults:a,availableRawLocales:o.map}}processRawCalendarOptions(e,t){let{locales:n,locale:r}=An([gn,e,t]),i=this.organizeRawLocales(n),a=i.map,o=this.buildLocale(r||i.defaultCode,a).options,s=this.buildPluginHooks(e.plugins||[],Fo),l=this.currentCalendarOptionsRefiners=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},mn),vn),yn),s.listenerRefiners),s.optionRefiners),c={},u=An([gn,o,e,t]),d={},h=this.currentCalendarOptionsInput,f=this.currentCalendarOptionsRefined,p=!1;for(let m in u)-1===this.optionsForRefining.indexOf(m)&&(u[m]===h[m]||xn[m]&&m in h&&xn[m](h[m],u[m]))?d[m]=f[m]:l[m]?(d[m]=l[m](u[m]),p=!0):c[m]=h[m];return p&&(this.currentCalendarOptionsInput=u,this.currentCalendarOptionsRefined=d,this.stableOptionOverrides=e,this.stableDynamicOptionOverrides=t),this.optionsForHandling.push(...this.optionsForRefining),this.optionsForRefining=[],{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:s,availableLocaleData:i,localeDefaults:o,extra:c}}_computeCurrentViewData(e,t,n,r){let i=t.viewSpecs[e];if(!i)throw new Error(`viewType "${e}" is not available. Please make sure you've loaded all neccessary plugins`);let{refinedOptions:a,extra:o}=this.processRawViewOptions(i,t.pluginHooks,t.localeDefaults,n,r);return Ko(o),{viewSpec:i,options:a,dateProfileGenerator:this.buildDateProfileGenerator({dateProfileGeneratorClass:i.optionDefaults.dateProfileGeneratorClass,duration:i.duration,durationUnit:i.durationUnit,usesMinMaxTime:i.optionDefaults.usesMinMaxTime,dateEnv:t.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:a.slotMinTime,slotMaxTime:a.slotMaxTime,showNonCurrentDates:a.showNonCurrentDates,dayCount:a.dayCount,dateAlignment:a.dateAlignment,dateIncrement:a.dateIncrement,hiddenDays:a.hiddenDays,weekends:a.weekends,nowInput:a.now,validRangeInput:a.validRange,visibleRangeInput:a.visibleRange,fixedWeekCount:a.fixedWeekCount}),viewApi:this.buildViewApi(e,this.getCurrentData,t.dateEnv)}}processRawViewOptions(e,t,n,r,i){let a=An([gn,e.optionDefaults,n,r,e.optionOverrides,i]),o=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},mn),vn),yn),wn),t.listenerRefiners),t.optionRefiners),s={},l=this.currentViewOptionsInput,c=this.currentViewOptionsRefined,u=!1,d={};for(let h in a)a[h]===l[h]||xn[h]&&xn[h](a[h],l[h])?s[h]=c[h]:(a[h]===this.currentCalendarOptionsInput[h]||xn[h]&&xn[h](a[h],this.currentCalendarOptionsInput[h])?h in this.currentCalendarOptionsRefined&&(s[h]=this.currentCalendarOptionsRefined[h]):o[h]?s[h]=o[h](a[h]):d[h]=a[h],u=!0);return u&&(this.currentViewOptionsInput=a,this.currentViewOptionsRefined=s),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:d}}}function Vo(e,t,n,r,i,a,o,s){let l=Qa(t||o.defaultCode,o.map);return new gi({calendarSystem:"gregory",timeZone:e,namedTimeZoneImpl:a.namedTimeZonedImpl,locale:l,weekNumberCalculation:n,firstDay:r,weekText:i,cmdFormatter:a.cmdFormatter,defaultSeparator:s})}function Ho(e,t){return new(t.themeClasses[e.themeSystem]||io)(e)}function Wo(e){return new(e.dateProfileGeneratorClass||Br)(e)}function Go(e,t,n){return new Eo(e,t,n)}function qo(e){return Tt(e,(e=>e.ui))}function Yo(e,t,n){let r={"":t};for(let i in e){let t=e[i];t.sourceId&&n[t.sourceId]&&(r[i]=n[t.sourceId])}return r}function $o(e){let{options:t}=e;return{eventUiSingleBase:Nn({display:t.eventDisplay,editable:t.editable,startEditable:t.eventStartEditable,durationEditable:t.eventDurationEditable,constraint:t.eventConstraint,overlap:"boolean"===typeof t.eventOverlap?t.eventOverlap:void 0,allow:t.eventAllow,backgroundColor:t.eventBackgroundColor,borderColor:t.eventBorderColor,textColor:t.eventTextColor,color:t.eventColor},e),selectionConfig:Nn({constraint:t.selectConstraint,overlap:"boolean"===typeof t.selectOverlap?t.selectOverlap:void 0,allow:t.selectAllow},e)}}function Xo(e,t){for(let n of t.pluginHooks.isLoadingFuncs)if(n(e))return!0;return!1}function Zo(e){return $n(e.options.businessHours,e)}function Ko(e,t){for(let n in e)console.warn(`Unknown option '${n}'`+(t?` for view '${t}'`:""))}class Jo extends Ir{render(){return E("div",{className:"fc-toolbar-chunk"},...this.props.widgetGroups.map((e=>this.renderWidgetGroup(e))))}renderWidgetGroup(e){let{props:t}=this,{theme:n}=this.context,r=[],i=!0;for(let a of e){let{buttonName:e,buttonClick:o,buttonText:s,buttonIcon:l,buttonHint:c}=a;if("title"===e)i=!1,r.push(E("h2",{className:"fc-toolbar-title",id:t.titleId},t.title));else{let i=e===t.activeButton,a=!t.isTodayEnabled&&"today"===e||!t.isPrevEnabled&&"prev"===e||!t.isNextEnabled&&"next"===e,u=[`fc-${e}-button`,n.getClass("button")];i&&u.push(n.getClass("buttonActive")),r.push(E("button",{type:"button",title:"function"===typeof c?c(t.navUnit):c,disabled:a,"aria-pressed":i,className:u.join(" "),onClick:o},s||(l?E("span",{className:l}):"")))}}if(r.length>1){return E("div",{className:i&&n.getClass("buttonGroup")||""},...r)}return r[0]}}class Qo extends Ir{render(){let e,t,{model:n,extraClassName:r}=this.props,i=!1,a=n.sectionWidgets,o=a.center;return a.left?(i=!0,e=a.left):e=a.start,a.right?(i=!0,t=a.right):t=a.end,E("div",{className:[r||"","fc-toolbar",i?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",e||[]),this.renderSection("center",o||[]),this.renderSection("end",t||[]))}renderSection(e,t){let{props:n}=this;return E(Jo,{key:e,widgetGroups:t,title:n.title,navUnit:n.navUnit,activeButton:n.activeButton,isTodayEnabled:n.isTodayEnabled,isPrevEnabled:n.isPrevEnabled,isNextEnabled:n.isNextEnabled,titleId:n.titleId})}}class es extends Ir{constructor(){super(...arguments),this.state={availableWidth:null},this.handleEl=e=>{this.el=e,zr(this.props.elRef,e),this.updateAvailableWidth()},this.handleResize=()=>{this.updateAvailableWidth()}}render(){let{props:e,state:t}=this,{aspectRatio:n}=e,r=["fc-view-harness",n||e.liquid||e.height?"fc-view-harness-active":"fc-view-harness-passive"],i="",a="";return n?null!==t.availableWidth?i=t.availableWidth/n:a=1/n*100+"%":i=e.height||"",E("div",{"aria-labelledby":e.labeledById,ref:this.handleEl,className:r.join(" "),style:{height:i,paddingBottom:a}},e.children)}componentDidMount(){this.context.addResizeHandler(this.handleResize)}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}updateAvailableWidth(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})}}class ts extends Ai{constructor(e){super(e),this.handleSegClick=(e,t)=>{let{component:n}=this,{context:r}=n,i=Jr(t);if(i&&n.isValidSegDownEl(e.target)){let a=$e(e.target,".fc-event-forced-url"),o=a?a.querySelector("a[href]").href:"";r.emitter.trigger("eventClick",{el:t,event:new Yr(n.context,i.eventRange.def,i.eventRange.instance),jsEvent:e,view:r.viewApi}),o&&!e.defaultPrevented&&(window.location.href=o)}},this.destroy=rt(e.el,"click",".fc-event",this.handleSegClick)}}class ns extends Ai{constructor(e){super(e),this.handleEventElRemove=e=>{e===this.currentSegEl&&this.handleSegLeave(null,this.currentSegEl)},this.handleSegEnter=(e,t)=>{Jr(t)&&(this.currentSegEl=t,this.triggerEvent("eventMouseEnter",e,t))},this.handleSegLeave=(e,t)=>{this.currentSegEl&&(this.currentSegEl=null,this.triggerEvent("eventMouseLeave",e,t))},this.removeHoverListeners=function(e,t,n,r){let i;return rt(e,"mouseover",t,((e,t)=>{if(t!==i){i=t,n(e,t);let a=e=>{i=null,r(e,t),t.removeEventListener("mouseleave",a)};t.addEventListener("mouseleave",a)}}))}(e.el,".fc-event",this.handleSegEnter,this.handleSegLeave)}destroy(){this.removeHoverListeners()}triggerEvent(e,t,n){let{component:r}=this,{context:i}=r,a=Jr(n);t&&!r.isValidSegDownEl(t.target)||i.emitter.trigger(e,{el:n,event:new Yr(i,a.eventRange.def,a.eventRange.instance),jsEvent:t,view:i.viewApi})}}class rs extends Lr{constructor(){super(...arguments),this.buildViewContext=Jt(Or),this.buildViewPropTransformers=Jt(as),this.buildToolbarProps=Jt(is),this.headerRef={current:null},this.footerRef={current:null},this.interactionsStore={},this.state={viewLabelId:tt()},this.registerInteractiveComponent=(e,t)=>{let n=function(e,t){return{component:e,el:t.el,useEventCenter:null==t.useEventCenter||t.useEventCenter,isHitComboAllowed:t.isHitComboAllowed||null}}(e,t),r=[ts,ns].concat(this.props.pluginHooks.componentInteractions).map((e=>new e(n)));this.interactionsStore[e.uid]=r,Mi[e.uid]=n},this.unregisterInteractiveComponent=e=>{let t=this.interactionsStore[e.uid];if(t){for(let e of t)e.destroy();delete this.interactionsStore[e.uid]}delete Mi[e.uid]},this.resizeRunner=new la((()=>{this.props.emitter.trigger("_resize",!0),this.props.emitter.trigger("windowResize",{view:this.props.viewApi})})),this.handleWindowResize=e=>{let{options:t}=this.props;t.handleWindowResize&&e.target===window&&this.resizeRunner.request(t.windowResizeDelay)}}render(){let e,{props:t}=this,{toolbarConfig:n,options:r}=t,i=this.buildToolbarProps(t.viewSpec,t.dateProfile,t.dateProfileGenerator,t.currentDate,Fr(t.options.now,t.dateEnv),t.viewTitle),a=!1,o="";t.isHeightAuto||t.forPrint?o="":null!=r.height?a=!0:null!=r.contentHeight?o=r.contentHeight:e=Math.max(r.aspectRatio,.5);let s=this.buildViewContext(t.viewSpec,t.viewApi,t.options,t.dateProfileGenerator,t.dateEnv,t.theme,t.pluginHooks,t.dispatch,t.getCurrentData,t.emitter,t.calendarApi,this.registerInteractiveComponent,this.unregisterInteractiveComponent),l=n.header&&n.header.hasTitle?this.state.viewLabelId:"";return E(Pr.Provider,{value:s},n.header&&E(Qo,Object.assign({ref:this.headerRef,extraClassName:"fc-header-toolbar",model:n.header,titleId:l},i)),E(es,{liquid:a,height:o,aspectRatio:e,labeledById:l},this.renderView(t),this.buildAppendContent()),n.footer&&E(Qo,Object.assign({ref:this.footerRef,extraClassName:"fc-footer-toolbar",model:n.footer,titleId:""},i)))}componentDidMount(){let{props:e}=this;this.calendarInteractions=e.pluginHooks.calendarInteractions.map((t=>new t(e))),window.addEventListener("resize",this.handleWindowResize);let{propSetHandlers:t}=e.pluginHooks;for(let n in t)t[n](e[n],e)}componentDidUpdate(e){let{props:t}=this,{propSetHandlers:n}=t.pluginHooks;for(let r in n)t[r]!==e[r]&&n[r](t[r],t)}componentWillUnmount(){window.removeEventListener("resize",this.handleWindowResize),this.resizeRunner.clear();for(let e of this.calendarInteractions)e.destroy();this.props.emitter.trigger("_unmount")}buildAppendContent(){let{props:e}=this;return E(D,{},...e.pluginHooks.viewContainerAppends.map((t=>t(e))))}renderView(e){let{pluginHooks:t}=e,{viewSpec:n}=e,r={dateProfile:e.dateProfile,businessHours:e.businessHours,eventStore:e.renderableEventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,isHeightAuto:e.isHeightAuto,forPrint:e.forPrint},i=this.buildViewPropTransformers(t.viewPropsTransformers);for(let a of i)Object.assign(r,a.transform(r,e));return E(n.component,Object.assign({},r))}}function is(e,t,n,r,i,a){let o=n.build(i,void 0,!1),s=n.buildPrev(t,r,!1),l=n.buildNext(t,r,!1);return{title:a,activeButton:e.type,navUnit:e.singleUnit,isTodayEnabled:o.isValid&&!sr(t.currentRange,i),isPrevEnabled:s.isValid,isNextEnabled:l.isValid}}function as(e){return e.map((e=>new e))}class os extends qa{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),this.isRendering=!1,this.isRendered=!1,this.currentClassNames=[],this.customContentRenderId=0,this.handleAction=e=>{switch(e.type){case"SET_EVENT_DRAG":case"SET_EVENT_RESIZE":this.renderRunner.tryDrain()}},this.handleData=e=>{this.currentData=e,this.renderRunner.request(e.calendarOptions.rerenderDelay)},this.handleRenderRequest=()=>{if(this.isRendering){this.isRendered=!0;let{currentData:e}=this;Er((()=>{J(E(Ei,{options:e.calendarOptions,theme:e.theme,emitter:e.emitter},((t,n,r,i)=>(this.setClassNames(t),this.setHeight(n),E(Ii.Provider,{value:this.customContentRenderId},E(rs,Object.assign({isHeightAuto:r,forPrint:i},e)))))),this.el)}))}else this.isRendered&&(this.isRendered=!1,J(null,this.el),this.setClassNames([]),this.setHeight(""))},function(e){e.isConnected&&We(e.getRootNode())}(e),this.el=e,this.renderRunner=new la(this.handleRenderRequest),new Uo({optionOverrides:t,calendarApi:this,onAction:this.handleAction,onData:this.handleData})}render(){let e=this.isRendering;e?this.customContentRenderId+=1:this.isRendering=!0,this.renderRunner.request(),e&&this.updateSize()}destroy(){this.isRendering&&(this.isRendering=!1,this.renderRunner.request())}updateSize(){Er((()=>{super.updateSize()}))}batchRendering(e){this.renderRunner.pause("batchRendering"),e(),this.renderRunner.resume("batchRendering")}pauseRendering(){this.renderRunner.pause("pauseRendering")}resumeRendering(){this.renderRunner.resume("pauseRendering",!0)}resetOptions(e,t){this.currentDataManager.resetOptions(e,t)}setClassNames(e){if(!Lt(e,this.currentClassNames)){let{classList:t}=this.el;for(let e of this.currentClassNames)t.remove(e);for(let n of e)t.add(n);this.currentClassNames=e}}setHeight(e){Je(this.el,"height",e)}}class ss extends h.Component{constructor(){super(...arguments),this.elRef=(0,h.createRef)(),this.isUpdating=!1,this.isUnmounting=!1,this.state={customRenderingMap:new Map},this.requestResize=()=>{this.isUnmounting||(this.cancelResize(),this.resizeId=requestAnimationFrame((()=>{this.doResize()})))}}render(){const e=[];for(const t of this.state.customRenderingMap.values())e.push(h.createElement(ls,{key:t.id,customRendering:t}));return h.createElement("div",{ref:this.elRef},e)}componentDidMount(){const e=new $a;let t;this.handleCustomRendering=e.handle.bind(e),this.calendar=new os(this.elRef.current,Object.assign(Object.assign({},this.props),{handleCustomRendering:this.handleCustomRendering})),this.calendar.render(),e.subscribe((e=>{const n=Date.now(),r=!t;(r||this.isUpdating||this.isUnmounting||n-t<100?cs:w.flushSync)((()=>{this.setState({customRenderingMap:e},(()=>{t=n,r?this.doResize():this.requestResize()}))}))}))}componentDidUpdate(){this.isUpdating=!0,this.calendar.resetOptions(Object.assign(Object.assign({},this.props),{handleCustomRendering:this.handleCustomRendering})),this.isUpdating=!1}componentWillUnmount(){this.isUnmounting=!0,this.cancelResize(),this.calendar.destroy()}doResize(){this.calendar.updateSize()}cancelResize(){void 0!==this.resizeId&&(cancelAnimationFrame(this.resizeId),this.resizeId=void 0)}getApi(){return this.calendar}}ss.act=cs;class ls extends h.PureComponent{render(){const{customRendering:e}=this.props,{generatorMeta:t}=e,n="function"===typeof t?t(e.renderProps):t;return(0,w.createPortal)(n,e.containerEl)}}function cs(e){e()}function us(e,t){let n=[];for(let r=0;r{let n=(e.eventDrag?e.eventDrag.affectedInstances:null)||(e.eventResize?e.eventResize.affectedInstances:null)||{};return E(D,null,t.map((t=>{let r=t.eventRange.instance.instanceId;return E("div",{className:"fc-daygrid-event-harness",key:r,style:{visibility:n[r]?"hidden":""}},ps(t)?E(gs,Object.assign({seg:t,isDragging:!1,isSelected:r===e.eventSelection,defaultDisplayEventEnd:!1},si(t,e.todayRange))):E(ms,Object.assign({seg:t,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:r===e.eventSelection,defaultDisplayEventEnd:!1},si(t,e.todayRange))))})))}})}}function xs(e){let t=[],n=[];for(let r of e)t.push(r.seg),r.isVisible||n.push(r.seg);return{allSegs:t,invisibleSegs:n}}const bs=pn({week:"narrow"});class _s extends Nr{constructor(){super(...arguments),this.rootElRef={current:null},this.state={dayNumberId:tt()},this.handleRootEl=e=>{zr(this.rootElRef,e),zr(this.props.elRef,e)}}render(){let{context:e,props:t,state:n,rootElRef:r}=this,{options:i,dateEnv:a}=e,{date:o,dateProfile:s}=t;const l=t.showDayNumber&&function(e,t,n){const{start:r,end:i}=t,a=Ft(i,-1),o=n.getYear(r),s=n.getMonth(r),l=n.getYear(a),c=n.getMonth(a);return!(o===l&&s===c)&&Boolean(e.valueOf()===r.valueOf()||1===n.getDay(e)&&e.valueOf()E("div",{ref:t.innerElRef,className:"fc-daygrid-day-frame fc-scrollgrid-sync-inner",style:{minHeight:t.minHeight}},t.showWeekNumber&&E(Ra,{elTag:"a",elClasses:["fc-daygrid-week-number"],elAttrs:hr(e,o,"week"),date:o,defaultFormat:bs}),!s.isDisabled&&(t.showDayNumber||Ta(i)||t.forceDayTop)?E("div",{className:"fc-daygrid-day-top"},E(a,{elTag:"a",elClasses:["fc-daygrid-day-number",l&&"fc-daygrid-month-start"],elAttrs:Object.assign(Object.assign({},hr(e,o)),{id:n.dayNumberId})})):t.showDayNumber?E("div",{className:"fc-daygrid-day-top",style:{visibility:"hidden"}},E("a",{className:"fc-daygrid-day-number"},"\xa0")):void 0,E("div",{className:"fc-daygrid-day-events",ref:t.fgContentElRef},t.fgContent,E("div",{className:"fc-daygrid-day-bottom",style:{marginTop:t.moreMarginTop}},E(ys,{allDayDate:o,singlePlacements:t.singlePlacements,moreCnt:t.moreCnt,alignmentElRef:r,alignGridTop:!t.showDayNumber,extraDateSpan:t.extraDateSpan,dateProfile:t.dateProfile,eventSelection:t.eventSelection,eventDrag:t.eventDrag,eventResize:t.eventResize,todayRange:t.todayRange}))),E("div",{className:"fc-daygrid-day-bg"},t.bgContent))))}}function ws(e){return e.dayNumberText||E(D,null,"\xa0")}function As(e,t,n,r,i,a,o){let s=new Ms;s.allowReslicing=!0,s.strictOrder=r,!0===t||!0===n?(s.maxCoord=a,s.hiddenConsumes=!0):"number"===typeof t?s.maxStackCnt=t:"number"===typeof n&&(s.maxStackCnt=n,s.hiddenConsumes=!0);let l=[],c=[];for(let v=0;v1,a=r.span.start===s;u+=r.levelCoord-c,c=r.levelCoord+r.thickness,i?(u+=r.thickness,a&&d.push({seg:Ss(e,r.span.start,r.span.end,n),isVisible:!0,isAbsolute:!0,absoluteTop:r.levelCoord,marginTop:0})):a&&(d.push({seg:Ss(e,r.span.start,r.span.end,n),isVisible:!0,isAbsolute:!1,absoluteTop:r.levelCoord,marginTop:u}),u=0)}i.push(l),a.push(d),o.push(u)}return{singleColPlacements:i,multiColPlacements:a,leftoverMargins:o}}(d,e,o),m=[],g=[];for(let v of c){f[v.firstCol].push({seg:v,isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let e=v.firstCol;e<=v.lastCol;e+=1)h[e].push({seg:Ss(v,e,e+1,o),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let v=0;v!this.forceHidden[xi(e)];for(let i=0;i{e&&this.updateSizing(!0)}}render(){let{props:e,state:t,context:n}=this,{options:r}=n,i=e.cells.length,a=ds(e.businessHourSegs,i),o=ds(e.bgEventSegs,i),s=ds(this.getHighlightSegs(),i),l=ds(this.getMirrorSegs(),i),{singleColPlacements:c,multiColPlacements:u,moreCnts:d,moreMarginTops:h}=As(ti(e.fgEventSegs,r.eventOrder),e.dayMaxEvents,e.dayMaxEventRows,r.eventOrderStrict,t.eventInstanceHeights,t.maxContentHeight,e.cells),f=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{};return E("tr",{ref:this.rootElRef,role:"row"},e.renderIntro&&e.renderIntro(),e.cells.map(((t,n)=>{let r=this.renderFgSegs(n,e.forPrint?c[n]:u[n],e.todayRange,f),i=this.renderFgSegs(n,function(e,t){if(!e.length)return[];let n=function(e){let t={};for(let n of e)for(let e of n)t[e.seg.eventRange.instance.instanceId]=e.absoluteTop;return t}(t);return e.map((e=>({seg:e,isVisible:!0,isAbsolute:!0,absoluteTop:n[e.eventRange.instance.instanceId],marginTop:0})))}(l[n],u),e.todayRange,{},Boolean(e.eventDrag),Boolean(e.eventResize),!1);return E(_s,{key:t.key,elRef:this.cellElRefs.createRef(t.key),innerElRef:this.frameElRefs.createRef(t.key),dateProfile:e.dateProfile,date:t.date,showDayNumber:e.showDayNumbers,showWeekNumber:e.showWeekNumbers&&0===n,forceDayTop:e.showWeekNumbers,todayRange:e.todayRange,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,extraRenderProps:t.extraRenderProps,extraDataAttrs:t.extraDataAttrs,extraClassNames:t.extraClassNames,extraDateSpan:t.extraDateSpan,moreCnt:d[n],moreMarginTop:h[n],singlePlacements:c[n],fgContentElRef:this.fgElRefs.createRef(t.key),fgContent:E(D,null,E(D,null,r),E(D,null,i)),bgContent:E(D,null,this.renderFillSegs(s[n],"highlight"),this.renderFillSegs(a[n],"non-business"),this.renderFillSegs(o[n],"bg-event")),minHeight:e.cellMinHeight})})))}componentDidMount(){this.updateSizing(!0),this.context.addResizeHandler(this.handleResize)}componentDidUpdate(e,t){let n=this.props;this.updateSizing(!Ct(e,n))}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}getHighlightSegs(){let{props:e}=this;return e.eventDrag&&e.eventDrag.segs.length?e.eventDrag.segs:e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:e.dateSelectionSegs}getMirrorSegs(){let{props:e}=this;return e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:[]}renderFgSegs(e,t,n,r,i,a,o){let{context:s}=this,{eventSelection:l}=this.props,{framePositions:c}=this.state,u=1===this.props.cells.length,d=i||a||o,h=[];if(c)for(let f of t){let{seg:t}=f,{instanceId:p}=t.eventRange.instance,m=p+":"+e,g=f.isVisible&&!r[p],v=f.isAbsolute,y="",x="";v&&(s.isRtl?(x=0,y=c.lefts[t.lastCol]-c.lefts[t.firstCol]):(y=0,x=c.rights[t.firstCol]-c.rights[t.lastCol])),h.push(E("div",{className:"fc-daygrid-event-harness"+(v?" fc-daygrid-event-harness-abs":""),key:m,ref:d?null:this.segHarnessRefs.createRef(m),style:{visibility:g?"":"hidden",marginTop:v?"":f.marginTop,top:v?f.absoluteTop:"",left:y,right:x}},ps(t)?E(gs,Object.assign({seg:t,isDragging:i,isSelected:p===l,defaultDisplayEventEnd:u},si(t,n))):E(ms,Object.assign({seg:t,isDragging:i,isResizing:a,isDateSelecting:o,isSelected:p===l,defaultDisplayEventEnd:u},si(t,n)))))}return h}renderFillSegs(e,t){let{isRtl:n}=this.context,{todayRange:r}=this.props,{framePositions:i}=this.state,a=[];if(i)for(let s of e){let e=n?{right:0,left:i.lefts[s.lastCol]-i.lefts[s.firstCol]}:{left:0,right:i.rights[s.firstCol]-i.rights[s.lastCol]};a.push(E("div",{key:(o=s.eventRange,o.instance?o.instance.instanceId:`${o.def.defId}:${o.range.start.toISOString()}`),className:"fc-daygrid-bg-harness",style:e},"bg-event"===t?E(Ea,Object.assign({seg:s},si(s,r))):Da(t)))}var o;return E(D,{},...a)}updateSizing(e){let{props:t,state:n,frameElRefs:r}=this;if(!t.forPrint&&null!==t.clientWidth){if(e){let e=t.cells.map((e=>r.currentMap[e.key]));if(e.length){let t=this.rootElRef.current,r=new wr(t,e,!0,!1);n.framePositions&&n.framePositions.similarTo(r)||this.setState({framePositions:new wr(t,e,!0,!1)})}}const i=this.state.eventInstanceHeights,a=this.queryEventInstanceHeights(),o=!0===t.dayMaxEvents||!0===t.dayMaxEventRows;this.safeSetState({eventInstanceHeights:Object.assign(Object.assign({},i),a),maxContentHeight:o?this.computeMaxContentHeight():null})}}queryEventInstanceHeights(){let e=this.segHarnessRefs.currentMap,t={};for(let n in e){let r=Math.round(e[n].getBoundingClientRect().height),i=n.split(":")[0];t[i]=Math.max(t[i]||0,r)}return t}computeMaxContentHeight(){let e=this.props.cells[0].key,t=this.cellElRefs.currentMap[e],n=this.fgElRefs.currentMap[e];return t.getBoundingClientRect().bottom-n.getBoundingClientRect().top}getCellEls(){let e=this.cellElRefs.currentMap;return this.props.cells.map((t=>e[t.key]))}}Ts.addStateEquality({eventInstanceHeights:Ct});class ks extends Nr{constructor(){super(...arguments),this.splitBusinessHourSegs=Jt(us),this.splitBgEventSegs=Jt(us),this.splitFgEventSegs=Jt(us),this.splitDateSelectionSegs=Jt(us),this.splitEventDrag=Jt(hs),this.splitEventResize=Jt(hs),this.rowRefs=new da}render(){let{props:e,context:t}=this,n=e.cells.length,r=this.splitBusinessHourSegs(e.businessHourSegs,n),i=this.splitBgEventSegs(e.bgEventSegs,n),a=this.splitFgEventSegs(e.fgEventSegs,n),o=this.splitDateSelectionSegs(e.dateSelectionSegs,n),s=this.splitEventDrag(e.eventDrag,n),l=this.splitEventResize(e.eventResize,n),c=n>=7&&e.clientWidth?e.clientWidth/t.options.aspectRatio/6:null;return E(Ui,{unit:"day"},((t,u)=>E(D,null,e.cells.map(((t,d)=>E(Ts,{ref:this.rowRefs.createRef(d),key:t.length?t[0].date.toISOString():d,showDayNumbers:n>1,showWeekNumbers:e.showWeekNumbers,todayRange:u,dateProfile:e.dateProfile,cells:t,renderIntro:e.renderRowIntro,businessHourSegs:r[d],eventSelection:e.eventSelection,bgEventSegs:i[d].filter(Es),fgEventSegs:a[d],dateSelectionSegs:o[d],eventDrag:s[d],eventResize:l[d],dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,clientWidth:e.clientWidth,clientHeight:e.clientHeight,cellMinHeight:c,forPrint:e.forPrint}))))))}componentDidMount(){const e=this.rowRefs.currentMap[0].getCellEls()[0];this.rootEl=e?e.closest(".fc-daygrid-body"):null,this.rootEl&&this.context.registerInteractiveComponent(this,{el:this.rootEl,isHitComboAllowed:this.props.isHitComboAllowed})}componentWillUnmount(){this.rootEl&&(this.context.unregisterInteractiveComponent(this),this.rootEl=null)}prepareHits(){this.rowPositions=new wr(this.rootEl,this.rowRefs.collect().map((e=>e.getCellEls()[0])),!1,!0),this.colPositions=new wr(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)}queryHit(e,t){let{colPositions:n,rowPositions:r}=this,i=n.leftToIndex(e),a=r.topToIndex(t);if(null!=a&&null!=i){let e=this.props.cells[a][i];return{dateProfile:this.props.dateProfile,dateSpan:Object.assign({range:this.getCellRange(a,i),allDay:!0},e.extraDateSpan),dayEl:this.getCellEl(a,i),rect:{left:n.lefts[i],right:n.rights[i],top:r.tops[a],bottom:r.bottoms[a]},layer:0}}return null}getCellEl(e,t){return this.rowRefs.currentMap[e].getCellEls()[t]}getCellRange(e,t){let n=this.props.cells[e][t].date;return{start:n,end:Nt(n,1)}}}function Es(e){return e.eventRange.def.allDay}class Cs extends Nr{constructor(){super(...arguments),this.elRef={current:null},this.needsScrollReset=!1}render(){let{props:e}=this,{dayMaxEventRows:t,dayMaxEvents:n,expandRows:r}=e,i=!0===n||!0===t;i&&!r&&(i=!1,t=null,n=null);let a=["fc-daygrid-body",i?"fc-daygrid-body-balanced":"fc-daygrid-body-unbalanced",r?"":"fc-daygrid-body-natural"];return E("div",{ref:this.elRef,className:a.join(" "),style:{width:e.clientWidth,minWidth:e.tableMinWidth}},E("table",{role:"presentation",className:"fc-scrollgrid-sync-table",style:{width:e.clientWidth,minWidth:e.tableMinWidth,height:r?e.clientHeight:""}},e.colGroupNode,E("tbody",{role:"presentation"},E(ks,{dateProfile:e.dateProfile,cells:e.cells,renderRowIntro:e.renderRowIntro,showWeekNumbers:e.showWeekNumbers,clientWidth:e.clientWidth,clientHeight:e.clientHeight,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,dayMaxEvents:n,dayMaxEventRows:t,forPrint:e.forPrint,isHitComboAllowed:e.isHitComboAllowed}))))}componentDidMount(){this.requestScrollReset()}componentDidUpdate(e){e.dateProfile!==this.props.dateProfile?this.requestScrollReset():this.flushScrollReset()}requestScrollReset(){this.needsScrollReset=!0,this.flushScrollReset()}flushScrollReset(){if(this.needsScrollReset&&this.props.clientWidth){const e=function(e,t){let n;t.currentRangeUnit.match(/year|month/)&&(n=e.querySelector(`[data-date="${r=t.currentDate,r.toISOString().match(/^\d{4}-\d{2}/)[0]}-01"]`));var r;n||(n=e.querySelector(`[data-date="${Zt(t.currentDate)}"]`));return n}(this.elRef.current,this.props.dateProfile);if(e){const t=e.closest(".fc-daygrid-body"),n=t.closest(".fc-scroller"),r=e.getBoundingClientRect().top-t.getBoundingClientRect().top;n.scrollTop=r?r+1:0}this.needsScrollReset=!1}}}class Ds extends Yi{constructor(){super(...arguments),this.forceDayIfListItem=!0}sliceRange(e,t){return t.sliceRange(e)}}class Rs extends Nr{constructor(){super(...arguments),this.slicer=new Ds,this.tableRef={current:null}}render(){let{props:e,context:t}=this;return E(Cs,Object.assign({ref:this.tableRef},this.slicer.sliceProps(e,e.dateProfile,e.nextDayThreshold,t,e.dayTableModel),{dateProfile:e.dateProfile,cells:e.dayTableModel.cells,colGroupNode:e.colGroupNode,tableMinWidth:e.tableMinWidth,renderRowIntro:e.renderRowIntro,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.showWeekNumbers,expandRows:e.expandRows,headerAlignElRef:e.headerAlignElRef,clientWidth:e.clientWidth,clientHeight:e.clientHeight,forPrint:e.forPrint}))}}class Ps extends Nr{constructor(){super(...arguments),this.headerElRef={current:null}}renderSimpleLayout(e,t){let{props:n,context:r}=this,i=[],a=xa(r.options);return e&&i.push({type:"header",key:"header",isSticky:a,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),i.push({type:"body",key:"body",liquid:!0,chunk:{content:t}}),E(Ua,{elClasses:["fc-daygrid"],viewSpec:r.viewSpec},E(ba,{liquid:!n.isHeightAuto&&!n.forPrint,collapsibleWidth:n.forPrint,cols:[],sections:i}))}renderHScrollLayout(e,t,n,r){let i=this.context.pluginHooks.scrollGridImpl;if(!i)throw new Error("No ScrollGrid implementation");let{props:a,context:o}=this,s=!a.forPrint&&xa(o.options),l=!a.forPrint&&function(e){let{stickyFooterScrollbar:t}=e;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}(o.options),c=[];return e&&c.push({type:"header",key:"header",isSticky:s,chunks:[{key:"main",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),c.push({type:"body",key:"body",liquid:!0,chunks:[{key:"main",content:t}]}),l&&c.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"main",content:ya}]}),E(Ua,{elClasses:["fc-daygrid"],viewSpec:o.viewSpec},E(i,{liquid:!a.isHeightAuto&&!a.forPrint,forPrint:a.forPrint,collapsibleWidth:a.forPrint,colGroups:[{cols:[{span:n,minWidth:r}]}],sections:c}))}}function Os(e,t){let n=new Gi(e.renderRange,t);return new qi(n,/year|month|week/.test(e.currentRangeUnit))}var Ls=to({name:"@fullcalendar/daygrid",initialView:"dayGridMonth",views:{dayGrid:{component:class extends Ps{constructor(){super(...arguments),this.buildDayTableModel=Jt(Os),this.headerRef={current:null},this.tableRef={current:null}}render(){let{options:e,dateProfileGenerator:t}=this.context,{props:n}=this,r=this.buildDayTableModel(n.dateProfile,t),i=e.dayHeaders&&E(Hi,{ref:this.headerRef,dateProfile:n.dateProfile,dates:r.headerDates,datesRepDistinctDays:1===r.rowCnt}),a=t=>E(Rs,{ref:this.tableRef,dateProfile:n.dateProfile,dayTableModel:r,businessHours:n.businessHours,dateSelection:n.dateSelection,eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:n.eventSelection,eventDrag:n.eventDrag,eventResize:n.eventResize,nextDayThreshold:e.nextDayThreshold,colGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.weekNumbers,expandRows:!n.isHeightAuto,headerAlignElRef:this.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:n.forPrint});return e.dayMinWidth?this.renderHScrollLayout(i,a,r.colCnt,e.dayMinWidth):this.renderSimpleLayout(i,a)}},dateProfileGeneratorClass:class extends Br{buildRenderRange(e,t,n){let r=super.buildRenderRange(e,t,n),{props:i}=this;return function(e){let t,{dateEnv:n,currentRange:r}=e,{start:i,end:a}=r;e.snapToWeek&&(i=n.startOfWeek(i),t=n.startOfWeek(a),t.valueOf()!==a.valueOf()&&(a=zt(t,1)));if(e.fixedWeekCount){let e=n.startOfWeek(n.startOfMonth(Nt(r.end,-1)));a=zt(a,6-Math.ceil(Bt(e,a)/7))}return{start:i,end:a}}({currentRange:r,snapToWeek:/^(year|month)$/.test(t),fixedWeekCount:i.fixedWeekCount,dateEnv:i.dateEnv})}}},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},fixedWeekCount:!0},dayGridYear:{type:"dayGrid",duration:{years:1}}}});ki.touchMouseIgnoreWait=500;let Is=0,zs=0,Ns=!1;class Fs{constructor(e){this.subjectEl=null,this.selector="",this.handleSelector="",this.shouldIgnoreMove=!1,this.shouldWatchScroll=!0,this.isDragging=!1,this.isTouchDragging=!1,this.wasTouchScroll=!1,this.handleMouseDown=e=>{if(!this.shouldIgnoreMouse()&&function(e){return 0===e.button&&!e.ctrlKey}(e)&&this.tryStart(e)){let t=this.createEventFromMouse(e,!0);this.emitter.trigger("pointerdown",t),this.initScrollWatch(t),this.shouldIgnoreMove||document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp)}},this.handleMouseMove=e=>{let t=this.createEventFromMouse(e);this.recordCoords(t),this.emitter.trigger("pointermove",t)},this.handleMouseUp=e=>{document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),this.emitter.trigger("pointerup",this.createEventFromMouse(e)),this.cleanup()},this.handleTouchStart=e=>{if(this.tryStart(e)){this.isTouchDragging=!0;let t=this.createEventFromTouch(e,!0);this.emitter.trigger("pointerdown",t),this.initScrollWatch(t);let n=e.target;this.shouldIgnoreMove||n.addEventListener("touchmove",this.handleTouchMove),n.addEventListener("touchend",this.handleTouchEnd),n.addEventListener("touchcancel",this.handleTouchEnd),window.addEventListener("scroll",this.handleTouchScroll,!0)}},this.handleTouchMove=e=>{let t=this.createEventFromTouch(e);this.recordCoords(t),this.emitter.trigger("pointermove",t)},this.handleTouchEnd=e=>{if(this.isDragging){let t=e.target;t.removeEventListener("touchmove",this.handleTouchMove),t.removeEventListener("touchend",this.handleTouchEnd),t.removeEventListener("touchcancel",this.handleTouchEnd),window.removeEventListener("scroll",this.handleTouchScroll,!0),this.emitter.trigger("pointerup",this.createEventFromTouch(e)),this.cleanup(),this.isTouchDragging=!1,Is+=1,setTimeout((()=>{Is-=1}),ki.touchMouseIgnoreWait)}},this.handleTouchScroll=()=>{this.wasTouchScroll=!0},this.handleScroll=e=>{if(!this.shouldIgnoreMove){let t=window.pageXOffset-this.prevScrollX+this.prevPageX,n=window.pageYOffset-this.prevScrollY+this.prevPageY;this.emitter.trigger("pointermove",{origEvent:e,isTouch:this.isTouchDragging,subjectEl:this.subjectEl,pageX:t,pageY:n,deltaX:t-this.origPageX,deltaY:n-this.origPageY})}},this.containerEl=e,this.emitter=new _r,e.addEventListener("mousedown",this.handleMouseDown),e.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),zs+=1,1===zs&&window.addEventListener("touchmove",Bs,{passive:!1})}destroy(){this.containerEl.removeEventListener("mousedown",this.handleMouseDown),this.containerEl.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),zs-=1,zs||window.removeEventListener("touchmove",Bs,{passive:!1})}tryStart(e){let t=this.querySubjectEl(e),n=e.target;return!(!t||this.handleSelector&&!$e(n,this.handleSelector))&&(this.subjectEl=t,this.isDragging=!0,this.wasTouchScroll=!1,!0)}cleanup(){Ns=!1,this.isDragging=!1,this.subjectEl=null,this.destroyScrollWatch()}querySubjectEl(e){return this.selector?$e(e.target,this.selector):this.containerEl}shouldIgnoreMouse(){return Is||this.isTouchDragging}cancelTouchScroll(){this.isDragging&&(Ns=!0)}initScrollWatch(e){this.shouldWatchScroll&&(this.recordCoords(e),window.addEventListener("scroll",this.handleScroll,!0))}recordCoords(e){this.shouldWatchScroll&&(this.prevPageX=e.pageX,this.prevPageY=e.pageY,this.prevScrollX=window.pageXOffset,this.prevScrollY=window.pageYOffset)}destroyScrollWatch(){this.shouldWatchScroll&&window.removeEventListener("scroll",this.handleScroll,!0)}createEventFromMouse(e,t){let n=0,r=0;return t?(this.origPageX=e.pageX,this.origPageY=e.pageY):(n=e.pageX-this.origPageX,r=e.pageY-this.origPageY),{origEvent:e,isTouch:!1,subjectEl:this.subjectEl,pageX:e.pageX,pageY:e.pageY,deltaX:n,deltaY:r}}createEventFromTouch(e,t){let n,r,i=e.touches,a=0,o=0;return i&&i.length?(n=i[0].pageX,r=i[0].pageY):(n=e.pageX,r=e.pageY),t?(this.origPageX=n,this.origPageY=r):(a=n-this.origPageX,o=r-this.origPageY),{origEvent:e,isTouch:!0,subjectEl:this.subjectEl,pageX:n,pageY:r,deltaX:a,deltaY:o}}}function Bs(e){Ns&&e.preventDefault()}class js{constructor(){this.isVisible=!1,this.sourceEl=null,this.mirrorEl=null,this.sourceElRect=null,this.parentNode=document.body,this.zIndex=9999,this.revertDuration=0}start(e,t,n){this.sourceEl=e,this.sourceElRect=this.sourceEl.getBoundingClientRect(),this.origScreenX=t-window.pageXOffset,this.origScreenY=n-window.pageYOffset,this.deltaX=0,this.deltaY=0,this.updateElPosition()}handleMove(e,t){this.deltaX=e-window.pageXOffset-this.origScreenX,this.deltaY=t-window.pageYOffset-this.origScreenY,this.updateElPosition()}setIsVisible(e){e?this.isVisible||(this.mirrorEl&&(this.mirrorEl.style.display=""),this.isVisible=e,this.updateElPosition()):this.isVisible&&(this.mirrorEl&&(this.mirrorEl.style.display="none"),this.isVisible=e)}stop(e,t){let n=()=>{this.cleanup(),t()};e&&this.mirrorEl&&this.isVisible&&this.revertDuration&&(this.deltaX||this.deltaY)?this.doRevertAnimation(n,this.revertDuration):setTimeout(n,0)}doRevertAnimation(e,t){let n=this.mirrorEl,r=this.sourceEl.getBoundingClientRect();n.style.transition="top "+t+"ms,left "+t+"ms",Ke(n,{left:r.left,top:r.top}),function(e,t){let n=r=>{t(r),it.forEach((t=>{e.removeEventListener(t,n)}))};it.forEach((t=>{e.addEventListener(t,n)}))}(n,(()=>{n.style.transition="",e()}))}cleanup(){this.mirrorEl&&(Ye(this.mirrorEl),this.mirrorEl=null),this.sourceEl=null}updateElPosition(){this.sourceEl&&this.isVisible&&Ke(this.getMirrorEl(),{left:this.sourceElRect.left+this.deltaX,top:this.sourceElRect.top+this.deltaY})}getMirrorEl(){let e=this.sourceElRect,t=this.mirrorEl;return t||(t=this.mirrorEl=this.sourceEl.cloneNode(!0),t.style.userSelect="none",t.classList.add("fc-event-dragging"),Ke(t,{position:"fixed",zIndex:this.zIndex,visibility:"",boxSizing:"border-box",width:e.right-e.left,height:e.bottom-e.top,right:"auto",bottom:"auto",margin:0}),this.parentNode.appendChild(t)),t}}class Us extends Sr{constructor(e,t){super(),this.handleScroll=()=>{this.scrollTop=this.scrollController.getScrollTop(),this.scrollLeft=this.scrollController.getScrollLeft(),this.handleScrollChange()},this.scrollController=e,this.doesListening=t,this.scrollTop=this.origScrollTop=e.getScrollTop(),this.scrollLeft=this.origScrollLeft=e.getScrollLeft(),this.scrollWidth=e.getScrollWidth(),this.scrollHeight=e.getScrollHeight(),this.clientWidth=e.getClientWidth(),this.clientHeight=e.getClientHeight(),this.clientRect=this.computeClientRect(),this.doesListening&&this.getEventTarget().addEventListener("scroll",this.handleScroll)}destroy(){this.doesListening&&this.getEventTarget().removeEventListener("scroll",this.handleScroll)}getScrollTop(){return this.scrollTop}getScrollLeft(){return this.scrollLeft}setScrollTop(e){this.scrollController.setScrollTop(e),this.doesListening||(this.scrollTop=Math.max(Math.min(e,this.getMaxScrollTop()),0),this.handleScrollChange())}setScrollLeft(e){this.scrollController.setScrollLeft(e),this.doesListening||(this.scrollLeft=Math.max(Math.min(e,this.getMaxScrollLeft()),0),this.handleScrollChange())}getClientWidth(){return this.clientWidth}getClientHeight(){return this.clientHeight}getScrollWidth(){return this.scrollWidth}getScrollHeight(){return this.scrollHeight}handleScrollChange(){}}class Vs extends Us{constructor(e,t){super(new Mr(e),t)}getEventTarget(){return this.scrollController.el}computeClientRect(){return yr(this.scrollController.el)}}class Hs extends Us{constructor(e){super(new Tr,e)}getEventTarget(){return window}computeClientRect(){return{left:this.scrollLeft,right:this.scrollLeft+this.clientWidth,top:this.scrollTop,bottom:this.scrollTop+this.clientHeight}}handleScrollChange(){this.clientRect=this.computeClientRect()}}const Ws="function"===typeof performance?performance.now:Date.now;class Gs{constructor(){this.isEnabled=!0,this.scrollQuery=[window,".fc-scroller"],this.edgeThreshold=50,this.maxVelocity=300,this.pointerScreenX=null,this.pointerScreenY=null,this.isAnimating=!1,this.scrollCaches=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.animate=()=>{if(this.isAnimating){let e=this.computeBestEdge(this.pointerScreenX+window.pageXOffset,this.pointerScreenY+window.pageYOffset);if(e){let t=Ws();this.handleSide(e,(t-this.msSinceRequest)/1e3),this.requestAnimation(t)}else this.isAnimating=!1}}}start(e,t,n){this.isEnabled&&(this.scrollCaches=this.buildCaches(n),this.pointerScreenX=null,this.pointerScreenY=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.handleMove(e,t))}handleMove(e,t){if(this.isEnabled){let n=e-window.pageXOffset,r=t-window.pageYOffset,i=null===this.pointerScreenY?0:r-this.pointerScreenY,a=null===this.pointerScreenX?0:n-this.pointerScreenX;i<0?this.everMovedUp=!0:i>0&&(this.everMovedDown=!0),a<0?this.everMovedLeft=!0:a>0&&(this.everMovedRight=!0),this.pointerScreenX=n,this.pointerScreenY=r,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(Ws()))}}stop(){if(this.isEnabled){this.isAnimating=!1;for(let e of this.scrollCaches)e.destroy();this.scrollCaches=null}}requestAnimation(e){this.msSinceRequest=e,requestAnimationFrame(this.animate)}handleSide(e,t){let{scrollCache:n}=e,{edgeThreshold:r}=this,i=r-e.distance,a=i*i/(r*r)*this.maxVelocity*t,o=1;switch(e.name){case"left":o=-1;case"right":n.setScrollLeft(n.getScrollLeft()+a*o);break;case"top":o=-1;case"bottom":n.setScrollTop(n.getScrollTop()+a*o)}}computeBestEdge(e,t){let{edgeThreshold:n}=this,r=null,i=this.scrollCaches||[];for(let a of i){let i=a.clientRect,o=e-i.left,s=i.right-e,l=t-i.top,c=i.bottom-t;o>=0&&s>=0&&l>=0&&c>=0&&(l<=n&&this.everMovedUp&&a.canScrollUp()&&(!r||r.distance>l)&&(r={scrollCache:a,name:"top",distance:l}),c<=n&&this.everMovedDown&&a.canScrollDown()&&(!r||r.distance>c)&&(r={scrollCache:a,name:"bottom",distance:c}),o<=n&&this.everMovedLeft&&a.canScrollLeft()&&(!r||r.distance>o)&&(r={scrollCache:a,name:"left",distance:o}),s<=n&&this.everMovedRight&&a.canScrollRight()&&(!r||r.distance>s)&&(r={scrollCache:a,name:"right",distance:s}))}return r}buildCaches(e){return this.queryScrollEls(e).map((e=>e===window?new Hs(!1):new Vs(e,!1)))}queryScrollEls(e){let t=[];for(let n of this.scrollQuery)"object"===typeof n?t.push(n):t.push(...Array.prototype.slice.call(e.getRootNode().querySelectorAll(n)));return t}}class qs extends Ti{constructor(e,t){super(e),this.containerEl=e,this.delay=null,this.minDistance=0,this.touchScrollAllowed=!0,this.mirrorNeedsRevert=!1,this.isInteracting=!1,this.isDragging=!1,this.isDelayEnded=!1,this.isDistanceSurpassed=!1,this.delayTimeoutId=null,this.onPointerDown=e=>{var t;this.isDragging||(this.isInteracting=!0,this.isDelayEnded=!1,this.isDistanceSurpassed=!1,(t=document.body).style.userSelect="none",t.addEventListener("selectstart",nt),function(e){e.addEventListener("contextmenu",nt)}(document.body),e.isTouch||e.origEvent.preventDefault(),this.emitter.trigger("pointerdown",e),this.isInteracting&&!this.pointer.shouldIgnoreMove&&(this.mirror.setIsVisible(!1),this.mirror.start(e.subjectEl,e.pageX,e.pageY),this.startDelay(e),this.minDistance||this.handleDistanceSurpassed(e)))},this.onPointerMove=e=>{if(this.isInteracting){if(this.emitter.trigger("pointermove",e),!this.isDistanceSurpassed){let t,n=this.minDistance,{deltaX:r,deltaY:i}=e;t=r*r+i*i,t>=n*n&&this.handleDistanceSurpassed(e)}this.isDragging&&("scroll"!==e.origEvent.type&&(this.mirror.handleMove(e.pageX,e.pageY),this.autoScroller.handleMove(e.pageX,e.pageY)),this.emitter.trigger("dragmove",e))}},this.onPointerUp=e=>{var t;this.isInteracting&&(this.isInteracting=!1,(t=document.body).style.userSelect="",t.removeEventListener("selectstart",nt),function(e){e.removeEventListener("contextmenu",nt)}(document.body),this.emitter.trigger("pointerup",e),this.isDragging&&(this.autoScroller.stop(),this.tryStopDrag(e)),this.delayTimeoutId&&(clearTimeout(this.delayTimeoutId),this.delayTimeoutId=null))};let n=this.pointer=new Fs(e);n.emitter.on("pointerdown",this.onPointerDown),n.emitter.on("pointermove",this.onPointerMove),n.emitter.on("pointerup",this.onPointerUp),t&&(n.selector=t),this.mirror=new js,this.autoScroller=new Gs}destroy(){this.pointer.destroy(),this.onPointerUp({})}startDelay(e){"number"===typeof this.delay?this.delayTimeoutId=setTimeout((()=>{this.delayTimeoutId=null,this.handleDelayEnd(e)}),this.delay):this.handleDelayEnd(e)}handleDelayEnd(e){this.isDelayEnded=!0,this.tryStartDrag(e)}handleDistanceSurpassed(e){this.isDistanceSurpassed=!0,this.tryStartDrag(e)}tryStartDrag(e){this.isDelayEnded&&this.isDistanceSurpassed&&(this.pointer.wasTouchScroll&&!this.touchScrollAllowed||(this.isDragging=!0,this.mirrorNeedsRevert=!1,this.autoScroller.start(e.pageX,e.pageY,this.containerEl),this.emitter.trigger("dragstart",e),!1===this.touchScrollAllowed&&this.pointer.cancelTouchScroll()))}tryStopDrag(e){this.mirror.stop(this.mirrorNeedsRevert,this.stopDrag.bind(this,e))}stopDrag(e){this.isDragging=!1,this.emitter.trigger("dragend",e)}setIgnoreMove(e){this.pointer.shouldIgnoreMove=e}setMirrorIsVisible(e){this.mirror.setIsVisible(e)}setMirrorNeedsRevert(e){this.mirrorNeedsRevert=e}setAutoScrollEnabled(e){this.autoScroller.isEnabled=e}}class Ys{constructor(e){this.origRect=xr(e),this.scrollCaches=br(e).map((e=>new Vs(e,!0)))}destroy(){for(let e of this.scrollCaches)e.destroy()}computeLeft(){let e=this.origRect.left;for(let t of this.scrollCaches)e+=t.origScrollLeft-t.getScrollLeft();return e}computeTop(){let e=this.origRect.top;for(let t of this.scrollCaches)e+=t.origScrollTop-t.getScrollTop();return e}isWithinClipping(e,t){let n={left:e,top:t};for(let r of this.scrollCaches)if(!$s(r.getEventTarget())&&!Jn(n,r.clientRect))return!1;return!0}}function $s(e){let t=e.tagName;return"HTML"===t||"BODY"===t}class Xs{constructor(e,t){this.useSubjectCenter=!1,this.requireInitial=!0,this.initialHit=null,this.movingHit=null,this.finalHit=null,this.handlePointerDown=e=>{let{dragging:t}=this;this.initialHit=null,this.movingHit=null,this.finalHit=null,this.prepareHits(),this.processFirstCoord(e),this.initialHit||!this.requireInitial?(t.setIgnoreMove(!1),this.emitter.trigger("pointerdown",e)):t.setIgnoreMove(!0)},this.handleDragStart=e=>{this.emitter.trigger("dragstart",e),this.handleMove(e,!0)},this.handleDragMove=e=>{this.emitter.trigger("dragmove",e),this.handleMove(e)},this.handlePointerUp=e=>{this.releaseHits(),this.emitter.trigger("pointerup",e)},this.handleDragEnd=e=>{this.movingHit&&this.emitter.trigger("hitupdate",null,!0,e),this.finalHit=this.movingHit,this.movingHit=null,this.emitter.trigger("dragend",e)},this.droppableStore=t,e.emitter.on("pointerdown",this.handlePointerDown),e.emitter.on("dragstart",this.handleDragStart),e.emitter.on("dragmove",this.handleDragMove),e.emitter.on("pointerup",this.handlePointerUp),e.emitter.on("dragend",this.handleDragEnd),this.dragging=e,this.emitter=new _r}processFirstCoord(e){let t,n={left:e.pageX,top:e.pageY},r=n,i=e.subjectEl;var a,o;i instanceof HTMLElement&&(t=xr(i),a=r,o=t,r={left:Math.min(Math.max(a.left,o.left),o.right),top:Math.min(Math.max(a.top,o.top),o.bottom)});let s=this.initialHit=this.queryHitForOffset(r.left,r.top);if(s){if(this.useSubjectCenter&&t){let e=Qn(t,s.rect);e&&(r=function(e){return{left:(e.left+e.right)/2,top:(e.top+e.bottom)/2}}(e))}this.coordAdjust=(c=n,{left:(l=r).left-c.left,top:l.top-c.top})}else this.coordAdjust={left:0,top:0};var l,c}handleMove(e,t){let n=this.queryHitForOffset(e.pageX+this.coordAdjust.left,e.pageY+this.coordAdjust.top);!t&&Zs(this.movingHit,n)||(this.movingHit=n,this.emitter.trigger("hitupdate",n,!1,e))}prepareHits(){this.offsetTrackers=Tt(this.droppableStore,(e=>(e.component.prepareHits(),new Ys(e.el))))}releaseHits(){let{offsetTrackers:e}=this;for(let t in e)e[t].destroy();this.offsetTrackers={}}queryHitForOffset(e,t){let{droppableStore:n,offsetTrackers:r}=this,i=null;for(let a in n){let o=n[a].component,s=r[a];if(s&&s.isWithinClipping(e,t)){let n=s.computeLeft(),r=s.computeTop(),l=e-n,c=t-r,{origRect:u}=s,d=u.right-u.left,h=u.bottom-u.top;if(l>=0&&l=0&&ci.layer)&&(e.componentId=a,e.context=o.context,e.rect.left+=n,e.rect.right+=n,e.rect.top+=r,e.rect.bottom+=r,i=e)}}}return i}}function Zs(e,t){return!e&&!t||Boolean(e)===Boolean(t)&&function(e,t){return n=e.range,r=t.range,(null===n.start?null:n.start.valueOf())===(null===r.start?null:r.start.valueOf())&&(null===n.end?null:n.end.valueOf())===(null===r.end?null:r.end.valueOf())&&e.allDay===t.allDay&&function(e,t){for(let n in t)if("range"!==n&&"allDay"!==n&&e[n]!==t[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}(e,t);var n,r}(e.dateSpan,t.dateSpan)}function Ks(e,t){let n={};for(let a of t.pluginHooks.datePointTransforms)Object.assign(n,a(e,t));var r,i;return Object.assign(n,(r=e,{date:(i=t.dateEnv).toDate(r.range.start),dateStr:i.formatIso(r.range.start,{omitTime:r.allDay}),allDay:r.allDay})),n}class Js extends Ai{constructor(e){super(e),this.subjectEl=null,this.subjectSeg=null,this.isDragging=!1,this.eventRange=null,this.relevantEvents=null,this.receivingContext=null,this.validMutation=null,this.mutatedRelevantEvents=null,this.handlePointerDown=e=>{let t=e.origEvent.target,{component:n,dragging:r}=this,{mirror:i}=r,{options:a}=n.context,o=n.context;this.subjectEl=e.subjectEl;let s=this.subjectSeg=Jr(e.subjectEl),l=(this.eventRange=s.eventRange).instance.instanceId;this.relevantEvents=Rn(o.getCurrentData().eventStore,l),r.minDistance=e.isTouch?0:a.eventDragMinDistance,r.delay=e.isTouch&&l!==n.props.eventSelection?function(e){let{options:t}=e.context,n=t.eventLongPressDelay;null==n&&(n=t.longPressDelay);return n}(n):null,a.fixedMirrorParent?i.parentNode=a.fixedMirrorParent:i.parentNode=$e(t,".fc"),i.revertDuration=a.dragRevertDuration;let c=n.isValidSegDownEl(t)&&!$e(t,".fc-event-resizer");r.setIgnoreMove(!c),this.isDragging=c&&e.subjectEl.classList.contains("fc-event-draggable")},this.handleDragStart=e=>{let t=this.component.context,n=this.eventRange,r=n.instance.instanceId;e.isTouch?r!==this.component.props.eventSelection&&t.dispatch({type:"SELECT_EVENT",eventInstanceId:r}):t.dispatch({type:"UNSELECT_EVENT"}),this.isDragging&&(t.calendarApi.unselect(e),t.emitter.trigger("eventDragStart",{el:this.subjectEl,event:new Yr(t,n.def,n.instance),jsEvent:e.origEvent,view:t.viewApi}))},this.handleHitUpdate=(e,t)=>{if(!this.isDragging)return;let n=this.relevantEvents,r=this.hitDragging.initialHit,i=this.component.context,a=null,o=null,s=null,l=!1,c={affectedEvents:n,mutatedEvents:{defs:{},instances:{}},isEvent:!0};if(e){a=e.context;let t=a.options;i===a||t.editable&&t.droppable?(o=function(e,t,n){let r=e.dateSpan,i=t.dateSpan,a=r.range.start,o=i.range.start,s={};r.allDay!==i.allDay&&(s.allDay=i.allDay,s.hasEnd=t.context.options.allDayMaintainDuration,i.allDay&&(a=Ut(a)));let l=Kn(a,o,e.context.dateEnv,e.componentId===t.componentId?e.largeUnit:null);l.milliseconds&&(s.allDay=!1);let c={datesDelta:l,standardProps:s};for(let u of n)u(c,e,t);return c}(r,e,a.getCurrentData().pluginHooks.eventDragMutationMassagers),o&&(s=Hr(n,a.getCurrentData().eventUiBases,o,a),c.mutatedEvents=s,ea(c,e.dateProfile,a)||(l=!0,o=null,s=null,c.mutatedEvents={defs:{},instances:{}}))):a=null}this.displayDrag(a,c),l?ct():ut(),t||(i===a&&Zs(r,e)&&(o=null),this.dragging.setMirrorNeedsRevert(!o),this.dragging.setMirrorIsVisible(!e||!this.subjectEl.getRootNode().querySelector(".fc-event-mirror")),this.receivingContext=a,this.validMutation=o,this.mutatedRelevantEvents=s)},this.handlePointerUp=()=>{this.isDragging||this.cleanup()},this.handleDragEnd=e=>{if(this.isDragging){let t=this.component.context,n=t.viewApi,{receivingContext:r,validMutation:i}=this,a=this.eventRange.def,o=this.eventRange.instance,s=new Yr(t,a,o),l=this.relevantEvents,c=this.mutatedRelevantEvents,{finalHit:u}=this.hitDragging;if(this.clearDrag(),t.emitter.trigger("eventDragStop",{el:this.subjectEl,event:s,jsEvent:e.origEvent,view:n}),i){if(r===t){let r=new Yr(t,c.defs[a.defId],o?c.instances[o.instanceId]:null);t.dispatch({type:"MERGE_EVENTS",eventStore:c});let u={oldEvent:s,event:r,relatedEvents:Xr(c,t,o),revert(){t.dispatch({type:"MERGE_EVENTS",eventStore:l})}},d={};for(let e of t.getCurrentData().pluginHooks.eventDropTransformers)Object.assign(d,e(i,t));t.emitter.trigger("eventDrop",Object.assign(Object.assign(Object.assign({},u),d),{el:e.subjectEl,delta:i.datesDelta,jsEvent:e.origEvent,view:n})),t.emitter.trigger("eventChange",u)}else if(r){let i={event:s,relatedEvents:Xr(l,t,o),revert(){t.dispatch({type:"MERGE_EVENTS",eventStore:l})}};t.emitter.trigger("eventLeave",Object.assign(Object.assign({},i),{draggedEl:e.subjectEl,view:n})),t.dispatch({type:"REMOVE_EVENTS",eventStore:l}),t.emitter.trigger("eventRemove",i);let d=c.defs[a.defId],h=c.instances[o.instanceId],f=new Yr(r,d,h);r.dispatch({type:"MERGE_EVENTS",eventStore:c});let p={event:f,relatedEvents:Xr(c,r,h),revert(){r.dispatch({type:"REMOVE_EVENTS",eventStore:c})}};r.emitter.trigger("eventAdd",p),e.isTouch&&r.dispatch({type:"SELECT_EVENT",eventInstanceId:o.instanceId}),r.emitter.trigger("drop",Object.assign(Object.assign({},Ks(u.dateSpan,r)),{draggedEl:e.subjectEl,jsEvent:e.origEvent,view:u.context.viewApi})),r.emitter.trigger("eventReceive",Object.assign(Object.assign({},p),{draggedEl:e.subjectEl,view:u.context.viewApi}))}}else t.emitter.trigger("_noEventDrop")}this.cleanup()};let{component:t}=this,{options:n}=t.context,r=this.dragging=new qs(e.el);r.pointer.selector=Js.SELECTOR,r.touchScrollAllowed=!1,r.autoScroller.isEnabled=n.dragScroll;let i=this.hitDragging=new Xs(this.dragging,Mi);i.useSubjectCenter=e.useEventCenter,i.emitter.on("pointerdown",this.handlePointerDown),i.emitter.on("dragstart",this.handleDragStart),i.emitter.on("hitupdate",this.handleHitUpdate),i.emitter.on("pointerup",this.handlePointerUp),i.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}displayDrag(e,t){let n=this.component.context,r=this.receivingContext;r&&r!==e&&(r===n?r.dispatch({type:"SET_EVENT_DRAG",state:{affectedEvents:t.affectedEvents,mutatedEvents:{defs:{},instances:{}},isEvent:!0}}):r.dispatch({type:"UNSET_EVENT_DRAG"})),e&&e.dispatch({type:"SET_EVENT_DRAG",state:t})}clearDrag(){let e=this.component.context,{receivingContext:t}=this;t&&t.dispatch({type:"UNSET_EVENT_DRAG"}),e!==t&&e.dispatch({type:"UNSET_EVENT_DRAG"})}cleanup(){this.subjectSeg=null,this.isDragging=!1,this.eventRange=null,this.relevantEvents=null,this.receivingContext=null,this.validMutation=null,this.mutatedRelevantEvents=null}}Js.SELECTOR=".fc-event-draggable, .fc-event-resizable";const Qs={fixedMirrorParent:Mn},el={dateClick:Mn,eventDragStart:Mn,eventDragStop:Mn,eventDrop:Mn,eventResizeStart:Mn,eventResizeStop:Mn,eventResize:Mn,drop:Mn,eventReceive:Mn,eventLeave:Mn};ki.dataAttrPrefix="";var tl=to({name:"@fullcalendar/interaction",componentInteractions:[class extends Ai{constructor(e){super(e),this.handlePointerDown=e=>{let{dragging:t}=this,n=e.origEvent.target;t.setIgnoreMove(!this.component.isValidDateDownEl(n))},this.handleDragEnd=e=>{let{component:t}=this,{pointer:n}=this.dragging;if(!n.wasTouchScroll){let{initialHit:n,finalHit:r}=this.hitDragging;if(n&&r&&Zs(n,r)){let{context:r}=t,i=Object.assign(Object.assign({},Ks(n.dateSpan,r)),{dayEl:n.dayEl,jsEvent:e.origEvent,view:r.viewApi||r.calendarApi.view});r.emitter.trigger("dateClick",i)}}},this.dragging=new qs(e.el),this.dragging.autoScroller.isEnabled=!1;let t=this.hitDragging=new Xs(this.dragging,Si(e));t.emitter.on("pointerdown",this.handlePointerDown),t.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}},class extends Ai{constructor(e){super(e),this.dragSelection=null,this.handlePointerDown=e=>{let{component:t,dragging:n}=this,{options:r}=t.context,i=r.selectable&&t.isValidDateDownEl(e.origEvent.target);n.setIgnoreMove(!i),n.delay=e.isTouch?function(e){let{options:t}=e.context,n=t.selectLongPressDelay;null==n&&(n=t.longPressDelay);return n}(t):null},this.handleDragStart=e=>{this.component.context.calendarApi.unselect(e)},this.handleHitUpdate=(e,t)=>{let{context:n}=this.component,r=null,i=!1;if(e){let t=this.hitDragging.initialHit;e.componentId===t.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(t,e)||(r=function(e,t,n){let r=e.dateSpan,i=t.dateSpan,a=[r.range.start,r.range.end,i.range.start,i.range.end];a.sort(pt);let o={};for(let s of n){let n=s(e,t);if(!1===n)return null;n&&Object.assign(o,n)}return o.range={start:a[0],end:a[3]},o.allDay=r.allDay,o}(t,e,n.pluginHooks.dateSelectionTransformers)),r&&function(e,t,n){return!!or(t.validRange,e.range)&&ta({dateSelection:e},n)}(r,e.dateProfile,n)||(i=!0,r=null)}r?n.dispatch({type:"SELECT_DATES",selection:r}):t||n.dispatch({type:"UNSELECT_DATES"}),i?ct():ut(),t||(this.dragSelection=r)},this.handlePointerUp=e=>{this.dragSelection&&(jr(this.dragSelection,e,this.component.context),this.dragSelection=null)};let{component:t}=e,{options:n}=t.context,r=this.dragging=new qs(e.el);r.touchScrollAllowed=!1,r.minDistance=n.selectMinDistance||0,r.autoScroller.isEnabled=n.dragScroll;let i=this.hitDragging=new Xs(this.dragging,Si(e));i.emitter.on("pointerdown",this.handlePointerDown),i.emitter.on("dragstart",this.handleDragStart),i.emitter.on("hitupdate",this.handleHitUpdate),i.emitter.on("pointerup",this.handlePointerUp)}destroy(){this.dragging.destroy()}},Js,class extends Ai{constructor(e){super(e),this.draggingSegEl=null,this.draggingSeg=null,this.eventRange=null,this.relevantEvents=null,this.validMutation=null,this.mutatedRelevantEvents=null,this.handlePointerDown=e=>{let{component:t}=this,n=Jr(this.querySegEl(e)),r=this.eventRange=n.eventRange;this.dragging.minDistance=t.context.options.eventDragMinDistance,this.dragging.setIgnoreMove(!this.component.isValidSegDownEl(e.origEvent.target)||e.isTouch&&this.component.props.eventSelection!==r.instance.instanceId)},this.handleDragStart=e=>{let{context:t}=this.component,n=this.eventRange;this.relevantEvents=Rn(t.getCurrentData().eventStore,this.eventRange.instance.instanceId);let r=this.querySegEl(e);this.draggingSegEl=r,this.draggingSeg=Jr(r),t.calendarApi.unselect(),t.emitter.trigger("eventResizeStart",{el:r,event:new Yr(t,n.def,n.instance),jsEvent:e.origEvent,view:t.viewApi})},this.handleHitUpdate=(e,t,n)=>{let{context:r}=this.component,i=this.relevantEvents,a=this.hitDragging.initialHit,o=this.eventRange.instance,s=null,l=null,c=!1,u={affectedEvents:i,mutatedEvents:{defs:{},instances:{}},isEvent:!0};if(e){e.componentId===a.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(a,e)||(s=function(e,t,n,r){let i=e.context.dateEnv,a=e.dateSpan.range.start,o=t.dateSpan.range.start,s=Kn(a,o,i,e.largeUnit);if(n){if(i.add(r.start,s)r.start)return{endDelta:s};return null}(a,e,n.subjectEl.classList.contains("fc-event-resizer-start"),o.range))}s&&(l=Hr(i,r.getCurrentData().eventUiBases,s,r),u.mutatedEvents=l,ea(u,e.dateProfile,r)||(c=!0,s=null,l=null,u.mutatedEvents=null)),l?r.dispatch({type:"SET_EVENT_RESIZE",state:u}):r.dispatch({type:"UNSET_EVENT_RESIZE"}),c?ct():ut(),t||(s&&Zs(a,e)&&(s=null),this.validMutation=s,this.mutatedRelevantEvents=l)},this.handleDragEnd=e=>{let{context:t}=this.component,n=this.eventRange.def,r=this.eventRange.instance,i=new Yr(t,n,r),a=this.relevantEvents,o=this.mutatedRelevantEvents;if(t.emitter.trigger("eventResizeStop",{el:this.draggingSegEl,event:i,jsEvent:e.origEvent,view:t.viewApi}),this.validMutation){let s=new Yr(t,o.defs[n.defId],r?o.instances[r.instanceId]:null);t.dispatch({type:"MERGE_EVENTS",eventStore:o});let l={oldEvent:i,event:s,relatedEvents:Xr(o,t,r),revert(){t.dispatch({type:"MERGE_EVENTS",eventStore:a})}};t.emitter.trigger("eventResize",Object.assign(Object.assign({},l),{el:this.draggingSegEl,startDelta:this.validMutation.startDelta||yt(0),endDelta:this.validMutation.endDelta||yt(0),jsEvent:e.origEvent,view:t.viewApi})),t.emitter.trigger("eventChange",l)}else t.emitter.trigger("_noEventResize");this.draggingSeg=null,this.relevantEvents=null,this.validMutation=null};let{component:t}=e,n=this.dragging=new qs(e.el);n.pointer.selector=".fc-event-resizer",n.touchScrollAllowed=!1,n.autoScroller.isEnabled=t.context.options.dragScroll;let r=this.hitDragging=new Xs(this.dragging,Si(e));r.emitter.on("pointerdown",this.handlePointerDown),r.emitter.on("dragstart",this.handleDragStart),r.emitter.on("hitupdate",this.handleHitUpdate),r.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}querySegEl(e){return $e(e.subjectEl,".fc-event")}}],calendarInteractions:[class{constructor(e){this.context=e,this.isRecentPointerDateSelect=!1,this.matchesCancel=!1,this.matchesEvent=!1,this.onSelect=e=>{e.jsEvent&&(this.isRecentPointerDateSelect=!0)},this.onDocumentPointerDown=e=>{let t=this.context.options.unselectCancel,n=Qe(e.origEvent);this.matchesCancel=!!$e(n,t),this.matchesEvent=!!$e(n,Js.SELECTOR)},this.onDocumentPointerUp=e=>{let{context:t}=this,{documentPointer:n}=this,r=t.getCurrentData();if(!n.wasTouchScroll){if(r.dateSelection&&!this.isRecentPointerDateSelect){let n=t.options.unselectAuto;!n||n&&this.matchesCancel||t.calendarApi.unselect(e)}r.eventSelection&&!this.matchesEvent&&t.dispatch({type:"UNSELECT_EVENT"})}this.isRecentPointerDateSelect=!1};let t=this.documentPointer=new Fs(document);t.shouldIgnoreMove=!0,t.shouldWatchScroll=!1,t.emitter.on("pointerdown",this.onDocumentPointerDown),t.emitter.on("pointerup",this.onDocumentPointerUp),e.emitter.on("select",this.onSelect)}destroy(){this.context.emitter.off("select",this.onSelect),this.documentPointer.destroy()}}],elementDraggingImpl:qs,optionRefiners:Qs,listenerRefiners:el}),nl=(n(29144),n(53758)),rl=n(49989),il=n(52498),al=(n(47513),n(39409),n(13792)),ol=(n(52688),n(2588)),sl=n(60270),ll=n(88745),cl=n(94116),ul=n(23922),dl=n(50160),hl=n(7774),fl=n(44414);const pl=function(e){let{dataToRender:t,height:n,figureTitle:r}=e;const[i,a]=(0,hl.mv)(),{language:o}=i,[s,l]=h.useState(!1),[c,u]=h.useState(null),[d,f]=h.useState([]),p=new ul.s(r,o);h.useEffect((()=>{u(t)}),[t]),h.useEffect((()=>{c&&((e=>{if(p.clearData(),p.fresh){let e=p.subplots(6,1,{sharex:!0,sharey:!0});p.setXlabel(`${(0,dl.d)(dl.z.FigureStandardText,"Time",o)} (${(0,dl.d)(dl.z.FigureStandardUnit,"Local",o)})`,{fontSize:15},e[e.length-1]),p.setYlabel("Force (g)",{fontSize:15},e[0]),p.setSubtitle("Accelerometer (100Hz)",e[0]),p.setYlim([1,5],e[1]),p.setYlabel("Severity (1-5)",{fontSize:15},e[1]),p.setSubtitle("Apple Movement Disorder - Tremor Severity (Weighted Severity)",e[1]),p.setYlim([0,1],e[2]),p.setYlabel("Probability (0-1)",{fontSize:15},e[2]),p.setSubtitle("Apple Movement Disorder - Dyskinetic Probability",e[2]),p.setYlim([0,180],e[3]),p.setYlabel("Heart Rate (Beat/Min)",{fontSize:15},e[3]),p.setSubtitle("HealthKit - Heart Rate",e[3]),p.setYlim([0,180],e[4]),p.setYlabel("Interval (ms)",{fontSize:15},e[4]),p.setSubtitle("HealthKit - Heart Rate Variability",e[4]),p.setYlim([-.1,5.1],e[5]),p.setTickValue([0,1,2,3,4,5],"y",e[5]),p.setTickLabel(["In Bed","Sleep","Awake","Core Sleep","Deep Sleep","REM Sleep"],"y",e[5]),p.setSubtitle("HealthKit - Sleep State",e[5]),p.setLegend({tracegroupgap:5,xanchor:"right",yanchor:"top"}),p.setLayoutProps({hovermode:"x"})}let t=p.getAxes();if(e.Accelerometer.Time.length>108e5){let n=(e,t)=>t%12e3==0,r=e.Accelerometer.Time.filter(n),i=e.Accelerometer.Data.map(((t,n)=>Math.sqrt(Math.pow(e.Accelerometer.Data[n][0],2)+Math.pow(e.Accelerometer.Data[n][1],2)+Math.pow(e.Accelerometer.Data[n][2],2)))),a=new Array(r.length).fill(0);i.map(((e,t)=>{a[Math.floor(t/12e3)]+=e/12e3})),p.scatter(r,a,{marker:{size:5},color:"#000000",showlegend:!1,hovertemplate:" %{y:.2f} "},t[0]),p.setYlabel("Force (g)",{fontSize:15},t[0]),p.setSubtitle("Mean Force (2-minute)",t[0])}else{let e=(e,t)=>t%2==0,n=c.Accelerometer.Time.filter(e).map((e=>new Date(1e3*e))),r=c.Accelerometer.Data.filter(e);p.plot(n,r.map((e=>e[0])),{linewidth:1,color:"#f44336",name:"Accelerometer X-axis",showlegend:!0,hovertemplate:" x: %{y:.2f} "},t[0]),p.plot(n,r.map((e=>e[1])),{linewidth:1,color:"#8bc34a",name:"Accelerometer Y-axis",showlegend:!0,hovertemplate:" y: %{y:.2f} "},t[0]),p.plot(n,r.map((e=>e[2])),{linewidth:1,color:"#03a9f4",name:"Accelerometer Z-axis",showlegend:!0,hovertemplate:" z: %{y:.2f} "},t[0]),p.setYlabel("Force (g)",{fontSize:15},t[0]),p.setSubtitle("Accelerometer (100Hz)",t[0])}p.scatter(e.TremorSeverity.Time.map((e=>new Date(1e3*e))),e.TremorSeverity.Data.map((e=>{let t=0,n=0;return e.map(((e,r)=>{t+=e*r,r>0&&(n+=e)})),n>0?t/n:null})),{marker:{size:5},color:"#000000",showlegend:!1,hovertemplate:" %{y:.2f} "},t[1]),p.scatter(e.DyskineticProbability.Time.map((e=>new Date(1e3*e))),e.DyskineticProbability.Data,{marker:{size:5},color:"#000000",showlegend:!1,hovertemplate:" %{y:.2f} "},t[2]),p.scatter(e.HeartRate.Time.map((e=>new Date(1e3*e))),e.HeartRate.Data,{marker:{size:5},color:"#FF0000",showlegend:!1,hovertemplate:" %{y:.2f} "},t[3]),p.scatter(e.HeartRateVariability.Time.map((e=>new Date(1e3*e))),e.HeartRateVariability.Data,{marker:{size:5},color:"#FF0000",showlegend:!1,hovertemplate:" %{y:.2f} "},t[4]);let n=["#000000","#d7e360","#f6685e","#03a9f4","#0276aa","#35baf6"];for(let r in e.SleepState.Time)p.plot([1e3*e.SleepState.Time[r],1e3*e.SleepState.Time[r]+1e3*e.SleepState.TimeRange[r]],[e.SleepState.Data[r],e.SleepState.Data[r]],{linewidth:10,color:n[e.SleepState.Data[r]],showlegend:!1,hovertemplate:" %{y:.2f} "},t[5]);0==e.SleepState.Time.length&&p.plot([1e3*e.Time,1e3*e.Time],[e.SleepState.Data[2],e.SleepState.Data[2]],{linewidth:10,color:n[e.SleepState.Data[2]],showlegend:!1,hovertemplate:" %{y:.2f} "},t[5]),e?(p.render(),l(!0)):(p.purge(),l(!1))})(c),f([0,0]))}),[o,c]);const m=(0,h.useCallback)((()=>{p.refresh()}),[]),{ref:g}=(0,cl.uZ)({onResize:m,refreshMode:"debounce",refreshRate:50,skipOnMount:!1});return h.useEffect((()=>{}),[g.current,c]),(0,fl.jsx)(rl.A,{ref:g,id:r,style:{marginTop:5,marginBottom:10,height:n,width:"100%",display:s?"":"none"}})};var ml=n(20572);const gl=function(){const e=(0,f.Zp)(),[t,n]=(0,hl.mv)(),{patientID:r,language:i}=t;sl.t1.register(sl.PP,sl.kc,sl.FN,sl.No,sl.m_,sl.s$);const[a,o]=(0,h.useState)(null),[s,l]=(0,h.useState)({Username:"",Token:"",New:!0}),[c,u]=(0,h.useState)({Username:"",Password:"",showPassword:!1,show:!1}),[d,w]=(0,h.useState)({list:[],current:""}),[A,S]=(0,h.useState)(!1);(0,h.useEffect)((()=>{r?(ml.x.query("/mobile/wearable/queryMobileAccount",{queryMobileAccount:!0,patientId:r}).then((e=>{e.data.length>0&&l(e.data[0])})).catch((e=>{ml.x.displayError(e,o)})),ml.x.query("/api/queryMobileRecordings",{patientId:r,requestOverview:!0}).then((e=>{w({list:e.data.filter((e=>e.Time>0)),current:""})})).catch((e=>{ml.x.displayError(e,o)}))):e("/dashboard",{replace:!1})}),[r]);const M=()=>{""===s.Username?ml.x.query("/mobile/wearable/queryMobileAccount",{createMobileAccount:!0,patientId:r,username:c.Username,password:c.Password}).then((e=>{e.data.length>0&&(l(e.data[0]),u({...c,show:!1,showPassword:!1}))})).catch((e=>{ml.x.displayError(e,o)})):o((0,fl.jsx)(nl.A,{title:"Delete Account",message:"Are you sure you want to delete the account? Existing App Session will not function after next network update.",confirmText:"YES",denyText:"NO",denyButton:!0,handleClose:()=>o(null),handleDeny:()=>o(null),handleConfirm:()=>{ml.x.query("/mobile/wearable/queryMobileAccount",{deleteMobileAccount:!0,patientId:r}).then((e=>{e.data.length>0&&(l(e.data[0]),u({...c,show:!1,showPassword:!1}),o(null))})).catch((e=>{ml.x.displayError(e,o)}))}}))};return(0,fl.jsxs)(fl.Fragment,{children:[a,(0,fl.jsxs)(ll.A,{children:[(0,fl.jsx)(rl.A,{pt:3,children:(0,fl.jsxs)(rl.A,{children:[(0,fl.jsxs)(p.A,{open:c.show,onClose:()=>u({...c,show:!1}),children:[(0,fl.jsx)(rl.A,{px:2,pt:2,children:(0,fl.jsx)(il.A,{variant:"h5",children:s.New?"New Mobile Account":"Edit Account Password"})}),(0,fl.jsx)(m.A,{children:(0,fl.jsxs)(g.Ay,{container:!0,spacing:2,children:[s.New?(0,fl.jsx)(g.Ay,{item:!0,xs:12,md:6,children:(0,fl.jsx)(v.A,{variant:"standard",margin:"dense",value:c.Username,placeholder:"Username",onChange:e=>u({...c,Username:e.target.value}),label:"Username",type:"text",autoComplete:"",fullWidth:!0})}):null,(0,fl.jsx)(g.Ay,{item:!0,xs:12,md:6,children:(0,fl.jsx)(v.A,{variant:"standard",margin:"dense",value:c.Password,placeholder:"Password",onChange:e=>u({...c,Password:e.target.value}),label:"Password",type:c.showPassword?"text":"password",autoComplete:"new-password",endAdornment:(0,fl.jsx)(y.A,{color:"secondary",size:"small",onClick:()=>u({...c,showPassword:!c.showPassword}),sx:{paddingX:1},children:(0,fl.jsx)(_.Ny1,{})}),fullWidth:!0})}),(0,fl.jsx)(g.Ay,{item:!0,xs:12,sx:{display:"flex",justifyContent:"space-between"},children:(0,fl.jsxs)(rl.A,{style:{marginLeft:"auto",paddingRight:5},children:[(0,fl.jsx)(al.A,{color:"secondary",onClick:()=>u({...c,show:!1}),children:"Cancel"}),(0,fl.jsx)(al.A,{color:"info",onClick:M,style:{marginLeft:10},children:s.New?"Create":"Update"})]})})]})})]}),(0,fl.jsx)(g.Ay,{container:!0,spacing:2,children:(0,fl.jsx)(g.Ay,{item:!0,xs:12,md:4,children:(0,fl.jsx)(x.A,{sx:{width:"100%"},children:""===s.Username?(0,fl.jsxs)(rl.A,{display:"flex",justifyContent:"space-between",alignItems:"center",px:5,py:2,children:[(0,fl.jsx)(il.A,{fontWeight:"bold",fontSize:24,children:"Mobile Account Not Available"}),(0,fl.jsx)(al.A,{variant:"gradient",color:"info",onClick:()=>{u({...c,show:!0})},children:(0,fl.jsx)(il.A,{fontWeight:"bold",fontSize:18,py:0,color:"white",children:"Create"})})]}):(0,fl.jsxs)(rl.A,{display:"flex",justifyContent:"space-between",alignItems:"center",px:5,py:2,children:[(0,fl.jsx)(il.A,{fontWeight:"bold",fontSize:24,children:s.Username}),(0,fl.jsxs)(rl.A,{style:{marginLeft:"auto"},children:[""!==s.Token?(0,fl.jsx)(al.A,{variant:"gradient",color:"warning",style:{marginRight:10,marginTop:5,marginBottom:5},onClick:()=>{o((0,fl.jsx)(nl.A,{title:"Logout Existing Device",message:"Are you sure you want to log out? This action reset access token and existing App Session will not function after next network update.",confirmText:"YES",denyText:"NO",denyButton:!0,handleClose:()=>o(null),handleDeny:()=>o(null),handleConfirm:()=>{ml.x.query("/mobile/auth/logout",{Username:s.Username,currentToken:s.Token}).then((e=>{l({...s,Token:""}),o(null)})).catch((e=>{ml.x.displayError(e,o)}))}}))},children:(0,fl.jsx)(il.A,{fontWeight:"bold",fontSize:18,py:0,color:"white",children:"Log Out"})}):null,(0,fl.jsx)(al.A,{variant:"gradient",color:"error",style:{marginRight:0,marginTop:5,marginBottom:5},onClick:M,children:(0,fl.jsx)(il.A,{fontWeight:"bold",fontSize:18,py:0,color:"white",children:"Delete"})})]})]})})})})]})}),(0,fl.jsxs)(p.A,{sx:{color:"#FFFFFF",zIndex:e=>e.zIndex.drawer+1},PaperProps:{sx:{minWidth:1e3}},open:Boolean(A),onClose:()=>S(null),children:[(0,fl.jsxs)(rl.A,{px:5,pt:5,children:[(0,fl.jsx)(il.A,{fontWeight:"bold",fontSize:24,children:"Wearable Recording Viewer"}),(0,fl.jsxs)(rl.A,{flexDirection:"row",children:[(0,fl.jsx)(al.A,{variant:"gradient",color:"success",style:{marginRight:5,marginTop:5,marginBottom:5},onClick:()=>{for(let t of Object.keys(A)){if("DeviceID"==t)continue;let n=0,r="",i=[];for(let e of Object.keys(A[t]))n=A[t][e].length>n?A[t][e].length:n,A[t][e].length>0&&(r+=e+",",i.push(e));if(0!=n){r=r.slice(0,-1)+"\n";for(let e=0;e{ml.x.query("/api/queryMobileRecordings",{patientId:r,recordingId:d.current,deleteData:!0}).then((e=>{S(null),w({list:d.list.filter((e=>e.RecordingId!=d.current)),current:""}),o(null)})).catch((e=>{ml.x.displayError(e,o)}))},children:(0,fl.jsx)(il.A,{fontWeight:"bold",fontSize:18,py:0,color:"white",children:"Delete Recording"})})]})]}),(0,fl.jsx)(rl.A,{p:5,display:"flex",alignItems:"center",flexDirection:"column",children:A?(0,fl.jsx)(pl,{dataToRender:A,height:1500,figureTitle:"BRAVO Wearable Data Viewer"}):null})]}),d.list.length>0?(0,fl.jsx)(rl.A,{pt:3,children:(0,fl.jsx)(rl.A,{children:(0,fl.jsx)(g.Ay,{container:!0,spacing:2,children:(0,fl.jsx)(g.Ay,{item:!0,xs:12,children:(0,fl.jsx)(x.A,{sx:{width:"100%"},children:(0,fl.jsxs)(g.Ay,{container:!0,children:[(0,fl.jsx)(g.Ay,{item:!0,xs:12,children:(0,fl.jsx)(rl.A,{p:2,children:(0,fl.jsx)(il.A,{variant:"h6",fontSize:24,children:"Wearable Recording Viewer"})})}),(0,fl.jsx)(g.Ay,{item:!0,xs:12,children:(0,fl.jsx)(rl.A,{p:4,children:(0,fl.jsx)(ss,{plugins:[Ls,tl],initialView:"dayGridMonth",initialDate:d.list.length>0?new Date(1e3*d.list[d.list.length-1].Time):null,eventContent:e=>(0,fl.jsx)(fl.Fragment,{children:(0,fl.jsxs)(rl.A,{px:1,flexDirection:"column",style:{cursor:"pointer",overflow:"hidden"},onClick:()=>{o((0,fl.jsx)(ol.A,{})),ml.x.query("/api/queryMobileRecordings",{patientId:r,recordingId:e.event._def.publicId,requestData:!0}).then((t=>{w({...d,current:e.event._def.publicId}),S(t.data),o(null)})).catch((e=>{ml.x.displayError(e,o)}))},children:[(0,fl.jsxs)(rl.A,{display:"flex",flexDirection:"row",children:[(0,fl.jsx)(b.A,{color:"info",fontSize:"sm"}),(0,fl.jsxs)(il.A,{display:"flex",fontSize:9,alignItems:"center",justifyContent:"center",children:[e.event.start.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"})," ","-"," ",e.event.end.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"})]})]}),(0,fl.jsx)(il.A,{fontSize:9,children:e.event.title})]})}),events:d.list.map((e=>({id:e.RecordingId,title:e.RecordingLabel,date:new Date(1e3*e.Time),end:new Date(1e3*(e.Time+e.Duration)),display:"list-item"})))})})})]})})})})})}):null]})]})},vl={name:"MobileManager",key:"mobile",icon:(0,fl.jsx)(d.A,{style:{color:"white",margin:0,padding:0}}),route:"/experimental/mobile",component:(0,fl.jsx)(gl,{}),identified:!0,deidentified:!0}},81954:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>N});var r=n(28334),i=n(9950),a=n(13564),o=n(60899),s=n(48089),l=n(49989),c=n(52498),u=n(13792),d=n(2588),h=n(88745),f=n(39545),p=n(15769),m=n(69780),g=n(9213),v=n(21671),y=n(34075),x=n(93038),b=n(25979),_=n(3788),w=n(70006),A=n(23266),S=n(20572),M=n(79700),T=n(7774),k=n(50160),E=n(52688),C=n(44414);const D=function(e){let{data:t,getRecordingData:n,handleMerge:r,toggle:a,children:o}=e;const[s,d]=(0,T.mv)(),{language:h}=s,[D,R]=i.useState({show:!1,merge:[]}),[P,O]=i.useState([]),[L,I]=i.useState([]),[z,N]=i.useState([]);i.useEffect((()=>{for(var e=[],n=0;n=30){var i=!1;for(var a of e)if(a.value==r.toLocaleDateString(h)){i=!0;break}i||e.push({time:1e3*t[n].Timestamp,value:r.toLocaleDateString(h),label:r.toLocaleDateString(h)})}}e.length>0&&(I(e.sort(((e,t)=>t.time-e.time))),F(e[0]))}),[t]);const F=e=>{O(e);for(var n=[],r=0;r=(a?0:30)&&n.push({...t[r],state:!1})}N(n)},B=(e,t,n)=>{for(var r in z)z[r].RecordingIDs==e&&(z[r].ContactType[t]=n.target.value,S.x.query("/api/updateBrainSenseStream",{requestData:z[r].DeviceID,updateRecordingContactType:e,contactIndex:t,contactType:n.target.value}).then((e=>{N([...z])})).catch((e=>{console.log(e)})))};return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(l.A,{p:2,children:(0,C.jsx)(f.A,{value:P,options:L,onChange:(e,t)=>F(t),getOptionLabel:e=>e.label||"",renderInput:e=>(0,C.jsx)(E.A,{...e,label:k.z.BrainSenseStreaming.Table.TableTitle[h],InputLabelProps:{shrink:!0}})})}),(0,C.jsxs)(l.A,{style:{overflowX:"auto"},children:[(0,C.jsx)(u.A,{variant:"contained",color:D.show?"error":"info",style:{marginLeft:10,display:"none"},onClick:()=>{if(D.show){if(0==D.merge.length)return void R({merge:[],show:!1});r(D).then((()=>{R({merge:[],show:!1})}))}else R({...D,merge:[],show:!0})},children:"Merge Recordings"}),(0,C.jsxs)(p.A,{size:"large",style:{marginTop:20},children:[(0,C.jsx)(m.A,{sx:{display:"table-header-group"},children:(0,C.jsxs)(g.A,{children:[[{title:"StreamingTableDate",minWidth:100,width:"30%"},{title:"StreamingTableLeftHemisphere",minWidth:200,width:"25%"},{title:"StreamingTableRightHemisphere",minWidth:200,width:"25%"},{title:"StreamingTableRecordingDuration",minWidth:100,width:"15%"}].map((e=>(0,C.jsx)(v.A,{variant:"head",style:{width:e.width,minWidth:e.minWidth,verticalAlign:"bottom",paddingBottom:0,paddingTop:0},children:(0,C.jsx)(c.A,{variant:"span",fontSize:12,fontWeight:"bold",style:{cursor:"pointer"},onClick:()=>console.log({col:e}),children:k.z.BrainSenseStreaming.Table[e.title][h]})},e.title))),(0,C.jsx)(v.A,{variant:"head",style:{width:"100px",minWidth:100,verticalAlign:"bottom",paddingBottom:0,paddingTop:0},children:(0,C.jsx)(c.A,{variant:"span",fontSize:12,fontWeight:"bold",style:{cursor:"pointer"},children:" "})},"viewedit")]})}),(0,C.jsx)(y.A,{children:z.map((e=>{var t=[],r=[];for(var i of e.Channels){const n=(0,M.ql)(i.Contacts);if(i.Hemisphere.startsWith("Left")){const[r,a]=i.Hemisphere.split(" ");t.push((0,C.jsxs)(l.A,{children:[(0,C.jsx)(c.A,{variant:"h6",fontSize:15,style:{marginBottom:0},children:i.CustomName!=i.Hemisphere?i.CustomName:(0,k.d)(k.z.FigureStandardText,r,h)+" "+(0,k.d)(k.z.BrainRegions,a,h)}),(0,C.jsxs)(c.A,{variant:"h6",fontSize:15,style:{marginBottom:0},children:[n," ",e.Therapy?"@ "+e.Therapy.Left.RateInHertz+" Hz "+e.Therapy.Left.PulseWidthInMicroSecond+" \u03bcS":""]})]},n))}else{const[t,a]=i.Hemisphere.split(" ");r.push((0,C.jsxs)(l.A,{children:[(0,C.jsx)(c.A,{variant:"h6",fontSize:15,style:{marginBottom:0},children:i.CustomName!=i.Hemisphere?i.CustomName:(0,k.d)(k.z.FigureStandardText,t,h)+" "+(0,k.d)(k.z.BrainRegions,a,h)}),(0,C.jsxs)(c.A,{variant:"h6",fontSize:15,style:{marginBottom:0},children:[n," ",e.Therapy?"@ "+e.Therapy.Right.RateInHertz+" Hz "+e.Therapy.Right.PulseWidthInMicroSecond+" \u03bcS":""]})]},n))}}return(0,C.jsxs)(g.A,{children:[(0,C.jsxs)(v.A,{style:{borderBottom:"1px solid rgba(224, 224, 224, 0.4)"},children:[(0,C.jsx)(c.A,{variant:"h5",fontSize:15,style:{marginBottom:0},children:new Date(1e3*e.Timestamp).toLocaleString(h)}),(0,C.jsx)(c.A,{variant:"h6",style:{marginBottom:0},fontSize:12,fontWeight:"bold",children:e.DeviceName}),D.show?(0,C.jsx)(x.A,{label:"Merge",style:{padding:0},onClick:()=>{D.merge.includes(e.RecordingID)?R((t=>(t.merge=t.merge.filter((t=>t!=e.RecordingID)),t))):R((t=>(t.merge.push(e.RecordingID),t)))}}):null]}),(0,C.jsx)(v.A,{style:{borderBottom:"1px solid rgba(224, 224, 224, 0.4)"},children:(0,C.jsx)(l.A,{style:{display:"flex",flexDirection:"column"},children:t.length>0?(0,C.jsxs)(l.A,{children:[t,e.ContactType?(0,C.jsxs)(b.A,{sx:{marginTop:1},fullWidth:!0,children:[(0,C.jsx)(_.A,{id:"left-hemisphere-stim-mode-label",children:k.z.BrainSenseStreaming.Table.StimMode[h]}),(0,C.jsx)(w.A,{labelId:"left-hemisphere-stim-mode-label",label:k.z.BrainSenseStreaming.Table.StimMode[h],value:e.ContactType[0],onChange:t=>B(e.RecordingIDs,0,t),sx:{paddingY:"6px"},children:e.ContactTypes[0].map((e=>(0,C.jsxs)(A.A,{value:e,children:[" ",(0,k.d)(k.z.Segments,e,h)," "]},e)))})]}):null]}):null})}),(0,C.jsx)(v.A,{style:{borderBottom:"1px solid rgba(224, 224, 224, 0.4)"},children:r.length>0?(0,C.jsxs)(l.A,{children:[r,e.ContactType?(0,C.jsxs)(b.A,{sx:{marginTop:1},fullWidth:!0,children:[(0,C.jsx)(_.A,{id:"right-hemisphere-stim-mode-label",children:k.z.BrainSenseStreaming.Table.StimMode[h]}),(0,C.jsx)(w.A,{labelId:"right-hemisphere-stim-mode-label",label:k.z.BrainSenseStreaming.Table.StimMode[h],value:2==e.ContactType.length?e.ContactType[1]:e.ContactType[0],onChange:t=>B(e.RecordingIDs,2==e.ContactType.length?1:0,t),sx:{paddingY:"6px"},children:2==e.ContactType.length?e.ContactTypes[1].map((e=>(0,C.jsxs)(A.A,{value:e,children:[" ",(0,k.d)(k.z.Segments,e,h)," "]},e))):e.ContactTypes[0].map((e=>(0,C.jsxs)(A.A,{value:e,children:[" ",(0,k.d)(k.z.Segments,e,h)," "]},e)))})]}):null]}):null}),(0,C.jsx)(v.A,{style:{borderBottom:"1px solid rgba(224, 224, 224, 0.4)"},children:(0,C.jsxs)(c.A,{variant:"p",fontSize:15,style:{marginBottom:0},children:[e.Duration.toFixed(2)," "," "+k.z.Time.Seconds[h]]})}),(0,C.jsx)(v.A,{style:{borderBottom:"1px solid rgba(224, 224, 224, 0.4)"},children:(0,C.jsx)(u.A,{variant:"contained",color:"info",onClick:()=>n(e.AnalysisID),style:{padding:0},children:k.z.PatientOverview.PatientInformation.View[h]})})]},e.AnalysisID)}))})]})]}),a?(0,C.jsx)(l.A,{p:2,children:(0,C.jsx)(u.A,{variant:"contained",color:"info",onClick:()=>(()=>{let e=[];for(var t in z)z[t].state&&e.push(z[t].RecordingID);n(e)})(),children:k.z.MultipleSegmentAnalysis.Table.Compare[h]})}):null]})};var R=n(94116),P=n(29144),O=n.n(P),L=n(23922);const I=function(e){let{dataToRender:t,channelInfos:n,therapy:r,height:a,type:o,figureTitle:s}=e;const[c,u]=(0,T.mv)(),{language:d}=c,[h,f]=i.useState(!1),p=new L.s(s,d);i.useEffect((()=>{t?(e=>{if(p.clearData(),p.fresh){p.subplots(1,1,{sharey:!1,sharex:!1}),p.setScaleType("log","y"),p.setTickValue([1e-6,1e-5,1e-4,.001,.01,.1,1,10,100,1e3,1e4,1e5],"y"),p.setYlim([-3,2]),p.setXlim([0,100]),p.setXlabel(`${(0,k.d)(k.z.FigureStandardText,"Frequency",d)} (${(0,k.d)(k.z.FigureStandardUnit,"Hertz",d)})`,{fontSize:15}),p.setYlabel(`${(0,k.d)(k.z.FigureStandardText,"Power",d)} (${(0,k.d)(k.z.FigureStandardUnit,"uV2Hz",d)})`,{fontSize:15}),p.setLegend({xanchor:"left"});const[e,t]=n[0].Channel.Hemisphere.split(" "),r=`${(0,k.d)(k.z.FigureStandardText,e,d)} ${(0,k.d)(k.z.BrainRegions,t,d)} E${n[0].Channel.Contacts[0]}-E${n[0].Channel.Contacts[1]}`;p.setTitle(`${r}`)}const t=e.length,r=O()({colormap:"jet",nshades:Math.max(t,10),format:"hex",alpha:1}),i=Array(e[0].PSD.length).fill(0).map(((e,t)=>t/2));for(var a in e)p.plot(i,e[a].PSD,{name:`${n[a].Segment} ${e[a].Therapy.Frequency.toFixed(0)} ${(0,k.d)(k.z.FigureStandardUnit,"Hertz",d)} ${e[a].Therapy.Pulsewidth.toFixed(0)} ${(0,k.d)(k.z.FigureStandardUnit,"uS",d)} ${e[a].Therapy.Amplitude.toFixed(1)} ${(0,k.d)(k.z.FigureStandardUnit,"mA",d)}`,legendgroup:`${n[a].Segment}`,color:r[a],linewidth:2,showlegend:!0,hovertemplate:`${n[a].Segment} ${e[a].Therapy.Frequency.toFixed(0)} ${(0,k.d)(k.z.FigureStandardUnit,"Hertz",d)} ${e[a].Therapy.Pulsewidth.toFixed(0)} ${(0,k.d)(k.z.FigureStandardUnit,"uS",d)} ${e[a].Therapy.Amplitude.toFixed(1)} ${(0,k.d)(k.z.FigureStandardUnit,"mA",d)} %{y:.2f} ${(0,k.d)(k.z.FigureStandardUnit,"uV2Hz",d)} `});0==p.traces.length?(p.purge(),f(!1)):(p.render(),f(!0))})(t):(p.purge(),f(!1))}),[t,d]);const m=(0,i.useCallback)((()=>{p.refresh()}),[]),{ref:g}=(0,R.uZ)({onResize:m,refreshMode:"debounce",refreshRate:50,skipOnMount:!1});return(0,C.jsx)(l.A,{ref:g,id:s,style:{marginTop:5,marginBottom:10,height:a,width:"100%",display:h?"":"none"}})};const z=function(){const e=(0,a.Zp)(),[t,n]=(0,T.mv)(),{patientID:r,language:u}=t,[f,p]=i.useState([]),[m,g]=i.useState([]),[v,y]=i.useState(!1),[x,b]=i.useState([]),[_,w]=i.useState([]),[A,M]=i.useState(!1),[E,R]=i.useState(!1),[P,O]=i.useState(!1),[L,z]=i.useState(!1),[N,F]=i.useState(0),[B,j]=i.useState(0),[U,V]=i.useState(600),[H,W]=i.useState(null);return i.useEffect((()=>{r?S.x.query("/api/queryNeuralActivityStreaming",{id:r,requestOverview:!0}).then((e=>{g(e.data)})).catch((e=>{S.x.displayError(e,W)})):e("/dashboard",{replace:!1})}),[r]),i.useEffect((()=>{b(Object.keys(v))}),[v]),(0,C.jsxs)(C.Fragment,{children:[H,(0,C.jsx)(h.A,{children:(0,C.jsx)(l.A,{pt:3,children:(0,C.jsx)(l.A,{children:(0,C.jsxs)(o.Ay,{container:!0,spacing:2,children:[(0,C.jsx)(o.Ay,{item:!0,xs:12,children:(0,C.jsx)(s.A,{sx:{width:"100%"},children:(0,C.jsx)(o.Ay,{container:!0,children:(0,C.jsx)(o.Ay,{item:!0,xs:12,children:(0,C.jsx)(l.A,{p:2,lineHeight:1,children:m.length>0?(0,C.jsx)(D,{data:m,toggle:!0,getRecordingData:e=>{W((0,C.jsx)(d.A,{})),S.x.query("/api/queryMultipleSegmentComparison",{id:r,recordingIds:e}).then((e=>{y(e.data),W(null)})).catch((e=>{S.x.displayError(e,W)}))}}):(0,C.jsx)(c.A,{variant:"h6",fontSize:24,children:k.z.WarningMessage.NoData[u]})})})})})}),x.map((e=>{let t="Right";e.endsWith("LEFT")&&(t="Left");const n=v[e].map((e=>{for(let n in m)if(m[n].RecordingID==e.RecordingID)for(let e in m[n].Channels)if(m[n].Channels[e].Hemisphere.startsWith(t))return{Channel:m[n].Channels[e],Segment:m[n].ContactType[e]}}));return(0,C.jsx)(o.Ay,{item:!0,xs:12,children:(0,C.jsx)(s.A,{sx:{width:"100%"},children:(0,C.jsx)(o.Ay,{container:!0,children:(0,C.jsx)(o.Ay,{item:!0,xs:12,children:(0,C.jsx)(l.A,{p:2,lineHeight:1,children:(0,C.jsx)(I,{dataToRender:v[e],channelInfos:n,figureTitle:e,height:600})})})})})},e)}))]})})})})]})},N={name:"MultipleSegmentAnalysis",key:"segment-analysis",icon:(0,C.jsx)(r.A,{style:{color:"white",margin:0,padding:0}}),route:"/experimental/segment-analysis",component:(0,C.jsx)(z,{}),identified:!0,deidentified:!0}},65051:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>U});var r=n(74864),i=n(9950),a=n(13564),o=n(60899),s=n(48089),l=n(29925),c=n(68411),u=n(32459),d=n(63571),h=n(29144),f=n.n(h),p=n(49989),m=n(52498),g=n(47513),v=(n(39409),n(13792)),y=(n(52688),n(2588)),x=n(94116),b=n(23922),_=n(50160),w=n(7774),A=n(44414);const S=function(e){let{dataToRender:t,events:n,height:r,stack:a,grouping:o,figureTitle:s}=e;const[l,c]=(0,w.mv)(),{language:u}=l,[d,h]=i.useState(!1),f=new b.s(s,u);i.useEffect((()=>{if(t){var e={},r=[-1,-1];for(var i in t)for(var s in t[i].EventTime){(r[0]<0||t[i].EventTime[s]r[1])&&(r[1]=t[i].EventTime[s]);const n=new Date(1e3*t[i].EventTime[s]),a=n.getFullYear();if("Week"==o){var l=Math.floor(t[i].EventTime[s]%31536e3/86400/7);const n=`${a} Week ${(l=l>51?51:l).toFixed(0).padStart(2,"0")}`;Object.keys(e).includes(n)||(e[n]=[]),e[n].push(t[i].EventName[s])}else if("Month"==o){const r=`${a} Month ${(n.getMonth()+1).toFixed(0).padStart(2,"0")}`;Object.keys(e).includes(r)||(e[r]=[]),e[r].push(t[i].EventName[s])}}((e,t)=>{f.clearData(),f.fresh&&(f.subplots(1,1,{sharex:!0,sharey:!0}),f.setYlabel("Frequency (Count)",{fontsize:15}),f.setLegend({tracegroupgap:5,xanchor:"left"}),f.setLayoutProps({hovermode:"xy",barmode:a?"stack":"group"}),f.setTitle("Patient Marked Event Logs"));var r=Object.keys(e);r=r.sort(((e,t)=>e>t));const i=t.map((e=>new Date(1e3*e).getFullYear())),s=t.map((e=>{if("Week"==o){const n=new Date(1e3*e).getFullYear();var t=Math.floor(e%31536e3/86400/7);return`${n} Week ${(t=t>51?51:t).toFixed(0).padStart(2,"0")}`}if("Month"==o)return`${new Date(1e3*e).getFullYear()} Month ${(new Date(1e3*e).getMonth()+1).toFixed(0).padStart(2,"0")}`}));for(var l of Object.keys(n)){for(var c=[],d=[],p=[],m=i[0];m<=i[1];m++)if("Week"==o){const t=new Date(`${m}-01-01`);for(var g=0;g<52;g++){const n=`${m} Week ${g.toFixed(0).padStart(2,"0")}`;n>=s[0]&&n<=s[1]&&(d.push(new Date(t.getTime()+7*g*3600*24*1e3+6e4*t.getTimezoneOffset()).toLocaleDateString(u)),c.push(e[n]?e[n].filter((e=>e==l)).length:0),p.push(c[c.length-1].toFixed(0).padStart(2,"0")))}}else if("Month"==o)for(var v=0;v<12;v++){const t=new Date(`${m}-${(v+1).toFixed(0).padStart(2,"0")}-01`),n=`${m} Month ${(v+1).toFixed(0).padStart(2,"0")}`;n>=s[0]&&n<=s[1]&&(d.push(new Date(t.getTime()+6e4*t.getTimezoneOffset()).toLocaleDateString(u)),c.push(e[n]?e[n].filter((e=>e==l)).length:0),p.push(c[c.length-1].toFixed(0).padStart(2,"0")))}f.bar(d,c,[],{facecolor:n[l].color,name:l,meta:l,text:p,hovertemplate:" %{x} %{meta}
Count: %{y} "})}e?(f.render(),h(!0)):(f.purge(),h(!1))})(e,r)}}),[t,u,o,a]);const m=(0,i.useCallback)((()=>{f.refresh()}),[]),{ref:g}=(0,x.uZ)({onResize:m,refreshMode:"debounce",refreshRate:50,skipOnMount:!1});return(0,A.jsx)(p.A,{ref:g,id:s,style:{marginTop:5,marginBottom:10,height:r,width:"100%",display:d?"":"none"}})};var M=n(88745),T=n(20572),k=n(85442);const E=function(e){let{dataToRender:t,timerange:n,events:r,height:a,figureTitle:o}=e;const[s,l]=(0,w.mv)(),{language:c}=s,[u,d]=i.useState(!1),h=new b.s(o,c);i.useEffect((()=>{t&&n[0]&&n[1]&&(e=>{var t;h.clearData(),h.fresh&&(t=h.subplots(1,2,{sharex:!0,sharey:!0}),h.setScaleType("log","y"),h.setTickValue([.1,1,10],"y"),h.setYlim([-1,1]),h.setXlim([0,100],t[0]),h.setXlim([0,100],t[1]),h.setXlabel("Frequency (Hz)",{fontSize:15},t[0]),h.setXlabel("Frequency (Hz)",{fontSize:15},t[1]),h.setYlabel("Power (a.u.)",{fontSize:15}),h.setLegend({xanchor:"left"}),h.setSubtitle("Left Hemisphere",t[0]),h.setSubtitle("Right Hemisphere",t[1]));const i=n.map((e=>e.toDate().getTime()/1e3));for(var a=new Array(100),o=0;oe[l][s[c]][n]&&e[l].EventName[n]==u&&e[l].EventTime[n]=i[0]));if(n.length>0){const e=a.map(((e,t)=>(0,k.i2o)(n.map((e=>e[t]))))),i=a.map(((e,t)=>(0,k.wiE)(n.map((e=>e[t])))/(0,k.RZD)(n.length)*2));h.shadedErrorBar(a,e,i,{color:r[u].color,name:u,linewidth:2,hovertemplate:" "+u+" %{y:.2f} ",legendgroup:u,showlegend:!0},{color:r[u].color,legendgroup:u},t[c])}}e?(h.render(),d(!0)):(h.purge(),d(!1))})(t)}),[t,n,c]);const f=(0,i.useCallback)((()=>{h.refresh()}),[]),{ref:m}=(0,x.uZ)({onResize:f,refreshMode:"debounce",refreshRate:50,skipOnMount:!1});return(0,A.jsx)(p.A,{ref:m,id:o,style:{marginTop:5,marginBottom:10,height:a,width:"100%",display:u?"":"none"}})};var C=n(15769),D=n(69780),R=n(9213),P=n(21671),O=n(34075),L=n(93038),I=n(4919),z=n(17825);function N(e){let{totalCount:t,totalPages:n,currentPage:r,setPagination:a,deleteRecords:o}=e;const[s]=(0,w.mv)(),{language:l}=s,c=e=>{e>=0&&e{d(n>8?r<4?Array.from({length:8},((e,t)=>t)).map((e=>{const t=e;return(0,A.jsx)(z.A,{item:!0,onClick:()=>c(t),active:t==r,children:t+1},t)})):rt-4)).map((e=>{const t=r+e;return(0,A.jsx)(z.A,{item:!0,onClick:()=>c(t),active:t==r,children:t+1},t)})):Array.from({length:8},((e,t)=>t)).map((e=>{const t=n-8+e;return(0,A.jsx)(z.A,{item:!0,onClick:()=>c(t),active:t==r,children:t+1},t)})):Array.from({length:n},((e,t)=>t)).map((e=>{const t=e;return(0,A.jsx)(z.A,{item:!0,onClick:()=>c(t),active:t==r,children:t+1},t)})))}),[n,r]),(0,A.jsxs)(p.A,{display:"flex",flexDirection:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},p:3,children:[(0,A.jsxs)(p.A,{mb:{xs:3,sm:0},display:"flex",flexDirection:"row",alignItems:"center",children:[(0,A.jsx)(v.A,{variant:"contained",color:"error",onClick:o,style:{marginLeft:10,marginRight:30},children:"Delete"}),(0,A.jsx)(m.A,{variant:"h6",fontSize:15,children:"Total Events Count: "+t.toString()})]}),n>1&&(0,A.jsxs)(z.A,{variant:"gradient",color:"info",children:[(0,A.jsx)(z.A,{item:!0,onClick:()=>{},children:(0,A.jsx)(I.A,{sx:{fontWeight:"bold"},children:"chevron_left"})}),u,(0,A.jsx)(z.A,{item:!0,onClick:()=>{},children:(0,A.jsx)(I.A,{sx:{fontWeight:"bold"},children:"chevron_right"})})]})]})}const F=e=>{let{data:t,deleteRecords:n}=e;const[r,o]=(0,w.mv)(),{language:s}=r,l=((0,a.Zp)(),300),[c,u]=(0,i.useState)([]),[d,h]=(0,i.useState)({currentPage:0,totalPages:0}),[f,g]=(0,i.useState)({show:!0,merge:[]});(0,i.useEffect)((()=>{h({currentPage:0,totalPages:Math.ceil(t.length/l)})}),[t]),(0,i.useEffect)((()=>{u(t.slice(d.currentPage*l,d.currentPage*l+l))}),[d]);return(0,A.jsxs)(p.A,{style:{overflowX:"auto"},children:[(0,A.jsxs)(C.A,{size:"small",children:[(0,A.jsx)(D.A,{sx:{display:"table-header-group"},children:(0,A.jsx)(R.A,{children:["Checked","EventName","EventTime","EventType"].map((e=>(0,A.jsx)(P.A,{variant:"head",style:{width:"33%",minWidth:200,verticalAlign:"bottom",paddingBottom:0,paddingTop:0},children:(0,A.jsx)(m.A,{variant:"span",fontSize:12,fontWeight:"bold",style:{cursor:"pointer"},onClick:()=>console.log({col:e}),children:(0,_.d)(_.z.PatientEvents.Table,e,s)})},e)))})}),(0,A.jsx)(O.A,{children:c.map(((e,t)=>(0,A.jsxs)(R.A,{children:[(0,A.jsx)(P.A,{style:{borderBottom:"1px solid rgba(224, 224, 224, 0.4)",paddingTop:0,paddingBottom:0},children:(0,A.jsx)(m.A,{variant:"h6",fontSize:15,style:{marginBottom:0},children:(0,A.jsx)(L.A,{label:"Merge",style:{padding:0},onClick:()=>{f.merge.includes(e.ID)?g((t=>(t.merge=t.merge.filter((t=>t!=e.ID)),t))):g((t=>(t.merge.push(e.ID),t)))}})})}),(0,A.jsx)(P.A,{style:{borderBottom:"1px solid rgba(224, 224, 224, 0.4)",paddingTop:0,paddingBottom:0},children:(0,A.jsx)(m.A,{variant:"p",fontSize:12,style:{marginBottom:0},children:e.Name})}),(0,A.jsx)(P.A,{style:{borderBottom:"1px solid rgba(224, 224, 224, 0.4)",paddingTop:0,paddingBottom:0},children:(0,A.jsx)(m.A,{variant:"p",fontSize:12,style:{marginBottom:0},children:new Date(1e3*e.Time).toLocaleString({weekday:"long",year:"numeric",month:"long",day:"numeric"})})}),(0,A.jsx)(P.A,{style:{borderBottom:"1px solid rgba(224, 224, 224, 0.4)",paddingTop:0,paddingBottom:0},children:(0,A.jsx)(m.A,{variant:"p",fontSize:12,style:{marginBottom:0},children:e.Type})})]},t)))})]}),(0,A.jsx)(N,{totalCount:t.length,totalPages:d.totalPages,currentPage:d.currentPage,setPagination:h,deleteRecords:()=>{n(f.merge)}})]})},B=(0,i.memo)(F);const j=function(){const e=(0,a.Zp)(),[t,n]=(0,w.mv)(),{patientID:r,language:h}=t,[v,x]=(0,i.useState)(!1),[b,k]=(0,i.useState)([]),[C,D]=(0,i.useState)({}),[R,P]=(0,i.useState)("Week"),[O,L]=(0,i.useState)({start:null,end:null}),[I,z]=(0,i.useState)(null);return(0,i.useEffect)((()=>{r?(z((0,A.jsx)(y.A,{})),T.x.query("/api/queryPatientEvents",{id:r}).then((e=>{k(e.data.ClinicianEvents),x(e.data.EventPSDs),z(null)})).catch((e=>{T.x.displayError(e,z)}))):e("/dashboard",{replace:!1})}),[r]),(0,i.useEffect)((()=>{if(v){const a={};for(var e=0;e11?Object.keys(a).length:11,format:"hex",alpha:1});var n=0,r=o.length/Object.keys(a).length;for(var i of Object.keys(a))a[i].color=o[Math.floor(n)],n+=r;D(a)}}),[v]),(0,A.jsxs)(A.Fragment,{children:[I,(0,A.jsx)(M.A,{children:(0,A.jsx)(p.A,{pt:3,children:(0,A.jsx)(p.A,{children:(0,A.jsxs)(o.Ay,{container:!0,spacing:2,children:[(0,A.jsx)(o.Ay,{item:!0,xs:12,children:(0,A.jsx)(s.A,{sx:{width:"100%"},children:(0,A.jsxs)(o.Ay,{container:!0,children:[(0,A.jsx)(o.Ay,{item:!0,xs:12,children:(0,A.jsx)(p.A,{p:2,children:(0,A.jsx)(m.A,{variant:"h6",fontSize:24,children:_.z.PatientEvents.Figure.EventFrequency[h]})})}),(0,A.jsx)(o.Ay,{item:!0,xs:12,children:(0,A.jsx)(p.A,{pb:2,display:"flex",flexDirection:"row",children:Object.keys(C).map((e=>(0,A.jsx)(p.A,{mx:2,px:2,style:{cursor:"pointer",background:C[e].color,borderRadius:10},onClick:()=>{},children:(0,A.jsx)(m.A,{fontWeight:"bold",fontSize:15,color:"white",children:e})},e)))})}),(0,A.jsx)(o.Ay,{item:!0,xs:12,sm:6,children:(0,A.jsx)(p.A,{px:2,pb:2,display:"flex",flexDirection:"row",children:(0,A.jsx)(g.A,{row:!0,defaultValue:R,value:R,options:[{value:"Week",label:"By Week"},{value:"Month",label:"By Month"}],onChange:e=>P(e.target.value)})})}),(0,A.jsx)(o.Ay,{item:!0,xs:12,children:Object.keys(C).length>0?(0,A.jsx)(S,{dataToRender:v,height:400,events:C,grouping:R,stack:!0,figureTitle:"EventCounts"}):null})]})})}),(0,A.jsx)(o.Ay,{item:!0,xs:12,children:(0,A.jsx)(s.A,{sx:{width:"100%"},children:(0,A.jsxs)(o.Ay,{container:!0,children:[(0,A.jsx)(o.Ay,{item:!0,xs:12,children:(0,A.jsx)(p.A,{p:2,children:(0,A.jsx)(m.A,{variant:"h6",fontSize:24,children:_.z.PatientEvents.Figure.EventFrequencyTimeRange[h]})})}),(0,A.jsx)(o.Ay,{item:!0,xs:12,children:(0,A.jsxs)(p.A,{p:2,display:"flex",flexDirection:"row",children:[(0,A.jsx)(m.A,{variant:"h6",fontSize:24,pr:2,children:"From"}),(0,A.jsx)(u.$,{dateAdapter:c.A,adapterLocale:"us",children:(0,A.jsx)(d.l,{label:"Start Date",value:O.start,onChange:e=>{L({...O,start:e})},renderInput:e=>(0,A.jsx)(l.A,{...e})})}),(0,A.jsx)(m.A,{variant:"h6",fontSize:24,px:2,children:"To"}),(0,A.jsx)(u.$,{dateAdapter:c.A,children:(0,A.jsx)(d.l,{label:"End Date",value:O.end,onChange:e=>{L({...O,end:e})},renderInput:e=>(0,A.jsx)(l.A,{...e})})})]})}),(0,A.jsx)(o.Ay,{item:!0,xs:12,children:(0,A.jsx)(E,{dataToRender:v,timerange:[O.start,O.end],events:C,height:600,figureTitle:"EventPSDs"})})]})})}),b.length>0?(0,A.jsx)(o.Ay,{item:!0,xs:12,children:(0,A.jsx)(s.A,{sx:{width:"100%"},children:(0,A.jsxs)(o.Ay,{container:!0,children:[(0,A.jsx)(o.Ay,{item:!0,xs:12,children:(0,A.jsx)(p.A,{p:2,children:(0,A.jsx)(m.A,{variant:"h6",fontSize:24,children:_.z.PatientEvents.Figure.ClinicianEvents[h]})})}),(0,A.jsx)(o.Ay,{item:!0,xs:12,children:(0,A.jsx)(B,{data:b,deleteRecords:e=>{e.length<1||(z((0,A.jsx)(y.A,{})),T.x.query("/api/queryCustomAnnotations",{id:r,deleteEvents:e}).then((t=>{k((t=>t.filter((t=>!e.includes(t.ID))))),z(null)})).catch((e=>{T.x.displayError(e,z)})))}})})]})})}):null]})})})})]})},U={name:"PatientEvents",key:"patient-events",icon:(0,A.jsx)(r.A,{style:{color:"white",margin:0,padding:0}}),route:"/experimental/patient-events",component:(0,A.jsx)(j,{}),identified:!0,deidentified:!0}},79479:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>Ce});var r=n(28334),i=n(9950),a=n(13564),o=n(55158),s=n(60899),l=n(48089),c=n(49989),u=n(52498),d=n(13792),h=n(11942),f=n.n(h),p=n(59254),m=n(98587),g=n(58168),v=n(2803),y=n(88465),x=n(88283),b=n(97497),_=n(61676),w=n(14857),A=n(48283),S=n(1763),M=n(423);function T(e){return(0,M.A)("MuiLinearProgress",e)}(0,S.A)("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);var k=n(44414);const E=["className","color","value","valueBuffer","variant"];let C,D,R,P,O,L,I=e=>e;const z=(0,x.i7)(C||(C=I` 0% { left: -35%; right: 100%; } 60% { left: 100%; right: -90%; } 100% { left: 100%; right: -90%; } `)),N=(0,x.i7)(D||(D=I` 0% { left: -200%; right: 100%; } 60% { left: 107%; right: -8%; } 100% { left: 107%; right: -8%; } `)),F=(0,x.i7)(R||(R=I` 0% { opacity: 1; background-position: 0 -23px; } 60% { opacity: 0; background-position: 0 -23px; } 100% { opacity: 1; background-position: -200px -23px; } `)),B=(e,t)=>"inherit"===t?"currentColor":e.vars?e.vars.palette.LinearProgress[`${t}Bg`]:"light"===e.palette.mode?(0,b.a)(e.palette[t].main,.62):(0,b.e$)(e.palette[t].main,.5),j=(0,p.Ay)("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${(0,_.A)(n.color)}`],t[n.variant]]}})((e=>{let{ownerState:t,theme:n}=e;return(0,g.A)({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},backgroundColor:B(n,t.color)},"inherit"===t.color&&"buffer"!==t.variant&&{backgroundColor:"none","&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}},"buffer"===t.variant&&{backgroundColor:"transparent"},"query"===t.variant&&{transform:"rotate(180deg)"})})),U=(0,p.Ay)("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.dashed,t[`dashedColor${(0,_.A)(n.color)}`]]}})((e=>{let{ownerState:t,theme:n}=e;const r=B(n,t.color);return(0,g.A)({position:"absolute",marginTop:0,height:"100%",width:"100%"},"inherit"===t.color&&{opacity:.3},{backgroundImage:`radial-gradient(${r} 0%, ${r} 16%, transparent 42%)`,backgroundSize:"10px 10px",backgroundPosition:"0 -23px"})}),(0,x.AH)(P||(P=I` animation: ${0} 3s infinite linear; `),F)),V=(0,p.Ay)("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t[`barColor${(0,_.A)(n.color)}`],("indeterminate"===n.variant||"query"===n.variant)&&t.bar1Indeterminate,"determinate"===n.variant&&t.bar1Determinate,"buffer"===n.variant&&t.bar1Buffer]}})((e=>{let{ownerState:t,theme:n}=e;return(0,g.A)({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",backgroundColor:"inherit"===t.color?"currentColor":(n.vars||n).palette[t.color].main},"determinate"===t.variant&&{transition:"transform .4s linear"},"buffer"===t.variant&&{zIndex:1,transition:"transform .4s linear"})}),(e=>{let{ownerState:t}=e;return("indeterminate"===t.variant||"query"===t.variant)&&(0,x.AH)(O||(O=I` width: auto; animation: ${0} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite; `),z)})),H=(0,p.Ay)("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t[`barColor${(0,_.A)(n.color)}`],("indeterminate"===n.variant||"query"===n.variant)&&t.bar2Indeterminate,"buffer"===n.variant&&t.bar2Buffer]}})((e=>{let{ownerState:t,theme:n}=e;return(0,g.A)({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},"buffer"!==t.variant&&{backgroundColor:"inherit"===t.color?"currentColor":(n.vars||n).palette[t.color].main},"inherit"===t.color&&{opacity:.3},"buffer"===t.variant&&{backgroundColor:B(n,t.color),transition:"transform .4s linear"})}),(e=>{let{ownerState:t}=e;return("indeterminate"===t.variant||"query"===t.variant)&&(0,x.AH)(L||(L=I` width: auto; animation: ${0} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite; `),N)})),W=i.forwardRef((function(e,t){const n=(0,A.A)({props:e,name:"MuiLinearProgress"}),{className:r,color:i="primary",value:a,valueBuffer:o,variant:s="indeterminate"}=n,l=(0,m.A)(n,E),c=(0,g.A)({},n,{color:i,variant:s}),u=(e=>{const{classes:t,variant:n,color:r}=e,i={root:["root",`color${(0,_.A)(r)}`,n],dashed:["dashed",`dashedColor${(0,_.A)(r)}`],bar1:["bar",`barColor${(0,_.A)(r)}`,("indeterminate"===n||"query"===n)&&"bar1Indeterminate","determinate"===n&&"bar1Determinate","buffer"===n&&"bar1Buffer"],bar2:["bar","buffer"!==n&&`barColor${(0,_.A)(r)}`,"buffer"===n&&`color${(0,_.A)(r)}`,("indeterminate"===n||"query"===n)&&"bar2Indeterminate","buffer"===n&&"bar2Buffer"]};return(0,y.A)(i,T,t)})(c),d=(0,w.A)(),h={},f={bar1:{},bar2:{}};if("determinate"===s||"buffer"===s)if(void 0!==a){h["aria-valuenow"]=Math.round(a),h["aria-valuemin"]=0,h["aria-valuemax"]=100;let e=a-100;"rtl"===d.direction&&(e=-e),f.bar1.transform=`translateX(${e}%)`}else 0;if("buffer"===s)if(void 0!==o){let e=(o||0)-100;"rtl"===d.direction&&(e=-e),f.bar2.transform=`translateX(${e}%)`}else 0;return(0,k.jsxs)(j,(0,g.A)({className:(0,v.A)(u.root,r),ownerState:c,role:"progressbar"},h,{ref:t},l,{children:["buffer"===s?(0,k.jsx)(U,{className:u.dashed,ownerState:c}):null,(0,k.jsx)(V,{className:u.bar1,ownerState:c,style:f.bar1}),"determinate"===s?null:(0,k.jsx)(H,{className:u.bar2,ownerState:c,style:f.bar2})]}))})),G=(0,p.Ay)(W)((e=>{let{theme:t,ownerState:n}=e;const{palette:r,functions:i}=t,{color:a,value:o,variant:s}=n,{text:l,gradients:c}=r,{linearGradient:u}=i;let d;return d="gradient"===s?c[a]?u(c[a].main,c[a].state):u(c.info.main,c.info.state):r[a]?r[a].main:r.info.main,{"& .MuiLinearProgress-bar":{background:d,width:`${o}%`,color:l.main}}})),q=(0,i.forwardRef)(((e,t)=>{let{variant:n,color:r,value:i,label:a,...o}=e;return(0,k.jsxs)(k.Fragment,{children:[a&&(0,k.jsxs)(u.A,{variant:"button",fontWeight:"medium",color:"text",children:[i,"%"]}),(0,k.jsx)(G,{...o,ref:t,variant:"determinate",value:i,ownerState:{color:r,value:i,variant:n}})]})}));q.defaultProps={variant:"contained",color:"info",value:0,label:!1},q.propTypes={variant:f().oneOf(["contained","gradient"]),color:f().oneOf(["primary","secondary","info","success","warning","error","light","dark"]),value:f().number,label:f().bool};const Y=q;var $=n(2588),X=n(88745),Z=n(94116),K=n(97591),J=n(23266),Q=n(96583),ee=n(28170),te=n(39545),ne=n(29925),re=n(79739),ie=n(30412),ae=n(85442),oe=n(23922),se=n(7774),le=n(50160);const ce=(0,ie.Z)();const ue=function(e){let{dataToRender:t,channelInfos:n,handleAddEvent:r,handleDeleteEvent:a,handleAdjustAlignment:o,annotations:l,height:h,figureTitle:f}=e;const[p,m]=(0,se.mv)(),{language:g}=p,[v,y]=i.useState(!1),[x,b]=i.useState(h),_=new oe.s(f,g),[w,A]=i.useState(null),[S,M]=i.useState({name:"",time:0,duration:0,show:!1}),[T,E]=i.useState({show:!1,alignment:0});i.useEffect((()=>{t?((e=>{if(_.clearData(),_.fresh){let r=_.subplots(2*e.Channels.length+2,1,{sharey:!1,sharex:!0});for(var t in e.Channels){_.setYlim([0,100],r[1+2*t]),_.setYlabel(`${(0,le.d)(le.z.FigureStandardText,"Amplitude",g)} (${(0,le.d)(le.z.FigureStandardUnit,"uV",g)})`,{fontSize:15},r[2*t]),_.setYlabel(`${(0,le.d)(le.z.FigureStandardText,"Frequency",g)} (${(0,le.d)(le.z.FigureStandardUnit,"Hertz",g)})`,{fontSize:15},r[2*t+1]);const[e,i]=n[t].Hemisphere.split(" ");let a=n[t].Hemisphere==n[t].CustomName?(0,le.d)(le.z.FigureStandardText,e,g)+" "+(0,le.d)(le.z.FigureStandardText,i,g):n[t].CustomName;a+="string"==typeof n[t].Contacts?" "+n[t].Contacts:` E${n[t].Contacts[0]}-E${n[t].Contacts[1]}`,n[t].Hemisphere,n[t].CustomName,_.setSubtitle(`${a}`,r[2*t]),_.setSubtitle(`${a} ${(0,le.d)(le.z.BrainSenseStreaming.Figure,"TimeFrequencyAnalysis",g)}`,r[2*t+1])}_.setSubtitle(`${(0,le.d)(le.z.BrainSenseStreaming.Figure,"PowerChannel",g)}`,r[r.length-2]),_.setSubtitle(`${(0,le.d)(le.z.BrainSenseStreaming.Figure,"Stimulation",g)}`,r[r.length-1]),_.setYlim([0,5],r[r.length-1])}let r=_.getAxes();for(let n in e.Channels){const t=ae.hRg(ae.tnl(ae.UPj(e.Stream[n].RawData)),.99);_.setYlim([1.1*-t,1.1*t],r[2*n+0]);var i=Array(e.Stream[n].RawData.length).fill(0).map(((t,n)=>new Date(1e3*e.Timestamp+4*n)));_.plot(i,e.Stream[n].RawData,{linewidth:.5,hovertemplate:` %{y:.2f} ${(0,le.d)(le.z.FigureStandardUnit,"uV",g)}`},r[2*n+0]),_.setXlim([i[0],i[i.length-1]],r[0]);for(let i=0;i "+e.Annotations[i].Name+""},r[2*n+0]),e.Annotations[i].Duration>0&&_.addShadedArea([new Date(1e3*e.Annotations[i].Time),new Date(1e3*(e.Annotations[i].Time+e.Annotations[i].Duration))],null,{color:"#AA0000",name:e.Annotations[i].Name,legendgroup:e.Annotations[i].Name,showlegend:!1},r[2*n+0]);i=Array(e.Stream[n].Spectrogram.Time.length).fill(0).map(((t,r)=>new Date(1e3*e.Timestamp+1e3*e.Stream[n].Spectrogram.Time[r]))),_.surf(i,e.Stream[n].Spectrogram.Frequency,e.Stream[n].Spectrogram.Power,{zlim:[-20,20],hovertemplate:` %{y:.2f} ${(0,le.d)(le.z.FigureStandardUnit,"Hertz",g)}
%{x}
%{z:.2f} ${(0,le.d)(le.z.FigureStandardUnit,"dB",g)} `,coloraxis:_.createColorAxis({colorscale:"Jet",colorbar:{y:1-1/(2*e.Channels.length+2)/2-(2*n+1)*(1/(2*e.Channels.length+2)),len:1/(2*e.Channels.length+2)},clim:e.Stream[n].Spectrogram.ColorRange})},r[2*n+1])}for(let n in e.PowerBand)if(i=Array(e.PowerBand[n].Time.length).fill(0).map(((t,r)=>new Date(1e3*e.PowerTimestamp+1e3*e.PowerBand[n].Time[r]))),_.plot(i,e.PowerBand[n].Power,{linewidth:2,hovertemplate:" %{y:.2f}",name:e.PowerBand[n].LegendName,showlegend:!0},r[r.length-2]),e.PowerBand[n].Power.some((e=>e>5e3))){let t=ae.T9B(e.PowerBand[n].Power);t=5e3*ae.mkO(t/5e3),_.setYlim([0,t],r[r.length-2])}let a=["#253EF7","#FCA503","#8bc34a","#9c27b0"];for(let n in e.Stimulation)i=Array(e.Stimulation[n].Time.length).fill(0).map(((t,r)=>new Date(1e3*e.PowerTimestamp+1e3*e.Stimulation[n].Time[r]))),_.plot(i,e.Stimulation[n].Amplitude,{linewidth:3,color:a[n],shape:"hv",hovertemplate:` ${e.Stimulation[n].Name} %{y:.2f} ${(0,le.d)(le.z.FigureStandardUnit,"mA",g)}
%{x} `,name:e.Stimulation[n].LegendName,showlegend:!0},r[r.length-1]);_.setLegend({xanchor:"left",y:1/r.length-.15/r.length,tracegroupgap:5}),e?(_.render(),y(!0)):(_.purge(),y(!1))})(t),b(t.Channels.length*h),E({show:!1,alignment:t.Info.Alignment?t.Info.Alignment:0})):(_.purge(),y(!1))}),[t,g]);const C=(0,i.useCallback)((()=>{_.refresh()}),[]),{ref:D}=(0,Z.uZ)({onResize:C,refreshMode:"debounce",refreshRate:50,skipOnMount:!1});return i.useEffect((()=>{D.current.on&&D.current.on("plotly_click",(e=>{M((t=>(t.time=new Date(e.points[0].x).getTime(),{...t})))}))}),[D.current,t]),(0,k.jsxs)(c.A,{ref:D,id:f,onContextMenu:e=>{e.preventDefault(),A(null===w?{mouseX:e.clientX+2,mouseY:e.clientY-6}:null)},style:{marginTop:5,marginBottom:10,height:x,width:"100%",display:v?"":"none"},children:[(0,k.jsxs)(K.A,{open:null!==w,onClose:()=>A(null),anchorReference:"anchorPosition",anchorPosition:null!==w?{top:w.mouseY,left:w.mouseX}:void 0,disableScrollLock:!0,children:[(0,k.jsx)(J.A,{onClick:()=>{A(null),M({...S,name:"",show:!0})},children:"Add New Event"}),(0,k.jsx)(J.A,{onClick:()=>{A(null),a(S)},children:"Delete Event"}),(0,k.jsx)(J.A,{onClick:()=>{A(null),E({...T,show:!0})},children:"Adjust Alignment"})]}),(0,k.jsxs)(Q.A,{open:S.show,onClose:()=>M({...S,show:!1}),children:[(0,k.jsx)(c.A,{px:2,pt:2,children:(0,k.jsx)(u.A,{variant:"h5",children:"New Custom Event"})}),(0,k.jsx)(ee.A,{children:(0,k.jsxs)(s.Ay,{container:!0,spacing:2,children:[(0,k.jsx)(s.Ay,{item:!0,xs:12,style:{display:"flex",flexDirection:"column"},children:(0,k.jsx)(te.A,{selectOnFocus:!0,clearOnBlur:!0,renderInput:e=>(0,k.jsx)(ne.A,{...e,variant:"standard",placeholder:le.z.PatientOverview.TagNames[g]}),filterOptions:(e,t)=>{const n=ce(e,t),{inputValue:r}=t,i=e.some((e=>r===e.title));return""===r||i||n.push({value:r,title:`Add "${r}"`}),n},getOptionLabel:e=>"string"===typeof e?e:e.inputValue?e.inputValue:e.title,isOptionEqualToValue:(e,t)=>e.value===t.value,renderOption:(e,t)=>(0,k.jsx)("li",{...e,children:t.title}),value:{title:S.name,value:S.name},options:l.map((e=>({title:e,value:e}))),onChange:(e,t)=>M({...S,name:t?t.value:""})})}),(0,k.jsx)(s.Ay,{item:!0,xs:12,style:{display:"flex",flexDirection:"column"},children:(0,k.jsx)(ne.A,{variant:"standard",margin:"dense",type:"number",label:"Event Duration",placeholder:"0 for Instant Event",value:S.duration,onChange:e=>M({...S,duration:e.target.value})})})]})}),(0,k.jsxs)(re.A,{children:[(0,k.jsx)(d.A,{color:"secondary",onClick:()=>M({...S,show:!1}),children:"Cancel"}),(0,k.jsx)(d.A,{color:"info",onClick:()=>{r(S),M({...S,show:!1})},children:"Add"})]})]}),(0,k.jsxs)(Q.A,{open:T.show,onClose:()=>E({show:!1,alignment:0}),children:[(0,k.jsx)(c.A,{px:2,pt:2,children:(0,k.jsx)(u.A,{variant:"h5",children:"Adjust Secondary Recording Alignment"})}),(0,k.jsx)(ee.A,{children:(0,k.jsx)(ne.A,{variant:"standard",margin:"dense",type:"number",label:"Time Shift toward Right (ms)",placeholder:"Enter Time Shift to be applied to Power Channel",value:T.alignment,onChange:e=>E({...T,alignment:e.target.value}),fullWidth:!0})}),(0,k.jsxs)(re.A,{children:[(0,k.jsx)(d.A,{color:"secondary",onClick:()=>E({...T,show:!1}),children:"Cancel"}),(0,k.jsx)(d.A,{color:"info",onClick:()=>o(T.alignment).then((e=>{e&&E({...T,show:!1})})),children:"Add"})]})]})]})};var de=n(29144),he=n.n(de);const fe=function(e){let{dataToRender:t,channelInfos:n,height:r,type:a,onCenterFrequencyChange:o,figureTitle:s}=e;const[l,u]=(0,se.mv)(),{language:d}=l,[h,f]=i.useState(!1),p=(0,i.useRef)();i.useEffect((()=>{p&&(p.current=new oe.s(s,d),t.length>0?(e=>{const t=p.current;if(t.clearData(),t.fresh){t.subplots(1,1,{sharey:!1,sharex:!1}),t.setScaleType("log","y"),t.setTickValue([1e-6,1e-5,1e-4,.001,.01,.1,1,10,100,1e3,1e4,1e5],"y"),t.setYlim([-3,2]),t.setXlim([0,100]),t.setXlabel(`${(0,le.d)(le.z.FigureStandardText,"Frequency",d)} (${(0,le.d)(le.z.FigureStandardUnit,"Hertz",d)})`,{fontSize:15}),t.setYlabel(`${(0,le.d)(le.z.FigureStandardText,"Power",d)} (${(0,le.d)(le.z.FigureStandardUnit,"uV2Hz",d)})`,{fontSize:15});const[e,r]=n.Hemisphere.split(" "),i="string"==typeof n.Contacts?n.Contacts:`E${n.Contacts[0]}-E${n.Contacts[1]}`,a=`${(0,le.d)(le.z.FigureStandardText,e,d)} ${(0,le.d)(le.z.BrainRegions,r,d)} ${i}`;t.setTitle(`${a}`)}const r=10*e[e.length-1].Stimulation+1,i=he()({colormap:"jet",nshades:Math.max(r,10),format:"hex",alpha:1});for(var a in e)t.plot(e[a].Frequency,e[a].PSD,{name:`${e[a].Stimulation.toFixed(1)} ${(0,le.d)(le.z.FigureStandardUnit,"mA",d)}`,color:i[Math.round(10*e[a].Stimulation)],linewidth:2,showlegend:!0,hovertemplate:`${e[a].Stimulation.toFixed(1)} ${(0,le.d)(le.z.FigureStandardUnit,"mA",d)} %{y:.2f} ${(0,le.d)(le.z.FigureStandardUnit,"uV2Hz",d)} `});0==t.traces.length?(t.purge(),f(!1)):(t.render(),f(!0))})(t):(p.current.purge(),f(!1)))}),[t,p,d]);const m=(0,i.useCallback)((()=>{p.current&&p.current.refresh()}),[p.current]),{ref:g}=(0,Z.uZ)({onResize:m,refreshMode:"debounce",refreshRate:50,skipOnMount:!1});var v=null,y=!1;const x=e=>{y?(y=!1,clearTimeout(v)):(y=!0,v=setTimeout((function(){o(n,e.points[0].x),y=!1}),300))};return i.useEffect((()=>{g.current.on&&g.current.on("plotly_click",x)}),[g.current,t]),(0,k.jsx)(c.A,{ref:g,id:s,style:{marginTop:5,marginBottom:10,height:r,width:"100%",display:h?"":"none"}})};const pe=function(e){let{dataToRender:t,channelInfos:n,height:r,type:a,figureTitle:o}=e;const[s,l]=(0,se.mv)(),{language:u}=s,[d,h]=i.useState(!1),f=(0,i.useRef)();i.useEffect((()=>{f&&(f.current=new oe.s(o,u),t.length>0?(e=>{const t=f.current;if(t.clearData(),t.fresh){t.subplots(1,1,{sharey:!1,sharex:!1}),t.setXlim([-.5,5.5]),t.setYlim([0,2]),t.setXlabel(`${(0,le.d)(le.z.FigureStandardText,"Stimulation",u)} (${(0,le.d)(le.z.FigureStandardUnit,"mA",u)})`,{fontSize:15}),t.setYlabel(`${(0,le.d)(le.z.FigureStandardText,"Power",u)} (${(0,le.d)(le.z.FigureStandardUnit,"uV2Hz",u)})`,{fontSize:15});const[r,i]=n.Hemisphere.split(" "),a="string"==typeof n.Contacts?n.Contacts:`E${n.Contacts[0]}-E${n.Contacts[1]}`,o=`${(0,le.d)(le.z.FigureStandardText,r,u)} ${(0,le.d)(le.z.BrainRegions,i,u)} ${a} @ ${e[0].CenterFrequency} ${(0,le.d)(le.z.FigureStandardUnit,"Hertz",u)}`;t.setTitle(`${o}`)}var r=0,i=0;for(var a in e){const n=Array(e[a].SpectralFeatures.length).fill(0).map(((t,n)=>e[a].Stimulation));t.box(n,e[a].SpectralFeatures,{width:.2,hovertemplate:`${e[a].Stimulation.toFixed(1)} mA %{y:.2f} \u03bcV2/Hz `}),n[0]>r&&(r=n[0]),Math.max(...e[a].SpectralFeatures)>i&&(i=Math.max(...e[a].SpectralFeatures))}t.setXlim([-.5,Math.max(r,5)+.5]),t.setYlim([0,1.05*i]),0==t.traces.length?(t.purge(),h(!1)):(t.render(),h(!0))})(t):(f.current.purge(),h(!1)))}),[t,f,u]);const p=(0,i.useCallback)((()=>{f.current&&f.current.refresh()}),[f.current]),{ref:m}=(0,Z.uZ)({onResize:p,refreshMode:"debounce",refreshRate:50,skipOnMount:!1});return(0,k.jsx)(c.A,{ref:m,id:o,style:{marginTop:5,marginBottom:10,height:r,width:"100%",display:d?"":"none"}})};var me=n(15769),ge=n(69780),ve=n(9213),ye=n(21671),xe=n(34075),be=n(25979),_e=n(3788),we=n(70006),Ae=n(20572),Se=n(79700),Me=n(52688);const Te=function(e){let{data:t,getRecordingData:n,children:r}=e;const[a,o]=(0,se.mv)(),{language:h,therapeuticPredictionTableDate:f}=a,[p,m]=i.useState([]),[g,v]=i.useState([]),[y,x]=i.useState([]),[b,_]=i.useState({});i.useEffect((()=>{for(var e=[],n=0;n0&&(v(e),f||w(e[0]))}),[t]);const w=e=>{(0,se.NX)(o,"therapeuticPredictionTableDate",e);for(var n=[],r=0;r{var n=0,r={};for(var i in e)e[i].Score>n&&(n=e[i].Score,r.Frequency=e[i].therapy.RateInHertz,r.Pulsewidth=e[i].therapy.PulseWidthInMicroSecond,r.Amplitude=e[i].PredictedAmplitude,r.Range=e[i].AmplitudeRange);if(n<.5)return null;var a=[];for(var i in e)e[i].Score>("Ring"==t?n-.05:n-.15)&&e[i].therapy.RateInHertz==r.Frequency&&e[i].therapy.PulseWidthInMicroSecond==r.Pulsewidth&&a.push(e[i]);if("Ring"==t){const e=Math.max(...a.map((e=>e.ChangesInPower)));a=a.filter((t=>t.ChangesInPower/e>.8))}return{...r,Amplitude:a.map((e=>e.PredictedAmplitude)),Range:a.map((e=>e.AmplitudeRange)),contactType:a.map((e=>e.contactType)),channels:a[0].channels,stimContact:a.map((e=>e.stimContact))}};return i.useEffect((()=>{y.length>0&&(e=>{var t=[];for(var n in e)for(var r in e[n].Prediction)if(!e[n].Prediction[r].NoPrediction){var i="-E01-E02",a=(e[n].Channels[r].Contacts[0]+e[n].Channels[r].Contacts[1])/2;1.5!=a&&(i=`-E0${a}`),t.push({...e[n].Prediction[r],contactType:e[n].ContactType[r],channels:e[n].Channels[r],stimContact:i,therapy:e[n].Channels[r].Hemisphere.startsWith("Left")?e[n].Therapy.Left:e[n].Therapy.Right})}var o={};for(var s of["Ring","Segment"])for(var l of["Left","Right"]){var c=[];for(var n in t)t[n].channels.Hemisphere.startsWith(l)&&t[n].contactType.startsWith(s)&&c.push(t[n]);if(c.length>0){const e=A(c,s);o[l+" "+s]=e}}_({...o})})(y)}),[y]),(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(c.A,{p:2,children:(0,k.jsx)(te.A,{value:f,options:g,onChange:(e,t)=>w(t),getOptionLabel:e=>e.label||"",isOptionEqualToValue:(e,t)=>e.value==t.value,renderInput:e=>(0,k.jsx)(Me.A,{...e,label:le.z.BrainSenseStreaming.Table.TableTitle[h],InputLabelProps:{shrink:!0}})})}),y.length>0&&Object.keys(b).length>0?(0,k.jsx)(c.A,{children:(0,k.jsx)(s.Ay,{container:!0,spacing:2,children:(0,k.jsx)(s.Ay,{item:!0,xs:12,children:(0,k.jsxs)(l.A,{sx:{width:"100%",background:"#a7ffeb"},children:[(0,k.jsx)(c.A,{p:3,children:(0,k.jsx)(u.A,{variant:"h2",fontSize:20,children:le.z.TherapeuticPrediction.Table.SuggestedSettings[h]})}),(0,k.jsx)(c.A,{px:3,pb:3,children:(0,k.jsxs)(s.Ay,{container:!0,spacing:2,children:[["Left Ring","Right Ring","Left Segment","Right Segment"].map((e=>{if(!b[e])return null;const[t,n]=b[e].channels.Hemisphere.split(" ");return(0,k.jsxs)(s.Ay,{item:!0,xs:12,md:6,style:{marginBottom:3},children:[(0,k.jsx)(u.A,{variant:"h6",color:"info",fontSize:15,style:{marginBottom:0},children:(0,le.d)(le.z.TherapeuticPrediction.Table,e,h)}),(0,k.jsxs)(u.A,{variant:"h5",fontSize:18,children:[(0,le.d)(le.z.FigureStandardText,t,h)," ",(0,le.d)(le.z.BrainRegions,n,h)]}),(0,k.jsxs)(u.A,{variant:"h6",fontSize:20,color:"error",children:[b[e].Frequency," ",le.z.FigureStandardUnit.Hertz[h]," "," ",b[e].Pulsewidth," ",le.z.FigureStandardUnit.uS[h]]}),1==b[e].stimContact.length?(0,k.jsxs)(u.A,{variant:"h5",fontSize:18,color:"primary",children:[le.z.TherapeuticPrediction.Table.Monopolar[h]," "," "," ",b[e].stimContact[0]," "," ",b[e].Amplitude[0].toFixed(2)," ",le.z.FigureStandardUnit.mA[h]," "," ","(",b[e].Range[0][0].toFixed(1),"-",b[e].Range[0][1].toFixed(1)," ",le.z.FigureStandardUnit.mA[h],")"]}):(0,k.jsx)(k.Fragment,{children:b[e].stimContact.map(((t,n)=>(0,k.jsxs)(u.A,{variant:"h5",fontSize:18,color:"primary",children:[b[e].stimContact[n]," "," "," ",b[e].contactType[n]," "," ",b[e].Amplitude[n].toFixed(2)," ",le.z.FigureStandardUnit.mA[h]," "," ","(",b[e].Range[n][0].toFixed(1),"-",b[e].Range[n][1].toFixed(1)," ",le.z.FigureStandardUnit.mA[h],")"]},n)))})]},e)})),0==Object.keys(b).filter((e=>b[e])).length?(0,k.jsx)(s.Ay,{item:!0,xs:12,style:{marginBottom:3},children:(0,k.jsx)(u.A,{variant:"h4",fontSize:20,color:"primary",children:le.z.TherapeuticPrediction.Table.NoOptimalSettings[h]})}):null]})})]})})})}):null,(0,k.jsx)(c.A,{style:{overflowX:"auto"},children:(0,k.jsxs)(me.A,{size:"large",style:{marginTop:20},children:[(0,k.jsx)(ge.A,{sx:{display:"table-header-group"},children:(0,k.jsxs)(ve.A,{children:[[{title:"StreamingTableDate",minWidth:100,width:"30%"},{title:"RecordingDetails",minWidth:200,width:"25%"},{title:"ModelOutcome",minWidth:200,width:"15%"},{title:"PredictedConfidence",minWidth:200,width:"35%"}].map((e=>(0,k.jsx)(ye.A,{variant:"head",style:{width:e.width,minWidth:e.minWidth,verticalAlign:"bottom",paddingBottom:0,paddingTop:0},children:(0,k.jsx)(u.A,{variant:"span",fontSize:12,fontWeight:"bold",style:{cursor:"pointer"},onClick:()=>console.log({col:e}),children:le.z.TherapeuticPrediction.Table[e.title][h]})},e.title))),(0,k.jsx)(ye.A,{variant:"head",style:{width:"100px",minWidth:100,verticalAlign:"bottom",paddingBottom:0,paddingTop:0},children:(0,k.jsx)(u.A,{variant:"span",fontSize:12,fontWeight:"bold",style:{cursor:"pointer"},children:" "})},"viewedit")]})}),(0,k.jsx)(xe.A,{children:y.map((e=>{var t=null,r=0;for(var i in e.Prediction)if(!e.Prediction[i].NoPrediction){const[n,a]=e.Channels[i].Hemisphere.split(" ");t=(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(u.A,{variant:"h6",fontSize:15,style:{marginBottom:0},children:[(0,le.d)(le.z.FigureStandardText,n,h)," ",(0,le.d)(le.z.BrainRegions,a,h)]}),(0,k.jsx)(u.A,{variant:"h6",fontSize:15,style:{marginBottom:0},children:(0,Se.ql)(e.Channels[i].Contacts)})]}),r=i;break}if(!t)return null;const[a,o]=e.Channels[r].Hemisphere.split(" ");return(0,k.jsxs)(ve.A,{children:[(0,k.jsxs)(ye.A,{style:{borderBottom:"1px solid rgba(224, 224, 224, 0.4)"},children:[(0,k.jsx)(u.A,{variant:"h5",fontSize:15,style:{marginBottom:0},children:new Date(1e3*e.Timestamp).toLocaleString(h)}),(0,k.jsx)(u.A,{variant:"h6",style:{marginBottom:0},fontSize:12,fontWeight:"bold",children:e.DeviceName})]}),(0,k.jsx)(ye.A,{style:{borderBottom:"1px solid rgba(224, 224, 224, 0.4)"},children:(0,k.jsxs)(c.A,{style:{display:"flex",flexDirection:"column"},children:[t,(0,k.jsxs)(be.A,{sx:{marginTop:1},fullWidth:!0,children:[(0,k.jsx)(_e.A,{id:"left-hemisphere-stim-mode-label",children:le.z.BrainSenseStreaming.Table.StimMode[h]}),(0,k.jsx)(we.A,{labelId:"left-hemisphere-stim-mode-label",label:le.z.BrainSenseStreaming.Table.StimMode[h],value:e.ContactType[r],onChange:t=>((e,t,n)=>{for(var r in y)y[r].RecordingID==e&&(y[r].ContactType[t]=n.target.value,Ae.x.query("/api/updateBrainSenseStream",{requestData:y[r].DeviceID,updateRecordingContactType:e,contactIndex:t,contactType:n.target.value}).then((e=>{x([...y])})).catch((e=>{console.log(e)})))})(e.RecordingID,0,t),sx:{paddingY:"6px"},children:e.ContactTypes[0].map((e=>(0,k.jsxs)(J.A,{value:e,children:[" ",(0,le.d)(le.z.Segments,e,h)," "]},e)))})]})]})}),(0,k.jsx)(ye.A,{style:{borderBottom:"1px solid rgba(224, 224, 224, 0.4)"},children:(0,k.jsxs)(c.A,{sx:{width:"100%"},children:[(0,k.jsxs)(u.A,{variant:"h6",children:[e.Therapy[a].RateInHertz," ",le.z.FigureStandardUnit.Hertz[h]," "," ",e.Therapy[a].PulseWidthInMicroSecond," ",le.z.FigureStandardUnit.uS[h]]}),(0,k.jsx)(u.A,{variant:"h5",children:e.Prediction[r].PredictedAmplitude.toFixed(2)+" "+le.z.FigureStandardUnit.mA[h]})]})}),(0,k.jsxs)(ye.A,{style:{borderBottom:"1px solid rgba(224, 224, 224, 0.4)"},children:[(0,k.jsxs)(c.A,{sx:{width:"100%"},children:[(0,k.jsxs)(u.A,{variant:"p",fontSize:15,children:["Beta Supression"," ",e.Prediction[r].ChangesInPower.toFixed(2)," ",(0,k.jsx)("br",{})]}),(0,k.jsxs)(u.A,{variant:"p",fontSize:15,children:["Final Beta Power"," ",e.Prediction[r].FinalPower.toFixed(2)]})]}),(0,k.jsxs)(c.A,{sx:{width:"100%"},children:[(0,k.jsxs)(u.A,{display:"block",variant:"caption",fontWeight:"medium",color:"text",children:[(100*e.Prediction[r].Score).toFixed(1),"%"]}),(0,k.jsx)(c.A,{mt:.25,children:(0,k.jsx)(Y,{variant:"gradient",color:e.Prediction[r].Score>.6?"info":"warning",value:100*e.Prediction[r].Score})})]})]}),(0,k.jsx)(ye.A,{style:{borderBottom:"1px solid rgba(224, 224, 224, 0.4)"},children:(0,k.jsx)(d.A,{variant:"contained",color:"info",onClick:()=>n(e.AnalysisID),style:{padding:0},children:le.z.PatientOverview.PatientInformation.View[h]})})]},e.AnalysisID)}))})]})})]})};var ke=n(53758);const Ee=function(){const e=(0,a.Zp)(),[t,n]=(0,se.mv)(),{patientID:r,language:d}=t,[h,f]=i.useState([]),[p,m]=i.useState([]),[g,v]=i.useState([]),[y,x]=i.useState([]),[b,_]=i.useState([]),[w,A]=i.useState(!1),[S,M]=i.useState([]),[T,E]=i.useState([]),[C,D]=i.useState(600),[R,P]=i.useState(null),[O,L]=i.useState({show:!1,currentRecording:"",progress:0});i.useEffect((()=>{r?Ae.x.query("/api/queryPredictionModel",{id:r,requestOverview:!0}).then((e=>{(0,se.NX)(n,"therapeuticPredictionTableDate",null),m(e.data)})).catch((e=>{Ae.x.displayError(e,P)})):e("/dashboard",{replace:!1})}),[r]),i.useEffect((()=>{(async()=>{L({progress:0,currentRecording:"",show:!0});var e=[];try{for(var t in p){L({progress:t/p.length*100,currentRecording:new Date(1e3*p[t].Timestamp).toLocaleString(d,Ae.x.getDateTimeOptions("DateFull")),show:!0});const n=await Ae.x.query("/api/queryPredictionModel",{updatePredictionModels:!0,id:r,recordingId:p[t].AnalysisID});e.push({...p[t],Prediction:n.data}),L({...O,progress:(t+1)/p.length*100})}v([...e])}catch(n){console.log(n)}L({progress:0,currentRecording:"",show:!1})})()}),[p]),i.useEffect((()=>{w.Stream?E(w.Stream.map((e=>e.StimPSD))):E([])}),[w]);const I=(e,t)=>{Ae.x.query("/api/queryNeuralActivityStreaming",{updateStimulationPSD:!0,id:r,recordingId:h,channel:e,centerFrequency:t,stimulationReference:"Ipsilateral"}).then((t=>{E((n=>{for(let r in S)S[r]==e&&(n[r]=t.data);return[...n]})),P(null)})).catch((e=>{Ae.x.displayError(e,P)}))};return(0,k.jsxs)(k.Fragment,{children:[R,(0,k.jsx)(o.A,{sx:{color:"#FFFFFF",zIndex:e=>e.zIndex.drawer+1},open:O.show,onClick:()=>{},children:(0,k.jsxs)(c.A,{display:"flex",alignItems:"center",flexDirection:"column",children:[(0,k.jsx)(u.A,{color:"white",fontWeight:"bold",fontSize:30,children:"Currently Processing Data"}),(0,k.jsx)(u.A,{color:"white",fontWeight:"bold",fontSize:30,children:O.currentRecording}),(0,k.jsx)(c.A,{sx:{width:"100%"},children:(0,k.jsx)(Y,{color:"info",value:O.progress})})]})}),(0,k.jsx)(X.A,{children:(0,k.jsx)(c.A,{pt:3,children:(0,k.jsx)(c.A,{children:(0,k.jsxs)(s.Ay,{container:!0,spacing:2,children:[(0,k.jsx)(s.Ay,{item:!0,xs:12,children:(0,k.jsx)(l.A,{sx:{width:"100%"},children:(0,k.jsx)(s.Ay,{container:!0,children:(0,k.jsx)(s.Ay,{item:!0,xs:12,children:(0,k.jsx)(c.A,{p:2,lineHeight:1,children:g.length>0?(0,k.jsx)(Te,{data:g,getRecordingData:e=>{var t=[];for(var n in p)p[n].AnalysisID==e&&(t=p[n].Channels);var i=[];for(var n in g)if(g[n].AnalysisID==e)for(var a in x(g[n].Prediction),g[n].Prediction)i.push(g[n].Prediction[a].CenterFrequency?g[n].Prediction[a].CenterFrequency:0);f(e),P((0,k.jsx)($.A,{})),Ae.x.query("/api/queryNeuralActivityStreaming",{id:r,recordingId:e,requestFrequency:i,requestData:!0}).then((e=>{M(t),A(e.data),P(null)})).catch((e=>{Ae.x.displayError(e,P)}))}}):(0,k.jsx)(u.A,{variant:"h6",fontSize:24,children:le.z.WarningMessage.NoData[d]})})})})})}),w&&S.length>0?(0,k.jsx)(s.Ay,{item:!0,xs:12,children:(0,k.jsx)(l.A,{sx:{width:"100%"},children:(0,k.jsxs)(s.Ay,{container:!0,children:[(0,k.jsx)(s.Ay,{item:!0,xs:12,children:(0,k.jsx)(c.A,{display:"flex",justifyContent:"space-between",p:3,children:(0,k.jsx)(c.A,{display:"flex",flexDirection:"column",children:(0,k.jsx)(u.A,{variant:"h5",fontWeight:"bold",fontSize:24,children:(0,le.d)(le.z.BrainSenseStreaming.Figure,"RawData",d)})})})}),(0,k.jsx)(s.Ay,{item:!0,xs:12,children:(0,k.jsx)(ue,{dataToRender:w,channelInfos:S,handleAddEvent:async e=>{try{200==(await Ae.x.query("/api/queryCustomAnnotations",{id:r,addEvent:!0,name:e.name,time:e.time/1e3,type:"Streaming",duration:parseFloat(e.duration)})).status&&(A((t=>(t.Annotations=[...t.Annotations,{Time:e.time/1e3,Name:e.name,Duration:parseFloat(e.duration)}],{...t}))),_((t=>(t.includes(e.name)||t.push(e.name),[...t]))))}catch(t){Ae.x.displayError(t,P)}},handleDeleteEvent:async e=>{w.Annotations.length>0&&(e.targetInfo=e,e.targetInfo.timeDiff=10);for(let t=0;tP(null),handleDeny:()=>P(null),handleConfirm:()=>{Ae.x.query("/api/queryCustomAnnotations",{id:r,deleteEvent:!0,name:e.targetInfo.Name,time:e.targetInfo.Time}).then((()=>{A((t=>(t.Annotations=t.Annotations.filter((t=>t.Name!=e.targetInfo.Name||t.Time!=e.targetInfo.Time||t.Duration!=e.targetInfo.Duration)),{...t}))),P(null)})).catch((e=>{Ae.x.displayError(e,P)}))}}))},handleAdjustAlignment:async e=>{try{if(200==(await Ae.x.query("/api/updateBrainSenseStream",{id:r,recordingId:h,adjustAlignment:!0,alignment:e})).status)return!0}catch(t){Ae.x.displayError(t,P)}},annotations:b,figureTitle:"TimeFrequencyAnalysis",height:700})})]})})}):null,w&&S.length>0?(0,k.jsx)(s.Ay,{item:!0,xs:12,children:(0,k.jsx)(l.A,{children:(0,k.jsxs)(s.Ay,{container:!0,children:[(0,k.jsx)(s.Ay,{item:!0,xs:12,children:(0,k.jsx)(c.A,{p:3,children:(0,k.jsx)(u.A,{variant:"h5",fontWeight:"bold",fontSize:24,children:(0,le.d)(le.z.BrainSenseStreaming.Figure,"EffectOfStim",d)})})}),T.map(((e,t)=>{if(S[t])return(0,k.jsxs)(i.Fragment,{children:[(0,k.jsx)(s.Ay,{item:!0,xs:12,lg:6,children:(0,k.jsx)(c.A,{display:"flex",flexDirection:"column",children:(0,k.jsx)(fe,{dataToRender:e,channelInfos:S[t],type:"Left",figureTitle:S[t].Hemisphere+t.toFixed(0)+" PSD",onCenterFrequencyChange:I,height:600})})}),(0,k.jsx)(s.Ay,{item:!0,xs:12,lg:6,children:(0,k.jsx)(pe,{dataToRender:e,channelInfos:S[t],type:"Left",figureTitle:S[t].Hemisphere+t.toFixed(0)+" Box",height:600})})]},t)}))]})})}):null]})})})})]})},Ce={name:"TherapeuticPrediction",key:"therapeutic-prediction",icon:(0,k.jsx)(r.A,{style:{color:"white",margin:0,padding:0}}),route:"/experimental/therapeutic-prediction",component:(0,k.jsx)(Ee,{}),identified:!0,deidentified:!0}},73168:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>z});var r=n(69920),i=n(9950),a=n(13564),o=n(60899),s=n(48089),l=n(83274),c=n(25333),u=n(96583),d=n(40033),h=n(28170),f=n(29925),p=n(79739),m=n(35277),g=(n(29144),n(53758)),v=n(49989),y=n(52498),x=(n(47513),n(39409),n(13792)),b=(n(52688),n(2588),n(60270));const _="label";function w(e,t){"function"===typeof e?e(t):e&&(e.current=t)}function A(e,t){e.labels=t}function S(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_;const r=[];e.datasets=t.map((t=>{const i=e.datasets.find((e=>e[n]===t[n]));return i&&t.data&&!r.includes(i)?(r.push(i),Object.assign(i,t),i):{...t}}))}function M(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_;const n={labels:[],datasets:[]};return A(n,e.labels),S(n,e.datasets,t),n}function T(e,t){let{height:n=150,width:r=300,redraw:a=!1,datasetIdKey:o,type:s,data:l,options:c,plugins:u=[],fallbackContent:d,updateMode:h,...f}=e;const p=(0,i.useRef)(null),m=(0,i.useRef)(),g=()=>{p.current&&(m.current=new b.t1(p.current,{type:s,data:M(l,o),options:c&&{...c},plugins:u}),w(t,m.current))},v=()=>{w(t,null),m.current&&(m.current.destroy(),m.current=null)};return(0,i.useEffect)((()=>{!a&&m.current&&c&&function(e,t){Object.assign(e.options,t)}(m.current,c)}),[a,c]),(0,i.useEffect)((()=>{!a&&m.current&&A(m.current.config.data,l.labels)}),[a,l.labels]),(0,i.useEffect)((()=>{!a&&m.current&&l.datasets&&S(m.current.config.data,l.datasets,o)}),[a,l.datasets]),(0,i.useEffect)((()=>{m.current&&(a?(v(),setTimeout(g)):m.current.update(h))}),[a,c,l.labels,l.datasets,h]),(0,i.useEffect)((()=>{m.current&&(v(),setTimeout(g))}),[s]),(0,i.useEffect)((()=>(g(),()=>v())),[]),i.createElement("canvas",Object.assign({ref:p,role:"img",height:n,width:r},f),d)}const k=(0,i.forwardRef)(T);function E(e,t){return b.t1.register(t),(0,i.forwardRef)(((t,n)=>i.createElement(k,Object.assign({},t,{ref:n,type:e}))))}const C=E("line",b.ZT);var D=n(88745),R=n(20572),P=n(7774),O=n(50160),L=n(44414);const I=function(){const e=(0,a.Zp)(),[t,n]=(0,P.mv)(),{patientID:r,language:_}=t;b.t1.register(b.PP,b.kc,b.FN,b.No,b.m_,b.s$);const w=i.createRef(),[A,S]=(0,i.useState)(null),[M,T]=(0,i.useState)({state:!1,pairingId:""}),[k,E]=(0,i.useState)([]),[I,z]=(0,i.useState)({state:!1,deviceId:""}),[N,F]=(0,i.useState)({datasets:[]}),B=()=>{F({datasets:[{label:"X",data:[],fill:!1,radius:0,lineTension:0,borderWidth:.5,borderColor:"rgb(255, 50, 50)",backgroundColor:"rgb(255, 50, 50)",batchIndex:0},{label:"Y",data:[],fill:!1,radius:0,lineTension:0,borderWidth:.5,borderColor:"rgb(50, 255, 50)",backgroundColor:"rgb(50, 255, 50)",batchIndex:1},{label:"Z",data:[],fill:!1,radius:0,lineTension:0,borderWidth:.5,borderColor:"rgb(50, 50, 255)",backgroundColor:"rgb(50, 50, 255)",batchIndex:2}]})};function j(e,t){this.ws=new WebSocket(window.location.origin.replace("http://","ws://").replace("https://","wss://")+"/socket/wearableStream"),this.timestamp=0,this.interval=0,this.ws.onopen=()=>{this.ws.send(JSON.stringify({joinStream:e}))},this.ws.onmessage=e=>{if(e.data instanceof Blob)e.data.arrayBuffer().then((e=>{const n=new Int16Array(e);e=[n.filter(((e,t)=>t%3==0)),n.filter(((e,t)=>t%3==1)),n.filter(((e,t)=>t%3==2))];t(e,this.timestamp,this.interval),this.timestamp+=e[0].length*this.interval}));else{this.timestamp=0;const t=JSON.parse(e.data);this.interval=1/t.SamplingRate,B()}},this.ws.onerror=e=>{console.log(e),this.ws.close(200)},this.ws.onclose=e=>{200==e&&S((0,L.jsx)(g.A,{title:"ERROR",message:"Websocket Closed Unexpectedly",handleClose:()=>S(),handleConfirm:()=>S()}))}}return(0,i.useEffect)((()=>{B()}),[]),(0,i.useEffect)((()=>{r?R.x.query("/mobile/wearable/queryPairedDevice",{id:r}).then((e=>{E(e.data)})).catch((e=>{R.x.displayError(e,S)})):e("/dashboard",{replace:!1})}),[r]),(0,i.useEffect)((()=>{if(w.current&&I.state){const e=new j(I.deviceId,((e,t,n)=>{w.current.data.datasets.forEach((r=>{for(let i=0;i5/n&&(r.data=r.data.slice(-5/n))})),t>5&&(w.current.options.scales.x.max=e[0].length*n+t,w.current.options.scales.x.min=w.current.options.scales.x.max-5),w.current.update()}));return()=>{e.ws.close()}}}),[I]),(0,L.jsxs)(L.Fragment,{children:[A,(0,L.jsx)(D.A,{children:(0,L.jsx)(v.A,{pt:3,children:(0,L.jsx)(v.A,{children:(0,L.jsx)(o.Ay,{container:!0,spacing:2,children:(0,L.jsx)(o.Ay,{item:!0,xs:12,children:(0,L.jsx)(s.A,{sx:{width:"100%"},children:(0,L.jsxs)(o.Ay,{container:!0,children:[(0,L.jsx)(o.Ay,{item:!0,xs:12,children:(0,L.jsx)(v.A,{display:"flex",justifyContent:"space-between",p:2,children:(0,L.jsx)(y.A,{variant:"h4",children:(0,O.d)(O.z.Wearable,"Title",_)})})}),(0,L.jsxs)(o.Ay,{item:!0,xs:12,children:[(0,L.jsx)(v.A,{display:"flex",justifyContent:"space-between",p:2,children:k.map(((e,t)=>(0,L.jsxs)(v.A,{display:"flex",flexDirection:"row",justifyContent:"space-between",p:2,style:{borderBottom:"1px solid black",width:"100%"},children:[(0,L.jsx)(y.A,{variant:"h5",children:new Date(1e3*e.PairingDate).toLocaleDateString(_)}),(0,L.jsx)(y.A,{variant:"h5",children:e.DeviceName}),(0,L.jsx)(y.A,{variant:"h5",children:e.DeviceMac}),(0,L.jsxs)(v.A,{display:"flex",flexDirection:"row",justifyContent:"space-between",children:[(0,L.jsx)(l.A,{title:"View Stream",placement:"top",style:{marginRight:15},children:(0,L.jsx)(c.A,{variant:"contained",color:"info",onClick:()=>{e.DeviceMac==I.deviceId?z({state:!1,deviceId:""}):z({state:!0,deviceId:e.DeviceMac})},children:(0,L.jsx)(m.Ny1,{fontSize:25})})}),(0,L.jsx)(l.A,{title:"Remove Pairing",placement:"top",children:(0,L.jsx)(c.A,{variant:"contained",color:"error",onClick:()=>{},children:(0,L.jsx)(m.V2x,{fontSize:25})})})]})]},t)))}),(0,L.jsx)(v.A,{display:"flex",justifyContent:"space-between",p:2,children:(0,L.jsx)(x.A,{variant:"contained",color:"info",onClick:()=>T({...M,state:!0}),children:(0,L.jsx)(y.A,{variant:"p",color:"white",children:(0,O.d)(O.z.Wearable,"NewPair",_)})})}),(0,L.jsxs)(u.A,{open:M.state,onClose:()=>{T({...M,state:!1,pairingId:""})},children:[(0,L.jsx)(d.A,{children:"Subscribe"}),(0,L.jsx)(h.A,{children:(0,L.jsx)(f.A,{autoFocus:!0,label:"Pairing Code",value:M.pairingId,onChange:e=>T({...M,pairingId:e.target.value}),type:"text",fullWidth:!0,variant:"standard"})}),(0,L.jsxs)(p.A,{children:[(0,L.jsx)(x.A,{onClick:()=>T({...M,state:!1,pairingId:""}),children:"Cancel"}),(0,L.jsx)(x.A,{onClick:()=>{R.x.query("/mobile/wearable/verifyDevicePairing",{id:r,PairingCode:M.pairingId}).then((e=>{T({...M,state:!1,pairingId:""})})).catch((e=>{R.x.displayError(e,S)}))},children:"Subscribe"})]})]})]}),I.state?(0,L.jsx)(o.Ay,{item:!0,xs:12,children:(0,L.jsx)(v.A,{p:2,children:(0,L.jsx)(C,{ref:w,options:{responsive:!0,animation:!1,scales:{y:{type:"linear",beginAtZero:!0,min:-8,max:8},x:{type:"linear"}}},data:N})})}):null]})})})})})})})]})},z={name:"WearableStream",key:"wearable",icon:(0,L.jsx)(r.A,{style:{color:"white",margin:0,padding:0}}),route:"/experimental/wearable",component:(0,L.jsx)(I,{}),identified:!0,deidentified:!0}},14415:(e,t,n)=>{"use strict";["TherapeuticPrediction","MultipleSegmentAnalysis","AdaptiveStimulation","CircadianThreshold","PatientEvents","ImageVisualization","CustomizedAnalysis","MobileManager"].map((e=>n(92629)("./"+e+"/route.js").default))},35597:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>O});var r=n(9950),i=n(13564),a=n(50847),o=n.n(a),s=n(60899),l=n(48089),c=n(82321),u=n(29925),d=n(25333),h=n(25979),f=n(70006),p=n(23266),m=n(16497),g=n(93038),v=n(12257),y=n(34502),x=n(39545),b=n(65471),_=n(44414);const w=(0,b.A)((0,_.jsx)("path",{d:"M19 13H5v-2h14v2z"}),"Remove"),A=(0,b.A)((0,_.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");var S=n(35277),M=n(49989),T=n(52498),k=n(51606),E=n(13792),C=(n(10551),n(52688)),D=n(53418),R=n(20572),P=n(7774);n(50160);function O(e){let{match:t}=e;const[n,a]=(0,P.mv)(),{user:b,language:O}=n,[L,I]=(0,r.useState)({contents:[]}),[z,N]=(0,r.useState)(null),[F,B]=(0,r.useState)(!1),j=(0,r.useRef)(null),{form_link:U}=(0,i.g)();(0,r.useEffect)((()=>{R.x.query("/api/querySurveyForms",{RequestType:"RequestForm",FormLink:U}).then((e=>{e.data.Editable?I({...e.data,contents:e.data.Record}):R.x.displayError({response:{status:403}},N)})).catch((e=>{R.x.displayError(e,N)}))}),[]);const V=(e,t,n)=>{L.contents[e].questions[t].value=n,L.contents[e].questions[t].default=n,I({...L})},H=(e,t,n,r)=>{L.contents[e].questions[t][n]=parseFloat(r),"value"===n&&(L.contents[e].questions[t].default=r),I({...L})},W=(e,t,n,r)=>{L.contents[e].questions[t][n]=r,I({...L})};return(0,_.jsxs)(D.A,{children:[(0,_.jsx)(M.A,{children:(0,_.jsxs)(s.Ay,{container:!0,spacing:2,children:[(0,_.jsx)(s.Ay,{item:!0,xs:12,children:(0,_.jsx)(l.A,{sx:{marginTop:0},children:(0,_.jsx)(M.A,{p:2,children:(0,_.jsxs)(s.Ay,{container:!0,spacing:2,children:[(0,_.jsx)(s.Ay,{item:!0,xs:12,sm:6,children:(0,_.jsx)(M.A,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItem:"center"},children:(0,_.jsx)(T.A,{variant:"h3",children:L.Name?L.Name:""})})}),(0,_.jsx)(s.Ay,{item:!0,xs:12,sm:6,children:(0,_.jsxs)(M.A,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItem:"center"},children:[(0,_.jsx)(E.A,{variant:"contained",color:"info",onClick:()=>j.current.click(),sx:{marginRight:3},children:(0,_.jsx)(T.A,{variant:"p",color:"white",children:"Populate with Redcap Instrument"})}),(0,_.jsx)(c.A,{inputRef:j,type:"file",inputProps:{accept:".csv"},style:{display:"none"},onChange:e=>{const t=new FileReader;t.onload=()=>(e=>{var t=o().parse(e,{header:!0});L.contents=[],L.contents.push({header:"",questions:[]});for(let n in t.data)if("descriptive"===t.data[n]["Field Type"])L.contents[0].questions.push({variableName:t.data[n]["Variable / Field Name"],type:"description",text:t.data[n]["Field Label"],value:"",default:"",show:"hide"!=t.data[n]["Field Note"]});else if("checkbox"===t.data[n]["Field Type"]){let e=t.data[n]["Choices, Calculations, OR Slider Labels"].split("|");L.contents[0].questions.push({variableName:t.data[n]["Variable / Field Name"],type:"multiple-choice",text:t.data[n]["Field Label"],multiple:!0,value:[],options:e.map((e=>{let t=e.search(",");return e.slice(t+1).trim()})),default:[],show:"hide"!=t.data[n]["Field Note"]})}else if("notes"===t.data[n]["Field Type"])L.contents[0].questions.push({variableName:t.data[n]["Variable / Field Name"],type:"text",text:t.data[n]["Field Label"],value:"",default:"",validation:"text",show:"hide"!=t.data[n]["Field Note"]});else if("text"===t.data[n]["Field Type"])L.contents[0].questions.push({variableName:t.data[n]["Variable / Field Name"],type:"text",text:t.data[n]["Field Label"],value:"",default:"",validation:t.data[n]["Text Validation Type OR Show Slider Number"],show:"hide"!=t.data[n]["Field Note"]});else if("radio"===t.data[n]["Field Type"]){let e=t.data[n]["Choices, Calculations, OR Slider Labels"].split("|");L.contents[0].questions.push({variableName:t.data[n]["Variable / Field Name"],type:"multiple-choice",text:t.data[n]["Field Label"],multiple:!1,value:[],options:e.map((e=>{let t=e.search(",");return e.slice(t+1).trim()})),default:[],show:"hide"!=t.data[n]["Field Note"]})}else if("slider"===t.data[n]["Field Type"]){let e=t.data[n]["Choices, Calculations, OR Slider Labels"].split("|");L.contents[0].questions.push({variableName:t.data[n]["Variable / Field Name"],type:"score",text:t.data[n]["Field Label"],min:parseInt(e[0].trim()),max:parseInt(e[2].trim()),step:1,value:parseInt(e[1].trim()),default:parseInt(e[1].trim()),show:"hide"!=t.data[n]["Field Note"]})}I({...L})})(t.result),t.readAsBinaryString(e.target.files[0])}}),(0,_.jsx)(E.A,{variant:"contained",color:"success",onClick:()=>{R.x.query("/api/setSurveyForms",{RequestType:"Update",FormLink:U,FormContent:L.contents}).then((e=>{})).catch((e=>{R.x.displayError(e,N)}))},children:(0,_.jsx)(T.A,{variant:"p",color:"white",children:"Save Changes"})})]})})]})})})}),L.contents.map(((e,t)=>(0,_.jsx)(s.Ay,{item:!0,xs:12,children:(0,_.jsx)(l.A,{sx:{marginY:2},children:(0,_.jsx)(M.A,{p:2,children:(0,_.jsxs)(s.Ay,{container:!0,spacing:2,children:[(0,_.jsx)(s.Ay,{item:!0,xs:12,sx:{marginBottom:2},children:(0,_.jsxs)(M.A,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"center"},children:[F===`page${t}Header`?(0,_.jsx)(u.A,{variant:"standard",value:e.header,onChange:e=>((e,t)=>{L.contents[e].header=t,I({...L})})(t,e.target.value),sx:{marginX:1}}):(0,_.jsx)(T.A,{variant:"h3",children:e.header}),(0,_.jsx)(d.A,{onClick:()=>B(F!==`page${t}Header`&&`page${t}Header`),children:(0,_.jsx)(S.F7,{})}),(0,_.jsx)(d.A,{color:"error",onClick:()=>(e=>{L.contents=L.contents.filter(((t,n)=>n!=e)),I({...L})})(t),children:(0,_.jsx)(S.V2x,{})})]})}),e.questions.map(((e,n)=>(0,_.jsxs)(s.Ay,{item:!0,xs:12,sx:{borderTop:"5px solid rgba(224, 224, 224, 0.4)"},children:[(0,_.jsxs)(M.A,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"center",marginY:1},children:[(0,_.jsx)(T.A,{variant:"h6",style:{marginRight:3},children:"Question: "}),(0,_.jsx)(u.A,{variant:"standard",value:e.text,onChange:e=>((e,t,n)=>{L.contents[e].questions[t].text=n,I({...L})})(t,n,e.target.value),sx:{marginX:1},fullWidth:!0}),(0,_.jsx)(d.A,{color:"error",onClick:()=>((e,t)=>{L.contents[e].questions=L.contents[e].questions.filter(((e,n)=>n!=t)),I({...L})})(t,n),children:(0,_.jsx)(S.V2x,{})})]}),(0,_.jsxs)(M.A,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"center",marginY:1},children:[(0,_.jsx)(T.A,{variant:"h6",style:{marginRight:3},children:"Type: "}),(0,_.jsx)(h.A,{variant:"standard",sx:{marginX:1,minWidth:120},children:(0,_.jsxs)(f.A,{value:e.type,onChange:e=>((e,t,n)=>{"score"===n?L.contents[e].questions[t]={text:L.contents[e].questions[t].text,type:n,min:0,max:100,step:1,value:0,default:0,activeView:!1,show:!0}:"text"===n?L.contents[e].questions[t]={text:L.contents[e].questions[t].text,type:n,value:"",default:"",validation:"text",activeView:!1,show:!0}:"multiple-choice"===n?L.contents[e].questions[t]={text:L.contents[e].questions[t].text,type:n,multiple:!1,value:[],options:[],default:[],activeView:!1,show:!0}:"description"===n?L.contents[e].questions[t]={text:L.contents[e].questions[t].text,type:n,value:"",default:"",activeView:!1,show:!0}:"cumulativeScore"===n&&(L.contents[e].questions[t]={text:L.contents[e].questions[t].text,type:n,list:[],activeView:!1,show:!1}),I({...L})})(t,n,e.target.value),children:[(0,_.jsx)(p.A,{value:"score",children:"Score"}),(0,_.jsx)(p.A,{value:"text",children:"Text"}),(0,_.jsx)(p.A,{value:"multiple-choice",children:"Multiple Choice"}),(0,_.jsx)(p.A,{value:"description",children:"Description"}),(0,_.jsx)(p.A,{value:"cumulativeScore",children:"Cumulative Score"})]})}),"multiple-choice"===e.type?(0,_.jsx)(m.A,{label:"Allow Multiple",control:(0,_.jsx)(g.A,{checked:e.multiple,onChange:e=>W(t,n,"multiple",e.target.checked)})}):null]}),(0,_.jsxs)(M.A,{display:"flex",flexDirection:"row",children:[(0,_.jsx)(m.A,{label:"Show to user?",control:(0,_.jsx)(g.A,{checked:e.show,onChange:e=>((e,t,n)=>{L.contents[e].questions[t].show=n,I({...L})})(t,n,e.target.checked)})}),(0,_.jsx)(m.A,{label:"Response required?",control:(0,_.jsx)(g.A,{checked:!e.changed,onChange:e=>((e,t,n)=>{L.contents[e].questions[t].changed=!n,I({...L})})(t,n,e.target.checked)})}),(0,_.jsx)(m.A,{label:"Set Active in Record Timeline?",control:(0,_.jsx)(g.A,{checked:e.activeView,onChange:e=>((e,t,n)=>{L.contents[e].questions[t].activeView=n,I({...L})})(t,n,e.target.checked)})})]}),"text"===e.type?(0,_.jsx)(M.A,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"center",marginY:1},children:(0,_.jsx)(u.A,{variant:"standard",value:e.value,label:"Default Text Field",onChange:e=>V(t,n,e.target.value),rows:4,sx:{marginX:1},fullWidth:!0,multiline:!0})}):null,"description"===e.type?(0,_.jsx)(M.A,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"center",marginY:1},children:(0,_.jsx)(u.A,{variant:"standard",value:e.value,label:"Description Text Field",onChange:e=>V(t,n,e.target.value),rows:4,sx:{marginX:1},fullWidth:!0,multiline:!0})}):null,"score"===e.type?(0,_.jsxs)(M.A,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",marginY:1},children:[(0,_.jsxs)(M.A,{sx:{display:"flex",flexDirection:"row",width:"100%",justifyContent:"space-between",alignItems:"center",marginY:2},children:[(0,_.jsx)(k.A,{type:"number",label:"Min",value:e.min,onChange:e=>H(t,n,"min",e.target.value)}),(0,_.jsx)(k.A,{type:"number",label:"Step",value:e.step,onChange:e=>H(t,n,"step",e.target.value)}),(0,_.jsx)(k.A,{type:"number",label:"Max",value:e.max,onChange:e=>H(t,n,"max",e.target.value)})]}),(0,_.jsxs)(v.A,{spacing:2,direction:"row",alignItems:"center",sx:{width:"100%"},children:[(0,_.jsx)(w,{}),(0,_.jsx)(y.Ay,{"aria-label":"Default Value",marks:!0,valueLabelDisplay:"auto",value:e.value,min:e.min,max:e.max,step:e.step,onChange:e=>H(t,n,"value",e.target.value)}),(0,_.jsx)(A,{})]})]}):null,"multiple-choice"===e.type?(0,_.jsxs)(M.A,{sx:{display:"flex",flexDirection:"column",justifyContent:"flex-start",marginY:1},children:[(0,_.jsx)(E.A,{variant:"contained",color:"warning",onClick:()=>W(t,n,"options",[...e.options,"New Choice"]),children:"Add Option"}),e.options.map(((r,i)=>(0,_.jsxs)(M.A,{style:{display:"flex",marginTop:5},children:[F===`page${t}question${n}option${i}`?(0,_.jsx)(u.A,{variant:"standard",value:r,onChange:r=>{e.options[i]=r.target.value,W(t,n,"options",[...e.options])},sx:{marginX:1}}):(0,_.jsx)(E.A,{variant:"outlined",color:"info",fullWidth:!0,children:(0,_.jsx)(T.A,{variant:"h3",children:r})}),(0,_.jsx)(d.A,{onClick:()=>B(F!==`page${t}question${n}option${i}`&&`page${t}question${n}option${i}`),children:(0,_.jsx)(S.F7,{})}),(0,_.jsx)(d.A,{color:"error",onClick:()=>((e,t,n)=>{L.contents[e].questions[t].options=L.contents[e].questions[t].options.filter(((e,t)=>n!=t)),I({...L})})(t,n,i),children:(0,_.jsx)(S.V2x,{})})]},i)))]}):null,"cumulativeScore"===e.type?(0,_.jsx)(M.A,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"center",marginY:1},children:(0,_.jsx)(x.A,{multiple:!0,value:e.list,options:L.contents.reduce(((e,t)=>(e.push(...t.questions.filter((e=>"score"==e.type)).map((e=>e.text))),e)),["All Scores"]),onChange:(e,r)=>{((e,t,n)=>{n.includes("All Scores")?L.contents.map((n=>{n.questions.map((n=>{"score"==n.type&&(L.contents[e].questions[t].list.includes(n.text)||L.contents[e].questions[t].list.push(n.text))}))})):L.contents[e].questions[t].list=n,I({...L})})(t,n,r)},renderOption:(e,t)=>(0,_.jsx)("li",{...e,children:t}),renderInput:e=>(0,_.jsx)(C.A,{...e,label:"Choose Question Label for Summation",InputLabelProps:{shrink:!0}}),fullWidth:!0})}):null]},n))),(0,_.jsx)(s.Ay,{item:!0,xs:12,children:(0,_.jsx)(M.A,{p:2,style:{display:"flex",justifyContent:"space-around"},children:(0,_.jsx)(E.A,{variant:"contained",color:"info",onClick:()=>(e=>{L.contents[e].questions.push({type:"text",text:"Edit your question statement here",value:"",default:"",validation:"text",show:!0}),I({...L})})(t),children:(0,_.jsx)(T.A,{variant:"p",color:"white",children:"New Question"})})})})]})})})},t))),(0,_.jsx)(s.Ay,{item:!0,xs:12,children:(0,_.jsx)(M.A,{p:2,style:{display:"flex",justifyContent:"center"},children:(0,_.jsx)(E.A,{variant:"contained",color:"info",onClick:()=>{L.contents.push({header:"",questions:[]}),I({...L})},children:(0,_.jsx)(T.A,{variant:"h6",color:"white",children:"New Page"})})})})]})}),z]})}},72662:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>_});var r=n(9950),i=n(13564),a=n(26689),o=(n(50847),n(60899)),s=n(48089),l=n(12257),c=n(34502),u=n(29925),d=n(85815),h=n(53758),f=n(49989),p=n(52498),m=(n(51606),n(13792)),g=(n(10551),n(2588)),v=n(53418),y=n(20572),x=n(7774),b=(n(50160),n(44414));function _(e){let{match:t}=e;const[n,_]=(0,x.mv)(),{user:w,language:A}=n,[S,M]=(0,r.useState)({contents:[]}),[T,k]=(0,r.useState)(null),[E,C]=(0,r.useState)(!1),{form_link:D}=((0,r.useRef)(null),(0,i.g)()),[R,P]=(0,a.ok)();(0,r.useEffect)((()=>{k((0,b.jsx)(g.A,{})),y.x.query("/api/querySurveyForms",{RequestType:"RequestForm",FormLink:D,VersionRel:R.get("__passcode")?R.get("__passcode"):null}).then((e=>{M({...e.data,contents:e.data.Record}),k(null)})).catch((e=>{y.x.displayError(e,k)}))}),[]);const O=(e,t,n,r)=>{S.contents[e].questions[t][n]=r,S.contents[e].questions[t].changed=!0,M({...S})};return E?(0,b.jsx)(v.A,{viewOnly:!0,children:(0,b.jsx)(f.A,{children:(0,b.jsx)(o.Ay,{container:!0,spacing:2,children:(0,b.jsx)(o.Ay,{item:!0,xs:12,children:(0,b.jsx)(s.A,{sx:{marginTop:0},children:(0,b.jsx)(f.A,{p:2,children:"Thank you for submitting the questionnaire! You can close this window now."})})})})})}):(0,b.jsxs)(v.A,{viewOnly:!0,children:[(0,b.jsx)(f.A,{children:(0,b.jsxs)(o.Ay,{container:!0,spacing:2,children:[(0,b.jsx)(o.Ay,{item:!0,xs:12,children:(0,b.jsx)(s.A,{sx:{marginTop:0},children:(0,b.jsx)(f.A,{p:2,children:(0,b.jsxs)(o.Ay,{container:!0,spacing:2,children:[(0,b.jsx)(o.Ay,{item:!0,xs:12,children:(0,b.jsx)(f.A,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItem:"center"},children:(0,b.jsx)(p.A,{variant:"h3",children:S.Name?S.Name:""})})}),S.contents.map(((e,t)=>(0,b.jsxs)(o.Ay,{item:!0,xs:12,children:[(0,b.jsx)(p.A,{variant:"h3",children:e.header}),e.questions.map(((e,n)=>e.show?(0,b.jsxs)(o.Ay,{container:!0,pt:1,spacing:2,mb:3,children:[(0,b.jsx)(o.Ay,{item:!0,xs:12,md:5,children:(0,b.jsx)(p.A,{variant:"h6",children:e.text})}),(0,b.jsxs)(o.Ay,{item:!0,xs:12,md:7,children:["score"==e.type?(0,b.jsxs)(f.A,{children:[(0,b.jsxs)(l.A,{spacing:2,direction:"row",alignItems:"center",sx:{width:"100%"},children:[(0,b.jsx)(p.A,{variant:"h3",children:e.min}),(0,b.jsx)(c.Ay,{"aria-label":"Default Value",valueLabelDisplay:"auto",value:e.value,min:e.min,max:e.max,step:e.step,onChange:e=>((e,t,n,r)=>{S.contents[e].questions[t][n]=parseFloat(r),S.contents[e].questions[t].changed=!0,M({...S})})(t,n,"value",e.target.value)}),(0,b.jsx)(p.A,{variant:"h3",children:e.max})]}),e.changed?null:(0,b.jsx)(p.A,{variant:"h5",fontSize:12,color:"error",children:"*Required"})]}):null,"text"==e.type?(0,b.jsxs)(f.A,{sx:{display:"flex",flexDirection:"column",justifyContent:"flex-start",alignItems:"center",marginY:1},children:[(0,b.jsx)(u.A,{variant:"standard",value:e.value,label:"Default Text Field",onChange:e=>((e,t,n)=>{S.contents[e].questions[t].value=n,S.contents[e].questions[t].changed=!0,M({...S})})(t,n,e.target.value),rows:4,sx:{marginX:1},fullWidth:!0,multiline:!0}),e.changed?null:(0,b.jsx)(p.A,{variant:"h5",fontSize:12,color:"error",children:"*Required"})]}):null,"multiple-choice"==e.type?(0,b.jsxs)(f.A,{displ:!0,children:[e.multiple?(0,b.jsx)(o.Ay,{container:!0,spacing:0,children:e.options.map(((r,i)=>{let a=0;return e.options.map((e=>{e.length>a&&(a=e.length)})),(0,b.jsx)(o.Ay,{item:!0,xs:12,md:a>14?12:12/e.options.length,children:(0,b.jsxs)(f.A,{display:"flex",flexDirection:"row",alignItems:"center",children:[(0,b.jsx)(d.A,{checked:e.value.includes(r),value:r,onClick:i=>{e.value.includes(r)&&e.value.length>1?O(t,n,"value",e.value.filter((e=>e!=r))):e.value.includes(r)||O(t,n,"value",[...e.value,r])}}),(0,b.jsx)(p.A,{variant:"h6",fontSize:13,children:r})]})},i)}))}):(0,b.jsx)(o.Ay,{container:!0,spacing:0,children:e.options.map((r=>{let i=0;return e.options.map((e=>{e.length>i&&(i=e.length)})),(0,b.jsx)(o.Ay,{item:!0,xs:12,md:i>14?12:12/e.options.length,children:(0,b.jsxs)(f.A,{display:"flex",flexDirection:"row",alignItems:"center",children:[(0,b.jsx)(d.A,{checked:e.value==r,value:r,onClick:e=>O(t,n,"value",r)}),(0,b.jsx)(p.A,{variant:"h6",fontSize:13,children:r})]})})}))}),e.changed?null:(0,b.jsx)(p.A,{variant:"h5",fontSize:12,color:"error",children:"*Required"}),e.multiple?(0,b.jsx)(p.A,{variant:"h5",fontSize:12,color:"error",children:"*Multiple Allowed"}):null]}):null]})]},n):null))]},t)))]})})})}),(0,b.jsx)(o.Ay,{item:!0,xs:12,children:(0,b.jsx)(f.A,{p:2,style:{display:"flex",justifyContent:"center"},children:(0,b.jsx)(m.A,{variant:"contained",color:"info",onClick:()=>{let e=[];for(let t in S.contents){e.push([]);for(let n in S.contents[t].questions){if(S.contents[t].questions[n].show&&!S.contents[t].questions[n].changed)return void k((0,b.jsx)(h.A,{title:"Incomplete Survey",message:"You have not answered all questions",handleClose:()=>k(),handleConfirm:()=>k()}));e[t].push(S.contents[t].questions[n].value)}}y.x.query("/api/querySurveyForms",{RequestType:"SubmitForm",FormId:S.Id,Version:S.Version,Passcode:R.get("__passcode"),Date:R.get("__date")?R.get("__date"):(new Date).getTime()/1e3,FormResults:e}).then((e=>{C(!0)})).catch((e=>{y.x.displayError(e,k)}))},children:(0,b.jsx)(p.A,{variant:"h6",color:"white",children:"Submit"})})})})]})}),T]})}},68411:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(59051),i=n.n(r),a={normalDateWithWeekday:"ddd, MMM D",normalDate:"D MMMM",shortDate:"MMM D",monthAndDate:"MMMM D",dayOfMonth:"D",year:"YYYY",month:"MMMM",monthShort:"MMM",monthAndYear:"MMMM YYYY",weekday:"dddd",weekdayShort:"ddd",minutes:"mm",hours12h:"hh",hours24h:"HH",seconds:"ss",fullTime:"LT",fullTime12h:"hh:mm A",fullTime24h:"HH:mm",fullDate:"ll",fullDateWithWeekday:"dddd, LL",fullDateTime:"lll",fullDateTime12h:"ll hh:mm A",fullDateTime24h:"ll HH:mm",keyboardDate:"L",keyboardDateTime:"L LT",keyboardDateTime12h:"L hh:mm A",keyboardDateTime24h:"L HH:mm"},o=function(e){var t=this,n=void 0===e?{}:e,r=n.locale,o=n.formats,s=n.instance;this.lib="moment",this.is12HourCycleInCurrentLocale=function(){return/A|a/.test(t.moment.localeData(t.getCurrentLocaleCode()).longDateFormat("LT"))},this.getFormatHelperText=function(e){return e.match(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})|./g).map((function(e){var n=e[0];return"L"===n||";"===n?t.moment.localeData(t.getCurrentLocaleCode()).longDateFormat(e):e})).join("").replace(/a/gi,"(a|p)m").toLocaleLowerCase()},this.getCurrentLocaleCode=function(){return t.locale||t.moment.locale()},this.parseISO=function(e){return t.moment(e,!0)},this.toISO=function(e){return e.toISOString()},this.parse=function(e,n){return""===e?null:t.locale?t.moment(e,n,t.locale,!0):t.moment(e,n,!0)},this.date=function(e){if(null===e)return null;var n=t.moment(e);return n.locale(t.locale),n},this.toJsDate=function(e){return e.toDate()},this.isValid=function(e){return t.moment(e).isValid()},this.isNull=function(e){return null===e},this.getDiff=function(e,t,n){return e.diff(t,n)},this.isAfter=function(e,t){return e.isAfter(t)},this.isBefore=function(e,t){return e.isBefore(t)},this.isAfterDay=function(e,t){return e.isAfter(t,"day")},this.isBeforeDay=function(e,t){return e.isBefore(t,"day")},this.isBeforeYear=function(e,t){return e.isBefore(t,"year")},this.isAfterYear=function(e,t){return e.isAfter(t,"year")},this.startOfDay=function(e){return e.clone().startOf("day")},this.endOfDay=function(e){return e.clone().endOf("day")},this.format=function(e,n){return t.formatByString(e,t.formats[n])},this.formatByString=function(e,n){var r=e.clone();return r.locale(t.locale),r.format(n)},this.formatNumber=function(e){return e},this.getHours=function(e){return e.get("hours")},this.addSeconds=function(e,t){return t<0?e.clone().subtract(Math.abs(t),"seconds"):e.clone().add(t,"seconds")},this.addMinutes=function(e,t){return t<0?e.clone().subtract(Math.abs(t),"minutes"):e.clone().add(t,"minutes")},this.addHours=function(e,t){return t<0?e.clone().subtract(Math.abs(t),"hours"):e.clone().add(t,"hours")},this.addDays=function(e,t){return t<0?e.clone().subtract(Math.abs(t),"days"):e.clone().add(t,"days")},this.addWeeks=function(e,t){return t<0?e.clone().subtract(Math.abs(t),"weeks"):e.clone().add(t,"weeks")},this.addMonths=function(e,t){return t<0?e.clone().subtract(Math.abs(t),"months"):e.clone().add(t,"months")},this.addYears=function(e,t){return t<0?e.clone().subtract(Math.abs(t),"years"):e.clone().add(t,"years")},this.setHours=function(e,t){return e.clone().hours(t)},this.getMinutes=function(e){return e.get("minutes")},this.setMinutes=function(e,t){return e.clone().minutes(t)},this.getSeconds=function(e){return e.get("seconds")},this.setSeconds=function(e,t){return e.clone().seconds(t)},this.getMonth=function(e){return e.get("month")},this.getDaysInMonth=function(e){return e.daysInMonth()},this.isSameDay=function(e,t){return e.isSame(t,"day")},this.isSameMonth=function(e,t){return e.isSame(t,"month")},this.isSameYear=function(e,t){return e.isSame(t,"year")},this.isSameHour=function(e,t){return e.isSame(t,"hour")},this.setMonth=function(e,t){return e.clone().month(t)},this.getMeridiemText=function(e){return t.is12HourCycleInCurrentLocale()?t.moment.localeData(t.getCurrentLocaleCode()).meridiem("am"===e?0:13,0,!1):"am"===e?"AM":"PM"},this.startOfYear=function(e){return e.clone().startOf("year")},this.endOfYear=function(e){return e.clone().endOf("year")},this.startOfMonth=function(e){return e.clone().startOf("month")},this.endOfMonth=function(e){return e.clone().endOf("month")},this.startOfWeek=function(e){return e.clone().startOf("week")},this.endOfWeek=function(e){return e.clone().endOf("week")},this.getNextMonth=function(e){return e.clone().add(1,"month")},this.getPreviousMonth=function(e){return e.clone().subtract(1,"month")},this.getMonthArray=function(e){for(var n=[e.clone().startOf("year")];n.length<12;){var r=n[n.length-1];n.push(t.getNextMonth(r))}return n},this.getYear=function(e){return e.get("year")},this.setYear=function(e,t){return e.clone().set("year",t)},this.getDate=function(e){return e.get("date")},this.setDate=function(e,t){return e.clone().set("date",t)},this.mergeDateAndTime=function(e,t){return e.hour(t.hour()).minute(t.minute()).second(t.second())},this.getWeekdays=function(){return t.moment.weekdaysShort(!0)},this.isEqual=function(e,n){return null===e&&null===n||t.moment(e).isSame(n)},this.getWeekArray=function(e){for(var t=e.clone().startOf("month").startOf("week"),n=e.clone().endOf("month").endOf("week"),r=0,i=t,a=[];i.isBefore(n);){var o=Math.floor(r/7);a[o]=a[o]||[],a[o].push(i),i=i.clone().add(1,"day"),r+=1}return a},this.getYearRange=function(e,n){for(var r=t.moment(e).startOf("year"),i=t.moment(n).endOf("year"),a=[],o=r;o.isBefore(i);)a.push(o),o=o.clone().add(1,"year");return a},this.isWithinRange=function(e,t){var n=t[0],r=t[1];return e.isBetween(n,r,null,"[]")},this.moment=s||i(),this.locale=r,this.formats=Object.assign({},a,o)}},65070:(e,t,n)=>{"use strict";n.d(t,{A:()=>ie});var r=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t0?u(b,--y):0,g--,10===x&&(g=1,m--),x}function S(){return x=y2||E(x)>3?"":" "}function O(e,t){for(;--t&&S()&&!(x<48||x>102||x>57&&x<65||x>70&&x<97););return k(e,T()+(t<6&&32==M()&&32==S()))}function L(e){for(;S();)switch(x){case e:return y;case 34:case 39:34!==e&&39!==e&&L(x);break;case 40:41===e&&L(e);break;case 92:S()}return y}function I(e,t){for(;S()&&e+x!==57&&(e+x!==84||47!==M()););return"/*"+k(t,y-1)+"*"+a(47===e?e:S())}function z(e){for(;!E(M());)S();return k(e,y)}var N="-ms-",F="-moz-",B="-webkit-",j="comm",U="rule",V="decl",H="@keyframes";function W(e,t){for(var n="",r=f(e),i=0;i0&&h(F)-v&&p(x>32?Z(F+";",r,n,v-1):Z(l(F," ","")+";",r,n,v-2),f);break;case 59:F+=";";default:if(p(N=$(F,t,n,m,g,i,d,C,D=[],L=[],v),o),123===E)if(0===g)Y(F,t,N,N,D,o,v,d,L);else switch(99===y&&110===u(F,3)?100:y){case 100:case 108:case 109:case 115:Y(e,N,N,r&&p($(e,N,N,0,0,i,d,C,i,D=[],v),L),i,L,v,d,r?D:L);break;default:Y(F,N,N,N,[""],L,0,d,L)}}m=g=x=0,_=k=1,C=F="",v=s;break;case 58:v=1+h(F),x=b;default:if(_<1)if(123==E)--_;else if(125==E&&0==_++&&125==A())continue;switch(F+=a(E),E*_){case 38:k=g>0?1:(F+="\f",-1);break;case 44:d[m++]=(h(F)-1)*k,k=1;break;case 64:45===M()&&(F+=R(S())),y=M(),g=v=h(C=F+=z(T())),E++;break;case 45:45===b&&2==h(F)&&(_=0)}}return o}function $(e,t,n,r,a,o,c,u,h,p,m){for(var g=a-1,v=0===a?o:[""],y=f(v),x=0,b=0,w=0;x0?v[A]+" "+S:l(S,/&\f/g,v[A])))&&(h[w++]=M);return _(e,t,n,0===a?U:u,h,p,m)}function X(e,t,n){return _(e,t,n,j,a(x),d(e,2,-2),0)}function Z(e,t,n,r){return _(e,t,n,V,d(e,0,r),d(e,r+1,-1),r)}var K=function(e,t,n){for(var r=0,i=0;r=i,i=M(),38===r&&12===i&&(t[n]=1),!E(i);)S();return k(e,y)},J=function(e,t){return D(function(e,t){var n=-1,r=44;do{switch(E(r)){case 0:38===r&&12===M()&&(t[n]=1),e[n]+=K(y-1,t,n);break;case 2:e[n]+=R(r);break;case 4:if(44===r){e[++n]=58===M()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=a(r)}}while(r=S());return e}(C(e),t))},Q=new WeakMap,ee=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Q.get(n))&&!r){Q.set(e,!0);for(var i=[],a=J(t,i),o=n.props,s=0,l=0;s6)switch(u(e,t+1)){case 109:if(45!==u(e,t+4))break;case 102:return l(e,/(.+:)(.+)-([^]+)/,"$1"+B+"$2-$3$1"+F+(108==u(e,t+3)?"$3":"$2-$3"))+e;case 115:return~c(e,"stretch")?ne(l(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==u(e,t+1))break;case 6444:switch(u(e,h(e)-3-(~c(e,"!important")&&10))){case 107:return l(e,":",":"+B)+e;case 101:return l(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+B+(45===u(e,14)?"inline-":"")+"box$3$1"+B+"$2$3$1"+N+"$2box$3")+e}break;case 5936:switch(u(e,t+11)){case 114:return B+e+N+l(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return B+e+N+l(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return B+e+N+l(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return B+e+N+e+e}return e}var re=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case V:e.return=ne(e.value,e.length);break;case H:return W([w(e,{value:l(e.value,"@","@"+B)})],r);case U:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return W([w(e,{props:[l(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return W([w(e,{props:[l(t,/:(plac\w+)/,":"+B+"input-$1")]}),w(e,{props:[l(t,/:(plac\w+)/,":-moz-$1")]}),w(e,{props:[l(t,/:(plac\w+)/,N+"input-$1")]})],r)}return""}))}}],ie=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var i,a,o=e.stylisPlugins||re,s={},l=[];i=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n{"use strict";function r(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}n.d(t,{A:()=>r})},57370:(e,t,n)=>{"use strict";n.d(t,{E:()=>m,T:()=>u,c:()=>f,h:()=>d,w:()=>c});var r=n(9950),i=n(65070),a=n(71783),o=n(89015),s=n(96477),l=r.createContext("undefined"!==typeof HTMLElement?(0,i.A)({key:"css"}):null),c=(l.Provider,function(e){return(0,r.forwardRef)((function(t,n){var i=(0,r.useContext)(l);return e(t,i,n)}))}),u=r.createContext({});var d={}.hasOwnProperty,h="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",f=function(e,t){var n={};for(var r in t)d.call(t,r)&&(n[r]=t[r]);return n[h]=e,n},p=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return(0,a.SF)(t,n,r),(0,s.s)((function(){return(0,a.sk)(t,n,r)})),null},m=c((function(e,t,n){var i=e.css;"string"===typeof i&&void 0!==t.registered[i]&&(i=t.registered[i]);var s=e[h],l=[i],c="";"string"===typeof e.className?c=(0,a.Rk)(t.registered,l,e.className):null!=e.className&&(c=e.className+" ");var f=(0,o.J)(l,void 0,r.useContext(u));c+=t.key+"-"+f.name;var m={};for(var g in e)d.call(e,g)&&"css"!==g&&g!==h&&(m[g]=e[g]);return m.className=c,n&&(m.ref=n),r.createElement(r.Fragment,null,r.createElement(p,{cache:t,serialized:f,isStringTag:"string"===typeof s}),r.createElement(s,m))}))},88283:(e,t,n)=>{"use strict";n.d(t,{AH:()=>u,i7:()=>d,mL:()=>c});var r=n(57370),i=n(9950),a=n(71783),o=n(96477),s=n(89015),l=(n(65070),n(23876),function(e,t){var n=arguments;if(null==t||!r.h.call(t,"css"))return i.createElement.apply(void 0,n);var a=n.length,o=new Array(a);o[0]=r.E,o[1]=(0,r.c)(e,t);for(var s=2;s{"use strict";n.d(t,{J:()=>g});var r={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},i=n(57923),a=!1,o=/[A-Z]|^ms/g,s=/_EMO_([^_]+?)_([^]*?)_EMO_/g,l=function(e){return 45===e.charCodeAt(1)},c=function(e){return null!=e&&"boolean"!==typeof e},u=(0,i.A)((function(e){return l(e)?e:e.replace(o,"-$&").toLowerCase()})),d=function(e,t){switch(e){case"animation":case"animationName":if("string"===typeof t)return t.replace(s,(function(e,t,n){return p={name:t,styles:n,next:p},t}))}return 1===r[e]||l(e)||"number"!==typeof t||0===t?t:t+"px"},h="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function f(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var i=n;if(1===i.anim)return p={name:i.name,styles:i.styles,next:p},i.name;var o=n;if(void 0!==o.styles){var s=o.next;if(void 0!==s)for(;void 0!==s;)p={name:s.name,styles:s.styles,next:p},s=s.next;return o.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+l;return{name:c,styles:i,next:p}}},96477:(e,t,n)=>{"use strict";var r;n.d(t,{i:()=>s,s:()=>o});var i=n(9950),a=!!(r||(r=n.t(i,2))).useInsertionEffect&&(r||(r=n.t(i,2))).useInsertionEffect,o=a||function(e){return e()},s=a||i.useLayoutEffect},71783:(e,t,n)=>{"use strict";n.d(t,{Rk:()=>r,SF:()=>i,sk:()=>a});function r(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")})),r}var i=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},a=function(e,t,n){i(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var a=t;do{e.insert(t===a?"."+r:"",a,e.sheet,!0),a=a.next}while(void 0!==a)}}},47530:(e,t,n)=>{"use strict";var r,i=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["fill","width","height","style"]);return o.default.createElement("svg",i({viewBox:"0 0 24 24",style:i({fill:n,width:a,height:l},u)},d),o.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))}},46127:(e,t,n)=>{"use strict";var r,i=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["fill","width","height","style"]);return o.default.createElement("svg",i({viewBox:"0 0 24 24",style:i({fill:n,width:a,height:l},u)},d),o.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))}},30412:(e,t,n)=>{"use strict";n.d(t,{A:()=>g,Z:()=>d});var r=n(58168),i=n(9950),a=n(81174),o=n(66349),s=n(23386),l=n(81448),c=n(455);function u(e){return"undefined"!==typeof e.normalize?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}function d(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{ignoreAccents:t=!0,ignoreCase:n=!0,limit:r,matchFrom:i="any",stringify:a,trim:o=!1}=e;return(e,s)=>{let{inputValue:l,getOptionLabel:c}=s,d=o?l.trim():l;n&&(d=d.toLowerCase()),t&&(d=u(d));const h=d?e.filter((e=>{let r=(a||c)(e);return n&&(r=r.toLowerCase()),t&&(r=u(r)),"start"===i?0===r.indexOf(d):r.indexOf(d)>-1})):e;return"number"===typeof r?h.slice(0,r):h}}function h(e,t){for(let n=0;n{var t;return null!==e.current&&(null==(t=e.current.parentElement)?void 0:t.contains(document.activeElement))};function g(e){const{unstable_isActiveElementInListbox:t=m,unstable_classNamePrefix:n="Mui",autoComplete:u=!1,autoHighlight:d=!1,autoSelect:g=!1,blurOnSelect:v=!1,clearOnBlur:y=!e.freeSolo,clearOnEscape:x=!1,componentName:b="useAutocomplete",defaultValue:_=(e.multiple?[]:null),disableClearable:w=!1,disableCloseOnSelect:A=!1,disabled:S,disabledItemsFocusable:M=!1,disableListWrap:T=!1,filterOptions:k=f,filterSelectedOptions:E=!1,freeSolo:C=!1,getOptionDisabled:D,getOptionLabel:R=e=>{var t;return null!=(t=e.label)?t:e},groupBy:P,handleHomeEndKeys:O=!e.freeSolo,id:L,includeInputInList:I=!1,inputValue:z,isOptionEqualToValue:N=(e,t)=>e===t,multiple:F=!1,onChange:B,onClose:j,onHighlightChange:U,onInputChange:V,onOpen:H,open:W,openOnFocus:G=!1,options:q,readOnly:Y=!1,selectOnFocus:$=!e.freeSolo,value:X}=e,Z=(0,a.A)(L);let K=R;K=e=>{const t=R(e);return"string"!==typeof t?String(t):t};const J=i.useRef(!1),Q=i.useRef(!0),ee=i.useRef(null),te=i.useRef(null),[ne,re]=i.useState(null),[ie,ae]=i.useState(-1),oe=d?0:-1,se=i.useRef(oe),[le,ce]=(0,o.A)({controlled:X,default:_,name:b}),[ue,de]=(0,o.A)({controlled:z,default:"",name:b,state:"inputValue"}),[he,fe]=i.useState(!1),pe=i.useCallback(((e,t)=>{if(!(F?le.length!E||!(F?le:[le]).some((t=>null!==t&&N(e,t))))),{inputValue:xe&&ve?"":ue,getOptionLabel:K}):[],we=(0,s.A)({filteredOptions:_e,value:le});i.useEffect((()=>{const e=le!==we.value;he&&!e||C&&!e||pe(null,le)}),[le,pe,he,we.value,C]);const Ae=me&&_e.length>0&&!Y;const Se=(0,l.A)((e=>{-1===e?ee.current.focus():ne.querySelector(`[data-tag-index="${e}"]`).focus()}));i.useEffect((()=>{F&&ie>le.length-1&&(ae(-1),Se(-1))}),[le,F,ie,Se]);const Me=(0,l.A)((e=>{let{event:t,index:r,reason:i="auto"}=e;if(se.current=r,-1===r?ee.current.removeAttribute("aria-activedescendant"):ee.current.setAttribute("aria-activedescendant",`${Z}-option-${r}`),U&&U(t,-1===r?null:_e[r],i),!te.current)return;const a=te.current.querySelector(`[role="option"].${n}-focused`);a&&(a.classList.remove(`${n}-focused`),a.classList.remove(`${n}-focusVisible`));const o=te.current.parentElement.querySelector('[role="listbox"]');if(!o)return;if(-1===r)return void(o.scrollTop=0);const s=te.current.querySelector(`[data-option-index="${r}"]`);if(s&&(s.classList.add(`${n}-focused`),"keyboard"===i&&s.classList.add(`${n}-focusVisible`),o.scrollHeight>o.clientHeight&&"mouse"!==i)){const e=s,t=o.clientHeight+o.scrollTop,n=e.offsetTop+e.offsetHeight;n>t?o.scrollTop=n-o.clientHeight:e.offsetTop-e.offsetHeight*(P?1.3:0){let{event:t,diff:n,direction:r="next",reason:i="auto"}=e;if(!be)return;const a=function(e,t){if(!te.current||-1===e)return-1;let n=e;for(;;){if("next"===t&&n===_e.length||"previous"===t&&-1===n)return-1;const e=te.current.querySelector(`[data-option-index="${n}"]`),r=!M&&(!e||e.disabled||"true"===e.getAttribute("aria-disabled"));if(!(e&&!e.hasAttribute("tabindex")||r))return n;n+="next"===t?1:-1}}((()=>{const e=_e.length-1;if("reset"===n)return oe;if("start"===n)return 0;if("end"===n)return e;const t=se.current+n;return t<0?-1===t&&I?-1:T&&-1!==se.current||Math.abs(n)>1?0:e:t>e?t===e+1&&I?-1:T||Math.abs(n)>1?e:0:t})(),r);if(Me({index:a,reason:i,event:t}),u&&"reset"!==n)if(-1===a)ee.current.value=ue;else{const e=K(_e[a]);ee.current.value=e;0===e.toLowerCase().indexOf(ue.toLowerCase())&&ue.length>0&&ee.current.setSelectionRange(ue.length,e.length)}})),ke=i.useCallback((()=>{if(!be)return;if((()=>{if(-1!==se.current&&we.filteredOptions&&we.filteredOptions.length!==_e.length&&(F?le.length===we.value.length&&we.value.every(((e,t)=>K(le[t])===K(e))):(e=we.value,t=le,(e?K(e):"")===(t?K(t):"")))){const e=we.filteredOptions[se.current];if(e&&_e.some((t=>K(t)===K(e))))return!0}var e,t;return!1})())return;const e=F?le[0]:le;if(0!==_e.length&&null!=e){if(te.current)if(null==e)se.current>=_e.length-1?Me({index:_e.length-1}):Me({index:se.current});else{const t=_e[se.current];if(F&&t&&-1!==h(le,(e=>N(t,e))))return;const n=h(_e,(t=>N(t,e)));-1===n?Te({diff:"reset"}):Me({index:n})}}else Te({diff:"reset"})}),[_e.length,!F&&le,E,Te,Me,be,ue,F]),Ee=(0,l.A)((e=>{(0,c.A)(te,e),e&&ke()}));i.useEffect((()=>{ke()}),[ke]);const Ce=e=>{me||(ge(!0),ye(!0),H&&H(e))},De=(e,t)=>{me&&(ge(!1),j&&j(e,t))},Re=(e,t,n,r)=>{if(F){if(le.length===t.length&&le.every(((e,n)=>e===t[n])))return}else if(le===t)return;B&&B(e,t,n,r),ce(t)},Pe=i.useRef(!1),Oe=function(e,t){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"options",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"selectOption",i=t;if(F){i=Array.isArray(le)?le.slice():[];const e=h(i,(e=>N(t,e)));-1===e?i.push(t):"freeSolo"!==n&&(i.splice(e,1),r="removeOption")}pe(e,i),Re(e,i,r,{option:t}),A||e&&(e.ctrlKey||e.metaKey)||De(e,r),(!0===v||"touch"===v&&Pe.current||"mouse"===v&&!Pe.current)&&ee.current.blur()};const Le=(e,t)=>{if(!F)return;""===ue&&De(e,"toggleInput");let n=ie;-1===ie?""===ue&&"previous"===t&&(n=le.length-1):(n+="next"===t?1:-1,n<0&&(n=0),n===le.length&&(n=-1)),n=function(e,t){if(-1===e)return-1;let n=e;for(;;){if("next"===t&&n===le.length||"previous"===t&&-1===n)return-1;const e=ne.querySelector(`[data-tag-index="${n}"]`);if(e&&e.hasAttribute("tabindex")&&!e.disabled&&"true"!==e.getAttribute("aria-disabled"))return n;n+="next"===t?1:-1}}(n,t),ae(n),Se(n)},Ie=e=>{J.current=!0,de(""),V&&V(e,"","clear"),Re(e,F?[]:null,"clear")},ze=e=>t=>{if(e.onKeyDown&&e.onKeyDown(t),!t.defaultMuiPrevented&&(-1!==ie&&-1===["ArrowLeft","ArrowRight"].indexOf(t.key)&&(ae(-1),Se(-1)),229!==t.which))switch(t.key){case"Home":be&&O&&(t.preventDefault(),Te({diff:"start",direction:"next",reason:"keyboard",event:t}));break;case"End":be&&O&&(t.preventDefault(),Te({diff:"end",direction:"previous",reason:"keyboard",event:t}));break;case"PageUp":t.preventDefault(),Te({diff:-p,direction:"previous",reason:"keyboard",event:t}),Ce(t);break;case"PageDown":t.preventDefault(),Te({diff:p,direction:"next",reason:"keyboard",event:t}),Ce(t);break;case"ArrowDown":t.preventDefault(),Te({diff:1,direction:"next",reason:"keyboard",event:t}),Ce(t);break;case"ArrowUp":t.preventDefault(),Te({diff:-1,direction:"previous",reason:"keyboard",event:t}),Ce(t);break;case"ArrowLeft":Le(t,"previous");break;case"ArrowRight":Le(t,"next");break;case"Enter":if(-1!==se.current&&be){const e=_e[se.current],n=!!D&&D(e);if(t.preventDefault(),n)return;Oe(t,e,"selectOption"),u&&ee.current.setSelectionRange(ee.current.value.length,ee.current.value.length)}else C&&""!==ue&&!1===xe&&(F&&t.preventDefault(),Oe(t,ue,"createOption","freeSolo"));break;case"Escape":be?(t.preventDefault(),t.stopPropagation(),De(t,"escape")):x&&(""!==ue||F&&le.length>0)&&(t.preventDefault(),t.stopPropagation(),Ie(t));break;case"Backspace":if(F&&!Y&&""===ue&&le.length>0){const e=-1===ie?le.length-1:ie,n=le.slice();n.splice(e,1),Re(t,n,"removeOption",{option:le[e]})}break;case"Delete":if(F&&!Y&&""===ue&&le.length>0&&-1!==ie){const e=ie,n=le.slice();n.splice(e,1),Re(t,n,"removeOption",{option:le[e]})}}},Ne=e=>{fe(!0),G&&!J.current&&Ce(e)},Fe=e=>{t(te)?ee.current.focus():(fe(!1),Q.current=!0,J.current=!1,g&&-1!==se.current&&be?Oe(e,_e[se.current],"blur"):g&&C&&""!==ue?Oe(e,ue,"blur","freeSolo"):y&&pe(e,le),De(e,"blur"))},Be=e=>{const t=e.target.value;ue!==t&&(de(t),ye(!1),V&&V(e,t,"input")),""===t?w||F||Re(e,null,"clear"):Ce(e)},je=e=>{Me({event:e,index:Number(e.currentTarget.getAttribute("data-option-index")),reason:"mouse"})},Ue=()=>{Pe.current=!0},Ve=e=>{const t=Number(e.currentTarget.getAttribute("data-option-index"));Oe(e,_e[t],"selectOption"),Pe.current=!1},He=e=>t=>{const n=le.slice();n.splice(e,1),Re(t,n,"removeOption",{option:le[e]})},We=e=>{me?De(e,"toggleInput"):Ce(e)},Ge=e=>{e.target.getAttribute("id")!==Z&&e.preventDefault()},qe=()=>{ee.current.focus(),$&&Q.current&&ee.current.selectionEnd-ee.current.selectionStart===0&&ee.current.select(),Q.current=!1},Ye=e=>{""!==ue&&me||We(e)};let $e=C&&ue.length>0;$e=$e||(F?le.length>0:null!==le);let Xe=_e;if(P){new Map;Xe=_e.reduce(((e,t,n)=>{const r=P(t);return e.length>0&&e[e.length-1].group===r?e[e.length-1].options.push(t):e.push({key:n,index:n,group:r,options:[t]}),e}),[])}return S&&he&&Fe(),{getRootProps:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,r.A)({"aria-owns":Ae?`${Z}-listbox`:null},e,{onKeyDown:ze(e),onMouseDown:Ge,onClick:qe})},getInputLabelProps:()=>({id:`${Z}-label`,htmlFor:Z}),getInputProps:()=>({id:Z,value:ue,onBlur:Fe,onFocus:Ne,onChange:Be,onMouseDown:Ye,"aria-activedescendant":be?"":null,"aria-autocomplete":u?"both":"list","aria-controls":Ae?`${Z}-listbox`:void 0,"aria-expanded":Ae,autoComplete:"off",ref:ee,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:S}),getClearProps:()=>({tabIndex:-1,onClick:Ie}),getPopupIndicatorProps:()=>({tabIndex:-1,onClick:We}),getTagProps:e=>{let{index:t}=e;return(0,r.A)({key:t,"data-tag-index":t,tabIndex:-1},!Y&&{onDelete:He(t)})},getListboxProps:()=>({role:"listbox",id:`${Z}-listbox`,"aria-labelledby":`${Z}-label`,ref:Ee,onMouseDown:e=>{e.preventDefault()}}),getOptionProps:e=>{let{index:t,option:n}=e;const r=(F?le:[le]).some((e=>null!=e&&N(n,e))),i=!!D&&D(n);return{key:K(n),tabIndex:-1,role:"option",id:`${Z}-option-${t}`,onMouseOver:je,onClick:Ve,onTouchStart:Ue,"data-option-index":t,"aria-disabled":i,"aria-selected":r}},id:Z,inputValue:ue,value:le,dirty:$e,popupOpen:be,focused:he||-1!==ie,anchorEl:ne,setAnchorEl:re,focusedTag:ie,groupedOptions:Xe}}},76493:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(9950),i=n(28866),a=n(61786),o=n(44414);const s=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function l(e){const t=[],n=[];return Array.from(e.querySelectorAll(s)).forEach(((e,r)=>{const i=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==i&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}(e))}(e)&&(0===i?t.push(e):n.push({documentOrder:r,tabIndex:i,node:e}))})),n.sort(((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex)).map((e=>e.node)).concat(t)}function c(){return!0}const u=function(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:s=!1,disableRestoreFocus:u=!1,getTabbable:d=l,isEnabled:h=c,open:f}=e,p=r.useRef(!1),m=r.useRef(null),g=r.useRef(null),v=r.useRef(null),y=r.useRef(null),x=r.useRef(!1),b=r.useRef(null),_=(0,i.A)(t.ref,b),w=r.useRef(null);r.useEffect((()=>{f&&b.current&&(x.current=!n)}),[n,f]),r.useEffect((()=>{if(!f||!b.current)return;const e=(0,a.A)(b.current);return b.current.contains(e.activeElement)||(b.current.hasAttribute("tabIndex")||b.current.setAttribute("tabIndex","-1"),x.current&&b.current.focus()),()=>{u||(v.current&&v.current.focus&&(p.current=!0,v.current.focus()),v.current=null)}}),[f]),r.useEffect((()=>{if(!f||!b.current)return;const e=(0,a.A)(b.current),t=t=>{const{current:n}=b;if(null!==n)if(e.hasFocus()&&!s&&h()&&!p.current){if(!n.contains(e.activeElement)){if(t&&y.current!==t.target||e.activeElement!==y.current)y.current=null;else if(null!==y.current)return;if(!x.current)return;let a=[];if(e.activeElement!==m.current&&e.activeElement!==g.current||(a=d(b.current)),a.length>0){var r,i;const e=Boolean((null==(r=w.current)?void 0:r.shiftKey)&&"Tab"===(null==(i=w.current)?void 0:i.key)),t=a[0],n=a[a.length-1];"string"!==typeof t&&"string"!==typeof n&&(e?n.focus():t.focus())}else n.focus()}}else p.current=!1},n=t=>{w.current=t,!s&&h()&&"Tab"===t.key&&e.activeElement===b.current&&t.shiftKey&&(p.current=!0,g.current&&g.current.focus())};e.addEventListener("focusin",t),e.addEventListener("keydown",n,!0);const r=setInterval((()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&t(null)}),50);return()=>{clearInterval(r),e.removeEventListener("focusin",t),e.removeEventListener("keydown",n,!0)}}),[n,s,u,h,f,d]);const A=e=>{null===v.current&&(v.current=e.relatedTarget),x.current=!0};return(0,o.jsxs)(r.Fragment,{children:[(0,o.jsx)("div",{tabIndex:f?0:-1,onFocus:A,ref:m,"data-testid":"sentinelStart"}),r.cloneElement(t,{ref:_,onFocus:e=>{null===v.current&&(v.current=e.relatedTarget),x.current=!0,y.current=e.target;const n=t.props.onFocus;n&&n(e)}}),(0,o.jsx)("div",{tabIndex:f?0:-1,onFocus:A,ref:g,"data-testid":"sentinelEnd"})]})}},5187:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(9950),i=n(17119),a=n(28866),o=n(91700),s=n(455),l=n(44414);const c=r.forwardRef((function(e,t){const{children:n,container:c,disablePortal:u=!1}=e,[d,h]=r.useState(null),f=(0,a.A)(r.isValidElement(n)?n.ref:null,t);if((0,o.A)((()=>{u||h(function(e){return"function"===typeof e?e():e}(c)||document.body)}),[c,u]),(0,o.A)((()=>{if(d&&!u)return(0,s.A)(t,d),()=>{(0,s.A)(t,null)}}),[t,d,u]),u){if(r.isValidElement(n)){const e={ref:f};return r.cloneElement(n,e)}return(0,l.jsx)(r.Fragment,{children:n})}return(0,l.jsx)(r.Fragment,{children:d?i.createPortal(n,d):d})}))},1534:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(58168),i=n(74445);function a(e,t,n){return void 0===e||(0,i.A)(e)?t:(0,r.A)({},t,{ownerState:(0,r.A)({},t.ownerState,n)})}},74445:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=function(e){return"string"===typeof e}},51163:(e,t,n)=>{"use strict";function r(e,t){return"function"===typeof e?e(t):e}n.d(t,{A:()=>r})},73815:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var r=n(58168),i=n(98587),a=n(28866),o=n(1534),s=n(2803);function l(e){if(void 0===e)return{};const t={};return Object.keys(e).filter((t=>!(t.match(/^on[A-Z]/)&&"function"===typeof e[t]))).forEach((n=>{t[n]=e[n]})),t}function c(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:i,externalForwardedProps:a,className:o}=e;if(!t){const e=(0,s.A)(null==a?void 0:a.className,null==i?void 0:i.className,o,null==n?void 0:n.className),t=(0,r.A)({},null==n?void 0:n.style,null==a?void 0:a.style,null==i?void 0:i.style),l=(0,r.A)({},n,a,i);return e.length>0&&(l.className=e),Object.keys(t).length>0&&(l.style=t),{props:l,internalRef:void 0}}const c=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(void 0===e)return{};const n={};return Object.keys(e).filter((n=>n.match(/^on[A-Z]/)&&"function"===typeof e[n]&&!t.includes(n))).forEach((t=>{n[t]=e[t]})),n}((0,r.A)({},a,i)),u=l(i),d=l(a),h=t(c),f=(0,s.A)(null==h?void 0:h.className,null==n?void 0:n.className,o,null==a?void 0:a.className,null==i?void 0:i.className),p=(0,r.A)({},null==h?void 0:h.style,null==n?void 0:n.style,null==a?void 0:a.style,null==i?void 0:i.style),m=(0,r.A)({},h,n,d,u);return f.length>0&&(m.className=f),Object.keys(p).length>0&&(m.style=p),{props:m,internalRef:h.ref}}var u=n(51163);const d=["elementType","externalSlotProps","ownerState"];function h(e){var t;const{elementType:n,externalSlotProps:s,ownerState:l}=e,h=(0,i.A)(e,d),f=(0,u.A)(s,l),{props:p,internalRef:m}=c((0,r.A)({},h,{externalSlotProps:f})),g=(0,a.A)(m,null==f?void 0:f.ref,null==(t=e.additionalProps)?void 0:t.ref);return(0,o.A)(n,(0,r.A)({},p,{ref:g}),l)}},25513:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(79526)),a=n(44414),o=(0,i.default)((0,a.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z"}),"Assessment");t.A=o},42201:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(79526)),a=n(44414),o=(0,i.default)([(0,a.jsx)("path",{d:"M7 19c-1.1 0-2 .9-2 2h14c0-1.1-.9-2-2-2h-4v-2h3c1.1 0 2-.9 2-2h-8c-1.66 0-3-1.34-3-3 0-1.09.59-2.04 1.46-2.56C8.17 9.03 8 8.54 8 8c0-.21.04-.42.09-.62C6.28 8.13 5 9.92 5 12c0 2.76 2.24 5 5 5v2H7z"},"0"),(0,a.jsx)("path",{d:"M10.56 5.51C11.91 5.54 13 6.64 13 8c0 .75-.33 1.41-.85 1.87l.59 1.62.94-.34.34.94 1.88-.68-.34-.94.94-.34-2.74-7.53-.94.34-.34-.94-1.88.68.34.94-.94.35.56 1.54z"},"1"),(0,a.jsx)("circle",{cx:"10.5",cy:"8",r:"1.5"},"2")],"Biotech");t.A=o},39484:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(79526)),a=n(44414),o=(0,i.default)((0,a.jsx)("path",{d:"M11 21h-1l1-7H7.5c-.58 0-.57-.32-.38-.66.19-.34.05-.08.07-.12C8.48 10.94 10.42 7.54 13 3h1l-1 7h3.5c.49 0 .56.33.47.51l-.07.15C12.96 17.55 11 21 11 21z"}),"Bolt");t.A=o},84519:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(79526)),a=n(44414),o=(0,i.default)((0,a.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm.06 17v-2.01H12c-1.28 0-2.56-.49-3.54-1.46-1.71-1.71-1.92-4.35-.64-6.29l1.1 1.1c-.71 1.33-.53 3.01.59 4.13.7.7 1.62 1.03 2.54 1.01v-2.14l2.83 2.83L12.06 19zm4.11-4.24-1.1-1.1c.71-1.33.53-3.01-.59-4.13C13.79 8.84 12.9 8.5 12 8.5h-.06v2.15L9.11 7.83 11.94 5v2.02c1.3-.02 2.61.45 3.6 1.45 1.7 1.7 1.91 4.35.63 6.29z"}),"ChangeCircle");t.A=o},87899:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(79526)),a=n(44414),o=(0,i.default)((0,a.jsx)("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check");t.A=o},86255:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(79526)),a=n(44414),o=(0,i.default)((0,a.jsx)("path",{d:"M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z"}),"Dashboard");t.A=o},47813:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(79526)),a=n(44414),o=(0,i.default)((0,a.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12 1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"}),"DeleteForever");t.A=o},13246:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(79526)),a=n(44414),o=(0,i.default)((0,a.jsx)("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess");t.A=o},18726:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(79526)),a=n(44414),o=(0,i.default)((0,a.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");t.A=o},2334:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(79526)),a=n(44414),o=(0,i.default)((0,a.jsx)("circle",{cx:"12",cy:"12",r:"8"}),"FiberManualRecord");t.A=o},67493:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(79526)),a=n(44414),o=(0,i.default)((0,a.jsx)("path",{d:"M22 9V7h-2v2h-2v2h2v2h2v-2h2V9zM8 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 1c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4zm4.51-8.95C13.43 5.11 14 6.49 14 8s-.57 2.89-1.49 3.95C14.47 11.7 16 10.04 16 8s-1.53-3.7-3.49-3.95zm4.02 9.78C17.42 14.66 18 15.7 18 17v3h2v-3c0-1.45-1.59-2.51-3.47-3.17z"}),"GroupAdd");t.A=o},45954:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(79526)),a=n(44414),o=(0,i.default)((0,a.jsx)("path",{d:"M11 7 9.6 8.4l2.6 2.6H2v2h10.2l-2.6 2.6L11 17l5-5-5-5zm9 12h-8v2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-8v2h8v14z"}),"Login");t.A=o},38144:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(79526)),a=n(44414),o=(0,i.default)((0,a.jsx)("path",{d:"M19 3h-4.18C14.4 1.84 13.3 1 12 1s-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7-.25c.41 0 .75.34.75.75s-.34.75-.75.75-.75-.34-.75-.75.34-.75.75-.75zM9.1 17H7v-2.14l5.96-5.96 2.12 2.12L9.1 17zm7.75-7.73-1.06 1.06-2.12-2.12 1.06-1.06c.2-.2.51-.2.71 0l1.41 1.41c.2.2.2.51 0 .71z"}),"NoteAlt");t.A=o},63698:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(79526)),a=n(44414),o=(0,i.default)((0,a.jsx)("path",{d:"M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h4v-2H5V8h14v10h-4v2h4c1.1 0 2-.9 2-2V6c0-1.1-.89-2-2-2zm-7 6-4 4h3v6h2v-6h3l-4-4z"}),"OpenInBrowser");t.A=o},82570:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(79526)),a=n(44414),o=(0,i.default)((0,a.jsx)("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");t.A=o},55858:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(79526)),a=n(44414),o=(0,i.default)((0,a.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"}),"Settings");t.A=o},14302:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(79526)),a=n(44414),o=(0,i.default)((0,a.jsx)("path",{d:"M2 20h20v-4H2v4zm2-3h2v2H4v-2zM2 4v4h20V4H2zm4 3H4V5h2v2zm-4 7h20v-4H2v4zm2-3h2v2H4v-2z"}),"Storage");t.A=o},79084:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(79526)),a=n(44414),o=(0,i.default)((0,a.jsx)("path",{d:"M23 8c0 1.1-.9 2-2 2-.18 0-.35-.02-.51-.07l-3.56 3.55c.05.16.07.34.07.52 0 1.1-.9 2-2 2s-2-.9-2-2c0-.18.02-.36.07-.52l-2.55-2.55c-.16.05-.34.07-.52.07s-.36-.02-.52-.07l-4.55 4.56c.05.16.07.33.07.51 0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2c.18 0 .35.02.51.07l4.56-4.55C8.02 9.36 8 9.18 8 9c0-1.1.9-2 2-2s2 .9 2 2c0 .18-.02.36-.07.52l2.55 2.55c.16-.05.34-.07.52-.07s.36.02.52.07l3.55-3.56C19.02 8.35 19 8.18 19 8c0-1.1.9-2 2-2s2 .9 2 2z"}),"Timeline");t.A=o},28334:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(65471),i=n(44414);const a=(0,r.A)((0,i.jsx)("path",{d:"M17 8H7c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-4 12.5h-2V19h2v1.5zm0-2.5h-2c0-1.5-2.5-3-2.5-5 0-1.93 1.57-3.5 3.5-3.5s3.5 1.57 3.5 3.5c0 2-2.5 3.5-2.5 5zm5-11.5H6C6 5.67 6.67 5 7.5 5h9c.83 0 1.5.67 1.5 1.5zm-1-3H7C7 2.67 7.67 2 8.5 2h7c.83 0 1.5.67 1.5 1.5z"}),"BatchPrediction")},40379:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(65471),i=n(44414);const a=(0,r.A)((0,i.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"Edit")},49230:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(65471),i=n(44414);const a=(0,r.A)((0,i.jsx)("path",{d:"M3 2v12h3v9l7-12H9l4-9H3zm16 0h-2l-3.2 9h1.9l.7-2h3.2l.7 2h1.9L19 2zm-2.15 5.65L18 4l1.15 3.65h-2.3z"}),"FlashAuto")},74864:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(65471),i=n(44414);const a=(0,r.A)((0,i.jsx)("path",{d:"M23 8c0 1.1-.9 2-2 2-.18 0-.35-.02-.51-.07l-3.56 3.55c.05.16.07.34.07.52 0 1.1-.9 2-2 2s-2-.9-2-2c0-.18.02-.36.07-.52l-2.55-2.55c-.16.05-.34.07-.52.07s-.36-.02-.52-.07l-4.55 4.56c.05.16.07.33.07.51 0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2c.18 0 .35.02.51.07l4.56-4.55C8.02 9.36 8 9.18 8 9c0-1.1.9-2 2-2s2 .9 2 2c0 .18-.02.36-.07.52l2.55 2.55c.16-.05.34-.07.52-.07s.36.02.52.07l3.55-3.56C19.02 8.35 19 8.18 19 8c0-1.1.9-2 2-2s2 .9 2 2z"}),"Timeline")},69920:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(65471),i=n(44414);const a=(0,r.A)((0,i.jsx)("path",{d:"M20 12c0-2.54-1.19-4.81-3.04-6.27L16 0H8l-.95 5.73C5.19 7.19 4 9.45 4 12s1.19 4.81 3.05 6.27L8 24h8l.96-5.73C18.81 16.81 20 14.54 20 12zM6 12c0-3.31 2.69-6 6-6s6 2.69 6 6-2.69 6-6 6-6-2.69-6-6z"}),"Watch")},79526:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r.createSvgIcon}});var r=n(39511)},39545:(e,t,n)=>{"use strict";n.d(t,{A:()=>q});var r=n(98587),i=n(58168),a=n(9950),o=n(2803),s=n(88465),l=n(30412),c=n(97497),u=n(69363),d=n(59254),h=n(48283),f=n(61676),p=n(1763),m=n(423);function g(e){return(0,m.A)("MuiListSubheader",e)}(0,p.A)("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);var v=n(44414);const y=["className","color","component","disableGutters","disableSticky","inset"],x=(0,d.Ay)("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"default"!==n.color&&t[`color${(0,f.A)(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(t.vars||t).palette.text.secondary,fontFamily:t.typography.fontFamily,fontWeight:t.typography.fontWeightMedium,fontSize:t.typography.pxToRem(14)},"primary"===n.color&&{color:(t.vars||t).palette.primary.main},"inherit"===n.color&&{color:"inherit"},!n.disableGutters&&{paddingLeft:16,paddingRight:16},n.inset&&{paddingLeft:72},!n.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:(t.vars||t).palette.background.paper})})),b=a.forwardRef((function(e,t){const n=(0,h.A)({props:e,name:"MuiListSubheader"}),{className:a,color:l="default",component:c="li",disableGutters:u=!1,disableSticky:d=!1,inset:p=!1}=n,m=(0,r.A)(n,y),b=(0,i.A)({},n,{color:l,component:c,disableGutters:u,disableSticky:d,inset:p}),_=(e=>{const{classes:t,color:n,disableGutters:r,inset:i,disableSticky:a}=e,o={root:["root","default"!==n&&`color${(0,f.A)(n)}`,!r&&"gutters",i&&"inset",!a&&"sticky"]};return(0,s.A)(o,g,t)})(b);return(0,v.jsx)(x,(0,i.A)({as:c,className:(0,o.A)(_.root,a),ref:t,ownerState:b},m))}));var _=n(2235),w=n(25333),A=n(25277),S=n(10465),M=n(63589),T=n(79229),k=n(22797);const E=(0,n(65471).A)((0,v.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");var C=n(63976);function D(e){return(0,m.A)("MuiAutocomplete",e)}const R=(0,p.A)("MuiAutocomplete",["root","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]);var P,O;const L=["autoComplete","autoHighlight","autoSelect","blurOnSelect","ChipProps","className","clearIcon","clearOnBlur","clearOnEscape","clearText","closeText","componentsProps","defaultValue","disableClearable","disableCloseOnSelect","disabled","disabledItemsFocusable","disableListWrap","disablePortal","filterOptions","filterSelectedOptions","forcePopupIcon","freeSolo","fullWidth","getLimitTagsText","getOptionDisabled","getOptionLabel","isOptionEqualToValue","groupBy","handleHomeEndKeys","id","includeInputInList","inputValue","limitTags","ListboxComponent","ListboxProps","loading","loadingText","multiple","noOptionsText","onChange","onClose","onHighlightChange","onInputChange","onOpen","open","openOnFocus","openText","options","PaperComponent","PopperComponent","popupIcon","readOnly","renderGroup","renderInput","renderOption","renderTags","selectOnFocus","size","slotProps","value"],I=(0,d.Ay)("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{fullWidth:r,hasClearIcon:i,hasPopupIcon:a,inputFocused:o,size:s}=n;return[{[`& .${R.tag}`]:t.tag},{[`& .${R.tag}`]:t[`tagSize${(0,f.A)(s)}`]},{[`& .${R.inputRoot}`]:t.inputRoot},{[`& .${R.input}`]:t.input},{[`& .${R.input}`]:o&&t.inputFocused},t.root,r&&t.fullWidth,a&&t.hasPopupIcon,i&&t.hasClearIcon]}})((e=>{let{ownerState:t}=e;return(0,i.A)({[`&.${R.focused} .${R.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${R.clearIndicator}`]:{visibility:"visible"}}},t.fullWidth&&{width:"100%"},{[`& .${R.tag}`]:(0,i.A)({margin:3,maxWidth:"calc(100% - 6px)"},"small"===t.size&&{margin:2,maxWidth:"calc(100% - 4px)"}),[`& .${R.inputRoot}`]:{flexWrap:"wrap",[`.${R.hasPopupIcon}&, .${R.hasClearIcon}&`]:{paddingRight:30},[`.${R.hasPopupIcon}.${R.hasClearIcon}&`]:{paddingRight:56},[`& .${R.input}`]:{width:0,minWidth:30}},[`& .${S.A.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${S.A.root}.${M.A.sizeSmall}`]:{[`& .${S.A.input}`]:{padding:"2px 4px 3px 0"}},[`& .${T.A.root}`]:{padding:9,[`.${R.hasPopupIcon}&, .${R.hasClearIcon}&`]:{paddingRight:39},[`.${R.hasPopupIcon}.${R.hasClearIcon}&`]:{paddingRight:65},[`& .${R.input}`]:{padding:"7.5px 4px 7.5px 6px"},[`& .${R.endAdornment}`]:{right:9}},[`& .${T.A.root}.${M.A.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${R.input}`]:{padding:"2.5px 4px 2.5px 6px"}},[`& .${k.A.root}`]:{paddingTop:19,paddingLeft:8,[`.${R.hasPopupIcon}&, .${R.hasClearIcon}&`]:{paddingRight:39},[`.${R.hasPopupIcon}.${R.hasClearIcon}&`]:{paddingRight:65},[`& .${k.A.input}`]:{padding:"7px 4px"},[`& .${R.endAdornment}`]:{right:9}},[`& .${k.A.root}.${M.A.sizeSmall}`]:{paddingBottom:1,[`& .${k.A.input}`]:{padding:"2.5px 4px"}},[`& .${M.A.hiddenLabel}`]:{paddingTop:8},[`& .${k.A.root}.${M.A.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${R.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${k.A.root}.${M.A.hiddenLabel}.${M.A.sizeSmall}`]:{[`& .${R.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${R.input}`]:(0,i.A)({flexGrow:1,textOverflow:"ellipsis",opacity:0},t.inputFocused&&{opacity:1})})})),z=(0,d.Ay)("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,t)=>t.endAdornment})({position:"absolute",right:0,top:"calc(50% - 14px)"}),N=(0,d.Ay)(w.A,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,t)=>t.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),F=(0,d.Ay)(w.A,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:(e,t)=>{let{ownerState:n}=e;return(0,i.A)({},t.popupIndicator,n.popupOpen&&t.popupIndicatorOpen)}})((e=>{let{ownerState:t}=e;return(0,i.A)({padding:2,marginRight:-2},t.popupOpen&&{transform:"rotate(180deg)"})})),B=(0,d.Ay)(u.A,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${R.option}`]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({zIndex:(t.vars||t).zIndex.modal},n.disablePortal&&{position:"absolute"})})),j=(0,d.Ay)(_.A,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,t)=>t.paper})((e=>{let{theme:t}=e;return(0,i.A)({},t.typography.body1,{overflow:"auto"})})),U=(0,d.Ay)("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,t)=>t.loading})((e=>{let{theme:t}=e;return{color:(t.vars||t).palette.text.secondary,padding:"14px 16px"}})),V=(0,d.Ay)("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,t)=>t.noOptions})((e=>{let{theme:t}=e;return{color:(t.vars||t).palette.text.secondary,padding:"14px 16px"}})),H=(0,d.Ay)("div",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(e,t)=>t.listbox})((e=>{let{theme:t}=e;return{listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${R.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[t.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${R.focused}`]:{backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(t.vars||t).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${R.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:(0,c.X4)(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${R.focused}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:(0,c.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(t.vars||t).palette.action.selected}},[`&.${R.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:(0,c.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}}}}})),W=(0,d.Ay)(b,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,t)=>t.groupLabel})((e=>{let{theme:t}=e;return{backgroundColor:(t.vars||t).palette.background.paper,top:-8}})),G=(0,d.Ay)("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(e,t)=>t.groupUl})({padding:0,[`& .${R.option}`]:{paddingLeft:24}}),q=a.forwardRef((function(e,t){var n,c,d,p;const m=(0,h.A)({props:e,name:"MuiAutocomplete"}),{autoComplete:g=!1,autoHighlight:y=!1,autoSelect:x=!1,blurOnSelect:b=!1,ChipProps:w,className:S,clearIcon:M=P||(P=(0,v.jsx)(E,{fontSize:"small"})),clearOnBlur:T=!m.freeSolo,clearOnEscape:k=!1,clearText:R="Clear",closeText:q="Close",componentsProps:Y={},defaultValue:$=(m.multiple?[]:null),disableClearable:X=!1,disableCloseOnSelect:Z=!1,disabled:K=!1,disabledItemsFocusable:J=!1,disableListWrap:Q=!1,disablePortal:ee=!1,filterSelectedOptions:te=!1,forcePopupIcon:ne="auto",freeSolo:re=!1,fullWidth:ie=!1,getLimitTagsText:ae=e=>`+${e}`,getOptionLabel:oe=e=>{var t;return null!=(t=e.label)?t:e},groupBy:se,handleHomeEndKeys:le=!m.freeSolo,includeInputInList:ce=!1,limitTags:ue=-1,ListboxComponent:de="ul",ListboxProps:he,loading:fe=!1,loadingText:pe="Loading\u2026",multiple:me=!1,noOptionsText:ge="No options",openOnFocus:ve=!1,openText:ye="Open",PaperComponent:xe=_.A,PopperComponent:be=u.A,popupIcon:_e=O||(O=(0,v.jsx)(C.A,{})),readOnly:we=!1,renderGroup:Ae,renderInput:Se,renderOption:Me,renderTags:Te,selectOnFocus:ke=!m.freeSolo,size:Ee="medium",slotProps:Ce={}}=m,De=(0,r.A)(m,L),{getRootProps:Re,getInputProps:Pe,getInputLabelProps:Oe,getPopupIndicatorProps:Le,getClearProps:Ie,getTagProps:ze,getListboxProps:Ne,getOptionProps:Fe,value:Be,dirty:je,id:Ue,popupOpen:Ve,focused:He,focusedTag:We,anchorEl:Ge,setAnchorEl:qe,inputValue:Ye,groupedOptions:$e}=(0,l.A)((0,i.A)({},m,{componentName:"Autocomplete"})),Xe=!X&&!K&&je&&!we,Ze=(!re||!0===ne)&&!1!==ne,Ke=(0,i.A)({},m,{disablePortal:ee,focused:He,fullWidth:ie,hasClearIcon:Xe,hasPopupIcon:Ze,inputFocused:-1===We,popupOpen:Ve,size:Ee}),Je=(e=>{const{classes:t,disablePortal:n,focused:r,fullWidth:i,hasClearIcon:a,hasPopupIcon:o,inputFocused:l,popupOpen:c,size:u}=e,d={root:["root",r&&"focused",i&&"fullWidth",a&&"hasClearIcon",o&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",l&&"inputFocused"],tag:["tag",`tagSize${(0,f.A)(u)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",c&&"popupIndicatorOpen"],popper:["popper",n&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return(0,s.A)(d,D,t)})(Ke);let Qe;if(me&&Be.length>0){const e=e=>(0,i.A)({className:Je.tag,disabled:K},ze(e));Qe=Te?Te(Be,e,Ke):Be.map(((t,n)=>(0,v.jsx)(A.A,(0,i.A)({label:oe(t),size:Ee},e({index:n}),w))))}if(ue>-1&&Array.isArray(Qe)){const e=Qe.length-ue;!He&&e>0&&(Qe=Qe.splice(0,ue),Qe.push((0,v.jsx)("span",{className:Je.tag,children:ae(e)},Qe.length)))}const et=Ae||(e=>(0,v.jsxs)("li",{children:[(0,v.jsx)(W,{className:Je.groupLabel,ownerState:Ke,component:"div",children:e.group}),(0,v.jsx)(G,{className:Je.groupUl,ownerState:Ke,children:e.children})]},e.key)),tt=Me||((e,t)=>(0,v.jsx)("li",(0,i.A)({},e,{children:oe(t)}))),nt=(e,t)=>{const n=Fe({option:e,index:t});return tt((0,i.A)({},n,{className:Je.option}),e,{selected:n["aria-selected"],index:t,inputValue:Ye})},rt=null!=(n=Ce.clearIndicator)?n:Y.clearIndicator,it=null!=(c=Ce.paper)?c:Y.paper,at=null!=(d=Ce.popper)?d:Y.popper,ot=null!=(p=Ce.popupIndicator)?p:Y.popupIndicator;return(0,v.jsxs)(a.Fragment,{children:[(0,v.jsx)(I,(0,i.A)({ref:t,className:(0,o.A)(Je.root,S),ownerState:Ke},Re(De),{children:Se({id:Ue,disabled:K,fullWidth:!0,size:"small"===Ee?"small":void 0,InputLabelProps:Oe(),InputProps:(0,i.A)({ref:qe,className:Je.inputRoot,startAdornment:Qe},(Xe||Ze)&&{endAdornment:(0,v.jsxs)(z,{className:Je.endAdornment,ownerState:Ke,children:[Xe?(0,v.jsx)(N,(0,i.A)({},Ie(),{"aria-label":R,title:R,ownerState:Ke},rt,{className:(0,o.A)(Je.clearIndicator,null==rt?void 0:rt.className),children:M})):null,Ze?(0,v.jsx)(F,(0,i.A)({},Le(),{disabled:K,"aria-label":Ve?q:ye,title:Ve?q:ye,ownerState:Ke},ot,{className:(0,o.A)(Je.popupIndicator,null==ot?void 0:ot.className),children:_e})):null]})}),inputProps:(0,i.A)({className:Je.input,disabled:K,readOnly:we},Pe())})})),Ge?(0,v.jsx)(B,(0,i.A)({as:be,disablePortal:ee,style:{width:Ge?Ge.clientWidth:null},ownerState:Ke,role:"presentation",anchorEl:Ge,open:Ve},at,{className:(0,o.A)(Je.popper,null==at?void 0:at.className),children:(0,v.jsxs)(j,(0,i.A)({ownerState:Ke,as:xe},it,{className:(0,o.A)(Je.paper,null==it?void 0:it.className),children:[fe&&0===$e.length?(0,v.jsx)(U,{className:Je.loading,ownerState:Ke,children:pe}):null,0!==$e.length||re||fe?null:(0,v.jsx)(V,{className:Je.noOptions,ownerState:Ke,role:"presentation",onMouseDown:e=>{e.preventDefault()},children:ge}),$e.length>0?(0,v.jsx)(H,(0,i.A)({as:de,className:Je.listbox,ownerState:Ke},Ne(),he,{children:$e.map(((e,t)=>se?et({key:e.key,group:e.group,children:e.options.map(((t,n)=>nt(t,e.index+n)))}):nt(e,t)))})):null]}))})):null]})}))},41413:(e,t,n)=>{"use strict";n.d(t,{A:()=>b});var r=n(98587),i=n(58168),a=n(9950),o=n(2803),s=n(88465),l=n(59254),c=n(48283),u=n(65471),d=n(44414);const h=(0,u.A)((0,d.jsx)("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");var f=n(1763),p=n(423);function m(e){return(0,p.A)("MuiAvatar",e)}(0,f.A)("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const g=["alt","children","className","component","imgProps","sizes","src","srcSet","variant"],v=(0,l.Ay)("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.colorDefault&&t.colorDefault]}})((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none"},"rounded"===n.variant&&{borderRadius:(t.vars||t).shape.borderRadius},"square"===n.variant&&{borderRadius:0},n.colorDefault&&(0,i.A)({color:(t.vars||t).palette.background.default},t.vars?{backgroundColor:t.vars.palette.Avatar.defaultBg}:{backgroundColor:"light"===t.palette.mode?t.palette.grey[400]:t.palette.grey[600]}))})),y=(0,l.Ay)("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(e,t)=>t.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),x=(0,l.Ay)(h,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(e,t)=>t.fallback})({width:"75%",height:"75%"});const b=a.forwardRef((function(e,t){const n=(0,c.A)({props:e,name:"MuiAvatar"}),{alt:l,children:u,className:h,component:f="div",imgProps:p,sizes:b,src:_,srcSet:w,variant:A="circular"}=n,S=(0,r.A)(n,g);let M=null;const T=function(e){let{crossOrigin:t,referrerPolicy:n,src:r,srcSet:i}=e;const[o,s]=a.useState(!1);return a.useEffect((()=>{if(!r&&!i)return;s(!1);let e=!0;const a=new Image;return a.onload=()=>{e&&s("loaded")},a.onerror=()=>{e&&s("error")},a.crossOrigin=t,a.referrerPolicy=n,a.src=r,i&&(a.srcset=i),()=>{e=!1}}),[t,n,r,i]),o}((0,i.A)({},p,{src:_,srcSet:w})),k=_||w,E=k&&"error"!==T,C=(0,i.A)({},n,{colorDefault:!E,component:f,variant:A}),D=(e=>{const{classes:t,variant:n,colorDefault:r}=e,i={root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]};return(0,s.A)(i,m,t)})(C);return M=E?(0,d.jsx)(y,(0,i.A)({alt:l,src:_,srcSet:w,sizes:b,ownerState:C,className:D.img},p)):null!=u?u:k&&l?l[0]:(0,d.jsx)(x,{ownerState:C,className:D.fallback}),(0,d.jsx)(v,(0,i.A)({as:f,ownerState:C,className:(0,o.A)(D.root,h),ref:t},S,{children:M}))}))},55158:(e,t,n)=>{"use strict";n.d(t,{A:()=>v});var r=n(98587),i=n(58168),a=n(9950),o=n(2803),s=n(88465),l=n(59254),c=n(48283),u=n(57191),d=n(1763),h=n(423);function f(e){return(0,h.A)("MuiBackdrop",e)}(0,d.A)("MuiBackdrop",["root","invisible"]);var p=n(44414);const m=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],g=(0,l.Ay)("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})((e=>{let{ownerState:t}=e;return(0,i.A)({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},t.invisible&&{backgroundColor:"transparent"})})),v=a.forwardRef((function(e,t){var n,a,l;const d=(0,c.A)({props:e,name:"MuiBackdrop"}),{children:h,className:v,component:y="div",components:x={},componentsProps:b={},invisible:_=!1,open:w,slotProps:A={},slots:S={},TransitionComponent:M=u.A,transitionDuration:T}=d,k=(0,r.A)(d,m),E=(0,i.A)({},d,{component:y,invisible:_}),C=(e=>{const{classes:t,invisible:n}=e,r={root:["root",n&&"invisible"]};return(0,s.A)(r,f,t)})(E),D=null!=(n=A.root)?n:b.root;return(0,p.jsx)(M,(0,i.A)({in:w,timeout:T},k,{children:(0,p.jsx)(g,(0,i.A)({"aria-hidden":!0},D,{as:null!=(a=null!=(l=S.root)?l:x.Root)?a:y,className:(0,o.A)(C.root,v,null==D?void 0:D.className),ownerState:(0,i.A)({},E,null==D?void 0:D.ownerState),classes:C,ref:t,children:h}))}))}))},35027:(e,t,n)=>{"use strict";n.d(t,{A:()=>_});var r=n(98587),i=n(58168),a=n(9950),o=n(2803),s=n(23386),l=n(88465);var c=n(73815),u=n(59254),d=n(48283),h=n(61676),f=n(1763),p=n(423);function m(e){return(0,p.A)("MuiBadge",e)}const g=(0,f.A)("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]);var v=n(44414);const y=["anchorOrigin","className","classes","component","components","componentsProps","children","overlap","color","invisible","max","badgeContent","slots","slotProps","showZero","variant"],x=(0,u.Ay)("span",{name:"MuiBadge",slot:"Root",overridesResolver:(e,t)=>t.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),b=(0,u.Ay)("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${(0,h.A)(n.anchorOrigin.vertical)}${(0,h.A)(n.anchorOrigin.horizontal)}${(0,h.A)(n.overlap)}`],"default"!==n.color&&t[`color${(0,h.A)(n.color)}`],n.invisible&&t.invisible]}})((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:t.typography.fontFamily,fontWeight:t.typography.fontWeightMedium,fontSize:t.typography.pxToRem(12),minWidth:20,lineHeight:1,padding:"0 6px",height:20,borderRadius:10,zIndex:1,transition:t.transitions.create("transform",{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.enteringScreen})},"default"!==n.color&&{backgroundColor:(t.vars||t).palette[n.color].main,color:(t.vars||t).palette[n.color].contrastText},"dot"===n.variant&&{borderRadius:4,height:8,minWidth:8,padding:0},"top"===n.anchorOrigin.vertical&&"right"===n.anchorOrigin.horizontal&&"rectangular"===n.overlap&&{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${g.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}},"bottom"===n.anchorOrigin.vertical&&"right"===n.anchorOrigin.horizontal&&"rectangular"===n.overlap&&{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${g.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}},"top"===n.anchorOrigin.vertical&&"left"===n.anchorOrigin.horizontal&&"rectangular"===n.overlap&&{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${g.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}},"bottom"===n.anchorOrigin.vertical&&"left"===n.anchorOrigin.horizontal&&"rectangular"===n.overlap&&{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${g.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}},"top"===n.anchorOrigin.vertical&&"right"===n.anchorOrigin.horizontal&&"circular"===n.overlap&&{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${g.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}},"bottom"===n.anchorOrigin.vertical&&"right"===n.anchorOrigin.horizontal&&"circular"===n.overlap&&{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${g.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}},"top"===n.anchorOrigin.vertical&&"left"===n.anchorOrigin.horizontal&&"circular"===n.overlap&&{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${g.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}},"bottom"===n.anchorOrigin.vertical&&"left"===n.anchorOrigin.horizontal&&"circular"===n.overlap&&{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${g.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}},n.invisible&&{transition:t.transitions.create("transform",{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.leavingScreen})})})),_=a.forwardRef((function(e,t){var n,a,u,f,p,g;const _=(0,d.A)({props:e,name:"MuiBadge"}),{anchorOrigin:w={vertical:"top",horizontal:"right"},className:A,component:S,components:M={},componentsProps:T={},children:k,overlap:E="rectangular",color:C="default",invisible:D=!1,max:R=99,badgeContent:P,slots:O,slotProps:L,showZero:I=!1,variant:z="standard"}=_,N=(0,r.A)(_,y),{badgeContent:F,invisible:B,max:j,displayValue:U}=function(e){const{badgeContent:t,invisible:n=!1,max:r=99,showZero:i=!1}=e,a=(0,s.A)({badgeContent:t,max:r});let o=n;!1!==n||0!==t||i||(o=!0);const{badgeContent:l,max:c=r}=o?a:e;return{badgeContent:l,invisible:o,max:c,displayValue:l&&Number(l)>c?`${c}+`:l}}({max:R,invisible:D,badgeContent:P,showZero:I}),V=(0,s.A)({anchorOrigin:w,color:C,overlap:E,variant:z,badgeContent:P}),H=B||null==F&&"dot"!==z,{color:W=C,overlap:G=E,anchorOrigin:q=w,variant:Y=z}=H?V:_,$="dot"!==Y?U:void 0,X=(0,i.A)({},_,{badgeContent:F,invisible:H,max:j,displayValue:$,showZero:I,anchorOrigin:q,color:W,overlap:G,variant:Y}),Z=(e=>{const{color:t,anchorOrigin:n,invisible:r,overlap:i,variant:a,classes:o={}}=e,s={root:["root"],badge:["badge",a,r&&"invisible",`anchorOrigin${(0,h.A)(n.vertical)}${(0,h.A)(n.horizontal)}`,`anchorOrigin${(0,h.A)(n.vertical)}${(0,h.A)(n.horizontal)}${(0,h.A)(i)}`,`overlap${(0,h.A)(i)}`,"default"!==t&&`color${(0,h.A)(t)}`]};return(0,l.A)(s,m,o)})(X),K=null!=(n=null!=(a=null==O?void 0:O.root)?a:M.Root)?n:x,J=null!=(u=null!=(f=null==O?void 0:O.badge)?f:M.Badge)?u:b,Q=null!=(p=null==L?void 0:L.root)?p:T.root,ee=null!=(g=null==L?void 0:L.badge)?g:T.badge,te=(0,c.A)({elementType:K,externalSlotProps:Q,externalForwardedProps:N,additionalProps:{ref:t,as:S},ownerState:X,className:(0,o.A)(null==Q?void 0:Q.className,Z.root,A)}),ne=(0,c.A)({elementType:J,externalSlotProps:ee,ownerState:X,className:(0,o.A)(Z.badge,null==ee?void 0:ee.className)});return(0,v.jsxs)(K,(0,i.A)({},te,{children:[k,(0,v.jsx)(J,(0,i.A)({},ne,{children:$}))]}))}))},75165:(e,t,n)=>{"use strict";n.d(t,{A:()=>M});var r=n(98587),i=n(58168),a=n(9950),o=n(2803),s=n(35352),l=n(88465),c=n(97497),u=n(59254),d=n(48283),h=n(24184),f=n(61676),p=n(1763),m=n(423);function g(e){return(0,m.A)("MuiButton",e)}const v=(0,p.A)("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]);const y=a.createContext({});var x=n(44414);const b=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],_=e=>(0,i.A)({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),w=(0,u.Ay)(h.A,{shouldForwardProp:e=>(0,u.ep)(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${(0,f.A)(n.color)}`],t[`size${(0,f.A)(n.size)}`],t[`${n.variant}Size${(0,f.A)(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})((e=>{let{theme:t,ownerState:n}=e;var r,a;return(0,i.A)({},t.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create(["background-color","box-shadow","border-color","color"],{duration:t.transitions.duration.short}),"&:hover":(0,i.A)({textDecoration:"none",backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,c.X4)(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===n.variant&&"inherit"!==n.color&&{backgroundColor:t.vars?`rgba(${t.vars.palette[n.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,c.X4)(t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===n.variant&&"inherit"!==n.color&&{border:`1px solid ${(t.vars||t).palette[n.color].main}`,backgroundColor:t.vars?`rgba(${t.vars.palette[n.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,c.X4)(t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===n.variant&&{backgroundColor:(t.vars||t).palette.grey.A100,boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2],backgroundColor:(t.vars||t).palette.grey[300]}},"contained"===n.variant&&"inherit"!==n.color&&{backgroundColor:(t.vars||t).palette[n.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[n.color].main}}),"&:active":(0,i.A)({},"contained"===n.variant&&{boxShadow:(t.vars||t).shadows[8]}),[`&.${v.focusVisible}`]:(0,i.A)({},"contained"===n.variant&&{boxShadow:(t.vars||t).shadows[6]}),[`&.${v.disabled}`]:(0,i.A)({color:(t.vars||t).palette.action.disabled},"outlined"===n.variant&&{border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`},"contained"===n.variant&&{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground})},"text"===n.variant&&{padding:"6px 8px"},"text"===n.variant&&"inherit"!==n.color&&{color:(t.vars||t).palette[n.color].main},"outlined"===n.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===n.variant&&"inherit"!==n.color&&{color:(t.vars||t).palette[n.color].main,border:t.vars?`1px solid rgba(${t.vars.palette[n.color].mainChannel} / 0.5)`:`1px solid ${(0,c.X4)(t.palette[n.color].main,.5)}`},"contained"===n.variant&&{color:t.vars?t.vars.palette.text.primary:null==(r=(a=t.palette).getContrastText)?void 0:r.call(a,t.palette.grey[300]),backgroundColor:(t.vars||t).palette.grey[300],boxShadow:(t.vars||t).shadows[2]},"contained"===n.variant&&"inherit"!==n.color&&{color:(t.vars||t).palette[n.color].contrastText,backgroundColor:(t.vars||t).palette[n.color].main},"inherit"===n.color&&{color:"inherit",borderColor:"currentColor"},"small"===n.size&&"text"===n.variant&&{padding:"4px 5px",fontSize:t.typography.pxToRem(13)},"large"===n.size&&"text"===n.variant&&{padding:"8px 11px",fontSize:t.typography.pxToRem(15)},"small"===n.size&&"outlined"===n.variant&&{padding:"3px 9px",fontSize:t.typography.pxToRem(13)},"large"===n.size&&"outlined"===n.variant&&{padding:"7px 21px",fontSize:t.typography.pxToRem(15)},"small"===n.size&&"contained"===n.variant&&{padding:"4px 10px",fontSize:t.typography.pxToRem(13)},"large"===n.size&&"contained"===n.variant&&{padding:"8px 22px",fontSize:t.typography.pxToRem(15)},n.fullWidth&&{width:"100%"})}),(e=>{let{ownerState:t}=e;return t.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${v.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${v.disabled}`]:{boxShadow:"none"}}})),A=(0,u.Ay)("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${(0,f.A)(n.size)}`]]}})((e=>{let{ownerState:t}=e;return(0,i.A)({display:"inherit",marginRight:8,marginLeft:-4},"small"===t.size&&{marginLeft:-2},_(t))})),S=(0,u.Ay)("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${(0,f.A)(n.size)}`]]}})((e=>{let{ownerState:t}=e;return(0,i.A)({display:"inherit",marginRight:-4,marginLeft:8},"small"===t.size&&{marginRight:-2},_(t))})),M=a.forwardRef((function(e,t){const n=a.useContext(y),c=(0,s.A)(n,e),u=(0,d.A)({props:c,name:"MuiButton"}),{children:h,color:p="primary",component:m="button",className:v,disabled:_=!1,disableElevation:M=!1,disableFocusRipple:T=!1,endIcon:k,focusVisibleClassName:E,fullWidth:C=!1,size:D="medium",startIcon:R,type:P,variant:O="text"}=u,L=(0,r.A)(u,b),I=(0,i.A)({},u,{color:p,component:m,disabled:_,disableElevation:M,disableFocusRipple:T,fullWidth:C,size:D,type:P,variant:O}),z=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:a,variant:o,classes:s}=e,c={root:["root",o,`${o}${(0,f.A)(t)}`,`size${(0,f.A)(a)}`,`${o}Size${(0,f.A)(a)}`,"inherit"===t&&"colorInherit",n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${(0,f.A)(a)}`],endIcon:["endIcon",`iconSize${(0,f.A)(a)}`]},u=(0,l.A)(c,g,s);return(0,i.A)({},s,u)})(I),N=R&&(0,x.jsx)(A,{className:z.startIcon,ownerState:I,children:R}),F=k&&(0,x.jsx)(S,{className:z.endIcon,ownerState:I,children:k});return(0,x.jsxs)(w,(0,i.A)({ownerState:I,className:(0,o.A)(n.className,z.root,v),component:m,disabled:_,focusRipple:!T,focusVisibleClassName:(0,o.A)(z.focusVisible,E),ref:t,type:P},L,{classes:z,children:[N,h,F]}))}))},24184:(e,t,n)=>{"use strict";n.d(t,{A:()=>z});var r=n(58168),i=n(98587),a=n(9950),o=n(2803),s=n(88465),l=n(59254),c=n(48283),u=n(31506),d=n(1976),h=n(41573),f=n(38166),p=n(88283),m=n(44414);const g=function(e){const{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:s,rippleSize:l,in:c,onExited:u,timeout:d}=e,[h,f]=a.useState(!1),p=(0,o.A)(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),g={width:l,height:l,top:-l/2+s,left:-l/2+i},v=(0,o.A)(n.child,h&&n.childLeaving,r&&n.childPulsate);return c||h||f(!0),a.useEffect((()=>{if(!c&&null!=u){const e=setTimeout(u,d);return()=>{clearTimeout(e)}}}),[u,c,d]),(0,m.jsx)("span",{className:p,style:g,children:(0,m.jsx)("span",{className:v})})};var v=n(1763);const y=(0,v.A)("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),x=["center","classes","className"];let b,_,w,A,S=e=>e;const M=(0,p.i7)(b||(b=S` 0% { transform: scale(0); opacity: 0.1; } 100% { transform: scale(1); opacity: 0.3; } `)),T=(0,p.i7)(_||(_=S` 0% { opacity: 1; } 100% { opacity: 0; } `)),k=(0,p.i7)(w||(w=S` 0% { transform: scale(1); } 50% { transform: scale(0.92); } 100% { transform: scale(1); } `)),E=(0,l.Ay)("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),C=(0,l.Ay)(g,{name:"MuiTouchRipple",slot:"Ripple"})(A||(A=S` opacity: 0; position: absolute; &.${0} { opacity: 0.3; transform: scale(1); animation-name: ${0}; animation-duration: ${0}ms; animation-timing-function: ${0}; } &.${0} { animation-duration: ${0}ms; } & .${0} { opacity: 1; display: block; width: 100%; height: 100%; border-radius: 50%; background-color: currentColor; } & .${0} { opacity: 0; animation-name: ${0}; animation-duration: ${0}ms; animation-timing-function: ${0}; } & .${0} { position: absolute; /* @noflip */ left: 0px; top: 0; animation-name: ${0}; animation-duration: 2500ms; animation-timing-function: ${0}; animation-iteration-count: infinite; animation-delay: 200ms; } `),y.rippleVisible,M,550,(e=>{let{theme:t}=e;return t.transitions.easing.easeInOut}),y.ripplePulsate,(e=>{let{theme:t}=e;return t.transitions.duration.shorter}),y.child,y.childLeaving,T,550,(e=>{let{theme:t}=e;return t.transitions.easing.easeInOut}),y.childPulsate,k,(e=>{let{theme:t}=e;return t.transitions.easing.easeInOut})),D=a.forwardRef((function(e,t){const n=(0,c.A)({props:e,name:"MuiTouchRipple"}),{center:s=!1,classes:l={},className:u}=n,d=(0,i.A)(n,x),[h,p]=a.useState([]),g=a.useRef(0),v=a.useRef(null);a.useEffect((()=>{v.current&&(v.current(),v.current=null)}),[h]);const b=a.useRef(!1),_=a.useRef(null),w=a.useRef(null),A=a.useRef(null);a.useEffect((()=>()=>{clearTimeout(_.current)}),[]);const S=a.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:i,cb:a}=e;p((e=>[...e,(0,m.jsx)(C,{classes:{ripple:(0,o.A)(l.ripple,y.ripple),rippleVisible:(0,o.A)(l.rippleVisible,y.rippleVisible),ripplePulsate:(0,o.A)(l.ripplePulsate,y.ripplePulsate),child:(0,o.A)(l.child,y.child),childLeaving:(0,o.A)(l.childLeaving,y.childLeaving),childPulsate:(0,o.A)(l.childPulsate,y.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:i},g.current)])),g.current+=1,v.current=a}),[l]),M=a.useCallback((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{};const{pulsate:r=!1,center:i=s||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&b.current)return void(b.current=!1);"touchstart"===(null==e?void 0:e.type)&&(b.current=!0);const o=a?null:A.current,l=o?o.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,d;if(i||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(n-l.top)}if(i)d=Math.sqrt((2*l.width**2+l.height**2)/3),d%2===0&&(d+=1);else{const e=2*Math.max(Math.abs((o?o.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((o?o.clientHeight:0)-u),u)+2;d=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===w.current&&(w.current=()=>{S({pulsate:r,rippleX:c,rippleY:u,rippleSize:d,cb:n})},_.current=setTimeout((()=>{w.current&&(w.current(),w.current=null)}),80)):S({pulsate:r,rippleX:c,rippleY:u,rippleSize:d,cb:n})}),[s,S]),T=a.useCallback((()=>{M({},{pulsate:!0})}),[M]),k=a.useCallback(((e,t)=>{if(clearTimeout(_.current),"touchend"===(null==e?void 0:e.type)&&w.current)return w.current(),w.current=null,void(_.current=setTimeout((()=>{k(e,t)})));w.current=null,p((e=>e.length>0?e.slice(1):e)),v.current=t}),[]);return a.useImperativeHandle(t,(()=>({pulsate:T,start:M,stop:k})),[T,M,k]),(0,m.jsx)(E,(0,r.A)({className:(0,o.A)(y.root,l.root,u),ref:A},d,{children:(0,m.jsx)(f.A,{component:null,exit:!0,children:h})}))}));var R=n(423);function P(e){return(0,R.A)("MuiButtonBase",e)}const O=(0,v.A)("MuiButtonBase",["root","disabled","focusVisible"]),L=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],I=(0,l.Ay)("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${O.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),z=a.forwardRef((function(e,t){const n=(0,c.A)({props:e,name:"MuiButtonBase"}),{action:l,centerRipple:f=!1,children:p,className:g,component:v="button",disabled:y=!1,disableRipple:x=!1,disableTouchRipple:b=!1,focusRipple:_=!1,LinkComponent:w="a",onBlur:A,onClick:S,onContextMenu:M,onDragLeave:T,onFocus:k,onFocusVisible:E,onKeyDown:C,onKeyUp:R,onMouseDown:O,onMouseLeave:z,onMouseUp:N,onTouchEnd:F,onTouchMove:B,onTouchStart:j,tabIndex:U=0,TouchRippleProps:V,touchRippleRef:H,type:W}=n,G=(0,i.A)(n,L),q=a.useRef(null),Y=a.useRef(null),$=(0,u.A)(Y,H),{isFocusVisibleRef:X,onFocus:Z,onBlur:K,ref:J}=(0,h.A)(),[Q,ee]=a.useState(!1);y&&Q&&ee(!1),a.useImperativeHandle(l,(()=>({focusVisible:()=>{ee(!0),q.current.focus()}})),[]);const[te,ne]=a.useState(!1);a.useEffect((()=>{ne(!0)}),[]);const re=te&&!x&&!y;function ie(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:b;return(0,d.A)((r=>{t&&t(r);return!n&&Y.current&&Y.current[e](r),!0}))}a.useEffect((()=>{Q&&_&&!x&&te&&Y.current.pulsate()}),[x,_,Q,te]);const ae=ie("start",O),oe=ie("stop",M),se=ie("stop",T),le=ie("stop",N),ce=ie("stop",(e=>{Q&&e.preventDefault(),z&&z(e)})),ue=ie("start",j),de=ie("stop",F),he=ie("stop",B),fe=ie("stop",(e=>{K(e),!1===X.current&&ee(!1),A&&A(e)}),!1),pe=(0,d.A)((e=>{q.current||(q.current=e.currentTarget),Z(e),!0===X.current&&(ee(!0),E&&E(e)),k&&k(e)})),me=()=>{const e=q.current;return v&&"button"!==v&&!("A"===e.tagName&&e.href)},ge=a.useRef(!1),ve=(0,d.A)((e=>{_&&!ge.current&&Q&&Y.current&&" "===e.key&&(ge.current=!0,Y.current.stop(e,(()=>{Y.current.start(e)}))),e.target===e.currentTarget&&me()&&" "===e.key&&e.preventDefault(),C&&C(e),e.target===e.currentTarget&&me()&&"Enter"===e.key&&!y&&(e.preventDefault(),S&&S(e))})),ye=(0,d.A)((e=>{_&&" "===e.key&&Y.current&&Q&&!e.defaultPrevented&&(ge.current=!1,Y.current.stop(e,(()=>{Y.current.pulsate(e)}))),R&&R(e),S&&e.target===e.currentTarget&&me()&&" "===e.key&&!e.defaultPrevented&&S(e)}));let xe=v;"button"===xe&&(G.href||G.to)&&(xe=w);const be={};"button"===xe?(be.type=void 0===W?"button":W,be.disabled=y):(G.href||G.to||(be.role="button"),y&&(be["aria-disabled"]=y));const _e=(0,u.A)(t,J,q);const we=(0,r.A)({},n,{centerRipple:f,component:v,disabled:y,disableRipple:x,disableTouchRipple:b,focusRipple:_,tabIndex:U,focusVisible:Q}),Ae=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,a={root:["root",t&&"disabled",n&&"focusVisible"]},o=(0,s.A)(a,P,i);return n&&r&&(o.root+=` ${r}`),o})(we);return(0,m.jsxs)(I,(0,r.A)({as:xe,className:(0,o.A)(Ae.root,g),ownerState:we,onBlur:fe,onClick:S,onContextMenu:oe,onFocus:pe,onKeyDown:ve,onKeyUp:ye,onMouseDown:ae,onMouseLeave:ce,onMouseUp:le,onDragLeave:se,onTouchEnd:de,onTouchMove:he,onTouchStart:ue,ref:_e,tabIndex:y?-1:U,type:W},be,G,{children:[p,re?(0,m.jsx)(D,(0,r.A)({ref:$,center:f},V)):null]}))}))},48089:(e,t,n)=>{"use strict";n.d(t,{A:()=>v});var r=n(58168),i=n(98587),a=n(9950),o=n(2803),s=n(88465),l=n(59254),c=n(48283),u=n(2235),d=n(1763),h=n(423);function f(e){return(0,h.A)("MuiCard",e)}(0,d.A)("MuiCard",["root"]);var p=n(44414);const m=["className","raised"],g=(0,l.Ay)(u.A,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})((()=>({overflow:"hidden"}))),v=a.forwardRef((function(e,t){const n=(0,c.A)({props:e,name:"MuiCard"}),{className:a,raised:l=!1}=n,u=(0,i.A)(n,m),d=(0,r.A)({},n,{raised:l}),h=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"]},f,t)})(d);return(0,p.jsx)(g,(0,r.A)({className:(0,o.A)(h.root,a),elevation:l?8:void 0,ref:t,ownerState:d},u))}))},93038:(e,t,n)=>{"use strict";n.d(t,{A:()=>k});var r=n(98587),i=n(58168),a=n(9950),o=n(2803),s=n(88465),l=n(97497),c=n(46282),u=n(65471),d=n(44414);const h=(0,u.A)((0,d.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),f=(0,u.A)((0,d.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),p=(0,u.A)((0,d.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");var m=n(61676),g=n(48283),v=n(59254),y=n(1763),x=n(423);function b(e){return(0,x.A)("MuiCheckbox",e)}const _=(0,y.A)("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary"]),w=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],A=(0,v.Ay)(c.A,{shouldForwardProp:e=>(0,v.ep)(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,"default"!==n.color&&t[`color${(0,m.A)(n.color)}`]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({color:(t.vars||t).palette.text.secondary},!n.disableRipple&&{"&:hover":{backgroundColor:t.vars?`rgba(${"default"===n.color?t.vars.palette.action.activeChannel:t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,l.X4)("default"===n.color?t.palette.action.active:t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==n.color&&{[`&.${_.checked}, &.${_.indeterminate}`]:{color:(t.vars||t).palette[n.color].main},[`&.${_.disabled}`]:{color:(t.vars||t).palette.action.disabled}})})),S=(0,d.jsx)(f,{}),M=(0,d.jsx)(h,{}),T=(0,d.jsx)(p,{}),k=a.forwardRef((function(e,t){var n,l;const c=(0,g.A)({props:e,name:"MuiCheckbox"}),{checkedIcon:u=S,color:h="primary",icon:f=M,indeterminate:p=!1,indeterminateIcon:v=T,inputProps:y,size:x="medium",className:_}=c,k=(0,r.A)(c,w),E=p?v:f,C=p?v:u,D=(0,i.A)({},c,{color:h,indeterminate:p,size:x}),R=(e=>{const{classes:t,indeterminate:n,color:r}=e,a={root:["root",n&&"indeterminate",`color${(0,m.A)(r)}`]},o=(0,s.A)(a,b,t);return(0,i.A)({},t,o)})(D);return(0,d.jsx)(A,(0,i.A)({type:"checkbox",inputProps:(0,i.A)({"data-indeterminate":p},y),icon:a.cloneElement(E,{fontSize:null!=(n=E.props.fontSize)?n:x}),checkedIcon:a.cloneElement(C,{fontSize:null!=(l=C.props.fontSize)?l:x}),ownerState:D,ref:t,className:(0,o.A)(R.root,_)},k,{classes:R}))}))},25277:(e,t,n)=>{"use strict";n.d(t,{A:()=>M});var r=n(98587),i=n(58168),a=n(9950),o=n(2803),s=n(88465),l=n(97497),c=n(65471),u=n(44414);const d=(0,c.A)((0,u.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");var h=n(31506),f=n(61676),p=n(24184),m=n(48283),g=n(59254),v=n(1763),y=n(423);function x(e){return(0,y.A)("MuiChip",e)}const b=(0,v.A)("MuiChip",["root","sizeSmall","sizeMedium","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),_=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],w=(0,g.Ay)("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:i,clickable:a,onDelete:o,size:s,variant:l}=n;return[{[`& .${b.avatar}`]:t.avatar},{[`& .${b.avatar}`]:t[`avatar${(0,f.A)(s)}`]},{[`& .${b.avatar}`]:t[`avatarColor${(0,f.A)(r)}`]},{[`& .${b.icon}`]:t.icon},{[`& .${b.icon}`]:t[`icon${(0,f.A)(s)}`]},{[`& .${b.icon}`]:t[`iconColor${(0,f.A)(i)}`]},{[`& .${b.deleteIcon}`]:t.deleteIcon},{[`& .${b.deleteIcon}`]:t[`deleteIcon${(0,f.A)(s)}`]},{[`& .${b.deleteIcon}`]:t[`deleteIconColor${(0,f.A)(r)}`]},{[`& .${b.deleteIcon}`]:t[`deleteIcon${(0,f.A)(l)}Color${(0,f.A)(r)}`]},t.root,t[`size${(0,f.A)(s)}`],t[`color${(0,f.A)(r)}`],a&&t.clickable,a&&"default"!==r&&t[`clickableColor${(0,f.A)(r)})`],o&&t.deletable,o&&"default"!==r&&t[`deletableColor${(0,f.A)(r)}`],t[l],t[`${l}${(0,f.A)(r)}`]]}})((e=>{let{theme:t,ownerState:n}=e;const r=(0,l.X4)(t.palette.text.primary,.26),a="light"===t.palette.mode?t.palette.grey[700]:t.palette.grey[300];return(0,i.A)({maxWidth:"100%",fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(t.vars||t).palette.text.primary,backgroundColor:(t.vars||t).palette.action.selected,borderRadius:16,whiteSpace:"nowrap",transition:t.transitions.create(["background-color","box-shadow"]),cursor:"default",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${b.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${b.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:t.vars?t.vars.palette.Chip.defaultAvatarColor:a,fontSize:t.typography.pxToRem(12)},[`& .${b.avatarColorPrimary}`]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.dark},[`& .${b.avatarColorSecondary}`]:{color:(t.vars||t).palette.secondary.contrastText,backgroundColor:(t.vars||t).palette.secondary.dark},[`& .${b.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:t.typography.pxToRem(10)},[`& .${b.icon}`]:(0,i.A)({marginLeft:5,marginRight:-6},"small"===n.size&&{fontSize:18,marginLeft:4,marginRight:-4},n.iconColor===n.color&&(0,i.A)({color:t.vars?t.vars.palette.Chip.defaultIconColor:a},"default"!==n.color&&{color:"inherit"})),[`& .${b.deleteIcon}`]:(0,i.A)({WebkitTapHighlightColor:"transparent",color:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / 0.26)`:r,fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / 0.4)`:(0,l.X4)(r,.4)}},"small"===n.size&&{fontSize:16,marginRight:4,marginLeft:-4},"default"!==n.color&&{color:t.vars?`rgba(${t.vars.palette[n.color].contrastTextChannel} / 0.7)`:(0,l.X4)(t.palette[n.color].contrastText,.7),"&:hover, &:active":{color:(t.vars||t).palette[n.color].contrastText}})},"small"===n.size&&{height:24},"default"!==n.color&&{backgroundColor:(t.vars||t).palette[n.color].main,color:(t.vars||t).palette[n.color].contrastText},n.onDelete&&{[`&.${b.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:(0,l.X4)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},n.onDelete&&"default"!==n.color&&{[`&.${b.focusVisible}`]:{backgroundColor:(t.vars||t).palette[n.color].dark}})}),(e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({},n.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:(0,l.X4)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)},[`&.${b.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:(0,l.X4)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)},"&:active":{boxShadow:(t.vars||t).shadows[1]}},n.clickable&&"default"!==n.color&&{[`&:hover, &.${b.focusVisible}`]:{backgroundColor:(t.vars||t).palette[n.color].dark}})}),(e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({},"outlined"===n.variant&&{backgroundColor:"transparent",border:t.vars?`1px solid ${t.vars.palette.Chip.defaultBorder}`:`1px solid ${"light"===t.palette.mode?t.palette.grey[400]:t.palette.grey[700]}`,[`&.${b.clickable}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${b.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`& .${b.avatar}`]:{marginLeft:4},[`& .${b.avatarSmall}`]:{marginLeft:2},[`& .${b.icon}`]:{marginLeft:4},[`& .${b.iconSmall}`]:{marginLeft:2},[`& .${b.deleteIcon}`]:{marginRight:5},[`& .${b.deleteIconSmall}`]:{marginRight:3}},"outlined"===n.variant&&"default"!==n.color&&{color:(t.vars||t).palette[n.color].main,border:`1px solid ${t.vars?`rgba(${t.vars.palette[n.color].mainChannel} / 0.7)`:(0,l.X4)(t.palette[n.color].main,.7)}`,[`&.${b.clickable}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette[n.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,l.X4)(t.palette[n.color].main,t.palette.action.hoverOpacity)},[`&.${b.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette[n.color].mainChannel} / ${t.vars.palette.action.focusOpacity})`:(0,l.X4)(t.palette[n.color].main,t.palette.action.focusOpacity)},[`& .${b.deleteIcon}`]:{color:t.vars?`rgba(${t.vars.palette[n.color].mainChannel} / 0.7)`:(0,l.X4)(t.palette[n.color].main,.7),"&:hover, &:active":{color:(t.vars||t).palette[n.color].main}}})})),A=(0,g.Ay)("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${(0,f.A)(r)}`]]}})((e=>{let{ownerState:t}=e;return(0,i.A)({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},"small"===t.size&&{paddingLeft:8,paddingRight:8})}));function S(e){return"Backspace"===e.key||"Delete"===e.key}const M=a.forwardRef((function(e,t){const n=(0,m.A)({props:e,name:"MuiChip"}),{avatar:l,className:c,clickable:g,color:v="default",component:y,deleteIcon:b,disabled:M=!1,icon:T,label:k,onClick:E,onDelete:C,onKeyDown:D,onKeyUp:R,size:P="medium",variant:O="filled",tabIndex:L,skipFocusWhenDisabled:I=!1}=n,z=(0,r.A)(n,_),N=a.useRef(null),F=(0,h.A)(N,t),B=e=>{e.stopPropagation(),C&&C(e)},j=!(!1===g||!E)||g,U=j||C?p.A:y||"div",V=(0,i.A)({},n,{component:U,disabled:M,size:P,color:v,iconColor:a.isValidElement(T)&&T.props.color||v,onDelete:!!C,clickable:j,variant:O}),H=(e=>{const{classes:t,disabled:n,size:r,color:i,iconColor:a,onDelete:o,clickable:l,variant:c}=e,u={root:["root",c,n&&"disabled",`size${(0,f.A)(r)}`,`color${(0,f.A)(i)}`,l&&"clickable",l&&`clickableColor${(0,f.A)(i)}`,o&&"deletable",o&&`deletableColor${(0,f.A)(i)}`,`${c}${(0,f.A)(i)}`],label:["label",`label${(0,f.A)(r)}`],avatar:["avatar",`avatar${(0,f.A)(r)}`,`avatarColor${(0,f.A)(i)}`],icon:["icon",`icon${(0,f.A)(r)}`,`iconColor${(0,f.A)(a)}`],deleteIcon:["deleteIcon",`deleteIcon${(0,f.A)(r)}`,`deleteIconColor${(0,f.A)(i)}`,`deleteIcon${(0,f.A)(c)}Color${(0,f.A)(i)}`]};return(0,s.A)(u,x,t)})(V),W=U===p.A?(0,i.A)({component:y||"div",focusVisibleClassName:H.focusVisible},C&&{disableRipple:!0}):{};let G=null;C&&(G=b&&a.isValidElement(b)?a.cloneElement(b,{className:(0,o.A)(b.props.className,H.deleteIcon),onClick:B}):(0,u.jsx)(d,{className:(0,o.A)(H.deleteIcon),onClick:B}));let q=null;l&&a.isValidElement(l)&&(q=a.cloneElement(l,{className:(0,o.A)(H.avatar,l.props.className)}));let Y=null;return T&&a.isValidElement(T)&&(Y=a.cloneElement(T,{className:(0,o.A)(H.icon,T.props.className)})),(0,u.jsxs)(w,(0,i.A)({as:U,className:(0,o.A)(H.root,c),disabled:!(!j||!M)||void 0,onClick:E,onKeyDown:e=>{e.currentTarget===e.target&&S(e)&&e.preventDefault(),D&&D(e)},onKeyUp:e=>{e.currentTarget===e.target&&(C&&S(e)?C(e):"Escape"===e.key&&N.current&&N.current.blur()),R&&R(e)},ref:F,tabIndex:I&&M?-1:L,ownerState:V},W,z,{children:[q||Y,(0,u.jsx)(A,{className:(0,o.A)(H.label),ownerState:V,children:k}),G]}))}))},33738:(e,t,n)=>{"use strict";n.d(t,{A:()=>S});var r=n(98587),i=n(58168),a=n(9950),o=n(2803),s=n(67279),l=n(88465),c=n(59254),u=n(48283),d=n(75361),h=n(70576),f=n(14857),p=n(31506),m=n(1763),g=n(423);function v(e){return(0,g.A)("MuiCollapse",e)}(0,m.A)("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);var y=n(44414);const x=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],b=(0,c.Ay)("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],"entered"===n.state&&t.entered,"exited"===n.state&&!n.in&&"0px"===n.collapsedSize&&t.hidden]}})((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({height:0,overflow:"hidden",transition:t.transitions.create("height")},"horizontal"===n.orientation&&{height:"auto",width:0,transition:t.transitions.create("width")},"entered"===n.state&&(0,i.A)({height:"auto",overflow:"visible"},"horizontal"===n.orientation&&{width:"auto"}),"exited"===n.state&&!n.in&&"0px"===n.collapsedSize&&{visibility:"hidden"})})),_=(0,c.Ay)("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})((e=>{let{ownerState:t}=e;return(0,i.A)({display:"flex",width:"100%"},"horizontal"===t.orientation&&{width:"auto",height:"100%"})})),w=(0,c.Ay)("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})((e=>{let{ownerState:t}=e;return(0,i.A)({width:"100%"},"horizontal"===t.orientation&&{width:"auto",height:"100%"})})),A=a.forwardRef((function(e,t){const n=(0,u.A)({props:e,name:"MuiCollapse"}),{addEndListener:c,children:m,className:g,collapsedSize:A="0px",component:S,easing:M,in:T,onEnter:k,onEntered:E,onEntering:C,onExit:D,onExited:R,onExiting:P,orientation:O="vertical",style:L,timeout:I=d.p0.standard,TransitionComponent:z=s.Ay}=n,N=(0,r.A)(n,x),F=(0,i.A)({},n,{orientation:O,collapsedSize:A}),B=(e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return(0,l.A)(r,v,n)})(F),j=(0,f.A)(),U=a.useRef(),V=a.useRef(null),H=a.useRef(),W="number"===typeof A?`${A}px`:A,G="horizontal"===O,q=G?"width":"height";a.useEffect((()=>()=>{clearTimeout(U.current)}),[]);const Y=a.useRef(null),$=(0,p.A)(t,Y),X=e=>t=>{if(e){const n=Y.current;void 0===t?e(n):e(n,t)}},Z=()=>V.current?V.current[G?"clientWidth":"clientHeight"]:0,K=X(((e,t)=>{V.current&&G&&(V.current.style.position="absolute"),e.style[q]=W,k&&k(e,t)})),J=X(((e,t)=>{const n=Z();V.current&&G&&(V.current.style.position="");const{duration:r,easing:i}=(0,h.c)({style:L,timeout:I,easing:M},{mode:"enter"});if("auto"===I){const t=j.transitions.getAutoHeightDuration(n);e.style.transitionDuration=`${t}ms`,H.current=t}else e.style.transitionDuration="string"===typeof r?r:`${r}ms`;e.style[q]=`${n}px`,e.style.transitionTimingFunction=i,C&&C(e,t)})),Q=X(((e,t)=>{e.style[q]="auto",E&&E(e,t)})),ee=X((e=>{e.style[q]=`${Z()}px`,D&&D(e)})),te=X(R),ne=X((e=>{const t=Z(),{duration:n,easing:r}=(0,h.c)({style:L,timeout:I,easing:M},{mode:"exit"});if("auto"===I){const n=j.transitions.getAutoHeightDuration(t);e.style.transitionDuration=`${n}ms`,H.current=n}else e.style.transitionDuration="string"===typeof n?n:`${n}ms`;e.style[q]=W,e.style.transitionTimingFunction=r,P&&P(e)}));return(0,y.jsx)(z,(0,i.A)({in:T,onEnter:K,onEntered:Q,onEntering:J,onExit:ee,onExited:te,onExiting:ne,addEndListener:e=>{"auto"===I&&(U.current=setTimeout(e,H.current||0)),c&&c(Y.current,e)},nodeRef:Y,timeout:"auto"===I?null:I},N,{children:(e,t)=>(0,y.jsx)(b,(0,i.A)({as:S,className:(0,o.A)(B.root,g,{entered:B.entered,exited:!T&&"0px"===W&&B.hidden}[e]),style:(0,i.A)({[G?"minWidth":"minHeight"]:W},L),ownerState:(0,i.A)({},F,{state:e}),ref:$},t,{children:(0,y.jsx)(_,{ownerState:(0,i.A)({},F,{state:e}),className:B.wrapper,ref:V,children:(0,y.jsx)(w,{ownerState:(0,i.A)({},F,{state:e}),className:B.wrapperInner,children:m})})}))}))}));A.muiSupportAuto=!0;const S=A},78982:(e,t,n)=>{"use strict";n.d(t,{A:()=>w});var r=n(98587),i=n(58168),a=n(9950),o=n(2803),s=n(77532),l=n(423),c=n(88465),u=n(62161);const d=(0,n(17089).Ay)();var h=n(72341),f=n(44414);const p=["className","component","disableGutters","fixed","maxWidth","classes"],m=(0,h.A)(),g=d("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${(0,s.A)(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),v=e=>(0,u.A)({props:e,name:"MuiContainer",defaultTheme:m});var y=n(61676),x=n(59254),b=n(48283);const _=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{createStyledComponent:t=g,useThemeProps:n=v,componentName:u="MuiContainer"}=e,d=t((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block"},!n.disableGutters&&{paddingLeft:t.spacing(2),paddingRight:t.spacing(2),[t.breakpoints.up("sm")]:{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}})}),(e=>{let{theme:t,ownerState:n}=e;return n.fixed&&Object.keys(t.breakpoints.values).reduce(((e,n)=>{const r=n,i=t.breakpoints.values[r];return 0!==i&&(e[t.breakpoints.up(r)]={maxWidth:`${i}${t.breakpoints.unit}`}),e}),{})}),(e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({},"xs"===n.maxWidth&&{[t.breakpoints.up("xs")]:{maxWidth:Math.max(t.breakpoints.values.xs,444)}},n.maxWidth&&"xs"!==n.maxWidth&&{[t.breakpoints.up(n.maxWidth)]:{maxWidth:`${t.breakpoints.values[n.maxWidth]}${t.breakpoints.unit}`}})})),h=a.forwardRef((function(e,t){const a=n(e),{className:h,component:m="div",disableGutters:g=!1,fixed:v=!1,maxWidth:y="lg"}=a,x=(0,r.A)(a,p),b=(0,i.A)({},a,{component:m,disableGutters:g,fixed:v,maxWidth:y}),_=((e,t)=>{const{classes:n,fixed:r,disableGutters:i,maxWidth:a}=e,o={root:["root",a&&`maxWidth${(0,s.A)(String(a))}`,r&&"fixed",i&&"disableGutters"]};return(0,c.A)(o,(e=>(0,l.A)(t,e)),n)})(b,u);return(0,f.jsx)(d,(0,i.A)({as:m,ownerState:b,className:(0,o.A)(_.root,h),ref:t},x))}));return h}({createStyledComponent:(0,x.Ay)("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${(0,y.A)(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),useThemeProps:e=>(0,b.A)({props:e,name:"MuiContainer"})}),w=_},96583:(e,t,n)=>{"use strict";n.d(t,{A:()=>M});var r=n(98587),i=n(58168),a=n(9950),o=n(2803),s=n(88465),l=n(81174),c=n(61676),u=n(53984),d=n(57191),h=n(2235),f=n(48283),p=n(59254),m=n(21427),g=n(5536),v=n(55158),y=n(14857),x=n(44414);const b=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],_=(0,p.Ay)(v.A,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),w=(0,p.Ay)(u.A,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),A=(0,p.Ay)("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${(0,c.A)(n.scroll)}`]]}})((e=>{let{ownerState:t}=e;return(0,i.A)({height:"100%","@media print":{height:"auto"},outline:0},"paper"===t.scroll&&{display:"flex",justifyContent:"center",alignItems:"center"},"body"===t.scroll&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&:after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})})),S=(0,p.Ay)(h.A,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${(0,c.A)(n.scroll)}`],t[`paperWidth${(0,c.A)(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},"paper"===n.scroll&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},"body"===n.scroll&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!n.maxWidth&&{maxWidth:"calc(100% - 64px)"},"xs"===n.maxWidth&&{maxWidth:"px"===t.breakpoints.unit?Math.max(t.breakpoints.values.xs,444):`${t.breakpoints.values.xs}${t.breakpoints.unit}`,[`&.${m.A.paperScrollBody}`]:{[t.breakpoints.down(Math.max(t.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}},n.maxWidth&&"xs"!==n.maxWidth&&{maxWidth:`${t.breakpoints.values[n.maxWidth]}${t.breakpoints.unit}`,[`&.${m.A.paperScrollBody}`]:{[t.breakpoints.down(t.breakpoints.values[n.maxWidth]+64)]:{maxWidth:"calc(100% - 64px)"}}},n.fullWidth&&{width:"calc(100% - 64px)"},n.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${m.A.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})})),M=a.forwardRef((function(e,t){const n=(0,f.A)({props:e,name:"MuiDialog"}),u=(0,y.A)(),p={enter:u.transitions.duration.enteringScreen,exit:u.transitions.duration.leavingScreen},{"aria-describedby":v,"aria-labelledby":M,BackdropComponent:T,BackdropProps:k,children:E,className:C,disableEscapeKeyDown:D=!1,fullScreen:R=!1,fullWidth:P=!1,maxWidth:O="sm",onBackdropClick:L,onClose:I,open:z,PaperComponent:N=h.A,PaperProps:F={},scroll:B="paper",TransitionComponent:j=d.A,transitionDuration:U=p,TransitionProps:V}=n,H=(0,r.A)(n,b),W=(0,i.A)({},n,{disableEscapeKeyDown:D,fullScreen:R,fullWidth:P,maxWidth:O,scroll:B}),G=(e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:i,fullScreen:a}=e,o={root:["root"],container:["container",`scroll${(0,c.A)(n)}`],paper:["paper",`paperScroll${(0,c.A)(n)}`,`paperWidth${(0,c.A)(String(r))}`,i&&"paperFullWidth",a&&"paperFullScreen"]};return(0,s.A)(o,m.f,t)})(W),q=a.useRef(),Y=(0,l.A)(M),$=a.useMemo((()=>({titleId:Y})),[Y]);return(0,x.jsx)(w,(0,i.A)({className:(0,o.A)(G.root,C),closeAfterTransition:!0,components:{Backdrop:_},componentsProps:{backdrop:(0,i.A)({transitionDuration:U,as:T},k)},disableEscapeKeyDown:D,onClose:I,open:z,ref:t,onClick:e=>{q.current&&(q.current=null,L&&L(e),I&&I(e,"backdropClick"))},ownerState:W},H,{children:(0,x.jsx)(j,(0,i.A)({appear:!0,in:z,timeout:U,role:"presentation"},V,{children:(0,x.jsx)(A,{className:(0,o.A)(G.container),onMouseDown:e=>{q.current=e.target===e.currentTarget},ownerState:W,children:(0,x.jsx)(S,(0,i.A)({as:N,elevation:24,role:"dialog","aria-describedby":v,"aria-labelledby":Y},F,{className:(0,o.A)(G.paper,F.className),ownerState:W,children:(0,x.jsx)(g.A.Provider,{value:$,children:E})}))})}))}))}))},5536:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(9950).createContext({})},21427:(e,t,n)=>{"use strict";n.d(t,{A:()=>o,f:()=>a});var r=n(1763),i=n(423);function a(e){return(0,i.A)("MuiDialog",e)}const o=(0,r.A)("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"])},79739:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});var r=n(98587),i=n(58168),a=n(9950),o=n(2803),s=n(88465),l=n(59254),c=n(48283),u=n(1763),d=n(423);function h(e){return(0,d.A)("MuiDialogActions",e)}(0,u.A)("MuiDialogActions",["root","spacing"]);var f=n(44414);const p=["className","disableSpacing"],m=(0,l.Ay)("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})((e=>{let{ownerState:t}=e;return(0,i.A)({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!t.disableSpacing&&{"& > :not(:first-of-type)":{marginLeft:8}})})),g=a.forwardRef((function(e,t){const n=(0,c.A)({props:e,name:"MuiDialogActions"}),{className:a,disableSpacing:l=!1}=n,u=(0,r.A)(n,p),d=(0,i.A)({},n,{disableSpacing:l}),g=(e=>{const{classes:t,disableSpacing:n}=e,r={root:["root",!n&&"spacing"]};return(0,s.A)(r,h,t)})(d);return(0,f.jsx)(m,(0,i.A)({className:(0,o.A)(g.root,a),ownerState:d,ref:t},u))}))},28170:(e,t,n)=>{"use strict";n.d(t,{A:()=>v});var r=n(98587),i=n(58168),a=n(9950),o=n(2803),s=n(88465),l=n(59254),c=n(48283),u=n(1763),d=n(423);function h(e){return(0,d.A)("MuiDialogContent",e)}(0,u.A)("MuiDialogContent",["root","dividers"]);var f=n(23025),p=n(44414);const m=["className","dividers"],g=(0,l.Ay)("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},n.dividers?{padding:"16px 24px",borderTop:`1px solid ${(t.vars||t).palette.divider}`,borderBottom:`1px solid ${(t.vars||t).palette.divider}`}:{[`.${f.A.root} + &`]:{paddingTop:0}})})),v=a.forwardRef((function(e,t){const n=(0,c.A)({props:e,name:"MuiDialogContent"}),{className:a,dividers:l=!1}=n,u=(0,r.A)(n,m),d=(0,i.A)({},n,{dividers:l}),f=(e=>{const{classes:t,dividers:n}=e,r={root:["root",n&&"dividers"]};return(0,s.A)(r,h,t)})(d);return(0,p.jsx)(g,(0,i.A)({className:(0,o.A)(f.root,a),ownerState:d,ref:t},u))}))},6493:(e,t,n)=>{"use strict";n.d(t,{A:()=>v});var r=n(98587),i=n(58168),a=n(9950),o=n(2803),s=n(88465),l=n(59254),c=n(48283),u=n(82053),d=n(1763),h=n(423);function f(e){return(0,h.A)("MuiDialogContentText",e)}(0,d.A)("MuiDialogContentText",["root"]);var p=n(44414);const m=["children","className"],g=(0,l.Ay)(u.A,{shouldForwardProp:e=>(0,l.ep)(e)||"classes"===e,name:"MuiDialogContentText",slot:"Root",overridesResolver:(e,t)=>t.root})({}),v=a.forwardRef((function(e,t){const n=(0,c.A)({props:e,name:"MuiDialogContentText"}),{className:a}=n,l=(0,r.A)(n,m),u=(e=>{const{classes:t}=e,n=(0,s.A)({root:["root"]},f,t);return(0,i.A)({},t,n)})(l);return(0,p.jsx)(g,(0,i.A)({component:"p",variant:"body1",color:"text.secondary",ref:t,ownerState:l,className:(0,o.A)(u.root,a)},n,{classes:u}))}))},40033:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});var r=n(58168),i=n(98587),a=n(9950),o=n(2803),s=n(88465),l=n(82053),c=n(59254),u=n(48283),d=n(23025),h=n(5536),f=n(44414);const p=["className","id"],m=(0,c.Ay)(l.A,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),g=a.forwardRef((function(e,t){const n=(0,u.A)({props:e,name:"MuiDialogTitle"}),{className:l,id:c}=n,g=(0,i.A)(n,p),v=n,y=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"]},d.t,t)})(v),{titleId:x=c}=a.useContext(h.A);return(0,f.jsx)(m,(0,r.A)({component:"h2",className:(0,o.A)(y.root,l),ownerState:v,ref:t,variant:"h6",id:x},g))}))},23025:(e,t,n)=>{"use strict";n.d(t,{A:()=>o,t:()=>a});var r=n(1763),i=n(423);function a(e){return(0,i.A)("MuiDialogTitle",e)}const o=(0,r.A)("MuiDialogTitle",["root"])},74745:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});var r=n(98587),i=n(58168),a=n(9950),o=n(2803),s=n(88465),l=n(97497),c=n(59254),u=n(48283),d=n(40777),h=n(44414);const f=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],p=(0,c.Ay)("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,"vertical"===n.orientation&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&"vertical"===n.orientation&&t.withChildrenVertical,"right"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignRight,"left"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignLeft]}})((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin"},n.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},n.light&&{borderColor:t.vars?`rgba(${t.vars.palette.dividerChannel} / 0.08)`:(0,l.X4)(t.palette.divider,.08)},"inset"===n.variant&&{marginLeft:72},"middle"===n.variant&&"horizontal"===n.orientation&&{marginLeft:t.spacing(2),marginRight:t.spacing(2)},"middle"===n.variant&&"vertical"===n.orientation&&{marginTop:t.spacing(1),marginBottom:t.spacing(1)},"vertical"===n.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},n.flexItem&&{alignSelf:"stretch",height:"auto"})}),(e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({},n.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{position:"relative",width:"100%",borderTop:`thin solid ${(t.vars||t).palette.divider}`,top:"50%",content:'""',transform:"translateY(50%)"}})}),(e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({},n.children&&"vertical"===n.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",top:"0%",left:"50%",borderTop:0,borderLeft:`thin solid ${(t.vars||t).palette.divider}`,transform:"translateX(0%)"}})}),(e=>{let{ownerState:t}=e;return(0,i.A)({},"right"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})})),m=(0,c.Ay)("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,"vertical"===n.orientation&&t.wrapperVertical]}})((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({display:"inline-block",paddingLeft:`calc(${t.spacing(1)} * 1.2)`,paddingRight:`calc(${t.spacing(1)} * 1.2)`},"vertical"===n.orientation&&{paddingTop:`calc(${t.spacing(1)} * 1.2)`,paddingBottom:`calc(${t.spacing(1)} * 1.2)`})})),g=a.forwardRef((function(e,t){const n=(0,u.A)({props:e,name:"MuiDivider"}),{absolute:a=!1,children:l,className:c,component:g=(l?"div":"hr"),flexItem:v=!1,light:y=!1,orientation:x="horizontal",role:b=("hr"!==g?"separator":void 0),textAlign:_="center",variant:w="fullWidth"}=n,A=(0,r.A)(n,f),S=(0,i.A)({},n,{absolute:a,component:g,flexItem:v,light:y,orientation:x,role:b,textAlign:_,variant:w}),M=(e=>{const{absolute:t,children:n,classes:r,flexItem:i,light:a,orientation:o,textAlign:l,variant:c}=e,u={root:["root",t&&"absolute",c,a&&"light","vertical"===o&&"vertical",i&&"flexItem",n&&"withChildren",n&&"vertical"===o&&"withChildrenVertical","right"===l&&"vertical"!==o&&"textAlignRight","left"===l&&"vertical"!==o&&"textAlignLeft"],wrapper:["wrapper","vertical"===o&&"wrapperVertical"]};return(0,s.A)(u,d.K,r)})(S);return(0,h.jsx)(p,(0,i.A)({as:g,className:(0,o.A)(M.root,c),role:b,ref:t,ownerState:S},A,{children:l?(0,h.jsx)(m,{className:M.wrapper,ownerState:S,children:l}):null}))}))},40777:(e,t,n)=>{"use strict";n.d(t,{A:()=>o,K:()=>a});var r=n(1763),i=n(423);function a(e){return(0,i.A)("MuiDivider",e)}const o=(0,r.A)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"])},39694:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>O});var r=n(98587),i=n(58168),a=n(9950),o=n(2803),s=n(88465),l=n(53984),c=n(67279),u=n(21209),d=n(31506),h=n(14857),f=n(70576),p=n(70827),m=n(44414);const g=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function v(e,t,n){var r;const i=function(e,t,n){const r=t.getBoundingClientRect(),i=n&&n.getBoundingClientRect(),a=(0,p.A)(t);let o;if(t.fakeTransform)o=t.fakeTransform;else{const e=a.getComputedStyle(t);o=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("transform")}let s=0,l=0;if(o&&"none"!==o&&"string"===typeof o){const e=o.split("(")[1].split(")")[0].split(",");s=parseInt(e[4],10),l=parseInt(e[5],10)}return"left"===e?i?`translateX(${i.right+s-r.left}px)`:`translateX(${a.innerWidth+s-r.left}px)`:"right"===e?i?`translateX(-${r.right-i.left-s}px)`:`translateX(-${r.left+r.width-s}px)`:"up"===e?i?`translateY(${i.bottom+l-r.top}px)`:`translateY(${a.innerHeight+l-r.top}px)`:i?`translateY(-${r.top-i.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}(e,t,"function"===typeof(r=n)?r():r);i&&(t.style.webkitTransform=i,t.style.transform=i)}const y=a.forwardRef((function(e,t){const n=(0,h.A)(),o={enter:n.transitions.easing.easeOut,exit:n.transitions.easing.sharp},s={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:l,appear:y=!0,children:x,container:b,direction:_="down",easing:w=o,in:A,onEnter:S,onEntered:M,onEntering:T,onExit:k,onExited:E,onExiting:C,style:D,timeout:R=s,TransitionComponent:P=c.Ay}=e,O=(0,r.A)(e,g),L=a.useRef(null),I=(0,d.A)(x.ref,L,t),z=e=>t=>{e&&(void 0===t?e(L.current):e(L.current,t))},N=z(((e,t)=>{v(_,e,b),(0,f.q)(e),S&&S(e,t)})),F=z(((e,t)=>{const r=(0,f.c)({timeout:R,style:D,easing:w},{mode:"enter"});e.style.webkitTransition=n.transitions.create("-webkit-transform",(0,i.A)({},r)),e.style.transition=n.transitions.create("transform",(0,i.A)({},r)),e.style.webkitTransform="none",e.style.transform="none",T&&T(e,t)})),B=z(M),j=z(C),U=z((e=>{const t=(0,f.c)({timeout:R,style:D,easing:w},{mode:"exit"});e.style.webkitTransition=n.transitions.create("-webkit-transform",t),e.style.transition=n.transitions.create("transform",t),v(_,e,b),k&&k(e)})),V=z((e=>{e.style.webkitTransition="",e.style.transition="",E&&E(e)})),H=a.useCallback((()=>{L.current&&v(_,L.current,b)}),[_,b]);return a.useEffect((()=>{if(A||"down"===_||"right"===_)return;const e=(0,u.A)((()=>{L.current&&v(_,L.current,b)})),t=(0,p.A)(L.current);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}}),[_,A,b]),a.useEffect((()=>{A||H()}),[A,H]),(0,m.jsx)(P,(0,i.A)({nodeRef:L,onEnter:N,onEntered:B,onEntering:F,onExit:U,onExited:V,onExiting:j,addEndListener:e=>{l&&l(L.current,e)},appear:y,in:A,timeout:R},O,{children:(e,t)=>a.cloneElement(x,(0,i.A)({ref:I,style:(0,i.A)({visibility:"exited"!==e||A?void 0:"hidden"},D,x.props.style)},t))}))}));var x=n(2235),b=n(61676),_=n(48283),w=n(59254),A=n(1763),S=n(423);function M(e){return(0,S.A)("MuiDrawer",e)}(0,A.A)("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const T=["BackdropProps"],k=["anchor","BackdropProps","children","className","elevation","hideBackdrop","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"],E=(e,t)=>{const{ownerState:n}=e;return[t.root,("permanent"===n.variant||"persistent"===n.variant)&&t.docked,t.modal]},C=(0,w.Ay)(l.A,{name:"MuiDrawer",slot:"Root",overridesResolver:E})((e=>{let{theme:t}=e;return{zIndex:(t.vars||t).zIndex.drawer}})),D=(0,w.Ay)("div",{shouldForwardProp:w.ep,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:E})({flex:"0 0 auto"}),R=(0,w.Ay)(x.A,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`paperAnchor${(0,b.A)(n.anchor)}`],"temporary"!==n.variant&&t[`paperAnchorDocked${(0,b.A)(n.anchor)}`]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(t.vars||t).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},"left"===n.anchor&&{left:0},"top"===n.anchor&&{top:0,left:0,right:0,height:"auto",maxHeight:"100%"},"right"===n.anchor&&{right:0},"bottom"===n.anchor&&{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},"left"===n.anchor&&"temporary"!==n.variant&&{borderRight:`1px solid ${(t.vars||t).palette.divider}`},"top"===n.anchor&&"temporary"!==n.variant&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`},"right"===n.anchor&&"temporary"!==n.variant&&{borderLeft:`1px solid ${(t.vars||t).palette.divider}`},"bottom"===n.anchor&&"temporary"!==n.variant&&{borderTop:`1px solid ${(t.vars||t).palette.divider}`})})),P={left:"right",right:"left",top:"down",bottom:"up"};const O=a.forwardRef((function(e,t){const n=(0,_.A)({props:e,name:"MuiDrawer"}),l=(0,h.A)(),c={enter:l.transitions.duration.enteringScreen,exit:l.transitions.duration.leavingScreen},{anchor:u="left",BackdropProps:d,children:f,className:p,elevation:g=16,hideBackdrop:v=!1,ModalProps:{BackdropProps:x}={},onClose:w,open:A=!1,PaperProps:S={},SlideProps:E,TransitionComponent:O=y,transitionDuration:L=c,variant:I="temporary"}=n,z=(0,r.A)(n.ModalProps,T),N=(0,r.A)(n,k),F=a.useRef(!1);a.useEffect((()=>{F.current=!0}),[]);const B=function(e,t){return"rtl"===e.direction&&function(e){return-1!==["left","right"].indexOf(e)}(t)?P[t]:t}(l,u),j=u,U=(0,i.A)({},n,{anchor:j,elevation:g,open:A,variant:I},N),V=(e=>{const{classes:t,anchor:n,variant:r}=e,i={root:["root"],docked:[("permanent"===r||"persistent"===r)&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${(0,b.A)(n)}`,"temporary"!==r&&`paperAnchorDocked${(0,b.A)(n)}`]};return(0,s.A)(i,M,t)})(U),H=(0,m.jsx)(R,(0,i.A)({elevation:"temporary"===I?g:0,square:!0},S,{className:(0,o.A)(V.paper,S.className),ownerState:U,children:f}));if("permanent"===I)return(0,m.jsx)(D,(0,i.A)({className:(0,o.A)(V.root,V.docked,p),ownerState:U,ref:t},N,{children:H}));const W=(0,m.jsx)(O,(0,i.A)({in:A,direction:P[B],timeout:L,appear:F.current},E,{children:H}));return"persistent"===I?(0,m.jsx)(D,(0,i.A)({className:(0,o.A)(V.root,V.docked,p),ownerState:U,ref:t},N,{children:W})):(0,m.jsx)(C,(0,i.A)({BackdropProps:(0,i.A)({},d,x,{transitionDuration:L}),className:(0,o.A)(V.root,V.modal,p),open:A,ownerState:U,onClose:w,hideBackdrop:v,ref:t},N,z,{children:W}))}))},57191:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var r=n(58168),i=n(98587),a=n(9950),o=n(67279),s=n(14857),l=n(70576),c=n(31506),u=n(44414);const d=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],h={entering:{opacity:1},entered:{opacity:1}},f=a.forwardRef((function(e,t){const n=(0,s.A)(),f={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:p,appear:m=!0,children:g,easing:v,in:y,onEnter:x,onEntered:b,onEntering:_,onExit:w,onExited:A,onExiting:S,style:M,timeout:T=f,TransitionComponent:k=o.Ay}=e,E=(0,i.A)(e,d),C=a.useRef(null),D=(0,c.A)(C,g.ref,t),R=e=>t=>{if(e){const n=C.current;void 0===t?e(n):e(n,t)}},P=R(_),O=R(((e,t)=>{(0,l.q)(e);const r=(0,l.c)({style:M,timeout:T,easing:v},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),x&&x(e,t)})),L=R(b),I=R(S),z=R((e=>{const t=(0,l.c)({style:M,timeout:T,easing:v},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),w&&w(e)})),N=R(A);return(0,u.jsx)(k,(0,r.A)({appear:m,in:y,nodeRef:C,onEnter:O,onEntered:L,onEntering:P,onExit:z,onExited:N,onExiting:I,addEndListener:e=>{p&&p(C.current,e)},timeout:T},E,{children:(e,t)=>a.cloneElement(g,(0,r.A)({style:(0,r.A)({opacity:0,visibility:"exited"!==e||y?void 0:"hidden"},h[e],M,g.props.style),ref:D},t))}))}))},85685:(e,t,n)=>{"use strict";n.d(t,{A:()=>v});var r=n(98587),i=n(58168),a=n(9950),o=n(9034),s=n(88465),l=n(19773),c=n(59254),u=n(48283),d=n(22797),h=n(44414);const f=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],p=(0,c.Ay)(l.Sh,{shouldForwardProp:e=>(0,c.ep)(e)||"classes"===e,name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...(0,l.WC)(e,t),!n.disableUnderline&&t.underline]}})((e=>{let{theme:t,ownerState:n}=e;var r;const a="light"===t.palette.mode,o=a?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",s=a?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",l=a?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",c=a?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return(0,i.A)({position:"relative",backgroundColor:t.vars?t.vars.palette.FilledInput.bg:s,borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),"&:hover":{backgroundColor:t.vars?t.vars.palette.FilledInput.hoverBg:l,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:s}},[`&.${d.A.focused}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:s},[`&.${d.A.disabled}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.disabledBg:c}},!n.disableUnderline&&{"&:after":{borderBottom:`2px solid ${null==(r=(t.vars||t).palette[n.color||"primary"])?void 0:r.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${d.A.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${d.A.error}`]:{"&:before, &:after":{borderBottomColor:(t.vars||t).palette.error.main}},"&:before":{borderBottom:`1px solid ${t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`:o}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${d.A.disabled}, .${d.A.error}):before`]:{borderBottom:`1px solid ${(t.vars||t).palette.text.primary}`},[`&.${d.A.disabled}:before`]:{borderBottomStyle:"dotted"}},n.startAdornment&&{paddingLeft:12},n.endAdornment&&{paddingRight:12},n.multiline&&(0,i.A)({padding:"25px 12px 8px"},"small"===n.size&&{paddingTop:21,paddingBottom:4},n.hiddenLabel&&{paddingTop:16,paddingBottom:17}))})),m=(0,c.Ay)(l.f3,{name:"MuiFilledInput",slot:"Input",overridesResolver:l.Oj})((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===t.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===t.palette.mode?null:"#fff",caretColor:"light"===t.palette.mode?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===n.size&&{paddingTop:21,paddingBottom:4},n.hiddenLabel&&{paddingTop:16,paddingBottom:17},n.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0},n.startAdornment&&{paddingLeft:0},n.endAdornment&&{paddingRight:0},n.hiddenLabel&&"small"===n.size&&{paddingTop:8,paddingBottom:9})})),g=a.forwardRef((function(e,t){var n,a,c,g;const v=(0,u.A)({props:e,name:"MuiFilledInput"}),{components:y={},componentsProps:x,fullWidth:b=!1,inputComponent:_="input",multiline:w=!1,slotProps:A,slots:S={},type:M="text"}=v,T=(0,r.A)(v,f),k=(0,i.A)({},v,{fullWidth:b,inputComponent:_,multiline:w,type:M}),E=(e=>{const{classes:t,disableUnderline:n}=e,r={root:["root",!n&&"underline"],input:["input"]},a=(0,s.A)(r,d.N,t);return(0,i.A)({},t,a)})(v),C={root:{ownerState:k},input:{ownerState:k}},D=(null!=A?A:x)?(0,o.A)(null!=A?A:x,C):C,R=null!=(n=null!=(a=S.root)?a:y.Root)?n:p,P=null!=(c=null!=(g=S.input)?g:y.Input)?c:m;return(0,h.jsx)(l.Ay,(0,i.A)({slots:{root:R,input:P},componentsProps:D,fullWidth:b,inputComponent:_,multiline:w,ref:t,type:M},T,{classes:E}))}));g.muiName="Input";const v=g},22797:(e,t,n)=>{"use strict";n.d(t,{A:()=>l,N:()=>s});var r=n(58168),i=n(1763),a=n(423),o=n(63589);function s(e){return(0,a.A)("MuiFilledInput",e)}const l=(0,r.A)({},o.A,(0,i.A)("MuiFilledInput",["root","underline","input"]))},25979:(e,t,n)=>{"use strict";n.d(t,{A:()=>b});var r=n(98587),i=n(58168),a=n(9950),o=n(2803),s=n(88465),l=n(48283),c=n(59254),u=n(43317),d=n(61676),h=n(10834),f=n(15866),p=n(1763),m=n(423);function g(e){return(0,m.A)("MuiFormControl",e)}(0,p.A)("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);var v=n(44414);const y=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],x=(0,c.Ay)("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return(0,i.A)({},t.root,t[`margin${(0,d.A)(n.margin)}`],n.fullWidth&&t.fullWidth)}})((e=>{let{ownerState:t}=e;return(0,i.A)({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},"normal"===t.margin&&{marginTop:16,marginBottom:8},"dense"===t.margin&&{marginTop:8,marginBottom:4},t.fullWidth&&{width:"100%"})})),b=a.forwardRef((function(e,t){const n=(0,l.A)({props:e,name:"MuiFormControl"}),{children:c,className:p,color:m="primary",component:b="div",disabled:_=!1,error:w=!1,focused:A,fullWidth:S=!1,hiddenLabel:M=!1,margin:T="none",required:k=!1,size:E="medium",variant:C="outlined"}=n,D=(0,r.A)(n,y),R=(0,i.A)({},n,{color:m,component:b,disabled:_,error:w,fullWidth:S,hiddenLabel:M,margin:T,required:k,size:E,variant:C}),P=(e=>{const{classes:t,margin:n,fullWidth:r}=e,i={root:["root","none"!==n&&`margin${(0,d.A)(n)}`,r&&"fullWidth"]};return(0,s.A)(i,g,t)})(R),[O,L]=a.useState((()=>{let e=!1;return c&&a.Children.forEach(c,(t=>{if(!(0,h.A)(t,["Input","Select"]))return;const n=(0,h.A)(t,["Select"])?t.props.input:t;n&&(0,u.gr)(n.props)&&(e=!0)})),e})),[I,z]=a.useState((()=>{let e=!1;return c&&a.Children.forEach(c,(t=>{(0,h.A)(t,["Input","Select"])&&(0,u.lq)(t.props,!0)&&(e=!0)})),e})),[N,F]=a.useState(!1);_&&N&&F(!1);const B=void 0===A||_?N:A;let j;const U=a.useMemo((()=>({adornedStart:O,setAdornedStart:L,color:m,disabled:_,error:w,filled:I,focused:B,fullWidth:S,hiddenLabel:M,size:E,onBlur:()=>{F(!1)},onEmpty:()=>{z(!1)},onFilled:()=>{z(!0)},onFocus:()=>{F(!0)},registerEffect:j,required:k,variant:C})),[O,m,_,w,I,B,S,M,j,k,E,C]);return(0,v.jsx)(f.A.Provider,{value:U,children:(0,v.jsx)(x,(0,i.A)({as:b,ownerState:R,className:(0,o.A)(P.root,p),ref:t},D,{children:c}))})}))},15866:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(9950).createContext(void 0)},68624:(e,t,n)=>{"use strict";function r(e){let{props:t,states:n,muiFormControl:r}=e;return n.reduce(((e,n)=>(e[n]=t[n],r&&"undefined"===typeof t[n]&&(e[n]=r[n]),e)),{})}n.d(t,{A:()=>r})},39766:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(9950),i=n(15866);function a(){return r.useContext(i.A)}},16497:(e,t,n)=>{"use strict";n.d(t,{A:()=>_});var r=n(98587),i=n(58168),a=n(9950),o=n(2803),s=n(88465),l=n(39766),c=n(82053),u=n(61676),d=n(59254),h=n(48283),f=n(1763),p=n(423);function m(e){return(0,p.A)("MuiFormControlLabel",e)}const g=(0,f.A)("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error"]);var v=n(68624),y=n(44414);const x=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","slotProps","value"],b=(0,d.Ay)("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${g.label}`]:t.label},t.root,t[`labelPlacement${(0,u.A)(n.labelPlacement)}`]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${g.disabled}`]:{cursor:"default"}},"start"===n.labelPlacement&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},"top"===n.labelPlacement&&{flexDirection:"column-reverse",marginLeft:16},"bottom"===n.labelPlacement&&{flexDirection:"column",marginLeft:16},{[`& .${g.label}`]:{[`&.${g.disabled}`]:{color:(t.vars||t).palette.text.disabled}}})})),_=a.forwardRef((function(e,t){var n;const d=(0,h.A)({props:e,name:"MuiFormControlLabel"}),{className:f,componentsProps:p={},control:g,disabled:_,disableTypography:w,label:A,labelPlacement:S="end",slotProps:M={}}=d,T=(0,r.A)(d,x),k=(0,l.A)();let E=_;"undefined"===typeof E&&"undefined"!==typeof g.props.disabled&&(E=g.props.disabled),"undefined"===typeof E&&k&&(E=k.disabled);const C={disabled:E};["checked","name","onChange","value","inputRef"].forEach((e=>{"undefined"===typeof g.props[e]&&"undefined"!==typeof d[e]&&(C[e]=d[e])}));const D=(0,v.A)({props:d,muiFormControl:k,states:["error"]}),R=(0,i.A)({},d,{disabled:E,labelPlacement:S,error:D.error}),P=(e=>{const{classes:t,disabled:n,labelPlacement:r,error:i}=e,a={root:["root",n&&"disabled",`labelPlacement${(0,u.A)(r)}`,i&&"error"],label:["label",n&&"disabled"]};return(0,s.A)(a,m,t)})(R),O=null!=(n=M.typography)?n:p.typography;let L=A;return null==L||L.type===c.A||w||(L=(0,y.jsx)(c.A,(0,i.A)({component:"span"},O,{className:(0,o.A)(P.label,null==O?void 0:O.className),children:L}))),(0,y.jsxs)(b,(0,i.A)({className:(0,o.A)(P.root,f),ownerState:R,ref:t},T,{children:[a.cloneElement(g,C),L]}))}))},11451:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(58168),i=(n(9950),n(88283)),a=n(44414);function o(e){const{styles:t,defaultTheme:n={}}=e,r="function"===typeof t?e=>{return t(void 0===(r=e)||null===r||0===Object.keys(r).length?n:e);var r}:t;return(0,a.jsx)(i.mL,{styles:r})}var s=n(60195);const l=function(e){return(0,a.jsx)(o,(0,r.A)({},e,{defaultTheme:s.A}))}},60899:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>T});var r=n(98587),i=n(58168),a=n(9950),o=n(2803),s=n(28286),l=n(80237),c=n(88465),u=n(59254),d=n(48283),h=n(14857);const f=a.createContext();var p=n(1763),m=n(423);function g(e){return(0,m.A)("MuiGrid",e)}const v=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],y=(0,p.A)("MuiGrid",["root","container","item","zeroMinWidth",...[0,1,2,3,4,5,6,7,8,9,10].map((e=>`spacing-xs-${e}`)),...["column-reverse","column","row-reverse","row"].map((e=>`direction-xs-${e}`)),...["nowrap","wrap-reverse","wrap"].map((e=>`wrap-xs-${e}`)),...v.map((e=>`grid-xs-${e}`)),...v.map((e=>`grid-sm-${e}`)),...v.map((e=>`grid-md-${e}`)),...v.map((e=>`grid-lg-${e}`)),...v.map((e=>`grid-xl-${e}`))]);var x=n(44414);const b=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function _(e){const t=parseFloat(e);return`${t}${String(e).replace(String(t),"")||"px"}`}function w(e){let{breakpoints:t,values:n}=e,r="";Object.keys(n).forEach((e=>{""===r&&0!==n[e]&&(r=e)}));const i=Object.keys(t).sort(((e,n)=>t[e]-t[n]));return i.slice(0,i.indexOf(r))}const A=(0,u.Ay)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{container:r,direction:i,item:a,spacing:o,wrap:s,zeroMinWidth:l,breakpoints:c}=n;let u=[];r&&(u=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e||e<=0)return[];if("string"===typeof e&&!Number.isNaN(Number(e))||"number"===typeof e)return[n[`spacing-xs-${String(e)}`]];const r=[];return t.forEach((t=>{const i=e[t];Number(i)>0&&r.push(n[`spacing-${t}-${String(i)}`])})),r}(o,c,t));const d=[];return c.forEach((e=>{const r=n[e];r&&d.push(t[`grid-${e}-${String(r)}`])})),[t.root,r&&t.container,a&&t.item,l&&t.zeroMinWidth,...u,"row"!==i&&t[`direction-xs-${String(i)}`],"wrap"!==s&&t[`wrap-xs-${String(s)}`],...d]}})((e=>{let{ownerState:t}=e;return(0,i.A)({boxSizing:"border-box"},t.container&&{display:"flex",flexWrap:"wrap",width:"100%"},t.item&&{margin:0},t.zeroMinWidth&&{minWidth:0},"wrap"!==t.wrap&&{flexWrap:t.wrap})}),(function(e){let{theme:t,ownerState:n}=e;const r=(0,s.kW)({values:n.direction,breakpoints:t.breakpoints.values});return(0,s.NI)({theme:t},r,(e=>{const t={flexDirection:e};return 0===e.indexOf("column")&&(t[`& > .${y.item}`]={maxWidth:"none"}),t}))}),(function(e){let{theme:t,ownerState:n}=e;const{container:r,rowSpacing:i}=n;let a={};if(r&&0!==i){const e=(0,s.kW)({values:i,breakpoints:t.breakpoints.values});let n;"object"===typeof e&&(n=w({breakpoints:t.breakpoints.values,values:e})),a=(0,s.NI)({theme:t},e,((e,r)=>{var i;const a=t.spacing(e);return"0px"!==a?{marginTop:`-${_(a)}`,[`& > .${y.item}`]:{paddingTop:_(a)}}:null!=(i=n)&&i.includes(r)?{}:{marginTop:0,[`& > .${y.item}`]:{paddingTop:0}}}))}return a}),(function(e){let{theme:t,ownerState:n}=e;const{container:r,columnSpacing:i}=n;let a={};if(r&&0!==i){const e=(0,s.kW)({values:i,breakpoints:t.breakpoints.values});let n;"object"===typeof e&&(n=w({breakpoints:t.breakpoints.values,values:e})),a=(0,s.NI)({theme:t},e,((e,r)=>{var i;const a=t.spacing(e);return"0px"!==a?{width:`calc(100% + ${_(a)})`,marginLeft:`-${_(a)}`,[`& > .${y.item}`]:{paddingLeft:_(a)}}:null!=(i=n)&&i.includes(r)?{}:{width:"100%",marginLeft:0,[`& > .${y.item}`]:{paddingLeft:0}}}))}return a}),(function(e){let t,{theme:n,ownerState:r}=e;return n.breakpoints.keys.reduce(((e,a)=>{let o={};if(r[a]&&(t=r[a]),!t)return e;if(!0===t)o={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===t)o={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const l=(0,s.kW)({values:r.columns,breakpoints:n.breakpoints.values}),c="object"===typeof l?l[a]:l;if(void 0===c||null===c)return e;const u=Math.round(t/c*1e8)/1e6+"%";let d={};if(r.container&&r.item&&0!==r.columnSpacing){const e=n.spacing(r.columnSpacing);if("0px"!==e){const t=`calc(${u} + ${_(e)})`;d={flexBasis:t,maxWidth:t}}}o=(0,i.A)({flexBasis:u,flexGrow:0,maxWidth:u},d)}return 0===n.breakpoints.values[a]?Object.assign(e,o):e[n.breakpoints.up(a)]=o,e}),{})}));const S=e=>{const{classes:t,container:n,direction:r,item:i,spacing:a,wrap:o,zeroMinWidth:s,breakpoints:l}=e;let u=[];n&&(u=function(e,t){if(!e||e<=0)return[];if("string"===typeof e&&!Number.isNaN(Number(e))||"number"===typeof e)return[`spacing-xs-${String(e)}`];const n=[];return t.forEach((t=>{const r=e[t];if(Number(r)>0){const e=`spacing-${t}-${String(r)}`;n.push(e)}})),n}(a,l));const d=[];l.forEach((t=>{const n=e[t];n&&d.push(`grid-${t}-${String(n)}`)}));const h={root:["root",n&&"container",i&&"item",s&&"zeroMinWidth",...u,"row"!==r&&`direction-xs-${String(r)}`,"wrap"!==o&&`wrap-xs-${String(o)}`,...d]};return(0,c.A)(h,g,t)},M=a.forwardRef((function(e,t){const n=(0,d.A)({props:e,name:"MuiGrid"}),{breakpoints:s}=(0,h.A)(),c=(0,l.A)(n),{className:u,columns:p,columnSpacing:m,component:g="div",container:v=!1,direction:y="row",item:_=!1,rowSpacing:w,spacing:M=0,wrap:T="wrap",zeroMinWidth:k=!1}=c,E=(0,r.A)(c,b),C=w||M,D=m||M,R=a.useContext(f),P=v?p||12:R,O={},L=(0,i.A)({},E);s.keys.forEach((e=>{null!=E[e]&&(O[e]=E[e],delete L[e])}));const I=(0,i.A)({},c,{columns:P,container:v,direction:y,item:_,rowSpacing:C,columnSpacing:D,wrap:T,zeroMinWidth:k,spacing:M},O,{breakpoints:s.keys}),z=S(I);return(0,x.jsx)(f.Provider,{value:P,children:(0,x.jsx)(A,(0,i.A)({ownerState:I,className:(0,o.A)(z.root,u),as:g,ref:t},L))})}));const T=M},40165:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});var r=n(58168),i=n(98587),a=n(9950),o=n(67279),s=n(14857),l=n(70576),c=n(31506),u=n(44414);const d=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function h(e){return`scale(${e}, ${e**2})`}const f={entering:{opacity:1,transform:h(1)},entered:{opacity:1,transform:"none"}},p="undefined"!==typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),m=a.forwardRef((function(e,t){const{addEndListener:n,appear:m=!0,children:g,easing:v,in:y,onEnter:x,onEntered:b,onEntering:_,onExit:w,onExited:A,onExiting:S,style:M,timeout:T="auto",TransitionComponent:k=o.Ay}=e,E=(0,i.A)(e,d),C=a.useRef(),D=a.useRef(),R=(0,s.A)(),P=a.useRef(null),O=(0,c.A)(P,g.ref,t),L=e=>t=>{if(e){const n=P.current;void 0===t?e(n):e(n,t)}},I=L(_),z=L(((e,t)=>{(0,l.q)(e);const{duration:n,delay:r,easing:i}=(0,l.c)({style:M,timeout:T,easing:v},{mode:"enter"});let a;"auto"===T?(a=R.transitions.getAutoHeightDuration(e.clientHeight),D.current=a):a=n,e.style.transition=[R.transitions.create("opacity",{duration:a,delay:r}),R.transitions.create("transform",{duration:p?a:.666*a,delay:r,easing:i})].join(","),x&&x(e,t)})),N=L(b),F=L(S),B=L((e=>{const{duration:t,delay:n,easing:r}=(0,l.c)({style:M,timeout:T,easing:v},{mode:"exit"});let i;"auto"===T?(i=R.transitions.getAutoHeightDuration(e.clientHeight),D.current=i):i=t,e.style.transition=[R.transitions.create("opacity",{duration:i,delay:n}),R.transitions.create("transform",{duration:p?i:.666*i,delay:p?n:n||.333*i,easing:r})].join(","),e.style.opacity=0,e.style.transform=h(.75),w&&w(e)})),j=L(A);return a.useEffect((()=>()=>{clearTimeout(C.current)}),[]),(0,u.jsx)(k,(0,r.A)({appear:m,in:y,nodeRef:P,onEnter:z,onEntered:N,onEntering:I,onExit:B,onExited:j,onExiting:F,addEndListener:e=>{"auto"===T&&(C.current=setTimeout(e,D.current||0)),n&&n(P.current,e)},timeout:"auto"===T?null:T},E,{children:(e,t)=>a.cloneElement(g,(0,r.A)({style:(0,r.A)({opacity:0,transform:h(.75),visibility:"exited"!==e||y?void 0:"hidden"},f[e],M,g.props.style),ref:O},t))}))}));m.muiSupportAuto=!0;const g=m},4919:(e,t,n)=>{"use strict";n.d(t,{A:()=>y});var r=n(58168),i=n(98587),a=n(9950),o=n(2803),s=n(88465),l=n(59254),c=n(48283),u=n(61676),d=n(1763),h=n(423);function f(e){return(0,h.A)("MuiIcon",e)}(0,d.A)("MuiIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var p=n(44414);const m=["baseClassName","className","color","component","fontSize"],g=(0,l.Ay)("span",{name:"MuiIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${(0,u.A)(n.color)}`],t[`fontSize${(0,u.A)(n.fontSize)}`]]}})((e=>{let{theme:t,ownerState:n}=e;return{userSelect:"none",width:"1em",height:"1em",overflow:"hidden",display:"inline-block",textAlign:"center",flexShrink:0,fontSize:{inherit:"inherit",small:t.typography.pxToRem(20),medium:t.typography.pxToRem(24),large:t.typography.pxToRem(36)}[n.fontSize],color:{primary:(t.vars||t).palette.primary.main,secondary:(t.vars||t).palette.secondary.main,info:(t.vars||t).palette.info.main,success:(t.vars||t).palette.success.main,warning:(t.vars||t).palette.warning.main,action:(t.vars||t).palette.action.active,error:(t.vars||t).palette.error.main,disabled:(t.vars||t).palette.action.disabled,inherit:void 0}[n.color]}})),v=a.forwardRef((function(e,t){const n=(0,c.A)({props:e,name:"MuiIcon"}),{baseClassName:a="material-icons",className:l,color:d="inherit",component:h="span",fontSize:v="medium"}=n,y=(0,i.A)(n,m),x=(0,r.A)({},n,{baseClassName:a,color:d,component:h,fontSize:v}),b=(e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root","inherit"!==t&&`color${(0,u.A)(t)}`,`fontSize${(0,u.A)(n)}`]};return(0,s.A)(i,f,r)})(x);return(0,p.jsx)(g,(0,r.A)({as:h,className:(0,o.A)(a,"notranslate",b.root,l),ownerState:x,"aria-hidden":!0,ref:t},y))}));v.muiName="Icon";const y=v},25333:(e,t,n)=>{"use strict";n.d(t,{A:()=>b});var r=n(98587),i=n(58168),a=n(9950),o=n(2803),s=n(88465),l=n(97497),c=n(59254),u=n(48283),d=n(24184),h=n(61676),f=n(1763),p=n(423);function m(e){return(0,p.A)("MuiIconButton",e)}const g=(0,f.A)("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]);var v=n(44414);const y=["edge","children","className","color","disabled","disableFocusRipple","size"],x=(0,c.Ay)(d.A,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"default"!==n.color&&t[`color${(0,h.A)(n.color)}`],n.edge&&t[`edge${(0,h.A)(n.edge)}`],t[`size${(0,h.A)(n.size)}`]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(t.vars||t).palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest})},!n.disableRipple&&{"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,l.X4)(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"start"===n.edge&&{marginLeft:"small"===n.size?-3:-12},"end"===n.edge&&{marginRight:"small"===n.size?-3:-12})}),(e=>{let{theme:t,ownerState:n}=e;var r;const a=null==(r=(t.vars||t).palette)?void 0:r[n.color];return(0,i.A)({},"inherit"===n.color&&{color:"inherit"},"inherit"!==n.color&&"default"!==n.color&&(0,i.A)({color:null==a?void 0:a.main},!n.disableRipple&&{"&:hover":(0,i.A)({},a&&{backgroundColor:t.vars?`rgba(${a.mainChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,l.X4)(a.main,t.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),"small"===n.size&&{padding:5,fontSize:t.typography.pxToRem(18)},"large"===n.size&&{padding:12,fontSize:t.typography.pxToRem(28)},{[`&.${g.disabled}`]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled}})})),b=a.forwardRef((function(e,t){const n=(0,u.A)({props:e,name:"MuiIconButton"}),{edge:a=!1,children:l,className:c,color:d="default",disabled:f=!1,disableFocusRipple:p=!1,size:g="medium"}=n,b=(0,r.A)(n,y),_=(0,i.A)({},n,{edge:a,color:d,disabled:f,disableFocusRipple:p,size:g}),w=(e=>{const{classes:t,disabled:n,color:r,edge:i,size:a}=e,o={root:["root",n&&"disabled","default"!==r&&`color${(0,h.A)(r)}`,i&&`edge${(0,h.A)(i)}`,`size${(0,h.A)(a)}`]};return(0,s.A)(o,m,t)})(_);return(0,v.jsx)(x,(0,i.A)({className:(0,o.A)(w.root,c),centerRipple:!0,focusRipple:!p,disabled:f,ref:t,ownerState:_},b,{children:l}))}))},82321:(e,t,n)=>{"use strict";n.d(t,{A:()=>v});var r=n(98587),i=n(58168),a=n(9950),o=n(88465),s=n(9034),l=n(19773),c=n(59254),u=n(48283),d=n(10465),h=n(44414);const f=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],p=(0,c.Ay)(l.Sh,{shouldForwardProp:e=>(0,c.ep)(e)||"classes"===e,name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...(0,l.WC)(e,t),!n.disableUnderline&&t.underline]}})((e=>{let{theme:t,ownerState:n}=e;let r="light"===t.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(r=`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`),(0,i.A)({position:"relative"},n.formControl&&{"label + &":{marginTop:16}},!n.disableUnderline&&{"&:after":{borderBottom:`2px solid ${(t.vars||t).palette[n.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${d.A.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${d.A.error}`]:{"&:before, &:after":{borderBottomColor:(t.vars||t).palette.error.main}},"&:before":{borderBottom:`1px solid ${r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${d.A.disabled}, .${d.A.error}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${d.A.disabled}:before`]:{borderBottomStyle:"dotted"}})})),m=(0,c.Ay)(l.f3,{name:"MuiInput",slot:"Input",overridesResolver:l.Oj})({}),g=a.forwardRef((function(e,t){var n,a,c,g;const v=(0,u.A)({props:e,name:"MuiInput"}),{disableUnderline:y,components:x={},componentsProps:b,fullWidth:_=!1,inputComponent:w="input",multiline:A=!1,slotProps:S,slots:M={},type:T="text"}=v,k=(0,r.A)(v,f),E=(e=>{const{classes:t,disableUnderline:n}=e,r={root:["root",!n&&"underline"],input:["input"]},a=(0,o.A)(r,d.B,t);return(0,i.A)({},t,a)})(v),C={root:{ownerState:{disableUnderline:y}}},D=(null!=S?S:b)?(0,s.A)(null!=S?S:b,C):C,R=null!=(n=null!=(a=M.root)?a:x.Root)?n:p,P=null!=(c=null!=(g=M.input)?g:x.Input)?c:m;return(0,h.jsx)(l.Ay,(0,i.A)({slots:{root:R,input:P},slotProps:D,fullWidth:_,inputComponent:w,multiline:A,ref:t,type:T},k,{classes:E}))}));g.muiName="Input";const v=g},10465:(e,t,n)=>{"use strict";n.d(t,{A:()=>l,B:()=>s});var r=n(58168),i=n(1763),a=n(423),o=n(63589);function s(e){return(0,a.A)("MuiInput",e)}const l=(0,r.A)({},o.A,(0,i.A)("MuiInput",["root","underline","input"]))},19773:(e,t,n)=>{"use strict";n.d(t,{f3:()=>z,Sh:()=>I,Ay:()=>F,Oj:()=>L,WC:()=>O});var r=n(98587),i=n(58168),a=n(9753),o=n(9950),s=n(2803),l=n(88465),c=n(17119),u=n(28866),d=n(66459),h=n(11721),f=n(91700),p=n(44414);const m=["onChange","maxRows","minRows","style","value"];function g(e,t){return parseInt(e[t],10)||0}const v={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};function y(e){return void 0===e||null===e||0===Object.keys(e).length}const x=o.forwardRef((function(e,t){const{onChange:n,maxRows:a,minRows:s=1,style:l,value:x}=e,b=(0,r.A)(e,m),{current:_}=o.useRef(null!=x),w=o.useRef(null),A=(0,u.A)(t,w),S=o.useRef(null),M=o.useRef(0),[T,k]=o.useState({}),E=o.useCallback((()=>{const t=w.current,n=(0,d.A)(t).getComputedStyle(t);if("0px"===n.width)return{};const r=S.current;r.style.width=n.width,r.value=t.value||e.placeholder||"x","\n"===r.value.slice(-1)&&(r.value+=" ");const i=n["box-sizing"],o=g(n,"padding-bottom")+g(n,"padding-top"),l=g(n,"border-bottom-width")+g(n,"border-top-width"),c=r.scrollHeight;r.value="x";const u=r.scrollHeight;let h=c;s&&(h=Math.max(Number(s)*u,h)),a&&(h=Math.min(Number(a)*u,h)),h=Math.max(h,u);return{outerHeightStyle:h+("border-box"===i?o+l:0),overflow:Math.abs(h-c)<=1}}),[a,s,e.placeholder]),C=(e,t)=>{const{outerHeightStyle:n,overflow:r}=t;return M.current<20&&(n>0&&Math.abs((e.outerHeightStyle||0)-n)>1||e.overflow!==r)?(M.current+=1,{overflow:r,outerHeightStyle:n}):e},D=o.useCallback((()=>{const e=E();y(e)||k((t=>C(t,e)))}),[E]);o.useEffect((()=>{const e=(0,h.A)((()=>{M.current=0,w.current&&(()=>{const e=E();y(e)||(0,c.flushSync)((()=>{k((t=>C(t,e)))}))})()})),t=(0,d.A)(w.current);let n;return t.addEventListener("resize",e),"undefined"!==typeof ResizeObserver&&(n=new ResizeObserver(e),n.observe(w.current)),()=>{e.clear(),t.removeEventListener("resize",e),n&&n.disconnect()}})),(0,f.A)((()=>{D()})),o.useEffect((()=>{M.current=0}),[x]);return(0,p.jsxs)(o.Fragment,{children:[(0,p.jsx)("textarea",(0,i.A)({value:x,onChange:e=>{M.current=0,_||D(),n&&n(e)},ref:A,rows:s,style:(0,i.A)({height:T.outerHeightStyle,overflow:T.overflow?"hidden":null},l)},b)),(0,p.jsx)("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:S,tabIndex:-1,style:(0,i.A)({},v,l,{padding:0})})]})}));var b=n(74445),_=n(68624),w=n(15866),A=n(39766),S=n(59254),M=n(48283),T=n(61676),k=n(31506),E=n(79044),C=n(11451),D=n(43317),R=n(63589);const P=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],O=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,"small"===n.size&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${(0,T.A)(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},L=(e,t)=>{const{ownerState:n}=e;return[t.input,"small"===n.size&&t.inputSizeSmall,n.multiline&&t.inputMultiline,"search"===n.type&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},I=(0,S.Ay)("div",{name:"MuiInputBase",slot:"Root",overridesResolver:O})((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({},t.typography.body1,{color:(t.vars||t).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${R.A.disabled}`]:{color:(t.vars||t).palette.text.disabled,cursor:"default"}},n.multiline&&(0,i.A)({padding:"4px 0 5px"},"small"===n.size&&{paddingTop:1}),n.fullWidth&&{width:"100%"})})),z=(0,S.Ay)("input",{name:"MuiInputBase",slot:"Input",overridesResolver:L})((e=>{let{theme:t,ownerState:n}=e;const r="light"===t.palette.mode,a=(0,i.A)({color:"currentColor"},t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:r?.42:.5},{transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})}),o={opacity:"0 !important"},s=t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:r?.42:.5};return(0,i.A)({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":a,"&::-moz-placeholder":a,"&:-ms-input-placeholder":a,"&::-ms-input-placeholder":a,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${R.A.formControl} &`]:{"&::-webkit-input-placeholder":o,"&::-moz-placeholder":o,"&:-ms-input-placeholder":o,"&::-ms-input-placeholder":o,"&:focus::-webkit-input-placeholder":s,"&:focus::-moz-placeholder":s,"&:focus:-ms-input-placeholder":s,"&:focus::-ms-input-placeholder":s},[`&.${R.A.disabled}`]:{opacity:1,WebkitTextFillColor:(t.vars||t).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},"small"===n.size&&{paddingTop:1},n.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},"search"===n.type&&{MozAppearance:"textfield"})})),N=(0,p.jsx)(C.A,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),F=o.forwardRef((function(e,t){var n;const c=(0,M.A)({props:e,name:"MuiInputBase"}),{"aria-describedby":u,autoComplete:d,autoFocus:h,className:f,components:m={},componentsProps:g={},defaultValue:v,disabled:y,disableInjectingGlobalStyles:S,endAdornment:C,fullWidth:O=!1,id:L,inputComponent:F="input",inputProps:B={},inputRef:j,maxRows:U,minRows:V,multiline:H=!1,name:W,onBlur:G,onChange:q,onClick:Y,onFocus:$,onKeyDown:X,onKeyUp:Z,placeholder:K,readOnly:J,renderSuffix:Q,rows:ee,slotProps:te={},slots:ne={},startAdornment:re,type:ie="text",value:ae}=c,oe=(0,r.A)(c,P),se=null!=B.value?B.value:ae,{current:le}=o.useRef(null!=se),ce=o.useRef(),ue=o.useCallback((e=>{0}),[]),de=(0,k.A)(ce,j,B.ref,ue),[he,fe]=o.useState(!1),pe=(0,A.A)();const me=(0,_.A)({props:c,muiFormControl:pe,states:["color","disabled","error","hiddenLabel","size","required","filled"]});me.focused=pe?pe.focused:he,o.useEffect((()=>{!pe&&y&&he&&(fe(!1),G&&G())}),[pe,y,he,G]);const ge=pe&&pe.onFilled,ve=pe&&pe.onEmpty,ye=o.useCallback((e=>{(0,D.lq)(e)?ge&&ge():ve&&ve()}),[ge,ve]);(0,E.A)((()=>{le&&ye({value:se})}),[se,ye,le]);o.useEffect((()=>{ye(ce.current)}),[]);let xe=F,be=B;H&&"input"===xe&&(be=ee?(0,i.A)({type:void 0,minRows:ee,maxRows:ee},be):(0,i.A)({type:void 0,maxRows:U,minRows:V},be),xe=x);o.useEffect((()=>{pe&&pe.setAdornedStart(Boolean(re))}),[pe,re]);const _e=(0,i.A)({},c,{color:me.color||"primary",disabled:me.disabled,endAdornment:C,error:me.error,focused:me.focused,formControl:pe,fullWidth:O,hiddenLabel:me.hiddenLabel,multiline:H,size:me.size,startAdornment:re,type:ie}),we=(e=>{const{classes:t,color:n,disabled:r,error:i,endAdornment:a,focused:o,formControl:s,fullWidth:c,hiddenLabel:u,multiline:d,readOnly:h,size:f,startAdornment:p,type:m}=e,g={root:["root",`color${(0,T.A)(n)}`,r&&"disabled",i&&"error",c&&"fullWidth",o&&"focused",s&&"formControl","small"===f&&"sizeSmall",d&&"multiline",p&&"adornedStart",a&&"adornedEnd",u&&"hiddenLabel",h&&"readOnly"],input:["input",r&&"disabled","search"===m&&"inputTypeSearch",d&&"inputMultiline","small"===f&&"inputSizeSmall",u&&"inputHiddenLabel",p&&"inputAdornedStart",a&&"inputAdornedEnd",h&&"readOnly"]};return(0,l.A)(g,R.g,t)})(_e),Ae=ne.root||m.Root||I,Se=te.root||g.root||{},Me=ne.input||m.Input||z;return be=(0,i.A)({},be,null!=(n=te.input)?n:g.input),(0,p.jsxs)(o.Fragment,{children:[!S&&N,(0,p.jsxs)(Ae,(0,i.A)({},Se,!(0,b.A)(Ae)&&{ownerState:(0,i.A)({},_e,Se.ownerState)},{ref:t,onClick:e=>{ce.current&&e.currentTarget===e.target&&ce.current.focus(),Y&&Y(e)}},oe,{className:(0,s.A)(we.root,Se.className,f),children:[re,(0,p.jsx)(w.A.Provider,{value:null,children:(0,p.jsx)(Me,(0,i.A)({ownerState:_e,"aria-invalid":me.error,"aria-describedby":u,autoComplete:d,autoFocus:h,defaultValue:v,disabled:me.disabled,id:L,onAnimationStart:e=>{ye("mui-auto-fill-cancel"===e.animationName?ce.current:{value:"x"})},name:W,placeholder:K,readOnly:J,required:me.required,rows:ee,value:se,onKeyDown:X,onKeyUp:Z,type:ie},be,!(0,b.A)(Me)&&{as:xe,ownerState:(0,i.A)({},_e,be.ownerState)},{ref:de,className:(0,s.A)(we.input,be.className),onBlur:e=>{G&&G(e),B.onBlur&&B.onBlur(e),pe&&pe.onBlur?pe.onBlur(e):fe(!1)},onChange:function(e){if(!le){const t=e.target||ce.current;if(null==t)throw new Error((0,a.A)(1));ye({value:t.value})}for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{me.disabled?e.stopPropagation():($&&$(e),B.onFocus&&B.onFocus(e),pe&&pe.onFocus?pe.onFocus(e):fe(!0))}}))}),C,Q?Q((0,i.A)({},me,{startAdornment:re})):null]}))]})}))},63589:(e,t,n)=>{"use strict";n.d(t,{A:()=>o,g:()=>a});var r=n(1763),i=n(423);function a(e){return(0,i.A)("MuiInputBase",e)}const o=(0,r.A)("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"])},43317:(e,t,n)=>{"use strict";function r(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function i(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&(r(e.value)&&""!==e.value||t&&r(e.defaultValue)&&""!==e.defaultValue)}function a(e){return e.startAdornment}n.d(t,{gr:()=>a,lq:()=>i})},3788:(e,t,n)=>{"use strict";n.d(t,{A:()=>M});var r=n(98587),i=n(58168),a=n(9950),o=n(88465),s=n(2803),l=n(68624),c=n(39766),u=n(61676),d=n(48283),h=n(59254),f=n(1763),p=n(423);function m(e){return(0,p.A)("MuiFormLabel",e)}const g=(0,f.A)("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]);var v=n(44414);const y=["children","className","color","component","disabled","error","filled","focused","required"],x=(0,h.Ay)("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return(0,i.A)({},t.root,"secondary"===n.color&&t.colorSecondary,n.filled&&t.filled)}})((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({color:(t.vars||t).palette.text.secondary},t.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${g.focused}`]:{color:(t.vars||t).palette[n.color].main},[`&.${g.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${g.error}`]:{color:(t.vars||t).palette.error.main}})})),b=(0,h.Ay)("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})((e=>{let{theme:t}=e;return{[`&.${g.error}`]:{color:(t.vars||t).palette.error.main}}})),_=a.forwardRef((function(e,t){const n=(0,d.A)({props:e,name:"MuiFormLabel"}),{children:a,className:h,component:f="label"}=n,p=(0,r.A)(n,y),g=(0,c.A)(),_=(0,l.A)({props:n,muiFormControl:g,states:["color","required","focused","disabled","error","filled"]}),w=(0,i.A)({},n,{color:_.color||"primary",component:f,disabled:_.disabled,error:_.error,filled:_.filled,focused:_.focused,required:_.required}),A=(e=>{const{classes:t,color:n,focused:r,disabled:i,error:a,filled:s,required:l}=e,c={root:["root",`color${(0,u.A)(n)}`,i&&"disabled",a&&"error",s&&"filled",r&&"focused",l&&"required"],asterisk:["asterisk",a&&"error"]};return(0,o.A)(c,m,t)})(w);return(0,v.jsxs)(x,(0,i.A)({as:f,ownerState:w,className:(0,s.A)(A.root,h),ref:t},p,{children:[a,_.required&&(0,v.jsxs)(b,{ownerState:w,"aria-hidden":!0,className:A.asterisk,children:["\u2009","*"]})]}))}));function w(e){return(0,p.A)("MuiInputLabel",e)}(0,f.A)("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const A=["disableAnimation","margin","shrink","variant","className"],S=(0,h.Ay)(_,{shouldForwardProp:e=>(0,h.ep)(e)||"classes"===e,name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${g.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,"small"===n.size&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,t[n.variant]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},n.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},"small"===n.size&&{transform:"translate(0, 17px) scale(1)"},n.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!n.disableAnimation&&{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})},"filled"===n.variant&&(0,i.A)({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===n.size&&{transform:"translate(12px, 13px) scale(1)"},n.shrink&&(0,i.A)({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},"small"===n.size&&{transform:"translate(12px, 4px) scale(0.75)"})),"outlined"===n.variant&&(0,i.A)({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===n.size&&{transform:"translate(14px, 9px) scale(1)"},n.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 24px)",transform:"translate(14px, -9px) scale(0.75)"}))})),M=a.forwardRef((function(e,t){const n=(0,d.A)({name:"MuiInputLabel",props:e}),{disableAnimation:a=!1,shrink:u,className:h}=n,f=(0,r.A)(n,A),p=(0,c.A)();let m=u;"undefined"===typeof m&&p&&(m=p.filled||p.focused||p.adornedStart);const g=(0,l.A)({props:n,muiFormControl:p,states:["size","variant","required"]}),y=(0,i.A)({},n,{disableAnimation:a,formControl:p,shrink:m,size:g.size,variant:g.variant,required:g.required}),x=(e=>{const{classes:t,formControl:n,size:r,shrink:a,disableAnimation:s,variant:l,required:c}=e,u={root:["root",n&&"formControl",!s&&"animated",a&&"shrink","small"===r&&"sizeSmall",l],asterisk:[c&&"asterisk"]},d=(0,o.A)(u,w,t);return(0,i.A)({},t,d)})(y);return(0,v.jsx)(S,(0,i.A)({"data-shrink":m,ownerState:y,ref:t,className:(0,s.A)(x.root,h)},f,{classes:x}))}))},36080:(e,t,n)=>{"use strict";n.d(t,{A:()=>M});var r=n(98587),i=n(58168),a=n(9950),o=n(2803),s=n(88465),l=n(61676),c=n(59254),u=n(48283),d=n(41573),h=n(31506),f=n(82053),p=n(1763),m=n(423);function g(e){return(0,m.A)("MuiLink",e)}const v=(0,p.A)("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]);var y=n(12703),x=n(97497);const b={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},_=e=>{let{theme:t,ownerState:n}=e;const r=(e=>b[e]||e)(n.color),i=(0,y.Yn)(t,`palette.${r}`,!1)||n.color,a=(0,y.Yn)(t,`palette.${r}Channel`);return"vars"in t&&a?`rgba(${a} / 0.4)`:(0,x.X4)(i,.4)};var w=n(44414);const A=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],S=(0,c.Ay)(f.A,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`underline${(0,l.A)(n.underline)}`],"button"===n.component&&t.button]}})((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({},"none"===n.underline&&{textDecoration:"none"},"hover"===n.underline&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},"always"===n.underline&&(0,i.A)({textDecoration:"underline"},"inherit"!==n.color&&{textDecorationColor:_({theme:t,ownerState:n})},{"&:hover":{textDecorationColor:"inherit"}}),"button"===n.component&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${v.focusVisible}`]:{outline:"auto"}})})),M=a.forwardRef((function(e,t){const n=(0,u.A)({props:e,name:"MuiLink"}),{className:c,color:f="primary",component:p="a",onBlur:m,onFocus:v,TypographyClasses:y,underline:x="always",variant:_="inherit",sx:M}=n,T=(0,r.A)(n,A),{isFocusVisibleRef:k,onBlur:E,onFocus:C,ref:D}=(0,d.A)(),[R,P]=a.useState(!1),O=(0,h.A)(t,D),L=(0,i.A)({},n,{color:f,component:p,focusVisible:R,underline:x,variant:_}),I=(e=>{const{classes:t,component:n,focusVisible:r,underline:i}=e,a={root:["root",`underline${(0,l.A)(i)}`,"button"===n&&"button",r&&"focusVisible"]};return(0,s.A)(a,g,t)})(L);return(0,w.jsx)(S,(0,i.A)({color:f,className:(0,o.A)(I.root,c),classes:y,component:p,onBlur:e=>{E(e),!1===k.current&&P(!1),m&&m(e)},onFocus:e=>{C(e),!0===k.current&&P(!0),v&&v(e)},ref:O,ownerState:L,variant:_,sx:[...Object.keys(b).includes(f)?[]:[{color:f}],...Array.isArray(M)?M:[M]]},T))}))},249:(e,t,n)=>{"use strict";n.d(t,{A:()=>v});var r=n(98587),i=n(58168),a=n(9950),o=n(2803),s=n(88465),l=n(59254),c=n(48283),u=n(13372),d=n(1763),h=n(423);function f(e){return(0,h.A)("MuiList",e)}(0,d.A)("MuiList",["root","padding","dense","subheader"]);var p=n(44414);const m=["children","className","component","dense","disablePadding","subheader"],g=(0,l.Ay)("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})((e=>{let{ownerState:t}=e;return(0,i.A)({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})})),v=a.forwardRef((function(e,t){const n=(0,c.A)({props:e,name:"MuiList"}),{children:l,className:d,component:h="ul",dense:v=!1,disablePadding:y=!1,subheader:x}=n,b=(0,r.A)(n,m),_=a.useMemo((()=>({dense:v})),[v]),w=(0,i.A)({},n,{component:h,dense:v,disablePadding:y}),A=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:i}=e,a={root:["root",!n&&"padding",r&&"dense",i&&"subheader"]};return(0,s.A)(a,f,t)})(w);return(0,p.jsx)(u.A.Provider,{value:_,children:(0,p.jsxs)(g,(0,i.A)({as:h,className:(0,o.A)(A.root,d),ref:t,ownerState:w},b,{children:[x,l]}))})}))},13372:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(9950).createContext({})},32610:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>P});var r=n(98587),i=n(58168),a=n(9950),o=n(2803),s=n(88465),l=n(74445),c=n(97497),u=n(59254),d=n(48283),h=n(24184),f=n(10834),p=n(79044),m=n(31506),g=n(13372),v=n(1763),y=n(423);function x(e){return(0,y.A)("MuiListItem",e)}const b=(0,v.A)("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]);var _=n(19813);function w(e){return(0,y.A)("MuiListItemSecondaryAction",e)}(0,v.A)("MuiListItemSecondaryAction",["root","disableGutters"]);var A=n(44414);const S=["className"],M=(0,u.Ay)("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})((e=>{let{ownerState:t}=e;return(0,i.A)({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},t.disableGutters&&{right:0})})),T=a.forwardRef((function(e,t){const n=(0,d.A)({props:e,name:"MuiListItemSecondaryAction"}),{className:l}=n,c=(0,r.A)(n,S),u=a.useContext(g.A),h=(0,i.A)({},n,{disableGutters:u.disableGutters}),f=(e=>{const{disableGutters:t,classes:n}=e,r={root:["root",t&&"disableGutters"]};return(0,s.A)(r,w,n)})(h);return(0,A.jsx)(M,(0,i.A)({className:(0,o.A)(f.root,l),ownerState:h,ref:t},c))}));T.muiName="ListItemSecondaryAction";const k=T,E=["className"],C=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],D=(0,u.Ay)("div",{name:"MuiListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.button&&t.button,n.hasSecondaryAction&&t.secondaryAction]}})((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!n.disablePadding&&(0,i.A)({paddingTop:8,paddingBottom:8},n.dense&&{paddingTop:4,paddingBottom:4},!n.disableGutters&&{paddingLeft:16,paddingRight:16},!!n.secondaryAction&&{paddingRight:48}),!!n.secondaryAction&&{[`& > .${_.A.root}`]:{paddingRight:48}},{[`&.${b.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${b.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:(0,c.X4)(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${b.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:(0,c.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${b.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},"flex-start"===n.alignItems&&{alignItems:"flex-start"},n.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},n.button&&{transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${b.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:(0,c.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:(0,c.X4)(t.palette.primary.main,t.palette.action.selectedOpacity)}}},n.hasSecondaryAction&&{paddingRight:48})})),R=(0,u.Ay)("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),P=a.forwardRef((function(e,t){const n=(0,d.A)({props:e,name:"MuiListItem"}),{alignItems:c="center",autoFocus:u=!1,button:v=!1,children:y,className:_,component:w,components:S={},componentsProps:M={},ContainerComponent:T="li",ContainerProps:{className:P}={},dense:O=!1,disabled:L=!1,disableGutters:I=!1,disablePadding:z=!1,divider:N=!1,focusVisibleClassName:F,secondaryAction:B,selected:j=!1,slotProps:U={},slots:V={}}=n,H=(0,r.A)(n.ContainerProps,E),W=(0,r.A)(n,C),G=a.useContext(g.A),q=a.useMemo((()=>({dense:O||G.dense||!1,alignItems:c,disableGutters:I})),[c,G.dense,O,I]),Y=a.useRef(null);(0,p.A)((()=>{u&&Y.current&&Y.current.focus()}),[u]);const $=a.Children.toArray(y),X=$.length&&(0,f.A)($[$.length-1],["ListItemSecondaryAction"]),Z=(0,i.A)({},n,{alignItems:c,autoFocus:u,button:v,dense:q.dense,disabled:L,disableGutters:I,disablePadding:z,divider:N,hasSecondaryAction:X,selected:j}),K=(e=>{const{alignItems:t,button:n,classes:r,dense:i,disabled:a,disableGutters:o,disablePadding:l,divider:c,hasSecondaryAction:u,selected:d}=e,h={root:["root",i&&"dense",!o&&"gutters",!l&&"padding",c&&"divider",a&&"disabled",n&&"button","flex-start"===t&&"alignItemsFlexStart",u&&"secondaryAction",d&&"selected"],container:["container"]};return(0,s.A)(h,x,r)})(Z),J=(0,m.A)(Y,t),Q=V.root||S.Root||D,ee=U.root||M.root||{},te=(0,i.A)({className:(0,o.A)(K.root,ee.className,_),disabled:L},W);let ne=w||"li";return v&&(te.component=w||"div",te.focusVisibleClassName=(0,o.A)(b.focusVisible,F),ne=h.A),X?(ne=te.component||w?ne:"div","li"===T&&("li"===ne?ne="div":"li"===te.component&&(te.component="div")),(0,A.jsx)(g.A.Provider,{value:q,children:(0,A.jsxs)(R,(0,i.A)({as:T,className:(0,o.A)(K.container,P),ref:J,ownerState:Z},H,{children:[(0,A.jsx)(Q,(0,i.A)({},ee,!(0,l.A)(Q)&&{as:ne,ownerState:(0,i.A)({},Z,ee.ownerState)},te,{children:$})),$.pop()]}))})):(0,A.jsx)(g.A.Provider,{value:q,children:(0,A.jsxs)(Q,(0,i.A)({},ee,{as:ne,ref:J},!(0,l.A)(Q)&&{ownerState:(0,i.A)({},Z,ee.ownerState)},te,{children:[$,B&&(0,A.jsx)(k,{children:B})]}))})}))},57357:(e,t,n)=>{"use strict";n.d(t,{A:()=>x});var r=n(98587),i=n(58168),a=n(9950),o=n(2803),s=n(88465),l=n(97497),c=n(59254),u=n(48283),d=n(24184),h=n(79044),f=n(31506),p=n(13372),m=n(19813),g=n(44414);const v=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],y=(0,c.Ay)(d.A,{shouldForwardProp:e=>(0,c.ep)(e)||"classes"===e,name:"MuiListItemButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${m.A.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:(0,l.X4)(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${m.A.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:(0,l.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${m.A.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:(0,l.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:(0,l.X4)(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${m.A.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${m.A.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},n.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},"flex-start"===n.alignItems&&{alignItems:"flex-start"},!n.disableGutters&&{paddingLeft:16,paddingRight:16},n.dense&&{paddingTop:4,paddingBottom:4})})),x=a.forwardRef((function(e,t){const n=(0,u.A)({props:e,name:"MuiListItemButton"}),{alignItems:l="center",autoFocus:c=!1,component:d="div",children:x,dense:b=!1,disableGutters:_=!1,divider:w=!1,focusVisibleClassName:A,selected:S=!1,className:M}=n,T=(0,r.A)(n,v),k=a.useContext(p.A),E=a.useMemo((()=>({dense:b||k.dense||!1,alignItems:l,disableGutters:_})),[l,k.dense,b,_]),C=a.useRef(null);(0,h.A)((()=>{c&&C.current&&C.current.focus()}),[c]);const D=(0,i.A)({},n,{alignItems:l,dense:E.dense,disableGutters:_,divider:w,selected:S}),R=(e=>{const{alignItems:t,classes:n,dense:r,disabled:a,disableGutters:o,divider:l,selected:c}=e,u={root:["root",r&&"dense",!o&&"gutters",l&&"divider",a&&"disabled","flex-start"===t&&"alignItemsFlexStart",c&&"selected"]},d=(0,s.A)(u,m.Y,n);return(0,i.A)({},n,d)})(D),P=(0,f.A)(C,t);return(0,g.jsx)(p.A.Provider,{value:E,children:(0,g.jsx)(y,(0,i.A)({ref:P,href:T.href||T.to,component:(T.href||T.to)&&"div"===d?"a":d,focusVisibleClassName:(0,o.A)(R.focusVisible,A),ownerState:D,className:(0,o.A)(R.root,M)},T,{classes:R,children:x}))})}))},19813:(e,t,n)=>{"use strict";n.d(t,{A:()=>o,Y:()=>a});var r=n(1763),i=n(423);function a(e){return(0,i.A)("MuiListItemButton",e)}const o=(0,r.A)("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"])},14195:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});var r=n(98587),i=n(58168),a=n(9950),o=n(2803),s=n(88465),l=n(59254),c=n(48283),u=n(92455),d=n(13372),h=n(44414);const f=["className"],p=(0,l.Ay)("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"flex-start"===n.alignItems&&t.alignItemsFlexStart]}})((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({minWidth:56,color:(t.vars||t).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===n.alignItems&&{marginTop:8})})),m=a.forwardRef((function(e,t){const n=(0,c.A)({props:e,name:"MuiListItemIcon"}),{className:l}=n,m=(0,r.A)(n,f),g=a.useContext(d.A),v=(0,i.A)({},n,{alignItems:g.alignItems}),y=(e=>{const{alignItems:t,classes:n}=e,r={root:["root","flex-start"===t&&"alignItemsFlexStart"]};return(0,s.A)(r,u.f,n)})(v);return(0,h.jsx)(p,(0,i.A)({className:(0,o.A)(y.root,l),ownerState:v,ref:t},m))}))},92455:(e,t,n)=>{"use strict";n.d(t,{A:()=>o,f:()=>a});var r=n(1763),i=n(423);function a(e){return(0,i.A)("MuiListItemIcon",e)}const o=(0,r.A)("MuiListItemIcon",["root","alignItemsFlexStart"])},83563:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});var r=n(98587),i=n(58168),a=n(9950),o=n(2803),s=n(88465),l=n(82053),c=n(13372),u=n(48283),d=n(59254),h=n(88543),f=n(44414);const p=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],m=(0,d.Ay)("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${h.A.primary}`]:t.primary},{[`& .${h.A.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})((e=>{let{ownerState:t}=e;return(0,i.A)({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},t.primary&&t.secondary&&{marginTop:6,marginBottom:6},t.inset&&{paddingLeft:56})})),g=a.forwardRef((function(e,t){const n=(0,u.A)({props:e,name:"MuiListItemText"}),{children:d,className:g,disableTypography:v=!1,inset:y=!1,primary:x,primaryTypographyProps:b,secondary:_,secondaryTypographyProps:w}=n,A=(0,r.A)(n,p),{dense:S}=a.useContext(c.A);let M=null!=x?x:d,T=_;const k=(0,i.A)({},n,{disableTypography:v,inset:y,primary:!!M,secondary:!!T,dense:S}),E=(e=>{const{classes:t,inset:n,primary:r,secondary:i,dense:a}=e,o={root:["root",n&&"inset",a&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]};return(0,s.A)(o,h.b,t)})(k);return null==M||M.type===l.A||v||(M=(0,f.jsx)(l.A,(0,i.A)({variant:S?"body2":"body1",className:E.primary,component:null!=b&&b.variant?void 0:"span",display:"block"},b,{children:M}))),null==T||T.type===l.A||v||(T=(0,f.jsx)(l.A,(0,i.A)({variant:"body2",className:E.secondary,color:"text.secondary",display:"block"},w,{children:T}))),(0,f.jsxs)(m,(0,i.A)({className:(0,o.A)(E.root,g),ownerState:k,ref:t},A,{children:[M,T]}))}))},88543:(e,t,n)=>{"use strict";n.d(t,{A:()=>o,b:()=>a});var r=n(1763),i=n(423);function a(e){return(0,i.A)("MuiListItemText",e)}const o=(0,r.A)("MuiListItemText",["root","multiline","dense","inset","primary","secondary"])},97591:(e,t,n)=>{"use strict";n.d(t,{A:()=>I});var r=n(58168),i=n(98587),a=n(9950),o=(n(26429),n(2803)),s=n(88465),l=n(27402),c=n(249);const u=n(73269).A;var d=n(31506),h=n(79044),f=n(44414);const p=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function m(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function g(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function v(e,t){if(void 0===t)return!0;let n=e.innerText;return void 0===n&&(n=e.textContent),n=n.trim().toLowerCase(),0!==n.length&&(t.repeating?n[0]===t.keys[0]:0===n.indexOf(t.keys.join("")))}function y(e,t,n,r,i,a){let o=!1,s=i(e,t,!!t&&n);for(;s;){if(s===e.firstChild){if(o)return!1;o=!0}const t=!r&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&v(s,a)&&!t)return s.focus(),!0;s=i(e,s,n)}return!1}const x=a.forwardRef((function(e,t){const{actions:n,autoFocus:o=!1,autoFocusItem:s=!1,children:x,className:b,disabledItemsFocusable:_=!1,disableListWrap:w=!1,onKeyDown:A,variant:S="selectedMenu"}=e,M=(0,i.A)(e,p),T=a.useRef(null),k=a.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});(0,h.A)((()=>{o&&T.current.focus()}),[o]),a.useImperativeHandle(n,(()=>({adjustStyleForScrollbar:(e,t)=>{const n=!T.current.style.width;if(e.clientHeight{a.isValidElement(e)&&(e.props.disabled||("selectedMenu"===S&&e.props.selected||-1===C)&&(C=t))}));const D=a.Children.map(x,((e,t)=>{if(t===C){const t={};return s&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===S&&(t.tabIndex=0),a.cloneElement(e,t)}return e}));return(0,f.jsx)(c.A,(0,r.A)({role:"menu",ref:E,className:b,onKeyDown:e=>{const t=T.current,n=e.key,r=(0,l.A)(t).activeElement;if("ArrowDown"===n)e.preventDefault(),y(t,r,w,_,m);else if("ArrowUp"===n)e.preventDefault(),y(t,r,w,_,g);else if("Home"===n)e.preventDefault(),y(t,null,w,_,m);else if("End"===n)e.preventDefault(),y(t,null,w,_,g);else if(1===n.length){const i=k.current,a=n.toLowerCase(),o=performance.now();i.keys.length>0&&(o-i.lastTime>500?(i.keys=[],i.repeating=!0,i.previousKeyMatched=!0):i.repeating&&a!==i.keys[0]&&(i.repeating=!1)),i.lastTime=o,i.keys.push(a);const s=r&&!i.repeating&&v(r,i);i.previousKeyMatched&&(s||y(t,r,!1,_,m,i))?e.preventDefault():i.previousKeyMatched=!1}A&&A(e)},tabIndex:o?0:-1},M,{children:D}))}));var b=n(2235),_=n(72362),w=n(59254),A=n(14857),S=n(48283),M=n(1763),T=n(423);function k(e){return(0,T.A)("MuiMenu",e)}(0,M.A)("MuiMenu",["root","paper","list"]);const E=["onEntering"],C=["autoFocus","children","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant"],D={vertical:"top",horizontal:"right"},R={vertical:"top",horizontal:"left"},P=(0,w.Ay)(_.Ay,{shouldForwardProp:e=>(0,w.ep)(e)||"classes"===e,name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),O=(0,w.Ay)(b.A,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),L=(0,w.Ay)(x,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),I=a.forwardRef((function(e,t){const n=(0,S.A)({props:e,name:"MuiMenu"}),{autoFocus:l=!0,children:c,disableAutoFocusItem:u=!1,MenuListProps:d={},onClose:h,open:p,PaperProps:m={},PopoverClasses:g,transitionDuration:v="auto",TransitionProps:{onEntering:y}={},variant:x="selectedMenu"}=n,b=(0,i.A)(n.TransitionProps,E),_=(0,i.A)(n,C),w=(0,A.A)(),M="rtl"===w.direction,T=(0,r.A)({},n,{autoFocus:l,disableAutoFocusItem:u,MenuListProps:d,onEntering:y,PaperProps:m,transitionDuration:v,TransitionProps:b,variant:x}),I=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"],paper:["paper"],list:["list"]},k,t)})(T),z=l&&!u&&p,N=a.useRef(null);let F=-1;return a.Children.map(c,((e,t)=>{a.isValidElement(e)&&(e.props.disabled||("selectedMenu"===x&&e.props.selected||-1===F)&&(F=t))})),(0,f.jsx)(P,(0,r.A)({onClose:h,anchorOrigin:{vertical:"bottom",horizontal:M?"right":"left"},transformOrigin:M?D:R,PaperProps:(0,r.A)({component:O},m,{classes:(0,r.A)({},m.classes,{root:I.paper})}),className:I.root,open:p,ref:t,transitionDuration:v,TransitionProps:(0,r.A)({onEntering:(e,t)=>{N.current&&N.current.adjustStyleForScrollbar(e,w),y&&y(e,t)}},b),ownerState:T},_,{classes:g,children:(0,f.jsx)(L,(0,r.A)({onKeyDown:e=>{"Tab"===e.key&&(e.preventDefault(),h&&h(e,"tabKeyDown"))},actions:N,autoFocus:l&&(-1===F||u),autoFocusItem:z,variant:x},d,{className:(0,o.A)(I.list,d.className),children:c}))}))}))},23266:(e,t,n)=>{"use strict";n.d(t,{A:()=>M});var r=n(98587),i=n(58168),a=n(9950),o=n(2803),s=n(88465),l=n(97497),c=n(59254),u=n(48283),d=n(13372),h=n(24184),f=n(79044),p=n(31506),m=n(40777),g=n(92455),v=n(88543),y=n(1763),x=n(423);function b(e){return(0,x.A)("MuiMenuItem",e)}const _=(0,y.A)("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]);var w=n(44414);const A=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],S=(0,c.Ay)(h.A,{shouldForwardProp:e=>(0,c.ep)(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({},t.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!n.disableGutters&&{paddingLeft:16,paddingRight:16},n.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${_.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:(0,l.X4)(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${_.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:(0,l.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${_.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:(0,l.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:(0,l.X4)(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${_.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${_.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`& + .${m.A.root}`]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},[`& + .${m.A.inset}`]:{marginLeft:52},[`& .${v.A.root}`]:{marginTop:0,marginBottom:0},[`& .${v.A.inset}`]:{paddingLeft:36},[`& .${g.A.root}`]:{minWidth:36}},!n.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},n.dense&&(0,i.A)({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{[`& .${g.A.root} svg`]:{fontSize:"1.25rem"}}))})),M=a.forwardRef((function(e,t){const n=(0,u.A)({props:e,name:"MuiMenuItem"}),{autoFocus:l=!1,component:c="li",dense:h=!1,divider:m=!1,disableGutters:g=!1,focusVisibleClassName:v,role:y="menuitem",tabIndex:x,className:_}=n,M=(0,r.A)(n,A),T=a.useContext(d.A),k=a.useMemo((()=>({dense:h||T.dense||!1,disableGutters:g})),[T.dense,h,g]),E=a.useRef(null);(0,f.A)((()=>{l&&E.current&&E.current.focus()}),[l]);const C=(0,i.A)({},n,{dense:k.dense,divider:m,disableGutters:g}),D=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:a,selected:o,classes:l}=e,c={root:["root",n&&"dense",t&&"disabled",!a&&"gutters",r&&"divider",o&&"selected"]},u=(0,s.A)(c,b,l);return(0,i.A)({},l,u)})(n),R=(0,p.A)(E,t);let P;return n.disabled||(P=void 0!==x?x:-1),(0,w.jsx)(d.A.Provider,{value:k,children:(0,w.jsx)(S,(0,i.A)({ref:R,role:y,tabIndex:P,component:c,focusVisibleClassName:(0,o.A)(D.focusVisible,v),className:(0,o.A)(D.root,_)},M,{ownerState:C,classes:D}))})}))},53984:(e,t,n)=>{"use strict";n.d(t,{A:()=>z});var r=n(98587),i=n(58168),a=n(9950),o=n(28866),s=n(61786),l=n(81448),c=n(2192),u=n(88465),d=n(5187),h=n(66459),f=n(73269);function p(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function m(e){return parseInt((0,h.A)(e).getComputedStyle(e).paddingRight,10)||0}function g(e,t,n,r,i){const a=[t,n,...r];[].forEach.call(e.children,(e=>{const t=-1===a.indexOf(e),n=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&p(e,i)}))}function v(e,t){let n=-1;return e.some(((e,r)=>!!t(e)&&(n=r,!0))),n}function y(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=(0,s.A)(e);return t.body===e?(0,h.A)(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=(0,f.A)((0,s.A)(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${m(r)+e}px`;const t=(0,s.A)(r).querySelectorAll(".mui-fixed");[].forEach.call(t,(t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${m(t)+e}px`}))}let e;if(r.parentNode instanceof DocumentFragment)e=(0,s.A)(r).body;else{const t=r.parentElement,n=(0,h.A)(r);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach((e=>{let{value:t,el:n,property:r}=e;t?n.style.setProperty(r,t):n.style.removeProperty(r)}))}}var x=n(76493),b=n(1763),_=n(423);function w(e){return(0,_.A)("MuiModal",e)}(0,b.A)("MuiModal",["root","hidden"]);var A=n(73815),S=n(44414);const M=["children","classes","closeAfterTransition","component","container","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onKeyDown","open","onTransitionEnter","onTransitionExited","slotProps","slots"];const T=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&p(e.modalRef,!1);const r=function(e){const t=[];return[].forEach.call(e.children,(e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);g(t,e.mount,e.modalRef,r,!0);const i=v(this.containers,(e=>e.container===t));return-1!==i?(this.containers[i].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=v(this.containers,(t=>-1!==t.modals.indexOf(e))),r=this.containers[n];r.restore||(r.restore=y(r,t))}remove(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=this.modals.indexOf(e);if(-1===n)return n;const r=v(this.containers,(t=>-1!==t.modals.indexOf(e))),i=this.containers[r];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(n,1),0===i.modals.length)i.restore&&i.restore(),e.modalRef&&p(e.modalRef,t),g(i.container,e.mount,e.modalRef,i.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=i.modals[i.modals.length-1];e.modalRef&&p(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}},k=a.forwardRef((function(e,t){var n,h;const{children:f,classes:m,closeAfterTransition:g=!1,component:v,container:y,disableAutoFocus:b=!1,disableEnforceFocus:_=!1,disableEscapeKeyDown:k=!1,disablePortal:E=!1,disableRestoreFocus:C=!1,disableScrollLock:D=!1,hideBackdrop:R=!1,keepMounted:P=!1,manager:O=T,onBackdropClick:L,onClose:I,onKeyDown:z,open:N,onTransitionEnter:F,onTransitionExited:B,slotProps:j={},slots:U={}}=e,V=(0,r.A)(e,M),[H,W]=a.useState(!N),G=a.useRef({}),q=a.useRef(null),Y=a.useRef(null),$=(0,o.A)(Y,t),X=function(e){return!!e&&e.props.hasOwnProperty("in")}(f),Z=null==(n=e["aria-hidden"])||n,K=()=>(G.current.modalRef=Y.current,G.current.mountNode=q.current,G.current),J=()=>{O.mount(K(),{disableScrollLock:D}),Y.current&&(Y.current.scrollTop=0)},Q=(0,l.A)((()=>{const e=function(e){return"function"===typeof e?e():e}(y)||(0,s.A)(q.current).body;O.add(K(),e),Y.current&&J()})),ee=a.useCallback((()=>O.isTopModal(K())),[O]),te=(0,l.A)((e=>{q.current=e,e&&Y.current&&(N&&ee()?J():p(Y.current,Z))})),ne=a.useCallback((()=>{O.remove(K(),Z)}),[O,Z]);a.useEffect((()=>()=>{ne()}),[ne]),a.useEffect((()=>{N?Q():X&&g||ne()}),[N,ne,X,g,Q]);const re=(0,i.A)({},e,{classes:m,closeAfterTransition:g,disableAutoFocus:b,disableEnforceFocus:_,disableEscapeKeyDown:k,disablePortal:E,disableRestoreFocus:C,disableScrollLock:D,exited:H,hideBackdrop:R,keepMounted:P}),ie=(e=>{const{open:t,exited:n,classes:r}=e,i={root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]};return(0,u.A)(i,w,r)})(re),ae=()=>{W(!1),F&&F()},oe=()=>{W(!0),B&&B(),g&&ne()},se={};void 0===f.props.tabIndex&&(se.tabIndex="-1"),X&&(se.onEnter=(0,c.A)(ae,f.props.onEnter),se.onExited=(0,c.A)(oe,f.props.onExited));const le=null!=(h=null!=v?v:U.root)?h:"div",ce=(0,A.A)({elementType:le,externalSlotProps:j.root,externalForwardedProps:V,additionalProps:{ref:$,role:"presentation",onKeyDown:e=>{z&&z(e),"Escape"===e.key&&ee()&&(k||(e.stopPropagation(),I&&I(e,"escapeKeyDown")))}},className:ie.root,ownerState:re}),ue=U.backdrop,de=(0,A.A)({elementType:ue,externalSlotProps:j.backdrop,additionalProps:{"aria-hidden":!0,onClick:e=>{e.target===e.currentTarget&&(L&&L(e),I&&I(e,"backdropClick"))},open:N},className:ie.backdrop,ownerState:re});return P||N||X&&!H?(0,S.jsx)(d.A,{ref:te,container:y,disablePortal:E,children:(0,S.jsxs)(le,(0,i.A)({},ce,{children:[!R&&ue?(0,S.jsx)(ue,(0,i.A)({},de)):null,(0,S.jsx)(x.A,{disableEnforceFocus:_,disableAutoFocus:b,disableRestoreFocus:C,isEnabled:ee,open:N,children:a.cloneElement(f,se)})]}))}):null}));var E=n(51163),C=n(74445),D=n(59254),R=n(48283),P=n(55158);const O=["BackdropComponent","BackdropProps","closeAfterTransition","children","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","slotProps","slots","theme"],L=(0,D.Ay)("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0},!n.open&&n.exited&&{visibility:"hidden"})})),I=(0,D.Ay)(P.A,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),z=a.forwardRef((function(e,t){var n,o,s,l,c,u;const d=(0,R.A)({name:"MuiModal",props:e}),{BackdropComponent:h=I,BackdropProps:f,closeAfterTransition:p=!1,children:m,component:g,components:v={},componentsProps:y={},disableAutoFocus:x=!1,disableEnforceFocus:b=!1,disableEscapeKeyDown:_=!1,disablePortal:w=!1,disableRestoreFocus:A=!1,disableScrollLock:M=!1,hideBackdrop:T=!1,keepMounted:D=!1,slotProps:P,slots:z,theme:N}=d,F=(0,r.A)(d,O),[B,j]=a.useState(!0),U={closeAfterTransition:p,disableAutoFocus:x,disableEnforceFocus:b,disableEscapeKeyDown:_,disablePortal:w,disableRestoreFocus:A,disableScrollLock:M,hideBackdrop:T,keepMounted:D},V=(0,i.A)({},d,U,{exited:B}),H=(e=>e.classes)(V),W=null!=(n=null!=(o=null==z?void 0:z.root)?o:v.Root)?n:L,G=null!=(s=null!=(l=null==z?void 0:z.backdrop)?l:v.Backdrop)?s:h,q=null!=(c=null==P?void 0:P.root)?c:y.root,Y=null!=(u=null==P?void 0:P.backdrop)?u:y.backdrop;return(0,S.jsx)(k,(0,i.A)({slots:{root:W,backdrop:G},slotProps:{root:()=>(0,i.A)({},(0,E.A)(q,V),!(0,C.A)(W)&&{as:g,theme:N}),backdrop:()=>(0,i.A)({},f,(0,E.A)(Y,V))},onTransitionEnter:()=>j(!1),onTransitionExited:()=>j(!0),ref:t},F,{classes:H},U,{children:m}))}))},2660:(e,t,n)=>{"use strict";n.d(t,{A:()=>A});var r,i=n(98587),a=n(58168),o=n(9950),s=n(88465),l=n(59254),c=n(44414);const u=["children","classes","className","label","notched"],d=(0,l.Ay)("fieldset")({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),h=(0,l.Ay)("legend")((e=>{let{ownerState:t,theme:n}=e;return(0,a.A)({float:"unset",width:"auto",overflow:"hidden"},!t.withLabel&&{padding:0,lineHeight:"11px",transition:n.transitions.create("width",{duration:150,easing:n.transitions.easing.easeOut})},t.withLabel&&(0,a.A)({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:n.transitions.create("max-width",{duration:50,easing:n.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},t.notched&&{maxWidth:"100%",transition:n.transitions.create("max-width",{duration:100,easing:n.transitions.easing.easeOut,delay:50})}))}));var f=n(39766),p=n(68624),m=n(79229),g=n(19773),v=n(48283);const y=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],x=(0,l.Ay)(g.Sh,{shouldForwardProp:e=>(0,l.ep)(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:g.WC})((e=>{let{theme:t,ownerState:n}=e;const r="light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return(0,a.A)({position:"relative",borderRadius:(t.vars||t).shape.borderRadius,[`&:hover .${m.A.notchedOutline}`]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{[`&:hover .${m.A.notchedOutline}`]:{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:r}},[`&.${m.A.focused} .${m.A.notchedOutline}`]:{borderColor:(t.vars||t).palette[n.color].main,borderWidth:2},[`&.${m.A.error} .${m.A.notchedOutline}`]:{borderColor:(t.vars||t).palette.error.main},[`&.${m.A.disabled} .${m.A.notchedOutline}`]:{borderColor:(t.vars||t).palette.action.disabled}},n.startAdornment&&{paddingLeft:14},n.endAdornment&&{paddingRight:14},n.multiline&&(0,a.A)({padding:"16.5px 14px"},"small"===n.size&&{padding:"8.5px 14px"}))})),b=(0,l.Ay)((function(e){const{className:t,label:n,notched:o}=e,s=(0,i.A)(e,u),l=null!=n&&""!==n,f=(0,a.A)({},e,{notched:o,withLabel:l});return(0,c.jsx)(d,(0,a.A)({"aria-hidden":!0,className:t,ownerState:f},s,{children:(0,c.jsx)(h,{ownerState:f,children:l?(0,c.jsx)("span",{children:n}):r||(r=(0,c.jsx)("span",{className:"notranslate",children:"\u200b"}))})}))}),{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})((e=>{let{theme:t}=e;const n="light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:n}})),_=(0,l.Ay)(g.f3,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:g.Oj})((e=>{let{theme:t,ownerState:n}=e;return(0,a.A)({padding:"16.5px 14px"},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===t.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===t.palette.mode?null:"#fff",caretColor:"light"===t.palette.mode?null:"#fff",borderRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===n.size&&{padding:"8.5px 14px"},n.multiline&&{padding:0},n.startAdornment&&{paddingLeft:0},n.endAdornment&&{paddingRight:0})})),w=o.forwardRef((function(e,t){var n,r,l,u,d;const h=(0,v.A)({props:e,name:"MuiOutlinedInput"}),{components:w={},fullWidth:A=!1,inputComponent:S="input",label:M,multiline:T=!1,notched:k,slots:E={},type:C="text"}=h,D=(0,i.A)(h,y),R=(e=>{const{classes:t}=e,n=(0,s.A)({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},m.v,t);return(0,a.A)({},t,n)})(h),P=(0,f.A)(),O=(0,p.A)({props:h,muiFormControl:P,states:["required"]}),L=(0,a.A)({},h,{color:O.color||"primary",disabled:O.disabled,error:O.error,focused:O.focused,formControl:P,fullWidth:A,hiddenLabel:O.hiddenLabel,multiline:T,size:O.size,type:C}),I=null!=(n=null!=(r=E.root)?r:w.Root)?n:x,z=null!=(l=null!=(u=E.input)?u:w.Input)?l:_;return(0,c.jsx)(g.Ay,(0,a.A)({slots:{root:I,input:z},renderSuffix:e=>(0,c.jsx)(b,{ownerState:L,className:R.notchedOutline,label:null!=M&&""!==M&&O.required?d||(d=(0,c.jsxs)(o.Fragment,{children:[M,"\xa0","*"]})):M,notched:"undefined"!==typeof k?k:Boolean(e.startAdornment||e.filled||e.focused)}),fullWidth:A,inputComponent:S,multiline:T,ref:t,type:C},D,{classes:(0,a.A)({},R,{notchedOutline:null})}))}));w.muiName="Input";const A=w},79229:(e,t,n)=>{"use strict";n.d(t,{A:()=>l,v:()=>s});var r=n(58168),i=n(1763),a=n(423),o=n(63589);function s(e){return(0,a.A)("MuiOutlinedInput",e)}const l=(0,r.A)({},o.A,(0,i.A)("MuiOutlinedInput",["root","notchedOutline","input"]))},2235:(e,t,n)=>{"use strict";n.d(t,{A:()=>y});var r=n(98587),i=n(58168),a=n(9950),o=n(2803),s=n(88465),l=n(97497),c=n(59254);const u=e=>{let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,(t/100).toFixed(2)};var d=n(48283),h=n(1763),f=n(423);function p(e){return(0,f.A)("MuiPaper",e)}(0,h.A)("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);var m=n(44414);const g=["className","component","elevation","square","variant"],v=(0,c.Ay)("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t[`elevation${n.elevation}`]]}})((e=>{let{theme:t,ownerState:n}=e;var r;return(0,i.A)({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow")},!n.square&&{borderRadius:t.shape.borderRadius},"outlined"===n.variant&&{border:`1px solid ${(t.vars||t).palette.divider}`},"elevation"===n.variant&&(0,i.A)({boxShadow:(t.vars||t).shadows[n.elevation]},!t.vars&&"dark"===t.palette.mode&&{backgroundImage:`linear-gradient(${(0,l.X4)("#fff",u(n.elevation))}, ${(0,l.X4)("#fff",u(n.elevation))})`},t.vars&&{backgroundImage:null==(r=t.vars.overlays)?void 0:r[n.elevation]}))})),y=a.forwardRef((function(e,t){const n=(0,d.A)({props:e,name:"MuiPaper"}),{className:a,component:l="div",elevation:c=1,square:u=!1,variant:h="elevation"}=n,f=(0,r.A)(n,g),y=(0,i.A)({},n,{component:l,elevation:c,square:u,variant:h}),x=(e=>{const{square:t,elevation:n,variant:r,classes:i}=e,a={root:["root",r,!t&&"rounded","elevation"===r&&`elevation${n}`]};return(0,s.A)(a,p,i)})(y);return(0,m.jsx)(v,(0,i.A)({as:l,ownerState:y,className:(0,o.A)(x.root,a),ref:t},f))}))},72362:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>C});var r=n(58168),i=n(98587),a=n(9950),o=n(2803),s=n(88465),l=n(59254),c=n(48283),u=n(21209),d=n(27402),h=n(70827),f=n(31506),p=n(40165),m=n(53984),g=n(2235),v=n(1763),y=n(423);function x(e){return(0,y.A)("MuiPopover",e)}(0,v.A)("MuiPopover",["root","paper"]);var b=n(44414);const _=["onEntering"],w=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"];function A(e,t){let n=0;return"number"===typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function S(e,t){let n=0;return"number"===typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function M(e){return[e.horizontal,e.vertical].map((e=>"number"===typeof e?`${e}px`:e)).join(" ")}function T(e){return"function"===typeof e?e():e}const k=(0,l.Ay)(m.A,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),E=(0,l.Ay)(g.A,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),C=a.forwardRef((function(e,t){const n=(0,c.A)({props:e,name:"MuiPopover"}),{action:l,anchorEl:m,anchorOrigin:g={vertical:"top",horizontal:"left"},anchorPosition:v,anchorReference:y="anchorEl",children:C,className:D,container:R,elevation:P=8,marginThreshold:O=16,open:L,PaperProps:I={},transformOrigin:z={vertical:"top",horizontal:"left"},TransitionComponent:N=p.A,transitionDuration:F="auto",TransitionProps:{onEntering:B}={}}=n,j=(0,i.A)(n.TransitionProps,_),U=(0,i.A)(n,w),V=a.useRef(),H=(0,f.A)(V,I.ref),W=(0,r.A)({},n,{anchorOrigin:g,anchorReference:y,elevation:P,marginThreshold:O,PaperProps:I,transformOrigin:z,TransitionComponent:N,transitionDuration:F,TransitionProps:j}),G=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"],paper:["paper"]},x,t)})(W),q=a.useCallback((()=>{if("anchorPosition"===y)return v;const e=T(m),t=(e&&1===e.nodeType?e:(0,d.A)(V.current).body).getBoundingClientRect();return{top:t.top+A(t,g.vertical),left:t.left+S(t,g.horizontal)}}),[m,g.horizontal,g.vertical,v,y]),Y=a.useCallback((e=>({vertical:A(e,z.vertical),horizontal:S(e,z.horizontal)})),[z.horizontal,z.vertical]),$=a.useCallback((e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=Y(t);if("none"===y)return{top:null,left:null,transformOrigin:M(n)};const r=q();let i=r.top-n.vertical,a=r.left-n.horizontal;const o=i+t.height,s=a+t.width,l=(0,h.A)(T(m)),c=l.innerHeight-O,u=l.innerWidth-O;if(ic){const e=o-c;i-=e,n.vertical+=e}if(au){const e=s-u;a-=e,n.horizontal+=e}return{top:`${Math.round(i)}px`,left:`${Math.round(a)}px`,transformOrigin:M(n)}}),[m,y,q,Y,O]),[X,Z]=a.useState(L),K=a.useCallback((()=>{const e=V.current;if(!e)return;const t=$(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,Z(!0)}),[$]);a.useEffect((()=>{L&&K()})),a.useImperativeHandle(l,(()=>L?{updatePosition:()=>{K()}}:null),[L,K]),a.useEffect((()=>{if(!L)return;const e=(0,u.A)((()=>{K()})),t=(0,h.A)(m);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}}),[m,L,K]);let J=F;"auto"!==F||N.muiSupportAuto||(J=void 0);const Q=R||(m?(0,d.A)(T(m)).body:void 0);return(0,b.jsx)(k,(0,r.A)({BackdropProps:{invisible:!0},className:(0,o.A)(G.root,D),container:Q,open:L,ref:t,ownerState:W},U,{children:(0,b.jsx)(N,(0,r.A)({appear:!0,in:L,onEntering:(e,t)=>{B&&B(e,t),K()},onExited:()=>{Z(!1)},timeout:J},j,{children:(0,b.jsx)(E,(0,r.A)({elevation:P},I,{ref:H,className:(0,o.A)(G.paper,I.className)},X?void 0:{style:(0,r.A)({},I.style,{opacity:0})},{ownerState:W,children:C}))}))}))}))},69363:(e,t,n)=>{"use strict";n.d(t,{A:()=>je});var r=n(58168),i=n(98587),a=n(9950),o=n(28866),s=n(91700),l=n(61786);function c(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function u(e){return e instanceof c(e).Element||e instanceof Element}function d(e){return e instanceof c(e).HTMLElement||e instanceof HTMLElement}function h(e){return"undefined"!==typeof ShadowRoot&&(e instanceof c(e).ShadowRoot||e instanceof ShadowRoot)}var f=Math.max,p=Math.min,m=Math.round;function g(){var e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function v(){return!/^((?!chrome|android).)*safari/i.test(g())}function y(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&d(e)&&(i=e.offsetWidth>0&&m(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&m(r.height)/e.offsetHeight||1);var o=(u(e)?c(e):window).visualViewport,s=!v()&&n,l=(r.left+(s&&o?o.offsetLeft:0))/i,h=(r.top+(s&&o?o.offsetTop:0))/a,f=r.width/i,p=r.height/a;return{width:f,height:p,top:h,right:l+f,bottom:h+p,left:l,x:l,y:h}}function x(e){var t=c(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function b(e){return e?(e.nodeName||"").toLowerCase():null}function _(e){return((u(e)?e.ownerDocument:e.document)||window.document).documentElement}function w(e){return y(_(e)).left+x(e).scrollLeft}function A(e){return c(e).getComputedStyle(e)}function S(e){var t=A(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function M(e,t,n){void 0===n&&(n=!1);var r=d(t),i=d(t)&&function(e){var t=e.getBoundingClientRect(),n=m(t.width)/e.offsetWidth||1,r=m(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),a=_(t),o=y(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(("body"!==b(t)||S(a))&&(s=function(e){return e!==c(e)&&d(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:x(e);var t}(t)),d(t)?((l=y(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):a&&(l.x=w(a))),{x:o.left+s.scrollLeft-l.x,y:o.top+s.scrollTop-l.y,width:o.width,height:o.height}}function T(e){var t=y(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function k(e){return"html"===b(e)?e:e.assignedSlot||e.parentNode||(h(e)?e.host:null)||_(e)}function E(e){return["html","body","#document"].indexOf(b(e))>=0?e.ownerDocument.body:d(e)&&S(e)?e:E(k(e))}function C(e,t){var n;void 0===t&&(t=[]);var r=E(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),a=c(r),o=i?[a].concat(a.visualViewport||[],S(r)?r:[]):r,s=t.concat(o);return i?s:s.concat(C(k(o)))}function D(e){return["table","td","th"].indexOf(b(e))>=0}function R(e){return d(e)&&"fixed"!==A(e).position?e.offsetParent:null}function P(e){for(var t=c(e),n=R(e);n&&D(n)&&"static"===A(n).position;)n=R(n);return n&&("html"===b(n)||"body"===b(n)&&"static"===A(n).position)?t:n||function(e){var t=/firefox/i.test(g());if(/Trident/i.test(g())&&d(e)&&"fixed"===A(e).position)return null;var n=k(e);for(h(n)&&(n=n.host);d(n)&&["html","body"].indexOf(b(n))<0;){var r=A(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var O="top",L="bottom",I="right",z="left",N="auto",F=[O,L,I,z],B="start",j="end",U="viewport",V="popper",H=F.reduce((function(e,t){return e.concat([t+"-"+B,t+"-"+j])}),[]),W=[].concat(F,[N]).reduce((function(e,t){return e.concat([t,t+"-"+B,t+"-"+j])}),[]),G=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function q(e){var t=new Map,n=new Set,r=[];function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||i(e)})),r}function Y(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}var $={placement:"bottom",modifiers:[],strategy:"absolute"};function X(){for(var e=arguments.length,t=new Array(e),n=0;n=0?"x":"y"}function te(e){var t,n=e.reference,r=e.element,i=e.placement,a=i?J(i):null,o=i?Q(i):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(a){case O:t={x:s,y:n.y-r.height};break;case L:t={x:s,y:n.y+n.height};break;case I:t={x:n.x+n.width,y:l};break;case z:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=a?ee(a):null;if(null!=c){var u="y"===c?"height":"width";switch(o){case B:t[c]=t[c]-(n[u]/2-r[u]/2);break;case j:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}var ne={top:"auto",right:"auto",bottom:"auto",left:"auto"};function re(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.variation,o=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,d=e.roundOffsets,h=e.isFixed,f=o.x,p=void 0===f?0:f,g=o.y,v=void 0===g?0:g,y="function"===typeof d?d({x:p,y:v}):{x:p,y:v};p=y.x,v=y.y;var x=o.hasOwnProperty("x"),b=o.hasOwnProperty("y"),w=z,S=O,M=window;if(u){var T=P(n),k="clientHeight",E="clientWidth";if(T===c(n)&&"static"!==A(T=_(n)).position&&"absolute"===s&&(k="scrollHeight",E="scrollWidth"),i===O||(i===z||i===I)&&a===j)S=L,v-=(h&&T===M&&M.visualViewport?M.visualViewport.height:T[k])-r.height,v*=l?1:-1;if(i===z||(i===O||i===L)&&a===j)w=I,p-=(h&&T===M&&M.visualViewport?M.visualViewport.width:T[E])-r.width,p*=l?1:-1}var C,D=Object.assign({position:s},u&&ne),R=!0===d?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:m(t*r)/r||0,y:m(n*r)/r||0}}({x:p,y:v}):{x:p,y:v};return p=R.x,v=R.y,l?Object.assign({},D,((C={})[S]=b?"0":"",C[w]=x?"0":"",C.transform=(M.devicePixelRatio||1)<=1?"translate("+p+"px, "+v+"px)":"translate3d("+p+"px, "+v+"px, 0)",C)):Object.assign({},D,((t={})[S]=b?v+"px":"",t[w]=x?p+"px":"",t.transform="",t))}const ie={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=void 0===i?[0,0]:i,o=W.reduce((function(e,n){return e[n]=function(e,t,n){var r=J(e),i=[z,O].indexOf(r)>=0?-1:1,a="function"===typeof n?n(Object.assign({},t,{placement:e})):n,o=a[0],s=a[1];return o=o||0,s=(s||0)*i,[z,I].indexOf(r)>=0?{x:s,y:o}:{x:o,y:s}}(n,t.rects,a),e}),{}),s=o[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=o}};var ae={left:"right",right:"left",bottom:"top",top:"bottom"};function oe(e){return e.replace(/left|right|bottom|top/g,(function(e){return ae[e]}))}var se={start:"end",end:"start"};function le(e){return e.replace(/start|end/g,(function(e){return se[e]}))}function ce(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&h(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function ue(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function de(e,t,n){return t===U?ue(function(e,t){var n=c(e),r=_(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,l=0;if(i){a=i.width,o=i.height;var u=v();(u||!u&&"fixed"===t)&&(s=i.offsetLeft,l=i.offsetTop)}return{width:a,height:o,x:s+w(e),y:l}}(e,n)):u(t)?function(e,t){var n=y(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):ue(function(e){var t,n=_(e),r=x(e),i=null==(t=e.ownerDocument)?void 0:t.body,a=f(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=f(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+w(e),l=-r.scrollTop;return"rtl"===A(i||n).direction&&(s+=f(n.clientWidth,i?i.clientWidth:0)-a),{width:a,height:o,x:s,y:l}}(_(e)))}function he(e,t,n,r){var i="clippingParents"===t?function(e){var t=C(k(e)),n=["absolute","fixed"].indexOf(A(e).position)>=0&&d(e)?P(e):e;return u(n)?t.filter((function(e){return u(e)&&ce(e,n)&&"body"!==b(e)})):[]}(e):[].concat(t),a=[].concat(i,[n]),o=a[0],s=a.reduce((function(t,n){var i=de(e,n,r);return t.top=f(i.top,t.top),t.right=p(i.right,t.right),t.bottom=p(i.bottom,t.bottom),t.left=f(i.left,t.left),t}),de(e,o,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function fe(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function pe(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function me(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=void 0===r?e.placement:r,a=n.strategy,o=void 0===a?e.strategy:a,s=n.boundary,l=void 0===s?"clippingParents":s,c=n.rootBoundary,d=void 0===c?U:c,h=n.elementContext,f=void 0===h?V:h,p=n.altBoundary,m=void 0!==p&&p,g=n.padding,v=void 0===g?0:g,x=fe("number"!==typeof v?v:pe(v,F)),b=f===V?"reference":V,w=e.rects.popper,A=e.elements[m?b:f],S=he(u(A)?A:A.contextElement||_(e.elements.popper),l,d,o),M=y(e.elements.reference),T=te({reference:M,element:w,strategy:"absolute",placement:i}),k=ue(Object.assign({},w,T)),E=f===V?k:M,C={top:S.top-E.top+x.top,bottom:E.bottom-S.bottom+x.bottom,left:S.left-E.left+x.left,right:E.right-S.right+x.right},D=e.modifiersData.offset;if(f===V&&D){var R=D[i];Object.keys(C).forEach((function(e){var t=[I,L].indexOf(e)>=0?1:-1,n=[O,L].indexOf(e)>=0?"y":"x";C[e]+=R[n]*t}))}return C}function ge(e,t,n){return f(e,p(t,n))}const ve={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=void 0===i||i,o=n.altAxis,s=void 0!==o&&o,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,h=n.tether,m=void 0===h||h,g=n.tetherOffset,v=void 0===g?0:g,y=me(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),x=J(t.placement),b=Q(t.placement),_=!b,w=ee(x),A="x"===w?"y":"x",S=t.modifiersData.popperOffsets,M=t.rects.reference,k=t.rects.popper,E="function"===typeof v?v(Object.assign({},t.rects,{placement:t.placement})):v,C="number"===typeof E?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),D=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,R={x:0,y:0};if(S){if(a){var N,F="y"===w?O:z,j="y"===w?L:I,U="y"===w?"height":"width",V=S[w],H=V+y[F],W=V-y[j],G=m?-k[U]/2:0,q=b===B?M[U]:k[U],Y=b===B?-k[U]:-M[U],$=t.elements.arrow,X=m&&$?T($):{width:0,height:0},Z=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},K=Z[F],te=Z[j],ne=ge(0,M[U],X[U]),re=_?M[U]/2-G-ne-K-C.mainAxis:q-ne-K-C.mainAxis,ie=_?-M[U]/2+G+ne+te+C.mainAxis:Y+ne+te+C.mainAxis,ae=t.elements.arrow&&P(t.elements.arrow),oe=ae?"y"===w?ae.clientTop||0:ae.clientLeft||0:0,se=null!=(N=null==D?void 0:D[w])?N:0,le=V+ie-se,ce=ge(m?p(H,V+re-se-oe):H,V,m?f(W,le):W);S[w]=ce,R[w]=ce-V}if(s){var ue,de="x"===w?O:z,he="x"===w?L:I,fe=S[A],pe="y"===A?"height":"width",ve=fe+y[de],ye=fe-y[he],xe=-1!==[O,z].indexOf(x),be=null!=(ue=null==D?void 0:D[A])?ue:0,_e=xe?ve:fe-M[pe]-k[pe]-be+C.altAxis,we=xe?fe+M[pe]+k[pe]-be-C.altAxis:ye,Ae=m&&xe?function(e,t,n){var r=ge(e,t,n);return r>n?n:r}(_e,fe,we):ge(m?_e:ve,fe,m?we:ye);S[A]=Ae,R[A]=Ae-fe}t.modifiersData[r]=R}},requiresIfExists:["offset"]};const ye={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,s=J(n.placement),l=ee(s),c=[z,I].indexOf(s)>=0?"height":"width";if(a&&o){var u=function(e,t){return fe("number"!==typeof(e="function"===typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:pe(e,F))}(i.padding,n),d=T(a),h="y"===l?O:z,f="y"===l?L:I,p=n.rects.reference[c]+n.rects.reference[l]-o[l]-n.rects.popper[c],m=o[l]-n.rects.reference[l],g=P(a),v=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,y=p/2-m/2,x=u[h],b=v-d[c]-u[f],_=v/2-d[c]/2+y,w=ge(x,_,b),A=l;n.modifiersData[r]=((t={})[A]=w,t.centerOffset=w-_,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!==typeof r||(r=t.elements.popper.querySelector(r)))&&ce(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function xe(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function be(e){return[O,I,L,z].some((function(t){return e[t]>=0}))}var _e=Z({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=void 0===i||i,o=r.resize,s=void 0===o||o,l=c(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&u.forEach((function(e){e.addEventListener("scroll",n.update,K)})),s&&l.addEventListener("resize",n.update,K),function(){a&&u.forEach((function(e){e.removeEventListener("scroll",n.update,K)})),s&&l.removeEventListener("resize",n.update,K)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=te({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=void 0===r||r,a=n.adaptive,o=void 0===a||a,s=n.roundOffsets,l=void 0===s||s,c={placement:J(t.placement),variation:Q(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,re(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,re(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];d(i)&&b(i)&&(Object.assign(i.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],i=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});d(r)&&b(r)&&(Object.assign(r.style,a),Object.keys(i).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]},ie,{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=void 0===i||i,o=n.altAxis,s=void 0===o||o,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,h=n.altBoundary,f=n.flipVariations,p=void 0===f||f,m=n.allowedAutoPlacements,g=t.options.placement,v=J(g),y=l||(v===g||!p?[oe(g)]:function(e){if(J(e)===N)return[];var t=oe(e);return[le(e),t,le(t)]}(g)),x=[g].concat(y).reduce((function(e,n){return e.concat(J(n)===N?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,a=n.rootBoundary,o=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?W:l,u=Q(r),d=u?s?H:H.filter((function(e){return Q(e)===u})):F,h=d.filter((function(e){return c.indexOf(e)>=0}));0===h.length&&(h=d);var f=h.reduce((function(t,n){return t[n]=me(e,{placement:n,boundary:i,rootBoundary:a,padding:o})[J(n)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[t]}))}(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:m}):n)}),[]),b=t.rects.reference,_=t.rects.popper,w=new Map,A=!0,S=x[0],M=0;M=0,D=C?"width":"height",R=me(t,{placement:T,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),P=C?E?I:z:E?L:O;b[D]>_[D]&&(P=oe(P));var j=oe(P),U=[];if(a&&U.push(R[k]<=0),s&&U.push(R[P]<=0,R[j]<=0),U.every((function(e){return e}))){S=T,A=!1;break}w.set(T,U)}if(A)for(var V=function(e){var t=x.find((function(t){var n=w.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return S=t,"break"},G=p?3:1;G>0;G--){if("break"===V(G))break}t.placement!==S&&(t.modifiersData[r]._skip=!0,t.placement=S,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},ve,ye,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=me(t,{elementContext:"reference"}),s=me(t,{altBoundary:!0}),l=xe(o,r),c=xe(s,i,a),u=be(l),d=be(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}]}),we=n(88465),Ae=n(5187),Se=n(423);function Me(e){return(0,Se.A)("MuiPopperUnstyled",e)}(0,n(1763).A)("MuiPopperUnstyled",["root"]);var Te=n(73815),ke=n(44414);const Ee=["anchorEl","children","component","direction","disablePortal","modifiers","open","ownerState","placement","popperOptions","popperRef","slotProps","slots","TransitionProps"],Ce=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function De(e){return"function"===typeof e?e():e}function Re(e){return void 0!==e.nodeType}const Pe={},Oe=a.forwardRef((function(e,t){var n;const{anchorEl:l,children:c,component:u,direction:d,disablePortal:h,modifiers:f,open:p,ownerState:m,placement:g,popperOptions:v,popperRef:y,slotProps:x={},slots:b={},TransitionProps:_}=e,w=(0,i.A)(e,Ee),A=a.useRef(null),S=(0,o.A)(A,t),M=a.useRef(null),T=(0,o.A)(M,y),k=a.useRef(T);(0,s.A)((()=>{k.current=T}),[T]),a.useImperativeHandle(y,(()=>M.current),[]);const E=function(e,t){if("ltr"===t)return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(g,d),[C,D]=a.useState(E),[R,P]=a.useState(De(l));a.useEffect((()=>{M.current&&M.current.forceUpdate()})),a.useEffect((()=>{l&&P(De(l))}),[l]),(0,s.A)((()=>{if(!R||!p)return;let e=[{name:"preventOverflow",options:{altBoundary:h}},{name:"flip",options:{altBoundary:h}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:e=>{let{state:t}=e;D(t.placement)}}];null!=f&&(e=e.concat(f)),v&&null!=v.modifiers&&(e=e.concat(v.modifiers));const t=_e(R,A.current,(0,r.A)({placement:E},v,{modifiers:e}));return k.current(t),()=>{t.destroy(),k.current(null)}}),[R,h,f,p,v,E]);const O={placement:C};null!==_&&(O.TransitionProps=_);const L=(0,we.A)({root:["root"]},Me,{}),I=null!=(n=null!=u?u:b.root)?n:"div",z=(0,Te.A)({elementType:I,externalSlotProps:x.root,externalForwardedProps:w,additionalProps:{role:"tooltip",ref:S},ownerState:(0,r.A)({},e,m),className:L.root});return(0,ke.jsx)(I,(0,r.A)({},z,{children:"function"===typeof c?c(O):c}))})),Le=a.forwardRef((function(e,t){const{anchorEl:n,children:o,container:s,direction:c="ltr",disablePortal:u=!1,keepMounted:d=!1,modifiers:h,open:f,placement:p="bottom",popperOptions:m=Pe,popperRef:g,style:v,transition:y=!1,slotProps:x={},slots:b={}}=e,_=(0,i.A)(e,Ce),[w,A]=a.useState(!0);if(!d&&!f&&(!y||w))return null;let S;if(s)S=s;else if(n){const e=De(n);S=e&&Re(e)?(0,l.A)(e).body:(0,l.A)(null).body}const M=f||!d||y&&!w?void 0:"none",T=y?{in:f,onEnter:()=>{A(!1)},onExited:()=>{A(!0)}}:void 0;return(0,ke.jsx)(Ae.A,{disablePortal:u,container:S,children:(0,ke.jsx)(Oe,(0,r.A)({anchorEl:n,direction:c,disablePortal:u,modifiers:h,ref:t,open:y?!w:f,placement:p,popperOptions:m,popperRef:g,slotProps:x,slots:b},_,{style:(0,r.A)({position:"fixed",top:0,left:0,display:M},v),TransitionProps:T,children:o}))})}));var Ie=n(90357),ze=n(59254),Ne=n(48283);const Fe=["components","componentsProps","slots","slotProps"],Be=(0,ze.Ay)(Le,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),je=a.forwardRef((function(e,t){var n;const a=(0,Ie.A)(),o=(0,Ne.A)({props:e,name:"MuiPopper"}),{components:s,componentsProps:l,slots:c,slotProps:u}=o,d=(0,i.A)(o,Fe),h=null!=(n=null==c?void 0:c.root)?n:null==s?void 0:s.Root;return(0,ke.jsx)(Be,(0,r.A)({direction:null==a?void 0:a.direction,slots:{root:h},slotProps:null!=u?u:l},d,{ref:t}))}))},85815:(e,t,n)=>{"use strict";n.d(t,{A:()=>R});var r=n(98587),i=n(58168),a=n(9950),o=n(2803),s=n(88465),l=n(97497),c=n(46282),u=n(48283),d=n(65471),h=n(44414);const f=(0,d.A)((0,h.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"RadioButtonUnchecked"),p=(0,d.A)((0,h.jsx)("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"}),"RadioButtonChecked");var m=n(59254);const g=(0,m.Ay)("span")({position:"relative",display:"flex"}),v=(0,m.Ay)(f)({transform:"scale(1)"}),y=(0,m.Ay)(p)((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({left:0,position:"absolute",transform:"scale(0)",transition:t.transitions.create("transform",{easing:t.transitions.easing.easeIn,duration:t.transitions.duration.shortest})},n.checked&&{transform:"scale(1)",transition:t.transitions.create("transform",{easing:t.transitions.easing.easeOut,duration:t.transitions.duration.shortest})})}));const x=function(e){const{checked:t=!1,classes:n={},fontSize:r}=e,a=(0,i.A)({},e,{checked:t});return(0,h.jsxs)(g,{className:n.root,ownerState:a,children:[(0,h.jsx)(v,{fontSize:r,className:n.background,ownerState:a}),(0,h.jsx)(y,{fontSize:r,className:n.dot,ownerState:a})]})};var b=n(61676),_=n(25920),w=n(57272);var A=n(1763),S=n(423);function M(e){return(0,S.A)("MuiRadio",e)}const T=(0,A.A)("MuiRadio",["root","checked","disabled","colorPrimary","colorSecondary"]),k=["checked","checkedIcon","color","icon","name","onChange","size","className"],E=(0,m.Ay)(c.A,{shouldForwardProp:e=>(0,m.ep)(e)||"classes"===e,name:"MuiRadio",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${(0,b.A)(n.color)}`]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({color:(t.vars||t).palette.text.secondary},!n.disableRipple&&{"&:hover":{backgroundColor:t.vars?`rgba(${"default"===n.color?t.vars.palette.action.activeChannel:t.vars.palette[n.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,l.X4)("default"===n.color?t.palette.action.active:t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==n.color&&{[`&.${T.checked}`]:{color:(t.vars||t).palette[n.color].main}},{[`&.${T.disabled}`]:{color:(t.vars||t).palette.action.disabled}})}));const C=(0,h.jsx)(x,{checked:!0}),D=(0,h.jsx)(x,{}),R=a.forwardRef((function(e,t){var n,l;const c=(0,u.A)({props:e,name:"MuiRadio"}),{checked:d,checkedIcon:f=C,color:p="primary",icon:m=D,name:g,onChange:v,size:y="medium",className:x}=c,A=(0,r.A)(c,k),S=(0,i.A)({},c,{color:p,size:y}),T=(e=>{const{classes:t,color:n}=e,r={root:["root",`color${(0,b.A)(n)}`]};return(0,i.A)({},t,(0,s.A)(r,M,t))})(S),R=a.useContext(w.A);let P=d;const O=(0,_.A)(v,R&&R.onChange);let L=g;var I,z;return R&&("undefined"===typeof P&&(I=R.value,P="object"===typeof(z=c.value)&&null!==z?I===z:String(I)===String(z)),"undefined"===typeof L&&(L=R.name)),(0,h.jsx)(E,(0,i.A)({type:"radio",icon:a.cloneElement(m,{fontSize:null!=(n=D.props.fontSize)?n:y}),checkedIcon:a.cloneElement(f,{fontSize:null!=(l=C.props.fontSize)?l:y}),ownerState:S,classes:T,name:L,checked:P,onChange:O,ref:t,className:(0,o.A)(T.root,x)},A))}))},57272:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(9950).createContext(void 0)},70006:(e,t,n)=>{"use strict";n.d(t,{A:()=>Q});var r=n(58168),i=n(98587),a=n(9950),o=n(2803),s=n(9034),l=n(9753),c=(n(26429),n(88465)),u=n(27402),d=n(61676),h=n(97591),f=n(1763),p=n(423);function m(e){return(0,p.A)("MuiNativeSelect",e)}const g=(0,f.A)("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput"]);var v=n(59254),y=n(44414);const x=["className","disabled","IconComponent","inputRef","variant"],b=e=>{let{ownerState:t,theme:n}=e;return(0,r.A)({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":(0,r.A)({},n.vars?{backgroundColor:`rgba(${n.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:"light"===n.palette.mode?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${g.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(n.vars||n).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},"filled"===t.variant&&{"&&&":{paddingRight:32}},"outlined"===t.variant&&{borderRadius:(n.vars||n).shape.borderRadius,"&:focus":{borderRadius:(n.vars||n).shape.borderRadius},"&&&":{paddingRight:32}})},_=(0,v.Ay)("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:v.ep,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],{[`&.${g.multiple}`]:t.multiple}]}})(b),w=e=>{let{ownerState:t,theme:n}=e;return(0,r.A)({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(n.vars||n).palette.action.active,[`&.${g.disabled}`]:{color:(n.vars||n).palette.action.disabled}},t.open&&{transform:"rotate(180deg)"},"filled"===t.variant&&{right:7},"outlined"===t.variant&&{right:7})},A=(0,v.Ay)("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${(0,d.A)(n.variant)}`],n.open&&t.iconOpen]}})(w),S=a.forwardRef((function(e,t){const{className:n,disabled:s,IconComponent:l,inputRef:u,variant:h="standard"}=e,f=(0,i.A)(e,x),p=(0,r.A)({},e,{disabled:s,variant:h}),g=(e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:a}=e,o={select:["select",n,r&&"disabled",i&&"multiple"],icon:["icon",`icon${(0,d.A)(n)}`,a&&"iconOpen",r&&"disabled"]};return(0,c.A)(o,m,t)})(p);return(0,y.jsxs)(a.Fragment,{children:[(0,y.jsx)(_,(0,r.A)({ownerState:p,className:(0,o.A)(g.select,n),disabled:s,ref:u||t},f)),e.multiple?null:(0,y.jsx)(A,{as:l,ownerState:p,className:g.icon})]})}));var M=n(43317),T=n(31506),k=n(48733);function E(e){return(0,p.A)("MuiSelect",e)}const C=(0,f.A)("MuiSelect",["select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput"]);var D;const R=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],P=(0,v.Ay)("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${C.select}`]:t.select},{[`&.${C.select}`]:t[n.variant]},{[`&.${C.multiple}`]:t.multiple}]}})(b,{[`&.${C.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),O=(0,v.Ay)("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${(0,d.A)(n.variant)}`],n.open&&t.iconOpen]}})(w),L=(0,v.Ay)("input",{shouldForwardProp:e=>(0,v._n)(e)&&"classes"!==e,name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function I(e,t){return"object"===typeof t&&null!==t?e===t:String(e)===String(t)}function z(e){return null==e||"string"===typeof e&&!e.trim()}const N=a.forwardRef((function(e,t){const{"aria-describedby":n,"aria-label":s,autoFocus:f,autoWidth:p,children:m,className:g,defaultOpen:v,defaultValue:x,disabled:b,displayEmpty:_,IconComponent:w,inputRef:A,labelId:S,MenuProps:C={},multiple:N,name:F,onBlur:B,onChange:j,onClose:U,onFocus:V,onOpen:H,open:W,readOnly:G,renderValue:q,SelectDisplayProps:Y={},tabIndex:$,value:X,variant:Z="standard"}=e,K=(0,i.A)(e,R),[J,Q]=(0,k.A)({controlled:X,default:x,name:"Select"}),[ee,te]=(0,k.A)({controlled:W,default:v,name:"Select"}),ne=a.useRef(null),re=a.useRef(null),[ie,ae]=a.useState(null),{current:oe}=a.useRef(null!=W),[se,le]=a.useState(),ce=(0,T.A)(t,A),ue=a.useCallback((e=>{re.current=e,e&&ae(e)}),[]),de=null==ie?void 0:ie.parentNode;a.useImperativeHandle(ce,(()=>({focus:()=>{re.current.focus()},node:ne.current,value:J})),[J]),a.useEffect((()=>{v&&ee&&ie&&!oe&&(le(p?null:de.clientWidth),re.current.focus())}),[ie,p]),a.useEffect((()=>{f&&re.current.focus()}),[f]),a.useEffect((()=>{if(!S)return;const e=(0,u.A)(re.current).getElementById(S);if(e){const t=()=>{getSelection().isCollapsed&&re.current.focus()};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}}),[S]);const he=(e,t)=>{e?H&&H(t):U&&U(t),oe||(le(p?null:de.clientWidth),te(e))},fe=a.Children.toArray(m),pe=e=>t=>{let n;if(t.currentTarget.hasAttribute("tabindex")){if(N){n=Array.isArray(J)?J.slice():[];const t=J.indexOf(e.props.value);-1===t?n.push(e.props.value):n.splice(t,1)}else n=e.props.value;if(e.props.onClick&&e.props.onClick(t),J!==n&&(Q(n),j)){const r=t.nativeEvent||t,i=new r.constructor(r.type,r);Object.defineProperty(i,"target",{writable:!0,value:{value:n,name:F}}),j(i,e)}N||he(!1,t)}},me=null!==ie&ⅇlet ge,ve;delete K["aria-invalid"];const ye=[];let xe=!1,be=!1;((0,M.lq)({value:J})||_)&&(q?ge=q(J):xe=!0);const _e=fe.map(((e,t,n)=>{var r,i,o,s;if(!a.isValidElement(e))return null;let c;if(N){if(!Array.isArray(J))throw new Error((0,l.A)(2));c=J.some((t=>I(t,e.props.value))),c&&xe&&ye.push(e.props.children)}else c=I(J,e.props.value),c&&xe&&(ve=e.props.children);if(c&&(be=!0),void 0===e.props.value)return a.cloneElement(e,{"aria-readonly":!0,role:"option"});return a.cloneElement(e,{"aria-selected":c?"true":"false",onClick:pe(e),onKeyUp:t=>{" "===t.key&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:"option",selected:void 0===(null==(r=n[0])||null==(i=r.props)?void 0:i.value)||!0===(null==(o=n[0])||null==(s=o.props)?void 0:s.disabled)?(()=>{if(J)return c;const t=n.find((e=>{var t;return void 0!==(null==e||null==(t=e.props)?void 0:t.value)&&!0!==e.props.disabled}));return e===t||c})():c,value:void 0,"data-value":e.props.value})}));xe&&(ge=N?0===ye.length?null:ye.reduce(((e,t,n)=>(e.push(t),n{const{classes:t,variant:n,disabled:r,multiple:i,open:a}=e,o={select:["select",n,r&&"disabled",i&&"multiple"],icon:["icon",`icon${(0,d.A)(n)}`,a&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return(0,c.A)(o,E,t)})(Me);return(0,y.jsxs)(a.Fragment,{children:[(0,y.jsx)(P,(0,r.A)({ref:ue,tabIndex:we,role:"button","aria-disabled":b?"true":void 0,"aria-expanded":me?"true":"false","aria-haspopup":"listbox","aria-label":s,"aria-labelledby":[S,Se].filter(Boolean).join(" ")||void 0,"aria-describedby":n,onKeyDown:e=>{if(!G){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),he(!0,e))}},onMouseDown:b||G?null:e=>{0===e.button&&(e.preventDefault(),re.current.focus(),he(!0,e))},onBlur:e=>{!me&&B&&(Object.defineProperty(e,"target",{writable:!0,value:{value:J,name:F}}),B(e))},onFocus:V},Y,{ownerState:Me,className:(0,o.A)(Y.className,Te.select,g),id:Se,children:z(ge)?D||(D=(0,y.jsx)("span",{className:"notranslate",children:"\u200b"})):ge})),(0,y.jsx)(L,(0,r.A)({value:Array.isArray(J)?J.join(","):J,name:F,ref:ne,"aria-hidden":!0,onChange:e=>{const t=fe.map((e=>e.props.value)).indexOf(e.target.value);if(-1===t)return;const n=fe[t];Q(n.props.value),j&&j(e,n)},tabIndex:-1,disabled:b,className:Te.nativeInput,autoFocus:f,ownerState:Me},K)),(0,y.jsx)(O,{as:w,className:Te.icon,ownerState:Me}),(0,y.jsx)(h.A,(0,r.A)({id:`menu-${F||""}`,anchorEl:de,open:me,onClose:e=>{he(!1,e)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},C,{MenuListProps:(0,r.A)({"aria-labelledby":S,role:"listbox",disableListWrap:!0},C.MenuListProps),PaperProps:(0,r.A)({},C.PaperProps,{style:(0,r.A)({minWidth:Ae},null!=C.PaperProps?C.PaperProps.style:null)}),children:_e}))]})}));var F,B,j=n(68624),U=n(39766),V=n(63976),H=n(82321),W=n(85685),G=n(2660),q=n(48283);const Y=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],$={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>(0,v.ep)(e)&&"variant"!==e,slot:"Root"},X=(0,v.Ay)(H.A,$)(""),Z=(0,v.Ay)(G.A,$)(""),K=(0,v.Ay)(W.A,$)(""),J=a.forwardRef((function(e,t){const n=(0,q.A)({name:"MuiSelect",props:e}),{autoWidth:l=!1,children:c,classes:u={},className:d,defaultOpen:h=!1,displayEmpty:f=!1,IconComponent:p=V.A,id:m,input:g,inputProps:v,label:x,labelId:b,MenuProps:_,multiple:w=!1,native:A=!1,onClose:M,onOpen:k,open:E,renderValue:C,SelectDisplayProps:D,variant:R="outlined"}=n,P=(0,i.A)(n,Y),O=A?S:N,L=(0,U.A)(),I=(0,j.A)({props:n,muiFormControl:L,states:["variant"]}).variant||R,z=g||{standard:F||(F=(0,y.jsx)(X,{})),outlined:(0,y.jsx)(Z,{label:x}),filled:B||(B=(0,y.jsx)(K,{}))}[I],H=(e=>{const{classes:t}=e;return t})((0,r.A)({},n,{variant:I,classes:u})),W=(0,T.A)(t,z.ref);return(0,y.jsx)(a.Fragment,{children:a.cloneElement(z,(0,r.A)({inputComponent:O,inputProps:(0,r.A)({children:c,IconComponent:p,variant:I,type:void 0,multiple:w},A?{id:m}:{autoWidth:l,defaultOpen:h,displayEmpty:f,labelId:b,MenuProps:_,onClose:M,onOpen:k,open:E,renderValue:C,SelectDisplayProps:(0,r.A)({id:m},D)},v,{classes:v?(0,s.A)(H,v.classes):H},g?g.props.inputProps:{})},w&&A&&"outlined"===I?{notched:!0}:{},{ref:W,className:(0,o.A)(z.props.className,d)},!g&&{variant:I},P))})}));J.muiName="Select";const Q=J},34502:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>Q});var r=n(98587),i=n(58168),a=n(9950),o=n(2803),s=n(88465),l=n(73815),c=n(74445),u=n(61786),d=n(66349),h=n(82101),f=n(28866),p=n(91700),m=n(81448);const g={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function v(e,t){return e-t}function y(e,t,n){return null==e?t:Math.min(Math.max(t,e),n)}function x(e,t){var n;const{index:r}=null!=(n=e.reduce(((e,n,r)=>{const i=Math.abs(t-n);return null===e||i({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},T=e=>e;let k;function E(){return void 0===k&&(k="undefined"===typeof CSS||"function"!==typeof CSS.supports||CSS.supports("touch-action","none")),k}function C(e){const{"aria-labelledby":t,defaultValue:n,disabled:r=!1,disableSwap:o=!1,isRtl:s=!1,marks:l=!1,max:c=100,min:k=0,name:C,onChange:D,onChangeCommitted:R,orientation:P="horizontal",ref:O,scale:L=T,step:I=1,tabIndex:z,value:N}=e,F=a.useRef(),[B,j]=a.useState(-1),[U,V]=a.useState(-1),[H,W]=a.useState(!1),G=a.useRef(0),[q,Y]=(0,d.A)({controlled:N,default:null!=n?n:k,name:"Slider"}),$=D&&((e,t,n)=>{const r=e.nativeEvent||e,i=new r.constructor(r.type,r);Object.defineProperty(i,"target",{writable:!0,value:{value:t,name:C}}),D(i,t,n)}),X=Array.isArray(q);let Z=X?q.slice().sort(v):[q];Z=Z.map((e=>y(e,k,c)));const K=!0===l&&null!==I?[...Array(Math.floor((c-k)/I)+1)].map(((e,t)=>({value:k+I*t}))):l||[],J=K.map((e=>e.value)),{isFocusVisibleRef:Q,onBlur:ee,onFocus:te,ref:ne}=(0,h.A)(),[re,ie]=a.useState(-1),ae=a.useRef(),oe=(0,f.A)(ne,ae),se=(0,f.A)(O,oe),le=e=>t=>{var n;const r=Number(t.currentTarget.getAttribute("data-index"));te(t),!0===Q.current&&ie(r),V(r),null==e||null==(n=e.onFocus)||n.call(e,t)},ce=e=>t=>{var n;ee(t),!1===Q.current&&ie(-1),V(-1),null==e||null==(n=e.onBlur)||n.call(e,t)};(0,p.A)((()=>{var e;r&&ae.current.contains(document.activeElement)&&(null==(e=document.activeElement)||e.blur())}),[r]),r&&-1!==B&&j(-1),r&&-1!==re&&ie(-1);const ue=e=>t=>{var n;null==(n=e.onChange)||n.call(e,t);const r=Number(t.currentTarget.getAttribute("data-index")),i=Z[r],a=J.indexOf(i);let s=t.target.valueAsNumber;if(K&&null==I&&(s=s{let{finger:t,move:n=!1}=e;const{current:r}=ae,{width:i,height:a,bottom:s,left:l}=r.getBoundingClientRect();let u,d;if(u=0===he.indexOf("vertical")?(s-t.y)/a:(t.x-l)/i,-1!==he.indexOf("-reverse")&&(u=1-u),d=function(e,t,n){return(n-t)*e+t}(u,k,c),I)d=w(d,I,k);else{const e=x(J,d);d=J[e]}d=y(d,k,c);let h=0;if(X){h=n?de.current:x(Z,d),o&&(d=y(d,Z[h-1]||-1/0,Z[h+1]||1/0));const e=d;d=A({values:Z,newValue:d,index:h}),o&&n||(h=d.indexOf(e),de.current=h)}return{newValue:d,activeIndex:h}},pe=(0,m.A)((e=>{const t=b(e,F);if(!t)return;if(G.current+=1,"mousemove"===e.type&&0===e.buttons)return void me(e);const{newValue:n,activeIndex:r}=fe({finger:t,move:!0});S({sliderRef:ae,activeIndex:r,setActive:j}),Y(n),!H&&G.current>2&&W(!0),$&&n!==q&&$(e,n,r)})),me=(0,m.A)((e=>{const t=b(e,F);if(W(!1),!t)return;const{newValue:n}=fe({finger:t,move:!0});j(-1),"touchend"===e.type&&V(-1),R&&R(e,n),F.current=void 0,ve()})),ge=(0,m.A)((e=>{if(r)return;E()||e.preventDefault();const t=e.changedTouches[0];null!=t&&(F.current=t.identifier);const n=b(e,F);if(!1!==n){const{newValue:t,activeIndex:r}=fe({finger:n});S({sliderRef:ae,activeIndex:r,setActive:j}),Y(t),$&&$(e,t,r)}G.current=0;const i=(0,u.A)(ae.current);i.addEventListener("touchmove",pe),i.addEventListener("touchend",me)})),ve=a.useCallback((()=>{const e=(0,u.A)(ae.current);e.removeEventListener("mousemove",pe),e.removeEventListener("mouseup",me),e.removeEventListener("touchmove",pe),e.removeEventListener("touchend",me)}),[me,pe]);a.useEffect((()=>{const{current:e}=ae;return e.addEventListener("touchstart",ge,{passive:E()}),()=>{e.removeEventListener("touchstart",ge,{passive:E()}),ve()}}),[ve,ge]),a.useEffect((()=>{r&&ve()}),[r,ve]);const ye=e=>t=>{var n;if(null==(n=e.onMouseDown)||n.call(e,t),r)return;if(t.defaultPrevented)return;if(0!==t.button)return;t.preventDefault();const i=b(t,F);if(!1!==i){const{newValue:e,activeIndex:n}=fe({finger:i});S({sliderRef:ae,activeIndex:n,setActive:j}),Y(e),$&&$(t,e,n)}G.current=0;const a=(0,u.A)(ae.current);a.addEventListener("mousemove",pe),a.addEventListener("mouseup",me)},xe=_(X?Z[0]:k,k,c),be=_(Z[Z.length-1],k,c)-xe,_e=e=>t=>{var n;null==(n=e.onMouseOver)||n.call(e,t);const r=Number(t.currentTarget.getAttribute("data-index"));V(r)},we=e=>t=>{var n;null==(n=e.onMouseLeave)||n.call(e,t),V(-1)};return{active:B,axis:he,axisProps:M,dragging:H,focusedThumbIndex:re,getHiddenInputProps:function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var a;const o={onChange:ue(n||{}),onFocus:le(n||{}),onBlur:ce(n||{})},l=(0,i.A)({},n,o);return(0,i.A)({tabIndex:z,"aria-labelledby":t,"aria-orientation":P,"aria-valuemax":L(c),"aria-valuemin":L(k),name:C,type:"range",min:e.min,max:e.max,step:null!=(a=e.step)?a:void 0,disabled:r},l,{style:(0,i.A)({},g,{direction:s?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t={onMouseDown:ye(e||{})},n=(0,i.A)({},e,t);return(0,i.A)({ref:se},n)},getThumbProps:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t={onMouseOver:_e(e||{}),onMouseLeave:we(e||{})};return(0,i.A)({},e,t)},marks:K,open:U,range:X,trackLeap:be,trackOffset:xe,values:Z}}var D=n(97497),R=n(48283),P=n(59254),O=n(14857);const L=e=>!e||!(0,c.A)(e);var I=n(61676),z=n(1763),N=n(423);function F(e){return(0,N.A)("MuiSlider",e)}const B=(0,z.A)("MuiSlider",["root","active","colorPrimary","colorSecondary","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]);var j=n(44414);const U=["aria-label","aria-valuetext","aria-labelledby","component","components","componentsProps","color","classes","className","disableSwap","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","orientation","size","step","scale","slotProps","slots","tabIndex","track","value","valueLabelDisplay","valueLabelFormat"],V=(e,t,n)=>100*(e-t)/(n-t);function H(e){return e}const W=(0,P.Ay)("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${(0,I.A)(n.color)}`],"medium"!==n.size&&t[`size${(0,I.A)(n.size)}`],n.marked&&t.marked,"vertical"===n.orientation&&t.vertical,"inverted"===n.track&&t.trackInverted,!1===n.track&&t.trackFalse]}})((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",color:(t.vars||t).palette[n.color].main,WebkitTapHighlightColor:"transparent"},"horizontal"===n.orientation&&(0,i.A)({height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}},"small"===n.size&&{height:2},n.marked&&{marginBottom:20}),"vertical"===n.orientation&&(0,i.A)({height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}},"small"===n.size&&{width:2},n.marked&&{marginRight:44}),{"@media print":{colorAdjust:"exact"},[`&.${B.disabled}`]:{pointerEvents:"none",cursor:"default",color:(t.vars||t).palette.grey[400]},[`&.${B.dragging}`]:{[`& .${B.thumb}, & .${B.track}`]:{transition:"none"}}})})),G=(0,P.Ay)("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.rail})((e=>{let{ownerState:t}=e;return(0,i.A)({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38},"horizontal"===t.orientation&&{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"},"vertical"===t.orientation&&{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"},"inverted"===t.track&&{opacity:1})})),q=(0,P.Ay)("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})((e=>{let{theme:t,ownerState:n}=e;const r="light"===t.palette.mode?(0,D.a)(t.palette[n.color].main,.62):(0,D.e$)(t.palette[n.color].main,.5);return(0,i.A)({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:t.transitions.create(["left","width","bottom","height"],{duration:t.transitions.duration.shortest})},"small"===n.size&&{border:"none"},"horizontal"===n.orientation&&{height:"inherit",top:"50%",transform:"translateY(-50%)"},"vertical"===n.orientation&&{width:"inherit",left:"50%",transform:"translateX(-50%)"},!1===n.track&&{display:"none"},"inverted"===n.track&&{backgroundColor:t.vars?t.vars.palette.Slider[`${n.color}Track`]:r,borderColor:t.vars?t.vars.palette.Slider[`${n.color}Track`]:r})})),Y=(0,P.Ay)("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.thumb,t[`thumbColor${(0,I.A)(n.color)}`],"medium"!==n.size&&t[`thumbSize${(0,I.A)(n.size)}`]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:t.transitions.create(["box-shadow","left","bottom"],{duration:t.transitions.duration.shortest})},"small"===n.size&&{width:12,height:12},"horizontal"===n.orientation&&{top:"50%",transform:"translate(-50%, -50%)"},"vertical"===n.orientation&&{left:"50%",transform:"translate(-50%, 50%)"},{"&:before":(0,i.A)({position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(t.vars||t).shadows[2]},"small"===n.size&&{boxShadow:"none"}),"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&:hover, &.${B.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${t.vars?`rgba(${t.vars.palette[n.color].mainChannel} / 0.16)`:(0,D.X4)(t.palette[n.color].main,.16)}`,"@media (hover: none)":{boxShadow:"none"}},[`&.${B.active}`]:{boxShadow:`0px 0px 0px 14px ${t.vars?`rgba(${t.vars.palette[n.color].mainChannel} / 0.16)`:(0,D.X4)(t.palette[n.color].main,.16)}`},[`&.${B.disabled}`]:{"&:hover":{boxShadow:"none"}}})})),$=(0,P.Ay)((function(e){const{children:t,className:n,value:r}=e,i=(e=>{const{open:t}=e;return{offset:(0,o.A)(t&&B.valueLabelOpen),circle:B.valueLabelCircle,label:B.valueLabelLabel}})(e);return t?a.cloneElement(t,{className:(0,o.A)(t.props.className)},(0,j.jsxs)(a.Fragment,{children:[t.props.children,(0,j.jsx)("span",{className:(0,o.A)(i.offset,n),"aria-hidden":!0,children:(0,j.jsx)("span",{className:i.circle,children:(0,j.jsx)("span",{className:i.label,children:r})})})]})):null}),{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({[`&.${B.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"},zIndex:1,whiteSpace:"nowrap"},t.typography.body2,{fontWeight:500,transition:t.transitions.create(["transform"],{duration:t.transitions.duration.shortest}),transform:"translateY(-100%) scale(0)",position:"absolute",backgroundColor:(t.vars||t).palette.grey[600],borderRadius:2,color:(t.vars||t).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem"},"horizontal"===n.orientation&&{top:"-10px",transformOrigin:"bottom center","&:before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"}},"vertical"===n.orientation&&{right:"30px",top:"24px",transformOrigin:"right center","&:before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",right:"-20%",top:"25%"}},"small"===n.size&&{fontSize:t.typography.pxToRem(12),padding:"0.25rem 0.5rem"})})),X=(0,P.Ay)("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>(0,P._n)(e)&&"markActive"!==e,overridesResolver:(e,t)=>{const{markActive:n}=e;return[t.mark,n&&t.markActive]}})((e=>{let{theme:t,ownerState:n,markActive:r}=e;return(0,i.A)({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor"},"horizontal"===n.orientation&&{top:"50%",transform:"translate(-1px, -50%)"},"vertical"===n.orientation&&{left:"50%",transform:"translate(-50%, 1px)"},r&&{backgroundColor:(t.vars||t).palette.background.paper,opacity:.8})})),Z=(0,P.Ay)("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>(0,P._n)(e)&&"markLabelActive"!==e,overridesResolver:(e,t)=>t.markLabel})((e=>{let{theme:t,ownerState:n,markLabelActive:r}=e;return(0,i.A)({},t.typography.body2,{color:(t.vars||t).palette.text.secondary,position:"absolute",whiteSpace:"nowrap"},"horizontal"===n.orientation&&{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}},"vertical"===n.orientation&&{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}},r&&{color:(t.vars||t).palette.text.primary})})),K=e=>{let{children:t}=e;return t},J=a.forwardRef((function(e,t){var n,u,d,h,f,p,m,g,v,y,x,b,_,w,A,S,M,T,k,E,D,P,z,N;const B=(0,R.A)({props:e,name:"MuiSlider"}),J="rtl"===(0,O.A)().direction,{"aria-label":Q,"aria-valuetext":ee,"aria-labelledby":te,component:ne="span",components:re={},componentsProps:ie={},color:ae="primary",classes:oe,className:se,disableSwap:le=!1,disabled:ce=!1,getAriaLabel:ue,getAriaValueText:de,marks:he=!1,max:fe=100,min:pe=0,orientation:me="horizontal",size:ge="medium",step:ve=1,scale:ye=H,slotProps:xe,slots:be,track:_e="normal",valueLabelDisplay:we="off",valueLabelFormat:Ae=H}=B,Se=(0,r.A)(B,U),Me=(0,i.A)({},B,{isRtl:J,max:fe,min:pe,classes:oe,disabled:ce,disableSwap:le,orientation:me,marks:he,color:ae,size:ge,step:ve,scale:ye,track:_e,valueLabelDisplay:we,valueLabelFormat:Ae}),{axisProps:Te,getRootProps:ke,getHiddenInputProps:Ee,getThumbProps:Ce,open:De,active:Re,axis:Pe,focusedThumbIndex:Oe,range:Le,dragging:Ie,marks:ze,values:Ne,trackOffset:Fe,trackLeap:Be}=C((0,i.A)({},Me,{ref:t}));Me.marked=ze.length>0&&ze.some((e=>e.label)),Me.dragging=Ie,Me.focusedThumbIndex=Oe;const je=(e=>{const{disabled:t,dragging:n,marked:r,orientation:i,track:a,classes:o,color:l,size:c}=e,u={root:["root",t&&"disabled",n&&"dragging",r&&"marked","vertical"===i&&"vertical","inverted"===a&&"trackInverted",!1===a&&"trackFalse",l&&`color${(0,I.A)(l)}`,c&&`size${(0,I.A)(c)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",c&&`thumbSize${(0,I.A)(c)}`,l&&`thumbColor${(0,I.A)(l)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return(0,s.A)(u,F,o)})(Me),Ue=null!=(n=null!=(u=null==be?void 0:be.root)?u:re.Root)?n:W,Ve=null!=(d=null!=(h=null==be?void 0:be.rail)?h:re.Rail)?d:G,He=null!=(f=null!=(p=null==be?void 0:be.track)?p:re.Track)?f:q,We=null!=(m=null!=(g=null==be?void 0:be.thumb)?g:re.Thumb)?m:Y,Ge=null!=(v=null!=(y=null==be?void 0:be.valueLabel)?y:re.ValueLabel)?v:$,qe=null!=(x=null!=(b=null==be?void 0:be.mark)?b:re.Mark)?x:X,Ye=null!=(_=null!=(w=null==be?void 0:be.markLabel)?w:re.MarkLabel)?_:Z,$e=null!=(A=null!=(S=null==be?void 0:be.input)?S:re.Input)?A:"input",Xe=null!=(M=null==xe?void 0:xe.root)?M:ie.root,Ze=null!=(T=null==xe?void 0:xe.rail)?T:ie.rail,Ke=null!=(k=null==xe?void 0:xe.track)?k:ie.track,Je=null!=(E=null==xe?void 0:xe.thumb)?E:ie.thumb,Qe=null!=(D=null==xe?void 0:xe.valueLabel)?D:ie.valueLabel,et=null!=(P=null==xe?void 0:xe.mark)?P:ie.mark,tt=null!=(z=null==xe?void 0:xe.markLabel)?z:ie.markLabel,nt=null!=(N=null==xe?void 0:xe.input)?N:ie.input,rt=(0,l.A)({elementType:Ue,getSlotProps:ke,externalSlotProps:Xe,externalForwardedProps:Se,additionalProps:(0,i.A)({},L(Ue)&&{as:ne}),ownerState:(0,i.A)({},Me,null==Xe?void 0:Xe.ownerState),className:[je.root,se]}),it=(0,l.A)({elementType:Ve,externalSlotProps:Ze,ownerState:Me,className:je.rail}),at=(0,l.A)({elementType:He,externalSlotProps:Ke,additionalProps:{style:(0,i.A)({},Te[Pe].offset(Fe),Te[Pe].leap(Be))},ownerState:(0,i.A)({},Me,null==Ke?void 0:Ke.ownerState),className:je.track}),ot=(0,l.A)({elementType:We,getSlotProps:Ce,externalSlotProps:Je,ownerState:(0,i.A)({},Me,null==Je?void 0:Je.ownerState)}),st=(0,l.A)({elementType:Ge,externalSlotProps:Qe,ownerState:(0,i.A)({},Me,null==Qe?void 0:Qe.ownerState),className:je.valueLabel}),lt=(0,l.A)({elementType:qe,externalSlotProps:et,ownerState:Me,className:je.mark}),ct=(0,l.A)({elementType:Ye,externalSlotProps:tt,ownerState:Me}),ut=(0,l.A)({elementType:$e,getSlotProps:Ee,externalSlotProps:nt,ownerState:Me});return(0,j.jsxs)(Ue,(0,i.A)({},rt,{children:[(0,j.jsx)(Ve,(0,i.A)({},it)),(0,j.jsx)(He,(0,i.A)({},at)),ze.filter((e=>e.value>=pe&&e.value<=fe)).map(((e,t)=>{const n=V(e.value,pe,fe),r=Te[Pe].offset(n);let s;return s=!1===_e?-1!==Ne.indexOf(e.value):"normal"===_e&&(Le?e.value>=Ne[0]&&e.value<=Ne[Ne.length-1]:e.value<=Ne[0])||"inverted"===_e&&(Le?e.value<=Ne[0]||e.value>=Ne[Ne.length-1]:e.value>=Ne[0]),(0,j.jsxs)(a.Fragment,{children:[(0,j.jsx)(qe,(0,i.A)({"data-index":t},lt,!(0,c.A)(qe)&&{markActive:s},{style:(0,i.A)({},r,lt.style),className:(0,o.A)(lt.className,s&&je.markActive)})),null!=e.label?(0,j.jsx)(Ye,(0,i.A)({"aria-hidden":!0,"data-index":t},ct,!(0,c.A)(Ye)&&{markLabelActive:s},{style:(0,i.A)({},r,ct.style),className:(0,o.A)(je.markLabel,ct.className,s&&je.markLabelActive),children:e.label})):null]},t)})),Ne.map(((e,t)=>{const n=V(e,pe,fe),r=Te[Pe].offset(n),s="off"===we?K:Ge;return(0,j.jsx)(a.Fragment,{children:(0,j.jsx)(s,(0,i.A)({},!(0,c.A)(s)&&{valueLabelFormat:Ae,valueLabelDisplay:we,value:"function"===typeof Ae?Ae(ye(e),t):Ae,index:t,open:De===t||Re===t||"on"===we,disabled:ce},st,{children:(0,j.jsx)(We,(0,i.A)({"data-index":t,"data-focusvisible":Oe===t},ot,{className:(0,o.A)(je.thumb,ot.className,Re===t&&je.active,Oe===t&&je.focusVisible),style:(0,i.A)({},r,{pointerEvents:le&&Re!==t?"none":void 0},ot.style),children:(0,j.jsx)($e,(0,i.A)({"data-index":t,"aria-label":ue?ue(t):Q,"aria-valuenow":ye(e),"aria-labelledby":te,"aria-valuetext":de?de(ye(e),t):ee,value:Ne[t]},ut))}))}))},t)}))]}))})),Q=J},12257:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});var r=n(98587),i=n(58168),a=n(9950),o=n(28286),s=n(47937),l=n(80237),c=n(9034),u=n(59254),d=n(48283),h=n(44414);const f=["component","direction","spacing","divider","children"];function p(e,t){const n=a.Children.toArray(e).filter(Boolean);return n.reduce(((e,r,i)=>(e.push(r),i[t.root]})((e=>{let{ownerState:t,theme:n}=e,r=(0,i.A)({display:"flex",flexDirection:"column"},(0,o.NI)({theme:n},(0,o.kW)({values:t.direction,breakpoints:n.breakpoints.values}),(e=>({flexDirection:e}))));if(t.spacing){const e=(0,s.LX)(n),i=Object.keys(n.breakpoints.values).reduce(((e,n)=>(("object"===typeof t.spacing&&null!=t.spacing[n]||"object"===typeof t.direction&&null!=t.direction[n])&&(e[n]=!0),e)),{}),a=(0,o.kW)({values:t.direction,base:i}),l=(0,o.kW)({values:t.spacing,base:i});"object"===typeof a&&Object.keys(a).forEach(((e,t,n)=>{if(!a[e]){const r=t>0?a[n[t-1]]:"column";a[e]=r}}));const u=(n,r)=>{return{"& > :not(style) + :not(style)":{margin:0,[`margin${i=r?a[r]:t.direction,{row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"}[i]}`]:(0,s._W)(e,n)}};var i};r=(0,c.A)(r,(0,o.NI)({theme:n},l,u))}return r=(0,o.iZ)(n.breakpoints,r),r})),g=a.forwardRef((function(e,t){const n=(0,d.A)({props:e,name:"MuiStack"}),a=(0,l.A)(n),{component:o="div",direction:s="column",spacing:c=0,divider:u,children:g}=a,v=(0,r.A)(a,f),y={direction:s,spacing:c};return(0,h.jsx)(m,(0,i.A)({as:o,ownerState:y,ref:t},v,{children:u?p(g,u):g}))}))},9360:(e,t,n)=>{"use strict";n.d(t,{A:()=>y});var r=n(58168),i=n(98587),a=n(9950),o=n(2803),s=n(88465),l=n(61676),c=n(48283),u=n(59254),d=n(1763),h=n(423);function f(e){return(0,h.A)("MuiSvgIcon",e)}(0,d.A)("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var p=n(44414);const m=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],g=(0,u.Ay)("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${(0,l.A)(n.color)}`],t[`fontSize${(0,l.A)(n.fontSize)}`]]}})((e=>{let{theme:t,ownerState:n}=e;var r,i,a,o,s,l,c,u,d,h,f,p,m,g,v,y,x;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,transition:null==(r=t.transitions)||null==(i=r.create)?void 0:i.call(r,"fill",{duration:null==(a=t.transitions)||null==(o=a.duration)?void 0:o.shorter}),fontSize:{inherit:"inherit",small:(null==(s=t.typography)||null==(l=s.pxToRem)?void 0:l.call(s,20))||"1.25rem",medium:(null==(c=t.typography)||null==(u=c.pxToRem)?void 0:u.call(c,24))||"1.5rem",large:(null==(d=t.typography)||null==(h=d.pxToRem)?void 0:h.call(d,35))||"2.1875rem"}[n.fontSize],color:null!=(f=null==(p=(t.vars||t).palette)||null==(m=p[n.color])?void 0:m.main)?f:{action:null==(g=(t.vars||t).palette)||null==(v=g.action)?void 0:v.active,disabled:null==(y=(t.vars||t).palette)||null==(x=y.action)?void 0:x.disabled,inherit:void 0}[n.color]}})),v=a.forwardRef((function(e,t){const n=(0,c.A)({props:e,name:"MuiSvgIcon"}),{children:a,className:u,color:d="inherit",component:h="svg",fontSize:v="medium",htmlColor:y,inheritViewBox:x=!1,titleAccess:b,viewBox:_="0 0 24 24"}=n,w=(0,i.A)(n,m),A=(0,r.A)({},n,{color:d,component:h,fontSize:v,instanceFontSize:e.fontSize,inheritViewBox:x,viewBox:_}),S={};x||(S.viewBox=_);const M=(e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root","inherit"!==t&&`color${(0,l.A)(t)}`,`fontSize${(0,l.A)(n)}`]};return(0,s.A)(i,f,r)})(A);return(0,p.jsxs)(g,(0,r.A)({as:h,className:(0,o.A)(M.root,u),focusable:"false",color:y,"aria-hidden":!b||void 0,role:b?"img":void 0,ref:t},S,w,{ownerState:A,children:[a,b?(0,p.jsx)("title",{children:b}):null]}))}));v.muiName="SvgIcon";const y=v},37324:(e,t,n)=>{"use strict";n.d(t,{A:()=>A});var r=n(98587),i=n(58168),a=n(9950),o=n(2803),s=n(88465),l=n(97497),c=n(61676),u=n(46282),d=n(48283),h=n(59254),f=n(1763),p=n(423);function m(e){return(0,p.A)("MuiSwitch",e)}const g=(0,f.A)("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]);var v=n(44414);const y=["className","color","edge","size","sx"],x=(0,h.Ay)("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${(0,c.A)(n.edge)}`],t[`size${(0,c.A)(n.size)}`]]}})((e=>{let{ownerState:t}=e;return(0,i.A)({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"}},"start"===t.edge&&{marginLeft:-8},"end"===t.edge&&{marginRight:-8},"small"===t.size&&{width:40,height:24,padding:7,[`& .${g.thumb}`]:{width:16,height:16},[`& .${g.switchBase}`]:{padding:4,[`&.${g.checked}`]:{transform:"translateX(16px)"}}})})),b=(0,h.Ay)(u.A,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${g.input}`]:t.input},"default"!==n.color&&t[`color${(0,c.A)(n.color)}`]]}})((e=>{let{theme:t}=e;return{position:"absolute",top:0,left:0,zIndex:1,color:t.vars?t.vars.palette.Switch.defaultColor:`${"light"===t.palette.mode?t.palette.common.white:t.palette.grey[300]}`,transition:t.transitions.create(["left","transform"],{duration:t.transitions.duration.shortest}),[`&.${g.checked}`]:{transform:"translateX(20px)"},[`&.${g.disabled}`]:{color:t.vars?t.vars.palette.Switch.defaultDisabledColor:`${"light"===t.palette.mode?t.palette.grey[100]:t.palette.grey[600]}`},[`&.${g.checked} + .${g.track}`]:{opacity:.5},[`&.${g.disabled} + .${g.track}`]:{opacity:t.vars?t.vars.opacity.switchTrackDisabled:""+("light"===t.palette.mode?.12:.2)},[`& .${g.input}`]:{left:"-100%",width:"300%"}}}),(e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,l.X4)(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==n.color&&{[`&.${g.checked}`]:{color:(t.vars||t).palette[n.color].main,"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette[n.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,l.X4)(t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${g.disabled}`]:{color:t.vars?t.vars.palette.Switch[`${n.color}DisabledColor`]:`${"light"===t.palette.mode?(0,l.a)(t.palette[n.color].main,.62):(0,l.e$)(t.palette[n.color].main,.55)}`}},[`&.${g.checked} + .${g.track}`]:{backgroundColor:(t.vars||t).palette[n.color].main}})})),_=(0,h.Ay)("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})((e=>{let{theme:t}=e;return{height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:t.transitions.create(["opacity","background-color"],{duration:t.transitions.duration.shortest}),backgroundColor:t.vars?t.vars.palette.common.onBackground:`${"light"===t.palette.mode?t.palette.common.black:t.palette.common.white}`,opacity:t.vars?t.vars.opacity.switchTrack:""+("light"===t.palette.mode?.38:.3)}})),w=(0,h.Ay)("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})((e=>{let{theme:t}=e;return{boxShadow:(t.vars||t).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}})),A=a.forwardRef((function(e,t){const n=(0,d.A)({props:e,name:"MuiSwitch"}),{className:a,color:l="primary",edge:u=!1,size:h="medium",sx:f}=n,p=(0,r.A)(n,y),g=(0,i.A)({},n,{color:l,edge:u,size:h}),A=(e=>{const{classes:t,edge:n,size:r,color:a,checked:o,disabled:l}=e,u={root:["root",n&&`edge${(0,c.A)(n)}`,`size${(0,c.A)(r)}`],switchBase:["switchBase",`color${(0,c.A)(a)}`,o&&"checked",l&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},d=(0,s.A)(u,m,t);return(0,i.A)({},t,d)})(g),S=(0,v.jsx)(w,{className:A.thumb,ownerState:g});return(0,v.jsxs)(x,{className:(0,o.A)(A.root,a),sx:f,ownerState:g,children:[(0,v.jsx)(b,(0,i.A)({type:"checkbox",icon:S,checkedIcon:S,ref:t,ownerState:g},p,{classes:(0,i.A)({},A,{root:A.switchBase})})),(0,v.jsx)(_,{className:A.track,ownerState:g})]})}))},15769:(e,t,n)=>{"use strict";n.d(t,{A:()=>y});var r=n(98587),i=n(58168),a=n(9950),o=n(2803),s=n(88465),l=n(646),c=n(48283),u=n(59254),d=n(1763),h=n(423);function f(e){return(0,h.A)("MuiTable",e)}(0,d.A)("MuiTable",["root","stickyHeader"]);var p=n(44414);const m=["className","component","padding","size","stickyHeader"],g=(0,u.Ay)("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.stickyHeader&&t.stickyHeader]}})((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":(0,i.A)({},t.typography.body2,{padding:t.spacing(2),color:(t.vars||t).palette.text.secondary,textAlign:"left",captionSide:"bottom"})},n.stickyHeader&&{borderCollapse:"separate"})})),v="table",y=a.forwardRef((function(e,t){const n=(0,c.A)({props:e,name:"MuiTable"}),{className:u,component:d=v,padding:h="normal",size:y="medium",stickyHeader:x=!1}=n,b=(0,r.A)(n,m),_=(0,i.A)({},n,{component:d,padding:h,size:y,stickyHeader:x}),w=(e=>{const{classes:t,stickyHeader:n}=e,r={root:["root",n&&"stickyHeader"]};return(0,s.A)(r,f,t)})(_),A=a.useMemo((()=>({padding:h,size:y,stickyHeader:x})),[h,y,x]);return(0,p.jsx)(l.A.Provider,{value:A,children:(0,p.jsx)(g,(0,i.A)({as:d,role:d===v?null:"table",ref:t,className:(0,o.A)(w.root,u),ownerState:_},b))})}))},646:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(9950).createContext()},89330:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(9950).createContext()},34075:(e,t,n)=>{"use strict";n.d(t,{A:()=>x});var r=n(58168),i=n(98587),a=n(9950),o=n(2803),s=n(88465),l=n(89330),c=n(48283),u=n(59254),d=n(1763),h=n(423);function f(e){return(0,h.A)("MuiTableBody",e)}(0,d.A)("MuiTableBody",["root"]);var p=n(44414);const m=["className","component"],g=(0,u.Ay)("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-row-group"}),v={variant:"body"},y="tbody",x=a.forwardRef((function(e,t){const n=(0,c.A)({props:e,name:"MuiTableBody"}),{className:a,component:u=y}=n,d=(0,i.A)(n,m),h=(0,r.A)({},n,{component:u}),x=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"]},f,t)})(h);return(0,p.jsx)(l.A.Provider,{value:v,children:(0,p.jsx)(g,(0,r.A)({className:(0,o.A)(x.root,a),as:u,ref:t,role:u===y?null:"rowgroup",ownerState:h},d))})}))},21671:(e,t,n)=>{"use strict";n.d(t,{A:()=>_});var r=n(98587),i=n(58168),a=n(9950),o=n(2803),s=n(88465),l=n(97497),c=n(61676),u=n(646),d=n(89330),h=n(48283),f=n(59254),p=n(1763),m=n(423);function g(e){return(0,m.A)("MuiTableCell",e)}const v=(0,p.A)("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]);var y=n(44414);const x=["align","className","component","padding","scope","size","sortDirection","variant"],b=(0,f.Ay)("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${(0,c.A)(n.size)}`],"normal"!==n.padding&&t[`padding${(0,c.A)(n.padding)}`],"inherit"!==n.align&&t[`align${(0,c.A)(n.align)}`],n.stickyHeader&&t.stickyHeader]}})((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({},t.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:t.vars?`1px solid ${t.vars.palette.TableCell.border}`:`1px solid\n ${"light"===t.palette.mode?(0,l.a)((0,l.X4)(t.palette.divider,1),.88):(0,l.e$)((0,l.X4)(t.palette.divider,1),.68)}`,textAlign:"left",padding:16},"head"===n.variant&&{color:(t.vars||t).palette.text.primary,lineHeight:t.typography.pxToRem(24),fontWeight:t.typography.fontWeightMedium},"body"===n.variant&&{color:(t.vars||t).palette.text.primary},"footer"===n.variant&&{color:(t.vars||t).palette.text.secondary,lineHeight:t.typography.pxToRem(21),fontSize:t.typography.pxToRem(12)},"small"===n.size&&{padding:"6px 16px",[`&.${v.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},"checkbox"===n.padding&&{width:48,padding:"0 0 0 4px"},"none"===n.padding&&{padding:0},"left"===n.align&&{textAlign:"left"},"center"===n.align&&{textAlign:"center"},"right"===n.align&&{textAlign:"right",flexDirection:"row-reverse"},"justify"===n.align&&{textAlign:"justify"},n.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(t.vars||t).palette.background.default})})),_=a.forwardRef((function(e,t){const n=(0,h.A)({props:e,name:"MuiTableCell"}),{align:l="inherit",className:f,component:p,padding:m,scope:v,size:_,sortDirection:w,variant:A}=n,S=(0,r.A)(n,x),M=a.useContext(u.A),T=a.useContext(d.A),k=T&&"head"===T.variant;let E;E=p||(k?"th":"td");let C=v;"td"===E?C=void 0:!C&&k&&(C="col");const D=A||T&&T.variant,R=(0,i.A)({},n,{align:l,component:E,padding:m||(M&&M.padding?M.padding:"normal"),size:_||(M&&M.size?M.size:"medium"),sortDirection:w,stickyHeader:"head"===D&&M&&M.stickyHeader,variant:D}),P=(e=>{const{classes:t,variant:n,align:r,padding:i,size:a,stickyHeader:o}=e,l={root:["root",n,o&&"stickyHeader","inherit"!==r&&`align${(0,c.A)(r)}`,"normal"!==i&&`padding${(0,c.A)(i)}`,`size${(0,c.A)(a)}`]};return(0,s.A)(l,g,t)})(R);let O=null;return w&&(O="asc"===w?"ascending":"descending"),(0,y.jsx)(b,(0,i.A)({as:E,ref:t,className:(0,o.A)(P.root,f),"aria-sort":O,scope:C,ownerState:R},S))}))},69780:(e,t,n)=>{"use strict";n.d(t,{A:()=>x});var r=n(58168),i=n(98587),a=n(9950),o=n(2803),s=n(88465),l=n(89330),c=n(48283),u=n(59254),d=n(1763),h=n(423);function f(e){return(0,h.A)("MuiTableHead",e)}(0,d.A)("MuiTableHead",["root"]);var p=n(44414);const m=["className","component"],g=(0,u.Ay)("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),v={variant:"head"},y="thead",x=a.forwardRef((function(e,t){const n=(0,c.A)({props:e,name:"MuiTableHead"}),{className:a,component:u=y}=n,d=(0,i.A)(n,m),h=(0,r.A)({},n,{component:u}),x=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"]},f,t)})(h);return(0,p.jsx)(l.A.Provider,{value:v,children:(0,p.jsx)(g,(0,r.A)({as:u,className:(0,o.A)(x.root,a),ref:t,role:u===y?null:"rowgroup",ownerState:h},d))})}))},9213:(e,t,n)=>{"use strict";n.d(t,{A:()=>b});var r=n(58168),i=n(98587),a=n(9950),o=n(2803),s=n(88465),l=n(97497),c=n(89330),u=n(48283),d=n(59254),h=n(1763),f=n(423);function p(e){return(0,f.A)("MuiTableRow",e)}const m=(0,h.A)("MuiTableRow",["root","selected","hover","head","footer"]);var g=n(44414);const v=["className","component","hover","selected"],y=(0,d.Ay)("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.head&&t.head,n.footer&&t.footer]}})((e=>{let{theme:t}=e;return{color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${m.hover}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${m.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:(0,l.X4)(t.palette.primary.main,t.palette.action.selectedOpacity),"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:(0,l.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)}}}})),x="tr",b=a.forwardRef((function(e,t){const n=(0,u.A)({props:e,name:"MuiTableRow"}),{className:l,component:d=x,hover:h=!1,selected:f=!1}=n,m=(0,i.A)(n,v),b=a.useContext(c.A),_=(0,r.A)({},n,{component:d,hover:h,selected:f,head:b&&"head"===b.variant,footer:b&&"footer"===b.variant}),w=(e=>{const{classes:t,selected:n,hover:r,head:i,footer:a}=e,o={root:["root",n&&"selected",r&&"hover",i&&"head",a&&"footer"]};return(0,s.A)(o,p,t)})(_);return(0,g.jsx)(y,(0,r.A)({as:d,ref:t,className:(0,o.A)(w.root,l),role:d===x?null:"row",ownerState:_},m))}))},29925:(e,t,n)=>{"use strict";n.d(t,{A:()=>O});var r=n(58168),i=n(98587),a=n(9950),o=n(2803),s=n(88465),l=n(81174),c=n(59254),u=n(48283),d=n(82321),h=n(85685),f=n(2660),p=n(3788),m=n(25979),g=n(68624),v=n(39766),y=n(61676),x=n(1763),b=n(423);function _(e){return(0,b.A)("MuiFormHelperText",e)}const w=(0,x.A)("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var A,S=n(44414);const M=["children","className","component","disabled","error","filled","focused","margin","required","variant"],T=(0,c.Ay)("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${(0,y.A)(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})((e=>{let{theme:t,ownerState:n}=e;return(0,r.A)({color:(t.vars||t).palette.text.secondary},t.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${w.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${w.error}`]:{color:(t.vars||t).palette.error.main}},"small"===n.size&&{marginTop:4},n.contained&&{marginLeft:14,marginRight:14})})),k=a.forwardRef((function(e,t){const n=(0,u.A)({props:e,name:"MuiFormHelperText"}),{children:a,className:l,component:c="p"}=n,d=(0,i.A)(n,M),h=(0,v.A)(),f=(0,g.A)({props:n,muiFormControl:h,states:["variant","size","disabled","error","filled","focused","required"]}),p=(0,r.A)({},n,{component:c,contained:"filled"===f.variant||"outlined"===f.variant,variant:f.variant,size:f.size,disabled:f.disabled,error:f.error,filled:f.filled,focused:f.focused,required:f.required}),m=(e=>{const{classes:t,contained:n,size:r,disabled:i,error:a,filled:o,focused:l,required:c}=e,u={root:["root",i&&"disabled",a&&"error",r&&`size${(0,y.A)(r)}`,n&&"contained",l&&"focused",o&&"filled",c&&"required"]};return(0,s.A)(u,_,t)})(p);return(0,S.jsx)(T,(0,r.A)({as:c,ownerState:p,className:(0,o.A)(m.root,l),ref:t},d,{children:" "===a?A||(A=(0,S.jsx)("span",{className:"notranslate",children:"\u200b"})):a}))}));var E=n(70006);function C(e){return(0,b.A)("MuiTextField",e)}(0,x.A)("MuiTextField",["root"]);const D=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],R={standard:d.A,filled:h.A,outlined:f.A},P=(0,c.Ay)(m.A,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),O=a.forwardRef((function(e,t){const n=(0,u.A)({props:e,name:"MuiTextField"}),{autoComplete:a,autoFocus:c=!1,children:d,className:h,color:f="primary",defaultValue:m,disabled:g=!1,error:v=!1,FormHelperTextProps:y,fullWidth:x=!1,helperText:b,id:_,InputLabelProps:w,inputProps:A,InputProps:M,inputRef:T,label:O,maxRows:L,minRows:I,multiline:z=!1,name:N,onBlur:F,onChange:B,onFocus:j,placeholder:U,required:V=!1,rows:H,select:W=!1,SelectProps:G,type:q,value:Y,variant:$="outlined"}=n,X=(0,i.A)(n,D),Z=(0,r.A)({},n,{autoFocus:c,color:f,disabled:g,error:v,fullWidth:x,multiline:z,required:V,select:W,variant:$}),K=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"]},C,t)})(Z);const J={};"outlined"===$&&(w&&"undefined"!==typeof w.shrink&&(J.notched=w.shrink),J.label=O),W&&(G&&G.native||(J.id=void 0),J["aria-describedby"]=void 0);const Q=(0,l.A)(_),ee=b&&Q?`${Q}-helper-text`:void 0,te=O&&Q?`${Q}-label`:void 0,ne=R[$],re=(0,S.jsx)(ne,(0,r.A)({"aria-describedby":ee,autoComplete:a,autoFocus:c,defaultValue:m,fullWidth:x,multiline:z,name:N,rows:H,maxRows:L,minRows:I,type:q,value:Y,id:Q,inputRef:T,onBlur:F,onChange:B,onFocus:j,placeholder:U,inputProps:A},J,M));return(0,S.jsxs)(P,(0,r.A)({className:(0,o.A)(K.root,h),disabled:g,error:v,fullWidth:x,ref:t,required:V,color:f,variant:$,ownerState:Z},X,{children:[null!=O&&""!==O&&(0,S.jsx)(p.A,(0,r.A)({htmlFor:Q,id:te},w,{children:O})),W?(0,S.jsx)(E.A,(0,r.A)({"aria-describedby":ee,id:Q,labelId:te,value:Y,input:re},G,{children:d})):re,b&&(0,S.jsx)(k,(0,r.A)({id:ee},y,{children:b}))]}))}))},83274:(e,t,n)=>{"use strict";n.d(t,{A:()=>L});var r=n(98587),i=n(58168),a=n(9950),o=n(2803),s=n(88465),l=n(1534),c=n(97497),u=n(59254),d=n(14857),h=n(48283),f=n(61676),p=n(40165),m=n(69363),g=n(1976),v=n(31506),y=n(31014),x=n(41573),b=n(48733),_=n(1763),w=n(423);function A(e){return(0,w.A)("MuiTooltip",e)}const S=(0,_.A)("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);var M=n(44414);const T=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];const k=(0,u.Ay)(m.A,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})((e=>{let{theme:t,ownerState:n,open:r}=e;return(0,i.A)({zIndex:(t.vars||t).zIndex.tooltip,pointerEvents:"none"},!n.disableInteractive&&{pointerEvents:"auto"},!r&&{pointerEvents:"none"},n.arrow&&{[`&[data-popper-placement*="bottom"] .${S.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${S.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${S.arrow}`]:(0,i.A)({},n.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${S.arrow}`]:(0,i.A)({},n.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})})),E=(0,u.Ay)("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${(0,f.A)(n.placement.split("-")[0])}`]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({backgroundColor:t.vars?t.vars.palette.Tooltip.bg:(0,c.X4)(t.palette.grey[700],.92),borderRadius:(t.vars||t).shape.borderRadius,color:(t.vars||t).palette.common.white,fontFamily:t.typography.fontFamily,padding:"4px 8px",fontSize:t.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:t.typography.fontWeightMedium},n.arrow&&{position:"relative",margin:0},n.touch&&{padding:"8px 16px",fontSize:t.typography.pxToRem(14),lineHeight:(r=16/14,Math.round(1e5*r)/1e5)+"em",fontWeight:t.typography.fontWeightRegular},{[`.${S.popper}[data-popper-placement*="left"] &`]:(0,i.A)({transformOrigin:"right center"},n.isRtl?(0,i.A)({marginLeft:"14px"},n.touch&&{marginLeft:"24px"}):(0,i.A)({marginRight:"14px"},n.touch&&{marginRight:"24px"})),[`.${S.popper}[data-popper-placement*="right"] &`]:(0,i.A)({transformOrigin:"left center"},n.isRtl?(0,i.A)({marginRight:"14px"},n.touch&&{marginRight:"24px"}):(0,i.A)({marginLeft:"14px"},n.touch&&{marginLeft:"24px"})),[`.${S.popper}[data-popper-placement*="top"] &`]:(0,i.A)({transformOrigin:"center bottom",marginBottom:"14px"},n.touch&&{marginBottom:"24px"}),[`.${S.popper}[data-popper-placement*="bottom"] &`]:(0,i.A)({transformOrigin:"center top",marginTop:"14px"},n.touch&&{marginTop:"24px"})});var r})),C=(0,u.Ay)("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})((e=>{let{theme:t}=e;return{overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:t.vars?t.vars.palette.Tooltip.bg:(0,c.X4)(t.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}}));let D=!1,R=null,P={x:0,y:0};function O(e,t){return n=>{t&&t(n),e(n)}}const L=a.forwardRef((function(e,t){var n,c,u,_,w,S,L,I,z,N,F,B,j,U,V,H,W,G,q;const Y=(0,h.A)({props:e,name:"MuiTooltip"}),{arrow:$=!1,children:X,components:Z={},componentsProps:K={},describeChild:J=!1,disableFocusListener:Q=!1,disableHoverListener:ee=!1,disableInteractive:te=!1,disableTouchListener:ne=!1,enterDelay:re=100,enterNextDelay:ie=0,enterTouchDelay:ae=700,followCursor:oe=!1,id:se,leaveDelay:le=0,leaveTouchDelay:ce=1500,onClose:ue,onOpen:de,open:he,placement:fe="bottom",PopperComponent:pe,PopperProps:me={},slotProps:ge={},slots:ve={},title:ye,TransitionComponent:xe=p.A,TransitionProps:be}=Y,_e=(0,r.A)(Y,T),we=(0,d.A)(),Ae="rtl"===we.direction,[Se,Me]=a.useState(),[Te,ke]=a.useState(null),Ee=a.useRef(!1),Ce=te||oe,De=a.useRef(),Re=a.useRef(),Pe=a.useRef(),Oe=a.useRef(),[Le,Ie]=(0,b.A)({controlled:he,default:!1,name:"Tooltip",state:"open"});let ze=Le;const Ne=(0,y.A)(se),Fe=a.useRef(),Be=a.useCallback((()=>{void 0!==Fe.current&&(document.body.style.WebkitUserSelect=Fe.current,Fe.current=void 0),clearTimeout(Oe.current)}),[]);a.useEffect((()=>()=>{clearTimeout(De.current),clearTimeout(Re.current),clearTimeout(Pe.current),Be()}),[Be]);const je=e=>{clearTimeout(R),D=!0,Ie(!0),de&&!ze&&de(e)},Ue=(0,g.A)((e=>{clearTimeout(R),R=setTimeout((()=>{D=!1}),800+le),Ie(!1),ue&&ze&&ue(e),clearTimeout(De.current),De.current=setTimeout((()=>{Ee.current=!1}),we.transitions.duration.shortest)})),Ve=e=>{Ee.current&&"touchstart"!==e.type||(Se&&Se.removeAttribute("title"),clearTimeout(Re.current),clearTimeout(Pe.current),re||D&&ie?Re.current=setTimeout((()=>{je(e)}),D?ie:re):je(e))},He=e=>{clearTimeout(Re.current),clearTimeout(Pe.current),Pe.current=setTimeout((()=>{Ue(e)}),le)},{isFocusVisibleRef:We,onBlur:Ge,onFocus:qe,ref:Ye}=(0,x.A)(),[,$e]=a.useState(!1),Xe=e=>{Ge(e),!1===We.current&&($e(!1),He(e))},Ze=e=>{Se||Me(e.currentTarget),qe(e),!0===We.current&&($e(!0),Ve(e))},Ke=e=>{Ee.current=!0;const t=X.props;t.onTouchStart&&t.onTouchStart(e)},Je=Ve,Qe=He,et=e=>{Ke(e),clearTimeout(Pe.current),clearTimeout(De.current),Be(),Fe.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",Oe.current=setTimeout((()=>{document.body.style.WebkitUserSelect=Fe.current,Ve(e)}),ae)},tt=e=>{X.props.onTouchEnd&&X.props.onTouchEnd(e),Be(),clearTimeout(Pe.current),Pe.current=setTimeout((()=>{Ue(e)}),ce)};a.useEffect((()=>{if(ze)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){"Escape"!==e.key&&"Esc"!==e.key||Ue(e)}}),[Ue,ze]);const nt=(0,v.A)(X.ref,Ye,Me,t);ye||0===ye||(ze=!1);const rt=a.useRef(),it={},at="string"===typeof ye;J?(it.title=ze||!at||ee?null:ye,it["aria-describedby"]=ze?Ne:null):(it["aria-label"]=at?ye:null,it["aria-labelledby"]=ze&&!at?Ne:null);const ot=(0,i.A)({},it,_e,X.props,{className:(0,o.A)(_e.className,X.props.className),onTouchStart:Ke,ref:nt},oe?{onMouseMove:e=>{const t=X.props;t.onMouseMove&&t.onMouseMove(e),P={x:e.clientX,y:e.clientY},rt.current&&rt.current.update()}}:{});const st={};ne||(ot.onTouchStart=et,ot.onTouchEnd=tt),ee||(ot.onMouseOver=O(Je,ot.onMouseOver),ot.onMouseLeave=O(Qe,ot.onMouseLeave),Ce||(st.onMouseOver=Je,st.onMouseLeave=Qe)),Q||(ot.onFocus=O(Ze,ot.onFocus),ot.onBlur=O(Xe,ot.onBlur),Ce||(st.onFocus=Ze,st.onBlur=Xe));const lt=a.useMemo((()=>{var e;let t=[{name:"arrow",enabled:Boolean(Te),options:{element:Te,padding:4}}];return null!=(e=me.popperOptions)&&e.modifiers&&(t=t.concat(me.popperOptions.modifiers)),(0,i.A)({},me.popperOptions,{modifiers:t})}),[Te,me]),ct=(0,i.A)({},Y,{isRtl:Ae,arrow:$,disableInteractive:Ce,placement:fe,PopperComponentProp:pe,touch:Ee.current}),ut=(e=>{const{classes:t,disableInteractive:n,arrow:r,touch:i,placement:a}=e,o={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",i&&"touch",`tooltipPlacement${(0,f.A)(a.split("-")[0])}`],arrow:["arrow"]};return(0,s.A)(o,A,t)})(ct),dt=null!=(n=null!=(c=ve.popper)?c:Z.Popper)?n:k,ht=null!=(u=null!=(_=null!=(w=ve.transition)?w:Z.Transition)?_:xe)?u:p.A,ft=null!=(S=null!=(L=ve.tooltip)?L:Z.Tooltip)?S:E,pt=null!=(I=null!=(z=ve.arrow)?z:Z.Arrow)?I:C,mt=(0,l.A)(dt,(0,i.A)({},me,null!=(N=ge.popper)?N:K.popper,{className:(0,o.A)(ut.popper,null==me?void 0:me.className,null==(F=null!=(B=ge.popper)?B:K.popper)?void 0:F.className)}),ct),gt=(0,l.A)(ht,(0,i.A)({},be,null!=(j=ge.transition)?j:K.transition),ct),vt=(0,l.A)(ft,(0,i.A)({},null!=(U=ge.tooltip)?U:K.tooltip,{className:(0,o.A)(ut.tooltip,null==(V=null!=(H=ge.tooltip)?H:K.tooltip)?void 0:V.className)}),ct),yt=(0,l.A)(pt,(0,i.A)({},null!=(W=ge.arrow)?W:K.arrow,{className:(0,o.A)(ut.arrow,null==(G=null!=(q=ge.arrow)?q:K.arrow)?void 0:G.className)}),ct);return(0,M.jsxs)(a.Fragment,{children:[a.cloneElement(X,ot),(0,M.jsx)(dt,(0,i.A)({as:null!=pe?pe:m.A,placement:fe,anchorEl:oe?{getBoundingClientRect:()=>({top:P.y,left:P.x,right:P.x,bottom:P.y,width:0,height:0})}:Se,popperRef:rt,open:!!Se&&ze,id:Ne,transition:!0},st,mt,{popperOptions:lt,children:e=>{let{TransitionProps:t}=e;return(0,M.jsx)(ht,(0,i.A)({timeout:we.transitions.duration.shorter},t,gt,{children:(0,M.jsxs)(ft,(0,i.A)({},vt,{children:[ye,$?(0,M.jsx)(pt,(0,i.A)({},yt,{ref:ke})):null]}))}))}}))]})}))},82053:(e,t,n)=>{"use strict";n.d(t,{A:()=>b});var r=n(98587),i=n(58168),a=n(9950),o=n(2803),s=n(80237),l=n(88465),c=n(59254),u=n(48283),d=n(61676),h=n(1763),f=n(423);function p(e){return(0,f.A)("MuiTypography",e)}(0,h.A)("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);var m=n(44414);const g=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],v=(0,c.Ay)("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t[`align${(0,d.A)(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({margin:0},n.variant&&t.typography[n.variant],"inherit"!==n.align&&{textAlign:n.align},n.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n.gutterBottom&&{marginBottom:"0.35em"},n.paragraph&&{marginBottom:16})})),y={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},x={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},b=a.forwardRef((function(e,t){const n=(0,u.A)({props:e,name:"MuiTypography"}),a=(e=>x[e]||e)(n.color),c=(0,s.A)((0,i.A)({},n,{color:a})),{align:h="inherit",className:f,component:b,gutterBottom:_=!1,noWrap:w=!1,paragraph:A=!1,variant:S="body1",variantMapping:M=y}=c,T=(0,r.A)(c,g),k=(0,i.A)({},c,{align:h,color:a,className:f,component:b,gutterBottom:_,noWrap:w,paragraph:A,variant:S,variantMapping:M}),E=b||(A?"p":M[S]||y[S])||"span",C=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:a,classes:o}=e,s={root:["root",a,"inherit"!==e.align&&`align${(0,d.A)(t)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return(0,l.A)(s,p,o)})(k);return(0,m.jsx)(v,(0,i.A)({as:E,ref:t,ownerState:k,className:(0,o.A)(C.root,f)},T))}))},46282:(e,t,n)=>{"use strict";n.d(t,{A:()=>b});var r=n(98587),i=n(58168),a=n(9950),o=n(2803),s=n(88465),l=n(61676),c=n(59254),u=n(48733),d=n(39766),h=n(24184),f=n(1763),p=n(423);function m(e){return(0,p.A)("PrivateSwitchBase",e)}(0,f.A)("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);var g=n(44414);const v=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],y=(0,c.Ay)(h.A)((e=>{let{ownerState:t}=e;return(0,i.A)({padding:9,borderRadius:"50%"},"start"===t.edge&&{marginLeft:"small"===t.size?-3:-12},"end"===t.edge&&{marginRight:"small"===t.size?-3:-12})})),x=(0,c.Ay)("input")({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),b=a.forwardRef((function(e,t){const{autoFocus:n,checked:a,checkedIcon:c,className:h,defaultChecked:f,disabled:p,disableFocusRipple:b=!1,edge:_=!1,icon:w,id:A,inputProps:S,inputRef:M,name:T,onBlur:k,onChange:E,onFocus:C,readOnly:D,required:R=!1,tabIndex:P,type:O,value:L}=e,I=(0,r.A)(e,v),[z,N]=(0,u.A)({controlled:a,default:Boolean(f),name:"SwitchBase",state:"checked"}),F=(0,d.A)();let B=p;F&&"undefined"===typeof B&&(B=F.disabled);const j="checkbox"===O||"radio"===O,U=(0,i.A)({},e,{checked:z,disabled:B,disableFocusRipple:b,edge:_}),V=(e=>{const{classes:t,checked:n,disabled:r,edge:i}=e,a={root:["root",n&&"checked",r&&"disabled",i&&`edge${(0,l.A)(i)}`],input:["input"]};return(0,s.A)(a,m,t)})(U);return(0,g.jsxs)(y,(0,i.A)({component:"span",className:(0,o.A)(V.root,h),centerRipple:!0,focusRipple:!b,disabled:B,tabIndex:null,role:void 0,onFocus:e=>{C&&C(e),F&&F.onFocus&&F.onFocus(e)},onBlur:e=>{k&&k(e),F&&F.onBlur&&F.onBlur(e)},ownerState:U,ref:t},I,{children:[(0,g.jsx)(x,(0,i.A)({autoFocus:n,checked:a,defaultChecked:f,className:V.input,disabled:B,id:j?A:void 0,name:T,onChange:e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;N(t),E&&E(e,t)},readOnly:D,ref:M,required:R,ownerState:U,tabIndex:P,type:O},"checkbox"===O&&void 0===L?{}:{value:L},S)),z?c:w]}))}))},63976:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});n(9950);var r=n(65471),i=n(44414);const a=(0,r.A)((0,i.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown")},24436:(e,t,n)=>{"use strict";n.d(t,{A:()=>L});var r=n(58168),i=n(98587),a=n(9753),o=n(9034),s=n(72341),l=n(98076),c=n(70505);var u=n(97497);const d={black:"#000",white:"#fff"},h={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},f={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},p={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},m={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},g={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},v={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},y={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},x=["mode","contrastThreshold","tonalOffset"],b={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:d.white,default:d.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},_={text:{primary:d.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:d.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function w(e,t,n,r){const i=r.light||r,a=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=(0,u.a)(e.main,i):"dark"===t&&(e.dark=(0,u.e$)(e.main,a)))}function A(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:s=.2}=e,l=(0,i.A)(e,x),c=e.primary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:g[200],light:g[50],dark:g[400]}:{main:g[700],light:g[400],dark:g[800]}}(t),A=e.secondary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:f[200],light:f[50],dark:f[400]}:{main:f[500],light:f[300],dark:f[700]}}(t),S=e.error||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:p[500],light:p[300],dark:p[700]}:{main:p[700],light:p[400],dark:p[800]}}(t),M=e.info||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:v[400],light:v[300],dark:v[700]}:{main:v[700],light:v[500],dark:v[900]}}(t),T=e.success||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:y[400],light:y[300],dark:y[700]}:{main:y[800],light:y[500],dark:y[900]}}(t),k=e.warning||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:m[400],light:m[300],dark:m[700]}:{main:"#ed6c02",light:m[500],dark:m[900]}}(t);function E(e){return(0,u.eM)(e,_.text.primary)>=n?_.text.primary:b.text.primary}const C=e=>{let{color:t,name:n,mainShade:i=500,lightShade:o=300,darkShade:l=700}=e;if(t=(0,r.A)({},t),!t.main&&t[i]&&(t.main=t[i]),!t.hasOwnProperty("main"))throw new Error((0,a.A)(11,n?` (${n})`:"",i));if("string"!==typeof t.main)throw new Error((0,a.A)(12,n?` (${n})`:"",JSON.stringify(t.main)));return w(t,"light",o,s),w(t,"dark",l,s),t.contrastText||(t.contrastText=E(t.main)),t},D={dark:_,light:b};return(0,o.A)((0,r.A)({common:(0,r.A)({},d),mode:t,primary:C({color:c,name:"primary"}),secondary:C({color:A,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:C({color:S,name:"error"}),warning:C({color:k,name:"warning"}),info:C({color:M,name:"info"}),success:C({color:T,name:"success"}),grey:h,contrastThreshold:n,getContrastText:E,augmentColor:C,tonalOffset:s},D[t]),l)}const S=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];const M={textTransform:"uppercase"},T='"Roboto", "Helvetica", "Arial", sans-serif';function k(e,t){const n="function"===typeof t?t(e):t,{fontFamily:a=T,fontSize:s=14,fontWeightLight:l=300,fontWeightRegular:c=400,fontWeightMedium:u=500,fontWeightBold:d=700,htmlFontSize:h=16,allVariants:f,pxToRem:p}=n,m=(0,i.A)(n,S);const g=s/14,v=p||(e=>e/h*g+"rem"),y=(e,t,n,i,o)=>{return(0,r.A)({fontFamily:a,fontWeight:e,fontSize:v(t),lineHeight:n},a===T?{letterSpacing:(s=i/t,Math.round(1e5*s)/1e5)+"em"}:{},o,f);var s},x={h1:y(l,96,1.167,-1.5),h2:y(l,60,1.2,-.5),h3:y(c,48,1.167,0),h4:y(c,34,1.235,.25),h5:y(c,24,1.334,0),h6:y(u,20,1.6,.15),subtitle1:y(c,16,1.75,.15),subtitle2:y(u,14,1.57,.1),body1:y(c,16,1.5,.15),body2:y(c,14,1.43,.15),button:y(u,14,1.75,.4,M),caption:y(c,12,1.66,.4),overline:y(c,12,2.66,1,M)};return(0,o.A)((0,r.A)({htmlFontSize:h,pxToRem:v,fontFamily:a,fontSize:s,fontWeightLight:l,fontWeightRegular:c,fontWeightMedium:u,fontWeightBold:d},x),m,{clone:!1})}function E(){return[`${arguments.length<=0?void 0:arguments[0]}px ${arguments.length<=1?void 0:arguments[1]}px ${arguments.length<=2?void 0:arguments[2]}px ${arguments.length<=3?void 0:arguments[3]}px rgba(0,0,0,0.2)`,`${arguments.length<=4?void 0:arguments[4]}px ${arguments.length<=5?void 0:arguments[5]}px ${arguments.length<=6?void 0:arguments[6]}px ${arguments.length<=7?void 0:arguments[7]}px rgba(0,0,0,0.14)`,`${arguments.length<=8?void 0:arguments[8]}px ${arguments.length<=9?void 0:arguments[9]}px ${arguments.length<=10?void 0:arguments[10]}px ${arguments.length<=11?void 0:arguments[11]}px rgba(0,0,0,0.12)`].join(",")}const C=["none",E(0,2,1,-1,0,1,1,0,0,1,3,0),E(0,3,1,-2,0,2,2,0,0,1,5,0),E(0,3,3,-2,0,3,4,0,0,1,8,0),E(0,2,4,-1,0,4,5,0,0,1,10,0),E(0,3,5,-1,0,5,8,0,0,1,14,0),E(0,3,5,-1,0,6,10,0,0,1,18,0),E(0,4,5,-2,0,7,10,1,0,2,16,1),E(0,5,5,-3,0,8,10,1,0,3,14,2),E(0,5,6,-3,0,9,12,1,0,3,16,2),E(0,6,6,-3,0,10,14,1,0,4,18,3),E(0,6,7,-4,0,11,15,1,0,4,20,3),E(0,7,8,-4,0,12,17,2,0,5,22,4),E(0,7,8,-4,0,13,19,2,0,5,24,4),E(0,7,9,-4,0,14,21,2,0,5,26,4),E(0,8,9,-5,0,15,22,2,0,6,28,5),E(0,8,10,-5,0,16,24,2,0,6,30,5),E(0,8,11,-5,0,17,26,2,0,6,32,5),E(0,9,11,-5,0,18,28,2,0,7,34,6),E(0,9,12,-6,0,19,29,2,0,7,36,6),E(0,10,13,-6,0,20,31,3,0,8,38,7),E(0,10,13,-6,0,21,33,3,0,8,40,7),E(0,10,14,-6,0,22,35,3,0,8,42,7),E(0,11,14,-7,0,23,36,3,0,9,44,8),E(0,11,15,-7,0,24,38,3,0,9,46,8)];var D=n(75361);const R={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},P=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function O(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{mixins:t={},palette:n={},transitions:u={},typography:d={}}=e,h=(0,i.A)(e,P);if(e.vars)throw new Error((0,a.A)(18));const f=A(n),p=(0,s.A)(e);let m=(0,o.A)(p,{mixins:(g=p.breakpoints,v=t,(0,r.A)({toolbar:{minHeight:56,[g.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[g.up("sm")]:{minHeight:64}}},v)),palette:f,shadows:C.slice(),typography:k(f,d),transitions:(0,D.Ay)(u),zIndex:(0,r.A)({},R)});var g,v;m=(0,o.A)(m,h);for(var y=arguments.length,x=new Array(y>1?y-1:0),b=1;b(0,o.A)(e,t)),m),m.unstable_sxConfig=(0,r.A)({},l.A,null==h?void 0:h.unstable_sxConfig),m.unstable_sx=function(e){return(0,c.A)({sx:e,theme:this})},m}const L=O},75361:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>u,p0:()=>s});var r=n(98587),i=n(58168);const a=["duration","easing","delay"],o={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},s={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function l(e){return`${Math.round(e)}ms`}function c(e){if(!e)return 0;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}function u(e){const t=(0,i.A)({},o,e.easing),n=(0,i.A)({},s,e.duration);return(0,i.A)({getAutoHeightDuration:c,create:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{duration:o=n.standard,easing:s=t.easeInOut,delay:c=0}=i;(0,r.A)(i,a);return(Array.isArray(e)?e:[e]).map((e=>`${e} ${"string"===typeof o?o:l(o)} ${s} ${"string"===typeof c?c:l(c)}`)).join(",")}},e,{easing:t,duration:n})}},60195:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=(0,n(24436).A)()},59254:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>s,_n:()=>o,ep:()=>a});var r=n(17089),i=n(60195);const a=e=>(0,r.MC)(e)&&"classes"!==e,o=r.MC,s=(0,r.Ay)({defaultTheme:i.A,rootShouldForwardProp:a})},14857:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});n(9950);var r=n(7148),i=n(60195);function a(){return(0,r.A)(i.A)}},48283:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(62161),i=n(60195);function a(e){let{props:t,name:n}=e;return(0,r.A)({props:t,name:n,defaultTheme:i.A})}},70576:(e,t,n)=>{"use strict";n.d(t,{c:()=>i,q:()=>r});const r=e=>e.scrollTop;function i(e,t){var n,r;const{timeout:i,easing:a,style:o={}}=e;return{duration:null!=(n=o.transitionDuration)?n:"number"===typeof i?i:i[t.mode]||0,easing:null!=(r=o.transitionTimingFunction)?r:"object"===typeof a?a[t.mode]:a,delay:o.transitionDelay}}},22433:(e,t,n)=>{"use strict";var r;n.d(t,{A:()=>d});var i=n(9950),a=n(90357),o=n(51522),s=n(79044);function l(e,t,n,r,a){const[o,l]=i.useState((()=>a&&n?n(e).matches:r?r(e).matches:t));return(0,s.A)((()=>{let t=!0;if(!n)return;const r=n(e),i=()=>{t&&l(r.matches)};return i(),r.addListener(i),()=>{t=!1,r.removeListener(i)}}),[e,n]),o}const c=(r||(r=n.t(i,2))).useSyncExternalStore;function u(e,t,n,r,a){const o=i.useCallback((()=>t),[t]),s=i.useMemo((()=>{if(a&&n)return()=>n(e).matches;if(null!==r){const{matches:t}=r(e);return()=>t}return o}),[o,e,r,a,n]),[l,u]=i.useMemo((()=>{if(null===n)return[o,()=>()=>{}];const t=n(e);return[()=>t.matches,e=>(t.addListener(e),()=>{t.removeListener(e)})]}),[o,n,e]);return c(u,l,s)}function d(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(0,a.A)(),r="undefined"!==typeof window&&"undefined"!==typeof window.matchMedia,{defaultMatches:i=!1,matchMedia:s=(r?window.matchMedia:null),ssrMatchMedia:d=null,noSsr:h=!1}=(0,o.A)({name:"MuiUseMediaQuery",props:t,theme:n});let f="function"===typeof e?e(n):e;f=f.replace(/^@media( ?)/m,"");return(void 0!==c?u:l)(f,i,s,d,h)}},61676:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(77532).A},25920:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(2192).A},65471:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(58168),i=n(9950),a=n(9360),o=n(44414);function s(e,t){function n(n,i){return(0,o.jsx)(a.A,(0,r.A)({"data-testid":`${t}Icon`,ref:i},n,{children:e}))}return n.muiName=a.A.muiName,i.memo(i.forwardRef(n))}},21209:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(11721).A},39511:(e,t,n)=>{"use strict";n.r(t),n.d(t,{capitalize:()=>i.A,createChainedFunction:()=>a.A,createSvgIcon:()=>o.A,debounce:()=>s.A,deprecatedPropType:()=>l,isMuiElement:()=>c.A,ownerDocument:()=>u.A,ownerWindow:()=>d.A,requirePropFactory:()=>h,setRef:()=>f,unstable_ClassNameGenerator:()=>_,unstable_useEnhancedEffect:()=>p.A,unstable_useId:()=>m.A,unsupportedProp:()=>g,useControlled:()=>v.A,useEventCallback:()=>y.A,useForkRef:()=>x.A,useIsFocusVisible:()=>b.A});var r=n(44501),i=n(61676),a=n(25920),o=n(65471),s=n(21209);const l=function(e,t){return()=>null};var c=n(10834),u=n(27402),d=n(70827);n(58168);const h=function(e,t){return()=>null};const f=n(455).A;var p=n(79044),m=n(31014);const g=function(e,t,n,r,i){return null};var v=n(48733),y=n(1976),x=n(31506),b=n(41573);const _={configure:e=>{r.A.configure(e)}}},10834:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(9950);const i=function(e,t){return r.isValidElement(e)&&-1!==t.indexOf(e.type.muiName)}},27402:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(61786).A},70827:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(66459).A},48733:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(66349).A},79044:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(91700).A},1976:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(81448).A},31506:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(28866).A},31014:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(81174).A},41573:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(82101).A},80740:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(9950).createContext(null)},21784:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(9950),i=n(80740);function a(){return r.useContext(i.A)}},2199:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>v,q_:()=>y});var r=n(58168),i=n(57370),a=n(89015),o=n(96477),s=n(71783),l=n(9950),c=n(57923),u=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,d=(0,c.A)((function(e){return u.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),h=function(e){return"theme"!==e},f=function(e){return"string"===typeof e&&e.charCodeAt(0)>96?d:h},p=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!==typeof r&&n&&(r=e.__emotion_forwardProp),r},m=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return(0,s.SF)(t,n,r),(0,o.s)((function(){return(0,s.sk)(t,n,r)})),null},g=function e(t,n){var o,c,u=t.__emotion_real===t,d=u&&t.__emotion_base||t;void 0!==n&&(o=n.label,c=n.target);var h=p(t,n,u),g=h||f(d),v=!g("as");return function(){var y=arguments,x=u&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==o&&x.push("label:"+o+";"),null==y[0]||void 0===y[0].raw)x.push.apply(x,y);else{var b=y[0];x.push(b[0]);for(var _=y.length,w=1;w<_;w++)x.push(y[w],b[w])}var A=(0,i.w)((function(e,t,n){var r=v&&e.as||d,o="",u=[],p=e;if(null==e.theme){for(var y in p={},e)p[y]=e[y];p.theme=l.useContext(i.T)}"string"===typeof e.className?o=(0,s.Rk)(t.registered,u,e.className):null!=e.className&&(o=e.className+" ");var b=(0,a.J)(x.concat(u),t.registered,p);o+=t.key+"-"+b.name,void 0!==c&&(o+=" "+c);var _=v&&void 0===h?f(r):g,w={};for(var A in e)v&&"as"===A||_(A)&&(w[A]=e[A]);return w.className=o,n&&(w.ref=n),l.createElement(l.Fragment,null,l.createElement(m,{cache:t,serialized:b,isStringTag:"string"===typeof r}),l.createElement(r,w))}));return A.displayName=void 0!==o?o:"Styled("+("string"===typeof d?d:d.displayName||d.name||"Component")+")",A.defaultProps=t.defaultProps,A.__emotion_real=A,A.__emotion_base=d,A.__emotion_styles=x,A.__emotion_forwardProp=h,Object.defineProperty(A,"toString",{value:function(){return"."+c}}),A.withComponent=function(t,i){return e(t,(0,r.A)({},n,i,{shouldForwardProp:p(A,i,!0)})).apply(void 0,x)},A}}.bind(null);function v(e,t){return g(e,t)}["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){g[e]=g(e)}));const y=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}},28286:(e,t,n)=>{"use strict";n.d(t,{EU:()=>s,NI:()=>o,iZ:()=>c,kW:()=>u,vf:()=>l,zu:()=>i});var r=n(9034);const i={xs:0,sm:600,md:900,lg:1200,xl:1536},a={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${i[e]}px)`};function o(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||a;return t.reduce(((r,i,a)=>(r[e.up(e.keys[a])]=n(t[a]),r)),{})}if("object"===typeof t){const e=r.breakpoints||a;return Object.keys(t).reduce(((r,a)=>{if(-1!==Object.keys(e.values||i).indexOf(a)){r[e.up(a)]=n(t[a],a)}else{const e=a;r[e]=t[e]}return r}),{})}return n(t)}function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t;return(null==(t=e.keys)?void 0:t.reduce(((t,n)=>(t[e.up(n)]={},t)),{}))||{}}function l(e,t){return e.reduce(((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}function c(e){const t=s(e);for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a(0,r.A)(e,t)),{});return l(Object.keys(t),o)}function u(e){let{values:t,breakpoints:n,base:r}=e;const i=r||function(e,t){if("object"!==typeof e)return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach(((t,r)=>{r{null!=e[t]&&(n[t]=!0)})),n}(t,n),a=Object.keys(i);if(0===a.length)return t;let o;return a.reduce(((e,n,r)=>(Array.isArray(t)?(e[n]=null!=t[r]?t[r]:t[o],o=r):"object"===typeof t?(e[n]=null!=t[n]?t[n]:t[o],o=n):e[n]=t,e)),{})}},97497:(e,t,n)=>{"use strict";n.d(t,{X4:()=>c,a:()=>d,e$:()=>u,eM:()=>l,tL:()=>h});var r=n(9753);function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)}function a(e){if(e.type)return e;if("#"===e.charAt(0))return a(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map((e=>e+e))),n?`rgb${4===n.length?"a":""}(${n.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", ")})`:""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error((0,r.A)(9,e));let i,o=e.substring(t+1,e.length-1);if("color"===n){if(o=o.split(" "),i=o.shift(),4===o.length&&"/"===o[3].charAt(0)&&(o[3]=o[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i))throw new Error((0,r.A)(10,i))}else o=o.split(",");return o=o.map((e=>parseFloat(e))),{type:n,values:o,colorSpace:i}}function o(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return-1!==t.indexOf("rgb")?r=r.map(((e,t)=>t<3?parseInt(e,10):e)):-1!==t.indexOf("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=-1!==t.indexOf("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${t}(${r})`}function s(e){let t="hsl"===(e=a(e)).type||"hsla"===e.type?a(function(e){e=a(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,s=r*Math.min(i,1-i),l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return i-s*Math.max(Math.min(t-3,9-t,1),-1)};let c="rgb";const u=[Math.round(255*l(0)),Math.round(255*l(8)),Math.round(255*l(4))];return"hsla"===e.type&&(c+="a",u.push(t[3])),o({type:c,values:u})}(e)).values:e.values;return t=t.map((t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function l(e,t){const n=s(e),r=s(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function c(e,t){return e=a(e),t=i(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,o(e)}function u(e,t){if(e=a(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return o(e)}function d(e,t){if(e=a(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return o(e)}function h(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return s(e)>.5?u(e,t):d(e,t)}},17089:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>_,MC:()=>x});var r=n(98587),i=n(58168),a=n(2199),o=n(72341),s=n(77532);const l=["variant"];function c(e){return 0===e.length}function u(e){const{variant:t}=e,n=(0,r.A)(e,l);let i=t||"";return Object.keys(n).sort().forEach((t=>{i+="color"===t?c(i)?e[t]:(0,s.A)(e[t]):`${c(i)?t:(0,s.A)(t)}${(0,s.A)(e[t].toString())}`})),i}var d=n(70505);const h=["name","slot","skipVariantsResolver","skipSx","overridesResolver"],f=["theme"],p=["theme"];function m(e){return 0===Object.keys(e).length}const g=(e,t)=>t.components&&t.components[e]&&t.components[e].styleOverrides?t.components[e].styleOverrides:null,v=(e,t)=>{let n=[];t&&t.components&&t.components[e]&&t.components[e].variants&&(n=t.components[e].variants);const r={};return n.forEach((e=>{const t=u(e.props);r[t]=e.style})),r},y=(e,t,n,r)=>{var i,a;const{ownerState:o={}}=e,s=[],l=null==n||null==(i=n.components)||null==(a=i[r])?void 0:a.variants;return l&&l.forEach((n=>{let r=!0;Object.keys(n.props).forEach((t=>{o[t]!==n.props[t]&&e[t]!==n.props[t]&&(r=!1)})),r&&s.push(t[u(n.props)])})),s};function x(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}const b=(0,o.A)();function _(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{defaultTheme:t=b,rootShouldForwardProp:n=x,slotShouldForwardProp:o=x}=e,s=e=>{const n=m(e.theme)?t:e.theme;return(0,d.A)((0,i.A)({},e,{theme:n}))};return s.__mui_systemSx=!0,function(e){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,a.q_)(e,(e=>e.filter((e=>!(null!=e&&e.__mui_systemSx)))));const{name:c,slot:u,skipVariantsResolver:d,skipSx:b,overridesResolver:_}=l,w=(0,r.A)(l,h),A=void 0!==d?d:u&&"Root"!==u||!1,S=b||!1;let M=x;"Root"===u?M=n:u?M=o:function(e){return"string"===typeof e&&e.charCodeAt(0)>96}(e)&&(M=void 0);const T=(0,a.Ay)(e,(0,i.A)({shouldForwardProp:M,label:undefined},w)),k=function(e){for(var n=arguments.length,a=new Array(n>1?n-1:0),o=1;o"function"===typeof e&&e.__emotion_real!==e?n=>{let{theme:a}=n,o=(0,r.A)(n,f);return e((0,i.A)({theme:m(a)?t:a},o))}:e)):[];let u=e;c&&_&&l.push((e=>{const n=m(e.theme)?t:e.theme,r=g(c,n);if(r){const t={};return Object.entries(r).forEach((r=>{let[a,o]=r;t[a]="function"===typeof o?o((0,i.A)({},e,{theme:n})):o})),_(e,t)}return null})),c&&!A&&l.push((e=>{const n=m(e.theme)?t:e.theme;return y(e,v(c,n),n,c)})),S||l.push(s);const d=l.length-a.length;if(Array.isArray(e)&&d>0){const t=new Array(d).fill("");u=[...e,...t],u.raw=[...e.raw,...t]}else"function"===typeof e&&e.__emotion_real!==e&&(u=n=>{let{theme:a}=n,o=(0,r.A)(n,p);return e((0,i.A)({theme:m(a)?t:a},o))});return T(u,...l)};return T.withConfig&&(k.withConfig=T.withConfig),k}}},72341:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var r=n(58168),i=n(98587),a=n(9034);const o=["values","unit","step"];function s(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:a=5}=e,s=(0,i.A)(e,o),l=(e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>(0,r.A)({},e,{[t.key]:t.val})),{})})(t),c=Object.keys(l);function u(e){return`@media (min-width:${"number"===typeof t[e]?t[e]:e}${n})`}function d(e){return`@media (max-width:${("number"===typeof t[e]?t[e]:e)-a/100}${n})`}function h(e,r){const i=c.indexOf(r);return`@media (min-width:${"number"===typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==i&&"number"===typeof t[c[i]]?t[c[i]]:r)-a/100}${n})`}return(0,r.A)({keys:c,values:l,up:u,down:d,between:h,only:function(e){return c.indexOf(e)+10&&void 0!==arguments[0]?arguments[0]:{};const{breakpoints:t={},palette:n={},spacing:o,shape:f={}}=e,p=(0,i.A)(e,h),m=s(t),g=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;const t=(0,c.LX)({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r{const n=t(e);return"number"===typeof n?`${n}px`:n})).join(" ")};return n.mui=!0,n}(o);let v=(0,a.A)({breakpoints:m,direction:"ltr",components:{},palette:(0,r.A)({mode:"light"},n),spacing:g,shape:(0,r.A)({},l,f)},p);for(var y=arguments.length,x=new Array(y>1?y-1:0),b=1;b(0,a.A)(e,t)),v),v.unstable_sxConfig=(0,r.A)({},d.A,null==p?void 0:p.unstable_sxConfig),v.unstable_sx=function(e){return(0,u.A)({sx:e,theme:this})},v}},46206:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(9034);const i=function(e,t){return t?(0,r.A)(e,t,{clone:!1}):e}},47937:(e,t,n)=>{"use strict";n.d(t,{LX:()=>p,MA:()=>f,_W:()=>m,Lc:()=>y,Ms:()=>x});var r=n(28286),i=n(12703),a=n(46206);const o={m:"margin",p:"padding"},s={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},l={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},c=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}((e=>{if(e.length>2){if(!l[e])return[e];e=l[e]}const[t,n]=e.split(""),r=o[t],i=s[n]||"";return Array.isArray(i)?i.map((e=>r+e)):[r+i]})),u=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],d=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],h=[...u,...d];function f(e,t,n,r){var a;const o=null!=(a=(0,i.Yn)(e,t,!1))?a:n;return"number"===typeof o?e=>"string"===typeof e?e:o*e:Array.isArray(o)?e=>"string"===typeof e?e:o[e]:"function"===typeof o?o:()=>{}}function p(e){return f(e,"spacing",8)}function m(e,t){if("string"===typeof t||null==t)return t;const n=e(Math.abs(t));return t>=0?n:"number"===typeof n?-n:`-${n}`}function g(e,t,n,i){if(-1===t.indexOf(n))return null;const a=function(e,t){return n=>e.reduce(((e,r)=>(e[r]=m(t,n),e)),{})}(c(n),i),o=e[n];return(0,r.NI)(e,o,a)}function v(e,t){const n=p(e.theme);return Object.keys(e).map((r=>g(e,t,r,n))).reduce(a.A,{})}function y(e){return v(e,u)}function x(e){return v(e,d)}function b(e){return v(e,h)}y.propTypes={},y.filterProps=u,x.propTypes={},x.filterProps=d,b.propTypes={},b.filterProps=h},12703:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>s,BO:()=>o,Yn:()=>a});var r=n(77532),i=n(28286);function a(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!t||"string"!==typeof t)return null;if(e&&e.vars&&n){const n=`vars.${t}`.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=n)return n}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function o(e,t,n){let r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;return r="function"===typeof e?e(n):Array.isArray(e)?e[n]||i:a(e,n)||i,t&&(r=t(r,i,e)),r}const s=function(e){const{prop:t,cssProperty:n=e.prop,themeKey:s,transform:l}=e,c=e=>{if(null==e[t])return null;const c=e[t],u=a(e.theme,s)||{};return(0,i.NI)(e,c,(e=>{let i=o(u,l,e);return e===i&&"string"===typeof e&&(i=o(u,l,`${t}${"default"===e?"":(0,r.A)(e)}`,e)),!1===n?i:{[n]:i}}))};return c.propTypes={},c.filterProps=[t],c}},98076:(e,t,n)=>{"use strict";n.d(t,{A:()=>R});var r=n(47937),i=n(12703),a=n(46206);const o=function(){for(var e=arguments.length,t=new Array(e),n=0;n(t.filterProps.forEach((n=>{e[n]=t})),e)),{}),i=e=>Object.keys(e).reduce(((t,n)=>r[n]?(0,a.A)(t,r[n](e)):t),{});return i.propTypes={},i.filterProps=t.reduce(((e,t)=>e.concat(t.filterProps)),[]),i};var s=n(28286);function l(e){return"number"!==typeof e?e:`${e}px solid`}const c=(0,i.Ay)({prop:"border",themeKey:"borders",transform:l}),u=(0,i.Ay)({prop:"borderTop",themeKey:"borders",transform:l}),d=(0,i.Ay)({prop:"borderRight",themeKey:"borders",transform:l}),h=(0,i.Ay)({prop:"borderBottom",themeKey:"borders",transform:l}),f=(0,i.Ay)({prop:"borderLeft",themeKey:"borders",transform:l}),p=(0,i.Ay)({prop:"borderColor",themeKey:"palette"}),m=(0,i.Ay)({prop:"borderTopColor",themeKey:"palette"}),g=(0,i.Ay)({prop:"borderRightColor",themeKey:"palette"}),v=(0,i.Ay)({prop:"borderBottomColor",themeKey:"palette"}),y=(0,i.Ay)({prop:"borderLeftColor",themeKey:"palette"}),x=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=(0,r.MA)(e.theme,"shape.borderRadius",4,"borderRadius"),n=e=>({borderRadius:(0,r._W)(t,e)});return(0,s.NI)(e,e.borderRadius,n)}return null};x.propTypes={},x.filterProps=["borderRadius"];o(c,u,d,h,f,p,m,g,v,y,x);const b=e=>{if(void 0!==e.gap&&null!==e.gap){const t=(0,r.MA)(e.theme,"spacing",8,"gap"),n=e=>({gap:(0,r._W)(t,e)});return(0,s.NI)(e,e.gap,n)}return null};b.propTypes={},b.filterProps=["gap"];const _=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=(0,r.MA)(e.theme,"spacing",8,"columnGap"),n=e=>({columnGap:(0,r._W)(t,e)});return(0,s.NI)(e,e.columnGap,n)}return null};_.propTypes={},_.filterProps=["columnGap"];const w=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=(0,r.MA)(e.theme,"spacing",8,"rowGap"),n=e=>({rowGap:(0,r._W)(t,e)});return(0,s.NI)(e,e.rowGap,n)}return null};w.propTypes={},w.filterProps=["rowGap"];o(b,_,w,(0,i.Ay)({prop:"gridColumn"}),(0,i.Ay)({prop:"gridRow"}),(0,i.Ay)({prop:"gridAutoFlow"}),(0,i.Ay)({prop:"gridAutoColumns"}),(0,i.Ay)({prop:"gridAutoRows"}),(0,i.Ay)({prop:"gridTemplateColumns"}),(0,i.Ay)({prop:"gridTemplateRows"}),(0,i.Ay)({prop:"gridTemplateAreas"}),(0,i.Ay)({prop:"gridArea"}));function A(e,t){return"grey"===t?t:e}o((0,i.Ay)({prop:"color",themeKey:"palette",transform:A}),(0,i.Ay)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:A}),(0,i.Ay)({prop:"backgroundColor",themeKey:"palette",transform:A}));function S(e){return e<=1&&0!==e?100*e+"%":e}const M=(0,i.Ay)({prop:"width",transform:S}),T=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var n,r,i;return{maxWidth:(null==(n=e.theme)||null==(r=n.breakpoints)||null==(i=r.values)?void 0:i[t])||s.zu[t]||S(t)}};return(0,s.NI)(e,e.maxWidth,t)}return null};T.filterProps=["maxWidth"];const k=(0,i.Ay)({prop:"minWidth",transform:S}),E=(0,i.Ay)({prop:"height",transform:S}),C=(0,i.Ay)({prop:"maxHeight",transform:S}),D=(0,i.Ay)({prop:"minHeight",transform:S}),R=((0,i.Ay)({prop:"size",cssProperty:"width",transform:S}),(0,i.Ay)({prop:"size",cssProperty:"height",transform:S}),o(M,T,k,E,C,D,(0,i.Ay)({prop:"boxSizing"})),{border:{themeKey:"borders",transform:l},borderTop:{themeKey:"borders",transform:l},borderRight:{themeKey:"borders",transform:l},borderBottom:{themeKey:"borders",transform:l},borderLeft:{themeKey:"borders",transform:l},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:x},color:{themeKey:"palette",transform:A},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:A},backgroundColor:{themeKey:"palette",transform:A},p:{style:r.Ms},pt:{style:r.Ms},pr:{style:r.Ms},pb:{style:r.Ms},pl:{style:r.Ms},px:{style:r.Ms},py:{style:r.Ms},padding:{style:r.Ms},paddingTop:{style:r.Ms},paddingRight:{style:r.Ms},paddingBottom:{style:r.Ms},paddingLeft:{style:r.Ms},paddingX:{style:r.Ms},paddingY:{style:r.Ms},paddingInline:{style:r.Ms},paddingInlineStart:{style:r.Ms},paddingInlineEnd:{style:r.Ms},paddingBlock:{style:r.Ms},paddingBlockStart:{style:r.Ms},paddingBlockEnd:{style:r.Ms},m:{style:r.Lc},mt:{style:r.Lc},mr:{style:r.Lc},mb:{style:r.Lc},ml:{style:r.Lc},mx:{style:r.Lc},my:{style:r.Lc},margin:{style:r.Lc},marginTop:{style:r.Lc},marginRight:{style:r.Lc},marginBottom:{style:r.Lc},marginLeft:{style:r.Lc},marginX:{style:r.Lc},marginY:{style:r.Lc},marginInline:{style:r.Lc},marginInlineStart:{style:r.Lc},marginInlineEnd:{style:r.Lc},marginBlock:{style:r.Lc},marginBlockStart:{style:r.Lc},marginBlockEnd:{style:r.Lc},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:b},rowGap:{style:w},columnGap:{style:_},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:S},maxWidth:{style:T},minWidth:{transform:S},height:{transform:S},maxHeight:{transform:S},minHeight:{transform:S},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}})},80237:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(58168),i=n(98587),a=n(9034),o=n(98076);const s=["sx"],l=e=>{var t,n;const r={systemProps:{},otherProps:{}},i=null!=(t=null==e||null==(n=e.theme)?void 0:n.unstable_sxConfig)?t:o.A;return Object.keys(e).forEach((t=>{i[t]?r.systemProps[t]=e[t]:r.otherProps[t]=e[t]})),r};function c(e){const{sx:t}=e,n=(0,i.A)(e,s),{systemProps:o,otherProps:c}=l(n);let u;return u=Array.isArray(t)?[o,...t]:"function"===typeof t?function(){const e=t(...arguments);return(0,a.Q)(e)?(0,r.A)({},o,e):o}:(0,r.A)({},o,t),(0,r.A)({},c,{sx:u})}},70505:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(77532),i=n(46206),a=n(12703),o=n(28286),s=n(98076);const l=function(){function e(e,t,n,i){const s={[e]:t,theme:n},l=i[e];if(!l)return{[e]:t};const{cssProperty:c=e,themeKey:u,transform:d,style:h}=l;if(null==t)return null;const f=(0,a.Yn)(n,u)||{};if(h)return h(s);return(0,o.NI)(s,t,(t=>{let n=(0,a.BO)(f,d,t);return t===n&&"string"===typeof t&&(n=(0,a.BO)(f,d,`${e}${"default"===t?"":(0,r.A)(t)}`,t)),!1===c?n:{[c]:n}}))}return function t(n){var r;const{sx:a,theme:l={}}=n||{};if(!a)return null;const c=null!=(r=l.unstable_sxConfig)?r:s.A;function u(n){let r=n;if("function"===typeof n)r=n(l);else if("object"!==typeof n)return n;if(!r)return null;const a=(0,o.EU)(l.breakpoints),s=Object.keys(a);let u=a;return Object.keys(r).forEach((n=>{const a=(s=r[n],d=l,"function"===typeof s?s(d):s);var s,d;if(null!==a&&void 0!==a)if("object"===typeof a)if(c[n])u=(0,i.A)(u,e(n,a,l,c));else{const e=(0,o.NI)({theme:l},a,(e=>({[n]:e})));!function(){for(var e=arguments.length,t=new Array(e),n=0;ne.concat(Object.keys(t))),[]),i=new Set(r);return t.every((e=>i.size===Object.keys(e).length))}(e,a)?u=(0,i.A)(u,e):u[n]=t({sx:a,theme:l})}else u=(0,i.A)(u,e(n,a,l,c))})),(0,o.vf)(s,u)}return Array.isArray(a)?a.map(u):u(a)}}();l.filterProps=["sx"];const c=l},7148:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(72341),i=n(90357);const a=(0,r.A)();const o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a;return(0,i.A)(e)}},51522:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(35352);function i(e){const{theme:t,name:n,props:i}=e;return t&&t.components&&t.components[n]&&t.components[n].defaultProps?(0,r.A)(t.components[n].defaultProps,i):i}},62161:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(51522),i=n(7148);function a(e){let{props:t,name:n,defaultTheme:a}=e;const o=(0,i.A)(a);return(0,r.A)({theme:o,name:n,props:t})}},90357:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(21784);const i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=(0,r.A)();return t&&(n=t,0!==Object.keys(n).length)?t:e;var n}},44501:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const r=e=>e,i=(()=>{let e=r;return{configure(t){e=t},generate:t=>e(t),reset(){e=r}}})()},77532:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(9753);function i(e){if("string"!==typeof e)throw new Error((0,r.A)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},88465:(e,t,n)=>{"use strict";function r(e,t,n){const r={};return Object.keys(e).forEach((i=>{r[i]=e[i].reduce(((e,r)=>(r&&(e.push(t(r)),n&&n[r]&&e.push(n[r])),e)),[]).join(" ")})),r}n.d(t,{A:()=>r})},2192:(e,t,n)=>{"use strict";function r(){for(var e=arguments.length,t=new Array(e),n=0;nnull==t?e:function(){for(var n=arguments.length,r=new Array(n),i=0;i{}))}n.d(t,{A:()=>r})},11721:(e,t,n)=>{"use strict";function r(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,i=new Array(r),a=0;a{e.apply(this,i)}),n)}return r.clear=()=>{clearTimeout(t)},r}n.d(t,{A:()=>r})},9034:(e,t,n)=>{"use strict";n.d(t,{A:()=>o,Q:()=>i});var r=n(58168);function i(e){return null!==e&&"object"===typeof e&&e.constructor===Object}function a(e){if(!i(e))return e;const t={};return Object.keys(e).forEach((n=>{t[n]=a(e[n])})),t}function o(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0};const s=n.clone?(0,r.A)({},e):e;return i(e)&&i(t)&&Object.keys(t).forEach((r=>{"__proto__"!==r&&(i(t[r])&&r in e&&i(e[r])?s[r]=o(e[r],t[r],n):n.clone?s[r]=i(t[r])?a(t[r]):t[r]:s[r]=t[r])})),s}},9753:(e,t,n)=>{"use strict";function r(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;nr})},423:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(44501);const i={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",required:"required",selected:"selected"};function a(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui";const a=i[t];return a?`${n}-${a}`:`${r.A.generate(e)}-${t}`}},1763:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(423);function i(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui";const i={};return t.forEach((t=>{i[t]=(0,r.A)(e,t,n)})),i}},73269:(e,t,n)=>{"use strict";function r(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}n.d(t,{A:()=>r})},61786:(e,t,n)=>{"use strict";function r(e){return e&&e.ownerDocument||document}n.d(t,{A:()=>r})},66459:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(61786);function i(e){return(0,r.A)(e).defaultView||window}},35352:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(58168);function i(e,t){const n=(0,r.A)({},t);return Object.keys(e).forEach((a=>{if(a.toString().match(/^(components|slots)$/))n[a]=(0,r.A)({},e[a],n[a]);else if(a.toString().match(/^(componentsProps|slotProps)$/)){const o=e[a]||{},s=t[a];n[a]={},s&&Object.keys(s)?o&&Object.keys(o)?(n[a]=(0,r.A)({},s),Object.keys(o).forEach((e=>{n[a][e]=i(o[e],s[e])}))):n[a]=s:n[a]=o}else void 0===n[a]&&(n[a]=e[a])})),n}},455:(e,t,n)=>{"use strict";function r(e,t){"function"===typeof e?e(t):e&&(e.current=t)}n.d(t,{A:()=>r})},66349:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(9950);function i(e){let{controlled:t,default:n,name:i,state:a="value"}=e;const{current:o}=r.useRef(void 0!==t),[s,l]=r.useState(n);return[o?t:s,r.useCallback((e=>{o||l(e)}),[])]}},91700:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(9950);const i="undefined"!==typeof window?r.useLayoutEffect:r.useEffect},81448:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(9950),i=n(91700);function a(e){const t=r.useRef(e);return(0,i.A)((()=>{t.current=e})),r.useCallback((function(){return(0,t.current)(...arguments)}),[])}},28866:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(9950),i=n(455);function a(){for(var e=arguments.length,t=new Array(e),n=0;nt.every((e=>null==e))?null:e=>{t.forEach((t=>{(0,i.A)(t,e)}))}),t)}},81174:(e,t,n)=>{"use strict";var r;n.d(t,{A:()=>s});var i=n(9950);let a=0;const o=(r||(r=n.t(i,2))).useId;function s(e){if(void 0!==o){const t=o();return null!=e?e:t}return function(e){const[t,n]=i.useState(e),r=e||t;return i.useEffect((()=>{null==t&&(a+=1,n(`mui-${a}`))}),[t]),r}(e)}},82101:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var r=n(9950);let i,a=!0,o=!1;const s={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function l(e){e.metaKey||e.altKey||e.ctrlKey||(a=!0)}function c(){a=!1}function u(){"hidden"===this.visibilityState&&o&&(a=!0)}function d(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(n){}return a||function(e){const{type:t,tagName:n}=e;return!("INPUT"!==n||!s[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}function h(){const e=r.useCallback((e=>{var t;null!=e&&((t=e.ownerDocument).addEventListener("keydown",l,!0),t.addEventListener("mousedown",c,!0),t.addEventListener("pointerdown",c,!0),t.addEventListener("touchstart",c,!0),t.addEventListener("visibilitychange",u,!0))}),[]),t=r.useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!d(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&(o=!0,window.clearTimeout(i),i=window.setTimeout((()=>{o=!1}),100),t.current=!1,!0)},ref:e}}},23386:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(9950);const i=e=>{const t=r.useRef({});return r.useEffect((()=>{t.current=e})),t.current}},63571:(e,t,n)=>{"use strict";n.d(t,{l:()=>N});var r=n(58168),i=n(98587),a=n(9950),o=n(48283),s=n(22433),l=n(60634),c=n(50853);const u=e=>1===e.length&&"year"===e[0],d=e=>2===e.length&&-1!==e.indexOf("month")&&-1!==e.indexOf("year");function h(e,t){var n;const i=(0,l.hc)(),a=(0,l.Yg)(),s=(0,o.A)({props:e,name:t}),h=null!=(n=s.views)?n:["year","day"];return(0,r.A)({openTo:"day",disableFuture:!1,disablePast:!1},((e,t)=>u(e)?{inputFormat:t.formats.year}:d(e)?{disableMaskedInput:!0,inputFormat:t.formats.monthAndYear}:{inputFormat:t.formats.keyboardDate})(h,i),s,{views:h,minDate:(0,c.Y5)(i,s.minDate,a.minDate),maxDate:(0,c.Y5)(i,s.maxDate,a.maxDate)})}const f={emptyValue:null,getTodayValue:e=>e.date(),parseInput:c.BT,areValuesEqual:(e,t,n)=>e.isEqual(t,n)};var p=n(82053),m=n(59254),g=n(88465),v=n(96436),y=n(423);function x(e){return(0,y.A)("MuiDatePickerToolbar",e)}(0,n(1763).A)("MuiDatePickerToolbar",["root","title"]);var b=n(44414);const _=["parsedValue","isLandscape","isMobileKeyboardViewOpen","onChange","toggleMobileKeyboardView","toolbarFormat","toolbarPlaceholder","toolbarTitle","views"],w=(0,m.Ay)(v.Z,{name:"MuiDatePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),A=(0,m.Ay)(p.A,{name:"MuiDatePickerToolbar",slot:"Title",overridesResolver:(e,t)=>t.title})((e=>{let{ownerState:t}=e;return(0,r.A)({},t.isLandscape&&{margin:"auto 16px auto auto"})})),S=a.forwardRef((function(e,t){const n=(0,o.A)({props:e,name:"MuiDatePickerToolbar"}),{parsedValue:s,isLandscape:c,isMobileKeyboardViewOpen:h,toggleMobileKeyboardView:f,toolbarFormat:p,toolbarPlaceholder:m="\u2013\u2013",toolbarTitle:v,views:y}=n,S=(0,i.A)(n,_),M=(0,l.hc)(),T=(0,l.Nq)(),k=(e=>{const{classes:t}=e;return(0,g.A)({root:["root"],title:["title"]},x,t)})(n),E=null!=v?v:T.datePickerDefaultToolbarTitle,C=a.useMemo((()=>s?p?M.formatByString(s,p):u(y)?M.format(s,"year"):d(y)?M.format(s,"month"):/en/.test(M.getCurrentLocaleCode())?M.format(s,"normalDateWithWeekday"):M.format(s,"normalDate"):m),[s,p,m,M,y]),D=n;return(0,b.jsx)(w,(0,r.A)({ref:t,toolbarTitle:E,isMobileKeyboardViewOpen:h,toggleMobileKeyboardView:f,isLandscape:c,className:k.root},S,{children:(0,b.jsx)(A,{variant:"h4",align:c?"left":"center",ownerState:D,className:k.title,children:C})}))}));var M=n(77096),T=n(12843),k=n(1682),E=n(89158),C=n(92885);const D=["onChange","PopperProps","PaperProps","ToolbarComponent","TransitionComponent","value","components","componentsProps"],R=a.forwardRef((function(e,t){const n=h(e,"MuiDesktopDatePicker"),a=null!==(0,k.$_)(n),{pickerProps:o,inputProps:s,wrapperProps:l}=(0,C.V)(n,f),{PopperProps:c,PaperProps:u,ToolbarComponent:d=S,TransitionComponent:p,components:m,componentsProps:g}=n,v=(0,i.A)(n,D),y=(0,r.A)({},s,v,{components:m,componentsProps:g,ref:t,validationError:a});return(0,b.jsx)(M.q,(0,r.A)({},l,{DateInputProps:y,KeyboardDateInputComponent:E.U,PopperProps:c,PaperProps:u,TransitionComponent:p,components:m,componentsProps:g,children:(0,b.jsx)(T.s,(0,r.A)({},o,{autoFocus:!0,toolbarTitle:n.label||n.toolbarTitle,ToolbarComponent:d,DateInputProps:y,components:m,componentsProps:g},v))}))}));var P=n(5959),O=n(47894);const L=["ToolbarComponent","value","onChange","components","componentsProps"],I=a.forwardRef((function(e,t){const n=h(e,"MuiMobileDatePicker"),a=null!==(0,k.$_)(n),{pickerProps:o,inputProps:s,wrapperProps:l}=(0,C.V)(n,f),{ToolbarComponent:c=S,components:u,componentsProps:d}=n,p=(0,i.A)(n,L),m=(0,r.A)({},s,p,{components:u,componentsProps:d,ref:t,validationError:a});return(0,b.jsx)(P.m,(0,r.A)({},p,l,{DateInputProps:m,PureDateInputComponent:O.$,components:u,componentsProps:d,children:(0,b.jsx)(T.s,(0,r.A)({},o,{autoFocus:!0,toolbarTitle:n.label||n.toolbarTitle,ToolbarComponent:c,DateInputProps:m,components:u,componentsProps:d},p))}))})),z=["desktopModeMediaQuery","DialogProps","PopperProps","TransitionComponent"],N=a.forwardRef((function(e,t){const n=(0,o.A)({props:e,name:"MuiDatePicker"}),{desktopModeMediaQuery:a="@media (pointer: fine)",DialogProps:l,PopperProps:c,TransitionComponent:u}=n,d=(0,i.A)(n,z);return(0,s.A)(a,{defaultMatches:!0})?(0,b.jsx)(R,(0,r.A)({ref:t,PopperProps:c,TransitionComponent:u},d)):(0,b.jsx)(I,(0,r.A)({ref:t,DialogProps:l},d))}))},32459:(e,t,n)=>{"use strict";n.d(t,{$:()=>d,F:()=>u});var r=n(58168),i=n(9950),a=n(48283);const o={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"open previous view",openNextView:"open next view",calendarViewSwitchingButtonAriaLabel:e=>"year"===e?"year view is open, switch to calendar view":"calendar view is open, switch to year view",inputModeToggleButtonAriaLabel:(e,t)=>e?`text input view is open, go to ${t} view`:`${t} view is open, go to text input view`,start:"Start",end:"End",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",datePickerDefaultToolbarTitle:"Select date",dateTimePickerDefaultToolbarTitle:"Select date & time",timePickerDefaultToolbarTitle:"Select time",dateRangePickerDefaultToolbarTitle:"Select date range",clockLabelText:(e,t,n)=>`Select ${e}. ${null===t?"No time selected":`Selected time is ${n.format(t,"fullTime")}`}`,hoursClockNumberText:e=>`${e} hours`,minutesClockNumberText:e=>`${e} minutes`,secondsClockNumberText:e=>`${e} seconds`,openDatePickerDialogue:(e,t)=>e&&t.isValid(t.date(e))?`Choose date, selected date is ${t.format(t.date(e),"fullDate")}`:"Choose date",openTimePickerDialogue:(e,t)=>e&&t.isValid(t.date(e))?`Choose time, selected time is ${t.format(t.date(e),"fullTime")}`:"Choose time",timeTableLabel:"pick time",dateTableLabel:"pick date"},s=o;l=o,(0,r.A)({},l);var l,c=n(44414);const u=i.createContext(null);function d(e){const t=(0,a.A)({props:e,name:"MuiLocalizationProvider"}),{children:n,dateAdapter:o,dateFormats:l,dateLibInstance:d,locale:h,adapterLocale:f,localeText:p}=t;const m=i.useMemo((()=>new o({locale:null!=f?f:h,formats:l,instance:d})),[o,h,f,l,d]),g=i.useMemo((()=>({minDate:m.date("1900-01-01T00:00:00.000"),maxDate:m.date("2099-12-31T00:00:00.000")})),[m]),v=i.useMemo((()=>({utils:m,defaultDates:g,localeText:(0,r.A)({},s,null!=p?p:{})})),[g,m,p]);return(0,c.jsx)(u.Provider,{value:v,children:n})}},26291:(e,t,n)=>{"use strict";n.d(t,{L:()=>h});var r=n(58168),i=n(98587),a=n(9950),o=n(75165),s=n(79739),l=n(60634),c=n(34822),u=n(44414);const d=["onAccept","onClear","onCancel","onSetToday","actions"],h=e=>{const{onAccept:t,onClear:n,onCancel:h,onSetToday:f,actions:p}=e,m=(0,i.A)(e,d),g=a.useContext(c.u),v=(0,l.Nq)(),y="function"===typeof p?p(g):p;if(null==y||0===y.length)return null;const x=null==y?void 0:y.map((e=>{switch(e){case"clear":return(0,u.jsx)(o.A,{onClick:n,children:v.clearButtonLabel},e);case"cancel":return(0,u.jsx)(o.A,{onClick:h,children:v.cancelButtonLabel},e);case"accept":return(0,u.jsx)(o.A,{onClick:t,children:v.okButtonLabel},e);case"today":return(0,u.jsx)(o.A,{onClick:f,children:v.todayButtonLabel},e);default:return null}}));return(0,u.jsx)(s.A,(0,r.A)({},m,{children:x}))}},12843:(e,t,n)=>{"use strict";n.d(t,{s:()=>Jt});var r=n(98587),i=n(58168),a=n(9950),o=n(59254),s=n(48283),l=n(88465),c=n(48733),u=n(79068);function d(e){let{onChange:t,onViewChange:n,openTo:r,view:i,views:o}=e;var s,l;const[d,h]=(0,c.A)({name:"Picker",state:"view",controlled:i,default:r&&(0,u.Xk)(o,r)?r:o[0]}),f=null!=(s=o[o.indexOf(d)-1])?s:null,p=null!=(l=o[o.indexOf(d)+1])?l:null,m=a.useCallback((e=>{h(e),n&&n(e)}),[h,n]),g=a.useCallback((()=>{p&&m(p)}),[p,m]);return{handleChangeAndOpenNext:a.useCallback(((e,n)=>{const r="finish"===n,i=r&&Boolean(p)?"partial":n;t(e,i),r&&g()}),[p,t,g]),nextView:p,previousView:f,openNext:g,openView:d,setOpenView:m}}var h=n(2803),f=n(31014),p=n(25333),m=n(82053),g=n(91700);const v=220,y=36,x={x:110,y:110},b=x.x-x.x,_=0-x.y,w=(e,t,n)=>{const r=t-x.x,i=n-x.y,a=Math.atan2(b,_)-Math.atan2(r,i);let o=a*(180/Math.PI);o=Math.round(o/e)*e,o%=360;const s=r**2+i**2;return{value:Math.floor(o/e)||0,distance:Math.sqrt(s)}};var A=n(423),S=n(1763);function M(e){return(0,A.A)("MuiClockPointer",e)}(0,S.A)("MuiClockPointer",["root","thumb"]);var T=n(44414);const k=["className","hasSelected","isInner","type","value"],E=(0,o.Ay)("div",{name:"MuiClockPointer",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({width:2,backgroundColor:t.palette.primary.main,position:"absolute",left:"calc(50% - 1px)",bottom:"50%",transformOrigin:"center bottom 0px"},n.shouldAnimate&&{transition:t.transitions.create(["transform","height"])})})),C=(0,o.Ay)("div",{name:"MuiClockPointer",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({width:4,height:4,backgroundColor:t.palette.primary.contrastText,borderRadius:"50%",position:"absolute",top:-21,left:"calc(50% - 18px)",border:`16px solid ${t.palette.primary.main}`,boxSizing:"content-box"},n.hasSelected&&{backgroundColor:t.palette.primary.main})}));function D(e){const t=(0,s.A)({props:e,name:"MuiClockPointer"}),{className:n,isInner:o,type:c,value:u}=t,d=(0,r.A)(t,k),f=a.useRef(c);a.useEffect((()=>{f.current=c}),[c]);const p=(0,i.A)({},t,{shouldAnimate:f.current!==c}),m=(e=>{const{classes:t}=e;return(0,l.A)({root:["root"],thumb:["thumb"]},M,t)})(p);return(0,T.jsx)(E,(0,i.A)({style:(()=>{let e=360/("hours"===c?12:60)*u;return"hours"===c&&u>12&&(e-=360),{height:Math.round((o?.26:.4)*v),transform:`rotateZ(${e}deg)`}})(),className:(0,h.A)(n,m.root),ownerState:p},d,{children:(0,T.jsx)(C,{ownerState:p,className:m.thumb})}))}var R=n(60634),P=n(34822);function O(e){return(0,A.A)("MuiClock",e)}(0,S.A)("MuiClock",["root","clock","wrapper","squareMask","pin","amButton","pmButton"]);const L=(0,o.Ay)("div",{name:"MuiClock",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t}=e;return{display:"flex",justifyContent:"center",alignItems:"center",margin:t.spacing(2)}})),I=(0,o.Ay)("div",{name:"MuiClock",slot:"Clock",overridesResolver:(e,t)=>t.clock})({backgroundColor:"rgba(0,0,0,.07)",borderRadius:"50%",height:220,width:220,flexShrink:0,position:"relative",pointerEvents:"none"}),z=(0,o.Ay)("div",{name:"MuiClock",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})({"&:focus":{outline:"none"}}),N=(0,o.Ay)("div",{name:"MuiClock",slot:"SquareMask",overridesResolver:(e,t)=>t.squareMask})((e=>{let{ownerState:t}=e;return(0,i.A)({width:"100%",height:"100%",position:"absolute",pointerEvents:"auto",outline:0,touchAction:"none",userSelect:"none"},t.disabled?{}:{"@media (pointer: fine)":{cursor:"pointer",borderRadius:"50%"},"&:active":{cursor:"move"}})})),F=(0,o.Ay)("div",{name:"MuiClock",slot:"Pin",overridesResolver:(e,t)=>t.pin})((e=>{let{theme:t}=e;return{width:6,height:6,borderRadius:"50%",backgroundColor:t.palette.primary.main,position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}})),B=(0,o.Ay)(p.A,{name:"MuiClock",slot:"AmButton",overridesResolver:(e,t)=>t.amButton})((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({zIndex:1,position:"absolute",bottom:n.ampmInClock?64:8,left:8},"am"===n.meridiemMode&&{backgroundColor:t.palette.primary.main,color:t.palette.primary.contrastText,"&:hover":{backgroundColor:t.palette.primary.light}})})),j=(0,o.Ay)(p.A,{name:"MuiClock",slot:"PmButton",overridesResolver:(e,t)=>t.pmButton})((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({zIndex:1,position:"absolute",bottom:n.ampmInClock?64:8,right:8},"pm"===n.meridiemMode&&{backgroundColor:t.palette.primary.main,color:t.palette.primary.contrastText,"&:hover":{backgroundColor:t.palette.primary.light}})}));function U(e){const t=(0,s.A)({props:e,name:"MuiClock"}),{ampm:n,ampmInClock:r,autoFocus:i,children:o,date:c,getClockLabelText:u,handleMeridiemChange:d,isTimeDisabled:f,meridiemMode:p,minutesStep:v=1,onChange:y,selectedId:x,type:b,value:_,disabled:A,readOnly:S,className:M}=t,k=t,E=(0,R.hc)(),C=a.useContext(P.u),U=a.useRef(!1),V=(e=>{const{classes:t}=e;return(0,l.A)({root:["root"],clock:["clock"],wrapper:["wrapper"],squareMask:["squareMask"],pin:["pin"],amButton:["amButton"],pmButton:["pmButton"]},O,t)})(k),H=f(_,b),W=!n&&"hours"===b&&(_<1||_>12),G=(e,t)=>{A||S||f(e,b)||y(e,t)},q=(e,t)=>{let{offsetX:r,offsetY:i}=e;if(void 0===r){const t=e.target.getBoundingClientRect();r=e.changedTouches[0].clientX-t.left,i=e.changedTouches[0].clientY-t.top}const a="seconds"===b||"minutes"===b?function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const r=6*n;let{value:i}=w(r,e,t);return i=i*n%60,i}(r,i,v):((e,t,n)=>{const{value:r,distance:i}=w(30,e,t);let a=r||12;return n?a%=12:i<74&&(a+=12,a%=24),a})(r,i,Boolean(n));G(a,t)},Y=a.useMemo((()=>"hours"===b||_%5===0),[b,_]),$="minutes"===b?v:1,X=a.useRef(null);(0,g.A)((()=>{i&&X.current.focus()}),[i]);return(0,T.jsxs)(L,{className:(0,h.A)(M,V.root),children:[(0,T.jsxs)(I,{className:V.clock,children:[(0,T.jsx)(N,{onTouchMove:e=>{U.current=!0,q(e,"shallow")},onTouchEnd:e=>{U.current&&(q(e,"finish"),U.current=!1)},onMouseUp:e=>{U.current&&(U.current=!1),q(e.nativeEvent,"finish")},onMouseMove:e=>{e.buttons>0&&q(e.nativeEvent,"shallow")},ownerState:{disabled:A},className:V.squareMask}),!H&&(0,T.jsxs)(a.Fragment,{children:[(0,T.jsx)(F,{className:V.pin}),c&&(0,T.jsx)(D,{type:b,value:_,isInner:W,hasSelected:Y})]}),(0,T.jsx)(z,{"aria-activedescendant":x,"aria-label":u(b,c,E),ref:X,role:"listbox",onKeyDown:e=>{if(!U.current)switch(e.key){case"Home":G(0,"partial"),e.preventDefault();break;case"End":G("minutes"===b?59:23,"partial"),e.preventDefault();break;case"ArrowUp":G(_+$,"partial"),e.preventDefault();break;case"ArrowDown":G(_-$,"partial"),e.preventDefault()}},tabIndex:0,className:V.wrapper,children:o})]}),n&&("desktop"===C||r)&&(0,T.jsxs)(a.Fragment,{children:[(0,T.jsx)(B,{onClick:S?void 0:()=>d("am"),disabled:A||null===p,ownerState:k,className:V.amButton,children:(0,T.jsx)(m.A,{variant:"caption",children:"AM"})}),(0,T.jsx)(j,{disabled:A||null===p,onClick:S?void 0:()=>d("pm"),ownerState:k,className:V.pmButton,children:(0,T.jsx)(m.A,{variant:"caption",children:"PM"})})]})]})}function V(e){return(0,A.A)("MuiClockNumber",e)}const H=(0,S.A)("MuiClockNumber",["root","selected","disabled"]),W=["className","disabled","index","inner","label","selected"],G=(0,o.Ay)("span",{name:"MuiClockNumber",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${H.disabled}`]:t.disabled},{[`&.${H.selected}`]:t.selected}]})((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({height:y,width:y,position:"absolute",left:"calc((100% - 36px) / 2)",display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",color:t.palette.text.primary,fontFamily:t.typography.fontFamily,"&:focused":{backgroundColor:t.palette.background.paper},[`&.${H.selected}`]:{color:t.palette.primary.contrastText},[`&.${H.disabled}`]:{pointerEvents:"none",color:t.palette.text.disabled}},n.inner&&(0,i.A)({},t.typography.body2,{color:t.palette.text.secondary}))}));function q(e){const t=(0,s.A)({props:e,name:"MuiClockNumber"}),{className:n,disabled:a,index:o,inner:c,label:u,selected:d}=t,f=(0,r.A)(t,W),p=t,m=(e=>{const{classes:t,selected:n,disabled:r}=e,i={root:["root",n&&"selected",r&&"disabled"]};return(0,l.A)(i,V,t)})(p),g=o%12/12*Math.PI*2-Math.PI/2,v=91*(c?.65:1),y=Math.round(Math.cos(g)*v),x=Math.round(Math.sin(g)*v);return(0,T.jsx)(G,(0,i.A)({className:(0,h.A)(n,m.root),"aria-disabled":!!a||void 0,"aria-selected":!!d||void 0,role:"option",style:{transform:`translate(${y}px, ${x+92}px`},ownerState:p},f,{children:u}))}const Y=e=>{let{ampm:t,date:n,getClockNumberText:r,isDisabled:i,selectedId:a,utils:o}=e;const s=n?o.getHours(n):null,l=[],c=t?12:23,u=e=>null!==s&&(t?12===e?12===s||0===s:s===e||s-12===e:s===e);for(let d=t?1:0;d<=c;d+=1){let e=d.toString();0===d&&(e="00");const n=!t&&(0===d||d>12);e=o.formatNumber(e);const s=u(d);l.push((0,T.jsx)(q,{id:s?a:void 0,index:d,inner:n,selected:s,disabled:i(d),label:e,"aria-label":r(e)},d))}return l},$=e=>{let{utils:t,value:n,isDisabled:r,getClockNumberText:i,selectedId:a}=e;const o=t.formatNumber;return[[5,o("05")],[10,o("10")],[15,o("15")],[20,o("20")],[25,o("25")],[30,o("30")],[35,o("35")],[40,o("40")],[45,o("45")],[50,o("50")],[55,o("55")],[0,o("00")]].map(((e,t)=>{let[o,s]=e;const l=o===n;return(0,T.jsx)(q,{label:s,id:l?a:void 0,index:t+1,inner:!1,disabled:r(o),selected:l,"aria-label":i(s)},o)}))};var X=n(14857),Z=n(98561);function K(e){return(0,A.A)("MuiPickersArrowSwitcher",e)}(0,S.A)("MuiPickersArrowSwitcher",["root","spacer","button"]);const J=["children","className","components","componentsProps","isLeftDisabled","isLeftHidden","isRightDisabled","isRightHidden","leftArrowButtonText","onLeftClick","onRightClick","rightArrowButtonText"],Q=(0,o.Ay)("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),ee=(0,o.Ay)("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})((e=>{let{theme:t}=e;return{width:t.spacing(3)}})),te=(0,o.Ay)(p.A,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})((e=>{let{ownerState:t}=e;return(0,i.A)({},t.hidden&&{visibility:"hidden"})})),ne=a.forwardRef((function(e,t){const n=(0,s.A)({props:e,name:"MuiPickersArrowSwitcher"}),{children:a,className:o,components:c,componentsProps:u,isLeftDisabled:d,isLeftHidden:f,isRightDisabled:p,isRightHidden:g,leftArrowButtonText:v,onLeftClick:y,onRightClick:x,rightArrowButtonText:b}=n,_=(0,r.A)(n,J),w="rtl"===(0,X.A)().direction,A=(null==u?void 0:u.leftArrowButton)||{},S=(null==c?void 0:c.LeftArrowIcon)||Z.nk,M=(null==u?void 0:u.rightArrowButton)||{},k=(null==c?void 0:c.RightArrowIcon)||Z.Qp,E=n,C=(e=>{const{classes:t}=e;return(0,l.A)({root:["root"],spacer:["spacer"],button:["button"]},K,t)})(E);return(0,T.jsxs)(Q,(0,i.A)({ref:t,className:(0,h.A)(C.root,o),ownerState:E},_,{children:[(0,T.jsx)(te,(0,i.A)({as:null==c?void 0:c.LeftArrowButton,size:"small","aria-label":v,title:v,disabled:d,edge:"end",onClick:y},A,{className:(0,h.A)(C.button,A.className),ownerState:(0,i.A)({},E,A,{hidden:f}),children:w?(0,T.jsx)(k,{}):(0,T.jsx)(S,{})})),a?(0,T.jsx)(m.A,{variant:"subtitle1",component:"span",children:a}):(0,T.jsx)(ee,{className:C.spacer,ownerState:E}),(0,T.jsx)(te,(0,i.A)({as:null==c?void 0:c.RightArrowButton,size:"small","aria-label":b,title:b,edge:"start",disabled:p,onClick:x},M,{className:(0,h.A)(C.button,M.className),ownerState:(0,i.A)({},E,M,{hidden:g}),children:w?(0,T.jsx)(S,{}):(0,T.jsx)(k,{})}))]}))}));var re=n(22412),ie=n(20731);function ae(e){return(0,A.A)("MuiClockPicker",e)}(0,S.A)("MuiClockPicker",["root","arrowSwitcher"]);var oe=n(64936);const se=(0,o.Ay)("div")({overflowX:"hidden",width:oe.eX,maxHeight:oe.Y2,display:"flex",flexDirection:"column",margin:"0 auto"}),le=(0,o.Ay)(se,{name:"MuiClockPicker",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column"}),ce=(0,o.Ay)(ne,{name:"MuiClockPicker",slot:"ArrowSwitcher",overridesResolver:(e,t)=>t.arrowSwitcher})({position:"absolute",right:12,top:15}),ue=()=>{},de=a.forwardRef((function(e,t){const n=(0,s.A)({props:e,name:"MuiClockPicker"}),{ampm:r=!1,ampmInClock:o=!1,autoFocus:c,components:u,componentsProps:p,date:m,disableIgnoringDatePartForTimeValidation:g,getClockLabelText:v,getHoursClockNumberText:y,getMinutesClockNumberText:x,getSecondsClockNumberText:b,leftArrowButtonText:_,maxTime:w,minTime:A,minutesStep:S=1,rightArrowButtonText:M,shouldDisableTime:k,showViewSwitcher:E,onChange:C,view:D,views:P=["hours","minutes"],openTo:O,onViewChange:L,className:I,disabled:z,readOnly:N}=n;ue({leftArrowButtonText:_,rightArrowButtonText:M,getClockLabelText:v,getHoursClockNumberText:y,getMinutesClockNumberText:x,getSecondsClockNumberText:b});const F=(0,R.Nq)(),B=null!=_?_:F.openPreviousView,j=null!=M?M:F.openNextView,V=null!=v?v:F.clockLabelText,H=null!=y?y:F.hoursClockNumberText,W=null!=x?x:F.minutesClockNumberText,G=null!=b?b:F.secondsClockNumberText,{openView:q,setOpenView:X,nextView:Z,previousView:K,handleChangeAndOpenNext:J}=d({view:D,views:P,openTo:O,onViewChange:L,onChange:C}),Q=(0,R.cB)(),ee=(0,R.hc)(),te=a.useMemo((()=>m||ee.setSeconds(ee.setMinutes(ee.setHours(Q,0),0),0)),[m,Q,ee]),{meridiemMode:ne,handleMeridiemChange:oe}=(0,ie.r7)(te,r,J),se=a.useCallback(((e,t)=>{const n=(0,re.iF)(g,ee),i=e=>{let{start:t,end:r}=e;return(!A||!n(A,r))&&(!w||!n(t,w))},a=function(e){return e%(arguments.length>1&&void 0!==arguments[1]?arguments[1]:1)===0&&(!k||!k(e,t))};switch(t){case"hours":{const t=(0,re.gY)(e,ne,r),n=ee.setHours(te,t);return!i({start:ee.setSeconds(ee.setMinutes(n,0),0),end:ee.setSeconds(ee.setMinutes(n,59),59)})||!a(t)}case"minutes":{const t=ee.setMinutes(te,e);return!i({start:ee.setSeconds(t,0),end:ee.setSeconds(t,59)})||!a(e,S)}case"seconds":{const t=ee.setSeconds(te,e);return!i({start:t,end:t})||!a(e)}default:throw new Error("not supported")}}),[r,te,g,w,ne,A,S,k,ee]),de=(0,f.A)(),he=a.useMemo((()=>{switch(q){case"hours":{const e=(e,t)=>{const n=(0,re.gY)(e,ne,r);J(ee.setHours(te,n),t)};return{onChange:e,value:ee.getHours(te),children:Y({date:m,utils:ee,ampm:r,onChange:e,getClockNumberText:H,isDisabled:e=>z||se(e,"hours"),selectedId:de})}}case"minutes":{const e=ee.getMinutes(te),t=(e,t)=>{J(ee.setMinutes(te,e),t)};return{value:e,onChange:t,children:$({utils:ee,value:e,onChange:t,getClockNumberText:W,isDisabled:e=>z||se(e,"minutes"),selectedId:de})}}case"seconds":{const e=ee.getSeconds(te),t=(e,t)=>{J(ee.setSeconds(te,e),t)};return{value:e,onChange:t,children:$({utils:ee,value:e,onChange:t,getClockNumberText:G,isDisabled:e=>z||se(e,"seconds"),selectedId:de})}}default:throw new Error("You must provide the type for ClockView")}}),[q,ee,m,r,H,W,G,ne,J,te,se,de,z]),fe=n,pe=(e=>{const{classes:t}=e;return(0,l.A)({root:["root"],arrowSwitcher:["arrowSwitcher"]},ae,t)})(fe);return(0,T.jsxs)(le,{ref:t,className:(0,h.A)(pe.root,I),ownerState:fe,children:[E&&(0,T.jsx)(ce,{className:pe.arrowSwitcher,leftArrowButtonText:B,rightArrowButtonText:j,components:u,componentsProps:p,onLeftClick:()=>X(K),onRightClick:()=>X(Z),isLeftDisabled:!K,isRightDisabled:!Z,ownerState:fe}),(0,T.jsx)(U,(0,i.A)({autoFocus:c,date:m,ampmInClock:o,type:q,ampm:r,getClockLabelText:V,minutesStep:S,isTimeDisabled:se,meridiemMode:ne,handleMeridiemChange:oe,selectedId:de,disabled:z,readOnly:N},he))]})}));var he=n(1976),fe=n(7148),pe=n(97497),me=n(79044);function ge(e){return(0,A.A)("PrivatePickersMonth",e)}const ve=(0,S.A)("PrivatePickersMonth",["root","selected"]),ye=["disabled","onSelect","selected","value","tabIndex","hasFocus","onFocus","onBlur"],xe=(0,o.Ay)(m.A,{name:"PrivatePickersMonth",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${ve.selected}`]:t.selected}]})((e=>{let{theme:t}=e;return(0,i.A)({flex:"1 0 33.33%",display:"flex",alignItems:"center",justifyContent:"center",color:"unset",backgroundColor:"transparent",border:0,outline:0},t.typography.subtitle1,{margin:"8px 0",height:36,borderRadius:18,cursor:"pointer","&:focus, &:hover":{backgroundColor:(0,pe.X4)(t.palette.action.active,t.palette.action.hoverOpacity)},"&:disabled":{pointerEvents:"none",color:t.palette.text.secondary},[`&.${ve.selected}`]:{color:t.palette.primary.contrastText,backgroundColor:t.palette.primary.main,"&:focus, &:hover":{backgroundColor:t.palette.primary.dark}}})})),be=()=>{},_e=e=>{const{disabled:t,onSelect:n,selected:o,value:s,tabIndex:c,hasFocus:d,onFocus:h=be,onBlur:f=be}=e,p=(0,r.A)(e,ye),m=(e=>{const{classes:t,selected:n}=e,r={root:["root",n&&"selected"]};return(0,l.A)(r,ge,t)})(e),g=()=>{n(s)},v=a.useRef(null);return(0,me.A)((()=>{var e;d&&(null==(e=v.current)||e.focus())}),[d]),(0,T.jsx)(xe,(0,i.A)({ref:v,component:"button",type:"button",className:m.root,tabIndex:c,onClick:g,onKeyDown:(0,u.rQ)(g),color:o?"primary":void 0,variant:o?"h5":"subtitle1",disabled:t,onFocus:e=>h(e,s),onBlur:e=>f(e,s)},p))};function we(e){return(0,A.A)("MuiMonthPicker",e)}(0,S.A)("MuiMonthPicker",["root"]);var Ae=n(50853);const Se=["className","date","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange"];const Me=(0,o.Ay)("div",{name:"MuiMonthPicker",slot:"Root",overridesResolver:(e,t)=>t.root})({width:310,display:"flex",flexWrap:"wrap",alignContent:"stretch",margin:"0 4px"}),Te=a.forwardRef((function(e,t){const n=(0,R.hc)(),o=(0,R.cB)(),u=function(e,t){const n=(0,R.hc)(),r=(0,R.Yg)(),a=(0,s.A)({props:e,name:t});return(0,i.A)({disableFuture:!1,disablePast:!1},a,{minDate:(0,Ae.Y5)(n,a.minDate,r.minDate),maxDate:(0,Ae.Y5)(n,a.maxDate,r.maxDate)})}(e,"MuiMonthPicker"),{className:d,date:f,disabled:p,disableFuture:m,disablePast:g,maxDate:v,minDate:y,onChange:x,shouldDisableMonth:b,readOnly:_,disableHighlightToday:w,autoFocus:A=!1,onMonthFocus:S,hasFocus:M,onFocusedViewChange:k}=u,E=(0,r.A)(u,Se),C=u,D=(e=>{const{classes:t}=e;return(0,l.A)({root:["root"]},we,t)})(C),P=(0,fe.A)(),O=a.useMemo((()=>null!=f?f:n.startOfMonth(o)),[o,n,f]),L=a.useMemo((()=>null!=f?n.getMonth(f):w?null:n.getMonth(o)),[o,f,n,w]),[I,z]=a.useState((()=>L||n.getMonth(o))),N=a.useCallback((e=>{const t=n.startOfMonth(g&&n.isAfter(o,y)?o:y),r=n.startOfMonth(m&&n.isBefore(o,v)?o:v);return!!n.isBefore(e,t)||(!!n.isAfter(e,r)||!!b&&b(e))}),[m,g,v,y,o,b,n]),F=e=>{if(_)return;const t=n.setMonth(O,e);x(t,"finish")},[B,j]=(0,c.A)({name:"MonthPicker",state:"hasFocus",controlled:M,default:A}),U=a.useCallback((e=>{j(e),k&&k(e)}),[j,k]),V=a.useCallback((e=>{N(n.setMonth(O,e))||(z(e),U(!0),S&&S(e))}),[N,n,O,U,S]);a.useEffect((()=>{z((e=>null!==L&&e!==L?L:e))}),[L]);const H=(0,he.A)((e=>{const t=12;switch(e.key){case"ArrowUp":V((t+I-3)%t),e.preventDefault();break;case"ArrowDown":V((t+I+3)%t),e.preventDefault();break;case"ArrowLeft":V((t+I+("ltr"===P.direction?-1:1))%t),e.preventDefault();break;case"ArrowRight":V((t+I+("ltr"===P.direction?1:-1))%t),e.preventDefault()}})),W=a.useCallback(((e,t)=>{V(t)}),[V]),G=a.useCallback((()=>{U(!1)}),[U]),q=n.getMonth(o);return(0,T.jsx)(Me,(0,i.A)({ref:t,className:(0,h.A)(D.root,d),ownerState:C,onKeyDown:H},E,{children:n.getMonthArray(O).map((e=>{const t=n.getMonth(e),r=n.format(e,"monthShort"),i=p||N(e);return(0,T.jsx)(_e,{value:t,selected:t===L,tabIndex:t!==I||i?-1:0,hasFocus:B&&t===I,onSelect:F,onFocus:W,onBlur:G,disabled:i,"aria-current":q===t?"date":void 0,children:r},r)}))}))}));var ke=n(1682);const Ee=e=>{let{date:t,defaultCalendarMonth:n,disableFuture:r,disablePast:o,disableSwitchToMonthOnDayFocus:s=!1,maxDate:l,minDate:c,onMonthChange:u,reduceAnimations:d,shouldDisableDate:h}=e;var f;const p=(0,R.cB)(),m=(0,R.hc)(),g=a.useRef(((e,t,n)=>(r,a)=>{switch(a.type){case"changeMonth":return(0,i.A)({},r,{slideDirection:a.direction,currentMonth:a.newMonth,isMonthSwitchingAnimating:!e});case"finishMonthSwitchingAnimation":return(0,i.A)({},r,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(null!=r.focusedDay&&null!=a.focusedDay&&n.isSameDay(a.focusedDay,r.focusedDay))return r;const o=null!=a.focusedDay&&!t&&!n.isSameMonth(r.currentMonth,a.focusedDay);return(0,i.A)({},r,{focusedDay:a.focusedDay,isMonthSwitchingAnimating:o&&!e&&!a.withoutMonthSwitchingAnimation,currentMonth:o?n.startOfMonth(a.focusedDay):r.currentMonth,slideDirection:null!=a.focusedDay&&n.isAfterDay(a.focusedDay,r.currentMonth)?"left":"right"})}default:throw new Error("missing support")}})(Boolean(d),s,m)).current,[v,y]=a.useReducer(g,{isMonthSwitchingAnimating:!1,focusedDay:t||p,currentMonth:m.startOfMonth(null!=(f=null!=t?t:n)?f:p),slideDirection:"left"}),x=a.useCallback((e=>{y((0,i.A)({type:"changeMonth"},e)),u&&u(e.newMonth)}),[u]),b=a.useCallback((e=>{const t=null!=e?e:p;m.isSameMonth(t,v.currentMonth)||x({newMonth:m.startOfMonth(t),direction:m.isAfterDay(t,v.currentMonth)?"left":"right"})}),[v.currentMonth,x,p,m]),_=(0,ke.AG)({shouldDisableDate:h,minDate:c,maxDate:l,disableFuture:r,disablePast:o}),w=a.useCallback((()=>{y({type:"finishMonthSwitchingAnimation"})}),[]),A=a.useCallback(((e,t)=>{_(e)||y({type:"changeFocusedDay",focusedDay:e,withoutMonthSwitchingAnimation:t})}),[_]);return{calendarState:v,changeMonth:b,changeFocusedDay:A,isDateDisabled:_,onMonthSwitchingAnimationEnd:w,handleChangeMonth:x}};var Ce=n(57191),De=n(38166);const Re=e=>(0,A.A)("MuiPickersFadeTransitionGroup",e),Pe=((0,S.A)("MuiPickersFadeTransitionGroup",["root"]),(0,o.Ay)(De.A,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"}));function Oe(e){const t=(0,s.A)({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:r,reduceAnimations:i,transKey:a}=t,o=(e=>{const{classes:t}=e;return(0,l.A)({root:["root"]},Re,t)})(t);return i?n:(0,T.jsx)(Pe,{className:(0,h.A)(o.root,r),children:(0,T.jsx)(Ce.A,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:500,enter:250,exit:0},children:n},a)})}var Le=n(24184),Ie=n(31506);function ze(e){return(0,A.A)("MuiPickersDay",e)}const Ne=(0,S.A)("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),Fe=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today"],Be=e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({},t.typography.caption,{width:oe.B3,height:oe.B3,borderRadius:"50%",padding:0,backgroundColor:t.palette.background.paper,color:t.palette.text.primary,"&:hover":{backgroundColor:(0,pe.X4)(t.palette.action.active,t.palette.action.hoverOpacity)},"&:focus":{backgroundColor:(0,pe.X4)(t.palette.action.active,t.palette.action.hoverOpacity),[`&.${Ne.selected}`]:{willChange:"background-color",backgroundColor:t.palette.primary.dark}},[`&.${Ne.selected}`]:{color:t.palette.primary.contrastText,backgroundColor:t.palette.primary.main,fontWeight:t.typography.fontWeightMedium,transition:t.transitions.create("background-color",{duration:t.transitions.duration.short}),"&:hover":{willChange:"background-color",backgroundColor:t.palette.primary.dark}},[`&.${Ne.disabled}`]:{color:t.palette.text.disabled}},!n.disableMargin&&{margin:`0 ${oe.y0}px`},n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&{color:t.palette.text.secondary},!n.disableHighlightToday&&n.today&&{[`&:not(.${Ne.selected})`]:{border:`1px solid ${t.palette.text.secondary}`}})},je=(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableMargin&&t.dayWithMargin,!n.disableHighlightToday&&n.today&&t.today,!n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,n.outsideCurrentMonth&&!n.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},Ue=(0,o.Ay)(Le.A,{name:"MuiPickersDay",slot:"Root",overridesResolver:je})(Be),Ve=(0,o.Ay)("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:je})((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({},Be({theme:t,ownerState:n}),{opacity:0,pointerEvents:"none"})})),He=()=>{},We=a.forwardRef((function(e,t){const n=(0,s.A)({props:e,name:"MuiPickersDay"}),{autoFocus:o=!1,className:c,day:u,disabled:d=!1,disableHighlightToday:f=!1,disableMargin:p=!1,isAnimating:m,onClick:v,onDaySelect:y,onFocus:x=He,onBlur:b=He,onKeyDown:_=He,onMouseDown:w,outsideCurrentMonth:A,selected:S=!1,showDaysOutsideCurrentMonth:M=!1,children:k,today:E=!1}=n,C=(0,r.A)(n,Fe),D=(0,i.A)({},n,{autoFocus:o,disabled:d,disableHighlightToday:f,disableMargin:p,selected:S,showDaysOutsideCurrentMonth:M,today:E}),P=(e=>{const{selected:t,disableMargin:n,disableHighlightToday:r,today:i,disabled:a,outsideCurrentMonth:o,showDaysOutsideCurrentMonth:s,classes:c}=e,u={root:["root",t&&"selected",a&&"disabled",!n&&"dayWithMargin",!r&&i&&"today",o&&s&&"dayOutsideMonth",o&&!s&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]};return(0,l.A)(u,ze,c)})(D),O=(0,R.hc)(),L=a.useRef(null),I=(0,Ie.A)(L,t);(0,g.A)((()=>{!o||d||m||A||L.current.focus()}),[o,d,m,A]);return A&&!M?(0,T.jsx)(Ve,{className:(0,h.A)(P.root,P.hiddenDaySpacingFiller,c),ownerState:D,role:C.role}):(0,T.jsx)(Ue,(0,i.A)({className:(0,h.A)(P.root,c),ownerState:D,ref:I,centerRipple:!0,disabled:d,tabIndex:S?0:-1,onKeyDown:e=>_(e,u),onFocus:e=>x(e,u),onBlur:e=>b(e,u),onClick:e=>{d||y(u,"finish"),A&&e.currentTarget.focus(),v&&v(e)},onMouseDown:e=>{w&&w(e),A&&e.preventDefault()}},C,{children:k||O.format(u,"dayOfMonth")}))})),Ge=(e,t)=>e.autoFocus===t.autoFocus&&e.isAnimating===t.isAnimating&&e.today===t.today&&e.disabled===t.disabled&&e.selected===t.selected&&e.disableMargin===t.disableMargin&&e.showDaysOutsideCurrentMonth===t.showDaysOutsideCurrentMonth&&e.disableHighlightToday===t.disableHighlightToday&&e.className===t.className&&e.sx===t.sx&&e.outsideCurrentMonth===t.outsideCurrentMonth&&e.onFocus===t.onFocus&&e.onBlur===t.onBlur&&e.onDaySelect===t.onDaySelect,qe=a.memo(We,Ge);var Ye=n(25540);function $e(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var Xe=n(67279),Ze=n(50385),Ke=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.remove(r):"string"===typeof n.className?n.className=$e(n.className,r):n.setAttribute("class",$e(n.className&&n.className.baseVal||"",r)));var n,r}))},Je=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i(0,A.A)("PrivatePickersSlideTransition",e),tt=(0,S.A)("PrivatePickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),nt=["children","className","reduceAnimations","slideDirection","transKey"],rt=(0,o.Ay)(De.A,{name:"PrivatePickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${tt["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${tt["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${tt.slideEnterActive}`]:t.slideEnterActive},{[`.${tt.slideExit}`]:t.slideExit},{[`.${tt["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${tt["slideExitActiveLeft-right"]}`]:t["slideExitActiveLeft-right"]}]})((e=>{let{theme:t}=e;const n=t.transitions.create("transform",{duration:350,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${tt["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${tt["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${tt.slideEnterActive}`]:{transform:"translate(0%)",transition:n},[`& .${tt.slideExit}`]:{transform:"translate(0%)"},[`& .${tt["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:n,zIndex:0},[`& .${tt["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:n,zIndex:0}}})),it=e=>(0,A.A)("MuiDayPicker",e),at=((0,S.A)("MuiDayPicker",["header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer"]),e=>e.charAt(0).toUpperCase()),ot=6*(oe.B3+2*oe.y0),st=(0,o.Ay)("div",{name:"MuiDayPicker",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),lt=(0,o.Ay)(m.A,{name:"MuiDayPicker",slot:"WeekDayLabel",overridesResolver:(e,t)=>t.weekDayLabel})((e=>{let{theme:t}=e;return{width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:t.palette.text.secondary}})),ct=(0,o.Ay)("div",{name:"MuiDayPicker",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:ot}),ut=(0,o.Ay)((e=>{const{children:t,className:n,reduceAnimations:o,slideDirection:s,transKey:c}=e,u=(0,r.A)(e,nt),d=(e=>{const{classes:t}=e;return(0,l.A)({root:["root"]},et,t)})(e);if(o)return(0,T.jsx)("div",{className:(0,h.A)(d.root,n),children:t});const f={exit:tt.slideExit,enterActive:tt.slideEnterActive,enter:tt[`slideEnter-${s}`],exitActive:tt[`slideExitActiveLeft-${s}`]};return(0,T.jsx)(rt,{className:(0,h.A)(d.root,n),childFactory:e=>a.cloneElement(e,{classNames:f}),role:"presentation",children:(0,T.jsx)(Qe,(0,i.A)({mountOnEnter:!0,unmountOnExit:!0,timeout:350,classNames:f},u,{children:t}),c)})}),{name:"MuiDayPicker",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:ot}),dt=(0,o.Ay)("div",{name:"MuiDayPicker",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),ht=(0,o.Ay)("div",{name:"MuiDayPicker",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:`${oe.y0}px 0`,display:"flex",justifyContent:"center"});function ft(e){const t=(0,R.cB)(),n=(0,R.hc)(),r=(0,s.A)({props:e,name:"MuiDayPicker"}),o=(e=>{const{classes:t}=e;return(0,l.A)({header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"]},it,t)})(r),{onFocusedDayChange:c,className:u,currentMonth:d,selectedDays:f,disabled:p,disableHighlightToday:m,focusedDay:g,isMonthSwitchingAnimating:v,loading:y,onSelectedDaysChange:x,onMonthSwitchingAnimationEnd:b,readOnly:_,reduceAnimations:w,renderDay:A,renderLoading:S=()=>(0,T.jsx)("span",{children:"..."}),showDaysOutsideCurrentMonth:M,slideDirection:k,TransitionProps:E,disablePast:C,disableFuture:D,minDate:P,maxDate:O,shouldDisableDate:L,dayOfWeekFormatter:I=at,hasFocus:z,onFocusedViewChange:N,gridLabelId:F}=r,B=(0,ke.AG)({shouldDisableDate:L,minDate:P,maxDate:O,disablePast:C,disableFuture:D}),[j,U]=a.useState((()=>g||t)),V=a.useCallback((e=>{N&&N(e)}),[N]),H=a.useCallback((function(e){_||x(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"finish")}),[x,_]),W=a.useCallback((e=>{B(e)||(c(e),U(e),V(!0))}),[B,c,V]),G=(0,X.A)();function q(e,t){switch(e.key){case"ArrowUp":W(n.addDays(t,-7)),e.preventDefault();break;case"ArrowDown":W(n.addDays(t,7)),e.preventDefault();break;case"ArrowLeft":{const r=n.addDays(t,"ltr"===G.direction?-1:1),i="ltr"===G.direction?n.getPreviousMonth(t):n.getNextMonth(t),a=(0,Ae.il)({utils:n,date:r,minDate:"ltr"===G.direction?n.startOfMonth(i):r,maxDate:"ltr"===G.direction?r:n.endOfMonth(i),isDateDisabled:B});W(a||r),e.preventDefault();break}case"ArrowRight":{const r=n.addDays(t,"ltr"===G.direction?1:-1),i="ltr"===G.direction?n.getNextMonth(t):n.getPreviousMonth(t),a=(0,Ae.il)({utils:n,date:r,minDate:"ltr"===G.direction?r:n.startOfMonth(i),maxDate:"ltr"===G.direction?n.endOfMonth(i):r,isDateDisabled:B});W(a||r),e.preventDefault();break}case"Home":W(n.startOfWeek(t)),e.preventDefault();break;case"End":W(n.endOfWeek(t)),e.preventDefault();break;case"PageUp":W(n.getNextMonth(t)),e.preventDefault();break;case"PageDown":W(n.getPreviousMonth(t)),e.preventDefault()}}function Y(e,t){W(t)}function $(e,t){z&&n.isSameDay(j,t)&&V(!1)}const Z=n.getMonth(d),K=f.filter((e=>!!e)).map((e=>n.startOfDay(e))),J=Z,Q=a.useMemo((()=>a.createRef()),[J]),ee=n.startOfWeek(t),te=a.useMemo((()=>{const e=n.startOfMonth(d),t=n.endOfMonth(d);return B(j)||n.isAfterDay(j,t)||n.isBeforeDay(j,e)?(0,Ae.il)({utils:n,date:j,minDate:e,maxDate:t,disablePast:C,disableFuture:D,isDateDisabled:B}):j}),[d,D,C,j,B,n]);return(0,T.jsxs)("div",{role:"grid","aria-labelledby":F,children:[(0,T.jsx)(st,{role:"row",className:o.header,children:n.getWeekdays().map(((e,t)=>{var r;return(0,T.jsx)(lt,{variant:"caption",role:"columnheader","aria-label":n.format(n.addDays(ee,t),"weekday"),className:o.weekDayLabel,children:null!=(r=null==I?void 0:I(e))?r:e},e+t.toString())}))}),y?(0,T.jsx)(ct,{className:o.loadingContainer,children:S()}):(0,T.jsx)(ut,(0,i.A)({transKey:J,onExited:b,reduceAnimations:w,slideDirection:k,className:(0,h.A)(u,o.slideTransition)},E,{nodeRef:Q,children:(0,T.jsx)(dt,{ref:Q,role:"rowgroup",className:o.monthContainer,children:n.getWeekArray(d).map((e=>(0,T.jsx)(ht,{role:"row",className:o.weekContainer,children:e.map((e=>{const r=null!==te&&n.isSameDay(e,te),o=K.some((t=>n.isSameDay(t,e))),s=n.isSameDay(e,t),l={key:null==e?void 0:e.toString(),day:e,isAnimating:v,disabled:p||B(e),autoFocus:z&&r,today:s,outsideCurrentMonth:n.getMonth(e)!==Z,selected:o,disableHighlightToday:m,showDaysOutsideCurrentMonth:M,onKeyDown:q,onFocus:Y,onBlur:$,onDaySelect:H,tabIndex:r?0:-1,role:"gridcell","aria-selected":o};return s&&(l["aria-current"]="date"),A?A(e,K,l):(0,a.createElement)(qe,(0,i.A)({},l,{key:l.key}))}))},`week-${e[0]}`)))})}))]})}const pt=e=>(0,A.A)("MuiPickersCalendarHeader",e),mt=((0,S.A)("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]),(0,o.Ay)("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",alignItems:"center",marginTop:16,marginBottom:8,paddingLeft:24,paddingRight:12,maxHeight:30,minHeight:30})),gt=(0,o.Ay)("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})((e=>{let{theme:t}=e;return(0,i.A)({display:"flex",maxHeight:30,overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},t.typography.body1,{fontWeight:t.typography.fontWeightMedium})})),vt=(0,o.Ay)("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),yt=(0,o.Ay)(p.A,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})({marginRight:"auto"}),xt=(0,o.Ay)(Z.P6,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({willChange:"transform",transition:t.transitions.create("transform"),transform:"rotate(0deg)"},"year"===n.openView&&{transform:"rotate(180deg)"})})),bt=()=>{};function _t(e){const t=(0,s.A)({props:e,name:"MuiPickersCalendarHeader"}),{components:n={},componentsProps:r={},currentMonth:a,disabled:o,disableFuture:c,disablePast:u,getViewSwitchingButtonText:d,leftArrowButtonText:h,maxDate:f,minDate:p,onMonthChange:m,onViewChange:g,openView:v,reduceAnimations:y,rightArrowButtonText:x,views:b,labelId:_}=t;bt({leftArrowButtonText:h,rightArrowButtonText:x,getViewSwitchingButtonText:d});const w=(0,R.Nq)(),A=null!=h?h:w.previousMonth,S=null!=x?x:w.nextMonth,M=null!=d?d:w.calendarViewSwitchingButtonAriaLabel,k=(0,R.hc)(),E=(e=>{const{classes:t}=e;return(0,l.A)({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},pt,t)})(t),C=r.switchViewButton||{},D=(0,ie.bH)(a,{disableFuture:c,maxDate:f}),P=(0,ie.p_)(a,{disablePast:u,minDate:p});if(1===b.length&&"year"===b[0])return null;const O=t;return(0,T.jsxs)(mt,{ownerState:O,className:E.root,children:[(0,T.jsxs)(gt,{role:"presentation",onClick:()=>{if(1!==b.length&&g&&!o)if(2===b.length)g(b.find((e=>e!==v))||b[0]);else{const e=0!==b.indexOf(v)?0:1;g(b[e])}},ownerState:O,"aria-live":"polite",className:E.labelContainer,children:[(0,T.jsx)(Oe,{reduceAnimations:y,transKey:k.format(a,"monthAndYear"),children:(0,T.jsx)(vt,{id:_,ownerState:O,className:E.label,children:k.format(a,"monthAndYear")})}),b.length>1&&!o&&(0,T.jsx)(yt,(0,i.A)({size:"small",as:n.SwitchViewButton,"aria-label":M(v),className:E.switchViewButton},C,{children:(0,T.jsx)(xt,{as:n.SwitchViewIcon,ownerState:O,className:E.switchViewIcon})}))]}),(0,T.jsx)(Ce.A,{in:"day"===v,children:(0,T.jsx)(ne,{leftArrowButtonText:A,rightArrowButtonText:S,components:n,componentsProps:r,onLeftClick:()=>m(k.getPreviousMonth(a),"right"),onRightClick:()=>m(k.getNextMonth(a),"left"),isLeftDisabled:P,isRightDisabled:D})})]})}var wt=n(66349),At=n(61676);function St(e){return(0,A.A)("PrivatePickersYear",e)}const Mt=(0,S.A)("PrivatePickersYear",["root","modeDesktop","modeMobile","yearButton","selected","disabled"]),Tt=["autoFocus","className","children","disabled","onClick","onKeyDown","value","tabIndex","onFocus","onBlur"],kt=(0,o.Ay)("div",{name:"PrivatePickersYear",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${Mt.modeDesktop}`]:t.modeDesktop},{[`&.${Mt.modeMobile}`]:t.modeMobile}]})((e=>{let{ownerState:t}=e;return(0,i.A)({flexBasis:"33.3%",display:"flex",alignItems:"center",justifyContent:"center"},"desktop"===(null==t?void 0:t.wrapperVariant)&&{flexBasis:"25%"})})),Et=(0,o.Ay)("button",{name:"PrivatePickersYear",slot:"Button",overridesResolver:(e,t)=>[t.button,{[`&.${Mt.disabled}`]:t.disabled},{[`&.${Mt.selected}`]:t.selected}]})((e=>{let{theme:t}=e;return(0,i.A)({color:"unset",backgroundColor:"transparent",border:0,outline:0},t.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus, &:hover":{backgroundColor:(0,pe.X4)(t.palette.action.active,t.palette.action.hoverOpacity)},[`&.${Mt.disabled}`]:{color:t.palette.text.secondary},[`&.${Mt.selected}`]:{color:t.palette.primary.contrastText,backgroundColor:t.palette.primary.main,"&:focus, &:hover":{backgroundColor:t.palette.primary.dark}}})})),Ct=()=>{},Dt=a.forwardRef((function(e,t){const{autoFocus:n,className:o,children:s,disabled:c,onClick:u,onKeyDown:d,value:f,tabIndex:p,onFocus:m=Ct,onBlur:g=Ct}=e,v=(0,r.A)(e,Tt),y=a.useRef(null),x=(0,Ie.A)(y,t),b=a.useContext(P.u),_=(0,i.A)({},e,{wrapperVariant:b}),w=(e=>{const{wrapperVariant:t,disabled:n,selected:r,classes:i}=e,a={root:["root",t&&`mode${(0,At.A)(t)}`],yearButton:["yearButton",n&&"disabled",r&&"selected"]};return(0,l.A)(a,St,i)})(_);return a.useEffect((()=>{n&&y.current.focus()}),[n]),(0,T.jsx)(kt,{className:(0,h.A)(w.root,o),ownerState:_,children:(0,T.jsx)(Et,(0,i.A)({ref:x,disabled:c,type:"button",tabIndex:c?-1:p,onClick:e=>u(e,f),onKeyDown:e=>d(e,f),onFocus:e=>m(e,f),onBlur:e=>g(e,f),className:w.yearButton,ownerState:_},v,{children:s}))})}));function Rt(e){return(0,A.A)("MuiYearPicker",e)}(0,S.A)("MuiYearPicker",["root"]);const Pt=(0,o.Ay)("div",{name:"MuiYearPicker",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",maxHeight:"304px"}),Ot=a.forwardRef((function(e,t){const n=(0,R.cB)(),r=(0,X.A)(),o=(0,R.hc)(),c=function(e,t){const n=(0,R.hc)(),r=(0,R.Yg)(),a=(0,s.A)({props:e,name:t});return(0,i.A)({disablePast:!1,disableFuture:!1},a,{minDate:(0,Ae.Y5)(n,a.minDate,r.minDate),maxDate:(0,Ae.Y5)(n,a.maxDate,r.maxDate)})}(e,"MuiYearPicker"),{autoFocus:u,className:d,date:f,disabled:p,disableFuture:m,disablePast:g,maxDate:v,minDate:y,onChange:x,readOnly:b,shouldDisableYear:_,disableHighlightToday:w,onYearFocus:A,hasFocus:S,onFocusedViewChange:M}=c,k=c,E=(e=>{const{classes:t}=e;return(0,l.A)({root:["root"]},Rt,t)})(k),C=a.useMemo((()=>null!=f?f:o.startOfYear(n)),[n,o,f]),D=a.useMemo((()=>null!=f?o.getYear(f):w?null:o.getYear(n)),[n,f,o,w]),O=a.useContext(P.u),L=a.useRef(null),[I,z]=a.useState((()=>D||o.getYear(n))),[N,F]=(0,wt.A)({name:"YearPicker",state:"hasFocus",controlled:S,default:u}),B=a.useCallback((e=>{F(e),M&&M(e)}),[F,M]),j=a.useCallback((e=>!(!g||!o.isBeforeYear(e,n))||(!(!m||!o.isAfterYear(e,n))||(!(!y||!o.isBeforeYear(e,y))||(!(!v||!o.isAfterYear(e,v))||!(!_||!_(e)))))),[m,g,v,y,n,_,o]),U=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"finish";if(b)return;const r=o.setYear(C,t);x(r,n)},V=a.useCallback((e=>{j(o.setYear(C,e))||(z(e),B(!0),null==A||A(e))}),[j,o,C,B,A]);a.useEffect((()=>{z((e=>null!==D&&e!==D?D:e))}),[D]);const H="desktop"===O?4:3,W=a.useCallback(((e,t)=>{switch(e.key){case"ArrowUp":V(t-H),e.preventDefault();break;case"ArrowDown":V(t+H),e.preventDefault();break;case"ArrowLeft":V(t+("ltr"===r.direction?-1:1)),e.preventDefault();break;case"ArrowRight":V(t+("ltr"===r.direction?1:-1)),e.preventDefault()}}),[V,r.direction,H]),G=a.useCallback(((e,t)=>{V(t)}),[V]),q=a.useCallback(((e,t)=>{I===t&&B(!1)}),[I,B]),Y=o.getYear(n),$=a.useRef(null),Z=(0,Ie.A)(t,$);return a.useEffect((()=>{if(u||null===$.current)return;const e=$.current.querySelector('[tabindex="0"]');if(!e)return;const t=e.offsetHeight,n=e.offsetTop,r=$.current.clientHeight,i=$.current.scrollTop,a=n+t;t>r||n{const t=o.getYear(e),n=t===D;return(0,T.jsx)(Dt,{selected:n,value:t,onClick:U,onKeyDown:W,autoFocus:N&&t===I,ref:n?L:void 0,disabled:p||j(e),tabIndex:t===I?0:-1,onFocus:G,onBlur:q,"aria-current":Y===t?"date":void 0,children:o.format(e,"year")},o.format(e,"year"))}))})})),Lt="undefined"!==typeof navigator&&/(android)/i.test(navigator.userAgent),It=e=>(0,A.A)("MuiCalendarPicker",e),zt=((0,S.A)("MuiCalendarPicker",["root","viewTransitionContainer"]),["autoFocus","onViewChange","date","disableFuture","disablePast","defaultCalendarMonth","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","classes"]);const Nt=(0,o.Ay)(se,{name:"MuiCalendarPicker",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column"}),Ft=(0,o.Ay)(Oe,{name:"MuiCalendarPicker",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({}),Bt=a.forwardRef((function(e,t){const n=(0,R.hc)(),o=(0,f.A)(),u=function(e,t){const n=(0,R.hc)(),r=(0,R.Yg)(),a=(0,s.A)({props:e,name:t});return(0,i.A)({loading:!1,disablePast:!1,disableFuture:!1,openTo:"day",views:["year","day"],reduceAnimations:Lt,renderLoading:()=>(0,T.jsx)("span",{children:"..."})},a,{minDate:(0,Ae.Y5)(n,a.minDate,r.minDate),maxDate:(0,Ae.Y5)(n,a.maxDate,r.maxDate)})}(e,"MuiCalendarPicker"),{autoFocus:p,onViewChange:m,date:g,disableFuture:v,disablePast:y,defaultCalendarMonth:x,onChange:b,onYearChange:_,onMonthChange:w,reduceAnimations:A,shouldDisableDate:S,shouldDisableMonth:M,shouldDisableYear:k,view:E,views:C,openTo:D,className:P,disabled:O,readOnly:L,minDate:I,maxDate:z,disableHighlightToday:N,focusedView:F,onFocusedViewChange:B}=u,j=(0,r.A)(u,zt),{openView:U,setOpenView:V,openNext:H}=d({view:E,views:C,openTo:D,onChange:b,onViewChange:m}),{calendarState:W,changeFocusedDay:G,changeMonth:q,handleChangeMonth:Y,isDateDisabled:$,onMonthSwitchingAnimationEnd:X}=Ee({date:g,defaultCalendarMonth:x,reduceAnimations:A,onMonthChange:w,minDate:I,maxDate:z,shouldDisableDate:S,disablePast:y,disableFuture:v}),Z=a.useCallback(((e,t)=>{const r=n.startOfMonth(e),i=n.endOfMonth(e),a=$(e)?(0,Ae.il)({utils:n,date:e,minDate:n.isBefore(I,r)?r:I,maxDate:n.isAfter(z,i)?i:z,disablePast:y,disableFuture:v,isDateDisabled:$}):e;a?(b(a,t),null==w||w(r)):(H(),q(r)),G(a,!0)}),[G,v,y,$,z,I,b,w,q,H,n]),K=a.useCallback(((e,t)=>{const r=n.startOfYear(e),i=n.endOfYear(e),a=$(e)?(0,Ae.il)({utils:n,date:e,minDate:n.isBefore(I,r)?r:I,maxDate:n.isAfter(z,i)?i:z,disablePast:y,disableFuture:v,isDateDisabled:$}):e;a?(b(a,t),null==_||_(a)):(H(),q(r)),G(a,!0)}),[G,v,y,$,z,I,b,_,H,n,q]),J=a.useCallback(((e,t)=>b(g&&e?n.mergeDateAndTime(e,g):e,t)),[n,g,b]);a.useEffect((()=>{g&&q(g)}),[g]);const Q=u,ee=(e=>{const{classes:t}=e;return(0,l.A)({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},It,t)})(Q),te={disablePast:y,disableFuture:v,maxDate:z,minDate:I},ne=O&&g||I,re=O&&g||z,ie={disableHighlightToday:N,readOnly:L,disabled:O},ae=`${o}-grid-label`,[oe,se]=(0,c.A)({name:"DayPicker",state:"focusedView",controlled:F,default:p?U:null}),le=null!==oe,ce=(0,he.A)((e=>t=>{B?B(e)(t):se(t?e:t=>t===e?null:t)})),ue=a.useRef(U);return a.useEffect((()=>{ue.current!==U&&(ue.current=U,ce(U)(!0))}),[U,ce]),(0,T.jsxs)(Nt,{ref:t,className:(0,h.A)(ee.root,P),ownerState:Q,children:[(0,T.jsx)(_t,(0,i.A)({},j,{views:C,openView:U,currentMonth:W.currentMonth,onViewChange:V,onMonthChange:(e,t)=>Y({newMonth:e,direction:t}),minDate:ne,maxDate:re,disabled:O,disablePast:y,disableFuture:v,reduceAnimations:A,labelId:ae})),(0,T.jsx)(Ft,{reduceAnimations:A,className:ee.viewTransitionContainer,transKey:U,ownerState:Q,children:(0,T.jsxs)("div",{children:["year"===U&&(0,T.jsx)(Ot,(0,i.A)({},j,te,ie,{autoFocus:p,date:g,onChange:K,shouldDisableYear:k,hasFocus:le,onFocusedViewChange:ce("year")})),"month"===U&&(0,T.jsx)(Te,(0,i.A)({},te,ie,{autoFocus:p,hasFocus:le,className:P,date:g,onChange:Z,shouldDisableMonth:M,onFocusedViewChange:ce("month")})),"day"===U&&(0,T.jsx)(ft,(0,i.A)({},j,W,te,ie,{autoFocus:p,onMonthSwitchingAnimationEnd:X,onFocusedDayChange:G,reduceAnimations:A,selectedDays:[g],onSelectedDaysChange:J,shouldDisableDate:S,hasFocus:le,onFocusedViewChange:ce("day"),gridLabelId:ae}))]})})]})}));var jt=n(89158);function Ut(){return"undefined"===typeof window?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?90===Math.abs(window.screen.orientation.angle)?"landscape":"portrait":window.orientation&&90===Math.abs(Number(window.orientation))?"landscape":"portrait"}const Vt=(e,t)=>{const[n,r]=a.useState(Ut);if((0,g.A)((()=>{const e=()=>{r(Ut())};return window.addEventListener("orientationchange",e),()=>{window.removeEventListener("orientationchange",e)}}),[]),(0,u.Xk)(e,["hours","minutes","seconds"]))return!1;return"landscape"===(t||n)},Ht=e=>{let{autoFocus:t,openView:n}=e;const[r,i]=a.useState(t?n:null);return{focusedView:r,setFocusedView:a.useCallback((e=>t=>{i(t?e:t=>e===t?null:t)}),[])}};function Wt(e){return(0,A.A)("MuiCalendarOrClockPicker",e)}(0,S.A)("MuiCalendarOrClockPicker",["root","mobileKeyboardInputView"]);const Gt=["autoFocus","className","parsedValue","DateInputProps","isMobileKeyboardViewOpen","onDateChange","onViewChange","openTo","orientation","showToolbar","toggleMobileKeyboardView","ToolbarComponent","toolbarFormat","toolbarPlaceholder","toolbarTitle","views","dateRangeIcon","timeIcon","hideTabs","classes"],qt=e=>{const{classes:t}=e;return(0,l.A)({root:["root"],mobileKeyboardInputView:["mobileKeyboardInputView"]},Wt,t)},Yt=(0,o.Ay)("div",{name:"MuiCalendarOrClockPicker",slot:"MobileKeyboardInputView",overridesResolver:(e,t)=>t.mobileKeyboardInputView})({padding:"16px 24px"}),$t=(0,o.Ay)("div",{name:"MuiCalendarOrClockPicker",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{ownerState:t}=e;return(0,i.A)({display:"flex",flexDirection:"column"},t.isLandscape&&{flexDirection:"row"})})),Xt={fullWidth:!0},Zt=e=>"year"===e||"month"===e||"day"===e,Kt=e=>"hours"===e||"minutes"===e||"seconds"===e;function Jt(e){var t,n;const o=(0,s.A)({props:e,name:"MuiCalendarOrClockPicker"}),{autoFocus:l,parsedValue:c,DateInputProps:u,isMobileKeyboardViewOpen:h,onDateChange:f,onViewChange:p,openTo:m,orientation:g,showToolbar:v,toggleMobileKeyboardView:y,ToolbarComponent:x=()=>null,toolbarFormat:b,toolbarPlaceholder:_,toolbarTitle:w,views:A,dateRangeIcon:S,timeIcon:M,hideTabs:k}=o,E=(0,r.A)(o,Gt),C=null==(t=E.components)?void 0:t.Tabs,D=Vt(A,g),R=a.useContext(P.u),O=qt(o),L=null!=v?v:"desktop"!==R,I=!k&&"undefined"!==typeof window&&window.innerHeight>667,z=a.useCallback(((e,t)=>{f(e,R,t)}),[f,R]),N=a.useCallback((e=>{h&&y(),p&&p(e)}),[h,p,y]);const{openView:F,setOpenView:B,handleChangeAndOpenNext:j}=d({view:void 0,views:A,openTo:m,onChange:z,onViewChange:N}),{focusedView:U,setFocusedView:V}=Ht({autoFocus:l,openView:F});return(0,T.jsxs)($t,{ownerState:{isLandscape:D},className:O.root,children:[L&&(0,T.jsx)(x,(0,i.A)({},E,{views:A,isLandscape:D,parsedValue:c,onChange:z,setOpenView:B,openView:F,toolbarTitle:w,toolbarFormat:b,toolbarPlaceholder:_,isMobileKeyboardViewOpen:h,toggleMobileKeyboardView:y})),I&&!!C&&(0,T.jsx)(C,(0,i.A)({dateRangeIcon:S,timeIcon:M,view:F,onChange:B},null==(n=E.componentsProps)?void 0:n.tabs)),(0,T.jsx)(se,{children:h?(0,T.jsx)(Yt,{className:O.mobileKeyboardInputView,children:(0,T.jsx)(jt.U,(0,i.A)({},u,{ignoreInvalidInputs:!0,disableOpenPicker:!0,TextFieldProps:Xt}))}):(0,T.jsxs)(a.Fragment,{children:[Zt(F)&&(0,T.jsx)(Bt,(0,i.A)({autoFocus:l,date:c,onViewChange:B,onChange:j,view:F,views:A.filter(Zt),focusedView:U,onFocusedViewChange:V},E)),Kt(F)&&(0,T.jsx)(de,(0,i.A)({},E,{autoFocus:l,date:c,view:F,views:A.filter(Kt),onChange:j,onViewChange:B,showViewSwitcher:"desktop"===R}))]})})]})}},89158:(e,t,n)=>{"use strict";n.d(t,{U:()=>C});var r=n(58168),i=n(98587),a=n(9950),o=n(25333),s=n(2803),l=n(88465),c=n(61676),u=n(82053),d=n(15866),h=n(39766),f=n(59254),p=n(1763),m=n(423);function g(e){return(0,m.A)("MuiInputAdornment",e)}const v=(0,p.A)("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var y,x=n(48283),b=n(44414);const _=["children","className","component","disablePointerEvents","disableTypography","position","variant"],w=(0,f.Ay)("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${(0,c.A)(n.position)}`],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,r.A)({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(t.vars||t).palette.action.active},"filled"===n.variant&&{[`&.${v.positionStart}&:not(.${v.hiddenLabel})`]:{marginTop:16}},"start"===n.position&&{marginRight:8},"end"===n.position&&{marginLeft:8},!0===n.disablePointerEvents&&{pointerEvents:"none"})})),A=a.forwardRef((function(e,t){const n=(0,x.A)({props:e,name:"MuiInputAdornment"}),{children:o,className:f,component:p="div",disablePointerEvents:m=!1,disableTypography:v=!1,position:A,variant:S}=n,M=(0,i.A)(n,_),T=(0,h.A)()||{};let k=S;S&&T.variant,T&&!k&&(k=T.variant);const E=(0,r.A)({},n,{hiddenLabel:T.hiddenLabel,size:T.size,disablePointerEvents:m,position:A,variant:k}),C=(e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:i,size:a,variant:o}=e,s={root:["root",n&&"disablePointerEvents",i&&`position${(0,c.A)(i)}`,o,r&&"hiddenLabel",a&&`size${(0,c.A)(a)}`]};return(0,l.A)(s,g,t)})(E);return(0,b.jsx)(d.A.Provider,{value:null,children:(0,b.jsx)(w,(0,r.A)({as:p,ownerState:E,className:(0,s.A)(C.root,f),ref:t},M,{children:"string"!==typeof o||v?(0,b.jsxs)(a.Fragment,{children:["start"===A?y||(y=(0,b.jsx)("span",{className:"notranslate",children:"\u200b"})):null,o]}):(0,b.jsx)(u.A,{color:"text.secondary",children:o})}))})}));var S=n(60634),M=n(98561);const T=e=>{const[,t]=(0,a.useReducer)((e=>e+1),0),n=(0,a.useRef)(null),{replace:r,append:i}=e,o=r?r(e.format(e.value)):e.format(e.value),s=(0,a.useRef)(!1);return(0,a.useLayoutEffect)((()=>{if(null==n.current)return;let[a,s,l,c,u]=n.current;n.current=null;const d=c&&u,h=a.slice(s.selectionStart).search(e.accept||/\d/g),f=-1!==h?h:0,p=t=>(t.match(e.accept||/\d/g)||[]).join(""),m=p(a.substr(0,s.selectionStart)),g=e=>{let t=0,n=0;for(let r=0;r!==m.length;++r){let i=e.indexOf(m[r],t)+1,a=p(e).indexOf(m[r],n)+1;a-n>1&&(i=t,a=n),n=Math.max(a,n),t=Math.max(t,i)}return t};if(!0===e.mask&&l&&!u){let e=g(a);const t=p(a.substr(e))[0];e=a.indexOf(t,e),a=`${a.substr(0,e)}${a.substr(e+1)}`}let v=e.format(a);null==i||s.selectionStart!==a.length||u||(l?v=i(v):""===p(v.slice(-1))&&(v=v.slice(0,-1)));const y=r?r(v):v;return o===y?t():e.onChange(y),()=>{let t=g(v);if(null!=e.mask&&(l||c&&!d))for(;v[t]&&""===p(v[t]);)t+=1;s.selectionStart=s.selectionEnd=t+(d?1+f:0)}})),(0,a.useEffect)((()=>{const e=e=>{"Delete"===e.code&&(s.current=!0)},t=e=>{"Delete"===e.code&&(s.current=!1)};return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}}),[]),{value:null!=n.current?n.current[0]:o,onChange:r=>{const i=r.target.value;n.current=[i,r.target,i.length>o.length,s.current,o===e.format(i)],t()}}};var k=n(34592);const E=["className","components","disableOpenPicker","getOpenDialogAriaText","InputAdornmentProps","InputProps","inputRef","openPicker","OpenPickerButtonProps","renderInput"],C=a.forwardRef((function(e,t){const{className:n,components:s={},disableOpenPicker:l,getOpenDialogAriaText:c,InputAdornmentProps:u,InputProps:d,inputRef:h,openPicker:f,OpenPickerButtonProps:p,renderInput:m}=e,g=(0,i.A)(e,E),v=(0,S.Nq)(),y=null!=c?c:v.openDatePickerDialogue,x=(0,S.hc)(),_=(e=>{let{acceptRegex:t=/[\d]/gi,disabled:n,disableMaskedInput:i,ignoreInvalidInputs:o,inputFormat:s,inputProps:l,label:c,mask:u,onChange:d,rawValue:h,readOnly:f,rifmFormatter:p,TextFieldProps:m,validationError:g}=e;const v=(0,S.hc)(),y=v.getFormatHelperText(s),{shouldUseMaskedInput:x,maskToUse:b}=a.useMemo((()=>{if(i)return{shouldUseMaskedInput:!1,maskToUse:""};const e=(0,k.r0)(u,s,t,v);return{shouldUseMaskedInput:(0,k.WC)(e,s,t,v),maskToUse:e}}),[t,i,s,u,v]),_=a.useMemo((()=>x&&b?(0,k.IE)(b,t):e=>e),[t,b,x]),w=null===h?null:v.date(h),[A,M]=a.useState(w),[E,C]=a.useState((0,k.Zn)(v,h,s)),D=a.useRef(),R=a.useRef(v.locale),P=a.useRef(s);a.useEffect((()=>{const e=h!==D.current,t=v.locale!==R.current,n=s!==P.current;if(D.current=h,R.current=v.locale,P.current=s,!e&&!t&&!n)return;const r=null===h?null:v.date(h),i=null===h||v.isValid(r);let a=null===A&&null===r;if(null!==A&&null!==r){const e=v.isEqual(A,r);if(e)a=!0;else{const t=Math.abs(v.getDiff(A,r));a=0===t?e:t<1e3}}if(!t&&!n&&(!i||a))return;const o=(0,k.Zn)(v,h,s);M(r),C(o)}),[v,h,s,A]);const O=e=>{const t=""===e||e===u?"":e;C(t);const n=null===t?null:v.parse(t,s);o&&!v.isValid(n)||(M(n),d(n,t||void 0))},L=T({value:E,onChange:O,format:p||_}),I=x?L:{value:E,onChange:e=>{O(e.currentTarget.value)}};return(0,r.A)({label:c,disabled:n,error:g,inputProps:(0,r.A)({},I,{disabled:n,placeholder:y,readOnly:f,type:x?"tel":"text"},l)},m)})(g),w=(null==u?void 0:u.position)||"end",C=s.OpenPickerIcon||M.Vv;return m((0,r.A)({ref:t,inputRef:h,className:n},_,{InputProps:(0,r.A)({},d,{[`${w}Adornment`]:l?void 0:(0,b.jsx)(A,(0,r.A)({position:w},u,{children:(0,b.jsx)(o.A,(0,r.A)({edge:w,disabled:g.disabled||g.readOnly,"aria-label":y(g.rawValue,x)},p,{onClick:f,children:(0,b.jsx)(C,{})}))}))})}))}))},96436:(e,t,n)=>{"use strict";n.d(t,{Z:()=>b});var r=n(58168),i=n(9950),a=n(2803),o=n(60899),s=n(82053),l=n(25333),c=n(59254),u=n(48283),d=n(88465),h=n(98561),f=n(60634),p=n(55438),m=n(44414);const g=(0,c.Ay)("div",{name:"MuiPickersToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t,ownerState:n}=e;return(0,r.A)({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:t.spacing(2,3)},n.isLandscape&&{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"})})),v=(0,c.Ay)(o.Ay,{name:"MuiPickersToolbar",slot:"Content",overridesResolver:(e,t)=>t.content})((e=>{let{ownerState:t}=e;return(0,r.A)({flex:1},!t.isLandscape&&{alignItems:"center"})})),y=(0,c.Ay)(l.A,{name:"MuiPickersToolbar",slot:"PenIconButton",overridesResolver:(e,t)=>[{[`&.${p.N.penIconButtonLandscape}`]:t.penIconButtonLandscape},t.penIconButton]})({}),x=e=>"clock"===e?(0,m.jsx)(h.zD,{color:"inherit"}):(0,m.jsx)(h.Vv,{color:"inherit"}),b=i.forwardRef((function(e,t){const n=(0,u.A)({props:e,name:"MuiPickersToolbar"}),{children:r,className:i,getMobileKeyboardInputViewButtonText:o,isLandscape:l,isMobileKeyboardViewOpen:c,landscapeDirection:b="column",toggleMobileKeyboardView:_,toolbarTitle:w,viewType:A="calendar"}=n,S=n,M=(0,f.Nq)(),T=(e=>{const{classes:t,isLandscape:n}=e,r={root:["root"],content:["content"],penIconButton:["penIconButton",n&&"penIconButtonLandscape"]};return(0,d.A)(r,p.B,t)})(S);return(0,m.jsxs)(g,{ref:t,className:(0,a.A)(T.root,i),ownerState:S,children:[(0,m.jsx)(s.A,{color:"text.secondary",variant:"overline",children:w}),(0,m.jsxs)(v,{container:!0,justifyContent:"space-between",className:T.content,ownerState:S,direction:l?b:"row",alignItems:l?"flex-start":"flex-end",children:[r,(0,m.jsx)(y,{onClick:_,className:T.penIconButton,ownerState:S,color:"inherit","aria-label":o?o(c,A):M.inputModeToggleButtonAriaLabel(c,A),children:c?x(A):(0,m.jsx)(h.w$,{color:"inherit"})})]})]})}))},47894:(e,t,n)=>{"use strict";n.d(t,{$:()=>c});var r=n(58168),i=n(9950),a=n(1976),o=n(79068),s=n(60634),l=n(34592);const c=i.forwardRef((function(e,t){const{disabled:n,getOpenDialogAriaText:c,inputFormat:u,InputProps:d,inputRef:h,label:f,openPicker:p,rawValue:m,renderInput:g,TextFieldProps:v={},validationError:y,className:x}=e,b=(0,s.Nq)(),_=null!=c?c:b.openDatePickerDialogue,w=(0,s.hc)(),A=i.useMemo((()=>(0,r.A)({},d,{readOnly:!0})),[d]),S=(0,l.Zn)(w,m,u),M=(0,a.A)((e=>{e.stopPropagation(),p()}));return g((0,r.A)({label:f,disabled:n,ref:t,inputRef:h,error:y,InputProps:A,className:x},!e.readOnly&&!e.disabled&&{onClick:M},{inputProps:(0,r.A)({disabled:n,readOnly:!0,"aria-readonly":!0,"aria-label":_(m,w),value:S},!e.readOnly&&{onClick:M},{onKeyDown:(0,o.rQ)(p)})},v))}))},98561:(e,t,n)=>{"use strict";n.d(t,{P6:()=>o,Qp:()=>l,Vv:()=>c,nk:()=>s,w$:()=>d,zD:()=>u});var r=n(65471),i=n(9950),a=n(44414);const o=(0,r.A)((0,a.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),s=(0,r.A)((0,a.jsx)("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),l=(0,r.A)((0,a.jsx)("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight"),c=(0,r.A)((0,a.jsx)("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar"),u=(0,r.A)((0,a.jsxs)(i.Fragment,{children:[(0,a.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,a.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock"),d=((0,r.A)((0,a.jsx)("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange"),(0,r.A)((0,a.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"Pen"));(0,r.A)((0,a.jsxs)(i.Fragment,{children:[(0,a.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,a.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time")},55438:(e,t,n)=>{"use strict";n.d(t,{B:()=>i,N:()=>a});var r=n(423);function i(e){return(0,r.A)("MuiPickersToolbar",e)}const a=(0,n(1763).A)("MuiPickersToolbar",["root","content","penIconButton","penIconButtonLandscape"])},77096:(e,t,n)=>{"use strict";n.d(t,{q:()=>k});var r=n(58168),i=n(9950),a=n(31506),o=n(34822),s=n(98587),l=n(40165),c=n(2235),u=n(69363),d=n(76493),h=n(1976),f=n(27402),p=n(59254),m=n(48283),g=n(88465),v=n(26291),y=n(423);function x(e){return(0,y.A)("MuiPickersPopper",e)}(0,n(1763).A)("MuiPickersPopper",["root","paper"]);var b=n(79068),_=n(44414);const w=["onClick","onTouchStart"],A=e=>{const{classes:t}=e;return(0,g.A)({root:["root"],paper:["paper"]},x,t)},S=(0,p.Ay)(u.A,{name:"MuiPickersPopper",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t}=e;return{zIndex:t.zIndex.modal}})),M=(0,p.Ay)(c.A,{name:"MuiPickersPopper",slot:"Paper",overridesResolver:(e,t)=>t.paper})((e=>{let{ownerState:t}=e;return(0,r.A)({transformOrigin:"top center",outline:0},"top"===t.placement&&{transformOrigin:"bottom center"})}));function T(e){var t;const n=(0,m.A)({props:e,name:"MuiPickersPopper"}),{anchorEl:o,children:c,containerRef:u=null,onBlur:p,onClose:g,onClear:y,onAccept:x,onCancel:T,onSetToday:k,open:E,PopperProps:C,role:D,TransitionComponent:R=l.A,TrapFocusProps:P,PaperProps:O={},components:L,componentsProps:I}=n;i.useEffect((()=>{function e(e){!E||"Escape"!==e.key&&"Esc"!==e.key||g()}return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[g,E]);const z=i.useRef(null);i.useEffect((()=>{"tooltip"!==D&&(E?z.current=(0,b.bq)(document):z.current&&z.current instanceof HTMLElement&&setTimeout((()=>{z.current instanceof HTMLElement&&z.current.focus()})))}),[E,D]);const[N,F,B]=function(e,t){const n=i.useRef(!1),r=i.useRef(!1),a=i.useRef(null),o=i.useRef(!1);i.useEffect((()=>{if(e)return document.addEventListener("mousedown",t,!0),document.addEventListener("touchstart",t,!0),()=>{document.removeEventListener("mousedown",t,!0),document.removeEventListener("touchstart",t,!0),o.current=!1};function t(){o.current=!0}}),[e]);const s=(0,h.A)((e=>{if(!o.current)return;const i=r.current;r.current=!1;const s=(0,f.A)(a.current);if(!a.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidth-1:!s.documentElement.contains(e.target)||a.current.contains(e.target),l||i||t(e)})),l=()=>{r.current=!0};return i.useEffect((()=>{if(e){const e=(0,f.A)(a.current),t=()=>{n.current=!0};return e.addEventListener("touchstart",s),e.addEventListener("touchmove",t),()=>{e.removeEventListener("touchstart",s),e.removeEventListener("touchmove",t)}}}),[e,s]),i.useEffect((()=>{if(e){const e=(0,f.A)(a.current);return e.addEventListener("click",s),()=>{e.removeEventListener("click",s),r.current=!1}}}),[e,s]),[a,l,l]}(E,null!=p?p:g),j=i.useRef(null),U=(0,a.A)(j,u),V=(0,a.A)(U,N),H=n,W=A(H),{onClick:G,onTouchStart:q}=O,Y=(0,s.A)(O,w),$=null!=(t=null==L?void 0:L.ActionBar)?t:v.L,X=(null==L?void 0:L.PaperContent)||i.Fragment;return(0,_.jsx)(S,(0,r.A)({transition:!0,role:D,open:E,anchorEl:o,onKeyDown:e=>{"Escape"===e.key&&(e.stopPropagation(),g())},className:W.root},C,{children:e=>{let{TransitionProps:t,placement:n}=e;return(0,_.jsx)(d.A,(0,r.A)({open:E,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:"tooltip"===D,isEnabled:()=>!0},P,{children:(0,_.jsx)(R,(0,r.A)({},t,{children:(0,_.jsx)(M,(0,r.A)({tabIndex:-1,elevation:8,ref:V,onClick:e=>{F(e),G&&G(e)},onTouchStart:e=>{B(e),q&&q(e)},ownerState:(0,r.A)({},H,{placement:n}),className:W.paper},Y,{children:(0,_.jsxs)(X,(0,r.A)({},null==I?void 0:I.paperContent,{children:[c,(0,_.jsx)($,(0,r.A)({onAccept:x,onClear:y,onCancel:T,onSetToday:k,actions:[]},null==I?void 0:I.actionBar))]}))}))}))}))}}))}function k(e){const{children:t,DateInputProps:n,KeyboardDateInputComponent:s,onClear:l,onDismiss:c,onCancel:u,onAccept:d,onSetToday:h,open:f,PopperProps:p,PaperProps:m,TransitionComponent:g,components:v,componentsProps:y}=e,x=i.useRef(null),b=(0,a.A)(n.inputRef,x);return(0,_.jsxs)(o.u.Provider,{value:"desktop",children:[(0,_.jsx)(s,(0,r.A)({},n,{inputRef:b})),(0,_.jsx)(T,{role:"dialog",open:f,anchorEl:x.current,TransitionComponent:g,PopperProps:p,PaperProps:m,onClose:c,onCancel:u,onClear:l,onAccept:d,onSetToday:h,components:v,componentsProps:y,children:t})]})}},5959:(e,t,n)=>{"use strict";n.d(t,{m:()=>v});var r=n(58168),i=n(98587),a=(n(9950),n(34822)),o=n(28170),s=n(96583),l=n(21427),c=n(59254),u=n(64936),d=n(26291),h=n(44414);const f=(0,c.Ay)(s.A)({[`& .${l.A.container}`]:{outline:0},[`& .${l.A.paper}`]:{outline:0,minWidth:u.eX}}),p=(0,c.Ay)(o.A)({"&:first-of-type":{padding:0}}),m=e=>{var t;const{children:n,DialogProps:i={},onAccept:a,onClear:o,onDismiss:s,onCancel:l,onSetToday:c,open:u,components:m,componentsProps:g}=e,v=null!=(t=null==m?void 0:m.ActionBar)?t:d.L;return(0,h.jsxs)(f,(0,r.A)({open:u,onClose:s},i,{children:[(0,h.jsx)(p,{children:n}),(0,h.jsx)(v,(0,r.A)({onAccept:a,onClear:o,onCancel:l,onSetToday:c,actions:["cancel","accept"]},null==g?void 0:g.actionBar))]}))},g=["children","DateInputProps","DialogProps","onAccept","onClear","onDismiss","onCancel","onSetToday","open","PureDateInputComponent","components","componentsProps"];function v(e){const{children:t,DateInputProps:n,DialogProps:o,onAccept:s,onClear:l,onDismiss:c,onCancel:u,onSetToday:d,open:f,PureDateInputComponent:p,components:v,componentsProps:y}=e,x=(0,i.A)(e,g);return(0,h.jsxs)(a.u.Provider,{value:"mobile",children:[(0,h.jsx)(p,(0,r.A)({components:v},x,n)),(0,h.jsx)(m,{DialogProps:o,onAccept:s,onClear:l,onDismiss:c,onCancel:u,onSetToday:d,open:f,components:v,componentsProps:y,children:t})]})}},34822:(e,t,n)=>{"use strict";n.d(t,{u:()=>r});const r=n(9950).createContext(null)},64936:(e,t,n)=>{"use strict";n.d(t,{B3:()=>r,Y2:()=>o,eX:()=>a,y0:()=>i});const r=36,i=2,a=320,o=358},20731:(e,t,n)=>{"use strict";n.d(t,{bH:()=>o,p_:()=>s,r7:()=>l});var r=n(9950),i=n(60634),a=n(22412);function o(e,t){let{disableFuture:n,maxDate:a}=t;const o=(0,i.hc)();return r.useMemo((()=>{const t=o.date(),r=o.startOfMonth(n&&o.isBefore(t,a)?t:a);return!o.isAfter(r,e)}),[n,a,e,o])}function s(e,t){let{disablePast:n,minDate:a}=t;const o=(0,i.hc)();return r.useMemo((()=>{const t=o.date(),r=o.startOfMonth(n&&o.isAfter(t,a)?t:a);return!o.isBefore(r,e)}),[n,a,e,o])}function l(e,t,n){const o=(0,i.hc)();return{meridiemMode:(0,a.fX)(e,o),handleMeridiemChange:r.useCallback((r=>{const i=null==e?null:(0,a.tB)(e,r,Boolean(t),o);n(i,"partial")}),[t,e,n,o])}}},92885:(e,t,n)=>{"use strict";n.d(t,{V:()=>o});var r=n(58168),i=n(9950);var a=n(60634);const o=(e,t)=>{const{onAccept:n,onChange:o,value:s,closeOnSelect:l}=e,c=(0,a.hc)(),{isOpen:u,setIsOpen:d}=(e=>{let{open:t,onOpen:n,onClose:r}=e;const a=i.useRef("boolean"===typeof t).current,[o,s]=i.useState(!1);return i.useEffect((()=>{if(a){if("boolean"!==typeof t)throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");s(t)}}),[a,t]),{isOpen:o,setIsOpen:i.useCallback((e=>{a||s(e),e&&n&&n(),!e&&r&&r()}),[a,n,r])}})(e),h=i.useMemo((()=>t.parseInput(c,s)),[t,c,s]),[f,p]=i.useState(h),[m,g]=i.useState((()=>({committed:h,draft:h,resetFallback:h}))),v=i.useCallback((e=>{g((t=>{switch(e.action){case"setAll":case"acceptAndClose":return{draft:e.value,committed:e.value,resetFallback:e.value};case"setCommitted":return(0,r.A)({},t,{draft:e.value,committed:e.value});case"setDraft":return(0,r.A)({},t,{draft:e.value});default:return t}})),(e.forceOnChangeCall||!e.skipOnChangeCall&&!t.areValuesEqual(c,m.committed,e.value))&&o(e.value),"acceptAndClose"===e.action&&(d(!1),n&&!t.areValuesEqual(c,m.resetFallback,e.value)&&n(e.value))}),[n,o,d,m,c,t]);i.useEffect((()=>{c.isValid(h)&&p(h)}),[c,h]),i.useEffect((()=>{u&&v({action:"setAll",value:h,skipOnChangeCall:!0})}),[u]),t.areValuesEqual(c,m.committed,h)||v({action:"setCommitted",value:h,skipOnChangeCall:!0});const y=i.useMemo((()=>({open:u,onClear:()=>{v({value:t.emptyValue,action:"acceptAndClose",forceOnChangeCall:!t.areValuesEqual(c,s,t.emptyValue)})},onAccept:()=>{v({value:m.draft,action:"acceptAndClose",forceOnChangeCall:!t.areValuesEqual(c,s,h)})},onDismiss:()=>{v({value:m.committed,action:"acceptAndClose"})},onCancel:()=>{v({value:m.resetFallback,action:"acceptAndClose"})},onSetToday:()=>{v({value:t.getTodayValue(c),action:"acceptAndClose"})}})),[v,u,c,m,t,s,h]),[x,b]=i.useState(!1),_=i.useMemo((()=>({parsedValue:m.draft,isMobileKeyboardViewOpen:x,toggleMobileKeyboardView:()=>b(!x),onDateChange:function(e,t){switch(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"partial"){case"shallow":return v({action:"setDraft",value:e,skipOnChangeCall:!0});case"partial":return v({action:"setDraft",value:e});case"finish":return v((null!=l?l:"desktop"===t)?{value:e,action:"acceptAndClose"}:{value:e,action:"setCommitted"});default:throw new Error("MUI: Invalid selectionState passed to `onDateChange`")}}})),[v,x,m.draft,l]),w=i.useCallback(((e,n)=>{const r=t.valueReducer?t.valueReducer(c,f,e):e;o(r,n)}),[o,t,f,c]),A={pickerProps:_,inputProps:i.useMemo((()=>({onChange:w,open:u,rawValue:s,openPicker:()=>d(!0)})),[w,u,s,d]),wrapperProps:y};return i.useDebugValue(A,(()=>({MuiPickerState:{dateState:m,other:A}}))),A}},60634:(e,t,n)=>{"use strict";n.d(t,{Nq:()=>l,Yg:()=>s,cB:()=>c,hc:()=>o,u:()=>a});var r=n(9950),i=n(32459);const a=()=>{const e=r.useContext(i.F);if(null===e)throw new Error("MUI: Can not find utils in context. It looks like you forgot to wrap your component in LocalizationProvider, or pass dateAdapter prop directly.");return e},o=()=>a().utils,s=()=>a().defaultDates,l=()=>a().localeText,c=()=>{const e=o();return r.useRef(e.date()).current}},1682:(e,t,n)=>{"use strict";n.d(t,{$_:()=>u,AG:()=>l});var r=n(9950),i=n(15750),a=n(60634),o=n(50853);const s=e=>{let{props:t,value:n,adapter:r}=e;const i=r.utils.date(),a=r.utils.date(n),s=(0,o.Y5)(r.utils,t.minDate,r.defaultDates.minDate),l=(0,o.Y5)(r.utils,t.maxDate,r.defaultDates.maxDate);if(null===a)return null;switch(!0){case!r.utils.isValid(n):return"invalidDate";case Boolean(t.shouldDisableDate&&t.shouldDisableDate(a)):return"shouldDisableDate";case Boolean(t.disableFuture&&r.utils.isAfterDay(a,i)):return"disableFuture";case Boolean(t.disablePast&&r.utils.isBeforeDay(a,i)):return"disablePast";case Boolean(s&&r.utils.isBeforeDay(a,s)):return"minDate";case Boolean(l&&r.utils.isAfterDay(a,l)):return"maxDate";default:return null}},l=e=>{let{shouldDisableDate:t,minDate:n,maxDate:i,disableFuture:o,disablePast:l}=e;const c=(0,a.u)();return r.useCallback((e=>null!==s({adapter:c,value:e,props:{shouldDisableDate:t,minDate:n,maxDate:i,disableFuture:o,disablePast:l}})),[c,t,n,i,o,l])},c=(e,t)=>e===t,u=e=>(0,i.$)(e,s,c)},15750:(e,t,n)=>{"use strict";n.d(t,{$:()=>a});var r=n(9950),i=n(60634);function a(e,t,n){const{value:a,onError:o}=e,s=(0,i.u)(),l=r.useRef(null),c=t({adapter:s,value:a,props:e});return r.useEffect((()=>{o&&!n(c,l.current)&&o(c,a),l.current=c}),[n,o,l,c,a]),c}},50853:(e,t,n)=>{"use strict";n.d(t,{BT:()=>i,Y5:()=>a,il:()=>r});const r=e=>{let{date:t,disableFuture:n,disablePast:r,maxDate:i,minDate:a,isDateDisabled:o,utils:s}=e;const l=s.startOfDay(s.date());r&&s.isBefore(a,l)&&(a=l),n&&s.isAfter(i,l)&&(i=l);let c=t,u=t;for(s.isBefore(t,a)&&(c=s.date(a),u=null),s.isAfter(t,i)&&(u&&(u=s.date(i)),c=null);c||u;){if(c&&s.isAfter(c,i)&&(c=null),u&&s.isBefore(u,a)&&(u=null),c){if(!o(c))return c;c=s.addDays(c,1)}if(u){if(!o(u))return u;u=s.addDays(u,-1)}}return null},i=(e,t)=>{const n=e.date(t);return e.isValid(n)?n:null},a=(e,t,n)=>{if(null==t)return n;const r=e.date(t);return e.isValid(r)?r:n}},34592:(e,t,n)=>{"use strict";n.d(t,{IE:()=>c,WC:()=>l,Zn:()=>r,r0:()=>s});const r=(e,t,n)=>{const r=e.date(t);return null===t?"":e.isValid(r)?e.formatByString(r,n):""},i="_",a="2019-11-21T22:30:00.000",o="2019-01-01T09:00:00.000";function s(e,t,n,r){if(e)return e;const s=r.formatByString(r.date(o),t).replace(n,i);return s===r.formatByString(r.date(a),t).replace(n,"_")?s:""}function l(e,t,n,r){if(!e)return!1;const s=r.formatByString(r.date(o),t).replace(n,i),l=r.formatByString(r.date(a),t).replace(n,"_"),c=l===s&&e===l;return!c&&r.lib,c}const c=(e,t)=>n=>{let r=0;return n.split("").map(((a,o)=>{if(t.lastIndex=0,r>e.length-1)return"";const s=e[r],l=e[r+1],c=t.test(a)?a:"",u=s===i?c:s+c;r+=u.length;return o===n.length-1&&l&&l!==i?u?u+l:"":u})).join("")}},22412:(e,t,n)=>{"use strict";n.d(t,{fX:()=>r,gY:()=>i,iF:()=>s,tB:()=>a});const r=(e,t)=>e?t.getHours(e)>=12?"pm":"am":null,i=(e,t,n)=>{if(n){if((e>=12?"pm":"am")!==t)return"am"===t?e-12:e+12}return e},a=(e,t,n,r)=>{const a=i(r.getHours(e),t,n);return r.setHours(e,a)},o=(e,t)=>3600*t.getHours(e)+60*t.getMinutes(e)+t.getSeconds(e),s=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return(n,r)=>e?t.isAfter(n,r):o(n,t)>o(r,t)}},79068:(e,t,n)=>{"use strict";function r(e,t){return Array.isArray(t)?t.every((t=>-1!==e.indexOf(t))):-1!==e.indexOf(t)}n.d(t,{Xk:()=>r,bq:()=>a,rQ:()=>i});const i=(e,t)=>n=>{"Enter"!==n.key&&" "!==n.key||(e(n),n.preventDefault(),n.stopPropagation()),t&&t(n)},a=function(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:document).activeElement;return e?e.shadowRoot?a(e.shadowRoot):e:null}},18495:(e,t,n)=>{"use strict";n.d(t,{B:()=>M,D:()=>le,E:()=>T,F:()=>ce,a:()=>A,b:()=>be,c:()=>Se,d:()=>we,e:()=>g,i:()=>w,u:()=>S});var r=n(13437),i=n(9950),a=n(13878);function o(e){let t;const n=new Set,r=(e,r)=>{const i="function"===typeof e?e(t):e;if(i!==t){const e=t;t=r?i:Object.assign({},t,i),n.forEach((n=>n(t,e)))}},i=()=>t,a={setState:r,getState:i,subscribe:(e,r,a)=>r||a?function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Object.is;console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let o=r(t);function s(){const n=r(t);if(!a(o,n)){const t=o;e(o=n,t)}}return n.add(s),()=>n.delete(s)}(e,r,a):(n.add(e),()=>n.delete(e)),destroy:()=>n.clear()};return t=e(r,i,a),a}const s="undefined"===typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent)?i.useEffect:i.useLayoutEffect;const l=[];function c(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:(e,t)=>e===t;if(e===t)return!0;if(!e||!t)return!1;const r=e.length;if(t.length!==r)return!1;for(let i=0;i1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};null===t&&(t=[e]);for(const o of l)if(c(t,o.keys,o.equal)){if(n)return;if(Object.prototype.hasOwnProperty.call(o,"error"))throw o.error;if(Object.prototype.hasOwnProperty.call(o,"response"))return r.lifespan&&r.lifespan>0&&(o.timeout&&clearTimeout(o.timeout),o.timeout=setTimeout(o.remove,r.lifespan)),o.response;if(!n)throw o.promise}const i={keys:t,equal:r.equal,remove:()=>{const e=l.indexOf(i);-1!==e&&l.splice(e,1)},promise:(a=e,"object"===typeof a&&"function"===typeof a.then?e:e(...t)).then((e=>{i.response=e,r.lifespan&&r.lifespan>0&&(i.timeout=setTimeout(i.remove,r.lifespan))})).catch((e=>i.error=e))};var a;if(l.push(i),!n)throw i.promise}var d=n(44414),h=n(9235),f=n.n(h),p=n(75340);const m={},g=e=>{Object.assign(m,e)};var v,y;const x=e=>"colorSpace"in e||"outputColorSpace"in e,b=()=>{var e;return null!=(e=m.ColorManagement)?e:null},_=e=>e&&e.isOrthographicCamera,w=e=>e&&e.hasOwnProperty("current"),A="undefined"!==typeof window&&(null!=(v=window.document)&&v.createElement||"ReactNative"===(null==(y=window.navigator)?void 0:y.product))?i.useLayoutEffect:i.useEffect;function S(e){const t=i.useRef(e);return A((()=>{t.current=e}),[e]),t}function M(e){let{set:t}=e;return A((()=>(t(new Promise((()=>null))),()=>t(!1))),[t]),null}class T extends i.Component{constructor(){super(...arguments),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}T.getDerivedStateFromError=()=>({error:!0});const k="__default",E=new Map,C=e=>e&&!!e.memoized&&!!e.changes;function D(e){var t;const n="undefined"!==typeof window?null!=(t=window.devicePixelRatio)?t:2:1;return Array.isArray(e)?Math.min(Math.max(e[0],n),e[1]):e}const R=e=>{var t;return null==(t=e.__r3f)?void 0:t.root.getState()};function P(e){let t=e.__r3f.root;for(;t.getState().previousRoot;)t=t.getState().previousRoot;return t}const O={obj:e=>e===Object(e)&&!O.arr(e)&&"function"!==typeof e,fun:e=>"function"===typeof e,str:e=>"string"===typeof e,num:e=>"number"===typeof e,boo:e=>"boolean"===typeof e,und:e=>void 0===e,arr:e=>Array.isArray(e),equ(e,t){let{arrays:n="shallow",objects:r="reference",strict:i=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(typeof e!==typeof t||!!e!==!!t)return!1;if(O.str(e)||O.num(e)||O.boo(e))return e===t;const a=O.obj(e);if(a&&"reference"===r)return e===t;const o=O.arr(e);if(o&&"reference"===n)return e===t;if((o||a)&&e===t)return!0;let s;for(s in e)if(!(s in t))return!1;if(a&&"shallow"===n&&"shallow"===r){for(s in i?t:e)if(!O.equ(e[s],t[s],{strict:i,objects:"reference"}))return!1}else for(s in i?t:e)if(e[s]!==t[s])return!1;if(O.und(s)){if(o&&0===e.length&&0===t.length)return!0;if(a&&0===Object.keys(e).length&&0===Object.keys(t).length)return!0;if(e!==t)return!1}return!0}};function L(e){const t={nodes:{},materials:{}};return e&&e.traverse((e=>{e.name&&(t.nodes[e.name]=e),e.material&&!t.materials[e.material.name]&&(t.materials[e.material.name]=e.material)})),t}function I(e,t){return e.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...t},e}function z(e,t){let n=e;if(t.includes("-")){const r=t.split("-"),i=r.pop();return n=r.reduce(((e,t)=>e[t]),e),{target:n,key:i}}return{target:n,key:t}}const N=/-\d+$/;function F(e,t,n){if(O.str(n)){if(N.test(n)){const t=n.replace(N,""),{target:r,key:i}=z(e,t);Array.isArray(r[i])||(r[i]=[])}const{target:r,key:i}=z(e,n);t.__r3f.previousAttach=r[i],r[i]=t}else t.__r3f.previousAttach=n(e,t)}function B(e,t,n){var r,i;if(O.str(n)){const{target:r,key:i}=z(e,n),a=t.__r3f.previousAttach;void 0===a?delete r[i]:r[i]=a}else null==(r=t.__r3f)||null==r.previousAttach||r.previousAttach(e,t);null==(i=t.__r3f)||delete i.previousAttach}function j(e,t){let{children:n,key:r,ref:i,...a}=t,{children:o,key:s,ref:l,...c}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const d=e.__r3f,h=Object.entries(a),f=[];if(u){const e=Object.keys(c);for(let t=0;t{let[n,r]=t;var i;if(null!=(i=e.__r3f)&&i.primitive&&"object"===n)return;if(O.equ(r,c[n]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(n))return f.push([n,r,!0,[]]);let o=[];n.includes("-")&&(o=n.split("-")),f.push([n,r,!1,o]);for(const e in a){const t=a[e];e.startsWith(`${n}-`)&&f.push([e,t,!1,e.split("-")])}}));const p={...a};return null!=d&&d.memoizedProps&&null!=d&&d.memoizedProps.args&&(p.args=d.memoizedProps.args),null!=d&&d.memoizedProps&&null!=d&&d.memoizedProps.attach&&(p.attach=d.memoizedProps.attach),{memoized:p,changes:f}}const U="undefined"!==typeof process&&!1;function V(e,t){var n;const i=e.__r3f,a=null==i?void 0:i.root,o=null==a||null==a.getState?void 0:a.getState(),{memoized:s,changes:l}=C(t)?t:j(e,t),c=null==i?void 0:i.eventCount;e.__r3f&&(e.__r3f.memoizedProps=s);for(let u=0;ue[t]),e),!d||!d.set)){const[n,...r]=s.reverse();c=r.reverse().reduce(((e,t)=>e[t]),e),t=n}if(n===k+"remove")if(c.constructor){let e=E.get(c.constructor);e||(e=new c.constructor,E.set(c.constructor,e)),n=e[t]}else n=0;if(a&&i)n?i.handlers[t]=n:delete i.handlers[t],i.eventCount=Object.keys(i.handlers).length;else if(d&&d.set&&(d.copy||d instanceof r.Layers)){if(Array.isArray(n))d.fromArray?d.fromArray(n):d.set(...n);else if(d.copy&&n&&n.constructor&&(U?d.constructor.name===n.constructor.name:d.constructor===n.constructor))d.copy(n);else if(void 0!==n){const e=d instanceof r.Color;!e&&d.setScalar?d.setScalar(n):d instanceof r.Layers&&n instanceof r.Layers?d.mask=n.mask:d.set(n),!b()&&o&&!o.linear&&e&&d.convertSRGBToLinear()}}else if(c[t]=n,c[t]instanceof r.Texture&&c[t].format===r.RGBAFormat&&c[t].type===r.UnsignedByteType&&o){const e=c[t];x(e)&&x(o.gl)?e.colorSpace=o.gl.outputColorSpace:e.encoding=o.gl.outputEncoding}H(e)}if(i&&i.parent&&e.raycast&&c!==i.eventCount){const t=P(e).getState().internal,n=t.interaction.indexOf(e);n>-1&&t.interaction.splice(n,1),i.eventCount&&t.interaction.push(e)}return!(1===l.length&&"onUpdate"===l[0][0])&&l.length&&null!=(n=e.__r3f)&&n.parent&&W(e),e}function H(e){var t,n;const r=null==(t=e.__r3f)||null==(n=t.root)||null==n.getState?void 0:n.getState();r&&0===r.internal.frames&&r.invalidate()}function W(e){null==e.onUpdate||e.onUpdate(e)}function G(e,t){e.manual||(_(e)?(e.left=t.width/-2,e.right=t.width/2,e.top=t.height/2,e.bottom=t.height/-2):e.aspect=t.width/t.height,e.updateProjectionMatrix(),e.updateMatrixWorld())}function q(e){return(e.eventObject||e.object).uuid+"/"+e.index+e.instanceId}function Y(e,t,n,r){const i=n.get(t);i&&(n.delete(t),0===n.size&&(e.delete(r),i.target.releasePointerCapture(r)))}function $(e){function t(e){return e.filter((e=>["Move","Over","Enter","Out","Leave"].some((t=>{var n;return null==(n=e.__r3f)?void 0:n.handlers["onPointer"+t]}))))}function n(t){const{internal:n}=e.getState();for(const e of n.hovered.values())if(!t.length||!t.find((t=>t.object===e.object&&t.index===e.index&&t.instanceId===e.instanceId))){const r=e.eventObject.__r3f,i=null==r?void 0:r.handlers;if(n.hovered.delete(q(e)),null!=r&&r.eventCount){const n={...e,intersections:t};null==i.onPointerOut||i.onPointerOut(n),null==i.onPointerLeave||i.onPointerLeave(n)}}}function i(e,t){for(let n=0;nn([]);case"onLostPointerCapture":return t=>{const{internal:r}=e.getState();"pointerId"in t&&r.capturedMap.has(t.pointerId)&&requestAnimationFrame((()=>{r.capturedMap.has(t.pointerId)&&(r.capturedMap.delete(t.pointerId),n([]))}))}}return function(o){const{onPointerMissed:s,internal:l}=e.getState();l.lastEvent.current=o;const c="onPointerMove"===a,u="onClick"===a||"onContextMenu"===a||"onDoubleClick"===a,d=function(t,n){const r=e.getState(),i=new Set,a=[],o=n?n(r.internal.interaction):r.internal.interaction;for(let e=0;e{const n=R(e.object),r=R(t.object);return n&&r&&r.events.priority-n.events.priority||e.distance-t.distance})).filter((e=>{const t=q(e);return!i.has(t)&&(i.add(t),!0)}));r.events.filter&&(s=r.events.filter(s,r));for(const e of s){let t=e.object;for(;t;){var l;null!=(l=t.__r3f)&&l.eventCount&&a.push({...e,eventObject:t}),t=t.parent}}if("pointerId"in t&&r.internal.capturedMap.has(t.pointerId))for(let e of r.internal.capturedMap.get(t.pointerId).values())i.has(q(e.intersection))||a.push(e.intersection);return a}(o,c?t:void 0),h=u?function(t){const{internal:n}=e.getState(),r=t.offsetX-n.initialClick[0],i=t.offsetY-n.initialClick[1];return Math.round(Math.sqrt(r*r+i*i))}(o):0;"onPointerDown"===a&&(l.initialClick=[o.offsetX,o.offsetY],l.initialHits=d.map((e=>e.eventObject))),u&&!d.length&&h<=2&&(i(o,l.interaction),s&&s(o)),c&&n(d),function(t,i,a,o){const s=e.getState();if(t.length){const e={stopped:!1};for(const l of t){const c=R(l.object)||s,{raycaster:u,pointer:d,camera:h,internal:f}=c,p=new r.Vector3(d.x,d.y,0).unproject(h),m=e=>{var t,n;return null!=(t=null==(n=f.capturedMap.get(e))?void 0:n.has(l.eventObject))&&t},g=e=>{const t={intersection:l,target:i.target};f.capturedMap.has(e)?f.capturedMap.get(e).set(l.eventObject,t):f.capturedMap.set(e,new Map([[l.eventObject,t]])),i.target.setPointerCapture(e)},v=e=>{const t=f.capturedMap.get(e);t&&Y(f.capturedMap,l.eventObject,t,e)};let y={};for(let e in i){let t=i[e];"function"!==typeof t&&(y[e]=t)}let x={...l,...y,pointer:d,intersections:t,stopped:e.stopped,delta:a,unprojectedPoint:p,ray:u.ray,camera:h,stopPropagation(){const r="pointerId"in i&&f.capturedMap.get(i.pointerId);(!r||r.has(l.eventObject))&&(x.stopped=e.stopped=!0,f.hovered.size&&Array.from(f.hovered.values()).find((e=>e.eventObject===l.eventObject)))&&n([...t.slice(0,t.indexOf(l)),l])},target:{hasPointerCapture:m,setPointerCapture:g,releasePointerCapture:v},currentTarget:{hasPointerCapture:m,setPointerCapture:g,releasePointerCapture:v},nativeEvent:i};if(o(x),!0===e.stopped)break}}}(d,o,h,(function(e){const t=e.eventObject,n=t.__r3f,r=null==n?void 0:n.handlers;if(null!=n&&n.eventCount)if(c){if(r.onPointerOver||r.onPointerEnter||r.onPointerOut||r.onPointerLeave){const t=q(e),n=l.hovered.get(t);n?n.stopped&&e.stopPropagation():(l.hovered.set(t,e),null==r.onPointerOver||r.onPointerOver(e),null==r.onPointerEnter||r.onPointerEnter(e))}null==r.onPointerMove||r.onPointerMove(e)}else{const n=r[a];n?u&&!l.initialHits.includes(t)||(i(o,l.interaction.filter((e=>!l.initialHits.includes(e)))),n(e)):u&&l.initialHits.includes(t)&&i(o,l.interaction.filter((e=>!l.initialHits.includes(e))))}}))}}}}const X=e=>!(null==e||!e.render),Z=i.createContext(null),K=(e,t)=>{const n=function(e){const t="function"===typeof e?o(e):e,n=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.getState,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object.is;const[,r]=(0,i.useReducer)((e=>e+1),0),a=t.getState(),o=(0,i.useRef)(a),l=(0,i.useRef)(e),c=(0,i.useRef)(n),u=(0,i.useRef)(!1),d=(0,i.useRef)();let h;void 0===d.current&&(d.current=e(a));let f=!1;(o.current!==a||l.current!==e||c.current!==n||u.current)&&(h=e(a),f=!n(d.current,h)),s((()=>{f&&(d.current=h),o.current=a,l.current=e,c.current=n,u.current=!1}));const p=(0,i.useRef)(a);s((()=>{const e=()=>{try{const e=t.getState(),n=l.current(e);c.current(d.current,n)||(o.current=e,d.current=n,r())}catch(e){u.current=!0,r()}},n=t.subscribe(e);return t.getState()!==p.current&&e(),n}),[]);const m=f?h:d.current;return(0,i.useDebugValue)(m),m};return Object.assign(n,t),n[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const e=[n,t];return{next(){const t=e.length<=0;return{value:e.shift(),done:t}}}},n}(((n,a)=>{const o=new r.Vector3,s=new r.Vector3,l=new r.Vector3;function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a().camera,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a().size;const{width:i,height:c,top:u,left:d}=n,h=i/c;t instanceof r.Vector3?l.copy(t):l.set(...t);const f=e.getWorldPosition(o).distanceTo(l);if(_(e))return{width:i/e.zoom,height:c/e.zoom,top:u,left:d,factor:1,distance:f,aspect:h};{const t=e.fov*Math.PI/180,n=2*Math.tan(t/2)*f,r=n*(i/c);return{width:r,height:n,top:u,left:d,factor:i/r,distance:f,aspect:h}}}let u;const d=e=>n((t=>({performance:{...t.performance,current:e}}))),h=new r.Vector2,f={set:n,get:a,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},xr:null,scene:null,invalidate:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return e(a(),t)},advance:(e,n)=>t(e,n,a()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new r.Clock,pointer:h,mouse:h,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const e=a();u&&clearTimeout(u),e.performance.current!==e.performance.min&&d(e.performance.min),u=setTimeout((()=>d(a().performance.max)),e.performance.debounce)}},size:{width:0,height:0,top:0,left:0,updateStyle:!1},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:c},setEvents:e=>n((t=>({...t,events:{...t.events,...e}}))),setSize:(e,t,r,i,o)=>{const l=a().camera,u={width:e,height:t,top:i||0,left:o||0,updateStyle:r};n((e=>({size:u,viewport:{...e.viewport,...c(l,s,u)}})))},setDpr:e=>n((t=>{const n=D(e);return{viewport:{...t.viewport,dpr:n,initialDpr:t.viewport.initialDpr||n}}})),setFrameloop:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"always";const t=a().clock;t.stop(),t.elapsedTime=0,"never"!==e&&(t.start(),t.elapsedTime=0),n((()=>({frameloop:e})))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:i.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(e,t,n)=>{const r=a().internal;return r.priority=r.priority+(t>0?1:0),r.subscribers.push({ref:e,priority:t,store:n}),r.subscribers=r.subscribers.sort(((e,t)=>e.priority-t.priority)),()=>{const n=a().internal;null!=n&&n.subscribers&&(n.priority=n.priority-(t>0?1:0),n.subscribers=n.subscribers.filter((t=>t.ref!==e)))}}}};return f})),a=n.getState();let l=a.size,c=a.viewport.dpr,u=a.camera;return n.subscribe((()=>{const{camera:e,size:t,viewport:r,gl:i,set:a}=n.getState();if(t.width!==l.width||t.height!==l.height||r.dpr!==c){var o;l=t,c=r.dpr,G(e,t),i.setPixelRatio(r.dpr);const n=null!=(o=t.updateStyle)?o:"undefined"!==typeof HTMLCanvasElement&&i.domElement instanceof HTMLCanvasElement;i.setSize(t.width,t.height,n)}e!==u&&(u=e,a((t=>({viewport:{...t.viewport,...t.viewport.getCurrentViewport(e)}}))))})),n.subscribe((t=>e(t))),n};let J,Q=new Set,ee=new Set,te=new Set;function ne(e,t){if(e.size)for(const{callback:n}of e.values())n(t)}function re(e,t){switch(e){case"before":return ne(Q,t);case"after":return ne(ee,t);case"tail":return ne(te,t)}}let ie,ae;function oe(e,t,n){let r=t.clock.getDelta();for("never"===t.frameloop&&"number"===typeof e&&(r=e-t.clock.elapsedTime,t.clock.oldTime=t.clock.elapsedTime,t.clock.elapsedTime=e),ie=t.internal.subscribers,J=0;J0&&void 0!==arguments[0]?arguments[0]:e=>e,t=arguments.length>1?arguments[1]:void 0;return se()(e,t)}function ce(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=se(),r=n.getState().internal.subscribe,i=S(e);return A((()=>r(i,t,n)),[t,r,n]),null}const ue=new WeakMap;function de(e,t){return function(n){let r=ue.get(n);r||(r=new n,ue.set(n,r)),e&&e(r);for(var i=arguments.length,a=new Array(i>1?i-1:0),o=1;onew Promise(((n,i)=>r.load(e,(e=>{e.scene&&Object.assign(e,L(e.scene)),n(e)}),t,(t=>i(new Error(`Could not load ${e}: ${null==t?void 0:t.message}`)))))))))}}function he(e,t,n,r){const i=Array.isArray(t)?t:[t],a=((e,t,n)=>u(e,t,!1,n))(de(n,r),[e,...i],{equal:O.equ});return Array.isArray(t)?a:a[0]}he.preload=function(e,t,n){const r=Array.isArray(t)?t:[t];return((e,t,n)=>{u(e,t,!0,n)})(de(n),[e,...r])},he.clear=function(e,t){return(e=>{if(void 0===e||0===e.length)l.splice(0,l.length);else{const t=l.find((t=>c(e,t.keys,t.equal)));t&&t.remove()}})([e,...Array.isArray(t)?t:[t]])};const fe=new Map,{invalidate:pe,advance:me}=function(e){let t,n,r,i=!1,a=!1;function o(s){n=requestAnimationFrame(o),i=!0,t=0,re("before",s),a=!0;for(const n of e.values()){var l;r=n.store.getState(),!r.internal.active||!("always"===r.frameloop||r.internal.frames>0)||null!=(l=r.gl.xr)&&l.isPresenting||(t+=oe(s,r))}if(a=!1,re("after",s),0===t)return re("tail",s),i=!1,cancelAnimationFrame(n)}return{loop:o,invalidate:function t(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;var s;if(!n)return e.forEach((e=>t(e.store.getState(),r)));null!=(s=n.gl.xr)&&s.isPresenting||!n.internal.active||"never"===n.frameloop||(n.internal.frames=r>1?Math.min(60,n.internal.frames+r):a?2:1,i||(i=!0,requestAnimationFrame(o)))},advance:function(t){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0;if(n&&re("before",t),r)oe(t,r,i);else for(const a of e.values())oe(t,a.store.getState());n&&re("after",t)}}}(fe),{reconciler:ge,applyProps:ve}=function(e,t){function n(e,t,n){let i,{args:a=[],attach:o,...s}=t,l=`${e[0].toUpperCase()}${e.slice(1)}`;if("primitive"===e){if(void 0===s.object)throw new Error("R3F: Primitives without 'object' are invalid!");i=I(s.object,{type:e,root:n,attach:o,primitive:!0})}else{const t=m[l];if(!t)throw new Error(`R3F: ${l} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`);if(!Array.isArray(a))throw new Error("R3F: The args prop must be an array!");i=I(new t(...a),{type:e,root:n,attach:o,memoizedProps:{args:a}})}return void 0===i.__r3f.attach&&(i instanceof r.BufferGeometry?i.__r3f.attach="geometry":i instanceof r.Material&&(i.__r3f.attach="material")),"inject"!==l&&V(i,s),i}function i(e,t){let n=!1;var r,i;t&&(null!=(r=t.__r3f)&&r.attach?F(e,t,t.__r3f.attach):t.isObject3D&&e.isObject3D&&(e.add(t),n=!0),n||null==(i=e.__r3f)||i.objects.push(t),t.__r3f||I(t,{}),t.__r3f.parent=e,W(t),H(t))}function o(e,t,n){let r=!1;if(t){var i,a;if(null!=(i=t.__r3f)&&i.attach)F(e,t,t.__r3f.attach);else if(t.isObject3D&&e.isObject3D){t.parent=e,t.dispatchEvent({type:"added"}),e.dispatchEvent({type:"childadded",child:t});const i=e.children.filter((e=>e!==t)),a=i.indexOf(n);e.children=[...i.slice(0,a),t,...i.slice(a)],r=!0}r||null==(a=e.__r3f)||a.objects.push(t),t.__r3f||I(t,{}),t.__r3f.parent=e,W(t),H(t)}}function s(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e&&[...e].forEach((e=>l(t,e,n)))}function l(e,t,n){if(t){var r,i,a;if(t.__r3f&&(t.__r3f.parent=null),null!=(r=e.__r3f)&&r.objects&&(e.__r3f.objects=e.__r3f.objects.filter((e=>e!==t))),null!=(i=t.__r3f)&&i.attach)B(e,t,t.__r3f.attach);else if(t.isObject3D&&e.isObject3D){var o;e.remove(t),null!=(o=t.__r3f)&&o.root&&function(e,t){const{internal:n}=e.getState();n.interaction=n.interaction.filter((e=>e!==t)),n.initialHits=n.initialHits.filter((e=>e!==t)),n.hovered.forEach(((e,r)=>{e.eventObject!==t&&e.object!==t||n.hovered.delete(r)})),n.capturedMap.forEach(((e,r)=>{Y(n.capturedMap,t,e,r)}))}(P(t),t)}const c=null==(a=t.__r3f)?void 0:a.primitive,u=!c&&(void 0===n?null!==t.dispose:n);var l;if(!c)s(null==(l=t.__r3f)?void 0:l.objects,t,u),s(t.children,t,u);if(delete t.__r3f,u&&t.dispose&&"Scene"!==t.type){const e=()=>{try{t.dispose()}catch(e){}};"undefined"===typeof IS_REACT_ACT_ENVIRONMENT?(0,p.unstable_scheduleCallback)(p.unstable_IdlePriority,e):e()}H(e)}}const c=()=>{};return{reconciler:f()({createInstance:n,removeChild:l,appendChild:i,appendInitialChild:i,insertBefore:o,supportsMutation:!0,isPrimaryRenderer:!1,supportsPersistence:!1,supportsHydration:!1,noTimeout:-1,appendChildToContainer:(e,t)=>{if(!t)return;const n=e.getState().scene;n.__r3f&&(n.__r3f.root=e,i(n,t))},removeChildFromContainer:(e,t)=>{t&&l(e.getState().scene,t)},insertInContainerBefore:(e,t,n)=>{if(!t||!n)return;const r=e.getState().scene;r.__r3f&&o(r,t,n)},getRootHostContext:()=>null,getChildHostContext:e=>e,finalizeInitialChildren(e){var t;const n=null!=(t=null==e?void 0:e.__r3f)?t:{};return Boolean(n.handlers)},prepareUpdate(e,t,n,r){var i;if((null!=(i=null==e?void 0:e.__r3f)?i:{}).primitive&&r.object&&r.object!==e)return[!0];{const{args:t=[],children:i,...a}=r,{args:o=[],children:s,...l}=n;if(!Array.isArray(t))throw new Error("R3F: the args prop must be an array!");if(t.some(((e,t)=>e!==o[t])))return[!0];const c=j(e,a,l,!0);return c.changes.length?[!1,c]:null}},commitUpdate(e,t,r,a,o,s){let[c,u]=t;c?function(e,t,r,a){var o;const s=null==(o=e.__r3f)?void 0:o.parent;if(!s)return;const c=n(t,r,e.__r3f.root);if(e.children){for(const t of e.children)t.__r3f&&i(c,t);e.children=e.children.filter((e=>!e.__r3f))}e.__r3f.objects.forEach((e=>i(c,e))),e.__r3f.objects=[],e.__r3f.autoRemovedBeforeAppend||l(s,e),c.parent&&(c.__r3f.autoRemovedBeforeAppend=!0),i(s,c),c.raycast&&c.__r3f.eventCount&&P(c).getState().internal.interaction.push(c);[a,a.alternate].forEach((e=>{null!==e&&(e.stateNode=c,e.ref&&("function"===typeof e.ref?e.ref(c):e.ref.current=c))}))}(e,r,o,s):V(e,u)},commitMount(e,t,n,r){var i;const a=null!=(i=e.__r3f)?i:{};e.raycast&&a.handlers&&a.eventCount&&P(e).getState().internal.interaction.push(e)},getPublicInstance:e=>e,prepareForCommit:()=>null,preparePortalMount:e=>I(e.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(e){var t;const{attach:n,parent:r}=null!=(t=e.__r3f)?t:{};n&&r&&B(r,e,n),e.isObject3D&&(e.visible=!1),H(e)},unhideInstance(e,t){var n;const{attach:r,parent:i}=null!=(n=e.__r3f)?n:{};r&&i&&F(i,e,r),(e.isObject3D&&null==t.visible||t.visible)&&(e.visible=!0),H(e)},createTextInstance:c,hideTextInstance:c,unhideTextInstance:c,getCurrentEventPriority:()=>t?t():a.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:"undefined"!==typeof performance&&O.fun(performance.now)?performance.now:O.fun(Date.now)?Date.now:()=>0,scheduleTimeout:O.fun(setTimeout)?setTimeout:void 0,cancelTimeout:O.fun(clearTimeout)?clearTimeout:void 0}),applyProps:V}}(0,(function(){var e;const t="undefined"!==typeof self&&self||"undefined"!==typeof window&&window;if(!t)return a.DefaultEventPriority;switch(null==(e=t.event)?void 0:e.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return a.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return a.ContinuousEventPriority;default:return a.DefaultEventPriority}})),ye={objects:"shallow",strict:!1},xe=(e,t)=>{const n="function"===typeof e?e(t):e;return X(n)?n:new r.WebGLRenderer({powerPreference:"high-performance",canvas:t,antialias:!0,alpha:!0,...e})};function be(e){const t=fe.get(e),n=null==t?void 0:t.fiber,i=null==t?void 0:t.store;t&&console.warn("R3F.createRoot should only be called once!");const o="function"===typeof reportError?reportError:console.error,s=i||K(pe,me),l=n||ge.createContainer(s,a.ConcurrentRoot,null,!1,null,"",o,null);let c;t||fe.set(e,{fiber:l,store:s});let u,h=!1;return{configure(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{gl:n,size:i,scene:a,events:o,onCreated:l,shadows:d=!1,linear:f=!1,flat:p=!1,legacy:m=!1,orthographic:g=!1,frameloop:v="always",dpr:y=[1,2],performance:x,raycaster:_,camera:w,onPointerMissed:A}=t,S=s.getState(),M=S.gl;S.gl||S.set({gl:M=xe(n,e)});let T=S.raycaster;T||S.set({raycaster:T=new r.Raycaster});const{params:k,...E}=_||{};if(O.equ(E,T,ye)||ve(T,{...E}),O.equ(k,T.params,ye)||ve(T,{params:{...T.params,...k}}),!S.camera||S.camera===u&&!O.equ(u,w,ye)){u=w;const e=w instanceof r.Camera,t=e?w:g?new r.OrthographicCamera(0,0,0,0,.1,1e3):new r.PerspectiveCamera(75,0,.1,1e3);e||(t.position.z=5,w&&(ve(t,w),("aspect"in w||"left"in w||"right"in w||"bottom"in w||"top"in w)&&(t.manual=!0,t.updateProjectionMatrix())),S.camera||null!=w&&w.rotation||t.lookAt(0,0,0)),S.set({camera:t}),T.camera=t}if(!S.scene){let e;a instanceof r.Scene?e=a:(e=new r.Scene,a&&ve(e,a)),S.set({scene:I(e)})}if(!S.xr){var C;const e=(e,t)=>{const n=s.getState();"never"!==n.frameloop&&me(e,!0,n,t)},t=()=>{const t=s.getState();t.gl.xr.enabled=t.gl.xr.isPresenting,t.gl.xr.setAnimationLoop(t.gl.xr.isPresenting?e:null),t.gl.xr.isPresenting||pe(t)},n={connect(){const e=s.getState().gl;e.xr.addEventListener("sessionstart",t),e.xr.addEventListener("sessionend",t)},disconnect(){const e=s.getState().gl;e.xr.removeEventListener("sessionstart",t),e.xr.removeEventListener("sessionend",t)}};"function"===typeof(null==(C=M.xr)?void 0:C.addEventListener)&&n.connect(),S.set({xr:n})}if(M.shadowMap){const e=M.shadowMap.enabled,t=M.shadowMap.type;if(M.shadowMap.enabled=!!d,O.boo(d))M.shadowMap.type=r.PCFSoftShadowMap;else if(O.str(d)){var R;const e={basic:r.BasicShadowMap,percentage:r.PCFShadowMap,soft:r.PCFSoftShadowMap,variance:r.VSMShadowMap};M.shadowMap.type=null!=(R=e[d])?R:r.PCFSoftShadowMap}else O.obj(d)&&Object.assign(M.shadowMap,d);e===M.shadowMap.enabled&&t===M.shadowMap.type||(M.shadowMap.needsUpdate=!0)}const P=b();if(P&&("enabled"in P?P.enabled=!m:"legacyMode"in P&&(P.legacyMode=m)),!h){ve(M,{outputEncoding:f?3e3:3001,toneMapping:p?r.NoToneMapping:r.ACESFilmicToneMapping})}S.legacy!==m&&S.set((()=>({legacy:m}))),S.linear!==f&&S.set((()=>({linear:f}))),S.flat!==p&&S.set((()=>({flat:p}))),!n||O.fun(n)||X(n)||O.equ(n,M,ye)||ve(M,n),o&&!S.events.handlers&&S.set({events:o(s)});const L=function(e,t){const n="undefined"!==typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement;if(t){const{width:e,height:r,top:i,left:a,updateStyle:o=n}=t;return{width:e,height:r,top:i,left:a,updateStyle:o}}if("undefined"!==typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement&&e.parentElement){const{width:t,height:r,top:i,left:a}=e.parentElement.getBoundingClientRect();return{width:t,height:r,top:i,left:a,updateStyle:n}}return"undefined"!==typeof OffscreenCanvas&&e instanceof OffscreenCanvas?{width:e.width,height:e.height,top:0,left:0,updateStyle:n}:{width:0,height:0,top:0,left:0}}(e,i);return O.equ(L,S.size,ye)||S.setSize(L.width,L.height,L.updateStyle,L.top,L.left),y&&S.viewport.dpr!==D(y)&&S.setDpr(y),S.frameloop!==v&&S.setFrameloop(v),S.onPointerMissed||S.set({onPointerMissed:A}),x&&!O.equ(x,S.performance,ye)&&S.set((e=>({performance:{...e.performance,...x}}))),c=l,h=!0,this},render(t){return h||this.configure(),ge.updateContainer((0,d.jsx)(_e,{store:s,children:t,onCreated:c,rootElement:e}),l,null,(()=>{})),s},unmount(){we(e)}}}function _e(e){let{store:t,children:n,onCreated:r,rootElement:i}=e;return A((()=>{const e=t.getState();e.set((e=>({internal:{...e.internal,active:!0}}))),r&&r(e),t.getState().events.connected||null==e.events.connect||e.events.connect(i)}),[]),(0,d.jsx)(Z.Provider,{value:t,children:n})}function we(e,t){const n=fe.get(e),r=null==n?void 0:n.fiber;if(r){const i=null==n?void 0:n.store.getState();i&&(i.internal.active=!1),ge.updateContainer(null,r,null,(()=>{i&&setTimeout((()=>{try{var n,r,a,o;null==i.events.disconnect||i.events.disconnect(),null==(n=i.gl)||null==(r=n.renderLists)||null==r.dispose||r.dispose(),null==(a=i.gl)||null==a.forceContextLoss||a.forceContextLoss(),null!=(o=i.gl)&&o.xr&&i.xr.disconnect(),function(e){e.dispose&&"Scene"!==e.type&&e.dispose();for(const t in e)null==t.dispose||t.dispose(),delete e[t]}(i),fe.delete(e),t&&t(e)}catch(s){}}),500)}))}}ge.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:i.version});i.unstable_act;const Ae={onClick:["click",!1],onContextMenu:["contextmenu",!1],onDoubleClick:["dblclick",!1],onWheel:["wheel",!0],onPointerDown:["pointerdown",!0],onPointerUp:["pointerup",!0],onPointerLeave:["pointerleave",!0],onPointerMove:["pointermove",!0],onPointerCancel:["pointercancel",!0],onLostPointerCapture:["lostpointercapture",!0]};function Se(e){const{handlePointer:t}=$(e);return{priority:1,enabled:!0,compute(e,t,n){t.pointer.set(e.offsetX/t.size.width*2-1,-e.offsetY/t.size.height*2+1),t.raycaster.setFromCamera(t.pointer,t.camera)},connected:void 0,handlers:Object.keys(Ae).reduce(((e,n)=>({...e,[n]:t(n)})),{}),update:()=>{var t;const{events:n,internal:r}=e.getState();null!=(t=r.lastEvent)&&t.current&&n.handlers&&n.handlers.onPointerMove(r.lastEvent.current)},connect:t=>{var n;const{set:r,events:i}=e.getState();null==i.disconnect||i.disconnect(),r((e=>({events:{...e.events,connected:t}}))),Object.entries(null!=(n=i.handlers)?n:[]).forEach((e=>{let[n,r]=e;const[i,a]=Ae[n];t.addEventListener(i,r,{passive:a})}))},disconnect:()=>{const{set:t,events:n}=e.getState();var r;n.connected&&(Object.entries(null!=(r=n.handlers)?r:[]).forEach((e=>{let[t,r]=e;if(n&&n.connected instanceof HTMLElement){const[e]=Ae[t];n.connected.removeEventListener(e,r)}})),t((e=>({events:{...e.events,connected:void 0}}))))}}}},75468:(e,t,n)=>{"use strict";n.d(t,{Hl:()=>R});var r,i,a=n(18495),o=n(9950),s=n(13437),l=n(19356),c=n.n(l),u=Object.defineProperty,d=Object.defineProperties,h=Object.getOwnPropertyDescriptors,f=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable,g=(e,t,n)=>t in e?u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,v=(e,t)=>{for(var n in t||(t={}))p.call(t,n)&&g(e,n,t[n]);if(f)for(var n of f(t))m.call(t,n)&&g(e,n,t[n]);return e};"undefined"===typeof window||!(null==(r=window.document)?void 0:r.createElement)&&"ReactNative"!==(null==(i=window.navigator)?void 0:i.product)?o.useEffect:o.useLayoutEffect;function y(e,t,n){if(!e)return;if(!0===n(e))return e;let r=t?e.return:e.child;for(;r;){const e=y(r,t,n);if(e)return e;r=t?null:r.sibling}}function x(e){try{return Object.defineProperties(e,{_currentRenderer:{get:()=>null,set(){}},_currentRenderer2:{get:()=>null,set(){}}})}catch(t){return e}}const b=console.error;console.error=function(){const e=[...arguments].join("");if(!(null==e?void 0:e.startsWith("Warning:"))||!e.includes("useContext"))return b.apply(this,arguments);console.error=b};const _=x(o.createContext(null));class w extends o.Component{render(){return o.createElement(_.Provider,{value:this._reactInternals},this.props.children)}}function A(){const e=o.useContext(_);if(null===e)throw new Error("its-fine: useFiber must be called within a !");const t=o.useId();return o.useMemo((()=>{for(const n of[e,null==e?void 0:e.alternate]){if(!n)continue;const e=y(n,!1,(e=>{let n=e.memoizedState;for(;n;){if(n.memoizedState===t)return!0;n=n.next}}));if(e)return e}}),[e,t])}function S(){const e=function(){const e=A(),[t]=o.useState((()=>new Map));t.clear();let n=e;for(;n;){if(n.type&&"object"===typeof n.type){const e=void 0===n.type._context&&n.type.Provider===n.type?n.type:n.type._context;e&&e!==_&&!t.has(e)&&t.set(e,o.useContext(x(e)))}n=n.return}return t}();return o.useMemo((()=>Array.from(e.keys()).reduce(((t,n)=>r=>{return o.createElement(t,null,o.createElement(n.Provider,(i=v({},r),a={value:e.get(n)},d(i,h(a)))));var i,a}),(e=>o.createElement(w,v({},e))))),[e])}var M=n(44414);n(13878),n(9235),n(75340);function T(){let{debounce:e,scroll:t,polyfill:n,offsetSize:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{debounce:0,scroll:!1,offsetSize:!1};const i=n||"undefined"!==typeof window&&window.ResizeObserver,[a,s]=(0,o.useState)({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0});if(!i)return a.width=1280,a.height=800,[()=>{},a,()=>{}];const l=(0,o.useRef)({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a,orientationHandler:null}),u=e?"number"===typeof e?e:e.scroll:null,d=e?"number"===typeof e?e:e.resize:null,h=(0,o.useRef)(!1);(0,o.useEffect)((()=>(h.current=!0,()=>{h.current=!1})));const[f,p,m]=(0,o.useMemo)((()=>{const e=()=>{if(!l.current.element)return;const{left:e,top:t,width:n,height:i,bottom:a,right:o,x:c,y:u}=l.current.element.getBoundingClientRect(),d={left:e,top:t,width:n,height:i,bottom:a,right:o,x:c,y:u};l.current.element instanceof HTMLElement&&r&&(d.height=l.current.element.offsetHeight,d.width=l.current.element.offsetWidth),Object.freeze(d),h.current&&!C(l.current.lastBounds,d)&&s(l.current.lastBounds=d)};return[e,d?c()(e,d):e,u?c()(e,u):e]}),[s,r,u,d]);function g(){l.current.scrollContainers&&(l.current.scrollContainers.forEach((e=>e.removeEventListener("scroll",m,!0))),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null),l.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",l.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",l.current.orientationHandler))}function v(){var e;l.current.element&&(l.current.resizeObserver=new i(p),null==(e=l.current.resizeObserver)||e.observe(l.current.element),t&&l.current.scrollContainers&&l.current.scrollContainers.forEach((e=>e.addEventListener("scroll",m,{capture:!0,passive:!0}))),l.current.orientationHandler=()=>{m()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",l.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",l.current.orientationHandler))}var y,x,b;return y=m,x=Boolean(t),(0,o.useEffect)((()=>{if(x){const e=y;return window.addEventListener("scroll",e,{capture:!0,passive:!0}),()=>{window.removeEventListener("scroll",e,!0)}}}),[y,x]),b=p,(0,o.useEffect)((()=>{const e=b;return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[b]),(0,o.useEffect)((()=>{g(),v()}),[t,m,p]),(0,o.useEffect)((()=>g),[]),[e=>{e&&e!==l.current.element&&(g(),l.current.element=e,l.current.scrollContainers=k(e),v())},a,f]}function k(e){const t=[];if(!e||e===document.body)return t;const{overflow:n,overflowX:r,overflowY:i}=window.getComputedStyle(e);return[n,r,i].some((e=>"auto"===e||"scroll"===e))&&t.push(e),[...t,...k(e.parentElement)]}const E=["x","y","top","bottom","left","right","width","height"],C=(e,t)=>E.every((n=>e[n]===t[n])),D=o.forwardRef((function(e,t){let{children:n,fallback:r,resize:i,style:l,gl:c,events:u=a.c,eventSource:d,eventPrefix:h,shadows:f,linear:p,flat:m,legacy:g,orthographic:v,frameloop:y,dpr:x,performance:b,raycaster:_,camera:w,scene:A,onPointerMissed:k,onCreated:E,...C}=e;o.useMemo((()=>(0,a.e)(s)),[]);const D=S(),[R,P]=T({scroll:!0,debounce:{scroll:50,resize:0},...i}),O=o.useRef(null),L=o.useRef(null);o.useImperativeHandle(t,(()=>O.current));const I=(0,a.u)(k),[z,N]=o.useState(!1),[F,B]=o.useState(!1);if(z)throw z;if(F)throw F;const j=o.useRef(null);(0,a.a)((()=>{const e=O.current;P.width>0&&P.height>0&&e&&(j.current||(j.current=(0,a.b)(e)),j.current.configure({gl:c,events:u,shadows:f,linear:p,flat:m,legacy:g,orthographic:v,frameloop:y,dpr:x,performance:b,raycaster:_,camera:w,scene:A,size:P,onPointerMissed:function(){return null==I.current?void 0:I.current(...arguments)},onCreated:e=>{null==e.events.connect||e.events.connect(d?(0,a.i)(d)?d.current:d:L.current),h&&e.setEvents({compute:(e,t)=>{const n=e[h+"X"],r=e[h+"Y"];t.pointer.set(n/t.size.width*2-1,-r/t.size.height*2+1),t.raycaster.setFromCamera(t.pointer,t.camera)}}),null==E||E(e)}}),j.current.render((0,M.jsx)(D,{children:(0,M.jsx)(a.E,{set:B,children:(0,M.jsx)(o.Suspense,{fallback:(0,M.jsx)(a.B,{set:N}),children:n})})})))})),o.useEffect((()=>{const e=O.current;if(e)return()=>(0,a.d)(e)}),[]);const U=d?"none":"auto";return(0,M.jsx)("div",{ref:L,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:U,...l},...C,children:(0,M.jsx)("div",{ref:R,style:{width:"100%",height:"100%"},children:(0,M.jsx)("canvas",{ref:O,style:{display:"block"},children:r})})})})),R=o.forwardRef((function(e,t){return(0,M.jsx)(w,{children:(0,M.jsx)(D,{...e,ref:t})})}))},96011:(e,t,n)=>{e.exports=n(66429)},98394:(e,t,n)=>{"use strict";var r=n(14950),i=n(33244),a=n(18090),o=n(5704),s=n(8801),l=n(35850),c=n(55216),u=n(58726),d=n(28891),h=n(42705),f=n(81110);e.exports=function(e){return new Promise((function(t,n){var p,m=e.data,g=e.headers,v=e.responseType;function y(){e.cancelToken&&e.cancelToken.unsubscribe(p),e.signal&&e.signal.removeEventListener("abort",p)}r.isFormData(m)&&r.isStandardBrowserEnv()&&delete g["Content-Type"];var x=new XMLHttpRequest;if(e.auth){var b=e.auth.username||"",_=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";g.Authorization="Basic "+btoa(b+":"+_)}var w=s(e.baseURL,e.url);function A(){if(x){var r="getAllResponseHeaders"in x?l(x.getAllResponseHeaders()):null,a={data:v&&"text"!==v&&"json"!==v?x.response:x.responseText,status:x.status,statusText:x.statusText,headers:r,config:e,request:x};i((function(e){t(e),y()}),(function(e){n(e),y()}),a),x=null}}if(x.open(e.method.toUpperCase(),o(w,e.params,e.paramsSerializer),!0),x.timeout=e.timeout,"onloadend"in x?x.onloadend=A:x.onreadystatechange=function(){x&&4===x.readyState&&(0!==x.status||x.responseURL&&0===x.responseURL.indexOf("file:"))&&setTimeout(A)},x.onabort=function(){x&&(n(new d("Request aborted",d.ECONNABORTED,e,x)),x=null)},x.onerror=function(){n(new d("Network Error",d.ERR_NETWORK,e,x,x)),x=null},x.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||u;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new d(t,r.clarifyTimeoutError?d.ETIMEDOUT:d.ECONNABORTED,e,x)),x=null},r.isStandardBrowserEnv()){var S=(e.withCredentials||c(w))&&e.xsrfCookieName?a.read(e.xsrfCookieName):void 0;S&&(g[e.xsrfHeaderName]=S)}"setRequestHeader"in x&&r.forEach(g,(function(e,t){"undefined"===typeof m&&"content-type"===t.toLowerCase()?delete g[t]:x.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(x.withCredentials=!!e.withCredentials),v&&"json"!==v&&(x.responseType=e.responseType),"function"===typeof e.onDownloadProgress&&x.addEventListener("progress",e.onDownloadProgress),"function"===typeof e.onUploadProgress&&x.upload&&x.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(p=function(e){x&&(n(!e||e&&e.type?new h:e),x.abort(),x=null)},e.cancelToken&&e.cancelToken.subscribe(p),e.signal&&(e.signal.aborted?p():e.signal.addEventListener("abort",p))),m||(m=null);var M=f(w);M&&-1===["http","https","file"].indexOf(M)?n(new d("Unsupported protocol "+M+":",d.ERR_BAD_REQUEST,e)):x.send(m)}))}},66429:(e,t,n)=>{"use strict";var r=n(14950),i=n(62498),a=n(83213),o=n(57549);var s=function e(t){var n=new a(t),s=i(a.prototype.request,n);return r.extend(s,a.prototype,n),r.extend(s,n),s.create=function(n){return e(o(t,n))},s}(n(90846));s.Axios=a,s.CanceledError=n(42705),s.CancelToken=n(3209),s.isCancel=n(14638),s.VERSION=n(5599).version,s.toFormData=n(7406),s.AxiosError=n(28891),s.Cancel=s.CanceledError,s.all=function(e){return Promise.all(e)},s.spread=n(20650),s.isAxiosError=n(75509),e.exports=s,e.exports.default=s},3209:(e,t,n)=>{"use strict";var r=n(42705);function i(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t{"use strict";var r=n(28891);function i(e){r.call(this,null==e?"canceled":e,r.ERR_CANCELED),this.name="CanceledError"}n(14950).inherits(i,r,{__CANCEL__:!0}),e.exports=i},14638:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},83213:(e,t,n)=>{"use strict";var r=n(14950),i=n(5704),a=n(17805),o=n(14012),s=n(57549),l=n(8801),c=n(3807),u=c.validators;function d(e){this.defaults=e,this.interceptors={request:new a,response:new a}}d.prototype.request=function(e,t){"string"===typeof e?(t=t||{}).url=e:t=e||{},(t=s(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=t.transitional;void 0!==n&&c.assertOptions(n,{silentJSONParsing:u.transitional(u.boolean),forcedJSONParsing:u.transitional(u.boolean),clarifyTimeoutError:u.transitional(u.boolean)},!1);var r=[],i=!0;this.interceptors.request.forEach((function(e){"function"===typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,r.unshift(e.fulfilled,e.rejected))}));var a,l=[];if(this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)})),!i){var d=[o,void 0];for(Array.prototype.unshift.apply(d,r),d=d.concat(l),a=Promise.resolve(t);d.length;)a=a.then(d.shift(),d.shift());return a}for(var h=t;r.length;){var f=r.shift(),p=r.shift();try{h=f(h)}catch(m){p(m);break}}try{a=o(h)}catch(m){return Promise.reject(m)}for(;l.length;)a=a.then(l.shift(),l.shift());return a},d.prototype.getUri=function(e){e=s(this.defaults,e);var t=l(e.baseURL,e.url);return i(t,e.params,e.paramsSerializer)},r.forEach(["delete","get","head","options"],(function(e){d.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,i){return this.request(s(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}d.prototype[e]=t(),d.prototype[e+"Form"]=t(!0)})),e.exports=d},28891:(e,t,n)=>{"use strict";var r=n(14950);function i(e,t,n,r,i){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}r.inherits(i,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var a=i.prototype,o={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach((function(e){o[e]={value:e}})),Object.defineProperties(i,o),Object.defineProperty(a,"isAxiosError",{value:!0}),i.from=function(e,t,n,o,s,l){var c=Object.create(a);return r.toFlatObject(e,c,(function(e){return e!==Error.prototype})),i.call(c,e.message,t,n,o,s),c.name=e.name,l&&Object.assign(c,l),c},e.exports=i},17805:(e,t,n)=>{"use strict";var r=n(14950);function i(){this.handlers=[]}i.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},8801:(e,t,n)=>{"use strict";var r=n(31831),i=n(18066);e.exports=function(e,t){return e&&!r(t)?i(e,t):t}},14012:(e,t,n)=>{"use strict";var r=n(14950),i=n(82115),a=n(14638),o=n(90846),s=n(42705);function l(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s}e.exports=function(e){return l(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||o.adapter)(e).then((function(t){return l(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return a(t)||(l(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},57549:(e,t,n)=>{"use strict";var r=n(14950);e.exports=function(e,t){t=t||{};var n={};function i(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function a(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:i(void 0,e[n]):i(e[n],t[n])}function o(e){if(!r.isUndefined(t[e]))return i(void 0,t[e])}function s(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:i(void 0,e[n]):i(void 0,t[n])}function l(n){return n in t?i(e[n],t[n]):n in e?i(void 0,e[n]):void 0}var c={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l};return r.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||a,i=t(e);r.isUndefined(i)&&t!==l||(n[e]=i)})),n}},33244:(e,t,n)=>{"use strict";var r=n(28891);e.exports=function(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(new r("Request failed with status code "+n.status,[r.ERR_BAD_REQUEST,r.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}},82115:(e,t,n)=>{"use strict";var r=n(14950),i=n(90846);e.exports=function(e,t,n){var a=this||i;return r.forEach(n,(function(n){e=n.call(a,e,t)})),e}},90846:(e,t,n)=>{"use strict";var r=n(14950),i=n(5180),a=n(28891),o=n(58726),s=n(7406),l={"Content-Type":"application/x-www-form-urlencoded"};function c(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var u={transitional:o,adapter:function(){var e;return("undefined"!==typeof XMLHttpRequest||"undefined"!==typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(e=n(98394)),e}(),transformRequest:[function(e,t){if(i(t,"Accept"),i(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e))return e;if(r.isArrayBufferView(e))return e.buffer;if(r.isURLSearchParams(e))return c(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var n,a=r.isObject(e),o=t&&t["Content-Type"];if((n=r.isFileList(e))||a&&"multipart/form-data"===o){var l=this.env&&this.env.FormData;return s(n?{"files[]":e}:e,l&&new l)}return a||"application/json"===o?(c(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(t||JSON.parse)(e),r.trim(e)}catch(i){if("SyntaxError"!==i.name)throw i}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||u.transitional,n=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,o=!n&&"json"===this.responseType;if(o||i&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(s){if(o){if("SyntaxError"===s.name)throw a.from(s,a.ERR_BAD_RESPONSE,this,null,this.response);throw s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:n(6e3)},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){u.headers[e]=r.merge(l)})),e.exports=u},58726:e=>{"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},5599:e=>{e.exports={version:"0.27.2"}},62498:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r{"use strict";var r=n(14950);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var a;if(n)a=n(t);else if(r.isURLSearchParams(t))a=t.toString();else{var o=[];r.forEach(t,(function(e,t){null!==e&&"undefined"!==typeof e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),o.push(i(t)+"="+i(e))})))})),a=o.join("&")}if(a){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}},18066:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},18090:(e,t,n)=>{"use strict";var r=n(14950);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,i,a,o){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(a)&&s.push("domain="+a),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},31831:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},75509:(e,t,n)=>{"use strict";var r=n(14950);e.exports=function(e){return r.isObject(e)&&!0===e.isAxiosError}},55216:(e,t,n)=>{"use strict";var r=n(14950);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},5180:(e,t,n)=>{"use strict";var r=n(14950);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},6e3:e=>{e.exports=null},35850:(e,t,n)=>{"use strict";var r=n(14950),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,a,o={};return e?(r.forEach(e.split("\n"),(function(e){if(a=e.indexOf(":"),t=r.trim(e.substr(0,a)).toLowerCase(),n=r.trim(e.substr(a+1)),t){if(o[t]&&i.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([n]):o[t]?o[t]+", "+n:n}})),o):o}},81110:e=>{"use strict";e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},20650:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},7406:(e,t,n)=>{"use strict";var r=n(14950);e.exports=function(e,t){t=t||new FormData;var n=[];function i(e){return null===e?"":r.isDate(e)?e.toISOString():r.isArrayBuffer(e)||r.isTypedArray(e)?"function"===typeof Blob?new Blob([e]):Buffer.from(e):e}return function e(a,o){if(r.isPlainObject(a)||r.isArray(a)){if(-1!==n.indexOf(a))throw Error("Circular reference detected in "+o);n.push(a),r.forEach(a,(function(n,a){if(!r.isUndefined(n)){var s,l=o?o+"."+a:a;if(n&&!o&&"object"===typeof n)if(r.endsWith(a,"{}"))n=JSON.stringify(n);else if(r.endsWith(a,"[]")&&(s=r.toArray(n)))return void s.forEach((function(e){!r.isUndefined(e)&&t.append(l,i(e))}));e(n,l)}})),n.pop()}else t.append(o,i(a))}(e),t}},3807:(e,t,n)=>{"use strict";var r=n(5599).version,i=n(28891),a={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){a[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var o={};a.transitional=function(e,t,n){function a(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,s){if(!1===e)throw new i(a(r," has been removed"+(t?" in "+t:"")),i.ERR_DEPRECATED);return t&&!o[r]&&(o[r]=!0,console.warn(a(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,s)}},e.exports={assertOptions:function(e,t,n){if("object"!==typeof e)throw new i("options must be an object",i.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(e),a=r.length;a-- >0;){var o=r[a],s=t[o];if(s){var l=e[o],c=void 0===l||s(l,o,e);if(!0!==c)throw new i("option "+o+" must be "+c,i.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new i("Unknown option "+o,i.ERR_BAD_OPTION)}},validators:a}},14950:(e,t,n)=>{"use strict";var r,i=n(62498),a=Object.prototype.toString,o=(r=Object.create(null),function(e){var t=a.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())});function s(e){return e=e.toLowerCase(),function(t){return o(t)===e}}function l(e){return Array.isArray(e)}function c(e){return"undefined"===typeof e}var u=s("ArrayBuffer");function d(e){return null!==e&&"object"===typeof e}function h(e){if("object"!==o(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var f=s("Date"),p=s("File"),m=s("Blob"),g=s("FileList");function v(e){return"[object Function]"===a.call(e)}var y=s("URLSearchParams");function x(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),l(e))for(var n=0,r=e.length;n0;)o[a=r[i]]||(t[a]=e[a],o[a]=!0);e=Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:o,kindOfTest:s,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return-1!==r&&r===n},toArray:function(e){if(!e)return null;var t=e.length;if(c(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},isTypedArray:_,isFileList:g}},2803:(e,t,n)=>{"use strict";function r(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;ti});const i=function(){for(var e,t,n=0,i="";n{e.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:1,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],"rainbow-soft":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],"freesurface-blue":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],"freesurface-red":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],"velocity-blue":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],"velocity-green":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},29144:(e,t,n)=>{"use strict";var r=n(93805),i=n(41314);function a(e){return[e[0]/255,e[1]/255,e[2]/255,e[3]]}function o(e){for(var t,n="#",r=0;r<3;++r)n+=("00"+(t=(t=e[r]).toString(16))).substr(t.length);return n}function s(e){return"rgba("+e.join(",")+")"}e.exports=function(e){var t,n,l,c,u,d,h,f,p,m;e||(e={});f=(e.nshades||72)-1,h=e.format||"hex",(d=e.colormap)||(d="jet");if("string"===typeof d){if(d=d.toLowerCase(),!r[d])throw Error(d+" not a supported colorscale");u=r[d]}else{if(!Array.isArray(d))throw Error("unsupported colormap option",d);u=d.slice()}if(u.length>f+1)throw new Error(d+" map requires nshades to be at least size "+u.length);p=Array.isArray(e.alpha)?2!==e.alpha.length?[1,1]:e.alpha.slice():"number"===typeof e.alpha?[e.alpha,e.alpha]:[1,1];t=u.map((function(e){return Math.round(e.index*f)})),p[0]=Math.min(Math.max(p[0],0),1),p[1]=Math.min(Math.max(p[1],0),1);var g=u.map((function(e,t){var n=u[t].index,r=u[t].rgb.slice();return 4===r.length&&r[3]>=0&&r[3]<=1||(r[3]=p[0]+(p[1]-p[0])*n),r})),v=[];for(m=0;m0&&a();break;case"number":n.im=0,n.re=e;break;default:a()}return isNaN(n.re)||isNaN(n.im),n}(e,t);this.re=n.re,this.im=n.im}s.prototype={re:0,im:0,sign:function(){var e=this.abs();return new s(this.re/e,this.im/e)},add:function(e,t){var n=new s(e,t);return this.isInfinite()&&n.isInfinite()?s.NAN:this.isInfinite()||n.isInfinite()?s.INFINITY:new s(this.re+n.re,this.im+n.im)},sub:function(e,t){var n=new s(e,t);return this.isInfinite()&&n.isInfinite()?s.NAN:this.isInfinite()||n.isInfinite()?s.INFINITY:new s(this.re-n.re,this.im-n.im)},mul:function(e,t){var n=new s(e,t);return this.isInfinite()&&n.isZero()||this.isZero()&&n.isInfinite()?s.NAN:this.isInfinite()||n.isInfinite()?s.INFINITY:0===n.im&&0===this.im?new s(this.re*n.re,0):new s(this.re*n.re-this.im*n.im,this.re*n.im+this.im*n.re)},div:function(e,t){var n=new s(e,t);if(this.isZero()&&n.isZero()||this.isInfinite()&&n.isInfinite())return s.NAN;if(this.isInfinite()||n.isZero())return s.INFINITY;if(this.isZero()||n.isInfinite())return s.ZERO;e=this.re,t=this.im;var r,i,a=n.re,o=n.im;return 0===o?new s(e/a,t/a):Math.abs(a)0)return new s(Math.pow(e,n.re),0);if(0===e)switch((n.re%4+4)%4){case 0:return new s(Math.pow(t,n.re),0);case 1:return new s(0,Math.pow(t,n.re));case 2:return new s(-Math.pow(t,n.re),0);case 3:return new s(0,-Math.pow(t,n.re))}}if(0===e&&0===t&&n.re>0&&n.im>=0)return s.ZERO;var r=Math.atan2(t,e),i=o(e,t);return e=Math.exp(n.re*i-n.im*r),t=n.im*i+n.re*r,new s(e*Math.cos(t),e*Math.sin(t))},sqrt:function(){var e,t,n=this.re,r=this.im,i=this.abs();if(n>=0){if(0===r)return new s(Math.sqrt(n),0);e=.5*Math.sqrt(2*(i+n))}else e=Math.abs(r)/Math.sqrt(2*(i-n));return t=n<=0?.5*Math.sqrt(2*(i-n)):Math.abs(r)/Math.sqrt(2*(i+n)),new s(e,r<0?-t:t)},exp:function(){var e=Math.exp(this.re);return this.im,new s(e*Math.cos(this.im),e*Math.sin(this.im))},expm1:function(){var e=this.re,t=this.im;return new s(Math.expm1(e)*Math.cos(t)+function(e){var t=Math.PI/4;if(-t>e||e>t)return Math.cos(e)-1;var n=e*e;return n*(n*(n*(n*(n*(n*(n*(n/20922789888e3-1/87178291200)+1/479001600)-1/3628800)+1/40320)-1/720)+1/24)-.5)}(t),Math.exp(e)*Math.sin(t))},log:function(){var e=this.re,t=this.im;return new s(o(e,t),Math.atan2(t,e))},abs:function(){return function(e,t){var n=Math.abs(e),r=Math.abs(t);return n<3e3&&r<3e3?Math.sqrt(n*n+r*r):(n1&&0===t,r=1-e,i=1+e,a=r*r+t*t,l=0!==a?new s((i*r-t*t)/a,(t*r+i*t)/a):new s(-1!==e?e/0:0,0!==t?t/0:0),c=l.re;return l.re=o(l.re,l.im)/2,l.im=Math.atan2(l.im,c)/2,n&&(l.im=-l.im),l},acoth:function(){var e=this.re,t=this.im;if(0===e&&0===t)return new s(0,Math.PI/2);var n=e*e+t*t;return 0!==n?new s(e/n,-t/n).atanh():new s(0!==e?e/0:0,0!==t?-t/0:0).atanh()},acsch:function(){var e=this.re,t=this.im;if(0===t)return new s(0!==e?Math.log(e+Math.sqrt(e*e+1)):1/0,0);var n=e*e+t*t;return 0!==n?new s(e/n,-t/n).asinh():new s(0!==e?e/0:0,0!==t?-t/0:0).asinh()},asech:function(){var e=this.re,t=this.im;if(this.isZero())return s.INFINITY;var n=e*e+t*t;return 0!==n?new s(e/n,-t/n).acosh():new s(0!==e?e/0:0,0!==t?-t/0:0).acosh()},inverse:function(){if(this.isZero())return s.INFINITY;if(this.isInfinite())return s.ZERO;var e=this.re,t=this.im,n=e*e+t*t;return new s(e/n,-t/n)},conjugate:function(){return new s(this.re,-this.im)},neg:function(){return new s(-this.re,-this.im)},ceil:function(e){return e=Math.pow(10,e||0),new s(Math.ceil(this.re*e)/e,Math.ceil(this.im*e)/e)},floor:function(e){return e=Math.pow(10,e||0),new s(Math.floor(this.re*e)/e,Math.floor(this.im*e)/e)},round:function(e){return e=Math.pow(10,e||0),new s(Math.round(this.re*e)/e,Math.round(this.im*e)/e)},equals:function(e,t){var n=new s(e,t);return Math.abs(n.re-this.re)<=s.EPSILON&&Math.abs(n.im-this.im)<=s.EPSILON},clone:function(){return new s(this.re,this.im)},toString:function(){var e=this.re,t=this.im,n="";return this.isNaN()?"NaN":this.isInfinite()?"Infinity":(Math.abs(e){function t(e,t,n){var r,i,a,o,s;function l(){var c=Date.now()-o;c=0?r=setTimeout(l,t-c):(r=null,n||(s=e.apply(a,i),a=i=null))}null==t&&(t=100);var c=function(){a=this,i=arguments,o=Date.now();var c=n&&!r;return r||(r=setTimeout(l,t)),c&&(s=e.apply(a,i),a=i=null),s};return c.clear=function(){r&&(clearTimeout(r),r=null)},c.flush=function(){r&&(s=e.apply(a,i),a=i=null,clearTimeout(r),r=null)},c}t.debounce=t,e.exports=t},30730:function(e,t){var n;!function(){"use strict";var r={s:1,n:0,d:1};function i(e,t){if(isNaN(e=parseInt(e,10)))throw c.InvalidParameter;return e*t}function a(e,t){if(0===t)throw c.DivisionByZero;var n=Object.create(c.prototype);n.s=e<0?-1:1;var r=l(e=e<0?-e:e,t);return n.n=e/r,n.d=t/r,n}function o(e){for(var t={},n=e,r=2,i=4;i<=n;){for(;n%r===0;)n/=r,t[r]=(t[r]||0)+1;i+=1+2*r++}return n!==e?n>1&&(t[n]=(t[n]||0)+1):t[e]=(t[e]||0)+1,t}var s=function(e,t){var n,a=0,o=1,s=1,l=0,u=0,d=0,h=1,f=1,p=0,m=1,g=1,v=1,y=1e7;if(void 0===e||null===e);else if(void 0!==t){if(s=(a=e)*(o=t),a%1!==0||o%1!==0)throw c.NonIntegerParameter}else switch(typeof e){case"object":if("d"in e&&"n"in e)a=e.n,o=e.d,"s"in e&&(a*=e.s);else{if(!(0 in e))throw c.InvalidParameter;a=e[0],1 in e&&(o=e[1])}s=a*o;break;case"number":if(e<0&&(s=e,e=-e),e%1===0)a=e;else if(e>0){for(e>=1&&(e/=f=Math.pow(10,Math.floor(1+Math.log(e)/Math.LN10)));m<=y&&v<=y;){if(e===(n=(p+g)/(m+v))){m+v<=y?(a=p+g,o=m+v):v>m?(a=g,o=v):(a=p,o=m);break}e>n?(p+=g,m+=v):(g+=p,v+=m),m>y?(a=g,o=v):(a=p,o=m)}a*=f}else(isNaN(e)||isNaN(t))&&(o=a=NaN);break;case"string":if(null===(m=e.match(/\d+|./g)))throw c.InvalidParameter;if("-"===m[p]?(s=-1,p++):"+"===m[p]&&p++,m.length===p+1?u=i(m[p++],s):"."===m[p+1]||"."===m[p]?("."!==m[p]&&(l=i(m[p++],s)),(++p+1===m.length||"("===m[p+1]&&")"===m[p+3]||"'"===m[p+1]&&"'"===m[p+3])&&(u=i(m[p],s),h=Math.pow(10,m[p].length),p++),("("===m[p]&&")"===m[p+2]||"'"===m[p]&&"'"===m[p+2])&&(d=i(m[p+1],s),f=Math.pow(10,m[p+1].length)-1,p+=3)):"/"===m[p+1]||":"===m[p+1]?(u=i(m[p],s),h=i(m[p+2],1),p+=3):"/"===m[p+3]&&" "===m[p+1]&&(l=i(m[p],s),u=i(m[p+2],s),h=i(m[p+4],1),p+=5),m.length<=p){s=a=d+(o=h*f)*l+f*u;break}default:throw c.InvalidParameter}if(0===o)throw c.DivisionByZero;r.s=s<0?-1:1,r.n=Math.abs(a),r.d=Math.abs(o)};function l(e,t){if(!e)return t;if(!t)return e;for(;;){if(!(e%=t))return t;if(!(t%=e))return e}}function c(e,t){if(s(e,t),!(this instanceof c))return a(r.s*r.n,r.d);e=l(r.d,r.n),this.s=r.s,this.n=r.n/e,this.d=r.d/e}c.DivisionByZero=new Error("Division by Zero"),c.InvalidParameter=new Error("Invalid argument"),c.NonIntegerParameter=new Error("Parameters must be integer"),c.prototype={s:1,n:0,d:1,abs:function(){return a(this.n,this.d)},neg:function(){return a(-this.s*this.n,this.d)},add:function(e,t){return s(e,t),a(this.s*this.n*r.d+r.s*this.d*r.n,this.d*r.d)},sub:function(e,t){return s(e,t),a(this.s*this.n*r.d-r.s*this.d*r.n,this.d*r.d)},mul:function(e,t){return s(e,t),a(this.s*r.s*this.n*r.n,this.d*r.d)},div:function(e,t){return s(e,t),a(this.s*r.s*this.n*r.d,this.d*r.n)},clone:function(){return a(this.s*this.n,this.d)},mod:function(e,t){if(isNaN(this.n)||isNaN(this.d))return new c(NaN);if(void 0===e)return a(this.s*this.n%this.d,1);if(s(e,t),0===r.n&&0===this.d)throw c.DivisionByZero;return a(this.s*(r.d*this.n)%(r.n*this.d),r.d*this.d)},gcd:function(e,t){return s(e,t),a(l(r.n,this.n)*l(r.d,this.d),r.d*this.d)},lcm:function(e,t){return s(e,t),0===r.n&&0===this.n?a(0,1):a(r.n*this.n,l(r.n,this.n)*l(r.d,this.d))},ceil:function(e){return e=Math.pow(10,e||0),isNaN(this.n)||isNaN(this.d)?new c(NaN):a(Math.ceil(e*this.s*this.n/this.d),e)},floor:function(e){return e=Math.pow(10,e||0),isNaN(this.n)||isNaN(this.d)?new c(NaN):a(Math.floor(e*this.s*this.n/this.d),e)},round:function(e){return e=Math.pow(10,e||0),isNaN(this.n)||isNaN(this.d)?new c(NaN):a(Math.round(e*this.s*this.n/this.d),e)},inverse:function(){return a(this.s*this.d,this.n)},pow:function(e,t){if(s(e,t),1===r.d)return r.s<0?a(Math.pow(this.s*this.d,r.n),Math.pow(this.n,r.n)):a(Math.pow(this.s*this.n,r.n),Math.pow(this.d,r.n));if(this.s<0)return null;var n=o(this.n),i=o(this.d),l=1,c=1;for(var u in n)if("1"!==u){if("0"===u){l=0;break}if(n[u]*=r.n,n[u]%r.d!==0)return null;n[u]/=r.d,l*=Math.pow(u,n[u])}for(var u in i)if("1"!==u){if(i[u]*=r.n,i[u]%r.d!==0)return null;i[u]/=r.d,c*=Math.pow(u,i[u])}return r.s<0?a(c,l):a(l,c)},equals:function(e,t){return s(e,t),this.s*this.n*r.d===r.s*r.n*this.d},compare:function(e,t){s(e,t);var n=this.s*this.n*r.d-r.s*r.n*this.d;return(0=0;o--)i=i.inverse().add(n[o]);if(i.sub(t).abs().valueOf()0&&(n+=t,n+=" ",r%=i),n+=r,n+="/",n+=i),n},toLatex:function(e){var t,n="",r=this.n,i=this.d;return this.s<0&&(n+="-"),1===i?n+=r:(e&&(t=Math.floor(r/i))>0&&(n+=t,r%=i),n+="\\frac{",n+=r,n+="}{",n+=i,n+="}"),n},toContinued:function(){var e,t=this.n,n=this.d,r=[];if(isNaN(t)||isNaN(n))return r;do{r.push(Math.floor(t/n)),e=t%n,t=n,n=e}while(1!==t);return r},toString:function(e){var t=this.n,n=this.d;if(isNaN(t)||isNaN(n))return"NaN";e=e||15;var r=function(e,t){for(;t%2===0;t/=2);for(;t%5===0;t/=5);if(1===t)return 0;for(var n=10%t,r=1;1!==n;r++)if(n=10*n%t,r>2e3)return 0;return r}(0,n),i=function(e,t,n){for(var r=1,i=function(e,t,n){for(var r=1;t>0;e=e*e%n,t>>=1)1&t&&(r=r*e%n);return r}(10,n,t),a=0;a<300;a++){if(r===i)return a;r=10*r%t,i=10*i%t}return 0}(0,n,r),a=this.s<0?"-":"";if(a+=t/n|0,t%=n,(t*=10)&&(a+="."),r){for(var o=i;o--;)a+=t/n|0,t%=n,t*=10;a+="(";for(o=r;o--;)a+=t/n|0,t%=n,t*=10;a+=")"}else for(o=e;t&&o--;)a+=t/n|0,t%=n,t*=10;return a}},void 0===(n=function(){return c}.apply(t,[]))||(e.exports=n)}()},56201:(e,t,n)=>{"use strict";n.d(t,{AO:()=>h,Rr:()=>f,rc:()=>r,zR:()=>l});var r,i=n(58168);!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(r||(r={}));var a=function(e){return e};var o="beforeunload",s="popstate";function l(e){void 0===e&&(e={});var t=e.window,n=void 0===t?document.defaultView:t,l=n.history;function p(){var e=n.location,t=e.pathname,r=e.search,i=e.hash,o=l.state||{};return[o.idx,a({pathname:t,search:r,hash:i,state:o.usr||null,key:o.key||"default"})]}var m=null;n.addEventListener(s,(function(){if(m)_.call(m),m=null;else{var e=r.Pop,t=p(),n=t[0],i=t[1];if(_.length){if(null!=n){var a=y-n;a&&(m={action:e,location:i,retry:function(){k(-1*a)}},k(a))}}else T(e)}}));var g=r.Pop,v=p(),y=v[0],x=v[1],b=u(),_=u();function w(e){return"string"===typeof e?e:h(e)}function A(e,t){return void 0===t&&(t=null),a((0,i.A)({pathname:x.pathname,hash:"",search:""},"string"===typeof e?f(e):e,{state:t,key:d()}))}function S(e,t){return[{usr:e.state,key:e.key,idx:t},w(e)]}function M(e,t,n){return!_.length||(_.call({action:e,location:t,retry:n}),!1)}function T(e){g=e;var t=p();y=t[0],x=t[1],b.call({action:g,location:x})}function k(e){l.go(e)}null==y&&(y=0,l.replaceState((0,i.A)({},l.state,{idx:y}),""));var E={get action(){return g},get location(){return x},createHref:w,push:function e(t,i){var a=r.Push,o=A(t,i);if(M(a,o,(function(){e(t,i)}))){var s=S(o,y+1),c=s[0],u=s[1];try{l.pushState(c,"",u)}catch(d){n.location.assign(u)}T(a)}},replace:function e(t,n){var i=r.Replace,a=A(t,n);if(M(i,a,(function(){e(t,n)}))){var o=S(a,y),s=o[0],c=o[1];l.replaceState(s,"",c),T(i)}},go:k,back:function(){k(-1)},forward:function(){k(1)},listen:function(e){return b.push(e)},block:function(e){var t=_.push(e);return 1===_.length&&n.addEventListener(o,c),function(){t(),_.length||n.removeEventListener(o,c)}}};return E}function c(e){e.preventDefault(),e.returnValue=""}function u(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter((function(e){return e!==t}))}},call:function(t){e.forEach((function(e){return e&&e(t)}))}}}function d(){return Math.random().toString(36).substr(2,8)}function h(e){var t=e.pathname,n=void 0===t?"/":t,r=e.search,i=void 0===r?"":r,a=e.hash,o=void 0===a?"":a;return i&&"?"!==i&&(n+="?"===i.charAt(0)?i:"?"+i),o&&"#"!==o&&(n+="#"===o.charAt(0)?o:"#"+o),n}function f(e){var t={};if(e){var n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}},23876:(e,t,n)=>{"use strict";var r=n(50630),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?o:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=o;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(p){var i=f(n);i&&i!==p&&e(t,i,r)}var o=u(n);d&&(o=o.concat(d(n)));for(var s=l(t),m=l(n),g=0;g{"use strict";var n="function"===typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,a=n?Symbol.for("react.fragment"):60107,o=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,h=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,p=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,x=n?Symbol.for("react.responder"):60118,b=n?Symbol.for("react.scope"):60119;function _(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case a:case s:case o:case f:return e;default:switch(e=e&&e.$$typeof){case c:case h:case g:case m:case l:return e;default:return t}}case i:return t}}}function w(e){return _(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=h,t.Fragment=a,t.Lazy=g,t.Memo=m,t.Portal=i,t.Profiler=s,t.StrictMode=o,t.Suspense=f,t.isAsyncMode=function(e){return w(e)||_(e)===u},t.isConcurrentMode=w,t.isContextConsumer=function(e){return _(e)===c},t.isContextProvider=function(e){return _(e)===l},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return _(e)===h},t.isFragment=function(e){return _(e)===a},t.isLazy=function(e){return _(e)===g},t.isMemo=function(e){return _(e)===m},t.isPortal=function(e){return _(e)===i},t.isProfiler=function(e){return _(e)===s},t.isStrictMode=function(e){return _(e)===o},t.isSuspense=function(e){return _(e)===f},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===a||e===d||e===s||e===o||e===f||e===p||"object"===typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===l||e.$$typeof===c||e.$$typeof===h||e.$$typeof===y||e.$$typeof===x||e.$$typeof===b||e.$$typeof===v)},t.typeOf=_},50630:(e,t,n)=>{"use strict";e.exports=n(72138)},93586:e=>{e.exports=function e(t,n){"use strict";var r,i,a=/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,o=/(^[ ]*|[ ]*$)/g,s=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,l=/^0x[0-9a-f]+$/i,c=/^0/,u=function(t){return e.insensitive&&(""+t).toLowerCase()||""+t},d=u(t).replace(o,"")||"",h=u(n).replace(o,"")||"",f=d.replace(a,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),p=h.replace(a,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),m=parseInt(d.match(l),16)||1!==f.length&&d.match(s)&&Date.parse(d),g=parseInt(h.match(l),16)||m&&h.match(s)&&Date.parse(h)||null;if(g){if(mg)return 1}for(var v=0,y=Math.max(f.length,p.length);vi)return 1}return 0}},41314:e=>{e.exports=function(e,t,n){return e*(1-n)+t*n}},22434:(e,t,n)=>{var r=n(20220)(n(14759),"DataView");e.exports=r},1111:(e,t,n)=>{var r=n(76958),i=n(41176),a=n(1787),o=n(70231),s=n(27455);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{var r=n(5088),i=n(10150),a=n(7889),o=n(44349),s=n(33077);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{var r=n(20220)(n(14759),"Map");e.exports=r},54467:(e,t,n)=>{var r=n(40738),i=n(70708),a=n(26823),o=n(20475),s=n(77859);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{var r=n(20220)(n(14759),"Promise");e.exports=r},57887:(e,t,n)=>{var r=n(20220)(n(14759),"Set");e.exports=r},36669:(e,t,n)=>{var r=n(54467),i=n(62274),a=n(69757);function o(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t{var r=n(85661),i=n(44710),a=n(78384),o=n(87379),s=n(80799),l=n(12791);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=i,c.prototype.delete=a,c.prototype.get=o,c.prototype.has=s,c.prototype.set=l,e.exports=c},4635:(e,t,n)=>{var r=n(14759).Symbol;e.exports=r},48246:(e,t,n)=>{var r=n(14759).Uint8Array;e.exports=r},94801:(e,t,n)=>{var r=n(20220)(n(14759),"WeakMap");e.exports=r},48951:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,a=[];++n{var r=n(44102),i=n(24578),a=n(12279),o=n(6794),s=n(97059),l=n(71641),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=a(e),u=!n&&i(e),d=!n&&!u&&o(e),h=!n&&!u&&!d&&l(e),f=n||u||d||h,p=f?r(e.length,String):[],m=p.length;for(var g in e)!t&&!c.call(e,g)||f&&("length"==g||d&&("offset"==g||"parent"==g)||h&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||s(g,m))||p.push(g);return p}},61570:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n{e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n{var r=n(10366),i=n(44206),a=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var o=e[t];a.call(e,t)&&i(o,n)&&(void 0!==n||t in e)||r(e,t,n)}},45099:(e,t,n)=>{var r=n(44206);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},40291:(e,t,n)=>{var r=n(83965),i=n(65724);e.exports=function(e,t){return e&&r(t,i(t),e)}},62064:(e,t,n)=>{var r=n(83965),i=n(31235);e.exports=function(e,t){return e&&r(t,i(t),e)}},10366:(e,t,n)=>{var r=n(88925);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},79645:(e,t,n)=>{var r=n(25535),i=n(48951),a=n(77305),o=n(40291),s=n(62064),l=n(8984),c=n(76321),u=n(21849),d=n(63586),h=n(93660),f=n(36387),p=n(25531),m=n(17203),g=n(10997),v=n(35539),y=n(12279),x=n(6794),b=n(97744),_=n(24567),w=n(5738),A=n(65724),S=n(31235),M="[object Arguments]",T="[object Function]",k="[object Object]",E={};E[M]=E["[object Array]"]=E["[object ArrayBuffer]"]=E["[object DataView]"]=E["[object Boolean]"]=E["[object Date]"]=E["[object Float32Array]"]=E["[object Float64Array]"]=E["[object Int8Array]"]=E["[object Int16Array]"]=E["[object Int32Array]"]=E["[object Map]"]=E["[object Number]"]=E[k]=E["[object RegExp]"]=E["[object Set]"]=E["[object String]"]=E["[object Symbol]"]=E["[object Uint8Array]"]=E["[object Uint8ClampedArray]"]=E["[object Uint16Array]"]=E["[object Uint32Array]"]=!0,E["[object Error]"]=E[T]=E["[object WeakMap]"]=!1,e.exports=function e(t,n,C,D,R,P){var O,L=1&n,I=2&n,z=4&n;if(C&&(O=R?C(t,D,R,P):C(t)),void 0!==O)return O;if(!_(t))return t;var N=y(t);if(N){if(O=m(t),!L)return c(t,O)}else{var F=p(t),B=F==T||"[object GeneratorFunction]"==F;if(x(t))return l(t,L);if(F==k||F==M||B&&!R){if(O=I||B?{}:v(t),!L)return I?d(t,s(O,t)):u(t,o(O,t))}else{if(!E[F])return R?t:{};O=g(t,F,L)}}P||(P=new r);var j=P.get(t);if(j)return j;P.set(t,O),w(t)?t.forEach((function(r){O.add(e(r,n,C,r,t,P))})):b(t)&&t.forEach((function(r,i){O.set(i,e(r,n,C,i,t,P))}));var U=N?void 0:(z?I?f:h:I?S:A)(t);return i(U||t,(function(r,i){U&&(r=t[i=r]),a(O,i,e(r,n,C,i,t,P))})),O}},48230:(e,t,n)=>{var r=n(24567),i=Object.create,a=function(){function e(){}return function(t){if(!r(t))return{};if(i)return i(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=a},20927:(e,t,n)=>{var r=n(70423),i=n(73267)(r);e.exports=i},93031:(e,t,n)=>{var r=n(45211)();e.exports=r},70423:(e,t,n)=>{var r=n(93031),i=n(65724);e.exports=function(e,t){return e&&r(e,t,i)}},10052:(e,t,n)=>{var r=n(26463),i=n(92535);e.exports=function(e,t){for(var n=0,a=(t=r(t,e)).length;null!=e&&n{var r=n(87518),i=n(12279);e.exports=function(e,t,n){var a=t(e);return i(e)?a:r(a,n(e))}},22022:(e,t,n)=>{var r=n(4635),i=n(81581),a=n(65336),o=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":o&&o in Object(e)?i(e):a(e)}},14591:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},73012:(e,t,n)=>{var r=n(22022),i=n(39248);e.exports=function(e){return i(e)&&"[object Arguments]"==r(e)}},1404:(e,t,n)=>{var r=n(92130),i=n(39248);e.exports=function e(t,n,a,o,s){return t===n||(null==t||null==n||!i(t)&&!i(n)?t!==t&&n!==n:r(t,n,a,o,e,s))}},92130:(e,t,n)=>{var r=n(25535),i=n(49757),a=n(21416),o=n(16195),s=n(25531),l=n(12279),c=n(6794),u=n(71641),d="[object Arguments]",h="[object Array]",f="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,m,g,v){var y=l(e),x=l(t),b=y?h:s(e),_=x?h:s(t),w=(b=b==d?f:b)==f,A=(_=_==d?f:_)==f,S=b==_;if(S&&c(e)){if(!c(t))return!1;y=!0,w=!1}if(S&&!w)return v||(v=new r),y||u(e)?i(e,t,n,m,g,v):a(e,t,b,n,m,g,v);if(!(1&n)){var M=w&&p.call(e,"__wrapped__"),T=A&&p.call(t,"__wrapped__");if(M||T){var k=M?e.value():e,E=T?t.value():t;return v||(v=new r),g(k,E,n,m,v)}}return!!S&&(v||(v=new r),o(e,t,n,m,g,v))}},3530:(e,t,n)=>{var r=n(25531),i=n(39248);e.exports=function(e){return i(e)&&"[object Map]"==r(e)}},24489:(e,t,n)=>{var r=n(25535),i=n(1404);e.exports=function(e,t,n,a){var o=n.length,s=o,l=!a;if(null==e)return!s;for(e=Object(e);o--;){var c=n[o];if(l&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++o{var r=n(93008),i=n(73306),a=n(24567),o=n(29131),s=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,u=l.toString,d=c.hasOwnProperty,h=RegExp("^"+u.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||i(e))&&(r(e)?h:s).test(o(e))}},63152:(e,t,n)=>{var r=n(25531),i=n(39248);e.exports=function(e){return i(e)&&"[object Set]"==r(e)}},38183:(e,t,n)=>{var r=n(22022),i=n(5776),a=n(39248),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,e.exports=function(e){return a(e)&&i(e.length)&&!!o[r(e)]}},15127:(e,t,n)=>{var r=n(79769),i=n(44104),a=n(69002),o=n(12279),s=n(78857);e.exports=function(e){return"function"==typeof e?e:null==e?a:"object"==typeof e?o(e)?i(e[0],e[1]):r(e):s(e)}},37462:(e,t,n)=>{var r=n(82161),i=n(25112),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))a.call(e,n)&&"constructor"!=n&&t.push(n);return t}},28833:(e,t,n)=>{var r=n(24567),i=n(82161),a=n(7175),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return a(e);var t=i(e),n=[];for(var s in e)("constructor"!=s||!t&&o.call(e,s))&&n.push(s);return n}},56602:(e,t,n)=>{var r=n(20927),i=n(97840);e.exports=function(e,t){var n=-1,a=i(e)?Array(e.length):[];return r(e,(function(e,r,i){a[++n]=t(e,r,i)})),a}},79769:(e,t,n)=>{var r=n(24489),i=n(13334),a=n(14243);e.exports=function(e){var t=i(e);return 1==t.length&&t[0][2]?a(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},44104:(e,t,n)=>{var r=n(1404),i=n(87946),a=n(15321),o=n(65916),s=n(29794),l=n(14243),c=n(92535);e.exports=function(e,t){return o(e)&&s(t)?l(c(e),t):function(n){var o=i(n,e);return void 0===o&&o===t?a(n,e):r(t,o,3)}}},29343:e=>{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},84753:(e,t,n)=>{var r=n(10052);e.exports=function(e){return function(t){return r(t,e)}}},44102:e=>{e.exports=function(e,t){for(var n=-1,r=Array(e);++n{var r=n(4635),i=n(61570),a=n(12279),o=n(50184),s=r?r.prototype:void 0,l=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(a(t))return i(t,e)+"";if(o(t))return l?l.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},35639:e=>{e.exports=function(e){return function(t){return e(t)}}},63445:e=>{e.exports=function(e,t){return e.has(t)}},39036:(e,t,n)=>{var r=n(69002);e.exports=function(e){return"function"==typeof e?e:r}},26463:(e,t,n)=>{var r=n(12279),i=n(65916),a=n(17044),o=n(54008);e.exports=function(e,t){return r(e)?e:i(e,t)?[e]:a(o(e))}},75871:(e,t,n)=>{var r=n(48246);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},8984:(e,t,n)=>{e=n.nmd(e);var r=n(14759),i=t&&!t.nodeType&&t,a=i&&e&&!e.nodeType&&e,o=a&&a.exports===i?r.Buffer:void 0,s=o?o.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}},93863:(e,t,n)=>{var r=n(75871);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},91991:e=>{var t=/\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},42106:(e,t,n)=>{var r=n(4635),i=r?r.prototype:void 0,a=i?i.valueOf:void 0;e.exports=function(e){return a?Object(a.call(e)):{}}},58463:(e,t,n)=>{var r=n(75871);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},76321:e=>{e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n{var r=n(77305),i=n(10366);e.exports=function(e,t,n,a){var o=!n;n||(n={});for(var s=-1,l=t.length;++s{var r=n(83965),i=n(98194);e.exports=function(e,t){return r(e,i(e),t)}},63586:(e,t,n)=>{var r=n(83965),i=n(9653);e.exports=function(e,t){return r(e,i(e),t)}},64123:(e,t,n)=>{var r=n(14759)["__core-js_shared__"];e.exports=r},73267:(e,t,n)=>{var r=n(97840);e.exports=function(e,t){return function(n,i){if(null==n)return n;if(!r(n))return e(n,i);for(var a=n.length,o=t?a:-1,s=Object(n);(t?o--:++o{e.exports=function(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var l=o[e?s:++i];if(!1===n(a[l],l,a))break}return t}}},88925:(e,t,n)=>{var r=n(20220),i=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();e.exports=i},49757:(e,t,n)=>{var r=n(36669),i=n(56010),a=n(63445);e.exports=function(e,t,n,o,s,l){var c=1&n,u=e.length,d=t.length;if(u!=d&&!(c&&d>u))return!1;var h=l.get(e),f=l.get(t);if(h&&f)return h==t&&f==e;var p=-1,m=!0,g=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++p{var r=n(4635),i=n(48246),a=n(44206),o=n(49757),s=n(90943),l=n(26557),c=r?r.prototype:void 0,u=c?c.valueOf:void 0;e.exports=function(e,t,n,r,c,d,h){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!d(new i(e),new i(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return a(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var f=s;case"[object Set]":var p=1&r;if(f||(f=l),e.size!=t.size&&!p)return!1;var m=h.get(e);if(m)return m==t;r|=2,h.set(e,t);var g=o(f(e),f(t),r,c,d,h);return h.delete(e),g;case"[object Symbol]":if(u)return u.call(e)==u.call(t)}return!1}},16195:(e,t,n)=>{var r=n(93660),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,a,o,s){var l=1&n,c=r(e),u=c.length;if(u!=r(t).length&&!l)return!1;for(var d=u;d--;){var h=c[d];if(!(l?h in t:i.call(t,h)))return!1}var f=s.get(e),p=s.get(t);if(f&&p)return f==t&&p==e;var m=!0;s.set(e,t),s.set(t,e);for(var g=l;++d{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},93660:(e,t,n)=>{var r=n(54761),i=n(98194),a=n(65724);e.exports=function(e){return r(e,a,i)}},36387:(e,t,n)=>{var r=n(54761),i=n(9653),a=n(31235);e.exports=function(e){return r(e,a,i)}},77101:(e,t,n)=>{var r=n(94672);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},13334:(e,t,n)=>{var r=n(29794),i=n(65724);e.exports=function(e){for(var t=i(e),n=t.length;n--;){var a=t[n],o=e[a];t[n]=[a,o,r(o)]}return t}},20220:(e,t,n)=>{var r=n(57949),i=n(98166);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},42253:(e,t,n)=>{var r=n(62621)(Object.getPrototypeOf,Object);e.exports=r},81581:(e,t,n)=>{var r=n(4635),i=Object.prototype,a=i.hasOwnProperty,o=i.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(l){}var i=o.call(e);return r&&(t?e[s]=n:delete e[s]),i}},98194:(e,t,n)=>{var r=n(46860),i=n(71515),a=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,s=o?function(e){return null==e?[]:(e=Object(e),r(o(e),(function(t){return a.call(e,t)})))}:i;e.exports=s},9653:(e,t,n)=>{var r=n(87518),i=n(42253),a=n(98194),o=n(71515),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,a(e)),e=i(e);return t}:o;e.exports=s},25531:(e,t,n)=>{var r=n(22434),i=n(81465),a=n(30202),o=n(57887),s=n(94801),l=n(22022),c=n(29131),u="[object Map]",d="[object Promise]",h="[object Set]",f="[object WeakMap]",p="[object DataView]",m=c(r),g=c(i),v=c(a),y=c(o),x=c(s),b=l;(r&&b(new r(new ArrayBuffer(1)))!=p||i&&b(new i)!=u||a&&b(a.resolve())!=d||o&&b(new o)!=h||s&&b(new s)!=f)&&(b=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case m:return p;case g:return u;case v:return d;case y:return h;case x:return f}return t}),e.exports=b},98166:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},10964:(e,t,n)=>{var r=n(26463),i=n(24578),a=n(12279),o=n(97059),s=n(5776),l=n(92535);e.exports=function(e,t,n){for(var c=-1,u=(t=r(t,e)).length,d=!1;++c{var r=n(73616);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},41176:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},1787:(e,t,n)=>{var r=n(73616),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},70231:(e,t,n)=>{var r=n(73616),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},27455:(e,t,n)=>{var r=n(73616);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},17203:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var n=e.length,r=new e.constructor(n);return n&&"string"==typeof e[0]&&t.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},10997:(e,t,n)=>{var r=n(75871),i=n(93863),a=n(91991),o=n(42106),s=n(58463);e.exports=function(e,t,n){var l=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new l(+e);case"[object DataView]":return i(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(e,n);case"[object Map]":case"[object Set]":return new l;case"[object Number]":case"[object String]":return new l(e);case"[object RegExp]":return a(e);case"[object Symbol]":return o(e)}}},35539:(e,t,n)=>{var r=n(48230),i=n(42253),a=n(82161);e.exports=function(e){return"function"!=typeof e.constructor||a(e)?{}:r(i(e))}},97059:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e{var r=n(12279),i=n(50184),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||(o.test(e)||!a.test(e)||null!=t&&e in Object(t))}},94672:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},73306:(e,t,n)=>{var r=n(64123),i=function(){var e=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=function(e){return!!i&&i in e}},82161:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},29794:(e,t,n)=>{var r=n(24567);e.exports=function(e){return e===e&&!r(e)}},5088:e=>{e.exports=function(){this.__data__=[],this.size=0}},10150:(e,t,n)=>{var r=n(45099),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():i.call(t,n,1),--this.size,!0)}},7889:(e,t,n)=>{var r=n(45099);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},44349:(e,t,n)=>{var r=n(45099);e.exports=function(e){return r(this.__data__,e)>-1}},33077:(e,t,n)=>{var r=n(45099);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},40738:(e,t,n)=>{var r=n(1111),i=n(85661),a=n(81465);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||i),string:new r}}},70708:(e,t,n)=>{var r=n(77101);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},26823:(e,t,n)=>{var r=n(77101);e.exports=function(e){return r(this,e).get(e)}},20475:(e,t,n)=>{var r=n(77101);e.exports=function(e){return r(this,e).has(e)}},77859:(e,t,n)=>{var r=n(77101);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},90943:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},14243:e=>{e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},23734:(e,t,n)=>{var r=n(42434);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},73616:(e,t,n)=>{var r=n(20220)(Object,"create");e.exports=r},25112:(e,t,n)=>{var r=n(62621)(Object.keys,Object);e.exports=r},7175:e=>{e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},82479:(e,t,n)=>{e=n.nmd(e);var r=n(16658),i=t&&!t.nodeType&&t,a=i&&e&&!e.nodeType&&e,o=a&&a.exports===i&&r.process,s=function(){try{var e=a&&a.require&&a.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(t){}}();e.exports=s},65336:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},62621:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},14759:(e,t,n)=>{var r=n(16658),i="object"==typeof self&&self&&self.Object===Object&&self,a=r||i||Function("return this")();e.exports=a},62274:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},69757:e=>{e.exports=function(e){return this.__data__.has(e)}},26557:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},44710:(e,t,n)=>{var r=n(85661);e.exports=function(){this.__data__=new r,this.size=0}},78384:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},87379:e=>{e.exports=function(e){return this.__data__.get(e)}},80799:e=>{e.exports=function(e){return this.__data__.has(e)}},12791:(e,t,n)=>{var r=n(85661),i=n(81465),a=n(54467);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var o=n.__data__;if(!i||o.length<199)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(o)}return n.set(e,t),this.size=n.size,this}},17044:(e,t,n)=>{var r=n(23734),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,o=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,(function(e,n,r,i){t.push(r?i.replace(a,"$1"):n||e)})),t}));e.exports=o},92535:(e,t,n)=>{var r=n(50184);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},29131:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(n){}try{return e+""}catch(n){}}return""}},55117:(e,t,n)=>{var r=n(79645);e.exports=function(e){return r(e,5)}},44206:e=>{e.exports=function(e,t){return e===t||e!==e&&t!==t}},28437:(e,t,n)=>{var r=n(70423),i=n(39036);e.exports=function(e,t){return e&&r(e,i(t))}},87946:(e,t,n)=>{var r=n(10052);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},15321:(e,t,n)=>{var r=n(14591),i=n(10964);e.exports=function(e,t){return null!=e&&i(e,t,r)}},69002:e=>{e.exports=function(e){return e}},24578:(e,t,n)=>{var r=n(73012),i=n(39248),a=Object.prototype,o=a.hasOwnProperty,s=a.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return i(e)&&o.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},12279:e=>{var t=Array.isArray;e.exports=t},97840:(e,t,n)=>{var r=n(93008),i=n(5776);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},6794:(e,t,n)=>{e=n.nmd(e);var r=n(14759),i=n(63721),a=t&&!t.nodeType&&t,o=a&&e&&!e.nodeType&&e,s=o&&o.exports===a?r.Buffer:void 0,l=(s?s.isBuffer:void 0)||i;e.exports=l},93008:(e,t,n)=>{var r=n(22022),i=n(24567);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},5776:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},97744:(e,t,n)=>{var r=n(3530),i=n(35639),a=n(82479),o=a&&a.isMap,s=o?i(o):r;e.exports=s},24567:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},39248:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},75461:(e,t,n)=>{var r=n(22022),i=n(42253),a=n(39248),o=Function.prototype,s=Object.prototype,l=o.toString,c=s.hasOwnProperty,u=l.call(Object);e.exports=function(e){if(!a(e)||"[object Object]"!=r(e))return!1;var t=i(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==u}},5738:(e,t,n)=>{var r=n(63152),i=n(35639),a=n(82479),o=a&&a.isSet,s=o?i(o):r;e.exports=s},56801:(e,t,n)=>{var r=n(22022),i=n(12279),a=n(39248);e.exports=function(e){return"string"==typeof e||!i(e)&&a(e)&&"[object String]"==r(e)}},50184:(e,t,n)=>{var r=n(22022),i=n(39248);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},71641:(e,t,n)=>{var r=n(38183),i=n(35639),a=n(82479),o=a&&a.isTypedArray,s=o?i(o):r;e.exports=s},65724:(e,t,n)=>{var r=n(37405),i=n(37462),a=n(97840);e.exports=function(e){return a(e)?r(e):i(e)}},31235:(e,t,n)=>{var r=n(37405),i=n(28833),a=n(97840);e.exports=function(e){return a(e)?r(e,!0):i(e)}},55876:(e,t,n)=>{var r=n(61570),i=n(15127),a=n(56602),o=n(12279);e.exports=function(e,t){return(o(e)?r:a)(e,i(t,3))}},42434:(e,t,n)=>{var r=n(54467);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(i.Cache||r),n}i.Cache=r,e.exports=i},78857:(e,t,n)=>{var r=n(29343),i=n(84753),a=n(65916),o=n(92535);e.exports=function(e){return a(e)?r(o(e)):i(e)}},71515:e=>{e.exports=function(){return[]}},63721:e=>{e.exports=function(){return!1}},54008:(e,t,n)=>{var r=n(91582);e.exports=function(e){return null==e?"":r(e)}},59051:function(e,t,n){(e=n.nmd(e)).exports=function(){"use strict";var t,n;function r(){return t.apply(null,arguments)}function i(e){t=e}function a(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function o(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(s(e,t))return!1;return!0}function c(e){return void 0===e}function u(e){return"number"===typeof e||"[object Number]"===Object.prototype.toString.call(e)}function d(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function h(e,t){var n,r=[],i=e.length;for(n=0;n>>0;for(t=0;t0)for(n=0;n=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var z=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,N=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,F={},B={};function j(e,t,n,r){var i=r;"string"===typeof r&&(i=function(){return this[r]()}),e&&(B[e]=i),t&&(B[t[0]]=function(){return I(i.apply(this,arguments),t[1],t[2])}),n&&(B[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function U(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function V(e){var t,n,r=e.match(z);for(t=0,n=r.length;t=0&&N.test(e);)e=e.replace(N,r),N.lastIndex=0,n-=1;return e}var G={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function q(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(z).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])}var Y="Invalid date";function $(){return this._invalidDate}var X="%d",Z=/\d{1,2}/;function K(e){return this._ordinal.replace("%d",e)}var J={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Q(e,t,n,r){var i=this._relativeTime[n];return C(i)?i(e,t,n,r):i.replace(/%d/i,e)}function ee(e,t){var n=this._relativeTime[e>0?"future":"past"];return C(n)?n(t):n.replace(/%s/i,t)}var te={};function ne(e,t){var n=e.toLowerCase();te[n]=te[n+"s"]=te[t]=e}function re(e){return"string"===typeof e?te[e]||te[e.toLowerCase()]:void 0}function ie(e){var t,n,r={};for(n in e)s(e,n)&&(t=re(n))&&(r[t]=e[n]);return r}var ae={};function oe(e,t){ae[e]=t}function se(e){var t,n=[];for(t in e)s(e,t)&&n.push({unit:t,priority:ae[t]});return n.sort((function(e,t){return e.priority-t.priority})),n}function le(e){return e%4===0&&e%100!==0||e%400===0}function ce(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function ue(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=ce(t)),n}function de(e,t){return function(n){return null!=n?(fe(this,e,n),r.updateOffset(this,t),this):he(this,e)}}function he(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function fe(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&le(e.year())&&1===e.month()&&29===e.date()?(n=ue(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Qe(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function pe(e){return C(this[e=re(e)])?this[e]():this}function me(e,t){if("object"===typeof e){var n,r=se(e=ie(e)),i=r.length;for(n=0;n68?1900:2e3)};var gt=de("FullYear",!0);function vt(){return le(this.year())}function yt(e,t,n,r,i,a,o){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,r,i,a,o),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,i,a,o),s}function xt(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function bt(e,t,n){var r=7+t-n;return-(7+xt(e,0,r).getUTCDay()-t)%7+r-1}function _t(e,t,n,r,i){var a,o,s=1+7*(t-1)+(7+n-r)%7+bt(e,r,i);return s<=0?o=mt(a=e-1)+s:s>mt(e)?(a=e+1,o=s-mt(e)):(a=e,o=s),{year:a,dayOfYear:o}}function wt(e,t,n){var r,i,a=bt(e.year(),t,n),o=Math.floor((e.dayOfYear()-a-1)/7)+1;return o<1?r=o+At(i=e.year()-1,t,n):o>At(e.year(),t,n)?(r=o-At(e.year(),t,n),i=e.year()+1):(i=e.year(),r=o),{week:r,year:i}}function At(e,t,n){var r=bt(e,t,n),i=bt(e+1,t,n);return(mt(e)-r+i)/7}function St(e){return wt(e,this._week.dow,this._week.doy).week}j("w",["ww",2],"wo","week"),j("W",["WW",2],"Wo","isoWeek"),ne("week","w"),ne("isoWeek","W"),oe("week",5),oe("isoWeek",5),Le("w",we),Le("ww",we,ye),Le("W",we),Le("WW",we,ye),je(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=ue(e)}));var Mt={dow:0,doy:6};function Tt(){return this._week.dow}function kt(){return this._week.doy}function Et(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Ct(e){var t=wt(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function Dt(e,t){return"string"!==typeof e?e:isNaN(e)?"number"===typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function Rt(e,t){return"string"===typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Pt(e,t){return e.slice(t,7).concat(e.slice(0,t))}j("d",0,"do","day"),j("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),j("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),j("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),j("e",0,0,"weekday"),j("E",0,0,"isoWeekday"),ne("day","d"),ne("weekday","e"),ne("isoWeekday","E"),oe("day",11),oe("weekday",11),oe("isoWeekday",11),Le("d",we),Le("e",we),Le("E",we),Le("dd",(function(e,t){return t.weekdaysMinRegex(e)})),Le("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),Le("dddd",(function(e,t){return t.weekdaysRegex(e)})),je(["dd","ddd","dddd"],(function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:g(n).invalidWeekday=e})),je(["d","e","E"],(function(e,t,n,r){t[r]=ue(e)}));var Ot="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Lt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),It="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),zt=Oe,Nt=Oe,Ft=Oe;function Bt(e,t){var n=a(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Pt(n,this._week.dow):e?n[e.day()]:n}function jt(e){return!0===e?Pt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Ut(e){return!0===e?Pt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Vt(e,t,n){var r,i,a,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=p([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=Ve.call(this._weekdaysParse,o))?i:null:"ddd"===t?-1!==(i=Ve.call(this._shortWeekdaysParse,o))?i:null:-1!==(i=Ve.call(this._minWeekdaysParse,o))?i:null:"dddd"===t?-1!==(i=Ve.call(this._weekdaysParse,o))||-1!==(i=Ve.call(this._shortWeekdaysParse,o))||-1!==(i=Ve.call(this._minWeekdaysParse,o))?i:null:"ddd"===t?-1!==(i=Ve.call(this._shortWeekdaysParse,o))||-1!==(i=Ve.call(this._weekdaysParse,o))||-1!==(i=Ve.call(this._minWeekdaysParse,o))?i:null:-1!==(i=Ve.call(this._minWeekdaysParse,o))||-1!==(i=Ve.call(this._weekdaysParse,o))||-1!==(i=Ve.call(this._shortWeekdaysParse,o))?i:null}function Ht(e,t,n){var r,i,a;if(this._weekdaysParseExact)return Vt.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=p([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function Wt(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=Dt(e,this.localeData()),this.add(e-t,"d")):t}function Gt(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function qt(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Rt(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Yt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Zt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=zt),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function $t(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Zt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Nt),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Xt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Zt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ft),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Zt(){function e(e,t){return t.length-e.length}var t,n,r,i,a,o=[],s=[],l=[],c=[];for(t=0;t<7;t++)n=p([2e3,1]).day(t),r=Ne(this.weekdaysMin(n,"")),i=Ne(this.weekdaysShort(n,"")),a=Ne(this.weekdays(n,"")),o.push(r),s.push(i),l.push(a),c.push(r),c.push(i),c.push(a);o.sort(e),s.sort(e),l.sort(e),c.sort(e),this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Kt(){return this.hours()%12||12}function Jt(){return this.hours()||24}function Qt(e,t){j(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function en(e,t){return t._meridiemParse}function tn(e){return"p"===(e+"").toLowerCase().charAt(0)}j("H",["HH",2],0,"hour"),j("h",["hh",2],0,Kt),j("k",["kk",2],0,Jt),j("hmm",0,0,(function(){return""+Kt.apply(this)+I(this.minutes(),2)})),j("hmmss",0,0,(function(){return""+Kt.apply(this)+I(this.minutes(),2)+I(this.seconds(),2)})),j("Hmm",0,0,(function(){return""+this.hours()+I(this.minutes(),2)})),j("Hmmss",0,0,(function(){return""+this.hours()+I(this.minutes(),2)+I(this.seconds(),2)})),Qt("a",!0),Qt("A",!1),ne("hour","h"),oe("hour",13),Le("a",en),Le("A",en),Le("H",we),Le("h",we),Le("k",we),Le("HH",we,ye),Le("hh",we,ye),Le("kk",we,ye),Le("hmm",Ae),Le("hmmss",Se),Le("Hmm",Ae),Le("Hmmss",Se),Be(["H","HH"],qe),Be(["k","kk"],(function(e,t,n){var r=ue(e);t[qe]=24===r?0:r})),Be(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),Be(["h","hh"],(function(e,t,n){t[qe]=ue(e),g(n).bigHour=!0})),Be("hmm",(function(e,t,n){var r=e.length-2;t[qe]=ue(e.substr(0,r)),t[Ye]=ue(e.substr(r)),g(n).bigHour=!0})),Be("hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[qe]=ue(e.substr(0,r)),t[Ye]=ue(e.substr(r,2)),t[$e]=ue(e.substr(i)),g(n).bigHour=!0})),Be("Hmm",(function(e,t,n){var r=e.length-2;t[qe]=ue(e.substr(0,r)),t[Ye]=ue(e.substr(r))})),Be("Hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[qe]=ue(e.substr(0,r)),t[Ye]=ue(e.substr(r,2)),t[$e]=ue(e.substr(i))}));var nn=/[ap]\.?m?\.?/i,rn=de("Hours",!0);function an(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var on,sn={calendar:O,longDateFormat:G,invalidDate:Y,ordinal:X,dayOfMonthOrdinalParse:Z,relativeTime:J,months:et,monthsShort:tt,week:Mt,weekdays:Ot,weekdaysMin:It,weekdaysShort:Lt,meridiemParse:nn},ln={},cn={};function un(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(r=pn(i.slice(0,t).join("-")))return r;if(n&&n.length>=t&&un(i,n)>=t-1)break;t--}a++}return on}function fn(e){return null!=e.match("^[^/\\\\]*$")}function pn(t){var n=null;if(void 0===ln[t]&&e&&e.exports&&fn(t))try{n=on._abbr,Object(function(){var e=new Error("Cannot find module 'undefined'");throw e.code="MODULE_NOT_FOUND",e}()),mn(n)}catch(r){ln[t]=null}return ln[t]}function mn(e,t){var n;return e&&((n=c(t)?yn(e):gn(e,t))?on=n:"undefined"!==typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),on._abbr}function gn(e,t){if(null!==t){var n,r=sn;if(t.abbr=e,null!=ln[e])E("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=ln[e]._config;else if(null!=t.parentLocale)if(null!=ln[t.parentLocale])r=ln[t.parentLocale]._config;else{if(null==(n=pn(t.parentLocale)))return cn[t.parentLocale]||(cn[t.parentLocale]=[]),cn[t.parentLocale].push({name:e,config:t}),null;r=n._config}return ln[e]=new P(R(r,t)),cn[e]&&cn[e].forEach((function(e){gn(e.name,e.config)})),mn(e),ln[e]}return delete ln[e],null}function vn(e,t){if(null!=t){var n,r,i=sn;null!=ln[e]&&null!=ln[e].parentLocale?ln[e].set(R(ln[e]._config,t)):(null!=(r=pn(e))&&(i=r._config),t=R(i,t),null==r&&(t.abbr=e),(n=new P(t)).parentLocale=ln[e],ln[e]=n),mn(e)}else null!=ln[e]&&(null!=ln[e].parentLocale?(ln[e]=ln[e].parentLocale,e===mn()&&mn(e)):null!=ln[e]&&delete ln[e]);return ln[e]}function yn(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return on;if(!a(e)){if(t=pn(e))return t;e=[e]}return hn(e)}function xn(){return T(ln)}function bn(e){var t,n=e._a;return n&&-2===g(e).overflow&&(t=n[We]<0||n[We]>11?We:n[Ge]<1||n[Ge]>Qe(n[He],n[We])?Ge:n[qe]<0||n[qe]>24||24===n[qe]&&(0!==n[Ye]||0!==n[$e]||0!==n[Xe])?qe:n[Ye]<0||n[Ye]>59?Ye:n[$e]<0||n[$e]>59?$e:n[Xe]<0||n[Xe]>999?Xe:-1,g(e)._overflowDayOfYear&&(tGe)&&(t=Ge),g(e)._overflowWeeks&&-1===t&&(t=Ze),g(e)._overflowWeekday&&-1===t&&(t=Ke),g(e).overflow=t),e}var _n=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wn=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,An=/Z|[+-]\d\d(?::?\d\d)?/,Sn=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Mn=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Tn=/^\/?Date\((-?\d+)/i,kn=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,En={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Cn(e){var t,n,r,i,a,o,s=e._i,l=_n.exec(s)||wn.exec(s),c=Sn.length,u=Mn.length;if(l){for(g(e).iso=!0,t=0,n=c;tmt(a)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),n=xt(a,0,e._dayOfYear),e._a[We]=n.getUTCMonth(),e._a[Ge]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=o[t]=r[t];for(;t<7;t++)e._a[t]=o[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[qe]&&0===e._a[Ye]&&0===e._a[$e]&&0===e._a[Xe]&&(e._nextDay=!0,e._a[qe]=0),e._d=(e._useUTC?xt:yt).apply(null,o),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[qe]=24),e._w&&"undefined"!==typeof e._w.d&&e._w.d!==i&&(g(e).weekdayMismatch=!0)}}function jn(e){var t,n,r,i,a,o,s,l,c;null!=(t=e._w).GG||null!=t.W||null!=t.E?(a=1,o=4,n=Nn(t.GG,e._a[He],wt(Xn(),1,4).year),r=Nn(t.W,1),((i=Nn(t.E,1))<1||i>7)&&(l=!0)):(a=e._locale._week.dow,o=e._locale._week.doy,c=wt(Xn(),a,o),n=Nn(t.gg,e._a[He],c.year),r=Nn(t.w,c.week),null!=t.d?((i=t.d)<0||i>6)&&(l=!0):null!=t.e?(i=t.e+a,(t.e<0||t.e>6)&&(l=!0)):i=a),r<1||r>At(n,a,o)?g(e)._overflowWeeks=!0:null!=l?g(e)._overflowWeekday=!0:(s=_t(n,r,i,a,o),e._a[He]=s.year,e._dayOfYear=s.dayOfYear)}function Un(e){if(e._f!==r.ISO_8601)if(e._f!==r.RFC_2822){e._a=[],g(e).empty=!0;var t,n,i,a,o,s,l,c=""+e._i,u=c.length,d=0;for(l=(i=W(e._f,e._locale).match(z)||[]).length,t=0;t0&&g(e).unusedInput.push(o),c=c.slice(c.indexOf(n)+n.length),d+=n.length),B[a]?(n?g(e).empty=!1:g(e).unusedTokens.push(a),Ue(a,n,e)):e._strict&&!n&&g(e).unusedTokens.push(a);g(e).charsLeftOver=u-d,c.length>0&&g(e).unusedInput.push(c),e._a[qe]<=12&&!0===g(e).bigHour&&e._a[qe]>0&&(g(e).bigHour=void 0),g(e).parsedDateParts=e._a.slice(0),g(e).meridiem=e._meridiem,e._a[qe]=Vn(e._locale,e._a[qe],e._meridiem),null!==(s=g(e).era)&&(e._a[He]=e._locale.erasConvertYear(s,e._a[He])),Bn(e),bn(e)}else In(e);else Cn(e)}function Vn(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}function Hn(e){var t,n,r,i,a,o,s=!1,l=e._f.length;if(0===l)return g(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;ithis?this:e:y()}));function Jn(e,t){var n,r;if(1===t.length&&a(t[0])&&(t=t[0]),!t.length)return Xn();for(n=t[0],r=1;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function wr(){if(!c(this._isDSTShifted))return this._isDSTShifted;var e,t={};return _(t,this),(t=qn(t))._a?(e=t._isUTC?p(t._a):Xn(t._a),this._isDSTShifted=this.isValid()&&cr(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Ar(){return!!this.isValid()&&!this._isUTC}function Sr(){return!!this.isValid()&&this._isUTC}function Mr(){return!!this.isValid()&&this._isUTC&&0===this._offset}r.updateOffset=function(){};var Tr=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,kr=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Er(e,t){var n,r,i,a=e,o=null;return sr(e)?a={ms:e._milliseconds,d:e._days,M:e._months}:u(e)||!isNaN(+e)?(a={},t?a[t]=+e:a.milliseconds=+e):(o=Tr.exec(e))?(n="-"===o[1]?-1:1,a={y:0,d:ue(o[Ge])*n,h:ue(o[qe])*n,m:ue(o[Ye])*n,s:ue(o[$e])*n,ms:ue(lr(1e3*o[Xe]))*n}):(o=kr.exec(e))?(n="-"===o[1]?-1:1,a={y:Cr(o[2],n),M:Cr(o[3],n),w:Cr(o[4],n),d:Cr(o[5],n),h:Cr(o[6],n),m:Cr(o[7],n),s:Cr(o[8],n)}):null==a?a={}:"object"===typeof a&&("from"in a||"to"in a)&&(i=Rr(Xn(a.from),Xn(a.to)),(a={}).ms=i.milliseconds,a.M=i.months),r=new or(a),sr(e)&&s(e,"_locale")&&(r._locale=e._locale),sr(e)&&s(e,"_isValid")&&(r._isValid=e._isValid),r}function Cr(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Dr(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Rr(e,t){var n;return e.isValid()&&t.isValid()?(t=fr(t,e),e.isBefore(t)?n=Dr(e,t):((n=Dr(t,e)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Pr(e,t){return function(n,r){var i;return null===r||isNaN(+r)||(E(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),Or(this,Er(n,r),e),this}}function Or(e,t,n,i){var a=t._milliseconds,o=lr(t._days),s=lr(t._months);e.isValid()&&(i=null==i||i,s&&ct(e,he(e,"Month")+s*n),o&&fe(e,"Date",he(e,"Date")+o*n),a&&e._d.setTime(e._d.valueOf()+a*n),i&&r.updateOffset(e,o||s))}Er.fn=or.prototype,Er.invalid=ar;var Lr=Pr(1,"add"),Ir=Pr(-1,"subtract");function zr(e){return"string"===typeof e||e instanceof String}function Nr(e){return A(e)||d(e)||zr(e)||u(e)||Br(e)||Fr(e)||null===e||void 0===e}function Fr(e){var t,n,r=o(e)&&!l(e),i=!1,a=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],c=a.length;for(t=0;tn.valueOf():n.valueOf()9999?H(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):C(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",H(n,"Z")):H(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function ei(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,r,i="moment",a="";return this.isLocal()||(i=0===this.utcOffset()?"moment.utc":"moment.parseZone",a="Z"),e="["+i+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",r=a+'[")]',this.format(e+t+n+r)}function ti(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=H(this,e);return this.localeData().postformat(t)}function ni(e,t){return this.isValid()&&(A(e)&&e.isValid()||Xn(e).isValid())?Er({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ri(e){return this.from(Xn(),e)}function ii(e,t){return this.isValid()&&(A(e)&&e.isValid()||Xn(e).isValid())?Er({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ai(e){return this.to(Xn(),e)}function oi(e){var t;return void 0===e?this._locale._abbr:(null!=(t=yn(e))&&(this._locale=t),this)}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var si=M("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function li(){return this._locale}var ci=1e3,ui=60*ci,di=60*ui,hi=3506328*di;function fi(e,t){return(e%t+t)%t}function pi(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-hi:new Date(e,t,n).valueOf()}function mi(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-hi:Date.UTC(e,t,n)}function gi(e){var t,n;if(void 0===(e=re(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?mi:pi,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=fi(t+(this._isUTC?0:this.utcOffset()*ui),di);break;case"minute":t=this._d.valueOf(),t-=fi(t,ui);break;case"second":t=this._d.valueOf(),t-=fi(t,ci)}return this._d.setTime(t),r.updateOffset(this,!0),this}function vi(e){var t,n;if(void 0===(e=re(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?mi:pi,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=di-fi(t+(this._isUTC?0:this.utcOffset()*ui),di)-1;break;case"minute":t=this._d.valueOf(),t+=ui-fi(t,ui)-1;break;case"second":t=this._d.valueOf(),t+=ci-fi(t,ci)-1}return this._d.setTime(t),r.updateOffset(this,!0),this}function yi(){return this._d.valueOf()-6e4*(this._offset||0)}function xi(){return Math.floor(this.valueOf()/1e3)}function bi(){return new Date(this.valueOf())}function _i(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function wi(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Ai(){return this.isValid()?this.toISOString():null}function Si(){return v(this)}function Mi(){return f({},g(this))}function Ti(){return g(this).overflow}function ki(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Ei(e,t){var n,i,a,o=this._eras||yn("en")._eras;for(n=0,i=o.length;n=0)return l[r]}function Di(e,t){var n=e.since<=e.until?1:-1;return void 0===t?r(e.since).year():r(e.since).year()+(t-e.offset)*n}function Ri(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e(a=At(e,r,i))&&(t=a),Ki.call(this,e,t,n,r,i))}function Ki(e,t,n,r,i){var a=_t(e,t,n,r,i),o=xt(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}function Ji(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}j("N",0,0,"eraAbbr"),j("NN",0,0,"eraAbbr"),j("NNN",0,0,"eraAbbr"),j("NNNN",0,0,"eraName"),j("NNNNN",0,0,"eraNarrow"),j("y",["y",1],"yo","eraYear"),j("y",["yy",2],0,"eraYear"),j("y",["yyy",3],0,"eraYear"),j("y",["yyyy",4],0,"eraYear"),Le("N",Fi),Le("NN",Fi),Le("NNN",Fi),Le("NNNN",Bi),Le("NNNNN",ji),Be(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?g(n).era=i:g(n).invalidEra=e})),Le("y",Ee),Le("yy",Ee),Le("yyy",Ee),Le("yyyy",Ee),Le("yo",Ui),Be(["y","yy","yyy","yyyy"],He),Be(["yo"],(function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[He]=n._locale.eraYearOrdinalParse(e,i):t[He]=parseInt(e,10)})),j(0,["gg",2],0,(function(){return this.weekYear()%100})),j(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Hi("gggg","weekYear"),Hi("ggggg","weekYear"),Hi("GGGG","isoWeekYear"),Hi("GGGGG","isoWeekYear"),ne("weekYear","gg"),ne("isoWeekYear","GG"),oe("weekYear",1),oe("isoWeekYear",1),Le("G",Ce),Le("g",Ce),Le("GG",we,ye),Le("gg",we,ye),Le("GGGG",Te,be),Le("gggg",Te,be),Le("GGGGG",ke,_e),Le("ggggg",ke,_e),je(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=ue(e)})),je(["gg","GG"],(function(e,t,n,i){t[i]=r.parseTwoDigitYear(e)})),j("Q",0,"Qo","quarter"),ne("quarter","Q"),oe("quarter",7),Le("Q",ve),Be("Q",(function(e,t){t[We]=3*(ue(e)-1)})),j("D",["DD",2],"Do","date"),ne("date","D"),oe("date",9),Le("D",we),Le("DD",we,ye),Le("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),Be(["D","DD"],Ge),Be("Do",(function(e,t){t[Ge]=ue(e.match(we)[0])}));var Qi=de("Date",!0);function ea(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}j("DDD",["DDDD",3],"DDDo","dayOfYear"),ne("dayOfYear","DDD"),oe("dayOfYear",4),Le("DDD",Me),Le("DDDD",xe),Be(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=ue(e)})),j("m",["mm",2],0,"minute"),ne("minute","m"),oe("minute",14),Le("m",we),Le("mm",we,ye),Be(["m","mm"],Ye);var ta=de("Minutes",!1);j("s",["ss",2],0,"second"),ne("second","s"),oe("second",15),Le("s",we),Le("ss",we,ye),Be(["s","ss"],$e);var na,ra,ia=de("Seconds",!1);for(j("S",0,0,(function(){return~~(this.millisecond()/100)})),j(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),j(0,["SSS",3],0,"millisecond"),j(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),j(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),j(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),j(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),j(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),j(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),ne("millisecond","ms"),oe("millisecond",16),Le("S",Me,ve),Le("SS",Me,ye),Le("SSS",Me,xe),na="SSSS";na.length<=9;na+="S")Le(na,Ee);function aa(e,t){t[Xe]=ue(1e3*("0."+e))}for(na="S";na.length<=9;na+="S")Be(na,aa);function oa(){return this._isUTC?"UTC":""}function sa(){return this._isUTC?"Coordinated Universal Time":""}ra=de("Milliseconds",!1),j("z",0,0,"zoneAbbr"),j("zz",0,0,"zoneName");var la=w.prototype;function ca(e){return Xn(1e3*e)}function ua(){return Xn.apply(null,arguments).parseZone()}function da(e){return e}la.add=Lr,la.calendar=Vr,la.clone=Hr,la.diff=Zr,la.endOf=vi,la.format=ti,la.from=ni,la.fromNow=ri,la.to=ii,la.toNow=ai,la.get=pe,la.invalidAt=Ti,la.isAfter=Wr,la.isBefore=Gr,la.isBetween=qr,la.isSame=Yr,la.isSameOrAfter=$r,la.isSameOrBefore=Xr,la.isValid=Si,la.lang=si,la.locale=oi,la.localeData=li,la.max=Kn,la.min=Zn,la.parsingFlags=Mi,la.set=me,la.startOf=gi,la.subtract=Ir,la.toArray=_i,la.toObject=wi,la.toDate=bi,la.toISOString=Qr,la.inspect=ei,"undefined"!==typeof Symbol&&null!=Symbol.for&&(la[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),la.toJSON=Ai,la.toString=Jr,la.unix=xi,la.valueOf=yi,la.creationData=ki,la.eraName=Ri,la.eraNarrow=Pi,la.eraAbbr=Oi,la.eraYear=Li,la.year=gt,la.isLeapYear=vt,la.weekYear=Wi,la.isoWeekYear=Gi,la.quarter=la.quarters=Ji,la.month=ut,la.daysInMonth=dt,la.week=la.weeks=Et,la.isoWeek=la.isoWeeks=Ct,la.weeksInYear=$i,la.weeksInWeekYear=Xi,la.isoWeeksInYear=qi,la.isoWeeksInISOWeekYear=Yi,la.date=Qi,la.day=la.days=Wt,la.weekday=Gt,la.isoWeekday=qt,la.dayOfYear=ea,la.hour=la.hours=rn,la.minute=la.minutes=ta,la.second=la.seconds=ia,la.millisecond=la.milliseconds=ra,la.utcOffset=mr,la.utc=vr,la.local=yr,la.parseZone=xr,la.hasAlignedHourOffset=br,la.isDST=_r,la.isLocal=Ar,la.isUtcOffset=Sr,la.isUtc=Mr,la.isUTC=Mr,la.zoneAbbr=oa,la.zoneName=sa,la.dates=M("dates accessor is deprecated. Use date instead.",Qi),la.months=M("months accessor is deprecated. Use month instead",ut),la.years=M("years accessor is deprecated. Use year instead",gt),la.zone=M("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",gr),la.isDSTShifted=M("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",wr);var ha=P.prototype;function fa(e,t,n,r){var i=yn(),a=p().set(r,t);return i[n](a,e)}function pa(e,t,n){if(u(e)&&(t=e,e=void 0),e=e||"",null!=t)return fa(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=fa(e,r,n,"month");return i}function ma(e,t,n,r){"boolean"===typeof e?(u(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,u(t)&&(n=t,t=void 0),t=t||"");var i,a=yn(),o=e?a._week.dow:0,s=[];if(null!=n)return fa(t,(n+o)%7,r,"day");for(i=0;i<7;i++)s[i]=fa(t,(i+o)%7,r,"day");return s}function ga(e,t){return pa(e,t,"months")}function va(e,t){return pa(e,t,"monthsShort")}function ya(e,t,n){return ma(e,t,n,"weekdays")}function xa(e,t,n){return ma(e,t,n,"weekdaysShort")}function ba(e,t,n){return ma(e,t,n,"weekdaysMin")}ha.calendar=L,ha.longDateFormat=q,ha.invalidDate=$,ha.ordinal=K,ha.preparse=da,ha.postformat=da,ha.relativeTime=Q,ha.pastFuture=ee,ha.set=D,ha.eras=Ei,ha.erasParse=Ci,ha.erasConvertYear=Di,ha.erasAbbrRegex=zi,ha.erasNameRegex=Ii,ha.erasNarrowRegex=Ni,ha.months=at,ha.monthsShort=ot,ha.monthsParse=lt,ha.monthsRegex=ft,ha.monthsShortRegex=ht,ha.week=St,ha.firstDayOfYear=kt,ha.firstDayOfWeek=Tt,ha.weekdays=Bt,ha.weekdaysMin=Ut,ha.weekdaysShort=jt,ha.weekdaysParse=Ht,ha.weekdaysRegex=Yt,ha.weekdaysShortRegex=$t,ha.weekdaysMinRegex=Xt,ha.isPM=tn,ha.meridiem=an,mn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===ue(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),r.lang=M("moment.lang is deprecated. Use moment.locale instead.",mn),r.langData=M("moment.langData is deprecated. Use moment.localeData instead.",yn);var _a=Math.abs;function wa(){var e=this._data;return this._milliseconds=_a(this._milliseconds),this._days=_a(this._days),this._months=_a(this._months),e.milliseconds=_a(e.milliseconds),e.seconds=_a(e.seconds),e.minutes=_a(e.minutes),e.hours=_a(e.hours),e.months=_a(e.months),e.years=_a(e.years),this}function Aa(e,t,n,r){var i=Er(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function Sa(e,t){return Aa(this,e,t,1)}function Ma(e,t){return Aa(this,e,t,-1)}function Ta(e){return e<0?Math.floor(e):Math.ceil(e)}function ka(){var e,t,n,r,i,a=this._milliseconds,o=this._days,s=this._months,l=this._data;return a>=0&&o>=0&&s>=0||a<=0&&o<=0&&s<=0||(a+=864e5*Ta(Ca(s)+o),o=0,s=0),l.milliseconds=a%1e3,e=ce(a/1e3),l.seconds=e%60,t=ce(e/60),l.minutes=t%60,n=ce(t/60),l.hours=n%24,o+=ce(n/24),s+=i=ce(Ea(o)),o-=Ta(Ca(i)),r=ce(s/12),s%=12,l.days=o,l.months=s,l.years=r,this}function Ea(e){return 4800*e/146097}function Ca(e){return 146097*e/4800}function Da(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=re(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+Ea(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Ca(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}}function Ra(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*ue(this._months/12):NaN}function Pa(e){return function(){return this.as(e)}}var Oa=Pa("ms"),La=Pa("s"),Ia=Pa("m"),za=Pa("h"),Na=Pa("d"),Fa=Pa("w"),Ba=Pa("M"),ja=Pa("Q"),Ua=Pa("y");function Va(){return Er(this)}function Ha(e){return e=re(e),this.isValid()?this[e+"s"]():NaN}function Wa(e){return function(){return this.isValid()?this._data[e]:NaN}}var Ga=Wa("milliseconds"),qa=Wa("seconds"),Ya=Wa("minutes"),$a=Wa("hours"),Xa=Wa("days"),Za=Wa("months"),Ka=Wa("years");function Ja(){return ce(this.days()/7)}var Qa=Math.round,eo={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function to(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function no(e,t,n,r){var i=Er(e).abs(),a=Qa(i.as("s")),o=Qa(i.as("m")),s=Qa(i.as("h")),l=Qa(i.as("d")),c=Qa(i.as("M")),u=Qa(i.as("w")),d=Qa(i.as("y")),h=a<=n.ss&&["s",a]||a0,h[4]=r,to.apply(null,h)}function ro(e){return void 0===e?Qa:"function"===typeof e&&(Qa=e,!0)}function io(e,t){return void 0!==eo[e]&&(void 0===t?eo[e]:(eo[e]=t,"s"===e&&(eo.ss=t-1),!0))}function ao(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,i=!1,a=eo;return"object"===typeof e&&(t=e,e=!1),"boolean"===typeof e&&(i=e),"object"===typeof t&&(a=Object.assign({},eo,t),null!=t.s&&null==t.ss&&(a.ss=t.s-1)),r=no(this,!i,a,n=this.localeData()),i&&(r=n.pastFuture(+this,r)),n.postformat(r)}var oo=Math.abs;function so(e){return(e>0)-(e<0)||+e}function lo(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,i,a,o,s,l=oo(this._milliseconds)/1e3,c=oo(this._days),u=oo(this._months),d=this.asSeconds();return d?(e=ce(l/60),t=ce(e/60),l%=60,e%=60,n=ce(u/12),u%=12,r=l?l.toFixed(3).replace(/\.?0+$/,""):"",i=d<0?"-":"",a=so(this._months)!==so(d)?"-":"",o=so(this._days)!==so(d)?"-":"",s=so(this._milliseconds)!==so(d)?"-":"",i+"P"+(n?a+n+"Y":"")+(u?a+u+"M":"")+(c?o+c+"D":"")+(t||e||l?"T":"")+(t?s+t+"H":"")+(e?s+e+"M":"")+(l?s+r+"S":"")):"P0D"}var co=or.prototype;return co.isValid=ir,co.abs=wa,co.add=Sa,co.subtract=Ma,co.as=Da,co.asMilliseconds=Oa,co.asSeconds=La,co.asMinutes=Ia,co.asHours=za,co.asDays=Na,co.asWeeks=Fa,co.asMonths=Ba,co.asQuarters=ja,co.asYears=Ua,co.valueOf=Ra,co._bubble=ka,co.clone=Va,co.get=Ha,co.milliseconds=Ga,co.seconds=qa,co.minutes=Ya,co.hours=$a,co.days=Xa,co.weeks=Ja,co.months=Za,co.years=Ka,co.humanize=ao,co.toISOString=lo,co.toString=lo,co.toJSON=lo,co.locale=oi,co.localeData=li,co.toIsoString=M("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",lo),co.lang=si,j("X",0,0,"unix"),j("x",0,0,"valueOf"),Le("x",Ce),Le("X",Pe),Be("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),Be("x",(function(e,t,n){n._d=new Date(ue(e))})),r.version="2.29.4",i(Xn),r.fn=la,r.min=Qn,r.max=er,r.now=tr,r.utc=p,r.unix=ca,r.months=ga,r.isDate=d,r.locale=mn,r.invalid=y,r.duration=Er,r.isMoment=A,r.weekdays=ya,r.parseZone=ua,r.localeData=yn,r.isDuration=sr,r.monthsShort=va,r.weekdaysMin=ba,r.defineLocale=gn,r.updateLocale=vn,r.locales=xn,r.weekdaysShort=xa,r.normalizeUnits=re,r.relativeTimeRounding=ro,r.relativeTimeThreshold=io,r.calendarFormat=Ur,r.prototype=la,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r}()},50847:function(e,t){var n,r,i;r=[],n=function e(){"use strict";var t="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:{},n=!t.document&&!!t.postMessage,r=n&&/blob:/i.test((t.location||{}).protocol),i={},a=0,o={parse:function(n,r){var s=(r=r||{}).dynamicTyping||!1;if(_(s)&&(r.dynamicTypingFunction=s,s={}),r.dynamicTyping=s,r.transform=!!_(r.transform)&&r.transform,r.worker&&o.WORKERS_SUPPORTED){var l=function(){if(!o.WORKERS_SUPPORTED)return!1;var n,r,s=(n=t.URL||t.webkitURL||null,r=e.toString(),o.BLOB_URL||(o.BLOB_URL=n.createObjectURL(new Blob(["(",r,")();"],{type:"text/javascript"})))),l=new t.Worker(s);return l.onmessage=g,l.id=a++,i[l.id]=l}();return l.userStep=r.step,l.userChunk=r.chunk,l.userComplete=r.complete,l.userError=r.error,r.step=_(r.step),r.chunk=_(r.chunk),r.complete=_(r.complete),r.error=_(r.error),delete r.worker,void l.postMessage({input:n,config:r,workerId:l.id})}var f=null;return o.NODE_STREAM_INPUT,"string"==typeof n?f=r.download?new c(r):new d(r):!0===n.readable&&_(n.read)&&_(n.on)?f=new h(r):(t.File&&n instanceof File||n instanceof Object)&&(f=new u(r)),f.stream(n)},unparse:function(e,t){var n=!1,r=!0,i=",",a="\r\n",s='"',l=s+s,c=!1,u=null,d=!1;!function(){if("object"==typeof t){if("string"!=typeof t.delimiter||o.BAD_DELIMITERS.filter((function(e){return-1!==t.delimiter.indexOf(e)})).length||(i=t.delimiter),("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(n=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(c=t.skipEmptyLines),"string"==typeof t.newline&&(a=t.newline),"string"==typeof t.quoteChar&&(s=t.quoteChar),"boolean"==typeof t.header&&(r=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");u=t.columns}void 0!==t.escapeChar&&(l=t.escapeChar+s),("boolean"==typeof t.escapeFormulae||t.escapeFormulae instanceof RegExp)&&(d=t.escapeFormulae instanceof RegExp?t.escapeFormulae:/^[=+\-@\t\r].*$/)}}();var h=new RegExp(p(s),"g");if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return f(null,e,c);if("object"==typeof e[0])return f(u||Object.keys(e[0]),e,c)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||u),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),f(e.fields||[],e.data||[],c);throw new Error("Unable to serialize unrecognized input");function f(e,t,n){var o="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var s=Array.isArray(e)&&0=this._config.preview;if(r)t.postMessage({results:s,workerId:o.WORKER_ID,finished:c});else if(_(this._config.chunk)&&!n){if(this._config.chunk(s,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);s=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(s.data),this._completeResults.errors=this._completeResults.errors.concat(s.errors),this._completeResults.meta=s.meta),this._completed||!c||!_(this._config.complete)||s&&s.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),c||s&&s.meta.paused||this._nextChunk(),s}this._halted=!0},this._sendError=function(e){_(this._config.error)?this._config.error(e):r&&this._config.error&&t.postMessage({workerId:o.WORKER_ID,error:e,finished:!1})}}function c(e){var t;(e=e||{}).chunkSize||(e.chunkSize=o.RemoteChunkSize),l.call(this,e),this._nextChunk=n?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),n||(t.onload=b(this._chunkLoaded,this),t.onerror=b(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!n),this._config.downloadRequestHeaders){var e=this._config.downloadRequestHeaders;for(var r in e)t.setRequestHeader(r,e[r])}if(this._config.chunkSize){var i=this._start+this._config.chunkSize-1;t.setRequestHeader("Range","bytes="+this._start+"-"+i)}try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}n&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){4===t.readyState&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:t.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(e){var t=e.getResponseHeader("Content-Range");return null===t?-1:parseInt(t.substring(t.lastIndexOf("/")+1))}(t),this.parseChunk(t.responseText)))},this._chunkError=function(e){var n=t.statusText||e;this._sendError(new Error(n))}}function u(e){var t,n;(e=e||{}).chunkSize||(e.chunkSize=o.LocalChunkSize),l.call(this,e);var r="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,n=e.slice||e.webkitSlice||e.mozSlice,r?((t=new FileReader).onload=b(this._chunkLoaded,this),t.onerror=b(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function d(e){var t;l.call(this,e=e||{}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e,n=this._config.chunkSize;return n?(e=t.substring(0,n),t=t.substring(n)):(e=t,t=""),this._finished=!t,this.parseChunk(e)}}}function h(e){l.call(this,e=e||{});var t=[],n=!0,r=!1;this.pause=function(){l.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){l.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){r&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):n=!0},this._streamData=b((function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),n&&(n=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}}),this),this._streamError=b((function(e){this._streamCleanUp(),this._sendError(e)}),this),this._streamEnd=b((function(){this._streamCleanUp(),r=!0,this._streamData("")}),this),this._streamCleanUp=b((function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)}),this)}function f(e){var t,n,r,i=Math.pow(2,53),a=-i,s=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,l=/^(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))$/,c=this,u=0,d=0,h=!1,f=!1,g=[],v={data:[],errors:[],meta:{}};if(_(e.step)){var y=e.step;e.step=function(t){if(v=t,A())w();else{if(w(),0===v.data.length)return;u+=t.data.length,e.preview&&u>e.preview?n.abort():(v.data=v.data[0],y(v,c))}}}function b(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function w(){return v&&r&&(M("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+o.DefaultDelimiter+"'"),r=!1),e.skipEmptyLines&&(v.data=v.data.filter((function(e){return!b(e)}))),A()&&function(){if(v)if(Array.isArray(v.data[0])){for(var t=0;A()&&t=g.length?"__parsed_extra":g[r]),e.transform&&(o=e.transform(o,a)),o=S(a,o),"__parsed_extra"===a?(i[a]=i[a]||[],i[a].push(o)):i[a]=o}return e.header&&(r>g.length?M("FieldMismatch","TooManyFields","Too many fields: expected "+g.length+" fields but parsed "+r,d+n):r=r.length/2?"\r\n":"\r"}(i,l)),r=!1,e.delimiter)_(e.delimiter)&&(e.delimiter=e.delimiter(i),v.meta.delimiter=e.delimiter);else{var c=function(t,n,r,i,a){var s,l,c,u;a=a||[",","\t","|",";",o.RECORD_SEP,o.UNIT_SEP];for(var d=0;d=s)return z(!0)}else for(C=u,u++;;){if(-1===(C=e.indexOf(t,C+1)))return h||b.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:x.length,index:u}),L();if(C===f-1)return L(e.substring(u,C).replace(E,t));if(t!==c||e[C+1]!==c){if(t===c||0===C||e[C-1]!==c){-1!==T&&T=s)return z(!0);break}b.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:x.length,index:u}),C++}}else C++}return L();function P(e){x.push(e),A=u}function O(t){var n=0;if(-1!==t){var r=e.substring(C+1,t);r&&""===r.trim()&&(n=r.length)}return n}function L(t){return h||(void 0===t&&(t=e.substring(u)),w.push(t),u=f,P(w),y&&N()),z()}function I(t){u=t,P(w),w=[],k=e.indexOf(r,u)}function z(e){return{data:x,errors:b,meta:{delimiter:n,linebreak:r,aborted:d,truncated:!!e,cursor:A+(o||0)}}}function N(){a(z()),x=[],b=[]}},this.abort=function(){d=!0},this.getCharIndex=function(){return u}}function g(e){var t=e.data,n=i[t.workerId],r=!1;if(t.error)n.userError(t.error,t.file);else if(t.results&&t.results.data){var a={abort:function(){r=!0,v(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:y,resume:y};if(_(n.userStep)){for(var o=0;o{!function(t,n){e.exports=n()}(self,(function(){return function(){var e={98847:function(e,t,n){"use strict";var r=n(71828),i={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg":"overflow:hidden;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(var a in i){var o=a.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");r.addStyleRule(o,i[a])}},98222:function(e,t,n){"use strict";e.exports=n(82887)},27206:function(e,t,n){"use strict";e.exports=n(60822)},59893:function(e,t,n){"use strict";e.exports=n(23381)},5224:function(e,t,n){"use strict";e.exports=n(83832)},59509:function(e,t,n){"use strict";e.exports=n(72201)},75557:function(e,t,n){"use strict";e.exports=n(91815)},40338:function(e,t,n){"use strict";e.exports=n(21462)},35080:function(e,t,n){"use strict";e.exports=n(51319)},61396:function(e,t,n){"use strict";e.exports=n(57516)},40549:function(e,t,n){"use strict";e.exports=n(98128)},49866:function(e,t,n){"use strict";e.exports=n(99442)},36089:function(e,t,n){"use strict";e.exports=n(93740)},19548:function(e,t,n){"use strict";e.exports=n(8729)},35831:function(e,t,n){"use strict";e.exports=n(93814)},61039:function(e,t,n){"use strict";e.exports=n(14382)},97040:function(e,t,n){"use strict";e.exports=n(51759)},77986:function(e,t,n){"use strict";e.exports=n(10421)},24296:function(e,t,n){"use strict";e.exports=n(43102)},58872:function(e,t,n){"use strict";e.exports=n(92165)},29626:function(e,t,n){"use strict";e.exports=n(3325)},65591:function(e,t,n){"use strict";e.exports=n(36071)},69738:function(e,t,n){"use strict";e.exports=n(43905)},92650:function(e,t,n){"use strict";e.exports=n(35902)},35630:function(e,t,n){"use strict";e.exports=n(69816)},73434:function(e,t,n){"use strict";e.exports=n(94507)},27909:function(e,t,n){"use strict";var r=n(19548);r.register([n(27206),n(5224),n(58872),n(65591),n(69738),n(92650),n(49866),n(25743),n(6197),n(97040),n(85461),n(73434),n(54201),n(81299),n(47645),n(35630),n(77986),n(83043),n(93005),n(96881),n(4534),n(50581),n(40549),n(77900),n(47582),n(35080),n(21641),n(17280),n(5861),n(29626),n(10021),n(65317),n(96268),n(61396),n(35831),n(16122),n(46163),n(40344),n(40338),n(48131),n(36089),n(55334),n(75557),n(19440),n(99488),n(59893),n(97393),n(98222),n(61039),n(24296),n(66398),n(59509)]),e.exports=r},46163:function(e,t,n){"use strict";e.exports=n(15154)},96881:function(e,t,n){"use strict";e.exports=n(64943)},50581:function(e,t,n){"use strict";e.exports=n(21164)},55334:function(e,t,n){"use strict";e.exports=n(54186)},65317:function(e,t,n){"use strict";e.exports=n(94873)},10021:function(e,t,n){"use strict";e.exports=n(67618)},54201:function(e,t,n){"use strict";e.exports=n(58810)},5861:function(e,t,n){"use strict";e.exports=n(20593)},16122:function(e,t,n){"use strict";e.exports=n(29396)},83043:function(e,t,n){"use strict";e.exports=n(13551)},48131:function(e,t,n){"use strict";e.exports=n(46858)},47582:function(e,t,n){"use strict";e.exports=n(17988)},21641:function(e,t,n){"use strict";e.exports=n(68868)},96268:function(e,t,n){"use strict";e.exports=n(20467)},19440:function(e,t,n){"use strict";e.exports=n(91271)},99488:function(e,t,n){"use strict";e.exports=n(21461)},97393:function(e,t,n){"use strict";e.exports=n(85956)},25743:function(e,t,n){"use strict";e.exports=n(52979)},66398:function(e,t,n){"use strict";e.exports=n(32275)},17280:function(e,t,n){"use strict";e.exports=n(6419)},77900:function(e,t,n){"use strict";e.exports=n(61510)},81299:function(e,t,n){"use strict";e.exports=n(87619)},93005:function(e,t,n){"use strict";e.exports=n(93601)},40344:function(e,t,n){"use strict";e.exports=n(96595)},47645:function(e,t,n){"use strict";e.exports=n(70954)},6197:function(e,t,n){"use strict";e.exports=n(47462)},4534:function(e,t,n){"use strict";e.exports=n(17659)},85461:function(e,t,n){"use strict";e.exports=n(19990)},82884:function(e){"use strict";e.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]},50215:function(e,t,n){"use strict";var r=n(82884),i=n(41940),a=n(85555),o=n(44467).templatedArray;n(24695);e.exports=o("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:i({editType:"calc+arraydraw",colorEditType:"arraydraw"}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},arrowcolor:{valType:"color",editType:"arraydraw"},arrowhead:{valType:"integer",min:0,max:r.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:r.length,dflt:1,editType:"arraydraw"},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw"},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw"},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},ax:{valType:"any",editType:"calc+arraydraw"},ay:{valType:"any",editType:"calc+arraydraw"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",a.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",a.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",a.idRegex.x.toString()],editType:"calc"},x:{valType:"any",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},yref:{valType:"enumerated",values:["paper",a.idRegex.y.toString()],editType:"calc"},y:{valType:"any",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw"},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw"},xclick:{valType:"any",editType:"arraydraw"},yclick:{valType:"any",editType:"arraydraw"},hovertext:{valType:"string",editType:"arraydraw"},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw"},bordercolor:{valType:"color",editType:"arraydraw"},font:i({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},3749:function(e,t,n){"use strict";var r=n(71828),i=n(89298),a=n(92605).draw;function o(e){var t=e._fullLayout;r.filterVisible(t.annotations).forEach((function(t){var n=i.getFromId(e,t.xref),r=i.getFromId(e,t.yref),a=i.getRefType(t.xref),o=i.getRefType(t.yref);t._extremes={},"range"===a&&s(t,n),"range"===o&&s(t,r)}))}function s(e,t){var n,r=t._id,a=r.charAt(0),o=e[a],s=e["a"+a],l=e[a+"ref"],c=e["a"+a+"ref"],u=e["_"+a+"padplus"],d=e["_"+a+"padminus"],h={x:1,y:-1}[a]*e[a+"shift"],f=3*e.arrowsize*e.arrowwidth||0,p=f+h,m=f-h,g=3*e.startarrowsize*e.arrowwidth||0,v=g+h,y=g-h;if(c===l){var x=i.findExtremes(t,[t.r2c(o)],{ppadplus:p,ppadminus:m}),b=i.findExtremes(t,[t.r2c(s)],{ppadplus:Math.max(u,v),ppadminus:Math.max(d,y)});n={min:[x.min[0],b.min[0]],max:[x.max[0],b.max[0]]}}else v=s?v+s:v,y=s?y-s:y,n=i.findExtremes(t,[t.r2c(o)],{ppadplus:Math.max(u,p,v),ppadminus:Math.max(d,m,y)});e._extremes[r]=n}e.exports=function(e){var t=e._fullLayout;if(r.filterVisible(t.annotations).length&&e._fullData.length)return r.syncOrAsync([a,o],e)}},44317:function(e,t,n){"use strict";var r=n(71828),i=n(73972),a=n(44467).arrayEditor;function o(e,t){var n,r,i,a,o,l,c,u=e._fullLayout.annotations,d=[],h=[],f=[],p=(t||[]).length;for(n=0;n0||n.explicitOff.length>0},onClick:function(e,t){var n,s,l=o(e,t),c=l.on,u=l.off.concat(l.explicitOff),d={},h=e._fullLayout.annotations;if(!c.length&&!u.length)return;for(n=0;n2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[t]}for(var Y=!1,$=["x","y"],X=0;X<$.length;X++){var Z,K,J,Q,ee,te=$[X],ne=t[te+"ref"]||te,re=t["a"+te+"ref"],ie={x:v,y:x}[te],ae=(R+("x"===te?0:-90))*Math.PI/180,oe=F*Math.cos(ae),se=H*Math.sin(ae),le=Math.abs(oe)+Math.abs(se),ce=t[te+"anchor"],ue=t[te+"shift"]*("x"===te?1:-1),de=D[te],he=l.getRefType(ne);if(ie&&"domain"!==he){var fe=ie.r2fraction(t[te]);(fe<0||fe>1)&&(re===ne?((fe=ie.r2fraction(t["a"+te]))<0||fe>1)&&(Y=!0):Y=!0),Z=ie._offset+ie.r2p(t[te]),Q=.5}else{var pe="domain"===he;"x"===te?(J=t[te],Z=pe?ie._offset+ie._length*J:Z=A.l+A.w*J):(J=1-t[te],Z=pe?ie._offset+ie._length*J:Z=A.t+A.h*J),Q=t.showarrow?.5:J}if(t.showarrow){de.head=Z;var me=t["a"+te];if(ee=oe*W(.5,t.xanchor)-se*W(.5,t.yanchor),re===ne){var ge=l.getRefType(re);"domain"===ge?("y"===te&&(me=1-me),de.tail=ie._offset+ie._length*me):"paper"===ge?"y"===te?(me=1-me,de.tail=A.t+A.h*me):de.tail=A.l+A.w*me:de.tail=ie._offset+ie.r2p(me),K=ee}else de.tail=Z+me,K=ee+me;de.text=de.tail+ee;var ve=w["x"===te?"width":"height"];if("paper"===ne&&(de.head=o.constrain(de.head,1,ve-1)),"pixel"===re){var ye=-Math.max(de.tail-3,de.text),xe=Math.min(de.tail+3,de.text)-ve;ye>0?(de.tail+=ye,de.text+=ye):xe>0&&(de.tail-=xe,de.text-=xe)}de.tail+=ue,de.head+=ue}else K=ee=le*W(Q,ce),de.text=Z+ee;de.text+=ue,ee+=ue,K+=ue,t["_"+te+"padplus"]=le/2+K,t["_"+te+"padminus"]=le/2-K,t["_"+te+"size"]=le,t["_"+te+"shift"]=ee}if(Y)z.remove();else{var be=0,_e=0;if("left"!==t.align&&(be=(M-b)*("center"===t.align?.5:1)),"top"!==t.valign&&(_e=(I-_)*("middle"===t.valign?.5:1)),d)r.select("svg").attr({x:B+be-1,y:B+_e}).call(u.setClipUrl,U?C:null,e);else{var we=B+_e-m.top,Ae=B+be-m.left;G.call(h.positionText,Ae,we).call(u.setClipUrl,U?C:null,e)}V.select("rect").call(u.setRect,B,B,M,I),j.call(u.setRect,N/2,N/2,F-N,H-N),z.call(u.setTranslate,Math.round(D.x.text-F/2),Math.round(D.y.text-H/2)),O.attr({transform:"rotate("+R+","+D.x.text+","+D.y.text+")"});var Se,Me=function(n,r){P.selectAll(".annotation-arrow-g").remove();var l=D.x.head,d=D.y.head,h=D.x.tail+n,f=D.y.tail+r,m=D.x.text+n,b=D.y.text+r,_=o.rotationXYMatrix(R,m,b),w=o.apply2DTransform(_),M=o.apply2DTransform2(_),C=+j.attr("width"),L=+j.attr("height"),I=m-.5*C,N=I+C,F=b-.5*L,B=F+L,U=[[I,F,I,B],[I,B,N,B],[N,B,N,F],[N,F,I,F]].map(M);if(!U.reduce((function(e,t){return e^!!o.segmentsIntersect(l,d,l+1e6,d+1e6,t[0],t[1],t[2],t[3])}),!1)){U.forEach((function(e){var t=o.segmentsIntersect(h,f,l,d,e[0],e[1],e[2],e[3]);t&&(h=t.x,f=t.y)}));var V=t.arrowwidth,H=t.arrowcolor,W=t.arrowside,G=P.append("g").style({opacity:c.opacity(H)}).classed("annotation-arrow-g",!0),q=G.append("path").attr("d","M"+h+","+f+"L"+l+","+d).style("stroke-width",V+"px").call(c.stroke,c.rgb(H));if(g(q,W,t),S.annotationPosition&&q.node().parentNode&&!a){var Y=l,$=d;if(t.standoff){var X=Math.sqrt(Math.pow(l-h,2)+Math.pow(d-f,2));Y+=t.standoff*(h-l)/X,$+=t.standoff*(f-d)/X}var Z,K,J=G.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(h-Y)+","+(f-$),transform:s(Y,$)}).style("stroke-width",V+6+"px").call(c.stroke,"rgba(0,0,0,0)").call(c.fill,"rgba(0,0,0,0)");p.init({element:J.node(),gd:e,prepFn:function(){var e=u.getTranslate(z);Z=e.x,K=e.y,v&&v.autorange&&T(v._name+".autorange",!0),x&&x.autorange&&T(x._name+".autorange",!0)},moveFn:function(e,n){var r=w(Z,K),i=r[0]+e,a=r[1]+n;z.call(u.setTranslate,i,a),k("x",y(v,e,"x",A,t)),k("y",y(x,n,"y",A,t)),t.axref===t.xref&&k("ax",y(v,e,"ax",A,t)),t.ayref===t.yref&&k("ay",y(x,n,"ay",A,t)),G.attr("transform",s(e,n)),O.attr({transform:"rotate("+R+","+i+","+a+")"})},doneFn:function(){i.call("_guiRelayout",e,E());var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}}};if(t.showarrow&&Me(0,0),L)p.init({element:z.node(),gd:e,prepFn:function(){Se=O.attr("transform")},moveFn:function(e,n){var r="pointer";if(t.showarrow)t.axref===t.xref?k("ax",y(v,e,"ax",A,t)):k("ax",t.ax+e),t.ayref===t.yref?k("ay",y(x,n,"ay",A.w,t)):k("ay",t.ay+n),Me(e,n);else{if(a)return;var i,o;if(v)i=y(v,e,"x",A,t);else{var l=t._xsize/A.w,c=t.x+(t._xshift-t.xshift)/A.w-l/2;i=p.align(c+e/A.w,l,0,1,t.xanchor)}if(x)o=y(x,n,"y",A,t);else{var u=t._ysize/A.h,d=t.y-(t._yshift+t.yshift)/A.h-u/2;o=p.align(d-n/A.h,u,0,1,t.yanchor)}k("x",i),k("y",o),v&&x||(r=p.getCursor(v?.5:i,x?.5:o,t.xanchor,t.yanchor))}O.attr({transform:s(e,n)+Se}),f(z,r)},clickFn:function(n,r){t.captureevents&&e.emit("plotly_clickannotation",q(r))},doneFn:function(){f(z),i.call("_guiRelayout",e,E());var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}}}e.exports={draw:function(e){var t=e._fullLayout;t._infolayer.selectAll(".annotation").remove();for(var n=0;n=0,x=t.indexOf("end")>=0,b=p.backoff*g+n.standoff,_=m.backoff*v+n.startstandoff;if("line"===f.nodeName){o={x:+e.attr("x1"),y:+e.attr("y1")},u={x:+e.attr("x2"),y:+e.attr("y2")};var w=o.x-u.x,A=o.y-u.y;if(h=(d=Math.atan2(A,w))+Math.PI,b&&_&&b+_>Math.sqrt(w*w+A*A))return void L();if(b){if(b*b>w*w+A*A)return void L();var S=b*Math.cos(d),M=b*Math.sin(d);u.x+=S,u.y+=M,e.attr({x2:u.x,y2:u.y})}if(_){if(_*_>w*w+A*A)return void L();var T=_*Math.cos(d),k=_*Math.sin(d);o.x-=T,o.y-=k,e.attr({x1:o.x,y1:o.y})}}else if("path"===f.nodeName){var E=f.getTotalLength(),C="";if(E1){c=!0;break}}c?e.fullLayout._infolayer.select(".annotation-"+e.id+'[data-index="'+s+'"]').remove():(l._pdata=i(e.glplot.cameraParams,[t.xaxis.r2l(l.x)*n[0],t.yaxis.r2l(l.y)*n[1],t.zaxis.r2l(l.z)*n[2]]),r(e.graphDiv,l,s,e.id,l._xa,l._ya))}}},2468:function(e,t,n){"use strict";var r=n(73972),i=n(71828);e.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:n(26997)}}},layoutAttributes:n(26997),handleDefaults:n(20226),includeBasePlot:function(e,t){var n=r.subplotsRegistry.gl3d;if(!n)return;for(var a=n.attrRegex,o=Object.keys(e),s=0;s=0))return e;if(3===o)r[o]>1&&(r[o]=1);else if(r[o]>=1)return e}var s=Math.round(255*r[0])+", "+Math.round(255*r[1])+", "+Math.round(255*r[2]);return a?"rgba("+s+", "+r[3]+")":"rgb("+s+")"}o.tinyRGB=function(e){var t=e.toRgb();return"rgb("+Math.round(t.r)+", "+Math.round(t.g)+", "+Math.round(t.b)+")"},o.rgb=function(e){return o.tinyRGB(r(e))},o.opacity=function(e){return e?r(e).getAlpha():0},o.addOpacity=function(e,t){var n=r(e).toRgb();return"rgba("+Math.round(n.r)+", "+Math.round(n.g)+", "+Math.round(n.b)+", "+t+")"},o.combine=function(e,t){var n=r(e).toRgb();if(1===n.a)return r(e).toRgbString();var i=r(t||c).toRgb(),a=1===i.a?i:{r:255*(1-i.a)+i.r*i.a,g:255*(1-i.a)+i.g*i.a,b:255*(1-i.a)+i.b*i.a},o={r:a.r*(1-n.a)+n.r*n.a,g:a.g*(1-n.a)+n.g*n.a,b:a.b*(1-n.a)+n.b*n.a};return r(o).toRgbString()},o.contrast=function(e,t,n){var i=r(e);return 1!==i.getAlpha()&&(i=r(o.combine(e,c))),(i.isDark()?t?i.lighten(t):c:n?i.darken(n):l).toString()},o.stroke=function(e,t){var n=r(t);e.style({stroke:o.tinyRGB(n),"stroke-opacity":n.getAlpha()})},o.fill=function(e,t){var n=r(t);e.style({fill:o.tinyRGB(n),"fill-opacity":n.getAlpha()})},o.clean=function(e){if(e&&"object"===typeof e){var t,n,r,i,s=Object.keys(e);for(t=0;t0?r>=l:r<=l));i++)r>u&&r0?r>=l:r<=l));i++)r>n[0]&&r1){var ce=Math.pow(10,Math.floor(Math.log(le)/Math.LN10));oe*=ce*c.roundUp(le/ce,[2,5,10]),(Math.abs(W.start)/W.size+1e-6)%1<2e-6&&(ie.tick0=0)}ie.dtick=oe}ie.domain=o?[ne+P/z.h,ne+K-P/z.h]:[ne+R/z.w,ne+K-R/z.w],ie.setScale(),e.attr("transform",u(Math.round(z.l),Math.round(z.t)));var ue,de=e.select("."+M.cbtitleunshift).attr("transform",u(-Math.round(z.l),-Math.round(z.t))),he=ie.ticklabelposition,fe=ie.title.font.size,pe=e.select("."+M.cbaxis),me=0,ge=0;function ve(r,i){var a={propContainer:ie,propName:t._propPrefix+"title",traceIndex:t._traceIndex,_meta:t._meta,placeholder:I._dfltTitle.colorbar,containerGroup:e.select("."+M.cbtitle)},o="h"===r.charAt(0)?r.substr(1):"h"+r;e.selectAll("."+o+",."+o+"-math-group").remove(),m.draw(n,r,d(a,i||{}))}function ye(){var e,t;(o&&ae||!o&&!ae)&&("top"===j&&(e=R+z.l+z.w*O,t=P+z.t+z.h*(1-ne-K)+3+.75*fe),"bottom"===j&&(e=R+z.l+z.w*O,t=P+z.t+z.h*(1-ne)-3-.25*fe),"right"===j&&(t=P+z.t+z.h*L+3+.75*fe,e=R+z.l+z.w*ne),ve(ie._id+"title",{attributes:{x:e,y:t,"text-anchor":o?"start":"middle"}}))}function xe(){if(o&&!ae||!o&&ae){var e,i,a=ie.position||0,s=ie._offset+ie._length/2;if("right"===j)i=s,e=z.l+z.w*a+10+fe*(ie.showticklabels?1:.5);else if(e=s,"bottom"===j&&(i=z.t+z.h*a+10+(-1===he.indexOf("inside")?ie.tickfont.size:0)+("intside"!==ie.ticks&&t.ticklen||0)),"top"===j){var l=B.text.split("
").length;i=z.t+z.h*a+10-$-w*fe*l}ve((o?"h":"v")+ie._id+"title",{avoid:{selection:r.select(n).selectAll("g."+ie._id+"tick"),side:j,offsetTop:o?0:z.t,offsetLeft:o?z.l:0,maxShift:o?I.width:I.height},attributes:{x:e,y:i,"text-anchor":"middle"},transform:{rotate:o?-90:0,offset:0}})}}function be(){if(!o&&!ae||o&&ae){var a,l=e.select("."+M.cbtitle),d=l.select("text"),h=[-T/2,T/2],p=l.select(".h"+ie._id+"title-math-group").node(),m=15.6;if(d.node()&&(m=parseInt(d.node().style.fontSize,10)*w),p?(a=f.bBox(p),ge=a.width,(me=a.height)>m&&(h[1]-=(me-m)/2)):d.node()&&!d.classed(M.jsPlaceholder)&&(a=f.bBox(d.node()),ge=a.width,me=a.height),o){if(me){if(me+=5,"top"===j)ie.domain[1]-=me/z.h,h[1]*=-1;else{ie.domain[0]+=me/z.h;var v=g.lineCount(d);h[1]+=(1-v)*m}l.attr("transform",u(h[0],h[1])),ie.setScale()}}else ge&&("right"===j&&(ie.domain[0]+=(ge+fe/2)/z.w),l.attr("transform",u(h[0],h[1])),ie.setScale())}e.selectAll("."+M.cbfills+",."+M.cblines).attr("transform",o?u(0,Math.round(z.h*(1-ie.domain[1]))):u(Math.round(z.w*ie.domain[0]),0)),pe.attr("transform",o?u(0,Math.round(-z.t)):u(Math.round(-z.l),0));var y=e.select("."+M.cbfills).selectAll("rect."+M.cbfill).attr("style","").data(q);y.enter().append("rect").classed(M.cbfill,!0).style("stroke","none"),y.exit().remove();var x=U.map(ie.c2p).map(Math.round).sort((function(e,t){return e-t}));y.each((function(e,a){var s=[0===a?U[0]:(q[a]+q[a-1])/2,a===q.length-1?U[1]:(q[a]+q[a+1])/2].map(ie.c2p).map(Math.round);o&&(s[1]=c.constrain(s[1]+(s[1]>s[0])?1:-1,x[0],x[1]));var l=r.select(this).attr(o?"x":"y",J).attr(o?"y":"x",r.min(s)).attr(o?"width":"height",Math.max($,2)).attr(o?"height":"width",Math.max(r.max(s)-r.min(s),2));if(t._fillgradient)f.gradient(l,n,t._id,o?"vertical":"horizontalreversed",t._fillgradient,"fill");else{var u=H(e).replace("e-","");l.attr("fill",i(u).toHexString())}}));var b=e.select("."+M.cblines).selectAll("path."+M.cbline).data(F.color&&F.width?Y:[]);b.enter().append("path").classed(M.cbline,!0),b.exit().remove(),b.each((function(e){var t=J,n=Math.round(ie.c2p(e))+F.width/2%1;r.select(this).attr("d","M"+(o?t+","+n:n+","+t)+(o?"h":"v")+$).call(f.lineGroupStyle,F.width,V(e),F.dash)})),pe.selectAll("g."+ie._id+"tick,path").remove();var _=J+$+(T||0)/2-("outside"===t.ticks?1:0),A=s.calcTicks(ie),S=s.getTickSigns(ie)[2];return s.drawTicks(n,ie,{vals:"inside"===ie.ticks?s.clipEnds(ie,A):A,layer:pe,path:s.makeTickPath(ie,_,S),transFn:s.makeTransTickFn(ie)}),s.drawLabels(n,ie,{vals:A,layer:pe,transFn:s.makeTransTickLabelFn(ie),labelFns:s.makeLabelFns(ie,_)})}function _e(){var r,s=$+T/2;-1===he.indexOf("inside")&&(r=f.bBox(pe.node()),s+=o?r.width:r.height),ue=de.select("text");var c=0,d=o&&"top"===j,m=!o&&"right"===j,g=0;if(ue.node()&&!ue.classed(M.jsPlaceholder)){var y,x=de.select(".h"+ie._id+"title-math-group").node();x&&(o&&ae||!o&&!ae)?(c=(r=f.bBox(x)).width,y=r.height):(c=(r=f.bBox(de.node())).right-z.l-(o?J:re),y=r.bottom-z.t-(o?re:J),o||"top"!==j||(s+=r.height,g=r.height)),m&&(ue.attr("transform",u(c/2+fe/2,0)),c*=2),s=Math.max(s,o?c:y)}var b=2*(o?R:P)+s+k+T/2,w=0;!o&&B.text&&"bottom"===D&&L<=0&&(b+=w=b/2,g+=w),I._hColorbarMoveTitle=w,I._hColorbarMoveCBTitle=g;var N=k+T;e.select("."+M.cbbg).attr("x",(o?J:re)-N/2-(o?R:0)).attr("y",(o?re:J)-(o?Z:P+g-w)).attr(o?"width":"height",Math.max(b-w,2)).attr(o?"height":"width",Math.max(Z+N,2)).call(p.fill,E).call(p.stroke,t.bordercolor).style("stroke-width",k);var F=m?Math.max(c-10,0):0;if(e.selectAll("."+M.cboutline).attr("x",(o?J:re+R)+F).attr("y",(o?re+P-Z:J)+(d?me:0)).attr(o?"width":"height",Math.max($,2)).attr(o?"height":"width",Math.max(Z-(o?2*P+me:2*R+F),2)).call(p.stroke,t.outlinecolor).style({fill:"none","stroke-width":T}),e.attr("transform",u(z.l-(o?Q*b:0),z.t-(o?0:(1-ee)*b-g))),!o&&(k||i(E).getAlpha()&&!i.equals(I.paper_bgcolor,E))){var U=pe.selectAll("text"),V=U[0].length,H=e.select("."+M.cbbg).node(),W=f.bBox(H),G=f.getTranslate(e),q=2;U.each((function(e,t){var n=0,r=V-1;if(t===n||t===r){var i,a=f.bBox(this),o=f.getTranslate(this);if(t===r){var s=a.right+o.x;(i=W.right+G.x+re-k-q+O-s)>0&&(i=0)}else if(t===n){var l=a.left+o.x;(i=W.left+G.x+re+k+q-l)<0&&(i=0)}i&&(V<3?this.setAttribute("transform","translate("+i+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}}))}var Y={},X=A[C],K=S[C],te=A[D],ne=S[D],oe=b-$;o?("pixels"===h?(Y.y=L,Y.t=Z*te,Y.b=Z*ne):(Y.t=Y.b=0,Y.yt=L+l*te,Y.yb=L-l*ne),"pixels"===_?(Y.x=O,Y.l=b*X,Y.r=b*K):(Y.l=oe*X,Y.r=oe*K,Y.xl=O-v*X,Y.xr=O+v*K)):("pixels"===h?(Y.x=O,Y.l=Z*X,Y.r=Z*K):(Y.l=Y.r=0,Y.xl=O+l*X,Y.xr=O-l*K),"pixels"===_?(Y.y=1-L,Y.t=b*te,Y.b=b*ne):(Y.t=oe*te,Y.b=oe*ne,Y.yt=L-v*te,Y.yb=L+v*ne)),a.autoMargin(n,t._id,Y)}return c.syncOrAsync([a.previousPromises,ye,be,xe,a.previousPromises,_e],n)}(n,t,e);v&&v.then&&(e._promises||[]).push(v),e._context.edits.colorbarPosition&&function(e,t,n){var r,i,a,s="v"===t.orientation,c=n._fullLayout,d=c._size;l.init({element:e.node(),gd:n,prepFn:function(){r=e.attr("transform"),h(e)},moveFn:function(n,o){e.attr("transform",r+u(n,o)),i=l.align((s?t._uFrac:t._vFrac)+n/d.w,s?t._thickFrac:t._lenFrac,0,1,t.xanchor),a=l.align((s?t._vFrac:1-t._uFrac)-o/d.h,s?t._lenFrac:t._thickFrac,0,1,t.yanchor);var c=l.getCursor(i,a,t.xanchor,t.yanchor);h(e,c)},doneFn:function(){if(h(e),void 0!==i&&void 0!==a){var r={};r[t._propPrefix+"x"]=i,r[t._propPrefix+"y"]=a,void 0!==t._traceIndex?o.call("_guiRestyle",n,r,t._traceIndex):o.call("_guiRelayout",n,r)}}})}(n,t,e)})),t.exit().each((function(t){a.autoMargin(e,t._id)})).remove(),t.order()}}},76228:function(e,t,n){"use strict";var r=n(71828);e.exports=function(e){return r.isPlainObject(e.colorbar)}},12311:function(e,t,n){"use strict";e.exports={moduleType:"component",name:"colorbar",attributes:n(63583),supplyDefaults:n(62499),draw:n(98981).draw,hasColorbar:n(76228)}},50693:function(e,t,n){"use strict";var r=n(63583),i=n(30587).counter,a=n(78607),o=n(63282).scales;a(o);function s(e){return"`"+e+"`"}e.exports=function(e,t){e=e||"";var n,a=(t=t||{}).cLetter||"c",l=("onlyIfNumerical"in t?t.onlyIfNumerical:Boolean(e),"noScale"in t?t.noScale:"marker.line"===e),c="showScaleDflt"in t?t.showScaleDflt:"z"===a,u="string"===typeof t.colorscaleDflt?o[t.colorscaleDflt]:null,d=t.editTypeOverride||"",h=e?e+".":"";"colorAttr"in t?(n=t.colorAttr,t.colorAttr):s(h+(n={z:"z",c:"color"}[a]));var f=a+"auto",p=a+"min",m=a+"max",g=a+"mid",v=(s(h+f),s(h+p),s(h+m),{});v[p]=v[m]=void 0;var y={};y[f]=!1;var x={};return"color"===n&&(x.color={valType:"color",arrayOk:!0,editType:d||"style"},t.anim&&(x.color.anim=!0)),x[f]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:v},x[p]={valType:"number",dflt:null,editType:d||"plot",impliedEdits:y},x[m]={valType:"number",dflt:null,editType:d||"plot",impliedEdits:y},x[g]={valType:"number",dflt:null,editType:"calc",impliedEdits:v},x.colorscale={valType:"colorscale",editType:"calc",dflt:u,impliedEdits:{autocolorscale:!1}},x.autocolorscale={valType:"boolean",dflt:!1!==t.autoColorDflt,editType:"calc",impliedEdits:{colorscale:void 0}},x.reversescale={valType:"boolean",dflt:!1,editType:"plot"},l||(x.showscale={valType:"boolean",dflt:c,editType:"calc"},x.colorbar=r),t.noColorAxis||(x.coloraxis={valType:"subplotid",regex:i("coloraxis"),dflt:null,editType:"calc"}),x}},78803:function(e,t,n){"use strict";var r=n(92770),i=n(71828),a=n(52075).extractOpts;e.exports=function(e,t,n){var o,s=e._fullLayout,l=n.vals,c=n.containerStr,u=c?i.nestedProperty(t,c).get():t,d=a(u),h=!1!==d.auto,f=d.min,p=d.max,m=d.mid,g=function(){return i.aggNums(Math.min,null,l)},v=function(){return i.aggNums(Math.max,null,l)};(void 0===f?f=g():h&&(f=u._colorAx&&r(f)?Math.min(f,g()):g()),void 0===p?p=v():h&&(p=u._colorAx&&r(p)?Math.max(p,v()):v()),h&&void 0!==m&&(p-m>m-f?f=m-(p-m):p-m=0?s.colorscale.sequential:s.colorscale.sequentialminus,d._sync("colorscale",o))}},33046:function(e,t,n){"use strict";var r=n(71828),i=n(52075).hasColorscale,a=n(52075).extractOpts;e.exports=function(e,t){function n(e,t){var n=e["_"+t];void 0!==n&&(e[t]=n)}function o(e,i){var o=i.container?r.nestedProperty(e,i.container).get():e;if(o)if(o.coloraxis)o._colorAx=t[o.coloraxis];else{var s=a(o),l=s.auto;(l||void 0===s.min)&&n(o,i.min),(l||void 0===s.max)&&n(o,i.max),s.autocolorscale&&n(o,"colorscale")}}for(var s=0;s=0;r--,i++){var a=e[r];n[i]=[1-a[0],a[1]]}return n}function p(e,t){t=t||{};for(var n=e.domain,o=e.range,l=o.length,c=new Array(l),u=0;u4/3-s?o:s}},70461:function(e,t,n){"use strict";var r=n(71828),i=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];e.exports=function(e,t,n,a){return e="left"===n?0:"center"===n?1:"right"===n?2:r.constrain(Math.floor(3*e),0,2),t="bottom"===a?0:"middle"===a?1:"top"===a?2:r.constrain(Math.floor(3*t),0,2),i[t][e]}},64505:function(e,t){"use strict";t.selectMode=function(e){return"lasso"===e||"select"===e},t.drawMode=function(e){return"drawclosedpath"===e||"drawopenpath"===e||"drawline"===e||"drawrect"===e||"drawcircle"===e},t.openMode=function(e){return"drawline"===e||"drawopenpath"===e},t.rectMode=function(e){return"select"===e||"drawline"===e||"drawrect"===e||"drawcircle"===e},t.freeMode=function(e){return"lasso"===e||"drawclosedpath"===e||"drawopenpath"===e},t.selectingOrDrawing=function(e){return t.freeMode(e)||t.rectMode(e)}},28569:function(e,t,n){"use strict";var r=n(48956),i=n(57035),a=n(38520),o=n(71828).removeElement,s=n(85555),l=e.exports={};l.align=n(92807),l.getCursor=n(70461);var c=n(26041);function u(){var e=document.createElement("div");e.className="dragcover";var t=e.style;return t.position="fixed",t.left=0,t.right=0,t.top=0,t.bottom=0,t.zIndex=999999999,t.background="none",document.body.appendChild(e),e}function d(e){return r(e.changedTouches?e.changedTouches[0]:e,document.body)}l.unhover=c.wrapped,l.unhoverRaw=c.raw,l.init=function(e){var t,n,r,c,h,f,p,m,g=e.gd,v=1,y=g._context.doubleClickDelay,x=e.element;g._mouseDownTime||(g._mouseDownTime=0),x.style.pointerEvents="all",x.onmousedown=_,a?(x._ontouchstart&&x.removeEventListener("touchstart",x._ontouchstart),x._ontouchstart=_,x.addEventListener("touchstart",_,{passive:!1})):x.ontouchstart=_;var b=e.clampFn||function(e,t,n){return Math.abs(e)y&&(v=Math.max(v-1,1)),g._dragged)e.doneFn&&e.doneFn();else if(e.clickFn&&e.clickFn(v,f),!m){var n;try{n=new MouseEvent("click",t)}catch(a){var r=d(t);(n=document.createEvent("MouseEvents")).initMouseEvent("click",t.bubbles,t.cancelable,t.view,t.detail,t.screenX,t.screenY,r[0],r[1],t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,t.button,t.relatedTarget)}p.dispatchEvent(n)}g._dragging=!1,g._dragged=!1}else g._dragged=!1}},l.coverSlip=u},26041:function(e,t,n){"use strict";var r=n(11086),i=n(79990),a=n(24401).getGraphDiv,o=n(26675),s=e.exports={};s.wrapped=function(e,t,n){(e=a(e))._fullLayout&&i.clear(e._fullLayout._uid+o.HOVERID),s.raw(e,t,n)},s.raw=function(e,t){var n=e._fullLayout,i=e._hoverdata;t||(t={}),t.target&&!e._dragged&&!1===r.triggerHandler(e,"plotly_beforehover",t)||(n._hoverlayer.selectAll("g").remove(),n._hoverlayer.selectAll("line").remove(),n._hoverlayer.selectAll("circle").remove(),e._hoverdata=void 0,t.target&&i&&e.emit("plotly_unhover",{event:t,points:i}))}},79952:function(e,t){"use strict";t.P={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},t.u={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}},91424:function(e,t,n){"use strict";var r=n(39898),i=n(71828),a=i.numberFormat,o=n(92770),s=n(84267),l=n(73972),c=n(7901),u=n(21081),d=i.strTranslate,h=n(63893),f=n(77922),p=n(18783).LINE_SPACING,m=n(37822).DESELECTDIM,g=n(34098),v=n(39984),y=n(23469).appendArrayPointValue,x=e.exports={};function b(e,t,n){var r=t.fillpattern,i=r&&x.getPatternAttr(r.shape,0,"");if(i){var a=x.getPatternAttr(r.bgcolor,0,null),o=x.getPatternAttr(r.fgcolor,0,null),s=r.fgopacity,l=x.getPatternAttr(r.size,0,8),u=x.getPatternAttr(r.solidity,0,.3),d=t.uid;x.pattern(e,"point",n,d,i,l,u,void 0,r.fillmode,a,o,s)}else t.fillcolor&&e.call(c.fill,t.fillcolor)}x.font=function(e,t,n,r){i.isPlainObject(t)&&(r=t.color,n=t.size,t=t.family),t&&e.style("font-family",t),n+1&&e.style("font-size",n+"px"),r&&e.call(c.fill,r)},x.setPosition=function(e,t,n){e.attr("x",t).attr("y",n)},x.setSize=function(e,t,n){e.attr("width",t).attr("height",n)},x.setRect=function(e,t,n,r,i){e.call(x.setPosition,t,n).call(x.setSize,r,i)},x.translatePoint=function(e,t,n,r){var i=n.c2p(e.x),a=r.c2p(e.y);return!!(o(i)&&o(a)&&t.node())&&("text"===t.node().nodeName?t.attr("x",i).attr("y",a):t.attr("transform",d(i,a)),!0)},x.translatePoints=function(e,t,n){e.each((function(e){var i=r.select(this);x.translatePoint(e,i,t,n)}))},x.hideOutsideRangePoint=function(e,t,n,r,i,a){t.attr("display",n.isPtWithinRange(e,i)&&r.isPtWithinRange(e,a)?null:"none")},x.hideOutsideRangePoints=function(e,t){if(t._hasClipOnAxisFalse){var n=t.xaxis,i=t.yaxis;e.each((function(t){var a=t[0].trace,o=a.xcalendar,s=a.ycalendar,c=l.traceIs(a,"bar-like")?".bartext":".point,.textpoint";e.selectAll(c).each((function(e){x.hideOutsideRangePoint(e,r.select(this),n,i,o,s)}))}))}},x.crispRound=function(e,t,n){return t&&o(t)?e._context.staticPlot?t:t<1?1:Math.round(t):n||0},x.singleLineStyle=function(e,t,n,r,i){t.style("fill","none");var a=(((e||[])[0]||{}).trace||{}).line||{},o=n||a.width||0,s=i||a.dash||"";c.stroke(t,r||a.color),x.dashLine(t,s,o)},x.lineGroupStyle=function(e,t,n,i){e.style("fill","none").each((function(e){var a=(((e||[])[0]||{}).trace||{}).line||{},o=t||a.width||0,s=i||a.dash||"";r.select(this).call(c.stroke,n||a.color).call(x.dashLine,s,o)}))},x.dashLine=function(e,t,n){n=+n||0,t=x.dashStyle(t,n),e.style({"stroke-dasharray":t,"stroke-width":n+"px"})},x.dashStyle=function(e,t){t=+t||1;var n=Math.max(t,3);return"solid"===e?e="":"dot"===e?e=n+"px,"+n+"px":"dash"===e?e=3*n+"px,"+3*n+"px":"longdash"===e?e=5*n+"px,"+5*n+"px":"dashdot"===e?e=3*n+"px,"+n+"px,"+n+"px,"+n+"px":"longdashdot"===e&&(e=5*n+"px,"+2*n+"px,"+n+"px,"+2*n+"px"),e},x.singleFillStyle=function(e,t){var n=r.select(e.node());b(e,((n.data()[0]||[])[0]||{}).trace||{},t)},x.fillGroupStyle=function(e,t){e.style("stroke-width",0).each((function(e){var n=r.select(this);e[0].trace&&b(n,e[0].trace,t)}))};var _=n(90998);x.symbolNames=[],x.symbolFuncs=[],x.symbolBackOffs=[],x.symbolNeedLines={},x.symbolNoDot={},x.symbolNoFill={},x.symbolList=[],Object.keys(_).forEach((function(e){var t=_[e],n=t.n;x.symbolList.push(n,String(n),e,n+100,String(n+100),e+"-open"),x.symbolNames[n]=e,x.symbolFuncs[n]=t.f,x.symbolBackOffs[n]=t.backoff||0,t.needLine&&(x.symbolNeedLines[n]=!0),t.noDot?x.symbolNoDot[n]=!0:x.symbolList.push(n+200,String(n+200),e+"-dot",n+300,String(n+300),e+"-open-dot"),t.noFill&&(x.symbolNoFill[n]=!0)}));var w=x.symbolNames.length;function A(e,t,n,r){var i=e%100;return x.symbolFuncs[i](t,n,r)+(e>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}x.symbolNumber=function(e){if(o(e))e=+e;else if("string"===typeof e){var t=0;e.indexOf("-open")>0&&(t=100,e=e.replace("-open","")),e.indexOf("-dot")>0&&(t+=200,e=e.replace("-dot","")),(e=x.symbolNames.indexOf(e))>=0&&(e+=t)}return e%100>=w||e>=400?0:Math.floor(Math.max(e,0))};var S={x1:1,x2:0,y1:0,y2:0},M={x1:0,x2:0,y1:1,y2:0},T=a("~f"),k={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:S},horizontalreversed:{node:"linearGradient",attrs:S,reversed:!0},vertical:{node:"linearGradient",attrs:M},verticalreversed:{node:"linearGradient",attrs:M,reversed:!0}};x.gradient=function(e,t,n,a,o,l){for(var u=o.length,d=k[a],h=new Array(u),f=0;f=100;var d=ne(e,n),h=G(e,n);t.attr("d",A(u,l,d,h))}var f,p,m,g=!1;if(e.so)m=s.outlierwidth,p=s.outliercolor,f=o.outliercolor;else{var v=(s||{}).width;m=(e.mlw+1||v+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,p="mlc"in e?e.mlcc=r.lineScale(e.mlc):i.isArrayOrTypedArray(s.color)?c.defaultLine:s.color,i.isArrayOrTypedArray(o.color)&&(f=c.defaultLine,g=!0),f="mc"in e?e.mcc=r.markerScale(e.mc):o.color||"rgba(0,0,0,0)",r.selectedColorFn&&(f=r.selectedColorFn(e))}if(e.om)t.call(c.stroke,f).style({"stroke-width":(m||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:m)+"px");var y=o.gradient,b=e.mgt;b?g=!0:b=y&&y.type,i.isArrayOrTypedArray(b)&&(b=b[0],k[b]||(b=0));var _=o.pattern,w=_&&x.getPatternAttr(_.shape,e.i,"");if(b&&"none"!==b){var S=e.mgc;S?g=!0:S=y.color;var M=n.uid;g&&(M+="-"+e.i),x.gradient(t,a,M,b,[[0,S],[1,f]],"fill")}else if(w){var T=x.getPatternAttr(_.bgcolor,e.i,null),E=x.getPatternAttr(_.fgcolor,e.i,null),C=_.fgopacity,D=x.getPatternAttr(_.size,e.i,8),R=x.getPatternAttr(_.solidity,e.i,.3),P=e.mcc||i.isArrayOrTypedArray(_.shape)||i.isArrayOrTypedArray(_.bgcolor)||i.isArrayOrTypedArray(_.size)||i.isArrayOrTypedArray(_.solidity),O=n.uid;P&&(O+="-"+e.i),x.pattern(t,"point",a,O,w,D,R,e.mcc,_.fillmode,T,E,C)}else c.fill(t,f);m&&c.stroke(t,p)}},x.makePointStyleFns=function(e){var t={},n=e.marker;return t.markerScale=x.tryColorscale(n,""),t.lineScale=x.tryColorscale(n,"line"),l.traceIs(e,"symbols")&&(t.ms2mrc=g.isBubble(e)?v(e):function(){return(n.size||6)/2}),e.selectedpoints&&i.extendFlat(t,x.makeSelectedPointStyleFns(e)),t},x.makeSelectedPointStyleFns=function(e){var t={},n=e.selected||{},r=e.unselected||{},a=e.marker||{},o=n.marker||{},s=r.marker||{},c=a.opacity,u=o.opacity,d=s.opacity,h=void 0!==u,f=void 0!==d;(i.isArrayOrTypedArray(c)||h||f)&&(t.selectedOpacityFn=function(e){var t=void 0===e.mo?a.opacity:e.mo;return e.selected?h?u:t:f?d:m*t});var p=a.color,g=o.color,v=s.color;(g||v)&&(t.selectedColorFn=function(e){var t=e.mcc||p;return e.selected?g||t:v||t});var y=a.size,x=o.size,b=s.size,_=void 0!==x,w=void 0!==b;return l.traceIs(e,"symbols")&&(_||w)&&(t.selectedSizeFn=function(e){var t=e.mrc||y/2;return e.selected?_?x/2:t:w?b/2:t}),t},x.makeSelectedTextStyleFns=function(e){var t={},n=e.selected||{},r=e.unselected||{},i=e.textfont||{},a=n.textfont||{},o=r.textfont||{},s=i.color,l=a.color,u=o.color;return t.selectedTextColorFn=function(e){var t=e.tc||s;return e.selected?l||t:u||(l?t:c.addOpacity(t,m))},t},x.selectedPointStyle=function(e,t){if(e.size()&&t.selectedpoints){var n=x.makeSelectedPointStyleFns(t),i=t.marker||{},a=[];n.selectedOpacityFn&&a.push((function(e,t){e.style("opacity",n.selectedOpacityFn(t))})),n.selectedColorFn&&a.push((function(e,t){c.fill(e,n.selectedColorFn(t))})),n.selectedSizeFn&&a.push((function(e,r){var a=r.mx||i.symbol||0,o=n.selectedSizeFn(r);e.attr("d",A(x.symbolNumber(a),o,ne(r,t),G(r,t))),r.mrc2=o})),a.length&&e.each((function(e){for(var t=r.select(this),n=0;n0?n:0}x.textPointStyle=function(e,t,n){if(e.size()){var a;if(t.selectedpoints){var o=x.makeSelectedTextStyleFns(t);a=o.selectedTextColorFn}var s=t.texttemplate,l=n._fullLayout;e.each((function(e){var o=r.select(this),c=s?i.extractOption(e,t,"txt","texttemplate"):i.extractOption(e,t,"tx","text");if(c||0===c){if(s){var u=t._module.formatLabels,d=u?u(e,t,l):{},f={};y(f,t,e.i);var p=t._meta||{};c=i.texttemplateString(c,d,l._d3locale,f,e,p)}var m=e.tp||t.textposition,g=D(e,t),v=a?a(e):e.tc||t.textfont.color;o.call(x.font,e.tf||t.textfont.family,g,v).text(c).call(h.convertToTspans,n).call(C,m,g,e.mrc)}else o.remove()}))}},x.selectedTextStyle=function(e,t){if(e.size()&&t.selectedpoints){var n=x.makeSelectedTextStyleFns(t);e.each((function(e){var i=r.select(this),a=n.selectedTextColorFn(e),o=e.tp||t.textposition,s=D(e,t);c.fill(i,a);var u=l.traceIs(t,"bar-like");C(i,o,s,e.mrc2||e.mrc,u)}))}};var R,P;function O(e,t,n){return n&&(e=B(e)),t?I(e[1]):L(e[0])}function L(e){var t=r.round(e,2);return R=t,t}function I(e){var t=r.round(e,2);return P=t,t}function z(e,t,n,r){var i=e[0]-t[0],a=e[1]-t[1],o=n[0]-t[0],s=n[1]-t[1],l=Math.pow(i*i+a*a,.25),c=Math.pow(o*o+s*s,.25),u=(c*c*i-l*l*o)*r,d=(c*c*a-l*l*s)*r,h=3*c*(l+c),f=3*l*(l+c);return[[L(t[0]+(h&&u/h)),I(t[1]+(h&&d/h))],[L(t[0]-(f&&u/f)),I(t[1]-(f&&d/f))]]}x.smoothopen=function(e,t){if(e.length<3)return"M"+e.join("L");var n,r="M"+e[0],i=[];for(n=1;n=c||w>=d&&w<=c)&&(A<=h&&A>=u||A>=h&&A<=u)&&(e=[w,A])}return e}x.steps=function(e){var t=N[e]||F;return function(e){for(var n="M"+L(e[0][0])+","+I(e[0][1]),r=e.length,i=1;i=1e4&&(x.savedBBoxes={},j=0),n&&(x.savedBBoxes[n]=g),j++,i.extendFlat({},g)},x.setClipUrl=function(e,t,n){e.attr("clip-path",V(t,n))},x.getTranslate=function(e){var t=(e[e.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,(function(e,t,n){return[t,n].join(" ")})).split(" ");return{x:+t[0]||0,y:+t[1]||0}},x.setTranslate=function(e,t,n){var r=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",a=e[r]("transform")||"";return t=t||0,n=n||0,a=a.replace(/(\btranslate\(.*?\);?)/,"").trim(),a=(a+=d(t,n)).trim(),e[i]("transform",a),a},x.getScale=function(e){var t=(e[e.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,(function(e,t,n){return[t,n].join(" ")})).split(" ");return{x:+t[0]||1,y:+t[1]||1}},x.setScale=function(e,t,n){var r=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",a=e[r]("transform")||"";return t=t||1,n=n||1,a=a.replace(/(\bscale\(.*?\);?)/,"").trim(),a=(a+="scale("+t+","+n+")").trim(),e[i]("transform",a),a};var H=/\s*sc.*/;x.setPointGroupScale=function(e,t,n){if(t=t||1,n=n||1,e){var r=1===t&&1===n?"":"scale("+t+","+n+")";e.each((function(){var e=(this.getAttribute("transform")||"").replace(H,"");e=(e+=r).trim(),this.setAttribute("transform",e)}))}};var W=/translate\([^)]*\)\s*$/;function G(e,t){var n;return e&&(n=e.mf),void 0===n&&(n=t.marker&&t.marker.standoff||0),t._geo||t._xA?n:-n}x.setTextPointsScale=function(e,t,n){e&&e.each((function(){var e,i=r.select(this),a=i.select("text");if(a.node()){var o=parseFloat(a.attr("x")||0),s=parseFloat(a.attr("y")||0),l=(i.attr("transform")||"").match(W);e=1===t&&1===n?[]:[d(o,s),"scale("+t+","+n+")",d(-o,-s)],l&&e.push(l),i.attr("transform",e.join(""))}}))},x.getMarkerStandoff=G;var q,Y,$,X,Z,K,J=Math.atan2,Q=Math.cos,ee=Math.sin;function te(e,t){var n=t[0],r=t[1];return[n*Q(e)-r*ee(e),n*ee(e)+r*Q(e)]}function ne(e,t){var n,r,i=e.ma;void 0===i&&(i=t.marker.angle||0);var a=t.marker.angleref;if("previous"===a||"north"===a){if(t._geo){var s=t._geo.project(e.lonlat);n=s[0],r=s[1]}else{var l=t._xA,c=t._yA;if(!l||!c)return 90;n=l.c2p(e.x),r=c.c2p(e.y)}if(t._geo){var u,d=e.lonlat[0],h=e.lonlat[1],f=t._geo.project([d,h+1e-5]),p=t._geo.project([d+1e-5,h]),m=J(p[1]-r,p[0]-n),g=J(f[1]-r,f[0]-n);if("north"===a)u=i/180*Math.PI;else if("previous"===a){var v=d/180*Math.PI,y=h/180*Math.PI,x=q/180*Math.PI,b=Y/180*Math.PI,_=x-v,w=Q(b)*ee(_),A=ee(b)*Q(y)-Q(b)*ee(y)*Q(_);u=-J(w,A)-Math.PI,q=d,Y=h}var S=te(m,[Q(u),0]),M=te(g,[ee(u),0]);i=J(S[1]+M[1],S[0]+M[0])/Math.PI*180,"previous"!==a||K===t.uid&&e.i===Z+1||(i=null)}if("previous"===a&&!t._geo)if(K===t.uid&&e.i===Z+1&&o(n)&&o(r)){var T=n-$,k=r-X,E=t.line&&t.line.shape||"",C=E.slice(E.length-1);"h"===C&&(k=0),"v"===C&&(T=0),i+=J(k,T)/Math.PI*180+90}else i=null}return $=n,X=r,Z=e.i,K=t.uid,i}x.getMarkerAngle=ne},90998:function(e,t,n){"use strict";var r,i,a,o,s=n(95616),l=n(39898).round,c="M0,0Z",u=Math.sqrt(2),d=Math.sqrt(3),h=Math.PI,f=Math.cos,p=Math.sin;function m(e){return null===e}function g(e,t,n){if((!e||e%360===0)&&!t)return n;if(a===e&&o===t&&r===n)return i;function l(e,n){var r=f(e),i=p(e),a=n[0],o=n[1]+(t||0);return[a*r-o*i,a*i+o*r]}a=e,o=t,r=n;for(var c=e/180*h,u=0,d=0,m=s(n),g="",v=0;v0,d=e._context.staticPlot;t.each((function(t){var h,f=t[0].trace,p=f.error_x||{},m=f.error_y||{};f.ids&&(h=function(e){return e.id});var g=o.hasMarkers(f)&&f.marker.maxdisplayed>0;m.visible||p.visible||(t=[]);var v=r.select(this).selectAll("g.errorbar").data(t,h);if(v.exit().remove(),t.length){p.visible||v.selectAll("path.xerror").remove(),m.visible||v.selectAll("path.yerror").remove(),v.style("opacity",1);var y=v.enter().append("g").classed("errorbar",!0);u&&y.style("opacity",0).transition().duration(s.duration).style("opacity",1),a.setClipUrl(v,n.layerClipId,e),v.each((function(e){var t=r.select(this),n=function(e,t,n){var r={x:t.c2p(e.x),y:n.c2p(e.y)};void 0!==e.yh&&(r.yh=n.c2p(e.yh),r.ys=n.c2p(e.ys),i(r.ys)||(r.noYS=!0,r.ys=n.c2p(e.ys,!0)));void 0!==e.xh&&(r.xh=t.c2p(e.xh),r.xs=t.c2p(e.xs),i(r.xs)||(r.noXS=!0,r.xs=t.c2p(e.xs,!0)));return r}(e,l,c);if(!g||e.vis){var a,o=t.select("path.yerror");if(m.visible&&i(n.x)&&i(n.yh)&&i(n.ys)){var h=m.width;a="M"+(n.x-h)+","+n.yh+"h"+2*h+"m-"+h+",0V"+n.ys,n.noYS||(a+="m-"+h+",0h"+2*h),!o.size()?o=t.append("path").style("vector-effect",d?"none":"non-scaling-stroke").classed("yerror",!0):u&&(o=o.transition().duration(s.duration).ease(s.easing)),o.attr("d",a)}else o.remove();var f=t.select("path.xerror");if(p.visible&&i(n.y)&&i(n.xh)&&i(n.xs)){var v=(p.copy_ystyle?m:p).width;a="M"+n.xh+","+(n.y-v)+"v"+2*v+"m0,-"+v+"H"+n.xs,n.noXS||(a+="m0,-"+v+"v"+2*v),!f.size()?f=t.append("path").style("vector-effect",d?"none":"non-scaling-stroke").classed("xerror",!0):u&&(f=f.transition().duration(s.duration).ease(s.easing)),f.attr("d",a)}else f.remove()}}))}}))}},62662:function(e,t,n){"use strict";var r=n(39898),i=n(7901);e.exports=function(e){e.each((function(e){var t=e[0].trace,n=t.error_y||{},a=t.error_x||{},o=r.select(this);o.selectAll("path.yerror").style("stroke-width",n.thickness+"px").call(i.stroke,n.color),a.copy_ystyle&&(a=n),o.selectAll("path.xerror").style("stroke-width",a.thickness+"px").call(i.stroke,a.color)}))}},77914:function(e,t,n){"use strict";var r=n(41940),i=n(528).hoverlabel,a=n(1426).extendFlat;e.exports={hoverlabel:{bgcolor:a({},i.bgcolor,{arrayOk:!0}),bordercolor:a({},i.bordercolor,{arrayOk:!0}),font:r({arrayOk:!0,editType:"none"}),align:a({},i.align,{arrayOk:!0}),namelength:a({},i.namelength,{arrayOk:!0}),editType:"none"}}},30732:function(e,t,n){"use strict";var r=n(71828),i=n(73972);function a(e,t,n,i){i=i||r.identity,Array.isArray(e)&&(t[0][n]=i(e))}e.exports=function(e){var t=e.calcdata,n=e._fullLayout;function o(e){return function(t){return r.coerceHoverinfo({hoverinfo:t},{_module:e._module},n)}}for(var s=0;s=0&&n.index_[0]._length||oe<0||oe>w[0]._length)return p.unhoverRaw(e,t)}if(t.pointerX=ae+_[0]._offset,t.pointerY=oe+w[0]._offset,V="xval"in t?v.flat(l,t.xval):v.p2c(_,ae),H="yval"in t?v.flat(l,t.yval):v.p2c(w,oe),!i(V[0])||!i(H[0]))return o.warn("Fx.hover failed",t,e),p.unhoverRaw(e,t)}var ce=1/0;function ue(e,n){for(G=0;Gee&&(te.splice(0,ee),ce=te[0].distance),y&&0!==F&&0===te.length){Q.distance=F,Q.index=!1;var d=Y._module.hoverPoints(Q,K,J,"closest",{hoverLayer:u._hoverlayer});if(d&&(d=d.filter((function(e){return e.spikeDistance<=F}))),d&&d.length){var h,p=d.filter((function(e){return e.xa.showspikes&&"hovered data"!==e.xa.spikesnap}));if(p.length){var m=p[0];i(m.x0)&&i(m.y0)&&(h=he(m),(!re.vLinePoint||re.vLinePoint.spikeDistance>h.spikeDistance)&&(re.vLinePoint=h))}var g=d.filter((function(e){return e.ya.showspikes&&"hovered data"!==e.ya.spikesnap}));if(g.length){var x=g[0];i(x.x0)&&i(x.y0)&&(h=he(x),(!re.hLinePoint||re.hLinePoint.spikeDistance>h.spikeDistance)&&(re.hLinePoint=h))}}}}}function de(e,t,n){for(var r,i=null,a=1/0,o=0;o0&&Math.abs(e.distance)Ae-1;Se--)Ee(te[Se]);te=Me,ge()}var Ce=e._hoverdata,De=[],Re=j(e),Pe=U(e);for(W=0;W1||te.length>1)||"closest"===R&&ie&&te.length>1,Ge=f.combine(u.plot_bgcolor||f.background,u.paper_bgcolor),qe=P(te,{gd:e,hovermode:R,rotateLabels:We,bgColor:Ge,container:u._hoverlayer,outerContainer:u._paper.node(),commonLabelOpts:u.hoverlabel,hoverdistance:u.hoverdistance});v.isUnifiedHover(R)||(!function(e,t,n){var r,i,a,o,s,l,c,u=0,d=1,h=e.size(),f=new Array(h),p=0;function m(e){var t=e[0],n=e[e.length-1];if(i=t.pmin-t.pos-t.dp+t.size,a=n.pos+n.dp+n.size-t.pmax,i>.01){for(s=e.length-1;s>=0;s--)e[s].dp+=i;r=!1}if(!(a<.01)){if(i<-.01){for(s=e.length-1;s>=0;s--)e[s].dp-=a;r=!1}if(r){var c=0;for(o=0;ot.pmax&&c++;for(o=e.length-1;o>=0&&!(c<=0);o--)(l=e[o]).pos>t.pmax-1&&(l.del=!0,c--);for(o=0;o=0;s--)e[s].dp-=a;for(o=e.length-1;o>=0&&!(c<=0);o--)(l=e[o]).pos+l.dp+l.size>t.pmax&&(l.del=!0,c--)}}}e.each((function(e){var r=e[t],i="x"===r._id.charAt(0),a=r.range;0===p&&a&&a[0]>a[1]!==i&&(d=-1),f[p++]=[{datum:e,traceIndex:e.trace.index,dp:0,pos:e.pos,posref:e.posref,size:e.by*(i?A:1)/2,pmin:0,pmax:i?n.width:n.height}]})),f.sort((function(e,t){return e[0].posref-t[0].posref||d*(t[0].traceIndex-e[0].traceIndex)}));for(;!r&&u<=h;){for(u++,r=!0,o=0;o.01&&y.pmin===x.pmin&&y.pmax===x.pmax){for(s=v.length-1;s>=0;s--)v[s].dp+=i;for(g.push.apply(g,v),f.splice(o+1,1),c=0,s=g.length-1;s>=0;s--)c+=g[s].dp;for(a=c/g.length,s=g.length-1;s>=0;s--)g[s].dp-=a;r=!1}else o++}f.forEach(m)}for(o=f.length-1;o>=0;o--){var b=f[o];for(s=b.length-1;s>=0;s--){var _=b[s],w=_.datum;w.offset=_.dp,w.del=_.del}}}(qe,We?"xa":"ya",u),L(qe,We,u._invScaleX,u._invScaleY));if(s&&s.tagName){var Ye=g.getComponentMethod("annotations","hasClickToShow")(e,De);d(r.select(s),Ye?"pointer":"")}if(!s||a||!function(e,t,n){if(!n||n.length!==e._hoverdata.length)return!0;for(var r=n.length-1;r>=0;r--){var i=n[r],a=e._hoverdata[r];if(i.curveNumber!==a.curveNumber||String(i.pointNumber)!==String(a.pointNumber)||String(i.pointNumbers)!==String(a.pointNumbers))return!0}return!1}(e,0,Ce))return;Ce&&e.emit("plotly_unhover",{event:t,points:Ce});e.emit("plotly_hover",{event:t,points:e._hoverdata,xaxes:_,yaxes:w,xvals:V,yvals:H})}(e,t,n,a,s)}))},t.loneHover=function(e,t){var n=!0;Array.isArray(e)||(n=!1,e=[e]);var i=t.gd,a=j(i),o=U(i),s=!1,l=P(e.map((function(e){var n=e._x0||e.x0||e.x||0,r=e._x1||e.x1||e.x||0,s=e._y0||e.y0||e.y||0,l=e._y1||e.y1||e.y||0,c=e.eventData;if(c){var u=Math.min(n,r),d=Math.max(n,r),h=Math.min(s,l),p=Math.max(s,l),m=e.trace;if(g.traceIs(m,"gl3d")){var v=i._fullLayout[m.scene]._scene.container,y=v.offsetLeft,x=v.offsetTop;u+=y,d+=y,h+=x,p+=x}c.bbox={x0:u+o,x1:d+o,y0:h+a,y1:p+a},t.inOut_bbox&&t.inOut_bbox.push(c.bbox)}else c=!1;return{color:e.color||f.defaultLine,x0:e.x0||e.x||0,x1:e.x1||e.x||0,y0:e.y0||e.y||0,y1:e.y1||e.y||0,xLabel:e.xLabel,yLabel:e.yLabel,zLabel:e.zLabel,text:e.text,name:e.name,idealAlign:e.idealAlign,borderColor:e.borderColor,fontFamily:e.fontFamily,fontSize:e.fontSize,fontColor:e.fontColor,nameLength:e.nameLength,textAlign:e.textAlign,trace:e.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:e.hovertemplate||!1,hovertemplateLabels:e.hovertemplateLabels||!1,eventData:c}})),{gd:i,hovermode:"closest",rotateLabels:s,bgColor:t.bgColor||f.background,container:r.select(t.container),outerContainer:t.outerContainer||t.container}),c=0,u=0;return l.sort((function(e,t){return e.y0-t.y0})).each((function(e,n){var r=e.y0-e.by/2;e.offset=r-5([\s\S]*)<\/extra>/;function P(e,t){var n=t.gd,i=n._fullLayout,a=t.hovermode,c=t.rotateLabels,d=t.bgColor,p=t.container,m=t.outerContainer,w=t.commonLabelOpts||{};if(0===e.length)return[[]];var A=t.fontFamily||y.HOVERFONT,S=t.fontSize||y.HOVERFONTSIZE,M=e[0],E=M.xa,C=M.ya,R=a.charAt(0),P=R+"Label",L=M[P];if(void 0===L&&"multicategory"===E.type)for(var I=0;Ii.width-b?(g=i.width-b,t.attr("d","M"+(b-T)+",0L"+b+","+x+T+"v"+x+(2*k+y.height)+"H-"+b+"V"+x+T+"H"+(b-2*T)+"Z")):t.attr("d","M0,0L"+T+","+x+T+"H"+(k+y.width/2)+"v"+x+(2*k+y.height)+"H-"+(k+y.width/2)+"V"+x+T+"H-"+T+"Z")}else{var _,D,R;"right"===C.side?(_="start",D=1,R="",g=E._offset+E._length):(_="end",D=-1,R="-",g=E._offset),v=C._offset+(M.y0+M.y1)/2,l.attr("text-anchor",_),t.attr("d","M0,0L"+R+T+","+T+"V"+(k+y.height/2)+"h"+R+(2*k+y.width)+"V-"+(k+y.height/2)+"H"+R+T+"V-"+T+"Z");var P,O=y.height/2,I=N-y.top-O,z="clip"+i._uid+"commonlabel"+C._id;if(g=0?se:le+de=0?le:xe+de=0?ae:oe+he=0?oe:be+he=0,"top"!==e.idealAlign&&G||!q?G?(P+=z/2,e.anchor="start"):e.anchor="middle":(P-=z/2,e.anchor="end");else if(e.pos=P,G=R+I/2+Y<=F,q=R-I/2-Y>=0,"left"!==e.idealAlign&&G||!q)if(G)R+=I/2,e.anchor="start";else{e.anchor="middle";var $=Y/2,X=R+$-F,Z=R-$;X>0&&(R-=X),Z<0&&(R+=-Z)}else R-=I/2,e.anchor="end";w.attr("text-anchor",e.anchor),E&&M.attr("text-anchor",e.anchor),t.attr("transform",s(R,P)+(c?l(_):""))})),_e}function O(e,t,n,r,i,a){var s="",l="";void 0!==e.nameOverride&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=o.templateString(e.name,e.trace._meta)),s=F(e.name,e.nameLength));var c=n.charAt(0),u="x"===c?"y":"x";void 0!==e.zLabel?(void 0!==e.xLabel&&(l+="x: "+e.xLabel+"
"),void 0!==e.yLabel&&(l+="y: "+e.yLabel+"
"),"choropleth"!==e.trace.type&&"choroplethmapbox"!==e.trace.type&&(l+=(l?"z: ":"")+e.zLabel)):t&&e[c+"Label"]===i?l=e[u+"Label"]||"":void 0===e.xLabel?void 0!==e.yLabel&&"scattercarpet"!==e.trace.type&&(l=e.yLabel):l=void 0===e.yLabel?e.xLabel:"("+e.xLabel+", "+e.yLabel+")",!e.text&&0!==e.text||Array.isArray(e.text)||(l+=(l?"
":"")+e.text),void 0!==e.extraText&&(l+=(l?"
":"")+e.extraText),a&&""===l&&!e.hovertemplate&&(""===s&&a.remove(),l=s);var d=e.hovertemplate||!1;if(d){var h=e.hovertemplateLabels||e;e[c+"Label"]!==i&&(h[c+"other"]=h[c+"Val"],h[c+"otherLabel"]=h[c+"Label"]),l=(l=o.hovertemplateString(d,h,r._d3locale,e.eventData[0]||{},e.trace._meta)).replace(R,(function(t,n){return s=F(n,e.nameLength),""}))}return[l,s]}function L(e,t,n,i){var a=function(e){return e*n},o=function(e){return e*i};e.each((function(e){var n=r.select(this);if(e.del)return n.remove();var i=n.select("text.nums"),s=e.anchor,l="end"===s?-1:1,c={start:1,end:-1,middle:0}[s],d=c*(T+k),f=d+c*(e.txwidth+k),p=0,m=e.offset,g="middle"===s;g&&(d-=e.tx2width/2,f+=e.txwidth/2+k),t&&(m*=-M,p=e.offset*S),n.select("path").attr("d",g?"M-"+a(e.bx/2+e.tx2width/2)+","+o(m-e.by/2)+"h"+a(e.bx)+"v"+o(e.by)+"h-"+a(e.bx)+"Z":"M0,0L"+a(l*T+p)+","+o(T+m)+"v"+o(e.by/2-T)+"h"+a(l*e.bx)+"v-"+o(e.by)+"H"+a(l*T+p)+"V"+o(m-T)+"Z");var v=p+d,y=m+e.ty0-e.by/2+k,x=e.textAlign||"auto";"auto"!==x&&("left"===x&&"start"!==s?(i.attr("text-anchor","start"),v=g?-e.bx/2-e.tx2width/2+k:-e.bx-k):"right"===x&&"end"!==s&&(i.attr("text-anchor","end"),v=g?e.bx/2-e.tx2width/2-k:e.bx+k)),i.call(u.positionText,a(v),o(y)),e.tx2width&&(n.select("text.name").call(u.positionText,a(f+c*k+p),o(m+e.ty0-e.by/2+k)),n.select("rect").call(h.setRect,a(f+(c-1)*e.tx2width/2+p),o(m-e.by/2-1),a(e.tx2width),o(e.by+2)))}))}function I(e,t){var n=e.index,r=e.trace||{},a=e.cd[0],s=e.cd[n]||{};function l(e){return e||i(e)&&0===e}var c=Array.isArray(n)?function(e,t){var i=o.castOption(a,n,e);return l(i)?i:o.extractOption({},r,"",t)}:function(e,t){return o.extractOption(s,r,e,t)};function u(t,n,r){var i=c(n,r);l(i)&&(e[t]=i)}if(u("hoverinfo","hi","hoverinfo"),u("bgcolor","hbg","hoverlabel.bgcolor"),u("borderColor","hbc","hoverlabel.bordercolor"),u("fontFamily","htf","hoverlabel.font.family"),u("fontSize","hts","hoverlabel.font.size"),u("fontColor","htc","hoverlabel.font.color"),u("nameLength","hnl","hoverlabel.namelength"),u("textAlign","hta","hoverlabel.align"),e.posref="y"===t||"closest"===t&&"h"===r.orientation?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=o.constrain(e.x0,0,e.xa._length),e.x1=o.constrain(e.x1,0,e.xa._length),e.y0=o.constrain(e.y0,0,e.ya._length),e.y1=o.constrain(e.y1,0,e.ya._length),void 0!==e.xLabelVal&&(e.xLabel="xLabel"in e?e.xLabel:m.hoverLabelText(e.xa,e.xLabelVal,r.xhoverformat),e.xVal=e.xa.c2d(e.xLabelVal)),void 0!==e.yLabelVal&&(e.yLabel="yLabel"in e?e.yLabel:m.hoverLabelText(e.ya,e.yLabelVal,r.yhoverformat),e.yVal=e.ya.c2d(e.yLabelVal)),void 0!==e.zLabelVal&&void 0===e.zLabel&&(e.zLabel=String(e.zLabelVal)),!isNaN(e.xerr)&&!("log"===e.xa.type&&e.xerr<=0)){var d=m.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;void 0!==e.xerrneg?e.xLabel+=" +"+d+" / -"+m.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" \xb1 "+d,"x"===t&&(e.distance+=1)}if(!isNaN(e.yerr)&&!("log"===e.ya.type&&e.yerr<=0)){var h=m.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;void 0!==e.yerrneg?e.yLabel+=" +"+h+" / -"+m.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" \xb1 "+h,"y"===t&&(e.distance+=1)}var f=e.hoverinfo||e.trace.hoverinfo;return f&&"all"!==f&&(-1===(f=Array.isArray(f)?f:f.split("+")).indexOf("x")&&(e.xLabel=void 0),-1===f.indexOf("y")&&(e.yLabel=void 0),-1===f.indexOf("z")&&(e.zLabel=void 0),-1===f.indexOf("text")&&(e.text=void 0),-1===f.indexOf("name")&&(e.name=void 0)),e}function z(e,t,n){var r,i,o=n.container,s=n.fullLayout,l=s._size,c=n.event,u=!!t.hLinePoint,d=!!t.vLinePoint;if(o.selectAll(".spikeline").remove(),d||u){var p=f.combine(s.plot_bgcolor,s.paper_bgcolor);if(u){var g,v,y=t.hLinePoint;r=y&&y.xa,"cursor"===(i=y&&y.ya).spikesnap?(g=c.pointerX,v=c.pointerY):(g=r._offset+y.x,v=i._offset+y.y);var x,b,_=a.readability(y.color,p)<1.5?f.contrast(p):y.color,w=i.spikemode,A=i.spikethickness,S=i.spikecolor||_,M=m.getPxPosition(e,i);if(-1!==w.indexOf("toaxis")||-1!==w.indexOf("across")){if(-1!==w.indexOf("toaxis")&&(x=M,b=g),-1!==w.indexOf("across")){var T=i._counterDomainMin,k=i._counterDomainMax;"free"===i.anchor&&(T=Math.min(T,i.position),k=Math.max(k,i.position)),x=l.l+T*l.w,b=l.l+k*l.w}o.insert("line",":first-child").attr({x1:x,x2:b,y1:v,y2:v,"stroke-width":A,stroke:S,"stroke-dasharray":h.dashStyle(i.spikedash,A)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:x,x2:b,y1:v,y2:v,"stroke-width":A+2,stroke:p}).classed("spikeline",!0).classed("crisp",!0)}-1!==w.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:M+("right"!==i.side?A:-A),cy:v,r:A,fill:S}).classed("spikeline",!0)}if(d){var E,C,D=t.vLinePoint;r=D&&D.xa,i=D&&D.ya,"cursor"===r.spikesnap?(E=c.pointerX,C=c.pointerY):(E=r._offset+D.x,C=i._offset+D.y);var R,P,O=a.readability(D.color,p)<1.5?f.contrast(p):D.color,L=r.spikemode,I=r.spikethickness,z=r.spikecolor||O,N=m.getPxPosition(e,r);if(-1!==L.indexOf("toaxis")||-1!==L.indexOf("across")){if(-1!==L.indexOf("toaxis")&&(R=N,P=C),-1!==L.indexOf("across")){var F=r._counterDomainMin,B=r._counterDomainMax;"free"===r.anchor&&(F=Math.min(F,r.position),B=Math.max(B,r.position)),R=l.t+(1-B)*l.h,P=l.t+(1-F)*l.h}o.insert("line",":first-child").attr({x1:E,x2:E,y1:R,y2:P,"stroke-width":I,stroke:z,"stroke-dasharray":h.dashStyle(r.spikedash,I)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:E,x2:E,y1:R,y2:P,"stroke-width":I+2,stroke:p}).classed("spikeline",!0).classed("crisp",!0)}-1!==L.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:E,cy:N-("top"!==r.side?I:-I),r:I,fill:z}).classed("spikeline",!0)}}}function N(e,t){return!t||(t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint)}function F(e,t){return u.plainText(e||"",{len:t,allowedTags:["br","sub","sup","b","i","em"]})}function B(e,t,n){var r=t[e+"a"],i=t[e+"Val"],a=t.cd[0];if("category"===r.type||"multicategory"===r.type)i=r._categoriesMap[i];else if("date"===r.type){var o=t.trace[e+"periodalignment"];if(o){var s=t.cd[t.index],l=s[e+"Start"];void 0===l&&(l=s[e]);var c=s[e+"End"];void 0===c&&(c=s[e]);var u=c-l;"end"===o?i+=u:"middle"===o&&(i+=u/2)}i=r.d2c(i)}return a&&a.t&&a.t.posLetter===r._id&&("group"!==n.boxmode&&"group"!==n.violinmode||(i+=a.t.dPos)),i}function j(e){return e.offsetTop+e.clientTop}function U(e){return e.offsetLeft+e.clientLeft}function V(e,t){var n=e._fullLayout,r=t.getBoundingClientRect(),i=r.left,a=r.top,s=i+r.width,l=a+r.height,c=o.apply3DTransform(n._invTransform)(i,a),u=o.apply3DTransform(n._invTransform)(s,l),d=c[0],h=c[1],f=u[0],p=u[1];return{x:d,y:h,width:f-d,height:p-h,top:Math.min(h,p),left:Math.min(d,f),right:Math.max(d,f),bottom:Math.max(h,p)}}},38048:function(e,t,n){"use strict";var r=n(71828),i=n(7901),a=n(23469).isUnifiedHover;e.exports=function(e,t,n,o){o=o||{};var s=t.legend;function l(e){o.font[e]||(o.font[e]=s?t.legend.font[e]:t.font[e])}t&&a(t.hovermode)&&(o.font||(o.font={}),l("size"),l("family"),l("color"),s?(o.bgcolor||(o.bgcolor=i.combine(t.legend.bgcolor,t.paper_bgcolor)),o.bordercolor||(o.bordercolor=t.legend.bordercolor)):o.bgcolor||(o.bgcolor=t.paper_bgcolor)),n("hoverlabel.bgcolor",o.bgcolor),n("hoverlabel.bordercolor",o.bordercolor),n("hoverlabel.namelength",o.namelength),r.coerceFont(n,"hoverlabel.font",o.font),n("hoverlabel.align",o.align)}},98212:function(e,t,n){"use strict";var r=n(71828),i=n(528);e.exports=function(e,t){function n(n,a){return void 0!==t[n]?t[n]:r.coerce(e,t,i,n,a)}return n("clickmode"),n("hovermode")}},30211:function(e,t,n){"use strict";var r=n(39898),i=n(71828),a=n(28569),o=n(23469),s=n(528),l=n(88335);e.exports={moduleType:"component",name:"fx",constants:n(26675),schema:{layout:s},attributes:n(77914),layoutAttributes:s,supplyLayoutGlobalDefaults:n(22774),supplyDefaults:n(54268),supplyLayoutDefaults:n(34938),calc:n(30732),getDistanceFunction:o.getDistanceFunction,getClosest:o.getClosest,inbox:o.inbox,quadrature:o.quadrature,appendArrayPointValue:o.appendArrayPointValue,castHoverOption:function(e,t,n){return i.castOption(e,t,"hoverlabel."+n)},castHoverinfo:function(e,t,n){return i.castOption(e,n,"hoverinfo",(function(n){return i.coerceHoverinfo({hoverinfo:n},{_module:e._module},t)}))},hover:l.hover,unhover:a.unhover,loneHover:l.loneHover,loneUnhover:function(e){var t=i.isD3Selection(e)?e:r.select(e);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()},click:n(75914)}},528:function(e,t,n){"use strict";var r=n(26675),i=n(41940),a=i({editType:"none"});a.family.dflt=r.HOVERFONT,a.size.dflt=r.HOVERFONTSIZE,e.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:a,grouptitlefont:i({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}},34938:function(e,t,n){"use strict";var r=n(71828),i=n(528),a=n(98212),o=n(38048);e.exports=function(e,t){function n(n,a){return r.coerce(e,t,i,n,a)}a(e,t)&&(n("hoverdistance"),n("spikedistance")),"select"===n("dragmode")&&n("selectdirection");var s=t._has("mapbox"),l=t._has("geo"),c=t._basePlotModules.length;"zoom"===t.dragmode&&((s||l)&&1===c||s&&l&&2===c)&&(t.dragmode="pan"),o(e,t,n),r.coerceFont(n,"hoverlabel.grouptitlefont",t.hoverlabel.font)}},22774:function(e,t,n){"use strict";var r=n(71828),i=n(38048),a=n(528);e.exports=function(e,t){i(e,t,(function(n,i){return r.coerce(e,t,a,n,i)}))}},83312:function(e,t,n){"use strict";var r=n(71828),i=n(30587).counter,a=n(27670).Y,o=n(85555).idRegex,s=n(44467),l={rows:{valType:"integer",min:1,editType:"plot"},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot"},columns:{valType:"integer",min:1,editType:"plot"},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[i("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[o.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[o.y.toString(),""],editType:"plot"},editType:"plot"},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot"},xgap:{valType:"number",min:0,max:1,editType:"plot"},ygap:{valType:"number",min:0,max:1,editType:"plot"},domain:a({name:"grid",editType:"plot",noGridCell:!0},{}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot"},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot"},editType:"plot"};function c(e,t,n){var r=t[n+"axes"],i=Object.keys((e._splomAxes||{})[n]||{});return Array.isArray(r)?r:i.length?i:void 0}function u(e,t,n,r,i,a){var o=t(e+"gap",n),s=t("domain."+e);t(e+"side",r);for(var l=new Array(i),c=s[0],u=(s[1]-c)/(i-o),d=u*(1-o),h=0;h1){if(!h&&!f&&!p)"independent"===S("pattern")&&(h=!0);g._hasSubplotGrid=h;var x,b,_="top to bottom"===S("roworder"),w=h?.2:.1,A=h?.3:.1;m&&t._splomGridDflt&&(x=t._splomGridDflt.xside,b=t._splomGridDflt.yside),g._domains={x:u("x",S,w,x,y),y:u("y",S,A,b,v,_)}}else delete t.grid}function S(e,t){return r.coerce(n,g,l,e,t)}},contentDefaults:function(e,t){var n=t.grid;if(n&&n._domains){var r,i,a,o,s,l,u,h=e.grid||{},f=t._subplots,p=n._hasSubplotGrid,m=n.rows,g=n.columns,v="independent"===n.pattern,y=n._axisMap={};if(p){var x=h.subplots||[];l=n.subplots=new Array(m);var b=1;for(r=0;r1);if(!1===_&&(t.legend=void 0),(!1!==_||d.uirevision)&&(f("uirevision",t.uirevision),!1!==_)){f("bgcolor",t.paper_bgcolor),f("bordercolor"),f("borderwidth");var w,A,S,M=i.coerceFont(f,"font",t.font),T="h"===f("orientation");if(T?(w=0,r.getComponentMethod("rangeslider","isVisible")(e.xaxis)?(A=1.1,S="bottom"):(A=-.1,S="top")):(w=1.02,A=1,S="auto"),f("traceorder",x),c.isGrouped(t.legend)&&f("tracegroupgap"),f("entrywidth"),f("entrywidthmode"),f("itemsizing"),f("itemwidth"),f("itemclick"),f("itemdoubleclick"),f("groupclick"),f("x",w),f("xanchor"),f("y",A),f("yanchor",S),f("valign"),i.noneOrAll(d,h,["x","y"]),f("title.text")){f("title.side",T?"left":"top");var k=i.extendFlat({},M,{size:i.bigFont(M.size)});i.coerceFont(f,"title.font",k)}}}},43969:function(e,t,n){"use strict";var r=n(39898),i=n(71828),a=n(74875),o=n(73972),s=n(11086),l=n(28569),c=n(91424),u=n(7901),d=n(63893),h=n(85167),f=n(14928),p=n(18783),m=p.LINE_SPACING,g=p.FROM_TL,v=p.FROM_BR,y=n(82424),x=n(53630),b=n(10130);function _(e,t,n){var r=e[0],i=r.width,a=t.entrywidthmode,o=r.trace.legendwidth||t.entrywidth;return"fraction"===a?t._maxWidth*o:n+(o||i)}function w(e,t,n,r,i){var a=n.data()[0][0].trace,l={event:i,node:n.node(),curveNumber:a.index,expandedIndex:a._expandedIndex,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:e._fullLayout};if(a._group&&(l.group=a._group),o.traceIs(a,"pie-like")&&(l.label=n.datum()[0].label),!1!==s.triggerHandler(e,"plotly_legendclick",l))if(1===r)t._clickTimeout=setTimeout((function(){e._fullLayout&&h(n,e,r)}),e._context.doubleClickDelay);else if(2===r){t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0,!1!==s.triggerHandler(e,"plotly_legenddoubleclick",l)&&h(n,e,r)}}function A(e,t,n){var r,a,s=e.data()[0][0],l=s.trace,u=o.traceIs(l,"pie-like"),h=!n._inHover&&t._context.edits.legendText&&!u,p=n._maxNameLength;s.groupTitle?(r=s.groupTitle.text,a=s.groupTitle.font):(a=n.font,n.entries?r=s.text:(r=u?s.label:l.name,l._meta&&(r=i.templateString(r,l._meta))));var m=i.ensureSingle(e,"text","legendtext");m.attr("text-anchor","start").call(c.font,a).text(h?S(r,p):r);var g=n.itemwidth+2*f.itemGap;d.positionText(m,g,0),h?m.call(d.makeEditable,{gd:t,text:r}).call(T,e,t,n).on("edit",(function(r){this.text(S(r,p)).call(T,e,t,n);var a=s.trace._fullInput||{},c={};if(o.hasTransform(a,"groupby")){var u=o.getTransformIndices(a,"groupby"),d=u[u.length-1],h=i.keyedContainer(a,"transforms["+d+"].styles","target","value.name");h.set(s.trace._group,r),c=h.constructUpdate()}else c.name=r;return o.call("_guiRestyle",t,c,l.index)})):T(m,e,t,n)}function S(e,t){var n=Math.max(4,t);if(e&&e.trim().length>=n/2)return e;for(var r=n-(e=e||"").length;r>0;r--)e+=" ";return e}function M(e,t){var n,a=t._context.doubleClickDelay,o=1,s=i.ensureSingle(e,"rect","legendtoggle",(function(e){t._context.staticPlot||e.style("cursor","pointer").attr("pointer-events","all"),e.call(u.fill,"rgba(0,0,0,0)")}));t._context.staticPlot||(s.on("mousedown",(function(){(n=(new Date).getTime())-t._legendMouseDownTimea&&(o=Math.max(o-1,1)),w(t,n,e,o,r.event)}})))}function T(e,t,n,r,i){r._inHover&&e.attr("data-notex",!0),d.convertToTspans(e,n,(function(){!function(e,t,n,r){var i=e.data()[0][0];if(!n._inHover&&i&&!i.trace.showlegend)return void e.remove();var a=e.select("g[class*=math-group]"),o=a.node();n||(n=t._fullLayout.legend);var s,l=n.borderwidth;s=1===r?n.title.font:i.groupTitle?i.groupTitle.font:n.font;var u,h,p=s.size*m;if(o){var g=c.bBox(o);u=g.height,h=g.width,1===r?c.setTranslate(a,l,l+.75*u):c.setTranslate(a,0,.25*u)}else{var v=e.select(1===r?".legendtitletext":".legendtext"),y=d.lineCount(v),x=v.node();if(u=p*y,h=x?c.bBox(x).width:0,1===r)"left"===n.title.side&&(h+=2*f.itemGap),d.positionText(v,l+f.titlePad,l+p);else{var b=2*f.itemGap+n.itemwidth;i.groupTitle&&(b=f.itemGap,h-=n.itemwidth),d.positionText(v,b,-p*((y-1)/2-.3))}}1===r?(n._titleWidth=h,n._titleHeight=u):(i.lineHeight=p,i.height=Math.max(u,16)+3,i.width=h)}(t,n,r,i)}))}function k(e){return i.isRightAnchor(e)?"right":i.isCenterAnchor(e)?"center":"left"}function E(e){return i.isBottomAnchor(e)?"bottom":i.isMiddleAnchor(e)?"middle":"top"}e.exports=function(e,t){return t||(t=e._fullLayout.legend||{}),function(e,t){var n,s,d=e._fullLayout,h="legend"+d._uid,p=t._inHover;p?(n=t.layer,h+="-hover"):n=d._infolayer;if(!n)return;e._legendMouseDownTime||(e._legendMouseDownTime=0);if(p){if(!t.entries)return;s=y(t.entries,t)}else{if(!e.calcdata)return;s=d.showlegend&&y(e.calcdata,t)}var m=d.hiddenlabels||[];if(!p&&(!d.showlegend||!s.length))return n.selectAll(".legend").remove(),d._topdefs.select("#"+h).remove(),a.autoMargin(e,"legend");var S=i.ensureSingle(n,"g","legend",(function(e){p||e.attr("pointer-events","all")})),C=i.ensureSingleById(d._topdefs,"clipPath",h,(function(e){e.append("rect")})),D=i.ensureSingle(S,"rect","bg",(function(e){e.attr("shape-rendering","crispEdges")}));D.call(u.stroke,t.bordercolor).call(u.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px");var R=i.ensureSingle(S,"g","scrollbox"),P=t.title;if(t._titleWidth=0,t._titleHeight=0,P.text){var O=i.ensureSingle(R,"text","legendtitletext");O.attr("text-anchor","start").call(c.font,P.font).text(P.text),T(O,R,e,t,1)}else R.selectAll(".legendtitletext").remove();var L=i.ensureSingle(S,"rect","scrollbar",(function(e){e.attr(f.scrollBarEnterAttrs).call(u.fill,f.scrollBarColor)})),I=R.selectAll("g.groups").data(s);I.enter().append("g").attr("class","groups"),I.exit().remove();var z=I.selectAll("g.traces").data(i.identity);z.enter().append("g").attr("class","traces"),z.exit().remove(),z.style("opacity",(function(e){var t=e[0].trace;return o.traceIs(t,"pie-like")?-1!==m.indexOf(e[0].label)?.5:1:"legendonly"===t.visible?.5:1})).each((function(){r.select(this).call(A,e,t)})).call(x,e,t).each((function(){p||r.select(this).call(M,e)})),i.syncOrAsync([a.previousPromises,function(){return function(e,t,n,i){var a=e._fullLayout;i||(i=a.legend);var o=a._size,s=b.isVertical(i),l=b.isGrouped(i),u="fraction"===i.entrywidthmode,d=i.borderwidth,h=2*d,p=f.itemGap,m=i.itemwidth+2*p,g=2*(d+p),v=E(i),y=i.y<0||0===i.y&&"top"===v,x=i.y>1||1===i.y&&"bottom"===v,w=i.tracegroupgap,A={};i._maxHeight=Math.max(y||x?a.height/2:o.h,30);var S=0;i._width=0,i._height=0;var M=function(e){var t=0,n=0,r=e.title.side;r&&(-1!==r.indexOf("left")&&(t=e._titleWidth),-1!==r.indexOf("top")&&(n=e._titleHeight));return[t,n]}(i);if(s)n.each((function(e){var t=e[0].height;c.setTranslate(this,d+M[0],d+M[1]+i._height+t/2+p),i._height+=t,i._width=Math.max(i._width,e[0].width)})),S=m+i._width,i._width+=p+m+h,i._height+=g,l&&(t.each((function(e,t){c.setTranslate(this,0,t*i.tracegroupgap)})),i._height+=(i._lgroupsLength-1)*i.tracegroupgap);else{var T=k(i),C=i.x<0||0===i.x&&"right"===T,D=i.x>1||1===i.x&&"left"===T,R=x||y,P=a.width/2;i._maxWidth=Math.max(C?R&&"left"===T?o.l+o.w:P:D?R&&"right"===T?o.r+o.w:P:o.w,2*m);var O=0,L=0;n.each((function(e){var t=_(e,i,m);O=Math.max(O,t),L+=t})),S=null;var I=0;if(l){var z=0,N=0,F=0;t.each((function(){var e=0,t=0;r.select(this).selectAll("g.traces").each((function(n){var r=_(n,i,m),a=n[0].height;c.setTranslate(this,M[0],M[1]+d+p+a/2+t),t+=a,e=Math.max(e,r),A[n[0].trace.legendgroup]=e}));var n=e+p;N>0&&n+d+N>i._maxWidth?(I=Math.max(I,N),N=0,F+=z+w,z=t):z=Math.max(z,t),c.setTranslate(this,N,F),N+=n})),i._width=Math.max(I,N)+d,i._height=F+z+g}else{var B=n.size(),j=L+h+(B-1)*p=i._maxWidth&&(I=Math.max(I,W),V=0,H+=U,i._height+=U,U=0),c.setTranslate(this,M[0]+d+V,M[1]+d+H+t/2+p),W=V+n+p,V+=r,U=Math.max(U,t)})),j?(i._width=V+h,i._height=U+g):(i._width=Math.max(I,W)+h,i._height+=U+g)}}i._width=Math.ceil(Math.max(i._width+M[0],i._titleWidth+2*(d+f.titlePad))),i._height=Math.ceil(Math.max(i._height+M[1],i._titleHeight+2*(d+f.itemGap))),i._effHeight=Math.min(i._height,i._maxHeight);var G=e._context.edits,q=G.legendText||G.legendPosition;n.each((function(e){var t=r.select(this).select(".legendtoggle"),n=e[0].height,a=e[0].trace.legendgroup,o=_(e,i,m);l&&""!==a&&(o=A[a]);var d=q?m:S||o;s||u||(d+=p/2),c.setRect(t,0,-n/2,d,n)}))}(e,I,z,t)},function(){var s,u,m,y,x=d._size,b=t.borderwidth;if(!p){var _=function(e){var t=e._fullLayout,n=t.legend,r=k(n),i=E(n);return a.autoMargin(e,"legend",{x:n.x,y:n.y,l:n._width*g[r],r:n._width*v[r],b:n._effHeight*v[i],t:n._effHeight*g[i]})}(e);if(_)return;var A=x.l+x.w*t.x-g[k(t)]*t._width,M=x.t+x.h*(1-t.y)-g[E(t)]*t._effHeight;if(d.margin.autoexpand){var T=A,P=M;A=i.constrain(A,0,d.width-t._width),M=i.constrain(M,0,d.height-t._effHeight),A!==T&&i.log("Constrain legend.x to make legend fit inside graph"),M!==P&&i.log("Constrain legend.y to make legend fit inside graph")}c.setTranslate(S,A,M)}if(L.on(".drag",null),S.on("wheel",null),p||t._height<=t._maxHeight||e._context.staticPlot){var O=t._effHeight;p&&(O=t._height),D.attr({width:t._width-b,height:O-b,x:b/2,y:b/2}),c.setTranslate(R,0,0),C.select("rect").attr({width:t._width-2*b,height:O-2*b,x:b,y:b}),c.setClipUrl(R,h,e),c.setRect(L,0,0,0,0),delete t._scrollY}else{var I,z,N,F=Math.max(f.scrollBarMinHeight,t._effHeight*t._effHeight/t._height),B=t._effHeight-F-2*f.scrollBarMargin,j=t._height-t._effHeight,U=B/j,V=Math.min(t._scrollY||0,j);D.attr({width:t._width-2*b+f.scrollBarWidth+f.scrollBarMargin,height:t._effHeight-b,x:b/2,y:b/2}),C.select("rect").attr({width:t._width-2*b+f.scrollBarWidth+f.scrollBarMargin,height:t._effHeight-2*b,x:b,y:b+V}),c.setClipUrl(R,h,e),Y(V,F,U),S.on("wheel",(function(){Y(V=i.constrain(t._scrollY+r.event.deltaY/B*j,0,j),F,U),0!==V&&V!==j&&r.event.preventDefault()}));var H=function(e,t,n){var r=(n-t)/U+e;return i.constrain(r,0,j)},W=function(e,t,n){var r=(t-n)/U+e;return i.constrain(r,0,j)},G=r.behavior.drag().on("dragstart",(function(){var e=r.event.sourceEvent;I="touchstart"===e.type?e.changedTouches[0].clientY:e.clientY,N=V})).on("drag",(function(){var e=r.event.sourceEvent;2===e.buttons||e.ctrlKey||(z="touchmove"===e.type?e.changedTouches[0].clientY:e.clientY,Y(V=H(N,I,z),F,U))}));L.call(G);var q=r.behavior.drag().on("dragstart",(function(){var e=r.event.sourceEvent;"touchstart"===e.type&&(I=e.changedTouches[0].clientY,N=V)})).on("drag",(function(){var e=r.event.sourceEvent;"touchmove"===e.type&&(z=e.changedTouches[0].clientY,Y(V=W(N,I,z),F,U))}));R.call(q)}function Y(n,r,i){t._scrollY=e._fullLayout.legend._scrollY=n,c.setTranslate(R,0,-n),c.setRect(L,t._width,f.scrollBarMargin+n*i,f.scrollBarWidth,r),C.select("rect").attr("y",b+n)}e._context.edits.legendPosition&&(S.classed("cursor-move",!0),l.init({element:S.node(),gd:e,prepFn:function(){var e=c.getTranslate(S);m=e.x,y=e.y},moveFn:function(e,n){var r=m+e,i=y+n;c.setTranslate(S,r,i),s=l.align(r,0,x.l,x.l+x.w,t.xanchor),u=l.align(i,0,x.t+x.h,x.t,t.yanchor)},doneFn:function(){void 0!==s&&void 0!==u&&o.call("_guiRelayout",e,{"legend.x":s,"legend.y":u})},clickFn:function(t,r){var i=n.selectAll("g.traces").filter((function(){var e=this.getBoundingClientRect();return r.clientX>=e.left&&r.clientX<=e.right&&r.clientY>=e.top&&r.clientY<=e.bottom}));i.size()>0&&w(e,S,i,t,r)}}))}],e)}(e,t)}},82424:function(e,t,n){"use strict";var r=n(73972),i=n(10130);e.exports=function(e,t){var n,a,o=t._inHover,s=i.isGrouped(t),l=i.isReversed(t),c={},u=[],d=!1,h={},f=0,p=0;function m(e,n){if(""!==e&&i.isGrouped(t))-1===u.indexOf(e)?(u.push(e),d=!0,c[e]=[n]):c[e].push(n);else{var r="~~i"+f;u.push(r),c[r]=[n],f++}}for(n=0;nM&&(S=M)}w[n][0]._groupMinRank=S,w[n][0]._preGroupSort=n}var T=function(e,t){return e.trace.legendrank-t.trace.legendrank||e._preSort-t._preSort};for(w.forEach((function(e,t){e[0]._preGroupSort=t})),w.sort((function(e,t){return e[0]._groupMinRank-t[0]._groupMinRank||e[0]._preGroupSort-t[0]._preGroupSort})),n=0;nn?n:e}e.exports=function(e,t,n){var v=t._fullLayout;n||(n=v.legend);var y="constant"===n.itemsizing,x=n.itemwidth,b=(x+2*f.itemGap)/2,_=o(b,0),w=function(e,t,n,r){var i;if(e+1)i=e;else{if(!(t&&t.width>0))return 0;i=t.width}return y?r:Math.min(i,n)};function A(e,a,o){var u=e[0].trace,d=u.marker||{},h=d.line||{},f=o?u.visible&&u.type===o:i.traceIs(u,"bar"),p=r.select(a).select("g.legendpoints").selectAll("path.legend"+o).data(f?[e]:[]);p.enter().append("path").classed("legend"+o,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),p.exit().remove(),p.each((function(e){var i=r.select(this),a=e[0],o=w(a.mlw,d.line,5,2);i.style("stroke-width",o+"px");var f=a.mcc;if(!n._inHover&&"mc"in a){var p=c(d),m=p.mid;void 0===m&&(m=(p.max+p.min)/2),f=s.tryColorscale(d,"")(m)}var v=f||a.mc||d.color,y=d.pattern,x=y&&s.getPatternAttr(y.shape,0,"");if(x){var b=s.getPatternAttr(y.bgcolor,0,null),_=s.getPatternAttr(y.fgcolor,0,null),A=y.fgopacity,S=g(y.size,8,10),M=g(y.solidity,.5,1),T="legend-"+u.uid;i.call(s.pattern,"legend",t,T,x,S,M,f,y.fillmode,b,_,A)}else i.call(l.fill,v);o&&l.stroke(i,a.mlc||h.color)}))}function S(e,t,n){var o=e[0],s=o.trace,l=n?s.visible&&s.type===n:i.traceIs(s,n),c=r.select(t).select("g.legendpoints").selectAll("path.legend"+n).data(l?[e]:[]);if(c.enter().append("path").classed("legend"+n,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),c.exit().remove(),c.size()){var u=(s.marker||{}).line,f=w(h(u.width,o.pts),u,5,2),p=a.minExtend(s,{marker:{line:{width:f}}});p.marker.line.color=u.color;var m=a.minExtend(o,{trace:p});d(c,m,p)}}e.each((function(e){var t=r.select(this),i=a.ensureSingle(t,"g","layers");i.style("opacity",e[0].trace.opacity);var s=n.valign,l=e[0].lineHeight,c=e[0].height;if("middle"!==s&&l&&c){var u={top:1,bottom:-1}[s]*(.5*(l-c+3));i.attr("transform",o(0,u))}else i.attr("transform",null);i.selectAll("g.legendfill").data([e]).enter().append("g").classed("legendfill",!0),i.selectAll("g.legendlines").data([e]).enter().append("g").classed("legendlines",!0);var d=i.selectAll("g.legendsymbols").data([e]);d.enter().append("g").classed("legendsymbols",!0),d.selectAll("g.legendpoints").data([e]).enter().append("g").classed("legendpoints",!0)})).each((function(e){var n,i=e[0].trace,o=[];if(i.visible)switch(i.type){case"histogram2d":case"heatmap":o=[["M-15,-2V4H15V-2Z"]],n=!0;break;case"choropleth":case"choroplethmapbox":o=[["M-6,-6V6H6V-6Z"]],n=!0;break;case"densitymapbox":o=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],n="radial";break;case"cone":o=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],n=!1;break;case"streamtube":o=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],n=!1;break;case"surface":o=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],n=!0;break;case"mesh3d":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],n=!1;break;case"volume":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],n=!0;break;case"isosurface":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],n=!1}var u=r.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(o);u.enter().append("path").classed("legend3dandfriends",!0).attr("transform",_).style("stroke-miterlimit",1),u.exit().remove(),u.each((function(e,o){var u,d=r.select(this),h=c(i),f=h.colorscale,m=h.reversescale;if(f){if(!n){var g=f.length;u=0===o?f[m?g-1:0][1]:1===o?f[m?0:g-1][1]:f[Math.floor((g-1)/2)][1]}}else{var v=i.vertexcolor||i.facecolor||i.color;u=a.isArrayOrTypedArray(v)?v[o]||v[0]:v}d.attr("d",e[0]),u?d.call(l.fill,u):d.call((function(e){if(e.size()){var r="legendfill-"+i.uid;s.gradient(e,t,r,p(m,"radial"===n),f,"fill")}}))}))})).each((function(e){var t=e[0].trace,n="waterfall"===t.type;if(e[0]._distinct&&n){var i=e[0].trace[e[0].dir].marker;return e[0].mc=i.color,e[0].mlw=i.line.width,e[0].mlc=i.line.color,A(e,this,"waterfall")}var a=[];t.visible&&n&&(a=e[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var o=r.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(a);o.enter().append("path").classed("legendwaterfall",!0).attr("transform",_).style("stroke-miterlimit",1),o.exit().remove(),o.each((function(e){var n=r.select(this),i=t[e[0]].marker,a=w(void 0,i.line,5,2);n.attr("d",e[1]).style("stroke-width",a+"px").call(l.fill,i.color),a&&n.call(l.stroke,i.line.color)}))})).each((function(e){A(e,this,"funnel")})).each((function(e){A(e,this)})).each((function(e){var n=e[0].trace,o=r.select(this).select("g.legendpoints").selectAll("path.legendbox").data(n.visible&&i.traceIs(n,"box-violin")?[e]:[]);o.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),o.exit().remove(),o.each((function(){var e=r.select(this);if("all"!==n.boxpoints&&"all"!==n.points||0!==l.opacity(n.fillcolor)||0!==l.opacity((n.line||{}).color)){var i=w(void 0,n.line,5,2);e.style("stroke-width",i+"px").call(l.fill,n.fillcolor),i&&l.stroke(e,n.line.color)}else{var c=a.minExtend(n,{marker:{size:y?12:a.constrain(n.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});o.call(s.pointStyle,c,t)}}))})).each((function(e){S(e,this,"funnelarea")})).each((function(e){S(e,this,"pie")})).each((function(e){var n,i,o=m(e),l=o.showFill,d=o.showLine,h=o.showGradientLine,f=o.showGradientFill,g=o.anyFill,v=o.anyLine,y=e[0],b=y.trace,_=c(b),A=_.colorscale,S=_.reversescale,M=u.hasMarkers(b)||!g?"M5,0":v?"M5,-2":"M5,-3",T=r.select(this),k=T.select(".legendfill").selectAll("path").data(l||f?[e]:[]);if(k.enter().append("path").classed("js-fill",!0),k.exit().remove(),k.attr("d",M+"h"+x+"v6h-"+x+"z").call((function(e){if(e.size())if(l)s.fillGroupStyle(e,t);else{var n="legendfill-"+b.uid;s.gradient(e,t,n,p(S),A,"fill")}})),d||h){var E=w(void 0,b.line,10,5);i=a.minExtend(b,{line:{width:E}}),n=[a.minExtend(y,{trace:i})]}var C=T.select(".legendlines").selectAll("path").data(d||h?[n]:[]);C.enter().append("path").classed("js-line",!0),C.exit().remove(),C.attr("d",M+(h?"l"+x+",0.0001":"h"+x)).call(d?s.lineGroupStyle:function(e){if(e.size()){var n="legendline-"+b.uid;s.lineGroupStyle(e),s.gradient(e,t,n,p(S),A,"stroke")}})})).each((function(e){var n,i,o=m(e),l=o.anyFill,c=o.anyLine,d=o.showLine,h=o.showMarker,f=e[0],p=f.trace,g=!h&&!c&&!l&&u.hasText(p);function v(e,t,n,r){var i=a.nestedProperty(p,e).get(),o=a.isArrayOrTypedArray(i)&&t?t(i):i;if(y&&o&&void 0!==r&&(o=r),n){if(on[1])return n[1]}return o}function x(e){return f._distinct&&f.index&&e[f.index]?e[f.index]:e[0]}if(h||g||d){var b={},w={};if(h){b.mc=v("marker.color",x),b.mx=v("marker.symbol",x),b.mo=v("marker.opacity",a.mean,[.2,1]),b.mlc=v("marker.line.color",x),b.mlw=v("marker.line.width",a.mean,[0,5],2),w.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var A=v("marker.size",a.mean,[2,16],12);b.ms=A,w.marker.size=A}d&&(w.line={width:v("line.width",x,[0,10],5)}),g&&(b.tx="Aa",b.tp=v("textposition",x),b.ts=10,b.tc=v("textfont.color",x),b.tf=v("textfont.family",x)),n=[a.minExtend(f,b)],(i=a.minExtend(p,w)).selectedpoints=null,i.texttemplate=null}var S=r.select(this).select("g.legendpoints"),M=S.selectAll("path.scatterpts").data(h?n:[]);M.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",_),M.exit().remove(),M.call(s.pointStyle,i,t),h&&(n[0].mrc=3);var T=S.selectAll("g.pointtext").data(g?n:[]);T.enter().append("g").classed("pointtext",!0).append("text").attr("transform",_),T.exit().remove(),T.selectAll("text").call(s.textPointStyle,i,t)})).each((function(e){var t=e[0].trace,n=r.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(t.visible&&"candlestick"===t.type?[e,e]:[]);n.enter().append("path").classed("legendcandle",!0).attr("d",(function(e,t){return t?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"})).attr("transform",_).style("stroke-miterlimit",1),n.exit().remove(),n.each((function(e,n){var i=r.select(this),a=t[n?"increasing":"decreasing"],o=w(void 0,a.line,5,2);i.style("stroke-width",o+"px").call(l.fill,a.fillcolor),o&&l.stroke(i,a.line.color)}))})).each((function(e){var t=e[0].trace,n=r.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(t.visible&&"ohlc"===t.type?[e,e]:[]);n.enter().append("path").classed("legendohlc",!0).attr("d",(function(e,t){return t?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"})).attr("transform",_).style("stroke-miterlimit",1),n.exit().remove(),n.each((function(e,n){var i=r.select(this),a=t[n?"increasing":"decreasing"],o=w(void 0,a.line,5,2);i.style("fill","none").call(s.dashLine,a.line.dash,o),o&&l.stroke(i,a.line.color)}))}))}},42068:function(e,t,n){"use strict";n(93348);e.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar"},bgcolor:{valType:"color",editType:"modebar"},color:{valType:"color",editType:"modebar"},activecolor:{valType:"color",editType:"modebar"},uirevision:{valType:"any",editType:"none"},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"}}},26023:function(e,t,n){"use strict";var r=n(73972),i=n(74875),a=n(41675),o=n(24255),s=n(34031).eraseActiveShape,l=n(71828),c=l._,u=e.exports={};function d(e,t){var n,i,o=t.currentTarget,s=o.getAttribute("data-attr"),l=o.getAttribute("data-val")||!0,c=e._fullLayout,u={},d=a.list(e,null,!0),h=c._cartesianSpikesEnabled;if("zoom"===s){var f,p="in"===l?.5:2,m=(1+p)/2,g=(1-p)/2;for(i=0;i1?(P=["toggleHover"],O=["resetViews"]):v?(R=["zoomInGeo","zoomOutGeo"],P=["hoverClosestGeo"],O=["resetGeo"]):g?(P=["hoverClosest3d"],O=["resetCameraDefault3d","resetCameraLastSave3d"]):w?(R=["zoomInMapbox","zoomOutMapbox"],P=["toggleHover"],O=["resetViewMapbox"]):b?P=["hoverClosestGl2d"]:y?P=["hoverClosestPie"]:M?(P=["hoverClosestCartesian","hoverCompareCartesian"],O=["resetViewSankey"]):P=["toggleHover"];m&&(P=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]);(function(e){for(var t=0;t0)){var m=function(e,t,n){for(var r=n.filter((function(n){return t[n].anchor===e._id})),i=0,a=0;a=r.max)t=N[n+1];else if(e=r.pmax)t=N[n+1];else if(e=0;S--){var M=n.append("path").attr(g).style("opacity",S?.1:v).call(o.stroke,x).call(o.fill,y).call(s.dashLine,S?"solid":_,S?4+b:b);if(p(M,e,a),w){var T=l(e.layout,"selections",a);M.style({cursor:"move"});var k={element:M.node(),plotinfo:f,gd:e,editHelpers:T,isActiveSelection:!0},E=r(c,e);i(E,M,k)}else M.style("pointer-events",S?"all":"none");A[S]=M}var C=A[0];A[1].node().addEventListener("click",(function(){return function(e,t){if(!h(e))return;var n=t.node(),r=+n.getAttribute("data-index");if(r>=0){if(r===e._fullLayout._activeSelectionIndex)return void m(e);e._fullLayout._activeSelectionIndex=r,e._fullLayout._deactivateSelection=m,d(e)}}(e,C)}))}(e._fullLayout._selectionLayer)}function p(e,t,n){var r=n.xref+n.yref;s.setClipUrl(e,"clip"+t._fullLayout._uid+r,t)}function m(e){h(e)&&(e._fullLayout._activeSelectionIndex>=0&&(a(e),delete e._fullLayout._activeSelectionIndex,d(e)))}e.exports={draw:d,drawOne:f,activateLastSelection:function(e){if(!h(e))return;var t=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=t,e._fullLayout._deactivateSelection=m,d(e)}}},53777:function(e,t,n){"use strict";var r=n(79952).P,i=n(1426).extendFlat;e.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:i({},r,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}},90849:function(e){"use strict";e.exports=function(e,t,n){n("newselection.mode"),n("newselection.line.width")&&(n("newselection.line.color"),n("newselection.line.dash")),n("activeselection.fillcolor"),n("activeselection.opacity")}},35855:function(e,t,n){"use strict";var r=n(64505).selectMode,i=n(51873).clearOutline,a=n(60165),o=a.readPaths,s=a.writePaths,l=a.fixDatesForPaths;e.exports=function(e,t){if(e.length){var n=e[0][0];if(n){var a=n.getAttribute("d"),c=t.gd,u=c._fullLayout.newselection,d=t.plotinfo,h=d.xaxis,f=d.yaxis,p=t.isActiveSelection,m=t.dragmode,g=(c.layout||{}).selections||[];if(!r(m)&&void 0!==p){var v=c._fullLayout._activeSelectionIndex;if(v-1,b=[];if(function(e){return e&&Array.isArray(e)&&!0!==e[0].hoverOnBox}(v)){q(e,t,a);var _=function(e,t){var n,r,i=e[0],a=-1,o=[];for(r=0;r0?function(e,t){var n,r,i,a=[];for(i=0;i0&&a.push(n);if(1===a.length&&a[0]===t.searchInfo&&(r=t.searchInfo.cd[0].trace).selectedpoints.length===t.pointNumbers.length){for(i=0;i1)return!1;if((r+=t.selectedpoints.length)>1)return!1}return 1===r}(s)&&(h=K(_))){for(o&&o.remove(),g=0;g=0})(i)&&i._fullLayout._deactivateShape(i),function(e){return e._fullLayout._activeSelectionIndex>=0}(i)&&i._fullLayout._deactivateSelection(i);var o=i._fullLayout._zoomlayer,s=f(n),l=m(n);if(s||l){var c,u,d=o.selectAll(".select-outline-"+r.id);if(d&&i._fullLayout._outlining)s&&(c=A(d,e)),c&&a.call("_guiRelayout",i,{shapes:c}),l&&!U(e)&&(u=S(d,e)),u&&(i._fullLayout._noEmitSelectedAtStart=!0,a.call("_guiRelayout",i,{selections:u}).then((function(){t&&M(i)}))),i._fullLayout._outlining=!1}r.selection={},r.selection.selectionDefs=e.selectionDefs=[],r.selection.mergedPolygons=e.mergedPolygons=[]}function $(e){return e._id}function X(e,t,n,r){if(!e.calcdata)return[];var i,a,o,s=[],l=t.map($),c=n.map($);for(o=0;o0?r[0]:n;return!!t.selectedpoints&&t.selectedpoints.indexOf(i)>-1}function J(e,t,n){var r,i;for(r=0;r-1&&t;if(!a&&t){var te=oe(e,!0);if(te.length){var re=te[0].xref,fe=te[0].yref;if(re&&fe){var pe=ce(te);ue([D(e,re,"x"),D(e,fe,"y")])(Q,pe)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:ee&&de(e,Q),h._reselect=!1}if(!a&&h._deselect){var me=h._deselect;(function(e,t,n){for(var r=0;r=0)S._fullLayout._deactivateShape(S);else if(!x){var n=M.clickmode;C.done(Me).then((function(){if(C.clear(Me),2===e){for(be.remove(),K=0;K-1&&V(t,S,r.xaxes,r.yaxes,r.subplot,r,be),"event"===n&&de(S,void 0);l.click(S,t)})).catch(T.error)}},r.doneFn=function(){Se.remove(),C.done(Me).then((function(){C.clear(Me),!k&&Z&&r.selectionDefs&&(Z.subtract=xe,r.selectionDefs.push(Z),r.mergedPolygons.length=0,[].push.apply(r.mergedPolygons,$)),(k||x)&&Y(r,k),r.doneFnCompleted&&r.doneFnCompleted(Te),b&&de(S,ae)})).catch(T.error)}},clearOutline:x,clearSelectionsCache:Y,selectOnClick:V}},89827:function(e,t,n){"use strict";var r=n(50215),i=n(82196).line,a=n(79952).P,o=n(1426).extendFlat,s=n(44467).templatedArray;n(24695);e.exports=s("shape",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},xref:o({},r.xref,{}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},xanchor:{valType:"any",editType:"calc+arraydraw"},x0:{valType:"any",editType:"calc+arraydraw"},x1:{valType:"any",editType:"calc+arraydraw"},yref:o({},r.yref,{}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},yanchor:{valType:"any",editType:"calc+arraydraw"},y0:{valType:"any",editType:"calc+arraydraw"},y1:{valType:"any",editType:"calc+arraydraw"},path:{valType:"string",editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:o({},i.color,{editType:"arraydraw"}),width:o({},i.width,{editType:"calc+arraydraw"}),dash:o({},a,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw"},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},editType:"arraydraw"})},5627:function(e,t,n){"use strict";var r=n(71828),i=n(89298),a=n(21459),o=n(30477);function s(e){return c(e.line.width,e.xsizemode,e.x0,e.x1,e.path,!1)}function l(e){return c(e.line.width,e.ysizemode,e.y0,e.y1,e.path,!0)}function c(e,t,n,i,s,l){var c=e/2,u=l;if("pixel"===t){var d=s?o.extractPathCoords(s,l?a.paramIsY:a.paramIsX):[n,i],h=r.aggNums(Math.max,null,d),f=r.aggNums(Math.min,null,d),p=f<0?Math.abs(f)+c:c,m=h>0?h+c:c;return{ppad:c,ppadplus:u?p:m,ppadminus:u?m:p}}return{ppad:c}}function u(e,t,n,r,i){var s="category"===e.type||"multicategory"===e.type?e.r2c:e.d2c;if(void 0!==t)return[s(t),s(n)];if(r){var l,c,u,d,h=1/0,f=-1/0,p=r.match(a.segmentRE);for("date"===e.type&&(s=o.decodeDate(s)),l=0;lf&&(f=d)));return f>=h?[h,f]:void 0}}e.exports=function(e){var t=e._fullLayout,n=r.filterVisible(t.shapes);if(n.length&&e._fullData.length)for(var o=0;o1&&(2!==e.length||"Z"!==e[1][0])&&(0===E&&(e[0][0]="M"),t[k]=e,A(),S())}}()}}function F(e,n){!function(e,n){if(t.length)for(var r=0;rL&&a>I&&!n.shiftKey?h.getCursor(o/i,1-s/a):"move";f(t,l),O=l.split("-")[0]}}function ee(r){y(e)||(z&&(b=G(n.xanchor)),N&&(A=q(n.yanchor)),"path"===n.type?P=n.path:(c=z?n.x0:G(n.x0),d=N?n.y0:q(n.y0),v=z?n.x1:G(n.x1),x=N?n.y1:q(n.y1)),cx?(S=d,E="y0",M=x,C="y1"):(S=x,E="y1",M=d,C="y0"),Q(r),ae(s,n),se(t,n,e),Z.moveFn="move"===O?re:ie,Z.altKey=r.altKey)}function te(){y(e)||(f(t),oe(s),_(t,e,n),r.call("_guiRelayout",e,l.getUpdateObj()))}function ne(){y(e)||oe(s)}function re(r,i){if("path"===n.type){var a=function(e){return e},o=a,l=a;z?j("xanchor",n.xanchor=Y(b+r)):(o=function(e){return Y(G(e)+r)},U&&"date"===U.type&&(o=m.encodeDate(o))),N?j("yanchor",n.yanchor=$(A+i)):(l=function(e){return $(q(e)+i)},H&&"date"===H.type&&(l=m.encodeDate(l))),j("path",n.path=w(P,o,l))}else z?j("xanchor",n.xanchor=Y(b+r)):(j("x0",n.x0=Y(c+r)),j("x1",n.x1=Y(v+r))),N?j("yanchor",n.yanchor=$(A+i)):(j("y0",n.y0=$(d+i)),j("y1",n.y1=$(x+i)));t.attr("d",g(e,n)),ae(s,n)}function ie(r,i){if(B){var a=function(e){return e},o=a,l=a;z?j("xanchor",n.xanchor=Y(b+r)):(o=function(e){return Y(G(e)+r)},U&&"date"===U.type&&(o=m.encodeDate(o))),N?j("yanchor",n.yanchor=$(A+i)):(l=function(e){return $(q(e)+i)},H&&"date"===H.type&&(l=m.encodeDate(l))),j("path",n.path=w(P,o,l))}else if(F){if("resize-over-start-point"===O){var u=c+r,h=N?d-i:d+i;j("x0",n.x0=z?u:Y(u)),j("y0",n.y0=N?h:$(h))}else if("resize-over-end-point"===O){var f=v+r,p=N?x-i:x+i;j("x1",n.x1=z?f:Y(f)),j("y1",n.y1=N?p:$(p))}}else{var y=function(e){return-1!==O.indexOf(e)},_=y("n"),V=y("s"),W=y("w"),X=y("e"),Z=_?S+i:S,K=V?M+i:M,J=W?T+r:T,Q=X?k+r:k;N&&(_&&(Z=S-i),V&&(K=M-i)),(!N&&K-Z>I||N&&Z-K>I)&&(j(E,n[E]=N?Z:$(Z)),j(C,n[C]=N?K:$(K))),Q-J>L&&(j(D,n[D]=z?J:Y(J)),j(R,n[R]=z?Q:Y(Q)))}t.attr("d",g(e,n)),ae(s,n)}function ae(e,t){function n(){var n="path"!==t.type,r=e.selectAll(".visual-cue").data([0]),a=1;r.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":a}).classed("visual-cue",!0);var o=G(z?t.xanchor:i.midRange(n?[t.x0,t.x1]:m.extractPathCoords(t.path,p.paramIsX))),s=q(N?t.yanchor:i.midRange(n?[t.y0,t.y1]:m.extractPathCoords(t.path,p.paramIsY)));if(o=m.roundPositionForSharpStrokeRendering(o,a),s=m.roundPositionForSharpStrokeRendering(s,a),z&&N){var l="M"+(o-1-a)+","+(s-1-a)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";r.attr("d",l)}else if(z){var c="M"+(o-1-a)+","+(s-9-a)+"v18 h2 v-18 Z";r.attr("d",c)}else{var u="M"+(o-9-a)+","+(s-1-a)+"h18 v2 h-18 Z";r.attr("d",u)}}(z||N)&&n()}function oe(e){e.selectAll(".visual-cue").remove()}function se(e,t,n){var r=t.xref,i=t.yref,o=a.getFromId(n,r),s=a.getFromId(n,i),l="";"paper"===r||o.autorange||(l+=r),"paper"===i||s.autorange||(l+=i),u.setClipUrl(e,l?"clip"+n._fullLayout._uid+l:null,n)}h.init(Z),X.node().onmousemove=Q}(e,L,l,t,n,O):!0===l.editable&&L.style("pointer-events",R||c.opacity(k)*T<=.5?"stroke":"all");L.node().addEventListener("click",(function(){return function(e,t){if(!x(e))return;var n=t.node(),r=+n.getAttribute("data-index");if(r>=0){if(r===e._fullLayout._activeShapeIndex)return void A(e);e._fullLayout._activeShapeIndex=r,e._fullLayout._deactivateShape=A,v(e)}}(e,L)}))}}function _(e,t,n){var r=(n.xref+n.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");u.setClipUrl(e,r?"clip"+t._fullLayout._uid+r:null,t)}function w(e,t,n){return e.replace(p.segmentRE,(function(e){var r=0,i=e.charAt(0),a=p.paramIsX[i],o=p.paramIsY[i],s=p.numParams[i];return i+e.substr(1).replace(p.paramRE,(function(e){return r>=s||(a[r]?e=t(e):o[r]&&(e=n(e)),r++),e}))}))}function A(e){x(e)&&(e._fullLayout._activeShapeIndex>=0&&(l(e),delete e._fullLayout._activeShapeIndex,v(e)))}e.exports={draw:v,drawOne:b,eraseActiveShape:function(e){if(!x(e))return;l(e);var t=e._fullLayout._activeShapeIndex,n=(e.layout||{}).shapes||[];if(t0&&lf&&(e="X"),e}));return a>f&&(p=p.replace(/[\s,]*X.*/,""),i.log("Ignoring extra params in segment "+e)),u+p}))}(n,s,c);if("pixel"===n.xsizemode){var b=s(n.xanchor);u=b+n.x0,d=b+n.x1}else u=s(n.x0),d=s(n.x1);if("pixel"===n.ysizemode){var _=c(n.yanchor);h=_-n.y0,f=_-n.y1}else h=c(n.y0),f=c(n.y1);if("line"===p)return"M"+u+","+h+"L"+d+","+f;if("rect"===p)return"M"+u+","+h+"H"+d+"V"+f+"H"+u+"Z";var w=(u+d)/2,A=(h+f)/2,S=Math.abs(w-u),M=Math.abs(A-h),T="A"+S+","+M,k=w+S+","+A;return"M"+k+T+" 0 1,1 "+(w+","+(A-M))+T+" 0 0,1 "+k+"Z"}},89853:function(e,t,n){"use strict";var r=n(34031);e.exports={moduleType:"component",name:"shapes",layoutAttributes:n(89827),supplyLayoutDefaults:n(84726),supplyDrawNewShapeDefaults:n(45547),includeBasePlot:n(76325)("shapes"),calcAutorange:n(5627),draw:r.draw,drawOne:r.drawOne}},75067:function(e,t,n){"use strict";var r=n(41940),i=n(35025),a=n(1426).extendDeepAll,o=n(30962).overrideAll,s=n(85594),l=n(44467).templatedArray,c=n(98292),u=l("step",{visible:{valType:"boolean",dflt:!0},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"},execute:{valType:"boolean",dflt:!0}});e.exports=o(l("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:u,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:a(i({editType:"arraydraw"}),{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:s.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:r({})},font:r({}),activebgcolor:{valType:"color",dflt:c.gripBgActiveColor},bgcolor:{valType:"color",dflt:c.railBgColor},bordercolor:{valType:"color",dflt:c.railBorderColor},borderwidth:{valType:"number",min:0,dflt:c.railBorderWidth},ticklen:{valType:"number",min:0,dflt:c.tickLength},tickcolor:{valType:"color",dflt:c.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:c.minorTickLength}}),"arraydraw","from-root")},98292:function(e){"use strict";e.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}},12343:function(e,t,n){"use strict";var r=n(71828),i=n(85501),a=n(75067),o=n(98292).name,s=a.steps;function l(e,t,n){function o(n,i){return r.coerce(e,t,a,n,i)}for(var s=i(e,t,{name:"steps",handleItemDefaults:c}),l=0,u=0;u0&&(s=s.transition().duration(t.transition.duration).ease(t.transition.easing)),s.attr("transform",l(o-.5*d.gripWidth,t._dims.currentValueTotalHeight))}}function E(e,t){var n=e._dims;return n.inputAreaStart+d.stepInset+(n.inputAreaLength-2*d.stepInset)*Math.min(1,Math.max(0,t))}function C(e,t){var n=e._dims;return Math.min(1,Math.max(0,(t-d.stepInset-n.inputAreaStart)/(n.inputAreaLength-2*d.stepInset-2*n.inputAreaStart)))}function D(e,t,n){var r=n._dims,i=s.ensureSingle(e,"rect",d.railTouchRectClass,(function(r){r.call(M,t,e,n).style("pointer-events","all")}));i.attr({width:r.inputAreaLength,height:Math.max(r.inputAreaWidth,d.tickOffset+n.ticklen+r.labelHeight)}).call(a.fill,n.bgcolor).attr("opacity",0),o.setTranslate(i,0,r.currentValueTotalHeight)}function R(e,t){var n=t._dims,r=n.inputAreaLength-2*d.railInset,i=s.ensureSingle(e,"rect",d.railRectClass);i.attr({width:r,height:d.railWidth,rx:d.railRadius,ry:d.railRadius,"shape-rendering":"crispEdges"}).call(a.stroke,t.bordercolor).call(a.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),o.setTranslate(i,d.railInset,.5*(n.inputAreaWidth-d.railWidth)+n.currentValueTotalHeight)}e.exports=function(e){var t=e._context.staticPlot,n=e._fullLayout,a=function(e,t){for(var n=e[d.name],r=[],i=0;i0?[0]:[]);function l(t){t._commandObserver&&(t._commandObserver.remove(),delete t._commandObserver),i.autoMargin(e,g(t))}if(s.enter().append("g").classed(d.containerClassName,!0).style("cursor",t?null:"ew-resize"),s.exit().each((function(){r.select(this).selectAll("g."+d.groupClassName).each(l)})).remove(),0!==a.length){var c=s.selectAll("g."+d.groupClassName).data(a,v);c.enter().append("g").classed(d.groupClassName,!0),c.exit().each(l).remove();for(var u=0;u0||h<0){var y={left:[-p,0],right:[p,0],top:[0,-p],bottom:[0,p]}[b.side];t.attr("transform",l(y[0],y[1]))}}}return z.call(N),O&&(E?z.on(".opacity",null):(M=0,T=!0,z.text(y).on("mouseover.opacity",(function(){r.select(this).transition().duration(h.SHOW_PLACEHOLDER).style("opacity",1)})).on("mouseout.opacity",(function(){r.select(this).transition().duration(h.HIDE_PLACEHOLDER).style("opacity",0)}))),z.call(d.makeEditable,{gd:e}).on("edit",(function(t){void 0!==x?o.call("_guiRestyle",e,v,t,x):o.call("_guiRelayout",e,v,t)})).on("cancel",(function(){this.text(this.attr("data-unformatted")).call(N)})).on("input",(function(e){this.text(e||" ").call(d.positionText,_.x,_.y)}))),z.classed("js-placeholder",T),A}}},7163:function(e,t,n){"use strict";var r=n(41940),i=n(22399),a=n(1426).extendFlat,o=n(30962).overrideAll,s=n(35025),l=n(44467).templatedArray,c=l("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});e.exports=o(l("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:c,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:a(s({editType:"arraydraw"}),{}),font:r({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:i.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},75909:function(e){"use strict";e.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"\u25c4",right:"\u25ba",up:"\u25b2",down:"\u25bc"}}},64897:function(e,t,n){"use strict";var r=n(71828),i=n(85501),a=n(7163),o=n(75909).name,s=a.buttons;function l(e,t,n){function o(n,i){return r.coerce(e,t,a,n,i)}o("visible",i(e,t,{name:"buttons",handleItemDefaults:c}).length>0)&&(o("active"),o("direction"),o("type"),o("showactive"),o("x"),o("y"),r.noneOrAll(e,t,["x","y"]),o("xanchor"),o("yanchor"),o("pad.t"),o("pad.r"),o("pad.b"),o("pad.l"),r.coerceFont(o,"font",n.font),o("bgcolor",n.paper_bgcolor),o("bordercolor"),o("borderwidth"))}function c(e,t){function n(n,i){return r.coerce(e,t,s,n,i)}n("visible","skip"===e.method||Array.isArray(e.args))&&(n("method"),n("args"),n("args2"),n("label"),n("execute"))}e.exports=function(e,t){i(e,t,{name:o,handleItemDefaults:l})}},13689:function(e,t,n){"use strict";var r=n(39898),i=n(74875),a=n(7901),o=n(91424),s=n(71828),l=n(63893),c=n(44467).arrayEditor,u=n(18783).LINE_SPACING,d=n(75909),h=n(25849);function f(e){return e._index}function p(e,t){return+e.attr(d.menuIndexAttrName)===t._index}function m(e,t,n,r,i,a,o,s){t.active=o,c(e.layout,d.name,t).applyUpdate("active",o),"buttons"===t.type?v(e,r,null,null,t):"dropdown"===t.type&&(i.attr(d.menuIndexAttrName,"-1"),g(e,r,i,a,t),s||v(e,r,i,a,t))}function g(e,t,n,r,i){var a=s.ensureSingle(t,"g",d.headerClassName,(function(e){e.style("pointer-events","all")})),l=i._dims,c=i.active,u=i.buttons[c]||d.blankHeaderOpts,h={y:i.pad.t,yPad:0,x:i.pad.l,xPad:0,index:0},f={width:l.headerWidth,height:l.headerHeight};a.call(y,i,u,e).call(T,i,h,f),s.ensureSingle(t,"text",d.headerArrowClassName,(function(e){e.attr("text-anchor","end").call(o.font,i.font).text(d.arrowSymbol[i.direction])})).attr({x:l.headerWidth-d.arrowOffsetX+i.pad.l,y:l.headerHeight/2+d.textOffsetY+i.pad.t}),a.on("click",(function(){n.call(k,String(p(n,i)?-1:i._index)),v(e,t,n,r,i)})),a.on("mouseover",(function(){a.call(w)})),a.on("mouseout",(function(){a.call(A,i)})),o.setTranslate(t,l.lx,l.ly)}function v(e,t,n,a,o){n||(n=t).attr("pointer-events","all");var l=function(e){return-1===+e.attr(d.menuIndexAttrName)}(n)&&"buttons"!==o.type?[]:o.buttons,c="dropdown"===o.type?d.dropdownButtonClassName:d.buttonClassName,u=n.selectAll("g."+c).data(s.filterVisible(l)),h=u.enter().append("g").classed(c,!0),f=u.exit();"dropdown"===o.type?(h.attr("opacity","0").transition().attr("opacity","1"),f.transition().attr("opacity","0").remove()):f.remove();var p=0,g=0,v=o._dims,x=-1!==["up","down"].indexOf(o.direction);"dropdown"===o.type&&(x?g=v.headerHeight+d.gapButtonHeader:p=v.headerWidth+d.gapButtonHeader),"dropdown"===o.type&&"up"===o.direction&&(g=-d.gapButtonHeader+d.gapButton-v.openHeight),"dropdown"===o.type&&"left"===o.direction&&(p=-d.gapButtonHeader+d.gapButton-v.openWidth);var b={x:v.lx+p+o.pad.l,y:v.ly+g+o.pad.t,yPad:d.gapButton,xPad:d.gapButton,index:0},S={l:b.x+o.borderwidth,t:b.y+o.borderwidth};u.each((function(s,l){var c=r.select(this);c.call(y,o,s,e).call(T,o,b),c.on("click",(function(){r.event.defaultPrevented||(s.execute&&(s.args2&&o.active===l?(m(e,o,0,t,n,a,-1),i.executeAPICommand(e,s.method,s.args2)):(m(e,o,0,t,n,a,l),i.executeAPICommand(e,s.method,s.args))),e.emit("plotly_buttonclicked",{menu:o,button:s,active:o.active}))})),c.on("mouseover",(function(){c.call(w)})),c.on("mouseout",(function(){c.call(A,o),u.call(_,o)}))})),u.call(_,o),x?(S.w=Math.max(v.openWidth,v.headerWidth),S.h=b.y-S.t):(S.w=b.x-S.l,S.h=Math.max(v.openHeight,v.headerHeight)),S.direction=o.direction,a&&(u.size()?function(e,t,n,r,i,a){var o,s,l,c=i.direction,u="up"===c||"down"===c,h=i._dims,f=i.active;if(u)for(s=0,l=0;l0?[0]:[]);if(o.enter().append("g").classed(d.containerClassName,!0).style("cursor","pointer"),o.exit().each((function(){r.select(this).selectAll("g."+d.headerGroupClassName).each(a)})).remove(),0!==n.length){var l=o.selectAll("g."+d.headerGroupClassName).data(n,f);l.enter().append("g").classed(d.headerGroupClassName,!0);for(var c=s.ensureSingle(o,"g",d.dropdownButtonGroupClassName,(function(e){e.style("pointer-events","all")})),u=0;uw,M=s.barLength+2*s.barPad,T=s.barWidth+2*s.barPad,k=p,E=g+v;E+T>c&&(E=c-T);var C=this.container.selectAll("rect.scrollbar-horizontal").data(S?[0]:[]);C.exit().on(".drag",null).remove(),C.enter().append("rect").classed("scrollbar-horizontal",!0).call(i.fill,s.barColor),S?(this.hbar=C.attr({rx:s.barRadius,ry:s.barRadius,x:k,y:E,width:M,height:T}),this._hbarXMin=k+M/2,this._hbarTranslateMax=w-M):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var D=v>A,R=s.barWidth+2*s.barPad,P=s.barLength+2*s.barPad,O=p+m,L=g;O+R>l&&(O=l-R);var I=this.container.selectAll("rect.scrollbar-vertical").data(D?[0]:[]);I.exit().on(".drag",null).remove(),I.enter().append("rect").classed("scrollbar-vertical",!0).call(i.fill,s.barColor),D?(this.vbar=I.attr({rx:s.barRadius,ry:s.barRadius,x:O,y:L,width:R,height:P}),this._vbarYMin=L+P/2,this._vbarTranslateMax=A-P):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var z=this.id,N=u-.5,F=D?d+R+.5:d+.5,B=h-.5,j=S?f+T+.5:f+.5,U=o._topdefs.selectAll("#"+z).data(S||D?[0]:[]);if(U.exit().remove(),U.enter().append("clipPath").attr("id",z).append("rect"),S||D?(this._clipRect=U.select("rect").attr({x:Math.floor(N),y:Math.floor(B),width:Math.ceil(F)-Math.floor(N),height:Math.ceil(j)-Math.floor(B)}),this.container.call(a.setClipUrl,z,this.gd),this.bg.attr({x:p,y:g,width:m,height:v})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(a.setClipUrl,null),delete this._clipRect),S||D){var V=r.behavior.drag().on("dragstart",(function(){r.event.sourceEvent.preventDefault()})).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(V);var H=r.behavior.drag().on("dragstart",(function(){r.event.sourceEvent.preventDefault(),r.event.sourceEvent.stopPropagation()})).on("drag",this._onBarDrag.bind(this));S&&this.hbar.on(".drag",null).call(H),D&&this.vbar.on(".drag",null).call(H)}this.setTranslate(t,n)},s.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(a.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},s.prototype._onBoxDrag=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e-=r.event.dx),this.vbar&&(t-=r.event.dy),this.setTranslate(e,t)},s.prototype._onBoxWheel=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e+=r.event.deltaY),this.vbar&&(t+=r.event.deltaY),this.setTranslate(e,t)},s.prototype._onBarDrag=function(){var e=this.translateX,t=this.translateY;if(this.hbar){var n=e+this._hbarXMin,i=n+this._hbarTranslateMax;e=(o.constrain(r.event.x,n,i)-n)/(i-n)*(this.position.w-this._box.w)}if(this.vbar){var a=t+this._vbarYMin,s=a+this._vbarTranslateMax;t=(o.constrain(r.event.y,a,s)-a)/(s-a)*(this.position.h-this._box.h)}this.setTranslate(e,t)},s.prototype.setTranslate=function(e,t){var n=this.position.w-this._box.w,r=this.position.h-this._box.h;if(e=o.constrain(e||0,0,n),t=o.constrain(t||0,0,r),this.translateX=e,this.translateY=t,this.container.call(a.setTranslate,this._box.l-this.position.l-e,this._box.t-this.position.t-t),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+e-.5),y:Math.floor(this.position.t+t-.5)}),this.hbar){var i=e/n;this.hbar.call(a.setTranslate,e+i*this._hbarTranslateMax,t)}if(this.vbar){var s=t/r;this.vbar.call(a.setTranslate,e,t+s*this._vbarTranslateMax)}}},18783:function(e){"use strict";e.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}},24695:function(e){"use strict";e.exports={axisRefDescription:function(e,t,n){return["If set to a",e,"axis id (e.g. *"+e+"* or","*"+e+"2*), the `"+e+"` position refers to a",e,"coordinate. If set to *paper*, the `"+e+"`","position refers to the distance from the",t,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",t,"("+n+"). If set to a",e,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",t,"of the domain of that axis: e.g.,","*"+e+"2 domain* refers to the domain of the second",e," axis and a",e,"position of 0.5 refers to the","point between the",t,"and the",n,"of the domain of the","second",e,"axis."].join(" ")}}},22372:function(e){"use strict";e.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25b2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25bc"}}},31562:function(e){"use strict";e.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}},74808:function(e){"use strict";e.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},29659:function(e){"use strict";e.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}},87381:function(e){"use strict";e.exports={circle:"\u25cf","circle-open":"\u25cb",square:"\u25a0","square-open":"\u25a1",diamond:"\u25c6","diamond-open":"\u25c7",cross:"+",x:"\u274c"}},37822:function(e){"use strict";e.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},50606:function(e){"use strict";e.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:2440587.5,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:"\u2212"}},77922:function(e,t){"use strict";t.xmlns="http://www.w3.org/2000/xmlns/",t.svg="http://www.w3.org/2000/svg",t.xlink="http://www.w3.org/1999/xlink",t.svgAttrs={xmlns:t.svg,"xmlns:xlink":t.xlink}},8729:function(e,t,n){"use strict";t.version=n(11506).version,n(7417),n(98847);for(var r=n(73972),i=t.register=r.register,a=n(10641),o=Object.keys(a),s=0;s",""," ",""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}},99863:function(e,t){"use strict";t.isLeftAnchor=function(e){return"left"===e.xanchor||"auto"===e.xanchor&&e.x<=1/3},t.isCenterAnchor=function(e){return"center"===e.xanchor||"auto"===e.xanchor&&e.x>1/3&&e.x<2/3},t.isRightAnchor=function(e){return"right"===e.xanchor||"auto"===e.xanchor&&e.x>=2/3},t.isTopAnchor=function(e){return"top"===e.yanchor||"auto"===e.yanchor&&e.y>=2/3},t.isMiddleAnchor=function(e){return"middle"===e.yanchor||"auto"===e.yanchor&&e.y>1/3&&e.y<2/3},t.isBottomAnchor=function(e){return"bottom"===e.yanchor||"auto"===e.yanchor&&e.y<=1/3}},26348:function(e,t,n){"use strict";var r=n(64872),i=r.mod,a=r.modHalf,o=Math.PI,s=2*o;function l(e){return Math.abs(e[1]-e[0])>s-1e-14}function c(e,t){return a(t-e,s)}function u(e,t){if(l(t))return!0;var n,r;t[0](r=i(r,s))&&(r+=s);var a=i(e,s),o=a+s;return a>=n&&a<=r||o>=n&&o<=r}function d(e,t,n,r,i,a,c){i=i||0,a=a||0;var u,d,h,f,p,m=l([n,r]);function g(e,t){return[e*Math.cos(t)+i,a-e*Math.sin(t)]}m?(u=0,d=o,h=s):n=i&&e<=a);var i,a},pathArc:function(e,t,n,r,i){return d(null,e,t,n,r,i,0)},pathSector:function(e,t,n,r,i){return d(null,e,t,n,r,i,1)},pathAnnulus:function(e,t,n,r,i,a){return d(e,t,n,r,i,a,1)}}},73627:function(e,t){"use strict";var n=Array.isArray,r=ArrayBuffer,i=DataView;function a(e){return r.isView(e)&&!(e instanceof i)}function o(e){return n(e)||a(e)}function s(e,t,n){if(o(e)){if(o(e[0])){for(var r=n,i=0;ii.max?t.set(n):t.set(+e)}},integer:{coerceFunction:function(e,t,n,i){e%1||!r(e)||void 0!==i.min&&ei.max?t.set(n):t.set(+e)}},string:{coerceFunction:function(e,t,n,r){if("string"!==typeof e){var i="number"===typeof e;!0!==r.strict&&i?t.set(String(e)):t.set(n)}else r.noBlank&&!e?t.set(n):t.set(e)}},color:{coerceFunction:function(e,t,n){i(e).isValid()?t.set(e):t.set(n)}},colorlist:{coerceFunction:function(e,t,n){Array.isArray(e)&&e.length&&e.every((function(e){return i(e).isValid()}))?t.set(e):t.set(n)}},colorscale:{coerceFunction:function(e,t,n){t.set(o.get(e,n))}},angle:{coerceFunction:function(e,t,n){"auto"===e?t.set("auto"):r(e)?t.set(d(+e,360)):t.set(n)}},subplotid:{coerceFunction:function(e,t,n,r){var i=r.regex||u(n);"string"===typeof e&&i.test(e)?t.set(e):t.set(n)},validateFunction:function(e,t){var n=t.dflt;return e===n||"string"===typeof e&&!!u(n).test(e)}},flaglist:{coerceFunction:function(e,t,n,r){if(-1===(r.extras||[]).indexOf(e))if("string"===typeof e){for(var i=e.split("+"),a=0;a=r&&e<=i?e:u}if("string"!==typeof e&&"number"!==typeof e)return u;e=String(e);var c=_(n),v=e.charAt(0);!c||"G"!==v&&"g"!==v||(e=e.substr(1),n="");var w=c&&"chinese"===n.substr(0,7),A=e.match(w?x:y);if(!A)return u;var S=A[1],M=A[3]||"1",T=Number(A[5]||1),k=Number(A[7]||0),E=Number(A[9]||0),C=Number(A[11]||0);if(c){if(2===S.length)return u;var D;S=Number(S);try{var R=g.getComponentMethod("calendars","getCal")(n);if(w){var P="i"===M.charAt(M.length-1);M=parseInt(M,10),D=R.newDate(S,R.toMonthIndex(S,M,P),T)}else D=R.newDate(S,Number(M),T)}catch(L){return u}return D?(D.toJD()-m)*d+k*h+E*f+C*p:u}S=2===S.length?(Number(S)+2e3-b)%100+b:Number(S),M-=1;var O=new Date(Date.UTC(2e3,M,T,k,E));return O.setUTCFullYear(S),O.getUTCMonth()!==M||O.getUTCDate()!==T?u:O.getTime()+C*p},r=t.MIN_MS=t.dateTime2ms("-9999"),i=t.MAX_MS=t.dateTime2ms("9999-12-31 23:59:59.9999"),t.isDateTime=function(e,n){return t.dateTime2ms(e,n)!==u};var A=90*d,S=3*h,M=5*f;function T(e,t,n,r,i){if((t||n||r||i)&&(e+=" "+w(t,2)+":"+w(n,2),(r||i)&&(e+=":"+w(r,2),i))){for(var a=4;i%10===0;)a-=1,i/=10;e+="."+w(i,a)}return e}t.ms2DateTime=function(e,t,n){if("number"!==typeof e||!(e>=r&&e<=i))return u;t||(t=0);var a,o,s,c,y,x,b=Math.floor(10*l(e+.05,1)),w=Math.round(e-b/10);if(_(n)){var k=Math.floor(w/d)+m,E=Math.floor(l(e,d));try{a=g.getComponentMethod("calendars","getCal")(n).fromJD(k).formatDate("yyyy-mm-dd")}catch(C){a=v("G%Y-%m-%d")(new Date(w))}if("-"===a.charAt(0))for(;a.length<11;)a="-0"+a.substr(1);else for(;a.length<10;)a="0"+a;o=t=r+d&&e<=i-d))return u;var t=Math.floor(10*l(e+.05,1)),n=new Date(Math.round(e-t/10));return T(a("%Y-%m-%d")(n),n.getHours(),n.getMinutes(),n.getSeconds(),10*n.getUTCMilliseconds()+t)},t.cleanDate=function(e,n,r){if(e===u)return n;if(t.isJSDate(e)||"number"===typeof e&&isFinite(e)){if(_(r))return s.error("JS Dates and milliseconds are incompatible with world calendars",e),n;if(!(e=t.ms2DateTimeLocal(+e))&&void 0!==n)return n}else if(!t.isDateTime(e,r))return s.error("unrecognized date",e),n;return e};var k=/%\d?f/g,E=/%h/g,C={1:"1",2:"1",3:"2",4:"2"};function D(e,t,n,r){e=e.replace(k,(function(e){var n=Math.min(+e.charAt(1)||6,6);return(t/1e3%1+2).toFixed(n).substr(2).replace(/0+$/,"")||"0"}));var i=new Date(Math.floor(t+.05));if(e=e.replace(E,(function(){return C[n("%q")(i)]})),_(r))try{e=g.getComponentMethod("calendars","worldCalFmt")(e,t,r)}catch(a){return"Invalid"}return n(e)(i)}var R=[59,59.9,59.99,59.999,59.9999];t.formatDate=function(e,t,n,r,i,a){if(i=_(i)&&i,!t)if("y"===n)t=a.year;else if("m"===n)t=a.month;else{if("d"!==n)return function(e,t){var n=l(e+.05,d),r=w(Math.floor(n/h),2)+":"+w(l(Math.floor(n/f),60),2);if("M"!==t){o(t)||(t=0);var i=(100+Math.min(l(e/p,60),R[t])).toFixed(t).substr(1);t>0&&(i=i.replace(/0+$/,"").replace(/[\.]$/,"")),r+=":"+i}return r}(e,n)+"\n"+D(a.dayMonthYear,e,r,i);t=a.dayMonth+"\n"+a.year}return D(t,e,r,i)};var P=3*d;t.incrementMonth=function(e,t,n){n=_(n)&&n;var r=l(e,d);if(e=Math.round(e-r),n)try{var i=Math.round(e/d)+m,a=g.getComponentMethod("calendars","getCal")(n),o=a.fromJD(i);return t%12?a.add(o,t,"m"):a.add(o,t/12,"y"),(o.toJD()-m)*d+r}catch(u){s.error("invalid ms "+e+" in calendar "+n)}var c=new Date(e+P);return c.setUTCMonth(c.getUTCMonth()+t)+r-P},t.findExactDates=function(e,t){for(var n,r,i=0,a=0,s=0,l=0,c=_(t)&&g.getComponentMethod("calendars","getCal")(t),u=0;u0&&e[t+1][0]<0)return t;return null}switch(t="RUS"===s||"FJI"===s?function(e){var t;if(null===c(e))t=e;else for(t=new Array(e.length),i=0;it?n[r++]=[e[i][0]+360,e[i][1]]:i===t?(n[r++]=e[i],n[r++]=[e[i][0],-90]):n[r++]=e[i];var a=h.tester(n);a.pts.pop(),l.push(a)}:function(e){l.push(h.tester(e))},a.type){case"MultiPolygon":for(n=0;ni&&(i=c,t=l)}else t=n;return o.default(t).geometry.coordinates}(u),r.fIn=e,r.fOut=u,s.push(u)}else c.log(["Location",r.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete i[n]}switch(n.type){case"FeatureCollection":var h=n.features;for(r=0;r100?(clearInterval(a),r("Unexpected error while fetching from "+e)):void i++}),50)}))}for(var o=0;o0&&(n.push(i),i=[])}return i.length>0&&n.push(i),n},t.makeLine=function(e){return 1===e.length?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e}},t.makePolygon=function(e){if(1===e.length)return{type:"Polygon",coordinates:e};for(var t=new Array(e.length),n=0;n1||m<0||m>1?null:{x:e+l*m,y:t+d*m}}function l(e,t,n,r,i){var a=r*e+i*t;if(a<0)return r*r+i*i;if(a>n){var o=r-e,s=i-t;return o*o+s*s}var l=r*t-i*e;return l*l/n}t.segmentsIntersect=s,t.segmentDistance=function(e,t,n,r,i,a,o,c){if(s(e,t,n,r,i,a,o,c))return 0;var u=n-e,d=r-t,h=o-i,f=c-a,p=u*u+d*d,m=h*h+f*f,g=Math.min(l(u,d,p,i-e,a-t),l(u,d,p,o-e,c-t),l(h,f,m,e-i,t-a),l(h,f,m,n-i,r-a));return Math.sqrt(g)},t.getTextLocation=function(e,t,n,s){if(e===i&&s===a||(r={},i=e,a=s),r[n])return r[n];var l=e.getPointAtLength(o(n-s/2,t)),c=e.getPointAtLength(o(n+s/2,t)),u=Math.atan((c.y-l.y)/(c.x-l.x)),d=e.getPointAtLength(o(n,t)),h={x:(4*d.x+l.x+c.x)/6,y:(4*d.y+l.y+c.y)/6,theta:u};return r[n]=h,h},t.clearLocationCache=function(){i=null},t.getVisibleSegment=function(e,t,n){var r,i,a=t.left,o=t.right,s=t.top,l=t.bottom,c=0,u=e.getTotalLength(),d=u;function h(t){var n=e.getPointAtLength(t);0===t?r=n:t===u&&(i=n);var c=n.xo?n.x-o:0,d=n.yl?n.y-l:0;return Math.sqrt(c*c+d*d)}for(var f=h(c);f;){if((c+=f+n)>d)return;f=h(c)}for(f=h(d);f;){if(c>(d-=f+n))return;f=h(d)}return{min:c,max:d,len:d-c,total:u,isClosed:0===c&&d===u&&Math.abs(r.x-i.x)<.1&&Math.abs(r.y-i.y)<.1}},t.findPointOnPath=function(e,t,n,r){for(var i,a,o,s=(r=r||{}).pathLength||e.getTotalLength(),l=r.tolerance||.001,c=r.iterationLimit||30,u=e.getPointAtLength(0)[n]>e.getPointAtLength(s)[n]?-1:1,d=0,h=0,f=s;d0?f=i:h=i,d++}return a}},81697:function(e,t,n){"use strict";var r=n(92770),i=n(84267),a=n(25075),o=n(21081),s=n(22399).defaultLine,l=n(73627).isArrayOrTypedArray,c=a(s);function u(e,t){var n=e;return n[3]*=t,n}function d(e){if(r(e))return c;var t=a(e);return t.length?t:c}function h(e){return r(e)?e:1}e.exports={formatColor:function(e,t,n){var r,i,s,f,p,m=e.color,g=l(m),v=l(t),y=o.extractOpts(e),x=[];if(r=void 0!==y.colorscale?o.makeColorScaleFuncFromTrace(e):d,i=g?function(e,t){return void 0===e[t]?c:a(r(e[t]))}:d,s=v?function(e,t){return void 0===e[t]?1:h(e[t])}:h,g||v)for(var b=0;b1?(n*e+n*t)/n:e+t,i=String(r).length;if(i>16){var a=String(t).length;if(i>=String(e).length+a){var o=parseFloat(r).toPrecision(12);-1===o.indexOf("e+")&&(r=+o)}}return r}},71828:function(e,t,n){"use strict";var r=n(39898),i=n(84096).g0,a=n(60721).WU,o=n(92770),s=n(50606),l=s.FP_SAFE,c=-l,u=s.BADNUM,d=e.exports={};d.adjustFormat=function(e){return!e||/^\d[.]\df/.test(e)||/[.]\d%/.test(e)?e:"0.f"===e?"~f":/^\d%/.test(e)?"~%":/^\ds/.test(e)?"~s":!/^[~,.0$]/.test(e)&&/[&fps]/.test(e)?"~"+e:e};var h={};d.warnBadFormat=function(e){var t=String(e);h[t]||(h[t]=1,d.warn('encountered bad format: "'+t+'"'))},d.noFormat=function(e){return String(e)},d.numberFormat=function(e){var t;try{t=a(d.adjustFormat(e))}catch(n){return d.warnBadFormat(e),d.noFormat}return t},d.nestedProperty=n(65487),d.keyedContainer=n(66636),d.relativeAttr=n(6962),d.isPlainObject=n(41965),d.toLogRange=n(58163),d.relinkPrivateKeys=n(51332);var f=n(73627);d.isTypedArray=f.isTypedArray,d.isArrayOrTypedArray=f.isArrayOrTypedArray,d.isArray1D=f.isArray1D,d.ensureArray=f.ensureArray,d.concat=f.concat,d.maxRowLength=f.maxRowLength,d.minRowLength=f.minRowLength;var p=n(64872);d.mod=p.mod,d.modHalf=p.modHalf;var m=n(96554);d.valObjectMeta=m.valObjectMeta,d.coerce=m.coerce,d.coerce2=m.coerce2,d.coerceFont=m.coerceFont,d.coercePattern=m.coercePattern,d.coerceHoverinfo=m.coerceHoverinfo,d.coerceSelectionMarkerOpacity=m.coerceSelectionMarkerOpacity,d.validate=m.validate;var g=n(41631);d.dateTime2ms=g.dateTime2ms,d.isDateTime=g.isDateTime,d.ms2DateTime=g.ms2DateTime,d.ms2DateTimeLocal=g.ms2DateTimeLocal,d.cleanDate=g.cleanDate,d.isJSDate=g.isJSDate,d.formatDate=g.formatDate,d.incrementMonth=g.incrementMonth,d.dateTick0=g.dateTick0,d.dfltRange=g.dfltRange,d.findExactDates=g.findExactDates,d.MIN_MS=g.MIN_MS,d.MAX_MS=g.MAX_MS;var v=n(65888);d.findBin=v.findBin,d.sorterAsc=v.sorterAsc,d.sorterDes=v.sorterDes,d.distinctVals=v.distinctVals,d.roundUp=v.roundUp,d.sort=v.sort,d.findIndexOfMin=v.findIndexOfMin,d.sortObjectKeys=n(78607);var y=n(80038);d.aggNums=y.aggNums,d.len=y.len,d.mean=y.mean,d.median=y.median,d.midRange=y.midRange,d.variance=y.variance,d.stdev=y.stdev,d.interp=y.interp;var x=n(35657);d.init2dArray=x.init2dArray,d.transposeRagged=x.transposeRagged,d.dot=x.dot,d.translationMatrix=x.translationMatrix,d.rotationMatrix=x.rotationMatrix,d.rotationXYMatrix=x.rotationXYMatrix,d.apply3DTransform=x.apply3DTransform,d.apply2DTransform=x.apply2DTransform,d.apply2DTransform2=x.apply2DTransform2,d.convertCssMatrix=x.convertCssMatrix,d.inverseTransformMatrix=x.inverseTransformMatrix;var b=n(26348);d.deg2rad=b.deg2rad,d.rad2deg=b.rad2deg,d.angleDelta=b.angleDelta,d.angleDist=b.angleDist,d.isFullCircle=b.isFullCircle,d.isAngleInsideSector=b.isAngleInsideSector,d.isPtInsideSector=b.isPtInsideSector,d.pathArc=b.pathArc,d.pathSector=b.pathSector,d.pathAnnulus=b.pathAnnulus;var _=n(99863);d.isLeftAnchor=_.isLeftAnchor,d.isCenterAnchor=_.isCenterAnchor,d.isRightAnchor=_.isRightAnchor,d.isTopAnchor=_.isTopAnchor,d.isMiddleAnchor=_.isMiddleAnchor,d.isBottomAnchor=_.isBottomAnchor;var w=n(87642);d.segmentsIntersect=w.segmentsIntersect,d.segmentDistance=w.segmentDistance,d.getTextLocation=w.getTextLocation,d.clearLocationCache=w.clearLocationCache,d.getVisibleSegment=w.getVisibleSegment,d.findPointOnPath=w.findPointOnPath;var A=n(1426);d.extendFlat=A.extendFlat,d.extendDeep=A.extendDeep,d.extendDeepAll=A.extendDeepAll,d.extendDeepNoArrays=A.extendDeepNoArrays;var S=n(47769);d.log=S.log,d.warn=S.warn,d.error=S.error;var M=n(30587);d.counterRegex=M.counter;var T=n(79990);d.throttle=T.throttle,d.throttleDone=T.done,d.clearThrottle=T.clear;var k=n(24401);function E(e){var t={};for(var n in e)for(var r=e[n],i=0;il||e=t)&&(o(e)&&e>=0&&e%1===0)},d.noop=n(64213),d.identity=n(23389),d.repeat=function(e,t){for(var n=new Array(t),r=0;rn?Math.max(n,Math.min(t,e)):Math.max(t,Math.min(n,e))},d.bBoxIntersect=function(e,t,n){return n=n||0,e.left<=t.right+n&&t.left<=e.right+n&&e.top<=t.bottom+n&&t.top<=e.bottom+n},d.simpleMap=function(e,t,n,r,i){for(var a=e.length,o=new Array(a),s=0;s=Math.pow(2,n)?i>10?(d.warn("randstr failed uniqueness"),l):e(t,n,r,(i||0)+1):l},d.OptionControl=function(e,t){e||(e={}),t||(t="opt");var n={optionList:[],_newoption:function(r){r[t]=e,n[r.name]=r,n.optionList.push(r)}};return n["_"+t]=e,n},d.smooth=function(e,t){if((t=Math.round(t)||0)<2)return e;var n,r,i,a,o=e.length,s=2*o,l=2*t-1,c=new Array(l),u=new Array(o);for(n=0;n=s&&(i-=s*Math.floor(i/s)),i<0?i=-1-i:i>=o&&(i=s-1-i),a+=e[i]*c[r];u[n]=a}return u},d.syncOrAsync=function(e,t,n){var r;function i(){return d.syncOrAsync(e,t,n)}for(;e.length;)if((r=(0,e.splice(0,1)[0])(t))&&r.then)return r.then(i);return n&&n(t)},d.stripTrailingSlash=function(e){return"/"===e.substr(-1)?e.substr(0,e.length-1):e},d.noneOrAll=function(e,t,n){if(e){var r,i,a=!1,o=!0;for(r=0;r0?t:0}))},d.fillArray=function(e,t,n,r){if(r=r||d.identity,d.isArrayOrTypedArray(e))for(var i=0;i1?i+o[1]:"";if(a&&(o.length>1||s.length>4||n))for(;r.test(s);)s=s.replace(r,"$1"+a+"$2");return s+l},d.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var L=/^\w*$/;d.templateString=function(e,t){var n={};return e.replace(d.TEMPLATE_STRING_REGEX,(function(e,r){var i;return L.test(r)?i=t[r]:(n[r]=n[r]||d.nestedProperty(t,r).get,i=n[r]()),d.isValidTextValue(i)?i:""}))};var I={max:10,count:0,name:"hovertemplate"};d.hovertemplateString=function(){return F.apply(I,arguments)};var z={max:10,count:0,name:"texttemplate"};d.texttemplateString=function(){return F.apply(z,arguments)};var N=/^[:|\|]/;function F(e,t,n){var r=this,a=arguments;t||(t={});var o={};return e.replace(d.TEMPLATE_STRING_REGEX,(function(e,s,l){var c,u,h,f="_xother"===s||"_yother"===s,p="_xother_"===s||"_yother_"===s,m="xother_"===s||"yother_"===s,g="xother"===s||"yother"===s||f||m||p,v=s;if((f||p)&&(v=v.substring(1)),(m||p)&&(v=v.substring(0,v.length-1)),g){if(void 0===(c=t[v]))return""}else for(h=3;h=48&&o<=57,c=s>=48&&s<=57;if(l&&(r=10*r+o-48),c&&(i=10*i+s-48),!l||!c){if(r!==i)return r-i;if(o!==s)return o-s}}return i-r};var B=2e9;d.seedPseudoRandom=function(){B=2e9},d.pseudoRandom=function(){var e=B;return B=(69069*B+1)%4294967296,Math.abs(B-e)<429496729?d.pseudoRandom():B/4294967296},d.fillText=function(e,t,n){var r=Array.isArray(n)?function(e){n.push(e)}:function(e){n.text=e},i=d.extractOption(e,t,"htx","hovertext");if(d.isValidTextValue(i))return r(i);var a=d.extractOption(e,t,"tx","text");return d.isValidTextValue(a)?r(a):void 0},d.isValidTextValue=function(e){return e||0===e},d.formatPercent=function(e,t){t=t||0;for(var n=(Math.round(100*e*Math.pow(10,t))*Math.pow(.1,t)).toFixed(t)+"%",r=0;r1&&(c=1):c=0,d.strTranslate(i-c*(n+o),a-c*(r+s))+d.strScale(c)+(l?"rotate("+l+(t?"":" "+n+" "+r)+")":"")},d.setTransormAndDisplay=function(e,t){e.attr("transform",d.getTextTransform(t)),e.style("display",t.scale?null:"none")},d.ensureUniformFontSize=function(e,t){var n=d.extendFlat({},t);return n.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),n},d.join2=function(e,t,n){var r=e.length;return r>1?e.slice(0,-1).join(t)+n+e[r-1]:e.join(t)},d.bigFont=function(e){return Math.round(1.2*e)};var j=d.getFirefoxVersion(),U=null!==j&&j<86;d.getPositionFromD3Event=function(){return U?[r.event.layerX,r.event.layerY]:[r.event.offsetX,r.event.offsetY]}},41965:function(e){"use strict";e.exports=function(e){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(e):"[object Object]"===Object.prototype.toString.call(e)&&Object.getPrototypeOf(e).hasOwnProperty("hasOwnProperty")}},66636:function(e,t,n){"use strict";var r=n(65487),i=/^\w*$/;e.exports=function(e,t,n,a){var o,s,l;n=n||"name",a=a||"value";var c={};t&&t.length?(l=r(e,t),s=l.get()):s=e,t=t||"";var u={};if(s)for(o=0;o2)return c[t]=2|c[t],h.set(e,null);if(d){for(o=t;o1){var t=["LOG:"];for(e=0;e1){var n=[];for(e=0;e"),"long")}},a.warn=function(){var e;if(r.logging>0){var t=["WARN:"];for(e=0;e0){var n=[];for(e=0;e"),"stick")}},a.error=function(){var e;if(r.logging>0){var t=["ERROR:"];for(e=0;e0){var n=[];for(e=0;e"),"stick")}}},77310:function(e,t,n){"use strict";var r=n(39898);e.exports=function(e,t,n){var i=e.selectAll("g."+n.replace(/\s/g,".")).data(t,(function(e){return e[0].trace.uid}));i.exit().remove(),i.enter().append("g").attr("class",n),i.order();var a=e.classed("rangeplot")?"nodeRangePlot3":"node3";return i.each((function(e){e[0][a]=r.select(this)})),i}},35657:function(e,t,n){"use strict";var r=n(79576);t.init2dArray=function(e,t){for(var n=new Array(e),r=0;rt/2?e-Math.round(e/t)*t:e}}},65487:function(e,t,n){"use strict";var r=n(92770),i=n(73627).isArrayOrTypedArray;function a(e,t){return function(){var n,r,o,s,l,c=e;for(s=0;s/g),l=0;la||c===i||cs)&&(!t||!l(e))}:function(e,t){var l=e[0],c=e[1];if(l===i||la||c===i||cs)return!1;var u,d,h,f,p,m=n.length,g=n[0][0],v=n[0][1],y=0;for(u=1;uMath.max(d,g)||c>Math.max(h,v)))if(cu||Math.abs(r(o,h))>i)return!0;return!1},a.filter=function(e,t){var n=[e[0]],r=0,i=0;function o(o){e.push(o);var s=n.length,l=r;n.splice(i+1);for(var c=l+1;c1&&o(e.pop());return{addPt:o,raw:e,filtered:n}}},79749:function(e,t,n){"use strict";var r=n(58617),i=n(98580);e.exports=function(e,t,a){var o=e._fullLayout,s=!0;return o._glcanvas.each((function(r){if(r.regl)r.regl.preloadCachedCode(a);else if(!r.pick||o._has("parcoords")){try{r.regl=i({canvas:this,attributes:{antialias:!r.pick,preserveDrawingBuffer:!0},pixelRatio:e._context.plotGlPixelRatio||n.g.devicePixelRatio,extensions:t||[],cachedCode:a||{}})}catch(l){s=!1}r.regl||(s=!1),s&&this.addEventListener("webglcontextlost",(function(t){e&&e.emit&&e.emit("plotly_webglcontextlost",{event:t,layer:r.key})}),!1)}})),s||r({container:o._glcontainer.node()}),s}},45142:function(e,t,n){"use strict";var r=n(92770),i=n(35791);e.exports=function(e){var t;if("string"!==typeof(t=e&&e.hasOwnProperty("userAgent")?e.userAgent:function(){var e;"undefined"!==typeof navigator&&(e=navigator.userAgent);e&&e.headers&&"string"===typeof e.headers["user-agent"]&&(e=e.headers["user-agent"]);return e}()))return!0;var n=i({ua:{headers:{"user-agent":t}},tablet:!0,featureDetect:!1});if(!n)for(var a=t.split(" "),o=1;o-1;s--){var l=a[s];if("Version/"===l.substr(0,8)){var c=l.substr(8).split(".")[0];if(r(c)&&(c=+c),c>=13)return!0}}}return n}},75138:function(e){"use strict";e.exports=function(e,t){if(t instanceof RegExp){for(var n=t.toString(),r=0;ri.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--))},startSequence:function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0},stopSequence:function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1},undo:function(e){var t,n;if(!(void 0===e.undoQueue||isNaN(e.undoQueue.index)||e.undoQueue.index<=0)){for(e.undoQueue.index--,t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,n=0;n=e.undoQueue.queue.length)){for(t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,n=0;nt}function d(e,t){return e>=t}t.findBin=function(e,t,n){if(r(t.start))return n?Math.ceil((e-t.start)/t.size-s)-1:Math.floor((e-t.start)/t.size+s);var a,o,h=0,f=t.length,p=0,m=f>1?(t[f-1]-t[0])/(f-1):1;for(o=m>=0?n?l:c:n?d:u,e+=m*s*(n?-1:1)*(m>=0?1:-1);h90&&i.log("Long binary search..."),h-1},t.sorterAsc=function(e,t){return e-t},t.sorterDes=function(e,t){return t-e},t.distinctVals=function(e){var n,r=e.slice();for(r.sort(t.sorterAsc),n=r.length-1;n>-1&&r[n]===o;n--);for(var i,a=r[n]-r[0]||1,s=a/(n||1)/1e4,l=[],c=0;c<=n;c++){var u=r[c],d=u-i;void 0===i?(l.push(u),i=u):d>s&&(a=Math.min(a,d),l.push(u),i=u)}return{vals:l,minDiff:a}},t.roundUp=function(e,t,n){for(var r,i=0,a=t.length-1,o=0,s=n?0:1,l=n?1:0,c=n?Math.ceil:Math.floor;i0&&(r=1),n&&r)return e.sort(t)}return r?e:e.reverse()},t.findIndexOfMin=function(e,t){t=t||a;for(var n,r=1/0,i=0;ia.length)&&(o=a.length),r(n)||(n=!1),i(a[0])){for(l=new Array(o),s=0;se.length-1)return e[e.length-1];var n=t%1;return n*e[Math.ceil(t)]+(1-n)*e[Math.floor(t)]}},78614:function(e,t,n){"use strict";var r=n(25075);e.exports=function(e){return e?r(e):[0,0,0,1]}},63893:function(e,t,n){"use strict";var r=n(39898),i=n(71828),a=i.strTranslate,o=n(77922),s=n(18783).LINE_SPACING,l=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;t.convertToTspans=function(e,n,g){var k=e.text(),E=!e.attr("data-notex")&&n&&n._context.typesetMath&&"undefined"!==typeof MathJax&&k.match(l),R=r.select(e.node().parentNode);if(!R.empty()){var P=e.attr("class")?e.attr("class").split(" ")[0]:"text";return P+="-math",R.selectAll("svg."+P).remove(),R.selectAll("g."+P+"-group").remove(),e.style("display",null).attr({"data-unformatted":k,"data-math":"N"}),E?(n&&n._promises||[]).push(new Promise((function(t){e.style("display","none");var n=parseInt(e.node().style.fontSize,10),o={fontSize:n};!function(e,t,n){var a,o,s,l,h=parseInt((MathJax.version||"").split(".")[0]);if(2!==h&&3!==h)return void i.warn("No MathJax version:",MathJax.version);var f=function(){return o=i.extendDeepAll({},MathJax.Hub.config),s=MathJax.Hub.processSectionDelay,void 0!==MathJax.Hub.processSectionDelay&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:d},displayAlign:"left"})},p=function(){o=i.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=d},m=function(){if("SVG"!==(a=MathJax.Hub.config.menuSettings.renderer))return MathJax.Hub.setRenderer("SVG")},g=function(){"svg"!==(a=MathJax.config.startup.output)&&(MathJax.config.startup.output="svg")},v=function(){var n="math-output-"+i.randstr({},64),a=(l=r.select("body").append("div").attr({id:n}).style({visibility:"hidden",position:"absolute","font-size":t.fontSize+"px"}).text(e.replace(c,"\\lt ").replace(u,"\\gt "))).node();return 2===h?MathJax.Hub.Typeset(a):MathJax.typeset([a])},y=function(){var t=l.select(2===h?".MathJax_SVG":".MathJax"),a=!t.empty()&&l.select("svg").node();if(a){var o,s=a.getBoundingClientRect();o=2===h?r.select("body").select("#MathJax_SVG_glyphs"):t.select("defs"),n(t,o,s)}else i.log("There was an error in the tex syntax.",e),n();l.remove()},x=function(){if("SVG"!==a)return MathJax.Hub.setRenderer(a)},b=function(){"svg"!==a&&(MathJax.config.startup.output=a)},_=function(){return void 0!==s&&(MathJax.Hub.processSectionDelay=s),MathJax.Hub.Config(o)},w=function(){MathJax.config=o};2===h?MathJax.Hub.Queue(f,m,v,y,x,_):3===h&&(p(),g(),MathJax.startup.defaultReady(),MathJax.startup.promise.then((function(){v(),y(),b(),w()})))}(E[2],o,(function(r,i,o){R.selectAll("svg."+P).remove(),R.selectAll("g."+P+"-group").remove();var s=r&&r.select("svg");if(!s||!s.node())return O(),void t();var l=R.append("g").classed(P+"-group",!0).attr({"pointer-events":"none","data-unformatted":k,"data-math":"Y"});l.node().appendChild(s.node()),i&&i.node()&&s.node().insertBefore(i.node().cloneNode(!0),s.node().firstChild);var c=o.width,u=o.height;s.attr({class:P,height:u,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var d=e.node().style.fill||"black",h=s.select("g");h.attr({fill:d,stroke:d});var f=h.node().getBoundingClientRect(),p=f.width,m=f.height;(p>c||m>u)&&(s.style("overflow","hidden"),p=(f=s.node().getBoundingClientRect()).width,m=f.height);var v=+e.attr("x"),y=+e.attr("y"),x=-(n||e.node().getBoundingClientRect().height)/4;if("y"===P[0])l.attr({transform:"rotate("+[-90,v,y]+")"+a(-p/2,x-m/2)});else if("l"===P[0])y=x-m/2;else if("a"===P[0]&&0!==P.indexOf("atitle"))v=0,y=x;else{var b=e.attr("text-anchor");v-=p*("middle"===b?.5:"end"===b?1:0),y=y+x-m/2}s.attr({x:v,y:y}),g&&g.call(e,l),t(l)}))}))):O(),e}function O(){R.empty()||(P=e.attr("class")+"-math",R.select("svg."+P).remove()),e.text("").style("white-space","pre");var n=function(e,t){t=t.replace(v," ");var n,a=!1,l=[],c=-1;function u(){c++;var t=document.createElementNS(o.svg,"tspan");r.select(t).attr({class:"line",dy:c*s+"em"}),e.appendChild(t),n=t;var i=l;if(l=[{node:t}],i.length>1)for(var a=1;a doesnt match end tag <"+e+">. Pretending it did match.",t),n=l[l.length-1].node}else i.log("Ignoring unexpected end tag .",t)}var E=b.test(t);E?u():(n=e,l=[{node:e}]);for(var R=t.split(y),P=0;P|>|>)/g;var d=[["$","$"],["\\(","\\)"]];var h={sup:"font-size:70%",sub:"font-size:70%",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},f={sub:"0.3em",sup:"-0.6em"},p={sub:"-0.21em",sup:"0.42em"},m="\u200b",g=["http:","https:","mailto:","",void 0,":"],v=t.NEWLINES=/(\r\n?|\n)/g,y=/(<[^<>]*>)/,x=/<(\/?)([^ >]*)(\s+(.*))?>/i,b=//i;t.BR_TAG_ALL=//gi;var _=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,w=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,A=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,S=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function M(e,t){if(!e)return null;var n=e.match(t),r=n&&(n[3]||n[4]);return r&&C(r)}var T=/(^|;)\s*color:/;t.plainText=function(e,t){for(var n=void 0!==(t=t||{}).len&&-1!==t.len?t.len:1/0,r=void 0!==t.allowedTags?t.allowedTags:["br"],i=e.split(y),a=[],o="",s=0,l=0;l3?a.push(c.substr(0,f-3)+"..."):a.push(c.substr(0,f));break}o=""}}return a.join("")};var k={mu:"\u03bc",amp:"&",lt:"<",gt:">",nbsp:"\xa0",times:"\xd7",plusmn:"\xb1",deg:"\xb0"},E=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function C(e){return e.replace(E,(function(e,t){return("#"===t.charAt(0)?function(e){if(e>1114111)return;var t=String.fromCodePoint;if(t)return t(e);var n=String.fromCharCode;return e<=65535?n(e):n(55232+(e>>10),e%1024+56320)}("x"===t.charAt(1)?parseInt(t.substr(2),16):parseInt(t.substr(1),10)):k[t])||e}))}function D(e){var t=encodeURI(decodeURI(e)),n=document.createElement("a"),r=document.createElement("a");n.href=e,r.href=t;var i=n.protocol,a=r.protocol;return-1!==g.indexOf(i)&&-1!==g.indexOf(a)?t:""}function R(e,t,n){var r,a,o,s=n.horizontalAlign,l=n.verticalAlign||"top",c=e.node().getBoundingClientRect(),u=t.node().getBoundingClientRect();return a="bottom"===l?function(){return c.bottom-r.height}:"middle"===l?function(){return c.top+(c.height-r.height)/2}:function(){return c.top},o="right"===s?function(){return c.right-r.width}:"center"===s?function(){return c.left+(c.width-r.width)/2}:function(){return c.left},function(){r=this.node().getBoundingClientRect();var e=o()-u.left,t=a()-u.top,s=n.gd||{};if(n.gd){s._fullLayout._calcInverseTransform(s);var l=i.apply3DTransform(s._fullLayout._invTransform)(e,t);e=l[0],t=l[1]}return this.style({top:t+"px",left:e+"px","z-index":1e3}),this}}t.convertEntities=C,t.sanitizeHTML=function(e){e=e.replace(v," ");for(var t=document.createElement("p"),n=t,i=[],a=e.split(y),o=0;oa.ts+t?l():a.timer=setTimeout((function(){l(),a.timer=null}),t)},t.done=function(e){var t=n[e];return t&&t.timer?new Promise((function(e){var n=t.onDone;t.onDone=function(){n&&n(),e(),t.onDone=null}})):Promise.resolve()},t.clear=function(e){if(e)r(n[e]),delete n[e];else for(var i in n)t.clear(i)}},58163:function(e,t,n){"use strict";var r=n(92770);e.exports=function(e,t){if(e>0)return Math.log(e)/Math.LN10;var n=Math.log(Math.min(t[0],t[1]))/Math.LN10;return r(n)||(n=Math.log(Math.max(t[0],t[1]))/Math.LN10-6),n}},90973:function(e,t,n){"use strict";var r=e.exports={},i=n(78776).locationmodeToLayer,a=n(96892).zL;r.getTopojsonName=function(e){return[e.scope.replace(/ /g,"-"),"_",e.resolution.toString(),"m"].join("")},r.getTopojsonPath=function(e,t){return e+t+".json"},r.getTopojsonFeatures=function(e,t){var n=i[e.locationmode],r=t.objects[n];return a(t,r).features}},37815:function(e){"use strict";e.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},92177:function(e){"use strict";e.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}},14458:function(e,t,n){"use strict";var r=n(73972);e.exports=function(e){for(var t,n,i=r.layoutArrayContainers,a=r.layoutArrayRegexes,o=e.split("[")[0],s=0;s0&&o.log("Clearing previous rejected promises from queue."),e._promises=[]},t.cleanLayout=function(e){var n,r;e||(e={}),e.xaxis1&&(e.xaxis||(e.xaxis=e.xaxis1),delete e.xaxis1),e.yaxis1&&(e.yaxis||(e.yaxis=e.yaxis1),delete e.yaxis1),e.scene1&&(e.scene||(e.scene=e.scene1),delete e.scene1);var a=(s.subplotsRegistry.cartesian||{}).attrRegex,l=(s.subplotsRegistry.polar||{}).attrRegex,d=(s.subplotsRegistry.ternary||{}).attrRegex,h=(s.subplotsRegistry.gl3d||{}).attrRegex,m=Object.keys(e);for(n=0;n3?(O.x=1.02,O.xanchor="left"):O.x<-2&&(O.x=-.02,O.xanchor="right"),O.y>3?(O.y=1.02,O.yanchor="bottom"):O.y<-2&&(O.y=-.02,O.yanchor="top")),p(e),"rotate"===e.dragmode&&(e.dragmode="orbit"),c.clean(e),e.template&&e.template.layout&&t.cleanLayout(e.template.layout),e},t.cleanData=function(e){for(var n=0;n0)return e.substr(0,t)}t.hasParent=function(e,t){for(var n=b(t);n;){if(n in e)return!0;n=b(n)}return!1};var _=["x","y","z"];t.clearAxisTypes=function(e,t,n){for(var r=0;r1&&a.warn("Full array edits are incompatible with other edits",d);var y=n[""][""];if(c(y))t.set(null);else{if(!Array.isArray(y))return a.warn("Unrecognized full array edit value",d,y),!0;t.set(y)}return!m&&(h(g,v),f(e),!0)}var x,b,_,w,A,S,M,T,k=Object.keys(n).map(Number).sort(o),E=t.get(),C=E||[],D=u(v,d).get(),R=[],P=-1,O=C.length;for(x=0;xC.length-(M?0:1))a.warn("index out of range",d,_);else if(void 0!==S)A.length>1&&a.warn("Insertion & removal are incompatible with edits to the same index.",d,_),c(S)?R.push(_):M?("add"===S&&(S={}),C.splice(_,0,S),D&&D.splice(_,0,{})):a.warn("Unrecognized full object edit value",d,_,S),-1===P&&(P=_);else for(b=0;b=0;x--)C.splice(R[x],1),D&&D.splice(R[x],1);if(C.length?E||t.set(C):t.set(null),m)return!1;if(h(g,v),p!==i){var L;if(-1===P)L=k;else{for(O=Math.max(C.length,O),L=[],x=0;x=P);x++)L.push(_);for(x=P;x=e.data.length||i<-e.data.length)throw new Error(n+" must be valid indices for gd.data.");if(t.indexOf(i,r+1)>-1||i>=0&&t.indexOf(-e.data.length+i)>-1||i<0&&t.indexOf(e.data.length+i)>-1)throw new Error("each index in "+n+" must be unique.")}}function P(e,t,n){if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if("undefined"===typeof t)throw new Error("currentIndices is a required argument.");if(Array.isArray(t)||(t=[t]),R(e,t,"currentIndices"),"undefined"===typeof n||Array.isArray(n)||(n=[n]),"undefined"!==typeof n&&R(e,n,"newIndices"),"undefined"!==typeof n&&t.length!==n.length)throw new Error("current and new indices must be of equal length.")}function O(e,t,n,r,a){!function(e,t,n,r){var i=o.isPlainObject(r);if(!Array.isArray(e.data))throw new Error("gd.data must be an array");if(!o.isPlainObject(t))throw new Error("update must be a key:value object");if("undefined"===typeof n)throw new Error("indices must be an integer or array of integers");for(var a in R(e,n,"indices"),t){if(!Array.isArray(t[a])||t[a].length!==n.length)throw new Error("attribute "+a+" must be an array of length equal to indices array length");if(i&&(!(a in r)||!Array.isArray(r[a])||r[a].length!==t[a].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object")}}(e,t,n,r);for(var l=function(e,t,n,r){var a,l,c,u,d,h=o.isPlainObject(r),f=[];for(var p in Array.isArray(n)||(n=[n]),n=D(n,e.data.length-1),t)for(var m=0;m-1&&-1===n.indexOf("grouptitlefont")?l(n,n.replace("titlefont","title.font")):n.indexOf("titleposition")>-1?l(n,n.replace("titleposition","title.position")):n.indexOf("titleside")>-1?l(n,n.replace("titleside","title.side")):n.indexOf("titleoffset")>-1&&l(n,n.replace("titleoffset","title.offset")):l(n,n.replace("title","title.text"));function l(t,n){e[n]=e[t],delete e[t]}}function U(e,t,n){e=o.getGraphDiv(e),_.clearPromiseQueue(e);var r={};if("string"===typeof t)r[t]=n;else{if(!o.isPlainObject(t))return o.warn("Relayout fail.",t,n),Promise.reject();r=o.extendFlat({},t)}Object.keys(r).length&&(e.changed=!0);var i=Y(e,r),a=i.flags;a.calc&&(e.calcdata=void 0);var s=[h.previousPromises];a.layoutReplot?s.push(w.layoutReplot):Object.keys(r).length&&(V(e,a,i)||h.supplyDefaults(e),a.legend&&s.push(w.doLegend),a.layoutstyle&&s.push(w.layoutStyles),a.axrange&&H(s,i.rangesAltered),a.ticks&&s.push(w.doTicksRelayout),a.modebar&&s.push(w.doModeBar),a.camera&&s.push(w.doCamera),a.colorbars&&s.push(w.doColorBars),s.push(T)),s.push(h.rehover,h.redrag,h.reselect),c.add(e,U,[e,i.undoit],U,[e,i.redoit]);var l=o.syncOrAsync(s,e);return l&&l.then||(l=Promise.resolve(e)),l.then((function(){return e.emit("plotly_relayout",i.eventData),e}))}function V(e,t,n){var r=e._fullLayout;if(!t.axrange)return!1;for(var i in t)if("axrange"!==i&&t[i])return!1;for(var a in n.rangesAltered){var o=f.id2name(a),s=e.layout[o],l=r[o];if(l.autorange=s.autorange,s.range&&(l.range=s.range.slice()),l.cleanRange(),l._matchGroup)for(var c in l._matchGroup)if(c!==a){var u=r[f.id2name(c)];u.autorange=l.autorange,u.range=l.range.slice(),u._input.range=l.range.slice()}}return!0}function H(e,t){var n=t?function(e){var n=[];for(var r in t){var i=f.getFromId(e,r);if(n.push(r),-1!==(i.ticklabelposition||"").indexOf("inside")&&i._anchorAxis&&n.push(i._anchorAxis._id),i._matchGroup)for(var a in i._matchGroup)t[a]||n.push(a)}return f.draw(e,n,{skipTitle:!0})}:function(e){return f.draw(e,"redraw")};e.push(y,w.doAutoRangeAndConstraints,n,w.drawData,w.finalDraw)}var W=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,G=/^[xyz]axis[0-9]*\.autorange$/,q=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function Y(e,t){var n,r,i,a=e.layout,l=e._fullLayout,c=l._guiEditing,h=N(l._preGUI,c),p=Object.keys(t),m=f.list(e),g=o.extendDeepAll({},t),v={};for(j(t),p=Object.keys(t),r=0;r0&&"string"!==typeof O.parts[I];)I--;var F=O.parts[I],B=O.parts[I-1]+"."+F,U=O.parts.slice(0,I).join("."),V=s(e.layout,U).get(),H=s(l,U).get(),Y=O.get();if(void 0!==L){T[P]=L,k[P]="reverse"===F?L:z(Y);var X=d.getLayoutValObject(l,O.parts);if(X&&X.impliedEdits&&null!==L)for(var Z in X.impliedEdits)E(o.relativeAttr(P,Z),X.impliedEdits[Z]);if(-1!==["width","height"].indexOf(P))if(L){E("autosize",null);var K="height"===P?"width":"height";E(K,l[K])}else l[P]=e._initialAutoSize[P];else if("autosize"===P)E("width",L?null:l.width),E("height",L?null:l.height);else if(B.match(W))R(B),s(l,U+"._inputRange").set(null);else if(B.match(G)){R(B),s(l,U+"._inputRange").set(null);var J=s(l,U).get();J._inputDomain&&(J._input.domain=J._inputDomain.slice())}else B.match(q)&&s(l,U+"._inputDomain").set(null);if("type"===F){C=V;var Q="linear"===H.type&&"log"===L,ee="log"===H.type&&"linear"===L;if(Q||ee){if(C&&C.range)if(H.autorange)Q&&(C.range=C.range[1]>C.range[0]?[1,2]:[2,1]);else{var te=C.range[0],ne=C.range[1];Q?(te<=0&&ne<=0&&E(U+".autorange",!0),te<=0?te=ne/1e6:ne<=0&&(ne=te/1e6),E(U+".range[0]",Math.log(te)/Math.LN10),E(U+".range[1]",Math.log(ne)/Math.LN10)):(E(U+".range[0]",Math.pow(10,te)),E(U+".range[1]",Math.pow(10,ne)))}else E(U+".autorange",!0);Array.isArray(l._subplots.polar)&&l._subplots.polar.length&&l[O.parts[0]]&&"radialaxis"===O.parts[1]&&delete l[O.parts[0]]._subplot.viewInitial["radialaxis.range"],u.getComponentMethod("annotations","convertCoords")(e,H,L,E),u.getComponentMethod("images","convertCoords")(e,H,L,E)}else E(U+".autorange",!0),E(U+".range",null);s(l,U+"._inputRange").set(null)}else if(F.match(S)){var re=s(l,P).get(),ie=(L||{}).type;ie&&"-"!==ie||(ie="linear"),u.getComponentMethod("annotations","convertCoords")(e,re,ie,E),u.getComponentMethod("images","convertCoords")(e,re,ie,E)}var ae=b.containerArrayMatch(P);if(ae){n=ae.array,r=ae.index;var oe=ae.property,se=X||{editType:"calc"};""!==r&&""===oe&&(b.isAddVal(L)?k[P]=null:b.isRemoveVal(L)?k[P]=(s(a,n).get()||[])[r]:o.warn("unrecognized full object value",t)),A.update(M,se),v[n]||(v[n]={});var le=v[n][r];le||(le=v[n][r]={}),le[oe]=L,delete t[P]}else"reverse"===F?(V.range?V.range.reverse():(E(U+".autorange",!0),V.range=[1,0]),H.autorange?M.calc=!0:M.plot=!0):("dragmode"===P&&(!1===L&&!1!==Y||!1!==L&&!1===Y)||l._has("scatter-like")&&l._has("regl")&&"dragmode"===P&&("lasso"===L||"select"===L)&&"lasso"!==Y&&"select"!==Y||l._has("gl2d")?M.plot=!0:X?A.update(M,X):M.calc=!0,O.set(L))}}for(n in v){b.applyContainerArrayChanges(e,h(a,n),v[n],M,h)||(M.plot=!0)}for(var ce in D){var ue=(C=f.getFromId(e,ce))&&C._constraintGroup;if(ue)for(var de in M.calc=!0,ue)D[de]||(f.getFromId(e,de)._constraintShrinkable=!0)}return($(e)||t.height||t.width)&&(M.plot=!0),(M.plot||M.calc)&&(M.layoutReplot=!0),{flags:M,rangesAltered:D,undoit:k,redoit:T,eventData:g}}function $(e){var t=e._fullLayout,n=t.width,r=t.height;return e.layout.autosize&&h.plotAutoSize(e,e.layout,t),t.width!==n||t.height!==r}function X(e,n,r,i){e=o.getGraphDiv(e),_.clearPromiseQueue(e),o.isPlainObject(n)||(n={}),o.isPlainObject(r)||(r={}),Object.keys(n).length&&(e.changed=!0),Object.keys(r).length&&(e.changed=!0);var a=_.coerceTraceIndices(e,i),s=B(e,o.extendFlat({},n),a),l=s.flags,u=Y(e,o.extendFlat({},r)),d=u.flags;(l.calc||d.calc)&&(e.calcdata=void 0),l.clearAxisTypes&&_.clearAxisTypes(e,a,r);var f=[];d.layoutReplot?f.push(w.layoutReplot):l.fullReplot?f.push(t._doPlot):(f.push(h.previousPromises),V(e,d,u)||h.supplyDefaults(e),l.style&&f.push(w.doTraceStyle),(l.colorbars||d.colorbars)&&f.push(w.doColorBars),d.legend&&f.push(w.doLegend),d.layoutstyle&&f.push(w.layoutStyles),d.axrange&&H(f,u.rangesAltered),d.ticks&&f.push(w.doTicksRelayout),d.modebar&&f.push(w.doModeBar),d.camera&&f.push(w.doCamera),f.push(T)),f.push(h.rehover,h.redrag,h.reselect),c.add(e,X,[e,s.undoit,u.undoit,s.traces],X,[e,s.redoit,u.redoit,s.traces]);var p=o.syncOrAsync(f,e);return p&&p.then||(p=Promise.resolve(e)),p.then((function(){return e.emit("plotly_update",{data:s.eventData,layout:u.eventData}),e}))}function Z(e){return function(t){t._fullLayout._guiEditing=!0;var n=e.apply(null,arguments);return t._fullLayout._guiEditing=!1,n}}var K=[{pattern:/^hiddenlabels/,attr:"legend.uirevision"},{pattern:/^((x|y)axis\d*)\.((auto)?range|title\.text)/},{pattern:/axis\d*\.showspikes$/,attr:"modebar.uirevision"},{pattern:/(hover|drag)mode$/,attr:"modebar.uirevision"},{pattern:/^(scene\d*)\.camera/},{pattern:/^(geo\d*)\.(projection|center|fitbounds)/},{pattern:/^(ternary\d*\.[abc]axis)\.(min|title\.text)$/},{pattern:/^(polar\d*\.radialaxis)\.((auto)?range|angle|title\.text)/},{pattern:/^(polar\d*\.angularaxis)\.rotation/},{pattern:/^(mapbox\d*)\.(center|zoom|bearing|pitch)/},{pattern:/^legend\.(x|y)$/,attr:"editrevision"},{pattern:/^(shapes|annotations)/,attr:"editrevision"},{pattern:/^title\.text$/,attr:"editrevision"}],J=[{pattern:/^selectedpoints$/,attr:"selectionrevision"},{pattern:/(^|value\.)visible$/,attr:"legend.uirevision"},{pattern:/^dimensions\[\d+\]\.constraintrange/},{pattern:/^node\.(x|y|groups)/},{pattern:/^level$/},{pattern:/(^|value\.)name$/},{pattern:/colorbar\.title\.text$/},{pattern:/colorbar\.(x|y)$/,attr:"editrevision"}];function Q(e,t){for(var n=0;n1;)if(r.pop(),void 0!==(n=s(t,r.join(".")+".uirevision").get()))return n;return t.uirevision}function te(e,t){for(var n=0;n=i.length?i[0]:i[e]:i}function l(e){return Array.isArray(a)?e>=a.length?a[0]:a[e]:a}function c(e,t){var n=0;return function(){if(e&&++n===t)return e()}}return void 0===r._frameWaitingCnt&&(r._frameWaitingCnt=0),new Promise((function(a,u){function d(){r._currentFrame&&r._currentFrame.onComplete&&r._currentFrame.onComplete();var t=r._currentFrame=r._frameQueue.shift();if(t){var n=t.name?t.name.toString():null;e._fullLayout._currentFrame=n,r._lastFrameAt=Date.now(),r._timeToNext=t.frameOpts.duration,h.transition(e,t.frame.data,t.frame.layout,_.coerceTraceIndices(e,t.frame.traces),t.frameOpts,t.transitionOpts).then((function(){t.onComplete&&t.onComplete()})),e.emit("plotly_animatingframe",{name:n,frame:t.frame,animation:{frame:t.frameOpts,transition:t.transitionOpts}})}else e.emit("plotly_animated"),window.cancelAnimationFrame(r._animationRaf),r._animationRaf=null}function f(){e.emit("plotly_animating"),r._lastFrameAt=-1/0,r._timeToNext=0,r._runningTransitions=0,r._currentFrame=null;var t=function(){r._animationRaf=window.requestAnimationFrame(t),Date.now()-r._lastFrameAt>r._timeToNext&&d()};t()}var p,m,g=0;function v(e){return Array.isArray(i)?g>=i.length?e.transitionOpts=i[g]:e.transitionOpts=i[0]:e.transitionOpts=i,g++,e}var y=[],x=void 0===t||null===t,b=Array.isArray(t);if(!x&&!b&&o.isPlainObject(t))y.push({type:"object",data:v(o.extendFlat({},t))});else if(x||-1!==["string","number"].indexOf(typeof t))for(p=0;p0&&SS)&&M.push(m);y=M}}y.length>0?function(t){if(0!==t.length){for(var i=0;i=0;r--)if(o.isPlainObject(t[r])){var m=t[r].name,g=(u[m]||p[m]||{}).name,v=t[r].name,y=u[g]||p[g];g&&v&&"number"===typeof v&&y&&M<5&&(M++,o.warn('addFrames: overwriting frame "'+(u[g]||p[g]).name+'" with a frame whose name of type "number" also equates to "'+g+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===M&&o.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),p[m]={name:m},f.push({frame:h.supplyFrameDefaults(t[r]),index:n&&void 0!==n[r]&&null!==n[r]?n[r]:d+r})}f.sort((function(e,t){return e.index>t.index?-1:e.index=0;r--){if("number"===typeof(i=f[r].frame).name&&o.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!i.name)for(;u[i.name="frame "+e._transitionData._counter++];);if(u[i.name]){for(a=0;a=0;n--)r=t[n],a.push({type:"delete",index:r}),s.unshift({type:"insert",index:r,value:i[r]});var l=h.modifyFrames,u=h.modifyFrames,d=[e,s],f=[e,a];return c&&c.add(e,l,d,u,f),h.modifyFrames(e,a)},t.addTraces=function e(n,r,i){n=o.getGraphDiv(n);var a,s,l=[],u=t.deleteTraces,d=e,h=[n,l],f=[n,r];for(function(e,t,n){var r,i;if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if("undefined"===typeof t)throw new Error("traces must be defined.");for(Array.isArray(t)||(t=[t]),r=0;r=0&&n=0&&n=a.length)return!1;if(2===e.dimensions){if(n++,t.length===n)return e;var o=t[n];if(!_(o))return!1;e=a[i][o]}else e=a[i]}else e=a}}return e}function _(e){return e===Math.round(e)&&e>=0}function w(){var e,t,n={};for(e in d(n,o),r.subplotsRegistry){if((t=r.subplotsRegistry[e]).layoutAttributes)if(Array.isArray(t.attr))for(var i=0;i=l.length)return!1;i=(n=(r.transformsRegistry[l[c].type]||{}).attributes)&&n[t[2]],s=3}else{var u=e._module;if(u||(u=(r.modules[e.type||a.type.dflt]||{})._module),!u)return!1;if(!(i=(n=u.attributes)&&n[o])){var d=u.basePlotModule;d&&d.attributes&&(i=d.attributes[o])}i||(i=a[o])}return b(i,t,s)},t.getLayoutValObject=function(e,t){var n=function(e,t){var n,i,a,s,l=e._basePlotModules;if(l){var c;for(n=0;n=i&&(n._input||{})._templateitemname;s&&(o=i);var l,c=t+"["+o+"]";function u(){l={},s&&(l[c]={},l[c][a]=s)}function d(e,t){s?r.nestedProperty(l[c],e).set(t):l[c+"."+e]=t}function h(){var e=l;return u(),e}return u(),{modifyBase:function(e,t){l[e]=t},modifyItem:d,getUpdateObj:h,applyUpdate:function(t,n){t&&d(t,n);var i=h();for(var a in i)r.nestedProperty(e,a).set(i[a])}}}},61549:function(e,t,n){"use strict";var r=n(39898),i=n(73972),a=n(74875),o=n(71828),s=n(33306),l=n(7901),c=n(91424),u=n(92998),d=n(64168),h=n(89298),f=n(18783),p=n(99082),m=p.enforce,g=p.clean,v=n(71739).doAutoRange,y="start",x="middle",b="end";function _(e,t,n){for(var r=0;r=e[1]||i[1]<=e[0])&&(a[0]t[0]))return!0}return!1}function w(e){var n,i,s,u,p,m,g=e._fullLayout,v=g._size,y=v.p,x=h.list(e,"",!0);if(g._paperdiv.style({width:e._context.responsive&&g.autosize&&!e._context._hasZeroWidth&&!e.layout.width?"100%":g.width+"px",height:e._context.responsive&&g.autosize&&!e._context._hasZeroHeight&&!e.layout.height?"100%":g.height+"px"}).selectAll(".main-svg").call(c.setSize,g.width,g.height),e._context.setBackground(e,g.paper_bgcolor),t.drawMainTitle(e),d.manage(e),!g._has("cartesian"))return a.previousPromises(e);function b(e,t,n){var r=e._lw/2;return"x"===e._id.charAt(0)?t?"top"===n?t._offset-y-r:t._offset+t._length+y+r:v.t+v.h*(1-(e.position||0))+r%1:t?"right"===n?t._offset+t._length+y+r:t._offset-y-r:v.l+v.w*(e.position||0)+r%1}for(n=0;nA?u.push({code:"unused",traceType:y,templateCount:w,dataCount:A}):A>w&&u.push({code:"reused",traceType:y,templateCount:w,dataCount:A})}}else u.push({code:"data"});if(function e(t,n){for(var r in t)if("_"!==r.charAt(0)){var a=t[r],o=m(t,r,n);i(a)?(Array.isArray(t)&&!1===a._template&&a.templateitemname&&u.push({code:"missing",path:o,templateitemname:a.templateitemname}),e(a,o)):Array.isArray(a)&&g(a)&&e(a,o)}}({data:f,layout:h},""),u.length)return u.map(v)}},403:function(e,t,n){"use strict";var r=n(92770),i=n(72391),a=n(74875),o=n(71828),s=n(25095),l=n(5900),c=n(70942),u=n(11506).version,d={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};e.exports=function(e,t){var n,h,f,p;function m(e){return!(e in t)||o.validate(t[e],d[e])}if(t=t||{},o.isPlainObject(e)?(n=e.data||[],h=e.layout||{},f=e.config||{},p={}):(e=o.getGraphDiv(e),n=o.extendDeep([],e.data),h=o.extendDeep({},e.layout),f=e._context,p=e._fullLayout||{}),!m("width")&&null!==t.width||!m("height")&&null!==t.height)throw new Error("Height and width should be pixel values.");if(!m("format"))throw new Error("Export format is not "+o.join2(d.format.values,", "," or ")+".");var g={};function v(e,n){return o.coerce(t,g,d,e,n)}var y=v("format"),x=v("width"),b=v("height"),_=v("scale"),w=v("setBackground"),A=v("imageDataOnly"),S=document.createElement("div");S.style.position="absolute",S.style.left="-5000px",document.body.appendChild(S);var M=o.extendFlat({},h);x?M.width=x:null===t.width&&r(p.width)&&(M.width=p.width),b?M.height=b:null===t.height&&r(p.height)&&(M.height=p.height);var T=o.extendFlat({},f,{_exportedPlot:!0,staticPlot:!0,setBackground:w}),k=s.getRedrawFunc(S);function E(){return new Promise((function(e){setTimeout(e,s.getDelay(S._fullLayout))}))}function C(){return new Promise((function(e,t){var n=l(S,y,_),r=S._fullLayout.width,d=S._fullLayout.height;function h(){i.purge(S),document.body.removeChild(S)}if("full-json"===y){var f=a.graphJson(S,!1,"keepdata","object",!0,!0);return f.version=u,f=JSON.stringify(f),h(),e(A?f:s.encodeJSON(f))}if(h(),"svg"===y)return e(A?n:s.encodeSVG(n));var p=document.createElement("canvas");p.id=o.randstr(),c({format:y,width:r,height:d,scale:_,canvas:p,svg:n,promise:!0}).then(e).catch(t)}))}return new Promise((function(e,t){i.newPlot(S,n,M,T).then(k).then(E).then(C).then((function(t){e(function(e){return A?e.replace(s.IMAGE_URL_PREFIX,""):e}(t))})).catch((function(e){t(e)}))}))}},84936:function(e,t,n){"use strict";var r=n(71828),i=n(74875),a=n(86281),o=n(72075).dfltConfig,s=r.isPlainObject,l=Array.isArray,c=r.isArrayOrTypedArray;function u(e,t,n,i,a,o){o=o||[];for(var d=Object.keys(e),h=0;hx.length&&i.push(f("unused",a,v.concat(x.length)));var M,T,k,E,C,D=x.length,R=Array.isArray(S);if(R&&(D=Math.min(D,S.length)),2===b.dimensions)for(T=0;Tx[T].length&&i.push(f("unused",a,v.concat(T,x[T].length)));var P=x[T].length;for(M=0;M<(R?Math.min(P,S[T].length):P);M++)k=R?S[T][M]:S,E=y[T][M],C=x[T][M],r.validate(E,k)?C!==E&&C!==+E&&i.push(f("dynamic",a,v.concat(T,M),E,C)):i.push(f("value",a,v.concat(T,M),E))}else i.push(f("array",a,v.concat(T),y[T]));else for(T=0;T1&&h.push(f("object","layout"))),i.supplyDefaults(p);for(var m=p._fullData,g=n.length,v=0;v0&&Math.round(d)===d))return{vals:i};c=d}for(var h=t.calendar,f="start"===l,p="end"===l,m=e[n+"period0"],g=a(m,h)||0,v=[],y=[],x=[],b=i.length,_=0;_M;)S=o(S,-c,h);for(;S<=M;)S=o(S,c,h);A=o(S,-c,h)}else{for(S=g+(w=Math.round((M-g)/u))*u;S>M;)S-=u;for(;S<=M;)S+=u;A=S-u}v[_]=f?A:p?S:(A+S)/2,y[_]=A,x[_]=S}return{vals:v,starts:y,ends:x}}},89502:function(e){"use strict";e.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},71739:function(e,t,n){"use strict";var r=n(39898),i=n(92770),a=n(71828),o=n(50606).FP_SAFE,s=n(73972),l=n(91424),c=n(41675),u=c.getFromId,d=c.isLinked;function h(e,t){var n,r,i=[],o=e._fullLayout,s=p(o,t,0),l=p(o,t,1),c=g(e,t),u=c.min,d=c.max;if(0===u.length||0===d.length)return a.simpleMap(t.range,t.r2l);var h=u[0].val,m=d[0].val;for(n=1;n0&&((A=E-s(x)-l(b))>C?S/A>D&&(_=x,w=b,D=S/A):S/E>D&&(_={val:x.val,nopad:1},w={val:b.val,nopad:1},D=S/E));if(h===m){var R=h-1,P=h+1;if(T)if(0===h)i=[0,1];else{var O=(h>0?d:u).reduce((function(e,t){return Math.max(e,l(t))}),0),L=h/(1-Math.min(.5,O/E));i=h>0?[0,L]:[L,0]}else i=k?[Math.max(0,R),Math.max(1,P)]:[R,P]}else T?(_.val>=0&&(_={val:0,nopad:1}),w.val<=0&&(w={val:0,nopad:1})):k&&(_.val-D*s(_)<0&&(_={val:0,nopad:1}),w.val<=0&&(w={val:1,nopad:1})),D=(w.val-_.val-f(t,x.val,b.val))/(E-s(_)-l(w)),i=[_.val-D*s(_),w.val+D*l(w)];return v&&i.reverse(),a.simpleMap(i,t.l2r||Number)}function f(e,t,n){var r=0;if(e.rangebreaks)for(var i=e.locateBreaks(t,n),a=0;a0?n.ppadplus:n.ppadminus)||n.ppad||0),k=M((e._m>0?n.ppadminus:n.ppadplus)||n.ppad||0),E=M(n.vpadplus||n.vpad),C=M(n.vpadminus||n.vpad);if(!A){if(h=1/0,f=-1/0,w)for(r=0;r0&&(h=a),a>f&&a-o&&(h=a),a>f&&a=P;r--)R(r);return{min:p,max:m,opts:n}},concatExtremes:g};var m=3;function g(e,t,n){var r,i,a,o=t._id,s=e._fullData,l=e._fullLayout,c=[],d=[];function h(e,t){for(r=0;r=n&&(c.extrapad||!o)){s=!1;break}i(t,c.val)&&c.pad<=n&&(o||!c.extrapad)&&(e.splice(l,1),l--)}if(s){var u=a&&0===t;e.push({val:t,pad:u?0:n,extrapad:!u&&o})}}function b(e){return i(e)&&Math.abs(e)=t}},89298:function(e,t,n){"use strict";var r=n(39898),i=n(92770),a=n(74875),o=n(73972),s=n(71828),l=s.strTranslate,c=n(63893),u=n(92998),d=n(7901),h=n(91424),f=n(13838),p=n(66287),m=n(50606),g=m.ONEMAXYEAR,v=m.ONEAVGYEAR,y=m.ONEMINYEAR,x=m.ONEMAXQUARTER,b=m.ONEAVGQUARTER,_=m.ONEMINQUARTER,w=m.ONEMAXMONTH,A=m.ONEAVGMONTH,S=m.ONEMINMONTH,M=m.ONEWEEK,T=m.ONEDAY,k=T/2,E=m.ONEHOUR,C=m.ONEMIN,D=m.ONESEC,R=m.MINUS_SIGN,P=m.BADNUM,O={K:"zeroline"},L={K:"gridline",L:"path"},I={K:"minor-gridline",L:"path"},z={K:"tick",L:"path"},N={K:"tick",L:"text"},F={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},B=n(18783),j=B.MID_SHIFT,U=B.CAP_SHIFT,V=B.LINE_SPACING,H=B.OPPOSITE_SIDE,W=e.exports={};W.setConvert=n(21994);var G=n(4322),q=n(41675),Y=q.idSort,$=q.isLinked;W.id2name=q.id2name,W.name2id=q.name2id,W.cleanId=q.cleanId,W.list=q.list,W.listIds=q.listIds,W.getFromId=q.getFromId,W.getFromTrace=q.getFromTrace;var X=n(71739);W.getAutoRange=X.getAutoRange,W.findExtremes=X.findExtremes;function Z(e){var t=1e-4*(e[1]-e[0]);return[e[0]-t,e[1]+t]}W.coerceRef=function(e,t,n,r,i,a){var o=r.charAt(r.length-1),l=n._fullLayout._subplots[o+"axis"],c=r+"ref",u={};return i||(i=l[0]||("string"===typeof a?a:a[0])),a||(a=i),l=l.concat(l.map((function(e){return e+" domain"}))),u[c]={valType:"enumerated",values:l.concat(a?"string"===typeof a?[a]:a:[]),dflt:i},s.coerce(e,t,u,c)},W.getRefType=function(e){return void 0===e?e:"paper"===e?"paper":"pixel"===e?"pixel":/( domain)$/.test(e)?"domain":"range"},W.coercePosition=function(e,t,n,r,i,a){var o,l;if("range"!==W.getRefType(r))o=s.ensureNumber,l=n(i,a);else{var c=W.getFromId(t,r);l=n(i,a=c.fraction2r(a)),o=c.cleanPos}e[i]=o(l)},W.cleanPosition=function(e,t,n){return("paper"===n||"pixel"===n?s.ensureNumber:W.getFromId(t,n).cleanPos)(e)},W.redrawComponents=function(e,t){t=t||W.listIds(e);var n=e._fullLayout;function r(r,i,a,s){for(var l=o.getComponentMethod(r,i),c={},u=0;un&&d2e-6||((n-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0)):e._minDtick=0},W.saveRangeInitial=function(e,t){for(var n=W.list(e,"",!0),r=!1,i=0;i.3*h||u(r)||u(a))){var f=n.dtick/2;e+=e+fo){var l=Number(n.substr(1));a.exactYears>o&&l%12===0?e=W.tickIncrement(e,"M6","reverse")+1.5*T:a.exactMonths>o?e=W.tickIncrement(e,"M1","reverse")+15.5*T:e-=k;var c=W.tickIncrement(e,n);if(c<=r)return c}return e}(y,e,v,c,a)),g=y,0;g<=u;)g=W.tickIncrement(g,v,!1,a);return{start:t.c2r(y,0,a),end:t.c2r(g,0,a),size:v,_dataSpan:u-c}},W.prepMinorTicks=function(e,t,n){if(!t.minor.dtick){delete e.dtick;var r,a=t.dtick&&i(t._tmin);if(a){var o=W.tickIncrement(t._tmin,t.dtick,!0);r=[t._tmin,.99*o+.01*t._tmin]}else{var l=s.simpleMap(t.range,t.r2l);r=[l[0],.8*l[0]+.2*l[1]]}if(e.range=s.simpleMap(r,t.l2r),e._isMinor=!0,W.prepTicks(e,n),a){var c=i(t.dtick),u=i(e.dtick),d=c?t.dtick:+t.dtick.substring(1),h=u?e.dtick:+e.dtick.substring(1);c&&u?ee(d,h)?d===2*M&&h===2*T&&(e.dtick=M):d===2*M&&h===3*T?e.dtick=M:d!==M||(t._input.minor||{}).nticks?te(d/h,2.5)?e.dtick=d/2:e.dtick=d:e.dtick=T:"M"===String(t.dtick).charAt(0)?u?e.dtick="M1":ee(d,h)?d>=12&&2===h&&(e.dtick="M3"):e.dtick=t.dtick:"L"===String(e.dtick).charAt(0)?"L"===String(t.dtick).charAt(0)?ee(d,h)||(e.dtick=te(d/h,2.5)?t.dtick/2:t.dtick):e.dtick="D1":"D2"===e.dtick&&+t.dtick>1&&(e.dtick=1)}e.range=t.range}void 0===t.minor._tick0Init&&(e.tick0=t.tick0)},W.prepTicks=function(e,t){var n=s.simpleMap(e.range,e.r2l,void 0,void 0,t);if("auto"===e.tickmode||!e.dtick){var r,a=e.nticks;a||("category"===e.type||"multicategory"===e.type?(r=e.tickfont?s.bigFont(e.tickfont.size||12):15,a=e._length/r):(r="y"===e._id.charAt(0)?40:80,a=s.constrain(e._length/r,4,9)+1),"radialaxis"===e._name&&(a*=2)),e.minor&&"array"!==e.minor.tickmode||"array"===e.tickmode&&(a*=100),e._roughDTick=Math.abs(n[1]-n[0])/a,W.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick<2*e._minDtick&&(e.dtick=e._minDtick,e.tick0=e.l2r(e._forceTick0))}"period"===e.ticklabelmode&&function(e){var t;function n(){return!(i(e.dtick)||"M"!==e.dtick.charAt(0))}var r=n(),a=W.getTickFormat(e);if(a){var o=e._dtickInit!==e.dtick;/%[fLQsSMX]/.test(a)||(/%[HI]/.test(a)?(t=E,o&&!r&&e.dtick=(O?0:1);L--){var I=!L;L?(e._dtickInit=e.dtick,e._tick0Init=e.tick0):(e.minor._dtickInit=e.minor.dtick,e.minor._tick0Init=e.minor.tick0);var z=L?e:s.extendFlat({},e,e.minor);if(I?W.prepMinorTicks(z,e,t):W.prepTicks(z,t),"array"!==z.tickmode)if("sync"!==z.tickmode){var N=Z(u),F=N[0],B=N[1],j=i(z.dtick),U="log"===a&&!(j||"L"===z.dtick.charAt(0)),V=W.tickFirst(z,t);if(L){if(e._tmin=V,V=B:Y<=B;Y=W.tickIncrement(Y,$,d,o)){if(L&&H++,z.rangebreaks&&!d){if(Y=f)break}if(D.length>p||Y===q)break;q=Y;var X={value:Y};L?(U&&Y!==(0|Y)&&(X.simpleLabel=!0),l>1&&H%l&&(X.skipLabel=!0),D.push(X)):(X.minor=!0,R.push(X))}}else D=[],m=ie(e);else L?(D=[],m=ae(e)):(R=[],C=ae(e))}if(O&&!("inside"===e.minor.ticks&&"outside"===e.ticks||"outside"===e.minor.ticks&&"inside"===e.ticks)){for(var K=D.map((function(e){return e.value})),J=[],Q=0;Q0?(a=r-1,o=r):(a=r,o=r);var s,l=e[a].value,c=e[o].value,u=Math.abs(c-l),d=n||u,h=0;d>=y?h=u>=y&&u<=g?u:v:n===b&&d>=_?h=u>=_&&u<=x?u:b:d>=S?h=u>=S&&u<=w?u:A:n===M&&d>=M?h=M:d>=T?h=T:n===k&&d>=k?h=k:n===E&&d>=E&&(h=E),h>=u&&(h=u,s=!0);var f=i+h;if(t.rangebreaks&&h>0){for(var p=0,m=0;m<84;m++){var C=(m+.5)/84;t.maskBreaks(i*(1-C)+C*f)!==P&&p++}(h*=p/84)||(e[r].drop=!0),s&&u>M&&(h=u)}(h>0||0===r)&&(e[r].periodX=i+h/2)}}(D,e,e._definedDelta),e.rangebreaks){var oe="y"===e._id.charAt(0),se=1;"auto"===e.tickmode&&(se=e.tickfont?e.tickfont.size:12);var le=NaN;for(n=D.length-1;n>-1;n--)if(D[n].drop)D.splice(n,1);else{D[n].value=Le(D[n].value,e);var ce=e.c2p(D[n].value);(oe?le>ce-se:lef||def&&(ue.periodX=f),de10||"01-01"!==r.substr(5)?e._tickround="d":e._tickround=+t.substr(1)%12===0?"y":"m";else if(t>=T&&a<=10||t>=15*T)e._tickround="d";else if(t>=C&&a<=16||t>=E)e._tickround="M";else if(t>=D&&a<=19||t>=C)e._tickround="S";else{var o=e.l2r(n+t).replace(/^-/,"").length;e._tickround=Math.max(a,o)-20,e._tickround<0&&(e._tickround=4)}}else if(i(t)||"L"===t.charAt(0)){var s=e.range.map(e.r2d||Number);i(t)||(t=Number(t.substr(1))),e._tickround=2-Math.floor(Math.log(t)/Math.LN10+.01);var l=Math.max(Math.abs(s[0]),Math.abs(s[1])),c=Math.floor(Math.log(l)/Math.LN10+.01),u=void 0===e.minexponent?3:e.minexponent;Math.abs(c)>u&&(ve(e.exponentformat)&&!ye(c)?e._tickexponent=3*Math.round((c-1)/3):e._tickexponent=c)}else e._tickround=null}function me(e,t,n){var r=e.tickfont||{};return{x:t,dx:0,dy:0,text:n||"",fontSize:r.size,font:r.family,fontColor:r.color}}W.autoTicks=function(e,t,n){var r;function a(e){return Math.pow(e,Math.floor(Math.log(t)/Math.LN10))}if("date"===e.type){e.tick0=s.dateTick0(e.calendar,0);var o=2*t;if(o>v)t/=v,r=a(10),e.dtick="M"+12*fe(t,r,oe);else if(o>A)t/=A,e.dtick="M"+fe(t,1,se);else if(o>T){if(e.dtick=fe(t,T,e._hasDayOfWeekBreaks?[1,2,7,14]:ce),!n){var l=W.getTickFormat(e),c="period"===e.ticklabelmode;c&&(e._rawTick0=e.tick0),/%[uVW]/.test(l)?e.tick0=s.dateTick0(e.calendar,2):e.tick0=s.dateTick0(e.calendar,1),c&&(e._dowTick0=e.tick0)}}else o>E?e.dtick=fe(t,E,se):o>C?e.dtick=fe(t,C,le):o>D?e.dtick=fe(t,D,le):(r=a(10),e.dtick=fe(t,r,oe))}else if("log"===e.type){e.tick0=0;var u=s.simpleMap(e.range,e.r2l);if(e._isMinor&&(t*=1.5),t>.7)e.dtick=Math.ceil(t);else if(Math.abs(u[1]-u[0])<1){var d=1.5*Math.abs((u[1]-u[0])/t);t=Math.abs(Math.pow(10,u[1])-Math.pow(10,u[0]))/d,r=a(10),e.dtick="L"+fe(t,r,oe)}else e.dtick=t>.3?"D2":"D1"}else"category"===e.type||"multicategory"===e.type?(e.tick0=0,e.dtick=Math.ceil(Math.max(t,1))):Oe(e)?(e.tick0=0,r=1,e.dtick=fe(t,r,he)):(e.tick0=0,r=a(10),e.dtick=fe(t,r,oe));if(0===e.dtick&&(e.dtick=1),!i(e.dtick)&&"string"!==typeof e.dtick){var h=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(h)}},W.tickIncrement=function(e,t,n,a){var o=n?-1:1;if(i(t))return s.increment(e,o*t);var l=t.charAt(0),c=o*Number(t.substr(1));if("M"===l)return s.incrementMonth(e,c,a);if("L"===l)return Math.log(Math.pow(10,e)+c)/Math.LN10;if("D"===l){var u="D2"===t?de:ue,d=e+.01*o,h=s.roundUp(s.mod(d,1),u,n);return Math.floor(d)+Math.log(r.round(Math.pow(10,h),1))/Math.LN10}throw"unrecognized dtick "+String(t)},W.tickFirst=function(e,t){var n=e.r2l||Number,a=s.simpleMap(e.range,n,void 0,void 0,t),o=a[1] ")}else e._prevDateHead=l,c+="
"+l;t.text=c}(e,o,n,c):"log"===u?function(e,t,n,r,a){var o=e.dtick,l=t.x,c=e.tickformat,u="string"===typeof o&&o.charAt(0);"never"===a&&(a="");r&&"L"!==u&&(o="L3",u="L");if(c||"L"===u)t.text=xe(Math.pow(10,l),e,a,r);else if(i(o)||"D"===u&&s.mod(l+.01,1)<.1){var d=Math.round(l),h=Math.abs(d),f=e.exponentformat;"power"===f||ve(f)&&ye(d)?(t.text=0===d?1:1===d?"10":"10"+(d>1?"":R)+h+"",t.fontSize*=1.25):("e"===f||"E"===f)&&h>2?t.text="1"+f+(d>0?"+":R)+h:(t.text=xe(Math.pow(10,l),e,"","fakehover"),"D1"===o&&"y"===e._id.charAt(0)&&(t.dy-=t.fontSize/6))}else{if("D"!==u)throw"unrecognized dtick "+String(o);t.text=String(Math.round(Math.pow(10,s.mod(l,1)))),t.fontSize*=.75}if("D1"===e.dtick){var p=String(t.text).charAt(0);"0"!==p&&"1"!==p||("y"===e._id.charAt(0)?t.dx-=t.fontSize/4:(t.dy+=t.fontSize/2,t.dx+=(e.range[1]>e.range[0]?1:-1)*t.fontSize*(l<0?.5:.25)))}}(e,o,0,c,m):"category"===u?function(e,t){var n=e._categories[Math.round(t.x)];void 0===n&&(n="");t.text=String(n)}(e,o):"multicategory"===u?function(e,t,n){var r=Math.round(t.x),i=e._categories[r]||[],a=void 0===i[1]?"":String(i[1]),o=void 0===i[0]?"":String(i[0]);n?t.text=o+" - "+a:(t.text=a,t.text2=o)}(e,o,n):Oe(e)?function(e,t,n,r,i){if("radians"!==e.thetaunit||n)t.text=xe(t.x,e,i,r);else{var a=t.x/180;if(0===a)t.text="0";else{var o=function(e){function t(e,t){return Math.abs(e-t)<=1e-6}function n(e,r){return t(r,0)?e:n(r,e%r)}function r(e){for(var n=1;!t(Math.round(e*n)/n,e);)n*=10;return n}var i=r(e),a=e*i,o=Math.abs(n(a,i));return[Math.round(a/o),Math.round(i/o)]}(a);if(o[1]>=100)t.text=xe(s.deg2rad(t.x),e,i,r);else{var l=t.x<0;1===o[1]?1===o[0]?t.text="\u03c0":t.text=o[0]+"\u03c0":t.text=["",o[0],"","\u2044","",o[1],"","\u03c0"].join(""),l&&(t.text=R+t.text)}}}}(e,o,n,c,m):function(e,t,n,r,i){"never"===i?i="":"all"===e.showexponent&&Math.abs(t.x/e.dtick)<1e-6&&(i="hide");t.text=xe(t.x,e,i,r)}(e,o,0,c,m),r||(e.tickprefix&&!p(e.showtickprefix)&&(o.text=e.tickprefix+o.text),e.ticksuffix&&!p(e.showticksuffix)&&(o.text+=e.ticksuffix)),"boundaries"===e.tickson||e.showdividers){var g=function(t){var n=e.l2p(t);return n>=0&&n<=e._length?t:null};o.xbnd=[g(o.x-.5),g(o.x+e.dtick-.5)]}return o},W.hoverLabelText=function(e,t,n){n&&(e=s.extendFlat({},e,{hoverformat:n}));var r=Array.isArray(t)?t[0]:t,i=Array.isArray(t)?t[1]:void 0;if(void 0!==i&&i!==r)return W.hoverLabelText(e,r,n)+" - "+W.hoverLabelText(e,i,n);var a="log"===e.type&&r<=0,o=W.tickText(e,e.c2l(a?-r:r),"hover").text;return a?0===r?"0":R+o:o};var ge=["f","p","n","\u03bc","m","","k","M","G","T"];function ve(e){return"SI"===e||"B"===e}function ye(e){return e>14||e<-15}function xe(e,t,n,r){var a=e<0,o=t._tickround,l=n||t.exponentformat||"B",c=t._tickexponent,u=W.getTickFormat(t),d=t.separatethousands;if(r){var h={exponentformat:l,minexponent:t.minexponent,dtick:"none"===t.showexponent?t.dtick:i(e)&&Math.abs(e)||1,range:"none"===t.showexponent?t.range.map(t.r2d):[0,e||1]};pe(h),o=(Number(h._tickround)||0)+4,c=h._tickexponent,t.hoverformat&&(u=t.hoverformat)}if(u)return t._numFormat(u)(e).replace(/-/g,R);var f,p=Math.pow(10,-o)/2;if("none"===l&&(c=0),(e=Math.abs(e))"+f+"":"B"===l&&9===c?e+="B":ve(l)&&(e+=ge[c/3+5]));return a?R+e:e}function be(e,t){if(e){var n=Object.keys(F).reduce((function(e,n){return-1!==t.indexOf(n)&&F[n].forEach((function(t){e[t]=1})),e}),{});Object.keys(e).forEach((function(t){n[t]||(1===t.length?e[t]=0:delete e[t])}))}}function _e(e,t){for(var n=[],r={},i=0;i1&&n=i.min&&e=r(e))}function s(e,t){var n=null===t[0],r=null===t[1],i=a(e,t[0])>=0,o=a(e,t[1])<=0;return(n||i)&&(r||o)}if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":for(t=0;t=0&&i.unshift(i.splice(r,1).shift())}}));var o={false:{left:0,right:0}};return s.syncOrAsync(i.map((function(t){return function(){if(t){var r=W.getFromId(e,t);n||(n={}),n.axShifts=o,n.overlayingShiftedAx=a;var i=W.drawOne(e,r,n);return r._shiftPusher&&Ne(r,r._fullDepth||0,o,!0),r._r=r.range.slice(),r._rl=s.simpleMap(r._r,r.r2l),i}}})))},W.drawOne=function(e,t,n){var r,i,l,c=(n=n||{}).axShifts||{},f=n.overlayingShiftedAx||[];t.setScale();var p=e._fullLayout,m=t._id,g=m.charAt(0),v=W.counterLetter(m),y=p._plots[t._mainSubplot];if(y){if(t._shiftPusher=t.autoshift||-1!==f.indexOf(t._id)||-1!==f.indexOf(t.overlaying),t._shiftPusher&"free"===t.anchor){var x=t.linewidth/2||0;"inside"===t.ticks&&(x+=t.ticklen),Ne(t,x,c,!0),Ne(t,t.shift||0,c,!1)}!0===n.skipTitle&&void 0!==t._shift||(t._shift=function(e,t){return e.autoshift?t[e.overlaying][e.side]:e.shift||0}(t,c));var b=y[g+"axislayer"],_=t._mainLinePosition,w=_+=t._shift,A=t._mainMirrorPosition,S=t._vals=W.calcTicks(t),M=[t.mirror,w,A].join("_");for(r=0;r0?n.bottom-u:0,d))));var h=0,f=0;if(t._shiftPusher&&(h=Math.max(d,n.height>0?"l"===l?u-n.left:n.right-u:0),t.title.text!==p._dfltTitle[g]&&(f=(t._titleStandoff||0)+(t._titleScoot||0),"l"===l&&(f+=Se(t))),t._fullDepth=Math.max(h,f)),t.automargin){r={x:0,y:0,r:0,l:0,t:0,b:0};var m=[0,1],y="number"===typeof t._shift?t._shift:0;if("x"===g){if("b"===l?r[l]=t._depth:(r[l]=t._depth=Math.max(n.width>0?u-n.top:0,d),m.reverse()),n.width>0){var x=n.right-(t._offset+t._length);x>0&&(r.xr=1,r.r=x);var b=t._offset-n.left;b>0&&(r.xl=0,r.l=b)}}else if("l"===l?(t._depth=Math.max(n.height>0?u-n.left:0,d),r[l]=t._depth-y):(t._depth=Math.max(n.height>0?n.right-u:0,d),r[l]=t._depth+y,m.reverse()),n.height>0){var _=n.bottom-(t._offset+t._length);_>0&&(r.yb=0,r.b=_);var w=t._offset-n.top;w>0&&(r.yt=1,r.t=w)}r[v]="free"===t.anchor?t.position:t._anchorAxis.domain[m[0]],t.title.text!==p._dfltTitle[g]&&(r[l]+=Se(t)+(t.title.standoff||0)),t.mirror&&"free"!==t.anchor&&((i={x:0,y:0,r:0,l:0,t:0,b:0})[c]=t.linewidth,t.mirror&&!0!==t.mirror&&(i[c]+=d),!0===t.mirror||"ticks"===t.mirror?i[v]=t._anchorAxis.domain[m[1]]:"all"!==t.mirror&&"allticks"!==t.mirror||(i[v]=[t._counterDomainMin,t._counterDomainMax][m[1]]))}le&&(s=o.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),"string"===typeof t.automargin&&(be(r,t.automargin),be(i,t.automargin)),a.autoMargin(e,ke(t),r),a.autoMargin(e,Ee(t),i),a.autoMargin(e,Ce(t),s)})),s.syncOrAsync(oe)}}function ce(e){var n=m+(e||"tick");return T[n]||(T[n]=function(e,t){var n,r,i,a;e._selections[t].size()?(n=1/0,r=-1/0,i=1/0,a=-1/0,e._selections[t].each((function(){var e=Te(this),t=h.bBox(e.node().parentNode);n=Math.min(n,t.top),r=Math.max(r,t.bottom),i=Math.min(i,t.left),a=Math.max(a,t.right)}))):(n=0,r=0,i=0,a=0);return{top:n,bottom:r,left:i,right:a,height:r-n,width:a-i}}(t,n)),T[n]}},W.getTickSigns=function(e,t){var n=e._id.charAt(0),r={x:"top",y:"right"}[n],i=e.side===r?1:-1,a=[-1,1,i,-i];return"inside"!==(t?(e.minor||{}).ticks:e.ticks)===("x"===n)&&(a=a.map((function(e){return-e}))),e.side&&a.push({l:-1,t:-1,r:1,b:1}[e.side.charAt(0)]),a},W.makeTransTickFn=function(e){return"x"===e._id.charAt(0)?function(t){return l(e._offset+e.l2p(t.x),0)}:function(t){return l(0,e._offset+e.l2p(t.x))}},W.makeTransTickLabelFn=function(e){var t=function(e){var t=e.ticklabelposition||"",n=function(e){return-1!==t.indexOf(e)},r=n("top"),i=n("left"),a=n("right"),o=n("bottom"),s=n("inside"),l=o||i||r||a;if(!l&&!s)return[0,0];var c=e.side,u=l?(e.tickwidth||0)/2:0,d=3,h=e.tickfont?e.tickfont.size:12;(o||r)&&(u+=h*U,d+=(e.linewidth||0)/2);(i||a)&&(u+=(e.linewidth||0)/2,d+=3);s&&"top"===c&&(d-=h*(1-U));(i||r)&&(u=-u);"bottom"!==c&&"right"!==c||(d=-d);return[l?u:0,s?d:0]}(e),n=t[0],r=t[1];return"x"===e._id.charAt(0)?function(t){return l(n+e._offset+e.l2p(we(t)),r)}:function(t){return l(r,n+e._offset+e.l2p(we(t)))}},W.makeTickPath=function(e,t,n,r){r||(r={});var i=r.minor;if(i&&!e.minor)return"";var a=void 0!==r.len?r.len:i?e.minor.ticklen:e.ticklen,o=e._id.charAt(0),s=(e.linewidth||1)/2;return"x"===o?"M0,"+(t+s*n)+"v"+a*n:"M"+(t+s*n)+",0h"+a*n},W.makeLabelFns=function(e,t,n){var r=e.ticklabelposition||"",a=function(e){return-1!==r.indexOf(e)},o=a("top"),l=a("left"),c=a("right"),u=a("bottom")||l||o||c,d=a("inside"),h="inside"===r&&"inside"===e.ticks||!d&&"outside"===e.ticks&&"boundaries"!==e.tickson,f=0,p=0,m=h?e.ticklen:0;if(d?m*=-1:u&&(m=0),h&&(f+=m,n)){var g=s.deg2rad(n);f=m*Math.cos(g)+1,p=m*Math.sin(g)}e.showticklabels&&(h||e.showline)&&(f+=.2*e.tickfont.size);var v,y,x,b,_,w={labelStandoff:f+=(e.linewidth||1)/2*(d?-1:1),labelShift:p},A=0,S=e.side,M=e._id.charAt(0),T=e.tickangle;if("x"===M)b=(_=!d&&"bottom"===S||d&&"top"===S)?1:-1,d&&(b*=-1),v=p*b,y=t+f*b,x=_?1:-.2,90===Math.abs(T)&&(d?x+=j:x=-90===T&&"bottom"===S?U:90===T&&"top"===S?j:.5,A=j/2*(T/90)),w.xFn=function(e){return e.dx+v+A*e.fontSize},w.yFn=function(e){return e.dy+y+e.fontSize*x},w.anchorFn=function(e,t){if(u){if(l)return"end";if(c)return"start"}return i(t)&&0!==t&&180!==t?t*b<0!==d?"end":"start":"middle"},w.heightFn=function(t,n,r){return n<-60||n>60?-.5*r:"top"===e.side!==d?-r:0};else if("y"===M){if(b=(_=!d&&"left"===S||d&&"right"===S)?1:-1,d&&(b*=-1),v=f,y=p*b,x=0,d||90!==Math.abs(T)||(x=-90===T&&"left"===S||90===T&&"right"===S?U:.5),d){var k=i(T)?+T:0;if(0!==k){var E=s.deg2rad(k);A=Math.abs(Math.sin(E))*U*b,x=0}}w.xFn=function(e){return e.dx+t-(v+e.fontSize*x)*b+A*e.fontSize},w.yFn=function(e){return e.dy+y+e.fontSize*j},w.anchorFn=function(e,t){return i(t)&&90===Math.abs(t)?"middle":_?"end":"start"},w.heightFn=function(t,n,r){return"right"===e.side&&(n*=-1),n<-30?-r:n<30?-.5*r:0}}return w},W.drawTicks=function(e,t,n){n=n||{};var i=t._id+"tick",a=[].concat(t.minor&&t.minor.ticks?n.vals.filter((function(e){return e.minor&&!e.noTick})):[]).concat(t.ticks?n.vals.filter((function(e){return!e.minor&&!e.noTick})):[]),o=n.layer.selectAll("path."+i).data(a,Ae);o.exit().remove(),o.enter().append("path").classed(i,1).classed("ticks",1).classed("crisp",!1!==n.crisp).each((function(e){return d.stroke(r.select(this),e.minor?t.minor.tickcolor:t.tickcolor)})).style("stroke-width",(function(n){return h.crispRound(e,n.minor?t.minor.tickwidth:t.tickwidth,1)+"px"})).attr("d",n.path).style("display",null),ze(t,[z]),o.attr("transform",n.transFn)},W.drawGrid=function(e,t,n){if(n=n||{},"sync"!==t.tickmode){var i=t._id+"grid",a=t.minor&&t.minor.showgrid,o=a?n.vals.filter((function(e){return e.minor})):[],s=t.showgrid?n.vals.filter((function(e){return!e.minor})):[],l=n.counterAxis;if(l&&W.shouldShowZeroLine(e,t,l))for(var c="array"===t.tickmode,u=0;u=0;v--){var y=v?m:g;if(y){var x=y.selectAll("path."+i).data(v?s:o,Ae);x.exit().remove(),x.enter().append("path").classed(i,1).classed("crisp",!1!==n.crisp),x.attr("transform",n.transFn).attr("d",n.path).each((function(e){return d.stroke(r.select(this),e.minor?t.minor.gridcolor:t.gridcolor||"#ddd")})).style("stroke-dasharray",(function(e){return h.dashStyle(e.minor?t.minor.griddash:t.griddash,e.minor?t.minor.gridwidth:t.gridwidth)})).style("stroke-width",(function(e){return(e.minor?p:t._gw)+"px"})).style("display",null),"function"===typeof n.path&&x.attr("d",n.path)}}ze(t,[L,I])}},W.drawZeroLine=function(e,t,n){n=n||n;var r=t._id+"zl",i=W.shouldShowZeroLine(e,t,n.counterAxis),a=n.layer.selectAll("path."+r).data(i?[{x:0,id:t._id}]:[]);a.exit().remove(),a.enter().append("path").classed(r,1).classed("zl",1).classed("crisp",!1!==n.crisp).each((function(){n.layer.selectAll("path").sort((function(e,t){return Y(e.id,t.id)}))})),a.attr("transform",n.transFn).attr("d",n.path).call(d.stroke,t.zerolinecolor||d.defaultLine).style("stroke-width",h.crispRound(e,t.zerolinewidth,t._gw||1)+"px").style("display",null),ze(t,[O])},W.drawLabels=function(e,t,n){n=n||{};var a=e._fullLayout,o=t._id,u=o.charAt(0),d=n.cls||o+"tick",f=n.vals.filter((function(e){return e.text})),p=n.labelFns,m=n.secondary?0:t.tickangle,g=(t._prevTickAngles||{})[d],v=n.layer.selectAll("g."+d).data(t.showticklabels?f:[],Ae),y=[];function x(e,a){e.each((function(e){var o=r.select(this),s=o.select(".text-math-group"),u=p.anchorFn(e,a),d=n.transFn.call(o.node(),e)+(i(a)&&0!==+a?" rotate("+a+","+p.xFn(e)+","+(p.yFn(e)-e.fontSize/2)+")":""),f=c.lineCount(o),m=V*e.fontSize,g=p.heightFn(e,i(a)?+a:0,(f-1)*m);if(g&&(d+=l(0,g)),s.empty()){var v=o.select("text");v.attr({transform:d,"text-anchor":u}),v.style("opacity",1),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var y=h.bBox(s.node()).width*{end:-.5,start:.5}[u];s.attr("transform",d+l(y,0))}}))}v.enter().append("g").classed(d,1).append("text").attr("text-anchor","middle").each((function(t){var n=r.select(this),i=e._promises.length;n.call(c.positionText,p.xFn(t),p.yFn(t)).call(h.font,t.font,t.fontSize,t.fontColor).text(t.text).call(c.convertToTspans,e),e._promises[i]?y.push(e._promises.pop().then((function(){x(n,m)}))):x(n,m)})),ze(t,[N]),v.exit().remove(),n.repositionOnUpdate&&v.each((function(e){r.select(this).select("text").call(c.positionText,p.xFn(e),p.yFn(e))})),t._adjustTickLabelsOverflow=function(){var n=t.ticklabeloverflow;if(n&&"allow"!==n){var i=-1!==n.indexOf("hide"),o="x"===t._id.charAt(0),l=0,c=o?e._fullLayout.width:e._fullLayout.height;if(-1!==n.indexOf("domain")){var u=s.simpleMap(t.range,t.r2l);l=t.l2p(u[0])+t._offset,c=t.l2p(u[1])+t._offset}var d=Math.min(l,c),f=Math.max(l,c),p=t.side,m=1/0,g=-1/0;for(var y in v.each((function(e){var n=r.select(this);if(n.select(".text-math-group").empty()){var a=h.bBox(n.node()),s=0;o?(a.right>f||a.leftf||a.top+(t.tickangle?0:e.fontSize/4)t["_visibleLabelMin_"+n._id]?l.style("display","none"):"tick"!==e.K||i||l.style("display",null)}))}))}))}))},x(v,g+1?g:m);var b=null;t._selections&&(t._selections[d]=v);var _=[function(){return y.length&&Promise.all(y)}];t.automargin&&a._redrawFromAutoMarginCount&&90===g?(b=90,_.push((function(){x(v,g)}))):_.push((function(){if(x(v,m),f.length&&"x"===u&&!i(m)&&("log"!==t.type||"D"!==String(t.dtick).charAt(0))){b=0;var e,r=0,a=[];if(v.each((function(e){r=Math.max(r,e.fontSize);var n=t.l2p(e.x),i=Te(this),o=h.bBox(i.node());a.push({top:0,bottom:10,height:10,left:n-o.width/2,right:n+o.width/2+2,width:o.width+2})})),"boundaries"!==t.tickson&&!t.showdividers||n.secondary){var o=f.length,l=Math.abs((f[o-1].x-f[0].x)*t._m)/(o-1),c=t.ticklabelposition||"",d=function(e){return-1!==c.indexOf(e)},p=d("top"),g=d("left"),y=d("right"),_=d("bottom")||g||p||y?(t.tickwidth||0)+6:0,w=l<2.5*r||"multicategory"===t.type||"realaxis"===t._name;for(e=0;e1)for(r=1;r2*o}(i,t))return"date";var g="strict"!==n.autotypenumbers;return function(e,t){for(var n=e.length,r=d(n),i=0,o=0,s={},u=0;u2*i}(i,g)?"category":function(e,t){for(var n=e.length,r=0;r=2){var s,c,u="";if(2===o.length)for(s=0;s<2;s++)if(c=b(o[s])){u=g;break}var d=i("pattern",u);if(d===g)for(s=0;s<2;s++)(c=b(o[s]))&&(t.bounds[s]=o[s]=c-1);if(d)for(s=0;s<2;s++)switch(c=o[s],d){case g:if(!r(c))return void(t.enabled=!1);if((c=+c)!==Math.floor(c)||c<0||c>=7)return void(t.enabled=!1);t.bounds[s]=o[s]=c;break;case v:if(!r(c))return void(t.enabled=!1);if((c=+c)<0||c>24)return void(t.enabled=!1);t.bounds[s]=o[s]=c}if(!1===n.autorange){var h=n.range;if(h[0]h[1])return void(t.enabled=!1)}else if(o[0]>h[0]&&o[1]r?1:-1:+(e.substr(1)||1)-+(t.substr(1)||1)},t.ref2id=function(e){return!!/^[xyz]/.test(e)&&e.split(" ")[0]},t.isLinked=function(e,t){return a(t,e._axisMatchGroups)||a(t,e._axisConstraintGroups)}},15258:function(e){"use strict";e.exports=function(e,t,n,r){if("category"===t.type){var i,a=e.categoryarray,o=Array.isArray(a)&&a.length>0;o&&(i="array");var s,l=n("categoryorder",i);"array"===l&&(s=n("categoryarray")),o||"array"!==l||(l=t.categoryorder="trace"),"trace"===l?t._initialCategories=[]:"array"===l?t._initialCategories=s.slice():(s=function(e,t){var n,r,i,a=t.dataAttr||e._id.charAt(0),o={};if(t.axData)n=t.axData;else for(n=[],r=0;rr?i.substr(r):a.substr(n))+o:i+a+e*t:o}function g(e,t){for(var n=t._size,r=n.h/n.w,i={},a=Object.keys(e),o=0;oc*x)||A)for(n=0;nO&&NR&&(R=N);h/=(R-D)/(2*P),D=l.l2r(D),R=l.l2r(R),l.range=l._input.range=k=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function B(e,t,n,r,i){return e.append("path").attr("class","zoombox").style({fill:t>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",c(n,r)).attr("d",i+"Z")}function j(e,t,n){return e.append("path").attr("class","zoombox-corners").style({fill:d.background,stroke:d.defaultLine,"stroke-width":1,opacity:0}).attr("transform",c(t,n)).attr("d","M0,0Z")}function U(e,t,n,r,i,a){e.attr("d",r+"M"+n.l+","+n.t+"v"+n.h+"h"+n.w+"v-"+n.h+"h-"+n.w+"Z"),V(e,t,i,a)}function V(e,t,n,r){n||(e.transition().style("fill",r>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),t.transition().style("opacity",1).duration(200))}function H(e){r.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function W(e){P&&e.data&&e._context.showTips&&(i.notifier(i._(e,"Double-click to zoom back out"),"long"),P=!1)}function G(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,R)/2);return"M"+(e.l-3.5)+","+(e.t-.5+t)+"h3v"+-t+"h"+t+"v-3h-"+(t+3)+"ZM"+(e.r+3.5)+","+(e.t-.5+t)+"h-3v"+-t+"h"+-t+"v-3h"+(t+3)+"ZM"+(e.r+3.5)+","+(e.b+.5-t)+"h-3v"+t+"h"+-t+"v3h"+(t+3)+"ZM"+(e.l-3.5)+","+(e.b+.5-t)+"h3v"+t+"h"+t+"v3h-"+(t+3)+"Z"}function q(e,t,n,r,a){for(var o,s,l,c,u=!1,d={},h={},f=(a||{}).xaHash,p=(a||{}).yaHash,m=0;m=0)i._fullLayout._deactivateShape(i);else{var o=i._fullLayout.clickmode;if(H(i),2!==e||ve||We(),ge)o.indexOf("select")>-1&&k(n,i,Z,K,t.id,Re),o.indexOf("event")>-1&&f.click(i,n,t.id);else if(1===e&&ve){var s=m?O:P,c="s"===m||"w"===v?0:1,d=s._name+".range["+c+"]",h=function(e,t){var n,r=e.range[t],i=Math.abs(r-e.range[1-t]);return"date"===e.type?r:"log"===e.type?(n=Math.ceil(Math.max(0,-Math.log(i)/Math.LN10))+3,a("."+n+"g")(Math.pow(10,r))):(n=Math.floor(Math.log(Math.abs(r))/Math.LN10)-Math.floor(Math.log(i)/Math.LN10)+4,a("."+String(n)+"g")(r))}(s,c),p="left",g="middle";if(s.fixedrange)return;m?(g="n"===m?"top":"bottom","right"===s.side&&(p="right")):"e"===v&&(p="right"),i._context.showAxisRangeEntryBoxes&&r.select(be).call(u.makeEditable,{gd:i,immediate:!0,background:i._fullLayout.paper_bgcolor,text:String(h),fill:s.tickfont?s.tickfont.color:"#444",horizontalAlign:p,verticalAlign:g}).on("edit",(function(e){var t=s.d2r(e);void 0!==t&&l.call("_guiRelayout",i,d,t)}))}}}function Le(t,n){if(e._transitioningWithDuration)return!1;var r=Math.max(0,Math.min(ee,fe*t+_e)),i=Math.max(0,Math.min(te,pe*n+we)),a=Math.abs(r-_e),o=Math.abs(i-we);function s(){ke="",Ae.r=Ae.l,Ae.t=Ae.b,Ce.attr("d","M0,0Z")}if(Ae.l=Math.min(_e,r),Ae.r=Math.max(_e,r),Ae.t=Math.min(we,i),Ae.b=Math.max(we,i),ne.isSubplotConstrained)a>R||o>R?(ke="xy",a/ee>o/te?(o=a*te/ee,we>i?Ae.t=we-o:Ae.b=we+o):(a=o*ee/te,_e>r?Ae.l=_e-a:Ae.r=_e+a),Ce.attr("d",G(Ae))):s();else if(re.isSubplotConstrained)if(a>R||o>R){ke="xy";var l=Math.min(Ae.l/ee,(te-Ae.b)/te),c=Math.max(Ae.r/ee,(te-Ae.t)/te);Ae.l=l*ee,Ae.r=c*ee,Ae.b=(1-l)*te,Ae.t=(1-c)*te,Ce.attr("d",G(Ae))}else s();else!ae||o0){var u;if(re.isSubplotConstrained||!ie&&1===ae.length){for(u=0;ub[1]-1/4096&&(t.domain=s),i.noneOrAll(e.domain,t.domain,s),"sync"===t.tickmode&&(t.tickmode="auto")}return n("layer"),t}},89426:function(e,t,n){"use strict";var r=n(59652);e.exports=function(e,t,n,i,a){a||(a={});var o=a.tickSuffixDflt,s=r(e);n("tickprefix")&&n("showtickprefix",s),n("ticksuffix",o)&&n("showticksuffix",s)}},42449:function(e,t,n){"use strict";var r=n(18783).FROM_BL;e.exports=function(e,t,n){void 0===n&&(n=r[e.constraintoward||"center"]);var i=[e.r2l(e.range[0]),e.r2l(e.range[1])],a=i[0]+(i[1]-i[0])*n;e.range=e._input.range=[e.l2r(a+(i[0]-a)*t),e.l2r(a+(i[1]-a)*t)],e.setScale()}},21994:function(e,t,n){"use strict";var r=n(39898),i=n(84096).g0,a=n(71828),o=a.numberFormat,s=n(92770),l=a.cleanNumber,c=a.ms2DateTime,u=a.dateTime2ms,d=a.ensureNumber,h=a.isArrayOrTypedArray,f=n(50606),p=f.FP_SAFE,m=f.BADNUM,g=f.LOG_CLIP,v=f.ONEWEEK,y=f.ONEDAY,x=f.ONEHOUR,b=f.ONEMIN,_=f.ONESEC,w=n(41675),A=n(85555),S=A.HOUR_PATTERN,M=A.WEEKDAY_PATTERN;function T(e){return Math.pow(10,e)}function k(e){return null!==e&&void 0!==e}e.exports=function(e,t){t=t||{};var n=e._id||"x",f=n.charAt(0);function E(t,n){if(t>0)return Math.log(t)/Math.LN10;if(t<=0&&n&&e.range&&2===e.range.length){var r=e.range[0],i=e.range[1];return.5*(r+i-2*g*Math.abs(r-i))}return m}function C(t,n,r,i){if((i||{}).msUTC&&s(t))return+t;var o=u(t,r||e.calendar);if(o===m){if(!s(t))return m;t=+t;var l=Math.floor(10*a.mod(t+.05,1)),c=Math.round(t-l/10);o=u(new Date(c))+l/10}return o}function D(t,n,r){return c(t,n,r||e.calendar)}function R(t){return e._categories[Math.round(t)]}function P(t){if(k(t)){if(void 0===e._categoriesMap&&(e._categoriesMap={}),void 0!==e._categoriesMap[t])return e._categoriesMap[t];e._categories.push("number"===typeof t?String(t):t);var n=e._categories.length-1;return e._categoriesMap[t]=n,n}return m}function O(t){if(e._categoriesMap)return e._categoriesMap[t]}function L(e){var t=O(e);return void 0!==t?t:s(e)?+e:void 0}function I(e){return s(e)?+e:O(e)}function z(e,t,n){return r.round(n+t*e,2)}function N(e,t,n){return(e-n)/t}var F=function(t){return s(t)?z(t,e._m,e._b):m},B=function(t){return N(t,e._m,e._b)};if(e.rangebreaks){var j="y"===f;F=function(t){if(!s(t))return m;var n=e._rangebreaks.length;if(!n)return z(t,e._m,e._b);var r=j;e.range[0]>e.range[1]&&(r=!r);for(var i=r?-1:1,a=i*t,o=0,l=0;lu)){o=a<(c+u)/2?l:l+1;break}o=l+1}var d=e._B[o]||0;return isFinite(d)?z(t,e._m2,d):0},B=function(t){var n=e._rangebreaks.length;if(!n)return N(t,e._m,e._b);for(var r=0,i=0;ie._rangebreaks[i].pmax&&(r=i+1);return N(t,e._m2,e._B[r])}}e.c2l="log"===e.type?E:d,e.l2c="log"===e.type?T:d,e.l2p=F,e.p2l=B,e.c2p="log"===e.type?function(e,t){return F(E(e,t))}:F,e.p2c="log"===e.type?function(e){return T(B(e))}:B,-1!==["linear","-"].indexOf(e.type)?(e.d2r=e.r2d=e.d2c=e.r2c=e.d2l=e.r2l=l,e.c2d=e.c2r=e.l2d=e.l2r=d,e.d2p=e.r2p=function(t){return e.l2p(l(t))},e.p2d=e.p2r=B,e.cleanPos=d):"log"===e.type?(e.d2r=e.d2l=function(e,t){return E(l(e),t)},e.r2d=e.r2c=function(e){return T(l(e))},e.d2c=e.r2l=l,e.c2d=e.l2r=d,e.c2r=E,e.l2d=T,e.d2p=function(t,n){return e.l2p(e.d2r(t,n))},e.p2d=function(e){return T(B(e))},e.r2p=function(t){return e.l2p(l(t))},e.p2r=B,e.cleanPos=d):"date"===e.type?(e.d2r=e.r2d=a.identity,e.d2c=e.r2c=e.d2l=e.r2l=C,e.c2d=e.c2r=e.l2d=e.l2r=D,e.d2p=e.r2p=function(t,n,r){return e.l2p(C(t,0,r))},e.p2d=e.p2r=function(e,t,n){return D(B(e),t,n)},e.cleanPos=function(t){return a.cleanDate(t,m,e.calendar)}):"category"===e.type?(e.d2c=e.d2l=P,e.r2d=e.c2d=e.l2d=R,e.d2r=e.d2l_noadd=L,e.r2c=function(t){var n=I(t);return void 0!==n?n:e.fraction2r(.5)},e.l2r=e.c2r=d,e.r2l=I,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return R(B(e))},e.r2p=e.d2p,e.p2r=B,e.cleanPos=function(e){return"string"===typeof e&&""!==e?e:d(e)}):"multicategory"===e.type&&(e.r2d=e.c2d=e.l2d=R,e.d2r=e.d2l_noadd=L,e.r2c=function(t){var n=L(t);return void 0!==n?n:e.fraction2r(.5)},e.r2c_just_indices=O,e.l2r=e.c2r=d,e.r2l=L,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return R(B(e))},e.r2p=e.d2p,e.p2r=B,e.cleanPos=function(e){return Array.isArray(e)||"string"===typeof e&&""!==e?e:d(e)},e.setupMultiCategory=function(r){var i,o,s=e._traceIndices,l=e._matchGroup;if(l&&0===e._categories.length)for(var c in l)if(c!==n){var u=t[w.id2name(c)];s=s.concat(u._traceIndices)}var d=[[0,{}],[0,{}]],p=[];for(i=0;ip&&(o[r]=p),o[0]===o[1]){var c=Math.max(1,Math.abs(1e-6*o[0]));o[0]-=c,o[1]+=c}}else a.nestedProperty(e,t).set(i)},e.setScale=function(n){var r=t._size;if(e.overlaying){var i=w.getFromId({_fullLayout:t},e.overlaying);e.domain=i.domain}var a=n&&e._r?"_r":"range",o=e.calendar;e.cleanRange(a);var s,l,c=e.r2l(e[a][0],o),u=e.r2l(e[a][1],o),d="y"===f;if((d?(e._offset=r.t+(1-e.domain[1])*r.h,e._length=r.h*(e.domain[1]-e.domain[0]),e._m=e._length/(c-u),e._b=-e._m*u):(e._offset=r.l+e.domain[0]*r.w,e._length=r.w*(e.domain[1]-e.domain[0]),e._m=e._length/(u-c),e._b=-e._m*c),e._rangebreaks=[],e._lBreaks=0,e._m2=0,e._B=[],e.rangebreaks)&&(e._rangebreaks=e.locateBreaks(Math.min(c,u),Math.max(c,u)),e._rangebreaks.length)){for(s=0;su&&(h=!h),h&&e._rangebreaks.reverse();var p=h?-1:1;for(e._m2=p*e._length/(Math.abs(u-c)-e._lBreaks),e._B.push(-e._m2*(d?u:c)),s=0;si&&(i+=7,oi&&(i+=24,o=r&&o=r&&t=s.min&&(es.max&&(s.max=r),i=!1)}i&&c.push({min:e,max:r})}};for(r=0;rn.duration?(!function(){for(var n={},r=0;r rect").call(o.setTranslate,0,0).call(o.setScale,1,1),e.plot.call(o.setTranslate,t._offset,n._offset).call(o.setScale,1,1);var r=e.plot.selectAll(".scatterlayer .trace");r.selectAll(".point").call(o.setPointGroupScale,1,1),r.selectAll(".textpoint").call(o.setTextPointsScale,1,1),r.call(o.hideOutsideRangePoints,e)}function g(t,n){var r=t.plotinfo,i=r.xaxis,l=r.yaxis,c=i._length,u=l._length,d=!!t.xr1,h=!!t.yr1,f=[];if(d){var p=a.simpleMap(t.xr0,i.r2l),m=a.simpleMap(t.xr1,i.r2l),g=p[1]-p[0],v=m[1]-m[0];f[0]=(p[0]*(1-n)+n*m[0]-p[0])/(p[1]-p[0])*c,f[2]=c*(1-n+n*v/g),i.range[0]=i.l2r(p[0]*(1-n)+n*m[0]),i.range[1]=i.l2r(p[1]*(1-n)+n*m[1])}else f[0]=0,f[2]=c;if(h){var y=a.simpleMap(t.yr0,l.r2l),x=a.simpleMap(t.yr1,l.r2l),b=y[1]-y[0],_=x[1]-x[0];f[1]=(y[1]*(1-n)+n*x[1]-y[1])/(y[0]-y[1])*u,f[3]=u*(1-n+n*_/b),l.range[0]=i.l2r(y[0]*(1-n)+n*x[0]),l.range[1]=l.l2r(y[1]*(1-n)+n*x[1])}else f[1]=0,f[3]=u;s.drawOne(e,i,{skipTitle:!0}),s.drawOne(e,l,{skipTitle:!0}),s.redrawComponents(e,[i._id,l._id]);var w=d?c/f[2]:1,A=h?u/f[3]:1,S=d?f[0]:0,M=h?f[1]:0,T=d?f[0]/f[2]*c:0,k=h?f[1]/f[3]*u:0,E=i._offset-T,C=l._offset-k;r.clipRect.call(o.setTranslate,S,M).call(o.setScale,1/w,1/A),r.plot.call(o.setTranslate,E,C).call(o.setScale,w,A),o.setPointGroupScale(r.zoomScalePts,1/w,1/A),o.setTextPointsScale(r.zoomScaleTxt,1/w,1/A)}s.redrawComponents(e)}},951:function(e,t,n){"use strict";var r=n(73972).traceIs,i=n(4322);function a(e){return{v:"x",h:"y"}[e.orientation||"v"]}function o(e,t){var n=a(e),i=r(e,"box-violin"),o=r(e._fullInput||{},"candlestick");return i&&!o&&t===n&&void 0===e[n]&&void 0===e[n+"0"]}e.exports=function(e,t,n,s){n("autotypenumbers",s.autotypenumbersDflt),"-"===n("type",(s.splomStash||{}).type)&&(!function(e,t){if("-"!==e.type)return;var n,s=e._id,l=s.charAt(0);-1!==s.indexOf("scene")&&(s=l);var c=function(e,t,n){for(var r=0;r0&&(i["_"+n+"axes"]||{})[t])return i;if((i[n+"axis"]||n)===t){if(o(i,n))return i;if((i[n]||[]).length||i[n+"0"])return i}}}(t,s,l);if(!c)return;if("histogram"===c.type&&l==={v:"y",h:"x"}[c.orientation||"v"])return void(e.type="linear");var u=l+"calendar",d=c[u],h={noMultiCategory:!r(c,"cartesian")||r(c,"noMultiCategory")};"box"===c.type&&c._hasPreCompStats&&l==={h:"x",v:"y"}[c.orientation||"v"]&&(h.noMultiCategory=!0);if(h.autotypenumbers=e.autotypenumbers,o(c,l)){var f=a(c),p=[];for(n=0;n0?".":"")+a;i.isPlainObject(o)?l(o,t,s,r+1):t(s,a,o)}}))}t.manageCommandObserver=function(e,n,r,o){var s={},l=!0;n&&n._commandObserver&&(s=n._commandObserver),s.cache||(s.cache={}),s.lookupTable={};var c=t.hasSimpleAPICommandBindings(e,r,s.lookupTable);if(n&&n._commandObserver){if(c)return s;if(n._commandObserver.remove)return n._commandObserver.remove(),n._commandObserver=null,s}if(c){a(e,c,s.cache),s.check=function(){if(l){var t=a(e,c,s.cache);return t.changed&&o&&void 0!==s.lookupTable[t.value]&&(s.disable(),Promise.resolve(o({value:t.value,type:c.type,prop:c.prop,traces:c.traces,index:s.lookupTable[t.value]})).then(s.enable,s.enable)),t.changed}};for(var u=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],d=0;d0&&i<0&&(i+=360);var s=(i-r)/4;return{type:"Polygon",coordinates:[[[r,a],[r,o],[r+s,o],[r+2*s,o],[r+3*s,o],[i,o],[i,a],[i-s,a],[i-2*s,a],[i-3*s,a],[r,a]]]}}e.exports=function(e){return new T(e)},k.plot=function(e,t,n,r){var i=this;if(r)return i.update(e,t,!0);i._geoCalcData=e,i._fullLayout=t;var a=t[this.id],o=[],s=!1;for(var l in w.layerNameToAdjective)if("frame"!==l&&a["show"+l]){s=!0;break}for(var c=!1,u=0;u0&&o._module.calcGeoJSON(a,t)}if(!n){if(this.updateProjection(e,t))return;this.viewInitial&&this.scope===r.scope||this.saveViewInitial(r)}this.scope=r.scope,this.updateBaseLayers(t,r),this.updateDims(t,r),this.updateFx(t,r),p.generalUpdatePerTraceModule(this.graphDiv,this,e,r);var s=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=s.selectAll(".point"),this.dataPoints.text=s.selectAll("text"),this.dataPaths.line=s.selectAll(".js-line");var l=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=l.selectAll("path"),this._render()},k.updateProjection=function(e,t){var n=this.graphDiv,r=t[this.id],l=t._size,u=r.domain,d=r.projection,h=r.lonaxis,f=r.lataxis,p=h._ax,m=f._ax,v=this.projection=function(e){var t=e.projection,n=t.type,r=w.projNames[n];r="geo"+c.titleCase(r);for(var l=(i[r]||s[r])(),u=e._isSatellite?180*Math.acos(1/t.distance)/Math.PI:e._isClipped?w.lonaxisSpan[n]/2:null,d=["center","rotate","parallels","clipExtent"],h=function(e){return e?l:[]},f=0;fu*Math.PI/180}return!1},l.getPath=function(){return a().projection(l)},l.getBounds=function(e){return l.getPath().bounds(e)},l.precision(w.precision),e._isSatellite&&l.tilt(t.tilt).distance(t.distance);u&&l.clipAngle(u-w.clipPad);return l}(r),y=[[l.l+l.w*u.x[0],l.t+l.h*(1-u.y[1])],[l.l+l.w*u.x[1],l.t+l.h*(1-u.y[0])]],x=r.center||{},b=d.rotation||{},_=h.range||[],A=f.range||[];if(r.fitbounds){p._length=y[1][0]-y[0][0],m._length=y[1][1]-y[0][1],p.range=g(n,p),m.range=g(n,m);var S=(p.range[0]+p.range[1])/2,M=(m.range[0]+m.range[1])/2;if(r._isScoped)x={lon:S,lat:M};else if(r._isClipped){x={lon:S,lat:M},b={lon:S,lat:M,roll:b.roll};var T=d.type,k=w.lonaxisSpan[T]/2||180,C=w.lataxisSpan[T]/2||90;_=[S-k,S+k],A=[M-C,M+C]}else x={lon:S,lat:M},b={lon:S,lat:b.lat,roll:b.roll}}v.center([x.lon-b.lon,x.lat-b.lat]).rotate([-b.lon,-b.lat,b.roll]).parallels(d.parallels);var D=E(_,A);v.fitExtent(y,D);var R=this.bounds=v.getBounds(D),P=this.fitScale=v.scale(),O=v.translate();if(r.fitbounds){var L=v.getBounds(E(p.range,m.range)),I=Math.min((R[1][0]-R[0][0])/(L[1][0]-L[0][0]),(R[1][1]-R[0][1])/(L[1][1]-L[0][1]));isFinite(I)?v.scale(I*P):c.warn("Something went wrong during"+this.id+"fitbounds computations.")}else v.scale(d.scale*P);var z=this.midPt=[(R[0][0]+R[1][0])/2,(R[0][1]+R[1][1])/2];if(v.translate([O[0]+(z[0]-O[0]),O[1]+(z[1]-O[1])]).clipExtent(R),r._isAlbersUsa){var N=v([x.lon,x.lat]),F=v.translate();v.translate([F[0]-(N[0]-F[0]),F[1]-(N[1]-F[1])])}},k.updateBaseLayers=function(e,t){var n=this,i=n.topojson,a=n.layers,o=n.basePaths;function s(e){return"lonaxis"===e||"lataxis"===e}function l(e){return Boolean(w.lineLayers[e])}function c(e){return Boolean(w.fillLayers[e])}var u=(this.hasChoropleth?w.layersForChoropleth:w.layers).filter((function(e){return l(e)||c(e)?t["show"+e]:!s(e)||t[e].showgrid})),f=n.framework.selectAll(".layer").data(u,String);f.exit().each((function(e){delete a[e],delete o[e],r.select(this).remove()})),f.enter().append("g").attr("class",(function(e){return"layer "+e})).each((function(e){var t=a[e]=r.select(this);"bg"===e?n.bgRect=t.append("rect").style("pointer-events","all"):s(e)?o[e]=t.append("path").style("fill","none"):"backplot"===e?t.append("g").classed("choroplethlayer",!0):"frontplot"===e?t.append("g").classed("scatterlayer",!0):l(e)?o[e]=t.append("path").style("fill","none").style("stroke-miterlimit",2):c(e)&&(o[e]=t.append("path").style("stroke","none"))})),f.order(),f.each((function(n){var r=o[n],a=w.layerNameToAdjective[n];"frame"===n?r.datum(w.sphereSVG):l(n)||c(n)?r.datum(M(i,i.objects[n])):s(n)&&r.datum(function(e,t,n){var r,i,a,o=1e-6,s=2.5,l=t[e],c=w.scopeDefaults[t.scope];"lonaxis"===e?(r=c.lonaxisRange,i=c.lataxisRange,a=function(e,t){return[e,t]}):"lataxis"===e&&(r=c.lataxisRange,i=c.lonaxisRange,a=function(e,t){return[t,e]});var u={type:"linear",range:[r[0],r[1]-o],tick0:l.tick0,dtick:l.dtick};m.setConvert(u,n);var d=m.calcTicks(u);t.isScoped||"lonaxis"!==e||d.pop();for(var h=d.length,f=new Array(h),p=0;p-1&&b(r.event,i,[n.xaxis],[n.yaxis],n.id,u),s.indexOf("event")>-1&&f.click(i,r.event))}))}function d(e){return n.projection.invert([e[0]+n.xaxis._offset,e[1]+n.yaxis._offset])}},k.makeFramework=function(){var e=this,t=e.graphDiv,n=t._fullLayout,i="clip"+n._uid+e.id;e.clipDef=n._clips.append("clipPath").attr("id",i),e.clipRect=e.clipDef.append("rect"),e.framework=r.select(e.container).append("g").attr("class","geo "+e.id).call(h.setClipUrl,i,t),e.project=function(t){var n=e.projection(t);return n?[n[0]-e.xaxis._offset,n[1]-e.yaxis._offset]:[null,null]},e.xaxis={_id:"x",c2p:function(t){return e.project(t)[0]}},e.yaxis={_id:"y",c2p:function(t){return e.project(t)[1]}},e.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},m.setConvert(e.mockAxis,n)},k.saveViewInitial=function(e){var t,n=e.center||{},r=e.projection,i=r.rotation||{};this.viewInitial={fitbounds:e.fitbounds,"projection.scale":r.scale},t=e._isScoped?{"center.lon":n.lon,"center.lat":n.lat}:e._isClipped?{"projection.rotation.lon":i.lon,"projection.rotation.lat":i.lat}:{"center.lon":n.lon,"center.lat":n.lat,"projection.rotation.lon":i.lon},c.extendFlat(this.viewInitial,t)},k.render=function(e){this._hasMarkerAngles&&e?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},k._render=function(){var e,t=this.projection,n=t.getPath();function r(e){var n=t(e.lonlat);return n?u(n[0],n[1]):null}function i(e){return t.isLonLatOverEdges(e.lonlat)?"none":null}for(e in this.basePaths)this.basePaths[e].attr("d",n);for(e in this.dataPaths)this.dataPaths[e].attr("d",(function(e){return n(e.geojson)}));for(e in this.dataPoints)this.dataPoints[e].attr("display",i).attr("transform",r)}},44622:function(e,t,n){"use strict";var r=n(27659).AU,i=n(71828).counterRegex,a=n(69082),o="geo",s=i(o),l={};l[o]={valType:"subplotid",dflt:o,editType:"calc"},e.exports={attr:o,name:o,idRoot:o,idRegex:s,attrRegex:s,attributes:l,layoutAttributes:n(77519),supplyLayoutDefaults:n(82161),plot:function(e){for(var t=e._fullLayout,n=e.calcdata,i=t._subplots[o],s=0;s0&&R<0&&(R+=360);var P,O,L,I=(D+R)/2;if(!f){var z=p?d.projRotate:[I,0,0];P=n("projection.rotation.lon",z[0]),n("projection.rotation.lat",z[1]),n("projection.rotation.roll",z[2]),n("showcoastlines",!p&&x)&&(n("coastlinecolor"),n("coastlinewidth")),n("showocean",!!x&&void 0)&&n("oceancolor")}(f?(O=-96.6,L=38.7):(O=p?I:P,L=(C[0]+C[1])/2),n("center.lon",O),n("center.lat",L),m&&(n("projection.tilt"),n("projection.distance")),g)&&n("projection.parallels",d.projParallels||[0,60]);n("projection.scale"),n("showland",!!x&&void 0)&&n("landcolor"),n("showlakes",!!x&&void 0)&&n("lakecolor"),n("showrivers",!!x&&void 0)&&(n("rivercolor"),n("riverwidth")),n("showcountries",p&&"usa"!==u&&x)&&(n("countrycolor"),n("countrywidth")),("usa"===u||"north america"===u&&50===c)&&(n("showsubunits",x),n("subunitcolor"),n("subunitwidth")),p||n("showframe",x)&&(n("framecolor"),n("framewidth")),n("bgcolor"),n("fitbounds")&&(delete t.projection.scale,p?(delete t.center.lon,delete t.center.lat):v?(delete t.center.lon,delete t.center.lat,delete t.projection.rotation.lon,delete t.projection.rotation.lat,delete t.lonaxis.range,delete t.lataxis.range):(delete t.center.lon,delete t.center.lat,delete t.projection.rotation.lon))}e.exports=function(e,t,n){i(e,t,n,{type:"geo",attributes:s,handleDefaults:c,fullData:n,partition:"y"})}},74455:function(e,t,n){"use strict";var r=n(39898),i=n(71828),a=n(73972),o=Math.PI/180,s=180/Math.PI,l={cursor:"pointer"},c={cursor:"auto"};function u(e,t){return r.behavior.zoom().translate(t.translate()).scale(t.scale())}function d(e,t,n){var r=e.id,o=e.graphDiv,s=o.layout,l=s[r],c=o._fullLayout,u=c[r],d={},h={};function f(e,t){d[r+"."+e]=i.nestedProperty(l,e).get(),a.call("_storeDirectGUIEdit",s,c._preGUI,d);var n=i.nestedProperty(u,e);n.get()!==t&&(n.set(t),i.nestedProperty(l,e).set(t),h[r+"."+e]=t)}n(f),f("projection.scale",t.scale()/e.fitScale),f("fitbounds",!1),o.emit("plotly_relayout",h)}function h(e,t){var n=u(0,t);function i(n){var r=t.invert(e.midPt);n("center.lon",r[0]),n("center.lat",r[1])}return n.on("zoomstart",(function(){r.select(this).style(l)})).on("zoom",(function(){t.scale(r.event.scale).translate(r.event.translate),e.render(!0);var n=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":n[0],"geo.center.lat":n[1]})})).on("zoomend",(function(){r.select(this).style(c),d(e,t,i)})),n}function f(e,t){var n,i,a,o,s,h,f,p,m,g=u(0,t);function v(e){return t.invert(e)}function y(n){var r=t.rotate(),i=t.invert(e.midPt);n("projection.rotation.lon",-r[0]),n("center.lon",i[0]),n("center.lat",i[1])}return g.on("zoomstart",(function(){r.select(this).style(l),n=r.mouse(this),i=t.rotate(),a=t.translate(),o=i,s=v(n)})).on("zoom",(function(){if(h=r.mouse(this),function(e){var n=v(e);if(!n)return!0;var r=t(n);return Math.abs(r[0]-e[0])>2||Math.abs(r[1]-e[1])>2}(n))return g.scale(t.scale()),void g.translate(t.translate());t.scale(r.event.scale),t.translate([a[0],r.event.translate[1]]),s?v(h)&&(p=v(h),f=[o[0]+(p[0]-s[0]),i[1],i[2]],t.rotate(f),o=f):s=v(n=h),m=!0,e.render(!0);var l=t.rotate(),c=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":c[0],"geo.center.lat":c[1],"geo.projection.rotation.lon":-l[0]})})).on("zoomend",(function(){r.select(this).style(c),m&&d(e,t,y)})),g}function p(e,t){var n,i={r:t.rotate(),k:t.scale()},a=u(0,t),h=function(e){var t=0,n=arguments.length,i=[];for(;++tp?(a=(d>0?90:-90)-f,i=0):(a=Math.asin(d/p)*s-f,i=Math.sqrt(p*p-d*d));var m=180-a-2*f,v=(Math.atan2(h,u)-Math.atan2(c,i))*s,x=(Math.atan2(h,u)-Math.atan2(c,-i))*s,b=g(n[0],n[1],a,v),_=g(n[0],n[1],m,x);return b<=_?[a,v,n[2]]:[m,x,n[2]]}(l,n,d);isFinite(f[0])&&isFinite(f[1])&&isFinite(f[2])||(f=d),t.rotate(f),d=f}}else n=m(t,c=e);h.of(this,arguments)({type:"zoom"})})),e=h.of(this,arguments),f++||e({type:"zoomstart"})})).on("zoomend",(function(){var n;r.select(this).style(c),p.call(a,"zoom",null),n=h.of(this,arguments),--f||n({type:"zoomend"}),d(e,t,v)})).on("zoom.redraw",(function(){e.render(!0);var n=t.rotate();e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.projection.rotation.lon":-n[0],"geo.projection.rotation.lat":-n[1]})})),r.rebind(a,h,"on")}function m(e,t){var n=e.invert(t);return n&&isFinite(n[0])&&isFinite(n[1])&&function(e){var t=e[0]*o,n=e[1]*o,r=Math.cos(n);return[r*Math.cos(t),r*Math.sin(t),Math.sin(n)]}(n)}function g(e,t,n,r){var i=v(n-e),a=v(r-t);return Math.sqrt(i*i+a*a)}function v(e){return(e%360+540)%360-180}function y(e,t,n){var r=n*o,i=e.slice(),a=0===t?1:0,s=2===t?1:2,l=Math.cos(r),c=Math.sin(r);return i[a]=e[a]*l-e[s]*c,i[s]=e[s]*l+e[a]*c,i}function x(e,t){for(var n=0,r=0,i=e.length;rMath.abs(s)?(c.boxEnd[1]=c.boxStart[1]+Math.abs(a)*_*(s>=0?1:-1),c.boxEnd[1]l[3]&&(c.boxEnd[1]=l[3],c.boxEnd[0]=c.boxStart[0]+(l[3]-c.boxStart[1])/Math.abs(_))):(c.boxEnd[0]=c.boxStart[0]+Math.abs(s)/_*(a>=0?1:-1),c.boxEnd[0]l[2]&&(c.boxEnd[0]=l[2],c.boxEnd[1]=c.boxStart[1]+(l[2]-c.boxStart[0])*Math.abs(_)))}}else c.boxEnabled?(a=c.boxStart[0]!==c.boxEnd[0],s=c.boxStart[1]!==c.boxEnd[1],a||s?(a&&(g(0,c.boxStart[0],c.boxEnd[0]),e.xaxis.autorange=!1),s&&(g(1,c.boxStart[1],c.boxEnd[1]),e.yaxis.autorange=!1),e.relayoutCallback()):e.glplot.setDirty(),c.boxEnabled=!1,c.boxInited=!1):c.boxInited&&(c.boxInited=!1);break;case"pan":c.boxEnabled=!1,c.boxInited=!1,t?(c.panning||(c.dragStart[0]=r,c.dragStart[1]=i),Math.abs(c.dragStart[0]-r).999&&(g="turntable"):g="turntable")}else g="turntable";n("dragmode",g),n("hovermode",r.getDfltFromLayout("hovermode"))}e.exports=function(e,t,n){var i=t._basePlotModules.length>1;o(e,t,n,{type:u,attributes:l,handleDefaults:d,fullLayout:t,font:t.font,fullData:n,getDfltFromLayout:function(t){if(!i)return r.validate(e[t],l[t])?e[t]:void 0},autotypenumbersDflt:t.autotypenumbers,paper_bgcolor:t.paper_bgcolor,calendar:t.calendar})}},65500:function(e,t,n){"use strict";var r=n(77894),i=n(27670).Y,a=n(1426).extendFlat,o=n(71828).counterRegex;function s(e,t,n){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:t,editType:"camera"},z:{valType:"number",dflt:n,editType:"camera"},editType:"camera"}}e.exports={_arrayAttrRegexps:[o("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:a(s(0,0,1),{}),center:a(s(0,0,0),{}),eye:a(s(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:i({name:"scene",editType:"plot"}),aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto",editType:"plot",impliedEdits:{"aspectratio.x":void 0,"aspectratio.y":void 0,"aspectratio.z":void 0}},aspectratio:{x:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},y:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},z:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},editType:"plot",impliedEdits:{aspectmode:"manual"}},xaxis:r,yaxis:r,zaxis:r,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar"},uirevision:{valType:"any",editType:"none"},editType:"plot",_deprecated:{cameraposition:{valType:"info_array",editType:"camera"}}}},13133:function(e,t,n){"use strict";var r=n(78614),i=["xaxis","yaxis","zaxis"];function a(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}a.prototype.merge=function(e){for(var t=0;t<3;++t){var n=e[i[t]];n.visible?(this.enabled[t]=n.showspikes,this.colors[t]=r(n.spikecolor),this.drawSides[t]=n.spikesides,this.lineWidth[t]=n.spikethickness):(this.enabled[t]=!1,this.drawSides[t]=!1)}},e.exports=function(e){var t=new a;return t.merge(e),t}},96085:function(e,t,n){"use strict";e.exports=function(e){for(var t=e.axesOptions,n=e.glplot.axesPixels,s=e.fullSceneLayout,l=[[],[],[]],c=0;c<3;++c){var u=s[a[c]];if(u._length=(n[c].hi-n[c].lo)*n[c].pixelsPerDataUnit/e.dataScale[c],Math.abs(u._length)===1/0||isNaN(u._length))l[c]=[];else{u._input_range=u.range.slice(),u.range[0]=n[c].lo/e.dataScale[c],u.range[1]=n[c].hi/e.dataScale[c],u._m=1/(e.dataScale[c]*n[c].pixelsPerDataUnit),u.range[0]===u.range[1]&&(u.range[0]-=1,u.range[1]+=1);var d=u.tickmode;if("auto"===u.tickmode){u.tickmode="linear";var h=u.nticks||i.constrain(u._length/40,4,9);r.autoTicks(u,Math.abs(u.range[1]-u.range[0])/h)}for(var f=r.calcTicks(u,{msUTC:!0}),p=0;p/g," "));l[c]=f,u.tickmode=d}}t.ticks=l;for(c=0;c<3;++c){o[c]=.5*(e.glplot.bounds[0][c]+e.glplot.bounds[1][c]);for(p=0;p<2;++p)t.bounds[p][c]=e.glplot.bounds[p][c]}e.contourLevels=function(e){for(var t=new Array(3),n=0;n<3;++n){for(var r=e[n],i=new Array(r.length),a=0;an.deltaY?1.1:1/1.1,a=e.glplot.getAspectratio();e.glplot.setAspectratio({x:r*a.x,y:r*a.y,z:r*a.z})}i(e)}}),!!c&&{passive:!1}),e.glplot.canvas.addEventListener("mousemove",(function(){if(!1!==e.fullSceneLayout.dragmode&&0!==e.camera.mouseListener.buttons){var t=r();e.graphDiv.emit("plotly_relayouting",t)}})),e.staticMode||e.glplot.canvas.addEventListener("webglcontextlost",(function(n){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:n,layer:e.id})}),!1)),e.glplot.oncontextloss=function(){e.recoverContext()},e.glplot.onrender=function(){e.render()},!0},w.render=function(){var e,t=this,n=t.graphDiv,r=t.svgContainer,i=t.container.getBoundingClientRect();n._fullLayout._calcInverseTransform(n);var a=n._fullLayout._invScaleX,o=n._fullLayout._invScaleY,s=i.width*a,l=i.height*o;r.setAttributeNS(null,"viewBox","0 0 "+s+" "+l),r.setAttributeNS(null,"width",s),r.setAttributeNS(null,"height",l),b(t),t.glplot.axes.update(t.axesOptions);for(var c=Object.keys(t.traces),u=null,h=t.glplot.selection,m=0;m")):"isosurface"===e.type||"volume"===e.type?(A.valueLabel=f.hoverLabelText(t._mockAxis,t._mockAxis.d2l(h.traceCoordinate[3]),e.valuehoverformat),k.push("value: "+A.valueLabel),h.textLabel&&k.push(h.textLabel),x=k.join("
")):x=h.textLabel;var E={x:h.traceCoordinate[0],y:h.traceCoordinate[1],z:h.traceCoordinate[2],data:_._input,fullData:_,curveNumber:_.index,pointNumber:w};p.appendArrayPointValue(E,_,w),e._module.eventData&&(E=_._module.eventData(E,h,_,{},w));var C={points:[E]};if(t.fullSceneLayout.hovermode){var D=[];p.loneHover({trace:_,x:(.5+.5*y[0]/y[3])*s,y:(.5-.5*y[1]/y[3])*l,xLabel:A.xLabel,yLabel:A.yLabel,zLabel:A.zLabel,text:x,name:u.name,color:p.castHoverOption(_,w,"bgcolor")||u.color,borderColor:p.castHoverOption(_,w,"bordercolor"),fontFamily:p.castHoverOption(_,w,"font.family"),fontSize:p.castHoverOption(_,w,"font.size"),fontColor:p.castHoverOption(_,w,"font.color"),nameLength:p.castHoverOption(_,w,"namelength"),textAlign:p.castHoverOption(_,w,"align"),hovertemplate:d.castOption(_,w,"hovertemplate"),hovertemplateLabels:d.extendFlat({},E,A),eventData:[E]},{container:r,gd:n,inOut_bbox:D}),E.bbox=D[0]}h.buttons&&h.distance<5?n.emit("plotly_click",C):n.emit("plotly_hover",C),this.oldEventData=C}else p.loneUnhover(r),this.oldEventData&&n.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;t.drawAnnotations(t)},w.recoverContext=function(){var e=this;e.glplot.dispose();var t=function(){e.glplot.gl.isContextLost()?requestAnimationFrame(t):e.initializeGLPlot()?e.plot.apply(e,e.plotArgs):d.error("Catastrophic and unrecoverable WebGL error. Context lost.")};requestAnimationFrame(t)};var S=["xaxis","yaxis","zaxis"];function M(e,t,n){for(var r=e.fullSceneLayout,i=0;i<3;i++){var a=S[i],o=a.charAt(0),s=r[a],l=t[o],c=t[o+"calendar"],u=t["_"+o+"length"];if(d.isArrayOrTypedArray(l))for(var h,f=0;f<(u||l.length);f++)if(d.isArrayOrTypedArray(l[f]))for(var p=0;pv[1][o])v[0][o]=-1,v[1][o]=1;else{var D=v[1][o]-v[0][o];v[0][o]-=D/32,v[1][o]+=D/32}if("reversed"===l.autorange){var R=v[0][o];v[0][o]=v[1][o],v[1][o]=R}}else{var P=l.range;v[0][o]=l.r2l(P[0]),v[1][o]=l.r2l(P[1])}v[0][o]===v[1][o]&&(v[0][o]-=1,v[1][o]+=1),y[o]=v[1][o]-v[0][o],r.glplot.setBounds(o,{min:v[0][o]*f[o],max:v[1][o]*f[o]})}var O=u.aspectmode;if("cube"===O)g=[1,1,1];else if("manual"===O){var L=u.aspectratio;g=[L.x,L.y,L.z]}else{if("auto"!==O&&"data"!==O)throw new Error("scene.js aspectRatio was not one of the enumerated types");var I=[1,1,1];for(o=0;o<3;++o){var z=x[c=(l=u[S[o]]).type];I[o]=Math.pow(z.acc,1/z.count)/f[o]}g="data"===O||Math.max.apply(null,I)/Math.min.apply(null,I)<=4?I:[1,1,1]}u.aspectratio.x=d.aspectratio.x=g[0],u.aspectratio.y=d.aspectratio.y=g[1],u.aspectratio.z=d.aspectratio.z=g[2],r.glplot.setAspectratio(u.aspectratio),r.viewInitial.aspectratio||(r.viewInitial.aspectratio={x:u.aspectratio.x,y:u.aspectratio.y,z:u.aspectratio.z}),r.viewInitial.aspectmode||(r.viewInitial.aspectmode=u.aspectmode);var N=u.domain||null,F=t._size||null;if(N&&F){var B=r.container.style;B.position="absolute",B.left=F.l+N.x[0]*F.w+"px",B.top=F.t+(1-N.y[1])*F.h+"px",B.width=F.w*(N.x[1]-N.x[0])+"px",B.height=F.h*(N.y[1]-N.y[0])+"px"}r.glplot.redraw()}},w.destroy=function(){var e=this;e.glplot&&(e.camera.mouseListener.enabled=!1,e.container.removeEventListener("wheel",e.camera.wheelListener),e.camera=null,e.glplot.dispose(),e.container.parentNode.removeChild(e.container),e.glplot=null)},w.getCamera=function(){var e,t=this;return t.camera.view.recalcMatrix(t.camera.view.lastT()),{up:{x:(e=t.camera).up[0],y:e.up[1],z:e.up[2]},center:{x:e.center[0],y:e.center[1],z:e.center[2]},eye:{x:e.eye[0],y:e.eye[1],z:e.eye[2]},projection:{type:!0===e._ortho?"orthographic":"perspective"}}},w.setViewport=function(e){var t,n=this,r=e.camera;n.camera.lookAt.apply(this,[[(t=r).eye.x,t.eye.y,t.eye.z],[t.center.x,t.center.y,t.center.z],[t.up.x,t.up.y,t.up.z]]),n.glplot.setAspectratio(e.aspectratio),"orthographic"===r.projection.type!==n.camera._ortho&&(n.glplot.redraw(),n.glplot.clearRGBA(),n.glplot.dispose(),n.initializeGLPlot())},w.isCameraChanged=function(e){var t=this.getCamera(),n=d.nestedProperty(e,this.id+".camera").get();function r(e,t,n,r){var i=["up","center","eye"],a=["x","y","z"];return t[i[n]]&&e[i[n]][a[r]]===t[i[n]][a[r]]}var i=!1;if(void 0===n)i=!0;else{for(var a=0;a<3;a++)for(var o=0;o<3;o++)if(!r(t,n,a,o)){i=!0;break}(!n.projection||t.projection&&t.projection.type!==n.projection.type)&&(i=!0)}return i},w.isAspectChanged=function(e){var t=this.glplot.getAspectratio(),n=d.nestedProperty(e,this.id+".aspectratio").get();return void 0===n||n.x!==t.x||n.y!==t.y||n.z!==t.z},w.saveLayout=function(e){var t,n,r,i,a,o,s=this,l=s.fullLayout,c=s.isCameraChanged(e),h=s.isAspectChanged(e),f=c||h;if(f){var p={};if(c&&(t=s.getCamera(),r=(n=d.nestedProperty(e,s.id+".camera")).get(),p[s.id+".camera"]=r),h&&(i=s.glplot.getAspectratio(),o=(a=d.nestedProperty(e,s.id+".aspectratio")).get(),p[s.id+".aspectratio"]=o),u.call("_storeDirectGUIEdit",e,l._preGUI,p),c)n.set(t),d.nestedProperty(l,s.id+".camera").set(t);if(h)a.set(i),d.nestedProperty(l,s.id+".aspectratio").set(i),s.glplot.redraw()}return f},w.updateFx=function(e,t){var n=this,r=n.camera;if(r)if("orbit"===e)r.mode="orbit",r.keyBindingMode="rotate";else if("turntable"===e){r.up=[0,0,1],r.mode="turntable",r.keyBindingMode="rotate";var i=n.graphDiv,a=i._fullLayout,o=n.fullSceneLayout.camera,s=o.up.x,l=o.up.y,c=o.up.z;if(c/Math.sqrt(s*s+l*l+c*c)<.999){var h=n.id+".camera.up",f={x:0,y:0,z:1},p={};p[h]=f;var m=i.layout;u.call("_storeDirectGUIEdit",m,a._preGUI,p),o.up=f,d.nestedProperty(m,h).set(f)}}else r.keyBindingMode=e;n.fullSceneLayout.hovermode=t},w.toImage=function(e){var t=this;e||(e="png"),t.staticMode&&t.container.appendChild(r),t.glplot.redraw();var n=t.glplot.gl,i=n.drawingBufferWidth,a=n.drawingBufferHeight;n.bindFramebuffer(n.FRAMEBUFFER,null);var o=new Uint8Array(i*a*4);n.readPixels(0,0,i,a,n.RGBA,n.UNSIGNED_BYTE,o),function(e,t,n){for(var r=0,i=n-1;r0)for(var s=255/o,l=0;l<3;++l)e[a+l]=Math.min(s*e[a+l],255)}}(o,i,a);var s=document.createElement("canvas");s.width=i,s.height=a;var l,c=s.getContext("2d",{willReadFrequently:!0}),u=c.createImageData(i,a);switch(u.data.set(o),c.putImageData(u,0,0),e){case"jpeg":l=s.toDataURL("image/jpeg");break;case"webp":l=s.toDataURL("image/webp");break;default:l=s.toDataURL("image/png")}return t.staticMode&&t.container.removeChild(r),l},w.setConvert=function(){for(var e=0;e<3;e++){var t=this.fullSceneLayout[S[e]];f.setConvert(t,this.fullLayout),t.setScale=d.noop}},w.make4thDimension=function(){var e=this,t=e.graphDiv._fullLayout;e._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},f.setConvert(e._mockAxis,t)},e.exports=_},90060:function(e){"use strict";e.exports=function(e,t,n,r){r=r||e.length;for(var i=new Array(r),a=0;aOpenStreetMap contributors',o=['\xa9 Carto',a].join(" "),s=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),l={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:a,tiles:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}]},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}]},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:o,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-positron",type:"raster",source:"plotly-carto-positron",minzoom:0,maxzoom:22}]},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:o,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-darkmatter",type:"raster",source:"plotly-carto-darkmatter",minzoom:0,maxzoom:22}]},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:s,tiles:["https://stamen-tiles.a.ssl.fastly.net/terrain/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}]},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:s,tiles:["https://stamen-tiles.a.ssl.fastly.net/toner/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}]},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),tiles:["https://stamen-tiles.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}]}},c=r(l);e.exports={requiredVersion:i,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:l,styleValuesNonMapbox:c,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install mapbox-gl@"+i+"."].join("\n"),noAccessTokenErrorMsg:["Missing Mapbox access token.","Mapbox trace type require a Mapbox access token to be registered.","For example:"," Plotly.newPlot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });","More info here: https://www.mapbox.com/help/define-access-token/"].join("\n"),missingStyleErrorMsg:["No valid mapbox style found, please set `mapbox.style` to one of:",c.join(", "),"or register a Mapbox access token to use a Mapbox-served style."].join("\n"),multipleTokensErrorMsg:["Set multiple mapbox access token across different mapbox subplot,","using first token found as mapbox-gl does not allow multipleaccess tokens on the same page."].join("\n"),mapOnErrorMsg:"Mapbox error.",mapboxLogo:{path0:"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z",path1:"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z",path2:"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z",polygon:"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34"},styleRules:{map:"overflow:hidden;position:relative;","missing-css":"display:none;",canary:"background-color:salmon;","ctrl-bottom-left":"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;","ctrl-bottom-right":"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;",ctrl:"clear: both; pointer-events: auto; transform: translate(0, 0);","ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner":"display: none;","ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner":"display: block; margin-top:2px","ctrl-attrib.mapboxgl-compact:hover":"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;","ctrl-attrib.mapboxgl-compact::after":'content: ""; cursor: pointer; position: absolute; background-image: url(\'data:image/svg+xml;charset=utf-8,%3Csvg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"%3E %3Cpath fill="%23333333" fill-rule="evenodd" d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0"/%3E %3C/svg%3E\'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;',"ctrl-attrib.mapboxgl-compact":"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;","ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; right: 0","ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; left: 0","ctrl-bottom-left .mapboxgl-ctrl":"margin: 0 0 10px 10px; float: left;","ctrl-bottom-right .mapboxgl-ctrl":"margin: 0 10px 10px 0; float: right;","ctrl-attrib":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a:hover":"color: inherit; text-decoration: underline;","ctrl-attrib .mapbox-improve-map":"font-weight: bold; margin-left: 2px;","attrib-empty":"display: none;","ctrl-logo":'display:block; width: 21px; height: 21px; background-image: url(\'data:image/svg+xml;charset=utf-8,%3C?xml version="1.0" encoding="utf-8"?%3E %3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 21 21" style="enable-background:new 0 0 21 21;" xml:space="preserve"%3E%3Cg transform="translate(0,0.01)"%3E%3Cpath d="m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z" style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3Cpath d="M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpath d="M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpolygon points="11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 " style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3C/g%3E%3C/svg%3E\')'}}},13056:function(e,t,n){"use strict";var r=n(71828);e.exports=function(e,t){var n=e.split(" "),i=n[0],a=n[1],o=r.isArrayOrTypedArray(t)?r.mean(t):t,s=.5+o/100,l=1.5+o/100,c=["",""],u=[0,0];switch(i){case"top":c[0]="top",u[1]=-l;break;case"bottom":c[0]="bottom",u[1]=l}switch(a){case"left":c[1]="right",u[0]=-s;break;case"right":c[1]="left",u[0]=s}return{anchor:c[0]&&c[1]?c.join("-"):c[0]?c[0]:c[1]?c[1]:"center",offset:u}}},50101:function(e,t,n){"use strict";var r=n(44517),i=n(71828),a=i.strTranslate,o=i.strScale,s=n(27659).AU,l=n(77922),c=n(39898),u=n(91424),d=n(63893),h=n(10481),f="mapbox",p=t.constants=n(77734);function m(e){return"string"===typeof e&&(-1!==p.styleValuesMapbox.indexOf(e)||0===e.indexOf("mapbox://"))}t.name=f,t.attr="subplot",t.idRoot=f,t.idRegex=t.attrRegex=i.counterRegex(f),t.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},t.layoutAttributes=n(23585),t.supplyLayoutDefaults=n(77882),t.plot=function(e){var t=e._fullLayout,n=e.calcdata,a=t._subplots[f];if(r.version!==p.requiredVersion)throw new Error(p.wrongVersionErrorMsg);var o=function(e,t){var n=e._fullLayout,r=e._context;if(""===r.mapboxAccessToken)return"";for(var a=[],o=[],s=!1,l=!1,c=0;c1&&i.warn(p.multipleTokensErrorMsg),a[0]):(o.length&&i.log(["Listed mapbox access token(s)",o.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}(e,a);r.accessToken=o;for(var l=0;lw/2){var A=y.split("|").join("
");b.text(A).attr("data-unformatted",A).call(d.convertToTspans,e),_=u.bBox(b.node())}b.attr("transform",a(-3,8-_.height)),x.insert("rect",".static-attribution").attr({x:-_.width-6,y:-_.height-3,width:_.width+6,height:_.height+3,fill:"rgba(255, 255, 255, 0.75)"});var S=1;_.width+6>w&&(S=w/(_.width+6));var M=[r.l+r.w*h.x[1],r.t+r.h*(1-h.y[0])];x.attr("transform",a(M[0],M[1])+o(S))}},t.updateFx=function(e){for(var t=e._fullLayout,n=t._subplots[f],r=0;r0){for(var n=0;n0}function u(e){var t={},n={};switch(e.type){case"circle":r.extendFlat(n,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":r.extendFlat(n,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":r.extendFlat(n,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var i=e.symbol,o=a(i.textposition,i.iconsize);r.extendFlat(t,{"icon-image":i.icon+"-15","icon-size":i.iconsize/10,"text-field":i.text,"text-size":i.textfont.size,"text-anchor":o.anchor,"text-offset":o.offset,"symbol-placement":i.placement}),r.extendFlat(n,{"icon-color":e.color,"text-color":i.textfont.color,"text-opacity":e.opacity});break;case"raster":r.extendFlat(n,{"raster-fade-duration":0,"raster-opacity":e.opacity})}return{layout:t,paint:n}}l.update=function(e){this.visible?this.needsNewImage(e)?this.updateImage(e):this.needsNewSource(e)?(this.removeLayer(),this.updateSource(e),this.updateLayer(e)):this.needsNewLayer(e)?this.updateLayer(e):this.updateStyle(e):(this.updateSource(e),this.updateLayer(e)),this.visible=c(e)},l.needsNewImage=function(e){return this.subplot.map.getSource(this.idSource)&&"image"===this.sourceType&&"image"===e.sourcetype&&(this.source!==e.source||JSON.stringify(this.coordinates)!==JSON.stringify(e.coordinates))},l.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type},l.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},l.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},l.updateImage=function(e){this.subplot.map.getSource(this.idSource).updateImage({url:e.source,coordinates:e.coordinates});var t=this.findFollowingMapboxLayerId(this.lookupBelow());null!==t&&this.subplot.map.moveLayer(this.idLayer,t)},l.updateSource=function(e){var t=this.subplot.map;if(t.getSource(this.idSource)&&t.removeSource(this.idSource),this.sourceType=e.sourcetype,this.source=e.source,c(e)){var n=function(e){var t,n=e.sourcetype,r=e.source,a={type:n};"geojson"===n?t="data":"vector"===n?t="string"===typeof r?"url":"tiles":"raster"===n?(t="tiles",a.tileSize=256):"image"===n&&(t="url",a.coordinates=e.coordinates);a[t]=r,e.sourceattribution&&(a.attribution=i(e.sourceattribution));return a}(e);t.addSource(this.idSource,n)}},l.findFollowingMapboxLayerId=function(e){if("traces"===e)for(var t=this.subplot.getMapLayers(),n=0;n1)for(n=0;n-1&&g(t.originalEvent,r,[n.xaxis],[n.yaxis],n.id,e),i.indexOf("event")>-1&&c.click(r,t.originalEvent)}}},b.updateFx=function(e){var t=this,n=t.map,r=t.gd;if(!t.isStatic){var a,o=e.dragmode;a=function(e,n){n.isRect?(e.range={})[t.id]=[c([n.xmin,n.ymin]),c([n.xmax,n.ymax])]:(e.lassoPoints={})[t.id]=n.map(c)};var s=t.dragOptions;t.dragOptions=i.extendDeep(s||{},{dragmode:e.dragmode,element:t.div,gd:r,plotinfo:{id:t.id,domain:e[t.id].domain,xaxis:t.xaxis,yaxis:t.yaxis,fillRangeItems:a},xaxes:[t.xaxis],yaxes:[t.yaxis],subplot:t.id}),n.off("click",t.onClickInPanHandler),h(o)||d(o)?(n.dragPan.disable(),n.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(e,n,r){f(e,n,r,t.dragOptions,o)},l.init(t.dragOptions)):(n.dragPan.enable(),n.off("zoomstart",t.clearOutline),t.div.onmousedown=null,t.div.ontouchstart=null,t.div.removeEventListener("touchstart",t.div._ontouchstart),t.onClickInPanHandler=t.onClickInPanFn(t.dragOptions),n.on("click",t.onClickInPanHandler))}function c(e){var n=t.map.unproject(e);return[n.lng,n.lat]}},b.updateFramework=function(e){var t=e[this.id].domain,n=e._size,r=this.div.style;r.width=n.w*(t.x[1]-t.x[0])+"px",r.height=n.h*(t.y[1]-t.y[0])+"px",r.left=n.l+t.x[0]*n.w+"px",r.top=n.t+(1-t.y[1])*n.h+"px",this.xaxis._offset=n.l+t.x[0]*n.w,this.xaxis._length=n.w*(t.x[1]-t.x[0]),this.yaxis._offset=n.t+(1-t.y[1])*n.h,this.yaxis._length=n.h*(t.y[1]-t.y[0])},b.updateLayers=function(e){var t,n=e[this.id].layers,r=this.layerList;if(n.length!==r.length){for(t=0;t=t.width-20?(a["text-anchor"]="start",a.x=5):(a["text-anchor"]="end",a.x=t._paper.attr("width")-7),n.attr(a);var o=n.select(".js-link-to-tool"),s=n.select(".js-link-spacer"),l=n.select(".js-sourcelinks");e._context.showSources&&e._context.showSources(e),e._context.showLink&&function(e,t){t.text("");var n=t.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(e._context.linkText+" "+String.fromCharCode(187));if(e._context.sendData)n.on("click",(function(){_.sendDataToCloud(e)}));else{var r=window.location.pathname.split("/"),i=window.location.search;n.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+r[2].split(".")[0]+"/"+r[1]+i})}}(e,o),s.text(o.text()&&l.text()?" - ":"")}},_.sendDataToCloud=function(e){var t=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(t){e.emit("plotly_beforeexport");var n=r.select(e).append("div").attr("id","hiddenform").style("display","none"),i=n.append("form").attr({action:t+"/external",method:"post",target:"_blank"});return i.append("input").attr({type:"text",name:"data"}).node().value=_.graphJson(e,!1,"keepdata"),i.node().submit(),n.remove(),e.emit("plotly_afterexport"),!1}};var S=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],M=["year","month","dayMonth","dayMonthYear"];function T(e,t){var n=e._context.locale;n||(n="en-US");var r=!1,i={};function a(e){for(var n=!0,a=0;a1&&L.length>1){for(s.getComponentMethod("grid","sizeDefaults")(c,l),o=0;o15&&L.length>15&&0===l.shapes.length&&0===l.images.length,_.linkSubplots(h,l,d,r),_.cleanPlot(h,l,d,r);var B=!(!r._has||!r._has("gl2d")),j=!(!l._has||!l._has("gl2d")),U=!(!r._has||!r._has("cartesian"))||B,V=!(!l._has||!l._has("cartesian"))||j;U&&!V?r._bgLayer.remove():V&&!U&&(l._shouldCreateBgLayer=!0),r._zoomlayer&&!e._dragging&&p({_fullLayout:r}),function(e,t){var n,r=[];t.meta&&(n=t._meta={meta:t.meta,layout:{meta:t.meta}});for(var i=0;i0){var d=1-2*s;r=Math.round(d*r),i=Math.round(d*i)}}var h=_.layoutAttributes.width.min,f=_.layoutAttributes.height.min;r1,m=!t.height&&Math.abs(n.height-i)>1;(m||p)&&(p&&(n.width=r),m&&(n.height=i)),e._initialAutoSize||(e._initialAutoSize={width:r,height:i}),_.sanitizeMargins(n)},_.supplyLayoutModuleDefaults=function(e,t,n,r){var i,a,o,l=s.componentsRegistry,c=t._basePlotModules,d=s.subplotsRegistry.cartesian;for(i in l)(o=l[i]).includeBasePlot&&o.includeBasePlot(e,t);for(var h in c.length||c.push(d),t._has("cartesian")&&(s.getComponentMethod("grid","contentDefaults")(e,t),d.finalizeSubplots(e,t)),t._subplots)t._subplots[h].sort(u.subplotSort);for(a=0;a1&&(n.l/=v,n.r/=v)}if(f){var y=(n.t+n.b)/f;y>1&&(n.t/=y,n.b/=y)}var x=void 0!==n.xl?n.xl:n.x,b=void 0!==n.xr?n.xr:n.x,w=void 0!==n.yt?n.yt:n.y,A=void 0!==n.yb?n.yb:n.y;p[t]={l:{val:x,size:n.l+g},r:{val:b,size:n.r+g},b:{val:A,size:n.b+g},t:{val:w,size:n.t+g}},m[t]=1}else delete p[t],delete m[t];if(!r._replotting)return _.doAutoMargin(e)}},_.doAutoMargin=function(e){var t=e._fullLayout,n=t.width,r=t.height;t._size||(t._size={}),R(t);var i=t._size,a=t.margin,l=u.extendFlat({},i),c=a.l,d=a.r,h=a.t,p=a.b,m=t._pushmargin,g=t._pushmarginIds,v=t.minreducedwidth,y=t.minreducedheight;if(!1!==t.margin.autoexpand){for(var x in m)g[x]||delete m[x];for(var b in m.base={l:{val:0,size:c},r:{val:1,size:d},t:{val:1,size:h},b:{val:0,size:p}},m){var w=m[b].l||{},A=m[b].b||{},S=w.val,M=w.size,T=A.val,k=A.size;for(var E in m){if(o(M)&&m[E].r){var C=m[E].r.val,D=m[E].r.size;if(C>S){var P=(M*C+(D-n)*S)/(C-S),O=(D*(1-S)+(M-n)*(1-C))/(C-S);P+O>c+d&&(c=P,d=O)}}if(o(k)&&m[E].t){var L=m[E].t.val,I=m[E].t.size;if(L>T){var z=(k*L+(I-r)*T)/(L-T),N=(I*(1-T)+(k-r)*(1-L))/(L-T);z+N>p+h&&(p=z,h=N)}}}}}var F=u.constrain(n-a.l-a.r,2,v),B=u.constrain(r-a.t-a.b,2,y),j=Math.max(0,n-F),U=Math.max(0,r-B);if(j){var V=(c+d)/j;V>1&&(c/=V,d/=V)}if(U){var H=(p+h)/U;H>1&&(p/=H,h/=H)}if(i.l=Math.round(c),i.r=Math.round(d),i.t=Math.round(h),i.b=Math.round(p),i.p=Math.round(a.pad),i.w=Math.round(n)-i.l-i.r,i.h=Math.round(r)-i.t-i.b,!t._replotting&&(_.didMarginChange(l,i)||function(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var t=f.list(e,"",!0);for(var n in t)if(t[n].autoshift||t[n].shift)return!0;return!1}(e))){"_redrawFromAutoMarginCount"in t?t._redrawFromAutoMarginCount++:t._redrawFromAutoMarginCount=1;var W=3*(1+Object.keys(g).length);if(t._redrawFromAutoMarginCount0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push((function(){r=!0})),n.redraw&&e._transitionData._interruptCallbacks.push((function(){return s.call("redraw",e)})),e._transitionData._interruptCallbacks.push((function(){e.emit("plotly_transitioninterrupted",[])}));var a=0,o=0;function l(){return a++,function(){o++,r||o!==a||function(t){if(!e._transitionData)return;(function(e){if(e)for(;e.length;)e.shift()})(e._transitionData._interruptCallbacks),Promise.resolve().then((function(){if(n.redraw)return s.call("redraw",e)})).then((function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])})).then(t)}(i)}}n.runFn(l),setTimeout(l())}))}],a=u.syncOrAsync(i,e);return a&&a.then||(a=Promise.resolve()),a.then((function(){return e}))}_.didMarginChange=function(e,t){for(var n=0;n1)return!0}return!1},_.graphJson=function(e,t,n,r,i,a){(i&&t&&!e._fullData||i&&!t&&!e._fullLayout)&&_.supplyDefaults(e);var o=i?e._fullData:e.data,s=i?e._fullLayout:e.layout,l=(e._transitionData||{})._frames;function c(e,t){if("function"===typeof e)return t?"_function_":null;if(u.isPlainObject(e)){var r,i={};return Object.keys(e).sort().forEach((function(a){if(-1===["_","["].indexOf(a.charAt(0)))if("function"!==typeof e[a]){if("keepdata"===n){if("src"===a.substr(a.length-3))return}else if("keepstream"===n){if("string"===typeof(r=e[a+"src"])&&r.indexOf(":")>0&&!u.isPlainObject(e.stream))return}else if("keepall"!==n&&"string"===typeof(r=e[a+"src"])&&r.indexOf(":")>0)return;i[a]=c(e[a],t)}else t&&(i[a]="_function")})),i}return Array.isArray(e)?e.map((function(e){return c(e,t)})):u.isTypedArray(e)?u.simpleMap(e,u.identity):u.isJSDate(e)?u.ms2DateTimeLocal(+e):e}var d={data:(o||[]).map((function(e){var n=c(e);return t&&delete n.fit,n}))};if(!t&&(d.layout=c(s),i)){var h=s._size;d.layout.computed={margin:{b:h.b,l:h.l,r:h.r,t:h.t}}}return l&&(d.frames=c(l)),a&&(d.config=c(e._context,!0)),"object"===r?d:JSON.stringify(d)},_.modifyFrames=function(e,t){var n,r,i,a=e._transitionData._frames,o=e._transitionData._frameHash;for(n=0;n=0;a--)if(s[a].enabled){n._indexToPoints=s[a]._indexToPoints;break}r&&r.calc&&(o=r.calc(e,n))}Array.isArray(o)&&o[0]||(o=[{x:h,y:h}]),o[0].t||(o[0].t={}),o[0].trace=n,p[t]=o}}for(I(o,c,d),i=0;i1e-10?e:0}function h(e,t,n){t=t||0,n=n||0;for(var r=e.length,i=new Array(r),a=0;a0?n:1/0})),i=r.mod(n+1,t.length);return[t[n],t[i]]},findIntersectionXY:c,findXYatLength:function(e,t,n,r){var i=-t*n,a=t*t+1,o=2*(t*i-n),s=i*i+n*n-e*e,l=Math.sqrt(o*o-4*a*s),c=(-o+l)/(2*a),u=(-o-l)/(2*a);return[[c,t*c+i+r],[u,t*u+i+r]]},clampTiny:d,pathPolygon:function(e,t,n,r,i,a){return"M"+h(u(e,t,n,r),i,a).join("L")},pathPolygonAnnulus:function(e,t,n,r,i,a,o){var s,l;e=90||l>90&&c>=450?1:d<=0&&f<=0?0:Math.max(d,f);t=l<=180&&c>=180||l>180&&c>=540?-1:u>=0&&h>=0?0:Math.min(u,h);n=l<=270&&c>=270||l>270&&c>=630?-1:d>=0&&f>=0?0:Math.min(d,f);r=c>=360?1:u<=0&&h<=0?0:Math.max(u,h);return[t,n,r,i]}(p),_=b[2]-b[0],w=b[3]-b[1],A=f/h,S=Math.abs(w/_);A>S?(m=h,x=(f-(g=h*S))/i.h/2,v=[s[0],s[1]],y=[d[0]+x,d[1]-x]):(g=f,x=(h-(m=f/S))/i.w/2,v=[s[0]+x,s[1]-x],y=[d[0],d[1]]),n.xLength2=m,n.yLength2=g,n.xDomain2=v,n.yDomain2=y;var M,T=n.xOffset2=i.l+i.w*v[0],k=n.yOffset2=i.t+i.h*(1-y[1]),E=n.radius=m/_,C=n.innerRadius=n.getHole(t)*E,D=n.cx=T-E*b[0],R=n.cy=k+E*b[3],P=n.cxx=D-T,O=n.cyy=R-k,L=a.side;"counterclockwise"===L?(M=L,L="top"):"clockwise"===L&&(M=L,L="bottom"),n.radialAxis=n.mockAxis(e,t,a,{_id:"x",side:L,_trueSide:M,domain:[C/i.w,E/i.w]}),n.angularAxis=n.mockAxis(e,t,o,{side:"right",domain:[0,Math.PI],autorange:!1}),n.doAutoRange(e,t),n.updateAngularAxis(e,t),n.updateRadialAxis(e,t),n.updateRadialAxisTitle(e,t),n.xaxis=n.mockCartesianAxis(e,t,{_id:"x",domain:v}),n.yaxis=n.mockCartesianAxis(e,t,{_id:"y",domain:y});var N=n.pathSubplot();n.clipPaths.forTraces.select("path").attr("d",N).attr("transform",l(P,O)),r.frontplot.attr("transform",l(T,k)).call(u.setClipUrl,n._hasClipOnAxisFalse?null:n.clipIds.forTraces,n.gd),r.bg.attr("d",N).attr("transform",l(D,R)).call(c.fill,t.bgcolor)},B.mockAxis=function(e,t,n,r){var i=o.extendFlat({},n,r);return p(i,t,e),i},B.mockCartesianAxis=function(e,t,n){var r=this,i=r.isSmith,a=n._id,s=o.extendFlat({type:"linear"},n);f(s,e);var l={x:[0,2],y:[1,3]};return s.setRange=function(){var e=r.sectorBBox,n=l[a],i=r.radialAxis._rl,o=(i[1]-i[0])/(1-r.getHole(t));s.range=[e[n[0]]*o,e[n[1]]*o]},s.isPtWithinRange="x"!==a||i?function(){return!0}:function(e){return r.isPtInside(e)},s.setRange(),s.setScale(),s},B.doAutoRange=function(e,t){var n=this,r=n.gd,i=n.radialAxis,a=n.getRadial(t);m(r,i);var o=i.range;a.range=o.slice(),a._input.range=o.slice(),i._rl=[i.r2l(o[0],null,"gregorian"),i.r2l(o[1],null,"gregorian")]},B.updateRadialAxis=function(e,t){var n=this,r=n.gd,i=n.layers,a=n.radius,u=n.innerRadius,d=n.cx,f=n.cy,p=n.getRadial(t),m=I(n.getSector(t)[0],360),g=n.radialAxis,v=u90&&m<=270&&(g.tickangle=180);var x=y?function(e){var t=O(n,D([e.x,0]));return l(t[0]-d,t[1]-f)}:function(e){return l(g.l2p(e.x)+u,0)},b=y?function(e){return P(n,e.x,-1/0,1/0)}:function(e){return n.pathArc(g.r2p(e.x)+u)},_=j(p);if(n.radialTickLayout!==_&&(i["radial-axis"].selectAll(".xtick").remove(),n.radialTickLayout=_),v){g.setScale();var w=0,A=y?(g.tickvals||[]).filter((function(e){return e>=0})).map((function(e){return h.tickText(g,e,!0,!1)})):h.calcTicks(g),S=y?A:h.clipEnds(g,A),M=h.getTickSigns(g)[2];y&&(("top"===g.ticks&&"bottom"===g.side||"bottom"===g.ticks&&"top"===g.side)&&(M=-M),"top"===g.ticks&&"top"===g.side&&(w=-g.ticklen),"bottom"===g.ticks&&"bottom"===g.side&&(w=g.ticklen)),h.drawTicks(r,g,{vals:A,layer:i["radial-axis"],path:h.makeTickPath(g,0,M),transFn:x,crisp:!1}),h.drawGrid(r,g,{vals:S,layer:i["radial-grid"],path:b,transFn:o.noop,crisp:!1}),h.drawLabels(r,g,{vals:A,layer:i["radial-axis"],transFn:x,labelFns:h.makeLabelFns(g,w)})}var T=n.radialAxisAngle=n.vangles?N(U(z(p.angle),n.vangles)):p.angle,k=l(d,f),E=k+s(-T);V(i["radial-axis"],v&&(p.showticklabels||p.ticks),{transform:E}),V(i["radial-grid"],v&&p.showgrid,{transform:y?"":k}),V(i["radial-line"].select("line"),v&&p.showline,{x1:y?-a:u,y1:0,x2:a,y2:0,transform:E}).attr("stroke-width",p.linewidth).call(c.stroke,p.linecolor)},B.updateRadialAxisTitle=function(e,t,n){if(!this.isSmith){var r=this,i=r.gd,a=r.radius,o=r.cx,s=r.cy,l=r.getRadial(t),c=r.id+"title",d=0;if(l.title){var h=u.bBox(r.layers["radial-axis"].node()).height,f=l.title.font.size,p=l.side;d="top"===p?f:"counterclockwise"===p?-(h+.4*f):h+.8*f}var m=void 0!==n?n:r.radialAxisAngle,g=z(m),v=Math.cos(g),y=Math.sin(g),b=o+a/2*v+d*y,_=s-a/2*y+d*v;r.layers["radial-axis-title"]=x.draw(i,c,{propContainer:l,propName:r.id+".radialaxis.title",placeholder:L(i,"Click to enter radial axis title"),attributes:{x:b,y:_,"text-anchor":"middle"},transform:{rotate:-m}})}},B.updateAngularAxis=function(e,t){var n=this,r=n.gd,i=n.layers,a=n.radius,u=n.innerRadius,d=n.cx,f=n.cy,p=n.getAngular(t),m=n.angularAxis,g=n.isSmith;g||(n.fillViewInitialKey("angularaxis.rotation",p.rotation),m.setGeometry(),m.setScale());var v=g?function(e){var t=O(n,D([0,e.x]));return Math.atan2(t[0]-d,t[1]-f)-Math.PI/2}:function(e){return m.t2g(e.x)};"linear"===m.type&&"radians"===m.thetaunit&&(m.tick0=N(m.tick0),m.dtick=N(m.dtick));var y=function(e){return l(d+a*Math.cos(e),f-a*Math.sin(e))},x=g?function(e){var t=O(n,D([0,e.x]));return l(t[0],t[1])}:function(e){return y(v(e))},b=g?function(e){var t=O(n,D([0,e.x])),r=Math.atan2(t[0]-d,t[1]-f)-Math.PI/2;return l(t[0],t[1])+s(-N(r))}:function(e){var t=v(e);return y(t)+s(-N(t))},_=g?function(e){return R(n,e.x,0,1/0)}:function(e){var t=v(e),n=Math.cos(t),r=Math.sin(t);return"M"+[d+u*n,f-u*r]+"L"+[d+a*n,f-a*r]},w=h.makeLabelFns(m,0).labelStandoff,A={xFn:function(e){var t=v(e);return Math.cos(t)*w},yFn:function(e){var t=v(e),n=Math.sin(t)>0?.2:1;return-Math.sin(t)*(w+e.fontSize*n)+Math.abs(Math.cos(t))*(e.fontSize*T)},anchorFn:function(e){var t=v(e),n=Math.cos(t);return Math.abs(n)<.1?"middle":n>0?"start":"end"},heightFn:function(e,t,n){var r=v(e);return-.5*(1+Math.sin(r))*n}},S=j(p);n.angularTickLayout!==S&&(i["angular-axis"].selectAll("."+m._id+"tick").remove(),n.angularTickLayout=S);var M,k=g?[1/0].concat(m.tickvals||[]).map((function(e){return h.tickText(m,e,!0,!1)})):h.calcTicks(m);if(g&&(k[0].text="\u221e",k[0].fontSize*=1.75),"linear"===t.gridshape?(M=k.map(v),o.angleDelta(M[0],M[1])<0&&(M=M.slice().reverse())):M=null,n.vangles=M,"category"===m.type&&(k=k.filter((function(e){return o.isAngleInsideSector(v(e),n.sectorInRad)}))),m.visible){var E="inside"===m.ticks?-1:1,C=(m.linewidth||1)/2;h.drawTicks(r,m,{vals:k,layer:i["angular-axis"],path:"M"+E*C+",0h"+E*m.ticklen,transFn:b,crisp:!1}),h.drawGrid(r,m,{vals:k,layer:i["angular-grid"],path:_,transFn:o.noop,crisp:!1}),h.drawLabels(r,m,{vals:k,layer:i["angular-axis"],repositionOnUpdate:!0,transFn:x,labelFns:A})}V(i["angular-line"].select("path"),p.showline,{d:n.pathSubplot(),transform:l(d,f)}).attr("stroke-width",p.linewidth).call(c.stroke,p.linecolor)},B.updateFx=function(e,t){this.gd._context.staticPlot||(!this.isSmith&&(this.updateAngularDrag(e),this.updateRadialDrag(e,t,0),this.updateRadialDrag(e,t,1)),this.updateHoverAndMainDrag(e))},B.updateHoverAndMainDrag=function(e){var t,n,s=this,c=s.isSmith,u=s.gd,d=s.layers,h=e._zoomlayer,f=k.MINZOOM,p=k.OFFEDGE,m=s.radius,x=s.innerRadius,A=s.cx,S=s.cy,M=s.cxx,T=s.cyy,C=s.sectorInRad,D=s.vangles,R=s.radialAxis,P=E.clampTiny,O=E.findXYatLength,L=E.findEnclosingVertexAngles,I=k.cornerHalfWidth,z=k.cornerLen/2,N=g.makeDragger(d,"path","maindrag",!1===e.dragmode?"none":"crosshair");r.select(N).attr("d",s.pathSubplot()).attr("transform",l(A,S)),N.onmousemove=function(e){y.hover(u,e,s.id),u._fullLayout._lasthover=N,u._fullLayout._hoversubplot=s.id},N.onmouseout=function(e){u._dragging||v.unhover(u,e)};var F,B,j,U,V,H,W,G,q,Y={element:N,gd:u,subplot:s.id,plotinfo:{id:s.id,xaxis:s.xaxis,yaxis:s.yaxis},xaxes:[s.xaxis],yaxes:[s.yaxis]};function $(e,t){return Math.sqrt(e*e+t*t)}function X(e,t){return $(e-M,t-T)}function Z(e,t){return Math.atan2(T-t,e-M)}function K(e,t){return[e*Math.cos(t),e*Math.sin(-t)]}function J(e,t){if(0===e)return s.pathSector(2*I);var n=z/e,r=t-n,i=t+n,a=Math.max(0,Math.min(e,m)),o=a-I,l=a+I;return"M"+K(o,r)+"A"+[o,o]+" 0,0,0 "+K(o,i)+"L"+K(l,i)+"A"+[l,l]+" 0,0,1 "+K(l,r)+"Z"}function Q(e,t,n){if(0===e)return s.pathSector(2*I);var r,i,a=K(e,t),o=K(e,n),l=P((a[0]+o[0])/2),c=P((a[1]+o[1])/2);if(l&&c){var u=c/l,d=-1/u,h=O(I,u,l,c);r=O(z,d,h[0][0],h[0][1]),i=O(z,d,h[1][0],h[1][1])}else{var f,p;c?(f=z,p=I):(f=I,p=z),r=[[l-f,c-p],[l+f,c-p]],i=[[l-f,c+p],[l+f,c+p]]}return"M"+r.join("L")+"L"+i.reverse().join("L")+"Z"}function ee(e,t){return t=Math.max(Math.min(t,m),x),ef?(e-1&&1===e&&_(t,u,[s.xaxis],[s.yaxis],s.id,Y),n.indexOf("event")>-1&&y.click(u,t,s.id)}Y.prepFn=function(e,r,a){var l=u._fullLayout.dragmode,d=N.getBoundingClientRect();u._fullLayout._calcInverseTransform(u);var f=u._fullLayout._invTransform;t=u._fullLayout._invScaleX,n=u._fullLayout._invScaleY;var p=o.apply3DTransform(f)(r-d.left,a-d.top);if(F=p[0],B=p[1],D){var v=E.findPolygonOffset(m,C[0],C[1],D);F+=M+v[0],B+=T+v[1]}switch(l){case"zoom":Y.clickFn=se,c||(Y.moveFn=D?ie:ne,Y.doneFn=ae,function(){j=null,U=null,V=s.pathSubplot(),H=!1;var e=u._fullLayout[s.id];W=i(e.bgcolor).getLuminance(),(G=g.makeZoombox(h,W,A,S,V)).attr("fill-rule","evenodd"),q=g.makeCorners(h,A,S),w(u)}());break;case"select":case"lasso":b(e,r,a,Y,l)}},v.init(Y)},B.updateRadialDrag=function(e,t,n){var i=this,c=i.gd,u=i.layers,d=i.radius,h=i.innerRadius,f=i.cx,p=i.cy,m=i.radialAxis,y=k.radialDragBoxSize,x=y/2;if(m.visible){var b,_,A,T=z(i.radialAxisAngle),E=m._rl,C=E[0],D=E[1],R=E[n],P=.75*(E[1]-E[0])/(1-i.getHole(t))/d;n?(b=f+(d+x)*Math.cos(T),_=p-(d+x)*Math.sin(T),A="radialdrag"):(b=f+(h-x)*Math.cos(T),_=p-(h-x)*Math.sin(T),A="radialdrag-inner");var O,L,I,F=g.makeRectDragger(u,A,"crosshair",-x,-x,y,y),B={element:F,gd:c};!1===e.dragmode&&(B.dragmode=!1),V(r.select(F),m.visible&&h0===(n?I>C:Ir?function(e){return e<=0}:function(e){return e>=0};e.c2g=function(n){var r=e.c2l(n)-t;return(s(r)?r:0)+o},e.g2c=function(n){return e.l2c(n+t-o)},e.g2p=function(e){return e*a},e.c2p=function(t){return e.g2p(e.c2g(t))}}}(e,t);break;case"angularaxis":!function(e,t){var n=e.type;if("linear"===n){var i=e.d2c,s=e.c2d;e.d2c=function(e,t){return function(e,t){return"degrees"===t?a(e):e}(i(e),t)},e.c2d=function(e,t){return s(function(e,t){return"degrees"===t?o(e):e}(e,t))}}e.makeCalcdata=function(t,i){var a,o,s=t[i],l=t._length,c=function(n){return e.d2c(n,t.thetaunit)};if(s){if(r.isTypedArray(s)&&"linear"===n){if(l===s.length)return s;if(s.subarray)return s.subarray(0,l)}for(a=new Array(l),o=0;o0?1:0}function n(e){var t=e[0],n=e[1];if(!isFinite(t)||!isFinite(n))return[1,0];var r=(t+1)*(t+1)+n*n;return[(t*t+n*n-1)/r,2*n/r]}function r(e,t){var n=t[0],r=t[1];return[n*e.radius+e.cx,-r*e.radius+e.cy]}function i(e,t){return t*e.radius}e.exports={smith:n,reactanceArc:function(e,t,a,o){var s=r(e,n([a,t])),l=s[0],c=s[1],u=r(e,n([o,t])),d=u[0],h=u[1];if(0===t)return["M"+l+","+c,"L"+d+","+h].join(" ");var f=i(e,1/Math.abs(t));return["M"+l+","+c,"A"+f+","+f+" 0 0,"+(t<0?1:0)+" "+d+","+h].join(" ")},resistanceArc:function(e,a,o,s){var l=i(e,1/(a+1)),c=r(e,n([a,o])),u=c[0],d=c[1],h=r(e,n([a,s])),f=h[0],p=h[1];if(t(o)!==t(s)){var m=r(e,n([a,0]));return["M"+u+","+d,"A"+l+","+l+" 0 0,"+(00){for(var r=[],i=0;i=u&&(h.min=0,p.min=0,g.min=0,e.aaxis&&delete e.aaxis.min,e.baxis&&delete e.baxis.min,e.caxis&&delete e.caxis.min)}function m(e,t,n,r){var i=h[t._name];function o(n,r){return a.coerce(e,t,i,n,r)}o("uirevision",r.uirevision),t.type="linear";var f=o("color"),p=f!==i.color.dflt?f:n.font.color,m=t._name.charAt(0).toUpperCase(),g="Component "+m,v=o("title.text",g);t._hovertitle=v===g?v:m,a.coerceFont(o,"title.font",{family:n.font.family,size:a.bigFont(n.font.size),color:p}),o("min"),u(e,t,o,"linear"),l(e,t,o,"linear"),s(e,t,o,"linear"),c(e,t,o,{outerTicks:!0}),o("showticklabels")&&(a.coerceFont(o,"tickfont",{family:n.font.family,size:n.font.size,color:p}),o("tickangle"),o("tickformat")),d(e,t,o,{dfltColor:f,bgColor:n.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:i}),o("hoverformat"),o("layer")}e.exports=function(e,t,n){o(e,t,n,{type:"ternary",attributes:h,handleDefaults:p,font:t.font,paper_bgcolor:t.paper_bgcolor})}},64380:function(e,t,n){"use strict";var r=n(39898),i=n(84267),a=n(73972),o=n(71828),s=o.strTranslate,l=o._,c=n(7901),u=n(91424),d=n(21994),h=n(1426).extendFlat,f=n(74875),p=n(89298),m=n(28569),g=n(30211),v=n(64505),y=v.freeMode,x=v.rectMode,b=n(92998),_=n(47322).prepSelect,w=n(47322).selectOnClick,A=n(47322).clearOutline,S=n(47322).clearSelectionsCache,M=n(85555);function T(e,t){this.id=e.id,this.graphDiv=e.graphDiv,this.init(t),this.makeFramework(t),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}e.exports=T;var k=T.prototype;k.init=function(e){this.container=e._ternarylayer,this.defs=e._defs,this.layoutId=e._uid,this.traceHash={},this.layers={}},k.plot=function(e,t){var n=this,r=t[n.id],i=t._size;n._hasClipOnAxisFalse=!1;for(var a=0;aE*b?i=(a=b)*E:a=(i=x)/E,o=v*i/x,l=y*a/b,n=t.l+t.w*m-i/2,r=t.t+t.h*(1-g)-a/2,f.x0=n,f.y0=r,f.w=i,f.h=a,f.sum=_,f.xaxis={type:"linear",range:[w+2*S-_,_-w-2*A],domain:[m-o/2,m+o/2],_id:"x"},d(f.xaxis,f.graphDiv._fullLayout),f.xaxis.setScale(),f.xaxis.isPtWithinRange=function(e){return e.a>=f.aaxis.range[0]&&e.a<=f.aaxis.range[1]&&e.b>=f.baxis.range[1]&&e.b<=f.baxis.range[0]&&e.c>=f.caxis.range[1]&&e.c<=f.caxis.range[0]},f.yaxis={type:"linear",range:[w,_-A-S],domain:[g-l/2,g+l/2],_id:"y"},d(f.yaxis,f.graphDiv._fullLayout),f.yaxis.setScale(),f.yaxis.isPtWithinRange=function(){return!0};var M=f.yaxis.domain[0],T=f.aaxis=h({},e.aaxis,{range:[w,_-A-S],side:"left",tickangle:(+e.aaxis.tickangle||0)-30,domain:[M,M+l*E],anchor:"free",position:0,_id:"y",_length:i});d(T,f.graphDiv._fullLayout),T.setScale();var k=f.baxis=h({},e.baxis,{range:[_-w-S,A],side:"bottom",domain:f.xaxis.domain,anchor:"free",position:0,_id:"x",_length:i});d(k,f.graphDiv._fullLayout),k.setScale();var C=f.caxis=h({},e.caxis,{range:[_-w-A,S],side:"right",tickangle:(+e.caxis.tickangle||0)+30,domain:[M,M+l*E],anchor:"free",position:0,_id:"y",_length:i});d(C,f.graphDiv._fullLayout),C.setScale();var D="M"+n+","+(r+a)+"h"+i+"l-"+i/2+",-"+a+"Z";f.clipDef.select("path").attr("d",D),f.layers.plotbg.select("path").attr("d",D);var R="M0,"+a+"h"+i+"l-"+i/2+",-"+a+"Z";f.clipDefRelative.select("path").attr("d",R);var P=s(n,r);f.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",P),f.clipDefRelative.select("path").attr("transform",null);var O=s(n-k._offset,r+a);f.layers.baxis.attr("transform",O),f.layers.bgrid.attr("transform",O);var L=s(n+i/2,r)+"rotate(30)"+s(0,-T._offset);f.layers.aaxis.attr("transform",L),f.layers.agrid.attr("transform",L);var I=s(n+i/2,r)+"rotate(-30)"+s(0,-C._offset);f.layers.caxis.attr("transform",I),f.layers.cgrid.attr("transform",I),f.drawAxes(!0),f.layers.aline.select("path").attr("d",T.showline?"M"+n+","+(r+a)+"l"+i/2+",-"+a:"M0,0").call(c.stroke,T.linecolor||"#000").style("stroke-width",(T.linewidth||0)+"px"),f.layers.bline.select("path").attr("d",k.showline?"M"+n+","+(r+a)+"h"+i:"M0,0").call(c.stroke,k.linecolor||"#000").style("stroke-width",(k.linewidth||0)+"px"),f.layers.cline.select("path").attr("d",C.showline?"M"+(n+i/2)+","+r+"l"+i/2+","+a:"M0,0").call(c.stroke,C.linecolor||"#000").style("stroke-width",(C.linewidth||0)+"px"),f.graphDiv._context.staticPlot||f.initInteractions(),u.setClipUrl(f.layers.frontplot,f._hasClipOnAxisFalse?null:f.clipId,f.graphDiv)},k.drawAxes=function(e){var t=this,n=t.graphDiv,r=t.id.substr(7)+"title",i=t.layers,a=t.aaxis,o=t.baxis,s=t.caxis;if(t.drawAx(a),t.drawAx(o),t.drawAx(s),e){var c=Math.max(a.showticklabels?a.tickfont.size/2:0,(s.showticklabels?.75*s.tickfont.size:0)+("outside"===s.ticks?.87*s.ticklen:0)),u=(o.showticklabels?o.tickfont.size:0)+("outside"===o.ticks?o.ticklen:0)+3;i["a-title"]=b.draw(n,"a"+r,{propContainer:a,propName:t.id+".aaxis.title",placeholder:l(n,"Click to enter Component A title"),attributes:{x:t.x0+t.w/2,y:t.y0-a.title.font.size/3-c,"text-anchor":"middle"}}),i["b-title"]=b.draw(n,"b"+r,{propContainer:o,propName:t.id+".baxis.title",placeholder:l(n,"Click to enter Component B title"),attributes:{x:t.x0-u,y:t.y0+t.h+.83*o.title.font.size+u,"text-anchor":"middle"}}),i["c-title"]=b.draw(n,"c"+r,{propContainer:s,propName:t.id+".caxis.title",placeholder:l(n,"Click to enter Component C title"),attributes:{x:t.x0+t.w+u,y:t.y0+t.h+.83*s.title.font.size+u,"text-anchor":"middle"}})}},k.drawAx=function(e){var t,n=this,r=n.graphDiv,i=e._name,a=i.charAt(0),s=e._id,l=n.layers[i],c=a+"tickLayout",u=(t=e).ticks+String(t.ticklen)+String(t.showticklabels);n[c]!==u&&(l.selectAll("."+s+"tick").remove(),n[c]=u),e.setScale();var d=p.calcTicks(e),h=p.clipEnds(e,d),f=p.makeTransTickFn(e),m=p.getTickSigns(e)[2],g=o.deg2rad(30),v=m*(e.linewidth||1)/2,y=m*e.ticklen,x=n.w,b=n.h,_="b"===a?"M0,"+v+"l"+Math.sin(g)*y+","+Math.cos(g)*y:"M"+v+",0l"+Math.cos(g)*y+","+-Math.sin(g)*y,w={a:"M0,0l"+b+",-"+x/2,b:"M0,0l-"+x/2+",-"+b,c:"M0,0l-"+b+","+x/2}[a];p.drawTicks(r,e,{vals:"inside"===e.ticks?h:d,layer:l,path:_,transFn:f,crisp:!1}),p.drawGrid(r,e,{vals:h,layer:n.layers[a+"grid"],path:w,transFn:f,crisp:!1}),p.drawLabels(r,e,{vals:d,layer:l,transFn:f,labelFns:p.makeLabelFns(e,0,30)})};var C=M.MINZOOM/2+.87,D="m-0.87,.5h"+C+"v3h-"+(C+5.2)+"l"+(C/2+2.6)+",-"+(.87*C+4.5)+"l2.6,1.5l-"+C/2+","+.87*C+"Z",R="m0.87,.5h-"+C+"v3h"+(C+5.2)+"l-"+(C/2+2.6)+",-"+(.87*C+4.5)+"l-2.6,1.5l"+C/2+","+.87*C+"Z",P="m0,1l"+C/2+","+.87*C+"l2.6,-1.5l-"+(C/2+2.6)+",-"+(.87*C+4.5)+"l-"+(C/2+2.6)+","+(.87*C+4.5)+"l2.6,1.5l"+C/2+",-"+.87*C+"Z",O=!0;function L(e){r.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}k.clearOutline=function(){S(this.dragOptions),A(this.dragOptions.gd)},k.initInteractions=function(){var e,t,n,r,d,h,f,p,v,b,A,S,T=this,k=T.layers.plotbg.select("path").node(),C=T.graphDiv,I=C._fullLayout._zoomlayer;function z(e){var t={};return t[T.id+".aaxis.min"]=e.a,t[T.id+".baxis.min"]=e.b,t[T.id+".caxis.min"]=e.c,t}function N(e,t){var n=C._fullLayout.clickmode;L(C),2===e&&(C.emit("plotly_doubleclick",null),a.call("_guiRelayout",C,z({a:0,b:0,c:0}))),n.indexOf("select")>-1&&1===e&&w(t,C,[T.xaxis],[T.yaxis],T.id,T.dragOptions),n.indexOf("event")>-1&&g.click(C,t,T.id)}function F(e,t){return 1-t/T.h}function B(e,t){return 1-(e+(T.h-t)/Math.sqrt(3))/T.w}function j(e,t){return(e-(T.h-t)/Math.sqrt(3))/T.w}function U(i,a){var o=n+i*e,s=r+a*t,l=Math.max(0,Math.min(1,F(0,r),F(0,s))),c=Math.max(0,Math.min(1,B(n,r),B(o,s))),u=Math.max(0,Math.min(1,j(n,r),j(o,s))),m=(l/2+u)*T.w,g=(1-l/2-c)*T.w,y=(m+g)/2,x=g-m,_=(1-l)*T.h,w=_-x/E;x.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),S.transition().style("opacity",1).duration(200),b=!0),C.emit("plotly_relayouting",z(f))}function V(){L(C),f!==d&&(a.call("_guiRelayout",C,z(f)),O&&C.data&&C._context.showTips&&(o.notifier(l(C,"Double-click to zoom back out"),"long"),O=!1))}function H(e,t){var n=e/T.xaxis._m,r=t/T.yaxis._m,i=[(f={a:d.a-r,b:d.b+(n+r)/2,c:d.c-(n-r)/2}).a,f.b,f.c].sort(o.sorterAsc),a=i.indexOf(f.a),l=i.indexOf(f.b),c=i.indexOf(f.c);i[0]<0&&(i[1]+i[0]/2<0?(i[2]+=i[0]+i[1],i[0]=i[1]=0):(i[2]+=i[0]/2,i[1]+=i[0]/2,i[0]=0),f={a:i[a],b:i[l],c:i[c]},t=(d.a-f.a)*T.yaxis._m,e=(d.c-f.c-d.b+f.b)*T.xaxis._m);var h=s(T.x0+e,T.y0+t);T.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",h);var p=s(-e,-t);T.clipDefRelative.select("path").attr("transform",p),T.aaxis.range=[f.a,T.sum-f.b-f.c],T.baxis.range=[T.sum-f.a-f.c,f.b],T.caxis.range=[T.sum-f.a-f.b,f.c],T.drawAxes(!1),T._hasClipOnAxisFalse&&T.plotContainer.select(".scatterlayer").selectAll(".trace").call(u.hideOutsideRangePoints,T),C.emit("plotly_relayouting",z(f))}function W(){a.call("_guiRelayout",C,z(f))}this.dragOptions={element:k,gd:C,plotinfo:{id:T.id,domain:C._fullLayout[T.id].domain,xaxis:T.xaxis,yaxis:T.yaxis},subplot:T.id,prepFn:function(a,l,u){T.dragOptions.xaxes=[T.xaxis],T.dragOptions.yaxes=[T.yaxis],e=C._fullLayout._invScaleX,t=C._fullLayout._invScaleY;var m=T.dragOptions.dragmode=C._fullLayout.dragmode;y(m)?T.dragOptions.minDrag=1:T.dragOptions.minDrag=void 0,"zoom"===m?(T.dragOptions.moveFn=U,T.dragOptions.clickFn=N,T.dragOptions.doneFn=V,function(e,t,a){var l=k.getBoundingClientRect();n=t-l.left,r=a-l.top,C._fullLayout._calcInverseTransform(C);var u=C._fullLayout._invTransform,m=o.apply3DTransform(u)(n,r);n=m[0],r=m[1],d={a:T.aaxis.range[0],b:T.baxis.range[1],c:T.caxis.range[1]},f=d,h=T.aaxis.range[1]-d.a,p=i(T.graphDiv._fullLayout[T.id].bgcolor).getLuminance(),v="M0,"+T.h+"L"+T.w/2+", 0L"+T.w+","+T.h+"Z",b=!1,A=I.append("path").attr("class","zoombox").attr("transform",s(T.x0,T.y0)).style({fill:p>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",v),S=I.append("path").attr("class","zoombox-corners").attr("transform",s(T.x0,T.y0)).style({fill:c.background,stroke:c.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),T.clearOutline(C)}(0,l,u)):"pan"===m?(T.dragOptions.moveFn=H,T.dragOptions.clickFn=N,T.dragOptions.doneFn=W,d={a:T.aaxis.range[0],b:T.baxis.range[1],c:T.caxis.range[1]},f=d,T.clearOutline(C)):(x(m)||y(m))&&_(a,l,u,T.dragOptions,m)}},k.onmousemove=function(e){g.hover(C,e,T.id),C._fullLayout._lasthover=k,C._fullLayout._hoversubplot=T.id},k.onmouseout=function(e){C._dragging||m.unhover(C,e)},m.init(this.dragOptions)}},73972:function(e,t,n){"use strict";var r=n(47769),i=n(64213),a=n(75138),o=n(41965),s=n(24401).addStyleRule,l=n(1426),c=n(9012),u=n(10820),d=l.extendFlat,h=l.extendDeepAll;function f(e){var n=e.name,i=e.categories,a=e.meta;if(t.modules[n])r.log("Type "+n+" already registered");else{t.subplotsRegistry[e.basePlotModule.name]||function(e){var n=e.name;if(t.subplotsRegistry[n])return void r.log("Plot type "+n+" already registered.");for(var i in v(e),t.subplotsRegistry[n]=e,t.componentsRegistry)b(i,e.name)}(e.basePlotModule);for(var o={},l=0;l-1&&(d[f[n]].title={text:""});for(n=0;n")?"":t.html(e).text()}));return t.remove(),n}(w),w=(w=w.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(u,"'"),i.isIE()&&(w=(w=(w=w.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),w}},75341:function(e,t,n){"use strict";var r=n(71828);e.exports=function(e,t){for(var n=0;nd+c||!r(u))}for(var f=0;fa))return t}return void 0!==n?n:e.dflt},t.coerceColor=function(e,t,n){return i(t).isValid()?t:void 0!==n?n:e.dflt},t.coerceEnumerated=function(e,t,n){return e.coerceNumber&&(t=+t),-1!==e.values.indexOf(t)?t:void 0!==n?n:e.dflt},t.getValue=function(e,t){var n;return Array.isArray(e)?t0?t+=n:u<0&&(t-=n)}return t}function L(e){var t=u,n=e.b,i=O(e);return r.inbox(n-t,i-t,_+(i-t)/(i-n)-1)}var I=e[d+"a"],z=e[h+"a"];m=Math.abs(I.r2c(I.range[1])-I.r2c(I.range[0]));var N=r.getDistanceFunction(i,f,p,(function(e){return(f(e)+p(e))/2}));if(r.getClosest(g,N,e),!1!==e.index&&g[e.index].p!==c){S||(C=function(e){return Math.min(M(e),e.p-y.bargroupwidth/2)},D=function(e){return Math.max(T(e),e.p+y.bargroupwidth/2)});var F=g[e.index],B=v.base?F.b+F.s:F.s;e[h+"0"]=e[h+"1"]=z.c2p(F[h],!0),e[h+"LabelVal"]=B;var j=y.extents[y.extents.round(F.p)];e[d+"0"]=I.c2p(x?C(F):j[0],!0),e[d+"1"]=I.c2p(x?D(F):j[1],!0);var U=void 0!==F.orig_p;return e[d+"LabelVal"]=U?F.orig_p:F.p,e.labelLabel=l(I,e[d+"LabelVal"],v[d+"hoverformat"]),e.valueLabel=l(z,e[h+"LabelVal"],v[h+"hoverformat"]),e.baseLabel=l(z,F.b,v[h+"hoverformat"]),e.spikeDistance=(function(e){var t=u,n=e.b,i=O(e);return r.inbox(n-t,i-t,w+(i-t)/(i-n)-1)}(F)+function(e){return R(M(e),T(e),w)}(F))/2,e[d+"Spike"]=I.c2p(F.p,!0),o(F,v,e),e.hovertemplate=v.hovertemplate,e}}function d(e,t){var n=t.mcc||e.marker.color,r=t.mlcc||e.marker.line.color,i=s(e,t);return a.opacity(n)?n:a.opacity(r)&&i?r:void 0}e.exports={hoverPoints:function(e,t,n,r,a){var o=u(e,t,n,r,a);if(o){var s=o.cd,l=s[0].trace,c=s[o.index];return o.color=d(l,c),i.getComponentMethod("errorbars","hoverInfo")(c,l,o),[o]}},hoverOnBars:u,getTraceColor:d}},60822:function(e,t,n){"use strict";e.exports={attributes:n(1486),layoutAttributes:n(43641),supplyDefaults:n(90769).supplyDefaults,crossTraceDefaults:n(90769).crossTraceDefaults,supplyLayoutDefaults:n(13957),calc:n(92290),crossTraceCalc:n(11661).crossTraceCalc,colorbar:n(4898),arraysToCalcdata:n(75341),plot:n(17295).plot,style:n(16688).style,styleOnSelect:n(16688).styleOnSelect,hoverPoints:n(95423).hoverPoints,eventData:n(58065),selectPoints:n(81974),moduleType:"trace",name:"bar",basePlotModule:n(93612),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}},43641:function(e){"use strict";e.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc"},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},bargap:{valType:"number",min:0,max:1,editType:"calc"},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},13957:function(e,t,n){"use strict";var r=n(73972),i=n(89298),a=n(71828),o=n(43641);e.exports=function(e,t,n){function s(n,r){return a.coerce(e,t,o,n,r)}for(var l=!1,c=!1,u=!1,d={},h=s("barmode"),f=0;f0}function k(e){return"auto"===e?0:e}function E(e,t){var n=Math.PI/180*t,r=Math.abs(Math.sin(n)),i=Math.abs(Math.cos(n));return{x:e.width*i+e.height*r,y:e.width*r+e.height*i}}function C(e,t,n,r,i,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,c=a.anchor||"end",u="end"===c,d="start"===c,h=((a.leftToRight||0)+1)/2,f=1-h,p=i.width,m=i.height,g=Math.abs(t-e),v=Math.abs(r-n),y=g>2*_&&v>2*_?_:0;g-=2*y,v-=2*y;var x=k(l);"auto"!==l||p<=g&&m<=v||!(p>g||m>v)||(p>v||m>g)&&p.01?G:function(e,t,n){return n&&e===t?e:Math.abs(e-t)>=2?G(e):e>t?Math.ceil(e):Math.floor(e)};B=q(B,j,z),j=q(j,B,z),U=q(U,V,!z),V=q(V,U,!z)}var Y=M(a.ensureSingle(O,"path"),R,g,v);if(Y.style("vector-effect",P?"none":"non-scaling-stroke").attr("d",isNaN((j-B)*(V-U))||H&&e._context.staticPlot?"M0,0Z":"M"+B+","+U+"V"+V+"H"+j+"V"+U+"Z").call(l.setClipUrl,t.layerClipId,e),!R.uniformtext.mode&&N){var $=l.makePointStyleFns(d);l.singlePointStyle(c,Y,d,$,e)}!function(e,t,n,r,i,s,c,d,f,g,v){var w,A=t.xaxis,T=t.yaxis,D=e._fullLayout;function R(t,n,r){return a.ensureSingle(t,"text").text(n).attr({class:"bartext bartext-"+w,"text-anchor":"middle","data-notex":1}).call(l.font,r).call(o.convertToTspans,e)}var P=r[0].trace,O="h"===P.orientation,L=function(e,t,n,r,i){var o,s=t[0].trace,l=s.texttemplate;o=l?function(e,t,n,r,i){var o=t[0].trace,s=a.castOption(o,n,"texttemplate");if(!s)return"";var l,c,d,h,f="histogram"===o.type,p="waterfall"===o.type,m="funnel"===o.type,g="h"===o.orientation;g?(l="y",c=i,d="x",h=r):(l="x",c=r,d="y",h=i);function v(e){return u(c,c.c2l(e),!0).text}function y(e){return u(h,h.c2l(e),!0).text}var x=t[n],_={};_.label=x.p,_.labelLabel=_[l+"Label"]=v(x.p);var w=a.castOption(o,x.i,"text");(0===w||w)&&(_.text=w);_.value=x.s,_.valueLabel=_[d+"Label"]=y(x.s);var A={};b(A,o,x.i),(f||void 0===A.x)&&(A.x=g?_.value:_.label);(f||void 0===A.y)&&(A.y=g?_.label:_.value);(f||void 0===A.xLabel)&&(A.xLabel=g?_.valueLabel:_.labelLabel);(f||void 0===A.yLabel)&&(A.yLabel=g?_.labelLabel:_.valueLabel);p&&(_.delta=+x.rawS||x.s,_.deltaLabel=y(_.delta),_.final=x.v,_.finalLabel=y(_.final),_.initial=_.final-_.delta,_.initialLabel=y(_.initial));m&&(_.value=x.s,_.valueLabel=y(_.value),_.percentInitial=x.begR,_.percentInitialLabel=a.formatPercent(x.begR),_.percentPrevious=x.difR,_.percentPreviousLabel=a.formatPercent(x.difR),_.percentTotal=x.sumR,_.percenTotalLabel=a.formatPercent(x.sumR));var S=a.castOption(o,x.i,"customdata");S&&(_.customdata=S);return a.texttemplateString(s,_,e._d3locale,A,_,o._meta||{})}(e,t,n,r,i):s.textinfo?function(e,t,n,r){var i=e[0].trace,o="h"===i.orientation,s="waterfall"===i.type,l="funnel"===i.type;function c(e){return u(o?r:n,e,!0).text}function d(e){return u(o?n:r,+e,!0).text}var h,f=i.textinfo,p=e[t],m=f.split("+"),g=[],v=function(e){return-1!==m.indexOf(e)};v("label")&&g.push(c(e[t].p));v("text")&&(0===(h=a.castOption(i,p.i,"text"))||h)&&g.push(h);if(s){var y=+p.rawS||p.s,x=p.v,b=x-y;v("initial")&&g.push(d(b)),v("delta")&&g.push(d(y)),v("final")&&g.push(d(x))}if(l){v("value")&&g.push(d(p.s));var _=0;v("percent initial")&&_++,v("percent previous")&&_++,v("percent total")&&_++;var w=_>1;v("percent initial")&&(h=a.formatPercent(p.begR),w&&(h+=" of initial"),g.push(h)),v("percent previous")&&(h=a.formatPercent(p.difR),w&&(h+=" of previous"),g.push(h)),v("percent total")&&(h=a.formatPercent(p.sumR),w&&(h+=" of total"),g.push(h))}return g.join("
")}(t,n,r,i):m.getValue(s.text,n);return m.coerceString(y,o)}(D,r,i,A,T);w=function(e,t){var n=m.getValue(e.textposition,t);return m.coerceEnumerated(x,n)}(P,i);var I="stack"===g.mode||"relative"===g.mode,z=r[i],N=!I||z._outmost;if(!L||"none"===w||(z.isBlank||s===c||d===f)&&("auto"===w||"inside"===w))return void n.select("text").remove();var F=D.font,B=p.getBarColor(r[i],P),j=p.getInsideTextFont(P,i,F,B),U=p.getOutsideTextFont(P,i,F),V=n.datum();O?"log"===A.type&&V.s0<=0&&(s=A.range[0]0&&q>0&&(G<=$&&q<=X||G<=X&&q<=$||(O?$>=G*(X/q):X>=q*($/G)))?w="inside":(w="outside",H.remove(),H=null);else w="inside"}if(!H){var Z=(H=R(n,L,Y=a.ensureUniformFontSize(e,"outside"===w?U:j))).attr("transform");if(H.attr("transform",""),G=(W=l.bBox(H.node())).width,q=W.height,H.attr("transform",Z),G<=0||q<=0)return void H.remove()}var K,J=P.textangle;K="outside"===w?function(e,t,n,r,i,a){var o,s=!!a.isHorizontal,l=!!a.constrained,c=a.angle||0,u=i.width,d=i.height,h=Math.abs(t-e),f=Math.abs(r-n);o=s?f>2*_?_:0:h>2*_?_:0;var p=1;l&&(p=s?Math.min(1,f/d):Math.min(1,h/u));var m=k(c),g=E(i,m),v=(s?g.x:g.y)/2,y=(i.left+i.right)/2,x=(i.top+i.bottom)/2,b=(e+t)/2,w=(n+r)/2,A=0,M=0,T=s?S(t,e):S(n,r);s?(b=t-T*o,A=T*v):(w=r+T*o,M=-T*v);return{textX:y,textY:x,targetX:b,targetY:w,anchorX:A,anchorY:M,scale:p,rotate:m}}(s,c,d,f,W,{isHorizontal:O,constrained:"both"===P.constraintext||"outside"===P.constraintext,angle:J}):C(s,c,d,f,W,{isHorizontal:O,constrained:"both"===P.constraintext||"inside"===P.constraintext,angle:J,anchor:P.insidetextanchor});K.fontSize=Y.size,h("histogram"===P.type?"bar":P.type,K,D),z.transform=K;var Q=M(H,D,g,v);a.setTransormAndDisplay(Q,K)}(e,t,O,n,f,B,j,U,V,g,v),t.layerClipId&&l.hideOutsideRangePoint(c,O.select("text"),w,D,d.xcalendar,d.ycalendar)}));var U=!1===d.cliponaxis;l.setClipUrl(c,U?null:t.layerClipId,e)}));c.getComponentMethod("errorbars","plot")(e,O,t,g)},toMoveInsideBar:C}},81974:function(e){"use strict";function t(e,t,n,r,i){var a=t.c2p(r?e.s0:e.p0,!0),o=t.c2p(r?e.s1:e.p1,!0),s=n.c2p(r?e.p0:e.s0,!0),l=n.c2p(r?e.p1:e.s1,!0);return i?[(a+o)/2,(s+l)/2]:r?[o,(s+l)/2]:[(a+o)/2,l]}e.exports=function(e,n){var r,i=e.cd,a=e.xaxis,o=e.yaxis,s=i[0].trace,l="funnel"===s.type,c="h"===s.orientation,u=[];if(!1===n)for(r=0;r1||0===i.bargap&&0===i.bargroupgap&&!e[0].trace.marker.line.width)&&r.select(this).attr("shape-rendering","crispEdges")})),t.selectAll("g.points").each((function(t){p(r.select(this),t[0].trace,e)})),s.getComponentMethod("errorbars","style")(t)},styleTextPoints:m,styleOnSelect:function(e,t,n){var i=t[0].trace;i.selectedpoints?function(e,t,n){a.selectedPointStyle(e.selectAll("path"),t),function(e,t,n){e.each((function(e){var i,s=r.select(this);if(e.selected){i=o.ensureUniformFontSize(n,g(s,e,t,n));var l=t.selected.textfont&&t.selected.textfont.color;l&&(i.color=l),a.font(s,i)}else a.selectedTextStyle(s,t)}))}(e.selectAll("text"),t,n)}(n,i,e):(p(n,i,e),s.getComponentMethod("errorbars","style")(n))},getInsideTextFont:y,getOutsideTextFont:x,getBarColor:_,resizeText:l}},98340:function(e,t,n){"use strict";var r=n(7901),i=n(52075).hasColorscale,a=n(1586),o=n(71828).coercePattern;e.exports=function(e,t,n,s,l){var c=n("marker.color",s),u=i(e,"marker");u&&a(e,t,l,n,{prefix:"marker.",cLetter:"c"}),n("marker.line.color",r.defaultLine),i(e,"marker.line")&&a(e,t,l,n,{prefix:"marker.line.",cLetter:"c"}),n("marker.line.width"),n("marker.opacity"),o(n,"marker.pattern",c,u),n("selected.marker.color"),n("unselected.marker.color")}},72597:function(e,t,n){"use strict";var r=n(39898),i=n(71828);function a(e){return"_"+e+"Text_minsize"}e.exports={recordMinTextSize:function(e,t,n){if(n.uniformtext.mode){var r=a(e),i=n.uniformtext.minsize,o=t.scale*t.fontSize;t.hide=oh.range[1]&&(x+=Math.PI);if(r.getClosest(c,(function(e){return m(y,x,[e.rp0,e.rp1],[e.thetag0,e.thetag1],p)?g+Math.min(1,Math.abs(e.thetag1-e.thetag0)/v)-1+(e.rp1-y)/(e.rp1-e.rp0)-1:1/0}),e),!1!==e.index){var b=c[e.index];e.x0=e.x1=b.ct[0],e.y0=e.y1=b.ct[1];var _=i.extendFlat({},b,{r:b.s,theta:b.p});return o(b,u,e),s(_,u,d,e),e.hovertemplate=u.hovertemplate,e.color=a(u,b),e.xLabelVal=e.yLabelVal=void 0,b.s<0&&(e.idealAlign="left"),[e]}}},23381:function(e,t,n){"use strict";e.exports={moduleType:"trace",name:"barpolar",basePlotModule:n(23580),categories:["polar","bar","showLegend"],attributes:n(55023),layoutAttributes:n(40151),supplyDefaults:n(6135),supplyLayoutDefaults:n(19860),calc:n(74692).calc,crossTraceCalc:n(74692).crossTraceCalc,plot:n(60173),colorbar:n(4898),formatLabels:n(98608),style:n(16688).style,styleOnSelect:n(16688).styleOnSelect,hoverPoints:n(27379),selectPoints:n(81974),meta:{}}},40151:function(e){"use strict";e.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}},19860:function(e,t,n){"use strict";var r=n(71828),i=n(40151);e.exports=function(e,t,n){var a,o={};function s(n,o){return r.coerce(e[a]||{},t[a],i,n,o)}for(var l=0;l0?(c=o,u=l):(c=l,u=o);var d=[s.findEnclosingVertexAngles(c,e.vangles)[0],(c+u)/2,s.findEnclosingVertexAngles(u,e.vangles)[1]];return s.pathPolygonAnnulus(r,i,c,u,d,t,n)};return function(e,r,i,o){return a.pathAnnulus(e,r,i,o,t,n)}}(t),p=t.layers.frontplot.select("g.barlayer");a.makeTraceGroups(p,n,"trace bars").each((function(){var n=r.select(this),s=a.ensureSingle(n,"g","points").selectAll("g.point").data(a.identity);s.enter().append("g").style("vector-effect",l?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),s.exit().remove(),s.each((function(e){var t,n=r.select(this),o=e.rp0=d.c2p(e.s0),s=e.rp1=d.c2p(e.s1),l=e.thetag0=h.c2g(e.p0),p=e.thetag1=h.c2g(e.p1);if(i(o)&&i(s)&&i(l)&&i(p)&&o!==s&&l!==p){var m=d.c2g(e.s1),g=(l+p)/2;e.ct=[c.c2p(m*Math.cos(g)),u.c2p(m*Math.sin(g))],t=f(o,s,l,p)}else t="M0,0Z";a.ensureSingle(n,"path").attr("d",t)})),o.setClipUrl(n,t._hasClipOnAxisFalse?t.clipIds.forTraces:null,e)}))}},53522:function(e,t,n){"use strict";var r=n(82196),i=n(1486),a=n(22399),o=n(12663).axisHoverFormat,s=n(5386).f,l=n(1426).extendFlat,c=r.marker,u=c.line;e.exports={y:{valType:"data_array",editType:"calc+clearAxisTypes"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},x0:{valType:"any",editType:"calc+clearAxisTypes"},y0:{valType:"any",editType:"calc+clearAxisTypes"},dx:{valType:"number",editType:"calc"},dy:{valType:"number",editType:"calc"},xperiod:r.xperiod,yperiod:r.yperiod,xperiod0:r.xperiod0,yperiod0:r.yperiod0,xperiodalignment:r.xperiodalignment,yperiodalignment:r.yperiodalignment,xhoverformat:o("x"),yhoverformat:o("y"),name:{valType:"string",editType:"calc+clearAxisTypes"},q1:{valType:"data_array",editType:"calc+clearAxisTypes"},median:{valType:"data_array",editType:"calc+clearAxisTypes"},q3:{valType:"data_array",editType:"calc+clearAxisTypes"},lowerfence:{valType:"data_array",editType:"calc"},upperfence:{valType:"data_array",editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},notchspan:{valType:"data_array",editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],editType:"calc"},mean:{valType:"data_array",editType:"calc"},sd:{valType:"data_array",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},quartilemethod:{valType:"enumerated",values:["linear","exclusive","inclusive"],dflt:"linear",editType:"calc"},width:{valType:"number",min:0,dflt:0,editType:"calc"},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style"},symbol:l({},c.symbol,{arrayOk:!1,editType:"plot"}),opacity:l({},c.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:l({},c.angle,{arrayOk:!1,editType:"calc"}),size:l({},c.size,{arrayOk:!1,editType:"calc"}),color:l({},c.color,{arrayOk:!1,editType:"style"}),line:{color:l({},u.color,{arrayOk:!1,dflt:a.defaultLine,editType:"style"}),width:l({},u.width,{arrayOk:!1,dflt:0,editType:"style"}),outliercolor:{valType:"color",editType:"style"},outlierwidth:{valType:"number",min:0,dflt:1,editType:"style"},editType:"style"},editType:"plot"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:r.fillcolor,whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},offsetgroup:i.offsetgroup,alignmentgroup:i.alignmentgroup,selected:{marker:r.selected.marker,editType:"style"},unselected:{marker:r.unselected.marker,editType:"style"},text:l({},r.text,{}),hovertext:l({},r.hovertext,{}),hovertemplate:s({}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"}}},48518:function(e,t,n){"use strict";var r=n(92770),i=n(89298),a=n(42973),o=n(71828),s=n(50606).BADNUM,l=o._;e.exports=function(e,t){var n,c,y,x,b,_,w,A=e._fullLayout,S=i.getFromId(e,t.xaxis||"x"),M=i.getFromId(e,t.yaxis||"y"),T=[],k="violin"===t.type?"_numViolins":"_numBoxes";"h"===t.orientation?(y=S,x="x",b=M,_="y",w=!!t.yperiodalignment):(y=M,x="y",b=S,_="x",w=!!t.xperiodalignment);var E,C,D,R,P,O,L=function(e,t,n,i){var s,l=t in e,c=t+"0"in e,u="d"+t in e;if(l||c&&u){var d=n.makeCalcdata(e,t);return[a(e,n,t,d).vals,d]}s=c?e[t+"0"]:"name"in e&&("category"===n.type||r(e.name)&&-1!==["linear","log"].indexOf(n.type)||o.isDateTime(e.name)&&"date"===n.type)?e.name:i;for(var h="multicategory"===n.type?n.r2c_just_indices(s):n.d2c(s,0,e[t+"calendar"]),f=e._length,p=new Array(f),m=0;mE.uf};if(t._hasPreCompStats){var U=t[x],V=function(e){return y.d2c((t[e]||[])[n])},H=1/0,W=-1/0;for(n=0;n=E.q1&&E.q3>=E.med){var q=V("lowerfence");E.lf=q!==s&&q<=E.q1?q:f(E,D,R);var Y=V("upperfence");E.uf=Y!==s&&Y>=E.q3?Y:p(E,D,R);var $=V("mean");E.mean=$!==s?$:R?o.mean(D,R):(E.q1+E.q3)/2;var X=V("sd");E.sd=$!==s&&X>=0?X:R?o.stdev(D,R,E.mean):E.q3-E.q1,E.lo=m(E),E.uo=g(E);var Z=V("notchspan");Z=Z!==s&&Z>0?Z:v(E,R),E.ln=E.med-Z,E.un=E.med+Z;var K=E.lf,J=E.uf;t.boxpoints&&D.length&&(K=Math.min(K,D[0]),J=Math.max(J,D[R-1])),t.notched&&(K=Math.min(K,E.ln),J=Math.max(J,E.un)),E.min=K,E.max=J}else{var Q;o.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+E.q1,"median = "+E.med,"q3 = "+E.q3].join("\n")),Q=E.med!==s?E.med:E.q1!==s?E.q3!==s?(E.q1+E.q3)/2:E.q1:E.q3!==s?E.q3:0,E.med=Q,E.q1=E.q3=Q,E.lf=E.uf=Q,E.mean=E.sd=Q,E.ln=E.un=Q,E.min=E.max=Q}H=Math.min(H,E.min),W=Math.max(W,E.max),E.pts2=C.filter(j),T.push(E)}}t._extremes[y._id]=i.findExtremes(y,[H,W],{padded:!0})}else{var ee=y.makeCalcdata(t,x),te=function(e,t){for(var n=e.length,r=new Array(n+1),i=0;i=0&&ie0){var ue,de;if((E={}).pos=E[_]=F[n],C=E.pts=re[n].sort(d),R=(D=E[x]=C.map(h)).length,E.min=D[0],E.max=D[R-1],E.mean=o.mean(D,R),E.sd=o.stdev(D,R,E.mean),E.med=o.interp(D,.5),R%2&&(le||ce))le?(ue=D.slice(0,R/2),de=D.slice(R/2+1)):ce&&(ue=D.slice(0,R/2+1),de=D.slice(R/2)),E.q1=o.interp(ue,.5),E.q3=o.interp(de,.5);else E.q1=o.interp(D,.25),E.q3=o.interp(D,.75);E.lf=f(E,D,R),E.uf=p(E,D,R),E.lo=m(E),E.uo=g(E);var he=v(E,R);E.ln=E.med-he,E.un=E.med+he,ae=Math.min(ae,E.ln),oe=Math.max(oe,E.un),E.pts2=C.filter(j),T.push(E)}t._extremes[y._id]=i.findExtremes(y,t.notched?ee.concat([ae,oe]):ee,{padded:!0})}return function(e,t){if(o.isArrayOrTypedArray(t.selectedpoints))for(var n=0;n0?(T[0].t={num:A[k],dPos:B,posLetter:_,valLetter:x,labels:{med:l(e,"median:"),min:l(e,"min:"),q1:l(e,"q1:"),q3:l(e,"q3:"),max:l(e,"max:"),mean:"sd"===t.boxmean?l(e,"mean \xb1 \u03c3:"):l(e,"mean:"),lf:l(e,"lower fence:"),uf:l(e,"upper fence:")}},A[k]++,T):[{t:{empty:!0}}]};var c={text:"tx",hovertext:"htx"};function u(e,t,n){for(var r in c)o.isArrayOrTypedArray(t[r])&&(Array.isArray(n)?o.isArrayOrTypedArray(t[r][n[0]])&&(e[c[r]]=t[r][n[0]][n[1]]):e[c[r]]=t[r][n])}function d(e,t){return e.v-t.v}function h(e){return e.v}function f(e,t,n){return 0===n?e.q1:Math.min(e.q1,t[Math.min(o.findBin(2.5*e.q1-1.5*e.q3,t,!0)+1,n-1)])}function p(e,t,n){return 0===n?e.q3:Math.max(e.q3,t[Math.max(o.findBin(2.5*e.q3-1.5*e.q1,t),0)])}function m(e){return 4*e.q1-3*e.q3}function g(e){return 4*e.q3-3*e.q1}function v(e,t){return 0===t?0:1.57*(e.q3-e.q1)/Math.sqrt(t)}},37188:function(e,t,n){"use strict";var r=n(89298),i=n(71828),a=n(99082).getAxisGroup,o=["v","h"];function s(e,t,n,o){var s,l,c,u=t.calcdata,d=t._fullLayout,h=o._id,f=h.charAt(0),p=[],m=0;for(s=0;s1,b=1-d[e+"gap"],_=1-d[e+"groupgap"];for(s=0;s0){var W=E.pointpos,G=E.jitter,q=E.marker.size/2,Y=0;W+G>=0&&((Y=V*(W+G))>T?(H=!0,j=q,F=Y):Y>z&&(j=q,F=T)),Y<=T&&(F=T);var $=0;W-G<=0&&(($=-V*(W-G))>k?(H=!0,U=q,B=$):$>N&&(U=q,B=k)),$<=k&&(B=k)}else F=T,B=k;var X=new Array(c.length);for(l=0;l0?(g="v",v=x>0?Math.min(_,b):Math.min(b)):x>0?(g="h",v=Math.min(_)):v=0;if(v){t._length=v;var k=n("orientation",g);t._hasPreCompStats?"v"===k&&0===x?(n("x0",0),n("dx",1)):"h"===k&&0===y&&(n("y0",0),n("dy",1)):"v"===k&&0===x?n("x0"):"h"===k&&0===y&&n("y0"),i.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y"],a)}else t.visible=!1}function d(e,t,n,i){var a=i.prefix,o=r.coerce2(e,t,c,"marker.outliercolor"),s=n("marker.line.outliercolor"),l="outliers";t._hasPreCompStats?l="all":(o||s)&&(l="suspectedoutliers");var u=n(a+"points",l);u?(n("jitter","all"===u?.3:0),n("pointpos","all"===u?-1.5:0),n("marker.symbol"),n("marker.opacity"),n("marker.size"),n("marker.angle"),n("marker.color",t.line.color),n("marker.line.color"),n("marker.line.width"),"suspectedoutliers"===u&&(n("marker.line.outliercolor",t.marker.color),n("marker.line.outlierwidth")),n("selected.marker.color"),n("unselected.marker.color"),n("selected.marker.size"),n("unselected.marker.size"),n("text"),n("hovertext")):delete t.marker;var d=n("hoveron");"all"!==d&&-1===d.indexOf("points")||n("hovertemplate"),r.coerceSelectionMarkerOpacity(t,n)}e.exports={supplyDefaults:function(e,t,n,i){function s(n,i){return r.coerce(e,t,c,n,i)}if(u(e,t,s,i),!1!==t.visible){o(e,t,i,s),s("xhoverformat"),s("yhoverformat");var l=t._hasPreCompStats;l&&(s("lowerfence"),s("upperfence")),s("line.color",(e.marker||{}).color||n),s("line.width"),s("fillcolor",a.addOpacity(t.line.color,.5));var h=!1;if(l){var f=s("mean"),p=s("sd");f&&f.length&&(h=!0,p&&p.length&&(h="sd"))}s("boxmean",h),s("whiskerwidth"),s("width"),s("quartilemethod");var m=!1;if(l){var g=s("notchspan");g&&g.length&&(m=!0)}else r.validate(e.notchwidth,c.notchwidth)&&(m=!0);s("notched",m)&&s("notchwidth"),d(e,t,s,{prefix:"box"})}},crossTraceDefaults:function(e,t){var n,i;function a(e){return r.coerce(i._input,i,c,e)}for(var o=0;oe.lo&&(x.so=!0)}return a}));h.enter().append("path").classed("point",!0),h.exit().remove(),h.call(a.translatePoints,o,s)}function l(e,t,n,a){var o,s,l=t.val,c=t.pos,u=!!c.rangebreaks,d=a.bPos,h=a.bPosPxOffset||0,f=n.boxmean||(n.meanline||{}).visible;Array.isArray(a.bdPos)?(o=a.bdPos[0],s=a.bdPos[1]):(o=a.bdPos,s=a.bdPos);var p=e.selectAll("path.mean").data("box"===n.type&&n.boxmean||"violin"===n.type&&n.box.visible&&n.meanline.visible?i.identity:[]);p.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),p.exit().remove(),p.each((function(e){var t=c.c2l(e.pos+d,!0),i=c.l2p(t-o)+h,a=c.l2p(t+s)+h,p=u?(i+a)/2:c.l2p(t)+h,m=l.c2p(e.mean,!0),g=l.c2p(e.mean-e.sd,!0),v=l.c2p(e.mean+e.sd,!0);"h"===n.orientation?r.select(this).attr("d","M"+m+","+i+"V"+a+("sd"===f?"m0,0L"+g+","+p+"L"+m+","+i+"L"+v+","+p+"Z":"")):r.select(this).attr("d","M"+i+","+m+"H"+a+("sd"===f?"m0,0L"+p+","+g+"L"+i+","+m+"L"+p+","+v+"Z":""))}))}e.exports={plot:function(e,t,n,a){var c=e._context.staticPlot,u=t.xaxis,d=t.yaxis;i.makeTraceGroups(a,n,"trace boxes").each((function(e){var t,n,i=r.select(this),a=e[0],h=a.t,f=a.trace;(h.wdPos=h.bdPos*f.whiskerwidth,!0!==f.visible||h.empty)?i.remove():("h"===f.orientation?(t=d,n=u):(t=u,n=d),o(i,{pos:t,val:n},f,h,c),s(i,{x:u,y:d},f,h),l(i,{pos:t,val:n},f,h))}))},plotBoxAndWhiskers:o,plotPoints:s,plotBoxMean:l}},24626:function(e){"use strict";e.exports=function(e,t){var n,r,i=e.cd,a=e.xaxis,o=e.yaxis,s=[];if(!1===t)for(n=0;n=10)return null;for(var n=1/0,a=-1/0,o=e.length,s=0;s0?Math.floor:Math.ceil,P=C>0?Math.ceil:Math.floor,O=C>0?Math.min:Math.max,L=C>0?Math.max:Math.min,I=R(k+D),z=P(E-D),N=[[d=T(k)]];for(a=I;a*C=0;i--)a[u-i]=e[d][i],o[u-i]=t[d][i];for(s.push({x:a,y:o,bicubic:l}),i=d,a=[],o=[];i>=0;i--)a[d-i]=e[i][0],o[d-i]=t[i][0];return s.push({x:a,y:o,bicubic:c}),s}},20347:function(e,t,n){"use strict";var r=n(89298),i=n(1426).extendFlat;e.exports=function(e,t,n){var a,o,s,l,c,u,d,h,f,p,m,g,v,y,x=e["_"+t],b=e[t+"axis"],_=b._gridlines=[],w=b._minorgridlines=[],A=b._boundarylines=[],S=e["_"+n],M=e[n+"axis"];"array"===b.tickmode&&(b.tickvals=x.slice());var T=e._xctrl,k=e._yctrl,E=T[0].length,C=T.length,D=e._a.length,R=e._b.length;r.prepTicks(b),"array"===b.tickmode&&delete b.tickvals;var P=b.smoothing?3:1;function O(r){var i,a,o,s,l,c,u,d,f,p,m,g,v=[],y=[],x={};if("b"===t)for(a=e.b2j(r),o=Math.floor(Math.max(0,Math.min(R-2,a))),s=a-o,x.length=R,x.crossLength=D,x.xy=function(t){return e.evalxy([],t,a)},x.dxy=function(t,n){return e.dxydi([],t,o,n,s)},i=0;i0&&(f=e.dxydi([],i-1,o,0,s),v.push(l[0]+f[0]/3),y.push(l[1]+f[1]/3),p=e.dxydi([],i-1,o,1,s),v.push(d[0]-p[0]/3),y.push(d[1]-p[1]/3)),v.push(d[0]),y.push(d[1]),l=d;else for(i=e.a2i(r),c=Math.floor(Math.max(0,Math.min(D-2,i))),u=i-c,x.length=D,x.crossLength=R,x.xy=function(t){return e.evalxy([],i,t)},x.dxy=function(t,n){return e.dxydj([],c,t,u,n)},a=0;a0&&(m=e.dxydj([],c,a-1,u,0),v.push(l[0]+m[0]/3),y.push(l[1]+m[1]/3),g=e.dxydj([],c,a-1,u,1),v.push(d[0]-g[0]/3),y.push(d[1]-g[1]/3)),v.push(d[0]),y.push(d[1]),l=d;return x.axisLetter=t,x.axis=b,x.crossAxis=M,x.value=r,x.constvar=n,x.index=h,x.x=v,x.y=y,x.smoothing=M.smoothing,x}function L(r){var i,a,o,s,l,c=[],u=[],d={};if(d.length=x.length,d.crossLength=S.length,"b"===t)for(o=Math.max(0,Math.min(R-2,r)),l=Math.min(1,Math.max(0,r-o)),d.xy=function(t){return e.evalxy([],t,r)},d.dxy=function(t,n){return e.dxydi([],t,o,n,l)},i=0;ix.length-1||_.push(i(L(o),{color:b.gridcolor,width:b.gridwidth,dash:b.griddash}));for(h=u;hx.length-1)&&!(m<0||m>x.length-1))for(g=x[s],v=x[m],a=0;ax[x.length-1]||w.push(i(O(p),{color:b.minorgridcolor,width:b.minorgridwidth,dash:b.minorgriddash}));b.startline&&A.push(i(L(0),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&A.push(i(L(x.length-1),{color:b.endlinecolor,width:b.endlinewidth}))}else{for(l=5e-15,u=(c=[Math.floor((x[x.length-1]-b.tick0)/b.dtick*(1+l)),Math.ceil((x[0]-b.tick0)/b.dtick/(1+l))].sort((function(e,t){return e-t})))[0],d=c[1],h=u;h<=d;h++)f=b.tick0+b.dtick*h,_.push(i(O(f),{color:b.gridcolor,width:b.gridwidth,dash:b.griddash}));for(h=u-1;hx[x.length-1]||w.push(i(O(p),{color:b.minorgridcolor,width:b.minorgridwidth,dash:b.minorgriddash}));b.startline&&A.push(i(O(x[0]),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&A.push(i(O(x[x.length-1]),{color:b.endlinecolor,width:b.endlinewidth}))}}},83311:function(e,t,n){"use strict";var r=n(89298),i=n(1426).extendFlat;e.exports=function(e,t){var n,a,o,s=t._labels=[],l=t._gridlines;for(n=0;nt.length&&(e=e.slice(0,t.length)):e=[],i=0;i90&&(f-=180,l=-l),{angle:f,flip:l,p:e.c2p(r,t,n),offsetMultplier:c}}},89740:function(e,t,n){"use strict";var r=n(39898),i=n(91424),a=n(27669),o=n(67961),s=n(11651),l=n(63893),c=n(71828),u=c.strRotate,d=c.strTranslate,h=n(18783);function f(e,t,n,s,l,c,u){var d="const-"+l+"-lines",h=n.selectAll("."+d).data(c);h.enter().append("path").classed(d,!0).style("vector-effect",u?"none":"non-scaling-stroke"),h.each((function(n){var s=n,l=s.x,c=s.y,u=a([],l,e.c2p),d=a([],c,t.c2p),h="M"+o(u,d,s.smoothing);r.select(this).attr("d",h).style("stroke-width",s.width).style("stroke",s.color).style("stroke-dasharray",i.dashStyle(s.dash,s.width)).style("fill","none")})),h.exit().remove()}function p(e,t,n,a,o,c,h,f){var p=c.selectAll("text."+f).data(h);p.enter().append("text").classed(f,!0);var m=0,g={};return p.each((function(o,c){var h;if("auto"===o.axis.tickangle)h=s(a,t,n,o.xy,o.dxy);else{var f=(o.axis.tickangle+180)*Math.PI/180;h=s(a,t,n,o.xy,[Math.cos(f),Math.sin(f)])}c||(g={angle:h.angle,flip:h.flip});var p=(o.endAnchor?-1:1)*h.flip,v=r.select(this).attr({"text-anchor":p>0?"start":"end","data-notex":1}).call(i.font,o.font).text(o.text).call(l.convertToTspans,e),y=i.bBox(this);v.attr("transform",d(h.p[0],h.p[1])+u(h.angle)+d(o.axis.labelpadding*p,.3*y.height)),m=Math.max(m,y.width+o.axis.labelpadding)})),p.exit().remove(),g.maxExtent=m,g}e.exports=function(e,t,n,i){var l=e._context.staticPlot,u=t.xaxis,d=t.yaxis,h=e._fullLayout._clips;c.makeTraceGroups(i,n,"trace").each((function(t){var n=r.select(this),i=t[0],m=i.trace,g=m.aaxis,y=m.baxis,x=c.ensureSingle(n,"g","minorlayer"),b=c.ensureSingle(n,"g","majorlayer"),_=c.ensureSingle(n,"g","boundarylayer"),w=c.ensureSingle(n,"g","labellayer");n.style("opacity",m.opacity),f(u,d,b,g,"a",g._gridlines,!0),f(u,d,b,y,"b",y._gridlines,!0),f(u,d,x,g,"a",g._minorgridlines,!0),f(u,d,x,y,"b",y._minorgridlines,!0),f(u,d,_,g,"a-boundary",g._boundarylines,l),f(u,d,_,y,"b-boundary",y._boundarylines,l);var A=p(e,u,d,m,i,w,g._labels,"a-label"),S=p(e,u,d,m,i,w,y._labels,"b-label");!function(e,t,n,r,i,a,o,l){var u,d,h,f,p=c.aggNums(Math.min,null,n.a),m=c.aggNums(Math.max,null,n.a),g=c.aggNums(Math.min,null,n.b),y=c.aggNums(Math.max,null,n.b);u=.5*(p+m),d=g,h=n.ab2xy(u,d,!0),f=n.dxyda_rough(u,d),void 0===o.angle&&c.extendFlat(o,s(n,i,a,h,n.dxydb_rough(u,d)));v(e,t,n,r,h,f,n.aaxis,i,a,o,"a-title"),u=p,d=.5*(g+y),h=n.ab2xy(u,d,!0),f=n.dxydb_rough(u,d),void 0===l.angle&&c.extendFlat(l,s(n,i,a,h,n.dxyda_rough(u,d)));v(e,t,n,r,h,f,n.baxis,i,a,l,"b-title")}(e,w,m,i,u,d,A,S),function(e,t,n,r,i){var s,l,u,d,h=n.select("#"+e._clipPathId);h.size()||(h=n.append("clipPath").classed("carpetclip",!0));var f=c.ensureSingle(h,"path","carpetboundary"),p=t.clipsegments,m=[];for(d=0;d90&&y<270,b=r.select(this);b.text(h.title.text).call(l.convertToTspans,e),x&&(_=(-l.lineCount(b)+g)*m*a-_),b.attr("transform",d(t.p[0],t.p[1])+u(t.angle)+d(0,_)).attr("text-anchor","middle").call(i.font,h.title.font)})),b.exit().remove()}},11435:function(e,t,n){"use strict";var r=n(35509),i=n(65888).findBin,a=n(45664),o=n(20349),s=n(54495),l=n(73057);e.exports=function(e){var t=e._a,n=e._b,c=t.length,u=n.length,d=e.aaxis,h=e.baxis,f=t[0],p=t[c-1],m=n[0],g=n[u-1],v=t[t.length-1]-t[0],y=n[n.length-1]-n[0],x=v*r.RELATIVE_CULL_TOLERANCE,b=y*r.RELATIVE_CULL_TOLERANCE;f-=x,p+=x,m-=b,g+=b,e.isVisible=function(e,t){return e>f&&em&&tp||tg},e.setScale=function(){var t=e._x,n=e._y,r=a(e._xctrl,e._yctrl,t,n,d.smoothing,h.smoothing);e._xctrl=r[0],e._yctrl=r[1],e.evalxy=o([e._xctrl,e._yctrl],c,u,d.smoothing,h.smoothing),e.dxydi=s([e._xctrl,e._yctrl],d.smoothing,h.smoothing),e.dxydj=l([e._xctrl,e._yctrl],d.smoothing,h.smoothing)},e.i2a=function(e){var n=Math.max(0,Math.floor(e[0]),c-2),r=e[0]-n;return(1-r)*t[n]+r*t[n+1]},e.j2b=function(e){var t=Math.max(0,Math.floor(e[1]),c-2),r=e[1]-t;return(1-r)*n[t]+r*n[t+1]},e.ij2ab=function(t){return[e.i2a(t[0]),e.j2b(t[1])]},e.a2i=function(e){var n=Math.max(0,Math.min(i(e,t),c-2)),r=t[n],a=t[n+1];return Math.max(0,Math.min(c-1,n+(e-r)/(a-r)))},e.b2j=function(e){var t=Math.max(0,Math.min(i(e,n),u-2)),r=n[t],a=n[t+1];return Math.max(0,Math.min(u-1,t+(e-r)/(a-r)))},e.ab2ij=function(t){return[e.a2i(t[0]),e.b2j(t[1])]},e.i2c=function(t,n){return e.evalxy([],t,n)},e.ab2xy=function(r,i,a){if(!a&&(rt[c-1]|in[u-1]))return[!1,!1];var o=e.a2i(r),s=e.b2j(i),l=e.evalxy([],o,s);if(a){var d,h,f,p,m=0,g=0,v=[];rt[c-1]?(d=c-2,h=1,m=(r-t[c-1])/(t[c-1]-t[c-2])):h=o-(d=Math.max(0,Math.min(c-2,Math.floor(o)))),in[u-1]?(f=u-2,p=1,g=(i-n[u-1])/(n[u-1]-n[u-2])):p=s-(f=Math.max(0,Math.min(u-2,Math.floor(s)))),m&&(e.dxydi(v,d,f,h,p),l[0]+=v[0]*m,l[1]+=v[1]*m),g&&(e.dxydj(v,d,f,h,p),l[0]+=v[0]*g,l[1]+=v[1]*g)}return l},e.c2p=function(e,t,n){return[t.c2p(e[0]),n.c2p(e[1])]},e.p2x=function(e,t,n){return[t.p2c(e[0]),n.p2c(e[1])]},e.dadi=function(e){var n=Math.max(0,Math.min(t.length-2,e));return t[n+1]-t[n]},e.dbdj=function(e){var t=Math.max(0,Math.min(n.length-2,e));return n[t+1]-n[t]},e.dxyda=function(t,n,r,i){var a=e.dxydi(null,t,n,r,i),o=e.dadi(t,r);return[a[0]/o,a[1]/o]},e.dxydb=function(t,n,r,i){var a=e.dxydj(null,t,n,r,i),o=e.dbdj(n,i);return[a[0]/o,a[1]/o]},e.dxyda_rough=function(t,n,r){var i=v*(r||.1),a=e.ab2xy(t+i,n,!0),o=e.ab2xy(t-i,n,!0);return[.5*(a[0]-o[0])/i,.5*(a[1]-o[1])/i]},e.dxydb_rough=function(t,n,r){var i=y*(r||.1),a=e.ab2xy(t,n+i,!0),o=e.ab2xy(t,n-i,!0);return[.5*(a[0]-o[0])/i,.5*(a[1]-o[1])/i]},e.dpdx=function(e){return e._m},e.dpdy=function(e){return e._m}}},72505:function(e,t,n){"use strict";var r=n(71828);e.exports=function(e,t,n){var i,a,o,s=[],l=[],c=e[0].length,u=e.length;function d(t,n){var r,i=0,a=0;return t>0&&void 0!==(r=e[n][t-1])&&(a++,i+=r),t0&&void 0!==(r=e[n-1][t])&&(a++,i+=r),n0&&a0&&i1e-5);return r.log("Smoother converged to",S,"after",M,"iterations"),e}},19237:function(e,t,n){"use strict";var r=n(71828).isArray1D;e.exports=function(e,t,n){var i=n("x"),a=i&&i.length,o=n("y"),s=o&&o.length;if(!a&&!s)return!1;if(t._cheater=!i,a&&!r(i)||s&&!r(o))t._length=null;else{var l=a?i.length:1/0;s&&(l=Math.min(l,o.length)),t.a&&t.a.length&&(l=Math.min(l,t.a.length)),t.b&&t.b.length&&(l=Math.min(l,t.b.length)),t._length=l}return!0}},69568:function(e,t,n){"use strict";var r=n(5386).f,i=n(19316),a=n(50693),o=n(9012),s=n(22399).defaultLine,l=n(1426).extendFlat,c=i.marker.line;e.exports=l({locations:{valType:"data_array",editType:"calc"},locationmode:i.locationmode,z:{valType:"data_array",editType:"calc"},geojson:l({},i.geojson,{}),featureidkey:i.featureidkey,text:l({},i.text,{}),hovertext:l({},i.hovertext,{}),marker:{line:{color:l({},c.color,{dflt:s}),width:l({},c.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:i.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:i.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:l({},o.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:r(),showlegend:l({},o.showlegend,{dflt:!1})},a("",{cLetter:"z",editTypeOverride:"calc"}))},38675:function(e,t,n){"use strict";var r=n(92770),i=n(50606).BADNUM,a=n(78803),o=n(75225),s=n(66279);function l(e){return e&&"string"===typeof e}e.exports=function(e,t){var n,c=t._length,u=new Array(c);n=t.geojson?function(e){return l(e)||r(e)}:l;for(var d=0;d")}(e,d,o),[e]}},51319:function(e,t,n){"use strict";e.exports={attributes:n(69568),supplyDefaults:n(61869),colorbar:n(61243),calc:n(38675),calcGeoJSON:n(99841).calcGeoJSON,plot:n(99841).plot,style:n(99636).style,styleOnSelect:n(99636).styleOnSelect,hoverPoints:n(42300),eventData:n(92069),selectPoints:n(81253),moduleType:"trace",name:"choropleth",basePlotModule:n(44622),categories:["geo","noOpacity","showLegend"],meta:{}}},99841:function(e,t,n){"use strict";var r=n(39898),i=n(71828),a=n(41327),o=n(90973).getTopojsonFeatures,s=n(71739).findExtremes,l=n(99636).style;e.exports={calcGeoJSON:function(e,t){for(var n=e[0].trace,r=t[n.geo],i=r._subplot,l=n.locationmode,c=n._length,u="geojson-id"===l?a.extractTraceFeature(e):o(n,i.topojson),d=[],h=[],f=0;f=0;r--){var i=n[r].id;if("string"===typeof i&&0===i.indexOf("water"))for(var a=r+1;a=0;n--)e.removeLayer(t[n][1])},s.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},e.exports=function(e,t){var n=t[0].trace,i=new o(e,n.uid),a=i.sourceId,s=r(t),l=i.below=e.belowLookup["trace-"+n.uid];return e.map.addSource(a,{type:"geojson",data:s.geojson}),i._addLayers(s,l),t[0].trace._glTrace=i,i}},12674:function(e,t,n){"use strict";var r=n(50693),i=n(12663).axisHoverFormat,a=n(5386).f,o=n(2418),s=n(9012),l=n(1426).extendFlat,c={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},sizemode:{valType:"enumerated",values:["scaled","absolute"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",editType:"calc",min:0},anchor:{valType:"enumerated",editType:"calc",values:["tip","tail","cm","center"],dflt:"cm"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:a({editType:"calc"},{keys:["norm"]}),uhoverformat:i("u",1),vhoverformat:i("v",1),whoverformat:i("w",1),xhoverformat:i("x"),yhoverformat:i("y"),zhoverformat:i("z"),showlegend:l({},s.showlegend,{dflt:!1})};l(c,r("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));["opacity","lightposition","lighting"].forEach((function(e){c[e]=o[e]})),c.hoverinfo=l({},s.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),c.transforms=void 0,e.exports=c},31371:function(e,t,n){"use strict";var r=n(78803);e.exports=function(e,t){for(var n=t.u,i=t.v,a=t.w,o=Math.min(t.x.length,t.y.length,t.z.length,n.length,i.length,a.length),s=-1/0,l=1/0,c=0;co.level||o.starts.length&&a===o.level)}break;case"constraint":if(r.prefixBoundary=!1,r.edgepaths.length)return;var s=r.x.length,l=r.y.length,c=-1/0,u=1/0;for(n=0;n":f>c&&(r.prefixBoundary=!0);break;case"<":(fc||r.starts.length&&h===u)&&(r.prefixBoundary=!0);break;case"][":d=Math.min(f[0],f[1]),h=Math.max(f[0],f[1]),dc&&(r.prefixBoundary=!0)}}}},90654:function(e,t,n){"use strict";var r=n(21081),i=n(86068),a=n(53572);e.exports={min:"zmin",max:"zmax",calc:function(e,t,n){var o=t.contours,s=t.line,l=o.size||1,c=o.coloring,u=i(t,{isColorbar:!0});if("heatmap"===c){var d=r.extractOpts(t);n._fillgradient=d.reversescale?r.flipScale(d.colorscale):d.colorscale,n._zrange=[d.min,d.max]}else"fill"===c&&(n._fillcolor=u);n._line={color:"lines"===c?u:s.color,width:!1!==o.showlines?s.width:0,dash:s.dash},n._levels={start:o.start,end:a(o),size:l}}}},36914:function(e){"use strict";e.exports={BOTTOMSTART:[1,9,13,104,713],TOPSTART:[4,6,7,104,713],LEFTSTART:[8,12,14,208,1114],RIGHTSTART:[2,3,11,208,1114],NEWDELTA:[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],CHOOSESADDLE:{104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},SADDLEREMAINDER:{1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},LABELDISTANCE:2,LABELINCREASE:10,LABELMIN:3,LABELMAX:10,LABELOPTIMIZER:{EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}}},83179:function(e,t,n){"use strict";var r=n(92770),i=n(14523),a=n(7901),o=a.addOpacity,s=a.opacity,l=n(74808),c=l.CONSTRAINT_REDUCTION,u=l.COMPARISON_OPS2;e.exports=function(e,t,n,a,l,d){var h,f,p,m=t.contours,g=n("contours.operation");(m._operation=c[g],function(e,t){var n;-1===u.indexOf(t.operation)?(e("contours.value",[0,1]),Array.isArray(t.value)?t.value.length>2?t.value=t.value.slice(2):0===t.length?t.value=[0,1]:t.length<2?(n=parseFloat(t.value[0]),t.value=[n,n+1]):t.value=[parseFloat(t.value[0]),parseFloat(t.value[1])]:r(t.value)&&(n=parseFloat(t.value),t.value=[n,n+1])):(e("contours.value",0),r(t.value)||(Array.isArray(t.value)?t.value=parseFloat(t.value[0]):t.value=0))}(n,m),"="===g?h=m.showlines=!0:(h=n("contours.showlines"),p=n("fillcolor",o((e.line||{}).color||l,.5))),h)&&(f=n("line.color",p&&s(p)?o(t.fillcolor,1):l),n("line.width",2),n("line.dash"));n("line.smoothing"),i(n,a,f,d)}},64237:function(e,t,n){"use strict";var r=n(74808),i=n(92770);function a(e,t){var n,a=Array.isArray(t);function o(e){return i(e)?+e:null}return-1!==r.COMPARISON_OPS2.indexOf(e)?n=o(a?t[0]:t):-1!==r.INTERVAL_OPS.indexOf(e)?n=a?[o(t[0]),o(t[1])]:[o(t),o(t)]:-1!==r.SET_OPS.indexOf(e)&&(n=a?t.map(o):[o(t)]),n}function o(e){return function(t){t=a(e,t);var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return{start:n,end:r,size:r-n}}}function s(e){return function(t){return{start:t=a(e,t),end:1/0,size:1/0}}}e.exports={"[]":o("[]"),"][":o("]["),">":s(">"),"<":s("<"),"=":s("=")}},67217:function(e){"use strict";e.exports=function(e,t,n,r){var i=r("contours.start"),a=r("contours.end"),o=!1===i||!1===a,s=n("contours.size");!(o?t.autocontour=!0:n("autocontour",!1))&&s||n("ncontours")}},84857:function(e,t,n){"use strict";var r=n(71828);function i(e){return r.extendFlat({},e,{edgepaths:r.extendDeep([],e.edgepaths),paths:r.extendDeep([],e.paths),starts:r.extendDeep([],e.starts)})}e.exports=function(e,t){var n,a,o,s=function(e){return e.reverse()},l=function(e){return e};switch(t){case"=":case"<":return e;case">":for(1!==e.length&&r.warn("Contour data invalid for the specified inequality operation."),a=e[0],n=0;n1e3){r.warn("Too many contours, clipping at 1000",e);break}return l}},53572:function(e){"use strict";e.exports=function(e){return e.end+e.size/1e6}},81696:function(e,t,n){"use strict";var r=n(71828),i=n(36914);function a(e,t,n,r){return Math.abs(e[0]-t[0])20&&t?208===e||1114===e?r=0===n[0]?1:-1:a=0===n[1]?1:-1:-1!==i.BOTTOMSTART.indexOf(e)?a=1:-1!==i.LEFTSTART.indexOf(e)?r=1:-1!==i.TOPSTART.indexOf(e)?a=-1:r=-1;return[r,a]}(h,n,t),p=[l(e,t,[-f[0],-f[1]])],m=e.z.length,g=e.z[0].length,v=t.slice(),y=f.slice();for(u=0;u<1e4;u++){if(h>20?(h=i.CHOOSESADDLE[h][(f[0]||f[1])<0?0:1],e.crossings[d]=i.SADDLEREMAINDER[h]):delete e.crossings[d],!(f=i.NEWDELTA[h])){r.log("Found bad marching index:",h,t,e.level);break}p.push(l(e,t,f)),t[0]+=f[0],t[1]+=f[1],d=t.join(","),a(p[p.length-1],p[p.length-2],s,c)&&p.pop();var x=f[0]&&(t[0]<0||t[0]>g-2)||f[1]&&(t[1]<0||t[1]>m-2);if(t[0]===v[0]&&t[1]===v[1]&&f[0]===y[0]&&f[1]===y[1]||n&&x)break;h=e.crossings[d]}1e4===u&&r.log("Infinite loop in contour?");var b,_,w,A,S,M,T,k,E,C,D,R=a(p[0],p[p.length-1],s,c),P=0,O=.2*e.smoothing,L=[],I=0;for(u=1;u=I;u--)if((b=L[u])=I&&b+L[_]k&&E--,e.edgepaths[E]=D.concat(p,C));break}B||(e.edgepaths[k]=p.concat(C))}for(k=0;ke?0:1)+(t[0][1]>e?0:2)+(t[1][1]>e?0:4)+(t[1][0]>e?0:8);return 5===n||10===n?e>(t[0][0]+t[0][1]+t[1][0]+t[1][1])/4?5===n?713:1114:5===n?104:208:15===n?0:n}e.exports=function(e){var t,n,a,o,s,l,c,u,d,h=e[0].z,f=h.length,p=h[0].length,m=2===f||2===p;for(n=0;n=0&&(r=y,s=l):Math.abs(n[1]-r[1])<.01?Math.abs(n[1]-y[1])<.01&&(y[0]-n[0])*(r[0]-y[0])>=0&&(r=y,s=l):i.log("endpt to newendpt is not vert. or horz.",n,r,y)}if(n=r,s>=0)break;d+="L"+r}if(s===e.edgepaths.length){i.log("unclosed perimeter path");break}h=s,(p=-1===f.indexOf(h))&&(h=f[0],d+="Z")}for(h=0;hr.center?r.right-s:s-r.left)/(u+Math.abs(Math.sin(c)*o)),f=(l>r.middle?r.bottom-l:l-r.top)/(Math.abs(d)+Math.cos(c)*o);if(h<1||f<1)return 1/0;var p=v.EDGECOST*(1/(h-1)+1/(f-1));p+=v.ANGLECOST*c*c;for(var m=s-u,g=l-d,y=s+u,x=l+d,b=0;b2*v.MAXCOST)break;f&&(s/=2),l=(o=c-s/2)+1.5*s}if(h<=v.MAXCOST)return u},t.addLabelData=function(e,t,n,r){var i=t.fontSize,a=t.width+i/3,o=Math.max(0,t.height-i/3),s=e.x,l=e.y,c=e.theta,u=Math.sin(c),d=Math.cos(c),h=function(e,t){return[s+e*d-t*u,l+e*u+t*d]},f=[h(-a/2,-o/2),h(-a/2,o/2),h(a/2,o/2),h(a/2,-o/2)];n.push({text:t.text,x:s,y:l,dy:t.dy,theta:c,level:t.level,width:a,height:o}),r.push(f)},t.drawLabels=function(e,t,n,a,o){var l=e.selectAll("text").data(t,(function(e){return e.text+","+e.x+","+e.y+","+e.theta}));if(l.exit().remove(),l.enter().append("text").attr({"data-notex":1,"text-anchor":"middle"}).each((function(e){var t=e.x+Math.sin(e.theta)*e.dy,i=e.y-Math.cos(e.theta)*e.dy;r.select(this).text(e.text).attr({x:t,y:i,transform:"rotate("+180*e.theta/Math.PI+" "+t+" "+i+")"}).call(s.convertToTspans,n)})),o){for(var c="",u=0;un.end&&(n.start=n.end=(n.start+n.end)/2),e._input.contours||(e._input.contours={}),i.extendFlat(e._input.contours,{start:n.start,end:n.end,size:n.size}),e._input.autocontour=!0}else if("constraint"!==n.type){var c,u=n.start,d=n.end,h=e._input.contours;if(u>d&&(n.start=h.start=d,d=n.end=h.end=u,u=n.start),!(n.size>0))c=u===d?1:a(u,d,e.ncontours).dtick,h.size=n.size=c}}},84426:function(e,t,n){"use strict";var r=n(39898),i=n(91424),a=n(70035),o=n(86068);e.exports=function(e){var t=r.select(e).selectAll("g.contour");t.style("opacity",(function(e){return e[0].trace.opacity})),t.each((function(e){var t=r.select(this),n=e[0].trace,a=n.contours,s=n.line,l=a.size||1,c=a.start,u="constraint"===a.type,d=!u&&"lines"===a.coloring,h=!u&&"fill"===a.coloring,f=d||h?o(n):null;t.selectAll("g.contourlevel").each((function(e){r.select(this).selectAll("path").call(i.lineGroupStyle,s.width,d?f(e.level):s.color,s.dash)}));var p=a.labelfont;if(t.selectAll("g.contourlabels text").each((function(e){i.font(r.select(this),{family:p.family,size:p.size,color:p.color||(d?f(e.level):s.color)})})),u)t.selectAll("g.contourfill path").style("fill",n.fillcolor);else if(h){var m;t.selectAll("g.contourfill path").style("fill",(function(e){return void 0===m&&(m=e.level),f(e.level+.5*l)})),void 0===m&&(m=c),t.selectAll("g.contourbg path").style("fill",f(m-.5*l))}})),a(e)}},8724:function(e,t,n){"use strict";var r=n(1586),i=n(14523);e.exports=function(e,t,n,a,o){var s,l=n("contours.coloring"),c="";"fill"===l&&(s=n("contours.showlines")),!1!==s&&("lines"!==l&&(c=n("line.color","#000")),n("line.width",.5),n("line.dash")),"none"!==l&&(!0!==e.showlegend&&(t.showlegend=!1),t._dfltShowLegend=!1,r(e,t,a,n,{prefix:"",cLetter:"z"})),n("line.smoothing"),i(n,a,c,o)}},88085:function(e,t,n){"use strict";var r=n(21606),i=n(70600),a=n(50693),o=n(1426).extendFlat,s=i.contours;e.exports=o({carpet:{valType:"string",editType:"calc"},z:r.z,a:r.x,a0:r.x0,da:r.dx,b:r.y,b0:r.y0,db:r.dy,text:r.text,hovertext:r.hovertext,transpose:r.transpose,atype:r.xtype,btype:r.ytype,fillcolor:i.fillcolor,autocontour:i.autocontour,ncontours:i.ncontours,contours:{type:s.type,start:s.start,end:s.end,size:s.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:s.showlines,showlabels:s.showlabels,labelfont:s.labelfont,labelformat:s.labelformat,operation:s.operation,value:s.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:i.line.color,width:i.line.width,dash:i.line.dash,smoothing:i.line.smoothing,editType:"plot"},transforms:void 0},a("",{cLetter:"z",autoColorDflt:!1}))},59885:function(e,t,n){"use strict";var r=n(78803),i=n(71828),a=n(68296),o=n(4742),s=n(824),l=n(43907),c=n(70769),u=n(75005),d=n(22882),h=n(18670);e.exports=function(e,t){var n=t._carpetTrace=d(e,t);if(n&&n.visible&&"legendonly"!==n.visible){if(!t.a||!t.b){var f=e.data[n.index],p=e.data[t.index];p.a||(p.a=f.a),p.b||(p.b=f.b),u(p,t,t._defaultColor,e._fullLayout)}var m=function(e,t){var n,u,d,h,f,p,m,g=t._carpetTrace,v=g.aaxis,y=g.baxis;v._minDtick=0,y._minDtick=0,i.isArray1D(t.z)&&a(t,v,y,"a","b",["z"]);n=t._a=t._a||t.a,h=t._b=t._b||t.b,n=n?v.makeCalcdata(t,"_a"):[],h=h?y.makeCalcdata(t,"_b"):[],u=t.a0||0,d=t.da||1,f=t.b0||0,p=t.db||1,m=t._z=o(t._z||t.z,t.transpose),t._emptypoints=l(m),s(m,t._emptypoints);var x=i.maxRowLength(m),b="scaled"===t.xtype?"":n,_=c(t,b,u,d,x,v),w="scaled"===t.ytype?"":h,A=c(t,w,f,p,m.length,y),S={a:_,b:A,z:m};"levels"===t.contours.type&&"none"!==t.contours.coloring&&r(e,t,{vals:m,containerStr:"",cLetter:"z"});return[S]}(e,t);return h(t,t._z),m}}},75005:function(e,t,n){"use strict";var r=n(71828),i=n(67684),a=n(88085),o=n(83179),s=n(67217),l=n(8724);e.exports=function(e,t,n,c){function u(n,i){return r.coerce(e,t,a,n,i)}if(u("carpet"),e.a&&e.b){if(!i(e,t,u,c,"a","b"))return void(t.visible=!1);u("text"),"constraint"===u("contours.type")?o(e,t,u,c,n,{hasHover:!1}):(s(e,t,u,(function(n){return r.coerce2(e,t,a,n)})),l(e,t,u,c,{hasHover:!1}))}else t._defaultColor=n,t._length=null}},93740:function(e,t,n){"use strict";e.exports={attributes:n(88085),supplyDefaults:n(75005),colorbar:n(90654),calc:n(59885),plot:n(51048),style:n(84426),moduleType:"trace",name:"contourcarpet",basePlotModule:n(93612),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}},51048:function(e,t,n){"use strict";var r=n(39898),i=n(27669),a=n(67961),o=n(91424),s=n(71828),l=n(87678),c=n(81696),u=n(29854),d=n(36914),h=n(84857),f=n(87558),p=n(20083),m=n(22882),g=n(4536);function v(e,t,n){var r=e.getPointAtLength(t),i=e.getPointAtLength(n),a=i.x-r.x,o=i.y-r.y,s=Math.sqrt(a*a+o*o);return[a/s,o/s]}function y(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]);return[e[0]/t,e[1]/t]}function x(e,t){var n=Math.abs(e[0]*t[0]+e[1]*t[1]);return Math.sqrt(1-n*n)/n}e.exports=function(e,t,n,b){var _=t.xaxis,w=t.yaxis;s.makeTraceGroups(b,n,"contour").each((function(n){var b=r.select(this),A=n[0],S=A.trace,M=S._carpetTrace=m(e,S),T=e.calcdata[M.index][0];if(M.visible&&"legendonly"!==M.visible){var k=A.a,E=A.b,C=S.contours,D=f(C,t,A),R="constraint"===C.type,P=C._operation,O=R?"="===P?"lines":"fill":C.coloring,L=[[k[0],E[E.length-1]],[k[k.length-1],E[E.length-1]],[k[k.length-1],E[0]],[k[0],E[0]]];l(D);var I=1e-8*(k[k.length-1]-k[0]),z=1e-8*(E[E.length-1]-E[0]);c(D,I,z);var N,F,B,j,U=D;"constraint"===C.type&&(U=h(D,P)),function(e,t){var n,r,i,a,o,s,l,c,u;for(n=0;n=0;j--)N=T.clipsegments[j],F=i([],N.x,_.c2p),B=i([],N.y,w.c2p),F.reverse(),B.reverse(),V.push(a(F,B,N.bicubic));var H="M"+V.join("L")+"Z";!function(e,t,n,r,o,l){var c,u,d,h,f=s.ensureSingle(e,"g","contourbg").selectAll("path").data("fill"!==l||o?[]:[0]);f.enter().append("path"),f.exit().remove();var p=[];for(h=0;h=0&&(h=C,p=m):Math.abs(d[1]-h[1])=0&&(h=C,p=m):s.log("endpt to newendpt is not vert. or horz.",d,h,C)}if(p>=0)break;y+=k(d,h),d=h}if(p===t.edgepaths.length){s.log("unclosed perimeter path");break}u=p,(b=-1===x.indexOf(u))&&(u=x[0],y+=k(d,h)+"Z",d=null)}for(u=0;ug&&(r.max=g);r.len=r.max-r.min}(r,n,e,i,c,t.height),!(i.len<(t.width+t.height)*d.LABELMIN)))for(var a=Math.min(Math.ceil(i.len/O),d.LABELMAX),o=0;o0?+f[u]:0),d.push({type:"Feature",geometry:{type:"Point",coordinates:v},properties:y})}}var b=o.extractOpts(t),_=b.reversescale?o.flipScale(b.colorscale):b.colorscale,w=_[0][1],A=["interpolate",["linear"],["heatmap-density"],0,a.opacity(w)<1?w:a.addOpacity(w,0)];for(u=1;u<_.length;u++)A.push(_[u][0],_[u][1]);var S=["interpolate",["linear"],["get","z"],b.min,0,b.max,1];return i.extendFlat(c.heatmap.paint,{"heatmap-weight":p?S:1/(b.max-b.min),"heatmap-color":A,"heatmap-radius":m?{type:"identity",property:"r"}:t.radius,"heatmap-opacity":t.opacity}),c.geojson={type:"FeatureCollection",features:d},c.heatmap.layout.visibility="visible",c}},79429:function(e,t,n){"use strict";var r=n(71828),i=n(1586),a=n(64096);e.exports=function(e,t,n,o){function s(n,i){return r.coerce(e,t,a,n,i)}var l=s("lon")||[],c=s("lat")||[],u=Math.min(l.length,c.length);u?(t._length=u,s("z"),s("radius"),s("below"),s("text"),s("hovertext"),s("hovertemplate"),i(e,t,o,s,{prefix:"",cLetter:"z"})):t.visible=!1}},62474:function(e){"use strict";e.exports=function(e,t){return e.lon=t.lon,e.lat=t.lat,e.z=t.z,e}},84684:function(e,t,n){"use strict";var r=n(89298),i=n(28178).hoverPoints,a=n(28178).getExtraText;e.exports=function(e,t,n){var o=i(e,t,n);if(o){var s=o[0],l=s.cd,c=l[0].trace,u=l[s.index];if(delete s.color,"z"in u){var d=s.subplot.mockAxis;s.z=u.z,s.zLabel=r.tickText(d,d.c2l(u.z),"hover").text}return s.extraText=a(c,u,l[0].t.labels),[s]}}},93814:function(e,t,n){"use strict";e.exports={attributes:n(64096),supplyDefaults:n(79429),colorbar:n(61243),formatLabels:n(15636),calc:n(85070),plot:n(7336),hoverPoints:n(84684),eventData:n(62474),getBelow:function(e,t){for(var n=t.getMapLayers(),r=0;r=0;n--)e.removeLayer(t[n][1])},o.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},e.exports=function(e,t){var n=t[0].trace,i=new a(e,n.uid),o=i.sourceId,s=r(t),l=i.below=e.belowLookup["trace-"+n.uid];return e.map.addSource(o,{type:"geojson",data:s.geojson}),i._addLayers(s,l),i}},49789:function(e,t,n){"use strict";var r=n(71828);e.exports=function(e,t){for(var n=0;n"),l.color=function(e,t){var n=e.marker,i=t.mc||n.color,a=t.mlc||n.line.color,o=t.mlw||n.line.width;if(r(i))return i;if(r(a)&&o)return a}(u,h),[l]}}},51759:function(e,t,n){"use strict";e.exports={attributes:n(1285),layoutAttributes:n(10440),supplyDefaults:n(26199).supplyDefaults,crossTraceDefaults:n(26199).crossTraceDefaults,supplyLayoutDefaults:n(93138),calc:n(9532),crossTraceCalc:n(8984),plot:n(80461),style:n(68266).style,hoverPoints:n(63341),eventData:n(34598),selectPoints:n(81974),moduleType:"trace",name:"funnel",basePlotModule:n(93612),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},10440:function(e){"use strict";e.exports={funnelmode:{valType:"enumerated",values:["stack","group","overlay"],dflt:"stack",editType:"calc"},funnelgap:{valType:"number",min:0,max:1,editType:"calc"},funnelgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},93138:function(e,t,n){"use strict";var r=n(71828),i=n(10440);e.exports=function(e,t,n){var a=!1;function o(n,a){return r.coerce(e,t,i,n,a)}for(var s=0;s path").each((function(e){if(!e.isBlank){var t=s.marker;r.select(this).call(a.fill,e.mc||t.color).call(a.stroke,e.mlc||t.line.color).call(i.dashLine,t.line.dash,e.mlw||t.line.width).style("opacity",s.selectedpoints&&!e.selected?o:1)}})),c(n,s,e),n.selectAll(".regions").each((function(){r.select(this).selectAll("path").style("stroke-width",0).call(a.fill,s.connector.fillcolor)})),n.selectAll(".lines").each((function(){var e=s.connector.line;i.lineGroupStyle(r.select(this).selectAll("path"),e.width,e.color,e.dash)}))}))}}},86807:function(e,t,n){"use strict";var r=n(34e3),i=n(9012),a=n(27670).Y,o=n(5386).f,s=n(5386).s,l=n(1426).extendFlat;e.exports={labels:r.labels,label0:r.label0,dlabel:r.dlabel,values:r.values,marker:{colors:r.marker.colors,line:{color:l({},r.marker.line.color,{dflt:null}),width:l({},r.marker.line.width,{dflt:1}),editType:"calc"},editType:"calc"},text:r.text,hovertext:r.hovertext,scalegroup:l({},r.scalegroup,{}),textinfo:l({},r.textinfo,{flags:["label","text","value","percent"]}),texttemplate:s({editType:"plot"},{keys:["label","color","value","text","percent"]}),hoverinfo:l({},i.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:o({},{keys:["label","color","value","text","percent"]}),textposition:l({},r.textposition,{values:["inside","none"],dflt:"inside"}),textfont:r.textfont,insidetextfont:r.insidetextfont,title:{text:r.title.text,font:r.title.font,position:l({},r.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:a({name:"funnelarea",trace:!0,editType:"calc"}),aspectratio:{valType:"number",min:0,dflt:1,editType:"plot"},baseratio:{valType:"number",min:0,max:1,dflt:.333,editType:"plot"}}},6452:function(e,t,n){"use strict";var r=n(74875);t.name="funnelarea",t.plot=function(e,n,i,a){r.plotBasePlot(t.name,e,n,i,a)},t.clean=function(e,n,i,a){r.cleanBasePlot(t.name,e,n,i,a)}},89574:function(e,t,n){"use strict";var r=n(32354);e.exports={calc:function(e,t){return r.calc(e,t)},crossTraceCalc:function(e){r.crossTraceCalc(e,{type:"funnelarea"})}}},86282:function(e,t,n){"use strict";var r=n(71828),i=n(86807),a=n(27670).c,o=n(90769).handleText,s=n(37434).handleLabelsAndValues;e.exports=function(e,t,n,l){function c(n,a){return r.coerce(e,t,i,n,a)}var u=c("labels"),d=c("values"),h=s(u,d),f=h.len;if(t._hasLabels=h.hasLabels,t._hasValues=h.hasValues,!t._hasLabels&&t._hasValues&&(c("label0"),c("dlabel")),f){t._length=f,c("marker.line.width")&&c("marker.line.color",l.paper_bgcolor),c("marker.colors"),c("scalegroup");var p,m=c("text"),g=c("texttemplate");if(g||(p=c("textinfo",Array.isArray(m)?"text+percent":"percent")),c("hovertext"),c("hovertemplate"),g||p&&"none"!==p){var v=c("textposition");o(e,t,l,c,v,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}a(t,l,c),c("title.text")&&(c("title.position"),r.coerceFont(c,"title.font",l.font)),c("aspectratio"),c("baseratio")}else t.visible=!1}},10421:function(e,t,n){"use strict";e.exports={moduleType:"trace",name:"funnelarea",basePlotModule:n(6452),categories:["pie-like","funnelarea","showLegend"],attributes:n(86807),layoutAttributes:n(80097),supplyDefaults:n(86282),supplyLayoutDefaults:n(57402),calc:n(89574).calc,crossTraceCalc:n(89574).crossTraceCalc,plot:n(79187),style:n(71858),styleOne:n(63463),meta:{}}},80097:function(e,t,n){"use strict";var r=n(92774).hiddenlabels;e.exports={hiddenlabels:r,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}},57402:function(e,t,n){"use strict";var r=n(71828),i=n(80097);e.exports=function(e,t){function n(n,a){return r.coerce(e,t,i,n,a)}n("hiddenlabels"),n("funnelareacolorway",t.colorway),n("extendfunnelareacolors")}},79187:function(e,t,n){"use strict";var r=n(39898),i=n(91424),a=n(71828),o=a.strScale,s=a.strTranslate,l=n(63893),c=n(17295).toMoveInsideBar,u=n(72597),d=u.recordMinTextSize,h=u.clearMinTextSize,f=n(53581),p=n(14575),m=p.attachFxHandlers,g=p.determineInsideTextFont,v=p.layoutAreas,y=p.prerenderTitles,x=p.positionTitleOutside,b=p.formatSliceLabel;function _(e,t){return"l"+(t[0]-e[0])+","+(t[1]-e[1])}function w(e,t){return[.5*(e[0]+t[0]),.5*(e[1]+t[1])]}e.exports=function(e,t){var n=e._context.staticPlot,u=e._fullLayout;h("funnelarea",u),y(t,e),v(t,u._size),a.makeTraceGroups(u._funnelarealayer,t,"trace").each((function(t){var h=r.select(this),p=t[0],v=p.trace;!function(e){if(!e.length)return;var t=e[0],n=t.trace,r=n.aspectratio,i=n.baseratio;i>.999&&(i=.999);var a,o=Math.pow(i,2),s=t.vTotal,l=s,c=s*o/(1-o)/s;function u(){var e=Math.sqrt(c);return{x:e,y:-e}}function d(){var e=u();return[e.x,e.y]}var h,f,p=[];for(p.push(d()),h=e.length-1;h>-1;h--)if(!(f=e[h]).hidden){var m=f.v/l;c+=m,p.push(d())}var g=1/0,v=-1/0;for(h=0;h-1;h--)if(!(f=e[h]).hidden){var k=p[T+=1][0],E=p[T][1];f.TL=[-k,E],f.TR=[k,E],f.BL=S,f.BR=M,f.pxmid=w(f.TR,f.BR),S=f.TL,M=f.TR}}(t),h.each((function(){var h=r.select(this).selectAll("g.slice").data(t);h.enter().append("g").classed("slice",!0),h.exit().remove(),h.each((function(o,s){if(o.hidden)r.select(this).selectAll("path,g").remove();else{o.pointNumber=o.i,o.curveNumber=v.index;var h=p.cx,y=p.cy,x=r.select(this),w=x.selectAll("path.surface").data([o]);w.enter().append("path").classed("surface",!0).style({"pointer-events":n?"none":"all"}),x.call(m,e,t);var A="M"+(h+o.TR[0])+","+(y+o.TR[1])+_(o.TR,o.BR)+_(o.BR,o.BL)+_(o.BL,o.TL)+"Z";w.attr("d",A),b(e,o,p);var S=f.castOption(v.textposition,o.pts),M=x.selectAll("g.slicetext").data(o.text&&"none"!==S?[0]:[]);M.enter().append("g").classed("slicetext",!0),M.exit().remove(),M.each((function(){var n=a.ensureSingle(r.select(this),"text","",(function(e){e.attr("data-notex",1)})),f=a.ensureUniformFontSize(e,g(v,o,u.font));n.text(o.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(i.font,f).call(l.convertToTspans,e);var p,m,x,b=i.bBox(n.node()),_=Math.min(o.BL[1],o.BR[1])+y,w=Math.max(o.TL[1],o.TR[1])+y;m=Math.max(o.TL[0],o.BL[0])+h,x=Math.min(o.TR[0],o.BR[0])+h,(p=c(m,x,_,w,b,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"})).fontSize=f.size,d(v.type,p,u),t[s].transform=p,a.setTransormAndDisplay(n,p)}))}}));var y=r.select(this).selectAll("g.titletext").data(v.title.text?[0]:[]);y.enter().append("g").classed("titletext",!0),y.exit().remove(),y.each((function(){var t=a.ensureSingle(r.select(this),"text","",(function(e){e.attr("data-notex",1)})),n=v.title.text;v._meta&&(n=a.templateString(n,v._meta)),t.text(n).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(i.font,v.title.font).call(l.convertToTspans,e);var c=x(p,u._size);t.attr("transform",s(c.x,c.y)+o(Math.min(1,c.scale))+s(c.tx,c.ty))}))}))}))}},71858:function(e,t,n){"use strict";var r=n(39898),i=n(63463),a=n(72597).resizeText;e.exports=function(e){var t=e._fullLayout._funnelarealayer.selectAll(".trace");a(e,t,"funnelarea"),t.each((function(e){var t=e[0].trace,n=r.select(this);n.style({opacity:t.opacity}),n.selectAll("path.surface").each((function(e){r.select(this).call(i,e,t)}))}))}},21606:function(e,t,n){"use strict";var r=n(82196),i=n(9012),a=n(41940),o=n(12663).axisHoverFormat,s=n(5386).f,l=n(5386).s,c=n(50693),u=n(1426).extendFlat;e.exports=u({z:{valType:"data_array",editType:"calc"},x:u({},r.x,{impliedEdits:{xtype:"array"}}),x0:u({},r.x0,{impliedEdits:{xtype:"scaled"}}),dx:u({},r.dx,{impliedEdits:{xtype:"scaled"}}),y:u({},r.y,{impliedEdits:{ytype:"array"}}),y0:u({},r.y0,{impliedEdits:{ytype:"scaled"}}),dy:u({},r.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:u({},r.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:u({},r.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:u({},r.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:u({},r.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:u({},r.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:u({},r.yperiodalignment,{impliedEdits:{ytype:"scaled"}}),text:{valType:"data_array",editType:"calc"},hovertext:{valType:"data_array",editType:"calc"},transpose:{valType:"boolean",dflt:!1,editType:"calc"},xtype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},ytype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},zsmooth:{valType:"enumerated",values:["fast","best",!1],dflt:!1,editType:"calc"},hoverongaps:{valType:"boolean",dflt:!0,editType:"none"},connectgaps:{valType:"boolean",editType:"calc"},xgap:{valType:"number",dflt:0,min:0,editType:"plot"},ygap:{valType:"number",dflt:0,min:0,editType:"plot"},xhoverformat:o("x"),yhoverformat:o("y"),zhoverformat:o("z",1),hovertemplate:s(),texttemplate:l({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),textfont:a({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:u({},i.showlegend,{dflt:!1})},{transforms:void 0},c("",{cLetter:"z",autoColorDflt:!1}))},90757:function(e,t,n){"use strict";var r=n(73972),i=n(71828),a=n(89298),o=n(42973),s=n(17562),l=n(78803),c=n(68296),u=n(4742),d=n(824),h=n(43907),f=n(70769),p=n(50606).BADNUM;function m(e){for(var t=[],n=e.length,r=0;rI){O("x scale is not linear");break}}if(x.length&&"fast"===R){var z=(x[x.length-1]-x[0])/(x.length-1),N=Math.abs(z/100);for(S=0;SN){O("y scale is not linear");break}}}var F=i.maxRowLength(A),B="scaled"===t.xtype?"":n,j=f(t,B,g,v,F,T),U="scaled"===t.ytype?"":x,V=f(t,U,b,_,A.length,k);D||(t._extremes[T._id]=a.findExtremes(T,j),t._extremes[k._id]=a.findExtremes(k,V));var H={x:j,y:V,z:A,text:t._text||t.text,hovertext:t._hovertext||t.hovertext};if(t.xperiodalignment&&y&&(H.orig_x=y),t.yperiodalignment&&w&&(H.orig_y=w),B&&B.length===j.length-1&&(H.xCenter=B),U&&U.length===V.length-1&&(H.yCenter=U),C&&(H.xRanges=M.xRanges,H.yRanges=M.yRanges,H.pts=M.pts),E||l(e,t,{vals:A,cLetter:"z"}),E&&t.contours&&"heatmap"===t.contours.coloring){var W={type:"contour"===t.type?"heatmap":"histogram2d",xcalendar:t.xcalendar,ycalendar:t.ycalendar};H.xfill=f(W,B,g,v,F,T),H.yfill=f(W,U,b,_,A.length,k)}return[H]}},4742:function(e,t,n){"use strict";var r=n(92770),i=n(71828),a=n(50606).BADNUM;e.exports=function(e,t,n,o){var s,l,c,u,d,h;function f(e){if(r(e))return+e}if(t&&t.transpose){for(s=0,d=0;d=0;o--)(s=((d[[(n=(a=h[o])[0])-1,i=a[1]]]||m)[2]+(d[[n+1,i]]||m)[2]+(d[[n,i-1]]||m)[2]+(d[[n,i+1]]||m)[2])/20)&&(l[a]=[n,i,s],h.splice(o,1),c=!0);if(!c)throw"findEmpties iterated with no new neighbors";for(a in l)d[a]=l[a],u.push(l[a])}return u.sort((function(e,t){return t[2]-e[2]}))}},46248:function(e,t,n){"use strict";var r=n(30211),i=n(71828),a=n(89298),o=n(21081).extractOpts;e.exports=function(e,t,n,s,l){l||(l={});var c,u,d,h,f=l.isContour,p=e.cd[0],m=p.trace,g=e.xa,v=e.ya,y=p.x,x=p.y,b=p.z,_=p.xCenter,w=p.yCenter,A=p.zmask,S=m.zhoverformat,M=y,T=x;if(!1!==e.index){try{d=Math.round(e.index[1]),h=Math.round(e.index[0])}catch(B){return void i.error("Error hovering on heatmap, pointNumber must be [row,col], found:",e.index)}if(d<0||d>=b[0].length||h<0||h>b.length)return}else{if(r.inbox(t-y[0],t-y[y.length-1],0)>0||r.inbox(n-x[0],n-x[x.length-1],0)>0)return;if(f){var k;for(M=[2*y[0]-y[1]],k=1;km&&(v=Math.max(v,Math.abs(e[a][o]-p)/(g-m))))}return v}e.exports=function(e,t){var n,i=1;for(o(e,t),n=0;n.01;n++)i=o(e,t,a(i));return i>.01&&r.log("interp2d didn't converge quickly",i),e}},58623:function(e,t,n){"use strict";var r=n(71828);e.exports=function(e,t){e("texttemplate");var n=r.extendFlat({},t.font,{color:"auto",size:"auto"});r.coerceFont(e,"textfont",n)}},70769:function(e,t,n){"use strict";var r=n(73972),i=n(71828).isArrayOrTypedArray;e.exports=function(e,t,n,a,o,s){var l,c,u,d=[],h=r.traceIs(e,"contour"),f=r.traceIs(e,"histogram"),p=r.traceIs(e,"gl2d");if(i(t)&&t.length>1&&!f&&"category"!==s.type){var m=t.length;if(!(m<=o))return h?t.slice(0,o):t.slice(0,o+1);if(h||p)d=t.slice(0,o);else if(1===o)d=[t[0]-.5,t[0]+.5];else{for(d=[1.5*t[0]-.5*t[1]],u=1;u0;)w=A.c2p(N[E]),E--;for(w0;)k=S.c2p(F[E]),E--;if(kqe||qe>S._length))for(C=Ve;C$e||$e>A._length)){var Xe=u({x:Ye,y:Ge},O,e._fullLayout);Xe.x=Ye,Xe.y=Ge;var Ze=P.z[E][C];void 0===Ze?(Xe.z="",Xe.zLabel=""):(Xe.z=Ze,Xe.zLabel=s.tickText(Fe,Ze,"hover").text);var Ke=P.text&&P.text[E]&&P.text[E][C];void 0!==Ke&&!1!==Ke||(Ke=""),Xe.text=Ke;var Je=l.texttemplateString(ze,Xe,e._fullLayout._d3locale,Xe,O._meta||{});if(Je){var Qe=Je.split("
"),et=Qe.length,tt=0;for(D=0;D0&&(a=!0);for(var l=0;la){var o=a-n[e];return n[e]=a,o}}return 0},max:function(e,t,n,i){var a=i[t];if(r(a)){if(a=Number(a),!r(n[e]))return n[e]=a,a;if(n[e]c?e>o?e>1.1*i?i:e>1.1*a?a:o:e>s?s:e>l?l:c:Math.pow(10,Math.floor(Math.log(e)/Math.LN10))}function f(e,t,n,r,a,s){if(r&&e>o){var l=p(t,a,s),c=p(n,a,s),u=e===i?0:1;return l[u]!==c[u]}return Math.floor(n/e)-Math.floor(t/e)>.1}function p(e,t,n){var r=t.c2d(e,i,n).split("-");return""===r[0]&&(r.unshift(),r[0]="-"+r[0]),r}e.exports=function(e,t,n,r,a){var s,l,c=-1.1*t,h=-.1*t,f=e-h,p=n[0],m=n[1],g=Math.min(d(p+h,p+f,r,a),d(m+h,m+f,r,a)),v=Math.min(d(p+c,p+h,r,a),d(m+c,m+h,r,a));if(g>v&&vo){var y=s===i?1:6,x=s===i?"M12":"M1";return function(t,n){var o=r.c2d(t,i,a),s=o.indexOf("-",y);s>0&&(o=o.substr(0,s));var c=r.d2c(o,0,a);if(cn.r2l(F)&&(j=o.tickIncrement(j,b.size,!0,f)),L.start=n.l2r(j),N||i.nestedProperty(t,v+".start").set(L.start)}var U=b.end,V=n.r2l(O.end),H=void 0!==V;if((b.endFound||H)&&V!==n.r2l(U)){var W=H?V:i.aggNums(Math.max,null,p);L.end=n.l2r(W),H||i.nestedProperty(t,v+".start").set(L.end)}var G="autobin"+s;return!1===t._input[G]&&(t._input[v]=i.extendFlat({},t[v]||{}),delete t._input[G],delete t[G]),[L,p]}e.exports={calc:function(e,t){var n,a,f,p,m=[],g=[],v="h"===t.orientation,y=o.getFromId(e,v?t.yaxis:t.xaxis),x=v?"y":"x",b={x:"y",y:"x"}[x],_=t[x+"calendar"],w=t.cumulative,A=h(e,t,y,x),S=A[0],M=A[1],T="string"===typeof S.size,k=[],E=T?k:S,C=[],D=[],R=[],P=0,O=t.histnorm,L=t.histfunc,I=-1!==O.indexOf("density");w.enabled&&I&&(O=O.replace(/ ?density$/,""),I=!1);var z,N="max"===L||"min"===L?null:0,F=l.count,B=c[O],j=!1,U=function(e){return y.r2c(e,0,_)};for(i.isArrayOrTypedArray(t[b])&&"count"!==L&&(z=t[b],j="avg"===L,F=l[L]),n=U(S.start),f=U(S.end)+(n-o.tickIncrement(n,S.size,!1,_))/1e6;n=0&&p=0;r--)s(r);else if("increasing"===t){for(r=1;r=0;r--)e[r]+=e[r+1];"exclude"===n&&(e.push(0),e.shift())}}(g,w.direction,w.currentbin);var K=Math.min(m.length,g.length),J=[],Q=0,ee=K-1;for(n=0;n=Q;n--)if(g[n]){ee=n;break}for(n=Q;n<=ee;n++)if(r(m[n])&&r(g[n])){var te={p:m[n],s:g[n],b:0};w.enabled||(te.pts=R[n],q?te.ph0=te.ph1=R[n].length?M[R[n][0]]:m[n]:(t._computePh=!0,te.ph0=W(k[n]),te.ph1=W(k[n+1],!0))),J.push(te)}return 1===J.length&&(J[0].width1=o.tickIncrement(J[0].p,S.size,!1,_)-J[0].p),s(J,t),i.isArrayOrTypedArray(t.selectedpoints)&&i.tagSelected(J,t,X),J},calcAllAutoBins:h}},72406:function(e){"use strict";e.exports={eventDataKeys:["binNumber"]}},82222:function(e,t,n){"use strict";var r=n(71828),i=n(41675),a=n(73972).traceIs,o=n(26125),s=r.nestedProperty,l=n(99082).getAxisGroup,c=[{aStr:{x:"xbins.start",y:"ybins.start"},name:"start"},{aStr:{x:"xbins.end",y:"ybins.end"},name:"end"},{aStr:{x:"xbins.size",y:"ybins.size"},name:"size"},{aStr:{x:"nbinsx",y:"nbinsy"},name:"nbins"}],u=["x","y"];e.exports=function(e,t){var n,d,h,f,p,m,g,v=t._histogramBinOpts={},y=[],x={},b=[];function _(e,t){return r.coerce(n._input,n,n._module.attributes,e,t)}function w(e){return"v"===e.orientation?"x":"y"}function A(e,n,a){var o=e.uid+"__"+a;n||(n=o);var s=function(e,n){return i.getFromTrace({_fullLayout:t},e,n).type}(e,a),l=e[a+"calendar"]||"",c=v[n],u=!0;c&&(s===c.axType&&l===c.calendar?(u=!1,c.traces.push(e),c.dirs.push(a)):(n=o,s!==c.axType&&r.warn(["Attempted to group the bins of trace",e.index,"set on a","type:"+s,"axis","with bins on","type:"+c.axType,"axis."].join(" ")),l!==c.calendar&&r.warn(["Attempted to group the bins of trace",e.index,"set with a",l,"calendar","with bins",c.calendar?"on a "+c.calendar+" calendar":"w/o a set calendar"].join(" ")))),u&&(v[n]={traces:[e],dirs:[a],axType:s,calendar:e[a+"calendar"]||""}),e["_"+a+"bingroup"]=n}for(p=0;pk&&A.splice(k,A.length-k),T.length>k&&T.splice(k,T.length-k);var E=[],C=[],D=[],R="string"===typeof w.size,P="string"===typeof M.size,O=[],L=[],I=R?O:w,z=P?L:M,N=0,F=[],B=[],j=t.histnorm,U=t.histfunc,V=-1!==j.indexOf("density"),H="max"===U||"min"===U?null:0,W=a.count,G=o[j],q=!1,Y=[],$=[],X="z"in t?t.z:"marker"in t&&Array.isArray(t.marker.color)?t.marker.color:"";X&&"count"!==U&&(q="avg"===U,W=a[U]);var Z=w.size,K=x(w.start),J=x(w.end)+(K-i.tickIncrement(K,Z,!1,v))/1e6;for(n=K;n=0&&f=0&&p-1,flipY:D.tiling.flip.indexOf("y")>-1,orientation:D.tiling.orientation,pad:{inner:D.tiling.pad},maxDepth:D._maxDepth}).descendants(),I=1/0,z=-1/0;L.forEach((function(e){var t=e.depth;t>=D._maxDepth?(e.x0=e.x1=(e.x0+e.x1)/2,e.y0=e.y1=(e.y0+e.y1)/2):(I=Math.min(I,t),z=Math.max(z,t))})),p=p.data(L,u.getPtId),D._maxVisibleLayers=isFinite(z)?z-I+1:0,p.enter().append("g").classed("slice",!0),S(p,f,{},[g,v],b),p.order();var N=null;if(A&&k){var F=u.getPtId(k);p.each((function(e){null===N&&u.getPtId(e)===F&&(N={x0:e.x0,x1:e.x1,y0:e.y0,y1:e.y1})}))}var B=function(){return N||{x0:0,x1:g,y0:0,y1:v}},j=p;return A&&(j=j.transition().each("end",(function(){var t=r.select(this);u.setSliceCursor(t,e,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}))),j.each((function(s){s._x0=y(s.x0),s._x1=y(s.x1),s._y0=x(s.y0),s._y1=x(s.y1),s._hoverX=y(s.x1-D.tiling.pad),s._hoverY=x(O?s.y1-D.tiling.pad/2:s.y0+D.tiling.pad/2);var p=r.select(this),m=i.ensureSingle(p,"path","surface",(function(e){e.style("pointer-events",E?"none":"all")}));A?m.transition().attrTween("d",(function(e){var t=M(e,f,B(),[g,v],{orientation:D.tiling.orientation,flipX:D.tiling.flip.indexOf("x")>-1,flipY:D.tiling.flip.indexOf("y")>-1});return function(e){return b(t(e))}})):m.attr("d",b),p.call(d,n,e,t,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,e,{isTransitioning:e._transitioning}),m.call(l,s,D,{hovered:!1}),s.x0===s.x1||s.y0===s.y1?s._text="":s._text=h(s,n,D,t,C)||"";var S=i.ensureSingle(p,"g","slicetext"),k=i.ensureSingle(S,"text","",(function(e){e.attr("data-notex",1)})),L=i.ensureUniformFontSize(e,u.determineTextFont(D,s,C.font));k.text(s._text||" ").classed("slicetext",!0).attr("text-anchor",P?"end":R?"start":"middle").call(a.font,L).call(o.convertToTspans,e),s.textBB=a.bBox(k.node()),s.transform=_(s,{fontSize:L.size}),s.transform.fontSize=L.size,A?k.transition().attrTween("transform",(function(e){var t=T(e,f,B(),[g,v]);return function(e){return w(t(e))}})):k.attr("transform",w(s))})),N}},69816:function(e,t,n){"use strict";e.exports={moduleType:"trace",name:"icicle",basePlotModule:n(96346),categories:[],animatable:!0,attributes:n(46291),layoutAttributes:n(92894),supplyDefaults:n(56524),supplyLayoutDefaults:n(21070),calc:n(46584).y,crossTraceCalc:n(46584).T,plot:n(85596),style:n(82454).style,colorbar:n(4898),meta:{}}},92894:function(e){"use strict";e.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}},21070:function(e,t,n){"use strict";var r=n(71828),i=n(92894);e.exports=function(e,t){function n(n,a){return r.coerce(e,t,i,n,a)}n("iciclecolorway",t.colorway),n("extendiciclecolors")}},21538:function(e,t,n){"use strict";var r=n(674),i=n(14102);e.exports=function(e,t,n){var a=n.flipX,o=n.flipY,s="h"===n.orientation,l=n.maxDepth,c=t[0],u=t[1];l&&(c=(e.height+1)*t[0]/Math.min(e.height+1,l),u=(e.height+1)*t[1]/Math.min(e.height+1,l));var d=r.partition().padding(n.pad.inner).size(s?[t[1],c]:[t[0],u])(e);return(s||a||o)&&i(d,t,{swapXY:s,flipX:a,flipY:o}),d}},85596:function(e,t,n){"use strict";var r=n(80694),i=n(90666);e.exports=function(e,t,n,a){return r(e,t,n,a,{type:"icicle",drawDescendants:i})}},82454:function(e,t,n){"use strict";var r=n(39898),i=n(7901),a=n(71828),o=n(72597).resizeText;function s(e,t,n){var r=t.data.data,o=!t.children,s=r.i,l=a.castOption(n,s,"marker.line.color")||i.defaultLine,c=a.castOption(n,s,"marker.line.width")||0;e.style("stroke-width",c).call(i.fill,r.color).call(i.stroke,l).style("opacity",o?n.leaf.opacity:null)}e.exports={style:function(e){var t=e._fullLayout._iciclelayer.selectAll(".trace");o(e,t,"icicle"),t.each((function(e){var t=r.select(this),n=e[0].trace;t.style("opacity",n.opacity),t.selectAll("path.surface").each((function(e){r.select(this).call(s,e,n)}))}))},styleOne:s}},17230:function(e,t,n){"use strict";for(var r=n(9012),i=n(5386).f,a=n(1426).extendFlat,o=n(51877).colormodel,s=["rgb","rgba","rgba256","hsl","hsla"],l=[],c=[],u=0;u0||r.inbox(n-o.y0,n-(o.y0+o.h*s.dy),0)>0)){var u,d=Math.floor((t-o.x0)/s.dx),h=Math.floor(Math.abs(n-o.y0)/s.dy);if(s._hasZ?u=o.z[h][d]:s._hasSource&&(u=s._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(d,h,1,1).data),u){var f,p=o.hi||s.hoverinfo;if(p){var m=p.split("+");-1!==m.indexOf("all")&&(m=["color"]),-1!==m.indexOf("color")&&(f=!0)}var g,v=a.colormodel[s.colormodel],y=v.colormodel||s.colormodel,x=y.length,b=s._scaler(u),_=v.suffix,w=[];(s.hovertemplate||f)&&(w.push("["+[b[0]+_[0],b[1]+_[1],b[2]+_[2]].join(", ")),4===x&&w.push(", "+b[3]+_[3]),w.push("]"),w=w.join(""),e.extraText=y.toUpperCase()+": "+w),Array.isArray(s.hovertext)&&Array.isArray(s.hovertext[h])?g=s.hovertext[h][d]:Array.isArray(s.text)&&Array.isArray(s.text[h])&&(g=s.text[h][d]);var A=c.c2p(o.y0+(h+.5)*s.dy),S=o.x0+(d+.5)*s.dx,M=o.y0+(h+.5)*s.dy,T="["+u.slice(0,s.colormodel.length).join(", ")+"]";return[i.extendFlat(e,{index:[h,d],x0:l.c2p(o.x0+d*s.dx),x1:l.c2p(o.x0+(d+1)*s.dx),y0:A,y1:A,color:b,xVal:S,xLabelVal:S,yVal:M,yLabelVal:M,zLabelVal:T,text:g,hovertemplateLabels:{zLabel:T,colorLabel:w,"color[0]Label":b[0]+_[0],"color[1]Label":b[1]+_[1],"color[2]Label":b[2]+_[2],"color[3]Label":b[3]+_[3]}})]}}}},94507:function(e,t,n){"use strict";e.exports={attributes:n(17230),supplyDefaults:n(13245),calc:n(71113),plot:n(60775),style:n(12826),hoverPoints:n(28749),eventData:n(30835),moduleType:"trace",name:"image",basePlotModule:n(93612),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}},60775:function(e,t,n){"use strict";var r=n(39898),i=n(71828),a=i.strTranslate,o=n(77922),s=n(51877),l=i.isIOS()||i.isSafari()||i.isIE();e.exports=function(e,t,n,c){var u=t.xaxis,d=t.yaxis,h=!(l||e._context._exportedPlot);i.makeTraceGroups(c,n,"im").each((function(t){var n=r.select(this),l=t[0],c=l.trace,f=("fast"===c.zsmooth||!1===c.zsmooth&&h)&&!c._hasZ&&c._hasSource&&"linear"===u.type&&"linear"===d.type;c._realImage=f;var p,m,g,v,y,x,b=l.z,_=l.x0,w=l.y0,A=l.w,S=l.h,M=c.dx,T=c.dy;for(x=0;void 0===p&&x0;)m=u.c2p(_+x*M),x--;for(x=0;void 0===v&&x0;)y=d.c2p(w+x*T),x--;if(mP[0];if(O||L){var I=p+k/2,z=v+E/2;D+="transform:"+a(I+"px",z+"px")+"scale("+(O?-1:1)+","+(L?-1:1)+")"+a(-I+"px",-z+"px")+";"}}C.attr("style",D);var N=new Promise((function(e){if(c._hasZ)e();else if(c._hasSource)if(c._canvas&&c._canvas.el.width===A&&c._canvas.el.height===S&&c._canvas.source===c.source)e();else{var t=document.createElement("canvas");t.width=A,t.height=S;var n=t.getContext("2d",{willReadFrequently:!0});c._image=c._image||new Image;var r=c._image;r.onload=function(){n.drawImage(r,0,0),c._canvas={el:t,source:c.source},e()},r.setAttribute("src",c.source)}})).then((function(){var e,t;if(c._hasZ)t=F((function(e,t){return b[t][e]})),e=t.toDataURL("image/png");else if(c._hasSource)if(f)e=c.source;else{var n=c._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(0,0,A,S).data;t=F((function(e,t){var r=4*(t*A+e);return[n[r],n[r+1],n[r+2],n[r+3]]})),e=t.toDataURL("image/png")}C.attr({"xlink:href":e,height:E,width:k,x:p,y:v})}));e._promises.push(N)}function F(e){var t=document.createElement("canvas");t.width=k,t.height=E;var n,r=t.getContext("2d",{willReadFrequently:!0}),a=function(e){return i.constrain(Math.round(u.c2p(_+e*M)-p),0,k)},o=function(e){return i.constrain(Math.round(d.c2p(w+e*T)-v),0,E)},h=s.colormodel[c.colormodel],f=h.colormodel||c.colormodel,m=h.fmt;for(x=0;x0}function A(e){e.each((function(e){y.stroke(r.select(this),e.line.color)})).each((function(e){y.fill(r.select(this),e.color)})).style("stroke-width",(function(e){return e.line.width}))}function S(e,t,n){var r=e._fullLayout,i=o.extendFlat({type:"linear",ticks:"outside",range:n,showline:!0},t),a={type:"linear",_id:"x"+t._id},s={letter:"x",font:r.font,noHover:!0,noTickson:!0};function l(e,t){return o.coerce(i,a,v,e,t)}return m(i,a,l,s,r),g(i,a,l,s),a}function M(e,t,n){return[Math.min(t/e.width,n/e.height),e,t+"x"+n]}function T(e,t,n,i){var a=document.createElementNS("http://www.w3.org/2000/svg","text"),o=r.select(a);return o.text(e).attr("x",0).attr("y",0).attr("text-anchor",n).attr("data-unformatted",e).call(f.convertToTspans,i).call(d.font,t),d.bBox(o.node())}function k(e,t,n,r,i,a){var s="_cache"+t;e[s]&&e[s].key===i||(e[s]={key:i,value:n});var l=o.aggNums(a,null,[e[s].value,r],2);return e[s].value=l,l}e.exports=function(e,t,n,m){var g,v=e._fullLayout;w(n)&&m&&(g=m()),o.makeTraceGroups(v._indicatorlayer,t,"trace").each((function(t){var m,E,C,D,R,P=t[0].trace,O=r.select(this),L=P._hasGauge,I=P._isAngular,z=P._isBullet,N=P.domain,F={w:v._size.w*(N.x[1]-N.x[0]),h:v._size.h*(N.y[1]-N.y[0]),l:v._size.l+v._size.w*N.x[0],r:v._size.r+v._size.w*(1-N.x[1]),t:v._size.t+v._size.h*(1-N.y[1]),b:v._size.b+v._size.h*N.y[0]},B=F.l+F.w/2,j=F.t+F.h/2,U=Math.min(F.w/2,F.h),V=h.innerRadius*U,H=P.align||"center";if(E=j,L){if(I&&(m=B,E=j+U/2,C=function(e){return function(e,t){var n=Math.sqrt(e.width/2*(e.width/2)+e.height*e.height),r=t/n;return[r,e,t]}(e,.9*V)}),z){var W=h.bulletPadding,G=1-h.bulletNumberDomainSize+W;m=F.l+(G+(1-G)*b[H])*F.w,C=function(e){return M(e,(h.bulletNumberDomainSize-W)*F.w,F.h)}}}else m=F.l+b[H]*F.w,C=function(e){return M(e,F.w,F.h)};!function(e,t,n,i){var c,u,h,m=n[0].trace,g=i.numbersX,v=i.numbersY,A=m.align||"center",M=x[A],E=i.transitionOpts,C=i.onComplete,D=o.ensureSingle(t,"g","numbers"),R=[];m._hasNumber&&R.push("number");m._hasDelta&&(R.push("delta"),"left"===m.delta.position&&R.reverse());var P=D.selectAll("text").data(R);function O(t,n,r,i){if(!t.match("s")||r>=0===i>=0||n(r).slice(-1).match(_)||n(i).slice(-1).match(_))return n;var a=t.slice().replace("s","f").replace(/\d+/,(function(e){return parseInt(e)-1})),o=S(e,{tickformat:a});return function(e){return Math.abs(e)<1?p.tickText(o,e).text:n(e)}}function L(){var t=S(e,{tickformat:m.number.valueformat},m._range);t.setScale(),p.prepTicks(t);var i=function(e){return p.tickText(t,e).text},o=m.number.suffix,s=m.number.prefix,l=D.select("text.number");function u(){var t="number"===typeof n[0].y?s+i(n[0].y)+o:"-";l.text(t).call(d.font,m.number.font).call(f.convertToTspans,e)}return w(E)?l.transition().duration(E.duration).ease(E.easing).each("end",(function(){u(),C&&C()})).each("interrupt",(function(){u(),C&&C()})).attrTween("text",(function(){var e=r.select(this),t=a(n[0].lastY,n[0].y);m._lastValue=n[0].y;var l=O(m.number.valueformat,i,n[0].lastY,n[0].y);return function(n){e.text(s+l(t(n))+o)}})):u(),c=T(s+i(n[0].y)+o,m.number.font,M,e),l}function I(){var t=S(e,{tickformat:m.delta.valueformat},m._range);t.setScale(),p.prepTicks(t);var i=function(e){return p.tickText(t,e).text},o=m.delta.suffix,s=m.delta.prefix,l=function(e){return m.delta.relative?e.relativeDelta:e.delta},c=function(e,t){return 0===e||"number"!==typeof e||isNaN(e)?"-":(e>0?m.delta.increasing.symbol:m.delta.decreasing.symbol)+s+t(e)+o},h=function(e){return e.delta>=0?m.delta.increasing.color:m.delta.decreasing.color};void 0===m._deltaLastValue&&(m._deltaLastValue=l(n[0]));var g=D.select("text.delta");function v(){g.text(c(l(n[0]),i)).call(y.fill,h(n[0])).call(f.convertToTspans,e)}return g.call(d.font,m.delta.font).call(y.fill,h({delta:m._deltaLastValue})),w(E)?g.transition().duration(E.duration).ease(E.easing).tween("text",(function(){var e=r.select(this),t=l(n[0]),o=m._deltaLastValue,s=O(m.delta.valueformat,i,o,t),u=a(o,t);return m._deltaLastValue=t,function(t){e.text(c(u(t),s)),e.call(y.fill,h({delta:u(t)}))}})).each("end",(function(){v(),C&&C()})).each("interrupt",(function(){v(),C&&C()})):v(),u=T(c(l(n[0]),i),m.delta.font,M,e),g}P.enter().append("text"),P.attr("text-anchor",(function(){return M})).attr("class",(function(e){return e})).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),P.exit().remove();var z,N=m.mode+m.align;m._hasDelta&&(z=I(),N+=m.delta.position+m.delta.font.size+m.delta.font.family+m.delta.valueformat,N+=m.delta.increasing.symbol+m.delta.decreasing.symbol,h=u);m._hasNumber&&(L(),N+=m.number.font.size+m.number.font.family+m.number.valueformat+m.number.suffix+m.number.prefix,h=c);if(m._hasDelta&&m._hasNumber){var F,B,j=[(c.left+c.right)/2,(c.top+c.bottom)/2],U=[(u.left+u.right)/2,(u.top+u.bottom)/2],V=.75*m.delta.font.size;"left"===m.delta.position&&(F=k(m,"deltaPos",0,-1*(c.width*b[m.align]+u.width*(1-b[m.align])+V),N,Math.min),B=j[1]-U[1],h={width:c.width+u.width+V,height:Math.max(c.height,u.height),left:u.left+F,right:c.right,top:Math.min(c.top,u.top+B),bottom:Math.max(c.bottom,u.bottom+B)}),"right"===m.delta.position&&(F=k(m,"deltaPos",0,c.width*(1-b[m.align])+u.width*b[m.align]+V,N,Math.max),B=j[1]-U[1],h={width:c.width+u.width+V,height:Math.max(c.height,u.height),left:c.left,right:u.right+F,top:Math.min(c.top,u.top+B),bottom:Math.max(c.bottom,u.bottom+B)}),"bottom"===m.delta.position&&(F=null,B=u.height,h={width:Math.max(c.width,u.width),height:c.height+u.height,left:Math.min(c.left,u.left),right:Math.max(c.right,u.right),top:c.bottom-c.height,bottom:c.bottom+u.height}),"top"===m.delta.position&&(F=null,B=c.top,h={width:Math.max(c.width,u.width),height:c.height+u.height,left:Math.min(c.left,u.left),right:Math.max(c.right,u.right),top:c.bottom-c.height-u.height,bottom:c.bottom}),z.attr({dx:F,dy:B})}(m._hasNumber||m._hasDelta)&&D.attr("transform",(function(){var e=i.numbersScaler(h);N+=e[2];var t,n=k(m,"numbersScale",1,e[0],N,Math.min);m._scaleNumbers||(n=1),t=m._isAngular?v-n*h.bottom:v-n*(h.top+h.bottom)/2,m._numbersTop=n*h.top+t;var r=h[A];"center"===A&&(r=(h.left+h.right)/2);var a=g-n*r;return a=k(m,"numbersTranslate",0,a,N,Math.max),l(a,t)+s(n)}))}(e,O,t,{numbersX:m,numbersY:E,numbersScaler:C,transitionOpts:n,onComplete:g}),L&&(D={range:P.gauge.axis.range,color:P.gauge.bgcolor,line:{color:P.gauge.bordercolor,width:0},thickness:1},R={range:P.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:P.gauge.bordercolor,width:P.gauge.borderwidth},thickness:1});var q=O.selectAll("g.angular").data(I?t:[]);q.exit().remove();var Y=O.selectAll("g.angularaxis").data(I?t:[]);Y.exit().remove(),I&&function(e,t,n,a){var o,s,d,h,f=n[0].trace,m=a.size,g=a.radius,v=a.innerRadius,y=a.gaugeBg,x=a.gaugeOutline,b=[m.l+m.w/2,m.t+m.h/2+g/2],_=a.gauge,M=a.layer,T=a.transitionOpts,k=a.onComplete,E=Math.PI/2;function C(e){var t=f.gauge.axis.range[0],n=(e-t)/(f.gauge.axis.range[1]-t)*Math.PI-E;return n<-E?-E:n>E?E:n}function D(e){return r.svg.arc().innerRadius((v+g)/2-e/2*(g-v)).outerRadius((v+g)/2+e/2*(g-v)).startAngle(-E)}function R(e){e.attr("d",(function(e){return D(e.thickness).startAngle(C(e.range[0])).endAngle(C(e.range[1]))()}))}_.enter().append("g").classed("angular",!0),_.attr("transform",l(b[0],b[1])),M.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),M.selectAll("g.xangularaxistick,path,text").remove(),o=S(e,f.gauge.axis),o.type="linear",o.range=f.gauge.axis.range,o._id="xangularaxis",o.ticklabeloverflow="allow",o.setScale();var P=function(e){return(o.range[0]-e.x)/(o.range[1]-o.range[0])*Math.PI+Math.PI},O={},L=p.makeLabelFns(o,0).labelStandoff;O.xFn=function(e){var t=P(e);return Math.cos(t)*L},O.yFn=function(e){var t=P(e),n=Math.sin(t)>0?.2:1;return-Math.sin(t)*(L+e.fontSize*n)+Math.abs(Math.cos(t))*(e.fontSize*u)},O.anchorFn=function(e){var t=P(e),n=Math.cos(t);return Math.abs(n)<.1?"middle":n>0?"start":"end"},O.heightFn=function(e,t,n){var r=P(e);return-.5*(1+Math.sin(r))*n};var I=function(e){return l(b[0]+g*Math.cos(e),b[1]-g*Math.sin(e))};d=function(e){return I(P(e))};var z=function(e){var t=P(e);return I(t)+"rotate("+-c(t)+")"};if(s=p.calcTicks(o),h=p.getTickSigns(o)[2],o.visible){h="inside"===o.ticks?-1:1;var N=(o.linewidth||1)/2;p.drawTicks(e,o,{vals:s,layer:M,path:"M"+h*N+",0h"+h*o.ticklen,transFn:z}),p.drawLabels(e,o,{vals:s,layer:M,transFn:d,labelFns:O})}var F=[y].concat(f.gauge.steps),B=_.selectAll("g.bg-arc").data(F);B.enter().append("g").classed("bg-arc",!0).append("path"),B.select("path").call(R).call(A),B.exit().remove();var j=D(f.gauge.bar.thickness),U=_.selectAll("g.value-arc").data([f.gauge.bar]);U.enter().append("g").classed("value-arc",!0).append("path");var V=U.select("path");w(T)?(V.transition().duration(T.duration).ease(T.easing).each("end",(function(){k&&k()})).each("interrupt",(function(){k&&k()})).attrTween("d",(H=j,W=C(n[0].lastY),G=C(n[0].y),function(){var e=i(W,G);return function(t){return H.endAngle(e(t))()}})),f._lastValue=n[0].y):V.attr("d","number"===typeof n[0].y?j.endAngle(C(n[0].y)):"M0,0Z");var H,W,G;V.call(A),U.exit().remove(),F=[];var q=f.gauge.threshold.value;(q||0===q)&&F.push({range:[q,q],color:f.gauge.threshold.color,line:{color:f.gauge.threshold.line.color,width:f.gauge.threshold.line.width},thickness:f.gauge.threshold.thickness});var Y=_.selectAll("g.threshold-arc").data(F);Y.enter().append("g").classed("threshold-arc",!0).append("path"),Y.select("path").call(R).call(A),Y.exit().remove();var $=_.selectAll("g.gauge-outline").data([x]);$.enter().append("g").classed("gauge-outline",!0).append("path"),$.select("path").call(R).call(A),$.exit().remove()}(e,0,t,{radius:U,innerRadius:V,gauge:q,layer:Y,size:F,gaugeBg:D,gaugeOutline:R,transitionOpts:n,onComplete:g});var $=O.selectAll("g.bullet").data(z?t:[]);$.exit().remove();var X=O.selectAll("g.bulletaxis").data(z?t:[]);X.exit().remove(),z&&function(e,t,n,r){var i,a,o,s,c,u=n[0].trace,d=r.gauge,f=r.layer,m=r.gaugeBg,g=r.gaugeOutline,v=r.size,x=u.domain,b=r.transitionOpts,_=r.onComplete;d.enter().append("g").classed("bullet",!0),d.attr("transform",l(v.l,v.t)),f.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),f.selectAll("g.xbulletaxistick,path,text").remove();var M=v.h,T=u.gauge.bar.thickness*M,k=x.x[0],E=x.x[0]+(x.x[1]-x.x[0])*(u._hasNumber||u._hasDelta?1-h.bulletNumberDomainSize:1);i=S(e,u.gauge.axis),i._id="xbulletaxis",i.domain=[k,E],i.setScale(),a=p.calcTicks(i),o=p.makeTransTickFn(i),s=p.getTickSigns(i)[2],c=v.t+v.h,i.visible&&(p.drawTicks(e,i,{vals:"inside"===i.ticks?p.clipEnds(i,a):a,layer:f,path:p.makeTickPath(i,c,s),transFn:o}),p.drawLabels(e,i,{vals:a,layer:f,transFn:o,labelFns:p.makeLabelFns(i,c)}));function C(e){e.attr("width",(function(e){return Math.max(0,i.c2p(e.range[1])-i.c2p(e.range[0]))})).attr("x",(function(e){return i.c2p(e.range[0])})).attr("y",(function(e){return.5*(1-e.thickness)*M})).attr("height",(function(e){return e.thickness*M}))}var D=[m].concat(u.gauge.steps),R=d.selectAll("g.bg-bullet").data(D);R.enter().append("g").classed("bg-bullet",!0).append("rect"),R.select("rect").call(C).call(A),R.exit().remove();var P=d.selectAll("g.value-bullet").data([u.gauge.bar]);P.enter().append("g").classed("value-bullet",!0).append("rect"),P.select("rect").attr("height",T).attr("y",(M-T)/2).call(A),w(b)?P.select("rect").transition().duration(b.duration).ease(b.easing).each("end",(function(){_&&_()})).each("interrupt",(function(){_&&_()})).attr("width",Math.max(0,i.c2p(Math.min(u.gauge.axis.range[1],n[0].y)))):P.select("rect").attr("width","number"===typeof n[0].y?Math.max(0,i.c2p(Math.min(u.gauge.axis.range[1],n[0].y))):0);P.exit().remove();var O=n.filter((function(){return u.gauge.threshold.value||0===u.gauge.threshold.value})),L=d.selectAll("g.threshold-bullet").data(O);L.enter().append("g").classed("threshold-bullet",!0).append("line"),L.select("line").attr("x1",i.c2p(u.gauge.threshold.value)).attr("x2",i.c2p(u.gauge.threshold.value)).attr("y1",(1-u.gauge.threshold.thickness)/2*M).attr("y2",(1-(1-u.gauge.threshold.thickness)/2)*M).call(y.stroke,u.gauge.threshold.line.color).style("stroke-width",u.gauge.threshold.line.width),L.exit().remove();var I=d.selectAll("g.gauge-outline").data([g]);I.enter().append("g").classed("gauge-outline",!0).append("rect"),I.select("rect").call(C).call(A),I.exit().remove()}(e,0,t,{gauge:$,layer:X,size:F,gaugeBg:D,gaugeOutline:R,transitionOpts:n,onComplete:g});var Z=O.selectAll("text.title").data(t);Z.exit().remove(),Z.enter().append("text").classed("title",!0),Z.attr("text-anchor",(function(){return z?x.right:x[P.title.align]})).text(P.title.text).call(d.font,P.title.font).call(f.convertToTspans,e),Z.attr("transform",(function(){var e,t=F.l+F.w*b[P.title.align],n=h.titlePadding,r=d.bBox(Z.node());if(L){if(I)if(P.gauge.axis.visible)e=d.bBox(Y.node()).top-n-r.bottom;else e=F.t+F.h/2-U/2-r.bottom-n;z&&(e=E-(r.top+r.bottom)/2,t=F.l-h.bulletPadding*F.w)}else e=P._numbersTop-n-r.bottom;return l(t,e)}))}))}},16249:function(e,t,n){"use strict";var r=n(50693),i=n(12663).axisHoverFormat,a=n(5386).f,o=n(2418),s=n(9012),l=n(1426).extendFlat,c=n(30962).overrideAll;var u=e.exports=c(l({x:{valType:"data_array"},y:{valType:"data_array"},z:{valType:"data_array"},value:{valType:"data_array"},isomin:{valType:"number"},isomax:{valType:"number"},surface:{show:{valType:"boolean",dflt:!0},count:{valType:"integer",dflt:2,min:1},fill:{valType:"number",min:0,max:1,dflt:1},pattern:{valType:"flaglist",flags:["A","B","C","D","E"],extras:["all","odd","even"],dflt:"all"}},spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:.15}},slices:{x:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}},y:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}},z:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}},caps:{x:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}},y:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}},z:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:a(),xhoverformat:i("x"),yhoverformat:i("y"),zhoverformat:i("z"),valuehoverformat:i("value",1),showlegend:l({},s.showlegend,{dflt:!1})},r("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:o.opacity,lightposition:o.lightposition,lighting:o.lighting,flatshading:o.flatshading,contour:o.contour,hoverinfo:l({},s.hoverinfo)}),"calc","nested");u.flatshading.dflt=!0,u.lighting.facenormalsepsilon.dflt=0,u.x.editType=u.y.editType=u.z.editType=u.value.editType="calc+clearAxisTypes",u.transforms=void 0},56959:function(e,t,n){"use strict";var r=n(78803),i=n(88489).processGrid,a=n(88489).filter;e.exports=function(e,t){t._len=Math.min(t.x.length,t.y.length,t.z.length,t.value.length),t._x=a(t.x,t._len),t._y=a(t.y,t._len),t._z=a(t.z,t._len),t._value=a(t.value,t._len);var n=i(t);t._gridFill=n.fill,t._Xs=n.Xs,t._Ys=n.Ys,t._Zs=n.Zs,t._len=n.len;for(var o=1/0,s=-1/0,l=0;l0;n--){var r=Math.min(t[n],t[n-1]),i=Math.max(t[n],t[n-1]);if(i>r&&r-1}function z(e,t){return null===e?t:e}function N(t,n,r){D();var i,a,o,l=[n],c=[r];if(s>=1)l=[n],c=[r];else if(s>0){var u=function(e,t){var n=e[0],r=e[1],i=e[2],a=function(e,t,n){for(var r=[],i=0;i-1?r[f]:C(p,m,v);h[f]=x>-1?x:P(p,m,v,z(t,y))}i=h[0],a=h[1],o=h[2],e._meshI.push(i),e._meshJ.push(a),e._meshK.push(o),++g}}function F(e,t,n,r){var i=e[3];ir&&(i=r);for(var a=(e[3]-i)/(e[3]-t[3]+1e-9),o=[],s=0;s<4;s++)o[s]=(1-a)*e[s]+a*t[s];return o}function B(e,t,n){return e>=t&&e<=n}function j(e){var t=.001*(E-k);return e>=k-t&&e<=E+t}function U(t){for(var n=[],r=0;r<4;r++){var i=t[r];n.push([e._x[i],e._y[i],e._z[i],e._value[i]])}return n}function V(e,t,n,r,i,a){a||(a=1),n=[-1,-1,-1];var o=!1,s=[B(t[0][3],r,i),B(t[1][3],r,i),B(t[2][3],r,i)];if(!s[0]&&!s[1]&&!s[2])return!1;var l=function(e,t,n){return j(t[0][3])&&j(t[1][3])&&j(t[2][3])?(N(e,t,n),!0):a<3&&V(e,t,n,k,E,++a)};if(s[0]&&s[1]&&s[2])return l(e,t,n)||o;var c=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach((function(a){if(s[a[0]]&&s[a[1]]&&!s[a[2]]){var u=t[a[0]],d=t[a[1]],h=t[a[2]],f=F(h,u,r,i),p=F(h,d,r,i);o=l(e,[p,f,u],[-1,-1,n[a[0]]])||o,o=l(e,[u,d,p],[n[a[0]],n[a[1]],-1])||o,c=!0}})),c||[[0,1,2],[1,2,0],[2,0,1]].forEach((function(a){if(s[a[0]]&&!s[a[1]]&&!s[a[2]]){var u=t[a[0]],d=t[a[1]],h=t[a[2]],f=F(d,u,r,i),p=F(h,u,r,i);o=l(e,[p,f,u],[-1,-1,n[a[0]]])||o,c=!0}})),o}function H(e,t,n,r){var i=!1,a=U(t),o=[B(a[0][3],n,r),B(a[1][3],n,r),B(a[2][3],n,r),B(a[3][3],n,r)];if(!o[0]&&!o[1]&&!o[2]&&!o[3])return i;if(o[0]&&o[1]&&o[2]&&o[3])return m&&(i=function(e,t,n){var r=function(r,i,a){N(e,[t[r],t[i],t[a]],[n[r],n[i],n[a]])};r(0,1,2),r(3,0,1),r(2,3,0),r(1,2,3)}(e,a,t)||i),i;var s=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach((function(l){if(o[l[0]]&&o[l[1]]&&o[l[2]]&&!o[l[3]]){var c=a[l[0]],u=a[l[1]],d=a[l[2]],h=a[l[3]];if(m)i=N(e,[c,u,d],[t[l[0]],t[l[1]],t[l[2]]])||i;else{var f=F(h,c,n,r),p=F(h,u,n,r),g=F(h,d,n,r);i=N(null,[f,p,g],[-1,-1,-1])||i}s=!0}})),s?i:([[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2],[0,2,3,1],[1,3,2,0]].forEach((function(l){if(o[l[0]]&&o[l[1]]&&!o[l[2]]&&!o[l[3]]){var c=a[l[0]],u=a[l[1]],d=a[l[2]],h=a[l[3]],f=F(d,c,n,r),p=F(d,u,n,r),g=F(h,u,n,r),v=F(h,c,n,r);m?(i=N(e,[c,v,f],[t[l[0]],-1,-1])||i,i=N(e,[u,p,g],[t[l[1]],-1,-1])||i):i=function(e,t,n){var r=function(r,i,a){N(e,[t[r],t[i],t[a]],[n[r],n[i],n[a]])};r(0,1,2),r(2,3,0)}(null,[f,p,g,v],[-1,-1,-1,-1])||i,s=!0}})),s||[[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach((function(l){if(o[l[0]]&&!o[l[1]]&&!o[l[2]]&&!o[l[3]]){var c=a[l[0]],u=a[l[1]],d=a[l[2]],h=a[l[3]],f=F(u,c,n,r),p=F(d,c,n,r),g=F(h,c,n,r);m?(i=N(e,[c,f,p],[t[l[0]],-1,-1])||i,i=N(e,[c,p,g],[t[l[0]],-1,-1])||i,i=N(e,[c,g,f],[t[l[0]],-1,-1])||i):i=N(null,[f,p,g],[-1,-1,-1])||i,s=!0}})),i)}function W(e,t,n,r,i,a,o,s,l,c,u){var d=!1;return p&&(I(e,"A")&&(d=H(null,[t,n,r,a],c,u)||d),I(e,"B")&&(d=H(null,[n,r,i,l],c,u)||d),I(e,"C")&&(d=H(null,[n,a,o,l],c,u)||d),I(e,"D")&&(d=H(null,[r,a,s,l],c,u)||d),I(e,"E")&&(d=H(null,[n,r,a,l],c,u)||d)),m&&(d=H(e,[n,r,a,l],c,u)||d),d}function G(e,t,n,r,i,a,o,s){return[!0===s[0]||V(e,U([t,n,r]),[t,n,r],a,o),!0===s[1]||V(e,U([r,i,t]),[r,i,t],a,o)]}function q(e,t,n,r,i,a,o,s,l){return s?G(e,t,n,i,r,a,o,l):G(e,n,i,r,t,a,o,l)}function Y(e,t,n,r,i,a,o){var s,l,c,u,d=!1,h=function(){d=V(e,[s,l,c],[-1,-1,-1],i,a)||d,d=V(e,[c,u,s],[-1,-1,-1],i,a)||d},f=o[0],p=o[1],m=o[2];return f&&(s=O(U([S(t,n-0,r-0)])[0],U([S(t-1,n-0,r-0)])[0],f),l=O(U([S(t,n-0,r-1)])[0],U([S(t-1,n-0,r-1)])[0],f),c=O(U([S(t,n-1,r-1)])[0],U([S(t-1,n-1,r-1)])[0],f),u=O(U([S(t,n-1,r-0)])[0],U([S(t-1,n-1,r-0)])[0],f),h()),p&&(s=O(U([S(t-0,n,r-0)])[0],U([S(t-0,n-1,r-0)])[0],p),l=O(U([S(t-0,n,r-1)])[0],U([S(t-0,n-1,r-1)])[0],p),c=O(U([S(t-1,n,r-1)])[0],U([S(t-1,n-1,r-1)])[0],p),u=O(U([S(t-1,n,r-0)])[0],U([S(t-1,n-1,r-0)])[0],p),h()),m&&(s=O(U([S(t-0,n-0,r)])[0],U([S(t-0,n-0,r-1)])[0],m),l=O(U([S(t-0,n-1,r)])[0],U([S(t-0,n-1,r-1)])[0],m),c=O(U([S(t-1,n-1,r)])[0],U([S(t-1,n-1,r-1)])[0],m),u=O(U([S(t-1,n-0,r)])[0],U([S(t-1,n-0,r-1)])[0],m),h()),d}function $(e,t,n,r,i,a,o,s,l,c,u,d){var h=e;return d?(p&&"even"===e&&(h=null),W(h,t,n,r,i,a,o,s,l,c,u)):(p&&"odd"===e&&(h=null),W(h,l,s,o,a,i,r,n,t,c,u))}function X(e,t,n,r,i){for(var a=[],o=0,s=0;sMath.abs(A-T)?[M,A]:[A,T];Q(n,C[0],C[1])}}var D=[[Math.min(k,T),Math.max(k,T)],[Math.min(M,E),Math.max(M,E)]];["x","y","z"].forEach((function(n){for(var r=[],i=0;i0&&(d.push(p.id),"x"===n?h.push([p.distRatio,0,0]):"y"===n?h.push([0,p.distRatio,0]):h.push([0,0,p.distRatio]))}else u=re(1,"x"===n?b-1:"y"===n?_-1:w-1);d.length>0&&(r[a]="x"===n?ee(t,d,o,s,h,r[a]):"y"===n?te(t,d,o,s,h,r[a]):ne(t,d,o,s,h,r[a]),a++),u.length>0&&(r[a]="x"===n?X(t,u,o,s,r[a]):"y"===n?Z(t,u,o,s,r[a]):K(t,u,o,s,r[a]),a++)}var m=e.caps[n];m.show&&m.fill&&(L(m.fill),r[a]="x"===n?X(t,[0,b-1],o,s,r[a]):"y"===n?Z(t,[0,_-1],o,s,r[a]):K(t,[0,w-1],o,s,r[a]),a++)}})),0===g&&R(),e._meshX=r,e._meshY=i,e._meshZ=a,e._meshIntensity=o,e._Xs=v,e._Ys=y,e._Zs=x}(),e}e.exports={findNearestOnAxis:l,generateIsoMeshes:h,createIsosurfaceTrace:function(e,t){var n=e.glplot.gl,i=r({gl:n}),a=new c(e,i,t.uid);return i._trace=a,a.update(t),e.glplot.add(i),a}}},82738:function(e,t,n){"use strict";var r=n(71828),i=n(73972),a=n(16249),o=n(1586);function s(e,t,n,r,a){var s=a("isomin"),l=a("isomax");void 0!==l&&null!==l&&void 0!==s&&null!==s&&s>l&&(t.isomin=null,t.isomax=null);var c=a("x"),u=a("y"),d=a("z"),h=a("value");c&&c.length&&u&&u.length&&d&&d.length&&h&&h.length?(i.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y","z"],r),a("valuehoverformat"),["x","y","z"].forEach((function(e){a(e+"hoverformat");var t="caps."+e;a(t+".show")&&a(t+".fill");var n="slices."+e;a(n+".show")&&(a(n+".fill"),a(n+".locations"))})),a("spaceframe.show")&&a("spaceframe.fill"),a("surface.show")&&(a("surface.count"),a("surface.fill"),a("surface.pattern")),a("contour.show")&&(a("contour.color"),a("contour.width")),["text","hovertext","hovertemplate","lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","opacity"].forEach((function(e){a(e)})),o(e,t,r,a,{prefix:"",cLetter:"c"}),t._length=null):t.visible=!1}e.exports={supplyDefaults:function(e,t,n,i){s(e,t,n,i,(function(n,i){return r.coerce(e,t,a,n,i)}))},supplyIsoDefaults:s}},64943:function(e,t,n){"use strict";e.exports={attributes:n(16249),supplyDefaults:n(82738).supplyDefaults,calc:n(56959),colorbar:{min:"cmin",max:"cmax"},plot:n(22674).createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:n(58547),categories:["gl3d","showLegend"],meta:{}}},2418:function(e,t,n){"use strict";var r=n(50693),i=n(12663).axisHoverFormat,a=n(5386).f,o=n(54532),s=n(9012),l=n(1426).extendFlat;e.exports=l({x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},i:{valType:"data_array",editType:"calc"},j:{valType:"data_array",editType:"calc"},k:{valType:"data_array",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:a({editType:"calc"}),xhoverformat:i("x"),yhoverformat:i("y"),zhoverformat:i("z"),delaunayaxis:{valType:"enumerated",values:["x","y","z"],dflt:"z",editType:"calc"},alphahull:{valType:"number",dflt:-1,editType:"calc"},intensity:{valType:"data_array",editType:"calc"},intensitymode:{valType:"enumerated",values:["vertex","cell"],dflt:"vertex",editType:"calc"},color:{valType:"color",editType:"calc"},vertexcolor:{valType:"data_array",editType:"calc"},facecolor:{valType:"data_array",editType:"calc"},transforms:void 0},r("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:o.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:l({},o.contours.x.show,{}),color:o.contours.x.color,width:o.contours.x.width,editType:"calc"},lightposition:{x:l({},o.lightposition.x,{dflt:1e5}),y:l({},o.lightposition.y,{dflt:1e5}),z:l({},o.lightposition.z,{dflt:0}),editType:"calc"},lighting:l({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc"},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc"},editType:"calc"},o.lighting),hoverinfo:l({},s.hoverinfo,{editType:"calc"}),showlegend:l({},s.showlegend,{dflt:!1})})},82932:function(e,t,n){"use strict";var r=n(78803);e.exports=function(e,t){t.intensity&&r(e,t,{vals:t.intensity,containerStr:"",cLetter:"c"})}},91134:function(e,t,n){"use strict";var r=n(9330).gl_mesh3d,i=n(9330).delaunay_triangulate,a=n(9330).alpha_shape,o=n(9330).convex_hull,s=n(81697).parseColorScale,l=n(78614),c=n(21081).extractOpts,u=n(90060);function d(e,t,n){this.scene=e,this.uid=n,this.mesh=t,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var h=d.prototype;function f(e){for(var t=[],n=e.length,r=0;r=t-.5)return!1;return!0}h.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index;e.data._cellCenter?e.traceCoordinate=e.data.dataCoordinate:e.traceCoordinate=[this.data.x[t],this.data.y[t],this.data.z[t]];var n=this.data.hovertext||this.data.text;return Array.isArray(n)&&void 0!==n[t]?e.textLabel=n[t]:n&&(e.textLabel=n),!0}},h.update=function(e){var t=this.scene,n=t.fullSceneLayout;this.data=e;var r,d=e.x.length,h=u(p(n.xaxis,e.x,t.dataScale[0],e.xcalendar),p(n.yaxis,e.y,t.dataScale[1],e.ycalendar),p(n.zaxis,e.z,t.dataScale[2],e.zcalendar));if(e.i&&e.j&&e.k){if(e.i.length!==e.j.length||e.j.length!==e.k.length||!g(e.i,d)||!g(e.j,d)||!g(e.k,d))return;r=u(m(e.i),m(e.j),m(e.k))}else r=0===e.alphahull?o(h):e.alphahull>0?a(e.alphahull,h):function(e,t){for(var n=["x","y","z"].indexOf(e),r=[],a=t.length,o=0;ov):g=M>w,v=M;var T=c(w,A,S,M);T.pos=_,T.yc=(w+M)/2,T.i=b,T.dir=g?"increasing":"decreasing",T.x=T.pos,T.y=[S,A],y&&(T.orig_p=n[b]),p&&(T.tx=t.text[b]),m&&(T.htx=t.hovertext[b]),x.push(T)}else x.push({pos:_,empty:!0})}return t._extremes[l._id]=a.findExtremes(l,r.concat(h,d),{padded:!0}),x.length&&(x[0].t={labels:{open:i(e,"open:")+" ",high:i(e,"high:")+" ",low:i(e,"low:")+" ",close:i(e,"close:")+" "}}),x}e.exports={calc:function(e,t){var n=a.getFromId(e,t.xaxis),i=a.getFromId(e,t.yaxis),s=function(e,t,n){var i=n._minDiff;if(!i){var a,s=e._fullData,l=[];for(i=1/0,a=0;a"+c.labels[x]+r.hoverLabelText(s,b,l.yhoverformat):((y=i.extendFlat({},h)).y0=y.y1=_,y.yLabelVal=b,y.yLabel=c.labels[x]+r.hoverLabelText(s,b,l.yhoverformat),y.name="",d.push(y),g[b]=y)}return d}function h(e,t,n,i){var a=e.cd,o=e.ya,l=a[0].trace,d=a[0].t,h=u(e,t,n,i);if(!h)return[];var f=a[h.index],p=h.index=f.i,m=f.dir;function g(e){return d.labels[e]+r.hoverLabelText(o,l[e][p],l.yhoverformat)}var v=f.hi||l.hoverinfo,y=v.split("+"),x="all"===v,b=x||-1!==y.indexOf("y"),_=x||-1!==y.indexOf("text"),w=b?[g("open"),g("high"),g("low"),g("close")+" "+c[m]]:[];return _&&s(f,l,w),h.extraText=w.join("
"),h.y0=h.y1=o.c2p(f.yc,!0),[h]}e.exports={hoverPoints:function(e,t,n,r){return e.cd[0].trace.hoverlabel.split?d(e,t,n,r):h(e,t,n,r)},hoverSplit:d,hoverOnPoints:h}},54186:function(e,t,n){"use strict";e.exports={moduleType:"trace",name:"ohlc",basePlotModule:n(93612),categories:["cartesian","svg","showLegend"],meta:{},attributes:n(2522),supplyDefaults:n(16169),calc:n(3485).calc,plot:n(72314),style:n(53101),hoverPoints:n(66449).hoverPoints,selectPoints:n(67324)}},14555:function(e,t,n){"use strict";var r=n(73972),i=n(71828);e.exports=function(e,t,n,a){var o=n("x"),s=n("open"),l=n("high"),c=n("low"),u=n("close");if(n("hoverlabel.split"),r.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x"],a),s&&l&&c&&u){var d=Math.min(s.length,l.length,c.length,u.length);return o&&(d=Math.min(d,i.minRowLength(o))),t._length=d,d}}},72314:function(e,t,n){"use strict";var r=n(39898),i=n(71828);e.exports=function(e,t,n,a){var o=t.yaxis,s=t.xaxis,l=!!s.rangebreaks;i.makeTraceGroups(a,n,"trace ohlc").each((function(e){var t=r.select(this),n=e[0],a=n.t;if(!0!==n.trace.visible||a.empty)t.remove();else{var c=a.tickLen,u=t.selectAll("path").data(i.identity);u.enter().append("path"),u.exit().remove(),u.attr("d",(function(e){if(e.empty)return"M0,0Z";var t=s.c2p(e.pos-c,!0),n=s.c2p(e.pos+c,!0),r=l?(t+n)/2:s.c2p(e.pos,!0);return"M"+t+","+o.c2p(e.o,!0)+"H"+r+"M"+r+","+o.c2p(e.h,!0)+"V"+o.c2p(e.l,!0)+"M"+n+","+o.c2p(e.c,!0)+"H"+r}))}}))}},67324:function(e){"use strict";e.exports=function(e,t){var n,r=e.cd,i=e.xaxis,a=e.yaxis,o=[],s=r[0].t.bPos||0;if(!1===t)for(n=0;n=e.length)return!1;if(void 0!==t[e[n]])return!1;t[e[n]]=!0}return!0}(n))for(t=0;t0;c&&(o="array");var u=n("categoryorder",o);"array"===u?(n("categoryarray"),n("ticktext")):(delete e.categoryarray,delete e.ticktext),c||"array"!==u||(t.categoryorder="trace")}}e.exports=function(e,t,n,d){function h(n,i){return r.coerce(e,t,l,n,i)}var f=s(e,t,{name:"dimensions",handleItemDefaults:u}),p=function(e,t,n,o,s){s("line.shape"),s("line.hovertemplate");var l=s("line.color",o.colorway[0]);if(i(e,"line")&&r.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),a(e,t,o,s,{prefix:"line.",cLetter:"c"}),l.length;t.line.color=n}return 1/0}(e,t,n,d,h);o(t,d,h),Array.isArray(f)&&f.length||(t.visible=!1),c(t,f,"values",p),h("hoveron"),h("hovertemplate"),h("arrangement"),h("bundlecolors"),h("sortpaths"),h("counts");var m={family:d.font.family,size:Math.round(d.font.size),color:d.font.color};r.coerceFont(h,"labelfont",m);var g={family:d.font.family,size:Math.round(d.font.size/1.2),color:d.font.color};r.coerceFont(h,"tickfont",g)}},94873:function(e,t,n){"use strict";e.exports={attributes:n(99506),supplyDefaults:n(14647),calc:n(28699),plot:n(45784),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:n(27677),categories:["noOpacity"],meta:{}}},45460:function(e,t,n){"use strict";var r=n(39898),i=n(81684).k4,a=n(72391),o=n(30211),s=n(71828),l=s.strTranslate,c=n(91424),u=n(84267),d=n(63893);function h(e,t,n,i){var a=t._context.staticPlot,o=e.map(N.bind(0,t,n)),u=i.selectAll("g.parcatslayer").data([null]);u.enter().append("g").attr("class","parcatslayer").style("pointer-events",a?"none":"all");var h=u.selectAll("g.trace.parcats").data(o,f),y=h.enter().append("g").attr("class","trace parcats");h.attr("transform",(function(e){return l(e.x,e.y)})),y.append("g").attr("class","paths");var x=h.select("g.paths").selectAll("path.path").data((function(e){return e.paths}),f);x.attr("fill",(function(e){return e.model.color}));var w=x.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",(function(e){return e.model.color})).attr("fill-opacity",0);_(w),x.attr("d",(function(e){return e.svgD})),w.empty()||x.sort(m),x.exit().remove(),x.on("mouseover",g).on("mouseout",v).on("click",b),y.append("g").attr("class","dimensions");var M=h.select("g.dimensions").selectAll("g.dimension").data((function(e){return e.dimensions}),f);M.enter().append("g").attr("class","dimension"),M.attr("transform",(function(e){return l(e.x,0)})),M.exit().remove();var T=M.selectAll("g.category").data((function(e){return e.categories}),f),k=T.enter().append("g").attr("class","category");T.attr("transform",(function(e){return l(0,e.y)})),k.append("rect").attr("class","catrect").attr("pointer-events","none"),T.select("rect.catrect").attr("fill","none").attr("width",(function(e){return e.width})).attr("height",(function(e){return e.height})),A(k);var E=T.selectAll("rect.bandrect").data((function(e){return e.bands}),f);E.each((function(){s.raiseToTop(this)})),E.attr("fill",(function(e){return e.color}));var L=E.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",(function(e){return e.color})).attr("fill-opacity",0);E.attr("fill",(function(e){return e.color})).attr("width",(function(e){return e.width})).attr("height",(function(e){return e.height})).attr("y",(function(e){return e.y})).attr("cursor",(function(e){return"fixed"===e.parcatsViewModel.arrangement?"default":"perpendicular"===e.parcatsViewModel.arrangement?"ns-resize":"move"})),S(L),E.exit().remove(),k.append("text").attr("class","catlabel").attr("pointer-events","none");var I=t._fullLayout.paper_bgcolor;T.select("text.catlabel").attr("text-anchor",(function(e){return p(e)?"start":"end"})).attr("alignment-baseline","middle").style("text-shadow",d.makeTextShadow(I)).style("fill","rgb(0, 0, 0)").attr("x",(function(e){return p(e)?e.width+5:-5})).attr("y",(function(e){return e.height/2})).text((function(e){return e.model.categoryLabel})).each((function(e){c.font(r.select(this),e.parcatsViewModel.categorylabelfont),d.convertToTspans(r.select(this),t)})),k.append("text").attr("class","dimlabel"),T.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",(function(e){return"fixed"===e.parcatsViewModel.arrangement?"default":"ew-resize"})).attr("x",(function(e){return e.width/2})).attr("y",-5).text((function(e,t){return 0===t?e.parcatsViewModel.model.dimensions[e.model.dimensionInd].dimensionLabel:null})).each((function(e){c.font(r.select(this),e.parcatsViewModel.labelfont)})),T.selectAll("rect.bandrect").on("mouseover",C).on("mouseout",D),T.exit().remove(),M.call(r.behavior.drag().origin((function(e){return{x:e.x,y:0}})).on("dragstart",R).on("drag",P).on("dragend",O)),h.each((function(e){e.traceSelection=r.select(this),e.pathSelection=r.select(this).selectAll("g.paths").selectAll("path.path"),e.dimensionSelection=r.select(this).selectAll("g.dimensions").selectAll("g.dimension")})),h.exit().remove()}function f(e){return e.key}function p(e){var t=e.parcatsViewModel.dimensions.length,n=e.parcatsViewModel.dimensions[t-1].model.dimensionInd;return e.model.dimensionInd===n}function m(e,t){return e.model.rawColor>t.model.rawColor?1:e.model.rawColor"),C=r.mouse(d)[0];o.loneHover({trace:h,x:b-p.left+m.left,y:_-p.top+m.top,text:E,color:e.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:A,idealAlign:C1&&h.displayInd===d.dimensions.length-1?(i=c.left,a="left"):(i=c.left+c.width,a="right");var m=u.model.count,g=u.model.categoryLabel,v=m/u.parcatsViewModel.model.count,y={countLabel:m,categoryLabel:g,probabilityLabel:v.toFixed(3)},x=[];-1!==u.parcatsViewModel.hoverinfoItems.indexOf("count")&&x.push(["Count:",y.countLabel].join(" ")),-1!==u.parcatsViewModel.hoverinfoItems.indexOf("probability")&&x.push(["P("+y.categoryLabel+"):",y.probabilityLabel].join(" "));var b=x.join("
");return{trace:f,x:o*(i-t.left),y:s*(p-t.top),text:b,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:a,hovertemplate:f.hovertemplate,hovertemplateLabels:y,eventData:[{data:f._input,fullData:f,count:m,category:g,probability:v}]}}function C(e){if(!e.parcatsViewModel.dragDimension&&-1===e.parcatsViewModel.hoverinfoItems.indexOf("skip")){if(r.mouse(this)[1]<-1)return;var t,n=e.parcatsViewModel.graphDiv,i=n._fullLayout,a=i._paperdiv.node().getBoundingClientRect(),l=e.parcatsViewModel.hoveron,c=this;if("color"===l?(!function(e){var t=r.select(e).datum(),n=M(t);w(n),n.each((function(){s.raiseToTop(this)})),r.select(e.parentNode).selectAll("rect.bandrect").filter((function(e){return e.color===t.color})).each((function(){s.raiseToTop(this),r.select(this).attr("stroke","black").attr("stroke-width",1.5)}))}(c),k(c,"plotly_hover",r.event)):(!function(e){r.select(e.parentNode).selectAll("rect.bandrect").each((function(e){var t=M(e);w(t),t.each((function(){s.raiseToTop(this)}))})),r.select(e.parentNode).select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}(c),T(c,"plotly_hover",r.event)),-1===e.parcatsViewModel.hoverinfoItems.indexOf("none"))"category"===l?t=E(n,a,c):"color"===l?t=function(e,t,n){e._fullLayout._calcInverseTransform(e);var i,a,o=e._fullLayout._invScaleX,s=e._fullLayout._invScaleY,l=n.getBoundingClientRect(),c=r.select(n).datum(),d=c.categoryViewModel,h=d.parcatsViewModel,f=h.model.dimensions[d.model.dimensionInd],p=h.trace,m=l.y+l.height/2;h.dimensions.length>1&&f.displayInd===h.dimensions.length-1?(i=l.left,a="left"):(i=l.left+l.width,a="right");var g=d.model.categoryLabel,v=c.parcatsViewModel.model.count,y=0;c.categoryViewModel.bands.forEach((function(e){e.color===c.color&&(y+=e.count)}));var x=d.model.count,b=0;h.pathSelection.each((function(e){e.model.color===c.color&&(b+=e.model.count)}));var _=y/v,w=y/b,A=y/x,S={countLabel:v,categoryLabel:g,probabilityLabel:_.toFixed(3)},M=[];-1!==d.parcatsViewModel.hoverinfoItems.indexOf("count")&&M.push(["Count:",S.countLabel].join(" ")),-1!==d.parcatsViewModel.hoverinfoItems.indexOf("probability")&&(M.push("P(color \u2229 "+g+"): "+S.probabilityLabel),M.push("P("+g+" | color): "+w.toFixed(3)),M.push("P(color | "+g+"): "+A.toFixed(3)));var T=M.join("
"),k=u.mostReadable(c.color,["black","white"]);return{trace:p,x:o*(i-t.left),y:s*(m-t.top),text:T,color:c.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:k,fontSize:10,idealAlign:a,hovertemplate:p.hovertemplate,hovertemplateLabels:S,eventData:[{data:p._input,fullData:p,category:g,count:v,probability:_,categorycount:x,colorcount:b,bandcolorcount:y}]}}(n,a,c):"dimension"===l&&(t=function(e,t,n){var i=[];return r.select(n.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each((function(){i.push(E(e,t,this))})),i}(n,a,c)),t&&o.loneHover(t,{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:n})}}function D(e){var t=e.parcatsViewModel;if(!t.dragDimension&&(_(t.pathSelection),A(t.dimensionSelection.selectAll("g.category")),S(t.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),o.loneUnhover(t.graphDiv._fullLayout._hoverlayer.node()),t.pathSelection.sort(m),-1===t.hoverinfoItems.indexOf("skip"))){"color"===e.parcatsViewModel.hoveron?k(this,"plotly_unhover",r.event):T(this,"plotly_unhover",r.event)}}function R(e){"fixed"!==e.parcatsViewModel.arrangement&&(e.dragDimensionDisplayInd=e.model.displayInd,e.initialDragDimensionDisplayInds=e.parcatsViewModel.model.dimensions.map((function(e){return e.displayInd})),e.dragHasMoved=!1,e.dragCategoryDisplayInd=null,r.select(this).selectAll("g.category").select("rect.catrect").each((function(t){var n=r.mouse(this)[0],i=r.mouse(this)[1];-2<=n&&n<=t.width+2&&-2<=i&&i<=t.height+2&&(e.dragCategoryDisplayInd=t.model.displayInd,e.initialDragCategoryDisplayInds=e.model.categories.map((function(e){return e.displayInd})),t.model.dragY=t.y,s.raiseToTop(this.parentNode),r.select(this.parentNode).selectAll("rect.bandrect").each((function(t){t.yd.y+d.height/2&&(o.model.displayInd=d.model.displayInd,d.model.displayInd=l),e.dragCategoryDisplayInd=o.model.displayInd}if(null===e.dragCategoryDisplayInd||"freeform"===e.parcatsViewModel.arrangement){a.model.dragX=r.event.x;var h=e.parcatsViewModel.dimensions[n],f=e.parcatsViewModel.dimensions[i];void 0!==h&&a.model.dragXf.x&&(a.model.displayInd=f.model.displayInd,f.model.displayInd=e.dragDimensionDisplayInd),e.dragDimensionDisplayInd=a.model.displayInd}j(e.parcatsViewModel),B(e.parcatsViewModel),z(e.parcatsViewModel),I(e.parcatsViewModel)}}function O(e){if("fixed"!==e.parcatsViewModel.arrangement&&null!==e.dragDimensionDisplayInd){r.select(this).selectAll("text").attr("font-weight","normal");var t={},n=L(e.parcatsViewModel),i=e.parcatsViewModel.model.dimensions.map((function(e){return e.displayInd})),o=e.initialDragDimensionDisplayInds.some((function(e,t){return e!==i[t]}));o&&i.forEach((function(n,r){var i=e.parcatsViewModel.model.dimensions[r].containerInd;t["dimensions["+i+"].displayindex"]=n}));var s=!1;if(null!==e.dragCategoryDisplayInd){var l=e.model.categories.map((function(e){return e.displayInd}));if(s=e.initialDragCategoryDisplayInds.some((function(e,t){return e!==l[t]}))){var c=e.model.categories.slice().sort((function(e,t){return e.displayInd-t.displayInd})),u=c.map((function(e){return e.categoryValue})),d=c.map((function(e){return e.categoryLabel}));t["dimensions["+e.model.containerInd+"].categoryarray"]=[u],t["dimensions["+e.model.containerInd+"].ticktext"]=[d],t["dimensions["+e.model.containerInd+"].categoryorder"]="array"}}if(-1===e.parcatsViewModel.hoverinfoItems.indexOf("skip")&&!e.dragHasMoved&&e.potentialClickBand&&("color"===e.parcatsViewModel.hoveron?k(e.potentialClickBand,"plotly_click",r.event.sourceEvent):T(e.potentialClickBand,"plotly_click",r.event.sourceEvent)),e.model.dragX=null,null!==e.dragCategoryDisplayInd)e.parcatsViewModel.dimensions[e.dragDimensionDisplayInd].categories[e.dragCategoryDisplayInd].model.dragY=null,e.dragCategoryDisplayInd=null;e.dragDimensionDisplayInd=null,e.parcatsViewModel.dragDimension=null,e.dragHasMoved=null,e.potentialClickBand=null,j(e.parcatsViewModel),B(e.parcatsViewModel),r.transition().duration(300).ease("cubic-in-out").each((function(){z(e.parcatsViewModel,!0),I(e.parcatsViewModel,!0)})).each("end",(function(){(o||s)&&a.restyle(e.parcatsViewModel.graphDiv,t,[n])}))}}function L(e){for(var t,n=e.graphDiv._fullData,r=0;r=0;s--)u+="C"+c[s]+","+(t[s+1]+r)+" "+l[s]+","+(t[s]+r)+" "+(e[s]+n[s])+","+(t[s]+r),u+="l-"+n[s]+",0 ";return u+="Z"}function B(e){var t=e.dimensions,n=e.model,r=t.map((function(e){return e.categories.map((function(e){return e.y}))})),i=e.model.dimensions.map((function(e){return e.categories.map((function(e){return e.displayInd}))})),a=e.model.dimensions.map((function(e){return e.displayInd})),o=e.dimensions.map((function(e){return e.model.dimensionInd})),s=t.map((function(e){return e.x})),l=t.map((function(e){return e.width})),c=[];for(var u in n.paths)n.paths.hasOwnProperty(u)&&c.push(n.paths[u]);function d(e){var t=e.categoryInds.map((function(e,t){return i[t][e]}));return o.map((function(e){return t[e]}))}c.sort((function(t,n){var r=d(t),i=d(n);return"backward"===e.sortpaths&&(r.reverse(),i.reverse()),r.push(t.valueInds[0]),i.push(n.valueInds[0]),e.bundlecolors&&(r.unshift(t.rawColor),i.unshift(n.rawColor)),ri?1:0}));for(var h=new Array(c.length),f=t[0].model.count,p=t[0].categories.map((function(e){return e.height})).reduce((function(e,t){return e+t})),m=0;m0?p*(v.count/f):0;for(var y,x=new Array(r.length),b=0;b1?(e.width-80-16)/(r-1):0)*i;var a,o,s,l,c,u=[],d=e.model.maxCats,h=t.categories.length,f=t.count,p=e.height-8*(d-1),m=8*(d-h)/2,g=t.categories.map((function(e){return{displayInd:e.displayInd,categoryInd:e.categoryInd}}));for(g.sort((function(e,t){return e.displayInd-t.displayInd})),c=0;c0?o.count/f*p:0,s={key:o.valueInds[0],model:o,width:16,height:a,y:null!==o.dragY?o.dragY:m,bands:[],parcatsViewModel:e},m=m+a+8,u.push(s);return{key:t.dimensionInd,x:null!==t.dragX?t.dragX:n,y:0,width:16,model:t,categories:u,parcatsViewModel:e,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}e.exports=function(e,t,n,r){h(n,e,r,t)}},45784:function(e,t,n){"use strict";var r=n(45460);e.exports=function(e,t,n,i){var a=e._fullLayout,o=a._paper,s=a._size;r(e,o,t,{width:s.w,height:s.h,margin:{t:s.t,r:s.r,b:s.b,l:s.l}},n,i)}},73362:function(e,t,n){"use strict";var r=n(50693),i=n(13838),a=n(41940),o=n(27670).Y,s=n(1426).extendFlat,l=n(44467).templatedArray;e.exports={domain:o({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:a({editType:"plot"}),tickfont:a({editType:"plot"}),rangefont:a({editType:"plot"}),dimensions:l("dimension",{label:{valType:"string",editType:"plot"},tickvals:s({},i.tickvals,{editType:"plot"}),ticktext:s({},i.ticktext,{editType:"plot"}),tickformat:s({},i.tickformat,{editType:"plot"}),visible:{valType:"boolean",dflt:!0,editType:"plot"},range:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},constraintrange:{valType:"info_array",freeLength:!0,dimensions:"1-2",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},multiselect:{valType:"boolean",dflt:!0,editType:"plot"},values:{valType:"data_array",editType:"calc"},editType:"calc"}),line:s({editType:"calc"},r("line",{colorscaleDflt:"Viridis",autoColorDflt:!1,editTypeOverride:"calc"})),unselected:{line:{color:{valType:"color",dflt:"#7f7f7f",editType:"plot"},opacity:{valType:"number",min:0,max:1,dflt:"auto",editType:"plot"},editType:"plot"},editType:"plot"}}},57920:function(e,t,n){"use strict";var r=n(25706),i=n(39898),a=n(28984).keyFun,o=n(28984).repeat,s=n(71828).sorterAsc,l=n(71828).strTranslate,c=r.bar.snapRatio;function u(e,t){return e*(1-c)+t*c}var d=r.bar.snapClose;function h(e,t){return e*(1-d)+t*d}function f(e,t,n,r){if(function(e,t){for(var n=0;n=t[n][0]&&e<=t[n][1])return!0;return!1}(n,r))return n;var i=e?-1:1,a=0,o=t.length-1;if(i<0){var s=a;a=o,o=s}for(var l=t[a],c=l,d=a;i*dt){h=n;break}}if(a=u,isNaN(a)&&(a=isNaN(d)||isNaN(h)?isNaN(d)?h:d:t-c[d][1]e[1]+n||t=.9*e[1]+.1*e[0]?"n":t<=.9*e[0]+.1*e[1]?"s":"ns"}(p,t);m&&(o.interval=l[a],o.intervalPix=p,o.region=m)}}if(e.ordinal&&!o.region){var g=e.unitTickvals,y=e.unitToPaddedPx.invert(t);for(n=0;n=x[0]&&y<=x[1]){o.clickableOrdinalRange=x;break}}}return o}function w(e,t){i.event.sourceEvent.stopPropagation();var n=t.height-i.mouse(e)[1]-2*r.verticalPadding,a=t.brush.svgBrush;a.wasDragged=!0,a._dragging=!0,a.grabbingBar?a.newExtent=[n-a.grabPoint,n+a.barLength-a.grabPoint].map(t.unitToPaddedPx.invert):a.newExtent=[a.startExtent,t.unitToPaddedPx.invert(n)].sort(s),t.brush.filterSpecified=!0,a.extent=a.stayingIntervals.concat([a.newExtent]),a.brushCallback(t),b(e.parentNode)}function A(e,t){var n=_(t,t.height-i.mouse(e)[1]-2*r.verticalPadding),a="crosshair";n.clickableOrdinalRange?a="pointer":n.region&&(a=n.region+"-resize"),i.select(document.body).style("cursor",a)}function S(e){e.on("mousemove",(function(e){i.event.preventDefault(),e.parent.inBrushDrag||A(this,e)})).on("mouseleave",(function(e){e.parent.inBrushDrag||y()})).call(i.behavior.drag().on("dragstart",(function(e){!function(e,t){i.event.sourceEvent.stopPropagation();var n=t.height-i.mouse(e)[1]-2*r.verticalPadding,a=t.unitToPaddedPx.invert(n),o=t.brush,s=_(t,n),l=s.interval,c=o.svgBrush;if(c.wasDragged=!1,c.grabbingBar="ns"===s.region,c.grabbingBar){var u=l.map(t.unitToPaddedPx);c.grabPoint=n-u[0]-r.verticalPadding,c.barLength=u[1]-u[0]}c.clickableOrdinalRange=s.clickableOrdinalRange,c.stayingIntervals=t.multiselect&&o.filterSpecified?o.filter.getConsolidated():[],l&&(c.stayingIntervals=c.stayingIntervals.filter((function(e){return e[0]!==l[0]&&e[1]!==l[1]}))),c.startExtent=s.region?l["s"===s.region?1:0]:a,t.parent.inBrushDrag=!0,c.brushStartCallback()}(this,e)})).on("drag",(function(e){w(this,e)})).on("dragend",(function(e){!function(e,t){var n=t.brush,r=n.filter,a=n.svgBrush;a._dragging||(A(e,t),w(e,t),t.brush.svgBrush.wasDragged=!1),a._dragging=!1,i.event.sourceEvent.stopPropagation();var o=a.grabbingBar;if(a.grabbingBar=!1,a.grabLocation=void 0,t.parent.inBrushDrag=!1,y(),!a.wasDragged)return a.wasDragged=void 0,a.clickableOrdinalRange?n.filterSpecified&&t.multiselect?a.extent.push(a.clickableOrdinalRange):(a.extent=[a.clickableOrdinalRange],n.filterSpecified=!0):o?(a.extent=a.stayingIntervals,0===a.extent.length&&T(n)):T(n),a.brushCallback(t),b(e.parentNode),void a.brushEndCallback(n.filterSpecified?r.getConsolidated():[]);var s=function(){r.set(r.getConsolidated())};if(t.ordinal){var l=t.unitTickvals;l[l.length-1]a.newExtent[0];a.extent=a.stayingIntervals.concat(c?[a.newExtent]:[]),a.extent.length||T(n),a.brushCallback(t),c?b(e.parentNode,s):(s(),b(e.parentNode))}else s();a.brushEndCallback(n.filterSpecified?r.getConsolidated():[])}(this,e)})))}function M(e,t){return e[0]-t[0]}function T(e){e.filterSpecified=!1,e.svgBrush.extent=[[-1/0,1/0]]}function k(e){for(var t,n=e.slice(),r=[],i=n.shift();i;){for(t=i.slice();(i=n.shift())&&i[0]<=t[1];)t[1]=Math.max(t[1],i[1]);r.push(t)}return 1===r.length&&r[0][0]>r[0][1]&&(r=[]),r}e.exports={makeBrush:function(e,t,n,r,i,a){var o,l=function(){var e,t,n=[];return{set:function(r){1===(n=r.map((function(e){return e.slice().sort(s)})).sort(M)).length&&n[0][0]===-1/0&&n[0][1]===1/0&&(n=[[0,-1]]),e=k(n),t=n.reduce((function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}),[1/0,-1/0])},get:function(){return n.slice()},getConsolidated:function(){return e},getBounds:function(){return t}}}();return l.set(n),{filter:l,filterSpecified:t,svgBrush:{extent:[],brushStartCallback:r,brushCallback:(o=i,function(e){var t=e.brush,n=function(e){return e.svgBrush.extent.map((function(e){return e.slice()}))}(t),r=n.slice();t.filter.set(r),o()}),brushEndCallback:a}}},ensureAxisBrush:function(e,t,n){var i=e.selectAll("."+r.cn.axisBrush).data(o,a);i.enter().append("g").classed(r.cn.axisBrush,!0),function(e,t,n){var i=n._context.staticPlot,a=e.selectAll(".background").data(o);a.enter().append("rect").classed("background",!0).call(p).call(m).style("pointer-events",i?"none":"auto").attr("transform",l(0,r.verticalPadding)),a.call(S).attr("height",(function(e){return e.height-r.verticalPadding}));var s=e.selectAll(".highlight-shadow").data(o);s.enter().append("line").classed("highlight-shadow",!0).attr("x",-r.bar.width/2).attr("stroke-width",r.bar.width+r.bar.strokeWidth).attr("stroke",t).attr("opacity",r.bar.strokeOpacity).attr("stroke-linecap","butt"),s.attr("y1",(function(e){return e.height})).call(x);var c=e.selectAll(".highlight").data(o);c.enter().append("line").classed("highlight",!0).attr("x",-r.bar.width/2).attr("stroke-width",r.bar.width-r.bar.strokeWidth).attr("stroke",r.bar.fillColor).attr("opacity",r.bar.fillOpacity).attr("stroke-linecap","butt"),c.attr("y1",(function(e){return e.height})).call(x)}(i,t,n)},cleanRanges:function(e,t){if(Array.isArray(e[0])?(e=e.map((function(e){return e.sort(s)})),e=t.multiselect?k(e.sort(M)):[e[0]]):e=[e.sort(s)],t.tickvals){var n=t.tickvals.slice().sort(s);if(!(e=e.map((function(e){var t=[f(0,n,e[0],[]),f(1,n,e[1],[])];if(t[1]>t[0])return t})).filter((function(e){return e}))).length)return}return e.length>1?e:e[0]}}},71791:function(e,t,n){"use strict";e.exports={attributes:n(73362),supplyDefaults:n(3633),calc:n(24639),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:n(49351),categories:["gl","regl","noOpacity","noHover"],meta:{}}},49351:function(e,t,n){"use strict";var r=n(39898),i=n(27659).a0,a=n(21341),o=n(77922);t.name="parcoords",t.plot=function(e){var t=i(e.calcdata,"parcoords")[0];t.length&&a(e,t)},t.clean=function(e,t,n,r){var i=r._has&&r._has("parcoords"),a=t._has&&t._has("parcoords");i&&!a&&(r._paperdiv.selectAll(".parcoords").remove(),r._glimages.selectAll("*").remove())},t.toSVG=function(e){var t=e._fullLayout._glimages,n=r.select(e).selectAll(".svg-container");n.filter((function(e,t){return t===n.size()-1})).selectAll(".gl-canvas-context, .gl-canvas-focus").each((function(){var e=this,n=e.toDataURL("image/png");t.append("svg:image").attr({xmlns:o.svg,"xlink:href":n,preserveAspectRatio:"none",x:0,y:0,width:e.style.width,height:e.style.height})})),window.setTimeout((function(){r.selectAll("#filterBarPattern").attr("id","filterBarPattern")}),60)}},24639:function(e,t,n){"use strict";var r=n(71828).isArrayOrTypedArray,i=n(21081),a=n(28984).wrap;e.exports=function(e,t){var n,o;return i.hasColorscale(t,"line")&&r(t.line.color)?(n=t.line.color,o=i.extractOpts(t.line).colorscale,i.calc(e,t,{vals:n,containerStr:"line",cLetter:"c"})):(n=function(e){for(var t=new Array(e),n=0;nd&&(r.log("parcoords traces support up to "+d+" dimensions at the moment"),p.splice(d));var m=s(e,t,{name:"dimensions",layout:l,handleItemDefaults:f}),g=function(e,t,n,o,s){var l=s("line.color",n);if(i(e,"line")&&r.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),a(e,t,o,s,{prefix:"line.",cLetter:"c"}),l.length;t.line.color=n}return 1/0}(e,t,n,l,u);o(t,l,u),Array.isArray(m)&&m.length||(t.visible=!1),h(t,m,"values",g);var v={family:l.font.family,size:Math.round(l.font.size/1.2),color:l.font.color};r.coerceFont(u,"labelfont",v),r.coerceFont(u,"tickfont",v),r.coerceFont(u,"rangefont",v),u("labelangle"),u("labelside"),u("unselected.line.color"),u("unselected.line.opacity")}},1602:function(e,t,n){"use strict";var r=n(71828).isTypedArray;t.convertTypedArray=function(e){return r(e)?Array.prototype.slice.call(e):e},t.isOrdinal=function(e){return!!e.tickvals},t.isVisible=function(e){return e.visible||!("visible"in e)}},67618:function(e,t,n){"use strict";var r=n(71791);r.plot=n(21341),e.exports=r},83398:function(e,t,n){"use strict";var r=n(56068),i=r(["precision highp float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor;\n\nattribute vec4 p01_04, p05_08, p09_12, p13_16,\n p17_20, p21_24, p25_28, p29_32,\n p33_36, p37_40, p41_44, p45_48,\n p49_52, p53_56, p57_60, colors;\n\nuniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,\n loA, hiA, loB, hiB, loC, hiC, loD, hiD;\n\nuniform vec2 resolution, viewBoxPos, viewBoxSize;\nuniform float maskHeight;\nuniform float drwLayer; // 0: context, 1: focus, 2: pick\nuniform vec4 contextColor;\nuniform sampler2D maskTexture, palette;\n\nbool isPick = (drwLayer > 1.5);\nbool isContext = (drwLayer < 0.5);\n\nconst vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);\nconst vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);\n\nfloat val(mat4 p, mat4 v) {\n return dot(matrixCompMult(p, v) * UNITS, UNITS);\n}\n\nfloat axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {\n float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);\n float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);\n return y1 * (1.0 - ratio) + y2 * ratio;\n}\n\nint iMod(int a, int b) {\n return a - b * (a / b);\n}\n\nbool fOutside(float p, float lo, float hi) {\n return (lo < hi) && (lo > p || p > hi);\n}\n\nbool vOutside(vec4 p, vec4 lo, vec4 hi) {\n return (\n fOutside(p[0], lo[0], hi[0]) ||\n fOutside(p[1], lo[1], hi[1]) ||\n fOutside(p[2], lo[2], hi[2]) ||\n fOutside(p[3], lo[3], hi[3])\n );\n}\n\nbool mOutside(mat4 p, mat4 lo, mat4 hi) {\n return (\n vOutside(p[0], lo[0], hi[0]) ||\n vOutside(p[1], lo[1], hi[1]) ||\n vOutside(p[2], lo[2], hi[2]) ||\n vOutside(p[3], lo[3], hi[3])\n );\n}\n\nbool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {\n return mOutside(A, loA, hiA) ||\n mOutside(B, loB, hiB) ||\n mOutside(C, loC, hiC) ||\n mOutside(D, loD, hiD);\n}\n\nbool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {\n mat4 pnts[4];\n pnts[0] = A;\n pnts[1] = B;\n pnts[2] = C;\n pnts[3] = D;\n\n for(int i = 0; i < 4; ++i) {\n for(int j = 0; j < 4; ++j) {\n for(int k = 0; k < 4; ++k) {\n if(0 == iMod(\n int(255.0 * texture2D(maskTexture,\n vec2(\n (float(i * 2 + j / 2) + 0.5) / 8.0,\n (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight\n ))[3]\n ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),\n 2\n )) return true;\n }\n }\n }\n return false;\n}\n\nvec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {\n float x = 0.5 * sign(v) + 0.5;\n float y = axisY(x, A, B, C, D);\n float z = 1.0 - abs(v);\n\n z += isContext ? 0.0 : 2.0 * float(\n outsideBoundingBox(A, B, C, D) ||\n outsideRasterMask(A, B, C, D)\n );\n\n return vec4(\n 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,\n z,\n 1.0\n );\n}\n\nvoid main() {\n mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);\n mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);\n mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);\n mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);\n\n float v = colors[3];\n\n gl_Position = position(isContext, v, A, B, C, D);\n\n fragColor =\n isContext ? vec4(contextColor) :\n isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));\n}\n"]),a=r(["precision highp float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor;\n\nvoid main() {\n gl_FragColor = fragColor;\n}\n"]),o=n(25706).maxDimensionCount,s=n(71828),l=1e-6,c=2048,u=new Uint8Array(4),d=new Uint8Array(4),h={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function f(e,t,n,r,i){var a=e._gl;a.enable(a.SCISSOR_TEST),a.scissor(t,n,r,i),e.clear({color:[0,0,0,0],depth:1})}function p(e,t,n,r,i,a){var o=a.key;n.drawCompleted||(!function(e){e.read({x:0,y:0,width:1,height:1,data:u})}(e),n.drawCompleted=!0),function s(l){var c=Math.min(r,i-l*r);0===l&&(window.cancelAnimationFrame(n.currentRafs[o]),delete n.currentRafs[o],f(e,a.scissorX,a.scissorY,a.scissorWidth,a.viewBoxSize[1])),n.clearOnly||(a.count=2*c,a.offset=2*l*r,t(a),l*r+c>>8*t)%256/255}function v(e,t,n){for(var r=new Array(8*t),i=0,a=0;ad&&(d=e[i].dim1.canvasX,o=i);0===s&&f(M,0,0,n.canvasWidth,n.canvasHeight);var h=function(e){var t,n,r,i=[[],[]];for(r=0;r<64;r++){var a=!e&&ro._length&&(k=k.slice(0,o._length));var C,D=o.tickvals;function R(e,t){return{val:e,text:C[t]}}function P(e,t){return e.val-t.val}if(Array.isArray(D)&&D.length){C=o.ticktext,Array.isArray(C)&&C.length?C.length>D.length?C=C.slice(0,D.length):D.length>C.length&&(D=D.slice(0,C.length)):C=D.map(a(o.tickformat));for(var O=1;O=n||l>=i)return;var c=e.lineLayer.readPixel(s,i-1-l),u=0!==c[3],d=u?c[2]+256*(c[1]+256*c[0]):null,h={x:s,y:l,clientX:t.clientX,clientY:t.clientY,dataIndex:e.model.key,curveNumber:d};d!==N&&(u?a.hover(h):a.unhover&&a.unhover(h),N=d)}})),z.style("opacity",(function(e){return e.pick?0:1})),f.style("background","rgba(255, 255, 255, 0)");var F=f.selectAll("."+y.cn.parcoords).data(k,p);F.exit().remove(),F.enter().append("g").classed(y.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),F.attr("transform",(function(e){return c(e.model.translateX,e.model.translateY)}));var B=F.selectAll("."+y.cn.parcoordsControlView).data(m,p);B.enter().append("g").classed(y.cn.parcoordsControlView,!0),B.attr("transform",(function(e){return c(e.model.pad.l,e.model.pad.t)}));var j=B.selectAll("."+y.cn.yAxis).data((function(e){return e.dimensions}),p);j.enter().append("g").classed(y.cn.yAxis,!0),B.each((function(e){O(j,e,A)})),z.each((function(e){if(e.viewModel){!e.lineLayer||a?e.lineLayer=b(this,e):e.lineLayer.update(e),(e.key||0===e.key)&&(e.viewModel[e.key]=e.lineLayer);var t=!e.context||a;e.lineLayer.render(e.viewModel.panels,t)}})),j.attr("transform",(function(e){return c(e.xScale(e.xIndex),0)})),j.call(r.behavior.drag().origin((function(e){return e})).on("drag",(function(e){var t=e.parent;T.linePickActive(!1),e.x=Math.max(-y.overdrag,Math.min(e.model.width+y.overdrag,r.event.x)),e.canvasX=e.x*e.model.canvasPixelRatio,j.sort((function(e,t){return e.x-t.x})).each((function(t,n){t.xIndex=n,t.x=e===t?t.x:t.xScale(t.xIndex),t.canvasX=t.x*t.model.canvasPixelRatio})),O(j,t,A),j.filter((function(t){return 0!==Math.abs(e.xIndex-t.xIndex)})).attr("transform",(function(e){return c(e.xScale(e.xIndex),0)})),r.select(this).attr("transform",c(e.x,0)),j.each((function(n,r,i){i===e.parent.key&&(t.dimensions[r]=n)})),t.contextLayer&&t.contextLayer.render(t.panels,!1,!E(t)),t.focusLayer.render&&t.focusLayer.render(t.panels)})).on("dragend",(function(e){var t=e.parent;e.x=e.xScale(e.xIndex),e.canvasX=e.x*e.model.canvasPixelRatio,O(j,t,A),r.select(this).attr("transform",(function(e){return c(e.x,0)})),t.contextLayer&&t.contextLayer.render(t.panels,!1,!E(t)),t.focusLayer&&t.focusLayer.render(t.panels),t.pickLayer&&t.pickLayer.render(t.panels,!0),T.linePickActive(!0),a&&a.axesMoved&&a.axesMoved(t.key,t.dimensions.map((function(e){return e.crossfilterDimensionIndex})))}))),j.exit().remove();var U=j.selectAll("."+y.cn.axisOverlays).data(m,p);U.enter().append("g").classed(y.cn.axisOverlays,!0),U.selectAll("."+y.cn.axis).remove();var V=U.selectAll("."+y.cn.axis).data(m,p);V.enter().append("g").classed(y.cn.axis,!0),V.each((function(e){var t=e.model.height/e.model.tickDistance,n=e.domainScale,i=n.domain();r.select(this).call(r.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(t,e.tickFormat).tickValues(e.ordinal?i:null).tickFormat((function(t){return v.isOrdinal(e)?t:L(e.model.dimensions[e.visibleIndex],t)})).scale(n)),d.font(V.selectAll("text"),e.model.tickFont)})),V.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),V.selectAll("text").style("text-shadow",u.makeTextShadow(M)).style("cursor","default");var H=U.selectAll("."+y.cn.axisHeading).data(m,p);H.enter().append("g").classed(y.cn.axisHeading,!0);var W=H.selectAll("."+y.cn.axisTitle).data(m,p);W.enter().append("text").classed(y.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",o?"none":"auto"),W.text((function(e){return e.label})).each((function(t){var n=r.select(this);d.font(n,t.model.labelFont),u.convertToTspans(n,e)})).attr("transform",(function(e){var t=P(e.model.labelAngle,e.model.labelSide),n=y.axisTitleOffset;return(t.dir>0?"":c(0,2*n+e.model.height))+l(t.degrees)+c(-n*t.dx,-n*t.dy)})).attr("text-anchor",(function(e){var t=P(e.model.labelAngle,e.model.labelSide);return 2*Math.abs(t.dx)>Math.abs(t.dy)?t.dir*t.dx<0?"start":"end":"middle"}));var G=U.selectAll("."+y.cn.axisExtent).data(m,p);G.enter().append("g").classed(y.cn.axisExtent,!0);var q=G.selectAll("."+y.cn.axisExtentTop).data(m,p);q.enter().append("g").classed(y.cn.axisExtentTop,!0),q.attr("transform",c(0,-y.axisExtentOffset));var Y=q.selectAll("."+y.cn.axisExtentTopText).data(m,p);Y.enter().append("text").classed(y.cn.axisExtentTopText,!0).call(R),Y.text((function(e){return I(e,!0)})).each((function(e){d.font(r.select(this),e.model.rangeFont)}));var $=G.selectAll("."+y.cn.axisExtentBottom).data(m,p);$.enter().append("g").classed(y.cn.axisExtentBottom,!0),$.attr("transform",(function(e){return c(0,e.model.height+y.axisExtentOffset)}));var X=$.selectAll("."+y.cn.axisExtentBottomText).data(m,p);X.enter().append("text").classed(y.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(R),X.text((function(e){return I(e,!1)})).each((function(e){d.font(r.select(this),e.model.rangeFont)})),x.ensureAxisBrush(U,M,e)}},21341:function(e,t,n){"use strict";var r=n(17171),i=n(79749),a=n(1602).isVisible,o={};function s(e,t,n){var r=t.indexOf(n),i=e.indexOf(r);return-1===i&&(i+=t.length),i}(e.exports=function(e,t){var n=e._fullLayout;if(i(e,[],o)){var l={},c={},u={},d={},h=n._size;t.forEach((function(t,n){var r=t[0].trace;u[n]=r.index;var i=d[n]=r._fullInput.index;l[n]=e.data[i].dimensions,c[n]=e.data[i].dimensions.slice()}));r(e,t,{width:h.w,height:h.h,margin:{t:h.t,r:h.r,b:h.b,l:h.l}},{filterChanged:function(t,r,i){var a=c[t][r],o=i.map((function(e){return e.slice()})),s="dimensions["+r+"].constraintrange",l=n._tracePreGUI[e._fullData[u[t]]._fullInput.uid];if(void 0===l[s]){var h=a.constraintrange;l[s]=h||null}var f=e._fullData[u[t]].dimensions[r];o.length?(1===o.length&&(o=o[0]),a.constraintrange=o,f.constraintrange=o.slice(),o=[o]):(delete a.constraintrange,delete f.constraintrange,o=null);var p={};p[s]=o,e.emit("plotly_restyle",[p,[d[t]]])},hover:function(t){e.emit("plotly_hover",t)},unhover:function(t){e.emit("plotly_unhover",t)},axesMoved:function(t,n){var r=function(e,t){return function(n,r){return s(e,t,n)-s(e,t,r)}}(n,c[t].filter(a));l[t].sort(r),c[t].filter((function(e){return!a(e)})).sort((function(e){return c[t].indexOf(e)})).forEach((function(e){l[t].splice(l[t].indexOf(e),1),l[t].splice(c[t].indexOf(e),0,e)})),e.emit("plotly_restyle",[{dimensions:[l[t]]},[d[t]]])}})}}).reglPrecompiled=o},34e3:function(e,t,n){"use strict";var r=n(9012),i=n(27670).Y,a=n(41940),o=n(22399),s=n(5386).f,l=n(5386).s,c=n(1426).extendFlat,u=a({editType:"plot",arrayOk:!0,colorEditType:"plot"});e.exports={labels:{valType:"data_array",editType:"calc"},label0:{valType:"number",dflt:0,editType:"calc"},dlabel:{valType:"number",dflt:1,editType:"calc"},values:{valType:"data_array",editType:"calc"},marker:{colors:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:o.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},scalegroup:{valType:"string",dflt:"",editType:"calc"},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc"},hoverinfo:c({},r.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:s({},{keys:["label","color","value","percent","text"]}),texttemplate:l({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:c({},u,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:c({},u,{}),outsidetextfont:c({},u,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:c({},u,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:i({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},sort:{valType:"boolean",dflt:!0,editType:"calc"},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"},_deprecated:{title:{valType:"string",dflt:"",editType:"calc"},titlefont:c({},u,{}),titleposition:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"calc"}}}},13584:function(e,t,n){"use strict";var r=n(74875);t.name="pie",t.plot=function(e,n,i,a){r.plotBasePlot(t.name,e,n,i,a)},t.clean=function(e,n,i,a){r.cleanBasePlot(t.name,e,n,i,a)}},32354:function(e,t,n){"use strict";var r=n(92770),i=n(84267),a=n(7901),o={};function s(e){return function(t,n){return!!t&&(!!(t=i(t)).isValid()&&(t=a.addOpacity(t,t.getAlpha()),e[n]||(e[n]=t),t))}}function l(e,t){var n,r=JSON.stringify(e),a=t[r];if(!a){for(a=e.slice(),n=0;n=0})),("funnelarea"===t.type?v:t.sort)&&a.sort((function(e,t){return t.v-e.v})),a[0]&&(a[0].vTotal=g),a},crossTraceCalc:function(e,t){var n=(t||{}).type;n||(n="pie");var r=e._fullLayout,i=e.calcdata,a=r[n+"colorway"],s=r["_"+n+"colormap"];r["extend"+n+"colors"]&&(a=l(a,o));for(var c=0,u=0;u0){s=!0;break}}s||(o=0)}return{hasLabels:n,hasValues:a,len:o}}e.exports={handleLabelsAndValues:l,supplyDefaults:function(e,t,n,r){function c(n,r){return i.coerce(e,t,a,n,r)}var u=l(c("labels"),c("values")),d=u.len;if(t._hasLabels=u.hasLabels,t._hasValues=u.hasValues,!t._hasLabels&&t._hasValues&&(c("label0"),c("dlabel")),d){t._length=d,c("marker.line.width")&&c("marker.line.color"),c("marker.colors"),c("scalegroup");var h,f=c("text"),p=c("texttemplate");if(p||(h=c("textinfo",Array.isArray(f)?"text+percent":"percent")),c("hovertext"),c("hovertemplate"),p||h&&"none"!==h){var m=c("textposition");s(e,t,r,c,m,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),(Array.isArray(m)||"auto"===m||"outside"===m)&&c("automargin"),("inside"===m||"auto"===m||Array.isArray(m))&&c("insidetextorientation")}o(t,r,c);var g=c("hole");if(c("title.text")){var v=c("title.position",g?"middle center":"top center");g||"middle center"!==v||(t.title.position="top center"),i.coerceFont(c,"title.font",r.font)}c("sort"),c("direction"),c("rotation"),c("pull")}else t.visible=!1}}},20007:function(e,t,n){"use strict";var r=n(23469).appendArrayMultiPointValues;e.exports=function(e,t){var n={curveNumber:t.index,pointNumbers:e.pts,data:t._input,fullData:t,label:e.label,color:e.color,value:e.v,percent:e.percent,text:e.text,bbox:e.bbox,v:e.v};return 1===e.pts.length&&(n.pointNumber=n.i=e.pts[0]),r(n,t,e.pts),"funnelarea"===t.type&&(delete n.v,delete n.i),n}},53581:function(e,t,n){"use strict";var r=n(71828);function i(e){return-1!==e.indexOf("e")?e.replace(/[.]?0+e/,"e"):-1!==e.indexOf(".")?e.replace(/[.]?0+$/,""):e}t.formatPiePercent=function(e,t){var n=i((100*e).toPrecision(3));return r.numSeparate(n,t)+"%"},t.formatPieValue=function(e,t){var n=i(e.toPrecision(10));return r.numSeparate(n,t)},t.getFirstFilled=function(e,t){if(Array.isArray(e))for(var n=0;n"),name:d.hovertemplate||-1!==h.indexOf("name")?d.name:void 0,idealAlign:e.pxmid[0]<0?"left":"right",color:g.castOption(_.bgcolor,e.pts)||e.color,borderColor:g.castOption(_.bordercolor,e.pts),fontFamily:g.castOption(w.family,e.pts),fontSize:g.castOption(w.size,e.pts),fontColor:g.castOption(w.color,e.pts),nameLength:g.castOption(_.namelength,e.pts),textAlign:g.castOption(_.align,e.pts),hovertemplate:g.castOption(d.hovertemplate,e.pts),hovertemplateLabels:e,eventData:[v(e,d)]},{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:t,inOut_bbox:A}),e.bbox=A[0],c._hasHoverLabel=!0}c._hasHoverEvent=!0,t.emit("plotly_hover",{points:[v(e,d)],event:r.event})}})),e.on("mouseout",(function(e){var n=t._fullLayout,i=t._fullData[c.index],o=r.select(this).datum();c._hasHoverEvent&&(e.originalEvent=r.event,t.emit("plotly_unhover",{points:[v(o,i)],event:r.event}),c._hasHoverEvent=!1),c._hasHoverLabel&&(a.loneUnhover(n._hoverlayer.node()),c._hasHoverLabel=!1)})),e.on("click",(function(e){var n=t._fullLayout,i=t._fullData[c.index];t._dragging||!1===n.hovermode||(t._hoverdata=[v(e,i)],a.click(t,r.event))}))}function b(e,t,n){var r=g.castOption(e.insidetextfont.color,t.pts);!r&&e._input.textfont&&(r=g.castOption(e._input.textfont.color,t.pts));var i=g.castOption(e.insidetextfont.family,t.pts)||g.castOption(e.textfont.family,t.pts)||n.family,a=g.castOption(e.insidetextfont.size,t.pts)||g.castOption(e.textfont.size,t.pts)||n.size;return{color:r||o.contrast(t.color),family:i,size:a}}function _(e,t){for(var n,r,i=0;it&&t>r||n=-4;g-=2)v(Math.PI*g,"tan");for(g=4;g>=-4;g-=2)v(Math.PI*(g+1),"tan")}if(d||f){for(g=4;g>=-4;g-=2)v(Math.PI*(g+1.5),"rad");for(g=4;g>=-4;g-=2)v(Math.PI*(g+.5),"rad")}}if(s||p||d){var y=Math.sqrt(e.width*e.width+e.height*e.height);if((a={scale:i*r*2/y,rCenter:1-i,rotate:0}).textPosAngle=(t.startangle+t.stopangle)/2,a.scale>=1)return a;m.push(a)}(p||f)&&((a=A(e,r,o,l,c)).textPosAngle=(t.startangle+t.stopangle)/2,m.push(a)),(p||h)&&((a=S(e,r,o,l,c)).textPosAngle=(t.startangle+t.stopangle)/2,m.push(a));for(var x=0,b=0,_=0;_=1)break}return m[x]}function A(e,t,n,r,i){t=Math.max(0,t-2*m);var a=e.width/e.height,o=k(a,r,t,n);return{scale:2*o/e.height,rCenter:M(a,o/t),rotate:T(i)}}function S(e,t,n,r,i){t=Math.max(0,t-2*m);var a=e.height/e.width,o=k(a,r,t,n);return{scale:2*o/e.width,rCenter:M(a,o/t),rotate:T(i+Math.PI/2)}}function M(e,t){return Math.cos(t)-e*t}function T(e){return(180/Math.PI*e+720)%180-90}function k(e,t,n,r){var i=e+1/(2*Math.tan(t));return n*Math.min(1/(Math.sqrt(i*i+.5)+i),r/(Math.sqrt(e*e+r/2)+e))}function E(e,t){return e.v!==t.vTotal||t.trace.hole?Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2):1}function C(e,t){var n=t.pxmid[0],r=t.pxmid[1],i=e.width/2,a=e.height/2;return n<0&&(i*=-1),r<0&&(a*=-1),{scale:1,rCenter:1,rotate:0,x:i+Math.abs(a)*(i>0?1:-1)/2,y:a/(1+n*n/(r*r)),outside:!0}}function D(e,t){var n,r,i,a=e.trace,o={x:e.cx,y:e.cy},s={tx:0,ty:0};s.ty+=a.title.font.size,i=P(a),-1!==a.title.position.indexOf("top")?(o.y-=(1+i)*e.r,s.ty-=e.titleBox.height):-1!==a.title.position.indexOf("bottom")&&(o.y+=(1+i)*e.r);var l,c,u=(l=e.r,c=e.trace.aspectratio,l/(void 0===c?1:c)),d=t.w*(a.domain.x[1]-a.domain.x[0])/2;return-1!==a.title.position.indexOf("left")?(d+=u,o.x-=(1+i)*u,s.tx+=e.titleBox.width/2):-1!==a.title.position.indexOf("center")?d*=2:-1!==a.title.position.indexOf("right")&&(d+=u,o.x+=(1+i)*u,s.tx-=e.titleBox.width/2),n=d/e.titleBox.width,r=R(e,t)/e.titleBox.height,{x:o.x,y:o.y,scale:Math.min(n,r),tx:s.tx,ty:s.ty}}function R(e,t){var n=e.trace,r=t.h*(n.domain.y[1]-n.domain.y[0]);return Math.min(e.titleBox.height,r/2)}function P(e){var t,n=e.pull;if(!n)return 0;if(Array.isArray(n))for(n=0,t=0;tn&&(n=e.pull[t]);return n}function O(e,t){for(var n=[],r=0;r1?u=(c=n.r)/i.aspectratio:c=(u=n.r)*i.aspectratio,l=(c*=(1+i.baseratio)/2)*u}o=Math.min(o,l/n.vTotal)}for(r=0;r")}if(a){var x=l.castOption(i,t.i,"texttemplate");if(x){var b=function(e){return{label:e.label,value:e.v,valueLabel:g.formatPieValue(e.v,r.separators),percent:e.v/n.vTotal,percentLabel:g.formatPiePercent(e.v/n.vTotal,r.separators),color:e.color,text:e.text,customdata:l.castOption(i,e.i,"customdata")}}(t),_=g.getFirstFilled(i.text,t.pts);(y(_)||""===_)&&(b.text=_),t.text=l.texttemplateString(x,b,e._fullLayout._d3locale,b,i._meta||{})}else t.text=""}}function z(e,t){var n=e.rotate*Math.PI/180,r=Math.cos(n),i=Math.sin(n),a=(t.left+t.right)/2,o=(t.top+t.bottom)/2;e.textX=a*r-o*i,e.textY=a*i+o*r,e.noCenter=!0}e.exports={plot:function(e,t){var n=e._context.staticPlot,a=e._fullLayout,h=a._size;p("pie",a),_(t,e),O(t,h);var m=l.makeTraceGroups(a._pielayer,t,"trace").each((function(t){var p=r.select(this),m=t[0],v=m.trace;!function(e){var t,n,r,i=e[0],a=i.r,o=i.trace,s=g.getRotationAngle(o.rotation),l=2*Math.PI/i.vTotal,c="px0",u="px1";if("counterclockwise"===o.direction){for(t=0;ti.vTotal/2?1:0,n.halfangle=Math.PI*Math.min(n.v/i.vTotal,.5),n.ring=1-o.hole,n.rInscribed=E(n,i))}(t),p.attr("stroke-linejoin","round"),p.each((function(){var y=r.select(this).selectAll("g.slice").data(t);y.enter().append("g").classed("slice",!0),y.exit().remove();var _=[[[],[]],[[],[]]],A=!1;y.each((function(i,o){if(i.hidden)r.select(this).selectAll("path,g").remove();else{i.pointNumber=i.i,i.curveNumber=v.index,_[i.pxmid[1]<0?0:1][i.pxmid[0]<0?0:1].push(i);var c=m.cx,u=m.cy,h=r.select(this),p=h.selectAll("path.surface").data([i]);if(p.enter().append("path").classed("surface",!0).style({"pointer-events":n?"none":"all"}),h.call(x,e,t),v.pull){var y=+g.castOption(v.pull,i.pts)||0;y>0&&(c+=y*i.pxmid[0],u+=y*i.pxmid[1])}i.cxFinal=c,i.cyFinal=u;var S=v.hole;if(i.v===m.vTotal){var M="M"+(c+i.px0[0])+","+(u+i.px0[1])+R(i.px0,i.pxmid,!0,1)+R(i.pxmid,i.px0,!0,1)+"Z";S?p.attr("d","M"+(c+S*i.px0[0])+","+(u+S*i.px0[1])+R(i.px0,i.pxmid,!1,S)+R(i.pxmid,i.px0,!1,S)+"Z"+M):p.attr("d",M)}else{var T=R(i.px0,i.px1,!0,1);if(S){var k=1-S;p.attr("d","M"+(c+S*i.px1[0])+","+(u+S*i.px1[1])+R(i.px1,i.px0,!1,S)+"l"+k*i.px0[0]+","+k*i.px0[1]+T+"Z")}else p.attr("d","M"+c+","+u+"l"+i.px0[0]+","+i.px0[1]+T+"Z")}I(e,i,m);var E=g.castOption(v.textposition,i.pts),D=h.selectAll("g.slicetext").data(i.text&&"none"!==E?[0]:[]);D.enter().append("g").classed("slicetext",!0),D.exit().remove(),D.each((function(){var n=l.ensureSingle(r.select(this),"text","",(function(e){e.attr("data-notex",1)})),h=l.ensureUniformFontSize(e,"outside"===E?function(e,t,n){var r=g.castOption(e.outsidetextfont.color,t.pts)||g.castOption(e.textfont.color,t.pts)||n.color,i=g.castOption(e.outsidetextfont.family,t.pts)||g.castOption(e.textfont.family,t.pts)||n.family,a=g.castOption(e.outsidetextfont.size,t.pts)||g.castOption(e.textfont.size,t.pts)||n.size;return{color:r,family:i,size:a}}(v,i,a.font):b(v,i,a.font));n.text(i.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(s.font,h).call(d.convertToTspans,e);var p,y=s.bBox(n.node());if("outside"===E)p=C(y,i);else if(p=w(y,i,m),"auto"===E&&p.scale<1){var x=l.ensureUniformFontSize(e,v.outsidetextfont);n.call(s.font,x),p=C(y=s.bBox(n.node()),i)}var _=p.textPosAngle,S=void 0===_?i.pxmid:L(m.r,_);if(p.targetX=c+S[0]*p.rCenter+(p.x||0),p.targetY=u+S[1]*p.rCenter+(p.y||0),z(p,y),p.outside){var M=p.targetY;i.yLabelMin=M-y.height/2,i.yLabelMid=M,i.yLabelMax=M+y.height/2,i.labelExtraX=0,i.labelExtraY=0,A=!0}p.fontSize=h.size,f(v.type,p,a),t[o].transform=p,l.setTransormAndDisplay(n,p)}))}function R(e,t,n,r){var a=r*(t[0]-e[0]),o=r*(t[1]-e[1]);return"a"+r*m.r+","+r*m.r+" 0 "+i.largeArc+(n?" 1 ":" 0 ")+a+","+o}}));var S=r.select(this).selectAll("g.titletext").data(v.title.text?[0]:[]);if(S.enter().append("g").classed("titletext",!0),S.exit().remove(),S.each((function(){var t,n=l.ensureSingle(r.select(this),"text","",(function(e){e.attr("data-notex",1)})),i=v.title.text;v._meta&&(i=l.templateString(i,v._meta)),n.text(i).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(s.font,v.title.font).call(d.convertToTspans,e),t="middle center"===v.title.position?function(e){var t=Math.sqrt(e.titleBox.width*e.titleBox.width+e.titleBox.height*e.titleBox.height);return{x:e.cx,y:e.cy,scale:e.trace.hole*e.r*2/t,tx:0,ty:-e.titleBox.height/2+e.trace.title.font.size}}(m):D(m,h),n.attr("transform",u(t.x,t.y)+c(Math.min(1,t.scale))+u(t.tx,t.ty))})),A&&function(e,t){var n,r,i,a,o,s,l,c,u,d,h,f,p;function m(e,t){return e.pxmid[1]-t.pxmid[1]}function v(e,t){return t.pxmid[1]-e.pxmid[1]}function y(e,n){n||(n={});var i,c,u,h,f=n.labelExtraY+(r?n.yLabelMax:n.yLabelMin),p=r?e.yLabelMin:e.yLabelMax,m=r?e.yLabelMax:e.yLabelMin,v=e.cyFinal+o(e.px0[1],e.px1[1]),y=f-p;if(y*l>0&&(e.labelExtraY=y),Array.isArray(t.pull))for(c=0;c=(g.castOption(t.pull,u.pts)||0)||((e.pxmid[1]-u.pxmid[1])*l>0?(y=u.cyFinal+o(u.px0[1],u.px1[1])-p-e.labelExtraY)*l>0&&(e.labelExtraY+=y):(m+e.labelExtraY-v)*l>0&&(i=3*s*Math.abs(c-d.indexOf(e)),(h=u.cxFinal+a(u.px0[0],u.px1[0])+i-(e.cxFinal+e.pxmid[0])-e.labelExtraX)*s>0&&(e.labelExtraX+=h)))}for(r=0;r<2;r++)for(i=r?m:v,o=r?Math.max:Math.min,l=r?1:-1,n=0;n<2;n++){for(a=n?Math.max:Math.min,s=n?1:-1,(c=e[r][n]).sort(i),u=e[1-r][n],d=u.concat(c),f=[],h=0;hMath.abs(d)?s+="l"+d*e.pxmid[0]/e.pxmid[1]+","+d+"H"+(a+e.labelExtraX+c):s+="l"+e.labelExtraX+","+u+"v"+(d-u)+"h"+c}else s+="V"+(e.yLabelMid+e.labelExtraY)+"h"+c;l.ensureSingle(n,"path","textline").call(o.stroke,t.outsidetextfont.color).attr({"stroke-width":Math.min(2,t.outsidetextfont.size/8),d:s,fill:"none"})}else n.select("path.textline").remove()}))}(y,v),A&&v.automargin){var M=s.bBox(p.node()),T=v.domain,k=h.w*(T.x[1]-T.x[0]),E=h.h*(T.y[1]-T.y[0]),R=(.5*k-m.r)/h.w,P=(.5*E-m.r)/h.h;i.autoMargin(e,"pie."+v.uid+".automargin",{xl:T.x[0]-R,xr:T.x[1]+R,yb:T.y[0]-P,yt:T.y[1]+P,l:Math.max(m.cx-m.r-M.left,0),r:Math.max(M.right-(m.cx+m.r),0),b:Math.max(M.bottom-(m.cy+m.r),0),t:Math.max(m.cy-m.r-M.top,0),pad:5})}}))}));setTimeout((function(){m.selectAll("tspan").each((function(){var e=r.select(this);e.attr("dy")&&e.attr("dy",e.attr("dy"))}))}),0)},formatSliceLabel:I,transformInsideText:w,determineInsideTextFont:b,positionTitleOutside:D,prerenderTitles:_,layoutAreas:O,attachFxHandlers:x,computeTransform:z}},68357:function(e,t,n){"use strict";var r=n(39898),i=n(63463),a=n(72597).resizeText;e.exports=function(e){var t=e._fullLayout._pielayer.selectAll(".trace");a(e,t,"pie"),t.each((function(e){var t=e[0].trace,n=r.select(this);n.style({opacity:t.opacity}),n.selectAll("path.surface").each((function(e){r.select(this).call(i,e,t)}))}))}},63463:function(e,t,n){"use strict";var r=n(7901),i=n(53581).castOption;e.exports=function(e,t,n){var a=n.marker.line,o=i(a.color,t.pts)||r.defaultLine,s=i(a.width,t.pts)||0;e.style("stroke-width",s).call(r.fill,t.color).call(r.stroke,o)}},10959:function(e,t,n){"use strict";var r=n(82196);e.exports={x:r.x,y:r.y,xy:{valType:"data_array",editType:"calc"},indices:{valType:"data_array",editType:"calc"},xbounds:{valType:"data_array",editType:"calc"},ybounds:{valType:"data_array",editType:"calc"},text:r.text,marker:{color:{valType:"color",arrayOk:!1,editType:"calc"},opacity:{valType:"number",min:0,max:1,dflt:1,arrayOk:!1,editType:"calc"},blend:{valType:"boolean",dflt:null,editType:"calc"},sizemin:{valType:"number",min:.1,max:2,dflt:.5,editType:"calc"},sizemax:{valType:"number",min:.1,dflt:20,editType:"calc"},border:{color:{valType:"color",arrayOk:!1,editType:"calc"},arearatio:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},editType:"calc"},editType:"calc"},transforms:void 0}},42743:function(e,t,n){"use strict";var r=n(9330).gl_pointcloud2d,i=n(78614),a=n(71739).findExtremes,o=n(34603);function s(e,t){this.scene=e,this.uid=t,this.type="pointcloud",this.pickXData=[],this.pickYData=[],this.xData=[],this.yData=[],this.textLabels=[],this.color="rgb(0, 0, 0)",this.name="",this.hoverinfo="all",this.idToIndex=new Int32Array(0),this.bounds=[0,0,0,0],this.pointcloudOptions={positions:new Float32Array(0),idToIndex:this.idToIndex,sizemin:.5,sizemax:12,color:[0,0,0,1],areaRatio:1,borderColor:[0,0,0,1]},this.pointcloud=r(e.glplot,this.pointcloudOptions),this.pointcloud._trace=this}var l=s.prototype;l.handlePick=function(e){var t=this.idToIndex[e.pointId];return{trace:this,dataCoord:e.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[2*t],this.pickXYData[2*t+1]]:[this.pickXData[t],this.pickYData[t]],textLabel:Array.isArray(this.textLabels)?this.textLabels[t]:this.textLabels,color:this.color,name:this.name,pointIndex:t,hoverinfo:this.hoverinfo}},l.update=function(e){this.index=e.index,this.textLabels=e.text,this.name=e.name,this.hoverinfo=e.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(e),this.color=o(e,{})},l.updateFast=function(e){var t,n,r,o,s,l,c=this.xData=this.pickXData=e.x,u=this.yData=this.pickYData=e.y,d=this.pickXYData=e.xy,h=e.xbounds&&e.ybounds,f=e.indices,p=this.bounds;if(d){if(r=d,t=d.length>>>1,h)p[0]=e.xbounds[0],p[2]=e.xbounds[1],p[1]=e.ybounds[0],p[3]=e.ybounds[1];else for(l=0;lp[2]&&(p[2]=o),sp[3]&&(p[3]=s);if(f)n=f;else for(n=new Int32Array(t),l=0;lp[2]&&(p[2]=o),sp[3]&&(p[3]=s);this.idToIndex=n,this.pointcloudOptions.idToIndex=n,this.pointcloudOptions.positions=r;var m=i(e.marker.color),g=i(e.marker.border.color),v=e.opacity*e.marker.opacity;m[3]*=v,this.pointcloudOptions.color=m;var y=e.marker.blend;if(null===y){y=c.length<100||u.length<100}this.pointcloudOptions.blend=y,g[3]*=v,this.pointcloudOptions.borderColor=g;var x=e.marker.sizemin,b=Math.max(e.marker.sizemax,e.marker.sizemin);this.pointcloudOptions.sizeMin=x,this.pointcloudOptions.sizeMax=b,this.pointcloudOptions.areaRatio=e.marker.border.arearatio,this.pointcloud.update(this.pointcloudOptions);var _=this.scene.xaxis,w=this.scene.yaxis,A=b/2||.5;e._extremes[_._id]=a(_,[p[0],p[2]],{ppad:A}),e._extremes[w._id]=a(w,[p[1],p[3]],{ppad:A})},l.dispose=function(){this.pointcloud.dispose()},e.exports=function(e,t){var n=new s(e,t.uid);return n.update(t),n}},33876:function(e,t,n){"use strict";var r=n(71828),i=n(10959);e.exports=function(e,t,n){function a(n,a){return r.coerce(e,t,i,n,a)}a("x"),a("y"),a("xbounds"),a("ybounds"),e.xy&&e.xy instanceof Float32Array&&(t.xy=e.xy),e.indices&&e.indices instanceof Int32Array&&(t.indices=e.indices),a("text"),a("marker.color",n),a("marker.opacity"),a("marker.blend"),a("marker.sizemin"),a("marker.sizemax"),a("marker.border.color",n),a("marker.border.arearatio"),t._length=null}},20593:function(e,t,n){"use strict";["*pointcloud* trace is deprecated!","Please consider switching to the *scattergl* trace type."].join(" ");e.exports={attributes:n(10959),supplyDefaults:n(33876),calc:n(36563),plot:n(42743),moduleType:"trace",name:"pointcloud",basePlotModule:n(4796),categories:["gl","gl2d","showLegend"],meta:{}}},39953:function(e,t,n){"use strict";var r=n(41940),i=n(9012),a=n(22399),o=n(77914),s=n(27670).Y,l=n(5386).f,c=n(50693),u=n(44467).templatedArray,d=n(12663).descriptionOnlyNumbers,h=n(1426).extendFlat,f=n(30962).overrideAll;(e.exports=f({hoverinfo:h({},i.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:o.hoverlabel,domain:s({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s",description:d("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:r({}),customdata:void 0,node:{label:{valType:"data_array",dflt:[]},groups:{valType:"info_array",impliedEdits:{x:[],y:[]},dimensions:2,freeLength:!0,dflt:[],items:{valType:"number",editType:"calc"}},x:{valType:"data_array",dflt:[]},y:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:a.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:.5,arrayOk:!0}},pad:{valType:"number",arrayOk:!1,min:0,dflt:20},thickness:{valType:"number",arrayOk:!1,min:1,dflt:20},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:o.hoverlabel,hovertemplate:l({},{keys:["value","label"]})},link:{arrowlen:{valType:"number",min:0,dflt:0},label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:a.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:0,arrayOk:!0}},source:{valType:"data_array",dflt:[]},target:{valType:"data_array",dflt:[]},value:{valType:"data_array",dflt:[]},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:o.hoverlabel,hovertemplate:l({},{keys:["value","label"]}),colorscales:u("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:h(c().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested")).transforms=void 0},75536:function(e,t,n){"use strict";var r=n(30962).overrideAll,i=n(27659).a0,a=n(60436),o=n(528),s=n(6964),l=n(28569),c=n(47322).prepSelect,u=n(71828),d=n(73972),h="sankey";function f(e,t){var n=e._fullData[t],r=e._fullLayout,i=r.dragmode,a="pan"===r.dragmode?"move":"crosshair",o=n._bgRect;if(o&&"pan"!==i&&"zoom"!==i){s(o,a);var h={_id:"x",c2p:u.identity,_offset:n._sankey.translateX,_length:n._sankey.width},f={_id:"y",c2p:u.identity,_offset:n._sankey.translateY,_length:n._sankey.height},p={gd:e,element:o.node(),plotinfo:{id:t,xaxis:h,yaxis:f,fillRangeItems:u.noop},subplot:t,xaxes:[h],yaxes:[f],doneFnCompleted:function(n){var r,i=e._fullData[t],a=i.node.groups.slice(),o=[];function s(e){for(var t=i._sankey.graph.nodes,n=0;ny&&(y=a.source[t]),a.target[t]>y&&(y=a.target[t]);var x,b=y+1;e.node._count=b;var _=e.node.groups,w={};for(t=0;t<_.length;t++){var A=_[t];for(x=0;x0&&s(E,b)&&s(C,b)&&(!w.hasOwnProperty(E)||!w.hasOwnProperty(C)||w[E]!==w[C])){w.hasOwnProperty(C)&&(C=w[C]),w.hasOwnProperty(E)&&(E=w[E]),C=+C,h[E=+E]=h[C]=!0;var D="";a.label&&a.label[t]&&(D=a.label[t]);var R=null;D&&f.hasOwnProperty(D)&&(R=f[D]),c.push({pointNumber:t,label:D,color:u?a.color[t]:a.color,customdata:d?a.customdata[t]:a.customdata,concentrationscale:R,source:E,target:C,value:+k}),T.source.push(E),T.target.push(C)}}var P=b+_.length,O=o(n.color),L=o(n.customdata),I=[];for(t=0;tb-1,childrenNodes:[],pointNumber:t,label:z,color:O?n.color[t]:n.color,customdata:L?n.customdata[t]:n.customdata})}var N=!1;return function(e,t,n){for(var a=i.init2dArray(e,0),o=0;o1}))}(P,T.source,T.target)&&(N=!0),{circular:N,links:c,nodes:I,groups:_,groupLookup:w}}e.exports=function(e,t){var n=c(t);return a({circular:n.circular,_nodes:n.nodes,_links:n.links,_groups:n.groups,_groupLookup:n.groupLookup})}},85247:function(e){"use strict";e.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:"linear",cn:{sankey:"sankey",sankeyLinks:"sankey-links",sankeyLink:"sankey-link",sankeyNodeSet:"sankey-node-set",sankeyNode:"sankey-node",nodeRect:"node-rect",nodeLabel:"node-label"}}},26857:function(e,t,n){"use strict";var r=n(71828),i=n(39953),a=n(7901),o=n(84267),s=n(27670).c,l=n(38048),c=n(44467),u=n(85501);function d(e,t){function n(n,a){return r.coerce(e,t,i.link.colorscales,n,a)}n("label"),n("cmin"),n("cmax"),n("colorscale")}e.exports=function(e,t,n,h){function f(n,a){return r.coerce(e,t,i,n,a)}var p=r.extendDeep(h.hoverlabel,e.hoverlabel),m=e.node,g=c.newContainer(t,"node");function v(e,t){return r.coerce(m,g,i.node,e,t)}v("label"),v("groups"),v("x"),v("y"),v("pad"),v("thickness"),v("line.color"),v("line.width"),v("hoverinfo",e.hoverinfo),l(m,g,v,p),v("hovertemplate");var y=h.colorway;v("color",g.label.map((function(e,t){return a.addOpacity(function(e){return y[e%y.length]}(t),.8)}))),v("customdata");var x=e.link||{},b=c.newContainer(t,"link");function _(e,t){return r.coerce(x,b,i.link,e,t)}_("label"),_("arrowlen"),_("source"),_("target"),_("value"),_("line.color"),_("line.width"),_("hoverinfo",e.hoverinfo),l(x,b,_,p),_("hovertemplate");var w,A=o(h.paper_bgcolor).getLuminance()<.333?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)";_("color",r.repeat(A,b.value.length)),_("customdata"),u(x,b,{name:"colorscales",handleItemDefaults:d}),s(t,h,f),f("orientation"),f("valueformat"),f("valuesuffix"),g.x.length&&g.y.length&&(w="freeform"),f("arrangement",w),r.coerceFont(f,"textfont",r.extendFlat({},h.font)),t._length=null}},29396:function(e,t,n){"use strict";e.exports={attributes:n(39953),supplyDefaults:n(26857),calc:n(92930),plot:n(60436),moduleType:"trace",name:"sankey",basePlotModule:n(75536),selectPoints:n(84564),categories:["noOpacity"],meta:{}}},60436:function(e,t,n){"use strict";var r=n(39898),i=n(71828),a=i.numberFormat,o=n(3393),s=n(30211),l=n(7901),c=n(85247).cn,u=i._;function d(e){return""!==e}function h(e,t){return e.filter((function(e){return e.key===t.traceId}))}function f(e,t){r.select(e).select("path").style("fill-opacity",t),r.select(e).select("rect").style("fill-opacity",t)}function p(e){r.select(e).select("text.name").style("fill","black")}function m(e){return function(t){return-1!==e.node.sourceLinks.indexOf(t.link)||-1!==e.node.targetLinks.indexOf(t.link)}}function g(e){return function(t){return-1!==t.node.sourceLinks.indexOf(e.link)||-1!==t.node.targetLinks.indexOf(e.link)}}function v(e,t,n){t&&n&&h(n,t).selectAll("."+c.sankeyLink).filter(m(t)).call(x.bind(0,t,n,!1))}function y(e,t,n){t&&n&&h(n,t).selectAll("."+c.sankeyLink).filter(m(t)).call(b.bind(0,t,n,!1))}function x(e,t,n,r){var i=r.datum().link.label;r.style("fill-opacity",(function(e){if(!e.link.concentrationscale)return.4})),i&&h(t,e).selectAll("."+c.sankeyLink).filter((function(e){return e.link.label===i})).style("fill-opacity",(function(e){if(!e.link.concentrationscale)return.4})),n&&h(t,e).selectAll("."+c.sankeyNode).filter(g(e)).call(v)}function b(e,t,n,r){var i=r.datum().link.label;r.style("fill-opacity",(function(e){return e.tinyColorAlpha})),i&&h(t,e).selectAll("."+c.sankeyLink).filter((function(e){return e.link.label===i})).style("fill-opacity",(function(e){return e.tinyColorAlpha})),n&&h(t,e).selectAll(c.sankeyNode).filter(g(e)).call(y)}function _(e,t){var n=e.hoverlabel||{},r=i.nestedProperty(n,t).get();return!Array.isArray(r)&&r}e.exports=function(e,t){for(var n=e._fullLayout,i=n._paper,h=n._size,m=0;m"),color:_(o,"bgcolor")||l.addOpacity(m.color,1),borderColor:_(o,"bordercolor"),fontFamily:_(o,"font.family"),fontSize:_(o,"font.size"),fontColor:_(o,"font.color"),nameLength:_(o,"namelength"),textAlign:_(o,"align"),idealAlign:r.event.x"),color:_(o,"bgcolor")||i.tinyColorHue,borderColor:_(o,"bordercolor"),fontFamily:_(o,"font.family"),fontSize:_(o,"font.size"),fontColor:_(o,"font.color"),nameLength:_(o,"namelength"),textAlign:_(o,"align"),idealAlign:"left",hovertemplate:o.hovertemplate,hovertemplateLabels:y,eventData:[i.node]},{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:e});f(w,.85),p(w)}}},unhover:function(t,i,a){!1!==e._fullLayout.hovermode&&(r.select(t).call(y,i,a),"skip"!==i.node.trace.node.hoverinfo&&(i.node.fullData=i.node.trace,e.emit("plotly_unhover",{event:r.event,points:[i.node]})),s.loneUnhover(n._hoverlayer.node()))},select:function(t,n,i){var a=n.node;a.originalEvent=r.event,e._hoverdata=[a],r.select(t).call(y,n,i),s.click(e,{target:!0})}}})}},3393:function(e,t,n){"use strict";var r=n(49887),i=n(81684).k4,a=n(39898),o=n(30838),s=n(86781),l=n(85247),c=n(84267),u=n(7901),d=n(91424),h=n(71828),f=h.strTranslate,p=h.strRotate,m=n(28984),g=m.keyFun,v=m.repeat,y=m.unwrap,x=n(63893),b=n(73972),_=n(18783),w=_.CAP_SHIFT,A=_.LINE_SPACING;function S(e,t,n){var r,i=y(t),a=i.trace,u=a.domain,d="h"===a.orientation,f=a.node.pad,p=a.node.thickness,m=e.width*(u.x[1]-u.x[0]),g=e.height*(u.y[1]-u.y[0]),v=i._nodes,x=i._links,b=i.circular;(r=b?s.sankeyCircular().circularLinkGap(0):o.sankey()).iterations(l.sankeyIterations).size(d?[m,g]:[g,m]).nodeWidth(p).nodePadding(f).nodeId((function(e){return e.pointNumber})).nodes(v).links(x);var _,w,A,S=r();for(var M in r.nodePadding()=i||(n=i-t.y0)>1e-6&&(t.y0+=n,t.y1+=n),i=t.y1+f}))}(function(e){var t,n,r=e.map((function(e,t){return{x0:e.x0,index:t}})).sort((function(e,t){return e.x0-t.x0})),i=[],a=-1,o=-1/0;for(_=0;_o+p&&(a+=1,t=s.x0),o=s.x0,i[a]||(i[a]=[]),i[a].push(s),n=t-s.x0,s.x0+=n,s.x1+=n}return i}(v=S.nodes));r.update(S)}return{circular:b,key:n,trace:a,guid:h.randstr(),horizontal:d,width:m,height:g,nodePad:a.node.pad,nodeLineColor:a.node.line.color,nodeLineWidth:a.node.line.width,linkLineColor:a.link.line.color,linkLineWidth:a.link.line.width,linkArrowLength:a.link.arrowlen,valueFormat:a.valueformat,valueSuffix:a.valuesuffix,textFont:a.textfont,translateX:u.x[0]*e.width+e.margin.l,translateY:e.height-u.y[1]*e.height+e.margin.t,dragParallel:d?g:m,dragPerpendicular:d?m:g,arrangement:a.arrangement,sankey:r,graph:S,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function M(e,t,n){var r=c(t.color),i=t.source.label+"|"+t.target.label+"__"+n;return t.trace=e.trace,t.curveNumber=e.trace.index,{circular:e.circular,key:i,traceId:e.key,pointNumber:t.pointNumber,link:t,tinyColorHue:u.tinyRGB(r),tinyColorAlpha:r.getAlpha(),linkPath:T,linkLineColor:e.linkLineColor,linkLineWidth:e.linkLineWidth,linkArrowLength:e.linkArrowLength,valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,parent:e,interactionState:e.interactionState,flow:t.flow}}function T(){return function(e){var t=e.linkArrowLength;if(e.link.circular)return function(e,t){var n=e.width/2,r=e.circularPathData;return"top"===e.circularLinkType?"M "+(r.targetX-t)+" "+(r.targetY+n)+" L"+(r.rightInnerExtent-t)+" "+(r.targetY+n)+"A"+(r.rightLargeArcRadius+n)+" "+(r.rightSmallArcRadius+n)+" 0 0 1 "+(r.rightFullExtent-n-t)+" "+(r.targetY-r.rightSmallArcRadius)+"L"+(r.rightFullExtent-n-t)+" "+r.verticalRightInnerExtent+"A"+(r.rightLargeArcRadius+n)+" "+(r.rightLargeArcRadius+n)+" 0 0 1 "+(r.rightInnerExtent-t)+" "+(r.verticalFullExtent-n)+"L"+r.leftInnerExtent+" "+(r.verticalFullExtent-n)+"A"+(r.leftLargeArcRadius+n)+" "+(r.leftLargeArcRadius+n)+" 0 0 1 "+(r.leftFullExtent+n)+" "+r.verticalLeftInnerExtent+"L"+(r.leftFullExtent+n)+" "+(r.sourceY-r.leftSmallArcRadius)+"A"+(r.leftLargeArcRadius+n)+" "+(r.leftSmallArcRadius+n)+" 0 0 1 "+r.leftInnerExtent+" "+(r.sourceY+n)+"L"+r.sourceX+" "+(r.sourceY+n)+"L"+r.sourceX+" "+(r.sourceY-n)+"L"+r.leftInnerExtent+" "+(r.sourceY-n)+"A"+(r.leftLargeArcRadius-n)+" "+(r.leftSmallArcRadius-n)+" 0 0 0 "+(r.leftFullExtent-n)+" "+(r.sourceY-r.leftSmallArcRadius)+"L"+(r.leftFullExtent-n)+" "+r.verticalLeftInnerExtent+"A"+(r.leftLargeArcRadius-n)+" "+(r.leftLargeArcRadius-n)+" 0 0 0 "+r.leftInnerExtent+" "+(r.verticalFullExtent+n)+"L"+(r.rightInnerExtent-t)+" "+(r.verticalFullExtent+n)+"A"+(r.rightLargeArcRadius-n)+" "+(r.rightLargeArcRadius-n)+" 0 0 0 "+(r.rightFullExtent+n-t)+" "+r.verticalRightInnerExtent+"L"+(r.rightFullExtent+n-t)+" "+(r.targetY-r.rightSmallArcRadius)+"A"+(r.rightLargeArcRadius-n)+" "+(r.rightSmallArcRadius-n)+" 0 0 0 "+(r.rightInnerExtent-t)+" "+(r.targetY-n)+"L"+(r.targetX-t)+" "+(r.targetY-n)+(t>0?"L"+r.targetX+" "+r.targetY:"")+"Z":"M "+(r.targetX-t)+" "+(r.targetY-n)+" L"+(r.rightInnerExtent-t)+" "+(r.targetY-n)+"A"+(r.rightLargeArcRadius+n)+" "+(r.rightSmallArcRadius+n)+" 0 0 0 "+(r.rightFullExtent-n-t)+" "+(r.targetY+r.rightSmallArcRadius)+"L"+(r.rightFullExtent-n-t)+" "+r.verticalRightInnerExtent+"A"+(r.rightLargeArcRadius+n)+" "+(r.rightLargeArcRadius+n)+" 0 0 0 "+(r.rightInnerExtent-t)+" "+(r.verticalFullExtent+n)+"L"+r.leftInnerExtent+" "+(r.verticalFullExtent+n)+"A"+(r.leftLargeArcRadius+n)+" "+(r.leftLargeArcRadius+n)+" 0 0 0 "+(r.leftFullExtent+n)+" "+r.verticalLeftInnerExtent+"L"+(r.leftFullExtent+n)+" "+(r.sourceY+r.leftSmallArcRadius)+"A"+(r.leftLargeArcRadius+n)+" "+(r.leftSmallArcRadius+n)+" 0 0 0 "+r.leftInnerExtent+" "+(r.sourceY-n)+"L"+r.sourceX+" "+(r.sourceY-n)+"L"+r.sourceX+" "+(r.sourceY+n)+"L"+r.leftInnerExtent+" "+(r.sourceY+n)+"A"+(r.leftLargeArcRadius-n)+" "+(r.leftSmallArcRadius-n)+" 0 0 1 "+(r.leftFullExtent-n)+" "+(r.sourceY+r.leftSmallArcRadius)+"L"+(r.leftFullExtent-n)+" "+r.verticalLeftInnerExtent+"A"+(r.leftLargeArcRadius-n)+" "+(r.leftLargeArcRadius-n)+" 0 0 1 "+r.leftInnerExtent+" "+(r.verticalFullExtent-n)+"L"+(r.rightInnerExtent-t)+" "+(r.verticalFullExtent-n)+"A"+(r.rightLargeArcRadius-n)+" "+(r.rightLargeArcRadius-n)+" 0 0 1 "+(r.rightFullExtent+n-t)+" "+r.verticalRightInnerExtent+"L"+(r.rightFullExtent+n-t)+" "+(r.targetY+r.rightSmallArcRadius)+"A"+(r.rightLargeArcRadius-n)+" "+(r.rightSmallArcRadius-n)+" 0 0 1 "+(r.rightInnerExtent-t)+" "+(r.targetY+n)+"L"+(r.targetX-t)+" "+(r.targetY+n)+(t>0?"L"+r.targetX+" "+r.targetY:"")+"Z"}(e.link,t);var n=Math.abs((e.link.target.x0-e.link.source.x1)/2);t>n&&(t=n);var r=e.link.source.x1,a=e.link.target.x0-t,o=i(r,a),s=o(.5),l=o(.5),c=e.link.y0-e.link.width/2,u=e.link.y0+e.link.width/2,d=e.link.y1-e.link.width/2,h=e.link.y1+e.link.width/2,f="M"+r+","+c,p="C"+s+","+c+" "+l+","+d+" "+a+","+d,m="C"+l+","+h+" "+s+","+u+" "+r+","+u,g=t>0?"L"+(a+t)+","+(d+e.link.width/2):"";return f+p+(g+="L"+a+","+h)+m+"Z"}}function k(e,t){var n=c(t.color),r=l.nodePadAcross,i=e.nodePad/2;t.dx=t.x1-t.x0,t.dy=t.y1-t.y0;var a=t.dx,o=Math.max(.5,t.dy),s="node_"+t.pointNumber;return t.group&&(s=h.randstr()),t.trace=e.trace,t.curveNumber=e.trace.index,{index:t.pointNumber,key:s,partOfGroup:t.partOfGroup||!1,group:t.group,traceId:e.key,trace:e.trace,node:t,nodePad:e.nodePad,nodeLineColor:e.nodeLineColor,nodeLineWidth:e.nodeLineWidth,textFont:e.textFont,size:e.horizontal?e.height:e.width,visibleWidth:Math.ceil(a),visibleHeight:o,zoneX:-r,zoneY:-i,zoneWidth:a+2*r,zoneHeight:o+2*i,labelY:e.horizontal?t.dy/2+1:t.dx/2+1,left:1===t.originalLayer,sizeAcross:e.width,forceLayouts:e.forceLayouts,horizontal:e.horizontal,darkBackground:n.getBrightness()<=128,tinyColorHue:u.tinyRGB(n),tinyColorAlpha:n.getAlpha(),valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,graph:e.graph,arrangement:e.arrangement,uniqueNodeLabelPathId:[e.guid,e.key,s].join("_"),interactionState:e.interactionState,figure:e}}function E(e){e.attr("transform",(function(e){return f(e.node.x0.toFixed(3),e.node.y0.toFixed(3))}))}function C(e){e.call(E)}function D(e,t){e.call(C),t.attr("d",T())}function R(e){e.attr("width",(function(e){return e.node.x1-e.node.x0})).attr("height",(function(e){return e.visibleHeight}))}function P(e){return e.link.width>1||e.linkLineWidth>0}function O(e){return f(e.translateX,e.translateY)+(e.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function L(e,t,n){e.on(".basic",null).on("mouseover.basic",(function(e){e.interactionState.dragInProgress||e.partOfGroup||(n.hover(this,e,t),e.interactionState.hovered=[this,e])})).on("mousemove.basic",(function(e){e.interactionState.dragInProgress||e.partOfGroup||(n.follow(this,e),e.interactionState.hovered=[this,e])})).on("mouseout.basic",(function(e){e.interactionState.dragInProgress||e.partOfGroup||(n.unhover(this,e,t),e.interactionState.hovered=!1)})).on("click.basic",(function(e){e.interactionState.hovered&&(n.unhover(this,e,t),e.interactionState.hovered=!1),e.interactionState.dragInProgress||e.partOfGroup||n.select(this,e,t)}))}function I(e,t,n,i){var o=a.behavior.drag().origin((function(e){return{x:e.node.x0+e.visibleWidth/2,y:e.node.y0+e.visibleHeight/2}})).on("dragstart",(function(a){if("fixed"!==a.arrangement&&(h.ensureSingle(i._fullLayout._infolayer,"g","dragcover",(function(e){i._fullLayout._dragCover=e})),h.raiseToTop(this),a.interactionState.dragInProgress=a.node,N(a.node),a.interactionState.hovered&&(n.nodeEvents.unhover.apply(0,a.interactionState.hovered),a.interactionState.hovered=!1),"snap"===a.arrangement)){var o=a.traceId+"|"+a.key;a.forceLayouts[o]?a.forceLayouts[o].alpha(1):function(e,t,n){!function(e){for(var t=0;t0&&r.forceLayouts[t].alpha(0)}}(0,t,i,n)).stop()}(0,o,a),function(e,t,n,r,i){window.requestAnimationFrame((function a(){var o;for(o=0;o0)window.requestAnimationFrame(a);else{var s=n.node.originalX;n.node.x0=s-n.visibleWidth/2,n.node.x1=s+n.visibleWidth/2,z(n,i)}}))}(e,t,a,o,i)}})).on("drag",(function(n){if("fixed"!==n.arrangement){var r=a.event.x,i=a.event.y;"snap"===n.arrangement?(n.node.x0=r-n.visibleWidth/2,n.node.x1=r+n.visibleWidth/2,n.node.y0=i-n.visibleHeight/2,n.node.y1=i+n.visibleHeight/2):("freeform"===n.arrangement&&(n.node.x0=r-n.visibleWidth/2,n.node.x1=r+n.visibleWidth/2),i=Math.max(0,Math.min(n.size-n.visibleHeight/2,i)),n.node.y0=i-n.visibleHeight/2,n.node.y1=i+n.visibleHeight/2),N(n.node),"snap"!==n.arrangement&&(n.sankey.update(n.graph),D(e.filter(F(n)),t))}})).on("dragend",(function(e){if("fixed"!==e.arrangement){e.interactionState.dragInProgress=!1;for(var t=0;tl&&D[v].gap;)v--;for(x=D[v].s,m=D.length-1;m>v;m--)D[m].s=x;for(;lk[d]&&d=0;d--){var h=e[d];if("scatter"===h.type&&h.xaxis===c.xaxis&&h.yaxis===c.yaxis){h.opacity=void 0;break}}}}}},17438:function(e,t,n){"use strict";var r=n(71828),i=n(73972),a=n(82196),o=n(47581),s=n(34098),l=n(67513),c=n(73927),u=n(565),d=n(49508),h=n(11058),f=n(94039),p=n(82410),m=n(28908),g=n(71828).coercePattern;e.exports=function(e,t,n,v){function y(n,i){return r.coerce(e,t,a,n,i)}var x=l(e,t,v,y);if(x||(t.visible=!1),t.visible){c(e,t,v,y),y("xhoverformat"),y("yhoverformat");var b=u(e,t,v,y);"group"===v.scattermode&&void 0===t.orientation&&y("orientation","v");var _=!b&&x=Math.min(t,n)&&p<=Math.max(t,n)?0:1/0}var r=Math.max(3,e.mrc||0),i=1-1/r,a=Math.abs(h.c2p(e.x)-p);return a=Math.min(t,n)&&m<=Math.max(t,n)?0:1/0}var r=Math.max(3,e.mrc||0),i=1-1/r,a=Math.abs(f.c2p(e.y)-m);return aY!==(B=L[P][1])>=Y&&(z=L[P-1][0],N=L[P][0],B-F&&(I=z+(N-z)*(Y-F)/(B-F),H=Math.min(H,I),W=Math.max(W,I)));H=Math.max(H,0),W=Math.min(W,h._length);var $=s.defaultLine;return s.opacity(d.fillcolor)?$=d.fillcolor:s.opacity((d.line||{}).color)&&($=d.line.color),r.extendFlat(e,{distance:e.maxHoverDistance,x0:H,x1:W,y0:Y,y1:Y,color:$,hovertemplate:!1}),delete e.index,d.text&&!Array.isArray(d.text)?e.text=String(d.text):e.text=d.name,[e]}}}},67368:function(e,t,n){"use strict";var r=n(34098);e.exports={hasLines:r.hasLines,hasMarkers:r.hasMarkers,hasText:r.hasText,isBubble:r.isBubble,attributes:n(82196),layoutAttributes:n(21479),supplyDefaults:n(17438),crossTraceDefaults:n(34936),supplyLayoutDefaults:n(79334),calc:n(47761).calc,crossTraceCalc:n(72626),arraysToCalcdata:n(75225),plot:n(32663),colorbar:n(4898),formatLabels:n(8225),style:n(16296).style,styleOnSelect:n(16296).styleOnSelect,hoverPoints:n(33720),selectPoints:n(98002),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:n(93612),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}},21479:function(e){"use strict";e.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}},79334:function(e,t,n){"use strict";var r=n(71828),i=n(21479);e.exports=function(e,t){var n,a,o="group"===t.barmode;"group"===t.scattermode&&(n="scattergap",a=o?t.bargap:.2,r.coerce(e,t,i,n,a))}},11058:function(e,t,n){"use strict";var r=n(71828).isArrayOrTypedArray,i=n(52075).hasColorscale,a=n(1586);e.exports=function(e,t,n,o,s,l){l||(l={});var c=(e.marker||{}).color;(s("line.color",n),i(e,"line"))?a(e,t,o,s,{prefix:"line.",cLetter:"c"}):s("line.color",!r(c)&&c||n);s("line.width"),l.noDash||s("line.dash"),l.backoff&&s("line.backoff")}},34621:function(e,t,n){"use strict";var r=n(91424),i=n(50606),a=i.BADNUM,o=i.LOG_CLIP,s=o+.5,l=o-.5,c=n(71828),u=c.segmentsIntersect,d=c.constrain,h=n(47581);e.exports=function(e,t){var n,i,o,f,p,m,g,v,y,x,b,_,w,A,S,M,T,k,E=t.trace||{},C=t.xaxis,D=t.yaxis,R="log"===C.type,P="log"===D.type,O=C._length,L=D._length,I=t.backoff,z=E.marker,N=t.connectGaps,F=t.baseTolerance,B=t.shape,j="linear"===B,U=E.fill&&"none"!==E.fill,V=[],H=h.minTolerance,W=e.length,G=new Array(W),q=0;function Y(n){var r=e[n];if(!r)return!1;var i=t.linearized?C.l2p(r.x):C.c2p(r.x),o=t.linearized?D.l2p(r.y):D.c2p(r.y);if(i===a){if(R&&(i=C.c2p(r.x,!0)),i===a)return!1;P&&o===a&&(i*=Math.abs(C._m*L*(C._m>0?s:l)/(D._m*O*(D._m>0?s:l)))),i*=1e3}if(o===a){if(P&&(o=D.c2p(r.y,!0)),o===a)return!1;o*=1e3}return[i,o]}function $(e,t,n,r){var i=n-e,a=r-t,o=.5-e,s=.5-t,l=i*i+a*a,c=i*o+a*s;if(c>0&&coe||e[1]le)return[d(e[0],ae,oe),d(e[1],se,le)]}function de(e,t){return e[0]===t[0]&&(e[0]===ae||e[0]===oe)||(e[1]===t[1]&&(e[1]===se||e[1]===le)||void 0)}function he(e,t,n){return function(r,i){var a=ue(r),o=ue(i),s=[];if(a&&o&&de(a,o))return s;a&&s.push(a),o&&s.push(o);var l=2*c.constrain((r[e]+i[e])/2,t,n)-((a||r)[e]+(o||i)[e]);l&&((a&&o?l>0===a[e]>o[e]?a:o:a||o)[e]+=l);return s}}function fe(e){var t=e[0],n=e[1],r=t===G[q-1][0],i=n===G[q-1][1];if(!r||!i)if(q>1){var a=t===G[q-2][0],o=n===G[q-2][1];r&&(t===ae||t===oe)&&a?o?q--:G[q-1]=e:i&&(n===se||n===le)&&o?a?q--:G[q-1]=e:G[q++]=e}else G[q++]=e}function pe(e){G[q-1][0]!==e[0]&&G[q-1][1]!==e[1]&&fe([Q,ee]),fe(e),te=null,Q=ee=0}"linear"===B||"spline"===B?re=function(e,t){for(var n=[],r=0,i=0;i<4;i++){var a=ce[i],o=u(e[0],e[1],t[0],t[1],a[0],a[1],a[2],a[3]);o&&(!r||Math.abs(o.x-n[0][0])>1||Math.abs(o.y-n[0][1])>1)&&(o=[o.x,o.y],r&&Z(o,e)oe?oe:0,J=t[1]le?le:0,K||J){if(q)if(te){var r=re(te,t);r.length>1&&(pe(r[0]),G[q++]=r[1])}else ne=re(G[q-1],t)[0],G[q++]=ne;else G[q++]=[K||t[0],J||t[1]];var i=G[q-1];K&&J&&(i[0]!==K||i[1]!==J)?(te&&(Q!==K&&ee!==J?fe(Q&&ee?function(e,t){var n=t[0]-e[0],r=(t[1]-e[1])/n;return(e[1]*t[0]-t[1]*e[0])/n>0?[r>0?ae:oe,le]:[r>0?oe:ae,se]}(te,t):[Q||K,ee||J]):Q&&ee&&fe([Q,ee])),fe([K,J])):Q-K&&ee-J&&fe([K||Q,J||ee]),te=t,Q=K,ee=J}else te&&pe(re(te,t)[0]),G[q++]=t}for(n=0;nX(m,ve))break;o=m,(w=y[0]*v[0]+y[1]*v[1])>b?(b=w,f=m,g=!1):w<_&&(_=w,p=m,g=!0)}if(g?(ge(f),o!==p&&ge(p)):(p!==i&&ge(p),o!==f&&ge(f)),ge(o),n>=e.length||!m)break;ge(m),i=m}}else ge(f)}te&&fe([Q||te[0],ee||te[1]]),V.push(G.slice(0,q))}var ye=B.slice(B.length-1);if(I&&"h"!==ye&&"v"!==ye){for(var xe=!1,be=-1,_e=[],we=0;we=0?l=f:(l=f=h,h++),l0?Math.max(n,a):0}}},4898:function(e){"use strict";e.exports={container:"marker",min:"cmin",max:"cmax"}},49508:function(e,t,n){"use strict";var r=n(7901),i=n(52075).hasColorscale,a=n(1586),o=n(34098);e.exports=function(e,t,n,s,l,c){var u=o.isBubble(e),d=(e.line||{}).color;(c=c||{},d&&(n=d),l("marker.symbol"),l("marker.opacity",u?.7:1),l("marker.size"),c.noAngle||(l("marker.angle"),c.noAngleRef||l("marker.angleref"),c.noStandOff||l("marker.standoff")),l("marker.color",n),i(e,"marker")&&a(e,t,s,l,{prefix:"marker.",cLetter:"c"}),c.noSelect||(l("selected.marker.color"),l("unselected.marker.color"),l("selected.marker.size"),l("unselected.marker.size")),c.noLine||(l("marker.line.color",d&&!Array.isArray(d)&&t.marker.color!==d?d:u?r.background:r.defaultLine),i(e,"marker.line")&&a(e,t,s,l,{prefix:"marker.line.",cLetter:"c"}),l("marker.line.width",u?1:0)),u&&(l("marker.sizeref"),l("marker.sizemin"),l("marker.sizemode")),c.gradient)&&("none"!==l("marker.gradient.type")&&l("marker.gradient.color"))}},73927:function(e,t,n){"use strict";var r=n(71828).dateTick0,i=n(50606).ONEWEEK;function a(e,t){return r(t,e%i===0?1:0)}e.exports=function(e,t,n,r,i){if(i||(i={x:!0,y:!0}),i.x){var o=r("xperiod");o&&(r("xperiod0",a(o,t.xcalendar)),r("xperiodalignment"))}if(i.y){var s=r("yperiod");s&&(r("yperiod0",a(s,t.ycalendar)),r("yperiodalignment"))}}},32663:function(e,t,n){"use strict";var r=n(39898),i=n(73972),a=n(71828),o=a.ensureSingle,s=a.identity,l=n(91424),c=n(34098),u=n(34621),d=n(68687),h=n(61082).tester;function f(e,t,n,d,f,p,m){var g,v=e._context.staticPlot;!function(e,t,n,i,o){var s=n.xaxis,l=n.yaxis,u=r.extent(a.simpleMap(s.range,s.r2c)),d=r.extent(a.simpleMap(l.range,l.r2c)),h=i[0].trace;if(!c.hasMarkers(h))return;var f=h.marker.maxdisplayed;if(0===f)return;var p=i.filter((function(e){return e.x>=u[0]&&e.x<=u[1]&&e.y>=d[0]&&e.y<=d[1]})),m=Math.ceil(p.length/f),g=0;o.forEach((function(e,n){var r=e[0].trace;c.hasMarkers(r)&&r.marker.maxdisplayed>0&&n0;function x(e){return y?e.transition():e}var b=n.xaxis,_=n.yaxis,w=d[0].trace,A=w.line,S=r.select(p),M=o(S,"g","errorbars"),T=o(S,"g","lines"),k=o(S,"g","points"),E=o(S,"g","text");if(i.getComponentMethod("errorbars","plot")(e,M,n,m),!0===w.visible){var C,D;x(S).style("opacity",w.opacity);var R=w.fill.charAt(w.fill.length-1);"x"!==R&&"y"!==R&&(R=""),d[0][n.isRangePlot?"nodeRangePlot3":"node3"]=S;var P,O,L="",I=[],z=w._prevtrace;z&&(L=z._prevRevpath||"",D=z._nextFill,I=z._polygons);var N,F,B,j,U,V,H,W="",G="",q=[],Y=a.noop;if(C=w._ownFill,c.hasLines(w)||"none"!==w.fill){for(D&&D.datum(d),-1!==["hv","vh","hvh","vhv"].indexOf(A.shape)?(N=l.steps(A.shape),F=l.steps(A.shape.split("").reverse().join(""))):N=F="spline"===A.shape?function(e){var t=e[e.length-1];return e.length>1&&e[0][0]===t[0]&&e[0][1]===t[1]?l.smoothclosed(e.slice(1),A.smoothing):l.smoothopen(e,A.smoothing)}:function(e){return"M"+e.join("L")},B=function(e){return F(e.reverse())},q=u(d,{xaxis:b,yaxis:_,trace:w,connectGaps:w.connectgaps,baseTolerance:Math.max(A.width||1,3)/4,shape:A.shape,backoff:A.backoff,simplify:A.simplify,fill:w.fill}),H=w._polygons=new Array(q.length),g=0;g0,g=d(e,t,n);((u=i.selectAll("g.trace").data(g,(function(e){return e[0].trace.uid}))).enter().append("g").attr("class",(function(e){return"trace scatter trace"+e[0].trace.uid})).style("stroke-miterlimit",2),u.order(),function(e,t,n){t.each((function(t){var i=o(r.select(this),"g","fills");l.setClipUrl(i,n.layerClipId,e);var a=t[0].trace,c=[];a._ownfill&&c.push("_ownFill"),a._nexttrace&&c.push("_nextFill");var u=i.selectAll("g").data(c,s);u.enter().append("g"),u.exit().each((function(e){a[e]=null})).remove(),u.order().each((function(e){a[e]=o(r.select(this),"path","js-fill")}))}))}(e,u,t),m)?(c&&(h=c()),r.transition().duration(a.duration).ease(a.easing).each("end",(function(){h&&h()})).each("interrupt",(function(){h&&h()})).each((function(){i.selectAll("g.trace").each((function(n,r){f(e,r,t,n,g,this,a)}))}))):u.each((function(n,r){f(e,r,t,n,g,this,a)}));p&&u.exit().remove(),i.selectAll("path:not([d])").remove()}},98002:function(e,t,n){"use strict";var r=n(34098);e.exports=function(e,t){var n,i,a,o,s=e.cd,l=e.xaxis,c=e.yaxis,u=[],d=s[0].trace;if(!r.hasMarkers(d)&&!r.hasText(d))return[];if(!1===t)for(n=0;n0){var h=i.c2l(u);i._lowerLogErrorBound||(i._lowerLogErrorBound=h),i._lowerErrorBound=Math.min(i._lowerLogErrorBound,h)}}else o[s]=[-l[0]*n,l[1]*n]}return o}e.exports=function(e,t,n){var r=[i(e.x,e.error_x,t[0],n.xaxis),i(e.y,e.error_y,t[1],n.yaxis),i(e.z,e.error_z,t[2],n.zaxis)],a=function(e){for(var t=0;t-1?-1:e.indexOf("right")>-1?1:0}function b(e){return null===e||void 0===e?0:e.indexOf("top")>-1?-1:e.indexOf("bottom")>-1?1:0}function _(e,t){return t(4*e)}function w(e){return f[e]}function A(e,t,n,r,i){var a=null;if(l.isArrayOrTypedArray(e)){a=[];for(var o=0;o=0){var m=function(e,t,n){var r,i=(n+1)%3,a=(n+2)%3,o=[],l=[];for(r=0;r=0&&d("surfacecolor",f||p);for(var m=["x","y","z"],g=0;g<3;++g){var v="projection."+m[g];d(v+".show")&&(d(v+".opacity"),d(v+".scale"))}var y=r.getComponentMethod("errorbars","supplyDefaults");y(e,t,f||p||n,{axis:"z"}),y(e,t,f||p||n,{axis:"y",inherit:"z"}),y(e,t,f||p||n,{axis:"x",inherit:"z"})}else t.visible=!1}},13551:function(e,t,n){"use strict";e.exports={plot:n(58925),attributes:n(44542),markerSymbols:n(87381),supplyDefaults:n(21428),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:n(36563),moduleType:"trace",name:"scatter3d",basePlotModule:n(58547),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}},97001:function(e,t,n){"use strict";var r=n(82196),i=n(9012),a=n(5386).f,o=n(5386).s,s=n(50693),l=n(1426).extendFlat,c=r.marker,u=r.line,d=c.line;e.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:l({},r.mode,{dflt:"markers"}),text:l({},r.text,{}),texttemplate:o({editType:"plot"},{keys:["a","b","text"]}),hovertext:l({},r.hovertext,{}),line:{color:u.color,width:u.width,dash:u.dash,backoff:u.backoff,shape:l({},u.shape,{values:["linear","spline"]}),smoothing:u.smoothing,editType:"calc"},connectgaps:r.connectgaps,fill:l({},r.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:r.fillcolor,marker:l({symbol:c.symbol,opacity:c.opacity,maxdisplayed:c.maxdisplayed,angle:c.angle,angleref:c.angleref,standoff:c.standoff,size:c.size,sizeref:c.sizeref,sizemin:c.sizemin,sizemode:c.sizemode,line:l({width:d.width,editType:"calc"},s("marker.line")),gradient:c.gradient,editType:"calc"},s("marker")),textfont:r.textfont,textposition:r.textposition,selected:r.selected,unselected:r.unselected,hoverinfo:l({},i.hoverinfo,{flags:["a","b","text","name"]}),hoveron:r.hoveron,hovertemplate:a()}},34618:function(e,t,n){"use strict";var r=n(92770),i=n(36922),a=n(75225),o=n(66279),s=n(47761).calcMarkerSize,l=n(22882);e.exports=function(e,t){var n=t._carpetTrace=l(e,t);if(n&&n.visible&&"legendonly"!==n.visible){var c;t.xaxis=n.xaxis,t.yaxis=n.yaxis;var u,d,h=t._length,f=new Array(h),p=!1;for(c=0;c")}return o}function y(e,t){var n;n=e.labelprefix&&e.labelprefix.length>0?e.labelprefix.replace(/ = $/,""):e._hovertitle,g.push(n+": "+t.toFixed(3)+e.labelsuffix)}}},46858:function(e,t,n){"use strict";e.exports={attributes:n(97001),supplyDefaults:n(98965),colorbar:n(4898),formatLabels:n(48953),calc:n(34618),plot:n(1913),style:n(16296).style,styleOnSelect:n(16296).styleOnSelect,hoverPoints:n(22931),selectPoints:n(98002),eventData:n(16165),moduleType:"trace",name:"scattercarpet",basePlotModule:n(93612),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}},1913:function(e,t,n){"use strict";var r=n(32663),i=n(89298),a=n(91424);e.exports=function(e,t,n,o){var s,l,c,u=n[0][0].carpet,d=i.getFromId(e,u.xaxis||"x"),h=i.getFromId(e,u.yaxis||"y"),f={xaxis:d,yaxis:h,plot:t.plot};for(s=0;s")}(c,m,e,l[0].t.labels),e.hovertemplate=c.hovertemplate,[e]}}},17988:function(e,t,n){"use strict";e.exports={attributes:n(19316),supplyDefaults:n(10659),colorbar:n(4898),formatLabels:n(82719),calc:n(84622),calcGeoJSON:n(89171).calcGeoJSON,plot:n(89171).plot,style:n(33095),styleOnSelect:n(16296).styleOnSelect,hoverPoints:n(14977),eventData:n(84084),selectPoints:n(20548),moduleType:"trace",name:"scattergeo",basePlotModule:n(44622),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}},89171:function(e,t,n){"use strict";var r=n(39898),i=n(71828),a=n(90973).getTopojsonFeatures,o=n(18214),s=n(41327),l=n(71739).findExtremes,c=n(50606).BADNUM,u=n(47761).calcMarkerSize,d=n(34098),h=n(33095);e.exports={calcGeoJSON:function(e,t){var n,r,i=e[0].trace,o=t[i.geo],d=o._subplot,h=i._length;if(Array.isArray(i.locations)){var f=i.locationmode,p="geojson-id"===f?s.extractTraceFeature(e):a(i,d.topojson);for(n=0;n=g,w=2*b,A={},S=l.makeCalcdata(t,"x"),M=y.makeCalcdata(t,"y"),T=s(t,l,"x",S),k=s(t,y,"y",M),E=T.vals,C=k.vals;t._x=E,t._y=C,t.xperiodalignment&&(t._origX=S,t._xStarts=T.starts,t._xEnds=T.ends),t.yperiodalignment&&(t._origY=M,t._yStarts=k.starts,t._yEnds=k.ends);var D=new Array(w),R=new Array(b);for(n=0;n1&&i.extendFlat(s.line,f.linePositions(e,n,r));if(s.errorX||s.errorY){var l=f.errorBarPositions(e,n,r,a,o);s.errorX&&i.extendFlat(s.errorX,l.x),s.errorY&&i.extendFlat(s.errorY,l.y)}s.text&&(i.extendFlat(s.text,{positions:r},f.textPosition(e,n,s.text,s.marker)),i.extendFlat(s.textSel,{positions:r},f.textPosition(e,n,s.text,s.markerSel)),i.extendFlat(s.textUnsel,{positions:r},f.textPosition(e,n,s.text,s.markerUnsel)));return s}(e,0,t,D,E,C),L=p(e,x);return d(o,t),_?O.marker&&(P=O.marker.sizeAvg||Math.max(O.marker.size,3)):P=c(t,b),u(e,t,l,y,E,C,P),O.errorX&&v(t,l,O.errorX),O.errorY&&v(t,y,O.errorY),O.fill&&!L.fill2d&&(L.fill2d=!0),O.marker&&!L.scatter2d&&(L.scatter2d=!0),O.line&&!L.line2d&&(L.line2d=!0),!O.errorX&&!O.errorY||L.error2d||(L.error2d=!0),O.text&&!L.glText&&(L.glText=!0),O.marker&&(O.marker.snap=b),L.lineOptions.push(O.line),L.errorXOptions.push(O.errorX),L.errorYOptions.push(O.errorY),L.fillOptions.push(O.fill),L.markerOptions.push(O.marker),L.markerSelectedOptions.push(O.markerSel),L.markerUnselectedOptions.push(O.markerUnsel),L.textOptions.push(O.text),L.textSelectedOptions.push(O.textSel),L.textUnselectedOptions.push(O.textUnsel),L.selectBatch.push([]),L.unselectBatch.push([]),A._scene=L,A.index=L.count,A.x=E,A.y=C,A.positions=D,L.count++,[{x:!1,y:!1,t:A,trace:t}]}},78232:function(e){"use strict";e.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:20,SYMBOL_STROKE:1,DOT_RE:/-dot/,OPEN_RE:/-open/,DASHES:{solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}}},19635:function(e,t,n){"use strict";var r=n(92770),i=n(82019),a=n(25075),o=n(73972),s=n(71828),l=n(91424),c=n(41675),u=n(81697).formatColor,d=n(34098),h=n(39984),f=n(68645),p=n(78232),m=n(37822).DESELECTDIM,g={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},v=n(23469).appendArrayPointValue;function y(e,t){var n,i=e._fullLayout,a=t._length,o=t.textfont,l=t.textposition,c=Array.isArray(l)?l:[l],u=o.color,d=o.size,h=o.family,f={},p=e._context.plotGlPixelRatio,m=t.texttemplate;if(m){f.text=[];var g=i._d3locale,y=Array.isArray(m),x=y?Math.min(m.length,a):a,b=y?function(e){return m[e]}:function(){return m};for(n=0;np.TOO_MANY_POINTS||d.hasMarkers(t)?"rect":"round";if(c&&t.connectgaps){var h=r[0],f=r[1];for(i=0;i1?l[i]:l[0]:l,p=Array.isArray(c)?c.length>1?c[i]:c[0]:c,m=g[f],v=g[p],y=u?u/.8+1:0,x=-v*y-.5*v;o.offset[i]=[m*y/h,x/h]}}return o}}},47148:function(e,t,n){"use strict";var r=n(71828),i=n(73972),a=n(68645),o=n(42341),s=n(47581),l=n(34098),c=n(67513),u=n(73927),d=n(49508),h=n(11058),f=n(28908),p=n(82410);e.exports=function(e,t,n,m){function g(n,i){return r.coerce(e,t,o,n,i)}var v=!!e.marker&&a.isOpenSymbol(e.marker.symbol),y=l.isBubble(e),x=c(e,t,m,g);if(x){u(e,t,m,g),g("xhoverformat"),g("yhoverformat");var b=x100},t.isDotSymbol=function(e){return"string"===typeof e?r.DOT_RE.test(e):e>200}},20794:function(e,t,n){"use strict";var r=n(73972),i=n(71828),a=n(34603);function o(e,t,n,o){var s=e.xa,l=e.ya,c=e.distance,u=e.dxy,d=e.index,h={pointNumber:d,x:t[d],y:n[d]};h.tx=Array.isArray(o.text)?o.text[d]:o.text,h.htx=Array.isArray(o.hovertext)?o.hovertext[d]:o.hovertext,h.data=Array.isArray(o.customdata)?o.customdata[d]:o.customdata,h.tp=Array.isArray(o.textposition)?o.textposition[d]:o.textposition;var f=o.textfont;f&&(h.ts=i.isArrayOrTypedArray(f.size)?f.size[d]:f.size,h.tc=Array.isArray(f.color)?f.color[d]:f.color,h.tf=Array.isArray(f.family)?f.family[d]:f.family);var p=o.marker;p&&(h.ms=i.isArrayOrTypedArray(p.size)?p.size[d]:p.size,h.mo=i.isArrayOrTypedArray(p.opacity)?p.opacity[d]:p.opacity,h.mx=i.isArrayOrTypedArray(p.symbol)?p.symbol[d]:p.symbol,h.ma=i.isArrayOrTypedArray(p.angle)?p.angle[d]:p.angle,h.mc=i.isArrayOrTypedArray(p.color)?p.color[d]:p.color);var m=p&&p.line;m&&(h.mlc=Array.isArray(m.color)?m.color[d]:m.color,h.mlw=i.isArrayOrTypedArray(m.width)?m.width[d]:m.width);var g=p&&p.gradient;g&&"none"!==g.type&&(h.mgt=Array.isArray(g.type)?g.type[d]:g.type,h.mgc=Array.isArray(g.color)?g.color[d]:g.color);var v=s.c2p(h.x,!0),y=l.c2p(h.y,!0),x=h.mrc||1,b=o.hoverlabel;b&&(h.hbg=Array.isArray(b.bgcolor)?b.bgcolor[d]:b.bgcolor,h.hbc=Array.isArray(b.bordercolor)?b.bordercolor[d]:b.bordercolor,h.hts=i.isArrayOrTypedArray(b.font.size)?b.font.size[d]:b.font.size,h.htc=Array.isArray(b.font.color)?b.font.color[d]:b.font.color,h.htf=Array.isArray(b.font.family)?b.font.family[d]:b.font.family,h.hnl=i.isArrayOrTypedArray(b.namelength)?b.namelength[d]:b.namelength);var _=o.hoverinfo;_&&(h.hi=Array.isArray(_)?_[d]:_);var w=o.hovertemplate;w&&(h.ht=Array.isArray(w)?w[d]:w);var A={};A[e.index]=h;var S=o._origX,M=o._origY,T=i.extendFlat({},e,{color:a(o,h),x0:v-x,x1:v+x,xLabelVal:S?S[d]:h.x,y0:y-x,y1:y+x,yLabelVal:M?M[d]:h.y,cd:A,distance:c,spikeDistance:u,hovertemplate:h.ht});return h.htx?T.text=h.htx:h.tx?T.text=h.tx:o.text&&(T.text=o.text),i.fillText(h,o,T),r.getComponentMethod("errorbars","hoverInfo")(h,o,T),T}e.exports={hoverPoints:function(e,t,n,r){var i,a,s,l,c,u,d,h,f,p,m=e.cd,g=m[0].t,v=m[0].trace,y=e.xa,x=e.ya,b=g.x,_=g.y,w=y.c2p(t),A=x.c2p(n),S=e.distance;if(g.tree){var M=y.p2c(w-S),T=y.p2c(w+S),k=x.p2c(A-S),E=x.p2c(A+S);i="x"===r?g.tree.range(Math.min(M,T),Math.min(x._rl[0],x._rl[1]),Math.max(M,T),Math.max(x._rl[0],x._rl[1])):g.tree.range(Math.min(M,T),Math.min(k,E),Math.max(M,T),Math.max(k,E))}else i=g.ids;var C=S;if("x"===r){var D=!!v.xperiodalignment,R=!!v.yperiodalignment;for(u=0;u=Math.min(P,O)&&w<=Math.max(P,O)?0:1/0}if(d=Math.min(L,I)&&A<=Math.max(L,I)?0:1/0}p=Math.sqrt(d*d+h*h),s=i[u]}}}else for(u=i.length-1;u>-1;u--)l=b[a=i[u]],c=_[a],d=y.c2p(l)-w,h=x.c2p(c)-A,(f=Math.sqrt(d*d+h*h))y.glText.length){var A=_-y.glText.length;for(m=0;mn&&(isNaN(t[r])||isNaN(t[r+1]));)r-=2;e.positions=t.slice(n,r+2)}return e})),y.line2d.update(y.lineOptions)),y.error2d){var M=(y.errorXOptions||[]).concat(y.errorYOptions||[]);y.error2d.update(M)}y.scatter2d&&y.scatter2d.update(y.markerOptions),y.fillOrder=s.repeat(null,_),y.fill2d&&(y.fillOptions=y.fillOptions.map((function(e,t){var r=n[t];if(e&&r&&r[0]&&r[0].trace){var i,a,o=r[0],s=o.trace,l=o.t,c=y.lineOptions[t],u=[];s._ownfill&&u.push(t),s._nexttrace&&u.push(t+1),u.length&&(y.fillOrder[t]=u);var d,h,f=[],p=c&&c.positions||l.positions;if("tozeroy"===s.fill){for(d=0;dd&&isNaN(p[h+1]);)h-=2;0!==p[d+1]&&(f=[p[d],0]),f=f.concat(p.slice(d,h+2)),0!==p[h+1]&&(f=f.concat([p[h],0]))}else if("tozerox"===s.fill){for(d=0;dd&&isNaN(p[h]);)h-=2;0!==p[d]&&(f=[0,p[d+1]]),f=f.concat(p.slice(d,h+2)),0!==p[h]&&(f=f.concat([0,p[h+1]]))}else if("toself"===s.fill||"tonext"===s.fill){for(f=[],i=0,e.splitNull=!0,a=0;a-1;for(m=0;m<_;m++){var C=n[m][0],D=C.trace,R=C.t,P=R.index,O=D._length,L=R.x,I=R.y;if(D.selectedpoints||k||E){if(k||(k=!0),D.selectedpoints){var z=y.selectBatch[P]=s.selIndices2selPoints(D),N={};for(g=0;g")}function u(e){return e+"\xb0"}}e.exports={hoverPoints:function(e,t,n){var o=e.cd,u=o[0].trace,d=e.xa,h=e.ya,f=e.subplot,p=[],m=l+u.uid+"-circle",g=u.cluster&&u.cluster.enabled;if(g){var v=f.map.queryRenderedFeatures(null,{layers:[m]});p=v.map((function(e){return e.id}))}var y=360*(t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360)),x=t-y;if(r.getClosest(o,(function(e){var t=e.lonlat;if(t[0]===s)return 1/0;if(g&&-1===p.indexOf(e.i+1))return 1/0;var r=i.modHalf(t[0],360),a=t[1],o=f.project([r,a]),l=o.x-d.c2p([x,a]),c=o.y-h.c2p([r,n]),u=Math.max(3,e.mrc||0);return Math.max(Math.sqrt(l*l+c*c)-u,1-3/u)}),e),!1!==e.index){var b=o[e.index],_=b.lonlat,w=[i.modHalf(_[0],360)+y,_[1]],A=d.c2p(w),S=h.c2p(w),M=b.mrc||1;e.x0=A-M,e.x1=A+M,e.y0=S-M,e.y1=S+M;var T={};T[u.subplot]={_subplot:f};var k=u._module.formatLabels(b,u,T);return e.lonLabel=k.lonLabel,e.latLabel=k.latLabel,e.color=a(u,b),e.extraText=c(u,b,o[0].t.labels),e.hovertemplate=u.hovertemplate,[e]}},getExtraText:c}},20467:function(e,t,n){"use strict";e.exports={attributes:n(99181),supplyDefaults:n(76645),colorbar:n(4898),formatLabels:n(15636),calc:n(84622),plot:n(86951),hoverPoints:n(28178).hoverPoints,eventData:n(53353),selectPoints:n(86387),styleOnSelect:function(e,t){t&&t[0].trace._glTrace.update(t)},moduleType:"trace",name:"scattermapbox",basePlotModule:n(50101),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}},86951:function(e,t,n){"use strict";var r=n(71828),i=n(15790),a=n(77734).traceLayerPrefix,o={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function s(e,t,n,r){this.type="scattermapbox",this.subplot=e,this.uid=t,this.clusterEnabled=n,this.isHidden=r,this.sourceIds={fill:"source-"+t+"-fill",line:"source-"+t+"-line",circle:"source-"+t+"-circle",symbol:"source-"+t+"-symbol",cluster:"source-"+t+"-circle",clusterCount:"source-"+t+"-circle"},this.layerIds={fill:a+t+"-fill",line:a+t+"-line",circle:a+t+"-circle",symbol:a+t+"-symbol",cluster:a+t+"-cluster",clusterCount:a+t+"-cluster-count"},this.below=null}var l=s.prototype;l.addSource=function(e,t,n){var i={type:"geojson",data:t.geojson};n&&n.enabled&&r.extendFlat(i,{cluster:!0,clusterMaxZoom:n.maxzoom}),this.subplot.map.addSource(this.sourceIds[e],i)},l.setSourceData=function(e,t){this.subplot.map.getSource(this.sourceIds[e]).setData(t.geojson)},l.addLayer=function(e,t,n){var r={type:t.type,id:this.layerIds[e],source:this.sourceIds[e],layout:t.layout,paint:t.paint};t.filter&&(r.filter=t.filter),this.subplot.addLayer(r,n)},l.update=function(e){var t=e[0].trace,n=this.subplot,r=n.map,a=i(n.gd,e),s=n.belowLookup["trace-"+this.uid],l=!(!t.cluster||!t.cluster.enabled),c=!!this.clusterEnabled,u=this;function d(e){c?function(e){for(var t=o.cluster,n=t.length-1;n>=0;n--){var i=t[n];r.removeLayer(u.layerIds[i])}e||r.removeSource(u.sourceIds.circle)}(e):function(e){for(var t=o.nonCluster,n=t.length-1;n>=0;n--){var i=t[n];r.removeLayer(u.layerIds[i]),e||r.removeSource(u.sourceIds[i])}}(e)}function h(e){l?function(e){e||u.addSource("circle",a.circle,t.cluster);for(var n=o.cluster,r=0;r=0;n--){var r=t[n];e.removeLayer(this.layerIds[r]),e.removeSource(this.sourceIds[r])}},e.exports=function(e,t){var n,r,a,l=t[0].trace,c=l.cluster&&l.cluster.enabled,u=!0!==l.visible,d=new s(e,l.uid,c,u),h=i(e.gd,t),f=d.below=e.belowLookup["trace-"+l.uid];if(c)for(d.addSource("circle",h.circle,l.cluster),n=0;n")}}e.exports={hoverPoints:function(e,t,n,a){var o=r(e,t,n,a);if(o&&!1!==o[0].index){var s=o[0];if(void 0===s.index)return o;var l=e.subplot,c=s.cd[s.index],u=s.trace;if(l.isPtInside(c))return s.xLabelVal=void 0,s.yLabelVal=void 0,i(c,u,l,s),s.hovertemplate=u.hovertemplate,o}},makeHoverPointText:i}},91271:function(e,t,n){"use strict";e.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:n(23580),categories:["polar","symbols","showLegend","scatter-like"],attributes:n(81245),supplyDefaults:n(22184).supplyDefaults,colorbar:n(4898),formatLabels:n(98608),calc:n(26442),plot:n(45162),style:n(16296).style,styleOnSelect:n(16296).styleOnSelect,hoverPoints:n(59150).hoverPoints,selectPoints:n(98002),meta:{}}},45162:function(e,t,n){"use strict";var r=n(32663),i=n(50606).BADNUM;e.exports=function(e,t,n){for(var a=t.layers.frontplot.select("g.scatterlayer"),o=t.xaxis,s=t.yaxis,l={xaxis:o,yaxis:s,plot:t.framework,layerClipId:t._hasClipOnAxisFalse?t.clipIds.forTraces:null},c=t.radialAxis,u=t.angularAxis,d=0;d=c&&(y.marker.cluster=p.tree),y.marker&&(y.markerSel.positions=y.markerUnsel.positions=y.marker.positions=_),y.line&&_.length>1&&l.extendFlat(y.line,s.linePositions(e,f,_)),y.text&&(l.extendFlat(y.text,{positions:_},s.textPosition(e,f,y.text,y.marker)),l.extendFlat(y.textSel,{positions:_},s.textPosition(e,f,y.text,y.markerSel)),l.extendFlat(y.textUnsel,{positions:_},s.textPosition(e,f,y.text,y.markerUnsel))),y.fill&&!h.fill2d&&(h.fill2d=!0),y.marker&&!h.scatter2d&&(h.scatter2d=!0),y.line&&!h.line2d&&(h.line2d=!0),y.text&&!h.glText&&(h.glText=!0),h.lineOptions.push(y.line),h.fillOptions.push(y.fill),h.markerOptions.push(y.marker),h.markerSelectedOptions.push(y.markerSel),h.markerUnselectedOptions.push(y.markerUnsel),h.textOptions.push(y.text),h.textSelectedOptions.push(y.textSel),h.textUnselectedOptions.push(y.textUnsel),h.selectBatch.push([]),h.unselectBatch.push([]),p.x=w,p.y=A,p.rawx=w,p.rawy=A,p.r=g,p.theta=v,p.positions=_,p._scene=h,p.index=h.count,h.count++}})),a(e,t,n)}},e.exports.reglPrecompiled={}},48300:function(e,t,n){"use strict";var r=n(5386).f,i=n(5386).s,a=n(1426).extendFlat,o=n(82196),s=n(9012),l=o.line;e.exports={mode:o.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:o.text,texttemplate:i({editType:"plot"},{keys:["real","imag","text"]}),hovertext:o.hovertext,line:{color:l.color,width:l.width,dash:l.dash,backoff:l.backoff,shape:a({},l.shape,{values:["linear","spline"]}),smoothing:l.smoothing,editType:"calc"},connectgaps:o.connectgaps,marker:o.marker,cliponaxis:a({},o.cliponaxis,{dflt:!1}),textposition:o.textposition,textfont:o.textfont,fill:a({},o.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:o.fillcolor,hoverinfo:a({},s.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:o.hoveron,hovertemplate:r(),selected:o.selected,unselected:o.unselected}},30621:function(e,t,n){"use strict";var r=n(92770),i=n(50606).BADNUM,a=n(36922),o=n(75225),s=n(66279),l=n(47761).calcMarkerSize;e.exports=function(e,t){for(var n=e._fullLayout,c=t.subplot,u=n[c].realaxis,d=n[c].imaginaryaxis,h=u.makeCalcdata(t,"real"),f=d.makeCalcdata(t,"imag"),p=t._length,m=new Array(p),g=0;g")}}e.exports={hoverPoints:function(e,t,n,a){var o=r(e,t,n,a);if(o&&!1!==o[0].index){var s=o[0];if(void 0===s.index)return o;var l=e.subplot,c=s.cd[s.index],u=s.trace;if(l.isPtInside(c))return s.xLabelVal=void 0,s.yLabelVal=void 0,i(c,u,l,s),s.hovertemplate=u.hovertemplate,o}},makeHoverPointText:i}},85956:function(e,t,n){"use strict";e.exports={moduleType:"trace",name:"scattersmith",basePlotModule:n(7504),categories:["smith","symbols","showLegend","scatter-like"],attributes:n(48300),supplyDefaults:n(65269),colorbar:n(4898),formatLabels:n(62047),calc:n(30621),plot:n(12480),style:n(16296).style,styleOnSelect:n(16296).styleOnSelect,hoverPoints:n(11350).hoverPoints,selectPoints:n(98002),meta:{}}},12480:function(e,t,n){"use strict";var r=n(32663),i=n(50606).BADNUM,a=n(23893).smith;e.exports=function(e,t,n){for(var o=t.layers.frontplot.select("g.scatterlayer"),s=t.xaxis,l=t.yaxis,c={xaxis:s,yaxis:l,plot:t.framework,layerClipId:t._hasClipOnAxisFalse?t.clipIds.forTraces:null},u=0;u"),o.hovertemplate=h.hovertemplate,a}function x(e,t){v.push(e._hovertitle+": "+t)}}},52979:function(e,t,n){"use strict";e.exports={attributes:n(50413),supplyDefaults:n(46008),colorbar:n(4898),formatLabels:n(93645),calc:n(54337),plot:n(7507),style:n(16296).style,styleOnSelect:n(16296).styleOnSelect,hoverPoints:n(47250),selectPoints:n(98002),eventData:n(4524),moduleType:"trace",name:"scatterternary",basePlotModule:n(61639),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}},7507:function(e,t,n){"use strict";var r=n(32663);e.exports=function(e,t,n){var i=t.plotContainer;i.select(".scatterlayer").selectAll("*").remove();for(var a=t.xaxis,o=t.yaxis,s={xaxis:a,yaxis:o,plot:i,layerClipId:t._hasClipOnAxisFalse?t.clipIdRelative:null},l=t.layers.frontplot.select("g.scatterlayer"),c=0;ch?b.sizeAvg||Math.max(b.size,3):a(t,x),f=0;fa&&l||i-1,R=!0;if(o(x)||!!f.selectedpoints||D){var P=f._length;if(f.selectedpoints){m.selectBatch=f.selectedpoints;var O=f.selectedpoints,L={};for(l=0;l1&&(u=m[y-1],h=g[y-1],p=v[y-1]),t=0;tu?"-":"+")+"x")).replace("y",(d>h?"-":"+")+"y")).replace("z",(f>p?"-":"+")+"z");var C=function(){y=0,T=[],k=[],E=[]};(!y||y2?e.slice(1,t-1):2===t?[(e[0]+e[1])/2]:e}function f(e){var t=e.length;return 1===t?[.5,.5]:[e[1]-e[0],e[t-1]-e[t-2]]}function p(e,t){var n=e.fullSceneLayout,i=e.dataScale,u=t._len,d={};function p(e,t){var r=n[t],o=i[c[t]];return a.simpleMap(e,(function(e){return r.d2l(e)*o}))}if(d.vectors=l(p(t._u,"xaxis"),p(t._v,"yaxis"),p(t._w,"zaxis"),u),!u)return{positions:[],cells:[]};var m=p(t._Xs,"xaxis"),g=p(t._Ys,"yaxis"),v=p(t._Zs,"zaxis");if(d.meshgrid=[m,g,v],d.gridFill=t._gridFill,t._slen)d.startingPositions=l(p(t._startsX,"xaxis"),p(t._startsY,"yaxis"),p(t._startsZ,"zaxis"));else{for(var y=g[0],x=h(m),b=h(v),_=new Array(x.length*b.length),w=0,A=0;A=0};y?(n=Math.min(v.length,b.length),l=function(e){return T(v[e])&&k(e)},d=function(e){return String(v[e])}):(n=Math.min(x.length,b.length),l=function(e){return T(x[e])&&k(e)},d=function(e){return String(x[e])}),w&&(n=Math.min(n,_.length));for(var E=0;E1){for(var P=a.randstr(),O=0;O"),name:M||L("name")?y.name:void 0,color:S("hoverlabel.bgcolor")||x.color,borderColor:S("hoverlabel.bordercolor"),fontFamily:S("hoverlabel.font.family"),fontSize:S("hoverlabel.font.size"),fontColor:S("hoverlabel.font.color"),nameLength:S("hoverlabel.namelength"),textAlign:S("hoverlabel.align"),hovertemplate:M,hovertemplateLabels:R,eventData:l};g&&(N.x0=E-i.rInscribed*i.rpx1,N.x1=E+i.rInscribed*i.rpx1,N.idealAlign=i.pxmid[0]<0?"left":"right"),v&&(N.x=E,N.idealAlign=E<0?"left":"right");var F=[];o.loneHover(N,{container:a._hoverlayer.node(),outerContainer:a._paper.node(),gd:n,inOut_bbox:F}),l[0].bbox=F[0],p._hasHoverLabel=!0}if(v){var B=e.select("path.surface");h.styleOne(B,i,y,{hovered:!0})}p._hasHoverEvent=!0,n.emit("plotly_hover",{points:l||[d(i,y,h.eventDataKeys)],event:r.event})}})),e.on("mouseout",(function(t){var i=n._fullLayout,a=n._fullData[p.index],s=r.select(this).datum();if(p._hasHoverEvent&&(t.originalEvent=r.event,n.emit("plotly_unhover",{points:[d(s,a,h.eventDataKeys)],event:r.event}),p._hasHoverEvent=!1),p._hasHoverLabel&&(o.loneUnhover(i._hoverlayer.node()),p._hasHoverLabel=!1),v){var l=e.select("path.surface");h.styleOne(l,s,a,{hovered:!1})}})),e.on("click",(function(e){var t=n._fullLayout,a=n._fullData[p.index],s=g&&(c.isHierarchyRoot(e)||c.isLeaf(e)),u=c.getPtId(e),f=c.isEntry(e)?c.findEntryWithChild(m,u):c.findEntryWithLevel(m,u),v=c.getPtId(f),y={points:[d(e,a,h.eventDataKeys)],event:r.event};s||(y.nextLevel=v);var x=l.triggerHandler(n,"plotly_"+p.type+"click",y);if(!1!==x&&t.hovermode&&(n._hoverdata=[d(e,a,h.eventDataKeys)],o.click(n,r.event)),!s&&!1!==x&&!n._dragging&&!n._transitioning){i.call("_storeDirectGUIEdit",a,t._tracePreGUI[a.uid],{level:a.level});var b={data:[{level:v}],traces:[p.index]},_={frame:{redraw:!1,duration:h.transitionTime},transition:{duration:h.transitionTime,easing:h.transitionEasing},mode:"immediate",fromcurrent:!0};o.loneUnhover(t._hoverlayer.node()),i.call("animate",n,b,_)}}))}},2791:function(e,t,n){"use strict";var r=n(71828),i=n(7901),a=n(6964),o=n(53581);function s(e){return e.data.data.pid}t.findEntryWithLevel=function(e,n){var r;return n&&e.eachAfter((function(e){if(t.getPtId(e)===n)return r=e.copy()})),r||e},t.findEntryWithChild=function(e,n){var r;return e.eachAfter((function(e){for(var i=e.children||[],a=0;a0)},t.getMaxDepth=function(e){return e.maxdepth>=0?e.maxdepth:1/0},t.isHeader=function(e,n){return!(t.isLeaf(e)||e.depth===n._maxDepth-1)},t.getParent=function(e,n){return t.findEntryWithLevel(e,s(n))},t.listPath=function(e,n){var r=e.parent;if(!r)return[];var i=n?[r.data[n]]:[r];return t.listPath(r,n).concat(i)},t.getPath=function(e){return t.listPath(e,"label").join("/")+"/"},t.formatValue=o.formatPieValue,t.formatPercent=function(e,t){var n=r.formatPercent(e,0);return"0%"===n&&(n=o.formatPiePercent(e,t)),n}},87619:function(e,t,n){"use strict";e.exports={moduleType:"trace",name:"sunburst",basePlotModule:n(66888),categories:[],animatable:!0,attributes:n(57564),layoutAttributes:n(2654),supplyDefaults:n(17094),supplyLayoutDefaults:n(57034),calc:n(52147).calc,crossTraceCalc:n(52147).crossTraceCalc,plot:n(24714).plot,style:n(29969).style,colorbar:n(4898),meta:{}}},2654:function(e){"use strict";e.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},57034:function(e,t,n){"use strict";var r=n(71828),i=n(2654);e.exports=function(e,t){function n(n,a){return r.coerce(e,t,i,n,a)}n("sunburstcolorway",t.colorway),n("extendsunburstcolors")}},24714:function(e,t,n){"use strict";var r=n(39898),i=n(674),a=n(81684).sX,o=n(91424),s=n(71828),l=n(63893),c=n(72597),u=c.recordMinTextSize,d=c.clearMinTextSize,h=n(14575),f=n(53581).getRotationAngle,p=h.computeTransform,m=h.transformInsideText,g=n(29969).styleOne,v=n(16688).resizeText,y=n(83523),x=n(7055),b=n(2791);function _(e,n,c,d){var h=e._context.staticPlot,v=e._fullLayout,_=!v.uniformtext.mode&&b.hasTransition(d),A=r.select(c).selectAll("g.slice"),S=n[0],M=S.trace,T=S.hierarchy,k=b.findEntryWithLevel(T,M.level),E=b.getMaxDepth(M),C=v._size,D=M.domain,R=C.w*(D.x[1]-D.x[0]),P=C.h*(D.y[1]-D.y[0]),O=.5*Math.min(R,P),L=S.cx=C.l+C.w*(D.x[1]+D.x[0])/2,I=S.cy=C.t+C.h*(1-D.y[0])-P/2;if(!k)return A.remove();var z=null,N={};_&&A.each((function(e){N[b.getPtId(e)]={rpx0:e.rpx0,rpx1:e.rpx1,x0:e.x0,x1:e.x1,transform:e.transform},!z&&b.isEntry(e)&&(z=e)}));var F=function(e){return i.partition().size([2*Math.PI,e.height+1])(e)}(k).descendants(),B=k.height+1,j=0,U=E;S.hasMultipleRoots&&b.isHierarchyRoot(k)&&(F=F.slice(1),B-=1,j=1,U+=1),F=F.filter((function(e){return e.y1<=U}));var V=f(M.rotation);V&&F.forEach((function(e){e.x0+=V,e.x1+=V}));var H=Math.min(B,E),W=function(e){return(e-j)/H*O},G=function(e,t){return[e*Math.cos(t),-e*Math.sin(t)]},q=function(e){return s.pathAnnulus(e.rpx0,e.rpx1,e.x0,e.x1,L,I)},Y=function(e){return L+w(e)[0]*(e.transform.rCenter||0)+(e.transform.x||0)},$=function(e){return I+w(e)[1]*(e.transform.rCenter||0)+(e.transform.y||0)};(A=A.data(F,b.getPtId)).enter().append("g").classed("slice",!0),_?A.exit().transition().each((function(){var e=r.select(this);e.select("path.surface").transition().attrTween("d",(function(e){var t=function(e){var t,n=b.getPtId(e),r=N[n],i=N[b.getPtId(k)];if(i){var o=(e.x1>i.x1?2*Math.PI:0)+V;t=e.rpx1X?2*Math.PI:0)+V;t={x0:i,x1:i}}else t={rpx0:O,rpx1:O},s.extendFlat(t,J(e));else t={rpx0:0,rpx1:0};else t={x0:V,x1:V};return a(t,r)}(e);return function(e){return q(t(e))}})):d.attr("d",q),c.call(y,k,e,n,{eventDataKeys:x.eventDataKeys,transitionTime:x.CLICK_TRANSITION_TIME,transitionEasing:x.CLICK_TRANSITION_EASING}).call(b.setSliceCursor,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:e._transitioning}),d.call(g,i,M);var f=s.ensureSingle(c,"g","slicetext"),w=s.ensureSingle(f,"text","",(function(e){e.attr("data-notex",1)})),A=s.ensureUniformFontSize(e,b.determineTextFont(M,i,v.font));w.text(t.formatSliceLabel(i,k,M,n,v)).classed("slicetext",!0).attr("text-anchor","middle").call(o.font,A).call(l.convertToTspans,e);var T=o.bBox(w.node());i.transform=m(T,i,S),i.transform.targetX=Y(i),i.transform.targetY=$(i);var E=function(e,t){var n=e.transform;return p(n,t),n.fontSize=A.size,u(M.type,n,v),s.getTextTransform(n)};_?w.transition().attrTween("transform",(function(e){var t=function(e){var t,n=N[b.getPtId(e)],r=e.transform;if(n)t=n;else if(t={rpx1:e.rpx1,transform:{textPosAngle:r.textPosAngle,scale:0,rotate:r.rotate,rCenter:r.rCenter,x:r.x,y:r.y}},z)if(e.parent)if(X){var i=e.x1>X?2*Math.PI:0;t.x0=t.x1=i}else s.extendFlat(t,J(e));else t.x0=t.x1=V;else t.x0=t.x1=V;var o=a(t.transform.textPosAngle,e.transform.textPosAngle),l=a(t.rpx1,e.rpx1),c=a(t.x0,e.x0),d=a(t.x1,e.x1),h=a(t.transform.scale,r.scale),f=a(t.transform.rotate,r.rotate),p=0===r.rCenter?3:0===t.transform.rCenter?1/3:1,m=a(t.transform.rCenter,r.rCenter),g=function(e){return m(Math.pow(e,p))};return function(e){var t=l(e),n=c(e),i=d(e),a=g(e),s={pxmid:G(t,(n+i)/2),rpx1:t,transform:{textPosAngle:o(e),rCenter:a,x:r.x,y:r.y}};return u(M.type,r,v),{transform:{targetX:Y(s),targetY:$(s),scale:h(e),rotate:f(e),rCenter:a}}}}(e);return function(e){return E(t(e),T)}})):w.attr("transform",E(i,T))}))}function w(e){return t=e.rpx1,n=e.transform.textPosAngle,[t*Math.sin(n),-t*Math.cos(n)];var t,n}t.plot=function(e,t,n,i){var a,o,s=e._fullLayout,l=s._sunburstlayer,c=!n,u=!s.uniformtext.mode&&b.hasTransition(n);(d("sunburst",s),(a=l.selectAll("g.trace.sunburst").data(t,(function(e){return e[0].trace.uid}))).enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),a.order(),u)?(i&&(o=i()),r.transition().duration(n.duration).ease(n.easing).each("end",(function(){o&&o()})).each("interrupt",(function(){o&&o()})).each((function(){l.selectAll("g.trace").each((function(t){_(e,t,this,n)}))}))):(a.each((function(t){_(e,t,this,n)})),s.uniformtext.mode&&v(e,s._sunburstlayer.selectAll(".trace"),"sunburst"));c&&a.exit().remove()},t.formatSliceLabel=function(e,t,n,r,i){var a=n.texttemplate,o=n.textinfo;if(!a&&(!o||"none"===o))return"";var l=i.separators,c=r[0],u=e.data.data,d=c.hierarchy,h=b.isHierarchyRoot(e),f=b.getParent(d,e),p=b.getValue(e);if(!a){var m,g=o.split("+"),v=function(e){return-1!==g.indexOf(e)},y=[];if(v("label")&&u.label&&y.push(u.label),u.hasOwnProperty("v")&&v("value")&&y.push(b.formatValue(u.v,l)),!h){v("current path")&&y.push(b.getPath(e.data));var x=0;v("percent parent")&&x++,v("percent entry")&&x++,v("percent root")&&x++;var _=x>1;if(x){var w,A=function(e){m=b.formatPercent(w,l),_&&(m+=" of "+e),y.push(m)};v("percent parent")&&!h&&(w=p/b.getValue(f),A("parent")),v("percent entry")&&(w=p/b.getValue(t),A("entry")),v("percent root")&&(w=p/b.getValue(d),A("root"))}}return v("text")&&(m=s.castOption(n,u.i,"text"),s.isValidTextValue(m)&&y.push(m)),y.join("
")}var S=s.castOption(n,u.i,"texttemplate");if(!S)return"";var M={};u.label&&(M.label=u.label),u.hasOwnProperty("v")&&(M.value=u.v,M.valueLabel=b.formatValue(u.v,l)),M.currentPath=b.getPath(e.data),h||(M.percentParent=p/b.getValue(f),M.percentParentLabel=b.formatPercent(M.percentParent,l),M.parent=b.getPtLabel(f)),M.percentEntry=p/b.getValue(t),M.percentEntryLabel=b.formatPercent(M.percentEntry,l),M.entry=b.getPtLabel(t),M.percentRoot=p/b.getValue(d),M.percentRootLabel=b.formatPercent(M.percentRoot,l),M.root=b.getPtLabel(d),u.hasOwnProperty("color")&&(M.color=u.color);var T=s.castOption(n,u.i,"text");return(s.isValidTextValue(T)||""===T)&&(M.text=T),M.customdata=s.castOption(n,u.i,"customdata"),s.texttemplateString(S,M,i._d3locale,M,n._meta||{})}},29969:function(e,t,n){"use strict";var r=n(39898),i=n(7901),a=n(71828),o=n(72597).resizeText;function s(e,t,n){var r=t.data.data,o=!t.children,s=r.i,l=a.castOption(n,s,"marker.line.color")||i.defaultLine,c=a.castOption(n,s,"marker.line.width")||0;e.style("stroke-width",c).call(i.fill,r.color).call(i.stroke,l).style("opacity",o?n.leaf.opacity:null)}e.exports={style:function(e){var t=e._fullLayout._sunburstlayer.selectAll(".trace");o(e,t,"sunburst"),t.each((function(e){var t=r.select(this),n=e[0].trace;t.style("opacity",n.opacity),t.selectAll("path.surface").each((function(e){r.select(this).call(s,e,n)}))}))},styleOne:s}},54532:function(e,t,n){"use strict";var r=n(7901),i=n(50693),a=n(12663).axisHoverFormat,o=n(5386).f,s=n(9012),l=n(1426).extendFlat,c=n(30962).overrideAll;function u(e){return{show:{valType:"boolean",dflt:!1},start:{valType:"number",dflt:null,editType:"plot"},end:{valType:"number",dflt:null,editType:"plot"},size:{valType:"number",dflt:null,min:0,editType:"plot"},project:{x:{valType:"boolean",dflt:!1},y:{valType:"boolean",dflt:!1},z:{valType:"boolean",dflt:!1}},color:{valType:"color",dflt:r.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:r.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var d=e.exports=c(l({z:{valType:"data_array"},x:{valType:"data_array"},y:{valType:"data_array"},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:o(),xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},i("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:u(),y:u(),z:u()},hidesurface:{valType:"boolean",dflt:!1},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4},z:{valType:"number",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8},diffuse:{valType:"number",min:0,max:1,dflt:.8},specular:{valType:"number",min:0,max:2,dflt:.05},roughness:{valType:"number",min:0,max:1,dflt:.5},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},_deprecated:{zauto:l({},i.zauto,{}),zmin:l({},i.zmin,{}),zmax:l({},i.zmax,{})},hoverinfo:l({},s.hoverinfo),showlegend:l({},s.showlegend,{dflt:!1})}),"calc","nested");d.x.editType=d.y.editType=d.z.editType="calc+clearAxisTypes",d.transforms=void 0},18396:function(e,t,n){"use strict";var r=n(78803);e.exports=function(e,t){t.surfacecolor?r(e,t,{vals:t.surfacecolor,containerStr:"",cLetter:"c"}):r(e,t,{vals:t.z,containerStr:"",cLetter:"c"})}},43768:function(e,t,n){"use strict";var r=n(9330).gl_surface3d,i=n(9330).ndarray,a=n(9330).ndarray_linear_interpolate.d2,o=n(824),s=n(43907),l=n(71828).isArrayOrTypedArray,c=n(81697).parseColorScale,u=n(78614),d=n(21081).extractOpts;function h(e,t,n){this.scene=e,this.uid=n,this.surface=t,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,null,null],this.contourEnd=[null,null,null],this.contourSize=[0,0,0],this.minValues=[1/0,1/0,1/0],this.maxValues=[-1/0,-1/0,-1/0],this.dataScaleX=1,this.dataScaleY=1,this.refineData=!0,this.objectOffset=[0,0,0]}var f=h.prototype;f.getXat=function(e,t,n,r){var i=l(this.data.x)?l(this.data.x[0])?this.data.x[t][e]:this.data.x[e]:e;return void 0===n?i:r.d2l(i,0,n)},f.getYat=function(e,t,n,r){var i=l(this.data.y)?l(this.data.y[0])?this.data.y[t][e]:this.data.y[t]:t;return void 0===n?i:r.d2l(i,0,n)},f.getZat=function(e,t,n,r){var i=this.data.z[t][e];return null===i&&this.data.connectgaps&&this.data._interpolatedZ&&(i=this.data._interpolatedZ[t][e]),void 0===n?i:r.d2l(i,0,n)},f.handlePick=function(e){if(e.object===this.surface){var t=(e.data.index[0]-1)/this.dataScaleX-1,n=(e.data.index[1]-1)/this.dataScaleY-1,r=Math.max(Math.min(Math.round(t),this.data.z[0].length-1),0),i=Math.max(Math.min(Math.round(n),this.data._ylength-1),0);e.index=[r,i],e.traceCoordinate=[this.getXat(r,i),this.getYat(r,i),this.getZat(r,i)],e.dataCoordinate=[this.getXat(r,i,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(r,i,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(r,i,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var a=0;a<3;a++){var o=e.dataCoordinate[a];null!==o&&void 0!==o&&(e.dataCoordinate[a]*=this.scene.dataScale[a])}var s=this.data.hovertext||this.data.text;return Array.isArray(s)&&s[i]&&void 0!==s[i][r]?e.textLabel=s[i][r]:e.textLabel=s||"",e.data.dataCoordinate=e.dataCoordinate.slice(),this.surface.highlight(e.data),this.scene.glplot.spikes.position=e.dataCoordinate,!0}};var p=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999];function m(e,t){if(e0){n=p[r];break}return n}function y(e,t){if(!(e<1||t<1)){for(var n=g(e),r=g(t),i=1,a=0;a_;)n--,n/=v(n),++n1?r:1},f.refineCoords=function(e){for(var t=this.dataScaleX,n=this.dataScaleY,r=e[0].shape[0],a=e[0].shape[1],o=0|Math.floor(e[0].shape[0]*t+1),s=0|Math.floor(e[0].shape[1]*n+1),l=1+r+1,c=1+a+1,u=i(new Float32Array(l*c),[l,c]),d=[1/t,0,0,0,1/n,0,0,0,1],h=0;h0&&null!==this.contourStart[e]&&null!==this.contourEnd[e]&&this.contourEnd[e]>this.contourStart[e]))for(i[e]=!0,t=this.contourStart[e];ta&&(this.minValues[t]=a),this.maxValues[t]",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:"cubic-out",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:"cubic-out",uplift:5,wrapSpacer:" ",wrapSplitCharacter:" ",cn:{table:"table",tableControlView:"table-control-view",scrollBackground:"scroll-background",yColumn:"y-column",columnBlock:"column-block",scrollAreaClip:"scroll-area-clip",scrollAreaClipRect:"scroll-area-clip-rect",columnBoundary:"column-boundary",columnBoundaryClippath:"column-boundary-clippath",columnBoundaryRect:"column-boundary-rect",columnCells:"column-cells",columnCell:"column-cell",cellRect:"cell-rect",cellText:"cell-text",cellTextHolder:"cell-text-holder",scrollbarKit:"scrollbar-kit",scrollbar:"scrollbar",scrollbarSlider:"scrollbar-slider",scrollbarGlyph:"scrollbar-glyph",scrollbarCaptureZone:"scrollbar-capture-zone"}}},51018:function(e,t,n){"use strict";var r=n(49850),i=n(1426).extendFlat,a=n(92770);function o(e){if(Array.isArray(e)){for(var t=0,n=0;n=t||c===e.length-1)&&(r[i]=o,o.key=l++,o.firstRowIndex=s,o.lastRowIndex=c,o={firstRowIndex:null,lastRowIndex:null,rows:[]},i+=a,s=c+1,a=0);return r}e.exports=function(e,t){var n=l(t.cells.values),f=function(e){return e.slice(t.header.values.length,e.length)},p=l(t.header.values);p.length&&!p[0].length&&(p[0]=[""],p=l(p));var m=p.concat(f(n).map((function(){return c((p[0]||[""]).length)}))),g=t.domain,v=Math.floor(e._fullLayout._size.w*(g.x[1]-g.x[0])),y=Math.floor(e._fullLayout._size.h*(g.y[1]-g.y[0])),x=t.header.values.length?m[0].map((function(){return t.header.height})):[r.emptyHeaderHeight],b=n.length?n[0].map((function(){return t.cells.height})):[],_=x.reduce(s,0),w=h(b,y-_+r.uplift),A=d(h(x,_),[]),S=d(w,A),M={},T=t._fullInput.columnorder.concat(f(n.map((function(e,t){return t})))),k=m.map((function(e,n){var r=Array.isArray(t.columnwidth)?t.columnwidth[Math.min(n,t.columnwidth.length-1)]:t.columnwidth;return a(r)?Number(r):1})),E=k.reduce(s,0);k=k.map((function(e){return e/E*v}));var C=Math.max(o(t.header.line.width),o(t.cells.line.width)),D={key:t.uid+e._context.staticPlot,translateX:g.x[0]*e._fullLayout._size.w,translateY:e._fullLayout._size.h*(1-g.y[1]),size:e._fullLayout._size,width:v,maxLineWidth:C,height:y,columnOrder:T,groupHeight:y,rowBlocks:S,headerRowBlocks:A,scrollY:0,cells:i({},t.cells,{values:n}),headerCells:i({},t.header,{values:m}),gdColumns:m.map((function(e){return e[0]})),gdColumnsOriginalOrder:m.map((function(e){return e[0]})),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:m.map((function(e,t){var n=M[e];return M[e]=(n||0)+1,{key:e+"__"+M[e],label:e,specIndex:t,xIndex:T[t],xScale:u,x:void 0,calcdata:void 0,columnWidth:k[t]}}))};return D.columns.forEach((function(e){e.calcdata=D,e.x=u(e)})),D}},56269:function(e,t,n){"use strict";var r=n(1426).extendFlat;t.splitToPanels=function(e){var t=[0,0],n=r({},e,{key:"header",type:"header",page:0,prevPages:t,currentRepaint:[null,null],dragHandle:!0,values:e.calcdata.headerCells.values[e.specIndex],rowBlocks:e.calcdata.headerRowBlocks,calcdata:r({},e.calcdata,{cells:e.calcdata.headerCells})});return[r({},e,{key:"cells1",type:"cells",page:0,prevPages:t,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks}),r({},e,{key:"cells2",type:"cells",page:1,prevPages:t,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks}),n]},t.splitToCells=function(e){var t=function(e){var t=e.rowBlocks[e.page],n=t?t.rows[0].rowIndex:0,r=t?n+t.rows.length:0;return[n,r]}(e);return(e.values||[]).slice(t[0],t[1]).map((function(n,r){return{keyWithinBlock:r+("string"===typeof n&&n.match(/[<$&> ]/)?"_keybuster_"+Math.random():""),key:t[0]+r,column:e,calcdata:e.calcdata,page:e.page,rowBlocks:e.rowBlocks,value:n}}))}},39754:function(e,t,n){"use strict";var r=n(71828),i=n(44464),a=n(27670).c;e.exports=function(e,t,n,o){function s(n,a){return r.coerce(e,t,i,n,a)}a(t,o,s),s("columnwidth"),s("header.values"),s("header.format"),s("header.align"),s("header.prefix"),s("header.suffix"),s("header.height"),s("header.line.width"),s("header.line.color"),s("header.fill.color"),r.coerceFont(s,"header.font",r.extendFlat({},o.font)),function(e,t){for(var n=e.columnorder||[],r=e.header.values.length,i=n.slice(0,r),a=i.slice().sort((function(e,t){return e-t})),o=i.map((function(e){return a.indexOf(e)})),s=o.length;s/i),l=!o||s;e.mayHaveMarkup=o&&i.match(/[<&>]/);var c,u="string"===typeof(c=i)&&c.match(r.latexCheck);e.latex=u;var d,h,f=u?"":A(e.calcdata.cells.prefix,t,n)||"",p=u?"":A(e.calcdata.cells.suffix,t,n)||"",m=u?null:A(e.calcdata.cells.format,t,n)||null,g=f+(m?a(m)(e.value):e.value)+p;if(e.wrappingNeeded=!e.wrapped&&!l&&!u&&(d=w(g)),e.cellHeightMayIncrease=s||u||e.mayHaveMarkup||(void 0===d?w(g):d),e.needsConvertToTspans=e.mayHaveMarkup||e.wrappingNeeded||e.latex,e.wrappingNeeded){var v=(" "===r.wrapSplitCharacter?g.replace(/i&&r.push(a),i+=l}return r}(i,l,s);1===c.length&&(c[0]===i.length-1?c.unshift(c[0]-1):c.push(c[0]+1)),c[0]%2&&c.reverse(),t.each((function(e,t){e.page=c[t],e.scrollY=l})),t.attr("transform",(function(e){var t=I(e.rowBlocks,e.page)-e.scrollY;return u(0,t)})),e&&(D(e,n,t,c,r.prevPages,r,0),D(e,n,t,c,r.prevPages,r,1),x(n,e))}}function C(e,t,n,a){return function(o){var s=o.calcdata?o.calcdata:o,l=t.filter((function(e){return s.key===e.key})),c=n||s.scrollbarState.dragMultiplier,u=s.scrollY;s.scrollY=void 0===a?s.scrollY+c*i.event.dy:a;var d=l.selectAll("."+r.cn.yColumn).selectAll("."+r.cn.columnBlock).filter(M);return E(e,d,l),s.scrollY===u}}function D(e,t,n,r,i,a,o){r[o]!==i[o]&&(clearTimeout(a.currentRepaint[o]),a.currentRepaint[o]=setTimeout((function(){var a=n.filter((function(e,t){return t===o&&r[t]!==i[t]}));b(e,t,a,n),i[o]=r[o]})))}function R(e,t,n,a){return function(){var o=i.select(t.parentNode);o.each((function(e){var t=e.fragments;o.selectAll("tspan.line").each((function(e,n){t[n].width=this.getComputedTextLength()}));var n,i,a=t[t.length-1].width,s=t.slice(0,-1),l=[],c=0,u=e.column.columnWidth-2*r.cellPad;for(e.value="";s.length;)c+(i=(n=s.shift()).width+a)>u&&(e.value+=l.join(r.wrapSpacer)+r.lineBreaker,l=[],c=0),l.push(n.text),c+=i;c&&(e.value+=l.join(r.wrapSpacer)),e.wrapped=!0})),o.selectAll("tspan.line").remove(),_(o.select("."+r.cn.cellText),n,e,a),i.select(t.parentNode.parentNode).call(L)}}function P(e,t,n,a,o){return function(){if(!o.settledY){var s=i.select(t.parentNode),l=F(o),c=o.key-l.firstRowIndex,d=l.rows[c].rowHeight,h=o.cellHeightMayIncrease?t.parentNode.getBoundingClientRect().height+2*r.cellPad:d,f=Math.max(h,d);f-l.rows[c].rowHeight&&(l.rows[c].rowHeight=f,e.selectAll("."+r.cn.columnCell).call(L),E(null,e.filter(M),0),x(n,a,!0)),s.attr("transform",(function(){var e=this,t=e.parentNode.getBoundingClientRect(),n=i.select(e.parentNode).select("."+r.cn.cellRect).node().getBoundingClientRect(),a=e.transform.baseVal.consolidate(),s=n.top-t.top+(a?a.matrix.f:r.cellPad);return u(O(o,i.select(e.parentNode).select("."+r.cn.cellTextHolder).node().getBoundingClientRect().width),s)})),o.settledY=!0}}}function O(e,t){switch(e.align){case"left":default:return r.cellPad;case"right":return e.column.columnWidth-(t||0)-r.cellPad;case"center":return(e.column.columnWidth-(t||0))/2}}function L(e){e.attr("transform",(function(e){var t=e.rowBlocks[0].auxiliaryBlocks.reduce((function(e,t){return e+z(t,1/0)}),0),n=z(F(e),e.key);return u(0,n+t)})).selectAll("."+r.cn.cellRect).attr("height",(function(e){return(t=F(e),n=e.key,t.rows[n-t.firstRowIndex]).rowHeight;var t,n}))}function I(e,t){for(var n=0,r=t-1;r>=0;r--)n+=N(e[r]);return n}function z(e,t){for(var n=0,r=0;r","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:u({},s.textfont,{}),editType:"calc"},text:s.text,textinfo:l.textinfo,texttemplate:i({editType:"plot"},{keys:c.eventDataKeys.concat(["label","value"])}),hovertext:s.hovertext,hoverinfo:l.hoverinfo,hovertemplate:r({},{keys:c.eventDataKeys}),textfont:s.textfont,insidetextfont:s.insidetextfont,outsidetextfont:u({},s.outsidetextfont,{}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot"},sort:s.sort,root:l.root,domain:o({name:"treemap",trace:!0,editType:"calc"})}},78018:function(e,t,n){"use strict";var r=n(74875);t.name="treemap",t.plot=function(e,n,i,a){r.plotBasePlot(t.name,e,n,i,a)},t.clean=function(e,n,i,a){r.cleanBasePlot(t.name,e,n,i,a)}},65039:function(e,t,n){"use strict";var r=n(52147);t.y=function(e,t){return r.calc(e,t)},t.T=function(e){return r._runCrossTraceCalc("treemap",e)}},43473:function(e){"use strict";e.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}},91174:function(e,t,n){"use strict";var r=n(71828),i=n(45802),a=n(7901),o=n(27670).c,s=n(90769).handleText,l=n(97313).TEXTPAD,c=n(21081),u=c.hasColorscale,d=c.handleDefaults;e.exports=function(e,t,n,c){function h(n,a){return r.coerce(e,t,i,n,a)}var f=h("labels"),p=h("parents");if(f&&f.length&&p&&p.length){var m=h("values");m&&m.length?h("branchvalues"):h("count"),h("level"),h("maxdepth"),"squarify"===h("tiling.packing")&&h("tiling.squarifyratio"),h("tiling.flip"),h("tiling.pad");var g=h("text");h("texttemplate"),t.texttemplate||h("textinfo",Array.isArray(g)?"text+label":"label"),h("hovertext"),h("hovertemplate");var v=h("pathbar.visible");s(e,t,c,h,"auto",{hasPathbar:v,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),h("textposition");var y=-1!==t.textposition.indexOf("bottom");h("marker.line.width")&&h("marker.line.color",c.paper_bgcolor);var x=h("marker.colors");(t._hasColorscale=u(e,"marker","colors")||(e.marker||{}).coloraxis)?d(e,t,c,h,{prefix:"marker.",cLetter:"c"}):h("marker.depthfade",!(x||[]).length);var b=2*t.textfont.size;h("marker.pad.t",y?b/4:b),h("marker.pad.l",b/4),h("marker.pad.r",b/4),h("marker.pad.b",y?b:b/4),h("marker.cornerradius"),t._hovered={marker:{line:{width:2,color:a.contrast(c.paper_bgcolor)}}},v&&(h("pathbar.thickness",t.pathbar.textfont.size+2*l),h("pathbar.side"),h("pathbar.edgeshape")),h("sort"),h("root.color"),o(t,c,h),t._length=null}else t.visible=!1}},80694:function(e,t,n){"use strict";var r=n(39898),i=n(2791),a=n(72597).clearMinTextSize,o=n(16688).resizeText,s=n(46650);e.exports=function(e,t,n,l,c){var u,d,h=c.type,f=c.drawDescendants,p=e._fullLayout,m=p["_"+h+"layer"],g=!n;(a(h,p),(u=m.selectAll("g.trace."+h).data(t,(function(e){return e[0].trace.uid}))).enter().append("g").classed("trace",!0).classed(h,!0),u.order(),!p.uniformtext.mode&&i.hasTransition(n))?(l&&(d=l()),r.transition().duration(n.duration).ease(n.easing).each("end",(function(){d&&d()})).each("interrupt",(function(){d&&d()})).each((function(){m.selectAll("g.trace").each((function(t){s(e,t,this,n,f)}))}))):(u.each((function(t){s(e,t,this,n,f)})),p.uniformtext.mode&&o(e,m.selectAll(".trace"),h));g&&u.exit().remove()}},66209:function(e,t,n){"use strict";var r=n(39898),i=n(71828),a=n(91424),o=n(63893),s=n(37210),l=n(96362).styleOne,c=n(43473),u=n(2791),d=n(83523),h=!0;e.exports=function(e,t,n,f,p){var m=p.barDifY,g=p.width,v=p.height,y=p.viewX,x=p.viewY,b=p.pathSlice,_=p.toMoveInsideSlice,w=p.strTransform,A=p.hasTransition,S=p.handleSlicesExit,M=p.makeUpdateSliceInterpolator,T=p.makeUpdateTextInterpolator,k={},E=e._context.staticPlot,C=e._fullLayout,D=t[0],R=D.trace,P=D.hierarchy,O=g/R._entryDepth,L=u.listPath(n.data,"id"),I=s(P.copy(),[g,v],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();(I=I.filter((function(e){var t=L.indexOf(e.data.id);return-1!==t&&(e.x0=O*t,e.x1=O*(t+1),e.y0=m,e.y1=m+v,e.onPathbar=!0,!0)}))).reverse(),(f=f.data(I,u.getPtId)).enter().append("g").classed("pathbar",!0),S(f,h,k,[g,v],b),f.order();var z=f;A&&(z=z.transition().each("end",(function(){var t=r.select(this);u.setSliceCursor(t,e,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})}))),z.each((function(s){s._x0=y(s.x0),s._x1=y(s.x1),s._y0=x(s.y0),s._y1=x(s.y1),s._hoverX=y(s.x1-Math.min(g,v)/2),s._hoverY=x(s.y1-v/2);var f=r.select(this),p=i.ensureSingle(f,"path","surface",(function(e){e.style("pointer-events",E?"none":"all")}));A?p.transition().attrTween("d",(function(e){var t=M(e,h,k,[g,v]);return function(e){return b(t(e))}})):p.attr("d",b),f.call(d,n,e,t,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,e,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:e._transitioning}),p.call(l,s,R,{hovered:!1}),s._text=(u.getPtLabel(s)||"").split("
").join(" ")||"";var m=i.ensureSingle(f,"g","slicetext"),S=i.ensureSingle(m,"text","",(function(e){e.attr("data-notex",1)})),D=i.ensureUniformFontSize(e,u.determineTextFont(R,s,C.font,{onPathbar:!0}));S.text(s._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(a.font,D).call(o.convertToTspans,e),s.textBB=a.bBox(S.node()),s.transform=_(s,{fontSize:D.size,onPathbar:!0}),s.transform.fontSize=D.size,A?S.transition().attrTween("transform",(function(e){var t=T(e,h,k,[g,v]);return function(e){return w(t(e))}})):S.attr("transform",w(s))}))}},52583:function(e,t,n){"use strict";var r=n(39898),i=n(71828),a=n(91424),o=n(63893),s=n(37210),l=n(96362).styleOne,c=n(43473),u=n(2791),d=n(83523),h=n(24714).formatSliceLabel,f=!1;e.exports=function(e,t,n,p,m){var g=m.width,v=m.height,y=m.viewX,x=m.viewY,b=m.pathSlice,_=m.toMoveInsideSlice,w=m.strTransform,A=m.hasTransition,S=m.handleSlicesExit,M=m.makeUpdateSliceInterpolator,T=m.makeUpdateTextInterpolator,k=m.prevEntry,E=e._context.staticPlot,C=e._fullLayout,D=t[0].trace,R=-1!==D.textposition.indexOf("left"),P=-1!==D.textposition.indexOf("right"),O=-1!==D.textposition.indexOf("bottom"),L=!O&&!D.marker.pad.t||O&&!D.marker.pad.b,I=s(n,[g,v],{packing:D.tiling.packing,squarifyratio:D.tiling.squarifyratio,flipX:D.tiling.flip.indexOf("x")>-1,flipY:D.tiling.flip.indexOf("y")>-1,pad:{inner:D.tiling.pad,top:D.marker.pad.t,left:D.marker.pad.l,right:D.marker.pad.r,bottom:D.marker.pad.b}}).descendants(),z=1/0,N=-1/0;I.forEach((function(e){var t=e.depth;t>=D._maxDepth?(e.x0=e.x1=(e.x0+e.x1)/2,e.y0=e.y1=(e.y0+e.y1)/2):(z=Math.min(z,t),N=Math.max(N,t))})),p=p.data(I,u.getPtId),D._maxVisibleLayers=isFinite(N)?N-z+1:0,p.enter().append("g").classed("slice",!0),S(p,f,{},[g,v],b),p.order();var F=null;if(A&&k){var B=u.getPtId(k);p.each((function(e){null===F&&u.getPtId(e)===B&&(F={x0:e.x0,x1:e.x1,y0:e.y0,y1:e.y1})}))}var j=function(){return F||{x0:0,x1:g,y0:0,y1:v}},U=p;return A&&(U=U.transition().each("end",(function(){var t=r.select(this);u.setSliceCursor(t,e,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}))),U.each((function(s){var p=u.isHeader(s,D);s._x0=y(s.x0),s._x1=y(s.x1),s._y0=x(s.y0),s._y1=x(s.y1),s._hoverX=y(s.x1-D.marker.pad.r),s._hoverY=x(O?s.y1-D.marker.pad.b/2:s.y0+D.marker.pad.t/2);var m=r.select(this),S=i.ensureSingle(m,"path","surface",(function(e){e.style("pointer-events",E?"none":"all")}));A?S.transition().attrTween("d",(function(e){var t=M(e,f,j(),[g,v]);return function(e){return b(t(e))}})):S.attr("d",b),m.call(d,n,e,t,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,e,{isTransitioning:e._transitioning}),S.call(l,s,D,{hovered:!1}),s.x0===s.x1||s.y0===s.y1?s._text="":s._text=p?L?"":u.getPtLabel(s)||"":h(s,n,D,t,C)||"";var k=i.ensureSingle(m,"g","slicetext"),I=i.ensureSingle(k,"text","",(function(e){e.attr("data-notex",1)})),z=i.ensureUniformFontSize(e,u.determineTextFont(D,s,C.font));I.text(s._text||" ").classed("slicetext",!0).attr("text-anchor",P?"end":R||p?"start":"middle").call(a.font,z).call(o.convertToTspans,e),s.textBB=a.bBox(I.node()),s.transform=_(s,{fontSize:z.size,isHeader:p}),s.transform.fontSize=z.size,A?I.transition().attrTween("transform",(function(e){var t=T(e,f,j(),[g,v]);return function(e){return w(t(e))}})):I.attr("transform",w(s))})),F}},14102:function(e){"use strict";e.exports=function e(t,n,r){var i;r.swapXY&&(i=t.x0,t.x0=t.y0,t.y0=i,i=t.x1,t.x1=t.y1,t.y1=i),r.flipX&&(i=t.x0,t.x0=n[0]-t.x1,t.x1=n[0]-i),r.flipY&&(i=t.y0,t.y0=n[1]-t.y1,t.y1=n[1]-i);var a=t.children;if(a)for(var o=0;o-1?D+O:-(P+O):0,I={x0:R,x1:R,y0:L,y1:L+P},z=function(e,t,n){var r=v.tiling.pad,i=function(e){return e-r<=t.x0},a=function(e){return e+r>=t.x1},o=function(e){return e-r<=t.y0},s=function(e){return e+r>=t.y1};return e.x0===t.x0&&e.x1===t.x1&&e.y0===t.y0&&e.y1===t.y1?{x0:e.x0,x1:e.x1,y0:e.y0,y1:e.y1}:{x0:i(e.x0-r)?0:a(e.x0-r)?n[0]:e.x0,x1:i(e.x1+r)?0:a(e.x1+r)?n[0]:e.x1,y0:o(e.y0-r)?0:s(e.y0-r)?n[1]:e.y0,y1:o(e.y1+r)?0:s(e.y1+r)?n[1]:e.y1}},N=null,F={},B={},j=null,U=function(e,t){return t?F[h(e)]:B[h(e)]},V=function(e,t,n,r){if(t)return F[h(x)]||I;var i=B[v.level]||n;return function(e){return e.data.depth-b.data.depth=(r-=(y?te:te.r)-s)){var f=(n+r)/2;n=f,r=f}var p;oe?i<(p=a-(y?te:te.b))&&p"===ee?(l.x-=a,c.x-=a,u.x-=a,d.x-=a):"/"===ee?(u.x-=a,d.x-=a,o.x-=a/2,s.x-=a/2):"\\"===ee?(l.x-=a,c.x-=a,o.x-=a/2,s.x-=a/2):"<"===ee&&(o.x-=a,s.x-=a),Q(l),Q(d),Q(o),Q(c),Q(u),Q(s),"M"+K(l.x,l.y)+"L"+K(c.x,c.y)+"L"+K(s.x,s.y)+"L"+K(u.x,u.y)+"L"+K(d.x,d.y)+"L"+K(o.x,o.y)+"Z"},toMoveInsideSlice:se,makeUpdateSliceInterpolator:ce,makeUpdateTextInterpolator:ue,handleSlicesExit:de,hasTransition:M,strTransform:he}):w.remove()}},96362:function(e,t,n){"use strict";var r=n(39898),i=n(7901),a=n(71828),o=n(2791),s=n(72597).resizeText;function l(e,t,n,r){var s,l,c=(r||{}).hovered,u=t.data.data,d=u.i,h=u.color,f=o.isHierarchyRoot(t),p=1;if(c)s=n._hovered.marker.line.color,l=n._hovered.marker.line.width;else if(f&&h===n.root.color)p=100,s="rgba(0,0,0,0)",l=0;else if(s=a.castOption(n,d,"marker.line.color")||i.defaultLine,l=a.castOption(n,d,"marker.line.width")||0,!n._hasColorscale&&!t.onPathbar){var m=n.marker.depthfade;if(m){var g,v=i.combine(i.addOpacity(n._backgroundColor,.75),h);if(!0===m){var y=o.getMaxDepth(n);g=isFinite(y)?o.isLeaf(t)?0:n._maxVisibleLayers-(t.data.depth-n._entryDepth):t.data.height+1}else g=t.data.depth-n._entryDepth,n._atRootLevel||g++;if(g>0)for(var x=0;x0){var b,_,w,A,S,M=e.xa,T=e.ya;"h"===p.orientation?(S=t,b="y",w=T,_="x",A=M):(S=n,b="x",w=M,_="y",A=T);var k=f[e.index];if(S>=k.span[0]&&S<=k.span[1]){var E=i.extendFlat({},e),C=A.c2p(S,!0),D=s.getKdeValue(k,p,S),R=s.getPositionOnKdePath(k,p,C),P=w._offset,O=w._length;E[b+"0"]=R[0],E[b+"1"]=R[1],E[_+"0"]=E[_+"1"]=C,E[_+"Label"]=_+": "+a.hoverLabelText(A,S,p[_+"hoverformat"])+", "+f[0].t.labels.kde+" "+D.toFixed(3);for(var L=0,I=0;I")),u.color=function(e,t){var n=e[t.dir].marker,r=n.color,a=n.line.color,o=n.line.width;if(i(r))return r;if(i(a)&&o)return a}(h,g),[u]}function S(e){return r(m,e,h[p+"hoverformat"])}}},19990:function(e,t,n){"use strict";e.exports={attributes:n(43037),layoutAttributes:n(13494),supplyDefaults:n(83266).supplyDefaults,crossTraceDefaults:n(83266).crossTraceDefaults,supplyLayoutDefaults:n(5176),calc:n(52752),crossTraceCalc:n(70766),plot:n(30436),style:n(55750).style,hoverPoints:n(61326),eventData:n(58593),selectPoints:n(81974),moduleType:"trace",name:"waterfall",basePlotModule:n(93612),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},13494:function(e){"use strict";e.exports={waterfallmode:{valType:"enumerated",values:["group","overlay"],dflt:"group",editType:"calc"},waterfallgap:{valType:"number",min:0,max:1,editType:"calc"},waterfallgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},5176:function(e,t,n){"use strict";var r=n(71828),i=n(13494);e.exports=function(e,t,n){var a=!1;function o(n,a){return r.coerce(e,t,i,n,a)}for(var s=0;s0&&(g+=h?"M"+d[0]+","+p[1]+"V"+p[0]:"M"+d[1]+","+p[0]+"H"+d[0]),"between"!==f&&(n.isSum||s path").each((function(e){if(!e.isBlank){var t=s[e.dir].marker;r.select(this).call(a.fill,t.color).call(a.stroke,t.line.color).call(i.dashLine,t.line.dash,t.line.width).style("opacity",s.selectedpoints&&!e.selected?o:1)}})),c(n,s,e),n.selectAll(".lines").each((function(){var e=s.connector.line;i.lineGroupStyle(r.select(this).selectAll("path"),e.width,e.color,e.dash)}))}))}}},82887:function(e,t,n){"use strict";var r=n(89298),i=n(71828),a=n(86281),o=n(79344).p,s=n(50606).BADNUM;t.moduleType="transform",t.name="aggregate";var l=t.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},groups:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},aggregations:{_isLinkedToArray:"aggregation",target:{valType:"string",editType:"calc"},func:{valType:"enumerated",values:["count","sum","avg","median","mode","rms","stddev","min","max","first","last","change","range"],dflt:"first",editType:"calc"},funcmode:{valType:"enumerated",values:["sample","population"],dflt:"sample",editType:"calc"},enabled:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},editType:"calc"},c=l.aggregations;function u(e,t,n,a){if(a.enabled){for(var o=a.target,l=i.nestedProperty(t,o),c=l.get(),u=function(e,t){var n=e.func,r=t.d2c,a=t.c2d;switch(n){case"count":return d;case"first":return h;case"last":return f;case"sum":return function(e,t){for(var n=0,i=0;ii&&(i=u,o=c)}}return i?a(o):s};case"rms":return function(e,t){for(var n=0,i=0,o=0;o":return function(e){return h(e)>s};case">=":return function(e){return h(e)>=s};case"[]":return function(e){var t=h(e);return t>=s[0]&&t<=s[1]};case"()":return function(e){var t=h(e);return t>s[0]&&t=s[0]&&ts[0]&&t<=s[1]};case"][":return function(e){var t=h(e);return t<=s[0]||t>=s[1]};case")(":return function(e){var t=h(e);return ts[1]};case"](":return function(e){var t=h(e);return t<=s[0]||t>s[1]};case")[":return function(e){var t=h(e);return t=s[1]};case"{}":return function(e){return-1!==s.indexOf(h(e))};case"}{":return function(e){return-1===s.indexOf(h(e))}}}(n,a.getDataToCoordFunc(e,t,s,i),h),x={},b={},_=0;p?(g=function(e){x[e.astr]=r.extendDeep([],e.get()),e.set(new Array(d))},v=function(e,t){var n=x[e.astr][t];e.get()[t]=n}):(g=function(e){x[e.astr]=r.extendDeep([],e.get()),e.set([])},v=function(e,t){var n=x[e.astr][t];e.get().push(n)}),S(g);for(var w=o(t.transforms,n),A=0;A1?"%{group} (%{trace})":"%{group}");var l=e.styles,c=o.styles=[];if(l)for(a=0;ah)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,p.prototype),t}function p(e,t,n){if("number"===typeof e){if("string"===typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return v(e)}return m(e,t,n)}function m(e,t,n){if("string"===typeof e)return function(e,t){"string"===typeof t&&""!==t||(t="utf8");if(!p.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|_(e,t),r=f(n),i=r.write(e,t);i!==n&&(r=r.slice(0,i));return r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(te(e,Uint8Array)){var t=new Uint8Array(e);return x(t.buffer,t.byteOffset,t.byteLength)}return y(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+l(e));if(te(e,ArrayBuffer)||e&&te(e.buffer,ArrayBuffer))return x(e,t,n);if("undefined"!==typeof SharedArrayBuffer&&(te(e,SharedArrayBuffer)||e&&te(e.buffer,SharedArrayBuffer)))return x(e,t,n);if("number"===typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return p.from(r,t,n);var i=function(e){if(p.isBuffer(e)){var t=0|b(e.length),n=f(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!==typeof e.length||ne(e.length)?f(0):y(e);if("Buffer"===e.type&&Array.isArray(e.data))return y(e.data)}(e);if(i)return i;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof e[Symbol.toPrimitive])return p.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+l(e))}function g(e){if("number"!==typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function v(e){return g(e),f(e<0?0:0|b(e))}function y(e){for(var t=e.length<0?0:0|b(e.length),n=f(t),r=0;r=h)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+h.toString(16)+" bytes");return 0|e}function _(e,t){if(p.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||te(e,ArrayBuffer))return e.byteLength;if("string"!==typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+l(e));var n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return J(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Q(e).length;default:if(i)return r?-1:J(e).length;t=(""+t).toLowerCase(),i=!0}}function w(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return z(this,t,n);case"utf8":case"utf-8":return P(this,t,n);case"ascii":return L(this,t,n);case"latin1":case"binary":return I(this,t,n);case"base64":return R(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function A(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function S(e,t,n,r,i){if(0===e.length)return-1;if("string"===typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),ne(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"===typeof t&&(t=p.from(t,r)),p.isBuffer(t))return 0===t.length?-1:M(e,t,n,r,i);if("number"===typeof t)return t&=255,"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):M(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function M(e,t,n,r,i){var a,o=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,l/=2,n/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var u=-1;for(a=n;as&&(n=s-l),a=n;a>=0;a--){for(var d=!0,h=0;hi&&(r=i):r=i;var a,o=t.length;for(r>o/2&&(r=o/2),a=0;a>8,i=n%256,a.push(i),a.push(r);return a}(t,e.length-n),e,n,r)}function R(e,t,n){return 0===t&&n===e.length?c.fromByteArray(e):c.fromByteArray(e.slice(t,n))}function P(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:a>223?3:a>191?2:1;if(i+s<=n){var l=void 0,c=void 0,u=void 0,d=void 0;switch(s){case 1:a<128&&(o=a);break;case 2:128===(192&(l=e[i+1]))&&(d=(31&a)<<6|63&l)>127&&(o=d);break;case 3:l=e[i+1],c=e[i+2],128===(192&l)&&128===(192&c)&&(d=(15&a)<<12|(63&l)<<6|63&c)>2047&&(d<55296||d>57343)&&(o=d);break;case 4:l=e[i+1],c=e[i+2],u=e[i+3],128===(192&l)&&128===(192&c)&&128===(192&u)&&(d=(15&a)<<18|(63&l)<<12|(63&c)<<6|63&u)>65535&&d<1114112&&(o=d)}}null===o?(o=65533,s=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=s}return function(e){var t=e.length;if(t<=O)return String.fromCharCode.apply(String,e);var n="",r=0;for(;rr.length?(p.isBuffer(a)||(a=p.from(a)),a.copy(r,i)):Uint8Array.prototype.set.call(r,a,i);else{if(!p.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i)}i+=a.length}return r},p.byteLength=_,p.prototype._isBuffer=!0,p.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tn&&(e+=" ... "),""},d&&(p.prototype[d]=p.prototype.inspect),p.prototype.compare=function(e,t,n,r,i){if(te(e,Uint8Array)&&(e=p.from(e,e.offset,e.byteLength)),!p.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+l(e));if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0),s=Math.min(a,o),c=this.slice(r,i),u=e.slice(t,n),d=0;d>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return T(this,e,t,n);case"utf8":case"utf-8":return k(this,e,t,n);case"ascii":case"latin1":case"binary":return E(this,e,t,n);case"base64":return C(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var O=4096;function L(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;ir)&&(n=r);for(var i="",a=t;an)throw new RangeError("Trying to access beyond buffer length")}function B(e,t,n,r,i,a){if(!p.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function j(e,t,n,r,i){$(t,r,i,e,n,7);var a=Number(t&BigInt(4294967295));e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a;var o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,n}function U(e,t,n,r,i){$(t,r,i,e,n,7);var a=Number(t&BigInt(4294967295));e[n+7]=a,a>>=8,e[n+6]=a,a>>=8,e[n+5]=a,a>>=8,e[n+4]=a;var o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=o,o>>=8,e[n+2]=o,o>>=8,e[n+1]=o,o>>=8,e[n]=o,n+8}function V(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function H(e,t,n,r,i){return t=+t,n>>>=0,i||V(e,0,n,4),u.write(e,t,n,r,23,4),n+4}function W(e,t,n,r,i){return t=+t,n>>>=0,i||V(e,0,n,8),u.write(e,t,n,r,52,8),n+8}p.prototype.slice=function(e,t){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||F(e,t,this.length);for(var r=this[e],i=1,a=0;++a>>=0,t>>>=0,n||F(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},p.prototype.readUint8=p.prototype.readUInt8=function(e,t){return e>>>=0,t||F(e,1,this.length),this[e]},p.prototype.readUint16LE=p.prototype.readUInt16LE=function(e,t){return e>>>=0,t||F(e,2,this.length),this[e]|this[e+1]<<8},p.prototype.readUint16BE=p.prototype.readUInt16BE=function(e,t){return e>>>=0,t||F(e,2,this.length),this[e]<<8|this[e+1]},p.prototype.readUint32LE=p.prototype.readUInt32LE=function(e,t){return e>>>=0,t||F(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},p.prototype.readUint32BE=p.prototype.readUInt32BE=function(e,t){return e>>>=0,t||F(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},p.prototype.readBigUInt64LE=ie((function(e){X(e>>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||Z(e,this.length-8);var r=t+this[++e]*Math.pow(2,8)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,24),i=this[++e]+this[++e]*Math.pow(2,8)+this[++e]*Math.pow(2,16)+n*Math.pow(2,24);return BigInt(r)+(BigInt(i)<>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||Z(e,this.length-8);var r=t*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+this[++e],i=this[++e]*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+n;return(BigInt(r)<>>=0,t>>>=0,n||F(e,t,this.length);for(var r=this[e],i=1,a=0;++a=(i*=128)&&(r-=Math.pow(2,8*t)),r},p.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||F(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},p.prototype.readInt8=function(e,t){return e>>>=0,t||F(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},p.prototype.readInt16LE=function(e,t){e>>>=0,t||F(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},p.prototype.readInt16BE=function(e,t){e>>>=0,t||F(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},p.prototype.readInt32LE=function(e,t){return e>>>=0,t||F(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},p.prototype.readInt32BE=function(e,t){return e>>>=0,t||F(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},p.prototype.readBigInt64LE=ie((function(e){X(e>>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||Z(e,this.length-8);var r=this[e+4]+this[e+5]*Math.pow(2,8)+this[e+6]*Math.pow(2,16)+(n<<24);return(BigInt(r)<>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||Z(e,this.length-8);var r=(t<<24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+this[++e];return(BigInt(r)<>>=0,t||F(e,4,this.length),u.read(this,e,!0,23,4)},p.prototype.readFloatBE=function(e,t){return e>>>=0,t||F(e,4,this.length),u.read(this,e,!1,23,4)},p.prototype.readDoubleLE=function(e,t){return e>>>=0,t||F(e,8,this.length),u.read(this,e,!0,52,8)},p.prototype.readDoubleBE=function(e,t){return e>>>=0,t||F(e,8,this.length),u.read(this,e,!1,52,8)},p.prototype.writeUintLE=p.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||B(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[t]=255&e;++a>>=0,n>>>=0,r)||B(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},p.prototype.writeUint8=p.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,1,255,0),this[t]=255&e,t+1},p.prototype.writeUint16LE=p.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},p.prototype.writeUint16BE=p.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},p.prototype.writeUint32LE=p.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},p.prototype.writeUint32BE=p.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},p.prototype.writeBigUInt64LE=ie((function(e){return j(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),p.prototype.writeBigUInt64BE=ie((function(e){return U(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),p.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);B(this,e,t,n,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a>>=0,!r){var i=Math.pow(2,8*n-1);B(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o|0)-s&255;return t+n},p.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},p.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},p.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},p.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},p.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},p.prototype.writeBigInt64LE=ie((function(e){return j(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),p.prototype.writeBigInt64BE=ie((function(e){return U(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),p.prototype.writeFloatLE=function(e,t,n){return H(this,e,t,!0,n)},p.prototype.writeFloatBE=function(e,t,n){return H(this,e,t,!1,n)},p.prototype.writeDoubleLE=function(e,t,n){return W(this,e,t,!0,n)},p.prototype.writeDoubleBE=function(e,t,n){return W(this,e,t,!1,n)},p.prototype.copy=function(e,t,n,r){if(!p.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"===typeof e)for(a=t;a=r+4;n-=3)t="_".concat(e.slice(n-3,n)).concat(t);return"".concat(e.slice(0,n)).concat(t)}function $(e,t,n,r,i,a){if(e>n||e3?0===t||t===BigInt(0)?">= 0".concat(s," and < 2").concat(s," ** ").concat(8*(a+1)).concat(s):">= -(2".concat(s," ** ").concat(8*(a+1)-1).concat(s,") and < 2 ** ")+"".concat(8*(a+1)-1).concat(s):">= ".concat(t).concat(s," and <= ").concat(n).concat(s),new G.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,n){X(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||Z(t,e.length-(n+1))}(r,i,a)}function X(e,t){if("number"!==typeof e)throw new G.ERR_INVALID_ARG_TYPE(t,"number",e)}function Z(e,t,n){if(Math.floor(e)!==e)throw X(e,n),new G.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new G.ERR_BUFFER_OUT_OF_BOUNDS;throw new G.ERR_OUT_OF_RANGE(n||"offset",">= ".concat(n?1:0," and <= ").concat(t),e)}q("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?"".concat(e," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),q("ERR_INVALID_ARG_TYPE",(function(e,t){return'The "'.concat(e,'" argument must be of type number. Received type ').concat(l(t))}),TypeError),q("ERR_OUT_OF_RANGE",(function(e,t,n){var r='The value of "'.concat(e,'" is out of range.'),i=n;return Number.isInteger(n)&&Math.abs(n)>Math.pow(2,32)?i=Y(String(n)):"bigint"===typeof n&&(i=String(n),(n>Math.pow(BigInt(2),BigInt(32))||n<-Math.pow(BigInt(2),BigInt(32)))&&(i=Y(i)),i+="n"),r+=" It must be ".concat(t,". Received ").concat(i)}),RangeError);var K=/[^+/0-9A-Za-z-_]/g;function J(e,t){var n;t=t||1/0;for(var r=e.length,i=null,a=[],o=0;o55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function Q(e){return c.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(K,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function ee(e,t,n,r){var i;for(i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function te(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function ne(e){return e!==e}var re=function(){for(var e="0123456789abcdef",t=new Array(256),n=0;n<16;++n)for(var r=16*n,i=0;i<16;++i)t[r+i]=e[n]+e[i];return t}();function ie(e){return"undefined"===typeof BigInt?ae:e}function ae(){throw new Error("BigInt not supported")}},3910:function(e,t){"use strict";t.byteLength=function(e){var t=s(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,a=s(e),o=a[0],l=a[1],c=new i(function(e,t,n){return 3*(t+n)/4-n}(0,o,l)),u=0,d=l>0?o-4:o;for(n=0;n>16&255,c[u++]=t>>8&255,c[u++]=255&t;2===l&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,c[u++]=255&t);1===l&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t);return c},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,a=[],o=16383,s=0,c=r-i;sc?c:s+o));1===i?(t=e[r-1],a.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],a.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return a.join("")};for(var n=[],r=[],i="undefined"!==typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)n[o]=a[o],r[a.charCodeAt(o)]=o;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,r){for(var i,a,o=[],s=t;s>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return o.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},3187:function(e,t){t.read=function(e,t,n,r,i){var a,o,s=8*i-r-1,l=(1<>1,u=-7,d=n?i-1:0,h=n?-1:1,f=e[t+d];for(d+=h,a=f&(1<<-u)-1,f>>=-u,u+=s;u>0;a=256*a+e[t+d],d+=h,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=r;u>0;o=256*o+e[t+d],d+=h,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,r),a-=c}return(f?-1:1)*o*Math.pow(2,a-r)},t.write=function(e,t,n,r,i,a){var o,s,l,c=8*a-i-1,u=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:a-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+d>=1?h/l:h*Math.pow(2,1-d))*l>=2&&(o++,l/=2),o+d>=u?(s=0,o=u):o+d>=1?(s=(t*l-1)*Math.pow(2,i),o+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;e[n+f]=255&s,f+=p,s/=256,i-=8);for(o=o<0;e[n+f]=255&o,f+=p,o/=256,c-=8);e[n+f-p]|=128*m}},1152:function(e,t,n){"use strict";e.exports=function(e){var t=(e=e||{}).eye||[0,0,1],n=e.center||[0,0,0],s=e.up||[0,1,0],l=e.distanceLimits||[0,1/0],c=e.mode||"turntable",u=r(),d=i(),h=a();return u.setDistanceLimits(l[0],l[1]),u.lookAt(0,t,n,s),d.setDistanceLimits(l[0],l[1]),d.lookAt(0,t,n,s),h.setDistanceLimits(l[0],l[1]),h.lookAt(0,t,n,s),new o({turntable:u,orbit:d,matrix:h},c)};var r=n(3440),i=n(7774),a=n(9298);function o(e,t){this._controllerNames=Object.keys(e),this._controllerList=this._controllerNames.map((function(t){return e[t]})),this._mode=t,this._active=e[t],this._active||(this._mode="turntable",this._active=e.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var s=o.prototype;s.flush=function(e){for(var t=this._controllerList,n=0;n0?c=c.ushln(d):d<0&&(u=u.ushln(-d));return s(c,u)}},234:function(e,t,n){"use strict";var r=n(3218);e.exports=function(e){return Array.isArray(e)&&2===e.length&&r(e[0])&&r(e[1])}},4275:function(e,t,n){"use strict";var r=n(1928);e.exports=function(e){return e.cmp(new r(0))}},9958:function(e,t,n){"use strict";var r=n(4275);e.exports=function(e){var t=e.length,n=e.words,i=0;if(1===t)i=n[0];else if(2===t)i=n[0]+67108864*n[1];else for(var a=0;a20)return 52;return n+32}},3218:function(e,t,n){"use strict";n(1928);e.exports=function(e){return e&&"object"===typeof e&&Boolean(e.words)}},5514:function(e,t,n){"use strict";var r=n(1928),i=n(8362);e.exports=function(e){var t=i.exponent(e);return t<52?new r(e):new r(e*Math.pow(2,52-t)).ushln(t-52)}},8524:function(e,t,n){"use strict";var r=n(5514),i=n(4275);e.exports=function(e,t){var n=i(e),a=i(t);if(0===n)return[r(0),r(1)];if(0===a)return[r(0),r(0)];a<0&&(e=e.neg(),t=t.neg());var o=e.gcd(t);if(o.cmpn(1))return[e.div(o),t.div(o)];return[e,t]}},2813:function(e,t,n){"use strict";var r=n(1928);e.exports=function(e){return new r(e)}},3962:function(e,t,n){"use strict";var r=n(8524);e.exports=function(e,t){return r(e[0].mul(t[0]),e[1].mul(t[1]))}},4951:function(e,t,n){"use strict";var r=n(4275);e.exports=function(e){return r(e[0])*r(e[1])}},4354:function(e,t,n){"use strict";var r=n(8524);e.exports=function(e,t){return r(e[0].mul(t[1]).sub(e[1].mul(t[0])),e[1].mul(t[1]))}},7999:function(e,t,n){"use strict";var r=n(9958),i=n(1112);e.exports=function(e){var t=e[0],n=e[1];if(0===t.cmpn(0))return 0;var a=t.abs().divmod(n.abs()),o=a.div,s=r(o),l=a.mod,c=t.negative!==n.negative?-1:1;if(0===l.cmpn(0))return c*s;if(s){var u=i(s)+4;return c*(s+(h=r(l.ushln(u).divRound(n)))*Math.pow(2,-u))}var d=n.bitLength()-l.bitLength()+53,h=r(l.ushln(d).divRound(n));return d<1023?c*h*Math.pow(2,-d):c*(h*=Math.pow(2,-1023))*Math.pow(2,1023-d)}},5070:function(e){"use strict";function t(e,t,n,r,i){for(var a=i+1;r<=i;){var o=r+i>>>1,s=e[o];(void 0!==n?n(s,t):s-t)>=0?(a=o,i=o-1):r=o+1}return a}function n(e,t,n,r,i){for(var a=i+1;r<=i;){var o=r+i>>>1,s=e[o];(void 0!==n?n(s,t):s-t)>0?(a=o,i=o-1):r=o+1}return a}function r(e,t,n,r,i){for(var a=r-1;r<=i;){var o=r+i>>>1,s=e[o];(void 0!==n?n(s,t):s-t)<0?(a=o,r=o+1):i=o-1}return a}function i(e,t,n,r,i){for(var a=r-1;r<=i;){var o=r+i>>>1,s=e[o];(void 0!==n?n(s,t):s-t)<=0?(a=o,r=o+1):i=o-1}return a}function a(e,t,n,r,i){for(;r<=i;){var a=r+i>>>1,o=e[a],s=void 0!==n?n(o,t):o-t;if(0===s)return a;s<=0?r=a+1:i=a-1}return-1}function o(e,t,n,r,i,a){return"function"===typeof n?a(e,t,n,void 0===r?0:0|r,void 0===i?e.length-1:0|i):a(e,t,void 0,void 0===n?0:0|n,void 0===r?e.length-1:0|r)}e.exports={ge:function(e,n,r,i,a){return o(e,n,r,i,a,t)},gt:function(e,t,r,i,a){return o(e,t,r,i,a,n)},lt:function(e,t,n,i,a){return o(e,t,n,i,a,r)},le:function(e,t,n,r,a){return o(e,t,n,r,a,i)},eq:function(e,t,n,r,i){return o(e,t,n,r,i,a)}}},2288:function(e,t){"use strict";function n(e){var t=32;return(e&=-e)&&t--,65535&e&&(t-=16),16711935&e&&(t-=8),252645135&e&&(t-=4),858993459&e&&(t-=2),1431655765&e&&(t-=1),t}t.INT_BITS=32,t.INT_MAX=2147483647,t.INT_MIN=-1<<31,t.sign=function(e){return(e>0)-(e<0)},t.abs=function(e){var t=e>>31;return(e^t)-t},t.min=function(e,t){return t^(e^t)&-(e65535)<<4,t|=n=((e>>>=t)>255)<<3,t|=n=((e>>>=n)>15)<<2,(t|=n=((e>>>=n)>3)<<1)|(e>>>=n)>>1},t.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0},t.popCount=function(e){return 16843009*((e=(858993459&(e-=e>>>1&1431655765))+(e>>>2&858993459))+(e>>>4)&252645135)>>>24},t.countTrailingZeros=n,t.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)+1},t.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)-(e>>>1)},t.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,27030>>>(e&=15)&1};var r=new Array(256);!function(e){for(var t=0;t<256;++t){var n=t,r=t,i=7;for(n>>>=1;n;n>>>=1)r<<=1,r|=1&n,--i;e[t]=r<>>8&255]<<16|r[e>>>16&255]<<8|r[e>>>24&255]},t.interleave2=function(e,t){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))<<1},t.deinterleave2=function(e,t){return(e=65535&((e=16711935&((e=252645135&((e=858993459&((e=e>>>t&1431655765)|e>>>1))|e>>>2))|e>>>4))|e>>>16))<<16>>16},t.interleave3=function(e,t,n){return e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2),(e|=(t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2))<<1)|(n=1227133513&((n=3272356035&((n=251719695&((n=4278190335&((n&=1023)|n<<16))|n<<8))|n<<4))|n<<2))<<2},t.deinterleave3=function(e,t){return(e=1023&((e=4278190335&((e=251719695&((e=3272356035&((e=e>>>t&1227133513)|e>>>2))|e>>>4))|e>>>8))|e>>>16))<<22>>22},t.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>n(e)+1}},1928:function(e,t,n){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function a(e,t,n){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var o;"object"===typeof e?e.exports=a:t.BN=a,a.BN=a,a.wordSize=26;try{o="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:n(6601).Buffer}catch(M){}function s(e,t){var n=e.charCodeAt(t);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function l(e,t,n){var r=s(e,n);return n-1>=t&&(r|=s(e,n-1)<<4),r}function c(e,t,n,r){for(var i=0,a=Math.min(e.length,n),o=t;o=49?s-49+10:s>=17?s-17+10:s}return i}a.isBN=function(e){return e instanceof a||null!==e&&"object"===typeof e&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,n){if("number"===typeof e)return this._initNumber(e,t,n);if("object"===typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if("le"===n)for(i=0,a=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=2)i=l(e,t,r)<=18?(a-=18,o+=1,this.words[o]|=i>>>26):a+=8;else for(r=(e.length-t)%2===0?t+1:t;r=18?(a-=18,o+=1,this.words[o]|=i>>>26):a+=8;this.strip()},a.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var a=e.length-n,o=a%r,s=Math.min(a,a-o)+n,l=0,u=n;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],a=0|t.words[0],o=i*a,s=67108863&o,l=o/67108864|0;n.words[0]=s;for(var c=1;c>>26,d=67108863&l,h=Math.min(c,t.length-1),f=Math.max(0,c-e.length+1);f<=h;f++){var p=c-f|0;u+=(o=(i=0|e.words[p])*(a=0|t.words[f])+d)/67108864|0,d=67108863&o}n.words[c]=0|d,l=0|u}return 0!==l?n.words[c]=0|l:n.length--,n.strip()}a.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,a=0,o=0;o>>24-i&16777215)||o!==this.length-1?u[6-l.length]+l+n:l+n,(i+=2)>=26&&(i-=26,o--)}for(0!==a&&(n=a.toString(16)+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var c=d[e],f=h[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(f).toString(e);n=(p=p.idivn(f)).isZero()?m+n:u[c-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return r("undefined"!==typeof o),this.toArrayLike(o,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,n){var i=this.byteLength(),a=n||Math.max(1,i);r(i<=a,"byte array longer than desired length"),r(a>0,"Requested array length <= 0"),this.strip();var o,s,l="le"===t,c=new e(a),u=this.clone();if(l){for(s=0;!u.isZero();s++)o=u.andln(255),u.iushrn(8),c[s]=o;for(;s=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0===(8191&t)&&(n+=13,t>>>=13),0===(127&t)&&(n+=7,t>>>=7),0===(15&t)&&(n+=4,t>>>=4),0===(3&t)&&(n+=2,t>>>=2),0===(1&t)&&n++,n},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;re.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){r("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){r("number"===typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,r=e):(n=e,r=this);for(var i=0,a=0;a>>26;for(;0!==i&&a>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;ae.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var a=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==a&&o>26,this.words[o]=67108863&t;if(0===a&&o>>13,f=0|o[1],p=8191&f,m=f>>>13,g=0|o[2],v=8191&g,y=g>>>13,x=0|o[3],b=8191&x,_=x>>>13,w=0|o[4],A=8191&w,S=w>>>13,M=0|o[5],T=8191&M,k=M>>>13,E=0|o[6],C=8191&E,D=E>>>13,R=0|o[7],P=8191&R,O=R>>>13,L=0|o[8],I=8191&L,z=L>>>13,N=0|o[9],F=8191&N,B=N>>>13,j=0|s[0],U=8191&j,V=j>>>13,H=0|s[1],W=8191&H,G=H>>>13,q=0|s[2],Y=8191&q,$=q>>>13,X=0|s[3],Z=8191&X,K=X>>>13,J=0|s[4],Q=8191&J,ee=J>>>13,te=0|s[5],ne=8191&te,re=te>>>13,ie=0|s[6],ae=8191&ie,oe=ie>>>13,se=0|s[7],le=8191&se,ce=se>>>13,ue=0|s[8],de=8191&ue,he=ue>>>13,fe=0|s[9],pe=8191&fe,me=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(c+(r=Math.imul(d,U))|0)+((8191&(i=(i=Math.imul(d,V))+Math.imul(h,U)|0))<<13)|0;c=((a=Math.imul(h,V))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(p,U),i=(i=Math.imul(p,V))+Math.imul(m,U)|0,a=Math.imul(m,V);var ve=(c+(r=r+Math.imul(d,W)|0)|0)+((8191&(i=(i=i+Math.imul(d,G)|0)+Math.imul(h,W)|0))<<13)|0;c=((a=a+Math.imul(h,G)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(v,U),i=(i=Math.imul(v,V))+Math.imul(y,U)|0,a=Math.imul(y,V),r=r+Math.imul(p,W)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,W)|0,a=a+Math.imul(m,G)|0;var ye=(c+(r=r+Math.imul(d,Y)|0)|0)+((8191&(i=(i=i+Math.imul(d,$)|0)+Math.imul(h,Y)|0))<<13)|0;c=((a=a+Math.imul(h,$)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(b,U),i=(i=Math.imul(b,V))+Math.imul(_,U)|0,a=Math.imul(_,V),r=r+Math.imul(v,W)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(y,W)|0,a=a+Math.imul(y,G)|0,r=r+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,$)|0)+Math.imul(m,Y)|0,a=a+Math.imul(m,$)|0;var xe=(c+(r=r+Math.imul(d,Z)|0)|0)+((8191&(i=(i=i+Math.imul(d,K)|0)+Math.imul(h,Z)|0))<<13)|0;c=((a=a+Math.imul(h,K)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(A,U),i=(i=Math.imul(A,V))+Math.imul(S,U)|0,a=Math.imul(S,V),r=r+Math.imul(b,W)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(_,W)|0,a=a+Math.imul(_,G)|0,r=r+Math.imul(v,Y)|0,i=(i=i+Math.imul(v,$)|0)+Math.imul(y,Y)|0,a=a+Math.imul(y,$)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,Z)|0,a=a+Math.imul(m,K)|0;var be=(c+(r=r+Math.imul(d,Q)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(h,Q)|0))<<13)|0;c=((a=a+Math.imul(h,ee)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(T,U),i=(i=Math.imul(T,V))+Math.imul(k,U)|0,a=Math.imul(k,V),r=r+Math.imul(A,W)|0,i=(i=i+Math.imul(A,G)|0)+Math.imul(S,W)|0,a=a+Math.imul(S,G)|0,r=r+Math.imul(b,Y)|0,i=(i=i+Math.imul(b,$)|0)+Math.imul(_,Y)|0,a=a+Math.imul(_,$)|0,r=r+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,K)|0)+Math.imul(y,Z)|0,a=a+Math.imul(y,K)|0,r=r+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,a=a+Math.imul(m,ee)|0;var _e=(c+(r=r+Math.imul(d,ne)|0)|0)+((8191&(i=(i=i+Math.imul(d,re)|0)+Math.imul(h,ne)|0))<<13)|0;c=((a=a+Math.imul(h,re)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(C,U),i=(i=Math.imul(C,V))+Math.imul(D,U)|0,a=Math.imul(D,V),r=r+Math.imul(T,W)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(k,W)|0,a=a+Math.imul(k,G)|0,r=r+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,$)|0)+Math.imul(S,Y)|0,a=a+Math.imul(S,$)|0,r=r+Math.imul(b,Z)|0,i=(i=i+Math.imul(b,K)|0)+Math.imul(_,Z)|0,a=a+Math.imul(_,K)|0,r=r+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(y,Q)|0,a=a+Math.imul(y,ee)|0,r=r+Math.imul(p,ne)|0,i=(i=i+Math.imul(p,re)|0)+Math.imul(m,ne)|0,a=a+Math.imul(m,re)|0;var we=(c+(r=r+Math.imul(d,ae)|0)|0)+((8191&(i=(i=i+Math.imul(d,oe)|0)+Math.imul(h,ae)|0))<<13)|0;c=((a=a+Math.imul(h,oe)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(P,U),i=(i=Math.imul(P,V))+Math.imul(O,U)|0,a=Math.imul(O,V),r=r+Math.imul(C,W)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(D,W)|0,a=a+Math.imul(D,G)|0,r=r+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,$)|0)+Math.imul(k,Y)|0,a=a+Math.imul(k,$)|0,r=r+Math.imul(A,Z)|0,i=(i=i+Math.imul(A,K)|0)+Math.imul(S,Z)|0,a=a+Math.imul(S,K)|0,r=r+Math.imul(b,Q)|0,i=(i=i+Math.imul(b,ee)|0)+Math.imul(_,Q)|0,a=a+Math.imul(_,ee)|0,r=r+Math.imul(v,ne)|0,i=(i=i+Math.imul(v,re)|0)+Math.imul(y,ne)|0,a=a+Math.imul(y,re)|0,r=r+Math.imul(p,ae)|0,i=(i=i+Math.imul(p,oe)|0)+Math.imul(m,ae)|0,a=a+Math.imul(m,oe)|0;var Ae=(c+(r=r+Math.imul(d,le)|0)|0)+((8191&(i=(i=i+Math.imul(d,ce)|0)+Math.imul(h,le)|0))<<13)|0;c=((a=a+Math.imul(h,ce)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(I,U),i=(i=Math.imul(I,V))+Math.imul(z,U)|0,a=Math.imul(z,V),r=r+Math.imul(P,W)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(O,W)|0,a=a+Math.imul(O,G)|0,r=r+Math.imul(C,Y)|0,i=(i=i+Math.imul(C,$)|0)+Math.imul(D,Y)|0,a=a+Math.imul(D,$)|0,r=r+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,K)|0)+Math.imul(k,Z)|0,a=a+Math.imul(k,K)|0,r=r+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(S,Q)|0,a=a+Math.imul(S,ee)|0,r=r+Math.imul(b,ne)|0,i=(i=i+Math.imul(b,re)|0)+Math.imul(_,ne)|0,a=a+Math.imul(_,re)|0,r=r+Math.imul(v,ae)|0,i=(i=i+Math.imul(v,oe)|0)+Math.imul(y,ae)|0,a=a+Math.imul(y,oe)|0,r=r+Math.imul(p,le)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(m,le)|0,a=a+Math.imul(m,ce)|0;var Se=(c+(r=r+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,he)|0)+Math.imul(h,de)|0))<<13)|0;c=((a=a+Math.imul(h,he)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(F,U),i=(i=Math.imul(F,V))+Math.imul(B,U)|0,a=Math.imul(B,V),r=r+Math.imul(I,W)|0,i=(i=i+Math.imul(I,G)|0)+Math.imul(z,W)|0,a=a+Math.imul(z,G)|0,r=r+Math.imul(P,Y)|0,i=(i=i+Math.imul(P,$)|0)+Math.imul(O,Y)|0,a=a+Math.imul(O,$)|0,r=r+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,K)|0)+Math.imul(D,Z)|0,a=a+Math.imul(D,K)|0,r=r+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(k,Q)|0,a=a+Math.imul(k,ee)|0,r=r+Math.imul(A,ne)|0,i=(i=i+Math.imul(A,re)|0)+Math.imul(S,ne)|0,a=a+Math.imul(S,re)|0,r=r+Math.imul(b,ae)|0,i=(i=i+Math.imul(b,oe)|0)+Math.imul(_,ae)|0,a=a+Math.imul(_,oe)|0,r=r+Math.imul(v,le)|0,i=(i=i+Math.imul(v,ce)|0)+Math.imul(y,le)|0,a=a+Math.imul(y,ce)|0,r=r+Math.imul(p,de)|0,i=(i=i+Math.imul(p,he)|0)+Math.imul(m,de)|0,a=a+Math.imul(m,he)|0;var Me=(c+(r=r+Math.imul(d,pe)|0)|0)+((8191&(i=(i=i+Math.imul(d,me)|0)+Math.imul(h,pe)|0))<<13)|0;c=((a=a+Math.imul(h,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(F,W),i=(i=Math.imul(F,G))+Math.imul(B,W)|0,a=Math.imul(B,G),r=r+Math.imul(I,Y)|0,i=(i=i+Math.imul(I,$)|0)+Math.imul(z,Y)|0,a=a+Math.imul(z,$)|0,r=r+Math.imul(P,Z)|0,i=(i=i+Math.imul(P,K)|0)+Math.imul(O,Z)|0,a=a+Math.imul(O,K)|0,r=r+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(D,Q)|0,a=a+Math.imul(D,ee)|0,r=r+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,re)|0)+Math.imul(k,ne)|0,a=a+Math.imul(k,re)|0,r=r+Math.imul(A,ae)|0,i=(i=i+Math.imul(A,oe)|0)+Math.imul(S,ae)|0,a=a+Math.imul(S,oe)|0,r=r+Math.imul(b,le)|0,i=(i=i+Math.imul(b,ce)|0)+Math.imul(_,le)|0,a=a+Math.imul(_,ce)|0,r=r+Math.imul(v,de)|0,i=(i=i+Math.imul(v,he)|0)+Math.imul(y,de)|0,a=a+Math.imul(y,he)|0;var Te=(c+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;c=((a=a+Math.imul(m,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(F,Y),i=(i=Math.imul(F,$))+Math.imul(B,Y)|0,a=Math.imul(B,$),r=r+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,K)|0)+Math.imul(z,Z)|0,a=a+Math.imul(z,K)|0,r=r+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(O,Q)|0,a=a+Math.imul(O,ee)|0,r=r+Math.imul(C,ne)|0,i=(i=i+Math.imul(C,re)|0)+Math.imul(D,ne)|0,a=a+Math.imul(D,re)|0,r=r+Math.imul(T,ae)|0,i=(i=i+Math.imul(T,oe)|0)+Math.imul(k,ae)|0,a=a+Math.imul(k,oe)|0,r=r+Math.imul(A,le)|0,i=(i=i+Math.imul(A,ce)|0)+Math.imul(S,le)|0,a=a+Math.imul(S,ce)|0,r=r+Math.imul(b,de)|0,i=(i=i+Math.imul(b,he)|0)+Math.imul(_,de)|0,a=a+Math.imul(_,he)|0;var ke=(c+(r=r+Math.imul(v,pe)|0)|0)+((8191&(i=(i=i+Math.imul(v,me)|0)+Math.imul(y,pe)|0))<<13)|0;c=((a=a+Math.imul(y,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(F,Z),i=(i=Math.imul(F,K))+Math.imul(B,Z)|0,a=Math.imul(B,K),r=r+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(z,Q)|0,a=a+Math.imul(z,ee)|0,r=r+Math.imul(P,ne)|0,i=(i=i+Math.imul(P,re)|0)+Math.imul(O,ne)|0,a=a+Math.imul(O,re)|0,r=r+Math.imul(C,ae)|0,i=(i=i+Math.imul(C,oe)|0)+Math.imul(D,ae)|0,a=a+Math.imul(D,oe)|0,r=r+Math.imul(T,le)|0,i=(i=i+Math.imul(T,ce)|0)+Math.imul(k,le)|0,a=a+Math.imul(k,ce)|0,r=r+Math.imul(A,de)|0,i=(i=i+Math.imul(A,he)|0)+Math.imul(S,de)|0,a=a+Math.imul(S,he)|0;var Ee=(c+(r=r+Math.imul(b,pe)|0)|0)+((8191&(i=(i=i+Math.imul(b,me)|0)+Math.imul(_,pe)|0))<<13)|0;c=((a=a+Math.imul(_,me)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(F,Q),i=(i=Math.imul(F,ee))+Math.imul(B,Q)|0,a=Math.imul(B,ee),r=r+Math.imul(I,ne)|0,i=(i=i+Math.imul(I,re)|0)+Math.imul(z,ne)|0,a=a+Math.imul(z,re)|0,r=r+Math.imul(P,ae)|0,i=(i=i+Math.imul(P,oe)|0)+Math.imul(O,ae)|0,a=a+Math.imul(O,oe)|0,r=r+Math.imul(C,le)|0,i=(i=i+Math.imul(C,ce)|0)+Math.imul(D,le)|0,a=a+Math.imul(D,ce)|0,r=r+Math.imul(T,de)|0,i=(i=i+Math.imul(T,he)|0)+Math.imul(k,de)|0,a=a+Math.imul(k,he)|0;var Ce=(c+(r=r+Math.imul(A,pe)|0)|0)+((8191&(i=(i=i+Math.imul(A,me)|0)+Math.imul(S,pe)|0))<<13)|0;c=((a=a+Math.imul(S,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(F,ne),i=(i=Math.imul(F,re))+Math.imul(B,ne)|0,a=Math.imul(B,re),r=r+Math.imul(I,ae)|0,i=(i=i+Math.imul(I,oe)|0)+Math.imul(z,ae)|0,a=a+Math.imul(z,oe)|0,r=r+Math.imul(P,le)|0,i=(i=i+Math.imul(P,ce)|0)+Math.imul(O,le)|0,a=a+Math.imul(O,ce)|0,r=r+Math.imul(C,de)|0,i=(i=i+Math.imul(C,he)|0)+Math.imul(D,de)|0,a=a+Math.imul(D,he)|0;var De=(c+(r=r+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(k,pe)|0))<<13)|0;c=((a=a+Math.imul(k,me)|0)+(i>>>13)|0)+(De>>>26)|0,De&=67108863,r=Math.imul(F,ae),i=(i=Math.imul(F,oe))+Math.imul(B,ae)|0,a=Math.imul(B,oe),r=r+Math.imul(I,le)|0,i=(i=i+Math.imul(I,ce)|0)+Math.imul(z,le)|0,a=a+Math.imul(z,ce)|0,r=r+Math.imul(P,de)|0,i=(i=i+Math.imul(P,he)|0)+Math.imul(O,de)|0,a=a+Math.imul(O,he)|0;var Re=(c+(r=r+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,me)|0)+Math.imul(D,pe)|0))<<13)|0;c=((a=a+Math.imul(D,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(F,le),i=(i=Math.imul(F,ce))+Math.imul(B,le)|0,a=Math.imul(B,ce),r=r+Math.imul(I,de)|0,i=(i=i+Math.imul(I,he)|0)+Math.imul(z,de)|0,a=a+Math.imul(z,he)|0;var Pe=(c+(r=r+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,me)|0)+Math.imul(O,pe)|0))<<13)|0;c=((a=a+Math.imul(O,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(F,de),i=(i=Math.imul(F,he))+Math.imul(B,de)|0,a=Math.imul(B,he);var Oe=(c+(r=r+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,me)|0)+Math.imul(z,pe)|0))<<13)|0;c=((a=a+Math.imul(z,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863;var Le=(c+(r=Math.imul(F,pe))|0)+((8191&(i=(i=Math.imul(F,me))+Math.imul(B,pe)|0))<<13)|0;return c=((a=Math.imul(B,me))+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,l[0]=ge,l[1]=ve,l[2]=ye,l[3]=xe,l[4]=be,l[5]=_e,l[6]=we,l[7]=Ae,l[8]=Se,l[9]=Me,l[10]=Te,l[11]=ke,l[12]=Ee,l[13]=Ce,l[14]=De,l[15]=Re,l[16]=Pe,l[17]=Oe,l[18]=Le,0!==c&&(l[19]=c,n.length++),n};function m(e,t,n){return(new g).mulp(e,t,n)}function g(e,t){this.x=e,this.y=t}Math.imul||(p=f),a.prototype.mulTo=function(e,t){var n,r=this.length+e.length;return n=10===this.length&&10===e.length?p(this,e,t):r<63?f(this,e,t):r<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,a=0;a>>26)|0)>>>26,o&=67108863}n.words[a]=s,r=o,o=i}return 0!==r?n.words[a]=r:n.length--,n.strip()}(this,e,t):m(this,e,t),n},g.prototype.makeRBT=function(e){for(var t=new Array(e),n=a.prototype._countBits(e)-1,r=0;r>=1;return r},g.prototype.permute=function(e,t,n,r,i,a){for(var o=0;o>>=1)i++;return 1<>>=13,n[2*o+1]=8191&a,a>>>=13;for(o=2*t;o>=26,t+=i/67108864|0,t+=a>>>26,this.words[n]=67108863&a}return 0!==t&&(this.words[n]=t,this.length++),this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>i}return t}(e);if(0===t.length)return new a(1);for(var n=this,r=0;r=0);var t,n=e%26,i=(e-n)/26,a=67108863>>>26-n<<26-n;if(0!==n){var o=0;for(t=0;t>>26-n}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var a=e%26,o=Math.min((e-a)/26,this.length),s=67108863^67108863>>>a<o)for(this.length-=o,c=0;c=0&&(0!==u||c>=i);c--){var d=0|this.words[c];this.words[c]=u<<26-a|d>>>a,u=d&s}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){r("number"===typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(r("number"===typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(l/67108864|0),this.words[i+n]=67108863&a}for(;i>26,this.words[i+n]=67108863&a;if(0===s)return this.strip();for(r(-1===s),s=0,i=0;i>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,o=0|i.words[i.length-1];0!==(n=26-this._countBits(o))&&(i=i.ushln(n),r.iushln(n),o=0|i.words[i.length-1]);var s,l=r.length-i.length;if("mod"!==t){(s=new a(null)).length=l+1,s.words=new Array(s.length);for(var c=0;c=0;d--){var h=67108864*(0|r.words[i.length+d])+(0|r.words[i.length+d-1]);for(h=Math.min(h/o|0,67108863),r._ishlnsubmul(i,h,d);0!==r.negative;)h--,r.negative=0,r._ishlnsubmul(i,1,d),r.isZero()||(r.negative^=1);s&&(s.words[d]=h)}return s&&s.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},a.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(o=s.mod.neg(),n&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),n&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,o,s},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),a=n.cmp(r);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,n=0,i=this.length-1;i>=0;i--)n=(t*n+(0|this.words[i]))%e;return n},a.prototype.idivn=function(e){r(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*t;this.words[n]=i/e|0,t=i%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new a(1),o=new a(0),s=new a(0),l=new a(1),c=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++c;for(var u=n.clone(),d=t.clone();!t.isZero();){for(var h=0,f=1;0===(t.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(u),o.isub(d)),i.iushrn(1),o.iushrn(1);for(var p=0,m=1;0===(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(u),l.isub(d)),s.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(s),o.isub(l)):(n.isub(t),s.isub(i),l.isub(o))}return{a:s,b:l,gcd:n.iushln(c)}},a.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,o=new a(1),s=new a(0),l=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,u=1;0===(t.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(t.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);for(var d=0,h=1;0===(n.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(n.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(s)):(n.isub(t),s.isub(o))}return(i=0===t.cmpn(1)?o:s).cmpn(0)<0&&i.iadd(e),i},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var a=t;t=n,n=a}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0===(1&this.words[0])},a.prototype.isOdd=function(){return 1===(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){r("number"===typeof e);var t=e%26,n=(e-t)/26,i=1<>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){ri&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return-1===this.cmpn(e)},a.prototype.lt=function(e){return-1===this.cmp(e)},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new A(e)},a.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(e){if("string"===typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){A.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},i(x,y),x.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i>>22,a=o}a>>>=22,e.words[i-10]=a,0===a&&e.length>10?e.length-=10:e.length-=9},x.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new x;else if("p224"===e)t=new b;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new w}return v[e]=t,t},A.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},A.prototype._verify2=function(e,t){r(0===(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},A.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},A.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},A.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},A.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},A.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},A.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},A.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},A.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},A.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},A.prototype.isqr=function(e){return this.imul(e,e.clone())},A.prototype.sqr=function(e){return this.mul(e,e)},A.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2===1),3===t){var n=this.m.add(new a(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);r(!i.isZero());var s=new a(1).toRed(this),l=s.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new a(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var d=this.pow(u,i),h=this.pow(e,i.addn(1).iushrn(1)),f=this.pow(e,i),p=o;0!==f.cmp(s);){for(var m=f,g=0;0!==m.cmp(s);g++)m=m.redSqr();r(g=0;r--){for(var c=t.words[r],u=l-1;u>=0;u--){var d=c>>u&1;i!==n[0]&&(i=this.sqr(i)),0!==d||0!==o?(o<<=1,o|=d,(4===++s||0===r&&0===u)&&(i=this.mul(i,n[o]),s=0,o=0)):s=0}l=26}return i},A.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},A.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new S(e)},i(S,A),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},2692:function(e){"use strict";e.exports=function(e){var t,n,r,i=e.length,a=0;for(t=0;t>>1;if(!(u<=0)){var d,h=i.mallocDouble(2*u*s),f=i.mallocInt32(s);if((s=l(e,u,h,f))>0){if(1===u&&r)a.init(s),d=a.sweepComplete(u,n,0,s,h,f,0,s,h,f);else{var p=i.mallocDouble(2*u*c),m=i.mallocInt32(c);(c=l(t,u,p,m))>0&&(a.init(s+c),d=1===u?a.sweepBipartite(u,n,0,s,h,f,0,c,p,m):o(u,n,r,s,h,f,c,p,m),i.free(p),i.free(m))}i.free(h),i.free(f)}return d}}}function u(e,t){r.push([e,t])}},7333:function(e,t){"use strict";function n(e){return e?function(e,t,n,r,i,a,o,s,l,c,u){return i-r>l-s?function(e,t,n,r,i,a,o,s,l,c,u){for(var d=2*e,h=r,f=d*r;hc-l?r?function(e,t,n,r,i,a,o,s,l,c,u){for(var d=2*e,h=r,f=d*r;h0;){var L=(P-=1)*b,I=w[L],z=w[L+1],N=w[L+2],F=w[L+3],B=w[L+4],j=w[L+5],U=P*_,V=A[U],H=A[U+1],W=1&j,G=!!(16&j),q=u,Y=k,$=C,X=D;if(W&&(q=C,Y=D,$=u,X=k),!(2&j&&z>=(N=g(e,I,z,N,q,Y,H)))&&!(4&j&&(z=v(e,I,z,N,q,Y,V))>=N)){var Z=N-z,K=B-F;if(G){if(e*Z*(Z+K)=p0)&&!(p1>=hi)"),m=u("lo===p0"),g=u("lo>>1,h=2*e,f=d,p=s[h*d+t];for(;c=x?(f=y,p=x):v>=_?(f=g,p=v):(f=b,p=_):x>=_?(f=y,p=x):_>=v?(f=g,p=v):(f=b,p=_);for(var w=h*(u-1),A=h*f,S=0;Sn&&i[d+t]>c;--u,d-=o){for(var h=d,f=d+o,p=0;ph;++h,l+=s){if(i[l+d]===o)if(u===h)u+=1,c+=s;else{for(var f=0;s>f;++f){var p=i[l+f];i[l+f]=i[c],i[c++]=p}var m=a[h];a[h]=a[u],a[u++]=m}}return u},"loh;++h,l+=s){if(i[l+d]f;++f){var p=i[l+f];i[l+f]=i[c],i[c++]=p}var m=a[h];a[h]=a[u],a[u++]=m}}return u},"lo<=p0":function(e,t,n,r,i,a,o){for(var s=2*e,l=s*n,c=l,u=n,d=e+t,h=n;r>h;++h,l+=s){if(i[l+d]<=o)if(u===h)u+=1,c+=s;else{for(var f=0;s>f;++f){var p=i[l+f];i[l+f]=i[c],i[c++]=p}var m=a[h];a[h]=a[u],a[u++]=m}}return u},"hi<=p0":function(e,t,n,r,i,a,o){for(var s=2*e,l=s*n,c=l,u=n,d=e+t,h=n;r>h;++h,l+=s){if(i[l+d]<=o)if(u===h)u+=1,c+=s;else{for(var f=0;s>f;++f){var p=i[l+f];i[l+f]=i[c],i[c++]=p}var m=a[h];a[h]=a[u],a[u++]=m}}return u},"lof;++f,l+=s){var p=i[l+d],m=i[l+h];if(pg;++g){var v=i[l+g];i[l+g]=i[c],i[c++]=v}var y=a[f];a[f]=a[u],a[u++]=y}}return u},"lo<=p0&&p0<=hi":function(e,t,n,r,i,a,o){for(var s=2*e,l=s*n,c=l,u=n,d=t,h=e+t,f=n;r>f;++f,l+=s){var p=i[l+d],m=i[l+h];if(p<=o&&o<=m)if(u===f)u+=1,c+=s;else{for(var g=0;s>g;++g){var v=i[l+g];i[l+g]=i[c],i[c++]=v}var y=a[f];a[f]=a[u],a[u++]=y}}return u},"!(lo>=p0)&&!(p1>=hi)":function(e,t,n,r,i,a,o,s){for(var l=2*e,c=l*n,u=c,d=n,h=t,f=e+t,p=n;r>p;++p,c+=l){var m=i[c+h],g=i[c+f];if(!(m>=o)&&!(s>=g))if(d===p)d+=1,u+=l;else{for(var v=0;l>v;++v){var y=i[c+v];i[c+v]=i[u],i[u++]=y}var x=a[p];a[p]=a[d],a[d++]=x}}return d}}},309:function(e){"use strict";e.exports=function(e,r){r<=4*t?n(0,r-1,e):c(0,r-1,e)};var t=32;function n(e,t,n){for(var r=2*(e+1),i=e+1;i<=t;++i){for(var a=n[r++],o=n[r++],s=i,l=r-2;s-- >e;){var c=n[l-2],u=n[l-1];if(cn[t+1])}function l(e,t,n,r){var i=r[e*=2];return i>1,g=m-h,v=m+h,y=f,x=g,b=m,_=v,w=p,A=e+1,S=u-1,M=0;s(y,x,d)&&(M=y,y=x,x=M),s(_,w,d)&&(M=_,_=w,w=M),s(y,b,d)&&(M=y,y=b,b=M),s(x,b,d)&&(M=x,x=b,b=M),s(y,_,d)&&(M=y,y=_,_=M),s(b,_,d)&&(M=b,b=_,_=M),s(x,w,d)&&(M=x,x=w,w=M),s(x,b,d)&&(M=x,x=b,b=M),s(_,w,d)&&(M=_,_=w,w=M);for(var T=d[2*x],k=d[2*x+1],E=d[2*_],C=d[2*_+1],D=2*y,R=2*b,P=2*w,O=2*f,L=2*m,I=2*p,z=0;z<2;++z){var N=d[D+z],F=d[R+z],B=d[P+z];d[O+z]=N,d[L+z]=F,d[I+z]=B}i(g,e,d),i(v,u,d);for(var j=A;j<=S;++j)if(l(j,T,k,d))j!==A&&r(j,A,d),++A;else if(!l(j,E,C,d))for(;;){if(l(S,E,C,d)){l(S,T,k,d)?(a(j,A,S,d),++A,--S):(r(j,S,d),--S);break}if(--S>>1;a(p,k);var E=0,C=0;for(A=0;A=o)m(u,d,C--,D=D-o|0);else if(D>=0)m(l,c,E--,D);else if(D<=-o){D=-D-o|0;for(var R=0;R>>1;a(p,E);var C=0,D=0,R=0;for(S=0;S>1===p[2*S+3]>>1&&(O=2,S+=1),P<0){for(var L=-(P>>1)-1,I=0;I>1)-1;0===O?m(l,c,C--,L):1===O?m(u,d,D--,L):2===O&&m(h,f,R--,L)}}},scanBipartite:function(e,t,n,r,i,s,u,d,h,f,v,y){var x=0,b=2*e,_=t,w=t+e,A=1,S=1;r?S=o:A=o;for(var M=i;M>>1;a(p,C);var D=0;for(M=0;M=o?(P=!r,T-=o):(P=!!r,T-=1),P)g(l,c,D++,T);else{var O=y[T],L=b*T,I=v[L+t+1],z=v[L+t+1+e];e:for(var N=0;N>>1;a(p,A);var S=0;for(x=0;x=o)l[S++]=b-o;else{var T=f[b-=1],k=g*b,E=h[k+t+1],C=h[k+t+1+e];e:for(var D=0;D=0;--D)if(l[D]===b){for(L=D+1;L0;){for(var f=n.pop(),p=(u=-1,d=-1,l=o[s=n.pop()],1);p=0||(t.flip(s,f),i(e,t,n,u,s,d),i(e,t,n,s,d,u),i(e,t,n,d,f,u),i(e,t,n,f,u,d)))}}},7098:function(e,t,n){"use strict";var r=n(5070);function i(e,t,n,r,i,a,o){this.cells=e,this.neighbor=t,this.flags=r,this.constraint=n,this.active=i,this.next=a,this.boundary=o}function a(e,t){return e[0]-t[0]||e[1]-t[1]||e[2]-t[2]}e.exports=function(e,t,n){var r=function(e,t){for(var n=e.cells(),r=n.length,o=0;o0||l.length>0;){for(;s.length>0;){var f=s.pop();if(c[f]!==-o){c[f]=o;u[f];for(var p=0;p<3;++p){var m=h[3*f+p];m>=0&&0===c[m]&&(d[3*f+p]?l.push(m):(s.push(m),c[m]=o))}}}var g=l;l=s,s=g,l.length=0,o=-o}var v=function(e,t,n){for(var r=0,i=0;i1&&i(n[h[f-2]],n[h[f-1]],a)>0;)e.push([h[f-1],h[f-2],o]),f-=1;h.length=f,h.push(o);var p=d.upperIds;for(f=p.length;f>1&&i(n[p[f-2]],n[p[f-1]],a)<0;)e.push([p[f-2],p[f-1],o]),f-=1;p.length=f,p.push(o)}}function u(e,t){var n;return(n=e.a[0]p[0]&&i.push(new o(p,f,2,l),new o(f,p,1,l))}i.sort(s);for(var m=i[0].a[0]-(1+Math.abs(i[0].a[0]))*Math.pow(2,-52),g=[new a([m,1],[m,0],-1,[],[],[],[])],v=[],y=(l=0,i.length);l=0}}(),a.removeTriangle=function(e,t,n){var r=this.stars;o(r[e],t,n),o(r[t],n,e),o(r[n],e,t)},a.addTriangle=function(e,t,n){var r=this.stars;r[e].push(t,n),r[t].push(n,e),r[n].push(e,t)},a.opposite=function(e,t){for(var n=this.stars[t],r=1,i=n.length;rt[2]?1:0)}function v(e,t,n){if(0!==e.length){if(t)for(var r=0;r=0;--a){var x=t[u=(k=r[a])[0]],b=x[0],_=x[1],w=e[b],A=e[_];if((w[0]-A[0]||w[1]-A[1])<0){var S=b;b=_,_=S}x[0]=b;var M,T=x[1]=k[1];for(i&&(M=x[2]);a>0&&r[a-1][0]===u;){var k,E=(k=r[--a])[1];i?t.push([T,E,M]):t.push([T,E]),T=E}i?t.push([T,_,M]):t.push([T,_])}return h}(e,t,h,g,n),x=p(e,y);return v(t,x,n),!!x||(h.length>0||g.length>0)}},5528:function(e,t,n){"use strict";e.exports=function(e,t,n,r){var a=s(t,e),d=s(r,n),h=u(a,d);if(0===o(h))return null;var f=s(e,n),p=u(d,f),m=i(p,h),g=c(a,m);return l(e,g)};var r=n(3962),i=n(9189),a=n(4354),o=n(4951),s=n(6695),l=n(7584),c=n(4469);function u(e,t){return a(r(e[0],t[1]),r(e[1],t[0]))}},5692:function(e){e.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:1,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],"rainbow-soft":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],"freesurface-blue":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],"freesurface-red":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],"velocity-blue":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],"velocity-green":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},9156:function(e,t,n){"use strict";var r=n(5692),i=n(3578);function a(e){return[e[0]/255,e[1]/255,e[2]/255,e[3]]}function o(e){for(var t,n="#",r=0;r<3;++r)n+=("00"+(t=(t=e[r]).toString(16))).substr(t.length);return n}function s(e){return"rgba("+e.join(",")+")"}e.exports=function(e){var t,n,l,c,u,d,h,f,p,m;e||(e={});f=(e.nshades||72)-1,h=e.format||"hex",(d=e.colormap)||(d="jet");if("string"===typeof d){if(d=d.toLowerCase(),!r[d])throw Error(d+" not a supported colorscale");u=r[d]}else{if(!Array.isArray(d))throw Error("unsupported colormap option",d);u=d.slice()}if(u.length>f+1)throw new Error(d+" map requires nshades to be at least size "+u.length);p=Array.isArray(e.alpha)?2!==e.alpha.length?[1,1]:e.alpha.slice():"number"===typeof e.alpha?[e.alpha,e.alpha]:[1,1];t=u.map((function(e){return Math.round(e.index*f)})),p[0]=Math.min(Math.max(p[0],0),1),p[1]=Math.min(Math.max(p[1],0),1);var g=u.map((function(e,t){var n=u[t].index,r=u[t].rgb.slice();return 4===r.length&&r[3]>=0&&r[3]<=1||(r[3]=p[0]+(p[1]-p[0])*n),r})),v=[];for(m=0;m0||l(e,t,a)?-1:1:0===s?c>0||l(e,t,n)?1:-1:i(c-s)}var d=r(e,t,n);return d>0?o>0&&r(e,t,a)>0?1:-1:d<0?o>0||r(e,t,a)>0?1:-1:r(e,t,a)>0||l(e,t,n)?1:-1};var r=n(417),i=n(7538),a=n(87),o=n(2019),s=n(9662);function l(e,t,n){var r=a(e[0],-t[0]),i=a(e[1],-t[1]),l=a(n[0],-t[0]),c=a(n[1],-t[1]),u=s(o(r,l),o(i,c));return u[u.length-1]>=0}},7538:function(e){"use strict";e.exports=function(e){return e<0?-1:e>0?1:0}},9209:function(e){e.exports=function(e,r){var i=e.length,a=e.length-r.length;if(a)return a;switch(i){case 0:return 0;case 1:return e[0]-r[0];case 2:return e[0]+e[1]-r[0]-r[1]||t(e[0],e[1])-t(r[0],r[1]);case 3:var o=e[0]+e[1],s=r[0]+r[1];if(a=o+e[2]-(s+r[2]))return a;var l=t(e[0],e[1]),c=t(r[0],r[1]);return t(l,e[2])-t(c,r[2])||t(l+e[2],o)-t(c+r[2],s);case 4:var u=e[0],d=e[1],h=e[2],f=e[3],p=r[0],m=r[1],g=r[2],v=r[3];return u+d+h+f-(p+m+g+v)||t(u,d,h,f)-t(p,m,g,v,p)||t(u+d,u+h,u+f,d+h,d+f,h+f)-t(p+m,p+g,p+v,m+g,m+v,g+v)||t(u+d+h,u+d+f,u+h+f,d+h+f)-t(p+m+g,p+m+v,p+g+v,m+g+v);default:for(var y=e.slice().sort(n),x=r.slice().sort(n),b=0;be[n][0]&&(n=r);return tn?[[n],[t]]:[[t]]}},8722:function(e,t,n){"use strict";e.exports=function(e){var t=r(e),n=t.length;if(n<=2)return[];for(var i=new Array(n),a=t[n-1],o=0;o=t[l]&&(s+=1);a[o]=s}}return e}(r(a,!0),n)}};var r=n(2183),i=n(2153)},9680:function(e){"use strict";e.exports=function(e,t,n,r,i,a){var o=i-1,s=i*i,l=o*o,c=(1+2*i)*l,u=i*l,d=s*(3-2*i),h=s*o;if(e.length){a||(a=new Array(e.length));for(var f=e.length-1;f>=0;--f)a[f]=c*e[f]+u*t[f]+d*n[f]+h*r[f];return a}return c*e+u*t+d*n+h*r},e.exports.derivative=function(e,t,n,r,i,a){var o=6*i*i-6*i,s=3*i*i-4*i+1,l=-6*i*i+6*i,c=3*i*i-2*i;if(e.length){a||(a=new Array(e.length));for(var u=e.length-1;u>=0;--u)a[u]=o*e[u]+s*t[u]+l*n[u]+c*r[u];return a}return o*e+s*t+l*n[u]+c*r}},4419:function(e,t,n){"use strict";var r=n(2183),i=n(1215);function a(e,t){this.point=e,this.index=t}function o(e,t){for(var n=e.point,r=t.point,i=n.length,a=0;a=2)return!1;e[n]=r}return!0})):_.filter((function(e){for(var t=0;t<=s;++t){var n=v[e[t]];if(n<0)return!1;e[t]=n}return!0}));if(1&s)for(u=0;u<_.length;++u){h=(b=_[u])[0];b[0]=b[1],b[1]=h}return _}},8362:function(e){var t=!1;if("undefined"!==typeof Float64Array){var n=new Float64Array(1),r=new Uint32Array(n.buffer);if(n[0]=1,t=!0,1072693248===r[1]){e.exports=function(e){return n[0]=e,[r[0],r[1]]},e.exports.pack=function(e,t){return r[0]=e,r[1]=t,n[0]},e.exports.lo=function(e){return n[0]=e,r[0]},e.exports.hi=function(e){return n[0]=e,r[1]}}else if(1072693248===r[0]){e.exports=function(e){return n[0]=e,[r[1],r[0]]},e.exports.pack=function(e,t){return r[1]=e,r[0]=t,n[0]},e.exports.lo=function(e){return n[0]=e,r[1]},e.exports.hi=function(e){return n[0]=e,r[0]}}else t=!1}if(!t){var i=new Buffer(8);e.exports=function(e){return i.writeDoubleLE(e,0,!0),[i.readUInt32LE(0,!0),i.readUInt32LE(4,!0)]},e.exports.pack=function(e,t){return i.writeUInt32LE(e,0,!0),i.writeUInt32LE(t,4,!0),i.readDoubleLE(0,!0)},e.exports.lo=function(e){return i.writeDoubleLE(e,0,!0),i.readUInt32LE(0,!0)},e.exports.hi=function(e){return i.writeDoubleLE(e,0,!0),i.readUInt32LE(4,!0)}}e.exports.sign=function(t){return e.exports.hi(t)>>>31},e.exports.exponent=function(t){return(e.exports.hi(t)<<1>>>21)-1023},e.exports.fraction=function(t){var n=e.exports.lo(t),r=e.exports.hi(t),i=1048575&r;return 2146435072&r&&(i+=1<<20),[n,i]},e.exports.denormalized=function(t){return!(2146435072&e.exports.hi(t))}},3094:function(e){"use strict";function t(e,n,r){var i=0|e[r];if(i<=0)return[];var a,o=new Array(i);if(r===e.length-1)for(a=0;a0)return function(e,t){var n,r;for(n=new Array(e),r=0;r=n-1){h=l.length-1;var p=e-t[n-1];for(f=0;f=n-1)for(var u=s.length-1,d=(t[n-1],0);d=0;--n)if(e[--t])return!1;return!0},s.jump=function(e){var t=this.lastT(),n=this.dimension;if(!(e0;--d)r.push(a(l[d-1],c[d-1],arguments[d])),i.push(0)}},s.push=function(e){var t=this.lastT(),n=this.dimension;if(!(e1e-6?1/s:0;this._time.push(e);for(var h=n;h>0;--h){var f=a(c[h-1],u[h-1],arguments[h]);r.push(f),i.push((f-r[o++])*d)}}},s.set=function(e){var t=this.dimension;if(!(e0;--l)n.push(a(o[l-1],s[l-1],arguments[l])),r.push(0)}},s.move=function(e){var t=this.lastT(),n=this.dimension;if(!(e<=t||arguments.length!==n+1)){var r=this._state,i=this._velocity,o=r.length-this.dimension,s=this.bounds,l=s[0],c=s[1],u=e-t,d=u>1e-6?1/u:0;this._time.push(e);for(var h=n;h>0;--h){var f=arguments[h];r.push(a(l[h-1],c[h-1],r[o++]+f)),i.push(f*d)}}},s.idle=function(e){var t=this.lastT();if(!(e=0;--d)r.push(a(l[d],c[d],r[o]+u*i[o])),i.push(0),o+=1}}},7080:function(e){"use strict";e.exports=function(e){return new a(e||f,null)};function t(e,t,n,r,i,a){this._color=e,this.key=t,this.value=n,this.left=r,this.right=i,this._count=a}function n(e){return new t(e._color,e.key,e.value,e.left,e.right,e._count)}function r(e,n){return new t(e,n.key,n.value,n.left,n.right,n._count)}function i(e){e._count=1+(e.left?e.left._count:0)+(e.right?e.right._count:0)}function a(e,t){this._compare=e,this.root=t}var o=a.prototype;function s(e,t){var n;if(t.left&&(n=s(e,t.left)))return n;return(n=e(t.key,t.value))||(t.right?s(e,t.right):void 0)}function l(e,t,n,r){if(t(e,r.key)<=0){var i;if(r.left)if(i=l(e,t,n,r.left))return i;if(i=n(r.key,r.value))return i}if(r.right)return l(e,t,n,r.right)}function c(e,t,n,r,i){var a,o=n(e,i.key),s=n(t,i.key);if(o<=0){if(i.left&&(a=c(e,t,n,r,i.left)))return a;if(s>0&&(a=r(i.key,i.value)))return a}if(s>0&&i.right)return c(e,t,n,r,i.right)}function u(e,t){this.tree=e,this._stack=t}Object.defineProperty(o,"keys",{get:function(){var e=[];return this.forEach((function(t,n){e.push(t)})),e}}),Object.defineProperty(o,"values",{get:function(){var e=[];return this.forEach((function(t,n){e.push(n)})),e}}),Object.defineProperty(o,"length",{get:function(){return this.root?this.root._count:0}}),o.insert=function(e,n){for(var o=this._compare,s=this.root,l=[],c=[];s;){var u=o(e,s.key);l.push(s),c.push(u),s=u<=0?s.left:s.right}l.push(new t(0,e,n,null,null,1));for(var d=l.length-2;d>=0;--d){s=l[d];c[d]<=0?l[d]=new t(s._color,s.key,s.value,l[d+1],s.right,s._count+1):l[d]=new t(s._color,s.key,s.value,s.left,l[d+1],s._count+1)}for(d=l.length-1;d>1;--d){var h=l[d-1];s=l[d];if(1===h._color||1===s._color)break;var f=l[d-2];if(f.left===h)if(h.left===s){if(!(p=f.right)||0!==p._color){if(f._color=0,f.left=h.right,h._color=1,h.right=f,l[d-2]=h,l[d-1]=s,i(f),i(h),d>=3)(m=l[d-3]).left===f?m.left=h:m.right=h;break}h._color=1,f.right=r(1,p),f._color=0,d-=1}else{if(!(p=f.right)||0!==p._color){if(h.right=s.left,f._color=0,f.left=s.right,s._color=1,s.left=h,s.right=f,l[d-2]=s,l[d-1]=h,i(f),i(h),i(s),d>=3)(m=l[d-3]).left===f?m.left=s:m.right=s;break}h._color=1,f.right=r(1,p),f._color=0,d-=1}else if(h.right===s){if(!(p=f.left)||0!==p._color){if(f._color=0,f.right=h.left,h._color=1,h.left=f,l[d-2]=h,l[d-1]=s,i(f),i(h),d>=3)(m=l[d-3]).right===f?m.right=h:m.left=h;break}h._color=1,f.left=r(1,p),f._color=0,d-=1}else{var p;if(!(p=f.left)||0!==p._color){var m;if(h.left=s.right,f._color=0,f.right=s.left,s._color=1,s.right=h,s.left=f,l[d-2]=s,l[d-1]=h,i(f),i(h),i(s),d>=3)(m=l[d-3]).right===f?m.right=s:m.left=s;break}h._color=1,f.left=r(1,p),f._color=0,d-=1}}return l[0]._color=1,new a(o,l[0])},o.forEach=function(e,t,n){if(this.root)switch(arguments.length){case 1:return s(e,this.root);case 2:return l(t,this._compare,e,this.root);case 3:if(this._compare(t,n)>=0)return;return c(t,n,this._compare,e,this.root)}},Object.defineProperty(o,"begin",{get:function(){for(var e=[],t=this.root;t;)e.push(t),t=t.left;return new u(this,e)}}),Object.defineProperty(o,"end",{get:function(){for(var e=[],t=this.root;t;)e.push(t),t=t.right;return new u(this,e)}}),o.at=function(e){if(e<0)return new u(this,[]);for(var t=this.root,n=[];;){if(n.push(t),t.left){if(e=t.right._count)break;t=t.right}return new u(this,[])},o.ge=function(e){for(var t=this._compare,n=this.root,r=[],i=0;n;){var a=t(e,n.key);r.push(n),a<=0&&(i=r.length),n=a<=0?n.left:n.right}return r.length=i,new u(this,r)},o.gt=function(e){for(var t=this._compare,n=this.root,r=[],i=0;n;){var a=t(e,n.key);r.push(n),a<0&&(i=r.length),n=a<0?n.left:n.right}return r.length=i,new u(this,r)},o.lt=function(e){for(var t=this._compare,n=this.root,r=[],i=0;n;){var a=t(e,n.key);r.push(n),a>0&&(i=r.length),n=a<=0?n.left:n.right}return r.length=i,new u(this,r)},o.le=function(e){for(var t=this._compare,n=this.root,r=[],i=0;n;){var a=t(e,n.key);r.push(n),a>=0&&(i=r.length),n=a<0?n.left:n.right}return r.length=i,new u(this,r)},o.find=function(e){for(var t=this._compare,n=this.root,r=[];n;){var i=t(e,n.key);if(r.push(n),0===i)return new u(this,r);n=i<=0?n.left:n.right}return new u(this,[])},o.remove=function(e){var t=this.find(e);return t?t.remove():this},o.get=function(e){for(var t=this._compare,n=this.root;n;){var r=t(e,n.key);if(0===r)return n.value;n=r<=0?n.left:n.right}};var d=u.prototype;function h(e,t){e.key=t.key,e.value=t.value,e.left=t.left,e.right=t.right,e._color=t._color,e._count=t._count}function f(e,t){return et?1:0}Object.defineProperty(d,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(d,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),d.clone=function(){return new u(this.tree,this._stack.slice())},d.remove=function(){var e=this._stack;if(0===e.length)return this.tree;var o=new Array(e.length),s=e[e.length-1];o[o.length-1]=new t(s._color,s.key,s.value,s.left,s.right,s._count);for(var l=e.length-2;l>=0;--l){(s=e[l]).left===e[l+1]?o[l]=new t(s._color,s.key,s.value,o[l+1],s.right,s._count):o[l]=new t(s._color,s.key,s.value,s.left,o[l+1],s._count)}if((s=o[o.length-1]).left&&s.right){var c=o.length;for(s=s.left;s.right;)o.push(s),s=s.right;var u=o[c-1];o.push(new t(s._color,u.key,u.value,s.left,s.right,s._count)),o[c-1].key=s.key,o[c-1].value=s.value;for(l=o.length-2;l>=c;--l)s=o[l],o[l]=new t(s._color,s.key,s.value,s.left,o[l+1],s._count);o[c-1].left=o[c]}if(0===(s=o[o.length-1])._color){var d=o[o.length-2];d.left===s?d.left=null:d.right===s&&(d.right=null),o.pop();for(l=0;l=0;--l){if(t=e[l],0===l)return void(t._color=1);if((a=e[l-1]).left===t){if((o=a.right).right&&0===o.right._color)return s=(o=a.right=n(o)).right=n(o.right),a.right=o.left,o.left=a,o.right=s,o._color=a._color,t._color=1,a._color=1,s._color=1,i(a),i(o),l>1&&((c=e[l-2]).left===a?c.left=o:c.right=o),void(e[l-1]=o);if(o.left&&0===o.left._color)return s=(o=a.right=n(o)).left=n(o.left),a.right=s.left,o.left=s.right,s.left=a,s.right=o,s._color=a._color,a._color=1,o._color=1,t._color=1,i(a),i(o),i(s),l>1&&((c=e[l-2]).left===a?c.left=s:c.right=s),void(e[l-1]=s);if(1===o._color){if(0===a._color)return a._color=1,void(a.right=r(0,o));a.right=r(0,o);continue}o=n(o),a.right=o.left,o.left=a,o._color=a._color,a._color=0,i(a),i(o),l>1&&((c=e[l-2]).left===a?c.left=o:c.right=o),e[l-1]=o,e[l]=a,l+11&&((c=e[l-2]).right===a?c.right=o:c.left=o),void(e[l-1]=o);if(o.right&&0===o.right._color)return s=(o=a.left=n(o)).right=n(o.right),a.left=s.right,o.right=s.left,s.right=a,s.left=o,s._color=a._color,a._color=1,o._color=1,t._color=1,i(a),i(o),i(s),l>1&&((c=e[l-2]).right===a?c.right=s:c.left=s),void(e[l-1]=s);if(1===o._color){if(0===a._color)return a._color=1,void(a.left=r(0,o));a.left=r(0,o);continue}var c;o=n(o),a.left=o.right,o.right=a,o._color=a._color,a._color=0,i(a),i(o),l>1&&((c=e[l-2]).right===a?c.right=o:c.left=o),e[l-1]=o,e[l]=a,l+10)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(d,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(d,"index",{get:function(){var e=0,t=this._stack;if(0===t.length){var n=this.tree.root;return n?n._count:0}t[t.length-1].left&&(e=t[t.length-1].left._count);for(var r=t.length-2;r>=0;--r)t[r+1]===t[r].right&&(++e,t[r].left&&(e+=t[r].left._count));return e},enumerable:!0}),d.next=function(){var e=this._stack;if(0!==e.length){var t=e[e.length-1];if(t.right)for(t=t.right;t;)e.push(t),t=t.left;else for(e.pop();e.length>0&&e[e.length-1].right===t;)t=e[e.length-1],e.pop()}},Object.defineProperty(d,"hasNext",{get:function(){var e=this._stack;if(0===e.length)return!1;if(e[e.length-1].right)return!0;for(var t=e.length-1;t>0;--t)if(e[t-1].left===e[t])return!0;return!1}}),d.update=function(e){var n=this._stack;if(0===n.length)throw new Error("Can't update empty node!");var r=new Array(n.length),i=n[n.length-1];r[r.length-1]=new t(i._color,i.key,e,i.left,i.right,i._count);for(var o=n.length-2;o>=0;--o)(i=n[o]).left===n[o+1]?r[o]=new t(i._color,i.key,i.value,r[o+1],i.right,i._count):r[o]=new t(i._color,i.key,i.value,i.left,r[o+1],i._count);return new a(this.tree._compare,r[0])},d.prev=function(){var e=this._stack;if(0!==e.length){var t=e[e.length-1];if(t.left)for(t=t.left;t;)e.push(t),t=t.right;else for(e.pop();e.length>0&&e[e.length-1].left===t;)t=e[e.length-1],e.pop()}},Object.defineProperty(d,"hasPrev",{get:function(){var e=this._stack;if(0===e.length)return!1;if(e[e.length-1].left)return!0;for(var t=e.length-1;t>0;--t)if(e[t-1].right===e[t])return!0;return!1}})},7453:function(e,t,n){"use strict";e.exports=function(e,t){var n=new u(e);return n.update(t),n};var r=n(9557),i=n(1681),a=n(1011),o=n(2864),s=n(8468),l=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function c(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function u(e){this.gl=e,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont="sans-serif",this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=a(e)}var d=u.prototype;function h(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}d.update=function(e){function t(t,n,r){if(r in e){var i,a=e[r],o=this[r];(t?Array.isArray(a)&&Array.isArray(a[0]):Array.isArray(a))?this[r]=i=[n(a[0]),n(a[1]),n(a[2])]:this[r]=i=[n(a),n(a),n(a)];for(var s=0;s<3;++s)if(i[s]!==o[s])return!0}return!1}e=e||{};var n,a=t.bind(this,!1,Number),o=t.bind(this,!1,Boolean),l=t.bind(this,!1,String),c=t.bind(this,!0,(function(e){if(Array.isArray(e)){if(3===e.length)return[+e[0],+e[1],+e[2],1];if(4===e.length)return[+e[0],+e[1],+e[2],+e[3]]}return[0,0,0,1]})),u=!1,d=!1;if("bounds"in e)for(var h=e.bounds,f=0;f<2;++f)for(var p=0;p<3;++p)h[f][p]!==this.bounds[f][p]&&(d=!0),this.bounds[f][p]=h[f][p];if("ticks"in e){n=e.ticks,u=!0,this.autoTicks=!1;for(f=0;f<3;++f)this.tickSpacing[f]=0}else a("tickSpacing")&&(this.autoTicks=!0,d=!0);if(this._firstInit&&("ticks"in e||"tickSpacing"in e||(this.autoTicks=!0),d=!0,u=!0,this._firstInit=!1),d&&this.autoTicks&&(n=s.create(this.bounds,this.tickSpacing),u=!0),u){for(f=0;f<3;++f)n[f].sort((function(e,t){return e.x-t.x}));s.equal(n,this.ticks)?u=!1:this.ticks=n}o("tickEnable"),l("tickFont")&&(u=!0),a("tickSize"),a("tickAngle"),a("tickPad"),c("tickColor");var m=l("labels");l("labelFont")&&(m=!0),o("labelEnable"),a("labelSize"),a("labelPad"),c("labelColor"),o("lineEnable"),o("lineMirror"),a("lineWidth"),c("lineColor"),o("lineTickEnable"),o("lineTickMirror"),a("lineTickLength"),a("lineTickWidth"),c("lineTickColor"),o("gridEnable"),a("gridWidth"),c("gridColor"),o("zeroEnable"),c("zeroLineColor"),a("zeroLineWidth"),o("backgroundEnable"),c("backgroundColor"),this._text?this._text&&(m||u)&&this._text.update(this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont):this._text=r(this.gl,this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont),this._lines&&u&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=i(this.gl,this.bounds,this.ticks))};var f=[new h,new h,new h];function p(e,t,n,r,i){for(var a=e.primalOffset,o=e.primalMinor,s=e.mirrorOffset,l=e.mirrorMinor,c=r[t],u=0;u<3;++u)if(t!==u){var d=a,h=s,f=o,p=l;c&1<0?(f[u]=-1,p[u]=0):(f[u]=0,p[u]=1)}}var m=[0,0,0],g={model:l,view:l,projection:l,_ortho:!1};d.isOpaque=function(){return!0},d.isTransparent=function(){return!1},d.drawTransparent=function(e){};var v=[0,0,0],y=[0,0,0],x=[0,0,0];d.draw=function(e){e=e||g;for(var t=this.gl,n=e.model||l,r=e.view||l,i=e.projection||l,a=this.bounds,s=e._ortho||!1,u=o(n,r,i,a,s),d=u.cubeEdges,h=u.axis,b=r[12],_=r[13],w=r[14],A=r[15],S=(s?2:1)*this.pixelRatio*(i[3]*b+i[7]*_+i[11]*w+i[15]*A)/t.drawingBufferHeight,M=0;M<3;++M)this.lastCubeProps.cubeEdges[M]=d[M],this.lastCubeProps.axis[M]=h[M];var T=f;for(M=0;M<3;++M)p(f[M],M,this.bounds,d,h);t=this.gl;var k,E=m;for(M=0;M<3;++M)this.backgroundEnable[M]?E[M]=h[M]:E[M]=0;this._background.draw(n,r,i,a,E,this.backgroundColor),this._lines.bind(n,r,i,this);for(M=0;M<3;++M){var C=[0,0,0];h[M]>0?C[M]=a[1][M]:C[M]=a[0][M];for(var D=0;D<2;++D){var R=(M+1+D)%3,P=(M+1+(1^D))%3;this.gridEnable[R]&&this._lines.drawGrid(R,P,this.bounds,C,this.gridColor[R],this.gridWidth[R]*this.pixelRatio)}for(D=0;D<2;++D){R=(M+1+D)%3,P=(M+1+(1^D))%3;this.zeroEnable[P]&&Math.min(a[0][P],a[1][P])<=0&&Math.max(a[0][P],a[1][P])>=0&&this._lines.drawZero(R,P,this.bounds,C,this.zeroLineColor[P],this.zeroLineWidth[P]*this.pixelRatio)}}for(M=0;M<3;++M){this.lineEnable[M]&&this._lines.drawAxisLine(M,this.bounds,T[M].primalOffset,this.lineColor[M],this.lineWidth[M]*this.pixelRatio),this.lineMirror[M]&&this._lines.drawAxisLine(M,this.bounds,T[M].mirrorOffset,this.lineColor[M],this.lineWidth[M]*this.pixelRatio);var O=c(v,T[M].primalMinor),L=c(y,T[M].mirrorMinor),I=this.lineTickLength;for(D=0;D<3;++D){var z=S/n[5*D];O[D]*=I[D]*z,L[D]*=I[D]*z}this.lineTickEnable[M]&&this._lines.drawAxisTicks(M,T[M].primalOffset,O,this.lineTickColor[M],this.lineTickWidth[M]*this.pixelRatio),this.lineTickMirror[M]&&this._lines.drawAxisTicks(M,T[M].mirrorOffset,L,this.lineTickColor[M],this.lineTickWidth[M]*this.pixelRatio)}this._lines.unbind(),this._text.bind(n,r,i,this.pixelRatio);var N,F;function B(e){(F=[0,0,0])[e]=1}function j(e,t,n){var r=(e+1)%3,i=(e+2)%3,a=t[r],o=t[i],s=n[r],l=n[i];a>0&&l>0||a>0&&l<0||a<0&&l>0||a<0&&l<0?B(r):(o>0&&s>0||o>0&&s<0||o<0&&s>0||o<0&&s<0)&&B(i)}for(M=0;M<3;++M){var U=T[M].primalMinor,V=T[M].mirrorMinor,H=c(x,T[M].primalOffset);for(D=0;D<3;++D)this.lineTickEnable[M]&&(H[D]+=S*U[D]*Math.max(this.lineTickLength[D],0)/n[5*D]);var W=[0,0,0];if(W[M]=1,this.tickEnable[M]){-3600===this.tickAngle[M]?(this.tickAngle[M]=0,this.tickAlign[M]="auto"):this.tickAlign[M]=-1,N=1,"auto"===(k=[this.tickAlign[M],.5,N])[0]?k[0]=0:k[0]=parseInt(""+k[0]),F=[0,0,0],j(M,U,V);for(D=0;D<3;++D)H[D]+=S*U[D]*this.tickPad[D]/n[5*D];this._text.drawTicks(M,this.tickSize[M],this.tickAngle[M],H,this.tickColor[M],W,F,k)}if(this.labelEnable[M]){N=0,F=[0,0,0],this.labels[M].length>4&&(B(M),N=1),"auto"===(k=[this.labelAlign[M],.5,N])[0]?k[0]=0:k[0]=parseInt(""+k[0]);for(D=0;D<3;++D)H[D]+=S*U[D]*this.labelPad[D]/n[5*D];H[M]+=.5*(a[0][M]+a[1][M]),this._text.drawLabel(M,this.labelSize[M],this.labelAngle[M],H,this.labelColor[M],[0,0,0],F,k)}}this._text.unbind()},d.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},1011:function(e,t,n){"use strict";e.exports=function(e){for(var t=[],n=[],s=0,l=0;l<3;++l)for(var c=(l+1)%3,u=(l+2)%3,d=[0,0,0],h=[0,0,0],f=-1;f<=1;f+=2){n.push(s,s+2,s+1,s+1,s+2,s+3),d[l]=f,h[l]=f;for(var p=-1;p<=1;p+=2){d[c]=p;for(var m=-1;m<=1;m+=2)d[u]=m,t.push(d[0],d[1],d[2],h[0],h[1],h[2]),s+=1}var g=c;c=u,u=g}var v=r(e,new Float32Array(t)),y=r(e,new Uint16Array(n),e.ELEMENT_ARRAY_BUFFER),x=i(e,[{buffer:v,type:e.FLOAT,size:3,offset:0,stride:24},{buffer:v,type:e.FLOAT,size:3,offset:12,stride:24}],y),b=a(e);return b.attributes.position.location=0,b.attributes.normal.location=1,new o(e,v,x,b)};var r=n(5827),i=n(2944),a=n(1943).bg;function o(e,t,n,r){this.gl=e,this.buffer=t,this.vao=n,this.shader=r}var s=o.prototype;s.draw=function(e,t,n,r,i,a){for(var o=!1,s=0;s<3;++s)o=o||i[s];if(o){var l=this.gl;l.enable(l.POLYGON_OFFSET_FILL),l.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:e,view:t,projection:n,bounds:r,enable:i,colors:a},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),l.disable(l.POLYGON_OFFSET_FILL)}},s.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},2864:function(e,t,n){"use strict";e.exports=function(e,t,n,a,f){i(s,t,e),i(s,n,s);for(var y=0,x=0;x<2;++x){u[2]=a[x][2];for(var b=0;b<2;++b){u[1]=a[b][1];for(var _=0;_<2;++_)u[0]=a[_][0],h(l[y],u,s),y+=1}}var w=-1;for(x=0;x<8;++x){for(var A=l[x][3],S=0;S<3;++S)c[x][S]=l[x][S]/A;f&&(c[x][2]*=-1),A<0&&(w<0||c[x][2]E&&(w|=1<E&&(w|=1<c[x][1])&&(z=x);var N=-1;for(x=0;x<3;++x){if((B=z^1<c[F][0]&&(F=B)}var j=m;j[0]=j[1]=j[2]=0,j[r.log2(N^z)]=z&N,j[r.log2(z^F)]=z&F;var U=7^F;U===w||U===I?(U=7^N,j[r.log2(F^U)]=U&F):j[r.log2(N^U)]=U&N;var V=g,H=w;for(M=0;M<3;++M)V[M]=H&1< HALF_PI) && (b <= ONE_AND_HALF_PI)) ?\n b - PI :\n b;\n}\n\nfloat look_horizontal_or_vertical(float a, float ratio) {\n // ratio controls the ratio between being horizontal to (vertical + horizontal)\n // if ratio is set to 0.5 then it is 50%, 50%.\n // when using a higher ratio e.g. 0.75 the result would\n // likely be more horizontal than vertical.\n\n float b = positive_angle(a);\n\n return\n (b < ( ratio) * HALF_PI) ? 0.0 :\n (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI :\n (b < (2.0 + ratio) * HALF_PI) ? 0.0 :\n (b < (4.0 - ratio) * HALF_PI) ? HALF_PI :\n 0.0;\n}\n\nfloat roundTo(float a, float b) {\n return float(b * floor((a + 0.5 * b) / b));\n}\n\nfloat look_round_n_directions(float a, int n) {\n float b = positive_angle(a);\n float div = TWO_PI / float(n);\n float c = roundTo(b, div);\n return look_upwards(c);\n}\n\nfloat applyAlignOption(float rawAngle, float delta) {\n return\n (option > 2) ? look_round_n_directions(rawAngle + delta, option) : // option 3-n: round to n directions\n (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical\n (option == 1) ? rawAngle + delta : // use free angle, and flip to align with one direction of the axis\n (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards\n (option ==-1) ? 0.0 : // useful for backward compatibility, all texts remains horizontal\n rawAngle; // otherwise return back raw input angle\n}\n\nbool isAxisTitle = (axis.x == 0.0) &&\n (axis.y == 0.0) &&\n (axis.z == 0.0);\n\nvoid main() {\n //Compute world offset\n float axisDistance = position.z;\n vec3 dataPosition = axisDistance * axis + offset;\n\n float beta = angle; // i.e. user defined attributes for each tick\n\n float axisAngle;\n float clipAngle;\n float flip;\n\n if (enableAlign) {\n axisAngle = (isAxisTitle) ? HALF_PI :\n computeViewAngle(dataPosition, dataPosition + axis);\n clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir);\n\n axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0;\n clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0;\n\n flip = (dot(vec2(cos(axisAngle), sin(axisAngle)),\n vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0;\n\n beta += applyAlignOption(clipAngle, flip * PI);\n }\n\n //Compute plane offset\n vec2 planeCoord = position.xy * pixelScale;\n\n mat2 planeXform = scale * mat2(\n cos(beta), sin(beta),\n -sin(beta), cos(beta)\n );\n\n vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution;\n\n //Compute clip position\n vec3 clipPosition = project(dataPosition);\n\n //Apply text offset in clip coordinates\n clipPosition += vec3(viewOffset, 0.0);\n\n //Done\n gl_Position = vec4(clipPosition, 1.0);\n}"]),l=r(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 color;\nvoid main() {\n gl_FragColor = color;\n}"]);t.f=function(e){return i(e,s,l,null,[{name:"position",type:"vec3"}])};var c=r(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec3 normal;\n\nuniform mat4 model, view, projection;\nuniform vec3 enable;\nuniform vec3 bounds[2];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n\n vec3 signAxis = sign(bounds[1] - bounds[0]);\n\n vec3 realNormal = signAxis * normal;\n\n if(dot(realNormal, enable) > 0.0) {\n vec3 minRange = min(bounds[0], bounds[1]);\n vec3 maxRange = max(bounds[0], bounds[1]);\n vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0));\n gl_Position = projection * view * model * vec4(nPosition, 1.0);\n } else {\n gl_Position = vec4(0,0,0,0);\n }\n\n colorChannel = abs(realNormal);\n}"]),u=r(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 colors[3];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n gl_FragColor = colorChannel.x * colors[0] +\n colorChannel.y * colors[1] +\n colorChannel.z * colors[2];\n}"]);t.bg=function(e){return i(e,c,u,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},9557:function(e,t,n){"use strict";e.exports=function(e,t,n,r,o,l){var c=i(e),d=a(e,[{buffer:c,size:3}]),h=s(e);h.attributes.position.location=0;var f=new u(e,h,c,d);return f.update(t,n,r,o,l),f};var i=n(5827),a=n(2944),o=n(875),s=n(1943).f,l=window||r.global||{},c=l.__TEXT_CACHE||{};l.__TEXT_CACHE={};function u(e,t,n,r){this.gl=e,this.shader=t,this.buffer=n,this.vao=r,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var d=u.prototype,h=[0,0];d.bind=function(e,t,n,r){this.vao.bind(),this.shader.bind();var i=this.shader.uniforms;i.model=e,i.view=t,i.projection=n,i.pixelScale=r,h[0]=this.gl.drawingBufferWidth,h[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=h},d.unbind=function(){this.vao.unbind()},d.update=function(e,t,n,r,i){var a=[];function s(e,t,n,r,i,s){var l=c[n];l||(l=c[n]={});var u=l[t];u||(u=l[t]=function(e,t){try{return o(e,t)}catch(n){return console.warn('error vectorizing text:"'+e+'" error:',n),{cells:[],positions:[]}}}(t,{triangles:!0,font:n,textAlign:"center",textBaseline:"middle",lineSpacing:i,styletags:s}));for(var d=(r||12)/12,h=u.positions,f=u.cells,p=0,m=f.length;p=0;--v){var y=h[g[v]];a.push(d*y[0],-d*y[1],e)}}for(var l=[0,0,0],u=[0,0,0],d=[0,0,0],h=[0,0,0],f={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},p=0;p<3;++p){d[p]=a.length/3|0,s(.5*(e[0][p]+e[1][p]),t[p],n[p],12,1.25,f),h[p]=(a.length/3|0)-d[p],l[p]=a.length/3|0;for(var m=0;m=0&&(i=n.length-r-1);var a=Math.pow(10,i),o=Math.round(e*t*a),s=o+"";if(s.indexOf("e")>=0)return s;var l=o/a,c=o%a;o<0?(l=0|-Math.ceil(l),c=0|-c):(l=0|Math.floor(l),c|=0);var u=""+l;if(o<0&&(u="-"+u),i){for(var d=""+c;d.length=e[0][i];--o)a.push({x:o*t[i],text:n(t[i],o)});r.push(a)}return r},t.equal=function(e,t){for(var n=0;n<3;++n){if(e[n].length!==t[n].length)return!1;for(var r=0;rn)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return e.bufferSubData(t,a,i),n}function u(e,t){for(var n=r.malloc(e.length,t),i=e.length,a=0;a=0;--r){if(t[r]!==n)return!1;n*=e[r]}return!0}(e.shape,e.stride))0===e.offset&&e.data.length===e.shape[0]?this.length=c(this.gl,this.type,this.length,this.usage,e.data,t):this.length=c(this.gl,this.type,this.length,this.usage,e.data.subarray(e.offset,e.shape[0]),t);else{var s=r.malloc(e.size,n),l=a(s,e.shape);i.assign(l,e),this.length=c(this.gl,this.type,this.length,this.usage,t<0?s:s.subarray(0,e.size),t),r.free(s)}}else if(Array.isArray(e)){var d;d=this.type===this.gl.ELEMENT_ARRAY_BUFFER?u(e,"uint16"):u(e,"float32"),this.length=c(this.gl,this.type,this.length,this.usage,t<0?d:d.subarray(0,e.length),t),r.free(d)}else if("object"===typeof e&&"number"===typeof e.length)this.length=c(this.gl,this.type,this.length,this.usage,e,t);else{if("number"!==typeof e&&void 0!==e)throw new Error("gl-buffer: Invalid data type");if(t>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");(e|=0)<=0&&(e=1),this.gl.bufferData(this.type,0|e,this.usage),this.length=e}},e.exports=function(e,t,n,r){if(n=n||e.ARRAY_BUFFER,r=r||e.DYNAMIC_DRAW,n!==e.ARRAY_BUFFER&&n!==e.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(r!==e.DYNAMIC_DRAW&&r!==e.STATIC_DRAW&&r!==e.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var i=e.createBuffer(),a=new s(e,n,i,0,r);return a.update(t),a}},1140:function(e,t,n){"use strict";var r=n(2858);e.exports=function(e,t){var n=e.positions,i=e.vectors,a={positions:[],vertexIntensity:[],vertexIntensityBounds:e.vertexIntensityBounds,vectors:[],cells:[],coneOffset:e.coneOffset,colormap:e.colormap};if(0===e.positions.length)return t&&(t[0]=[0,0,0],t[1]=[0,0,0]),a;for(var o=0,s=1/0,l=-1/0,c=1/0,u=-1/0,d=1/0,h=-1/0,f=null,p=null,m=[],g=1/0,v=!1,y=0;yo&&(o=r.length(b)),y){var _=2*r.distance(f,x)/(r.length(p)+r.length(b));_?(g=Math.min(g,_),v=!1):v=!0}v||(f=x,p=b),m.push(b)}var w=[s,c,d],A=[l,u,h];t&&(t[0]=w,t[1]=A),0===o&&(o=1);var S=1/o;isFinite(g)||(g=1),a.vectorScale=g;var M=e.coneSize||.5;e.absoluteConeSize&&(M=e.absoluteConeSize*S),a.coneScale=M;y=0;for(var T=0;y=1},f.isTransparent=function(){return this.opacity<1},f.pickSlots=1,f.setPickBase=function(e){this.pickId=e},f.update=function(e){e=e||{};var t=this.gl;this.dirty=!0,"lightPosition"in e&&(this.lightPosition=e.lightPosition),"opacity"in e&&(this.opacity=e.opacity),"ambient"in e&&(this.ambientLight=e.ambient),"diffuse"in e&&(this.diffuseLight=e.diffuse),"specular"in e&&(this.specularLight=e.specular),"roughness"in e&&(this.roughness=e.roughness),"fresnel"in e&&(this.fresnel=e.fresnel),void 0!==e.tubeScale&&(this.tubeScale=e.tubeScale),void 0!==e.vectorScale&&(this.vectorScale=e.vectorScale),void 0!==e.coneScale&&(this.coneScale=e.coneScale),void 0!==e.coneOffset&&(this.coneOffset=e.coneOffset),e.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=t.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=t.LINEAR,this.texture.setPixels(function(e){for(var t=u({colormap:e,nshades:256,format:"rgba"}),n=new Uint8Array(1024),r=0;r<256;++r){for(var i=t[r],a=0;a<3;++a)n[4*r+a]=i[a];n[4*r+3]=255*i[3]}return c(n,[256,256,4],[4,0,1])}(e.colormap)),this.texture.generateMipmap());var n=e.cells,r=e.positions,i=e.vectors;if(r&&n&&i){var a=[],o=[],s=[],l=[],d=[];this.cells=n,this.positions=r,this.vectors=i;var h=e.meshColor||[1,1,1,1],f=e.vertexIntensity,p=1/0,m=-1/0;if(f)if(e.vertexIntensityBounds)p=+e.vertexIntensityBounds[0],m=+e.vertexIntensityBounds[1];else for(var g=0;g0){var m=this.triShader;m.bind(),m.uniforms=c,this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}},f.drawPick=function(e){e=e||{};for(var t=this.gl,n=e.model||d,r=e.view||d,i=e.projection||d,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(n),this._view=[].slice.call(r),this._projection=[].slice.call(i),this._resolution=[t.drawingBufferWidth,t.drawingBufferHeight];var s={model:n,view:r,projection:i,clipBounds:a,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},l=this.pickShader;l.bind(),l.uniforms=s,this.triangleCount>0&&(this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind())},f.pick=function(e){if(!e)return null;if(e.id!==this.pickId)return null;var t=e.value[0]+256*e.value[1]+65536*e.value[2],n=this.cells[t],r=this.positions[n[1]].slice(0,3),i={position:r,dataCoordinate:r,index:Math.floor(n[1]/48)};return"cone"===this.traceType?i.index=Math.floor(n[1]/48):"streamtube"===this.traceType&&(i.intensity=this.intensity[n[1]],i.velocity=this.vectors[n[1]].slice(0,3),i.divergence=this.vectors[n[1]][3],i.index=t),i},f.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()},e.exports=function(e,t,n){var s=n.shaders;1===arguments.length&&(e=(t=e).gl);var l=function(e,t){var n=r(e,t.meshShader.vertex,t.meshShader.fragment,null,t.meshShader.attributes);return n.attributes.position.location=0,n.attributes.color.location=2,n.attributes.uv.location=3,n.attributes.vector.location=4,n}(e,s),u=function(e,t){var n=r(e,t.pickShader.vertex,t.pickShader.fragment,null,t.pickShader.attributes);return n.attributes.position.location=0,n.attributes.id.location=1,n.attributes.vector.location=4,n}(e,s),d=o(e,c(new Uint8Array([255,255,255,255]),[1,1,4]));d.generateMipmap(),d.minFilter=e.LINEAR_MIPMAP_LINEAR,d.magFilter=e.LINEAR;var f=i(e),p=i(e),m=i(e),g=i(e),v=i(e),y=new h(e,d,l,u,f,p,v,m,g,a(e,[{buffer:f,type:e.FLOAT,size:4},{buffer:v,type:e.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:m,type:e.FLOAT,size:4},{buffer:g,type:e.FLOAT,size:2},{buffer:p,type:e.FLOAT,size:4}]),n.traceType||"cone");return y.update(t),y}},7234:function(e,t,n){var r=n(6832),i=r(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n// segment + 0 top vertex\n// segment + 1 perimeter vertex a+1\n// segment + 2 perimeter vertex a\n// segment + 3 center base vertex\n// segment + 4 perimeter vertex a\n// segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n\n const float segmentCount = 8.0;\n\n float index = rawIndex - floor(rawIndex /\n (segmentCount * 6.0)) *\n (segmentCount * 6.0);\n\n float segment = floor(0.001 + index/6.0);\n float segmentIndex = index - (segment*6.0);\n\n normal = -normalize(d);\n\n if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n return mix(vec3(0.0), -d, coneOffset);\n }\n\n float nextAngle = (\n (segmentIndex > 0.99 && segmentIndex < 1.01) ||\n (segmentIndex > 4.99 && segmentIndex < 5.01)\n ) ? 1.0 : 0.0;\n float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n vec3 v1 = mix(d, vec3(0.0), coneOffset);\n vec3 v2 = v1 - d;\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d)*0.25;\n vec3 y = v * sin(angle) * length(d)*0.25;\n vec3 v3 = v2 + x + y;\n if (segmentIndex < 3.0) {\n vec3 tx = u * sin(angle);\n vec3 ty = v * -cos(angle);\n vec3 tangent = tx + ty;\n normal = normalize(cross(v3 - v1, tangent));\n }\n\n if (segmentIndex == 0.0) {\n return mix(d, vec3(0.0), coneOffset);\n }\n return v3;\n}\n\nattribute vec3 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\n\nuniform float vectorScale, coneScale, coneOffset;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 eyePosition, lightPosition;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n // Scale the vector magnitude to stay constant with\n // model & view changes.\n vec3 normal;\n vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal);\n vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * conePosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n // vec4 m_position = model * vec4(conePosition, 1.0);\n vec4 t_position = view * conePosition;\n gl_Position = projection * t_position;\n\n f_color = color;\n f_data = conePosition.xyz;\n f_position = position.xyz;\n f_uv = uv;\n}\n"]),a=r(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}\n"]),o=r(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n// segment + 0 top vertex\n// segment + 1 perimeter vertex a+1\n// segment + 2 perimeter vertex a\n// segment + 3 center base vertex\n// segment + 4 perimeter vertex a\n// segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n\n const float segmentCount = 8.0;\n\n float index = rawIndex - floor(rawIndex /\n (segmentCount * 6.0)) *\n (segmentCount * 6.0);\n\n float segment = floor(0.001 + index/6.0);\n float segmentIndex = index - (segment*6.0);\n\n normal = -normalize(d);\n\n if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n return mix(vec3(0.0), -d, coneOffset);\n }\n\n float nextAngle = (\n (segmentIndex > 0.99 && segmentIndex < 1.01) ||\n (segmentIndex > 4.99 && segmentIndex < 5.01)\n ) ? 1.0 : 0.0;\n float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n vec3 v1 = mix(d, vec3(0.0), coneOffset);\n vec3 v2 = v1 - d;\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d)*0.25;\n vec3 y = v * sin(angle) * length(d)*0.25;\n vec3 v3 = v2 + x + y;\n if (segmentIndex < 3.0) {\n vec3 tx = u * sin(angle);\n vec3 ty = v * -cos(angle);\n vec3 tangent = tx + ty;\n normal = normalize(cross(v3 - v1, tangent));\n }\n\n if (segmentIndex == 0.0) {\n return mix(d, vec3(0.0), coneOffset);\n }\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform float vectorScale, coneScale, coneOffset;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n vec3 normal;\n vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector.xyz), position.w, coneOffset, normal);\n vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n gl_Position = projection * view * conePosition;\n f_id = id;\n f_position = position.xyz;\n}\n"]),s=r(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]);t.meshShader={vertex:i,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},t.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},1950:function(e){e.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},6603:function(e,t,n){var r=n(1950);e.exports=function(e){return r[e]}},3110:function(e,t,n){"use strict";e.exports=function(e){var t=e.gl,n=r(t),o=i(t,[{buffer:n,type:t.FLOAT,size:3,offset:0,stride:40},{buffer:n,type:t.FLOAT,size:4,offset:12,stride:40},{buffer:n,type:t.FLOAT,size:3,offset:28,stride:40}]),l=a(t);l.attributes.position.location=0,l.attributes.color.location=1,l.attributes.offset.location=2;var c=new s(t,n,o,l);return c.update(e),c};var r=n(5827),i=n(2944),a=n(7667),o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(e,t,n,r){this.gl=e,this.shader=r,this.buffer=t,this.vao=n,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var l=s.prototype;function c(e,t){for(var n=0;n<3;++n)e[0][n]=Math.min(e[0][n],t[n]),e[1][n]=Math.max(e[1][n],t[n])}l.isOpaque=function(){return!this.hasAlpha},l.isTransparent=function(){return this.hasAlpha},l.drawTransparent=l.draw=function(e){var t=this.gl,n=this.shader.uniforms;this.shader.bind();var r=n.view=e.view||o,i=n.projection=e.projection||o;n.model=e.model||o,n.clipBounds=this.clipBounds,n.opacity=this.opacity;var a=r[12],s=r[13],l=r[14],c=r[15],u=(e._ortho||!1?2:1)*this.pixelRatio*(i[3]*a+i[7]*s+i[11]*l+i[15]*c)/t.drawingBufferHeight;this.vao.bind();for(var d=0;d<3;++d)t.lineWidth(this.lineWidth[d]*this.pixelRatio),n.capSize=this.capSize[d]*u,this.lineCount[d]&&t.drawArrays(t.LINES,this.lineOffset[d],this.lineCount[d]);this.vao.unbind()};var u=function(){for(var e=new Array(3),t=0;t<3;++t){for(var n=[],r=1;r<=2;++r)for(var i=-1;i<=1;i+=2){var a=[0,0,0];a[(r+t)%3]=i,n.push(a)}e[t]=n}return e}();function d(e,t,n,r){for(var i=u[r],a=0;a0)(m=u.slice())[s]+=f[1][s],i.push(u[0],u[1],u[2],p[0],p[1],p[2],p[3],0,0,0,m[0],m[1],m[2],p[0],p[1],p[2],p[3],0,0,0),c(this.bounds,m),o+=2+d(i,m,p,s)}}this.lineCount[s]=o-this.lineOffset[s]}this.buffer.update(i)}},l.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},7667:function(e,t,n){"use strict";var r=n(6832),i=n(5158),a=r(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position, offset;\nattribute vec4 color;\nuniform mat4 model, view, projection;\nuniform float capSize;\nvarying vec4 fragColor;\nvarying vec3 fragPosition;\n\nvoid main() {\n vec4 worldPosition = model * vec4(position, 1.0);\n worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0);\n gl_Position = projection * view * worldPosition;\n fragColor = color;\n fragPosition = position;\n}"]),o=r(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float opacity;\nvarying vec3 fragPosition;\nvarying vec4 fragColor;\n\nvoid main() {\n if (\n outOfRange(clipBounds[0], clipBounds[1], fragPosition) ||\n fragColor.a * opacity == 0.\n ) discard;\n\n gl_FragColor = opacity * fragColor;\n}"]);e.exports=function(e){return i(e,a,o,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},4234:function(e,t,n){"use strict";var r=n(8931);e.exports=function(e,t,n,r){i||(i=e.FRAMEBUFFER_UNSUPPORTED,a=e.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,o=e.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,s=e.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var c=e.getExtension("WEBGL_draw_buffers");!l&&c&&function(e,t){var n=e.getParameter(t.MAX_COLOR_ATTACHMENTS_WEBGL);l=new Array(n+1);for(var r=0;r<=n;++r){for(var i=new Array(n),a=0;au||n<0||n>u)throw new Error("gl-fbo: Parameters are too large for FBO");var d=1;if("color"in(r=r||{})){if((d=Math.max(0|r.color,0))<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(d>1){if(!c)throw new Error("gl-fbo: Multiple draw buffer extension not supported");if(d>e.getParameter(c.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+d+" draw buffers")}}var h=e.UNSIGNED_BYTE,f=e.getExtension("OES_texture_float");if(r.float&&d>0){if(!f)throw new Error("gl-fbo: Context does not support floating point textures");h=e.FLOAT}else r.preferFloat&&d>0&&f&&(h=e.FLOAT);var m=!0;"depth"in r&&(m=!!r.depth);var g=!1;"stencil"in r&&(g=!!r.stencil);return new p(e,t,n,h,d,m,g,c)};var i,a,o,s,l=null;function c(e){return[e.getParameter(e.FRAMEBUFFER_BINDING),e.getParameter(e.RENDERBUFFER_BINDING),e.getParameter(e.TEXTURE_BINDING_2D)]}function u(e,t){e.bindFramebuffer(e.FRAMEBUFFER,t[0]),e.bindRenderbuffer(e.RENDERBUFFER,t[1]),e.bindTexture(e.TEXTURE_2D,t[2])}function d(e){switch(e){case i:throw new Error("gl-fbo: Framebuffer unsupported");case a:throw new Error("gl-fbo: Framebuffer incomplete attachment");case o:throw new Error("gl-fbo: Framebuffer incomplete dimensions");case s:throw new Error("gl-fbo: Framebuffer incomplete missing attachment");default:throw new Error("gl-fbo: Framebuffer failed for unspecified reason")}}function h(e,t,n,i,a,o){if(!i)return null;var s=r(e,t,n,a,i);return s.magFilter=e.NEAREST,s.minFilter=e.NEAREST,s.mipSamples=1,s.bind(),e.framebufferTexture2D(e.FRAMEBUFFER,o,e.TEXTURE_2D,s.handle,0),s}function f(e,t,n,r,i){var a=e.createRenderbuffer();return e.bindRenderbuffer(e.RENDERBUFFER,a),e.renderbufferStorage(e.RENDERBUFFER,r,t,n),e.framebufferRenderbuffer(e.FRAMEBUFFER,i,e.RENDERBUFFER,a),a}function p(e,t,n,r,i,a,o,s){this.gl=e,this._shape=[0|t,0|n],this._destroyed=!1,this._ext=s,this.color=new Array(i);for(var p=0;p1&&s.drawBuffersWEBGL(l[o]);var y=n.getExtension("WEBGL_depth_texture");y?p?e.depth=h(n,i,a,y.UNSIGNED_INT_24_8_WEBGL,n.DEPTH_STENCIL,n.DEPTH_STENCIL_ATTACHMENT):m&&(e.depth=h(n,i,a,n.UNSIGNED_SHORT,n.DEPTH_COMPONENT,n.DEPTH_ATTACHMENT)):m&&p?e._depth_rb=f(n,i,a,n.DEPTH_STENCIL,n.DEPTH_STENCIL_ATTACHMENT):m?e._depth_rb=f(n,i,a,n.DEPTH_COMPONENT16,n.DEPTH_ATTACHMENT):p&&(e._depth_rb=f(n,i,a,n.STENCIL_INDEX,n.STENCIL_ATTACHMENT));var x=n.checkFramebufferStatus(n.FRAMEBUFFER);if(x!==n.FRAMEBUFFER_COMPLETE){for(e._destroyed=!0,n.bindFramebuffer(n.FRAMEBUFFER,null),n.deleteFramebuffer(e.handle),e.handle=null,e.depth&&(e.depth.dispose(),e.depth=null),e._depth_rb&&(n.deleteRenderbuffer(e._depth_rb),e._depth_rb=null),v=0;vi||n<0||n>i)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");e._shape[0]=t,e._shape[1]=n;for(var a=c(r),o=0;o>8*f&255;this.pickOffset=n,i.bind();var p=i.uniforms;p.viewTransform=e,p.pickOffset=t,p.shape=this.shape;var m=i.attributes;return this.positionBuffer.bind(),m.position.pointer(),this.weightBuffer.bind(),m.weight.pointer(s.UNSIGNED_BYTE,!1),this.idBuffer.bind(),m.pickId.pointer(s.UNSIGNED_BYTE,!1),s.drawArrays(s.TRIANGLES,0,o),n+this.shape[0]*this.shape[1]}}}(),u.pick=function(e,t,n){var r=this.pickOffset,i=this.shape[0]*this.shape[1];if(n=r+i)return null;var a=n-r,o=this.xData,s=this.yData;return{object:this,pointId:a,dataCoord:[o[a%this.shape[0]],s[a/this.shape[0]|0]]}},u.update=function(e){var t=(e=e||{}).shape||[0,0],n=e.x||i(t[0]),o=e.y||i(t[1]),s=e.z||new Float32Array(t[0]*t[1]),l=!1!==e.zsmooth;this.xData=n,this.yData=o;var c,u,h,f,p=e.colorLevels||[0],m=e.colorValues||[0,0,0,1],g=p.length,v=this.bounds;l?(c=v[0]=n[0],u=v[1]=o[0],h=v[2]=n[n.length-1],f=v[3]=o[o.length-1]):(c=v[0]=n[0]+(n[1]-n[0])/2,u=v[1]=o[0]+(o[1]-o[0])/2,h=v[2]=n[n.length-1]+(n[n.length-1]-n[n.length-2])/2,f=v[3]=o[o.length-1]+(o[o.length-1]-o[o.length-2])/2);var y=1/(h-c),x=1/(f-u),b=t[0],_=t[1];this.shape=[b,_];var w=(l?(b-1)*(_-1):b*_)*(d.length>>>1);this.numVertices=w;for(var A=a.mallocUint8(4*w),S=a.mallocFloat32(2*w),M=a.mallocUint8(2*w),T=a.mallocUint32(w),k=0,E=l?b-1:b,C=l?_-1:_,D=0;D max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform sampler2D dashTexture;\nuniform float dashScale;\nuniform float opacity;\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if (\n outOfRange(clipBounds[0], clipBounds[1], worldPosition) ||\n fragColor.a * opacity == 0.\n ) discard;\n\n float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r;\n if(dashWeight < 0.5) {\n discard;\n }\n gl_FragColor = fragColor * opacity;\n}\n"]),s=r(["precision highp float;\n#define GLSLIFY 1\n\n#define FLOAT_MAX 1.70141184e38\n#define FLOAT_MIN 1.17549435e-38\n\n// https://github.com/mikolalysenko/glsl-read-float/blob/master/index.glsl\nvec4 packFloat(float v) {\n float av = abs(v);\n\n //Handle special cases\n if(av < FLOAT_MIN) {\n return vec4(0.0, 0.0, 0.0, 0.0);\n } else if(v > FLOAT_MAX) {\n return vec4(127.0, 128.0, 0.0, 0.0) / 255.0;\n } else if(v < -FLOAT_MAX) {\n return vec4(255.0, 128.0, 0.0, 0.0) / 255.0;\n }\n\n vec4 c = vec4(0,0,0,0);\n\n //Compute exponent and mantissa\n float e = floor(log2(av));\n float m = av * pow(2.0, -e) - 1.0;\n\n //Unpack mantissa\n c[1] = floor(128.0 * m);\n m -= c[1] / 128.0;\n c[2] = floor(32768.0 * m);\n m -= c[2] / 32768.0;\n c[3] = floor(8388608.0 * m);\n\n //Unpack exponent\n float ebias = e + 127.0;\n c[0] = floor(ebias / 2.0);\n ebias -= c[0] * 2.0;\n c[1] += floor(ebias) * 128.0;\n\n //Unpack sign bit\n c[0] += 128.0 * step(0.0, -v);\n\n //Scale back to range\n return c / 255.0;\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform float pickId;\nuniform vec3 clipBounds[2];\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard;\n\n gl_FragColor = vec4(pickId/255.0, packFloat(pixelArcLength).xyz);\n}"]),l=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];t.createShader=function(e){return i(e,a,o,null,l)},t.createPickShader=function(e){return i(e,a,s,null,l)}},6086:function(e,t,n){"use strict";e.exports=function(e){var t=e.gl||e.scene&&e.scene.gl,n=d(t);n.attributes.position.location=0,n.attributes.nextPosition.location=1,n.attributes.arcLength.location=2,n.attributes.lineWidth.location=3,n.attributes.color.location=4;var o=h(t);o.attributes.position.location=0,o.attributes.nextPosition.location=1,o.attributes.arcLength.location=2,o.attributes.lineWidth.location=3,o.attributes.color.location=4;for(var s=r(t),l=i(t,[{buffer:s,size:3,offset:0,stride:48},{buffer:s,size:3,offset:12,stride:48},{buffer:s,size:1,offset:24,stride:48},{buffer:s,size:1,offset:28,stride:48},{buffer:s,size:4,offset:32,stride:48}]),u=c(new Array(1024),[256,1,4]),f=0;f<1024;++f)u.data[f]=255;var p=a(t,u);p.wrap=t.REPEAT;var m=new v(t,n,o,s,l,p);return m.update(e),m};var r=n(5827),i=n(2944),a=n(8931),o=new Uint8Array(4),s=new Float32Array(o.buffer);var l=n(5070),c=n(5050),u=n(248),d=u.createShader,h=u.createPickShader,f=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function p(e,t){for(var n=0,r=0;r<3;++r){var i=e[r]-t[r];n+=i*i}return Math.sqrt(n)}function m(e){for(var t=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],n=0;n<3;++n)t[0][n]=Math.max(e[0][n],t[0][n]),t[1][n]=Math.min(e[1][n],t[1][n]);return t}function g(e,t,n,r){this.arcLength=e,this.position=t,this.index=n,this.dataCoordinate=r}function v(e,t,n,r,i,a){this.gl=e,this.shader=t,this.pickShader=n,this.buffer=r,this.vao=i,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=a,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var y=v.prototype;y.isTransparent=function(){return this.hasAlpha},y.isOpaque=function(){return!this.hasAlpha},y.pickSlots=1,y.setPickBase=function(e){this.pickId=e},y.drawTransparent=y.draw=function(e){if(this.vertexCount){var t=this.gl,n=this.shader,r=this.vao;n.bind(),n.uniforms={model:e.model||f,view:e.view||f,projection:e.projection||f,clipBounds:m(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[t.drawingBufferWidth,t.drawingBufferHeight],pixelRatio:this.pixelRatio},r.bind(),r.draw(t.TRIANGLE_STRIP,this.vertexCount),r.unbind()}},y.drawPick=function(e){if(this.vertexCount){var t=this.gl,n=this.pickShader,r=this.vao;n.bind(),n.uniforms={model:e.model||f,view:e.view||f,projection:e.projection||f,pickId:this.pickId,clipBounds:m(this.clipBounds),screenShape:[t.drawingBufferWidth,t.drawingBufferHeight],pixelRatio:this.pixelRatio},r.bind(),r.draw(t.TRIANGLE_STRIP,this.vertexCount),r.unbind()}},y.update=function(e){var t,n;this.dirty=!0;var r=!!e.connectGaps;"dashScale"in e&&(this.dashScale=e.dashScale),this.hasAlpha=!1,"opacity"in e&&(this.opacity=+e.opacity,this.opacity<1&&(this.hasAlpha=!0));var i=[],a=[],o=[],s=0,u=0,d=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],h=e.position||e.positions;if(h){var f=e.color||e.colors||[0,0,0,1],m=e.lineWidth||1,g=!1;e:for(t=1;t0){for(var w=0;w<24;++w)i.push(i[i.length-12]);u+=2,g=!0}continue e}d[0][n]=Math.min(d[0][n],b[n],_[n]),d[1][n]=Math.max(d[1][n],b[n],_[n])}Array.isArray(f[0])?(v=f.length>t-1?f[t-1]:f.length>0?f[f.length-1]:[0,0,0,1],y=f.length>t?f[t]:f.length>0?f[f.length-1]:[0,0,0,1]):v=y=f,3===v.length&&(v=[v[0],v[1],v[2],1]),3===y.length&&(y=[y[0],y[1],y[2],1]),!this.hasAlpha&&v[3]<1&&(this.hasAlpha=!0),x=Array.isArray(m)?m.length>t-1?m[t-1]:m.length>0?m[m.length-1]:[0,0,0,1]:m;var A=s;if(s+=p(b,_),g){for(n=0;n<2;++n)i.push(b[0],b[1],b[2],_[0],_[1],_[2],A,x,v[0],v[1],v[2],v[3]);u+=2,g=!1}i.push(b[0],b[1],b[2],_[0],_[1],_[2],A,x,v[0],v[1],v[2],v[3],b[0],b[1],b[2],_[0],_[1],_[2],A,-x,v[0],v[1],v[2],v[3],_[0],_[1],_[2],b[0],b[1],b[2],s,-x,y[0],y[1],y[2],y[3],_[0],_[1],_[2],b[0],b[1],b[2],s,x,y[0],y[1],y[2],y[3]),u+=4}}if(this.buffer.update(i),a.push(s),o.push(h[h.length-1].slice()),this.bounds=d,this.vertexCount=u,this.points=o,this.arcLength=a,"dashes"in e){var S=e.dashes.slice();for(S.unshift(0),t=1;t1.0001)return null;v+=g[d]}if(Math.abs(v-1)>.001)return null;return[h,s(e,g),g]}},2056:function(e,t,n){var r=n(6832),i=r(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position, normal;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model\n , view\n , projection\n , inverseModel;\nuniform vec3 eyePosition\n , lightPosition;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvec4 project(vec3 p) {\n return projection * view * model * vec4(p, 1.0);\n}\n\nvoid main() {\n gl_Position = project(position);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * vec4(position , 1.0);\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n f_color = color;\n f_data = position;\n f_uv = uv;\n}\n"]),a=r(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\n//#pragma glslify: beckmann = require(glsl-specular-beckmann) // used in gl-surface3d\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness\n , fresnel\n , kambient\n , kdiffuse\n , kspecular;\nuniform sampler2D texture;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (f_color.a == 0.0 ||\n outOfRange(clipBounds[0], clipBounds[1], f_data)\n ) discard;\n\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d\n\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * f_color.a;\n}\n"]),o=r(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model, view, projection;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n f_color = color;\n f_data = position;\n f_uv = uv;\n}"]),s=r(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard;\n\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}"]),l=r(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\nattribute float pointSize;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0);\n } else {\n gl_Position = projection * view * model * vec4(position, 1.0);\n }\n gl_PointSize = pointSize;\n f_color = color;\n f_uv = uv;\n}"]),c=r(["precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5);\n if(dot(pointR, pointR) > 0.25) {\n discard;\n }\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}"]),u=r(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n f_id = id;\n f_position = position;\n}"]),d=r(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]),h=r(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute float pointSize;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0.0, 0.0, 0.0, 0.0);\n } else {\n gl_Position = projection * view * model * vec4(position, 1.0);\n gl_PointSize = pointSize;\n }\n f_id = id;\n f_position = position;\n}"]),f=r(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\n\nuniform mat4 model, view, projection;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n}"]),p=r(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec3 contourColor;\n\nvoid main() {\n gl_FragColor = vec4(contourColor, 1.0);\n}\n"]);t.meshShader={vertex:i,fragment:a,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},t.wireShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},t.pointShader={vertex:l,fragment:c,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},t.pickShader={vertex:u,fragment:d,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},t.pointPickShader={vertex:h,fragment:d,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},t.contourShader={vertex:f,fragment:p,attributes:[{name:"position",type:"vec3"}]}},8116:function(e,t,n){"use strict";var r=n(5158),i=n(5827),a=n(2944),o=n(8931),s=n(115),l=n(104),c=n(7437),u=n(5050),d=n(9156),h=n(7212),f=n(5306),p=n(2056),m=n(4340),g=p.meshShader,v=p.wireShader,y=p.pointShader,x=p.pickShader,b=p.pointPickShader,_=p.contourShader,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function A(e,t,n,r,i,a,o,s,l,c,u,d,h,f,p,m,g,v,y,x,b,_,A,S,M,T,k){this.gl=e,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=t,this.dirty=!0,this.triShader=n,this.lineShader=r,this.pointShader=i,this.pickShader=a,this.pointPickShader=o,this.contourShader=s,this.trianglePositions=l,this.triangleColors=u,this.triangleNormals=h,this.triangleUVs=d,this.triangleIds=c,this.triangleVAO=f,this.triangleCount=0,this.lineWidth=1,this.edgePositions=p,this.edgeColors=g,this.edgeUVs=v,this.edgeIds=m,this.edgeVAO=y,this.edgeCount=0,this.pointPositions=x,this.pointColors=_,this.pointUVs=A,this.pointSizes=S,this.pointIds=b,this.pointVAO=M,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=T,this.contourVAO=k,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=w,this._view=w,this._projection=w,this._resolution=[1,1]}var S=A.prototype;function M(e,t){if(!t)return 1;if(!t.length)return 1;for(var n=0;ne&&n>0){var r=(t[n][0]-e)/(t[n][0]-t[n-1][0]);return t[n][1]*(1-r)+r*t[n-1][1]}}return 1}function T(e){var t=r(e,y.vertex,y.fragment);return t.attributes.position.location=0,t.attributes.color.location=2,t.attributes.uv.location=3,t.attributes.pointSize.location=4,t}function k(e){var t=r(e,x.vertex,x.fragment);return t.attributes.position.location=0,t.attributes.id.location=1,t}function E(e){var t=r(e,b.vertex,b.fragment);return t.attributes.position.location=0,t.attributes.id.location=1,t.attributes.pointSize.location=4,t}function C(e){var t=r(e,_.vertex,_.fragment);return t.attributes.position.location=0,t}S.isOpaque=function(){return!this.hasAlpha},S.isTransparent=function(){return this.hasAlpha},S.pickSlots=1,S.setPickBase=function(e){this.pickId=e},S.highlight=function(e){if(e&&this.contourEnable){for(var t=h(this.cells,this.intensity,e.intensity),n=t.cells,r=t.vertexIds,i=t.vertexWeights,a=n.length,o=f.mallocFloat32(6*a),s=0,l=0;l0&&((d=this.triShader).bind(),d.uniforms=s,this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind());this.edgeCount>0&&this.lineWidth>0&&((d=this.lineShader).bind(),d.uniforms=s,this.edgeVAO.bind(),t.lineWidth(this.lineWidth*this.pixelRatio),t.drawArrays(t.LINES,0,2*this.edgeCount),this.edgeVAO.unbind());this.pointCount>0&&((d=this.pointShader).bind(),d.uniforms=s,this.pointVAO.bind(),t.drawArrays(t.POINTS,0,this.pointCount),this.pointVAO.unbind());this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0&&((d=this.contourShader).bind(),d.uniforms=s,this.contourVAO.bind(),t.drawArrays(t.LINES,0,this.contourCount),this.contourVAO.unbind())},S.drawPick=function(e){e=e||{};for(var t=this.gl,n=e.model||w,r=e.view||w,i=e.projection||w,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(n),this._view=[].slice.call(r),this._projection=[].slice.call(i),this._resolution=[t.drawingBufferWidth,t.drawingBufferHeight];var s,l={model:n,view:r,projection:i,clipBounds:a,pickId:this.pickId/255};((s=this.pickShader).bind(),s.uniforms=l,this.triangleCount>0&&(this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),t.lineWidth(this.lineWidth*this.pixelRatio),t.drawArrays(t.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0)&&((s=this.pointPickShader).bind(),s.uniforms=l,this.pointVAO.bind(),t.drawArrays(t.POINTS,0,this.pointCount),this.pointVAO.unbind())},S.pick=function(e){if(!e)return null;if(e.id!==this.pickId)return null;for(var t=e.value[0]+256*e.value[1]+65536*e.value[2],n=this.cells[t],r=this.positions,i=new Array(n.length),a=0;al[S]&&(a.uniforms.dataAxis=e,a.uniforms.screenOffset=t,a.uniforms.color=g[r],a.uniforms.angle=v[r],c.drawArrays(c.TRIANGLES,l[S],l[M]-l[S]))),y[r]&&A&&(t[1^r]-=T*f*x[r],a.uniforms.dataAxis=n,a.uniforms.screenOffset=t,a.uniforms.color=b[r],a.uniforms.angle=_[r],c.drawArrays(c.TRIANGLES,w,A)),t[1^r]=T*u[2+(1^r)]-1,p[r+2]&&(t[1^r]+=T*f*m[r+2],Sl[S]&&(a.uniforms.dataAxis=e,a.uniforms.screenOffset=t,a.uniforms.color=g[r+2],a.uniforms.angle=v[r+2],c.drawArrays(c.TRIANGLES,l[S],l[M]-l[S]))),y[r+2]&&A&&(t[1^r]+=T*f*x[r+2],a.uniforms.dataAxis=n,a.uniforms.screenOffset=t,a.uniforms.color=b[r+2],a.uniforms.angle=_[r+2],c.drawArrays(c.TRIANGLES,w,A))}}(),c.drawTitle=function(){var e=[0,0],t=[0,0];return function(){var n=this.plot,r=this.shader,i=n.gl,a=n.screenBox,o=n.titleCenter,s=n.titleAngle,l=n.titleColor,c=n.pixelRatio;if(this.titleCount){for(var u=0;u<2;++u)t[u]=2*(o[u]*c-a[u])/(a[2+u]-a[u])-1;r.bind(),r.uniforms.dataAxis=e,r.uniforms.screenOffset=t,r.uniforms.angle=s,r.uniforms.color=l,i.drawArrays(i.TRIANGLES,this.titleOffset,this.titleCount)}}}(),c.bind=function(){var e=[0,0],t=[0,0],n=[0,0];return function(){var r=this.plot,i=this.shader,a=r._tickBounds,o=r.dataBox,s=r.screenBox,l=r.viewBox;i.bind();for(var c=0;c<2;++c){var u=a[c],d=a[c+2]-u,h=.5*(o[c+2]+o[c]),f=o[c+2]-o[c],p=l[c],m=l[c+2]-p,g=s[c],v=s[c+2]-g;t[c]=2*d/f*m/v,e[c]=2*(u-h)/f*m/v}n[1]=2*r.pixelRatio/(s[3]-s[1]),n[0]=n[1]*(s[3]-s[1])/(s[2]-s[0]),i.uniforms.dataScale=t,i.uniforms.dataShift=e,i.uniforms.textScale=n,this.vbo.bind(),i.attributes.textCoordinate.pointer()}}(),c.update=function(e){var t,n,r,i,o,s=[],l=e.ticks,c=e.bounds;for(o=0;o<2;++o){var u=[Math.floor(s.length/3)],d=[-1/0],h=l[o];for(t=0;t=0){var m=t[p]-r[p]*(t[p+2]-t[p])/(r[p+2]-r[p]);0===p?o.drawLine(m,t[1],m,t[3],f[p],h[p]):o.drawLine(t[0],m,t[2],m,f[p],h[p])}}for(p=0;p=0;--e)this.objects[e].dispose();this.objects.length=0;for(e=this.overlays.length-1;e>=0;--e)this.overlays[e].dispose();this.overlays.length=0,this.gl=null},c.addObject=function(e){this.objects.indexOf(e)<0&&(this.objects.push(e),this.setDirty())},c.removeObject=function(e){for(var t=this.objects,n=0;nMath.abs(t))c.rotate(a,0,0,-e*n*Math.PI*p.rotateSpeed/window.innerWidth);else if(!p._ortho){var o=-p.zoomSpeed*i*t/window.innerHeight*(a-c.lastT())/20;c.pan(a,0,0,d*(Math.exp(o)-1))}}}),!0)},p.enableMouseListeners(),p};var r=n(8161),i=n(1152),a=n(6145),o=n(6475),s=n(2565),l=n(5233)},8245:function(e,t,n){var r=n(6832),i=n(5158),a=r(["precision mediump float;\n#define GLSLIFY 1\nattribute vec2 position;\nvarying vec2 uv;\nvoid main() {\n uv = position;\n gl_Position = vec4(position, 0, 1);\n}"]),o=r(["precision mediump float;\n#define GLSLIFY 1\n\nuniform sampler2D accumBuffer;\nvarying vec2 uv;\n\nvoid main() {\n vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0));\n gl_FragColor = min(vec4(1,1,1,1), accum);\n}"]);e.exports=function(e){return i(e,a,o,null,[{name:"position",type:"vec2"}])}},1059:function(e,t,n){"use strict";var r=n(4296),i=n(7453),a=n(2771),o=n(6496),s=n(2611),l=n(4234),c=n(8126),u=n(6145),d=n(1120),h=n(5268),f=n(8245),p=n(2861)({tablet:!0,featureDetect:!0});function m(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function g(e){var t=Math.round(Math.log(Math.abs(e))/Math.log(10));if(t<0){var n=Math.round(Math.pow(10,-t));return Math.ceil(e*n)/n}if(t>0){n=Math.round(Math.pow(10,t));return Math.ceil(e/n)*n}return Math.ceil(e)}function v(e){return"boolean"!==typeof e||e}e.exports={createScene:function(e){(e=e||{}).camera=e.camera||{};var t=e.canvas;if(!t){if(t=document.createElement("canvas"),e.container)e.container.appendChild(t);else document.body.appendChild(t)}var n=e.gl;n||(e.glOptions&&(p=!!e.glOptions.preserveDrawingBuffer),n=function(e,t){var n=null;try{(n=e.getContext("webgl",t))||(n=e.getContext("experimental-webgl",t))}catch(r){return null}return n}(t,e.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:p}));if(!n)throw new Error("webgl not supported");var y=e.bounds||[[-10,-10,-10],[10,10,10]],x=new m,b=l(n,n.drawingBufferWidth,n.drawingBufferHeight,{preferFloat:!p}),_=f(n),w=e.cameraObject&&!0===e.cameraObject._ortho||e.camera.projection&&"orthographic"===e.camera.projection.type||!1,A={eye:e.camera.eye||[2,0,0],center:e.camera.center||[0,0,0],up:e.camera.up||[0,1,0],zoomMin:e.camera.zoomMax||.1,zoomMax:e.camera.zoomMin||100,mode:e.camera.mode||"turntable",_ortho:w},S=e.axes||{},M=i(n,S);M.enable=!S.disable;var T=e.spikes||{},k=o(n,T),E=[],C=[],D=[],R=[],P=!0,O=!0,L=new Array(16),I=new Array(16),z={view:null,projection:L,model:I,_ortho:!1},N=(O=!0,[n.drawingBufferWidth,n.drawingBufferHeight]),F=e.cameraObject||r(t,A),B={gl:n,contextLost:!1,pixelRatio:e.pixelRatio||1,canvas:t,selection:x,camera:F,axes:M,axesPixels:null,spikes:k,bounds:y,objects:E,shape:N,aspect:e.aspectRatio||[1,1,1],pickRadius:e.pickRadius||10,zNear:e.zNear||.01,zFar:e.zFar||1e3,fovy:e.fovy||Math.PI/4,clearColor:e.clearColor||[0,0,0,0],autoResize:v(e.autoResize),autoBounds:v(e.autoBounds),autoScale:!!e.autoScale,autoCenter:v(e.autoCenter),clipToBounds:v(e.clipToBounds),snapToData:!!e.snapToData,onselect:e.onselect||null,onrender:e.onrender||null,onclick:e.onclick||null,cameraParams:z,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(e){this.aspect[0]=e.x,this.aspect[1]=e.y,this.aspect[2]=e.z,O=!0},setBounds:function(e,t){this.bounds[0][e]=t.min,this.bounds[1][e]=t.max},setClearColor:function(e){this.clearColor=e},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},j=[n.drawingBufferWidth/B.pixelRatio|0,n.drawingBufferHeight/B.pixelRatio|0];function U(){if(!B._stopped&&B.autoResize){var e=t.parentNode,n=1,r=1;e&&e!==document.body?(n=e.clientWidth,r=e.clientHeight):(n=window.innerWidth,r=window.innerHeight);var i=0|Math.ceil(n*B.pixelRatio),a=0|Math.ceil(r*B.pixelRatio);if(i!==t.width||a!==t.height){t.width=i,t.height=a;var o=t.style;o.position=o.position||"absolute",o.left="0px",o.top="0px",o.width=n+"px",o.height=r+"px",P=!0}}}B.autoResize&&U();function V(){for(var e=E.length,t=R.length,r=0;r0&&0===D[t-1];)D.pop(),R.pop().dispose()}function H(){if(B.contextLost)return!0;n.isContextLost()&&(B.contextLost=!0,B.mouseListener.enabled=!1,B.selection.object=null,B.oncontextloss&&B.oncontextloss())}window.addEventListener("resize",U),B.update=function(e){B._stopped||(e=e||{},P=!0,O=!0)},B.add=function(e){B._stopped||(e.axes=M,E.push(e),C.push(-1),P=!0,O=!0,V())},B.remove=function(e){if(!B._stopped){var t=E.indexOf(e);t<0||(E.splice(t,1),C.pop(),P=!0,O=!0,V())}},B.dispose=function(){if(!B._stopped&&(B._stopped=!0,window.removeEventListener("resize",U),t.removeEventListener("webglcontextlost",H),B.mouseListener.enabled=!1,!B.contextLost)){M.dispose(),k.dispose();for(var e=0;ex.distance)continue;for(var c=0;c 1.0) {\n discard;\n }\n baseColor = mix(borderColor, color, step(radius, centerFraction));\n gl_FragColor = vec4(baseColor.rgb * baseColor.a, baseColor.a);\n }\n}\n"]),t.pickVertex=r(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\nattribute vec4 pickId;\n\nuniform mat3 matrix;\nuniform float pointSize;\nuniform vec4 pickOffset;\n\nvarying vec4 fragId;\n\nvoid main() {\n vec3 hgPosition = matrix * vec3(position, 1);\n gl_Position = vec4(hgPosition.xy, 0, hgPosition.z);\n gl_PointSize = pointSize;\n\n vec4 id = pickId + pickOffset;\n id.y += floor(id.x / 256.0);\n id.x -= floor(id.x / 256.0) * 256.0;\n\n id.z += floor(id.y / 256.0);\n id.y -= floor(id.y / 256.0) * 256.0;\n\n id.w += floor(id.z / 256.0);\n id.z -= floor(id.z / 256.0) * 256.0;\n\n fragId = id;\n}\n"]),t.pickFragment=r(["precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragId;\n\nvoid main() {\n float radius = length(2.0 * gl_PointCoord.xy - 1.0);\n if(radius > 1.0) {\n discard;\n }\n gl_FragColor = fragId / 255.0;\n}\n"])},8271:function(e,t,n){"use strict";var r=n(5158),i=n(5827),a=n(5306),o=n(8023);function s(e,t,n,r,i){this.plot=e,this.offsetBuffer=t,this.pickBuffer=n,this.shader=r,this.pickShader=i,this.sizeMin=.5,this.sizeMinCap=2,this.sizeMax=20,this.areaRatio=1,this.pointCount=0,this.color=[1,0,0,1],this.borderColor=[0,0,0,1],this.blend=!1,this.pickOffset=0,this.points=null}e.exports=function(e,t){var n=e.gl,a=i(n),l=i(n),c=r(n,o.pointVertex,o.pointFragment),u=r(n,o.pickVertex,o.pickFragment),d=new s(e,a,l,c,u);return d.update(t),e.addObject(d),d};var l=s.prototype;l.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},l.update=function(e){var t;function n(t,n){return t in e?e[t]:n}e=e||{},this.sizeMin=n("sizeMin",.5),this.sizeMax=n("sizeMax",20),this.color=n("color",[1,0,0,1]).slice(),this.areaRatio=n("areaRatio",1),this.borderColor=n("borderColor",[0,0,0,1]).slice(),this.blend=n("blend",!1);var r=e.positions.length>>>1,i=e.positions instanceof Float32Array,o=e.idToIndex instanceof Int32Array&&e.idToIndex.length>=r,s=e.positions,l=i?s:a.mallocFloat32(s.length),c=o?e.idToIndex:a.mallocInt32(r);if(i||l.set(s),!o)for(l.set(s),t=0;t>>1;for(n=0;n=t[0]&&a<=t[2]&&o>=t[1]&&o<=t[3]&&r++}return r}(this.points,o),u=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(c,.33333)));e[0]=2/s,e[4]=2/l,e[6]=-2*o[0]/s-1,e[7]=-2*o[1]/l-1,this.offsetBuffer.bind(),i.bind(),i.attributes.position.pointer(),i.uniforms.matrix=e,i.uniforms.color=this.color,i.uniforms.borderColor=this.borderColor,i.uniforms.pointCloud=u<5,i.uniforms.pointSize=u,i.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),r&&(t[0]=255&n,t[1]=n>>8&255,t[2]=n>>16&255,t[3]=n>>24&255,this.pickBuffer.bind(),i.attributes.pickId.pointer(a.UNSIGNED_BYTE),i.uniforms.pickOffset=t,this.pickOffset=n);var d=a.getParameter(a.BLEND),h=a.getParameter(a.DITHER);return d&&!this.blend&&a.disable(a.BLEND),h&&a.disable(a.DITHER),a.drawArrays(a.POINTS,0,this.pointCount),d&&!this.blend&&a.enable(a.BLEND),h&&a.enable(a.DITHER),n+this.pointCount}}(),l.draw=l.unifiedDraw,l.drawPick=l.unifiedDraw,l.pick=function(e,t,n){var r=this.pickOffset,i=this.pointCount;if(n=r+i)return null;var a=n-r,o=this.points;return{object:this,pointId:a,dataCoord:[o[2*a],o[2*a+1]]}}},6093:function(e){e.exports=function(e,t,n,r){var i,a,o,s,l,c=t[0],u=t[1],d=t[2],h=t[3],f=n[0],p=n[1],m=n[2],g=n[3];(a=c*f+u*p+d*m+h*g)<0&&(a=-a,f=-f,p=-p,m=-m,g=-g);1-a>1e-6?(i=Math.acos(a),o=Math.sin(i),s=Math.sin((1-r)*i)/o,l=Math.sin(r*i)/o):(s=1-r,l=r);return e[0]=s*c+l*f,e[1]=s*u+l*p,e[2]=s*d+l*m,e[3]=s*h+l*g,e}},8240:function(e){"use strict";e.exports=function(e){return e||0===e?e.toString():""}},4123:function(e,t,n){"use strict";var r=n(875);e.exports=function(e,t,n){var a=i[t];a||(a=i[t]={});if(e in a)return a[e];var o={textAlign:"center",textBaseline:"middle",lineHeight:1,font:t,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},triangles:!0},s=r(e,o);o.triangles=!1;var l,c,u=r(e,o);if(n&&1!==n){for(l=0;l max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform vec4 highlightId;\nuniform float highlightScale;\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float scale = 1.0;\n if(distance(highlightId, id) < 0.0001) {\n scale = highlightScale;\n }\n\n vec4 worldPosition = model * vec4(position, 1);\n vec4 viewPosition = view * worldPosition;\n viewPosition = viewPosition / viewPosition.w;\n vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0));\n\n gl_Position = clipPosition;\n interpColor = color;\n pickId = id;\n dataCoordinate = position;\n }\n}"]),o=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float highlightScale, pixelRatio;\nuniform vec4 highlightId;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float scale = pixelRatio;\n if(distance(highlightId.bgr, id.bgr) < 0.001) {\n scale *= highlightScale;\n }\n\n vec4 worldPosition = model * vec4(position, 1.0);\n vec4 viewPosition = view * worldPosition;\n vec4 clipPosition = projection * viewPosition;\n clipPosition /= clipPosition.w;\n\n gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0);\n interpColor = color;\n pickId = id;\n dataCoordinate = position;\n }\n}"]),s=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform float highlightScale;\nuniform vec4 highlightId;\nuniform vec3 axes[2];\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float scale, pixelRatio;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float lscale = pixelRatio * scale;\n if(distance(highlightId, id) < 0.0001) {\n lscale *= highlightScale;\n }\n\n vec4 clipCenter = projection * view * model * vec4(position, 1);\n vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y;\n vec4 clipPosition = projection * view * model * vec4(dataPosition, 1);\n\n gl_Position = clipPosition;\n interpColor = color;\n pickId = id;\n dataCoordinate = dataPosition;\n }\n}\n"]),l=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 fragClipBounds[2];\nuniform float opacity;\n\nvarying vec4 interpColor;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (\n outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) ||\n interpColor.a * opacity == 0.\n ) discard;\n gl_FragColor = interpColor * opacity;\n}\n"]),c=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 fragClipBounds[2];\nuniform float pickGroup;\n\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard;\n\n gl_FragColor = vec4(pickGroup, pickId.bgr);\n}"]),u=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],d={vertex:a,fragment:l,attributes:u},h={vertex:o,fragment:l,attributes:u},f={vertex:s,fragment:l,attributes:u},p={vertex:a,fragment:c,attributes:u},m={vertex:o,fragment:c,attributes:u},g={vertex:s,fragment:c,attributes:u};function v(e,t){var n=r(e,t),i=n.attributes;return i.position.location=0,i.color.location=1,i.glyph.location=2,i.id.location=3,n}t.createPerspective=function(e){return v(e,d)},t.createOrtho=function(e){return v(e,h)},t.createProject=function(e){return v(e,f)},t.createPickPerspective=function(e){return v(e,p)},t.createPickOrtho=function(e){return v(e,m)},t.createPickProject=function(e){return v(e,g)}},2182:function(e,t,n){"use strict";var r=n(3596),i=n(5827),a=n(2944),o=n(5306),s=n(104),l=n(9282),c=n(4123),u=n(8240),d=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function h(e,t){var n=e[0],r=e[1],i=e[2],a=e[3];return e[0]=t[0]*n+t[4]*r+t[8]*i+t[12]*a,e[1]=t[1]*n+t[5]*r+t[9]*i+t[13]*a,e[2]=t[2]*n+t[6]*r+t[10]*i+t[14]*a,e[3]=t[3]*n+t[7]*r+t[11]*i+t[15]*a,e}function f(e,t,n,r){return h(r,r),h(r,r),h(r,r)}function p(e,t){this.index=e,this.dataCoordinate=this.position=t}function m(e){return!0===e||e>1?1:e}function g(e,t,n,r,i,a,o,s,l,c,u,d){this.gl=e,this.pixelRatio=1,this.shader=t,this.orthoShader=n,this.projectShader=r,this.pointBuffer=i,this.colorBuffer=a,this.glyphBuffer=o,this.idBuffer=s,this.vao=l,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[2/3,2/3,2/3],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=c,this.pickOrthoShader=u,this.pickProjectShader=d,this.points=[],this._selectResult=new p(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}e.exports=function(e){var t=e.gl,n=l.createPerspective(t),r=l.createOrtho(t),o=l.createProject(t),s=l.createPickPerspective(t),c=l.createPickOrtho(t),u=l.createPickProject(t),d=i(t),h=i(t),f=i(t),p=i(t),m=a(t,[{buffer:d,size:3,type:t.FLOAT},{buffer:h,size:4,type:t.FLOAT},{buffer:f,size:2,type:t.FLOAT},{buffer:p,size:4,type:t.UNSIGNED_BYTE,normalized:!0}]),v=new g(t,n,r,o,d,h,f,p,m,s,c,u);return v.update(e),v};var v=g.prototype;v.pickSlots=1,v.setPickBase=function(e){this.pickId=e},v.isTransparent=function(){if(this.hasAlpha)return!0;for(var e=0;e<3;++e)if(this.axesProject[e]&&this.projectHasAlpha)return!0;return!1},v.isOpaque=function(){if(!this.hasAlpha)return!0;for(var e=0;e<3;++e)if(this.axesProject[e]&&!this.projectHasAlpha)return!0;return!1};var y=[0,0],x=[0,0,0],b=[0,0,0],_=[0,0,0,1],w=[0,0,0,1],A=d.slice(),S=[0,0,0],M=[[0,0,0],[0,0,0]];function T(e){return e[0]=e[1]=e[2]=0,e}function k(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=1,e}function E(e,t,n,r){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[n]=r,e}function C(e,t,n,r){var i,a=t.axesProject,o=t.gl,l=e.uniforms,c=n.model||d,u=n.view||d,h=n.projection||d,p=t.axesBounds,m=function(e){for(var t=M,n=0;n<2;++n)for(var r=0;r<3;++r)t[n][r]=Math.max(Math.min(e[n][r],1e8),-1e8);return t}(t.clipBounds);i=t.axes&&t.axes.lastCubeProps?t.axes.lastCubeProps.axis:[1,1,1],y[0]=2/o.drawingBufferWidth,y[1]=2/o.drawingBufferHeight,e.bind(),l.view=u,l.projection=h,l.screenSize=y,l.highlightId=t.highlightId,l.highlightScale=t.highlightScale,l.clipBounds=m,l.pickGroup=t.pickId/255,l.pixelRatio=r;for(var g=0;g<3;++g)if(a[g]){l.scale=t.projectScale[g],l.opacity=t.projectOpacity[g];for(var v=A,C=0;C<16;++C)v[C]=0;for(C=0;C<4;++C)v[5*C]=1;v[5*g]=0,i[g]<0?v[12+g]=p[0][g]:v[12+g]=p[1][g],s(v,c,v),l.model=v;var D=(g+1)%3,R=(g+2)%3,P=T(x),O=T(b);P[D]=1,O[R]=1;var L=f(0,0,0,k(_,P)),I=f(0,0,0,k(w,O));if(Math.abs(L[1])>Math.abs(I[1])){var z=L;L=I,I=z,z=P,P=O,O=z;var N=D;D=R,R=N}L[0]<0&&(P[D]=-1),I[1]>0&&(O[R]=-1);var F=0,B=0;for(C=0;C<4;++C)F+=Math.pow(c[4*D+C],2),B+=Math.pow(c[4*R+C],2);P[D]/=Math.sqrt(F),O[R]/=Math.sqrt(B),l.axes[0]=P,l.axes[1]=O,l.fragClipBounds[0]=E(S,m[0],g,-1e8),l.fragClipBounds[1]=E(S,m[1],g,1e8),t.vao.bind(),t.vao.draw(o.TRIANGLES,t.vertexCount),t.lineWidth>0&&(o.lineWidth(t.lineWidth*r),t.vao.draw(o.LINES,t.lineVertexCount,t.vertexCount)),t.vao.unbind()}}var D=[[-1e8,-1e8,-1e8],[1e8,1e8,1e8]];function R(e,t,n,r,i,a,o){var s=n.gl;if((a===n.projectHasAlpha||o)&&C(t,n,r,i),a===n.hasAlpha||o){e.bind();var l=e.uniforms;l.model=r.model||d,l.view=r.view||d,l.projection=r.projection||d,y[0]=2/s.drawingBufferWidth,y[1]=2/s.drawingBufferHeight,l.screenSize=y,l.highlightId=n.highlightId,l.highlightScale=n.highlightScale,l.fragClipBounds=D,l.clipBounds=n.axes.bounds,l.opacity=n.opacity,l.pickGroup=n.pickId/255,l.pixelRatio=i,n.vao.bind(),n.vao.draw(s.TRIANGLES,n.vertexCount),n.lineWidth>0&&(s.lineWidth(n.lineWidth*i),n.vao.draw(s.LINES,n.lineVertexCount,n.vertexCount)),n.vao.unbind()}}function P(e,t,n,i){var a;a=Array.isArray(e)?t=this.pointCount||t<0)return null;var n=this.points[t],r=this._selectResult;r.index=t;for(var i=0;i<3;++i)r.position[i]=r.dataCoordinate[i]=n[i];return r},v.highlight=function(e){if(e){var t=e.index,n=255&t,r=t>>8&255,i=t>>16&255;this.highlightId=[n/255,r/255,i/255,0]}else this.highlightId=[1,1,1,1]},v.update=function(e){if("perspective"in(e=e||{})&&(this.useOrtho=!e.perspective),"orthographic"in e&&(this.useOrtho=!!e.orthographic),"lineWidth"in e&&(this.lineWidth=e.lineWidth),"project"in e)if(Array.isArray(e.project))this.axesProject=e.project;else{var t=!!e.project;this.axesProject=[t,t,t]}if("projectScale"in e)if(Array.isArray(e.projectScale))this.projectScale=e.projectScale.slice();else{var n=+e.projectScale;this.projectScale=[n,n,n]}if(this.projectHasAlpha=!1,"projectOpacity"in e){if(Array.isArray(e.projectOpacity))this.projectOpacity=e.projectOpacity.slice();else{n=+e.projectOpacity;this.projectOpacity=[n,n,n]}for(var r=0;r<3;++r)this.projectOpacity[r]=m(this.projectOpacity[r]),this.projectOpacity[r]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in e&&(this.opacity=m(e.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var i,a,s=e.position,l=e.font||"normal",c=e.alignment||[0,0];if(2===c.length)i=c[0],a=c[1];else{i=[],a=[];for(r=0;r0){var O=0,L=x,I=[0,0,0,1],z=[0,0,0,1],N=Array.isArray(f)&&Array.isArray(f[0]),F=Array.isArray(v)&&Array.isArray(v[0]);e:for(r=0;r<_;++r){y+=1;for(w=s[r],A=0;A<3;++A){if(isNaN(w[A])||!isFinite(w[A]))continue e;d[A]=Math.max(d[A],w[A]),u[A]=Math.min(u[A],w[A])}S=(B=P(h,r,l,this.pixelRatio)).mesh,M=B.lines,T=B.bounds;var B,j=B.visible;if(j)if(Array.isArray(f)){if(3===(U=N?r0?1-T[0][0]:q<0?1+T[1][0]:1,Y*=Y>0?1-T[0][1]:Y<0?1+T[1][1]:1],X=S.cells||[],Z=S.positions||[];for(A=0;A0){var v=n*u;o.drawBox(d-v,h-v,f+v,h+v,a),o.drawBox(d-v,p-v,f+v,p+v,a),o.drawBox(d-v,h-v,d+v,p+v,a),o.drawBox(f-v,h-v,f+v,p+v,a)}}}},s.update=function(e){e=e||{},this.innerFill=!!e.innerFill,this.outerFill=!!e.outerFill,this.innerColor=(e.innerColor||[0,0,0,.5]).slice(),this.outerColor=(e.outerColor||[0,0,0,.5]).slice(),this.borderColor=(e.borderColor||[0,0,0,1]).slice(),this.borderWidth=e.borderWidth||0,this.selectBox=(e.selectBox||this.selectBox).slice()},s.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)}},2611:function(e,t,n){"use strict";e.exports=function(e,t){var n=t[0],a=t[1],o=r(e,n,a,{}),s=i.mallocUint8(n*a*4);return new l(e,o,s)};var r=n(4234),i=n(5306),a=n(5050),o=n(2288).nextPow2;function s(e,t,n,r,i){this.coord=[e,t],this.id=n,this.value=r,this.distance=i}function l(e,t,n){this.gl=e,this.fbo=t,this.buffer=n,this._readTimeout=null;var r=this;this._readCallback=function(){r.gl&&(t.bind(),e.readPixels(0,0,t.shape[0],t.shape[1],e.RGBA,e.UNSIGNED_BYTE,r.buffer),r._readTimeout=null)}}var c=l.prototype;Object.defineProperty(c,"shape",{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(e){if(this.gl){this.fbo.shape=e;var t=this.fbo.shape[0],n=this.fbo.shape[1];if(n*t*4>this.buffer.length){i.free(this.buffer);for(var r=this.buffer=i.mallocUint8(o(n*t*4)),a=0;an)for(e=n;et)for(e=t;e=0){for(var A=0|w.type.charAt(w.type.length-1),S=new Array(A),M=0;M=0;)T+=1;_[y]=T}var k=new Array(n.length);function E(){h.program=o.program(f,h._vref,h._fref,b,_);for(var e=0;e=0){if((p=h.charCodeAt(h.length-1)-48)<2||p>4)throw new r("","Invalid data type for attribute "+d+": "+h);s(e,t,f[0],i,p,a,d)}else{if(!(h.indexOf("mat")>=0))throw new r("","Unknown data type for attribute "+d+": "+h);var p;if((p=h.charCodeAt(h.length-1)-48)<2||p>4)throw new r("","Invalid data type for attribute "+d+": "+h);l(e,t,f,i,p,a,d)}}}return a};var r=n(9068);function i(e,t,n,r,i,a){this._gl=e,this._wrapper=t,this._index=n,this._locations=r,this._dimension=i,this._constFunc=a}var a=i.prototype;a.pointer=function(e,t,n,r){var i=this,a=i._gl,o=i._locations[i._index];a.vertexAttribPointer(o,i._dimension,e||a.FLOAT,!!t,n||0,r||0),a.enableVertexAttribArray(o)},a.set=function(e,t,n,r){return this._constFunc(this._locations[this._index],e,t,n,r)},Object.defineProperty(a,"location",{get:function(){return this._locations[this._index]},set:function(e){return e!==this._locations[this._index]&&(this._locations[this._index]=0|e,this._wrapper.program=null),0|e}});var o=[function(e,t,n){return void 0===n.length?e.vertexAttrib1f(t,n):e.vertexAttrib1fv(t,n)},function(e,t,n,r){return void 0===n.length?e.vertexAttrib2f(t,n,r):e.vertexAttrib2fv(t,n)},function(e,t,n,r,i){return void 0===n.length?e.vertexAttrib3f(t,n,r,i):e.vertexAttrib3fv(t,n)},function(e,t,n,r,i,a){return void 0===n.length?e.vertexAttrib4f(t,n,r,i,a):e.vertexAttrib4fv(t,n)}];function s(e,t,n,r,a,s,l){var c=o[a],u=new i(e,t,n,r,a,c);Object.defineProperty(s,l,{set:function(t){return e.disableVertexAttribArray(r[n]),c(e,r[n],t),t},get:function(){return u},enumerable:!0})}function l(e,t,n,r,i,a,o){for(var l=new Array(i),c=new Array(i),u=0;u4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+y);e["uniformMatrix"+v+"fv"](s[d],!1,h);break}throw new i("","Unknown uniform data type for "+name+": "+y)}if((v=y.charCodeAt(y.length-1)-48)<2||v>4)throw new i("","Invalid data type");switch(y.charAt(0)){case"b":case"i":e["uniform"+v+"iv"](s[d],h);break;case"v":e["uniform"+v+"fv"](s[d],h);break;default:throw new i("","Unrecognized data type for vector "+name+": "+y)}}}}}}function c(e,t){if("object"!==typeof t)return[[e,t]];var n=[];for(var r in t){var i=t[r],a=e;parseInt(r)+""===r?a+="["+r+"]":a+="."+r,"object"===typeof i?n.push.apply(n,c(a,i)):n.push([a,i])}return n}function u(e,t,r){if("object"===typeof r){var c=d(r);Object.defineProperty(e,t,{get:a(c),set:l(r),enumerable:!0,configurable:!1})}else s[r]?Object.defineProperty(e,t,{get:(u=r,function(e,t,n){return e.getUniform(t.program,n[u])}),set:l(r),enumerable:!0,configurable:!1}):e[t]=function(e){switch(e){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":case"float":return 0;default:var t=e.indexOf("vec");if(0<=t&&t<=1&&e.length===4+t){if((n=e.charCodeAt(e.length-1)-48)<2||n>4)throw new i("","Invalid data type");return"b"===e.charAt(0)?o(n,!1):o(n,0)}if(0===e.indexOf("mat")&&4===e.length){var n;if((n=e.charCodeAt(e.length-1)-48)<2||n>4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+e);return o(n*n,0)}throw new i("","Unknown uniform data type for "+name+": "+e)}}(n[r].type);var u}function d(e){var t;if(Array.isArray(e)){t=new Array(e.length);for(var n=0;n1){s[0]in a||(a[s[0]]=[]),a=a[s[0]];for(var l=1;l1)for(var l=0;l 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n float segmentCount = 8.0;\n\n float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d);\n vec3 y = v * sin(angle) * length(d);\n vec3 v3 = x + y;\n\n normal = normalize(v3);\n\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\n\nuniform float vectorScale, tubeScale;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 eyePosition, lightPosition;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n // Scale the vector magnitude to stay constant with\n // model & view changes.\n vec3 normal;\n vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * tubePosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n // vec4 m_position = model * vec4(tubePosition, 1.0);\n vec4 t_position = view * tubePosition;\n gl_Position = projection * t_position;\n\n f_color = color;\n f_data = tubePosition.xyz;\n f_position = position.xyz;\n f_uv = uv;\n}\n"]),a=r(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}\n"]),o=r(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n float segmentCount = 8.0;\n\n float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d);\n vec3 y = v * sin(angle) * length(d);\n vec3 v3 = x + y;\n\n normal = normalize(v3);\n\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform float tubeScale;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n vec3 normal;\n vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n gl_Position = projection * view * tubePosition;\n f_id = id;\n f_position = position.xyz;\n}\n"]),s=r(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]);t.meshShader={vertex:i,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},t.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7307:function(e,t,n){"use strict";var r=n(2858),i=n(4020),a=["xyz","xzy","yxz","yzx","zxy","zyx"],o=function(e,t,n,a){for(var o=0,s=0;s0)for(A=0;A<8;A++){var S=(A+1)%8;c.push(h[A],f[A],f[S],f[S],h[S],h[A]),d.push(y,v,v,v,y,y),p.push(m,g,g,g,m,m);var M=c.length;u.push([M-6,M-5,M-4],[M-3,M-2,M-1])}var T=h;h=f,f=T;var k=y;y=v,v=k;var E=m;m=g,g=E}return{positions:c,cells:u,vectors:d,vertexIntensity:p}}(e,n,a,o)})),d=[],h=[],f=[],p=[];for(s=0;st)return n-1}return n},l=function(e,t,n){return en?n:e},c=function(e){var t=1/0;e.sort((function(e,t){return e-t}));for(var n=e.length,r=1;rd-1||y>h-1||x>f-1)return r.create();var b,_,w,A,S,M,T=a[0][p],k=a[0][v],E=a[1][m],C=a[1][y],D=a[2][g],R=(o-T)/(k-T),P=(c-E)/(C-E),O=(u-D)/(a[2][x]-D);switch(isFinite(R)||(R=.5),isFinite(P)||(P=.5),isFinite(O)||(O=.5),n.reversedX&&(p=d-1-p,v=d-1-v),n.reversedY&&(m=h-1-m,y=h-1-y),n.reversedZ&&(g=f-1-g,x=f-1-x),n.filled){case 5:S=g,M=x,w=m*f,A=y*f,b=p*f*h,_=v*f*h;break;case 4:S=g,M=x,b=p*f,_=v*f,w=m*f*d,A=y*f*d;break;case 3:w=m,A=y,S=g*h,M=x*h,b=p*h*f,_=v*h*f;break;case 2:w=m,A=y,b=p*h,_=v*h,S=g*h*d,M=x*h*d;break;case 1:b=p,_=v,S=g*d,M=x*d,w=m*d*f,A=y*d*f;break;default:b=p,_=v,w=m*d,A=y*d,S=g*d*h,M=x*d*h}var L=i[b+w+S],I=i[b+w+M],z=i[b+A+S],N=i[b+A+M],F=i[_+w+S],B=i[_+w+M],j=i[_+A+S],U=i[_+A+M],V=r.create(),H=r.create(),W=r.create(),G=r.create();r.lerp(V,L,F,R),r.lerp(H,I,B,R),r.lerp(W,z,j,R),r.lerp(G,N,U,R);var q=r.create(),Y=r.create();r.lerp(q,V,W,P),r.lerp(Y,H,G,P);var $=r.create();return r.lerp($,q,Y,O),$}(t,e,f)},m=e.getDivergence||function(e,t){var n=r.create(),i=1e-4;r.add(n,e,[i,0,0]);var a=p(n);r.subtract(a,a,t),r.scale(a,a,1/i),r.add(n,e,[0,i,0]);var o=p(n);r.subtract(o,o,t),r.scale(o,o,1/i),r.add(n,e,[0,0,i]);var s=p(n);return r.subtract(s,s,t),r.scale(s,s,1/i),r.add(n,a,o),r.add(n,n,s),n},g=[],v=t[0][0],y=t[0][1],x=t[0][2],b=t[1][0],_=t[1][1],w=t[1][2],A=function(e){var t=e[0],n=e[1],r=e[2];return!(tb||n_||rw)},S=10*r.distance(t[0],t[1])/i,M=S*S,T=1,k=0,E=n.length;E>1&&(T=function(e){for(var t=[],n=[],r=[],i={},a={},o={},s=e.length,l=0;lk&&(k=N),I.push(N),g.push({points:R,velocities:P,divergences:I});for(var F=0;F<100*i&&R.lengthM&&r.scale(B,B,S/Math.sqrt(j)),r.add(B,B,D),O=p(B),r.squaredDistance(L,B)-M>-1e-4*M){R.push(B),L=B,P.push(O);z=m(B,O),N=r.length(z);isFinite(N)&&N>k&&(k=N),I.push(N)}D=B}}var U=o(g,e.colormap,k,T);return d?U.tubeScale=d:(0===k&&(k=1),U.tubeScale=.5*u*T/k),U};var u=n(9578),d=n(1140).createMesh;e.exports.createTubeMesh=function(e,t){return d(e,t,{shaders:u,traceType:"streamtube"})}},9054:function(e,t,n){var r=n(5158),i=n(6832),a=i(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute vec3 f;\nattribute vec3 normal;\n\nuniform vec3 objectOffset;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 lightPosition, eyePosition;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n vec3 localCoordinate = vec3(uv.zw, f.x);\n worldCoordinate = objectOffset + localCoordinate;\n vec4 worldPosition = model * vec4(worldCoordinate, 1.0);\n vec4 clipPosition = projection * view * worldPosition;\n gl_Position = clipPosition;\n kill = f.y;\n value = f.z;\n planeCoordinate = uv.xy;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * worldPosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n lightDirection = lightPosition - cameraCoordinate.xyz;\n eyeDirection = eyePosition - cameraCoordinate.xyz;\n surfaceNormal = normalize((vec4(normal,0) * inverseModel).xyz);\n}\n"]),o=i(["precision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat beckmannSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness) {\n return beckmannDistribution(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 lowerBound, upperBound;\nuniform float contourTint;\nuniform vec4 contourColor;\nuniform sampler2D colormap;\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform float vertexColor;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n if (\n kill > 0.0 ||\n vColor.a == 0.0 ||\n outOfRange(clipBounds[0], clipBounds[1], worldCoordinate)\n ) discard;\n\n vec3 N = normalize(surfaceNormal);\n vec3 V = normalize(eyeDirection);\n vec3 L = normalize(lightDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = max(beckmannSpecular(L, V, N, roughness), 0.);\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n //decide how to interpolate color \u2014 in vertex or in fragment\n vec4 surfaceColor =\n step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) +\n step(.5, vertexColor) * vColor;\n\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = mix(litColor, contourColor, contourTint) * opacity;\n}\n"]),s=i(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute float f;\n\nuniform vec3 objectOffset;\nuniform mat3 permutation;\nuniform mat4 model, view, projection;\nuniform float height, zOffset;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n vec3 dataCoordinate = permutation * vec3(uv.xy, height);\n worldCoordinate = objectOffset + dataCoordinate;\n vec4 worldPosition = model * vec4(worldCoordinate, 1.0);\n\n vec4 clipPosition = projection * view * worldPosition;\n clipPosition.z += zOffset;\n\n gl_Position = clipPosition;\n value = f + objectOffset.z;\n kill = -1.0;\n planeCoordinate = uv.zw;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Don't do lighting for contours\n surfaceNormal = vec3(1,0,0);\n eyeDirection = vec3(0,1,0);\n lightDirection = vec3(0,0,1);\n}\n"]),l=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec2 shape;\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 surfaceNormal;\n\nvec2 splitFloat(float v) {\n float vh = 255.0 * v;\n float upper = floor(vh);\n float lower = fract(vh);\n return vec2(upper / 255.0, floor(lower * 16.0) / 16.0);\n}\n\nvoid main() {\n if ((kill > 0.0) ||\n (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard;\n\n vec2 ux = splitFloat(planeCoordinate.x / shape.x);\n vec2 uy = splitFloat(planeCoordinate.y / shape.y);\n gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0));\n}\n"]);t.createShader=function(e){var t=r(e,a,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t.attributes.normal.location=2,t},t.createPickShader=function(e){var t=r(e,a,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t.attributes.normal.location=2,t},t.createContourShader=function(e){var t=r(e,s,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t},t.createPickContourShader=function(e){var t=r(e,s,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t}},3754:function(e,t,n){"use strict";e.exports=function(e){var t=e.gl,n=y(t),r=b(t),s=x(t),l=_(t),c=i(t),u=a(t,[{buffer:c,size:4,stride:w,offset:0},{buffer:c,size:3,stride:w,offset:16},{buffer:c,size:3,stride:w,offset:28}]),d=i(t),h=a(t,[{buffer:d,size:4,stride:20,offset:0},{buffer:d,size:1,stride:20,offset:16}]),f=i(t),p=a(t,[{buffer:f,size:2,type:t.FLOAT}]),m=o(t,1,k,t.RGBA,t.UNSIGNED_BYTE);m.minFilter=t.LINEAR,m.magFilter=t.LINEAR;var g=new E(t,[0,0],[[0,0,0],[0,0,0]],n,r,c,u,m,s,l,d,h,f,p,[0,0,0]),v={levels:[[],[],[]]};for(var A in e)v[A]=e[A];return v.colormap=v.colormap||"jet",g.update(v),g};var r=n(2288),i=n(5827),a=n(2944),o=n(8931),s=n(5306),l=n(9156),c=n(7498),u=n(7382),d=n(5050),h=n(4162),f=n(104),p=n(7437),m=n(5070),g=n(9144),v=n(9054),y=v.createShader,x=v.createContourShader,b=v.createPickShader,_=v.createPickContourShader,w=40,A=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],S=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],M=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];function T(e,t,n,r,i){this.position=e,this.index=t,this.uv=n,this.level=r,this.dataCoordinate=i}!function(){for(var e=0;e<3;++e){var t=M[e],n=(e+2)%3;t[(e+1)%3+0]=1,t[n+3]=1,t[e+6]=1}}();var k=256;function E(e,t,n,r,i,a,o,l,c,u,h,f,p,m,g){this.gl=e,this.shape=t,this.bounds=n,this.objectOffset=g,this.intensityBounds=[],this._shader=r,this._pickShader=i,this._coordinateBuffer=a,this._vao=o,this._colorMap=l,this._contourShader=c,this._contourPickShader=u,this._contourBuffer=h,this._contourVAO=f,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new T([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=p,this._dynamicVAO=m,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[d(s.mallocFloat(1024),[0,0]),d(s.mallocFloat(1024),[0,0]),d(s.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var C=E.prototype;C.genColormap=function(e,t){var n=!1,r=u([l({colormap:e,nshades:k,format:"rgba"}).map((function(e,r){var i=t?function(e,t){if(!t)return 1;if(!t.length)return 1;for(var n=0;ne&&n>0){var r=(t[n][0]-e)/(t[n][0]-t[n-1][0]);return t[n][1]*(1-r)+r*t[n-1][1]}}return 1}(r/255,t):e[3];return i<1&&(n=!0),[e[0],e[1],e[2],255*i]}))]);return c.divseq(r,255),this.hasAlphaScale=n,r},C.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},C.isOpaque=function(){return!this.isTransparent()},C.pickSlots=1,C.setPickBase=function(e){this.pickId=e};var D=[0,0,0],R={showSurface:!1,showContour:!1,projections:[A.slice(),A.slice(),A.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function P(e,t){var n,r,i,a=t.axes&&t.axes.lastCubeProps.axis||D,o=t.showSurface,s=t.showContour;for(n=0;n<3;++n)for(o=o||t.surfaceProject[n],r=0;r<3;++r)s=s||t.contourProject[n][r];for(n=0;n<3;++n){var l=R.projections[n];for(r=0;r<16;++r)l[r]=0;for(r=0;r<4;++r)l[5*r]=1;l[5*n]=0,l[12+n]=t.axesBounds[+(a[n]>0)][n],f(l,e.model,l);var c=R.clipBounds[n];for(i=0;i<2;++i)for(r=0;r<3;++r)c[i][r]=e.clipBounds[i][r];c[0][n]=-1e8,c[1][n]=1e8}return R.showSurface=o,R.showContour=s,R}var O={model:A,view:A,projection:A,inverseModel:A.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},L=A.slice(),I=[1,0,0,0,1,0,0,0,1];function z(e,t){e=e||{};var n=this.gl;n.disable(n.CULL_FACE),this._colorMap.bind(0);var r=O;r.model=e.model||A,r.view=e.view||A,r.projection=e.projection||A,r.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],r.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],r.objectOffset=this.objectOffset,r.contourColor=this.contourColor[0],r.inverseModel=p(r.inverseModel,r.model);for(var i=0;i<2;++i)for(var a=r.clipBounds[i],o=0;o<3;++o)a[o]=Math.min(Math.max(this.clipBounds[i][o],-1e8),1e8);r.kambient=this.ambientLight,r.kdiffuse=this.diffuseLight,r.kspecular=this.specularLight,r.roughness=this.roughness,r.fresnel=this.fresnel,r.opacity=this.opacity,r.height=0,r.permutation=I,r.vertexColor=this.vertexColor;var s=L;for(f(s,r.view,r.model),f(s,r.projection,s),p(s,s),i=0;i<3;++i)r.eyePosition[i]=s[12+i]/s[15];var l=s[15];for(i=0;i<3;++i)l+=this.lightPosition[i]*s[4*i+3];for(i=0;i<3;++i){var c=s[12+i];for(o=0;o<3;++o)c+=s[4*o+i]*this.lightPosition[o];r.lightPosition[i]=c/l}var u=P(r,this);if(u.showSurface){for(this._shader.bind(),this._shader.uniforms=r,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(n.TRIANGLES,this._vertexCount),i=0;i<3;++i)this.surfaceProject[i]&&this.vertexCount&&(this._shader.uniforms.model=u.projections[i],this._shader.uniforms.clipBounds=u.clipBounds[i],this._vao.draw(n.TRIANGLES,this._vertexCount));this._vao.unbind()}if(u.showContour){var d=this._contourShader;r.kambient=1,r.kdiffuse=0,r.kspecular=0,r.opacity=1,d.bind(),d.uniforms=r;var h=this._contourVAO;for(h.bind(),i=0;i<3;++i)for(d.uniforms.permutation=M[i],n.lineWidth(this.contourWidth[i]*this.pixelRatio),o=0;o>4)/16)/255,i=Math.floor(r),a=r-i,o=t[1]*(e.value[1]+(15&e.value[2])/16)/255,s=Math.floor(o),l=o-s;i+=1,s+=1;var c=n.position;c[0]=c[1]=c[2]=0;for(var u=0;u<2;++u)for(var d=u?a:1-a,h=0;h<2;++h)for(var f=i+u,p=s+h,g=d*(h?l:1-l),v=0;v<3;++v)c[v]+=this._field[v].get(f,p)*g;for(var y=this._pickResult.level,x=0;x<3;++x)if(y[x]=m.le(this.contourLevels[x],c[x]),y[x]<0)this.contourLevels[x].length>0&&(y[x]=0);else if(y[x]Math.abs(_-c[x])&&(y[x]+=1)}for(n.index[0]=a<.5?i:i+1,n.index[1]=l<.5?s:s+1,n.uv[0]=r/t[0],n.uv[1]=o/t[1],v=0;v<3;++v)n.dataCoordinate[v]=this._field[v].get(n.index[0],n.index[1]);return n},C.padField=function(e,t){var n=t.shape.slice(),r=e.shape.slice();c.assign(e.lo(1,1).hi(n[0],n[1]),t),c.assign(e.lo(1).hi(n[0],1),t.hi(n[0],1)),c.assign(e.lo(1,r[1]-1).hi(n[0],1),t.lo(0,n[1]-1).hi(n[0],1)),c.assign(e.lo(0,1).hi(1,n[1]),t.hi(1)),c.assign(e.lo(r[0]-1,1).hi(1,n[1]),t.lo(n[0]-1)),e.set(0,0,t.get(0,0)),e.set(0,r[1]-1,t.get(0,n[1]-1)),e.set(r[0]-1,0,t.get(n[0]-1,0)),e.set(r[0]-1,r[1]-1,t.get(n[0]-1,n[1]-1))},C.update=function(e){e=e||{},this.objectOffset=e.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in e&&(this.contourWidth=F(e.contourWidth,Number)),"showContour"in e&&(this.showContour=F(e.showContour,Boolean)),"showSurface"in e&&(this.showSurface=!!e.showSurface),"contourTint"in e&&(this.contourTint=F(e.contourTint,Boolean)),"contourColor"in e&&(this.contourColor=j(e.contourColor)),"contourProject"in e&&(this.contourProject=F(e.contourProject,(function(e){return F(e,Boolean)}))),"surfaceProject"in e&&(this.surfaceProject=e.surfaceProject),"dynamicColor"in e&&(this.dynamicColor=j(e.dynamicColor)),"dynamicTint"in e&&(this.dynamicTint=F(e.dynamicTint,Number)),"dynamicWidth"in e&&(this.dynamicWidth=F(e.dynamicWidth,Number)),"opacity"in e&&(this.opacity=e.opacity),"opacityscale"in e&&(this.opacityscale=e.opacityscale),"colorBounds"in e&&(this.colorBounds=e.colorBounds),"vertexColor"in e&&(this.vertexColor=e.vertexColor?1:0),"colormap"in e&&this._colorMap.setPixels(this.genColormap(e.colormap,this.opacityscale));var t=e.field||e.coords&&e.coords[2]||null,n=!1;if(t||(t=this._field[2].shape[0]||this._field[2].shape[2]?this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):this._field[2].hi(0,0)),"field"in e||"coords"in e){var i=(t.shape[0]+2)*(t.shape[1]+2);i>this._field[2].data.length&&(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(r.nextPow2(i))),this._field[2]=d(this._field[2].data,[t.shape[0]+2,t.shape[1]+2]),this.padField(this._field[2],t),this.shape=t.shape.slice();for(var a=this.shape,o=0;o<2;++o)this._field[2].size>this._field[o].data.length&&(s.freeFloat(this._field[o].data),this._field[o].data=s.mallocFloat(this._field[2].size)),this._field[o]=d(this._field[o].data,[a[0]+2,a[1]+2]);if(e.coords){var l=e.coords;if(!Array.isArray(l)||3!==l.length)throw new Error("gl-surface: invalid coordinates for x/y");for(o=0;o<2;++o){var c=l[o];for(v=0;v<2;++v)if(c.shape[v]!==a[v])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[o],c)}}else if(e.ticks){var u=e.ticks;if(!Array.isArray(u)||2!==u.length)throw new Error("gl-surface: invalid ticks");for(o=0;o<2;++o){var f=u[o];if((Array.isArray(f)||f.length)&&(f=d(f)),f.shape[0]!==a[o])throw new Error("gl-surface: invalid tick length");var p=d(f.data,a);p.stride[o]=f.stride[0],p.stride[1^o]=0,this.padField(this._field[o],p)}}else{for(o=0;o<2;++o){var m=[0,0];m[o]=1,this._field[o]=d(this._field[o].data,[a[0]+2,a[1]+2],m,0)}this._field[0].set(0,0,0);for(var v=0;v0){for(var xe=0;xe<5;++xe)J.pop();U-=1}continue e}J.push(re[0],re[1],oe[0],oe[1],re[2]),U+=1}}ne.push(U)}this._contourOffsets[Q]=te,this._contourCounts[Q]=ne}var be=s.mallocFloat(J.length);for(o=0;os||o[1]<0||o[1]>s)throw new Error("gl-texture2d: Invalid texture size");var l=p(o,t.stride.slice()),c=0;"float32"===n?c=e.FLOAT:"float64"===n?(c=e.FLOAT,l=!1,n="float32"):"uint8"===n?c=e.UNSIGNED_BYTE:(c=e.UNSIGNED_BYTE,l=!1,n="uint8");var d,f,g=0;if(2===o.length)g=e.LUMINANCE,o=[o[0],o[1],1],t=r(t.data,o,[t.stride[0],t.stride[1],1],t.offset);else{if(3!==o.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===o[2])g=e.ALPHA;else if(2===o[2])g=e.LUMINANCE_ALPHA;else if(3===o[2])g=e.RGB;else{if(4!==o[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");g=e.RGBA}}c!==e.FLOAT||e.getExtension("OES_texture_float")||(c=e.UNSIGNED_BYTE,l=!1);var v=t.size;if(l)d=0===t.offset&&t.data.length===v?t.data:t.data.subarray(t.offset,t.offset+v);else{var y=[o[2],o[2]*o[0],1];f=a.malloc(v,n);var x=r(f,o,y,0);"float32"!==n&&"float64"!==n||c!==e.UNSIGNED_BYTE?i.assign(x,t):u(x,t),d=f.subarray(0,v)}var b=m(e);e.texImage2D(e.TEXTURE_2D,0,g,o[0],o[1],0,g,c,d),l||a.free(f);return new h(e,b,o[0],o[1],g,c)}(e,t)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")};var o=null,s=null,l=null;function c(e){return"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLVideoElement&&e instanceof HTMLVideoElement||"undefined"!=typeof ImageData&&e instanceof ImageData}var u=function(e,t){i.muls(e,t,255)};function d(e,t,n){var r=e.gl,i=r.getParameter(r.MAX_TEXTURE_SIZE);if(t<0||t>i||n<0||n>i)throw new Error("gl-texture2d: Invalid texture size");return e._shape=[t,n],e.bind(),r.texImage2D(r.TEXTURE_2D,0,e.format,t,n,0,e.format,e.type,null),e._mipLevels=[0],e}function h(e,t,n,r,i,a){this.gl=e,this.handle=t,this.format=i,this.type=a,this._shape=[n,r],this._mipLevels=[0],this._magFilter=e.NEAREST,this._minFilter=e.NEAREST,this._wrapS=e.CLAMP_TO_EDGE,this._wrapT=e.CLAMP_TO_EDGE,this._anisoSamples=1;var o=this,s=[this._wrapS,this._wrapT];Object.defineProperties(s,[{get:function(){return o._wrapS},set:function(e){return o.wrapS=e}},{get:function(){return o._wrapT},set:function(e){return o.wrapT=e}}]),this._wrapVector=s;var l=[this._shape[0],this._shape[1]];Object.defineProperties(l,[{get:function(){return o._shape[0]},set:function(e){return o.width=e}},{get:function(){return o._shape[1]},set:function(e){return o.height=e}}]),this._shapeVector=l}var f=h.prototype;function p(e,t){return 3===e.length?1===t[2]&&t[1]===e[0]*e[2]&&t[0]===e[2]:1===t[0]&&t[1]===e[0]}function m(e){var t=e.createTexture();return e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),t}function g(e,t,n,r,i){var a=e.getParameter(e.MAX_TEXTURE_SIZE);if(t<0||t>a||n<0||n>a)throw new Error("gl-texture2d: Invalid texture shape");if(i===e.FLOAT&&!e.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var o=m(e);return e.texImage2D(e.TEXTURE_2D,0,r,t,n,0,r,i,null),new h(e,o,t,n,r,i)}Object.defineProperties(f,{minFilter:{get:function(){return this._minFilter},set:function(e){this.bind();var t=this.gl;if(this.type===t.FLOAT&&o.indexOf(e)>=0&&(t.getExtension("OES_texture_float_linear")||(e=t.NEAREST)),s.indexOf(e)<0)throw new Error("gl-texture2d: Unknown filter mode "+e);return t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,e),this._minFilter=e}},magFilter:{get:function(){return this._magFilter},set:function(e){this.bind();var t=this.gl;if(this.type===t.FLOAT&&o.indexOf(e)>=0&&(t.getExtension("OES_texture_float_linear")||(e=t.NEAREST)),s.indexOf(e)<0)throw new Error("gl-texture2d: Unknown filter mode "+e);return t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,e),this._magFilter=e}},mipSamples:{get:function(){return this._anisoSamples},set:function(e){var t=this._anisoSamples;if(this._anisoSamples=0|Math.max(e,1),t!==this._anisoSamples){var n=this.gl.getExtension("EXT_texture_filter_anisotropic");n&&this.gl.texParameterf(this.gl.TEXTURE_2D,n.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(e){if(this.bind(),l.indexOf(e)<0)throw new Error("gl-texture2d: Unknown wrap mode "+e);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,e),this._wrapS=e}},wrapT:{get:function(){return this._wrapT},set:function(e){if(this.bind(),l.indexOf(e)<0)throw new Error("gl-texture2d: Unknown wrap mode "+e);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,e),this._wrapT=e}},wrap:{get:function(){return this._wrapVector},set:function(e){if(Array.isArray(e)||(e=[e,e]),2!==e.length)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var t=0;t<2;++t)if(l.indexOf(e[t])<0)throw new Error("gl-texture2d: Unknown wrap mode "+e);this._wrapS=e[0],this._wrapT=e[1];var n=this.gl;return this.bind(),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,this._wrapS),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,this._wrapT),e}},shape:{get:function(){return this._shapeVector},set:function(e){if(Array.isArray(e)){if(2!==e.length)throw new Error("gl-texture2d: Invalid texture shape")}else e=[0|e,0|e];return d(this,0|e[0],0|e[1]),[0|e[0],0|e[1]]}},width:{get:function(){return this._shape[0]},set:function(e){return d(this,e|=0,this._shape[1]),e}},height:{get:function(){return this._shape[1]},set:function(e){return e|=0,d(this,this._shape[0],e),e}}}),f.bind=function(e){var t=this.gl;return void 0!==e&&t.activeTexture(t.TEXTURE0+(0|e)),t.bindTexture(t.TEXTURE_2D,this.handle),void 0!==e?0|e:t.getParameter(t.ACTIVE_TEXTURE)-t.TEXTURE0},f.dispose=function(){this.gl.deleteTexture(this.handle)},f.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var e=Math.min(this._shape[0],this._shape[1]),t=0;e>0;++t,e>>>=1)this._mipLevels.indexOf(t)<0&&this._mipLevels.push(t)},f.setPixels=function(e,t,n,o){var s=this.gl;this.bind(),Array.isArray(t)?(o=n,n=0|t[1],t=0|t[0]):(t=t||0,n=n||0),o=o||0;var l=c(e)?e:e.raw;if(l){this._mipLevels.indexOf(o)<0?(s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,this.type,l),this._mipLevels.push(o)):s.texSubImage2D(s.TEXTURE_2D,o,t,n,this.format,this.type,l)}else{if(!(e.shape&&e.stride&&e.data))throw new Error("gl-texture2d: Unsupported data type");if(e.shape.length<2||t+e.shape[1]>this._shape[1]>>>o||n+e.shape[0]>this._shape[0]>>>o||t<0||n<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");!function(e,t,n,o,s,l,c,d){var h=d.dtype,f=d.shape.slice();if(f.length<2||f.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var m=0,g=0,v=p(f,d.stride.slice());"float32"===h?m=e.FLOAT:"float64"===h?(m=e.FLOAT,v=!1,h="float32"):"uint8"===h?m=e.UNSIGNED_BYTE:(m=e.UNSIGNED_BYTE,v=!1,h="uint8");if(2===f.length)g=e.LUMINANCE,f=[f[0],f[1],1],d=r(d.data,f,[d.stride[0],d.stride[1],1],d.offset);else{if(3!==f.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===f[2])g=e.ALPHA;else if(2===f[2])g=e.LUMINANCE_ALPHA;else if(3===f[2])g=e.RGB;else{if(4!==f[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");g=e.RGBA}f[2]}g!==e.LUMINANCE&&g!==e.ALPHA||s!==e.LUMINANCE&&s!==e.ALPHA||(g=s);if(g!==s)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var y=d.size,x=c.indexOf(o)<0;x&&c.push(o);if(m===l&&v)0===d.offset&&d.data.length===y?x?e.texImage2D(e.TEXTURE_2D,o,s,f[0],f[1],0,s,l,d.data):e.texSubImage2D(e.TEXTURE_2D,o,t,n,f[0],f[1],s,l,d.data):x?e.texImage2D(e.TEXTURE_2D,o,s,f[0],f[1],0,s,l,d.data.subarray(d.offset,d.offset+y)):e.texSubImage2D(e.TEXTURE_2D,o,t,n,f[0],f[1],s,l,d.data.subarray(d.offset,d.offset+y));else{var b;b=l===e.FLOAT?a.mallocFloat32(y):a.mallocUint8(y);var _=r(b,f,[f[2],f[2]*f[0],1]);m===e.FLOAT&&l===e.UNSIGNED_BYTE?u(_,d):i.assign(_,d),x?e.texImage2D(e.TEXTURE_2D,o,s,f[0],f[1],0,s,l,b.subarray(0,y)):e.texSubImage2D(e.TEXTURE_2D,o,t,n,f[0],f[1],s,l,b.subarray(0,y)),l===e.FLOAT?a.freeFloat32(b):a.freeUint8(b)}}(s,t,n,o,this.format,this.type,this._mipLevels,e)}}},3056:function(e){"use strict";e.exports=function(e,t,n){t?t.bind():e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null);var r=0|e.getParameter(e.MAX_VERTEX_ATTRIBS);if(n){if(n.length>r)throw new Error("gl-vao: Too many vertex attributes");for(var i=0;i1?0:Math.acos(s)};var r=n(5415),i=n(899),a=n(9305)},8827:function(e){e.exports=function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e}},7622:function(e){e.exports=function(e){var t=new Float32Array(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}},8782:function(e){e.exports=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}},8501:function(e){e.exports=function(){var e=new Float32Array(3);return e[0]=0,e[1]=0,e[2]=0,e}},903:function(e){e.exports=function(e,t,n){var r=t[0],i=t[1],a=t[2],o=n[0],s=n[1],l=n[2];return e[0]=i*l-a*s,e[1]=a*o-r*l,e[2]=r*s-i*o,e}},5981:function(e,t,n){e.exports=n(8288)},8288:function(e){e.exports=function(e,t){var n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2];return Math.sqrt(n*n+r*r+i*i)}},8629:function(e,t,n){e.exports=n(7979)},7979:function(e){e.exports=function(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e[2]=t[2]/n[2],e}},9305:function(e){e.exports=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}},154:function(e){e.exports=1e-6},4932:function(e,t,n){e.exports=function(e,t){var n=e[0],i=e[1],a=e[2],o=t[0],s=t[1],l=t[2];return Math.abs(n-o)<=r*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(i-s)<=r*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(a-l)<=r*Math.max(1,Math.abs(a),Math.abs(l))};var r=n(154)},5777:function(e){e.exports=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}},3306:function(e){e.exports=function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e}},7447:function(e,t,n){e.exports=function(e,t,n,i,a,o){var s,l;t||(t=3);n||(n=0);l=i?Math.min(i*t+n,e.length):e.length;for(s=n;s0&&(a=1/Math.sqrt(a),e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a);return e}},6660:function(e){e.exports=function(e,t){t=t||1;var n=2*Math.random()*Math.PI,r=2*Math.random()-1,i=Math.sqrt(1-r*r)*t;return e[0]=Math.cos(n)*i,e[1]=Math.sin(n)*i,e[2]=r*t,e}},392:function(e){e.exports=function(e,t,n,r){var i=n[1],a=n[2],o=t[1]-i,s=t[2]-a,l=Math.sin(r),c=Math.cos(r);return e[0]=t[0],e[1]=i+o*c-s*l,e[2]=a+o*l+s*c,e}},3222:function(e){e.exports=function(e,t,n,r){var i=n[0],a=n[2],o=t[0]-i,s=t[2]-a,l=Math.sin(r),c=Math.cos(r);return e[0]=i+s*l+o*c,e[1]=t[1],e[2]=a+s*c-o*l,e}},3388:function(e){e.exports=function(e,t,n,r){var i=n[0],a=n[1],o=t[0]-i,s=t[1]-a,l=Math.sin(r),c=Math.cos(r);return e[0]=i+o*c-s*l,e[1]=a+o*l+s*c,e[2]=t[2],e}},1624:function(e){e.exports=function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e}},5685:function(e){e.exports=function(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e}},6722:function(e){e.exports=function(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e}},831:function(e){e.exports=function(e,t,n,r){return e[0]=t,e[1]=n,e[2]=r,e}},5294:function(e,t,n){e.exports=n(6403)},3303:function(e,t,n){e.exports=n(4337)},6403:function(e){e.exports=function(e,t){var n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2];return n*n+r*r+i*i}},4337:function(e){e.exports=function(e){var t=e[0],n=e[1],r=e[2];return t*t+n*n+r*r}},8921:function(e,t,n){e.exports=n(911)},911:function(e){e.exports=function(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e}},9908:function(e){e.exports=function(e,t,n){var r=t[0],i=t[1],a=t[2];return e[0]=r*n[0]+i*n[3]+a*n[6],e[1]=r*n[1]+i*n[4]+a*n[7],e[2]=r*n[2]+i*n[5]+a*n[8],e}},3255:function(e){e.exports=function(e,t,n){var r=t[0],i=t[1],a=t[2],o=n[3]*r+n[7]*i+n[11]*a+n[15];return o=o||1,e[0]=(n[0]*r+n[4]*i+n[8]*a+n[12])/o,e[1]=(n[1]*r+n[5]*i+n[9]*a+n[13])/o,e[2]=(n[2]*r+n[6]*i+n[10]*a+n[14])/o,e}},6568:function(e){e.exports=function(e,t,n){var r=t[0],i=t[1],a=t[2],o=n[0],s=n[1],l=n[2],c=n[3],u=c*r+s*a-l*i,d=c*i+l*r-o*a,h=c*a+o*i-s*r,f=-o*r-s*i-l*a;return e[0]=u*c+f*-o+d*-l-h*-s,e[1]=d*c+f*-s+h*-o-u*-l,e[2]=h*c+f*-l+u*-s-d*-o,e}},3433:function(e){e.exports=function(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e}},1413:function(e){e.exports=function(e){var t=new Float32Array(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}},3470:function(e){e.exports=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}},5313:function(e){e.exports=function(){var e=new Float32Array(4);return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e}},5446:function(e){e.exports=function(e,t){var n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2],a=t[3]-e[3];return Math.sqrt(n*n+r*r+i*i+a*a)}},205:function(e){e.exports=function(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e[2]=t[2]/n[2],e[3]=t[3]/n[3],e}},4242:function(e){e.exports=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}},5680:function(e){e.exports=function(e,t,n,r){var i=new Float32Array(4);return i[0]=e,i[1]=t,i[2]=n,i[3]=r,i}},4020:function(e,t,n){e.exports={create:n(5313),clone:n(1413),fromValues:n(5680),copy:n(3470),set:n(6453),add:n(3433),subtract:n(2705),multiply:n(746),divide:n(205),min:n(2170),max:n(3030),scale:n(5510),scaleAndAdd:n(4224),distance:n(5446),squaredDistance:n(1542),length:n(8177),squaredLength:n(9037),negate:n(6459),inverse:n(8057),normalize:n(381),dot:n(4242),lerp:n(8746),random:n(3770),transformMat4:n(6342),transformQuat:n(5022)}},8057:function(e){e.exports=function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e}},8177:function(e){e.exports=function(e){var t=e[0],n=e[1],r=e[2],i=e[3];return Math.sqrt(t*t+n*n+r*r+i*i)}},8746:function(e){e.exports=function(e,t,n,r){var i=t[0],a=t[1],o=t[2],s=t[3];return e[0]=i+r*(n[0]-i),e[1]=a+r*(n[1]-a),e[2]=o+r*(n[2]-o),e[3]=s+r*(n[3]-s),e}},3030:function(e){e.exports=function(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e[2]=Math.max(t[2],n[2]),e[3]=Math.max(t[3],n[3]),e}},2170:function(e){e.exports=function(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.min(t[2],n[2]),e[3]=Math.min(t[3],n[3]),e}},746:function(e){e.exports=function(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e[3]=t[3]*n[3],e}},6459:function(e){e.exports=function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e}},381:function(e){e.exports=function(e,t){var n=t[0],r=t[1],i=t[2],a=t[3],o=n*n+r*r+i*i+a*a;o>0&&(o=1/Math.sqrt(o),e[0]=n*o,e[1]=r*o,e[2]=i*o,e[3]=a*o);return e}},3770:function(e,t,n){var r=n(381),i=n(5510);e.exports=function(e,t){return t=t||1,e[0]=Math.random(),e[1]=Math.random(),e[2]=Math.random(),e[3]=Math.random(),r(e,e),i(e,e,t),e}},5510:function(e){e.exports=function(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e}},4224:function(e){e.exports=function(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e}},6453:function(e){e.exports=function(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}},1542:function(e){e.exports=function(e,t){var n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2],a=t[3]-e[3];return n*n+r*r+i*i+a*a}},9037:function(e){e.exports=function(e){var t=e[0],n=e[1],r=e[2],i=e[3];return t*t+n*n+r*r+i*i}},2705:function(e){e.exports=function(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e}},6342:function(e){e.exports=function(e,t,n){var r=t[0],i=t[1],a=t[2],o=t[3];return e[0]=n[0]*r+n[4]*i+n[8]*a+n[12]*o,e[1]=n[1]*r+n[5]*i+n[9]*a+n[13]*o,e[2]=n[2]*r+n[6]*i+n[10]*a+n[14]*o,e[3]=n[3]*r+n[7]*i+n[11]*a+n[15]*o,e}},5022:function(e){e.exports=function(e,t,n){var r=t[0],i=t[1],a=t[2],o=n[0],s=n[1],l=n[2],c=n[3],u=c*r+s*a-l*i,d=c*i+l*r-o*a,h=c*a+o*i-s*r,f=-o*r-s*i-l*a;return e[0]=u*c+f*-o+d*-l-h*-s,e[1]=d*c+f*-s+h*-o-u*-l,e[2]=h*c+f*-l+u*-s-d*-o,e[3]=t[3],e}},9365:function(e,t,n){var r=n(8096),i=n(7896);e.exports=function(e){for(var t=Array.isArray(e)?e:r(e),n=0;n0)continue;n=e.slice(0,1).join("")}return B(n),R+=n.length,(k=k.slice(n.length)).length}}function Y(){return/[^a-fA-F0-9]/.test(t)?(B(k.join("")),T=l,S):(k.push(t),n=t,S+1)}function $(){return"."===t||/[eE]/.test(t)?(k.push(t),T=m,n=t,S+1):"x"===t&&1===k.length&&"0"===k[0]?(T=_,k.push(t),n=t,S+1):/[^\d]/.test(t)?(B(k.join("")),T=l,S):(k.push(t),n=t,S+1)}function X(){return"f"===t&&(k.push(t),n=t,S+=1),/[eE]/.test(t)?(k.push(t),n=t,S+1):("-"!==t&&"+"!==t||!/[eE]/.test(n))&&/[^\d]/.test(t)?(B(k.join("")),T=l,S):(k.push(t),n=t,S+1)}function Z(){if(/[^\d\w_]/.test(t)){var e=k.join("");return T=F[e]?y:N[e]?v:g,B(k.join("")),T=l,S}return k.push(t),n=t,S+1}};var r=n(399),i=n(9746),a=n(9525),o=n(9458),s=n(3585),l=999,c=9999,u=0,d=1,h=2,f=3,p=4,m=5,g=6,v=7,y=8,x=9,b=10,_=11,w=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},3585:function(e,t,n){var r=n(9525);r=r.slice().filter((function(e){return!/^(gl\_|texture)/.test(e)})),e.exports=r.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},9525:function(e){e.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},9458:function(e,t,n){var r=n(399);e.exports=r.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},399:function(e){e.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},9746:function(e){e.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},8096:function(e,t,n){var r=n(3193);e.exports=function(e,t){var n=r(t),i=[];return i=(i=i.concat(n(e))).concat(n(null))}},6832:function(e){e.exports=function(e){"string"===typeof e&&(e=[e]);for(var t=[].slice.call(arguments,1),n=[],r=0;r0;)for(var s=(e=o.pop()).adjacent,l=0;l<=n;++l){var c=s[l];if(c.boundary&&!(c.lastVisited<=-r)){for(var u=c.vertices,d=0;d<=n;++d){var h=u[d];i[d]=h<0?t:a[h]}var f=this.orient();if(f>0)return c;c.lastVisited=-r,0===f&&o.push(c)}}return null},u.walk=function(e,t){var n=this.vertices.length-1,r=this.dimension,i=this.vertices,a=this.tuple,o=t?this.interior.length*Math.random()|0:this.interior.length-1,s=this.interior[o];e:for(;!s.boundary;){for(var l=s.vertices,c=s.adjacent,u=0;u<=r;++u)a[u]=i[l[u]];s.lastVisited=n;for(u=0;u<=r;++u){var d=c[u];if(!(d.lastVisited>=n)){var h=a[u];a[u]=e;var f=this.orient();if(a[u]=h,f<0){s=d;continue e}d.boundary?d.lastVisited=-n:d.lastVisited=n}}return}return s},u.addPeaks=function(e,t){var n=this.vertices.length-1,r=this.dimension,i=this.vertices,l=this.tuple,c=this.interior,u=this.simplices,d=[t];t.lastVisited=n,t.vertices[t.vertices.indexOf(-1)]=n,t.boundary=!1,c.push(t);for(var h=[];d.length>0;){var f=(t=d.pop()).vertices,p=t.adjacent,m=f.indexOf(n);if(!(m<0))for(var g=0;g<=r;++g)if(g!==m){var v=p[g];if(v.boundary&&!(v.lastVisited>=n)){var y=v.vertices;if(v.lastVisited!==-n){for(var x=0,b=0;b<=r;++b)y[b]<0?(x=b,l[b]=e):l[b]=i[y[b]];if(this.orient()>0){y[x]=n,v.boundary=!1,c.push(v),d.push(v),v.lastVisited=n;continue}v.lastVisited=-n}var _=v.adjacent,w=f.slice(),A=p.slice(),S=new a(w,A,!0);u.push(S);var M=_.indexOf(t);if(!(M<0)){_[M]=S,A[m]=v,w[g]=-1,A[g]=t,p[g]=S,S.flip();for(b=0;b<=r;++b){var T=w[b];if(!(T<0||T===n)){for(var k=new Array(r-1),E=0,C=0;C<=r;++C){var D=w[C];D<0||C===b||(k[E++]=D)}h.push(new o(k,S,b))}}}}}}h.sort(s);for(g=0;g+1=0?o[l++]=s[u]:c=1&u;if(c===(1&e)){var d=o[0];o[0]=o[1],o[1]=d}t.push(o)}}return t}},9014:function(e,t,n){"use strict";var r=n(5070);function i(e,t,n,r,i){this.mid=e,this.left=t,this.right=n,this.leftPoints=r,this.rightPoints=i,this.count=(t?t.count:0)+(n?n.count:0)+r.length}e.exports=function(e){if(!e||0===e.length)return new v(null);return new v(g(e))};var a=i.prototype;function o(e,t){e.mid=t.mid,e.left=t.left,e.right=t.right,e.leftPoints=t.leftPoints,e.rightPoints=t.rightPoints,e.count=t.count}function s(e,t){var n=g(t);e.mid=n.mid,e.left=n.left,e.right=n.right,e.leftPoints=n.leftPoints,e.rightPoints=n.rightPoints,e.count=n.count}function l(e,t){var n=e.intervals([]);n.push(t),s(e,n)}function c(e,t){var n=e.intervals([]),r=n.indexOf(t);return r<0?0:(n.splice(r,1),s(e,n),1)}function u(e,t,n){for(var r=0;r=0&&e[r][1]>=t;--r){var i=n(e[r]);if(i)return i}}function h(e,t){for(var n=0;n>1],a=[],o=[],s=[];for(n=0;n3*(t+1)?l(this,e):this.left.insert(e):this.left=g([e]);else if(e[0]>this.mid)this.right?4*(this.right.count+1)>3*(t+1)?l(this,e):this.right.insert(e):this.right=g([e]);else{var n=r.ge(this.leftPoints,e,p),i=r.ge(this.rightPoints,e,m);this.leftPoints.splice(n,0,e),this.rightPoints.splice(i,0,e)}},a.remove=function(e){var t=this.count-this.leftPoints;if(e[1]3*(t-1)?c(this,e):2===(s=this.left.remove(e))?(this.left=null,this.count-=1,1):(1===s&&(this.count-=1),s):0;if(e[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(t-1)?c(this,e):2===(s=this.right.remove(e))?(this.right=null,this.count-=1,1):(1===s&&(this.count-=1),s):0;if(1===this.count)return this.leftPoints[0]===e?2:0;if(1===this.leftPoints.length&&this.leftPoints[0]===e){if(this.left&&this.right){for(var n=this,i=this.left;i.right;)n=i,i=i.right;if(n===this)i.right=this.right;else{var a=this.left,s=this.right;n.count-=i.count,n.right=i.left,i.left=a,i.right=s}o(this,i),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?o(this,this.left):o(this,this.right);return 1}for(a=r.ge(this.leftPoints,e,p);athis.mid){var n;if(this.right)if(n=this.right.queryPoint(e,t))return n;return d(this.rightPoints,e,t)}return h(this.leftPoints,t)},a.queryInterval=function(e,t,n){var r;if(ethis.mid&&this.right&&(r=this.right.queryInterval(e,t,n)))return r;return tthis.mid?d(this.rightPoints,e,n):h(this.leftPoints,n)};var y=v.prototype;y.insert=function(e){this.root?this.root.insert(e):this.root=new i(e[0],null,null,[e],[e])},y.remove=function(e){if(this.root){var t=this.root.remove(e);return 2===t&&(this.root=null),0!==t}return!1},y.queryPoint=function(e,t){if(this.root)return this.root.queryPoint(e,t)},y.queryInterval=function(e,t,n){if(e<=t&&this.root)return this.root.queryInterval(e,t,n)},Object.defineProperty(y,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(y,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})},9560:function(e){"use strict";e.exports=function(e){for(var t=new Array(e),n=0;n1&&-1!==r.indexOf("Macintosh")&&-1!==r.indexOf("Safari")&&(i=!0),i}},3596:function(e){"use strict";e.exports=function(e){for(var t,n=e.length,r=0;r13)&&32!==t&&133!==t&&160!==t&&5760!==t&&6158!==t&&(t<8192||t>8205)&&8232!==t&&8233!==t&&8239!==t&&8287!==t&&8288!==t&&12288!==t&&65279!==t)return!1;return!0}},3578:function(e){e.exports=function(e,t,n){return e*(1-n)+t*n}},7191:function(e,t,n){var r=n(4690),i=n(9823),a=n(7332),o=n(7787),s=n(7437),l=n(2142),c={length:n(4693),normalize:n(899),dot:n(9305),cross:n(903)},u=i(),d=i(),h=[0,0,0,0],f=[[0,0,0],[0,0,0],[0,0,0]],p=[0,0,0];function m(e,t,n,r,i){e[0]=t[0]*r+n[0]*i,e[1]=t[1]*r+n[1]*i,e[2]=t[2]*r+n[2]*i}e.exports=function(e,t,n,i,g,v){if(t||(t=[0,0,0]),n||(n=[0,0,0]),i||(i=[0,0,0]),g||(g=[0,0,0,1]),v||(v=[0,0,0,1]),!r(u,e))return!1;if(a(d,u),d[3]=0,d[7]=0,d[11]=0,d[15]=1,Math.abs(o(d)<1e-8))return!1;var y,x,b=u[3],_=u[7],w=u[11],A=u[12],S=u[13],M=u[14],T=u[15];if(0!==b||0!==_||0!==w){if(h[0]=b,h[1]=_,h[2]=w,h[3]=T,!s(d,d))return!1;l(d,d),function(e,t,n){var r=t[0],i=t[1],a=t[2],o=t[3];e[0]=n[0]*r+n[4]*i+n[8]*a+n[12]*o,e[1]=n[1]*r+n[5]*i+n[9]*a+n[13]*o,e[2]=n[2]*r+n[6]*i+n[10]*a+n[14]*o,e[3]=n[3]*r+n[7]*i+n[11]*a+n[15]*o}(g,h,d)}else g[0]=g[1]=g[2]=0,g[3]=1;if(t[0]=A,t[1]=S,t[2]=M,x=u,(y=f)[0][0]=x[0],y[0][1]=x[1],y[0][2]=x[2],y[1][0]=x[4],y[1][1]=x[5],y[1][2]=x[6],y[2][0]=x[8],y[2][1]=x[9],y[2][2]=x[10],n[0]=c.length(f[0]),c.normalize(f[0],f[0]),i[0]=c.dot(f[0],f[1]),m(f[1],f[1],f[0],1,-i[0]),n[1]=c.length(f[1]),c.normalize(f[1],f[1]),i[0]/=n[1],i[1]=c.dot(f[0],f[2]),m(f[2],f[2],f[0],1,-i[1]),i[2]=c.dot(f[1],f[2]),m(f[2],f[2],f[1],1,-i[2]),n[2]=c.length(f[2]),c.normalize(f[2],f[2]),i[1]/=n[2],i[2]/=n[2],c.cross(p,f[1],f[2]),c.dot(f[0],p)<0)for(var k=0;k<3;k++)n[k]*=-1,f[k][0]*=-1,f[k][1]*=-1,f[k][2]*=-1;return v[0]=.5*Math.sqrt(Math.max(1+f[0][0]-f[1][1]-f[2][2],0)),v[1]=.5*Math.sqrt(Math.max(1-f[0][0]+f[1][1]-f[2][2],0)),v[2]=.5*Math.sqrt(Math.max(1-f[0][0]-f[1][1]+f[2][2],0)),v[3]=.5*Math.sqrt(Math.max(1+f[0][0]+f[1][1]+f[2][2],0)),f[2][1]>f[1][2]&&(v[0]=-v[0]),f[0][2]>f[2][0]&&(v[1]=-v[1]),f[1][0]>f[0][1]&&(v[2]=-v[2]),!0}},4690:function(e){e.exports=function(e,t){var n=t[15];if(0===n)return!1;for(var r=1/n,i=0;i<16;i++)e[i]=t[i]*r;return!0}},7649:function(e,t,n){var r=n(1868),i=n(1102),a=n(7191),o=n(7787),s=n(1116),l=d(),c=d(),u=d();function d(){return{translate:h(),scale:h(1),skew:h(),perspective:[0,0,0,1],quaternion:[0,0,0,1]}}function h(e){return[e||0,e||0,e||0]}e.exports=function(e,t,n,d){if(0===o(t)||0===o(n))return!1;var h=a(t,l.translate,l.scale,l.skew,l.perspective,l.quaternion),f=a(n,c.translate,c.scale,c.skew,c.perspective,c.quaternion);return!(!h||!f)&&(r(u.translate,l.translate,c.translate,d),r(u.skew,l.skew,c.skew,d),r(u.scale,l.scale,c.scale,d),r(u.perspective,l.perspective,c.perspective,d),s(u.quaternion,l.quaternion,c.quaternion,d),i(e,u.translate,u.scale,u.skew,u.perspective,u.quaternion),!0)}},1102:function(e,t,n){var r={identity:n(9947),translate:n(998),multiply:n(104),create:n(9823),scale:n(3668),fromRotationTranslation:n(7280)},i=(r.create(),r.create());e.exports=function(e,t,n,a,o,s){return r.identity(e),r.fromRotationTranslation(e,s,t),e[3]=o[0],e[7]=o[1],e[11]=o[2],e[15]=o[3],r.identity(i),0!==a[2]&&(i[9]=a[2],r.multiply(e,e,i)),0!==a[1]&&(i[9]=0,i[8]=a[1],r.multiply(e,e,i)),0!==a[0]&&(i[8]=0,i[4]=a[0],r.multiply(e,e,i)),r.scale(e,e,n),e}},9298:function(e,t,n){"use strict";var r=n(5070),i=n(7649),a=n(7437),o=n(6109),s=n(7115),l=n(5240),c=n(3012),u=n(998),d=(n(3668),n(899)),h=[0,0,0];function f(e){this._components=e.slice(),this._time=[0],this.prevMatrix=e.slice(),this.nextMatrix=e.slice(),this.computedMatrix=e.slice(),this.computedInverse=e.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}e.exports=function(e){return new f((e=e||{}).matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};var p=f.prototype;p.recalcMatrix=function(e){var t=this._time,n=r.le(t,e),o=this.computedMatrix;if(!(n<0)){var s=this._components;if(n===t.length-1)for(var l=16*n,c=0;c<16;++c)o[c]=s[l++];else{var u=t[n+1]-t[n],h=(l=16*n,this.prevMatrix),f=!0;for(c=0;c<16;++c)h[c]=s[l++];var p=this.nextMatrix;for(c=0;c<16;++c)p[c]=s[l++],f=f&&h[c]===p[c];if(u<1e-6||f)for(c=0;c<16;++c)o[c]=h[c];else i(o,h,p,(e-t[n])/u)}var m=this.computedUp;m[0]=o[1],m[1]=o[5],m[2]=o[9],d(m,m);var g=this.computedInverse;a(g,o);var v=this.computedEye,y=g[15];v[0]=g[12]/y,v[1]=g[13]/y,v[2]=g[14]/y;var x=this.computedCenter,b=Math.exp(this.computedRadius[0]);for(c=0;c<3;++c)x[c]=v[c]-o[2+4*c]*b}},p.idle=function(e){if(!(e1&&r(e[o[u-2]],e[o[u-1]],c)<=0;)u-=1,o.pop();for(o.push(l),u=s.length;u>1&&r(e[s[u-2]],e[s[u-1]],c)>=0;)u-=1,s.pop();s.push(l)}n=new Array(s.length+o.length-2);for(var d=0,h=(i=0,o.length);i0;--f)n[d++]=s[f];return n};var r=n(417)[3]},6145:function(e,t,n){"use strict";e.exports=function(e,t){t||(t=e,e=window);var n=0,i=0,a=0,o={shift:!1,alt:!1,control:!1,meta:!1},s=!1;function l(e){var t=!1;return"altKey"in e&&(t=t||e.altKey!==o.alt,o.alt=!!e.altKey),"shiftKey"in e&&(t=t||e.shiftKey!==o.shift,o.shift=!!e.shiftKey),"ctrlKey"in e&&(t=t||e.ctrlKey!==o.control,o.control=!!e.ctrlKey),"metaKey"in e&&(t=t||e.metaKey!==o.meta,o.meta=!!e.metaKey),t}function c(e,s){var c=r.x(s),u=r.y(s);"buttons"in s&&(e=0|s.buttons),(e!==n||c!==i||u!==a||l(s))&&(n=0|e,i=c||0,a=u||0,t&&t(n,i,a,o))}function u(e){c(0,e)}function d(){(n||i||a||o.shift||o.alt||o.meta||o.control)&&(i=a=0,n=0,o.shift=o.alt=o.control=o.meta=!1,t&&t(0,0,0,o))}function h(e){l(e)&&t&&t(n,i,a,o)}function f(e){0===r.buttons(e)?c(0,e):c(n,e)}function p(e){c(n|r.buttons(e),e)}function m(e){c(n&~r.buttons(e),e)}function g(){s||(s=!0,e.addEventListener("mousemove",f),e.addEventListener("mousedown",p),e.addEventListener("mouseup",m),e.addEventListener("mouseleave",u),e.addEventListener("mouseenter",u),e.addEventListener("mouseout",u),e.addEventListener("mouseover",u),e.addEventListener("blur",d),e.addEventListener("keyup",h),e.addEventListener("keydown",h),e.addEventListener("keypress",h),e!==window&&(window.addEventListener("blur",d),window.addEventListener("keyup",h),window.addEventListener("keydown",h),window.addEventListener("keypress",h)))}g();var v={element:e};return Object.defineProperties(v,{enabled:{get:function(){return s},set:function(t){t?g():function(){if(!s)return;s=!1,e.removeEventListener("mousemove",f),e.removeEventListener("mousedown",p),e.removeEventListener("mouseup",m),e.removeEventListener("mouseleave",u),e.removeEventListener("mouseenter",u),e.removeEventListener("mouseout",u),e.removeEventListener("mouseover",u),e.removeEventListener("blur",d),e.removeEventListener("keyup",h),e.removeEventListener("keydown",h),e.removeEventListener("keypress",h),e!==window&&(window.removeEventListener("blur",d),window.removeEventListener("keyup",h),window.removeEventListener("keydown",h),window.removeEventListener("keypress",h))}()},enumerable:!0},buttons:{get:function(){return n},enumerable:!0},x:{get:function(){return i},enumerable:!0},y:{get:function(){return a},enumerable:!0},mods:{get:function(){return o},enumerable:!0}}),v};var r=n(4110)},2565:function(e){var t={left:0,top:0};e.exports=function(e,n,r){n=n||e.currentTarget||e.srcElement,Array.isArray(r)||(r=[0,0]);var i=e.clientX||0,a=e.clientY||0,o=(s=n,s===window||s===document||s===document.body?t:s.getBoundingClientRect());var s;return r[0]=i-o.left,r[1]=a-o.top,r}},4110:function(e,t){"use strict";function n(e){return e.target||e.srcElement||window}t.buttons=function(e){if("object"===typeof e){if("buttons"in e)return e.buttons;if("which"in e){if(2===(t=e.which))return 4;if(3===t)return 2;if(t>0)return 1<=0)return 1< 0");"function"!==typeof e.vertex&&t("Must specify vertex creation function");"function"!==typeof e.cell&&t("Must specify cell creation function");"function"!==typeof e.phase&&t("Must specify phase function");for(var s=e.getters||[],l=new Array(a),c=0;c=0?l[c]=!0:l[c]=!1;return function(e,t,n,a,o,s){var l=[s,o].join(",");return(0,i[l])(e,t,n,r.mallocUint32,r.freeUint32)}(e.vertex,e.cell,e.phase,0,n,l)};var i={"false,0,1":function(e,t,n,r,i){return function(a,o,s,l){var c,u=0|a.shape[0],d=0|a.shape[1],h=a.data,f=0|a.offset,p=0|a.stride[0],m=0|a.stride[1],g=f,v=0|-p,y=0,x=0|-m,b=0,_=-p-m|0,w=0,A=0|p,S=m-p*u|0,M=0,T=0,k=0,E=2*u|0,C=r(E),D=r(E),R=0,P=0,O=-1,L=-1,I=0,z=0|-u,N=0|u,F=0,B=-u-1|0,j=u-1|0,U=0,V=0,H=0;for(M=0;M0){if(T=1,C[R++]=n(h[g],o,s,l),g+=A,u>0)for(M=1,c=h[g],P=C[R]=n(c,o,s,l),I=C[R+O],F=C[R+z],U=C[R+B],P===I&&P===F&&P===U||(y=h[g+v],b=h[g+x],w=h[g+_],e(M,T,c,y,b,w,P,I,F,U,o,s,l),V=D[R]=k++),R+=1,g+=A,M=2;M0)for(M=1,c=h[g],P=C[R]=n(c,o,s,l),I=C[R+O],F=C[R+z],U=C[R+B],P===I&&P===F&&P===U||(y=h[g+v],b=h[g+x],w=h[g+_],e(M,T,c,y,b,w,P,I,F,U,o,s,l),V=D[R]=k++,U!==F&&t(D[R+z],V,b,w,F,U,o,s,l)),R+=1,g+=A,M=2;M0){if(M=1,C[R++]=n(h[g],o,s,l),g+=A,d>0)for(T=1,c=h[g],P=C[R]=n(c,o,s,l),F=C[R+z],I=C[R+O],U=C[R+B],P===F&&P===I&&P===U||(y=h[g+v],b=h[g+x],w=h[g+_],e(M,T,c,y,b,w,P,F,I,U,o,s,l),V=D[R]=k++),R+=1,g+=A,T=2;T0)for(T=1,c=h[g],P=C[R]=n(c,o,s,l),F=C[R+z],I=C[R+O],U=C[R+B],P===F&&P===I&&P===U||(y=h[g+v],b=h[g+x],w=h[g+_],e(M,T,c,y,b,w,P,F,I,U,o,s,l),V=D[R]=k++,U!==F&&t(D[R+z],V,w,y,U,F,o,s,l)),R+=1,g+=A,T=2;T2&&a[1]>2&&r(i.pick(-1,-1).lo(1,1).hi(a[0]-2,a[1]-2),e.pick(-1,-1,0).lo(1,1).hi(a[0]-2,a[1]-2),e.pick(-1,-1,1).lo(1,1).hi(a[0]-2,a[1]-2)),a[1]>2&&(n(i.pick(0,-1).lo(1).hi(a[1]-2),e.pick(0,-1,1).lo(1).hi(a[1]-2)),t(e.pick(0,-1,0).lo(1).hi(a[1]-2))),a[1]>2&&(n(i.pick(a[0]-1,-1).lo(1).hi(a[1]-2),e.pick(a[0]-1,-1,1).lo(1).hi(a[1]-2)),t(e.pick(a[0]-1,-1,0).lo(1).hi(a[1]-2))),a[0]>2&&(n(i.pick(-1,0).lo(1).hi(a[0]-2),e.pick(-1,0,0).lo(1).hi(a[0]-2)),t(e.pick(-1,0,1).lo(1).hi(a[0]-2))),a[0]>2&&(n(i.pick(-1,a[1]-1).lo(1).hi(a[0]-2),e.pick(-1,a[1]-1,0).lo(1).hi(a[0]-2)),t(e.pick(-1,a[1]-1,1).lo(1).hi(a[0]-2))),e.set(0,0,0,0),e.set(0,0,1,0),e.set(a[0]-1,0,0,0),e.set(a[0]-1,0,1,0),e.set(0,a[1]-1,0,0),e.set(0,a[1]-1,1,0),e.set(a[0]-1,a[1]-1,0,0),e.set(a[0]-1,a[1]-1,1,0),e}}e.exports=function(e,t,n){return Array.isArray(n)||(n=r(t.dimension,"string"===typeof n?n:"clamp")),0===t.size?e:0===t.dimension?(e.set(0),e):function(e){var t=e.join();if(a=u[t])return a;for(var n=e.length,r=[d,h],i=1;i<=n;++i)r.push(f(i));var a=p.apply(void 0,r);return u[t]=a,a}(n)(e,t)}},3581:function(e){"use strict";function t(e,t){var n=Math.floor(t),r=t-n,i=0<=n&&n0;){x<64?(l=x,x=0):(l=64,x-=64);for(var b=0|e[1];b>0;){b<64?(c=b,b=0):(c=64,b-=64),r=v+x*d+b*h,o=y+x*p+b*m;var _=0,w=0,A=0,S=f,M=d-u*f,T=h-l*d,k=g,E=p-u*g,C=m-l*p;for(A=0;A0;){m<64?(l=m,m=0):(l=64,m-=64);for(var g=0|e[0];g>0;){g<64?(s=g,g=0):(s=64,g-=64),r=f+m*u+g*c,o=p+m*h+g*d;var v=0,y=0,x=u,b=c-l*u,_=h,w=d-l*h;for(y=0;y0;){y<64?(c=y,y=0):(c=64,y-=64);for(var x=0|e[0];x>0;){x<64?(s=x,x=0):(s=64,x-=64);for(var b=0|e[1];b>0;){b<64?(l=b,b=0):(l=64,b-=64),r=g+y*h+x*u+b*d,o=v+y*m+x*f+b*p;var _=0,w=0,A=0,S=h,M=u-c*h,T=d-s*u,k=m,E=f-c*m,C=p-s*f;for(A=0;An;){v=0,y=m-o;t:for(g=0;gb)break t;y+=d,v+=h}for(v=m,y=m-o,g=0;g>1,W=H-j,G=H+j,q=U,Y=W,$=H,X=G,Z=V,K=i+1,J=a-1,Q=!0,ee=0,te=0,ne=0,re=d,ie=t(re),ae=t(re);M=l*q,T=l*Y,B=s;e:for(S=0;S0){g=q,q=Y,Y=g;break e}if(ne<0)break e;B+=f}M=l*X,T=l*Z,B=s;e:for(S=0;S0){g=X,X=Z,Z=g;break e}if(ne<0)break e;B+=f}M=l*q,T=l*$,B=s;e:for(S=0;S0){g=q,q=$,$=g;break e}if(ne<0)break e;B+=f}M=l*Y,T=l*$,B=s;e:for(S=0;S0){g=Y,Y=$,$=g;break e}if(ne<0)break e;B+=f}M=l*q,T=l*X,B=s;e:for(S=0;S0){g=q,q=X,X=g;break e}if(ne<0)break e;B+=f}M=l*$,T=l*X,B=s;e:for(S=0;S0){g=$,$=X,X=g;break e}if(ne<0)break e;B+=f}M=l*Y,T=l*Z,B=s;e:for(S=0;S0){g=Y,Y=Z,Z=g;break e}if(ne<0)break e;B+=f}M=l*Y,T=l*$,B=s;e:for(S=0;S0){g=Y,Y=$,$=g;break e}if(ne<0)break e;B+=f}M=l*X,T=l*Z,B=s;e:for(S=0;S0){g=X,X=Z,Z=g;break e}if(ne<0)break e;B+=f}for(M=l*q,T=l*Y,k=l*$,E=l*X,C=l*Z,D=l*U,R=l*H,P=l*V,F=0,B=s,S=0;S0)){if(ne<0){for(M=l*b,T=l*K,k=l*J,B=s,S=0;S0)for(;;){_=s+J*l,F=0;e:for(S=0;S0)){_=s+J*l,F=0;e:for(S=0;SV){e:for(;;){for(_=s+K*l,F=0,B=s,S=0;S1&&r?s(n,r[0],r[1]):s(n)}(e,t,l);return r(l,c)}},8729:function(e,t,n){"use strict";var r=n(8139),i={};e.exports=function(e){var t=e.order,n=e.dtype,a=[t,n].join(":"),o=i[a];return o||(i[a]=o=r(t,n)),o(e),e}},5050:function(e,t,n){var r=n(4780),i="undefined"!==typeof Float64Array;function a(e,t){return e[0]-t[0]}function o(){var e,t=this.stride,n=new Array(t.length);for(e=0;e=0&&(t+=a*(n=0|e),i-=n),new r(this.data,i,a,t)},i.step=function(e){var t=this.shape[0],n=this.stride[0],i=this.offset,a=0,o=Math.ceil;return"number"===typeof e&&((a=0|e)<0?(i+=n*(t-1),t=o(-t/a)):t=o(t/a),n*=a),new r(this.data,t,n,i)},i.transpose=function(e){e=void 0===e?0:0|e;var t=this.shape,n=this.stride;return new r(this.data,t[e],n[e],this.offset)},i.pick=function(e){var n=[],r=[],i=this.offset;return"number"===typeof e&&e>=0?i=i+this.stride[0]*e|0:(n.push(this.shape[0]),r.push(this.stride[0])),(0,t[n.length+1])(this.data,n,r,i)},function(e,t,n,i){return new r(e,t[0],n[0],i)}},2:function(e,t,n){function r(e,t,n,r,i,a){this.data=e,this.shape=[t,n],this.stride=[r,i],this.offset=0|a}var i=r.prototype;return i.dtype=e,i.dimension=2,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(i,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),i.set=function(t,n,r){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*n,r):this.data[this.offset+this.stride[0]*t+this.stride[1]*n]=r},i.get=function(t,n){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*n):this.data[this.offset+this.stride[0]*t+this.stride[1]*n]},i.index=function(e,t){return this.offset+this.stride[0]*e+this.stride[1]*t},i.hi=function(e,t){return new r(this.data,"number"!==typeof e||e<0?this.shape[0]:0|e,"number"!==typeof t||t<0?this.shape[1]:0|t,this.stride[0],this.stride[1],this.offset)},i.lo=function(e,t){var n=this.offset,i=0,a=this.shape[0],o=this.shape[1],s=this.stride[0],l=this.stride[1];return"number"===typeof e&&e>=0&&(n+=s*(i=0|e),a-=i),"number"===typeof t&&t>=0&&(n+=l*(i=0|t),o-=i),new r(this.data,a,o,s,l,n)},i.step=function(e,t){var n=this.shape[0],i=this.shape[1],a=this.stride[0],o=this.stride[1],s=this.offset,l=0,c=Math.ceil;return"number"===typeof e&&((l=0|e)<0?(s+=a*(n-1),n=c(-n/l)):n=c(n/l),a*=l),"number"===typeof t&&((l=0|t)<0?(s+=o*(i-1),i=c(-i/l)):i=c(i/l),o*=l),new r(this.data,n,i,a,o,s)},i.transpose=function(e,t){e=void 0===e?0:0|e,t=void 0===t?1:0|t;var n=this.shape,i=this.stride;return new r(this.data,n[e],n[t],i[e],i[t],this.offset)},i.pick=function(e,n){var r=[],i=[],a=this.offset;return"number"===typeof e&&e>=0?a=a+this.stride[0]*e|0:(r.push(this.shape[0]),i.push(this.stride[0])),"number"===typeof n&&n>=0?a=a+this.stride[1]*n|0:(r.push(this.shape[1]),i.push(this.stride[1])),(0,t[r.length+1])(this.data,r,i,a)},function(e,t,n,i){return new r(e,t[0],t[1],n[0],n[1],i)}},3:function(e,t,n){function r(e,t,n,r,i,a,o,s){this.data=e,this.shape=[t,n,r],this.stride=[i,a,o],this.offset=0|s}var i=r.prototype;return i.dtype=e,i.dimension=3,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(i,"order",{get:function(){var e=Math.abs(this.stride[0]),t=Math.abs(this.stride[1]),n=Math.abs(this.stride[2]);return e>t?t>n?[2,1,0]:e>n?[1,2,0]:[1,0,2]:e>n?[2,0,1]:n>t?[0,1,2]:[0,2,1]}}),i.set=function(t,n,r,i){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*n+this.stride[2]*r,i):this.data[this.offset+this.stride[0]*t+this.stride[1]*n+this.stride[2]*r]=i},i.get=function(t,n,r){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*n+this.stride[2]*r):this.data[this.offset+this.stride[0]*t+this.stride[1]*n+this.stride[2]*r]},i.index=function(e,t,n){return this.offset+this.stride[0]*e+this.stride[1]*t+this.stride[2]*n},i.hi=function(e,t,n){return new r(this.data,"number"!==typeof e||e<0?this.shape[0]:0|e,"number"!==typeof t||t<0?this.shape[1]:0|t,"number"!==typeof n||n<0?this.shape[2]:0|n,this.stride[0],this.stride[1],this.stride[2],this.offset)},i.lo=function(e,t,n){var i=this.offset,a=0,o=this.shape[0],s=this.shape[1],l=this.shape[2],c=this.stride[0],u=this.stride[1],d=this.stride[2];return"number"===typeof e&&e>=0&&(i+=c*(a=0|e),o-=a),"number"===typeof t&&t>=0&&(i+=u*(a=0|t),s-=a),"number"===typeof n&&n>=0&&(i+=d*(a=0|n),l-=a),new r(this.data,o,s,l,c,u,d,i)},i.step=function(e,t,n){var i=this.shape[0],a=this.shape[1],o=this.shape[2],s=this.stride[0],l=this.stride[1],c=this.stride[2],u=this.offset,d=0,h=Math.ceil;return"number"===typeof e&&((d=0|e)<0?(u+=s*(i-1),i=h(-i/d)):i=h(i/d),s*=d),"number"===typeof t&&((d=0|t)<0?(u+=l*(a-1),a=h(-a/d)):a=h(a/d),l*=d),"number"===typeof n&&((d=0|n)<0?(u+=c*(o-1),o=h(-o/d)):o=h(o/d),c*=d),new r(this.data,i,a,o,s,l,c,u)},i.transpose=function(e,t,n){e=void 0===e?0:0|e,t=void 0===t?1:0|t,n=void 0===n?2:0|n;var i=this.shape,a=this.stride;return new r(this.data,i[e],i[t],i[n],a[e],a[t],a[n],this.offset)},i.pick=function(e,n,r){var i=[],a=[],o=this.offset;return"number"===typeof e&&e>=0?o=o+this.stride[0]*e|0:(i.push(this.shape[0]),a.push(this.stride[0])),"number"===typeof n&&n>=0?o=o+this.stride[1]*n|0:(i.push(this.shape[1]),a.push(this.stride[1])),"number"===typeof r&&r>=0?o=o+this.stride[2]*r|0:(i.push(this.shape[2]),a.push(this.stride[2])),(0,t[i.length+1])(this.data,i,a,o)},function(e,t,n,i){return new r(e,t[0],t[1],t[2],n[0],n[1],n[2],i)}},4:function(e,t,n){function r(e,t,n,r,i,a,o,s,l,c){this.data=e,this.shape=[t,n,r,i],this.stride=[a,o,s,l],this.offset=0|c}var i=r.prototype;return i.dtype=e,i.dimension=4,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(i,"order",{get:n}),i.set=function(t,n,r,i,a){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*n+this.stride[2]*r+this.stride[3]*i,a):this.data[this.offset+this.stride[0]*t+this.stride[1]*n+this.stride[2]*r+this.stride[3]*i]=a},i.get=function(t,n,r,i){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*n+this.stride[2]*r+this.stride[3]*i):this.data[this.offset+this.stride[0]*t+this.stride[1]*n+this.stride[2]*r+this.stride[3]*i]},i.index=function(e,t,n,r){return this.offset+this.stride[0]*e+this.stride[1]*t+this.stride[2]*n+this.stride[3]*r},i.hi=function(e,t,n,i){return new r(this.data,"number"!==typeof e||e<0?this.shape[0]:0|e,"number"!==typeof t||t<0?this.shape[1]:0|t,"number"!==typeof n||n<0?this.shape[2]:0|n,"number"!==typeof i||i<0?this.shape[3]:0|i,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},i.lo=function(e,t,n,i){var a=this.offset,o=0,s=this.shape[0],l=this.shape[1],c=this.shape[2],u=this.shape[3],d=this.stride[0],h=this.stride[1],f=this.stride[2],p=this.stride[3];return"number"===typeof e&&e>=0&&(a+=d*(o=0|e),s-=o),"number"===typeof t&&t>=0&&(a+=h*(o=0|t),l-=o),"number"===typeof n&&n>=0&&(a+=f*(o=0|n),c-=o),"number"===typeof i&&i>=0&&(a+=p*(o=0|i),u-=o),new r(this.data,s,l,c,u,d,h,f,p,a)},i.step=function(e,t,n,i){var a=this.shape[0],o=this.shape[1],s=this.shape[2],l=this.shape[3],c=this.stride[0],u=this.stride[1],d=this.stride[2],h=this.stride[3],f=this.offset,p=0,m=Math.ceil;return"number"===typeof e&&((p=0|e)<0?(f+=c*(a-1),a=m(-a/p)):a=m(a/p),c*=p),"number"===typeof t&&((p=0|t)<0?(f+=u*(o-1),o=m(-o/p)):o=m(o/p),u*=p),"number"===typeof n&&((p=0|n)<0?(f+=d*(s-1),s=m(-s/p)):s=m(s/p),d*=p),"number"===typeof i&&((p=0|i)<0?(f+=h*(l-1),l=m(-l/p)):l=m(l/p),h*=p),new r(this.data,a,o,s,l,c,u,d,h,f)},i.transpose=function(e,t,n,i){e=void 0===e?0:0|e,t=void 0===t?1:0|t,n=void 0===n?2:0|n,i=void 0===i?3:0|i;var a=this.shape,o=this.stride;return new r(this.data,a[e],a[t],a[n],a[i],o[e],o[t],o[n],o[i],this.offset)},i.pick=function(e,n,r,i){var a=[],o=[],s=this.offset;return"number"===typeof e&&e>=0?s=s+this.stride[0]*e|0:(a.push(this.shape[0]),o.push(this.stride[0])),"number"===typeof n&&n>=0?s=s+this.stride[1]*n|0:(a.push(this.shape[1]),o.push(this.stride[1])),"number"===typeof r&&r>=0?s=s+this.stride[2]*r|0:(a.push(this.shape[2]),o.push(this.stride[2])),"number"===typeof i&&i>=0?s=s+this.stride[3]*i|0:(a.push(this.shape[3]),o.push(this.stride[3])),(0,t[a.length+1])(this.data,a,o,s)},function(e,t,n,i){return new r(e,t[0],t[1],t[2],t[3],n[0],n[1],n[2],n[3],i)}},5:function(e,t,n){function r(e,t,n,r,i,a,o,s,l,c,u,d){this.data=e,this.shape=[t,n,r,i,a],this.stride=[o,s,l,c,u],this.offset=0|d}var i=r.prototype;return i.dtype=e,i.dimension=5,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(i,"order",{get:n}),i.set=function(t,n,r,i,a,o){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*n+this.stride[2]*r+this.stride[3]*i+this.stride[4]*a,o):this.data[this.offset+this.stride[0]*t+this.stride[1]*n+this.stride[2]*r+this.stride[3]*i+this.stride[4]*a]=o},i.get=function(t,n,r,i,a){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*n+this.stride[2]*r+this.stride[3]*i+this.stride[4]*a):this.data[this.offset+this.stride[0]*t+this.stride[1]*n+this.stride[2]*r+this.stride[3]*i+this.stride[4]*a]},i.index=function(e,t,n,r,i){return this.offset+this.stride[0]*e+this.stride[1]*t+this.stride[2]*n+this.stride[3]*r+this.stride[4]*i},i.hi=function(e,t,n,i,a){return new r(this.data,"number"!==typeof e||e<0?this.shape[0]:0|e,"number"!==typeof t||t<0?this.shape[1]:0|t,"number"!==typeof n||n<0?this.shape[2]:0|n,"number"!==typeof i||i<0?this.shape[3]:0|i,"number"!==typeof a||a<0?this.shape[4]:0|a,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},i.lo=function(e,t,n,i,a){var o=this.offset,s=0,l=this.shape[0],c=this.shape[1],u=this.shape[2],d=this.shape[3],h=this.shape[4],f=this.stride[0],p=this.stride[1],m=this.stride[2],g=this.stride[3],v=this.stride[4];return"number"===typeof e&&e>=0&&(o+=f*(s=0|e),l-=s),"number"===typeof t&&t>=0&&(o+=p*(s=0|t),c-=s),"number"===typeof n&&n>=0&&(o+=m*(s=0|n),u-=s),"number"===typeof i&&i>=0&&(o+=g*(s=0|i),d-=s),"number"===typeof a&&a>=0&&(o+=v*(s=0|a),h-=s),new r(this.data,l,c,u,d,h,f,p,m,g,v,o)},i.step=function(e,t,n,i,a){var o=this.shape[0],s=this.shape[1],l=this.shape[2],c=this.shape[3],u=this.shape[4],d=this.stride[0],h=this.stride[1],f=this.stride[2],p=this.stride[3],m=this.stride[4],g=this.offset,v=0,y=Math.ceil;return"number"===typeof e&&((v=0|e)<0?(g+=d*(o-1),o=y(-o/v)):o=y(o/v),d*=v),"number"===typeof t&&((v=0|t)<0?(g+=h*(s-1),s=y(-s/v)):s=y(s/v),h*=v),"number"===typeof n&&((v=0|n)<0?(g+=f*(l-1),l=y(-l/v)):l=y(l/v),f*=v),"number"===typeof i&&((v=0|i)<0?(g+=p*(c-1),c=y(-c/v)):c=y(c/v),p*=v),"number"===typeof a&&((v=0|a)<0?(g+=m*(u-1),u=y(-u/v)):u=y(u/v),m*=v),new r(this.data,o,s,l,c,u,d,h,f,p,m,g)},i.transpose=function(e,t,n,i,a){e=void 0===e?0:0|e,t=void 0===t?1:0|t,n=void 0===n?2:0|n,i=void 0===i?3:0|i,a=void 0===a?4:0|a;var o=this.shape,s=this.stride;return new r(this.data,o[e],o[t],o[n],o[i],o[a],s[e],s[t],s[n],s[i],s[a],this.offset)},i.pick=function(e,n,r,i,a){var o=[],s=[],l=this.offset;return"number"===typeof e&&e>=0?l=l+this.stride[0]*e|0:(o.push(this.shape[0]),s.push(this.stride[0])),"number"===typeof n&&n>=0?l=l+this.stride[1]*n|0:(o.push(this.shape[1]),s.push(this.stride[1])),"number"===typeof r&&r>=0?l=l+this.stride[2]*r|0:(o.push(this.shape[2]),s.push(this.stride[2])),"number"===typeof i&&i>=0?l=l+this.stride[3]*i|0:(o.push(this.shape[3]),s.push(this.stride[3])),"number"===typeof a&&a>=0?l=l+this.stride[4]*a|0:(o.push(this.shape[4]),s.push(this.stride[4])),(0,t[o.length+1])(this.data,o,s,l)},function(e,t,n,i){return new r(e,t[0],t[1],t[2],t[3],t[4],n[0],n[1],n[2],n[3],n[4],i)}}};function l(e,t){var n=-1===t?"T":String(t),r=s[n];return-1===t?r(e):0===t?r(e,c[e][0]):r(e,c[e],o)}var c={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};e.exports=function(e,t,n,a){if(void 0===e)return(0,c.array[0])([]);"number"===typeof e&&(e=[e]),void 0===t&&(t=[e.length]);var o=t.length;if(void 0===n){n=new Array(o);for(var s=o-1,u=1;s>=0;--s)n[s]=u,u*=t[s]}if(void 0===a){a=0;for(s=0;s>>0;e.exports=function(e,t){if(isNaN(e)||isNaN(t))return NaN;if(e===t)return e;if(0===e)return t<0?-i:i;var n=r.hi(e),o=r.lo(e);t>e===e>0?o===a?(n+=1,o=0):o+=1:0===o?(o=a,n-=1):o-=1;return r.pack(o,n)}},115:function(e,t){t.vertexNormals=function(e,t,n){for(var r=t.length,i=new Array(r),a=void 0===n?1e-6:n,o=0;oa){var b=i[c],_=1/Math.sqrt(g*y);for(x=0;x<3;++x){var w=(x+1)%3,A=(x+2)%3;b[x]+=_*(v[w]*m[A]-v[A]*m[w])}}}for(o=0;oa)for(_=1/Math.sqrt(S),x=0;x<3;++x)b[x]*=_;else for(x=0;x<3;++x)b[x]=0}return i},t.faceNormals=function(e,t,n){for(var r=e.length,i=new Array(r),a=void 0===n?1e-6:n,o=0;oa?1/Math.sqrt(f):0;for(c=0;c<3;++c)h[c]*=f;i[o]=h}return i}},567:function(e){"use strict";e.exports=function(e,t,n,r,i,a,o,s,l,c){var u=t+a+c;if(d>0){var d=Math.sqrt(u+1);e[0]=.5*(o-l)/d,e[1]=.5*(s-r)/d,e[2]=.5*(n-a)/d,e[3]=.5*d}else{var h=Math.max(t,a,c);d=Math.sqrt(2*h-u+1);t>=h?(e[0]=.5*d,e[1]=.5*(i+n)/d,e[2]=.5*(s+r)/d,e[3]=.5*(o-l)/d):a>=h?(e[0]=.5*(n+i)/d,e[1]=.5*d,e[2]=.5*(l+o)/d,e[3]=.5*(s-r)/d):(e[0]=.5*(r+s)/d,e[1]=.5*(o+l)/d,e[2]=.5*d,e[3]=.5*(n-i)/d)}return e}},7774:function(e,t,n){"use strict";e.exports=function(e){var t=(e=e||{}).center||[0,0,0],n=e.rotation||[0,0,0,1],r=e.radius||1;t=[].slice.call(t,0,3),u(n=[].slice.call(n,0,4),n);var i=new d(n,t,Math.log(r));i.setDistanceLimits(e.zoomMin,e.zoomMax),("eye"in e||"up"in e)&&i.lookAt(0,e.eye,e.center,e.up);return i};var r=n(8444),i=n(3012),a=n(5950),o=n(7437),s=n(567);function l(e,t,n){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2)+Math.pow(n,2))}function c(e,t,n,r){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2)+Math.pow(n,2)+Math.pow(r,2))}function u(e,t){var n=t[0],r=t[1],i=t[2],a=t[3],o=c(n,r,i,a);o>1e-6?(e[0]=n/o,e[1]=r/o,e[2]=i/o,e[3]=a/o):(e[0]=e[1]=e[2]=0,e[3]=1)}function d(e,t,n){this.radius=r([n]),this.center=r(t),this.rotation=r(e),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var h=d.prototype;h.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},h.recalcMatrix=function(e){this.radius.curve(e),this.center.curve(e),this.rotation.curve(e);var t=this.computedRotation;u(t,t);var n=this.computedMatrix;a(n,t);var r=this.computedCenter,i=this.computedEye,o=this.computedUp,s=Math.exp(this.computedRadius[0]);i[0]=r[0]+s*n[2],i[1]=r[1]+s*n[6],i[2]=r[2]+s*n[10],o[0]=n[1],o[1]=n[5],o[2]=n[9];for(var l=0;l<3;++l){for(var c=0,d=0;d<3;++d)c+=n[l+4*d]*i[d];n[12+l]=-c}},h.getMatrix=function(e,t){this.recalcMatrix(e);var n=this.computedMatrix;if(t){for(var r=0;r<16;++r)t[r]=n[r];return t}return n},h.idle=function(e){this.center.idle(e),this.radius.idle(e),this.rotation.idle(e)},h.flush=function(e){this.center.flush(e),this.radius.flush(e),this.rotation.flush(e)},h.pan=function(e,t,n,r){t=t||0,n=n||0,r=r||0,this.recalcMatrix(e);var i=this.computedMatrix,a=i[1],o=i[5],s=i[9],c=l(a,o,s);a/=c,o/=c,s/=c;var u=i[0],d=i[4],h=i[8],f=u*a+d*o+h*s,p=l(u-=a*f,d-=o*f,h-=s*f);u/=p,d/=p,h/=p;var m=i[2],g=i[6],v=i[10],y=m*a+g*o+v*s,x=m*u+g*d+v*h,b=l(m-=y*a+x*u,g-=y*o+x*d,v-=y*s+x*h);m/=b,g/=b,v/=b;var _=u*t+a*n,w=d*t+o*n,A=h*t+s*n;this.center.move(e,_,w,A);var S=Math.exp(this.computedRadius[0]);S=Math.max(1e-4,S+r),this.radius.set(e,Math.log(S))},h.rotate=function(e,t,n,r){this.recalcMatrix(e),t=t||0,n=n||0;var i=this.computedMatrix,a=i[0],o=i[4],s=i[8],u=i[1],d=i[5],h=i[9],f=i[2],p=i[6],m=i[10],g=t*a+n*u,v=t*o+n*d,y=t*s+n*h,x=-(p*y-m*v),b=-(m*g-f*y),_=-(f*v-p*g),w=Math.sqrt(Math.max(0,1-Math.pow(x,2)-Math.pow(b,2)-Math.pow(_,2))),A=c(x,b,_,w);A>1e-6?(x/=A,b/=A,_/=A,w/=A):(x=b=_=0,w=1);var S=this.computedRotation,M=S[0],T=S[1],k=S[2],E=S[3],C=M*w+E*x+T*_-k*b,D=T*w+E*b+k*x-M*_,R=k*w+E*_+M*b-T*x,P=E*w-M*x-T*b-k*_;if(r){x=f,b=p,_=m;var O=Math.sin(r)/l(x,b,_);x*=O,b*=O,_*=O,P=P*(w=Math.cos(t))-(C=C*w+P*x+D*_-R*b)*x-(D=D*w+P*b+R*x-C*_)*b-(R=R*w+P*_+C*b-D*x)*_}var L=c(C,D,R,P);L>1e-6?(C/=L,D/=L,R/=L,P/=L):(C=D=R=0,P=1),this.rotation.set(e,C,D,R,P)},h.lookAt=function(e,t,n,r){this.recalcMatrix(e),n=n||this.computedCenter,t=t||this.computedEye,r=r||this.computedUp;var a=this.computedMatrix;i(a,t,n,r);var o=this.computedRotation;s(o,a[0],a[1],a[2],a[4],a[5],a[6],a[8],a[9],a[10]),u(o,o),this.rotation.set(e,o[0],o[1],o[2],o[3]);for(var l=0,c=0;c<3;++c)l+=Math.pow(n[c]-t[c],2);this.radius.set(e,.5*Math.log(Math.max(l,1e-6))),this.center.set(e,n[0],n[1],n[2])},h.translate=function(e,t,n,r){this.center.move(e,t||0,n||0,r||0)},h.setMatrix=function(e,t){var n=this.computedRotation;s(n,t[0],t[1],t[2],t[4],t[5],t[6],t[8],t[9],t[10]),u(n,n),this.rotation.set(e,n[0],n[1],n[2],n[3]);var r=this.computedMatrix;o(r,t);var i=r[15];if(Math.abs(i)>1e-6){var a=r[12]/i,l=r[13]/i,c=r[14]/i;this.recalcMatrix(e);var d=Math.exp(this.computedRadius[0]);this.center.set(e,a-r[2]*d,l-r[6]*d,c-r[10]*d),this.radius.idle(e)}else this.center.idle(e),this.radius.idle(e)},h.setDistance=function(e,t){t>0&&this.radius.set(e,Math.log(t))},h.setDistanceLimits=function(e,t){e=e>0?Math.log(e):-1/0,t=t>0?Math.log(t):1/0,t=Math.max(t,e),this.radius.bounds[0][0]=e,this.radius.bounds[1][0]=t},h.getDistanceLimits=function(e){var t=this.radius.bounds;return e?(e[0]=Math.exp(t[0][0]),e[1]=Math.exp(t[1][0]),e):[Math.exp(t[0][0]),Math.exp(t[1][0])]},h.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},h.fromJSON=function(e){var t=this.lastT(),n=e.center;n&&this.center.set(t,n[0],n[1],n[2]);var r=e.rotation;r&&this.rotation.set(t,r[0],r[1],r[2],r[3]);var i=e.distance;i&&i>0&&this.radius.set(t,Math.log(i)),this.setDistanceLimits(e.zoomMin,e.zoomMax)}},4930:function(e,t,n){"use strict";var r=n(6184);e.exports=function(e,t,n){return r(n="undefined"!==typeof n?n+"":" ",t)+e}},4405:function(e){e.exports=function(e,t){t||(t=[0,""]),e=String(e);var n=parseFloat(e,10);return t[0]=n,t[1]=e.match(/[\d.\-\+]*\s*(.*)/)[1]||"",t}},4166:function(e,t,n){"use strict";e.exports=function(e,t){for(var n=0|t.length,i=e.length,a=[new Array(n),new Array(n)],o=0;o0){o=a[u][n][0],l=u;break}s=o[1^l];for(var d=0;d<2;++d)for(var h=a[d][n],f=0;f0&&(o=p,s=m,l=d)}return i||o&&c(o,l),s}function d(e,n){var i=a[n][e][0],o=[e];c(i,n);for(var s=i[1^n];;){for(;s!==e;)o.push(s),s=u(o[o.length-2],s,!1);if(a[0][e].length+a[1][e].length===0)break;var l=o[o.length-1],d=e,h=o[1],f=u(l,d,!0);if(r(t[l],t[d],t[h],t[f])<0)break;o.push(e),s=u(l,d)}return o}function h(e,t){return t[1]===t[t.length-1]}for(o=0;o0;){a[0][o].length;var m=d(o,f);h(0,m)?p.push.apply(p,m):(p.length>0&&l.push(p),p=m)}p.length>0&&l.push(p)}return l};var r=n(9398)},3959:function(e,t,n){"use strict";e.exports=function(e,t){for(var n=r(e,t.length),i=new Array(t.length),a=new Array(t.length),o=[],s=0;s0;){i[f=o.pop()]=!1;var c=n[f];for(s=0;s0}))).length,g=new Array(m),v=new Array(m);for(f=0;f0;){var F=z.pop(),B=E[F];l(B,(function(e,t){return e-t}));var j,U=B.length,V=N[F];if(0===V)j=[H=p[F]];for(f=0;f=0))if(N[W]=1^V,z.push(W),0===V)I(H=p[W])||(H.reverse(),j.push(H))}0===V&&n.push(j)}return n};var r=n(8348),i=n(4166),a=n(211),o=n(9660),s=n(9662),l=n(1215),c=n(3959);function u(e,t){for(var n=new Array(e),r=0;r0&&t[i]===n[0]))return 1;a=e[i-1]}for(var s=1;a;){var l=a.key,c=r(n,l[0],l[1]);if(l[0][0]0))return 0;s=-1,a=a.right}else if(c>0)a=a.left;else{if(!(c<0))return 0;s=1,a=a.right}}return s}}(v.slabs,v.coordinates);return 0===a.length?y:function(e,t){return function(n){return e(n[0],n[1])?0:t(n)}}(l(a),y)};var r=n(417)[3],i=n(4385),a=n(9014),o=n(5070);function s(){return!0}function l(e){for(var t={},n=0;n=c?(S=1,y=c+2*h+p):y=h*(S=-h/c)+p):(S=0,f>=0?(M=0,y=p):-f>=d?(M=1,y=d+2*f+p):y=f*(M=-f/d)+p);else if(M<0)M=0,h>=0?(S=0,y=p):-h>=c?(S=1,y=c+2*h+p):y=h*(S=-h/c)+p;else{var T=1/A;y=(S*=T)*(c*S+u*(M*=T)+2*h)+M*(u*S+d*M+2*f)+p}else S<0?(b=d+f)>(x=u+h)?(_=b-x)>=(w=c-2*u+d)?(S=1,M=0,y=c+2*h+p):y=(S=_/w)*(c*S+u*(M=1-S)+2*h)+M*(u*S+d*M+2*f)+p:(S=0,b<=0?(M=1,y=d+2*f+p):f>=0?(M=0,y=p):y=f*(M=-f/d)+p):M<0?(b=c+h)>(x=u+f)?(_=b-x)>=(w=c-2*u+d)?(M=1,S=0,y=d+2*f+p):y=(S=1-(M=_/w))*(c*S+u*M+2*h)+M*(u*S+d*M+2*f)+p:(M=0,b<=0?(S=1,y=c+2*h+p):h>=0?(S=0,y=p):y=h*(S=-h/c)+p):(_=d+f-u-h)<=0?(S=0,M=1,y=d+2*f+p):_>=(w=c-2*u+d)?(S=1,M=0,y=c+2*h+p):y=(S=_/w)*(c*S+u*(M=1-S)+2*h)+M*(u*S+d*M+2*f)+p;var k=1-S-M;for(l=0;l0){var c=e[n-1];if(0===r(s,c)&&a(c)!==l){n-=1;continue}}e[n++]=s}}return e.length=n,e}},6184:function(e){"use strict";var t,n="";e.exports=function(e,r){if("string"!==typeof e)throw new TypeError("expected a string");if(1===r)return e;if(2===r)return e+e;var i=e.length*r;if(t!==e||"undefined"===typeof t)t=e,n="";else if(n.length>=i)return n.substr(0,i);for(;i>n.length&&r>1;)1&r&&(n+=e),r>>=1,e+=e;return n=(n+=e).substr(0,i)}},8161:function(e,t,n){e.exports=n.g.performance&&n.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},402:function(e){"use strict";e.exports=function(e){for(var t=e.length,n=e[e.length-1],r=t,i=t-2;i>=0;--i){var a=n;(l=(s=e[i])-((n=a+s)-a))&&(e[--r]=n,n=l)}var o=0;for(i=r;i0){if(a<=0)return o;r=i+a}else{if(!(i<0))return o;if(a>=0)return o;r=-(i+a)}var s=33306690738754716e-32*r;return o>=s||o<=-s?o:d(e,t,n)},function(e,t,n,r){var i=e[0]-r[0],a=t[0]-r[0],o=n[0]-r[0],s=e[1]-r[1],l=t[1]-r[1],c=n[1]-r[1],u=e[2]-r[2],d=t[2]-r[2],f=n[2]-r[2],p=a*c,m=o*l,g=o*s,v=i*c,y=i*l,x=a*s,b=u*(p-m)+d*(g-v)+f*(y-x),_=7771561172376103e-31*((Math.abs(p)+Math.abs(m))*Math.abs(u)+(Math.abs(g)+Math.abs(v))*Math.abs(d)+(Math.abs(y)+Math.abs(x))*Math.abs(f));return b>_||-b>_?b:h(e,t,n,r)}];function p(e){var t=f[e.length];return t||(t=f[e.length]=u(e.length)),t.apply(void 0,e)}function m(e,t,n,r,i,a,o){return function(t,n,s,l,c){switch(arguments.length){case 0:case 1:return 0;case 2:return r(t,n);case 3:return i(t,n,s);case 4:return a(t,n,s,l);case 5:return o(t,n,s,l,c)}for(var u=new Array(arguments.length),d=0;d0&&o>0||a<0&&o<0)return!1;var s=r(n,e,t),l=r(i,e,t);if(s>0&&l>0||s<0&&l<0)return!1;if(0===a&&0===o&&0===s&&0===l)return function(e,t,n,r){for(var i=0;i<2;++i){var a=e[i],o=t[i],s=Math.min(a,o),l=Math.max(a,o),c=n[i],u=r[i],d=Math.min(c,u);if(Math.max(c,u)=r?(i=d,(l+=1)=r?(i=d,(l+=1)>1,c=t[2*l+1];if(c===a)return l;a>1,c=t[2*l+1];if(c===a)return l;a>1,c=t[2*l+1];if(c===a)return l;a>1,s=a(e[o],t);s<=0?(0===s&&o,o+1):s>0&&o-1}return i}function u(e,t){for(var n=new Array(e.length),i=0,o=n.length;i=e.length||0!==a(e[g],s)););}return n}function d(e,t){if(t<0)return[];for(var n=[],i=(1<0)-(e<0)},t.abs=function(e){var t=e>>31;return(e^t)-t},t.min=function(e,t){return t^(e^t)&-(e65535)<<4,t|=n=((e>>>=t)>255)<<3,t|=n=((e>>>=n)>15)<<2,(t|=n=((e>>>=n)>3)<<1)|(e>>>=n)>>1},t.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0},t.popCount=function(e){return 16843009*((e=(858993459&(e-=e>>>1&1431655765))+(e>>>2&858993459))+(e>>>4)&252645135)>>>24},t.countTrailingZeros=n,t.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)+1},t.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)-(e>>>1)},t.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,27030>>>(e&=15)&1};var r=new Array(256);!function(e){for(var t=0;t<256;++t){var n=t,r=t,i=7;for(n>>>=1;n;n>>>=1)r<<=1,r|=1&n,--i;e[t]=r<>>8&255]<<16|r[e>>>16&255]<<8|r[e>>>24&255]},t.interleave2=function(e,t){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))<<1},t.deinterleave2=function(e,t){return(e=65535&((e=16711935&((e=252645135&((e=858993459&((e=e>>>t&1431655765)|e>>>1))|e>>>2))|e>>>4))|e>>>16))<<16>>16},t.interleave3=function(e,t,n){return e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2),(e|=(t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2))<<1)|(n=1227133513&((n=3272356035&((n=251719695&((n=4278190335&((n&=1023)|n<<16))|n<<8))|n<<4))|n<<2))<<2},t.deinterleave3=function(e,t){return(e=1023&((e=4278190335&((e=251719695&((e=3272356035&((e=e>>>t&1227133513)|e>>>2))|e>>>4))|e>>>8))|e>>>16))<<22>>22},t.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>n(e)+1}},6656:function(e,t,n){"use strict";var r=n(9392),i=n(9521);function a(e,t){var n=e.length,r=e.length-t.length,i=Math.min;if(r)return r;switch(n){case 0:return 0;case 1:return e[0]-t[0];case 2:return(s=e[0]+e[1]-t[0]-t[1])||i(e[0],e[1])-i(t[0],t[1]);case 3:var a=e[0]+e[1],o=t[0]+t[1];if(s=a+e[2]-(o+t[2]))return s;var s,l=i(e[0],e[1]),c=i(t[0],t[1]);return(s=i(l,e[2])-i(c,t[2]))||i(l+e[2],a)-i(c+t[2],o);default:var u=e.slice(0);u.sort();var d=t.slice(0);d.sort();for(var h=0;h>1,s=a(e[o],t);s<=0?(0===s&&(i=o),n=o+1):s>0&&(r=o-1)}return i}function u(e,t){for(var n=new Array(e.length),i=0,o=n.length;i=e.length||0!==a(e[g],s)););}return n}function d(e,t){if(t<0)return[];for(var n=[],i=(1<>>u&1&&c.push(i[u]);t.push(c)}return s(t)},t.skeleton=d,t.boundary=function(e){for(var t=[],n=0,r=e.length;n>1:(e>>1)-1}function x(e){for(var t=v(e);;){var n=t,r=2*e+1,i=2*(e+1),a=e;if(r0;){var n=y(e);if(n>=0)if(t0){var e=S[0];return g(0,T-1),T-=1,x(0),e}return-1}function w(e,t){var n=S[e];return c[n]===t?e:(c[n]=-1/0,b(e),_(),c[n]=t,b((T+=1)-1))}function A(e){if(!u[e]){u[e]=!0;var t=s[e],n=l[e];s[n]>=0&&(s[n]=t),l[t]>=0&&(l[t]=n),M[t]>=0&&w(M[t],m(t)),M[n]>=0&&w(M[n],m(n))}}var S=[],M=new Array(a);for(d=0;d>1;d>=0;--d)x(d);for(;;){var k=_();if(k<0||c[k]>n)break;A(k)}var E=[];for(d=0;d=0&&n>=0&&t!==n){var r=M[t],i=M[n];r!==i&&D.push([r,i])}})),i.unique(i.normalize(D)),{positions:E,edges:D}};var r=n(417),i=n(6656)},6638:function(e,t,n){"use strict";e.exports=function(e,t){var n,a,o,s;if(t[0][0]t[1][0]))return i(t,e);n=t[1],a=t[0]}if(e[0][0]e[1][0]))return-i(e,t);o=e[1],s=e[0]}var l=r(n,a,s),c=r(n,a,o);if(l<0){if(c<=0)return l}else if(l>0){if(c>=0)return l}else if(c)return c;if(l=r(s,o,a),c=r(s,o,n),l<0){if(c<=0)return l}else if(l>0){if(c>=0)return l}else if(c)return c;return a[0]-s[0]};var r=n(417);function i(e,t){var n,i,a,o;if(t[0][0]t[1][0])){var s=Math.min(e[0][1],e[1][1]),l=Math.max(e[0][1],e[1][1]),c=Math.min(t[0][1],t[1][1]),u=Math.max(t[0][1],t[1][1]);return lu?s-u:l-u}n=t[1],i=t[0]}e[0][1]0)if(t[0]!==o[1][0])n=e,e=e.right;else{if(l=c(e.right,t))return l;e=e.left}else{if(t[0]!==o[1][0])return e;var l;if(l=c(e.right,t))return l;e=e.left}}return n}function u(e,t,n,r){this.y=e,this.index=t,this.start=n,this.closed=r}function d(e,t,n,r){this.x=e,this.segment=t,this.create=n,this.index=r}s.prototype.castUp=function(e){var t=r.le(this.coordinates,e[0]);if(t<0)return-1;this.slabs[t];var n=c(this.slabs[t],e),i=-1;if(n&&(i=n.value),this.coordinates[t]===e[0]){var s=null;if(n&&(s=n.key),t>0){var u=c(this.slabs[t-1],e);u&&(s?o(u.key,s)>0&&(s=u.key,i=u.value):(i=u.value,s=u.key))}var d=this.horizontal[t];if(d.length>0){var h=r.ge(d,e[1],l);if(h=d.length)return i;f=d[h]}}if(f.start)if(s){var p=a(s[0],s[1],[e[0],f.y]);s[0][0]>s[1][0]&&(p=-p),p>0&&(i=f.index)}else i=f.index;else f.y!==e[1]&&(i=f.index)}}}return i}},4670:function(e,t,n){"use strict";var r=n(9130),i=n(9662);function a(e,t){var n=i(r(e,t),[t[t.length-1]]);return n[n.length-1]}function o(e,t,n,r){var i=-t/(r-t);i<0?i=0:i>1&&(i=1);for(var a=1-i,o=e.length,s=new Array(o),l=0;l0||i>0&&u<0){var d=o(s,u,l,i);n.push(d),r.push(d.slice())}u<0?r.push(l.slice()):u>0?n.push(l.slice()):(n.push(l.slice()),r.push(l.slice())),i=u}return{positive:n,negative:r}},e.exports.positive=function(e,t){for(var n=[],r=a(e[e.length-1],t),i=e[e.length-1],s=e[0],l=0;l0||r>0&&c<0)&&n.push(o(i,c,s,r)),c>=0&&n.push(s.slice()),r=c}return n},e.exports.negative=function(e,t){for(var n=[],r=a(e[e.length-1],t),i=e[e.length-1],s=e[0],l=0;l0||r>0&&c<0)&&n.push(o(i,c,s,r)),c<=0&&n.push(s.slice()),r=c}return n}},8974:function(e,t,n){var r;!function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function a(e){return function(e,t){var n,r,o,s,l,c,u,d,h,f=1,p=e.length,m="";for(r=0;r=0),s.type){case"b":n=parseInt(n,10).toString(2);break;case"c":n=String.fromCharCode(parseInt(n,10));break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,s.width?parseInt(s.width):0);break;case"e":n=s.precision?parseFloat(n).toExponential(s.precision):parseFloat(n).toExponential();break;case"f":n=s.precision?parseFloat(n).toFixed(s.precision):parseFloat(n);break;case"g":n=s.precision?String(Number(n.toPrecision(s.precision))):parseFloat(n);break;case"o":n=(parseInt(n,10)>>>0).toString(8);break;case"s":n=String(n),n=s.precision?n.substring(0,s.precision):n;break;case"t":n=String(!!n),n=s.precision?n.substring(0,s.precision):n;break;case"T":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=s.precision?n.substring(0,s.precision):n;break;case"u":n=parseInt(n,10)>>>0;break;case"v":n=n.valueOf(),n=s.precision?n.substring(0,s.precision):n;break;case"x":n=(parseInt(n,10)>>>0).toString(16);break;case"X":n=(parseInt(n,10)>>>0).toString(16).toUpperCase()}i.json.test(s.type)?m+=n:(!i.number.test(s.type)||d&&!s.sign?h="":(h=d?"+":"-",n=n.toString().replace(i.sign,"")),c=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",u=s.width-(h+n).length,l=s.width&&u>0?c.repeat(u):"",m+=s.align?h+n+l:"0"===c?h+l+n:l+h+n)}return m}(function(e){if(s[e])return s[e];var t,n=e,r=[],a=0;for(;n;){if(null!==(t=i.text.exec(n)))r.push(t[0]);else if(null!==(t=i.modulo.exec(n)))r.push("%");else{if(null===(t=i.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){a|=1;var o=[],l=t[2],c=[];if(null===(c=i.key.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(o.push(c[1]);""!==(l=l.substring(c[0].length));)if(null!==(c=i.key_access.exec(l)))o.push(c[1]);else{if(null===(c=i.index_access.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");o.push(c[1])}t[2]=o}else a|=2;if(3===a)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");r.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}n=n.substring(t[0].length)}return s[e]=r}(e),arguments)}function o(e,t){return a.apply(null,[e].concat(t||[]))}var s=Object.create(null);t.sprintf=a,t.vsprintf=o,"undefined"!==typeof window&&(window.sprintf=a,window.vsprintf=o,void 0===(r=function(){return{sprintf:a,vsprintf:o}}.call(t,n,t,e))||(e.exports=r))}()},4162:function(e,t,n){"use strict";e.exports=function(e,t){if(e.dimension<=0)return{positions:[],cells:[]};if(1===e.dimension)return function(e,t){for(var n=i(e,t),r=n.length,a=new Array(r),o=new Array(r),s=0;sr|0},vertex:function(e,t,n,r,i,a,o,s,l,c,u,d,h){var f=(o|0)+(s<<1)+(l<<2)+(c<<3)|0;if(0!==f&&15!==f)switch(f){case 0:case 15:u.push([e-.5,t-.5]);break;case 1:u.push([e-.25-.25*(r+n-2*h)/(n-r),t-.25-.25*(i+n-2*h)/(n-i)]);break;case 2:u.push([e-.75-.25*(-r-n+2*h)/(r-n),t-.25-.25*(a+r-2*h)/(r-a)]);break;case 3:u.push([e-.5,t-.5-.5*(i+n+a+r-4*h)/(n-i+r-a)]);break;case 4:u.push([e-.25-.25*(a+i-2*h)/(i-a),t-.75-.25*(-i-n+2*h)/(i-n)]);break;case 5:u.push([e-.5-.5*(r+n+a+i-4*h)/(n-r+i-a),t-.5]);break;case 6:u.push([e-.5-.25*(-r-n+a+i)/(r-n+i-a),t-.5-.25*(-i-n+a+r)/(i-n+r-a)]);break;case 7:u.push([e-.75-.25*(a+i-2*h)/(i-a),t-.75-.25*(a+r-2*h)/(r-a)]);break;case 8:u.push([e-.75-.25*(-a-i+2*h)/(a-i),t-.75-.25*(-a-r+2*h)/(a-r)]);break;case 9:u.push([e-.5-.25*(r+n+-a-i)/(n-r+a-i),t-.5-.25*(i+n+-a-r)/(n-i+a-r)]);break;case 10:u.push([e-.5-.5*(-r-n-a-i+4*h)/(r-n+a-i),t-.5]);break;case 11:u.push([e-.25-.25*(-a-i+2*h)/(a-i),t-.75-.25*(i+n-2*h)/(n-i)]);break;case 12:u.push([e-.5,t-.5-.5*(-i-n-a-r+4*h)/(i-n+a-r)]);break;case 13:u.push([e-.75-.25*(r+n-2*h)/(n-r),t-.25-.25*(-a-r+2*h)/(a-r)]);break;case 14:u.push([e-.25-.25*(-r-n+2*h)/(r-n),t-.25-.25*(-i-n+2*h)/(i-n)])}},cell:function(e,t,n,r,i,a,o,s,l){i?s.push([e,t]):s.push([t,e])}});return function(e,t){var n=[],i=[];return r(e,n,i,t),{positions:n,cells:i}}}};var o={}},6946:function(e,t,n){"use strict";e.exports=function e(t,n,r){r=r||{};var a=o[t];a||(a=o[t]={" ":{data:new Float32Array(0),shape:.2}});var s=a[n];if(!s)if(n.length<=1||!/\d/.test(n))s=a[n]=function(e){for(var t=e.cells,n=e.positions,r=new Float32Array(6*t.length),i=0,a=0,o=0;o0&&(d+=.02);var f=new Float32Array(u),p=0,m=-.5*d;for(h=0;hMath.max(n,r)?i[2]=1:n>Math.max(t,r)?i[0]=1:i[1]=1;for(var a=0,o=0,l=0;l<3;++l)a+=e[l]*e[l],o+=i[l]*e[l];for(l=0;l<3;++l)i[l]-=o/a*e[l];return s(i,i),i}function h(e,t,n,i,a,o,s,l){this.center=r(n),this.up=r(i),this.right=r(a),this.radius=r([o]),this.angle=r([s,l]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(e,t),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var c=0;c<16;++c)this.computedMatrix[c]=.5;this.recalcMatrix(0)}var f=h.prototype;f.setDistanceLimits=function(e,t){e=e>0?Math.log(e):-1/0,t=t>0?Math.log(t):1/0,t=Math.max(t,e),this.radius.bounds[0][0]=e,this.radius.bounds[1][0]=t},f.getDistanceLimits=function(e){var t=this.radius.bounds[0];return e?(e[0]=Math.exp(t[0][0]),e[1]=Math.exp(t[1][0]),e):[Math.exp(t[0][0]),Math.exp(t[1][0])]},f.recalcMatrix=function(e){this.center.curve(e),this.up.curve(e),this.right.curve(e),this.radius.curve(e),this.angle.curve(e);for(var t=this.computedUp,n=this.computedRight,r=0,i=0,a=0;a<3;++a)i+=t[a]*n[a],r+=t[a]*t[a];var l=Math.sqrt(r),u=0;for(a=0;a<3;++a)n[a]-=t[a]*i/r,u+=n[a]*n[a],t[a]/=l;var d=Math.sqrt(u);for(a=0;a<3;++a)n[a]/=d;var h=this.computedToward;o(h,t,n),s(h,h);var f=Math.exp(this.computedRadius[0]),p=this.computedAngle[0],m=this.computedAngle[1],g=Math.cos(p),v=Math.sin(p),y=Math.cos(m),x=Math.sin(m),b=this.computedCenter,_=g*y,w=v*y,A=x,S=-g*x,M=-v*x,T=y,k=this.computedEye,E=this.computedMatrix;for(a=0;a<3;++a){var C=_*n[a]+w*h[a]+A*t[a];E[4*a+1]=S*n[a]+M*h[a]+T*t[a],E[4*a+2]=C,E[4*a+3]=0}var D=E[1],R=E[5],P=E[9],O=E[2],L=E[6],I=E[10],z=R*I-P*L,N=P*O-D*I,F=D*L-R*O,B=c(z,N,F);z/=B,N/=B,F/=B,E[0]=z,E[4]=N,E[8]=F;for(a=0;a<3;++a)k[a]=b[a]+E[2+4*a]*f;for(a=0;a<3;++a){u=0;for(var j=0;j<3;++j)u+=E[a+4*j]*k[j];E[12+a]=-u}E[15]=1},f.getMatrix=function(e,t){this.recalcMatrix(e);var n=this.computedMatrix;if(t){for(var r=0;r<16;++r)t[r]=n[r];return t}return n};var p=[0,0,0];f.rotate=function(e,t,n,r){if(this.angle.move(e,t,n),r){this.recalcMatrix(e);var i=this.computedMatrix;p[0]=i[2],p[1]=i[6],p[2]=i[10];for(var o=this.computedUp,s=this.computedRight,l=this.computedToward,c=0;c<3;++c)i[4*c]=o[c],i[4*c+1]=s[c],i[4*c+2]=l[c];a(i,i,r,p);for(c=0;c<3;++c)o[c]=i[4*c],s[c]=i[4*c+1];this.up.set(e,o[0],o[1],o[2]),this.right.set(e,s[0],s[1],s[2])}},f.pan=function(e,t,n,r){t=t||0,n=n||0,r=r||0,this.recalcMatrix(e);var i=this.computedMatrix,a=(Math.exp(this.computedRadius[0]),i[1]),o=i[5],s=i[9],l=c(a,o,s);a/=l,o/=l,s/=l;var u=i[0],d=i[4],h=i[8],f=u*a+d*o+h*s,p=c(u-=a*f,d-=o*f,h-=s*f),m=(u/=p)*t+a*n,g=(d/=p)*t+o*n,v=(h/=p)*t+s*n;this.center.move(e,m,g,v);var y=Math.exp(this.computedRadius[0]);y=Math.max(1e-4,y+r),this.radius.set(e,Math.log(y))},f.translate=function(e,t,n,r){this.center.move(e,t||0,n||0,r||0)},f.setMatrix=function(e,t,n,r){var a=1;"number"===typeof n&&(a=0|n),(a<0||a>3)&&(a=1);var o=(a+2)%3;t||(this.recalcMatrix(e),t=this.computedMatrix);var s=t[a],l=t[a+4],d=t[a+8];if(r){var h=Math.abs(s),f=Math.abs(l),p=Math.abs(d),m=Math.max(h,f,p);h===m?(s=s<0?-1:1,l=d=0):p===m?(d=d<0?-1:1,s=l=0):(l=l<0?-1:1,s=d=0)}else{var g=c(s,l,d);s/=g,l/=g,d/=g}var v,y,x=t[o],b=t[o+4],_=t[o+8],w=x*s+b*l+_*d,A=c(x-=s*w,b-=l*w,_-=d*w),S=l*(_/=A)-d*(b/=A),M=d*(x/=A)-s*_,T=s*b-l*x,k=c(S,M,T);if(S/=k,M/=k,T/=k,this.center.jump(e,W,G,q),this.radius.idle(e),this.up.jump(e,s,l,d),this.right.jump(e,x,b,_),2===a){var E=t[1],C=t[5],D=t[9],R=E*x+C*b+D*_,P=E*S+C*M+D*T;v=z<0?-Math.PI/2:Math.PI/2,y=Math.atan2(P,R)}else{var O=t[2],L=t[6],I=t[10],z=O*s+L*l+I*d,N=O*x+L*b+I*_,F=O*S+L*M+I*T;v=Math.asin(u(z)),y=Math.atan2(F,N)}this.angle.jump(e,y,v),this.recalcMatrix(e);var B=t[2],j=t[6],U=t[10],V=this.computedMatrix;i(V,t);var H=V[15],W=V[12]/H,G=V[13]/H,q=V[14]/H,Y=Math.exp(this.computedRadius[0]);this.center.jump(e,W-B*Y,G-j*Y,q-U*Y)},f.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},f.idle=function(e){this.center.idle(e),this.up.idle(e),this.right.idle(e),this.radius.idle(e),this.angle.idle(e)},f.flush=function(e){this.center.flush(e),this.up.flush(e),this.right.flush(e),this.radius.flush(e),this.angle.flush(e)},f.setDistance=function(e,t){t>0&&this.radius.set(e,Math.log(t))},f.lookAt=function(e,t,n,r){this.recalcMatrix(e),t=t||this.computedEye,n=n||this.computedCenter;var i=(r=r||this.computedUp)[0],a=r[1],o=r[2],s=c(i,a,o);if(!(s<1e-6)){i/=s,a/=s,o/=s;var l=t[0]-n[0],d=t[1]-n[1],h=t[2]-n[2],f=c(l,d,h);if(!(f<1e-6)){l/=f,d/=f,h/=f;var p=this.computedRight,m=p[0],g=p[1],v=p[2],y=i*m+a*g+o*v,x=c(m-=y*i,g-=y*a,v-=y*o);if(!(x<.01&&(x=c(m=a*h-o*d,g=o*l-i*h,v=i*d-a*l))<1e-6)){m/=x,g/=x,v/=x,this.up.set(e,i,a,o),this.right.set(e,m,g,v),this.center.set(e,n[0],n[1],n[2]),this.radius.set(e,Math.log(f));var b=a*v-o*g,_=o*m-i*v,w=i*g-a*m,A=c(b,_,w),S=i*l+a*d+o*h,M=m*l+g*d+v*h,T=(b/=A)*l+(_/=A)*d+(w/=A)*h,k=Math.asin(u(S)),E=Math.atan2(T,M),C=this.angle._state,D=C[C.length-1],R=C[C.length-2];D%=2*Math.PI;var P=Math.abs(D+2*Math.PI-E),O=Math.abs(D-E),L=Math.abs(D-2*Math.PI-E);P0?n.pop():new ArrayBuffer(e)}function p(e){return new Uint8Array(f(e),0,e)}function m(e){return new Uint16Array(f(2*e),0,e)}function g(e){return new Uint32Array(f(4*e),0,e)}function v(e){return new Int8Array(f(e),0,e)}function y(e){return new Int16Array(f(2*e),0,e)}function x(e){return new Int32Array(f(4*e),0,e)}function b(e){return new Float32Array(f(4*e),0,e)}function _(e){return new Float64Array(f(8*e),0,e)}function w(e){return o?new Uint8ClampedArray(f(e),0,e):p(e)}function A(e){return s?new BigUint64Array(f(8*e),0,e):null}function S(e){return l?new BigInt64Array(f(8*e),0,e):null}function M(e){return new DataView(f(e),0,e)}function T(e){e=r.nextPow2(e);var t=r.log2(e),n=d[t];return n.length>0?n.pop():new a(e)}t.free=function(e){if(a.isBuffer(e))d[r.log2(e.length)].push(e);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(e)&&(e=e.buffer),!e)return;var t=e.length||e.byteLength,n=0|r.log2(t);u[n].push(e)}},t.freeUint8=t.freeUint16=t.freeUint32=t.freeBigUint64=t.freeInt8=t.freeInt16=t.freeInt32=t.freeBigInt64=t.freeFloat32=t.freeFloat=t.freeFloat64=t.freeDouble=t.freeUint8Clamped=t.freeDataView=function(e){h(e.buffer)},t.freeArrayBuffer=h,t.freeBuffer=function(e){d[r.log2(e.length)].push(e)},t.malloc=function(e,t){if(void 0===t||"arraybuffer"===t)return f(e);switch(t){case"uint8":return p(e);case"uint16":return m(e);case"uint32":return g(e);case"int8":return v(e);case"int16":return y(e);case"int32":return x(e);case"float":case"float32":return b(e);case"double":case"float64":return _(e);case"uint8_clamped":return w(e);case"bigint64":return S(e);case"biguint64":return A(e);case"buffer":return T(e);case"data":case"dataview":return M(e);default:return null}return null},t.mallocArrayBuffer=f,t.mallocUint8=p,t.mallocUint16=m,t.mallocUint32=g,t.mallocInt8=v,t.mallocInt16=y,t.mallocInt32=x,t.mallocFloat32=t.mallocFloat=b,t.mallocFloat64=t.mallocDouble=_,t.mallocUint8Clamped=w,t.mallocBigUint64=A,t.mallocBigInt64=S,t.mallocDataView=M,t.mallocBuffer=T,t.clearCache=function(){for(var e=0;e<32;++e)c.UINT8[e].length=0,c.UINT16[e].length=0,c.UINT32[e].length=0,c.INT8[e].length=0,c.INT16[e].length=0,c.INT32[e].length=0,c.FLOAT[e].length=0,c.DOUBLE[e].length=0,c.BIGUINT64[e].length=0,c.BIGINT64[e].length=0,c.UINT8C[e].length=0,u[e].length=0,d[e].length=0}},1731:function(e){"use strict";function t(e){this.roots=new Array(e),this.ranks=new Array(e);for(var t=0;t0&&(a=r.size),r.lineSpacing&&r.lineSpacing>0&&(o=r.lineSpacing),r.styletags&&r.styletags.breaklines&&(s.breaklines=!!r.styletags.breaklines),r.styletags&&r.styletags.bolds&&(s.bolds=!!r.styletags.bolds),r.styletags&&r.styletags.italics&&(s.italics=!!r.styletags.italics),r.styletags&&r.styletags.subscripts&&(s.subscripts=!!r.styletags.subscripts),r.styletags&&r.styletags.superscripts&&(s.superscripts=!!r.styletags.superscripts));return n.font=[r.fontStyle,r.fontVariant,r.fontWeight,a+"px",r.font].filter((function(e){return e})).join(" "),n.textAlign="start",n.textBaseline="alphabetic",n.direction="ltr",w(function(e,t,n,r,a,o){n=n.replace(/\n/g,""),n=!0===o.breaklines?n.replace(/\/g,"\n"):n.replace(/\/g," ");var s="",l=[];for(A=0;A-1?parseInt(e[1+i]):0,l=a>-1?parseInt(n[1+a]):0;s!==l&&(r=r.replace(N(),"?px "),T*=Math.pow(.75,l-s),r=r.replace("?px ",N())),M+=.25*C*(l-s)}if(!0===o.superscripts){var c=e.indexOf(p),d=n.indexOf(p),f=c>-1?parseInt(e[1+c]):0,m=d>-1?parseInt(n[1+d]):0;f!==m&&(r=r.replace(N(),"?px "),T*=Math.pow(.75,m-f),r=r.replace("?px ",N())),M-=.25*C*(m-f)}if(!0===o.bolds){var g=e.indexOf(u)>-1,y=n.indexOf(u)>-1;!g&&y&&(r=x?r.replace("italic ","italic bold "):"bold "+r),g&&!y&&(r=r.replace("bold ",""))}if(!0===o.italics){var x=e.indexOf(h)>-1,b=n.indexOf(h)>-1;!x&&b&&(r="italic "+r),x&&!b&&(r=r.replace("italic ",""))}t.font=r}for(w=0;w",a="",o=i.length,s=a.length,l=t[0]===p||t[0]===v,c=0,u=-s;c>-1&&-1!==(c=n.indexOf(i,c))&&-1!==(u=n.indexOf(a,c+o))&&!(u<=c);){for(var d=c;d=u)r[d]=null,n=n.substr(0,d)+" "+n.substr(d+1);else if(null!==r[d]){var h=r[d].indexOf(t[0]);-1===h?r[d]+=t:l&&(r[d]=r[d].substr(0,h+1)+(1+parseInt(r[d][h+1]))+r[d].substr(h+2))}var f=c+o,m=n.substr(f,u-f).indexOf(i);c=-1!==m?m:u+s}return r}function b(e,t){var n=r(e,128);return t?a(n.cells,n.positions,.25):{edges:n.cells,positions:n.positions}}function _(e,t,n,r){var i=b(e,r),a=function(e,t,n){for(var r=t.textAlign||"start",i=t.textBaseline||"alphabetic",a=[1<<30,1<<30],o=[0,0],s=e.length,l=0;l=0?t[a]:i}))},has___:{value:x((function(t){var r=y(t);return r?n in r:e.indexOf(t)>=0}))},set___:{value:x((function(r,i){var a,o=y(r);return o?o[n]=i:(a=e.indexOf(r))>=0?t[a]=i:(a=e.length,t[a]=i,e[a]=r),this}))},delete___:{value:x((function(r){var i,a,o=y(r);return o?n in o&&delete o[n]:!((i=e.indexOf(r))<0)&&(a=e.length-1,e[i]=void 0,t[i]=t[a],e[i]=e[a],e.length=a,t.length=a,!0)}))}})};m.prototype=Object.create(Object.prototype,{get:{value:function(e,t){return this.get___(e,t)},writable:!0,configurable:!0},has:{value:function(e){return this.has___(e)},writable:!0,configurable:!0},set:{value:function(e,t){return this.set___(e,t)},writable:!0,configurable:!0},delete:{value:function(e){return this.delete___(e)},writable:!0,configurable:!0}}),"function"===typeof n?function(){function r(){this instanceof m||b();var e,r=new n,i=void 0,a=!1;return e=t?function(e,t){return r.set(e,t),r.has(e)||(i||(i=new m),i.set(e,t)),this}:function(e,t){if(a)try{r.set(e,t)}catch(n){i||(i=new m),i.set___(e,t)}else r.set(e,t);return this},Object.create(m.prototype,{get___:{value:x((function(e,t){return i?r.has(e)?r.get(e):i.get___(e,t):r.get(e,t)}))},has___:{value:x((function(e){return r.has(e)||!!i&&i.has___(e)}))},set___:{value:x(e)},delete___:{value:x((function(e){var t=!!r.delete(e);return i&&i.delete___(e)||t}))},permitHostObjects___:{value:x((function(e){if(e!==g)throw new Error("bogus call to permitHostObjects___");a=!0}))}})}t&&"undefined"!==typeof Proxy&&(Proxy=void 0),r.prototype=m.prototype,e.exports=r,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():("undefined"!==typeof Proxy&&(Proxy=void 0),e.exports=m)}function g(e){e.permitHostObjects___&&e.permitHostObjects___(g)}function v(e){return!(e.substr(0,8)==l&&"___"===e.substr(e.length-3))}function y(e){if(e!==Object(e))throw new TypeError("Not an object: "+e);var t=e[c];if(t&&t.key===e)return t;if(s(e)){t={key:e};try{return o(e,c,{value:t,writable:!1,enumerable:!1,configurable:!1}),t}catch(n){return}}}function x(e){return e.prototype=null,Object.freeze(e)}function b(){f||"undefined"===typeof console||(f=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}}()},9222:function(e,t,n){var r=n(7178);e.exports=function(){var e={};return function(t){if(("object"!==typeof t||null===t)&&"function"!==typeof t)throw new Error("Weakmap-shim: Key must be object");var n=t.valueOf(e);return n&&n.identity===e?n:r(t,e)}}},7178:function(e){e.exports=function(e,t){var n={identity:t},r=e.valueOf;return Object.defineProperty(e,"valueOf",{value:function(e){return e!==t?r.apply(this,arguments):n},writable:!0}),n}},4037:function(e,t,n){var r=n(9222);e.exports=function(){var e=r();return{get:function(t,n){var r=e(t);return r.hasOwnProperty("value")?r.value:n},set:function(t,n){return e(t).value=n,this},has:function(t){return"value"in e(t)},delete:function(t){return delete e(t).value}}}},6183:function(e){"use strict";var t=function(){return function(e,t,n,r,i,a){var o=e[0],s=n[0],l=[0],c=s;r|=0;var u=0,d=s;for(u=0;u=0!==f>=0&&i.push(l[0]+.5+.5*(h+f)/(h-f)),r+=d,++l[0]}}};e.exports=function(e){return n={funcName:e.funcName},function(e){var t={};return function(n,r,i){var a=n.dtype,o=n.order,s=[a,o.join()].join(),l=t[s];return l||(t[s]=l=e([a,o])),l(n.shape.slice(0),n.data,n.stride,0|n.offset,r,i)}}(t.bind(void 0,n));var n}({funcName:"zeroCrossings"})},9584:function(e,t,n){"use strict";e.exports=function(e,t){var n=[];return t=+t||0,r(e.hi(e.shape[0]-1),n,t),n};var r=n(6183)},6601:function(){}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var a=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.loaded=!0,a.exports}return n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},n(7386)}()}))},12856:function(e,t,n){"use strict";function r(e,t){for(var n=0;nh)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,p.prototype),t}function p(e,t,n){if("number"===typeof e){if("string"===typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return v(e)}return m(e,t,n)}function m(e,t,n){if("string"===typeof e)return function(e,t){"string"===typeof t&&""!==t||(t="utf8");if(!p.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|_(e,t),r=f(n),i=r.write(e,t);i!==n&&(r=r.slice(0,i));return r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(te(e,Uint8Array)){var t=new Uint8Array(e);return x(t.buffer,t.byteOffset,t.byteLength)}return y(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+l(e));if(te(e,ArrayBuffer)||e&&te(e.buffer,ArrayBuffer))return x(e,t,n);if("undefined"!==typeof SharedArrayBuffer&&(te(e,SharedArrayBuffer)||e&&te(e.buffer,SharedArrayBuffer)))return x(e,t,n);if("number"===typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return p.from(r,t,n);var i=function(e){if(p.isBuffer(e)){var t=0|b(e.length),n=f(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!==typeof e.length||ne(e.length)?f(0):y(e);if("Buffer"===e.type&&Array.isArray(e.data))return y(e.data)}(e);if(i)return i;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof e[Symbol.toPrimitive])return p.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+l(e))}function g(e){if("number"!==typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function v(e){return g(e),f(e<0?0:0|b(e))}function y(e){for(var t=e.length<0?0:0|b(e.length),n=f(t),r=0;r=h)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+h.toString(16)+" bytes");return 0|e}function _(e,t){if(p.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||te(e,ArrayBuffer))return e.byteLength;if("string"!==typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+l(e));var n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return J(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Q(e).length;default:if(i)return r?-1:J(e).length;t=(""+t).toLowerCase(),i=!0}}function w(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return z(this,t,n);case"utf8":case"utf-8":return P(this,t,n);case"ascii":return L(this,t,n);case"latin1":case"binary":return I(this,t,n);case"base64":return R(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function A(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function S(e,t,n,r,i){if(0===e.length)return-1;if("string"===typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),ne(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"===typeof t&&(t=p.from(t,r)),p.isBuffer(t))return 0===t.length?-1:M(e,t,n,r,i);if("number"===typeof t)return t&=255,"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):M(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function M(e,t,n,r,i){var a,o=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,l/=2,n/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var u=-1;for(a=n;as&&(n=s-l),a=n;a>=0;a--){for(var d=!0,h=0;hi&&(r=i):r=i;var a,o=t.length;for(r>o/2&&(r=o/2),a=0;a>8,i=n%256,a.push(i),a.push(r);return a}(t,e.length-n),e,n,r)}function R(e,t,n){return 0===t&&n===e.length?c.fromByteArray(e):c.fromByteArray(e.slice(t,n))}function P(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:a>223?3:a>191?2:1;if(i+s<=n){var l=void 0,c=void 0,u=void 0,d=void 0;switch(s){case 1:a<128&&(o=a);break;case 2:128===(192&(l=e[i+1]))&&(d=(31&a)<<6|63&l)>127&&(o=d);break;case 3:l=e[i+1],c=e[i+2],128===(192&l)&&128===(192&c)&&(d=(15&a)<<12|(63&l)<<6|63&c)>2047&&(d<55296||d>57343)&&(o=d);break;case 4:l=e[i+1],c=e[i+2],u=e[i+3],128===(192&l)&&128===(192&c)&&128===(192&u)&&(d=(15&a)<<18|(63&l)<<12|(63&c)<<6|63&u)>65535&&d<1114112&&(o=d)}}null===o?(o=65533,s=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=s}return function(e){var t=e.length;if(t<=O)return String.fromCharCode.apply(String,e);var n="",r=0;for(;rr.length?(p.isBuffer(a)||(a=p.from(a)),a.copy(r,i)):Uint8Array.prototype.set.call(r,a,i);else{if(!p.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i)}i+=a.length}return r},p.byteLength=_,p.prototype._isBuffer=!0,p.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tn&&(e+=" ... "),""},d&&(p.prototype[d]=p.prototype.inspect),p.prototype.compare=function(e,t,n,r,i){if(te(e,Uint8Array)&&(e=p.from(e,e.offset,e.byteLength)),!p.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+l(e));if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0),s=Math.min(a,o),c=this.slice(r,i),u=e.slice(t,n),d=0;d>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return T(this,e,t,n);case"utf8":case"utf-8":return k(this,e,t,n);case"ascii":case"latin1":case"binary":return E(this,e,t,n);case"base64":return C(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var O=4096;function L(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;ir)&&(n=r);for(var i="",a=t;an)throw new RangeError("Trying to access beyond buffer length")}function B(e,t,n,r,i,a){if(!p.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function j(e,t,n,r,i){$(t,r,i,e,n,7);var a=Number(t&BigInt(4294967295));e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a;var o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,n}function U(e,t,n,r,i){$(t,r,i,e,n,7);var a=Number(t&BigInt(4294967295));e[n+7]=a,a>>=8,e[n+6]=a,a>>=8,e[n+5]=a,a>>=8,e[n+4]=a;var o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=o,o>>=8,e[n+2]=o,o>>=8,e[n+1]=o,o>>=8,e[n]=o,n+8}function V(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function H(e,t,n,r,i){return t=+t,n>>>=0,i||V(e,0,n,4),u.write(e,t,n,r,23,4),n+4}function W(e,t,n,r,i){return t=+t,n>>>=0,i||V(e,0,n,8),u.write(e,t,n,r,52,8),n+8}p.prototype.slice=function(e,t){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||F(e,t,this.length);for(var r=this[e],i=1,a=0;++a>>=0,t>>>=0,n||F(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},p.prototype.readUint8=p.prototype.readUInt8=function(e,t){return e>>>=0,t||F(e,1,this.length),this[e]},p.prototype.readUint16LE=p.prototype.readUInt16LE=function(e,t){return e>>>=0,t||F(e,2,this.length),this[e]|this[e+1]<<8},p.prototype.readUint16BE=p.prototype.readUInt16BE=function(e,t){return e>>>=0,t||F(e,2,this.length),this[e]<<8|this[e+1]},p.prototype.readUint32LE=p.prototype.readUInt32LE=function(e,t){return e>>>=0,t||F(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},p.prototype.readUint32BE=p.prototype.readUInt32BE=function(e,t){return e>>>=0,t||F(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},p.prototype.readBigUInt64LE=ie((function(e){X(e>>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||Z(e,this.length-8);var r=t+this[++e]*Math.pow(2,8)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,24),i=this[++e]+this[++e]*Math.pow(2,8)+this[++e]*Math.pow(2,16)+n*Math.pow(2,24);return BigInt(r)+(BigInt(i)<>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||Z(e,this.length-8);var r=t*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+this[++e],i=this[++e]*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+n;return(BigInt(r)<>>=0,t>>>=0,n||F(e,t,this.length);for(var r=this[e],i=1,a=0;++a=(i*=128)&&(r-=Math.pow(2,8*t)),r},p.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||F(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},p.prototype.readInt8=function(e,t){return e>>>=0,t||F(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},p.prototype.readInt16LE=function(e,t){e>>>=0,t||F(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},p.prototype.readInt16BE=function(e,t){e>>>=0,t||F(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},p.prototype.readInt32LE=function(e,t){return e>>>=0,t||F(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},p.prototype.readInt32BE=function(e,t){return e>>>=0,t||F(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},p.prototype.readBigInt64LE=ie((function(e){X(e>>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||Z(e,this.length-8);var r=this[e+4]+this[e+5]*Math.pow(2,8)+this[e+6]*Math.pow(2,16)+(n<<24);return(BigInt(r)<>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||Z(e,this.length-8);var r=(t<<24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+this[++e];return(BigInt(r)<>>=0,t||F(e,4,this.length),u.read(this,e,!0,23,4)},p.prototype.readFloatBE=function(e,t){return e>>>=0,t||F(e,4,this.length),u.read(this,e,!1,23,4)},p.prototype.readDoubleLE=function(e,t){return e>>>=0,t||F(e,8,this.length),u.read(this,e,!0,52,8)},p.prototype.readDoubleBE=function(e,t){return e>>>=0,t||F(e,8,this.length),u.read(this,e,!1,52,8)},p.prototype.writeUintLE=p.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||B(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[t]=255&e;++a>>=0,n>>>=0,r)||B(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},p.prototype.writeUint8=p.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,1,255,0),this[t]=255&e,t+1},p.prototype.writeUint16LE=p.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},p.prototype.writeUint16BE=p.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},p.prototype.writeUint32LE=p.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},p.prototype.writeUint32BE=p.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},p.prototype.writeBigUInt64LE=ie((function(e){return j(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),p.prototype.writeBigUInt64BE=ie((function(e){return U(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),p.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);B(this,e,t,n,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a>>=0,!r){var i=Math.pow(2,8*n-1);B(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o|0)-s&255;return t+n},p.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},p.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},p.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},p.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},p.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},p.prototype.writeBigInt64LE=ie((function(e){return j(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),p.prototype.writeBigInt64BE=ie((function(e){return U(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),p.prototype.writeFloatLE=function(e,t,n){return H(this,e,t,!0,n)},p.prototype.writeFloatBE=function(e,t,n){return H(this,e,t,!1,n)},p.prototype.writeDoubleLE=function(e,t,n){return W(this,e,t,!0,n)},p.prototype.writeDoubleBE=function(e,t,n){return W(this,e,t,!1,n)},p.prototype.copy=function(e,t,n,r){if(!p.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"===typeof e)for(a=t;a=r+4;n-=3)t="_".concat(e.slice(n-3,n)).concat(t);return"".concat(e.slice(0,n)).concat(t)}function $(e,t,n,r,i,a){if(e>n||e3?0===t||t===BigInt(0)?">= 0".concat(s," and < 2").concat(s," ** ").concat(8*(a+1)).concat(s):">= -(2".concat(s," ** ").concat(8*(a+1)-1).concat(s,") and < 2 ** ")+"".concat(8*(a+1)-1).concat(s):">= ".concat(t).concat(s," and <= ").concat(n).concat(s),new G.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,n){X(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||Z(t,e.length-(n+1))}(r,i,a)}function X(e,t){if("number"!==typeof e)throw new G.ERR_INVALID_ARG_TYPE(t,"number",e)}function Z(e,t,n){if(Math.floor(e)!==e)throw X(e,n),new G.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new G.ERR_BUFFER_OUT_OF_BOUNDS;throw new G.ERR_OUT_OF_RANGE(n||"offset",">= ".concat(n?1:0," and <= ").concat(t),e)}q("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?"".concat(e," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),q("ERR_INVALID_ARG_TYPE",(function(e,t){return'The "'.concat(e,'" argument must be of type number. Received type ').concat(l(t))}),TypeError),q("ERR_OUT_OF_RANGE",(function(e,t,n){var r='The value of "'.concat(e,'" is out of range.'),i=n;return Number.isInteger(n)&&Math.abs(n)>Math.pow(2,32)?i=Y(String(n)):"bigint"===typeof n&&(i=String(n),(n>Math.pow(BigInt(2),BigInt(32))||n<-Math.pow(BigInt(2),BigInt(32)))&&(i=Y(i)),i+="n"),r+=" It must be ".concat(t,". Received ").concat(i)}),RangeError);var K=/[^+/0-9A-Za-z-_]/g;function J(e,t){var n;t=t||1/0;for(var r=e.length,i=null,a=[],o=0;o55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function Q(e){return c.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(K,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function ee(e,t,n,r){var i;for(i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function te(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function ne(e){return e!==e}var re=function(){for(var e="0123456789abcdef",t=new Array(256),n=0;n<16;++n)for(var r=16*n,i=0;i<16;++i)t[r+i]=e[n]+e[i];return t}();function ie(e){return"undefined"===typeof BigInt?ae:e}function ae(){throw new Error("BigInt not supported")}},35791:function(e){"use strict";e.exports=i,e.exports.isMobile=i,e.exports.default=i;var t=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,n=/CrOS/,r=/android|ipad|playbook|silk/i;function i(e){e||(e={});var i=e.ua;if(i||"undefined"===typeof navigator||(i=navigator.userAgent),i&&i.headers&&"string"===typeof i.headers["user-agent"]&&(i=i.headers["user-agent"]),"string"!==typeof i)return!1;var a=t.test(i)&&!n.test(i)||!!e.tablet&&r.test(i);return!a&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==i.indexOf("Macintosh")&&-1!==i.indexOf("Safari")&&(a=!0),a}},86781:function(e,t,n){"use strict";n.r(t),n.d(t,{sankeyCenter:function(){return h},sankeyCircular:function(){return D},sankeyJustify:function(){return d},sankeyLeft:function(){return c},sankeyRight:function(){return u}});var r=n(33064),i=n(15140),a=n(45879),o=n(2502),s=n.n(o);function l(e){return e.target.depth}function c(e){return e.depth}function u(e,t){return t-1-e.height}function d(e,t){return e.sourceLinks.length?e.depth:t-1}function h(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?(0,r.VV)(e.sourceLinks,l)-1:0}function f(e){return function(){return e}}var p="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function m(e,t){return v(e.source,t.source)||e.index-t.index}function g(e,t){return v(e.target,t.target)||e.index-t.index}function v(e,t){return e.partOfCycle===t.partOfCycle?e.y0-t.y0:"top"===e.circularLinkType||"bottom"===t.circularLinkType?-1:1}function y(e){return e.value}function x(e){return(e.y0+e.y1)/2}function b(e){return x(e.source)}function _(e){return x(e.target)}function w(e){return e.index}function A(e){return e.nodes}function S(e){return e.links}function M(e,t){var n=e.get(t);if(!n)throw new Error("missing: "+t);return n}function T(e,t){return t(e)}var k=25,E=10,C=.3;function D(){var e,t,n=0,a=0,o=1,l=1,c=24,u=w,h=d,T=A,D=S,P=32,L=2,I=null;function N(){var d={nodes:T.apply(null,arguments),links:D.apply(null,arguments)};!function(e){e.nodes.forEach((function(e,t){e.index=t,e.sourceLinks=[],e.targetLinks=[]}));var t=(0,i.UI)(e.nodes,u);e.links.forEach((function(e,n){e.index=n;var r=e.source,i=e.target;"object"!==("undefined"===typeof r?"undefined":p(r))&&(r=e.source=M(t,r)),"object"!==("undefined"===typeof i?"undefined":p(i))&&(i=e.target=M(t,i)),r.sourceLinks.push(e),i.targetLinks.push(e)}))}(d),function(e,t,n){var r=0;if(null===n){for(var i=[],a=0;a0;--p)g(f*=.99,d),w();function m(i){if(t){var u=1/0;h.forEach((function(e){var n=l*t/(e.length+1);u=n0?t+k+E:t,bottom:n=n>0?n+k+E:n,left:a=a>0?a+k+E:a,right:i=i>0?i+k+E:i}}(s),p=function(e,t){var i=(0,r.Fp)(e.nodes,(function(e){return e.column})),s=o-n,u=l-a,d=s+t.right+t.left,h=u+t.top+t.bottom,f=s/d,p=u/h;return n=n*f+t.left,o=0==t.right?o:o*f,a=a*p+t.top,l*=p,e.nodes.forEach((function(e){e.x0=n+e.column*((o-n-c)/i),e.x1=e.x0+c})),p}(s,f);d*=p,s.links.forEach((function(e){e.width=e.value*d})),h.forEach((function(e){var t=e.length;e.forEach((function(e,n){e.depth==h.length-1&&1==t||0==e.depth&&1==t?(e.y0=l/2-e.value*d,e.y1=e.y0+e.value*d):e.partOfCycle?0==O(e,i)?(e.y0=l/2+n,e.y1=e.y0+e.value*d):"top"==e.circularLinkType?(e.y0=a+n,e.y1=e.y0+e.value*d):(e.y0=l-e.value*d-n,e.y1=e.y0+e.value*d):0==f.top||0==f.bottom?(e.y0=(l-a)/t*n,e.y1=e.y0+e.value*d):(e.y0=(l-a)/2-t/2+n,e.y1=e.y0+e.value*d)}))}))}function g(e,t){var n=h.length;h.forEach((function(i){var a=i.length,o=i[0].depth;i.forEach((function(i){var s;if(i.sourceLinks.length||i.targetLinks.length)if(i.partOfCycle&&O(i,t)>0);else if(0==o&&1==a)s=i.y1-i.y0,i.y0=l/2-s/2,i.y1=l/2+s/2;else if(o==n-1&&1==a)s=i.y1-i.y0,i.y0=l/2-s/2,i.y1=l/2+s/2;else{var c=(0,r.J6)(i.sourceLinks,_),u=(0,r.J6)(i.targetLinks,b),d=((c&&u?(c+u)/2:c||u)-x(i))*e;i.y0+=d,i.y1+=d}}))}))}function w(){h.forEach((function(t){var n,r,i,o=a,s=t.length;for(t.sort(v),i=0;i0&&(n.y0+=r,n.y1+=r),o=n.y1+e;if((r=o-e-l)>0)for(o=n.y0-=r,n.y1-=r,i=s-2;i>=0;--i)(r=(n=t[i]).y1+e-o)>0&&(n.y0-=r,n.y1-=r),o=n.y0}))}}(d,P,u),F(d);for(var f=0;f<4;f++)X(d,l,u),Z(d,l,u),q(d,a,l,u),X(d,l,u),Z(d,l,u);return function(e,t,n){var i=e.nodes,a=e.links,o=!1,s=!1;if(a.forEach((function(e){"top"==e.circularLinkType?o=!0:"bottom"==e.circularLinkType&&(s=!0)})),0==o||0==s){var l=(0,r.VV)(i,(function(e){return e.y0})),c=(n-t)/((0,r.Fp)(i,(function(e){return e.y1}))-l);i.forEach((function(e){var t=(e.y1-e.y0)*c;e.y0=(e.y0-l)*c,e.y1=e.y0+t})),a.forEach((function(e){e.y0=(e.y0-l)*c,e.y1=(e.y1-l)*c,e.width=e.width*c}))}}(d,a,l),z(d,L,l,u),d}function F(e){e.nodes.forEach((function(e){e.sourceLinks.sort(g),e.targetLinks.sort(m)})),e.nodes.forEach((function(e){var t=e.y0,n=t,r=e.y1,i=r;e.sourceLinks.forEach((function(e){e.circular?(e.y0=r-e.width/2,r-=e.width):(e.y0=t+e.width/2,t+=e.width)})),e.targetLinks.forEach((function(e){e.circular?(e.y1=i-e.width/2,i-=e.width):(e.y1=n+e.width/2,n+=e.width)}))}))}return N.nodeId=function(e){return arguments.length?(u="function"===typeof e?e:f(e),N):u},N.nodeAlign=function(e){return arguments.length?(h="function"===typeof e?e:f(e),N):h},N.nodeWidth=function(e){return arguments.length?(c=+e,N):c},N.nodePadding=function(t){return arguments.length?(e=+t,N):e},N.nodes=function(e){return arguments.length?(T="function"===typeof e?e:f(e),N):T},N.links=function(e){return arguments.length?(D="function"===typeof e?e:f(e),N):D},N.size=function(e){return arguments.length?(n=a=0,o=+e[0],l=+e[1],N):[o-n,l-a]},N.extent=function(e){return arguments.length?(n=+e[0][0],o=+e[1][0],a=+e[0][1],l=+e[1][1],N):[[n,a],[o,l]]},N.iterations=function(e){return arguments.length?(P=+e,N):P},N.circularLinkGap=function(e){return arguments.length?(L=+e,N):L},N.nodePaddingRatio=function(e){return arguments.length?(t=+e,N):t},N.sortNodes=function(e){return arguments.length?(I=e,N):I},N.update=function(e){return R(e,u),F(e),e.links.forEach((function(e){e.circular&&(e.circularLinkType=e.y0+e.y11||i>1)}function I(e,t,n){return e.sort(N),e.forEach((function(r,i){var a,o,s=0;if(Q(r,n)&&L(r))r.circularPathData.verticalBuffer=s+r.width/2;else{for(var l=0;lo.source.column)){var c=e[l].circularPathData.verticalBuffer+e[l].width/2+t;s=c>s?c:s}r.circularPathData.verticalBuffer=s+r.width/2}})),e}function z(e,t,n,i){var o=(0,r.VV)(e.links,(function(e){return e.source.y0}));e.links.forEach((function(e){e.circular&&(e.circularPathData={})})),I(e.links.filter((function(e){return"top"==e.circularLinkType})),t,i),I(e.links.filter((function(e){return"bottom"==e.circularLinkType})),t,i),e.links.forEach((function(r){if(r.circular){if(r.circularPathData.arcRadius=r.width+E,r.circularPathData.leftNodeBuffer=5,r.circularPathData.rightNodeBuffer=5,r.circularPathData.sourceWidth=r.source.x1-r.source.x0,r.circularPathData.sourceX=r.source.x0+r.circularPathData.sourceWidth,r.circularPathData.targetX=r.target.x0,r.circularPathData.sourceY=r.y0,r.circularPathData.targetY=r.y1,Q(r,i)&&L(r))r.circularPathData.leftSmallArcRadius=E+r.width/2,r.circularPathData.leftLargeArcRadius=E+r.width/2,r.circularPathData.rightSmallArcRadius=E+r.width/2,r.circularPathData.rightLargeArcRadius=E+r.width/2,"bottom"==r.circularLinkType?(r.circularPathData.verticalFullExtent=r.source.y1+k+r.circularPathData.verticalBuffer,r.circularPathData.verticalLeftInnerExtent=r.circularPathData.verticalFullExtent-r.circularPathData.leftLargeArcRadius,r.circularPathData.verticalRightInnerExtent=r.circularPathData.verticalFullExtent-r.circularPathData.rightLargeArcRadius):(r.circularPathData.verticalFullExtent=r.source.y0-k-r.circularPathData.verticalBuffer,r.circularPathData.verticalLeftInnerExtent=r.circularPathData.verticalFullExtent+r.circularPathData.leftLargeArcRadius,r.circularPathData.verticalRightInnerExtent=r.circularPathData.verticalFullExtent+r.circularPathData.rightLargeArcRadius);else{var s=r.source.column,l=r.circularLinkType,c=e.links.filter((function(e){return e.source.column==s&&e.circularLinkType==l}));"bottom"==r.circularLinkType?c.sort(B):c.sort(F);var u=0;c.forEach((function(e,n){e.circularLinkID==r.circularLinkID&&(r.circularPathData.leftSmallArcRadius=E+r.width/2+u,r.circularPathData.leftLargeArcRadius=E+r.width/2+n*t+u),u+=e.width})),s=r.target.column,c=e.links.filter((function(e){return e.target.column==s&&e.circularLinkType==l})),"bottom"==r.circularLinkType?c.sort(U):c.sort(j),u=0,c.forEach((function(e,n){e.circularLinkID==r.circularLinkID&&(r.circularPathData.rightSmallArcRadius=E+r.width/2+u,r.circularPathData.rightLargeArcRadius=E+r.width/2+n*t+u),u+=e.width})),"bottom"==r.circularLinkType?(r.circularPathData.verticalFullExtent=Math.max(n,r.source.y1,r.target.y1)+k+r.circularPathData.verticalBuffer,r.circularPathData.verticalLeftInnerExtent=r.circularPathData.verticalFullExtent-r.circularPathData.leftLargeArcRadius,r.circularPathData.verticalRightInnerExtent=r.circularPathData.verticalFullExtent-r.circularPathData.rightLargeArcRadius):(r.circularPathData.verticalFullExtent=o-k-r.circularPathData.verticalBuffer,r.circularPathData.verticalLeftInnerExtent=r.circularPathData.verticalFullExtent+r.circularPathData.leftLargeArcRadius,r.circularPathData.verticalRightInnerExtent=r.circularPathData.verticalFullExtent+r.circularPathData.rightLargeArcRadius)}r.circularPathData.leftInnerExtent=r.circularPathData.sourceX+r.circularPathData.leftNodeBuffer,r.circularPathData.rightInnerExtent=r.circularPathData.targetX-r.circularPathData.rightNodeBuffer,r.circularPathData.leftFullExtent=r.circularPathData.sourceX+r.circularPathData.leftLargeArcRadius+r.circularPathData.leftNodeBuffer,r.circularPathData.rightFullExtent=r.circularPathData.targetX-r.circularPathData.rightLargeArcRadius-r.circularPathData.rightNodeBuffer}if(r.circular)r.path=function(e){var t="";t="top"==e.circularLinkType?"M"+e.circularPathData.sourceX+" "+e.circularPathData.sourceY+" L"+e.circularPathData.leftInnerExtent+" "+e.circularPathData.sourceY+" A"+e.circularPathData.leftLargeArcRadius+" "+e.circularPathData.leftSmallArcRadius+" 0 0 0 "+e.circularPathData.leftFullExtent+" "+(e.circularPathData.sourceY-e.circularPathData.leftSmallArcRadius)+" L"+e.circularPathData.leftFullExtent+" "+e.circularPathData.verticalLeftInnerExtent+" A"+e.circularPathData.leftLargeArcRadius+" "+e.circularPathData.leftLargeArcRadius+" 0 0 0 "+e.circularPathData.leftInnerExtent+" "+e.circularPathData.verticalFullExtent+" L"+e.circularPathData.rightInnerExtent+" "+e.circularPathData.verticalFullExtent+" A"+e.circularPathData.rightLargeArcRadius+" "+e.circularPathData.rightLargeArcRadius+" 0 0 0 "+e.circularPathData.rightFullExtent+" "+e.circularPathData.verticalRightInnerExtent+" L"+e.circularPathData.rightFullExtent+" "+(e.circularPathData.targetY-e.circularPathData.rightSmallArcRadius)+" A"+e.circularPathData.rightLargeArcRadius+" "+e.circularPathData.rightSmallArcRadius+" 0 0 0 "+e.circularPathData.rightInnerExtent+" "+e.circularPathData.targetY+" L"+e.circularPathData.targetX+" "+e.circularPathData.targetY:"M"+e.circularPathData.sourceX+" "+e.circularPathData.sourceY+" L"+e.circularPathData.leftInnerExtent+" "+e.circularPathData.sourceY+" A"+e.circularPathData.leftLargeArcRadius+" "+e.circularPathData.leftSmallArcRadius+" 0 0 1 "+e.circularPathData.leftFullExtent+" "+(e.circularPathData.sourceY+e.circularPathData.leftSmallArcRadius)+" L"+e.circularPathData.leftFullExtent+" "+e.circularPathData.verticalLeftInnerExtent+" A"+e.circularPathData.leftLargeArcRadius+" "+e.circularPathData.leftLargeArcRadius+" 0 0 1 "+e.circularPathData.leftInnerExtent+" "+e.circularPathData.verticalFullExtent+" L"+e.circularPathData.rightInnerExtent+" "+e.circularPathData.verticalFullExtent+" A"+e.circularPathData.rightLargeArcRadius+" "+e.circularPathData.rightLargeArcRadius+" 0 0 1 "+e.circularPathData.rightFullExtent+" "+e.circularPathData.verticalRightInnerExtent+" L"+e.circularPathData.rightFullExtent+" "+(e.circularPathData.targetY+e.circularPathData.rightSmallArcRadius)+" A"+e.circularPathData.rightLargeArcRadius+" "+e.circularPathData.rightSmallArcRadius+" 0 0 1 "+e.circularPathData.rightInnerExtent+" "+e.circularPathData.targetY+" L"+e.circularPathData.targetX+" "+e.circularPathData.targetY;return t}(r);else{var d=(0,a.h5)().source((function(e){return[e.source.x0+(e.source.x1-e.source.x0),e.y0]})).target((function(e){return[e.target.x0,e.y1]}));r.path=d(r)}}))}function N(e,t){return V(e)==V(t)?"bottom"==e.circularLinkType?B(e,t):F(e,t):V(t)-V(e)}function F(e,t){return e.y0-t.y0}function B(e,t){return t.y0-e.y0}function j(e,t){return e.y1-t.y1}function U(e,t){return t.y1-e.y1}function V(e){return e.target.column-e.source.column}function H(e){return e.target.x0-e.source.x1}function W(e,t){var n=P(e),r=H(t)/Math.tan(n);return"up"==J(e)?e.y1+r:e.y1-r}function G(e,t){var n=P(e),r=H(t)/Math.tan(n);return"up"==J(e)?e.y1-r:e.y1+r}function q(e,t,n,r){e.links.forEach((function(i){if(!i.circular&&i.target.column-i.source.column>1){var a=i.source.column+1,o=i.target.column-1,s=1,l=o-a+1;for(s=1;a<=o;a++,s++)e.nodes.forEach((function(o){if(o.column==a){var c,u=s/(l+1),d=Math.pow(1-u,3),h=3*u*Math.pow(1-u,2),f=3*Math.pow(u,2)*(1-u),p=Math.pow(u,3),m=d*i.y0+h*i.y0+f*i.y1+p*i.y1,g=m-i.width/2,v=m+i.width/2;g>o.y0&&go.y0&&vo.y1)&&(c=v-o.y0+10,o=$(o,c,t,n),e.nodes.forEach((function(e){T(e,r)!=T(o,r)&&e.column==o.column&&e.y0o.y1&&$(e,c,t,n)})))}}))}}))}function Y(e,t){return e.y0>t.y0&&e.y0t.y0&&e.y1t.y1)}function $(e,t,n,r){return e.y0+t>=n&&e.y1+t<=r&&(e.y0=e.y0+t,e.y1=e.y1+t,e.targetLinks.forEach((function(e){e.y1=e.y1+t})),e.sourceLinks.forEach((function(e){e.y0=e.y0+t}))),e}function X(e,t,n,r){e.nodes.forEach((function(i){r&&i.y+(i.y1-i.y0)>t&&(i.y=i.y-(i.y+(i.y1-i.y0)-t));var a=e.links.filter((function(e){return T(e.source,n)==T(i,n)})),o=a.length;o>1&&a.sort((function(e,t){if(!e.circular&&!t.circular){if(e.target.column==t.target.column)return e.y1-t.y1;if(!K(e,t))return e.y1-t.y1;if(e.target.column>t.target.column){var n=G(t,e);return e.y1-n}if(t.target.column>e.target.column)return G(e,t)-t.y1}return e.circular&&!t.circular?"top"==e.circularLinkType?-1:1:t.circular&&!e.circular?"top"==t.circularLinkType?1:-1:e.circular&&t.circular?e.circularLinkType===t.circularLinkType&&"top"==e.circularLinkType?e.target.column===t.target.column?e.target.y1-t.target.y1:t.target.column-e.target.column:e.circularLinkType===t.circularLinkType&&"bottom"==e.circularLinkType?e.target.column===t.target.column?t.target.y1-e.target.y1:e.target.column-t.target.column:"top"==e.circularLinkType?-1:1:void 0}));var s=i.y0;a.forEach((function(e){e.y0=s+e.width/2,s+=e.width})),a.forEach((function(e,t){if("bottom"==e.circularLinkType){for(var n=t+1,r=0;n1&&r.sort((function(e,t){if(!e.circular&&!t.circular){if(e.source.column==t.source.column)return e.y0-t.y0;if(!K(e,t))return e.y0-t.y0;if(t.source.column0?"up":"down"}function Q(e,t){return T(e.source,t)==T(e.target,t)}},30838:function(e,t,n){"use strict";n.r(t),n.d(t,{sankey:function(){return w},sankeyCenter:function(){return c},sankeyJustify:function(){return l},sankeyLeft:function(){return o},sankeyLinkHorizontal:function(){return T},sankeyRight:function(){return s}});var r=n(33064),i=n(15140);function a(e){return e.target.depth}function o(e){return e.depth}function s(e,t){return t-1-e.height}function l(e,t){return e.sourceLinks.length?e.depth:t-1}function c(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?(0,r.VV)(e.sourceLinks,a)-1:0}function u(e){return function(){return e}}function d(e,t){return f(e.source,t.source)||e.index-t.index}function h(e,t){return f(e.target,t.target)||e.index-t.index}function f(e,t){return e.y0-t.y0}function p(e){return e.value}function m(e){return(e.y0+e.y1)/2}function g(e){return m(e.source)*e.value}function v(e){return m(e.target)*e.value}function y(e){return e.index}function x(e){return e.nodes}function b(e){return e.links}function _(e,t){var n=e.get(t);if(!n)throw new Error("missing: "+t);return n}function w(){var e=0,t=0,n=1,a=1,o=24,s=8,c=y,w=l,A=x,S=b,M=32,T=2/3;function k(){var l={nodes:A.apply(null,arguments),links:S.apply(null,arguments)};return function(e){e.nodes.forEach((function(e,t){e.index=t,e.sourceLinks=[],e.targetLinks=[]}));var t=(0,i.UI)(e.nodes,c);e.links.forEach((function(e,n){e.index=n;var r=e.source,i=e.target;"object"!==typeof r&&(r=e.source=_(t,r)),"object"!==typeof i&&(i=e.target=_(t,i)),r.sourceLinks.push(e),i.targetLinks.push(e)}))}(l),function(e){e.nodes.forEach((function(e){e.value=Math.max((0,r.Sm)(e.sourceLinks,p),(0,r.Sm)(e.targetLinks,p))}))}(l),function(t){var r,i,a;for(r=t.nodes,i=[],a=0;r.length;++a,r=i,i=[])r.forEach((function(e){e.depth=a,e.sourceLinks.forEach((function(e){i.indexOf(e.target)<0&&i.push(e.target)}))}));for(r=t.nodes,i=[],a=0;r.length;++a,r=i,i=[])r.forEach((function(e){e.height=a,e.targetLinks.forEach((function(e){i.indexOf(e.source)<0&&i.push(e.source)}))}));var s=(n-e-o)/(a-1);t.nodes.forEach((function(t){t.x1=(t.x0=e+Math.max(0,Math.min(a-1,Math.floor(w.call(null,t,a))))*s)+o}))}(l),function(e){var n=(0,i.b1)().key((function(e){return e.x0})).sortKeys(r.j2).entries(e.nodes).map((function(e){return e.values}));c(),h();for(var o=1,l=M;l>0;--l)d(o*=.99),h(),u(o),h();function c(){var i=(0,r.Fp)(n,(function(e){return e.length})),o=T*(a-t)/(i-1);s>o&&(s=o);var l=(0,r.VV)(n,(function(e){return(a-t-(e.length-1)*s)/(0,r.Sm)(e,p)}));n.forEach((function(e){e.forEach((function(e,t){e.y1=(e.y0=t)+e.value*l}))})),e.links.forEach((function(e){e.width=e.value*l}))}function u(e){n.forEach((function(t){t.forEach((function(t){if(t.targetLinks.length){var n=((0,r.Sm)(t.targetLinks,g)/(0,r.Sm)(t.targetLinks,p)-m(t))*e;t.y0+=n,t.y1+=n}}))}))}function d(e){n.slice().reverse().forEach((function(t){t.forEach((function(t){if(t.sourceLinks.length){var n=((0,r.Sm)(t.sourceLinks,v)/(0,r.Sm)(t.sourceLinks,p)-m(t))*e;t.y0+=n,t.y1+=n}}))}))}function h(){n.forEach((function(e){var n,r,i,o=t,l=e.length;for(e.sort(f),i=0;i0&&(n.y0+=r,n.y1+=r),o=n.y1+s;if((r=o-s-a)>0)for(o=n.y0-=r,n.y1-=r,i=l-2;i>=0;--i)(r=(n=e[i]).y1+s-o)>0&&(n.y0-=r,n.y1-=r),o=n.y0}))}}(l),E(l),l}function E(e){e.nodes.forEach((function(e){e.sourceLinks.sort(h),e.targetLinks.sort(d)})),e.nodes.forEach((function(e){var t=e.y0,n=t;e.sourceLinks.forEach((function(e){e.y0=t+e.width/2,t+=e.width})),e.targetLinks.forEach((function(e){e.y1=n+e.width/2,n+=e.width}))}))}return k.update=function(e){return E(e),e},k.nodeId=function(e){return arguments.length?(c="function"===typeof e?e:u(e),k):c},k.nodeAlign=function(e){return arguments.length?(w="function"===typeof e?e:u(e),k):w},k.nodeWidth=function(e){return arguments.length?(o=+e,k):o},k.nodePadding=function(e){return arguments.length?(s=+e,k):s},k.nodes=function(e){return arguments.length?(A="function"===typeof e?e:u(e),k):A},k.links=function(e){return arguments.length?(S="function"===typeof e?e:u(e),k):S},k.size=function(r){return arguments.length?(e=t=0,n=+r[0],a=+r[1],k):[n-e,a-t]},k.extent=function(r){return arguments.length?(e=+r[0][0],n=+r[1][0],t=+r[0][1],a=+r[1][1],k):[[e,t],[n,a]]},k.iterations=function(e){return arguments.length?(M=+e,k):M},k}var A=n(45879);function S(e){return[e.source.x1,e.y0]}function M(e){return[e.target.x0,e.y1]}function T(){return(0,A.h5)().source(S).target(M)}},39898:function(e,t,n){var r,i;(function(){var a={version:"3.8.0"},o=[].slice,s=function(e){return o.call(e)},l=self.document;function c(e){return e&&(e.ownerDocument||e.document||e).documentElement}function u(e){return e&&(e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView)}if(l)try{s(l.documentElement.childNodes)[0].nodeType}catch(ma){s=function(e){for(var t=e.length,n=new Array(t);t--;)n[t]=e[t];return n}}if(Date.now||(Date.now=function(){return+new Date}),l)try{l.createElement("DIV").style.setProperty("opacity",0,"")}catch(ga){var d=this.Element.prototype,h=d.setAttribute,f=d.setAttributeNS,p=this.CSSStyleDeclaration.prototype,m=p.setProperty;d.setAttribute=function(e,t){h.call(this,e,t+"")},d.setAttributeNS=function(e,t,n){f.call(this,e,t,n+"")},p.setProperty=function(e,t,n){m.call(this,e,t+"",n)}}function g(e,t){return et?1:e>=t?0:NaN}function v(e){return null===e?NaN:+e}function y(e){return!isNaN(e)}function x(e){return{left:function(t,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);r>>1;e(t[a],n)<0?r=a+1:i=a}return r},right:function(t,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);r>>1;e(t[a],n)>0?i=a:r=a+1}return r}}}a.ascending=g,a.descending=function(e,t){return te?1:t>=e?0:NaN},a.min=function(e,t){var n,r,i=-1,a=e.length;if(1===arguments.length){for(;++i=r){n=r;break}for(;++ir&&(n=r)}else{for(;++i=r){n=r;break}for(;++ir&&(n=r)}return n},a.max=function(e,t){var n,r,i=-1,a=e.length;if(1===arguments.length){for(;++i=r){n=r;break}for(;++in&&(n=r)}else{for(;++i=r){n=r;break}for(;++in&&(n=r)}return n},a.extent=function(e,t){var n,r,i,a=-1,o=e.length;if(1===arguments.length){for(;++a=r){n=i=r;break}for(;++ar&&(n=r),i=r){n=i=r;break}for(;++ar&&(n=r),i1)return o/(l-1)},a.deviation=function(){var e=a.variance.apply(this,arguments);return e?Math.sqrt(e):e};var b=x(g);function _(e){return e.length}a.bisectLeft=b.left,a.bisect=a.bisectRight=b.right,a.bisector=function(e){return x(1===e.length?function(t,n){return g(e(t),n)}:e)},a.shuffle=function(e,t,n){(a=arguments.length)<3&&(n=e.length,a<2&&(t=0));for(var r,i,a=n-t;a;)i=Math.random()*a--|0,r=e[a+t],e[a+t]=e[i+t],e[i+t]=r;return e},a.permute=function(e,t){for(var n=t.length,r=new Array(n);n--;)r[n]=e[t[n]];return r},a.pairs=function(e){for(var t=0,n=e.length-1,r=e[0],i=new Array(n<0?0:n);t=0;)for(t=(r=e[i]).length;--t>=0;)n[--o]=r[t];return n};var w=Math.abs;function A(e,t){for(var n in t)Object.defineProperty(e.prototype,n,{value:t[n],enumerable:!1})}function S(){this._=Object.create(null)}a.range=function(e,t,n){if(arguments.length<3&&(n=1,arguments.length<2&&(t=e,e=0)),(t-e)/n===1/0)throw new Error("infinite range");var r,i=[],a=function(e){var t=1;for(;e*t%1;)t*=10;return t}(w(n)),o=-1;if(e*=a,t*=a,(n*=a)<0)for(;(r=e+n*++o)>t;)i.push(r/a);else for(;(r=e+n*++o)=r.length)return t?t.call(n,a):e?a.sort(e):a;for(var l,c,u,d,h=-1,f=a.length,p=r[s++],m=new S;++h=r.length)return e;var n=[],a=i[t++];return e.forEach((function(e,r){n.push({key:e,values:s(r,t)})})),a?n.sort((function(e,t){return a(e.key,t.key)})):n}return n.map=function(e,t){return o(t,e,0)},n.entries=function(e){return s(o(a.map,e,0),0)},n.key=function(e){return r.push(e),n},n.sortKeys=function(e){return i[r.length-1]=e,n},n.sortValues=function(t){return e=t,n},n.rollup=function(e){return t=e,n},n},a.set=function(e){var t=new P;if(e)for(var n=0,r=e.length;n=0&&(r=e.slice(n+1),e=e.slice(0,n)),e)return arguments.length<2?this[e].on(r):this[e].on(r,t);if(2===arguments.length){if(null==t)for(e in this)this.hasOwnProperty(e)&&this[e].on(r,null);return this}},a.event=null,a.requote=function(e){return e.replace(H,"\\$&")};var H=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,W={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)e[n]=t[n]};function G(e){return W(e,X),e}var q=function(e,t){return t.querySelector(e)},Y=function(e,t){return t.querySelectorAll(e)},$=function(e,t){var n=e.matches||e[I(e,"matchesSelector")];return $=function(e,t){return n.call(e,t)},$(e,t)};"function"===typeof Sizzle&&(q=function(e,t){return Sizzle(e,t)[0]||null},Y=Sizzle,$=Sizzle.matchesSelector),a.selection=function(){return a.select(l.documentElement)};var X=a.selection.prototype=[];function Z(e){return"function"===typeof e?e:function(){return q(e,this)}}function K(e){return"function"===typeof e?e:function(){return Y(e,this)}}X.select=function(e){var t,n,r,i,a=[];e=Z(e);for(var o=-1,s=this.length;++o=0&&"xmlns"!==(n=e.slice(0,t))&&(e=e.slice(t+1)),Q.hasOwnProperty(n)?{space:Q[n],local:e}:e}},X.attr=function(e,t){if(arguments.length<2){if("string"===typeof e){var n=this.node();return(e=a.ns.qualify(e)).local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}for(t in e)this.each(ee(t,e[t]));return this}return this.each(ee(e,t))},X.classed=function(e,t){if(arguments.length<2){if("string"===typeof e){var n=this.node(),r=(e=re(e)).length,i=-1;if(t=n.classList){for(;++i=0;)(n=r[i])&&(a&&a!==n.nextSibling&&a.parentNode.insertBefore(n,a),a=n);return this},X.sort=function(e){e=he.apply(this,arguments);for(var t=-1,n=this.length;++t0&&(e=e.slice(0,i));var l=ve.get(e);function c(){var t=this[r];t&&(this.removeEventListener(e,t,t.$),delete this[r])}return l&&(e=l,o=xe),i?t?function(){var i=o(t,s(arguments));c.call(this),this.addEventListener(e,this[r]=i,i.$=n),i._=t}:c:t?N:function(){var t,n=new RegExp("^__on([^.]+)"+a.requote(e)+"$");for(var r in this)if(t=r.match(n)){var i=this[r];this.removeEventListener(t[1],i,i.$),delete this[r]}}}a.selection.enter=pe,a.selection.enter.prototype=me,me.append=X.append,me.empty=X.empty,me.node=X.node,me.call=X.call,me.size=X.size,me.select=function(e){for(var t,n,r,i,a,o=[],s=-1,l=this.length;++s=t&&(t=i+1);!(o=s[t])&&++t1?Re:e<-1?-Re:Math.asin(e)}function Ie(e){return((e=Math.exp(e))+1/e)/2}var ze=Math.SQRT2;a.interpolateZoom=function(e,t){var n,r,i=e[0],a=e[1],o=e[2],s=t[0],l=t[1],c=t[2],u=s-i,d=l-a,h=u*u+d*d;if(h0&&(e=e.transition().duration(m)),e.call(w.event)}function k(){s&&s.domain(o.range().map((function(e){return(e-h.x)/h.k})).map(o.invert)),d&&d.domain(c.range().map((function(e){return(e-h.y)/h.k})).map(c.invert))}function E(e){g++||e({type:"zoomstart"})}function C(e){k(),e({type:"zoom",scale:h.k,translate:[h.x,h.y]})}function D(e){--g||(e({type:"zoomend"}),t=null)}function R(){var e=this,t=_.of(e,arguments),n=0,r=a.select(u(e)).on(y,(function(){n=1,M(a.mouse(e),i),C(t)})).on(x,(function(){r.on(y,null).on(x,null),o(n),D(t)})),i=A(a.mouse(e)),o=we(e);Zi.call(e),E(t)}function P(){var e,t=this,n=_.of(t,arguments),r={},o=0,s=".zoom-"+a.event.changedTouches[0].identifier,l="touchmove"+s,c="touchend"+s,u=[],d=a.select(t),f=we(t);function p(){var n=a.touches(t);return e=h.k,n.forEach((function(e){e.identifier in r&&(r[e.identifier]=A(e))})),n}function m(){var e=a.event.target;a.select(e).on(l,g).on(c,y),u.push(e);for(var n=a.event.changedTouches,s=0,d=n.length;s1){v=f[0];var x=f[1],b=v[0]-x[0],_=v[1]-x[1];o=b*b+_*_}}function g(){var s,l,c,u,d=a.touches(t);Zi.call(t);for(var h=0,f=d.length;h360?e-=360:e<0&&(e+=360),e<60?r+(i-r)*e/60:e<180?i:e<240?r+(i-r)*(240-e)/60:r}(e))}return e=isNaN(e)?0:(e%=360)<0?e+360:e,t=isNaN(t)||t<0?0:t>1?1:t,r=2*(n=n<0?0:n>1?1:n)-(i=n<=.5?n*(1+t):n+t-n*t),new it(a(e+120),a(e),a(e-120))}function We(e,t,n){return this instanceof We?(this.h=+e,this.c=+t,void(this.l=+n)):arguments.length<2?e instanceof We?new We(e.h,e.c,e.l):et(e instanceof Ye?e.l:(e=dt((e=a.rgb(e)).r,e.g,e.b)).l,e.a,e.b):new We(e,t,n)}Ve.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),new Ue(this.h,this.s,this.l/e)},Ve.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new Ue(this.h,this.s,e*this.l)},Ve.rgb=function(){return He(this.h,this.s,this.l)},a.hcl=We;var Ge=We.prototype=new je;function qe(e,t,n){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),new Ye(n,Math.cos(e*=Pe)*t,Math.sin(e)*t)}function Ye(e,t,n){return this instanceof Ye?(this.l=+e,this.a=+t,void(this.b=+n)):arguments.length<2?e instanceof Ye?new Ye(e.l,e.a,e.b):e instanceof We?qe(e.h,e.c,e.l):dt((e=it(e)).r,e.g,e.b):new Ye(e,t,n)}Ge.brighter=function(e){return new We(this.h,this.c,Math.min(100,this.l+$e*(arguments.length?e:1)))},Ge.darker=function(e){return new We(this.h,this.c,Math.max(0,this.l-$e*(arguments.length?e:1)))},Ge.rgb=function(){return qe(this.h,this.c,this.l).rgb()},a.lab=Ye;var $e=18,Xe=.95047,Ze=1,Ke=1.08883,Je=Ye.prototype=new je;function Qe(e,t,n){var r=(e+16)/116,i=r+t/500,a=r-n/200;return new it(rt(3.2404542*(i=tt(i)*Xe)-1.5371385*(r=tt(r)*Ze)-.4985314*(a=tt(a)*Ke)),rt(-.969266*i+1.8760108*r+.041556*a),rt(.0556434*i-.2040259*r+1.0572252*a))}function et(e,t,n){return e>0?new We(Math.atan2(n,t)*Oe,Math.sqrt(t*t+n*n),e):new We(NaN,NaN,e)}function tt(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function nt(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function rt(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function it(e,t,n){return this instanceof it?(this.r=~~e,this.g=~~t,void(this.b=~~n)):arguments.length<2?e instanceof it?new it(e.r,e.g,e.b):ct(""+e,it,He):new it(e,t,n)}function at(e){return new it(e>>16,e>>8&255,255&e)}function ot(e){return at(e)+""}Je.brighter=function(e){return new Ye(Math.min(100,this.l+$e*(arguments.length?e:1)),this.a,this.b)},Je.darker=function(e){return new Ye(Math.max(0,this.l-$e*(arguments.length?e:1)),this.a,this.b)},Je.rgb=function(){return Qe(this.l,this.a,this.b)},a.rgb=it;var st=it.prototype=new je;function lt(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function ct(e,t,n){var r,i,a,o=0,s=0,l=0;if(r=/([a-z]+)\((.*)\)/.exec(e=e.toLowerCase()))switch(i=r[2].split(","),r[1]){case"hsl":return n(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return t(ft(i[0]),ft(i[1]),ft(i[2]))}return(a=pt.get(e))?t(a.r,a.g,a.b):(null==e||"#"!==e.charAt(0)||isNaN(a=parseInt(e.slice(1),16))||(4===e.length?(o=(3840&a)>>4,o|=o>>4,s=240&a,s|=s>>4,l=15&a,l|=l<<4):7===e.length&&(o=(16711680&a)>>16,s=(65280&a)>>8,l=255&a)),t(o,s,l))}function ut(e,t,n){var r,i,a=Math.min(e/=255,t/=255,n/=255),o=Math.max(e,t,n),s=o-a,l=(o+a)/2;return s?(i=l<.5?s/(o+a):s/(2-o-a),r=e==o?(t-n)/s+(t0&&l<1?0:r),new Ue(r,i,l)}function dt(e,t,n){var r=nt((.4124564*(e=ht(e))+.3575761*(t=ht(t))+.1804375*(n=ht(n)))/Xe),i=nt((.2126729*e+.7151522*t+.072175*n)/Ze);return Ye(116*i-16,500*(r-i),200*(i-nt((.0193339*e+.119192*t+.9503041*n)/Ke)))}function ht(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function ft(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}st.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,n=this.g,r=this.b,i=30;return t||n||r?(t&&t=200&&t<300||304===t){try{e=n.call(i,c)}catch(ma){return void o.error.call(i,ma)}o.load.call(i,e)}else o.error.call(i,c)}return self.XDomainRequest&&!("withCredentials"in c)&&/^(http(s)?:)?\/\//.test(e)&&(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=d:c.onreadystatechange=function(){c.readyState>3&&d()},c.onprogress=function(e){var t=a.event;a.event=e;try{o.progress.call(i,c)}finally{a.event=t}},i.header=function(e,t){return e=(e+"").toLowerCase(),arguments.length<2?l[e]:(null==t?delete l[e]:l[e]=t+"",i)},i.mimeType=function(e){return arguments.length?(t=null==e?null:e+"",i):t},i.responseType=function(e){return arguments.length?(u=e,i):u},i.response=function(e){return n=e,i},["get","post"].forEach((function(e){i[e]=function(){return i.send.apply(i,[e].concat(s(arguments)))}})),i.send=function(n,r,a){if(2===arguments.length&&"function"===typeof r&&(a=r,r=null),c.open(n,e,!0),null==t||"accept"in l||(l.accept=t+",*/*"),c.setRequestHeader)for(var s in l)c.setRequestHeader(s,l[s]);return null!=t&&c.overrideMimeType&&c.overrideMimeType(t),null!=u&&(c.responseType=u),null!=a&&i.on("error",a).on("load",(function(e){a(null,e)})),o.beforesend.call(i,c),c.send(null==r?null:r),i},i.abort=function(){return c.abort(),i},a.rebind(i,o,"on"),null==r?i:i.get(function(e){return 1===e.length?function(t,n){e(null==t?n:null)}:e}(r))}pt.forEach((function(e,t){pt.set(e,at(t))})),a.functor=mt,a.xhr=gt(O),a.dsv=function(e,t){var n=new RegExp('["'+e+"\n]"),r=e.charCodeAt(0);function i(e,n,r){arguments.length<3&&(r=n,n=null);var i=vt(e,t,null==n?a:o(n),r);return i.row=function(e){return arguments.length?i.response(null==(n=e)?a:o(e)):n},i}function a(e){return i.parse(e.responseText)}function o(e){return function(t){return i.parse(t.responseText,e)}}function s(t){return t.map(l).join(e)}function l(e){return n.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}return i.parse=function(e,t){var n;return i.parseRows(e,(function(e,r){if(n)return n(e,r-1);var i=function(t){for(var n={},r=e.length,i=0;i=l)return o;if(i)return i=!1,a;var t=c;if(34===e.charCodeAt(t)){for(var n=t;n++24?(isFinite(t)&&(clearTimeout(_t),_t=setTimeout(St,t)),bt=0):(bt=1,wt(St))}function Mt(){for(var e=Date.now(),t=yt;t;)e>=t.t&&t.c(e-t.t)&&(t.c=null),t=t.n;return e}function Tt(){for(var e,t=yt,n=1/0;t;)t.c?(t.t1&&(t=e[a[o-2]],n=e[a[o-1]],r=e[s],(n[0]-t[0])*(r[1]-t[1])-(n[1]-t[1])*(r[0]-t[0])<=0);)--o;a[o++]=s}return a.slice(0,o)}function Dt(e,t){return e[0]-t[0]||e[1]-t[1]}a.timer=function(){At.apply(this,arguments)},a.timer.flush=function(){Mt(),Tt()},a.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},a.geom={},a.geom.hull=function(e){var t=kt,n=Et;if(arguments.length)return r(e);function r(e){if(e.length<3)return[];var r,i=mt(t),a=mt(n),o=e.length,s=[],l=[];for(r=0;r=0;--r)f.push(e[s[c[r]][2]]);for(r=+d;rTe)s=s.L;else{if(!((i=a-$t(s,o))>Te)){r>-Te?(t=s.P,n=s):i>-Te?(t=s,n=s.N):t=n=s;break}if(!s.R){t=s;break}s=s.R}var l=Ht(e);if(Nt.insert(t,l),t||n){if(t===n)return Qt(t),n=Ht(t.site),Nt.insert(l,n),l.edge=n.edge=nn(t.site,l.site),Jt(t),void Jt(n);if(n){Qt(t),Qt(n);var c=t.site,u=c.x,d=c.y,h=e.x-u,f=e.y-d,p=n.site,m=p.x-u,g=p.y-d,v=2*(h*g-f*m),y=h*h+f*f,x=m*m+g*g,b={x:(g*y-f*x)/v+u,y:(h*x-m*y)/v+d};an(n.edge,c,p,b),l.edge=nn(c,e,null,b),n.edge=nn(e,p,null,b),Jt(t),Jt(n)}else l.edge=nn(t.site,l.site)}}function Yt(e,t){var n=e.site,r=n.x,i=n.y,a=i-t;if(!a)return r;var o=e.P;if(!o)return-1/0;var s=(n=o.site).x,l=n.y,c=l-t;if(!c)return s;var u=s-r,d=1/a-1/c,h=u/c;return d?(-h+Math.sqrt(h*h-2*d*(u*u/(-2*c)-l+c/2+i-a/2)))/d+r:(r+s)/2}function $t(e,t){var n=e.N;if(n)return Yt(n,t);var r=e.site;return r.y===t?r.x:1/0}function Xt(e){this.site=e,this.edges=[]}function Zt(e,t){return t.angle-e.angle}function Kt(){ln(this),this.x=this.y=this.arc=this.site=this.cy=null}function Jt(e){var t=e.P,n=e.N;if(t&&n){var r=t.site,i=e.site,a=n.site;if(r!==a){var o=i.x,s=i.y,l=r.x-o,c=r.y-s,u=a.x-o,d=2*(l*(g=a.y-s)-c*u);if(!(d>=-ke)){var h=l*l+c*c,f=u*u+g*g,p=(g*h-c*f)/d,m=(l*f-u*h)/d,g=m+s,v=Ut.pop()||new Kt;v.arc=e,v.site=i,v.x=p+o,v.y=g+Math.sqrt(p*p+m*m),v.cy=g,e.circle=v;for(var y=null,x=Bt._;x;)if(v.y=s)return;if(h>p){if(a){if(a.y>=c)return}else a={x:g,y:l};n={x:g,y:c}}else{if(a){if(a.y1)if(h>p){if(a){if(a.y>=c)return}else a={x:(l-i)/r,y:l};n={x:(c-i)/r,y:c}}else{if(a){if(a.y=s)return}else a={x:o,y:r*o+i};n={x:s,y:r*s+i}}else{if(a){if(a.x0)){if(t/=h,h<0){if(t0){if(t>d)return;t>u&&(u=t)}if(t=i-l,h||!(t<0)){if(t/=h,h<0){if(t>d)return;t>u&&(u=t)}else if(h>0){if(t0)){if(t/=f,f<0){if(t0){if(t>d)return;t>u&&(u=t)}if(t=a-c,f||!(t<0)){if(t/=f,f<0){if(t>d)return;t>u&&(u=t)}else if(f>0){if(t0&&(e.a={x:l+u*h,y:c+u*f}),d<1&&(e.b={x:l+d*h,y:c+d*f}),e}}}}}),l=o.length;l--;)(!en(t=o[l],e)||!s(t)||w(t.a.x-t.b.x)Te||w(i-n)>Te)&&(s.splice(o,0,new on(rn(a.site,u,w(r-d)Te?{x:d,y:w(t-d)Te?{x:w(n-p)Te?{x:h,y:w(t-h)Te?{x:w(n-f)=n&&c.x<=i&&c.y>=r&&c.y<=o?[[n,o],[i,o],[i,r],[n,r]]:[]).point=e[s]})),t}function s(e){return e.map((function(e,t){return{x:Math.round(r(e,t)/Te)*Te,y:Math.round(i(e,t)/Te)*Te,i:t}}))}return o.links=function(e){return hn(s(e)).edges.filter((function(e){return e.l&&e.r})).map((function(t){return{source:e[t.l.i],target:e[t.r.i]}}))},o.triangles=function(e){var t=[];return hn(s(e)).cells.forEach((function(n,r){for(var i,a,o,s,l=n.site,c=n.edges.sort(Zt),u=-1,d=c.length,h=c[d-1].edge,f=h.l===l?h.r:h.l;++ua&&(i=t.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,l.push({i:o,x:bn(n,r)})),a=An.lastIndex;return am&&(m=l.x),l.y>g&&(g=l.y),c.push(l.x),u.push(l.y);else for(d=0;dm&&(m=x),b>g&&(g=b),c.push(x),u.push(b)}var _=m-f,A=g-p;function S(e,t,n,r,i,a,o,s){if(!isNaN(n)&&!isNaN(r))if(e.leaf){var l=e.x,c=e.y;if(null!=l)if(w(l-n)+w(c-r)<.01)M(e,t,n,r,i,a,o,s);else{var u=e.point;e.x=e.y=e.point=null,M(e,u,l,c,i,a,o,s),M(e,t,n,r,i,a,o,s)}else e.x=n,e.y=r,e.point=t}else M(e,t,n,r,i,a,o,s)}function M(e,t,n,r,i,a,o,s){var l=.5*(i+o),c=.5*(a+s),u=n>=l,d=r>=c,h=d<<1|u;e.leaf=!1,u?i=l:o=l,d?a=c:s=c,S(e=e.nodes[h]||(e.nodes[h]={leaf:!0,nodes:[],point:null,x:null,y:null}),t,n,r,i,a,o,s)}_>A?g=p+_:m=f+A;var T={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(e){S(T,e,+v(e,++d),+y(e,d),f,p,m,g)}};if(T.visit=function(e){vn(e,T,f,p,m,g)},T.find=function(e){return function(e,t,n,r,i,a,o){var s,l=1/0;return function e(c,u,d,h,f){if(!(u>a||d>o||h=_)<<1|t>=b,A=w+4;w=0&&!(n=a.interpolators[r](e,t)););return n}function Mn(e,t){var n,r=[],i=[],a=e.length,o=t.length,s=Math.min(e.length,t.length);for(n=0;n=1)return 1;var t=e*e,n=t*e;return 4*(e<.5?n:3*(e-t)+n-.75)}function Ln(e){return 1-Math.cos(e*Re)}function In(e){return Math.pow(2,10*(e-1))}function zn(e){return 1-Math.sqrt(1-e*e)}function Nn(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function Fn(e,t){return t-=e,function(n){return Math.round(e+t*n)}}function Bn(e){var t,n,r,i=[e.a,e.b],a=[e.c,e.d],o=Un(i),s=jn(i,a),l=Un(((t=a)[0]+=(r=-s)*(n=i)[0],t[1]+=r*n[1],t))||0;i[0]*a[1]=0?e.slice(0,n):e,i=n>=0?e.slice(n+1):"in";return r=kn.get(r)||Tn,i=En.get(i)||O,t=i(r.apply(null,o.call(arguments,1))),function(e){return e<=0?0:e>=1?1:t(e)}},a.interpolateHcl=function(e,t){e=a.hcl(e),t=a.hcl(t);var n=e.h,r=e.c,i=e.l,o=t.h-n,s=t.c-r,l=t.l-i;isNaN(s)&&(s=0,r=isNaN(r)?t.c:r);isNaN(o)?(o=0,n=isNaN(n)?t.h:n):o>180?o-=360:o<-180&&(o+=360);return function(e){return qe(n+o*e,r+s*e,i+l*e)+""}},a.interpolateHsl=function(e,t){e=a.hsl(e),t=a.hsl(t);var n=e.h,r=e.s,i=e.l,o=t.h-n,s=t.s-r,l=t.l-i;isNaN(s)&&(s=0,r=isNaN(r)?t.s:r);isNaN(o)?(o=0,n=isNaN(n)?t.h:n):o>180?o-=360:o<-180&&(o+=360);return function(e){return He(n+o*e,r+s*e,i+l*e)+""}},a.interpolateLab=function(e,t){e=a.lab(e),t=a.lab(t);var n=e.l,r=e.a,i=e.b,o=t.l-n,s=t.a-r,l=t.b-i;return function(e){return Qe(n+o*e,r+s*e,i+l*e)+""}},a.interpolateRound=Fn,a.transform=function(e){var t=l.createElementNS(a.ns.prefix.svg,"g");return(a.transform=function(e){if(null!=e){t.setAttribute("transform",e);var n=t.transform.baseVal.consolidate()}return new Bn(n?n.matrix:Vn)})(e)},Bn.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var Vn={a:1,b:0,c:0,d:1,e:0,f:0};function Hn(e){return e.length?e.pop()+",":""}function Wn(e,t){var n=[],r=[];return e=a.transform(e),t=a.transform(t),function(e,t,n,r){if(e[0]!==t[0]||e[1]!==t[1]){var i=n.push("translate(",null,",",null,")");r.push({i:i-4,x:bn(e[0],t[0])},{i:i-2,x:bn(e[1],t[1])})}else(t[0]||t[1])&&n.push("translate("+t+")")}(e.translate,t.translate,n,r),function(e,t,n,r){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),r.push({i:n.push(Hn(n)+"rotate(",null,")")-2,x:bn(e,t)})):t&&n.push(Hn(n)+"rotate("+t+")")}(e.rotate,t.rotate,n,r),function(e,t,n,r){e!==t?r.push({i:n.push(Hn(n)+"skewX(",null,")")-2,x:bn(e,t)}):t&&n.push(Hn(n)+"skewX("+t+")")}(e.skew,t.skew,n,r),function(e,t,n,r){if(e[0]!==t[0]||e[1]!==t[1]){var i=n.push(Hn(n)+"scale(",null,",",null,")");r.push({i:i-4,x:bn(e[0],t[0])},{i:i-2,x:bn(e[1],t[1])})}else 1===t[0]&&1===t[1]||n.push(Hn(n)+"scale("+t+")")}(e.scale,t.scale,n,r),e=t=null,function(e){for(var t,i=-1,a=r.length;++i0?n=t:(e.c=null,e.t=NaN,e=null,l.end({type:"end",alpha:n=0})):t>0&&(l.start({type:"start",alpha:n=t}),e=At(s.tick)),s):n},s.start=function(){var e,t,n,a=v.length,l=y.length,u=c[0],p=c[1];for(e=0;e=0;)n.push(i[r])}function ar(e,t){for(var n=[e],r=[];null!=(e=n.pop());)if(r.push(e),(a=e.children)&&(i=a.length))for(var i,a,o=-1;++o=0;)o.push(u=c[l]),u.parent=a,u.depth=a.depth+1;n&&(a.value=0),a.children=c}else n&&(a.value=+n.call(r,a,a.depth)||0),delete a.children;return ar(i,(function(t){var r,i;e&&(r=t.children)&&r.sort(e),n&&(i=t.parent)&&(i.value+=t.value)})),s}return r.sort=function(t){return arguments.length?(e=t,r):e},r.children=function(e){return arguments.length?(t=e,r):t},r.value=function(e){return arguments.length?(n=e,r):n},r.revalue=function(e){return n&&(ir(e,(function(e){e.children&&(e.value=0)})),ar(e,(function(e){var t;e.children||(e.value=+n.call(r,e,e.depth)||0),(t=e.parent)&&(t.value+=e.value)}))),e},r},a.layout.partition=function(){var e=a.layout.hierarchy(),t=[1,1];function n(e,t,r,i){var a=e.children;if(e.x=t,e.y=e.depth*i,e.dx=r,e.dy=i,a&&(o=a.length)){var o,s,l,c=-1;for(r=e.value?r/e.value:0;++cs&&(s=r),o.push(r)}for(n=0;ni&&(r=n,i=t);return r}function xr(e){return e.reduce(br,0)}function br(e,t){return e+t[1]}function _r(e,t){return wr(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function wr(e,t){for(var n=-1,r=+e[0],i=(e[1]-r)/t,a=[];++n<=t;)a[n]=i*n+r;return a}function Ar(e){return[a.min(e),a.max(e)]}function Sr(e,t){return e.value-t.value}function Mr(e,t){var n=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=n,n._pack_prev=t}function Tr(e,t){e._pack_next=t,t._pack_prev=e}function kr(e,t){var n=t.x-e.x,r=t.y-e.y,i=e.r+t.r;return.999*i*i>n*n+r*r}function Er(e){if((t=e.children)&&(l=t.length)){var t,n,r,i,a,o,s,l,c=1/0,u=-1/0,d=1/0,h=-1/0;if(t.forEach(Cr),(n=t[0]).x=-n.r,n.y=0,x(n),l>1&&((r=t[1]).x=r.r,r.y=0,x(r),l>2))for(Pr(n,r,i=t[2]),x(i),Mr(n,i),n._pack_prev=i,Mr(i,r),r=n._pack_next,a=3;a0)for(o=-1;++o=d[0]&&l<=d[1]&&((s=c[a.bisect(h,l,1,p)-1]).y+=m,s.push(i[o]));return c}return i.value=function(e){return arguments.length?(t=e,i):t},i.range=function(e){return arguments.length?(n=mt(e),i):n},i.bins=function(e){return arguments.length?(r="number"===typeof e?function(t){return wr(t,e)}:mt(e),i):r},i.frequency=function(t){return arguments.length?(e=!!t,i):e},i},a.layout.pack=function(){var e,t=a.layout.hierarchy().sort(Sr),n=0,r=[1,1];function i(i,a){var o=t.call(this,i,a),s=o[0],l=r[0],c=r[1],u=null==e?Math.sqrt:"function"===typeof e?e:function(){return e};if(s.x=s.y=0,ar(s,(function(e){e.r=+u(e.value)})),ar(s,Er),n){var d=n*(e?1:Math.max(2*s.r/l,2*s.r/c))/2;ar(s,(function(e){e.r+=d})),ar(s,Er),ar(s,(function(e){e.r-=d}))}return Rr(s,l/2,c/2,e?1:1/Math.max(2*s.r/l,2*s.r/c)),o}return i.size=function(e){return arguments.length?(r=e,i):r},i.radius=function(t){return arguments.length?(e=null==t||"function"===typeof t?t:+t,i):e},i.padding=function(e){return arguments.length?(n=+e,i):n},rr(i,t)},a.layout.tree=function(){var e=a.layout.hierarchy().sort(null).value(null),t=Or,n=[1,1],r=null;function i(i,a){var c=e.call(this,i,a),u=c[0],d=function(e){var t,n={A:null,children:[e]},r=[n];for(;null!=(t=r.pop());)for(var i,a=t.children,o=0,s=a.length;of.x&&(f=e),e.depth>p.depth&&(p=e)}));var m=t(h,f)/2-h.x,g=n[0]/(f.x+t(f,h)/2+m),v=n[1]/(p.depth||1);ir(u,(function(e){e.x=(e.x+m)*g,e.y=e.depth*v}))}return c}function o(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n.length){!function(e){var t,n=0,r=0,i=e.children,a=i.length;for(;--a>=0;)(t=i[a]).z+=n,t.m+=n,n+=t.s+(r+=t.c)}(e);var a=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-a):e.z=a}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,a=e,o=e,s=n,l=a.parent.children[0],c=a.m,u=o.m,d=s.m,h=l.m;s=Ir(s),a=Lr(a),s&&a;)l=Lr(l),(o=Ir(o)).a=e,(i=s.z+d-a.z-c+t(s._,a._))>0&&(zr(Nr(s,e,r),e,i),c+=i,u+=i),d+=s.m,c+=a.m,h+=l.m,u+=o.m;s&&!Ir(o)&&(o.t=s,o.m+=d-u),a&&!Lr(l)&&(l.t=a,l.m+=c-h,r=e)}return r}(e,i,e.parent.A||r[0])}function s(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function l(e){e.x*=n[0],e.y=e.depth*n[1]}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(e){return arguments.length?(r=null==(n=e)?l:null,i):r?null:n},i.nodeSize=function(e){return arguments.length?(r=null==(n=e)?null:l,i):r?n:null},rr(i,e)},a.layout.cluster=function(){var e=a.layout.hierarchy().sort(null).value(null),t=Or,n=[1,1],r=!1;function i(i,o){var s,l=e.call(this,i,o),c=l[0],u=0;ar(c,(function(e){var n=e.children;n&&n.length?(e.x=function(e){return e.reduce((function(e,t){return e+t.x}),0)/e.length}(n),e.y=function(e){return 1+a.max(e,(function(e){return e.y}))}(n)):(e.x=s?u+=t(e,s):0,e.y=0,s=e)}));var d=Fr(c),h=Br(c),f=d.x-t(d,h)/2,p=h.x+t(h,d)/2;return ar(c,r?function(e){e.x=(e.x-c.x)*n[0],e.y=(c.y-e.y)*n[1]}:function(e){e.x=(e.x-f)/(p-f)*n[0],e.y=(1-(c.y?e.y/c.y:1))*n[1]}),l}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(e){return arguments.length?(r=null==(n=e),i):r?null:n},i.nodeSize=function(e){return arguments.length?(r=null!=(n=e),i):r?n:null},rr(i,e)},a.layout.treemap=function(){var e,t=a.layout.hierarchy(),n=Math.round,r=[1,1],i=null,o=jr,s=!1,l="squarify",c=.5*(1+Math.sqrt(5));function u(e,t){for(var n,r,i=-1,a=e.length;++i0;)s.push(n=c[i-1]),s.area+=n.area,"squarify"!==l||(r=f(s,m))<=h?(c.pop(),h=r):(s.area-=s.pop().area,p(s,m,a,!1),m=Math.min(a.dx,a.dy),s.length=s.area=0,h=1/0);s.length&&(p(s,m,a,!0),s.length=s.area=0),t.forEach(d)}}function h(e){var t=e.children;if(t&&t.length){var n,r=o(e),i=t.slice(),a=[];for(u(i,r.dx*r.dy/e.value),a.area=0;n=i.pop();)a.push(n),a.area+=n.area,null!=n.z&&(p(a,n.z?r.dx:r.dy,r,!i.length),a.length=a.area=0);t.forEach(h)}}function f(e,t){for(var n,r=e.area,i=0,a=1/0,o=-1,s=e.length;++oi&&(i=n));return t*=t,(r*=r)?Math.max(t*i*c/r,r/(t*a*c)):1/0}function p(e,t,r,i){var a,o=-1,s=e.length,l=r.x,c=r.y,u=t?n(e.area/t):0;if(t==r.dx){for((i||u>r.dy)&&(u=r.dy);++or.dx)&&(u=r.dx);++o1);return e+t*n*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var e=a.random.normal.apply(a,arguments);return function(){return Math.exp(e())}},bates:function(e){var t=a.random.irwinHall(e);return function(){return t()/e}},irwinHall:function(e){return function(){for(var t=0,n=0;n2?$r:Wr,l=r?qn:Gn;return i=o(e,t,l,n),a=o(t,e,l,Sn),s}function s(e){return i(e)}return s.invert=function(e){return a(e)},s.domain=function(t){return arguments.length?(e=t.map(Number),o()):e},s.range=function(e){return arguments.length?(t=e,o()):t},s.rangeRound=function(e){return s.range(e).interpolate(Fn)},s.clamp=function(e){return arguments.length?(r=e,o()):r},s.interpolate=function(e){return arguments.length?(n=e,o()):n},s.ticks=function(t){return Qr(e,t)},s.tickFormat=function(t,n){return d3_scale_linearTickFormat(e,t,n)},s.nice=function(t){return Kr(e,t),o()},s.copy=function(){return Xr(e,t,n,r)},o()}function Zr(e,t){return a.rebind(e,t,"range","rangeRound","interpolate","clamp")}function Kr(e,t){return Gr(e,qr(Jr(e,t)[2])),Gr(e,qr(Jr(e,t)[2])),e}function Jr(e,t){null==t&&(t=10);var n=Vr(e),r=n[1]-n[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),a=t/r*i;return a<=.15?i*=10:a<=.35?i*=5:a<=.75&&(i*=2),n[0]=Math.ceil(n[0]/i)*i,n[1]=Math.floor(n[1]/i)*i+.5*i,n[2]=i,n}function Qr(e,t){return a.range.apply(a,Jr(e,t))}a.scale.linear=function(){return Xr([0,1],[0,1],Sn,!1)};function ei(e,t,n,r){function i(e){return(n?Math.log(e<0?0:e):-Math.log(e>0?0:-e))/Math.log(t)}function a(e){return n?Math.pow(t,e):-Math.pow(t,-e)}function o(t){return e(i(t))}return o.invert=function(t){return a(e.invert(t))},o.domain=function(t){return arguments.length?(n=t[0]>=0,e.domain((r=t.map(Number)).map(i)),o):r},o.base=function(n){return arguments.length?(t=+n,e.domain(r.map(i)),o):t},o.nice=function(){var t=Gr(r.map(i),n?Math:ti);return e.domain(t),r=t.map(a),o},o.ticks=function(){var e=Vr(r),o=[],s=e[0],l=e[1],c=Math.floor(i(s)),u=Math.ceil(i(l)),d=t%1?2:t;if(isFinite(u-c)){if(n){for(;c0;h--)o.push(a(c)*h);for(c=0;o[c]l;u--);o=o.slice(c,u)}return o},o.copy=function(){return ei(e.copy(),t,n,r)},Zr(o,e)}a.scale.log=function(){return ei(a.scale.linear().domain([0,1]),10,!0,[1,10])};var ti={floor:function(e){return-Math.ceil(-e)},ceil:function(e){return-Math.floor(-e)}};function ni(e,t,n){var r=ri(t),i=ri(1/t);function a(t){return e(r(t))}return a.invert=function(t){return i(e.invert(t))},a.domain=function(t){return arguments.length?(e.domain((n=t.map(Number)).map(r)),a):n},a.ticks=function(e){return Qr(n,e)},a.tickFormat=function(e,t){return d3_scale_linearTickFormat(n,e,t)},a.nice=function(e){return a.domain(Kr(n,e))},a.exponent=function(o){return arguments.length?(r=ri(t=o),i=ri(1/t),e.domain(n.map(r)),a):t},a.copy=function(){return ni(e.copy(),t,n)},Zr(a,e)}function ri(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function ii(e,t){var n,r,i;function o(i){return r[((n.get(i)||("range"===t.t?n.set(i,e.push(i)):NaN))-1)%r.length]}function s(t,n){return a.range(e.length).map((function(e){return t+n*e}))}return o.domain=function(r){if(!arguments.length)return e;e=[],n=new S;for(var i,a=-1,s=r.length;++a0?n[r-1]:e[0],rd?0:1;if(c=De)return l(c,f)+(s?l(s,1-f):"")+"Z";var p,m,g,v,y,x,b,_,w,A,S,M,T=0,k=0,E=[];if((v=(+o.apply(this,arguments)||0)/2)&&(g=r===pi?Math.sqrt(s*s+c*c):+r.apply(this,arguments),f||(k*=-1),c&&(k=Le(g/c*Math.sin(v))),s&&(T=Le(g/s*Math.sin(v)))),c){y=c*Math.cos(u+k),x=c*Math.sin(u+k),b=c*Math.cos(d-k),_=c*Math.sin(d-k);var C=Math.abs(d-u-2*k)<=Ee?0:1;if(k&&bi(y,x,b,_)===f^C){var D=(u+d)/2;y=c*Math.cos(D),x=c*Math.sin(D),b=_=null}}else y=x=0;if(s){w=s*Math.cos(d-T),A=s*Math.sin(d-T),S=s*Math.cos(u+T),M=s*Math.sin(u+T);var R=Math.abs(u-d+2*T)<=Ee?0:1;if(T&&bi(w,A,S,M)===1-f^R){var P=(u+d)/2;w=s*Math.cos(P),A=s*Math.sin(P),S=M=null}}else w=A=0;if(h>Te&&(p=Math.min(Math.abs(c-s)/2,+n.apply(this,arguments)))>.001){m=s0?0:1}function _i(e,t,n,r,i){var a=e[0]-t[0],o=e[1]-t[1],s=(i?r:-r)/Math.sqrt(a*a+o*o),l=s*o,c=-s*a,u=e[0]+l,d=e[1]+c,h=t[0]+l,f=t[1]+c,p=(u+h)/2,m=(d+f)/2,g=h-u,v=f-d,y=g*g+v*v,x=n-r,b=u*f-h*d,_=(v<0?-1:1)*Math.sqrt(Math.max(0,x*x*y-b*b)),w=(b*v-g*_)/y,A=(-b*g-v*_)/y,S=(b*v+g*_)/y,M=(-b*g+v*_)/y,T=w-p,k=A-m,E=S-p,C=M-m;return T*T+k*k>E*E+C*C&&(w=S,A=M),[[w-l,A-c],[w*n/x,A*n/x]]}function wi(){return!0}function Ai(e){var t=kt,n=Et,r=wi,i=Mi,a=i.key,o=.7;function s(a){var s,l=[],c=[],u=-1,d=a.length,h=mt(t),f=mt(n);function p(){l.push("M",i(e(c),o))}for(;++u1&&i.push("H",r[0]);return i.join("")},"step-before":ki,"step-after":Ei,basis:Ri,"basis-open":function(e){if(e.length<4)return Mi(e);var t,n=[],r=-1,i=e.length,a=[0],o=[0];for(;++r<3;)t=e[r],a.push(t[0]),o.push(t[1]);n.push(Pi(Ii,a)+","+Pi(Ii,o)),--r;for(;++r9&&(i=3*t/Math.sqrt(i),o[s]=i*n,o[s+1]=i*r);s=-1;for(;++s<=l;)i=(e[Math.min(l,s+1)][0]-e[Math.max(0,s-1)][0])/(6*(1+o[s]*o[s])),a.push([i||0,o[s]*i||0]);return a}(e))}});function Mi(e){return e.length>1?e.join("L"):e+"Z"}function Ti(e){return e.join("L")+"Z"}function ki(e){for(var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];++t1){s=t[1],a=e[l],l++,r+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(a[0]-s[0])+","+(a[1]-s[1])+","+a[0]+","+a[1];for(var c=2;cEe)+",1 "+t}function l(e,t,n,r){return"Q 0,0 "+r}return a.radius=function(e){return arguments.length?(n=mt(e),a):n},a.source=function(t){return arguments.length?(e=mt(t),a):e},a.target=function(e){return arguments.length?(t=mt(e),a):t},a.startAngle=function(e){return arguments.length?(r=mt(e),a):r},a.endAngle=function(e){return arguments.length?(i=mt(e),a):i},a},a.svg.diagonal=function(){var e=ji,t=Ui,n=Hi;function r(r,i){var a=e.call(this,r,i),o=t.call(this,r,i),s=(a.y+o.y)/2,l=[a,{x:a.x,y:s},{x:o.x,y:s},o];return"M"+(l=l.map(n))[0]+"C"+l[1]+" "+l[2]+" "+l[3]}return r.source=function(t){return arguments.length?(e=mt(t),r):e},r.target=function(e){return arguments.length?(t=mt(e),r):t},r.projection=function(e){return arguments.length?(n=e,r):n},r},a.svg.diagonal.radial=function(){var e=a.svg.diagonal(),t=Hi,n=e.projection;return e.projection=function(e){return arguments.length?n(function(e){return function(){var t=e.apply(this,arguments),n=t[0],r=t[1]-Re;return[n*Math.cos(r),n*Math.sin(r)]}}(t=e)):t},e},a.svg.symbol=function(){var e=Gi,t=Wi;function n(n,r){return(Yi.get(e.call(this,n,r))||qi)(t.call(this,n,r))}return n.type=function(t){return arguments.length?(e=mt(t),n):e},n.size=function(e){return arguments.length?(t=mt(e),n):t},n};var Yi=a.map({circle:qi,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*Xi)),n=t*Xi;return"M0,"+-t+"L"+n+",0 0,"+t+" "+-n+",0Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/$i),n=t*$i/2;return"M0,"+n+"L"+t+","+-n+" "+-t+","+-n+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/$i),n=t*$i/2;return"M0,"+-n+"L"+t+","+n+" "+-t+","+n+"Z"}});a.svg.symbolTypes=Yi.keys();var $i=Math.sqrt(3),Xi=Math.tan(30*Pe);X.transition=function(e){for(var t,n,r=Qi||++na,i=aa(e),a=[],o=ea||{time:Date.now(),ease:On,delay:0,duration:250},s=-1,l=this.length;++s0;)c[--h].call(e,o);if(a>=1)return d.event&&d.event.end.call(e,e.__data__,t),--u.count?delete u[r]:delete e[n],1}d||(a=i.time,o=At((function(e){var t=d.delay;if(o.t=t+a,t<=e)return h(e-t);o.c=h}),0,a),d=u[r]={tween:new S,time:a,timer:o,delay:i.delay,duration:i.duration,ease:i.ease,index:t},i=null,++u.count)}ta.call=X.call,ta.empty=X.empty,ta.node=X.node,ta.size=X.size,a.transition=function(e,t){return e&&e.transition?Qi?e.transition(t):e:a.selection().transition(e)},a.transition.prototype=ta,ta.select=function(e){var t,n,r,i=this.id,a=this.namespace,o=[];e=Z(e);for(var s=-1,l=this.length;++srect,.s>rect").attr("width",o[1]-o[0])}function m(e){e.select(".extent").attr("y",s[0]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",s[1]-s[0])}function g(){var d,g,v=this,y=a.select(a.event.target),x=n.of(v,arguments),b=a.select(v),_=y.datum(),w=!/^(n|s)$/.test(_)&&r,A=!/^(e|w)$/.test(_)&&i,S=y.classed("extent"),M=we(v),T=a.mouse(v),k=a.select(u(v)).on("keydown.brush",(function(){32==a.event.keyCode&&(S||(d=null,T[0]-=o[1],T[1]-=s[1],S=2),j())})).on("keyup.brush",(function(){32==a.event.keyCode&&2==S&&(T[0]+=o[1],T[1]+=s[1],S=0,j())}));if(a.event.changedTouches?k.on("touchmove.brush",D).on("touchend.brush",P):k.on("mousemove.brush",D).on("mouseup.brush",P),b.interrupt().selectAll("*").interrupt(),S)T[0]=o[0]-T[0],T[1]=s[0]-T[1];else if(_){var E=+/w$/.test(_),C=+/^n/.test(_);g=[o[1-E]-T[0],s[1-C]-T[1]],T[0]=o[E],T[1]=s[C]}else a.event.altKey&&(d=T.slice());function D(){var e=a.mouse(v),t=!1;g&&(e[0]+=g[0],e[1]+=g[1]),S||(a.event.altKey?(d||(d=[(o[0]+o[1])/2,(s[0]+s[1])/2]),T[0]=o[+(e[0]>>1;t.dtype||(t.dtype="array"),"string"===typeof t.dtype?p=new(d(t.dtype))(g):t.dtype&&(p=t.dtype,Array.isArray(p)&&(p.length=g));for(var v=0;vn||s>1073741824){for(var h=0;ht+r||M>n+r||T=C)&&a!==o)){var s=y[i];void 0===o&&(o=s.length);for(var l=a;l=m&&u<=v&&d>=g&&d<=w&&R.push(c)}var h=x[i],f=h[4*a+0],p=h[4*a+1],b=h[4*a+2],_=h[4*a+3],A=function(e,t){var n=null,r=0;for(;null===n;)if(n=e[4*t+r],++r>e.length)return null;return n}(h,a+1),E=.5*r,D=i+1;P(t,n,E,D,f,p||b||_||A),P(t,n+E,E,D,p,b||_||A),P(t+E,n,E,D,b,_||A),P(t+E,n+E,E,D,_,A)}}return P(0,0,1,0,0,1),R},p;function E(e,t,n){for(var r=1,i=.5,a=.5,o=.5,s=0;s0){t+=Math.abs(o(e[0]));for(var n=1;n2){for(l=0;l=0))throw new Error("precision must be a positive number");var n=Math.pow(10,t||0);return Math.round(e*n)/n},t.radiansToLength=u,t.lengthToRadians=d,t.lengthToDegrees=function(e,t){return h(d(e,t))},t.bearingToAzimuth=function(e){var t=e%360;return t<0&&(t+=360),t},t.radiansToDegrees=h,t.degreesToRadians=function(e){return e%360*Math.PI/180},t.convertLength=function(e,t,n){if(void 0===t&&(t="kilometers"),void 0===n&&(n="kilometers"),!(e>=0))throw new Error("length must be a positive number");return u(d(e,t),n)},t.convertArea=function(e,n,r){if(void 0===n&&(n="meters"),void 0===r&&(r="kilometers"),!(e>=0))throw new Error("area must be a positive number");var i=t.areaFactors[n];if(!i)throw new Error("invalid original units");var a=t.areaFactors[r];if(!a)throw new Error("invalid final units");return e/i*a},t.isNumber=f,t.isObject=function(e){return!!e&&e.constructor===Object},t.validateBBox=function(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach((function(e){if(!f(e))throw new Error("bbox must only contain numbers")}))},t.validateId=function(e){if(!e)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw new Error("id must be a number or a string")}},60302:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(23132);function i(e,t,n){if(null!==e)for(var r,a,o,s,l,c,u,d,h=0,f=0,p=e.type,m="FeatureCollection"===p,g="Feature"===p,v=m?e.features.length:1,y=0;yc||f>u||p>d)return l=i,c=n,u=f,d=p,void(o=0);var m=r.lineString([l,i],e.properties);if(!1===t(m,n,a,p,o))return!1;o++,l=i}))&&void 0}}}))}function u(e,t){if(!e)throw new Error("geojson is required");l(e,(function(e,n,i){if(null!==e.geometry){var a=e.geometry.type,o=e.geometry.coordinates;switch(a){case"LineString":if(!1===t(e,n,i,0,0))return!1;break;case"Polygon":for(var s=0;se[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]=0))throw new Error("precision must be a positive number");var n=Math.pow(10,t||0);return Math.round(e*n)/n},t.radiansToLength=u,t.lengthToRadians=d,t.lengthToDegrees=function(e,t){return h(d(e,t))},t.bearingToAzimuth=function(e){var t=e%360;return t<0&&(t+=360),t},t.radiansToDegrees=h,t.degreesToRadians=function(e){return e%360*Math.PI/180},t.convertLength=function(e,t,n){if(void 0===t&&(t="kilometers"),void 0===n&&(n="kilometers"),!(e>=0))throw new Error("length must be a positive number");return u(d(e,t),n)},t.convertArea=function(e,n,r){if(void 0===n&&(n="meters"),void 0===r&&(r="kilometers"),!(e>=0))throw new Error("area must be a positive number");var i=t.areaFactors[n];if(!i)throw new Error("invalid original units");var a=t.areaFactors[r];if(!a)throw new Error("invalid final units");return e/i*a},t.isNumber=f,t.isObject=function(e){return!!e&&e.constructor===Object},t.validateBBox=function(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach((function(e){if(!f(e))throw new Error("bbox must only contain numbers")}))},t.validateId=function(e){if(!e)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw new Error("id must be a number or a string")}},27138:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(94228);function i(e,t,n){if(null!==e)for(var r,a,o,s,l,c,u,d,h=0,f=0,p=e.type,m="FeatureCollection"===p,g="Feature"===p,v=m?e.features.length:1,y=0;yc||f>u||p>d)return l=i,c=n,u=f,d=p,void(o=0);var m=r.lineString([l,i],e.properties);if(!1===t(m,n,a,p,o))return!1;o++,l=i}))&&void 0}}}))}function u(e,t){if(!e)throw new Error("geojson is required");l(e,(function(e,n,i){if(null!==e.geometry){var a=e.geometry.type,o=e.geometry.coordinates;switch(a){case"LineString":if(!1===t(e,n,i,0,0))return!1;break;case"Polygon":for(var s=0;s=0))throw new Error("precision must be a positive number");var n=Math.pow(10,t||0);return Math.round(e*n)/n},t.radiansToLength=u,t.lengthToRadians=d,t.lengthToDegrees=function(e,t){return h(d(e,t))},t.bearingToAzimuth=function(e){var t=e%360;return t<0&&(t+=360),t},t.radiansToDegrees=h,t.degreesToRadians=function(e){return e%360*Math.PI/180},t.convertLength=function(e,t,n){if(void 0===t&&(t="kilometers"),void 0===n&&(n="kilometers"),!(e>=0))throw new Error("length must be a positive number");return u(d(e,t),n)},t.convertArea=function(e,n,r){if(void 0===n&&(n="meters"),void 0===r&&(r="kilometers"),!(e>=0))throw new Error("area must be a positive number");var i=t.areaFactors[n];if(!i)throw new Error("invalid original units");var a=t.areaFactors[r];if(!a)throw new Error("invalid final units");return e/i*a},t.isNumber=f,t.isObject=function(e){return!!e&&e.constructor===Object},t.validateBBox=function(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach((function(e){if(!f(e))throw new Error("bbox must only contain numbers")}))},t.validateId=function(e){if(!e)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw new Error("id must be a number or a string")},t.radians2degrees=function(){throw new Error("method has been renamed to `radiansToDegrees`")},t.degrees2radians=function(){throw new Error("method has been renamed to `degreesToRadians`")},t.distanceToDegrees=function(){throw new Error("method has been renamed to `lengthToDegrees`")},t.distanceToRadians=function(){throw new Error("method has been renamed to `lengthToRadians`")},t.radiansToDistance=function(){throw new Error("method has been renamed to `radiansToLength`")},t.bearingToAngle=function(){throw new Error("method has been renamed to `bearingToAzimuth`")},t.convertDistance=function(){throw new Error("method has been renamed to `convertLength`")}},88553:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(64182);function i(e,t,n){if(null!==e)for(var r,a,o,s,l,c,u,d,h=0,f=0,p=e.type,m="FeatureCollection"===p,g="Feature"===p,v=m?e.features.length:1,y=0;yc||f>u||p>d)return l=i,c=n,u=f,d=p,void(o=0);var m=r.lineString([l,i],e.properties);if(!1===t(m,n,a,p,o))return!1;o++,l=i}))&&void 0}}}))}function u(e,t){if(!e)throw new Error("geojson is required");l(e,(function(e,n,i){if(null!==e.geometry){var a=e.geometry.type,o=e.geometry.coordinates;switch(a){case"LineString":if(!1===t(e,n,i,0,0))return!1;break;case"Polygon":for(var s=0;si&&(i=e[o]),e[o]1?n-1:0),i=1;i1?n-1:0),i=1;i1?n-1:0),i=1;i1?n-1:0),i=1;ie.length)&&(n=e.length),e.substring(n-t.length,n)===t}var g="",v="",y="",x="",b={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function _(e){var t=Object.keys(e),n=Object.create(Object.getPrototypeOf(e));return t.forEach((function(t){n[t]=e[t]})),Object.defineProperty(n,"message",{value:e.message}),n}function w(e){return f(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function A(e,t,n){var i="",a="",o=0,s="",l=!1,c=w(e),u=c.split("\n"),d=w(t).split("\n"),f=0,p="";if("strictEqual"===n&&"object"===h(e)&&"object"===h(t)&&null!==e&&null!==t&&(n="strictEqualObject"),1===u.length&&1===d.length&&u[0]!==d[0]){var _=u[0].length+d[0].length;if(_<=10){if(("object"!==h(e)||null===e)&&("object"!==h(t)||null===t)&&(0!==e||0!==t))return"".concat(b[n],"\n\n")+"".concat(u[0]," !== ").concat(d[0],"\n")}else if("strictEqualObject"!==n){if(_<(r.stderr&&r.stderr.isTTY?r.stderr.columns:80)){for(;u[0][f]===d[0][f];)f++;f>2&&(p="\n ".concat(function(e,t){if(t=Math.floor(t),0==e.length||0==t)return"";var n=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+e.substring(0,n-e.length)}(" ",f),"^"),f=0)}}}for(var A=u[u.length-1],S=d[d.length-1];A===S&&(f++<2?s="\n ".concat(A).concat(s):i=A,u.pop(),d.pop(),0!==u.length&&0!==d.length);)A=u[u.length-1],S=d[d.length-1];var M=Math.max(u.length,d.length);if(0===M){var T=c.split("\n");if(T.length>30)for(T[26]="".concat(g,"...").concat(x);T.length>27;)T.pop();return"".concat(b.notIdentical,"\n\n").concat(T.join("\n"),"\n")}f>3&&(s="\n".concat(g,"...").concat(x).concat(s),l=!0),""!==i&&(s="\n ".concat(i).concat(s),i="");var k=0,E=b[n]+"\n".concat(v,"+ actual").concat(x," ").concat(y,"- expected").concat(x),C=" ".concat(g,"...").concat(x," Lines skipped");for(f=0;f1&&f>2&&(D>4?(a+="\n".concat(g,"...").concat(x),l=!0):D>3&&(a+="\n ".concat(d[f-2]),k++),a+="\n ".concat(d[f-1]),k++),o=f,i+="\n".concat(y,"-").concat(x," ").concat(d[f]),k++;else if(d.length1&&f>2&&(D>4?(a+="\n".concat(g,"...").concat(x),l=!0):D>3&&(a+="\n ".concat(u[f-2]),k++),a+="\n ".concat(u[f-1]),k++),o=f,a+="\n".concat(v,"+").concat(x," ").concat(u[f]),k++;else{var R=d[f],P=u[f],O=P!==R&&(!m(P,",")||P.slice(0,-1)!==R);O&&m(R,",")&&R.slice(0,-1)===P&&(O=!1,P+=","),O?(D>1&&f>2&&(D>4?(a+="\n".concat(g,"...").concat(x),l=!0):D>3&&(a+="\n ".concat(u[f-2]),k++),a+="\n ".concat(u[f-1]),k++),o=f,a+="\n".concat(v,"+").concat(x," ").concat(P),i+="\n".concat(y,"-").concat(x," ").concat(R),k+=2):(a+=i,i="",1!==D&&0!==f||(a+="\n ".concat(P),k++))}if(k>20&&f30)for(S[26]="".concat(g,"...").concat(x);S.length>27;)S.pop();n=1===S.length?o(this,d(t).call(this,"".concat(m," ").concat(S[0]))):o(this,d(t).call(this,"".concat(m,"\n\n").concat(S.join("\n"),"\n")))}else{var M=w(c),T="",k=b[a];"notDeepEqual"===a||"notEqual"===a?(M="".concat(b[a],"\n\n").concat(M)).length>1024&&(M="".concat(M.slice(0,1021),"...")):(T="".concat(w(u)),M.length>512&&(M="".concat(M.slice(0,509),"...")),T.length>512&&(T="".concat(T.slice(0,509),"...")),"deepEqual"===a||"equal"===a?M="".concat(k,"\n\n").concat(M,"\n\nshould equal\n\n"):T=" ".concat(a," ").concat(T)),n=o(this,d(t).call(this,"".concat(M).concat(T)))}return Error.stackTraceLimit=f,n.generatedMessage=!i,Object.defineProperty(s(n),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),n.code="ERR_ASSERTION",n.actual=c,n.expected=u,n.operator=a,Error.captureStackTrace&&Error.captureStackTrace(s(n),l),n.stack,n.name="AssertionError",o(n)}var n,l,c;return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(t,e),n=t,l=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:f.custom,value:function(e,t){return f(this,function(e){for(var t=1;t2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}u("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),u("ERR_INVALID_ARG_TYPE",(function(e,t,i){var a,o,l,c;if(void 0===s&&(s=n(32791)),s("string"===typeof e,"'name' must be a string"),"string"===typeof t&&(o="not ",t.substr(!l||l<0?0:+l,o.length)===o)?(a="must not be",t=t.replace(/^not /,"")):a="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))c="The ".concat(e," ").concat(a," ").concat(d(t,"type"));else{var u=function(e,t,n){return"number"!==typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";c='The "'.concat(e,'" ').concat(u," ").concat(a," ").concat(d(t,"type"))}return c+=". Received type ".concat(r(i))}),TypeError),u("ERR_INVALID_ARG_VALUE",(function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===l&&(l=n(43827));var i=l.inspect(t);return i.length>128&&(i="".concat(i.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(r,". Received ").concat(i)}),TypeError,RangeError),u("ERR_INVALID_RETURN_VALUE",(function(e,t,n){var i;return i=n&&n.constructor&&n.constructor.name?"instance of ".concat(n.constructor.name):"type ".concat(r(n)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(i,".")}),TypeError),u("ERR_MISSING_ARGS",(function(){for(var e=arguments.length,t=new Array(e),r=0;r0,"At least one arg needs to be specified");var i="The ",a=t.length;switch(t=t.map((function(e){return'"'.concat(e,'"')})),a){case 1:i+="".concat(t[0]," argument");break;case 2:i+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:i+=t.slice(0,a-1).join(", "),i+=", and ".concat(t[a-1]," arguments")}return"".concat(i," must be specified")}),TypeError),e.exports.codes=c},74061:function(e,t,n){"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(l){i=!0,a=l}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function i(e){return i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}var a=void 0!==/a/g.flags,o=function(e){var t=[];return e.forEach((function(e){return t.push(e)})),t},s=function(e){var t=[];return e.forEach((function(e,n){return t.push([n,e])})),t},l=Object.is?Object.is:n(64003),c=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},u=Number.isNaN?Number.isNaN:n(15567);function d(e){return e.call.bind(e)}var h=d(Object.prototype.hasOwnProperty),f=d(Object.prototype.propertyIsEnumerable),p=d(Object.prototype.toString),m=n(43827).types,g=m.isAnyArrayBuffer,v=m.isArrayBufferView,y=m.isDate,x=m.isMap,b=m.isRegExp,_=m.isSet,w=m.isNativeError,A=m.isBoxedPrimitive,S=m.isNumberObject,M=m.isStringObject,T=m.isBooleanObject,k=m.isBigIntObject,E=m.isSymbolObject,C=m.isFloat32Array,D=m.isFloat64Array;function R(e){if(0===e.length||e.length>10)return!0;for(var t=0;t57)return!0}return 10===e.length&&e>=Math.pow(2,32)}function P(e){return Object.keys(e).filter(R).concat(c(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function O(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);i0?o-4:o;for(n=0;n>16&255,c[u++]=t>>8&255,c[u++]=255&t;2===l&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,c[u++]=255&t);1===l&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t);return c},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,a=[],o=16383,s=0,c=r-i;sc?c:s+o));1===i?(t=e[r-1],a.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],a.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return a.join("")};for(var n=[],r=[],i="undefined"!==typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)n[o]=a[o],r[a.charCodeAt(o)]=o;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,r){for(var i,a,o=[],s=t;s>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return o.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},91358:function(e){"use strict";function t(e,t,n,r,i){for(var a=i+1;r<=i;){var o=r+i>>>1,s=e[o];(void 0!==n?n(s,t):s-t)>=0?(a=o,i=o-1):r=o+1}return a}function n(e,t,n,r,i){for(var a=i+1;r<=i;){var o=r+i>>>1,s=e[o];(void 0!==n?n(s,t):s-t)>0?(a=o,i=o-1):r=o+1}return a}function r(e,t,n,r,i){for(var a=r-1;r<=i;){var o=r+i>>>1,s=e[o];(void 0!==n?n(s,t):s-t)<0?(a=o,r=o+1):i=o-1}return a}function i(e,t,n,r,i){for(var a=r-1;r<=i;){var o=r+i>>>1,s=e[o];(void 0!==n?n(s,t):s-t)<=0?(a=o,r=o+1):i=o-1}return a}function a(e,t,n,r,i){for(;r<=i;){var a=r+i>>>1,o=e[a],s=void 0!==n?n(o,t):o-t;if(0===s)return a;s<=0?r=a+1:i=a-1}return-1}function o(e,t,n,r,i,a){return"function"===typeof n?a(e,t,n,void 0===r?0:0|r,void 0===i?e.length-1:0|i):a(e,t,void 0,void 0===n?0:0|n,void 0===r?e.length-1:0|r)}e.exports={ge:function(e,n,r,i,a){return o(e,n,r,i,a,t)},gt:function(e,t,r,i,a){return o(e,t,r,i,a,n)},lt:function(e,t,n,i,a){return o(e,t,n,i,a,r)},le:function(e,t,n,r,a){return o(e,t,n,r,a,i)},eq:function(e,t,n,r,i){return o(e,t,n,r,i,a)}}},13547:function(e,t){"use strict";function n(e){var t=32;return(e&=-e)&&t--,65535&e&&(t-=16),16711935&e&&(t-=8),252645135&e&&(t-=4),858993459&e&&(t-=2),1431655765&e&&(t-=1),t}t.INT_BITS=32,t.INT_MAX=2147483647,t.INT_MIN=-1<<31,t.sign=function(e){return(e>0)-(e<0)},t.abs=function(e){var t=e>>31;return(e^t)-t},t.min=function(e,t){return t^(e^t)&-(e65535)<<4,t|=n=((e>>>=t)>255)<<3,t|=n=((e>>>=n)>15)<<2,(t|=n=((e>>>=n)>3)<<1)|(e>>>=n)>>1},t.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0},t.popCount=function(e){return 16843009*((e=(858993459&(e-=e>>>1&1431655765))+(e>>>2&858993459))+(e>>>4)&252645135)>>>24},t.countTrailingZeros=n,t.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)+1},t.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)-(e>>>1)},t.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,27030>>>(e&=15)&1};var r=new Array(256);!function(e){for(var t=0;t<256;++t){var n=t,r=t,i=7;for(n>>>=1;n;n>>>=1)r<<=1,r|=1&n,--i;e[t]=r<>>8&255]<<16|r[e>>>16&255]<<8|r[e>>>24&255]},t.interleave2=function(e,t){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))<<1},t.deinterleave2=function(e,t){return(e=65535&((e=16711935&((e=252645135&((e=858993459&((e=e>>>t&1431655765)|e>>>1))|e>>>2))|e>>>4))|e>>>16))<<16>>16},t.interleave3=function(e,t,n){return e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2),(e|=(t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2))<<1)|(n=1227133513&((n=3272356035&((n=251719695&((n=4278190335&((n&=1023)|n<<16))|n<<8))|n<<4))|n<<2))<<2},t.deinterleave3=function(e,t){return(e=1023&((e=4278190335&((e=251719695&((e=3272356035&((e=e>>>t&1227133513)|e>>>2))|e>>>4))|e>>>8))|e>>>16))<<22>>22},t.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>n(e)+1}},44781:function(e,t,n){"use strict";var r=n(53435);e.exports=function(e,t){t||(t={});var n,o,s,l,c,u,d,h,f,p,m,g=null==t.cutoff?.25:t.cutoff,v=null==t.radius?8:t.radius,y=t.channel||0;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!t.width||!t.height)throw Error("For raw data width and height should be provided by options");n=t.width,o=t.height,l=e,u=t.stride?t.stride:Math.floor(e.length/n/o)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(d=(h=e).getContext("2d"),n=h.width,o=h.height,l=(f=d.getImageData(0,0,n,o)).data,u=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(d=e,n=(h=e.canvas).width,o=h.height,l=(f=d.getImageData(0,0,n,o)).data,u=4):window.ImageData&&e instanceof window.ImageData&&(f=e,n=e.width,o=e.height,l=f.data,u=4);if(s=Math.max(n,o),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(c=l,l=Array(n*o),p=0,m=c.length;pn?n:e:et?t:e}},6475:function(e,t,n){"use strict";var r=n(53435);function i(e,t){null==t&&(t=!0);var n=e[0],i=e[1],a=e[2],o=e[3];return null==o&&(o=t?1:255),t&&(n*=255,i*=255,a*=255,o*=255),16777216*(n=255&r(n,0,255))+((i=255&r(i,0,255))<<16)+((a=255&r(a,0,255))<<8)+(o=255&r(o,0,255))}e.exports=i,e.exports.to=i,e.exports.from=function(e,t){var n=(e=+e)>>>24,r=(16711680&e)>>>16,i=(65280&e)>>>8,a=255&e;return!1===t?[n,r,i,a]:[n/255,r/255,i/255,a/255]}},76857:function(e){"use strict";e.exports={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,134,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,250,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,221],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:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],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,50]}},25075:function(e,t,n){"use strict";var r=n(36652),i=n(53435),a=n(90660);e.exports=function(e,t){"float"!==t&&t||(t="array"),"uint"===t&&(t="uint8"),"uint_clamped"===t&&(t="uint8_clamped");var n=new(a(t))(4),o="uint8"!==t&&"uint8_clamped"!==t;return e.length&&"string"!==typeof e||((e=r(e))[0]/=255,e[1]/=255,e[2]/=255),function(e){return e instanceof Uint8Array||e instanceof Uint8ClampedArray||!!(Array.isArray(e)&&(e[0]>1||0===e[0])&&(e[1]>1||0===e[1])&&(e[2]>1||0===e[2])&&(!e[3]||e[3]>1))}(e)?(n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=null!=e[3]?e[3]:255,o&&(n[0]/=255,n[1]/=255,n[2]/=255,n[3]/=255),n):(o?(n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=null!=e[3]?e[3]:1):(n[0]=i(Math.floor(255*e[0]),0,255),n[1]=i(Math.floor(255*e[1]),0,255),n[2]=i(Math.floor(255*e[2]),0,255),n[3]=null==e[3]?255:i(Math.floor(255*e[3]),0,255)),n)}},90736:function(e,t,n){"use strict";var r=n(76857),i=n(10973),a=n(46775);e.exports=function(e){var t,s,l=[],c=1;if("string"===typeof e)if(r[e])l=r[e].slice(),s="rgb";else if("transparent"===e)c=0,s="rgb",l=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var u=e.slice(1);c=1,(f=u.length)<=4?(l=[parseInt(u[0]+u[0],16),parseInt(u[1]+u[1],16),parseInt(u[2]+u[2],16)],4===f&&(c=parseInt(u[3]+u[3],16)/255)):(l=[parseInt(u[0]+u[1],16),parseInt(u[2]+u[3],16),parseInt(u[4]+u[5],16)],8===f&&(c=parseInt(u[6]+u[7],16)/255)),l[0]||(l[0]=0),l[1]||(l[1]=0),l[2]||(l[2]=0),s="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var d=t[1],h="rgb"===d;s=u=d.replace(/a$/,"");var f="cmyk"===u?4:"gray"===u?1:3;l=t[2].trim().split(/\s*,\s*/).map((function(e,t){if(/%$/.test(e))return t===f?parseFloat(e)/100:"rgb"===u?255*parseFloat(e)/100:parseFloat(e);if("h"===u[t]){if(/deg$/.test(e))return parseFloat(e);if(void 0!==o[e])return o[e]}return parseFloat(e)})),d===u&&l.push(1),c=h||void 0===l[f]?1:l[f],l=l.slice(0,f)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(l=e.match(/([0-9]+)/g).map((function(e){return parseFloat(e)})),s=e.match(/([a-z])/gi).join("").toLowerCase());else if(isNaN(e))if(i(e)){var p=a(e.r,e.red,e.R,null);null!==p?(s="rgb",l=[p,a(e.g,e.green,e.G),a(e.b,e.blue,e.B)]):(s="hsl",l=[a(e.h,e.hue,e.H),a(e.s,e.saturation,e.S),a(e.l,e.lightness,e.L,e.b,e.brightness)]),c=a(e.a,e.alpha,e.opacity,1),null!=e.opacity&&(c/=100)}else(Array.isArray(e)||n.g.ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(e))&&(l=[e[0],e[1],e[2]],s="rgb",c=4===e.length?e[3]:1);else s="rgb",l=[e>>>16,(65280&e)>>>8,255&e];return{space:s,values:l,alpha:c}};var o={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}},36652:function(e,t,n){"use strict";var r=n(90736),i=n(80009),a=n(53435);e.exports=function(e){var t,n=r(e);return n.space?((t=Array(3))[0]=a(n.values[0],0,255),t[1]=a(n.values[1],0,255),t[2]=a(n.values[2],0,255),"h"===n.space[0]&&(t=i.rgb(t)),t.push(a(n.alpha,0,1)),t):[]}},80009:function(e,t,n){"use strict";var r=n(6866);e.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(e){var t,n,r,i,a,o=e[0]/360,s=e[1]/100,l=e[2]/100;if(0===s)return[a=255*l,a,a];t=2*l-(n=l<.5?l*(1+s):l+s-l*s),i=[0,0,0];for(var c=0;c<3;c++)(r=o+1/3*-(c-1))<0?r++:r>1&&r--,a=6*r<1?t+6*(n-t)*r:2*r<1?n:3*r<2?t+(n-t)*(2/3-r)*6:t,i[c]=255*a;return i}},r.hsl=function(e){var t,n,r=e[0]/255,i=e[1]/255,a=e[2]/255,o=Math.min(r,i,a),s=Math.max(r,i,a),l=s-o;return s===o?t=0:r===s?t=(i-a)/l:i===s?t=2+(a-r)/l:a===s&&(t=4+(r-i)/l),(t=Math.min(60*t,360))<0&&(t+=360),n=(o+s)/2,[t,100*(s===o?0:n<=.5?l/(s+o):l/(2-s-o)),100*n]}},6866:function(e){"use strict";e.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},24138:function(e){e.exports={AFG:"afghan",ALA:"\\b\\wland",ALB:"albania",DZA:"algeria",ASM:"^(?=.*americ).*samoa",AND:"andorra",AGO:"angola",AIA:"anguill?a",ATA:"antarctica",ATG:"antigua",ARG:"argentin",ARM:"armenia",ABW:"^(?!.*bonaire).*\\baruba",AUS:"australia",AUT:"^(?!.*hungary).*austria|\\baustri.*\\bemp",AZE:"azerbaijan",BHS:"bahamas",BHR:"bahrain",BGD:"bangladesh|^(?=.*east).*paki?stan",BRB:"barbados",BLR:"belarus|byelo",BEL:"^(?!.*luxem).*belgium",BLZ:"belize|^(?=.*british).*honduras",BEN:"benin|dahome",BMU:"bermuda",BTN:"bhutan",BOL:"bolivia",BES:"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands",BIH:"herzegovina|bosnia",BWA:"botswana|bechuana",BVT:"bouvet",BRA:"brazil",IOT:"british.?indian.?ocean",BRN:"brunei",BGR:"bulgaria",BFA:"burkina|\\bfaso|upper.?volta",BDI:"burundi",CPV:"verde",KHM:"cambodia|kampuchea|khmer",CMR:"cameroon",CAN:"canada",CYM:"cayman",CAF:"\\bcentral.african.republic",TCD:"\\bchad",CHL:"\\bchile",CHN:"^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai)(?!.*\\brep).*china|^(?=.*peo)(?=.*rep).*china",CXR:"christmas",CCK:"\\bcocos|keeling",COL:"colombia",COM:"comoro",COG:"^(?!.*\\bdem)(?!.*\\bd[\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\bcongo",COK:"\\bcook",CRI:"costa.?rica",CIV:"ivoire|ivory",HRV:"croatia",CUB:"\\bcuba",CUW:"^(?!.*bonaire).*\\bcura(c|\xe7)ao",CYP:"cyprus",CSK:"czechoslovakia",CZE:"^(?=.*rep).*czech|czechia|bohemia",COD:"\\bdem.*congo|congo.*\\bdem|congo.*\\bd[\\.]?r|\\bd[\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc",DNK:"denmark",DJI:"djibouti",DMA:"dominica(?!n)",DOM:"dominican.rep",ECU:"ecuador",EGY:"egypt",SLV:"el.?salvador",GNQ:"guine.*eq|eq.*guine|^(?=.*span).*guinea",ERI:"eritrea",EST:"estonia",ETH:"ethiopia|abyssinia",FLK:"falkland|malvinas",FRO:"faroe|faeroe",FJI:"fiji",FIN:"finland",FRA:"^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul",GUF:"^(?=.*french).*guiana",PYF:"french.?polynesia|tahiti",ATF:"french.?southern",GAB:"gabon",GMB:"gambia",GEO:"^(?!.*south).*georgia",DDR:"german.?democratic.?republic|democratic.?republic.*germany|east.germany",DEU:"^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german",GHA:"ghana|gold.?coast",GIB:"gibraltar",GRC:"greece|hellenic|hellas",GRL:"greenland",GRD:"grenada",GLP:"guadeloupe",GUM:"\\bguam",GTM:"guatemala",GGY:"guernsey",GIN:"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea",GNB:"bissau|^(?=.*portu).*guinea",GUY:"guyana|british.?guiana",HTI:"haiti",HMD:"heard.*mcdonald",VAT:"holy.?see|vatican|papal.?st",HND:"^(?!.*brit).*honduras",HKG:"hong.?kong",HUN:"^(?!.*austr).*hungary",ISL:"iceland",IND:"india(?!.*ocea)",IDN:"indonesia",IRN:"\\biran|persia",IRQ:"\\biraq|mesopotamia",IRL:"(^ireland)|(^republic.*ireland)",IMN:"^(?=.*isle).*\\bman",ISR:"israel",ITA:"italy",JAM:"jamaica",JPN:"japan",JEY:"jersey",JOR:"jordan",KAZ:"kazak",KEN:"kenya|british.?east.?africa|east.?africa.?prot",KIR:"kiribati",PRK:"^(?=.*democrat|people|north|d.*p.*.r).*\\bkorea|dprk|korea.*(d.*p.*r)",KWT:"kuwait",KGZ:"kyrgyz|kirghiz",LAO:"\\blaos?\\b",LVA:"latvia",LBN:"lebanon",LSO:"lesotho|basuto",LBR:"liberia",LBY:"libya",LIE:"liechtenstein",LTU:"lithuania",LUX:"^(?!.*belg).*luxem",MAC:"maca(o|u)",MDG:"madagascar|malagasy",MWI:"malawi|nyasa",MYS:"malaysia",MDV:"maldive",MLI:"\\bmali\\b",MLT:"\\bmalta",MHL:"marshall",MTQ:"martinique",MRT:"mauritania",MUS:"mauritius",MYT:"\\bmayotte",MEX:"\\bmexic",FSM:"fed.*micronesia|micronesia.*fed",MCO:"monaco",MNG:"mongolia",MNE:"^(?!.*serbia).*montenegro",MSR:"montserrat",MAR:"morocco|\\bmaroc",MOZ:"mozambique",MMR:"myanmar|burma",NAM:"namibia",NRU:"nauru",NPL:"nepal",NLD:"^(?!.*\\bant)(?!.*\\bcarib).*netherlands",ANT:"^(?=.*\\bant).*(nether|dutch)",NCL:"new.?caledonia",NZL:"new.?zealand",NIC:"nicaragua",NER:"\\bniger(?!ia)",NGA:"nigeria",NIU:"niue",NFK:"norfolk",MNP:"mariana",NOR:"norway",OMN:"\\boman|trucial",PAK:"^(?!.*east).*paki?stan",PLW:"palau",PSE:"palestin|\\bgaza|west.?bank",PAN:"panama",PNG:"papua|new.?guinea",PRY:"paraguay",PER:"peru",PHL:"philippines",PCN:"pitcairn",POL:"poland",PRT:"portugal",PRI:"puerto.?rico",QAT:"qatar",KOR:"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)",MDA:"moldov|b(a|e)ssarabia",REU:"r(e|\xe9)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|\xe9)lemy",SHN:"helena",KNA:"kitts|\\bnevis",LCA:"\\blucia",MAF:"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)",SPM:"miquelon",VCT:"vincent",WSM:"^(?!.*amer).*samoa",SMR:"san.?marino",STP:"\\bs(a|\xe3)o.?tom(e|\xe9)",SAU:"\\bsa\\w*.?arabia",SEN:"senegal",SRB:"^(?!.*monte).*serbia",SYC:"seychell",SLE:"sierra",SGP:"singapore",SXM:"^(?!.*martin)(?!.*saba).*maarten",SVK:"^(?!.*cze).*slovak",SVN:"slovenia",SLB:"solomon",SOM:"somali",ZAF:"south.africa|s\\\\..?africa",SGS:"south.?georgia|sandwich",SSD:"\\bs\\w*.?sudan",ESP:"spain",LKA:"sri.?lanka|ceylon",SDN:"^(?!.*\\bs(?!u)).*sudan",SUR:"surinam|dutch.?guiana",SJM:"svalbard",SWZ:"swaziland",SWE:"sweden",CHE:"switz|swiss",SYR:"syria",TWN:"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china",TJK:"tajik",THA:"thailand|\\bsiam",MKD:"macedonia|fyrom",TLS:"^(?=.*leste).*timor|^(?=.*east).*timor",TGO:"togo",TKL:"tokelau",TON:"tonga",TTO:"trinidad|tobago",TUN:"tunisia",TUR:"turkey",TKM:"turkmen",TCA:"turks",TUV:"tuvalu",UGA:"uganda",UKR:"ukrain",ARE:"emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em",GBR:"united.?kingdom|britain|^u\\.?k\\.?$",TZA:"tanzania",USA:"united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)",UMI:"minor.?outlying.?is",URY:"uruguay",UZB:"uzbek",VUT:"vanuatu|new.?hebrides",VEN:"venezuela",VNM:"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam",VGB:"^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin",VIR:"^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin",WLF:"futuna|wallis",ESH:"western.sahara",YEM:"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen",YMD:"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen",YUG:"yugoslavia",ZMB:"zambia|northern.?rhodesia",EAZ:"zanzibar",ZWE:"zimbabwe|^(?!.*northern).*rhodesia"}},72791:function(e,t,n){"use strict";e.exports={parse:n(41004),stringify:n(53313)}},63625:function(e,t,n){"use strict";var r=n(40402);e.exports={isSize:function(e){return/^[\d\.]/.test(e)||-1!==e.indexOf("/")||-1!==r.indexOf(e)}}},41004:function(e,t,n){"use strict";var r=n(90448),i=n(38732),a=n(41901),o=n(15659),s=n(96209),l=n(83794),c=n(99011),u=n(63625).isSize;e.exports=h;var d=h.cache={};function h(e){if("string"!==typeof e)throw new Error("Font argument must be a string.");if(d[e])return d[e];if(""===e)throw new Error("Cannot parse an empty string.");if(-1!==a.indexOf(e))return d[e]={system:e};for(var t,n={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},h=c(e,/\s+/);t=h.shift();){if(-1!==i.indexOf(t))return["style","variant","weight","stretch"].forEach((function(e){n[e]=t})),d[e]=n;if(-1===s.indexOf(t))if("normal"!==t&&"small-caps"!==t)if(-1===l.indexOf(t)){if(-1===o.indexOf(t)){if(u(t)){var p=c(t,"/");if(n.size=p[0],null!=p[1]?n.lineHeight=f(p[1]):"/"===h[0]&&(h.shift(),n.lineHeight=f(h.shift())),!h.length)throw new Error("Missing required font-family.");return n.family=c(h.join(" "),/\s*,\s*/).map(r),d[e]=n}throw new Error("Unknown or unsupported font token: "+t)}n.weight=t}else n.stretch=t;else n.variant=t;else n.style=t}throw new Error("Missing required font-size.")}function f(e){var t=parseFloat(e);return t.toString()===e?t:e}},53313:function(e,t,n){"use strict";var r=n(71299),i=n(63625).isSize,a=m(n(38732)),o=m(n(41901)),s=m(n(15659)),l=m(n(96209)),c=m(n(83794)),u={normal:1,"small-caps":1},d={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},h="1rem",f="serif";function p(e,t){if(e&&!t[e]&&!a[e])throw Error("Unknown keyword `"+e+"`");return e}function m(e){for(var t={},n=0;nt?1:e>=t?0:NaN}n.d(t,{j2:function(){return r},Fp:function(){return o},J6:function(){return l},TS:function(){return c},VV:function(){return u},w6:function(){return d},Sm:function(){return h}});var i=function(e){var t;return 1===e.length&&(t=e,e=function(e,n){return r(t(e),n)}),{left:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r>>1;e(t[a],n)<0?r=a+1:i=a}return r},right:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r>>1;e(t[a],n)>0?i=a:r=a+1}return r}}}(r),a=(i.right,i.left,Array.prototype);a.slice,a.map,Math.sqrt(50),Math.sqrt(10),Math.sqrt(2);function o(e,t){var n,r,i=e.length,a=-1;if(null==t){for(;++a=n)for(r=n;++ar&&(r=n)}else for(;++a=n)for(r=n;++ar&&(r=n);return r}function s(e){return null===e?NaN:+e}function l(e,t){var n,r=e.length,i=r,a=-1,o=0;if(null==t)for(;++a=0;)for(t=(r=e[i]).length;--t>=0;)n[--o]=r[t];return n}function u(e,t){var n,r,i=e.length,a=-1;if(null==t){for(;++a=n)for(r=n;++an&&(r=n)}else for(;++a=n)for(r=n;++an&&(r=n);return r}function d(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),a=new Array(i);++r=r.length)return null!=e&&n.sort(e),null!=t?t(n):n;for(var c,u,d,h=-1,f=n.length,p=r[i++],m=o(),g=s();++hr.length)return e;var a,o=i[n-1];return null!=t&&n>=r.length?a=e.entries():(a=[],e.each((function(e,t){a.push({key:t,values:s(e,n)})}))),null!=o?a.sort((function(e,t){return o(e.key,t.key)})):a}return n={object:function(e){return a(e,0,l,c)},map:function(e){return a(e,0,u,d)},entries:function(e){return s(a(e,0,u,d),0)},key:function(e){return r.push(e),n},sortKeys:function(e){return i[r.length-1]=e,n},sortValues:function(t){return e=t,n},rollup:function(e){return t=e,n}}}function l(){return{}}function c(e,t,n){e[t]=n}function u(){return o()}function d(e,t,n){e.set(t,n)}function h(){}var f=o.prototype;h.prototype=function(e,t){var n=new h;if(e instanceof h)e.each((function(e){n.add(e)}));else if(e){var r=-1,i=e.length;if(null==t)for(;++r=(a=(m+v)/2))?m=a:v=a,(u=n>=(o=(g+y)/2))?g=o:y=o,i=f,!(f=f[d=u<<1|c]))return i[d]=p,e;if(s=+e._x.call(null,f.data),l=+e._y.call(null,f.data),t===s&&n===l)return p.next=f,i?i[d]=p:e._root=p,e;do{i=i?i[d]=new Array(4):e._root=new Array(4),(c=t>=(a=(m+v)/2))?m=a:v=a,(u=n>=(o=(g+y)/2))?g=o:y=o}while((d=u<<1|c)===(h=(l>=o)<<1|s>=a));return i[h]=f,i[d]=p,e}function s(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function l(e){return e[0]}function c(e){return e[1]}function u(e,t,n){var r=new d(null==t?l:t,null==n?c:n,NaN,NaN,NaN,NaN);return null==e?r:r.addAll(e)}function d(e,t,n,r,i,a){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function h(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}n.r(t),n.d(t,{forceCenter:function(){return r},forceCollide:function(){return g},forceLink:function(){return b},forceManyBody:function(){return X},forceRadial:function(){return Z},forceSimulation:function(){return $},forceX:function(){return K},forceY:function(){return J}});var f=u.prototype=d.prototype;function p(e){return e.x+e.vx}function m(e){return e.y+e.vy}function g(e){var t,n,r=1,o=1;function s(){for(var e,i,s,c,d,h,f,g=t.length,v=0;vc+p||id+p||os.index){var m=c-l.x-l.vx,g=d-l.y-l.vy,v=m*m+g*g;ve.r&&(e.r=e[t].r)}function c(){if(t){var r,i,a=t.length;for(n=new Array(a),r=0;rd&&(d=r),ih&&(h=i));if(c>d||u>h)return this;for(this.cover(c,u).cover(d,h),n=0;ne||e>=i||r>t||t>=a;)switch(s=(tf||(a=c.y0)>p||(o=c.x1)=y)<<1|e>=v)&&(c=m[m.length-1],m[m.length-1]=m[m.length-1-u],m[m.length-1-u]=c)}else{var x=e-+this._x.call(null,g.data),b=t-+this._y.call(null,g.data),_=x*x+b*b;if(_=(s=(p+g)/2))?p=s:g=s,(u=o>=(l=(m+v)/2))?m=l:v=l,t=f,!(f=f[d=u<<1|c]))return this;if(!f.length)break;(t[d+1&3]||t[d+2&3]||t[d+3&3])&&(n=t,h=d)}for(;f.data!==e;)if(r=f,!(f=f.next))return this;return(i=f.next)&&delete f.next,r?(i?r.next=i:delete r.next,this):t?(i?t[d]=i:delete t[d],(f=t[0]||t[1]||t[2]||t[3])&&f===(t[3]||t[2]||t[1]||t[0])&&!f.length&&(n?n[h]=f:this._root=f),this):(this._root=i,this)},f.removeAll=function(e){for(var t=0,n=e.length;t=0&&(t=e.slice(n+1),e=e.slice(0,n)),e&&!r.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:t}}))),o=-1,s=a.length;if(!(arguments.length<2)){if(null!=t&&"function"!==typeof t)throw new Error("invalid callback: "+t);for(;++o0)for(var n,r,i=new Array(n),a=0;a=0&&t._call.call(null,e),t=t._next;--C}()}finally{C=0,function(){var e,t,n=T,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:T=t);k=e,H(r)}(),O=0}}function V(){var e=I.now(),t=e-P;t>1e3&&(L-=t,P=e)}function H(e){C||(D&&(D=clearTimeout(D)),e-O>24?(e<1/0&&(D=setTimeout(U,e-I.now()-L)),R&&(R=clearInterval(R))):(R||(P=I.now(),R=setInterval(V,1e3)),C=1,z(U)))}function W(e){return e.x}function G(e){return e.y}B.prototype=j.prototype={constructor:B,restart:function(e,t,n){if("function"!==typeof e)throw new TypeError("callback is not a function");n=(null==n?N():+n)+(null==t?0:+t),this._next||k===this||(k?k._next=this:T=this,k=this),this._call=e,this._time=n,H()},stop:function(){this._call&&(this._call=null,this._time=1/0,H())}};var q=10,Y=Math.PI*(3-Math.sqrt(5));function $(e){var t,n=1,r=.001,i=1-Math.pow(r,1/300),a=0,o=.6,s=(0,v.UI)(),l=j(u),c=E("tick","end");function u(){d(),c.call("tick",t),n1?(null==n?s.remove(e):s.set(e,f(n)),t):s.get(e)},find:function(t,n,r){var i,a,o,s,l,c=0,u=e.length;for(null==r?r=1/0:r*=r,c=0;c1?(c.on(e,n),t):c.on(e)}}}function X(){var e,t,n,r,o=i(-30),s=1,l=1/0,c=.81;function d(r){var i,a=e.length,o=u(e,W,G).visitAfter(f);for(n=r,i=0;i=l)){(e.data!==t||e.next)&&(0===d&&(p+=(d=a())*d),0===h&&(p+=(h=a())*h),p1?r[0]+r.slice(2):r,+e.slice(n+1)]}n.d(t,{WU:function(){return h},FF:function(){return m}});var i,a=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function o(e){if(!(t=a.exec(e)))throw new Error("invalid format: "+e);var t;return new s({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function s(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function l(e,t){var n=r(e,t);if(!n)return e+"";var i=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+i:i.length>a+1?i.slice(0,a+1)+"."+i.slice(a+1):i+new Array(a-i.length+2).join("0")}o.prototype=s.prototype,s.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var c={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return l(100*e,t)},r:l,s:function(e,t){var n=r(e,t);if(!n)return e+"";var a=n[0],o=n[1],s=o-(i=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,l=a.length;return s===l?a:s>l?a+new Array(s-l+1).join("0"):s>0?a.slice(0,s)+"."+a.slice(s):"0."+new Array(1-s).join("0")+r(e,Math.max(0,t+s-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function u(e){return e}var d,h,f=Array.prototype.map,p=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function m(e){var t,n,a=void 0===e.grouping||void 0===e.thousands?u:(t=f.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var i=e.length,a=[],o=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(e.substring(i-=s,i+s)),!((l+=s+1)>r));)s=t[o=(o+1)%t.length];return a.reverse().join(n)}),s=void 0===e.currency?"":e.currency[0]+"",l=void 0===e.currency?"":e.currency[1]+"",d=void 0===e.decimal?".":e.decimal+"",h=void 0===e.numerals?u:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(f.call(e.numerals,String)),m=void 0===e.percent?"%":e.percent+"",g=void 0===e.minus?"-":e.minus+"",v=void 0===e.nan?"NaN":e.nan+"";function y(e){var t=(e=o(e)).fill,n=e.align,r=e.sign,u=e.symbol,f=e.zero,y=e.width,x=e.comma,b=e.precision,_=e.trim,w=e.type;"n"===w?(x=!0,w="g"):c[w]||(void 0===b&&(b=12),_=!0,w="g"),(f||"0"===t&&"="===n)&&(f=!0,t="0",n="=");var A="$"===u?s:"#"===u&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",S="$"===u?l:/[%p]/.test(w)?m:"",M=c[w],T=/[defgprs%]/.test(w);function k(e){var o,s,l,c=A,u=S;if("c"===w)u=M(e)+u,e="";else{var m=(e=+e)<0||1/e<0;if(e=isNaN(e)?v:M(Math.abs(e),b),_&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),m&&0===+e&&"+"!==r&&(m=!1),c=(m?"("===r?r:g:"-"===r||"("===r?"":r)+c,u=("s"===w?p[8+i/3]:"")+u+(m&&"("===r?")":""),T)for(o=-1,s=e.length;++o(l=e.charCodeAt(o))||l>57){u=(46===l?d+e.slice(o+1):e.slice(o))+u,e=e.slice(0,o);break}}x&&!f&&(e=a(e,1/0));var k=c.length+e.length+u.length,E=k>1)+c+e+u+E.slice(k);break;default:e=E+c+e+u}return h(e)}return b=void 0===b?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),k.toString=function(){return e+""},k}return{format:y,formatPrefix:function(e,t){var n,i=y(((e=o(e)).type="f",e)),a=3*Math.max(-8,Math.min(8,Math.floor((n=t,((n=r(Math.abs(n)))?n[1]:NaN)/3)))),s=Math.pow(10,-a),l=p[8+a/3];return function(e){return i(s*e)+l}}}}d=m({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),h=d.format,d.formatPrefix},65704:function(e,t,n){"use strict";n.r(t),n.d(t,{geoAiry:function(){return I},geoAiryRaw:function(){return L},geoAitoff:function(){return N},geoAitoffRaw:function(){return z},geoArmadillo:function(){return B},geoArmadilloRaw:function(){return F},geoAugust:function(){return U},geoAugustRaw:function(){return j},geoBaker:function(){return G},geoBakerRaw:function(){return W},geoBerghaus:function(){return $},geoBerghausRaw:function(){return Y},geoBertin1953:function(){return ne},geoBertin1953Raw:function(){return te},geoBoggs:function(){return ue},geoBoggsRaw:function(){return ce},geoBonne:function(){return me},geoBonneRaw:function(){return pe},geoBottomley:function(){return ve},geoBottomleyRaw:function(){return ge},geoBromley:function(){return xe},geoBromleyRaw:function(){return ye},geoChamberlin:function(){return Ee},geoChamberlinAfrica:function(){return ke},geoChamberlinRaw:function(){return Me},geoCollignon:function(){return De},geoCollignonRaw:function(){return Ce},geoCraig:function(){return Pe},geoCraigRaw:function(){return Re},geoCraster:function(){return Ie},geoCrasterRaw:function(){return Le},geoCylindricalEqualArea:function(){return Ne},geoCylindricalEqualAreaRaw:function(){return ze},geoCylindricalStereographic:function(){return Be},geoCylindricalStereographicRaw:function(){return Fe},geoEckert1:function(){return Ue},geoEckert1Raw:function(){return je},geoEckert2:function(){return He},geoEckert2Raw:function(){return Ve},geoEckert3:function(){return Ge},geoEckert3Raw:function(){return We},geoEckert4:function(){return Ye},geoEckert4Raw:function(){return qe},geoEckert5:function(){return Xe},geoEckert5Raw:function(){return $e},geoEckert6:function(){return Ke},geoEckert6Raw:function(){return Ze},geoEisenlohr:function(){return et},geoEisenlohrRaw:function(){return Qe},geoFahey:function(){return rt},geoFaheyRaw:function(){return nt},geoFoucaut:function(){return at},geoFoucautRaw:function(){return it},geoFoucautSinusoidal:function(){return st},geoFoucautSinusoidalRaw:function(){return ot},geoGilbert:function(){return ht},geoGingery:function(){return gt},geoGingeryRaw:function(){return ft},geoGinzburg4:function(){return xt},geoGinzburg4Raw:function(){return yt},geoGinzburg5:function(){return _t},geoGinzburg5Raw:function(){return bt},geoGinzburg6:function(){return At},geoGinzburg6Raw:function(){return wt},geoGinzburg8:function(){return Mt},geoGinzburg8Raw:function(){return St},geoGinzburg9:function(){return kt},geoGinzburg9Raw:function(){return Tt},geoGringorten:function(){return Dt},geoGringortenQuincuncial:function(){return ai},geoGringortenRaw:function(){return Ct},geoGuyou:function(){return Lt},geoGuyouRaw:function(){return Ot},geoHammer:function(){return J},geoHammerRaw:function(){return Z},geoHammerRetroazimuthal:function(){return Ft},geoHammerRetroazimuthalRaw:function(){return zt},geoHealpix:function(){return Yt},geoHealpixRaw:function(){return Ht},geoHill:function(){return Xt},geoHillRaw:function(){return $t},geoHomolosine:function(){return tn},geoHomolosineRaw:function(){return en},geoHufnagel:function(){return rn},geoHufnagelRaw:function(){return nn},geoHyperelliptical:function(){return ln},geoHyperellipticalRaw:function(){return sn},geoInterrupt:function(){return dn},geoInterruptedBoggs:function(){return fn},geoInterruptedHomolosine:function(){return mn},geoInterruptedMollweide:function(){return vn},geoInterruptedMollweideHemispheres:function(){return xn},geoInterruptedQuarticAuthalic:function(){return dr},geoInterruptedSinuMollweide:function(){return _n},geoInterruptedSinusoidal:function(){return An},geoKavrayskiy7:function(){return Mn},geoKavrayskiy7Raw:function(){return Sn},geoLagrange:function(){return kn},geoLagrangeRaw:function(){return Tn},geoLarrivee:function(){return Dn},geoLarriveeRaw:function(){return Cn},geoLaskowski:function(){return Pn},geoLaskowskiRaw:function(){return Rn},geoLittrow:function(){return Ln},geoLittrowRaw:function(){return On},geoLoximuthal:function(){return zn},geoLoximuthalRaw:function(){return In},geoMiller:function(){return Fn},geoMillerRaw:function(){return Nn},geoModifiedStereographic:function(){return Zn},geoModifiedStereographicAlaska:function(){return Gn},geoModifiedStereographicGs48:function(){return qn},geoModifiedStereographicGs50:function(){return Yn},geoModifiedStereographicLee:function(){return Xn},geoModifiedStereographicMiller:function(){return $n},geoModifiedStereographicRaw:function(){return Bn},geoMollweide:function(){return oe},geoMollweideRaw:function(){return ae},geoMtFlatPolarParabolic:function(){return er},geoMtFlatPolarParabolicRaw:function(){return Qn},geoMtFlatPolarQuartic:function(){return nr},geoMtFlatPolarQuarticRaw:function(){return tr},geoMtFlatPolarSinusoidal:function(){return ir},geoMtFlatPolarSinusoidalRaw:function(){return rr},geoNaturalEarth:function(){return ar.Z},geoNaturalEarth2:function(){return sr},geoNaturalEarth2Raw:function(){return or},geoNaturalEarthRaw:function(){return ar.K},geoNellHammer:function(){return cr},geoNellHammerRaw:function(){return lr},geoNicolosi:function(){return fr},geoNicolosiRaw:function(){return hr},geoPatterson:function(){return Sr},geoPattersonRaw:function(){return Ar},geoPeirceQuincuncial:function(){return oi},geoPierceQuincuncial:function(){return oi},geoPolyconic:function(){return Tr},geoPolyconicRaw:function(){return Mr},geoPolyhedral:function(){return Or},geoPolyhedralButterfly:function(){return jr},geoPolyhedralCollignon:function(){return Hr},geoPolyhedralWaterman:function(){return Wr},geoProject:function(){return Xr},geoQuantize:function(){return si},geoQuincuncial:function(){return ii},geoRectangularPolyconic:function(){return ci},geoRectangularPolyconicRaw:function(){return li},geoRobinson:function(){return hi},geoRobinsonRaw:function(){return di},geoSatellite:function(){return pi},geoSatelliteRaw:function(){return fi},geoSinuMollweide:function(){return Qt},geoSinuMollweideRaw:function(){return Jt},geoSinusoidal:function(){return fe},geoSinusoidalRaw:function(){return he},geoStitch:function(){return Oi},geoTimes:function(){return Ii},geoTimesRaw:function(){return Li},geoTwoPointAzimuthal:function(){return Bi},geoTwoPointAzimuthalRaw:function(){return Ni},geoTwoPointAzimuthalUsa:function(){return Fi},geoTwoPointEquidistant:function(){return Vi},geoTwoPointEquidistantRaw:function(){return ji},geoTwoPointEquidistantUsa:function(){return Ui},geoVanDerGrinten:function(){return Wi},geoVanDerGrinten2:function(){return qi},geoVanDerGrinten2Raw:function(){return Gi},geoVanDerGrinten3:function(){return $i},geoVanDerGrinten3Raw:function(){return Yi},geoVanDerGrinten4:function(){return Zi},geoVanDerGrinten4Raw:function(){return Xi},geoVanDerGrintenRaw:function(){return Hi},geoWagner:function(){return Ji},geoWagner4:function(){return ra},geoWagner4Raw:function(){return na},geoWagner6:function(){return aa},geoWagner6Raw:function(){return ia},geoWagner7:function(){return Qi},geoWagnerRaw:function(){return Ki},geoWiechel:function(){return sa},geoWiechelRaw:function(){return oa},geoWinkel3:function(){return ca},geoWinkel3Raw:function(){return la}});var r=n(15002),i=Math.abs,a=Math.atan,o=Math.atan2,s=(Math.ceil,Math.cos),l=Math.exp,c=Math.floor,u=Math.log,d=Math.max,h=Math.min,f=Math.pow,p=Math.round,m=Math.sign||function(e){return e>0?1:e<0?-1:0},g=Math.sin,v=Math.tan,y=1e-6,x=1e-12,b=Math.PI,_=b/2,w=b/4,A=Math.SQRT1_2,S=R(2),M=R(b),T=2*b,k=180/b,E=b/180;function C(e){return e>1?_:e<-1?-_:Math.asin(e)}function D(e){return e>1?0:e<-1?b:Math.acos(e)}function R(e){return e>0?Math.sqrt(e):0}function P(e){return(l(e)-l(-e))/2}function O(e){return(l(e)+l(-e))/2}function L(e){var t=v(e/2),n=2*u(s(e/2))/(t*t);function r(e,t){var r=s(e),i=s(t),a=g(t),o=i*r,l=-((1-o?u((1+o)/2)/(1-o):-.5)+n/(1+o));return[l*i*g(e),l*a]}return r.invert=function(t,r){var a,l=R(t*t+r*r),c=-e/2,d=50;if(!l)return[0,0];do{var h=c/2,f=s(h),p=g(h),m=p/f,v=-u(i(f));c-=a=(2/m*v-n*m-l)/(-v/(p*p)+1-n/(2*f*f))*(f<0?.7:1)}while(i(a)>y&&--d>0);var x=g(c);return[o(t*x,l*s(c)),C(r*x/l)]},r}function I(){var e=_,t=(0,r.r)(L),n=t(e);return n.radius=function(n){return arguments.length?t(e=n*E):e*k},n.scale(179.976).clipAngle(147)}function z(e,t){var n=s(t),r=function(e){return e?e/Math.sin(e):1}(D(n*s(e/=2)));return[2*n*g(e)*r,g(t)*r]}function N(){return(0,r.Z)(z).scale(152.63)}function F(e){var t=g(e),n=s(e),r=e>=0?1:-1,a=v(r*e),l=(1+t-n)/2;function c(e,i){var c=s(i),u=s(e/=2);return[(1+c)*g(e),(r*i>-o(u,a)-.001?0:10*-r)+l+g(i)*n-(1+c)*t*u]}return c.invert=function(e,c){var u=0,d=0,h=50;do{var f=s(u),p=g(u),m=s(d),v=g(d),x=1+m,b=x*p-e,_=l+v*n-x*t*f-c,w=x*f/2,A=-p*v,S=t*x*p/2,M=n*m+t*f*v,T=A*S-M*w,k=(_*A-b*M)/T/2,E=(b*S-_*w)/T;i(E)>2&&(E/=2),u-=k,d-=E}while((i(k)>y||i(E)>y)&&--h>0);return r*d>-o(s(u),a)-.001?[2*u,d]:null},c}function B(){var e=20*E,t=e>=0?1:-1,n=v(t*e),i=(0,r.r)(F),a=i(e),l=a.stream;return a.parallel=function(r){return arguments.length?(n=v((t=(e=r*E)>=0?1:-1)*e),i(e)):e*k},a.stream=function(r){var i=a.rotate(),c=l(r),u=(a.rotate([0,0]),l(r)),d=a.precision();return a.rotate(i),c.sphere=function(){u.polygonStart(),u.lineStart();for(var r=-180*t;t*r<180;r+=90*t)u.point(r,90*t);if(e)for(;t*(r-=3*t*d)>=-180;)u.point(r,t*-o(s(r*E/2),n)*k);u.lineEnd(),u.polygonEnd()},c},a.scale(218.695).center([0,28.0974])}function j(e,t){var n=v(t/2),r=R(1-n*n),i=1+r*s(e/=2),a=g(e)*r/i,o=n/i,l=a*a,c=o*o;return[4/3*a*(3+l-3*c),4/3*o*(3+3*l-c)]}function U(){return(0,r.Z)(j).scale(66.1603)}z.invert=function(e,t){if(!(e*e+4*t*t>b*b+y)){var n=e,r=t,a=25;do{var o,l=g(n),c=g(n/2),u=s(n/2),d=g(r),h=s(r),f=g(2*r),p=d*d,m=h*h,v=c*c,x=1-m*u*u,_=x?D(h*u)*R(o=1/x):o=0,w=2*_*h*c-e,A=_*d-t,S=o*(m*v+_*h*u*p),M=o*(.5*l*f-2*_*d*c),T=.25*o*(f*c-_*d*m*l),k=o*(p*u+_*v*h),E=M*T-k*S;if(!E)break;var C=(A*M-w*k)/E,P=(w*T-A*S)/E;n-=C,r-=P}while((i(C)>y||i(P)>y)&&--a>0);return[n,r]}},j.invert=function(e,t){if(t*=3/8,!(e*=3/8)&&i(t)>1)return null;var n=1+e*e+t*t,r=R((n-R(n*n-4*t*t))/2),a=C(r)/3,l=r?function(e){return u(e+R(e*e-1))}(i(t/r))/3:function(e){return u(e+R(e*e+1))}(i(e))/3,c=s(a),d=O(l),h=d*d-c*c;return[2*m(e)*o(P(l)*c,.25-h),2*m(t)*o(d*g(a),.25+h)]};var V=R(8),H=u(1+S);function W(e,t){var n=i(t);return nx&&--c>0);return[e/(s(o)*(V-1/g(o))),m(t)*o]};var q=n(17889);function Y(e){var t=2*b/e;function n(e,n){var r=(0,q.N)(e,n);if(i(e)>_){var a=o(r[1],r[0]),l=R(r[0]*r[0]+r[1]*r[1]),c=t*p((a-_)/t)+_,u=o(g(a-=c),2-s(a));a=c+C(b/l*g(u))-u,r[0]=l*s(a),r[1]=l*g(a)}return r}return n.invert=function(e,n){var r=R(e*e+n*n);if(r>_){var i=o(n,e),l=t*p((i-_)/t)+_,c=i>l?-1:1,u=r*s(l-i),d=1/v(c*D((u-b)/R(b*(b-2*u)+r*r)));i=l+2*a((d+c*R(d*d-3))/3),e=r*s(i),n=r*g(i)}return q.N.invert(e,n)},n}function $(){var e=5,t=(0,r.r)(Y),n=t(e),i=n.stream,a=.01,l=-s(a*E),c=g(a*E);return n.lobes=function(n){return arguments.length?t(e=+n):e},n.stream=function(t){var r=n.rotate(),u=i(t),d=(n.rotate([0,0]),i(t));return n.rotate(r),u.sphere=function(){d.polygonStart(),d.lineStart();for(var t=0,n=360/e,r=2*b/e,i=90-180/e,u=_;t0&&i(r)>y);return s<0?NaN:n}function ee(e,t,n){return void 0===t&&(t=40),void 0===n&&(n=x),function(r,a,o,s){var l,c,u;o=void 0===o?0:+o,s=void 0===s?0:+s;for(var d=0;dl)o-=c/=2,s-=u/=2;else{l=m;var g=(o>0?-1:1)*n,v=(s>0?-1:1)*n,y=e(o+g,s),x=e(o,s+v),b=(y[0]-h[0])/g,_=(y[1]-h[1])/g,w=(x[0]-h[0])/v,A=(x[1]-h[1])/v,S=A*b-_*w,M=(i(S)<.5?.5:1)/S;if(o+=c=(p*w-f*A)*M,s+=u=(f*_-p*b)*M,i(c)0&&(i[1]*=1+a/1.5*i[0]*i[0]),i}return t.invert=ee(t),t}function ne(){return(0,r.Z)(te()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function re(e,t){var n,r=e*g(t),a=30;do{t-=n=(t+g(t)-r)/(1+s(t))}while(i(n)>y&&--a>0);return t/2}function ie(e,t,n){function r(r,i){return[e*r*s(i=re(n,i)),t*g(i)]}return r.invert=function(r,i){return i=C(i/t),[r/(e*s(i)),C((2*i+g(2*i))/n)]},r}K.invert=function(e,t){var n=2*C(t/2);return[e*s(n/2)/s(n),n]};var ae=ie(S/_,S,b);function oe(){return(0,r.Z)(ae).scale(169.529)}var se=2.00276,le=1.11072;function ce(e,t){var n=re(b,t);return[se*e/(1/s(t)+le/s(n)),(t+S*g(n))/se]}function ue(){return(0,r.Z)(ce).scale(160.857)}function de(e){var t=0,n=(0,r.r)(e),i=n(t);return i.parallel=function(e){return arguments.length?n(t=e*E):t*k},i}function he(e,t){return[e*s(t),t]}function fe(){return(0,r.Z)(he).scale(152.63)}function pe(e){if(!e)return he;var t=1/v(e);function n(n,r){var i=t+e-r,a=i?n*s(r)/i:i;return[i*g(a),t-i*s(a)]}return n.invert=function(n,r){var i=R(n*n+(r=t-r)*r),a=t+e-i;return[i/s(a)*o(n,r),a]},n}function me(){return de(pe).scale(123.082).center([0,26.1441]).parallel(45)}function ge(e){function t(t,n){var r=_-n,i=r?t*e*g(r)/r:r;return[r*g(i)/e,_-r*s(i)]}return t.invert=function(t,n){var r=t*e,i=_-n,a=R(r*r+i*i),s=o(r,i);return[(a?a/g(a):1)*s/e,_-a]},t}function ve(){var e=.5,t=(0,r.r)(ge),n=t(e);return n.fraction=function(n){return arguments.length?t(e=+n):e},n.scale(158.837)}ce.invert=function(e,t){var n,r,a=se*t,o=t<0?-w:w,l=25;do{r=a-S*g(o),o-=n=(g(2*o)+2*o-b*g(r))/(2*s(2*o)+2+b*s(r)*S*s(o))}while(i(n)>y&&--l>0);return r=a-S*g(o),[e*(1/s(r)+le/s(o))/se,r]},he.invert=function(e,t){return[e/s(t),t]};var ye=ie(1,4/b,b);function xe(){return(0,r.Z)(ye).scale(152.63)}var be=n(66624),_e=n(49386);function we(e,t,n,r,a,l){var c,u=s(l);if(i(e)>1||i(l)>1)c=D(n*a+t*r*u);else{var d=g(e/2),h=g(l/2);c=2*C(R(d*d+t*r*h*h))}return i(c)>y?[c,o(r*g(l),t*a-n*r*u)]:[0,0]}function Ae(e,t,n){return D((e*e+t*t-n*n)/(2*e*t))}function Se(e){return e-2*b*c((e+b)/(2*b))}function Me(e,t,n){for(var r,i=[[e[0],e[1],g(e[1]),s(e[1])],[t[0],t[1],g(t[1]),s(t[1])],[n[0],n[1],g(n[1]),s(n[1])]],a=i[2],o=0;o<3;++o,a=r)r=i[o],a.v=we(r[1]-a[1],a[3],a[2],r[3],r[2],r[0]-a[0]),a.point=[0,0];var l=Ae(i[0].v[0],i[2].v[0],i[1].v[0]),c=Ae(i[0].v[0],i[1].v[0],i[2].v[0]),u=b-l;i[2].point[1]=0,i[0].point[0]=-(i[1].point[0]=i[0].v[0]/2);var d=[i[2].point[0]=i[0].point[0]+i[2].v[0]*s(l),2*(i[0].point[1]=i[1].point[1]=i[2].v[0]*g(l))];return function(e,t){var n,r=g(t),a=s(t),o=new Array(3);for(n=0;n<3;++n){var l=i[n];if(o[n]=we(t-l[1],l[3],l[2],a,r,e-l[0]),!o[n][0])return l.point;o[n][1]=Se(o[n][1]-l.v[1])}var h=d.slice();for(n=0;n<3;++n){var f=2==n?0:n+1,p=Ae(i[n].v[0],o[n][0],o[f][0]);o[n][1]<0&&(p=-p),n?1==n?(p=c-p,h[0]-=o[n][0]*s(p),h[1]-=o[n][0]*g(p)):(p=u-p,h[0]+=o[n][0]*s(p),h[1]+=o[n][0]*g(p)):(h[0]+=o[n][0]*s(p),h[1]-=o[n][0]*g(p))}return h[0]/=3,h[1]/=3,h}}function Te(e){return e[0]*=E,e[1]*=E,e}function ke(){return Ee([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Ee(e,t,n){var i=(0,be.Z)({type:"MultiPoint",coordinates:[e,t,n]}),a=[-i[0],-i[1]],o=(0,_e.Z)(a),s=Me(Te(o(e)),Te(o(t)),Te(o(n)));s.invert=ee(s);var l=(0,r.Z)(s).rotate(a),c=l.center;return delete l.rotate,l.center=function(e){return arguments.length?c(o(e)):o.invert(c())},l.clipAngle(90)}function Ce(e,t){var n=R(1-g(t));return[2/M*e*n,M*(1-n)]}function De(){return(0,r.Z)(Ce).scale(95.6464).center([0,30])}function Re(e){var t=v(e);function n(e,n){return[e,(e?e/g(e):1)*(g(n)*s(e)-t*s(n))]}return n.invert=t?function(e,n){e&&(n*=g(e)/e);var r=s(e);return[e,2*o(R(r*r+t*t-n*n)-r,t-n)]}:function(e,t){return[e,C(e?t*v(e)/e:t)]},n}function Pe(){return de(Re).scale(249.828).clipAngle(90)}Ce.invert=function(e,t){var n=(n=t/M-1)*n;return[n>0?e*R(b/n)/2:0,C(1-n)]};var Oe=R(3);function Le(e,t){return[Oe*e*(2*s(2*t/3)-1)/M,Oe*M*g(t/3)]}function Ie(){return(0,r.Z)(Le).scale(156.19)}function ze(e){var t=s(e);function n(e,n){return[e*t,g(n)/t]}return n.invert=function(e,n){return[e/t,C(n*t)]},n}function Ne(){return de(ze).parallel(38.58).scale(195.044)}function Fe(e){var t=s(e);function n(e,n){return[e*t,(1+t)*v(n/2)]}return n.invert=function(e,n){return[e/t,2*a(n/(1+t))]},n}function Be(){return de(Fe).scale(124.75)}function je(e,t){var n=R(8/(3*b));return[n*e*(1-i(t)/b),n*t]}function Ue(){return(0,r.Z)(je).scale(165.664)}function Ve(e,t){var n=R(4-3*g(i(t)));return[2/R(6*b)*e*n,m(t)*R(2*b/3)*(2-n)]}function He(){return(0,r.Z)(Ve).scale(165.664)}function We(e,t){var n=R(b*(4+b));return[2/n*e*(1+R(1-4*t*t/(b*b))),4/n*t]}function Ge(){return(0,r.Z)(We).scale(180.739)}function qe(e,t){var n=(2+_)*g(t);t/=2;for(var r=0,a=1/0;r<10&&i(a)>y;r++){var o=s(t);t-=a=(t+g(t)*(o+2)-n)/(2*o*(1+o))}return[2/R(b*(4+b))*e*(1+s(t)),2*R(b/(4+b))*g(t)]}function Ye(){return(0,r.Z)(qe).scale(180.739)}function $e(e,t){return[e*(1+s(t))/R(2+b),2*t/R(2+b)]}function Xe(){return(0,r.Z)($e).scale(173.044)}function Ze(e,t){for(var n=(1+_)*g(t),r=0,a=1/0;r<10&&i(a)>y;r++)t-=a=(t+g(t)-n)/(1+s(t));return n=R(2+b),[e*(1+s(t))/n,2*t/n]}function Ke(){return(0,r.Z)(Ze).scale(173.044)}Le.invert=function(e,t){var n=3*C(t/(Oe*M));return[M*e/(Oe*(2*s(2*n/3)-1)),n]},je.invert=function(e,t){var n=R(8/(3*b)),r=t/n;return[e/(n*(1-i(r)/b)),r]},Ve.invert=function(e,t){var n=2-i(t)/R(2*b/3);return[e*R(6*b)/(2*n),m(t)*C((4-n*n)/3)]},We.invert=function(e,t){var n=R(b*(4+b))/2;return[e*n/(1+R(1-t*t*(4+b)/(4*b))),t*n/2]},qe.invert=function(e,t){var n=t*R((4+b)/b)/2,r=C(n),i=s(r);return[e/(2/R(b*(4+b))*(1+i)),C((r+n*(i+2))/(2+_))]},$e.invert=function(e,t){var n=R(2+b),r=t*n/2;return[n*e/(1+s(r)),r]},Ze.invert=function(e,t){var n=1+_,r=R(n/2);return[2*e*r/(1+s(t*=r)),C((t+g(t))/n)]};var Je=3+2*S;function Qe(e,t){var n=g(e/=2),r=s(e),i=R(s(t)),o=s(t/=2),l=g(t)/(o+S*r*i),c=R(2/(1+l*l)),d=R((S*o+(r+n)*i)/(S*o+(r-n)*i));return[Je*(c*(d-1/d)-2*u(d)),Je*(c*l*(d+1/d)-2*a(l))]}function et(){return(0,r.Z)(Qe).scale(62.5271)}Qe.invert=function(e,t){if(!(n=j.invert(e/1.2,1.065*t)))return null;var n,r=n[0],o=n[1],l=20;e/=Je,t/=Je;do{var c=r/2,f=o/2,p=g(c),m=s(c),v=g(f),x=s(f),b=s(o),w=R(b),M=v/(x+S*m*w),T=M*M,k=R(2/(1+T)),E=(S*x+(m+p)*w)/(S*x+(m-p)*w),C=R(E),D=C-1/C,P=C+1/C,O=k*D-2*u(C)-e,L=k*M*P-2*a(M)-t,I=v&&A*w*p*T/v,z=(S*m*x+w)/(2*(x+S*m*w)*(x+S*m*w)*w),N=-.5*M*k*k*k,F=N*I,B=N*z,U=(U=2*x+S*w*(m-p))*U*C,V=(S*m*x*w+b)/U,H=-S*p*v/(w*U),W=D*F-2*V/C+k*(V+V/E),G=D*B-2*H/C+k*(H+H/E),q=M*P*F-2*I/(1+T)+k*P*I+k*M*(V-V/E),Y=M*P*B-2*z/(1+T)+k*P*z+k*M*(H-H/E),$=G*q-Y*W;if(!$)break;var X=(L*G-O*Y)/$,Z=(O*q-L*W)/$;r-=X,o=d(-_,h(_,o-Z))}while((i(X)>y||i(Z)>y)&&--l>0);return i(i(o)-_)r){var h=R(d),f=o(u,c),m=n*p(f/n),v=f-m,x=e*s(v),w=(e*g(v)-v*g(x))/(_-x),A=pt(v,w),S=(b-e)/mt(A,x,b);c=h;var M,T=50;do{c-=M=(e+mt(A,x,c)*S-h)/(A(c)*S)}while(i(M)>y&&--T>0);u=v*g(c),c<_&&(u-=w*(c-_));var k=g(m),E=s(m);l[0]=c*E-u*k,l[1]=c*k+u*E}return l}return a.invert=function(t,a){var l=t*t+a*a;if(l>r){var c=R(l),u=o(a,t),d=n*p(u/n),h=u-d;t=c*s(h),a=c*g(h);for(var f=t-_,m=g(t),v=a/m,y=t<_?1/0:0,w=10;;){var A=e*g(v),S=e*s(v),M=g(S),T=_-S,k=(A-v*M)/T,E=pt(v,k);if(i(y)y||i(f)>y)&&--v>0);return[p,m]},u}var yt=vt(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function xt(){return(0,r.Z)(yt).scale(149.995)}var bt=vt(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function _t(){return(0,r.Z)(bt).scale(153.93)}var wt=vt(5/6*b,-.62636,-.0344,0,1.3493,-.05524,0,.045);function At(){return(0,r.Z)(wt).scale(130.945)}function St(e,t){var n=e*e,r=t*t;return[e*(1-.162388*r)*(.87-952426e-9*n*n),t*(1+r/12)]}function Mt(){return(0,r.Z)(St).scale(131.747)}St.invert=function(e,t){var n,r=e,a=t,o=50;do{var s=a*a;a-=n=(a*(1+s/12)-t)/(1+s/4)}while(i(n)>y&&--o>0);o=50,e/=1-.162388*s;do{var l=(l=r*r)*l;r-=n=(r*(.87-952426e-9*l)-e)/(.87-.00476213*l)}while(i(n)>y&&--o>0);return[r,a]};var Tt=vt(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function kt(){return(0,r.Z)(Tt).scale(131.087)}function Et(e){var t=e(_,0)[0]-e(-_,0)[0];function n(n,r){var i=n>0?-.5:.5,a=e(n+i*b,r);return a[0]-=i*t,a}return e.invert&&(n.invert=function(n,r){var i=n>0?-.5:.5,a=e.invert(n+i*t,r),o=a[0]-i*b;return o<-b?o+=2*b:o>b&&(o-=2*b),a[0]=o,a}),n}function Ct(e,t){var n=m(e),r=m(t),a=s(t),l=s(e)*a,c=g(e)*a,u=g(r*t);e=i(o(c,u)),t=C(l),i(e-_)>y&&(e%=_);var d=function(e,t){if(t===_)return[0,0];var n,r,a=g(t),o=a*a,l=o*o,c=1+l,u=1+3*l,d=1-l,h=C(1/R(c)),f=d+o*c*h,p=(1-a)/f,m=R(p),v=p*c,x=R(v),w=m*d;if(0===e)return[0,-(w+o*x)];var A,S=s(t),M=1/S,T=2*a*S,k=(-3*o+h*u)*T,E=(-f*S-(1-a)*k)/(f*f),D=o*c*E+p*u*T,P=-M*T,O=-M*D,L=-2*M*(d*(.5*E/m)-2*o*m*T),I=4*e/b;if(e>.222*b||t.175*b){if(n=(w+o*R(v*(1+l)-w*w))/(1+l),e>b/4)return[n,n];var z=n,N=.5*n;n=.5*(N+z),r=50;do{var F=n*(L+P*R(v-n*n))+O*C(n/x)-I;if(!F)break;F<0?N=n:z=n,n=.5*(N+z)}while(i(z-N)>y&&--r>0)}else{n=y,r=25;do{var B=n*n,j=R(v-B),U=L+P*j,V=n*U+O*C(n/x)-I;n-=A=j?V/(U+(O-P*B)/j):0}while(i(A)>y&&--r>0)}return[n,-w-o*R(v-n*n)]}(e>b/4?_-e:e,t);return e>b/4&&(u=d[0],d[0]=-d[1],d[1]=-u),d[0]*=n,d[1]*=-r,d}function Dt(){return(0,r.Z)(Et(Ct)).scale(239.75)}function Rt(e,t){var n,r,o,c,u,d;if(t=1-y)return n=(1-t)/4,o=1/(r=O(e)),[(c=((d=l(2*(d=e)))-1)/(d+1))+n*((u=r*P(e))-e)/(r*r),o-n*c*o*(u-e),o+n*c*o*(u+e),2*a(l(e))-_+n*(u-e)/r];var h=[1,0,0,0,0,0,0,0,0],f=[R(t),0,0,0,0,0,0,0,0],p=0;for(r=R(1-t),u=1;i(f[p]/h[p])>y&&p<8;)n=h[p++],f[p]=(n-r)/2,h[p]=(n+r)/2,r=R(n*r),u*=2;o=u*h[p]*e;do{o=(C(c=f[p]*g(r=o)/h[p])+o)/2}while(--p);return[g(o),c=s(o),c/s(o-r),o]}function Pt(e,t){if(!t)return e;if(1===t)return u(v(e/2+w));for(var n=1,r=R(1-t),o=R(t),s=0;i(o)>y;s++){if(e%b){var l=a(r*v(e)/n);l<0&&(l+=b),e+=l+~~(e/b)*b}else e+=e;o=(n+r)/2,r=R(n*r),o=((n=o)-r)/2}return e/(f(2,s)*n)}function Ot(e,t){var n=(S-1)/(S+1),r=R(1-n*n),c=Pt(_,r*r),d=u(v(b/4+i(t)/2)),h=l(-1*d)/R(n),f=function(e,t){var n=e*e,r=t+1,i=1-n-t*t;return[.5*((e>=0?_:-_)-o(i,2*e)),-.25*u(i*i+4*n)+.5*u(r*r+n)]}(h*s(-1*e),h*g(-1*e)),p=function(e,t,n){var r=i(e),o=P(i(t));if(r){var s=1/g(r),l=1/(v(r)*v(r)),c=-(l+n*(o*o*s*s)-1+n),u=(-c+R(c*c-(n-1)*l*4))/2;return[Pt(a(1/R(u)),n)*m(e),Pt(a(R((u/l-1)/n)),1-n)*m(t)]}return[0,Pt(a(o),1-n)*m(t)]}(f[0],f[1],r*r);return[-p[1],(t>=0?1:-1)*(.5*c-p[0])]}function Lt(){return(0,r.Z)(Et(Ot)).scale(151.496)}Ct.invert=function(e,t){i(e)>1&&(e=2*m(e)-e),i(t)>1&&(t=2*m(t)-t);var n=m(e),r=m(t),a=-n*e,l=-r*t,c=l/a<1,u=function(e,t){var n=0,r=1,a=.5,o=50;for(;;){var l=a*a,c=R(a),u=C(1/R(1+l)),d=1-l+a*(1+l)*u,h=(1-c)/d,f=R(h),p=h*(1+l),m=f*(1-l),g=R(p-e*e),v=t+m+a*g;if(i(r-n)0?n=a:r=a,a=.5*(n+r)}if(!o)return null;var y=C(c),_=s(y),w=1/_,A=2*c*_,S=(-d*_-(-3*a+u*(1+3*l))*A*(1-c))/(d*d),M=.5*S/f,T=(1-l)*M-2*a*f*A;return[b/4*(e*(-2*w*T+-w*A*g)+-w*(a*(1+l)*S+h*(1+3*l)*A)*C(e/R(p))),y]}(c?l:a,c?a:l),d=u[0],h=u[1],f=s(h);return c&&(d=-_-d),[n*(o(g(d)*f,-g(h))+b),r*C(s(d)*f)]},Ot.invert=function(e,t){var n=(S-1)/(S+1),r=R(1-n*n),i=function(e,t,n){var r,i,a;return e?(r=Rt(e,n),t?(a=(i=Rt(t,1-n))[1]*i[1]+n*r[0]*r[0]*i[0]*i[0],[[r[0]*i[2]/a,r[1]*r[2]*i[0]*i[1]/a],[r[1]*i[1]/a,-r[0]*r[2]*i[0]*i[2]/a],[r[2]*i[1]*i[2]/a,-n*r[0]*r[1]*i[0]/a]]):[[r[0],0],[r[1],0],[r[2],0]]):[[0,(i=Rt(t,1-n))[0]/i[1]],[1/i[1],0],[i[2]/i[1],0]]}(.5*Pt(_,r*r)-t,-e,r*r),s=function(e,t){var n=t[0]*t[0]+t[1]*t[1];return[(e[0]*t[0]+e[1]*t[1])/n,(e[1]*t[0]-e[0]*t[1])/n]}(i[0],i[1]);return[o(s[1],s[0])/-1,2*a(l(-.5*u(n*s[0]*s[0]+n*s[1]*s[1])))-_]};var It=n(7613);function zt(e){var t=g(e),n=s(e),r=Nt(e);function a(e,a){var o=r(e,a);e=o[0],a=o[1];var l=g(a),c=s(a),u=s(e),d=D(t*l+n*c*u),h=g(d),f=i(h)>y?d/h:1;return[f*n*g(e),(i(e)>_?f:-f)*(t*c-n*l*u)]}return r.invert=Nt(-e),a.invert=function(e,n){var i=R(e*e+n*n),a=-g(i),l=s(i),c=i*l,u=-n*a,d=i*t,h=R(c*c+u*u-d*d),f=o(c*d+u*h,u*d-c*h),p=(i>_?-1:1)*o(e*a,i*s(f)*l+n*g(f)*a);return r.invert(p,f)},a}function Nt(e){var t=g(e),n=s(e);return function(e,r){var i=s(r),a=s(e)*i,l=g(e)*i,c=g(r);return[o(l,a*n-c*t),C(c*n+a*t)]}}function Ft(){var e=0,t=(0,r.r)(zt),n=t(e),i=n.rotate,a=n.stream,o=(0,It.Z)();return n.parallel=function(r){if(!arguments.length)return e*k;var i=n.rotate();return t(e=r*E).rotate(i)},n.rotate=function(t){return arguments.length?(i.call(n,[t[0],t[1]-e*k]),o.center([-t[0],-t[1]]),n):((t=i.call(n))[1]+=e*k,t)},n.stream=function(e){return(e=a(e)).sphere=function(){e.polygonStart();var t,n=o.radius(89.99)().coordinates[0],r=n.length-1,i=-1;for(e.lineStart();++i=0;)e.point((t=n[i])[0],t[1]);e.lineEnd(),e.polygonEnd()},e},n.scale(79.4187).parallel(45).clipAngle(179.999)}var Bt=n(33064),jt=n(72736),Ut=C(1-1/3)*k,Vt=ze(0);function Ht(e){var t=Ut*E,n=Ce(b,t)[0]-Ce(-b,t)[0],r=Vt(0,t)[1],a=Ce(0,t)[1],o=M-a,s=T/e,l=4/T,u=r+o*o*4/T;function f(f,p){var m,g=i(p);if(g>t){var v=h(e-1,d(0,c((f+b)/s)));(m=Ce(f+=b*(e-1)/e-v*s,g))[0]=m[0]*T/n-T*(e-1)/(2*e)+v*T/e,m[1]=r+4*(m[1]-a)*o/T,p<0&&(m[1]=-m[1])}else m=Vt(f,p);return m[0]*=l,m[1]/=u,m}return f.invert=function(t,f){t/=l;var p=i(f*=u);if(p>r){var m=h(e-1,d(0,c((t+b)/s)));t=(t+b*(e-1)/e-m*s)*n/T;var g=Ce.invert(t,.25*(p-r)*T/o+a);return g[0]-=b*(e-1)/e-m*s,f<0&&(g[1]=-g[1]),g}return Vt.invert(t,f)},f}function Wt(e,t){return[e,1&t?90-y:Ut]}function Gt(e,t){return[e,1&t?-90+y:-Ut]}function qt(e){return[e[0]*(1-y),e[1]]}function Yt(){var e=4,t=(0,r.r)(Ht),n=t(e),i=n.stream;return n.lobes=function(n){return arguments.length?t(e=+n):e},n.stream=function(t){var r=n.rotate(),a=i(t),o=(n.rotate([0,0]),i(t));return n.rotate(r),a.sphere=function(){(0,jt.Z)(function(e){var t=[].concat((0,Bt.w6)(-180,180+e/2,e).map(Wt),(0,Bt.w6)(180,-180-e/2,-e).map(Gt));return{type:"Polygon",coordinates:[180===e?t.map(qt):t]}}(180/e),o)},a},n.scale(239.75)}function $t(e){var t,n=1+e,r=C(g(1/n)),a=2*R(b/(t=b+4*r*n)),l=.5*a*(n+R(e*(2+e))),c=e*e,u=n*n;function d(d,h){var f,p,m=1-g(h);if(m&&m<2){var v,y=_-h,w=25;do{var A=g(y),S=s(y),M=r+o(A,n-S),T=1+u-2*n*S;y-=v=(y-c*r-n*A+T*M-.5*m*t)/(2*n*A*M)}while(i(v)>x&&--w>0);f=a*R(T),p=d*M/b}else f=a*(e+m),p=d*r/b;return[f*g(p),l-f*s(p)]}return d.invert=function(e,i){var s=e*e+(i-=l)*i,d=(1+u-s/(a*a))/(2*n),h=D(d),f=g(h),p=r+o(f,n-d);return[C(e/R(s))*b/p,C(1-2*(h-c*r-n*f+(1+u-2*n*d)*p)/t)]},d}function Xt(){var e=1,t=(0,r.r)($t),n=t(e);return n.ratio=function(n){return arguments.length?t(e=+n):e},n.scale(167.774).center([0,18.67])}var Zt=.7109889596207567,Kt=.0528035274542;function Jt(e,t){return t>-Zt?((e=ae(e,t))[1]+=Kt,e):he(e,t)}function Qt(){return(0,r.Z)(Jt).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function en(e,t){return i(t)>Zt?((e=ae(e,t))[1]-=t>0?Kt:-Kt,e):he(e,t)}function tn(){return(0,r.Z)(en).scale(152.63)}function nn(e,t,n,r){var i=R(4*b/(2*n+(1+e-t/2)*g(2*n)+(e+t)/2*g(4*n)+t/2*g(6*n))),a=R(r*g(n)*R((1+e*s(2*n)+t*s(4*n))/(1+e+t))),o=n*c(1);function l(n){return R(1+e*s(2*n)+t*s(4*n))}function c(r){var i=r*n;return(2*i+(1+e-t/2)*g(2*i)+(e+t)/2*g(4*i)+t/2*g(6*i))/n}function u(e){return l(e)*g(e)}var d=function(e,t){var r=n*Q(c,o*g(t)/n,t/b);isNaN(r)&&(r=n*m(t));var u=i*l(r);return[u*a*e/b*s(r),u/a*g(r)]};return d.invert=function(e,t){var r=Q(u,t*a/i);return[e*b/(s(r)*i*a*l(r)),C(n*c(r/n)/o)]},0===n&&(i=R(r/b),(d=function(e,t){return[e*i,g(t)/i]}).invert=function(e,t){return[e/i,C(t*i)]}),d}function rn(){var e=1,t=0,n=45*E,i=2,a=(0,r.r)(nn),o=a(e,t,n,i);return o.a=function(r){return arguments.length?a(e=+r,t,n,i):e},o.b=function(r){return arguments.length?a(e,t=+r,n,i):t},o.psiMax=function(r){return arguments.length?a(e,t,n=+r*E,i):n*k},o.ratio=function(r){return arguments.length?a(e,t,n,i=+r):i},o.scale(180.739)}function an(e,t,n,r,i,a,o,s,l,c,u){if(u.nanEncountered)return NaN;var d,h,f,p,m,g,v,y,x,b;if(h=e(t+.25*(d=n-t)),f=e(n-.25*d),isNaN(h))u.nanEncountered=!0;else{if(!isNaN(f))return b=((g=(p=d*(r+4*h+i)/12)+(m=d*(i+4*f+a)/12))-o)/15,c>l?(u.maxDepthCount++,g+b):Math.abs(b)e?n=r:t=r,r=t+n>>1}while(r>t);var i=c[r+1]-c[r];return i&&(i=(e-c[r+1])/i),(r+1+i)/s}var h=2*d(1)/b*o/n,p=function(e,t){var n=d(i(g(t))),a=r(n)*e;return n/=h,[a,t>=0?n:-n]};return p.invert=function(e,t){var n;return i(t*=h)<1&&(n=m(t)*C(a(i(t))*o)),[e/r(i(t)),n]},p}function ln(){var e=0,t=2.5,n=1.183136,i=(0,r.r)(sn),a=i(e,t,n);return a.alpha=function(r){return arguments.length?i(e=+r,t,n):e},a.k=function(r){return arguments.length?i(e,t=+r,n):t},a.gamma=function(r){return arguments.length?i(e,t,n=+r):n},a.scale(152.63)}function cn(e,t){return i(e[0]-t[0])a[o][2][0];++o);var l=e(n-a[o][1][0],r);return l[0]+=e(a[o][1][0],i*r>i*a[o][0][1]?a[o][0][1]:r)[0],l}n?o.invert=n(o):e.invert&&(o.invert=function(n,r){for(var i=a[+(r<0)],s=t[+(r<0)],l=0,c=i.length;l=0;--s)n=(t=e[1][s])[0][0],r=t[0][1],i=t[1][1],a=t[2][0],o=t[2][1],l.push(un([[a-y,o-y],[a-y,i+y],[n+y,i+y],[n+y,r-y]],30));return{type:"Polygon",coordinates:[(0,Bt.TS)(l)]}}(n),t=n.map((function(e){return e.map((function(e){return[[e[0][0]*E,e[0][1]*E],[e[1][0]*E,e[1][1]*E],[e[2][0]*E,e[2][1]*E]]}))})),a=t.map((function(t){return t.map((function(t){var n,r=e(t[0][0],t[0][1])[0],i=e(t[2][0],t[2][1])[0],a=e(t[1][0],t[0][1])[1],o=e(t[1][0],t[1][1])[1];return a>o&&(n=a,a=o,o=n),[[r,a],[i,o]]}))})),s):t.map((function(e){return e.map((function(e){return[[e[0][0]*k,e[0][1]*k],[e[1][0]*k,e[1][1]*k],[e[2][0]*k,e[2][1]*k]]}))}))},null!=t&&s.lobes(t),s}Jt.invert=function(e,t){return t>-Zt?ae.invert(e,t-Kt):he.invert(e,t)},en.invert=function(e,t){return i(t)>Zt?ae.invert(e,t+(t>0?Kt:-Kt)):he.invert(e,t)};var hn=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function fn(){return dn(ce,hn).scale(160.857)}var pn=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function mn(){return dn(en,pn).scale(152.63)}var gn=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function vn(){return dn(ae,gn).scale(169.529)}var yn=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function xn(){return dn(ae,yn).scale(169.529).rotate([20,0])}var bn=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];function _n(){return dn(Jt,bn,ee).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var wn=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function An(){return dn(he,wn).scale(152.63).rotate([-20,0])}function Sn(e,t){return[3/T*e*R(b*b/3-t*t),t]}function Mn(){return(0,r.Z)(Sn).scale(158.837)}function Tn(e){function t(t,n){if(i(i(n)-_)2)return null;var a=(t/=2)*t,s=(n/=2)*n,l=2*n/(1+a+s);return l=f((1+l)/(1-l),1/e),[o(2*t,1-a-s)/e,C((l-1)/(l+1))]},t}function kn(){var e=.5,t=(0,r.r)(Tn),n=t(e);return n.spacing=function(n){return arguments.length?t(e=+n):e},n.scale(124.75)}Sn.invert=function(e,t){return[T/3*e/R(b*b/3-t*t),t]};var En=b/S;function Cn(e,t){return[e*(1+R(s(t)))/2,t/(s(t/2)*s(e/6))]}function Dn(){return(0,r.Z)(Cn).scale(97.2672)}function Rn(e,t){var n=e*e,r=t*t;return[e*(.975534+r*(-.0143059*n-.119161+-.0547009*r)),t*(1.00384+n*(.0802894+-.02855*r+199025e-9*n)+r*(.0998909+-.0491032*r))]}function Pn(){return(0,r.Z)(Rn).scale(139.98)}function On(e,t){return[g(e)/s(t),v(t)*s(e)]}function Ln(){return(0,r.Z)(On).scale(144.049).clipAngle(89.999)}function In(e){var t=s(e),n=v(w+e/2);function r(r,a){var o=a-e,s=i(o)=0;)h=(d=e[u])[0]+l*(i=h)-c*f,f=d[1]+l*f+c*i;return[h=l*(i=h)-c*f,f=l*f+c*i]}return n.invert=function(n,r){var l=20,c=n,u=r;do{for(var d,h=t,f=e[h],p=f[0],m=f[1],v=0,x=0;--h>=0;)v=p+c*(d=v)-u*x,x=m+c*x+u*d,p=(f=e[h])[0]+c*(d=p)-u*m,m=f[1]+c*m+u*d;var b,_,w=(v=p+c*(d=v)-u*x)*v+(x=m+c*x+u*d)*x;c-=b=((p=c*(d=p)-u*m-n)*v+(m=c*m+u*d-r)*x)/w,u-=_=(m*v-p*x)/w}while(i(b)+i(_)>y*y&&--l>0);if(l){var A=R(c*c+u*u),S=2*a(.5*A),M=g(S);return[o(c*M,A*s(S)),A?C(u*M/A):0]}},n}Cn.invert=function(e,t){var n=i(e),r=i(t),a=y,o=_;ry||i(x)>y)&&--a>0);return a&&[n,r]},On.invert=function(e,t){var n=e*e,r=t*t+1,i=n+r,a=e?A*R((i-R(i*i-4*n))/n):1/R(r);return[C(e*a),m(t)*D(a)]},Nn.invert=function(e,t){return[e,2.5*a(l(.8*t))-.625*b]};var jn=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],Un=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Vn=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],Hn=[[.9245,0],[0,0],[.01943,0]],Wn=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Gn(){return Zn(jn,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function qn(){return Zn(Un,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Yn(){return Zn(Vn,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function $n(){return Zn(Hn,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function Xn(){return Zn(Wn,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Zn(e,t){var n=(0,r.Z)(Bn(e)).rotate(t).clipAngle(90),i=(0,_e.Z)(t),a=n.center;return delete n.rotate,n.center=function(e){return arguments.length?a(i(e)):i.invert(a())},n}var Kn=R(6),Jn=R(7);function Qn(e,t){var n=C(7*g(t)/(3*Kn));return[Kn*e*(2*s(2*n/3)-1)/Jn,9*g(n/3)/Jn]}function er(){return(0,r.Z)(Qn).scale(164.859)}function tr(e,t){for(var n,r=(1+A)*g(t),a=t,o=0;o<25&&(a-=n=(g(a/2)+g(a)-r)/(.5*s(a/2)+s(a)),!(i(n)x&&--l>0);return[e/(.84719-.13063*(r=s*s)+(o=r*(a=r*r))*o*(.05494*r-.04515-.02326*a+.00331*o)),s]},lr.invert=function(e,t){for(var n=t/2,r=0,a=1/0;r<10&&i(a)>y;++r){var o=s(t/2);t-=a=(t-v(t/2)-n)/(1-.5/(o*o))}return[2*e/(1+s(t)),t]};var ur=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function dr(){return dn(Z(1/0),ur).rotate([20,0]).scale(152.63)}function hr(e,t){var n=g(t),r=s(t),a=m(e);if(0===e||i(t)===_)return[0,t];if(0===t)return[e,0];if(i(e)===_)return[e*r,_*n];var o=b/(2*e)-2*e/b,l=2*t/b,c=(1-l*l)/(n-l),u=o*o,d=c*c,h=1+u/d,f=1+d/u,p=(o*n/c-o/2)/h,v=(d*n/u+c/2)/f,y=v*v-(d*n*n/u+c*n-1)/f;return[_*(p+R(p*p+r*r/h)*a),_*(v+R(y<0?0:y)*m(-t*o)*a)]}function fr(){return(0,r.Z)(hr).scale(127.267)}hr.invert=function(e,t){var n=(e/=_)*e,r=n+(t/=_)*t,i=b*b;return[e?(r-1+R((1-r)*(1-r)+4*n))/(2*e)*_:0,Q((function(e){return r*(b*g(e)-2*e)*b+4*e*e*(t-g(e))+2*b*e-i*t}),0)]};var pr=1.0148,mr=.23185,gr=-.14499,vr=.02406,yr=pr,xr=5*mr,br=7*gr,_r=9*vr,wr=1.790857183;function Ar(e,t){var n=t*t;return[e,t*(pr+n*n*(mr+n*(gr+vr*n)))]}function Sr(){return(0,r.Z)(Ar).scale(139.319)}function Mr(e,t){if(i(t)wr?t=wr:t<-1.790857183&&(t=-1.790857183);var n,r=t;do{var a=r*r;r-=n=(r*(pr+a*a*(mr+a*(gr+vr*a)))-t)/(yr+a*a*(xr+a*(br+_r*a)))}while(i(n)>y);return[e,r]},Mr.invert=function(e,t){if(i(t)y&&--o>0);return l=v(a),[(i(t)=0;)if(r=t[s],n[0]===r[0]&&n[1]===r[1]){if(a)return[a,n];a=n}}}(t.face,n.face),i=Cr(r.map(n.project),r.map(t.project));t.transform=n.transform?Dr(n.transform,i):i;for(var a=n.edges,o=0,s=a.length;o0?[-t[0],0]:[180-t[0],180])};var t=Br.map((function(t){return{face:t,project:e(t)}}));return[-1,0,0,1,0,1,4,5].forEach((function(e,n){var r=t[e];r&&(r.children||(r.children=[])).push(t[n])})),Or(t[0],(function(e,n){return t[e<-b/2?n<0?6:4:e<0?n<0?2:0:er^f>r&&n<(h-c)*(r-u)/(f-u)+c&&(i=!i)}return i}(e[0],n))return e.push(t),!0}))||e.push([t])})),ei=[],e.length?e.length>1?{type:"MultiPolygon",coordinates:e}:{type:"Polygon",coordinates:e[0]}:null}};function ii(e){var t=e(_,0)[0]-e(-_,0)[0];function n(n,r){var a=i(n)<_,o=e(a?n:n>0?n-b:n+b,r),s=(o[0]-o[1])*A,l=(o[0]+o[1])*A;if(a)return[s,l];var c=t*A,u=s>0^l>0?-1:1;return[u*s-m(l)*c,u*l-m(s)*c]}return e.invert&&(n.invert=function(n,r){var a=(n+r)*A,o=(r-n)*A,s=i(a)<.5*t&&i(o)<.5*t;if(!s){var l=t*A,c=a>0^o>0?-1:1,u=-c*n+(o>0?1:-1)*l,d=-c*r+(a>0?1:-1)*l;a=(-u-d)*A,o=(u-d)*A}var h=e.invert(a,o);return s||(h[0]+=a>0?b:-b),h}),(0,r.Z)(n).rotate([-90,-90,45]).clipAngle(179.999)}function ai(){return ii(Ct).scale(176.423)}function oi(){return ii(Ot).scale(111.48)}function si(e,t){if(!(0<=(t=+t)&&t<=20))throw new Error("invalid digits");function n(e){var n=e.length,r=2,i=new Array(n);for(i[0]=+e[0].toFixed(t),i[1]=+e[1].toFixed(t);r2||a[0]!=t[0]||a[1]!=t[1])&&(r.push(a),t=a)}return 1===r.length&&e.length>1&&r.push(n(e[e.length-1])),r}function a(e){return e.map(i)}function o(e){if(null==e)return e;var t;switch(e.type){case"GeometryCollection":t={type:"GeometryCollection",geometries:e.geometries.map(o)};break;case"Point":t={type:"Point",coordinates:n(e.coordinates)};break;case"MultiPoint":t={type:e.type,coordinates:r(e.coordinates)};break;case"LineString":t={type:e.type,coordinates:i(e.coordinates)};break;case"MultiLineString":case"Polygon":t={type:e.type,coordinates:a(e.coordinates)};break;case"MultiPolygon":t={type:"MultiPolygon",coordinates:e.coordinates.map(a)};break;default:return e}return null!=e.bbox&&(t.bbox=e.bbox),t}function s(e){var t={type:"Feature",properties:e.properties,geometry:o(e.geometry)};return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),t}if(null!=e)switch(e.type){case"Feature":return s(e);case"FeatureCollection":var l={type:"FeatureCollection",features:e.features.map(s)};return null!=e.bbox&&(l.bbox=e.bbox),l;default:return o(e)}return e}function li(e){var t=g(e);function n(n,r){var i=t?v(n*t/2)/t:n/2;if(!r)return[2*i,-e];var o=2*a(i*g(r)),l=1/v(r);return[g(o)*l,r+(1-s(o))*l-e]}return n.invert=function(n,r){if(i(r+=e)y&&--u>0);var p=n*(d=v(c)),m=v(i(r)0?_:-_)*(d+o*(p-l)/2+o*o*(p-2*d+l)/2)]}function hi(){return(0,r.Z)(di).scale(152.63)}function fi(e,t){var n=function(e){function t(t,n){var r=s(n),i=(e-1)/(e-r*s(t));return[i*r*g(t),i*g(n)]}return t.invert=function(t,n){var r=t*t+n*n,i=R(r),a=(e-R(1-r*(e+1)/(e-1)))/((e-1)/i+i/(e-1));return[o(t*a,i*R(1-a*a)),i?C(n*a/i):0]},t}(e);if(!t)return n;var r=s(t),i=g(t);function a(t,a){var o=n(t,a),s=o[1],l=s*i/(e-1)+r;return[o[0]*r/l,s/l]}return a.invert=function(t,a){var o=(e-1)/(e-1-a*i);return n.invert(o*t,o*a*r)},a}function pi(){var e=2,t=0,n=(0,r.r)(fi),i=n(e,t);return i.distance=function(r){return arguments.length?n(e=+r,t):e},i.tilt=function(r){return arguments.length?n(e,t=r*E):t*k},i.scale(432.147).clipAngle(D(1/e)*k-1e-6)}ui.forEach((function(e){e[1]*=1.0144})),di.invert=function(e,t){var n=t/_,r=90*n,a=h(18,i(r/5)),o=d(0,c(a));do{var s=ui[o][1],l=ui[o+1][1],u=ui[h(19,o+2)][1],f=u-s,p=u-2*l+s,m=2*(i(n)-l)/f,g=p/f,v=m*(1-g*m*(1-2*g*m));if(v>=0||1===o){r=(t>=0?5:-5)*(v+a);var y,b=50;do{v=(a=h(18,i(r)/5))-(o=c(a)),s=ui[o][1],l=ui[o+1][1],u=ui[h(19,o+2)][1],r-=(y=(t>=0?_:-_)*(l+v*(u-s)/2+v*v*(u-2*l+s)/2)-t)*k}while(i(y)>x&&--b>0);break}}while(--o>=0);var w=ui[o][0],A=ui[o+1][0],S=ui[h(19,o+2)][0];return[e/(A+v*(S-w)/2+v*v*(S-2*A+w)/2),r*E]};var mi=1e-4,gi=1e4,vi=-180,yi=vi+mi,xi=180,bi=xi-mi,_i=-90,wi=_i+mi,Ai=90,Si=Ai-mi;function Mi(e){return e.length>0}function Ti(e){return e===_i||e===Ai?[0,e]:[vi,(t=e,Math.floor(t*gi)/gi)];var t}function ki(e){var t=e[0],n=e[1],r=!1;return t<=yi?(t=vi,r=!0):t>=bi&&(t=xi,r=!0),n<=wi?(n=_i,r=!0):n>=Si&&(n=Ai,r=!0),r?[t,n]:e}function Ei(e){return e.map(ki)}function Ci(e,t,n){for(var r=0,i=e.length;r=bi||u<=wi||u>=Si){a[o]=ki(l);for(var d=o+1;dyi&&fwi&&p=s)break;n.push({index:-1,polygon:t,ring:a=a.slice(d-1)}),a[0]=Ti(a[0][1]),o=-1,s=a.length}}}}function Di(e){var t,n,r,i,a,o,s=e.length,l={},c={};for(t=0;t0?b-l:l)*k],u=(0,r.Z)(e(s)).rotate(c),d=(0,_e.Z)(c),h=u.center;return delete u.rotate,u.center=function(e){return arguments.length?h(d(e)):d.invert(h())},u.clipAngle(90)}function Ni(e){var t=s(e);function n(e,n){var r=(0,Nr.M)(e,n);return r[0]*=t,r}return n.invert=function(e,n){return Nr.M.invert(e/t,n)},n}function Fi(){return Bi([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Bi(e,t){return zi(Ni,e,t)}function ji(e){if(!(e*=2))return q.N;var t=-e/2,n=-t,r=e*e,i=v(n),a=.5/g(n);function l(i,a){var o=D(s(a)*s(i-t)),l=D(s(a)*s(i-n));return[((o*=o)-(l*=l))/(2*e),(a<0?-1:1)*R(4*r*l-(r-o+l)*(r-o+l))/(2*e)]}return l.invert=function(e,r){var l,c,u=r*r,d=s(R(u+(l=e+t)*l)),h=s(R(u+(l=e+n)*l));return[o(c=d-h,l=(d+h)*i),(r<0?-1:1)*D(R(l*l+c*c)*a)]},l}function Ui(){return Vi([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function Vi(e,t){return zi(ji,e,t)}function Hi(e,t){if(i(t)y&&--l>0);return[m(e)*(R(a*a+4)+a)*b/4,_*s]};var ea=4*b+3*R(3),ta=2*R(2*b*R(3)/ea),na=ie(ta*R(3)/b,ta,ea/6);function ra(){return(0,r.Z)(na).scale(176.84)}function ia(e,t){return[e*R(1-3*t*t/(b*b)),t]}function aa(){return(0,r.Z)(ia).scale(152.63)}function oa(e,t){var n=s(t),r=s(e)*n,i=1-r,a=s(e=o(g(e)*n,-g(t))),l=g(e);return[l*(n=R(1-r*r))-a*i,-a*n-l*i]}function sa(){return(0,r.Z)(oa).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)}function la(e,t){var n=z(e,t);return[(n[0]+e/_)/2,(n[1]+t)/2]}function ca(){return(0,r.Z)(la).scale(158.837)}ia.invert=function(e,t){return[e/R(1-3*t*t/(b*b)),t]},oa.invert=function(e,t){var n=(e*e+t*t)/-2,r=R(-n*(2+n)),i=t*n+e*r,a=e*n-t*r,s=R(a*a+i*i);return[o(r*i,s*(1+n)),s?-C(r*a/s):0]},la.invert=function(e,t){var n=e,r=t,a=25;do{var o,l=s(r),c=g(r),u=g(2*r),d=c*c,h=l*l,f=g(n),p=s(n/2),m=g(n/2),v=m*m,x=1-h*p*p,b=x?D(l*p)*R(o=1/x):o=0,w=.5*(2*b*l*m+n/_)-e,A=.5*(b*c+r)-t,S=.5*o*(h*v+b*l*p*d)+.5/_,M=o*(f*u/4-b*c*m),T=.125*o*(u*m-b*c*h*f),k=.5*o*(d*p+b*v*l)+.5,E=M*T-k*S,C=(A*M-w*k)/E,P=(w*T-A*S)/E;n-=C,r-=P}while((i(C)>y||i(P)>y)&&--a>0);return[n,r]}},33940:function(e,t,n){"use strict";function r(){return new i}function i(){this.reset()}n.d(t,{Z:function(){return r}}),i.prototype={constructor:i,reset:function(){this.s=this.t=0},add:function(e){o(a,e,this.t),o(this,a.s,this.s),this.s?this.t+=a.t:this.s=a.t},valueOf:function(){return this.s}};var a=new i;function o(e,t,n){var r=e.s=t+n,i=r-t,a=r-i;e.t=t-a+(n-i)}},97860:function(e,t,n){"use strict";n.d(t,{L9:function(){return h},ZP:function(){return x},gL:function(){return p}});var r,i,a,o,s,l=n(33940),c=n(39695),u=n(73182),d=n(72736),h=(0,l.Z)(),f=(0,l.Z)(),p={point:u.Z,lineStart:u.Z,lineEnd:u.Z,polygonStart:function(){h.reset(),p.lineStart=m,p.lineEnd=g},polygonEnd:function(){var e=+h;f.add(e<0?c.BZ+e:e),this.lineStart=this.lineEnd=this.point=u.Z},sphere:function(){f.add(c.BZ)}};function m(){p.point=v}function g(){y(r,i)}function v(e,t){p.point=y,r=e,i=t,e*=c.uR,t*=c.uR,a=e,o=(0,c.mC)(t=t/2+c.pu),s=(0,c.O$)(t)}function y(e,t){e*=c.uR,t=(t*=c.uR)/2+c.pu;var n=e-a,r=n>=0?1:-1,i=r*n,l=(0,c.mC)(t),u=(0,c.O$)(t),d=s*u,f=o*l+d*(0,c.mC)(i),p=d*r*(0,c.O$)(i);h.add((0,c.fv)(p,f)),a=e,o=l,s=u}function x(e){return f.reset(),(0,d.Z)(e,p),2*f}},77338:function(e,t,n){"use strict";n.d(t,{Z:function(){return D}});var r,i,a,o,s,l,c,u,d,h,f=n(33940),p=n(97860),m=n(7620),g=n(39695),v=n(72736),y=(0,f.Z)(),x={point:b,lineStart:w,lineEnd:A,polygonStart:function(){x.point=S,x.lineStart=M,x.lineEnd=T,y.reset(),p.gL.polygonStart()},polygonEnd:function(){p.gL.polygonEnd(),x.point=b,x.lineStart=w,x.lineEnd=A,p.L9<0?(r=-(a=180),i=-(o=90)):y>g.Ho?o=90:y<-g.Ho&&(i=-90),h[0]=r,h[1]=a},sphere:function(){r=-(a=180),i=-(o=90)}};function b(e,t){d.push(h=[r=e,a=e]),to&&(o=t)}function _(e,t){var n=(0,m.Og)([e*g.uR,t*g.uR]);if(u){var l=(0,m.T5)(u,n),c=[l[1],-l[0],0],f=(0,m.T5)(c,l);(0,m.iJ)(f),f=(0,m.Y1)(f);var p,v=e-s,y=v>0?1:-1,x=f[0]*g.RW*y,b=(0,g.Wn)(v)>180;b^(y*so&&(o=p):b^(y*s<(x=(x+360)%360-180)&&xo&&(o=t)),b?ek(r,a)&&(a=e):k(e,a)>k(r,a)&&(r=e):a>=r?(ea&&(a=e)):e>s?k(r,e)>k(r,a)&&(a=e):k(e,a)>k(r,a)&&(r=e)}else d.push(h=[r=e,a=e]);to&&(o=t),u=n,s=e}function w(){x.point=_}function A(){h[0]=r,h[1]=a,x.point=b,u=null}function S(e,t){if(u){var n=e-s;y.add((0,g.Wn)(n)>180?n+(n>0?360:-360):n)}else l=e,c=t;p.gL.point(e,t),_(e,t)}function M(){p.gL.lineStart()}function T(){S(l,c),p.gL.lineEnd(),(0,g.Wn)(y)>g.Ho&&(r=-(a=180)),h[0]=r,h[1]=a,u=null}function k(e,t){return(t-=e)<0?t+360:t}function E(e,t){return e[0]-t[0]}function C(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tk(s[0],s[1])&&(s[1]=l[1]),k(l[0],s[1])>k(s[0],s[1])&&(s[0]=l[0])):c.push(s=l);for(u=-1/0,t=0,s=c[n=c.length-1];t<=n;s=l,++t)l=c[t],(f=k(s[1],l[0]))>u&&(u=f,r=l[0],a=s[1])}return d=h=null,r===1/0||i===1/0?[[NaN,NaN],[NaN,NaN]]:[[r,i],[a,o]]}},7620:function(e,t,n){"use strict";n.d(t,{Og:function(){return a},T:function(){return c},T5:function(){return s},Y1:function(){return i},iJ:function(){return u},j9:function(){return o},s0:function(){return l}});var r=n(39695);function i(e){return[(0,r.fv)(e[1],e[0]),(0,r.ZR)(e[2])]}function a(e){var t=e[0],n=e[1],i=(0,r.mC)(n);return[i*(0,r.mC)(t),i*(0,r.O$)(t),(0,r.O$)(n)]}function o(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function s(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function l(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function c(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function u(e){var t=(0,r._b)(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}},66624:function(e,t,n){"use strict";n.d(t,{Z:function(){return O}});var r,i,a,o,s,l,c,u,d,h,f,p,m,g,v,y,x=n(39695),b=n(73182),_=n(72736),w={sphere:b.Z,point:A,lineStart:M,lineEnd:E,polygonStart:function(){w.lineStart=C,w.lineEnd=D},polygonEnd:function(){w.lineStart=M,w.lineEnd=E}};function A(e,t){e*=x.uR,t*=x.uR;var n=(0,x.mC)(t);S(n*(0,x.mC)(e),n*(0,x.O$)(e),(0,x.O$)(t))}function S(e,t,n){++r,a+=(e-a)/r,o+=(t-o)/r,s+=(n-s)/r}function M(){w.point=T}function T(e,t){e*=x.uR,t*=x.uR;var n=(0,x.mC)(t);g=n*(0,x.mC)(e),v=n*(0,x.O$)(e),y=(0,x.O$)(t),w.point=k,S(g,v,y)}function k(e,t){e*=x.uR,t*=x.uR;var n=(0,x.mC)(t),r=n*(0,x.mC)(e),a=n*(0,x.O$)(e),o=(0,x.O$)(t),s=(0,x.fv)((0,x._b)((s=v*o-y*a)*s+(s=y*r-g*o)*s+(s=g*a-v*r)*s),g*r+v*a+y*o);i+=s,l+=s*(g+(g=r)),c+=s*(v+(v=a)),u+=s*(y+(y=o)),S(g,v,y)}function E(){w.point=A}function C(){w.point=R}function D(){P(p,m),w.point=A}function R(e,t){p=e,m=t,e*=x.uR,t*=x.uR,w.point=P;var n=(0,x.mC)(t);g=n*(0,x.mC)(e),v=n*(0,x.O$)(e),y=(0,x.O$)(t),S(g,v,y)}function P(e,t){e*=x.uR,t*=x.uR;var n=(0,x.mC)(t),r=n*(0,x.mC)(e),a=n*(0,x.O$)(e),o=(0,x.O$)(t),s=v*o-y*a,p=y*r-g*o,m=g*a-v*r,b=(0,x._b)(s*s+p*p+m*m),_=(0,x.ZR)(b),w=b&&-_/b;d+=w*s,h+=w*p,f+=w*m,i+=_,l+=_*(g+(g=r)),c+=_*(v+(v=a)),u+=_*(y+(y=o)),S(g,v,y)}function O(e){r=i=a=o=s=l=c=u=d=h=f=0,(0,_.Z)(e,w);var t=d,n=h,p=f,m=t*t+n*n+p*p;return m0?os)&&(o+=i*a.BZ));for(var h,f=o;i>0?f>s:f0?i.pi:-i.pi,c=(0,i.Wn)(o-n);(0,i.Wn)(c-i.pi)0?i.ou:-i.ou),e.point(a,r),e.lineEnd(),e.lineStart(),e.point(l,r),e.point(o,r),t=0):a!==l&&c>=i.pi&&((0,i.Wn)(n-a)i.Ho?(0,i.z4)(((0,i.O$)(t)*(o=(0,i.mC)(r))*(0,i.O$)(n)-(0,i.O$)(r)*(a=(0,i.mC)(t))*(0,i.O$)(e))/(a*o*s)):(t+r)/2}(n,r,o,s),e.point(a,r),e.lineEnd(),e.lineStart(),e.point(l,r),t=0),e.point(n=o,r=s),a=l},lineEnd:function(){e.lineEnd(),n=r=NaN},clean:function(){return 2-t}}}),(function(e,t,n,r){var a;if(null==e)a=n*i.ou,r.point(-i.pi,a),r.point(0,a),r.point(i.pi,a),r.point(i.pi,0),r.point(i.pi,-a),r.point(0,-a),r.point(-i.pi,-a),r.point(-i.pi,0),r.point(-i.pi,a);else if((0,i.Wn)(e[0]-t[0])>i.Ho){var o=e[0]1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}},1457:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(7620),i=n(7613),a=n(39695),o=n(67108),s=n(97023);function l(e){var t=(0,a.mC)(e),n=6*a.uR,l=t>0,c=(0,a.Wn)(t)>a.Ho;function u(e,n){return(0,a.mC)(e)*(0,a.mC)(n)>t}function d(e,n,i){var o=(0,r.Og)(e),s=(0,r.Og)(n),l=[1,0,0],c=(0,r.T5)(o,s),u=(0,r.j9)(c,c),d=c[0],h=u-d*d;if(!h)return!i&&e;var f=t*u/h,p=-t*d/h,m=(0,r.T5)(l,c),g=(0,r.T)(l,f),v=(0,r.T)(c,p);(0,r.s0)(g,v);var y=m,x=(0,r.j9)(g,y),b=(0,r.j9)(y,y),_=x*x-b*((0,r.j9)(g,g)-1);if(!(_<0)){var w=(0,a._b)(_),A=(0,r.T)(y,(-x-w)/b);if((0,r.s0)(A,g),A=(0,r.Y1)(A),!i)return A;var S,M=e[0],T=n[0],k=e[1],E=n[1];T0^A[1]<((0,a.Wn)(A[0]-M)a.pi^(M<=A[0]&&A[0]<=T)){var R=(0,r.T)(y,(-x+w)/b);return(0,r.s0)(R,g),[A,(0,r.Y1)(R)]}}}function h(t,n){var r=l?e:a.pi-e,i=0;return t<-r?i|=1:t>r&&(i|=2),n<-r?i|=4:n>r&&(i|=8),i}return(0,s.Z)(u,(function(e){var t,n,r,i,s;return{lineStart:function(){i=r=!1,s=1},point:function(f,p){var m,g=[f,p],v=u(f,p),y=l?v?0:h(f,p):v?h(f+(f<0?a.pi:-a.pi),p):0;if(!t&&(i=r=v)&&e.lineStart(),v!==r&&(!(m=d(t,g))||(0,o.Z)(t,m)||(0,o.Z)(g,m))&&(g[2]=1),v!==r)s=0,v?(e.lineStart(),m=d(g,t),e.point(m[0],m[1])):(m=d(t,g),e.point(m[0],m[1],2),e.lineEnd()),t=m;else if(c&&t&&l^v){var x;y&n||!(x=d(g,t,!0))||(s=0,l?(e.lineStart(),e.point(x[0][0],x[0][1]),e.point(x[1][0],x[1][1]),e.lineEnd()):(e.point(x[1][0],x[1][1]),e.lineEnd(),e.lineStart(),e.point(x[0][0],x[0][1],3)))}!v||t&&(0,o.Z)(t,g)||e.point(g[0],g[1]),t=g,r=v,n=y},lineEnd:function(){r&&e.lineEnd(),t=null},clean:function(){return s|(i&&r)<<1}}}),(function(t,r,a,o){(0,i.m)(o,e,n,a,t,r)}),l?[0,-e]:[-a.pi,e-a.pi])}},97023:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(85272),i=n(46225),a=n(39695),o=n(23071),s=n(33064);function l(e,t,n,a){return function(l){var d,h,f,p=t(l),m=(0,r.Z)(),g=t(m),v=!1,y={point:x,lineStart:_,lineEnd:w,polygonStart:function(){y.point=A,y.lineStart=S,y.lineEnd=M,h=[],d=[]},polygonEnd:function(){y.point=x,y.lineStart=_,y.lineEnd=w,h=(0,s.TS)(h);var e=(0,o.Z)(d,a);h.length?(v||(l.polygonStart(),v=!0),(0,i.Z)(h,u,e,n,l)):e&&(v||(l.polygonStart(),v=!0),l.lineStart(),n(null,null,1,l),l.lineEnd()),v&&(l.polygonEnd(),v=!1),h=d=null},sphere:function(){l.polygonStart(),l.lineStart(),n(null,null,1,l),l.lineEnd(),l.polygonEnd()}};function x(t,n){e(t,n)&&l.point(t,n)}function b(e,t){p.point(e,t)}function _(){y.point=b,p.lineStart()}function w(){y.point=x,p.lineEnd()}function A(e,t){f.push([e,t]),g.point(e,t)}function S(){g.lineStart(),f=[]}function M(){A(f[0][0],f[0][1]),g.lineEnd();var e,t,n,r,i=g.clean(),a=m.result(),o=a.length;if(f.pop(),d.push(f),f=null,o)if(1&i){if((t=(n=a[0]).length-1)>0){for(v||(l.polygonStart(),v=!0),l.lineStart(),e=0;e1&&2&i&&a.push(a.pop().concat(a.shift())),h.push(a.filter(c))}return y}}function c(e){return e.length>1}function u(e,t){return((e=e.x)[0]<0?e[1]-a.ou-a.Ho:a.ou-e[1])-((t=t.x)[0]<0?t[1]-a.ou-a.Ho:a.ou-t[1])}},87605:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(39695),i=n(85272);var a=n(46225),o=n(33064),s=1e9,l=-s;function c(e,t,n,c){function u(r,i){return e<=r&&r<=n&&t<=i&&i<=c}function d(r,i,a,o){var s=0,l=0;if(null==r||(s=h(r,a))!==(l=h(i,a))||p(r,i)<0^a>0)do{o.point(0===s||3===s?e:n,s>1?c:t)}while((s=(s+a+4)%4)!==l);else o.point(i[0],i[1])}function h(i,a){return(0,r.Wn)(i[0]-e)0?0:3:(0,r.Wn)(i[0]-n)0?2:1:(0,r.Wn)(i[1]-t)0?1:0:a>0?3:2}function f(e,t){return p(e.x,t.x)}function p(e,t){var n=h(e,1),r=h(t,1);return n!==r?n-r:0===n?t[1]-e[1]:1===n?e[0]-t[0]:2===n?e[1]-t[1]:t[0]-e[0]}return function(r){var h,p,m,g,v,y,x,b,_,w,A,S=r,M=(0,i.Z)(),T={point:k,lineStart:function(){T.point=E,p&&p.push(m=[]);w=!0,_=!1,x=b=NaN},lineEnd:function(){h&&(E(g,v),y&&_&&M.rejoin(),h.push(M.result()));T.point=k,_&&S.lineEnd()},polygonStart:function(){S=M,h=[],p=[],A=!0},polygonEnd:function(){var t=function(){for(var t=0,n=0,r=p.length;nc&&(d-i)*(c-a)>(h-a)*(e-i)&&++t:h<=c&&(d-i)*(c-a)<(h-a)*(e-i)&&--t;return t}(),n=A&&t,i=(h=(0,o.TS)(h)).length;(n||i)&&(r.polygonStart(),n&&(r.lineStart(),d(null,null,1,r),r.lineEnd()),i&&(0,a.Z)(h,f,t,d,r),r.polygonEnd());S=r,h=p=m=null}};function k(e,t){u(e,t)&&S.point(e,t)}function E(r,i){var a=u(r,i);if(p&&m.push([r,i]),w)g=r,v=i,y=a,w=!1,a&&(S.lineStart(),S.point(r,i));else if(a&&_)S.point(r,i);else{var o=[x=Math.max(l,Math.min(s,x)),b=Math.max(l,Math.min(s,b))],d=[r=Math.max(l,Math.min(s,r)),i=Math.max(l,Math.min(s,i))];!function(e,t,n,r,i,a){var o,s=e[0],l=e[1],c=0,u=1,d=t[0]-s,h=t[1]-l;if(o=n-s,d||!(o>0)){if(o/=d,d<0){if(o0){if(o>u)return;o>c&&(c=o)}if(o=i-s,d||!(o<0)){if(o/=d,d<0){if(o>u)return;o>c&&(c=o)}else if(d>0){if(o0)){if(o/=h,h<0){if(o0){if(o>u)return;o>c&&(c=o)}if(o=a-l,h||!(o<0)){if(o/=h,h<0){if(o>u)return;o>c&&(c=o)}else if(h>0){if(o0&&(e[0]=s+c*d,e[1]=l+c*h),u<1&&(t[0]=s+u*d,t[1]=l+u*h),!0}}}}}(o,d,e,t,n,c)?a&&(S.lineStart(),S.point(r,i),A=!1):(_||(S.lineStart(),S.point(o[0],o[1])),S.point(d[0],d[1]),a||S.lineEnd(),A=!1)}x=r,b=i,_=a}return T}}},46225:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(67108),i=n(39695);function a(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function o(e,t,n,o,l){var c,u,d=[],h=[];if(e.forEach((function(e){if(!((t=e.length-1)<=0)){var t,n,o=e[0],s=e[t];if((0,r.Z)(o,s)){if(!o[2]&&!s[2]){for(l.lineStart(),c=0;c=0;--c)l.point((p=f[c])[0],p[1]);else o(g.x,g.p.x,-1,l);g=g.p}f=(g=g.o).z,v=!v}while(!g.v);l.lineEnd()}}}function s(e){if(t=e.length){for(var t,n,r=0,i=e[0];++r0&&(i=k(e[a],e[a-1]))>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))g.Ho})).map(l)).concat((0,N.w6)((0,g.mD)(a/f)*f,i,f).filter((function(e){return(0,g.Wn)(e%m)>g.Ho})).map(c))}return y.lines=function(){return x().map((function(e){return{type:"LineString",coordinates:e}}))},y.outline=function(){return{type:"Polygon",coordinates:[u(r).concat(d(o).slice(1),u(n).reverse().slice(1),d(s).reverse().slice(1))]}},y.extent=function(e){return arguments.length?y.extentMajor(e).extentMinor(e):y.extentMinor()},y.extentMajor=function(e){return arguments.length?(r=+e[0][0],n=+e[1][0],s=+e[0][1],o=+e[1][1],r>n&&(e=r,r=n,n=e),s>o&&(e=s,s=o,o=e),y.precision(v)):[[r,s],[n,o]]},y.extentMinor=function(n){return arguments.length?(t=+n[0][0],e=+n[1][0],a=+n[0][1],i=+n[1][1],t>e&&(n=t,t=e,e=n),a>i&&(n=a,a=i,i=n),y.precision(v)):[[t,a],[e,i]]},y.step=function(e){return arguments.length?y.stepMajor(e).stepMinor(e):y.stepMinor()},y.stepMajor=function(e){return arguments.length?(p=+e[0],m=+e[1],y):[p,m]},y.stepMinor=function(e){return arguments.length?(h=+e[0],f=+e[1],y):[h,f]},y.precision=function(h){return arguments.length?(v=+h,l=F(a,i,90),c=B(t,e,v),u=F(s,o,90),d=B(r,n,v),y):v},y.extentMajor([[-180,-90+g.Ho],[180,90-g.Ho]]).extentMinor([[-180,-80-g.Ho],[180,80+g.Ho]])}function U(){return j()()}var V,H,W,G,q=n(83074),Y=n(8593),$=(0,m.Z)(),X=(0,m.Z)(),Z={point:v.Z,lineStart:v.Z,lineEnd:v.Z,polygonStart:function(){Z.lineStart=K,Z.lineEnd=ee},polygonEnd:function(){Z.lineStart=Z.lineEnd=Z.point=v.Z,$.add((0,g.Wn)(X)),X.reset()},result:function(){var e=$/2;return $.reset(),e}};function K(){Z.point=J}function J(e,t){Z.point=Q,V=W=e,H=G=t}function Q(e,t){X.add(G*e-W*t),W=e,G=t}function ee(){Q(V,H)}var te,ne,re,ie,ae=Z,oe=n(3559),se=0,le=0,ce=0,ue=0,de=0,he=0,fe=0,pe=0,me=0,ge={point:ve,lineStart:ye,lineEnd:_e,polygonStart:function(){ge.lineStart=we,ge.lineEnd=Ae},polygonEnd:function(){ge.point=ve,ge.lineStart=ye,ge.lineEnd=_e},result:function(){var e=me?[fe/me,pe/me]:he?[ue/he,de/he]:ce?[se/ce,le/ce]:[NaN,NaN];return se=le=ce=ue=de=he=fe=pe=me=0,e}};function ve(e,t){se+=e,le+=t,++ce}function ye(){ge.point=xe}function xe(e,t){ge.point=be,ve(re=e,ie=t)}function be(e,t){var n=e-re,r=t-ie,i=(0,g._b)(n*n+r*r);ue+=i*(re+e)/2,de+=i*(ie+t)/2,he+=i,ve(re=e,ie=t)}function _e(){ge.point=ve}function we(){ge.point=Se}function Ae(){Me(te,ne)}function Se(e,t){ge.point=Me,ve(te=re=e,ne=ie=t)}function Me(e,t){var n=e-re,r=t-ie,i=(0,g._b)(n*n+r*r);ue+=i*(re+e)/2,de+=i*(ie+t)/2,he+=i,fe+=(i=ie*e-re*t)*(re+e),pe+=i*(ie+t),me+=3*i,ve(re=e,ie=t)}var Te=ge;function ke(e){this._context=e}ke.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._context.moveTo(e,t),this._point=1;break;case 1:this._context.lineTo(e,t);break;default:this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,g.BZ)}},result:v.Z};var Ee,Ce,De,Re,Pe,Oe=(0,m.Z)(),Le={point:v.Z,lineStart:function(){Le.point=Ie},lineEnd:function(){Ee&&ze(Ce,De),Le.point=v.Z},polygonStart:function(){Ee=!0},polygonEnd:function(){Ee=null},result:function(){var e=+Oe;return Oe.reset(),e}};function Ie(e,t){Le.point=ze,Ce=Re=e,De=Pe=t}function ze(e,t){Re-=e,Pe-=t,Oe.add((0,g._b)(Re*Re+Pe*Pe)),Re=e,Pe=t}var Ne=Le;function Fe(){this._string=[]}function Be(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function je(e,t){var n,r,i=4.5;function a(e){return e&&("function"===typeof i&&r.pointRadius(+i.apply(this,arguments)),(0,y.Z)(e,n(r))),r.result()}return a.area=function(e){return(0,y.Z)(e,n(ae)),ae.result()},a.measure=function(e){return(0,y.Z)(e,n(Ne)),Ne.result()},a.bounds=function(e){return(0,y.Z)(e,n(oe.Z)),oe.Z.result()},a.centroid=function(e){return(0,y.Z)(e,n(Te)),Te.result()},a.projection=function(t){return arguments.length?(n=null==t?(e=null,Y.Z):(e=t).stream,a):e},a.context=function(e){return arguments.length?(r=null==e?(t=null,new Fe):new ke(t=e),"function"!==typeof i&&r.pointRadius(i),a):t},a.pointRadius=function(e){return arguments.length?(i="function"===typeof e?e:(r.pointRadius(+e),+e),a):i},a.projection(e).context(t)}Fe.prototype={_radius:4.5,_circle:Be(4.5),pointRadius:function(e){return(e=+e)!==this._radius&&(this._radius=e,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._string.push("M",e,",",t),this._point=1;break;case 1:this._string.push("L",e,",",t);break;default:null==this._circle&&(this._circle=Be(this._radius)),this._string.push("M",e,",",t,this._circle)}},result:function(){if(this._string.length){var e=this._string.join("");return this._string=[],e}return null}};var Ue=n(15002);function Ve(e){var t=0,n=g.pi/3,r=(0,Ue.r)(e),i=r(t,n);return i.parallels=function(e){return arguments.length?r(t=e[0]*g.uR,n=e[1]*g.uR):[t*g.RW,n*g.RW]},i}function He(e,t){var n=(0,g.O$)(e),r=(n+(0,g.O$)(t))/2;if((0,g.Wn)(r)=.12&&i<.234&&r>=-.425&&r<-.214?s:i>=.166&&i<.234&&r>=-.214&&r<-.115?l:o).invert(e)},u.stream=function(n){return e&&t===n?e:e=function(e){var t=e.length;return{point:function(n,r){for(var i=-1;++i0?t<-g.ou+g.Ho&&(t=-g.ou+g.Ho):t>g.ou-g.Ho&&(t=g.ou-g.Ho);var n=i/(0,g.sQ)(et(t),r);return[n*(0,g.O$)(r*e),i-n*(0,g.mC)(r*e)]}return a.invert=function(e,t){var n=i-t,a=(0,g.Xx)(r)*(0,g._b)(e*e+n*n),o=(0,g.fv)(e,(0,g.Wn)(n))*(0,g.Xx)(n);return n*r<0&&(o-=g.pi*(0,g.Xx)(e)*(0,g.Xx)(n)),[o/r,2*(0,g.z4)((0,g.sQ)(i/a,1/r))-g.ou]},a}function nt(){return Ve(tt).scale(109.5).parallels([30,30])}Ke.invert=function(e,t){return[e,2*(0,g.z4)((0,g.Qq)(t))-g.ou]};var rt=n(97492);function it(e,t){var n=(0,g.mC)(e),r=e===t?(0,g.O$)(e):(n-(0,g.mC)(t))/(t-e),i=n/r+e;if((0,g.Wn)(r)2?e[2]+90:90]):[(e=n())[0],e[1],e[2]-90]},n([0,0,90]).scale(159.155)}xt.invert=(0,yt.O)((function(e){return 2*(0,g.z4)(e)})),_t.invert=function(e,t){return[-t,2*(0,g.z4)((0,g.Qq)(e))-g.ou]}},83074:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(39695);function i(e,t){var n=e[0]*r.uR,i=e[1]*r.uR,a=t[0]*r.uR,o=t[1]*r.uR,s=(0,r.mC)(i),l=(0,r.O$)(i),c=(0,r.mC)(o),u=(0,r.O$)(o),d=s*(0,r.mC)(n),h=s*(0,r.O$)(n),f=c*(0,r.mC)(a),p=c*(0,r.O$)(a),m=2*(0,r.ZR)((0,r._b)((0,r.Jy)(o-i)+s*c*(0,r.Jy)(a-n))),g=(0,r.O$)(m),v=m?function(e){var t=(0,r.O$)(e*=m)/g,n=(0,r.O$)(m-e)/g,i=n*d+t*f,a=n*h+t*p,o=n*l+t*u;return[(0,r.fv)(a,i)*r.RW,(0,r.fv)(o,(0,r._b)(i*i+a*a))*r.RW]}:function(){return[n*r.RW,i*r.RW]};return v.distance=m,v}},39695:function(e,t,n){"use strict";n.d(t,{BZ:function(){return l},Ho:function(){return r},Jy:function(){return M},Kh:function(){return A},O$:function(){return x},OR:function(){return w},Qq:function(){return g},RW:function(){return c},Wn:function(){return d},Xx:function(){return b},ZR:function(){return S},_b:function(){return _},aW:function(){return i},cM:function(){return v},fv:function(){return f},mC:function(){return p},mD:function(){return m},ou:function(){return o},pi:function(){return a},pu:function(){return s},sQ:function(){return y},uR:function(){return u},z4:function(){return h}});var r=1e-6,i=1e-12,a=Math.PI,o=a/2,s=a/4,l=2*a,c=180/a,u=a/180,d=Math.abs,h=Math.atan,f=Math.atan2,p=Math.cos,m=Math.ceil,g=Math.exp,v=(Math.floor,Math.log),y=Math.pow,x=Math.sin,b=Math.sign||function(e){return e>0?1:e<0?-1:0},_=Math.sqrt,w=Math.tan;function A(e){return e>1?0:e<-1?a:Math.acos(e)}function S(e){return e>1?o:e<-1?-o:Math.asin(e)}function M(e){return(e=x(e/2))*e}},73182:function(e,t,n){"use strict";function r(){}n.d(t,{Z:function(){return r}})},3559:function(e,t,n){"use strict";var r=n(73182),i=1/0,a=i,o=-i,s=o,l={point:function(e,t){eo&&(o=e);ts&&(s=t)},lineStart:r.Z,lineEnd:r.Z,polygonStart:r.Z,polygonEnd:r.Z,result:function(){var e=[[i,a],[o,s]];return o=s=-(a=i=1/0),e}};t.Z=l},67108:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(39695);function i(e,t){return(0,r.Wn)(e[0]-t[0])=0?1:-1,C=E*k,D=C>a.pi,R=x*M;if(o.add((0,a.fv)(R*E*(0,a.O$)(C),b*T+R*(0,a.mC)(C))),u+=D?k+E*a.BZ:k,D^v>=n^A>=n){var P=(0,i.T5)((0,i.Og)(g),(0,i.Og)(w));(0,i.iJ)(P);var O=(0,i.T5)(c,P);(0,i.iJ)(O);var L=(D^k>=0?-1:1)*(0,a.ZR)(O[2]);(r>L||r===L&&(P[0]||P[1]))&&(d+=D^k>=0?1:-1)}}return(u<-a.Ho||u4*t&&v--){var w=o+f,A=s+m,S=c+g,M=(0,l._b)(w*w+A*A+S*S),T=(0,l.ZR)(S/=M),k=(0,l.Wn)((0,l.Wn)(S)-1)t||(0,l.Wn)((x*R+b*P)/_-.5)>.3||o*f+s*m+c*g2?e[2]%360*l.uR:0,V()):[C*l.RW,D*l.RW,R*l.RW]},j.angle=function(e){return arguments.length?(P=e%360*l.uR,V()):P*l.RW},j.reflectX=function(e){return arguments.length?(O=e?-1:1,V()):O<0},j.reflectY=function(e){return arguments.length?(L=e?-1:1,V()):L<0},j.precision=function(e){return arguments.length?(x=m(b,B=e*e),H()):(0,l._b)(B)},j.fitExtent=function(e,t){return(0,d.qg)(j,e,t)},j.fitSize=function(e,t){return(0,d.mF)(j,e,t)},j.fitWidth=function(e,t){return(0,d.V6)(j,e,t)},j.fitHeight=function(e,t){return(0,d.rf)(j,e,t)},function(){return t=e.apply(this,arguments),j.invert=t.invert&&U,V()}}},26867:function(e,t,n){"use strict";n.d(t,{K:function(){return a},Z:function(){return o}});var r=n(15002),i=n(39695);function a(e,t){var n=t*t,r=n*n;return[e*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),t*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function o(){return(0,r.Z)(a).scale(175.295)}a.invert=function(e,t){var n,r=t,a=25;do{var o=r*r,s=o*o;r-=n=(r*(1.007226+o*(.015085+s*(.028874*o-.044475-.005916*s)))-t)/(1.007226+o*(.045255+s*(.259866*o-.311325-.005916*11*s)))}while((0,i.Wn)(n)>i.Ho&&--a>0);return[e/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]}},57962:function(e,t,n){"use strict";n.d(t,{I:function(){return o},Z:function(){return s}});var r=n(39695),i=n(25382),a=n(15002);function o(e,t){return[(0,r.mC)(t)*(0,r.O$)(e),(0,r.O$)(t)]}function s(){return(0,a.Z)(o).scale(249.5).clipAngle(90+r.Ho)}o.invert=(0,i.O)(r.ZR)},49386:function(e,t,n){"use strict";n.d(t,{I:function(){return o},Z:function(){return u}});var r=n(96059),i=n(39695);function a(e,t){return[(0,i.Wn)(e)>i.pi?e+Math.round(-e/i.BZ)*i.BZ:e,t]}function o(e,t,n){return(e%=i.BZ)?t||n?(0,r.Z)(l(e),c(t,n)):l(e):t||n?c(t,n):a}function s(e){return function(t,n){return[(t+=e)>i.pi?t-i.BZ:t<-i.pi?t+i.BZ:t,n]}}function l(e){var t=s(e);return t.invert=s(-e),t}function c(e,t){var n=(0,i.mC)(e),r=(0,i.O$)(e),a=(0,i.mC)(t),o=(0,i.O$)(t);function s(e,t){var s=(0,i.mC)(t),l=(0,i.mC)(e)*s,c=(0,i.O$)(e)*s,u=(0,i.O$)(t),d=u*n+l*r;return[(0,i.fv)(c*a-d*o,l*n-u*r),(0,i.ZR)(d*a+c*o)]}return s.invert=function(e,t){var s=(0,i.mC)(t),l=(0,i.mC)(e)*s,c=(0,i.O$)(e)*s,u=(0,i.O$)(t),d=u*a-c*o;return[(0,i.fv)(c*a+u*o,l*n+d*r),(0,i.ZR)(d*n-l*r)]},s}function u(e){function t(t){return(t=e(t[0]*i.uR,t[1]*i.uR))[0]*=i.RW,t[1]*=i.RW,t}return e=o(e[0]*i.uR,e[1]*i.uR,e.length>2?e[2]*i.uR:0),t.invert=function(t){return(t=e.invert(t[0]*i.uR,t[1]*i.uR))[0]*=i.RW,t[1]*=i.RW,t},t}a.invert=a},72736:function(e,t,n){"use strict";function r(e,t){e&&a.hasOwnProperty(e.type)&&a[e.type](e,t)}n.d(t,{Z:function(){return l}});var i={Feature:function(e,t){r(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,i=-1,a=n.length;++i=0;)t+=n[r].value;else t=1;e.value=t}function l(e,t){var n,r,i,a,o,s=new h(e),l=+e.value&&(s.value=e.value),u=[s];for(null==t&&(t=c);n=u.pop();)if(l&&(n.value=+n.data.value),(i=t(n.data))&&(o=i.length))for(n.children=new Array(o),a=o-1;a>=0;--a)u.push(r=n.children[a]=new h(i[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(d)}function c(e){return e.children}function u(e){e.data=e.data.data}function d(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function h(e){this.data=e,this.depth=this.height=0,this.parent=null}n.r(t),n.d(t,{cluster:function(){return o},hierarchy:function(){return l},pack:function(){return P},packEnclose:function(){return p},packSiblings:function(){return k},partition:function(){return F},stratify:function(){return W},tree:function(){return K},treemap:function(){return ne},treemapBinary:function(){return re},treemapDice:function(){return N},treemapResquarify:function(){return ae},treemapSlice:function(){return J},treemapSliceDice:function(){return ie},treemapSquarify:function(){return te}}),h.prototype=l.prototype={constructor:h,count:function(){return this.eachAfter(s)},each:function(e){var t,n,r,i,a=this,o=[a];do{for(t=o.reverse(),o=[];a=t.pop();)if(e(a),n=a.children)for(r=0,i=n.length;r=0;--n)i.push(t[n]);return this},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;e=n.pop(),t=r.pop();for(;e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){var e=[];return this.each((function(t){e.push(t)})),e},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return l(this).eachBefore(u)}};var f=Array.prototype.slice;function p(e){for(var t,n,r=0,i=(e=function(e){for(var t,n,r=e.length;r;)n=Math.random()*r--|0,t=e[r],e[r]=e[n],e[n]=t;return e}(f.call(e))).length,a=[];r0&&n*n>r*r+i*i}function y(e,t){for(var n=0;n(o*=o)?(r=(c+o-i)/(2*c),a=Math.sqrt(Math.max(0,o/c-r*r)),n.x=e.x-r*s-a*l,n.y=e.y-r*l+a*s):(r=(c+i-o)/(2*c),a=Math.sqrt(Math.max(0,i/c-r*r)),n.x=t.x+r*s-a*l,n.y=t.y+r*l+a*s)):(n.x=t.x+n.r,n.y=t.y)}function A(e,t){var n=e.r+t.r-1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function S(e){var t=e._,n=e.next._,r=t.r+n.r,i=(t.x*n.r+n.x*t.r)/r,a=(t.y*n.r+n.y*t.r)/r;return i*i+a*a}function M(e){this._=e,this.next=null,this.previous=null}function T(e){if(!(i=e.length))return 0;var t,n,r,i,a,o,s,l,c,u,d;if((t=e[0]).x=0,t.y=0,!(i>1))return t.r;if(n=e[1],t.x=-n.r,n.x=t.r,n.y=0,!(i>2))return t.r+n.r;w(n,t,r=e[2]),t=new M(t),n=new M(n),r=new M(r),t.next=r.previous=n,n.next=t.previous=r,r.next=n.previous=t;e:for(s=3;s0)throw new Error("cycle");return a}return n.id=function(t){return arguments.length?(e=E(t),n):e},n.parentId=function(e){return arguments.length?(t=E(e),n):t},n}function G(e,t){return e.parent===t.parent?1:2}function q(e){var t=e.children;return t?t[0]:e.t}function Y(e){var t=e.children;return t?t[t.length-1]:e.t}function $(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function X(e,t,n){return e.a.parent===t.parent?e.a:n}function Z(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}function K(){var e=G,t=1,n=1,r=null;function i(i){var l=function(e){for(var t,n,r,i,a,o=new Z(e,0),s=[o];t=s.pop();)if(r=t._.children)for(t.children=new Array(a=r.length),i=a-1;i>=0;--i)s.push(n=t.children[i]=new Z(r[i],i)),n.parent=t;return(o.parent=new Z(null,0)).children=[o],o}(i);if(l.eachAfter(a),l.parent.m=-l.z,l.eachBefore(o),r)i.eachBefore(s);else{var c=i,u=i,d=i;i.eachBefore((function(e){e.xu.x&&(u=e),e.depth>d.depth&&(d=e)}));var h=c===u?1:e(c,u)/2,f=h-c.x,p=t/(u.x+h+f),m=n/(d.depth||1);i.eachBefore((function(e){e.x=(e.x+f)*p,e.y=e.depth*m}))}return i}function a(t){var n=t.children,r=t.parent.children,i=t.i?r[t.i-1]:null;if(n){!function(e){for(var t,n=0,r=0,i=e.children,a=i.length;--a>=0;)(t=i[a]).z+=n,t.m+=n,n+=t.s+(r+=t.c)}(t);var a=(n[0].z+n[n.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-a):t.z=a}else i&&(t.z=i.z+e(t._,i._));t.parent.A=function(t,n,r){if(n){for(var i,a=t,o=t,s=n,l=a.parent.children[0],c=a.m,u=o.m,d=s.m,h=l.m;s=Y(s),a=q(a),s&&a;)l=q(l),(o=Y(o)).a=t,(i=s.z+d-a.z-c+e(s._,a._))>0&&($(X(s,t,r),t,i),c+=i,u+=i),d+=s.m,c+=a.m,h+=l.m,u+=o.m;s&&!Y(o)&&(o.t=s,o.m+=d-u),a&&!q(l)&&(l.t=a,l.m+=c-h,r=t)}return r}(t,i,t.parent.A||r[0])}function o(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(e){e.x*=t,e.y=e.depth*n}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],i):r?null:[t,n]},i.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],i):r?[t,n]:null},i}function J(e,t,n,r,i){for(var a,o=e.children,s=-1,l=o.length,c=e.value&&(i-n)/e.value;++sh&&(h=s),g=u*u*m,(f=Math.max(h/g,g/d))>p){u-=s;break}p=f}v.push(o={value:u,dice:l1?t:1)},n}(Q);function ne(){var e=te,t=!1,n=1,r=1,i=[0],a=C,o=C,s=C,l=C,c=C;function u(e){return e.x0=e.y0=0,e.x1=n,e.y1=r,e.eachBefore(d),i=[0],t&&e.eachBefore(z),e}function d(t){var n=i[t.depth],r=t.x0+n,u=t.y0+n,d=t.x1-n,h=t.y1-n;d=n-1){var u=s[t];return u.x0=i,u.y0=a,u.x1=o,void(u.y1=l)}var d=c[t],h=r/2+d,f=t+1,p=n-1;for(;f>>1;c[m]l-a){var y=(i*v+o*g)/r;e(t,f,g,i,a,y,l),e(f,n,v,y,a,o,l)}else{var x=(a*v+l*g)/r;e(t,f,g,i,a,o,x),e(f,n,v,i,x,o,l)}}(0,l,e.value,t,n,r,i)}function ie(e,t,n,r,i){(1&e.depth?J:N)(e,t,n,r,i)}var ae=function e(t){function n(e,n,r,i,a){if((o=e._squarify)&&o.ratio===t)for(var o,s,l,c,u,d=-1,h=o.length,f=e.value;++d1?t:1)},n}(Q)},45879:function(e,t,n){"use strict";n.d(t,{h5:function(){return y}});var r=Math.PI,i=2*r,a=1e-6,o=i-a;function s(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function l(){return new s}s.prototype=l.prototype={constructor:s,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,a){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(e,t,n,i,o){e=+e,t=+t,n=+n,i=+i,o=+o;var s=this._x1,l=this._y1,c=n-e,u=i-t,d=s-e,h=l-t,f=d*d+h*h;if(o<0)throw new Error("negative radius: "+o);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(f>a)if(Math.abs(h*c-u*d)>a&&o){var p=n-s,m=i-l,g=c*c+u*u,v=p*p+m*m,y=Math.sqrt(g),x=Math.sqrt(f),b=o*Math.tan((r-Math.acos((g+f-v)/(2*y*x)))/2),_=b/x,w=b/y;Math.abs(_-1)>a&&(this._+="L"+(e+_*d)+","+(t+_*h)),this._+="A"+o+","+o+",0,0,"+ +(h*p>d*m)+","+(this._x1=e+w*c)+","+(this._y1=t+w*u)}else this._+="L"+(this._x1=e)+","+(this._y1=t);else;},arc:function(e,t,n,s,l,c){e=+e,t=+t,c=!!c;var u=(n=+n)*Math.cos(s),d=n*Math.sin(s),h=e+u,f=t+d,p=1^c,m=c?s-l:l-s;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+h+","+f:(Math.abs(this._x1-h)>a||Math.abs(this._y1-f)>a)&&(this._+="L"+h+","+f),n&&(m<0&&(m=m%i+i),m>o?this._+="A"+n+","+n+",0,1,"+p+","+(e-u)+","+(t-d)+"A"+n+","+n+",0,1,"+p+","+(this._x1=h)+","+(this._y1=f):m>a&&(this._+="A"+n+","+n+",0,"+ +(m>=r)+","+p+","+(this._x1=e+n*Math.cos(l))+","+(this._y1=t+n*Math.sin(l))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var c=l,u=Array.prototype.slice;function d(e){return function(){return e}}function h(e){return e[0]}function f(e){return e[1]}function p(e){return e.source}function m(e){return e.target}function g(e){var t=p,n=m,r=h,i=f,a=null;function o(){var o,s=u.call(arguments),l=t.apply(this,s),d=n.apply(this,s);if(a||(a=o=c()),e(a,+r.apply(this,(s[0]=l,s)),+i.apply(this,s),+r.apply(this,(s[0]=d,s)),+i.apply(this,s)),o)return a=null,o+""||null}return o.source=function(e){return arguments.length?(t=e,o):t},o.target=function(e){return arguments.length?(n=e,o):n},o.x=function(e){return arguments.length?(r="function"===typeof e?e:d(+e),o):r},o.y=function(e){return arguments.length?(i="function"===typeof e?e:d(+e),o):i},o.context=function(e){return arguments.length?(a=null==e?null:e,o):a},o}function v(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function y(){return g(v)}},84096:function(e,t,n){"use strict";n.d(t,{i$:function(){return p},Dq:function(){return h},g0:function(){return m}});var r=n(58176),i=n(48480),a=n(59879),o=n(82301),s=n(34823),l=n(79791);function c(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function u(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function d(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function h(e){var t=e.dateTime,n=e.date,s=e.time,l=e.periods,h=e.days,f=e.shortDays,p=e.months,m=e.shortMonths,v=w(l),y=A(l),x=w(h),b=A(h),_=w(f),ke=A(f),Ee=w(p),Ce=A(p),De=w(m),Re=A(m),Pe={a:function(e){return f[e.getDay()]},A:function(e){return h[e.getDay()]},b:function(e){return m[e.getMonth()]},B:function(e){return p[e.getMonth()]},c:null,d:W,e:W,f:X,H:G,I:q,j:Y,L:$,m:Z,M:K,p:function(e){return l[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:Me,s:Te,S:J,u:Q,U:ee,V:te,w:ne,W:re,x:null,X:null,y:ie,Y:ae,Z:oe,"%":Se},Oe={a:function(e){return f[e.getUTCDay()]},A:function(e){return h[e.getUTCDay()]},b:function(e){return m[e.getUTCMonth()]},B:function(e){return p[e.getUTCMonth()]},c:null,d:se,e:se,f:he,H:le,I:ce,j:ue,L:de,m:fe,M:pe,p:function(e){return l[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:Me,s:Te,S:me,u:ge,U:ve,V:ye,w:xe,W:be,x:null,X:null,y:_e,Y:we,Z:Ae,"%":Se},Le={a:function(e,t,n){var r=_.exec(t.slice(n));return r?(e.w=ke[r[0].toLowerCase()],n+r[0].length):-1},A:function(e,t,n){var r=x.exec(t.slice(n));return r?(e.w=b[r[0].toLowerCase()],n+r[0].length):-1},b:function(e,t,n){var r=De.exec(t.slice(n));return r?(e.m=Re[r[0].toLowerCase()],n+r[0].length):-1},B:function(e,t,n){var r=Ee.exec(t.slice(n));return r?(e.m=Ce[r[0].toLowerCase()],n+r[0].length):-1},c:function(e,n,r){return Ne(e,t,n,r)},d:L,e:L,f:j,H:z,I:z,j:I,L:B,m:O,M:N,p:function(e,t,n){var r=v.exec(t.slice(n));return r?(e.p=y[r[0].toLowerCase()],n+r[0].length):-1},q:P,Q:V,s:H,S:F,u:M,U:T,V:k,w:S,W:E,x:function(e,t,r){return Ne(e,n,t,r)},X:function(e,t,n){return Ne(e,s,t,n)},y:D,Y:C,Z:R,"%":U};function Ie(e,t){return function(n){var r,i,a,o=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s53)return null;"w"in h||(h.w=1),"Z"in h?(l=(s=u(d(h.y,0,1))).getUTCDay(),s=l>4||0===l?r.l6.ceil(s):(0,r.l6)(s),s=i.Z.offset(s,7*(h.V-1)),h.y=s.getUTCFullYear(),h.m=s.getUTCMonth(),h.d=s.getUTCDate()+(h.w+6)%7):(l=(s=c(d(h.y,0,1))).getDay(),s=l>4||0===l?a.wA.ceil(s):(0,a.wA)(s),s=o.Z.offset(s,7*(h.V-1)),h.y=s.getFullYear(),h.m=s.getMonth(),h.d=s.getDate()+(h.w+6)%7)}else("W"in h||"U"in h)&&("w"in h||(h.w="u"in h?h.u%7:"W"in h?1:0),l="Z"in h?u(d(h.y,0,1)).getUTCDay():c(d(h.y,0,1)).getDay(),h.m=0,h.d="W"in h?(h.w+6)%7+7*h.W-(l+5)%7:h.w+7*h.U-(l+6)%7);return"Z"in h?(h.H+=h.Z/100|0,h.M+=h.Z%100,u(h)):c(h)}}function Ne(e,t,n,r){for(var i,a,o=0,s=t.length,l=n.length;o=l)return-1;if(37===(i=t.charCodeAt(o++))){if(i=t.charAt(o++),!(a=Le[i in g?t.charAt(o++):i])||(r=a(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return Pe.x=Ie(n,Pe),Pe.X=Ie(s,Pe),Pe.c=Ie(t,Pe),Oe.x=Ie(n,Oe),Oe.X=Ie(s,Oe),Oe.c=Ie(t,Oe),{format:function(e){var t=Ie(e+="",Pe);return t.toString=function(){return e},t},parse:function(e){var t=ze(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=Ie(e+="",Oe);return t.toString=function(){return e},t},utcParse:function(e){var t=ze(e+="",!0);return t.toString=function(){return e},t}}}var f,p,m,g={"-":"",_:" ",0:"0"},v=/^\s*\d+/,y=/^%/,x=/[\\^$*+?|[\]().{}]/g;function b(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a68?1900:2e3),n+r[0].length):-1}function R(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function P(e,t,n){var r=v.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function O(e,t,n){var r=v.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function L(e,t,n){var r=v.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function I(e,t,n){var r=v.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function z(e,t,n){var r=v.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function N(e,t,n){var r=v.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function F(e,t,n){var r=v.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function B(e,t,n){var r=v.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function j(e,t,n){var r=v.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function U(e,t,n){var r=y.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function V(e,t,n){var r=v.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function H(e,t,n){var r=v.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function W(e,t){return b(e.getDate(),t,2)}function G(e,t){return b(e.getHours(),t,2)}function q(e,t){return b(e.getHours()%12||12,t,2)}function Y(e,t){return b(1+o.Z.count((0,s.Z)(e),e),t,3)}function $(e,t){return b(e.getMilliseconds(),t,3)}function X(e,t){return $(e,t)+"000"}function Z(e,t){return b(e.getMonth()+1,t,2)}function K(e,t){return b(e.getMinutes(),t,2)}function J(e,t){return b(e.getSeconds(),t,2)}function Q(e){var t=e.getDay();return 0===t?7:t}function ee(e,t){return b(a.OM.count((0,s.Z)(e)-1,e),t,2)}function te(e,t){var n=e.getDay();return e=n>=4||0===n?(0,a.bL)(e):a.bL.ceil(e),b(a.bL.count((0,s.Z)(e),e)+(4===(0,s.Z)(e).getDay()),t,2)}function ne(e){return e.getDay()}function re(e,t){return b(a.wA.count((0,s.Z)(e)-1,e),t,2)}function ie(e,t){return b(e.getFullYear()%100,t,2)}function ae(e,t){return b(e.getFullYear()%1e4,t,4)}function oe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+b(t/60|0,"0",2)+b(t%60,"0",2)}function se(e,t){return b(e.getUTCDate(),t,2)}function le(e,t){return b(e.getUTCHours(),t,2)}function ce(e,t){return b(e.getUTCHours()%12||12,t,2)}function ue(e,t){return b(1+i.Z.count((0,l.Z)(e),e),t,3)}function de(e,t){return b(e.getUTCMilliseconds(),t,3)}function he(e,t){return de(e,t)+"000"}function fe(e,t){return b(e.getUTCMonth()+1,t,2)}function pe(e,t){return b(e.getUTCMinutes(),t,2)}function me(e,t){return b(e.getUTCSeconds(),t,2)}function ge(e){var t=e.getUTCDay();return 0===t?7:t}function ve(e,t){return b(r.Ox.count((0,l.Z)(e)-1,e),t,2)}function ye(e,t){var n=e.getUTCDay();return e=n>=4||0===n?(0,r.hB)(e):r.hB.ceil(e),b(r.hB.count((0,l.Z)(e),e)+(4===(0,l.Z)(e).getUTCDay()),t,2)}function xe(e){return e.getUTCDay()}function be(e,t){return b(r.l6.count((0,l.Z)(e)-1,e),t,2)}function _e(e,t){return b(e.getUTCFullYear()%100,t,2)}function we(e,t){return b(e.getUTCFullYear()%1e4,t,4)}function Ae(){return"+0000"}function Se(){return"%"}function Me(e){return+e}function Te(e){return Math.floor(+e/1e3)}f=h({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),p=f.format,f.parse,m=f.utcFormat,f.utcParse},82301:function(e,t,n){"use strict";n.d(t,{a:function(){return o}});var r=n(30052),i=n(54263),a=(0,r.Z)((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*i.yB)/i.UD}),(function(e){return e.getDate()-1}));t.Z=a;var o=a.range},54263:function(e,t,n){"use strict";n.d(t,{UD:function(){return o},Y2:function(){return a},Ym:function(){return r},iM:function(){return s},yB:function(){return i}});var r=1e3,i=6e4,a=36e5,o=864e5,s=6048e5},81041:function(e,t,n){"use strict";n.r(t),n.d(t,{timeDay:function(){return v.Z},timeDays:function(){return v.a},timeFriday:function(){return y.mC},timeFridays:function(){return y.b$},timeHour:function(){return m},timeHours:function(){return g},timeInterval:function(){return r.Z},timeMillisecond:function(){return a},timeMilliseconds:function(){return o},timeMinute:function(){return h},timeMinutes:function(){return f},timeMonday:function(){return y.wA},timeMondays:function(){return y.bJ},timeMonth:function(){return b},timeMonths:function(){return _},timeSaturday:function(){return y.EY},timeSaturdays:function(){return y.Ff},timeSecond:function(){return c},timeSeconds:function(){return u},timeSunday:function(){return y.OM},timeSundays:function(){return y.vm},timeThursday:function(){return y.bL},timeThursdays:function(){return y.$t},timeTuesday:function(){return y.sy},timeTuesdays:function(){return y.aU},timeWednesday:function(){return y.zg},timeWednesdays:function(){return y.Ld},timeWeek:function(){return y.OM},timeWeeks:function(){return y.vm},timeYear:function(){return w.Z},timeYears:function(){return w.g},utcDay:function(){return C.Z},utcDays:function(){return C.y},utcFriday:function(){return D.QQ},utcFridays:function(){return D.fz},utcHour:function(){return k},utcHours:function(){return E},utcMillisecond:function(){return a},utcMilliseconds:function(){return o},utcMinute:function(){return S},utcMinutes:function(){return M},utcMonday:function(){return D.l6},utcMondays:function(){return D.$3},utcMonth:function(){return P},utcMonths:function(){return O},utcSaturday:function(){return D.g4},utcSaturdays:function(){return D.Q_},utcSecond:function(){return c},utcSeconds:function(){return u},utcSunday:function(){return D.Ox},utcSundays:function(){return D.SU},utcThursday:function(){return D.hB},utcThursdays:function(){return D.xj},utcTuesday:function(){return D.J1},utcTuesdays:function(){return D.DK},utcWednesday:function(){return D.b3},utcWednesdays:function(){return D.uy},utcWeek:function(){return D.Ox},utcWeeks:function(){return D.SU},utcYear:function(){return L.Z},utcYears:function(){return L.D}});var r=n(30052),i=(0,r.Z)((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?(0,r.Z)((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):i:null};var a=i,o=i.range,s=n(54263),l=(0,r.Z)((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+t*s.Ym)}),(function(e,t){return(t-e)/s.Ym}),(function(e){return e.getUTCSeconds()})),c=l,u=l.range,d=(0,r.Z)((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*s.Ym)}),(function(e,t){e.setTime(+e+t*s.yB)}),(function(e,t){return(t-e)/s.yB}),(function(e){return e.getMinutes()})),h=d,f=d.range,p=(0,r.Z)((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*s.Ym-e.getMinutes()*s.yB)}),(function(e,t){e.setTime(+e+t*s.Y2)}),(function(e,t){return(t-e)/s.Y2}),(function(e){return e.getHours()})),m=p,g=p.range,v=n(82301),y=n(59879),x=(0,r.Z)((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()})),b=x,_=x.range,w=n(34823),A=(0,r.Z)((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+t*s.yB)}),(function(e,t){return(t-e)/s.yB}),(function(e){return e.getUTCMinutes()})),S=A,M=A.range,T=(0,r.Z)((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*s.Y2)}),(function(e,t){return(t-e)/s.Y2}),(function(e){return e.getUTCHours()})),k=T,E=T.range,C=n(48480),D=n(58176),R=(0,r.Z)((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()})),P=R,O=R.range,L=n(79791)},30052:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=new Date,i=new Date;function a(e,t,n,o){function s(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return s.floor=function(t){return e(t=new Date(+t)),t},s.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},s.round=function(e){var t=s(e),n=s.ceil(e);return e-t0))return o;do{o.push(a=new Date(+n)),t(n,i),e(n)}while(a=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}))},n&&(s.count=function(t,a){return r.setTime(+t),i.setTime(+a),e(r),e(i),Math.floor(n(r,i))},s.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?s.filter(o?function(t){return o(t)%e===0}:function(t){return s.count(0,t)%e===0}):s:null}),s}},48480:function(e,t,n){"use strict";n.d(t,{y:function(){return o}});var r=n(30052),i=n(54263),a=(0,r.Z)((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/i.UD}),(function(e){return e.getUTCDate()-1}));t.Z=a;var o=a.range},58176:function(e,t,n){"use strict";n.d(t,{$3:function(){return p},DK:function(){return m},J1:function(){return l},Ox:function(){return o},QQ:function(){return d},Q_:function(){return x},SU:function(){return f},b3:function(){return c},fz:function(){return y},g4:function(){return h},hB:function(){return u},l6:function(){return s},uy:function(){return g},xj:function(){return v}});var r=n(30052),i=n(54263);function a(e){return(0,r.Z)((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/i.iM}))}var o=a(0),s=a(1),l=a(2),c=a(3),u=a(4),d=a(5),h=a(6),f=o.range,p=s.range,m=l.range,g=c.range,v=u.range,y=d.range,x=h.range},79791:function(e,t,n){"use strict";n.d(t,{D:function(){return a}});var r=n(30052),i=(0,r.Z)((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));i.every=function(e){return isFinite(e=Math.floor(e))&&e>0?(0,r.Z)((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null},t.Z=i;var a=i.range},59879:function(e,t,n){"use strict";n.d(t,{$t:function(){return v},EY:function(){return h},Ff:function(){return x},Ld:function(){return g},OM:function(){return o},aU:function(){return m},b$:function(){return y},bJ:function(){return p},bL:function(){return u},mC:function(){return d},sy:function(){return l},vm:function(){return f},wA:function(){return s},zg:function(){return c}});var r=n(30052),i=n(54263);function a(e){return(0,r.Z)((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*i.yB)/i.iM}))}var o=a(0),s=a(1),l=a(2),c=a(3),u=a(4),d=a(5),h=a(6),f=o.range,p=s.range,m=l.range,g=c.range,v=u.range,y=d.range,x=h.range},34823:function(e,t,n){"use strict";n.d(t,{g:function(){return a}});var r=n(30052),i=(0,r.Z)((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));i.every=function(e){return isFinite(e=Math.floor(e))&&e>0?(0,r.Z)((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n*e)})):null},t.Z=i;var a=i.range},17045:function(e,t,n){"use strict";var r=n(8709),i="function"===typeof Symbol&&"symbol"===typeof Symbol("foo"),a=Object.prototype.toString,o=Array.prototype.concat,s=Object.defineProperty,l=s&&function(){var e={};try{for(var t in s(e,"x",{enumerable:!1,value:e}),e)return!1;return e.x===e}catch(n){return!1}}(),c=function(e,t,n,r){var i;(!(t in e)||"function"===typeof(i=r)&&"[object Function]"===a.call(i)&&r())&&(l?s(e,t,{configurable:!0,enumerable:!1,value:n,writable:!0}):e[t]=n)},u=function(e,t){var n=arguments.length>2?arguments[2]:{},a=r(t);i&&(a=o.call(a,Object.getOwnPropertySymbols(t)));for(var s=0;ss*l){var f=(h-d)/s;o[u]=1e3*f}}return o}function i(e){for(var t=[],n=e[0];n<=e[1];n++)for(var r=String.fromCharCode(n),i=e[0];i0)return function(e,t){var n,r;for(n=new Array(e),r=0;r80*a){o=l=e[0],s=d=e[1];for(var b=a;bl&&(l=h),p>d&&(d=p);m=0!==(m=Math.max(l-o,d-s))?1/m:0}return i(y,x,a,o,s,m),x}function n(e,t,n,r,i){var a,o;if(i===T(e,t,n,r)>0)for(a=t;a=t;a-=r)o=A(a,e[a],e[a+1],o);return o&&v(o,o.next)&&(S(o),o=o.next),o}function r(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!v(r,r.next)&&0!==g(r.prev,r,r.next))r=r.next;else{if(S(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function i(e,t,n,c,u,d,f){if(e){!f&&d&&function(e,t,n,r){var i=e;do{null===i.z&&(i.z=h(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){var t,n,r,i,a,o,s,l,c=1;do{for(n=e,e=null,a=null,o=0;n;){for(o++,r=n,s=0,t=0;t0||l>0&&r;)0!==s&&(0===l||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,l--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;n=r}a.nextZ=null,c*=2}while(o>1)}(i)}(e,c,u,d);for(var p,m,g=e;e.prev!==e.next;)if(p=e.prev,m=e.next,d?o(e,c,u,d):a(e))t.push(p.i/n),t.push(e.i/n),t.push(m.i/n),S(e),e=m.next,g=m.next;else if((e=m)===g){f?1===f?i(e=s(r(e),t,n),t,n,c,u,d,2):2===f&&l(e,t,n,c,u,d):i(r(e),t,n,c,u,d,1);break}}}function a(e){var t=e.prev,n=e,r=e.next;if(g(t,n,r)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(p(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&g(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function o(e,t,n,r){var i=e.prev,a=e,o=e.next;if(g(i,a,o)>=0)return!1;for(var s=i.xa.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,u=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,d=h(s,l,t,n,r),f=h(c,u,t,n,r),m=e.prevZ,v=e.nextZ;m&&m.z>=d&&v&&v.z<=f;){if(m!==e.prev&&m!==e.next&&p(i.x,i.y,a.x,a.y,o.x,o.y,m.x,m.y)&&g(m.prev,m,m.next)>=0)return!1;if(m=m.prevZ,v!==e.prev&&v!==e.next&&p(i.x,i.y,a.x,a.y,o.x,o.y,v.x,v.y)&&g(v.prev,v,v.next)>=0)return!1;v=v.nextZ}for(;m&&m.z>=d;){if(m!==e.prev&&m!==e.next&&p(i.x,i.y,a.x,a.y,o.x,o.y,m.x,m.y)&&g(m.prev,m,m.next)>=0)return!1;m=m.prevZ}for(;v&&v.z<=f;){if(v!==e.prev&&v!==e.next&&p(i.x,i.y,a.x,a.y,o.x,o.y,v.x,v.y)&&g(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function s(e,t,n){var i=e;do{var a=i.prev,o=i.next.next;!v(a,o)&&y(a,i,i.next,o)&&_(a,o)&&_(o,a)&&(t.push(a.i/n),t.push(i.i/n),t.push(o.i/n),S(i),S(i.next),i=e=o),i=i.next}while(i!==e);return r(i)}function l(e,t,n,a,o,s){var l=e;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&m(l,c)){var u=w(l,c);return l=r(l,l.next),u=r(u,u.next),i(l,t,n,a,o,s),void i(u,t,n,a,o,s)}c=c.next}l=l.next}while(l!==e)}function c(e,t){return e.x-t.x}function u(e,t){if(t=function(e,t){var n,r=t,i=e.x,a=e.y,o=-1/0;do{if(a<=r.y&&a>=r.next.y&&r.next.y!==r.y){var s=r.x+(a-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>o){if(o=s,s===i){if(a===r.y)return r;if(a===r.next.y)return r.next}n=r.x=r.x&&r.x>=u&&i!==r.x&&p(an.x||r.x===n.x&&d(n,r)))&&(n=r,f=l)),r=r.next}while(r!==c);return n}(e,t),t){var n=w(t,e);r(t,t.next),r(n,n.next)}}function d(e,t){return g(e.prev,e,t.prev)<0&&g(t.next,e,e.next)<0}function h(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function f(e){var t=e,n=e;do{(t.x=0&&(e-o)*(r-s)-(n-o)*(t-s)>=0&&(n-o)*(a-s)-(i-o)*(r-s)>=0}function m(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&y(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(_(e,t)&&_(t,e)&&function(e,t){var n=e,r=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do{n.y>a!==n.next.y>a&&n.next.y!==n.y&&i<(n.next.x-n.x)*(a-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(g(e.prev,e,t.prev)||g(e,t.prev,t))||v(e,t)&&g(e.prev,e,e.next)>0&&g(t.prev,t,t.next)>0)}function g(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function v(e,t){return e.x===t.x&&e.y===t.y}function y(e,t,n,r){var i=b(g(e,t,n)),a=b(g(e,t,r)),o=b(g(n,r,e)),s=b(g(n,r,t));return i!==a&&o!==s||(!(0!==i||!x(e,n,t))||(!(0!==a||!x(e,r,t))||(!(0!==o||!x(n,e,r))||!(0!==s||!x(n,t,r)))))}function x(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function b(e){return e>0?1:e<0?-1:0}function _(e,t){return g(e.prev,e,e.next)<0?g(e,t,e.next)>=0&&g(e,e.prev,t)>=0:g(e,t,e.prev)<0||g(e,e.next,t)<0}function w(e,t){var n=new M(e.i,e.x,e.y),r=new M(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,a.next=r,r.prev=a,r}function A(e,t,n,r){var i=new M(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function S(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function M(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function T(e,t,n,r){for(var i=0,a=t,o=n-r;a0&&(r+=e[i-1].length,n.holes.push(r))}return n}},2502:function(e,t,n){var r=n(68664);e.exports=function(e,t){var n,i=[],a=[],o=[],s={},l=[];function c(e){o[e]=!1,s.hasOwnProperty(e)&&Object.keys(s[e]).forEach((function(t){delete s[e][t],o[t]&&c(t)}))}function u(e){var t,r,i=!1;for(a.push(e),o[e]=!0,t=0;t=t}))}(t);for(var n,i=r(e).components.filter((function(e){return e.length>1})),a=1/0,o=0;o1&&"boolean"!==typeof t)throw new TypeError('"allowMissing" argument must be a boolean');for(var n=function(e){var t=[];return g(e,v,(function(e,n,r,i){t[t.length]=r?g(i,y,"$1"):n||e})),t}(e),r=function(e,t){if(!(e in m))throw new SyntaxError("intrinsic "+e+" does not exist!");if("undefined"===typeof m[e]&&!t)throw new i("intrinsic "+e+" exists, but is not available. Please file an issue!");return m[e]}("%"+(n.length>0?n[0]:"")+"%",t),o=1;o=n.length){var s=a(r,n[o]);if(!t&&!(n[o]in r))throw new i("base intrinsic for "+e+" exists, but the property is not available.");r=s?s.get||s.value:r[n[o]]}else r=r[n[o]];return r}},84671:function(e,t,n){"use strict";var r=n(77575),i=n(72943)("%Function%"),a=i.apply,o=i.call;e.exports=function(){return r.apply(o,arguments)},e.exports.apply=function(){return r.apply(a,arguments)}},92978:function(e,t,n){"use strict";var r=n(72943),i=n(84671),a=i(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"===typeof n&&a(e,".prototype.")?i(n):n}},67295:function(e,t,n){"use strict";var r=n(72943)("%Object.getOwnPropertyDescriptor%");if(r)try{r([],"length")}catch(i){r=null}e.exports=r},16134:function(e,t,n){"use strict";var r=n(36672);e.exports=function(){return r(this).length=0,this}},4892:function(e,t,n){"use strict";e.exports=n(64404)()?Array.from:n(49441)},64404:function(e){"use strict";e.exports=function(){var e,t,n=Array.from;return"function"===typeof n&&(t=n(e=["raz","dwa"]),Boolean(t&&t!==e&&"dwa"===t[1]))}},49441:function(e,t,n){"use strict";var r=n(8260).iterator,i=n(73051),a=n(33717),o=n(35976),s=n(78513),l=n(36672),c=n(95296),u=n(87963),d=Array.isArray,h=Function.prototype.call,f={configurable:!0,enumerable:!0,writable:!0,value:null},p=Object.defineProperty;e.exports=function(e){var t,n,m,g,v,y,x,b,_,w,A=arguments[1],S=arguments[2];if(e=Object(l(e)),c(A)&&s(A),this&&this!==Array&&a(this))t=this;else{if(!A){if(i(e))return 1!==(v=e.length)?Array.apply(null,e):((g=new Array(1))[0]=e[0],g);if(d(e)){for(g=new Array(v=e.length),n=0;n=55296&&y<=56319&&(w+=e[++n]),w=A?h.call(A,S,w,m):w,t?(f.value=w,p(g,m,f)):g[m]=w,++m;v=m}if(void 0===v)for(v=o(e.length),t&&(g=new t(v)),n=0;n0?1:-1}},56247:function(e,t,n){"use strict";var r=n(9953),i=Math.abs,a=Math.floor;e.exports=function(e){return isNaN(e)?0:0!==(e=Number(e))&&isFinite(e)?r(e)*a(i(e)):e}},35976:function(e,t,n){"use strict";var r=n(56247),i=Math.max;e.exports=function(e){return i(0,r(e))}},67260:function(e,t,n){"use strict";var r=n(78513),i=n(36672),a=Function.prototype.bind,o=Function.prototype.call,s=Object.keys,l=Object.prototype.propertyIsEnumerable;e.exports=function(e,t){return function(n,c){var u,d=arguments[2],h=arguments[3];return n=Object(i(n)),r(c),u=s(n),h&&u.sort("function"===typeof h?a.call(h,n):void 0),"function"!==typeof e&&(e=u[e]),o.call(e,u,(function(e,r){return l.call(n,e)?o.call(c,d,n[e],e,n,r):t}))}}},95879:function(e,t,n){"use strict";e.exports=n(73583)()?Object.assign:n(34205)},73583:function(e){"use strict";e.exports=function(){var e,t=Object.assign;return"function"===typeof t&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},34205:function(e,t,n){"use strict";var r=n(68700),i=n(36672),a=Math.max;e.exports=function(e,t){var n,o,s,l=a(arguments.length,2);for(e=Object(i(e)),s=function(r){try{e[r]=t[r]}catch(i){n||(n=i)}},o=1;o-1}},87963:function(e){"use strict";var t=Object.prototype.toString,n=t.call("");e.exports=function(e){return"string"===typeof e||e&&"object"===typeof e&&(e instanceof String||t.call(e)===n)||!1}},43043:function(e){"use strict";var t=Object.create(null),n=Math.random;e.exports=function(){var e;do{e=n().toString(36).slice(2)}while(t[e]);return e}},32411:function(e,t,n){"use strict";var r,i=n(1496),a=n(66741),o=n(62072),s=n(8260),l=n(95426),c=Object.defineProperty;r=e.exports=function(e,t){if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");l.call(this,e),t=t?a.call(t,"key+value")?"key+value":a.call(t,"key")?"key":"value":"value",c(this,"__kind__",o("",t))},i&&i(r,l),delete r.prototype.constructor,r.prototype=Object.create(l.prototype,{_resolve:o((function(e){return"value"===this.__kind__?this.__list__[e]:"key+value"===this.__kind__?[e,this.__list__[e]]:e}))}),c(r.prototype,s.toStringTag,o("c","Array Iterator"))},27515:function(e,t,n){"use strict";var r=n(73051),i=n(78513),a=n(87963),o=n(66661),s=Array.isArray,l=Function.prototype.call,c=Array.prototype.some;e.exports=function(e,t){var n,u,d,h,f,p,m,g,v=arguments[2];if(s(e)||r(e)?n="array":a(e)?n="string":e=o(e),i(t),d=function(){h=!0},"array"!==n)if("string"!==n)for(u=e.next();!u.done;){if(l.call(t,v,u.value,d),h)return;u=e.next()}else for(p=e.length,f=0;f=55296&&g<=56319&&(m+=e[++f]),l.call(t,v,m,d),!h);++f);else c.call(e,(function(e){return l.call(t,v,e,d),h}))}},66661:function(e,t,n){"use strict";var r=n(73051),i=n(87963),a=n(32411),o=n(259),s=n(58095),l=n(8260).iterator;e.exports=function(e){return"function"===typeof s(e)[l]?e[l]():r(e)?new a(e):i(e)?new o(e):new a(e)}},95426:function(e,t,n){"use strict";var r,i=n(16134),a=n(95879),o=n(78513),s=n(36672),l=n(62072),c=n(55174),u=n(8260),d=Object.defineProperty,h=Object.defineProperties;e.exports=r=function(e,t){if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");h(this,{__list__:l("w",s(e)),__context__:l("w",t),__nextIndex__:l("w",0)}),t&&(o(t.on),t.on("_add",this._onAdd),t.on("_delete",this._onDelete),t.on("_clear",this._onClear))},delete r.prototype.constructor,h(r.prototype,a({_next:l((function(){var e;if(this.__list__)return this.__redo__&&void 0!==(e=this.__redo__.shift())?e:this.__nextIndex__=this.__nextIndex__||(++this.__nextIndex__,this.__redo__?(this.__redo__.forEach((function(t,n){t>=e&&(this.__redo__[n]=++t)}),this),this.__redo__.push(e)):d(this,"__redo__",l("c",[e])))})),_onDelete:l((function(e){var t;e>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(-1!==(t=this.__redo__.indexOf(e))&&this.__redo__.splice(t,1),this.__redo__.forEach((function(t,n){t>e&&(this.__redo__[n]=--t)}),this)))})),_onClear:l((function(){this.__redo__&&i.call(this.__redo__),this.__nextIndex__=0}))}))),d(r.prototype,u.iterator,l((function(){return this})))},35940:function(e,t,n){"use strict";var r=n(73051),i=n(95296),a=n(87963),o=n(8260).iterator,s=Array.isArray;e.exports=function(e){return!!i(e)&&(!!s(e)||(!!a(e)||(!!r(e)||"function"===typeof e[o])))}},259:function(e,t,n){"use strict";var r,i=n(1496),a=n(62072),o=n(8260),s=n(95426),l=Object.defineProperty;r=e.exports=function(e){if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");e=String(e),s.call(this,e),l(this,"__length__",a("",e.length))},i&&i(r,s),delete r.prototype.constructor,r.prototype=Object.create(s.prototype,{_next:a((function(){if(this.__list__)return this.__nextIndex__=55296&&t<=56319?n+this.__list__[this.__nextIndex__++]:n}))}),l(r.prototype,o.toStringTag,a("c","String Iterator"))},58095:function(e,t,n){"use strict";var r=n(35940);e.exports=function(e){if(!r(e))throw new TypeError(e+" is not iterable");return e}},73523:function(e){"use strict";function t(e,t){if(void 0===e||null===e)throw new TypeError("Cannot convert first argument to object");for(var n=Object(e),r=1;r0&&o.length>i&&!o.warned){o.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=o.length,c=u,console&&console.warn&&console.warn(c)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=u.bind(r);return i.listener=n,r.wrapFn=i,i}function h(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"===typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var l=a[e];if(void 0===l)return!1;if("function"===typeof l)r(l,this,t);else{var c=l.length,u=p(l,c);for(n=0;n=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return h(this,e,!0)},a.prototype.rawListeners=function(e){return h(this,e,!1)},a.listenerCount=function(e,t){return"function"===typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},a.prototype.listenerCount=f,a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},60774:function(e){var t=function(){if("object"===typeof self&&self)return self;if("object"===typeof window&&window)return window;throw new Error("Unable to resolve global `this`")};e.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return t()}try{return __global__||t()}finally{delete Object.prototype.__global__}}()},94908:function(e,t,n){"use strict";e.exports=n(51152)()?globalThis:n(60774)},51152:function(e){"use strict";e.exports=function(){return"object"===typeof globalThis&&(!!globalThis&&globalThis.Array===Array)}},92770:function(e,t,n){"use strict";var r=n(18546);e.exports=function(e){var t=typeof e;if("string"===t){var n=e;if(0===(e=+e)&&r(n))return!1}else if("number"!==t)return!1;return e-e<1}},30120:function(e,t,n){var r=n(90660);e.exports=function(e,t,n){if(!e)throw new TypeError("must specify data as first parameter");if(n=0|+(n||0),Array.isArray(e)&&e[0]&&"number"===typeof e[0][0]){var i,a,o,s,l=e[0].length,c=e.length*l;t&&"string"!==typeof t||(t=new(r(t||"float32"))(c+n));var u=t.length-n;if(c!==u)throw new Error("source length "+c+" ("+l+"x"+e.length+") does not match destination length "+u);for(i=0,o=n;it[0]-o[0]/2&&(h=o[0]/2,f+=o[1]);return n}},32879:function(e){"use strict";function t(e,a){a||(a={}),("string"===typeof e||Array.isArray(e))&&(a.family=e);var o=Array.isArray(a.family)?a.family.join(", "):a.family;if(!o)throw Error("`family` must be defined");var s=a.size||a.fontSize||a.em||48,l=a.weight||a.fontWeight||"",c=(e=[a.style||a.fontStyle||"",l,s].join(" ")+"px "+o,a.origin||"top");if(t.cache[o]&&s<=t.cache[o].em)return n(t.cache[o],c);var u=a.canvas||t.canvas,d=u.getContext("2d"),h={upper:void 0!==a.upper?a.upper:"H",lower:void 0!==a.lower?a.lower:"x",descent:void 0!==a.descent?a.descent:"p",ascent:void 0!==a.ascent?a.ascent:"h",tittle:void 0!==a.tittle?a.tittle:"i",overshoot:void 0!==a.overshoot?a.overshoot:"O"},f=Math.ceil(1.5*s);u.height=f,u.width=.5*f,d.font=e;var p="H",m={top:0};d.clearRect(0,0,f,f),d.textBaseline="top",d.fillStyle="black",d.fillText(p,0,0);var g=r(d.getImageData(0,0,f,f));d.clearRect(0,0,f,f),d.textBaseline="bottom",d.fillText(p,0,f);var v=r(d.getImageData(0,0,f,f));m.lineHeight=m.bottom=f-v+g,d.clearRect(0,0,f,f),d.textBaseline="alphabetic",d.fillText(p,0,f);var y=f-r(d.getImageData(0,0,f,f))-1+g;m.baseline=m.alphabetic=y,d.clearRect(0,0,f,f),d.textBaseline="middle",d.fillText(p,0,.5*f);var x=r(d.getImageData(0,0,f,f));m.median=m.middle=f-x-1+g-.5*f,d.clearRect(0,0,f,f),d.textBaseline="hanging",d.fillText(p,0,.5*f);var b=r(d.getImageData(0,0,f,f));m.hanging=f-b-1+g-.5*f,d.clearRect(0,0,f,f),d.textBaseline="ideographic",d.fillText(p,0,f);var _=r(d.getImageData(0,0,f,f));if(m.ideographic=f-_-1+g,h.upper&&(d.clearRect(0,0,f,f),d.textBaseline="top",d.fillText(h.upper,0,0),m.upper=r(d.getImageData(0,0,f,f)),m.capHeight=m.baseline-m.upper),h.lower&&(d.clearRect(0,0,f,f),d.textBaseline="top",d.fillText(h.lower,0,0),m.lower=r(d.getImageData(0,0,f,f)),m.xHeight=m.baseline-m.lower),h.tittle&&(d.clearRect(0,0,f,f),d.textBaseline="top",d.fillText(h.tittle,0,0),m.tittle=r(d.getImageData(0,0,f,f))),h.ascent&&(d.clearRect(0,0,f,f),d.textBaseline="top",d.fillText(h.ascent,0,0),m.ascent=r(d.getImageData(0,0,f,f))),h.descent&&(d.clearRect(0,0,f,f),d.textBaseline="top",d.fillText(h.descent,0,0),m.descent=i(d.getImageData(0,0,f,f))),h.overshoot){d.clearRect(0,0,f,f),d.textBaseline="top",d.fillText(h.overshoot,0,0);var w=i(d.getImageData(0,0,f,f));m.overshoot=w-y}for(var A in m)m[A]/=s;return m.em=s,t.cache[o]=m,n(m,c)}function n(e,t){var n={};for(var r in"string"===typeof t&&(t=e[t]),e)"em"!==r&&(n[r]=e[r]-t);return n}function r(e){for(var t=e.height,n=e.data,r=3;r0;r-=4)if(0!==n[r])return Math.floor(.25*(r-3)/t)}e.exports=t,t.canvas=document.createElement("canvas"),t.cache={}},86165:function(e){var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString;e.exports=function(e,r,i){if("[object Function]"!==n.call(r))throw new TypeError("iterator must be a function");var a=e.length;if(a===+a)for(var o=0;o1&&"boolean"!==typeof t)throw new o('"allowMissing" argument must be a boolean');var n=function(e){var t=S(e,0,1),n=S(e,-1);if("%"===t&&"%"!==n)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new i("invalid intrinsic syntax, expected opening `%`");var r=[];return A(e,M,(function(e,t,n,i){r[r.length]=n?A(i,T,"$1"):t||e})),r}(e),r=n.length>0?n[0]:"",a=function(e,t){var n,r=e;if(b(y,r)&&(r="%"+(n=y[r])[0]+"%"),b(v,r)){var a=v[r];if("undefined"===typeof a&&!t)throw new o("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:a}}throw new i("intrinsic "+e+" does not exist!")}("%"+r+"%",t),s=a.name,c=a.value,u=!1,d=a.alias;d&&(r=d[0],w(n,_([0,1],d)));for(var h=1,f=!0;h=n.length){var x=l(c,p);c=(f=!!x)&&"get"in x&&!("originalValue"in x.get)?x.get:c[p]}else f=b(c,p),c=c[p];f&&!u&&(v[s]=c)}}return c}},85400:function(e){e.exports=function(e,t){var n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],c=t[7],u=t[8],d=t[9],h=t[10],f=t[11],p=t[12],m=t[13],g=t[14],v=t[15];return e[0]=s*(h*v-f*g)-d*(l*v-c*g)+m*(l*f-c*h),e[1]=-(r*(h*v-f*g)-d*(i*v-a*g)+m*(i*f-a*h)),e[2]=r*(l*v-c*g)-s*(i*v-a*g)+m*(i*c-a*l),e[3]=-(r*(l*f-c*h)-s*(i*f-a*h)+d*(i*c-a*l)),e[4]=-(o*(h*v-f*g)-u*(l*v-c*g)+p*(l*f-c*h)),e[5]=n*(h*v-f*g)-u*(i*v-a*g)+p*(i*f-a*h),e[6]=-(n*(l*v-c*g)-o*(i*v-a*g)+p*(i*c-a*l)),e[7]=n*(l*f-c*h)-o*(i*f-a*h)+u*(i*c-a*l),e[8]=o*(d*v-f*m)-u*(s*v-c*m)+p*(s*f-c*d),e[9]=-(n*(d*v-f*m)-u*(r*v-a*m)+p*(r*f-a*d)),e[10]=n*(s*v-c*m)-o*(r*v-a*m)+p*(r*c-a*s),e[11]=-(n*(s*f-c*d)-o*(r*f-a*d)+u*(r*c-a*s)),e[12]=-(o*(d*g-h*m)-u*(s*g-l*m)+p*(s*h-l*d)),e[13]=n*(d*g-h*m)-u*(r*g-i*m)+p*(r*h-i*d),e[14]=-(n*(s*g-l*m)-o*(r*g-i*m)+p*(r*l-i*s)),e[15]=n*(s*h-l*d)-o*(r*h-i*d)+u*(r*l-i*s),e}},42331:function(e){e.exports=function(e){var t=new Float32Array(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},31042:function(e){e.exports=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},11902:function(e){e.exports=function(){var e=new Float32Array(16);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},89887:function(e){e.exports=function(e){var t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],l=e[7],c=e[8],u=e[9],d=e[10],h=e[11],f=e[12],p=e[13],m=e[14],g=e[15];return(t*o-n*a)*(d*g-h*m)-(t*s-r*a)*(u*g-h*p)+(t*l-i*a)*(u*m-d*p)+(n*s-r*o)*(c*g-h*f)-(n*l-i*o)*(c*m-d*f)+(r*l-i*s)*(c*p-u*f)}},27812:function(e){e.exports=function(e,t){var n=t[0],r=t[1],i=t[2],a=t[3],o=n+n,s=r+r,l=i+i,c=n*o,u=r*o,d=r*s,h=i*o,f=i*s,p=i*l,m=a*o,g=a*s,v=a*l;return e[0]=1-d-p,e[1]=u+v,e[2]=h-g,e[3]=0,e[4]=u-v,e[5]=1-c-p,e[6]=f+m,e[7]=0,e[8]=h+g,e[9]=f-m,e[10]=1-c-d,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},34045:function(e){e.exports=function(e,t,n){var r,i,a,o=n[0],s=n[1],l=n[2],c=Math.sqrt(o*o+s*s+l*l);if(Math.abs(c)<1e-6)return null;return o*=c=1/c,s*=c,l*=c,r=Math.sin(t),i=Math.cos(t),a=1-i,e[0]=o*o*a+i,e[1]=s*o*a+l*r,e[2]=l*o*a-s*r,e[3]=0,e[4]=o*s*a-l*r,e[5]=s*s*a+i,e[6]=l*s*a+o*r,e[7]=0,e[8]=o*l*a+s*r,e[9]=s*l*a-o*r,e[10]=l*l*a+i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},45973:function(e){e.exports=function(e,t,n){var r=t[0],i=t[1],a=t[2],o=t[3],s=r+r,l=i+i,c=a+a,u=r*s,d=r*l,h=r*c,f=i*l,p=i*c,m=a*c,g=o*s,v=o*l,y=o*c;return e[0]=1-(f+m),e[1]=d+y,e[2]=h-v,e[3]=0,e[4]=d-y,e[5]=1-(u+m),e[6]=p+g,e[7]=0,e[8]=h+v,e[9]=p-g,e[10]=1-(u+f),e[11]=0,e[12]=n[0],e[13]=n[1],e[14]=n[2],e[15]=1,e}},81472:function(e){e.exports=function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},14669:function(e){e.exports=function(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}},75262:function(e){e.exports=function(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=r,e[6]=n,e[7]=0,e[8]=0,e[9]=-n,e[10]=r,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},331:function(e){e.exports=function(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=0,e[2]=-n,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=n,e[9]=0,e[10]=r,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},11049:function(e){e.exports=function(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=n,e[2]=0,e[3]=0,e[4]=-n,e[5]=r,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},75195:function(e){e.exports=function(e,t,n,r,i,a,o){var s=1/(n-t),l=1/(i-r),c=1/(a-o);return e[0]=2*a*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*a*l,e[6]=0,e[7]=0,e[8]=(n+t)*s,e[9]=(i+r)*l,e[10]=(o+a)*c,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*a*2*c,e[15]=0,e}},71551:function(e){e.exports=function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},79576:function(e,t,n){e.exports={create:n(11902),clone:n(42331),copy:n(31042),identity:n(71551),transpose:n(88654),invert:n(95874),adjoint:n(85400),determinant:n(89887),multiply:n(91362),translate:n(31283),scale:n(10789),rotate:n(65074),rotateX:n(35545),rotateY:n(94918),rotateZ:n(15692),fromRotation:n(34045),fromRotationTranslation:n(45973),fromScaling:n(81472),fromTranslation:n(14669),fromXRotation:n(75262),fromYRotation:n(331),fromZRotation:n(11049),fromQuat:n(27812),frustum:n(75195),perspective:n(7864),perspectiveFromFieldOfView:n(35279),ortho:n(60378),lookAt:n(65551),str:n(6726)}},95874:function(e){e.exports=function(e,t){var n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],c=t[7],u=t[8],d=t[9],h=t[10],f=t[11],p=t[12],m=t[13],g=t[14],v=t[15],y=n*s-r*o,x=n*l-i*o,b=n*c-a*o,_=r*l-i*s,w=r*c-a*s,A=i*c-a*l,S=u*m-d*p,M=u*g-h*p,T=u*v-f*p,k=d*g-h*m,E=d*v-f*m,C=h*v-f*g,D=y*C-x*E+b*k+_*T-w*M+A*S;if(!D)return null;return D=1/D,e[0]=(s*C-l*E+c*k)*D,e[1]=(i*E-r*C-a*k)*D,e[2]=(m*A-g*w+v*_)*D,e[3]=(h*w-d*A-f*_)*D,e[4]=(l*T-o*C-c*M)*D,e[5]=(n*C-i*T+a*M)*D,e[6]=(g*b-p*A-v*x)*D,e[7]=(u*A-h*b+f*x)*D,e[8]=(o*E-s*T+c*S)*D,e[9]=(r*T-n*E-a*S)*D,e[10]=(p*w-m*b+v*y)*D,e[11]=(d*b-u*w-f*y)*D,e[12]=(s*M-o*k-l*S)*D,e[13]=(n*k-r*M+i*S)*D,e[14]=(m*x-p*_-g*y)*D,e[15]=(u*_-d*x+h*y)*D,e}},65551:function(e,t,n){var r=n(71551);e.exports=function(e,t,n,i){var a,o,s,l,c,u,d,h,f,p,m=t[0],g=t[1],v=t[2],y=i[0],x=i[1],b=i[2],_=n[0],w=n[1],A=n[2];if(Math.abs(m-_)<1e-6&&Math.abs(g-w)<1e-6&&Math.abs(v-A)<1e-6)return r(e);d=m-_,h=g-w,f=v-A,p=1/Math.sqrt(d*d+h*h+f*f),a=x*(f*=p)-b*(h*=p),o=b*(d*=p)-y*f,s=y*h-x*d,(p=Math.sqrt(a*a+o*o+s*s))?(a*=p=1/p,o*=p,s*=p):(a=0,o=0,s=0);l=h*s-f*o,c=f*a-d*s,u=d*o-h*a,(p=Math.sqrt(l*l+c*c+u*u))?(l*=p=1/p,c*=p,u*=p):(l=0,c=0,u=0);return e[0]=a,e[1]=l,e[2]=d,e[3]=0,e[4]=o,e[5]=c,e[6]=h,e[7]=0,e[8]=s,e[9]=u,e[10]=f,e[11]=0,e[12]=-(a*m+o*g+s*v),e[13]=-(l*m+c*g+u*v),e[14]=-(d*m+h*g+f*v),e[15]=1,e}},91362:function(e){e.exports=function(e,t,n){var r=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],c=t[6],u=t[7],d=t[8],h=t[9],f=t[10],p=t[11],m=t[12],g=t[13],v=t[14],y=t[15],x=n[0],b=n[1],_=n[2],w=n[3];return e[0]=x*r+b*s+_*d+w*m,e[1]=x*i+b*l+_*h+w*g,e[2]=x*a+b*c+_*f+w*v,e[3]=x*o+b*u+_*p+w*y,x=n[4],b=n[5],_=n[6],w=n[7],e[4]=x*r+b*s+_*d+w*m,e[5]=x*i+b*l+_*h+w*g,e[6]=x*a+b*c+_*f+w*v,e[7]=x*o+b*u+_*p+w*y,x=n[8],b=n[9],_=n[10],w=n[11],e[8]=x*r+b*s+_*d+w*m,e[9]=x*i+b*l+_*h+w*g,e[10]=x*a+b*c+_*f+w*v,e[11]=x*o+b*u+_*p+w*y,x=n[12],b=n[13],_=n[14],w=n[15],e[12]=x*r+b*s+_*d+w*m,e[13]=x*i+b*l+_*h+w*g,e[14]=x*a+b*c+_*f+w*v,e[15]=x*o+b*u+_*p+w*y,e}},60378:function(e){e.exports=function(e,t,n,r,i,a,o){var s=1/(t-n),l=1/(r-i),c=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+n)*s,e[13]=(i+r)*l,e[14]=(o+a)*c,e[15]=1,e}},7864:function(e){e.exports=function(e,t,n,r,i){var a=1/Math.tan(t/2),o=1/(r-i);return e[0]=a/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(i+r)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*i*r*o,e[15]=0,e}},35279:function(e){e.exports=function(e,t,n,r){var i=Math.tan(t.upDegrees*Math.PI/180),a=Math.tan(t.downDegrees*Math.PI/180),o=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),l=2/(o+s),c=2/(i+a);return e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=c,e[6]=0,e[7]=0,e[8]=-(o-s)*l*.5,e[9]=(i-a)*c*.5,e[10]=r/(n-r),e[11]=-1,e[12]=0,e[13]=0,e[14]=r*n/(n-r),e[15]=0,e}},65074:function(e){e.exports=function(e,t,n,r){var i,a,o,s,l,c,u,d,h,f,p,m,g,v,y,x,b,_,w,A,S,M,T,k,E=r[0],C=r[1],D=r[2],R=Math.sqrt(E*E+C*C+D*D);if(Math.abs(R)<1e-6)return null;E*=R=1/R,C*=R,D*=R,i=Math.sin(n),a=Math.cos(n),o=1-a,s=t[0],l=t[1],c=t[2],u=t[3],d=t[4],h=t[5],f=t[6],p=t[7],m=t[8],g=t[9],v=t[10],y=t[11],x=E*E*o+a,b=C*E*o+D*i,_=D*E*o-C*i,w=E*C*o-D*i,A=C*C*o+a,S=D*C*o+E*i,M=E*D*o+C*i,T=C*D*o-E*i,k=D*D*o+a,e[0]=s*x+d*b+m*_,e[1]=l*x+h*b+g*_,e[2]=c*x+f*b+v*_,e[3]=u*x+p*b+y*_,e[4]=s*w+d*A+m*S,e[5]=l*w+h*A+g*S,e[6]=c*w+f*A+v*S,e[7]=u*w+p*A+y*S,e[8]=s*M+d*T+m*k,e[9]=l*M+h*T+g*k,e[10]=c*M+f*T+v*k,e[11]=u*M+p*T+y*k,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]);return e}},35545:function(e){e.exports=function(e,t,n){var r=Math.sin(n),i=Math.cos(n),a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],d=t[10],h=t[11];t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]);return e[4]=a*i+c*r,e[5]=o*i+u*r,e[6]=s*i+d*r,e[7]=l*i+h*r,e[8]=c*i-a*r,e[9]=u*i-o*r,e[10]=d*i-s*r,e[11]=h*i-l*r,e}},94918:function(e){e.exports=function(e,t,n){var r=Math.sin(n),i=Math.cos(n),a=t[0],o=t[1],s=t[2],l=t[3],c=t[8],u=t[9],d=t[10],h=t[11];t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]);return e[0]=a*i-c*r,e[1]=o*i-u*r,e[2]=s*i-d*r,e[3]=l*i-h*r,e[8]=a*r+c*i,e[9]=o*r+u*i,e[10]=s*r+d*i,e[11]=l*r+h*i,e}},15692:function(e){e.exports=function(e,t,n){var r=Math.sin(n),i=Math.cos(n),a=t[0],o=t[1],s=t[2],l=t[3],c=t[4],u=t[5],d=t[6],h=t[7];t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]);return e[0]=a*i+c*r,e[1]=o*i+u*r,e[2]=s*i+d*r,e[3]=l*i+h*r,e[4]=c*i-a*r,e[5]=u*i-o*r,e[6]=d*i-s*r,e[7]=h*i-l*r,e}},10789:function(e){e.exports=function(e,t,n){var r=n[0],i=n[1],a=n[2];return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},6726:function(e){e.exports=function(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}},31283:function(e){e.exports=function(e,t,n){var r,i,a,o,s,l,c,u,d,h,f,p,m=n[0],g=n[1],v=n[2];t===e?(e[12]=t[0]*m+t[4]*g+t[8]*v+t[12],e[13]=t[1]*m+t[5]*g+t[9]*v+t[13],e[14]=t[2]*m+t[6]*g+t[10]*v+t[14],e[15]=t[3]*m+t[7]*g+t[11]*v+t[15]):(r=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],c=t[6],u=t[7],d=t[8],h=t[9],f=t[10],p=t[11],e[0]=r,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=l,e[6]=c,e[7]=u,e[8]=d,e[9]=h,e[10]=f,e[11]=p,e[12]=r*m+s*g+d*v+t[12],e[13]=i*m+l*g+h*v+t[13],e[14]=a*m+c*g+f*v+t[14],e[15]=o*m+u*g+p*v+t[15]);return e}},88654:function(e){e.exports=function(e,t){if(e===t){var n=t[1],r=t[2],i=t[3],a=t[6],o=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=n,e[6]=t[9],e[7]=t[13],e[8]=r,e[9]=a,e[11]=t[14],e[12]=i,e[13]=o,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}},42505:function(e,t,n){"use strict";var r=n(72791),i=n(71299),a=n(98580),o=n(12018),s=n(83522),l=n(25075),c=n(68016),u=n(58404),d=n(18863),h=n(10973),f=n(25677),p=n(75686),m=n(53545),g=n(56131),v=n(32879),y=n(30120),x=n(13547).nextPow2,b=new s,_=!1;if(document.body){var w=document.body.appendChild(document.createElement("div"));w.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(w).fontStretch&&(_=!0),document.body.removeChild(w)}var A=function(e){!function(e){return"function"===typeof e&&e._gl&&e.prop&&e.texture&&e.buffer}(e)?this.gl=o(e):(e={regl:e},this.gl=e.regl._gl),this.shader=b.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=e.regl||a({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),b.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(h(e)?e:{})};A.prototype.createShader=function(){var e=this.regl,t=e({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:e.prop("count"),offset:e.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:e.this("sizeBuffer")},width:{offset:0,stride:8,buffer:e.this("sizeBuffer")},char:e.this("charBuffer"),position:e.this("position")},uniforms:{atlasSize:function(e,t){return[t.atlas.width,t.atlas.height]},atlasDim:function(e,t){return[t.atlas.cols,t.atlas.rows]},atlas:function(e,t){return t.atlas.texture},charStep:function(e,t){return t.atlas.step},em:function(e,t){return t.atlas.em},color:e.prop("color"),opacity:e.prop("opacity"),viewport:e.this("viewportArray"),scale:e.this("scale"),align:e.prop("align"),baseline:e.prop("baseline"),translate:e.this("translate"),positionOffset:e.prop("positionOffset")},primitive:"points",viewport:e.this("viewport"),vert:"\n\t\t\tprecision highp float;\n\t\t\tattribute float width, charOffset, char;\n\t\t\tattribute vec2 position;\n\t\t\tuniform float fontSize, charStep, em, align, baseline;\n\t\t\tuniform vec4 viewport;\n\t\t\tuniform vec4 color;\n\t\t\tuniform vec2 atlasSize, atlasDim, scale, translate, positionOffset;\n\t\t\tvarying vec2 charCoord, charId;\n\t\t\tvarying float charWidth;\n\t\t\tvarying vec4 fontColor;\n\t\t\tvoid main () {\n\t\t\t\tvec2 offset = floor(em * (vec2(align + charOffset, baseline)\n\t\t\t\t\t+ vec2(positionOffset.x, -positionOffset.y)))\n\t\t\t\t\t/ (viewport.zw * scale.xy);\n\n\t\t\t\tvec2 position = (position + translate) * scale;\n\t\t\t\tposition += offset * scale;\n\n\t\t\t\tcharCoord = position * viewport.zw + viewport.xy;\n\n\t\t\t\tgl_Position = vec4(position * 2. - 1., 0, 1);\n\n\t\t\t\tgl_PointSize = charStep;\n\n\t\t\t\tcharId.x = mod(char, atlasDim.x);\n\t\t\t\tcharId.y = floor(char / atlasDim.x);\n\n\t\t\t\tcharWidth = width * em;\n\n\t\t\t\tfontColor = color / 255.;\n\t\t\t}",frag:"\n\t\t\tprecision highp float;\n\t\t\tuniform float fontSize, charStep, opacity;\n\t\t\tuniform vec2 atlasSize;\n\t\t\tuniform vec4 viewport;\n\t\t\tuniform sampler2D atlas;\n\t\t\tvarying vec4 fontColor;\n\t\t\tvarying vec2 charCoord, charId;\n\t\t\tvarying float charWidth;\n\n\t\t\tfloat lightness(vec4 color) {\n\t\t\t\treturn color.r * 0.299 + color.g * 0.587 + color.b * 0.114;\n\t\t\t}\n\n\t\t\tvoid main () {\n\t\t\t\tvec2 uv = gl_FragCoord.xy - charCoord + charStep * .5;\n\t\t\t\tfloat halfCharStep = floor(charStep * .5 + .5);\n\n\t\t\t\t// invert y and shift by 1px (FF expecially needs that)\n\t\t\t\tuv.y = charStep - uv.y;\n\n\t\t\t\t// ignore points outside of character bounding box\n\t\t\t\tfloat halfCharWidth = ceil(charWidth * .5);\n\t\t\t\tif (floor(uv.x) > halfCharStep + halfCharWidth ||\n\t\t\t\t\tfloor(uv.x) < halfCharStep - halfCharWidth) return;\n\n\t\t\t\tuv += charId * charStep;\n\t\t\t\tuv = uv / atlasSize;\n\n\t\t\t\tvec4 color = fontColor;\n\t\t\t\tvec4 mask = texture2D(atlas, uv);\n\n\t\t\t\tfloat maskY = lightness(mask);\n\t\t\t\t// float colorY = lightness(color);\n\t\t\t\tcolor.a *= maskY;\n\t\t\t\tcolor.a *= opacity;\n\n\t\t\t\t// color.a += .1;\n\n\t\t\t\t// antialiasing, see yiq color space y-channel formula\n\t\t\t\t// color.rgb += (1. - color.rgb) * (1. - mask.rgb);\n\n\t\t\t\tgl_FragColor = color;\n\t\t\t}"});return{regl:e,draw:t,atlas:{}}},A.prototype.update=function(e){var t=this;if("string"===typeof e)e={text:e};else if(!e)return;null!=(e=i(e,{position:"position positions coord coords coordinates",font:"font fontFace fontface typeface cssFont css-font family fontFamily",fontSize:"fontSize fontsize size font-size",text:"text texts chars characters value values symbols",align:"align alignment textAlign textbaseline",baseline:"baseline textBaseline textbaseline",direction:"dir direction textDirection",color:"color colour fill fill-color fillColor textColor textcolor",kerning:"kerning kern",range:"range dataBox",viewport:"vp viewport viewBox viewbox viewPort",opacity:"opacity alpha transparency visible visibility opaque",offset:"offset positionOffset padding shift indent indentation"},!0)).opacity&&(Array.isArray(e.opacity)?this.opacity=e.opacity.map((function(e){return parseFloat(e)})):this.opacity=parseFloat(e.opacity)),null!=e.viewport&&(this.viewport=d(e.viewport),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null==this.viewport&&(this.viewport={x:0,y:0,width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight},this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null!=e.kerning&&(this.kerning=e.kerning),null!=e.offset&&("number"===typeof e.offset&&(e.offset=[e.offset,0]),this.positionOffset=y(e.offset)),e.direction&&(this.direction=e.direction),e.range&&(this.range=e.range,this.scale=[1/(e.range[2]-e.range[0]),1/(e.range[3]-e.range[1])],this.translate=[-e.range[0],-e.range[1]]),e.scale&&(this.scale=e.scale),e.translate&&(this.translate=e.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),this.font.length||e.font||(e.font=A.baseFontSize+"px sans-serif");var n,a=!1,o=!1;if(e.font&&(Array.isArray(e.font)?e.font:[e.font]).forEach((function(e,n){if("string"===typeof e)try{e=r.parse(e)}catch(d){e=r.parse(A.baseFontSize+"px "+e)}else e=r.parse(r.stringify(e));var i=r.stringify({size:A.baseFontSize,family:e.family,stretch:_?e.stretch:void 0,variant:e.variant,weight:e.weight,style:e.style}),s=f(e.size),l=Math.round(s[0]*p(s[1]));if(l!==t.fontSize[n]&&(o=!0,t.fontSize[n]=l),(!t.font[n]||i!=t.font[n].baseString)&&(a=!0,t.font[n]=A.fonts[i],!t.font[n])){var c=e.family.join(", "),u=[e.style];e.style!=e.variant&&u.push(e.variant),e.variant!=e.weight&&u.push(e.weight),_&&e.weight!=e.stretch&&u.push(e.stretch),t.font[n]={baseString:i,family:c,weight:e.weight,stretch:e.stretch,style:e.style,variant:e.variant,width:{},kerning:{},metrics:v(c,{origin:"top",fontSize:A.baseFontSize,fontStyle:u.join(" ")})},A.fonts[i]=t.font[n]}})),(a||o)&&this.font.forEach((function(n,i){var a=r.stringify({size:t.fontSize[i],family:n.family,stretch:_?n.stretch:void 0,variant:n.variant,weight:n.weight,style:n.style});if(t.fontAtlas[i]=t.shader.atlas[a],!t.fontAtlas[i]){var o=n.metrics;t.shader.atlas[a]=t.fontAtlas[i]={fontString:a,step:2*Math.ceil(t.fontSize[i]*o.bottom*.5),em:t.fontSize[i],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:t.regl.texture()}}null==e.text&&(e.text=t.text)})),"string"===typeof e.text&&e.position&&e.position.length>2){for(var s=Array(.5*e.position.length),h=0;h2){for(var w=!e.position[0].length,S=u.mallocFloat(2*this.count),M=0,T=0;M1?t.align[n]:t.align[0]:t.align;if("number"===typeof r)return r;switch(r){case"right":case"end":return-e;case"center":case"centre":case"middle":return.5*-e}return 0}))),null==this.baseline&&null==e.baseline&&(e.baseline=0),null!=e.baseline&&(this.baseline=e.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map((function(e,n){var r=(t.font[n]||t.font[0]).metrics,i=0;return i+=.5*r.bottom,i+="number"===typeof e?e-r.baseline:-r[e],i*=-1}))),null!=e.color)if(e.color||(e.color="transparent"),"string"!==typeof e.color&&isNaN(e.color)){var W;if("number"===typeof e.color[0]&&e.color.length>this.counts.length){var G=e.color.length;W=u.mallocUint8(G);for(var q=(e.color.subarray||e.color.slice).bind(e.color),Y=0;Y4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2){var Z=Math.max(.5*this.position.length||0,.25*this.color.length||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,.5*this.positionOffset.length||0);this.batch=Array(Z);for(var K=0;K1?this.counts[K]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[K]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(4*K,4*K+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[K]:this.opacity,baseline:null!=this.baselineOffset[K]?this.baselineOffset[K]:this.baselineOffset[0],align:this.align?null!=this.alignOffset[K]?this.alignOffset[K]:this.alignOffset[0]:0,atlas:this.fontAtlas[K]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(2*K,2*K+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]},A.prototype.destroy=function(){},A.prototype.kerning=!0,A.prototype.position={constant:new Float32Array(2)},A.prototype.translate=null,A.prototype.scale=null,A.prototype.font=null,A.prototype.text="",A.prototype.positionOffset=[0,0],A.prototype.opacity=1,A.prototype.color=new Uint8Array([0,0,0,255]),A.prototype.alignOffset=[0,0],A.maxAtlasSize=1024,A.atlasCanvas=document.createElement("canvas"),A.atlasContext=A.atlasCanvas.getContext("2d",{alpha:!1}),A.baseFontSize=64,A.fonts={},e.exports=A},12018:function(e,t,n){"use strict";var r=n(71299);function i(e){if(e.container)if(e.container==document.body)document.body.style.width||(e.canvas.width=e.width||e.pixelRatio*n.g.innerWidth),document.body.style.height||(e.canvas.height=e.height||e.pixelRatio*n.g.innerHeight);else{var t=e.container.getBoundingClientRect();e.canvas.width=e.width||t.right-t.left,e.canvas.height=e.height||t.bottom-t.top}}function a(e){return"function"===typeof e.getContext&&"width"in e&&"height"in e}function o(){var e=document.createElement("canvas");return e.style.position="absolute",e.style.top=0,e.style.left=0,e}e.exports=function(e){var t;if(e?"string"===typeof e&&(e={container:e}):e={},a(e)?e={container:e}:e="string"===typeof(t=e).nodeName&&"function"===typeof t.appendChild&&"function"===typeof t.getBoundingClientRect?{container:e}:function(e){return"function"===typeof e.drawArrays||"function"===typeof e.drawElements}(e)?{gl:e}:r(e,{container:"container target element el canvas holder parent parentNode wrapper use ref root node",gl:"gl context webgl glContext",attrs:"attributes attrs contextAttributes",pixelRatio:"pixelRatio pxRatio px ratio pxratio pixelratio",width:"w width",height:"h height"},!0),e.pixelRatio||(e.pixelRatio=n.g.pixelRatio||1),e.gl)return e.gl;if(e.canvas&&(e.container=e.canvas.parentNode),e.container){if("string"===typeof e.container){var s=document.querySelector(e.container);if(!s)throw Error("Element "+e.container+" is not found");e.container=s}a(e.container)?(e.canvas=e.container,e.container=e.canvas.parentNode):e.canvas||(e.canvas=o(),e.container.appendChild(e.canvas),i(e))}else if(!e.canvas){if("undefined"===typeof document)throw Error("Not DOM environment. Use headless-gl.");e.container=document.body||document.documentElement,e.canvas=o(),e.container.appendChild(e.canvas),i(e)}return e.gl||["webgl","experimental-webgl","webgl-experimental"].some((function(n){try{e.gl=e.canvas.getContext(n,e.attrs)}catch(t){}return e.gl})),e.gl}},56068:function(e){e.exports=function(e){"string"===typeof e&&(e=[e]);for(var t=[].slice.call(arguments,1),n=[],r=0;r>1,u=-7,d=n?i-1:0,h=n?-1:1,f=e[t+d];for(d+=h,a=f&(1<<-u)-1,f>>=-u,u+=s;u>0;a=256*a+e[t+d],d+=h,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=r;u>0;o=256*o+e[t+d],d+=h,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,r),a-=c}return(f?-1:1)*o*Math.pow(2,a-r)},t.write=function(e,t,n,r,i,a){var o,s,l,c=8*a-i-1,u=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:a-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+d>=1?h/l:h*Math.pow(2,1-d))*l>=2&&(o++,l/=2),o+d>=u?(s=0,o=u):o+d>=1?(s=(t*l-1)*Math.pow(2,i),o+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;e[n+f]=255&s,f+=p,s/=256,i-=8);for(o=o<0;e[n+f]=255&o,f+=p,o/=256,c-=8);e[n+f-p]|=128*m}},42018:function(e){"function"===typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},47216:function(e){"use strict";var t="function"===typeof Symbol&&"symbol"===typeof Symbol.toStringTag,n=Object.prototype.toString,r=function(e){return!(t&&e&&"object"===typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===n.call(e)},i=function(e){return!!r(e)||null!==e&&"object"===typeof e&&"number"===typeof e.length&&e.length>=0&&"[object Array]"!==n.call(e)&&"[object Function]"===n.call(e.callee)},a=function(){return r(arguments)}();r.isLegacyArguments=i,e.exports=a?r:i},54404:function(e){e.exports=!0},65481:function(e,t,n){"use strict";var r,i=Object.prototype.toString,a=Function.prototype.toString,o=/^\s*(?:function)?\*/,s=n(84543)(),l=Object.getPrototypeOf;e.exports=function(e){if("function"!==typeof e)return!1;if(o.test(a.call(e)))return!0;if(!s)return"[object GeneratorFunction]"===i.call(e);if(!l)return!1;if("undefined"===typeof r){var t=function(){if(!s)return!1;try{return Function("return function*() {}")()}catch(e){}}();r=!!t&&l(t)}return l(e)===r}},62683:function(e){"use strict";e.exports="undefined"!==typeof navigator&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))},64274:function(e){"use strict";e.exports=function(e){return e!==e}},15567:function(e,t,n){"use strict";var r=n(68222),i=n(17045),a=n(64274),o=n(14922),s=n(22442),l=r(o(),Number);i(l,{getPolyfill:o,implementation:a,shim:s}),e.exports=l},14922:function(e,t,n){"use strict";var r=n(64274);e.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:r}},22442:function(e,t,n){"use strict";var r=n(17045),i=n(14922);e.exports=function(){var e=i();return r(Number,{isNaN:e},{isNaN:function(){return Number.isNaN!==e}}),e}},64941:function(e){"use strict";e.exports=function(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}},10973:function(e){"use strict";var t=Object.prototype.toString;e.exports=function(e){var n;return"[object Object]"===t.call(e)&&(null===(n=Object.getPrototypeOf(e))||n===Object.getPrototypeOf({}))}},18546:function(e){"use strict";e.exports=function(e){for(var t,n=e.length,r=0;r13)&&32!==t&&133!==t&&160!==t&&5760!==t&&6158!==t&&(t<8192||t>8205)&&8232!==t&&8233!==t&&8239!==t&&8287!==t&&8288!==t&&12288!==t&&65279!==t)return!1;return!0}},89546:function(e){"use strict";e.exports=function(e){return"string"===typeof e&&(e=e.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(e)&&/[\dz]$/i.test(e)&&e.length>4))}},9187:function(e,t,n){"use strict";var r=n(86165),i=n(72077),a=n(92978),o=a("Object.prototype.toString"),s=n(57877)()&&"symbol"===typeof Symbol.toStringTag,l=i(),c=a("Array.prototype.indexOf",!0)||function(e,t){for(var n=0;n-1}return!!h&&function(e){var t=!1;return r(d,(function(n,r){if(!t)try{t=n.call(e)===r}catch(i){}})),t}(e)}},44517:function(e){e.exports=function(){"use strict";var e,t,n;function r(r,i){if(e)if(t){var a="var sharedChunk = {}; ("+e+")(sharedChunk); ("+t+")(sharedChunk);",o={};e(o),(n=i(o)).workerUrl=window.URL.createObjectURL(new Blob([a],{type:"text/javascript"}))}else t=i;else e=i}return r(["exports"],(function(e){function t(e,t){return e(t={exports:{}},t.exports),t.exports}var n="1.10.1",r=i;function i(e,t,n,r){this.cx=3*e,this.bx=3*(n-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(r-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=r,this.p2x=n,this.p2y=r}i.prototype.sampleCurveX=function(e){return((this.ax*e+this.bx)*e+this.cx)*e},i.prototype.sampleCurveY=function(e){return((this.ay*e+this.by)*e+this.cy)*e},i.prototype.sampleCurveDerivativeX=function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},i.prototype.solveCurveX=function(e,t){var n,r,i,a,o;for("undefined"===typeof t&&(t=1e-6),i=e,o=0;o<8;o++){if(a=this.sampleCurveX(i)-e,Math.abs(a)(r=1))return r;for(;na?n=i:r=i,i=.5*(r-n)+n}return i},i.prototype.solve=function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))};var a=o;function o(e,t){this.x=e,this.y=t}function s(e,t){if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(var n=0;n=1)return 1;var t=e*e,n=t*e;return 4*(e<.5?n:3*(e-t)+n-.75)}function c(e,t,n,i){var a=new r(e,t,n,i);return function(e){return a.solve(e)}}o.prototype={clone:function(){return new o(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,t){return this.clone()._rotateAround(e,t)},matMult:function(e){return this.clone()._matMult(e)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,n=e.y-this.y;return t*t+n*n},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[0]*this.x+e[1]*this.y,n=e[2]*this.x+e[3]*this.y;return this.x=t,this.y=n,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),n=Math.sin(e),r=t*this.x-n*this.y,i=n*this.x+t*this.y;return this.x=r,this.y=i,this},_rotateAround:function(e,t){var n=Math.cos(e),r=Math.sin(e),i=t.x+n*(this.x-t.x)-r*(this.y-t.y),a=t.y+r*(this.x-t.x)+n*(this.y-t.y);return this.x=i,this.y=a,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},o.convert=function(e){return e instanceof o?e:Array.isArray(e)?new o(e[0],e[1]):e};var u=c(.25,.1,.25,1);function d(e,t,n){return Math.min(n,Math.max(t,e))}function h(e,t,n){var r=n-t,i=((e-t)%r+r)%r+t;return i===t?n:i}function f(e,t,n){if(!e.length)return n(null,[]);var r=e.length,i=new Array(e.length),a=null;e.forEach((function(e,o){t(e,(function(e,t){e&&(a=e),i[o]=t,0===--r&&n(a,i)}))}))}function p(e){var t=[];for(var n in e)t.push(e[n]);return t}function m(e,t){var n=[];for(var r in e)r in t||n.push(r);return n}function g(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];for(var r=0,i=t;r>t/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,e)}return e()}function _(e){return!!e&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)}function w(e,t){e.forEach((function(e){t[e]&&(t[e]=t[e].bind(t))}))}function A(e,t){return-1!==e.indexOf(t,e.length-t.length)}function S(e,t,n){var r={};for(var i in e)r[i]=t.call(n||this,e[i],i,e);return r}function M(e,t,n){var r={};for(var i in e)t.call(n||this,e[i],i,e)&&(r[i]=e[i]);return r}function T(e){return Array.isArray(e)?e.map(T):"object"===typeof e&&e?S(e,T):e}function k(e,t){for(var n=0;n=0)return!0;return!1}var E={};function C(e){E[e]||("undefined"!==typeof console&&console.warn(e),E[e]=!0)}function D(e,t,n){return(n.y-e.y)*(t.x-e.x)>(t.y-e.y)*(n.x-e.x)}function R(e){for(var t=0,n=0,r=e.length,i=r-1,a=void 0,o=void 0;n@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,n={};if(e.replace(t,(function(e,t,r,i){var a=r||i;return n[t]=!a||a.toLowerCase(),""})),n["max-age"]){var r=parseInt(n["max-age"],10);isNaN(r)?delete n["max-age"]:n["max-age"]=r}return n}var I=null;function z(e){if(null==I){var t=e.navigator?e.navigator.userAgent:null;I=!!e.safari||!(!t||!(/\b(iPad|iPhone|iPod)\b/.test(t)||t.match("Safari")&&!t.match("Chrome")))}return I}function N(e){try{var t=self[e];return t.setItem("_mapbox_test_",1),t.removeItem("_mapbox_test_"),!0}catch(n){return!1}}function F(e){return self.btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,t){return String.fromCharCode(Number("0x"+t))})))}function B(e){return decodeURIComponent(self.atob(e).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))}var j,U,V,H,W=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),G=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,q=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,Y={now:W,frame:function(e){var t=G(e);return{cancel:function(){return q(t)}}},getImageData:function(e,t){void 0===t&&(t=0);var n=self.document.createElement("canvas"),r=n.getContext("2d");if(!r)throw new Error("failed to create canvas 2d context");return n.width=e.width,n.height=e.height,r.drawImage(e,0,0,e.width,e.height),r.getImageData(-t,-t,e.width+2*t,e.height+2*t)},resolveURL:function(e){return j||(j=self.document.createElement("a")),j.href=e,j.href},hardwareConcurrency:self.navigator.hardwareConcurrency||4,get devicePixelRatio(){return self.devicePixelRatio},get prefersReducedMotion(){return!!self.matchMedia&&(null==U&&(U=self.matchMedia("(prefers-reduced-motion: reduce)")),U.matches)}},$={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?0===this.API_URL.indexOf("https://api.mapbox.cn")?"https://events.mapbox.cn/events/v2":0===this.API_URL.indexOf("https://api.mapbox.com")?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},X={supported:!1,testSupport:J},Z=!1,K=!1;function J(e){!Z&&H&&(K?Q(e):V=e)}function Q(e){var t=e.createTexture();e.bindTexture(e.TEXTURE_2D,t);try{if(e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,H),e.isContextLost())return;X.supported=!0}catch(n){}e.deleteTexture(t),Z=!0}self.document&&((H=self.document.createElement("img")).onload=function(){V&&Q(V),V=null,K=!0},H.onerror=function(){Z=!0,V=null},H.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var ee="01";function te(){for(var e="1",t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",n="",r=0;r<10;r++)n+=t[Math.floor(62*Math.random())];var i=432e5;return{token:[e,ee,n].join(""),tokenExpiresAt:Date.now()+i}}var ne=function(e,t){this._transformRequestFn=e,this._customAccessToken=t,this._createSkuToken()};function re(e){return 0===e.indexOf("mapbox:")}ne.prototype._createSkuToken=function(){var e=te();this._skuToken=e.token,this._skuTokenExpiresAt=e.tokenExpiresAt},ne.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},ne.prototype.transformRequest=function(e,t){return this._transformRequestFn&&this._transformRequestFn(e,t)||{url:e}},ne.prototype.normalizeStyleURL=function(e,t){if(!re(e))return e;var n=ce(e);return n.path="/styles/v1"+n.path,this._makeAPIURL(n,this._customAccessToken||t)},ne.prototype.normalizeGlyphsURL=function(e,t){if(!re(e))return e;var n=ce(e);return n.path="/fonts/v1"+n.path,this._makeAPIURL(n,this._customAccessToken||t)},ne.prototype.normalizeSourceURL=function(e,t){if(!re(e))return e;var n=ce(e);return n.path="/v4/"+n.authority+".json",n.params.push("secure"),this._makeAPIURL(n,this._customAccessToken||t)},ne.prototype.normalizeSpriteURL=function(e,t,n,r){var i=ce(e);return re(e)?(i.path="/styles/v1"+i.path+"/sprite"+t+n,this._makeAPIURL(i,this._customAccessToken||r)):(i.path+=""+t+n,ue(i))},ne.prototype.normalizeTileURL=function(e,t){if(this._isSkuTokenExpired()&&this._createSkuToken(),e&&!re(e))return e;var n=ce(e),r=/(\.(png|jpg)\d*)(?=$)/,i=/^.+\/v4\//,a=Y.devicePixelRatio>=2||512===t?"@2x":"",o=X.supported?".webp":"$1";n.path=n.path.replace(r,""+a+o),n.path=n.path.replace(i,"/"),n.path="/v4"+n.path;var s=this._customAccessToken||se(n.params)||$.ACCESS_TOKEN;return $.REQUIRE_ACCESS_TOKEN&&s&&this._skuToken&&n.params.push("sku="+this._skuToken),this._makeAPIURL(n,s)},ne.prototype.canonicalizeTileURL=function(e,t){var n="/v4/",r=/\.[\w]+$/,i=ce(e);if(!i.path.match(/(^\/v4\/)/)||!i.path.match(r))return e;var a="mapbox://tiles/";a+=i.path.replace(n,"");var o=i.params;return t&&(o=o.filter((function(e){return!e.match(/^access_token=/)}))),o.length&&(a+="?"+o.join("&")),a},ne.prototype.canonicalizeTileset=function(e,t){for(var n=!!t&&re(t),r=[],i=0,a=e.tiles||[];i=1&&self.localStorage.setItem(t,JSON.stringify(this.eventData))}catch(r){C("Unable to write to LocalStorage")}},fe.prototype.processRequests=function(e){},fe.prototype.postEvent=function(e,t,r,i){var a=this;if($.EVENTS_URL){var o=ce($.EVENTS_URL);o.params.push("access_token="+(i||$.ACCESS_TOKEN||""));var s={event:this.type,created:new Date(e).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:n,skuId:ee,userId:this.anonId},l=t?g(s,t):s,c={url:ue(o),headers:{"Content-Type":"text/plain"},body:JSON.stringify([l])};this.pendingRequest=$e(c,(function(e){a.pendingRequest=null,r(e),a.saveEventData(),a.processRequests(i)}))}},fe.prototype.queueRequest=function(e,t){this.queue.push(e),this.processRequests(t)};var pe,me,ge=function(e){function t(){e.call(this,"map.load"),this.success={},this.skuToken=""}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.postMapLoadEvent=function(e,t,n,r){this.skuToken=n,($.EVENTS_URL&&r||$.ACCESS_TOKEN&&Array.isArray(e)&&e.some((function(e){return re(e)||ae(e)})))&&this.queueRequest({id:t,timestamp:Date.now()},r)},t.prototype.processRequests=function(e){var t=this;if(!this.pendingRequest&&0!==this.queue.length){var n=this.queue.shift(),r=n.id,i=n.timestamp;r&&this.success[r]||(this.anonId||this.fetchEventData(),_(this.anonId)||(this.anonId=b()),this.postEvent(i,{skuToken:this.skuToken},(function(e){e||r&&(t.success[r]=!0)}),e))}},t}(fe),ve=function(e){function t(t){e.call(this,"appUserTurnstile"),this._customAccessToken=t}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.postTurnstileEvent=function(e,t){$.EVENTS_URL&&$.ACCESS_TOKEN&&Array.isArray(e)&&e.some((function(e){return re(e)||ae(e)}))&&this.queueRequest(Date.now(),t)},t.prototype.processRequests=function(e){var t=this;if(!this.pendingRequest&&0!==this.queue.length){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var n=he($.ACCESS_TOKEN),r=n?n.u:$.ACCESS_TOKEN,i=r!==this.eventData.tokenU;_(this.anonId)||(this.anonId=b(),i=!0);var a=this.queue.shift();if(this.eventData.lastSuccess){var o=new Date(this.eventData.lastSuccess),s=new Date(a),l=(a-this.eventData.lastSuccess)/864e5;i=i||l>=1||l<-1||o.getDate()!==s.getDate()}else i=!0;if(!i)return this.processRequests();this.postEvent(a,{"enabled.telemetry":!1},(function(e){e||(t.eventData.lastSuccess=a,t.eventData.tokenU=r)}),e)}},t}(fe),ye=new ve,xe=ye.postTurnstileEvent.bind(ye),be=new ge,_e=be.postMapLoadEvent.bind(be),we="mapbox-tiles",Ae=500,Se=50,Me=42e4;function Te(){self.caches&&!pe&&(pe=self.caches.open(we))}function ke(e,t){if(void 0===me)try{new Response(new ReadableStream),me=!0}catch(n){me=!1}me?t(e.body):e.blob().then(t)}function Ee(e,t,n){if(Te(),pe){var r={status:t.status,statusText:t.statusText,headers:new self.Headers};t.headers.forEach((function(e,t){return r.headers.set(t,e)}));var i=L(t.headers.get("Cache-Control")||"");i["no-store"]||(i["max-age"]&&r.headers.set("Expires",new Date(n+1e3*i["max-age"]).toUTCString()),new Date(r.headers.get("Expires")).getTime()-nDate.now()&&!n["no-cache"]}var Pe,Oe=1/0;function Le(e){++Oe>Se&&(e.getActor().send("enforceCacheSizeLimit",Ae),Oe=0)}function Ie(e){Te(),pe&&pe.then((function(t){t.keys().then((function(n){for(var r=0;r=200&&n.status<300||0===n.status)&&null!==n.response){var r=n.response;if("json"===e.type)try{r=JSON.parse(n.response)}catch(i){return t(i)}t(null,r,n.getResponseHeader("Cache-Control"),n.getResponseHeader("Expires"))}else t(new je(n.statusText,n.status,e.url))},n.send(e.body),{cancel:function(){return n.abort()}}}var Ge=function(e,t){if(!Ve(e.url)){if(self.fetch&&self.Request&&self.AbortController&&self.Request.prototype.hasOwnProperty("signal"))return He(e,t);if(O()&&self.worker&&self.worker.actor){var n=!0;return self.worker.actor.send("getResource",e,t,void 0,n)}}return We(e,t)},qe=function(e,t){return Ge(g(e,{type:"json"}),t)},Ye=function(e,t){return Ge(g(e,{type:"arrayBuffer"}),t)},$e=function(e,t){return Ge(g(e,{method:"POST"}),t)};function Xe(e){var t=self.document.createElement("a");return t.href=e,t.protocol===self.document.location.protocol&&t.host===self.document.location.host}var Ze,Ke,Je="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Qe(e,t,n,r){var i=new self.Image,a=self.URL;i.onload=function(){t(null,i),a.revokeObjectURL(i.src)},i.onerror=function(){return t(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var o=new self.Blob([new Uint8Array(e)],{type:"image/png"});i.cacheControl=n,i.expires=r,i.src=e.byteLength?a.createObjectURL(o):Je}function et(e,t){var n=new self.Blob([new Uint8Array(e)],{type:"image/png"});self.createImageBitmap(n).then((function(e){t(null,e)})).catch((function(e){t(new Error("Could not load image because of "+e.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))}))}Ze=[],Ke=0;var tt=function(e,t){if(X.supported&&(e.headers||(e.headers={}),e.headers.accept="image/webp,*/*"),Ke>=$.MAX_PARALLEL_IMAGE_REQUESTS){var n={requestParameters:e,callback:t,cancelled:!1,cancel:function(){this.cancelled=!0}};return Ze.push(n),n}Ke++;var r=!1,i=function(){if(!r)for(r=!0,Ke--;Ze.length&&Ke<$.MAX_PARALLEL_IMAGE_REQUESTS;){var e=Ze.shift(),t=e.requestParameters,n=e.callback;e.cancelled||(e.cancel=tt(t,n).cancel)}},a=Ye(e,(function(e,n,r,a){i(),e?t(e):n&&(Fe()?et(n,t):Qe(n,t,r,a))}));return{cancel:function(){a.cancel(),i()}}},nt=function(e,t){var n=self.document.createElement("video");n.muted=!0,n.onloadstart=function(){t(null,n)};for(var r=0;r0||this._oneTimeListeners&&this._oneTimeListeners[e]&&this._oneTimeListeners[e].length>0||this._eventedParent&&this._eventedParent.listens(e)},st.prototype.setEventedParent=function(e,t){return this._eventedParent=e,this._eventedParentData=t,this};var lt={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},"index-of":{group:"Lookup"},slice:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},distance:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},within:{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}},ct=function(e,t,n,r){this.message=(e?e+": ":"")+n,r&&(this.identifier=r),null!==t&&void 0!==t&&t.__line__&&(this.line=t.__line__)};function ut(e){var t=e.key,n=e.value;return n?[new ct(t,n,"constants have been deprecated as of v8")]:[]}function dt(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];for(var r=0,i=t;r":"value"===e.itemType.kind?"array":"array<"+t+">"}return e.kind}var Ct=[gt,vt,yt,xt,bt,Mt,_t,kt(wt),Tt];function Dt(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!Dt(e.itemType,t.itemType))&&("number"!==typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind)for(var n=0,r=Ct;n255?255:e}function i(e){return e<0?0:e>1?1:e}function a(e){return"%"===e[e.length-1]?r(parseFloat(e)/100*255):r(parseInt(e))}function o(e){return"%"===e[e.length-1]?i(parseFloat(e)/100):i(parseFloat(e))}function s(e,t,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?e+(t-e)*n*6:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function l(e){var t,i=e.replace(/ /g,"").toLowerCase();if(i in n)return n[i].slice();if("#"===i[0])return 4===i.length?(t=parseInt(i.substr(1),16))>=0&&t<=4095?[(3840&t)>>4|(3840&t)>>8,240&t|(240&t)>>4,15&t|(15&t)<<4,1]:null:7===i.length&&(t=parseInt(i.substr(1),16))>=0&&t<=16777215?[(16711680&t)>>16,(65280&t)>>8,255&t,1]:null;var l=i.indexOf("("),c=i.indexOf(")");if(-1!==l&&c+1===i.length){var u=i.substr(0,l),d=i.substr(l+1,c-(l+1)).split(","),h=1;switch(u){case"rgba":if(4!==d.length)return null;h=o(d.pop());case"rgb":return 3!==d.length?null:[a(d[0]),a(d[1]),a(d[2]),h];case"hsla":if(4!==d.length)return null;h=o(d.pop());case"hsl":if(3!==d.length)return null;var f=(parseFloat(d[0])%360+360)%360/360,p=o(d[1]),m=o(d[2]),g=m<=.5?m*(p+1):m+p-m*p,v=2*m-g;return[r(255*s(v,g,f+1/3)),r(255*s(v,g,f)),r(255*s(v,g,f-1/3)),h];default:return null}}return null}try{t.parseCSSColor=l}catch(c){}})),Lt=Ot.parseCSSColor,It=function(e,t,n,r){void 0===r&&(r=1),this.r=e,this.g=t,this.b=n,this.a=r};It.parse=function(e){if(e){if(e instanceof It)return e;if("string"===typeof e){var t=Lt(e);if(t)return new It(t[0]/255*t[3],t[1]/255*t[3],t[2]/255*t[3],t[3])}}},It.prototype.toString=function(){var e=this.toArray(),t=e[0],n=e[1],r=e[2],i=e[3];return"rgba("+Math.round(t)+","+Math.round(n)+","+Math.round(r)+","+i+")"},It.prototype.toArray=function(){var e=this,t=e.r,n=e.g,r=e.b,i=e.a;return 0===i?[0,0,0,0]:[255*t/i,255*n/i,255*r/i,i]},It.black=new It(0,0,0,1),It.white=new It(1,1,1,1),It.transparent=new It(0,0,0,0),It.red=new It(1,0,0,1);var zt=function(e,t,n){this.sensitivity=e?t?"variant":"case":t?"accent":"base",this.locale=n,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};zt.prototype.compare=function(e,t){return this.collator.compare(e,t)},zt.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Nt=function(e,t,n,r,i){this.text=e,this.image=t,this.scale=n,this.fontStack=r,this.textColor=i},Ft=function(e){this.sections=e};Ft.fromString=function(e){return new Ft([new Nt(e,null,null,null,null)])},Ft.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some((function(e){return 0!==e.text.length||e.image&&0!==e.image.name.length}))},Ft.factory=function(e){return e instanceof Ft?e:Ft.fromString(e)},Ft.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map((function(e){return e.text})).join("")},Ft.prototype.serialize=function(){for(var e=["format"],t=0,n=this.sections;t=0&&e<=255&&"number"===typeof t&&t>=0&&t<=255&&"number"===typeof n&&n>=0&&n<=255?"undefined"===typeof r||"number"===typeof r&&r>=0&&r<=1?null:"Invalid rgba value ["+[e,t,n,r].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"===typeof r?[e,t,n,r]:[e,t,n]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function Ut(e){if(null===e)return!0;if("string"===typeof e)return!0;if("boolean"===typeof e)return!0;if("number"===typeof e)return!0;if(e instanceof It)return!0;if(e instanceof zt)return!0;if(e instanceof Ft)return!0;if(e instanceof Bt)return!0;if(Array.isArray(e)){for(var t=0,n=e;t2){var s=e[1];if("string"!==typeof s||!(s in qt)||"object"===s)return t.error('The item type argument of "array" must be one of string, number, boolean',1);a=qt[s],r++}else a=wt;if(e.length>3){if(null!==e[2]&&("number"!==typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);o=e[2],r++}n=kt(a,o)}else n=qt[i];for(var l=[];r1)&&t.push(r)}}return t.concat(this.args.map((function(e){return e.serialize()})))};var $t=function(e){this.type=Mt,this.sections=e};$t.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var n=e[1];if(!Array.isArray(n)&&"object"===typeof n)return t.error("First argument must be an image or text section.");for(var r=[],i=!1,a=1;a<=e.length-1;++a){var o=e[a];if(i&&"object"===typeof o&&!Array.isArray(o)){i=!1;var s=null;if(o["font-scale"]&&!(s=t.parse(o["font-scale"],1,vt)))return null;var l=null;if(o["text-font"]&&!(l=t.parse(o["text-font"],1,kt(yt))))return null;var c=null;if(o["text-color"]&&!(c=t.parse(o["text-color"],1,bt)))return null;var u=r[r.length-1];u.scale=s,u.font=l,u.textColor=c}else{var d=t.parse(e[a],1,wt);if(!d)return null;var h=d.type.kind;if("string"!==h&&"value"!==h&&"null"!==h&&"resolvedImage"!==h)return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");i=!0,r.push({content:d,scale:null,font:null,textColor:null})}}return new $t(r)},$t.prototype.evaluate=function(e){var t=function(t){var n=t.content.evaluate(e);return Vt(n)===Tt?new Nt("",n,null,null,null):new Nt(Ht(n),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null)};return new Ft(this.sections.map(t))},$t.prototype.eachChild=function(e){for(var t=0,n=this.sections;t-1),n},Xt.prototype.eachChild=function(e){e(this.input)},Xt.prototype.outputDefined=function(){return!1},Xt.prototype.serialize=function(){return["image",this.input.serialize()]};var Zt={"to-boolean":xt,"to-color":bt,"to-number":vt,"to-string":yt},Kt=function(e,t){this.type=e,this.args=t};Kt.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var n=e[0];if(("to-boolean"===n||"to-string"===n)&&2!==e.length)return t.error("Expected one argument.");for(var r=Zt[n],i=[],a=1;a4?"Invalid rbga value "+JSON.stringify(t)+": expected an array containing either three or four numeric values.":jt(t[0],t[1],t[2],t[3])))return new It(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new Gt(n||"Could not parse color from value '"+("string"===typeof t?t:String(JSON.stringify(t)))+"'")}if("number"===this.type.kind){for(var o=null,s=0,l=this.args;s=t[2])&&!(e[1]<=t[1])&&!(e[3]>=t[3])}function cn(e,t){var n=on(e[0]),r=sn(e[1]),i=Math.pow(2,t.z);return[Math.round(n*i*rn),Math.round(r*i*rn)]}function un(e,t,n){var r=e[0]-t[0],i=e[1]-t[1],a=e[0]-n[0],o=e[1]-n[1];return r*o-a*i===0&&r*a<=0&&i*o<=0}function dn(e,t,n){return t[1]>e[1]!==n[1]>e[1]&&e[0]<(n[0]-t[0])*(e[1]-t[1])/(n[1]-t[1])+t[0]}function hn(e,t){for(var n=!1,r=0,i=t.length;r0&&d<0||u<0&&d>0}function gn(e,t,n,r){var i=[t[0]-e[0],t[1]-e[1]];return 0!==pn([r[0]-n[0],r[1]-n[1]],i)&&!(!mn(e,t,n,r)||!mn(n,r,e,t))}function vn(e,t,n){for(var r=0,i=n;rn[2]){var i=.5*r,a=e[0]-n[0]>i?-r:n[0]-e[0]>i?r:0;0===a&&(a=e[0]-n[2]>i?-r:n[2]-e[0]>i?r:0),e[0]+=a}an(t,e)}function An(e){e[0]=e[1]=1/0,e[2]=e[3]=-1/0}function Sn(e,t,n,r){for(var i=Math.pow(2,r.z)*rn,a=[r.x*rn,r.y*rn],o=[],s=0,l=e;s=0)return!1;var n=!0;return e.eachChild((function(e){n&&!Rn(e,t)&&(n=!1)})),n}En.parse=function(e,t){if(2!==e.length)return t.error("'within' expression requires exactly one argument, but found "+(e.length-1)+" instead.");if(Ut(e[1])){var n=e[1];if("FeatureCollection"===n.type)for(var r=0;rt))throw new Gt("Input is not a number.");o=s-1}return 0}On.prototype.parse=function(e,t,n,r,i){return void 0===i&&(i={}),t?this.concat(t,n,r)._parse(e,i):this._parse(e,i)},On.prototype._parse=function(e,t){function n(e,t,n){return"assert"===n?new Yt(t,[e]):"coerce"===n?new Kt(t,[e]):e}if(null!==e&&"string"!==typeof e&&"boolean"!==typeof e&&"number"!==typeof e||(e=["literal",e]),Array.isArray(e)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var r=e[0];if("string"!==typeof r)return this.error("Expression name must be a string, but found "+typeof r+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var i=this.registry[r];if(i){var a=i.parse(e,this);if(!a)return null;if(this.expectedType){var o=this.expectedType,s=a.type;if("string"!==o.kind&&"number"!==o.kind&&"boolean"!==o.kind&&"object"!==o.kind&&"array"!==o.kind||"value"!==s.kind)if("color"!==o.kind&&"formatted"!==o.kind&&"resolvedImage"!==o.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(o,s))return null}else a=n(a,o,t.typeAnnotation||"coerce");else a=n(a,o,t.typeAnnotation||"assert")}if(!(a instanceof Wt)&&"resolvedImage"!==a.type.kind&&Ln(a)){var l=new Qt;try{a=new Wt(a.type,a.evaluate(l))}catch(c){return this.error(c.message),null}}return a}return this.error('Unknown expression "'+r+'". If you wanted a literal array, use ["literal", [...]].',0)}return"undefined"===typeof e?this.error("'undefined' value invalid. Use null instead."):"object"===typeof e?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof e+" instead.")},On.prototype.concat=function(e,t,n){var r="number"===typeof e?this.path.concat(e):this.path,i=n?this.scope.concat(n):this.scope;return new On(this.registry,r,t||null,i,this.errors)},On.prototype.error=function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];var r=""+this.key+t.map((function(e){return"["+e+"]"})).join("");this.errors.push(new pt(r,e))},On.prototype.checkSubtype=function(e,t){var n=Dt(e,t);return n&&this.error(n),n};var zn=function(e,t,n){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(var r=0,i=n;r=o)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',l);var u=t.parse(s,c,i);if(!u)return null;i=i||u.type,r.push([o,u])}return new zn(i,n,r)},zn.prototype.evaluate=function(e){var t=this.labels,n=this.outputs;if(1===t.length)return n[0].evaluate(e);var r=this.input.evaluate(e);if(r<=t[0])return n[0].evaluate(e);var i=t.length;return r>=t[i-1]?n[i-1].evaluate(e):n[In(t,r)].evaluate(e)},zn.prototype.eachChild=function(e){e(this.input);for(var t=0,n=this.outputs;t0&&e.push(this.labels[t]),e.push(this.outputs[t].serialize());return e};var jn=Object.freeze({__proto__:null,number:Nn,color:Fn,array:Bn}),Un=.95047,Vn=1,Hn=1.08883,Wn=4/29,Gn=6/29,qn=3*Gn*Gn,Yn=Gn*Gn*Gn,$n=Math.PI/180,Xn=180/Math.PI;function Zn(e){return e>Yn?Math.pow(e,1/3):e/qn+Wn}function Kn(e){return e>Gn?e*e*e:qn*(e-Wn)}function Jn(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Qn(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function er(e){var t=Qn(e.r),n=Qn(e.g),r=Qn(e.b),i=Zn((.4124564*t+.3575761*n+.1804375*r)/Un),a=Zn((.2126729*t+.7151522*n+.072175*r)/Vn);return{l:116*a-16,a:500*(i-a),b:200*(a-Zn((.0193339*t+.119192*n+.9503041*r)/Hn)),alpha:e.a}}function tr(e){var t=(e.l+16)/116,n=isNaN(e.a)?t:t+e.a/500,r=isNaN(e.b)?t:t-e.b/200;return t=Vn*Kn(t),n=Un*Kn(n),r=Hn*Kn(r),new It(Jn(3.2404542*n-1.5371385*t-.4985314*r),Jn(-.969266*n+1.8760108*t+.041556*r),Jn(.0556434*n-.2040259*t+1.0572252*r),e.alpha)}function nr(e,t,n){return{l:Nn(e.l,t.l,n),a:Nn(e.a,t.a,n),b:Nn(e.b,t.b,n),alpha:Nn(e.alpha,t.alpha,n)}}function rr(e){var t=er(e),n=t.l,r=t.a,i=t.b,a=Math.atan2(i,r)*Xn;return{h:a<0?a+360:a,c:Math.sqrt(r*r+i*i),l:n,alpha:e.a}}function ir(e){var t=e.h*$n,n=e.c;return tr({l:e.l,a:Math.cos(t)*n,b:Math.sin(t)*n,alpha:e.alpha})}function ar(e,t,n){var r=t-e;return e+n*(r>180||r<-180?r-360*Math.round(r/360):r)}function or(e,t,n){return{h:ar(e.h,t.h,n),c:Nn(e.c,t.c,n),l:Nn(e.l,t.l,n),alpha:Nn(e.alpha,t.alpha,n)}}var sr={forward:er,reverse:tr,interpolate:nr},lr={forward:rr,reverse:ir,interpolate:or},cr=Object.freeze({__proto__:null,lab:sr,hcl:lr}),ur=function(e,t,n,r,i){this.type=e,this.operator=t,this.interpolation=n,this.input=r,this.labels=[],this.outputs=[];for(var a=0,o=i;a1})))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);r={name:"cubic-bezier",controlPoints:s}}if(e.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!==0)return t.error("Expected an even number of arguments.");if(!(i=t.parse(i,2,vt)))return null;var l=[],c=null;"interpolate-hcl"===n||"interpolate-lab"===n?c=bt:t.expectedType&&"value"!==t.expectedType.kind&&(c=t.expectedType);for(var u=0;u=d)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',f);var m=t.parse(h,p,c);if(!m)return null;c=c||m.type,l.push([d,m])}return"number"===c.kind||"color"===c.kind||"array"===c.kind&&"number"===c.itemType.kind&&"number"===typeof c.N?new ur(c,n,r,i,l):t.error("Type "+Et(c)+" is not interpolatable.")},ur.prototype.evaluate=function(e){var t=this.labels,n=this.outputs;if(1===t.length)return n[0].evaluate(e);var r=this.input.evaluate(e);if(r<=t[0])return n[0].evaluate(e);var i=t.length;if(r>=t[i-1])return n[i-1].evaluate(e);var a=In(t,r),o=t[a],s=t[a+1],l=ur.interpolationFactor(this.interpolation,r,o,s),c=n[a].evaluate(e),u=n[a+1].evaluate(e);return"interpolate"===this.operator?jn[this.type.kind.toLowerCase()](c,u,l):"interpolate-hcl"===this.operator?lr.reverse(lr.interpolate(lr.forward(c),lr.forward(u),l)):sr.reverse(sr.interpolate(sr.forward(c),sr.forward(u),l))},ur.prototype.eachChild=function(e){e(this.input);for(var t=0,n=this.outputs;t=n.length)throw new Gt("Array index out of bounds: "+t+" > "+(n.length-1)+".");if(t!==Math.floor(t))throw new Gt("Array index must be an integer, but found "+t+" instead.");return n[t]},pr.prototype.eachChild=function(e){e(this.index),e(this.input)},pr.prototype.outputDefined=function(){return!1},pr.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var mr=function(e,t){this.type=xt,this.needle=e,this.haystack=t};mr.parse=function(e,t){if(3!==e.length)return t.error("Expected 2 arguments, but found "+(e.length-1)+" instead.");var n=t.parse(e[1],1,wt),r=t.parse(e[2],2,wt);return n&&r?Rt(n.type,[xt,yt,vt,gt,wt])?new mr(n,r):t.error("Expected first argument to be of type boolean, string, number or null, but found "+Et(n.type)+" instead"):null},mr.prototype.evaluate=function(e){var t=this.needle.evaluate(e),n=this.haystack.evaluate(e);if(!n)return!1;if(!Pt(t,["boolean","string","number","null"]))throw new Gt("Expected first argument to be of type boolean, string, number or null, but found "+Et(Vt(t))+" instead.");if(!Pt(n,["string","array"]))throw new Gt("Expected second argument to be of type array or string, but found "+Et(Vt(n))+" instead.");return n.indexOf(t)>=0},mr.prototype.eachChild=function(e){e(this.needle),e(this.haystack)},mr.prototype.outputDefined=function(){return!0},mr.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var gr=function(e,t,n){this.type=vt,this.needle=e,this.haystack=t,this.fromIndex=n};gr.parse=function(e,t){if(e.length<=2||e.length>=5)return t.error("Expected 3 or 4 arguments, but found "+(e.length-1)+" instead.");var n=t.parse(e[1],1,wt),r=t.parse(e[2],2,wt);if(!n||!r)return null;if(!Rt(n.type,[xt,yt,vt,gt,wt]))return t.error("Expected first argument to be of type boolean, string, number or null, but found "+Et(n.type)+" instead");if(4===e.length){var i=t.parse(e[3],3,vt);return i?new gr(n,r,i):null}return new gr(n,r)},gr.prototype.evaluate=function(e){var t=this.needle.evaluate(e),n=this.haystack.evaluate(e);if(!Pt(t,["boolean","string","number","null"]))throw new Gt("Expected first argument to be of type boolean, string, number or null, but found "+Et(Vt(t))+" instead.");if(!Pt(n,["string","array"]))throw new Gt("Expected second argument to be of type array or string, but found "+Et(Vt(n))+" instead.");if(this.fromIndex){var r=this.fromIndex.evaluate(e);return n.indexOf(t,r)}return n.indexOf(t)},gr.prototype.eachChild=function(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)},gr.prototype.outputDefined=function(){return!1},gr.prototype.serialize=function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var e=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),e]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var vr=function(e,t,n,r,i,a){this.inputType=e,this.type=t,this.input=n,this.cases=r,this.outputs=i,this.otherwise=a};vr.parse=function(e,t){if(e.length<5)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if(e.length%2!==1)return t.error("Expected an even number of arguments.");var n,r;t.expectedType&&"value"!==t.expectedType.kind&&(r=t.expectedType);for(var i={},a=[],o=2;oNumber.MAX_SAFE_INTEGER)return c.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"===typeof h&&Math.floor(h)!==h)return c.error("Numeric branch labels must be integer values.");if(n){if(c.checkSubtype(n,Vt(h)))return null}else n=Vt(h);if("undefined"!==typeof i[String(h)])return c.error("Branch labels must be unique.");i[String(h)]=a.length}var f=t.parse(l,o,r);if(!f)return null;r=r||f.type,a.push(f)}var p=t.parse(e[1],1,wt);if(!p)return null;var m=t.parse(e[e.length-1],e.length-1,r);return m?"value"!==p.type.kind&&t.concat(1).checkSubtype(n,p.type)?null:new vr(n,r,p,i,a,m):null},vr.prototype.evaluate=function(e){var t=this.input.evaluate(e);return(Vt(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)},vr.prototype.eachChild=function(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)},vr.prototype.outputDefined=function(){return this.outputs.every((function(e){return e.outputDefined()}))&&this.otherwise.outputDefined()},vr.prototype.serialize=function(){for(var e=this,t=["match",this.input.serialize()],n=[],r={},i=0,a=Object.keys(this.cases).sort();in}function Mr(e,t,n){return t<=n}function Tr(e,t,n){return t>=n}function kr(e,t,n,r){return 0===r.compare(t,n)}function Er(e,t,n,r){return!kr(e,t,n,r)}function Cr(e,t,n,r){return r.compare(t,n)<0}function Dr(e,t,n,r){return r.compare(t,n)>0}function Rr(e,t,n,r){return r.compare(t,n)<=0}function Pr(e,t,n,r){return r.compare(t,n)>=0}function Or(e,t,n){var r="=="!==e&&"!="!==e;return function(){function i(e,t,n){this.type=xt,this.lhs=e,this.rhs=t,this.collator=n,this.hasUntypedArgument="value"===e.type.kind||"value"===t.type.kind}return i.parse=function(e,t){if(3!==e.length&&4!==e.length)return t.error("Expected two or three arguments.");var n=e[0],a=t.parse(e[1],1,wt);if(!a)return null;if(!br(n,a.type))return t.concat(1).error('"'+n+"\" comparisons are not supported for type '"+Et(a.type)+"'.");var o=t.parse(e[2],2,wt);if(!o)return null;if(!br(n,o.type))return t.concat(2).error('"'+n+"\" comparisons are not supported for type '"+Et(o.type)+"'.");if(a.type.kind!==o.type.kind&&"value"!==a.type.kind&&"value"!==o.type.kind)return t.error("Cannot compare types '"+Et(a.type)+"' and '"+Et(o.type)+"'.");r&&("value"===a.type.kind&&"value"!==o.type.kind?a=new Yt(o.type,[a]):"value"!==a.type.kind&&"value"===o.type.kind&&(o=new Yt(a.type,[o])));var s=null;if(4===e.length){if("string"!==a.type.kind&&"string"!==o.type.kind&&"value"!==a.type.kind&&"value"!==o.type.kind)return t.error("Cannot use collator to compare non-string types.");if(!(s=t.parse(e[3],3,St)))return null}return new i(a,o,s)},i.prototype.evaluate=function(i){var a=this.lhs.evaluate(i),o=this.rhs.evaluate(i);if(r&&this.hasUntypedArgument){var s=Vt(a),l=Vt(o);if(s.kind!==l.kind||"string"!==s.kind&&"number"!==s.kind)throw new Gt('Expected arguments for "'+e+'" to be (string, string) or (number, number), but found ('+s.kind+", "+l.kind+") instead.")}if(this.collator&&!r&&this.hasUntypedArgument){var c=Vt(a),u=Vt(o);if("string"!==c.kind||"string"!==u.kind)return t(i,a,o)}return this.collator?n(i,a,o,this.collator.evaluate(i)):t(i,a,o)},i.prototype.eachChild=function(e){e(this.lhs),e(this.rhs),this.collator&&e(this.collator)},i.prototype.outputDefined=function(){return!0},i.prototype.serialize=function(){var t=[e];return this.eachChild((function(e){t.push(e.serialize())})),t},i}()}xr.parse=function(e,t){if(e.length<=2||e.length>=5)return t.error("Expected 3 or 4 arguments, but found "+(e.length-1)+" instead.");var n=t.parse(e[1],1,wt),r=t.parse(e[2],2,vt);if(!n||!r)return null;if(!Rt(n.type,[kt(wt),yt,wt]))return t.error("Expected first argument to be of type array or string, but found "+Et(n.type)+" instead");if(4===e.length){var i=t.parse(e[3],3,vt);return i?new xr(n.type,n,r,i):null}return new xr(n.type,n,r)},xr.prototype.evaluate=function(e){var t=this.input.evaluate(e),n=this.beginIndex.evaluate(e);if(!Pt(t,["string","array"]))throw new Gt("Expected first argument to be of type array or string, but found "+Et(Vt(t))+" instead.");if(this.endIndex){var r=this.endIndex.evaluate(e);return t.slice(n,r)}return t.slice(n)},xr.prototype.eachChild=function(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)},xr.prototype.outputDefined=function(){return!1},xr.prototype.serialize=function(){if(null!=this.endIndex&&void 0!==this.endIndex){var e=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),e]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var Lr=Or("==",_r,kr),Ir=Or("!=",wr,Er),zr=Or("<",Ar,Cr),Nr=Or(">",Sr,Dr),Fr=Or("<=",Mr,Rr),Br=Or(">=",Tr,Pr),jr=function(e,t,n,r,i){this.type=yt,this.number=e,this.locale=t,this.currency=n,this.minFractionDigits=r,this.maxFractionDigits=i};jr.parse=function(e,t){if(3!==e.length)return t.error("Expected two arguments.");var n=t.parse(e[1],1,vt);if(!n)return null;var r=e[2];if("object"!==typeof r||Array.isArray(r))return t.error("NumberFormat options argument must be an object.");var i=null;if(r.locale&&!(i=t.parse(r.locale,1,yt)))return null;var a=null;if(r.currency&&!(a=t.parse(r.currency,1,yt)))return null;var o=null;if(r["min-fraction-digits"]&&!(o=t.parse(r["min-fraction-digits"],1,vt)))return null;var s=null;return r["max-fraction-digits"]&&!(s=t.parse(r["max-fraction-digits"],1,vt))?null:new jr(n,i,a,o,s)},jr.prototype.evaluate=function(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))},jr.prototype.eachChild=function(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)},jr.prototype.outputDefined=function(){return!1},jr.prototype.serialize=function(){var e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]};var Ur=function(e){this.type=vt,this.input=e};Ur.parse=function(e,t){if(2!==e.length)return t.error("Expected 1 argument, but found "+(e.length-1)+" instead.");var n=t.parse(e[1],1);return n?"array"!==n.type.kind&&"string"!==n.type.kind&&"value"!==n.type.kind?t.error("Expected argument of type string or array, but found "+Et(n.type)+" instead."):new Ur(n):null},Ur.prototype.evaluate=function(e){var t=this.input.evaluate(e);if("string"===typeof t)return t.length;if(Array.isArray(t))return t.length;throw new Gt("Expected value to be of type string or array, but found "+Et(Vt(t))+" instead.")},Ur.prototype.eachChild=function(e){e(this.input)},Ur.prototype.outputDefined=function(){return!1},Ur.prototype.serialize=function(){var e=["length"];return this.eachChild((function(t){e.push(t.serialize())})),e};var Vr={"==":Lr,"!=":Ir,">":Nr,"<":zr,">=":Br,"<=":Fr,array:Yt,at:pr,boolean:Yt,case:yr,coalesce:hr,collator:nn,format:$t,image:Xt,in:mr,"index-of":gr,interpolate:ur,"interpolate-hcl":ur,"interpolate-lab":ur,length:Ur,let:fr,literal:Wt,match:vr,number:Yt,"number-format":jr,object:Yt,slice:xr,step:zn,string:Yt,"to-boolean":Kt,"to-color":Kt,"to-number":Kt,"to-string":Kt,var:Pn,within:En};function Hr(e,t){var n=t[0],r=t[1],i=t[2],a=t[3];n=n.evaluate(e),r=r.evaluate(e),i=i.evaluate(e);var o=a?a.evaluate(e):1,s=jt(n,r,i,o);if(s)throw new Gt(s);return new It(n/255*o,r/255*o,i/255*o,o)}function Wr(e,t){return e in t}function Gr(e,t){var n=t[e];return"undefined"===typeof n?null:n}function qr(e,t,n,r){for(;n<=r;){var i=n+r>>1;if(t[i]===e)return!0;t[i]>e?r=i-1:n=i+1}return!1}function Yr(e){return{type:e}}function $r(e){return{result:"success",value:e}}function Xr(e){return{result:"error",value:e}}function Zr(e){return"data-driven"===e["property-type"]||"cross-faded-data-driven"===e["property-type"]}function Kr(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function Jr(e){return!!e.expression&&e.expression.interpolated}function Qr(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":null===e?"null":typeof e}function ei(e){return"object"===typeof e&&null!==e&&!Array.isArray(e)}function ti(e){return e}function ni(e,t){var n,r,i,a="color"===t.type,o=e.stops&&"object"===typeof e.stops[0][0],s=o||void 0!==e.property,l=o||!s,c=e.type||(Jr(t)?"exponential":"interval");if(a&&((e=dt({},e)).stops&&(e.stops=e.stops.map((function(e){return[e[0],It.parse(e[1])]}))),e.default?e.default=It.parse(e.default):e.default=It.parse(t.default)),e.colorSpace&&"rgb"!==e.colorSpace&&!cr[e.colorSpace])throw new Error("Unknown color space: "+e.colorSpace);if("exponential"===c)n=oi;else if("interval"===c)n=ai;else if("categorical"===c){n=ii,r=Object.create(null);for(var u=0,d=e.stops;u=e.stops[r-1][0])return e.stops[r-1][1];var i=In(e.stops.map((function(e){return e[0]})),n);return e.stops[i][1]}function oi(e,t,n){var r=void 0!==e.base?e.base:1;if("number"!==Qr(n))return ri(e.default,t.default);var i=e.stops.length;if(1===i)return e.stops[0][1];if(n<=e.stops[0][0])return e.stops[0][1];if(n>=e.stops[i-1][0])return e.stops[i-1][1];var a=In(e.stops.map((function(e){return e[0]})),n),o=li(n,r,e.stops[a][0],e.stops[a+1][0]),s=e.stops[a][1],l=e.stops[a+1][1],c=jn[t.type]||ti;if(e.colorSpace&&"rgb"!==e.colorSpace){var u=cr[e.colorSpace];c=function(e,t){return u.reverse(u.interpolate(u.forward(e),u.forward(t),o))}}return"function"===typeof s.evaluate?{evaluate:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=s.evaluate.apply(void 0,e),r=l.evaluate.apply(void 0,e);if(void 0!==n&&void 0!==r)return c(n,r,o)}}:c(s,l,o)}function si(e,t,n){return"color"===t.type?n=It.parse(n):"formatted"===t.type?n=Ft.fromString(n.toString()):"resolvedImage"===t.type?n=Bt.fromString(n.toString()):Qr(n)===t.type||"enum"===t.type&&t.values[n]||(n=void 0),ri(n,e.default,t.default)}function li(e,t,n,r){var i=r-n,a=e-n;return 0===i?0:1===t?a/i:(Math.pow(t,a)-1)/(Math.pow(t,i)-1)}en.register(Vr,{error:[At,[yt],function(e,t){var n=t[0];throw new Gt(n.evaluate(e))}],typeof:[yt,[wt],function(e,t){return Et(Vt(t[0].evaluate(e)))}],"to-rgba":[kt(vt,4),[bt],function(e,t){return t[0].evaluate(e).toArray()}],rgb:[bt,[vt,vt,vt],Hr],rgba:[bt,[vt,vt,vt,vt],Hr],has:{type:xt,overloads:[[[yt],function(e,t){return Wr(t[0].evaluate(e),e.properties())}],[[yt,_t],function(e,t){var n=t[0],r=t[1];return Wr(n.evaluate(e),r.evaluate(e))}]]},get:{type:wt,overloads:[[[yt],function(e,t){return Gr(t[0].evaluate(e),e.properties())}],[[yt,_t],function(e,t){var n=t[0],r=t[1];return Gr(n.evaluate(e),r.evaluate(e))}]]},"feature-state":[wt,[yt],function(e,t){return Gr(t[0].evaluate(e),e.featureState||{})}],properties:[_t,[],function(e){return e.properties()}],"geometry-type":[yt,[],function(e){return e.geometryType()}],id:[wt,[],function(e){return e.id()}],zoom:[vt,[],function(e){return e.globals.zoom}],"heatmap-density":[vt,[],function(e){return e.globals.heatmapDensity||0}],"line-progress":[vt,[],function(e){return e.globals.lineProgress||0}],accumulated:[wt,[],function(e){return void 0===e.globals.accumulated?null:e.globals.accumulated}],"+":[vt,Yr(vt),function(e,t){for(var n=0,r=0,i=t;r":[xt,[yt,wt],function(e,t){var n=t[0],r=t[1],i=e.properties()[n.value],a=r.value;return typeof i===typeof a&&i>a}],"filter-id->":[xt,[wt],function(e,t){var n=t[0],r=e.id(),i=n.value;return typeof r===typeof i&&r>i}],"filter-<=":[xt,[yt,wt],function(e,t){var n=t[0],r=t[1],i=e.properties()[n.value],a=r.value;return typeof i===typeof a&&i<=a}],"filter-id-<=":[xt,[wt],function(e,t){var n=t[0],r=e.id(),i=n.value;return typeof r===typeof i&&r<=i}],"filter->=":[xt,[yt,wt],function(e,t){var n=t[0],r=t[1],i=e.properties()[n.value],a=r.value;return typeof i===typeof a&&i>=a}],"filter-id->=":[xt,[wt],function(e,t){var n=t[0],r=e.id(),i=n.value;return typeof r===typeof i&&r>=i}],"filter-has":[xt,[wt],function(e,t){return t[0].value in e.properties()}],"filter-has-id":[xt,[],function(e){return null!==e.id()&&void 0!==e.id()}],"filter-type-in":[xt,[kt(yt)],function(e,t){return t[0].value.indexOf(e.geometryType())>=0}],"filter-id-in":[xt,[kt(wt)],function(e,t){return t[0].value.indexOf(e.id())>=0}],"filter-in-small":[xt,[yt,kt(wt)],function(e,t){var n=t[0];return t[1].value.indexOf(e.properties()[n.value])>=0}],"filter-in-large":[xt,[yt,kt(wt)],function(e,t){var n=t[0],r=t[1];return qr(e.properties()[n.value],r.value,0,r.value.length-1)}],all:{type:xt,overloads:[[[xt,xt],function(e,t){var n=t[0],r=t[1];return n.evaluate(e)&&r.evaluate(e)}],[Yr(xt),function(e,t){for(var n=0,r=t;n0&&"string"===typeof e[0]&&e[0]in Vr}function di(e,t){var n=new On(Vr,[],t?yi(t):void 0),r=n.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return r?$r(new ci(r,t)):Xr(n.errors)}ci.prototype.evaluateWithoutErrorHandling=function(e,t,n,r,i,a){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=n,this._evaluator.canonical=r,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a,this.expression.evaluate(this._evaluator)},ci.prototype.evaluate=function(e,t,n,r,i,a){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=n||null,this._evaluator.canonical=r,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a||null;try{var o=this.expression.evaluate(this._evaluator);if(null===o||void 0===o||"number"===typeof o&&o!==o)return this._defaultValue;if(this._enumValues&&!(o in this._enumValues))throw new Gt("Expected value to be one of "+Object.keys(this._enumValues).map((function(e){return JSON.stringify(e)})).join(", ")+", but found "+JSON.stringify(o)+" instead.");return o}catch(s){return this._warningHistory[s.message]||(this._warningHistory[s.message]=!0,"undefined"!==typeof console&&console.warn(s.message)),this._defaultValue}};var hi=function(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!Dn(t.expression)};hi.prototype.evaluateWithoutErrorHandling=function(e,t,n,r,i,a){return this._styleExpression.evaluateWithoutErrorHandling(e,t,n,r,i,a)},hi.prototype.evaluate=function(e,t,n,r,i,a){return this._styleExpression.evaluate(e,t,n,r,i,a)};var fi=function(e,t,n,r){this.kind=e,this.zoomStops=n,this._styleExpression=t,this.isStateDependent="camera"!==e&&!Dn(t.expression),this.interpolationType=r};function pi(e,t){if("error"===(e=di(e,t)).result)return e;var n=e.value.expression,r=Cn(n);if(!r&&!Zr(t))return Xr([new pt("","data expressions not supported")]);var i=Rn(n,["zoom"]);if(!i&&!Kr(t))return Xr([new pt("","zoom expressions not supported")]);var a=vi(n);if(!a&&!i)return Xr([new pt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(a instanceof pt)return Xr([a]);if(a instanceof ur&&!Jr(t))return Xr([new pt("",'"interpolate" expressions cannot be used with this property')]);if(!a)return $r(new hi(r?"constant":"source",e.value));var o=a instanceof ur?a.interpolation:void 0;return $r(new fi(r?"camera":"composite",e.value,a.labels,o))}fi.prototype.evaluateWithoutErrorHandling=function(e,t,n,r,i,a){return this._styleExpression.evaluateWithoutErrorHandling(e,t,n,r,i,a)},fi.prototype.evaluate=function(e,t,n,r,i,a){return this._styleExpression.evaluate(e,t,n,r,i,a)},fi.prototype.interpolationFactor=function(e,t,n){return this.interpolationType?ur.interpolationFactor(this.interpolationType,e,t,n):0};var mi=function(e,t){this._parameters=e,this._specification=t,dt(this,ni(this._parameters,this._specification))};function gi(e,t){if(ei(e))return new mi(e,t);if(ui(e)){var n=pi(e,t);if("error"===n.result)throw new Error(n.value.map((function(e){return e.key+": "+e.message})).join(", "));return n.value}var r=e;return"string"===typeof e&&"color"===t.type&&(r=It.parse(e)),{kind:"constant",evaluate:function(){return r}}}function vi(e){var t=null;if(e instanceof fr)t=vi(e.result);else if(e instanceof hr)for(var n=0,r=e.args;nr.maximum?[new ct(t,n,n+" is greater than the maximum value "+r.maximum)]:[]}function Ai(e){var t,n,r,i=e.valueSpec,a=ht(e.value.type),o={},s="categorical"!==a&&void 0===e.value.property,l=!s,c="array"===Qr(e.value.stops)&&"array"===Qr(e.value.stops[0])&&"object"===Qr(e.value.stops[0][0]),u=bi({key:e.key,value:e.value,valueSpec:e.styleSpec.function,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{stops:d,default:p}});return"identity"===a&&s&&u.push(new ct(e.key,e.value,'missing required property "property"')),"identity"===a||e.value.stops||u.push(new ct(e.key,e.value,'missing required property "stops"')),"exponential"===a&&e.valueSpec.expression&&!Jr(e.valueSpec)&&u.push(new ct(e.key,e.value,"exponential functions not supported")),e.styleSpec.$version>=8&&(l&&!Zr(e.valueSpec)?u.push(new ct(e.key,e.value,"property functions not supported")):s&&!Kr(e.valueSpec)&&u.push(new ct(e.key,e.value,"zoom functions not supported"))),"categorical"!==a&&!c||void 0!==e.value.property||u.push(new ct(e.key,e.value,'"property" property is required')),u;function d(e){if("identity"===a)return[new ct(e.key,e.value,'identity function may not have a "stops" property')];var t=[],n=e.value;return t=t.concat(_i({key:e.key,value:n,valueSpec:e.valueSpec,style:e.style,styleSpec:e.styleSpec,arrayElementValidator:h})),"array"===Qr(n)&&0===n.length&&t.push(new ct(e.key,n,"array must have at least one stop")),t}function h(e){var t=[],a=e.value,s=e.key;if("array"!==Qr(a))return[new ct(s,a,"array expected, "+Qr(a)+" found")];if(2!==a.length)return[new ct(s,a,"array length 2 expected, length "+a.length+" found")];if(c){if("object"!==Qr(a[0]))return[new ct(s,a,"object expected, "+Qr(a[0])+" found")];if(void 0===a[0].zoom)return[new ct(s,a,"object stop key must have zoom")];if(void 0===a[0].value)return[new ct(s,a,"object stop key must have value")];if(r&&r>ht(a[0].zoom))return[new ct(s,a[0].zoom,"stop zoom values must appear in ascending order")];ht(a[0].zoom)!==r&&(r=ht(a[0].zoom),n=void 0,o={}),t=t.concat(bi({key:s+"[0]",value:a[0],valueSpec:{zoom:{}},style:e.style,styleSpec:e.styleSpec,objectElementValidators:{zoom:wi,value:f}}))}else t=t.concat(f({key:s+"[0]",value:a[0],valueSpec:{},style:e.style,styleSpec:e.styleSpec},a));return ui(ft(a[1]))?t.concat([new ct(s+"[1]",a[1],"expressions are not allowed in function stops.")]):t.concat(Qi({key:s+"[1]",value:a[1],valueSpec:i,style:e.style,styleSpec:e.styleSpec}))}function f(e,r){var s=Qr(e.value),l=ht(e.value),c=null!==e.value?e.value:r;if(t){if(s!==t)return[new ct(e.key,c,s+" stop domain type must match previous stop domain type "+t)]}else t=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new ct(e.key,c,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==a){var u="number expected, "+s+" found";return Zr(i)&&void 0===a&&(u+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new ct(e.key,c,u)]}return"categorical"!==a||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==a&&"number"===s&&void 0!==n&&l=2&&"$id"!==e[1]&&"$type"!==e[1];case"in":return e.length>=3&&("string"!==typeof e[1]||Array.isArray(e[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(var t=0,n=e.slice(1);tt?1:0}function Pi(e){if(!Array.isArray(e))return!1;if("within"===e[0])return!0;for(var t=1;t"===t||"<="===t||">="===t?Li(e[1],e[2],t):"any"===t?Ii(e.slice(1)):"all"===t?["all"].concat(e.slice(1).map(Oi)):"none"===t?["all"].concat(e.slice(1).map(Oi).map(Fi)):"in"===t?zi(e[1],e.slice(2)):"!in"===t?Fi(zi(e[1],e.slice(2))):"has"===t?Ni(e[1]):"!has"===t?Fi(Ni(e[1])):"within"!==t||e}function Li(e,t,n){switch(e){case"$type":return["filter-type-"+n,t];case"$id":return["filter-id-"+n,t];default:return["filter-"+n,e,t]}}function Ii(e){return["any"].concat(e.map(Oi))}function zi(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some((function(e){return typeof e!==typeof t[0]}))?["filter-in-large",e,["literal",t.sort(Ri)]]:["filter-in-small",e,["literal",t]]}}function Ni(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function Fi(e){return["!",e]}function Bi(e){return Ei(ft(e.value))?Si(dt({},e,{expressionContext:"filter",valueSpec:{value:"boolean"}})):ji(e)}function ji(e){var t=e.value,n=e.key;if("array"!==Qr(t))return[new ct(n,t,"array expected, "+Qr(t)+" found")];var r,i=e.styleSpec,a=[];if(t.length<1)return[new ct(n,t,"filter array must have at least 1 element")];switch(a=a.concat(ki({key:n+"[0]",value:t[0],valueSpec:i.filter_operator,style:e.style,styleSpec:e.styleSpec})),ht(t[0])){case"<":case"<=":case">":case">=":t.length>=2&&"$type"===ht(t[1])&&a.push(new ct(n,t,'"$type" cannot be use with operator "'+t[0]+'"'));case"==":case"!=":3!==t.length&&a.push(new ct(n,t,'filter array for operator "'+t[0]+'" must have 3 elements'));case"in":case"!in":t.length>=2&&"string"!==(r=Qr(t[1]))&&a.push(new ct(n+"[1]",t[1],"string expected, "+r+" found"));for(var o=2;o=u[f+0]&&r>=u[f+1])?(o[h]=!0,a.push(c[h])):o[h]=!1}}},da.prototype._forEachCell=function(e,t,n,r,i,a,o,s){for(var l=this._convertToCellCoord(e),c=this._convertToCellCoord(t),u=this._convertToCellCoord(n),d=this._convertToCellCoord(r),h=l;h<=u;h++)for(var f=c;f<=d;f++){var p=this.d*f+h;if((!s||s(this._convertFromCellCoord(h),this._convertFromCellCoord(f),this._convertFromCellCoord(h+1),this._convertFromCellCoord(f+1)))&&i.call(this,e,t,n,r,p,a,o,s))return}},da.prototype._convertFromCellCoord=function(e){return(e-this.padding)/this.scale},da.prototype._convertToCellCoord=function(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))},da.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var e=this.cells,t=ua+this.cells.length+1+1,n=0,r=0;r=0)){var d=e[u];c[u]=pa[l].shallow.indexOf(u)>=0?d:xa(d,t)}e instanceof Error&&(c.message=e.message)}if(c.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==l&&(c.$name=l),c}throw new Error("can't serialize object of type "+typeof e)}function ba(e){if(null===e||void 0===e||"boolean"===typeof e||"number"===typeof e||"string"===typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||va(e)||ya(e)||ArrayBuffer.isView(e)||e instanceof ha)return e;if(Array.isArray(e))return e.map(ba);if("object"===typeof e){var t=e.$name||"Object",n=pa[t].klass;if(!n)throw new Error("can't deserialize unregistered class "+t);if(n.deserialize)return n.deserialize(e);for(var r=Object.create(n.prototype),i=0,a=Object.keys(e);i=0?s:ba(s)}}return r}throw new Error("can't deserialize object of type "+typeof e)}var _a=function(){this.first=!0};_a.prototype.update=function(e,t){var n=Math.floor(e);return this.first?(this.first=!1,this.lastIntegerZoom=n,this.lastIntegerZoomTime=0,this.lastZoom=e,this.lastFloorZoom=n,!0):(this.lastFloorZoom>n?(this.lastIntegerZoom=n+1,this.lastIntegerZoomTime=t):this.lastFloorZoom=128&&e<=255},Arabic:function(e){return e>=1536&&e<=1791},"Arabic Supplement":function(e){return e>=1872&&e<=1919},"Arabic Extended-A":function(e){return e>=2208&&e<=2303},"Hangul Jamo":function(e){return e>=4352&&e<=4607},"Unified Canadian Aboriginal Syllabics":function(e){return e>=5120&&e<=5759},Khmer:function(e){return e>=6016&&e<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(e){return e>=6320&&e<=6399},"General Punctuation":function(e){return e>=8192&&e<=8303},"Letterlike Symbols":function(e){return e>=8448&&e<=8527},"Number Forms":function(e){return e>=8528&&e<=8591},"Miscellaneous Technical":function(e){return e>=8960&&e<=9215},"Control Pictures":function(e){return e>=9216&&e<=9279},"Optical Character Recognition":function(e){return e>=9280&&e<=9311},"Enclosed Alphanumerics":function(e){return e>=9312&&e<=9471},"Geometric Shapes":function(e){return e>=9632&&e<=9727},"Miscellaneous Symbols":function(e){return e>=9728&&e<=9983},"Miscellaneous Symbols and Arrows":function(e){return e>=11008&&e<=11263},"CJK Radicals Supplement":function(e){return e>=11904&&e<=12031},"Kangxi Radicals":function(e){return e>=12032&&e<=12255},"Ideographic Description Characters":function(e){return e>=12272&&e<=12287},"CJK Symbols and Punctuation":function(e){return e>=12288&&e<=12351},Hiragana:function(e){return e>=12352&&e<=12447},Katakana:function(e){return e>=12448&&e<=12543},Bopomofo:function(e){return e>=12544&&e<=12591},"Hangul Compatibility Jamo":function(e){return e>=12592&&e<=12687},Kanbun:function(e){return e>=12688&&e<=12703},"Bopomofo Extended":function(e){return e>=12704&&e<=12735},"CJK Strokes":function(e){return e>=12736&&e<=12783},"Katakana Phonetic Extensions":function(e){return e>=12784&&e<=12799},"Enclosed CJK Letters and Months":function(e){return e>=12800&&e<=13055},"CJK Compatibility":function(e){return e>=13056&&e<=13311},"CJK Unified Ideographs Extension A":function(e){return e>=13312&&e<=19903},"Yijing Hexagram Symbols":function(e){return e>=19904&&e<=19967},"CJK Unified Ideographs":function(e){return e>=19968&&e<=40959},"Yi Syllables":function(e){return e>=40960&&e<=42127},"Yi Radicals":function(e){return e>=42128&&e<=42191},"Hangul Jamo Extended-A":function(e){return e>=43360&&e<=43391},"Hangul Syllables":function(e){return e>=44032&&e<=55215},"Hangul Jamo Extended-B":function(e){return e>=55216&&e<=55295},"Private Use Area":function(e){return e>=57344&&e<=63743},"CJK Compatibility Ideographs":function(e){return e>=63744&&e<=64255},"Arabic Presentation Forms-A":function(e){return e>=64336&&e<=65023},"Vertical Forms":function(e){return e>=65040&&e<=65055},"CJK Compatibility Forms":function(e){return e>=65072&&e<=65103},"Small Form Variants":function(e){return e>=65104&&e<=65135},"Arabic Presentation Forms-B":function(e){return e>=65136&&e<=65279},"Halfwidth and Fullwidth Forms":function(e){return e>=65280&&e<=65519}};function Aa(e){for(var t=0,n=e;t=65097&&e<=65103)||!!wa["CJK Compatibility Ideographs"](e)||!!wa["CJK Compatibility"](e)||!!wa["CJK Radicals Supplement"](e)||!!wa["CJK Strokes"](e)||!(!wa["CJK Symbols and Punctuation"](e)||e>=12296&&e<=12305||e>=12308&&e<=12319||12336===e)||!!wa["CJK Unified Ideographs Extension A"](e)||!!wa["CJK Unified Ideographs"](e)||!!wa["Enclosed CJK Letters and Months"](e)||!!wa["Hangul Compatibility Jamo"](e)||!!wa["Hangul Jamo Extended-A"](e)||!!wa["Hangul Jamo Extended-B"](e)||!!wa["Hangul Jamo"](e)||!!wa["Hangul Syllables"](e)||!!wa.Hiragana(e)||!!wa["Ideographic Description Characters"](e)||!!wa.Kanbun(e)||!!wa["Kangxi Radicals"](e)||!!wa["Katakana Phonetic Extensions"](e)||!(!wa.Katakana(e)||12540===e)||!(!wa["Halfwidth and Fullwidth Forms"](e)||65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||!(!wa["Small Form Variants"](e)||e>=65112&&e<=65118||e>=65123&&e<=65126)||!!wa["Unified Canadian Aboriginal Syllabics"](e)||!!wa["Unified Canadian Aboriginal Syllabics Extended"](e)||!!wa["Vertical Forms"](e)||!!wa["Yijing Hexagram Symbols"](e)||!!wa["Yi Syllables"](e)||!!wa["Yi Radicals"](e))}function Ea(e){return!(!wa["Latin-1 Supplement"](e)||167!==e&&169!==e&&174!==e&&177!==e&&188!==e&&189!==e&&190!==e&&215!==e&&247!==e)||!(!wa["General Punctuation"](e)||8214!==e&&8224!==e&&8225!==e&&8240!==e&&8241!==e&&8251!==e&&8252!==e&&8258!==e&&8263!==e&&8264!==e&&8265!==e&&8273!==e)||!!wa["Letterlike Symbols"](e)||!!wa["Number Forms"](e)||!(!wa["Miscellaneous Technical"](e)||!(e>=8960&&e<=8967||e>=8972&&e<=8991||e>=8996&&e<=9e3||9003===e||e>=9085&&e<=9114||e>=9150&&e<=9165||9167===e||e>=9169&&e<=9179||e>=9186&&e<=9215))||!(!wa["Control Pictures"](e)||9251===e)||!!wa["Optical Character Recognition"](e)||!!wa["Enclosed Alphanumerics"](e)||!!wa["Geometric Shapes"](e)||!(!wa["Miscellaneous Symbols"](e)||e>=9754&&e<=9759)||!(!wa["Miscellaneous Symbols and Arrows"](e)||!(e>=11026&&e<=11055||e>=11088&&e<=11097||e>=11192&&e<=11243))||!!wa["CJK Symbols and Punctuation"](e)||!!wa.Katakana(e)||!!wa["Private Use Area"](e)||!!wa["CJK Compatibility Forms"](e)||!!wa["Small Form Variants"](e)||!!wa["Halfwidth and Fullwidth Forms"](e)||8734===e||8756===e||8757===e||e>=9984&&e<=10087||e>=10102&&e<=10131||65532===e||65533===e}function Ca(e){return!(ka(e)||Ea(e))}function Da(e){return wa.Arabic(e)||wa["Arabic Supplement"](e)||wa["Arabic Extended-A"](e)||wa["Arabic Presentation Forms-A"](e)||wa["Arabic Presentation Forms-B"](e)}function Ra(e){return e>=1424&&e<=2303||wa["Arabic Presentation Forms-A"](e)||wa["Arabic Presentation Forms-B"](e)}function Pa(e,t){return!(!t&&Ra(e))&&!(e>=2304&&e<=3583||e>=3840&&e<=4255||wa.Khmer(e))}function Oa(e){for(var t=0,n=e;t-1&&(Na=Ia.error),za&&za(e)};function ja(){Ua.fire(new at("pluginStateChange",{pluginStatus:Na,pluginURL:Fa}))}var Ua=new st,Va=function(){return Na},Ha=function(e){return e({pluginStatus:Na,pluginURL:Fa}),Ua.on("pluginStateChange",e),e},Wa=function(e,t,n){if(void 0===n&&(n=!1),Na===Ia.deferred||Na===Ia.loading||Na===Ia.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");Fa=Y.resolveURL(e),Na=Ia.deferred,za=t,ja(),n||Ga()},Ga=function(){if(Na!==Ia.deferred||!Fa)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Na=Ia.loading,ja(),Fa&&Ye({url:Fa},(function(e){e?Ba(e):(Na=Ia.loaded,ja())}))},qa={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return Na===Ia.loaded||null!=qa.applyArabicShaping},isLoading:function(){return Na===Ia.loading},setState:function(e){Na=e.pluginStatus,Fa=e.pluginURL},isParsed:function(){return null!=qa.applyArabicShaping&&null!=qa.processBidirectionalText&&null!=qa.processStyledBidirectionalText},getPluginURL:function(){return Fa}},Ya=function(){qa.isLoading()||qa.isLoaded()||"deferred"!==Va()||Ga()},$a=function(e,t){this.zoom=e,t?(this.now=t.now,this.fadeDuration=t.fadeDuration,this.zoomHistory=t.zoomHistory,this.transition=t.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new _a,this.transition={})};$a.prototype.isSupportedScript=function(e){return La(e,qa.isLoaded())},$a.prototype.crossFadingFactor=function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},$a.prototype.getCrossfadeParameters=function(){var e=this.zoom,t=e-Math.floor(e),n=this.crossFadingFactor();return e>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:t+(1-t)*n}:{fromScale:.5,toScale:1,t:1-(1-n)*t}};var Xa=function(e,t){this.property=e,this.value=t,this.expression=gi(void 0===t?e.specification.default:t,e.specification)};Xa.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},Xa.prototype.possiblyEvaluate=function(e,t,n){return this.property.possiblyEvaluate(this,e,t,n)};var Za=function(e){this.property=e,this.value=new Xa(e,void 0)};Za.prototype.transitioned=function(e,t){return new Ja(this.property,this.value,t,g({},e.transition,this.transition),e.now)},Za.prototype.untransitioned=function(){return new Ja(this.property,this.value,null,{},0)};var Ka=function(e){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues)};Ka.prototype.getValue=function(e){return T(this._values[e].value.value)},Ka.prototype.setValue=function(e,t){this._values.hasOwnProperty(e)||(this._values[e]=new Za(this._values[e].property)),this._values[e].value=new Xa(this._values[e].property,null===t?void 0:T(t))},Ka.prototype.getTransition=function(e){return T(this._values[e].transition)},Ka.prototype.setTransition=function(e,t){this._values.hasOwnProperty(e)||(this._values[e]=new Za(this._values[e].property)),this._values[e].transition=T(t)||void 0},Ka.prototype.serialize=function(){for(var e={},t=0,n=Object.keys(this._values);tthis.end)return this.prior=null,i;if(this.value.isDataDriven())return this.prior=null,i;if(rr.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:n,to:t}},t.prototype.interpolate=function(e){return e},t}(io),oo=function(e){this.specification=e};oo.prototype.possiblyEvaluate=function(e,t,n,r){if(void 0!==e.value){if("constant"===e.expression.kind){var i=e.expression.evaluate(t,null,{},n,r);return this._calculate(i,i,i,t)}return this._calculate(e.expression.evaluate(new $a(Math.floor(t.zoom-1),t)),e.expression.evaluate(new $a(Math.floor(t.zoom),t)),e.expression.evaluate(new $a(Math.floor(t.zoom+1),t)),t)}},oo.prototype._calculate=function(e,t,n,r){return r.zoom>r.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:n,to:t}},oo.prototype.interpolate=function(e){return e};var so=function(e){this.specification=e};so.prototype.possiblyEvaluate=function(e,t,n,r){return!!e.expression.evaluate(t,null,{},n,r)},so.prototype.interpolate=function(){return!1};var lo=function(e){for(var t in this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],e){var n=e[t];n.specification.overridable&&this.overridableProperties.push(t);var r=this.defaultPropertyValues[t]=new Xa(n,void 0),i=this.defaultTransitionablePropertyValues[t]=new Za(n);this.defaultTransitioningPropertyValues[t]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[t]=r.possiblyEvaluate({})}};ma("DataDrivenProperty",io),ma("DataConstantProperty",ro),ma("CrossFadedDataDrivenProperty",ao),ma("CrossFadedProperty",oo),ma("ColorRampProperty",so);var co="-transition",uo=function(e){function t(t,n){if(e.call(this),this.id=t.id,this.type=t.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},"custom"!==t.type&&(this.metadata=t.metadata,this.minzoom=t.minzoom,this.maxzoom=t.maxzoom,"background"!==t.type&&(this.source=t.source,this.sourceLayer=t["source-layer"],this.filter=t.filter),n.layout&&(this._unevaluatedLayout=new eo(n.layout)),n.paint)){for(var r in this._transitionablePaint=new Ka(n.paint),t.paint)this.setPaintProperty(r,t.paint[r],{validate:!1});for(var i in t.layout)this.setLayoutProperty(i,t.layout[i],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new no(n.paint)}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},t.prototype.getLayoutProperty=function(e){return"visibility"===e?this.visibility:this._unevaluatedLayout.getValue(e)},t.prototype.setLayoutProperty=function(e,t,n){if(void 0===n&&(n={}),null!==t&&void 0!==t){var r="layers."+this.id+".layout."+e;if(this._validate(sa,r,e,t,n))return}"visibility"!==e?this._unevaluatedLayout.setValue(e,t):this.visibility=t},t.prototype.getPaintProperty=function(e){return A(e,co)?this._transitionablePaint.getTransition(e.slice(0,-co.length)):this._transitionablePaint.getValue(e)},t.prototype.setPaintProperty=function(e,t,n){if(void 0===n&&(n={}),null!==t&&void 0!==t){var r="layers."+this.id+".paint."+e;if(this._validate(oa,r,e,t,n))return!1}if(A(e,co))return this._transitionablePaint.setTransition(e.slice(0,-co.length),t||void 0),!1;var i=this._transitionablePaint._values[e],a="cross-faded-data-driven"===i.property.specification["property-type"],o=i.value.isDataDriven(),s=i.value;this._transitionablePaint.setValue(e,t),this._handleSpecialPaintPropertyUpdate(e);var l=this._transitionablePaint._values[e].value;return l.isDataDriven()||o||a||this._handleOverridablePaintPropertyUpdate(e,s,l)},t.prototype._handleSpecialPaintPropertyUpdate=function(e){},t.prototype._handleOverridablePaintPropertyUpdate=function(e,t,n){return!1},t.prototype.isHidden=function(e){return!!(this.minzoom&&e=this.maxzoom)||"none"===this.visibility},t.prototype.updateTransitions=function(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)},t.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},t.prototype.recalculate=function(e,t){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,void 0,t)),this.paint=this._transitioningPaint.possiblyEvaluate(e,void 0,t)},t.prototype.serialize=function(){var e={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(e.layout=e.layout||{},e.layout.visibility=this.visibility),M(e,(function(e,t){return void 0!==e&&!("layout"===t&&!Object.keys(e).length)&&!("paint"===t&&!Object.keys(e).length)}))},t.prototype._validate=function(e,t,n,r,i){return void 0===i&&(i={}),(!i||!1!==i.validate)&&la(this,e.call(ia,{key:t,layerType:this.type,objectKey:n,value:r,styleSpec:lt,style:{glyphs:!0,sprite:!0}}))},t.prototype.is3D=function(){return!1},t.prototype.isTileClipped=function(){return!1},t.prototype.hasOffscreenPass=function(){return!1},t.prototype.resize=function(){},t.prototype.isStateDependent=function(){for(var e in this.paint._values){var t=this.paint.get(e);if(t instanceof to&&Zr(t.property.specification)&&("source"===t.value.kind||"composite"===t.value.kind)&&t.value.isStateDependent)return!0}return!1},t}(st),ho={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},fo=function(e,t){this._structArray=e,this._pos1=t*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},po=128,mo=5,go=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function vo(e,t){void 0===t&&(t=1);var n=0,r=0;return{members:e.map((function(e){var i=yo(e.type),a=n=xo(n,Math.max(t,i)),o=e.components||1;return r=Math.max(r,i),n+=i*o,{name:e.name,type:e.type,components:o,offset:a}})),size:xo(n,Math.max(r,t)),alignment:t}}function yo(e){return ho[e].BYTES_PER_ELEMENT}function xo(e,t){return Math.ceil(e/t)*t}go.serialize=function(e,t){return e._trim(),t&&(e.isTransferred=!0,t.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}},go.deserialize=function(e){var t=Object.create(this.prototype);return t.arrayBuffer=e.arrayBuffer,t.length=e.length,t.capacity=e.arrayBuffer.byteLength/t.bytesPerElement,t._refreshViews(),t},go.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},go.prototype.clear=function(){this.length=0},go.prototype.resize=function(e){this.reserve(e),this.length=e},go.prototype.reserve=function(e){if(e>this.capacity){this.capacity=Math.max(e,Math.floor(this.capacity*mo),po),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var t=this.uint8;this._refreshViews(),t&&this.uint8.set(t)}},go.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var bo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var n=this.length;return this.resize(n+1),this.emplace(n,e,t)},t.prototype.emplace=function(e,t,n){var r=2*e;return this.int16[r+0]=t,this.int16[r+1]=n,e},t}(go);bo.prototype.bytesPerElement=4,ma("StructArrayLayout2i4",bo);var _o=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r){var i=this.length;return this.resize(i+1),this.emplace(i,e,t,n,r)},t.prototype.emplace=function(e,t,n,r,i){var a=4*e;return this.int16[a+0]=t,this.int16[a+1]=n,this.int16[a+2]=r,this.int16[a+3]=i,e},t}(go);_o.prototype.bytesPerElement=8,ma("StructArrayLayout4i8",_o);var wo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r,i,a){var o=this.length;return this.resize(o+1),this.emplace(o,e,t,n,r,i,a)},t.prototype.emplace=function(e,t,n,r,i,a,o){var s=6*e;return this.int16[s+0]=t,this.int16[s+1]=n,this.int16[s+2]=r,this.int16[s+3]=i,this.int16[s+4]=a,this.int16[s+5]=o,e},t}(go);wo.prototype.bytesPerElement=12,ma("StructArrayLayout2i4i12",wo);var Ao=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r,i,a){var o=this.length;return this.resize(o+1),this.emplace(o,e,t,n,r,i,a)},t.prototype.emplace=function(e,t,n,r,i,a,o){var s=4*e,l=8*e;return this.int16[s+0]=t,this.int16[s+1]=n,this.uint8[l+4]=r,this.uint8[l+5]=i,this.uint8[l+6]=a,this.uint8[l+7]=o,e},t}(go);Ao.prototype.bytesPerElement=8,ma("StructArrayLayout2i4ub8",Ao);var So=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r,i,a,o,s,l,c){var u=this.length;return this.resize(u+1),this.emplace(u,e,t,n,r,i,a,o,s,l,c)},t.prototype.emplace=function(e,t,n,r,i,a,o,s,l,c,u){var d=9*e,h=18*e;return this.uint16[d+0]=t,this.uint16[d+1]=n,this.uint16[d+2]=r,this.uint16[d+3]=i,this.uint16[d+4]=a,this.uint16[d+5]=o,this.uint16[d+6]=s,this.uint16[d+7]=l,this.uint8[h+16]=c,this.uint8[h+17]=u,e},t}(go);So.prototype.bytesPerElement=18,ma("StructArrayLayout8ui2ub18",So);var Mo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r,i,a,o,s,l,c,u,d){var h=this.length;return this.resize(h+1),this.emplace(h,e,t,n,r,i,a,o,s,l,c,u,d)},t.prototype.emplace=function(e,t,n,r,i,a,o,s,l,c,u,d,h){var f=12*e;return this.int16[f+0]=t,this.int16[f+1]=n,this.int16[f+2]=r,this.int16[f+3]=i,this.uint16[f+4]=a,this.uint16[f+5]=o,this.uint16[f+6]=s,this.uint16[f+7]=l,this.int16[f+8]=c,this.int16[f+9]=u,this.int16[f+10]=d,this.int16[f+11]=h,e},t}(go);Mo.prototype.bytesPerElement=24,ma("StructArrayLayout4i4ui4i24",Mo);var To=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,n)},t.prototype.emplace=function(e,t,n,r){var i=3*e;return this.float32[i+0]=t,this.float32[i+1]=n,this.float32[i+2]=r,e},t}(go);To.prototype.bytesPerElement=12,ma("StructArrayLayout3f12",To);var ko=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var n=1*e;return this.uint32[n+0]=t,e},t}(go);ko.prototype.bytesPerElement=4,ma("StructArrayLayout1ul4",ko);var Eo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r,i,a,o,s,l){var c=this.length;return this.resize(c+1),this.emplace(c,e,t,n,r,i,a,o,s,l)},t.prototype.emplace=function(e,t,n,r,i,a,o,s,l,c){var u=10*e,d=5*e;return this.int16[u+0]=t,this.int16[u+1]=n,this.int16[u+2]=r,this.int16[u+3]=i,this.int16[u+4]=a,this.int16[u+5]=o,this.uint32[d+3]=s,this.uint16[u+8]=l,this.uint16[u+9]=c,e},t}(go);Eo.prototype.bytesPerElement=20,ma("StructArrayLayout6i1ul2ui20",Eo);var Co=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r,i,a){var o=this.length;return this.resize(o+1),this.emplace(o,e,t,n,r,i,a)},t.prototype.emplace=function(e,t,n,r,i,a,o){var s=6*e;return this.int16[s+0]=t,this.int16[s+1]=n,this.int16[s+2]=r,this.int16[s+3]=i,this.int16[s+4]=a,this.int16[s+5]=o,e},t}(go);Co.prototype.bytesPerElement=12,ma("StructArrayLayout2i2i2i12",Co);var Do=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r,i){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,n,r,i)},t.prototype.emplace=function(e,t,n,r,i,a){var o=4*e,s=8*e;return this.float32[o+0]=t,this.float32[o+1]=n,this.float32[o+2]=r,this.int16[s+6]=i,this.int16[s+7]=a,e},t}(go);Do.prototype.bytesPerElement=16,ma("StructArrayLayout2f1f2i16",Do);var Ro=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r){var i=this.length;return this.resize(i+1),this.emplace(i,e,t,n,r)},t.prototype.emplace=function(e,t,n,r,i){var a=12*e,o=3*e;return this.uint8[a+0]=t,this.uint8[a+1]=n,this.float32[o+1]=r,this.float32[o+2]=i,e},t}(go);Ro.prototype.bytesPerElement=12,ma("StructArrayLayout2ub2f12",Ro);var Po=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,n)},t.prototype.emplace=function(e,t,n,r){var i=3*e;return this.uint16[i+0]=t,this.uint16[i+1]=n,this.uint16[i+2]=r,e},t}(go);Po.prototype.bytesPerElement=6,ma("StructArrayLayout3ui6",Po);var Oo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r,i,a,o,s,l,c,u,d,h,f,p,m,g){var v=this.length;return this.resize(v+1),this.emplace(v,e,t,n,r,i,a,o,s,l,c,u,d,h,f,p,m,g)},t.prototype.emplace=function(e,t,n,r,i,a,o,s,l,c,u,d,h,f,p,m,g,v){var y=24*e,x=12*e,b=48*e;return this.int16[y+0]=t,this.int16[y+1]=n,this.uint16[y+2]=r,this.uint16[y+3]=i,this.uint32[x+2]=a,this.uint32[x+3]=o,this.uint32[x+4]=s,this.uint16[y+10]=l,this.uint16[y+11]=c,this.uint16[y+12]=u,this.float32[x+7]=d,this.float32[x+8]=h,this.uint8[b+36]=f,this.uint8[b+37]=p,this.uint8[b+38]=m,this.uint32[x+10]=g,this.int16[y+22]=v,e},t}(go);Oo.prototype.bytesPerElement=48,ma("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Oo);var Lo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r,i,a,o,s,l,c,u,d,h,f,p,m,g,v,y,x,b,_,w,A,S,M,T,k){var E=this.length;return this.resize(E+1),this.emplace(E,e,t,n,r,i,a,o,s,l,c,u,d,h,f,p,m,g,v,y,x,b,_,w,A,S,M,T,k)},t.prototype.emplace=function(e,t,n,r,i,a,o,s,l,c,u,d,h,f,p,m,g,v,y,x,b,_,w,A,S,M,T,k,E){var C=34*e,D=17*e;return this.int16[C+0]=t,this.int16[C+1]=n,this.int16[C+2]=r,this.int16[C+3]=i,this.int16[C+4]=a,this.int16[C+5]=o,this.int16[C+6]=s,this.int16[C+7]=l,this.uint16[C+8]=c,this.uint16[C+9]=u,this.uint16[C+10]=d,this.uint16[C+11]=h,this.uint16[C+12]=f,this.uint16[C+13]=p,this.uint16[C+14]=m,this.uint16[C+15]=g,this.uint16[C+16]=v,this.uint16[C+17]=y,this.uint16[C+18]=x,this.uint16[C+19]=b,this.uint16[C+20]=_,this.uint16[C+21]=w,this.uint16[C+22]=A,this.uint32[D+12]=S,this.float32[D+13]=M,this.float32[D+14]=T,this.float32[D+15]=k,this.float32[D+16]=E,e},t}(go);Lo.prototype.bytesPerElement=68,ma("StructArrayLayout8i15ui1ul4f68",Lo);var Io=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var n=1*e;return this.float32[n+0]=t,e},t}(go);Io.prototype.bytesPerElement=4,ma("StructArrayLayout1f4",Io);var zo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,n)},t.prototype.emplace=function(e,t,n,r){var i=3*e;return this.int16[i+0]=t,this.int16[i+1]=n,this.int16[i+2]=r,e},t}(go);zo.prototype.bytesPerElement=6,ma("StructArrayLayout3i6",zo);var No=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,n)},t.prototype.emplace=function(e,t,n,r){var i=2*e,a=4*e;return this.uint32[i+0]=t,this.uint16[a+2]=n,this.uint16[a+3]=r,e},t}(go);No.prototype.bytesPerElement=8,ma("StructArrayLayout1ul2ui8",No);var Fo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var n=this.length;return this.resize(n+1),this.emplace(n,e,t)},t.prototype.emplace=function(e,t,n){var r=2*e;return this.uint16[r+0]=t,this.uint16[r+1]=n,e},t}(go);Fo.prototype.bytesPerElement=4,ma("StructArrayLayout2ui4",Fo);var Bo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var n=1*e;return this.uint16[n+0]=t,e},t}(go);Bo.prototype.bytesPerElement=2,ma("StructArrayLayout1ui2",Bo);var jo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var n=this.length;return this.resize(n+1),this.emplace(n,e,t)},t.prototype.emplace=function(e,t,n){var r=2*e;return this.float32[r+0]=t,this.float32[r+1]=n,e},t}(go);jo.prototype.bytesPerElement=8,ma("StructArrayLayout2f8",jo);var Uo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r){var i=this.length;return this.resize(i+1),this.emplace(i,e,t,n,r)},t.prototype.emplace=function(e,t,n,r,i){var a=4*e;return this.float32[a+0]=t,this.float32[a+1]=n,this.float32[a+2]=r,this.float32[a+3]=i,e},t}(go);Uo.prototype.bytesPerElement=16,ma("StructArrayLayout4f16",Uo);var Vo=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return n.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},n.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},n.x1.get=function(){return this._structArray.int16[this._pos2+2]},n.y1.get=function(){return this._structArray.int16[this._pos2+3]},n.x2.get=function(){return this._structArray.int16[this._pos2+4]},n.y2.get=function(){return this._structArray.int16[this._pos2+5]},n.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},n.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},n.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},n.anchorPoint.get=function(){return new a(this.anchorPointX,this.anchorPointY)},Object.defineProperties(t.prototype,n),t}(fo);Vo.prototype.size=20;var Ho=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new Vo(this,e)},t}(Eo);ma("CollisionBoxArray",Ho);var Wo=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return n.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},n.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},n.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},n.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},n.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},n.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},n.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},n.segment.get=function(){return this._structArray.uint16[this._pos2+10]},n.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},n.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},n.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},n.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},n.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},n.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},n.placedOrientation.set=function(e){this._structArray.uint8[this._pos1+37]=e},n.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},n.hidden.set=function(e){this._structArray.uint8[this._pos1+38]=e},n.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},n.crossTileID.set=function(e){this._structArray.uint32[this._pos4+10]=e},n.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(t.prototype,n),t}(fo);Wo.prototype.size=48;var Go=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new Wo(this,e)},t}(Oo);ma("PlacedSymbolArray",Go);var qo=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return n.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},n.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},n.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},n.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},n.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},n.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},n.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},n.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},n.key.get=function(){return this._structArray.uint16[this._pos2+8]},n.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},n.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},n.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},n.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},n.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},n.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},n.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},n.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},n.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},n.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},n.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},n.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},n.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},n.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},n.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},n.crossTileID.set=function(e){this._structArray.uint32[this._pos4+12]=e},n.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},n.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},n.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},n.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(t.prototype,n),t}(fo);qo.prototype.size=68;var Yo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new qo(this,e)},t}(Lo);ma("SymbolInstanceArray",Yo);var $o=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getoffsetX=function(e){return this.float32[1*e+0]},t}(Io);ma("GlyphOffsetArray",$o);var Xo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getx=function(e){return this.int16[3*e+0]},t.prototype.gety=function(e){return this.int16[3*e+1]},t.prototype.gettileUnitDistanceFromAnchor=function(e){return this.int16[3*e+2]},t}(zo);ma("SymbolLineVertexArray",Xo);var Zo=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return n.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},n.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},n.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(t.prototype,n),t}(fo);Zo.prototype.size=8;var Ko=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new Zo(this,e)},t}(No);ma("FeatureIndexArray",Ko);var Jo=vo([{name:"a_pos",components:2,type:"Int16"}],4).members,Qo=function(e){void 0===e&&(e=[]),this.segments=e};function es(e,t){return 256*(e=d(Math.floor(e),0,255))+(t=d(Math.floor(t),0,255))}Qo.prototype.prepareSegment=function(e,t,n,r){var i=this.segments[this.segments.length-1];return e>Qo.MAX_VERTEX_ARRAY_LENGTH&&C("Max vertices per segment is "+Qo.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+e),(!i||i.vertexLength+e>Qo.MAX_VERTEX_ARRAY_LENGTH||i.sortKey!==r)&&(i={vertexOffset:t.length,primitiveOffset:n.length,vertexLength:0,primitiveLength:0},void 0!==r&&(i.sortKey=r),this.segments.push(i)),i},Qo.prototype.get=function(){return this.segments},Qo.prototype.destroy=function(){for(var e=0,t=this.segments;e>>16)*o&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|i>>>19))+((5*(i>>>16)&65535)<<16)&4294967295))+((58964+(a>>>16)&65535)<<16);switch(l=0,n){case 3:l^=(255&e.charCodeAt(c+2))<<16;case 2:l^=(255&e.charCodeAt(c+1))<<8;case 1:i^=l=(65535&(l=(l=(65535&(l^=255&e.charCodeAt(c)))*o+(((l>>>16)*o&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return i^=e.length,i=2246822507*(65535&(i^=i>>>16))+((2246822507*(i>>>16)&65535)<<16)&4294967295,i=3266489909*(65535&(i^=i>>>13))+((3266489909*(i>>>16)&65535)<<16)&4294967295,(i^=i>>>16)>>>0}e.exports=t})),rs=t((function(e){function t(e,t){for(var n,r=e.length,i=t^r,a=0;r>=4;)n=1540483477*(65535&(n=255&e.charCodeAt(a)|(255&e.charCodeAt(++a))<<8|(255&e.charCodeAt(++a))<<16|(255&e.charCodeAt(++a))<<24))+((1540483477*(n>>>16)&65535)<<16),i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16)^(n=1540483477*(65535&(n^=n>>>24))+((1540483477*(n>>>16)&65535)<<16)),r-=4,++a;switch(r){case 3:i^=(255&e.charCodeAt(a+2))<<16;case 2:i^=(255&e.charCodeAt(a+1))<<8;case 1:i=1540483477*(65535&(i^=255&e.charCodeAt(a)))+((1540483477*(i>>>16)&65535)<<16)}return i=1540483477*(65535&(i^=i>>>13))+((1540483477*(i>>>16)&65535)<<16),(i^=i>>>15)>>>0}e.exports=t})),is=ns,as=ns,os=rs;is.murmur3=as,is.murmur2=os;var ss=function(){this.ids=[],this.positions=[],this.indexed=!1};ss.prototype.add=function(e,t,n,r){this.ids.push(cs(e)),this.positions.push(t,n,r)},ss.prototype.getPositions=function(e){for(var t=cs(e),n=0,r=this.ids.length-1;n>1;this.ids[i]>=t?r=i:n=i+1}for(var a=[];this.ids[n]===t;){var o=this.positions[3*n],s=this.positions[3*n+1],l=this.positions[3*n+2];a.push({index:o,start:s,end:l}),n++}return a},ss.serialize=function(e,t){var n=new Float64Array(e.ids),r=new Uint32Array(e.positions);return us(n,r,0,n.length-1),t&&t.push(n.buffer,r.buffer),{ids:n,positions:r}},ss.deserialize=function(e){var t=new ss;return t.ids=e.ids,t.positions=e.positions,t.indexed=!0,t};var ls=Math.pow(2,53)-1;function cs(e){var t=+e;return!isNaN(t)&&t<=ls?t:is(String(e))}function us(e,t,n,r){for(;n>1],a=n-1,o=r+1;;){do{a++}while(e[a]i);if(a>=o)break;ds(e,a,o),ds(t,3*a,3*o),ds(t,3*a+1,3*o+1),ds(t,3*a+2,3*o+2)}o-nLs.max||o.yLs.max)&&(C("Geometry exceeds allowed extent, reduce your vector tile buffer size"),o.x=d(o.x,Ls.min,Ls.max),o.y=d(o.y,Ls.min,Ls.max))}return n}function zs(e,t,n,r,i){e.emplaceBack(2*t+(r+1)/2,2*n+(i+1)/2)}var Ns=function(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new bo,this.indexArray=new Po,this.segments=new Qo,this.programConfigurations=new Es(Jo,e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};function Fs(e,t){for(var n=0;n=3)for(var a=0;a1){if(Hs(e,t))return!0;for(var r=0;r1?e.distSqr(n):e.distSqr(n.sub(t)._mult(i)._add(t))}function Ys(e,t){for(var n,r,i,a=!1,o=0;ot.y!==i.y>t.y&&t.x<(i.x-r.x)*(t.y-r.y)/(i.y-r.y)+r.x&&(a=!a);return a}function $s(e,t){for(var n=!1,r=0,i=e.length-1;rt.y!==o.y>t.y&&t.x<(o.x-a.x)*(t.y-a.y)/(o.y-a.y)+a.x&&(n=!n)}return n}function Xs(e,t,n,r,i){for(var o=0,s=e;o=l.x&&i>=l.y)return!0}var c=[new a(t,n),new a(t,i),new a(r,i),new a(r,n)];if(e.length>2)for(var u=0,d=c;ui.x&&t.x>i.x||e.yi.y&&t.y>i.y)return!1;var a=D(e,t,n[0]);return a!==D(e,t,n[1])||a!==D(e,t,n[2])||a!==D(e,t,n[3])}function Ks(e,t,n){var r=t.paint.get(e).value;return"constant"===r.kind?r.value:n.programConfigurations.get(t.id).getMaxValue(e)}function Js(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function Qs(e,t,n,r,i){if(!t[0]&&!t[1])return e;var o=a.convert(t)._mult(i);"viewport"===n&&o._rotate(-r);for(var s=[],l=0;l=Ps||u<0||u>=Ps)){var d=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,e.sortKey),h=d.vertexLength;zs(this.layoutVertexArray,c,u,-1,-1),zs(this.layoutVertexArray,c,u,1,-1),zs(this.layoutVertexArray,c,u,1,1),zs(this.layoutVertexArray,c,u,-1,1),this.indexArray.emplaceBack(h,h+1,h+2),this.indexArray.emplaceBack(h,h+3,h+2),d.vertexLength+=4,d.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,n,{},r)},ma("CircleBucket",Ns,{omit:["layers"]});var el=new lo({"circle-sort-key":new io(lt.layout_circle["circle-sort-key"])}),tl={paint:new lo({"circle-radius":new io(lt.paint_circle["circle-radius"]),"circle-color":new io(lt.paint_circle["circle-color"]),"circle-blur":new io(lt.paint_circle["circle-blur"]),"circle-opacity":new io(lt.paint_circle["circle-opacity"]),"circle-translate":new ro(lt.paint_circle["circle-translate"]),"circle-translate-anchor":new ro(lt.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new ro(lt.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new ro(lt.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new io(lt.paint_circle["circle-stroke-width"]),"circle-stroke-color":new io(lt.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new io(lt.paint_circle["circle-stroke-opacity"])}),layout:el},nl="undefined"!==typeof Float32Array?Float32Array:Array;function rl(){var e=new nl(4);return nl!=Float32Array&&(e[1]=0,e[2]=0),e[0]=1,e[3]=1,e}function il(e,t,n){var r=t[0],i=t[1],a=t[2],o=t[3],s=Math.sin(n),l=Math.cos(n);return e[0]=r*l+a*s,e[1]=i*l+o*s,e[2]=r*-s+a*l,e[3]=i*-s+o*l,e}function al(){var e=new nl(9);return nl!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function ol(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=n,e[2]=0,e[3]=-n,e[4]=r,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function sl(){var e=new nl(16);return nl!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function ll(e){var t=new nl(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function cl(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function ul(e,t){var n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],c=t[7],u=t[8],d=t[9],h=t[10],f=t[11],p=t[12],m=t[13],g=t[14],v=t[15],y=n*s-r*o,x=n*l-i*o,b=n*c-a*o,_=r*l-i*s,w=r*c-a*s,A=i*c-a*l,S=u*m-d*p,M=u*g-h*p,T=u*v-f*p,k=d*g-h*m,E=d*v-f*m,C=h*v-f*g,D=y*C-x*E+b*k+_*T-w*M+A*S;return D?(D=1/D,e[0]=(s*C-l*E+c*k)*D,e[1]=(i*E-r*C-a*k)*D,e[2]=(m*A-g*w+v*_)*D,e[3]=(h*w-d*A-f*_)*D,e[4]=(l*T-o*C-c*M)*D,e[5]=(n*C-i*T+a*M)*D,e[6]=(g*b-p*A-v*x)*D,e[7]=(u*A-h*b+f*x)*D,e[8]=(o*E-s*T+c*S)*D,e[9]=(r*T-n*E-a*S)*D,e[10]=(p*w-m*b+v*y)*D,e[11]=(d*b-u*w-f*y)*D,e[12]=(s*M-o*k-l*S)*D,e[13]=(n*k-r*M+i*S)*D,e[14]=(m*x-p*_-g*y)*D,e[15]=(u*_-d*x+h*y)*D,e):null}function dl(e,t,n){var r=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],c=t[6],u=t[7],d=t[8],h=t[9],f=t[10],p=t[11],m=t[12],g=t[13],v=t[14],y=t[15],x=n[0],b=n[1],_=n[2],w=n[3];return e[0]=x*r+b*s+_*d+w*m,e[1]=x*i+b*l+_*h+w*g,e[2]=x*a+b*c+_*f+w*v,e[3]=x*o+b*u+_*p+w*y,x=n[4],b=n[5],_=n[6],w=n[7],e[4]=x*r+b*s+_*d+w*m,e[5]=x*i+b*l+_*h+w*g,e[6]=x*a+b*c+_*f+w*v,e[7]=x*o+b*u+_*p+w*y,x=n[8],b=n[9],_=n[10],w=n[11],e[8]=x*r+b*s+_*d+w*m,e[9]=x*i+b*l+_*h+w*g,e[10]=x*a+b*c+_*f+w*v,e[11]=x*o+b*u+_*p+w*y,x=n[12],b=n[13],_=n[14],w=n[15],e[12]=x*r+b*s+_*d+w*m,e[13]=x*i+b*l+_*h+w*g,e[14]=x*a+b*c+_*f+w*v,e[15]=x*o+b*u+_*p+w*y,e}function hl(e,t,n){var r,i,a,o,s,l,c,u,d,h,f,p,m=n[0],g=n[1],v=n[2];return t===e?(e[12]=t[0]*m+t[4]*g+t[8]*v+t[12],e[13]=t[1]*m+t[5]*g+t[9]*v+t[13],e[14]=t[2]*m+t[6]*g+t[10]*v+t[14],e[15]=t[3]*m+t[7]*g+t[11]*v+t[15]):(r=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],c=t[6],u=t[7],d=t[8],h=t[9],f=t[10],p=t[11],e[0]=r,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=l,e[6]=c,e[7]=u,e[8]=d,e[9]=h,e[10]=f,e[11]=p,e[12]=r*m+s*g+d*v+t[12],e[13]=i*m+l*g+h*v+t[13],e[14]=a*m+c*g+f*v+t[14],e[15]=o*m+u*g+p*v+t[15]),e}function fl(e,t,n){var r=n[0],i=n[1],a=n[2];return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function pl(e,t,n){var r=Math.sin(n),i=Math.cos(n),a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],d=t[10],h=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=a*i+c*r,e[5]=o*i+u*r,e[6]=s*i+d*r,e[7]=l*i+h*r,e[8]=c*i-a*r,e[9]=u*i-o*r,e[10]=d*i-s*r,e[11]=h*i-l*r,e}function ml(e,t,n){var r=Math.sin(n),i=Math.cos(n),a=t[0],o=t[1],s=t[2],l=t[3],c=t[4],u=t[5],d=t[6],h=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*i+c*r,e[1]=o*i+u*r,e[2]=s*i+d*r,e[3]=l*i+h*r,e[4]=c*i-a*r,e[5]=u*i-o*r,e[6]=d*i-s*r,e[7]=h*i-l*r,e}function gl(e,t,n,r,i){var a,o=1/Math.tan(t/2);return e[0]=o/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=i&&i!==1/0?(a=1/(r-i),e[10]=(i+r)*a,e[14]=2*i*r*a):(e[10]=-1,e[14]=-2*r),e}function vl(e,t,n,r,i,a,o){var s=1/(t-n),l=1/(r-i),c=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+n)*s,e[13]=(i+r)*l,e[14]=(o+a)*c,e[15]=1,e}Math.hypot||(Math.hypot=function(){for(var e=arguments,t=0,n=arguments.length;n--;)t+=e[n]*e[n];return Math.sqrt(t)});var yl=dl;function xl(){var e=new nl(3);return nl!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function bl(e){var t=new nl(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function _l(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e}function wl(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e}function Al(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e}function Sl(e,t){var n=t[0],r=t[1],i=t[2],a=n*n+r*r+i*i;return a>0&&(a=1/Math.sqrt(a)),e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a,e}function Ml(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Tl(e,t,n){var r=t[0],i=t[1],a=t[2],o=n[0],s=n[1],l=n[2];return e[0]=i*l-a*s,e[1]=a*o-r*l,e[2]=r*s-i*o,e}function kl(e,t,n){var r=t[0],i=t[1],a=t[2];return e[0]=r*n[0]+i*n[3]+a*n[6],e[1]=r*n[1]+i*n[4]+a*n[7],e[2]=r*n[2]+i*n[5]+a*n[8],e}var El=wl;function Cl(){var e=new nl(4);return nl!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0),e}function Dl(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e}function Rl(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function Pl(e,t,n){var r=t[0],i=t[1],a=t[2],o=t[3];return e[0]=n[0]*r+n[4]*i+n[8]*a+n[12]*o,e[1]=n[1]*r+n[5]*i+n[9]*a+n[13]*o,e[2]=n[2]*r+n[6]*i+n[10]*a+n[14]*o,e[3]=n[3]*r+n[7]*i+n[11]*a+n[15]*o,e}function Ol(){var e=new nl(2);return nl!=Float32Array&&(e[0]=0,e[1]=0),e}function Ll(e){var t=e[0],n=e[1];return t*t+n*n}xl(),Cl();var Il=Ll,zl=(Ol(),function(e){function t(t){e.call(this,t,tl)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.createBucket=function(e){return new Ns(e)},t.prototype.queryRadius=function(e){var t=e;return Ks("circle-radius",this,t)+Ks("circle-stroke-width",this,t)+Js(this.paint.get("circle-translate"))},t.prototype.queryIntersectsFeature=function(e,t,n,r,i,a,o,s){for(var l=Qs(e,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),a.angle,o),c=this.paint.get("circle-radius").evaluate(t,n)+this.paint.get("circle-stroke-width").evaluate(t,n),u="map"===this.paint.get("circle-pitch-alignment"),d=u?l:Fl(l,s),h=u?c*o:c,f=0,p=r;fe.width||i.height>e.height||n.x>e.width-i.width||n.y>e.height-i.height)throw new RangeError("out of range source coordinates for image copy");if(i.width>t.width||i.height>t.height||r.x>t.width-i.width||r.y>t.height-i.height)throw new RangeError("out of range destination coordinates for image copy");for(var o=e.data,s=t.data,l=0;l80*n){r=a=e[0],i=o=e[1];for(var p=n;pa&&(a=s),l>o&&(o=l);c=0!==(c=Math.max(a-r,o-i))?1/c:0}return nc(h,f,n,r,i,c),f}function ec(e,t,n,r,i){var a,o;if(i===Dc(e,t,n,r)>0)for(a=t;a=t;a-=r)o=kc(a,e[a],e[a+1],o);return o&&xc(o,o.next)&&(Ec(o),o=o.next),o}function tc(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!xc(r,r.next)&&0!==yc(r.prev,r,r.next))r=r.next;else{if(Ec(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function nc(e,t,n,r,i,a,o){if(e){!o&&a&&hc(e,r,i,a);for(var s,l,c=e;e.prev!==e.next;)if(s=e.prev,l=e.next,a?ic(e,r,i,a):rc(e))t.push(s.i/n),t.push(e.i/n),t.push(l.i/n),Ec(e),e=l.next,c=l.next;else if((e=l)===c){o?1===o?nc(e=ac(tc(e),t,n),t,n,r,i,a,2):2===o&&oc(e,t,n,r,i,a):nc(tc(e),t,n,r,i,a,1);break}}}function rc(e){var t=e.prev,n=e,r=e.next;if(yc(t,n,r)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(gc(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&yc(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function ic(e,t,n,r){var i=e.prev,a=e,o=e.next;if(yc(i,a,o)>=0)return!1;for(var s=i.xa.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,u=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,d=pc(s,l,t,n,r),h=pc(c,u,t,n,r),f=e.prevZ,p=e.nextZ;f&&f.z>=d&&p&&p.z<=h;){if(f!==e.prev&&f!==e.next&&gc(i.x,i.y,a.x,a.y,o.x,o.y,f.x,f.y)&&yc(f.prev,f,f.next)>=0)return!1;if(f=f.prevZ,p!==e.prev&&p!==e.next&&gc(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&yc(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(;f&&f.z>=d;){if(f!==e.prev&&f!==e.next&&gc(i.x,i.y,a.x,a.y,o.x,o.y,f.x,f.y)&&yc(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;p&&p.z<=h;){if(p!==e.prev&&p!==e.next&&gc(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&yc(p.prev,p,p.next)>=0)return!1;p=p.nextZ}return!0}function ac(e,t,n){var r=e;do{var i=r.prev,a=r.next.next;!xc(i,a)&&bc(i,r,r.next,a)&&Sc(i,a)&&Sc(a,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(a.i/n),Ec(r),Ec(r.next),r=e=a),r=r.next}while(r!==e);return tc(r)}function oc(e,t,n,r,i,a){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&vc(o,s)){var l=Tc(o,s);return o=tc(o,o.next),l=tc(l,l.next),nc(o,t,n,r,i,a),void nc(l,t,n,r,i,a)}s=s.next}o=o.next}while(o!==e)}function sc(e,t,n,r){var i,a,o,s=[];for(i=0,a=t.length;i=r.next.y&&r.next.y!==r.y){var s=r.x+(a-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>o){if(o=s,s===i){if(a===r.y)return r;if(a===r.next.y)return r.next}n=r.x=r.x&&r.x>=u&&i!==r.x&&gc(an.x||r.x===n.x&&dc(n,r)))&&(n=r,h=l)),r=r.next}while(r!==c);return n}function dc(e,t){return yc(e.prev,e,t.prev)<0&&yc(t.next,e,e.next)<0}function hc(e,t,n,r){var i=e;do{null===i.z&&(i.z=pc(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,fc(i)}function fc(e){var t,n,r,i,a,o,s,l,c=1;do{for(n=e,e=null,a=null,o=0;n;){for(o++,r=n,s=0,t=0;t0||l>0&&r;)0!==s&&(0===l||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,l--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;n=r}a.nextZ=null,c*=2}while(o>1);return e}function pc(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function mc(e){var t=e,n=e;do{(t.x=0&&(e-o)*(r-s)-(n-o)*(t-s)>=0&&(n-o)*(a-s)-(i-o)*(r-s)>=0}function vc(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!Ac(e,t)&&(Sc(e,t)&&Sc(t,e)&&Mc(e,t)&&(yc(e.prev,e,t.prev)||yc(e,t.prev,t))||xc(e,t)&&yc(e.prev,e,e.next)>0&&yc(t.prev,t,t.next)>0)}function yc(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function xc(e,t){return e.x===t.x&&e.y===t.y}function bc(e,t,n,r){var i=wc(yc(e,t,n)),a=wc(yc(e,t,r)),o=wc(yc(n,r,e)),s=wc(yc(n,r,t));return i!==a&&o!==s||!(0!==i||!_c(e,n,t))||!(0!==a||!_c(e,r,t))||!(0!==o||!_c(n,e,r))||!(0!==s||!_c(n,t,r))}function _c(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function wc(e){return e>0?1:e<0?-1:0}function Ac(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&bc(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}function Sc(e,t){return yc(e.prev,e,e.next)<0?yc(e,t,e.next)>=0&&yc(e,e.prev,t)>=0:yc(e,t,e.prev)<0||yc(e,e.next,t)<0}function Mc(e,t){var n=e,r=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do{n.y>a!==n.next.y>a&&n.next.y!==n.y&&i<(n.next.x-n.x)*(a-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}function Tc(e,t){var n=new Cc(e.i,e.x,e.y),r=new Cc(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,a.next=r,r.prev=a,r}function kc(e,t,n,r){var i=new Cc(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Ec(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Cc(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Dc(e,t,n,r){for(var i=0,a=t,o=n-r;an;){if(r-n>600){var a=r-n+1,o=t-n+1,s=Math.log(a),l=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*l*(a-l)/a)*(o-a/2<0?-1:1);Pc(e,t,Math.max(n,Math.floor(t-o*l/a+c)),Math.min(r,Math.floor(t+(a-o)*l/a+c)),i)}var u=e[t],d=n,h=r;for(Oc(e,n,t),i(e[r],u)>0&&Oc(e,n,r);d0;)h--}0===i(e[n],u)?Oc(e,n,h):Oc(e,++h,r),h<=t&&(n=h+1),t<=h&&(r=h-1)}}function Oc(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function Lc(e,t){return et?1:0}function Ic(e,t){var n=e.length;if(n<=1)return[e];for(var r,i,a=[],o=0;o1)for(var l=0;l0&&(r+=e[i-1].length,n.holes.push(r))}return n},Kl.default=Jl;var Bc=500,jc=function(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new bo,this.indexArray=new Po,this.indexArray2=new Fo,this.programConfigurations=new Es(Zl,e.layers,e.zoom),this.segments=new Qo,this.segments2=new Qo,this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};jc.prototype.populate=function(e,t,n){this.hasPattern=Nc("fill",this.layers,t);for(var r=this.layers[0].layout.get("fill-sort-key"),i=[],a=0,o=e;a>3}if(i--,1===r||2===r)o+=e.readSVarint(),s+=e.readSVarint(),1===r&&(t&&l.push(t),t=[]),t.push(new a(o,s));else{if(7!==r)throw new Error("unknown command "+r);t&&t.push(t[0].clone())}}return t&&l.push(t),l},qc.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,n=1,r=0,i=0,a=0,o=1/0,s=-1/0,l=1/0,c=-1/0;e.pos>3}if(r--,1===n||2===n)(i+=e.readSVarint())s&&(s=i),(a+=e.readSVarint())c&&(c=a);else if(7!==n)throw new Error("unknown command "+n)}return[o,l,s,c]},qc.prototype.toGeoJSON=function(e,t,n){var r,i,a=this.extent*Math.pow(2,n),o=this.extent*e,s=this.extent*t,l=this.loadGeometry(),c=qc.types[this.type];function u(e){for(var t=0;t>3;t=1===r?e.readString():2===r?e.readFloat():3===r?e.readDouble():4===r?e.readVarint64():5===r?e.readVarint():6===r?e.readSVarint():7===r?e.readBoolean():null}return t}function tu(e,t){this.layers=e.readFields(nu,{},t)}function nu(e,t,n){if(3===e){var r=new Kc(n,n.readVarint()+n.pos);r.length&&(t[r.name]=r)}}Jc.prototype.feature=function(e){if(e<0||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new Gc(this._pbf,t,this.extent,this._keys,this._values)};var ru={VectorTile:tu,VectorTileFeature:Gc,VectorTileLayer:Kc},iu=ru.VectorTileFeature.types,au=500,ou=Math.pow(2,13);function su(e,t,n,r,i,a,o,s){e.emplaceBack(t,n,2*Math.floor(r*ou)+o,i*ou*2,a*ou*2,Math.round(s))}var lu=function(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new wo,this.indexArray=new Po,this.programConfigurations=new Es(Wc,e.layers,e.zoom),this.segments=new Qo,this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};function cu(e,t){return e.x===t.x&&(e.x<0||e.x>Ps)||e.y===t.y&&(e.y<0||e.y>Ps)}function uu(e){return e.every((function(e){return e.x<0}))||e.every((function(e){return e.x>Ps}))||e.every((function(e){return e.y<0}))||e.every((function(e){return e.y>Ps}))}lu.prototype.populate=function(e,t,n){this.features=[],this.hasPattern=Nc("fill-extrusion",this.layers,t);for(var r=0,i=e;r=1){var y=p[g-1];if(!cu(v,y)){d.vertexLength+4>Qo.MAX_VERTEX_ARRAY_LENGTH&&(d=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var x=v.sub(y)._perp()._unit(),b=y.dist(v);m+b>32768&&(m=0),su(this.layoutVertexArray,v.x,v.y,x.x,x.y,0,0,m),su(this.layoutVertexArray,v.x,v.y,x.x,x.y,0,1,m),m+=b,su(this.layoutVertexArray,y.x,y.y,x.x,x.y,0,0,m),su(this.layoutVertexArray,y.x,y.y,x.x,x.y,0,1,m);var _=d.vertexLength;this.indexArray.emplaceBack(_,_+2,_+1),this.indexArray.emplaceBack(_+1,_+2,_+3),d.vertexLength+=4,d.primitiveLength+=2}}}}if(d.vertexLength+l>Qo.MAX_VERTEX_ARRAY_LENGTH&&(d=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray)),"Polygon"===iu[e.type]){for(var w=[],A=[],S=d.vertexLength,M=0,T=s;M=2&&e[l-1].equals(e[l-2]);)l--;for(var c=0;c0;if(A&&v>c){var M=u.dist(f);if(M>2*d){var T=u.sub(u.sub(f)._mult(d/M)._round());this.updateDistance(f,T),this.addCurrentVertex(T,m,0,0,h),f=T}}var k=f&&p,E=k?n:s?"butt":r;if(k&&"round"===E&&(_i&&(E="bevel"),"bevel"===E&&(_>2&&(E="flipbevel"),_100)y=g.mult(-1);else{var C=_*m.add(g).mag()/m.sub(g).mag();y._perp()._mult(C*(S?-1:1))}this.addCurrentVertex(u,y,0,0,h),this.addCurrentVertex(u,y.mult(-1),0,0,h)}else if("bevel"===E||"fakeround"===E){var D=-Math.sqrt(_*_-1),R=S?D:0,P=S?0:D;if(f&&this.addCurrentVertex(u,m,R,P,h),"fakeround"===E)for(var O=Math.round(180*w/Math.PI/Au),L=1;L2*d){var j=u.add(p.sub(u)._mult(d/B)._round());this.updateDistance(u,j),this.addCurrentVertex(j,g,0,0,h),u=j}}}}},ku.prototype.addCurrentVertex=function(e,t,n,r,i,a){void 0===a&&(a=!1);var o=t.x+t.y*n,s=t.y-t.x*n,l=-t.x+t.y*r,c=-t.y-t.x*r;this.addHalfVertex(e,o,s,a,!1,n,i),this.addHalfVertex(e,l,c,a,!0,-r,i),this.distance>Tu/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(e,t,n,r,i,a))},ku.prototype.addHalfVertex=function(e,t,n,r,i,a,o){var s=e.x,l=e.y,c=this.scaledDistance*Mu;this.layoutVertexArray.emplaceBack((s<<1)+(r?1:0),(l<<1)+(i?1:0),Math.round(bu*t)+128,Math.round(bu*n)+128,1+(0===a?0:a<0?-1:1)|(63&c)<<2,c>>6);var u=o.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,u),o.primitiveLength++),i?this.e2=u:this.e1=u},ku.prototype.updateScaledDistance=function(){this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(Tu-1):this.distance},ku.prototype.updateDistance=function(e,t){this.distance+=e.dist(t),this.updateScaledDistance()},ma("LineBucket",ku,{omit:["layers","patternFeatures"]});var Eu=new lo({"line-cap":new ro(lt.layout_line["line-cap"]),"line-join":new io(lt.layout_line["line-join"]),"line-miter-limit":new ro(lt.layout_line["line-miter-limit"]),"line-round-limit":new ro(lt.layout_line["line-round-limit"]),"line-sort-key":new io(lt.layout_line["line-sort-key"])}),Cu={paint:new lo({"line-opacity":new io(lt.paint_line["line-opacity"]),"line-color":new io(lt.paint_line["line-color"]),"line-translate":new ro(lt.paint_line["line-translate"]),"line-translate-anchor":new ro(lt.paint_line["line-translate-anchor"]),"line-width":new io(lt.paint_line["line-width"]),"line-gap-width":new io(lt.paint_line["line-gap-width"]),"line-offset":new io(lt.paint_line["line-offset"]),"line-blur":new io(lt.paint_line["line-blur"]),"line-dasharray":new oo(lt.paint_line["line-dasharray"]),"line-pattern":new ao(lt.paint_line["line-pattern"]),"line-gradient":new so(lt.paint_line["line-gradient"])}),layout:Eu},Du=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.possiblyEvaluate=function(t,n){return n=new $a(Math.floor(n.zoom),{now:n.now,fadeDuration:n.fadeDuration,zoomHistory:n.zoomHistory,transition:n.transition}),e.prototype.possiblyEvaluate.call(this,t,n)},t.prototype.evaluate=function(t,n,r,i){return n=g({},n,{zoom:Math.floor(n.zoom)}),e.prototype.evaluate.call(this,t,n,r,i)},t}(io),Ru=new Du(Cu.paint.properties["line-width"].specification);Ru.useIntegerZoom=!0;var Pu=function(e){function t(t){e.call(this,t,Cu)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._handleSpecialPaintPropertyUpdate=function(e){"line-gradient"===e&&this._updateGradient()},t.prototype._updateGradient=function(){var e=this._transitionablePaint._values["line-gradient"].value.expression;this.gradient=ql(e,"lineProgress"),this.gradientTexture=null},t.prototype.recalculate=function(t,n){e.prototype.recalculate.call(this,t,n),this.paint._values["line-floorwidth"]=Ru.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)},t.prototype.createBucket=function(e){return new ku(e)},t.prototype.queryRadius=function(e){var t=e,n=Ou(Ks("line-width",this,t),Ks("line-gap-width",this,t)),r=Ks("line-offset",this,t);return n/2+Math.abs(r)+Js(this.paint.get("line-translate"))},t.prototype.queryIntersectsFeature=function(e,t,n,r,i,a,o){var s=Qs(e,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),a.angle,o),l=o/2*Ou(this.paint.get("line-width").evaluate(t,n),this.paint.get("line-gap-width").evaluate(t,n)),c=this.paint.get("line-offset").evaluate(t,n);return c&&(r=Lu(r,c*o)),Us(s,r,l)},t.prototype.isTileClipped=function(){return!0},t}(uo);function Ou(e,t){return t>0?t+2*e:e}function Lu(e,t){for(var n=[],r=new a(0,0),i=0;i":"\ufe40","?":"\ufe16","@":"\uff20","[":"\ufe47","\\":"\uff3c","]":"\ufe48","^":"\uff3e",_:"\ufe33","`":"\uff40","{":"\ufe37","|":"\u2015","}":"\ufe38","~":"\uff5e","\xa2":"\uffe0","\xa3":"\uffe1","\xa5":"\uffe5","\xa6":"\uffe4","\xac":"\uffe2","\xaf":"\uffe3","\u2013":"\ufe32","\u2014":"\ufe31","\u2018":"\ufe43","\u2019":"\ufe44","\u201c":"\ufe41","\u201d":"\ufe42","\u2026":"\ufe19","\u2027":"\u30fb","\u20a9":"\uffe6","\u3001":"\ufe11","\u3002":"\ufe12","\u3008":"\ufe3f","\u3009":"\ufe40","\u300a":"\ufe3d","\u300b":"\ufe3e","\u300c":"\ufe41","\u300d":"\ufe42","\u300e":"\ufe43","\u300f":"\ufe44","\u3010":"\ufe3b","\u3011":"\ufe3c","\u3014":"\ufe39","\u3015":"\ufe3a","\u3016":"\ufe17","\u3017":"\ufe18","\uff01":"\ufe15","\uff08":"\ufe35","\uff09":"\ufe36","\uff0c":"\ufe10","\uff0d":"\ufe32","\uff0e":"\u30fb","\uff1a":"\ufe13","\uff1b":"\ufe14","\uff1c":"\ufe3f","\uff1e":"\ufe40","\uff1f":"\ufe16","\uff3b":"\ufe47","\uff3d":"\ufe48","\uff3f":"\ufe33","\uff5b":"\ufe37","\uff5c":"\u2015","\uff5d":"\ufe38","\uff5f":"\ufe35","\uff60":"\ufe36","\uff61":"\ufe12","\uff62":"\ufe41","\uff63":"\ufe42"};function Wu(e){for(var t="",n=0;n>1,u=-7,d=n?i-1:0,h=n?-1:1,f=e[t+d];for(d+=h,a=f&(1<<-u)-1,f>>=-u,u+=s;u>0;a=256*a+e[t+d],d+=h,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=r;u>0;o=256*o+e[t+d],d+=h,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,r),a-=c}return(f?-1:1)*o*Math.pow(2,a-r)},write:function(e,t,n,r,i,a){var o,s,l,c=8*a-i-1,u=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:a-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+d>=1?h/l:h*Math.pow(2,1-d))*l>=2&&(o++,l/=2),o+d>=u?(s=0,o=u):o+d>=1?(s=(t*l-1)*Math.pow(2,i),o+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;e[n+f]=255&s,f+=p,s/=256,i-=8);for(o=o<0;e[n+f]=255&o,f+=p,o/=256,c-=8);e[n+f-p]|=128*m}},Yu=$u;function $u(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}$u.Varint=0,$u.Fixed64=1,$u.Bytes=2,$u.Fixed32=5;var Xu=4294967296,Zu=1/Xu,Ku=12,Ju="undefined"===typeof TextDecoder?null:new TextDecoder("utf8");function Qu(e,t,n){var r,i,a=n.buf;if(r=(112&(i=a[n.pos++]))>>4,i<128)return td(e,r,t);if(r|=(127&(i=a[n.pos++]))<<3,i<128)return td(e,r,t);if(r|=(127&(i=a[n.pos++]))<<10,i<128)return td(e,r,t);if(r|=(127&(i=a[n.pos++]))<<17,i<128)return td(e,r,t);if(r|=(127&(i=a[n.pos++]))<<24,i<128)return td(e,r,t);if(r|=(1&(i=a[n.pos++]))<<31,i<128)return td(e,r,t);throw new Error("Expected varint not more than 10 bytes")}function ed(e){return e.type===$u.Bytes?e.readVarint()+e.pos:e.pos+1}function td(e,t,n){return n?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}function nd(e,t){var n,r;if(e>=0?(n=e%4294967296|0,r=e/4294967296|0):(r=~(-e/4294967296),4294967295^(n=~(-e%4294967296))?n=n+1|0:(n=0,r=r+1|0)),e>=0x10000000000000000||e<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),rd(n,r,t),id(r,t)}function rd(e,t,n){n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos]=127&e}function id(e,t){var n=(7&e)<<4;t.buf[t.pos++]|=n|((e>>>=3)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e)))))}function ad(e,t,n){var r=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));n.realloc(r);for(var i=n.pos-1;i>=e;i--)n.buf[i+r]=n.buf[i]}function od(e,t){for(var n=0;n>>8,e[n+2]=t>>>16,e[n+3]=t>>>24}function vd(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}function yd(e,t,n){for(var r="",i=t;i239?4:l>223?3:l>191?2:1;if(i+u>n)break;1===u?l<128&&(c=l):2===u?128===(192&(a=e[i+1]))&&(c=(31&l)<<6|63&a)<=127&&(c=null):3===u?(a=e[i+1],o=e[i+2],128===(192&a)&&128===(192&o)&&((c=(15&l)<<12|(63&a)<<6|63&o)<=2047||c>=55296&&c<=57343)&&(c=null)):4===u&&(a=e[i+1],o=e[i+2],s=e[i+3],128===(192&a)&&128===(192&o)&&128===(192&s)&&((c=(15&l)<<18|(63&a)<<12|(63&o)<<6|63&s)<=65535||c>=1114112)&&(c=null)),null===c?(c=65533,u=1):c>65535&&(c-=65536,r+=String.fromCharCode(c>>>10&1023|55296),c=56320|1023&c),r+=String.fromCharCode(c),i+=u}return r}function xd(e,t,n){return Ju.decode(e.subarray(t,n))}function bd(e,t,n){for(var r,i,a=0;a55295&&r<57344){if(!i){r>56319||a+1===t.length?(e[n++]=239,e[n++]=191,e[n++]=189):i=r;continue}if(r<56320){e[n++]=239,e[n++]=191,e[n++]=189,i=r;continue}r=i-55296<<10|r-56320|65536,i=null}else i&&(e[n++]=239,e[n++]=191,e[n++]=189,i=null);r<128?e[n++]=r:(r<2048?e[n++]=r>>6|192:(r<65536?e[n++]=r>>12|224:(e[n++]=r>>18|240,e[n++]=r>>12&63|128),e[n++]=r>>6&63|128),e[n++]=63&r|128)}return n}$u.prototype={destroy:function(){this.buf=null},readFields:function(e,t,n){for(n=n||this.length;this.pos>3,a=this.pos;this.type=7&r,e(i,t,this),this.pos===a&&this.skip(r)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=md(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=vd(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=md(this.buf,this.pos)+md(this.buf,this.pos+4)*Xu;return this.pos+=8,e},readSFixed64:function(){var e=md(this.buf,this.pos)+vd(this.buf,this.pos+4)*Xu;return this.pos+=8,e},readFloat:function(){var e=qu.read(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=qu.read(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,n,r=this.buf;return t=127&(n=r[this.pos++]),n<128?t:(t|=(127&(n=r[this.pos++]))<<7,n<128?t:(t|=(127&(n=r[this.pos++]))<<14,n<128?t:(t|=(127&(n=r[this.pos++]))<<21,n<128?t:Qu(t|=(15&(n=r[this.pos]))<<28,e,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2===1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=Ku&&Ju?xd(this.buf,t,e):yd(this.buf,t,e)},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){if(this.type!==$u.Bytes)return e.push(this.readVarint(t));var n=ed(this);for(e=e||[];this.pos127;);else if(t===$u.Bytes)this.pos=this.readVarint()+this.pos;else if(t===$u.Fixed32)this.pos+=4;else{if(t!==$u.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t268435455||e<0?nd(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=bd(this.buf,e,this.pos);var n=this.pos-t;n>=128&&ad(t,n,this),this.pos=t-1,this.writeVarint(n),this.pos+=n},writeFloat:function(e){this.realloc(4),qu.write(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),qu.write(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var n=0;n=128&&ad(n,r,this),this.pos=n-1,this.writeVarint(r),this.pos+=r},writeMessage:function(e,t,n){this.writeTag(e,$u.Bytes),this.writeRawMessage(t,n)},writePackedVarint:function(e,t){t.length&&this.writeMessage(e,od,t)},writePackedSVarint:function(e,t){t.length&&this.writeMessage(e,sd,t)},writePackedBoolean:function(e,t){t.length&&this.writeMessage(e,ud,t)},writePackedFloat:function(e,t){t.length&&this.writeMessage(e,ld,t)},writePackedDouble:function(e,t){t.length&&this.writeMessage(e,cd,t)},writePackedFixed32:function(e,t){t.length&&this.writeMessage(e,dd,t)},writePackedSFixed32:function(e,t){t.length&&this.writeMessage(e,hd,t)},writePackedFixed64:function(e,t){t.length&&this.writeMessage(e,fd,t)},writePackedSFixed64:function(e,t){t.length&&this.writeMessage(e,pd,t)},writeBytesField:function(e,t){this.writeTag(e,$u.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,$u.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,$u.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,$u.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,$u.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,$u.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,$u.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,$u.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,$u.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,$u.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,Boolean(t))}};var _d=3;function wd(e,t,n){1===e&&n.readMessage(Ad,t)}function Ad(e,t,n){if(3===e){var r=n.readMessage(Sd,{}),i=r.id,a=r.bitmap,o=r.width,s=r.height,l=r.left,c=r.top,u=r.advance;t.push({id:i,bitmap:new Hl({width:o+2*_d,height:s+2*_d},a),metrics:{width:o,height:s,left:l,top:c,advance:u}})}}function Sd(e,t,n){1===e?t.id=n.readVarint():2===e?t.bitmap=n.readBytes():3===e?t.width=n.readVarint():4===e?t.height=n.readVarint():5===e?t.left=n.readSVarint():6===e?t.top=n.readSVarint():7===e&&(t.advance=n.readVarint())}function Md(e){return new Yu(e).readFields(wd,[])}var Td=_d;function kd(e){for(var t=0,n=0,r=0,i=e;r=0;h--){var f=o[h];if(!(d.w>f.w||d.h>f.h)){if(d.x=f.x,d.y=f.y,l=Math.max(l,d.y+d.h),s=Math.max(s,d.x+d.w),d.w===f.w&&d.h===f.h){var p=o.pop();h=0&&r>=e&&Ud[this.text.charCodeAt(r)];r--)n--;this.text=this.text.substring(e,n),this.sectionIndex=this.sectionIndex.slice(e,n)},Fd.prototype.substring=function(e,t){var n=new Fd;return n.text=this.text.substring(e,t),n.sectionIndex=this.sectionIndex.slice(e,t),n.sections=this.sections,n},Fd.prototype.toString=function(){return this.text},Fd.prototype.getMaxScale=function(){var e=this;return this.sectionIndex.reduce((function(t,n){return Math.max(t,e.sections[n].scale)}),0)},Fd.prototype.addTextSection=function(e,t){this.text+=e.text,this.sections.push(Nd.forText(e.scale,e.fontStack||t));for(var n=this.sections.length-1,r=0;r=zd?null:++this.imageSectionID:(this.imageSectionID=Id,this.imageSectionID)};var Ud={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Vd={};function Hd(e,t,n,r,i,a){if(t.imageName){var o=r[t.imageName];return o?o.displaySize[0]*t.scale*Gu/a+i:0}var s=n[t.fontStack],l=s&&s[e];return l?l.metrics.advance*t.scale+i:0}function Wd(e,t,n,r,i,a){for(var o=0,s=0;s=0,u=0,d=0;d0&&F>M&&(M=F)}else{var B=n[k.fontStack],j=B&&B[C];if(j&&j.rect)P=j.rect,R=j.metrics;else{var U=t[k.fontStack],V=U&&U[C];if(!V)continue;R=V.metrics}D=(_-k.scale)*Gu}I?(e.verticalizable=!0,S.push({glyph:C,imageName:O,x:h,y:f+D,vertical:I,scale:k.scale,fontStack:k.fontStack,sectionIndex:E,metrics:R,rect:P}),h+=L*k.scale+c):(S.push({glyph:C,imageName:O,x:h,y:f+D,vertical:I,scale:k.scale,fontStack:k.fontStack,sectionIndex:E,metrics:R,rect:P}),h+=R.advance*k.scale+c)}if(0!==S.length){var H=h-c;p=Math.max(H,p),Jd(S,0,S.length-1,g,M)}h=0;var W=a*_+M;A.lineOffset=Math.max(M,w),f+=W,m=Math.max(W,m),++v}else f+=a,++v}var G=f-Od,q=Zd(o),Y=q.horizontalAlign,$=q.verticalAlign;Qd(e.positionedLines,g,Y,$,p,m,a,G,i.length),e.top+=-$*G,e.bottom=e.top+G,e.left+=-Y*p,e.right=e.left+p}function Jd(e,t,n,r,i){if(r||i)for(var a=e[n],o=a.metrics.advance*a.scale,s=(e[n].x+o)*r,l=t;l<=n;l++)e[l].x-=s,e[l].y+=i}function Qd(e,t,n,r,i,a,o,s,l){var c=(t-n)*i,u=0;u=a!==o?-s*r-Od:(-r*l+.5)*o;for(var d=0,h=e;d-n/2;){if(--o<0)return!1;s-=e[o].dist(a),a=e[o]}s+=e[o].dist(e[o+1]),o++;for(var l=[],c=0;sr;)c-=l.shift().angleDelta;if(c>i)return!1;o++,s+=d.dist(h)}return!0}function ch(e){for(var t=0,n=0;nc){var p=(c-l)/f,m=Nn(d.x,h.x,p),g=Nn(d.y,h.y,p),v=new nh(m,g,h.angleTo(d),u);return v._round(),!o||lh(e,v,s,o,t)?v:void 0}l+=f}}function fh(e,t,n,r,i,a,o,s,l){var c=uh(r,a,o),u=dh(r,i),d=u*o,h=0===e[0].x||e[0].x===l||0===e[0].y||e[0].y===l;return t-d=0&&b=0&&_=0&&h+c<=u){var w=new nh(b,_,y,p);w._round(),r&&!lh(e,w,a,r,i)||f.push(w)}}d+=v}return s||f.length||o||(f=ph(e,d/2,n,r,i,a,o,!0,l)),f}function mh(e,t,n,r,i){for(var o=[],s=0;s=r&&h.x>=r||(d.x>=r?d=new a(r,d.y+(h.y-d.y)*((r-d.x)/(h.x-d.x)))._round():h.x>=r&&(h=new a(r,d.y+(h.y-d.y)*((r-d.x)/(h.x-d.x)))._round()),d.y>=i&&h.y>=i||(d.y>=i?d=new a(d.x+(h.x-d.x)*((i-d.y)/(h.y-d.y)),i)._round():h.y>=i&&(h=new a(d.x+(h.x-d.x)*((i-d.y)/(h.y-d.y)),i)._round()),c&&d.equals(c[c.length-1])||(c=[d],o.push(c)),c.push(h)))))}return o}var gh=Ed;function vh(e,t,n,r){var i=[],o=e.image,s=o.pixelRatio,l=o.paddedRect.w-2*gh,c=o.paddedRect.h-2*gh,u=e.right-e.left,d=e.bottom-e.top,h=o.stretchX||[[0,l]],f=o.stretchY||[[0,c]],p=function(e,t){return e+t[1]-t[0]},m=h.reduce(p,0),g=f.reduce(p,0),v=l-m,y=c-g,x=0,b=m,_=0,w=g,A=0,S=v,M=0,T=y;if(o.content&&r){var k=o.content;x=yh(h,0,k[0]),_=yh(f,0,k[1]),b=yh(h,k[0],k[2]),w=yh(f,k[1],k[3]),A=k[0]-x,M=k[1]-_,S=k[2]-k[0]-b,T=k[3]-k[1]-w}var E=function(r,i,l,c){var h=bh(r.stretch-x,b,u,e.left),f=_h(r.fixed-A,S,r.stretch,m),p=bh(i.stretch-_,w,d,e.top),v=_h(i.fixed-M,T,i.stretch,g),y=bh(l.stretch-x,b,u,e.left),k=_h(l.fixed-A,S,l.stretch,m),E=bh(c.stretch-_,w,d,e.top),C=_h(c.fixed-M,T,c.stretch,g),D=new a(h,p),R=new a(y,p),P=new a(y,E),O=new a(h,E),L=new a(f/s,v/s),I=new a(k/s,C/s),z=t*Math.PI/180;if(z){var N=Math.sin(z),F=Math.cos(z),B=[F,-N,N,F];D._matMult(B),R._matMult(B),O._matMult(B),P._matMult(B)}var j=r.stretch+r.fixed,U=l.stretch+l.fixed,V=i.stretch+i.fixed,H=c.stretch+c.fixed;return{tl:D,tr:R,bl:O,br:P,tex:{x:o.paddedRect.x+gh+j,y:o.paddedRect.y+gh+V,w:U-j,h:H-V},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:L,pixelOffsetBR:I,minFontScaleX:S/s/u,minFontScaleY:T/s/d,isSDF:n}};if(r&&(o.stretchX||o.stretchY))for(var C=xh(h,v,m),D=xh(f,y,g),R=0;R0&&(p=Math.max(10,p),this.circleDiameter=p)}else{var m=o.top*s-l,g=o.bottom*s+l,v=o.left*s-l,y=o.right*s+l,x=o.collisionPadding;if(x&&(v-=x[0]*s,m-=x[1]*s,y+=x[2]*s,g+=x[3]*s),u){var b=new a(v,m),_=new a(y,m),w=new a(v,g),A=new a(y,g),S=u*Math.PI/180;b._rotate(S),_._rotate(S),w._rotate(S),A._rotate(S),v=Math.min(b.x,_.x,w.x,A.x),y=Math.max(b.x,_.x,w.x,A.x),m=Math.min(b.y,_.y,w.y,A.y),g=Math.max(b.y,_.y,w.y,A.y)}e.emplaceBack(t.x,t.y,v,m,y,g,n,r,i)}this.boxEndIndex=e.length},Sh=function(e,t){if(void 0===e&&(e=[]),void 0===t&&(t=Mh),this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(var n=(this.length>>1)-1;n>=0;n--)this._down(n)};function Mh(e,t){return et?1:0}function Th(e,t,n){void 0===t&&(t=1),void 0===n&&(n=!1);for(var r=1/0,i=1/0,o=-1/0,s=-1/0,l=e[0],c=0;co)&&(o=u.x),(!c||u.y>s)&&(s=u.y)}var d=o-r,h=s-i,f=Math.min(d,h),p=f/2,m=new Sh([],kh);if(0===f)return new a(r,i);for(var g=r;gy.d||!y.d)&&(y=b,n&&console.log("found best %d after %d probes",Math.round(1e4*b.d)/1e4,x)),b.max-y.d<=t||(p=b.h/2,m.push(new Eh(b.p.x-p,b.p.y-p,p,e)),m.push(new Eh(b.p.x+p,b.p.y-p,p,e)),m.push(new Eh(b.p.x-p,b.p.y+p,p,e)),m.push(new Eh(b.p.x+p,b.p.y+p,p,e)),x+=4)}return n&&(console.log("num probes: "+x),console.log("best distance: "+y.d)),y.p}function kh(e,t){return t.max-e.max}function Eh(e,t,n,r){this.p=new a(e,t),this.h=n,this.d=Ch(this.p,r),this.max=this.d+this.h*Math.SQRT2}function Ch(e,t){for(var n=!1,r=1/0,i=0;ie.y!==u.y>e.y&&e.x<(u.x-c.x)*(e.y-c.y)/(u.y-c.y)+c.x&&(n=!n),r=Math.min(r,qs(e,c,u))}return(n?1:-1)*Math.sqrt(r)}function Dh(e){for(var t=0,n=0,r=0,i=e[0],a=0,o=i.length,s=o-1;a0&&(this.data[0]=t,this._down(0)),e}},Sh.prototype.peek=function(){return this.data[0]},Sh.prototype._up=function(e){for(var t=this,n=t.data,r=t.compare,i=n[e];e>0;){var a=e-1>>1,o=n[a];if(r(i,o)>=0)break;n[e]=o,e=a}n[e]=i},Sh.prototype._down=function(e){for(var t=this,n=t.data,r=t.compare,i=this.length>>1,a=n[e];e=0)break;n[e]=s,e=o}n[e]=a};var Rh=7,Ph=Number.POSITIVE_INFINITY;function Oh(e,t){function n(e,t){var n=0,r=0;t<0&&(t=0);var i=t/Math.sqrt(2);switch(e){case"top-right":case"top-left":r=i-Rh;break;case"bottom-right":case"bottom-left":r=-i+Rh;break;case"bottom":r=-t+Rh;break;case"top":r=t-Rh}switch(e){case"top-right":case"bottom-right":n=-i;break;case"top-left":case"bottom-left":n=i;break;case"left":n=t;break;case"right":n=-t}return[n,r]}function r(e,t,n){var r=0,i=0;switch(t=Math.abs(t),n=Math.abs(n),e){case"top-right":case"top-left":case"top":i=n-Rh;break;case"bottom-right":case"bottom-left":case"bottom":i=-n+Rh}switch(e){case"top-right":case"bottom-right":case"right":r=-t;break;case"top-left":case"bottom-left":case"left":r=t}return[r,i]}return t[1]!==Ph?r(e,t[0],t[1]):n(e,t[0])}function Lh(e,t,n,r,i,a,o){e.createArrays();var s=512*e.overscaling;e.tilePixelRatio=Ps/s,e.compareText={},e.iconsNeedLinear=!1;var l=e.layers[0].layout,c=e.layers[0]._unevaluatedLayout._values,u={};if("composite"===e.textSizeData.kind){var d=e.textSizeData,h=d.minZoom,f=d.maxZoom;u.compositeTextSizes=[c["text-size"].possiblyEvaluate(new $a(h),o),c["text-size"].possiblyEvaluate(new $a(f),o)]}if("composite"===e.iconSizeData.kind){var p=e.iconSizeData,m=p.minZoom,g=p.maxZoom;u.compositeIconSizes=[c["icon-size"].possiblyEvaluate(new $a(m),o),c["icon-size"].possiblyEvaluate(new $a(g),o)]}u.layoutTextSize=c["text-size"].possiblyEvaluate(new $a(e.zoom+1),o),u.layoutIconSize=c["icon-size"].possiblyEvaluate(new $a(e.zoom+1),o),u.textMaxSize=c["text-size"].possiblyEvaluate(new $a(18));for(var v=l.get("text-line-height")*Gu,y="map"===l.get("text-rotation-alignment")&&"point"!==l.get("symbol-placement"),x=l.get("text-keep-upright"),b=l.get("text-size"),_=function(){var a=A[w],s=l.get("text-font").evaluate(a,{},o).join(","),c=b.evaluate(a,{},o),d=u.layoutTextSize.evaluate(a,{},o),h=u.layoutIconSize.evaluate(a,{},o),f={horizontal:{},vertical:void 0},p=a.text,m=[0,0];if(p){var g=p.toString(),_=l.get("text-letter-spacing").evaluate(a,{},o)*Gu,S=Sa(g)?_:0,M=l.get("text-anchor").evaluate(a,{},o),T=l.get("text-variable-anchor");if(!T){var k=l.get("text-radial-offset").evaluate(a,{},o);m=k?Oh(M,[k*Gu,Ph]):l.get("text-offset").evaluate(a,{},o).map((function(e){return e*Gu}))}var E=y?"center":l.get("text-justify").evaluate(a,{},o),D=l.get("symbol-placement"),R="point"===D?l.get("text-max-width").evaluate(a,{},o)*Gu:0,P=function(){e.allowVerticalPlacement&&Aa(g)&&(f.vertical=jd(p,t,n,i,s,R,v,M,"left",S,m,Pd.vertical,!0,D,d,c))};if(!y&&T){for(var O="auto"===E?T.map((function(e){return Ih(e)})):[E],L=!1,I=0;I=Ps||d.y<0||d.y>=Ps||Uh(e,d,s,n,r,i,h,e.layers[0],e.collisionBoxArray,t.index,t.sourceLayerIndex,e.index,y,w,M,l,b,A,T,p,t,a,c,u,o)};if("line"===k)for(var R=0,P=mh(t.geometry,0,0,Ps,Ps);R1){var j=hh(B,S,n.vertical||m,r,g,x);j&&D(B,j)}}else if("Polygon"===t.type)for(var U=0,V=Ic(t.geometry,0);UFh&&C(e.layerIds[0]+': Value for "text-size" is >= '+Nh+'. Reduce your "text-size".'):"composite"===g.kind&&((v=[rh*f.compositeTextSizes[0].evaluate(o,{},p),rh*f.compositeTextSizes[1].evaluate(o,{},p)])[0]>Fh||v[1]>Fh)&&C(e.layerIds[0]+': Value for "text-size" is >= '+Nh+'. Reduce your "text-size".'),e.addSymbols(e.text,m,v,s,a,o,c,t,l.lineStartIndex,l.lineLength,h,p);for(var y=0,x=u;yFh&&C(e.layerIds[0]+': Value for "icon-size" is >= '+Nh+'. Reduce your "icon-size".'):"composite"===$.kind&&((X=[rh*_.compositeIconSizes[0].evaluate(b,{},A),rh*_.compositeIconSizes[1].evaluate(b,{},A)])[0]>Fh||X[1]>Fh)&&C(e.layerIds[0]+': Value for "icon-size" is >= '+Nh+'. Reduce your "icon-size".'),e.addSymbols(e.icon,q,X,x,y,b,!1,t,R.lineStartIndex,R.lineLength,-1,A),z=e.icon.placedSymbolArray.length-1,Y&&(O=4*Y.length,e.addSymbols(e.icon,Y,X,x,y,b,Pd.vertical,t,R.lineStartIndex,R.lineLength,-1,A),N=e.icon.placedSymbolArray.length-1)}for(var Z in r.horizontal){var K=r.horizontal[Z];if(!T){B=is(K.text);var J=s.layout.get("text-rotate").evaluate(b,{},A);T=new Ah(l,t,c,u,d,K,h,f,p,J)}var Q=1===K.positionedLines.length;if(L+=Bh(e,t,K,a,s,p,b,m,R,r.vertical?Pd.horizontal:Pd.horizontalOnly,Q?Object.keys(r.horizontal):[Z],F,z,_,A),Q)break}r.vertical&&(I+=Bh(e,t,r.vertical,a,s,p,b,m,R,Pd.vertical,["vertical"],F,N,_,A));var ee=T?T.boxStartIndex:e.collisionBoxArray.length,te=T?T.boxEndIndex:e.collisionBoxArray.length,ne=E?E.boxStartIndex:e.collisionBoxArray.length,re=E?E.boxEndIndex:e.collisionBoxArray.length,ie=k?k.boxStartIndex:e.collisionBoxArray.length,ae=k?k.boxEndIndex:e.collisionBoxArray.length,oe=D?D.boxStartIndex:e.collisionBoxArray.length,se=D?D.boxEndIndex:e.collisionBoxArray.length,le=-1,ce=function(e,t){return e&&e.circleDiameter?Math.max(e.circleDiameter,t):t};le=ce(T,le),le=ce(E,le),le=ce(k,le);var ue=(le=ce(D,le))>-1?1:0;ue&&(le*=S/Gu),e.glyphOffsetArray.length>=Zh.MAX_GLYPHS&&C("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==b.sortKey&&e.addToSortKeyRanges(e.symbolInstances.length,b.sortKey),e.symbolInstances.emplaceBack(t.x,t.y,F.right>=0?F.right:-1,F.center>=0?F.center:-1,F.left>=0?F.left:-1,F.vertical||-1,z,N,B,ee,te,ne,re,ie,ae,oe,se,c,L,I,P,O,ue,0,h,j,U,le)}function Vh(e,t,n,r){var i=e.compareText;if(t in i){for(var a=i[t],o=a.length-1;o>=0;o--)if(r.dist(a[o])0)&&("constant"!==a.value.kind||a.value.value.length>0),c="constant"!==s.value.kind||!!s.value.value||Object.keys(s.parameters).length>0,u=i.get("symbol-sort-key");if(this.features=[],l||c){for(var d=t.iconDependencies,h=t.glyphDependencies,f=t.availableImages,p=new $a(this.zoom),m=0,g=e;m=0;for(var O=0,L=S.sections;O=0;s--)a[s]={x:t[s].x,y:t[s].y,tileUnitDistanceFromAnchor:i},s>0&&(i+=t[s-1].dist(t[s]));for(var l=0;l0},Zh.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Zh.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Zh.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Zh.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Zh.prototype.addIndicesForPlacedSymbol=function(e,t){for(var n=e.placedSymbolArray.get(t),r=n.vertexStartIndex+4*n.numGlyphs,i=n.vertexStartIndex;i1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var n=0,r=this.symbolInstanceIndexes;n=0&&r.indexOf(e)===n&&t.addIndicesForPlacedSymbol(t.text,e)})),a.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,a.verticalPlacedTextSymbolIndex),a.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,a.placedIconSymbolIndex),a.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,a.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},ma("SymbolBucket",Zh,{omit:["layers","collisionBoxArray","features","compareText"]}),Zh.MAX_GLYPHS=65535,Zh.addDynamicAttributes=qh;var Jh=new lo({"symbol-placement":new ro(lt.layout_symbol["symbol-placement"]),"symbol-spacing":new ro(lt.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new ro(lt.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new io(lt.layout_symbol["symbol-sort-key"]),"symbol-z-order":new ro(lt.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new ro(lt.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new ro(lt.layout_symbol["icon-ignore-placement"]),"icon-optional":new ro(lt.layout_symbol["icon-optional"]),"icon-rotation-alignment":new ro(lt.layout_symbol["icon-rotation-alignment"]),"icon-size":new io(lt.layout_symbol["icon-size"]),"icon-text-fit":new ro(lt.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new ro(lt.layout_symbol["icon-text-fit-padding"]),"icon-image":new io(lt.layout_symbol["icon-image"]),"icon-rotate":new io(lt.layout_symbol["icon-rotate"]),"icon-padding":new ro(lt.layout_symbol["icon-padding"]),"icon-keep-upright":new ro(lt.layout_symbol["icon-keep-upright"]),"icon-offset":new io(lt.layout_symbol["icon-offset"]),"icon-anchor":new io(lt.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new ro(lt.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new ro(lt.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new ro(lt.layout_symbol["text-rotation-alignment"]),"text-field":new io(lt.layout_symbol["text-field"]),"text-font":new io(lt.layout_symbol["text-font"]),"text-size":new io(lt.layout_symbol["text-size"]),"text-max-width":new io(lt.layout_symbol["text-max-width"]),"text-line-height":new ro(lt.layout_symbol["text-line-height"]),"text-letter-spacing":new io(lt.layout_symbol["text-letter-spacing"]),"text-justify":new io(lt.layout_symbol["text-justify"]),"text-radial-offset":new io(lt.layout_symbol["text-radial-offset"]),"text-variable-anchor":new ro(lt.layout_symbol["text-variable-anchor"]),"text-anchor":new io(lt.layout_symbol["text-anchor"]),"text-max-angle":new ro(lt.layout_symbol["text-max-angle"]),"text-writing-mode":new ro(lt.layout_symbol["text-writing-mode"]),"text-rotate":new io(lt.layout_symbol["text-rotate"]),"text-padding":new ro(lt.layout_symbol["text-padding"]),"text-keep-upright":new ro(lt.layout_symbol["text-keep-upright"]),"text-transform":new io(lt.layout_symbol["text-transform"]),"text-offset":new io(lt.layout_symbol["text-offset"]),"text-allow-overlap":new ro(lt.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new ro(lt.layout_symbol["text-ignore-placement"]),"text-optional":new ro(lt.layout_symbol["text-optional"])}),Qh={paint:new lo({"icon-opacity":new io(lt.paint_symbol["icon-opacity"]),"icon-color":new io(lt.paint_symbol["icon-color"]),"icon-halo-color":new io(lt.paint_symbol["icon-halo-color"]),"icon-halo-width":new io(lt.paint_symbol["icon-halo-width"]),"icon-halo-blur":new io(lt.paint_symbol["icon-halo-blur"]),"icon-translate":new ro(lt.paint_symbol["icon-translate"]),"icon-translate-anchor":new ro(lt.paint_symbol["icon-translate-anchor"]),"text-opacity":new io(lt.paint_symbol["text-opacity"]),"text-color":new io(lt.paint_symbol["text-color"],{runtimeType:bt,getOverride:function(e){return e.textColor},hasOverride:function(e){return!!e.textColor}}),"text-halo-color":new io(lt.paint_symbol["text-halo-color"]),"text-halo-width":new io(lt.paint_symbol["text-halo-width"]),"text-halo-blur":new io(lt.paint_symbol["text-halo-blur"]),"text-translate":new ro(lt.paint_symbol["text-translate"]),"text-translate-anchor":new ro(lt.paint_symbol["text-translate-anchor"])}),layout:Jh},ef=function(e){this.type=e.property.overrides?e.property.overrides.runtimeType:gt,this.defaultValue=e};ef.prototype.evaluate=function(e){if(e.formattedSection){var t=this.defaultValue.property.overrides;if(t&&t.hasOverride(e.formattedSection))return t.getOverride(e.formattedSection)}return e.feature&&e.featureState?this.defaultValue.evaluate(e.feature,e.featureState):this.defaultValue.property.specification.default},ef.prototype.eachChild=function(e){this.defaultValue.isConstant()||e(this.defaultValue.value._styleExpression.expression)},ef.prototype.outputDefined=function(){return!1},ef.prototype.serialize=function(){return null},ma("FormatSectionOverride",ef,{omit:["defaultValue"]});var tf=function(e){function t(t){e.call(this,t,Qh)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.recalculate=function(t,n){if(e.prototype.recalculate.call(this,t,n),"auto"===this.layout.get("icon-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){var r=this.layout.get("text-writing-mode");if(r){for(var i=[],a=0,o=r;a",targetMapId:r,sourceMapId:a.mapId})}}},yf.prototype.receive=function(e){var t=e.data,n=t.id;if(n&&(!t.targetMapId||this.mapId===t.targetMapId))if(""===t.type){delete this.tasks[n];var r=this.cancelCallbacks[n];delete this.cancelCallbacks[n],r&&r()}else O()||t.mustQueue?(this.tasks[n]=t,this.taskQueue.push(n),this.invoker.trigger()):this.processTask(n,t)},yf.prototype.process=function(){if(this.taskQueue.length){var e=this.taskQueue.shift(),t=this.tasks[e];delete this.tasks[e],this.taskQueue.length&&this.invoker.trigger(),t&&this.processTask(e,t)}},yf.prototype.processTask=function(e,t){var n=this;if(""===t.type){var r=this.callbacks[e];delete this.callbacks[e],r&&(t.error?r(ba(t.error)):r(null,ba(t.data)))}else{var i=!1,a=z(this.globalScope)?void 0:[],o=t.hasCallback?function(t,r){i=!0,delete n.cancelCallbacks[e],n.target.postMessage({id:e,type:"",sourceMapId:n.mapId,error:t?xa(t):null,data:xa(r,a)},a)}:function(e){i=!0},s=null,l=ba(t.data);if(this.parent[t.type])s=this.parent[t.type](t.sourceMapId,l,o);else if(this.parent.getWorkerSource){var c=t.type.split(".");s=this.parent.getWorkerSource(t.sourceMapId,c[0],l.source)[c[1]](l,o)}else o(new Error("Could not find function "+t.type));!i&&s&&s.cancel&&(this.cancelCallbacks[e]=s.cancel)}},yf.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};var _f=function(e,t){e&&(t?this.setSouthWest(e).setNorthEast(t):4===e.length?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1]))};_f.prototype.setNorthEast=function(e){return this._ne=e instanceof Af?new Af(e.lng,e.lat):Af.convert(e),this},_f.prototype.setSouthWest=function(e){return this._sw=e instanceof Af?new Af(e.lng,e.lat):Af.convert(e),this},_f.prototype.extend=function(e){var t,n,r=this._sw,i=this._ne;if(e instanceof Af)t=e,n=e;else{if(!(e instanceof _f)){if(Array.isArray(e)){if(4===e.length||e.every(Array.isArray)){var a=e;return this.extend(_f.convert(a))}var o=e;return this.extend(Af.convert(o))}return this}if(t=e._sw,n=e._ne,!t||!n)return this}return r||i?(r.lng=Math.min(t.lng,r.lng),r.lat=Math.min(t.lat,r.lat),i.lng=Math.max(n.lng,i.lng),i.lat=Math.max(n.lat,i.lat)):(this._sw=new Af(t.lng,t.lat),this._ne=new Af(n.lng,n.lat)),this},_f.prototype.getCenter=function(){return new Af((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},_f.prototype.getSouthWest=function(){return this._sw},_f.prototype.getNorthEast=function(){return this._ne},_f.prototype.getNorthWest=function(){return new Af(this.getWest(),this.getNorth())},_f.prototype.getSouthEast=function(){return new Af(this.getEast(),this.getSouth())},_f.prototype.getWest=function(){return this._sw.lng},_f.prototype.getSouth=function(){return this._sw.lat},_f.prototype.getEast=function(){return this._ne.lng},_f.prototype.getNorth=function(){return this._ne.lat},_f.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},_f.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},_f.prototype.isEmpty=function(){return!(this._sw&&this._ne)},_f.prototype.contains=function(e){var t=Af.convert(e),n=t.lng,r=t.lat,i=this._sw.lat<=r&&r<=this._ne.lat,a=this._sw.lng<=n&&n<=this._ne.lng;return this._sw.lng>this._ne.lng&&(a=this._sw.lng>=n&&n>=this._ne.lng),i&&a},_f.convert=function(e){return!e||e instanceof _f?e:new _f(e)};var wf=6371008.8,Af=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid LngLat object: ("+e+", "+t+")");if(this.lng=+e,this.lat=+t,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Af.prototype.wrap=function(){return new Af(h(this.lng,-180,180),this.lat)},Af.prototype.toArray=function(){return[this.lng,this.lat]},Af.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Af.prototype.distanceTo=function(e){var t=Math.PI/180,n=this.lat*t,r=e.lat*t,i=Math.sin(n)*Math.sin(r)+Math.cos(n)*Math.cos(r)*Math.cos((e.lng-this.lng)*t);return wf*Math.acos(Math.min(i,1))},Af.prototype.toBounds=function(e){void 0===e&&(e=0);var t=360*e/40075017,n=t/Math.cos(Math.PI/180*this.lat);return new _f(new Af(this.lng-n,this.lat-t),new Af(this.lng+n,this.lat+t))},Af.convert=function(e){if(e instanceof Af)return e;if(Array.isArray(e)&&(2===e.length||3===e.length))return new Af(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&"object"===typeof e&&null!==e)return new Af(Number("lng"in e?e.lng:e.lon),Number(e.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")};var Sf=2*Math.PI*wf;function Mf(e){return Sf*Math.cos(e*Math.PI/180)}function Tf(e){return(180+e)/360}function kf(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function Ef(e,t){return e/Mf(t)}function Cf(e){return 360*e-180}function Df(e){var t=180-360*e;return 360/Math.PI*Math.atan(Math.exp(t*Math.PI/180))-90}function Rf(e,t){return e*Mf(Df(t))}function Pf(e){return 1/Math.cos(e*Math.PI/180)}var Of=function(e,t,n){void 0===n&&(n=0),this.x=+e,this.y=+t,this.z=+n};Of.fromLngLat=function(e,t){void 0===t&&(t=0);var n=Af.convert(e);return new Of(Tf(n.lng),kf(n.lat),Ef(t,n.lat))},Of.prototype.toLngLat=function(){return new Af(Cf(this.x),Df(this.y))},Of.prototype.toAltitude=function(){return Rf(this.z,this.y)},Of.prototype.meterInMercatorCoordinateUnits=function(){return 1/Sf*Pf(Df(this.y))};var Lf=function(e,t,n){this.z=e,this.x=t,this.y=n,this.key=Nf(0,e,e,t,n)};Lf.prototype.equals=function(e){return this.z===e.z&&this.x===e.x&&this.y===e.y},Lf.prototype.url=function(e,t){var n=xf(this.x,this.y,this.z),r=Ff(this.z,this.x,this.y);return e[(this.x+this.y)%e.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String("tms"===t?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",r).replace("{bbox-epsg-3857}",n)},Lf.prototype.getTilePoint=function(e){var t=Math.pow(2,this.z);return new a((e.x*t-this.x)*Ps,(e.y*t-this.y)*Ps)},Lf.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var If=function(e,t){this.wrap=e,this.canonical=t,this.key=Nf(e,t.z,t.z,t.x,t.y)},zf=function(e,t,n,r,i){this.overscaledZ=e,this.wrap=t,this.canonical=new Lf(n,+r,+i),this.key=Nf(t,e,n,r,i)};function Nf(e,t,n,r,i){(e*=2)<0&&(e=-1*e-1);var a=1<0;a--)i+=(t&(r=1<this.canonical.z?new zf(e,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new zf(e,this.wrap,e,this.canonical.x>>t,this.canonical.y>>t)},zf.prototype.calculateScaledKey=function(e,t){var n=this.canonical.z-e;return e>this.canonical.z?Nf(this.wrap*+t,e,this.canonical.z,this.canonical.x,this.canonical.y):Nf(this.wrap*+t,e,e,this.canonical.x>>n,this.canonical.y>>n)},zf.prototype.isChildOf=function(e){if(e.wrap!==this.wrap)return!1;var t=this.canonical.z-e.canonical.z;return 0===e.overscaledZ||e.overscaledZ>t&&e.canonical.y===this.canonical.y>>t},zf.prototype.children=function(e){if(this.overscaledZ>=e)return[new zf(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var t=this.canonical.z+1,n=2*this.canonical.x,r=2*this.canonical.y;return[new zf(t,this.wrap,t,n,r),new zf(t,this.wrap,t,n+1,r),new zf(t,this.wrap,t,n,r+1),new zf(t,this.wrap,t,n+1,r+1)]},zf.prototype.isLessThan=function(e){return this.wrape.wrap)&&(this.overscaledZe.overscaledZ)&&(this.canonical.xe.canonical.x)&&this.canonical.y=this.dim+1||t<-1||t>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(t+1)*this.stride+(e+1)},Bf.prototype._unpackMapbox=function(e,t,n){return(256*e*256+256*t+n)/10-1e4},Bf.prototype._unpackTerrarium=function(e,t,n){return 256*e+t+n/256-32768},Bf.prototype.getPixels=function(){return new Wl({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Bf.prototype.backfillBorder=function(e,t,n){if(this.dim!==e.dim)throw new Error("dem dimension mismatch");var r=t*this.dim,i=t*this.dim+this.dim,a=n*this.dim,o=n*this.dim+this.dim;switch(t){case-1:r=i-1;break;case 1:i=r+1}switch(n){case-1:a=o-1;break;case 1:o=a+1}for(var s=-t*this.dim,l=-n*this.dim,c=a;c=0&&u[3]>=0&&s.insert(o,u[0],u[1],u[2],u[3])}},Gf.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new ru.VectorTile(new Yu(this.rawTileData)).layers,this.sourceLayerCoder=new Uf(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Gf.prototype.query=function(e,t,n,r){var i=this;this.loadVTLayers();for(var a=e.params||{},o=Ps/e.tileSize/e.scale,s=Di(a.filter),l=e.queryGeometry,c=e.queryPadding*o,u=Yf(l),d=this.grid.query(u.minX-c,u.minY-c,u.maxX+c,u.maxY+c),h=Yf(e.cameraQueryGeometry),f=0,p=this.grid3D.query(h.minX-c,h.minY-c,h.maxX+c,h.maxY+c,(function(t,n,r,i){return Xs(e.cameraQueryGeometry,t-c,n-c,r+c,i+c)}));fr)i=!1;else if(t)if(this.expirationTime=E.maxzoom||"none"!==E.visibility&&(l(k,this.zoom,r),(m[E.id]=E.createBucket({index:u.bucketLayerIDs.length,layers:k,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:b,sourceID:this.source})).populate(_,g,this.tileID.canonical),u.bucketLayerIDs.push(k.map((function(e){return e.id}))))}}}var C=e.mapObject(g.glyphDependencies,(function(e){return Object.keys(e).map(Number)}));Object.keys(C).length?i.send("getGlyphs",{uid:this.uid,stacks:C},(function(e,t){d||(d=e,h=t,P.call(s))})):h={};var D=Object.keys(g.iconDependencies);D.length?i.send("getImages",{icons:D,source:this.source,tileID:this.tileID,type:"icons"},(function(e,t){d||(d=e,f=t,P.call(s))})):f={};var R=Object.keys(g.patternDependencies);function P(){if(d)return a(d);if(h&&f&&p){var t=new o(h),n=new e.ImageAtlas(f,p);for(var i in m){var s=m[i];s instanceof e.SymbolBucket?(l(s.layers,this.zoom,r),e.performSymbolLayout(s,h,t.positions,f,n.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):s.hasPattern&&(s instanceof e.LineBucket||s instanceof e.FillBucket||s instanceof e.FillExtrusionBucket)&&(l(s.layers,this.zoom,r),s.addFeatures(g,this.tileID.canonical,n.patternPositions))}this.status="done",a(null,{buckets:e.values(m).filter((function(e){return!e.isEmpty()})),featureIndex:u,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:t.image,imageAtlas:n,glyphMap:this.returnDependencies?h:null,iconMap:this.returnDependencies?f:null,glyphPositions:this.returnDependencies?t.positions:null})}}R.length?i.send("getImages",{icons:R,source:this.source,tileID:this.tileID,type:"patterns"},(function(e,t){d||(d=e,p=t,P.call(s))})):p={},P.call(this)};var u=function(e,t,n,r){this.actor=e,this.layerIndex=t,this.availableImages=n,this.loadVectorData=r||c,this.loading={},this.loaded={}};u.prototype.loadTile=function(t,n){var r=this,i=t.uid;this.loading||(this.loading={});var a=!!(t&&t.request&&t.request.collectResourceTiming)&&new e.RequestPerformance(t.request),o=this.loading[i]=new s(t);o.abort=this.loadVectorData(t,(function(t,s){if(delete r.loading[i],t||!s)return o.status="done",r.loaded[i]=o,n(t);var l=s.rawData,c={};s.expires&&(c.expires=s.expires),s.cacheControl&&(c.cacheControl=s.cacheControl);var u={};if(a){var d=a.finish();d&&(u.resourceTiming=JSON.parse(JSON.stringify(d)))}o.vectorTile=s.vectorTile,o.parse(s.vectorTile,r.layerIndex,r.availableImages,r.actor,(function(t,r){if(t||!r)return n(t);n(null,e.extend({rawTileData:l.slice(0)},r,c,u))})),r.loaded=r.loaded||{},r.loaded[i]=o}))},u.prototype.reloadTile=function(e,t){var n=this,r=this.loaded,i=e.uid,a=this;if(r&&r[i]){var o=r[i];o.showCollisionBoxes=e.showCollisionBoxes;var s=function(e,r){var i=o.reloadCallback;i&&(delete o.reloadCallback,o.parse(o.vectorTile,a.layerIndex,n.availableImages,a.actor,i)),t(e,r)};"parsing"===o.status?o.reloadCallback=s:"done"===o.status&&(o.vectorTile?o.parse(o.vectorTile,this.layerIndex,this.availableImages,this.actor,s):s())}},u.prototype.abortTile=function(e,t){var n=this.loading,r=e.uid;n&&n[r]&&n[r].abort&&(n[r].abort(),delete n[r]),t()},u.prototype.removeTile=function(e,t){var n=this.loaded,r=e.uid;n&&n[r]&&delete n[r],t()};var d=e.window.ImageBitmap,h=function(){this.loaded={}};h.prototype.loadTile=function(t,n){var r=t.uid,i=t.encoding,a=t.rawImageData,o=d&&a instanceof d?this.getImageData(a):a,s=new e.DEMData(r,o,i);this.loaded=this.loaded||{},this.loaded[r]=s,n(null,s)},h.prototype.getImageData=function(t){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(t.width,t.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=t.width,this.offscreenCanvas.height=t.height,this.offscreenCanvasContext.drawImage(t,0,0,t.width,t.height);var n=this.offscreenCanvasContext.getImageData(-1,-1,t.width+2,t.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new e.RGBAImage({width:n.width,height:n.height},n.data)},h.prototype.removeTile=function(e){var t=this.loaded,n=e.uid;t&&t[n]&&delete t[n]};var f=p;function p(e,t){var n,r=e&&e.type;if("FeatureCollection"===r)for(n=0;n=0!==!!t&&e.reverse()}var v=e.vectorTile.VectorTileFeature.prototype.toGeoJSON,y=function(t){this._feature=t,this.extent=e.EXTENT,this.type=t.type,this.properties=t.tags,"id"in t&&!isNaN(t.id)&&(this.id=parseInt(t.id,10))};y.prototype.loadGeometry=function(){if(1===this._feature.type){for(var t=[],n=0,r=this._feature.geometry;n>31}function z(e,t){for(var n=e.loadGeometry(),r=e.type,i=0,a=0,o=n.length,s=0;s>1;B(e,t,o,r,i,a%2),F(e,t,n,r,o-1,a+1),F(e,t,n,o+1,i,a+1)}}function B(e,t,n,r,i,a){for(;i>r;){if(i-r>600){var o=i-r+1,s=n-r+1,l=Math.log(o),c=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*c*(o-c)/o)*(s-o/2<0?-1:1);B(e,t,n,Math.max(r,Math.floor(n-s*c/o+u)),Math.min(i,Math.floor(n+(o-s)*c/o+u)),a)}var d=t[2*n+a],h=r,f=i;for(j(e,t,r,n),t[2*i+a]>d&&j(e,t,r,i);hd;)f--}t[2*r+a]===d?j(e,t,r,f):j(e,t,++f,i),f<=n&&(r=f+1),n<=f&&(i=f-1)}}function j(e,t,n,r){U(e,n,r),U(t,2*n,2*r),U(t,2*n+1,2*r+1)}function U(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function V(e,t,n,r,i,a,o){for(var s,l,c=[0,e.length-1,0],u=[];c.length;){var d=c.pop(),h=c.pop(),f=c.pop();if(h-f<=o)for(var p=f;p<=h;p++)s=t[2*p],l=t[2*p+1],s>=n&&s<=i&&l>=r&&l<=a&&u.push(e[p]);else{var m=Math.floor((f+h)/2);s=t[2*m],l=t[2*m+1],s>=n&&s<=i&&l>=r&&l<=a&&u.push(e[m]);var g=(d+1)%2;(0===d?n<=s:r<=l)&&(c.push(f),c.push(m-1),c.push(g)),(0===d?i>=s:a>=l)&&(c.push(m+1),c.push(h),c.push(g))}}return u}function H(e,t,n,r,i,a){for(var o=[0,e.length-1,0],s=[],l=i*i;o.length;){var c=o.pop(),u=o.pop(),d=o.pop();if(u-d<=a)for(var h=d;h<=u;h++)W(t[2*h],t[2*h+1],n,r)<=l&&s.push(e[h]);else{var f=Math.floor((d+u)/2),p=t[2*f],m=t[2*f+1];W(p,m,n,r)<=l&&s.push(e[f]);var g=(c+1)%2;(0===c?n-i<=p:r-i<=m)&&(o.push(d),o.push(f-1),o.push(g)),(0===c?n+i>=p:r+i>=m)&&(o.push(f+1),o.push(u),o.push(g))}}return s}function W(e,t,n,r){var i=e-n,a=t-r;return i*i+a*a}S.fromVectorTileJs=M,S.fromGeojsonVt=T,S.GeoJSONWrapper=k;var G=function(e){return e[0]},q=function(e){return e[1]},Y=function(e,t,n,r,i){void 0===t&&(t=G),void 0===n&&(n=q),void 0===r&&(r=64),void 0===i&&(i=Float64Array),this.nodeSize=r,this.points=e;for(var a=e.length<65536?Uint16Array:Uint32Array,o=this.ids=new a(e.length),s=this.coords=new i(2*e.length),l=0;l=1e4?Math.round(t/1e3)+"k":t>=1e3?Math.round(t/100)/10+"k":t;return ie(ie({},e.properties),{cluster:!0,cluster_id:e.id,point_count:t,point_count_abbreviated:n})}function ee(e){return e/360+.5}function te(e){var t=Math.sin(e*Math.PI/180),n=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return n<0?0:n>1?1:n}function ne(e){return 360*(e-.5)}function re(e){var t=(180-360*e)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}function ie(e,t){for(var n in t)e[n]=t[n];return e}function ae(e){return e.x}function oe(e){return e.y}function se(e,t,n,r){for(var i,a=r,o=n-t>>1,s=n-t,l=e[t],c=e[t+1],u=e[n],d=e[n+1],h=t+3;ha)i=h,a=f;else if(f===a){var p=Math.abs(h-o);pr&&(i-t>3&&se(e,t,i,r),e[i+2]=a,n-i>3&&se(e,i,n,r))}function le(e,t,n,r,i,a){var o=i-n,s=a-r;if(0!==o||0!==s){var l=((e-n)*o+(t-r)*s)/(o*o+s*s);l>1?(n=i,r=a):l>0&&(n+=o*l,r+=s*l)}return(o=e-n)*o+(s=t-r)*s}function ce(e,t,n,r){var i={id:"undefined"===typeof e?null:e,type:t,geometry:n,tags:r,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return ue(i),i}function ue(e){var t=e.geometry,n=e.type;if("Point"===n||"MultiPoint"===n||"LineString"===n)de(e,t);else if("Polygon"===n||"MultiLineString"===n)for(var r=0;r0&&(o+=r?(i*c-l*a)/2:Math.sqrt(Math.pow(l-i,2)+Math.pow(c-a,2))),i=l,a=c}var u=t.length-3;t[2]=1,se(t,0,u,n),t[u+2]=1,t.size=Math.abs(o),t.start=0,t.end=t.size}function ge(e,t,n,r){for(var i=0;i1?1:n}function xe(e,t,n,r,i,a,o,s){if(r/=t,a>=(n/=t)&&o=r)return null;for(var l=[],c=0;c=n&&p=r)){var m=[];if("Point"===h||"MultiPoint"===h)be(d,m,n,r,i);else if("LineString"===h)_e(d,m,n,r,i,!1,s.lineMetrics);else if("MultiLineString"===h)Ae(d,m,n,r,i,!1);else if("Polygon"===h)Ae(d,m,n,r,i,!0);else if("MultiPolygon"===h)for(var g=0;g=n&&o<=r&&(t.push(e[a]),t.push(e[a+1]),t.push(e[a+2]))}}function _e(e,t,n,r,i,a,o){for(var s,l,c=we(e),u=0===i?Me:Te,d=e.start,h=0;hn&&(l=u(c,f,p,g,v,n),o&&(c.start=d+s*l)):y>r?x=n&&(l=u(c,f,p,g,v,n),b=!0),x>r&&y<=r&&(l=u(c,f,p,g,v,r),b=!0),!a&&b&&(o&&(c.end=d+s*l),t.push(c),c=we(e)),o&&(d+=s)}var _=e.length-3;f=e[_],p=e[_+1],m=e[_+2],(y=0===i?f:p)>=n&&y<=r&&Se(c,f,p,m),_=c.length-3,a&&_>=3&&(c[_]!==c[0]||c[_+1]!==c[1])&&Se(c,c[0],c[1],c[2]),c.length&&t.push(c)}function we(e){var t=[];return t.size=e.size,t.start=e.start,t.end=e.end,t}function Ae(e,t,n,r,i,a){for(var o=0;oo.maxX&&(o.maxX=u),d>o.maxY&&(o.maxY=d)}return o}function Oe(e,t,n,r){var i=t.geometry,a=t.type,o=[];if("Point"===a||"MultiPoint"===a)for(var s=0;s0&&t.size<(i?o:r))n.numPoints+=t.length/3;else{for(var s=[],l=0;lo)&&(n.numSimplified++,s.push(t[l]),s.push(t[l+1])),n.numPoints++;i&&Ie(s,a),e.push(s)}}function Ie(e,t){for(var n=0,r=0,i=e.length,a=i-2;r0===t)for(r=0,i=e.length;r24)throw new Error("maxZoom should be in the 0-24 range");if(t.promoteId&&t.generateId)throw new Error("promoteId and generateId cannot be used together.");var r=he(e,t);this.tiles={},this.tileCoords=[],n&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",t.indexMaxZoom,t.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),(r=ke(r,t)).length&&this.splitTile(r,0,0,0),n&&(r.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}function Fe(e,t,n){return 32*((1<=r;c--){var u=+Date.now();s=this._cluster(s,c),this.trees[c]=new Y(s,ae,oe,a,Float32Array),n&&console.log("z%d: %d clusters in %dms",c,s.length,+Date.now()-u)}return n&&console.timeEnd("total time"),this},X.prototype.getClusters=function(e,t){var n=((e[0]+180)%360+360)%360-180,r=Math.max(-90,Math.min(90,e[1])),i=180===e[2]?180:((e[2]+180)%360+360)%360-180,a=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)n=-180,i=180;else if(n>i){var o=this.getClusters([n,r,180,a],t),s=this.getClusters([-180,r,i,a],t);return o.concat(s)}for(var l=this.trees[this._limitZoom(t)],c=[],u=0,d=l.range(ee(n),te(a),ee(i),te(r));u1?this._map(c,!0):null,g=(l<<5)+(t+1)+this.points.length,v=0,y=d;v>5},X.prototype._getOriginZoom=function(e){return(e-this.points.length)%32},X.prototype._map=function(e,t){if(e.numPoints)return t?ie({},e.properties):e.properties;var n=this.points[e.index].properties,r=this.options.map(n);return t&&r===n?ie({},r):r},Ne.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Ne.prototype.splitTile=function(e,t,n,r,i,a,o){for(var s=[e,t,n,r],l=this.options,c=l.debug;s.length;){r=s.pop(),n=s.pop(),t=s.pop(),e=s.pop();var u=1<1&&console.time("creation"),h=this.tiles[d]=Pe(e,t,n,r,l),this.tileCoords.push({z:t,x:n,y:r}),c)){c>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",t,n,r,h.numFeatures,h.numPoints,h.numSimplified),console.timeEnd("creation"));var f="z"+t;this.stats[f]=(this.stats[f]||0)+1,this.total++}if(h.source=e,i){if(t===l.maxZoom||t===i)continue;var p=1<1&&console.time("clipping");var m,g,v,y,x,b,_=.5*l.buffer/l.extent,w=.5-_,A=.5+_,S=1+_;m=g=v=y=null,x=xe(e,u,n-_,n+A,0,h.minX,h.maxX,l),b=xe(e,u,n+w,n+S,0,h.minX,h.maxX,l),e=null,x&&(m=xe(x,u,r-_,r+A,1,h.minY,h.maxY,l),g=xe(x,u,r+w,r+S,1,h.minY,h.maxY,l),x=null),b&&(v=xe(b,u,r-_,r+A,1,h.minY,h.maxY,l),y=xe(b,u,r+w,r+S,1,h.minY,h.maxY,l),b=null),c>1&&console.timeEnd("clipping"),s.push(m||[],t+1,2*n,2*r),s.push(g||[],t+1,2*n,2*r+1),s.push(v||[],t+1,2*n+1,2*r),s.push(y||[],t+1,2*n+1,2*r+1)}}},Ne.prototype.getTile=function(e,t,n){var r=this.options,i=r.extent,a=r.debug;if(e<0||e>24)return null;var o=1<1&&console.log("drilling down to z%d-%d-%d",e,t,n);for(var l,c=e,u=t,d=n;!l&&c>0;)c--,u=Math.floor(u/2),d=Math.floor(d/2),l=this.tiles[Fe(c,u,d)];return l&&l.source?(a>1&&console.log("found parent tile z%d-%d-%d",c,u,d),a>1&&console.time("drilling down"),this.splitTile(l.source,c,u,d,e,t,n),a>1&&console.timeEnd("drilling down"),this.tiles[s]?De(this.tiles[s],i):null):null};var Ue=function(t){function n(e,n,r,i){t.call(this,e,n,r,je),i&&(this.loadGeoJSON=i)}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n.prototype.loadData=function(e,t){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=t,this._pendingLoadDataParams=e,this._state&&"Idle"!==this._state?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},n.prototype._loadData=function(){var t=this;if(this._pendingCallback&&this._pendingLoadDataParams){var n=this._pendingCallback,r=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var i=!!(r&&r.request&&r.request.collectResourceTiming)&&new e.RequestPerformance(r.request);this.loadGeoJSON(r,(function(e,a){if(e||!a)return n(e);if("object"!==typeof a)return n(new Error("Input data given to '"+r.source+"' is not a valid GeoJSON object."));f(a,!0);try{t._geoJSONIndex=r.cluster?new X(Ve(r)).load(a.features):ze(a,r.geojsonVtOptions)}catch(e){return n(e)}t.loaded={};var o={};if(i){var s=i.finish();s&&(o.resourceTiming={},o.resourceTiming[r.source]=JSON.parse(JSON.stringify(s)))}n(null,o)}))}},n.prototype.coalesce=function(){"Coalescing"===this._state?this._state="Idle":"NeedsLoadData"===this._state&&(this._state="Coalescing",this._loadData())},n.prototype.reloadTile=function(e,n){var r=this.loaded,i=e.uid;return r&&r[i]?t.prototype.reloadTile.call(this,e,n):this.loadTile(e,n)},n.prototype.loadGeoJSON=function(t,n){if(t.request)e.getJSON(t.request,n);else{if("string"!==typeof t.data)return n(new Error("Input data given to '"+t.source+"' is not a valid GeoJSON object."));try{return n(null,JSON.parse(t.data))}catch(r){return n(new Error("Input data given to '"+t.source+"' is not a valid GeoJSON object."))}}},n.prototype.removeSource=function(e,t){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),t()},n.prototype.getClusterExpansionZoom=function(e,t){try{t(null,this._geoJSONIndex.getClusterExpansionZoom(e.clusterId))}catch(n){t(n)}},n.prototype.getClusterChildren=function(e,t){try{t(null,this._geoJSONIndex.getChildren(e.clusterId))}catch(n){t(n)}},n.prototype.getClusterLeaves=function(e,t){try{t(null,this._geoJSONIndex.getLeaves(e.clusterId,e.limit,e.offset))}catch(n){t(n)}},n}(u);function Ve(t){var n=t.superclusterOptions,r=t.clusterProperties;if(!r||!n)return n;for(var i={},a={},o={accumulated:null,zoom:0},s={properties:null},l=Object.keys(r),c=0,u=l;c1?"@2x":"",l=e.getJSON(n.transformRequest(n.normalizeSpriteURL(t,s,".json"),e.ResourceType.SpriteJSON),(function(e,t){l=null,o||(o=e,i=t,u())})),c=e.getImage(n.transformRequest(n.normalizeSpriteURL(t,s,".png"),e.ResourceType.SpriteImage),(function(e,t){c=null,o||(o=e,a=t,u())}));function u(){if(o)r(o);else if(i&&a){var t=e.browser.getImageData(a),n={};for(var s in i){var l=i[s],c=l.width,u=l.height,d=l.x,h=l.y,f=l.sdf,p=l.pixelRatio,m=l.stretchX,g=l.stretchY,v=l.content,y=new e.RGBAImage({width:c,height:u});e.RGBAImage.copy(t,y,{x:d,y:h},{x:0,y:0},{width:c,height:u}),n[s]={data:y,pixelRatio:p,sdf:f,stretchX:m,stretchY:g,content:v}}r(null,n)}}return{cancel:function(){l&&(l.cancel(),l=null),c&&(c.cancel(),c=null)}}}function h(e){var t=e.userImage;return!!(t&&t.render&&t.render())&&(e.data.replace(new Uint8Array(t.data.buffer)),!0)}n.suppressClick=function(){e.window.addEventListener("click",u,!0),e.window.setTimeout((function(){e.window.removeEventListener("click",u,!0)}),0)},n.mousePos=function(t,n){var r=t.getBoundingClientRect();return new e.Point(n.clientX-r.left-t.clientLeft,n.clientY-r.top-t.clientTop)},n.touchPos=function(t,n){for(var r=t.getBoundingClientRect(),i=[],a=0;a=0?0:t.button},n.remove=function(e){e.parentNode&&e.parentNode.removeChild(e)};var f=1,p=function(t){function n(){t.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new e.RGBAImage({width:1,height:1}),this.dirty=!0}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n.prototype.isLoaded=function(){return this.loaded},n.prototype.setLoaded=function(e){if(this.loaded!==e&&(this.loaded=e,e)){for(var t=0,n=this.requestors;t=0?1.2:1))}function b(e,t,n,r,i,a,o){for(var s=0;s65535)t(new Error("glyphs > 65535 not supported"));else if(a.ranges[s])t(null,{stack:n,id:i,glyph:o});else{var l=a.requests[s];l||(l=a.requests[s]=[],w.loadGlyphRange(n,s,r.url,r.requestManager,(function(e,t){if(t){for(var n in t)r._doesCharSupportLocalGlyph(+n)||(a.glyphs[+n]=t[+n]);a.ranges[s]=!0}for(var i=0,o=l;i1&&(l=e[++s]);var u=Math.abs(c-l.left),d=Math.abs(c-l.right),h=Math.min(u,d),f=void 0,p=i/n*(r+1);if(l.isDash){var m=r-Math.abs(p);f=Math.sqrt(h*h+m*m)}else f=r-Math.sqrt(h*h+p*p);this.data[o+c]=Math.max(0,Math.min(255,f+128))}},k.prototype.addRegularDash=function(e){for(var t=e.length-1;t>=0;--t){var n=e[t],r=e[t+1];n.zeroLength?e.splice(t,1):r&&r.isDash===n.isDash&&(r.left=n.left,e.splice(t,1))}var i=e[0],a=e[e.length-1];i.isDash===a.isDash&&(i.left=a.left-this.width,a.right=i.right+this.width);for(var o=this.width*this.nextRow,s=0,l=e[s],c=0;c1&&(l=e[++s]);var u=Math.abs(c-l.left),d=Math.abs(c-l.right),h=Math.min(u,d),f=l.isDash?h:-h;this.data[o+c]=Math.max(0,Math.min(255,f+128))}},k.prototype.addDash=function(t,n){var r=n?7:0,i=2*r+1;if(this.nextRow+i>this.height)return e.warnOnce("LineAtlas out of space"),null;for(var a=0,o=0;o=r.minX&&t.x=r.minY&&t.y0&&(l[new e.OverscaledTileID(t.overscaledZ,a,n.z,i,n.y-1).key]={backfilled:!1},l[new e.OverscaledTileID(t.overscaledZ,t.wrap,n.z,n.x,n.y-1).key]={backfilled:!1},l[new e.OverscaledTileID(t.overscaledZ,s,n.z,o,n.y-1).key]={backfilled:!1}),n.y+10&&(r.resourceTiming=t._resourceTiming,t._resourceTiming=[]),t.fire(new e.Event("data",r))}}))},n.prototype.onAdd=function(e){this.map=e,this.load()},n.prototype.setData=function(t){var n=this;return this._data=t,this.fire(new e.Event("dataloading",{dataType:"source"})),this._updateWorkerData((function(t){if(t)n.fire(new e.ErrorEvent(t));else{var r={dataType:"source",sourceDataType:"content"};n._collectResourceTiming&&n._resourceTiming&&n._resourceTiming.length>0&&(r.resourceTiming=n._resourceTiming,n._resourceTiming=[]),n.fire(new e.Event("data",r))}})),this},n.prototype.getClusterExpansionZoom=function(e,t){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:e,source:this.id},t),this},n.prototype.getClusterChildren=function(e,t){return this.actor.send("geojson.getClusterChildren",{clusterId:e,source:this.id},t),this},n.prototype.getClusterLeaves=function(e,t,n,r){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:e,limit:t,offset:n},r),this},n.prototype._updateWorkerData=function(t){var n=this;this._loaded=!1;var r=e.extend({},this.workerOptions),i=this._data;"string"===typeof i?(r.request=this.map._requestManager.transformRequest(e.browser.resolveURL(i),e.ResourceType.Source),r.request.collectResourceTiming=this._collectResourceTiming):r.data=JSON.stringify(i),this.actor.send(this.type+".loadData",r,(function(e,i){n._removed||i&&i.abandoned||(n._loaded=!0,i&&i.resourceTiming&&i.resourceTiming[n.id]&&(n._resourceTiming=i.resourceTiming[n.id].slice(0)),n.actor.send(n.type+".coalesce",{source:r.source},null),t(e))}))},n.prototype.loaded=function(){return this._loaded},n.prototype.loadTile=function(t,n){var r=this,i=t.actor?"reloadTile":"loadTile";t.actor=this.actor;var a={type:this.type,uid:t.uid,tileID:t.tileID,zoom:t.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:e.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};t.request=this.actor.send(i,a,(function(e,a){return delete t.request,t.unloadVectorData(),t.aborted?n(null):e?n(e):(t.loadVectorData(a,r.map.painter,"reloadTile"===i),n(null))}))},n.prototype.abortTile=function(e){e.request&&(e.request.cancel(),delete e.request),e.aborted=!0},n.prototype.unloadTile=function(e){e.unloadVectorData(),this.actor.send("removeTile",{uid:e.uid,type:this.type,source:this.id})},n.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},n.prototype.serialize=function(){return e.extend({},this._options,{type:this.type,data:this._data})},n.prototype.hasTransition=function(){return!1},n}(e.Evented),I=e.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),z=function(t){function n(e,n,r,i){t.call(this),this.id=e,this.dispatcher=r,this.coordinates=n.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(i),this.options=n}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n.prototype.load=function(t,n){var r=this;this._loaded=!1,this.fire(new e.Event("dataloading",{dataType:"source"})),this.url=this.options.url,e.getImage(this.map._requestManager.transformRequest(this.url,e.ResourceType.Image),(function(i,a){r._loaded=!0,i?r.fire(new e.ErrorEvent(i)):a&&(r.image=a,t&&(r.coordinates=t),n&&n(),r._finishLoading())}))},n.prototype.loaded=function(){return this._loaded},n.prototype.updateImage=function(e){var t=this;return this.image&&e.url?(this.options.url=e.url,this.load(e.coordinates,(function(){t.texture=null})),this):this},n.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"metadata"})))},n.prototype.onAdd=function(e){this.map=e,this.load()},n.prototype.setCoordinates=function(t){var n=this;this.coordinates=t;var r=t.map(e.MercatorCoordinate.fromLngLat);this.tileID=N(r),this.minzoom=this.maxzoom=this.tileID.z;var i=r.map((function(e){return n.tileID.getTilePoint(e)._round()}));return this._boundsArray=new e.StructArrayLayout4i8,this._boundsArray.emplaceBack(i[0].x,i[0].y,0,0),this._boundsArray.emplaceBack(i[1].x,i[1].y,e.EXTENT,0),this._boundsArray.emplaceBack(i[3].x,i[3].y,0,e.EXTENT),this._boundsArray.emplaceBack(i[2].x,i[2].y,e.EXTENT,e.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"content"})),this},n.prototype.prepare=function(){if(0!==Object.keys(this.tiles).length&&this.image){var t=this.map.painter.context,n=t.gl;for(var r in this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,I.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new e.Texture(t,this.image,n.RGBA),this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE)),this.tiles){var i=this.tiles[r];"loaded"!==i.state&&(i.state="loaded",i.texture=this.texture)}}},n.prototype.loadTile=function(e,t){this.tileID&&this.tileID.equals(e.tileID.canonical)?(this.tiles[String(e.tileID.wrap)]=e,e.buckets={},t(null)):(e.state="errored",t(null))},n.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},n.prototype.hasTransition=function(){return!1},n}(e.Evented);function N(t){for(var n=1/0,r=1/0,i=-1/0,a=-1/0,o=0,s=t;on.end(0)?this.fire(new e.ErrorEvent(new e.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+n.start(0)+" and "+n.end(0)+"-second mark."))):this.video.currentTime=t}},n.prototype.getVideo=function(){return this.video},n.prototype.onAdd=function(e){this.map||(this.map=e,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},n.prototype.prepare=function(){if(!(0===Object.keys(this.tiles).length||this.video.readyState<2)){var t=this.map.painter.context,n=t.gl;for(var r in this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,I.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE),n.texSubImage2D(n.TEXTURE_2D,0,0,0,n.RGBA,n.UNSIGNED_BYTE,this.video)):(this.texture=new e.Texture(t,this.video,n.RGBA),this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE)),this.tiles){var i=this.tiles[r];"loaded"!==i.state&&(i.state="loaded",i.texture=this.texture)}}},n.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},n.prototype.hasTransition=function(){return this.video&&!this.video.paused},n}(z),B=function(t){function n(n,r,i,a){t.call(this,n,r,i,a),r.coordinates?Array.isArray(r.coordinates)&&4===r.coordinates.length&&!r.coordinates.some((function(e){return!Array.isArray(e)||2!==e.length||e.some((function(e){return"number"!==typeof e}))}))||this.fire(new e.ErrorEvent(new e.ValidationError("sources."+n,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.ErrorEvent(new e.ValidationError("sources."+n,null,'missing required property "coordinates"'))),r.animate&&"boolean"!==typeof r.animate&&this.fire(new e.ErrorEvent(new e.ValidationError("sources."+n,null,'optional "animate" property must be a boolean value'))),r.canvas?"string"===typeof r.canvas||r.canvas instanceof e.window.HTMLCanvasElement||this.fire(new e.ErrorEvent(new e.ValidationError("sources."+n,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new e.ErrorEvent(new e.ValidationError("sources."+n,null,'missing required property "canvas"'))),this.options=r,this.animate=void 0===r.animate||r.animate}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof e.window.HTMLCanvasElement?this.options.canvas:e.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new e.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())},n.prototype.getCanvas=function(){return this.canvas},n.prototype.onAdd=function(e){this.map=e,this.load(),this.canvas&&this.animate&&this.play()},n.prototype.onRemove=function(){this.pause()},n.prototype.prepare=function(){var t=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,t=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,t=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var n=this.map.painter.context,r=n.gl;for(var i in this.boundsBuffer||(this.boundsBuffer=n.createVertexBuffer(this._boundsArray,I.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(t||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new e.Texture(n,this.canvas,r.RGBA,{premultiply:!0}),this.tiles){var a=this.tiles[i];"loaded"!==a.state&&(a.state="loaded",a.texture=this.texture)}}},n.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},n.prototype.hasTransition=function(){return this._playing},n.prototype._hasInvalidDimensions=function(){for(var e=0,t=[this.canvas.width,this.canvas.height];ethis.max){var o=this._getAndRemoveByKey(this.order[0]);o&&this.onRemove(o)}return this},K.prototype.has=function(e){return e.wrapped().key in this.data},K.prototype.getAndRemove=function(e){return this.has(e)?this._getAndRemoveByKey(e.wrapped().key):null},K.prototype._getAndRemoveByKey=function(e){var t=this.data[e].shift();return t.timeout&&clearTimeout(t.timeout),0===this.data[e].length&&delete this.data[e],this.order.splice(this.order.indexOf(e),1),t.value},K.prototype.getByKey=function(e){var t=this.data[e];return t?t[0].value:null},K.prototype.get=function(e){return this.has(e)?this.data[e.wrapped().key][0].value:null},K.prototype.remove=function(e,t){if(!this.has(e))return this;var n=e.wrapped().key,r=void 0===t?0:this.data[n].indexOf(t),i=this.data[n][r];return this.data[n].splice(r,1),i.timeout&&clearTimeout(i.timeout),0===this.data[n].length&&delete this.data[n],this.onRemove(i.value),this.order.splice(this.order.indexOf(n),1),this},K.prototype.setMaxSize=function(e){for(this.max=e;this.order.length>this.max;){var t=this._getAndRemoveByKey(this.order[0]);t&&this.onRemove(t)}return this},K.prototype.filter=function(e){var t=[];for(var n in this.data)for(var r=0,i=this.data[n];r1||(Math.abs(n)>1&&(1===Math.abs(n+i)?n+=i:1===Math.abs(n-i)&&(n-=i)),t.dem&&e.dem&&(e.dem.backfillBorder(t.dem,n,r),e.neighboringTiles&&e.neighboringTiles[a]&&(e.neighboringTiles[a].backfilled=!0)))}},n.prototype.getTile=function(e){return this.getTileByID(e.key)},n.prototype.getTileByID=function(e){return this._tiles[e]},n.prototype._retainLoadedChildren=function(e,t,n,r){for(var i in this._tiles){var a=this._tiles[i];if(!(r[i]||!a.hasData()||a.tileID.overscaledZ<=t||a.tileID.overscaledZ>n)){for(var o=a.tileID;a&&a.tileID.overscaledZ>t+1;){var s=a.tileID.scaledTo(a.tileID.overscaledZ-1);(a=this._tiles[s.key])&&a.hasData()&&(o=s)}for(var l=o;l.overscaledZ>t;)if(e[(l=l.scaledTo(l.overscaledZ-1)).key]){r[o.key]=o;break}}}},n.prototype.findLoadedParent=function(e,t){if(e.key in this._loadedParentTiles){var n=this._loadedParentTiles[e.key];return n&&n.tileID.overscaledZ>=t?n:null}for(var r=e.overscaledZ-1;r>=t;r--){var i=e.scaledTo(r),a=this._getLoadedTile(i);if(a)return a}},n.prototype._getLoadedTile=function(e){var t=this._tiles[e.key];return t&&t.hasData()?t:this._cache.getByKey(e.wrapped().key)},n.prototype.updateCacheSize=function(e){var t=(Math.ceil(e.width/this._source.tileSize)+1)*(Math.ceil(e.height/this._source.tileSize)+1),n=5,r=Math.floor(t*n),i="number"===typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,r):r;this._cache.setMaxSize(i)},n.prototype.handleWrapJump=function(e){var t=(e-(void 0===this._prevLng?e:this._prevLng))/360,n=Math.round(t);if(this._prevLng=e,n){var r={};for(var i in this._tiles){var a=this._tiles[i];a.tileID=a.tileID.unwrapTo(a.tileID.wrap+n),r[a.tileID.key]=a}for(var o in this._tiles=r,this._timers)clearTimeout(this._timers[o]),delete this._timers[o];for(var s in this._tiles){var l=this._tiles[s];this._setTileReloadTimer(s,l)}}},n.prototype.update=function(t){var r=this;if(this.transform=t,this._sourceLoaded&&!this._paused){var i;this.updateCacheSize(t),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?i=t.getVisibleUnwrappedCoordinates(this._source.tileID).map((function(t){return new e.OverscaledTileID(t.canonical.z,t.wrap,t.canonical.z,t.canonical.x,t.canonical.y)})):(i=t.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(i=i.filter((function(e){return r._source.hasTile(e)})))):i=[];var a=t.coveringZoomLevel(this._source),o=Math.max(a-n.maxOverzooming,this._source.minzoom),s=Math.max(a+n.maxUnderzooming,this._source.minzoom),l=this._updateRetainedTiles(i,a);if(Je(this._source.type)){for(var c={},u={},d=0,h=Object.keys(l);dthis._source.maxzoom){var g=p.children(this._source.maxzoom)[0],v=this.getTile(g);if(v&&v.hasData()){r[g.key]=g;continue}}else{var y=p.children(this._source.maxzoom);if(r[y[0].key]&&r[y[1].key]&&r[y[2].key]&&r[y[3].key])continue}for(var x=m.wasRequested(),b=p.overscaledZ-1;b>=a;--b){var _=p.scaledTo(b);if(i[_.key])break;if(i[_.key]=!0,!(m=this.getTile(_))&&x&&(m=this._addTile(_)),m&&(r[_.key]=_,x=m.wasRequested(),m.hasData()))break}}}return r},n.prototype._updateLoadedParentTileCache=function(){for(var e in this._loadedParentTiles={},this._tiles){for(var t=[],n=void 0,r=this._tiles[e].tileID;r.overscaledZ>0;){if(r.key in this._loadedParentTiles){n=this._loadedParentTiles[r.key];break}t.push(r.key);var i=r.scaledTo(r.overscaledZ-1);if(n=this._getLoadedTile(i))break;r=i}for(var a=0,o=t;a0||(t.hasData()&&"reloading"!==t.state?this._cache.add(t.tileID,t,t.getExpiryTimeout()):(t.aborted=!0,this._abortTile(t),this._unloadTile(t))))},n.prototype.clearTiles=function(){for(var e in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(e);this._cache.reset()},n.prototype.tilesIn=function(t,n,r){var i=this,a=[],o=this.transform;if(!o)return a;for(var s=r?o.getCameraQueryGeometry(t):t,l=t.map((function(e){return o.pointCoordinate(e)})),c=s.map((function(e){return o.pointCoordinate(e)})),u=this.getIds(),d=1/0,h=1/0,f=-1/0,p=-1/0,m=0,g=c;m=0&&v[1].y+g>=0){var y=l.map((function(e){return s.getTilePoint(e)})),x=c.map((function(e){return s.getTilePoint(e)}));a.push({tile:r,tileID:s,queryGeometry:y,cameraQueryGeometry:x,scale:m})}}},x=0;x=e.browser.now())return!0}return!1},n.prototype.setFeatureState=function(e,t,n){e=e||"_geojsonTileLayer",this._state.updateState(e,t,n)},n.prototype.removeFeatureState=function(e,t,n){e=e||"_geojsonTileLayer",this._state.removeFeatureState(e,t,n)},n.prototype.getFeatureState=function(e,t){return e=e||"_geojsonTileLayer",this._state.getState(e,t)},n.prototype.setDependencies=function(e,t,n){var r=this._tiles[e];r&&r.setDependencies(t,n)},n.prototype.reloadTilesForDependencies=function(e,t){for(var n in this._tiles)this._tiles[n].hasDependency(e,t)&&this._reloadTile(n,"reloading");this._cache.filter((function(n){return!n.hasDependency(e,t)}))},n}(e.Evented);function Ke(e,t){var n=Math.abs(2*e.wrap)-+(e.wrap<0),r=Math.abs(2*t.wrap)-+(t.wrap<0);return e.overscaledZ-t.overscaledZ||r-n||t.canonical.y-e.canonical.y||t.canonical.x-e.canonical.x}function Je(e){return"raster"===e||"image"===e||"video"===e}function Qe(){return new e.window.Worker(us.workerUrl)}Ze.maxOverzooming=10,Ze.maxUnderzooming=3;var et="mapboxgl_preloaded_worker_pool",tt=function(){this.active={}};tt.prototype.acquire=function(e){if(!this.workers)for(this.workers=[];this.workers.length0?(i-o)/s:0;return this.points[a].mult(1-l).add(this.points[n].mult(l))};var wt=function(e,t,n){var r=this.boxCells=[],i=this.circleCells=[];this.xCellCount=Math.ceil(e/n),this.yCellCount=Math.ceil(t/n);for(var a=0;a=-t[0]&&n<=t[0]&&r>=-t[1]&&r<=t[1]}function Et(t,n,r,i,a,o,s,l){var c=i?t.textSizeData:t.iconSizeData,u=e.evaluateSizeForZoom(c,r.transform.zoom),d=[256/r.width*2+1,256/r.height*2+1],h=i?t.text.dynamicLayoutVertexArray:t.icon.dynamicLayoutVertexArray;h.clear();for(var f=t.lineVertexArray,p=i?t.text.placedSymbolArray:t.icon.placedSymbolArray,m=r.transform.width/r.transform.height,g=!1,v=0;vMath.abs(r.x-n.x)*i?{useVertical:!0}:(t===e.WritingMode.vertical?n.yr.x)?{needsFlipping:!0}:null}function Rt(t,n,r,i,a,o,s,l,c,u,d,h,f,p){var m,g=n/24,v=t.lineOffsetX*g,y=t.lineOffsetY*g;if(t.numGlyphs>1){var x=t.glyphStartIndex+t.numGlyphs,b=t.lineStartIndex,_=t.lineStartIndex+t.lineLength,w=Ct(g,l,v,y,r,d,h,t,c,o,f);if(!w)return{notEnoughRoom:!0};var A=Mt(w.first.point,s).point,S=Mt(w.last.point,s).point;if(i&&!r){var M=Dt(t.writingMode,A,S,p);if(M)return M}m=[w.first];for(var T=t.glyphStartIndex+1;T0?D.point:Pt(h,C,k,1,a),P=Dt(t.writingMode,k,R,p);if(P)return P}var O=Ot(g*l.getoffsetX(t.glyphStartIndex),v,y,r,d,h,t.segment,t.lineStartIndex,t.lineStartIndex+t.lineLength,c,o,f);if(!O)return{notEnoughRoom:!0};m=[O]}for(var L=0,I=m;L0?1:-1,m=0;i&&(p*=-1,m=Math.PI),p<0&&(m+=Math.PI);for(var g=p>0?l+s:l+s+1,v=a,y=a,x=0,b=0,_=Math.abs(f),w=[];x+b<=_;){if((g+=p)=c)return null;if(y=v,w.push(v),void 0===(v=h[g])){var A=new e.Point(u.getx(g),u.gety(g)),S=Mt(A,d);if(S.signedDistanceFromCamera>0)v=h[g]=S.point;else{var M=g-p;v=Pt(0===x?o:new e.Point(u.getx(M),u.gety(M)),A,y,_-x+1,d)}}x+=b,b=y.dist(v)}var T=(_-x)/b,k=v.sub(y),E=k.mult(T)._add(y);E._add(k._unit()._perp()._mult(r*p));var C=m+Math.atan2(v.y-y.y,v.x-y.x);return w.push(E),{point:E,angle:C,path:w}}wt.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},wt.prototype.insert=function(e,t,n,r,i){this._forEachCell(t,n,r,i,this._insertBoxCell,this.boxUid++),this.boxKeys.push(e),this.bboxes.push(t),this.bboxes.push(n),this.bboxes.push(r),this.bboxes.push(i)},wt.prototype.insertCircle=function(e,t,n,r){this._forEachCell(t-r,n-r,t+r,n+r,this._insertCircleCell,this.circleUid++),this.circleKeys.push(e),this.circles.push(t),this.circles.push(n),this.circles.push(r)},wt.prototype._insertBoxCell=function(e,t,n,r,i,a){this.boxCells[i].push(a)},wt.prototype._insertCircleCell=function(e,t,n,r,i,a){this.circleCells[i].push(a)},wt.prototype._query=function(e,t,n,r,i,a){if(n<0||e>this.width||r<0||t>this.height)return!i&&[];var o=[];if(e<=0&&t<=0&&this.width<=n&&this.height<=r){if(i)return!0;for(var s=0;s0:o},wt.prototype._queryCircle=function(e,t,n,r,i){var a=e-n,o=e+n,s=t-n,l=t+n;if(o<0||a>this.width||l<0||s>this.height)return!r&&[];var c=[],u={hitTest:r,circle:{x:e,y:t,radius:n},seenUids:{box:{},circle:{}}};return this._forEachCell(a,s,o,l,this._queryCellCircle,c,u,i),r?c.length>0:c},wt.prototype.query=function(e,t,n,r,i){return this._query(e,t,n,r,!1,i)},wt.prototype.hitTest=function(e,t,n,r,i){return this._query(e,t,n,r,!0,i)},wt.prototype.hitTestCircle=function(e,t,n,r){return this._queryCircle(e,t,n,!0,r)},wt.prototype._queryCell=function(e,t,n,r,i,a,o,s){var l=o.seenUids,c=this.boxCells[i];if(null!==c)for(var u=this.bboxes,d=0,h=c;d=u[p+0]&&r>=u[p+1]&&(!s||s(this.boxKeys[f]))){if(o.hitTest)return a.push(!0),!0;a.push({key:this.boxKeys[f],x1:u[p],y1:u[p+1],x2:u[p+2],y2:u[p+3]})}}}var m=this.circleCells[i];if(null!==m)for(var g=this.circles,v=0,y=m;vo*o+s*s},wt.prototype._circleAndRectCollide=function(e,t,n,r,i,a,o){var s=(a-r)/2,l=Math.abs(e-(r+s));if(l>s+n)return!1;var c=(o-i)/2,u=Math.abs(t-(i+c));if(u>c+n)return!1;if(l<=s||u<=c)return!0;var d=l-s,h=u-c;return d*d+h*h<=n*n};var Lt=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function It(e,t){for(var n=0;n=1;P--)R.push(C.path[P]);for(var O=1;O0){for(var N=R[0].clone(),F=R[0].clone(),B=1;B=T.x&&F.x<=k.x&&N.y>=T.y&&F.y<=k.y?[R]:F.xk.x||F.yk.y?[]:e.clipLine([R],T.x,T.y,k.x,k.y)}for(var j=0,U=z;j=this.screenRightBoundary||rthis.screenBottomBoundary},Ft.prototype.isInsideGrid=function(e,t,n,r){return n>=0&&e=0&&t0?(this.prevPlacement&&this.prevPlacement.variableOffsets[d.crossTileID]&&this.prevPlacement.placements[d.crossTileID]&&this.prevPlacement.placements[d.crossTileID].text&&(m=this.prevPlacement.variableOffsets[d.crossTileID].anchor),this.variableOffsets[d.crossTileID]={textOffset:g,width:n,height:r,anchor:e,textBoxScale:i,prevAnchor:m},this.markUsedJustification(h,e,d,f),h.allowVerticalPlacement&&(this.markUsedOrientation(h,f,d),this.placedOrientations[d.crossTileID]=f),{shift:v,placedGlyphBoxes:y}):void 0},$t.prototype.placeLayerBucketPart=function(t,n,r){var i=this,a=t.parameters,o=a.bucket,s=a.layout,l=a.posMatrix,c=a.textLabelPlaneMatrix,u=a.labelToScreenMatrix,d=a.textPixelRatio,h=a.holdingForFade,f=a.collisionBoxArray,p=a.partiallyEvaluatedTextSize,m=a.collisionGroup,g=s.get("text-optional"),v=s.get("icon-optional"),y=s.get("text-allow-overlap"),x=s.get("icon-allow-overlap"),b="map"===s.get("text-rotation-alignment"),_="map"===s.get("text-pitch-alignment"),w="none"!==s.get("icon-text-fit"),A="viewport-y"===s.get("symbol-z-order"),S=y&&(x||!o.hasIconData()||v),M=x&&(y||!o.hasTextData()||g);!o.collisionArrays&&f&&o.deserializeCollisionBoxes(f);var T=function(t,a){if(!n[t.crossTileID])if(h)i.placements[t.crossTileID]=new Vt(!1,!1,!1);else{var f=!1,A=!1,T=!0,k=null,E={box:null,offscreen:null},C={box:null,offscreen:null},D=null,R=null,P=null,O=0,L=0,I=0;a.textFeatureIndex?O=a.textFeatureIndex:t.useRuntimeCollisionCircles&&(O=t.featureIndex),a.verticalTextFeatureIndex&&(L=a.verticalTextFeatureIndex);var z=a.textBox;if(z){var N=function(n){var r=e.WritingMode.horizontal;if(o.allowVerticalPlacement&&!n&&i.prevPlacement){var a=i.prevPlacement.placedOrientations[t.crossTileID];a&&(i.placedOrientations[t.crossTileID]=a,r=a,i.markUsedOrientation(o,r,t))}return r},F=function(n,r){if(o.allowVerticalPlacement&&t.numVerticalGlyphVertices>0&&a.verticalTextBox)for(var i=0,s=o.writingModes;i0&&(B=B.filter((function(e){return e!==j.anchor}))).unshift(j.anchor)}var U=function(e,n,r){for(var a=e.x2-e.x1,s=e.y2-e.y1,c=t.textBoxScale,u=w&&!x?n:null,h={box:[],offscreen:!1},p=y?2*B.length:B.length,g=0;g=B.length,S=i.attemptAnchorPlacement(v,e,a,s,c,b,_,d,l,m,A,t,o,r,u);if(S&&(h=S.placedGlyphBoxes)&&h.box&&h.box.length){f=!0,k=S.shift;break}}return h};F((function(){return U(z,a.iconBox,e.WritingMode.horizontal)}),(function(){var n=a.verticalTextBox,r=E&&E.box&&E.box.length;return o.allowVerticalPlacement&&!r&&t.numVerticalGlyphVertices>0&&n?U(n,a.verticalIconBox,e.WritingMode.vertical):{box:null,offscreen:null}})),E&&(f=E.box,T=E.offscreen);var V=N(E&&E.box);if(!f&&i.prevPlacement){var H=i.prevPlacement.variableOffsets[t.crossTileID];H&&(i.variableOffsets[t.crossTileID]=H,i.markUsedJustification(o,H.anchor,t,V))}}else{var W=function(e,n){var r=i.collisionIndex.placeCollisionBox(e,y,d,l,m.predicate);return r&&r.box&&r.box.length&&(i.markUsedOrientation(o,n,t),i.placedOrientations[t.crossTileID]=n),r};F((function(){return W(z,e.WritingMode.horizontal)}),(function(){var n=a.verticalTextBox;return o.allowVerticalPlacement&&t.numVerticalGlyphVertices>0&&n?W(n,e.WritingMode.vertical):{box:null,offscreen:null}})),N(E&&E.box&&E.box.length)}}if(f=(D=E)&&D.box&&D.box.length>0,T=D&&D.offscreen,t.useRuntimeCollisionCircles){var G=o.text.placedSymbolArray.get(t.centerJustifiedTextSymbolIndex),q=e.evaluateSizeForFeature(o.textSizeData,p,G),Y=s.get("text-padding"),$=t.collisionCircleDiameter;R=i.collisionIndex.placeCollisionCircles(y,G,o.lineVertexArray,o.glyphOffsetArray,q,l,c,u,r,_,m.predicate,$,Y),f=y||R.circles.length>0&&!R.collisionDetected,T=T&&R.offscreen}if(a.iconFeatureIndex&&(I=a.iconFeatureIndex),a.iconBox){var X=function(e){var t=w&&k?Yt(e,k.x,k.y,b,_,i.transform.angle):e;return i.collisionIndex.placeCollisionBox(t,x,d,l,m.predicate)};A=C&&C.box&&C.box.length&&a.verticalIconBox?(P=X(a.verticalIconBox)).box.length>0:(P=X(a.iconBox)).box.length>0,T=T&&P.offscreen}var Z=g||0===t.numHorizontalGlyphVertices&&0===t.numVerticalGlyphVertices,K=v||0===t.numIconVertices;if(Z||K?K?Z||(A=A&&f):f=A&&f:A=f=A&&f,f&&D&&D.box&&(C&&C.box&&L?i.collisionIndex.insertCollisionBox(D.box,s.get("text-ignore-placement"),o.bucketInstanceId,L,m.ID):i.collisionIndex.insertCollisionBox(D.box,s.get("text-ignore-placement"),o.bucketInstanceId,O,m.ID)),A&&P&&i.collisionIndex.insertCollisionBox(P.box,s.get("icon-ignore-placement"),o.bucketInstanceId,I,m.ID),R&&(f&&i.collisionIndex.insertCollisionCircles(R.circles,s.get("text-ignore-placement"),o.bucketInstanceId,O,m.ID),r)){var J=o.bucketInstanceId,Q=i.collisionCircleArrays[J];void 0===Q&&(Q=i.collisionCircleArrays[J]=new Ht);for(var ee=0;ee=0;--E){var C=k[E];T(o.symbolInstances.get(C),o.collisionArrays[C])}else for(var D=t.symbolInstanceStart;D=0&&(t.text.placedSymbolArray.get(c).crossTileID=a>=0&&c!==a?0:r.crossTileID)}},$t.prototype.markUsedOrientation=function(t,n,r){for(var i=n===e.WritingMode.horizontal||n===e.WritingMode.horizontalOnly?n:0,a=n===e.WritingMode.vertical?n:0,o=0,s=[r.leftJustifiedTextSymbolIndex,r.centerJustifiedTextSymbolIndex,r.rightJustifiedTextSymbolIndex];o0||l>0,x=a.numIconVertices>0,b=i.placedOrientations[a.crossTileID],_=b===e.WritingMode.vertical,w=b===e.WritingMode.horizontal||b===e.WritingMode.horizontalOnly;if(y){var A=rn(v.text),S=_?an:A;p(t.text,s,S);var M=w?an:A;p(t.text,l,M);var T=v.text.isHidden();[a.rightJustifiedTextSymbolIndex,a.centerJustifiedTextSymbolIndex,a.leftJustifiedTextSymbolIndex].forEach((function(e){e>=0&&(t.text.placedSymbolArray.get(e).hidden=T||_?1:0)})),a.verticalPlacedTextSymbolIndex>=0&&(t.text.placedSymbolArray.get(a.verticalPlacedTextSymbolIndex).hidden=T||w?1:0);var k=i.variableOffsets[a.crossTileID];k&&i.markUsedJustification(t,k.anchor,a,b);var E=i.placedOrientations[a.crossTileID];E&&(i.markUsedJustification(t,"left",a,E),i.markUsedOrientation(t,E,a))}if(x){var C=rn(v.icon),D=!(h&&a.verticalPlacedIconSymbolIndex&&_);if(a.placedIconSymbolIndex>=0){var R=D?C:an;p(t.icon,a.numIconVertices,R),t.icon.placedSymbolArray.get(a.placedIconSymbolIndex).hidden=v.icon.isHidden()}if(a.verticalPlacedIconSymbolIndex>=0){var P=D?an:C;p(t.icon,a.numVerticalIconVertices,P),t.icon.placedSymbolArray.get(a.verticalPlacedIconSymbolIndex).hidden=v.icon.isHidden()}}if(t.hasIconCollisionBoxData()||t.hasTextCollisionBoxData()){var O=t.collisionArrays[r];if(O){var L=new e.Point(0,0);if(O.textBox||O.verticalTextBox){var I=!0;if(c){var z=i.variableOffsets[m];z?(L=qt(z.anchor,z.width,z.height,z.textOffset,z.textBoxScale),u&&L._rotate(d?i.transform.angle:-i.transform.angle)):I=!1}O.textBox&&Xt(t.textCollisionBox.collisionVertexArray,v.text.placed,!I||_,L.x,L.y),O.verticalTextBox&&Xt(t.textCollisionBox.collisionVertexArray,v.text.placed,!I||w,L.x,L.y)}var N=Boolean(!w&&O.verticalIconBox);O.iconBox&&Xt(t.iconCollisionBox.collisionVertexArray,v.icon.placed,N,h?L.x:0,h?L.y:0),O.verticalIconBox&&Xt(t.iconCollisionBox.collisionVertexArray,v.icon.placed,!N,h?L.x:0,h?L.y:0)}}},g=0;ge},$t.prototype.setStale=function(){this.stale=!0};var Zt=Math.pow(2,25),Kt=Math.pow(2,24),Jt=Math.pow(2,17),Qt=Math.pow(2,16),en=Math.pow(2,9),tn=Math.pow(2,8),nn=Math.pow(2,1);function rn(e){if(0===e.opacity&&!e.placed)return 0;if(1===e.opacity&&e.placed)return 4294967295;var t=e.placed?1:0,n=Math.floor(127*e.opacity);return n*Zt+t*Kt+n*Jt+t*Qt+n*en+t*tn+n*nn+t}var an=0,on=function(e){this._sortAcrossTiles="viewport-y"!==e.layout.get("symbol-z-order")&&void 0!==e.layout.get("symbol-sort-key").constantOr(1),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};on.prototype.continuePlacement=function(e,t,n,r,i){for(var a=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var s=n[t[this._currentPlacementIndex]],l=this.placement.collisionIndex.transform.zoom;if("symbol"===s.type&&(!s.minzoom||s.minzoom<=l)&&(!s.maxzoom||s.maxzoom>l)){if(this._inProgressLayer||(this._inProgressLayer=new on(s)),this._inProgressLayer.continuePlacement(r[s.source],this.placement,this._showCollisionBoxes,s,o))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},sn.prototype.commit=function(e){return this.placement.commit(e),this.placement};var ln=512/e.EXTENT/2,cn=function(e,t,n){this.tileID=e,this.indexedSymbolInstances={},this.bucketInstanceId=n;for(var r=0;re.overscaledZ)for(var s in o){var l=o[s];l.tileID.isChildOf(e)&&l.findMatches(t.symbolInstances,e,i)}else{var c=o[e.scaledTo(Number(a)).key];c&&c.findMatches(t.symbolInstances,e,i)}}for(var u=0;u0)throw new Error("Unimplemented: "+i.map((function(e){return e.command})).join(", ")+".");return r.forEach((function(e){"setTransition"!==e.command&&n[e.command].apply(n,e.args)})),this.stylesheet=t,!0},n.prototype.addImage=function(t,n){if(this.getImage(t))return this.fire(new e.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(t,n),this._availableImages=this.imageManager.listImages(),this._changedImages[t]=!0,this._changed=!0,this.fire(new e.Event("data",{dataType:"style"}))},n.prototype.updateImage=function(e,t){this.imageManager.updateImage(e,t)},n.prototype.getImage=function(e){return this.imageManager.getImage(e)},n.prototype.removeImage=function(t){if(!this.getImage(t))return this.fire(new e.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(t),this._availableImages=this.imageManager.listImages(),this._changedImages[t]=!0,this._changed=!0,this.fire(new e.Event("data",{dataType:"style"}))},n.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},n.prototype.addSource=function(t,n,r){var i=this;if(void 0===r&&(r={}),this._checkLoaded(),void 0!==this.sourceCaches[t])throw new Error("There is already a source with this ID");if(!n.type)throw new Error("The type property must be defined, but the only the following properties were given: "+Object.keys(n).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(n.type)>=0)||!this._validate(e.validateStyle.source,"sources."+t,n,null,r)){this.map&&this.map._collectResourceTiming&&(n.collectResourceTiming=!0);var a=this.sourceCaches[t]=new Ze(t,n,this.dispatcher);a.style=this,a.setEventedParent(this,(function(){return{isSourceLoaded:i.loaded(),source:a.serialize(),sourceId:t}})),a.onAdd(this.map),this._changed=!0}},n.prototype.removeSource=function(t){if(this._checkLoaded(),void 0===this.sourceCaches[t])throw new Error("There is no source with this ID");for(var n in this._layers)if(this._layers[n].source===t)return this.fire(new e.ErrorEvent(new Error('Source "'+t+'" cannot be removed while layer "'+n+'" is using it.')));var r=this.sourceCaches[t];delete this.sourceCaches[t],delete this._updatedSources[t],r.fire(new e.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:t})),r.setEventedParent(null),r.clearTiles(),r.onRemove&&r.onRemove(this.map),this._changed=!0},n.prototype.setGeoJSONSourceData=function(e,t){this._checkLoaded(),this.sourceCaches[e].getSource().setData(t),this._changed=!0},n.prototype.getSource=function(e){return this.sourceCaches[e]&&this.sourceCaches[e].getSource()},n.prototype.addLayer=function(t,n,r){void 0===r&&(r={}),this._checkLoaded();var i=t.id;if(this.getLayer(i))this.fire(new e.ErrorEvent(new Error('Layer with id "'+i+'" already exists on this map')));else{var a;if("custom"===t.type){if(fn(this,e.validateCustomStyleLayer(t)))return;a=e.createStyleLayer(t)}else{if("object"===typeof t.source&&(this.addSource(i,t.source),t=e.clone$1(t),t=e.extend(t,{source:i})),this._validate(e.validateStyle.layer,"layers."+i,t,{arrayIndex:-1},r))return;a=e.createStyleLayer(t),this._validateLayer(a),a.setEventedParent(this,{layer:{id:i}}),this._serializedLayers[a.id]=a.serialize()}var o=n?this._order.indexOf(n):this._order.length;if(n&&-1===o)this.fire(new e.ErrorEvent(new Error('Layer with id "'+n+'" does not exist on this map.')));else{if(this._order.splice(o,0,i),this._layerOrderChanged=!0,this._layers[i]=a,this._removedLayers[i]&&a.source&&"custom"!==a.type){var s=this._removedLayers[i];delete this._removedLayers[i],s.type!==a.type?this._updatedSources[a.source]="clear":(this._updatedSources[a.source]="reload",this.sourceCaches[a.source].pause())}this._updateLayer(a),a.onAdd&&a.onAdd(this.map)}}},n.prototype.moveLayer=function(t,n){if(this._checkLoaded(),this._changed=!0,this._layers[t]){if(t!==n){var r=this._order.indexOf(t);this._order.splice(r,1);var i=n?this._order.indexOf(n):this._order.length;n&&-1===i?this.fire(new e.ErrorEvent(new Error('Layer with id "'+n+'" does not exist on this map.'))):(this._order.splice(i,0,t),this._layerOrderChanged=!0)}}else this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be moved.")))},n.prototype.removeLayer=function(t){this._checkLoaded();var n=this._layers[t];if(n){n.setEventedParent(null);var r=this._order.indexOf(t);this._order.splice(r,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[t]=n,delete this._layers[t],delete this._serializedLayers[t],delete this._updatedLayers[t],delete this._updatedPaintProps[t],n.onRemove&&n.onRemove(this.map)}else this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be removed.")))},n.prototype.getLayer=function(e){return this._layers[e]},n.prototype.hasLayer=function(e){return e in this._layers},n.prototype.setLayerZoomRange=function(t,n,r){this._checkLoaded();var i=this.getLayer(t);i?i.minzoom===n&&i.maxzoom===r||(null!=n&&(i.minzoom=n),null!=r&&(i.maxzoom=r),this._updateLayer(i)):this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot have zoom extent.")))},n.prototype.setFilter=function(t,n,r){void 0===r&&(r={}),this._checkLoaded();var i=this.getLayer(t);if(i){if(!e.deepEqual(i.filter,n))return null===n||void 0===n?(i.filter=void 0,void this._updateLayer(i)):void(this._validate(e.validateStyle.filter,"layers."+i.id+".filter",n,null,r)||(i.filter=e.clone$1(n),this._updateLayer(i)))}else this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be filtered.")))},n.prototype.getFilter=function(t){return e.clone$1(this.getLayer(t).filter)},n.prototype.setLayoutProperty=function(t,n,r,i){void 0===i&&(i={}),this._checkLoaded();var a=this.getLayer(t);a?e.deepEqual(a.getLayoutProperty(n),r)||(a.setLayoutProperty(n,r,i),this._updateLayer(a)):this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be styled.")))},n.prototype.getLayoutProperty=function(t,n){var r=this.getLayer(t);if(r)return r.getLayoutProperty(n);this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style.")))},n.prototype.setPaintProperty=function(t,n,r,i){void 0===i&&(i={}),this._checkLoaded();var a=this.getLayer(t);a?e.deepEqual(a.getPaintProperty(n),r)||(a.setPaintProperty(n,r,i)&&this._updateLayer(a),this._changed=!0,this._updatedPaintProps[t]=!0):this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be styled.")))},n.prototype.getPaintProperty=function(e,t){return this.getLayer(e).getPaintProperty(t)},n.prototype.setFeatureState=function(t,n){this._checkLoaded();var r=t.source,i=t.sourceLayer,a=this.sourceCaches[r];if(void 0!==a){var o=a.getSource().type;"geojson"===o&&i?this.fire(new e.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==o||i?(void 0===t.id&&this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided."))),a.setFeatureState(i,t.id,n)):this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new e.ErrorEvent(new Error("The source '"+r+"' does not exist in the map's style.")))},n.prototype.removeFeatureState=function(t,n){this._checkLoaded();var r=t.source,i=this.sourceCaches[r];if(void 0!==i){var a=i.getSource().type,o="vector"===a?t.sourceLayer:void 0;"vector"!==a||o?n&&"string"!==typeof t.id&&"number"!==typeof t.id?this.fire(new e.ErrorEvent(new Error("A feature id is requred to remove its specific state property."))):i.removeFeatureState(o,t.id,n):this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new e.ErrorEvent(new Error("The source '"+r+"' does not exist in the map's style.")))},n.prototype.getFeatureState=function(t){this._checkLoaded();var n=t.source,r=t.sourceLayer,i=this.sourceCaches[n];if(void 0!==i){if("vector"!==i.getSource().type||r)return void 0===t.id&&this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided."))),i.getFeatureState(r,t.id);this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new e.ErrorEvent(new Error("The source '"+n+"' does not exist in the map's style.")))},n.prototype.getTransition=function(){return e.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},n.prototype.serialize=function(){return e.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:e.mapObject(this.sourceCaches,(function(e){return e.serialize()})),layers:this._serializeLayers(this._order)},(function(e){return void 0!==e}))},n.prototype._updateLayer=function(e){this._updatedLayers[e.id]=!0,e.source&&!this._updatedSources[e.source]&&"raster"!==this.sourceCaches[e.source].getSource().type&&(this._updatedSources[e.source]="reload",this.sourceCaches[e.source].pause()),this._changed=!0},n.prototype._flattenAndSortRenderedFeatures=function(e){for(var t=this,n=function(e){return"fill-extrusion"===t._layers[e].type},r={},i=[],a=this._order.length-1;a>=0;a--){var o=this._order[a];if(n(o)){r[o]=a;for(var s=0,l=e;s=0;p--){var m=this._order[p];if(n(m))for(var g=i.length-1;g>=0;g--){var v=i[g].feature;if(r[v.layer.id] 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}",Pn="attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}",On="varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}",Ln="attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}",In="uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}",zn="attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);}",Nn="#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_FragColor=color*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",Fn="attribute vec2 a_pos;uniform mat4 u_matrix;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);}",Bn="varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",jn="attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}",Un="uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",Vn="uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}",Hn="uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",Wn="uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}",Gn="varying vec4 v_color;void main() {gl_FragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",qn="uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}",Yn="uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",$n="uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\n? a_pos\n: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}",Xn="#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform float u_maxzoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggeration=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/ pow(2.0,(u_zoom-u_maxzoom)*exaggeration+19.2562-u_zoom);gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",Zn="uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}",Kn="uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;\n#define PI 3.141592653589793\nvoid main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",Jn="uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}",Qn="uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",er="\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}",tr="uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp float v_lineprogress;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,vec2(v_lineprogress,0.5));gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",nr="\n#define MAX_LINE_DISTANCE 32767.0\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_lineprogress;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_lineprogress=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0/MAX_LINE_DISTANCE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}",rr="uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",ir="\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}",ar="uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",or="\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}",sr="uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",lr="uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}",cr="uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",ur="const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}",dr="#define SDF_PX 8.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",hr="const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}",fr="#define SDF_PX 8.0\n#define SDF 1.0\n#define ICON 0.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\nreturn;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",pr="const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}",mr=Ur("#ifdef GL_ES\nprecision mediump float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif","#ifdef GL_ES\nprecision highp float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif\nvec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0\n);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}"),gr=Ur(xn,bn),vr=Ur(_n,wn),yr=Ur(An,Sn),xr=Ur(Mn,Tn),br=Ur(kn,En),_r=Ur(Cn,Dn),wr=Ur(Rn,Pn),Ar=Ur(On,Ln),Sr=Ur(In,zn),Mr=Ur(Nn,Fn),Tr=Ur(Bn,jn),kr=Ur(Un,Vn),Er=Ur(Hn,Wn),Cr=Ur(Gn,qn),Dr=Ur(Yn,$n),Rr=Ur(Xn,Zn),Pr=Ur(Kn,Jn),Or=Ur(Qn,er),Lr=Ur(tr,nr),Ir=Ur(rr,ir),zr=Ur(ar,or),Nr=Ur(sr,lr),Fr=Ur(cr,ur),Br=Ur(dr,hr),jr=Ur(fr,pr);function Ur(e,t){var n=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,r={};return{fragmentSource:e=e.replace(n,(function(e,t,n,i,a){return r[a]=!0,"define"===t?"\n#ifndef HAS_UNIFORM_u_"+a+"\nvarying "+n+" "+i+" "+a+";\n#else\nuniform "+n+" "+i+" u_"+a+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+a+"\n "+n+" "+i+" "+a+" = u_"+a+";\n#endif\n"})),vertexSource:t=t.replace(n,(function(e,t,n,i,a){var o="float"===i?"vec2":"vec4",s=a.match(/color/)?"color":o;return r[a]?"define"===t?"\n#ifndef HAS_UNIFORM_u_"+a+"\nuniform lowp float u_"+a+"_t;\nattribute "+n+" "+o+" a_"+a+";\nvarying "+n+" "+i+" "+a+";\n#else\nuniform "+n+" "+i+" u_"+a+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+a+"\n "+a+" = a_"+a+";\n#else\n "+n+" "+i+" "+a+" = u_"+a+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+a+"\n "+a+" = unpack_mix_"+s+"(a_"+a+", u_"+a+"_t);\n#else\n "+n+" "+i+" "+a+" = u_"+a+";\n#endif\n":"define"===t?"\n#ifndef HAS_UNIFORM_u_"+a+"\nuniform lowp float u_"+a+"_t;\nattribute "+n+" "+o+" a_"+a+";\n#else\nuniform "+n+" "+i+" u_"+a+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+a+"\n "+n+" "+i+" "+a+" = a_"+a+";\n#else\n "+n+" "+i+" "+a+" = u_"+a+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+a+"\n "+n+" "+i+" "+a+" = unpack_mix_"+s+"(a_"+a+", u_"+a+"_t);\n#else\n "+n+" "+i+" "+a+" = u_"+a+";\n#endif\n"}))}}var Vr=Object.freeze({__proto__:null,prelude:mr,background:gr,backgroundPattern:vr,circle:yr,clippingMask:xr,heatmap:br,heatmapTexture:_r,collisionBox:wr,collisionCircle:Ar,debug:Sr,fill:Mr,fillOutline:Tr,fillOutlinePattern:kr,fillPattern:Er,fillExtrusion:Cr,fillExtrusionPattern:Dr,hillshadePrepare:Rr,hillshade:Pr,line:Or,lineGradient:Lr,linePattern:Ir,lineSDF:zr,raster:Nr,symbolIcon:Fr,symbolSDF:Br,symbolTextAndIcon:jr}),Hr=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};Hr.prototype.bind=function(e,t,n,r,i,a,o,s){this.context=e;for(var l=this.boundPaintVertexBuffers.length!==r.length,c=0;!l&&c>16,s>>16],u_pixel_coord_lower:[65535&o,65535&s]}}function qr(e,t,n,r){var i=n.imageManager.getPattern(e.from.toString()),a=n.imageManager.getPattern(e.to.toString()),o=n.imageManager.getPixelSize(),s=o.width,l=o.height,c=Math.pow(2,r.tileID.overscaledZ),u=r.tileSize*Math.pow(2,n.transform.tileZoom)/c,d=u*(r.tileID.canonical.x+r.tileID.wrap*c),h=u*r.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:i.tl,u_pattern_br_a:i.br,u_pattern_tl_b:a.tl,u_pattern_br_b:a.br,u_texsize:[s,l],u_mix:t.t,u_pattern_size_a:i.displaySize,u_pattern_size_b:a.displaySize,u_scale_a:t.fromScale,u_scale_b:t.toScale,u_tile_units_to_pixels:1/Bt(r,1,n.transform.tileZoom),u_pixel_coord_upper:[d>>16,h>>16],u_pixel_coord_lower:[65535&d,65535&h]}}Wr.prototype.draw=function(e,t,n,r,i,a,o,s,l,c,u,d,h,f,p,m){var g,v=e.gl;if(!this.failedToCreate){for(var y in e.program.set(this.program),e.setDepthMode(n),e.setStencilMode(r),e.setColorMode(i),e.setCullFace(a),this.fixedUniforms)this.fixedUniforms[y].set(o[y]);f&&f.setUniforms(e,this.binderUniforms,d,{zoom:h});for(var x=(g={},g[v.LINES]=2,g[v.TRIANGLES]=3,g[v.LINE_STRIP]=1,g)[t],b=0,_=u.get();b<_.length;b+=1){var w=_[b],A=w.vaos||(w.vaos={});(A[s]||(A[s]=new Hr)).bind(e,this,l,f?f.getPaintVertexBuffers():[],c,w.vertexOffset,p,m),v.drawElements(t,w.primitiveLength*x,v.UNSIGNED_SHORT,w.primitiveOffset*x*2)}}};var Yr=function(t,n,r,i){var a=n.style.light,o=a.properties.get("position"),s=[o.x,o.y,o.z],l=e.create$1();"viewport"===a.properties.get("anchor")&&e.fromRotation(l,-n.transform.angle),e.transformMat3(s,s,l);var c=a.properties.get("color");return{u_matrix:t,u_lightpos:s,u_lightintensity:a.properties.get("intensity"),u_lightcolor:[c.r,c.g,c.b],u_vertical_gradient:+r,u_opacity:i}},$r=function(t,n,r,i,a,o,s){return e.extend(Yr(t,n,r,i),Gr(o,n,s),{u_height_factor:-Math.pow(2,a.overscaledZ)/s.tileSize/8})},Xr=function(e){return{u_matrix:e}},Zr=function(t,n,r,i){return e.extend(Xr(t),Gr(r,n,i))},Kr=function(e,t){return{u_matrix:e,u_world:t}},Jr=function(t,n,r,i,a){return e.extend(Zr(t,n,r,i),{u_world:a})},Qr=function(t,n,r,i){var a,o,s=t.transform;if("map"===i.paint.get("circle-pitch-alignment")){var l=Bt(r,1,s.zoom);a=!0,o=[l,l]}else a=!1,o=s.pixelsToGLUnits;return{u_camera_to_center_distance:s.cameraToCenterDistance,u_scale_with_map:+("map"===i.paint.get("circle-pitch-scale")),u_matrix:t.translatePosMatrix(n.posMatrix,r,i.paint.get("circle-translate"),i.paint.get("circle-translate-anchor")),u_pitch_with_map:+a,u_device_pixel_ratio:e.browser.devicePixelRatio,u_extrude_scale:o}},ei=function(e,t,n){var r=Bt(n,1,t.zoom),i=Math.pow(2,t.zoom-n.tileID.overscaledZ),a=n.tileID.overscaleFactor();return{u_matrix:e,u_camera_to_center_distance:t.cameraToCenterDistance,u_pixels_to_tile_units:r,u_extrude_scale:[t.pixelsToGLUnits[0]/(r*i),t.pixelsToGLUnits[1]/(r*i)],u_overscale_factor:a}},ti=function(e,t,n){return{u_matrix:e,u_inv_matrix:t,u_camera_to_center_distance:n.cameraToCenterDistance,u_viewport_size:[n.width,n.height]}},ni=function(e,t,n){return void 0===n&&(n=1),{u_matrix:e,u_color:t,u_overlay:0,u_overlay_scale:n}},ri=function(e){return{u_matrix:e}},ii=function(e,t,n,r){return{u_matrix:e,u_extrude_scale:Bt(t,1,n),u_intensity:r}},ai=function(t,n,r,i){var a=e.create();e.ortho(a,0,t.width,t.height,0,0,1);var o=t.context.gl;return{u_matrix:a,u_world:[o.drawingBufferWidth,o.drawingBufferHeight],u_image:r,u_color_ramp:i,u_opacity:n.paint.get("heatmap-opacity")}},oi=function(e,t,n){var r=n.paint.get("hillshade-shadow-color"),i=n.paint.get("hillshade-highlight-color"),a=n.paint.get("hillshade-accent-color"),o=n.paint.get("hillshade-illumination-direction")*(Math.PI/180);"viewport"===n.paint.get("hillshade-illumination-anchor")&&(o-=e.transform.angle);var s=!e.options.moving;return{u_matrix:e.transform.calculatePosMatrix(t.tileID.toUnwrapped(),s),u_image:0,u_latrange:li(e,t.tileID),u_light:[n.paint.get("hillshade-exaggeration"),o],u_shadow:r,u_highlight:i,u_accent:a}},si=function(t,n,r){var i=n.stride,a=e.create();return e.ortho(a,0,e.EXTENT,-e.EXTENT,0,0,1),e.translate(a,a,[0,-e.EXTENT,0]),{u_matrix:a,u_image:1,u_dimension:[i,i],u_zoom:t.overscaledZ,u_maxzoom:r,u_unpack:n.getUnpackVector()}};function li(t,n){var r=Math.pow(2,n.canonical.z),i=n.canonical.y;return[new e.MercatorCoordinate(0,i/r).toLngLat().lat,new e.MercatorCoordinate(0,(i+1)/r).toLngLat().lat]}var ci=function(t,n,r){var i=t.transform;return{u_matrix:pi(t,n,r),u_ratio:1/Bt(n,1,i.zoom),u_device_pixel_ratio:e.browser.devicePixelRatio,u_units_to_pixels:[1/i.pixelsToGLUnits[0],1/i.pixelsToGLUnits[1]]}},ui=function(t,n,r){return e.extend(ci(t,n,r),{u_image:0})},di=function(t,n,r,i){var a=t.transform,o=fi(n,a);return{u_matrix:pi(t,n,r),u_texsize:n.imageAtlasTexture.size,u_ratio:1/Bt(n,1,a.zoom),u_device_pixel_ratio:e.browser.devicePixelRatio,u_image:0,u_scale:[o,i.fromScale,i.toScale],u_fade:i.t,u_units_to_pixels:[1/a.pixelsToGLUnits[0],1/a.pixelsToGLUnits[1]]}},hi=function(t,n,r,i,a){var o=t.transform,s=t.lineAtlas,l=fi(n,o),c="round"===r.layout.get("line-cap"),u=s.getDash(i.from,c),d=s.getDash(i.to,c),h=u.width*a.fromScale,f=d.width*a.toScale;return e.extend(ci(t,n,r),{u_patternscale_a:[l/h,-u.height/2],u_patternscale_b:[l/f,-d.height/2],u_sdfgamma:s.width/(256*Math.min(h,f)*e.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:u.y,u_tex_y_b:d.y,u_mix:a.t})};function fi(e,t){return 1/Bt(e,1,t.tileZoom)}function pi(e,t,n){return e.translatePosMatrix(t.tileID.posMatrix,t,n.paint.get("line-translate"),n.paint.get("line-translate-anchor"))}var mi=function(e,t,n,r,i){return{u_matrix:e,u_tl_parent:t,u_scale_parent:n,u_buffer_scale:1,u_fade_t:r.mix,u_opacity:r.opacity*i.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:i.paint.get("raster-brightness-min"),u_brightness_high:i.paint.get("raster-brightness-max"),u_saturation_factor:yi(i.paint.get("raster-saturation")),u_contrast_factor:vi(i.paint.get("raster-contrast")),u_spin_weights:gi(i.paint.get("raster-hue-rotate"))}};function gi(e){e*=Math.PI/180;var t=Math.sin(e),n=Math.cos(e);return[(2*n+1)/3,(-Math.sqrt(3)*t-n+1)/3,(Math.sqrt(3)*t-n+1)/3]}function vi(e){return e>0?1/(1-e):1+e}function yi(e){return e>0?1-1/(1.001-e):-e}var xi,bi=function(e,t,n,r,i,a,o,s,l,c){var u=i.transform;return{u_is_size_zoom_constant:+("constant"===e||"source"===e),u_is_size_feature_constant:+("constant"===e||"camera"===e),u_size_t:t?t.uSizeT:0,u_size:t?t.uSize:0,u_camera_to_center_distance:u.cameraToCenterDistance,u_pitch:u.pitch/360*2*Math.PI,u_rotate_symbol:+n,u_aspect_ratio:u.width/u.height,u_fade_change:i.options.fadeDuration?i.symbolFadeChange:1,u_matrix:a,u_label_plane_matrix:o,u_coord_matrix:s,u_is_text:+l,u_pitch_with_map:+r,u_texsize:c,u_texture:0}},_i=function(t,n,r,i,a,o,s,l,c,u,d){var h=a.transform;return e.extend(bi(t,n,r,i,a,o,s,l,c,u),{u_gamma_scale:i?Math.cos(h._pitch)*h.cameraToCenterDistance:1,u_device_pixel_ratio:e.browser.devicePixelRatio,u_is_halo:+d})},wi=function(t,n,r,i,a,o,s,l,c,u){return e.extend(_i(t,n,r,i,a,o,s,l,!0,c,!0),{u_texsize_icon:u,u_texture_icon:1})},Ai=function(e,t,n){return{u_matrix:e,u_opacity:t,u_color:n}},Si=function(t,n,r,i,a,o){return e.extend(qr(i,o,r,a),{u_matrix:t,u_opacity:n})},Mi={fillExtrusion:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_lightpos:new e.Uniform3f(t,n.u_lightpos),u_lightintensity:new e.Uniform1f(t,n.u_lightintensity),u_lightcolor:new e.Uniform3f(t,n.u_lightcolor),u_vertical_gradient:new e.Uniform1f(t,n.u_vertical_gradient),u_opacity:new e.Uniform1f(t,n.u_opacity)}},fillExtrusionPattern:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_lightpos:new e.Uniform3f(t,n.u_lightpos),u_lightintensity:new e.Uniform1f(t,n.u_lightintensity),u_lightcolor:new e.Uniform3f(t,n.u_lightcolor),u_vertical_gradient:new e.Uniform1f(t,n.u_vertical_gradient),u_height_factor:new e.Uniform1f(t,n.u_height_factor),u_image:new e.Uniform1i(t,n.u_image),u_texsize:new e.Uniform2f(t,n.u_texsize),u_pixel_coord_upper:new e.Uniform2f(t,n.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,n.u_pixel_coord_lower),u_scale:new e.Uniform3f(t,n.u_scale),u_fade:new e.Uniform1f(t,n.u_fade),u_opacity:new e.Uniform1f(t,n.u_opacity)}},fill:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix)}},fillPattern:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_image:new e.Uniform1i(t,n.u_image),u_texsize:new e.Uniform2f(t,n.u_texsize),u_pixel_coord_upper:new e.Uniform2f(t,n.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,n.u_pixel_coord_lower),u_scale:new e.Uniform3f(t,n.u_scale),u_fade:new e.Uniform1f(t,n.u_fade)}},fillOutline:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_world:new e.Uniform2f(t,n.u_world)}},fillOutlinePattern:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_world:new e.Uniform2f(t,n.u_world),u_image:new e.Uniform1i(t,n.u_image),u_texsize:new e.Uniform2f(t,n.u_texsize),u_pixel_coord_upper:new e.Uniform2f(t,n.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,n.u_pixel_coord_lower),u_scale:new e.Uniform3f(t,n.u_scale),u_fade:new e.Uniform1f(t,n.u_fade)}},circle:function(t,n){return{u_camera_to_center_distance:new e.Uniform1f(t,n.u_camera_to_center_distance),u_scale_with_map:new e.Uniform1i(t,n.u_scale_with_map),u_pitch_with_map:new e.Uniform1i(t,n.u_pitch_with_map),u_extrude_scale:new e.Uniform2f(t,n.u_extrude_scale),u_device_pixel_ratio:new e.Uniform1f(t,n.u_device_pixel_ratio),u_matrix:new e.UniformMatrix4f(t,n.u_matrix)}},collisionBox:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_camera_to_center_distance:new e.Uniform1f(t,n.u_camera_to_center_distance),u_pixels_to_tile_units:new e.Uniform1f(t,n.u_pixels_to_tile_units),u_extrude_scale:new e.Uniform2f(t,n.u_extrude_scale),u_overscale_factor:new e.Uniform1f(t,n.u_overscale_factor)}},collisionCircle:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_inv_matrix:new e.UniformMatrix4f(t,n.u_inv_matrix),u_camera_to_center_distance:new e.Uniform1f(t,n.u_camera_to_center_distance),u_viewport_size:new e.Uniform2f(t,n.u_viewport_size)}},debug:function(t,n){return{u_color:new e.UniformColor(t,n.u_color),u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_overlay:new e.Uniform1i(t,n.u_overlay),u_overlay_scale:new e.Uniform1f(t,n.u_overlay_scale)}},clippingMask:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix)}},heatmap:function(t,n){return{u_extrude_scale:new e.Uniform1f(t,n.u_extrude_scale),u_intensity:new e.Uniform1f(t,n.u_intensity),u_matrix:new e.UniformMatrix4f(t,n.u_matrix)}},heatmapTexture:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_world:new e.Uniform2f(t,n.u_world),u_image:new e.Uniform1i(t,n.u_image),u_color_ramp:new e.Uniform1i(t,n.u_color_ramp),u_opacity:new e.Uniform1f(t,n.u_opacity)}},hillshade:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_image:new e.Uniform1i(t,n.u_image),u_latrange:new e.Uniform2f(t,n.u_latrange),u_light:new e.Uniform2f(t,n.u_light),u_shadow:new e.UniformColor(t,n.u_shadow),u_highlight:new e.UniformColor(t,n.u_highlight),u_accent:new e.UniformColor(t,n.u_accent)}},hillshadePrepare:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_image:new e.Uniform1i(t,n.u_image),u_dimension:new e.Uniform2f(t,n.u_dimension),u_zoom:new e.Uniform1f(t,n.u_zoom),u_maxzoom:new e.Uniform1f(t,n.u_maxzoom),u_unpack:new e.Uniform4f(t,n.u_unpack)}},line:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_ratio:new e.Uniform1f(t,n.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,n.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(t,n.u_units_to_pixels)}},lineGradient:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_ratio:new e.Uniform1f(t,n.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,n.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(t,n.u_units_to_pixels),u_image:new e.Uniform1i(t,n.u_image)}},linePattern:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_texsize:new e.Uniform2f(t,n.u_texsize),u_ratio:new e.Uniform1f(t,n.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,n.u_device_pixel_ratio),u_image:new e.Uniform1i(t,n.u_image),u_units_to_pixels:new e.Uniform2f(t,n.u_units_to_pixels),u_scale:new e.Uniform3f(t,n.u_scale),u_fade:new e.Uniform1f(t,n.u_fade)}},lineSDF:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_ratio:new e.Uniform1f(t,n.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,n.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(t,n.u_units_to_pixels),u_patternscale_a:new e.Uniform2f(t,n.u_patternscale_a),u_patternscale_b:new e.Uniform2f(t,n.u_patternscale_b),u_sdfgamma:new e.Uniform1f(t,n.u_sdfgamma),u_image:new e.Uniform1i(t,n.u_image),u_tex_y_a:new e.Uniform1f(t,n.u_tex_y_a),u_tex_y_b:new e.Uniform1f(t,n.u_tex_y_b),u_mix:new e.Uniform1f(t,n.u_mix)}},raster:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_tl_parent:new e.Uniform2f(t,n.u_tl_parent),u_scale_parent:new e.Uniform1f(t,n.u_scale_parent),u_buffer_scale:new e.Uniform1f(t,n.u_buffer_scale),u_fade_t:new e.Uniform1f(t,n.u_fade_t),u_opacity:new e.Uniform1f(t,n.u_opacity),u_image0:new e.Uniform1i(t,n.u_image0),u_image1:new e.Uniform1i(t,n.u_image1),u_brightness_low:new e.Uniform1f(t,n.u_brightness_low),u_brightness_high:new e.Uniform1f(t,n.u_brightness_high),u_saturation_factor:new e.Uniform1f(t,n.u_saturation_factor),u_contrast_factor:new e.Uniform1f(t,n.u_contrast_factor),u_spin_weights:new e.Uniform3f(t,n.u_spin_weights)}},symbolIcon:function(t,n){return{u_is_size_zoom_constant:new e.Uniform1i(t,n.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(t,n.u_is_size_feature_constant),u_size_t:new e.Uniform1f(t,n.u_size_t),u_size:new e.Uniform1f(t,n.u_size),u_camera_to_center_distance:new e.Uniform1f(t,n.u_camera_to_center_distance),u_pitch:new e.Uniform1f(t,n.u_pitch),u_rotate_symbol:new e.Uniform1i(t,n.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(t,n.u_aspect_ratio),u_fade_change:new e.Uniform1f(t,n.u_fade_change),u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(t,n.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(t,n.u_coord_matrix),u_is_text:new e.Uniform1i(t,n.u_is_text),u_pitch_with_map:new e.Uniform1i(t,n.u_pitch_with_map),u_texsize:new e.Uniform2f(t,n.u_texsize),u_texture:new e.Uniform1i(t,n.u_texture)}},symbolSDF:function(t,n){return{u_is_size_zoom_constant:new e.Uniform1i(t,n.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(t,n.u_is_size_feature_constant),u_size_t:new e.Uniform1f(t,n.u_size_t),u_size:new e.Uniform1f(t,n.u_size),u_camera_to_center_distance:new e.Uniform1f(t,n.u_camera_to_center_distance),u_pitch:new e.Uniform1f(t,n.u_pitch),u_rotate_symbol:new e.Uniform1i(t,n.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(t,n.u_aspect_ratio),u_fade_change:new e.Uniform1f(t,n.u_fade_change),u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(t,n.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(t,n.u_coord_matrix),u_is_text:new e.Uniform1i(t,n.u_is_text),u_pitch_with_map:new e.Uniform1i(t,n.u_pitch_with_map),u_texsize:new e.Uniform2f(t,n.u_texsize),u_texture:new e.Uniform1i(t,n.u_texture),u_gamma_scale:new e.Uniform1f(t,n.u_gamma_scale),u_device_pixel_ratio:new e.Uniform1f(t,n.u_device_pixel_ratio),u_is_halo:new e.Uniform1i(t,n.u_is_halo)}},symbolTextAndIcon:function(t,n){return{u_is_size_zoom_constant:new e.Uniform1i(t,n.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(t,n.u_is_size_feature_constant),u_size_t:new e.Uniform1f(t,n.u_size_t),u_size:new e.Uniform1f(t,n.u_size),u_camera_to_center_distance:new e.Uniform1f(t,n.u_camera_to_center_distance),u_pitch:new e.Uniform1f(t,n.u_pitch),u_rotate_symbol:new e.Uniform1i(t,n.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(t,n.u_aspect_ratio),u_fade_change:new e.Uniform1f(t,n.u_fade_change),u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(t,n.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(t,n.u_coord_matrix),u_is_text:new e.Uniform1i(t,n.u_is_text),u_pitch_with_map:new e.Uniform1i(t,n.u_pitch_with_map),u_texsize:new e.Uniform2f(t,n.u_texsize),u_texsize_icon:new e.Uniform2f(t,n.u_texsize_icon),u_texture:new e.Uniform1i(t,n.u_texture),u_texture_icon:new e.Uniform1i(t,n.u_texture_icon),u_gamma_scale:new e.Uniform1f(t,n.u_gamma_scale),u_device_pixel_ratio:new e.Uniform1f(t,n.u_device_pixel_ratio),u_is_halo:new e.Uniform1i(t,n.u_is_halo)}},background:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_opacity:new e.Uniform1f(t,n.u_opacity),u_color:new e.UniformColor(t,n.u_color)}},backgroundPattern:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_opacity:new e.Uniform1f(t,n.u_opacity),u_image:new e.Uniform1i(t,n.u_image),u_pattern_tl_a:new e.Uniform2f(t,n.u_pattern_tl_a),u_pattern_br_a:new e.Uniform2f(t,n.u_pattern_br_a),u_pattern_tl_b:new e.Uniform2f(t,n.u_pattern_tl_b),u_pattern_br_b:new e.Uniform2f(t,n.u_pattern_br_b),u_texsize:new e.Uniform2f(t,n.u_texsize),u_mix:new e.Uniform1f(t,n.u_mix),u_pattern_size_a:new e.Uniform2f(t,n.u_pattern_size_a),u_pattern_size_b:new e.Uniform2f(t,n.u_pattern_size_b),u_scale_a:new e.Uniform1f(t,n.u_scale_a),u_scale_b:new e.Uniform1f(t,n.u_scale_b),u_pixel_coord_upper:new e.Uniform2f(t,n.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,n.u_pixel_coord_lower),u_tile_units_to_pixels:new e.Uniform1f(t,n.u_tile_units_to_pixels)}}};function Ti(t,n,r,i,a,o,s){for(var l=t.context,c=l.gl,u=t.useProgram("collisionBox"),d=[],h=0,f=0,p=0;p0){var _=e.create(),w=y;e.mul(_,v.placementInvProjMatrix,t.transform.glCoordMatrix),e.mul(_,_,v.placementViewportMatrix),d.push({circleArray:b,circleOffset:f,transform:w,invTransform:_}),f=h+=b.length/4}x&&u.draw(l,c.LINES,Fe.disabled,Ue.disabled,t.colorModeForRenderPass(),$e.disabled,ei(y,t.transform,g),r.id,x.layoutVertexBuffer,x.indexBuffer,x.segments,null,t.transform.zoom,null,null,x.collisionVertexBuffer)}}if(s&&d.length){var A=t.useProgram("collisionCircle"),S=new e.StructArrayLayout2f1f2i16;S.resize(4*h),S._trim();for(var M=0,T=0,k=d;T=0&&(m[v.associatedIconIndex]={shiftedAnchor:k,angle:E})}else It(v.numGlyphs,f)}if(d){p.clear();for(var D=t.icon.placedSymbolArray,R=0;R0){var s=e.browser.now(),l=(s-t.timeAdded)/o,c=n?(s-n.timeAdded)/o:-1,u=r.getSource(),d=a.coveringZoomLevel({tileSize:u.tileSize,roundZoom:u.roundZoom}),h=!n||Math.abs(n.tileID.overscaledZ-d)>Math.abs(t.tileID.overscaledZ-d),f=h&&t.refreshedUponExpiration?1:e.clamp(h?l:1-c,0,1);return t.refreshedUponExpiration&&l>=1&&(t.refreshedUponExpiration=!1),n?{opacity:1,mix:1-f}:{opacity:f,mix:0}}return{opacity:1,mix:0}}function Ki(e,t,n){var r=n.paint.get("background-color"),i=n.paint.get("background-opacity");if(0!==i){var a=e.context,o=a.gl,s=e.transform,l=s.tileSize,c=n.paint.get("background-pattern");if(!e.isPatternMissing(c)){var u=!c&&1===r.a&&1===i&&e.opaquePassEnabledForLayer()?"opaque":"translucent";if(e.renderPass===u){var d=Ue.disabled,h=e.depthModeForSublayer(0,"opaque"===u?Fe.ReadWrite:Fe.ReadOnly),f=e.colorModeForRenderPass(),p=e.useProgram(c?"backgroundPattern":"background"),m=s.coveringTiles({tileSize:l});c&&(a.activeTexture.set(o.TEXTURE0),e.imageManager.bind(e.context));for(var g=n.getCrossfadeParameters(),v=0,y=m;v "+r.overscaledZ),ua(t,v+" "+p+"kb"),s.draw(i,a.TRIANGLES,l,c,Ge.alphaBlended,$e.disabled,ni(o,e.Color.transparent,g),d,t.debugBuffer,t.quadTriangleIndexBuffer,t.debugSegments)}function ua(e,t){e.initDebugOverlayCanvas();var n=e.debugOverlayCanvas,r=e.context.gl,i=e.debugOverlayCanvas.getContext("2d");i.clearRect(0,0,n.width,n.height),i.shadowColor="white",i.shadowBlur=2,i.lineWidth=1.5,i.strokeStyle="white",i.textBaseline="top",i.font="bold 36px Open Sans, sans-serif",i.fillText(t,5,5),i.strokeText(t,5,5),e.debugOverlayTexture.update(n),e.debugOverlayTexture.bind(r.LINEAR,r.CLAMP_TO_EDGE)}function da(e,t,n){var r=e.context,i=n.implementation;if("offscreen"===e.renderPass){var a=i.prerender;a&&(e.setCustomLayerDefaults(),r.setColorMode(e.colorModeForRenderPass()),a.call(i,r.gl,e.transform.customLayerMatrix()),r.setDirty(),e.setBaseState())}else if("translucent"===e.renderPass){e.setCustomLayerDefaults(),r.setColorMode(e.colorModeForRenderPass()),r.setStencilMode(Ue.disabled);var o="3d"===i.renderingMode?new Fe(e.context.gl.LEQUAL,Fe.ReadWrite,e.depthRangeFor3D):e.depthModeForSublayer(0,Fe.ReadOnly);r.setDepthMode(o),i.render(r.gl,e.transform.customLayerMatrix()),r.setDirty(),e.setBaseState(),r.bindFramebuffer.set(null)}}var ha={symbol:Ci,circle:zi,heatmap:Ni,line:Ui,fill:Vi,"fill-extrusion":Wi,hillshade:qi,raster:Xi,background:Ki,debug:la,custom:da},fa=function(e,t){this.context=new Xe(e),this.transform=t,this._tileTextures={},this.setup(),this.numSublayers=Ze.maxUnderzooming+Ze.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new hn,this.gpuTimers={}};fa.prototype.resize=function(t,n){if(this.width=t*e.browser.devicePixelRatio,this.height=n*e.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var r=0,i=this.style._order;r256&&this.clearStencil(),n.setColorMode(Ge.disabled),n.setDepthMode(Fe.disabled);var i=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var a=0,o=t;a256&&this.clearStencil();var e=this.nextStencilID++,t=this.context.gl;return new Ue({func:t.NOTEQUAL,mask:255},e,255,t.KEEP,t.KEEP,t.REPLACE)},fa.prototype.stencilModeForClipping=function(e){var t=this.context.gl;return new Ue({func:t.EQUAL,mask:255},this._tileClippingMaskIDs[e.key],0,t.KEEP,t.KEEP,t.REPLACE)},fa.prototype.stencilConfigForOverlap=function(e){var t,n=this.context.gl,r=e.sort((function(e,t){return t.overscaledZ-e.overscaledZ})),i=r[r.length-1].overscaledZ,a=r[0].overscaledZ-i+1;if(a>1){this.currentStencilSource=void 0,this.nextStencilID+a>256&&this.clearStencil();for(var o={},s=0;s=0;this.currentLayer--){var w=this.style._layers[i[this.currentLayer]],A=a[w.source],S=u[w.source];this._renderTileClippingMasks(w,S),this.renderLayer(this,A,w,S)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?t.pop():null},fa.prototype.isPatternMissing=function(e){if(!e)return!1;if(!e.from||!e.to)return!0;var t=this.imageManager.getPattern(e.from.toString()),n=this.imageManager.getPattern(e.to.toString());return!t||!n},fa.prototype.useProgram=function(e,t){this.cache=this.cache||{};var n=""+e+(t?t.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[n]||(this.cache[n]=new Wr(this.context,Vr[e],t,Mi[e],this._showOverdrawInspector)),this.cache[n]},fa.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},fa.prototype.setBaseState=function(){var e=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(e.FUNC_ADD)},fa.prototype.initDebugOverlayCanvas=function(){if(null==this.debugOverlayCanvas){this.debugOverlayCanvas=e.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var t=this.context.gl;this.debugOverlayTexture=new e.Texture(this.context,this.debugOverlayCanvas,t.RGBA)}},fa.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var pa=function(e,t){this.points=e,this.planes=t};pa.fromInvProjectionMatrix=function(t,n,r){var i=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]],a=Math.pow(2,r),o=i.map((function(n){return e.transformMat4([],n,t)})).map((function(t){return e.scale$1([],t,1/t[3]/n*a)})),s=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map((function(t){var n=e.sub([],o[t[0]],o[t[1]]),r=e.sub([],o[t[2]],o[t[1]]),i=e.normalize([],e.cross([],n,r)),a=-e.dot(i,o[t[1]]);return i.concat(a)}));return new pa(o,s)};var ma=function(t,n){this.min=t,this.max=n,this.center=e.scale$2([],e.add([],this.min,this.max),.5)};ma.prototype.quadrant=function(t){for(var n=[t%2===0,t<2],r=e.clone$2(this.min),i=e.clone$2(this.max),a=0;a=0;if(0===o)return 0;o!==n.length&&(r=!1)}if(r)return 2;for(var l=0;l<3;l++){for(var c=Number.MAX_VALUE,u=-Number.MAX_VALUE,d=0;dthis.max[l]-this.min[l])return 0}return 1};var ga=function(e,t,n,r){if(void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),void 0===r&&(r=0),isNaN(e)||e<0||isNaN(t)||t<0||isNaN(n)||n<0||isNaN(r)||r<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=e,this.bottom=t,this.left=n,this.right=r};ga.prototype.interpolate=function(t,n,r){return null!=n.top&&null!=t.top&&(this.top=e.number(t.top,n.top,r)),null!=n.bottom&&null!=t.bottom&&(this.bottom=e.number(t.bottom,n.bottom,r)),null!=n.left&&null!=t.left&&(this.left=e.number(t.left,n.left,r)),null!=n.right&&null!=t.right&&(this.right=e.number(t.right,n.right,r)),this},ga.prototype.getCenter=function(t,n){var r=e.clamp((this.left+t-this.right)/2,0,t),i=e.clamp((this.top+n-this.bottom)/2,0,n);return new e.Point(r,i)},ga.prototype.equals=function(e){return this.top===e.top&&this.bottom===e.bottom&&this.left===e.left&&this.right===e.right},ga.prototype.clone=function(){return new ga(this.top,this.bottom,this.left,this.right)},ga.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var va=function(t,n,r,i,a){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===a||a,this._minZoom=t||0,this._maxZoom=n||22,this._minPitch=void 0===r||null===r?0:r,this._maxPitch=void 0===i||null===i?60:i,this.setMaxBounds(),this.width=0,this.height=0,this._center=new e.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new ga,this._posMatrixCache={},this._alignedPosMatrixCache={}},ya={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};function xa(e,t){var n=!1,r=null,i=function(){r=null,n&&(e(),r=setTimeout(i,t),n=!1)};return function(){return n=!0,r||i(),r}}va.prototype.clone=function(){var e=new va(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return e.tileSize=this.tileSize,e.latRange=this.latRange,e.width=this.width,e.height=this.height,e._center=this._center,e.zoom=this.zoom,e.angle=this.angle,e._fov=this._fov,e._pitch=this._pitch,e._unmodified=this._unmodified,e._edgeInsets=this._edgeInsets.clone(),e._calcMatrices(),e},ya.minZoom.get=function(){return this._minZoom},ya.minZoom.set=function(e){this._minZoom!==e&&(this._minZoom=e,this.zoom=Math.max(this.zoom,e))},ya.maxZoom.get=function(){return this._maxZoom},ya.maxZoom.set=function(e){this._maxZoom!==e&&(this._maxZoom=e,this.zoom=Math.min(this.zoom,e))},ya.minPitch.get=function(){return this._minPitch},ya.minPitch.set=function(e){this._minPitch!==e&&(this._minPitch=e,this.pitch=Math.max(this.pitch,e))},ya.maxPitch.get=function(){return this._maxPitch},ya.maxPitch.set=function(e){this._maxPitch!==e&&(this._maxPitch=e,this.pitch=Math.min(this.pitch,e))},ya.renderWorldCopies.get=function(){return this._renderWorldCopies},ya.renderWorldCopies.set=function(e){void 0===e?e=!0:null===e&&(e=!1),this._renderWorldCopies=e},ya.worldSize.get=function(){return this.tileSize*this.scale},ya.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},ya.size.get=function(){return new e.Point(this.width,this.height)},ya.bearing.get=function(){return-this.angle/Math.PI*180},ya.bearing.set=function(t){var n=-e.wrap(t,-180,180)*Math.PI/180;this.angle!==n&&(this._unmodified=!1,this.angle=n,this._calcMatrices(),this.rotationMatrix=e.create$2(),e.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},ya.pitch.get=function(){return this._pitch/Math.PI*180},ya.pitch.set=function(t){var n=e.clamp(t,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==n&&(this._unmodified=!1,this._pitch=n,this._calcMatrices())},ya.fov.get=function(){return this._fov/Math.PI*180},ya.fov.set=function(e){e=Math.max(.01,Math.min(60,e)),this._fov!==e&&(this._unmodified=!1,this._fov=e/180*Math.PI,this._calcMatrices())},ya.zoom.get=function(){return this._zoom},ya.zoom.set=function(e){var t=Math.min(Math.max(e,this.minZoom),this.maxZoom);this._zoom!==t&&(this._unmodified=!1,this._zoom=t,this.scale=this.zoomScale(t),this.tileZoom=Math.floor(t),this.zoomFraction=t-this.tileZoom,this._constrain(),this._calcMatrices())},ya.center.get=function(){return this._center},ya.center.set=function(e){e.lat===this._center.lat&&e.lng===this._center.lng||(this._unmodified=!1,this._center=e,this._constrain(),this._calcMatrices())},ya.padding.get=function(){return this._edgeInsets.toJSON()},ya.padding.set=function(e){this._edgeInsets.equals(e)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,e,1),this._calcMatrices())},ya.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},va.prototype.isPaddingEqual=function(e){return this._edgeInsets.equals(e)},va.prototype.interpolatePadding=function(e,t,n){this._unmodified=!1,this._edgeInsets.interpolate(e,t,n),this._constrain(),this._calcMatrices()},va.prototype.coveringZoomLevel=function(e){var t=(e.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/e.tileSize));return Math.max(0,t)},va.prototype.getVisibleUnwrappedCoordinates=function(t){var n=[new e.UnwrappedTileID(0,t)];if(this._renderWorldCopies)for(var r=this.pointCoordinate(new e.Point(0,0)),i=this.pointCoordinate(new e.Point(this.width,0)),a=this.pointCoordinate(new e.Point(this.width,this.height)),o=this.pointCoordinate(new e.Point(0,this.height)),s=Math.floor(Math.min(r.x,i.x,a.x,o.x)),l=Math.floor(Math.max(r.x,i.x,a.x,o.x)),c=1,u=s-c;u<=l+c;u++)0!==u&&n.push(new e.UnwrappedTileID(u,t));return n},va.prototype.coveringTiles=function(t){var n=this.coveringZoomLevel(t),r=n;if(void 0!==t.minzoom&&nt.maxzoom&&(n=t.maxzoom);var i=e.MercatorCoordinate.fromLngLat(this.center),a=Math.pow(2,n),o=[a*i.x,a*i.y,0],s=pa.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,n),l=t.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(l=n);var c=3,u=function(e){return{aabb:new ma([e*a,0,0],[(e+1)*a,a,0]),zoom:0,x:0,y:0,wrap:e,fullyVisible:!1}},d=[],h=[],f=n,p=t.reparseOverscaled?r:n;if(this._renderWorldCopies)for(var m=1;m<=3;m++)d.push(u(-m)),d.push(u(m));for(d.push(u(0));d.length>0;){var g=d.pop(),v=g.x,y=g.y,x=g.fullyVisible;if(!x){var b=g.aabb.intersects(s);if(0===b)continue;x=2===b}var _=g.aabb.distanceX(o),w=g.aabb.distanceY(o),A=Math.max(Math.abs(_),Math.abs(w)),S=c+(1<S&&g.zoom>=l)h.push({tileID:new e.OverscaledTileID(g.zoom===f?p:g.zoom,g.wrap,g.zoom,v,y),distanceSq:e.sqrLen([o[0]-.5-v,o[1]-.5-y])});else for(var M=0;M<4;M++){var T=(v<<1)+M%2,k=(y<<1)+(M>>1);d.push({aabb:g.aabb.quadrant(M),zoom:g.zoom+1,x:T,y:k,wrap:g.wrap,fullyVisible:x})}}return h.sort((function(e,t){return e.distanceSq-t.distanceSq})).map((function(e){return e.tileID}))},va.prototype.resize=function(e,t){this.width=e,this.height=t,this.pixelsToGLUnits=[2/e,-2/t],this._constrain(),this._calcMatrices()},ya.unmodified.get=function(){return this._unmodified},va.prototype.zoomScale=function(e){return Math.pow(2,e)},va.prototype.scaleZoom=function(e){return Math.log(e)/Math.LN2},va.prototype.project=function(t){var n=e.clamp(t.lat,-this.maxValidLatitude,this.maxValidLatitude);return new e.Point(e.mercatorXfromLng(t.lng)*this.worldSize,e.mercatorYfromLat(n)*this.worldSize)},va.prototype.unproject=function(t){return new e.MercatorCoordinate(t.x/this.worldSize,t.y/this.worldSize).toLngLat()},ya.point.get=function(){return this.project(this.center)},va.prototype.setLocationAtPoint=function(t,n){var r=this.pointCoordinate(n),i=this.pointCoordinate(this.centerPoint),a=this.locationCoordinate(t),o=new e.MercatorCoordinate(a.x-(r.x-i.x),a.y-(r.y-i.y));this.center=this.coordinateLocation(o),this._renderWorldCopies&&(this.center=this.center.wrap())},va.prototype.locationPoint=function(e){return this.coordinatePoint(this.locationCoordinate(e))},va.prototype.pointLocation=function(e){return this.coordinateLocation(this.pointCoordinate(e))},va.prototype.locationCoordinate=function(t){return e.MercatorCoordinate.fromLngLat(t)},va.prototype.coordinateLocation=function(e){return e.toLngLat()},va.prototype.pointCoordinate=function(t){var n=0,r=[t.x,t.y,0,1],i=[t.x,t.y,1,1];e.transformMat4(r,r,this.pixelMatrixInverse),e.transformMat4(i,i,this.pixelMatrixInverse);var a=r[3],o=i[3],s=r[0]/a,l=i[0]/o,c=r[1]/a,u=i[1]/o,d=r[2]/a,h=i[2]/o,f=d===h?0:(n-d)/(h-d);return new e.MercatorCoordinate(e.number(s,l,f)/this.worldSize,e.number(c,u,f)/this.worldSize)},va.prototype.coordinatePoint=function(t){var n=[t.x*this.worldSize,t.y*this.worldSize,0,1];return e.transformMat4(n,n,this.pixelMatrix),new e.Point(n[0]/n[3],n[1]/n[3])},va.prototype.getBounds=function(){return(new e.LngLatBounds).extend(this.pointLocation(new e.Point(0,0))).extend(this.pointLocation(new e.Point(this.width,0))).extend(this.pointLocation(new e.Point(this.width,this.height))).extend(this.pointLocation(new e.Point(0,this.height)))},va.prototype.getMaxBounds=function(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new e.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},va.prototype.setMaxBounds=function(e){e?(this.lngRange=[e.getWest(),e.getEast()],this.latRange=[e.getSouth(),e.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},va.prototype.calculatePosMatrix=function(t,n){void 0===n&&(n=!1);var r=t.key,i=n?this._alignedPosMatrixCache:this._posMatrixCache;if(i[r])return i[r];var a=t.canonical,o=this.worldSize/this.zoomScale(a.z),s=a.x+Math.pow(2,a.z)*t.wrap,l=e.identity(new Float64Array(16));return e.translate(l,l,[s*o,a.y*o,0]),e.scale(l,l,[o/e.EXTENT,o/e.EXTENT,1]),e.multiply(l,n?this.alignedProjMatrix:this.projMatrix,l),i[r]=new Float32Array(l),i[r]},va.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},va.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var t,n,r,i,a=-90,o=90,s=-180,l=180,c=this.size,u=this._unmodified;if(this.latRange){var d=this.latRange;a=e.mercatorYfromLat(d[1])*this.worldSize,t=(o=e.mercatorYfromLat(d[0])*this.worldSize)-ao&&(i=o-g)}if(this.lngRange){var v=f.x,y=c.x/2;v-yl&&(r=l-y)}void 0===r&&void 0===i||(this.center=this.unproject(new e.Point(void 0!==r?r:f.x,void 0!==i?i:f.y))),this._unmodified=u,this._constraining=!1}},va.prototype._calcMatrices=function(){if(this.height){var t=this._fov/2,n=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(t)*this.height;var r=Math.PI/2+this._pitch,i=this._fov*(.5+n.y/this.height),a=Math.sin(i)*this.cameraToCenterDistance/Math.sin(e.clamp(Math.PI-r-i,.01,Math.PI-.01)),o=this.point,s=o.x,l=o.y,c=1.01*(Math.cos(Math.PI/2-this._pitch)*a+this.cameraToCenterDistance),u=this.height/50,d=new Float64Array(16);e.perspective(d,this._fov,this.width/this.height,u,c),d[8]=2*-n.x/this.width,d[9]=2*n.y/this.height,e.scale(d,d,[1,-1,1]),e.translate(d,d,[0,0,-this.cameraToCenterDistance]),e.rotateX(d,d,this._pitch),e.rotateZ(d,d,this.angle),e.translate(d,d,[-s,-l,0]),this.mercatorMatrix=e.scale([],d,[this.worldSize,this.worldSize,this.worldSize]),e.scale(d,d,[1,1,e.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=d,this.invProjMatrix=e.invert([],this.projMatrix);var h=this.width%2/2,f=this.height%2/2,p=Math.cos(this.angle),m=Math.sin(this.angle),g=s-Math.round(s)+p*h+m*f,v=l-Math.round(l)+p*f+m*h,y=new Float64Array(d);if(e.translate(y,y,[g>.5?g-1:g,v>.5?v-1:v,0]),this.alignedProjMatrix=y,d=e.create(),e.scale(d,d,[this.width/2,-this.height/2,1]),e.translate(d,d,[1,-1,0]),this.labelPlaneMatrix=d,d=e.create(),e.scale(d,d,[1,-1,1]),e.translate(d,d,[-1,-1,0]),e.scale(d,d,[2/this.width,2/this.height,1]),this.glCoordMatrix=d,this.pixelMatrix=e.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(d=e.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=d,this._posMatrixCache={},this._alignedPosMatrixCache={}}},va.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var t=this.pointCoordinate(new e.Point(0,0)),n=[t.x*this.worldSize,t.y*this.worldSize,0,1];return e.transformMat4(n,n,this.pixelMatrix)[3]/this.cameraToCenterDistance},va.prototype.getCameraPoint=function(){var t=this._pitch,n=Math.tan(t)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.Point(0,n))},va.prototype.getCameraQueryGeometry=function(t){var n=this.getCameraPoint();if(1===t.length)return[t[0],n];for(var r=n.x,i=n.y,a=n.x,o=n.y,s=0,l=t;s=3&&!e.some((function(e){return isNaN(e)}))){var t=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(e[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+e[2],+e[1]],zoom:+e[0],bearing:t,pitch:+(e[4]||0)}),!0}return!1},ba.prototype._updateHashUnthrottled=function(){var t=this.getHashString();try{e.window.history.replaceState(e.window.history.state,"",t)}catch(n){}};var _a={linearity:.3,easing:e.bezier(0,0,.3,1)},wa=e.extend({deceleration:2500,maxSpeed:1400},_a),Aa=e.extend({deceleration:20,maxSpeed:1400},_a),Sa=e.extend({deceleration:1e3,maxSpeed:360},_a),Ma=e.extend({deceleration:1e3,maxSpeed:90},_a),Ta=function(e){this._map=e,this.clear()};function ka(e,t){(!e.duration||e.duration0&&n-t[0].time>r;)t.shift()},Ta.prototype._onMoveEnd=function(t){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var n={zoom:0,bearing:0,pitch:0,pan:new e.Point(0,0),pinchAround:void 0,around:void 0},r=0,i=this._inertiaBuffer;r=this._clickTolerance||this._map.fire(new Ca(e.type,this._map,e))},Pa.prototype.dblclick=function(e){return this._firePreventable(new Ca(e.type,this._map,e))},Pa.prototype.mouseover=function(e){this._map.fire(new Ca(e.type,this._map,e))},Pa.prototype.mouseout=function(e){this._map.fire(new Ca(e.type,this._map,e))},Pa.prototype.touchstart=function(e){return this._firePreventable(new Da(e.type,this._map,e))},Pa.prototype.touchmove=function(e){this._map.fire(new Da(e.type,this._map,e))},Pa.prototype.touchend=function(e){this._map.fire(new Da(e.type,this._map,e))},Pa.prototype.touchcancel=function(e){this._map.fire(new Da(e.type,this._map,e))},Pa.prototype._firePreventable=function(e){if(this._map.fire(e),e.defaultPrevented)return{}},Pa.prototype.isEnabled=function(){return!0},Pa.prototype.isActive=function(){return!1},Pa.prototype.enable=function(){},Pa.prototype.disable=function(){};var Oa=function(e){this._map=e};Oa.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Oa.prototype.mousemove=function(e){this._map.fire(new Ca(e.type,this._map,e))},Oa.prototype.mousedown=function(){this._delayContextMenu=!0},Oa.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Ca("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Oa.prototype.contextmenu=function(e){this._delayContextMenu?this._contextMenuEvent=e:this._map.fire(new Ca(e.type,this._map,e)),this._map.listens("contextmenu")&&e.preventDefault()},Oa.prototype.isEnabled=function(){return!0},Oa.prototype.isActive=function(){return!1},Oa.prototype.enable=function(){},Oa.prototype.disable=function(){};var La=function(e,t){this._map=e,this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=t.clickTolerance||1};function Ia(e,t){for(var n={},r=0;rthis.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=e.timeStamp),n.length===this.numTouches&&(this.centroid=za(t),this.touches=Ia(n,t)))},ja.prototype.touchmove=function(e,t,n){if(!this.aborted&&this.centroid){var r=Ia(n,t);for(var i in this.touches){var a=this.touches[i],o=r[i];(!o||o.dist(a)>Ba)&&(this.aborted=!0)}}},ja.prototype.touchend=function(e,t,n){if((!this.centroid||e.timeStamp-this.startTime>Fa)&&(this.aborted=!0),0===n.length){var r=!this.aborted&&this.centroid;if(this.reset(),r)return r}};var Ua=function(e){this.singleTap=new ja(e),this.numTaps=e.numTaps,this.reset()};Ua.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Ua.prototype.touchstart=function(e,t,n){this.singleTap.touchstart(e,t,n)},Ua.prototype.touchmove=function(e,t,n){this.singleTap.touchmove(e,t,n)},Ua.prototype.touchend=function(e,t,n){var r=this.singleTap.touchend(e,t,n);if(r){var i=e.timeStamp-this.lastTime0&&(this._active=!0);var i=Ia(r,n),a=new e.Point(0,0),o=new e.Point(0,0),s=0;for(var l in i){var c=i[l],u=this._touches[l];u&&(a._add(c),o._add(c.sub(u)),s++,i[l]=c)}if(this._touches=i,!(sMath.abs(e.x)}var ao=100,oo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.reset=function(){e.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},t.prototype._start=function(e){this._lastPoints=e,io(e[0].sub(e[1]))&&(this._valid=!1)},t.prototype._move=function(e,t,n){var r=e[0].sub(this._lastPoints[0]),i=e[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(r,i,n.timeStamp),this._valid)return this._lastPoints=e,this._active=!0,{pitchDelta:(r.y+i.y)/2*-.5}},t.prototype.gestureBeginsVertically=function(e,t,n){if(void 0!==this._valid)return this._valid;var r=2,i=e.mag()>=r,a=t.mag()>=r;if(i||a){if(!i||!a)return void 0===this._firstMove&&(this._firstMove=n),n-this._firstMove0===t.y>0;return io(e)&&io(t)&&o}},t}(Za),so={panStep:100,bearingStep:15,pitchStep:10},lo=function(){var e=so;this._panStep=e.panStep,this._bearingStep=e.bearingStep,this._pitchStep=e.pitchStep};function co(e){return e*(2-e)}lo.prototype.reset=function(){this._active=!1},lo.prototype.keydown=function(e){var t=this;if(!(e.altKey||e.ctrlKey||e.metaKey)){var n=0,r=0,i=0,a=0,o=0;switch(e.keyCode){case 61:case 107:case 171:case 187:n=1;break;case 189:case 109:case 173:n=-1;break;case 37:e.shiftKey?r=-1:(e.preventDefault(),a=-1);break;case 39:e.shiftKey?r=1:(e.preventDefault(),a=1);break;case 38:e.shiftKey?i=1:(e.preventDefault(),o=-1);break;case 40:e.shiftKey?i=-1:(e.preventDefault(),o=1);break;default:return}return{cameraAnimation:function(s){var l=s.getZoom();s.easeTo({duration:300,easeId:"keyboardHandler",easing:co,zoom:n?Math.round(l)+n*(e.shiftKey?2:1):l,bearing:s.getBearing()+r*t._bearingStep,pitch:s.getPitch()+i*t._pitchStep,offset:[-a*t._panStep,-o*t._panStep],center:s.getCenter()},{originalEvent:e})}}}},lo.prototype.enable=function(){this._enabled=!0},lo.prototype.disable=function(){this._enabled=!1,this.reset()},lo.prototype.isEnabled=function(){return this._enabled},lo.prototype.isActive=function(){return this._active};var uo=4.000244140625,ho=.01,fo=1/450,po=2,mo=function(t,n){this._map=t,this._el=t.getCanvasContainer(),this._handler=n,this._delta=0,this._defaultZoomRate=ho,this._wheelZoomRate=fo,e.bindAll(["_onWheel","_onTimeout","_onScrollFrame","_onScrollFinished"],this)};mo.prototype.setZoomRate=function(e){this._defaultZoomRate=e},mo.prototype.setWheelZoomRate=function(e){this._wheelZoomRate=e},mo.prototype.isEnabled=function(){return!!this._enabled},mo.prototype.isActive=function(){return!!this._active||void 0!==this._finishTimeout},mo.prototype.isZooming=function(){return!!this._zooming},mo.prototype.enable=function(e){this.isEnabled()||(this._enabled=!0,this._aroundCenter=e&&"center"===e.around)},mo.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},mo.prototype.wheel=function(t){if(this.isEnabled()){var n=t.deltaMode===e.window.WheelEvent.DOM_DELTA_LINE?40*t.deltaY:t.deltaY,r=e.browser.now(),i=r-(this._lastWheelEventTime||0);this._lastWheelEventTime=r,0!==n&&n%uo===0?this._type="wheel":0!==n&&Math.abs(n)<4?this._type="trackpad":i>400?(this._type=null,this._lastValue=n,this._timeout=setTimeout(this._onTimeout,40,t)):this._type||(this._type=Math.abs(i*n)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,n+=this._lastValue)),t.shiftKey&&n&&(n/=4),this._type&&(this._lastWheelEvent=t,this._delta-=n,this._active||this._start(t)),t.preventDefault()}},mo.prototype._onTimeout=function(e){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(e)},mo.prototype._start=function(t){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var r=n.mousePos(this._el,t);this._around=e.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(r)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},mo.prototype.renderFrame=function(){return this._onScrollFrame()},mo.prototype._onScrollFrame=function(){var t=this;if(this._frameId&&(this._frameId=null,this.isActive())){var n=this._map.transform;if(0!==this._delta){var r="wheel"===this._type&&Math.abs(this._delta)>uo?this._wheelZoomRate:this._defaultZoomRate,i=po/(1+Math.exp(-Math.abs(this._delta*r)));this._delta<0&&0!==i&&(i=1/i);var a="number"===typeof this._targetZoom?n.zoomScale(this._targetZoom):n.scale;this._targetZoom=Math.min(n.maxZoom,Math.max(n.minZoom,n.scaleZoom(a*i))),"wheel"===this._type&&(this._startZoom=n.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var o,s="number"===typeof this._targetZoom?this._targetZoom:n.zoom,l=this._startZoom,c=this._easing,u=!1;if("wheel"===this._type&&l&&c){var d=Math.min((e.browser.now()-this._lastWheelEventTime)/200,1),h=c(d);o=e.number(l,s,h),d<1?this._frameId||(this._frameId=!0):u=!0}else o=s,u=!0;return this._active=!0,u&&(this._active=!1,this._finishTimeout=setTimeout((function(){t._zooming=!1,t._handler._triggerRenderFrame(),delete t._targetZoom,delete t._finishTimeout}),200)),{noInertia:!0,needsRenderFrame:!u,zoomDelta:o-n.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},mo.prototype._smoothOutEasing=function(t){var n=e.ease;if(this._prevEase){var r=this._prevEase,i=(e.browser.now()-r.start)/r.duration,a=r.easing(i+.01)-r.easing(i),o=.27/Math.sqrt(a*a+1e-4)*.01,s=Math.sqrt(.0729-o*o);n=e.bezier(o,s,.25,1)}return this._prevEase={start:e.browser.now(),duration:t,easing:n},n},mo.prototype.reset=function(){this._active=!1};var go=function(e,t){this._clickZoom=e,this._tapZoom=t};go.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},go.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},go.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},go.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var vo=function(){this.reset()};vo.prototype.reset=function(){this._active=!1},vo.prototype.dblclick=function(e,t){return e.preventDefault(),{cameraAnimation:function(n){n.easeTo({duration:300,zoom:n.getZoom()+(e.shiftKey?-1:1),around:n.unproject(t)},{originalEvent:e})}}},vo.prototype.enable=function(){this._enabled=!0},vo.prototype.disable=function(){this._enabled=!1,this.reset()},vo.prototype.isEnabled=function(){return this._enabled},vo.prototype.isActive=function(){return this._active};var yo=function(){this._tap=new Ua({numTouches:1,numTaps:1}),this.reset()};yo.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},yo.prototype.touchstart=function(e,t,n){this._swipePoint||(this._tapTime&&e.timeStamp-this._tapTime>Na&&this.reset(),this._tapTime?n.length>0&&(this._swipePoint=t[0],this._swipeTouch=n[0].identifier):this._tap.touchstart(e,t,n))},yo.prototype.touchmove=function(e,t,n){if(this._tapTime){if(this._swipePoint){if(n[0].identifier!==this._swipeTouch)return;var r=t[0],i=r.y-this._swipePoint.y;return this._swipePoint=r,e.preventDefault(),this._active=!0,{zoomDelta:i/128}}}else this._tap.touchmove(e,t,n)},yo.prototype.touchend=function(e,t,n){this._tapTime?this._swipePoint&&0===n.length&&this.reset():this._tap.touchend(e,t,n)&&(this._tapTime=e.timeStamp)},yo.prototype.touchcancel=function(){this.reset()},yo.prototype.enable=function(){this._enabled=!0},yo.prototype.disable=function(){this._enabled=!1,this.reset()},yo.prototype.isEnabled=function(){return this._enabled},yo.prototype.isActive=function(){return this._active};var xo=function(e,t,n){this._el=e,this._mousePan=t,this._touchPan=n};xo.prototype.enable=function(e){this._inertiaOptions=e||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},xo.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},xo.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},xo.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var bo=function(e,t,n){this._pitchWithRotate=e.pitchWithRotate,this._mouseRotate=t,this._mousePitch=n};bo.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},bo.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},bo.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},bo.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var _o=function(e,t,n,r){this._el=e,this._touchZoom=t,this._touchRotate=n,this._tapDragZoom=r,this._rotationDisabled=!1,this._enabled=!0};_o.prototype.enable=function(e){this._touchZoom.enable(e),this._rotationDisabled||this._touchRotate.enable(e),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},_o.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},_o.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},_o.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},_o.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},_o.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var wo=function(e){return e.zoom||e.drag||e.pitch||e.rotate},Ao=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(e.Event);function So(e){return e.panDelta&&e.panDelta.mag()||e.zoomDelta||e.bearingDelta||e.pitchDelta}var Mo=function(t,r){this._map=t,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Ta(t),this._bearingSnap=r.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(r),e.bindAll(["handleEvent","handleWindowEvent"],this);var i=this._el;this._listeners=[[i,"touchstart",{passive:!1}],[i,"touchmove",{passive:!1}],[i,"touchend",void 0],[i,"touchcancel",void 0],[i,"mousedown",void 0],[i,"mousemove",void 0],[i,"mouseup",void 0],[e.window.document,"mousemove",{capture:!0}],[e.window.document,"mouseup",void 0],[i,"mouseover",void 0],[i,"mouseout",void 0],[i,"dblclick",void 0],[i,"click",void 0],[i,"keydown",{capture:!1}],[i,"keyup",void 0],[i,"wheel",{passive:!1}],[i,"contextmenu",void 0],[e.window,"blur",void 0]];for(var a=0,o=this._listeners;aa?Math.min(2,_):Math.max(.5,_),w=Math.pow(g,1-t),A=i.unproject(x.add(b.mult(t*w)).mult(m));i.setLocationAtPoint(i.renderWorldCopies?A.wrap():A,p)}r._fireMoveEvents(n)}),(function(e){r._afterEase(n,e)}),t),this},n.prototype._prepareEase=function(t,n,r){void 0===r&&(r={}),this._moving=!0,n||r.moving||this.fire(new e.Event("movestart",t)),this._zooming&&!r.zooming&&this.fire(new e.Event("zoomstart",t)),this._rotating&&!r.rotating&&this.fire(new e.Event("rotatestart",t)),this._pitching&&!r.pitching&&this.fire(new e.Event("pitchstart",t))},n.prototype._fireMoveEvents=function(t){this.fire(new e.Event("move",t)),this._zooming&&this.fire(new e.Event("zoom",t)),this._rotating&&this.fire(new e.Event("rotate",t)),this._pitching&&this.fire(new e.Event("pitch",t))},n.prototype._afterEase=function(t,n){if(!this._easeId||!n||this._easeId!==n){delete this._easeId;var r=this._zooming,i=this._rotating,a=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,r&&this.fire(new e.Event("zoomend",t)),i&&this.fire(new e.Event("rotateend",t)),a&&this.fire(new e.Event("pitchend",t)),this.fire(new e.Event("moveend",t))}},n.prototype.flyTo=function(t,n){var r=this;if(!t.essential&&e.browser.prefersReducedMotion){var i=e.pick(t,["center","zoom","bearing","pitch","around"]);return this.jumpTo(i,n)}this.stop(),t=e.extend({offset:[0,0],speed:1.2,curve:1.42,easing:e.ease},t);var a=this.transform,o=this.getZoom(),s=this.getBearing(),l=this.getPitch(),c=this.getPadding(),u="zoom"in t?e.clamp(+t.zoom,a.minZoom,a.maxZoom):o,d="bearing"in t?this._normalizeBearing(t.bearing,s):s,h="pitch"in t?+t.pitch:l,f="padding"in t?t.padding:a.padding,p=a.zoomScale(u-o),m=e.Point.convert(t.offset),g=a.centerPoint.add(m),v=a.pointLocation(g),y=e.LngLat.convert(t.center||v);this._normalizeCenter(y);var x=a.project(v),b=a.project(y).sub(x),_=t.curve,w=Math.max(a.width,a.height),A=w/p,S=b.mag();if("minZoom"in t){var M=e.clamp(Math.min(t.minZoom,o,u),a.minZoom,a.maxZoom),T=w/a.zoomScale(M-o);_=Math.sqrt(T/S*2)}var k=_*_;function E(e){var t=(A*A-w*w+(e?-1:1)*k*k*S*S)/(2*(e?A:w)*k*S);return Math.log(Math.sqrt(t*t+1)-t)}function C(e){return(Math.exp(e)-Math.exp(-e))/2}function D(e){return(Math.exp(e)+Math.exp(-e))/2}function R(e){return C(e)/D(e)}var P=E(0),O=function(e){return D(P)/D(P+_*e)},L=function(e){return w*((D(P)*R(P+_*e)-C(P))/k)/S},I=(E(1)-P)/_;if(Math.abs(S)<1e-6||!isFinite(I)){if(Math.abs(w-A)<1e-6)return this.easeTo(t,n);var z=At.maxDuration&&(t.duration=0),this._zooming=!0,this._rotating=s!==d,this._pitching=h!==l,this._padding=!a.isPaddingEqual(f),this._prepareEase(n,!1),this._ease((function(t){var i=t*I,p=1/O(i);a.zoom=1===t?u:o+a.scaleZoom(p),r._rotating&&(a.bearing=e.number(s,d,t)),r._pitching&&(a.pitch=e.number(l,h,t)),r._padding&&(a.interpolatePadding(c,f,t),g=a.centerPoint.add(m));var v=1===t?y:a.unproject(x.add(b.mult(L(i))).mult(p));a.setLocationAtPoint(a.renderWorldCopies?v.wrap():v,g),r._fireMoveEvents(n)}),(function(){return r._afterEase(n)}),t),this},n.prototype.isEasing=function(){return!!this._easeFrameId},n.prototype.stop=function(){return this._stop()},n.prototype._stop=function(e,t){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var n=this._onEaseEnd;delete this._onEaseEnd,n.call(this,t)}if(!e){var r=this.handlers;r&&r.stop()}return this},n.prototype._ease=function(t,n,r){!1===r.animate||0===r.duration?(t(1),n()):(this._easeStart=e.browser.now(),this._easeOptions=r,this._onEaseFrame=t,this._onEaseEnd=n,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},n.prototype._renderFrameCallback=function(){var t=Math.min((e.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(t)),t<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},n.prototype._normalizeBearing=function(t,n){t=e.wrap(t,-180,180);var r=Math.abs(t-n);return Math.abs(t-360-n)180?-360:n<-180?360:0}},n}(e.Evented),ko=function(t){void 0===t&&(t={}),this.options=t,e.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)};ko.prototype.getDefaultPosition=function(){return"bottom-right"},ko.prototype.onAdd=function(e){var t=this.options&&this.options.compact;return this._map=e,this._container=n.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._innerContainer=n.create("div","mapboxgl-ctrl-attrib-inner",this._container),t&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),void 0===t&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},ko.prototype.onRemove=function(){n.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},ko.prototype._updateEditLink=function(){var t=this._editLink;t||(t=this._editLink=this._container.querySelector(".mapbox-improve-map"));var n=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||e.config.ACCESS_TOKEN}];if(t){var r=n.reduce((function(e,t,r){return t.value&&(e+=t.key+"="+t.value+(r=0)return!1;return!0}))).join(" | ");o!==this._attribHTML&&(this._attribHTML=o,e.length?(this._innerContainer.innerHTML=o,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},ko.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")};var Eo=function(){e.bindAll(["_updateLogo"],this),e.bindAll(["_updateCompact"],this)};Eo.prototype.onAdd=function(e){this._map=e,this._container=n.create("div","mapboxgl-ctrl");var t=n.create("a","mapboxgl-ctrl-logo");return t.target="_blank",t.rel="noopener nofollow",t.href="https://www.mapbox.com/",t.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),t.setAttribute("rel","noopener nofollow"),this._container.appendChild(t),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},Eo.prototype.onRemove=function(){n.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},Eo.prototype.getDefaultPosition=function(){return"bottom-left"},Eo.prototype._updateLogo=function(e){e&&"metadata"!==e.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")},Eo.prototype._logoRequired=function(){if(this._map.style){var e=this._map.style.sourceCaches;for(var t in e)if(e[t].getSource().mapbox_logo)return!0;return!1}},Eo.prototype._updateCompact=function(){var e=this._container.children;if(e.length){var t=e[0];this._map.getCanvasContainer().offsetWidth<250?t.classList.add("mapboxgl-compact"):t.classList.remove("mapboxgl-compact")}};var Co=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Co.prototype.add=function(e){var t=++this._id;return this._queue.push({callback:e,id:t,cancelled:!1}),t},Co.prototype.remove=function(e){for(var t=this._currentlyRunning,n=0,r=t?this._queue.concat(t):this._queue;nt.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=t.minPitch&&null!=t.maxPitch&&t.minPitch>t.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=t.minPitch&&t.minPitchNo)throw new Error("maxPitch must be less than or equal to "+No);var i=new va(t.minZoom,t.maxZoom,t.minPitch,t.maxPitch,t.renderWorldCopies);if(r.call(this,i,t),this._interactive=t.interactive,this._maxTileCacheSize=t.maxTileCacheSize,this._failIfMajorPerformanceCaveat=t.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=t.preserveDrawingBuffer,this._antialias=t.antialias,this._trackResize=t.trackResize,this._bearingSnap=t.bearingSnap,this._refreshExpiredTiles=t.refreshExpiredTiles,this._fadeDuration=t.fadeDuration,this._crossSourceCollisions=t.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=t.collectResourceTiming,this._renderTaskQueue=new Co,this._controls=[],this._mapId=e.uniqueId(),this._locale=e.extend({},Do,t.locale),this._requestManager=new e.RequestManager(t.transformRequest,t.accessToken),"string"===typeof t.container){if(this._container=e.window.document.getElementById(t.container),!this._container)throw new Error("Container '"+t.container+"' not found.")}else{if(!(t.container instanceof Po))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=t.container}if(t.maxBounds&&this.setMaxBounds(t.maxBounds),e.bindAll(["_onWindowOnline","_onWindowResize","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error("Failed to initialize WebGL.");this.on("move",(function(){return n._update(!1)})),this.on("moveend",(function(){return n._update(!1)})),this.on("zoom",(function(){return n._update(!0)})),"undefined"!==typeof e.window&&(e.window.addEventListener("online",this._onWindowOnline,!1),e.window.addEventListener("resize",this._onWindowResize,!1)),this.handlers=new Mo(this,t);var a="string"===typeof t.hash&&t.hash||void 0;this._hash=t.hash&&new ba(a).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:t.center,zoom:t.zoom,bearing:t.bearing,pitch:t.pitch}),t.bounds&&(this.resize(),this.fitBounds(t.bounds,e.extend({},t.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=t.localIdeographFontFamily,t.style&&this.setStyle(t.style,{localIdeographFontFamily:t.localIdeographFontFamily}),t.attributionControl&&this.addControl(new ko({customAttribution:t.customAttribution})),this.addControl(new Eo,t.logoPosition),this.on("style.load",(function(){n.transform.unmodified&&n.jumpTo(n.style.stylesheet)})),this.on("data",(function(t){n._update("style"===t.dataType),n.fire(new e.Event(t.dataType+"data",t))})),this.on("dataloading",(function(t){n.fire(new e.Event(t.dataType+"dataloading",t))}))}r&&(i.__proto__=r),i.prototype=Object.create(r&&r.prototype),i.prototype.constructor=i;var a={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return i.prototype._getMapId=function(){return this._mapId},i.prototype.addControl=function(t,n){if(void 0===n&&t.getDefaultPosition&&(n=t.getDefaultPosition()),void 0===n&&(n="top-right"),!t||!t.onAdd)return this.fire(new e.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var r=t.onAdd(this);this._controls.push(t);var i=this._controlPositions[n];return-1!==n.indexOf("bottom")?i.insertBefore(r,i.firstChild):i.appendChild(r),this},i.prototype.removeControl=function(t){if(!t||!t.onRemove)return this.fire(new e.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var n=this._controls.indexOf(t);return n>-1&&this._controls.splice(n,1),t.onRemove(this),this},i.prototype.resize=function(t){var n=this._containerDimensions(),r=n[0],i=n[1];this._resizeCanvas(r,i),this.transform.resize(r,i),this.painter.resize(r,i);var a=!this._moving;return a&&(this.stop(),this.fire(new e.Event("movestart",t)).fire(new e.Event("move",t))),this.fire(new e.Event("resize",t)),a&&this.fire(new e.Event("moveend",t)),this},i.prototype.getBounds=function(){return this.transform.getBounds()},i.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},i.prototype.setMaxBounds=function(t){return this.transform.setMaxBounds(e.LngLatBounds.convert(t)),this._update()},i.prototype.setMinZoom=function(e){if((e=null===e||void 0===e?Lo:e)>=Lo&&e<=this.transform.maxZoom)return this.transform.minZoom=e,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=e,this._update(),this.getZoom()>e&&this.setZoom(e),this;throw new Error("maxZoom must be greater than the current minZoom")},i.prototype.getMaxZoom=function(){return this.transform.maxZoom},i.prototype.setMinPitch=function(e){if((e=null===e||void 0===e?zo:e)=zo&&e<=this.transform.maxPitch)return this.transform.minPitch=e,this._update(),this.getPitch()No)throw new Error("maxPitch must be less than or equal to "+No);if(e>=this.transform.minPitch)return this.transform.maxPitch=e,this._update(),this.getPitch()>e&&this.setPitch(e),this;throw new Error("maxPitch must be greater than the current minPitch")},i.prototype.getMaxPitch=function(){return this.transform.maxPitch},i.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},i.prototype.setRenderWorldCopies=function(e){return this.transform.renderWorldCopies=e,this._update()},i.prototype.project=function(t){return this.transform.locationPoint(e.LngLat.convert(t))},i.prototype.unproject=function(t){return this.transform.pointLocation(e.Point.convert(t))},i.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},i.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},i.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},i.prototype._createDelegatedListener=function(e,t,n){var r,i=this;if("mouseenter"===e||"mouseover"===e){var a=!1,o=function(r){var o=i.getLayer(t)?i.queryRenderedFeatures(r.point,{layers:[t]}):[];o.length?a||(a=!0,n.call(i,new Ca(e,i,r.originalEvent,{features:o}))):a=!1};return{layer:t,listener:n,delegates:{mousemove:o,mouseout:function(){a=!1}}}}if("mouseleave"===e||"mouseout"===e){var s=!1,l=function(r){(i.getLayer(t)?i.queryRenderedFeatures(r.point,{layers:[t]}):[]).length?s=!0:s&&(s=!1,n.call(i,new Ca(e,i,r.originalEvent)))},c=function(t){s&&(s=!1,n.call(i,new Ca(e,i,t.originalEvent)))};return{layer:t,listener:n,delegates:{mousemove:l,mouseout:c}}}var u=function(e){var r=i.getLayer(t)?i.queryRenderedFeatures(e.point,{layers:[t]}):[];r.length&&(e.features=r,n.call(i,e),delete e.features)};return{layer:t,listener:n,delegates:(r={},r[e]=u,r)}},i.prototype.on=function(e,t,n){if(void 0===n)return r.prototype.on.call(this,e,t);var i=this._createDelegatedListener(e,t,n);for(var a in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[e]=this._delegatedListeners[e]||[],this._delegatedListeners[e].push(i),i.delegates)this.on(a,i.delegates[a]);return this},i.prototype.once=function(e,t,n){if(void 0===n)return r.prototype.once.call(this,e,t);var i=this._createDelegatedListener(e,t,n);for(var a in i.delegates)this.once(a,i.delegates[a]);return this},i.prototype.off=function(e,t,n){var i=this;if(void 0===n)return r.prototype.off.call(this,e,t);var a=function(r){for(var a=r[e],o=0;o180;){var s=r.locationPoint(t);if(s.x>=0&&s.y>=0&&s.x<=r.width&&s.y<=r.height)break;t.lng>r.center.lng?t.lng-=360:t.lng+=360}return t}Ho.prototype.down=function(e,t){this.mouseRotate.mousedown(e,t),this.mousePitch&&this.mousePitch.mousedown(e,t),n.disableDrag()},Ho.prototype.move=function(e,t){var n=this.map,r=this.mouseRotate.mousemoveWindow(e,t);if(r&&r.bearingDelta&&n.setBearing(n.getBearing()+r.bearingDelta),this.mousePitch){var i=this.mousePitch.mousemoveWindow(e,t);i&&i.pitchDelta&&n.setPitch(n.getPitch()+i.pitchDelta)}},Ho.prototype.off=function(){var e=this.element;n.removeEventListener(e,"mousedown",this.mousedown),n.removeEventListener(e,"touchstart",this.touchstart,{passive:!1}),n.removeEventListener(e,"touchmove",this.touchmove),n.removeEventListener(e,"touchend",this.touchend),n.removeEventListener(e,"touchcancel",this.reset),this.offTemp()},Ho.prototype.offTemp=function(){n.enableDrag(),n.removeEventListener(e.window,"mousemove",this.mousemove),n.removeEventListener(e.window,"mouseup",this.mouseup)},Ho.prototype.mousedown=function(t){this.down(e.extend({},t,{ctrlKey:!0,preventDefault:function(){return t.preventDefault()}}),n.mousePos(this.element,t)),n.addEventListener(e.window,"mousemove",this.mousemove),n.addEventListener(e.window,"mouseup",this.mouseup)},Ho.prototype.mousemove=function(e){this.move(e,n.mousePos(this.element,e))},Ho.prototype.mouseup=function(e){this.mouseRotate.mouseupWindow(e),this.mousePitch&&this.mousePitch.mouseupWindow(e),this.offTemp()},Ho.prototype.touchstart=function(e){1!==e.targetTouches.length?this.reset():(this._startPos=this._lastPos=n.touchPos(this.element,e.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return e.preventDefault()}},this._startPos))},Ho.prototype.touchmove=function(e){1!==e.targetTouches.length?this.reset():(this._lastPos=n.touchPos(this.element,e.targetTouches)[0],this.move({preventDefault:function(){return e.preventDefault()}},this._lastPos))},Ho.prototype.touchend=function(e){0===e.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)t.getEast()||n.latitudet.getNorth())},r.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}},r.prototype._onSuccess=function(t){if(this._map){if(this._isOutOfMapMaxBounds(t))return this._setErrorState(),this.fire(new e.Event("outofmaxbounds",t)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=t,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(t),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(t),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("geolocate",t)),this._finish()}},r.prototype._updateCamera=function(t){var n=new e.LngLat(t.coords.longitude,t.coords.latitude),r=t.coords.accuracy,i=this._map.getBearing(),a=e.extend({bearing:i},this.options.fitBoundsOptions);this._map.fitBounds(n.toBounds(r),a,{geolocateSource:!0})},r.prototype._updateMarker=function(t){if(t){var n=new e.LngLat(t.coords.longitude,t.coords.latitude);this._accuracyCircleMarker.setLngLat(n).addTo(this._map),this._userLocationDotMarker.setLngLat(n).addTo(this._map),this._accuracy=t.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},r.prototype._updateCircleRadius=function(){var e=this._map._container.clientHeight/2,t=this._map.unproject([0,e]),n=this._map.unproject([1,e]),r=t.distanceTo(n),i=Math.ceil(2*this._accuracy/r);this._circleElement.style.width=i+"px",this._circleElement.style.height=i+"px"},r.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},r.prototype._onError=function(t){if(this._map){if(this.options.trackUserLocation)if(1===t.code){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var n=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=n,this._geolocateButton.setAttribute("aria-label",n),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===t.code&&Jo)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("error",t)),this._finish()}},r.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},r.prototype._setupUI=function(t){var r=this;if(this._container.addEventListener("contextmenu",(function(e){return e.preventDefault()})),this._geolocateButton=n.create("button","mapboxgl-ctrl-geolocate",this._container),n.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",!1===t){e.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var i=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=i,this._geolocateButton.setAttribute("aria-label",i)}else{var a=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=a,this._geolocateButton.setAttribute("aria-label",a)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=n.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new $o(this._dotElement),this._circleElement=n.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new $o({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",(function(t){var n=t.originalEvent&&"resize"===t.originalEvent.type;t.geolocateSource||"ACTIVE_LOCK"!==r._watchState||n||(r._watchState="BACKGROUND",r._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),r._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),r.fire(new e.Event("trackuserlocationend")))}))},r.prototype.trigger=function(){if(!this._setup)return e.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new e.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Ko--,Jo=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new e.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new e.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){var t;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++Ko>1?(t={maximumAge:6e5,timeout:0},Jo=!0):(t=this.options.positionOptions,Jo=!1),this._geolocationWatchID=e.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,t)}}else e.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},r.prototype._clearWatch=function(){e.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},r}(e.Evented),es={maxWidth:100,unit:"metric"},ts=function(t){this.options=e.extend({},es,t),e.bindAll(["_onMove","setUnit"],this)};function ns(e,t,n){var r=n&&n.maxWidth||100,i=e._container.clientHeight/2,a=e.unproject([0,i]),o=e.unproject([r,i]),s=a.distanceTo(o);if(n&&"imperial"===n.unit){var l=3.2808*s;l>5280?rs(t,r,l/5280,e._getUIString("ScaleControl.Miles")):rs(t,r,l,e._getUIString("ScaleControl.Feet"))}else n&&"nautical"===n.unit?rs(t,r,s/1852,e._getUIString("ScaleControl.NauticalMiles")):s>=1e3?rs(t,r,s/1e3,e._getUIString("ScaleControl.Kilometers")):rs(t,r,s,e._getUIString("ScaleControl.Meters"))}function rs(e,t,n,r){var i=as(n),a=i/n;e.style.width=t*a+"px",e.innerHTML=i+" "+r}function is(e){var t=Math.pow(10,Math.ceil(-Math.log(e)/Math.LN10));return Math.round(e*t)/t}function as(e){var t=Math.pow(10,(""+Math.floor(e)).length-1),n=e/t;return t*(n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:n>=1?1:is(n))}ts.prototype.getDefaultPosition=function(){return"bottom-left"},ts.prototype._onMove=function(){ns(this._map,this._container,this.options)},ts.prototype.onAdd=function(e){return this._map=e,this._container=n.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",e.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},ts.prototype.onRemove=function(){n.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},ts.prototype.setUnit=function(e){this.options.unit=e,ns(this._map,this._container,this.options)};var os=function(t){this._fullscreen=!1,t&&t.container&&(t.container instanceof e.window.HTMLElement?this._container=t.container:e.warnOnce("Full screen control 'container' must be a DOM element.")),e.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in e.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in e.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in e.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in e.window.document&&(this._fullscreenchange="MSFullscreenChange")};os.prototype.onAdd=function(t){return this._map=t,this._container||(this._container=this._map.getContainer()),this._controlContainer=n.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",e.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},os.prototype.onRemove=function(){n.remove(this._controlContainer),this._map=null,e.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},os.prototype._checkFullscreenSupport=function(){return!!(e.window.document.fullscreenEnabled||e.window.document.mozFullScreenEnabled||e.window.document.msFullscreenEnabled||e.window.document.webkitFullscreenEnabled)},os.prototype._setupUI=function(){var t=this._fullscreenButton=n.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);n.create("span","mapboxgl-ctrl-icon",t).setAttribute("aria-hidden",!0),t.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),e.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},os.prototype._updateTitle=function(){var e=this._getTitle();this._fullscreenButton.setAttribute("aria-label",e),this._fullscreenButton.title=e},os.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},os.prototype._isFullscreen=function(){return this._fullscreen},os.prototype._changeIcon=function(){(e.window.document.fullscreenElement||e.window.document.mozFullScreenElement||e.window.document.webkitFullscreenElement||e.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},os.prototype._onClickFullscreen=function(){this._isFullscreen()?e.window.document.exitFullscreen?e.window.document.exitFullscreen():e.window.document.mozCancelFullScreen?e.window.document.mozCancelFullScreen():e.window.document.msExitFullscreen?e.window.document.msExitFullscreen():e.window.document.webkitCancelFullScreen&&e.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var ss={closeButton:!0,closeOnClick:!0,className:"",maxWidth:"240px"},ls=function(t){function r(n){t.call(this),this.options=e.extend(Object.create(ss),n),e.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.addTo=function(t){return this._map&&this.remove(),this._map=t,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new e.Event("open")),this},r.prototype.isOpen=function(){return!!this._map},r.prototype.remove=function(){return this._content&&n.remove(this._content),this._container&&(n.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new e.Event("close")),this},r.prototype.getLngLat=function(){return this._lngLat},r.prototype.setLngLat=function(t){return this._lngLat=e.LngLat.convert(t),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},r.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},r.prototype.getElement=function(){return this._container},r.prototype.setText=function(t){return this.setDOMContent(e.window.document.createTextNode(t))},r.prototype.setHTML=function(t){var n,r=e.window.document.createDocumentFragment(),i=e.window.document.createElement("body");for(i.innerHTML=t;n=i.firstChild;)r.appendChild(n);return this.setDOMContent(r)},r.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},r.prototype.setMaxWidth=function(e){return this.options.maxWidth=e,this._update(),this},r.prototype.setDOMContent=function(e){return this._createContent(),this._content.appendChild(e),this._update(),this},r.prototype.addClassName=function(e){this._container&&this._container.classList.add(e)},r.prototype.removeClassName=function(e){this._container&&this._container.classList.remove(e)},r.prototype.toggleClassName=function(e){if(this._container)return this._container.classList.toggle(e)},r.prototype._createContent=function(){this._content&&n.remove(this._content),this._content=n.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=n.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))},r.prototype._onMouseUp=function(e){this._update(e.point)},r.prototype._onMouseMove=function(e){this._update(e.point)},r.prototype._onDrag=function(e){this._update(e.point)},r.prototype._update=function(e){var t=this,r=this._lngLat||this._trackPointer;if(this._map&&r&&this._content&&(this._container||(this._container=n.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=n.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach((function(e){return t._container.classList.add(e)})),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Wo(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||e)){var i=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat),a=this.options.anchor,o=cs(this.options.offset);if(!a){var s,l=this._container.offsetWidth,c=this._container.offsetHeight;s=i.y+o.bottom.ythis._map.transform.height-c?["bottom"]:[],i.xthis._map.transform.width-l/2&&s.push("right"),a=0===s.length?"bottom":s.join("-")}var u=i.add(o[a]).round();n.setTransform(this._container,Go[a]+" translate("+u.x+"px,"+u.y+"px)"),qo(this._container,a,"popup")}},r.prototype._onClose=function(){this.remove()},r}(e.Evented);function cs(t){if(t){if("number"===typeof t){var n=Math.round(Math.sqrt(.5*Math.pow(t,2)));return{center:new e.Point(0,0),top:new e.Point(0,t),"top-left":new e.Point(n,n),"top-right":new e.Point(-n,n),bottom:new e.Point(0,-t),"bottom-left":new e.Point(n,-n),"bottom-right":new e.Point(-n,-n),left:new e.Point(t,0),right:new e.Point(-t,0)}}if(t instanceof e.Point||Array.isArray(t)){var r=e.Point.convert(t);return{center:r,top:r,"top-left":r,"top-right":r,bottom:r,"bottom-left":r,"bottom-right":r,left:r,right:r}}return{center:e.Point.convert(t.center||[0,0]),top:e.Point.convert(t.top||[0,0]),"top-left":e.Point.convert(t["top-left"]||[0,0]),"top-right":e.Point.convert(t["top-right"]||[0,0]),bottom:e.Point.convert(t.bottom||[0,0]),"bottom-left":e.Point.convert(t["bottom-left"]||[0,0]),"bottom-right":e.Point.convert(t["bottom-right"]||[0,0]),left:e.Point.convert(t.left||[0,0]),right:e.Point.convert(t.right||[0,0])}}return cs(new e.Point(0,0))}var us={version:e.version,supported:t,setRTLTextPlugin:e.setRTLTextPlugin,getRTLTextPluginStatus:e.getRTLTextPluginStatus,Map:Bo,NavigationControl:Vo,GeolocateControl:Qo,AttributionControl:ko,ScaleControl:ts,FullscreenControl:os,Popup:ls,Marker:$o,Style:vn,LngLat:e.LngLat,LngLatBounds:e.LngLatBounds,Point:e.Point,MercatorCoordinate:e.MercatorCoordinate,Evented:e.Evented,config:e.config,prewarm:at,clearPrewarmedResources:ot,get accessToken(){return e.config.ACCESS_TOKEN},set accessToken(t){e.config.ACCESS_TOKEN=t},get baseApiUrl(){return e.config.API_URL},set baseApiUrl(t){e.config.API_URL=t},get workerCount(){return tt.workerCount},set workerCount(e){tt.workerCount=e},get maxParallelImageRequests(){return e.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(t){e.config.MAX_PARALLEL_IMAGE_REQUESTS=t},clearStorage:function(t){e.clearTileCache(t)},workerUrl:""};return us})),n}()},27084:function(e){"use strict";e.exports=Math.log2||function(e){return Math.log(e)*Math.LOG2E}},16825:function(e,t,n){"use strict";e.exports=function(e,t){t||(t=e,e=window);var n=0,i=0,a=0,o={shift:!1,alt:!1,control:!1,meta:!1},s=!1;function l(e){var t=!1;return"altKey"in e&&(t=t||e.altKey!==o.alt,o.alt=!!e.altKey),"shiftKey"in e&&(t=t||e.shiftKey!==o.shift,o.shift=!!e.shiftKey),"ctrlKey"in e&&(t=t||e.ctrlKey!==o.control,o.control=!!e.ctrlKey),"metaKey"in e&&(t=t||e.metaKey!==o.meta,o.meta=!!e.metaKey),t}function c(e,s){var c=r.x(s),u=r.y(s);"buttons"in s&&(e=0|s.buttons),(e!==n||c!==i||u!==a||l(s))&&(n=0|e,i=c||0,a=u||0,t&&t(n,i,a,o))}function u(e){c(0,e)}function d(){(n||i||a||o.shift||o.alt||o.meta||o.control)&&(i=a=0,n=0,o.shift=o.alt=o.control=o.meta=!1,t&&t(0,0,0,o))}function h(e){l(e)&&t&&t(n,i,a,o)}function f(e){0===r.buttons(e)?c(0,e):c(n,e)}function p(e){c(n|r.buttons(e),e)}function m(e){c(n&~r.buttons(e),e)}function g(){s||(s=!0,e.addEventListener("mousemove",f),e.addEventListener("mousedown",p),e.addEventListener("mouseup",m),e.addEventListener("mouseleave",u),e.addEventListener("mouseenter",u),e.addEventListener("mouseout",u),e.addEventListener("mouseover",u),e.addEventListener("blur",d),e.addEventListener("keyup",h),e.addEventListener("keydown",h),e.addEventListener("keypress",h),e!==window&&(window.addEventListener("blur",d),window.addEventListener("keyup",h),window.addEventListener("keydown",h),window.addEventListener("keypress",h)))}g();var v={element:e};return Object.defineProperties(v,{enabled:{get:function(){return s},set:function(t){t?g():function(){if(!s)return;s=!1,e.removeEventListener("mousemove",f),e.removeEventListener("mousedown",p),e.removeEventListener("mouseup",m),e.removeEventListener("mouseleave",u),e.removeEventListener("mouseenter",u),e.removeEventListener("mouseout",u),e.removeEventListener("mouseover",u),e.removeEventListener("blur",d),e.removeEventListener("keyup",h),e.removeEventListener("keydown",h),e.removeEventListener("keypress",h),e!==window&&(window.removeEventListener("blur",d),window.removeEventListener("keyup",h),window.removeEventListener("keydown",h),window.removeEventListener("keypress",h))}()},enumerable:!0},buttons:{get:function(){return n},enumerable:!0},x:{get:function(){return i},enumerable:!0},y:{get:function(){return a},enumerable:!0},mods:{get:function(){return o},enumerable:!0}}),v};var r=n(74311)},48956:function(e){var t={left:0,top:0};e.exports=function(e,n,r){n=n||e.currentTarget||e.srcElement,Array.isArray(r)||(r=[0,0]);var i=e.clientX||0,a=e.clientY||0,o=(s=n,s===window||s===document||s===document.body?t:s.getBoundingClientRect());var s;return r[0]=i-o.left,r[1]=a-o.top,r}},74311:function(e,t){"use strict";function n(e){return e.target||e.srcElement||window}t.buttons=function(e){if("object"===typeof e){if("buttons"in e)return e.buttons;if("which"in e){if(2===(t=e.which))return 4;if(3===t)return 2;if(t>0)return 1<=0)return 1<0&&a(s,n))}catch(g){u.call(new h(n),g)}}}function u(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,t.chain.length>0&&a(s,t))}function d(e,t,n,r){for(var i=0;i1&&(i*=v=Math.sqrt(v),s*=v);var y=i*i,x=s*s,b=(c==u?-1:1)*Math.sqrt(Math.abs((y*x-y*g*g-x*m*m)/(y*g*g+x*m*m)));b==1/0&&(b=1);var _=b*i*g/s+(e+d)/2,w=b*-s*m/i+(r+h)/2,A=Math.asin(((r-w)/s).toFixed(9)),S=Math.asin(((h-w)/s).toFixed(9));(A=e<_?t-A:A)<0&&(A=2*t+A),(S=d<_?t-S:S)<0&&(S=2*t+S),u&&A>S&&(A-=2*t),!u&&S>A&&(S-=2*t)}if(Math.abs(S-A)>n){var M=S,T=d,k=h;S=A+n*(u&&S>A?1:-1);var E=a(d=_+i*Math.cos(S),h=w+s*Math.sin(S),i,s,l,0,u,T,k,[S,M,_,w])}var C=Math.tan((S-A)/4),D=4/3*i*C,R=4/3*s*C,P=[2*e-(e+D*Math.sin(A)),2*r-(r-R*Math.cos(A)),d+D*Math.sin(S),h-R*Math.cos(S),d,h];if(f)return P;E&&(P=P.concat(E));for(var O=0;O7&&(n.push(v.splice(0,7)),v.unshift("C"));break;case"S":var x=f,b=p;"C"!=t&&"S"!=t||(x+=x-o,b+=b-l),v=["C",x,b,v[1],v[2],v[3],v[4]];break;case"T":"Q"==t||"T"==t?(d=2*f-d,h=2*p-h):(d=f,h=p),v=i(f,p,d,h,v[1],v[2]);break;case"Q":d=v[1],h=v[2],v=i(f,p,v[1],v[2],v[3],v[4]);break;case"L":v=r(f,p,v[1],v[2]);break;case"H":v=r(f,p,v[1],p);break;case"V":v=r(f,p,f,v[1]);break;case"Z":v=r(f,p,c,u)}t=y,f=v[v.length-2],p=v[v.length-1],v.length>4?(o=v[v.length-4],l=v[v.length-3]):(o=f,l=p),n.push(v)}return n}},56131:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(e,i){for(var a,o,s=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l0&&!i.call(e,0))for(var m=0;m0)for(var g=0;g=0&&"[object Function]"===t.call(e.callee)),r}},88641:function(e){"use strict";function t(e,t){if("string"!==typeof e)return[e];var n=[e];"string"===typeof t||Array.isArray(t)?t={brackets:t}:t||(t={});var r=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:["{}","[]","()"],i=t.escape||"___",a=!!t.flat;r.forEach((function(e){var t=new RegExp(["\\",e[0],"[^\\",e[0],"\\",e[1],"]*\\",e[1]].join("")),r=[];function a(t,a,o){var s=n.push(t.slice(e[0].length,-e[1].length))-1;return r.push(s),i+s+i}n.forEach((function(e,r){for(var i,o=0;e!=i;)if(i=e,e=e.replace(t,a),o++>1e4)throw Error("References have circular dependency. Please, check them.");n[r]=e})),r=r.reverse(),n=n.map((function(t){return r.forEach((function(n){t=t.replace(new RegExp("(\\"+i+n+"\\"+i+")","g"),e[0]+"$1"+e[1])})),t}))}));var o=new RegExp("\\"+i+"([0-9]+)\\"+i);return a?n:function e(t,n,r){for(var i,a=[],s=0;i=o.exec(t);){if(s++>1e4)throw Error("Circular references in parenthesis");a.push(t.slice(0,i.index)),a.push(e(n[i[1]],n)),t=t.slice(i.index+i[0].length)}return a.push(t),a}(n[0],n)}function n(e,t){if(t&&t.flat){var n,r=t&&t.escape||"___",i=e[0];if(!i)return"";for(var a=new RegExp("\\"+r+"([0-9]+)\\"+r),o=0;i!=n;){if(o++>1e4)throw Error("Circular references in "+e);n=i,i=i.replace(a,s)}return i}return e.reduce((function e(t,n){return Array.isArray(n)&&(n=n.reduce(e,"")),t+n}),"");function s(t,n){if(null==e[n])throw Error("Reference "+n+"is undefined");return e[n]}}function r(e,r){return Array.isArray(e)?n(e,r):t(e,r)}r.parse=t,r.stringify=n,e.exports=r},18863:function(e,t,n){"use strict";var r=n(71299);e.exports=function(e){var t;arguments.length>1&&(e=arguments);"string"===typeof e?e=e.split(/\s/).map(parseFloat):"number"===typeof e&&(e=[e]);e.length&&"number"===typeof e[0]?t=1===e.length?{width:e[0],height:e[0],x:0,y:0}:2===e.length?{width:e[0],height:e[1],x:0,y:0}:{x:e[0],y:e[1],width:e[2]-e[0]||0,height:e[3]-e[1]||0}:e&&(t={x:(e=r(e,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"})).left||0,y:e.top||0},null==e.width?e.right?t.width=e.right-t.x:t.width=0:t.width=e.width,null==e.height?e.bottom?t.height=e.bottom-t.y:t.height=0:t.height=e.height);return t}},95616:function(e){e.exports=function(e){var i=[];return e.replace(n,(function(e,n,a){var o=n.toLowerCase();for(a=function(e){var t=e.match(r);return t?t.map(Number):[]}(a),"m"==o&&a.length>2&&(i.push([n].concat(a.splice(0,2))),o="l",n="m"==n?"l":"L");;){if(a.length==t[o])return a.unshift(n),i.push(a);if(a.lengtha!==f>a&&i<(h-u)*(a-d)/(f-d)+u&&(o=!o)}return o}},52142:function(e,t,n){var r,i=n(69444),a=n(29023),o=n(87263),s=n(11328),l=n(55968),c=n(10670),u=!1,d=a();function h(e,t,n){var i=r.segments(e),a=r.segments(t),o=n(r.combine(i,a));return r.polygon(o)}r={buildLog:function(e){return!0===e?u=i():!1===e&&(u=!1),!1!==u&&u.list},epsilon:function(e){return d.epsilon(e)},segments:function(e){var t=o(!0,d,u);return e.regions.forEach(t.addRegion),{segments:t.calculate(e.inverted),inverted:e.inverted}},combine:function(e,t){return{combined:o(!1,d,u).calculate(e.segments,e.inverted,t.segments,t.inverted),inverted1:e.inverted,inverted2:t.inverted}},selectUnion:function(e){return{segments:l.union(e.combined,u),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:l.intersect(e.combined,u),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:l.difference(e.combined,u),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:l.differenceRev(e.combined,u),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:l.xor(e.combined,u),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:s(e.segments,d,u),inverted:e.inverted}},polygonFromGeoJSON:function(e){return c.toPolygon(r,e)},polygonToGeoJSON:function(e){return c.fromPolygon(r,d,e)},union:function(e,t){return h(e,t,r.selectUnion)},intersect:function(e,t){return h(e,t,r.selectIntersect)},difference:function(e,t){return h(e,t,r.selectDifference)},differenceRev:function(e,t){return h(e,t,r.selectDifferenceRev)},xor:function(e,t){return h(e,t,r.selectXor)}},"object"===typeof window&&(window.PolyBool=r),e.exports=r},69444:function(e){e.exports=function(){var e,t=0,n=!1;function r(t,n){return e.list.push({type:t,data:n?JSON.parse(JSON.stringify(n)):void 0}),e}return e={list:[],segmentId:function(){return t++},checkIntersection:function(e,t){return r("check",{seg1:e,seg2:t})},segmentChop:function(e,t){return r("div_seg",{seg:e,pt:t}),r("chop",{seg:e,pt:t})},statusRemove:function(e){return r("pop_seg",{seg:e})},segmentUpdate:function(e){return r("seg_update",{seg:e})},segmentNew:function(e,t){return r("new_seg",{seg:e,primary:t})},segmentRemove:function(e){return r("rem_seg",{seg:e})},tempStatus:function(e,t,n){return r("temp_status",{seg:e,above:t,below:n})},rewind:function(e){return r("rewind",{seg:e})},status:function(e,t,n){return r("status",{seg:e,above:t,below:n})},vert:function(t){return t===n?e:(n=t,r("vert",{x:t}))},log:function(e){return"string"!==typeof e&&(e=JSON.stringify(e,!1," ")),r("log",{txt:e})},reset:function(){return r("reset")},selected:function(e){return r("selected",{segs:e})},chainStart:function(e){return r("chain_start",{seg:e})},chainRemoveHead:function(e,t){return r("chain_rem_head",{index:e,pt:t})},chainRemoveTail:function(e,t){return r("chain_rem_tail",{index:e,pt:t})},chainNew:function(e,t){return r("chain_new",{pt1:e,pt2:t})},chainMatch:function(e){return r("chain_match",{index:e})},chainClose:function(e){return r("chain_close",{index:e})},chainAddHead:function(e,t){return r("chain_add_head",{index:e,pt:t})},chainAddTail:function(e,t){return r("chain_add_tail",{index:e,pt:t})},chainConnect:function(e,t){return r("chain_con",{index1:e,index2:t})},chainReverse:function(e){return r("chain_rev",{index:e})},chainJoin:function(e,t){return r("chain_join",{index1:e,index2:t})},done:function(){return r("done")}}}},29023:function(e){e.exports=function(e){"number"!==typeof e&&(e=1e-10);var t={epsilon:function(t){return"number"===typeof t&&(e=t),e},pointAboveOrOnLine:function(t,n,r){var i=n[0],a=n[1],o=r[0],s=r[1],l=t[0];return(o-i)*(t[1]-a)-(s-a)*(l-i)>=-e},pointBetween:function(t,n,r){var i=t[1]-n[1],a=r[0]-n[0],o=t[0]-n[0],s=r[1]-n[1],l=o*a+i*s;return!(l-e)},pointsSameX:function(t,n){return Math.abs(t[0]-n[0])e!=o-i>e&&(a-c)*(i-u)/(o-u)+c-r>e&&(s=!s),a=c,o=u}return s}};return t}},10670:function(e){var t={toPolygon:function(e,t){function n(t){if(t.length<=0)return e.segments({inverted:!1,regions:[]});function n(t){var n=t.slice(0,t.length-1);return e.segments({inverted:!1,regions:[n]})}for(var r=n(t[0]),i=1;i0}))}function u(e,r){var i=e.seg,a=r.seg,o=i.start,s=i.end,c=a.start,u=a.end;n&&n.checkIntersection(i,a);var d=t.linesIntersect(o,s,c,u);if(!1===d){if(!t.pointsCollinear(o,s,c))return!1;if(t.pointsSame(o,u)||t.pointsSame(s,c))return!1;var h=t.pointsSame(o,c),f=t.pointsSame(s,u);if(h&&f)return r;var p=!h&&t.pointBetween(o,c,u),m=!f&&t.pointBetween(s,c,u);if(h)return m?l(r,s):l(e,u),r;p&&(f||(m?l(r,s):l(e,u)),l(r,o))}else 0===d.alongA&&(-1===d.alongB?l(e,c):0===d.alongB?l(e,d.pt):1===d.alongB&&l(e,u)),0===d.alongB&&(-1===d.alongA?l(r,o):0===d.alongA?l(r,d.pt):1===d.alongA&&l(r,s));return!1}for(var d=[];!a.isEmpty();){var h=a.getHead();if(n&&n.vert(h.pt[0]),h.isStart){n&&n.segmentNew(h.seg,h.primary);var f=c(h),p=f.before?f.before.ev:null,m=f.after?f.after.ev:null;function g(){if(p){var e=u(h,p);if(e)return e}return!!m&&u(h,m)}n&&n.tempStatus(h.seg,!!p&&p.seg,!!m&&m.seg);var v,y=g();if(y){var x;if(e)(x=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below)&&(y.seg.myFill.above=!y.seg.myFill.above);else y.seg.otherFill=h.seg.myFill;n&&n.segmentUpdate(y.seg),h.other.remove(),h.remove()}if(a.getHead()!==h){n&&n.rewind(h.seg);continue}if(e)x=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below,h.seg.myFill.below=m?m.seg.myFill.above:i,h.seg.myFill.above=x?!h.seg.myFill.below:h.seg.myFill.below;else if(null===h.seg.otherFill)v=m?h.primary===m.primary?m.seg.otherFill.above:m.seg.myFill.above:h.primary?o:i,h.seg.otherFill={above:v,below:v};n&&n.status(h.seg,!!p&&p.seg,!!m&&m.seg),h.other.status=f.insert(r.node({ev:h}))}else{var b=h.status;if(null===b)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(s.exists(b.prev)&&s.exists(b.next)&&u(b.prev.ev,b.next.ev),n&&n.statusRemove(b.ev.seg),b.remove(),!h.primary){var _=h.seg.myFill;h.seg.myFill=h.seg.otherFill,h.seg.otherFill=_}d.push(h.seg)}a.getHead().remove()}return n&&n.done(),d}return e?{addRegion:function(e){for(var r,i,a,o=e[e.length-1],l=0;l0&&!this.aborted;){var n=this.ifds_to_read.shift();n.offset&&this.scan_ifd(n.id,n.offset,e)}},r.prototype.read_uint16=function(e){var n=this.input;if(e+2>n.length)throw t("unexpected EOF","EBADDATA");return this.big_endian?256*n[e]+n[e+1]:n[e]+256*n[e+1]},r.prototype.read_uint32=function(e){var n=this.input;if(e+4>n.length)throw t("unexpected EOF","EBADDATA");return this.big_endian?16777216*n[e]+65536*n[e+1]+256*n[e+2]+n[e+3]:n[e]+256*n[e+1]+65536*n[e+2]+16777216*n[e+3]},r.prototype.is_subifd_link=function(e,t){return 0===e&&34665===t||0===e&&34853===t||34665===e&&40965===t},r.prototype.exif_format_length=function(e){switch(e){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},r.prototype.exif_format_read=function(e,t){var n;switch(e){case 1:case 2:return n=this.input[t];case 6:return(n=this.input[t])|33554430*(128&n);case 3:return n=this.read_uint16(t);case 8:return(n=this.read_uint16(t))|131070*(32768&n);case 4:return n=this.read_uint32(t);case 9:return 0|(n=this.read_uint32(t));default:return null}},r.prototype.scan_ifd=function(e,r,i){var a=this.read_uint16(r);r+=2;for(var o=0;othis.input.length)throw t("unexpected EOF","EBADDATA");for(var p=[],m=h,g=0;g0&&(this.ifds_to_read.push({id:s,offset:p[0]}),f=!0),!1===i({is_big_endian:this.big_endian,ifd:e,tag:s,format:l,count:c,entry_offset:r+this.start,data_length:d,data_offset:h+this.start,value:p,is_subifd_link:f}))return void(this.aborted=!0);r+=12}0===e&&this.ifds_to_read.push({id:1,offset:this.read_uint32(r)})},e.exports.ExifParser=r,e.exports.get_orientation=function(e){var t=0;try{return new r(e,0,e.length).each((function(e){if(0===e.ifd&&274===e.tag&&Array.isArray(e.value))return t=e.value[0],!1})),t}catch(n){return-1}}},76767:function(e,t,n){"use strict";var r=n(14847).n8,i=n(14847).Ag;function a(e,t){if(e.length<4+t)return null;var n=i(e,t);return e.length>4&15,i=15&e[4],a=e[5]>>4&15,o=r(e,6),l=8,c=0;ct.width||e.width===t.width&&e.height>t.height?e:t})),n=e.reduce((function(e,t){return e.height>t.height||e.height===t.height&&e.width>t.width?e:t}));return t.width>n.height||t.width===n.height&&t.height>n.width?t:n}(t.sizes),r=1;t.transforms.forEach((function(e){var t={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},n={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if("imir"===e.type&&(r=0===e.value?n[r]:t[r=t[r=n[r]]]),"irot"===e.type)for(var i=0;i1&&(h.variants=d.variants),d.orientation&&(h.orientation=d.orientation),d.exif_location&&d.exif_location.offset+d.exif_location.length<=e.length){var f=a(e,d.exif_location.offset),p=e.slice(d.exif_location.offset+f+4,d.exif_location.offset+d.exif_location.length),m=s.get_orientation(p);m>0&&(h.orientation=m)}return h}}}}}}},2504:function(e,t,n){"use strict";var r=n(14847).eG,i=n(14847).OF,a=n(14847).mP,o=r("BM");e.exports=function(e){if(!(e.length<26)&&i(e,0,o))return{width:a(e,18),height:a(e,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}},47342:function(e,t,n){"use strict";var r=n(14847).eG,i=n(14847).OF,a=n(14847).mP,o=r("GIF87a"),s=r("GIF89a");e.exports=function(e){if(!(e.length<10)&&(i(e,0,o)||i(e,0,s)))return{width:a(e,6),height:a(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}},31355:function(e,t,n){"use strict";var r=n(14847).mP;e.exports=function(e){var t=r(e,0),n=r(e,2),i=r(e,4);if(0===t&&1===n&&i){for(var a=[],o={width:0,height:0},s=0;so.width||c>o.height)&&(o=u)}return{width:o.width,height:o.height,variants:a,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}},54261:function(e,t,n){"use strict";var r=n(14847).n8,i=n(14847).eG,a=n(14847).OF,o=n(71371),s=i("Exif\0\0");e.exports=function(e){if(!(e.length<2)&&255===e[0]&&216===e[1]&&255===e[2])for(var t=2;;){for(;;){if(e.length-t<2)return;if(255===e[t++])break}for(var n,i,l=e[t++];255===l;)l=e[t++];if(208<=l&&l<=217||1===l)n=0;else{if(!(192<=l&&l<=254))return;if(e.length-t<2)return;n=r(e,t)-2,t+=2}if(217===l||218===l)return;if(225===l&&n>=10&&a(e,t,s)&&(i=o.get_orientation(e.slice(t+6,t+n))),n>=5&&192<=l&&l<=207&&196!==l&&200!==l&&204!==l){if(e.length-t0&&(c.orientation=i),c}t+=n}}},6303:function(e,t,n){"use strict";var r=n(14847).eG,i=n(14847).OF,a=n(14847).Ag,o=r("\x89PNG\r\n\x1a\n"),s=r("IHDR");e.exports=function(e){if(!(e.length<24)&&i(e,0,o)&&i(e,12,s))return{width:a(e,16),height:a(e,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}},38689:function(e,t,n){"use strict";var r=n(14847).eG,i=n(14847).OF,a=n(14847).Ag,o=r("8BPS\0\x01");e.exports=function(e){if(!(e.length<22)&&i(e,0,o))return{width:a(e,18),height:a(e,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}},6881:function(e){"use strict";function t(e){return"number"===typeof e&&isFinite(e)&&e>0}var n=/<[-_.:a-zA-Z0-9][^>]*>/,r=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,i=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,a=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,o=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,s=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function l(e){return s.test(e)?e.match(s)[0]:"px"}e.exports=function(e){if(function(e){var t,n=0,r=e.length;for(239===e[0]&&187===e[1]&&191===e[2]&&(n=3);n>14&16383),type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function h(e,t){return{width:1+(e[t+6]<<16|e[t+5]<<8|e[t+4]),height:1+(e[t+9]<e.length)){for(;t+8=10?n=n||u(e,t+8):"VP8L"===f&&p>=9?n=n||d(e,t+8):"VP8X"===f&&p>=10?n=n||h(e,t+8):"EXIF"===f&&(r=s.get_orientation(e.slice(t+8,t+8+p)),t=1/0),t+=8+p}else t++;if(n)return r>0&&(n.orientation=r),n}}}},91497:function(e,t,n){"use strict";e.exports={avif:n(24461),bmp:n(2504),gif:n(47342),ico:n(31355),jpeg:n(54261),png:n(6303),psd:n(38689),svg:n(6881),tiff:n(66278),webp:n(90784)}},33575:function(e,t,n){"use strict";var r=n(91497);e.exports=function(e){return function(e){for(var t=Object.keys(r),n=0;n1)for(var n=1;n1&&(e.scaleRatio=[e.scale[0]*e.viewport.width,e.scale[1]*e.viewport.height],n(e),e.after&&e.after(e))}function A(e){if(e){null!=e.length?"number"===typeof e[0]&&(e=[{positions:e}]):Array.isArray(e)||(e=[e]);var t=0,n=0;if(b.groups=x=e.map((function(e,c){var u=x[c];return e?("function"===typeof e?e={after:e}:"number"===typeof e[0]&&(e={positions:e}),e=o(e,{color:"color colors fill",capSize:"capSize cap capsize cap-size",lineWidth:"lineWidth line-width width line thickness",opacity:"opacity alpha",range:"range dataBox",viewport:"viewport viewBox",errors:"errors error",positions:"positions position data points"}),u||(x[c]=u={id:c,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},e=s({},y,e)),a(u,e,[{lineWidth:function(e){return.5*+e},capSize:function(e){return.5*+e},opacity:parseFloat,errors:function(e){return e=l(e),n+=e.length,e},positions:function(e,n){return e=l(e,"float64"),n.count=Math.floor(e.length/2),n.bounds=r(e,2),n.offset=t,t+=n.count,e}},{color:function(e,t){var n=t.count;if(e||(e="transparent"),!Array.isArray(e)||"number"===typeof e[0]){var r=e;e=Array(n);for(var a=0;a 0. && baClipping < length(normalWidth * endBotJoin)) {\n\t\t//handle miter clipping\n\t\tbTopCoord -= normalWidth * endTopJoin;\n\t\tbTopCoord += normalize(endTopJoin * normalWidth) * baClipping;\n\t}\n\n\tif (nextReverse) {\n\t\t//make join rectangular\n\t\tvec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5;\n\t\tfloat normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.);\n\t\tbBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\n\t\tbTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\n\t}\n\telse if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) {\n\t\t//handle miter clipping\n\t\taBotCoord -= normalWidth * startBotJoin;\n\t\taBotCoord += normalize(startBotJoin * normalWidth) * abClipping;\n\t}\n\n\tvec2 aTopPosition = (aTopCoord) * adjustedScale + translate;\n\tvec2 aBotPosition = (aBotCoord) * adjustedScale + translate;\n\n\tvec2 bTopPosition = (bTopCoord) * adjustedScale + translate;\n\tvec2 bBotPosition = (bBotCoord) * adjustedScale + translate;\n\n\t//position is normalized 0..1 coord on the screen\n\tvec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd;\n\n\tstartCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\tendCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tenableStartMiter = step(dot(currTangent, prevTangent), .5);\n\tenableEndMiter = step(dot(currTangent, nextTangent), .5);\n\n\t//bevel miter cutoffs\n\tif (miterMode == 1.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5;\n\t\t\tstartCutoff = vec4(aCoord, aCoord);\n\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tstartCutoff += viewport.xyxy;\n\t\t\tstartCutoff += startMiterWidth.xyxy;\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5;\n\t\t\tendCutoff = vec4(bCoord, bCoord);\n\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;\n\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tendCutoff += viewport.xyxy;\n\t\t\tendCutoff += endMiterWidth.xyxy;\n\t\t}\n\t}\n\n\t//round miter cutoffs\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5;\n\t\t\tstartCutoff = vec4(aCoord, aCoord);\n\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tstartCutoff += viewport.xyxy;\n\t\t\tstartCutoff += startMiterWidth.xyxy;\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5;\n\t\t\tendCutoff = vec4(bCoord, bCoord);\n\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;\n\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tendCutoff += viewport.xyxy;\n\t\t\tendCutoff += endMiterWidth.xyxy;\n\t\t}\n\t}\n}\n"]),frag:o(["precision highp float;\n#define GLSLIFY 1\n\nuniform float dashLength, pixelRatio, thickness, opacity, id, miterMode;\nuniform sampler2D dashTexture;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\nvarying vec4 startCutoff, endCutoff;\nvarying vec2 startCoord, endCoord;\nvarying float enableStartMiter, enableEndMiter;\n\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\n\tvec2 diff = b - a;\n\tvec2 perp = normalize(vec2(-diff.y, diff.x));\n\treturn dot(p - a, perp);\n}\n\nvoid main() {\n\tfloat alpha = 1., distToStart, distToEnd;\n\tfloat cutoff = thickness * .5;\n\n\t//bevel miter\n\tif (miterMode == 1.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart < -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToStart + 1., 0.), 1.);\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd < -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToEnd + 1., 0.), 1.);\n\t\t}\n\t}\n\n\t// round miter\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart < 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - startCoord);\n\n\t\t\t\tif(radius > cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd < 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - endCoord);\n\n\t\t\t\tif(radius > cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\t}\n\n\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;\n\tfloat dash = texture2D(dashTexture, vec2(t, .5)).r;\n\n\tgl_FragColor = fragColor;\n\tgl_FragColor.a *= alpha * opacity * dash;\n}\n"]),attributes:{lineEnd:{buffer:n,divisor:0,stride:8,offset:0},lineTop:{buffer:n,divisor:0,stride:8,offset:4},aColor:{buffer:e.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:e.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},r))}catch(s){t=i}return{fill:e({primitive:"triangle",elements:function(e,t){return t.triangles},offset:0,vert:o(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec2 position, positionFract;\n\nuniform vec4 color;\nuniform vec2 scale, scaleFract, translate, translateFract;\nuniform float pixelRatio, id;\nuniform vec4 viewport;\nuniform float opacity;\n\nvarying vec4 fragColor;\n\nconst float MAX_LINES = 256.;\n\nvoid main() {\n\tfloat depth = (MAX_LINES - 4. - id) / (MAX_LINES);\n\n\tvec2 position = position * scale + translate\n + positionFract * scale + translateFract\n + position * scaleFract\n + positionFract * scaleFract;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tfragColor = color / 255.;\n\tfragColor.a *= opacity;\n}\n"]),frag:o(["precision highp float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor;\n\nvoid main() {\n\tgl_FragColor = fragColor;\n}\n"]),uniforms:{scale:e.prop("scale"),color:e.prop("fill"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),viewport:function(e,t){return[t.viewport.x,t.viewport.y,e.viewportWidth,e.viewportHeight]}},attributes:{position:{buffer:e.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8}},blend:r.blend,depth:{enable:!1},scissor:r.scissor,stencil:r.stencil,viewport:r.viewport}),rect:i,miter:t}},v.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null},v.prototype.render=function(){for(var e,t=[],n=arguments.length;n--;)t[n]=arguments[n];t.length&&(e=this).update.apply(e,t),this.draw()},v.prototype.draw=function(){for(var e=this,t=[],n=arguments.length;n--;)t[n]=arguments[n];return(t.length?t:this.passes).forEach((function(t,n){var r;if(t&&Array.isArray(t))return(r=e).draw.apply(r,t);"number"===typeof t&&(t=e.passes[t]),t&&t.count>1&&t.opacity&&(e.regl._refresh(),t.fill&&t.triangles&&t.triangles.length>2&&e.shaders.fill(t),t.thickness&&(t.scale[0]*t.viewport.width>v.precisionThreshold||t.scale[1]*t.viewport.height>v.precisionThreshold||"rect"===t.join||!t.join&&(t.thickness<=2||t.count>=v.maxPoints)?e.shaders.rect(t):e.shaders.miter(t)))})),this},v.prototype.update=function(e){var t=this;if(e){null!=e.length?"number"===typeof e[0]&&(e=[{positions:e}]):Array.isArray(e)||(e=[e]);var n=this.regl,o=this.gl;if(e.forEach((function(e,d){var p=t.passes[d];if(void 0!==e)if(null!==e){if("number"===typeof e[0]&&(e={positions:e}),e=s(e,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),p||(t.passes[d]=p={id:d,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:n.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:n.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:n.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:n.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},e=a({},v.defaults,e)),null!=e.thickness&&(p.thickness=parseFloat(e.thickness)),null!=e.opacity&&(p.opacity=parseFloat(e.opacity)),null!=e.miterLimit&&(p.miterLimit=parseFloat(e.miterLimit)),null!=e.overlay&&(p.overlay=!!e.overlay,d=I}));(P=P.slice(0,z)).push(I)}for(var N=function(e){var t=S.slice(2*L,2*P[e]).concat(I?S.slice(2*I):[]),n=(p.hole||[]).map((function(t){return t-I+(P[e]-L)})),r=c(t,n);r=r.map((function(t){return t+L+(t+Le.length)&&(t=e.length);for(var n=0,r=new Array(t);n 1.0 + delta) {\n\t\tdiscard;\n\t}\n\n\talpha -= smoothstep(1.0 - delta, 1.0 + delta, radius);\n\n\tfloat borderRadius = fragBorderRadius;\n\tfloat ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius);\n\tvec4 color = mix(fragColor, fragBorderColor, ratio);\n\tcolor.a *= alpha * opacity;\n\tgl_FragColor = color;\n}\n"]),c.vert=h(["precision highp float;\n#define GLSLIFY 1\n\nattribute float x, y, xFract, yFract;\nattribute float size, borderSize;\nattribute vec4 colorId, borderColorId;\nattribute float isActive;\n\nuniform bool constPointSize;\nuniform float pixelRatio;\nuniform vec2 paletteSize, scale, scaleFract, translate, translateFract;\nuniform sampler2D paletteTexture;\n\nconst float maxSize = 100.;\n\nvarying vec4 fragColor, fragBorderColor;\nvarying float fragBorderRadius, fragWidth;\n\nfloat pointSizeScale = (constPointSize) ? 2. : pixelRatio;\n\nbool isDirect = (paletteSize.x < 1.);\n\nvec4 getColor(vec4 id) {\n return isDirect ? id / 255. : texture2D(paletteTexture,\n vec2(\n (id.x + .5) / paletteSize.x,\n (id.y + .5) / paletteSize.y\n )\n );\n}\n\nvoid main() {\n // ignore inactive points\n if (isActive == 0.) return;\n\n vec2 position = vec2(x, y);\n vec2 positionFract = vec2(xFract, yFract);\n\n vec4 color = getColor(colorId);\n vec4 borderColor = getColor(borderColorId);\n\n float size = size * maxSize / 255.;\n float borderSize = borderSize * maxSize / 255.;\n\n gl_PointSize = (size + borderSize) * pointSizeScale;\n\n vec2 pos = (position + translate) * scale\n + (positionFract + translateFract) * scale\n + (position + translate) * scaleFract\n + (positionFract + translateFract) * scaleFract;\n\n gl_Position = vec4(pos * 2. - 1., 0., 1.);\n\n fragBorderRadius = 1. - 2. * borderSize / (size + borderSize);\n fragColor = color;\n fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor;\n fragWidth = 1. / gl_PointSize;\n}\n"]),g&&(c.frag=c.frag.replace("smoothstep","smoothStep"),l.frag=l.frag.replace("smoothstep","smoothStep")),this.drawCircle=e(c)}b.defaults={color:"black",borderColor:"transparent",borderSize:0,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,count:0,offset:0,bounds:null,positions:[],snap:1e4},b.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},b.prototype.draw=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;rr)?t.tree=u(e,{bounds:d}):r&&r.length&&(t.tree=r),t.tree){var h={primitive:"points",usage:"static",data:t.tree,type:"uint32"};t.elements?t.elements(h):t.elements=o.elements(h)}var f=v.float32(e);return i({data:f,usage:"dynamic"}),a({data:v.fract32(e,f),usage:"dynamic"}),s({data:new Uint8Array(c),type:"uint8",usage:"stream"}),e}},{marker:function(t,n,r){var i=n.activation;if(i.forEach((function(e){return e&&e.destroy&&e.destroy()})),i.length=0,t&&"number"!==typeof t[0]){for(var a=[],s=0,l=Math.min(t.length,n.count);s=0)return a;if(e instanceof Uint8Array||e instanceof Uint8ClampedArray)t=e;else{t=new Uint8Array(e.length);for(var o=0,s=e.length;o4*r&&(this.tooManyColors=!0),this.updatePalette(n),1===i.length?i[0]:i},b.prototype.updatePalette=function(e){if(!this.tooManyColors){var t=this.maxColors,n=this.paletteTexture,r=Math.ceil(.25*e.length/t);if(r>1)for(var i=.25*(e=e.slice()).length%t;i2?(s[0],s[2],r=s[1],i=s[3]):s.length?(r=s[0],i=s[1]):(s.x,r=s.y,s.x+s.width,i=s.y+s.height),l.length>2?(a=l[0],o=l[2],l[1],l[3]):l.length?(a=l[0],o=l[1]):(a=l.x,l.y,o=l.x+l.width,l.y+l.height),[a,r,o,i]}function f(e){if("number"===typeof e)return[e,e,e,e];if(2===e.length)return[e[0],e[1],e[0],e[1]];var t=l(e);return[t.x,t.y,t.x+t.width,t.y+t.height]}e.exports=u,u.prototype.render=function(){for(var e,t=this,n=[],r=arguments.length;r--;)n[r]=arguments[r];return n.length&&(e=this).update.apply(e,n),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?null==this.planned&&(this.planned=o((function(){t.draw(),t.dirty=!0,t.planned=null}))):(this.draw(),this.dirty=!0,o((function(){t.dirty=!1}))),this)},u.prototype.update=function(){for(var e,t=[],n=arguments.length;n--;)t[n]=arguments[n];if(t.length){for(var r=0;rS))&&(s.lower||!(A>>=t))<<3,(t|=n=(15<(e>>>=n))<<2)|(n=(3<(e>>>=n))<<1)|e>>>n>>1}function f(){function e(e){e:{for(var t=16;268435456>=t;t*=16)if(e<=t){e=t;break e}e=0}return 0<(t=n[h(e)>>2]).length?t.pop():new ArrayBuffer(e)}function t(e){n[h(e.byteLength)>>2].push(e)}var n=d(8,(function(){return[]}));return{alloc:e,free:t,allocType:function(t,n){var r=null;switch(t){case 5120:r=new Int8Array(e(n),0,n);break;case 5121:r=new Uint8Array(e(n),0,n);break;case 5122:r=new Int16Array(e(2*n),0,n);break;case 5123:r=new Uint16Array(e(2*n),0,n);break;case 5124:r=new Int32Array(e(4*n),0,n);break;case 5125:r=new Uint32Array(e(4*n),0,n);break;case 5126:r=new Float32Array(e(4*n),0,n);break;default:return null}return r.length!==n?r.subarray(0,n):r},freeType:function(e){t(e.buffer)}}}function p(e){return!!e&&"object"===typeof e&&Array.isArray(e.shape)&&Array.isArray(e.stride)&&"number"===typeof e.offset&&e.shape.length===e.stride.length&&(Array.isArray(e.data)||oe(e.data))}function m(e,t,n,r,i,a){for(var o=0;o(i=s)&&(i=r.buffer.byteLength,5123===u?i>>=1:5125===u&&(i>>=2)),r.vertCount=i,i=o,0>o&&(i=4,1===(o=r.buffer.dimension)&&(i=0),2===o&&(i=1),3===o&&(i=4)),r.primType=i}function o(e){r.elementsCount--,delete s[e.id],e.buffer.destroy(),e.buffer=null}var s={},l=0,c={uint8:5121,uint16:5123};t.oes_element_index_uint&&(c.uint32=5125),i.prototype.bind=function(){this.buffer.bind()};var u=[];return{create:function(e,t){function s(e){if(e)if("number"===typeof e)l(e),u.primType=4,u.vertCount=0|e,u.type=5121;else{var t=null,n=35044,r=-1,i=-1,o=0,d=0;Array.isArray(e)||oe(e)||p(e)?t=e:("data"in e&&(t=e.data),"usage"in e&&(n=de[e.usage]),"primitive"in e&&(r=me[e.primitive]),"count"in e&&(i=0|e.count),"type"in e&&(d=c[e.type]),"length"in e?o=0|e.length:(o=i,5123===d||5122===d?o*=2:5125!==d&&5124!==d||(o*=4))),a(u,t,n,r,i,o,d)}else l(),u.primType=4,u.vertCount=0,u.type=5121;return s}var l=n.create(null,34963,!0),u=new i(l._buffer);return r.elementsCount++,s(e),s._reglType="elements",s._elements=u,s.subdata=function(e,t){return l.subdata(e,t),s},s.destroy=function(){o(u)},s},createStream:function(e){var t=u.pop();return t||(t=new i(n.create(null,34963,!0,!1)._buffer)),a(t,e,35040,-1,-1,0,0),t},destroyStream:function(e){u.push(e)},getElements:function(e){return"function"===typeof e&&e._elements instanceof i?e._elements:null},clear:function(){se(s).forEach(o)}}}function w(e){for(var t=ie.allocType(5123,e.length),n=0;n>>31<<15,i=(a<<1>>>24)-127,a=a>>13&1023;t[n]=-24>i?r:-14>i?r+(a+1024>>-14-i):15>=i,n.height>>=i,h(n,r[i]),e.mipmask|=1<t;++t)e.images[t]=null;return e}function S(e){for(var t=e.images,n=0;nt){for(var n=0;n=--this.refCount&&N(this)}}),o.profile&&(a.getTotalTextureSize=function(){var e=0;return Object.keys(ae).forEach((function(t){e+=ae[t].stats.size})),e}),{create2D:function(t,n){function r(e,t){var n=i.texInfo;R.call(n);var a=_();return"number"===typeof e?y(a,0|e,"number"===typeof t?0|t:0|e):e?(P(n,e),x(a,e)):y(a,1,1),n.genMipmaps&&(a.mipmask=(a.width<<1)-1),i.mipmask=a.mipmask,l(i,a),i.internalformat=a.internalformat,r.width=a.width,r.height=a.height,I(i),b(a,3553),O(n,3553),z(),S(a),o.profile&&(i.stats.size=D(i.internalformat,i.type,a.width,a.height,n.genMipmaps,!1)),r.format=$[i.internalformat],r.type=X[i.type],r.mag=Z[n.magFilter],r.min=K[n.minFilter],r.wrapS=J[n.wrapS],r.wrapT=J[n.wrapT],r}var i=new L(3553);return ae[i.id]=i,a.textureCount++,r(t,n),r.subimage=function(e,t,n,a){t|=0,n|=0,a|=0;var o=m();return l(o,i),o.width=0,o.height=0,h(o,e),o.width=o.width||(i.width>>a)-t,o.height=o.height||(i.height>>a)-n,I(i),f(o,3553,t,n,a),z(),g(o),r},r.resize=function(t,n){var a=0|t,s=0|n||a;if(a===i.width&&s===i.height)return r;r.width=i.width=a,r.height=i.height=s,I(i);for(var l=0;i.mipmask>>l;++l){var c=a>>l,u=s>>l;if(!c||!u)break;e.texImage2D(3553,l,i.format,c,u,0,i.format,i.type,null)}return z(),o.profile&&(i.stats.size=D(i.internalformat,i.type,a,s,!1,!1)),r},r._reglType="texture2d",r._texture=i,o.profile&&(r.stats=i.stats),r.destroy=function(){i.decRef()},r},createCube:function(t,n,r,i,s,u){function d(e,t,n,r,i,a){var s,u=p.texInfo;for(R.call(u),s=0;6>s;++s)v[s]=_();if("number"!==typeof e&&e){if("object"===typeof e)if(t)x(v[0],e),x(v[1],t),x(v[2],n),x(v[3],r),x(v[4],i),x(v[5],a);else if(P(u,e),c(p,e),"faces"in e)for(e=e.faces,s=0;6>s;++s)l(v[s],p),x(v[s],e[s]);else for(s=0;6>s;++s)x(v[s],e)}else for(e=0|e||1,s=0;6>s;++s)y(v[s],e,e);for(l(p,v[0]),p.mipmask=u.genMipmaps?(v[0].width<<1)-1:v[0].mipmask,p.internalformat=v[0].internalformat,d.width=v[0].width,d.height=v[0].height,I(p),s=0;6>s;++s)b(v[s],34069+s);for(O(u,34067),z(),o.profile&&(p.stats.size=D(p.internalformat,p.type,d.width,d.height,u.genMipmaps,!0)),d.format=$[p.internalformat],d.type=X[p.type],d.mag=Z[u.magFilter],d.min=K[u.minFilter],d.wrapS=J[u.wrapS],d.wrapT=J[u.wrapT],s=0;6>s;++s)S(v[s]);return d}var p=new L(34067);ae[p.id]=p,a.cubeCount++;var v=Array(6);return d(t,n,r,i,s,u),d.subimage=function(e,t,n,r,i){n|=0,r|=0,i|=0;var a=m();return l(a,p),a.width=0,a.height=0,h(a,t),a.width=a.width||(p.width>>i)-n,a.height=a.height||(p.height>>i)-r,I(p),f(a,34069+e,n,r,i),z(),g(a),d},d.resize=function(t){if((t|=0)!==p.width){d.width=p.width=t,d.height=p.height=t,I(p);for(var n=0;6>n;++n)for(var r=0;p.mipmask>>r;++r)e.texImage2D(34069+n,r,p.format,t>>r,t>>r,0,p.format,p.type,null);return z(),o.profile&&(p.stats.size=D(p.internalformat,p.type,d.width,d.height,!1,!0)),d}},d._reglType="textureCube",d._texture=p,o.profile&&(d.stats=p.stats),d.destroy=function(){p.decRef()},d},clear:function(){for(var t=0;tn;++n)if(0!==(t.mipmask&1<>n,t.height>>n,0,t.internalformat,t.type,null);else for(var r=0;6>r;++r)e.texImage2D(34069+r,n,t.internalformat,t.width>>n,t.height>>n,0,t.internalformat,t.type,null);O(t.texInfo,t.target)}))},refresh:function(){for(var t=0;ti;++i){for(c=0;ce;++e)n[e].resize(r);return t.width=t.height=r,t},_reglType:"framebufferCube",destroy:function(){n.forEach((function(e){e.destroy()}))}})},clear:function(){se(S).forEach(g)},restore:function(){x.cur=null,x.next=null,x.dirty=!0,se(S).forEach((function(t){t.framebuffer=e.createFramebuffer(),v(t)}))}})}function O(){this.w=this.z=this.y=this.x=this.state=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=5126,this.divisor=this.stride=this.offset=0}function L(e,t,n,r,i,a,o){function s(e){if(e!==v.currentVAO){var n=t.oes_vertex_array_object;e?n.bindVertexArrayOES(e.vao):n.bindVertexArrayOES(null),v.currentVAO=e}}function l(n){if(n!==v.currentVAO){if(n)n.bindAttrs();else{for(var r=t.angle_instanced_arrays,i=0;i=d.byteLength?l.subdata(d):(l.destroy(),n.buffers[s]=null)),n.buffers[s]||(l=n.buffers[s]=i.create(c,34962,!1,!0)),u.buffer=i.getBuffer(l),u.size=0|u.buffer.dimension,u.normalized=!1,u.type=u.buffer.dtype,u.offset=0,u.stride=0,u.divisor=0,u.state=1,e[s]=1):i.getBuffer(c)?(u.buffer=i.getBuffer(c),u.size=0|u.buffer.dimension,u.normalized=!1,u.type=u.buffer.dtype,u.offset=0,u.stride=0,u.divisor=0,u.state=1):i.getBuffer(c.buffer)?(u.buffer=i.getBuffer(c.buffer),u.size=0|(+c.size||u.buffer.dimension),u.normalized=!!c.normalized||!1,u.type="type"in c?ue[c.type]:u.buffer.dtype,u.offset=0|(c.offset||0),u.stride=0|(c.stride||0),u.divisor=0|(c.divisor||0),u.state=1):"x"in c&&(u.x=+c.x||0,u.y=+c.y||0,u.z=+c.z||0,u.w=+c.w||0,u.state=2)}for(l=0;le&&(e=t.stats.uniformsCount)})),e},n.getMaxAttributesCount=function(){var e=0;return h.forEach((function(t){t.stats.attributesCount>e&&(e=t.stats.attributesCount)})),e}),{clear:function(){var t=e.deleteShader.bind(e);se(c).forEach(t),c={},se(u).forEach(t),u={},h.forEach((function(t){e.deleteProgram(t.program)})),h.length=0,d={},n.shaderCount=0},program:function(t,r,i,a){var o=d[r];o||(o=d[r]={});var f=o[t];if(f&&(f.refCount++,!a))return f;var p=new s(r,t);return n.shaderCount++,l(p,i,a),f||(o[t]=p),h.push(p),Q(p,{destroy:function(){if(p.refCount--,0>=p.refCount){e.deleteProgram(p.program);var t=h.indexOf(p);h.splice(t,1),n.shaderCount--}0>=o[p.vertId].refCount&&(e.deleteShader(u[p.vertId]),delete u[p.vertId],delete d[p.fragId][p.vertId]),Object.keys(d[p.fragId]).length||(e.deleteShader(c[p.fragId]),delete c[p.fragId],delete d[p.fragId])}})},restore:function(){c={},u={};for(var e=0;e>2),n=0;n>5]|=(255&e.charCodeAt(n/8))<<24-n%32;var r,i,a,o,s,l,c,u,d,h,f,p=8*e.length;for(e=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],n=Array(64),t[p>>5]|=128<<24-p%32,t[15+(p+64>>9<<4)]=p,u=0;ud;d++){var m;16>d?n[d]=t[d+u]:(h=d,f=U(f=j(f=n[d-2],17)^j(f,19)^f>>>10,n[d-7]),m=j(m=n[d-15],7)^j(m,18)^m>>>3,n[h]=U(U(f,m),n[d-16])),h=U(U(U(U(c,h=j(h=o,6)^j(h,11)^j(h,25)),o&s^~o&l),Le[d]),n[d]),f=U(c=j(c=p,2)^j(c,13)^j(c,22),p&r^p&i^r&i),c=l,l=s,s=o,o=U(a,h),a=i,i=r,r=p,p=U(h,f)}e[0]=U(p,e[0]),e[1]=U(r,e[1]),e[2]=U(i,e[2]),e[3]=U(a,e[3]),e[4]=U(o,e[4]),e[5]=U(s,e[5]),e[6]=U(l,e[6]),e[7]=U(c,e[7])}for(t="",n=0;n<32*e.length;n+=8)t+=String.fromCharCode(e[n>>5]>>>24-n%32&255);return t}function F(e){for(var t,n="",r=0;r>>4&15)+"0123456789abcdef".charAt(15&t);return n}function B(e){for(var t,n,r="",i=-1;++i=t&&56320<=n&&57343>=n&&(t=65536+((1023&t)<<10)+(1023&n),i++),127>=t?r+=String.fromCharCode(t):2047>=t?r+=String.fromCharCode(192|t>>>6&31,128|63&t):65535>=t?r+=String.fromCharCode(224|t>>>12&15,128|t>>>6&63,128|63&t):2097151>=t&&(r+=String.fromCharCode(240|t>>>18&7,128|t>>>12&63,128|t>>>6&63,128|63&t));return r}function j(e,t){return e>>>t|e<<32-t}function U(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function V(e){return Array.prototype.slice.call(e)}function H(e){return V(e).join("")}function W(e){function t(){var e=[],t=[];return Q((function(){e.push.apply(e,V(arguments))}),{def:function(){var n="v"+i++;return t.push(n),0"+t+"?"+i+".constant["+t+"]:0;"})).join(""),"}}else{","if(",s,"(",i,".buffer)){",u,"=",a,".createStream(",34962,",",i,".buffer);","}else{",u,"=",a,".getBuffer(",i,".buffer);","}",d,'="type" in ',i,"?",o.glTypes,"[",i,".type]:",u,".dtype;",l.normalized,"=!!",i,".normalized;"),r("size"),r("offset"),r("stride"),r("divisor"),n("}}"),n.exit("if(",l.isStream,"){",a,".destroyStream(",u,");","}"),l}))})),o}function R(e){var t=e.static,n=e.dynamic,r={};return Object.keys(t).forEach((function(e){var n=t[e];r[e]=X((function(e,t){return"number"===typeof n||"boolean"===typeof n?""+n:e.link(n)}))})),Object.keys(n).forEach((function(e){var t=n[e];r[e]=Z(t,(function(e,n){return e.invoke(n,t)}))})),r}function P(e,t,r,i,a){function o(e){var t=l[e];t&&(d[e]=t)}var s=M(e,t),l=S(e,f=w(e,a),a),u=k(e,a),d=E(e,a),h=T(e,a,s);o("viewport"),o(v("scissor.box"));var f,p=0>1)",s],");")}function t(){n(l,".drawArraysInstancedANGLE(",[p,m,g,s],");")}f&&"null"!==f?y?e():(n("if(",f,"){"),e(),n("}else{"),t(),n("}")):t()}function o(){function e(){n(u+".drawElements("+[p,g,v,m+"<<(("+v+"-5121)>>1)"]+");")}function t(){n(u+".drawArrays("+[p,m,g]+");")}f&&"null"!==f?y?e():(n("if(",f,"){"),e(),n("}else{"),t(),n("}")):t()}var s,l,c=e.shared,u=c.gl,d=c.draw,h=r.draw,f=function(){var i=h.elements,a=t;return i?((i.contextDep&&r.contextDynamic||i.propDep)&&(a=n),i=i.append(e,a),h.elementsActive&&a("if("+i+")"+u+".bindBuffer(34963,"+i+".buffer.buffer);")):(i=a.def(),a(i,"=",d,".","elements",";","if(",i,"){",u,".bindBuffer(",34963,",",i,".buffer.buffer);}","else if(",c.vao,".currentVAO){",i,"=",e.shared.elements+".getElements("+c.vao,".currentVAO.elements);",de?"":"if("+i+")"+u+".bindBuffer(34963,"+i+".buffer.buffer);","}")),i}(),p=i("primitive"),m=i("offset"),g=function(){var i=h.count,a=t;return i?((i.contextDep&&r.contextDynamic||i.propDep)&&(a=n),i=i.append(e,a)):i=a.def(d,".","count"),i}();if("number"===typeof g){if(0===g)return}else n("if(",g,"){"),n.exit("}");le&&(s=i("instances"),l=e.instancing);var v=f+".type",y=h.elements&&$(h.elements)&&!h.vaoActive;le&&("number"!==typeof s||0<=s)?"string"===typeof s?(n("if(",s,">0){"),a(),n("}else if(",s,"<0){"),o(),n("}")):a():o()}function V(e,t,n,r,i){return i=(t=b()).proc("body",i),le&&(t.instancing=i.def(t.shared.extensions,".angle_instanced_arrays")),e(t,i,n,r),t.compile().body}function H(e,t,n,r){N(e,t),n.useVAO?n.drawVAO?t(e.shared.vao,".setVAO(",n.drawVAO.append(e,t),");"):t(e.shared.vao,".setVAO(",e.shared.vao,".targetVAO);"):(t(e.shared.vao,".setVAO(null);"),B(e,t,n,r.attributes,(function(){return!0}))),j(e,t,n,r.uniforms,(function(){return!0}),!1),U(e,t,t,n)}function K(e,t){var n=e.proc("draw",1);N(e,n),O(e,n,t.context),L(e,n,t.framebuffer),I(e,n,t),z(e,n,t.state),F(e,n,t,!1,!0);var r=t.shader.progVar.append(e,n);if(n(e.shared.gl,".useProgram(",r,".program);"),t.shader.program)H(e,n,t,t.shader.program);else{n(e.shared.vao,".setVAO(null);");var i=e.global.def("{}"),a=n.def(r,".id"),o=n.def(i,"[",a,"]");n(e.cond(o).then(o,".call(this,a0);").else(o,"=",i,"[",a,"]=",e.link((function(n){return V(H,e,t,n,1)})),"(",r,");",o,".call(this,a0);"))}0=--this.refCount&&o(this)},i.profile&&(r.getTotalRenderbufferSize=function(){var e=0;return Object.keys(u).forEach((function(t){e+=u[t].stats.size})),e}),{create:function(t,n){function o(t,n){var r=0,a=0,u=32854;if("object"===typeof t&&t?("shape"in t?(r=0|(a=t.shape)[0],a=0|a[1]):("radius"in t&&(r=a=0|t.radius),"width"in t&&(r=0|t.width),"height"in t&&(a=0|t.height)),"format"in t&&(u=s[t.format])):"number"===typeof t?(r=0|t,a="number"===typeof n?0|n:r):t||(r=a=1),r!==c.width||a!==c.height||u!==c.format)return o.width=c.width=r,o.height=c.height=a,c.format=u,e.bindRenderbuffer(36161,c.renderbuffer),e.renderbufferStorage(36161,u,r,a),i.profile&&(c.stats.size=De[c.format]*c.width*c.height),o.format=l[c.format],o}var c=new a(e.createRenderbuffer());return u[c.id]=c,r.renderbufferCount++,o(t,n),o.resize=function(t,n){var r=0|t,a=0|n||r;return r===c.width&&a===c.height||(o.width=c.width=r,o.height=c.height=a,e.bindRenderbuffer(36161,c.renderbuffer),e.renderbufferStorage(36161,c.format,r,a),i.profile&&(c.stats.size=De[c.format]*c.width*c.height)),o},o._reglType="renderbuffer",o._renderbuffer=c,i.profile&&(o.stats=c.stats),o.destroy=function(){c.decRef()},o},clear:function(){se(u).forEach(o)},restore:function(){se(u).forEach((function(t){t.renderbuffer=e.createRenderbuffer(),e.bindRenderbuffer(36161,t.renderbuffer),e.renderbufferStorage(36161,t.format,t.width,t.height)})),e.bindRenderbuffer(36161,null)}}},Pe=[];Pe[6408]=4,Pe[6407]=3;var Oe=[];Oe[5121]=1,Oe[5126]=4,Oe[36193]=2;var Le=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],Ie=["x","y","z","w"],ze="blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset".split(" "),Ne={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Fe={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Be={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},je={cw:2304,ccw:2305},Ue=new Y(!1,!1,!1,(function(){})),Ve=function(e,t){function n(){this.endQueryIndex=this.startQueryIndex=-1,this.sum=0,this.stats=null}function r(e,t,r){var i=o.pop()||new n;i.startQueryIndex=e,i.endQueryIndex=t,i.sum=0,i.stats=r,s.push(i)}if(!t.ext_disjoint_timer_query)return null;var i=[],a=[],o=[],s=[],l=[],c=[];return{beginQuery:function(e){var n=i.pop()||t.ext_disjoint_timer_query.createQueryEXT();t.ext_disjoint_timer_query.beginQueryEXT(35007,n),a.push(n),r(a.length-1,a.length,e)},endQuery:function(){t.ext_disjoint_timer_query.endQueryEXT(35007)},pushScopeStats:r,update:function(){var e,n;if(0!==(e=a.length)){c.length=Math.max(c.length,e+1),l.length=Math.max(l.length,e+1),l[0]=0;var r=c[0]=0;for(n=e=0;n=q.length&&r()}var n=J(q,e);q[n]=t}}}function h(){var e=W.viewport,t=W.scissor_box;e[0]=e[1]=t[0]=t[1]=0,C.viewportWidth=C.framebufferWidth=C.drawingBufferWidth=e[2]=t[2]=g.drawingBufferWidth,C.viewportHeight=C.framebufferHeight=C.drawingBufferHeight=e[3]=t[3]=g.drawingBufferHeight}function f(){C.tick+=1,C.time=m(),h(),H.procs.poll()}function p(){j.refresh(),h(),H.procs.refresh(),M&&M.update()}function m(){return(re()-T)/1e3}if(!(e=c(e)))return null;var g=e.gl,v=g.getContextAttributes();g.isContextLost();var y=u(g,e);if(!y)return null;var x=i(),w={vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0},A=e.cachedCode||{},S=y.extensions,M=Ve(g,S),T=re(),k=g.drawingBufferWidth,E=g.drawingBufferHeight,C={tick:0,time:0,viewportWidth:k,viewportHeight:E,framebufferWidth:k,framebufferHeight:E,drawingBufferWidth:k,drawingBufferHeight:E,pixelRatio:e.pixelRatio},D=(k={elements:null,primitive:4,count:-1,offset:0,instances:-1},ae(g,S)),O=b(g,w,e,(function(e){return F.destroyBuffer(e)})),N=_(g,S,O,w),F=L(g,S,D,w,O,N,k),B=I(g,x,w,e),j=R(g,S,D,(function(){H.procs.poll()}),C,w,e),U=Re(g,S,D,w,e),V=P(g,S,D,j,U,w),H=K(g,x,S,D,O,N,j,V,{},F,B,k,C,M,A,e),W=(x=z(g,V,H.procs.poll,C,v,S,D),H.next),G=g.canvas,q=[],Y=[],$=[],X=[e.onDestroy],Z=null;G&&(G.addEventListener("webglcontextlost",a,!1),G.addEventListener("webglcontextrestored",o,!1));var ee=V.setFBO=s({framebuffer:te.define.call(null,1,"framebuffer")});return p(),v=Q(s,{clear:function(e){if("framebuffer"in e)if(e.framebuffer&&"framebufferCube"===e.framebuffer_reglType)for(var t=0;6>t;++t)ee(Q({framebuffer:e.framebuffer.faces[t]},e),l);else ee(e,l);else l(null,e)},prop:te.define.bind(null,1),context:te.define.bind(null,2),this:te.define.bind(null,3),draw:s({}),buffer:function(e){return O.create(e,34962,!1,!1)},elements:function(e){return N.create(e,!1)},texture:j.create2D,cube:j.createCube,renderbuffer:U.create,framebuffer:V.create,framebufferCube:V.createCube,vao:F.createVAO,attributes:v,frame:d,on:function(e,t){var n;switch(e){case"frame":return d(t);case"lost":n=Y;break;case"restore":n=$;break;case"destroy":n=X}return n.push(t),{cancel:function(){for(var e=0;e2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}n("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(e,t,n){var i,a,o,s;if("string"===typeof t&&(a="not ",t.substr(!o||o<0?0:+o,a.length)===a)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))s="The ".concat(e," ").concat(i," ").concat(r(t,"type"));else{var l=function(e,t,n){return"number"!==typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(l," ").concat(i," ").concat(r(t,"type"))}return s+=". Received type ".concat(typeof n)}),TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},37865:function(e,t,n){"use strict";var r=n(90386),i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=u;var a=n(40410),o=n(37493);n(42018)(u,a);for(var s=i(o.prototype),l=0;l0)if("string"===typeof t||o.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),r)o.endEmitted?w(e,new _):k(e,o,t,!0);else if(o.ended)w(e,new x);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!n?(t=o.decoder.write(t),o.objectMode||0!==t.length?k(e,o,t,!1):P(e,o)):k(e,o,t,!1)}else r||(o.reading=!1,P(e,o));return!o.ended&&(o.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=E?e=E:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function D(e){var t=e._readableState;c("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(c("emitReadable",t.flowing),t.emittedReadable=!0,i.nextTick(R,e))}function R(e){var t=e._readableState;c("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,N(e)}function P(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(O,e,t))}function O(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function I(e){c("readable nexttick read 0"),e.read(0)}function z(e,t){c("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),N(e),t.flowing&&!t.reading&&e.read(0)}function N(e){var t=e._readableState;for(c("flow",t.flowing);t.flowing&&null!==e.read(););}function F(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function B(e){var t=e._readableState;c("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,i.nextTick(j,t,e))}function j(e,t){if(c("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function U(e,t){for(var n=0,r=e.length;n=t.highWaterMark:t.length>0)||t.ended))return c("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?B(this):D(this),null;if(0===(e=C(e,t))&&t.ended)return 0===t.length&&B(this),null;var r,i=t.needReadable;return c("need readable",i),(0===t.length||t.length-e0?F(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&B(this)),null!==r&&this.emit("data",r),r},M.prototype._read=function(e){w(this,new b("_read()"))},M.prototype.pipe=function(e,t){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,c("pipe count=%d opts=%j",r.pipesCount,t);var o=(!t||!1!==t.end)&&e!==i.stdout&&e!==i.stderr?l:g;function s(t,i){c("onunpipe"),t===n&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,c("cleanup"),e.removeListener("close",p),e.removeListener("finish",m),e.removeListener("drain",u),e.removeListener("error",f),e.removeListener("unpipe",s),n.removeListener("end",l),n.removeListener("end",g),n.removeListener("data",h),d=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||u())}function l(){c("onend"),e.end()}r.endEmitted?i.nextTick(o):n.once("end",o),e.on("unpipe",s);var u=function(e){return function(){var t=e._readableState;c("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,N(e))}}(n);e.on("drain",u);var d=!1;function h(t){c("ondata");var i=e.write(t);c("dest.write",i),!1===i&&((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==U(r.pipes,e))&&!d&&(c("false write response, pause",r.awaitDrain),r.awaitDrain++),n.pause())}function f(t){c("onerror",t),g(),e.removeListener("error",f),0===a(e,"error")&&w(e,t)}function p(){e.removeListener("finish",m),g()}function m(){c("onfinish"),e.removeListener("close",p),g()}function g(){c("unpipe"),n.unpipe(e)}return n.on("data",h),function(e,t,n){if("function"===typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",f),e.once("close",p),e.once("finish",m),e.emit("pipe",n),r.flowing||(c("pipe resume"),n.resume()),e},M.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a0,!1!==r.flowing&&this.resume()):"readable"===e&&(r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,c("on readable",r.length,r.reading),r.length?D(this):r.reading||i.nextTick(I,this))),n},M.prototype.addListener=M.prototype.on,M.prototype.removeListener=function(e,t){var n=o.prototype.removeListener.call(this,e,t);return"readable"===e&&i.nextTick(L,this),n},M.prototype.removeAllListeners=function(e){var t=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||i.nextTick(L,this),t},M.prototype.resume=function(){var e=this._readableState;return e.flowing||(c("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(z,e,t))}(this,e)),e.paused=!1,this},M.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},M.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(c("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(c("wrapped data"),n.decoder&&(i=n.decoder.write(i)),!n.objectMode||null!==i&&void 0!==i)&&((n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause())))})),e)void 0===this[i]&&"function"===typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(M.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(M.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),M.prototype._write=function(e,t,n){n(new m("_write()"))},M.prototype._writev=null,M.prototype.end=function(e,t,n){var r=this._writableState;return"function"===typeof e?(n=e,e=null,t=null):"function"===typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||function(e,t,n){t.ending=!0,R(e,t),n&&(t.finished?i.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n),this},Object.defineProperty(M.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(M.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),M.prototype.destroy=d.destroy,M.prototype._undestroy=d.undestroy,M.prototype._destroy=function(e,t){t(e)}},68221:function(e,t,n){"use strict";var r,i=n(90386);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=n(12726),s=Symbol("lastResolve"),l=Symbol("lastReject"),c=Symbol("error"),u=Symbol("ended"),d=Symbol("lastPromise"),h=Symbol("handlePromise"),f=Symbol("stream");function p(e,t){return{value:e,done:t}}function m(e){var t=e[s];if(null!==t){var n=e[f].read();null!==n&&(e[d]=null,e[s]=null,e[l]=null,t(p(n,!1)))}}function g(e){i.nextTick(m,e)}var v=Object.getPrototypeOf((function(){})),y=Object.setPrototypeOf((a(r={get stream(){return this[f]},next:function(){var e=this,t=this[c];if(null!==t)return Promise.reject(t);if(this[u])return Promise.resolve(p(void 0,!0));if(this[f].destroyed)return new Promise((function(t,n){i.nextTick((function(){e[c]?n(e[c]):t(p(void 0,!0))}))}));var n,r=this[d];if(r)n=new Promise(function(e,t){return function(n,r){e.then((function(){t[u]?n(p(void 0,!0)):t[h](n,r)}),r)}}(r,this));else{var a=this[f].read();if(null!==a)return Promise.resolve(p(a,!1));n=new Promise(this[h])}return this[d]=n,n}},Symbol.asyncIterator,(function(){return this})),a(r,"return",(function(){var e=this;return new Promise((function(t,n){e[f].destroy(null,(function(e){e?n(e):t(p(void 0,!0))}))}))})),r),v);e.exports=function(e){var t,n=Object.create(y,(a(t={},f,{value:e,writable:!0}),a(t,s,{value:null,writable:!0}),a(t,l,{value:null,writable:!0}),a(t,c,{value:null,writable:!0}),a(t,u,{value:e._readableState.endEmitted,writable:!0}),a(t,h,{value:function(e,t){var r=n[f].read();r?(n[d]=null,n[s]=null,n[l]=null,e(p(r,!1))):(n[s]=e,n[l]=t)},writable:!0}),t));return n[d]=null,o(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[l];return null!==t&&(n[d]=null,n[s]=null,n[l]=null,t(e)),void(n[c]=e)}var r=n[s];null!==r&&(n[d]=null,n[s]=null,n[l]=null,r(p(void 0,!0))),n[u]=!0})),e.on("readable",g.bind(null,n)),n}},31125:function(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){for(var n=0;n0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return o.alloc(0);for(var t,n,r,i=o.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,n=i,r=s,o.prototype.copy.call(t,n,r),s+=a.data.length,a=a.next;return i}},{key:"consume",value:function(e,t){var n;return ei.length?i.length:e;if(a===i.length?r+=i:r+=i.slice(0,e),0===(e-=a)){a===i.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(a));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=o.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var i=n.data,a=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,a),0===(e-=a)){a===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(a));break}++r}return this.length-=r,t}},{key:l,value:function(e,t){return s(this,function(e){for(var t=1;t0,(function(e){u||(u=e),e&&h.forEach(l),a||(h.forEach(l),d(u))}))}));return t.reduce(c)}},56306:function(e,t,n){"use strict";var r=n(74322).q.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,n,i){var a=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(t,i,n);if(null!=a){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new r(i?n:"highWaterMark",a);return Math.floor(a)}return e.objectMode?16:16384}}},71405:function(e,t,n){e.exports=n(15398).EventEmitter},68019:function(e,t,n){"use strict";var r=n(71665).Buffer,i=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!==typeof t&&(r.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=c,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=u,this.end=d,t=3;break;default:return this.write=h,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function o(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,n=function(e,t){if(128!==(192&t[0]))return e.lastNeed=0,"\ufffd";if(e.lastNeed>1&&t.length>1){if(128!==(192&t[1]))return e.lastNeed=1,"\ufffd";if(e.lastNeed>2&&t.length>2&&128!==(192&t[2]))return e.lastNeed=2,"\ufffd"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2===0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function u(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function f(e){return e&&e.length?this.write(e):""}t.s=a,a.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0)return i>0&&(e.lastNeed=i-1),i;if(--r=0)return i>0&&(e.lastNeed=i-2),i;if(--r=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},a.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},90715:function(e,t,n){var r=n(32791),i=n(41633)("stream-parser");e.exports=function(e){var t=e&&"function"==typeof e._transform,n=e&&"function"==typeof e._write;if(!t&&!n)throw new Error("must pass a Writable or Transform stream in");i("extending Parser into stream"),e._bytes=u,e._skipBytes=d,t&&(e._passthrough=h);t?e._transform=p:e._write=f};var a=-1,o=0,s=1,l=2;function c(e){i("initializing parser stream"),e._parserBytesLeft=0,e._parserBuffers=[],e._parserBuffered=0,e._parserState=a,e._parserCallback=null,"function"==typeof e.push&&(e._parserOutput=e.push.bind(e)),e._parserInit=!0}function u(e,t){r(!this._parserCallback,'there is already a "callback" set!'),r(isFinite(e)&&e>0,'can only buffer a finite number of bytes > 0, got "'+e+'"'),this._parserInit||c(this),i("buffering %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=o}function d(e,t){r(!this._parserCallback,'there is already a "callback" set!'),r(e>0,'can only skip > 0 bytes, got "'+e+'"'),this._parserInit||c(this),i("skipping %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=s}function h(e,t){r(!this._parserCallback,'There is already a "callback" set!'),r(e>0,'can only pass through > 0 bytes, got "'+e+'"'),this._parserInit||c(this),i("passing through %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=l}function f(e,t,n){this._parserInit||c(this),i("write(%o bytes)",e.length),"function"==typeof t&&(n=t),g(this,e,null,n)}function p(e,t,n){this._parserInit||c(this),i("transform(%o bytes)",e.length),"function"!=typeof t&&(t=this._parserOutput),g(this,e,t,n)}function m(e,t,n,r){if(e._parserBytesLeft-=t.length,i("%o bytes left for stream piece",e._parserBytesLeft),e._parserState===o?(e._parserBuffers.push(t),e._parserBuffered+=t.length):e._parserState===l&&n(t),0!==e._parserBytesLeft)return r;var s=e._parserCallback;if(s&&e._parserState===o&&e._parserBuffers.length>1&&(t=Buffer.concat(e._parserBuffers,e._parserBuffered)),e._parserState!==o&&(t=null),e._parserCallback=null,e._parserBuffered=0,e._parserState=a,e._parserBuffers.splice(0),s){var c=[];t&&c.push(t),n&&c.push(n);var u=s.length>c.length;u&&c.push(v(r));var d=s.apply(e,c);if(!u||r===d)return r}}var g=v((function e(t,n,r,i){return t._parserBytesLeft<=0?i(new Error("got data but not currently parsing anything")):n.length<=t._parserBytesLeft?function(){return m(t,n,r,i)}:function(){var a=n.slice(0,t._parserBytesLeft);return m(t,a,r,(function(o){return o?i(o):n.length>a.length?function(){return e(t,n.slice(a.length),r,i)}:void 0}))}}));function v(e){return function(){for(var t=e.apply(this,arguments);"function"==typeof t;)t=t();return t}}},41633:function(e,t,n){var r=n(90386);function i(){var e;try{e=t.storage.debug}catch(n){}return!e&&"undefined"!==typeof r&&"env"in r&&(e=r.env.DEBUG),e}(t=e.exports=n(74469)).log=function(){return"object"===typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return;var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var i=0,a=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(i++,"%c"===e&&(a=i))})),e.splice(a,0,r)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(n){}},t.load=i,t.useColors=function(){if("undefined"!==typeof window&&window.process&&"renderer"===window.process.type)return!0;return"undefined"!==typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!==typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},t.enable(i())},74469:function(e,t,n){var r;function i(e){function n(){if(n.enabled){var e=n,i=+new Date,a=i-(r||i);e.diff=a,e.prev=r,e.curr=i,r=i;for(var o=new Array(arguments.length),s=0;s0)return function(e){if((e=String(e)).length>100)return;var o=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!o)return;var s=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return s*a;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(e);if("number"===c&&!1===isNaN(e))return s.long?o(l=e,i,"day")||o(l,r,"hour")||o(l,n,"minute")||o(l,t,"second")||l+" ms":function(e){if(e>=i)return Math.round(e/i)+"d";if(e>=r)return Math.round(e/r)+"h";if(e>=n)return Math.round(e/n)+"m";if(e>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},99011:function(e,t,n){"use strict";var r=n(88641);e.exports=function(e,t,n){if(null==e)throw Error("First argument should be a string");if(null==t)throw Error("Separator should be a string or a RegExp");n?("string"===typeof n||Array.isArray(n))&&(n={ignore:n}):n={},null==n.escape&&(n.escape=!0),null==n.ignore?n.ignore=["[]","()","{}","<>",'""',"''","``","\u201c\u201d","\xab\xbb"]:("string"===typeof n.ignore&&(n.ignore=[n.ignore]),n.ignore=n.ignore.map((function(e){return 1===e.length&&(e+=e),e})));var i=r.parse(e,{flat:!0,brackets:n.ignore}),a=i[0].split(t);if(n.escape){for(var o=[],s=0;s0;){t=c[c.length-1];var f=e[t];if(a[t]=0&&s[t].push(o[m])}a[t]=p}else{if(r[t]===n[t]){var g=[],v=[],y=0;for(p=l.length-1;p>=0;--p){var x=l[p];if(i[x]=!1,g.push(x),v.push(s[x]),y+=s[x].length,o[x]=d.length,x===t){l.length=p;break}}d.push(g);var b=new Array(y);for(p=0;p1&&(i=1),i<-1&&(i=-1),(e*r-t*n<0?-1:1)*Math.acos(i)};t.default=function(e){var t=e.px,n=e.py,l=e.cx,c=e.cy,u=e.rx,d=e.ry,h=e.xAxisRotation,f=void 0===h?0:h,p=e.largeArcFlag,m=void 0===p?0:p,g=e.sweepFlag,v=void 0===g?0:g,y=[];if(0===u||0===d)return[];var x=Math.sin(f*i/360),b=Math.cos(f*i/360),_=b*(t-l)/2+x*(n-c)/2,w=-x*(t-l)/2+b*(n-c)/2;if(0===_&&0===w)return[];u=Math.abs(u),d=Math.abs(d);var A=Math.pow(_,2)/Math.pow(u,2)+Math.pow(w,2)/Math.pow(d,2);A>1&&(u*=Math.sqrt(A),d*=Math.sqrt(A));var S=function(e,t,n,r,a,o,l,c,u,d,h,f){var p=Math.pow(a,2),m=Math.pow(o,2),g=Math.pow(h,2),v=Math.pow(f,2),y=p*m-p*v-m*g;y<0&&(y=0),y/=p*v+m*g;var x=(y=Math.sqrt(y)*(l===c?-1:1))*a/o*f,b=y*-o/a*h,_=d*x-u*b+(e+n)/2,w=u*x+d*b+(t+r)/2,A=(h-x)/a,S=(f-b)/o,M=(-h-x)/a,T=(-f-b)/o,k=s(1,0,A,S),E=s(A,S,M,T);return 0===c&&E>0&&(E-=i),1===c&&E<0&&(E+=i),[_,w,k,E]}(t,n,l,c,u,d,m,v,x,b,_,w),M=r(S,4),T=M[0],k=M[1],E=M[2],C=M[3],D=Math.abs(C)/(i/4);Math.abs(1-D)<1e-7&&(D=1);var R=Math.max(Math.ceil(D),1);C/=R;for(var P=0;Pt[2]&&(t[2]=c[u+0]),c[u+1]>t[3]&&(t[3]=c[u+1]);return t}},29988:function(e,t,n){"use strict";e.exports=function(e){for(var t,n=[],o=0,s=0,l=0,c=0,u=null,d=null,h=0,f=0,p=0,m=e.length;p4?(o=g[g.length-4],s=g[g.length-3]):(o=h,s=f),n.push(g)}return n};var r=n(7095);function i(e,t,n,r){return["C",e,t,n,r,n,r]}function a(e,t,n,r,i,a){return["C",e/3+2/3*n,t/3+2/3*r,i/3+2/3*n,a/3+2/3*r,i,a]}},82019:function(e,t,n){"use strict";var r,i=n(1750),a=n(95616),o=n(31457),s=n(89546),l=n(44781),c=document.createElement("canvas"),u=c.getContext("2d");e.exports=function(e,t){if(!s(e))throw Error("Argument should be valid svg path string");t||(t={});var n,d;t.shape?(n=t.shape[0],d=t.shape[1]):(n=c.width=t.w||t.width||200,d=c.height=t.h||t.height||200);var h=Math.min(n,d),f=t.stroke||0,p=t.viewbox||t.viewBox||i(e),m=[n/(p[2]-p[0]),d/(p[3]-p[1])],g=Math.min(m[0]||0,m[1]||0)/2;u.fillStyle="black",u.fillRect(0,0,n,d),u.fillStyle="white",f&&("number"!=typeof f&&(f=1),u.strokeStyle=f>0?"white":"black",u.lineWidth=Math.abs(f));if(u.translate(.5*n,.5*d),u.scale(g,g),function(){if(null!=r)return r;var e=document.createElement("canvas").getContext("2d");if(e.canvas.width=e.canvas.height=1,!window.Path2D)return r=!1;var t=new Path2D("M0,0h1v1h-1v-1Z");e.fillStyle="black",e.fill(t);var n=e.getImageData(0,0,1,1);return r=n&&n.data&&255===n.data[3]}()){var v=new Path2D(e);u.fill(v),f&&u.stroke(v)}else{var y=a(e);o(u,y),u.fill(),f&&u.stroke()}return u.setTransform(1,0,0,1,0,0),l(u,{cutoff:null!=t.cutoff?t.cutoff:.5,radius:null!=t.radius?t.radius:.5*h})}},84267:function(e,t,n){var r;!function(i){var a=/^\s+/,o=/\s+$/,s=0,l=i.round,c=i.min,u=i.max,d=i.random;function h(e,t){if(t=t||{},(e=e||"")instanceof h)return e;if(!(this instanceof h))return new h(e,t);var n=function(e){var t={r:0,g:0,b:0},n=1,r=null,s=null,l=null,d=!1,h=!1;"string"==typeof e&&(e=function(e){e=e.replace(a,"").replace(o,"").toLowerCase();var t,n=!1;if(D[e])e=D[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=j.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=j.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=j.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=j.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=j.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=j.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=j.hex8.exec(e))return{r:I(t[1]),g:I(t[2]),b:I(t[3]),a:B(t[4]),format:n?"name":"hex8"};if(t=j.hex6.exec(e))return{r:I(t[1]),g:I(t[2]),b:I(t[3]),format:n?"name":"hex"};if(t=j.hex4.exec(e))return{r:I(t[1]+""+t[1]),g:I(t[2]+""+t[2]),b:I(t[3]+""+t[3]),a:B(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=j.hex3.exec(e))return{r:I(t[1]+""+t[1]),g:I(t[2]+""+t[2]),b:I(t[3]+""+t[3]),format:n?"name":"hex"};return!1}(e));"object"==typeof e&&(U(e.r)&&U(e.g)&&U(e.b)?(f=e.r,p=e.g,m=e.b,t={r:255*O(f,255),g:255*O(p,255),b:255*O(m,255)},d=!0,h="%"===String(e.r).substr(-1)?"prgb":"rgb"):U(e.h)&&U(e.s)&&U(e.v)?(r=N(e.s),s=N(e.v),t=function(e,t,n){e=6*O(e,360),t=O(t,100),n=O(n,100);var r=i.floor(e),a=e-r,o=n*(1-t),s=n*(1-a*t),l=n*(1-(1-a)*t),c=r%6,u=[n,s,o,o,l,n][c],d=[l,n,n,s,o,o][c],h=[o,o,l,n,n,s][c];return{r:255*u,g:255*d,b:255*h}}(e.h,r,s),d=!0,h="hsv"):U(e.h)&&U(e.s)&&U(e.l)&&(r=N(e.s),l=N(e.l),t=function(e,t,n){var r,i,a;function o(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=O(e,360),t=O(t,100),n=O(n,100),0===t)r=i=a=n;else{var s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;r=o(l,s,e+1/3),i=o(l,s,e),a=o(l,s,e-1/3)}return{r:255*r,g:255*i,b:255*a}}(e.h,r,l),d=!0,h="hsl"),e.hasOwnProperty("a")&&(n=e.a));var f,p,m;return n=P(n),{ok:d,format:e.format||h,r:c(255,u(t.r,0)),g:c(255,u(t.g,0)),b:c(255,u(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=l(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=n.ok,this._tc_id=s++}function f(e,t,n){e=O(e,255),t=O(t,255),n=O(n,255);var r,i,a=u(e,t,n),o=c(e,t,n),s=(a+o)/2;if(a==o)r=i=0;else{var l=a-o;switch(i=s>.5?l/(2-a-o):l/(a+o),a){case e:r=(t-n)/l+(t>1)+720)%360;--t;)r.h=(r.h+i)%360,a.push(h(r));return a}function C(e,t){t=t||6;for(var n=h(e).toHsv(),r=n.h,i=n.s,a=n.v,o=[],s=1/t;t--;)o.push(h({h:r,s:i,v:a})),a=(a+s)%1;return o}h.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:i.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:i.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:i.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=P(e),this._roundA=l(100*this._a)/100,this},toHsv:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=p(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=f(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=f(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,i){var a=[z(l(e).toString(16)),z(l(t).toString(16)),z(l(n).toString(16)),z(F(r))];if(i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1))return a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0);return a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:l(this._r),g:l(this._g),b:l(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+l(this._r)+", "+l(this._g)+", "+l(this._b)+")":"rgba("+l(this._r)+", "+l(this._g)+", "+l(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:l(100*O(this._r,255))+"%",g:l(100*O(this._g,255))+"%",b:l(100*O(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*O(this._r,255))+"%, "+l(100*O(this._g,255))+"%, "+l(100*O(this._b,255))+"%)":"rgba("+l(100*O(this._r,255))+"%, "+l(100*O(this._g,255))+"%, "+l(100*O(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(R[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var i=h(e);n="#"+g(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return h(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(b,arguments)},brighten:function(){return this._applyModification(_,arguments)},darken:function(){return this._applyModification(w,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(y,arguments)},greyscale:function(){return this._applyModification(x,arguments)},spin:function(){return this._applyModification(A,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(E,arguments)},complement:function(){return this._applyCombination(S,arguments)},monochromatic:function(){return this._applyCombination(C,arguments)},splitcomplement:function(){return this._applyCombination(k,arguments)},triad:function(){return this._applyCombination(M,arguments)},tetrad:function(){return this._applyCombination(T,arguments)}},h.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:N(e[r]));e=n}return h(e,t)},h.equals=function(e,t){return!(!e||!t)&&h(e).toRgbString()==h(t).toRgbString()},h.random=function(){return h.fromRatio({r:d(),g:d(),b:d()})},h.mix=function(e,t,n){n=0===n?0:n||50;var r=h(e).toRgb(),i=h(t).toRgb(),a=n/100;return h({r:(i.r-r.r)*a+r.r,g:(i.g-r.g)*a+r.g,b:(i.b-r.b)*a+r.b,a:(i.a-r.a)*a+r.a})},h.readability=function(e,t){var n=h(e),r=h(t);return(i.max(n.getLuminance(),r.getLuminance())+.05)/(i.min(n.getLuminance(),r.getLuminance())+.05)},h.isReadable=function(e,t,n){var r,i,a=h.readability(e,t);switch(i=!1,(r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":i=a>=4.5;break;case"AAlarge":i=a>=3;break;case"AAAsmall":i=a>=7}return i},h.mostReadable=function(e,t,n){var r,i,a,o,s=null,l=0;i=(n=n||{}).includeFallbackColors,a=n.level,o=n.size;for(var c=0;cl&&(l=r,s=h(t[c]));return h.isReadable(e,s,{level:a,size:o})||!i?s:(n.includeFallbackColors=!1,h.mostReadable(e,["#fff","#000"],n))};var D=h.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},R=h.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(D);function P(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function O(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"===typeof e&&-1!=e.indexOf("%")}(e);return e=c(t,u(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),i.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function L(e){return c(1,u(0,e))}function I(e){return parseInt(e,16)}function z(e){return 1==e.length?"0"+e:""+e}function N(e){return e<=1&&(e=100*e+"%"),e}function F(e){return i.round(255*parseFloat(e)).toString(16)}function B(e){return I(e)/255}var j=function(){var e="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",t="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?",n="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?";return{CSS_UNIT:new RegExp(e),rgb:new RegExp("rgb"+t),rgba:new RegExp("rgba"+n),hsl:new RegExp("hsl"+t),hsla:new RegExp("hsla"+n),hsv:new RegExp("hsv"+t),hsva:new RegExp("hsva"+n),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function U(e){return!!j.CSS_UNIT.exec(e)}e.exports?e.exports=h:void 0===(r=function(){return h}.call(t,n,t,e))||(e.exports=r)}(Math)},57060:function(e){"use strict";e.exports=n,e.exports.float32=e.exports.float=n,e.exports.fract32=e.exports.fract=function(e,t){if(e.length){if(e instanceof Float32Array)return new Float32Array(e.length);t instanceof Float32Array||(t=n(e));for(var r=0,i=t.length;r":(t.length>100&&(t=t.slice(0,99)+"\u2026"),t=t.replace(i,(function(e){switch(e){case"\n":return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}})))}},47403:function(e,t,n){"use strict";var r=n(24582),i={object:!0,function:!0,undefined:!0};e.exports=function(e){return!!r(e)&&hasOwnProperty.call(i,typeof e)}},82527:function(e,t,n){"use strict";var r=n(69190),i=n(84985);e.exports=function(e){return i(e)?e:r(e,"%v is not a plain function",arguments[1])}},84985:function(e,t,n){"use strict";var r=n(73116),i=/^\s*class[\s{/}]/,a=Function.prototype.toString;e.exports=function(e){return!!r(e)&&!i.test(a.call(e))}},24511:function(e,t,n){"use strict";var r=n(47403);e.exports=function(e){if(!r(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(t){return!1}}},9234:function(e,t,n){"use strict";var r=n(24582),i=n(47403),a=Object.prototype.toString;e.exports=function(e){if(!r(e))return null;if(i(e)){var t=e.toString;if("function"!==typeof t)return null;if(t===a)return null}try{return""+e}catch(n){return null}}},10424:function(e,t,n){"use strict";var r=n(69190),i=n(24582);e.exports=function(e){return i(e)?e:r(e,"Cannot use %v",arguments[1])}},24582:function(e){"use strict";e.exports=function(e){return undefined!==e&&null!==e}},58404:function(e,t,n){"use strict";var r=n(13547),i=n(12129),a=n(12856).Buffer;n.g.__TYPEDARRAY_POOL||(n.g.__TYPEDARRAY_POOL={UINT8:i([32,0]),UINT16:i([32,0]),UINT32:i([32,0]),BIGUINT64:i([32,0]),INT8:i([32,0]),INT16:i([32,0]),INT32:i([32,0]),BIGINT64:i([32,0]),FLOAT:i([32,0]),DOUBLE:i([32,0]),DATA:i([32,0]),UINT8C:i([32,0]),BUFFER:i([32,0])});var o="undefined"!==typeof Uint8ClampedArray,s="undefined"!==typeof BigUint64Array,l="undefined"!==typeof BigInt64Array,c=n.g.__TYPEDARRAY_POOL;c.UINT8C||(c.UINT8C=i([32,0])),c.BIGUINT64||(c.BIGUINT64=i([32,0])),c.BIGINT64||(c.BIGINT64=i([32,0])),c.BUFFER||(c.BUFFER=i([32,0]));var u=c.DATA,d=c.BUFFER;function h(e){if(e){var t=e.length||e.byteLength,n=r.log2(t);u[n].push(e)}}function f(e){e=r.nextPow2(e);var t=r.log2(e),n=u[t];return n.length>0?n.pop():new ArrayBuffer(e)}function p(e){return new Uint8Array(f(e),0,e)}function m(e){return new Uint16Array(f(2*e),0,e)}function g(e){return new Uint32Array(f(4*e),0,e)}function v(e){return new Int8Array(f(e),0,e)}function y(e){return new Int16Array(f(2*e),0,e)}function x(e){return new Int32Array(f(4*e),0,e)}function b(e){return new Float32Array(f(4*e),0,e)}function _(e){return new Float64Array(f(8*e),0,e)}function w(e){return o?new Uint8ClampedArray(f(e),0,e):p(e)}function A(e){return s?new BigUint64Array(f(8*e),0,e):null}function S(e){return l?new BigInt64Array(f(8*e),0,e):null}function M(e){return new DataView(f(e),0,e)}function T(e){e=r.nextPow2(e);var t=r.log2(e),n=d[t];return n.length>0?n.pop():new a(e)}t.free=function(e){if(a.isBuffer(e))d[r.log2(e.length)].push(e);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(e)&&(e=e.buffer),!e)return;var t=e.length||e.byteLength,n=0|r.log2(t);u[n].push(e)}},t.freeUint8=t.freeUint16=t.freeUint32=t.freeBigUint64=t.freeInt8=t.freeInt16=t.freeInt32=t.freeBigInt64=t.freeFloat32=t.freeFloat=t.freeFloat64=t.freeDouble=t.freeUint8Clamped=t.freeDataView=function(e){h(e.buffer)},t.freeArrayBuffer=h,t.freeBuffer=function(e){d[r.log2(e.length)].push(e)},t.malloc=function(e,t){if(void 0===t||"arraybuffer"===t)return f(e);switch(t){case"uint8":return p(e);case"uint16":return m(e);case"uint32":return g(e);case"int8":return v(e);case"int16":return y(e);case"int32":return x(e);case"float":case"float32":return b(e);case"double":case"float64":return _(e);case"uint8_clamped":return w(e);case"bigint64":return S(e);case"biguint64":return A(e);case"buffer":return T(e);case"data":case"dataview":return M(e);default:return null}return null},t.mallocArrayBuffer=f,t.mallocUint8=p,t.mallocUint16=m,t.mallocUint32=g,t.mallocInt8=v,t.mallocInt16=y,t.mallocInt32=x,t.mallocFloat32=t.mallocFloat=b,t.mallocFloat64=t.mallocDouble=_,t.mallocUint8Clamped=w,t.mallocBigUint64=A,t.mallocBigInt64=S,t.mallocDataView=M,t.mallocBuffer=T,t.clearCache=function(){for(var e=0;e<32;++e)c.UINT8[e].length=0,c.UINT16[e].length=0,c.UINT32[e].length=0,c.INT8[e].length=0,c.INT16[e].length=0,c.INT32[e].length=0,c.FLOAT[e].length=0,c.DOUBLE[e].length=0,c.BIGUINT64[e].length=0,c.BIGINT64[e].length=0,c.UINT8C[e].length=0,u[e].length=0,d[e].length=0}},90448:function(e){var t=/[\'\"]/;e.exports=function(e){return e?(t.test(e.charAt(0))&&(e=e.substr(1)),t.test(e.charAt(e.length-1))&&(e=e.substr(0,e.length-1)),e):""}},93447:function(e){"use strict";e.exports=function(e,t,n){Array.isArray(n)||(n=[].slice.call(arguments,2));for(var r=0,i=n.length;r=i)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return e}})),s=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),g(n)?r.showHidden=n:n&&t._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=u),h(r,e,r.depth)}function u(e,t){var n=c.styles[t];return n?"\x1b["+c.colors[n][0]+"m"+e+"\x1b["+c.colors[n][1]+"m":e}function d(e,t){return e}function h(e,n,r){if(e.customInspect&&n&&M(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,e);return x(i)||(i=h(e,i,r)),i}var a=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(x(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(y(t))return e.stylize(""+t,"number");if(g(t))return e.stylize(""+t,"boolean");if(v(t))return e.stylize("null","null")}(e,n);if(a)return a;var o=Object.keys(n),s=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(n)),S(n)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return f(n);if(0===o.length){if(M(n)){var l=n.name?": "+n.name:"";return e.stylize("[Function"+l+"]","special")}if(_(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(A(n))return e.stylize(Date.prototype.toString.call(n),"date");if(S(n))return f(n)}var c,u="",d=!1,w=["{","}"];(m(n)&&(d=!0,w=["[","]"]),M(n))&&(u=" [Function"+(n.name?": "+n.name:"")+"]");return _(n)&&(u=" "+RegExp.prototype.toString.call(n)),A(n)&&(u=" "+Date.prototype.toUTCString.call(n)),S(n)&&(u=" "+f(n)),0!==o.length||d&&0!=n.length?r<0?_(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),c=d?function(e,t,n,r,i){for(var a=[],o=0,s=t.length;o=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(r>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(c,u,w)):w[0]+u+w[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,n,r,i,a){var o,s,l;if((l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(s=e.stylize("[Setter]","special")),C(r,i)||(o="["+i+"]"),s||(e.seen.indexOf(l.value)<0?(s=v(n)?h(e,l.value,null):h(e,l.value,n-1)).indexOf("\n")>-1&&(s=a?s.split("\n").map((function(e){return" "+e})).join("\n").slice(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),b(o)){if(a&&i.match(/^\d+$/))return s;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function m(e){return Array.isArray(e)}function g(e){return"boolean"===typeof e}function v(e){return null===e}function y(e){return"number"===typeof e}function x(e){return"string"===typeof e}function b(e){return void 0===e}function _(e){return w(e)&&"[object RegExp]"===T(e)}function w(e){return"object"===typeof e&&null!==e}function A(e){return w(e)&&"[object Date]"===T(e)}function S(e){return w(e)&&("[object Error]"===T(e)||e instanceof Error)}function M(e){return"function"===typeof e}function T(e){return Object.prototype.toString.call(e)}function k(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(e=e.toUpperCase(),!o[e])if(s.test(e)){var n=r.pid;o[e]=function(){var r=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,r)}}else o[e]=function(){};return o[e]},t.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=n(4936),t.isArray=m,t.isBoolean=g,t.isNull=v,t.isNullOrUndefined=function(e){return null==e},t.isNumber=y,t.isString=x,t.isSymbol=function(e){return"symbol"===typeof e},t.isUndefined=b,t.isRegExp=_,t.types.isRegExp=_,t.isObject=w,t.isDate=A,t.types.isDate=A,t.isError=S,t.types.isNativeError=S,t.isFunction=M,t.isPrimitive=function(e){return null===e||"boolean"===typeof e||"number"===typeof e||"string"===typeof e||"symbol"===typeof e||"undefined"===typeof e},t.isBuffer=n(45920);var E=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function C(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",function(){var e=new Date,t=[k(e.getHours()),k(e.getMinutes()),k(e.getSeconds())].join(":");return[e.getDate(),E[e.getMonth()],t].join(" ")}(),t.format.apply(t,arguments))},t.inherits=n(42018),t._extend=function(e,t){if(!t||!w(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var D="undefined"!==typeof Symbol?Symbol("util.promisify.custom"):void 0;function R(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}t.promisify=function(e){if("function"!==typeof e)throw new TypeError('The "original" argument must be of type Function');if(D&&e[D]){var t;if("function"!==typeof(t=e[D]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,D,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,r=new Promise((function(e,r){t=e,n=r})),i=[],a=0;a2111)throw t.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(e,t,n){var i=this.intercalaryMonth(e);if(n&&t!==i||t<1||t>12)throw r.local.invalidMonth.replace(/\{0\}/,this.local.name);return i?!n&&t<=i?t-1:t:t-1},toChineseMonth:function(e,t){e.year&&(t=(e=e.year()).month());var n=this.intercalaryMonth(e);if(t<0||t>(n?12:11))throw r.local.invalidMonth.replace(/\{0\}/,this.local.name);return n?t>13},isIntercalaryMonth:function(e,t){e.year&&(t=(e=e.year()).month());var n=this.intercalaryMonth(e);return!!n&&n===t},leapYear:function(e){return 0!==this.intercalaryMonth(e)},weekOfYear:function(e,t,n){var i,o=this._validateYear(e,r.local.invalidyear),s=h[o-h[0]],l=s>>9&4095,c=s>>5&15,u=31&s;(i=a.newDate(l,c,u)).add(4-(i.dayOfWeek()||7),"d");var d=this.toJD(e,t,n)-i.toJD();return 1+Math.floor(d/7)},monthsInYear:function(e){return this.leapYear(e)?13:12},daysInMonth:function(e,t){e.year&&(t=e.month(),e=e.year()),e=this._validateYear(e);var n=d[e-d[0]];if(t>(n>>13?12:11))throw r.local.invalidMonth.replace(/\{0\}/,this.local.name);return n&1<<12-t?30:29},weekDay:function(e,t,n){return(this.dayOfWeek(e,t,n)||7)<6},toJD:function(e,t,n){var i=this._validate(e,s,n,r.local.invalidDate);e=this._validateYear(i.year()),t=i.month(),n=i.day();var o=this.isIntercalaryMonth(e,t),s=this.toChineseMonth(e,t),l=function(e,t,n,r,i){var a,o,s;if("object"===typeof e)o=e,a=t||{};else{var l;if(!("number"===typeof e&&e>=1888&&e<=2111))throw new Error("Lunar year outside range 1888-2111");if(!("number"===typeof t&&t>=1&&t<=12))throw new Error("Lunar month outside range 1 - 12");if(!("number"===typeof n&&n>=1&&n<=30))throw new Error("Lunar day outside range 1 - 30");"object"===typeof r?(l=!1,a=r):(l=!!r,a=i||{}),o={year:e,month:t,day:n,isIntercalary:l}}s=o.day-1;var c,u=d[o.year-d[0]],f=u>>13;c=f&&(o.month>f||o.isIntercalary)?o.month:o.month-1;for(var p=0;p>9&4095,(m>>5&15)-1,(31&m)+s);return a.year=g.getFullYear(),a.month=1+g.getMonth(),a.day=g.getDate(),a}(e,s,n,o);return a.toJD(l.year,l.month,l.day)},fromJD:function(e){var t=a.fromJD(e),n=function(e,t,n,r){var i,a;if("object"===typeof e)i=e,a=t||{};else{if(!("number"===typeof e&&e>=1888&&e<=2111))throw new Error("Solar year outside range 1888-2111");if(!("number"===typeof t&&t>=1&&t<=12))throw new Error("Solar month outside range 1 - 12");if(!("number"===typeof n&&n>=1&&n<=31))throw new Error("Solar day outside range 1 - 31");i={year:e,month:t,day:n},a=r||{}}var o=h[i.year-h[0]],s=i.year<<9|i.month<<5|i.day;a.year=s>=o?i.year:i.year-1,o=h[a.year-h[0]];var l,c=new Date(o>>9&4095,(o>>5&15)-1,31&o),u=new Date(i.year,i.month-1,i.day);l=Math.round((u-c)/864e5);var f,p=d[a.year-d[0]];for(f=0;f<13;f++){var m=p&1<<12-f?30:29;if(l>13;!g||f=2&&r<=6},extraInfo:function(e,t,n){var i=this._validate(e,t,n,r.local.invalidDate);return{century:o[Math.floor((i.year()-1)/100)+1]||""}},toJD:function(e,t,n){var i=this._validate(e,t,n,r.local.invalidDate);return e=i.year()+(i.year()<0?1:0),t=i.month(),(n=i.day())+(t>1?16:0)+(t>2?32*(t-2):0)+400*(e-1)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1;var t=Math.floor(e/400)+1;e-=400*(t-1),e+=e>15?16:0;var n=Math.floor(e/32)+1,r=e-32*(n-1)+1;return this.newDate(t<=0?t-1:t,n,r)}});var o={20:"Fruitbat",21:"Anchovy"};r.calendars.discworld=a},37715:function(e,t,n){var r=n(63489),i=n(56131);function a(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}a.prototype=new r.baseCalendar,i(a.prototype,{name:"Ethiopian",jdEpoch:1724220.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,r.local.invalidYear);return(e=t.year()+(t.year()<0?1:0))%4===3||e%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,n){var r=this.newDate(e,t,n);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var n=this._validate(e,t,this.minDay,r.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(13===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,n){return(this.dayOfWeek(e,t,n)||7)<6},toJD:function(e,t,n){var i=this._validate(e,t,n,r.local.invalidDate);return(e=i.year())<0&&e++,i.day()+30*(i.month()-1)+365*(e-1)+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,n=Math.floor((t-Math.floor((t+366)/1461))/365)+1;n<=0&&n--,t=Math.floor(e)+.5-this.newDate(n,1,1).toJD();var r=Math.floor(t/30)+1,i=t-30*(r-1)+1;return this.newDate(n,r,i)}}),r.calendars.ethiopian=a},99384:function(e,t,n){var r=n(63489),i=n(56131);function a(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function o(e,t){return e-t*Math.floor(e/t)}a.prototype=new r.baseCalendar,i(a.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,r.local.invalidYear);return this._leapYear(t.year())},_leapYear:function(e){return o(7*(e=e<0?e+1:e)+1,19)<7},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,r.local.invalidYear),this._leapYear(e.year?e.year():e)?13:12},weekOfYear:function(e,t,n){var r=this.newDate(e,t,n);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInYear:function(e){return e=this._validate(e,this.minMonth,this.minDay,r.local.invalidYear).year(),this.toJD(-1===e?1:e+1,7,1)-this.toJD(e,7,1)},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,r.local.invalidMonth),12===t&&this.leapYear(e)||8===t&&5===o(this.daysInYear(e),10)?30:9===t&&3===o(this.daysInYear(e),10)?29:this.daysPerMonth[t-1]},weekDay:function(e,t,n){return 6!==this.dayOfWeek(e,t,n)},extraInfo:function(e,t,n){var i=this._validate(e,t,n,r.local.invalidDate);return{yearType:(this.leapYear(i)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(i)%10-3]}},toJD:function(e,t,n){var i=this._validate(e,t,n,r.local.invalidDate);e=i.year(),t=i.month(),n=i.day();var a=e<=0?e+1:e,o=this.jdEpoch+this._delay1(a)+this._delay2(a)+n+1;if(t<7){for(var s=7;s<=this.monthsInYear(e);s++)o+=this.daysInMonth(e,s);for(s=1;s=this.toJD(-1===t?1:t+1,7,1);)t++;for(var n=ethis.toJD(t,n,this.daysInMonth(t,n));)n++;var r=e-this.toJD(t,n,1)+1;return this.newDate(t,n,r)}}),r.calendars.hebrew=a},43805:function(e,t,n){var r=n(63489),i=n(56131);function a(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}a.prototype=new r.baseCalendar,i(a.prototype,{name:"Islamic",jdEpoch:1948439.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-kham\u012bs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(e){return(11*this._validate(e,this.minMonth,this.minDay,r.local.invalidYear).year()+14)%30<11},weekOfYear:function(e,t,n){var r=this.newDate(e,t,n);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInYear:function(e){return this.leapYear(e)?355:354},daysInMonth:function(e,t){var n=this._validate(e,t,this.minDay,r.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(12===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,n){return 5!==this.dayOfWeek(e,t,n)},toJD:function(e,t,n){var i=this._validate(e,t,n,r.local.invalidDate);return e=i.year(),t=i.month(),e=e<=0?e+1:e,(n=i.day())+Math.ceil(29.5*(t-1))+354*(e-1)+Math.floor((3+11*e)/30)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=Math.floor((30*(e-this.jdEpoch)+10646)/10631);t=t<=0?t-1:t;var n=Math.min(12,Math.ceil((e-29-this.toJD(t,1,1))/29.5)+1),r=e-this.toJD(t,n,1)+1;return this.newDate(t,n,r)}}),r.calendars.islamic=a},88874:function(e,t,n){var r=n(63489),i=n(56131);function a(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}a.prototype=new r.baseCalendar,i(a.prototype,{name:"Julian",jdEpoch:1721423.5,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,r.local.invalidYear);return(e=t.year()<0?t.year()+1:t.year())%4===0},weekOfYear:function(e,t,n){var r=this.newDate(e,t,n);return r.add(4-(r.dayOfWeek()||7),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var n=this._validate(e,t,this.minDay,r.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(2===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,n){return(this.dayOfWeek(e,t,n)||7)<6},toJD:function(e,t,n){var i=this._validate(e,t,n,r.local.invalidDate);return e=i.year(),t=i.month(),n=i.day(),e<0&&e++,t<=2&&(e--,t+=12),Math.floor(365.25*(e+4716))+Math.floor(30.6001*(t+1))+n-1524.5},fromJD:function(e){var t=Math.floor(e+.5)+1524,n=Math.floor((t-122.1)/365.25),r=Math.floor(365.25*n),i=Math.floor((t-r)/30.6001),a=i-Math.floor(i<14?1:13),o=n-Math.floor(a>2?4716:4715),s=t-r-Math.floor(30.6001*i);return o<=0&&o--,this.newDate(o,a,s)}}),r.calendars.julian=a},83290:function(e,t,n){var r=n(63489),i=n(56131);function a(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function o(e,t){return e-t*Math.floor(e/t)}function s(e,t){return o(e-1,t)+1}a.prototype=new r.baseCalendar,i(a.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(e){return this._validate(e,this.minMonth,this.minDay,r.local.invalidYear),!1},formatYear:function(e){e=this._validate(e,this.minMonth,this.minDay,r.local.invalidYear).year();var t=Math.floor(e/400);return e%=400,e+=e<0?400:0,t+"."+Math.floor(e/20)+"."+e%20},forYear:function(e){if((e=e.split(".")).length<3)throw"Invalid Mayan year";for(var t=0,n=0;n19||n>0&&r<0)throw"Invalid Mayan year";t=20*t+r}return t},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,r.local.invalidYear),18},weekOfYear:function(e,t,n){return this._validate(e,t,n,r.local.invalidDate),0},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,r.local.invalidYear),360},daysInMonth:function(e,t){return this._validate(e,t,this.minDay,r.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(e,t,n){return this._validate(e,t,n,r.local.invalidDate).day()},weekDay:function(e,t,n){return this._validate(e,t,n,r.local.invalidDate),!0},extraInfo:function(e,t,n){var i=this._validate(e,t,n,r.local.invalidDate).toJD(),a=this._toHaab(i),o=this._toTzolkin(i);return{haabMonthName:this.local.haabMonths[a[0]-1],haabMonth:a[0],haabDay:a[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(e){var t=o((e-=this.jdEpoch)+8+340,365);return[Math.floor(t/20)+1,o(t,20)]},_toTzolkin:function(e){return[s((e-=this.jdEpoch)+20,20),s(e+4,13)]},toJD:function(e,t,n){var i=this._validate(e,t,n,r.local.invalidDate);return i.day()+20*i.month()+360*i.year()+this.jdEpoch},fromJD:function(e){e=Math.floor(e)+.5-this.jdEpoch;var t=Math.floor(e/360);e%=360,e+=e<0?360:0;var n=Math.floor(e/20),r=e%20;return this.newDate(t,n,r)}}),r.calendars.mayan=a},29108:function(e,t,n){var r=n(63489),i=n(56131);function a(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}a.prototype=new r.baseCalendar;var o=r.instance("gregorian");i(a.prototype,{name:"Nanakshahi",jdEpoch:2257673.5,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear);return o.leapYear(t.year()+(t.year()<1?1:0)+1469)},weekOfYear:function(e,t,n){var r=this.newDate(e,t,n);return r.add(1-(r.dayOfWeek()||7),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var n=this._validate(e,t,this.minDay,r.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(12===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,n){return(this.dayOfWeek(e,t,n)||7)<6},toJD:function(e,t,n){var i=this._validate(e,t,n,r.local.invalidMonth);(e=i.year())<0&&e++;for(var a=i.day(),s=1;s=this.toJD(t+1,1,1);)t++;for(var n=e-Math.floor(this.toJD(t,1,1)+.5)+1,r=1;n>this.daysInMonth(t,r);)n-=this.daysInMonth(t,r),r++;return this.newDate(t,r,n)}}),r.calendars.nanakshahi=a},55422:function(e,t,n){var r=n(63489),i=n(56131);function a(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}a.prototype=new r.baseCalendar,i(a.prototype,{name:"Nepali",jdEpoch:1700709.5,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(e){return this.daysInYear(e)!==this.daysPerYear},weekOfYear:function(e,t,n){var r=this.newDate(e,t,n);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInYear:function(e){if(e=this._validate(e,this.minMonth,this.minDay,r.local.invalidYear).year(),"undefined"===typeof this.NEPALI_CALENDAR_DATA[e])return this.daysPerYear;for(var t=0,n=this.minMonth;n<=12;n++)t+=this.NEPALI_CALENDAR_DATA[e][n];return t},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,r.local.invalidMonth),"undefined"===typeof this.NEPALI_CALENDAR_DATA[e]?this.daysPerMonth[t-1]:this.NEPALI_CALENDAR_DATA[e][t]},weekDay:function(e,t,n){return 6!==this.dayOfWeek(e,t,n)},toJD:function(e,t,n){var i=this._validate(e,t,n,r.local.invalidDate);e=i.year(),t=i.month(),n=i.day();var a=r.instance(),o=0,s=t,l=e;this._createMissingCalendarData(e);var c=e-(s>9||9===s&&n>=this.NEPALI_CALENDAR_DATA[l][0]?56:57);for(9!==t&&(o=n,s--);9!==s;)s<=0&&(s=12,l--),o+=this.NEPALI_CALENDAR_DATA[l][s],s--;return 9===t?(o+=n-this.NEPALI_CALENDAR_DATA[l][0])<0&&(o+=a.daysInYear(c)):o+=this.NEPALI_CALENDAR_DATA[l][9]-this.NEPALI_CALENDAR_DATA[l][0],a.newDate(c,1,1).add(o,"d").toJD()},fromJD:function(e){var t=r.instance().fromJD(e),n=t.year(),i=t.dayOfYear(),a=n+56;this._createMissingCalendarData(a);for(var o=9,s=this.NEPALI_CALENDAR_DATA[a][0],l=this.NEPALI_CALENDAR_DATA[a][o]-s+1;i>l;)++o>12&&(o=1,a++),l+=this.NEPALI_CALENDAR_DATA[a][o];var c=this.NEPALI_CALENDAR_DATA[a][o]-(l-i);return this.newDate(a,o,c)},_createMissingCalendarData:function(e){var t=this.daysPerMonth.slice(0);t.unshift(17);for(var n=e-1;n0?474:473))%2820+474+38)%2816<682},weekOfYear:function(e,t,n){var r=this.newDate(e,t,n);return r.add(-(r.dayOfWeek()+1)%7,"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var n=this._validate(e,t,this.minDay,r.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(12===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,n){return 5!==this.dayOfWeek(e,t,n)},toJD:function(e,t,n){var i=this._validate(e,t,n,r.local.invalidDate);e=i.year(),t=i.month(),n=i.day();var a=e-(e>=0?474:473),s=474+o(a,2820);return n+(t<=7?31*(t-1):30*(t-1)+6)+Math.floor((682*s-110)/2816)+365*(s-1)+1029983*Math.floor(a/2820)+this.jdEpoch-1},fromJD:function(e){var t=(e=Math.floor(e)+.5)-this.toJD(475,1,1),n=Math.floor(t/1029983),r=o(t,1029983),i=2820;if(1029982!==r){var a=Math.floor(r/366),s=o(r,366);i=Math.floor((2134*a+2816*s+2815)/1028522)+a+1}var l=i+2820*n+474;l=l<=0?l-1:l;var c=e-this.toJD(l,1,1)+1,u=c<=186?Math.ceil(c/31):Math.ceil((c-6)/30),d=e-this.toJD(l,u,1)+1;return this.newDate(l,u,d)}}),r.calendars.persian=a,r.calendars.jalali=a},31320:function(e,t,n){var r=n(63489),i=n(56131),a=r.instance();function o(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}o.prototype=new r.baseCalendar,i(o.prototype,{name:"Taiwan",jdEpoch:2419402.5,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,r.local.invalidYear);e=this._t2gYear(t.year());return a.leapYear(e)},weekOfYear:function(e,t,n){var i=this._validate(e,this.minMonth,this.minDay,r.local.invalidYear);e=this._t2gYear(i.year());return a.weekOfYear(e,i.month(),i.day())},daysInMonth:function(e,t){var n=this._validate(e,t,this.minDay,r.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(2===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,n){return(this.dayOfWeek(e,t,n)||7)<6},toJD:function(e,t,n){var i=this._validate(e,t,n,r.local.invalidDate);e=this._t2gYear(i.year());return a.toJD(e,i.month(),i.day())},fromJD:function(e){var t=a.fromJD(e),n=this._g2tYear(t.year());return this.newDate(n,t.month(),t.day())},_t2gYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)},_g2tYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)}}),r.calendars.taiwan=o},51367:function(e,t,n){var r=n(63489),i=n(56131),a=r.instance();function o(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}o.prototype=new r.baseCalendar,i(o.prototype,{name:"Thai",jdEpoch:1523098.5,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,r.local.invalidYear);e=this._t2gYear(t.year());return a.leapYear(e)},weekOfYear:function(e,t,n){var i=this._validate(e,this.minMonth,this.minDay,r.local.invalidYear);e=this._t2gYear(i.year());return a.weekOfYear(e,i.month(),i.day())},daysInMonth:function(e,t){var n=this._validate(e,t,this.minDay,r.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(2===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,n){return(this.dayOfWeek(e,t,n)||7)<6},toJD:function(e,t,n){var i=this._validate(e,t,n,r.local.invalidDate);e=this._t2gYear(i.year());return a.toJD(e,i.month(),i.day())},fromJD:function(e){var t=a.fromJD(e),n=this._g2tYear(t.year());return this.newDate(n,t.month(),t.day())},_t2gYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)},_g2tYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)}}),r.calendars.thai=o},21457:function(e,t,n){var r=n(63489),i=n(56131);function a(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}a.prototype=new r.baseCalendar,i(a.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thal\u0101th\u0101\u2019","Yawm al-Arba\u2018\u0101\u2019","Yawm al-Kham\u012bs","Yawm al-Jum\u2018a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,r.local.invalidYear);return 355===this.daysInYear(t.year())},weekOfYear:function(e,t,n){var r=this.newDate(e,t,n);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var t=0,n=1;n<=12;n++)t+=this.daysInMonth(e,n);return t},daysInMonth:function(e,t){for(var n=this._validate(e,t,this.minDay,r.local.invalidMonth).toJD()-24e5+.5,i=0,a=0;an)return o[i]-o[i-1];i++}return 30},weekDay:function(e,t,n){return 5!==this.dayOfWeek(e,t,n)},toJD:function(e,t,n){var i=this._validate(e,t,n,r.local.invalidDate),a=12*(i.year()-1)+i.month()-15292;return i.day()+o[a-1]-1+24e5-.5},fromJD:function(e){for(var t=e-24e5+.5,n=0,r=0;rt);r++)n++;var i=n+15292,a=Math.floor((i-1)/12),s=a+1,l=i-12*a,c=t-o[n-1]+1;return this.newDate(s,l,c)},isValid:function(e,t,n){var i=r.baseCalendar.prototype.isValid.apply(this,arguments);return i&&(i=(e=null!=e.year?e.year:e)>=1276&&e<=1500),i},_validate:function(e,t,n,i){var a=r.baseCalendar.prototype._validate.apply(this,arguments);if(a.year<1276||a.year>1500)throw i.replace(/\{0\}/,this.local.name);return a}}),r.calendars.ummalqura=a;var o=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]},63489:function(e,t,n){var r=n(56131);function i(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}function a(e,t,n,r){if(this._calendar=e,this._year=t,this._month=n,this._day=r,0===this._calendar._validateLevel&&!this._calendar.isValid(this._year,this._month,this._day))throw(c.local.invalidDate||c.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function o(e,t){return"000000".substring(0,t-(e=""+e).length)+e}function s(){this.shortYearCutoff="+10"}function l(e){this.local=this.regionalOptions[e]||this.regionalOptions[""]}r(i.prototype,{instance:function(e,t){e=(e||"gregorian").toLowerCase(),t=t||"";var n=this._localCals[e+"-"+t];if(!n&&this.calendars[e]&&(n=new this.calendars[e](t),this._localCals[e+"-"+t]=n),!n)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return n},newDate:function(e,t,n,r,i){return(r=(null!=e&&e.year?e.calendar():"string"===typeof r?this.instance(r,i):r)||this.instance()).newDate(e,t,n)},substituteDigits:function(e){return function(t){return(t+"").replace(/[0-9]/g,(function(t){return e[t]}))}},substituteChineseDigits:function(e,t){return function(n){for(var r="",i=0;n>0;){var a=n%10;r=(0===a?"":e[a]+t[i])+r,i++,n=Math.floor(n/10)}return 0===r.indexOf(e[1]+t[1])&&(r=r.substr(1)),r||e[0]}}}),r(a.prototype,{newDate:function(e,t,n){return this._calendar.newDate(null==e?this:e,t,n)},year:function(e){return 0===arguments.length?this._year:this.set(e,"y")},month:function(e){return 0===arguments.length?this._month:this.set(e,"m")},day:function(e){return 0===arguments.length?this._day:this.set(e,"d")},date:function(e,t,n){if(!this._calendar.isValid(e,t,n))throw(c.local.invalidDate||c.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=e,this._month=t,this._day=n,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(e,t){return this._calendar.add(this,e,t)},set:function(e,t){return this._calendar.set(this,e,t)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(c.local.differentCalendars||c.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,e._calendar.local.name);var t=this._year!==e._year?this._year-e._year:this._month!==e._month?this.monthOfYear()-e.monthOfYear():this._day-e._day;return 0===t?0:t<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(e){return this._calendar.fromJD(e)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(e){return this._calendar.fromJSDate(e)},toString:function(){return(this.year()<0?"-":"")+o(Math.abs(this.year()),4)+"-"+o(this.month(),2)+"-"+o(this.day(),2)}}),r(s.prototype,{_validateLevel:0,newDate:function(e,t,n){return null==e?this.today():(e.year&&(this._validate(e,t,n,c.local.invalidDate||c.regionalOptions[""].invalidDate),n=e.day(),t=e.month(),e=e.year()),new a(this,e,t,n))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){return this._validate(e,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear);return(t.year()<0?"-":"")+o(Math.abs(t.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear),12},monthOfYear:function(e,t){var n=this._validate(e,t,this.minDay,c.local.invalidMonth||c.regionalOptions[""].invalidMonth);return(n.month()+this.monthsInYear(n)-this.firstMonth)%this.monthsInYear(n)+this.minMonth},fromMonthOfYear:function(e,t){var n=(t+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,n,this.minDay,c.local.invalidMonth||c.regionalOptions[""].invalidMonth),n},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(e,t,n){var r=this._validate(e,t,n,c.local.invalidDate||c.regionalOptions[""].invalidDate);return r.toJD()-this.newDate(r.year(),this.fromMonthOfYear(r.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(e,t,n){var r=this._validate(e,t,n,c.local.invalidDate||c.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(r))+2)%this.daysInWeek()},extraInfo:function(e,t,n){return this._validate(e,t,n,c.local.invalidDate||c.regionalOptions[""].invalidDate),{}},add:function(e,t,n){return this._validate(e,this.minMonth,this.minDay,c.local.invalidDate||c.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,t,n),t,n)},_add:function(e,t,n){if(this._validateLevel++,"d"===n||"w"===n){var r=e.toJD()+t*("w"===n?this.daysInWeek():1),i=e.calendar().fromJD(r);return this._validateLevel--,[i.year(),i.month(),i.day()]}try{var a=e.year()+("y"===n?t:0),o=e.monthOfYear()+("m"===n?t:0);i=e.day();"y"===n?(e.month()!==this.fromMonthOfYear(a,o)&&(o=this.newDate(a,e.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(a)),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o)))):"m"===n&&(!function(e){for(;ot-1+e.minMonth;)a++,o-=t,t=e.monthsInYear(a)}(this),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o))));var s=[a,this.fromMonthOfYear(a,o),i];return this._validateLevel--,s}catch(l){throw this._validateLevel--,l}},_correctAdd:function(e,t,n,r){if(!this.hasYearZero&&("y"===r||"m"===r)&&(0===t[0]||e.year()>0!==t[0]>0)){var i={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[r],a=n<0?-1:1;t=this._add(e,n*i[0]+a*i[1],i[2])}return e.date(t[0],t[1],t[2])},set:function(e,t,n){this._validate(e,this.minMonth,this.minDay,c.local.invalidDate||c.regionalOptions[""].invalidDate);var r="y"===n?t:e.year(),i="m"===n?t:e.month(),a="d"===n?t:e.day();return"y"!==n&&"m"!==n||(a=Math.min(a,this.daysInMonth(r,i))),e.date(r,i,a)},isValid:function(e,t,n){this._validateLevel++;var r=this.hasYearZero||0!==e;if(r){var i=this.newDate(e,t,this.minDay);r=t>=this.minMonth&&t-this.minMonth=this.minDay&&n-this.minDay13.5?13:1),c=i-(l>2.5?4716:4715);return c<=0&&c--,this.newDate(c,l,s)},toJSDate:function(e,t,n){var r=this._validate(e,t,n,c.local.invalidDate||c.regionalOptions[""].invalidDate),i=new Date(r.year(),r.month()-1,r.day());return i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0),i.setHours(i.getHours()>12?i.getHours()+2:0),i},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var c=e.exports=new i;c.cdate=a,c.baseCalendar=s,c.calendars.gregorian=l},94338:function(e,t,n){var r=n(56131),i=n(63489);r(i.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"}),i.local=i.regionalOptions[""],r(i.cdate.prototype,{formatDate:function(e,t){return"string"!==typeof e&&(t=e,e=""),this._calendar.formatDate(e||"",this,t)}}),r(i.baseCalendar.prototype,{UNIX_EPOCH:i.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:i.instance().jdEpoch,TICKS_PER_DAY:864e9,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(e,t,n){if("string"!==typeof e&&(n=t,t=e,e=""),!t)return"";if(t.calendar()!==this)throw i.local.invalidFormat||i.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat;for(var r=(n=n||{}).dayNamesShort||this.local.dayNamesShort,a=n.dayNames||this.local.dayNames,o=n.monthNumbers||this.local.monthNumbers,s=n.monthNamesShort||this.local.monthNamesShort,l=n.monthNames||this.local.monthNames,c=(n.calculateWeek||this.local.calculateWeek,function(t,n){for(var r=1;x+r1}),u=function(e,t,n,r){var i=""+t;if(c(e,r))for(;i.length1},x=function(e,n){var r=y(e,n),a=[2,3,r?4:2,r?4:2,10,11,20]["oyYJ@!".indexOf(e)+1],o=new RegExp("^-?\\d{1,"+a+"}"),s=t.substring(M).match(o);if(!s)throw(i.local.missingNumberAt||i.regionalOptions[""].missingNumberAt).replace(/\{0\}/,M);return M+=s[0].length,parseInt(s[0],10)},b=this,_=function(){if("function"===typeof l){y("m");var e=l.call(b,t.substring(M));return M+=e.length,e}return x("m")},w=function(e,n,r,a){for(var o=y(e,a)?r:n,s=0;s-1){f=1,p=m;for(var E=this.daysInMonth(h,f);p>E;E=this.daysInMonth(h,f))f++,p-=E}return d>-1?this.fromJD(d):this.newDate(h,f,p)},determineDate:function(e,t,n,r,i){n&&"object"!==typeof n&&(i=r,r=n,n=null),"string"!==typeof r&&(i=r,r="");var a=this;return t=t?t.newDate():null,e=null==e?t:"string"===typeof e?function(e){try{return a.parseDate(r,e,i)}catch(l){}for(var t=((e=e.toLowerCase()).match(/^c/)&&n?n.newDate():null)||a.today(),o=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,s=o.exec(e);s;)t.add(parseInt(s[1],10),s[2]||"d"),s=o.exec(e);return t}(e):"number"===typeof e?isNaN(e)||e===1/0||e===-1/0?t:a.today().add(e,"d"):a.newDate(e)}})},69862:function(){},40964:function(){},72077:function(e,t,n){"use strict";var r=n(24696);e.exports=function(){return r(["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],(function(e){return"function"===typeof n.g[e]}))}},81684:function(e,t,n){"use strict";function r(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function i(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function a(){}n.d(t,{sX:function(){return ee},k4:function(){return q}});var o=.7,s=1/o,l="\\s*([+-]?\\d+)\\s*",c="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",u="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",d=/^#([0-9a-f]{3,8})$/,h=new RegExp("^rgb\\(".concat(l,",").concat(l,",").concat(l,"\\)$")),f=new RegExp("^rgb\\(".concat(u,",").concat(u,",").concat(u,"\\)$")),p=new RegExp("^rgba\\(".concat(l,",").concat(l,",").concat(l,",").concat(c,"\\)$")),m=new RegExp("^rgba\\(".concat(u,",").concat(u,",").concat(u,",").concat(c,"\\)$")),g=new RegExp("^hsl\\(".concat(c,",").concat(u,",").concat(u,"\\)$")),v=new RegExp("^hsla\\(".concat(c,",").concat(u,",").concat(u,",").concat(c,"\\)$")),y={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function x(){return this.rgb().formatHex()}function b(){return this.rgb().formatRgb()}function _(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=d.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?w(t):3===n?new M(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?A(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?A(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=h.exec(e))?new M(t[1],t[2],t[3],1):(t=f.exec(e))?new M(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=p.exec(e))?A(t[1],t[2],t[3],t[4]):(t=m.exec(e))?A(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=g.exec(e))?R(t[1],t[2]/100,t[3]/100,1):(t=v.exec(e))?R(t[1],t[2]/100,t[3]/100,t[4]):y.hasOwnProperty(e)?w(y[e]):"transparent"===e?new M(NaN,NaN,NaN,0):null}function w(e){return new M(e>>16&255,e>>8&255,255&e,1)}function A(e,t,n,r){return r<=0&&(e=t=n=NaN),new M(e,t,n,r)}function S(e,t,n,r){return 1===arguments.length?((i=e)instanceof a||(i=_(i)),i?new M((i=i.rgb()).r,i.g,i.b,i.opacity):new M):new M(e,t,n,null==r?1:r);var i}function M(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function T(){return"#".concat(D(this.r)).concat(D(this.g)).concat(D(this.b))}function k(){var e=E(this.opacity);return"".concat(1===e?"rgb(":"rgba(").concat(C(this.r),", ").concat(C(this.g),", ").concat(C(this.b)).concat(1===e?")":", ".concat(e,")"))}function E(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function C(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function D(e){return((e=C(e))<16?"0":"")+e.toString(16)}function R(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new O(e,t,n,r)}function P(e){if(e instanceof O)return new O(e.h,e.s,e.l,e.opacity);if(e instanceof a||(e=_(e)),!e)return new O;if(e instanceof O)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),s=NaN,l=o-i,c=(o+i)/2;return l?(s=t===o?(n-r)/l+6*(n0&&c<1?0:s,new O(s,l,c,e.opacity)}function O(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function L(e){return(e=(e||0)%360)<0?e+360:e}function I(e){return Math.max(0,Math.min(1,e||0))}function z(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function N(e,t,n,r,i){var a=e*e,o=a*e;return((1-3*e+3*a-o)*t+(4-6*a+3*o)*n+(1+3*e+3*a-3*o)*r+o*i)/6}r(a,_,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:x,formatHex:x,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return P(this).formatHsl()},formatRgb:b,toString:b}),r(M,S,i(a,{brighter:function(e){return e=null==e?s:Math.pow(s,e),new M(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?o:Math.pow(o,e),new M(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},clamp:function(){return new M(C(this.r),C(this.g),C(this.b),E(this.opacity))},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:T,formatHex:T,formatHex8:function(){return"#".concat(D(this.r)).concat(D(this.g)).concat(D(this.b)).concat(D(255*(isNaN(this.opacity)?1:this.opacity)))},formatRgb:k,toString:k})),r(O,(function(e,t,n,r){return 1===arguments.length?P(e):new O(e,t,n,null==r?1:r)}),i(a,{brighter:function(e){return e=null==e?s:Math.pow(s,e),new O(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?o:Math.pow(o,e),new O(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new M(z(e>=240?e-240:e+120,i,r),z(e,i,r),z(e<120?e+240:e-120,i,r),this.opacity)},clamp:function(){return new O(L(this.h),I(this.s),I(this.l),E(this.opacity))},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=E(this.opacity);return"".concat(1===e?"hsl(":"hsla(").concat(L(this.h),", ").concat(100*I(this.s),"%, ").concat(100*I(this.l),"%").concat(1===e?")":", ".concat(e,")"))}}));var F=function(e){return function(){return e}};function B(e,t){return function(n){return e+n*t}}function j(e){return 1===(e=+e)?U:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):F(isNaN(t)?n:t)}}function U(e,t){var n=t-e;return n?B(e,n):F(isNaN(e)?t:e)}var V=function e(t){var n=j(t);function r(e,t){var r=n((e=S(e)).r,(t=S(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=U(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+""}}return r.gamma=e,r}(1);function H(e){return function(t){var n,r,i=t.length,a=new Array(i),o=new Array(i),s=new Array(i);for(n=0;n=1?(n=1,t-1):Math.floor(n*t),i=e[r],a=e[r+1],o=r>0?e[r-1]:2*i-a,s=ra&&(i=t.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,l.push({i:o,x:q(n,r)})),a=Z.lastIndex;return a{"use strict";var r=n(93959);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,o){if(o!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},11942:(e,t,n)=>{e.exports=n(43488)()},93959:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},25825:(e,t,n)=>{"use strict";n.d(t,{W$:()=>no});var r=n(9950),i=n(65617),a={},o=function(e,t,n,r){var i=e+"-"+t+"-"+n+(r?"-server":"");if(a[i])return a[i];var o=function(e,t,n,r){if("undefined"===typeof document&&!r)return null;var i=r?new r:document.createElement("canvas");i.width=2*n,i.height=2*n;var a=i.getContext("2d");return a?(a.fillStyle=e,a.fillRect(0,0,i.width,i.height),a.fillStyle=t,a.fillRect(0,0,n,n),a.translate(n,n),a.fillRect(0,0,n,n),i.toDataURL()):null}(e,t,n,r);return a[i]=o,o},s=Object.assign||function(e){for(var t=1;to?1:Math.round(100*u/o)/100,t.a!==d)return{h:t.h,s:t.s,l:t.l,a:d,source:"rgb"}}else{var h=void 0;if(r!==(h=c<0?0:c>a?1:Math.round(100*c/a)/100))return{h:t.h,s:t.s,l:t.l,a:h,source:"rgb"}}return null}(e,r.props.hsl,r.props.direction,r.props.a,r.container);t&&"function"===typeof r.props.onChange&&r.props.onChange(t,e)},r.handleMouseDown=function(e){r.handleChange(e),window.addEventListener("mousemove",r.handleChange),window.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleChange),window.removeEventListener("mouseup",r.handleMouseUp)},h(r,n)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),d(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=this.props.rgb,n=(0,i.Ay)({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+t.r+","+t.g+","+t.b+", 0) 0%,\n rgba("+t.r+","+t.g+","+t.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:100*t.a+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+t.r+","+t.g+","+t.b+", 0) 0%,\n rgba("+t.r+","+t.g+","+t.b+", 1) 100%)"},pointer:{left:0,top:100*t.a+"%"}},overwrite:u({},this.props.style)},{vertical:"vertical"===this.props.direction,overwrite:!0});return r.createElement("div",{style:n.alpha},r.createElement("div",{style:n.checkboard},r.createElement(c,{renderers:this.props.renderers})),r.createElement("div",{style:n.gradient}),r.createElement("div",{style:n.container,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},r.createElement("div",{style:n.pointer},this.props.pointer?r.createElement(this.props.pointer,this.props):r.createElement("div",{style:n.slider}))))}}]),t}(r.PureComponent||r.Component);var p=function(){function e(e,t){for(var n=0;n-1)){var i=n.getArrowOffset(),a=38===e.keyCode?r+i:r-i;n.setUpdatedValue(a,e)}},n.handleDrag=function(e){if(n.props.dragLabel){var t=Math.round(n.props.value+e.movementX);t>=0&&t<=n.props.dragMax&&n.props.onChange&&n.props.onChange(n.getValueObjectWithLabel(t),e)}},n.handleMouseDown=function(e){n.props.dragLabel&&(e.preventDefault(),n.handleDrag(e),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},n.inputId="rc-editable-input-"+g++,n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),p(t,[{key:"componentDidUpdate",value:function(e,t){this.props.value===this.state.value||e.value===this.props.value&&t.value===this.state.value||(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(e){return function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},this.props.label,e)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||1}},{key:"setUpdatedValue",value:function(e,t){var n=this.props.label?this.getValueObjectWithLabel(e):e;this.props.onChange&&this.props.onChange(n,t),this.setState({value:e})}},{key:"render",value:function(){var e=this,t=(0,i.Ay)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return r.createElement("div",{style:t.wrap},r.createElement("input",{id:this.inputId,style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?r.createElement("label",{htmlFor:this.inputId,style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(r.PureComponent||r.Component);var y=function(){function e(e,t){for(var n=0;na?0:360*(-100*c/a+100)/100,n.h!==u)return{h:u,s:n.s,l:n.l,a:n.a,source:"hsl"}}else{var d=void 0;if(d=l<0?0:l>i?359:100*l/i*360/100,n.h!==d)return{h:d,s:n.s,l:n.l,a:n.a,source:"hsl"}}return null}(e,r.props.direction,r.props.hsl,r.container);t&&"function"===typeof r.props.onChange&&r.props.onChange(t,e)},r.handleMouseDown=function(e){r.handleChange(e),window.addEventListener("mousemove",r.handleChange),window.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},x(r,n)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),y(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.direction,n=void 0===t?"horizontal":t,a=(0,i.Ay)({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:100*this.props.hsl.h/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-100*this.props.hsl.h/360+100+"%"}}},{vertical:"vertical"===n});return r.createElement("div",{style:a.hue},r.createElement("div",{className:"hue-"+n,style:a.container,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},r.createElement("style",null,"\n .hue-horizontal {\n background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0\n 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to right, #f00 0%, #ff0\n 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n\n .hue-vertical {\n background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,\n #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,\n #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n "),r.createElement("div",{style:a.pointer},this.props.pointer?r.createElement(this.props.pointer,this.props):r.createElement("div",{style:a.slider}))))}}]),t}(r.PureComponent||r.Component);var _=n(11942),w=n.n(_);const A=function(){this.__data__=[],this.size=0};const S=function(e,t){return e===t||e!==e&&t!==t};const M=function(e,t){for(var n=e.length;n--;)if(S(e[n][0],t))return n;return-1};var T=Array.prototype.splice;const k=function(e){var t=this.__data__,n=M(t,e);return!(n<0)&&(n==t.length-1?t.pop():T.call(t,n,1),--this.size,!0)};const E=function(e){var t=this.__data__,n=M(t,e);return n<0?void 0:t[n][1]};const C=function(e){return M(this.__data__,e)>-1};const D=function(e,t){var n=this.__data__,r=M(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function R(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=9007199254740991};const ct=function(e){return null!=e&<(e.length)&&!K(e)};const ut=function(e){return tt(e)&&ct(e)};const dt=function(){return!1};var ht="object"==typeof exports&&exports&&!exports.nodeType&&exports,ft=ht&&"object"==typeof module&&module&&!module.nodeType&&module,pt=ft&&ft.exports===ht?B.Buffer:void 0;const mt=(pt?pt.isBuffer:void 0)||dt;var gt=Function.prototype,vt=Object.prototype,yt=gt.toString,xt=vt.hasOwnProperty,bt=yt.call(Object);const _t=function(e){if(!tt(e)||"[object Object]"!=X(e))return!1;var t=Ke(e);if(null===t)return!0;var n=xt.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&yt.call(n)==bt};var wt={};wt["[object Float32Array]"]=wt["[object Float64Array]"]=wt["[object Int8Array]"]=wt["[object Int16Array]"]=wt["[object Int32Array]"]=wt["[object Uint8Array]"]=wt["[object Uint8ClampedArray]"]=wt["[object Uint16Array]"]=wt["[object Uint32Array]"]=!0,wt["[object Arguments]"]=wt["[object Array]"]=wt["[object ArrayBuffer]"]=wt["[object Boolean]"]=wt["[object DataView]"]=wt["[object Date]"]=wt["[object Error]"]=wt["[object Function]"]=wt["[object Map]"]=wt["[object Number]"]=wt["[object Object]"]=wt["[object RegExp]"]=wt["[object Set]"]=wt["[object String]"]=wt["[object WeakMap]"]=!1;const At=function(e){return tt(e)&<(e.length)&&!!wt[X(e)]};const St=function(e){return function(t){return e(t)}};var Mt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Tt=Mt&&"object"==typeof module&&module&&!module.nodeType&&module,kt=Tt&&Tt.exports===Mt&&N.process,Et=function(){try{var e=Tt&&Tt.require&&Tt.require("util").types;return e||kt&&kt.binding&&kt.binding("util")}catch(t){}}();var Ct=Et&&Et.isTypedArray;const Dt=Ct?St(Ct):At;const Rt=function(e,t){if(("constructor"!==t||"function"!==typeof e[t])&&"__proto__"!=t)return e[t]};var Pt=Object.prototype.hasOwnProperty;const Ot=function(e,t,n){var r=e[t];Pt.call(e,t)&&S(r,n)&&(void 0!==n||t in e)||ze(e,t,n)};const Lt=function(e,t,n,r){var i=!n;n||(n={});for(var a=-1,o=t.length;++a-1&&e%1==0&&e0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(Jt);const tn=function(e,t){return en(Zt(e,t,Yt),e+"")};const nn=function(e,t,n){if(!Z(n))return!1;var r=typeof t;return!!("number"==r?ct(n)&&Nt(t,n.length):"string"==r&&t in n)&&S(n[t],e)};const rn=function(e){return tn((function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,o&&nn(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r=t||n<0||d&&e-c>=a}function m(){var e=sn();if(p(e))return g(e);s=setTimeout(m,function(e){var n=t-(e-l);return d?xn(n,a-(e-c)):n}(e))}function g(e){return s=void 0,h&&r?f(e):(r=i=void 0,o)}function v(){var e=sn(),n=p(e);if(r=arguments,i=this,l=e,n){if(void 0===s)return function(e){return c=e,s=setTimeout(m,t),u?f(e):o}(l);if(d)return clearTimeout(s),s=setTimeout(m,t),f(l)}return void 0===s&&(s=setTimeout(m,t)),o}return t=vn(t)||0,Z(n)&&(u=!!n.leading,a=(d="maxWait"in n)?yn(vn(n.maxWait)||0,t):a,h="trailing"in n?!!n.trailing:h),v.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=l=i=s=void 0},v.flush=function(){return void 0===s?o:g(sn())},v};const _n=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return Z(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),bn(e,t,{leading:r,maxWait:t,trailing:i})};var wn=function(){function e(e,t){for(var n=0;ni&&(l=i),c<0?c=0:c>a&&(c=a);var u=l/i,d=1-c/a;return{h:t.h,s:u,v:d,a:t.a,source:"hsv"}}(e,n.props.hsl,n.container),e)},n.handleMouseDown=function(e){n.handleChange(e);var t=n.getContainerRenderWindow();t.addEventListener("mousemove",n.handleChange),t.addEventListener("mouseup",n.handleMouseUp)},n.handleMouseUp=function(){n.unbindEventListeners()},n.throttle=_n((function(e,t,n){e(t,n)}),50),n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),wn(t,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var e=this.container,t=window;!t.document.contains(e)&&t.parent!==t;)t=t.parent;return t}},{key:"unbindEventListeners",value:function(){var e=this.getContainerRenderWindow();e.removeEventListener("mousemove",this.handleChange),e.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.style||{},n=t.color,a=t.white,o=t.black,s=t.pointer,l=t.circle,c=(0,i.Ay)({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-100*this.props.hsv.v+100+"%",left:100*this.props.hsv.s+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:"0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),\n 0 0 1px 2px rgba(0,0,0,.4)",borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:n,white:a,black:o,pointer:s,circle:l}},{custom:!!this.props.style});return r.createElement("div",{style:c.color,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},r.createElement("style",null,"\n .saturation-white {\n background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));\n background: linear-gradient(to right, #fff, rgba(255,255,255,0));\n }\n .saturation-black {\n background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));\n background: linear-gradient(to top, #000, rgba(0,0,0,0));\n }\n "),r.createElement("div",{style:c.white,className:"saturation-white"},r.createElement("div",{style:c.black,className:"saturation-black"}),r.createElement("div",{style:c.pointer},this.props.pointer?r.createElement(this.props.pointer,this.props):r.createElement("div",{style:c.circle}))))}}]),t}(r.PureComponent||r.Component);const Sn=An;const Mn=function(e,t){for(var n=-1,r=null==e?0:e.length;++n1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=nr(e,360),t=nr(t,100),n=nr(n,100),0===t)r=i=a=n;else{var s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;r=o(l,s,e+1/3),i=o(l,s,e),a=o(l,s,e-1/3)}return{r:255*r,g:255*i,b:255*a}}(e.h,r,a),o=!0,s="hsl"),e.hasOwnProperty("a")&&(n=e.a));var l,c,u;return n=tr(n),{ok:o,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}function Nn(e,t,n){e=nr(e,255),t=nr(t,255),n=nr(n,255);var r,i,a=Math.max(e,t,n),o=Math.min(e,t,n),s=(a+o)/2;if(a==o)r=i=0;else{var l=a-o;switch(i=s>.5?l/(2-a-o):l/(a+o),a){case e:r=(t-n)/l+(t>1)+720)%360;--t;)r.h=(r.h+i)%360,a.push(zn(r));return a}function Jn(e,t){t=t||6;for(var n=zn(e).toHsv(),r=n.h,i=n.s,a=n.v,o=[],s=1/t;t--;)o.push(zn({h:r,s:i,v:a})),a=(a+s)%1;return o}zn.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=tr(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=Fn(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=Fn(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=Nn(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=Nn(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return Bn(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,i){var a=[ar(Math.round(e).toString(16)),ar(Math.round(t).toString(16)),ar(Math.round(n).toString(16)),ar(sr(r))];if(i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1))return a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0);return a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*nr(this._r,255))+"%",g:Math.round(100*nr(this._g,255))+"%",b:Math.round(100*nr(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*nr(this._r,255))+"%, "+Math.round(100*nr(this._g,255))+"%, "+Math.round(100*nr(this._b,255))+"%)":"rgba("+Math.round(100*nr(this._r,255))+"%, "+Math.round(100*nr(this._g,255))+"%, "+Math.round(100*nr(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(er[Bn(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+jn(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var i=zn(e);n="#"+jn(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return zn(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(Wn,arguments)},brighten:function(){return this._applyModification(Gn,arguments)},darken:function(){return this._applyModification(qn,arguments)},desaturate:function(){return this._applyModification(Un,arguments)},saturate:function(){return this._applyModification(Vn,arguments)},greyscale:function(){return this._applyModification(Hn,arguments)},spin:function(){return this._applyModification(Yn,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(Kn,arguments)},complement:function(){return this._applyCombination($n,arguments)},monochromatic:function(){return this._applyCombination(Jn,arguments)},splitcomplement:function(){return this._applyCombination(Zn,arguments)},triad:function(){return this._applyCombination(Xn,[3])},tetrad:function(){return this._applyCombination(Xn,[4])}},zn.fromRatio=function(e,t){if("object"==On(e)){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:or(e[r]));e=n}return zn(e,t)},zn.equals=function(e,t){return!(!e||!t)&&zn(e).toRgbString()==zn(t).toRgbString()},zn.random=function(){return zn.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},zn.mix=function(e,t,n){n=0===n?0:n||50;var r=zn(e).toRgb(),i=zn(t).toRgb(),a=n/100;return zn({r:(i.r-r.r)*a+r.r,g:(i.g-r.g)*a+r.g,b:(i.b-r.b)*a+r.b,a:(i.a-r.a)*a+r.a})},zn.readability=function(e,t){var n=zn(e),r=zn(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},zn.isReadable=function(e,t,n){var r,i,a=zn.readability(e,t);switch(i=!1,(r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":i=a>=4.5;break;case"AAlarge":i=a>=3;break;case"AAAsmall":i=a>=7}return i},zn.mostReadable=function(e,t,n){var r,i,a,o,s=null,l=0;i=(n=n||{}).includeFallbackColors,a=n.level,o=n.size;for(var c=0;cl&&(l=r,s=zn(t[c]));return zn.isReadable(e,s,{level:a,size:o})||!i?s:(n.includeFallbackColors=!1,zn.mostReadable(e,["#fff","#000"],n))};var Qn=zn.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},er=zn.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(Qn);function tr(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function nr(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"===typeof e&&-1!=e.indexOf("%")}(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function rr(e){return Math.min(1,Math.max(0,e))}function ir(e){return parseInt(e,16)}function ar(e){return 1==e.length?"0"+e:""+e}function or(e){return e<=1&&(e=100*e+"%"),e}function sr(e){return Math.round(255*parseFloat(e)).toString(16)}function lr(e){return ir(e)/255}var cr=function(){var e="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",t="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?",n="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?";return{CSS_UNIT:new RegExp(e),rgb:new RegExp("rgb"+t),rgba:new RegExp("rgba"+n),hsl:new RegExp("hsl"+t),hsla:new RegExp("hsla"+n),hsv:new RegExp("hsv"+t),hsva:new RegExp("hsva"+n),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function ur(e){return!!cr.CSS_UNIT.exec(e)}var dr=function(e){var t=0,n=0;return Pn(["r","g","b","a","h","s","l","v"],(function(r){if(e[r]&&(t+=1,isNaN(e[r])||(n+=1),"s"===r||"l"===r)){/^\d+%$/.test(e[r])&&(n+=1)}})),t===n&&e},hr=function(e,t){var n=e.hex?zn(e.hex):zn(e),r=n.toHsl(),i=n.toHsv(),a=n.toRgb(),o=n.toHex();return 0===r.s&&(r.h=t||0,i.h=t||0),{hsl:r,hex:"000000"===o&&0===a.a?"transparent":"#"+o,rgb:a,hsv:i,oldHue:e.h||t||r.h,source:e.source}},fr=function(e){if("transparent"===e)return!0;var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&zn(e).isValid()},pr=function(e){if(!e)return"#fff";var t=hr(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"},mr=function(e,t){return zn(t+" ("+e.replace("\xb0","")+")")._ok},gr=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function i(){var e,t,n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var r=arguments.length,a=Array(r),o=0;os))return!1;var c=a.get(e),u=a.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,f=2&n?new Rr:void 0;for(a.set(e,t),a.set(t,e);++d1&&(e.a=1),n.props.onChange({h:n.props.hsl.h,s:n.props.hsl.s,l:n.props.hsl.l,a:Math.round(100*e.a)/100,source:"rgb"},t)):(e.h||e.s||e.l)&&("string"===typeof e.s&&e.s.includes("%")&&(e.s=e.s.replace("%","")),"string"===typeof e.l&&e.l.includes("%")&&(e.l=e.l.replace("%","")),1==e.s?e.s=.01:1==e.l&&(e.l=.01),n.props.onChange({h:e.h||n.props.hsl.h,s:Number(ya(e.s)?n.props.hsl.s:e.s),l:Number(ya(e.l)?n.props.hsl.l:e.l),source:"hsl"},t))},n.showHighlight=function(e){e.currentTarget.style.background="#eee"},n.hideHighlight=function(e){e.currentTarget.style.background="transparent"},1!==e.hsl.a&&"hex"===e.view?n.state={view:"rgb"}:n.state={view:e.view},n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),ba(t,[{key:"render",value:function(){var e=this,t=(0,i.Ay)({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),n=void 0;return"hex"===this.state.view?n=r.createElement("div",{style:t.fields,className:"flexbox-fix"},r.createElement("div",{style:t.field},r.createElement(v,{style:{input:t.input,label:t.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):"rgb"===this.state.view?n=r.createElement("div",{style:t.fields,className:"flexbox-fix"},r.createElement("div",{style:t.field},r.createElement(v,{style:{input:t.input,label:t.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),r.createElement("div",{style:t.field},r.createElement(v,{style:{input:t.input,label:t.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),r.createElement("div",{style:t.field},r.createElement(v,{style:{input:t.input,label:t.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),r.createElement("div",{style:t.alpha},r.createElement(v,{style:{input:t.input,label:t.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):"hsl"===this.state.view&&(n=r.createElement("div",{style:t.fields,className:"flexbox-fix"},r.createElement("div",{style:t.field},r.createElement(v,{style:{input:t.input,label:t.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),r.createElement("div",{style:t.field},r.createElement(v,{style:{input:t.input,label:t.label},label:"s",value:Math.round(100*this.props.hsl.s)+"%",onChange:this.handleChange})),r.createElement("div",{style:t.field},r.createElement(v,{style:{input:t.input,label:t.label},label:"l",value:Math.round(100*this.props.hsl.l)+"%",onChange:this.handleChange})),r.createElement("div",{style:t.alpha},r.createElement(v,{style:{input:t.input,label:t.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),r.createElement("div",{style:t.wrap,className:"flexbox-fix"},n,r.createElement("div",{style:t.toggle},r.createElement("div",{style:t.icon,onClick:this.toggleViews,ref:function(t){return e.icon=t}},r.createElement(xa.A,{style:t.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return 1!==e.hsl.a&&"hex"===t.view?{view:"rgb"}:null}}]),t}(r.Component);_a.defaultProps={view:"hex"};const wa=_a;const Aa=function(){var e=(0,i.Ay)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return r.createElement("div",{style:e.picker})};const Sa=function(){var e=(0,i.Ay)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return r.createElement("div",{style:e.picker})};var Ma=function(e){var t=e.width,n=e.onChange,a=e.disableAlpha,o=e.rgb,s=e.hsl,l=e.hsv,u=e.hex,d=e.renderers,h=e.styles,p=void 0===h?{}:h,m=e.className,g=void 0===m?"":m,v=e.defaultView,y=(0,i.Ay)(rn({default:{picker:{width:t,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+o.r+", "+o.g+", "+o.b+", "+o.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},p),{disableAlpha:a});return r.createElement("div",{style:y.picker,className:"chrome-picker "+g},r.createElement("div",{style:y.saturation},r.createElement(Sn,{style:y.Saturation,hsl:s,hsv:l,pointer:Sa,onChange:n})),r.createElement("div",{style:y.body},r.createElement("div",{style:y.controls,className:"flexbox-fix"},r.createElement("div",{style:y.color},r.createElement("div",{style:y.swatch},r.createElement("div",{style:y.active}),r.createElement(c,{renderers:d}))),r.createElement("div",{style:y.toggles},r.createElement("div",{style:y.hue},r.createElement(b,{style:y.Hue,hsl:s,pointer:Aa,onChange:n})),r.createElement("div",{style:y.alpha},r.createElement(f,{style:y.Alpha,rgb:o,hsl:s,pointer:Aa,renderers:d,onChange:n})))),r.createElement(wa,{rgb:o,hsl:s,hex:u,view:v,onChange:n,disableAlpha:a})))};Ma.propTypes={width:w().oneOfType([w().string,w().number]),disableAlpha:w().bool,styles:w().object,defaultView:w().oneOf(["hex","rgb","hsl"])},Ma.defaultProps={width:225,disableAlpha:!1,styles:{}};yr(Ma);const Ta=function(e){var t=e.color,n=e.onClick,a=void 0===n?function(){}:n,o=e.onSwatchHover,s=e.active,l=(0,i.Ay)({default:{color:{background:t,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:pr(t),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:s,"color-#FFFFFF":"#FFFFFF"===t,transparent:"transparent"===t});return r.createElement(Ar,{style:l.color,color:t,onClick:a,onHover:o,focusStyle:{boxShadow:"0 0 4px "+t}},r.createElement("div",{style:l.dot}))};const ka=function(e){var t=e.hex,n=e.rgb,a=e.onChange,o=(0,i.Ay)({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:t},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),s=function(e,t){e.r||e.g||e.b?a({r:e.r||n.r,g:e.g||n.g,b:e.b||n.b,source:"rgb"},t):a({hex:e.hex,source:"hex"},t)};return r.createElement("div",{style:o.fields,className:"flexbox-fix"},r.createElement("div",{style:o.active}),r.createElement(v,{style:{wrap:o.HEXwrap,input:o.HEXinput,label:o.HEXlabel},label:"hex",value:t,onChange:s}),r.createElement(v,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"r",value:n.r,onChange:s}),r.createElement(v,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"g",value:n.g,onChange:s}),r.createElement(v,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"b",value:n.b,onChange:s}))};var Ea=function(e){var t=e.onChange,n=e.onSwatchHover,a=e.colors,o=e.hex,s=e.rgb,l=e.styles,c=void 0===l?{}:l,u=e.className,d=void 0===u?"":u,h=(0,i.Ay)(rn({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},c)),f=function(e,n){e.hex?fr(e.hex)&&t({hex:e.hex,source:"hex"},n):t(e,n)};return r.createElement(on,{style:h.Compact,styles:c},r.createElement("div",{style:h.compact,className:"compact-picker "+d},r.createElement("div",null,$i(a,(function(e){return r.createElement(Ta,{key:e,color:e,active:e.toLowerCase()===o,onClick:f,onSwatchHover:n})})),r.createElement("div",{style:h.clear})),r.createElement(ka,{hex:o,rgb:s,onChange:f})))};Ea.propTypes={colors:w().arrayOf(w().string),styles:w().object},Ea.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};yr(Ea);const Ca=(0,i.H8)((function(e){var t=e.hover,n=e.color,a=e.onClick,o=e.onSwatchHover,s={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},l=(0,i.Ay)({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:s}},{hover:t});return r.createElement("div",{style:l.swatch},r.createElement(Ar,{color:n,onClick:a,onHover:o,focusStyle:s}))}));var Da=function(e){var t=e.width,n=e.colors,a=e.onChange,o=e.onSwatchHover,s=e.triangle,l=e.styles,c=void 0===l?{}:l,u=e.className,d=void 0===u?"":u,h=(0,i.Ay)(rn({default:{card:{width:t,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},c),{"hide-triangle":"hide"===s,"top-left-triangle":"top-left"===s,"top-right-triangle":"top-right"===s,"bottom-left-triangle":"bottom-left"===s,"bottom-right-triangle":"bottom-right"===s}),f=function(e,t){return a({hex:e,source:"hex"},t)};return r.createElement("div",{style:h.card,className:"github-picker "+d},r.createElement("div",{style:h.triangleShadow}),r.createElement("div",{style:h.triangle}),$i(n,(function(e){return r.createElement(Ca,{color:e,key:e,onClick:f,onSwatchHover:o})})))};Da.propTypes={width:w().oneOfType([w().string,w().number]),colors:w().arrayOf(w().string),triangle:w().oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:w().object},Da.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};yr(Da);const Ra=function(e){var t=e.direction,n=(0,i.Ay)({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:"vertical"===t});return r.createElement("div",{style:n.picker})};var Pa=Object.assign||function(e){for(var t=1;t.5});return r.createElement("div",{style:n.picker})};const za=function(){var e=(0,i.Ay)({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return r.createElement("div",{style:e.pointer},r.createElement("div",{style:e.left},r.createElement("div",{style:e.leftInside})),r.createElement("div",{style:e.right},r.createElement("div",{style:e.rightInside})))};const Na=function(e){var t=e.onClick,n=e.label,a=e.children,o=e.active,s=(0,i.Ay)({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:o});return r.createElement("div",{style:s.button,onClick:t},n||a)};const Fa=function(e){var t=e.rgb,n=e.currentColor,a=(0,i.Ay)({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+t.r+","+t.g+", "+t.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:n,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return r.createElement("div",null,r.createElement("div",{style:a.label},"new"),r.createElement("div",{style:a.swatches},r.createElement("div",{style:a.new}),r.createElement("div",{style:a.current})),r.createElement("div",{style:a.label},"current"))};var Ba=function(){function e(e,t){for(var n=0;n100&&(e.a=100),e.a/=100,t({h:a.h,s:a.s,l:a.l,a:e.a,source:"rgb"},r))};return r.createElement("div",{style:l.fields,className:"flexbox-fix"},r.createElement("div",{style:l.double},r.createElement(v,{style:{input:l.input,label:l.label},label:"hex",value:o.replace("#",""),onChange:c})),r.createElement("div",{style:l.single},r.createElement(v,{style:{input:l.input,label:l.label},label:"r",value:n.r,onChange:c,dragLabel:"true",dragMax:"255"})),r.createElement("div",{style:l.single},r.createElement(v,{style:{input:l.input,label:l.label},label:"g",value:n.g,onChange:c,dragLabel:"true",dragMax:"255"})),r.createElement("div",{style:l.single},r.createElement(v,{style:{input:l.input,label:l.label},label:"b",value:n.b,onChange:c,dragLabel:"true",dragMax:"255"})),r.createElement("div",{style:l.alpha},r.createElement(v,{style:{input:l.input,label:l.label},label:"a",value:Math.round(100*n.a),onChange:c,dragLabel:"true",dragMax:"100"})))};var Va=Object.assign||function(e){for(var t=1;t{"use strict";var r=n(9950),i=n(13204);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n