1(window.webpackJsonpfitsbydee=window.webpackJsonpfitsbydee||[]).push([[2],[function(e,t,n){"use strict";e.exports=n(254)},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)&&r.length){var a=o.apply(null,r);a&&e.push(a)}else if("object"===i)for(var u in r)n.call(r,u)&&r[u]&&e.push(u)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){"use strict";var r={};n.r(r),n.d(r,"someByType",(function(){return l})),n.d(r,"findByType",(function(){return f})),n.d(r,"isNil",(function(){return h}));var o={};n.r(o),n.d(o,"COLORS",(function(){return _})),n.d(o,"FLOATS",(function(){return S})),n.d(o,"SIZES",(function(){return T})),n.d(o,"TEXT_ALIGNMENTS",(function(){return O})),n.d(o,"VERTICAL_ALIGNMENTS",(function(){return k})),n.d(o,"VISIBILITY",(function(){return C})),n.d(o,"WIDTHS",(function(){return x})),n.d(o,"DIRECTIONAL_TRANSITIONS",(function(){return A})),n.d(o,"STATIC_TRANSITIONS",(function(){return I})),n.d(o,"TRANSITIONS",(function(){return N})),n.d(o,"ACCESSIBILITY",(function(){return D})),n.d(o,"ARROWS",(function(){return P})),n.d(o,"AUDIO_VIDEO",(function(){return R})),n.d(o,"BUSINESS",(function(){return j})),n.d(o,"CHESS",(function(){return M})),n.d(o,"CODE",(function(){return L})),n.d(o,"COMMUNICATION",(function(){return U})),n.d(o,"COMPUTERS",(function(){return F})),n.d(o,"CURRENCY",(function(){return B})),n.d(o,"DATE_TIME",(function(){return q})),n.d(o,"DESIGN",(function(){return V})),n.d(o,"EDITORS",(function(){return z})),n.d(o,"FILES",(function(){return W})),n.d(o,"GENDERS",(function(){return Q})),n.d(o,"HANDS_GESTURES",(function(){return G})),n.d(o,"HEALTH",(function(){return K})),n.d(o,"IMAGES",(function(){return H})),n.d(o,"INTERFACES",(function(){return Y})),n.d(o,"LOGISTICS",(function(){return $})),n.d(o,"MAPS",(function(){return X})),n.d(o,"MEDICAL",(function(){return J})),n.d(o,"OBJECTS",(function(){return Z})),n.d(o,"PAYMENTS_SHOPPING",(function(){return ee})),n.d(o,"SHAPES",(function(){return te})),n.d(o,"SPINNERS",(function(){return ne})),n.d(o,"SPORTS",(function(){return re})),n.d(o,"STATUS",(function(){return oe})),n.d(o,"USERS_PEOPLE",(function(){return ie})),n.d(o,"VEHICLES",(function(){return ae})),n.d(o,"WRITING",(function(){return ue})),n.d(o,"BRANDS",(function(){return se})),n.d(o,"ICONS",(function(){return ce})),n.d(o,"ICON_ALIASES",(function(){return le})),n.d(o,"ICONS_AND_ALIASES",(function(){return fe})),n.d(o,"COMPONENT_CONTEXT_SPECIFIC_ICONS",(function(){return he})),n.d(o,"ALL_ICONS_IN_ALL_CONTEXTS",(function(){return pe}));var i=n(113),a=n.n(i),u=n(54),s=n.n(u),c=n(0),l=function(e,t){return s()(c.Children.toArray(e),{type:t})},f=function(e,t){return a()(c.Children.toArray(e),{type:t})},h=function(e){return null===e||void 0===e||Array.isArray(e)&&0===e.length},p=n(43),d=n.n(p),m=n(75),y=n.n(m),v=n(90),g=n.n(v),b=n(26),w=n.n(b),E=n(44),_=["red","orange","yellow","olive","green","teal","blue","violet","purple","pink","brown","grey","black"],S=["left","right"],T=["mini","tiny","small","medium","large","big","huge","massive"],O=["left","center","right","justified"],k=["bottom","middle","top"],C=["mobile","tablet","computer","large screen","widescreen"],x=[].concat(d()(w()(E.b)),d()(w()(E.b).map(Number)),d()(g()(E.b))),A=["browse","browse right","drop","fade","fade up","fade down","fade left","fade right","fly up","fly down","fly left","fly right","horizontal flip","vertical flip","scale","slide up","slide down","slide left","slide right","swing up","swing down","swing left","swing right","zoom"],I=["jiggle","flash","shake","pulse","tada","bounce","glow"],N=[].concat(A,I),D=["american sign language interpreting","assistive listening systems","audio description","blind","braille","closed captioning","closed captioning outline","deaf","low vision","phone volume","question circle","question circle outline","sign language","tty","universal access","wheelchair"],P=["angle double down","angle double left","angle double right","angle double up","angle down","angle left","angle right","angle up","arrow alternate circle down","arrow alternate circle down outline","arrow alternate circle left","arrow alternate circle left outline","arrow alternate circle right","arrow alternate circle right outline","arrow alternate circle up","arrow alternate circle up outline","arrow circle down","arrow circle left","arrow circle right","arrow circle up","arrow down","arrow left","arrow right","arrow up","arrows alternate","arrows alternate horizontal","arrows alternate vertical","caret down","caret left","caret right","caret square down","caret square down outline","caret square left","caret square left outline","caret square right","caret square right outline","caret square up","caret square up outline","caret up","cart arrow down","chart line","chevron circle down","chevron circle left","chevron circle right","chevron circle up","chevron down","chevron left","chevron right","chevron up","cloud download","cloud upload","download","exchange","expand arrows alternate","external alternate","external square alternate","hand point down","hand point down outline","hand point left","hand point left outline","hand point right","hand point right outline","hand point up","hand point up outline","hand pointer","hand pointer outline","history","level down alternate","level up alternate","location arrow","long arrow alternate down","long arrow alternate left","long arrow alternate right","long arrow alternate up","mouse pointer","play","random","recycle","redo","redo alternate","reply","reply all","retweet","share","share square","share square outline","sign-in","sign-out","sign-in alternate","sign-out alternate","sort","sort alphabet down","sort alphabet up","sort amount down","sort amount up","sort down","sort numeric down","sort numeric up","sort up","sync","sync alternate","text height","text width","undo","undo alternate","upload","zoom-in","zoom-out"],R=["audio description","backward","circle","circle outline","closed captioning","closed captioning outline","compress","eject","expand","expand arrows alternate","fast backward","fast forward","file audio","file audio outline","file video","file video outline","film","forward","headphones","microphone","microphone slash","music","pause","pause circle","pause circle outline","phone volume","play","play circle","play circle outline","podcast","random","redo","redo alternate","rss","rss square","step backward","step forward","stop","stop circle","stop circle outline","sync","sync alternate","undo","undo alternate","video","volume down","volume off","volume up"],j=["address book","address book outline","address card","address card outline","archive","balance scale","birthday cake","book","briefcase","building","building outline","bullhorn","bullseye","calculator","calendar","calendar outline","calendar alternate","calendar alternate outline","certificate","chart area","chart bar","chart bar outline","chart line","chart pie","clipboard","clipboard outline","coffee","columns","compass","compass outline","copy","copy outline","copyright","copyright outline","cut","edit","edit outline","envelope","envelope outline","envelope open","envelope open outline","envelope square","eraser","fax","file","file outline","file alternate","file alternate outline","folder","folder outline","folder open","folder open outline","globe","industry","paperclip","paste","pen square","pencil alternate","percent","phone","phone square","phone volume","registered","registered outline","save","save outline","sitemap","sticky note","sticky note outline","suitcase","table","tag","tags","tasks","thumbtack","trademark"],M=["chess","chess bishop","chess board","chess king","chess knight","chess pawn","chess queen","chess rook","square full"],L=["archive","barcode","bath","bug","code","code branch","coffee","file","file outline","file alternate","file alternate outline","file code","file code outline","filter","fire extinguisher","folder","folder outline","folder open","folder open outline","keyboard","keyboard outline","microchip","qrcode","shield alternate","sitemap","terminal","user secret","window close","window close outline","window maximize","window maximize outline","window minimize","window minimize outline","window restore","window restore outline"],U=["address book","address book outline","address card","address card outline","american sign language interpreting","assistive listening systems","at","bell","bell outline","bell slash","bell slash outline","bullhorn","comment","comment outline","comment alternate","comment alternate outline","comments","comments outline","envelope","envelope outline","envelope open","envelope open outline","envelope square","fax","inbox","language","microphone","microphone slash","mobile","mobile alternate","paper plane","paper plane outline","phone","phone square","phone volume","rss","rss square","tty","wifi"],F=["desktop","download","hdd","hdd outline","headphones","keyboard","keyboard outline","laptop","microchip","mobile","mobile alternate","plug","power off","print","save","save outline","server","tablet","tablet alternate","tv","upload"],B=["dollar sign","euro
1sign","lira sign","money bill alternate","money bill alternate outline","pound sign","ruble sign","rupee sign","shekel sign","won sign","yen sign"],q=["bell","bell outline","bell slash","bell slash outline","calendar","calendar outline","calendar alternate","calendar alternate outline","calendar check","calendar check outline","calendar minus","calendar minus outline","calendar plus","calendar plus outline","calendar times","calendar times outline","clock","clock outline","hourglass","hourglass outline","hourglass end","hourglass half","hourglass start","stopwatch"],V=["adjust","clone","clone outline","copy","copy outline","crop","crosshairs","cut","edit","edit outline","eraser","eye","eye dropper","eye slash","eye slash outline","object group","object group outline","object ungroup","object ungroup outline","paint brush","paste","pencil alternate","save","save outline","tint"],z=["align center","align justify","align left","align right","bold","clipboard","clipboard outline","clone","clone outline","columns","copy","copy outline","cut","edit","edit outline","eraser","file","file outline","file alternate","file alternate outline","font","heading","i cursor","indent","italic","linkify","list","list alternate","list alternate outline","list ol","list ul","outdent","paper plane","paper plane outline","paperclip","paragraph","paste","pencil alternate","print","quote left","quote right","redo","redo alternate","reply","reply all","share","strikethrough","subscript","superscript","sync","sync alternate","table","tasks","text height","text width","th","th large","th list","trash","trash alternate","trash alternate outline","underline","undo","undo alternate","unlink"],W=["archive","clone","clone outline","copy","copy outline","cut","file","file outline","file alternate","file alternate outline","file archive","file archive outline","file audio","file audio outline","file code","file code outline","file excel","file excel outline","file image","file image outline","file pdf","file pdf outline","file powerpoint","file powerpoint outline","file video","file video outline","file word","file word outline","folder","folder outline","folder open","folder open outline","paste","save","save outline","sticky note","sticky note outline"],Q=["genderless","mars","mars double","mars stroke","mars stroke horizontal","mars stroke vertical","mercury","neuter","transgender","transgender alternate","venus","venus double","venus mars"],G=["hand lizard","hand lizard outline","hand paper","hand paper outline","hand peace","hand peace outline","hand point down","hand point down outline","hand point left","hand point left outline","hand point right","hand point right outline","hand point up","hand point up outline","hand pointer","hand pointer outline","hand rock","hand rock outline","hand scissors","hand scissors outline","hand spock","hand spock outline","handshake","handshake outline","thumbs down","thumbs down outline","thumbs up","thumbs up outline"],K=["ambulance","h square","heart","heart outline","heartbeat","hospital","hospital outline","medkit","plus square","plus square outline","stethoscope","user md","wheelchair"],H=["adjust","bolt","camera","camera retro","clone","clone outline","compress","expand","eye","eye dropper","eye slash","eye slash outline","file image","file image outline","film","id badge","id badge outline","id card","id card outline","image","image outline","images","images outline","sliders horizontal","tint"],Y=["ban","barcode","bars","beer","bell","bell outline","bell slash","bell slash outline","bug","bullhorn","bullseye","calculator","calendar","calendar outline","calendar alternate","calendar alternate outline","calendar check","calendar check outline","calendar minus","calendar minus outline","calendar plus","calendar plus outline","calendar times","calendar times outline","certificate","check","check circle","check circle outline","check square","check square outline","circle","circle outline","clipboard","clipboard outline","clone","clone outline","cloud","cloud download","cloud upload","coffee","cog","cogs","copy","copy outline","cut","database","dot circle","dot circle outline","download","edit","edit outline","ellipsis horizontal","ellipsis vertical","envelope","envelope outline","envelope open","envelope open outline","eraser","exclamation","exclamation circle","exclamation triangle","external alternate","external square alternate","eye","eye slash","eye slash outline","file","file outline","file alternate","file alternate outline","filter","flag","flag outline","flag checkered","folder","folder outline","folder open","folder open outline","frown","frown outline","hashtag","heart","heart outline","history","home","i cursor","info","info circle","language","magic","meh","meh outline","microphone","microphone slash","minus","minus circle","minus square","minus square outline","paste","pencil alternate","plus","plus circle","plus square","plus square outline","qrcode","question","question circle","question circle outline","quote left","quote right","redo","redo alternate","reply","reply all","rss","rss square","save","save outline","search","search minus","search plus","share","share alternate","share alternate square","share square","share square outline","shield alternate","sign-in","sign-out","signal","sitemap","sliders horizontal","smile","smile outline","sort","sort alphabet down","sort alphabet up","sort amount down","sort amount up","sort down","sort numeric down","sort numeric up","sort up","star","star outline","star half","star half outline","sync","sync alternate","thumbs down","thumbs down outline","thumbs up","thumbs up outline","times","times circle","times circle outline","toggle off","toggle on","trash","trash alternate","trash alternate outline","trophy","undo","undo alternate","upload","user","user outline","user circle","user circle outline","wifi"],$=["box","boxes","clipboard check","clipboard list","dolly","dolly flatbed","pallet","shipping fast","truck","warehouse"],X=["ambulance","anchor","balance scale","bath","bed","beer","bell","bell outline","bell slash","bell slash outline","bicycle","binoculars","birthday cake","blind","bomb","book","bookmark","bookmark outline","briefcase","building","building outline","car","coffee","crosshairs","dollar sign","eye","eye slash","eye slash outline","fighter jet","fire","fire extinguisher","flag","flag outline","flag checkered","flask","gamepad","gavel","gift","glass martini","globe","graduation cap","h square","heart","heart outline","heartbeat","home","hospital","hospital outline","image","image outline","images","images outline","industry","info","info circle","key","leaf","lemon","lemon outline","life ring","life ring outline","lightbulb","lightbulb outline","location arrow","low vision","magnet","male","map","map outline","map marker","map marker alternate","map pin","map signs","medkit","money bill alternate","money bill alternate outline","motorcycle","music","newspaper","newspaper outline","paw","phone","phone square","phone volume","plane","plug","plus","plus square","plus square outline","print","recycle","road","rocket","search","search minus","search plus","ship","shopping bag","shopping basket","shopping cart","shower","street view","subway","suitcase","tag","tags","taxi","thumbtack","ticket alternate","tint","train","tree","trophy","truck","tty","umbrella","university","utensil spoon","utensils","wheelchair","wifi","wrench"],J=["ambulance","band aid","dna","first aid","heart","heart outline","heartbeat","hospital","hospital outline","hospital symbol","pills","plus","stethoscope","syringe","thermometer","user md","weight"],Z=["ambulance","anchor","archive","balance scale","bath","bed","beer","bell","bell outline","bicycle","binoculars","birthday cake","bomb","book","bookmark","bookmark outline","briefcase","bug","building","building outline","bullhorn","bullseye","bus","calculator","calendar","calendar outline","calendar alternate","calendar alternate outline","camera","camera retro","car","clipboard","clipboard outline","cloud","coffee","cog","cogs","compass","compass outline","copy","copy outline","cube","cubes","cut","envelope","envelope outline","envelope open","envelope open outline","eraser","eye","eye dropper","fax","fighter jet","file","file outline","file alternate","file alternate outline","film","fire","fire extinguisher","flag","flag outline","flag checkered","flask","futbol","futbol outline","gamepad","gavel","gem","gem outline","gift","glass martini","globe","graduation cap","hdd","hdd outline","headphones","heart","heart outline","home","hospital","hospital outline","hourglass","hourglass outline","image","image outline","images","images outline","industry","key","keyboard","keyboard outline","laptop","leaf","lemon","lemon outline","life ring","life ring outline","lightbulb","lightbulb outline","lock","lock open","magic","magnet","map","map outline","map marker","map marker alternate","map pin","map signs","medkit","microchip","microphone","mobile","mobile alternate","money bill alternate","money bill alternate outline","moon","moon outline","motorcycle","newspaper","newspaper outline","paint brush","paper plane","paper plane outline","paperclip","paste","paw","pencil alternate","phone","plane","plug","print","puzzle piece","road","rocket","save","save outline","search","shield alternate","shopping bag","shopping basket","shopping cart","shower","snowflake","snowflake outline","space shuttle","star","star outline","sticky note","sticky note outline","stopwatch","subway","suitcase","sun","sun outline","tablet","tablet alternate","tachometer alternate","tag","tags","taxi","thumbtack","ticket alternate","train","trash","trash alternate","trash alternate outline","tree","trophy","truck","tv","umbrella","university","unlock","unlock alternate","utensil spoon","utensils","wheelchair","wrench"],ee=["bell","bell outline","bookmark","bookmark outline","bullhorn","camera","camera retro","cart arrow down","cart plus","certificate","credit card","credit card outline","gem","gem outline","gift","handshake","handshake outline","heart","heart outline","key","shopping bag","shopping basket","shopping cart","star","star outline","tag","tags","thumbs down","thumbs down outline","thumbs up","thumbs up outline","trophy"],te=["bookmark","bookmark outline","calendar","calendar outline","certificate","circle","circle outline","cloud","comment","comment outline","file","file outline","folder","folder outline","heart","heart outline","map marker","play","square","square outline","star","star outline"],ne=["asterisk","certificate","circle notch","cog","compass","compass outline","crosshairs","life ring","life ring outline","snowflake","snowflake outline","spinner","sun","sun outline","sync"],re=["baseball ball","basketball ball","bowling ball","football ball","futbol","futbol outline","golf ball","hockey puck","quidditch","table tennis","volleyball ball"],oe=["ban","battery empty","battery full","battery half","battery quarter","battery three quarters","bell","bell outline","bell slash","bell slash outline","calendar","calendar outline","calendar alternate","calendar alternate outline","calendar check","calendar check outline","calendar minus","calendar minus outline","calendar plus","calendar plus outline","calendar times","calendar times outline","cart arrow down","cart plus","exclamation","exclamation circle","exclamation triangle","eye","eye slash","eye slash outline","file","file outline","file alternate","file alternate outline","folder","folder outline","folder open","folder open outline","info","info circle","lock","lock open","minus","minus circle","minus square","minus square outline","plus","plus circle","plus square","plus square outline","question","question circle","question circle outline","shield alternate","shopping cart","sign in alternate","sign out alternate","thermometer empty","thermometer full","thermometer half","thermometer quarter","thermometer three quarters","thumbs down","thumbs down outline","thumbs up","thumbs up outline","toggle off","toggle on","unlock","unlock alternate"],ie=["address book","address book outline","address card","address card outline","bed","blind","child","female","frown","frown outline","id badge","id badge outline","id card","id card outline","male","meh","meh outline","power off","smile","smile outline","street view","user","user outline","user circle","user circle outline","user md","user plus","user secret","user times","users","wheelchair"],ae=["ambulance","bicycle","bus","car","fighter jet","motorcycle","paper plane","paper plane outline","plane","rocket","ship","shopping cart","space shuttle","subway","taxi","train","truck","wheelchair"],ue=["archive","book","bookmark","bookmark outline","edit","edit outline","envelope","envelope outline","envelope open","envelope open outline","eraser","file","file outline","file alternate","file alternate outline","folder","folder outline","folder open","folder open outline","keyboard","keyboard outline","newspaper","newspaper outline","paper plane","paper plane outline","paperclip","paragraph","pen square","pencil alternate","quote left","quote right","sticky note","sticky note outline","thumbtack"],se=["500px","accessible","accusoft","adn","adversal","affiliatetheme","algolia","amazon","amazon pay","amilia","android","angellist","angrycreative","angular","app store","app store ios","apper","apple","apple pay","asymmetrik","audible","autoprefixer","avianex","aviato","aws","bandcamp","behance","behance square","bimobject","bitbucket","bitcoin","bity","black tie","blackberry","blogger","blogger b","bluetooth","bluetooth b","btc","buromobelexperte","buysellads","cc amazon pay","cc amex","cc apple pay","cc diners club","cc discover","cc jcb","cc mastercard","cc paypal","cc stripe","cc visa","centercode","chrome","cloudscale","cloudsmith","cloudversify","codepen","codiepie","connectdevelop","contao","cpanel","creative commons","css3","css3 alternate","cuttlefish","d and d","dashcube","delicious","deploydog","deskpro","deviantart","digg","digital ocean","discord","discourse","dochub","docker","draft2digital","dribbble","dribbble square","dropbox","drupal","dyalog","earlybirds","edge","elementor","ember","empire","envira","erlang","ethereum","etsy","expeditedssl","facebook","facebook f","facebook messenger","facebook square","firefox","first order","firstdraft","flickr","flipboard","fly","font awesome","font awesome alternate","font awesome flag","fonticons","fonticons fi","fort awesome","fort awesome alternate","forumbee","foursquare","free code camp","freebsd","get pocket","gg","gg circle","git","git square","github","github alternate","github square","gitkraken","gitlab","gitter","glide","glide g","gofore","goodreads","goodreads g","google","google drive","google play","google plus","google plus g","google plus square","google wallet","gratipay","grav","gripfire","grunt","gulp","hacker news","hacker news square","hips","hire a helper","hooli","hotjar","houzz","html5","hubspot","imdb","instagram","internet explorer","ioxhost","itunes","itunes note","jenkins","
1joget","joomla","js","js square","jsfiddle","keycdn","kickstarter","kickstarter k","korvue","laravel","lastfm","lastfm square","leanpub","less","linechat","linkedin","linkedin alternate","linode","linux","lyft","magento","maxcdn","medapps","medium","medium m","medrt","meetup","microsoft","mix","mixcloud","mizuni","modx","monero","napster","nintendo switch","node","node js","npm","ns8","nutritionix","odnoklassniki","odnoklassniki square","opencart","openid","opera","optin monster","osi","page4","pagelines","palfed","patreon","paypal","periscope","phabricator","phoenix framework","php","pied piper","pied piper alternate","pied piper pp","pinterest","pinterest p","pinterest square","playstation","product hunt","pushed","python","qq","quinscape","quora","ravelry","react","rebel","redriver","reddit","reddit alien","reddit square","rendact","renren","replyd","resolving","rocketchat","rockrms","safari","sass","schlix","scribd","searchengin","sellcast","sellsy","servicestack","shirtsinbulk","simplybuilt","sistrix","skyatlas","skype","slack","slack hash","slideshare","snapchat","snapchat ghost","snapchat square","soundcloud","speakap","spotify","stack exchange","stack overflow","staylinked","steam","steam square","steam symbol","sticker mule","strava","stripe","stripe s","studiovinari","stumbleupon","stumbleupon circle","superpowers","supple","telegram","telegram plane","tencent weibo","themeisle","trello","tripadvisor","tumblr","tumblr square","twitch","twitter","twitter square","typo3","uber","uikit","uniregistry","untappd","usb","ussunnah","vaadin","viacoin","viadeo","viadeo square","viber","vimeo","vimeo square","vimeo v","vine","vk","vnv","vuejs","wechat","weibo","weixin","whatsapp","whatsapp square","whmcs","wikipedia w","windows","wordpress","wordpress simple","wpbeginner","wpexplorer","wpforms","xbox","xing","xing square","y combinator","yahoo","yandex","yandex international","yelp","yoast","youtube","youtube square"],ce=y()([].concat(D,P,R,j,M,L,U,F,B,q,V,z,W,Q,G,K,H,Y,$,X,J,Z,ee,te,ne,re,oe,ie,ae,ue,se)),le=["chess rock","ordered list","unordered list","user doctor","shield","puzzle","add circle","add square","add to calendar","add to cart","add user","add","alarm mute","alarm","ald","als","announcement","area chart","area graph","arrow down cart","asexual","asl interpreting","asl","assistive listening devices","attach","attention","balance","bar","bathtub","battery four","battery high","battery low","battery one","battery three","battery two","battery zero","birthday","block layout","bluetooth alternative","broken chain","browser","call square","call","cancel","cart","cc","chain","chat","checked calendar","checkmark","circle notched","close","cny","cocktail","commenting","computer","configure","content","deafness","delete calendar","delete","detective","discussions","doctor","dollar","dont","drivers license","dropdown","emergency","envira gallery","erase","eur","euro","eyedropper","factory","favorite","feed","female homosexual","file text","file text outline","find","first aid","fork","game","gay","gbp","google plus circle","google plus official","grab","graduation","grid layout","group","h","hand victory","handicap","hard of hearing","header","help circle","help","heterosexual","hide","hotel","hourglass four","hourglass full","hourglass one","hourglass three","hourglass two","idea","ils","in cart","inr","intergender","intersex","jpy","krw","lab","law","legal","lesbian","lightning","like","line graph","linkedin square","linkify","lira","list layout","magnify","mail forward","mail outline","mail square","mail","male homosexual","man","marker","mars alternate","mars horizontal","mars vertical","microsoft edge","military","ms edge","mute","new pied piper","non binary transgender","numbered list","options","other gender horizontal","other gender vertical","other gender","payment","paypal card","pencil square","photo","picture","pie chart","pie graph","pied piper hat","pin","plus cart","point","pointing down","pointing left","pointing right","pointing up","pound","power cord","power","privacy","r circle","rain","record","refresh","remove circle","remove from calendar","remove user","remove","repeat","rmb","rouble","rub","ruble","rupee","s15","selected radio","send","setting","settings","shekel","sheqel","shipping","shop","shuffle","shutdown","sidebar","signing","signup","sliders","soccer","sort alphabet ascending","sort alphabet descending","sort ascending","sort content ascending","sort content descending","sort descending","sort numeric ascending","sort numeric descending","sound","spy","stripe card","student","talk","target","teletype","television","text cursor","text telephone","theme","thermometer","thumb tack","time","tm","toggle down","toggle left","toggle right","toggle up","translate","travel","treatment","triangle down","triangle left","triangle right","triangle up","try","unhide","unlinkify","unmute","usd","user cancel","user close","user delete","user x","vcard","video camera","video play","volume control phone","wait","warning circle","warning sign","warning","wi-fi","winner","wizard","woman","won","wordpress beginner","wordpress forms","world","write square","x","yen","zip","zoom in","zoom out","zoom","bitbucket square","checkmark box","circle thin","cloud download","cloud upload","compose","conversation","credit card alternative","currency","dashboard","diamond","disk","exchange","external share","external square","external","facebook official","food","hourglass zero","level down","level up","log out","meanpath","money","move","pencil","protect","radio","remove bookmark","resize horizontal","resize vertical","sign in","sign out","spoon","star half empty","star half full","ticket","times rectangle","write","youtube play"],fe=y()([].concat(d()(ce),le)),he=["left dropdown"],pe=y()([].concat(d()(fe),he));n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return o}
vendor: 5,549 bytes, line 1
1))},function(e,t,n){var r=n(335),o=n(66)(r);e.exports=o},function(e,t,n){e.exports=n(261)()},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r=n(49),o=n(2);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!==typeof t?o(e):t}},function(e,t,n){var r=n(334);e.exports=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&&r(e,t)}},function(e,t){e.exports=function(e){return null==e}},function(e,t,n){var r=n(1);e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){r(e,t,n[t])}))}return e}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(72),o=n(25);function i(e,t){return!t||"object"!==Object(r.a)(t)&&"function"!==typeof t?Object(o.a)(e):t}},function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(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&&r(e,t)}n.d(t,"a",(function(){return o}))},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){var r=n(104);e.exports=function(e,t,n){var o=null==e?void 0:r(e,t);return void 0===o?n:o}},function(e,t,n){"use strict";for(var r=function(e){return null!==e&&!Array.isArray(e)&&"object"===typeof e},o={3:"Cancel",6:"Help",8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",28:"Convert",29:"NonConvert",30:"Accept",31:"ModeChange",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",41:"Select",42:"Print",43:"Execute",44:"PrintScreen",45:"Insert",46:"Delete",48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],91:"OS",93:"ContextMenu",144:"NumLock",145:"ScrollLock",181:"VolumeMute",182:"VolumeDown",183:"VolumeUp",186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"'],224:"Meta",225:"AltGraph",246:"Attn",247:"CrSel",248:"ExSel",249:"EraseEof",250:"Play",251:"ZoomOut"},i=0;i<24;i+=1)o[112+i]="F"+(i+1);for(var a=0;a<26;a+=1){var u=a+65;o[u]=[String.fromCharCode(u+32),String.fromCharCode(u)]}var s={codes:o,getCode:function(e){return r(e)?e.keyCode||e.which||this[e.key]:this[e]},getKey:function(e){var t=r(e);if(t&&e.key)return e.key;var n=o[t?e.keyCode||e.which:e];return Array.isArray(n)&&(n=t?n[e.shiftKey?1:0]:n[0]),n},Cancel:3,Help:6,Backspace:8,Tab:9,Clear:12,Enter:13,Shift:16,Control:17,Alt:18,Pause:19,CapsLock:20,Escape:27,Convert:28,NonConvert:29,Accept:30,ModeChange:31," ":32,PageUp:33,PageDown:34,End:35,Home:36,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Select:41,Print:42,Execute:43,PrintScreen:44,Insert:45,Delete:46,0:48,")":48,1:49,"!":49,2:50,"@":50,3:51,"#":51,4:52,$:52,5:53,"%":53,6:54,"^":54,7:55,"&":55,8:56,"*":56,9:57,"(":57,a:65,A:65,b:66,B:66,c:67,C:67,d:68,D:68,e:69,E:69,f:70,F:70,g:71,G:71,h:72,H:72,i:73,I:73,j:74,J:74,k:75,K:75,l:76,L:76,m:77,M:77,n:78,N:78,o:79,O:79,p:80,P:80,q:81,Q:81,r:82,R:82,s:83,S:83,t:84,T:84,u:85,U:85,v:86,V:86,w:87,W:87,x:88,X:88,y:89,Y:89,z:90,Z:90,OS:91,ContextMenu:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,F16:127,F17:128,F18:129,F19:130,F20:131,F21:132,F22:133,F23:134,F24:135,NumLock:144,ScrollLock:145,VolumeMute:181,VolumeDown:182,VolumeUp:183,";":186,":":186,"=":187,"+":187,",":188,"<":188,"-":189,_:189,".":190,">":190,"/":191,"?":191,"`":192,"~":192,"[":219,"{":219,"\\":220,"|":220,"]":221,"}":221,"'":222,'"':222,Meta:224,AltGraph:225,Attn:246,CrSel:247,ExSel:248,EraseEof:249,Play:250,ZoomOut:251};s.Spacebar=s[" "],s.Digit0=s[0],s.Digit1=s[1],s.Digit2=s[2],s.Digit3=s[3],s.Digit4=s[4],s.Digit5=s[5],s.Digit6=s[6],s.Digit7=s[7],s.Digit8=s[8],s.Digit9=s[9],s.Tilde=s["~"],s.GraveAccent=s["`"],s.E
1xclamationPoint=s["!"],s.AtSign=s["@"],s.PoundSign=s["#"],s.PercentSign=s["%"],s.Caret=s["^"],s.Ampersand=s["&"],s.PlusSign=s["+"],s.MinusSign=s["-"],s.EqualsSign=s["="],s.DivisionSign=s["/"],s.MultiplicationSign=s["*"],s.Comma=s[","],s.Decimal=s["."],s.Colon=s[":"],s.Semicolon=s[";"],s.Pipe=s["|"],s.BackSlash=s["\\"],s.QuestionMark=s["?"],s.SingleQuote=s["'"],s.DoubleQuote=s['"'],s.LeftCurlyBrace=s["{"],s.RightCurlyBrace=s["}"],s.LeftParenthesis=s["("],s.RightParenthesis=s[")"],s.LeftAngleBracket=s["<"],s.RightAngleBracket=s[">"],s.LeftSquareBracket=s["["],s.RightSquareBracket=s["]"],e.exports=s},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"e",(function(){return u})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return c})),n.d(t,"d",(function(){return l})),n.d(t,"f",(function(){return f})),n.d(t,"g",(function(){return h}));var r=n(49),o=n.n(r),i=n(44),a=function(e,t){return e&&t},u=function(e,t){return e&&!0!==e&&"".concat(e," ").concat(t)},s=function(e,t){return e&&(!0===e?t:"".concat(e," ").concat(t))},c=function(e,t){return e&&!0!==e?e.replace("large screen","large-screen").replace(/ vertically/g,"-vertically").split(" ").map((function(e){return"".concat(e.replace("-"," ")," ").concat(t)})).join(" "):null},l=function(e){return"justified"===e?"justified":u(e,"aligned")},f=function(e){return u(e,"aligned")},h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(n&&"equal"===e)return"equal width";var r=o()(e);return"string"!==r&&"number"!==r||!t?Object(i.a)(e):"".concat(Object(i.a)(e)," ").concat(t)}},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t,n){var r=n(176),o=n(136),i=n(40);e.exports=function(e){return i(e)?r(e):o(e)}},function(e,t,n){var r=n(65),o=n(48),i=n(351),a=n(20);e.exports=function(e,t){return(a(e)?r:i)(e,o(t,3))}},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t){e.exports=function(e){return void 0===e}},function(e,t,n){"use strict";var r;r=n(338),e.exports=r.default,e.exports.instance=r.instance},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){"use strict";var r=n(210),o=n(443),i=Object.prototype.toString;function a(e){return"[object Array]"===i.call(e)}function u(e){return null!==e&&"object"===typeof e}function s(e){return"[object Function]"===i.call(e)}function c(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),a(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:a,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:o,isFormData:function(e){return"undefined"!==typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"===typeof e},isNumber:function(e){return"number"===typeof e},isObject:u,isUndefined:function(e){return"undefined"===typeof e},isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:s,isStream:function(e){return u(e)&&s(e.pipe)},isURLSearchParams:function(e){return"undefined"!==typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"===typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!==typeof window&&"undefined"!==typeof document)}
1,forEach:c,merge:function e(){var t={};function n(n,r){"object"===typeof t[r]&&"object"===typeof n?t[r]=e(t[r],n):t[r]=n}for(var r=0,o=arguments.length;r<o;r++)c(arguments[r],n);return t},deepMerge:function e(){var t={};function n(n,r){"object"===typeof t[r]&&"object"===typeof n?t[r]=e(t[r],n):t[r]="object"===typeof n?e({},n):n}for(var r=0,o=arguments.length;r<o;r++)c(arguments[r],n);return t},extend:function(e,t,n){return c(t,(function(t,o){e[o]=n&&"function"===typeof t?r(t,n):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(e,t,n){"use strict";var r=!0,o="Invariant failed";t.a=function(e,t){if(!e)throw r?new Error(o):new Error(o+": "+(t||""))}},function(e,t,n){var r=n(99),o=n(40),i=n(89),a=n(87),u=n(90),s=Math.max;e.exports=function(e,t,n,c){e=o(e)?e:u(e),n=n&&!c?a(n):0;var l=e.length;return n<0&&(n=s(l+n,0)),i(e)?n<=l&&e.indexOf(t,n)>-1:!!l&&r(e,t,n)>-1}},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return h}));var r=n(41),o=n(0),i=n.n(o),a=n(55),u=n(36),s=(n(7),n(24)),c=n(77),l=n(33);i.a.Component;var f=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).history=Object(u.b)(t.props),t}return Object(r.a)(t,e),t.prototype.render=function(){return i.a.createElement(a.b,{history:this.history,children:this.props.children})},t}(i.a.Component);var h=function(e){function t(){return e.apply(this,arguments)||this}Object(r.a)(t,e);var n=t.prototype;return n.handleClick=function(e,t){try{this.props.onClick&&this.props.onClick(e)}catch(n){throw e.preventDefault(),n}e.defaultPrevented||0!==e.button||this.props.target&&"_self"!==this.props.target||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),(this.props.replace?t.replace:t.push)(this.props.to))},n.render=function(){var e=this,t=this.props,n=t.innerRef,r=(t.replace,t.to),o=Object(c.a)(t,["innerRef","replace","to"]);return i.a.createElement(a.d.Consumer,null,(function(t){t||Object(l.a)(!1);var a="string"===typeof r?Object(u.c)(r,null,null,t.location):r,c=a?t.history.createHref(a):"";return i.a.createElement("a",Object(s.a)({},o,{onClick:function(n){return e.handleClick(n,t.history)},href:c,ref:n}))}))},t}(i.a.Component)},function(e,t,n){"use strict";var r=n(24);function o(e){return"/"===e.charAt(0)}function i(e,t){for(var n=t,r=n+1,o=e.length;r<o;n+=1,r+=1)e[n]=e[r];e.pop()}var a=function(e,t){void 0===t&&(t="");var n,r=e&&e.split("/")||[],a=t&&t.split("/")||[],u=e&&o(e),s=t&&o(t),c=u||s;if(e&&o(e)?a=r:r.length&&(a.pop(),a=a.concat(r)),!a.length)return"/";if(a.length){var l=a[a.length-1];n="."===l||".."===l||""===l}else n=!1;for(var f=0,h=a.length;h>=0;h--){var p=a[h];"."===p?i(a,h):".."===p?(i(a,h),f++):f&&(i(a,h),f--)}if(!c)for(;f--;f)a.unshift("..");!c||""===a[0]||a[0]&&o(a[0])||a.unshift("");var d=a.join("/");return n&&"/"!==d.substr(-1)&&(d+="/"),d};function u(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}var s=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"===typeof t||"object"===typeof n){var r=u(t),o=u(n);return r!==t||o!==n?e(r,o):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1},c=n(33);function l(e){return"/"===e.charAt(0)?e:"/"+e}function f(e){return"/"===e.charAt(0)?e.substr(1):e}function h(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function p(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function d(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function m(e,t,n,o){var i;"string"===typeof e?(i=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var i=t.indexOf("?");return-1!==i&&(n=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(i=Object(r.a)({},e)).pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==t&&void 0===i.state&&(i.state=t));try{i.pathname=decodeURI(i.pathname)}catch(u){throw u instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invali
1d percent-encoding.'):u}return n&&(i.key=n),o?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=a(i.pathname,o.pathname)):i.pathname=o.pathname:i.pathname||(i.pathname="/"),i}function y(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&s(e.state,t.state)}function v(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var i="function"===typeof e?e(t,n):e;"string"===typeof i?"function"===typeof r?r(i,o):o(!0):o(!1!==i)}else o(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.forEach((function(e){return e.apply(void 0,n)}))}}}n.d(t,"a",(function(){return S})),n.d(t,"b",(function(){return A})),n.d(t,"d",(function(){return N})),n.d(t,"c",(function(){return m})),n.d(t,"f",(function(){return y})),n.d(t,"e",(function(){return d}));var g=!("undefined"===typeof window||!window.document||!window.document.createElement);function b(e,t){t(window.confirm(e))}var w="popstate",E="hashchange";function _(){try{return window.history.state||{}}catch(e){return{}}}function S(e){void 0===e&&(e={}),g||Object(c.a)(!1);var t=window.history,n=function(){var e=window.navigator.userAgent;return(-1===e.indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone"))&&(window.history&&"pushState"in window.history)}(),o=!(-1===window.navigator.userAgent.indexOf("Trident")),i=e,a=i.forceRefresh,u=void 0!==a&&a,s=i.getUserConfirmation,f=void 0===s?b:s,y=i.keyLength,S=void 0===y?6:y,T=e.basename?p(l(e.basename)):"";function O(e){var t=e||{},n=t.key,r=t.state,o=window.location,i=o.pathname+o.search+o.hash;return T&&(i=h(i,T)),m(i,r,n)}function k(){return Math.random().toString(36).substr(2,S)}var C=v();function x(e){Object(r.a)(B,e),B.length=t.length,C.notifyListeners(B.location,B.action)}function A(e){(function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")})(e)||D(O(e.state))}function I(){D(O(_()))}var N=!1;function D(e){if(N)N=!1,x();else{C.confirmTransitionTo(e,"POP",f,(function(t){t?x({action:"POP",location:e}):function(e){var t=B.location,n=R.indexOf(t.key);-1===n&&(n=0);var r=R.indexOf(e.key);-1===r&&(r=0);var o=n-r;o&&(N=!0,M(o))}(e)}))}}var P=O(_()),R=[P.key];function j(e){return T+d(e)}function M(e){t.go(e)}var L=0;function U(e){1===(L+=e)&&1===e?(window.addEventListener(w,A),o&&window.addEventListener(E,I)):0===L&&(window.removeEventListener(w,A),o&&window.removeEventListener(E,I))}var F=!1;var B={length:t.length,action:"POP",location:P,createHref:j,push:function(e,r){var o=m(e,r,k(),B.location);C.confirmTransitionTo(o,"PUSH",f,(function(e){if(e){var r=j(o),i=o.key,a=o.state;if(n)if(t.pushState({key:i,state:a},null,r),u)window.location.href=r;else{var s=R.indexOf(B.location.key),c=R.slice(0,s+1);c.push(o.key),R=c,x({action:"PUSH",location:o})}else window.location.href=r}}))},replace:function(e,r){var o=m(e,r,k(),B.location);C.confirmTransitionTo(o,"REPLACE",f,(function(e){if(e){var r=j(o),i=o.key,a=o.state;if(n)if(t.replaceState({key:i,state:a},null,r),u)window.location.replace(r);else{var s=R.indexOf(B.location.key);-1!==s&&(R[s]=o.key),x({action:"REPLACE",location:o})}else window.location.replace(r)}}))},go:M,goBack:function(){M(-1)},goForward:function(){M(1)},block:function(e){void 0===e&&(e=!1);var t=C.setPrompt(e);return F||(U(1),F=!0),function(){return F&&(F=!1,U(-1)),t()}},listen:function(e){var t=C.appendListener(e);return U(1),function(){U(-1),t()}}};return B}var T="hashchange",O={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+f(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:f,decodePath:l},slash:{encodePath:l,decodePath:l}};function k(e){var t=e.indexOf("#");return-1===t?e:e.slice(0,t)}function C(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)}function x(e){window.location.replace(k(window.location.href)+"#"+e)}function A(e){void 0===e&&(e={}
1),g||Object(c.a)(!1);var t=window.history,n=(window.navigator.userAgent.indexOf("Firefox"),e),o=n.getUserConfirmation,i=void 0===o?b:o,a=n.hashType,u=void 0===a?"slash":a,s=e.basename?p(l(e.basename)):"",f=O[u],y=f.encodePath,w=f.decodePath;function E(){var e=w(C());return s&&(e=h(e,s)),m(e)}var _=v();function S(e){Object(r.a)(B,e),B.length=t.length,_.notifyListeners(B.location,B.action)}var A=!1,I=null;function N(){var e,t,n=C(),r=y(n);if(n!==r)x(r);else{var o=E(),a=B.location;if(!A&&(t=o,(e=a).pathname===t.pathname&&e.search===t.search&&e.hash===t.hash))return;if(I===d(o))return;I=null,function(e){if(A)A=!1,S();else{_.confirmTransitionTo(e,"POP",i,(function(t){t?S({action:"POP",location:e}):function(e){var t=B.location,n=j.lastIndexOf(d(t));-1===n&&(n=0);var r=j.lastIndexOf(d(e));-1===r&&(r=0);var o=n-r;o&&(A=!0,M(o))}(e)}))}}(o)}}var D=C(),P=y(D);D!==P&&x(P);var R=E(),j=[d(R)];function M(e){t.go(e)}var L=0;function U(e){1===(L+=e)&&1===e?window.addEventListener(T,N):0===L&&window.removeEventListener(T,N)}var F=!1;var B={length:t.length,action:"POP",location:R,createHref:function(e){var t=document.querySelector("base"),n="";return t&&t.getAttribute("href")&&(n=k(window.location.href)),n+"#"+y(s+d(e))},push:function(e,t){var n=m(e,void 0,void 0,B.location);_.confirmTransitionTo(n,"PUSH",i,(function(e){if(e){var t=d(n),r=y(s+t);if(C()!==r){I=t,function(e){window.location.hash=e}(r);var o=j.lastIndexOf(d(B.location)),i=j.slice(0,o+1);i.push(t),j=i,S({action:"PUSH",location:n})}else S()}}))},replace:function(e,t){var n=m(e,void 0,void 0,B.location);_.confirmTransitionTo(n,"REPLACE",i,(function(e){if(e){var t=d(n),r=y(s+t);C()!==r&&(I=t,x(r));var o=j.indexOf(d(B.location));-1!==o&&(j[o]=t),S({action:"REPLACE",location:n})}}))},go:M,goBack:function(){M(-1)},goForward:function(){M(1)},block:function(e){void 0===e&&(e=!1);var t=_.setPrompt(e);return F||(U(1),F=!0),function(){return F&&(F=!1,U(-1)),t()}},listen:function(e){var t=_.appendListener(e);return U(1),function(){U(-1),t()}}};return B}function I(e,t,n){return Math.min(Math.max(e,t),n)}function N(e){void 0===e&&(e={});var t=e,n=t.getUserConfirmation,o=t.initialEntries,i=void 0===o?["/"]:o,a=t.initialIndex,u=void 0===a?0:a,s=t.keyLength,c=void 0===s?6:s,l=v();function f(e){Object(r.a)(w,e),w.length=w.entries.length,l.notifyListeners(w.location,w.action)}function h(){return Math.random().toString(36).substr(2,c)}var p=I(u,0,i.length-1),y=i.map((function(e){return m(e,void 0,"string"===typeof e?h():e.key||h())})),g=d;function b(e){var t=I(w.index+e,0,w.entries.length-1),r=w.entries[t];l.confirmTransitionTo(r,"POP",n,(function(e){e?f({action:"POP",location:r,index:t}):f()}))}var w={length:y.length,action:"POP",location:y[p],index:p,entries:y,createHref:g,push:function(e,t){var r=m(e,t,h(),w.location);l.confirmTransitionTo(r,"PUSH",n,(function(e){if(e){var t=w.index+1,n=w.entries.slice(0);n.length>t?n.splice(t,n.length-t,r):n.push(r),f({action:"PUSH",location:r,index:t,entries:n})}}))},replace:function(e,t){var r=m(e,t,h(),w.location);l.confirmTransitionTo(r,"REPLACE",n,(function(e){e&&(w.entries[w.index]=r,f({action:"REPLACE",location:r}))}))},go:b,goBack:function(){b(-1)},goForward:function(){b(1)},canGo:function(e){var t=w.index+e;return t>=0&&t<w.entries.length},block:function(e){return void 0===e&&(e=!1),l.setPrompt(e)},listen:function(e){return l.appendListener(e)}};return w}},function(e,t,n){var r=n(165),o=n(66),i=n(82),a=o((function(e,t){return i(e)?r(e,t):[]}));e.exports=a},function(e,t,n){var r=n(160),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){var r=n(42),o=n(129);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},function(e,t,n){"use strict";function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}n.d(t,"a",(function(){return r}))},function(e,t,n){var r=n(47),o=n(39),i="[object AsyncFunction]",a="[object Function]",u="[object GeneratorFunction]",s="[object Proxy]";e.exports=function(e){if(!o(e))return!1;var t=r(e);return t==a||t==u||t==i||t==s}},function(e,t,n){var r=n(264),o=n(265),i=n(266);e.exports=function(e){return r(e)||o(e)||i()}},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return a}));var r=n(49),o=n.n(r),i={1:"one",2:"two",3:"three",4:"four",5:"five",6:"six",7:"seven",8:"eight",9:"nine",10:"ten",11:"eleven",12:"twelve",13:"thirteen",14:"fourteen",15:"fifteen",16:"sixteen"};function a(e){var t=o()(e);return"string"===t||"number"===t?i[e]||e:""}},function(e,t,n){var r=n(185),o=n(59),i=n(333),a=n(20);e.exports=function(e,t){return(a(e)?r:o)(e,i(t))}},,function(e,t,n){var r=n(64),o=n(271),i=n(272),a="[object Null]",u="[object Undef
1ined]",s=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?u:a:s&&s in Object(e)?o(e):i(e)}},function(e,t,n){var r=n(299),o=n(319),i=n(81),a=n(20),u=n(324);e.exports=function(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?a(e)?o(e[0],e[1]):r(e):u(e)}},function(e,t){function n(e){return(n="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})(e)}function r(t){return"function"===typeof Symbol&&"symbol"===n(Symbol.iterator)?e.exports=r=function(e){return n(e)}:e.exports=r=function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},r(t)}e.exports=r},function(e,t,n){var r=n(330),o=n(331),i=n(332);e.exports=function(e,t){return r(e)||o(e,t)||i()}},function(e,t,n){var r=n(348),o=n(180);e.exports=function(e,t){return null!=e&&o(e,t,r)}},,function(e,t,n){var r=n(138);e.exports=function(e){return null==e?"":r(e)}},function(e,t,n){var r=n(171),o=n(48),i=n(326),a=n(20),u=n(139);e.exports=function(e,t,n){var s=a(e)?r:i;return n&&u(e,t,n)&&(t=void 0),s(e,o(t,3))}},function(e,t,n){"use strict";var r=n(0),o=n.n(r),i=n(150),a=n.n(i),u=n(7),s=n.n(u),c=n(224),l=n.n(c),f=1073741823;var h=o.a.createContext||function(e,t){var n,o,i="__create-react-context-"+l()()+"__",u=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).emitter=function(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter((function(t){return t!==e}))},get:function(){return e},set:function(n,r){e=n,t.forEach((function(t){return t(e,r)}))}}}(t.props.value),t}a()(n,e);var r=n.prototype;return r.getChildContext=function(){var e;return(e={})[i]=this.emitter,e},r.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n,r=this.props.value,o=e.value;((i=r)===(a=o)?0!==i||1/i===1/a:i!==i&&a!==a)?n=0:(n="function"===typeof t?t(r,o):f,0!==(n|=0)&&this.emitter.set(e.value,n))}var i,a},r.render=function(){return this.props.children},n}(r.Component);u.childContextTypes=((n={})[i]=s.a.object.isRequired,n);var c=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).state={value:e.getValue()},e.onUpdate=function(t,n){0!==((0|e.observedBits)&n)&&e.setState({value:e.getValue()})},e}a()(n,t);var r=n.prototype;return r.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=void 0===t||null===t?f:t},r.componentDidMount=function(){this.context[i]&&this.context[i].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=void 0===e||null===e?f:e},r.componentWillUnmount=function(){this.context[i]&&this.context[i].off(this.onUpdate)},r.getValue=function(){return this.context[i]?this.context[i].get():e},r.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(r.Component);return c.contextTypes=((o={})[i]=s.a.object,o),{Provider:u,Consumer:c}},p=n(41),d=n(36),m=n(33),y=n(151),v=n.n(y),g=n(24),b=(n(111),n(77));n(225);n.d(t,"a",(function(){return k})),n.d(t,"b",(function(){return E})),n.d(t,"c",(function(){return D})),n.d(t,"e",(function(){return O})),n.d(t,"d",(function(){return w}));var w=function(e){var t=h();return t.displayName=e,t}("Router"),E=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._isMounted?n.setState({location:e}):n._pendingLocation=e}))),n}Object(p.a)(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&this.unlisten()},n.render=function(){return o.a.createElement(w.Provider,{children:this.props.children||null,value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}})},t}(o.a.Component);o.a.Component;o.a.Component;var _={},S=1e4,T=0;function O(e,t){void 0===t&&(t={}),"string"===typeof t&&(t={path:t});var n=t,r=n.path,o=n.exact,i=void 0!==o&&o,a=n.strict,u=void 0!==a&&a,s=n.sensitive,c=void 0!==s&&s;return[].concat(r).reduce((function(t,n){if(!n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=_[n]||(_[n]={});if(r[e])return r[e];var o=[],i={regexp:v()(e,o,t),keys:o};return T<S&&(r[e]=i,T++),i}(n,{end:i,strict:u,sensitive:c}
1),o=r.regexp,a=r.keys,s=o.exec(e);if(!s)return null;var l=s[0],f=s.slice(1),h=e===l;return i&&!h?null:{path:n,url:"/"===n&&""===l?"/":l,isExact:h,params:a.reduce((function(e,t,n){return e[t.name]=f[n],e}),{})}}),null)}var k=function(e){function t(){return e.apply(this,arguments)||this}return Object(p.a)(t,e),t.prototype.render=function(){var e=this;return o.a.createElement(w.Consumer,null,(function(t){t||Object(m.a)(!1);var n=e.props.location||t.location,r=e.props.computedMatch?e.props.computedMatch:e.props.path?O(n.pathname,e.props):t.match,i=Object(g.a)({},t,{location:n,match:r}),a=e.props,u=a.children,s=a.component,c=a.render;(Array.isArray(u)&&0===u.length&&(u=null),"function"===typeof u)&&(void 0===(u=u(i))&&(u=null));return o.a.createElement(w.Provider,{value:i},u&&!function(e){return 0===o.a.Children.count(e)}(u)?u:i.match?s?o.a.createElement(s,i):c?c(i):null:null)}))},t}(o.a.Component);function C(e){return"/"===e.charAt(0)?e:"/"+e}function x(e,t){if(!e)return t;var n=C(e);return 0!==t.pathname.indexOf(n)?t:Object(g.a)({},t,{pathname:t.pathname.substr(n.length)})}function A(e){return"string"===typeof e?e:Object(d.e)(e)}function I(e){return function(){Object(m.a)(!1)}}function N(){}o.a.Component;var D=function(e){function t(){return e.apply(this,arguments)||this}return Object(p.a)(t,e),t.prototype.render=function(){var e=this;return o.a.createElement(w.Consumer,null,(function(t){t||Object(m.a)(!1);var n,r,i=e.props.location||t.location;return o.a.Children.forEach(e.props.children,(function(e){if(null==r&&o.a.isValidElement(e)){n=e;var a=e.props.path||e.props.from;r=a?O(i.pathname,Object(g.a)({},e.props,{path:a})):t.match}})),r?o.a.cloneElement(n,{location:i,computedMatch:r}):null}))},t}(o.a.Component)},function(e,t,n){"use strict";var r=n(3),o=n.n(r),i=n(9),a=n.n(i),u=n(10),s=n.n(u),c=n(11),l=n.n(c),f=n(8),h=n.n(f),p=n(2),d=n.n(p),m=n(12),y=n.n(m),v=n(1),g=n.n(v),b=n(6),w=n.n(b),E=n(13),_=n.n(E),S=(n(37),n(4)),T=n.n(S),O=(n(7),n(0)),k=n.n(O),C=n(23),x=n(92),A=n(93),I=n(145),N=n(5);function D(e){var t=e.children,n=e.className,r=e.content,i=e.size,a=T()(i,"icons",n),u=Object(x.a)(D,e),s=Object(A.a)(D,e);return k.a.createElement(s,o()({},u,{className:a}),N.b.isNil(t)?r:t)}D.handledProps=["as","children","className","content","size"],D.propTypes={},D.defaultProps={as:"i"};var P=D,R=function(e){function t(){var e,n;a()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=l()(this,(e=h()(t)).call.apply(e,[this].concat(o))),g()(d()(n),"handleClick",(function(e){n.props.disabled?e.preventDefault():w()(n.props,"onClick",e,n.props)})),n}return y()(t,e),s()(t,[{key:"getIconAriaOptions",value:function(){var e={},t=this.props,n=t["aria-label"],r=t["aria-hidden"];return _()(n)?e["aria-hidden"]="true":e["aria-label"]=n,_()(r)||(e["aria-hidden"]=r),e}},{key:"render",value:function(){var e=this.props,n=e.bordered,r=e.circular,i=e.className,a=e.color,u=e.corner,s=e.disabled,c=e.fitted,l=e.flipped,f=e.inverted,h=e.link,p=e.loading,d=e.name,m=e.rotated,y=e.size,v=T()(a,d,y,Object(C.a)(n,"bordered"),Object(C.a)(r,"circular"),Object(C.a)(s,"disabled"),Object(C.a)(c,"fitted"),Object(C.a)(f,"inverted"),Object(C.a)(h,"link"),Object(C.a)(p,"loading"),Object(C.b)(u,"corner"),Object(C.e)(l,"flipped"),Object(C.e)(m,"rotated"),"icon",i),g=Object(x.a)(t,this.props),b=Object(A.a)(t,this.props),w=this.getIconAriaOptions();return k.a.createElement(b,o()({},g,w,{className:v,onClick:this.handleClick}))}}]),t}(O.PureComponent);g()(R,"defaultProps",{as:"i"}),g()(R,"Group",P),g()(R,"handledProps",["aria-hidden","aria-label","as","bordered","circular","className","color","corner","disabled","fitted","flipped","inverted","link","loading","name","rotated","size"]),R.propTypes={},R.create=Object(I.f)(R,(function(e){return{name:e}}));t.a=R},function(e,t,n){"use strict";var r=n(72);t.a=function(e,t){"function"!==typeof e?null!==e&&"object"===Object(r.a)(e)&&(e.current=t):e(t)}},function(e,t,n){var r=n(270),o=n(275);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},function(e,t,n){var r=n(183),o=n(328)(r);e.exports=o},function(e,t,n){var r=n(47),o=n(128),i=n(31),a="[object Object]",u=Function.prototype,s=Object.prototype,c=u.toString,l=s.hasOwnProperty,f=c.call(Object);e.exports=function(e){if(!i(e)||r(e)!=a)return!1;var t=o(e);if(null===t)return!0;var n=l.call(t,"constructor")&&t.constructor;
1return"function"==typeof n&&n instanceof n&&c.call(n)==f}},,function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}}(),e.exports=n(255)},,function(e,t,n){var r=n(38).Symbol;e.exports=r},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}},function(e,t,n){var r=n(81),o=n(166),i=n(168);e.exports=function(e,t){return i(o(e,t,r),e+"")}},function(e,t,n){var r=n(315),o=n(124),i=n(316),a=n(163),u=n(317),s=n(47),c=n(161),l=c(r),f=c(o),h=c(i),p=c(a),d=c(u),m=s;(r&&"[object DataView]"!=m(new r(new ArrayBuffer(1)))||o&&"[object Map]"!=m(new o)||i&&"[object Promise]"!=m(i.resolve())||a&&"[object Set]"!=m(new a)||u&&"[object WeakMap]"!=m(new u))&&(m=function(e){var t=s(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case l:return"[object DataView]";case f:return"[object Map]";case h:return"[object Promise]";case p:return"[object Set]";case d:return"[object WeakMap]"}return t}),e.exports=m},function(e,t,n){var r=n(105),o=1/0;e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-o?"-0":t}},function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return c})),n.d(t,"c",(function(){return l}));var r=n(34),o=n.n(r),i=n(45),a=n.n(i),u=["selected","defaultValue","defaultChecked","accept","autoCapitalize","autoComplete","autoCorrect","autoFocus","checked","disabled","form","id","lang","list","max","maxLength","min","minLength","multiple","name","pattern","placeholder","readOnly","required","step","title","type","value"],s=[].concat(u,["onKeyDown","onKeyPress","onKeyUp","onFocus","onBlur","onChange","onInput","onClick","onContextMenu","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart"]),c=["alt","height","src","srcSet","width"],l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.htmlProps,r=void 0===n?s:n,i=t.includeAria,u=void 0===i||i,c={},l={};return a()(e,(function(e,t){var n=u&&(/^aria-.*$/.test(t)||"role"===t);(o()(r,t)||n?c:l)[t]=e})),[c,l]}},function(e,t,n){var r=n(107),o=n(88);e.exports=function(e,t,n,i){var a=!n;n||(n={});for(var u=-1,s=t.length;++u<s;){var c=t[u],l=i?i(n[c],e[c],c,n,e):void 0;void 0===l&&(l=e[c]),a?o(n,c,l):r(n,c,l)}return n}},,function(e,t,n){"use strict";function r(e){return(r="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})(e)}function o(e){return(o="function"===typeof Symbol&&"symbol"===r(Symbol.iterator)?function(e){return r(e)}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)})(e)}n.d(t,"a",(function(){return o}))},function(e,t,n){var r=n(133),o=n(344),i=n(48),a=n(20);e.exports=function(e,t){return(a(e)?r:o)(e,i(t,3))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(369),i=n(195),a=n(196),u=((r={})["no-app"]="No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()",r["bad-app-name"]="Illegal App name: '{$appName}",r["duplicate-app"]="Firebase App named '{$appName}' already exists",r["app-deleted"]="Firebase App named '{$appName}' already deleted",r["invalid-app-argument"]="firebase.{$appName}() takes either no argument or a Firebase App instance.",r),s=new i.ErrorFactory("app","Firebase",u),c="[DEFAULT]",l=[],f=function(){function e(e,t,n){this.firebase_=n,this.isDeleted_=!1,this.services_={},this.name_=t.name,this.automaticDataCollectionEnabled_=t.automaticDataCollectionEnabled||!1,this.options_=i.deepCopy(e),this.INTERNAL={getUid:function(){return null},getToken:function(){return Promise.resolve(null)},addAuthTokenListener:function(e){l.push(e),setTimeout((function(){return e(null)}),0)},removeAuthTokenListener:function(e){l=l.filter((function(t){return t!==e}))}}}return Object.defineProperty(e.prototype,"automaticDataCollectionEnabled",{get:function(){return this.checkDestroyed_(),this.automaticDataCollectionEnabled_},set:function(e){this.checkDestroyed_(),this.automaticDataCollectionEnabled_=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this.checkDestroyed_(),this.name_},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return this.checkDestroyed_(),this.options_},enumerable:!0,configurable:!0}),e.prototype.delete=function(){var e=this;return new Promise((function(t){e.checkDestroyed_(),t()})).then((function(){e.firebase_.INTERNAL.removeApp(e.name_);for(var t=[],n=0,r=Object.keys(e.services_);n<r.length;n++)for(var o=r[n],i=0,a=Object.keys(e.services_[o]);i<a.length;i++){var u=a[i];t.push(e.services_[o][u])}return Promise.all(t.filter((function(e){return"INTERNAL"in e})).map((function(e){return e.INTERNAL.delete()})))})).then((function(){e.isDeleted_=!0,e.services_={}}))},e.prototype._getService=function(e,t){if(void 0===t&&(t=c),this.checkDestroyed_(),this.services_[e]||(this.services_[e]={}),!this.services_[e][t]){var n=t!==c?t:void 0,r=this.firebase_.INTERNAL.factories[e](this,this.extendApp.bind(this),n);this.services_[e][t]=r}return this.services_[e][t]},e.prototype._removeServiceInstance=function(e,t){void 0===t&&(t=c),this.services_[e]&&this.services_[e][t]&&delete this.services_[e][t]},e.prototype.extendApp=function(e){var t=this;i.deepExtend(this,e),e.INTERNAL&&e.INTERNAL.addAuthTokenListener&&(l.forEach((function(e){t.INTERNAL.addAuthTokenListener(e)})),l=[])},e.prototype.checkDestroyed_=function(){if(this.isDeleted_)throw s.create("app-deleted",{appName:this.name_})},e}();f.prototype.name&&f.prototype.options||f.prototype.delete||console.log("dc");var h="6.6.2",p=new a.Logger("@firebase/app");if(i.isBrowser()&&void 0!==self.firebase){p.warn("\n Warning: Firebase is already defined in the global scope. Please make sure\n Firebase library is only loaded once.\n ");var d=self.firebase.SDK_VERSION;d&&d.indexOf("LITE")>=0&&p.warn("\n Warning: You are trying to load Firebase while using Firebase Performance standalone script.\n You should load Firebase Performance with this instance of Firebase to avoid loading duplicate code.\n ")}var m=function e(){var t=function(e){var t={},n={},r={},o={__esModule:!0,initializeApp:function(n,r){void 0===r&&(r={});if("object"!==typeof r||null===r){r={name:r}}var a=r;void 0===a.name&&(a.name=c);var u=a.name;if("string"!==typeof u||!u)throw s.create("bad-app-name",{appName:String(u)});if(i.contains(t,u))throw s.create("duplicate-app",{appName:u});var f=new e(n,a,o);return t[u]=f,l(f,"create"),f},app:a,apps:null,SDK_VERSION:h,INTERNAL:{registerService:function(t,c,l,f,h){void 0===h&&(h=!1);if(n[t])return p.debug("There were multiple attempts to register service "+t+"."),o[t];
1n[t]=c,f&&(r[t]=f,u().forEach((function(e){f("create",e)})));function d(e){if(void 0===e&&(e=a()),"function"!==typeof e[t])throw s.create("invalid-app-argument",{appName:t});return e[t]()}void 0!==l&&i.deepExtend(d,l);return o[t]=d,e.prototype[t]=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=this._getService.bind(this,t);return r.apply(this,h?e:[])},d},removeApp:function(e){l(t[e],"delete"),delete t[e]},factories:n,useAsService:f}};function a(e){if(e=e||c,!i.contains(t,e))throw s.create("no-app",{appName:e});return t[e]}function u(){return Object.keys(t).map((function(e){return t[e]}))}function l(e,t){for(var o=0,i=Object.keys(n);o<i.length;o++){var a=f(e,i[o]);if(null===a)return;r[a]&&r[a](t,e)}}function f(e,t){return"serverAuth"===t?null:t}return o.default=o,Object.defineProperty(o,"apps",{get:u}),a.App=e,o}(f);return t.INTERNAL=o.__assign({},t.INTERNAL,{createFirebaseNamespace:e,extendNamespace:function(e){i.deepExtend(t,e)},createSubscribe:i.createSubscribe,ErrorFactory:i.ErrorFactory,deepExtend:i.deepExtend}),t}(),y=m.initializeApp;m.initializeApp=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i.isNode()&&p.warn('\n Warning: This is a browser-targeted Firebase bundle but it appears it is being\n run in a Node environment. If running in a Node environment, make sure you\n are using the bundle specified by the "main" field in package.json.\n \n If you are using Webpack, you can specify "main" as the first item in\n "resolve.mainFields":\n https://webpack.js.org/configuration/resolve/#resolvemainfields\n \n If using Rollup, use the rollup-plugin-node-resolve plugin and specify "main"\n as the first item in "mainFields", e.g. [\'main\', \'module\'].\n https://github.com/rollup/rollup-plugin-node-resolve\n '),y.apply(void 0,e)};var v=m;t.default=v,t.firebase=v},function(e,t,n){var r=n(159);e.exports=function(e){return e&&e.length?r(e):[]}},function(e,t,n){var r=n(136),o=n(67),i=n(83),a=n(20),u=n(40),s=n(84),c=n(85),l=n(103),f="[object Map]",h="[object Set]",p=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(u(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||s(e)||l(e)||i(e)))return!e.length;var t=o(e);if(t==f||t==h)return!e.size;if(c(e))return!r(e).length;for(var n in e)if(p.call(e,n))return!1;return!0}},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},function(e,t){e.exports=function(e,t){return e===t||e!==e&&t!==t}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t){e.exports=function(e){return e}},function(e,t,n){var r=n(40),o=n(31);e.exports=function(e){return o(e)&&r(e)}},function(e,t,n){var r=n(311),o=n(31),i=Object.prototype,a=i.hasOwnProperty,u=i.propertyIsEnumerable,s=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!u.call(e,"callee")};e.exports=s},function(e,t,n){(function(e){var r=n(38),o=n(312),i=t&&!t.nodeType&&t,a=i&&"object"==typeof e&&e&&!e.nodeType&&e,u=a&&a.exports===i?r.Buffer:void 0,s=(u?u.isBuffer:void 0)||o;e.exports=s}).call(this,n(134)(e))},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(20),o=n(137),i=n(320),a=n(53);e.exports=function(e,t){return r(e)?e:o(e,t)?[e]:i(a(e))}},function(e,t,n){var r=n(182);e.exports=function(e){var t=r(e),n=t%1;return t===t?n?t-n:t:0}},function(e,t,n){var r=n(169);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},function(e,t,n){var r=n(47),o=n(20),i=n(31),a="[object String]";e.exports=function(e){return"string"==typeof e||!o(e)&&i(e)&&r(e)==a}},function(e,t,n){var r=n(329),o=n(26);e.exports=function(e){return null==e?[]:r(e,o(e))}},function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(1),a=h(i),u=h(n(2)),s=h(n(10)),c=h(n(12)),l=h(n(13)),f=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(14));function h(e){return e&&e.__esModule?e:{default:e}}var p=["\ud83d\udd19","\u23f0"],d=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={textLines:[],isDone:!1},n.onTypingDone=function(){n.mounted&&(n.setState({isDone:!0}),n.props.onTypingDone())},n.delayGenerator=function(e,t,r,o){var i=n.props.avgTypingDelay,a=n.props.stdTypingDelay;return n.props.delayGenerator(i,a,{line:e,lineIdx:t,character:r,charIdx:o,defDelayGenerator:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;return f.gaussianRnd(e,t)}})},n.typeLine=function(e,t){if(!n.mounted)return Promise.resolve();var r=e,o=n.props.onLineTyped;return f.isBackspaceElement(e)?(e.props.delay>0&&(n.introducedDelay=e.props.delay),r=String("\ud83d\udd19").repeat(e.props.count)):f.isDelayElement(e)&&(n.introducedDelay=e.props.ms,r="\u23f0"),new Promise((function(e,i){n.setState({textLines:n.state.textLines.concat([""])},(function(){f.eachPromise(r,n.typeCharacter,r,t).then((function(){return o(r,t)})).then(e).catch(i)}))}))},n.typeCharacter=function(e,t,r,o){if(!n.mounted)return Promise.resolve();var i=n.props.onCharacterTyped;return new Promise((function(a){var u=n.state.textLines.slice();f.sleep(n.introducedDelay).then((function(){n.introducedDelay=null;var s="\ud83d\udd19"===e;if("\u23f0"===e)a();else{if(s&&o>0){for(var c=o-1,l=u[c],f=c;f>=0&&(!(l.length>0)||p.includes(l[0]));f--)l=u[c=f];u[c]=l.substr(0,l.length-1)}else u[o]+=e;n.setState({textLines:u},(function(){var u=n.delayGenerator(r,o,e,t);i(e,t),setTimeout(a,u)}))}}))}))},n.mounted=!1,n.linesToType=[],n.introducedDelay=null,e.children&&(n.linesToType=f.extractTextFromElement(e.children)),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)}
1(t,e),o(t,[{key:"componentDidMount",value:function(){this.mounted=!0;var e=this.props,t=e.children,n=e.startDelay;t?n>0&&"undefined"!==typeof window?setTimeout(this.typeAllLines.bind(this),n):this.typeAllLines():this.onTypingDone()}},{key:"shouldComponentUpdate",value:function(e,t){if(t.textLines.length!==this.state.textLines.length)return!0;for(var n=0;n<t.textLines.length;n++){if(this.state.textLines[n]!==t.textLines[n])return!0}return this.state.isDone!==t.isDone}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"typeAllLines",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.linesToType;return f.eachPromise(t,this.typeLine).then((function(){return e.onTypingDone()}))}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.cursor,o=this.state.isDone,i=f.cloneElementWithSpecifiedText({element:this.props.children,textLines:this.state.textLines});return a.default.createElement("div",{className:"Typist "+t},i,a.default.createElement(s.default,r({isDone:o},n)))}}]),t}(i.Component);d.propTypes={children:u.default.node,className:u.default.string,avgTypingDelay:u.default.number,stdTypingDelay:u.default.number,startDelay:u.default.number,cursor:u.default.object,onCharacterTyped:u.default.func,onLineTyped:u.default.func,onTypingDone:u.default.func,delayGenerator:u.default.func},d.defaultProps={className:"",avgTypingDelay:70,stdTypingDelay:25,startDelay:0,cursor:{},onCharacterTyped:function(){},onLineTyped:function(){},onTypingDone:function(){},delayGenerator:f.gaussianRnd},t.default=d,d.Backspace=c.default,d.Delay=l.default},function(e,t){e.exports=n(0)},function(e,t,n){e.exports=n(9)()},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),u=n(8);e.exports=function(e,t){var n="function"===typeof Symbol&&Symbol.iterator,s="@@iterator";var c="<<anonymous>>",l={array:d("array"),bool:d("boolean"),func:d("function"),number:d("number"),object:d("object"),string:d("string"),symbol:d("symbol"),any:p(r.thatReturnsNull),arrayOf:function(e){return p((function(t,n,r,o,i){if("function"!==typeof e)return new h("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var u=t[n];if(!Array.isArray(u))return new h("Invalid "+o+" `"+i+"` of type `"+y(u)+"` supplied to `"+r+"`, expected an array.");for(var s=0;s<u.length;s++){var c=e(u,s,r,o,i+"["+s+"]",a);if(c instanceof Error)return c}return null}))},element:function(){return p((function(t,n,r,o,i){var a=t[n];return e(a)?null:new h("Invalid "+o+" `"+i+"` of type `"+y(a)+"` supplied to `"+r+"`, expected a single ReactElement.")}))}(),instanceOf:function(e){return p((function(t,n,r,o,i){if(!(t[n]instanceof e)){var a=e.name||c;return new h("Invalid "+o+" `"+i+"` of type `"+function(e){if(!e.constructor||!e.constructor.name)return c;return e.constructor.name}(t[n])+"` supplied to `"+r+"`, expected instance of `"+a+"`.")}return null}))},node:function(){return p((function(e,t,n,r,o){return m(e[t])?null:new h("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")}))}(),objectOf:function(e){return p((function(t,n,r,o,i){if("function"!==typeof e)return new h("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var u=t[n],s=y(u);if("object"!==s)return new h("Invalid "+o+" `"+i+"` of type `"+s+"` supplied to `"+r+"`, expected an object.");for(var c in u)if(u.hasOwnProperty(c)){var l=e(u,c,r,o,i+"."+c,a);if(l instanceof Error)return l}return null}))},oneOf:function(e){if(!Array.isArray(e))return r.thatReturnsNull;return p((function(t,n,r,o,i){for(var a=t[n],u=0;u<e.length;u++)if(f(a,e[u]))return null;return new h("Invalid "+o+" `"+i+"` of value `"+a+"` supplied to `"+r+"`, expected one of "+JSON.stringify(e)+".")}))},oneOfType:function(e){if(!Array.isArray(e))return r.thatReturnsNull;for(var t=0;t<e.length;t++){var n=e[t];if("function"!==typeof n)return i(!1,"Invalid argument supplid to oneOfType. Expected an array of check functions, but received %s at index %s.",g(n),t),r.thatReturnsNull}return p((function(t,n,r,o,i){for(var u=0;u<e.length;u++){if(null==(0,e[u])(t,n,r,o,i,a))return null}return new h("Invalid "+o+" `"+i+"` supplied to `"+r+"`.")}))},shape:function(e){return p((function(t,n,r,o,i){var u=t[n],s=y(u);if("object"!==s)return new h("Invalid "+o+" `"+i+"` of type `"+s+"` supplied to `"+r+"`, expected `object`.");for(var c in e){var l=e[c];if(l){var f=l(u,c,r,o,i+"."+c,a);if(f)return f}}return null}))}};function f(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function h(e){this.message=e,this.stack=""}function p(e){function n(n,r,i,u,s,l,f){(u=u||c,l=l||i,f!==a)&&(t&&o(!1,"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"));return null==r[i]?n?null===r[i]?new h("The "+s+" `"+l+"` is marked as required in `"+u+"`, but its value is `null`."):new h("The "+s+" `"+l+"` is marked as required in `"+u+"`, but its value is `undefined`."):null:e(r,i,u,s,l)}var r=n.bind(null,!1);return r.isRequired=n.bind(null,!0),r}function d(e){return p((function(t,n,r,o,i,a){var u=t[n];return y(u)!==e?new h("Invalid "+o+" `"+i+"` of type `"+v(u)+"` supplied to `"+r+"`, expected `"+e+"`."):null}))}function m(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(m);if(null===t||e(t))return!0;var r=function(e){var t=e&&(n&&e[n]||e[s]);if("function"===typeof t)return t}(t);if(!r)return!1;var o,i=r.call(t);if(r!==t.entries){for(;!(o=i.next()).done;)if(!m(o.value))return!1}else for(;!(o=i.next()).done;){var a=o.value;if(a&&!m(a[1]))return!1}return!0;default:return!1}}function y(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||("Symbol"===t["@@toStringTag"]||"function"===typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function v(e){if("undefined"===typeof e||null===e)return""+e;var t=y(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function g(e){var t=v(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return h.prototype=Error.prototype,l.checkPropTypes=u,l.PropTypes=l,l}},function(e,t){"use strict";function n(e){return function(){return e}}var r=function(){};r.thatReturns=n,r.thatReturnsFalse=n(!1),r.thatReturnsTrue=n(!0),r.thatReturnsNull=n(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,t){"use strict";var n=function(e){};e.exports=function(e,t,r,o,i,a,u,s){if(n(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[r,o,i,a,u,s],f=0;(c=new Error(t.replace(/%s/g,(function(){return l[f++]})))).name="Invariant Violation"}throw c.framesToPop=1,c}}},function(e,t,n){"use strict";var r=n(4);e.exports=r},function(e,t){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";e.exports=function(e,t,n,r,o){}},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(7);e.exports=function(){function e(e,t,n,r,a,u){u!==i&&o(!1,"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")}function t(){return e}e.isRequired=e;
1var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(1),i=u(o),a=u(n(2));function u(e){return e&&e.__esModule?e:{default:e}}n(11);var s=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n._isReRenderingCursor=!1,n.state={shouldRender:n.props.show},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),r(t,[{key:"componentWillReceiveProps",value:function(e){var t=this;!this.props.isDone&&e.isDone&&this.props.hideWhenDone&&setTimeout((function(){return t.setState({shouldRender:!1})}),this.props.hideWhenDoneDelay)}},{key:"componentDidUpdate",value:function(){var e=this.props,t=e.show,n=e.isDone;t&&(n||this._isReRenderingCursor||this._reRenderCursor())}},{key:"_reRenderCursor",value:function(){var e=this;this._isReRenderingCursor=!0,this.setState({shouldRender:!1},(function(){e.setState({shouldRender:!0},(function(){e._isReRenderingCursor=!1}))}))}},{key:"render",value:function(){if(this.state.shouldRender){var e=this.props.blink?" Cursor--blinking":"";return i.default.createElement("span",{className:"Cursor"+e},this.props.element)}return null}}]),t}(o.Component);s.propTypes={blink:a.default.bool,show:a.default.bool,element:a.default.node,hideWhenDone:a.default.bool,hideWhenDoneDelay:a.default.number,isDone:a.default.bool},s.defaultProps={blink:!0,show:!0,element:"|",hideWhenDone:!1,hideWhenDoneDelay:1e3,isDone:!1},t.default=s},function(e,t){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(n(1)),o=i(n(2));function i(e){return e&&e.__esModule?e:{default:e}}var a=function(){return r.default.createElement("noscript",null)};a.componentName="Backspace",a.propTypes={count:o.default.number,delay:o.default.number},a.defaultProps={count:1,delay:0},t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(n(1)),o=i(n(2));function i(e){return e&&e.__esModule?e:{default:e}}var a=function(){return r.default.createElement("noscript",null)};a.componentName="Delay",a.propTypes={ms:o.default.number.isRequired},t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sleep=void 0;var r=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(s){o=!0,i=s}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.gaussianRnd=function(e,t){for(var n=0,r=0;r<12;r++)n+=Math.random();return n-=6,Math.round(n*t)+e},t.eachPromise=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return Array.from(e).reduce((function(e,n,o){return e.then((function(){return t.apply(void 0,[n,o].concat(r))}))}),Promise.resolve())},t.exclude=u,t.isBackspaceElement=s,t.isDelayElement=c,t.extractTextFromElement=function(e){var t=e?[e]:[],n=[];for(;t.length>0;){var r=t.pop();if(a.default.isValidElement(r))s(r)||c(r)?n.unshift(r):a.default.Children.forEac
1h(r.props.children,(function(e){t.push(e)}));else if(Array.isArray(r)){var o=!0,i=!1,u=void 0;try{for(var l,f=r[Symbol.iterator]();!(o=(l=f.next()).done);o=!0){var h=l.value;t.push(h)}}catch(p){i=!0,u=p}finally{try{!o&&f.return&&f.return()}finally{if(i)throw u}}}else n.unshift(r)}return n},t.cloneElement=l,t.cloneElementWithSpecifiedText=function(e){var t=e.element,n=e.textLines;if(!t)return;return function e(t,n,o){if(o>=n.length)return[null,o];var i=o;var u=function(t){var o=e(t,n,i),a=r(o,2),u=a[0],s=a[1];return i=s,u};var f=a.default.isValidElement(t)&&!(s(t)||c(t));if(f){var h=a.default.Children.map(t.props.children,u)||[];return[l(t,h),i]}if(Array.isArray(t)){return[t.map(u),i]}return[n[i],i+1]}(t,n,0)[0]};var o,i=n(1),a=(o=i)&&o.__esModule?o:{default:o};t.sleep=function(e){return new Promise((function(t){return null!=e?setTimeout(t,e):t()}))};function u(e,t){var n={};for(var r in e)-1===t.indexOf(r)&&(n[r]=e[r]);return n}function s(e){return e&&e.type&&"Backspace"===e.type.componentName}function c(e){return e&&e.type&&"Delay"===e.type.componentName}function l(e,t){var n=e.type,r=u(e.props,["children"]),o=(new Date).getUTCMilliseconds()+Math.random()+Math.random();return r.key="Typist-element-"+n+"-"+o,a.default.createElement.apply(a.default,[n,r].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(t)))}}])},function(e,t,n){"use strict";t.a=function(e,t){var n=e.handledProps,r=void 0===n?[]:n;return Object.keys(t).reduce((function(e,n){return"childKey"===n?e:(-1===r.indexOf(n)&&(e[n]=t[n]),e)}),{})}},function(e,t,n){"use strict";t.a=function(e,t,n){var r=e.defaultProps,o=void 0===r?{}:r;if(t.as&&t.as!==o.as)return t.as;if(n){var i=n();if(i)return i}return t.href?"a":o.as||"div"}},function(e,t,n){var r=n(123),o=n(290),i=n(291);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=o,a.prototype.has=i,e.exports=a},function(e,t,n){var r=n(58)(Object,"create");e.exports=r},function(e,t,n){var r=n(280),o=n(281),i=n(282),a=n(283),u=n(284);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=u,e.exports=s},function(e,t,n){var r=n(79);e.exports=function(e,t){for(var n=e.length;n--;
1)if(r(e[n][0],t))return n;return-1}},function(e,t,n){var r=n(286);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},function(e,t,n){var r=n(162),o=n(292),i=n(293);e.exports=function(e,t,n){return t===t?i(e,t,n):r(e,o,n)}},function(e,t){e.exports=function(e,t){return e.has(t)}},function(e,t,n){var r=n(96),o=n(301),i=n(302),a=n(303),u=n(304),s=n(305);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=u,c.prototype.set=s,e.exports=c},function(e,t){var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var o=typeof e;return!!(t=null==t?n:t)&&("number"==o||"symbol"!=o&&r.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t,n){var r=n(313),o=n(80),i=n(135),a=i&&i.isTypedArray,u=a?o(a):r;e.exports=u},function(e,t,n){var r=n(86),o=n(68);e.exports=function(e,t){for(var n=0,i=(t=r(t,e)).length;null!=e&&n<i;)e=e[o(t[n++])];return n&&n==i?e:void 0}},function(e,t,n){var r=n(47),o=n(31),i="[object Symbol]";e.exports=function(e){return"symbol"==typeof e||o(e)&&r(e)==i}},function(e,t,n){var r=n(39),o=n(105),i=NaN,a=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return i;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(a,"");var n=s.test(e);return n||c.test(e)?l(e.slice(2),n?2:8):u.test(e)?i:+e}},function(e,t,n){var r=n(88),o=n(79),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];i.call(e,t)&&o(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==c(e)&&"function"!==typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(7))&&r.__esModule?r:{default:r},a=n(109),u=n(208);function s(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function c(e){return(c="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})(e)}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var m=a.Util.camelCase;var y=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t){return!t||"object"!==c(t)&&"function"!==typeof t?p(e):t}(this,h(t).call(this,e,n))).getContext=r.getContext.bind(p(r)),r}var n,r,i;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&&d(e,t)}(t,e),n=t,i=[{key:"normalizeOptions",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((function(e,t){for(var n in t){var r=t[n];null!==r&&void 0!==r&&(e[n]=r)}return e}),{})}}],(r=[{key:"render",value:function(){return null}},{key:"getContext",value:function(){return this.context||{}}},{key:"getChildTransformations",value:function(e){var n=this;if(void 0===e||null===e)return null;var r=o.default.Children.map(e,(function(e){if(o.default.isValidElement(e)){var r={};e.type&&e.type.exposesProps&&(r=t.normalizeOptions(e.props,e.context));var i=n.getChildTransformations(e.props.children);return void 0!==i&&null!==i&&(r.transformation=i),r}}));return null!=r?r.filter((function(e){return!a.Util.isEmpty(e)})):null}},{key:"getTransformation",value:function(e){var t=e.children,n=l(e,["children"]),r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e?t.reduce((function(t,n){return n in e&&(t[n]=e[n]),t}),{}):e}(a.Util.withCamelCaseKeys(n),a.Transformation.methods)||{},o=this.getChildTransformations(t);return a.Util.isEmpty(o)||(r.transformation=o),r}},{key:"getUrl",value:function(e){var t=this.getTransformation(e),n=a.Util.extractUrlParams(a.Util.withSnakeCaseKeys(e));return a.Cloudinary.new(n).url(e.publicId,t)}}])&&f(n.prototype,r),i&&f(n,i),t}
1(o.PureComponent);y.contextType=u.CloudinaryContextType,y.propTypes=function(e){e=e||[];for(var t={},n=0;n<e.length;n++){var r=e[n];t[m(r)]=i.default.any}return t}(a.Transformation.PARAM_NAMES.map(m)),y.propTypes.publicId=i.default.string,y.propTypes.responsive=i.default.bool;var v=y;t.default=v},function(e,t,n){(function(t,r){var o;o=function(e,n,o,i,a,u,s,c,l,f,h,p,d,m){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="./src/namespace/cloudinary-core.js")}({
1"./src/namespace/cloudinary-core.js":function(e,n,o){"use strict";o.r(n);var i={};o.r(i),o.d(i,"assign",(function(){return l.a})),o.d(i,"cloneDeep",(function(){return h.a})),o.d(i,"compact",(function(){return d.a})),o.d(i,"difference",(function(){return y.a})),o.d(i,"functions",(function(){return g.a})),o.d(i,"identity",(function(){return w.a})),o.d(i,"includes",(function(){return _.a})),o.d(i,"isArray",(function(){return T.a})),o.d(i,"isPlainObject",(function(){return k.a})),o.d(i,"isString",(function(){return x.a})),o.d(i,"merge",(function(){return I.a})),o.d(i,"contains",(function(){return _.a})),o.d(i,"isElement",(function(){return D.a})),o.d(i,"isFunction",(function(){return R.a})),o.d(i,"trim",(function(){return M.a})),o.d(i,"getData",(function(){return ce})),o.d(i,"setData",(function(){return le})),o.d(i,"getAttribute",(function(){return fe})),o.d(i,"setAttribute",(function(){return he})),o.d(i,"removeAttribute",(function(){return pe})),o.d(i,"setAttributes",(function(){return de})),o.d(i,"hasClass",(function(){return me})),o.d(i,"addClass",(function(){return ye})),o.d(i,"getStyles",(function(){return ve})),o.d(i,"cssExpand",(function(){return ge})),o.d(i,"domStyle",(function(){return be})),o.d(i,"curCSS",(function(){return we})),o.d(i,"cssValue",(function(){return Ee})),o.d(i,"augmentWidthOrHeight",(function(){return _e})),o.d(i,"getWidthOrHeight",(function(){return Te})),o.d(i,"width",(function(){return Oe})),o.d(i,"omit",(function(){return U})),o.d(i,"allStrings",(function(){return B})),o.d(i,"without",(function(){return q})),o.d(i,"isNumberLike",(function(){return V})),o.d(i,"smartEscape",(function(){return z})),o.d(i,"defaults",(function(){return W})),o.d(i,"objectProto",(function(){return Q})),o.d(i,"objToString",(function(){return G})),o.d(i,"isObject",(function(){return K})),o.d(i,"funcTag",(function(){return H})),o.d(i,"reWords",(function(){return $})),o.d(i,"camelCase",(function(){return X})),o.d(i,"snakeCase",(function(){return J})),o.d(i,"convertKeys",(function(){return Z})),o.d(i,"withCamelCaseKeys",(function(){return ee})),o.d(i,"withSnakeCaseKeys",(function(){return te})),o.d(i,"base64Encode",(function(){return ne})),o.d(i,"base64EncodeURL",(function(){return re})),o.d(i,"extractUrlParams",(function(){return ie})),o.d(i,"patchFetchFormat",(function(){return ae})),o.d(i,"optionConsume",(function(){return ue})),o.d(i,"isEmpty",(function(){return se}));var a={};o.r(a),o.d(a,"VERSION",(function(){return Ft})),o.d(a,"CF_SHARED_CDN",(function(){return Bt})),o.d(a,"OLD_AKAMAI_SHARED_CDN",(function(){return qt})),o.d(a,"AKAMAI_SHARED_CDN",(function(){return Vt})),o.d(a,"SHARED_CDN",(function(){return zt})),o.d(a,"DEFAULT_POSTER_OPTIONS",(function(){return Wt})),o.d(a,"DEFAULT_VIDEO_SOURCE_TYPES",(function(){return Qt})),o.d(a,"SEO_TYPES",(function(){return Gt})),o.d(a,"DEFAULT_IMAGE_PARAMS",(function(){return Kt})),o.d(a,"DEFAULT_VIDEO_PARAMS",(function(){return Ht})),o.d(a,"DEFAULT_VIDEO_SOURCES",(function(){return Yt}));var u=function(e){var t,n,r,o,i,a,u,s;if(null===e||"undefined"===typeof e)return"";for(s="",i=void 0,r=void 0,i=r=0,u=(a=e+"").length,o=0;o<u;)n=null,(t=a.charCodeAt(o))<128?r++:n=t>127&&t<2048?String.fromCharCode(t>>6|192,63&t|128):String.fromCharCode(t>>12|224,t>>6&63|128,63&t|128),null!==n&&(r>i&&(s+=a.slice(i,r)),s+=n,i=r=o+1),o++;return r>i&&(s+=a.slice(i,u)),s},s=function(e){var t,n,r,o;for(t=0,o=0,t^=-1,n=0,r=(e=u(e)).length;n<r;)o=255&(t^e.charCodeAt(n)),t=t>>>8^"0x"+"00000000 77073096 EE0E612C 990951BA 076DC419 706AF48F E963A535 9E6495A3 0EDB8832 79DCB8A4 E0D5E91E 97D2D988 09B64C2B 7EB17CBD E7B82D07 90BF1D91 1DB71064 6AB020F2 F3B97148 84BE41DE 1ADAD47D 6DDDE4EB F4D4B551 83D385C7 136C9856 646BA8C0 FD62F97A 8A65C9EC 14015C4F 63066CD9 FA0F3D63 8D080DF5 3B6E20C8 4C69105E D56041E4 A2677172 3C03E4D1 4B04D447 D20D85FD A50AB56B 35B5A8FA 42B2986C DBBBC9D6 ACBCF940 32D86CE3 45DF5C75 DCD60DCF ABD13D59 26D930AC 51DE003A C8D75180 BFD06116 21B4F4B5 56B3C423 CFBA9599 B8BDA50F 2802B89E 5F058808 C60CD9B2 B10BE924 2F6F7C87 58684C11 C1611DAB B6662D3D 76DC4190 01DB7106 98D220BC EFD5102A 71B18589 06B6B51F 9FBFE4A5 E8B8D433 7807C9A2 0F00F934 9609A88E E10E9818 7F6A0DBB 086D3D2D 91646C97 E6635C01 6
1B6B51F4 1C6C6162 856530D8 F262004E 6C0695ED 1B01A57B 8208F4C1 F50FC457 65B0D9C6 12B7E950 8BBEB8EA FCB9887C 62DD1DDF 15DA2D49 8CD37CF3 FBD44C65 4DB26158 3AB551CE A3BC0074 D4BB30E2 4ADFA541 3DD895D7 A4D1C46D D3D6F4FB 4369E96A 346ED9FC AD678846 DA60B8D0 44042D73 33031DE5 AA0A4C5F DD0D7CC9 5005713C 270241AA BE0B1010 C90C2086 5768B525 206F85B3 B966D409 CE61E49F 5EDEF90E 29D9C998 B0D09822 C7D7A8B4 59B33D17 2EB40D81 B7BD5C3B C0BA6CAD EDB88320 9ABFB3B6 03B6E20C 74B1D29A EAD54739 9DD277AF 04DB2615 73DC1683 E3630B12 94643B84 0D6D6A3E 7A6A5AA8 E40ECF0B 9309FF9D 0A00AE27 7D079EB1 F00F9344 8708A3D2 1E01F268 6906C2FE F762575D 806567CB 196C3671 6E6B06E7 FED41B76 89D32BE0 10DA7A5A 67DD4ACC F9B9DF6F 8EBEEFF9 17B7BE43 60B08ED5 D6D6A3E8 A1D1937E 38D8C2C4 4FDFF252 D1BB67F1 A6BC5767 3FB506DD 48B2364B D80D2BDA AF0A1B4C 36034AF6 41047A60 DF60EFC3 A867DF55 316E8EEF 4669BE79 CB61B38C BC66831A 256FD2A0 5268E236 CC0C7795 BB0B4703 220216B9 5505262F C5BA3BBE B2BD0B28 2BB45A92 5CB36A04 C2D7FFA7 B5D0CF31 2CD99E8B 5BDEAE1D 9B64C2B0 EC63F226 756AA39C 026D930A 9C0906A9 EB0E363F 72076785 05005713 95BF4A82 E2B87A14 7BB12BAE 0CB61B38 92D28E9B E5D5BE0D 7CDCEFB7 0BDBDF21 86D3D2D4 F1D4E242 68DDB3F8 1FDA836E 81BE16CD F6B9265B 6FB077E1 18B74777 88085AE6 FF0F6A70 66063BCA 11010B5C 8F659EFF F862AE69 616BFFD3 166CCF45 A00AE278 D70DD2EE 4E048354 3903B3C2 A7672661 D06016F7 4969474D 3E6E77DB AED16A4A D9D65ADC 40DF0B66 37D83BF0 A9BCAE53 DEBB9EC5 47B2CF7F 30B5FFE9 BDBDF21C CABAC28A 53B39330 24B4A3A6 BAD03605 CDD70693 54DE5729 23D967BF B3667A2E C4614AB8 5D681B02 2A6F2B94 B40BBE37 C30C8EA1 5A05DF1B 2D02EF8D".substr(9*o,8),n++;return(t^=-1)<0&&(t+=4294967296),t},c=o("lodash/assign"),l=o.n(c),f=o("lodash/cloneDeep"),h=o.n(f),p=o("lodash/compact"),d=o.n(p),m=o("lodash/difference"),y=o.n(m),v=o("lodash/functions"),g=o.n(v),b=o("lodash/identity"),w=o.n(b),E=o("lodash/includes"),_=o.n(E),S=o("lodash/isArray"),T=o.n(S),O=o("lodash/isPlainObject"),k=o.n(O),C=o("lodash/isString"),x=o.n(C),A=o("lodash/merge"),I=o.n(A),N=o("lodash/isElement"),D=o.n(N),P=o("lodash/isFunction"),R=o.n(P),j=o("lodash/trim"),M=o.n(j);function L(e){return(L="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})(e)}function U(e,t){e=e||{};var n=Object.keys(e).filter((function(e){return!_()(t,e)})),r={};return n.forEach((function(t){return r[t]=e[t]})),r}var F,B=function(e){return e.length&&e.every(x.a)},q=function(e,t){return e.filter((function(e){return e!==t}))},V=function(e){return null!=e&&!isNaN(parseFloat(e))},z=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:/([^a-zA-Z0-9_.\-\/:]+)/g;return e.replace(t,(function(e){return e.split("").map((function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})).join("")}))},W=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.reduce((function(e,t){var n,r;for(n in t)r=t[n],void 0===e[n]&&(e[n]=r);return e}),e)},Q=Object.prototype,G=Q.toString,K=function(e){var t;return t=L(e),!!e&&("object"===t||"function"===t)},H="[object Function]",Y=function(e){return K(e)&&G.call(e)===H},$=RegExp("[A-Z]+(?=[A-Z][a-z]+)|[A-Z]?[a-z]+|[A-Z]+|[0-9]+","g"),X=function(e){var t=e.match($);return(t=t.map((function(e){return e.charAt(0).toLocaleUpperCase()+e.slice(1).toLocaleLowerCase()})))[0]=t[0].toLocaleLowerCase(),t.join("")},J=function(e){var t=e.match($);return(t=t.map((function(e){return e.toLocaleLowerCase()}))).join("_")},Z=function(e,t){var n,r;for(var o in n={},e)r=e[o],t&&(o=t(o)),se(o)||(n[o]=r);return n},ee=function(e){return Z(e,X)},te=function(e){return Z(e,J)},ne="undefined"!==typeof btoa&&Y(btoa)?btoa:"undefined"!==typeof t&&Y(t)?function(e){return e instanceof t||(e=new t.from(String(e),"binary")),e.toString("base64")}:function(e){throw new Error("No base64 encoding function found")},re=function(e){try{e=decodeURI(e)}finally{e=encodeURI(e)}return ne(e)},oe=["api_secret","auth_token","cdn_subdomain","cloud_name","cname","format","private_cdn","resource_type","secure","secure_cdn_subdomain","secure_distribution","shorten","sign_url","ssl_detected","type","url_suffix","use_root_path","version"];function ie(e){return oe.reduce((function(t,n){return null!=e[n]&&(t[n]=e[n]),t}),{})}function ae(e){null==e&&(e={}),"fetch"===e.type&&null==e.fetch_format&&(e.fetch_format=ue(e,"format"))}function ue(e,t,n){var r=e[t];return delete e[t],null!=r?r:n}function se(e){if(null==e)return!0;
1if("number"==typeof e.length)return 0===e.length;if("number"==typeof e.size)return 0===e.size;if("object"==L(e)){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}return!0}var ce=function(e,t){switch(!1){case!(null==e):return;case!R()(e.getAttribute):return e.getAttribute("data-".concat(t));case!R()(e.getAttr):return e.getAttr("data-".concat(t));case!R()(e.data):return e.data(t);case!(R()("undefined"!==typeof jQuery&&jQuery.fn&&jQuery.fn.data)&&D()(e)):return jQuery(e).data(t)}},le=function(e,t,n){switch(!1){case!(null==e):return;case!R()(e.setAttribute):return e.setAttribute("data-".concat(t),n);case!R()(e.setAttr):return e.setAttr("data-".concat(t),n);case!R()(e.data):return e.data(t,n);case!(R()("undefined"!==typeof jQuery&&jQuery.fn&&jQuery.fn.data)&&D()(e)):return jQuery(e).data(t,n)}},fe=function(e,t){switch(!1){case!(null==e):return;case!R()(e.getAttribute):return e.getAttribute(t);case!R()(e.attr):return e.attr(t);case!R()(e.getAttr):return e.getAttr(t)}},he=function(e,t,n){switch(!1){case!(null==e):return;case!R()(e.setAttribute):return e.setAttribute(t,n);case!R()(e.attr):return e.attr(t,n);case!R()(e.setAttr):return e.setAttr(t,n)}},pe=function(e,t){switch(!1){case!(null==e):return;case!R()(e.removeAttribute):return e.removeAttribute(t);default:return he(e,void 0)}},de=function(e,t){var n,r,o;for(n in r=[],t)null!=(o=t[n])?r.push(he(e,n,o)):r.push(pe(e,n));return r},me=function(e,t){if(D()(e))return e.className.match(new RegExp("\\b".concat(t,"\\b")))},ye=function(e,t){if(!e.className.match(new RegExp("\\b".concat(t,"\\b"))))return e.className=M()("".concat(e.className," ").concat(t))},ve=function(e){return e.ownerDocument.defaultView.opener?e.ownerDocument.defaultView.getComputedStyle(e,null):window.getComputedStyle(e,null)},ge=["Top","Right","Bottom","Left"];F=function(e,t){var n,r;return n=9===e.nodeType?e.documentElement:e,e===(r=t&&t.parentNode)||!(!r||1!==r.nodeType||!n.contains(r))};var be=function(e,t){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style)return e.style[t]},we=function(e,t,n){var r,o,i,a,u,s;return a=/^margin/,s=void 0,o=void 0,r=void 0,i=void 0,u=e.style,(n=n||ve(e))&&(i=n.getPropertyValue(t)||n[t]),n&&(""!==i||F(e.ownerDocument,e)||(i=be(e,t)),Se.test(i)&&a.test(t)&&(s=u.width,o=u.minWidth,r=u.maxWidth,u.minWidth=u.maxWidth=u.width=i,i=n.width,u.width=s,u.minWidth=o,u.maxWidth=r)),void 0!==i?i+"":i},Ee=function(e,t,n,r){var o;return o=we(e,t,r),n?parseFloat(o):o},_e=function(e,t,n,r,o){var i,a,u,s,c;if(n===(r?"border":"content"))return 0;for(c=0,i=0,a=(s="width"===t?["Right","Left"]:["Top","Bottom"]).length;i<a;i++)u=s[i],"margin"===n&&(c+=Ee(e,n+u,!0,o)),r?("content"===n&&(c-=Ee(e,"padding".concat(u),!0,o)),"margin"!==n&&(c-=Ee(e,"border".concat(u,"Width"),!0,o))):(c+=Ee(e,"padding".concat(u),!0,o),"padding"!==n&&(c+=Ee(e,"border".concat(u,"Width"),!0,o)));return c},Se=new RegExp("^("+/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source+")(?!px)[a-z%]+$","i"),Te=function(e,t,n){var r,o,i,a;if(a=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=ve(e),r="border-box"===Ee(e,"boxSizing",!1,o),i<=0||null==i){if(((i=we(e,t,o))<0||null==i)&&(i=e.style[t]),Se.test(i))return i;a=r&&i===e.style[t],i=parseFloat(i)||0}return i+_e(e,t,n||(r?"border":"content"),a,o)},Oe=function(e){return Te(e,"width","content")};function ke(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Ce=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.expressions=[],null!=t&&this.expressions.push(e.normalize(t))}var t,n,r;return t=e,r=[{key:"new",value:function(e){return new this(e)}},{key:"normalize",value:function(t){var n,r;return null==t?t:(t=String(t),n="((\\|\\||>=|<=|&&|!=|>|=|<|/|-|\\+|\\*)(?=[ _])|"+Object.keys(e.PREDEFINED_VARS).join("|")+")",r=new RegExp(n,"g"),(t=t.replace(r,(function(t){return e.OPERATORS[t]||e.PREDEFINED_VARS[t]}))).replace(/[ _]+/g,"_"))}},{key:"variable",value:function(e,t){return new this(e).value(t)}},{key:"width",value:function(){return new this("width")}},{key:"height",value:function(){return new this("height")}},{key:"initialWidth",value:function(){return new this("initialWidth")}},{key:"initialHeight",value:function(){return new this("initialHeight")}},{key:"aspectRatio",value:function(){return new this("aspectRatio")}},{key:"initialAspectRatio",value:function(){return new this("initialAspectRatio")}},{key:"pageCount",value:function(){return new this("pageCount")}},{key:"faceCount",value:function(){return new this("faceCount")}},{key:"currentPage",value:function(){return new this("currentPage")}},{key:"tags",value:function(){return new this("tags")}},{key:"pageX",value:function(){return new this("pageX")}},{key:"pageY",value:function(){return new this("pageY")}}],(n=[{key:"serialize",value:function(){return e.normalize(this.expressions.join("_"))}},{key:"toString",value:function(){return this.serialize()}},{key:"getParent",value:function(){return this.parent}},{key:"setParent",value:function(e){return this.parent=e,this}},{key:"predicate",value:function(t,n,r){return null!=e.OPERATORS[n]&&(n=e.OPE
1RATORS[n]),this.expressions.push("".concat(t,"_").concat(n,"_").concat(r)),this}},{key:"and",value:function(){return this.expressions.push("and"),this}},{key:"or",value:function(){return this.expressions.push("or"),this}},{key:"then",value:function(){return this.getParent().if(this.toString())}},{key:"height",value:function(e,t){return this.predicate("h",e,t)}},{key:"width",value:function(e,t){return this.predicate("w",e,t)}},{key:"aspectRatio",value:function(e,t){return this.predicate("ar",e,t)}},{key:"pageCount",value:function(e,t){return this.predicate("pc",e,t)}},{key:"faceCount",value:function(e,t){return this.predicate("fc",e,t)}},{key:"value",value:function(e){return this.expressions.push(e),this}}])&&ke(t.prototype,n),r&&ke(t,r),e}();Ce.OPERATORS={"=":"eq","!=":"ne","<":"lt",">":"gt","<=":"lte",">=":"gte","&&":"and","||":"or","*":"mul","/":"div","+":"add","-":"sub"},Ce.PREDEFINED_VARS={aspect_ratio:"ar",aspectRatio:"ar",current_page:"cp",currentPage:"cp",duration:"du",face_count:"fc",faceCount:"fc",height:"h",initial_aspect_ratio:"iar",initial_duration:"idu",initial_height:"ih",initial_width:"iw",initialAspectRatio:"iar",initialDuration:"idu",initialHeight:"ih",initialWidth:"iw",page_count:"pc",page_x:"px",page_y:"py",pageCount:"pc",pageX:"px",pageY:"py",tags:"tags",width:"w"},Ce.BOUNDRY="[ _]+";var xe=Ce;function Ae(e){return(Ae="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})(e)}function Ie(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ne(e,t){return!t||"object"!==Ae(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function De(e){return(De=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Pe(e,t){return(Pe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Re=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Ne(this,De(t).call(this,e))}var n,r,o;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&&Pe(e,t)}(t,e),n=t,(r=[{key:"height",value:function(e,t){return this.predicate("h",e,t)}},{key:"width",value:function(e,t){return this.predicate("w",e,t)}},{key:"aspectRatio",value:function(e,t){return this.predicate("ar",e,t)}},{key:"pageCount",value:function(e,t){return this.predicate("pc",e,t)}},{key:"faceCount",value:function(e,t){return this.predicate("fc",e,t)}},{key:"duration",value:function(e,t){return this.predicate("du",e,t)}},{key:"initialDuration",value:function(e,t){return this.predicate("idu",e,t)}}])&&Ie(n.prototype,r),o&&Ie(n,o),t}(xe);function je(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(s){o=!0,i=s}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Me(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Le=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.configuration=null==t?{}:h()(t),W(this.configuration,Ue)}var t,n,o;return t=e,(n=[{key:"init",value:function(){return this.fromEnvironment(),this.fromDocument(),this}},{key:"set",value:function(e,t){return this.configuration[e]=t,this}},{key:"get",value:function(e){return this.configuration[e]}},{key:"merge",value:function(e){return l()(this.configuration,h()(e)),this}},{key:"fromDocument",value:function(){var e,t,n,r;if(r="undefined"!==typeof document&&null!==document?document.querySelectorAll('meta[name^="cloudinary_"]'):void 0)for(t=0,n=r.length;t<n;t++)e=r[t],this.configuration[e.getAttribute("name").replace("cloudinary_","")]=e.getAttribute("content");return this}},{key:"fromEnvironment",value:function(){var e,t,n,o=this;return"undefined"!==typeof r&&null!==r&&Object({NODE_ENV:"production",PUBLIC_URL:""})&&Object({NODE_ENV:"production",PUBLIC_URL:""}).CLOUDINARY_URL&&(e=Object({NODE_ENV:"production",PUBLIC_URL:""}).CLOUDINARY_URL,(n=/cloudinary:\/\/(?:(\w+)(?:\:([\w-]+))?@)?([\w\.-]+)(?:\/([^?]*))?(?:\?(.+))?/.exec(e))&&(null!=n[3]&&(this.configuration.cloud_
1name=n[3]),null!=n[1]&&(this.configuration.api_key=n[1]),null!=n[2]&&(this.configuration.api_secret=n[2]),null!=n[4]&&(this.configuration.private_cdn=null!=n[4]),null!=n[4]&&(this.configuration.secure_distribution=n[4]),null!=(t=n[5])&&t.split("&").forEach((function(e){var t=je(e.split("="),2),n=t[0],r=t[1];null==r&&(r=!0),o.configuration[n]=r})))),this}},{key:"config",value:function(e,t){switch(!1){case void 0===t:return this.set(e,t),this.configuration;case!x()(e):return this.get(e);case!k()(e):return this.merge(e),this.configuration;default:return this.configuration}}},{key:"toOptions",value:function(){return h()(this.configuration)}}])&&Me(t.prototype,n),o&&Me(t,o),e}(),Ue={responsive_class:"cld-responsive",responsive_use_breakpoints:!0,round_dpr:!0,secure:"https:"===("undefined"!==typeof window&&null!==window&&window.location?window.location.protocol:void 0)};Le.CONFIG_PARAMS=["api_key","api_secret","callback","cdn_subdomain","cloud_name","cname","private_cdn","protocol","resource_type","responsive","responsive_class","responsive_use_breakpoints","responsive_width","round_dpr","secure","secure_cdn_subdomain","secure_distribution","shorten","type","upload_preset","url_suffix","use_root_path","version"];var Fe=Le;function Be(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var qe=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options={},null!=t&&["resourceType","type","publicId","format"].forEach((function(e){var r;return n.options[e]=null!=(r=t[e])?r:t[J(e)]}))}var t,n,r;return t=e,(n=[{key:"resourceType",value:function(e){return this.options.resourceType=e,this}},{key:"type",value:function(e){return this.options.type=e,this}},{key:"publicId",value:function(e){return this.options.publicId=e,this}},{key:"getPublicId",value:function(){var e;return null!=(e=this.options.publicId)?e.replace(/\//g,":"):void 0}},{key:"getFullPublicId",value:function(){return null!=this.options.format?this.getPublicId()+"."+this.options.format:this.getPublicId()}},{key:"format",value:function(e){return this.options.format=e,this}},{key:"toString",value:function(){var e;if(e=[],null==this.options.publicId)throw"Must supply publicId";return"image"!==this.options.resourceType&&e.push(this.options.resourceType),"upload"!==this.options.type&&e.push(this.options.type),e.push(this.getFullPublicId()),d()(e).join(":")}},{key:"clone",value:function(){return new this.constructor(this.options)}}])&&Be(t.prototype,n),r&&Be(t,r),e}();function Ve(e){return(Ve="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})(e)}function ze(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function We(e,t){return!t||"object"!==Ve(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Qe(e){return(Qe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ge(e,t){return(Ge=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Ke=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=We(this,Qe(t).call(this,e)),null!=e&&["resourceType","resourceType","fontFamily","fontSize","fontWeight","fontStyle","textDecoration","textAlign","stroke","letterSpacing","lineSpacing","fontHinting","fontAntialiasing","text"].forEach((function(t){var r;return n.options[t]=null!=(r=e[t])?r:e[J(t)]})),n.options.resourceType="text",n}var n,r,o;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&&Ge(e,t)}(t,e),n=t,(r=[{key:"resourceType",value:function(e){throw"Cannot modify resourceType for text layers"}},{key:"type",value:function(e){throw"Cannot modify type for text layers"}},{key:"format",value:function(e){throw"Cannot modify format for text layers"}},{key:"fontFamily",value:function(e){return this.options.fontFamily=e,this}},{key:"fontSize",value:function(e){return this.options.fontSize=e,this}},{key:"fontWeight",value:function(e){return this.options.fontWeight=e,this}},{key:"fontStyle",value:function(e){return this.options.fontStyle=e,this}},{key:"textDecoration",value:function(e){return this.options.textDecoration=e,this}},{key:"textAlign",value:function(e){return this.options.textAlign=e,this}},{key:"stroke",value:function(e){return this.options.stroke=e,this}},{key:"letterSpacing",value:function(e){return this.options.letterSpacing=e,this}},{key:"lineSpacing",value:function(e){return this.options.lineSpacing=e,this}},{key:"fontHinting",value:function(e){return this.options.fontHinting=e,this}},{key:"fontAntialiasing",value:function(e){return this.options.fontAntialiasing=e,this}},{key:"text",value:function(e){return this.options.text=e,this}},{key:"toString",value:function(){var e,t,n,r,o,i,a,u,s,c;if(u=this.textStyleIdentifier(),null!=this.options.publicId&&(r=this.getFullPublicId()),null!=this.options.text){if(t=!se(r),n=!se(u),t&&n||!t&&!n)throw"Must supply either style parameters or a public_id when providing text parameter in a text overlay/underlay, but not both!";for(o=/\$\([a-zA-Z]\w*\)/g,a=0,c=z(this.options.text,/[,\/]/g),s="";i=o.exec(c);)s+=z(c.slice(a,i.index)),s+=i[0],a=i.index+i[0].length;s+=z(c.slice(a))}return e=[this.options.resourceType,u,r,s],d()(e).join(":")}},{key:"textStyleIdentifier",value:function(){var e;if(e=[],"normal"!==this.options.fontWeight&&e.push(this.options.fontWeight),"normal"!==this.options.fontStyle&&e.push(this.options.fontStyle),"none"!==this.options.textDecoration&&e.push(this.options.textDecoration),e.push(this.options.textAlign),"none"!==this.options.stroke&&e.push(this.options.stroke),se(this.options.letterSpacing)&&!V(this.options.letterSpacing)||e.push("letter_spacing_"+this.options.letterSpacing),se(this.options.lineSpacing)&&!V(this.options.lineSpacing)||e.push("line_spacing_"+this.options.lineSpacing),se(this.options.fontAntialiasing)||e.push("antialias_"+this.options.fontAntialiasing),se(this.options.fontHinting)||e.push("hinting_"+this.options.fontHinting),!se(d()(e))){if(se(this.options.fontFamily))throw"Must supply fontFamily. ".concat(e);
1if(se(this.options.fontSize)&&!V(this.options.fontSize))throw"Must supply fontSize."}return e.unshift(this.options.fontFamily,this.options.fontSize),e=d()(e).join("_")}}])&&ze(n.prototype,r),o&&ze(n,o),t}(qe);function He(e){return(He="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})(e)}function Ye(e,t){return!t||"object"!==He(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function $e(e){return($e=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Xe(e,t){return(Xe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Je=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=Ye(this,$e(t).call(this,e))).options.resourceType="subtitles",n}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&&Xe(e,t)}(t,e),t}(Ke);function Ze(e){return(Ze="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})(e)}function et(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tt(e,t){return!t||"object"!==Ze(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function nt(e){return(nt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function rt(e,t){return(rt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ot=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=tt(this,nt(t).call(this,e)),x()(e)?n.options.url=e:(null!=e?e.url:void 0)&&(n.options.url=e.url),n}var n,r,o;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&&rt(e,t)}(t,e),n=t,(r=[{key:"url",value:function(e){return this.options.url=e,this}},{key:"toString",value:function(){return"fetch:".concat(re(this.options.url))}}])&&et(n.prototype,r),o&&et(n,o),t}(qe);function it(e){return(it="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})(e)}function at(e,t){return!t||"object"!==it(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ut(e,t,n){return(ut="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=st(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function st(e){return(st=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ct(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&<(e,t)}function lt(e,t){return(lt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ft(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ht(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pt(e,t,n){return t&&ht(e.prototype,t),n&&ht(e,n),e}var dt=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:w.a;ft(this,e),this.name=t,this.shortName=n,this.process=r}return pt(e,[{key:"set",value:function(e){return this.origValue=e,this}},{key:"serialize",value:function(){var e,t;return e=this.value(),t=T()(e)||k()(e)||x()(e)?!se(e):null!=e,null!=this.shortName&&t?"".concat(this.shortName,"_").concat(e):""}},{key:"value",value:function(){return this.process(this.origValue)}},{key:"build_array",value:function(e){return null==e?[]:T()(e)?e:[e]}}],[{key:"norm_color",value:function(e){return null!=e?e.replace(/^#/,"rgb:"):void 0}},{key:"process_video_params",value:function(e){var t;switch(e.constructor){case Object:return t="","codec"in e&&(t=e.codec,"profile"in e&&(t+=":"+e.profile,"level"in e&&(t+=":"+e.level))),t;case String:return e;default:return null}}}]),e}(),mt=function(e){function t(e,n){var r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".",i=arguments.length>3?arguments[3]:void 0;return ft(this,t),(r=at(this,st(t).call(this,e,n,i))).sep=o,r}return ct(t,e),pt(t,[{key:"serialize",value:function(){if(null!=this.shortName){var e=this.value();if(se(e))return"";if(x()(e))return"".concat(this.shortName,"_").concat(e);var t=e.map((function(e){return R()(e.serialize)?e.serialize():e})).join(this.sep);return"".concat(this.shortName,"_").concat(t)}return""}},{key:"value",value:function(){var e=this;return T()(this.origValue)?this.origValue.map((function(t){return e.process(t)})):this.process(this.origValue)}},{key:"set",value:function(e){return null==e||T()(e)?ut(st(t.prototype),"set",this).call(this,e):ut(st(t.prototype),"set",this).call(this,[e])}}]),t}(dt),yt=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"t",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".",i=arguments.length>3?arguments[3]:void 0;return ft(this,t),(n=at(this,st(t).call(this,e,r,i))).sep=o,n}return ct(t,e),pt(t,[{key:"serialize",value:function(){var e=this;if(se(this.value()))return"";if(B(this.value())){var t=this.value().join(this.sep);return se(t)?"":"".concat(this.shortName,"_").concat(t)}return this.value().map((function(t){return x()(t)&&!se(t)?"".concat(e.shortName,"_").concat(t):R()(t.serialize)?t.serialize():k()(t)&&!se(t)?new Rt(t).seri
1alize():void 0})).filter((function(e){return e}))}},{key:"set",value:function(e){return this.origValue=e,T()(this.origValue)?ut(st(t.prototype),"set",this).call(this,this.origValue):ut(st(t.prototype),"set",this).call(this,[this.origValue])}}]),t}(dt),vt=function(e){function t(e,n,r){var o;return ft(this,t),(o=at(this,st(t).call(this,e,n,r))).process||(o.process=o.norm_range_value),o}return ct(t,e),pt(t,null,[{key:"norm_range_value",value:function(e){var t,n;return(n=String(e).match(new RegExp("^"+offset_any_pattern+"$")))&&(t=null!=n[5]?"p":"",e=(n[1]||n[4])+t),e}}]),t}(dt),gt=function(e){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:w.a;return ft(this,t),at(this,st(t).call(this,e,n,r))}return ct(t,e),pt(t,[{key:"serialize",value:function(){return this.value()}}]),t}(dt),bt=function(e){function t(){return ft(this,t),at(this,st(t).apply(this,arguments))}return ct(t,e),pt(t,[{key:"value",value:function(){if(null==this.origValue)return"";var e;if(this.origValue instanceof qe)e=this.origValue;else if(k()(this.origValue)){var t=ee(this.origValue);e="text"===t.resourceType||null!=t.text?new Ke(t):"subtitles"===t.resourceType?new Je(t):"fetch"===t.resourceType||null!=t.url?new ot(t):new qe(t)}else e=x()(this.origValue)?/^fetch:.+/.test(this.origValue)?new ot(this.origValue.substr(6)):this.origValue:"";return e.toString()}},{key:"textStyle",value:function(e){return new Ke(e).textStyleIdentifier()}}]),t}(dt);function wt(e){return(wt="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})(e)}function Et(e,t){return!t||"object"!==wt(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _t(e){return(_t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function St(e,t){return(St=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Tt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(s){o=!0,i=s}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Ot(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ct(e,t,n){return t&&kt(e.prototype,t),n&&kt(e,n),e}function xt(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.forEach((function(t){Object.keys(t).forEach((function(n){null!=t[n]&&(e[n]=t[n])}))})),e}var At=function(){function e(t){var n,r;Ot(this,e),n=void 0,r={},this.toOptions=function(e){var t={};if(null==e&&(e=!0),Object.keys(r).forEach((function(e){return t[e]=r[e].origValue})),xt(t,this.otherOptions),e&&!se(this.chained)){var n=this.chained.map((function(e){return e.toOptions()}));n.push(t),xt(t={},this.otherOptions),t.transformation=n}return t},this.setParent=function(e){return n=e,null!=e&&this.fromOptions("function"===typeof e.toOptions?e.toOptions():void 0),this},this.getParent=function(){return n},this.param=function(e,t,n,o,i){return null==i&&(i=R()(o)?o:w.a),r[t]=new dt(t,n,i).set(e),this},this.rawParam=function(e,t,n,o){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:w.a;return i=Nt(arguments),r[t]=new gt(t,n,i).set(e),this},this.rangeParam=function(e,t,n,o){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:w.a;return i=Nt(arguments),r[t]=new vt(t,n,i).set(e),this},this.arrayParam=function(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:":",i=(arguments.length>4&&void 0!==arguments[4]&&arguments[4],arguments.length>5&&void 0!==arguments[5]?arguments[5]:w.a);return i=Nt(arguments),r[t]=new mt(t,n,o,i).set(e),this},this.transformationParam=function(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",i=(arguments.length>4&&arguments[4],arguments.length>5&&void 0!==arguments[5]?arguments[5]:w.a);return i=Nt(arguments),r[t]=new yt(t,n,o,i).set(e),this},this.layerParam=function(e,t,n){return r[t]=new bt(t,n).set(e),this},this.getValue=function(e){var t=r[e]&&r[e].value();return null!=t?t:this.otherOptions[e]},this.get=function(e){return r[e]},this.remove=function(e){var t;switch(!1){case null==r[e]:return t=r[e],delete r[e],t.origValue;case null==this.otherOptions[e]:return t=this.otherOptions[e],delete this.otherOptions[e],t;default:return null}},this.keys=function(){var e;return function(){var t;for(e in t=[],r)null!=e&&t.push(e.match(It)?e:J(e));return t}().sort()},this.toPlainObject=function(){var e,t,n;for(t in e={},r)e[t]=r[t].value(),k()(e[t])&&(e[t]=h()(e[t]));return se(this.chained)||((n=this.chained.map((function(e){return e.toPlainObject()}))).push(e),e={transformation:n}),e},this.chain=function(){var e;return 0!==Object.getOwnPropertyNames(r).length&&(e=new this.constructor(this.toOptions(!1)),this.resetTransformations(),this.chained.push(e)),this},this.resetTransformations=function(){return r={},this},this.otherOptions={},this.chained=[],this.fromOptions(t)}return Ct(e,[{key:"fromOptions",value:function(t){if(t instanceof e)this.fromTransformation(t);else for(var n in t||(t={}),(x()(t)||T()(t))&&(t={transformation:t}),(t=h()(t,(function(t){if(t instanceof e||t instanceof Layer)return new t.clone}))).if&&(this.set("if",t.if),delete t.if),t){var r=t[n];null!=r&&(n.match(It)?"$attr"!==n&&this.set("variable",n,r):this.set(n,r))}return this}},{key:"fromTransformation",value:function(t){var n=this;
1return t instanceof e&&t.keys().forEach((function(e){return n.set(e,t.get(e).origValue)})),this}},{key:"set",value:function(e){var t;t=X(e);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return _()(Pt.methods,t)?this[t].apply(this,r):this.otherOptions[e]=r[0],this}},{key:"hasLayer",value:function(){return this.getValue("overlay")||this.getValue("underlay")}},{key:"serialize",value:function(){var e,t,n,r,o,i,a,u,s,c,l,f,h,p,m,v,g;for(c=this.chained.map((function(e){return e.serialize()})),r=this.keys(),p=null!=(o=this.get("transformation"))?o.serialize():void 0,e=null!=(i=this.get("if"))?i.serialize():void 0,v=function(e){var t,n,r,o,i;if(T()(e)){for(o=[],t=0,n=e.length;t<n;t++){var a=Tt(e[t],2);r=a[0],i=a[1],o.push("".concat(r,"_").concat(xe.normalize(i)))}return o}return e}(null!=(a=this.get("variables"))?a.value():void 0),r=y()(r,["transformation","if","variables"]),g=[],f=[],t=0,n=r.length;t<n;t++)(l=r[t]).match(It)?g.push(l+"_"+xe.normalize(null!=(u=this.get(l))?u.value():void 0)):f.push(null!=(s=this.get(l))?s.serialize():void 0);switch(!1){case!x()(p):f.push(p);break;case!T()(p):c=c.concat(p)}return f=function(){var e,t,n;for(n=[],e=0,t=f.length;e<t;e++)m=f[e],(T()(m)&&!se(m)||!T()(m)&&m)&&n.push(m);return n}(),f=g.sort().concat(v).concat(f.sort()),"if_end"===e?f.push(e):se(e)||f.unshift(e),se(h=d()(f).join(this.param_separator))||c.push(h),d()(c).join(this.trans_separator)}},{key:"listNames",value:function(){return Pt.methods}},{key:"toHtmlAttributes",value:function(){var e,t,n,r,o,i,a,u,s=this;for(n in r={},this.otherOptions)a=this.otherOptions[n],_()(Pt.PARAM_NAMES,J(n))||(e=/^html_/.test(n)?n.slice(5):n,r[e]=a);return this.keys().forEach((function(e){/^html_/.test(e)&&(r[X(e.slice(5))]=s.getValue(e))})),this.hasLayer()||this.getValue("angle")||_()(["fit","limit","lfill"],this.getValue("crop"))||(u=null!=(o=this.get("width"))?o.origValue:void 0,t=null!=(i=this.get("height"))?i.origValue:void 0,parseFloat(u)>=1&&null==r.width&&(r.width=u),parseFloat(t)>=1&&null==r.height&&(r.height=t)),r}},{key:"isValidParamName",value:function(e){return Pt.methods.indexOf(X(e))>=0}},{key:"toHtml",value:function(){var e;return null!=(e=this.getParent())&&"function"===typeof e.toHtml?e.toHtml():void 0}},{key:"toString",value:function(){return this.serialize()}},{key:"clone",value:function(){return new this.constructor(this.toOptions(!0))}}]),e}(),It=/^\$[a-zA-Z0-9]+$/;function Nt(e){var t;return t=null!=e?e[e.length-1]:void 0,R()(t)?t:void 0}function Dt(e){return"remote"===e.function_type?[e.function_type,btoa(e.source)].join(":"):"wasm"===e.function_type?[e.function_type,e.source].join(":"):void 0}At.prototype.trans_separator="/",At.prototype.param_separator=",";var Pt=function(e){function t(e){return Ot(this,t),Et(this,_t(t).call(this,e))}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&&St(e,t)}(t,e),Ct(t,[{key:"angle",value:function(e){return this.arrayParam(e,"angle","a",".",xe.normalize)}},{key:"audioCodec",value:function(e){return this.param(e,"audio_codec","ac")}},{key:"audioFrequency",value:function(e){return this.param(e,"audio_frequency","af")}},{key:"aspectRatio",value:function(e){return this.param(e,"aspect_ratio","ar",xe.normalize)}},{key:"background",value:function(e){return this.param(e,"background","b",dt.norm_color)}},{key:"bitRate",value:function(e){return this.param(e,"bit_rate","br")}},{key:"border",value:function(e){return this.param(e,"border","bo",(function(e){return k()(e)?(e=l()({},{color:"black",width:2},e),"".concat(e.width,"px_solid_").concat(dt.norm_color(e.color))):e}))}},{key:"color",value:function(e){return this.param(e,"color","co",dt.norm_color)}},{key:"colorSpace",value:function(e){return this.param(e,"color_space","cs")}},{key:"crop",value:function(e){return this.param(e,"crop","c")}},{key:"customFunction",value:function(e){return this.param(e,"custom_function","fn",(function(){return Dt(e)}))}},{key:"customPreFunction",value:function(e){if(!this.get("custom_function"))return this.rawParam(e,"custom_function","",(function(){return(e=Dt(e))?"fn_pre:".concat(e):e}))}},{key:"defaultImage",value:function(e){return this.param(e,"default_image","d")}},{key:"delay",value:function(e){return this.param(e,"delay","dl")}},{key:"density",value:function(e){return this.param(e,"density","dn")}},{key:"duration",value:function(e){return this.rangeParam(e,"duration","du")}},{key:"dpr",value:function(e){return this.param(e,"dpr","dpr",(function(e){return(null!=(e=e.toString())?e.match(/^\d+$/):void 0)?e+".0":xe.normalize(e)}))}},{key:"effect",value:function(e){return this.arrayParam(e,"effect","e",":",xe.n
vendor: 6,146 bytes, line 1
1ormalize)}},{key:"else",value:function(){return this.if("else")}},{key:"endIf",value:function(){return this.if("end")}},{key:"endOffset",value:function(e){return this.rangeParam(e,"end_offset","eo")}},{key:"fallbackContent",value:function(e){return this.param(e,"fallback_content")}},{key:"fetchFormat",value:function(e){return this.param(e,"fetch_format","f")}},{key:"format",value:function(e){return this.param(e,"format")}},{key:"flags",value:function(e){return this.arrayParam(e,"flags","fl",".")}},{key:"gravity",value:function(e){return this.param(e,"gravity","g")}},{key:"fps",value:function(e){return this.param(e,"fps","fps",(function(e){return x()(e)?e:T()(e)?e.join("-"):e}))}},{key:"height",value:function(e){var t=this;return this.param(e,"height","h",(function(){return t.getValue("crop")||t.getValue("overlay")||t.getValue("underlay")?xe.normalize(e):null}))}},{key:"htmlHeight",value:function(e){return this.param(e,"html_height")}},{key:"htmlWidth",value:function(e){return this.param(e,"html_width")}},{key:"if",value:function(){var e,n,r,o,i,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";switch(a){case"else":return this.chain(),this.param(a,"if","if");case"end":for(this.chain(),e=r=this.chained.length-1;r>=0&&"end"!==(n=this.chained[e].getValue("if"))&&(null==n||(o=t.new().if(n),this.chained[e].remove("if"),i=this.chained[e],this.chained[e]=t.new().transformation([o,i]),"else"===n));e=r+=-1);return this.param(a,"if","if");case"":return Re.new().setParent(this);default:return this.param(a,"if","if",(function(e){return Re.new(e).toString()}))}}},{key:"keyframeInterval",value:function(e){return this.param(e,"keyframe_interval","ki")}},{key:"offset",value:function(e){var t,n,r=Tt(R()(null!=e?e.split:void 0)?e.split(".."):T()(e)?e:[null,null],2);if(n=r[0],t=r[1],null!=n&&this.startOffset(n),null!=t)return this.endOffset(t)}},{key:"opacity",value:function(e){return this.param(e,"opacity","o",xe.normalize)}},{key:"overlay",value:function(e){return this.layerParam(e,"overlay","l")}},{key:"page",value:function(e){return this.param(e,"page","pg")}},{key:"poster",value:function(e){return this.param(e,"poster")}},{key:"prefix",value:function(e){return this.param(e,"prefix","p")}},{key:"quality",value:function(e){return this.param(e,"quality","q",xe.normalize)}},{key:"radius",value:function(e){return this.arrayParam(e,"radius","r",":",xe.normalize)}},{key:"rawTransformation",value:function(e){return this.rawParam(e,"raw_transformation")}},{key:"size",value:function(e){var t,n;if(R()(null!=e?e.split:void 0)){var r=Tt(e.split("x"),2);return n=r[0],t=r[1],this.width(n),this.height(t)}}},{key:"sourceTypes",value:function(e){return this.param(e,"source_types")}},{key:"sourceTransformation",value:function(e){return this.param(e,"source_transformation")}},{key:"startOffset",value:function(e){return this.rangeParam(e,"start_offset","so")}},{key:"streamingProfile",value:function(e){return this.param(e,"streaming_profile","sp")}},{key:"transformation",value:function(e){return this.transformationParam(e,"transformation","t")}},{key:"underlay",value:function(e){return this.layerParam(e,"underlay","u")}},{key:"variable",value:function(e,t){return this.param(t,e,e)}},{key:"variables",value:function(e){return this.arrayParam(e,"variables")}},{key:"videoCodec",value:function(e){return this.param(e,"video_codec","vc",dt.process_video_params)}},{key:"videoSampling",value:function(e){return this.param(e,"video_sampling","vs")}},{key:"width",value:function(e){var t=this;return this.param(e,"width","w",(function(){return t.getValue("crop")||t.getValue("overlay")||t.getValue("underlay")?xe.normalize(e):null}))}},{key:"x",value:function(e){return this.param(e,"x","x",xe.normalize)}},{key:"y",value:function(e){return this.param(e,"y","y",xe.normalize)}},{key:"zoom",value:function(e){return this.param(e,"zoom","z",xe.normalize)}}],[{key:"new",value:function(e){return new t(e)}}]),t}(At);Pt.methods=["angle","audioCodec","audioFrequency","aspectRatio","background","bitRate","border","color","colorSpace","crop","customFunction","customPreFunction","defaultImage","delay","density","duration","dpr","effect","else","endIf","endOffset","fallbackContent","fetchFormat","format","flags","gravity","fps","height","htmlHeight","htmlWidth","if","keyframeInterval","offset","opacity","overlay","page","poster","prefix","quality","radius","rawTransformation","size","sourceTypes","sourceTransformation","startOffset","streamingProfile","transformation","underlay","variable","variables","videoCodec","videoSampling","width","x","y","zoom"],Pt.PARAM_NAMES=Pt.methods.map(J).concat(Fe.CONFIG_PARAMS);var Rt=Pt;function jt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Mt(e,t){return t?!0===t?e:"".concat(e,'="').concat(t,'"'):void 0}function Lt(e){return x()(e)?e.replace('"',""").replace("'","'"):e}var Ut=function(){function e(t,n,r){var o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=t,this.publicId=n,null==r&&(k()(n)?(r=n,this.publicId=void 0):r={}),(o=new Rt(r)).setParent(this),this.transformation=function(){return o}}var t,n,r;return t=e,r=[{key:"new",value:function(e,t,n){return new this(e,t,n)}},{key:"isResponsive",value:function(e,t){var n;return n=ce(e,"src-cache")||ce(e,"src"),me(e,t)&&/\bw_auto\b/.exec(n)}}],(n=[{key:"htmlAttrs",value:function(e){var t,n;return function(){var r;for(t in r=[],e)(n=Lt(e[t]))&&r.push(Mt(t,n));return r}().sort().join(" ")}},{key:"getOptions",value:function(){return this.transformation().toOptions()}},{key:"getOption",value:function(e){return this.transformation().getValue(e)}},{key:"attributes",value:function(){var e=this.transformation().toHtmlAttributes();return Object.keys(e).forEach((function(t){k()(e[t])&&delete e[t]})),e.attributes&&(I()(e,e.attributes),delete e.attributes),e}},{key:"setAttr",value:function(e,t){return this.transformation().set("html_".concat(e),t),this}},{key:"getAttr",value:function(e){return this.attributes()["html_".concat(e)
1]||this.attributes()[e]}},{key:"removeAttr",value:function(e){var t;return null!=(t=this.transformation().remove("html_".concat(e)))?t:this.transformation().remove(e)}},{key:"content",value:function(){return""}},{key:"openTag",value:function(){var e="<"+this.name,t=this.htmlAttrs(this.attributes());return t&&t.length>0&&(e+=" "+t),e+">"}},{key:"closeTag",value:function(){return"</".concat(this.name,">")}},{key:"toHtml",value:function(){return this.openTag()+this.content()+this.closeTag()}},{key:"toDOM",value:function(){var e,t,n,r;if(!R()("undefined"!==typeof document&&null!==document?document.createElement:void 0))throw"Can't create DOM if document is not present!";for(t in e=document.createElement(this.name),n=this.attributes())r=n[t],e.setAttribute(t,r);return e}}])&&jt(t.prototype,n),r&&jt(t,r),e}(),Ft="2.5.0",Bt="d3jpl91pxevbkh.cloudfront.net",qt="cloudinary-a.akamaihd.net",Vt="res.cloudinary.com",zt=Vt,Wt={format:"jpg",resource_type:"video"},Qt=["webm","mp4","ogv"],Gt={"image/upload":"images","image/private":"private_images","image/authenticated":"authenticated_images","raw/upload":"files","video/upload":"videos"},Kt={resource_type:"image",transformation:[],type:"upload"},Ht={fallback_content:"",resource_type:"video",source_transformation:{},source_types:Qt,transformation:[],type:"upload"},Yt=[{type:"mp4",codecs:"hev1",transformations:{video_codec:"h265"}},{type:"webm",codecs:"vp9",transformations:{video_codec:"vp9"}},{type:"mp4",transformations:{video_codec:"auto"}},{type:"webm",transformations:{video_codec:"auto"}}];function $t(e){return!!e&&!!e.match(/^https?:\//)}function Xt(e,t){if(t.cloud_name&&"/"===t.cloud_name[0])return"/res"+t.cloud_name;var n="http://",r="",o="res",i=".cloudinary.com",a="/"+t.cloud_name;return t.protocol&&(n=t.protocol+"//"),t.private_cdn&&(r=t.cloud_name+"-",a=""),t.cdn_subdomain&&(o="res-"+function(e){return s(e)%5+1}(e)),t.secure?(n="https://",!1===t.secure_cdn_subdomain&&(o="res"),null!=t.secure_distribution&&t.secure_distribution!==qt&&t.secure_distribution!==zt&&(r="",o="",i=t.secure_distribution)):t.cname&&(n="http://",r="",o=t.cdn_subdomain?"a"+(s(e)%5+1)+".":"",i=t.cname),[n,r,o,i,a].join("")}function Jt(e){return encodeURIComponent(e).replace(/%3A/g,":").replace(/%2F/g,"/")}function Zt(e,t){var n=t.type;return $t(e)||"fetch"!==n?e:function(e){var t=document.location.protocol+"//"+document.location.host;return"?"===e[0]?t+=document.location.pathname:"/"!==e[0]&&(t+=document.location.pathname.replace(/\/[^\/]*$/,"/")),t+e}(e)}function en(e,t){if($t(e)&&("upload"===t.type||"asset"===t.type))return e;var n=function(e,t){var n=t.force_version||"undefined"===typeof t.force_version,r=e.indexOf("/")<0||e.match(/^v[0-9]+/)||$t(e)||t.version;return n&&!r&&(t.version=1),t.version?"v".concat(t.version):""}(e,t),r=function(e){return new Rt(e).serialize()}(t),o=Xt(e,t),i=function(e){var t=e.signature,n=!t||t.startsWith("s--")&&t.endsWith("--");return delete e.signature,n?t:"s--".concat(t,"--")}(t),a=function(e){var t,n=e.resource_type,r=void 0===n?"image":n,o=e.type,i=void 0===o?"upload":o,a=e.url_suffix,u=e.use_root_path,s=e.shorten,c=r;if(k()(c)&&(c=(t=c).resource_type,i=t.type,s=t.shorten),null==i&&(i="upload"),null!=a&&(c=Gt["".concat(c,"/").concat(i)],i=null,null==c))throw new Error("URL Suffix only supported for ".concat(Object.keys(Gt).join(", ")));if(u){if(("image"!==c||"upload"!==i)&&"images"!==c)throw new Error("Root path only supported for image/upload");c=null,i=null}return s&&"image"===c&&"upload"===i&&(c="iu",i=null),[c,i].join("/")}(t);return e=function(e,t){if($t(e))e=Jt(e);else{try{e=decodeURIComponent(e)}catch(n){}e=Jt(e),t.url_suffix&&(e=e+"/"+t.url_suffix),t.format&&(t.trust_public_id||(e=e.replace(/\.(jpg|png|gif|webp)$/,"")),e=e+"."+t.format)}return e}(e,t),d()([o,a,i,r,n,e]).join("/").replace(/([^:])\/+/g,"$1/")}function tn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e)return e;e=Zt(e,t=function(e,t){return e instanceof Rt&&(e=e.toOptions()),"fetch"===(e=W({},e,t,Kt)).type&&(e.fetch_format=e.fetch_format||e.format),e}(t,n));var r=function(e){var t=e.cloud_name,n=e.url_suffix;return t?n&&n.match(/[\.\/]/)?"url_suffix should not include . or /":void 0:"Unknown cloud_name"}(t);if(r)throw r;return en(e,t)}function nn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(s){o=!0,i=s}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}
1(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var rn=se;function on(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=ie(r);return n=n||r,o.raw_transformation=new Rt([I.a({},n),{crop:"scale",width:t}]).toString(),tn(e,o)}function an(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return arguments.length>2&&void 0!==arguments[2]&&arguments[2],function(e){var t=e.breakpoints||[];if(t.length)return t;var n=nn([e.min_width,e.max_width,e.max_images].map(Number),3),r=n[0],o=n[1],i=n[2];if([r,o,i].some(isNaN))throw"Either (min_width, max_width, max_images) or breakpoints must be provided to the image srcset attribute";if(r>o)throw"min_width must be less than max_width";if(i<=0)throw"max_images must be a positive integer";1===i&&(r=o);for(var a=Math.ceil((o-r)/Math.max(i-1,1)),u=r;u<o;u+=a)t.push(u);return t.push(o),t}(t)}function un(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o={};if(rn(n))return o;var i=!t.sizes&&!0===n.sizes,a=!t.srcset;if(a||i){var u=an(e,n,r);if(a){var s=function(e,t,n,r){return ae(r=h.a(r)),t.map((function(t){return"".concat(on(e,t,n,r)," ").concat(t,"w")})).join(", ")}(e,u,n.transformation,r);rn(s)||(o.srcset=s)}if(i){var c=function(e){return null==e?"":e.map((function(e){return"(max-width: ".concat(e,"px) ").concat(e,"px")})).join(", ")}(u);rn(c)||(o.sizes=c)}}return o}function sn(e){return(sn="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})(e)}function cn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ln(e,t){return!t||"object"!==sn(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function fn(e,t,n){return(fn="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=hn(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function hn(e){return(hn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function pn(e,t){return(pn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var dn=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ln(this,hn(t).call(this,"img",e,n))}var n,r,o;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&&pn(e,t)}(t,e),n=t,(r=[{key:"closeTag",value:function(){return""}},{key:"attributes",value:function(){var e,n,r;e=fn(hn(t.prototype),"attributes",this).call(this)||{},n=this.getOptions();var o=this.getOption("srcset"),i=this.getOption("attributes")||{},a={};return x()(o)?a.srcset=o:a=un(this.publicId,i,o,n),se(a)||(delete n.width,delete n.height),I()(e,a),null==e[r=n.responsive&&!n.client_hints?"data-src":"src"]&&(e[r]=tn(this.publicId,this.getOptions())),e}}])&&cn(n.prototype,r),o&&cn(n,o),t}(Ut);function mn(e){return(mn="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})(e)}function yn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function vn(e,t){return!t||"object"!==mn(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function gn(e,t,n){return(gn="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=bn(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}
1function bn(e){return(bn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function wn(e,t){return(wn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var En=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),vn(this,bn(t).call(this,"source",e,n))}var n,r,o;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&&wn(e,t)}(t,e),n=t,(r=[{key:"closeTag",value:function(){return""}},{key:"attributes",value:function(){var e=this.getOption("srcset"),n=gn(bn(t.prototype),"attributes",this).call(this)||{},r=this.getOptions();return I()(n,un(this.publicId,n,e,r)),n.srcset||(n.srcset=tn(this.publicId,r)),!n.media&&r.media&&(n.media=function(e){var t=[];return null!=e&&(null!=e.min_width&&t.push("(min-width: ".concat(e.min_width,"px)")),null!=e.max_width&&t.push("(max-width: ".concat(e.max_width,"px)"))),t.join(" and ")}(r.media)),n}}])&&yn(n.prototype,r),o&&yn(n,o),t}(Ut);function _n(e){return(_n="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})(e)}function Sn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Tn(e,t){return!t||"object"!==_n(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function On(e,t,n){return(On="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=kn(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function kn(e){return(kn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Cn(e,t){return(Cn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var xn=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2?arguments[2]:void 0;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=Tn(this,kn(t).call(this,"picture",e,r))).widthList=o,n}var n,r,o;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&&Cn(e,t)}(t,e),n=t,(r=[{key:"content",value:function(){var e=this;return this.widthList.map((function(t){var n=t.min_width,r=t.max_width,o=t.transformation,i=e.getOptions(),a=new Rt(i);return a.chain().fromOptions("string"===typeof o?{raw_transformation:o}:o),(i=ie(i)).media={min_width:n,max_width:r},i.transformation=a,new En(e.publicId,i).toHtml()})).join("")+new dn(this.publicId,this.getOptions()).toHtml()}},{key:"attributes",value:function(){var e=On(kn(t.prototype),"attributes",this).call(this);return delete e.width,delete e.height,e}},{key:"closeTag",value:function(){return"</"+this.name+">"}}])&&Sn(n.prototype,r),o&&Sn(n,o),t}(Ut);function An(e){return(An="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})(e)}function In(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Nn(e,t){return!t||"object"!==An(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Dn(e,t,n){return(Dn="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Pn(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}
1function Pn(e){return(Pn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Rn(e,t){return(Rn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var jn=["source_types","source_transformation","fallback_content","poster","sources"],Mn=["webm","mp4","ogv"],Ln={format:"jpg",resource_type:"video"},Un=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=W({},n,Ht),Nn(this,Pn(t).call(this,"video",e.replace(/\.(mp4|ogv|webm)$/,""),n))}var n,r,o;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&&Rn(e,t)}(t,e),n=t,(r=[{key:"setSourceTransformation",value:function(e){return this.transformation().sourceTransformation(e),this}},{key:"setSourceTypes",value:function(e){return this.transformation().sourceTypes(e),this}},{key:"setPoster",value:function(e){return this.transformation().poster(e),this}},{key:"setFallbackContent",value:function(e){return this.transformation().fallbackContent(e),this}},{key:"content",value:function(){var e=this,t=this.transformation().getValue("source_types"),n=this.transformation().getValue("source_transformation"),r=this.transformation().getValue("fallback_content"),o=this.getOption("sources"),i=[];return T()(o)&&!se(o)?i=o.map((function(t){var n=tn(e.publicId,W({},t.transformations||{},{resource_type:"video",format:t.type}),e.getOptions());return e.createSourceTag(n,t.type,t.codecs)})):(se(t)&&(t=Mn),T()(t)&&(i=t.map((function(t){var r=tn(e.publicId,W({},n[t]||{},{resource_type:"video",format:t}),e.getOptions());return e.createSourceTag(r,t)})))),i.join("")+r}},{key:"attributes",value:function(){var e=this.getOption("source_types"),n=this.getOption("poster");if(void 0===n&&(n={}),k()(n)){var r=null!=n.public_id?Kt:Ln;n=tn(n.public_id||this.publicId,W({},n,r,this.getOptions()))}var o=Dn(Pn(t.prototype),"attributes",this).call(this)||{};return o=U(o,jn),!se(this.getOption("sources"))||se(e)||T()(e)||(o.src=tn(this.publicId,this.getOptions(),{resource_type:"video",format:e})),null!=n&&(o.poster=n),o}},{key:"createSourceTag",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=null;if(!se(t)){var o="ogv"===t?"ogg":t;if(r="video/"+o,!se(n)){var i=T()(n)?n.join(", "):n;r+="; codecs="+i}}return"<source "+this.htmlAttrs({src:e,type:r})+">"}}])&&In(n.prototype,r),o&&In(n,o),t}(Ut);function Fn(e){return(Fn="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})(e)}function Bn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function qn(e,t){return!t||"object"!==Fn(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Vn(e){return(Vn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function zn(e,t){return(zn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Wn,Qn,Gn,Kn,Hn,Yn,$n=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),qn(this,Vn(t).call(this,"meta",void 0,l()({"http-equiv":"Accept-CH",content:"DPR, Viewport-Width, Width"},e)))}var n,r,o;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&&zn(e,t)}(t,e),n=t,(r=[{key:"closeTag",value:function(){return""}}])&&Bn(n.prototype,r),o&&Bn(n,o),t}(Ut);function Xn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Gn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;return t*Math.ceil(e/t)},Qn=function(e,t){var n;for(n=e.length-2;n>=0&&e[n]>=t;)n--;return e[n+1]},Wn=function(e,t,n,r){var o,i,a,u;return!(u=null!=(o=null!=(i=null!=(a=r.responsive_use_breakpoints)?a:r.responsive_use_stoppoints)?i:this.config("responsive_use_breakpoints"))?o:this.config("responsive_use_stoppoints"))||"resize"===u&&!r.resizing?t:this.calc_breakpoint(e,t,n)},Kn=function(e){var t,n;for(t=0;(e=null!=e?e.parentNode:void 0)instanceof Element&&!t;)n=window.getComputedStyle(e),/^inline/.test(n.display)||(t=Oe(e));return t},Yn=function(e,t){return e.replace(/\bdpr_(1\.0|auto)\b/g,"dpr_"+this.device_pixel_ratio(t))},Hn=function(e,t){var n;return e>(n=ce(t,"width")||0)&&(n=e,le(t,"width",e)),n};var Jn=function(){function e(t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.devicePixelRatioCache={},this.responsiveConfig={},this.responsiveResizeInitialized=!1,n=new Fe(t),this.config=function(e,t){return n.config(e,t)},this.fromDocument=function(){return n.fromDocument(),this},this.fromEnvironment=function(){return n.fromEnvironment(),this},this.init=function(){return n.init(),this}}var t,n,r;return t=e,r=[{key:"new",value:function(e){return new this(e)}}],(n=[{key:"url",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return tn(e,t,this.config())}},{key:"video_url",value:function(e,t){return t=l()({resource_type:"video"},t),this.url(e,t)}},{key:"video_thumbnail_url",value:function(e,t){return t=l()({},Wt,t),this.url(e,t)}},{key:"transformation_string",value:function(e){return new Rt(e).serialize()}},{key:"image",value:function(e){var t,n,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=this.imageTag(e,o),t=null!=(r=null!=o.client_hints?o.client_hints:this.config("client_hints"))&&r,null!=o.src||t||n.setAttr("src",""),n=n.toDOM(),t||(le(n,"src-cache",this.url(e,o)),this.cloudinary_update(n,o)),n}},{key:"imageTag",value:function(e,t){var n;return(n=new dn(e,this.config())).transformation().fromOptions(t),n}},{key:"pictureTag",value:function(e,t){var n;return(n=new xn(e,this.config())).transformation().fromOptions(t),n}},{key:"sourceTag",value:function(e,t){var n;return(n=new En(e,this.config())).transformation().fromOptions(t),n}},{key:"video_thumbnail",value:function(e,t){return this.image(e,I()({},Wt,t))}},{key:"facebook_profile_image",value:function(e,t){return this.image(e,l()({type:"facebook"},t))}},{key:"twitter_profile_image",value:function(e,t){return this.image(e,l()({type:"twitter"},t))}},{key:"twitter_name_profile_image",value:function(e,t){return this.image(e,l()({type:"twitter_name"},t))}},{key:"gravatar_image",value:function(e,t){return this.image(e,l()({type:"gravatar"},t))}},{key:"fetch_image",value:function(e,t){return this.image(e,l()({type:"fetch"},t))}},{key:"video",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.videoTag(e,t).toHtml()}},{key:"videoTag",value:function(e,t){return t=W({},t,this.config()),new Un(e,t)}},{key:"sprite_css",value:function(e,t){return t=l()({type:"sprite"},t),e.match(/.css$/)||(t.format="css"),this.url(e,t)}},{key:"responsive",value:function(e){var t,n,r,o,i,a=this,u=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.responsiveConfig=I()(this.responsiveConfig||{}
1,e),o=null!=(t=this.responsiveConfig.responsive_class)?t:this.config("responsive_class"),u&&this.cloudinary_update("img.".concat(o,", img.cld-hidpi"),this.responsiveConfig),(null==(n=null!=(r=this.responsiveConfig.responsive_resize)?r:this.config("responsive_resize"))||n)&&!this.responsiveResizeInitialized)return this.responsiveConfig.resizing=this.responsiveResizeInitialized=!0,i=null,window.addEventListener("resize",(function(){var e,t,n,r,u,s;return e=null!=(t=null!=(n=a.responsiveConfig.responsive_debounce)?n:a.config("responsive_debounce"))?t:100,r=function(){if(i)return clearTimeout(i),i=null},u=function(){return a.cloudinary_update("img.".concat(o),a.responsiveConfig)},s=function(){return r(),u()},e?(r(),i=setTimeout(s,e)):u()}))}},{key:"calc_breakpoint",value:function(e,t,n){var r=ce(e,"breakpoints")||ce(e,"stoppoints")||this.config("breakpoints")||this.config("stoppoints")||Gn;return R()(r)?r(t,n):(x()(r)&&(r=r.split(",").map((function(e){return parseInt(e)})).sort((function(e,t){return e-t}))),Qn(r,t))}},{key:"calc_stoppoint",value:function(e,t,n){return this.calc_breakpoint(e,t,n)}},{key:"device_pixel_ratio",value:function(e){e=null==e||e;var t=("undefined"!==typeof window&&null!==window?window.devicePixelRatio:void 0)||1;e&&(t=Math.ceil(t)),(t<=0||NaN===t)&&(t=1);var n=t.toString();return n.match(/^\d+$/)&&(n+=".0"),n}},{key:"processImageTags",value:function(e,t){if(se(e))return this;t=W({},t||{},this.config());var n=e.filter((function(e){return/^img$/i.test(e.tagName)})).map((function(e){var n=l()({width:e.getAttribute("width"),height:e.getAttribute("height"),src:e.getAttribute("src")},t),r=n.source||n.src;delete n.source,delete n.src;var o=new Rt(n).toHtmlAttributes();return le(e,"src-cache",tn(r,n)),e.setAttribute("width",o.width),e.setAttribute("height",o.height),e}));return this.cloudinary_update(n,t),this}},{key:"cloudinary_update",value:function(e,t){var n,r,o,i,a=this;if(null===e)return this;null==t&&(t={});var u,s=null!=t.responsive?t.responsive:this.config("responsive");e=function(){switch(!1){case!T()(e):case"NodeList"!==e.constructor.name:return e;case!x()(e):return Array.prototype.slice.call(document.querySelectorAll(e),0);default:return[e]}}(),u=this.responsiveConfig&&null!=this.responsiveConfig.responsive_class?this.responsiveConfig.responsive_class:null!=t.responsive_class?t.responsive_class:this.config("responsive_class");var c=null!=t.round_dpr?t.round_dpr:this.config("round_dpr");return e.forEach((function(e){if(/img/i.test(e.tagName)){var l=!0;if(s&&ye(e,u),!se(r=ce(e,"src-cache")||ce(e,"src"))){if(r=Yn.call(a,r,c),Ut.isResponsive(e,u))if(0!==(n=Kn(e))){switch(!1){case!/w_auto:breakpoints/.test(r):i=Hn(n,e),r=r.replace(/w_auto:breakpoints([_0-9]*)(:[0-9]+)?/,"w_auto:breakpoints$1:".concat(i));break;case!(o=/w_auto(:(\d+))?/.exec(r)):i=Wn.call(a,e,n,o[2],t),i=Hn(i,e),r=r.replace(/w_auto[^,\/]*/g,"w_".concat(i))}pe(e,"width"),t.responsive_preserve_height||pe(e,"height")}else l=!1;l&&he(e,"src",r)}}})),this}},{key:"transformation",value:function(e){return Rt.new(this.config()).fromOptions(e).setParent(this)}}])&&Xn(t.prototype,n),r&&Xn(t,r),e}();l()(Jn,a);var Zn=Jn;o.d(n,"ClientHintsMetaTag",(function(){return $n})),o.d(n,"Cloudinary",(function(){return Zn})),o.d(n,"Condition",(function(){return Re})),o.d(n,"Configuration",(function(){return Fe})),o.d(n,"crc32",(function(){return s})),o.d(n,"FetchLayer",(function(){return ot})),o.d(n,"HtmlTag",(function(){return Ut})),o.d(n,"ImageTag",(function(){return dn})),o.d(n,"Layer",(function(){return qe})),o.d(n,"PictureTag",(function(){return xn})),o.d(n,"SubtitlesLayer",(function(){return Je})),o.d(n,"TextLayer",(function(){return Ke})),o.d(n,"Transformation",(function(){return Rt})),o.d(n,"utf8_encode",(function(){return u})),o.d(n,"Util",(function(){return i})),o.d(n,"VideoTag",(function(){return Un})),n.default={ClientHintsMetaTag:$n,Cloudinary:Zn,Condition:Re,Configuration:Fe,crc32:s,FetchLayer:ot,HtmlTag:Ut,ImageTag:dn,Layer:qe,PictureTag:xn,SubtitlesLayer:Je,TextLayer:Ke,Transformation:Rt,utf8_encode:u,Util:i,VideoTag:Un}}
1,"lodash/assign":function(t,n){t.exports=e},"lodash/cloneDeep":function(e,t){e.exports=n},"lodash/compact":function(e,t){e.exports=o},"lodash/difference":function(e,t){e.exports=i},"lodash/functions":function(e,t){e.exports=a},"lodash/identity":function(e,t){e.exports=u},"lodash/includes":function(e,t){e.exports=s},"lodash/isArray":function(e,t){e.exports=c},"lodash/isElement":function(e,t){e.exports=l},"lodash/isFunction":function(e,t){e.exports=f},"lodash/isPlainObject":function(e,t){e.exports=h},"lodash/isString":function(e,t){e.exports=p},"lodash/merge":function(e,t){e.exports=d},"lodash/trim":function(e,t){e.exports=m}})},e.exports=o(n(402),n(403),n(148),n(115),n(422),n(81),n(34),n(20),n(424),n(42),n(60),n(89),n(425),n(429))}).call(this,n(398).Buffer,n(199))},function(e,t,n){var r=n(176),o=n(407),i=n(40);e.exports=function(e){return i(e)?r(e,!0):o(e)}},function(e,t,n){"use strict";e.exports=n(342)},function(e,t,n){"use strict";var r=n(0),o=function(e,t){return e&&!!e.current&&!!e.current[t]};t.a=function(e){var t=e.capture,n=e.listener,i=e.type,a=e.targetRef,u=r.useRef(n);u.current=n;var s=r.useCallback((function(e){return u.current(e)}),[]);r.useEffect((function(){return o(a,"addEventListener")&&a.current.addEventListener(i,s,t),function(){o(a,"removeEventListener")&&a.current.removeEventListener(i,s,t)}}),[t,a,i])}},function(e,t,n){var r=n(298)(n(147));e.exports=r},function(e,t,n){var r=n(356),o=n(53),i=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u01
17f]/g,a=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=o(e))&&e.replace(i,r).replace(a,"")}},function(e,t,n){var r=n(165),o=n(142),i=n(66),a=n(82),u=i((function(e,t){return a(e)?r(e,o(t,1,a,!0)):[]}));e.exports=u},function(e,t,n){"use strict";var r=n(3),o=n.n(r),i=n(9),a=n.n(i),u=n(10),s=n.n(u),c=n(11),l=n.n(c),f=n(8),h=n.n(f),p=n(2),d=n.n(p),m=n(12),y=n.n(m),v=n(1),g=n.n(v),b=n(29),w=n.n(b),E=n(6),_=n.n(E),S=n(4),T=n.n(S),O=(n(7),n(0)),k=n.n(O),C=n(23),x=n(92),A=n(93),I=n(5),N=n(145),D=n(56),P=n(244);function R(e){var t=e.children,n=e.className,r=e.content,i=T()("detail",n),a=Object(x.a)(R,e),u=Object(A.a)(R,e);return k.a.createElement(u,o()({},a,{className:i}),I.b.isNil(t)?r:t)}R.handledProps=["as","children","className","content"],R.propTypes={},R.create=Object(N.f)(R,(function(e){return{content:e}}));var j=R;function M(e){var t=e.children,n=e.circular,r=e.className,i=e.color,a=e.content,u=e.size,s=e.tag,c=T()("ui",i,u,Object(C.a)(n,"circular"),Object(C.a)(s,"tag"),"labels",r),l=Object(x.a)(M,e),f=Object(A.a)(M,e);return k.a.createElement(f,o()({},l,{className:c}),I.b.isNil(t)?a:t)}M.handledProps=["as","children","circular","className","color","content","size","tag"],M.propTypes={};var L=M;n.d(t,"a",(function(){return U}));var U=function(e){function t(){var e,n;a()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=l()(this,(e=h()(t)).call.apply(e,[this].concat(o))),g()(d()(n),"handleClick",(function(e){var t=n.props.onClick;t&&t(e,n.props)})),g()(d()(n),"handleIconOverrides",(function(e){return{onClick:function(t){_()(e,"onClick",t),_()(n.props,"onRemove",t,n.props)}}})),n}return y()(t,e),s()(t,[{key:"render",value:function(){var e=this.props,n=e.active,r=e.attached,i=e.basic,a=e.children,u=e.circular,s=e.className,c=e.color,l=e.content,f=e.corner,h=e.detail,p=e.empty,d=e.floating,m=e.horizontal,y=e.icon,v=e.image,g=e.onRemove,b=e.pointing,E=e.prompt,_=e.removeIcon,S=e.ribbon,O=e.size,N=e.tag,R=(!0===b?"pointing":("left"===b||"right"===b)&&"".concat(b," pointing"))||("above"===b||"below"===b)&&"pointing ".concat(b),M=T()("ui",c,R,O,Object(C.a)(n,"active"),Object(C.a)(i,"basic"),Object(C.a)(u,"circular"),Object(C.a)(p,"empty"),Object(C.a)(d,"floating"),Object(C.a)(m,"horizontal"),Object(C.a)(!0===v,"image"),Object(C.a)(E,"prompt"),Object(C.a)(N,"tag"),Object(C.b)(f,"corner"),Object(C.b)(S,"ribbon"),Object(C.e)(r,"attached"),"label",s),L=Object(x.a)(t,this.props),U=Object(A.a)(t,this.props);if(!I.b.isNil(a))return k.a.createElement(U,o()({},L,{className:M,onClick:this.handleClick}),a);var F=w()(_)?"delete":_;return k.a.createElement(U,o()({className:M,onClick:this.handleClick},L),D.a.create(y,{autoGenerateKey:!1}),"boolean"!==typeof v&&P.a.create(v,{autoGenerateKey:!1}),l,j.create(h,{autoGenerateKey:!1}),g&&D.a.create(F,{autoGenerateKey:!1,overrideProps:this.handleIconOverrides}))}}]),t}(O.Component);g()(U,"Detail",j),g()(U,"Group",L),g()(U,"handledProps",["active","as","attached","basic","children","circular","className","color","content","corner","detail","empty","floating","horizontal","icon","image","onClick","onRemove","pointing","prompt","removeIcon","ribbon","size","tag"]),U.propTypes={},U.create=Object(N.f)(U,(function(e){return{content:e}}))},function(e,t,n){"use strict";var r="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 o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function a(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)}var u=n(0),s=n(7),c=[],l=[];function f(e){var t=e(),n={loading:!0,loaded:null,error:null};return n.promise=t.then((function(e){return n.loading=!1,n.loaded=e,e})).catch((function(e){throw n.loading=!1,n.error=e,e})),n}function h(e){var t={loading:!1,loaded:{},error:null},n=[];try{Object.keys(e).forEach((function(r){var o=f(e[r]);o.loading?t.loading=!0:(t.loaded[r]=o.loaded,t.error=o.error),n.push(o.promise),o.promise.then((function(e){t.loaded[r]=e})).catch((function(e){t.error=e}))}))}catch(r){t.error=r}return t.promise=Promise.all(n).then((function(e){return t.loading=!1,e})).catch((function(e){throw t.loading=!1,e})),t}function p(e,t){return u.createElement((n=e)&&n.__esModule?n.default:n,t);var n}function d(e,t){var f,h;if(!t.loading)throw new Error("react-loadable requires a `loading` component");var d=Object.assign({loader:null,loading:null,delay:200,timeout:null,render:p,webpack:null,modules:null},t),m=null;function y(){return m||(m=e(d.loader)),m.promise}return c.push(y),"function"===typeof d.webpack&&l.push((function(){if(e=d.webpack,"object"===r(n.m)&&e().every((function(e){return"undefined"!==typeof e&&"undefined"!==typeof n.m[e]})))return y();var e})),h=f=function(t){function n(r){o(this,n);var a=i(this,t.call(this,r));return a.retry=function(){a.setState({error:null,loading:!0,timedOut:!1}),m=e(d.loader),a._loadModule()},y(),a.state={error:m.error,pastDelay:!1,timedOut:!1,loading:m.loading,loaded:m.loaded},a}return a(n,t),n.preload=function(){return y()},n.prototype.componentWillMount=function(){this._mounted=!0,this._loadModule()},n.prototype._loadModule=function(){var e=this;if(this.context.loadable&&Array.isArray(d.modules)&&d.modules.forEac
1h((function(t){e.context.loadable.report(t)})),m.loading){"number"===typeof d.delay&&(0===d.delay?this.setState({pastDelay:!0}):this._delay=setTimeout((function(){e.setState({pastDelay:!0})}),d.delay)),"number"===typeof d.timeout&&(this._timeout=setTimeout((function(){e.setState({timedOut:!0})}),d.timeout));var t=function(){e._mounted&&(e.setState({error:m.error,loaded:m.loaded,loading:m.loading}),e._clearTimeouts())};m.promise.then((function(){t()})).catch((function(e){t()}))}},n.prototype.componentWillUnmount=function(){this._mounted=!1,this._clearTimeouts()},n.prototype._clearTimeouts=function(){clearTimeout(this._delay),clearTimeout(this._timeout)},n.prototype.render=function(){return this.state.loading||this.state.error?u.createElement(d.loading,{isLoading:this.state.loading,pastDelay:this.state.pastDelay,timedOut:this.state.timedOut,error:this.state.error,retry:this.retry}):this.state.loaded?d.render(this.state.loaded,this.props):null},n}(u.Component),f.contextTypes={loadable:s.shape({report:s.func.isRequired})},h}function m(e){return d(f,e)}m.Map=function(e){if("function"!==typeof e.render)throw new Error("LoadableMap requires a `render(loaded, props)` function");return d(h,e)};var y=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype.getChildContext=function(){return{loadable:{report:this.props.report}}},t.prototype.render=function(){return u.Children.only(this.props.children)},t}(u.Component);function v(e){for(var t=[];e.length;){var n=e.pop();t.push(n())}return Promise.all(t).then((function(){if(e.length)return v(e)}))}y.propTypes={report:s.func.isRequired},y.childContextTypes={loadable:s.shape({report:s.func.isRequired}).isRequired},m.Capture=y,m.preloadAll=function(){return new Promise((function(e,t){v(c).then(e,t)}))},m.preloadReady=function(){return new Promise((function(e,t){v(l).then(e,e)}))},e.exports=m},function(e,t,n){"use strict";var r,o=(r=n(74))&&"object"===typeof r&&"default"in r?r.default:r;e.exports=o},function(e,t){e.exports=function(e,t,n,r){var o=n?n.call(r,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!==typeof e||!e||"object"!==typeof t||!t)return!1;var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(var u=Object.prototype.hasOwnProperty.bind(t),s=0;s<i.length;s++){var c=i[s];if(!u(c))return!1;var l=e[c],f=t[c];if(!1===(o=n?n.call(r,l,f,c):void 0)||void 0===o&&l!==f)return!1}return!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"CloudinaryContext",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"Transformation",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"Video",{enumerable:!0,get:function(){return a.default}});u(n(0));var r=u(n(397)),o=u(n(438)),i=u(n(439)),a=u(n(440));function u(e){return e&&e.__esModule?e:{default:e}}},,,function(e,t,n){var r=n(267),o=n(285),i=n(287),a=n(288),u=n(289);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=u,e.exports=s},function(e,t,n){var r=n(58)(n(38),"Map");e.exports=r},function(e,t,n){var r=n(99);e.exports=function(e,t){return!!(null==e?0:e.length)&&r(e,t,0)>-1}},function(e,t){e.exports=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},function(e,t,n){var r=n(164)(Object.getPrototypeOf,Object);e.exports=r},function(e,t){var n=9007199254740991;e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}},function(e,t,n){var r=n(306),o=n(31);e.exports=function e(t,n,i,a,u){return t===n||(null==t||null==n||!o(t)&&!o(n)?t!==t&&n!==n:r(t,n,i,a,e,u))}},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},function(e,t,n){var r=n(133),o=n(175),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,u=a?function(e){return null==e?[]:(e=Object(e),r(a(e),(function(t){return i.call(e,t)})))}:o;e.exports=u},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){(function(e){var r=n(160),o=t&&!t.nodeType&&t,i=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=i&&i.exports===o&&r.process,u=function(){try{var e=i&&i.require&&i.require("util").t
vendor: 13,356 bytes, line 1
1ypes;return e||a&&a.binding&&a.binding("util")}catch(t){}}();e.exports=u}).call(this,n(134)(e))},function(e,t,n){var r=n(85),o=n(314),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t,n){var r=n(20),o=n(105),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!o(e))||(a.test(e)||!i.test(e)||null!=t&&e in Object(t))}},function(e,t,n){var r=n(64),o=n(65),i=n(20),a=n(105),u=1/0,s=r?r.prototype:void 0,c=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(a(t))return c?c.call(t):"";var n=t+"";return"0"==n&&1/t==-u?"-0":n}},function(e,t,n){var r=n(79),o=n(40),i=n(102),a=n(39);e.exports=function(e,t,n){if(!a(n))return!1;var u=typeof t;return!!("number"==u?o(n)&&i(t,n.length):"string"==u&&t in n)&&r(n[t],e)}},function(e,t){e.exports=function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i}},function(e,t){var n=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return n.test(e)}},function(e,t,n){var r=n(131),o=n(383);e.exports=function e(t,n,i,a,u){var s=-1,c=t.length;for(i||(i=o),u||(u=[]);++s<c;){var l=t[s];n>0&&i(l)?n>1?e(l,n-1,i,a,u):r(u,l):a||(u[u.length]=l)}return u}},function(e,t,n){"use strict";n.d(t,"a",(function(){return y})),n.d(t,"b",(function(){return b}));var r=n(50),o=n.n(r),i=n(51),a=n.n(i),u=n(26),s=n.n(u),c=n(45),l=n.n(c),f=n(73),h=n.n(f),p=n(239),d=n.n(p),m=n(0),y=function(e){return d()(h()(m.Children.toArray(e),m.isValidElement),"key")},v=function(e,t){var n={},r=[];return l()(s()(e),(function(e){a()(t,e)?r.length&&(n[e]=r,r=[]):r.push(e)})),[n,r]},g=function(e,t,n){return a()(n,e)?n[e]:t[e]},b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={},r=v(e,t),i=o()(r,2),u=i[0],c=i[1];return l()(s()(t),(function(r){a()(u,r)&&l()(u[r],(function(r){n[r]=g(r,e,t)})),n[r]=g(r,e,t)})),l()(c,(function(r){n[r]=g(r,e,t)})),n}},function(e,t,n){var r=n(172);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},function(e,t,n){"use strict";n.d(t,"e",(function(){return O})),n.d(t,"f",(function(){return k})),n.d(t,"a",(function(){return C})),n.d(t,"b",(function(){return x})),n.d(t,"c",(function(){return A})),n.d(t,"d",(function(){return I}));var r=n(14),o=n.n(r),i=(n(49),n(75)),a=n.n(i),u=n(20),s=n.n(u),c=n(60),l=n.n(c),f=n(42),h=n.n(f),p=n(219),d=n.n(p),m=n(89),y=n.n(m),v=n(220),g=n.n(v),b=n(13),w=n.n(b),E=n(4),_=n.n(E),S=n(0),T=n.n(S);function O(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if("function"!==typeof e&&"string"!==typeof e)throw new Error("createShorthand() Component must be a string or function.");if(w()(n)||g()(n))return null;var i=y()(n),u=d()(n),c=h()(n),f=Object(S.isValidElement)(n),p=l()(n),m=i||u||s()(n);if(!c&&!f&&!p&&!m)return null;var v=r.defaultProps,b=void 0===v?{}:v,E=f&&n.props||p&&n||m&&t(n),O=r.overrideProps,k=void 0===O?{}:O;k=h()(k)?k(o()({},b,E)):k;var C=o()({},b,E,k);if(b.className||k.className||E.className){var x=_()(b.className,k.className,E.className);C.className=a()(x.split(" ")).join(" ")}if((b.style||k.style||E.style)&&(C.style=o()({},b.style,E.style,k.style)),w()(C.key)){var A=C.childKey,I=r.autoGenerateKey,N=void 0===I||I;w()(A)?N&&(i||u)&&(C.key=n):(C.key="function"===typeof A?A(C):A,delete C.childKey)}return f?Object(S.cloneElement)(n,C):m||p?T.a.createElement(e,C):c?n(e,C,C.children):void 0}function k(e,t){if("function"!==typeof e&&"string"!==typeof e)throw new Error("createShorthandFactory() Component must be a string or function.");return function(n,r){return O(e,t,n,r)}}O.handledProps=[];var C=k("div",(function(e){return{children:e}})),x=(k("iframe",(function(e){return{src:e}})),k("img",(function(e){return{src:e}})),k("input",(function(e){return{type:e}}))),A=k("label",(function(e){return{children:e}})),I=k("p",(function(e){return{children:e}}))},function(e,t){e.exports=function(){}},function(e,t,n){var r=n(162),o=n(48),i=n(87),a=Math.max;e.exports=function(e,t,n){var u=null==e?0:e.length;if(!u)return-1;var s=null==n?0:i(n);return s<0&&(s=a(u+s,0)),r(e,o(t,3),s)}},function(e,t){e.exports=function(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var i=e[t];i&&(o[r++]=i)}return o}},function(e,t,n){var r=n(340),o=n(182),i=n(106);e.exports=function(e,t,n){return t=o(t),void 0===n?(n=t,t=0):n=o(n),e=i(e),r(e,t,n)}},function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},function(e,t,n){var r=n(352);e.exports=p,e.exports.parse=i,e.exports.compile=function(e,t){return u(i(e,t))},e.exports.tokensToFunction=u,e.exports.tokensToRegExp=h;var o=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function i(e,t){for(var n,r=[],i=0,a=0,u="",l=t&&t.delimiter||"/";null!=(n=o.exec(e));){var f=n[0],h=n[1],p=n.index;if(u+=e.slice(a,p),a=p+f.length,h)u+=h[1];else{var d=e[a],m=n[2],y=n[3],v=n[4],g=n[5],b=n[6],w=n[7];u&&(r.push(u),u="");var E=null!=m&&null!=d&&d!==m,_="+"===b||"*"===b,S="?"===b||"*"===b,T=n[2]||l,O=v||g;r.push({name:y||i++,prefix:m||"",delimiter:T,optional:S,repeat:_,partial:E,asterisk:!!w,pattern:O?c(O):w?".*":"[^"+s(T)+"]+?"})}}return a<e.length&&(u+=e.substr(a)),u&&r.push(u),r}function a(e){return encodeURI(e).replace(/[\/?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function u(e){for(var t=new Array(e.length),n=0;n<e.length;n++)"object"===typeof e[n]&&(t[n]=new RegExp("^(?:"+e[n].pattern+")$"));return function(n,o){for(var i="",u=n||{},s=(o||{}).pretty?a:encodeURIComponent,c=0;c<e.length;c++){var l=e[c];if("string"!==typeof l){var f,h=u[l.name];if(null==h){if(l.optional){l.partial&&(i+=l.prefix);continue}throw new TypeError('Expected "'+l.name+'" to be defined')}if(r(h)){if(!l.repeat)throw new TypeError('Expected "'+l.name+'" to not repeat, but received `'+JSON.stringify(h)+"`");if(0===h.length){if(l.optional)continue;throw new TypeError('Expected "'+l.name+'" to not be empty')}for(var p=0;p<h.length;p++){if(f=s(h[p]),!t[c].test(f))throw new TypeError('Expected all "'+l.name+'" to match "'+l.pattern+'", but received `'+JSON.stringify(f)+"`");i+=(0===p?l.prefix:l.delimiter)+f}}else{if(f=l.asterisk?encodeURI(h).replace(/[?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})):s(h),!t[c].test(f))throw new TypeError('Expected "'+l.name+'" to match "'+l.pattern+'", but received "'+f+'"');i+=l.prefix+f}}else i+=l}return i}}function s(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function c(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function l(e,t){return e.keys=t,e}function f(e){return e.sensitive?"":"i"}function h(e,t,n){r(t)||(n=t||n,t=[]);for(var o=(n=n||{}).strict,i=!1!==n.end,a="",u=0;u<e.length;u++){var c=e[u];if("string"===typeof c)a+=s(c);else{var h=s(c.prefix),p="(?:"+c.pattern+")";t.push(c),c.repeat&&(p+="(?:"+h+p+")*"),a+=p=c.optional?c.partial?h+"("+p+")?":"(?:"+h+"("+p+"))?":h+"("+p+")"}}var d=s(n.delimiter||"/"),m=a.slice(-d.length)===d;return o||(a=(m?a.slice(0,-d.length):a)+"(?:"+d+"(?=$))?"),a+=i?"$":o&&m?"":"(?="+d+"|$)",l(new RegExp("^"+a,f(n)),t)}function p(e,t,n){return r(t)||(n=t||n,t=[]),n=n||{},e instanceof RegExp?function(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return l(e,t)}(e,t):r(e)?function(e,t,n){for(var r=[],o=0;o<e.length;o++)r.push(p(e[o],t,n).source);return l(new RegExp("(?:"+r.join("|")+")",f(n)),t)}(e,t,n):function(e,t,n){return h(i(e,n),t,n)}(e,t,n)}},,function(e,t,n){var r=n(142),o=n(66),i=n(159),a=n(82),u=o((function(e){return i(r(e,1,a,!0))}));e.exports=u},,,,,function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}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(o){return!1}}()?Object.assign:function(e,t){for(var n,u,s=a(e),c=1;c<arguments.length;c++){for(var l in n=Object(arguments[c]))o.call(n,l)&&(s[l]=n[l]);if(r){u=r(n);for(var f=0;f<u.length;f++)i.call(n,u[f])&&(s[u[f]]=n[u[f]])}}return s}},function(e,t,n){var r=n(94),o=n(125),i=n(126),a=n(100),u=n(294),s=n(127),c=200;e.exports=function(e,t,n){var l=-1,f=o,h=e.length,p=!0,d=[],m=d;if(n)p=!1,f=i;else if(h>=c){var y=t?null:u(e);if(y)return s(y);p=!1,f=a,m=new r}else m=t?[]:d;e:for(;++l<h;){var v=e[l],g=t?t(v):v;if(v=n||0!==v?v:0,p&&g===g){for(var b=m.length;b--;)if(m[b]===g)continue e;t&&m.push(g),d.push(v)}else f(m,g,n)||(m!==d&&m.push(g),d.push(v))}return d}},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(78))},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(t){}try{return e+""}catch(t){}}return""}},function(e,t){e.exports=function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}},function(e,t,n){var r=n(58)(n(38),"Set");e.exports=r},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(94),o=n(125),i=n(126),a=n(65),u=n(80),s=n(100),c=200;e.exports=function(e,t,n,l){var f=-1,h=o,p=!0,d=e.length,m=[],y=t.length;if(!d)return m;n&&(t=a(t,u(n))),l?(h=i,p=!1):t.length>=c&&(h=s,p=!1,t=new r(t));e:for(;++f<d;){var v=e[f],g=null==n?v:n(v);if(v=l||0!==v?v:0,p&&g===g){for(var b=y;b--;)if(t[b]===g)continue e;m.push(v)}else h(t,g,l)||m.push(v)}return m}},function(e,t,n){var r=n(167),o=Math.max;e.exports=function(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,u=o(i.length-t,0),s=Array(u);++a<u;)s[a]=i[t+a];a=-1;for(var c=Array(t+1);++a<t;)c[a]=i[a];return c[t]=n(s),r(e,this,c)}}},function(e,t){e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},function(e,t,n){var r=n(295),o=n(297)(r);e.exports=o},function(e,t,n){var r=n(58),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();e.exports=o},function(e,t,n){var r=n(94),o=n(171),i=n(100),a=1,u=2;e.exports=function(e,t,n,s,c,l){var f=n&a,h=e.length,p=t.length;if(h!=p&&!(f&&p>h))return!1;var d=l.get(e);if(d&&l.get(t))return d==t;var m=-1,y=!0,v=n&u?new r:void 0;for(l.set(e,t),l.set(t,e);++m<h;){var g=e[m],b=t[m];if(s)var w=f?s(b,g,m,t,e,l):s(g,b,m,e,t,l);if(void 0!==w){if(w)continue;y=!1;break}if(v){if(!o(t,(function(e,t){if(!i(v,t)&&(g===e||c(g,e,n,s,l)))return v.push(t)}))){y=!1;break}}else if(g!==b&&!c(g,b,n,s,l)){y=!1;break}}return l.delete(e),l.delete(t),y}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},function(e,t,n){var r=n(38).Uint8Array;e.exports=r},function(e,t,n){var r=n(174),o=n(132),i=n(26);e.exports=function(e){return r(e,i,o)}},function(e,t,n){var r=n(131),o=n(20);e.exports=function(e,t,n){var i=t(e);return o(e)?i:r(i,n(e))}},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(310),o=n(83),i=n(20),a=n(84),u=n(102),s=n(103),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),l=!n&&o(e),f=!n&&!l&&a(e),h=!n&&!l&&!f&&s(e),p=n||l||f||h,d=p?r(e.length,String):[],m=d.length;for(var y in e)!t&&!c.call(e,y)||p&&("length"==y||f&&("offset"==y||"parent"==y)||h&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||u(y,m))||d.push(y);return d}},function(e,t,n){var r=n(39);e.exports=function(e){return e===e&&!r(e)}},function(e,t){e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},function(e,t,n){var r=n(323),o=n(180);e.exports=function(e,t){return null!=e&&o(e,t,r)}},function(e,t,n){var r=n(86),o=n(83),i=n(20),a=n(102),u=n(129),s=n(68);e.exports=function(e,t,n){for(var c=-1,l=(t=r(t,e)).length,f=!1;++c<l;){var h=s(t[c]);if(!(f=null!=e&&n(e,h)))break;e=e[h]}return f||++c!=l?f:!!(l=null==e?0:e.length)&&u(l)&&a(h,l)&&(i(e)||o(e))}},function(e,t){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},function(e,t,n){var r=n(106),o=1/0,i=17976931348623157e292;e.exports=function(e){return e?(e=r(e))===o||e===-o?(e<0?-1:1)*i:e===e?e:0:0===e?e:0}},function(e,t,n){var r=n(184),o=n(26);e.exports=function(e,t){return e&&r(e,t,o)}},function(e,t,n){var r=n(327)();e.exports=r},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;
1++n<r&&!1!==t(e[n],n,e););return e}},function(e,t,n){"use strict";var r=n(49),o=n.n(r),i=n(13),a=n.n(i),u="object"===("undefined"===typeof document?"undefined":o()(document))&&null!==document,s="object"===("undefined"===typeof window?"undefined":o()(window))&&null!==window&&window.self===window;t.a=function e(){return a()(e.override)?u&&s:e.override}},function(e,t,n){"use strict";var r=n(149),o=n.n(r),i=n(221),a=n.n(i),u=n(6),s=n.n(u),c=n(13),l=n.n(c),f=n(54),h=n.n(f);t.a=function(e,t){if(h()([t,e],l.a))return!1;if(t.target&&(s()(t.target,"setAttribute","data-suir-click-target",!0),document.querySelector("[data-suir-click-target=true]")))return s()(t.target,"removeAttribute","data-suir-click-target"),e.contains(t.target);var n=t.clientX,r=t.clientY;if(h()([n,r],l.a))return!1;var i=e.getClientRects();if(!e.offsetWidth||!e.offsetHeight||!i||!i.length)return!1;var u=a()(i),c=u.top,f=u.bottom,p=u.left,d=u.right;return!h()([c,f,p,d],l.a)&&(o()(r,c,f+.001)&&o()(n,p,d+.001))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return k}));var r=n(14),o=n.n(r),i=n(9),a=n.n(i),u=n(10),s=n.n(u),c=n(11),l=n.n(c),f=n(8),h=n.n(f),p=n(2),d=n.n(p),m=n(12),y=n.n(m),v=n(1),g=n.n(v),b=n(29),w=n.n(b),E=(n(343),n(73),n(76),n(26),n(345),n(51),n(349),n(6)),_=n.n(E),S=n(0),T=function(e){return"default".concat(e[0].toUpperCase()+e.slice(1))},O=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=t[e];if(void 0!==o)return o;if(r){var i=t[T(e)];if(void 0!==i)return i;if(n){var a=n[e];if(void 0!==a)return a}}return"checked"!==e&&("value"===e?t.multiple?[]:"":void 0)},k=function(e){function t(){var e,n;a()(this,t);for(var r=arguments.length,i=new Array(r),u=0;u<r;u++)i[u]=arguments[u];n=l()(this,(e=h()(t)).call.apply(e,[this].concat(i))),g()(d()(n),"trySetState",(function(e,t){var r=Object.keys(e).reduce((function(t,r){return void 0!==n.props[r]?t:(t[r]=e[r],t)}),{});Object.keys(r).length>0&&n.setState(r,t)}));var s=n.constructor.autoControlledProps,c=_()(d()(n),"getInitialAutoControlledState",n.props)||{},f=s.reduce((function(e,t){return e[t]=O(t,n.props,c,!0),e}),{});return n.state=o()({},c,f),n}return y()(t,e),s()(t,[{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=this.constructor.autoControlledProps.reduce((function(t,n){return!w()(e[n])&&(t[n]=e[n]),t}),{});Object.keys(t).length>0&&this.setState(t)}}]),t}(S.Component)},function(e,t){e.exports=function(e,t,n){return e===e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}},,function(e,t,n){"use strict";n(7);var r=n(112);function o(e){return Object(r.a)(e),null}o.displayName="EventListener",o.propTypes={},o.defaultProps={capture:!1},t.a=o},function(e,t){e.exports=function(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}},function(e,t,n){var r=n(140);e.exports=function(e,t,n){var o=e.length;return n=void 0===n?o:n,!t&&n>=o?e:r(e,t,n)}},function(e,t,n){var r=n(364),o=n(141),i=n(365);e.exports=function(e){return o(e)?i(e):r(e)}},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r=n(370),o={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"},i=function(e,t){if(!e)throw a(t)},a=function(e){return new Error("Firebase Database ("+o.SDK_VERSION+") INTERNAL ASSERT FAILED: "+e)},u=function(e){for(var t=[],n=0,r=0;r<e.length;r++){var o=e.charCodeAt(r);o<128?t[n++]=o:o<2048?(t[n++]=o>>6|192,t[n++]=63&o|128):55296===(64512&o)&&r+1<e.length&&56320===(64512&e.charCodeAt(r+1))?(o=65536+((1023&o)<<10)+(1023&e.charCodeAt(++r)),t[n++]=o>>18|240,t[n++]=o>>12&63|128,t[n++]=o>>6&63|128,t[n++]=63&o|128):(t[n++]=o>>12|224,t[n++]=o>>6&63|128,t[n++]=63&o|128)}return t},s={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"===typeof atob,encodeByteArray:function(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();for(var n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[],o=0;o<e.length;o+=3){var i=e[o],a=o+1<e.length,u=a?e[o+1]:0,s=o+2<e.length,c=s?e[o+2]:0,l=i>>2,f=(3&i)<<4|u>>4,h=(15&u)<<2|c>>6,p=63&c;s||(p=64,a||(h=64)),r.push(n[l],n[f],n[h],n[p])}return r.join("")},encodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(u(e),t)},decodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){for(var t=[],n=0,r=0;n<e.length;){var o=e[n++];if(o<128)t[r++]=String.fromCharCode(o);else if(o>191&&o<224){var i=e[n++];t[r++]=String.fromCharCode((31&o)<<6|63&i)}else if(o>239&&o<365){var a=((7&o)<<18|(63&(i=e[n++]))<<12|(63&(u=e[n++]))<<6|63&e[n++])-65536;t[r++]=String.fromCharCode(55296+(a>>10)),t[r++]=String.fromCharCode(56320+(1023&a))}else{i=e[n++];var u=e[n++];
1t[r++]=String.fromCharCode((15&o)<<12|(63&i)<<6|63&u)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray:function(e,t){this.init_();for(var n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[],o=0;o<e.length;){var i=n[e.charAt(o++)],a=o<e.length?n[e.charAt(o)]:0,u=++o<e.length?n[e.charAt(o)]:64,s=++o<e.length?n[e.charAt(o)]:64;if(++o,null==i||null==a||null==u||null==s)throw Error();var c=i<<2|a>>4;if(r.push(c),64!==u){var l=a<<4&240|u>>2;if(r.push(l),64!==s){var f=u<<6&192|s;r.push(f)}}}return r},init_:function(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(var e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}},c=function(e){try{return s.decodeString(e,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};function l(e,t){if(!(t instanceof Object))return t;switch(t.constructor){case Date:return new Date(t.getTime());case Object:void 0===e&&(e={});break;case Array:e=[];break;default:return t}for(var n in t)t.hasOwnProperty(n)&&(e[n]=l(e[n],t[n]));return e}var f=function(){function e(){var e=this;this.reject=function(){},this.resolve=function(){},this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n}))}return e.prototype.wrapCallback=function(e){var t=this;return function(n,r){n?t.reject(n):t.resolve(r),"function"===typeof e&&(t.promise.catch((function(){})),1===e.length?e(n):e(n,r))}},e}();function h(){return"undefined"!==typeof navigator&&"string"===typeof navigator.userAgent?navigator.userAgent:""}var p="FirebaseError",d=function(e){function t(n,r){var o=e.call(this,r)||this;return o.code=n,o.name=p,Object.setPrototypeOf(o,t.prototype),Error.captureStackTrace&&Error.captureStackTrace(o,m.prototype.create),o}return r.__extends(t,e),t}(Error),m=function(){function e(e,t,n){this.service=e,this.serviceName=t,this.errors=n}return e.prototype.create=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=t[0]||{},o=this.service+"/"+e,i=this.errors[e],a=i?y(i,r):"Error",u=this.serviceName+": "+a+" ("+o+").",s=new d(o,u),c=0,l=Object.keys(r);c<l.length;c++){var f=l[c];"_"!==f.slice(-1)&&(f in s&&console.warn('Overwriting FirebaseError base field "'+f+'" can cause unexpected behavior.'),s[f]=r[f])}return s},e}();function y(e,t){return e.replace(v,(function(e,n){var r=t[n];return null!=r?r.toString():"<"+n+"?>"}))}var v=/\{\$([^}]+)}/g;function g(e){return JSON.parse(e)}var b=function(e){var t={},n={},r={},o="";try{var i=e.split(".");t=g(c(i[0])||""),n=g(c(i[1])||""),o=i[2],r=n.d||{},delete n.d}catch(a){}return{header:t,claims:n,data:r,signature:o}};var w=function(){function e(){this.chain_=[],this.buf_=[],this.W_=[],this.pad_=[],this.inbuf_=0,this.total_=0,this.blockSize=64,this.pad_[0]=128;for(var e=1;e<this.blockSize;++e)this.pad_[e]=0;this.reset()}return e.prototype.reset=function(){this.chain_[0]=1732584193,this.chain_[1]=4023233417,this.chain_[2]=2562383102,this.chain_[3]=271733878,this.chain_[4]=3285377520,this.inbuf_=0,this.total_=0},e.prototype.compress_=function(e,t){t||(t=0);var n=this.W_;if("string"===typeof e)for(var r=0;r<16;r++)n[r]=e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|e.charCodeAt(t+3),t+=4;else for(r=0;r<16;r++)n[r]=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3],t+=4;for(r=16;r<80;r++){var o=n[r-3]^n[r-8]^n[r-14]^n[r-16];n[r]=4294967295&(o<<1|o>>>31)}var i,a,u=this.chain_[0],s=this.chain_[1],c=this.chain_[2],l=this.chain_[3],f=this.chain_[4];for(r=0;r<80;r++){r<40?r<20?(i=l^s&(c^l),a=1518500249):(i=s^c^l,a=1859775393):r<60?(i=s&c|l&(s|c),a=2400959708):(i=s^c^l,a=3395469782);o=(u<<5|u>>>27)+i+f+a+n[r]&4294967295;f=l,l=c,c=4294967295&(s<<30|s>>>2),s=u,u=o}this.chain_[0]=this.chain_[0]+u&4294967295,this.chain_[1]=this.chain_[1]+s&4294967295,this.chain_[2]=this.chain_[2]+c&4294967295,this.chain_[3]=this.chain_[3]+l&4294967295,this.chain_[4]=this.chain_[4]+f&4294967295},e.prototype.update=function(e,t){if(null!=e){void 0===t&&(t=e.length);for(var n=t-this.blockSize,r=0,o=this.buf_,i=this.inbuf_;r<t;){if(0===i)for(;r<=n;)this.compress_(e,r),r+=this.blockSize;if("string"===typeof e){for(;r<t;)if(o[i]=e.charCodeAt(r),++r,++i===this.blockSize){this.compress_(o),i=0;break}}else for(;r<t;)if(o[i]=e[r],++r,++i===this.blockSize){this.compress_(o),i=0;break}}this.inbuf_=i,this.total_+=t}},e.prototype.digest=function(){var e=[],t=8*this.total_;this.inbuf_<56?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(var n=this.blockSize-1;n>=56;n--)this.buf_[n]=255&t,t/=256;this.compress_(this.buf_);var r=0;for(n=0;n<5;n++)for(var o=24;o>=0;o-=8)e[r]=this.chain_[n]>>o&255,++r;return e},e}();var E=function(){function e(e,t){var n=this;this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Prom
1ise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then((function(){e(n)})).catch((function(e){n.error(e)}))}return e.prototype.next=function(e){this.forEachObserver((function(t){t.next(e)}))},e.prototype.error=function(e){this.forEachObserver((function(t){t.error(e)})),this.close(e)},e.prototype.complete=function(){this.forEachObserver((function(e){e.complete()})),this.close()},e.prototype.subscribe=function(e,t,n){var r,o=this;if(void 0===e&&void 0===t&&void 0===n)throw new Error("Missing Observer.");void 0===(r=function(e,t){if("object"!==typeof e||null===e)return!1;for(var n=0,r=t;n<r.length;n++){var o=r[n];if(o in e&&"function"===typeof e[o])return!0}return!1}(e,["next","error","complete"])?e:{next:e,error:t,complete:n}).next&&(r.next=_),void 0===r.error&&(r.error=_),void 0===r.complete&&(r.complete=_);var i=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then((function(){try{o.finalError?r.error(o.finalError):r.complete()}catch(e){}})),this.observers.push(r),i},e.prototype.unsubscribeOne=function(e){void 0!==this.observers&&void 0!==this.observers[e]&&(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))},e.prototype.forEachObserver=function(e){if(!this.finalized)for(var t=0;t<this.observers.length;t++)this.sendOne(t,e)},e.prototype.sendOne=function(e,t){var n=this;this.task.then((function(){if(void 0!==n.observers&&void 0!==n.observers[e])try{t(n.observers[e])}catch(r){"undefined"!==typeof console&&console.error&&console.error(r)}}))},e.prototype.close=function(e){var t=this;this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then((function(){t.observers=void 0,t.onNoObservers=void 0})))},e}();function _(){}function S(e,t,n){var r="";switch(t){case 1:r=n?"first":"First";break;case 2:r=n?"second":"Second";break;case 3:r=n?"third":"Third";break;case 4:r=n?"fourth":"Fourth";break;default:throw new Error("errorPrefix called with argumentNumber > 4. Need to update it?")}var o=e+" failed: ";return o+=r+" argument "}t.CONSTANTS=o,t.Deferred=f,t.ErrorFactory=m,t.FirebaseError=d,t.Sha1=w,t.assert=i,t.assertionError=a,t.async=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];Promise.resolve(!0).then((function(){e.apply(void 0,n)})).catch((function(e){t&&t(e)}))}},t.base64=s,t.base64Decode=c,t.base64Encode=function(e){var t=u(e);return s.encodeByteArray(t,!0)},t.contains=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.createSubscribe=function(e,t){var n=new E(e,t);return n.subscribe.bind(n)},t.decode=b,t.deepCopy=function(e){return l(void 0,e)},t.deepExtend=l,t.errorPrefix=S,t.getUA=h,t.isAdmin=function(e){var t=b(e).claims;return"object"===typeof t&&!0===t.admin},t.isBrowser=function(){return"object"===typeof self&&self.self===self},t.isEmpty=function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0},t.isMobileCordova=function(){return"undefined"!==typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(h())},t.isNode=function(){try{return"[object process]"===Object.prototype.toString.call(e.process)}catch(t){return!1}},t.isNodeSdk=function(){return!0===o.NODE_CLIENT||!0===o.NODE_ADMIN},t.isReactNative=function(){return"object"===typeof navigator&&"ReactNative"===navigator.product},t.isValidFormat=function(e){var t=b(e).claims;return!!t&&"object"===typeof t&&t.hasOwnProperty("iat")},t.isValidTimestamp=function(e){var t=b(e).claims,n=Math.floor((new Date).getTime()/1e3),r=0,o=0;return"object"===typeof t&&(t.hasOwnProperty("nbf")?r=t.nbf:t.hasOwnProperty("iat")&&(r=t.iat),o=t.hasOwnProperty("exp")?t.exp:r+86400),!!n&&!!r&&!!o&&n>=r&&n<=o},t.issuedAtTime=function(e){var t=b(e).claims;return"object"===typeof t&&t.hasOwnProperty("iat")?t.iat:null},t.jsonEval=g,t.map=function(e,t,n){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=t.call(n,e[o],o,e));return r},t.querystring=function(e){for(var t=[],n=function(e,n){Array.isArray(n)?n.forEac
1h((function(n){t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))})):t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))},r=0,o=Object.entries(e);r<o.length;r++){var i=o[r];n(i[0],i[1])}return t.length?"&"+t.join("&"):""},t.querystringDecode=function(e){var t={};return e.replace(/^\?/,"").split("&").forEach((function(e){if(e){var n=e.split("=");t[n[0]]=n[1]}})),t},t.safeGet=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0},t.stringLength=function(e){for(var t=0,n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t++:r<2048?t+=2:r>=55296&&r<=56319?(t+=4,n++):t+=3}return t},t.stringToByteArray=function(e){for(var t=[],n=0,r=0;r<e.length;r++){var o=e.charCodeAt(r);if(o>=55296&&o<=56319){var a=o-55296;i(++r<e.length,"Surrogate pair missing trail surrogate."),o=65536+(a<<10)+(e.charCodeAt(r)-56320)}o<128?t[n++]=o:o<2048?(t[n++]=o>>6|192,t[n++]=63&o|128):o<65536?(t[n++]=o>>12|224,t[n++]=o>>6&63|128,t[n++]=63&o|128):(t[n++]=o>>18|240,t[n++]=o>>12&63|128,t[n++]=o>>6&63|128,t[n++]=63&o|128)}return t},t.stringify=function(e){return JSON.stringify(e)},t.validateArgCount=function(e,t,n,r){var o;if(r<t?o="at least "+t:r>n&&(o=0===n?"none":"no more than "+n),o)throw new Error(e+" failed: Was called with "+r+(1===r?" argument.":" arguments.")+" Expects "+o+".")},t.validateCallback=function(e,t,n,r){if((!r||n)&&"function"!==typeof n)throw new Error(S(e,t,r)+"must be a valid function.")},t.validateContextObject=function(e,t,n,r){if((!r||n)&&("object"!==typeof n||null===n))throw new Error(S(e,t,r)+"must be a valid context object.")},t.validateNamespace=function(e,t,n,r){if((!r||n)&&"string"!==typeof n)throw new Error(S(e,t,r)+"must be a valid firebase namespace.")}}).call(this,n(78))},function(e,t,n){"use strict";n.r(t),n.d(t,"LogLevel",(function(){return r})),n.d(t,"Logger",(function(){return u})),n.d(t,"setLogLevel",(function(){return s}));var r,o=[];!function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"}(r||(r={}));var i=r.INFO,a=function(e,t){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];if(!(t<e.logLevel)){var i=(new Date).toISOString();switch(t){case r.DEBUG:case r.VERBOSE:console.log.apply(console,["["+i+"] "+e.name+":"].concat(n));break;case r.INFO:console.info.apply(console,["["+i+"] "+e.name+":"].concat(n));break;case r.WARN:console.warn.apply(console,["["+i+"] "+e.name+":"].concat(n));break;case r.ERROR:console.error.apply(console,["["+i+"] "+e.name+":"].concat(n));break;default:throw new Error("Attempted to log a message with an invalid logType (value: "+t+")")}}},u=function(){function e(e){this.name=e,this._logLevel=i,this._logHandler=a,o.push(this)}return Object.defineProperty(e.prototype,"logLevel",{get:function(){return this._logLevel},set:function(e){if(!(e in r))throw new TypeError("Invalid value assigned to `logLevel`");this._logLevel=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"logHandler",{get:function(){return this._logHandler},set:function(e){if("function"!==typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e},enumerable:!0,configurable:!0}),e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._logHandler.apply(this,[this,r.DEBUG].concat(e))},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._logHandler.apply(this,[this,r.VERBOSE].concat(e))},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._logHandler.apply(this,[this,r.INFO].concat(e))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._logHandler.apply(this,[this,r.WARN].concat(e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._logHandler.apply(this,[this,r.ERROR].concat(e))},e}();function s(e){o.forEach((function(t){t.logLevel=e}))}},function(e,t,n){var r=n(107),o=n(86),i=n(102),a=n(39),u=n(68);e.exports=function(e,t,n,s){if(!a(e))return e;for(var c=-1,l=(t=o(t,e)).length,f=l-1,h=e;null!=h&&++c<l;){var p=u(t[c]),d=n;if(c!=f){var m=h[p];void 0===(d=s?s(m,p,h):void 0)&&(d=a(m)?m:i(t[c+1])?[]:{})}r(h,p,d),h=h[p]}return e}},function(e,t,n){"use strict";t.a=function(e,t){return"number"===typeof e||"string"===typeof e?e:e[t]}},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"===typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"===typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var s,c=[],l=!1,f=-1;function h(){l&&s&&(l=!1,s.length?c=s.concat(c):f=-1,c.length&&p())}function p(){if(!l){var e=u(h);l=!0;for(var t=c.length;t;){for(s=c,c=[];++f<t;)s&&s[f].run();f=-1,t=c.length}s=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);
1if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new d(e,t)),1!==c.length||l||u(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){var r=n(66),o=n(139);e.exports=function(e){return r((function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,u=i>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,u&&o(n[0],n[1],u)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t}))}},function(e,t,n){(function(e){var r=n(38),o=t&&!t.nodeType&&t,i=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=i&&i.exports===o?r.Buffer:void 0,u=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=u?u(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(134)(e))},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},function(e,t,n){var r=n(131),o=n(128),i=n(132),a=n(175),u=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,i(e)),e=o(e);return t}:a;e.exports=u},function(e,t,n){var r=n(144);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},function(e,t,n){var r=n(417),o=n(128),i=n(85);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:r(o(e))}},function(e,t,n){var r=n(88),o=n(79);e.exports=function(e,t,n){(void 0===n||o(e[t],n))&&(void 0!==n||t in e)||r(e,t,n)}},function(e,t){e.exports=function(e,t){if(("constructor"!==t||"function"!==typeof e[t])&&"__proto__"!=t)return e[t]}},function(e,t,n){"use strict";function r(e){return(r="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})(e)}function o(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}Object.defineProperty(t,"__esModule",{value:!0}),t.CloudinaryContextType=void 0;var i=(0,function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var u=i?Object.getOwnPropertyDescriptor(e,a):null;u&&(u.get||u.set)?Object.defineProperty(n,a,u):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)).createContext)();t.CloudinaryContextType=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"debounce",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"firstDefined",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"closestAbove",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"requestAnimationFrame",{enumerable:!0,get:function(){return a.requestAnimationFrame}}),Object.defineProperty(t,"cancelAnimationFrame",{enumerable:!0,get:function(){return a.cancelAnimationFrame}}),Object.defineProperty(t,"isElement",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"extractCloudinaryProps",{enumerable:!0,get:function(){return s.default}});var r=c(n(432)),o=c(n(433)),i=c(n(434)),a=n(435),u=c(n(436)),s=c(n(437));function c(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},function(e,t,n){"use strict";var r=n(32);function o(e){return encodeURIComponent(e).replace(/%40/gi,"@").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 i;if(n)i=n(t);else if(r.isURLSearchParams(t))i=t.toString();else{var a=[];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)),a.push(o(t)+"="+o(e))})))})),i=a.join("&")}if(i){var u=e.indexOf("#");-1!==u&&(e=e.slice(0,u)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){"use strict";(function(t){var r=n(32),o=n(448),i={"Content-Type":"application/x-www-form-urlencoded"};function a(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var u={adapter:function(){var e;return"undefined"!==typeof t&&"[object process]"===Object.prototype.toString.call(t)?e=n(214):"undefined"!==typeof XMLHttpRequest&&(e=n(214)),e}(),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)?(a(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"===typeof e)try{e=JSON.parse(e)}catch(t){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,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(i)})),e.exports=u}).call(this,n(199))},function(e,t,n){"use strict";var r=n(32),o=n(449),i=n(211),a=n(451),u=n(452),s=n(215);e.exports=function(e){return new Promise((function(t,c){var l=e.data,f=e.headers;r.isFormData(l)&&delete f["Content-Type"];var h=new XMLHttpRequest;if(e.auth){var p=e.auth.username||"",d=e.auth.password||"";f.Authorization="Basic "+btoa(p+":"+d)}if(h.open(e.method.toUpperCase(),i(e.url,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,h.onreadystatechange=function(){if(h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in h?a(h.getAllResponseHeaders()):null,r={data:e.responseType&&"text"!==e.responseType?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:n,config:e,request:h};o(t,c,r),h=null}},h.onabort=function(){h&&(c(s("Request aborted",e,"ECONNABORTED",h)),h=null)},h.onerror=function(){c(s("Network Error",e,null,h)),h=null},h.ontimeout=function(){c(s("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",h)),h=null},r.isStandardBrowserEnv()){var m=n(453),y=(e.withCredentials||u(e.url))&&e.xsrfCookieName?m.read(e.xsrfCookieName):void 0;y&&(f[e.xsrfHeaderName]=y)}if("setRequestHeader"in h&&r.forEach(f,(function(e,t){"undefined"===typeof l&&"content-type"===t.toLowerCase()?delete f[t]:h.setRequestHeader(t,e)})),e.withCredentials&&(h.withCredentials=!0),e.responseType)try{h.responseType=e.responseType}catch(v){if("json"!==e.responseType)throw v}"function"===typeof e.onDownloadProgress&&h.addEventListener("progress",e.onDownloadProgress),"function"===typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){h&&(h.abort(),c(e),h=null)})),void 0===l&&(l=null),h.send(l)}))}},function(e,t,n){"use strict";var r=n(450);e.exports=function(e,t,n,o,i){var a=new Error(e);return r(a,t,n,o,i)}},function(e,t,n){"use strict";var r=n(32);e.exports=function(e,t){t=t||{};var n={};return r.forEach(["url","method","params","data"],(function(e){"undefined"!==typeof t[e]&&(n[e]=t[e])})),r.forEach(["headers","auth","proxy"],(function(o){r.isObject(t[o])?n[o]=r.deepMerge(e[o],t[o]):"undefined"!==typeof t[o]?n[o]=t[o]:r.isObject(e[o])?n[o]=r.deepMerge(e[o]):"undefined"!==typeof e[o]&&(n[o]=e[o])})),r.forEach(["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"],(function(r){"undefined"!==typeof t[r]?n[r]=t[r]:"undefined"!==typeof e[r]&&(n[r]=e[r])})),n}},function(e,t,n){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")}
1,r.prototype.__CANCEL__=!0,e.exports=r},,function(e,t,n){var r=n(47),o=n(31),i="[object Number]";e.exports=function(e){return"number"==typeof e||o(e)&&r(e)==i}},function(e,t,n){var r=n(47),o=n(31),i="[object Boolean]";e.exports=function(e){return!0===e||!1===e||o(e)&&r(e)==i}},function(e,t,n){e.exports=n(341)},,,function(e,t,n){"use strict";(function(t){var n="__global_unique_id__";e.exports=function(){return t[n]=(t[n]||0)+1}}).call(this,n(78))},function(e,t,n){"use strict";var r=n(111),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},u={};function s(e){return r.isMemo(e)?a:u[e.$$typeof]||o}u[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0};var c=Object.defineProperty,l=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,d=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(d){var o=p(n);o&&o!==d&&e(t,o,r)}var a=l(n);f&&(a=a.concat(f(n)));for(var u=s(t),m=s(n),y=0;y<a.length;++y){var v=a[y];if(!i[v]&&(!r||!r[v])&&(!m||!m[v])&&(!u||!u[v])){var g=h(n,v);try{c(t,v,g)}catch(b){}}}return t}return t}},,function(e,t,n){"use strict";n.d(t,"documentRef",(function(){return r}));var r={current:"undefined"===typeof document?null:document};"undefined"===typeof window||window},function(e,t,n){var r=n(355),o=n(362),i=r((function(e,t,n){return e+(n?" ":"")+o(t)}));e.exports=i},function(e,t,n){var r=n(197);e.exports=function(e,t,n){return null==e?e:r(e,t,n)}},function(e,t,n){var r=n(375);function o(t,n,i){return"undefined"!==typeof Reflect&&Reflect.get?e.exports=o=Reflect.get:e.exports=o=function(e,t,n){var o=r(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(n):i.value}},o(t,n,i||t)}e.exports=o},function(e,t,n){var r=n(376),o=n(377),i=n(48),a=n(20),u=n(139);e.exports=function(e,t,n){var s=a(e)?r:o;return n&&u(e,t,n)&&(t=void 0),s(e,i(t,3))}},function(e,t,n){var r=n(192),o=n(59),i=n(48),a=n(378),u=n(20);e.exports=function(e,t,n){var s=u(e)?r:a,c=arguments.length<3;return s(e,i(t,4),n,c,o)}},function(e,t,n){var r=n(53),o=/[\\^$.*+?()[\]{}|]/g,i=RegExp(o.source);e.exports=function(e){return(e=r(e))&&i.test(e)?e.replace(o,"\\$&"):e}},function(e,t,n){var r=n(379),o=n(381)((function(e,t){return null==e?{}:r(e,t)}));e.exports=o},function(e,t,n){var r=n(140),o=n(87);e.exports=function(e,t,n){var i=null==e?0:e.length;return i?(t=n||void 0===t?1:o(t),r(e,0,(t=i-t)<0?0:t)):[]}},function(e,t,n){var r=n(136),o=n(67),i=n(40),a=n(89),u=n(384),s="[object Map]",c="[object Set]";e.exports=function(e){if(null==e)return 0;if(i(e))return a(e)?u(e):e.length;var t=o(e);return t==s||t==c?e.size:r(e).length}},function(e,t,n){var r=n(130);e.exports=function(e,t){return r(e,t)}},function(e,t,n){var r=n(88),o=n(183),i=n(48);e.exports=function(e,t){var n={};return t=i(t,3),o(e,(function(e,o,i){r(n,o,t(e,o,i))})),n}},function(e,t,n){var r=n(88),o=n(387)((function(e,t,n){r(e,n,t)}));e.exports=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),a=c(i),u=c(n(391)),s=c(n(394));function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function f(e){return/(?:\.([^.]+))?$/.exec(e)[0]}var h=function(e){function t(){var e,n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=l(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.uploadTasks=[],r.handleFileSelection=function(e){for(var t=e.target.files,n=0;n<t.length;n++)r.startUpload(t[n])},l(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)}
1(t,e),o(t,[{key:"componentWillUnmount",value:function(){this.cancelRunningUploads()}},{key:"cancelRunningUploads",value:function(){for(;this.uploadTasks.length>0;){var e=this.uploadTasks.pop();"running"===e.snapshot.state&&e.cancel()}}},{key:"removeTask",value:function(e){for(var t=0;t<this.uploadTasks.length;t++)if(this.uploadTasks[t]===e)return void this.uploadTasks.splice(t,1)}},{key:"startUpload",value:function(e){var t=this,n=this.props,r=n.onUploadStart,o=n.onProgress,i=n.onUploadError,a=n.onUploadSuccess,c=n.storageRef,l=n.metadata,h=n.randomizeFilename,p=n.filename,d=void 0;f(d=p?"function"===typeof p?p(e):p:h?(0,u.default)():e.name)||(d+=f(e.name)),Promise.resolve().then((function(){return e.type.match(/image.*/)&&(t.props.maxWidth||t.props.maxHeight)?(0,s.default)(e,t.props.maxWidth,t.props.maxHeight):e})).then((function(e){var n=c.child(d).put(e,l);r&&r(e,n),n.on("state_changed",(function(e){return o&&o(Math.round(100*e.bytesTransferred/e.totalBytes),n)}),(function(e){return i&&i(e,n)}),(function(){return t.removeTask(n),a&&a(n.snapshot.metadata.name,n)})),t.uploadTasks.push(n)}))}},{key:"render",value:function(){var e=this.props,t=(e.storageRef,e.onUploadStart,e.onProgress,e.onUploadSuccess,e.onUploadError,e.randomizeFilename,e.metadata,e.filename,e.maxWidth,e.maxHeight,e.hidden),n=e.as,o=void 0===n?"input":n,i=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["storageRef","onUploadStart","onProgress","onUploadSuccess","onUploadError","randomizeFilename","metadata","filename","maxWidth","maxHeight","hidden","as"]),u=t?Object.assign({},i.style,{width:"0.1px",height:"0.1px",opacity:0,overflow:"hidden",position:"absolute",zIndex:-1}):i.style;return a.default.createElement(o,r({type:"file",onChange:this.handleFileSelection},i,{style:u}))}}]),t}(i.Component);t.default=h},function(e,t,n){var r=n(396)("round");e.exports=r},function(e,t,n){var r=n(189),o=n(106);e.exports=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=o(n))===n?n:0),void 0!==t&&(t=(t=o(t))===t?t:0),r(o(e),t,n)}},function(e,t,n){e.exports=n(442)},function(e,t,n){"use strict";var r=n(3),o=n.n(r),i=n(50),a=n.n(i),u=n(13),s=n.n(u),c=n(4),l=n.n(c),f=(n(7),n(0)),h=n.n(f),p=n(23),d=n(92),m=n(69),y=n(93),v=n(5),g=n(145),b=n(9),w=n.n(b),E=n(10),_=n.n(E),S=n(11),T=n.n(S),O=n(8),k=n.n(O),C=n(2),x=n.n(C),A=n(12),I=n.n(A),N=n(1),D=n.n(N),P=n(186),R=n(14),j=n.n(R),M=n(6),L=n.n(M),U=n(30),F=n.n(U),B=n(57),q=n(460),V=n(22),z=n.n(V),W=n(187),Q=n(188),G=n(62),K=function(e){function t(){var e,n;w()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=T()(this,(e=k()(t)).call.apply(e,[this].concat(o))),D()(x()(n),"handleRef",(function(e){Object(B.a)(n.props.innerRef,e)})),n}return I()(t,e),_()(t,[{key:"componentDidMount",value:function(){L()(this.props,"onMount",null,this.props)}},{key:"componentWillUnmount",value:function(){L()(this.props,"onUnmount",null,this.props)}},{key:"render",value:function(){if(!Object(P.a)())return null;var e=this.props,t=e.children,n=e.mountNode,r=void 0===n?document.body:n;return Object(G.createPortal)(h.a.createElement(q.a,{innerRef:this.handleRef},t),r)}}]),t}(f.Component);D()(K,"handledProps",["children","innerRef","mountNode","onMount","onUnmount"]),K.propTypes={};var H=K,Y=function(e){function t(){var e,n;w()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=T()(this,(e=k()(t)).call.apply(e,[this].concat(o))),D()(x()(n),"contentRef",Object(f.createRef)()),D()(x()(n),"triggerRef",Object(f.createRef)()),D()(x()(n),"latestDocumentMouseDownEvent",null),D()(x()(n),"handleDocumentMouseDown",(function(e){n.latestDocumentMouseDownEvent=e})),D()(x()(n),"handleDocumentClick",(function(e){var t=n.props.closeOnDocumentClick,r=n.latestDocumentMouseDownEvent;n.latestDocumentMouseDownEvent=null,!n.contentRef.current||Object(W.a)(n.triggerRef.current,e)||r&&Object(W.a)(n.contentRef.current,r)||Object(W.a)(n.contentRef.current,e)||t&&n.close(e)})),D()(x()(n),"handleEscape",(function(e){n.props.closeOnEscape&&z.a.getCode(e)===z.a.Escape&&n.close(e)})),D()(x()(n),"handlePortalMouseLeave",(function(e){var t=n.props,r=t.closeOnPortalMouseLeave,o=t.mouseLeaveDelay;r&&e.target===n.contentRef.current&&(n.mouseLeaveTimer=n.closeWithTimeout(e,o))})),D()(x()(n),"handlePortalMouseEnter",(function(){n.props.closeOnPortalMouseLeave&&clearTimeout(n.mouseLeaveTimer)})),D()(x()(n),"handleTriggerBlur",(function(e){for(var t=n.props,r=t.trigger,o=t.closeOnTriggerBlur,i=arguments.length,a=new Array(i>1?i-1:0),u=1;u<i;u++)a[u-1]=arguments[u];L.a.apply(void 0,[r,"props.onBlur",e].concat(a));var s=e.relatedTarget||document.activeElement,c=L()(n.contentRef.current,"contains",s);o&&!c&&n.close(e)})),D()(x()(n),"handleTriggerClick",(function(e){for(var t=n.props,r=t.trigger,o=t.closeOnTriggerClick,i=t.openOnTriggerClick,a=n.state.open,u=arguments.length,s=new Array(u>1?u-1:0),c=1;c<u;c++)s[c-1]=arguments[c];L.a.apply(void 0,[r,"props.onClick",e].concat(s)),a&&o?n.close(e):!a&&i&&n.open(e)})),D()(x()(n),"handleTriggerFocus",(function(e){for(var t=n.props,r=t.trigger,o=t.openOnTriggerFocus,i=arguments.length,a=new Array(i>1?i-1:0),u=1;u<i;u++)a[u-1]=arguments[u];L.a.apply(void 0,[r,"props.onFocus",e].concat(a)),o&&n.open(e)})),D()(x()(n),"handleTriggerMouseLeave",(function(e){clearTimeout(n.mouseEnterTimer);for(var t=n.props,r=t.trigger,o=t.closeOnTriggerMouseLeave,i=t.mouseLeaveDelay,a=arguments.length,u=new Array(a>1?a-1:0),s=1;s<a;s++)u[s-1]=arguments[s];L.a.apply(void 0,[r,"props.onMouseLeave",e].concat(u)),o&&(n.mouseLeaveTimer=n.closeWithTimeout(e,i
1))})),D()(x()(n),"handleTriggerMouseEnter",(function(e){clearTimeout(n.mouseLeaveTimer);for(var t=n.props,r=t.trigger,o=t.mouseEnterDelay,i=t.openOnTriggerMouseEnter,a=arguments.length,u=new Array(a>1?a-1:0),s=1;s<a;s++)u[s-1]=arguments[s];L.a.apply(void 0,[r,"props.onMouseEnter",e].concat(u)),i&&(n.mouseEnterTimer=n.openWithTimeout(e,o))})),D()(x()(n),"open",(function(e){var t=n.props.onOpen;t&&t(e,n.props),n.trySetState({open:!0})})),D()(x()(n),"openWithTimeout",(function(e,t){var r=j()({},e);return setTimeout((function(){return n.open(r)}),t||0)})),D()(x()(n),"close",(function(e){var t=n.props.onClose;t&&t(e,n.props),n.trySetState({open:!1})})),D()(x()(n),"closeWithTimeout",(function(e,t){var r=j()({},e);return setTimeout((function(){return n.close(r)}),t||0)})),D()(x()(n),"handleMount",(function(){L()(n.props,"onMount",null,n.props)})),D()(x()(n),"handleUnmount",(function(){L()(n.props,"onUnmount",null,n.props)})),D()(x()(n),"handleTriggerRef",(function(e){n.triggerRef.current=e,Object(B.a)(n.props.triggerRef,e)})),n}return I()(t,e),_()(t,[{key:"componentWillUnmount",value:function(){clearTimeout(this.mouseEnterTimer),clearTimeout(this.mouseLeaveTimer)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.eventPool,r=e.mountNode,o=e.trigger,i=this.state.open;return h.a.createElement(f.Fragment,null,i&&h.a.createElement(f.Fragment,null,h.a.createElement(H,{innerRef:this.contentRef,mountNode:r,onMount:this.handleMount,onUnmount:this.handleUnmount},t),h.a.createElement(F.a,{name:"mouseleave",on:this.handlePortalMouseLeave,pool:n,target:this.contentRef}),h.a.createElement(F.a,{name:"mouseenter",on:this.handlePortalMouseEnter,pool:n,target:this.contentRef}),h.a.createElement(F.a,{name:"mousedown",on:this.handleDocumentMouseDown,pool:n}),h.a.createElement(F.a,{name:"click",on:this.handleDocumentClick,pool:n}),h.a.createElement(F.a,{name:"keydown",on:this.handleEscape,pool:n})),o&&h.a.createElement(q.a,{innerRef:this.handleTriggerRef},Object(f.cloneElement)(o,{onBlur:this.handleTriggerBlur,onClick:this.handleTriggerClick,onFocus:this.handleTriggerFocus,onMouseLeave:this.handleTriggerMouseLeave,onMouseEnter:this.handleTriggerMouseEnter})))}}]),t}(Q.a);D()(Y,"defaultProps",{closeOnDocumentClick:!0,closeOnEscape:!0,eventPool:"default",openOnTriggerClick:!0}),D()(Y,"autoControlledProps",["open"]),D()(Y,"Inner",H),D()(Y,"handledProps",["children","closeOnDocumentClick","closeOnEscape","closeOnPortalMouseLeave","closeOnTriggerBlur","closeOnTriggerClick","closeOnTriggerMouseLeave","defaultOpen","eventPool","mountNode","mouseEnterDelay","mouseLeaveDelay","onClose","onMount","onOpen","onUnmount","open","openOnTriggerClick","openOnTriggerFocus","openOnTriggerMouseEnter","trigger","triggerRef"]),Y.propTypes={};var $=Y;function X(e){var t=e.blurring,n=e.className,r=e.children,i=e.content,a=e.dimmed,u=l()(Object(p.a)(t,"blurring"),Object(p.a)(a,"dimmed"),"dimmable",n),s=Object(d.a)(X,e),c=Object(y.a)(X,e);return h.a.createElement(c,o()({},s,{className:u}),v.b.isNil(r)?i:r)}X.handledProps=["as","blurring","children","className","content","dimmed"],X.propTypes={};var J=X,Z=function(e){function t(){var e,n;w()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=T()(this,(e=k()(t)).call.apply(e,[this].concat(o))),D()(x()(n),"containerRef",Object(f.createRef)()),D()(x()(n),"contentRef",Object(f.createRef)()),D()(x()(n),"handleClick",(function(e){var t=n.contentRef.current;L()(n.props,"onClick",e,n.props),t&&t!==e.target&&Object(W.a)(t,e)||L()(n.props,"onClickOutside",e,n.props)})),n}return I()(t,e),_()(t,[{key:"componentDidMount",value:function(){var e=this.props.active;this.toggleStyles(e)}},{key:"componentDidUpdate",value:function(e){var t=this.props.active;e.active!==t&&this.toggleStyles(t)}},{key:"toggleStyles",value:function(e){var t=this.containerRef.current;t&&t.style&&(e?t.style.setProperty("display","flex","important"):t.style.removeProperty("display"))}},{key:"render",value:function(){var e=this.props,n=e.active,r=e.children,i=e.className,a=e.content,u=e.disabled,s=e.inverted,c=e.page,f=e.simple,m=e.verticalAlign,g=l()("ui",Object(p.a)(n,"active transition visible"),Object(p.a)(u,"disabled"),Object(p.a)(s,"inverted"),Object(p.a)(c,"page"),Object(p.a)(f,"simple"),Object(p.f)(m),"dimmer",i),b=Object(d.a)(t,this.props),w=Object(y.a)(t,this.props),E=v.b.isNil(r)?a:r;return h.a.createElement(q.a,{innerRef:this.containerRef},h.a.createElement(w,o()({},b,{className:g,onClick:this.handleClick}),E&&h.a.createElement("div",{className:"content",ref:this.contentRef},E)))}}]),t}(f.Component);D()(Z,"handledProps",["active","as","children","className","content","disabled","inverted","onClick","onClickOutside","page","simple","verticalAlign"]),Z.propTypes={};var ee=function(e){function t(){var e,n;w()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=T()(this,(e=k()(t)).call.apply(e,[this].concat(o))),D()(x()(n),"handlePortalMount",(function(){Object(P.a)()&&(document.body.classList.add("dimmed"),document.body.classList.add("dimmable"))})),D()(x()(n),"handlePortalUnmount",(function(){Object(P.a)()&&(document.body.classList.remove("dimmed"),document.body.classList.remove("dimmable"))})),n}
1return I()(t,e),_()(t,[{key:"render",value:function(){var e=this.props,n=e.active,r=e.page,i=Object(d.a)(t,this.props);return r?h.a.createElement($,{closeOnEscape:!1,closeOnDocumentClick:!1,onMount:this.handlePortalMount,onUnmount:this.handlePortalUnmount,open:n,openOnTriggerClick:!1},h.a.createElement(Z,o()({},i,{active:n,page:r}))):h.a.createElement(Z,o()({},i,{active:n,page:r}))}}]),t}(f.Component);D()(ee,"Dimmable",J),D()(ee,"Inner",Z),D()(ee,"handledProps",["active","page"]),ee.propTypes={},ee.create=Object(g.f)(ee,(function(e){return{content:e}}));var te=n(116);function ne(e){var t=e.children,n=e.className,r=e.content,i=e.size,a=l()("ui",i,n,"images"),u=Object(d.a)(ne,e),s=Object(y.a)(ne,e);return h.a.createElement(s,o()({},u,{className:a}),v.b.isNil(t)?r:t)}ne.handledProps=["as","children","className","content","size"],ne.propTypes={};var re=ne;function oe(e){var t=e.avatar,n=e.bordered,r=e.centered,i=e.children,u=e.circular,c=e.className,f=e.content,g=e.dimmer,b=e.disabled,w=e.floated,E=e.fluid,_=e.hidden,S=e.href,T=e.inline,O=e.label,k=e.rounded,C=e.size,x=e.spaced,A=e.verticalAlign,I=e.wrapped,N=e.ui,D=l()(Object(p.a)(N,"ui"),C,Object(p.a)(t,"avatar"),Object(p.a)(n,"bordered"),Object(p.a)(u,"circular"),Object(p.a)(r,"centered"),Object(p.a)(b,"disabled"),Object(p.a)(E,"fluid"),Object(p.a)(_,"hidden"),Object(p.a)(T,"inline"),Object(p.a)(k,"rounded"),Object(p.b)(x,"spaced"),Object(p.e)(w,"floated"),Object(p.f)(A,"aligned"),"image",c),P=Object(d.a)(oe,e),R=Object(m.c)(P,{htmlProps:m.a}),j=a()(R,2),M=j[0],L=j[1],U=Object(y.a)(oe,e,(function(){if(!s()(g)||!s()(O)||!s()(I)||!v.b.isNil(i))return"div"}));return v.b.isNil(i)?v.b.isNil(f)?"img"===U?h.a.createElement(U,o()({},L,M,{className:D})):h.a.createElement(U,o()({},L,{className:D,href:S}),ee.create(g,{autoGenerateKey:!1}),te.a.create(O,{autoGenerateKey:!1}),h.a.createElement("img",M)):h.a.createElement(U,o()({},P,{className:D}),f):h.a.createElement(U,o()({},P,{className:D}),i)}oe.handledProps=["as","avatar","bordered","centered","children","circular","className","content","dimmer","disabled","floated","fluid","hidden","href","inline","label","rounded","size","spaced","ui","verticalAlign","wrapped"],oe.Group=re,oe.propTypes={},oe.defaultProps={as:"img",ui:!0},oe.create=Object(g.f)(oe,(function(e){return{src:e}}));t.a=oe},,,,,,,,,,function(e,t,n){"use strict";var r=n(158),o="function"===typeof Symbol&&Symbol.for,i=o?Symbol.for("react.element"):60103,a=o?Symbol.for("react.portal"):60106,u=o?Symbol.for("react.fragment"):60107,s=o?Symbol.for("react.strict_mode"):60108,c=o?Symbol.for("react.profiler"):60114,l=o?Symbol.for("react.provider"):60109,f=o?Symbol.for("react.context"):60110,h=o?Symbol.for("react.forward_ref"):60112,p=o?Symbol.for("react.suspense"):60113,d=o?Symbol.for("react.suspense_list"):60120,m=o?Symbol.for("react.memo"):60115,y=o?Symbol.for("react.lazy"):60116;o&&Symbol.for("react.fundamental"),o&&Symbol.for("react.responder");var v="function"===typeof Symbol&&Symbol.iterator;function g(e){for(var t=e.message,n="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r<arguments.length;r++)n+="&args[]="+encodeURIComponent(arguments[r]);return e.message="Minified React error #"+t+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",e}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w={};function E(e,t,n){this.props=e,this.context=t,this.refs=w,this.updater=n||b}function _(){}function S(e,t,n){this.props=e,this.context=t,this.refs=w,this.updater=n||b}E.prototype.isReactComponent={},E.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw g(Error(85));this.updater.enqueueSetState(this,e,t,"setState")},E.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},_.prototype=E.prototype;var T=S.prototype=new _;T.constructor=S,r(T,E.prototype),T.isPureReactComponent=!0;var O={current:null},k={suspense:null},C={current:null},x=Object.prototype.hasOwnProperty,A={key:!0,ref:!0,__self:!0,__source:!0};function I(e,t,n){var r=void 0,o={},a=null,u=null;if(null!=t)for(r in void 0!==t.ref&&(u=t.ref),void 0!==t.key&&(a=""+t.key),t)x.call(t,r)&&!A.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(1===s)o.children=n;else if(1<s){for(var c=Array(s),l=0;l<s;l++)c[l]=arguments[l+2];o.children=c}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===o[r]&&(o[r]=s[r]);return{$$typeof:i,type:e,key:a,ref:u,props:o,_owner:C.current}}function N(e){return"object"===typeof e&&null!==e&&e.$$typeof===i}var D=/\/+/g,P=[];function R(e,t,n,r){if(P.length){var o=P.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=r,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function j(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>P.length&&P.push(e)}function M(e,t,n){return null==e?0:function e(t,n,r,o){var u=typeof t;"undefined"!==u&&"boolean"!==u||(t=null);var s=!1;if(null===t)s=!0;else switch(u){case"string":case"number":s=!0;break;case"object":switch(t.$$typeof){case i:case a:s=!0}}if(s)return r(o,t,""===n?"."+L(t,0):n),1;if(s=0,n=""===n?".":n+":",Array.isArray(t))for(var c=0;c<t.length;
1c++){var l=n+L(u=t[c],c);s+=e(u,l,r,o)}else if(null===t||"object"!==typeof t?l=null:l="function"===typeof(l=v&&t[v]||t["@@iterator"])?l:null,"function"===typeof l)for(t=l.call(t),c=0;!(u=t.next()).done;)s+=e(u=u.value,l=n+L(u,c++),r,o);else if("object"===u)throw r=""+t,g(Error(31),"[object Object]"===r?"object with keys {"+Object.keys(t).join(", ")+"}":r,"");return s}(e,"",t,n)}function L(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function U(e,t){e.func.call(e.context,t,e.count++)}function F(e,t,n){var r=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?B(e,r,n,(function(e){return e})):null!=e&&(N(e)&&(e=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,o+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(D,"$&/")+"/")+n)),r.push(e))}function B(e,t,n,r,o){var i="";null!=n&&(i=(""+n).replace(D,"$&/")+"/"),M(e,F,t=R(t,i,r,o)),j(t)}function q(){var e=O.current;if(null===e)throw g(Error(321));return e}var V={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return B(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;M(e,U,t=R(null,null,t,n)),j(t)},count:function(e){return M(e,(function(){return null}),null)},toArray:function(e){var t=[];return B(e,t,null,(function(e){return e})),t},only:function(e){if(!N(e))throw g(Error(143));return e}},createRef:function(){return{current:null}},Component:E,PureComponent:S,createContext:function(e,t){return void 0===t&&(t=null),(e={$$typeof:f,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:l,_context:e},e.Consumer=e},forwardRef:function(e){return{$$typeof:h,render:e}},lazy:function(e){return{$$typeof:y,_ctor:e,_status:-1,_result:null}},memo:function(e,t){return{$$typeof:m,type:e,compare:void 0===t?null:t}},useCallback:function(e,t){return q().useCallback(e,t)},useContext:function(e,t){return q().useContext(e,t)},useEffect:function(e,t){return q().useEffect(e,t)},useImperativeHandle:function(e,t,n){return q().useImperativeHandle(e,t,n)},useDebugValue:function(){},useLayoutEffect:function(e,t){return q().useLayoutEffect(e,t)},useMemo:function(e,t){return q().useMemo(e,t)},useReducer:function(e,t,n){return q().useReducer(e,t,n)},useRef:function(e){return q().useRef(e)},useState:function(e){return q().useState(e)},Fragment:u,Profiler:c,StrictMode:s,Suspense:p,unstable_SuspenseList:d,createElement:I,cloneElement:function(e,t,n){if(null===e||void 0===e)throw g(Error(267),e);var o=void 0,a=r({},e.props),u=e.key,s=e.ref,c=e._owner;if(null!=t){void 0!==t.ref&&(s=t.ref,c=C.current),void 0!==t.key&&(u=""+t.key);var l=void 0;for(o in e.type&&e.type.defaultProps&&(l=e.type.defaultProps),t)x.call(t,o)&&!A.hasOwnProperty(o)&&(a[o]=void 0===t[o]&&void 0!==l?l[o]:t[o])}if(1===(o=arguments.length-2))a.children=n;else if(1<o){l=Array(o);for(var f=0;f<o;f++)l[f]=arguments[f+2];a.children=l}return{$$typeof:i,type:e.type,key:u,ref:s,props:a,_owner:c}},createFactory:function(e){var t=I.bind(null,e);return t.type=e,t},isValidElement:N,version:"16.9.0",unstable_withSuspenseConfig:function(e,t){var n=k.suspense;k.suspense=void 0===t?null:t;try{e()}finally{k.suspense=n}},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentDispatcher:O,ReactCurrentBatchConfig:k,ReactCurrentOwner:C,IsSomeRendererActing:{current:!1},assign:r}},z={default:V},W=z&&V||z;e.exports=W.default||W},function(e,t,n){"use strict";var r=n(0),o=n(158),i=n(256);function a(e){for(var t=e.message,n="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r<arguments.length;r++)n+="&args[]="+encodeURIComponent(arguments[r]);return e.message="Minified React error #"+t+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",e}if(!r)throw a(Error(227));var u=null,s={};function c(){if(u)for(var e in s){var t=s[e],n=u.indexOf(e);if(!(-1<n))throw a(Error(96),e);if(!f[n]){if(!t.extractEvents)throw a(Error(97),e);for(var r in f[n]=t,n=t.eventTypes){var o=void 0,i=n[r],c=t,p=r;if(h.hasOwnProperty(p))throw a(Error(99),p);h[p]=i;
1var d=i.phasedRegistrationNames;if(d){for(o in d)d.hasOwnProperty(o)&&l(d[o],c,p);o=!0}else i.registrationName?(l(i.registrationName,c,p),o=!0):o=!1;if(!o)throw a(Error(98),r,e)}}}}function l(e,t,n){if(p[e])throw a(Error(100),e);p[e]=t,d[e]=t.eventTypes[n].dependencies}var f=[],h={},p={},d={};function m(e,t,n,r,o,i,a,u,s){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(l){this.onError(l)}}var y=!1,v=null,g=!1,b=null,w={onError:function(e){y=!0,v=e}};function E(e,t,n,r,o,i,a,u,s){y=!1,v=null,m.apply(w,arguments)}var _=null,S=null,T=null;function O(e,t,n){var r=e.type||"unknown-event";e.currentTarget=T(n),function(e,t,n,r,o,i,u,s,c){if(E.apply(this,arguments),y){if(!y)throw a(Error(198));var l=v;y=!1,v=null,g||(g=!0,b=l)}}(r,t,void 0,e),e.currentTarget=null}function k(e,t){if(null==t)throw a(Error(30));return null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function C(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}var x=null;function A(e){if(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t))for(var r=0;r<t.length&&!e.isPropagationStopped();r++)O(e,t[r],n[r]);else t&&O(e,t,n);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function I(e){if(null!==e&&(x=k(x,e)),e=x,x=null,e){if(C(e,A),x)throw a(Error(95));if(g)throw e=b,g=!1,b=null,e}}var N={injectEventPluginOrder:function(e){if(u)throw a(Error(101));u=Array.prototype.slice.call(e),c()},injectEventPluginsByName:function(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var r=e[t];if(!s.hasOwnProperty(t)||s[t]!==r){if(s[t])throw a(Error(102),t);s[t]=r,n=!0}}n&&c()}};function D(e,t){var n=e.stateNode;if(!n)return null;var r=_(n);if(!r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw a(Error(231),t,typeof n);return n}var P=Math.random().toString(36).slice(2),R="__reactInternalInstance$"+P,j="__reactEventHandlers$"+P;function M(e){if(e[R])return e[R];for(;!e[R];){if(!e.parentNode)return null;e=e.parentNode}return 5===(e=e[R]).tag||6===e.tag?e:null}function L(e){return!(e=e[R])||5!==e.tag&&6!==e.tag?null:e}function U(e){if(5===e.tag||6===e.tag)return e.stateNode;throw a(Error(33))}function F(e){return e[j]||null}function B(e){do{e=e.return}while(e&&5!==e.tag);return e||null}
vendor: 4,140 bytes, line 1
1function q(e,t,n){(t=D(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=k(n._dispatchListeners,t),n._dispatchInstances=k(n._dispatchInstances,e))}function V(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var t=e._targetInst,n=[];t;)n.push(t),t=B(t);for(t=n.length;0<t--;)q(n[t],"captured",e);for(t=0;t<n.length;t++)q(n[t],"bubbled",e)}}function z(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=D(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=k(n._dispatchListeners,t),n._dispatchInstances=k(n._dispatchInstances,e))}function W(e){e&&e.dispatchConfig.registrationName&&z(e._targetInst,null,e)}function Q(e){C(e,V)}var G=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement);function K(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var H={animationend:K("Animation","AnimationEnd"),animationiteration:K("Animation","AnimationIteration"),animationstart:K("Animation","AnimationStart"),transitionend:K("Transition","TransitionEnd")},Y={},$={};function X(e){if(Y[e])return Y[e];if(!H[e])return e;var t,n=H[e];for(t in n)if(n.hasOwnProperty(t)&&t in $)return Y[e]=n[t];return e}G&&($=document.createElement("div").style,"AnimationEvent"in window||(delete H.animationend.animation,delete H.animationiteration.animation,delete H.animationstart.animation),"TransitionEvent"in window||delete H.transitionend.transition);var J=X("animationend"),Z=X("animationiteration"),ee=X("animationstart"),te=X("transitionend"),ne="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),re=null,oe=null,ie=null;function ae(){if(ie)return ie;var e,t,n=oe,r=n.length,o="value"in re?re.value:re.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return ie=o.slice(e,1<t?1-t:void 0)}function ue(){return!0}function se(){return!1}function ce(e,t,n,r){for(var o in this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface)e.hasOwnProperty(o)&&((t=e[o])?this[o]=t(n):"target"===o?this.target=r:this[o]=n[o]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?ue:se,this.isPropagationStopped=se,this}function le(e,t,n,r){if(this.eventPool.length){var o=this.eventPool.pop();return this.call(o,e,t,n,r),o}return new this(e,t,n,r)}function fe(e){if(!(e instanceof this))throw a(Error(279));e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function he(e){e.eventPool=[],e.getPooled=le,e.release=fe}o(ce.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=ue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=ue)},persist:function(){this.isPersistent=ue},isPersistent:se,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=se,this._dispatchInstances=this._dispatchListeners=null}}),ce.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},ce.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var i=new t;return o(i,n.prototype),n.prototype=i,n.prototype.constructor=n,n.Interface=o({},r.Interface,e),n.extend=r.extend,he(n),n},he(ce);var pe=ce.extend({data:null}),de=ce.extend({data:null}),me=[9,13,27,32],ye=G&&"CompositionEvent"in window,ve=null;G&&"documentMode"in document&&(ve=document.documentMode);var ge=G&&"TextEvent"in window&&!ve,be=G&&(!ye||ve&&8<ve&&11>
vendor: 7,097 bytes, line 1
1=ve),we=String.fromCharCode(32),Ee={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},_e=!1;function Se(e,t){switch(e){case"keyup":return-1!==me.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function Te(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Oe=!1;var ke={eventTypes:Ee,extractEvents:function(e,t,n,r){var o=void 0,i=void 0;if(ye)e:{switch(e){case"compositionstart":o=Ee.compositionStart;break e;case"compositionend":o=Ee.compositionEnd;break e;case"compositionupdate":o=Ee.compositionUpdate;break e}o=void 0}else Oe?Se(e,n)&&(o=Ee.compositionEnd):"keydown"===e&&229===n.keyCode&&(o=Ee.compositionStart);return o?(be&&"ko"!==n.locale&&(Oe||o!==Ee.compositionStart?o===Ee.compositionEnd&&Oe&&(i=ae()):(oe="value"in(re=r)?re.value:re.textContent,Oe=!0)),o=pe.getPooled(o,t,n,r),i?o.data=i:null!==(i=Te(n))&&(o.data=i),Q(o),i=o):i=null,(e=ge?function(e,t){switch(e){case"compositionend":return Te(t);case"keypress":return 32!==t.which?null:(_e=!0,we);case"textInput":return(e=t.data)===we&&_e?null:e;default:return null}}(e,n):function(e,t){if(Oe)return"compositionend"===e||!ye&&Se(e,t)?(e=ae(),ie=oe=re=null,Oe=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return be&&"ko"!==t.locale?null:t.data;default:return null}}(e,n))?((t=de.getPooled(Ee.beforeInput,t,n,r)).data=e,Q(t)):t=null,null===i?t:null===t?i:[i,t]}},Ce=null,xe=null,Ae=null;function Ie(e){if(e=S(e)){if("function"!==typeof Ce)throw a(Error(280));var t=_(e.stateNode);Ce(e.stateNode,e.type,t)}}function Ne(e){xe?Ae?Ae.push(e):Ae=[e]:xe=e}function De(){if(xe){var e=xe,t=Ae;if(Ae=xe=null,Ie(e),t)for(e=0;e<t.length;e++)Ie(t[e])}}function Pe(e,t){return e(t)}function Re(e,t,n,r){return e(t,n,r)}function je(){}var Me=Pe,Le=!1;function Ue(){null===xe&&null===Ae||(je(),De())}var Fe={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Be(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Fe[e.type]:"textarea"===t}function qe(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function Ve(e){if(!G)return!1;var t=(e="on"+e)in document;return t||((t=document.createElement("div")).setAttribute(e,"return;"),t="function"===typeof t[e]),t}function ze(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function We(e){e._valueTracker||(e._valueTracker=function(e){var t=ze(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Qe(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ze(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}var Ge=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Ge.hasOwnProperty("ReactCurrentDispatcher")||(Ge.ReactCurrentDispatcher={current:null}),Ge.hasOwnProperty("ReactCurrentBatchConfig")||(Ge.ReactCurrentBatchConfig={suspense:null});var Ke=/^(.*)[\\\/]/,He="function"===typeof Symbol&&Symbol.for,Ye=He?Symbol.for("react.element"):60103,$e=He?Symbol.for("react.portal"):60106,Xe=He?Symbol.for("react.fragment"):60107,Je=He?Symbol.for("react.strict_mode"):60108,Ze=He?Symbol.for("react.profiler"):60114,et=He?Symbol.for("react.provider"):60109,tt=He?Symbol.for("react.context"):60110,nt=He?Symbol.for("react.concurrent_mode"):60111,rt=He?Symbol.for("react.forward_ref"):60112,ot=He?Symbol.for("react.suspense"):60113,it=He?Symbol.for("react.suspense_list"):60120,at=He?Symbol.for("react.memo"):60115,ut=He?Symbol.for("react.lazy"):60116;He&&Symbol.for("react.fundamental"),He&&Symbol.for("react.responder");var st="function"===typeof Symbol&&Symbol.iterator;function ct(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=st&&e[st]||e["@@iterator"])?e:null}function lt(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case Xe:return"Fragment";case $e:return"Portal";case Ze:return"Profiler";case Je:return"StrictMode";case ot:return"Suspense";case it:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case tt:return"Context.Consumer";case et:return"Context.Provider";case rt:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case at:return lt(e.type);case ut:if(e=1===e._status?e._result:null)return lt(e)}return null}function ft(e){var t="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break e;default:var r=e._debugOwner,o=e._debugSource,i=lt(e.type);n=null,r&&(n=lt(r.type)),r=i,i="",o?i=" (at "+o.fileName.replace(Ke,"")+":"+o.lineNumber+")":n&&(i=" (created by "+n+")"),n="\n in "+(r||"Unknown")+i}t+=n,e=e.return}while(e);return t}var ht=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,pt=Object.prototype.hasOwnProperty,dt={},mt={};function yt(e,t,n,r,o,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i}var vt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){vt[e]=new yt(e,0,!1,e,null,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEac
vendor: 4,488 bytes, line 1
1h((function(e){var t=e[0];vt[t]=new yt(t,1,!1,e[1],null,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){vt[e]=new yt(e,2,!1,e.toLowerCase(),null,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){vt[e]=new yt(e,2,!1,e,null,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){vt[e]=new yt(e,3,!1,e.toLowerCase(),null,!1)})),["checked","multiple","muted","selected"].forEach((function(e){vt[e]=new yt(e,3,!0,e,null,!1)})),["capture","download"].forEach((function(e){vt[e]=new yt(e,4,!1,e,null,!1)})),["cols","rows","size","span"].forEach((function(e){vt[e]=new yt(e,6,!1,e,null,!1)})),["rowSpan","start"].forEach((function(e){vt[e]=new yt(e,5,!1,e.toLowerCase(),null,!1)}));var gt=/[\-:]([a-z])/g;function bt(e){return e[1].toUpperCase()}function wt(e,t,n,r){var o=vt.hasOwnProperty(t)?vt[t]:null;(null!==o?0===o.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!pt.call(mt,e)||!pt.call(dt,e)&&(ht.test(e)?mt[e]=!0:(dt[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}function Et(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function _t(e,t){var n=t.checked;return o({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function St(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=Et(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Tt(e,t){null!=(t=t.checked)&&wt(e,"checked",t,!1)}function Ot(e,t){Tt(e,t);var n=Et(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?Ct(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ct(e,t.type,Et(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function kt(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!e.defaultChecked,e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function Ct(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode
1-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(gt,bt);vt[t]=new yt(t,1,!1,e,null,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(gt,bt);vt[t]=new yt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(gt,bt);vt[t]=new yt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1)})),["tabIndex","crossOrigin"].forEach((function(e){vt[e]=new yt(e,1,!1,e.toLowerCase(),null,!1)})),vt.xlinkHref=new yt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach((function(e){vt[e]=new yt(e,1,!1,e.toLowerCase(),null,!0)}));var xt={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function At(e,t,n){return(e=ce.getPooled(xt.change,e,t,n)).type="change",Ne(n),Q(e),e}var It=null,Nt=null;function Dt(e){I(e)}function Pt(e){if(Qe(U(e)))return e}function Rt(e,t){if("change"===e)return t}var jt=!1;function Mt(){It&&(It.detachEvent("onpropertychange",Lt),Nt=It=null)}function Lt(e){if("value"===e.propertyName&&Pt(Nt))if(e=At(Nt,e,qe(e)),Le)I(e);else{Le=!0;try{Pe(Dt,e)}finally{Le=!1,Ue()}}}function Ut(e,t,n){"focus"===e?(Mt(),Nt=n,(It=t).attachEvent("onpropertychange",Lt)):"blur"===e&&Mt()}function Ft(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Pt(Nt)}function Bt(e,t){if("click"===e)return Pt(t)}function qt(e,t){if("input"===e||"change"===e)return Pt(t)}G&&(jt=Ve("input")&&(!document.documentMode||9<document.documentMode));var Vt={eventTypes:xt,_isInputEventSupported:jt,extractEvents:function(e,t,n,r){var o=t?U(t):window,i=void 0,a=void 0,u=o.nodeName&&o.nodeName.toLowerCase();if("select"===u||"input"===u&&"file"===o.type?i=Rt:Be(o)?jt?i=qt:(i=Ft,a=Ut):(u=o.nodeName)&&"input"===u.toLowerCase()&&("checkbox"===o.type||"radio"===o.type)&&(i=Bt),i&&(i=i(e,t)))return At(i,n,r);a&&a(e,o,t),"blur"===e&&(e=o._wrapperState)&&e.controlled&&"number"===o.type&&Ct(o,"number",o.value)}},zt=ce.extend({view:null,detail:null}),Wt={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Qt(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Wt[e])&&!!t[e]}function Gt(){return Qt}var Kt=0,Ht=0,Yt=!1,$t=!1,Xt=zt.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Gt,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},movementX:function(e){if("movementX"in e)return e.movementX;var t=Kt;return Kt=e.screenX,Yt?"mousemove"===e.type?e.screenX-t:0:(Yt=!0,0)},movementY:function(e){if("movementY"in e)return e.movementY;var t=Ht;return Ht=e.screenY,$t?"mousemove"===e.type?e.screenY-t:0:($t=!0,0)}}),Jt=Xt.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Zt={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},en={eventTypes:Zt,extractEvents:function(e,t,n,r){var o="mouseover"===e||"pointerover"===e,i="mouseout"===e||"pointerout"===e;if(o&&(n.relatedTarget||n.fromElement)||!i&&!o)return null;if(o=r.window===r?r:(o=r.ownerDocument)?o.defaultView||o.parentWindow:window,i?(i=t,t=(t=n.relatedTarget||n.toElement)?M(t):null):i=null,i===t)return null;var a=void 0,u=void 0,s=void 0,c=void 0;"mouseout"===e||"mouseover"===e?(a=Xt,u=Zt.mouseLeave,s=Zt.mouseEnter,c="mouse"):"pointerout"!==e&&"pointerover"!==e||(a=Jt,u=Zt.pointerLeave,s=Zt.pointerEnter,c="pointer");var l=null==i?o:U(i);if(o=null==t?o:U(t),(e=a.getPooled(u,i,n,r)).type=c+"leave",e.target=l,e.relatedTarget=
1o,(n=a.getPooled(s,t,n,r)).type=c+"enter",n.target=o,n.relatedTarget=l,r=t,i&&r)e:{for(o=r,c=0,a=t=i;a;a=B(a))c++;for(a=0,s=o;s;s=B(s))a++;for(;0<c-a;)t=B(t),c--;for(;0<a-c;)o=B(o),a--;for(;c--;){if(t===o||t===o.alternate)break e;t=B(t),o=B(o)}t=null}else t=null;for(o=t,t=[];i&&i!==o&&(null===(c=i.alternate)||c!==o);)t.push(i),i=B(i);for(i=[];r&&r!==o&&(null===(c=r.alternate)||c!==o);)i.push(r),r=B(r);for(r=0;r<t.length;r++)z(t[r],"bubbled",e);for(r=i.length;0<r--;)z(i[r],"captured",n);return[e,n]}};function tn(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t}var nn=Object.prototype.hasOwnProperty;function rn(e,t){if(tn(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!nn.call(t,n[r])||!tn(e[n[r]],t[n[r]]))return!1;return!0}function on(e,t){return{responder:e,props:t}}function an(e){var t=e;if(e.alternate)for(;t.return;)t=t.return;else{if(0!==(2&t.effectTag))return 1;for(;t.return;)if(0!==(2&(t=t.return).effectTag))return 1}return 3===t.tag?2:3}function un(e){if(2!==an(e))throw a(Error(188))}function sn(e){if(!(e=function(e){var t=e.alternate;if(!t){if(3===(t=an(e)))throw a(Error(188));return 1===t?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(r=o.return)){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return un(o),e;if(i===r)return un(o),t;i=i.sibling}throw a(Error(188))}if(n.return!==r.return)n=o,r=i;else{for(var u=!1,s=o.child;s;){if(s===n){u=!0,n=o,r=i;break}if(s===r){u=!0,r=o,n=i;break}s=s.sibling}if(!u){for(s=i.child;s;){if(s===n){u=!0,n=i,r=o;break}if(s===r){u=!0,r=i,n=o;break}s=s.sibling}if(!u)throw a(Error(189))}}if(n.alternate!==r)throw a(Error(190))}if(3!==n.tag)throw a(Error(188));return n.stateNode.current===n?e:t}(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}new Map,new Map,new Set,new Map;var cn=ce.extend({animationName:null,elapsedTime:null,pseudoElement:null}),ln=ce.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),fn=zt.extend({relatedTarget:null});function hn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}for(var pn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},dn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},mn=zt.extend({key:function(e){if(e.key){var t=pn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=hn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?dn[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Gt,charCode:function(e){return"keypress"===e.type?hn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?hn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),yn=Xt.extend({dataTransfer:null}),vn=zt.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Gt}),gn=ce.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),bn=Xt.extend({deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),wn=[["blur","blur",0],["cancel","cancel",0],["click","click",0],["close","close",0],["contextmenu","contextMenu",0],["copy","copy",0],["cut","cut",0],["auxclick","auxClick",0],["dblclick","doubleClick",0],["dragend","dragEnd",0],["dragstart","dragStart",0],["drop","drop",0],["focus","focus",0],["input","input",0],["invali
1d","invalid",0],["keydown","keyDown",0],["keypress","keyPress",0],["keyup","keyUp",0],["mousedown","mouseDown",0],["mouseup","mouseUp",0],["paste","paste",0],["pause","pause",0],["play","play",0],["pointercancel","pointerCancel",0],["pointerdown","pointerDown",0],["pointerup","pointerUp",0],["ratechange","rateChange",0],["reset","reset",0],["seeked","seeked",0],["submit","submit",0],["touchcancel","touchCancel",0],["touchend","touchEnd",0],["touchstart","touchStart",0],["volumechange","volumeChange",0],["drag","drag",1],["dragenter","dragEnter",1],["dragexit","dragExit",1],["dragleave","dragLeave",1],["dragover","dragOver",1],["mousemove","mouseMove",1],["mouseout","mouseOut",1],["mouseover","mouseOver",1],["pointermove","pointerMove",1],["pointerout","pointerOut",1],["pointerover","pointerOver",1],["scroll","scroll",1],["toggle","toggle",1],["touchmove","touchMove",1],["wheel","wheel",1],["abort","abort",2],[J,"animationEnd",2],[Z,"animationIteration",2],[ee,"animationStart",2],["canplay","canPlay",2],["canplaythrough","canPlayThrough",2],["durationchange","durationChange",2],["emptied","emptied",2],["encrypted","encrypted",2],["ended","ended",2],["error","error",2],["gotpointercapture","gotPointerCapture",2],["load","load",2],["loadeddata","loadedData",2],["loadedmetadata","loadedMetadata",2],["loadstart","loadStart",2],["lostpointercapture","lostPointerCapture",2],["playing","playing",2],["progress","progress",2],["seeking","seeking",2],["stalled","stalled",2],["suspend","suspend",2],["timeupdate","timeUpdate",2],[te,"transitionEnd",2],["waiting","waiting",2]],En={},_n={},Sn=0;Sn<wn.length;Sn++){var Tn=wn[Sn],On=Tn[0],kn=Tn[1],Cn=Tn[2],xn="on"+(kn[0].toUpperCase()+kn.slice(1)),An={phasedRegistrationNames:{bubbled:xn,captured:xn+"Capture"},dependencies:[On],eventPriority:Cn};En[kn]=An,_n[On]=An}var In={eventTypes:En,getEventPriority:function(e){return void 0!==(e=_n[e])?e.eventPriority:2},extractEvents:function(e,t,n,r){var o=_n[e];if(!o)return null;switch(e){case"keypress":if(0===hn(n))return null;case"keydown":case"keyup":e=mn;break;case"blur":case"focus":e=fn;break;case"click":if(2===n.button)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":e=Xt;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":e=yn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":e=vn;break;case J:case Z:case ee:e=cn;break;case te:e=gn;break;case"scroll":e=zt;break;case"wheel":e=bn;break;case"copy":case"cut":case"paste":e=ln;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":e=Jt;break;default:e=ce}return Q(t=e.getPooled(o,t,n,r)),t}},Nn=In.getEventPriority,Dn=[];function Pn(e){var t=e.targetInst,n=t;do{if(!n){e.ancestors.push(n);break}var r;for(r=n;r.return;)r=r.return;if(!(r=3!==r.tag?null:r.stateNode.containerInfo))break;e.ancestors.push(n),n=M(r)}while(n);for(n=0;n<e.ancestors.length;n++){t=e.ancestors[n];var o=qe(e.nativeEvent);r=e.topLevelType;for(var i=e.nativeEvent,a=null,u=0;u<f.length;u++){var s=f[u];s&&(s=s.extractEvents(r,t,i,o))&&(a=k(a,s))}I(a)}}var Rn=!0;function jn(e,t){Mn(t,e,!1)}function Mn(e,t,n){switch(Nn(t)){case 0:var r=Ln.bind(null,t,1);break;case 1:r=Un.bind(null,t,1);break;default:r=Fn.bind(null,t,1)}n?e.addEventListener(t,r,!0):e.addEventListener(t,r,!1)}function Ln(e,t,n){Le||je();var r=Fn,o=Le;Le=!0;try{Re(r,e,t,n)}finally{(Le=o)||Ue()}}function Un(e,t,n){Fn(e,t,n)}function Fn(e,t,n){if(Rn){if(null===(t=M(t=qe(n)))||"number"!==typeof t.tag||2===an(t)||(t=null),Dn.length){var r=Dn.pop();r.topLevelType=e,r.nativeEvent=n,r.targetInst=t,e=r}else e={topLevelType:e,nativeEvent:n,targetInst:t,ancestors:[]};try{if(n=e,Le)Pn(n);else{Le=!0;try{Me(Pn,n,void 0)}finally{Le=!1,Ue()}}}finally{e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>Dn.length&&Dn.push(e)}}}var Bn=new("function"===typeof WeakMap?WeakMap:Map);function qn(e){var t=Bn.get(e);return void 0===t&&(t=new Set,Bn.set(e,t)),t}function Vn(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function zn(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Wn(e,t){var n,r=zn(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=zn(r)}}function Qn(){for(var e=window,t=Vn();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=Vn((e=t.contentWindow).document)}return t}function Gn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var Kn=G&&"documentMode"in document&&11>
1=document.documentMode,Hn={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Yn=null,$n=null,Xn=null,Jn=!1;function Zn(e,t){var n=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;return Jn||null==Yn||Yn!==Vn(n)?null:("selectionStart"in(n=Yn)&&Gn(n)?n={start:n.selectionStart,end:n.selectionEnd}:n={anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},Xn&&rn(Xn,n)?null:(Xn=n,(e=ce.getPooled(Hn.select,$n,e,t)).type="select",e.target=Yn,Q(e),e))}var er={eventTypes:Hn,extractEvents:function(e,t,n,r){var o,i=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(o=!i)){e:{i=qn(i),o=d.onSelect;for(var a=0;a<o.length;a++)if(!i.has(o[a])){i=!1;break e}i=!0}o=!i}if(o)return null;switch(i=t?U(t):window,e){case"focus":(Be(i)||"true"===i.contentEditable)&&(Yn=i,$n=t,Xn=null);break;case"blur":Xn=$n=Yn=null;break;case"mousedown":Jn=!0;break;case"contextmenu":case"mouseup":case"dragend":return Jn=!1,Zn(n,r);case"selectionchange":if(Kn)break;case"keydown":case"keyup":return Zn(n,r)}return null}};function tr(e,t){return e=o({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function nr(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Et(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function rr(e,t){if(null!=t.dangerouslySetInnerHTML)throw a(Error(91));return o({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function or(e,t){var n=t.value;if(null==n){if(n=t.defaultValue,null!=(t=t.children)){if(null!=n)throw a(Error(92));if(Array.isArray(t)){if(!(1>=t.length))throw a(Error(93));t=t[0]}n=t}null==n&&(n="")}e._wrapperState={initialValue:Et(n)}}function ir(e,t){var n=Et(t.value),r=Et(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ar(e){var t=e.textContent;t===e._wrapperState.initialValue&&(e.value=t)}N.injectEventPluginOrder("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),_=F,S=L,T=U,N.injectEventPluginsByName({SimpleEventPlugin:In,EnterLeaveEventPlugin:en,ChangeEventPlugin:Vt,SelectEventPlugin:er,BeforeInputEventPlugin:ke});var ur={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function sr(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function cr(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?sr(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var lr=void 0,fr=function(e){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction((function(){return e(t,n)}))}:e}((function(e,t){if(e.namespaceURI!==ur.svg||"innerHTML"in e)e.innerHTML=t;else{for((lr=lr||document.createElement("div")).innerHTML="<svg>"+t+"</svg>",t=lr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function hr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var pr={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},dr=["Webkit","ms","Moz","O"];function mr(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||pr.hasOwnProperty(e)&&pr[e]?(""+t).trim():t+"px"}function yr(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=mr(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(pr).forEach((function(e){dr.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pr[t]=pr[e]}))}));var vr=o({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function gr(e,t){if(t){if(vr[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw a(Error(137),e,"");if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw a(Error(60));if(!("object"===typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML))throw a(Error(61))}if(null!=t.style&&"object"!==typeof t.style)throw a(Error(62),"")}}function br(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function wr(e,t){var n=qn(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=d[t];for(var r=0;r<t.length;r++){var o=t[r];if(!n.has(o)){switch(o){case"scroll":Mn(e,"scroll",!0);break;case"focus":case"blur":Mn(e,"focus",!0),Mn(e,"blur",!0),n.add("blur"),n.add("focus");break;
1case"cancel":case"close":Ve(o)&&Mn(e,o,!0);break;case"invalid":case"submit":case"reset":break;default:-1===ne.indexOf(o)&&jn(o,e)}n.add(o)}}}function Er(){}var _r=null,Sr=null;function Tr(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Or(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var kr="function"===typeof setTimeout?setTimeout:void 0,Cr="function"===typeof clearTimeout?clearTimeout:void 0;function xr(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}new Set;var Ar=[],Ir=-1;function Nr(e){0>Ir||(e.current=Ar[Ir],Ar[Ir]=null,Ir--)}function Dr(e,t){Ar[++Ir]=e.current,e.current=t}var Pr={},Rr={current:Pr},jr={current:!1},Mr=Pr;function Lr(e,t){var n=e.type.contextTypes;if(!n)return Pr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ur(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Fr(e){Nr(jr),Nr(Rr)}function Br(e){Nr(jr),Nr(Rr)}function qr(e,t,n){if(Rr.current!==Pr)throw a(Error(168));Dr(Rr,t),Dr(jr,n)}function Vr(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw a(Error(108),lt(t)||"Unknown",i);return o({},n,r)}function zr(e){var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||Pr,Mr=Rr.current,Dr(Rr,t),Dr(jr,jr.current),!0}function Wr(e,t,n){var r=e.stateNode;if(!r)throw a(Error(169));n?(t=Vr(e,t,Mr),r.__reactInternalMemoizedMergedChildContext=t,Nr(jr),Nr(Rr),Dr(Rr,t)):Nr(jr),Dr(jr,n)}var Qr=i.unstable_runWithPriority,Gr=i.unstable_scheduleCallback,Kr=i.unstable_cancelCallback,Hr=i.unstable_shouldYield,Yr=i.unstable_requestPaint,$r=i.unstable_now,Xr=i.unstable_getCurrentPriorityLevel,Jr=i.unstable_ImmediatePriority,Zr=i.unstable_UserBlockingPriority,eo=i.unstable_NormalPriority,to=i.unstable_LowPriority,no=i.unstable_IdlePriority,ro={},oo=void 0!==Yr?Yr:function(){},io=null,ao=null,uo=!1,so=$r(),co=1e4>so?$r:function(){return $r()-so};function lo(){switch(Xr()){case Jr:return 99;case Zr:return 98;case eo:return 97;case to:return 96;case no:return 95;default:throw a(Error(332))}}function fo(e){switch(e){case 99:return Jr;case 98:return Zr;case 97:return eo;case 96:return to;case 95:return no;default:throw a(Error(332))}}function ho(e,t){return e=fo(e),Qr(e,t)}function po(e,t,n){return e=fo(e),Gr(e,t,n)}function mo(e){return null===io?(io=[e],ao=Gr(Jr,vo)):io.push(e),ro}function yo(){null!==ao&&Kr(ao),vo()}function vo(){if(!uo&&null!==io){uo=!0;var e=0;try{var t=io;ho(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),io=null}catch(n){throw null!==io&&(io=io.slice(e+1)),Gr(Jr,yo),n}finally{uo=!1}}}function go(e,t){return 1073741823===t?99:1===t?95:0>=(e=10*(1073741821-t)-10*(1073741821-e))?99:250>=e?98:5250>=e?97:95}function bo(e,t){if(e&&e.defaultProps)for(var n in t=o({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}var wo={current:null},Eo=null,_o=null,So=null;function To(){So=_o=Eo=null}function Oo(e,t){var n=e.type._context;Dr(wo,n._currentValue),n._currentValue=t}function ko(e){var t=wo.current;Nr(wo),e.type._context._currentValue=t}function Co(e,t){for(;null!==e;){var n=e.alternate;if(e.childExpirationTime<t)e.childExpirationTime=t,null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t);else{if(!(null!==n&&n.childExpirationTime<t))break;n.childExpirationTime=t}e=e.return}}function xo(e,t){Eo=e,So=_o=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(e.expirationTime>=t&&(fa=!0),e.firstContext=null)}function Ao(e,t){if(So!==e&&!1!==t&&0!==t)if("number"===typeof t&&1073741823!==t||(So=e,t=1073741823),t={context:e,observedBits:t,next:null},null===_o){if(null===Eo)throw a(Error(308));_o=t,Eo.dependencies={expirationTime:0,firstContext:t,responders:null}}else _o=_o.next=t;return e._currentValue}var Io=!1;function No(e){return{baseState:e,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Do(e){return{baseState:e.baseState,firstUpdate:e.firstUpdate,lastUpdate:e.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Po(e,t){return{expirationTime:e,suspenseConfig:t,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function Ro(e,t){null===e.lastUpdate?e.firstUpdate=e.lastUpdate=t:(e.lastUpdate.next=t,e.lastUpdate=t)}function jo(e,t){var n=e.alternate;if(null===n){var r=e.updateQueue,o=null;null===r&&(r=e.updateQueue=No(e.memoizedState))}else r=e.updateQueue,o=n.updateQueue,null===r?null===o?(r=e.updateQueue=No(e.memoizedState),o=n.updateQueue=No(n.memoizedState)):r=e.updateQueue=Do(o):null===o&&(o=n.updateQueue=Do(r));null===o||r===o?Ro(r,t):null===r.lastUpdate||null===o.lastUpdate?(Ro(r,t),Ro(o,t)):(Ro(r,t),o.lastUpdate=t)}function Mo(e,t){var n=e.updateQueue;
1null===(n=null===n?e.updateQueue=No(e.memoizedState):Lo(e,n)).lastCapturedUpdate?n.firstCapturedUpdate=n.lastCapturedUpdate=t:(n.lastCapturedUpdate.next=t,n.lastCapturedUpdate=t)}function Lo(e,t){var n=e.alternate;return null!==n&&t===n.updateQueue&&(t=e.updateQueue=Do(t)),t}function Uo(e,t,n,r,i,a){switch(n.tag){case 1:return"function"===typeof(e=n.payload)?e.call(a,r,i):e;case 3:e.effectTag=-2049&e.effectTag|64;case 0:if(null===(i="function"===typeof(e=n.payload)?e.call(a,r,i):e)||void 0===i)break;return o({},r,i);case 2:Io=!0}return r}function Fo(e,t,n,r,o){Io=!1;for(var i=(t=Lo(e,t)).baseState,a=null,u=0,s=t.firstUpdate,c=i;null!==s;){var l=s.expirationTime;l<o?(null===a&&(a=s,i=c),u<l&&(u=l)):(Vu(l,s.suspenseConfig),c=Uo(e,0,s,c,n,r),null!==s.callback&&(e.effectTag|=32,s.nextEffect=null,null===t.lastEffect?t.firstEffect=t.lastEffect=s:(t.lastEffect.nextEffect=s,t.lastEffect=s))),s=s.next}for(l=null,s=t.firstCapturedUpdate;null!==s;){var f=s.expirationTime;f<o?(null===l&&(l=s,null===a&&(i=c)),u<f&&(u=f)):(c=Uo(e,0,s,c,n,r),null!==s.callback&&(e.effectTag|=32,s.nextEffect=null,null===t.lastCapturedEffect?t.firstCapturedEffect=t.lastCapturedEffect=s:(t.lastCapturedEffect.nextEffect=s,t.lastCapturedEffect=s))),s=s.next}null===a&&(t.lastUpdate=null),null===l?t.lastCapturedUpdate=null:e.effectTag|=32,null===a&&null===l&&(i=c),t.baseState=i,t.firstUpdate=a,t.firstCapturedUpdate=l,e.expirationTime=u,e.memoizedState=c}function Bo(e,t,n){null!==t.firstCapturedUpdate&&(null!==t.lastUpdate&&(t.lastUpdate.next=t.firstCapturedUpdate,t.lastUpdate=t.lastCapturedUpdate),t.firstCapturedUpdate=t.lastCapturedUpdate=null),qo(t.firstEffect,n),t.firstEffect=t.lastEffect=null,qo(t.firstCapturedEffect,n),t.firstCapturedEffect=t.lastCapturedEffect=null}function qo(e,t){for(;null!==e;){var n=e.callback;if(null!==n){e.callback=null;var r=t;if("function"!==typeof n)throw a(Error(191),n);n.call(r)}e=e.nextEffect}}var Vo=Ge.ReactCurrentBatchConfig,zo=(new r.Component).refs;function Wo(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:o({},t,n),e.memoizedState=n,null!==(r=e.updateQueue)&&0===e.expirationTime&&(r.baseState=n)}var Qo={isMounted:function(e){return!!(e=e._reactInternalFiber)&&2===an(e)},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=Au(),o=Vo.suspense;(o=Po(r=Iu(r,e,o),o)).payload=t,void 0!==n&&null!==n&&(o.callback=n),jo(e,o),Du(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=Au(),o=Vo.suspense;(o=Po(r=Iu(r,e,o),o)).tag=1,o.payload=t,void 0!==n&&null!==n&&(o.callback=n),jo(e,o),Du(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=Au(),r=Vo.suspense;(r=Po(n=Iu(n,e,r),r)).tag=2,void 0!==t&&null!==t&&(r.callback=t),jo(e,r),Du(e,n)}};function Go(e,t,n,r,o,i,a){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!t.prototype||!t.prototype.isPureReactComponent||(!rn(n,r)||!rn(o,i))}function Ko(e,t,n){var r=!1,o=Pr,i=t.contextType;return"object"===typeof i&&null!==i?i=Ao(i):(o=Ur(t)?Mr:Rr.current,i=(r=null!==(r=t.contextTypes)&&void 0!==r)?Lr(e,o):Pr),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Qo,e.stateNode=t,t._reactInternalFiber=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function Ho(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Qo.enqueueReplaceState(t,t.state,null)}function Yo(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=zo;var i=t.contextType;"object"===typeof i&&null!==i?o.context=Ao(i):(i=Ur(t)?Mr:Rr.current,o.context=Lr(e,i)),null!==(i=e.updateQueue)&&(Fo(e,i,n,o,r),o.state=e.memoizedState),"function"===typeof(i=t.getDerivedStateFromProps)&&(Wo(e,t,i,n),o.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof o.getSnapshotBeforeUpdate||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||(t=o.state,"function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&Qo.enqueueReplaceState(o,o.state,null),null!==(i=e.updateQueue)&&(Fo(e,i,n,o,r),o.state=e.memoizedState)),"function"===typeof o.componentDidMount&&(e.effectTag|=4)}var $o=Array.isArray;function Xo(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){n=n._owner;var r=void 0;if(n){if(1!==n.tag)throw a(Error(309));r=n.stateNode}if(!r)throw a(Error(147),e);var o=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===o?t.ref:((t=function(e){var t=r.refs;t===zo&&(t=r.refs={}),null===e?delete t[o]:t[o]=e})._stringRef=o,t)}if("string"!==typeof e)throw a(Error(284));if(!n._owner)throw a(Error(290),e)}return e}function Jo(e,t){if("textarea"!==e.type)throw a(Error(31),"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,"")}function Zo(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t,n){return(e=is(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.effectTag=2,n):r:(t.effectTag=2,n):n}function u(t){return e&&null===t.alternate&&(t.effectTag=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=ss(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function c(e,t,n,r){return null!==t&&t.elementType===n.type?((r=o(t,n.props)).ref=Xo(e,t,n
1),r.return=e,r):((r=as(n.type,n.key,n.props,null,e.mode,r)).ref=Xo(e,t,n),r.return=e,r)}function l(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=cs(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function f(e,t,n,r,i){return null===t||7!==t.tag?((t=us(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function h(e,t,n){if("string"===typeof t||"number"===typeof t)return(t=ss(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case Ye:return(n=as(t.type,t.key,t.props,null,e.mode,n)).ref=Xo(e,null,t),n.return=e,n;case $e:return(t=cs(t,e.mode,n)).return=e,t}if($o(t)||ct(t))return(t=us(t,e.mode,n,null)).return=e,t;Jo(e,t)}return null}function p(e,t,n,r){var o=null!==t?t.key:null;if("string"===typeof n||"number"===typeof n)return null!==o?null:s(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case Ye:return n.key===o?n.type===Xe?f(e,t,n.props.children,r,o):c(e,t,n,r):null;case $e:return n.key===o?l(e,t,n,r):null}if($o(n)||ct(n))return null!==o?null:f(e,t,n,r,null);Jo(e,n)}return null}function d(e,t,n,r,o){if("string"===typeof r||"number"===typeof r)return s(t,e=e.get(n)||null,""+r,o);if("object"===typeof r&&null!==r){switch(r.$$typeof){case Ye:return e=e.get(null===r.key?n:r.key)||null,r.type===Xe?f(t,e,r.props.children,o,r.key):c(t,e,r,o);case $e:return l(t,e=e.get(null===r.key?n:r.key)||null,r,o)}if($o(r)||ct(r))return f(t,e=e.get(n)||null,r,o,null);Jo(t,r)}return null}function m(o,a,u,s){for(var c=null,l=null,f=a,m=a=0,y=null;null!==f&&m<u.length;m++){f.index>m?(y=f,f=null):y=f.sibling;var v=p(o,f,u[m],s);if(null===v){null===f&&(f=y);break}e&&f&&null===v.alternate&&t(o,f),a=i(v,a,m),null===l?c=v:l.sibling=v,l=v,f=y}if(m===u.length)return n(o,f),c;if(null===f){for(;m<u.length;m++)null!==(f=h(o,u[m],s))&&(a=i(f,a,m),null===l?c=f:l.sibling=f,l=f);return c}for(f=r(o,f);m<u.length;m++)null!==(y=d(f,o,m,u[m],s))&&(e&&null!==y.alternate&&f.delete(null===y.key?m:y.key),a=i(y,a,m),null===l?c=y:l.sibling=y,l=y);return e&&f.forEach((function(e){return t(o,e)})),c}function y(o,u,s,c){var l=ct(s);if("function"!==typeof l)throw a(Error(150));if(null==(s=l.call(s)))throw a(Error(151));for(var f=l=null,m=u,y=u=0,v=null,g=s.next();null!==m&&!g.done;y++,g=s.next()){m.index>y?(v=m,m=null):v=m.sibling;var b=p(o,m,g.value,c);if(null===b){null===m&&(m=v);break}e&&m&&null===b.alternate&&t(o,m),u=i(b,u,y),null===f?l=b:f.sibling=b,f=b,m=v}if(g.done)return n(o,m),l;if(null===m){for(;!g.done;y++,g=s.next())null!==(g=h(o,g.value,c))&&(u=i(g,u,y),null===f?l=g:f.sibling=g,f=g);return l}for(m=r(o,m);!g.done;y++,g=s.next())null!==(g=d(m,o,y,g.value,c))&&(e&&null!==g.alternate&&m.delete(null===g.key?y:g.key),u=i(g,u,y),null===f?l=g:f.sibling=g,f=g);return e&&m.forEach((function(e){return t(o,e)})),l}return function(e,r,i,s){var c="object"===typeof i&&null!==i&&i.type===Xe&&null===i.key;c&&(i=i.props.children);var l="object"===typeof i&&null!==i;if(l)switch(i.$$typeof){case Ye:e:{for(l=i.key,c=r;null!==c;){if(c.key===l){if(7===c.tag?i.type===Xe:c.elementType===i.type){n(e,c.sibling),(r=o(c,i.type===Xe?i.props.children:i.props)).ref=Xo(e,c,i),r.return=e,e=r;break e}n(e,c);break}t(e,c),c=c.sibling}i.type===Xe?((r=us(i.props.children,e.mode,s,i.key)).return=e,e=r):((s=as(i.type,i.key,i.props,null,e.mode,s)).ref=Xo(e,r,i),s.return=e,e=s)}return u(e);case $e:e:{for(c=i.key;null!==r;){if(r.key===c){if(4===r.tag&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),(r=o(r,i.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=cs(i,e.mode,s)).return=e,e=r}return u(e)}if("string"===typeof i||"number"===typeof i)return i=""+i,null!==r&&6===r.tag?(n(e,r.sibling),(r=o(r,i)).return=e,e=r):(n(e,r),(r=ss(i,e.mode,s)).return=e,e=r),u(e);if($o(i))return m(e,r,i,s);if(ct(i))return y(e,r,i,s);if(l&&Jo(e,i),"undefined"===typeof i&&!c)switch(e.tag){case 1:case 0:throw e=e.type,a(Error(152),e.displayName||e.name||"Component")}return n(e,r)}}var ei=Zo(!0),ti=Zo(!1),ni={},ri={current:ni},oi={current:ni},ii={current:ni};function ai(e){if(e===ni)throw a(Error(174));return e}function ui(e,t){Dr(ii,t),Dr(oi,e),Dr(ri,ni);var n=t.nodeType;switch(n){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:cr(null,"");break;default:t=cr(t=(n=8===n?t.parentNode:t).namespaceURI||null,n=n.tagName)}Nr(ri),Dr(ri,t)}function si(e){Nr(ri),Nr(oi),Nr(ii)}function ci(e){ai(ii.current);var t=ai(ri.current),n=cr(t,e.type);t!==n&&(Dr(oi,e),Dr(ri,n))}function li(e){oi.current===e&&(Nr(ri),Nr(oi))}var fi=1,hi=1,pi=2,di={current:0};function mi(e){for(var t=e;null!==t;){if(13===t.tag){if(null!==t.memoizedState)return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(64&t.effectTag))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var yi=0,vi=2,gi=4,bi=8,wi=16,Ei=32,_i=64,Si=128,Ti=Ge.ReactCurrentDispatcher,Oi=0,ki=null,Ci=null,xi=null,Ai=null,Ii=null,Ni=null,Di=0,Pi=null,Ri=0,ji=!1,Mi=null,Li=0;function Ui(){throw a(Error(321))}function Fi(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!tn(e[n],t[n]))return!1;return!0}
vendor: 6,480 bytes, line 1
1function Bi(e,t,n,r,o,i){if(Oi=i,ki=t,xi=null!==e?e.memoizedState:null,Ti.current=null===xi?Zi:ea,t=n(r,o),ji){do{ji=!1,Li+=1,xi=null!==e?e.memoizedState:null,Ni=Ai,Pi=Ii=Ci=null,Ti.current=ea,t=n(r,o)}while(ji);Mi=null,Li=0}if(Ti.current=Ji,(e=ki).memoizedState=Ai,e.expirationTime=Di,e.updateQueue=Pi,e.effectTag|=Ri,e=null!==Ci&&null!==Ci.next,Oi=0,Ni=Ii=Ai=xi=Ci=ki=null,Di=0,Pi=null,Ri=0,e)throw a(Error(300));return t}function qi(){Ti.current=Ji,Oi=0,Ni=Ii=Ai=xi=Ci=ki=null,Di=0,Pi=null,Ri=0,ji=!1,Mi=null,Li=0}function Vi(){var e={memoizedState:null,baseState:null,queue:null,baseUpdate:null,next:null};return null===Ii?Ai=Ii=e:Ii=Ii.next=e,Ii}function zi(){if(null!==Ni)Ni=(Ii=Ni).next,xi=null!==(Ci=xi)?Ci.next:null;else{if(null===xi)throw a(Error(310));var e={memoizedState:(Ci=xi).memoizedState,baseState:Ci.baseState,queue:Ci.queue,baseUpdate:Ci.baseUpdate,next:null};Ii=null===Ii?Ai=e:Ii.next=e,xi=Ci.next}return Ii}function Wi(e,t){return"function"===typeof t?t(e):t}function Qi(e){var t=zi(),n=t.queue;if(null===n)throw a(Error(311));if(n.lastRenderedReducer=e,0<Li){var r=n.dispatch;if(null!==Mi){var o=Mi.get(n);if(void 0!==o){Mi.delete(n);var i=t.memoizedState;do{i=e(i,o.action),o=o.next}while(null!==o);return tn(i,t.memoizedState)||(fa=!0),t.memoizedState=i,t.baseUpdate===n.last&&(t.baseState=i),n.lastRenderedState=i,[i,r]}}return[t.memoizedState,r]}r=n.last;var u=t.baseUpdate;if(i=t.baseState,null!==u?(null!==r&&(r.next=null),r=u.next):r=null!==r?r.next:null,null!==r){var s=o=null,c=r,l=!1;do{var f=c.expirationTime;f<Oi?(l||(l=!0,s=u,o=i),f>Di&&(Di=f)):(Vu(f,c.suspenseConfig),i=c.eagerReducer===e?c.eagerState:e(i,c.action)),u=c,c=c.next}while(null!==c&&c!==r);l||(s=u,o=i),tn(i,t.memoizedState)||(fa=!0),t.memoizedState=i,t.baseUpdate=s,t.baseState=o,n.lastRenderedState=i}return[t.memoizedState,n.dispatch]}function Gi(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===Pi?(Pi={lastEffect:null}).lastEffect=e.next=e:null===(t=Pi.lastEffect)?Pi.lastEffect=e.next=e:(n=t.next,t.next=e,e.next=n,Pi.lastEffect=e),e}function Ki(e,t,n,r){var o=Vi();Ri|=e,o.memoizedState=Gi(t,n,void 0,void 0===r?null:r)}function Hi(e,t,n,r){var o=zi();r=void 0===r?null:r;var i=void 0;if(null!==Ci){var a=Ci.memoizedState;if(i=a.destroy,null!==r&&Fi(r,a.deps))return void Gi(yi,n,i,r)}Ri|=e,o.memoizedState=Gi(t,n,i,r)}function Yi(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function $i(){}function Xi(e,t,n){if(!(25>Li))throw a(Error(301));var r=e.alternate;if(e===ki||null!==r&&r===ki)if(ji=!0,e={expirationTime:Oi,suspenseConfig:null,action:n,eagerReducer:null,eagerState:null,next:null},null===Mi&&(Mi=new Map),void 0===(n=Mi.get(t)))Mi.set(t,e);else{for(t=n;null!==t.next;)t=t.next;t.next=e}else{var o=Au(),i=Vo.suspense;i={expirationTime:o=Iu(o,e,i),suspenseConfig:i,action:n,eagerReducer:null,eagerState:null,next:null};var u=t.last;if(null===u)i.next=i;else{var s=u.next;null!==s&&(i.next=s),u.next=i}if(t.last=i,0===e.expirationTime&&(null===r||0===r.expirationTime)&&null!==(r=t.lastRenderedReducer))try{var c=t.lastRenderedState,l=r(c,n);if(i.eagerReducer=r,i.eagerState=l,tn(l,c))return}catch(f){}Du(e,o)}}var Ji={readContext:Ao,useCallback:Ui,useContext:Ui,useEffect:Ui,useImperativeHandle:Ui,useLayoutEffect:Ui,useMemo:Ui,useReducer:Ui,useRef:Ui,useState:Ui,useDebugValue:Ui,useResponder:Ui},Zi={readContext:Ao,useCallback:function(e,t){return Vi().memoizedState=[e,void 0===t?null:t],e},useContext:Ao,useEffect:function(e,t){return Ki(516,Si|_i,e,t)},useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Ki(4,gi|Ei,Yi.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ki(4,gi|Ei,e,t)},useMemo:function(e,t){var n=Vi();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Vi();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={last:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Xi.bind(null,ki,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Vi().memoizedState=e},useState:function(e){var t=Vi();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={last:null,dispatch:null,lastRenderedReducer:Wi,lastRenderedState:e}).dispatch=Xi.bind(null,ki,e),[t.memoizedState,e]},useDebugValue:$i,useResponder:on},ea={readContext:Ao,useCallback:function(e,t){var n=zi();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Fi(t,r[1])?r[0]:(n.memoizedState=[e,t],e)},useContext:Ao,useEffect:function(e,t){return Hi(516,Si|_i,e,t)},useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Hi(4,gi|Ei,Yi.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Hi(4,gi|Ei,e,t)},useMemo:function(e,t){var n=zi();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Fi(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)},useReducer:Qi,useRef:function(){return zi().memoizedState},useState:function(e){return Qi(Wi)},useDebugValue:$i,useResponder:on},ta=null,na=null,ra=!1;function oa(e,t){var n=rs(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function ia(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);case 13:default:return!1}}function aa(e){if(ra){var t=na;if(t){var n=t;if(!ia(e,t)){if(!(t=xr(n.nextSibling))||!ia(e,t))return e.effectTag|=2,ra=!1,void(ta=e);oa(ta,n)}ta=e,na=xr(t.firstChild)}else e.effectTag|=2,ra=!1,ta=e}}function ua(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&18!==e.tag;)e=e.return;ta=e}function sa(e){if(e!==ta)return!1;if(!ra)return ua(e),ra=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!Or(t,e.memoizedProps))for(t=na;t;)oa(e,t),t=xr(t.nextSibling);return ua(e),na=ta?xr(e.stateNode.nextSibling):null,!0}function ca(){na=ta=null,ra=!1}var la=Ge.ReactCurrentOwner,fa=!1;function ha(e,t,n,r){t.child=null===e?ti(t,null,n,r):ei(t,e.child,n,r)}function pa(e,t,n,r,o){n=n.render;var i=t.ref;return xo(t,o),r=Bi(e,t,n,r,i,o),null===e||fa?(t.effectTag|=1,ha(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=o&&(e.expirationTime=0),Oa(e,t,o))}
1function da(e,t,n,r,o,i){if(null===e){var a=n.type;return"function"!==typeof a||os(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=as(n.type,null,r,null,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,ma(e,t,a,r,o,i))}return a=e.child,o<i&&(o=a.memoizedProps,(n=null!==(n=n.compare)?n:rn)(o,r)&&e.ref===t.ref)?Oa(e,t,i):(t.effectTag|=1,(e=is(a,r)).ref=t.ref,e.return=t,t.child=e)}function ma(e,t,n,r,o,i){return null!==e&&rn(e.memoizedProps,r)&&e.ref===t.ref&&(fa=!1,o<i)?Oa(e,t,i):va(e,t,n,r,i)}function ya(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function va(e,t,n,r,o){var i=Ur(n)?Mr:Rr.current;return i=Lr(t,i),xo(t,o),n=Bi(e,t,n,r,i,o),null===e||fa?(t.effectTag|=1,ha(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=o&&(e.expirationTime=0),Oa(e,t,o))}function ga(e,t,n,r,o){if(Ur(n)){var i=!0;zr(t)}else i=!1;if(xo(t,o),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),Ko(t,n,r),Yo(t,n,r,o),r=!0;else if(null===e){var a=t.stateNode,u=t.memoizedProps;a.props=u;var s=a.context,c=n.contextType;"object"===typeof c&&null!==c?c=Ao(c):c=Lr(t,c=Ur(n)?Mr:Rr.current);var l=n.getDerivedStateFromProps,f="function"===typeof l||"function"===typeof a.getSnapshotBeforeUpdate;f||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(u!==r||s!==c)&&Ho(t,a,r,c),Io=!1;var h=t.memoizedState;s=a.state=h;var p=t.updateQueue;null!==p&&(Fo(t,p,r,a,o),s=t.memoizedState),u!==r||h!==s||jr.current||Io?("function"===typeof l&&(Wo(t,n,l,r),s=t.memoizedState),(u=Io||Go(t,n,u,r,h,s,c))?(f||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.effectTag|=4)):("function"===typeof a.componentDidMount&&(t.effectTag|=4),t.memoizedProps=r,t.memoizedState=s),a.props=r,a.state=s,a.context=c,r=u):("function"===typeof a.componentDidMount&&(t.effectTag|=4),r=!1)}else a=t.stateNode,u=t.memoizedProps,a.props=t.type===t.elementType?u:bo(t.type,u),s=a.context,"object"===typeof(c=n.contextType)&&null!==c?c=Ao(c):c=Lr(t,c=Ur(n)?Mr:Rr.current),(f="function"===typeof(l=n.getDerivedStateFromProps)||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(u!==r||s!==c)&&Ho(t,a,r,c),Io=!1,s=t.memoizedState,h=a.state=s,null!==(p=t.updateQueue)&&(Fo(t,p,r,a,o),h=t.memoizedState),u!==r||s!==h||jr.current||Io?("function"===typeof l&&(Wo(t,n,l,r),h=t.memoizedState),(l=Io||Go(t,n,u,r,s,h,c))?(f||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(r,h,c),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,h,c)),"function"===typeof a.componentDidUpdate&&(t.effectTag|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!==typeof a.componentDidUpdate||u===e.memoizedProps&&s===e.memoizedState||(t.effectTag|=4),"function"!==typeof a.getSnapshotBeforeUpdate||u===e.memoizedProps&&s===e.memoizedState||(t.effectTag|=256),t.memoizedProps=r,t.memoizedState=h),a.props=r,a.state=h,a.context=c,r=l):("function"!==typeof a.componentDidUpdate||u===e.memoizedProps&&s===e.memoizedState||(t.effectTag|=4),"function"!==typeof a.getSnapshotBeforeUpdate||u===e.memoizedProps&&s===e.memoizedState||(t.effectTag|=256),r=!1);return ba(e,t,n,r,i,o)}function ba(e,t,n,r,o,i){ya(e,t);var a=0!==(64&t.effectTag);if(!r&&!a)return o&&Wr(t,n,!1),Oa(e,t,i);r=t.stateNode,la.current=t;var u=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.effectTag|=1,null!==e&&a?(t.child=ei(t,e.child,null,i),t.child=ei(t,null,u,i)):ha(e,t,u,i),t.memoizedState=r.state,o&&Wr(t,n,!0),t.child}function wa(e){var t=e.stateNode;t.pendingContext?qr(0,t.pendingContext,t.pendingContext!==t.context):t.context&&qr(0,t.context,!1),ui(e,t.containerInfo)}var Ea={};function _a(e,t,n){var r,o=t.mode,i=t.pendingProps,a=di.current,u=null,s=!1;if((r=0!==(64&t.effectTag))||(r=0!==(a&pi)&&(null===e||null!==e.memoizedState)),r?(u=Ea,s=!0,t.effectTag&=-65):null!==e&&null===e.memoizedState||void 0===i.fallback||!0===i.unstable_avoidThisFallback||(a|=hi),Dr(di,a&=fi),null===e)if(s){if(i=i.fallback,(e=us(null,o,0,null)).return=t,0===(2&t.mode))for(s=null!==t.memoizedState?t.child.child:t.child,e.child=s;null!==s;)s.return=e,s=s.sibling;(n=us(i,o,n,null)).return=t,e.sibling=n,o=e}else o=n=ti(t,null,i.children,n);else{if(null!==e.memoizedState)if(o=(a=e.child).sibling,s){if(i=i.fallback,(n=is(a,a.pendingProps)).return=t,0===(2&t.mode)&&(s=null!==t.memoizedState?t.child.child:t.child)!==a.child)for(n.child=s;null!==s;)s.return=n,s=s.sibling;(i=is(o,i,o.expirationTime)).return=t,n.sibling=i,o=n,n.childExpirationTime=0,n=i}else o=n=ei(t,a.child,i.children,n);else if(a=e.child,s){if(s=i.fallback,(i=us(null,o,0,null)).return=t,i.child=a,null!==a&&(a.return=i),0===(2&t.mode))for(a=null!==t.memoizedState?t.child.child:t.child,i.child=a;null!==a;)a.return=i,a=a.sibling;(n=us(s,o,n,null)).return=t,i.sibling=n,n.effectTag|=2,o=i,i.childExpirationTime=0}else n=o=ei(t,a,i.children,n);t.stateNode=e.stateNode}return t.memoizedState=u,t.child=o,n}function Sa(e,t,n,r,o){var i=e.memoizedState;null===i?e.memoizedState={isBackwards:t,rendering:null,last:r,tail:n,tailExpiration:0,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.last=r,i.tail=n,i.tailExpiration=0,i.tailMode=o)}function Ta(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(ha(e,t,r.children,n),0!==((r=di.current)&pi))r=r&fi|pi,t.effectTag|=64;else{if(null!==e&&0!==(64&e.effectTag))e:for(e=t.child;null!==e;){if(13===e.tag){if(null!==e.memoizedState){e.expirationTime<n&&(e.expirationTime=n);var a=e.alternate;null!==a&&a.expirationTime<n&&(a.expirationTime=n),Co(e.return,n)}}else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=fi}if(Dr(di,r),0===(2&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(r=n.alternate)&&null===mi(r)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Sa(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(r=o.alternate)&&null===mi(r)){t.child=o;break}r=o.sibling,o.sibling=n,n=o,o=r}Sa(t,!0,n,null,i);break;case"together":Sa(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Oa(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),t.childExpirationTime<n)return null;if(null!==e&&t.child!==e.child)throw a(Error(153));if(null!==t.child){for(n=is(e=t.child,e.pendingProps,e.expirationTime),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=is(e,e.pendingProps,e.expirationTime)).return=t;n.sibling=null}return t.child}function ka(e){e.effectTag|=4}var Ca=void 0,xa=void 0,Aa=void 0,Ia=void 0;function Na(e,t){switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Da(e){switch(e.tag){case 1:Ur(e.type)&&Fr();var t=e.effectTag;return 2048&t?(e.effectTag=-2049&t|64,e):null;case 3:if(si(),Br(),0!==(64&(t=e.effectTag)))throw a(Error(285));return e.effectTag=-2049&t|64,e;case 5:return li(e),null;case 13:return Nr(di),2048&(t=e.effectTag)?(e.effectTag=-2049&t|64,e):null;case 18:return null;case 19:return Nr(di),null;case 4:return si(),null;case 10:return ko(e),null;default:return null}}function Pa(e,t){return{value:e,source:t,stack:ft(t)}}Ca=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(20===n.tag)e.appendChild(n.stateNode.instance);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},xa=function(){},Aa=function(e,t,n,r,i){var a=e.memoizedProps;if(a!==r){var u=t.stateNode;switch(ai(ri.current),e=null,n){case"input":a=_t(u,a),r=_t(u,r),e=[];break;case"option":a=tr(u,a),r=tr(u,r),e=[];break;case"select":a=o({},a,{value:void 0}),r=o({},r,{value:void 0}),e=[];break;case"textarea":a=rr(u,a),r=rr(u,r),e=[];break;default:"function"!==typeof a.onClick&&"function"===typeof r.onClick&&(u.onclick=Er)}gr(n,r),u=n=void 0;var s=null;for(n in a)if(!r.hasOwnProperty(n)&&a.hasOwnProperty(n)&&null!=a[n])if("style"===n){var c=a[n];for(u in c)c.hasOwnProperty(u)&&(s||(s={}),s[u]="")}else"dangerouslySetInnerHTML"!==n&&"children"!==n&&"suppressContentEditableWarning"!==n&&"suppressHydrationWarning"!==n&&"autoFocus"!==n&&(p.hasOwnProperty(n)?e||(e=[]):(e=e||[]).push(n,null));for(n in r){var l=r[n];if(c=null!=a?a[n]:void 0,r.hasOwnProperty(n)&&l!==c&&(null!=l||null!=c))if("style"===n)if(c){for(u in c)!c.hasOwnProperty(u)||l&&l.hasOwnProperty(u)||(s||(s={}),s[u]="");for(u in l)l.hasOwnProperty(u)&&c[u]!==l[u]&&(s||(s={}),s[u]=l[u])}else s||(e||(e=[]),e.push(n,s)),s=l;else"dangerouslySetInnerHTML"===n?(l=l?l.__html:void 0,c=c?c.__html:void 0,null!=l&&c!==l&&(e=e||[]).push(n,""+l)):"children"===n?c===l||"string"!==typeof l&&"number"!==typeof l||(e=e||[]).push(n,""+l):"suppressContentEditableWarning"!==n&&"suppressHydrationWarning"!==n&&(p.hasOwnProperty(n)?(null!=l&&wr(i,n),e||c===l||(e=[])):(e=e||[]).push(n,l))}s&&(e=e||[]).push("style",s),i=e,(t.updateQueue=i)&&ka(t)}},Ia=function(e,t,n,r){n!==r&&ka(t)};var Ra="function"===typeof WeakSet?WeakSet:Set;function ja(e,t){var n=t.source,r=t.stack;null===r&&null!==n&&(r=ft(n)),null!==n&<(n.type),t=t.value,null!==e&&1===e.tag&<(e.type);try{console.error(t)}catch(o){setTimeout((function(){throw o}))}}function Ma(e){var t=e.ref;if(null!==t)if("function"===typeof t)try{t(null)}catch(n){$u(e,n)}else t.current=null}function La(e,t,n){if(null!==(n=null!==(n=n.updateQueue)?n.lastEffect:null)){var r=n=n.next;do{if((r.tag&e)!==yi){var o=r.destroy;r.destroy=void 0,void 0!==o&&o()}(r.tag&t)!==yi&&(o=r.create,r.destroy=o()),r=r.next}
1while(r!==n)}}function Ua(e,t){switch("function"===typeof ts&&ts(e),e.tag){case 0:case 11:case 14:case 15:var n=e.updateQueue;if(null!==n&&null!==(n=n.lastEffect)){var r=n.next;ho(97<t?97:t,(function(){var t=r;do{var n=t.destroy;if(void 0!==n){var o=e;try{n()}catch(i){$u(o,i)}}t=t.next}while(t!==r)}))}break;case 1:Ma(e),"function"===typeof(t=e.stateNode).componentWillUnmount&&function(e,t){try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(n){$u(e,n)}}(e,t);break;case 5:Ma(e);break;case 4:Va(e,t)}}function Fa(e,t){for(var n=e;;)if(Ua(n,t),null!==n.child&&4!==n.tag)n.child.return=n,n=n.child;else{if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function Ba(e){return 5===e.tag||3===e.tag||4===e.tag}function qa(e){e:{for(var t=e.return;null!==t;){if(Ba(t)){var n=t;break e}t=t.return}throw a(Error(160))}switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw a(Error(161))}16&n.effectTag&&(hr(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||Ba(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}for(var o=e;;){var i=5===o.tag||6===o.tag;if(i||20===o.tag){var u=i?o.stateNode:o.stateNode.instance;if(n)if(r){var s=u;u=n,8===(i=t).nodeType?i.parentNode.insertBefore(s,u):i.insertBefore(s,u)}else t.insertBefore(u,n);else r?(8===(s=t).nodeType?(i=s.parentNode).insertBefore(u,s):(i=s).appendChild(u),null!==(s=s._reactRootContainer)&&void 0!==s||null!==i.onclick||(i.onclick=Er)):t.appendChild(u)}else if(4!==o.tag&&null!==o.child){o.child.return=o,o=o.child;continue}if(o===e)break;for(;null===o.sibling;){if(null===o.return||o.return===e)return;o=o.return}o.sibling.return=o.return,o=o.sibling}}function Va(e,t){for(var n=e,r=!1,o=void 0,i=void 0;;){if(!r){r=n.return;e:for(;;){if(null===r)throw a(Error(160));switch(o=r.stateNode,r.tag){case 5:i=!1;break e;case 3:case 4:o=o.containerInfo,i=!0;break e}r=r.return}r=!0}if(5===n.tag||6===n.tag)if(Fa(n,t),i){var u=o,s=n.stateNode;8===u.nodeType?u.parentNode.removeChild(s):u.removeChild(s)}else o.removeChild(n.stateNode);else if(20===n.tag)s=n.stateNode.instance,Fa(n,t),i?8===(u=o).nodeType?u.parentNode.removeChild(s):u.removeChild(s):o.removeChild(s);else if(4===n.tag){if(null!==n.child){o=n.stateNode.containerInfo,i=!0,n.child.return=n,n=n.child;continue}}else if(Ua(n,t),null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;4===(n=n.return).tag&&(r=!1)}n.sibling.return=n.return,n=n.sibling}}function za(e,t){switch(t.tag){case 0:case 11:case 14:case 15:La(gi,bi,t);break;case 1:break;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps,o=null!==e?e.memoizedProps:r;e=t.type;var i=t.updateQueue;if(t.updateQueue=null,null!==i){for(n[j]=r,"input"===e&&"radio"===r.type&&null!=r.name&&Tt(n,r),br(e,o),t=br(e,r),o=0;o<i.length;o+=2){var u=i[o],s=i[o+1];"style"===u?yr(n,s):"dangerouslySetInnerHTML"===u?fr(n,s):"children"===u?hr(n,s):wt(n,u,s,t)}switch(e){case"input":Ot(n,r);break;case"textarea":ir(n,r);break;case"select":t=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(e=r.value)?nr(n,!!r.multiple,e,!1):t!==!!r.multiple&&(null!=r.defaultValue?nr(n,!!r.multiple,r.defaultValue,!0):nr(n,!!r.multiple,r.multiple?[]:"",!1))}}}break;case 6:if(null===t.stateNode)throw a(Error(162));t.stateNode.nodeValue=t.memoizedProps;break;case 3:case 12:break;case 13:if(n=t,null===t.memoizedState?r=!1:(r=!0,n=t.child,mu=co()),null!==n)e:for(e=n;;){if(5===e.tag)i=e.stateNode,r?"function"===typeof(i=i.style).setProperty?i.setProperty("display","none","important"):i.display="none":(i=e.stateNode,o=void 0!==(o=e.memoizedProps.style)&&null!==o&&o.hasOwnProperty("display")?o.display:null,i.style.display=mr("display",o));else if(6===e.tag)e.stateNode.nodeValue=r?"":e.memoizedProps;else{if(13===e.tag&&null!==e.memoizedState){(i=e.child.sibling).return=e,e=i;continue}if(null!==e.child){e.child.return=e,e=e.child;continue}}if(e===n)break e;for(;null===e.sibling;){if(null===e.return||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}Wa(t);break;case 19:Wa(t);break;case 17:case 20:break;default:throw a(Error(163))}}function Wa(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Ra),t.forEach((function(t){var r=Ju.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}var Qa="function"===typeof WeakMap?WeakMap:Map;function Ga(e,t,n){(n=Po(n,null)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){gu||(gu=!0,bu=r),ja(e,t)},n}function Ka(e,t,n){(n=Po(n,null)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var o=t.value;
1n.payload=function(){return ja(e,t),r(o)}}var i=e.stateNode;return null!==i&&"function"===typeof i.componentDidCatch&&(n.callback=function(){"function"!==typeof r&&(null===wu?wu=new Set([this]):wu.add(this),ja(e,t));var n=t.stack;this.componentDidCatch(t.value,{componentStack:null!==n?n:""})}),n}var Ha=Math.ceil,Ya=Ge.ReactCurrentDispatcher,$a=Ge.ReactCurrentOwner,Xa=0,Ja=8,Za=16,eu=32,tu=0,nu=1,ru=2,ou=3,iu=4,au=Xa,uu=null,su=null,cu=0,lu=tu,fu=1073741823,hu=1073741823,pu=null,du=!1,mu=0,yu=500,vu=null,gu=!1,bu=null,wu=null,Eu=!1,_u=null,Su=90,Tu=0,Ou=null,ku=0,Cu=null,xu=0;function Au(){return(au&(Za|eu))!==Xa?1073741821-(co()/10|0):0!==xu?xu:xu=1073741821-(co()/10|0)}function Iu(e,t,n){if(0===(2&(t=t.mode)))return 1073741823;var r=lo();if(0===(4&t))return 99===r?1073741823:1073741822;if((au&Za)!==Xa)return cu;if(null!==n)e=1073741821-25*(1+((1073741821-e+(0|n.timeoutMs||5e3)/10)/25|0));else switch(r){case 99:e=1073741823;break;case 98:e=1073741821-10*(1+((1073741821-e+15)/10|0));break;case 97:case 96:e=1073741821-25*(1+((1073741821-e+500)/25|0));break;case 95:e=1;break;default:throw a(Error(326))}return null!==uu&&e===cu&&--e,e}var Nu=0;function Du(e,t){if(50<ku)throw ku=0,Cu=null,a(Error(185));if(null!==(e=Pu(e,t))){e.pingTime=0;var n=lo();if(1073741823===t)if((au&Ja)!==Xa&&(au&(Za|eu))===Xa)for(var r=qu(e,1073741823,!0);null!==r;)r=r(!0);else Ru(e,99,1073741823),au===Xa&&yo();else Ru(e,n,t);(4&au)===Xa||98!==n&&99!==n||(null===Ou?Ou=new Map([[e,t]]):(void 0===(n=Ou.get(e))||n>t)&&Ou.set(e,t))}}function Pu(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t);var r=e.return,o=null;if(null===r&&3===e.tag)o=e.stateNode;else for(;null!==r;){if(n=r.alternate,r.childExpirationTime<t&&(r.childExpirationTime=t),null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t),null===r.return&&3===r.tag){o=r.stateNode;break}r=r.return}return null!==o&&(t>o.firstPendingTime&&(o.firstPendingTime=t),0===(e=o.lastPendingTime)||t<e)&&(o.lastPendingTime=t),o}function Ru(e,t,n){if(e.callbackExpirationTime<n){var r=e.callbackNode;null!==r&&r!==ro&&Kr(r),e.callbackExpirationTime=n,1073741823===n?e.callbackNode=mo(ju.bind(null,e,qu.bind(null,e,n))):(r=null,1!==n&&(r={timeout:10*(1073741821-n)-co()}),e.callbackNode=po(t,ju.bind(null,e,qu.bind(null,e,n)),r))}}function ju(e,t,n){var r=e.callbackNode,o=null;try{return null!==(o=t(n))?ju.bind(null,e,o):null}finally{null===o&&r===e.callbackNode&&(e.callbackNode=null,e.callbackExpirationTime=0)}}function Mu(){(au&(1|Za|eu))===Xa&&(function(){if(null!==Ou){var e=Ou;Ou=null,e.forEach((function(e,t){mo(qu.bind(null,t,e))})),yo()}}(),Ku())}function Lu(e,t){var n=au;au|=1;try{return e(t)}finally{(au=n)===Xa&&yo()}}function Uu(e,t,n,r){var o=au;au|=4;try{return ho(98,e.bind(null,t,n,r))}finally{(au=o)===Xa&&yo()}}function Fu(e,t){var n=au;au&=-2,au|=Ja;try{return e(t)}finally{(au=n)===Xa&&yo()}}function Bu(e,t){e.finishedWork=null,e.finishedExpirationTime=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Cr(n)),null!==su)for(n=su.return;null!==n;){var r=n;switch(r.tag){case 1:var o=r.type.childContextTypes;null!==o&&void 0!==o&&Fr();break;case 3:si(),Br();break;case 5:li(r);break;case 4:si();break;
1case 13:case 19:Nr(di);break;case 10:ko(r)}n=n.return}uu=e,su=is(e.current,null),cu=t,lu=tu,hu=fu=1073741823,pu=null,du=!1}function qu(e,t,n){if((au&(Za|eu))!==Xa)throw a(Error(327));if(e.firstPendingTime<t)return null;if(n&&e.finishedExpirationTime===t)return Qu.bind(null,e);if(Ku(),e!==uu||t!==cu)Bu(e,t);else if(lu===ou)if(du)Bu(e,t);else{var r=e.lastPendingTime;if(r<t)return qu.bind(null,e,r)}if(null!==su){r=au,au|=Za;var o=Ya.current;if(null===o&&(o=Ji),Ya.current=Ji,n){if(1073741823!==t){var i=Au();if(i<t)return au=r,To(),Ya.current=o,qu.bind(null,e,i)}}else xu=0;for(;;)try{if(n)for(;null!==su;)su=zu(su);else for(;null!==su&&!Hr();)su=zu(su);break}catch(m){if(To(),qi(),null===(i=su)||null===i.return)throw Bu(e,t),au=r,m;e:{var u=e,s=i.return,c=i,l=m,f=cu;if(c.effectTag|=1024,c.firstEffect=c.lastEffect=null,null!==l&&"object"===typeof l&&"function"===typeof l.then){var h=l,p=0!==(di.current&hi);l=s;do{var d;if((d=13===l.tag)&&(null!==l.memoizedState?d=!1:d=void 0!==(d=l.memoizedProps).fallback&&(!0!==d.unstable_avoidThisFallback||!p)),d){if(null===(s=l.updateQueue)?((s=new Set).add(h),l.updateQueue=s):s.add(h),0===(2&l.mode)){l.effectTag|=64,c.effectTag&=-1957,1===c.tag&&(null===c.alternate?c.tag=17:((f=Po(1073741823,null)).tag=2,jo(c,f))),c.expirationTime=1073741823;break e}c=u,u=f,null===(p=c.pingCache)?(p=c.pingCache=new Qa,s=new Set,p.set(h,s)):void 0===(s=p.get(h))&&(s=new Set,p.set(h,s)),s.has(u)||(s.add(u),c=Xu.bind(null,c,h,u),h.then(c,c)),l.effectTag|=2048,l.expirationTime=f;break e}l=l.return}while(null!==l);l=Error((lt(c.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+ft(c))}lu!==iu&&(lu=nu),l=Pa(l,c),c=s;do{switch(c.tag){case 3:c.effectTag|=2048,c.expirationTime=f,Mo(c,f=Ga(c,l,f));break e;case 1:if(h=l,u=c.type,s=c.stateNode,0===(64&c.effectTag)&&("function"===typeof u.getDerivedStateFromError||null!==s&&"function"===typeof s.componentDidCatch&&(null===wu||!wu.has(s)))){c.effectTag|=2048,c.expirationTime=f,Mo(c,f=Ka(c,h,f));break e}}c=c.return}while(null!==c)}su=Wu(i)}if(au=r,To(),Ya.current=o,null!==su)return qu.bind(null,e,t)}if(e.finishedWork=e.current.alternate,e.finishedExpirationTime=t,function(e,t){var n=e.firstBatch;return!!(null!==n&&n._defer&&n._expirationTime>=t)&&(po(97,(function(){return n._onComplete(),null})),!0)}(e,t))return null;switch(uu=null,lu){case tu:throw a(Error(328));case nu:return(r=e.lastPendingTime)<t?qu.bind(null,e,r):n?Qu.bind(null,e):(Bu(e,t),mo(qu.bind(null,e,t)),null);case ru:return 1073741823===fu&&!n&&10<(n=mu+yu-co())?du?(Bu(e,t),qu.bind(null,e,t)):(r=e.lastPendingTime)<t?qu.bind(null,e,r):(e.timeoutHandle=kr(Qu.bind(null,e),n),null):Qu.bind(null,e);case ou:if(!n){if(du)return Bu(e,t),qu.bind(null,e,t);if((n=e.lastPendingTime)<t)return qu.bind(null,e,n);if(1073741823!==hu?n=10*(1073741821-hu)-co():1073741823===fu?n=0:(n=10*(1073741821-fu)-5e3,0>(n=(r=co())-n)&&(n=0),(t=10*(1073741821-t)-r)<(n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Ha(n/1960))-n)&&(n=t)),10<n)return e.timeoutHandle=kr(Qu.bind(null,e),n),null}return Qu.bind(null,e);case iu:return!n&&1073741823!==fu&&null!==pu&&(r=fu,0>=(t=0|(o=pu).busyMinDurationMs)?t=0:(n=0|o.busyDelayMs,t=(r=co()-(10*(1073741821-r)-(0|o.timeoutMs||5e3)))<=n?0:n+t-r),10<t)?(e.timeoutHandle=kr(Qu.bind(null,e),t),null):Qu.bind(null,e);default:throw a(Error(329))}}function Vu(e,t){e<fu&&1<e&&(fu=e),null!==t&&e<hu&&1<e&&(hu=e,pu=t)}function zu(e){var t=Zu(e.alternate,e,cu);return e.memoizedProps=e.pendingProps,null===t&&(t=Wu(e)),$a.current=null,t}function Wu(e){su=e;do{var t=su.alternate;if(e=su.return,0===(1024&su.effectTag)){e:{var n=t,r=cu,i=(t=su).pendingProps;switch(t.tag){case 2:case 16:break;case 15:case 0:break;case 1:Ur(t.type)&&Fr();break;case 3:si(),Br(),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==n&&null!==n.child||(sa(t),t.effectTag&=-3),xa(t);break;case 5:li(t),r=ai(ii.current);var u=t.type;if(null!==n&&null!=t.stateNode)Aa(n,t,u,i,r),n.ref!==t.ref&&(t.effectTag|=128);else if(i){var s=ai(ri.current);if(sa(t)){i=void 0,u=(n=t).stateNode;var c=n.type,l=n.memoizedProps;switch(u[R]=n,u[j]=l,c){case"iframe":case"object":case"embed":jn("load",u);break;case"video":case"audio":for(var f=0;f<ne.length;f++)jn(ne[f],u);break;case"source":jn("error",u);break;case"img":case"image":case"link":jn("error",u),jn("load",u);break;case"form":jn("reset",u),jn("submit",u);break;case"details":jn("toggle",u);break;case"input":St(u,l),jn("invalid",u),wr(r,"onChange");break;case"select":u._wrapperState={wasMultiple:!!l.multiple},jn("invalid",u),wr(r,"onChange");break;case"textarea":or(u,l),jn("invalid",u),wr(r,"onChange")}for(i in gr(c,l),f=null,l)l.hasOwnProperty(i)&&(s=l[i],"children"===i?"string"===typeof s?u.textContent!==s&&(f=["children",s]):"number"===typeof s&&u.textContent!==""+s&&(f=["children",""+s]):p.hasOwnProperty(i)&&null!=s&&wr(r,i));switch(c){case"input":We(u),kt(u,l,!0);break;case"textarea":We(u),ar(u);break;case"select":case"option":break;default:"function"===typeof l.onClick&&(u.onclick=Er)}r=f,n.updateQueue=r,null!==r&&ka(t)}else{l=u,n=i,c=t,f=9===r.nodeType?r:r.ownerDocument,s===ur.html&&(s=sr(l)),s===ur.html?"script"===l?((l=f.createElement("div")).innerHTML="<script><\/script>
1",f=l.removeChild(l.firstChild)):"string"===typeof n.is?f=f.createElement(l,{is:n.is}):(f=f.createElement(l),"select"===l&&(l=f,n.multiple?l.multiple=!0:n.size&&(l.size=n.size))):f=f.createElementNS(s,l),(l=f)[R]=c,l[j]=n,Ca(n=l,t,!1,!1),c=n;var h=r,d=br(u,i);switch(u){case"iframe":case"object":case"embed":jn("load",c),r=i;break;case"video":case"audio":for(r=0;r<ne.length;r++)jn(ne[r],c);r=i;break;case"source":jn("error",c),r=i;break;case"img":case"image":case"link":jn("error",c),jn("load",c),r=i;break;case"form":jn("reset",c),jn("submit",c),r=i;break;case"details":jn("toggle",c),r=i;break;case"input":St(c,i),r=_t(c,i),jn("invalid",c),wr(h,"onChange");break;case"option":r=tr(c,i);break;case"select":c._wrapperState={wasMultiple:!!i.multiple},r=o({},i,{value:void 0}),jn("invalid",c),wr(h,"onChange");break;case"textarea":or(c,i),r=rr(c,i),jn("invalid",c),wr(h,"onChange");break;default:r=i}gr(u,r),l=void 0,f=u,s=c;var m=r;for(l in m)if(m.hasOwnProperty(l)){var y=m[l];"style"===l?yr(s,y):"dangerouslySetInnerHTML"===l?null!=(y=y?y.__html:void 0)&&fr(s,y):"children"===l?"string"===typeof y?("textarea"!==f||""!==y)&&hr(s,y):"number"===typeof y&&hr(s,""+y):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(p.hasOwnProperty(l)?null!=y&&wr(h,l):null!=y&&wt(s,l,y,d))}switch(u){case"input":We(c),kt(c,i,!1);break;case"textarea":We(c),ar(c);break;case"option":null!=i.value&&c.setAttribute("value",""+Et(i.value));break;case"select":r=c,c=i,r.multiple=!!c.multiple,null!=(l=c.value)?nr(r,!!c.multiple,l,!1):null!=c.defaultValue&&nr(r,!!c.multiple,c.defaultValue,!0);break;default:"function"===typeof r.onClick&&(c.onclick=Er)}Tr(u,i)&&ka(t),t.stateNode=n}null!==t.ref&&(t.effectTag|=128)}else if(null===t.stateNode)throw a(Error(166));break;case 6:if(n&&null!=t.stateNode)Ia(n,t,n.memoizedProps,i);else{if("string"!==typeof i&&null===t.stateNode)throw a(Error(166));n=ai(ii.current),ai(ri.current),sa(t)?(r=t.stateNode,n=t.memoizedProps,r[R]=t,r.nodeValue!==n&&ka(t)):(r=t,(n=(9===n.nodeType?n:n.ownerDocument).createTextNode(i))[R]=t,r.stateNode=n)}break;case 11:break;case 13:if(Nr(di),i=t.memoizedState,0!==(64&t.effectTag)){t.expirationTime=r;break e}r=null!==i,i=!1,null===n?sa(t):(i=null!==(u=n.memoizedState),r||null===u||null!==(u=n.child.sibling)&&(null!==(c=t.firstEffect)?(t.firstEffect=u,u.nextEffect=c):(t.firstEffect=t.lastEffect=u,u.nextEffect=null),u.effectTag=8)),r&&!i&&0!==(2&t.mode)&&(null===n&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!==(di.current&hi)?lu===tu&&(lu=ru):lu!==tu&&lu!==ru||(lu=ou)),(r||i)&&(t.effectTag|=4);break;case 7:case 8:case 12:break;case 4:si(),xa(t);break;case 10:ko(t);break;case 9:case 14:break;case 17:Ur(t.type)&&Fr();break;case 18:break;case 19:if(Nr(di),null===(i=t.memoizedState))break;if(u=0!==(64&t.effectTag),null===(c=i.rendering)){if(u)Na(i,!1);else if(lu!==tu||null!==n&&0!==(64&n.effectTag))for(n=t.child;null!==n;){if(null!==(c=mi(n))){for(t.effectTag|=64,Na(i,!1),null!==(n=c.updateQueue)&&(t.updateQueue=n,t.effectTag|=4),t.firstEffect=t.lastEffect=null,n=t.child;null!==n;)u=r,(i=n).effectTag&=2,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null,null===(c=i.alternate)?(i.childExpirationTime=0,i.expirationTime=u,i.child=null,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null):(i.childExpirationTime=c.childExpirationTime,i.expirationTime=c.expirationTime,i.child=c.child,i.memoizedProps=c.memoizedProps,i.memoizedState=c.memoizedState,i.updateQueue=c.updateQueue,u=c.dependencies,i.dependencies=null===u?null:{expirationTime:u.expirationTime,firstContext:u.firstContext,responders:u.responders}),n=n.sibling;Dr(di,di.current&fi|pi),t=t.child;break e}n=n.sibling}}else{if(!u)if(null!==(n=mi(c))){if(t.effectTag|=64,u=!0,Na(i,!0),null===i.tail&&"hidden"===i.tailMode){null!==(r=n.updateQueue)&&(t.updateQueue=r,t.effectTag|=4),null!==(t=t.lastEffect=i.lastEffect)&&(t.nextEffect=null);break}}else co()>i.tailExpiration&&1<r&&(t.effectTag|=64,u=!0,Na(i,!1),t.expirationTime=t.childExpirationTime=r-1);i.isBackwards?(c.sibling=t.child,t.child=c):(null!==(r=i.last)?r.sibling=c:t.child=c,i.last=c)}if(null!==i.tail){0===i.tailExpiration&&(i.tailExpiration=co()+500),r=i.tail,i.rendering=r,i.tail=r.sibling,i.lastEffect=t.lastEffect,r.sibling=null,n=di.current,Dr(di,n=u?n&fi|pi:n&fi),t=r;break e}break;case 20:break;default:throw a(Error(156))}t=null}if(r=su,1===cu||1!==r.childExpirationTime){for(n=0,i=r.child;null!==i;)(u=i.expirationTime)>n&&(n=u),(c=i.childExpirationTime)>n&&(n=c),i=i.sibling;r.childExpirationTime=n}if(null!==t)return t;null!==e&&0===(1024&e.effectTag)&&(null===e.firstEffect&&(e.firstEffect=su.firstEffect),null!==su.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=su.firstEffect),e.lastEffect=su.lastEffect),1<su.effectTag&&(null!==e.lastEffect?e.lastEffect.nextEffect=su:e.firstEffect=su,e.lastEffect=su))}else{if(null!==(t=Da(su)))return t.effectTag&=1023,t;null!==e&&(e.firstEffect=e.lastEffect=null,e.effectTag|=1024)}if(null!==(t=su.sibling))return t;su=e}while(null!==su);return lu===tu&&(lu=iu),null}function Qu(e){var t=lo();return ho(99,Gu.bind(null,e,t)),null!==_u&&po(97,(function(){return Ku(),null})),null}function Gu(e,t){if(Ku(),(au&(Za|eu))!==Xa)throw a(Error(327));var n=e.finishedWork,r=e.finishedExpirationTime;if(null===n)return null;if(e.finishedWork=null,e.finishedExpirationTime=0,n===e.current)throw a(Error(177));e.callbackNode=null,e.callbackExpirationTime=0;var o=n.expirationTime,i=n.childExpirationTime;if(o=i>o?i:o,e.firstPendingTime=o,o<e.lastPendingTime&&(e.lastPendingTime=o),e===uu&&(su=uu=null,cu=0),1<n.effectTag?null!==n.lastEffect?(n.lastEffect.nextEffect=n,o=n.firstEffect):o=n:o=n.firstEffect,null!==o){i=au,au|=eu,$a.current=null,_r=Rn;var u=Qn();if(Gn(u)){if("selectionStart"in u)var s={start:u.selectionStart,end:u.selectionEnd};else e:{var c=(s=(s=u.ownerDocument)&&s.defaultView||window).getSelection&&s.getSelection();if(c&&0!==c.rangeCount){s=c.anchorNode;var l=c.anchorOffset,f=c.focusNode;c=c.focusOffset;try{s.nodeType,f.nodeType}catch(F){s=null;break e}var h=0,p=-1,d=-1,m=0,y=0,v=u,g=null;t:for(;;){for(var b;
1v!==s||0!==l&&3!==v.nodeType||(p=h+l),v!==f||0!==c&&3!==v.nodeType||(d=h+c),3===v.nodeType&&(h+=v.nodeValue.length),null!==(b=v.firstChild);)g=v,v=b;for(;;){if(v===u)break t;if(g===s&&++m===l&&(p=h),g===f&&++y===c&&(d=h),null!==(b=v.nextSibling))break;g=(v=g).parentNode}v=b}s=-1===p||-1===d?null:{start:p,end:d}}else s=null}s=s||{start:0,end:0}}else s=null;Sr={focusedElem:u,selectionRange:s},Rn=!1,vu=o;do{try{for(;null!==vu;){if(0!==(256&vu.effectTag)){var w=vu.alternate;switch((u=vu).tag){case 0:case 11:case 15:La(vi,yi,u);break;case 1:if(256&u.effectTag&&null!==w){var E=w.memoizedProps,_=w.memoizedState,S=u.stateNode,T=S.getSnapshotBeforeUpdate(u.elementType===u.type?E:bo(u.type,E),_);S.__reactInternalSnapshotBeforeUpdate=T}break;case 3:case 5:case 6:case 4:case 17:break;default:throw a(Error(163))}}vu=vu.nextEffect}}catch(F){if(null===vu)throw a(Error(330));$u(vu,F),vu=vu.nextEffect}}while(null!==vu);vu=o;do{try{for(w=t;null!==vu;){var O=vu.effectTag;if(16&O&&hr(vu.stateNode,""),128&O){var k=vu.alternate;if(null!==k){var C=k.ref;null!==C&&("function"===typeof C?C(null):C.current=null)}}switch(14&O){case 2:qa(vu),vu.effectTag&=-3;break;case 6:qa(vu),vu.effectTag&=-3,za(vu.alternate,vu);break;case 4:za(vu.alternate,vu);break;case 8:Va(E=vu,w),E.return=null,E.child=null,E.memoizedState=null,E.updateQueue=null,E.dependencies=null;var x=E.alternate;null!==x&&(x.return=null,x.child=null,x.memoizedState=null,x.updateQueue=null,x.dependencies=null)}vu=vu.nextEffect}}catch(F){if(null===vu)throw a(Error(330));$u(vu,F),vu=vu.nextEffect}}while(null!==vu);if(C=Sr,k=Qn(),O=C.focusedElem,w=C.selectionRange,k!==O&&O&&O.ownerDocument&&function e(t,n){return!(!t||!n)&&(t===n||(!t||3!==t.nodeType)&&(n&&3===n.nodeType?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}(O.ownerDocument.documentElement,O)){null!==w&&Gn(O)&&(k=w.start,void 0===(C=w.end)&&(C=k),"selectionStart"in O?(O.selectionStart=k,O.selectionEnd=Math.min(C,O.value.length)):(C=(k=O.ownerDocument||document)&&k.defaultView||window).getSelection&&(C=C.getSelection(),E=O.textContent.length,x=Math.min(w.start,E),w=void 0===w.end?x:Math.min(w.end,E),!C.extend&&x>w&&(E=w,w=x,x=E),E=Wn(O,x),_=Wn(O,w),E&&_&&(1!==C.rangeCount||C.anchorNode!==E.node||C.anchorOffset!==E.offset||C.focusNode!==_.node||C.focusOffset!==_.offset)&&((k=k.createRange()).setStart(E.node,E.offset),C.removeAllRanges(),x>w?(C.addRange(k),C.extend(_.node,_.offset)):(k.setEnd(_.node,_.offset),C.addRange(k))))),k=[];for(C=O;C=C.parentNode;)1===C.nodeType&&k.push({element:C,left:C.scrollLeft,top:C.scrollTop});for("function"===typeof O.focus&&O.focus(),O=0;O<k.length;O++)(C=k[O]).element.scrollLeft=C.left,C.element.scrollTop=C.top}Sr=null,Rn=!!_r,_r=null,e.current=n,vu=o;do{try{for(O=r;null!==vu;){var A=vu.effectTag;if(36&A){var I=vu.alternate;switch(C=O,(k=vu).tag){case 0:case 11:case 15:La(wi,Ei,k);break;case 1:var N=k.stateNode;if(4&k.effectTag)if(null===I)N.componentDidMount();else{var D=k.elementType===k.type?I.memoizedProps:bo(k.type,I.memoizedProps);N.componentDidUpdate(D,I.memoizedState,N.__reactInternalSnapshotBeforeUpdate)}var P=k.updateQueue;null!==P&&Bo(0,P,N);break;case 3:var R=k.updateQueue;if(null!==R){if(x=null,null!==k.child)switch(k.child.tag){case 5:x=k.child.stateNode;break;case 1:x=k.child.stateNode}Bo(0,R,x)}break;case 5:var j=k.stateNode;null===I&&4&k.effectTag&&(C=j,Tr(k.type,k.memoizedProps)&&C.focus());break;case 6:case 4:case 12:break;case 13:case 19:case 17:case 20:break;default:throw a(Error(163))}}if(128&A){var M=vu.ref;if(null!==M){var L=vu.stateNode;switch(vu.tag){case 5:var U=L;break;default:U=L}"function"===typeof M?M(U):M.current=U}}512&A&&(Eu=!0),vu=vu.nextEffect}}catch(F){if(null===vu)throw a(Error(330));$u(vu,F),vu=vu.nextEffect}}while(null!==vu);vu=null,oo(),au=i}else e.current=n;if(Eu)Eu=!1,_u=e,Tu=r,Su=t;else for(vu=o;null!==vu;)t=vu.nextEffect,vu.nextEffect=null,vu=t;if(0!==(t=e.firstPendingTime)?Ru(e,A=go(A=Au(),t),t):wu=null,"function"===typeof es&&es(n.stateNode,r),1073741823===t?e===Cu?ku++:(ku=0,Cu=e):ku=0,gu)throw gu=!1,e=bu,bu=null,e;return(au&Ja)!==Xa?null:(yo(),null)}
1function Ku(){if(null===_u)return!1;var e=_u,t=Tu,n=Su;return _u=null,Tu=0,Su=90,ho(97<n?97:n,Hu.bind(null,e,t))}function Hu(e){if((au&(Za|eu))!==Xa)throw a(Error(331));var t=au;for(au|=eu,e=e.current.firstEffect;null!==e;){try{var n=e;if(0!==(512&n.effectTag))switch(n.tag){case 0:case 11:case 15:La(Si,yi,n),La(yi,_i,n)}}catch(r){if(null===e)throw a(Error(330));$u(e,r)}n=e.nextEffect,e.nextEffect=null,e=n}return au=t,yo(),!0}function Yu(e,t,n){jo(e,t=Ga(e,t=Pa(n,t),1073741823)),null!==(e=Pu(e,1073741823))&&Ru(e,99,1073741823)}function $u(e,t){if(3===e.tag)Yu(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){Yu(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"===typeof n.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===wu||!wu.has(r))){jo(n,e=Ka(n,e=Pa(t,e),1073741823)),null!==(n=Pu(n,1073741823))&&Ru(n,99,1073741823);break}}n=n.return}}function Xu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),uu===e&&cu===n?lu===ou||lu===ru&&1073741823===fu&&co()-mu<yu?Bu(e,cu):du=!0:e.lastPendingTime<n||(0!==(t=e.pingTime)&&t<n||(e.pingTime=n,e.finishedExpirationTime===n&&(e.finishedExpirationTime=0,e.finishedWork=null),Ru(e,t=go(t=Au(),n),n)))}function Ju(e,t){var n=e.stateNode;null!==n&&n.delete(t),n=go(n=Au(),t=Iu(n,e,null)),null!==(e=Pu(e,t))&&Ru(e,n,t)}var Zu=void 0;Zu=function(e,t,n){var r=t.expirationTime;if(null!==e){var o=t.pendingProps;if(e.memoizedProps!==o||jr.current)fa=!0;else if(r<n){switch(fa=!1,t.tag){case 3:wa(t),ca();break;case 5:if(ci(t),4&t.mode&&1!==n&&o.hidden)return t.expirationTime=t.childExpirationTime=1,null;break;case 1:Ur(t.type)&&zr(t);break;case 4:ui(t,t.stateNode.containerInfo);break;case 10:Oo(t,t.memoizedProps.value);break;case 13:if(null!==t.memoizedState)return 0!==(r=t.child.childExpirationTime)&&r>=n?_a(e,t,n):(Dr(di,di.current&fi),null!==(t=Oa(e,t,n))?t.sibling:null);Dr(di,di.current&fi);break;case 19:if(r=t.childExpirationTime>=n,0!==(64&e.effectTag)){if(r)return Ta(e,t,n);t.effectTag|=64}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null),Dr(di,di.current),!r)return null}return Oa(e,t,n)}}else fa=!1;switch(t.expirationTime=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,o=Lr(t,Rr.current),xo(t,n),o=Bi(null,t,r,e,o,n),t.effectTag|=1,"object"===typeof o&&null!==o&&"function"===typeof o.render&&void 0===o.$$typeof){if(t.tag=1,qi(),Ur(r)){var i=!0;zr(t)}else i=!1;t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null;var u=r.getDerivedStateFromProps;"function"===typeof u&&Wo(t,r,u,e),o.updater=Qo,t.stateNode=o,o._reactInternalFiber=t,Yo(t,r,e,n),t=ba(null,t,r,!0,i,n)}else t.tag=0,ha(null,t,o,n),t=t.child;return t;case 16:switch(o=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,o=function(e){var t=e._result;switch(e._status){case 1:return t;case 2:case 0:throw t;default:switch(e._status=0,(t=(t=e._ctor)()).then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)})),e._status){case 1:return e._result;case 2:throw e._result}throw e._result=t,t}}(o),t.type=o,i=t.tag=function(e){if("function"===typeof e)return os(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===rt)return 11;if(e===at)return 14}return 2}(o),e=bo(o,e),i){case 0:t=va(null,t,o,e,n);break;case 1:t=ga(null,t,o,e,n);break;case 11:t=pa(null,t,o,e,n);break;case 14:t=da(null,t,o,bo(o.type,e),r,n);break;default:throw a(Error(306),o,"")}return t;case 0:return r=t.type,o=t.pendingProps,va(e,t,r,o=t.elementType===r?o:bo(r,o),n);case 1:return r=t.type,o=t.pendingProps,ga(e,t,r,o=t.elementType===r?o:bo(r,o),n);case 3:if(wa(t),null===(r=t.updateQueue))throw a(Error(282));return o=null!==(o=t.memoizedState)?o.element:null,Fo(t,r,t.pendingProps,null,n),(r=t.memoizedState.element)===o?(ca(),t=Oa(e,t,n)):(o=t.stateNode,(o=(null===e||null===e.child)&&o.hydrate)&&(na=xr(t.stateNode.containerInfo.firstChild),ta=t,o=ra=!0),o?(t.effectTag|=2,t.child=ti(t,null,r,n)):(ha(e,t,r,n),ca()),t=t.child),t;case 5:return ci(t),null===e&&aa(t),r=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,u=o.children,Or(r,o)?u=null:null!==i&&Or(r,i)&&(t.effectTag|=16),ya(e,t),4&t.mode&&1!==n&&o.hidden?(t.expirationTime=t.childExpirationTime=1,t=null):(ha(e,t,u,n),t=t.child),t;case 6:return null===e&&aa(t),null;case 13:return _a(e,t,n);case 4:return ui(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=ei(t,null,r,n):ha(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,pa(e,t,r,o=t.elementType===r?o:bo(r,o),n);case 7:return ha(e,t,t.pendingProps,n),t.child;case 8:case 12:return ha(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,u=t.memoizedProps,Oo(t,i=o.value),null!==u){var s=u.value;if(0===(i=tn(s,i)?0:0|("function"===typeof r._calculateChangedBits?r._
1calculateChangedBits(s,i):1073741823))){if(u.children===o.children&&!jr.current){t=Oa(e,t,n);break e}}else for(null!==(s=t.child)&&(s.return=t);null!==s;){var c=s.dependencies;if(null!==c){u=s.child;for(var l=c.firstContext;null!==l;){if(l.context===r&&0!==(l.observedBits&i)){1===s.tag&&((l=Po(n,null)).tag=2,jo(s,l)),s.expirationTime<n&&(s.expirationTime=n),null!==(l=s.alternate)&&l.expirationTime<n&&(l.expirationTime=n),Co(s.return,n),c.expirationTime<n&&(c.expirationTime=n);break}l=l.next}}else u=10===s.tag&&s.type===t.type?null:s.child;if(null!==u)u.return=s;else for(u=s;null!==u;){if(u===t){u=null;break}if(null!==(s=u.sibling)){s.return=u.return,u=s;break}u=u.return}s=u}}ha(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=(i=t.pendingProps).children,xo(t,n),r=r(o=Ao(o,i.unstable_observedBits)),t.effectTag|=1,ha(e,t,r,n),t.child;case 14:return i=bo(o=t.type,t.pendingProps),da(e,t,o,i=bo(o.type,i),r,n);case 15:return ma(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:bo(r,o),null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),t.tag=1,Ur(r)?(e=!0,zr(t)):e=!1,xo(t,n),Ko(t,r,o),Yo(t,r,o,n),ba(null,t,r,!0,e,n);case 19:return Ta(e,t,n)}throw a(Error(156))};var es=null,ts=null;function ns(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function rs(e,t,n,r){return new ns(e,t,n,r)}function os(e){return!(!(e=e.prototype)||!e.isReactComponent)}function is(e,t){var n=e.alternate;return null===n?((n=rs(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.effectTag=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childExpirationTime=e.childExpirationTime,n.expirationTime=e.expirationTime,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{expirationTime:t.expirationTime,firstContext:t.firstContext,responders:t.responders},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function as(e,t,n,r,o,i){var u=2;if(r=e,"function"===typeof e)os(e)&&(u=1);else if("string"===typeof e)u=5;else e:switch(e){case Xe:return us(n.children,o,i,t);case nt:u=8,o|=7;break;case Je:u=8,o|=1;break;case Ze:return(e=rs(12,n,t,8|o)).elementType=Ze,e.type=Ze,e.expirationTime=i,e;case ot:return(e=rs(13,n,t,o)).type=ot,e.elementType=ot,e.expirationTime=i,e;case it:return(e=rs(19,n,t,o)).elementType=it,e.expirationTime=i,e;default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case et:u=10;break e;case tt:u=9;break e;case rt:u=11;break e;case at:u=14;break e;case ut:u=16,r=null;break e}throw a(Error(130),null==e?e:typeof e,"")}return(t=rs(u,n,t,o)).elementType=e,t.type=r,t.expirationTime=i,t}function us(e,t,n,r){return(e=rs(7,e,r,t)).expirationTime=n,e}function ss(e,t,n){return(e=rs(6,e,null,t)).expirationTime=n,e}function cs(e,t,n){return(t=rs(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ls(e,t,n){this.tag=t,this.current=null,this.containerInfo=e,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=this.firstBatch=null,this.pingTime=this.lastPendingTime=this.firstPendingTime=this.callbackExpirationTime=0}function fs(e,t,n){return e=new ls(e,t,n),t=rs(3,null,null,2===t?7:1===t?3:0),e.current=t,t.stateNode=e}function hs(e,t,n,r,o,i){var u=t.current;e:if(n){t:{if(2!==an(n=n._reactInternalFiber)||1!==n.tag)throw a(Error(170));var s=n;do{switch(s.tag){case 3:s=s.stateNode.context;break t;case 1:if(Ur(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break t}}s=s.return}while(null!==s);throw a(Error(171))}if(1===n.tag){var c=n.type;if(Ur(c)){n=Vr(n,c,s);break e}}n=s}else n=Pr;return null===t.context?t.context=n:t.pendingContext=n,t=i,(o=Po(r,o)).payload={element:e},null!==(t=void 0===t?null:t)&&(o.callback=t),jo(u,o),Du(u,r),r}function ps(e,t,n,r){var o=t.current,i=Au(),a=Vo.suspense;return hs(e,t,n,o=Iu(i,o,a),a,r)}function ds(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function ms(e){var t=1073741821-25*(1+((1073741821-Au()+500)/25|0));t<=Nu&&--t,this._expirationTime=Nu=t,this._root=e,this._callbacks=this._next=null,this._hasChildren=this._didComplete=!1,this._children=null,this._defer=!0}function ys(){this._callbacks=null,this._didCommit=!1,this._onCommit=this._onCommit.bind(this)}
1function vs(e,t,n){this._internalRoot=fs(e,t,n)}function gs(e,t){this._internalRoot=fs(e,2,t)}function bs(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function ws(e,t,n,r,o){var i=n._reactRootContainer,a=void 0;if(i){if(a=i._internalRoot,"function"===typeof o){var u=o;o=function(){var e=ds(a);u.call(e)}}ps(t,a,e,o)}else{if(i=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new vs(e,0,t)}(n,r),a=i._internalRoot,"function"===typeof o){var s=o;o=function(){var e=ds(a);s.call(e)}}Fu((function(){ps(t,a,e,o)}))}return ds(a)}function Es(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!bs(t))throw a(Error(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:$e,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)}Ce=function(e,t,n){switch(t){case"input":if(Ot(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=F(r);if(!o)throw a(Error(90));Qe(r),Ot(r,o)}}}break;case"textarea":ir(e,n);break;case"select":null!=(t=n.value)&&nr(e,!!n.multiple,t,!1)}},ms.prototype.render=function(e){if(!this._defer)throw a(Error(250));this._hasChildren=!0,this._children=e;var t=this._root._internalRoot,n=this._expirationTime,r=new ys;return hs(e,t,null,n,null,r._onCommit),r},ms.prototype.then=function(e){if(this._didComplete)e();else{var t=this._callbacks;null===t&&(t=this._callbacks=[]),t.push(e)}},ms.prototype.commit=function(){var e=this._root._internalRoot,t=e.firstBatch;if(!this._defer||null===t)throw a(Error(251));if(this._hasChildren){var n=this._expirationTime;if(t!==this){this._hasChildren&&(n=this._expirationTime=t._expirationTime,this.render(this._children));for(var r=null,o=t;o!==this;)r=o,o=o._next;if(null===r)throw a(Error(251));r._next=o._next,this._next=t,e.firstBatch=this}if(this._defer=!1,t=n,(au&(Za|eu))!==Xa)throw a(Error(253));mo(qu.bind(null,e,t)),yo(),t=this._next,this._next=null,null!==(t=e.firstBatch=t)&&t._hasChildren&&t.render(t._children)}else this._next=null,this._defer=!1},ms.prototype._onComplete=function(){if(!this._didComplete){this._didComplete=!0;var e=this._callbacks;if(null!==e)for(var t=0;t<e.length;t++)(0,e[t])()}},ys.prototype.then=function(e){if(this._didCommit)e();else{var t=this._callbacks;null===t&&(t=this._callbacks=[]),t.push(e)}},ys.prototype._onCommit=function(){if(!this._didCommit){this._didCommit=!0;var e=this._callbacks;if(null!==e)for(var t=0;t<e.length;t++){var n=e[t];if("function"!==typeof n)throw a(Error(191),n);n()}}},gs.prototype.render=vs.prototype.render=function(e,t){var n=this._internalRoot,r=new ys;return null!==(t=void 0===t?null:t)&&r.then(t),ps(e,n,null,r._onCommit),r},gs.prototype.unmount=vs.prototype.unmount=function(e){var t=this._internalRoot,n=new ys;return null!==(e=void 0===e?null:e)&&n.then(e),ps(null,t,null,n._onCommit),n},gs.prototype.createBatch=function(){var e=new ms(this),t=e._expirationTime,n=this._internalRoot,r=n.firstBatch;if(null===r)n.firstBatch=e,e._next=null;else{for(n=null;null!==r&&r._expirationTime>=t;)n=r,r=r._next;e._next=r,null!==n&&(n._next=e)}return e},Pe=Lu,Re=Uu,je=Mu,Me=function(e,t){var n=au;au|=2;try{return e(t)}finally{(au=n)===Xa&&yo()}};var _s={createPortal:Es,findDOMNode:function(e){if(null==e)e=null;else if(1!==e.nodeType){var t=e._reactInternalFiber;if(void 0===t){if("function"===typeof e.render)throw a(Error(188));throw a(Error(268),Object.keys(e))}e=null===(e=sn(t))?null:e.stateNode}return e},hydrate:function(e,t,n){if(!bs(t))throw a(Error(200));return ws(null,e,t,!0,n)},render:function(e,t,n){if(!bs(t))throw a(Error(200));return ws(null,e,t,!1,n)},unstable_renderSubtreeIntoContainer:function(e,t,n,r){if(!bs(n))throw a(Error(200));if(null==e||void 0===e._reactInternalFiber)throw a(Error(38));return ws(e,t,n,!1,r)},unmountComponentAtNode:function(e){if(!bs(e))throw a(Error(40));return!!e._reactRootContainer&&(Fu((function(){ws(null,null,e,!1,(function(){e._reactRootContainer=null}))})),!0)},unstable_createPortal:function(){return Es.apply(void 0,arguments)},unstable_batchedUpdates:Lu,unstable_interactiveUpdates:function(e,t,n,r){return Mu(),Uu(e,t,n,r)},unstable_discreteUpdates:Uu,unstable_flushDiscreteUpdates:Mu,flushSync:function(e,t){if((au&(Za|eu))!==Xa)throw a(Error(187));var n=au;au|=1;try{return ho(99,e.bind(null,t))}finally{au=n,yo()}},unstable_createRoot:function(e,t){if(!bs(e))throw a(Error(299),"unstable_createRoot");return new gs(e,null!=t&&!0===t.hydrate)}
1,unstable_createSyncRoot:function(e,t){if(!bs(e))throw a(Error(299),"unstable_createRoot");return new vs(e,1,null!=t&&!0===t.hydrate)},unstable_flushControlled:function(e){var t=au;au|=1;try{ho(99,e)}finally{(au=t)===Xa&&yo()}},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{Events:[L,U,F,N.injectEventPluginsByName,h,Q,function(e){C(e,W)},Ne,De,Fn,I,Ku,{current:!1}]}};!function(e){var t=e.findFiberByHostInstance;(function(e){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);es=function(e){try{t.onCommitFiberRoot(n,e,void 0,64===(64&e.current.effectTag))}catch(r){}},ts=function(e){try{t.onCommitFiberUnmount(n,e)}catch(r){}}}catch(r){}})(o({},e,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ge.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=sn(e))?null:e.stateNode},findFiberByHostInstance:function(e){return t?t(e):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))}({findFiberByHostInstance:M,bundleType:0,version:"16.9.0",rendererPackageName:"react-dom"});var Ss={default:_s},Ts=Ss&&_s||Ss;e.exports=Ts.default||Ts},function(e,t,n){"use strict";e.exports=n(257)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=void 0,o=void 0,i=void 0,a=void 0,u=void 0;if(t.unstable_now=void 0,t.unstable_forceFrameRate=void 0,"undefined"===typeof window||"function"!==typeof MessageChannel){var s=null,c=null,l=function e(){if(null!==s)try{var n=t.unstable_now();s(!0,n),s=null}catch(r){throw setTimeout(e,0),r}};t.unstable_now=function(){return Date.now()},r=function(e){null!==s?setTimeout(r,0,e):(s=e,setTimeout(l,0))},o=function(e,t){c=setTimeout(e,t)},i=function(){clearTimeout(c)},a=function(){return!1},u=t.unstable_forceFrameRate=function(){}}else{var f=window.performance,h=window.Date,p=window.setTimeout,d=window.clearTimeout,m=window.requestAnimationFrame,y=window.cancelAnimationFrame;"undefined"!==typeof console&&("function"!==typeof m&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!==typeof y&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")),t.unstable_now="object"===typeof f&&"function"===typeof f.now?function(){return f.now()}:function(){return h.now()};var v=!1,g=null,b=-1,w=-1,E=33.33,_=-1,S=-1,T=0,O=!1;a=function(){return t.unstable_now()>=T},u=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):0<e?(E=Math.floor(1e3/e),O=!0):(E=33.33,O=!1)};var k=function(){if(null!==g){var e=t.unstable_now(),n=0<T-e;try{g(n,e)||(g=null)}catch(r){throw x.postMessage(null),r}}},C=new MessageChannel,x=C.port2;C.port1.onmessage=k;r=function(e){g=e,v||(v=!0,m((function(e){!function e(n){if(null===g)S=_=-1,v=!1;else{v=!0,m((function(t){d(b),e(t)}));if(b=p((function e(){T=t.unstable_now()+E/2,k(),b=p(e,3*E)}),3*E),-1!==_&&.1<n-_){var r=n-_;!O&&-1!==S&&r<E&&S<E&&(8.33>(E=r<S?S:r)&&(E=8.33)),S=r}_=n,T=n+E,x.postMessage(null)}}(e)})))},o=function(e,n){w=p((function(){e(t.unstable_now())}),n)},i=function(){d(w),w=-1}}var A=null,I=null,N=null,D=3,P=!1,R=!1,j=!1;function M(e,t){var n=e.next;if(n===e)A=null;else{e===A&&(A=n);var r=e.previous;r.next=n,n.previous=r}e.next=e.previous=null,n=e.callback,r=D;var o=N;D=e.priorityLevel,N=e;try{var i=e.expirationTime<=t;switch(D){case 1:var a=n(i);break;case 2:case 3:case 4:a=n(i);break;case 5:a=n(i)}}catch(u){throw u}finally{D=r,N=o}if("function"===typeof a)if(t=e.expirationTime,e.callback=a,null===A)A=e.next=e.previous=e;else{a=null,i=A;do{if(t<=i.expirationTime){a=i;break}i=i.next}while(i!==A);null===a?a=A:a===A&&(A=e),(t=a.previous).next=a.previous=e,e.next=a,e.previous=t}}function L(e){if(null!==I&&I.startTime<=e)do{var t=I,n=t.next;if(t===n)I=null;else{I=n;var r=t.previous;r.next=n,n.previous=r}t.next=t.previous=null,q(t,t.expirationTime)}while(null!==I&&I.startTime<=e)}function U(e){j=!1,L(e),R||(null!==A?(R=!0,r(F)):null!==I&&o(U,I.startTime-e))}function F(e,n){R=!1,j&&(j=!1,i()),L(n),P=!0;try{if(e){if(null!==A)do{M(A,n),L(n=t.unstable_now())}while(null!==A&&!a())}else for(;null!==A&&A.expirationTime<=n;)M(A,n),L(n=t.unstable_now());return null!==A||(null!==I&&o(U,I.startTime-n),!1)}finally{P=!1}}function B(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}function q(e,t){if(null===A)A=e.next=e.previous=e;else{var n=null,r=A;do{if(t<r.expirationTime){n=r;break}r=r.next}
1while(r!==A);null===n?n=A:n===A&&(A=e),(t=n.previous).next=n.previous=e,e.next=n,e.previous=t}}var V=u;t.unstable_ImmediatePriority=1,t.unstable_UserBlockingPriority=2,t.unstable_NormalPriority=3,t.unstable_IdlePriority=5,t.unstable_LowPriority=4,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=D;D=e;try{return t()}finally{D=n}},t.unstable_next=function(e){switch(D){case 1:case 2:case 3:var t=3;break;default:t=D}var n=D;D=t;try{return e()}finally{D=n}},t.unstable_scheduleCallback=function(e,n,a){var u=t.unstable_now();if("object"===typeof a&&null!==a){var s=a.delay;s="number"===typeof s&&0<s?u+s:u,a="number"===typeof a.timeout?a.timeout:B(e)}else a=B(e),s=u;if(e={callback:n,priorityLevel:e,startTime:s,expirationTime:a=s+a,next:null,previous:null},s>u){if(a=s,null===I)I=e.next=e.previous=e;else{n=null;var c=I;do{if(a<c.startTime){n=c;break}c=c.next}while(c!==I);null===n?n=I:n===I&&(I=e),(a=n.previous).next=n.previous=e,e.next=n,e.previous=a}null===A&&I===e&&(j?i():j=!0,o(U,s-u))}else q(e,a),R||P||(R=!0,r(F));return e},t.unstable_cancelCallback=function(e){var t=e.next;if(null!==t){if(e===t)e===A?A=null:e===I&&(I=null);else{e===A?A=t:e===I&&(I=t);var n=e.previous;n.next=t,t.previous=n}e.next=e.previous=null}},t.unstable_wrapCallback=function(e){var t=D;return function(){var n=D;D=t;try{return e.apply(this,arguments)}finally{D=n}}},t.unstable_getCurrentPriorityLevel=function(){return D},t.unstable_shouldYield=function(){var e=t.unstable_now();return L(e),null!==N&&null!==A&&A.startTime<=e&&A.expirationTime<N.expirationTime||a()},t.unstable_requestPaint=V,t.unstable_continueExecution=function(){R||P||(R=!0,r(F))},t.unstable_pauseExecution=function(){},t.unstable_getFirstCallbackNode=function(){return A}},,,function(e,t,n){},function(e,t,n){"use strict";var r=n(262);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var u=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 u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array: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:i,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},,function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}},function(e,t){e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(e,t,n){var r=n(268),o=n(96),i=n(124);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},function(e,t,n){var r=n(269),o=n(276),i=n(277),a=n(278),u=n(279);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=u,e.exports=s},function(e,t,n){var r=n(95);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(e,t,n){var r=n(42),o=n(273),i=n(39),a=n(161),u=/^\[object .+?Constructor\]$/,s=Function.prototype,c=Object.prototype,l=s.toString,f=c.hasOwnProperty,h=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(r(e)?h:u).test(a(e))}},function(e,t,n){var r=n(64),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,u=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(s){}var o=a.call(e);return r&&(t?e[u]=n:delete e[u]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(274),o=function(){var e=/[^.]+$/.exec(r&&r.ke
vendor: 25,611 bytes, line 1
1ys&&r.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=function(e){return!!o&&o in e}},function(e,t,n){var r=n(38)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},function(e,t,n){var r=n(95),o="__lodash_hash_undefined__",i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return n===o?void 0:n}return i.call(t,e)?t[e]:void 0}},function(e,t,n){var r=n(95),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}},function(e,t,n){var r=n(95),o="__lodash_hash_undefined__";e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?o:t,this}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(97),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():o.call(t,n,1),--this.size,!0)}},function(e,t,n){var r=n(97);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},function(e,t,n){var r=n(97);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(97);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(98);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},function(e,t){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,n){var r=n(98);e.exports=function(e){return r(this,e).get(e)}},function(e,t,n){var r=n(98);e.exports=function(e){return r(this,e).has(e)}},function(e,t,n){var r=n(98);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},function(e,t){var n="__lodash_hash_undefined__";e.exports=function(e){return this.__data__.set(e,n),this}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t){e.exports=function(e){return e!==e}},function(e,t){e.exports=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}},function(e,t,n){var r=n(163),o=n(146),i=n(127),a=r&&1/i(new r([,-0]))[1]==1/0?function(e){return new r(e)}:o;e.exports=a},function(e,t,n){var r=n(296),o=n(169),i=n(81),a=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:i;e.exports=a},function(e,t){e.exports=function(e){return function(){return e}}},function(e,t){var n=800,r=16,o=Date.now;e.exports=function(e){var t=0,i=0;return function(){var a=o(),u=r-(a-i);if(i=a,u>0){if(++t>=n)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}},function(e,t,n){var r=n(48),o=n(40),i=n(26);e.exports=function(e){return function(t,n,a){var u=Object(t);if(!o(t)){var s=r(n,3);t=i(t),n=function(e){return s(u[e],e,u)}}var c=e(t,n,a);return c>-1?u[s?t[c]:c]:void 0}}},function(e,t,n){var r=n(300),o=n(318),i=n(178);e.exports=function(e){var t=o(e);return 1==t.length&&t[0][2]?i(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},function(e,t,n){var r=n(101),o=n(130),i=1,a=2;e.exports=function(e,t,n,u){var s=n.length,c=s,l=!u;if(null==e)return!c;for(e=Object(e);s--;){var f=n[s];if(l&&f[2]?f[1]!==e[f[0]]:!(f[0]in e))return!1}for(;++s<c;){var h=(f=n[s])[0],p=e[h],d=f[1];if(l&&f[2]){if(void 0===p&&!(h in e))return!1}else{var m=new r;if(u)var y=u(p,d,h,e,t,m);if(!(void 0===y?o(d,p,i|a,u,m):y))return!1}}return!0}},function(e,t,n){var r=n(96);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(96),o=n(124),i=n(123),a=200;e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var u=n.__data__;if(!o||u.length<a-1)return u.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(u)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(101),o=n(170),i=n(307),a=n(309),u=n(67),s=n(20),c=n(84),l=n(103),f=1,h="[object Arguments]",p="[object Array]",d="[object Object]",m=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,y,v,g){var b=s(e),w=s(t),E=b?p:u(e),_=w?p:u(t),S=(E=E==h?d:E)==d,T=(_=_==h?d:_)==d,O=E==_;if(O&&c(e)){if(!c(t))return!1;b=!0,S=!1}if(O&&!S)return g||(g=new r),b||l(e)?o(e,t,n,y,v,g):i(e,t,E,n,y,v,g);if(!(n&f)){var k=S&&m.call(e,"__wrapped__"),C=T&&m.call(t,"__wrapped__");if(k||C){var x=k?e.value():e,A=C?t.value():t;return g||(g=new r),v(x,A,n,y,g)}}return!!O&&(g||(g=new r),a(e,t,n,y,v,g))}},function(e,t,n){var r=n(64),o=n(172),i=n(79),a=n(170),u=n(308),s=n(127),c=1,l=2,f="[object Boolean]",h="[object Date]",p="[object Error]",d="[object Map]",m="[object Number]",y="[object RegExp]",v="[object Set]",g="[object String]",b="[object Symbol]",w="[object ArrayBuffer]",E="[object DataView]",_=r?r.prototype:void 0,S=_?_.valueOf:void 0;e.exports=function(e,t,n,r,_,T,O){switch(n){case E:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case w:return!(e.byteLength!=t.byteLength||!T(new o(e),new o(t)));case f:case h:case m:return i(+e,+t);case p:return e.name==t.name&&e.message==t.message;case y:case g:return e==t+"";case d:var k=u;case v:var C=r&c;if(k||(k=s),e.size!=t.size&&!C)return!1;var x=O.get(e);if(x)return x==t;r|=l,O.set(e,t);var A=a(k(e),k(t),r,_,T,O);return O.delete(e),A;case b:if(S)return S.call(e)==S.call(t)}return!1}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},function(e,t,n){var r=n(173),o=1,i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,a,u,s){var c=n&o,l=r(e),f=l.length;if(f!=r(t).length&&!c)return!1;for(var h=f;h--;){var p=l[h];if(!(c?p in t:i.call(t,p)))return!1}var d=s.get(e);if(d&&s.get(t))return d==t;var m=!0;s.set(e,t),s.set(t,e);for(var y=c;++h<f;){var v=e[p=l[h]],g=t[p];if(a)var b=c?a(g,v,p,t,e,s):a(v,g,p,e,t,s);if(!(void 0===b?v===g||u(v,g,n,a,s):b)){m=!1;break}y||(y="constructor"==p)}if(m&&!y){var w=e.constructor,E=t.constructor;w!=E&&"constructor"in e&&"constructor"in t&&!("function"==typeof w&&w instanceof w&&"function"==typeof E&&E instanceof E)&&(m=!1)}return s.delete(e),s.delete(t),m}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},function(e,t,n){var r=n(47),o=n(31),i="[object Arguments]";e.exports=function(e){return o(e)&&r(e)==i}},function(e,t){e.exports=function(){return!1}},function(e,t,n){var r=n(47),o=n(129),i=n(31),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!a[r(e)]}},function(e,t,n){var r=n(164)(Object.keys,Object);e.exports=r},function(e,t,n){var r=n(58)(n(38),"DataView");e.exports=r},function(e,t,n){var r=n(58)(n(38),"Promise");e.exports=r},function(e,t,n){var r=n(58)(n(38),"WeakMap");e.exports=r},function(e,t,n){var r=n(177),o=n(26);e.exports=function(e){for(var t=o(e),n=t.length;n--;){var i=t[n],a=e[i];t[n]=[i,a,r(a)]}return t}},function(e,t,n){var r=n(130),o=n(21),i=n(179),a=n(137),u=n(177),s=n(178),c=n(68),l=1,f=2;e.exports=function(e,t){return a(e)&&u(t)?s(c(e),t):function(n){var a=o(n,e);return void 0===a&&a===t?i(n,e):r(t,a,l|f)}}},function(e,t,n){var r=n(321),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,n,r,o){t.push(r?o.replace(i,"$1"):n||e)})),t}));e.exports=a},function(e,t,n){var r=n(322),o=500;e.exports=function(e){var t=r(e,(function(e){return n.size===o&&n.clear(),e})),n=t.cache;return t}},function(e,t,n){var r=n(123),o="Expected a function";function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(o);var n=function n(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(i.Cache||r),n}i.Cache=r,e.exports=i},function(e,t){e.exports=function(e,t){return null!=e&&t in Object(e)}},function(e,t,n){var r=n(181),o=n(325),i=n(137),a=n(68);e.exports=function(e){return i(e)?r(a(e)):o(e)}},function(e,t,n){var r=n(104);e.exports=function(e){return function(t){return r(t,e)}}},function(e,t,n){var r=n(59);e.exports=function(e,t){var n;return r(e,(function(e,r,o){return!(n=t(e,r,o))})),!!n}},function(e,t){e.exports=function(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),u=a.length;u--;){var s=a[e?u:++o];if(!1===n(i[s],s,i))break}return t}}},function(e,t,n){var r=n(40);e.exports=function(e,t){return function(n,o){if(null==n)return n;if(!r(n))return e(n,o);for(var i=n.length,a=t?i:-1,u=Object(n);(t?a--:++a<i)&&!1!==o(u[a],a,u););return n}}},function(e,t,n){var r=n(65);e.exports=function(e,t){return r(t,(function(t){return e[t]}))}},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(s){o=!0,i=s}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t,n){var r=n(81);e.exports=function(e){return"function"==typeof e?e:r}},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t,n){var r=n(167),o=n(86),i=n(336),a=n(337),u=n(68);e.exports=function(e,t,n){t=o(t,e);var s=null==(e=a(e,t))?e:e[u(i(t))];return null==s?void 0:r(s,e,n)}},function(e,t){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},function(e,t,n){var r=n(104),o=n(140);e.exports=function(e,t){return t.length<2?e:r(e,o(t,0,-1))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(339);n(7);var o=n(0);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})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(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&&function(e,t){(Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}(e,t)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}var p=function(){function e(t){a(this,e),c(this,"handlers",void 0),this.handlers=t.slice(0)}return s(e,[{key:"addHandlers",value:function(t){for(var n=this.handlers.slice(0),r=t.length,o=0;o<r;o+=1)n.push(t[o]);return new e(n)}},{key:"dispatchEvent",value:function(e,t){var n=this.handlers.length-1;if(t){for(var r=n;r>=0;r-=1)this.handlers[r].called||(this.handlers[r].called=!0,this.handlers[r](e));for(var o=n;o>=0;o-=1)this.handlers[o].called=!1}else(0,this.handlers[n])(e)}},{key:"hasHandlers",value:function(){return this.handlers.length>0}},{key:"removeHandlers",value:function(t){for(var n=[],r=this.handlers.length,o=0;o<r;o+=1){var i=this.handlers[o];-1===t.indexOf(i)&&n.push(i)}return new e(n)}}]),e}();function d(e){var t=new Map;return e.forEach((function(e,n){t.set(n,e)})),t}function m(e){return Array.isArray(e)?e:[e]}var y=function(e){return null!==e&&"object"===i(e)&&e.hasOwnProperty("current")};function v(e){return"document"===e?document:"window"===e?window:y(e)?e.current||document:e||document}var g=function(){function e(t,n){a(this,e),c(this,"handlerSets",void 0),c(this,"poolName",void 0),this.handlerSets=n,this.poolName=t}return s(e,[{key:"addHandlers",value:function(t,n){var r=d(this.handlerSets);if(r.has(t)){var o=r.get(t);r.set(t,o.addHandlers(n))}else r.set(t,new p(n));return new e(this.poolName,r)}},{key:"dispatchEvent",value:function(e,t){var n=this.handlerSets.get(e),r="default"===this.poolName;n&&n.dispatchEvent(t,r)}},{key:"hasHandlers",value:function(){return this.handlerSets.size>0}},{key:"removeHandlers",value:function(t,n){var r=d(this.handlerSets);if(!r.has(t))return new e(this.poolName,r);var o=r.get(t).removeHandlers(n);return o.hasHandlers()?r.set(t,o):r.delete(t),new e(this.poolName,r)}}]),e}();c(g,"createByType",(function(e,t,n){var r=new Map;return r.set(t,new p(n)),new g(e,r)}));var b=function(){function e(t){var n=this;a(this,e),c(this,"handlers",new Map),c(this,"pools",new Map),c(this,"target",void 0),c(this,"createEmitter",(function(e){return function(t){n.pools.forEach((function(n){n.dispatchEvent(e,t)}))}})),this.target=t}return s(e,[{key:"addHandlers",value:function(e,t,n){if(this.pools.has(e)){var r=this.pools.get(e);this.pools.set(e,r.addHandlers(t,n))}else this.pools.set(e,g.createByType(e,t,n));this.handlers.has(t)||this.addTargetHandler(t)}},{key:"hasHandlers",value:function(){return this.handlers.size>0}},{key:"removeHandlers",value:function(e,t,n){if(this.pools.has(e)){var r=this.pools.get(e).removeHandlers(t,n);r.hasHandlers()?this.pools.set(e,r):this.pools.delete(e),0===this.pools.size&&this.removeTargetHandler(t)}}},{key:"addTargetHandler",value:function(e){var t=this.createEmitter(e);this.handlers.set(e,t),this.target.addEventListener(e,t,!0)}},{key:"removeTargetHandler",value:function(e){this.handlers.has(e)&&(this.target.removeEventListener(e,this.handlers.get(e),!0),this.handlers.delete(e))}}]),e}(),w=new(function(){function e(){var t=this;a(this,e),c(this,"targets",new Map),c(this,"getTarget",(function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=v(e);if(t.targets.has(r))return t.targets.get(r);if(!n)return null;var o=new b(r);return t.targets.set(r,o),o})),c(this,"removeTarget",(function(e){t.targets.delete(v(e))}))}return s(e,[{key:"sub",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(r.canUseDOM){var o=n.target,i=void 0===o?document:o,a=n.pool,u=void 0===a?"default":a;this.getTarget(i).addHandlers(u,e,m(t))}}},{key:"unsub",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(r.canUseDOM){var o=n.target,i=void 0===o?document:o,a=n.pool,u=void 0===a?"default":a,s=this.getTarget(i,!1);s&&(s.removeHandlers(u,e,m(t)),s.hasHandlers()||this.removeTarget(i))}}}]),e}()),E=function(e){function t(){return a(this,t),h(this,f(t).apply(this,arguments))}return l(t,o.PureComponent),s(t,[{key:"componentDidMount",value:function(){this.subscribe(this.props)}},{key:"componentDidUpdate",value:function(e){this.unsubscribe(e),this.subscribe(this.props)}},{key:"componentWillUnmount",value:function(){this.unsubscribe(this.props)}},{key:"subscribe",value:function(e){var t=e.name,n=e.on,r=e.pool,o=e.target;w.sub(t,n,{pool:r,target:o})}},{key:"unsubscribe",value:function(e){var t=e.name,n=e.on,r=e.pool,o=e.target;w.unsub(t,n,{pool:r,target:o})}},{key:"render",value:function(){return null}}]),t}();c(E,"defaultProps",{pool:"default",target:"document"}),E.propTypes={},t.instance=w,t.default=E},function(e,t,n){var r;!function(){"use strict";var o=!("undefined"===typeof window||!window.document||!window.document.createElement),i={canUseDOM:o,canUseWorkers:"undefined"!==typeof Worker,canUseEventListeners:o&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:o&&!!window.screen};void 0===(r=function(){return i}.call(t,n,t,e))||(e.exports=r)}()},function(e,t){var n=Math.max,r=Math.min;e.exports=function(e,t,o){return e>=r(t,o)&&e<n(t,o)}},function(e,t){e.exports=function(e){return e&&e.length?e[0]:void 0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"===typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,u=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,h=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.suspense_list"):60120,y=r?Symbol.for("react.memo"):60115,v=r?Symbol.for("react.lazy"):60116,g=r?Symbol.for("react.fundamental"):60117,b=r?Symbol.for("react.responder"):60118;function w(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case f:case h:case a:case s:case u:case d:return e;default:switch(e=e&&e.$$typeof){case l:case p:case c:return e;default:return t}}case v:case y:case i:return t}}}function E(e){return w(e)===h}t.typeOf=w,t.AsyncMode=f,t.ConcurrentMode=h,t.ContextConsumer=l,t.ContextProvider=c,t.Element=o,t.ForwardRef=p,t.Fragment=a,t.Lazy=v,t.Memo=y,t.Portal=i,t.Profiler=s,t.StrictMode=u,t.Suspense=d,t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===a||e===h||e===s||e===u||e===d||e===m||"object"===typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===y||e.$$typeof===c||e.$$typeof===l||e.$$typeof===p||e.$$typeof===g||e.$$typeof===b)},t.isAsyncMode=function(e){return E(e)||w(e)===f},t.isConcurrentMode=E,t.isContextConsumer=function(e){return w(e)===l},t.isContextProvider=function(e){return w(e)===c},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return w(e)===p},t.isFragment=function(e){return w(e)===a},t.isLazy=function(e){return w(e)===v},t.isMemo=function(e){return w(e)===y},t.isPortal=function(e){return w(e)===i},t.isProfiler=function(e){return w(e)===s},t.isStrictMode=function(e){return w(e)===u},t.isSuspense=function(e){return w(e)===d}},function(e,t,n){var r=n(189),o=n(138),i=n(87),a=n(53);e.exports=function(e,t,n){return e=a(e),n=null==n?0:r(i(n),0,e.length),t=o(t),e.slice(n,n+t.length)==t}},function(e,t,n){var r=n(59);e.exports=function(e,t){var n=[];return r(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n}},function(e,t,n){var r=n(65),o=n(346),i=n(66),a=n(347),u=i((function(e){var t=r(e,a);return t.length&&t[0]===e[0]?o(t):[]}));e.exports=u},function(e,t,n){var r=n(94),o=n(125),i=n(126),a=n(65),u=n(80),s=n(100),c=Math.min;e.exports=function(e,t,n){for(var l=n?i:o,f=e[0].length,h=e.length,p=h,d=Array(h),m=1/0,y=[];p--;){var v=e[p];p&&t&&(v=a(v,u(t))),m=c(v.length,m),d[p]=!n&&(t||f>=120&&v.length>=120)?new r(p&&v):void 0}v=e[0];var g=-1,b=d[0];e:for(;++g<f&&y.length<m;){var w=v[g],E=t?t(w):w;if(w=n||0!==w?w:0,!(b?s(b,E):l(y,E,n))){for(p=h;--p;){var _=d[p];if(!(_?s(_,E):l(e[p],E,n)))continue e}b&&b.push(E),y.push(w)}}return y}},function(e,t,n){var r=n(82);e.exports=function(e){return r(e)?e:[]}},function(e,t){var n=Object.prototype.hasOwnProperty;e.exports=function(e,t){return null!=e&&n.call(e,t)}},function(e,t,n){e.exports=n(45)},,function(e,t,n){var r=n(59),o=n(40);e.exports=function(e,t){var n=-1,i=o(e)?Array(e.length):[];return r(e,(function(e,r,o){i[++n]=t(e,r,o)})),i}},function(e,t){e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},,,function(e,t,n){var r=n(192),o=n(114),i=n(358),a=RegExp("['\u2019]","g");e.exports=function(e){return function(t){return r(i(o(t).replace(a,"")),e,"")}}},function(e,t,n){var r=n(357)({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"});e.exports=r},function(e,t){e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},function(e,t,n){var r=n(359),o=n(360),i=n(53),a=n(361);e.exports=function(e,t,n){return e=i(e),void 0===(t=n?void 0:t)?o(e)?a(e):r(e):e.match(t)||[]}},function(e,t){var n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(n)||[]}},function(e,t){var n=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;e.exports=function(e){return n.test(e)}},function(e,t){var n="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",r="["+n+"]",o="\\d+",i="[\\u2700-\\u27bf]",a="[a-z\\xdf-\\xf6\\xf8-\\xff]",u="[^\\ud800-\\udfff"+n+o+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",s="(?:\\ud83c[\\udde6-\\uddff]){2}",c="[\\ud800-\\udbff][\\udc00-\\udfff]",l="[A-Z\\xc0-\\xd6\\xd8-\\xde]",f="(?:"+a+"|"+u+")",h="(?:"+l+"|"+u+")",p="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",d="[\\ufe0e\\ufe0f]?"+p+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",s,c].join("|")+")[\\ufe0e\\ufe0f]?"+p+")*"),m="(?:"+[i,s,c].join("|")+")"+d,y=RegExp([l+"?"+a+"+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?="+[r,l,"$"].join("|")+")",h+"+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?="+[r,l+f,"$"].join("|")+")",l+"?"+f+"+(?:['\u2019](?:d|ll|m|re|s|t|ve))?",l+"+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",o,m].join("|"),"g");e.exports=function(e){return e.match(y)||[]}},function(e,t,n){var r=n(363)("toUpperCase");e.exports=r},function(e,t,n){var r=n(193),o=n(141),i=n(194),a=n(53);e.exports=function(e){return function(t){t=a(t);var n=o(t)?i(t):void 0,u=n?n[0]:t.charAt(0),s=n?r(n,1).join(""):t.slice(1);return u[e]()+s}}},function(e,t){e.exports=function(e){return e.split("")}},function(e,t){var n="[\\ud800-\\udfff]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",o="\\ud83c[\\udffb-\\udfff]",i="[^\\ud800-\\udfff]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",u="[\\ud800-\\udbff][\\udc00-\\udfff]",s="(?:"+r+"|"+o+")"+"?",c="[\\ufe0e\\ufe0f]?"+s+("(?:\\u200d(?:"+[i,a,u].join("|")+")[\\ufe0e\\ufe0f]?"+s+")*"),l="(?:"+[i+r+"?",r,a,u,n].join("|")+")",f=RegExp(o+"(?="+o+")|"+l+c,"g");e.exports=function(e){return e.match(f)||[]}},,,,function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return o}
1)),n.d(t,"__assign",(function(){return i})),n.d(t,"__rest",(function(){return a})),n.d(t,"__decorate",(function(){return u})),n.d(t,"__param",(function(){return s})),n.d(t,"__metadata",(function(){return c})),n.d(t,"__awaiter",(function(){return l})),n.d(t,"__generator",(function(){return f})),n.d(t,"__exportStar",(function(){return h})),n.d(t,"__values",(function(){return p})),n.d(t,"__read",(function(){return d})),n.d(t,"__spread",(function(){return m})),n.d(t,"__spreadArrays",(function(){return y})),n.d(t,"__await",(function(){return v})),n.d(t,"__asyncGenerator",(function(){return g})),n.d(t,"__asyncDelegator",(function(){return b})),n.d(t,"__asyncValues",(function(){return w})),n.d(t,"__makeTemplateObject",(function(){return E})),n.d(t,"__importStar",(function(){return _})),n.d(t,"__importDefault",(function(){return S}));var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function u(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function s(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){e.done?o(e.value):new n((function(t){t(e.value)})).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function h(e,t){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}function p(e){var t="function"===typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function d(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function m(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(d(arguments[t]));return e}function y(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}function v(e){return this instanceof v?(this.v=e,this):new v(e)}function g(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||u(e,t)}))})}function u(e,t){try{(n=o[e](t)).value instanceof v?Promise.resolve(n.value.v).then(s,c):l(i[0][2],n)}catch(r){l(i[0][3],r)}var n}function s(e){u("next",e)}function c(e){u("throw",e)}function l(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}function b(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:v(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function w(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}
1function _(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function S(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return o})),n.d(t,"__assign",(function(){return i})),n.d(t,"__rest",(function(){return a})),n.d(t,"__decorate",(function(){return u})),n.d(t,"__param",(function(){return s})),n.d(t,"__metadata",(function(){return c})),n.d(t,"__awaiter",(function(){return l})),n.d(t,"__generator",(function(){return f})),n.d(t,"__exportStar",(function(){return h})),n.d(t,"__values",(function(){return p})),n.d(t,"__read",(function(){return d})),n.d(t,"__spread",(function(){return m})),n.d(t,"__spreadArrays",(function(){return y})),n.d(t,"__await",(function(){return v})),n.d(t,"__asyncGenerator",(function(){return g})),n.d(t,"__asyncDelegator",(function(){return b})),n.d(t,"__asyncValues",(function(){return w})),n.d(t,"__makeTemplateObject",(function(){return E})),n.d(t,"__importStar",(function(){return _})),n.d(t,"__importDefault",(function(){return S}));var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function u(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function s(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){e.done?o(e.value):new n((function(t){t(e.value)})).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function h(e,t){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}function p(e){var t="function"===typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function d(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function m(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(d(arguments[t]));return e}function y(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}function v(e){return this instanceof v?(this.v=e,this):new v(e)}function g(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||u(e,t)}))})}function u(e,t){try{(n=o[e](t)).value instanceof v?Promise.resolve(n.value.v).then(s,c):l(i[0][2],n)}catch(r){l(i[0][3],r)}var n}function s(e){u("next",e)}function c(e){u("throw",e)}function l(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}function b(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:v(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function w(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}
1function _(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function S(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";n(372)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o,i=(r=n(74))&&"object"===typeof r&&"default"in r?r.default:r,a=n(196),u=n(373),s=n(195),c=n(374),l=i.SDK_VERSION,f=new a.Logger("@firebase/firestore");function h(){return f.logLevel===a.LogLevel.DEBUG?o.DEBUG:f.logLevel===a.LogLevel.SILENT?o.SILENT:o.ERROR}function p(e){switch(e){case o.DEBUG:f.logLevel=a.LogLevel.DEBUG;break;case o.ERROR:f.logLevel=a.LogLevel.ERROR;break;case o.SILENT:f.logLevel=a.LogLevel.SILENT;break;default:f.error("Firestore ("+l+"): Invalid value passed to `setLogLevel`")}}function d(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(f.logLevel<=a.LogLevel.DEBUG){var o=n.map(y);f.debug.apply(f,["Firestore ("+l+") ["+e+"]: "+t].concat(o))}}function m(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(f.logLevel<=a.LogLevel.ERROR){var r=t.map(y);f.error.apply(f,["Firestore ("+l+"): "+e].concat(r))}}function y(e){if("string"===typeof e)return e;var t=b.getPlatform();try{return t.formatJSON(e)}catch(n){return e}}function v(e){var t="FIRESTORE ("+l+") INTERNAL ASSERTION FAILED: "+e;throw m(t),new Error(t)}function g(e,t){e||v(t)}!function(e){e[e.DEBUG=0]="DEBUG",e[e.ERROR=1]="ERROR",e[e.SILENT=2]="SILENT"}(o||(o={}));var b=function(){function e(){}return e.setPlatform=function(t){e.platform&&v("Platform already defined"),e.platform=t},e.getPlatform=function(){return e.platform||v("Platform not set"),e.platform},e}();function w(){return b.getPlatform().emptyByteString}var E={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"},_=function(e){function t(t,n){var r=e.call(this,n)||this;return r.code=t,r.message=n,r.name="FirebaseError",r.toString=function(){return r.name+": [code="+r.code+"]: "+r.message},r}return u.__extends(t,e),t}(Error);function S(e,t){function n(){var e="This constructor is private.";throw t&&(e+=" ",e+=t),new _(E.INVALID_ARGUMENT,e)}for(var r in n.prototype=e.prototype,e)e.hasOwnProperty(r)&&(n[r]=e[r]);return n}function T(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function O(e,t){return void 0!==e?e:t}function k(e,t){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Number(n);isNaN(r)||t(r,e[n])}}function C(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(n,e[n])}function x(e){for(var t in g(null!=e&&"object"===typeof e,"isEmpty() expects object parameter."),e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function A(e,t){if(0!==t.length)throw new _(E.INVALID_ARGUMENT,"Function "+e+"() does not support arguments, but was called with "+K(t.length,"argument")+".")}function I(e,t,n){if(t.length!==n)throw new _(E.INVALID_ARGUMENT,"Function "+e+"() requires "+K(n,"argument")+", but was called with "+K(t.length,"argument")+".")}function N(e,t,n){if(t.length<n)throw new _(E.INVALID_ARGUMENT,"Function "+e+"() requires at least "+K(n,"argument")+", but was called with "+K(t.length,"argument")+".")}function D(e,t,n,r){if(t.length<n||t.length>r)throw new _(E.INVALID_ARGUMENT,"Function "+e+"() requires between "+n+" and "+r+" arguments, but was called with "+K(t.length,"argument")+".")}function P(e,t,n,r){B(e,t,G(n)+" argument",r)}function R(e,t,n,r){void 0!==r&&P(e,t,n,r)}function j(e,t,n,r){B(e,t,n+" option",r)}function M(e,t,n,r){void 0!==r&&j(e,t,n,r)}function L(e,t,n,r,o){void 0!==r&&function(e,t,n,r,o){if(!(r instanceof Array))throw new _(E.INVALID_ARGUMENT,"Function "+e+"() requires its "+t+" option to be an array, but it was: "+V(r));for(var i=0;i<r.length;++i)if(!o(r[i]))throw new _(E.INVALID_ARGUMENT,"Function "+e+"() requires all "+t+" elements to be "+n+", but the value at index "+i+" was: "+V(r[i]))}(e,t,n,r,o)}function U(e,t,n,r,o){void 0!==r&&function(e,t,n,r,o){for(var i=[],a=0,u=o;a<u.length;a++){var s=u[a];if(s===r)return;i.push(V(s))}var c=V(r);throw new _(E.INVALID_ARGUMENT,"Invalid value "+c+" provided to function "+e+'() for option "'+n+'". Acceptable values: '+i.join(", "))}(e,0,n,r,o)}function F(e,t,n,r){if(!t.some((function(e){return e===r})))throw new _(E.INVALID_ARGUMENT,"Invalid value "+V(r)+" provided to function "+e+"() for its "+G(n)+" argument. Acceptable values: "+t.join(", "))}function B(e,t,n,r){if(!("object"===t?q(r):"non-empty string"===t?"string"===typeof r&&""!==r:typeof r===t)){var o=V(r);throw new _(E.INVALID_ARGUMENT,"Function "+e+"() requires its "+n+" to be of type "+t+", but it was: "+o)}}function q(e){return"object"===typeof e&&null!==e&&(Object.getPrototypeOf(e)===Object.prototype||null===Object.getPrototypeOf(e))}function V(e){if(void 0===e)return"undefined";if(null===e)return"null";if("string"===typeof e)return e.length>20&&(e=e.substring(0,20)+"..."),JSON.stringify(e);if("number"===typeof e||"boolean"===typeof e)return""+e;if("object"===typeof e){if(e instanceof Array)return"an array";var t=function(e){if(e.constructor){var t=/function\s+([^\s(]+)\s*\(/.exec(e.constructor.toString());if(t&&t.length>1)return t[1]}return null}(e);return t?"a custom "+t+" object":"an object"}return"function"===typeof e?"a function":v("Unknown wrong type: "+typeof e)}function z(e,t,n){if(void 0===n)throw new _(E.INVALID_ARGUMENT,"Function "+e+"() requires a valid "+G(t)+" argument, but it was undefined.")}function W(e,t,n){C(t,(function(t,r){if(n.indexOf(t)<0)throw new _(E.INVALID_ARGUMENT,"Unknown option '"+t+"' passed to function "+e+"(). Available options: "+n.join(", "))}))}function Q(e,t,n,r){var o=V(r);return new _(E.INVALID_ARGUMENT,"Function "+e+"() requires its "+G(n)+" argument to be a "+t+", but it was: "+o)}function G(e){switch(e){case 1:return"first";
1case 2:return"second";case 3:return"third";default:return e+"th"}}function K(e,t){return e+" "+t+(1===e?"":"s")}var H=function(){function e(){}return e.newId=function(){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t="",n=0;n<20;n++)t+=e.charAt(Math.floor(Math.random()*e.length));return g(20===t.length,"Invalid auto ID: "+t),t},e}();function Y(e,t){return e<t?-1:e>t?1:0}function $(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!e[n].isEqual(t[n]))return!1;return!0}function X(e){return e+"\0"}function J(){if("undefined"===typeof Uint8Array)throw new _(E.UNIMPLEMENTED,"Uint8Arrays are not available in this environment.")}function Z(){if(!b.getPlatform().base64Available)throw new _(E.UNIMPLEMENTED,"Blobs are unavailable in Firestore in this environment.")}var ee,te=function(){function e(e){Z(),this._binaryString=e}return e.fromBase64String=function(t){I("Blob.fromBase64String",arguments,1),P("Blob.fromBase64String","string",1,t),Z();try{var n=b.getPlatform().atob(t);return new e(n)}catch(r){throw new _(E.INVALID_ARGUMENT,"Failed to construct Blob from Base64 string: "+r)}},e.fromUint8Array=function(t){if(I("Blob.fromUint8Array",arguments,1),J(),!(t instanceof Uint8Array))throw Q("Blob.fromUint8Array","Uint8Array",1,t);var n=Array.prototype.map.call(t,(function(e){return String.fromCharCode(e)})).join("");return new e(n)},e.prototype.toBase64=function(){return I("Blob.toBase64",arguments,0),Z(),b.getPlatform().btoa(this._binaryString)},e.prototype.toUint8Array=function(){I("Blob.toUint8Array",arguments,0),J();for(var e=new Uint8Array(this._binaryString.length),t=0;t<this._binaryString.length;t++)e[t]=this._binaryString.charCodeAt(t);return e},e.prototype.toString=function(){return"Blob(base64: "+this.toBase64()+")"},e.prototype.isEqual=function(e){return this._binaryString===e._binaryString},e.prototype._compareTo=function(e){return Y(this._binaryString,e._binaryString)},e}(),ne=S(te,"Use Blob.fromUint8Array() or Blob.fromBase64String() instead."),re=function(){return function(e,t,n,r,o){this.databaseId=e,this.persistenceKey=t,this.host=n,this.ssl=r,this.forceLongPolling=o}}(),oe="(default)",ie=function(){function e(e,t){this.projectId=e,this.database=t||oe}return Object.defineProperty(e.prototype,"isDefaultDatabase",{get:function(){return this.database===oe},enumerable:!0,configurable:!0}),e.prototype.isEqual=function(t){return t instanceof e&&t.projectId===this.projectId&&t.database===this.database},e.prototype.compareTo=function(e){return Y(this.projectId,e.projectId)||Y(this.database,e.database)},e}(),ae=function(){function e(e,t){var n=this;this.previousValue=e,t&&(t.sequenceNumberHandler=function(e){return n.setPreviousValue(e)},this.writeNewSequenceNumber=function(e){return t.writeSequenceNumber(e)})}return e.prototype.setPreviousValue=function(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue},e.prototype.next=function(){var e=++this.previousValue;return this.writeNewSequenceNumber&&this.writeNewSequenceNumber(e),e},e.INVALID=-1,e}(),ue=function(){function e(e,t,n){void 0===t?t=0:t>e.length&&v("offset "+t+" out of range "+e.length),void 0===n?n=e.length-t:n>e.length-t&&v("length "+n+" out of range "+(e.length-t)),this.segments=e,this.offset=t,this.len=n}return Object.defineProperty(e.prototype,"length",{get:function(){return this.len},enumerable:!0,configurable:!0}),e.prototype.isEqual=function(t){return 0===e.comparator(this,t)},e.prototype.child=function(t){var n=this.segments.slice(this.offset,this.limit());return t instanceof e?t.forEach((function(e){n.push(e)})):n.push(t),this.construct(n)},e.prototype.limit=function(){return this.offset+this.length},e.prototype.popFirst=function(e){return e=void 0===e?1:e,g(this.length>=e,"Can't call popFirst() with less segments"),this.construct(this.segments,this.offset+e,this.length-e)},e.prototype.popLast=function(){return g(!this.isEmpty(),"Can't call popLast() on empty path"),this.construct(this.segments,this.offset,this.length-1)},e.prototype.firstSegment=function(){return g(!this.isEmpty(),"Can't
1call firstSegment() on empty path"),this.segments[this.offset]},e.prototype.lastSegment=function(){return this.get(this.length-1)},e.prototype.get=function(e){return g(e<this.length,"Index out of range"),this.segments[this.offset+e]},e.prototype.isEmpty=function(){return 0===this.length},e.prototype.isPrefixOf=function(e){if(e.length<this.length)return!1;for(var t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0},e.prototype.isImmediateParentOf=function(e){if(this.length+1!==e.length)return!1;for(var t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0},e.prototype.forEach=function(e){for(var t=this.offset,n=this.limit();t<n;t++)e(this.segments[t])},e.prototype.toArray=function(){return this.segments.slice(this.offset,this.limit())},e.comparator=function(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){var o=e.get(r),i=t.get(r);if(o<i)return-1;if(o>i)return 1}return e.length<t.length?-1:e.length>t.length?1:0},e}(),se=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u.__extends(t,e),t.prototype.construct=function(e,n,r){return new t(e,n,r)},t.prototype.canonicalString=function(){return this.toArray().join("/")},t.prototype.toString=function(){return this.canonicalString()},t.fromString=function(e){if(e.indexOf("//")>=0)throw new _(E.INVALID_ARGUMENT,"Invalid path ("+e+"). Paths must not contain // in them.");return new t(e.split("/").filter((function(e){return e.length>0})))},t.EMPTY_PATH=new t([]),t}(ue),ce=/^[_a-zA-Z][_a-zA-Z0-9]*$/,le=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u.__extends(t,e),t.prototype.construct=function(e,n,r){return new t(e,n,r)},t.isValidIdentifier=function(e){return ce.test(e)},t.prototype.canonicalString=function(){return this.toArray().map((function(e){return e=e.replace("\\","\\\\").replace("`","\\`"),t.isValidIdentifier(e)||(e="`"+e+"`"),e})).join(".")},t.prototype.toString=function(){return this.canonicalString()},t.prototype.isKeyField=function(){return 1===this.length&&"__name__"===this.get(0)},t.keyField=function(){return new t(["__name__"])},t.fromServerFormat=function(e){for(var n=[],r="",o=0,i=function(){if(0===r.length)throw new _(E.INVALID_ARGUMENT,"Invalid field path ("+e+"). Paths must not be empty, begin with '.', end with '.', or contain '..'");n.push(r),r=""},a=!1;o<e.length;){var u=e[o];if("\\"===u){if(o+1===e.length)throw new _(E.INVALID_ARGUMENT,"Path has trailing escape character: "+e);var s=e[o+1];if("\\"!==s&&"."!==s&&"`"!==s)throw new _(E.INVALID_ARGUMENT,"Path has invalid escape sequence: "+e);r+=s,o+=2}else"`"===u?(a=!a,o++):"."!==u||a?(r+=u,o++):(i(),o++)}if(i(),a)throw new _(E.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new t(n)},t.EMPTY_PATH=new t([]),t}(ue),fe=function(){function e(t){this.path=t,g(e.isDocumentKey(t),"Invalid DocumentKey with an odd number of segments: "+t.toArray().join("/"))}return e.prototype.hasCollectionId=function(e){return this.path.length>=2&&this.path.get(this.path.length-2)===e},e.prototype.isEqual=function(e){return null!==e&&0===se.comparator(this.path,e.path)},e.prototype.toString=function(){return this.path.toString()},e.comparator=function(e,t){return se.comparator(e.path,t.path)},e.isDocumentKey=function(e){return e.length%2===0},e.fromSegments=function(t){return new e(new se(t.slice()))},e.fromPathString=function(t){return new e(se.fromString(t))},e.EMPTY=new e(new se([])),e}(),he=function(){return function(){var e=this;this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n}))}}();!function(e){e.All="all",e.ListenStreamIdle="listen_stream_idle",e.ListenStreamConnectionBackoff="listen_stream_connection_backoff",e.WriteStreamIdle="write_stream_idle",e.WriteStreamConnectionBackoff="write_stream_connection_backoff",e.OnlineStateTimeout="online_state_timeout",e.ClientMetadataRefresh="client_metadata_refresh",e.LruGarbageCollection="lru_garbage_collection",e.RetryTransaction="retry_transaction"}(ee||(ee={}));var pe=function(){function e(e,t,n,r,o){this.asyncQueue=e,this.timerId=t,this.targetTimeMs=n,this.op=r,this.removalCallback=o,this.deferred=new he,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.catch=this.deferred.promise.catch.bind(this.deferred.promise),this.deferred.promise.catch((function(e){}))}return e.createAndSchedule=function(t,n,r,o,i){var a=new e(t,n,Date.now()+r,o,i);return a.start(r),a},e.prototype.start=function(e){var t=this;this.timerHandle=setTimeout((function(){return t.handleDelayElapsed()}),e)},e.prototype.skipDelay=function(){return this.handleDelayElapsed()},e.prototype.cancel=function(e){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new _(E.CANCELLED,"Operation cancelled"+(e?": "+e:""))))},e.prototype.handleDelayElapsed=function(){var e=this;this.asyncQueue.enqueueAndForget((function(){return null!==e.timerHandle?(e.clearTimeout(),e.op().then((function(t){return e.deferred.resolve(t)}))):Promise.resolve()}))},e.prototype.clearTimeout=function(){null!==this.timerHandle&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)},e}(),de=function(){function e(){this.tail=Promise.resolve(),this._isShuttingDown=!1,this.delayedOperations=[],this.failure=null,this.operationInProgress=!1,this.timerIdsToSkip=[]}return Object.defineProperty(e.prototype,"isShuttingDown",{get:function(){return this._isShuttingDown},enumerable:!0,configurable:!0}),e.prototype.enqueueAndForget=function(e){this.enqueue(e)},e.prototype.enqueueAndForgetEvenAfterShutdown=function(e){this.verifyNotFailed(),this.enqueueInternal(e)},e.prototype.enqueueEvenAfterShutdown=function(e){return this.verifyNotFailed(),this.enqueueInternal(e)},e.prototype.enqueueAndInitiateShutdown=function(e){return u.__awaiter(this,void 0,void 0,(function(){return u.__generator(this,(function(t){switch(t.label){case 0:return this.verifyNotFailed(),this._isShuttingDown?[3,2]:(this._isShuttingDown=!0,[4,this.enqueueEvenAfterShutdown(e)]);case 1:t.sent(),t.label=2;case 2:return[2]}}
1))}))},e.prototype.enqueue=function(e){return this.verifyNotFailed(),this._isShuttingDown?new Promise((function(e){})):this.enqueueInternal(e)},e.prototype.enqueueInternal=function(e){var t=this,n=this.tail.then((function(){return t.operationInProgress=!0,e().catch((function(e){t.failure=e,t.operationInProgress=!1;var n=e.stack||e.message||"";throw m("INTERNAL UNHANDLED ERROR: ",n),n.indexOf("Firestore Test Simulated Error")<0&&setTimeout((function(){throw e}),0),e})).then((function(e){return t.operationInProgress=!1,e}))}));return this.tail=n,n},e.prototype.enqueueAfterDelay=function(e,t,n){var r=this;this.verifyNotFailed(),g(t>=0,"Attempted to schedule an operation with a negative delay of "+t),this.timerIdsToSkip.indexOf(e)>-1&&(t=0);var o=pe.createAndSchedule(this,e,t,n,(function(e){return r.removeDelayedOperation(e)}));return this.delayedOperations.push(o),o},e.prototype.verifyNotFailed=function(){this.failure&&v("AsyncQueue is already failed: "+(this.failure.stack||this.failure.message))},e.prototype.verifyOperationInProgress=function(){g(this.operationInProgress,"verifyOpInProgress() called when no op in progress on this queue.")},e.prototype.drain=function(){return this.enqueueEvenAfterShutdown((function(){return Promise.resolve()}))},e.prototype.containsDelayedOperation=function(e){for(var t=0,n=this.delayedOperations;t<n.length;t++){if(n[t].timerId===e)return!0}return!1},e.prototype.runDelayedOperationsEarly=function(e){var t=this;return this.drain().then((function(){g(e===ee.All||t.containsDelayedOperation(e),"Attempted to drain to missing operation "+e),t.delayedOperations.sort((function(e,t){return e.targetTimeMs-t.targetTimeMs}));for(var n=0,r=t.delayedOperations;n<r.length;n++){var o=r[n];if(o.skipDelay(),e!==ee.All&&o.timerId===e)break}return t.drain()}))},e.prototype.skipDelaysForTimerId=function(e){this.timerIdsToSkip.push(e)},e.prototype.removeDelayedOperation=function(e){var t=this.delayedOperations.indexOf(e);g(t>=0,"Delayed operation not found."),this.delayedOperations.splice(t,1)},e}(),me="\x01",ye="\x01",ve="\x10",ge="\x11";function be(e){for(var t="",n=0;n<e.length;n++)t.length>0&&(t=Ee(t)),t=we(e.get(n),t);return Ee(t)}function we(e,t){for(var n=t,r=e.length,o=0;o<r;o++){var i=e.charAt(o);switch(i){case"\0":n+=me+ve;break;case me:n+=me+ge;break;default:n+=i}}return n}function Ee(e){return e+me+ye}function _e(e){var t=e.length;if(g(t>=2,"Invalid path "+e),2===t)return g(e.charAt(0)===me&&e.charAt(1)===ye,"Non-empty path "+e+" had length 2"),se.EMPTY_PATH;for(var n=t-2,r=[],o="",i=0;i<t;){var a=e.indexOf(me,i);switch((a<0||a>n)&&v('Invalid encoded resource path: "'+e+'"'),e.charAt(a+1)){case ye:var u=e.substring(i,a),s=void 0;0===o.length?s=u:(s=o+=u,o=""),r.push(s);break;case ve:o+=e.substring(i,a),o+="\0";break;case ge:o+=e.substring(i,a+1);break;default:v('Invalid encoded resource path: "'+e+'"')}i=a+2}return new se(r)}var Se=function(){function e(e,t){if(this.seconds=e,this.nanoseconds=t,t<0)throw new _(E.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(t>=1e9)throw new _(E.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(e<-62135596800)throw new _(E.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e);if(e>=253402300800)throw new _(E.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}return e.now=function(){return e.fromMillis(Date.now())},e.fromDate=function(t){return e.fromMillis(t.getTime())},e.fromMillis=function(t){var n=Math.floor(t/1e3);return new e(n,1e6*(t-1e3*n))},e.prototype.toDate=function(){return new Date(this.toMillis())},e.prototype.toMillis=function(){return 1e3*this.seconds+this.nanoseconds/1e6},e.prototype._compareTo=function(e){return this.seconds===e.seconds?Y(this.nanoseconds,e.nanoseconds):Y(this.seconds,e.seconds)},e.prototype.isEqual=function(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds},e.prototype.toString=function(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"},e}(),Te=function(){function e(e){this.timestamp=e}return e.fromMicroseconds=function(t){var n=Math.floor(t/1e6);return new e(new Se(n,t%1e6*1e3))},e.fromTimestamp=function(t){return new e(t)},e.forDeletedDoc=function(){return e.MIN},e.prototype.compareTo=function(e){return this.timestamp._compareTo(e.timestamp)},e.prototype.isEqual=function(e){return this.timestamp.isEqual(e.timestamp)},e.prototype.toMicroseconds=function(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3},e.prototype.toString=function(){return"SnapshotVersion("+this.timestamp.toString()+")"},e.prototype.toTimestamp=function(){return this.timestamp},e.MIN=new e(new Se(0,0)),e}(),Oe=function(){function e(e,t){this.comparator=e,this.root=t||Ce.EMPTY}return e.prototype.insert=function(t,n){return new e(this.comparator,this.root.insert(t,n,this.comparator).copy(null,null,Ce.BLACK,null,
1null))},e.prototype.remove=function(t){return new e(this.comparator,this.root.remove(t,this.comparator).copy(null,null,Ce.BLACK,null,null))},e.prototype.get=function(e){for(var t=this.root;!t.isEmpty();){var n=this.comparator(e,t.key);if(0===n)return t.value;n<0?t=t.left:n>0&&(t=t.right)}return null},e.prototype.indexOf=function(e){for(var t=0,n=this.root;!n.isEmpty();){var r=this.comparator(e,n.key);if(0===r)return t+n.left.size;r<0?n=n.left:(t+=n.left.size+1,n=n.right)}return-1},e.prototype.isEmpty=function(){return this.root.isEmpty()},Object.defineProperty(e.prototype,"size",{get:function(){return this.root.size},enumerable:!0,configurable:!0}),e.prototype.minKey=function(){return this.root.minKey()},e.prototype.maxKey=function(){return this.root.maxKey()},e.prototype.inorderTraversal=function(e){return this.root.inorderTraversal(e)},e.prototype.forEach=function(e){this.inorderTraversal((function(t,n){return e(t,n),!1}))},e.prototype.toString=function(){var e=[];return this.inorderTraversal((function(t,n){return e.push(t+":"+n),!1})),"{"+e.join(", ")+"}"},e.prototype.reverseTraversal=function(e){return this.root.reverseTraversal(e)},e.prototype.getIterator=function(){return new ke(this.root,null,this.comparator,!1)},e.prototype.getIteratorFrom=function(e){return new ke(this.root,e,this.comparator,!1)},e.prototype.getReverseIterator=function(){return new ke(this.root,null,this.comparator,!0)},e.prototype.getReverseIteratorFrom=function(e){return new ke(this.root,e,this.comparator,!0)},e}(),ke=function(){function e(e,t,n,r){this.isReverse=r,this.nodeStack=[];for(var o=1;!e.isEmpty();)if(o=t?n(e.key,t):1,r&&(o*=-1),o<0)e=this.isReverse?e.left:e.right;else{if(0===o){this.nodeStack.push(e);break}this.nodeStack.push(e),e=this.isReverse?e.right:e.left}}return e.prototype.getNext=function(){g(this.nodeStack.length>0,"getNext() called on iterator when hasNext() is false.");var e=this.nodeStack.pop(),t={key:e.key,value:e.value};if(this.isReverse)for(e=e.left;!e.isEmpty();)this.nodeStack.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack.push(e),e=e.left;return t},e.prototype.hasNext=function(){return this.nodeStack.length>0},e.prototype.peek=function(){if(0===this.nodeStack.length)return null;var e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}},e}(),Ce=function(){function e(t,n,r,o,i){this.key=t,this.value=n,this.color=null!=r?r:e.RED,this.left=null!=o?o:e.EMPTY,this.right=null!=i?i:e.EMPTY,this.size=this.left.size+1+this.right.size}return e.prototype.copy=function(t,n,r,o,i){return new e(null!=t?t:this.key,null!=n?n:this.value,null!=r?r:this.color,null!=o?o:this.left,null!=i?i:this.right)},e.prototype.isEmpty=function(){return!1},e.prototype.inorderTraversal=function(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)},e.prototype.reverseTraversal=function(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)},e.prototype.min=function(){return this.left.isEmpty()?this:this.left.min()},e.prototype.minKey=function(){return this.min().key},e.prototype.maxKey=function(){return this.right.isEmpty()?this.key:this.right.maxKey()},e.prototype.insert=function(e,t,n){var r=this,o=n(e,r.key);return(r=o<0?r.copy(null,null,null,r.left.insert(e,t,n),null):0===o?r.copy(null,t,null,null,null):r.copy(null,null,null,null,r.right.insert(e,t,n))).fixUp()},e.prototype.removeMin=function(){if(this.left.isEmpty())return e.EMPTY;var t=this;return t.left.isRed()||t.left.left.isRed()||(t=t.moveRedLeft()),(t=t.copy(null,null,null,t.left.removeMin(),null)).fixUp()},e.prototype.remove=function(t,n){var r,o=this;if(n(t,o.key)<0)o.left.isEmpty()||o.left.isRed()||o.left.left.isRed()||(o=o.moveRedLeft()),o=o.copy(null,null,null,o.left.remove(t,n),null);else{if(o.left.isRed()&&(o=o.rotateRight()),o.right.isEmpty()||o.right.isRed()||o.right.left.isRed()||(o=o.moveRedRight()),0===n(t,o.key)){if(o.right.isEmpty())return e.EMPTY;r=o.right.min(),o=o.copy(r.key,r.value,null,null,o.right.removeMin())}o=o.copy(null,null,null,null,o.right.remove(t,n))}return o.fixUp()},e.prototype.isRed=function(){return this.color},e.prototype.fixUp=function(){var e=this;return e.right.isRed()&&!e.left.isRed()&&(e=e.rotateLeft()),e.left.isRed()&&e.left.left.isRed()&&(e=e.rotateRight()),e.left.isRed()&&e.right.isRed()&&(e=e.colorFlip()),e},e.prototype.moveRedLeft=function(){var e=this.colorFlip();return e.right.left.isRed()&&(e=(e=(e=e.copy(null,null,null,null,e.right.rotateRight())).rotateLeft()).colorFlip()),e},e.prototype.moveRedRight=function(){var e=this.colorFlip();return e.left.left.isRed()&&(e=(e=e.rotateRight()).colorFlip()),e},e.prototype.rotateLeft=function(){var t=this.copy(null,null,e.RED,null,this.right.left);return this.right.copy(null,null,this.color,t,null)},e.prototype.rotateRight=function(){var t=this.copy(null,null,e.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,t)},e.prototype.colorFlip=function(){var e=this.left.copy(null,null,!this.left.color,null,null),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,t)},e.prototype.checkMaxDepth=function(){var e=this.check();return Math.pow(2,e)<=this.size+1},e.prototype.check=function(){if(this.isRed()&&this.left.isRed())throw v("Red node has red child("+this.key+","+this.value+")");if(this.right.isRed())throw v("Right child of ("+this.key+","+this.value+") is red");var e=this.left.check();if(e!==this.right.check())throw v("Black depths differ");return e+(this.isRed()?0:1)},e.EMPTY=null,e.RED=!0,e.BLACK=!1,e}(),xe=function(){function e(){this.size=0}return Object.defineProperty(e.prototype,"key",{get:function(){throw v
1("LLRBEmptyNode has no key.")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){throw v("LLRBEmptyNode has no value.")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){throw v("LLRBEmptyNode has no color.")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"left",{get:function(){throw v("LLRBEmptyNode has no left child.")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"right",{get:function(){throw v("LLRBEmptyNode has no right child.")},enumerable:!0,configurable:!0}),e.prototype.copy=function(e,t,n,r,o){return this},e.prototype.insert=function(e,t,n){return new Ce(e,t)},e.prototype.remove=function(e,t){return this},e.prototype.isEmpty=function(){return!0},e.prototype.inorderTraversal=function(e){return!1},e.prototype.reverseTraversal=function(e){return!1},e.prototype.minKey=function(){return null},e.prototype.maxKey=function(){return null},e.prototype.isRed=function(){return!1},e.prototype.checkMaxDepth=function(){return!0},e.prototype.check=function(){return 0},e}();Ce.EMPTY=new xe;var Ae=function(){function e(e){this.comparator=e,this.data=new Oe(this.comparator)}return e.fromMapKeys=function(t){var n=new e(t.comparator);return t.forEach((function(e){n=n.add(e)})),n},e.prototype.has=function(e){return null!==this.data.get(e)},e.prototype.first=function(){return this.data.minKey()},e.prototype.last=function(){return this.data.maxKey()},Object.defineProperty(e.prototype,"size",{get:function(){return this.data.size},enumerable:!0,configurable:!0}),e.prototype.indexOf=function(e){return this.data.indexOf(e)},e.prototype.forEach=function(e){this.data.inorderTraversal((function(t,n){return e(t),!1}))},e.prototype.forEachInRange=function(e,t){for(var n=this.data.getIteratorFrom(e[0]);n.hasNext();){var r=n.getNext();if(this.comparator(r.key,e[1])>=0)return;t(r.key)}},e.prototype.forEachWhile=function(e,t){var n;for(n=void 0!==t?this.data.getIteratorFrom(t):this.data.getIterator();n.hasNext();){if(!e(n.getNext().key))return}},e.prototype.firstAfterOrEqual=function(e){var t=this.data.getIteratorFrom(e);return t.hasNext()?t.getNext().key:null},e.prototype.getIterator=function(){return new Ie(this.data.getIterator())},e.prototype.getIteratorFrom=function(e){return new Ie(this.data.getIteratorFrom(e))},e.prototype.add=function(e){return this.copy(this.data.remove(e).insert(e,!0))},e.prototype.delete=function(e){return this.has(e)?this.copy(this.data.remove(e)):this},e.prototype.isEmpty=function(){return this.data.isEmpty()},e.prototype.unionWith=function(e){var t=this;return e.forEach((function(e){t=t.add(e)})),t},e.prototype.isEqual=function(t){if(!(t instanceof e))return!1;if(this.size!==t.size)return!1;for(var n=this.data.getIterator(),r=t.data.getIterator();n.hasNext();){var o=n.getNext().key,i=r.getNext().key;if(0!==this.comparator(o,i))return!1}return!0},e.prototype.toArray=function(){var e=[];return this.forEach((function(t){e.push(t)})),e},e.prototype.toString=function(){var e=[];return this.forEach((function(t){return e.push(t)})),"SortedSet("+e.toString()+")"},e.prototype.copy=function(t){var n=new e(this.comparator);return n.data=t,n},e}(),Ie=function(){function e(e){this.iter=e}return e.prototype.getNext=function(){return this.iter.getNext().key},e.prototype.hasNext=function(){return this.iter.hasNext()},e}(),Ne=new Oe(fe.comparator);function De(){return Ne}function Pe(){return De()}var Re=new Oe(fe.comparator);function je(){return Re}var Me=new Oe(fe.comparator);function Le(){return Me}var Ue=new Ae(fe.comparator);function Fe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=Ue,r=0,o=e;r<o.length;r++){var i=o[r];n=n.add(i)}return n}var Be=new Ae(Y);function qe(){return Be}var Ve=function(){function e(e,t,n,r){this.batchId=e,this.localWriteTime=t,this.baseMutations=n,this.mutations=r,g(r.length>0,"Cannot create an empty mutation batch")}return e.prototype.applyToRemoteDocument=function(e,t,n){t&&g(t.key.isEqual(e),"applyToRemoteDocument: key "+e+" should match maybeDoc key\n "+t.key);var r=n.mutationResults;g(r.length===this.mutations.length,"Mismatch between mutations length\n ("+this.mutations.length+") and mutation results length\n ("+r.length+").");for(var o=0;o<this.mutations.length;o++){var i=this.mutations[o];if(i.key.isEqual(e)){var a=r[o];t=i.applyToRemoteDocument(t,a)}}return t},e.prototype.applyToLocalView=function(e,t){t&&g(t.key.isEqual(e),"applyToLocalDocument: key "+e+" should match maybeDoc key\n "+t.key);for(var n=0,r=this.baseMutations;n<r.length;n++){(u=r[n]).key.isEqual(e)&&(t=u.applyToLocalView(t,t,this.localWriteTime))}for(var o=t,i=0,a=this.mutations;i<a.length;i++){var u;(u=a[i]).key.isEqual(e)&&(t=u.applyToLocalView(t,o,this.localWriteTime))}return t},e.prototype.applyToLocalDocumentSet=function(e){var t=this,n=e;
1return this.mutations.forEach((function(r){var o=t.applyToLocalView(r.key,e.get(r.key));o&&(n=n.insert(r.key,o))})),n},e.prototype.keys=function(){return this.mutations.reduce((function(e,t){return e.add(t.key)}),Fe())},e.prototype.isEqual=function(e){return this.batchId===e.batchId&&$(this.mutations,e.mutations)&&$(this.baseMutations,e.baseMutations)},e}(),ze=function(){function e(e,t,n,r,o){this.batch=e,this.commitVersion=t,this.mutationResults=n,this.streamToken=r,this.docVersions=o}return e.from=function(t,n,r,o){g(t.mutations.length===r.length,"Mutations sent "+t.mutations.length+" must equal results received "+r.length);for(var i=Le(),a=t.mutations,u=0;u<a.length;u++)i=i.insert(a[u].key,r[u].version);return new e(t,n,r,o,i)},e}(),We=function(){function e(e){var t=this;this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,e((function(e){t.isDone=!0,t.result=e,t.nextCallback&&t.nextCallback(e)}),(function(e){t.isDone=!0,t.error=e,t.catchCallback&&t.catchCallback(e)}))}return e.prototype.catch=function(e){return this.next(void 0,e)},e.prototype.next=function(t,n){var r=this;return this.callbackAttached&&v("Called next() or catch() twice for PersistencePromise"),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(n,this.error):this.wrapSuccess(t,this.result):new e((function(e,o){r.nextCallback=function(n){r.wrapSuccess(t,n).next(e,o)},r.catchCallback=function(t){r.wrapFailure(n,t).next(e,o)}}))},e.prototype.toPromise=function(){var e=this;return new Promise((function(t,n){e.next(t,n)}))},e.prototype.wrapUserFunction=function(t){try{var n=t();return n instanceof e?n:e.resolve(n)}catch(r){return e.reject(r)}},e.prototype.wrapSuccess=function(t,n){return t?this.wrapUserFunction((function(){return t(n)})):e.resolve(n)},e.prototype.wrapFailure=function(t,n){return t?this.wrapUserFunction((function(){return t(n)})):e.reject(n)},e.resolve=function(t){return new e((function(e,n){e(t)}))}
1,e.reject=function(t){return new e((function(e,n){n(t)}))},e.waitFor=function(t){return new e((function(e,n){var r=0,o=0,i=!1;t.forEach((function(t){++r,t.next((function(){++o,i&&o===r&&e()}),(function(e){return n(e)}))})),i=!0,o===r&&e()}))},e.or=function(t){for(var n=e.resolve(!1),r=function(t){n=n.next((function(n){return n?e.resolve(n):t()}))},o=0,i=t;o<i.length;o++){r(i[o])}return n},e.forEach=function(e,t){var n=this,r=[];return e.forEach((function(e,o){r.push(t.call(n,e,o))})),this.waitFor(r)},e}(),Qe=function(){function e(e,t,n,r){this.userId=e,this.serializer=t,this.indexManager=n,this.referenceDelegate=r,this.documentKeysByBatchId={}}return e.forUser=function(t,n,r,o){return g(""!==t.uid,"UserID must not be an empty string."),new e(t.isAuthenticated()?t.uid:"",n,r,o)},e.prototype.checkEmpty=function(e){var t=!0,n=IDBKeyRange.bound([this.userId,Number.NEGATIVE_INFINITY],[this.userId,Number.POSITIVE_INFINITY]);return Ye(e).iterate({index:cn.userMutationsIndex,range:n},(function(e,n,r){t=!1,r.done()})).next((function(){return t}))},e.prototype.acknowledgeBatch=function(e,t,n){return this.getMutationQueueMetadata(e).next((function(t){return t.lastStreamToken=He(n),Xe(e).put(t)}))},e.prototype.getLastStreamToken=function(e){return this.getMutationQueueMetadata(e).next((function(e){return e.lastStreamToken}))},e.prototype.setLastStreamToken=function(e,t){return this.getMutationQueueMetadata(e).next((function(n){return n.lastStreamToken=He(t),Xe(e).put(n)}))},e.prototype.addMutationBatch=function(e,t,n,r){var o=this,i=$e(e),a=Ye(e);return a.add({}).next((function(u){g("number"===typeof u,"Auto-generated key is not a number");var s=new Ve(u,t,n,r),c=o.serializer.toDbMutationBatch(o.userId,s);o.documentKeysByBatchId[u]=s.keys();for(var l=[],f=0,h=r;f<h.length;f++){var p=h[f],d=ln.key(o.userId,p.key.path,u);l.push(a.put(c)),l.push(i.put(d,ln.PLACEHOLDER)),l.push(o.indexManager.addToCollectionParentIndex(e,p.key.path.popLast()))}return We.waitFor(l).next((function(){return s}))}))},e.prototype.lookupMutationBatch=function(e,t){var n=this;return Ye(e).get(t).next((function(e){return e?(g(e.userId===n.userId,"Unexpected user '"+e.userId+"' for mutation batch "+t),n.serializer.fromDbMutationBatch(e)):null}))},e.prototype.lookupMutationKeys=function(e,t){var n=this;return this.documentKeysByBatchId[t]?We.resolve(this.documentKeysByBatchId[t]):this.lookupMutationBatch(e,t).next((function(e){if(e){var r=e.keys();return n.documentKeysByBatchId[t]=r,r}return null}))},e.prototype.getNextMutationBatchAfterBatchId=function(e,t){var n=this,r=t+1,o=IDBKeyRange.lowerBound([this.userId,r]),i=null;return Ye(e).iterate({index:cn.userMutationsIndex,range:o},(function(e,t,o){t.userId===n.userId&&(g(t.batchId>=r,"Should have found mutation after "+r),i=n.serializer.fromDbMutationBatch(t)),o.done()})).next((function(){return i}))},e.prototype.getHighestUnacknowledgedBatchId=function(e){var t=IDBKeyRange.upperBound([this.userId,Number.POSITIVE_INFINITY]),n=-1;return Ye(e).iterate({index:cn.userMutationsIndex,range:t,reverse:!0},(function(e,t,r){n=t.batchId,r.done()})).next((function(){return n}))},e.prototype.getAllMutationBatches=function(e){var t=this,n=IDBKeyRange.bound([this.userId,-1],[this.userId,Number.POSITIVE_INFINITY]);return Ye(e).loadAll(cn.userMutationsIndex,n).next((function(e){return e.map((function(e){return t.serializer.fromDbMutationBatch(e)}))}))},e.prototype.getAllMutationBatchesAffectingDocumentKey=function(e,t){var n=this,r=ln.prefixForPath(this.userId,t.path),o=IDBKeyRange.lowerBound(r),i=[];return $e(e).iterate({range:o},(function(r,o,a){var u=r[0],s=r[1],c=r[2],l=_e(s);if(u===n.userId&&t.path.isEqual(l))return Ye(e).get(c).next((function(e){if(!e)throw v("Dangling document-mutation reference found: "+r+" which points to "+c);g(e.userId===n.userId,"Unexpected user '"+e.userId+"' for mutation batch "+c),i.push(n.serializer.fromDbMutationBatch(e))}));a.done()})).next((function(){return i}))},e.prototype.getAllMutationBatchesAffectingDocumentKeys=function(e,t){var n=this,r=new Ae(Y),o=[];return t.forEach((function(t){var i=ln.prefixForPath(n.userId,t.path),a=IDBKeyRange.lowerBound(i),u=$e(e).iterate({range:a},(function(e,o,i){var a=e[0],u=e[1],s=e[2],c=_e(u);a===n.userId&&t.path.isEqual(c)?r=r.add(s):i.done()}));o.push(u)})),We.waitFor(o).next((function(){return n.lookupMutationBatches(e,r)}))},e.prototype.getAllMutationBatchesAffectingQuery=function(e,t){var n=this;g(!t.isDocumentQuery(),"Document queries shouldn't go down this path"),g(!t.isCollectionGroupQuery(),"CollectionGroup queries should be handled in LocalDocumentsView");var r=t.path,o=r.length+1,i=ln.prefixForPath(this.userId,r),a=IDBKeyRange.lowerBound(i),u=new Ae(Y);return $e(e).iterate({range:a},(function(e,t,i){var a=e[0],s=e[1],c=e[2],l=_e(s);a===n.userId&&r.isPrefixOf(l)?l.length===o&&(u=u.add(c)):i.done()})).next((function(){return n.lookupMutationBatches(e,u)}))},e.prototype.lookupMutationBatches=function(e,t){var n=this,r=[],o=[];return t.forEach((function(t){o.push(Ye(e).get(t).next((function(e){if(null===e)throw v("Dangling document-mutation reference found, which points to "+t);g(e.userId===n.userId,"Unexpected user '"+e.userId+"' for mutation batch "+t),r.push(n.serializer.fromDbMutationBatch(e))})))})),We.waitFor(o).next((function(){return r}))},e.prototype.removeMutationBatch=function(e,t){var n=this;return Ke(e.simpleDbTransaction,this.userId,t).next((function(r){return n.removeCachedMutationKeys(t.batchId),We.forEach(r,(function(t){return n.referenceDelegate.removeMutationReference(e,t)}))}))},e.prototype.removeCachedMutationKeys=function(e){delete this.documentKeysByBatchId[e]},e.prototype.performConsistencyCheck=function(e){var t=this;return this.checkEmpty(e).next((function(n){if(!n)return We.resolve();
1var r=IDBKeyRange.lowerBound(ln.prefixForUser(t.userId)),o=[];return $e(e).iterate({range:r},(function(e,n,r){if(e[0]===t.userId){var i=_e(e[1]);o.push(i)}else r.done()})).next((function(){g(0===o.length,"Document leak -- detected dangling mutation references when queue is empty. Dangling keys: "+o.map((function(e){return e.canonicalString()})))}))}))},e.prototype.containsKey=function(e,t){return Ge(e,this.userId,t)},e.prototype.getMutationQueueMetadata=function(e){var t=this;return Xe(e).get(this.userId).next((function(e){return e||new sn(t.userId,-1,"")}))},e}();function Ge(e,t,n){var r=ln.prefixForPath(t,n.path),o=r[1],i=IDBKeyRange.lowerBound(r),a=!1;return $e(e).iterate({range:i,keysOnly:!0},(function(e,n,r){var i=e[0],u=e[1];e[2];i===t&&u===o&&(a=!0),r.done()})).next((function(){return a}))}function Ke(e,t,n){var r=e.store(cn.store),o=e.store(ln.store),i=[],a=IDBKeyRange.only(n.batchId),u=0,s=r.iterate({range:a},(function(e,t,n){return u++,n.delete()}));i.push(s.next((function(){g(1===u,"Dangling document-mutation reference found: Missing batch "+n.batchId)})));for(var c=[],l=0,f=n.mutations;l<f.length;l++){var h=f[l],p=ln.key(t,h.key.path,n.batchId);i.push(o.delete(p)),c.push(h.key)}return We.waitFor(i).next((function(){return c}))}function He(e){return e instanceof Uint8Array?(g("YES"===Object({NODE_ENV:"production",PUBLIC_URL:""}).USE_MOCK_PERSISTENCE,"Persisting non-string stream tokens is only supported with mock persistence."),e.toString()):e}function Ye(e){return Fn.getStore(e,cn.store)}function $e(e){return Fn.getStore(e,ln.store)}function Xe(e){return Fn.getStore(e,sn.store)}var Je,Ze=1;!function(e){e[e.QueryCache=0]="QueryCache",e[e.SyncEngine=1]="SyncEngine"}(Je||(Je={}));var et=function(){function e(e,t){this.generatorId=e,g((e&Ze)===e,"Generator ID "+e+" contains more than "+Ze+" reserved bits"),this.seek(void 0!==t?t:this.generatorId)}return e.prototype.next=function(){var e=this.nextId;return this.nextId+=1<<Ze,e},e.prototype.after=function(e){return this.seek(e+(1<<Ze)),this.next()},e.prototype.seek=function(e){g((e&Ze)===this.generatorId,"Cannot supply target ID from different generator ID"),this.nextId=e},e.forQueryCache=function(){return new e(Je.QueryCache,2)},e.forSyncEngine=function(){return new e(Je.SyncEngine)},e}(),tt="SimpleDb",nt=function(){function e(t){this.db=t,12.2===e.getIOSVersion(s.getUA())&&m("Firestore persistence suffers from a bug in iOS 12.2 Safari that may cause your app to stop working. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.")}return e.openOrCreate=function(t,n,r){return g(e.isAvailable(),"IndexedDB not supported in current environment."),d(tt,"Opening database:",t),new We((function(o,i){var a=window.indexedDB.open(t,n);a.onsuccess=function(t){var n=t.target.result;o(new e(n))},a.onblocked=function(){i(new _(E.FAILED_PRECONDITION,"Cannot upgrade IndexedDB schema while another tab is open. Close all tabs that access Firestore and reload this page to proceed."))},a.onerror=function(e){var t=e.target.error;"VersionError"===t.name?i(new _(E.FAILED_PRECONDITION,"A newer version of the Firestore SDK was previously used and so the persisted data is not compatible with the version of the SDK you are now using. The SDK will operate with persistence disabled. If you need persistence, please re-upgrade to a newer version of the SDK or else clear the persisted IndexedDB data for your app to start fresh.")):i(t)},a.onupgradeneeded=function(e){d(tt,'Database "'+t+'" requires upgrade from version:',e.oldVersion);var n=e.target.result,o=new ot(a.transaction);r.createOrUpgrade(n,o,e.oldVersion,rn).next((function(){d(tt,"Database upgrade to version "+rn+" complete")}))}})).toPromise()},e.delete=function(e){return d(tt,"Removing database:",e),at(window.indexedDB.deleteDatabase(e)).toPromise()},e.isAvailable=function(){if("undefined"===typeof window||null==window.indexedDB)return!1;if(void 0===window.navigator)return"YES"===Object({NODE_ENV:"production",PUBLIC_URL:""}).USE_MOCK_PERSISTENCE;var t=s.getUA(),n=e.getIOSVersion(t),r=0<n&&n<10,o=e.getAndroidVersion(t),i=0<o&&o<4.5;return!(t.indexOf("MSIE ")>0||t.indexOf("Trident/")>0||t.indexOf("Edge/")>0||r||i)},e.getStore=function(e,t){return e.store(t)},e.getIOSVersion=function(e){var t=e.match(/i(?:phone|pad|pod) os ([\d_]+)/i),n=t?t[1].split("_").slice(0,2).join("."):"-1";return Number(n)},e.getAndroidVersion=function(e){var t=e.match(/Android ([\d.]+)/i),n=t?t[1].split(".").slice(0,2).join("."):"-1";return Number(n)},e.prototype.setVersionChangeListener=function(e){this.db.onversionchange=function(t){return e(t)}},e.prototype.runTransaction=function(e,t,n){var r=ot.open(this.db,e,t),o=n(r).catch((function(e){return r.abort(e),We.reject(e)})).toPromise();return o.catch((function(){})),r.completionPromise.then((function(){return o}
1))},e.prototype.close=function(){this.db.close()},e}(),rt=function(){function e(e){this.dbCursor=e,this.shouldStop=!1,this.nextKey=null}return Object.defineProperty(e.prototype,"isDone",{get:function(){return this.shouldStop},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"skipToKey",{get:function(){return this.nextKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cursor",{set:function(e){this.dbCursor=e},enumerable:!0,configurable:!0}),e.prototype.done=function(){this.shouldStop=!0},e.prototype.skip=function(e){this.nextKey=e},e.prototype.delete=function(){return at(this.dbCursor.delete())},e}(),ot=function(){function e(e){var t=this;this.transaction=e,this.aborted=!1,this.completionDeferred=new he,this.transaction.oncomplete=function(){t.completionDeferred.resolve()},this.transaction.onabort=function(){e.error?t.completionDeferred.reject(e.error):t.completionDeferred.resolve()},this.transaction.onerror=function(e){var n=st(e.target.error);t.completionDeferred.reject(n)}}return e.open=function(t,n,r){return new e(t.transaction(r,n))},Object.defineProperty(e.prototype,"completionPromise",{get:function(){return this.completionDeferred.promise},enumerable:!0,configurable:!0}),e.prototype.abort=function(e){e&&this.completionDeferred.reject(e),this.aborted||(d(tt,"Aborting transaction:",e?e.message:"Client-initiated abort"),this.aborted=!0,this.transaction.abort())},e.prototype.store=function(e){var t=this.transaction.objectStore(e);return g(!!t,"Object store not part of transaction: "+e),new it(t)},e}(),it=function(){function e(e){this.store=e}return e.prototype.put=function(e,t){var n;return void 0!==t?(d(tt,"PUT",this.store.name,e,t),n=this.store.put(t,e)):(d(tt,"PUT",this.store.name,"<auto-key>",e),n=this.store.put(e)),at(n)},e.prototype.add=function(e){return d(tt,"ADD",this.store.name,e,e),at(this.store.add(e))},e.prototype.get=function(e){var t=this;return at(this.store.get(e)).next((function(n){return void 0===n&&(n=null),d(tt,"GET",t.store.name,e,n),n}))},e.prototype.delete=function(e){return d(tt,"DELETE",this.store.name,e),at(this.store.delete(e))},e.prototype.count=function(){return d(tt,"COUNT",this.store.name),at(this.store.count())},e.prototype.loadAll=function(e,t){var n=this.cursor(this.options(e,t)),r=[];return this.iterateCursor(n,(function(e,t){r.push(t)})).next((function(){return r}))},e.prototype.deleteAll=function(e,t){d(tt,"DELETE ALL",this.store.name);var n=this.options(e,t);n.keysOnly=!1;var r=this.cursor(n);return this.iterateCursor(r,(function(e,t,n){return n.delete()}))},e.prototype.iterate=function(e,t){var n;t?n=e:(n={},t=e);var r=this.cursor(n);return this.iterateCursor(r,t)},e.prototype.iterateSerial=function(e){var t=this.cursor({});return new We((function(n,r){t.onerror=function(e){var t=st(e.target.error);r(t)},t.onsuccess=function(t){var r=t.target.result;r?e(r.primaryKey,r.value).next((function(e){e?r.continue():n()})):n()}}))},e.prototype.iterateCursor=function(e,t){var n=[];return new We((function(r,o){e.onerror=function(e){o(e.target.error)},e.onsuccess=function(e){var o=e.target.result;if(o){var i=new rt(o),a=t(o.primaryKey,o.value,i);if(a instanceof We){var u=a.catch((function(e){return i.done(),We.reject(e)}));n.push(u)}i.isDone?r():null===i.skipToKey?o.continue():o.continue(i.skipToKey)}else r()}})).next((function(){return We.waitFor(n)}))},e.prototype.options=function(e,t){var n=void 0;return void 0!==e&&("string"===typeof e?n=e:(g(void 0===t,"3rd argument must not be defined if 2nd is a range."),t=e)),{index:n,range:t}},e.prototype.cursor=function(e){var t="next";if(e.reverse&&(t="prev"),e.index){var n=this.store.index(e.index);return e.keysOnly?n.openKeyCursor(e.range,t):n.openCursor(e.range,t)}return this.store.openCursor(e.range,t)},e}();function at(e){return new We((function(t,n){e.onsuccess=function(e){var n=e.target.result;t(n)},e.onerror=function(e){var t=st(e.target.error);n(t)}}))}var ut=!1;function st(e){var t=nt.getIOSVersion(s.getUA());if(t>=12.2&&t<13){var n="An internal error was encountered in the Indexed Database server";if(e.message.indexOf(n)>=0){var r=new _("internal","IOS_INDEXEDDB_BUG1: IndexedDb has thrown '"+n+"'. This is likely due to an unavoidable bug in iOS. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.");return ut||(ut=!0,setTimeout((function(){throw r}),0)),r}}return e}var ct=function(){function e(e,t){this.referenceDelegate=e,this.serializer
1=t,this.targetIdGenerator=et.forQueryCache()}return e.prototype.allocateTargetId=function(e){var t=this;return this.retrieveMetadata(e).next((function(n){return n.highestTargetId=t.targetIdGenerator.after(n.highestTargetId),t.saveMetadata(e,n).next((function(){return n.highestTargetId}))}))},e.prototype.getLastRemoteSnapshotVersion=function(e){return this.retrieveMetadata(e).next((function(e){return Te.fromTimestamp(new Se(e.lastRemoteSnapshotVersion.seconds,e.lastRemoteSnapshotVersion.nanoseconds))}))},e.prototype.getHighestSequenceNumber=function(e){return ht(e.simpleDbTransaction)},e.prototype.setTargetsMetadata=function(e,t,n){var r=this;return this.retrieveMetadata(e).next((function(o){return o.highestListenSequenceNumber=t,n&&(o.lastRemoteSnapshotVersion=n.toTimestamp()),t>o.highestListenSequenceNumber&&(o.highestListenSequenceNumber=t),r.saveMetadata(e,o)}))},e.prototype.addQueryData=function(e,t){var n=this;return this.saveQueryData(e,t).next((function(){return n.retrieveMetadata(e).next((function(r){return r.targetCount+=1,n.updateMetadataFromQueryData(t,r),n.saveMetadata(e,r)}))}))},e.prototype.updateQueryData=function(e,t){return this.saveQueryData(e,t)},e.prototype.removeQueryData=function(e,t){var n=this;return this.removeMatchingKeysForTargetId(e,t.targetId).next((function(){return lt(e).delete(t.targetId)})).next((function(){return n.retrieveMetadata(e)})).next((function(t){return g(t.targetCount>0,"Removing from an empty query cache"),t.targetCount-=1,n.saveMetadata(e,t)}))},e.prototype.removeTargets=function(e,t,n){var r=this,o=0,i=[];return lt(e).iterate((function(a,u){var s=r.serializer.fromDbTarget(u);s.sequenceNumber<=t&&void 0===n[s.targetId]&&(o++,i.push(r.removeQueryData(e,s)))})).next((function(){return We.waitFor(i)})).next((function(){return o}))},e.prototype.forEachTarget=function(e,t){var n=this;return lt(e).iterate((function(e,r){var o=n.serializer.fromDbTarget(r);t(o)}))},e.prototype.retrieveMetadata=function(e){return ft(e.simpleDbTransaction)},e.prototype.saveMetadata=function(e,t){return(n=e,Fn.getStore(n,vn.store)).put(vn.key,t);var n},e.prototype.saveQueryData=function(e,t){return lt(e).put(this.serializer.toDbTarget(t))},e.prototype.updateMetadataFromQueryData=function(e,t){var n=!1;return e.targetId>t.highestTargetId&&(t.highestTargetId=e.targetId,n=!0),e.sequenceNumber>t.highestListenSequenceNumber&&(t.highestListenSequenceNumber=e.sequenceNumber,n=!0),n},e.prototype.getQueryCount=function(e){return this.retrieveMetadata(e).next((function(e){return e.targetCount}))},e.prototype.getQueryData=function(e,t){var n=this,r=t.canonicalId(),o=IDBKeyRange.bound([r,Number.NEGATIVE_INFINITY],[r,Number.POSITIVE_INFINITY]),i=null;return lt(e).iterate({range:o,index:mn.queryTargetsIndexName},(function(e,r,o){var a=n.serializer.fromDbTarget(r);t.isEqual(a.query)&&(i=a,o.done())})).next((function(){return i}))},e.prototype.addMatchingKeys=function(e,t,n){var r=this,o=[],i=pt(e);return t.forEach((function(t){var a=be(t.path);o.push(i.put(new yn(n,a))),o.push(r.referenceDelegate.addReference(e,t))})),We.waitFor(o)},e.prototype.removeMatchingKeys=function(e,t,n){var r=this,o=pt(e);return We.forEach(t,(function(t){var i=be(t.path);return We.waitFor([o.delete([n,i]),r.referenceDelegate.removeReference(e,t)])}))},e.prototype.removeMatchingKeysForTargetId=function(e,t){var n=pt(e),r=IDBKeyRange.bound([t],[t+1],!1,!0);return n.delete(r)},e.prototype.getMatchingKeysForTargetId=function(e,t){var n=IDBKeyRange.bound([t],[t+1],!1,!0),r=pt(e),o=Fe();return r.iterate({range:n,keysOnly:!0},(function(e,t,n){var r=_e(e[1]),i=new fe(r);o=o.add(i)})).next((function(){return o}))},e.prototype.containsKey=function(e,t){var n=be(t.path),r=IDBKeyRange.bound([n],[X(n)],!1,!0),o=0;return pt(e).iterate({index:yn.documentTargetsIndex,keysOnly:!0,range:r},(function(e,t,n){var r=e[0];e[1];0!==r&&(o++,n.done())})).next((function(){return o>0}))},e.prototype.getQueryDataForTarget=function(e,t){var n=this;return lt(e).get(t).next((function(e){return e?n.serializer.fromDbTarget(e):null}))},e}();function lt(e){return Fn.getStore(e,mn.store)}function ft(e){return nt.getStore(e,vn.store).get(vn.key).next((function(e){return g(null!==e,"Missing metadata row."),e}))}function ht(e){return ft(e).next((function(e){return e.highestListenSequenceNumber}))}function pt(e){return Fn.getStore(e,yn.store)}var dt,mt=function(){function e(e){this.fields=e}return e.fromSet=function(t){return new e(t)},e.fromArray=function(t){var n=new Ae(le.comparator);return t.forEach((function(e){return n=n.add(e)})),new e(n)},e.prototype.covers=function(e){var t=!1;return this.fields.forEach((function(n){n.isPrefixOf(e)&&(t=!0)})),t},e.prototype.isEqual=function(e){return this.fields.isEqual(e.fields)},e}(),yt=function(){function e(e,t){this.field=e,this.transform=t}return e.prototype.isEqual=function(e){return this.field.isEqual(e.field)&&this.transform.isEqual(e.transform)},e}(),vt=function(){return function(e,t){this.version=e,this.transformResults=t}}();!function(e){e[e.Set=0]="Set",e[e.Patch=1]="Patch",e[e.Transform=2]="Transform",e[e.Delete=3]="Delete"}(dt||(dt={}));var gt,bt,wt=function(){function e(e,t){this.updateTime=e,this.exists=t,g(void 0===e||void 0===t,'Precondition can specify "exists" or "updateTime" but not both')}return e.exists=function(t){return new e(void 0,t)},e.updateTime=function(t){return new e(t)},Object.defineProperty(e.prototype,"isNone",{get:function(){return void 0===this.updateTime&&void 0===this.exists},enumerable:!0,configurable:!0}),e.prototype.isValidFor=function(e){return void 0!==this.updateTime?e instanceof zt&&e.ver
1sion.isEqual(this.updateTime):void 0!==this.exists?this.exists===e instanceof zt:(g(this.isNone,"Precondition should be empty"),!0)},e.prototype.isEqual=function(e){return t=this.updateTime,n=e.updateTime,(null!==t&&void 0!==t?!(!n||!t.isEqual(n)):t===n)&&this.exists===e.exists;var t,n},e.NONE=new e,e}(),Et=function(){function e(){}return e.prototype.verifyKeyMatches=function(e){null!=e&&g(e.key.isEqual(this.key),"Can only apply a mutation to a document with the same key")},e.getPostMutationVersion=function(e){return e instanceof zt?e.version:Te.MIN},e}(),_t=function(e){function t(t,n,r){var o=e.call(this)||this;return o.key=t,o.value=n,o.precondition=r,o.type=dt.Set,o}return u.__extends(t,e),t.prototype.applyToRemoteDocument=function(e,t){this.verifyKeyMatches(e),g(null==t.transformResults,"Transform results received by SetMutation.");var n=t.version;return new zt(this.key,n,{hasCommittedMutations:!0},this.value)},t.prototype.applyToLocalView=function(e,t,n){if(this.verifyKeyMatches(e),!this.precondition.isValidFor(e))return e;var r=Et.getPostMutationVersion(e);return new zt(this.key,r,{hasLocalMutations:!0},this.value)},t.prototype.extractBaseValue=function(e){return null},t.prototype.isEqual=function(e){return e instanceof t&&this.key.isEqual(e.key)&&this.value.isEqual(e.value)&&this.precondition.isEqual(e.precondition)},t}(Et),St=function(e){function t(t,n,r,o){var i=e.call(this)||this;return i.key=t,i.data=n,i.fieldMask=r,i.precondition=o,i.type=dt.Patch,i}return u.__extends(t,e),t.prototype.applyToRemoteDocument=function(e,t){if(this.verifyKeyMatches(e),g(null==t.transformResults,"Transform results received by PatchMutation."),!this.precondition.isValidFor(e))return new Qt(this.key,t.version);var n=this.patchDocument(e);return new zt(this.key,t.version,{hasCommittedMutations:!0},n)},t.prototype.applyToLocalView=function(e,t,n){if(this.verifyKeyMatches(e),!this.precondition.isValidFor(e))return e;var r=Et.getPostMutationVersion(e),o=this.patchDocument(e);return new zt(this.key,r,{hasLocalMutations:!0},o)},t.prototype.extractBaseValue=function(e){return null},t.prototype.isEqual=function(e){return e instanceof t&&this.key.isEqual(e.key)&&this.fieldMask.isEqual(e.fieldMask)&&this.precondition.isEqual(e.precondition)},t.prototype.patchDocument=function(e){var t;return t=e instanceof zt?e.data():Bt.EMPTY,this.patchObject(t)},t.prototype.patchObject=function(e){var t=this;return this.fieldMask.fields.forEach((function(n){if(!n.isEmpty()){var r=t.data.field(n);e=null!==r?e.set(n,r):e.delete(n)}})),e},t}(Et),Tt=function(e){function t(t,n){var r=e.call(this)||this;return r.key=t,r.fieldTransforms=n,r.type=dt.Transform,r.precondition=wt.exists(!0),r}return u.__extends(t,e),t.prototype.applyToRemoteDocument=function(e,t){if(this.verifyKeyMatches(e),g(null!=t.transformResults,"Transform results missing for TransformMutation."),!this.precondition.isValidFor(e))return new Qt(this.key,t.version);var n=this.requireDocument(e),r=this.serverTransformResults(e,t.transformResults),o=t.version,i=this.transformObject(n.data(),r);return new zt(this.key,o,{hasCommittedMutations:!0},i)},t.prototype.applyToLocalView=function(e,t,n){if(this.verifyKeyMatches(e),!this.precondition.isValidFor(e))return e;var r=this.requireDocument(e),o=this.localTransformResults(n,e,t),i=this.transformObject(r.data(),o);return new zt(this.key,r.version,{hasLocalMutations:!0},i)},t.prototype.extractBaseValue=function(e){for(var t=null,n=0,r=this.fieldTransforms;n<r.length;n++){var o=r[n],i=e instanceof zt?e.field(o.field):void 0,a=o.transform.computeBaseValue(i||null);null!=a&&(t=null==t?Bt.EMPTY.set(o.field,a):t.set(o.field,a))}return t},t.prototype.isEqual=function(e){return e instanceof t&&this.key.isEqual(e.key)&&$(this.fieldTransforms,e.fieldTransforms)&&this.precondition.isEqual(e.precondition)},t.prototype.requireDocument=function(e){g(e instanceof zt,"Unknown MaybeDocument type "+e);var t=e;return g(t.key.isEqual(this.key),"Can only transform a document with the same key"),t},t.prototype.serverTransformResults=function(e,t){var n=[];g(this.fieldTransforms.length===t.length,"server transform result count ("+t.length+") should match field transform count ("+this.fieldTransforms.length+")");for(var r=0;r<t.length;r++){var o=this.fieldTransforms[r],i=o.transform,a=null;e instanceof zt&&(a=e.field(o.field)),n.push(i.applyToRemoteDocument(a,t[r]))}return n},t.prototype.localTransformResults=function(e,t,n){for(var r=[],o=0,i=this.fieldTransforms;o<i.length;o++){var a=i[o],u=a.transform,s=null;t instanceof zt&&(s=t.field(a.field)),null===s&&n instanceof zt&&(s=n.field(a.field)),r.push(u.applyToLocalView(s,e))}return r},t.prototype.transformObject=function(e,t){g(t.length===this.fieldTransforms.length,"TransformResults length mismatch.");for(var n=0;n<this.fieldTransforms.length;n++){var r=this.fieldTransforms[n].field;e=e.set(r,t[n])}return e},t}(Et),Ot=function(e){function t(t,n){var r=e.call(this)||this;return r.key=t,r.precondition=n,r.type=dt.Delete,r}return u.__extends(t,e),t.prototype.applyToRemoteDocument=function(e,t){return this.verifyKeyMatches(e),g(null==t.transformResults,"Transform results received by DeleteMutation."),new Wt(this.key,t.version,{hasCommittedMutations:!0})},t.prototype.applyToLocalView=function(e,t,n){return this.verifyKeyMatches(e),this.prec
1ondition.isValidFor(e)?(e&&g(e.key.isEqual(this.key),"Can only apply mutation to document with same key"),new Wt(this.key,Te.forDeletedDoc())):e},t.prototype.extractBaseValue=function(e){return null},t.prototype.isEqual=function(e){return e instanceof t&&this.key.isEqual(e.key)&&this.precondition.isEqual(e.precondition)},t}(Et);!function(e){e[e.NullValue=0]="NullValue",e[e.BooleanValue=1]="BooleanValue",e[e.NumberValue=2]="NumberValue",e[e.TimestampValue=3]="TimestampValue",e[e.StringValue=4]="StringValue",e[e.BlobValue=5]="BlobValue",e[e.RefValue=6]="RefValue",e[e.GeoPointValue=7]="GeoPointValue",e[e.ArrayValue=8]="ArrayValue",e[e.ObjectValue=9]="ObjectValue"}(gt||(gt={})),function(e){e[e.Default=0]="Default",e[e.Estimate=1]="Estimate",e[e.Previous=2]="Previous"}(bt||(bt={}));var kt=function(){function e(e,t){this.serverTimestampBehavior=e,this.timestampsInSnapshots=t}return e.fromSnapshotOptions=function(t,n){switch(t.serverTimestamps){case"estimate":return new e(bt.Estimate,n);case"previous":return new e(bt.Previous,n);case"none":case void 0:return new e(bt.Default,n);default:return v("fromSnapshotOptions() called with invalid options.")}},e}(),Ct=function(){function e(){}return e.prototype.toString=function(){var e=this.value();return null===e?"null":e.toString()},e.prototype.defaultCompareTo=function(e){return g(this.typeOrder!==e.typeOrder,"Default compareTo should not be used for values of same type."),Y(this.typeOrder,e.typeOrder)},e}(),xt=function(e){function t(){var t=e.call(this)||this;return t.typeOrder=gt.NullValue,t.internalValue=null,t}return u.__extends(t,e),t.prototype.value=function(e){return null},t.prototype.isEqual=function(e){return e instanceof t},t.prototype.compareTo=function(e){return e instanceof t?0:this.defaultCompareTo(e)},t.INSTANCE=new t,t}(Ct),At=function(e){function t(t){var n=e.call(this)||this;return n.internalValue=t,n.typeOrder=gt.BooleanValue,n}return u.__extends(t,e),t.prototype.value=function(e){return this.internalValue},t.prototype.isEqual=function(e){return e instanceof t&&this.internalValue===e.internalValue},t.prototype.compareTo=function(e){return e instanceof t?Y(this,e):this.defaultCompareTo(e)},t.of=function(e){return e?t.TRUE:t.FALSE},t.TRUE=new t(!0),t.FALSE=new t(!1),t}(Ct),It=function(e){function t(t){var n=e.call(this)||this;return n.internalValue=t,n.typeOrder=gt.NumberValue,n}return u.__extends(t,e),t.prototype.value=function(e){return this.internalValue},t.prototype.compareTo=function(e){return e instanceof t?(n=this.internalValue,r=e.internalValue,n<r?-1:n>r?1:n===r?0:isNaN(n)?isNaN(r)?0:-1:1):this.defaultCompareTo(e);var n,r},t}(Ct);function Nt(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}var Dt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u.__extends(t,e),t.prototype.isEqual=function(e){return e instanceof t&&Nt(this.internalValue,e.internalValue)},t}(It),Pt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u.__extends(t,e),t.prototype.isEqual=function(e){return e instanceof t&&Nt(this.internalValue,e.internalValue)},t.NAN=new t(NaN),t.POSITIVE_INFINITY=new t(1/0),t.NEGATIVE_INFINITY=new t(-1/0),t}(It),Rt=function(e){function t(t){var n=e.call(this)||this;return n.internalValue=t,n.typeOrder=gt.StringValue,n}return u.__extends(t,e),t.prototype.value=function(e){return this.internalValue},t.prototype.isEqual=function(e){return e instanceof t&&this.internalValue===e.internalValue},t.prototype.compareTo=function(e){return e instanceof t?Y(this.internalValue,e.internalValue):this.defaultCompareTo(e)},t}(Ct),jt=function(e){function t(t){var n=e.call(this)||this;return n.internalValue=t,n.typeOrder=gt.TimestampValue,n}return u.__extends(t,e),t.prototype.value=function(e){return!e||e.timestampsInSnapshots?this.internalValue:this.internalValue.toDate()},t.prototype.isEqual=function(e){return e instanceof t&&this.internalValue.isEqual(e.internalValue)},t.prototype.compareTo=function(e){return e instanceof t?this.internalValue._compareTo(e.internalValue):e instanceof Mt?-1:this.defaultCompareTo(e)},t}(Ct),Mt=function(e){function t(t,n){var r=e.call(this)||this;return r.localWriteTime=t,r.previousValue=n,r.typeOrder=gt.TimestampValue,r}return u.__extends(t,e),t.prototype.value=function(e){return e&&e.serverTimestampBehavior===bt.Estimate?new jt(this.localWriteTime).value(e):e&&e.serverTimestampBehavior===bt.Previous&&this.previousValue?this.previousValue.value(e):null},t.prototype.isEqual=function(e){return e instanceof t&&this.localWriteTime.isEqual(e.localWriteTime)},t.prototype.compareTo=function(e){return e instanceof t?this.localWriteTime._compareTo(e.localWriteTime):e instanceof jt?1:this.defaultCompareTo(e)},t.prototype.toString=function(){return"<ServerTimestamp localTime="+this.localWriteTime.toString()+">"},t}(Ct),Lt=function(e){function t(t){var n=e.call(this)||this;return n.internalValue=t,n.typeOrder=gt.BlobValue,n}return u.__extends(t,e),t.prototype.value=function(e){return this.internalValue},t.prototype.isEqual=function(e){return e instanceof t&&this.internalValue.isEqual(e.internalValue)},t.prototype.compareTo=function(e){return e instanceof t?this.internalValue._compareTo(e.internalValue):this.defaultCompareTo(e)},t}(Ct),Ut=function(e){function t(t,n){var r=e.call(this)||this;return r.databaseId=t,r.key=n,r.typeOrder=gt.RefValue,r}return u.__extends(t,e),t.prototype.value=function(e){return this.key},t.prototype.isEqual=function(e){return e instanceof t&&(this.key.isEqual(e.key)&&this.databaseId.isEqual(e.databaseId))},t.prototype.compareTo=function(e){if(e instanceof t){var n=this.databaseId.compareTo(e.databaseId);return 0!==n?n:fe.comparator(this.key,e.key)}return this.defaultCompareTo(e)},t}(Ct),Ft=function(e){function t(t){var n=e.call(this)||this;return n.internalValue=t,n.typeOrder=gt.GeoPointValue,n}return u.__extends(t,e),t.prototype.value=function(e){return this.internalValue},t.prototype.isEqual=function(e){return e instanceof t&&this.internalValue.isEqual(e.internalValue)},t.prototype.compareTo=function(e){return e instanceof t?this.internalValue._compareTo(e.internalValue):this.defaultCompareTo(e)},t}(Ct),Bt=function(e){function t(t){var n=e.call(this)||this;return n.internalValue=t,n.typeOrder=gt.ObjectValue,n}return u.__extends(t,e),t.prototype.value=function(e){var t={};return this.internalValue.inorderTraversal((function(n,r){t[n]=r.value(e)})),t},t.prototype.forEach=function(e){this.internalValue.inorderTraversal(e)},t.prototype.isEqual=function(e){if(e instanceof t){for(var n=this.internalValue.getIterator(),r=e.internalValue.getIterator();n.hasNext()&&r.hasNext();){var o=n.getNext(),i=r.getNext();if(o.key!==i.key||!o.value.isEqual(i.value))return!1}return!n.hasNext()&&!r.hasNext()}return!1},t.prototype.compareTo=function(e){if(e instanceof t){for(var n=this.internalValue.getIterator(),r=e.internalValue.getIterator();n.hasNext()&&r.hasNext();
1){var o=n.getNext(),i=r.getNext(),a=Y(o.key,i.key)||o.value.compareTo(i.value);if(a)return a}return Y(n.hasNext(),r.hasNext())}return this.defaultCompareTo(e)},t.prototype.set=function(e,n){if(g(!e.isEmpty(),"Cannot set field for empty path on ObjectValue"),1===e.length)return this.setChild(e.firstSegment(),n);var r=this.child(e.firstSegment());r instanceof t||(r=t.EMPTY);var o=r.set(e.popFirst(),n);return this.setChild(e.firstSegment(),o)},t.prototype.delete=function(e){if(g(!e.isEmpty(),"Cannot delete field for empty path on ObjectValue"),1===e.length)return new t(this.internalValue.remove(e.firstSegment()));var n=this.child(e.firstSegment());if(n instanceof t){var r=n.delete(e.popFirst());return new t(this.internalValue.insert(e.firstSegment(),r))}return this},t.prototype.contains=function(e){return null!==this.field(e)},t.prototype.field=function(e){g(!e.isEmpty(),"Can't get field of empty path");var n=this;return e.forEach((function(e){n=n instanceof t?n.internalValue.get(e):null})),n},t.prototype.fieldMask=function(){var e=new Ae(le.comparator);return this.internalValue.forEach((function(n,r){var o=new le([n]);if(r instanceof t){var i=r.fieldMask().fields;i.isEmpty()?e=e.add(o):i.forEach((function(t){e=e.add(o.child(t))}))}else e=e.add(o)})),mt.fromSet(e)},t.prototype.toString=function(){return this.internalValue.toString()},t.prototype.child=function(e){return this.internalValue.get(e)||void 0},t.prototype.setChild=function(e,n){return new t(this.internalValue.insert(e,n))},t.EMPTY=new t(new Oe(Y)),t}(Ct),qt=function(e){function t(t){var n=e.call(this)||this;return n.internalValue=t,n.typeOrder=gt.ArrayValue,n}return u.__extends(t,e),t.prototype.value=function(e){return this.internalValue.map((function(t){return t.value(e)}))},t.prototype.contains=function(e){for(var t=0,n=this.internalValue;t<n.length;t++){if(n[t].isEqual(e))return!0}return!1},t.prototype.forEach=function(e){this.internalValue.forEach(e)},t.prototype.isEqual=function(e){if(e instanceof t){if(this.internalValue.length!==e.internalValue.length)return!1;for(var n=0;n<this.internalValue.length;n++)if(!this.internalValue[n].isEqual(e.internalValue[n]))return!1;return!0}return!1},t.prototype.compareTo=function(e){if(e instanceof t){for(var n=Math.min(this.internalValue.length,e.internalValue.length),r=0;r<n;r++){var o=this.internalValue[r].compareTo(e.internalValue[r]);if(o)return o}return Y(this.internalValue.length,e.internalValue.length)}return this.defaultCompareTo(e)},t.prototype.toString=function(){return"["+this.internalValue.map((function(e){return e.toString()})).join(",")+"]"},t}(Ct),Vt=function(){function e(e,t){this.key=e,this.version=t}return e.compareByKey=function(e,t){return fe.comparator(e.key,t.key)},e}(),zt=function(e){function t(t,n,r,o,i,a){var u=e.call(this,t,n)||this;return u.objectValue=o,u.proto=i,u.converter=a,g(void 0!==u.objectValue||void 0!==u.proto&&void 0!==u.converter,"If objectValue is not defined, proto and converter need to be set."),u.hasLocalMutations=!!r.hasLocalMutations,u.hasCommittedMutations=!!r.hasCommittedMutations,u}return u.__extends(t,e),t.prototype.field=function(e){if(this.objectValue)return this.objectValue.field(e);this.fieldValueCache||(this.fieldValueCache=new Map);var t=e.canonicalString(),n=this.fieldValueCache.get(t);if(void 0===n){var r=this.getProtoField(e);n=void 0===r?null:this.converter(r),this.fieldValueCache.set(t,n)}return n},t.prototype.data=function(){var e=this;if(!this.objectValue){var t=Bt.EMPTY;C(this.proto.fields,(function(n,r){t=t.set(new le([n]),e.converter(r))})),this.objectValue=t,this.fieldValueCache=void 0}return this.objectValue},t.prototype.value=function(){return this.data().value()},t.prototype.isEqual=function(e){return e instanceof t&&this.key.isEqual(e.key)&&this.version.isEqual(e.version)&&this.hasLocalMutations===e.hasLocalMutations&&this.hasCommittedMutations===e.hasCommittedMutations&&this.data().isEqual(e.data())},t.prototype.toString=function(){return"Document("+this.key+", "+this.version+", "+this.data().toString()+", {hasLocalMutations: "+this.hasLocalMutations+"}), {hasCommittedMutations: "+this.hasCommittedMutations+"})"},Object.defineProperty(t.prototype,"hasPendingWrites",{get:function(){return this.hasLocalMutations||this.hasCommittedMutations},enumerable:!0,configurable:!0}),t.prototype.getProtoField=function(e){g(void 0!==this.proto,"Can only call getProtoField() when proto is defined");for(var t=this.proto.fields[e.firstSegment()],n=1;n<e.length;++n){if(!t||!t.mapValue)return;t=t.mapValue.fields[e.get(n)]}return t},t.compareByField=function(e,t,n){var r=t.field(e),o=n.field(e);return null!==r&&null!==o?r.compareTo(o):v("Trying to compare documents on fields that don't exist")},t}(Vt),Wt=function(e){function t(t,n,r){var o=e.call(this,t,n)||this;return o.hasCommittedMutations=!(!r||!r.hasCommittedMutations),o}return u.__extends(t,e),t.prototype.toString=function(){return"NoDocument("+this.key+", "+this.version+")"},Object.defineProperty(t.prototype,"hasPendingWrites",{get:function(){return this.hasCommittedMutations},enumerable:!0,configurable:!0}),t.prototype.isEqual=function(e){return e instanceof t&&e.hasCommittedMutations===this.hasCommittedMutations&&e.version.isEqual(this.version)&&e.key.isEqual(this.key)},t}(Vt),Qt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u.__extends(t,e),t.prototype.toString=function(){return"UnknownDocument("+this.key+", "+this.version+")"},Object.defineProperty(t.prototype,"hasPendingWrites",{get:function(){return!0},enumerable:!0,configurable:!0}
1),t.prototype.isEqual=function(e){return e instanceof t&&e.version.isEqual(this.version)&&e.key.isEqual(this.key)},t}(Vt),Gt=function(){function e(e){this.mapKeyFn=e,this.inner={}}return e.prototype.get=function(e){var t=this.mapKeyFn(e),n=this.inner[t];if(void 0!==n)for(var r=0,o=n;r<o.length;r++){var i=o[r],a=i[0],u=i[1];if(a.isEqual(e))return u}},e.prototype.has=function(e){return void 0!==this.get(e)},e.prototype.set=function(e,t){var n=this.mapKeyFn(e),r=this.inner[n];if(void 0!==r){for(var o=0;o<r.length;o++)if(r[o][0].isEqual(e))return void(r[o]=[e,t]);r.push([e,t])}else this.inner[n]=[[e,t]]},e.prototype.delete=function(e){var t=this.mapKeyFn(e),n=this.inner[t];if(void 0===n)return!1;for(var r=0;r<n.length;r++)if(n[r][0].isEqual(e))return 1===n.length?delete this.inner[t]:n.splice(r,1),!0;return!1},e.prototype.forEach=function(e){C(this.inner,(function(t,n){for(var r=0,o=n;r<o.length;r++){var i=o[r],a=i[0],u=i[1];e(a,u)}}))},e.prototype.isEmpty=function(){return x(this.inner)},e}(),Kt=function(){function e(){this.changes=new Gt((function(e){return e.toString()})),this.changesApplied=!1}return e.prototype.addEntry=function(e){this.assertNotApplied(),this.changes.set(e.key,e)},e.prototype.removeEntry=function(e){this.assertNotApplied(),this.changes.set(e,null)},e.prototype.getEntry=function(e,t){this.assertNotApplied();var n=this.changes.get(t);return void 0!==n?We.resolve(n):this.getFromCache(e,t)},e.prototype.getEntries=function(e,t){return this.getAllFromCache(e,t)},e.prototype.apply=function(e){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(e)},e.prototype.assertNotApplied=function(){g(!this.changesApplied,"Changes have already been applied.")},e}(),Ht="The remote document changelog no longer contains all changes for all local query views. It may be necessary to rebuild these views.",Yt=function(){function e(e,t,n){this.serializer=e,this.indexManager=t,this.keepDocumentChangeLog=n,this._lastProcessedDocumentChangeId=0}return Object.defineProperty(e.prototype,"lastProcessedDocumentChangeId",{get:function(){return this._lastProcessedDocumentChangeId},enumerable:!0,configurable:!0}),e.prototype.start=function(e){var t=nt.getStore(e,wn.store);return this.synchronizeLastDocumentChangeId(t)},e.prototype.addEntry=function(e,t,n){var r=this;return Xt(e).put(Zt(t),n).next((function(){r.indexManager.addToCollectionParentIndex(e,t.path.popLast())}))},e.prototype.removeEntry=function(e,t){var n=Xt(e),r=Zt(t);return n.delete(r)},e.prototype.updateMetadata=function(e,t,n){var r=this;return this.getMetadata(e).next((function(o){return o.byteSize+=n,r.setMetadata(e,o).next((function(){if(r.keepDocumentChangeLog)return Jt(e).put({changes:r.serializer.toDbResourcePaths(t)})}))}))},e.prototype.getEntry=function(e,t){var n=this;return Xt(e).get(Zt(t)).next((function(e){return e?n.serializer.fromDbRemoteDocument(e):null}))},e.prototype.getSizedEntry=function(e,t){var n=this;return Xt(e).get(Zt(t)).next((function(e){return e?{maybeDocument:n.serializer.fromDbRemoteDocument(e),size:en(e)}:null}))},e.prototype.getEntries=function(e,t){var n=this,r=Pe();return this.forEachDbEntry(e,t,(function(e,t){r=t?r.insert(e,n.serializer.fromDbRemoteDocument(t)):r.insert(e,null)})).next((function(){return r}))},e.prototype.getSizedEntries=function(e,t){var n=this,r=Pe(),o=new Oe(fe.comparator);return this.forEachDbEntry(e,t,(function(e,t){t?(r=r.insert(e,n.serializer.fromDbRemoteDocument(t)),o=o.insert(e,en(t))):(r=r.insert(e,null),o=o.insert(e,0))})).next((function(){return{maybeDocuments:r,sizeMap:o}}))},e.prototype.forEachDbEntry=function(e,t,n){if(t.isEmpty())return We.resolve();var r=IDBKeyRange.bound(t.first().path.toArray(),t.last().path.toArray()),o=t.getIterator(),i=o.getNext();return Xt(e).iterate({range:r},(function(e,t,r){for(var a=fe.fromSegments(e);i&&fe.comparator(i,a)<0;)n(i,null),i=o.getNext();i&&i.isEqual(a)&&(n(i,t),i=o.hasNext()?o.getNext():null),i?r.skip(i.path.toArray()):r.done()})).next((function(){for(;i;)n(i,null),i=o.hasNext()?o.getNext():null}))},e.prototype.getDocumentsMatchingQuery=function(e,t){var n=this;g(!t.isCollectionGroupQuery(),"CollectionGroup queries should be handled in LocalDocumentsView");var r=je(),o=t.path.length+1,i=t.path.toArray(),a=IDBKeyRange.lowerBound(i);return Xt(e).iterate({range:a},(function(e,i,a){if(e.length===o){var u=n.serializer.fromDbRemoteDocument(i);t.path.isPrefixOf(u.key.path)?u instanceof zt&&t.matches(u)&&(r=r.insert(u.key,u)):a.done()}})).next((function(){return r}))},e.prototype.getNewDocumentChanges=function(e){var t=this;g(this.keepDocumentChangeLog,"Can only call getNewDocumentChanges() when document change log is enabled");var n=Fe(),r=De(),o=IDBKeyRange.lowerBound(this._lastProcessedDocumentChangeId+1),i=!0,a=Jt(e);return a.iterate({range:o},(function(e,r){if(i&&(i=!1,t._lastProcessedDocumentChangeId+1!==r.id))return t.synchronizeLastDocumentChangeId(a).next((function(){return We.reject(new _(E.DATA_LOSS,Ht))}));n=n.unionWith(t.serializer.fromDbResourcePaths(r.changes)),t._lastProcessedDocumentChangeId=r.id})).next((function(){var o=[];
1return n.forEach((function(n){o.push(t.getEntry(e,n).next((function(e){var t=e||new Wt(n,Te.forDeletedDoc());r=r.insert(n,t)})))})),We.waitFor(o)})).next((function(){return r}))},e.prototype.removeDocumentChangesThroughChangeId=function(e,t){var n=IDBKeyRange.upperBound(t);return Jt(e).delete(n)},e.prototype.synchronizeLastDocumentChangeId=function(e){var t=this;return this._lastProcessedDocumentChangeId=0,e.iterate({keysOnly:!0,reverse:!0},(function(e,n,r){t._lastProcessedDocumentChangeId=e,r.done()}))},e.prototype.newChangeBuffer=function(){return new e.RemoteDocumentChangeBuffer(this)},e.prototype.getSize=function(e){return this.getMetadata(e).next((function(e){return e.byteSize}))},e.prototype.getMetadata=function(e){return $t(e).get(dn.key).next((function(e){return g(!!e,"Missing document cache metadata"),e}))},e.prototype.setMetadata=function(e,t){return $t(e).put(dn.key,t)},e.RemoteDocumentChangeBuffer=function(e){function t(t){var n=e.call(this)||this;return n.documentCache=t,n.documentSizes=new Gt((function(e){return e.toString()})),n}return u.__extends(t,e),t.prototype.applyChanges=function(e){var t=this,n=[],r=0,o=Fe();
1return this.changes.forEach((function(i,a){var u=t.documentSizes.get(i);if(g(void 0!==u,"Cannot modify a document that wasn't read (for "+i+")"),a){var s=t.documentCache.serializer.toDbRemoteDocument(a),c=en(s);r+=c-u,n.push(t.documentCache.addEntry(e,i,s))}else r-=u,n.push(t.documentCache.removeEntry(e,i));o=o.add(i)})),n.push(this.documentCache.updateMetadata(e,o,r)),We.waitFor(n)},t.prototype.getFromCache=function(e,t){var n=this;return this.documentCache.getSizedEntry(e,t).next((function(e){return null===e?(n.documentSizes.set(t,0),null):(n.documentSizes.set(t,e.size),e.maybeDocument)}))},t.prototype.getAllFromCache=function(e,t){var n=this;return this.documentCache.getSizedEntries(e,t).next((function(e){var t=e.maybeDocuments;return e.sizeMap.forEach((function(e,t){n.documentSizes.set(e,t)})),t}))},t}(Kt),e}();function $t(e){return Fn.getStore(e,dn.store)}function Xt(e){return Fn.getStore(e,pn.store)}function Jt(e){return Fn.getStore(e,wn.store)}function Zt(e){return e.path.toArray()}function en(e){var t;if(e.document)t=e.document;else if(e.unknownDocument)t=e.unknownDocument;else{if(!e.noDocument)throw v("Unknown remote document type");t=e.noDocument}return JSON.stringify(t).length}var tn=function(){function e(){this.collectionParentIndex=new nn}return e.prototype.addToCollectionParentIndex=function(e,t){return this.collectionParentIndex.add(t),We.resolve()},e.prototype.getCollectionParents=function(e,t){return We.resolve(this.collectionParentIndex.getEntries(t))},e}(),nn=function(){function e(){this.index={}}return e.prototype.add=function(e){g(e.length%2===1,"Expected a collection path.");var t=e.lastSegment(),n=e.popLast(),r=this.index[t]||new Ae(se.comparator),o=!r.has(n);return this.index[t]=r.add(n),o},e.prototype.getEntries=function(e){return(this.index[e]||new Ae(se.comparator)).toArray()},e}(),rn=8,on=function(){function e(e){this.serializer=e}return e.prototype.createOrUpgrade=function(e,t,n,r){var o=this;g(n<r&&n>=0&&r<=rn,"Unexpected schema upgrade from v"+n+" to v{toVersion}."),n<1&&r>=1&&(function(e){e.createObjectStore(un.store)}(e),function(e){e.createObjectStore(sn.store,{keyPath:sn.keyPath}),e.createObjectStore(cn.store,{keyPath:cn.keyPath,autoIncrement:!0}).createIndex(cn.userMutationsIndex,cn.userMutationsKeyPath,{unique:!0}),e.createObjectStore(ln.store)}(e),bn(e),function(e){e.createObjectStore(pn.store)}(e));var i=We.resolve();return n<3&&r>=3&&(0!==n&&(!function(e){e.deleteObjectStore(yn.store),e.deleteObjectStore(mn.store),e.deleteObjectStore(vn.store)}(e),bn(e)),i=i.next((function(){return function(e){var t=e.store(vn.store),n=new vn(0,0,Te.MIN.toTimestamp(),0);return t.put(vn.key,n)}(t)}))),n<4&&r>=4&&(0!==n&&(i=i.next((function(){return function(e,t){return t.store(cn.store).loadAll().next((function(n){e.deleteObjectStore(cn.store),e.createObjectStore(cn.store,{keyPath:cn.keyPath,autoIncrement:!0}).createIndex(cn.userMutationsIndex,cn.userMutationsKeyPath,{unique:!0});var r=t.store(cn.store),o=n.map((function(e){return r.put(e)}));return We.waitFor(o)}))}(e,t)}))),i=i.next((function(){!function(e){e.createObjectStore(En.store,{keyPath:En.keyPath})}(e),function(e){e.createObjectStore(wn.store,{keyPath:"id",autoIncrement:!0})}(e)}))),n<5&&r>=5&&(i=i.next((function(){return o.removeAcknowledgedMutations(t)}))),n<6&&r>=6&&(i=i.next((function(){return function(e){e.createObjectStore(dn.store)}(e),o.addDocumentGlobal(t)}))),n<7&&r>=7&&(i=i.next((function(){return o.ensureSequenceNumbers(t)}))),n<8&&r>=8&&(i=i.next((function(){return o.createCollectionParentIndex(e,t)}))),i},e.prototype.addDocumentGlobal=function(e){var t=0;return e.store(pn.store).iterate((function(e,n){t+=en(n)})).next((function(){var n=new dn(t);return e.store(dn.store).put(dn.key,n)}))},e.prototype.removeAcknowledgedMutations=function(e){var t=this,n=e.store(sn.store),r=e.store(cn.store);return n.loadAll().next((function(n){return We.forEach(n,(function(n){var o=IDBKeyRange.bound([n.userId,-1],[n.userId,n.lastAcknowledgedBatchId]);return r.loadAll(cn.userMutationsIndex,o).next((function(r){return We.forEach(r,(function(r){g(r.userId===n.userId,"Cannot process batch "+r.batchId+" from unexpected user");var o=t.serializer.fromDbMutationBatch(r);return Ke(e,n.userId,o).next((function(){}))}))}))}))}))},e.prototype.ensureSequenceNumbers=function(e){var t=e.store(yn.store),n=e.store(pn.store);return ht(e).next((function(e){var r=[];return n.iterate((function(n,o){var i=new se(n),a=function(e){return[0,be(e)]}(i);r.push(t.get(a).next((function(n){return n?We.resolve():function(n){return t.put(new yn(0,be(n),e))}(i)})))})).next((function(){return We.waitFor(r)}))}))},e.prototype.createCollectionParentIndex=function(e,t){e.createObjectStore(gn.store,{keyPath:gn.keyPath});var n=t.store(gn.store),r=new nn,o=function(e){if(r.add(e)){var t=e.lastSegment(),o=e.popLast();return n.put({collectionId:t,parent:be(o)})}};return t.store(pn.store).iterate({keysOnly:!0},(function(e,t){var n=new se(e);return o(n.popLast())})).next((function(){return t.store(ln.store).iterate({keysOnly:!0},(function(e,t){e[0];var n=e[1],r=(e[2],_e(n));return o(r.popLast())}))}))},e}();var an=function(){return function(e,t){this.seconds=e,this.nanoseconds=t}}(),un=function(){function e(e,t,n){this.ownerId=e,this.allowTabSynchronization=t,this.leaseTimestampMs=n}return e.store="owner",e.key="owner",e}();var sn=function(){function e(e,t,n){this.userId=e,this.lastAcknowledgedBatchId=t,this.lastStreamToken=n}
1return e.store="mutationQueues",e.keyPath="userId",e}(),cn=function(){function e(e,t,n,r,o){this.userId=e,this.batchId=t,this.localWriteTimeMs=n,this.baseMutations=r,this.mutations=o}return e.store="mutations",e.keyPath="batchId",e.userMutationsIndex="userMutationsIndex",e.userMutationsKeyPath=["userId","batchId"],e}();var ln=function(){function e(){}return e.prefixForUser=function(e){return[e]},e.prefixForPath=function(e,t){return[e,be(t)]},e.key=function(e,t,n){return[e,be(t),n]},e.store="documentMutations",e.PLACEHOLDER=new e,e}();var fn=function(){return function(e,t){this.path=e,this.readTime=t}}(),hn=function(){return function(e,t){this.path=e,this.version=t}}(),pn=function(){function e(e,t,n,r){this.unknownDocument=e,this.noDocument=t,this.document=n,this.hasCommittedMutations=r}return e.store="remoteDocuments",e}(),dn=function(){function e(e){this.byteSize=e}return e.store="remoteDocumentGlobal",e.key="remoteDocumentGlobalKey",e}();var mn=function(){function e(e,t,n,r,o,i){this.targetId=e,this.canonicalId=t,this.readTime=n,this.resumeToken=r,this.lastListenSequenceNumber=o,this.query=i}return e.store="targets",e.keyPath="targetId",e.queryTargetsIndexName="queryTargetsIndex",e.queryTargetsKeyPath=["canonicalId","targetId"],e}(),yn=function(){function e(e,t,n){this.targetId=e,this.path=t,this.sequenceNumber=n,g(0===e===(void 0!==n),"A target-document row must either have targetId == 0 and a defined sequence number, or a non-zero targetId and no sequence number")}return e.store="targetDocuments",e.keyPath=["targetId","path"],e.documentTargetsIndex="documentTargetsIndex",e.documentTargetsKeyPath=["path","targetId"],e}(),vn=function(){function e(e,t,n,r){this.highestTargetId=e,this.highestListenSequenceNumber=t,this.lastRemoteSnapshotVersion=n,this.targetCount=r}return e.key="targetGlobalKey",e.store="targetGlobal",e}(),gn=function(){function e(e,t){this.collectionId=e,this.parent=t}return e.store="collectionParents",e.keyPath=["collectionId","parent"],e}();function bn(e){e.createObjectStore(yn.store,{keyPath:yn.keyPath}).createIndex(yn.documentTargetsIndex,yn.documentTargetsKeyPath,{unique:!0}),e.createObjectStore(mn.store,{keyPath:mn.keyPath}).createIndex(mn.queryTargetsIndexName,mn.queryTargetsKeyPath,{unique:!0}),e.createObjectStore(vn.store)}var wn=function(){function e(e){this.changes=e}return e.store="remoteDocumentChanges",e.keyPath="id",e}();var En=function(){function e(e,t,n,r,o){this.clientId=e,this.updateTimeMs=t,this.networkEnabled=n,this.inForeground=r,this.lastProcessedDocumentChangeId=o}return e.store="clientMetadata",e.keyPath="clientId",e}();var _n,Sn=[sn.store,cn.store,ln.store,pn.store,mn.store,un.store,vn.store,yn.store].concat([En.store,wn.store]).concat([dn.store]).concat([gn.store]),Tn=function(){function e(){this.collectionParentsCache=new nn}return e.prototype.addToCollectionParentIndex=function(e,t){if(g(t.length%2===1,"Expected a collection path."),this.collectionParentsCache.add(t)){g(t.length>=1,"Invalid collection path.");var n=t.lastSegment(),r=t.popLast();return On(e).put({collectionId:n,parent:be(r)})}return We.resolve()},e.prototype.getCollectionParents=function(e,t){var n=[],r=IDBKeyRange.bound([t,""],[X(t),""],!1,!0);return On(e).loadAll(r).next((function(e){for(var r=0,o=e;r<o.length;r++){var i=o[r];if(i.collectionId!==t)break;n.push(_e(i.parent))}return n}))},e}();function On(e){return Fn.getStore(e,gn.store)}!function(e){e[e.Listen=0]="Listen",e[e.ExistenceFilterMismatch=1]="ExistenceFilterMismatch",e[e.LimboResolution=2]="LimboResolution"}(_n||(_n={}));var kn=function(){function e(e,t,n,r,o,i){void 0===o&&(o=Te.MIN),void 0===i&&(i=w()),this.query=e,this.targetId=t,this.purpose=n,this.sequenceNumber=r,this.snapshotVersion=o,this.resumeToken=i}return e.prototype.withSequenceNumber=function(t){return new e(this.query,this.targetId,this.purpose,t,this.snapshotVersion,this.resumeToken)},e.prototype.withResumeToken=function(t,n){return new e(this.query,this.targetId,this.purpose,this.sequenceNumber,n,t)},e.prototype.isEqual=function(e){return this.targetId===e.targetId&&this.purpose===e.purpose&&this.sequenceNumber===e.sequenceNumber&&this.snapshotVersion.isEqual(e.snapshotVersion)&&this.resumeToken===e.resumeToken&&this.query.isEqual(e.query)},e}
1(),Cn=function(){function e(e){this.remoteSerializer=e}return e.prototype.fromDbRemoteDocument=function(e){if(e.document)return this.remoteSerializer.fromDocument(e.document,!!e.hasCommittedMutations);if(e.noDocument){var t=fe.fromSegments(e.noDocument.path),n=this.fromDbTimestamp(e.noDocument.readTime);return new Wt(t,n,{hasCommittedMutations:!!e.hasCommittedMutations})}if(e.unknownDocument){t=fe.fromSegments(e.unknownDocument.path),n=this.fromDbTimestamp(e.unknownDocument.version);return new Qt(t,n)}return v("Unexpected DbRemoteDocument")},e.prototype.toDbRemoteDocument=function(e){if(e instanceof zt){var t=e.proto?e.proto:this.remoteSerializer.toDocument(e),n=e.hasCommittedMutations;return new pn(null,null,t,n)}if(e instanceof Wt){var r=e.key.path.toArray(),o=this.toDbTimestamp(e.version);n=e.hasCommittedMutations;return new pn(null,new fn(r,o),null,n)}if(e instanceof Qt){r=e.key.path.toArray(),o=this.toDbTimestamp(e.version);return new pn(new hn(r,o),null,null,!0)}return v("Unexpected MaybeDocumment")},e.prototype.toDbTimestamp=function(e){var t=e.toTimestamp();return new an(t.seconds,t.nanoseconds)},e.prototype.fromDbTimestamp=function(e){var t=new Se(e.seconds,e.nanoseconds);return Te.fromTimestamp(t)},e.prototype.toDbMutationBatch=function(e,t){var n=this,r=t.baseMutations.map((function(e){return n.remoteSerializer.toMutation(e)})),o=t.mutations.map((function(e){return n.remoteSerializer.toMutation(e)}));return new cn(e,t.batchId,t.localWriteTime.toMillis(),r,o)},e.prototype.fromDbMutationBatch=function(e){var t=this,n=(e.baseMutations||[]).map((function(e){return t.remoteSerializer.fromMutation(e)})),r=e.mutations.map((function(e){return t.remoteSerializer.fromMutation(e)})),o=Se.fromMillis(e.localWriteTimeMs);return new Ve(e.batchId,o,n,r)},e.prototype.toDbResourcePaths=function(e){var t=[];return e.forEach((function(e){t.push(be(e.path))})),t},e.prototype.fromDbResourcePaths=function(e){for(var t=Fe(),n=0,r=e;n<r.length;n++){var o=r[n];t=t.add(new fe(_e(o)))}return t},e.prototype.fromDbTarget=function(e){var t,n=this.fromDbTimestamp(e.readTime);return t=void 0!==e.query.documents?this.remoteSerializer.fromDocumentsTarget(e.query):this.remoteSerializer.fromQueryTarget(e.query),new kn(t,e.targetId,_n.Listen,e.lastListenSequenceNumber,n,e.resumeToken)},e.prototype.toDbTarget=function(e){g(_n.Listen===e.purpose,"Only queries with purpose "+_n.Listen+" may be stored, got "+e.purpose);var t,n,r=this.toDbTimestamp(e.snapshotVersion);return t=e.query.isDocumentQuery()?this.remoteSerializer.toDocumentsTarget(e.query):this.remoteSerializer.toQueryTarget(e.query),e.resumeToken instanceof Uint8Array?(g("YES"===Object({NODE_ENV:"production",PUBLIC_URL:""}).USE_MOCK_PERSISTENCE,"Persisting non-string stream tokens is only supported with mock persistence ."),n=e.resumeToken.toString()):n=e.resumeToken,new mn(e.targetId,e.query.canonicalId(),r,n,e.sequenceNumber,t)},e}();function xn(e,t){var n=e[0],r=e[1],o=t[0],i=t[1],a=Y(n,o);return 0===a?Y(r,i):a}var An=function(){function e(e){this.maxElements=e,this.buffer=new Ae(xn),this.previousIndex=0}return e.prototype.nextIndex=function(){return++this.previousIndex},e.prototype.addElement=function(e){var t=[e,this.nextIndex()];if(this.buffer.size<this.maxElements)this.buffer=this.buffer.add(t);else{var n=this.buffer.last();xn(t,n)<0&&(this.buffer=this.buffer.delete(n).add(t))}},Object.defineProperty(e.prototype,"maxValue",{get:function(){return this.buffer.last()[0]},enumerable:!0,configurable:!0}),e}(),In={didRun:!1,sequenceNumbersCollected:0,targetsRemoved:0,documentsRemoved:0},Nn=function(){function e(e,t,n){this.cacheSizeCollectionThreshold=e,this.percentileToCollect=t,this.maximumSequenceNumbersToCollect=n}return e.withCacheSize=function(t){return new e(t,e.DEFAULT_COLLECTION_PERCENTILE,e.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)},e.COLLECTION_DISABLED=-1,e.MINIMUM_CACHE_SIZE_BYTES=1048576,e.DEFAULT_CACHE_SIZE_BYTES=41943040,e.DEFAULT_COLLECTION_PERCENTILE=10,e.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,e.DEFAULT=new e(e.DEFAULT_CACHE_SIZE_BYTES,e.DEFAULT_COLLECTION_PERCENTILE,e.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),e.DISABLED=new e(e.COLLECTION_DISABLED,0,0),e}(),Dn=function(){function e(e,t,n){this.garbageCollector=e,this.asyncQueue=t,this.localStore=n,this.hasRun=!1,this.gcTask=null}return e.prototype.start=function(){g(null===this.gcTask,"Cannot start an already started LruScheduler"),this.garbageCollector.params.cacheSizeCollectionThreshold!==Nn.COLLECTION_DISABLED&&this.scheduleGC()},e.prototype.stop=function(){this.gcTask&&(this.gcTask.cancel(),this.gcTask=null)},Object.defineProperty(e.prototype,"started",{get:function(){return null!==this.gcTask},enumerable:!0,configurable:!0}),e.prototype.scheduleGC=function(){var e=this;g(null===this.gcTask,"Cannot schedule GC while a task is pending");var t=this.hasRun?3e5:6e4;d("LruGarbageCollector","Garbage collection scheduled in "+t+"ms"),this.gcTask=this.asyncQueue.enqueueAfterDelay(ee.LruGarbageCollection,t,(function(){return e.gcTask=null,e.hasRun=!0,e.localStore.collectGarbage(e.garbageCollector).then((function(){return e.scheduleGC()})).catch(Bn)}))},e}(),Pn=function(){function e(e,t){this.delegate=e,this.params=t}return e.prototype.calculateTargetCount=function(e,t){return this.delegate.getSequenceNumberCount(e).next((function(e){return Math.floor(t/100*e)}))},e.prototype.nthSequenceNumber=function(e,t){var n=this;if(0===t)return We.resolve(ae.INVALID);var r=new An(t);return this.delegate.forEachTarget(e,(function(e){return r.addElement(e.sequenceNumber)})).next((function(){return n.delegate.forEachOrphanedDocumentSequenceNumber(e,(function(e){return r.addElement(e)}))})).next((function(){return r.maxValue}))},e.prototype.removeTargets=function(e,t,n){return this.delegate.removeTargets(e,t,n)},e.prototype.removeOrphanedDocuments=function(e,t){return this.delegate.removeOrphanedDocuments(e,t)},e.prototype.collect=function(e,t){var n=this;return this.params.cacheSizeCollectionThreshold===Nn.COLLECTION_DISABLED?(d("LruGarbageCollector","Garbage collection skipped; disabled"),We.resolve(In)):this.getCacheSize(e).next((function(r){return r<n.params.cacheSizeCollectionThreshold?(d("LruGarbageCollector","Garbage collection skipped; Cache size "+r+" is lower than threshold "+n.params.cacheSizeCollectionThreshold),In):n.runGarbageCollection(e,t)}))},e.prototype.getCacheSize=function(e){return this.delegate.getCacheSize(e)},e.prototype.runGarbageCollection=function(e,t){var n,r,i,a,u,s,c,l=this,f=Date.now();return this.calculateTargetCount(e,this.params.percentileToCollect).next((function(t){return t>l.params.maximumSequenceNumbersToCollect?(d("LruGarbageCollector","Capping sequence numbers to collect down to the maximum of "+l.params.maximumSequenceNumbersToCollect+" from "+t),r=l.params.maximumSequenceNumbersToCollect):r=t,a=Date.now(),l.nthSequenceNumber(e,r)})).next((function(r){return n=r,u=Date.now(),l.removeTargets(e,n,t)})).next((function(t){return i=t,s=Date.now(),l.removeOrphanedDocuments(e,n)})).next((function(e){(c=Date.now(),h()<=o.DEBUG)&&d("LruGarbageCollector","LRU Garbage Collection\n\tCounted targets in "+(a-f)+"ms\n\tDetermined least recently used "+r+" in "+(u-a)+"ms\n\tRemoved "+i+" targets in "+(s-u)+"ms\n\tRemoved "+e+" documents in "+(c-s)+"ms\nTotal Duration: "+(c-f)+"ms");return We.resolve({didRun:!0,sequenceNumbersCollected:r,targetsRemoved:i,documentsRemoved:e})}))},e}(),Rn=function(){return function(){}}(),jn="IndexedDbPersistence",Mn="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.",Ln="Another tab has exclusive access to the persistence layer. To allow shared access, make sure to invoke `enablePersistence()` with `synchronizeTabs:true` in all tabs.",Un=function(e){function t(t,n){var r=e.call(this)||this;return r.simpleDbTransaction=t,r.currentSequenceNumber=n,r}return u.__extends(t,e),t}(Rn),Fn=function(){function e(t,n,r,o,i,a,u,s){if(this.allowTabSynchronization=t,this.persistenceKey=n,this.clientId=r,this.queue=a,this.sequenceNumberSyncer=s,this._started=!1,this.isPrimary=!1,this.networkEnabled=!0,this.windowUnloadHandler=null,this.inForeground=!1,this.documentVisibilityHandler=null,this.clientMetadataRefresher=null,this.lastGarbageCollectionTime=Number.NEGATIVE_INFINITY,this.primaryStateListener=function(e){return Promise.resolve()},this.referenceDelegate=new zn(this,i),this.dbName=n+e.MAIN_DATABASE,this.serializer
1=new Cn(u),this.document=o.document,this.queryCache=new ct(this.referenceDelegate,this.serializer),this.indexManager=new Tn,this.remoteDocumentCache=new Yt(this.serializer,this.indexManager,this.allowTabSynchronization),!o.window||!o.window.localStorage)throw new _(E.UNIMPLEMENTED,"IndexedDB persistence is only available on platforms that support LocalStorage.");this.window=o.window,this.webStorage=this.window.localStorage}return e.getStore=function(e,t){if(e instanceof Un)return nt.getStore(e.simpleDbTransaction,t);throw v("IndexedDbPersistence must use instances of IndexedDbTransaction")},e.createIndexedDbPersistence=function(t){return u.__awaiter(this,void 0,void 0,(function(){var n;return u.__generator(this,(function(r){switch(r.label){case 0:if(!e.isAvailable())throw new _(E.UNIMPLEMENTED,"This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.");return[4,(n=new e(t.allowTabSynchronization,t.persistenceKey,t.clientId,t.platform,t.lruParams,t.queue,t.serializer,t.sequenceNumberSyncer)).start()];case 1:return r.sent(),[2,n]}}))}))},e.prototype.start=function(){var e=this;return g(!this.started,"IndexedDbPersistence double-started!"),g(null!==this.window,"Expected 'window' to be defined"),nt.openOrCreate(this.dbName,rn,new on(this.serializer)).then((function(t){return e.simpleDb=t,e.updateClientMetadataAndTryBecomePrimary()})).then((function(){return e.attachVisibilityHandler(),e.attachWindowUnloadHook(),e.scheduleClientMetadataAndPrimaryLeaseRefreshes(),e.startRemoteDocumentCache()})).then((function(){return e.simpleDb.runTransaction("readonly",[vn.store],(function(t){return ht(t).next((function(t){e.listenSequence=new ae(t,e.sequenceNumberSyncer)}))}))})).then((function(){e._started=!0})).catch((function(t){return e.simpleDb&&e.simpleDb.close(),Promise.reject(t)}))},e.prototype.startRemoteDocumentCache=function(){var e=this;return this.simpleDb.runTransaction("readonly",Sn,(function(t){return e.remoteDocumentCache.start(t)}))},e.prototype.setPrimaryStateListener=function(e){var t=this;return this.primaryStateListener=function(n){return u.__awaiter(t,void 0,void 0,(function(){return u.__generator(this,(function(t){return this.started?[2,e(n)]:[2]}))}))},e(this.isPrimary)},e.prototype.setDatabaseDeletedListener=function(e){var t=this;this.simpleDb.setVersionChangeListener((function(n){return u.__awaiter(t,void 0,void 0,(function(){return u.__generator(this,(function(t){switch(t.label){case 0:return null!==n.newVersion?[3,2]:[4,e()];case 1:t.sent(),t.label=2;case 2:return[2]}}
1))}))}))},e.prototype.setNetworkEnabled=function(e){var t=this;this.networkEnabled!==e&&(this.networkEnabled=e,this.queue.enqueueAndForget((function(){return u.__awaiter(t,void 0,void 0,(function(){return u.__generator(this,(function(e){switch(e.label){case 0:return this.started?[4,this.updateClientMetadataAndTryBecomePrimary()]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}))}))})))},e.prototype.updateClientMetadataAndTryBecomePrimary=function(){var e=this;return this.simpleDb.runTransaction("readwrite",Sn,(function(t){return Vn(t).put(new En(e.clientId,Date.now(),e.networkEnabled,e.inForeground,e.remoteDocumentCache.lastProcessedDocumentChangeId)).next((function(){if(e.isPrimary)return e.verifyPrimaryLease(t).next((function(t){t||(e.isPrimary=!1,e.queue.enqueueAndForget((function(){return e.primaryStateListener(!1)})))}))})).next((function(){return e.canActAsPrimary(t)})).next((function(n){var r=e.isPrimary;return e.isPrimary=n,r!==e.isPrimary&&e.queue.enqueueAndForget((function(){return e.primaryStateListener(e.isPrimary)})),r&&!e.isPrimary?e.releasePrimaryLeaseIfHeld(t):e.isPrimary?e.acquireOrExtendPrimaryLease(t):void 0}))}))},e.prototype.verifyPrimaryLease=function(e){var t=this;return qn(e).get(un.key).next((function(e){return We.resolve(t.isLocalClient(e))}))},e.prototype.removeClientMetadata=function(e){return Vn(e).delete(this.clientId)},e.prototype.maybeGarbageCollectMultiClientState=function(){return u.__awaiter(this,void 0,void 0,(function(){var t,n,r=this;return u.__generator(this,(function(o){switch(o.label){case 0:return!this.isPrimary||this.isWithinAge(this.lastGarbageCollectionTime,18e5)?[3,2]:(this.lastGarbageCollectionTime=Date.now(),n=[],[4,this.runTransaction("maybeGarbageCollectMultiClientState","readwrite-primary",(function(o){var i=e.getStore(o,En.store);return i.loadAll().next((function(e){t=r.filterActiveClients(e,18e5),n=e.filter((function(e){return-1===t.indexOf(e)}))})).next((function(){return We.forEach(n,(function(e){return i.delete(e.clientId)}))})).next((function(){if((t=t.filter((function(e){return e.clientId!==r.clientId}))).length>0){var e=t.map((function(e){return e.lastProcessedDocumentChangeId||0})),n=Math.min.apply(Math,e);return r.remoteDocumentCache.removeDocumentChangesThroughChangeId(o,n)}}))}))]);case 1:o.sent(),n.forEach((function(e){r.window.localStorage.removeItem(r.zombiedClientLocalStorageKey(e.clientId))})),o.label=2;case 2:return[2]}}
1))}))},e.prototype.scheduleClientMetadataAndPrimaryLeaseRefreshes=function(){var e=this;this.clientMetadataRefresher=this.queue.enqueueAfterDelay(ee.ClientMetadataRefresh,4e3,(function(){return e.updateClientMetadataAndTryBecomePrimary().then((function(){return e.maybeGarbageCollectMultiClientState()})).then((function(){return e.scheduleClientMetadataAndPrimaryLeaseRefreshes()}))}))},e.prototype.isLocalClient=function(e){return!!e&&e.ownerId===this.clientId},e.prototype.canActAsPrimary=function(e){var t=this;return qn(e).get(un.key).next((function(n){if(null!==n&&t.isWithinAge(n.leaseTimestampMs,5e3)&&!t.isClientZombied(n.ownerId)){if(t.isLocalClient(n)&&t.networkEnabled)return!0;if(!t.isLocalClient(n)){if(!n.allowTabSynchronization)throw new _(E.FAILED_PRECONDITION,Ln);return!1}}return!(!t.networkEnabled||!t.inForeground)||Vn(e).loadAll().next((function(e){return void 0===t.filterActiveClients(e,5e3).find((function(e){if(t.clientId!==e.clientId){var n=!t.networkEnabled&&e.networkEnabled,r=!t.inForeground&&e.inForeground,o=t.networkEnabled===e.networkEnabled;if(n||r&&o)return!0}return!1}))}))})).next((function(e){return t.isPrimary!==e&&d(jn,"Client "+(e?"is":"is not")+" eligible for a primary lease."),e}))},e.prototype.shutdown=function(){return u.__awaiter(this,void 0,void 0,(function(){var e=this;return u.__generator(this,(function(t){switch(t.label){case 0:return this._started=!1,this.markClientZombied(),this.clientMetadataRefresher&&(this.clientMetadataRefresher.cancel(),this.clientMetadataRefresher=null),this.detachVisibilityHandler(),this.detachWindowUnloadHook(),[4,this.simpleDb.runTransaction("readwrite",[un.store,En.store],(function(t){return e.releasePrimaryLeaseIfHeld(t).next((function(){return e.removeClientMetadata(t)}))}))];case 1:return t.sent(),this.simpleDb.close(),this.removeClientZombiedEntry(),[2]}}))}))},e.prototype.filterActiveClients=function(e,t){var n=this;return e.filter((function(e){return n.isWithinAge(e.updateTimeMs,t)&&!n.isClientZombied(e.clientId)}))},e.prototype.getActiveClients=function(){var e=this;return this.simpleDb.runTransaction("readonly",[En.store],(function(t){return Vn(t).loadAll().next((function(t){return e.filterActiveClients(t,18e5).map((function(e){return e.clientId}))}))}))},e.clearPersistence=function(t){return u.__awaiter(this,void 0,void 0,(function(){var n;return u.__generator(this,(function(r){switch(r.label){case 0:return e.isAvailable()?(n=t+e.MAIN_DATABASE,[4,nt.delete(n)]):[2,Promise.resolve()];case 1:return r.sent(),[2]}}))}))},Object.defineProperty(e.prototype,"started",{get:function(){return this._started},enumerable:!0,configurable:!0}),e.prototype.getMutationQueue=function(e){return g(this.started,"Cannot initialize MutationQueue before persistence is started."),Qe.forUser(e,this.serializer,this.indexManager,this.referenceDelegate)},e.prototype.getQueryCache=function(){return g(this.started,"Cannot initialize QueryCache before persistence is started."),this.queryCache},e.prototype.getRemoteDocumentCache=function(){return g(this.started,"Cannot initialize RemoteDocumentCache before persistence is started."),this.remoteDocumentCache},e.prototype.getIndexManager=function(){return g(this.started,"Cannot initialize IndexManager before persistence is started."),this.indexManager},e.prototype.runTransaction=function(e,t,n){var r=this;return d(jn,"Starting transaction:",e),this.simpleDb.runTransaction("readonly"===t?"readonly":"readwrite",Sn,(function(o){return"readwrite-primary"===t?r.verifyPrimaryLease(o).next((function(t){if(!t)throw m("Failed to obtain primary lease for action '"+e+"'."),r.isPrimary=!1,r.queue.enqueueAndForget((function(){return r.primaryStateListener(!1)})),new _(E.FAILED_PRECONDITION,Mn);return n(new Un(o,r.listenSequence.next()))})).next((function(e){return r.acquireOrExtendPrimaryLease(o).next((function(){return e}))})):r.verifyAllowTabSynchronization(o).next((function(){return n(new Un(o,r.listenSequence.next()))}))}))},e.prototype.verifyAllowTabSynchronization=function(e){var t=this;return qn(e).get(un.key).next((function(e){if(null!==e&&t.isWithinAge(e.leaseTimestampMs,5e3)&&!t.isClientZombied(e.ownerId)&&!t.isLocalClient(e)&&!e.allowTabSynchronization)throw new _(E.FAILED_PRECONDITION,Ln)}))},e.prototype.acquireOrExtendPrimaryLease=function(e){var t=new un(this.clientId,this.allowTabSynchronization,Date.now());return qn(e).put(un.key,t)}
1,e.isAvailable=function(){return nt.isAvailable()},e.buildStoragePrefix=function(e){var t=e.databaseId.projectId;return e.databaseId.isDefaultDatabase||(t+="."+e.databaseId.database),"firestore/"+e.persistenceKey+"/"+t+"/"},e.prototype.releasePrimaryLeaseIfHeld=function(e){var t=this,n=qn(e);return n.get(un.key).next((function(e){return t.isLocalClient(e)?(d(jn,"Releasing primary lease."),n.delete(un.key)):We.resolve()}))},e.prototype.isWithinAge=function(e,t){var n=Date.now();return!(e<n-t)&&(!(e>n)||(m("Detected an update time that is in the future: "+e+" > "+n),!1))},e.prototype.attachVisibilityHandler=function(){var e=this;null!==this.document&&"function"===typeof this.document.addEventListener&&(this.documentVisibilityHandler=function(){e.queue.enqueueAndForget((function(){return e.inForeground="visible"===e.document.visibilityState,e.updateClientMetadataAndTryBecomePrimary()}))},this.document.addEventListener("visibilitychange",this.documentVisibilityHandler),this.inForeground="visible"===this.document.visibilityState)},e.prototype.detachVisibilityHandler=function(){this.documentVisibilityHandler&&(g(null!==this.document&&"function"===typeof this.document.addEventListener,"Expected 'document.addEventListener' to be a function"),this.document.removeEventListener("visibilitychange",this.documentVisibilityHandler),this.documentVisibilityHandler=null)},e.prototype.attachWindowUnloadHook=function(){var e=this;"function"===typeof this.window.addEventListener&&(this.windowUnloadHandler=function(){e.markClientZombied(),e.queue.enqueueAndForget((function(){return e.shutdown()}))},this.window.addEventListener("unload",this.windowUnloadHandler))},e.prototype.detachWindowUnloadHook=function(){this.windowUnloadHandler&&(g("function"===typeof this.window.removeEventListener,"Expected 'window.removeEventListener' to be a function"),this.window.removeEventListener("unload",this.windowUnloadHandler),this.windowUnloadHandler=null)},e.prototype.isClientZombied=function(e){try{var t=null!==this.webStorage.getItem(this.zombiedClientLocalStorageKey(e));return d(jn,"Client '"+e+"' "+(t?"is":"is not")+" zombied in LocalStorage"),t}catch(n){return m(jn,"Failed to get zombied client id.",n),!1}},e.prototype.markClientZombied=function(){try{this.webStorage.setItem(this.zombiedClientLocalStorageKey(this.clientId),String(Date.now()))}catch(e){m("Failed to set zombie client id.",e)}},e.prototype.removeClientZombiedEntry=function(){try{this.webStorage.removeItem(this.zombiedClientLocalStorageKey(this.clientId))}catch(e){}},e.prototype.zombiedClientLocalStorageKey=function(e){return"firestore_zombie_"+this.persistenceKey+"_"+e},e.MAIN_DATABASE="main",e}();function Bn(e){return u.__awaiter(this,void 0,void 0,(function(){return u.__generator(this,(function(t){if(!function(e){return e.code===E.FAILED_PRECONDITION&&e.message===Mn}(e))throw e;return d(jn,"Unexpectedly lost primary lease"),[2]}))}))}function qn(e){return e.store(un.store)}function Vn(e){return e.store(En.store)}var zn=function(){function e(e,t){this.db=e,this.inMemoryPins=null,this.garbageCollector=new Pn(this,t)}return e.prototype.getSequenceNumberCount=function(e){var t=this.orphanedDocmentCount(e);return this.db.getQueryCache().getQueryCount(e).next((function(e){return t.next((function(t){return e+t}))}))},e.prototype.orphanedDocmentCount=function(e){var t=0;return this.forEachOrphanedDocumentSequenceNumber(e,(function(e){t++})).next((function(){return t}))},e.prototype.forEachTarget=function(e,t){return this.db.getQueryCache().forEachTarget(e,t)},e.prototype.forEachOrphanedDocumentSequenceNumber=function(e,t){return this.forEachOrphanedDocument(e,(function(e,n){return t(n)}))},e.prototype.setInMemoryPins=function(e){this.inMemoryPins=e},e.prototype.addReference=function(e,t){return Wn(e,t)},e.prototype.removeReference=function(e,t){return Wn(e,t)},e.prototype.removeTargets=function(e,t,n){return this.db.getQueryCache().removeTargets(e,t,n)},e.prototype.removeMutationReference=function(e,t){return Wn(e,t)},e.prototype.isPinned=function(e,t){return this.inMemoryPins.containsKey(t)?We.resolve(!0):function(e,t){var n=!1;return Xe(e).iterateSerial((function(r){return Ge(e,r,t).next((function(e){return e&&(n=!0),We.resolve(!e)}))})).next((function(){return n}))}(e,t)},e.prototype.removeOrphanedDocuments=function(e,t){var n=this,r=this.db.getRemoteDocumentCache().newChangeBuffer(),o=[],i=0;return this.forEachOrphanedDocument(e,(function(a,u){if(u<=t){var s=n.isPinned(e,a).next((function(t){if(!t)return i++,r.getEntry(e,a).next((function(){return r.removeEntry(a),pt(e).delete([0,be(a.path)])}))}));o.push(s)}})).next((function(){return We.waitFor(o)})).next((function(){return r.apply(e)})).next((function(){return i}))}
1,e.prototype.removeTarget=function(e,t){var n=t.withSequenceNumber(e.currentSequenceNumber);return this.db.getQueryCache().updateQueryData(e,n)},e.prototype.updateLimboDocument=function(e,t){return Wn(e,t)},e.prototype.forEachOrphanedDocument=function(e,t){var n,r=pt(e),o=ae.INVALID;return r.iterate({index:yn.documentTargetsIndex},(function(e,r){var i=e[0],a=(e[1],r.path),u=r.sequenceNumber;0===i?(o!==ae.INVALID&&t(new fe(_e(n)),o),o=u,n=a):o=ae.INVALID})).next((function(){o!==ae.INVALID&&t(new fe(_e(n)),o)}))},e.prototype.getCacheSize=function(e){return this.db.getRemoteDocumentCache().getSize(e)},e}();function Wn(e,t){return pt(e).put(function(e,t){return new yn(0,be(e.path),t)}(t,e.currentSequenceNumber))}var Qn=function(){function e(e,t,n){this.remoteDocumentCache=e,this.mutationQueue=t,this.indexManager=n}return e.prototype.getDocument=function(e,t){var n=this;return this.mutationQueue.getAllMutationBatchesAffectingDocumentKey(e,t).next((function(r){return n.getDocumentInternal(e,t,r)}))},e.prototype.getDocumentInternal=function(e,t,n){return this.remoteDocumentCache.getEntry(e,t).next((function(e){for(var r=0,o=n;r<o.length;r++){e=o[r].applyToLocalView(t,e)}return e}))},e.prototype.applyLocalMutationsToDocuments=function(e,t,n){var r=Pe();return t.forEach((function(e,t){for(var o=0,i=n;o<i.length;o++){t=i[o].applyToLocalView(e,t)}r=r.insert(e,t)})),r},e.prototype.getDocuments=function(e,t){var n=this;return this.remoteDocumentCache.getEntries(e,t).next((function(t){return n.getLocalViewOfDocuments(e,t)}))},e.prototype.getLocalViewOfDocuments=function(e,t){var n=this;return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,t).next((function(r){var o=n.applyLocalMutationsToDocuments(e,t,r),i=De();return o.forEach((function(e,t){t||(t=new Wt(e,Te.forDeletedDoc())),i=i.insert(e,t)})),i}))},e.prototype.getDocumentsMatchingQuery=function(e,t){return t.isDocumentQuery()?this.getDocumentsMatchingDocumentQuery(e,t.path):t.isCollectionGroupQuery()?this.getDocumentsMatchingCollectionGroupQuery(e,t):this.getDocumentsMatchingCollectionQuery(e,t)},e.prototype.getDocumentsMatchingDocumentQuery=function(e,t){return this.getDocument(e,new fe(t)).next((function(e){var t=je();return e instanceof zt&&(t=t.insert(e.key,e)),t}))},e.prototype.getDocumentsMatchingCollectionGroupQuery=function(e,t){var n=this;g(t.path.isEmpty(),"Currently we only support collection group queries at the root.");var r=t.collectionGroup,o=je();return this.indexManager.getCollectionParents(e,r).next((function(i){return We.forEach(i,(function(i){var a=t.asCollectionQueryAtPath(i.child(r));return n.getDocumentsMatchingCollectionQuery(e,a).next((function(e){e.forEach((function(e,t){o=o.insert(e,t)}))}))})).next((function(){return o}))}))},e.prototype.getDocumentsMatchingCollectionQuery=function(e,t){var n,r,o=this;return this.remoteDocumentCache.getDocumentsMatchingQuery(e,t).next((function(r){return n=r,o.mutationQueue.getAllMutationBatchesAffectingQuery(e,t)})).next((function(t){return r=t,o.addMissingBaseDocuments(e,r,n).next((function(e){n=e;for(var t=0,o=r;t<o.length;t++)for(var i=o[t],a=0,u=i.mutations;a<u.length;a++){var s=u[a],c=s.key,l=n.get(c),f=s.applyToLocalView(l,l,i.localWriteTime);n=f instanceof zt?n.insert(c,f):n.remove(c)}}))})).next((function(){return n.forEach((function(e,r){t.matches(r)||(n=n.remove(e))})),n}))},e.prototype.addMissingBaseDocuments=function(e,t,n){for(var r=Fe(),o=0,i=t;o<i.length;o++)for(var a=0,u=i[o].mutations;a<u.length;a++){var s=u[a];s instanceof St&&null===n.get(s.key)&&(r=r.add(s.key))}var c=n;return this.remoteDocumentCache.getEntries(e,r).next((function(e){return e.forEach((function(e,t){null!==t&&t instanceof zt&&(c=c.insert(e,t))})),c}))},e}(),Gn=function(){function e(){this.refsByKey=new Ae(Kn.compareByKey),this.refsByTarget=new Ae(Kn.compareByTargetId)}return e.prototype.isEmpty=function(){return this.refsByKey.isEmpty()},e.prototype.addReference=function(e,t){var n=new Kn(e,t);this.refsByKey=this.refsByKey.add(n),this.refsByTarget=this.refsByTarget.add(n)},e.prototype.addReferences=function(e,t){var n=this;e.forEach((function(e){return n.addReference(e,t)}))},e.prototype.removeReference=function(e,t){this.removeRef(new Kn(e,t))},e.prototype.removeReferences=function(e,t){var n=this;e.forEach((function(e){return n.removeReference(e,t)}))},e.prototype.removeReferencesForId=function(e){var t=this,n=fe.EMPTY,r=new Kn(n,e),o=new Kn(n,e+1),i=[];return this.refsByTarget.forEachInRange([r,o],(function(e){t.removeRef(e),i.push(e.key)})),i},e.prototype.removeAllReferences=function(){var e=this;
1this.refsByKey.forEach((function(t){return e.removeRef(t)}))},e.prototype.removeRef=function(e){this.refsByKey=this.refsByKey.delete(e),this.refsByTarget=this.refsByTarget.delete(e)},e.prototype.referencesForId=function(e){var t=fe.EMPTY,n=new Kn(t,e),r=new Kn(t,e+1),o=Fe();return this.refsByTarget.forEachInRange([n,r],(function(e){o=o.add(e.key)})),o},e.prototype.containsKey=function(e){var t=new Kn(e,0),n=this.refsByKey.firstAfterOrEqual(t);return null!==n&&e.isEqual(n.key)},e}(),Kn=function(){function e(e,t){this.key=e,this.targetOrBatchId=t}return e.compareByKey=function(e,t){return fe.comparator(e.key,t.key)||Y(e.targetOrBatchId,t.targetOrBatchId)},e.compareByTargetId=function(e,t){return Y(e.targetOrBatchId,t.targetOrBatchId)||fe.comparator(e.key,t.key)},e}(),Hn=function(){function e(e,t){this.persistence=e,this.localViewReferences=new Gn,this.queryDataByTarget={},g(e.started,"LocalStore was passed an unstarted persistence implementation"),this.persistence.referenceDelegate.setInMemoryPins(this.localViewReferences),this.mutationQueue=e.getMutationQueue(t),this.remoteDocuments=e.getRemoteDocumentCache(),this.queryCache=e.getQueryCache(),this.localDocuments=new Qn(this.remoteDocuments,this.mutationQueue,this.persistence.getIndexManager())}return e.prototype.handleUserChange=function(e){var t=this;return this.persistence.runTransaction("Handle user change","readonly",(function(n){var r;return t.mutationQueue.getAllMutationBatches(n).next((function(o){return r=o,t.mutationQueue=t.persistence.getMutationQueue(e),t.localDocuments=new Qn(t.remoteDocuments,t.mutationQueue,t.persistence.getIndexManager()),t.mutationQueue.getAllMutationBatches(n)})).next((function(e){for(var o=[],i=[],a=Fe(),u=0,s=r;u<s.length;u++){var c=s[u];o.push(c.batchId);for(var l=0,f=c.mutations;l<f.length;l++){var h=f[l];a=a.add(h.key)}}for(var p=0,d=e;p<d.length;p++){c=d[p];i.push(c.batchId);for(var m=0,y=c.mutations;m<y.length;m++){h=y[m];a=a.add(h.key)}}return t.localDocuments.getDocuments(n,a).next((function(e){return{affectedDocuments:e,removedBatchIds:o,addedBatchIds:i}}))}))}))},e.prototype.localWrite=function(e){var t=this,n=Se.now(),r=e.reduce((function(e,t){return e.add(t.key)}),Fe());return this.persistence.runTransaction("Locally write mutations","readwrite",(function(o){return t.localDocuments.getDocuments(o,r).next((function(r){for(var i=[],a=0,u=e;a<u.length;a++){var s=u[a],c=s.extractBaseValue(r.get(s.key));null!=c&&i.push(new St(s.key,c,c.fieldMask(),wt.exists(!0)))}return t.mutationQueue.addMutationBatch(o,n,i,e).next((function(e){var t=e.applyToLocalDocumentSet(r);return{batchId:e.batchId,changes:t}}))}))}))},e.prototype.lookupMutationDocuments=function(e){var t=this;return this.persistence.runTransaction("Lookup mutation documents","readonly",(function(n){return t.mutationQueue.lookupMutationKeys(n,e).next((function(e){return e?t.localDocuments.getDocuments(n,e):We.resolve(null)}))}))},e.prototype.acknowledgeBatch=function(e){var t=this;return this.persistence.runTransaction("Acknowledge batch","readwrite-primary",(function(n){var r=e.batch.keys(),o=t.remoteDocuments.newChangeBuffer();return t.mutationQueue.acknowledgeBatch(n,e.batch,e.streamToken).next((function(){return t.applyWriteToRemoteDocuments(n,e,o)})).next((function(){return o.apply(n)})).next((function(){return t.mutationQueue.performConsistencyCheck(n)})).next((function(){return t.localDocuments.getDocuments(n,r)}))}))},e.prototype.rejectBatch=function(e){var t=this;return this.persistence.runTransaction("Reject batch","readwrite-primary",(function(n){var r;return t.mutationQueue.lookupMutationBatch(n,e).next((function(e){return g(null!==e,"Attempt to reject nonexistent batch!"),r=e.keys(),t.mutationQueue.removeMutationBatch(n,e)})).next((function(){return t.mutationQueue.performConsistencyCheck(n)})).next((function(){return t.localDocuments.getDocuments(n,r)}))}))},e.prototype.getHighestUnacknowledgedBatchId=function(){var e=this;return this.persistence.runTransaction("Get highest unacknowledged batch id","readonly",(function(t){return e.mutationQueue.getHighestUnacknowledgedBatchId(t)}))},e.prototype.getLastStreamToken=function(){var e=this;return this.persistence.runTransaction("Get last stream token","readonly",(function(t){return e.mutation
1Queue.getLastStreamToken(t)}))},e.prototype.setLastStreamToken=function(e){var t=this;return this.persistence.runTransaction("Set last stream token","readwrite-primary",(function(n){return t.mutationQueue.setLastStreamToken(n,e)}))},e.prototype.getLastRemoteSnapshotVersion=function(){var e=this;return this.persistence.runTransaction("Get last remote snapshot version","readonly",(function(t){return e.queryCache.getLastRemoteSnapshotVersion(t)}))},e.prototype.applyRemoteEvent=function(t){var n=this,r=this.remoteDocuments.newChangeBuffer(),o=t.snapshotVersion;return this.persistence.runTransaction("Apply remote event","readwrite-primary",(function(i){var a=[];k(t.targetChanges,(function(t,r){var u=n.queryDataByTarget[t];if(u){a.push(n.queryCache.removeMatchingKeys(i,r.removedDocuments,t).next((function(){return n.queryCache.addMatchingKeys(i,r.addedDocuments,t)})));var s=r.resumeToken;if(s.length>0){var c=u.withResumeToken(s,o);n.queryDataByTarget[t]=c,e.shouldPersistQueryData(u,c,r)&&a.push(n.queryCache.updateQueryData(i,c))}}}));var u=De(),s=Fe();if(t.documentUpdates.forEach((function(e,t){s=s.add(e)})),a.push(r.getEntries(i,s).next((function(e){t.documentUpdates.forEach((function(o,s){var c=e.get(o);s instanceof Wt&&s.version.isEqual(Te.MIN)?(r.removeEntry(o),u=u.insert(o,s)):null==c||s.version.compareTo(c.version)>0||0===s.version.compareTo(c.version)&&c.hasPendingWrites?(Te.MIN.isEqual(t.snapshotVersion)&&m("LocalStore","Cannot add a document when the remote version is zero"),r.addEntry(s),u=u.insert(o,s)):d("LocalStore","Ignoring outdated watch update for ",o,". Current version:",c.version," Watch version:",s.version),t.resolvedLimboDocuments.has(o)&&a.push(n.persistence.referenceDelegate.updateLimboDocument(i,o))}))}))),!o.isEqual(Te.MIN)){var c=n.queryCache.getLastRemoteSnapshotVersion(i).next((function(e){return g(o.compareTo(e)>=0,"Watch stream reverted to previous snapshot?? "+o+" < "+e),n.queryCache.setTargetsMetadata(i,i.currentSequenceNumber,o)}));a.push(c)}return We.waitFor(a).next((function(){return r.apply(i)})).next((function(){return n.localDocuments.getLocalViewOfDocuments(i,u)}))}))},e.shouldPersistQueryData=function(e,t,n){return g(t.resumeToken.length>0,"Attempted to persist query data with no resume token"),0===e.resumeToken.length||(t.snapshotVersion.toMicroseconds()-e.snapshotVersion.toMicroseconds()>=this.RESUME_TOKEN_MAX_AGE_MICROS||n.addedDocuments.size+n.modifiedDocuments.size+n.removedDocuments.size>0)},e.prototype.notifyLocalViewChanges=function(e){var t=this;return this.persistence.runTransaction("notifyLocalViewChanges","readwrite",(function(n){return We.forEach(e,(function(e){return t.localViewReferences.addReferences(e.addedKeys,e.targetId),t.localViewReferences.removeReferences(e.removedKeys,e.targetId),We.forEach(e.removedKeys,(function(e){return t.persistence.referenceDelegate.removeReference(n,e)}))}))}))},e.prototype.nextMutationBatch=function(e){var t=this;return this.persistence.runTransaction("Get next mutation batch","readonly",(function(n){return void 0===e&&(e=-1),t.mutationQueue.getNextMutationBatchAfterBatchId(n,e)}))},e.prototype.readDocument=function(e){var t=this;return this.persistence.runTransaction("read document","readonly",(function(n){return t.localDocuments.getDocument(n,e)}))},e.prototype.allocateQuery=function(e){var t=this;return this.persistence.runTransaction("Allocate query","readwrite",(function(n){var r;return t.queryCache.getQueryData(n,e).next((function(o){return o?(r=o,We.resolve()):t.queryCache.allocateTargetId(n).next((function(o){return r=new kn(e,o,_n.Listen,n.currentSequenceNumber),t.queryCache.addQueryData(n,r)}))})).next((function(){return g(!t.queryDataByTarget[r.targetId],"Tried to allocate an already allocated query: "+e),t.queryDataByTarget[r.targetId]=r,r}))}))},e.prototype.releaseQuery=function(e,t){var n=this,r=t?"readwrite":"readwrite-primary";return this.persistence.runTransaction("Release query",r,(function(r){return n.queryCache.getQueryData(r,e).next((function(o){g(null!=o,"Tried to release nonexistent query: "+e);var i=o.targetId,a=n.queryDataByTarget[i],u=n.localViewReferences.removeReferencesForId(i);
1return delete n.queryDataByTarget[i],t?We.resolve():We.forEach(u,(function(e){return n.persistence.referenceDelegate.removeReference(r,e)})).next((function(){return n.persistence.referenceDelegate.removeTarget(r,a)}))}))}))},e.prototype.executeQuery=function(e){var t=this;return this.persistence.runTransaction("Execute query","readonly",(function(n){return t.localDocuments.getDocumentsMatchingQuery(n,e)}))},e.prototype.remoteDocumentKeys=function(e){var t=this;return this.persistence.runTransaction("Remote document keys","readonly",(function(n){return t.queryCache.getMatchingKeysForTargetId(n,e)}))},e.prototype.getActiveClients=function(){return this.persistence.getActiveClients()},e.prototype.removeCachedMutationBatchMetadata=function(e){this.mutationQueue.removeCachedMutationKeys(e)},e.prototype.setNetworkEnabled=function(e){this.persistence.setNetworkEnabled(e)},e.prototype.applyWriteToRemoteDocuments=function(e,t,n){var r=this,o=t.batch,i=o.keys(),a=We.resolve();return i.forEach((function(r){a=a.next((function(){return n.getEntry(e,r)})).next((function(e){var i=e,a=t.docVersions.get(r);g(null!==a,"ackVersions should contain every doc in the write."),(!i||i.version.compareTo(a)<0)&&((i=o.applyToRemoteDocument(r,i,t))?n.addEntry(i):g(!e,"Mutation batch "+o+" applied to document "+e+" resulted in null"))}))})),a.next((function(){return r.mutationQueue.removeMutationBatch(e,o)}))},e.prototype.collectGarbage=function(e){var t=this;return this.persistence.runTransaction("Collect garbage","readwrite-primary",(function(n){return e.collect(n,t.queryDataByTarget)}))},e.prototype.getQueryForTarget=function(e){var t=this;return this.queryDataByTarget[e]?Promise.resolve(this.queryDataByTarget[e].query):this.persistence.runTransaction("Get query data","readonly",(function(n){return t.queryCache.getQueryDataForTarget(n,e).next((function(e){return e?e.query:null}))}))},e.prototype.getNewDocumentChanges=function(){var e=this;return this.persistence.runTransaction("Get new document changes","readonly",(function(t){return e.remoteDocuments.getNewDocumentChanges(t)}))},e.RESUME_TOKEN_MAX_AGE_MICROS=3e8,e}(),Yn=function(){function e(e,t){this.indexManager=e,this.referenceDelegate=t,this.mutationQueue=[],this.nextBatchId=1,this.lastStreamToken=w(),this.batchesByDocumentKey=new Ae(Kn.compareByKey)}return e.prototype.checkEmpty=function(e){return We.resolve(0===this.mutationQueue.length)},e.prototype.acknowledgeBatch=function(e,t,n){var r=t.batchId,o=this.indexOfExistingBatchId(r,"acknowledged");g(0===o,"Can only acknowledge the first batch in the mutation queue");var i=this.mutationQueue[o];return g(r===i.batchId,"Queue ordering failure: expected batch "+r+", got batch "+i.batchId),this.lastStreamToken=n,We.resolve()},e.prototype.getLastStreamToken=function(e){return We.resolve(this.lastStreamToken)},e.prototype.setLastStreamToken=function(e,t){return this.lastStreamToken=t,We.resolve()},e.prototype.addMutationBatch=function(e,t,n,r){g(0!==r.length,"Mutation batches should not be empty");var o=this.nextBatchId;(this.nextBatchId++,this.mutationQueue.length>0)&&g(this.mutationQueue[this.mutationQueue.length-1].batchId<o,"Mutation batchIDs must be monotonically increasing order");var i=new Ve(o,t,n,r);this.mutationQueue.push(i);for(var a=0,u=r;a<u.length;a++){var s=u[a];this.batchesByDocumentKey=this.batchesByDocumentKey.add(new Kn(s.key,o)),this.indexManager.addToCollectionParentIndex(e,s.key.path.popLast())}return We.resolve(i)},e.prototype.lookupMutationBatch=function(e,t){return We.resolve(this.findMutationBatch(t))},e.prototype.lookupMutationKeys=function(e,t){var n=this.findMutationBatch(t);return g(null!=n,"Failed to find local mutation batch."),We.resolve(n.keys())},e.prototype.getNextMutationBatchAfterBatchId=function(e,t){var n=t+1,r=this.indexOfBatchId(n),o=r<0?0:r;return We.resolve(this.mutationQueue.length>o?this.mutationQueue[o]:null)},e.prototype.getHighestUnacknowledgedBatchId=function(){return We.resolve(0===this.mutationQueue.length?-1:this.nextBatchId-1)},e.prototype.getAllMutationBatches=function(e){return We.resolve(this.mutation
1Queue.slice())},e.prototype.getAllMutationBatchesAffectingDocumentKey=function(e,t){var n=this,r=new Kn(t,0),o=new Kn(t,Number.POSITIVE_INFINITY),i=[];return this.batchesByDocumentKey.forEachInRange([r,o],(function(e){g(t.isEqual(e.key),"Should only iterate over a single key's batches");var r=n.findMutationBatch(e.targetOrBatchId);g(null!==r,"Batches in the index must exist in the main table"),i.push(r)})),We.resolve(i)},e.prototype.getAllMutationBatchesAffectingDocumentKeys=function(e,t){var n=this,r=new Ae(Y);return t.forEach((function(e){var t=new Kn(e,0),o=new Kn(e,Number.POSITIVE_INFINITY);n.batchesByDocumentKey.forEachInRange([t,o],(function(t){g(e.isEqual(t.key),"For each key, should only iterate over a single key's batches"),r=r.add(t.targetOrBatchId)}))})),We.resolve(this.findMutationBatches(r))},e.prototype.getAllMutationBatchesAffectingQuery=function(e,t){g(!t.isCollectionGroupQuery(),"CollectionGroup queries should be handled in LocalDocumentsView");var n=t.path,r=n.length+1,o=n;fe.isDocumentKey(o)||(o=o.child(""));var i=new Kn(new fe(o),0),a=new Ae(Y);return this.batchesByDocumentKey.forEachWhile((function(e){var t=e.key.path;return!!n.isPrefixOf(t)&&(t.length===r&&(a=a.add(e.targetOrBatchId)),!0)}),i),We.resolve(this.findMutationBatches(a))},e.prototype.findMutationBatches=function(e){var t=this,n=[];return e.forEach((function(e){var r=t.findMutationBatch(e);null!==r&&n.push(r)})),n},e.prototype.removeMutationBatch=function(e,t){var n=this;g(0===this.indexOfExistingBatchId(t.batchId,"removed"),"Can only remove the first entry of the mutation queue"),this.mutationQueue.shift();var r=this.batchesByDocumentKey;return We.forEach(t.mutations,(function(o){var i=new Kn(o.key,t.batchId);return r=r.delete(i),n.referenceDelegate.removeMutationReference(e,o.key)})).next((function(){n.batchesByDocumentKey=r}))},e.prototype.removeCachedMutationKeys=function(e){},e.prototype.containsKey=function(e,t){var n=new Kn(t,0),r=this.batchesByDocumentKey.firstAfterOrEqual(n);return We.resolve(t.isEqual(r&&r.key))},e.prototype.performConsistencyCheck=function(e){return 0===this.mutationQueue.length&&g(this.batchesByDocumentKey.isEmpty(),"Document leak -- detected dangling mutation references when queue is empty."),We.resolve()},e.prototype.indexOfExistingBatchId=function(e,t){var n=this.indexOfBatchId(e);return g(n>=0&&n<this.mutationQueue.length,"Batches must exist to be "+t),n},e.prototype.indexOfBatchId=function(e){return 0===this.mutationQueue.length?0:e-this.mutationQueue[0].batchId},e.prototype.findMutationBatch=function(e){var t=this.indexOfBatchId(e);if(t<0||t>=this.mutationQueue.length)return null;var n=this.mutationQueue[t];return g(n.batchId===e,"If found batch must match"),n},e}(),$n=function(){function e(e){this.persistence=e,this.queries=new Gt((function(e){return e.canonicalId()})),this.lastRemoteSnapshotVersion=Te.MIN,this.highestTargetId=0,this.highestSequenceNumber=0,this.references=new Gn,this.targetCount=0,this.targetIdGenerator=et.forQueryCache()}return e.prototype.getTargetCount=function(e){return We.resolve(this.targetCount)},e.prototype.forEachTarget=function(e,t){return this.queries.forEach((function(e,n){return t(n)})),We.resolve()},e.prototype.getLastRemoteSnapshotVersion=function(e){return We.resolve(this.lastRemoteSnapshotVersion)},e.prototype.getHighestSequenceNumber=function(e){return We.resolve(this.highestSequenceNumber)},e.prototype.allocateTargetId=function(e){var t=this.targetIdGenerator.after(this.highestTargetId);return this.highestTargetId=t,We.resolve(t)},e.prototype.setTargetsMetadata=function(e,t,n){return n&&(this.lastRemoteSnapshotVersion=n),t>this.highestSequenceNumber&&(this.highestSequenceNumber=t),We.resolve()},e.prototype.saveQueryData=function(e){this.queries.set(e.query,e);var t=e.targetId;t>this.highestTargetId&&(this.highestTargetId=t),e.sequenceNumber>this.highestSequenceNumber&&(this.highestSequenceNumber=e.sequenceNumber)},e.prototype.addQueryData=function(e,t){return g(!this.queries.has(t.query),"Adding a query that already exists"),this.saveQueryData(t),this.targetCount+=1,We.resolve()},e.prototype.updateQueryData=function(e,t){return g(this.queries.has(t.query),"Updating a non-existent query"),this.saveQueryData(t),We.resolve()},e.prototype.removeQueryData=function(e,t){return g(this.targetCount>0,"Removing a target from an empty cache"),g(this.queries.has(t.query),"Removing a non-existent target from the cache"),this.queries.delete(t.query),this.references.removeReferencesForId(t.targetId),this.targetCount-=1,We.resolve()},e.prototype.removeTargets=function(e,t,n){var r=this,o=0,i=[];
1return this.queries.forEach((function(a,u){u.sequenceNumber<=t&&!n[u.targetId]&&(r.queries.delete(a),i.push(r.removeMatchingKeysForTargetId(e,u.targetId)),o++)})),We.waitFor(i).next((function(){return o}))},e.prototype.getQueryCount=function(e){return We.resolve(this.targetCount)},e.prototype.getQueryData=function(e,t){var n=this.queries.get(t)||null;return We.resolve(n)},e.prototype.getQueryDataForTarget=function(e,t){return v("Not yet implemented.")},e.prototype.addMatchingKeys=function(e,t,n){this.references.addReferences(t,n);var r=this.persistence.referenceDelegate,o=[];return r&&t.forEach((function(t){o.push(r.addReference(e,t))})),We.waitFor(o)},e.prototype.removeMatchingKeys=function(e,t,n){this.references.removeReferences(t,n);var r=this.persistence.referenceDelegate,o=[];return r&&t.forEach((function(t){o.push(r.removeReference(e,t))})),We.waitFor(o)},e.prototype.removeMatchingKeysForTargetId=function(e,t){return this.references.removeReferencesForId(t),We.resolve()},e.prototype.getMatchingKeysForTargetId=function(e,t){var n=this.references.referencesForId(t);return We.resolve(n)},e.prototype.containsKey=function(e,t){return We.resolve(this.references.containsKey(t))},e}();var Xn=function(){function e(e,t){this.indexManager=e,this.sizer=t,this.docs=new Oe(fe.comparator),this.newDocumentChanges=Fe(),this.size=0}return e.prototype.addEntry=function(e,t){var n=t.key,r=this.docs.get(n),o=r?r.size:0,i=this.sizer(t);return this.docs=this.docs.insert(n,{maybeDocument:t,size:i}),this.newDocumentChanges=this.newDocumentChanges.add(n),this.size+=i-o,this.indexManager.addToCollectionParentIndex(e,n.path.popLast())},e.prototype.removeEntry=function(e){var t=this.docs.get(e);t&&(this.docs=this.docs.remove(e),this.size-=t.size)},e.prototype.getEntry=function(e,t){var n=this.docs.get(t);return We.resolve(n?n.maybeDocument:null)},e.prototype.getEntries=function(e,t){var n=this,r=Pe();return t.forEach((function(e){var t=n.docs.get(e);r=r.insert(e,t?t.maybeDocument:null)})),We.resolve(r)},e.prototype.getDocumentsMatchingQuery=function(e,t){g(!t.isCollectionGroupQuery(),"CollectionGroup queries should be handled in LocalDocumentsView");for(var n=je(),r=new fe(t.path.child("")),o=this.docs.getIteratorFrom(r);o.hasNext();){var i=o.getNext(),a=i.key,u=i.value.maybeDocument;if(!t.path.isPrefixOf(a.path))break;u instanceof zt&&t.matches(u)&&(n=n.insert(u.key,u))}return We.resolve(n)},e.prototype.forEachDocumentKey=function(e,t){return We.forEach(this.docs,(function(e){return t(e)}))},e.prototype.getNewDocumentChanges=function(e){var t=this,n=De();
1return this.newDocumentChanges.forEach((function(e){var r=t.docs.get(e),o=r?r.maybeDocument:new Wt(e,Te.forDeletedDoc());n=n.insert(e,o)})),this.newDocumentChanges=Fe(),We.resolve(n)},e.prototype.newChangeBuffer=function(){return new e.RemoteDocumentChangeBuffer(this)},e.prototype.getSize=function(e){return We.resolve(this.size)},e.RemoteDocumentChangeBuffer=function(e){function t(t){var n=e.call(this)||this;return n.documentCache=t,n}return u.__extends(t,e),t.prototype.applyChanges=function(e){var t=this,n=[];return this.changes.forEach((function(r,o){o?n.push(t.documentCache.addEntry(e,o)):t.documentCache.removeEntry(r)})),We.waitFor(n)},t.prototype.getFromCache=function(e,t){return this.documentCache.getEntry(e,t)},t.prototype.getAllFromCache=function(e,t){return this.documentCache.getEntries(e,t)},t}(Kt),e}(),Jn=function(){function e(e,t){var n=this;this.clientId=e,this.mutationQueues={},this.listenSequence=new ae(0),this._started=!1,this._started=!0,this.referenceDelegate=t(this),this.queryCache=new $n(this);this.indexManager=new tn,this.remoteDocumentCache=new Xn(this.indexManager,(function(e){return n.referenceDelegate.documentSize(e)}))}return e.createLruPersistence=function(t,n,r){return new e(t,(function(e){return new tr(e,new Cn(n),r)}))},e.createEagerPersistence=function(t){return new e(t,(function(e){return new er(e)}))},e.prototype.shutdown=function(){return this._started=!1,Promise.resolve()},Object.defineProperty(e.prototype,"started",{get:function(){return this._started},enumerable:!0,configurable:!0}),e.prototype.getActiveClients=function(){return u.__awaiter(this,void 0,void 0,(function(){return u.__generator(this,(function(e){return[2,[this.clientId]]}))}))},e.prototype.setPrimaryStateListener=function(e){return e(!0)},e.prototype.setDatabaseDeletedListener=function(){},e.prototype.setNetworkEnabled=function(e){},e.prototype.getIndexManager=function(){return this.indexManager},e.prototype.getMutationQueue=function(e){var t=this.mutationQueues[e.toKey()];return t||(t=new Yn(this.indexManager,this.referenceDelegate),this.mutationQueues[e.toKey()]=t),t},e.prototype.getQueryCache=function(){return this.queryCache},e.prototype.getRemoteDocumentCache=function(){return this.remoteDocumentCache},e.prototype.runTransaction=function(e,t,n){var r=this;d("MemoryPersistence","Starting transaction:",e);var o=new Zn(this.listenSequence.next());return this.referenceDelegate.onTransactionStarted(),n(o).next((function(e){return r.referenceDelegate.onTransactionCommitted(o).next((function(){return e}))})).toPromise()},e.prototype.mutationQueuesContainKey=function(e,t){return We.or(function(e){var t=[];return C(e,(function(e,n){return t.push(n)})),t}(this.mutationQueues).map((function(n){return function(){return n.containsKey(e,t)}})))},e}(),Zn=function(){return function(e){this.currentSequenceNumber=e}}(),er=function(){function e(e){this.persistence=e,this.inMemoryPins=null,this._orphanedDocuments=null}return Object.defineProperty(e.prototype,"orphanedDocuments",{get:function(){if(this._orphanedDocuments)return this._orphanedDocuments;
1throw v("orphanedDocuments is only valid during a transaction.")},enumerable:!0,configurable:!0}),e.prototype.setInMemoryPins=function(e){this.inMemoryPins=e},e.prototype.addReference=function(e,t){return this.orphanedDocuments.delete(t),We.resolve()},e.prototype.removeReference=function(e,t){return this.orphanedDocuments.add(t),We.resolve()},e.prototype.removeMutationReference=function(e,t){return this.orphanedDocuments.add(t),We.resolve()},e.prototype.removeTarget=function(e,t){var n=this,r=this.persistence.getQueryCache();return r.getMatchingKeysForTargetId(e,t.targetId).next((function(e){e.forEach((function(e){return n.orphanedDocuments.add(e)}))})).next((function(){return r.removeQueryData(e,t)}))},e.prototype.onTransactionStarted=function(){this._orphanedDocuments=new Set},e.prototype.onTransactionCommitted=function(e){var t=this,n=this.persistence.getRemoteDocumentCache().newChangeBuffer();return We.forEach(this.orphanedDocuments,(function(r){return t.isReferenced(e,r).next((function(e){e||n.removeEntry(r)}))})).next((function(){return t._orphanedDocuments=null,n.apply(e)}))},e.prototype.updateLimboDocument=function(e,t){var n=this;return this.isReferenced(e,t).next((function(e){e?n.orphanedDocuments.delete(t):n.orphanedDocuments.add(t)}))},e.prototype.documentSize=function(e){return 0},e.prototype.isReferenced=function(e,t){var n=this;return We.or([function(){return n.persistence.getQueryCache().containsKey(e,t)},function(){return n.persistence.mutationQueuesContainKey(e,t)},function(){return We.resolve(n.inMemoryPins.containsKey(t))}])},e}(),tr=function(){function e(e,t,n){this.persistence=e,this.serializer=t,this.inMemoryPins=null,this.orphanedSequenceNumbers=new Gt((function(e){return be(e.path)})),this.garbageCollector=new Pn(this,n)}return e.prototype.onTransactionStarted=function(){},e.prototype.onTransactionCommitted=function(e){return We.resolve()},e.prototype.forEachTarget=function(e,t){return this.persistence.getQueryCache().forEachTarget(e,t)},e.prototype.getSequenceNumberCount=function(e){var t=this.orphanedDocumentCount(e);return this.persistence.getQueryCache().getTargetCount(e).next((function(e){return t.next((function(t){return e+t}))}))},e.prototype.orphanedDocumentCount=function(e){var t=0;return this.forEachOrphanedDocumentSequenceNumber(e,(function(e){t++})).next((function(){return t}))},e.prototype.forEachOrphanedDocumentSequenceNumber=function(e,t){var n=this;return We.forEach(this.orphanedSequenceNumbers,(function(r,o){return n.isPinned(e,r,o).next((function(e){return e?We.resolve():t(o)}))}))},e.prototype.setInMemoryPins=function(e){this.inMemoryPins=e},e.prototype.removeTargets=function(e,t,n){return this.persistence.getQueryCache().removeTargets(e,t,n)},e.prototype.removeOrphanedDocuments=function(e,t){var n=this,r=0,o=this.persistence.getRemoteDocumentCache(),i=o.newChangeBuffer();return o.forEachDocumentKey(e,(function(o){return n.isPinned(e,o,t).next((function(e){e||(r++,i.removeEntry(o))}))})).next((function(){return i.apply(e)})).next((function(){return r}))},e.prototype.removeMutationReference=function(e,t){return this.orphanedSequenceNumbers.set(t,e.currentSequenceNumber),We.resolve()},e.prototype.removeTarget=function(e,t){var n=t.withSequenceNumber(e.currentSequenceNumber);return this.persistence.getQueryCache().updateQueryData(e,n)},e.prototype.addReference=function(e,t){return this.orphanedSequenceNumbers.set(t,e.currentSequenceNumber),We.resolve()},e.prototype.removeReference=function(e,t){return this.orphanedSequenceNumbers.set(t,e.currentSequenceNumber),We.resolve()},e.prototype.updateLimboDocument=function(e,t){return this.orphanedSequenceNumbers.set(t,e.currentSequenceNumber),We.resolve()},e.prototype.documentSize=function(e){var t,n=this.serializer.toDbRemoteDocument(e);if(n.document)t=n.document;else if(n.unknownDocument)t=n.unknownDocument;else{if(!n.noDocument)throw v("Unknown remote document type");t=n.noDocument}return JSON.stringify(t).length},e.prototype.isPinned=function(e,t,n){var r=this;return We.or([function(){return r.persistence.mutationQueuesContainKey(e,t)},function(){return We.resolve(r.inMemoryPins.containsKey(t))},function(){return r.persistence.getQueryCache().containsKey(e,t)},function(){var e=r.orphanedSequenceNumbers.get(t);return We.resolve(void 0!==e&&e>n)}])},e.prototype.getCacheSize=function(e){return this.persistence.getRemoteDocumentCache().getSize(e)},e}(),nr=Number,rr=nr.MIN_SAFE_INTEGER||-(Math.pow(2,53)-1),or=nr.MAX_SAFE_INTEGER||Math.pow(2,53)-1,ir=nr.isInteger||function(e){return"number"===typeof e&&isFinite(e)&&Math.floor(e)===e};function ar(e){return null===e||void 0===e}function ur(e){return ir(e)&&e<=or&&e>=rr}var sr,cr=1e3,lr=1.5,fr=6e4,hr=function(){function e(e,t,n,r,o){void 0===n&&(n=cr),void 0===r&&(r=lr),void 0===o&&(o=fr),this.queue=e,this.timerId=t,this.initialDelayMs=n,this.backoffFactor=r,this.maxDelayMs=o,this.currentBaseMs=0,this.timerPromise=null,this.lastAttemptTime=Date.now(),this.reset()}return e.prototype.reset=function(){this.currentBaseMs=0},e.prototype.resetToMax=function(){this.currentBaseMs=this.maxDelayMs},e.prototype.backoffAndRun=function(e){var t=this;this.cancel();
1var n=Math.floor(this.currentBaseMs+this.jitterDelayMs()),r=Math.max(0,Date.now()-this.lastAttemptTime),o=Math.max(0,n-r);this.currentBaseMs>0&&d("ExponentialBackoff","Backing off for "+o+" ms (base delay: "+this.currentBaseMs+" ms, delay with jitter: "+n+" ms, last attempt: "+r+" ms ago)"),this.timerPromise=this.queue.enqueueAfterDelay(this.timerId,o,(function(){return t.lastAttemptTime=Date.now(),e()})),this.currentBaseMs*=this.backoffFactor,this.currentBaseMs<this.initialDelayMs&&(this.currentBaseMs=this.initialDelayMs),this.currentBaseMs>this.maxDelayMs&&(this.currentBaseMs=this.maxDelayMs)},e.prototype.cancel=function(){null!==this.timerPromise&&(this.timerPromise.cancel(),this.timerPromise=null)},e.prototype.jitterDelayMs=function(){return(Math.random()-.5)*this.currentBaseMs},e}();!function(e){e[e.Initial=0]="Initial",e[e.Starting=1]="Starting",e[e.Open=2]="Open",e[e.Error=3]="Error",e[e.Backoff=4]="Backoff"}(sr||(sr={}));var pr,dr,mr=function(){function e(e,t,n,r,o,i){this.queue=e,this.idleTimerId=n,this.connection=r,this.credentialsProvider=o,this.listener=i,this.state=sr.Initial,this.closeCount=0,this.idleTimer=null,this.stream=null,this.backoff=new hr(e,t)}return e.prototype.isStarted=function(){return this.state===sr.Starting||this.state===sr.Open||this.state===sr.Backoff},e.prototype.isOpen=function(){return this.state===sr.Open},e.prototype.start=function(){this.state!==sr.Error?(g(this.state===sr.Initial,"Already started"),this.auth()):this.performBackoff()},e.prototype.stop=function(){return u.__awaiter(this,void 0,void 0,(function(){return u.__generator(this,(function(e){switch(e.label){case 0:return this.isStarted()?[4,this.close(sr.Initial)]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}
1))}))},e.prototype.inhibitBackoff=function(){g(!this.isStarted(),"Can only inhibit backoff in a stopped state"),this.state=sr.Initial,this.backoff.reset()},e.prototype.markIdle=function(){var e=this;this.isOpen()&&null===this.idleTimer&&(this.idleTimer=this.queue.enqueueAfterDelay(this.idleTimerId,6e4,(function(){return e.handleIdleCloseTimer()})))},e.prototype.sendRequest=function(e){this.cancelIdleCheck(),this.stream.send(e)},e.prototype.handleIdleCloseTimer=function(){return u.__awaiter(this,void 0,void 0,(function(){return u.__generator(this,(function(e){return this.isOpen()?[2,this.close(sr.Initial)]:[2]}))}))},e.prototype.cancelIdleCheck=function(){this.idleTimer&&(this.idleTimer.cancel(),this.idleTimer=null)},e.prototype.close=function(e,t){return u.__awaiter(this,void 0,void 0,(function(){return u.__generator(this,(function(n){switch(n.label){case 0:return g(this.isStarted(),"Only started streams should be closed."),g(e===sr.Error||ar(t),"Can't provide an error when not in an error state."),this.cancelIdleCheck(),this.backoff.cancel(),this.closeCount++,e!==sr.Error?this.backoff.reset():t&&t.code===E.RESOURCE_EXHAUSTED?(m(t.toString()),m("Using maximum backoff delay to prevent overloading the backend."),this.backoff.resetToMax()):t&&t.code===E.UNAUTHENTICATED&&this.credentialsProvider.invalidateToken(),null!==this.stream&&(this.tearDown(),this.stream.close(),this.stream=null),this.state=e,[4,this.listener.onClose(t)];case 1:return n.sent(),[2]}}))}))},e.prototype.tearDown=function(){},e.prototype.auth=function(){var e=this;g(this.state===sr.Initial,"Must be in initial state to auth"),this.state=sr.Starting;var t=this.getCloseGuardedDispatcher(this.closeCount),n=this.closeCount;this.credentialsProvider.getToken().then((function(t){e.closeCount===n&&e.startStream(t)}),(function(n){t((function(){var t=new _(E.UNKNOWN,"Fetching auth token failed: "+n.message);return e.handleStreamClose(t)}))}))},e.prototype.startStream=function(e){var t=this;g(this.state===sr.Starting,"Trying to start stream in a non-starting state");var n=this.getCloseGuardedDispatcher(this.closeCount);this.stream=this.startRpc(e),this.stream.onOpen((function(){n((function(){return g(t.state===sr.Starting,"Expected stream to be in state Starting, but was "+t.state),t.state=sr.Open,t.listener.onOpen()}))})),this.stream.onClose((function(e){n((function(){return t.handleStreamClose(e)}))})),this.stream.onMessage((function(e){n((function(){return t.onMessage(e)}))}))},e.prototype.performBackoff=function(){var e=this;g(this.state===sr.Error,"Should only perform backoff when in Error state"),this.state=sr.Backoff,this.backoff.backoffAndRun((function(){return u.__awaiter(e,void 0,void 0,(function(){return u.__generator(this,(function(e){return g(this.state===sr.Backoff,"Backoff elapsed but state is now: "+this.state),this.state=sr.Initial,this.start(),g(this.isStarted(),"PersistentStream should have started"),[2]}))}))}))},e.prototype.handleStreamClose=function(e){return g(this.isStarted(),"Can't handle server close on non-started stream"),d("PersistentStream","close with error: "+e),this.stream=null,this.close(sr.Error,e)},e.prototype.getCloseGuardedDispatcher=function(e){var t=this;return function(n){t.queue.enqueueAndForget((function(){return t.closeCount===e?n():(d("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve())}))}},e}(),yr=function(e){function t(t,n,r,o,i){var a=e.call(this,t,ee.ListenStreamConnectionBackoff,ee.ListenStreamIdle,n,r,i)||this;return a.serializer=o,a}return u.__extends(t,e),t.prototype.startRpc=function(e){return this.connection.openStream("Listen",e)},t.prototype.onMessage=function(e){this.backoff.reset();var t=this.serializer.fromWatchChange(e),n=this.serializer.versionFromListenResponse(e);return this.listener.onWatchChange(t,n)},t.prototype.watch=function(e){var t={};t.database=this.serializer.encodedDatabaseId,t.addTarget=this.serializer.toTarget(e);var n=this.serializer.toListenRequestLabels(e);n&&(t.labels=n),this.sendRequest(t)},t.prototype.unwatch=function(e){var t={};t.database=this.serializer.encodedDatabaseId,t.removeTarget=e,this.sendRequest(t)},t}(mr),vr=function(e){function t(t,n,r,o,i){var a=e.call(this,t,ee.WriteStreamConnectionBackoff,ee.WriteStreamIdle,n,r,i)||this;
1return a.serializer=o,a.handshakeComplete_=!1,a.lastStreamToken=w(),a}return u.__extends(t,e),Object.defineProperty(t.prototype,"handshakeComplete",{get:function(){return this.handshakeComplete_},enumerable:!0,configurable:!0}),t.prototype.start=function(){this.handshakeComplete_=!1,e.prototype.start.call(this)},t.prototype.tearDown=function(){this.handshakeComplete_&&this.writeMutations([])},t.prototype.startRpc=function(e){return this.connection.openStream("Write",e)},t.prototype.onMessage=function(e){if(g(!!e.streamToken,"Got a write response without a stream token"),this.lastStreamToken=e.streamToken,this.handshakeComplete_){this.backoff.reset();var t=this.serializer.fromWriteResults(e.writeResults,e.commitTime),n=this.serializer.fromVersion(e.commitTime);return this.listener.onMutationResult(n,t)}return g(!e.writeResults||0===e.writeResults.length,"Got mutation results for handshake"),this.handshakeComplete_=!0,this.listener.onHandshakeComplete()},t.prototype.writeHandshake=function(){g(this.isOpen(),"Writing handshake requires an opened stream"),g(!this.handshakeComplete_,"Handshake already completed");var e={};e.database=this.serializer.encodedDatabaseId,this.sendRequest(e)},t.prototype.writeMutations=function(e){var t=this;g(this.isOpen(),"Writing mutations requires an opened stream"),g(this.handshakeComplete_,"Handshake must be complete before writing mutations"),g(this.lastStreamToken.length>0,"Trying to write mutation without a token");var n={streamToken:this.lastStreamToken,writes:e.map((function(e){return t.serializer.toMutation(e)}))};this.sendRequest(n)},t}(mr),gr=function(){function e(e,t,n,r){this.queue=e,this.connection=t,this.credentials=n,this.serializer=r}return e.prototype.newPersistentWriteStream=function(e){return new vr(this.queue,this.connection,this.credentials,this.serializer,e)},e.prototype.newPersistentWatchStream=function(e){return new yr(this.queue,this.connection,this.credentials,this.serializer,e)},e.prototype.commit=function(e){var t=this,n={database:this.serializer.encodedDatabaseId,writes:e.map((function(e){return t.serializer.toMutation(e)}))};return this.invokeRPC("Commit",n).then((function(e){return t.serializer.fromWriteResults(e.writeResults,e.commitTime)}))},e.prototype.lookup=function(e){var t=this,n={database:this.serializer.encodedDatabaseId,documents:e.map((function(e){return t.serializer.toName(e)}))};return this.invokeStreamingRPC("BatchGetDocuments",n).then((function(n){var r=De();n.forEach((function(e){var n=t.serializer.fromMaybeDocument(e);r=r.insert(n.key,n)}));var o=[];return e.forEach((function(e){var t=r.get(e);g(!!t,"Missing entity in write response for "+e),o.push(t)})),o}))},e.prototype.invokeRPC=function(e,t){var n=this;return this.credentials.getToken().then((function(r){return n.connection.invokeRPC(e,t,r)})).catch((function(e){throw e.code===E.UNAUTHENTICATED&&n.credentials.invalidateToken(),e}))},e.prototype.invokeStreamingRPC=function(e,t){var n=this;return this.credentials.getToken().then((function(r){return n.connection.invokeStreamingRPC(e,t,r)})).catch((function(e){throw e.code===E.UNAUTHENTICATED&&n.credentials.invalidateToken(),e}))},e}(),br=function(){function e(e){this.datastore=e,this.readVersions=Le(),this.mutations=[],this.committed=!1,this.lastWriteError=null,this.writtenDocs=new Set}return e.prototype.lookup=function(e){return u.__awaiter(this,void 0,void 0,(function(){var t,n=this;return u.__generator(this,(function(r){switch(r.label){case 0:if(this.ensureCommitNotCalled(),this.mutations.length>0)throw new _(E.INVALID_ARGUMENT,"Firestore transactions require all reads to be executed before all writes.");return[4,this.datastore.lookup(e)];case 1:return(t=r.sent()).forEach((function(e){e instanceof Wt||e instanceof zt?n.recordVersion(e):v("Document in a transaction was a "+e.constructor.name)})),[2,t]}}))}))},e.prototype.set=function(e,t){this.write(t.toMutations(e,this.precondition(e))),this.writtenDocs.add(e)},e.prototype.update=function(e,t){try{this.write(t.toMutations(e,this.preconditionForUpdate(e)))}catch(n){this.lastWriteError=n}this.writtenDocs.add(e)}
1,e.prototype.delete=function(e){this.write([new Ot(e,this.precondition(e))]),this.writtenDocs.add(e)},e.prototype.commit=function(){return u.__awaiter(this,void 0,void 0,(function(){var e;return u.__generator(this,(function(t){switch(t.label){case 0:if(this.ensureCommitNotCalled(),this.lastWriteError)throw this.lastWriteError;if(e=this.readVersions,this.mutations.forEach((function(t){e=e.remove(t.key)})),!e.isEmpty())throw new _(E.INVALID_ARGUMENT,"Every document read in a transaction must also be written.");return[4,this.datastore.commit(this.mutations)];case 1:return t.sent(),this.committed=!0,[2]}}))}))},e.prototype.recordVersion=function(e){var t;if(e instanceof zt)t=e.version;else{if(!(e instanceof Wt))throw v("Document in a transaction was a "+e.constructor.name);t=Te.forDeletedDoc()}var n=this.readVersions.get(e.key);if(null!==n){if(!t.isEqual(n))throw new _(E.ABORTED,"Document version changed between two reads.")}else this.readVersions=this.readVersions.insert(e.key,t)},e.prototype.precondition=function(e){var t=this.readVersions.get(e);return!this.writtenDocs.has(e)&&t?wt.updateTime(t):wt.NONE},e.prototype.preconditionForUpdate=function(e){var t=this.readVersions.get(e);if(!this.writtenDocs.has(e)&&t){if(t.isEqual(Te.forDeletedDoc()))throw new _(E.INVALID_ARGUMENT,"Can't update a document that doesn't exist.");return wt.updateTime(t)}return wt.exists(!0)},e.prototype.write=function(e){this.ensureCommitNotCalled(),this.mutations=this.mutations.concat(e)},e.prototype.ensureCommitNotCalled=function(){g(!this.committed,"A transaction object cannot be used after its update callback has been invoked.")},e}();!function(e){e[e.Unknown=0]="Unknown",e[e.Online=1]="Online",e[e.Offline=2]="Offline"}(pr||(pr={})),function(e){e[e.RemoteStore=0]="RemoteStore",e[e.SharedClientState=1]="SharedClientState"}(dr||(dr={}));var wr,Er=function(){function e(e,t){this.asyncQueue=e,this.onlineStateHandler=t,this.state=pr.Unknown,this.watchStreamFailures=0,this.onlineStateTimer=null,this.shouldWarnClientIsOffline=!0}return e.prototype.handleWatchStreamStart=function(){var e=this;0===this.watchStreamFailures&&(this.setAndBroadcast(pr.Unknown),g(null===this.onlineStateTimer,"onlineStateTimer shouldn't be started yet"),this.onlineStateTimer=this.asyncQueue.enqueueAfterDelay(ee.OnlineStateTimeout,1e4,(function(){return e.onlineStateTimer=null,g(e.state===pr.Unknown,"Timer should be canceled if we transitioned to a different state."),e.logClientOfflineWarningIfNecessary("Backend didn't respond within 10 seconds."),e.setAndBroadcast(pr.Offline),Promise.resolve()})))},e.prototype.handleWatchStreamFailure=function(e){this.state===pr.Online?(this.setAndBroadcast(pr.Unknown),g(0===this.watchStreamFailures,"watchStreamFailures must be 0"),g(null===this.onlineStateTimer,"onlineStateTimer must be null")):(this.watchStreamFailures++,this.watchStreamFailures>=1&&(this.clearOnlineStateTimer(),this.logClientOfflineWarningIfNecessary("Connection failed 1 times. Most recent error: "+e.toString()),this.setAndBroadcast(pr.Offline)))},e.prototype.set=function(e){this.clearOnlineStateTimer(),this.watchStreamFailures=0,e===pr.Online&&(this.shouldWarnClientIsOffline=!1),this.setAndBroadcast(e)},e.prototype.setAndBroadcast=function(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))},e.prototype.logClientOfflineWarningIfNecessary=function(e){var t="Could not reach Cloud Firestore backend. "+e+"\nThis typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.";this.shouldWarnClientIsOffline?(m(t),this.shouldWarnClientIsOffline=!1):d("OnlineStateTracker",t)},e.prototype.clearOnlineStateTimer=function(){null!==this.onlineStateTimer&&(this.onlineStateTimer.cancel(),this.onlineStateTimer=null)},e}();function _r(e){switch(e){case E.OK:return v("Treated status OK as error");case E.CANCELLED:case E.UNKNOWN:case E.DEADLINE_EXCEEDED:case E.RESOURCE_EXHAUSTED:case E.INTERNAL:case E.UNAVAILABLE:case E.UNAUTHENTICATED:return!1;case E.INVALID_ARGUMENT:case E.NOT_FOUND:case E.ALREADY_EXISTS:case E.PERMISSION_DENIED:case E.FAILED_PRECONDITION:case E.ABORTED:case E.OUT_OF_RANGE:case E.UNIMPLEMENT
1ED:case E.DATA_LOSS:return!0;default:return v("Unknown status code: "+e)}}function Sr(e){if(void 0===e)return m("GRPC error has no .code"),E.UNKNOWN;switch(e){case wr.OK:return E.OK;case wr.CANCELLED:return E.CANCELLED;case wr.UNKNOWN:return E.UNKNOWN;case wr.DEADLINE_EXCEEDED:return E.DEADLINE_EXCEEDED;case wr.RESOURCE_EXHAUSTED:return E.RESOURCE_EXHAUSTED;case wr.INTERNAL:return E.INTERNAL;case wr.UNAVAILABLE:return E.UNAVAILABLE;case wr.UNAUTHENTICATED:return E.UNAUTHENTICATED;case wr.INVALID_ARGUMENT:return E.INVALID_ARGUMENT;case wr.NOT_FOUND:return E.NOT_FOUND;case wr.ALREADY_EXISTS:return E.ALREADY_EXISTS;case wr.PERMISSION_DENIED:return E.PERMISSION_DENIED;case wr.FAILED_PRECONDITION:return E.FAILED_PRECONDITION;case wr.ABORTED:return E.ABORTED;case wr.OUT_OF_RANGE:return E.OUT_OF_RANGE;case wr.UNIMPLEMENTED:return E.UNIMPLEMENTED;case wr.DATA_LOSS:return E.DATA_LOSS;default:return v("Unknown status code: "+e)}}function Tr(e){if(void 0===e)return wr.OK;switch(e){case E.OK:return wr.OK;case E.CANCELLED:return wr.CANCELLED;case E.UNKNOWN:return wr.UNKNOWN;case E.DEADLINE_EXCEEDED:return wr.DEADLINE_EXCEEDED;case E.RESOURCE_EXHAUSTED:return wr.RESOURCE_EXHAUSTED;case E.INTERNAL:return wr.INTERNAL;case E.UNAVAILABLE:return wr.UNAVAILABLE;case E.UNAUTHENTICATED:return wr.UNAUTHENTICATED;case E.INVALID_ARGUMENT:return wr.INVALID_ARGUMENT;case E.NOT_FOUND:return wr.NOT_FOUND;case E.ALREADY_EXISTS:return wr.ALREADY_EXISTS;case E.PERMISSION_DENIED:return wr.PERMISSION_DENIED;case E.FAILED_PRECONDITION:return wr.FAILED_PRECONDITION;case E.ABORTED:return wr.ABORTED;case E.OUT_OF_RANGE:return wr.OUT_OF_RANGE;case E.UNIMPLEMENTED:return wr.UNIMPLEMENTED;case E.DATA_LOSS:return wr.DATA_LOSS;default:return v("Unknown status code: "+e)}}!function(e){e[e.OK=0]="OK",e[e.CANCELLED=1]="CANCELLED",e[e.UNKNOWN=2]="UNKNOWN",e[e.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",e[e.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",e[e.NOT_FOUND=5]="NOT_FOUND",e[e.ALREADY_EXISTS=6]="ALREADY_EXISTS",e[e.PERMISSION_DENIED=7]="PERMISSION_DENIED",e[e.UNAUTHENTICATED=16]="UNAUTHENTICATED",e[e.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",e[e.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",e[e.ABORTED=10]="ABORTED",e[e.OUT_OF_RANGE=11]="OUT_OF_RANGE",e[e.UNIMPLEMENTED=12]="UNIMPLEMENTED",e[e.INTERNAL=13]="INTERNAL",e[e.UNAVAILABLE=14]="UNAVAILABLE",e[e.DATA_LOSS=15]="DATA_LOSS"}(wr||(wr={}));var Or,kr,Cr=function(){function e(e){this.comparator=e?function(t,n){return e(t,n)||fe.comparator(t.key,n.key)}:function(e,t){return fe.comparator(e.key,t.key)},this.keyedMap=je(),this.sortedSet=new Oe(this.comparator)}return e.emptySet=function(t){return new e(t.comparator)},e.prototype.has=function(e){return null!=this.keyedMap.get(e)},e.prototype.get=function(e){return this.keyedMap.get(e)},e.prototype.first=function(){return this.sortedSet.minKey()},e.prototype.last=function(){return this.sortedSet.maxKey()},e.prototype.isEmpty=function(){return this.sortedSet.isEmpty()},e.prototype.indexOf=function(e){var t=this.keyedMap.get(e);return t?this.sortedSet.indexOf(t):-1},Object.defineProperty(e.prototype,"size",{get:function(){return this.sortedSet.size},enumerable:!0,configurable:!0}),e.prototype.forEach=function(e){this.sortedSet.inorderTraversal((function(t,n){return e(t),!1}))},e.prototype.add=function(e){var t=this.delete(e.key);return t.copy(t.keyedMap.insert(e.key,e),t.sortedSet.insert(e,null))},e.prototype.delete=function(e){var t=this.get(e);return t?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(t)):this},e.prototype.isEqual=function(t){if(!(t instanceof e))return!1;if(this.size!==t.size)return!1;for(var n=this.sortedSet.getIterator(),r=t.sortedSet.getIterator();n.hasNext();){var o=n.getNext().key,i=r.getNext().key;if(!o.isEqual(i))return!1}return!0},e.prototype.toString=function(){var e=[];return this.forEach((function(t){e.push(t.toString())})),0===e.length?"DocumentSet ()":"DocumentSet (\n "+e.join(" \n")+"\n)"},e.prototype.copy=function(t,n){var r=new e;return r.comparator=this.comparator,r.keyedMap=t,r.sortedSet=n,r},e}();!function(e){e[e.Added=0]="Added",e[e.Removed=1]="Removed",e[e.Modified=2]="Modified",e[e.Metadata=3]="Metadata"}(Or||(Or={})),function(e){e[e.Local=0]="Local",e[e.Synced=1]="Synced"}(kr||(kr={}));var xr,Ar=function(){function e(){this.changeMap=new Oe(fe.comparator)}return e.prototype.track=function(e){var t=e.doc.key,n=this.changeMap.get(t);n?e.type!==Or.Added&&n.type===Or.Metadata?this.changeMap=this.changeMap.insert(t,e):e.type===Or.Metadata&&n.type!==Or.Removed?this.changeMap=this.changeMap.insert(t,{type:n.type,doc:e.doc}):e.type===Or.Modified&&n.type===Or.Modified?this.changeMap=this.changeMap.insert(t,{type:Or.Modified,doc:e.doc}):e.type===Or.Modified&&n.type===Or.Added?this.changeMap=this.changeMap.insert(t,{type:Or.Added,doc:e.doc}):e.type===Or.Removed&&n.type===Or.Added?this.changeMap=this.changeMap.remove(t):e.type===Or.Removed&&n.type===Or.Modified?this.changeMap=this.changeMap.insert(t,{type:Or.Removed,doc:n.doc}):e.type===Or.Added&&n.type===Or.Removed?this.changeMap=this.changeMap.insert(t,{type:Or.Modified,doc:e.doc}):v("unsupported combination of changes: "+JSON.stringify(e)+" after "+JSON.stringify(n)):this.changeMap=this.changeMap.insert(t,e)},e.prototype.getChanges=function(){var e=[];return this.changeMap.inorderTraversal((function(t,n){e.push(n)})),e},e}(),Ir=function(){function e(e,t,n,r,o,i,a,u){this.query=e,this.docs=t,this.oldDocs=n,this.docChanges=r,this.mutatedKeys=o,this.fromCache=i,this.syncStateChanged=a,this.excludesMetadataChanges=u}return e.fromInitialDocuments=function(t,n,r,o){var i=[];
1return n.forEach((function(e){i.push({type:Or.Added,doc:e})})),new e(t,n,Cr.emptySet(n),i,r,o,!0,!1)},Object.defineProperty(e.prototype,"hasPendingWrites",{get:function(){return!this.mutatedKeys.isEmpty()},enumerable:!0,configurable:!0}),e.prototype.isEqual=function(e){if(this.fromCache!==e.fromCache||this.syncStateChanged!==e.syncStateChanged||!this.mutatedKeys.isEqual(e.mutatedKeys)||!this.query.isEqual(e.query)||!this.docs.isEqual(e.docs)||!this.oldDocs.isEqual(e.oldDocs))return!1;var t=this.docChanges,n=e.docChanges;if(t.length!==n.length)return!1;for(var r=0;r<t.length;r++)if(t[r].type!==n[r].type||!t[r].doc.isEqual(n[r].doc))return!1;return!0},e}(),Nr=function(){function e(e,t,n,r,o){this.snapshotVersion=e,this.targetChanges=t,this.targetMismatches=n,this.documentUpdates=r,this.resolvedLimboDocuments=o}return e.createSynthesizedRemoteEventForCurrentChange=function(t,n){var r,o=((r={})[t]=Dr.createSynthesizedTargetChangeForCurrentChange(t,n),r);return new e(Te.MIN,o,qe(),De(),Fe())},e}(),Dr=function(){function e(e,t,n,r,o){this.resumeToken=e,this.current=t,this.addedDocuments=n,this.modifiedDocuments=r,this.removedDocuments=o}return e.createSynthesizedTargetChangeForCurrentChange=function(t,n){return new e(w(),n,Fe(),Fe(),Fe())},e}(),Pr=function(){return function(e,t,n,r){this.updatedTargetIds=e,this.removedTargetIds=t,this.key=n,this.newDoc=r}}(),Rr=function(){return function(e,t){this.targetId=e,this.existenceFilter=t}}();!function(e){e[e.NoChange=0]="NoChange",e[e.Added=1]="Added",e[e.Removed=2]="Removed",e[e.Current=3]="Current",e[e.Reset=4]="Reset"}(xr||(xr={}));var jr=function(){return function(e,t,n,r){void 0===n&&(n=w()),void 0===r&&(r=null),this.state=e,this.targetIds=t,this.resumeToken=n,this.cause=r}}(),Mr=function(){function e(){this.pendingResponses=0,this.documentChanges=Fr(),this._resumeToken=w(),this._current=!1,this._hasPendingChanges=!0}return Object.defineProperty(e.prototype,"current",{get:function(){return this._current},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"resumeToken",{get:function(){return this._resumeToken},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isPending",{get:function(){return 0!==this.pendingResponses},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasPendingChanges",{get:function(){return this._hasPendingChanges},enumerable:!0,configurable:!0}),e.prototype.updateResumeToken=function(e){e.length>0&&(this._hasPendingChanges=!0,this._resumeToken=e)},e.prototype.toTargetChange=function(){var e=Fe(),t=Fe(),n=Fe();
1return this.documentChanges.forEach((function(r,o){switch(o){case Or.Added:e=e.add(r);break;case Or.Modified:t=t.add(r);break;case Or.Removed:n=n.add(r);break;default:v("Encountered invalid change type: "+o)}})),new Dr(this._resumeToken,this._current,e,t,n)},e.prototype.clearPendingChanges=function(){this._hasPendingChanges=!1,this.documentChanges=Fr()},e.prototype.addDocumentChange=function(e,t){this._hasPendingChanges=!0,this.documentChanges=this.documentChanges.insert(e,t)},e.prototype.removeDocumentChange=function(e){this._hasPendingChanges=!0,this.documentChanges=this.documentChanges.remove(e)},e.prototype.recordPendingTargetRequest=function(){this.pendingResponses+=1},e.prototype.recordTargetResponse=function(){this.pendingResponses-=1},e.prototype.markCurrent=function(){this._hasPendingChanges=!0,this._current=!0},e}(),Lr=function(){function e(e){this.metadataProvider=e,this.targetStates={},this.pendingDocumentUpdates=De(),this.pendingDocumentTargetMapping=Ur(),this.pendingTargetResets=new Ae(Y)}return e.prototype.handleDocumentChange=function(e){for(var t=0,n=e.updatedTargetIds;t<n.length;t++){var r=n[t];e.newDoc instanceof zt?this.addDocumentToTarget(r,e.newDoc):e.newDoc instanceof Wt&&this.removeDocumentFromTarget(r,e.key,e.newDoc)}for(var o=0,i=e.removedTargetIds;o<i.length;o++){r=i[o];this.removeDocumentFromTarget(r,e.key,e.newDoc)}},e.prototype.handleTargetChange=function(e){var t=this;this.forEachTarget(e,(function(n){var r=t.ensureTargetState(n);switch(e.state){case xr.NoChange:t.isActiveTarget(n)&&r.updateResumeToken(e.resumeToken);break;case xr.Added:r.recordTargetResponse(),r.isPending||r.clearPendingChanges(),r.updateResumeToken(e.resumeToken);break;case xr.Removed:r.recordTargetResponse(),r.isPending||t.removeTarget(n),g(!e.cause,"WatchChangeAggregator does not handle errored targets");break;case xr.Current:t.isActiveTarget(n)&&(r.markCurrent(),r.updateResumeToken(e.resumeToken));break;case xr.Reset:t.isActiveTarget(n)&&(t.resetTarget(n),r.updateResumeToken(e.resumeToken));break;default:v("Unknown target watch change state: "+e.state)}}))},e.prototype.forEachTarget=function(e,t){e.targetIds.length>0?e.targetIds.forEach(t):k(this.targetStates,t)},e.prototype.handleExistenceFilter=function(e){var t=e.targetId,n=e.existenceFilter.count,r=this.queryDataForActiveTarget(t);if(r){var o=r.query;if(o.isDocumentQuery())if(0===n){var i=new fe(o.path);this.removeDocumentFromTarget(t,i,new Wt(i,Te.forDeletedDoc()))}else g(1===n,"Single document existence filter with count: "+n);else this.getCurrentDocumentCountForTarget(t)!==n&&(this.resetTarget(t),this.pendingTargetResets=this.pendingTargetResets.add(t))}},e.prototype.createRemoteEvent=function(e){var t=this,n={};k(this.targetStates,(function(r,o){var i=t.queryDataForActiveTarget(r);if(i){if(o.current&&i.query.isDocumentQuery()){var a=new fe(i.query.path);null!==t.pendingDocumentUpdates.get(a)||t.targetContainsDocument(r,a)||t.removeDocumentFromTarget(r,a,new Wt(a,e))}o.hasPendingChanges&&(n[r]=o.toTargetChange(),o.clearPendingChanges())}}));var r=Fe();this.pendingDocumentTargetMapping.forEach((function(e,n){var o=!0;n.forEachWhile((function(e){var n=t.queryDataForActiveTarget(e);return!n||n.purpose===_n.LimboResolution||(o=!1,!1)})),o&&(r=r.add(e))}));var o=new Nr(e,n,this.pendingTargetResets,this.pendingDocumentUpdates,r);return this.pendingDocumentUpdates=De(),this.pendingDocumentTargetMapping=Ur(),this.pendingTargetResets=new Ae(Y),o},e.prototype.addDocumentToTarget=function(e,t){if(this.isActiveTarget(e)){var n=this.targetContainsDocument(e,t.key)?Or.Modified:Or.Added;this.ensureTargetState(e).addDocumentChange(t.key,n),this.pendingDocumentUpdates=this.pendingDocumentUpdates.insert(t.key,t),this.pendingDocumentTargetMapping=this.pendingDocumentTargetMapping.insert(t.key,this.ensureDocumentTargetMapping(t.key).add(e))}},e.prototype.removeDocumentFromTarget=function(e,t,n){if(this.isActiveTarget(e)){var r=this.ensureTargetState(e);this.targetContainsDocument(e,t)?r.addDocumentChange(t,Or.Removed):r.removeDocumentChange(t),this.pendingDocumentTargetMapping=this.pendingDocumentTargetMapping.insert(t,this.ensureDocumentTargetMapping(t).delete(e)),n&&(this.pendingDocumentUpdates=this.pendingDocumentUpdates.insert(t,n))}},e.prototype.removeTarget=function(e){delete this.targetStates[e]},e.prototype.getCurrentDocumentCountForTarget=function(e){var t=this.ensureTargetState(e).toTargetChange();return this.metadataProvider.getRemoteKeysForTarget(e).size+t.addedDocuments.size-t.removedDocuments.size},e.prototype.recordPendingTargetRequest=function(e){this.ensureTargetState(e).recordPendingTargetRequest
1()},e.prototype.ensureTargetState=function(e){return this.targetStates[e]||(this.targetStates[e]=new Mr),this.targetStates[e]},e.prototype.ensureDocumentTargetMapping=function(e){var t=this.pendingDocumentTargetMapping.get(e);return t||(t=new Ae(Y),this.pendingDocumentTargetMapping=this.pendingDocumentTargetMapping.insert(e,t)),t},e.prototype.isActiveTarget=function(e){var t=null!==this.queryDataForActiveTarget(e);return t||d("WatchChangeAggregator","Detected inactive target",e),t},e.prototype.queryDataForActiveTarget=function(e){var t=this.targetStates[e];return t&&t.isPending?null:this.metadataProvider.getQueryDataForTarget(e)},e.prototype.resetTarget=function(e){var t=this;g(!this.targetStates[e].isPending,"Should only reset active targets"),this.targetStates[e]=new Mr,this.metadataProvider.getRemoteKeysForTarget(e).forEach((function(n){t.removeDocumentFromTarget(e,n,null)}))},e.prototype.targetContainsDocument=function(e,t){return this.metadataProvider.getRemoteKeysForTarget(e).has(t)},e}();function Ur(){return new Oe(fe.comparator)}function Fr(){return new Oe(fe.comparator)}var Br="RemoteStore",qr=function(){function e(e,t,n,r,o){var i=this;this.localStore=e,this.datastore=t,this.writePipeline=[],this.listenTargets={},this.watchChangeAggregator=null,this.networkEnabled=!1,this.isPrimary=!1,this.connectivityMonitor=o,this.connectivityMonitor.addCallback((function(e){n.enqueueAndForget((function(){return u.__awaiter(i,void 0,void 0,(function(){return u.__generator(this,(function(e){switch(e.label){case 0:return this.canUseNetwork()?(d(Br,"Restarting streams for network reachability change."),[4,this.restartNetwork()]):[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}
1))}))}))})),this.onlineStateTracker=new Er(n,r),this.watchStream=this.datastore.newPersistentWatchStream({onOpen:this.onWatchStreamOpen.bind(this),onClose:this.onWatchStreamClose.bind(this),onWatchChange:this.onWatchStreamChange.bind(this)}),this.writeStream=this.datastore.newPersistentWriteStream({onOpen:this.onWriteStreamOpen.bind(this),onClose:this.onWriteStreamClose.bind(this),onHandshakeComplete:this.onWriteHandshakeComplete.bind(this),onMutationResult:this.onMutationResult.bind(this)})}return e.prototype.start=function(){return this.enableNetwork()},e.prototype.enableNetwork=function(){return u.__awaiter(this,void 0,void 0,(function(){var e;return u.__generator(this,(function(t){switch(t.label){case 0:return this.networkEnabled=!0,this.canUseNetwork()?(e=this.writeStream,[4,this.localStore.getLastStreamToken()]):[3,3];case 1:return e.lastStreamToken=t.sent(),this.shouldStartWatchStream()?this.startWatchStream():this.onlineStateTracker.set(pr.Unknown),[4,this.fillWritePipeline()];case 2:t.sent(),t.label=3;case 3:return[2]}}
1))}))},e.prototype.disableNetwork=function(){return u.__awaiter(this,void 0,void 0,(function(){return u.__generator(this,(function(e){switch(e.label){case 0:return this.networkEnabled=!1,[4,this.disableNetworkInternal()];case 1:return e.sent(),this.onlineStateTracker.set(pr.Offline),[2]}}))}))},e.prototype.disableNetworkInternal=function(){return u.__awaiter(this,void 0,void 0,(function(){return u.__generator(this,(function(e){switch(e.label){case 0:return[4,this.writeStream.stop()];case 1:return e.sent(),[4,this.watchStream.stop()];case 2:return e.sent(),this.writePipeline.length>0&&(d(Br,"Stopping write stream with "+this.writePipeline.length+" pending writes"),this.writePipeline=[]),this.cleanUpWatchStreamState(),[2]}}))}))},e.prototype.shutdown=function(){return u.__awaiter(this,void 0,void 0,(function(){return u.__generator(this,(function(e){switch(e.label){case 0:return d(Br,"RemoteStore shutting down."),this.networkEnabled=!1,[4,this.disableNetworkInternal()];case 1:return e.sent(),this.connectivityMonitor.shutdown(),this.onlineStateTracker.set(pr.Unknown),[2]}}))}))},e.prototype.listen=function(e){g(!T(this.listenTargets,e.targetId),"listen called with duplicate targetId!"),this.listenTargets[e.targetId]=e,this.shouldStartWatchStream()?this.startWatchStream():this.watchStream.isOpen()&&this.sendWatchRequest(e)},e.prototype.unlisten=function(e){g(T(this.listenTargets,e),"unlisten called without assigned target ID!"),delete this.listenTargets[e],this.watchStream.isOpen()&&this.sendUnwatchRequest(e),x(this.listenTargets)&&(this.watchStream.isOpen()?this.watchStream.markIdle():this.canUseNetwork()&&this.onlineStateTracker.set(pr.Unknown))},e.prototype.getQueryDataForTarget=function(e){return this.listenTargets[e]||null},e.prototype.getRemoteKeysForTarget=function(e){return this.syncEngine.getRemoteKeysForTarget(e)},e.prototype.sendWatchRequest=function(e){this.watchChangeAggregator.recordPendingTargetRequest(e.targetId),this.watchStream.watch(e)},e.prototype.sendUnwatchRequest=function(e){this.watchChangeAggregator.recordPendingTargetRequest(e),this.watchStream.unwatch(e)},e.prototype.startWatchStream=function(){g(this.shouldStartWatchStream(),"startWatchStream() called when shouldStartWatchStream() is false."),this.watchChangeAggregator=new Lr(this),this.watchStream.start(),this.onlineStateTracker.handleWatchStreamStart()},e.prototype.shouldStartWatchStream=function(){return this.canUseNetwork()&&!this.watchStream.isStarted()&&!x(this.listenTargets)},e.prototype.canUseNetwork=function(){return this.isPrimary&&this.networkEnabled},e.prototype.cleanUpWatchStreamState=function(){this.watchChangeAggregator=null},e.prototype.onWatchStreamOpen=function(){return u.__awaiter(this,void 0,void 0,(function(){var e=this;return u.__generator(this,(function(t){return k(this.listenTargets,(function(t,n){e.sendWatchRequest(n)})),[2]}))}))},e.prototype.onWatchStreamClose=function(e){return u.__awaiter(this,void 0,void 0,(function(){return u.__generator(this,(function(t){return void 0===e&&g(!this.shouldStartWatchStream(),"Watch stream was stopped gracefully while still needed."),this.cleanUpWatchStreamState(),this.shouldStartWatchStream()?(this.onlineStateTracker.handleWatchStreamFailure(e),this.startWatchStream()):this.onlineStateTracker.set(pr.Unknown),[2]}))}
1))},e.prototype.onWatchStreamChange=function(e,t){return u.__awaiter(this,void 0,void 0,(function(){var n;return u.__generator(this,(function(r){switch(r.label){case 0:return this.onlineStateTracker.set(pr.Online),e instanceof jr&&e.state===xr.Removed&&e.cause?[2,this.handleTargetError(e)]:(e instanceof Pr?this.watchChangeAggregator.handleDocumentChange(e):e instanceof Rr?this.watchChangeAggregator.handleExistenceFilter(e):(g(e instanceof jr,"Expected watchChange to be an instance of WatchTargetChange"),this.watchChangeAggregator.handleTargetChange(e)),t.isEqual(Te.MIN)?[3,3]:[4,this.localStore.getLastRemoteSnapshotVersion()]);case 1:return n=r.sent(),t.compareTo(n)>=0?[4,this.raiseWatchSnapshot(t)]:[3,3];case 2:r.sent(),r.label=3;case 3:return[2]}}))}))},e.prototype.raiseWatchSnapshot=function(e){var t=this;g(!e.isEqual(Te.MIN),"Can't raise event for unknown SnapshotVersion");var n=this.watchChangeAggregator.createRemoteEvent(e);return k(n.targetChanges,(function(n,r){if(r.resumeToken.length>0){var o=t.listenTargets[n];o&&(t.listenTargets[n]=o.withResumeToken(r.resumeToken,e))}})),n.targetMismatches.forEach((function(e){var n=t.listenTargets[e];if(n){t.listenTargets[e]=n.withResumeToken(w(),n.snapshotVersion),t.sendUnwatchRequest(e);var r=new kn(n.query,e,_n.ExistenceFilterMismatch,n.sequenceNumber);t.sendWatchRequest(r)}})),this.syncEngine.applyRemoteEvent(n)},e.prototype.handleTargetError=function(e){var t=this;g(!!e.cause,"Handling target error without a cause");var n=e.cause,r=Promise.resolve();return e.targetIds.forEach((function(e){r=r.then((function(){return u.__awaiter(t,void 0,void 0,(function(){return u.__generator(this,(function(t){return T(this.listenTargets,e)?(delete this.listenTargets[e],this.watchChangeAggregator.removeTarget(e),[2,this.syncEngine.rejectListen(e,n)]):[2]}))}))}))})),r},e.prototype.fillWritePipeline=function(){return u.__awaiter(this,void 0,void 0,(function(){var e,t;return u.__generator(this,(function(n){switch(n.label){case 0:return this.canAddToWritePipeline()?(e=this.writePipeline.length>0?this.writePipeline[this.writePipeline.length-1].batchId:-1,[4,this.localStore.nextMutationBatch(e)]):[3,4];case 1:return null!==(t=n.sent())?[3,2]:(0===this.writePipeline.length&&this.writeStream.markIdle(),[3,4]);case 2:return this.addToWritePipeline(t),[4,this.fillWritePipeline()];case 3:n.sent(),n.label=4;case 4:return this.shouldStartWriteStream()&&this.startWriteStream(),[2]}}))}))},e.prototype.canAddToWritePipeline=function(){return this.canUseNetwork()&&this.writePipeline.length<10},e.prototype.outstandingWrites=function(){return this.writePipeline.length},e.prototype.addToWritePipeline=function(e){g(this.canAddToWritePipeline(),"addToWritePipeline called when pipeline is full"),this.writePipeline.push(e),this.writeStream.isOpen()&&this.writeStream.handshakeComplete&&this.writeStream.writeMutations(e.mutations)},e.prototype.shouldStartWriteStream=function(){return this.canUseNetwork()&&!this.writeStream.isStarted()&&this.writePipeline.length>0},e.prototype.startWriteStream=function(){g(this.shouldStartWriteStream(),"startWriteStream() called when shouldStartWriteStream() is false."),this.writeStream.start()},e.prototype.onWriteStreamOpen=function(){return u.__awaiter(this,void 0,void 0,(function(){return u.__generator(this,(function(e){return this.writeStream.writeHandshake(),[2]}))}))},e.prototype.onWriteHandshakeComplete=function(){var e=this;return this.localStore.setLastStreamToken(this.writeStream.lastStreamToken).then((function(){for(var t=0,n=e.writePipeline;t<n.length;t++){var r=n[t];e.writeStream.writeMutations(r.mutations)}})).catch(Bn)},e.prototype.onMutationResult=function(e,t){var n=this;g(this.writePipeline.length>0,"Got result for empty write pipeline");var r=this.writePipeline.shift(),o=ze.from(r,e,t,this.writeStream.lastStreamToken);return this.syncEngine.applySuccessfulWrite(o).then((function(){return n.fillWritePipeline()}))},e.prototype.onWriteStreamClose=function(e){return u.__awaiter(this,void 0,void 0,(function(){var t=this;return u.__generator(this,(function(n){return void 0===e&&g(!this.shouldStartWriteStream(),"Write stream was stopped gracefully while still needed."),e&&this.writePipeline.length>0?(void 0,[2,(this.writeStream.handshakeComplete?this.handleWriteError(e):this.handleHandshakeError(e)).then((function(){t.shouldStartWriteStream()&&t.startWriteStream()}))]):[2]}))}))},e.prototype.handleHandshakeError=function(e){return u.__awaiter(this,void 0,void 0,(function(){return u.__generator(this,(function(t){return _r(e.code)?(d(Br,"RemoteStore error before completed handshake; resetting stream token: ",this.writeStream.lastStreamToken),this.writeStream.lastStreamToken=w(),[2,this.localStore.setLastStreamToken(w()).catch(Bn)]):[2]}))}))},e.prototype.handleWriteError=function(e){return u.__awaiter(this,void 0,void 0,(function(){var t,n=this;return u.__generator(this,(function(r){return _r(o=e.code)&&o!==E.ABORTED?(t=this.writePipeline.shift(),this.writeStream.inhibitBackoff(),[2,this.syncEngine.rejectFailedWrite(t.batchId,e).then((function(){return n.fillWritePipeline()}))]):[2];var o}))}))},e.prototype.createTransaction=function(){return new br(this.datastore)},e.prototype.restartNetwork=function(){return u.__awaiter(this,void 0,void 0,(function(){return u.__generator(this,(function(e){switch(e.label){case 0:return this.networkEnabled=!1,[4,this.disableNetworkInternal()];case 1:return e.sent(),this.onlineStateTracker.set(pr.Unknown),[4,this.enableNetwork()];case 2:return e.sent(),[2]}}))}))},e.prototype.handleCredentialChange=function(){return u.__awaiter(this,void 0,void 0,(function(){return u.__generator(this,(function(e){switch(e.label){case 0:return this.canUseNetwork()?(d(Br,"RemoteStore restarting streams for new credential"),[4,this.restartNetwork()]):[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}
1))}))},e.prototype.applyPrimaryState=function(e){return u.__awaiter(this,void 0,void 0,(function(){return u.__generator(this,(function(t){switch(t.label){case 0:return this.isPrimary=e,e&&this.networkEnabled?[4,this.enableNetwork()]:[3,2];case 1:return t.sent(),[3,4];case 2:return e?[3,4]:[4,this.disableNetworkInternal()];case 3:t.sent(),this.onlineStateTracker.set(pr.Unknown),t.label=4;case 4:return[2]}}))}))},e}(),Vr=function(){function e(e,t){if(I("GeoPoint",arguments,2),P("GeoPoint","number",1,e),P("GeoPoint","number",2,t),!isFinite(e)||e<-90||e>90)throw new _(E.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(t)||t<-180||t>180)throw new _(E.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+t);this._lat=e,this._long=t}return Object.defineProperty(e.prototype,"latitude",{get:function(){return this._lat},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"longitude",{get:function(){return this._long},enumerable:!0,configurable:!0}),e.prototype.isEqual=function(e){return this._lat===e._lat&&this._long===e._long},e.prototype._compareTo=function(e){return Y(this._lat,e._lat)||Y(this._long,e._long)},e}(),zr=function(){function e(e,t,n,r,o,i,a){void 0===t&&(t=null),void 0===n&&(n=[]),void 0===r&&(r=[]),void 0===o&&(o=null),void 0===i&&(i=null),void 0===a&&(a=null),this.path=e,this.collectionGroup=t,this.explicitOrderBy=n,this.filters=r,this.limit=o,this.startAt=i,this.endAt=a,this.memoizedCanonicalId=null,this.memoizedOrderBy=null,this.startAt&&this.assertValidBound(this.startAt),this.endAt&&this.assertValidBound(this.endAt)}return e.atPath=function(t){return new e(t)},Object.defineProperty(e.prototype,"orderBy",{get:function(){if(null===this.memoizedOrderBy){var e=this.getInequalityFilterField(),t=this.getFirstOrderByField();if(null!==e&&null===t)e.isKeyField()?this.memoizedOrderBy=[to]:this.memoizedOrderBy=[new eo(e),to];else{g(null===e||null!==t&&e.isEqual(t),"First orderBy should match inequality field."),this.memoizedOrderBy=[];for(var n=!1,r=0,o=this.explicitOrderBy;r<o.length;r++){var i=o[r];this.memoizedOrderBy.push(i),i.field.isKeyField()&&(n=!0)}if(!n){var a=this.explicitOrderBy.length>0?this.explicitOrderBy[this.explicitOrderBy.length-1].dir:Jr.ASCENDING;this.memoizedOrderBy.push(a===Jr.ASCENDING?to:no)}}}return this.memoizedOrderBy},enumerable:!0,configurable:!0}),e.prototype.addFilter=function(t){g(null==this.getInequalityFilterField()||!(t instanceof Gr)||!t.isInequality()||t.field.isEqual(this.getInequalityFilterField()),"Query must only have one inequality field."),g(!this.isDocumentQuery(),"No filtering allowed for document query");var n=this.filters.concat([t]);return new e(this.path,this.collectionGroup,this.explicitOrderBy.slice(),n,this.limit,this.startAt,this.endAt)},e.prototype.addOrderBy=function(t){g(!this.startAt&&!this.endAt,"Bounds must be set after orderBy");var n=this.explicitOrderBy.concat([t]);return new e(this.path,this.collectionGroup,n,this.filters.slice(),this.limit,this.startAt,this.endAt)},e.prototype.withLimit=function(t){return new e(this.path,this.collectionGroup,this.explicitOrderBy.slice(),this.filters.slice(),t,this.startAt,this.endAt)},e.prototype.withStartAt=function(t){return new e(this.path,this.collectionGroup,this.explicitOrderBy.slice(),this.filters.slice(),this.limit,t,this.endAt)},e.prototype.withEndAt=function(t){return new e(this.path,this.collectionGroup,this.explicitOrderBy.slice(),this.filters.slice(),this.limit,this.startAt,t)},e.prototype.asCollectionQueryAtPath=function(t){return new e(t,null,this.explicitOrderBy.slice(),this.filters.slice(),this.limit,this.startAt,this.endAt)},e.prototype.canonicalId=function(){if(null===this.memoizedCanonicalId){var e=this.path.canonicalString();this.isCollectionGroupQuery()&&(e+="|cg:"+this.collectionGroup),e+="|f:";for(var t=0,n=this.filters;t<n.length;t++){e+=n[t].canonicalId(),e+=","}e+="|ob:";for(var r=0,o=this.orderBy;r<o.length;r++){e+=o[r].canonicalId(),e+=","}ar(this.limit)||(e+="|l:",e+=this.limit),this.startAt&&(e+="|lb:",e+=this.startAt.canonicalId()),this.endAt&&(e+="|ub:",e+=this.endAt.canonicalId()),this.memoizedCanonicalId=e}return this.memoizedCanonicalId}
1,e.prototype.toString=function(){var e="Query("+this.path.canonicalString();return this.isCollectionGroupQuery()&&(e+=" collectionGroup="+this.collectionGroup),this.filters.length>0&&(e+=", filters: ["+this.filters.join(", ")+"]"),ar(this.limit)||(e+=", limit: "+this.limit),this.explicitOrderBy.length>0&&(e+=", orderBy: ["+this.explicitOrderBy.join(", ")+"]"),this.startAt&&(e+=", startAt: "+this.startAt.canonicalId()),this.endAt&&(e+=", endAt: "+this.endAt.canonicalId()),e+")"},e.prototype.isEqual=function(e){if(this.limit!==e.limit)return!1;if(this.orderBy.length!==e.orderBy.length)return!1;for(var t=0;t<this.orderBy.length;t++)if(!this.orderBy[t].isEqual(e.orderBy[t]))return!1;if(this.filters.length!==e.filters.length)return!1;for(t=0;t<this.filters.length;t++)if(!this.filters[t].isEqual(e.filters[t]))return!1;return this.collectionGroup===e.collectionGroup&&(!!this.path.isEqual(e.path)&&(!(null!==this.startAt?!this.startAt.isEqual(e.startAt):null!==e.startAt)&&(null!==this.endAt?this.endAt.isEqual(e.endAt):null===e.endAt)))},e.prototype.docComparator=function(e,t){for(var n=!1,r=0,o=this.orderBy;r<o.length;r++){var i=o[r],a=i.compare(e,t);if(0!==a)return a;n=n||i.field.isKeyField()}return g(n,"orderBy used that doesn't compare on key field"),0},e.prototype.matches=function(e){return this.matchesPathAndCollectionGroup(e)&&this.matchesOrderBy(e)&&this.matchesFilters(e)&&this.matchesBounds(e)},e.prototype.hasLimit=function(){return!ar(this.limit)},e.prototype.getFirstOrderByField=function(){return this.explicitOrderBy.length>0?this.explicitOrderBy[0].field:null},e.prototype.getInequalityFilterField=function(){for(var e=0,t=this.filters;e<t.length;e++){var n=t[e];if(n instanceof Gr&&n.isInequality())return n.field}return null},e.prototype.findFilterOperator=function(e){for(var t=0,n=this.filters;t<n.length;t++){var r=n[t];if(r instanceof Gr&&e.indexOf(r.op)>=0)return r.op}return null},e.prototype.isDocumentQuery=function(){return fe.isDocumentKey(this.path)&&null===this.collectionGroup&&0===this.filters.length},e.prototype.isCollectionGroupQuery=function(){return null!==this.collectionGroup},e.prototype.matchesPathAndCollectionGroup=function(e){var t=e.key.path;return null!==this.collectionGroup?e.key.hasCollectionId(this.collectionGroup)&&this.path.isPrefixOf(t):fe.isDocumentKey(this.path)?this.path.isEqual(t):this.path.isImmediateParentOf(t)},e.prototype.matchesOrderBy=function(e){for(var t=0,n=this.explicitOrderBy;t<n.length;t++){var r=n[t];if(!r.field.isKeyField()&&null===e.field(r.field))return!1}return!0},e.prototype.matchesFilters=function(e){for(var t=0,n=this.filters;t<n.length;t++){if(!n[t].matches(e))return!1}return!0},e.prototype.matchesBounds=function(e){return!(this.startAt&&!this.startAt.sortsBeforeDocument(this.orderBy,e))&&(!this.endAt||!this.endAt.sortsBeforeDocument(this.orderBy,e))},e.prototype.assertValidBound=function(e){g(e.position.length<=this.orderBy.length,"Bound is longer than orderBy")},e}(),Wr=function(){return function(){}}(),Qr=function(){function e(e){this.name=e}return e.fromString=function(t){switch(t){case"<":return e.LESS_THAN;case"<=":return e.LESS_THAN_OR_EQUAL;case"==":return e.EQUAL;case">=":return e.GREATER_THAN_OR_EQUAL;case">":return e.GREATER_THAN;case"array-contains":return e.ARRAY_CONTAINS;case"in":return e.IN;case"array-contains-any":return e.ARRAY_CONTAINS_ANY;default:return v("Unknown FieldFilter operator: "+t)}},e.prototype.toString=function(){return this.name},e.prototype.isEqual=function(e){return this.name===e.name},e.LESS_THAN=new e("<"),e.LESS_THAN_OR_EQUAL=new e("<="),e.EQUAL=new e("=="),e.GREATER_THAN=new e(">"),e.GREATER_THAN_OR_EQUAL=new e(">="),e.ARRAY_CONTAINS=new e("array-contains"),e.IN=new e("in"),e.ARRAY_CONTAINS_ANY=new e("array-contains-any"),e}(),Gr=function(e){function t(t,n,r){var o=e.call(this)||this;return o.field=t,o.op=n,o.value=r,o}return u.__extends(t,e),t.create=function(e,n,r){if(e.isKeyField())return n===Qr.IN?(g(r instanceof qt,"Comparing on key with IN, but filter value not an ArrayValue"),g(r.internalValue.every((function(e){return e instanceof Ut})),"Comparing on key with IN, but an array value was not a RefValue"),new Hr(e,r)):(g(r instanceof Ut,"Comparing on key, but filter value not a RefValue"),g(n!==Qr.ARRAY_CONTAINS&&n!==Qr.ARRAY_CONTAINS_ANY,"'"+n.toString()+"' queries don't make sense on document keys."),new Kr(e,n,r));if(r.isEqual(xt.INSTANCE)){if(n!==Qr.EQUAL)throw new _(E.INVALID_ARGUMENT,"Invalid query. Null supports only equality comparisons.");return new t(e,n,r)}if(r.isEqual(Pt.NAN)){if(n!==Qr.EQUAL)throw new _(E.INVALID_ARGUMENT,"Invalid query. NaN supports only equality comparisons.");return new t(e,n,r)}return n===Qr.ARRAY_CONTAINS?new Yr(e,r):n===Qr.IN?(g(r instanceof qt,"IN filter has invali
1d value: "+r.toString()),new $r(e,r)):n===Qr.ARRAY_CONTAINS_ANY?(g(r instanceof qt,"ARRAY_CONTAINS_ANY filter has invalid value: "+r.toString()),new Xr(e,r)):new t(e,n,r)},t.prototype.matches=function(e){var t=e.field(this.field);return null!==t&&this.value.typeOrder===t.typeOrder&&this.matchesComparison(t.compareTo(this.value))},t.prototype.matchesComparison=function(e){switch(this.op){case Qr.LESS_THAN:return e<0;case Qr.LESS_THAN_OR_EQUAL:return e<=0;case Qr.EQUAL:return 0===e;case Qr.GREATER_THAN:return e>0;case Qr.GREATER_THAN_OR_EQUAL:return e>=0;default:return v("Unknown FieldFilter operator: "+this.op)}},t.prototype.isInequality=function(){return[Qr.LESS_THAN,Qr.LESS_THAN_OR_EQUAL,Qr.GREATER_THAN,Qr.GREATER_THAN_OR_EQUAL].indexOf(this.op)>=0},t.prototype.canonicalId=function(){return this.field.canonicalString()+this.op.toString()+this.value.toString()},t.prototype.isEqual=function(e){return e instanceof t&&(this.op.isEqual(e.op)&&this.field.isEqual(e.field)&&this.value.isEqual(e.value))},t.prototype.toString=function(){return this.field.canonicalString()+" "+this.op+" "+this.value.value()},t}(Wr),Kr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u.__extends(t,e),t.prototype.matches=function(e){var t=this.value,n=fe.comparator(e.key,t.key);return this.matchesComparison(n)},t}(Gr),Hr=function(e){function t(t,n){var r=e.call(this,t,Qr.IN,n)||this;return r.value=n,r}return u.__extends(t,e),t.prototype.matches=function(e){return this.value.internalValue.some((function(t){return e.key.isEqual(t.key)}))},t}(Gr),Yr=function(e){function t(t,n){return e.call(this,t,Qr.ARRAY_CONTAINS,n)||this}return u.__extends(t,e),t.prototype.matches=function(e){var t=e.field(this.field);return t instanceof qt&&t.contains(this.value)},t}(Gr),$r=function(e){function t(t,n){var r=e.call(this,t,Qr.IN,n)||this;return r.value=n,r}return u.__extends(t,e),t.prototype.matches=function(e){var t=this.value,n=e.field(this.field);return null!==n&&t.contains(n)},t}(Gr),Xr=function(e){function t(t,n){var r=e.call(this,t,Qr.ARRAY_CONTAINS_ANY,n)||this;return r.value=n,r}return u.__extends(t,e),t.prototype.matches=function(e){var t=this,n=e.field(this.field);return n instanceof qt&&n.internalValue.some((function(e){return t.value.contains(e)}))},t}(Gr),Jr=function(){function e(e){this.name=e}return e.prototype.toString=function(){return this.name},e.ASCENDING=new e("asc"),e.DESCENDING=new e("desc"),e}(),Zr=function(){function e(e,t){this.position=e,this.before=t}return e.prototype.canonicalId=function(){for(var e=this.before?"b:":"a:",t=0,n=this.position;t<n.length;t++){e+=n[t].toString()}return e},e.prototype.sortsBeforeDocument=function(e,t){g(this.position.length<=e.length,"Bound has more components than query's orderBy");for(var n=0,r=0;r<this.position.length;r++){var o=e[r],i=this.position[r];if(o.field.isKeyField())g(i instanceof Ut,"Bound has a non-key value where the key path is being used."),n=fe.comparator(i.key,t.key);else{var a=t.field(o.field);g(null!==a,"Field should exist since document matched the orderBy already."),n=i.compareTo(a)}if(o.dir===Jr.DESCENDING&&(n*=-1),0!==n)break}return this.before?n<=0:n<0},e.prototype.isEqual=function(e){if(null===e)return!1;if(this.before!==e.before||this.position.length!==e.position.length)return!1;for(var t=0;t<this.position.length;t++){var n=this.position[t],r=e.position[t];if(!n.isEqual(r))return!1}return!0},e}(),eo=function(){function e(e,t){this.field=e,void 0===t&&(t=Jr.ASCENDING),this.dir=t,this.isKeyOrderBy=e.isKeyField()}return e.prototype.compare=function(e,t){var n=this.isKeyOrderBy?zt.compareByKey(e,t):zt.compareByField(this.field,e,t);switch(this.dir){case Jr.ASCENDING:return n;case Jr.DESCENDING:return-1*n;default:return v("Unknown direction: "+this.dir)}},e.prototype.canonicalId=function(){return this.field.canonicalString()+this.dir.toString()},e.prototype.toString=function(){return this.field.canonicalString()+" ("+this.dir+")"},e.prototype.isEqual=function(e){return this.dir===e.dir&&this.field.isEqual(e.field)},e}(),to=new eo(le.keyField(),Jr.ASCENDING),no=new eo(le.keyField(),Jr.DESCENDING),ro=function(){function e(){}return e.prototype.applyToLocalView=function(e,t){return new Mt(t,e)},e.prototype.applyToRemoteDocument=function(e,t){return t},e.prototype.computeBaseValue=function(e){return null},e.prototype.isEqual=function(t){return t instanceof e},e.instance=new e,e}(),oo=function(){function e(e){this.elements=e}return e.prototype.applyToLocalView=function(e,t){return this.apply(e)},e.prototype.applyToRemoteDocument=function(e,t){return this.apply(e)},e.prototype.apply=function(e){for(var t=uo(e),n=function(e){t.find((function(t){return t.isEqual(e)}
1))||t.push(e)},r=0,o=this.elements;r<o.length;r++){n(o[r])}return new qt(t)},e.prototype.computeBaseValue=function(e){return null},e.prototype.isEqual=function(t){return t instanceof e&&$(t.elements,this.elements)},e}(),io=function(){function e(e){this.elements=e}return e.prototype.applyToLocalView=function(e,t){return this.apply(e)},e.prototype.applyToRemoteDocument=function(e,t){return this.apply(e)},e.prototype.apply=function(e){for(var t=uo(e),n=function(e){t=t.filter((function(t){return!t.isEqual(e)}))},r=0,o=this.elements;r<o.length;r++){n(o[r])}return new qt(t)},e.prototype.computeBaseValue=function(e){return null},e.prototype.isEqual=function(t){return t instanceof e&&$(t.elements,this.elements)},e}(),ao=function(){function e(e){this.operand=e}return e.prototype.applyToLocalView=function(e,t){var n=this.computeBaseValue(e);if(n instanceof Dt&&this.operand instanceof Dt){var r=n.internalValue+this.operand.internalValue;return new Dt(r)}r=n.internalValue+this.operand.internalValue;return new Pt(r)},e.prototype.applyToRemoteDocument=function(e,t){return g(null!==t,"Didn't receive transformResult for NUMERIC_ADD transform"),t},e.prototype.computeBaseValue=function(e){return e instanceof It?e:new Dt(0)},e.prototype.isEqual=function(t){return t instanceof e&&this.operand.isEqual(t.operand)},e}();function uo(e){return e instanceof qt?e.internalValue.slice():[]}var so=function(){function e(e){this.count=e}return e.prototype.isEqual=function(e){return e&&e.count===this.count},e}(),co=function(){var e={};return e[Jr.ASCENDING.name]="ASCENDING",e[Jr.DESCENDING.name]="DESCENDING",e}(),lo=function(){var e={};return e[Qr.LESS_THAN.name]="LESS_THAN",e[Qr.LESS_THAN_OR_EQUAL.name]="LESS_THAN_OR_EQUAL",e[Qr.GREATER_THAN.name]="GREATER_THAN",e[Qr.GREATER_THAN_OR_EQUAL.name]="GREATER_THAN_OR_EQUAL",e[Qr.EQUAL.name]="EQUAL",e[Qr.ARRAY_CONTAINS.name]="ARRAY_CONTAINS",e[Qr.IN.name]="IN",e[Qr.ARRAY_CONTAINS_ANY.name]="ARRAY_CONTAINS_ANY",e}(),fo=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function ho(e,t){g(!ar(e),t+" is missing")}function po(e){return"number"===typeof e?e:"string"===typeof e?Number(e):v("can't parse "+e)}var mo=function(){function e(e,t){this.databaseId=e,this.options=t}return e.prototype.emptyByteString=function(){return this.options.useProto3Json?"":new Uint8Array(0)},e.prototype.unsafeCastProtoByteString=function(e){return e},e.prototype.fromRpcStatus=function(e){var t=void 0===e.code?E.UNKNOWN:Sr(e.code);return new _(t,e.message||"")},e.prototype.toInt32Value=function(e){return ar(e)?void 0:{value:e}},e.prototype.fromInt32Value=function(e){var t;return ar(t="object"===typeof e?e.value:e)?null:t},e.prototype.toTimestamp=function(e){return{seconds:""+e.seconds,nanos:e.nanoseconds}},e.prototype.fromTimestamp=function(e){if("string"===typeof e)return this.fromIso8601String(e);g(!!e,"Cannot deserialize null or undefined timestamp.");var t=po(e.seconds||"0"),n=e.nanos||0;return new Se(t,n)},e.prototype.fromIso8601String=function(e){var t=0,n=fo.exec(e);if(g(!!n,"invalid timestamp: "+e),n[1]){var r=n[1];r=(r+"000000000").substr(0,9),t=Number(r)}var o=new Date(e),i=Math.floor(o.getTime()/1e3);return new Se(i,t)},e.prototype.toBytes=function(e){return this.options.useProto3Json?e.toBase64():this.unsafeCastProtoByteString(e.toUint8Array())},e.prototype.fromBlob=function(e){return"string"===typeof e?(g(this.options.useProto3Json,"Expected bytes to be passed in as Uint8Array, but got a string instead."),te.fromBase64String(e)):(g(!this.options.useProto3Json,"Expected bytes to be passed in as Uint8Array, but got a string instead."),te.fromUint8Array(e))},e.prototype.toVersion=function(e){return this.toTimestamp(e.toTimestamp())},e.prototype.fromVersion=function(e){return g(!!e,"Trying to deserialize version that isn't set"),Te.fromTimestamp(this.fromTimestamp(e))},e.prototype.toResourceName=function(e,t){return this.fullyQualifiedPrefixPath(e).child("documents").child(t).canonicalString()},e.prototype.fromResourceName=function(e){var t=se.fromString(e);return g(this.isValidResourceName(t),"Tried to deserialize invalid key "+t.toString()),t},e.prototype.toName=function(e){return this.toResourceName(this.databaseId,e.path)},e.prototype.fromName=function(e){var t=this.fromResourceName(e);return g(t.get(1)===this.databaseId.projectId,"Tried to deserialize key from different project: "+t.get(1)+" vs "+this.databaseId.projectId),g(!t.get(3)&&!this.databaseId.database||t.get(3)===this.databaseId.database,"Tried to deserialize key from different database: "+t.get(3)+" vs "+this.databaseId.database),new fe(this.extractLocalPathFromResourceName(t))},e.prototype.toQueryPath=function(e){return this.toResourceName(this.databaseId,e)},e.prototype.fromQueryPath=function(e){var t=this.fromResourceName(e);return 4===t.length?se.EMPTY_PATH:this.extractLocalPathFromResourceName(t)},Object.defineProperty(e.prototype,"encodedDatabaseId",{get:function(){return new se(["projects",this.databaseId.projectId,"databases",this.databaseId.database]).canonicalString()},enumerable:!0,configurable:!0}),e.prototype.fullyQualifiedPrefixPath=function(e){return new se(["projects",e.projectId,"databases",e.database])},e.prototype.extractLocalPathFromResourceName=function(e){return g(e.length>4&&"documents"===e.get(4),"tried to deserialize invalid key "+e.toString()),e.popFirst(5)},e.prototype.isValidResourceName=function(e){return e.length>=4&&"projects"===e.get(0)&&"databases"===e.get(2)},e.prototype.toValue=function(e){if(e instanceof xt)return{nullValue:"NULL_VALUE"};if(e instanceof At)return{booleanValue:e.value()};if(e instanceof Dt)return{integerValue:""+e.value()};if(e instanceof Pt){var t=e.value();if(this.options.useProto3Json){if(isNaN(t))return{doubleValue:"NaN"};if(t===1/0)return{doubleValue:"Infinity"};if(t===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:e.value()}}return e instanceof Rt?{stringValue:e.value()}:e instanceof Bt?{mapValue:this.toMapValue(e)}:e instanceof qt?{arrayValue:this.toArrayValue(e)}
1:e instanceof jt?{timestampValue:this.toTimestamp(e.internalValue)}:e instanceof Ft?{geoPointValue:{latitude:e.value().latitude,longitude:e.value().longitude}}:e instanceof Lt?{bytesValue:this.toBytes(e.value())}:e instanceof Ut?{referenceValue:this.toResourceName(e.databaseId,e.key.path)}:v("Unknown FieldValue "+JSON.stringify(e))},e.prototype.fromValue=function(e){var t=this;if("nullValue"in e)return xt.INSTANCE;if("booleanValue"in e)return At.of(e.booleanValue);if("integerValue"in e)return new Dt(po(e.integerValue));if("doubleValue"in e){if(this.options.useProto3Json){if("NaN"===e.doubleValue)return Pt.NAN;if("Infinity"===e.doubleValue)return Pt.POSITIVE_INFINITY;if("-Infinity"===e.doubleValue)return Pt.NEGATIVE_INFINITY}return new Pt(e.doubleValue)}if("stringValue"in e)return new Rt(e.stringValue);if("mapValue"in e)return this.fromFields(e.mapValue.fields||{});if("arrayValue"in e){ho(e.arrayValue,"arrayValue");var n=e.arrayValue.values||[];return new qt(n.map((function(e){return t.fromValue(e)})))}if("timestampValue"in e)return ho(e.timestampValue,"timestampValue"),new jt(this.fromTimestamp(e.timestampValue));if("geoPointValue"in e){ho(e.geoPointValue,"geoPointValue");var r=e.geoPointValue.latitude||0,o=e.geoPointValue.longitude||0;return new Ft(new Vr(r,o))}if("bytesValue"in e){ho(e.bytesValue,"bytesValue");var i=this.fromBlob(e.bytesValue);return new Lt(i)}if("referenceValue"in e){ho(e.referenceValue,"referenceValue");var a=this.fromResourceName(e.referenceValue),u=new ie(a.get(1),a.get(3)),s=new fe(this.extractLocalPathFromResourceName(a));return new Ut(u,s)}return v("Unknown Value proto "+JSON.stringify(e))},e.prototype.toMutationDocument=function(e,t){return{name:this.toName(e),fields:this.toFields(t)}},e.prototype.toDocument=function(e){return g(!e.hasLocalMutations,"Can't serialize documents with mutations."),{name:this.toName(e.key),fields:this.toFields(e.data()),updateTime:this.toTimestamp(e.version.toTimestamp())}},e.prototype.fromDocument=function(e,t){var n=this,r=this.fromName(e.name),o=this.fromVersion(e.updateTime);return new zt(r,o,{hasCommittedMutations:!!t},void 0,e,(function(e){return n.fromValue(e)}))},e.prototype.toFields=function(e){var t=this,n={};return e.forEach((function(e,r){n[e]=t.toValue(r)})),n},e.prototype.fromFields=function(e){var t=this,n=e,r=Bt.EMPTY;return C(n,(function(e,n){r=r.set(new le([e]),t.fromValue(n))})),r},e.prototype.toMapValue=function(e){return{fields:this.toFields(e)}},e.prototype.toArrayValue=function(e){var t=this,n=[];return e.forEach((function(e){n.push(t.toValue(e))})),{values:n}},e.prototype.fromFound=function(e){var t=this;g(!!e.found,"Tried to deserialize a found document from a missing document."),ho(e.found.name,"doc.found.name"),ho(e.found.updateTime,"doc.found.updateTime");var n=this.fromName(e.found.name),r=this.fromVersion(e.found.updateTime);return new zt(n,r,{},void 0,e.found,(function(e){return t.fromValue(e)}))},e.prototype.fromMissing=function(e){g(!!e.missing,"Tried to deserialize a missing document from a found document."),g(!!e.readTime,"Tried to deserialize a missing document without a read time.");var t=this.fromName(e.missing),n=this.fromVersion(e.readTime);return new Wt(t,n)},e.prototype.fromMaybeDocument=function(e){return"found"in e?this.fromFound(e):"missing"in e?this.fromMissing(e):v("invalid batch get response: "+JSON.stringify(e))},e.prototype.toWatchTargetChangeState=function(e){switch(e){case xr.Added:return"ADD";case xr.Current:return"CURRENT";case xr.NoChange:return"NO_CHANGE";case xr.Removed:return"REMOVE";case xr.Reset:return"RESET";default:return v("Unknown WatchTargetChangeState: "+e)}},e.prototype.toTestWatchChange=function(e){if(e instanceof Rr)return{filter:{count:e.existenceFilter.count,targetId:e.targetId}};if(e instanceof Pr){if(e.newDoc instanceof zt){var t=e.newDoc;return{documentChange:{document:{name:this.toName(t.key),fields:this.toFields(t.data()),updateTime:this.toVersion(t.version)},targetIds:e.updatedTargetIds,removedTargetIds:e.removedTargetIds}}}if(e.newDoc instanceof Wt){t=e.newDoc;return{documentDelete:{document:this.toName(t.key),readTime:this.toVersion(t.version),removedTargetIds:e.removedTargetIds}}}if(null===e.newDoc)return{documentRemove:{document:this.toName(e.key),removedTargetIds:e.removedTargetIds}}}if(e instanceof jr){var n=void 0;return e.cause&&(n={code:Tr(e.cause.code),message:e.cause.message}),{targetChange:{targetChangeType:this.toWatchTargetChangeState(e.state),targetIds:e.targetIds,resumeToken:this.unsafeCastProtoByteString(e.resumeToken),cause:n}}}
1return v("Unrecognized watch change: "+JSON.stringify(e))},e.prototype.fromWatchChange=function(e){var t,n=this;if("targetChange"in e){ho(e.targetChange,"targetChange");var r=this.fromWatchTargetChangeState(e.targetChange.targetChangeType||"NO_CHANGE"),o=e.targetChange.targetIds||[],i=e.targetChange.resumeToken||this.emptyByteString(),a=e.targetChange.cause,u=a&&this.fromRpcStatus(a);t=new jr(r,o,i,u||null)}else if("documentChange"in e){ho(e.documentChange,"documentChange"),ho(e.documentChange.document,"documentChange.name"),ho(e.documentChange.document.name,"documentChange.document.name"),ho(e.documentChange.document.updateTime,"documentChange.document.updateTime");var s=e.documentChange,c=this.fromName(s.document.name),l=this.fromVersion(s.document.updateTime),f=new zt(c,l,{},void 0,s.document,(function(e){return n.fromValue(e)})),h=s.targetIds||[],p=s.removedTargetIds||[];t=new Pr(h,p,f.key,f)}else if("documentDelete"in e){ho(e.documentDelete,"documentDelete"),ho(e.documentDelete.document,"documentDelete.document");var d=e.documentDelete;c=this.fromName(d.document),l=d.readTime?this.fromVersion(d.readTime):Te.forDeletedDoc(),f=new Wt(c,l),p=d.removedTargetIds||[];t=new Pr([],p,f.key,f)}else if("documentRemove"in e){ho(e.documentRemove,"documentRemove"),ho(e.documentRemove.document,"documentRemove");var m=e.documentRemove;c=this.fromName(m.document),p=m.removedTargetIds||[];t=new Pr([],p,c,null)}else{if(!("filter"in e))return v("Unknown change type "+JSON.stringify(e));ho(e.filter,"filter"),ho(e.filter.targetId,"filter.targetId");var y=e.filter,g=y.count||0,b=new so(g),w=y.targetId;t=new Rr(w,b)}return t},e.prototype.fromWatchTargetChangeState=function(e){return"NO_CHANGE"===e?xr.NoChange:"ADD"===e?xr.Added:"REMOVE"===e?xr.Removed:"CURRENT"===e?xr.Current:"RESET"===e?xr.Reset:v("Got unexpected TargetChange.state: "+e)},e.prototype.versionFromListenResponse=function(e){if(!("targetChange"in e))return Te.MIN;var t=e.targetChange;return t.targetIds&&t.targetIds.length?Te.MIN:t.readTime?this.fromVersion(t.readTime):Te.MIN},e.prototype.toMutation=function(e){var t,n=this;if(e instanceof _t)t={update:this.toMutationDocument(e.key,e.value)};else if(e instanceof Ot)t={delete:this.toName(e.key)};else if(e instanceof St)t={update:this.toMutationDocument(e.key,e.data),updateMask:this.toDocumentMask(e.fieldMask)};else{if(!(e instanceof Tt))return v("Unknown mutation type "+e.type);t={transform:{document:this.toName(e.key),fieldTransforms:e.fieldTransforms.map((function(e){return n.toFieldTransform(e)}))}}}return e.precondition.isNone||(t.currentDocument=this.toPrecondition(e.precondition)),t},e.prototype.fromMutation=function(e){var t=this,n=e.currentDocument?this.fromPrecondition(e.currentDocument):wt.NONE;if(e.update){ho(e.update.name,"name");var r=this.fromName(e.update.name),o=this.fromFields(e.update.fields||{});if(e.updateMask){var i=this.fromDocumentMask(e.updateMask);return new St(r,o,i,n)}return new _t(r,o,n)}if(e.delete){r=this.fromName(e.delete);return new Ot(r,n)}if(e.transform){r=this.fromName(e.transform.document);var a=e.transform.fieldTransforms.map((function(e){return t.fromFieldTransform(e)}));return g(!0===n.exists,'Transforms only support precondition "exists == true"'),new Tt(r,a)}return v("unknown mutation proto: "+JSON.stringify(e))},e.prototype.toPrecondition=function(e){return g(!e.isNone,"Can't serialize an empty precondition"),void 0!==e.updateTime?{updateTime:this.toVersion(e.updateTime)}:void 0!==e.exists?{exists:e.exists}:v("Unknown precondition")},e.prototype.fromPrecondition=function(e){return void 0!==e.updateTime?wt.updateTime(this.fromVersion(e.updateTime)):void 0!==e.exists?wt.exists(e.exists):wt.NONE},e.prototype.fromWriteResult=function(e,t){var n=this,r=e.updateTime?this.fromVersion(e.updateTime):this.fromVersion(t),o=null;return e.transformResults&&e.transformResults.length>0&&(o=e.transformResults.map((function(e){return n.fromValue(e)}))),new vt(r,o)},e.prototype.fromWriteResults=function(e,t){var n=this;return e&&e.length>0?(g(void 0!==t,"Received a write result without a commit time"),e.map((function(e){return n.fromWriteResult(e,t)}))):[]},e.prototype.toFieldTransform=function(e){var t=this,n=e.transform;if(n instanceof ro)return{fieldPath:e.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(n instanceof oo)return{fieldPath:e.field.canonicalString(),appendMissingElements:{values:n.elements.map((function(e){return t.toValue(e)}))}};if(n instanceof io)return{fieldPath:e.field.canonicalString(),removeAllFromArray:{values:n.elements.map((function(e){return t.toValue(e)}))}};if(n instanceof ao)return{fieldPath:e.field.canonicalString(),increment:this.toValue(n.operand)};
1throw v("Unknown transform: "+e.transform)},e.prototype.fromFieldTransform=function(e){var t=this,n=null;if("setToServerValue"in e)g("REQUEST_TIME"===e.setToServerValue,"Unknown server value transform proto: "+JSON.stringify(e)),n=ro.instance;else if("appendMissingElements"in e){var r=e.appendMissingElements.values||[];n=new oo(r.map((function(e){return t.fromValue(e)})))}else if("removeAllFromArray"in e){r=e.removeAllFromArray.values||[];n=new io(r.map((function(e){return t.fromValue(e)})))}else if("increment"in e){var o=this.fromValue(e.increment);g(o instanceof It,"NUMERIC_ADD transform requires a NumberValue"),n=new ao(o)}else v("Unknown transform proto: "+JSON.stringify(e));var i=le.fromServerFormat(e.fieldPath);return new yt(i,n)},e.prototype.toDocumentsTarget=function(e){return{documents:[this.toQueryPath(e.path)]}},e.prototype.fromDocumentsTarget=function(e){var t=e.documents.length;g(1===t,"DocumentsTarget contained other than 1 document: "+t);var n=e.documents[0];return zr.atPath(this.fromQueryPath(n))},e.prototype.toQueryTarget=function(e){var t={structuredQuery:{}},n=e.path;null!==e.collectionGroup?(g(n.length%2===0,"Collection Group queries should be within a document path or root."),t.parent=this.toQueryPath(n),t.structuredQuery.from=[{collectionId:e.collectionGroup,allDescendants:!0}]):(g(n.length%2!==0,"Document queries with filters are not supported."),t.parent=this.toQueryPath(n.popLast()),t.structuredQuery.from=[{collectionId:n.lastSegment()}]);var r=this.toFilter(e.filters);r&&(t.structuredQuery.where=r);var o=this.toOrder(e.orderBy);o&&(t.structuredQuery.orderBy=o);var i=this.toInt32Value(e.limit);return void 0!==i&&(t.structuredQuery.limit=i),e.startAt&&(t.structuredQuery.startAt=this.toCursor(e.startAt)),e.endAt&&(t.structuredQuery.endAt=this.toCursor(e.endAt)),t},e.prototype.fromQueryTarget=function(e){var t=this.fromQueryPath(e.parent),n=e.structuredQuery,r=n.from?n.from.length:0,o=null;if(r>0){g(1===r,"StructuredQuery.from with more than one collection is not supported.");var i=n.from[0];i.allDescendants?o=i.collectionId:t=t.child(i.collectionId)}var a=[];n.where&&(a=this.fromFilter(n.where));var u=[];n.orderBy&&(u=this.fromOrder(n.orderBy));var s=null;n.limit&&(s=this.fromInt32Value(n.limit));var c=null;n.startAt&&(c=this.fromCursor(n.startAt));var l=null;return n.endAt&&(l=this.fromCursor(n.endAt)),new zr(t,o,u,a,s,c,l)},e.prototype.toListenRequestLabels=function(e){var t=this.toLabel(e.purpose);return null==t?null:{"goog-listen-tags":t}},e.prototype.toLabel=function(e){switch(e){case _n.Listen:return null;case _n.ExistenceFilterMismatch:return"existence-filter-mismatch";case _n.LimboResolution:return"limbo-document";default:return v("Unrecognized query purpose: "+e)}},e.prototype.toTarget=function(e){var t,n=e.query;return(t=n.isDocumentQuery()?{documents:this.toDocumentsTarget(n)}:{query:this.toQueryTarget(n)}).targetId=e.targetId,e.resumeToken.length>0&&(t.resumeToken=this.unsafeCastProtoByteString(e.resumeToken)),t},e.prototype.toFilter=function(e){var t=this;if(0!==e.length){var n=e.map((function(e){return e instanceof Gr?t.toUnaryOrFieldFilter(e):v("Unrecognized filter: "+JSON.stringify(e))}));return 1===n.length?n[0]:{compositeFilter:{op:"AND",filters:n}}}},e.prototype.fromFilter=function(e){var t=this;return e?void 0!==e.unaryFilter?[this.fromUnaryFilter(e)]:void 0!==e.fieldFilter?[this.fromFieldFilter(e)]:void 0!==e.compositeFilter?e.compositeFilter.filters.map((function(e){return t.fromFilter(e)})).reduce((function(e,t){return e.concat(t)})):v("Unknown filter: "+JSON.stringify(e)):[]},e.prototype.toOrder=function(e){var t=this;if(0!==e.length)return e.map((function(e){return t.toPropertyOrder(e)}))},e.prototype.fromOrder=function(e){var t=this;return e.map((function(e){return t.fromPropertyOrder(e)}))},e.prototype.toCursor=function(e){var t=this;return{before:e.before,values:e.position.map((function(e){return t.toValue(e)}))}},e.prototype.fromCursor=function(e){var t=this,n=!!e.before,r=e.values.map((function(e){return t.fromValue(e)}));return new Zr(r,n)},e.prototype.toDirection=function(e){return co[e.name]},e.prototype.fromDirection=function(e){switch(e){case"ASCENDING":return Jr.ASCENDING;case"DESCENDING":return Jr.DESCENDING;default:return}},e.prototype.toOperatorName=function(e){return lo[e.name]},e.prototype.fromOperatorName=function(e){switch(e){case"EQUAL":return Qr.EQUAL;case"GREATER_THAN":return Qr.GREATER_THAN;case"GREATER_THAN_OR_EQUAL":return Qr.GREATER_THAN_OR_EQUAL;case"LESS_THAN":return Qr.LESS_THAN;case"LESS_THAN_OR_EQUAL":return Qr.LESS_THAN_OR_EQUAL;case"ARRAY_CONTAINS":return Qr.ARRAY_CONTAINS;case"IN":return Qr.IN;case"ARRAY_CONTAINS_ANY":return Qr.ARRAY_CONTAINS_ANY;case"OPERATOR_UNSPECIFIED":return v("Unspecified operator");default:return v("Unknown operator")}},e.prototype.toFieldPathReference=function(e){return{fieldPath:e.canonicalString()}},e.prototype.fromFieldPathReference=function(e){return le.fromServerFormat(e.fieldPath)},e.prototype.toPropertyOrder=function(e){return{field:this.toFieldPathReference(e.field),direction:this.toDirection(e.dir)}},e.prototype.fromPropertyOrder=function(e){return new eo(this.fromFieldPathReference(e.field),this.fromDirection(e.direction))},e.prototype.fromFieldFilter=function(e){return Gr.create(this.fromFieldPathReference(e.fieldFilter.field),this.fromOperatorName(e.fieldFilter.op),this.fromValue(e.fieldFilter.value))},e.prototype.toUnaryOrFieldFilter=function(e){if(e.op===Qr.EQUAL){if(e.value.isEqual(Pt.NAN))return{unaryFilter:{field:this.toFieldPathReference(e.field),op:"IS_NAN"}};if(e.value.isEqual(xt.INSTANCE))return{unaryFilter:{field:this.toFieldPathReference(e.field),op:"IS_NULL"}}}return{fieldFilter:{field:this.toFieldPathReference(e.field),op:this.toOperatorName(e.op),value:this.toValue(e.value)}}},e.prototype.fromUnaryFilter=function(e){switch(e.unaryFilter.op){case"IS_NAN":var t=this.fromFieldPathReference(e.unaryFilter.field);return Gr.create(t,Qr.EQUAL,Pt.NAN);case"IS_NULL":var n=this.fromFieldPathReference(e.unaryFilter.field);return Gr.create(n,Qr.EQUAL,xt.INSTANCE);case"OPERATOR_UNSPECIFIED":return v("Unspecified filter");default:return v("Unknown filter")}},e.prototype.toDocumentMask=function(e){var t=[];return e.fields.forEach((function(e){return t.push(e.canonicalString())})),{fieldPaths:t}},e.prototype.fromDocumentMask=function(e){var t=(e.fieldPaths||[]).map((function(e){return le.fromServerFormat(e)}));return mt.fromArray(t)},e}(),yo=function(){return function(){this.viewSnap=null,this.targetId=0,this.listeners=[]}}(),vo=function(){function e(e){this.syncEngine=e,this.queries=new Gt((function(e){return e.canonicalId()})),this.onlineState=pr.Unknown,this.snapshotsInSyncListeners=new Set,this.syncEngine.subscribe(this)}return e.prototype.listen=function(e){var t=e.query,n=!1,r=this.queries.get(t);(r||(n=!0,r=new yo,this.queries.set(t,r)),r.listeners.push(e),g(!e.applyOnlineStateChange(this.onlineState),"applyOnlineStateChange() shouldn't raise an event for brand-new listeners."),r.viewSnap)&&(e.onViewSnapsh
1ot(r.viewSnap)&&this.raiseSnapshotsInSyncEvent());return n?this.syncEngine.listen(t).then((function(e){return r.targetId=e,e})):Promise.resolve(r.targetId)},e.prototype.unlisten=function(e){return u.__awaiter(this,void 0,void 0,(function(){var t,n,r,o;return u.__generator(this,(function(i){return t=e.query,n=!1,(r=this.queries.get(t))&&(o=r.listeners.indexOf(e))>=0&&(r.listeners.splice(o,1),n=0===r.listeners.length),n?(this.queries.delete(t),[2,this.syncEngine.unlisten(t)]):[2]}))}))},e.prototype.onWatchChange=function(e){for(var t=!1,n=0,r=e;n<r.length;n++){var o=r[n],i=o.query,a=this.queries.get(i);if(a){for(var u=0,s=a.listeners;u<s.length;u++){s[u].onViewSnapshot(o)&&(t=!0)}a.viewSnap=o}}t&&this.raiseSnapshotsInSyncEvent()},e.prototype.onWatchError=function(e,t){var n=this.queries.get(e);if(n)for(var r=0,o=n.listeners;r<o.length;r++){o[r].onError(t)}this.queries.delete(e)},e.prototype.onOnlineStateChange=function(e){this.onlineState=e;var t=!1;this.queries.forEach((function(n,r){for(var o=0,i=r.listeners;o<i.length;o++){i[o].applyOnlineStateChange(e)&&(t=!0)}})),t&&this.raiseSnapshotsInSyncEvent()},e.prototype.addSnapshotsInSyncListener=function(e){this.snapshotsInSyncListeners.add(e),e.next()},e.prototype.removeSnapshotsInSyncListener=function(e){this.snapshotsInSyncListeners.delete(e)},e.prototype.raiseSnapshotsInSyncEvent=function(){this.snapshotsInSyncListeners.forEach((function(e){e.next()}))},e}(),go=function(){function e(e,t,n){this.query=e,this.queryObserver=t,this.raisedInitialEvent=!1,this.snap=null,this.onlineState=pr.Unknown,this.options=n||{}}return e.prototype.onViewSnapshot=function(e){if(g(e.docChanges.length>0||e.syncStateChanged,"We got a new snapshot with no changes?"),!this.options.includeMetadataChanges){for(var t=[],n=0,r=e.docChanges;n<r.length;n++){var o=r[n];o.type!==Or.Metadata&&t.push(o)}e=new Ir(e.query,e.docs,e.oldDocs,t,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0)}var i=!1;return this.raisedInitialEvent?this.shouldRaiseEvent(e)&&(this.queryObserver.next(e),i=!0):this.shouldRaiseInitialEvent(e,this.onlineState)&&(this.raiseInitialEvent(e),i=!0),this.snap=e,i},e.prototype.onError=function(e){this.queryObserver.error(e)},e.prototype.applyOnlineStateChange=function(e){this.onlineState=e;var t=!1;return this.snap&&!this.raisedInitialEvent&&this.shouldRaiseInitialEvent(this.snap,e)&&(this.raiseInitialEvent(this.snap),t=!0),t},e.prototype.shouldRaiseInitialEvent=function(e,t){if(g(!this.raisedInitialEvent,"Determining whether to raise first event but already had first event"),!e.fromCache)return!0;var n=t!==pr.Offline;return this.options.waitForSyncWhenOnline&&n?(g(e.fromCache,"Waiting for sync, but snapshot is not from cache"),!1):!e.docs.isEmpty()||t===pr.Offline},e.prototype.shouldRaiseEvent=function(e){if(e.docChanges.length>0)return!0;var t=this.snap&&this.snap.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!t)&&!0===this.options.includeMetadataChanges},e.prototype.raiseInitialEvent=function(e){g(!this.raisedInitialEvent,"Trying to raise initial events for second time"),e=Ir.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache),this.raisedInitialEvent=!0,this.queryObserver.next(e)},e}(),bo=function(){function e(e,t,n){this.targetId=e,this.addedKeys=t,this.removedKeys=n}return e.fromSnapshot=function(t,n){for(var r=Fe(),o=Fe(),i=0,a=n.docChanges;i<a.length;i++){var u=a[i];switch(u.type){case Or.Added:r=r.add(u.doc.key);break;case Or.Removed:o=o.add(u.doc.key)}}return new e(t,r,o)},e}(),wo=function(){return function(e){this.key=e}}(),Eo=function(){return function(e){this.key=e}}(),_o=function(){function e(e,t){this.query=e,this._syncedDocuments=t,this.syncState=null,this.current=!1,this.limboDocuments=Fe(),this.mutatedKeys=Fe(),this.documentSet=new Cr(e.docComparator.bind(e))}return Object.defineProperty(e.prototype,"syncedDocuments",{get:function(){return this._syncedDocuments},enumerable:!0,configurable:!0}),e.prototype.computeDocChanges=function(e,t){var n=this,r=t?t.changeSet:new Ar,o=t?t.documentSet:this.documentSet,i=t?t.mutatedKeys:this.mutatedKeys,a=o,u=!1,s=this.query.hasLimit()&&o.size===this.query.limit?o.last():null;if(e.inorderTraversal((function(e,t){var c=o.get(e),l=t instanceof zt?t:null;l&&(g(e.isEqual(l.key),"Mismatching keys found in document changes: "+e+" != "+l.key),l=n.query.matches(l)?l:null);var f=!!c&&n.mutatedKeys.has(c.key),h=!!l&&(l.hasLocalMutations||n.mutatedKeys.has(l.key)&&l.hasCommittedMutations),p=!1;
1c&&l?c.data().isEqual(l.data())?f!==h&&(r.track({type:Or.Metadata,doc:l}),p=!0):n.shouldWaitForSyncedDocument(c,l)||(r.track({type:Or.Modified,doc:l}),p=!0,s&&n.query.docComparator(l,s)>0&&(u=!0)):!c&&l?(r.track({type:Or.Added,doc:l}),p=!0):c&&!l&&(r.track({type:Or.Removed,doc:c}),p=!0,s&&(u=!0));p&&(l?(a=a.add(l),i=h?i.add(e):i.delete(e)):(a=a.delete(e),i=i.delete(e)))})),this.query.hasLimit())for(;a.size>this.query.limit;){var c=a.last();a=a.delete(c.key),i=i.delete(c.key),r.track({type:Or.Removed,doc:c})}return g(!u||!t,"View was refilled using docs that themselves needed refilling."),{documentSet:a,changeSet:r,needsRefill:u,mutatedKeys:i}},e.prototype.shouldWaitForSyncedDocument=function(e,t){return e.hasLocalMutations&&t.hasCommittedMutations&&!t.hasLocalMutations},e.prototype.applyChanges=function(e,t,n){var r=this;g(!e.needsRefill,"Cannot apply changes that need a refill");var o=this.documentSet;this.documentSet=e.documentSet,this.mutatedKeys=e.mutatedKeys;var i=e.changeSet.getChanges();i.sort((function(e,t){return function(e,t){var n=function(e){switch(e){case Or.Added:return 1;case Or.Modified:case Or.Metadata:return 2;case Or.Removed:return 0;default:return v("Unknown ChangeType: "+e)}};return n(e)-n(t)}(e.type,t.type)||r.query.docComparator(e.doc,t.doc)})),this.applyTargetChange(n);var a=t?this.updateLimboDocuments():[],u=0===this.limboDocuments.size&&this.current?kr.Synced:kr.Local,s=u!==this.syncState;return this.syncState=u,0!==i.length||s?{snapshot:new Ir(this.query,e.documentSet,o,i,e.mutatedKeys,u===kr.Local,s,!1),limboChanges:a}:{limboChanges:a}},e.prototype.applyOnlineStateChange=function(e){return this.current&&e===pr.Offline?(this.current=!1,this.applyChanges({documentSet:this.documentSet,changeSet:new Ar,mutatedKeys:this.mutatedKeys,needsRefill:!1},!1)):{limboChanges:[]}},e.prototype.shouldBeInLimbo=function(e){return!this._syncedDocuments.has(e)&&(!!this.documentSet.has(e)&&!this.documentSet.get(e).hasLocalMutations)},e.prototype.applyTargetChange=function(e){var t=this;e&&(e.addedDocuments.forEach((function(e){return t._syncedDocuments=t._syncedDocuments.add(e)})),e.modifiedDocuments.forEach((function(e){return g(t._syncedDocuments.has(e),"Modified document "+e+" not found in view.")})),e.removedDocuments.forEach((function(e){return t._syncedDocuments=t._syncedDocuments.delete(e)})),this.current=e.current)},e.prototype.updateLimboDocuments=function(){var e=this;if(!this.current)return[];var t=this.limboDocuments;this.limboDocuments=Fe(),this.documentSet.forEach((function(t){e.shouldBeInLimbo(t.key)&&(e.limboDocuments=e.limboDocuments.add(t.key))}));var n=[];return t.forEach((function(t){e.limboDocuments.has(t)||n.push(new Eo(t))})),this.limboDocuments.forEach((function(e){t.has(e)||n.push(new wo(e))})),n},e.prototype.synchronizeWithPersistedState=function(e,t){this._syncedDocuments=t,this.limboDocuments=Fe();var n=this.computeDocChanges(e);return this.applyChanges(n,!0)},e.prototype.computeInitialSnapshot=function(){return Ir.fromInitialDocuments(this.query,this.documentSet,this.mutatedKeys,this.syncState===kr.Local)},e}();var So=5,To=function(){function e(e,t,n,r){this.asyncQueue=e,this.remoteStore=t,this.updateFunction=n,this.deferred=r,this.retries=So,this.backoff=new hr(this.asyncQueue,ee.RetryTransaction)}return e.prototype.run=function(){this.runWithBackOff()},e.prototype.runWithBackOff=function(){var e=this;this.backoff.backoffAndRun((function(){return u.__awaiter(e,void 0,void 0,(function(){var e,t,n=this;return u.__generator(this,(function(r){return e=this.remoteStore.createTransaction(),(t=this.tryRunUpdateFunction(e))&&t.then((function(t){n.asyncQueue.enqueueAndForget((function(){return e.commit().then((function(){n.deferred.resolve(t)})).catch((function(e){n.handleTransactionError(e)}))}))})).catch((function(e){n.handleTransactionError(e)})),[2]}))}))}))},e.prototype.tryRunUpdateFunction=function(e){try{var t=this.updateFunction(e);return!ar(t)&&t.catch&&t.then?t:(this.deferred.reject(Error("Transaction callback must return a Promise")),null)}catch(m){return this.deferred.reject(m),null}},e.prototype.handleTransactionError=function(e){var t=this;this.retries>0&&this.isRetryableTransactionError(e)?(this.retries-=1,this.asyncQueue.enqueueAndForget((function(){return t.runWithBackOff(),Promise.resolve()}))):this.deferred.reject(e)},e.prototype.isRetryableTransactionError=function(e){if("FirebaseError"===e.name){var t=e.code;return"aborted"===t||"failed-precondition"===t||!_r(t)}return!1},e}(),Oo=function(){return function(e,t,n){this.query=e,this.targetId=t,this.view=n}}(),ko=function(){return function(e){this.key=e,this.receivedDocument=!1}}(),Co=function(){function e(e,t,n,r){this.localStore=e,this.remoteStore=t,this.sharedCl
1ientState=n,this.currentUser=r,this.syncEngineListener=null,this.queryViewsByQuery=new Gt((function(e){return e.canonicalId()})),this.queryViewsByTarget={},this.limboTargetsByKey=new Oe(fe.comparator),this.limboResolutionsByTarget={},this.limboDocumentRefs=new Gn,this.mutationUserCallbacks={},this.pendingWritesCallbacks=new Map,this.limboTargetIdGenerator=et.forSyncEngine(),this.isPrimary=void 0,this.onlineState=pr.Unknown}return Object.defineProperty(e.prototype,"isPrimaryClient",{get:function(){return!0===this.isPrimary},enumerable:!0,configurable:!0}),e.prototype.subscribe=function(e){g(null!==e,"SyncEngine listener cannot be null"),g(null===this.syncEngineListener,"SyncEngine already has a subscriber."),this.syncEngineListener=e},e.prototype.listen=function(e){return u.__awaiter(this,void 0,void 0,(function(){var t,n,r,o,i;return u.__generator(this,(function(a){switch(a.label){case 0:return this.assertSubscribed("listen()"),(r=this.queryViewsByQuery.get(e))?(t=r.targetId,this.sharedClientState.addLocalQueryTarget(t),n=r.view.computeInitialSnapshot(),[3,4]):[3,1];case 1:return[4,this.localStore.allocateQuery(e)];case 2:return o=a.sent(),i=this.sharedClientState.addLocalQueryTarget(o.targetId),t=o.targetId,[4,this.initializeViewAndComputeSnapshot(o,"current"===i)];case 3:n=a.sent(),this.isPrimary&&this.remoteStore.listen(o),a.label=4;case 4:return this.syncEngineListener.onWatchChange([n]),[2,t]}}))}))},e.prototype.initializeViewAndComputeSnapshot=function(e,t){return u.__awaiter(this,void 0,void 0,(function(){var n,r,o,i,a,s,c,l;return u.__generator(this,(function(u){switch(u.label){case 0:return n=e.query,[4,this.localStore.executeQuery(n)];case 1:return r=u.sent(),[4,this.localStore.remoteDocumentKeys(e.targetId)];case 2:return o=u.sent(),i=new _o(n,o),a=i.computeDocChanges(r),s=Dr.createSynthesizedTargetChangeForCurrentChange(e.targetId,t&&this.onlineState!==pr.Offline),g(0===(c=i.applyChanges(a,!0===this.isPrimary,s)).limboChanges.length,"View returned limbo docs before target ack from the server."),g(!!c.snapshot,"applyChanges for new view should always return a snapshot"),l=new Oo(n,e.targetId,i),this.queryViewsByQuery.set(n,l),this.queryViewsByTarget[e.targetId]=l,[2,c.snapshot]}}))}))},e.prototype.synchronizeViewAndComputeSnapshot=function(e){return u.__awaiter(this,void 0,void 0,(function(){var t,n,r;return u.__generator(this,(function(o){switch(o.label){case 0:return[4,this.localStore.executeQuery(e.query)];case 1:return t=o.sent(),[4,this.localStore.remoteDocumentKeys(e.targetId)];case 2:return n=o.sent(),r=e.view.synchronizeWithPersistedState(t,n),this.isPrimary&&this.updateTrackedLimbos(e.targetId,r.limboChanges),[2,r]}}))}))},e.prototype.unlisten=function(e){return u.__awaiter(this,void 0,void 0,(function(){var t,n=this;return u.__generator(this,(function(r){switch(r.label){case 0:return this.assertSubscribed("unlisten()"),g(!!(t=this.queryViewsByQuery.get(e)),"Trying to unlisten on query not found:"+e),this.isPrimary?(this.sharedClientState.removeLocalQueryTarget(t.targetId),this.sharedClientState.isActiveQueryTarget(t.targetId)?[3,2]:[4,this.localStore.releaseQuery(e,!1).then((function(){n.sharedClientState.clearQueryState(t.targetId),n.remoteStore.unlisten(t.targetId),n.removeAndCleanupQuery(t)})).catch(Bn)]):[3,3];case 1:r.sent(),r.label=2;case 2:return[3,5];case 3:return this.removeAndCleanupQuery(t),[4,this.localStore.releaseQuery(e,!0)];case 4:r.sent(),r.label=5;case 5:return[2]}}
1))}))},e.prototype.write=function(e,t){return u.__awaiter(this,void 0,void 0,(function(){var n;return u.__generator(this,(function(r){switch(r.label){case 0:return this.assertSubscribed("write()"),[4,this.localStore.localWrite(e)];case 1:return n=r.sent(),this.sharedClientState.addPendingMutation(n.batchId),this.addMutationCallback(n.batchId,t),[4,this.emitNewSnapsAndNotifyLocalStore(n.changes)];case 2:return r.sent(),[4,this.remoteStore.fillWritePipeline()];case 3:return r.sent(),[2]}}))}))},e.prototype.runTransaction=function(e,t,n){new To(e,this.remoteStore,t,n).run()},e.prototype.applyRemoteEvent=function(e){return u.__awaiter(this,void 0,void 0,(function(){var t,n=this;return u.__generator(this,(function(r){switch(r.label){case 0:this.assertSubscribed("applyRemoteEvent()"),r.label=1;case 1:return r.trys.push([1,4,,6]),[4,this.localStore.applyRemoteEvent(e)];case 2:return t=r.sent(),C(e.targetChanges,(function(e,t){var r=n.limboResolutionsByTarget[Number(e)];r&&(g(t.addedDocuments.size+t.modifiedDocuments.size+t.removedDocuments.size<=1,"Limbo resolution for single document contains multiple changes."),t.addedDocuments.size>0?r.receivedDocument=!0:t.modifiedDocuments.size>0?g(r.receivedDocument,"Received change for limbo target document without add."):t.removedDocuments.size>0&&(g(r.receivedDocument,"Received remove for limbo target document without add."),r.receivedDocument=!1))})),[4,this.emitNewSnapsAndNotifyLocalStore(t,e)];case 3:return r.sent(),[3,6];case 4:return[4,Bn(r.sent())];case 5:return r.sent(),[3,6];case 6:return[2]}}
1))}))},e.prototype.applyOnlineStateChange=function(e,t){if(this.isPrimary&&t===dr.RemoteStore||!this.isPrimary&&t===dr.SharedClientState){this.assertSubscribed("applyOnlineStateChange()");var n=[];this.queryViewsByQuery.forEach((function(t,r){var o=r.view.applyOnlineStateChange(e);g(0===o.limboChanges.length,"OnlineState should not affect limbo documents."),o.snapshot&&n.push(o.snapshot)})),this.syncEngineListener.onOnlineStateChange(e),this.syncEngineListener.onWatchChange(n),this.onlineState=e,this.isPrimary&&this.sharedClientState.setOnlineState(e)}},e.prototype.rejectListen=function(e,t){return u.__awaiter(this,void 0,void 0,(function(){var n,r,o,i,a,s,c=this;return u.__generator(this,(function(u){switch(u.label){case 0:return this.assertSubscribed("rejectListens()"),this.sharedClientState.updateQueryState(e,"rejected",t),n=this.limboResolutionsByTarget[e],(r=n&&n.key)?(this.limboTargetsByKey=this.limboTargetsByKey.remove(r),delete this.limboResolutionsByTarget[e],o=(o=new Oe(fe.comparator)).insert(r,new Wt(r,Te.forDeletedDoc())),i=Fe().add(r),a=new Nr(Te.MIN,{},new Ae(Y),o,i),[2,this.applyRemoteEvent(a)]):[3,1];case 1:return g(!!(s=this.queryViewsByTarget[e]),"Unknown targetId: "+e),[4,this.localStore.releaseQuery(s.query,!1).then((function(){return c.removeAndCleanupQuery(s)})).catch(Bn)];case 2:u.sent(),this.syncEngineListener.onWatchError(s.query,t),u.label=3;case 3:return[2]}}
1))}))},e.prototype.applyBatchState=function(e,t,n){return u.__awaiter(this,void 0,void 0,(function(){var r;return u.__generator(this,(function(o){switch(o.label){case 0:return this.assertSubscribed("applyBatchState()"),[4,this.localStore.lookupMutationDocuments(e)];case 1:return null===(r=o.sent())?(d("SyncEngine","Cannot apply mutation batch with id: "+e),[2]):"pending"!==t?[3,3]:[4,this.remoteStore.fillWritePipeline()];case 2:return o.sent(),[3,4];case 3:"acknowledged"===t||"rejected"===t?(this.processUserCallback(e,n||null),this.localStore.removeCachedMutationBatchMetadata(e)):v("Unknown batchState: "+t),o.label=4;case 4:return[4,this.emitNewSnapsAndNotifyLocalStore(r)];case 5:return o.sent(),[2]}}))}))},e.prototype.applySuccessfulWrite=function(e){return u.__awaiter(this,void 0,void 0,(function(){var t,n;return u.__generator(this,(function(r){switch(r.label){case 0:this.assertSubscribed("applySuccessfulWrite()"),t=e.batch.batchId,this.processUserCallback(t,null),this.triggerPendingWritesCallbacks(t),r.label=1;case 1:return r.trys.push([1,4,,6]),[4,this.localStore.acknowledgeBatch(e)];case 2:return n=r.sent(),this.sharedClientState.updateMutationState(t,"acknowledged"),[4,this.emitNewSnapsAndNotifyLocalStore(n)];case 3:return r.sent(),[3,6];case 4:return[4,Bn(r.sent())];case 5:return r.sent(),[3,6];case 6:return[2]}}
1))}))},e.prototype.rejectFailedWrite=function(e,t){return u.__awaiter(this,void 0,void 0,(function(){var n;return u.__generator(this,(function(r){switch(r.label){case 0:this.assertSubscribed("rejectFailedWrite()"),this.processUserCallback(e,t),this.triggerPendingWritesCallbacks(e),r.label=1;case 1:return r.trys.push([1,4,,6]),[4,this.localStore.rejectBatch(e)];case 2:return n=r.sent(),this.sharedClientState.updateMutationState(e,"rejected",t),[4,this.emitNewSnapsAndNotifyLocalStore(n)];case 3:return r.sent(),[3,6];case 4:return[4,Bn(r.sent())];case 5:return r.sent(),[3,6];case 6:return[2]}}))}))},e.prototype.registerPendingWritesCallback=function(e){return u.__awaiter(this,void 0,void 0,(function(){var t,n;return u.__generator(this,(function(r){switch(r.label){case 0:return this.remoteStore.canUseNetwork()||d("SyncEngine","The network is disabled. The task returned by 'awaitPendingWrites()' will not complete until the network is enabled."),[4,this.localStore.getHighestUnacknowledgedBatchId()];case 1:return-1===(t=r.sent())?(e.resolve(),[2]):((n=this.pendingWritesCallbacks.get(t)||[]).push(e),this.pendingWritesCallbacks.set(t,n),[2])}}))}))},e.prototype.triggerPendingWritesCallbacks=function(e){(this.pendingWritesCallbacks.get(e)||[]).forEach((function(e){e.resolve()})),this.pendingWritesCallbacks.delete(e)},e.prototype.rejectOutstandingPendingWritesCallbacks=function(e){this.pendingWritesCallbacks.forEach((function(t){t.forEach((function(t){t.reject(new _(E.CANCELLED,e))}))})),this.pendingWritesCallbacks.clear()},e.prototype.addMutationCallback=function(e,t){var n=this.mutationUserCallbacks[this.currentUser.toKey()];n||(n=new Oe(Y)),n=n.insert(e,t),this.mutationUserCallbacks[this.currentUser.toKey()]=n},e.prototype.processUserCallback=function(e,t){var n=this.mutationUserCallbacks[this.currentUser.toKey()];if(n){var r=n.get(e);r&&(g(e===n.minKey(),"Mutation callbacks processed out-of-order?"),t?r.reject(t):r.resolve(),n=n.remove(e)),this.mutationUserCallbacks[this.currentUser.toKey()]=n}},e.prototype.removeAndCleanupQuery=function(e){var t=this;if(this.sharedClientState.removeLocalQueryTarget(e.targetId),this.queryViewsByQuery.delete(e.query),delete this.queryViewsByTarget[e.targetId],this.isPrimary){var n=this.limboDocumentRefs.referencesForId(e.targetId);this.limboDocumentRefs.removeReferencesForId(e.targetId),n.forEach((function(e){t.limboDocumentRefs.containsKey(e)||t.removeLimboTarget(e)}))}},e.prototype.removeLimboTarget=function(e){var t=this.limboTargetsByKey.get(e);null!==t&&(this.remoteStore.unlisten(t),this.limboTargetsByKey=this.limboTargetsByKey.remove(e),delete this.limboResolutionsByTarget[t])},e.prototype.updateTrackedLimbos=function(e,t){for(var n=0,r=t;n<r.length;n++){var o=r[n];if(o instanceof wo)this.limboDocumentRefs.addReference(o.key,e),this.trackLimboChange(o);else if(o instanceof Eo){d("SyncEngine","Document no longer in limbo: "+o.key),this.limboDocumentRefs.removeReference(o.key,e),this.limboDocumentRefs.containsKey(o.key)||this.removeLimboTarget(o.key)}else v("Unknown limbo change: "+JSON.stringify(o))}},e.prototype.trackLimboChange=function(e){var t=e.key;if(!this.limboTargetsByKey.get(t)){d("SyncEngine","New document in limbo: "+t);var n=this.limboTargetIdGenerator.next(),r=zr.atPath(t.path);this.limboResolutionsByTarget[n]=new ko(t),this.remoteStore.listen(new kn(r,n,_n.LimboResolution,ae.INVALID)),this.limboTargetsByKey=this.limboTargetsByKey.insert(t,n)}},e.prototype.currentLimboDocs=function(){return this.limboTargetsByKey},e.prototype.emitNewSnapsAndNotifyLocalStore=function(e,t){return u.__awaiter(this,void 0,void 0,(function(){var n,r,o,i=this;return u.__generator(this,(function(a){switch(a.label){case 0:return n=[],r=[],o=[],this.queryViewsByQuery.forEach((function(a,u){o.push(Promise.resolve().then((function(){var t=u.view.computeDocChanges(e);return t.needsRefill?i.localStore.executeQuery(u.query).then((function(e){return u.view.computeDocChanges(e,t)})):t})).then((function(e){var o=t&&t.targetChanges[u.targetId],a=u.view.applyChanges(e,!0===i.isPrimary,o);if(i.updateTrackedLimbos(u.targetId,a.limboChanges),a.snapshot){i.isPrimary&&i.sharedCl
1ientState.updateQueryState(u.targetId,a.snapshot.fromCache?"not-current":"current"),n.push(a.snapshot);var s=bo.fromSnapshot(u.targetId,a.snapshot);r.push(s)}})))})),[4,Promise.all(o)];case 1:return a.sent(),this.syncEngineListener.onWatchChange(n),[4,this.localStore.notifyLocalViewChanges(r)];case 2:return a.sent(),[2]}}))}))},e.prototype.assertSubscribed=function(e){g(null!==this.syncEngineListener,"Trying to call "+e+" before calling subscribe().")},e.prototype.handleCredentialChange=function(e){return u.__awaiter(this,void 0,void 0,(function(){var t,n;return u.__generator(this,(function(r){switch(r.label){case 0:return t=!this.currentUser.isEqual(e),this.currentUser=e,t?(this.rejectOutstandingPendingWritesCallbacks("'waitForPendingWrites' promise is rejected due to a user change."),[4,this.localStore.handleUserChange(e)]):[3,3];case 1:return n=r.sent(),this.sharedClientState.handleUserChange(e,n.removedBatchIds,n.addedBatchIds),[4,this.emitNewSnapsAndNotifyLocalStore(n.affectedDocuments)];case 2:r.sent(),r.label=3;case 3:return[4,this.remoteStore.handleCredentialChange()];case 4:return r.sent(),[2]}}))}))},e.prototype.applyPrimaryState=function(e){return u.__awaiter(this,void 0,void 0,(function(){var t,n,r,o,i,a,s,c=this;return u.__generator(this,(function(u){switch(u.label){case 0:return!0!==e||!0===this.isPrimary?[3,3]:(this.isPrimary=!0,[4,this.remoteStore.applyPrimaryState(!0)]);case 1:return u.sent(),t=this.sharedClientState.getAllActiveQueryTargets(),[4,this.synchronizeQueryViewsAndRaiseSnapshots(t.toArray())];case 2:for(n=u.sent(),r=0,o=n;r<o.length;r++)i=o[r],this.remoteStore.listen(i);return[3,7];case 3:return!1!==e||!1===this.isPrimary?[3,7]:(this.isPrimary=!1,a=[],s=Promise.resolve(),k(this.queryViewsByTarget,(function(e,t){c.sharedClientState.isLocalQueryTarget(e)?a.push(e):s=s.then((function(){return c.unlisten(t.query)})),c.remoteStore.unlisten(t.targetId)})),[4,s]);case 4:return u.sent(),[4,this.synchronizeQueryViewsAndRaiseSnapshots(a)];case 5:return u.sent(),this.resetLimboDocuments(),[4,this.remoteStore.applyPrimaryState(!1)];case 6:u.sent(),u.label=7;case 7:return[2]}}
1))}))},e.prototype.resetLimboDocuments=function(){var e=this;k(this.limboResolutionsByTarget,(function(t){e.remoteStore.unlisten(t)})),this.limboDocumentRefs.removeAllReferences(),this.limboResolutionsByTarget=[],this.limboTargetsByKey=new Oe(fe.comparator)},e.prototype.synchronizeQueryViewsAndRaiseSnapshots=function(e){return u.__awaiter(this,void 0,void 0,(function(){var t,n,r,o,i,a,s,c,l;return u.__generator(this,(function(u){switch(u.label){case 0:t=[],n=[],r=0,o=e,u.label=1;case 1:return r<o.length?(i=o[r],a=void 0,(s=this.queryViewsByTarget[i])?[4,this.localStore.releaseQuery(s.query,!0)]:[3,5]):[3,11];case 2:return u.sent(),[4,this.localStore.allocateQuery(s.query)];case 3:return a=u.sent(),[4,this.synchronizeViewAndComputeSnapshot(s)];case 4:return(c=u.sent()).snapshot&&n.push(c.snapshot),[3,9];case 5:return g(!0===this.isPrimary,"A secondary tab should never have an active query without an active view."),[4,this.localStore.getQueryForTarget(i)];case 6:return g(!!(l=u.sent()),"Query data for target "+i+" not found"),[4,this.localStore.allocateQuery(l)];case 7:return a=u.sent(),[4,this.initializeViewAndComputeSnapshot(a,!1)];case 8:u.sent(),u.label=9;case 9:t.push(a),u.label=10;case 10:return r++,[3,1];case 11:return this.syncEngineListener.onWatchChange(n),[2,t]}}))}))},e.prototype.getActiveClients=function(){return this.localStore.getActiveClients()},e.prototype.applyTargetState=function(e,t,n){return u.__awaiter(this,void 0,void 0,(function(){var r,o,i,a,s;return u.__generator(this,(function(u){switch(u.label){case 0:if(this.isPrimary)return d("SyncEngine","Ignoring unexpected query state notification."),[2];if(!this.queryViewsByTarget[e])return[3,11];switch(t){case"current":case"not-current":return[3,1];case"rejected":return[3,8]}return[3,10];case 1:return u.trys.push([1,4,,8]),[4,this.localStore.getNewDocumentChanges()];case 2:return r=u.sent(),o=Nr.createSynthesizedRemoteEventForCurrentChange(e,"current"===t),[4,this.emitNewSnapsAndNotifyLocalStore(r,o)];case 3:return u.sent(),[3,11];case 4:return i=u.sent(),(c=i).code!==E.DATA_LOSS||c.message!==Ht?[3,6]:(a=[],k(this.queryViewsByTarget,(function(e){return a.push(e)})),[4,this.synchronizeQueryViewsAndRaiseSnapshots(a)]);case 5:return u.sent(),[3,7];case 6:throw i;case 7:return[3,8];case 8:return s=this.queryViewsByTarget[e],this.removeAndCleanupQuery(s),[4,this.localStore.releaseQuery(s.query,!0)];case 9:return u.sent(),this.syncEngineListener.onWatchError(s.query,n),[3,11];case 10:v("Unexpected target state: "+t),u.label=11;case 11:return[2]}var c}))}))},e.prototype.applyActiveTargetsChange=function(e,t){return u.__awaiter(this,void 0,void 0,(function(){var n,r,o,i,a,s,c,l,f,h=this;return u.__generator(this,(function(p){switch(p.label){case 0:if(!this.isPrimary)return[2];n=0,r=e,p.label=1;case 1:return n<r.length?(f=r[n],g(!this.queryViewsByTarget[f],"Trying to add an already active target"),[4,this.localStore.getQueryForTarget(f)]):[3,6];case 2:return g(!!(o=p.sent()),"Query data for active target "+f+" not found"),[4,this.localStore.allocateQuery(o)];case 3:return i=p.sent(),[4,this.initializeViewAndComputeSnapshot(i,!1)];case 4:p.sent(),this.remoteStore.listen(i),p.label=5;case 5:return n++,[3,1];case 6:a=function(e){var t;return u.__generator(this,(function(n){switch(n.label){case 0:return(t=s.queryViewsByTarget[e])?[4,s.localStore.releaseQuery(t.query,!1).then((function(){h.remoteStore.unlisten(e),h.removeAndCleanupQuery(t)})).catch(Bn)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}}
1))},s=this,c=0,l=t,p.label=7;case 7:return c<l.length?(f=l[c],[5,a(f)]):[3,10];case 8:p.sent(),p.label=9;case 9:return c++,[3,7];case 10:return[2]}}))}))},e.prototype.enableNetwork=function(){return this.localStore.setNetworkEnabled(!0),this.remoteStore.enableNetwork()},e.prototype.disableNetwork=function(){return this.localStore.setNetworkEnabled(!1),this.remoteStore.disableNetwork()},e.prototype.getRemoteKeysForTarget=function(e){var t=this.limboResolutionsByTarget[e];return t&&t.receivedDocument?Fe().add(t.key):this.queryViewsByTarget[e]?this.queryViewsByTarget[e].view.syncedDocuments:Fe()},e}(),xo=function(){function e(e){this.uid=e}return e.prototype.isAuthenticated=function(){return null!=this.uid},e.prototype.toKey=function(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"},e.prototype.isEqual=function(e){return e.uid===this.uid},e.UNAUTHENTICATED=new e(null),e.GOOGLE_CREDENTIALS=new e("google-credentials-uid"),e.FIRST_PARTY=new e("first-party-uid"),e}(),Ao="SharedClientState",Io="firestore_clients",No="firestore_mutations",Do="firestore_targets",Po="firestore_online_state",Ro="firestore_sequence_number",jo=function(){function e(e,t,n,r){this.user=e,this.batchId=t,this.state=n,this.error=r,g(void 0!==r===("rejected"===n),"MutationMetadata must contain an error iff state is 'rejected'")}return e.fromWebStorageEntry=function(t,n,r){var o=JSON.parse(r),i="object"===typeof o&&-1!==["pending","acknowledged","rejected"].indexOf(o.state)&&(void 0===o.error||"object"===typeof o.error),a=void 0;return i&&o.error&&(i="string"===typeof o.error.message&&"string"===typeof o.error.code)&&(a=new _(o.error.code,o.error.message)),i?new e(t,n,o.state,a):(m(Ao,"Failed to parse mutation state for ID '"+n+"': "+r),null)},e.prototype.toWebStorageJSON=function(){var e={state:this.state,updateTimeMs:Date.now()};return this.error&&(e.error={code:this.error.code,message:this.error.message}),JSON.stringify(e)},e}(),Mo=function(){function e(e,t,n){this.targetId=e,this.state=t,this.error=n,g(void 0!==n===("rejected"===t),"QueryTargetMetadata must contain an error iff state is 'rejected'")}return e.fromWebStorageEntry=function(t,n){var r=JSON.parse(n),o="object"===typeof r&&-1!==["not-current","current","rejected"].indexOf(r.state)&&(void 0===r.error||"object"===typeof r.error),i=void 0;return o&&r.error&&(o="string"===typeof r.error.message&&"string"===typeof r.error.code)&&(i=new _(r.error.code,r.error.message)),o?new e(t,r.state,i):(m(Ao,"Failed to parse target state for ID '"+t+"': "+n),null)},e.prototype.toWebStorageJSON=function(){var e={state:this.state,updateTimeMs:Date.now()};return this.error&&(e.error={code:this.error.code,message:this.error.message}),JSON.stringify(e)},e}(),Lo=function(){function e(e,t){this.clientId=e,this.activeTargetIds=t}return e.fromWebStorageEntry=function(t,n){for(var r=JSON.parse(n),o="object"===typeof r&&r.activeTargetIds instanceof Array,i=qe(),a=0;o&&a<r.activeTargetIds.length;++a)o=ur(r.activeTargetIds[a]),i=i.add(r.activeTargetIds[a]);return o?new e(t,i):(m(Ao,"Failed to parse client data for instance '"+t+"': "+n),null)},e}(),Uo=function(){function e(e,t){this.clientId=e,this.onlineState=t}return e.fromWebStorageEntry=function(t){var n=JSON.parse(t);return"object"===typeof n&&n.onlineState in pr&&"string"===typeof n.clientId?new e(n.clientId,pr[n.onlineState]):(m(Ao,"Failed to parse online state: "+t),null)},e}(),Fo=function(){function e(){this.activeTargetIds=qe()}return e.prototype.addQueryTarget=function(e){g(!this.activeTargetIds.has(e),"Target with ID '"+e+"' already active."),this.activeTargetIds=this.activeTargetIds.add(e)},e.prototype.removeQueryTarget=function(e){this.activeTargetIds=this.activeTargetIds.delete(e)},e.prototype.toWebStorageJSON=function(){var e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)},e}(),Bo=function(){function e(t,n,r,o,i){if(this.queue=t,this.platform=n,this.persistenceKey=r,this.localClientId=o,this.syncEngine=null,this.onlineStateHandler=null,this.sequenceNumberHandler=null,this.activeClients={},this.storageListener=this.handleWebStorageEvent.bind(this),this.started=!1,this.earlyEvents=[],!e.isAvailable(this.platform))throw new _(E.UNIMPLEMENT
1ED,"LocalStorage is not available on this platform.");var a=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");this.storage=this.platform.window.localStorage,this.currentUser=i,this.localClientStorageKey=this.toWebStorageClientStateKey(this.localClientId),this.sequenceNumberKey=Ro+"_"+r,this.activeClients[this.localClientId]=new Fo,this.clientStateKeyRe=new RegExp("^"+Io+"_"+a+"_([^_]*)$"),this.mutationBatchKeyRe=new RegExp("^"+No+"_"+a+"_(\\d+)(?:_(.*))?$"),this.queryTargetKeyRe=new RegExp("^"+Do+"_"+a+"_(\\d+)$"),this.onlineStateKey=Po+"_"+r,this.platform.window.addEventListener("storage",this.storageListener)}return e.isAvailable=function(e){return!(!e.window||null==e.window.localStorage)},e.prototype.start=function(){return u.__awaiter(this,void 0,void 0,(function(){var e,t,n,r,o,i,a,s,c,l,f,h=this;return u.__generator(this,(function(u){switch(u.label){case 0:return g(!this.started,"WebStorageSharedClientState already started"),g(null!==this.syncEngine,"syncEngine property must be set before calling start()"),g(null!==this.onlineStateHandler,"onlineStateHandler property must be set before calling start()"),[4,this.syncEngine.getActiveClients()];case 1:for(e=u.sent(),t=0,n=e;t<n.length;t++)(r=n[t])!==this.localClientId&&(o=this.getItem(this.toWebStorageClientStateKey(r)))&&(i=Lo.fromWebStorageEntry(r,o))&&(this.activeClients[i.clientId]=i);for(this.persistClientState(),(a=this.storage.getItem(this.onlineStateKey))&&(s=this.fromWebStorageOnlineState(a))&&this.handleOnlineStateEvent(s),c=0,l=this.earlyEvents;c<l.length;c++)f=l[c],this.handleWebStorageEvent(f);return this.earlyEvents=[],this.platform.window.addEventListener("unload",(function(){return h.shutdown()})),this.started=!0,[2]}}))}))},e.prototype.writeSequenceNumber=function(e){this.setItem(this.sequenceNumberKey,JSON.stringify(e))},e.prototype.getAllActiveQueryTargets=function(){var e=qe();return C(this.activeClients,(function(t,n){e=e.unionWith(n.activeTargetIds)})),e},e.prototype.isActiveQueryTarget=function(e){for(var t in this.activeClients)if(this.activeClients.hasOwnProperty(t)&&this.activeClients[t].activeTargetIds.has(e))return!0;return!1},e.prototype.addPendingMutation=function(e){this.persistMutationState(e,"pending")},e.prototype.updateMutationState=function(e,t,n){this.persistMutationState(e,t,n),this.removeMutationState(e)},e.prototype.addLocalQueryTarget=function(e){var t="not-current";if(this.isActiveQueryTarget(e)){var n=this.storage.getItem(this.toWebStorageQueryTargetMetadataKey(e));if(n){var r=Mo.fromWebStorageEntry(e,n);r&&(t=r.state)}}return this.localClientState.addQueryTarget(e),this.persistClientState(),t},e.prototype.removeLocalQueryTarget=function(e){this.localClientState.removeQueryTarget(e),this.persistClientState()},e.prototype.isLocalQueryTarget=function(e){return this.localClientState.activeTargetIds.has(e)},e.prototype.clearQueryState=function(e){this.removeItem(this.toWebStorageQueryTargetMetadataKey(e))},e.prototype.updateQueryState=function(e,t,n){this.persistQueryTargetState(e,t,n)},e.prototype.handleUserChange=function(e,t,n){var r=this;t.forEach((function(e){r.removeMutationState(e)})),this.currentUser=e,n.forEach((function(e){r.addPendingMutation(e)}))},e.prototype.setOnlineState=function(e){this.persistOnlineState(e)},e.prototype.shutdown=function(){this.started&&(this.platform.window.removeEventListener("storage",this.storageListener),this.removeItem(this.localClientStorageKey),this.started=!1)},e.prototype.getItem=function(e){var t=this.storage.getItem(e);return d(Ao,"READ",e,t),t},e.prototype.setItem=function(e,t){d(Ao,"SET",e,t),this.storage.setItem(e,t)},e.prototype.removeItem=function(e){d(Ao,"REMOVE",e),this.storage.removeItem(e)},e.prototype.handleWebStorageEvent=function(e){var t=this;if(e.storageArea===this.storage){if(d(Ao,"EVENT",e.key,e.newValue),e.key===this.localClientStorageKey)return void m("Received WebStorage notification for local change. Another client might have garbage-collected our state");this.queue.enqueueAndForget((function(){return u.__awaiter(t,void 0,void 0,(function(){var t,n,r,o,i,a;return u.__generator(this,(function(u){if(!this.started)return this.earlyEvents.push(e),[2];if(null===e.key)return[2];if(this.clientStateKeyRe.test(e.key)){if(null==e.newValue)return n=this.fromWebStorageClientStateKey(e.ke
1y),[2,this.handleClientStateEvent(n,null)];if(t=this.fromWebStorageClientState(e.key,e.newValue))return[2,this.handleClientStateEvent(t.clientId,t)]}else if(this.mutationBatchKeyRe.test(e.key)){if(null!==e.newValue&&(r=this.fromWebStorageMutationMetadata(e.key,e.newValue)))return[2,this.handleMutationBatchEvent(r)]}else if(this.queryTargetKeyRe.test(e.key)){if(null!==e.newValue&&(o=this.fromWebStorageQueryTargetMetadata(e.key,e.newValue)))return[2,this.handleQueryTargetEvent(o)]}else if(e.key===this.onlineStateKey){if(null!==e.newValue&&(i=this.fromWebStorageOnlineState(e.newValue)))return[2,this.handleOnlineStateEvent(i)]}else e.key===this.sequenceNumberKey&&(g(!!this.sequenceNumberHandler,"Missing sequenceNumberHandler"),(a=function(e){var t=ae.INVALID;if(null!=e)try{var n=JSON.parse(e);g("number"===typeof n,"Found non-numeric sequence number"),t=n}catch(r){m(Ao,"Failed to read sequence number from WebStorage",r)}return t}(e.newValue))!==ae.INVALID&&this.sequenceNumberHandler(a));return[2]}))}))}))}},Object.defineProperty(e.prototype,"localClientState",{get:function(){return this.activeClients[this.localClientId]},enumerable:!0,configurable:!0}),e.prototype.persistClientState=function(){this.setItem(this.localClientStorageKey,this.localClientState.toWebStorageJSON())},e.prototype.persistMutationState=function(e,t,n){var r=new jo(this.currentUser,e,t,n),o=this.toWebStorageMutationBatchKey(e);this.setItem(o,r.toWebStorageJSON())},e.prototype.removeMutationState=function(e){var t=this.toWebStorageMutationBatchKey(e);this.removeItem(t)},e.prototype.persistOnlineState=function(e){var t={clientId:this.localClientId,onlineState:pr[e]};this.storage.setItem(this.onlineStateKey,JSON.stringify(t))},e.prototype.persistQueryTargetState=function(e,t,n){var r=this.toWebStorageQueryTargetMetadataKey(e),o=new Mo(e,t,n);this.setItem(r,o.toWebStorageJSON())},e.prototype.toWebStorageClientStateKey=function(e){return g(-1===e.indexOf("_"),"Client key cannot contain '_', but was '"+e+"'"),Io+"_"+this.persistenceKey+"_"+e},e.prototype.toWebStorageQueryTargetMetadataKey=function(e){return Do+"_"+this.persistenceKey+"_"+e},e.prototype.toWebStorageMutationBatchKey=function(e){var t=No+"_"+this.persistenceKey+"_"+e;return this.currentUser.isAuthenticated()&&(t+="_"+this.currentUser.uid),t},e.prototype.fromWebStorageClientStateKey=function(e){var t=this.clientStateKeyRe.exec(e);return t?t[1]:null},e.prototype.fromWebStorageClientState=function(e,t){var n=this.fromWebStorageClientStateKey(e);return g(null!==n,"Cannot parse client state key '"+e+"'"),Lo.fromWebStorageEntry(n,t)},e.prototype.fromWebStorageMutationMetadata=function(e,t){var n=this.mutationBatchKeyRe.exec(e);g(null!==n,"Cannot parse mutation batch key '"+e+"'");var r=Number(n[1]),o=void 0!==n[2]?n[2]:null;return jo.fromWebStorageEntry(new xo(o),r,t)},e.prototype.fromWebStorageQueryTargetMetadata=function(e,t){var n=this.queryTargetKeyRe.exec(e);g(null!==n,"Cannot parse query target key '"+e+"'");var r=Number(n[1]);return Mo.fromWebStorageEntry(r,t)},e.prototype.fromWebStorageOnlineState=function(e){return Uo.fromWebStorageEntry(e)},e.prototype.handleMutationBatchEvent=function(e){return u.__awaiter(this,void 0,void 0,(function(){return u.__generator(this,(function(t){return e.user.uid!==this.currentUser.uid?(d(Ao,"Ignoring mutation for non-active user "+e.user.uid),[2]):[2,this.syncEngine.applyBatchState(e.batchId,e.state,e.error)]}))}))},e.prototype.handleQueryTargetEvent=function(e){return this.syncEngine.applyTargetState(e.targetId,e.state,e.error)},e.prototype.handleClientStateEvent=function(e,t){var n=this,r=this.getAllActiveQueryTargets();t?this.activeClients[e]=t:delete this.activeClients[e];var o=this.getAllActiveQueryTargets(),i=[],a=[];return o.forEach((function(e){return u.__awaiter(n,void 0,void 0,(function(){return u.__generator(this,(function(t){return r.has(e)||i.push(e),[2]}))}))})),r.forEach((function(e){return u.__awaiter(n,void 0,void 0,(function(){return u.__generator(this,(function(t){return o.has(e)||a.push(e),[2]}))}))})),this.syncEngine.applyActiveTargetsChange(i,a)},e.prototype.handleOnlineStateEvent=function(e){this.activeClients[e.clientId]&&this.onlineStateHandler(e.onlineState)},e}();var qo=function(){function e(){this.localState=new Fo,this.queryState={},this.syncEngine=null,this.onlineStateHandler=null,this.sequenceNumberHandler=null}return e.prototype.addPendingMutation=function(e){},e.prototype.updateMutationState=function(e,t,n){},e.prototype.addLocalQueryTarget=function(e){return this.localState.addQueryTarget(e),this.queryState[e]||"not-current"},e.prototype.updateQueryState=function(e,t,n){this.queryState[e]=t},e.prototype.removeLocalQueryTarget=function(e){this.localState.removeQueryTarget(e)},e.prototype.isLocalQueryTarget=function(e){return this.localState.activeTargetIds.has(e)},e.prototype.clearQueryState=function(e){delete this.queryState[e]},e.prototype.getAllActiveQueryTargets=function(){return this.localState.activeTargetIds},e.prototype.isActiveQueryTarget=function(e){return this.localState.activeTargetIds.has(e)},e.prototype.start=function(){return this.localState=new Fo,Promise.resolve()},e.prototype.handleUserChange=function(e,t,n){},e.prototype.setOnlineState=function(e){},e.prototype.shutdown=function(){},e.prototype.writeSequenceNumber=function(e){},e}(),Vo=function(){function e(e,t){this.cacheSizeBytes=e,this.synchronizeTabs=t}return e.prototype.lruParams=function(){return Nn.withCacheSize(this.cacheSizeBytes)},e}(),zo=function(){return function(){}}(),Wo=function(){function e(e,t,n,r){this.platform=e,this.databaseInfo=t,this.credentials=n,this.asyncQueue=r,this.clientId=H.newId()}return e.prototype.start=function(e){var t=this;this.verifyNotTerminated();var n=new he,r=new he,o=!1;return this.credentials.setChangeListener((function(i){o?t.asyncQueue.enqueueAndForget((function(){return t.handleCredentialChange(i)})):(o=!0,t.initializePersistence(e,r,i).then((function(e){return t.initializeRest(i,e)})).then(n.resolve,n.reject))})),this.asyncQueue.enqueueAndForget((function(){return n.promise})),r.promise},e.prototype.enableNetwork=function(){var e=this;return this.verifyNotTerminated(),this.asyncQueue.enqueue((function(){return e.syncEngine.enableNetwork()}))},e.prototype.initializePersistence=function(e,t,n){var r=this;return e instanceof Vo?this.startIndexedDbPersistence(n,e).then((function(e){return t.resolve(),e})).catch((function(e){if(t.reject(e),!r.canFallback(e))throw e;return console.warn("Error enabling offline persistence. Falling back to persistence disabled: "+e),r.startMemoryPersistence()})):(t.resolve(),this.startMemoryPersistence())},e.prototype.canFallback=function(e){return e instanceof _?e.code===E.FAILED_PRECONDITION||e.code===E.UNIMPLEMENT
1ED:!("undefined"!==typeof DOMException&&e instanceof DOMException)||(22===e.code||20===e.code||11===e.code)},e.prototype.verifyNotTerminated=function(){if(this.asyncQueue.isShuttingDown)throw new _(E.FAILED_PRECONDITION,"The client has already been terminated.")},e.prototype.startIndexedDbPersistence=function(e,t){var n=this,r=Fn.buildStoragePrefix(this.databaseInfo),o=new mo(this.databaseInfo.databaseId,{useProto3Json:!0});return Promise.resolve().then((function(){return u.__awaiter(n,void 0,void 0,(function(){var n,i;return u.__generator(this,(function(a){switch(a.label){case 0:if(t.synchronizeTabs&&!Bo.isAvailable(this.platform))throw new _(E.UNIMPLEMENTED,"IndexedDB persistence is only available on platforms that support LocalStorage.");return n=t.lruParams(),this.sharedClientState=t.synchronizeTabs?new Bo(this.asyncQueue,this.platform,r,this.clientId,e):new qo,[4,Fn.createIndexedDbPersistence({allowTabSynchronization:t.synchronizeTabs,persistenceKey:r,clientId:this.clientId,platform:this.platform,queue:this.asyncQueue,serializer:o,lruParams:n,sequenceNumberSyncer:this.sharedClientState})];case 1:return i=a.sent(),this.persistence=i,[2,i.referenceDelegate.garbageCollector]}}))}))}))},e.prototype.startMemoryPersistence=function(){return this.persistence=Jn.createEagerPersistence(this.clientId),this.sharedClientState=new qo,Promise.resolve(null)},e.prototype.initializeRest=function(e,t){var n=this;return d("FirestoreClient","Initializing. user=",e.uid),this.platform.loadConnection(this.databaseInfo).then((function(r){return u.__awaiter(n,void 0,void 0,(function(){var n,o,i,a,s,c=this;return u.__generator(this,(function(l){switch(l.label){case 0:return this.localStore=new Hn(this.persistence,e),t&&(this.lruScheduler
1=new Dn(t,this.asyncQueue,this.localStore)),n=this.platform.newConnectivityMonitor(),o=this.platform.newSerializer(this.databaseInfo.databaseId),i=new gr(this.asyncQueue,r,this.credentials,o),a=function(e){return c.syncEngine.applyOnlineStateChange(e,dr.RemoteStore)},s=function(e){return c.syncEngine.applyOnlineStateChange(e,dr.SharedClientState)},this.remoteStore=new qr(this.localStore,i,this.asyncQueue,a,n),this.syncEngine=new Co(this.localStore,this.remoteStore,this.sharedClientState,e),this.sharedClientState.onlineStateHandler=s,this.remoteStore.syncEngine=this.syncEngine,this.sharedClientState.syncEngine=this.syncEngine,this.eventMgr=new vo(this.syncEngine),[4,this.sharedClientState.start()];case 1:return l.sent(),[4,this.remoteStore.start()];case 2:return l.sent(),[4,this.persistence.setPrimaryStateListener((function(e){return u.__awaiter(c,void 0,void 0,(function(){return u.__generator(this,(function(t){switch(t.label){case 0:return[4,this.syncEngine.applyPrimaryState(e)];case 1:return t.sent(),this.lruScheduler&&(e&&!this.lruScheduler.started?this.lruScheduler.start():e||this.lruScheduler.stop()),[2]}}))}))}))];case 3:return l.sent(),[4,this.persistence.setDatabaseDeletedListener((function(){return u.__awaiter(c,void 0,void 0,(function(){return u.__generator(this,(function(e){switch(e.label){case 0:return[4,this.terminate()];case 1:return e.sent(),[2]}}))}))}))];case 4:return l.sent(),[2]}}))}))}))},e.prototype.handleCredentialChange=function(e){return this.asyncQueue.verifyOperationInProgress(),d("FirestoreClient","Credential Changed. Current user: "+e.uid),this.syncEngine.handleCredentialChange(e)},e.prototype.disableNetwork=function(){var e=this;return this.verifyNotTerminated(),this.asyncQueue.enqueue((function(){return e.syncEngine.disableNetwork()}))},e.prototype.terminate=function(){var e=this;return this.asyncQueue.enqueueAndInitiateShutdown((function(){return u.__awaiter(e,void 0,void 0,(function(){return u.__generator(this,(function(e){switch(e.label){case 0:return this.lruScheduler&&this.lruScheduler.stop(),[4,this.remoteStore.shutdown()];case 1:return e.sent(),[4,this.sharedClientState.shutdown()];case 2:return e.sent(),[4,this.persistence.shutdown()];case 3:return e.sent(),this.credentials.removeChangeListener(),[2]}}))}))}))},e.prototype.waitForPendingWrites=function(){var e=this;this.verifyNotTerminated();var t=new he;return this.asyncQueue.enqueueAndForget((function(){return e.syncEngine.registerPendingWritesCallback(t)})),t.promise},e.prototype.listen=function(e,t,n){var r=this;this.verifyNotTerminated();var o=new go(e,t,n);return this.asyncQueue.enqueueAndForget((function(){return r.eventMgr.listen(o)})),o},e.prototype.unlisten=function(e){var t=this;this.clientTerminated||this.asyncQueue.enqueueAndForget((function(){return t.eventMgr.unlisten(e)}))},e.prototype.getDocumentFromLocalCache=function(e){var t=this;return this.verifyNotTerminated(),this.asyncQueue.enqueue((function(){return t.localStore.readDocument(e)})).then((function(e){if(e instanceof zt)return e;if(e instanceof Wt)return null;throw new _(E.UNAVAILABLE,"Failed to get document from cache. (However, this document may exist on the server. Run again without setting 'source' in the GetOptions to attempt to retrieve the document from the server.)")}))},e.prototype.getDocumentsFromLocalCache=function(e){var t=this;return this.verifyNotTerminated(),this.asyncQueue.enqueue((function(){return t.localStore.executeQuery(e)})).then((function(t){var n=Fe(),r=new _o(e,n),o=r.computeDocChanges(t);return r.applyChanges(o,!1).snapshot}))},e.prototype.write=function(e){var t=this;this.verifyNotTerminated();var n=new he;return this.asyncQueue.enqueueAndForget((function(){return t.syncEngine.write(e,n)})),n.promise},e.prototype.databaseId=function(){return this.databaseInfo.databaseId},e.prototype.addSnapshotsInSyncListener=function(e){var t=this;this.verifyNotTerminated(),this.asyncQueue.enqueueAndForget((function(){return t.eventMgr.addSnapshotsInSyncListener(e),Promise.resolve()}))},e.prototype.removeSnapshotsInSyncListener=function(e){this.clientTerminated||this.eventMgr.removeSnapshotsInSyncListener(e)},Object.defineProperty(e.prototype,"clientTerminated",{get:function(){return this.asyncQueue.isShuttingDown},enumerable:!0,configurable:!0}),e.prototype.transaction=function(e){var t=this;this.verifyNotTerminated();var n=new he;return this.asyncQueue.enqueueAndForget((function(){return t.syncEngine.runTransaction(t.asyncQueue,e,n),Promise.resolve()})),n.promise},e}(),Qo=function(){function e(e){this.observer=e,this.muted=!1}return e.prototype.next=function(e){this.scheduleEvent(this.observer.next,e)},e.prototype.error=function(e){this.scheduleEvent(this.observer.error,e)},e.prototype.mute=function(){this.muted=!0}
1,e.prototype.scheduleEvent=function(e,t){var n=this;this.muted||setTimeout((function(){n.muted||e(t)}),0)},e}(),Go=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];!function(e,t,n,r){if(!(t instanceof Array)||t.length<r)throw new _(E.INVALID_ARGUMENT,"Function "+e+"() requires its "+n+" argument to be an array with at least "+K(r,"element")+".")}("FieldPath",e,"fieldNames",1);for(var n=0;n<e.length;++n)if(P("FieldPath","string",n,e[n]),0===e[n].length)throw new _(E.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new le(e)}return e.documentId=function(){return e._DOCUMENT_ID},e.prototype.isEqual=function(t){if(!(t instanceof e))throw Q("isEqual","FieldPath",1,t);return this._internalPath.isEqual(t._internalPath)},e._DOCUMENT_ID=new e(le.keyField().canonicalString()),e}(),Ko=new RegExp("[~\\*/\\[\\]]");var Ho=function(){return function(e,t){this.user=t,this.type="OAuth",this.authHeaders={Authorization:"Bearer "+e}}}(),Yo=function(){function e(){this.changeListener=null}return e.prototype.getToken=function(){return Promise.resolve(null)},e.prototype.invalidateToken=function(){},e.prototype.setChangeListener=function(e){g(!this.changeListener,"Can only call setChangeListener() once."),this.changeListener=e,e(xo.UNAUTHENTICATED)},e.prototype.removeChangeListener=function(){g(null!==this.changeListener,"removeChangeListener() when no listener registered"),this.changeListener=null},e}(),$o=function(){function e(e){var t=this;this.app=e,this.tokenListener=null,this.currentUser=xo.UNAUTHENTICATED,this.tokenCounter=0,this.changeListener=null,this.forceRefresh=!1,this.tokenListener=function(){t.tokenCounter++,t.currentUser=t.getUser(),t.changeListener&&t.changeListener(t.currentUser)},this.currentUser=this.getUser(),this.tokenCounter=0,this.app.INTERNAL.addAuthTokenListener(this.tokenListener)}return e.prototype.getToken=function(){var e=this;g(null!=this.tokenListener,"getToken cannot be called after listener removed.");var t=this.tokenCounter,n=this.forceRefresh;return this.forceRefresh=!1,this.app.INTERNAL.getToken(n).then((function(n){if(e.tokenCounter!==t)throw new _(E.ABORTED,"getToken aborted due to token change.");return n?(g("string"===typeof n.accessToken,"Invalid tokenData returned from getToken():"+n),new Ho(n.accessToken,e.currentUser)):null}))},e.prototype.invalidateToken=function(){this.forceRefresh=!0},e.prototype.setChangeListener=function(e){g(!this.changeListener,"Can only call setChangeListener() once."),this.changeListener=e,e(this.currentUser)},e.prototype.removeChangeListener=function(){g(null!=this.tokenListener,"removeChangeListener() called twice"),g(null!==this.changeListener,"removeChangeListener() called when no listener registered"),this.app.INTERNAL.removeAuthTokenListener(this.tokenListener),this.tokenListener=null,this.changeListener=null},e.prototype.getUser=function(){var e=this.app.INTERNAL.getUid();return g(null===e||"string"===typeof e,"Received invalid UID: "+e),new xo(e)},e}(),Xo=function(){function e(e,t){this.gapi=e,this.sessionIndex=t,this.type="FirstParty",this.user=xo.FIRST_PARTY}return Object.defineProperty(e.prototype,"authHeaders",{get:function(){var e={"X-Goog-AuthUser":this.sessionIndex},t=this.gapi.auth.getAuthHeaderValueForFirstParty([]);return t&&(e.Authorization=t),e},enumerable:!0,configurable:!0}),e}(),Jo=function(){function e(e,t){this.gapi=e,this.sessionIndex=t}return e.prototype.getToken=function(){return Promise.resolve(new Xo(this.gapi,this.sessionIndex))},e.prototype.setChangeListener=function(e){e(xo.FIRST_PARTY)},e.prototype.removeChangeListener=function(){},e.prototype.invalidateToken=function(){},e}();function Zo(e){if(!e)return new Yo;switch(e.type){case"gapi":var t=e.client;return g(!("object"!==typeof t||null===t||!t.auth||!t.auth.getAuthHeaderValueForFirstParty),"unexpected gapi interface"),new Jo(t,e.sessionIndex||"0");case"provider":return e.client;default:throw new _(E.INVALID_ARGUMENT,"makeCredentialsProvider failed due to invalid credential type")}}function ei(e){return function(e,t){if("object"!==typeof e||null===e)return!1;for(var n=e,r=0,o=t;r<o.length;r++){var i=o[r];if(i in n&&"function"===typeof n[i])return!0}return!1}(e,["next","error","complete"])}var ti,ni=function(){function e(e){this._methodName=e}return e.delete=function(){return A("FieldValue.delete",arguments),ri.instance},e.serverTimestamp=function(){return A("FieldValue.serverTimestamp",arguments),oi.instance},e.arrayUnion=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];
1return N("FieldValue.arrayUnion",arguments,1),new ii(e)},e.arrayRemove=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return N("FieldValue.arrayRemove",arguments,1),new ai(e)},e.increment=function(e){return P("FieldValue.increment","number",1,e),I("FieldValue.increment",arguments,1),new ui(e)},e.prototype.isEqual=function(e){return this===e},e}(),ri=function(e){function t(){return e.call(this,"FieldValue.delete")||this}return u.__extends(t,e),t.instance=new t,t}(ni),oi=function(e){function t(){return e.call(this,"FieldValue.serverTimestamp")||this}return u.__extends(t,e),t.instance=new t,t}(ni),ii=function(e){function t(t){var n=e.call(this,"FieldValue.arrayUnion")||this;return n._elements=t,n}return u.__extends(t,e),t}(ni),ai=function(e){function t(t){var n=e.call(this,"FieldValue.arrayRemove")||this;return n._elements=t,n}return u.__extends(t,e),t}(ni),ui=function(e){function t(t){var n=e.call(this,"FieldValue.increment")||this;return n._operand=t,n}return u.__extends(t,e),t}(ni),si=S(ni,"Use FieldValue.<field>() instead."),ci=/^__.*__$/,li=function(){function e(e,t,n){this.data=e,this.fieldMask=t,this.fieldTransforms=n}return e.prototype.toMutations=function(e,t){var n=[];return null!==this.fieldMask?n.push(new St(e,this.data,this.fieldMask,t)):n.push(new _t(e,this.data,t)),this.fieldTransforms.length>0&&n.push(new Tt(e,this.fieldTransforms)),n},e}(),fi=function(){function e(e,t,n){this.data=e,this.fieldMask=t,this.fieldTransforms=n}return e.prototype.toMutations=function(e,t){var n=[new St(e,this.data,this.fieldMask,t)];return this.fieldTransforms.length>0&&n.push(new Tt(e,this.fieldTransforms)),n},e}();function hi(e){switch(e){case ti.Set:case ti.MergeSet:case ti.Update:return!0;case ti.Argument:return!1;default:throw v("Unexpected case for UserDataSource: "+e)}}!function(e){e[e.Set=0]="Set",e[e.Update=1]="Update",e[e.MergeSet=2]="MergeSet",e[e.Argument=3]="Argument"}(ti||(ti={}));var pi=function(){function e(e,t,n,r,o,i){this.dataSource=e,this.methodName=t,this.path=n,this.arrayElement=r,void 0===o&&this.validatePath(),this.arrayElement=void 0!==r&&r,this.fieldTransforms=o||[],this.fieldMask=i||[]}return e.prototype.childContextForField=function(t){var n=null==this.path?null:this.path.child(t),r=new e(this.dataSource,this.methodName,n,!1,this.fieldTransforms,this.fieldMask);return r.validatePathSegment(t),r},e.prototype.childContextForFieldPath=function(t){var n=null==this.path?null:this.path.child(t),r=new e(this.dataSource,this.methodName,n,!1,this.fieldTransforms,this.fieldMask);return r.validatePath(),r},e.prototype.childContextForArray=function(t){return new e(this.dataSource,this.methodName,null,!0,this.fieldTransforms,this.fieldMask)},e.prototype.createError=function(e){var t=null===this.path||this.path.isEmpty()?"":" (found in field "+this.path.toString()+")";return new _(E.INVALID_ARGUMENT,"Function "+this.methodName+"() called with invalid data. "+e+t)},e.prototype.contains=function(e){return void 0!==this.fieldMask.find((function(t){return e.isPrefixOf(t)}))||void 0!==this.fieldTransforms.find((function(t){return e.isPrefixOf(t.field)}))},e.prototype.validatePath=function(){if(null!==this.path)for(var e=0;e<this.path.length;e++)this.validatePathSegment(this.path.get(e))},e.prototype.validatePathSegment=function(e){if(hi(this.dataSource)&&ci.test(e))throw this.createError("Document fields cannot begin and end with __")},e}(),di=function(){return function(e,t){this.databaseId=e,this.key=t}}(),mi=function(){function e(e){this.preConverter=e}return e.prototype.parseSetData=function(e,t){var n=new pi(ti.Set,e,le.EMPTY_PATH);vi("Data must be an object, but it was:",n,t);var r=this.parseData(t,n);return new li(r,null,n.fieldTransforms)},e.prototype.parseMergeData=function(e,t,n){var r=new pi(ti.MergeSet,e,le.EMPTY_PATH);vi("Data must be an object, but it was:",r,t);var o,i,a=this.parseData(t,r);if(n){for(var u=new Ae(le.comparator),s=0,c=n;s<c.length;s++){var l=c[s],f=void 0;if(l instanceof Go)f=l._internalPath;else{if("string"!==typeof l)throw v("Expected stringOrFieldPath to be a string or a FieldPath");f=bi(e,l)}if(!r.contains(f))throw new _(E.INVALID_ARGUMENT,"Field '"+f+"' is specified in your field mask but missing from your input data.");u=u.add(f)}o=mt.fromSet(u),i=r.fieldTransforms.filter((function(e){return o.covers(e.field)}))}else o=mt.fromArray(r.fieldMask),i=r.fieldTransforms;return new li(a,o,i)}
1,e.prototype.parseUpdateData=function(e,t){var n=this,r=new pi(ti.Update,e,le.EMPTY_PATH);vi("Data must be an object, but it was:",r,t);var o=new Ae(le.comparator),i=Bt.EMPTY;C(t,(function(t,a){var u=bi(e,t),s=r.childContextForFieldPath(u);if((a=n.runPreConverter(a,s))instanceof ri)o=o.add(u);else{var c=n.parseData(a,s);null!=c&&(o=o.add(u),i=i.set(u,c))}}));var a=mt.fromSet(o);return new fi(i,a,r.fieldTransforms)},e.prototype.parseUpdateVarargs=function(e,t,n,r){var o=new pi(ti.Update,e,le.EMPTY_PATH),i=[gi(e,t)],a=[n];if(r.length%2!==0)throw new _(E.INVALID_ARGUMENT,"Function "+e+"() needs to be called with an even number of arguments that alternate between field names and values.");for(var u=0;u<r.length;u+=2)i.push(gi(e,r[u])),a.push(r[u+1]);var s=new Ae(le.comparator),c=Bt.EMPTY;for(u=0;u<i.length;++u){var l=i[u],f=o.childContextForFieldPath(l),h=this.runPreConverter(a[u],f);if(h instanceof ri)s=s.add(l);else{var p=this.parseData(h,f);null!=p&&(s=s.add(l),c=c.set(l,p))}}var d=mt.fromSet(s);return new fi(c,d,o.fieldTransforms)},e.prototype.parseQueryValue=function(e,t){var n=new pi(ti.Argument,e,le.EMPTY_PATH),r=this.parseData(t,n);return g(null!=r,"Parsed data should not be null."),g(0===n.fieldTransforms.length,"Field transforms should have been disallowed."),r},e.prototype.runPreConverter=function(e,t){try{return this.preConverter(e)}catch(r){var n=wi(r);throw t.createError(n)}},e.prototype.parseData=function(e,t){if(yi(e=this.runPreConverter(e,t)))return vi("Unsupported field value:",t,e),this.parseObject(e,t);if(e instanceof ni)return this.parseSentinelFieldValue(e,t),null;if(t.path&&t.fieldMask.push(t.path),e instanceof Array){if(t.arrayElement)throw t.createError("Nested arrays are not supported");return this.parseArray(e,t)}return this.parseScalarValue(e,t)},e.prototype.parseObject=function(e,t){var n=this,r=new Oe(Y);return x(e)?t.path&&t.path.length>0&&t.fieldMask.push(t.path):C(e,(function(e,o){var i=n.parseData(o,t.childContextForField(e));null!=i&&(r=r.insert(e,i))})),new Bt(r)},e.prototype.parseArray=function(e,t){for(var n=[],r=0,o=0,i=e;o<i.length;o++){var a=i[o],u=this.parseData(a,t.childContextForArray(r));null==u&&(u=xt.INSTANCE),n.push(u),r++}return new qt(n)},e.prototype.parseSentinelFieldValue=function(e,t){if(!hi(t.dataSource))throw t.createError(e._methodName+"() can only be used with update() and set()");if(null===t.path)throw t.createError(e._methodName+"() is not currently supported inside arrays");if(e instanceof ri){if(t.dataSource!==ti.MergeSet)throw t.dataSource===ti.Update?(g(t.path.length>0,"FieldValue.delete() at the top level should have already been handled."),t.createError("FieldValue.delete() can only appear at the top level of your update data")):t.createError("FieldValue.delete() cannot be used with set() unless you pass {merge:true}");t.fieldMask.push(t.path)}else if(e instanceof oi)t.fieldTransforms.push(new yt(t.path,ro.instance));else if(e instanceof ii){var n=this.parseArrayTransformElements(e._methodName,e._elements),r=new oo(n);t.fieldTransforms.push(new yt(t.path,r))}else if(e instanceof ai){n=this.parseArrayTransformElements(e._methodName,e._elements);var o=new io(n);t.fieldTransforms.push(new yt(t.path,o))}else if(e instanceof ui){var i=this.parseQueryValue("FieldValue.increment",e._operand),a=new ao(i);t.fieldTransforms.push(new yt(t.path,a))}else v("Unknown FieldValue type: "+e)},e.prototype.parseScalarValue=function(e,t){if(null===e)return xt.INSTANCE;if("number"===typeof e)return ur(e)?new Dt(e):new Pt(e);if("boolean"===typeof e)return At.of(e);if("string"===typeof e)return new Rt(e);if(e instanceof Date)return new jt(Se.fromDate(e));if(e instanceof Se)return new jt(new Se(e.seconds,1e3*Math.floor(e.nanoseconds/1e3)));if(e instanceof Vr)return new Ft(e);if(e instanceof te)return new Lt(e);if(e instanceof di)return new Ut(e.databaseId,e.key);throw t.createError("Unsupported field value: "+V(e))},e.prototype.parseArrayTransformElements=function(e,t){var n=this;return t.map((function(t,r){var o=new pi(ti.Argument,e,le.EMPTY_PATH);return n.parseData(t,o.childContextForArray(r))}))},e}();function yi(e){return"object"===typeof e&&null!==e&&!(e instanceof Array)&&!(e instanceof Date)&&!(e instanceof Se)&&!(e instanceof Vr)&&!(e instanceof te)&&!(e instanceof di)&&!(e instanceof ni)}
1function vi(e,t,n){if(!yi(n)||!q(n)){var r=V(n);throw"an object"===r?t.createError(e+" a custom object"):t.createError(e+" "+r)}}function gi(e,t){if(t instanceof Go)return t._internalPath;if("string"===typeof t)return bi(e,t);throw new _(E.INVALID_ARGUMENT,"Function "+e+"() called with invalid data. Field path arguments must be of type string or FieldPath.")}function bi(e,t){try{return function(e){if(e.search(Ko)>=0)throw new _(E.INVALID_ARGUMENT,"Invalid field path ("+e+"). Paths must not contain '~', '*', '/', '[', or ']'");try{return new(Go.bind.apply(Go,[void 0].concat(e.split("."))))}catch(t){throw new _(E.INVALID_ARGUMENT,"Invalid field path ("+e+"). Paths must not be empty, begin with '.', end with '.', or contain '..'")}}(t)._internalPath}catch(r){var n=wi(r);throw new _(E.INVALID_ARGUMENT,"Function "+e+"() called with invalid data. "+n)}}function wi(e){return e instanceof Error?e.message:e.toString()}var Ei="firestore.googleapis.com",_i=!0,Si=!0,Ti=!1,Oi=Nn.COLLECTION_DISABLED,ki=function(){function e(e){if(void 0===e.host){if(void 0!==e.ssl)throw new _(E.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host=Ei,this.ssl=_i}else j("settings","non-empty string","host",e.host),this.host=e.host,M("settings","boolean","ssl",e.ssl),this.ssl=O(e.ssl,_i);if(W("settings",e,["host","ssl","credentials","timestampsInSnapshots","cacheSizeBytes","experimentalForceLongPolling"]),M("settings","object","credentials",e.credentials),this.credentials=e.credentials,M("settings","boolean","timestampsInSnapshots",e.timestampsInSnapshots),!0===e.timestampsInSnapshots?m("\n The timestampsInSnapshots setting now defaults to true and you no\n longer need to explicitly set it. In a future release, the setting\n will be removed entirely and so it is recommended that you remove it\n from your firestore.settings() call now."):!1===e.timestampsInSnapshots&&m("\n The timestampsInSnapshots setting will soon be removed. YOU MUST UPDATE\n YOUR CODE.\n\n To hide this warning, stop using the timestampsInSnapshots setting in your\n firestore.settings({ ... }) call.\n\n Once you remove the setting, Timestamps stored in Cloud Firestore will be\n read back as Firebase Timestamp objects instead of as system Date objects.\n So you will also need to update code expecting a Date to instead expect a\n Timestamp. For example:\n\n // Old:\n const date = snapshot.get('created_at');\n // New:\n const timestamp = snapshot.get('created_at'); const date =\n timestamp.toDate();\n\n Please audit all existing usages of Date when you enable the new\n behavior."),this.timestampsInSnapshots=O(e.timestampsInSnapshots,Si),M("settings","number","cacheSizeBytes",e.cacheSizeBytes),void 0===e.cacheSizeBytes)this.cacheSizeBytes=Nn.DEFAULT_CACHE_SIZE_BYTES;else{if(e.cacheSizeBytes!==Oi&&e.cacheSizeBytes<Nn.MINIMUM_CACHE_SIZE_BYTES)throw new _(E.INVALID_ARGUMENT,"cacheSizeBytes must be at least "+Nn.MINIMUM_CACHE_SIZE_BYTES);this.cacheSizeBytes=e.cacheSizeBytes}M("settings","boolean","experimentalForceLongPolling",e.experimentalForceLongPolling),this.forceLongPolling=void 0===e.experimentalForceLongPolling?Ti:e.experimentalForceLongPolling}return e.prototype.isEqual=function(e){return this.host===e.host&&this.ssl===e.ssl&&this.timestampsInSnapshots===e.timestampsInSnapshots&&this.credentials===e.credentials&&this.cacheSizeBytes===e.cacheSizeBytes&&this.forceLongPolling===e.forceLongPolling},e}(),Ci=function(){function e(t){var n=this;if(this._firebaseApp=null,this._queue=new de,this.INTERNAL={delete:function(){return u.__awaiter(n,void 0,void 0,(function(){return u.__generator(this,(function(e){switch(e.label){case 0:return this.ensureClientConfigured(),[4,this._firestoreClient.terminate()];case 1:return e.sent(),[2]}}))}))}},"object"===typeof t.options){var r=t;this._firebaseApp=r,this._databaseId=e.databaseIdFromApp(r),this._persistenceKey=r.name,this._credentials=new $o(r)}else{var o=t;if(!o.projectId)throw new _(E.INVALID_ARGUMENT,"Must provide projectId");this._databaseId=new ie(o.projectId,o.database),this._persistenceKey="[DEFAULT]",this._credentials=new Yo}this._settings=new ki({}),this._dataConverter=this.createDataConverter(this._databaseId)}return e.prototype.settings=function(e){if(I("Firestore.settings",arguments,1
1),P("Firestore.settings","object",1,e),T(e,"persistence"))throw new _(E.INVALID_ARGUMENT,'"persistence" is now specified with a separate call to firestore.enablePersistence().');var t=new ki(e);if(this._firestoreClient&&!this._settings.isEqual(t))throw new _(E.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only call settings() before calling any other methods on a Firestore object.");this._settings=t,void 0!==t.credentials&&(this._credentials=Zo(t.credentials))},e.prototype.enableNetwork=function(){return this.ensureClientConfigured(),this._firestoreClient.enableNetwork()},e.prototype.disableNetwork=function(){return this.ensureClientConfigured(),this._firestoreClient.disableNetwork()},e.prototype.enablePersistence=function(e){if(this._firestoreClient)throw new _(E.FAILED_PRECONDITION,"Firestore has already been started and persistence can no longer be enabled. You can only call enablePersistence() before calling any other methods on a Firestore object.");var t=!1;return e&&(void 0!==e.experimentalTabSynchronization&&m("The 'experimentalTabSynchronization' setting has been renamed to 'synchronizeTabs'. In a future release, the setting will be removed and it is recommended that you update your firestore.enablePersistence() call to use 'synchronizeTabs'."),t=O(void 0!==e.synchronizeTabs?e.synchronizeTabs:e.experimentalTabSynchronization,!1)),this.configureClient(new Vo(this._settings.cacheSizeBytes,t))},e.prototype.clearPersistence=function(){var e=this,t=Fn.buildStoragePrefix(this.makeDatabaseInfo()),n=new he;return this._queue.enqueueAndForgetEvenAfterShutdown((function(){return u.__awaiter(e,void 0,void 0,(function(){var e;return u.__generator(this,(function(r){switch(r.label){case 0:if(r.trys.push([0,2,,3]),void 0!==this._firestoreClient&&!this._firestoreClient.clientTerminated)throw new _(E.FAILED_PRECONDITION,"Persistence cannot be cleared after this Firestore instance is initialized.");return[4,Fn.clearPersistence(t)];case 1:return r.sent(),n.resolve(),[3,3];case 2:return e=r.sent(),n.reject(e),[3,3];case 3:return[2]}}
1))}))})),n.promise},e.prototype.terminate=function(){return this.app._removeServiceInstance("firestore"),this.INTERNAL.delete()},Object.defineProperty(e.prototype,"_isTerminated",{get:function(){return this.ensureClientConfigured(),this._firestoreClient.clientTerminated},enumerable:!0,configurable:!0}),e.prototype.waitForPendingWrites=function(){return this.ensureClientConfigured(),this._firestoreClient.waitForPendingWrites()},e.prototype._onSnapshotsInSync=function(e){if(this.ensureClientConfigured(),ei(e))return this.onSnapshotsInSyncInternal(e);P("Firestore.onSnapshotsInSync","function",1,e);var t={next:e};return this.onSnapshotsInSyncInternal(t)},e.prototype.onSnapshotsInSyncInternal=function(e){var t=this,n=new Qo({next:function(){e.next&&e.next()},error:function(e){throw v("Uncaught Error in onSnapshotsInSync")}});return this._firestoreClient.addSnapshotsInSyncListener(n),function(){n.mute(),t._firestoreClient.removeSnapshotsInSyncListener(n)}},e.prototype.ensureClientConfigured=function(){return this._firestoreClient||this.configureClient(new zo),this._firestoreClient},e.prototype.makeDatabaseInfo=function(){return new re(this._databaseId,this._persistenceKey,this._settings.host,this._settings.ssl,this._settings.forceLongPolling)},e.prototype.configureClient=function(e){g(!!this._settings.host,"FirestoreSettings.host is not set"),g(!this._firestoreClient,"configureClient() called multiple times");var t=this.makeDatabaseInfo();return this._firestoreClient=new Wo(b.getPlatform(),t,this._credentials,this._queue),this._firestoreClient.start(e)},e.prototype.createDataConverter=function(e){return new mi((function(t){if(t instanceof Ii){var n=e,r=t.firestore._databaseId;if(!r.isEqual(n))throw new _(E.INVALID_ARGUMENT,"Document reference is for database "+r.projectId+"/"+r.database+" but should be for database "+n.projectId+"/"+n.database);return new di(e,t._key)}return t}))},e.databaseIdFromApp=function(e){var t=e.options;if(!T(t,"projectId"))throw new _(E.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');var n=t.projectId;if(!n||"string"!==typeof n)throw new _(E.INVALID_ARGUMENT,"projectId must be a string in FirebaseApp.options");return new ie(n)},Object.defineProperty(e.prototype,"app",{get:function(){if(!this._firebaseApp)throw new _(E.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._firebaseApp},enumerable:!0,configurable:!0}),e.prototype.collection=function(e){return I("Firestore.collection",arguments,1),P("Firestore.collection","non-empty string",1,e),this.ensureClientConfigured(),new Mi(se.fromString(e),this)},e.prototype.doc=function(e){return I("Firestore.doc",arguments,1),P("Firestore.doc","non-empty string",1,e),this.ensureClientConfigured(),Ii.forPath(se.fromString(e),this)},e.prototype.collectionGroup=function(e){if(I("Firestore.collectionGroup",arguments,1),P("Firestore.collectionGroup","non-empty string",1,e),e.indexOf("/")>=0)throw new _(E.INVALID_ARGUMENT,"Invalid collection ID '"+e+"' passed to function Firestore.collectionGroup(). Collection IDs must not contain '/'.");return this.ensureClientConfigured(),new Ri(new zr(se.EMPTY_PATH,e),this)},e.prototype.runTransaction=function(e){var t=this;return I("Firestore.runTransaction",arguments,1),P("Firestore.runTransaction","function",1,e),this.ensureClientConfigured().transaction((function(n){return e(new xi(t,n))}))},e.prototype.batch=function(){return this.ensureClientConfigured(),new Ai(this)},Object.defineProperty(e,"logLevel",{get:function(){switch(h()){case o.DEBUG:return"debug";case o.ERROR:return"error";case o.SILENT:return"silent";default:return v("Unknown log level: "+h())}},enumerable:!0,configurable:!0}),e.setLogLevel=function(e){switch(I("Firestore.setLogLevel",arguments,1),P("Firestore.setLogLevel","non-empty string",1,e),e){case"debug":p(o.DEBUG);break;case"error":p(o.ERROR);break;case"silent":p(o.SILENT);break;default:throw new _(E.INVALID_ARGUMENT,"Invalid log level: "+e)}},e.prototype._areTimestampsInSnapshotsEnabled=function(){return this._settings.timestampsInSnapshots},e}(),xi=function(){function e(e,t){this._firestore=e,this._transaction=t}return e.prototype.get=function(e){var t=this;
1I("Transaction.get",arguments,1);var n=Bi("Transaction.get",e,this._firestore);return this._transaction.lookup([n._key]).then((function(e){if(!e||1!==e.length)return v("Mismatch in docs returned from document lookup.");var r=e[0];if(r instanceof Wt)return new Di(t._firestore,n._key,null,!1,!1);if(r instanceof zt)return new Di(t._firestore,n._key,r,!1,!1);throw v("BatchGetDocumentsRequest returned unexpected document type: "+r.constructor.name)}))},e.prototype.set=function(e,t,n){D("Transaction.set",arguments,2,3);var r=Bi("Transaction.set",e,this._firestore),o=(n=Li("Transaction.set",n)).merge||n.mergeFields?this._firestore._dataConverter.parseMergeData("Transaction.set",t,n.mergeFields):this._firestore._dataConverter.parseSetData("Transaction.set",t);return this._transaction.set(r._key,o),this},e.prototype.update=function(e,t,n){for(var r,o,i=[],a=3;a<arguments.length;a++)i[a-3]=arguments[a];return"string"===typeof t||t instanceof Go?(N("Transaction.update",arguments,3),r=Bi("Transaction.update",e,this._firestore),o=this._firestore._dataConverter.parseUpdateVarargs("Transaction.update",t,n,i)):(I("Transaction.update",arguments,2),r=Bi("Transaction.update",e,this._firestore),o=this._firestore._dataConverter.parseUpdateData("Transaction.update",t)),this._transaction.update(r._key,o),this},e.prototype.delete=function(e){I("Transaction.delete",arguments,1);var t=Bi("Transaction.delete",e,this._firestore);return this._transaction.delete(t._key),this},e}(),Ai=function(){function e(e){this._firestore=e,this._mutations=[],this._committed=!1}return e.prototype.set=function(e,t,n){D("WriteBatch.set",arguments,2,3),this.verifyNotCommitted();var r=Bi("WriteBatch.set",e,this._firestore),o=(n=Li("WriteBatch.set",n)).merge||n.mergeFields?this._firestore._dataConverter.parseMergeData("WriteBatch.set",t,n.mergeFields):this._firestore._dataConverter.parseSetData("WriteBatch.set",t);return this._mutations=this._mutations.concat(o.toMutations(r._key,wt.NONE)),this},e.prototype.update=function(e,t,n){for(var r,o,i=[],a=3;a<arguments.length;a++)i[a-3]=arguments[a];return this.verifyNotCommitted(),"string"===typeof t||t instanceof Go?(N("WriteBatch.update",arguments,3),r=Bi("WriteBatch.update",e,this._firestore),o=this._firestore._dataConverter.parseUpdateVarargs("WriteBatch.update",t,n,i)):(I("WriteBatch.update",arguments,2),r=Bi("WriteBatch.update",e,this._firestore),o=this._firestore._dataConverter.parseUpdateData("WriteBatch.update",t)),this._mutations=this._mutations.concat(o.toMutations(r._key,wt.exists(!0))),this},e.prototype.delete=function(e){I("WriteBatch.delete",arguments,1),this.verifyNotCommitted();var t=Bi("WriteBatch.delete",e,this._firestore);return this._mutations=this._mutations.concat(new Ot(t._key,wt.NONE)),this},e.prototype.commit=function(){return u.__awaiter(this,void 0,void 0,(function(){return u.__generator(this,(function(e){return this.verifyNotCommitted(),this._committed=!0,this._mutations.length>0?[2,this._firestore.ensureClientConfigured().write(this._mutations)]:[2]}))}))},e.prototype.verifyNotCommitted=function(){if(this._committed)throw new _(E.FAILED_PRECONDITION,"A write batch can no longer be used after commit() has been called.")},e}(),Ii=function(){function e(e,t){this._key=e,this.firestore=t,this._firestoreClient=this.firestore.ensureClientConfigured()}return e.forPath=function(t,n){if(t.length%2!==0)throw new _(E.INVALID_ARGUMENT,"Invalid document reference. Document references must have an even number of segments, but "+t.canonicalString()+" has "+t.length);return new e(new fe(t),n)},Object.defineProperty(e.prototype,"id",{get:function(){return this._key.path.lastSegment()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return new Mi(this._key.path.popLast(),this.firestore)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this._key.path.canonicalString()},enumerable:!0,configurable:!0}),e.prototype.collection=function(e){if(I("DocumentReference.collection",arguments,1),P("DocumentReference.collection","non-empty string",1,e),!e)throw new _(E.INVALID_ARGUMENT,"Must provide a non-empty collection name to collection()");var t=se.fromString(e);
1return new Mi(this._key.path.child(t),this.firestore)},e.prototype.isEqual=function(t){if(!(t instanceof e))throw Q("isEqual","DocumentReference",1,t);return this.firestore===t.firestore&&this._key.isEqual(t._key)},e.prototype.set=function(e,t){D("DocumentReference.set",arguments,1,2);var n=(t=Li("DocumentReference.set",t)).merge||t.mergeFields?this.firestore._dataConverter.parseMergeData("DocumentReference.set",e,t.mergeFields):this.firestore._dataConverter.parseSetData("DocumentReference.set",e);return this._firestoreClient.write(n.toMutations(this._key,wt.NONE))},e.prototype.update=function(e,t){for(var n,r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];return"string"===typeof e||e instanceof Go?(N("DocumentReference.update",arguments,2),n=this.firestore._dataConverter.parseUpdateVarargs("DocumentReference.update",e,t,r)):(I("DocumentReference.update",arguments,1),n=this.firestore._dataConverter.parseUpdateData("DocumentReference.update",e)),this._firestoreClient.write(n.toMutations(this._key,wt.exists(!0)))},e.prototype.delete=function(){return I("DocumentReference.delete",arguments,0),this._firestoreClient.write([new Ot(this._key,wt.NONE)])},e.prototype.onSnapshot=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];D("DocumentReference.onSnapshot",arguments,1,4);var n,r={includeMetadataChanges:!1},o=0;"object"!==typeof e[o]||ei(e[o])||(W("DocumentReference.onSnapshot",r=e[o],["includeMetadataChanges"]),M("DocumentReference.onSnapshot","boolean","includeMetadataChanges",r.includeMetadataChanges),o++);var i={includeMetadataChanges:r.includeMetadataChanges};return ei(e[o])?n=e[o]:(P("DocumentReference.onSnapshot","function",o,e[o]),R("DocumentReference.onSnapshot","function",o+1,e[o+1]),R("DocumentReference.onSnapshot","function",o+2,e[o+2]),n={next:e[o],error:e[o+1],complete:e[o+2]}),this.onSnapshotInternal(i,n)},e.prototype.onSnapshotInternal=function(e,t){var n=this,r=function(e){console.error("Uncaught Error in onSnapshot:",e)};t.error&&(r=t.error.bind(t));var o=new Qo({next:function(e){if(t.next){g(e.docs.size<=1,"Too many documents returned on a document query");var r=e.docs.get(n._key);t.next(new Di(n.firestore,n._key,r,e.fromCache,e.hasPendingWrites))}},error:r}),i=this._firestoreClient.listen(zr.atPath(this._key.path),o,e);return function(){o.mute(),n._firestoreClient.unlisten(i)}},e.prototype.get=function(e){var t=this;return D("DocumentReference.get",arguments,0,1),Fi("DocumentReference.get",e),new Promise((function(n,r){e&&"cache"===e.source?t.firestore.ensureClientConfigured().getDocumentFromLocalCache(t._key).then((function(e){n(new Di(t.firestore,t._key,e,!0,e instanceof zt&&e.hasLocalMutations))}),r):t.getViaSnapshotListener(n,r,e)}))},e.prototype.getViaSnapshotListener=function(e,t,n){var r=this.onSnapshotInternal({includeMetadataChanges:!0,waitForSyncWhenOnline:!0},{next:function(o){r(),!o.exists&&o.metadata.fromCache?t(new _(E.UNAVAILABLE,"Failed to get document because the client is offline.")):o.exists&&o.metadata.fromCache&&n&&"server"===n.source?t(new _(E.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):e(o)},error:t})},e}(),Ni=function(){function e(e,t){this.hasPendingWrites=e,this.fromCache=t}return e.prototype.isEqual=function(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache},e}(),Di=function(){function e(e,t,n,r,o){this._firestore=e,this._key=t,this._document=n,this._fromCache=r,this._hasPendingWrites=o}return e.prototype.data=function(e){return D("DocumentSnapshot.data",arguments,0,1),e=Ui("DocumentSnapshot.data",e),this._document?this.convertObject(this._document.data(),kt.fromSnapshotOptions(e,this._firestore._areTimestampsInSnapshotsEnabled())):void 0},e.prototype.get=function(e,t){if(D("DocumentSnapshot.get",arguments,1,2),t=Ui("DocumentSnapshot.get",t),this._document){var n=this._document.data().field(gi("DocumentSnapshot.get",e));if(null!==n)return this.convertValue(n,kt.fromSnapshotOptions(t,this._firestore._areTimestampsInSnapshotsEnabled()))}},Object.defineProperty(e.prototype,"id",{get:function(){return this._key.path.lastSegment()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ref",{get:function(){return new Ii(this._key,this._firestore)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"exists",{get:function(){return null!==this._document},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"metadata",{get:function(){return new Ni(this._hasPendingWrites,this._fromCache)},enumerable:!0,configurable:!0}),e.prototype.isEqual=function(t){if(!(t instanceof e))throw Q("isEqual","DocumentSnapshot",1,t);return this._firestore===t._firestore&&this._fromCache===t._fromCache&&this._key.isEqual(t._key)&&(null===this._document?null===t._document:this._document.isEqual(t._document))},e.prototype.convertObject=function(e,t){var n=this,r={};return e.forEach((function(e,o){r[e]=n.convertValue(o,t)})),r},e.prototype.convertValue=function(e,t){if(e instanceof Bt)return this.convertObject(e,t);if(e instanceof qt)return this.convertArray(e,t);if(e instanceof Ut){var n=e.value(t),r=this._firestore.ensureClientConfigured().databaseId();return e.databaseId.isEqual(r)||m("Document "+this._key.path+" contains a document reference within a different database ("+e.databaseId.projectId+"/"+e.databaseId.database+") which is not supported. It will be treated as a reference in the current database ("+r.projectId+"/"+r.database+") instead."),new Ii(n,this._firestore)}return e.value(t)},e.prototype.convertArray=function(e,t){var n=this;return e.internalValue.map((function(e){return n.convertValue(e,t)}))},e}(),Pi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u.__extends(t,e),t.prototype.data=function(t){var n=e.prototype.data.call(this,t);return g("object"===typeof n,"Document in a QueryDocumentSnapshot should exist"),n},t}(Di),Ri=function(){function e(e,t){this._query=e,this.firestore=t}return e.prototype.where=function(t,n,r){if(I("Query.where",arguments,3),z("Query.where",3,r),"in"!==n&&"array-contains-any"!==n){var o=["<","<=","==",">=",">","array-contains"];F("Query.where",o,2,n)}var i,a=gi("Query.where",t),u=Qr.fromString(n);
1if(a.isKeyField()){if(u===Qr.ARRAY_CONTAINS||u===Qr.ARRAY_CONTAINS_ANY)throw new _(E.INVALID_ARGUMENT,"Invalid Query. You can't perform '"+u.toString()+"' queries on FieldPath.documentId().");if(u===Qr.IN){this.validateDisjunctiveFilterElements(r,u);for(var s=[],c=0,l=r;c<l.length;c++){var f=l[c];s.push(this.parseDocumentIdValue(f))}i=new qt(s)}else i=this.parseDocumentIdValue(r)}else u!==Qr.IN&&u!==Qr.ARRAY_CONTAINS_ANY||this.validateDisjunctiveFilterElements(r,u),i=this.firestore._dataConverter.parseQueryValue("Query.where",r);var h=Gr.create(a,u,i);return this.validateNewFilter(h),new e(this._query.addFilter(h),this.firestore)},e.prototype.orderBy=function(t,n){var r;if(D("Query.orderBy",arguments,1,2),R("Query.orderBy","non-empty string",2,n),void 0===n||"asc"===n)r=Jr.ASCENDING;else{if("desc"!==n)throw new _(E.INVALID_ARGUMENT,"Function Query.orderBy() has unknown direction '"+n+"', expected 'asc' or 'desc'.");r=Jr.DESCENDING}if(null!==this._query.startAt)throw new _(E.INVALID_ARGUMENT,"Invalid query. You must not call Query.startAt() or Query.startAfter() before calling Query.orderBy().");if(null!==this._query.endAt)throw new _(E.INVALID_ARGUMENT,"Invalid query. You must not call Query.endAt() or Query.endBefore() before calling Query.orderBy().");var o=gi("Query.orderBy",t),i=new eo(o,r);return this.validateNewOrderBy(i),new e(this._query.addOrderBy(i),this.firestore)},e.prototype.limit=function(t){if(I("Query.limit",arguments,1),P("Query.limit","number",1,t),t<=0)throw new _(E.INVALID_ARGUMENT,"Invalid Query. Query limit ("+t+") is invalid. Limit must be positive.");return new e(this._query.withLimit(t),this.firestore)},e.prototype.startAt=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];N("Query.startAt",arguments,1);var o=this.boundFromDocOrFields("Query.startAt",t,n,!0);return new e(this._query.withStartAt(o),this.firestore)},e.prototype.startAfter=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];N("Query.startAfter",arguments,1);var o=this.boundFromDocOrFields("Query.startAfter",t,n,!1);return new e(this._query.withStartAt(o),this.firestore)},e.prototype.endBefore=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];N("Query.endBefore",arguments,1);var o=this.boundFromDocOrFields("Query.endBefore",t,n,!0);return new e(this._query.withEndAt(o),this.firestore)},e.prototype.endAt=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];N("Query.endAt",arguments,1);var o=this.boundFromDocOrFields("Query.endAt",t,n,!1);return new e(this._query.withEndAt(o),this.firestore)},e.prototype.isEqual=function(t){if(!(t instanceof e))throw Q("isEqual","Query",1,t);return this.firestore===t.firestore&&this._query.isEqual(t._query)},e.prototype.boundFromDocOrFields=function(e,t,n,r){if(z(e,1,t),t instanceof Di){if(n.length>0)throw new _(E.INVALID_ARGUMENT,"Too many arguments provided to "+e+"().");var o=t;if(!o.exists)throw new _(E.NOT_FOUND,"Can't use a DocumentSnapshot that doesn't exist for "+e+"().");return this.boundFromDocument(e,o._document,r)}var i=[t].concat(n);return this.boundFromFields(e,i,r)},e.prototype.boundFromDocument=function(e,t,n){for(var r=[],o=0,i=this._query.orderBy;o<i.length;o++){var a=i[o];if(a.field.isKeyField())r.push(new Ut(this.firestore._databaseId,t.key));else{var u=t.field(a.field);if(u instanceof Mt)throw new _(E.INVALID_ARGUMENT,'Invalid query. You are trying to start or end a query using a document for which the field "'+a.field+'" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');if(null===u){var s=a.field.canonicalString();throw new _(E.INVALID_ARGUMENT,"Invalid query. You are trying to start or end a query using a document for which the field '"+s+"' (used as the orderBy) does not exist.")}r.push(u)}}return new Zr(r,n)},e.prototype.boundFromFields=function(e,t,n){var r=this._query.explicitOrderBy;if(t.length>r.length)throw new _(E.INVALID_ARGUMENT,"Too many arguments provided to "+e+"(). The number of arguments must be less than or equal to the number of Query.orderBy() clauses");for(var o=[],i=0;i<t.length;i++){var a=t[i];
1if(r[i].field.isKeyField()){if("string"!==typeof a)throw new _(E.INVALID_ARGUMENT,"Invalid query. Expected a string for document ID in "+e+"(), but got a "+typeof a);if(!this._query.isCollectionGroupQuery()&&-1!==a.indexOf("/"))throw new _(E.INVALID_ARGUMENT,"Invalid query. When querying a collection and ordering by FieldPath.documentId(), the value passed to "+e+"() must be a plain document ID, but '"+a+"' contains a slash.");var u=this._query.path.child(se.fromString(a));if(!fe.isDocumentKey(u))throw new _(E.INVALID_ARGUMENT,"Invalid query. When querying a collection group and ordering by FieldPath.documentId(), the value passed to "+e+"() must result in a valid document path, but '"+u+"' is not because it contains an odd number of segments.");var s=new fe(u);o.push(new Ut(this.firestore._databaseId,s))}else{var c=this.firestore._dataConverter.parseQueryValue(e,a);o.push(c)}}return new Zr(o,n)},e.prototype.onSnapshot=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];D("Query.onSnapshot",arguments,1,4);var n,r={},o=0;return"object"!==typeof e[o]||ei(e[o])||(W("Query.onSnapshot",r=e[o],["includeMetadataChanges"]),M("Query.onSnapshot","boolean","includeMetadataChanges",r.includeMetadataChanges),o++),ei(e[o])?n=e[o]:(P("Query.onSnapshot","function",o,e[o]),R("Query.onSnapshot","function",o+1,e[o+1]),R("Query.onSnapshot","function",o+2,e[o+2]),n={next:e[o],error:e[o+1],complete:e[o+2]}),this.onSnapshotInternal(r,n)},e.prototype.onSnapshotInternal=function(e,t){var n=this,r=function(e){console.error("Uncaught Error in onSnapshot:",e)};t.error&&(r=t.error.bind(t));var o=new Qo({next:function(e){t.next&&t.next(new ji(n.firestore,n._query,e))},error:r}),i=this.firestore.ensureClientConfigured(),a=i.listen(this._query,o,e);return function(){o.mute(),i.unlisten(a)}},e.prototype.get=function(e){var t=this;return D("Query.get",arguments,0,1),Fi("Query.get",e),new Promise((function(n,r){e&&"cache"===e.source?t.firestore.ensureClientConfigured().getDocumentsFromLocalCache(t._query).then((function(e){n(new ji(t.firestore,t._query,e))}),r):t.getViaSnapshotListener(n,r,e)}))},e.prototype.getViaSnapshotListener=function(e,t,n){var r=this.onSnapshotInternal({includeMetadataChanges:!0,waitForSyncWhenOnline:!0},{next:function(o){r(),o.metadata.fromCache&&n&&"server"===n.source?t(new _(E.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):e(o)},error:t})},e.prototype.parseDocumentIdValue=function(e){if("string"===typeof e){if(""===e)throw new _(E.INVALID_ARGUMENT,"Invalid query. When querying with FieldPath.documentId(), you must provide a valid document ID, but it was an empty string.");if(!this._query.isCollectionGroupQuery()&&-1!==e.indexOf("/"))throw new _(E.INVALID_ARGUMENT,"Invalid query. When querying a collection by FieldPath.documentId(), you must provide a plain document ID, but '"+e+"' contains a '/' character.");var t=this._query.path.child(se.fromString(e));if(!fe.isDocumentKey(t))throw new _(E.INVALID_ARGUMENT,"Invalid query. When querying a collection group by FieldPath.documentId(), the value provided must result in a valid document path, but '"+t+"' is not because it has an odd number of segments ("+t.length+").");return new Ut(this.firestore._databaseId,new fe(t))}if(e instanceof Ii){var n=e;return new Ut(this.firestore._databaseId,n._key)}throw new _(E.INVALID_ARGUMENT,"Invalid query. When querying with FieldPath.documentId(), you must provide a valid string or a DocumentReference, but it was: "+V(e)+".")},e.prototype.validateDisjunctiveFilterElements=function(e,t){if(!Array.isArray(e)||0===e.length)throw new _(E.INVALID_ARGUMENT,"Invalid Query. A non-empty array is required for '"+t.toString()+"' filters.");if(e.length>10)throw new _(E.INVALID_ARGUMENT,"Invalid Query. '"+t.toString()+"' filters support a maximum of 10 elements in the value array.");if(e.indexOf(null)>=0)throw new _(E.INVALID_ARGUMENT,"Invalid Query. '"+t.toString()+"' filters cannot contain 'null' in the value array.");if(e.filter((function(e){return Number.isNaN(e)})).length>0)throw new _(E.INVALID_ARGUMENT,"Invalid Query. '"+t.toString()+"' filters cannot contain 'NaN' in the value array.")},e.prototype.validateNewFilter=function(e){if(e instanceof Gr){var t=[Qr.ARRAY_CONTAINS,Qr.ARRAY_CONTAINS_ANY],n=[Qr.IN,Qr.ARRAY_CONTAINS_ANY],r=t.indexOf(e.op)>=0,o=n.indexOf(e.op)>=0;if(e.isInequality()){var i=this._query.getInequalityFilterField();if(null!==i&&!i.isEqual(e.field))throw new _(E.INVALID_ARGUMENT,"Invalid query. All where filters with an inequality (<, <=, >, or >=) must be on the same field. But you have inequality filters on '"+i.toString()+"' and '"+e.field.toString()+"'");var a=this._query.getFirstOrderByField();null!==a&&this.validateOrderByAndInequalityMatch(e.field,a)}else if(o||r){var u=null;if(o&&(u=this._query.findFilterOperator(n)),null===u&&r&&(u=this._query.findFilterOperator(t)),null!=u)throw u===e.op?new _(E.INVALID_ARGUMENT,"Invalid query. You cannot use more than one '"+e.op.toString()+"' filter."):new _(E.INVALID_ARGUMENT,"Invalid query. You cannot use '"+e.op.toString()+"' filters with '"+u.toString()+"' filters.")}}},e.prototype.validateNewOrderBy=function(e){if(null===this._query.getFirstOrderByField()){var t=this._query.getInequalityFilterField();null!==t&&this.validateOrderByAndInequalityMatch(t,e.field)}},e.prototype.validateOrderByAndInequalityMatch=function(e,t){if(!t.isEqual(e))throw new _(E.INVALID_ARGUMENT,"Invalid query. You have a where filter with an inequality (<, <=, >, or >=) on field '"+e.toString()+"' and so you must also use '"+e.toString()+"' as your first Query.orderBy(), but your first Query.orderBy() is on field '"+t.toString()+"' instead.")},e}(),ji=function(){function e(e,t,n){this._firestore=e,this._originalQuery=t,this._snapshot=n,this._cachedChanges=null,this._cachedChangesIncludeMetadataChanges=null,this.metadata=new Ni(n.hasPendingWrites,n.fromCache)}return Object.defineProperty(e.prototype,"docs",{get:function(){var e=[];return this.forEach((function(t){return e.push(t)})),e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"empty",{get:function(){return this._snapshot.docs.isEmpty()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this._snapshot.docs.size},enumerable:!0,configurable:!0}),e.prototype.forEach=function(e,t){var n=this;
1D("QuerySnapshot.forEach",arguments,1,2),P("QuerySnapshot.forEach","function",1,e),this._snapshot.docs.forEach((function(r){e.call(t,n.convertToDocumentImpl(r))}))},Object.defineProperty(e.prototype,"query",{get:function(){return new Ri(this._originalQuery,this._firestore)},enumerable:!0,configurable:!0}),e.prototype.docChanges=function(e){e&&(W("QuerySnapshot.docChanges",e,["includeMetadataChanges"]),M("QuerySnapshot.docChanges","boolean","includeMetadataChanges",e.includeMetadataChanges));var t=!(!e||!e.includeMetadataChanges);if(t&&this._snapshot.excludesMetadataChanges)throw new _(E.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===t||(this._cachedChanges=function(e,t,n){if(n.oldDocs.isEmpty()){var r,o=0;return n.docChanges.map((function(t){var i=new Pi(e,t.doc.key,t.doc,n.fromCache,n.mutatedKeys.has(t.doc.key));return g(t.type===Or.Added,"Invalid event type for first snapshot"),g(!r||n.query.docComparator(r,t.doc)<0,"Got added events in wrong order"),r=t.doc,{type:"added",doc:i,oldIndex:-1,newIndex:o++}}))}var i=n.oldDocs;return n.docChanges.filter((function(e){return t||e.type!==Or.Metadata})).map((function(t){var r=new Pi(e,t.doc.key,t.doc,n.fromCache,n.mutatedKeys.has(t.doc.key)),o=-1,a=-1;return t.type!==Or.Added&&(g((o=i.indexOf(t.doc.key))>=0,"Index for document not found"),i=i.delete(t.doc.key)),t.type!==Or.Removed&&(a=(i=i.add(t.doc)).indexOf(t.doc.key)),{type:qi(t.type),doc:r,oldIndex:o,newIndex:a}}))}(this._firestore,t,this._snapshot),this._cachedChangesIncludeMetadataChanges=t),this._cachedChanges},e.prototype.isEqual=function(t){if(!(t instanceof e))throw Q("isEqual","QuerySnapshot",1,t);return this._firestore===t._firestore&&this._originalQuery.isEqual(t._originalQuery)&&this._snapshot.isEqual(t._snapshot)},e.prototype.convertToDocumentImpl=function(e){return new Pi(this._firestore,e.key,e,this.metadata.fromCache,this._snapshot.mutatedKeys.has(e.key))},e}();["length","forEach","map"].concat("undefined"!==typeof Symbol?[Symbol.iterator]:[]).forEach((function(e){try{Object.defineProperty(ji.prototype.docChanges,e,{get:function(){return function(){throw new _(E.INVALID_ARGUMENT,'QuerySnapshot.docChanges has been changed from a property into a method, so usages like "querySnapshot.docChanges" should become "querySnapshot.docChanges()"')}()}})}catch(t){}}));var Mi=function(e){function t(t,n){var r=e.call(this,zr.atPath(t),n)||this;if(t.length%2!==1)throw new _(E.INVALID_ARGUMENT,"Invalid collection reference. Collection references must have an odd number of segments, but "+t.canonicalString()+" has "+t.length);return r}return u.__extends(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this._query.path.lastSegment()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){var e=this._query.path.popLast();return e.isEmpty()?null:new Ii(new fe(e),this.firestore)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return this._query.path.canonicalString()},enumerable:!0,configurable:!0}),t.prototype.doc=function(e){if(D("CollectionReference.doc",arguments,0,1),0===arguments.length&&(e=H.newId()),P("CollectionReference.doc","non-empty string",1,e),""===e)throw new _(E.INVALID_ARGUMENT,"Document path must be a non-empty string");var t=se.fromString(e);return Ii.forPath(this._query.path.child(t),this.firestore)},t.prototype.add=function(e){I("CollectionReference.add",arguments,1),P("CollectionReference.add","object",1,e);var t=this.doc();return t.set(e).then((function(){return t}))},t}(Ri);function Li(e,t){if(void 0===t)return{merge:!1};if(W(e,t,["merge","mergeFields"]),M(e,"boolean","merge",t.merge),L(e,"mergeFields","a string or a FieldPath",t.mergeFields,(function(e){return"string"===typeof e||e instanceof Go})),void 0!==t.mergeFields&&void 0!==t.merge)throw new _(E.INVALID_ARGUMENT,"Invalid options passed to function "+e+'(): You cannot specify both "merge" and "mergeFields".');return t}function Ui(e,t){return void 0===t?{}:(W(e,t,["serverTimestamps"]),U(e,0,"serverTimestamps",t.serverTimestamps,["estimate","previous","none"]),t)}function Fi(e,t){R(e,"object",1,t),t&&(W(e,t,["source"]),U(e,0,"source",t.source,["default","server","cache"]))}function Bi(e,t,n){if(t instanceof Ii){if(t.firestore!==n)throw new _(E.INVALID_ARGUMENT,"Provided document reference is from a different Firestore instance.");return t}throw Q(e,"DocumentReference",1,t)}function qi(e){switch(e){case Or.Added:return"added";case Or.Modified:case Or.Metadata:return"modified";case Or.Removed:return"removed";default:return v("Unknown change type: "+e)}}var Vi=S(Ci,"Use firebase.firestore() instead."),zi=S(xi,"Use firebase.firestore().runTransaction() instead."),Wi=S(Ai,"Use firebase.firestore().batch() instead."),Qi=S(Ii,"Use firebase.firestore().doc() instead."),Gi=S(Di),Ki=S(Pi),Hi=S(Ri),Yi=S(ji),$i=S(Mi,"Use firebase.firestore().collection() instead."),Xi={Firestore:Vi,GeoPoint:Vr,Timestamp:Se,Blob:ne,Transaction:zi,WriteBatch:Wi,DocumentReference:Qi,DocumentSnapshot:Gi,Query:Hi,QueryDocumentSnapshot:Ki,QuerySnapsh
1ot:Yi,CollectionReference:$i,FieldPath:Go,FieldValue:si,setLogLevel:Ci.setLogLevel,CACHE_SIZE_UNLIMITED:Oi};function Ji(e){e.INTERNAL.registerService("firestore",(function(e){return new Ci(e)}),function(e){g(e&&"object"===typeof e,"shallowCopy() expects object parameter.");var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}(Xi))}var Zi=function(){function e(){}return e.prototype.addCallback=function(e){},e.prototype.shutdown=function(){},e}(),ea=function(){function e(){var e=this;this.networkAvailableListener=function(){return e.onNetworkAvailable()},this.networkUnavailableListener=function(){return e.onNetworkUnavailable()},this.callbacks=[],this.configureNetworkMonitoring()}return e.prototype.addCallback=function(e){this.callbacks.push(e)},e.prototype.shutdown=function(){window.removeEventListener("online",this.networkAvailableListener),window.removeEventListener("offline",this.networkUnavailableListener)},e.prototype.configureNetworkMonitoring=function(){window.addEventListener("online",this.networkAvailableListener),window.addEventListener("offline",this.networkUnavailableListener)},e.prototype.onNetworkAvailable=function(){d("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(var e=0,t=this.callbacks;e<t.length;e++){(0,t[e])(0)}},e.prototype.onNetworkUnavailable=function(){d("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(var e=0,t=this.callbacks;e<t.length;e++){(0,t[e])(1)}},e.isAvailable=function(){return"undefined"!==typeof window&&void 0!==window.addEventListener&&void 0!==window.removeEventListener},e}(),ta=function(){function e(e){this.sendFn=e.sendFn,this.closeFn=e.closeFn}return e.prototype.onOpen=function(e){g(!this.wrappedOnOpen,"Called onOpen on stream twice!"),this.wrappedOnOpen=e},e.prototype.onClose=function(e){g(!this.wrappedOnClose,"Called onClose on stream twice!"),this.wrappedOnClose=e},e.prototype.onMessage=function(e){g(!this.wrappedOnMessage,"Called onMessage on stream twice!"),this.wrappedOnMessage=e},e.prototype.close=function(){this.closeFn()},e.prototype.send=function(e){this.sendFn(e)},e.prototype.callOnOpen=function(){g(void 0!==this.wrappedOnOpen,"Cannot call onOpen because no callback was set"),this.wrappedOnOpen()},e.prototype.callOnClose=function(e){g(void 0!==this.wrappedOnClose,"Cannot call onClose because no callback was set"),this.wrappedOnClose(e)},e.prototype.callOnMessage=function(e){g(void 0!==this.wrappedOnMessage,"Cannot call onMessage because no callback was set"),this.wrappedOnMessage(e)},e}(),na="Connection",ra={BatchGetDocuments:"batchGet",Commit:"commit"},oa="gl-js/ fire/"+l,ia=function(){function e(e){this.databaseId=e.databaseId;var t=e.ssl?"https":"http";this.baseUrl=t+"://"+e.host,this.forceLongPolling=e.forceLongPolling}return e.prototype.modifyHeadersForRequest=function(e,t){if(t)for(var n in t.authHeaders)t.authHeaders.hasOwnProperty(n)&&(e[n]=t.authHeaders[n]);e["X-Goog-Api-Client"]=oa},e.prototype.invokeRPC=function(e,t,n){var r=this,o=this.makeUrl(e);return new Promise((function(i,a){var u=new c.XhrIo;u.listenOnce(c.EventType.COMPLETE,(function(){try{switch(u.getLastErrorCode()){case c.ErrorCode.NO_ERROR:var t=u.getResponseJson();d(na,"XHR received:",JSON.stringify(t)),i(t);break;case c.ErrorCode.TIMEOUT:d(na,'RPC "'+e+'" timed out'),a(new _(E.DEADLINE_EXCEEDED,"Request time out"));break;case c.ErrorCode.HTTP_ERROR:var n=u.getStatus();if(d(na,'RPC "'+e+'" failed with status:',n,"response text:",u.getResponseText()),n>0){var r=u.getResponseJson().error;if(r&&r.status&&r.message){var o=function(e){var t=e.toLowerCase().replace("_","-");return Object.values(E).indexOf(t)>=0?t:E.UNKNOWN}(r.status);a(new _(o,r.message))}else a(new _(E.UNKNOWN,"Server responded with status "+u.getStatus()))}else d(na,'RPC "'+e+'" failed'),a(new _(E.UNAVAILABLE,"Connection failed."));break;default:v('RPC "'+e+'" failed with unanticipated webchannel error '+u.getLastErrorCode()+": "+u.getLastError()+", giving up.")}}finally{d(na,'RPC "'+e+'" completed.')}}));var s=JSON.stringify(t);d(na,"XHR sending: ",o+" "+s);var l={"Content-Type":"text/plain"};r.modifyHeadersForRequest(l,n),u.send(o,"POST",s,l,15)}))},e.prototype.invokeStreamingRPC=function(e,t,n){return this.invokeRPC(e,t,n)},e.prototype.openStream=function(e,t){var n=[this.baseUrl,"/","google.firestore.v1.Firestore","/",e,"/channel"],r=c.createWebChannelTransport(),o={backgroundChannelTest:!0,httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:"projects/"+this.databaseId.projectId+"/databases/"+this.databaseId.database}
1,sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling};this.modifyHeadersForRequest(o.initMessageHeaders,t),s.isReactNative()||(o.httpHeadersOverwriteParam="$httpHeaders");var i=n.join("");d(na,"Creating WebChannel: "+i+" "+o);var a=r.createWebChannel(i,o),u=!1,l=!1,f=new ta({sendFn:function(e){l?d(na,"Not sending because WebChannel is closed:",e):(u||(d(na,"Opening WebChannel transport."),a.open(),u=!0),d(na,"WebChannel sending:",e),a.send(e))},closeFn:function(){return a.close()}}),h=function(e,t){a.listen(e,(function(e){try{t(e)}catch(n){setTimeout((function(){throw n}),0)}}))};return h(c.WebChannel.EventType.OPEN,(function(){l||d(na,"WebChannel transport opened.")})),h(c.WebChannel.EventType.CLOSE,(function(){l||(l=!0,d(na,"WebChannel transport closed"),f.callOnClose())})),h(c.WebChannel.EventType.ERROR,(function(e){l||(l=!0,d(na,"WebChannel transport errored:",e),f.callOnClose(new _(E.UNAVAILABLE,"The operation could not be completed")))})),h(c.WebChannel.EventType.MESSAGE,(function(e){if(!l){var t=e.data[0];g(!!t,"Got a webchannel message without data.");var n=t,r=n.error||n[0]&&n[0].error;if(r){d(na,"WebChannel received error:",r);var o=r.status,i=function(e){var t=wr[e];if(void 0!==t)return Sr(t)}(o),u=r.message;void 0===i&&(i=E.INTERNAL,u="Unknown error status: "+o+" with message "+r.message),l=!0,f.callOnClose(new _(i,u)),a.close()}else d(na,"WebChannel received:",t),f.callOnMessage(t)}})),setTimeout((function(){f.callOnOpen()}),0),f},e.prototype.makeUrl=function(e){var t=ra[e];g(void 0!==t,"Unknown REST mapping for: "+e);var n=[this.baseUrl,"/","v1"];return n.push("/projects/"),n.push(this.databaseId.projectId),n.push("/databases/"),n.push(this.databaseId.database),n.push("/documents"),n.push(":"),n.push(t),n.join("")},e}(),aa=function(){function e(){this.emptyByteString="",this.base64Available="undefined"!==typeof atob}return Object.defineProperty(e.prototype,"document",{get:function(){return"undefined"!==typeof document?document:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"window",{get:function(){return"undefined"!==typeof window?window:null},enumerable:!0,configurable:!0}),e.prototype.loadConnection=function(e){return Promise.resolve(new ia(e))},e.prototype.newConnectivityMonitor=function(){return ea.isAvailable()?new ea:new Zi},e.prototype.newSerializer=function(e){return new mo(e,{useProto3Json:!0})},e.prototype.formatJSON=function(e){return JSON.stringify(e)},e.prototype.atob=function(e){return atob(e)},e.prototype.btoa=function(e){return btoa(e)},e}();function ua(e){Ji(e)}b.setPlatform(new aa),ua(i),t.registerFirestore=ua},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return o})),n.d(t,"__assign",(function(){return i})),n.d(t,"__rest",(function(){return a})),n.d(t,"__decorate",(function(){return u})),n.d(t,"__param",(function(){return s})),n.d(t,"__metadata",(function(){return c})),n.d(t,"__awaiter",(function(){return l})),n.d(t,"__generator",(function(){return f})),n.d(t,"__exportStar",(function(){return h})),n.d(t,"__values",(function(){return p})),n.d(t,"__read",(function(){return d})),n.d(t,"__spread",(function(){return m})),n.d(t,"__spreadArrays",(function(){return y})),n.d(t,"__await",(function(){return v})),n.d(t,"__asyncGenerator",(function(){return g})),n.d(t,"__asyncDelegator",(function(){return b})),n.d(t,"__asyncValues",(function(){return w}
1)),n.d(t,"__makeTemplateObject",(function(){return E})),n.d(t,"__importStar",(function(){return _})),n.d(t,"__importDefault",(function(){return S}));var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function u(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function s(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){e.done?o(e.value):new n((function(t){t(e.value)})).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function h(e,t){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}function p(e){var t="function"===typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function d(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function m(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(d(arguments[t]));return e}function y(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}function v(e){return this instanceof v?(this.v=e,this):new v(e)}function g(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||u(e,t)}))})}function u(e,t){try{(n=o[e](t)).value instanceof v?Promise.resolve(n.value.v).then(s,c):l(i[0][2],n)}catch(r){l(i[0][3],r)}var n}function s(e){u("next",e)}function c(e){u("throw",e)}function l(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}function b(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:v(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function w(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}
1function _(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function S(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"ErrorCode",(function(){return sr})),n.d(t,"EventType",(function(){return cr})),n.d(t,"WebChannel",(function(){return lr})),n.d(t,"XhrIo",(function(){return fr})),n.d(t,"createWebChannelTransport",(function(){return ur}));var r,o="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{},i=i||{},a=o;function u(e){return"string"==typeof e}function s(e){return"number"==typeof e}function c(e,t){e=e.split("."),t=t||a;for(var n=0;n<e.length;n++)if(null==(t=t[e[n]]))return null;return t}function l(){}function f(e){var t=typeof e;if("object"==t){if(!e)return"null";if(e instanceof Array)return"array";if(e instanceof Object)return t;var n=Object.prototype.toString.call(e);if("[object Window]"==n)return"object";if("[object Array]"==n||"number"==typeof e.length&&"undefined"!=typeof e.splice&&"undefined"!=typeof e.propertyIsEnumerable&&!e.propertyIsEnumerable("splice"))return"array";if("[object Function]"==n||"undefined"!=typeof e.call&&"undefined"!=typeof e.propertyIsEnumerable&&!e.propertyIsEnumerable("call"))return"function"}else if("function"==t&&"undefined"==typeof e.call)return"object";return t}function h(e){return"array"==f(e)}function p(e){var t=f(e);return"array"==t||"object"==t&&"number"==typeof e.length}function d(e){var t=typeof e;return"object"==t&&null!=e||"function"==t}var m="closure_uid_"+(1e9*Math.random()>>>0),y=0;function v(e,t,n){return e.call.apply(e.bind,arguments)}function g(e,t,n){if(!e)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),e.apply(t,n)}}return function(){return e.apply(t,arguments)}}function b(e,t,n){return(b=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?v:g).apply(null,arguments)}function w(e,t){var n=Array.prototype.slice.call(arguments,1);return function(){var t=n.slice();return t.push.apply(t,arguments),e.apply(this,t)}}var E=Date.now||function(){return+new Date};function _(e,t){function n(){}n.prototype=t.prototype,e.N=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.yb=function(e,n,r){for(var o=Array(arguments.length-2),i=2;i<arguments.length;i++)o[i-2]=arguments[i];return t.prototype[n].apply(e,o)}}function S(){this.j=this.j,this.i=this.i}S.prototype.j=!1,S.prototype.la=function(){if(!this.j&&(this.j=!0,this.G(),0))this[m]||(this[m]=++y)},S.prototype.G=function(){if(this.i)for(;this.i.length;)this.i.shift()()};var T=Array.prototype.indexOf?function(e,t){return Array.prototype.indexOf.call(e,t,void 0)}:function(e,t){if(u(e))return u(t)&&1==t.length?e.indexOf(t,0):-1;for(var n=0;n<e.length;n++)if(n in e&&e[n]===t)return n;return-1},O=Array.prototype.forEach?function(e,t,n){Array.prototype.forEach.call(e,t,n)}:function(e,t,n){for(var r=e.length,o=u(e)?e.split(""):e,i=0;i<r;i++)i in o&&t.call(n,o[i],i,e)};function k(e){return Array.prototype.concat.apply([],arguments)}function C(e){var t=e.length;if(0<t){for(var n=Array(t),r=0;r<t;r++)n[r]=e[r];return n}return[]}function x(e){return/^[\s\xa0]*$/.test(e)}var A,I=String.prototype.trim?function(e){return e.trim()}:function(e){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(e)[1]};function N(e,t){return-1!=e.indexOf(t)}function D(e,t){return e<t?-1:e>t?1:0}e:{var P=a.navigator;if(P){var R=P.userAgent;if(R){A=R;break e}}A=""}function j(e,t,n){for(var r in e)t.call(n,e[r],r,e)}function M(e){var t,n={};for(t in e)n[t]=e[t];return n}var L="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function U(e,t){for(var n,r,o=1;o<arguments.length;o++){for(n in r=arguments[o])e[n]=r[n];for(var i=0;i<L.length;i++)n=L[i],Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}}function F(e){return F[" "](e),e}F[" "]=l;var B,q=N(A,"Opera"),V=N(A,"Trident")||N(A,"MSIE"),z=N(A,"Edge"),W=z||V,Q=N(A,"Gecko")&&!(N(A.toLowerCase(),"webkit")&&!N(A,"Edge"))&&!(N(A,"Trident")||N(A,"MSIE"))&&!N(A,"Edge"),G=N(A.toLowerCase(),"webkit")&&!N(A,"Edge");function K(){var e=a.document;return e?e.documentMode:void 0}e:{var H="",Y=function(){var e=A;return Q?/rv:([^\);]+)(\)|;)/.exec(e):z?/Edge\/([\d\.]+)/.exec(e):V?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(e):G?/WebKit\/(\S+)/.exec(e):q?/(?:Version)[ \/]?(\S+)/.exec(e):void 0}();if(Y&&(H=Y?Y[1]:""),V){var $=K();if(null!=$&&$>parseFloat(H)){B=String($);break e}}B=H}var X,J={};function Z(e){return function(e,t){var n=J;return Object.prototype.hasOwnProperty.call(n,e)?n[e]:n[e]=t(e)}(e,(function(){for(var t=0,n=I(String(B)).split("."),r=I(String(e)).split("."),o=Math.max(n.length,r.length),i=0;0==t&&i<o;i++){var a=n[i]||"",u=r[i]||"";do{if(a=/(\d*)(\D*)(.*)/.exec(a)||["","","",""],u=/(\d*)(\D*)(.*)/.exec(u)||["","","",""],0==a[0].length&&0==u[0].length)break;t=D(0==a[1].length?0:parseInt(a[1],10),0==u[1].length?0:parseInt(u[1],10))||D(0==a[2].length,0==u[2].length)||D(a[2],u[2]),a=a[3],u=u[3]}while(0==t)}return 0<=t}))}var ee=a.document;X=ee&&V?K()||("CSS1Compat"==ee.compatMode?parseInt(B,10):5):void 0;var te=!V||9<=Number(X),ne=V&&!Z("9"),re=function(){if(!a.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});try{a.addEventListener("test",l,t),a.removeEventListener("test",l,t)}catch(n){}return e}();function oe(e,t){this.type=e,this.a=this.target=t,this.Ja=!0}function ie(e,t){if(oe.call(this,e?e.type:""),this.relatedTarget=this.a=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.pointerId=0,this.pointerType="",this.c=null,e){var n=this.type=e.type,r=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:null;if(this.target=e.target||e.srcElement,this.a=t,t=e.relatedTarget){if(Q){e:{try{F(t.nodeName);var o=!0;break e}catch(i){}o=!1}o||(t=null)}}
1else"mouseover"==n?t=e.fromElement:"mouseout"==n&&(t=e.toElement);this.relatedTarget=t,r?(this.clientX=void 0!==r.clientX?r.clientX:r.pageX,this.clientY=void 0!==r.clientY?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0):(this.clientX=void 0!==e.clientX?e.clientX:e.pageX,this.clientY=void 0!==e.clientY?e.clientY:e.pageY,this.screenX=e.screenX||0,this.screenY=e.screenY||0),this.button=e.button,this.key=e.key||"",this.ctrlKey=e.ctrlKey,this.altKey=e.altKey,this.shiftKey=e.shiftKey,this.metaKey=e.metaKey,this.pointerId=e.pointerId||0,this.pointerType=u(e.pointerType)?e.pointerType:ae[e.pointerType]||"",this.c=e,e.defaultPrevented&&this.b()}}oe.prototype.b=function(){this.Ja=!1},_(ie,oe);var ae={2:"touch",3:"pen",4:"mouse"};ie.prototype.b=function(){ie.N.b.call(this);var e=this.c;if(e.preventDefault)e.preventDefault();else if(e.returnValue=!1,ne)try{(e.ctrlKey||112<=e.keyCode&&123>=e.keyCode)&&(e.keyCode=-1)}catch(t){}};var ue="closure_listenable_"+(1e6*Math.random()|0),se=0;function ce(e,t,n,r,o){this.listener=e,this.proxy=null,this.src=t,this.type=n,this.capture=!!r,this.da=o,this.key=++se,this.X=this.Z=!1}function le(e){e.X=!0,e.listener=null,e.proxy=null,e.src=null,e.da=null}function fe(e){this.src=e,this.a={},this.b=0}function he(e,t){var n=t.type;if(n in e.a){var r,o=e.a[n],i=T(o,t);(r=0<=i)&&Array.prototype.splice.call(o,i,1),r&&(le(t),0==e.a[n].length&&(delete e.a[n],e.b--))}}function pe(e,t,n,r){for(var o=0;o<e.length;++o){var i=e[o];if(!i.X&&i.listener==t&&i.capture==!!n&&i.da==r)return o}return-1}fe.prototype.add=function(e,t,n,r,o){var i=e.toString();(e=this.a[i])||(e=this.a[i]=[],this.b++);var a=pe(e,t,r,o);return-1<a?(t=e[a],n||(t.Z=!1)):((t=new ce(t,this.src,i,!!r,o)).Z=n,e.push(t)),t};var de="closure_lm_"+(1e6*Math.random()|0),me={};function ye(e,t,n,r,o){if(r&&r.once)return function e(t,n,r,o,i){if(h(n)){for(var a=0;a<n.length;a++)e(t,n[a],r,o,i);return null}r=Te(r);return t&&t[ue]?t.Ba(n,r,d(o)?!!o.capture:!!o,i):ve(t,n,r,!0,o,i)}(e,t,n,r,o);if(h(t)){for(var i=0;i<t.length;i++)ye(e,t[i],n,r,o);return null}return n=Te(n),e&&e[ue]?e.Aa(t,n,d(r)?!!r.capture:!!r,o):ve(e,t,n,!1,r,o)}function ve(e,t,n,r,o,i){if(!t)throw Error("Invalid event type");var a=d(o)?!!o.capture:!!o;if(a&&!te)return null;var u=_e(e);if(u||(e[de]=u=new fe(e)),(n=u.add(t,n,r,a,i)).proxy)return n;if(r=function(){var e=Ee,t=te?function(n){return e.call(t.src,t.listener,n)}:function(n){if(!(n=e.call(t.src,t.listener,n)))return n};return t}(),n.proxy=r,r.src=e,r.listener=n,e.addEventListener)re||(o=a),void 0===o&&(o=!1),e.addEventListener(t.toString(),r,o);else if(e.attachEvent)e.attachEvent(be(t.toString()),r);else{if(!e.addListener||!e.removeListener)throw Error("addEventListener and attachEvent are unavailable.");e.addListener(r)}return n}function ge(e){if(!s(e)&&e&&!e.X){var t=e.src;if(t&&t[ue])he(t.c,e);else{var n=e.type,r=e.proxy;t.removeEventListener?t.removeEventListener(n,r,e.capture):t.detachEvent?t.detachEvent(be(n),r):t.addListener&&t.removeListener&&t.removeListener(r),(n=_e(t))?(he(n,e),0==n.b&&(n.src=null,t[de]=null)):le(e)}}}function be(e){return e in me?me[e]:me[e]="on"+e}function we(e,t){var n=e.listener,r=e.da||e.src;return e.Z&&ge(e),n.call(r,t)}function Ee(e,t){return!!e.X||(te?we(e,new ie(t,this)):we(e,t=new ie(t||c("window.event"),this)))}function _e(e){return(e=e[de])instanceof fe?e:null}var Se="__closure_events_fn_"+(1e9*Math.random()>>>0);function Te(e){return"function"==f(e)?e:(e[Se]||(e[Se]=function(t){return e.handleEvent(t)}),e[Se])}function Oe(){S.call(this),this.c=new fe(this),this.J=this,this.B=null}function ke(e,t,n,r){if(!(t=e.c.a[String(t)]))return!0;t=t.concat();for(var o=!0,i=0;i<t.length;++i){var a=t[i];if(a&&!a.X&&a.capture==n){var u=a.listener,s=a.da||a.src;a.Z&&he(e.c,a),o=!1!==u.call(s,r)&&o}}return o&&0!=r.Ja}_(Oe,S),Oe.prototype[ue]=!0,(r=Oe.prototype).addEventListener=function(e,t,n,r){ye(this,e,t,n,r)},r.removeEventListener=function(e,t,n,r){!function e(t,n,r,o,i){if(h(n))for(var a=0;a<n.length;a++)e(t,n[a],r,o,i);else o=d(o)?!!o.capture:!!o,r=Te(r),t&&t[ue]?(t=t.c,(n=String(n).toString())in t.a&&(-1<(r=pe(a=t.a[n],r,o,i))&&(le(a[r]),Array.prototype.splice.call(a,r,1),0==a.length&&(delete t.a[n],t.b--)))):t&&(t=_e(t))&&(n=t.a[n.toString()],t=-1,n&&(t=pe(n,r,o,i)),(r=-1<t?n[t]:null)&&ge(r))}(this,e,t,n,r)},r.dispatchEvent=function(e){var t,n=this.B;if(n)for(t=[];n;n=n.B)t.push(n);n=this.J;var r=e.type||e;if(u(e))e=new oe(e,n);else if(e instanceof oe)e.target=e.target||n;else{var o=e;U(e=new oe(r,n),o)}if(o=!0,t)for(var i=t.length-1;0<=i;i--){var a=e.a=t[i];o=ke(a,r,!0,e)&&o}if(o=ke(a=e.a=n,r,!0,e)&&o,o=ke(a,r,!1,e)&&o,t)for(i=0;i<t.length;i++)o=ke(a=e.a=t[i],r,!1,e)&&o;return o},r.G=function(){if(Oe.N.G.call(this),this.c){var e,t=this.c;for(e in t.a){for(var n=t.a[e],r=0;r<n.length;r++)le(n[r]);delete t.a[e],t.b--}}this.B=null},r.Aa=function(e,t,n,r){return this.c.add(String(e),t,!1,n,r)},r.Ba=function(e,t,n,r){return this.c.add(String(e),t,!0,n,r)};var Ce=a.JSON.stringify;function xe(e,t){this.c=e,this.f=t,this.b=0,this.a=null}function Ae(){this.b=this.a=null}
1xe.prototype.get=function(){if(0<this.b){this.b--;var e=this.a;this.a=e.next,e.next=null}else e=this.c();return e};var Ie,Ne=new xe((function(){return new Pe}),(function(e){e.reset()}));function De(){var e=Le,t=null;return e.a&&(t=e.a,e.a=e.a.next,e.a||(e.b=null),t.next=null),t}function Pe(){this.next=this.b=this.a=null}function Re(e){a.setTimeout((function(){throw e}),0)}function je(e,t){Ie||function(){var e=a.Promise.resolve(void 0);Ie=function(){e.then(Ue)}}(),Me||(Ie(),Me=!0),Le.add(e,t)}Ae.prototype.add=function(e,t){var n=Ne.get();n.set(e,t),this.b?this.b.next=n:this.a=n,this.b=n},Pe.prototype.set=function(e,t){this.a=e,this.b=t,this.next=null},Pe.prototype.reset=function(){this.next=this.b=this.a=null};var Me=!1,Le=new Ae;function Ue(){for(var e;e=De();){try{e.a.call(e.b)}catch(n){Re(n)}var t=Ne;t.f(e),100>t.b&&(t.b++,e.next=t.a,t.a=e)}Me=!1}function Fe(e,t){Oe.call(this),this.b=e||1,this.a=t||a,this.f=b(this.gb,this),this.g=E()}function Be(e){e.ba=!1,e.L&&(e.a.clearTimeout(e.L),e.L=null)}function qe(e,t,n){if("function"==f(e))n&&(e=b(e,n));else{if(!e||"function"!=typeof e.handleEvent)throw Error("Invalid listener argument");e=b(e.handleEvent,e)}return 2147483647<Number(t)?-1:a.setTimeout(e,t||0)}function Ve(e,t,n){S.call(this),this.f=null!=n?b(e,n):e,this.c=t,this.b=b(this.ab,this),this.a=[]}function ze(e){e.U=qe(e.b,e.c),e.f.apply(null,e.a)}function We(e){S.call(this),this.b=e,this.a={}}_(Fe,Oe),(r=Fe.prototype).ba=!1,r.L=null,r.gb=function(){if(this.ba){var e=E()-this.g;0<e&&e<.8*this.b?this.L=this.a.setTimeout(this.f,this.b-e):(this.L&&(this.a.clearTimeout(this.L),this.L=null),this.dispatchEvent("tick"),this.ba&&(Be(this),this.start()))}},r.start=function(){this.ba=!0,this.L||(this.L=this.a.setTimeout(this.f,this.b),this.g=E())},r.G=function(){Fe.N.G.call(this),Be(this),delete this.a},_(Ve,S),(r=Ve.prototype).ea=!1,r.U=null,r.Ua=function(e){this.a=arguments,this.U?this.ea=!0:ze(this)},r.G=function(){Ve.N.G.call(this),this.U&&(a.clearTimeout(this.U),this.U=null,this.ea=!1,this.a=[])},r.ab=function(){this.U=null,this.ea&&(this.ea=!1,ze(this))},_(We,S);var Qe=[];function Ge(e,t,n,r){h(n)||(n&&(Qe[0]=n.toString()),n=Qe);for(var o=0;o<n.length;o++){var i=ye(t,n[o],r||e.handleEvent,!1,e.b||e);if(!i)break;e.a[i.key]=i}}function Ke(e){j(e.a,(function(e,t){this.a.hasOwnProperty(t)&&ge(e)}),e),e.a={}}function He(){}We.prototype.G=function(){We.N.G.call(this),Ke(this)},We.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")};var Ye=new Oe;function $e(e){oe.call(this,"serverreachability",e)}function Xe(e){Ye.dispatchEvent(new $e(Ye,e))}function Je(e){oe.call(this,"statevent",e)}function Ze(e){Ye.dispatchEvent(new Je(Ye,e))}function et(e){oe.call(this,"timingevent",e)}function tt(e,t){if("function"!=f(e))throw Error("Fn must not be null and must be a function");return a.setTimeout((function(){e()}),t)}_($e,oe),_(Je,oe),_(et,oe);var nt={NO_ERROR:0,hb:1,ob:2,nb:3,kb:4,mb:5,pb:6,Ma:7,TIMEOUT:8,sb:9},rt={jb:"complete",wb:"success",Na:"error",Ma:"abort",ub:"ready",vb:"readystatechange",TIMEOUT:"timeout",qb:"incrementaldata",tb:"progress",lb:"downloadprogress",xb:"uploadprogress"};function ot(){}function it(e){var t;return(t=e.a)||(t=e.a={}),t}function at(){}ot.prototype.a=null;var ut,st={OPEN:"a",ib:"b",Na:"c",rb:"d"};function ct(){oe.call(this,"d")}function lt(){oe.call(this,"c")}function ft(){}function ht(e,t,n){this.g=e,this.W=t,this.V=n||1,this.I=new We(this),this.O=pt,e=W?125:void 0,this.P=new Fe(e),this.h=null,this.b=!1,this.l=this.D=this.f=this.F=this.v=this.R=this.i=null,this.j=[],this.a=null,this.A=0,this.c=this.w=null,this.o=-1,this.m=!1,this.J=0,this.B=null,this.s=this.S=this.H=!1}_(ct,oe),_(lt,oe),_(ft,ot),ut=new ft;var pt=45e3,dt={},mt={};function yt(e,t,n){e.F=1,e.f=qt(Rt(t)),e.l=n,e.H=!0,gt(e,null)}function vt(e,t,n,r){e.F=1,e.f=qt(Rt(t)),e.l=null,e.H=n,gt(e,r)}function gt(e,t){e.v=E(),Et(e),e.D=Rt(e.f),Bt(e.D,"t",e.V),e.A=0,e.a=e.g.$(e.g.Y()?t:null),0<e.J&&(e.B=new Ve(b(e.Ka,e,e.a),e.J)),Ge(e.I,e.a,"readystatechange",e.eb),t=e.h?M(e.h):{},e.l?(e.w||(e.w="POST"),t["Content-Type"]="application/x-www-form-urlencoded",e.a.ca(e.D,e.w,e.l,t)):(e.w="GET",e.a.ca(e.D,e.w,null,t)),Xe(1)}function bt(e,t,n){for(var r=!0;!e.m&&e.A<n.length;){var o=wt(e,n);if(o==mt){4==t&&(e.c=4,Ze(14),r=!1);break}if(o==dt){e.c=4,Ze(15),r=!1;break}kt(e,o)}4==t&&0==n.length&&(e.c=1,Ze(16),r=!1),e.b=e.b&&r,r||(Ot(e),Tt(e))}function wt(e,t){var n=e.A,r=t.indexOf("\n",n);return-1==r?mt:(n=Number(t.substring(n,r)),isNaN(n)?dt:(r+=1)+n>t.length?mt:(t=t.substr(r,n),e.A=r+n,t))}function Et(e){e.R=E()+e.O,_t(e,e.O)}function _t(e,t){if(null!=e.i)throw Error("WatchDog timer not null");e.i=tt(b(e.bb,e),t)}
1function St(e){e.i&&(a.clearTimeout(e.i),e.i=null)}function Tt(e){e.g.Da()||e.m||e.g.na(e)}function Ot(e){St(e);var t=e.B;t&&"function"==typeof t.la&&t.la(),e.B=null,Be(e.P),Ke(e.I),e.a&&(t=e.a,e.a=null,t.abort(),t.la())}function kt(e,t){try{e.g.Ga(e,t),Xe(4)}catch(n){}}function Ct(e,t){if(e.forEach&&"function"==typeof e.forEach)e.forEach(t,void 0);else if(p(e)||u(e))O(e,t,void 0);else{if(e.K&&"function"==typeof e.K)var n=e.K();else if(e.C&&"function"==typeof e.C)n=void 0;else if(p(e)||u(e)){n=[];for(var r=e.length,o=0;o<r;o++)n.push(o)}else for(o in n=[],r=0,e)n[r++]=o;o=(r=function(e){if(e.C&&"function"==typeof e.C)return e.C();if(u(e))return e.split("");if(p(e)){for(var t=[],n=e.length,r=0;r<n;r++)t.push(e[r]);return t}for(r in t=[],n=0,e)t[n++]=e[r];return t}(e)).length;for(var i=0;i<o;i++)t.call(void 0,r[i],n&&n[i],e)}}function xt(e,t){this.b={},this.a=[],this.c=0;var n=arguments.length;if(1<n){if(n%2)throw Error("Uneven number of arguments");for(var r=0;r<n;r+=2)this.set(arguments[r],arguments[r+1])}else if(e)if(e instanceof xt)for(n=e.K(),r=0;r<n.length;r++)this.set(n[r],e.get(n[r]));else for(r in e)this.set(r,e[r])}function At(e,t){Nt(e.b,t)&&(delete e.b[t],e.c--,e.a.length>2*e.c&&It(e))}function It(e){if(e.c!=e.a.length){for(var t=0,n=0;t<e.a.length;){var r=e.a[t];Nt(e.b,r)&&(e.a[n++]=r),t++}e.a.length=n}if(e.c!=e.a.length){var o={};for(n=t=0;t<e.a.length;)Nt(o,r=e.a[t])||(e.a[n++]=r,o[r]=1),t++;e.a.length=n}}function Nt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}(r=ht.prototype).setTimeout=function(e){this.O=e},r.eb=function(e){e=e.target;var t=this.B;t&&3==Rn(e)?t.Ua():this.Ka(e)},r.Ka=function(e){try{if(e==this.a)e:{var t=Rn(this.a),n=this.a.ya(),r=this.a.T();if(!(3>t||3==t&&!W&&!this.a.aa())){this.m||4!=t||7==n||Xe(8==n||0>=r?3:2),St(this);var o=this.a.T();this.o=o;var i=this.a.aa();if(this.b=200==o){if(this.S&&!this.s){t:{if(this.a){var a=jn(this.a,"X-HTTP-Initial-Response");if(a&&!x(a)){var u=a;break t}}u=null}if(!u){this.b=!1,this.c=3,Ze(12),Ot(this),Tt(this);break e}this.s=!0,kt(this,u)}this.H?(bt(this,t,i),W&&this.b&&3==t&&(Ge(this.I,this.P,"tick",this.cb),this.P.start())):kt(this,i),4==t&&Ot(this),this.b&&!this.m&&(4==t?this.g.na(this):(this.b=!1,Et(this)))}else 400==o&&0<i.indexOf("Unknown SID")?(this.c=3,Ze(12)):(this.c=0,Ze(13)),Ot(this),Tt(this)}}}catch(s){}},r.cb=function(){if(this.a){var e=Rn(this.a),t=this.a.aa();this.A<t.length&&(St(this),bt(this,e,t),this.b&&4!=e&&Et(this))}},r.cancel=function(){this.m=!0,Ot(this)},r.bb=function(){this.i=null;var e=E();0<=e-this.R?(2!=this.F&&(Xe(3),Ze(17)),Ot(this),this.c=2,Tt(this)):_t(this,this.R-e)},(r=xt.prototype).C=function(){It(this);for(var e=[],t=0;t<this.a.length;t++)e.push(this.b[this.a[t]]);return e},r.K=function(){return It(this),this.a.concat()},r.get=function(e,t){return Nt(this.b,e)?this.b[e]:t},r.set=function(e,t){Nt(this.b,e)||(this.c++,this.a.push(e)),this.b[e]=t},r.forEach=function(e,t){for(var n=this.K(),r=0;r<n.length;r++){var o=n[r],i=this.get(o);e.call(t,i,o,this)}};var Dt=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function Pt(e,t){var n;this.b=this.j=this.f="",this.i=null,this.g=this.a="",this.h=!1,e instanceof Pt?(this.h=void 0!==t?t:e.h,jt(this,e.f),this.j=e.j,Mt(this,e.b),Lt(this,e.i),this.a=e.a,Ut(this,tn(e.c)),this.g=e.g):e&&(n=String(e).match(Dt))?(this.h=!!t,jt(this,n[1]||"",!0),this.j=Vt(n[2]||""),Mt(this,n[3]||"",!0),Lt(this,n[4]),this.a=Vt(n[5]||"",!0),Ut(this,n[6]||"",!0),this.g=Vt(n[7]||"")):(this.h=!!t,this.c=new $t(null,this.h))}function Rt(e){return new Pt(e)}function jt(e,t,n){e.f=n?Vt(t,!0):t,e.f&&(e.f=e.f.replace(/:$/,""))}function Mt(e,t,n){e.b=n?Vt(t,!0):t}function Lt(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.i=t}else e.i=null}function Ut(e,t,n){t instanceof $t?(e.c=t,function(e,t){t&&!e.f&&(Xt(e),e.c=null,e.a.forEach((function(e,t){var n=t.toLowerCase();t!=n&&(Jt(this,t),en(this,n,e))}),e)),e.f=t}(e.c,e.h)):(n||(t=zt(t,Ht)),e.c=new $t(t,e.h))}function Ft(e,t,n){e.c.set(t,n)}function Bt(e,t,n){h(n)||(n=[String(n)]),en(e.c,t,n)}function qt(e){return Ft(e,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^E()).toString(36)),e}function Vt(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function zt(e,t,n){return u(e)?(e=encodeURI(e).replace(t,Wt),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function Wt(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}Pt.prototype.toString=function(){var e=[],t=this.f;t&&e.push(zt(t,Qt,!0),":");var n=this.b;return(n||"file"==t)&&(e.push("//"),(t=this.j)&&e.push(zt(t,Qt,!0),"@"),e.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.i)&&e.push(":",String(n))),(n=this.a)&&(this.b&&"/"!=n.charAt(0)&&e.push("/"),e.push(zt(n,"/"==n.charAt(0)?Kt:Gt,!0))),(n=this.c.toString())&&e.push("?",n),(n=this.g)&&e.push("#",zt(n,Yt)),e.join("")},Pt.prototype.resolve=function(e){var t=Rt(this),n=!!e.f;n?jt(t,e.f):n=!!e.j,n?t.j=e.j:n=!!e.b,n?Mt(t,e.b):n=null!=e.i;var r=e.a;
1if(n)Lt(t,e.i);else if(n=!!e.a){if("/"!=r.charAt(0))if(this.b&&!this.a)r="/"+r;else{var o=t.a.lastIndexOf("/");-1!=o&&(r=t.a.substr(0,o+1)+r)}if(".."==(o=r)||"."==o)r="";else if(N(o,"./")||N(o,"/.")){r=0==o.lastIndexOf("/",0),o=o.split("/");for(var i=[],a=0;a<o.length;){var u=o[a++];"."==u?r&&a==o.length&&i.push(""):".."==u?((1<i.length||1==i.length&&""!=i[0])&&i.pop(),r&&a==o.length&&i.push("")):(i.push(u),r=!0)}r=i.join("/")}else r=o}return n?t.a=r:n=""!==e.c.toString(),n?Ut(t,tn(e.c)):n=!!e.g,n&&(t.g=e.g),t};var Qt=/[#\/\?@]/g,Gt=/[#\?:]/g,Kt=/[#\?]/g,Ht=/[#\?@]/g,Yt=/#/g;function $t(e,t){this.b=this.a=null,this.c=e||null,this.f=!!t}function Xt(e){e.a||(e.a=new xt,e.b=0,e.c&&function(e,t){if(e){e=e.split("&");for(var n=0;n<e.length;n++){var r=e[n].indexOf("="),o=null;if(0<=r){var i=e[n].substring(0,r);o=e[n].substring(r+1)}else i=e[n];t(i,o?decodeURIComponent(o.replace(/\+/g," ")):"")}}}(e.c,(function(t,n){e.add(decodeURIComponent(t.replace(/\+/g," ")),n)})))}function Jt(e,t){Xt(e),t=nn(e,t),Nt(e.a.b,t)&&(e.c=null,e.b-=e.a.get(t).length,At(e.a,t))}function Zt(e,t){return Xt(e),t=nn(e,t),Nt(e.a.b,t)}function en(e,t,n){Jt(e,t),0<n.length&&(e.c=null,e.a.set(nn(e,t),C(n)),e.b+=n.length)}function tn(e){var t=new $t;return t.c=e.c,e.a&&(t.a=new xt(e.a),t.b=e.b),t}function nn(e,t){return t=String(t),e.f&&(t=t.toLowerCase()),t}function rn(e){this.a=e,this.b=this.h=null,this.g=!1,this.i=null,this.c=-1,this.l=this.f=null}function on(e){var t=e.a.F.a;if(null!=t)Ze(4),t?(Ze(10),Kn(e.a,e,!1)):(Ze(11),Kn(e.a,e,!0));else{e.b=new ht(e,void 0,void 0),e.b.h=e.h,t=Jn(t=e.a,t.Y()?e.f:null,e.i),Ze(4),Bt(t,"TYPE","xmlhttp");var n=e.a.j,r=e.a.I;n&&r&&Ft(t,n,r),vt(e.b,t,!1,e.f)}}function an(){this.a=this.b=null}function un(){this.a=new xt}function sn(e){var t=typeof e;return"object"==t&&e||"function"==t?"o"+(e[m]||(e[m]=++y)):t.charAt(0)+e}function cn(e,t){this.b=e,this.a=t}function ln(e){this.g=e||fn,a.PerformanceNavigationTiming?e=0<(e=a.performance.getEntriesByType("navigation")).length&&("hq"==e[0].nextHopProtocol||"h2"==e[0].nextHopProtocol):e=!!(a.ka&&a.ka.Ea&&a.ka.Ea()&&a.ka.Ea().zb),this.f=e?this.g:1,this.a=null,1<this.f&&(this.a=new un),this.b=null,this.c=[]}(r=$t.prototype).add=function(e,t){Xt(this),this.c=null,e=nn(this,e);var n=this.a.get(e);return n||this.a.set(e,n=[]),n.push(t),this.b+=1,this},r.forEach=function(e,t){Xt(this),this.a.forEach((function(n,r){O(n,(function(n){e.call(t,n,r,this)}),this)}),this)},r.K=function(){Xt(this);for(var e=this.a.C(),t=this.a.K(),n=[],r=0;r<t.length;r++)for(var o=e[r],i=0;i<o.length;i++)n.push(t[r]);return n},r.C=function(e){Xt(this);var t=[];if(u(e))Zt(this,e)&&(t=k(t,this.a.get(nn(this,e))));else{e=this.a.C();for(var n=0;n<e.length;n++)t=k(t,e[n])}return t},r.set=function(e,t){return Xt(this),this.c=null,Zt(this,e=nn(this,e))&&(this.b-=this.a.get(e).length),this.a.set(e,[t]),this.b+=1,this},r.get=function(e,t){return e&&0<(e=this.C(e)).length?String(e[0]):t},r.toString=function(){if(this.c)return this.c;if(!this.a)return"";for(var e=[],t=this.a.K(),n=0;n<t.length;n++){var r=t[n],o=encodeURIComponent(String(r));r=this.C(r);for(var i=0;i<r.length;i++){var a=o;""!==r[i]&&(a+="="+encodeURIComponent(String(r[i]))),e.push(a)}}return this.c=e.join("&")},_((function(){}),(function(){})),(r=rn.prototype).M=null,r.$=function(e){return this.a.$(e)},r.abort=function(){this.b&&(this.b.cancel(),this.b=null),this.c=-1},r.Da=function(){return!1},r.Ga=function(e,t){if(this.c=e.o,0==this.M){if(!this.a.o&&(e=e.a)){var n=jn(e,"X-Client-Wire-Protocol");this.l=n||null,this.a.j&&(e=jn(e,"X-HTTP-Session-Id"))&&(this.a.I=e)}if(t){try{var r=this.a.ja.a.parse(t)}catch(o){return(t=this.a).m=this.c,void $n(t,2)}this.f=r[0]}else(t=this.a).m=this.c,$n(t,2)}else 1==this.M&&(this.g?Ze(6):"11111"==t?(Ze(5),this.g=!0,(!V||10<=Number(X))&&(this.c=200,this.b.cancel(),Ze(11),Kn(this.a,this,!0))):(Ze(7),this.g=!1))},r.na=function(){if(this.c=this.b.o,this.b.b)0==this.M?(this.M=1,on(this)):1==this.M&&(this.g?(Ze(11),Kn(this.a,this,!0)):(Ze(10),Kn(this.a,this,!1)));else{0==this.M?Ze(8):1==this.M&&Ze(9);var e=this.a;e.m=this.c,$n(e,2)}},r.Y=function(){return this.a.Y()},r.ma=function(){return this.a.ma()},un.prototype.add=function(e){this.a.set(sn(e),e)},un.prototype.C=function(){return this.a.C()};var fn=10;function hn(e,t){!e.a&&(N(t,"spdy")||N(t,"quic")||N(t,"h2"))&&(e.f=e.g,e.a=new un,e.b&&(yn(e,e.b),e.b=null))}function pn(e){return!!e.b||!!e.a&&e.a.a.c>=e.f}function dn(e){return e.b?1:e.a?e.a.a.c:0}function mn(e,t){return e.b?e=e.b==t:e.a?(t=sn(t),e=Nt(e.a.a.b,t)):e=!1,e}function yn(e,t){e.a?e.a.add(t):e.b=t}function vn(e,t){var n;e.b&&e.b==t?e.b=null:((n=e.a)&&(n=sn(t),n=Nt(e.a.a.b,n)),n&&At(e.a.a,sn(t)))}function gn(e){if(null!=e.b)return e.c.concat(e.b.j);if(null!=e.a&&0!=e.a.a.c){var t=e.c;return O(e.a.C(),(function(e){t=t.concat(e.j)})),t}return C(e.c)}function bn(){}function wn(){this.a=new bn}function En(e,t,n){var r=n||"";try{Ct(e,(function(e,n){var o=e;d(e)&&(o=Ce(e)),t.push(r+n+"="+encodeURIComponent(o))}))}catch(o){throw t.push(r+"type="+encodeURIComponent("_badmap")),o}}function _n(e,t,n,r,o){try{t.onload=null,t.onerror=null,t.onabort=null,t.ontimeout=null,o(r)}catch(i){}}ln.prototype.cancel=function(){var e;this.c=gn(this),this.b?(this.b.cancel(),this.b=null):this.a&&0!=this.a.a.c&&
1(O(this.a.C(),(function(e){e.cancel()})),(e=this.a.a).b={},e.a.length=0,e.c=0)},bn.prototype.stringify=function(e){return a.JSON.stringify(e,void 0)},bn.prototype.parse=function(e){return a.JSON.parse(e,void 0)};var Sn=a.JSON.parse;function Tn(e){Oe.call(this),this.headers=new xt,this.H=e||null,this.b=!1,this.s=this.a=null,this.A="",this.h=0,this.f="",this.g=this.w=this.l=this.v=!1,this.o=0,this.m=null,this.I=On,this.D=this.F=!1}_(Tn,Oe);var On="",kn=/^https?$/i,Cn=["POST","PUT"];function xn(e){return"content-type"==e.toLowerCase()}function An(e,t){e.b=!1,e.a&&(e.g=!0,e.a.abort(),e.g=!1),e.f=t,e.h=5,In(e),Dn(e)}function In(e){e.v||(e.v=!0,e.dispatchEvent("complete"),e.dispatchEvent("error"))}function Nn(e){if(e.b&&"undefined"!=typeof i&&(!e.s[1]||4!=Rn(e)||2!=e.T()))if(e.l&&4==Rn(e))qe(e.Fa,0,e);else if(e.dispatchEvent("readystatechange"),4==Rn(e)){e.b=!1;try{var t,n=e.T();e:switch(n){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var r=!0;break e;default:r=!1}if(!(t=r)){var o;if(o=0===n){var u=String(e.A).match(Dt)[1]||null;if(!u&&a.self&&a.self.location){var s=a.self.location.protocol;u=s.substr(0,s.length-1)}o=!kn.test(u?u.toLowerCase():"")}t=o}t?(e.dispatchEvent("complete"),e.dispatchEvent("success")):(e.h=6,e.f=e.za()+" ["+e.T()+"]",In(e))}finally{Dn(e)}}}function Dn(e,t){if(e.a){Pn(e);var n=e.a,r=e.s[0]?l:null;e.a=null,e.s=null,t||e.dispatchEvent("ready");try{n.onreadystatechange=r}catch(o){}}}function Pn(e){e.a&&e.D&&(e.a.ontimeout=null),e.m&&(a.clearTimeout(e.m),e.m=null)}function Rn(e){return e.a?e.a.readyState:0}function jn(e,t){return e.a?e.a.getResponseHeader(t):null}function Mn(e,t,n){e:{for(r in n){var r=!1;break e}r=!0}if(r)return e;if(n=function(e){var t="";return j(e,(function(e,n){t+=n,t+=":",t+=e,t+="\r\n"})),t}(n),u(e)){if(t=encodeURIComponent(String(t)),t+=n=null!=n?"="+encodeURIComponent(String(n)):""){if(0>(n=e.indexOf("#"))&&(n=e.length),0>(r=e.indexOf("?"))||r>n){r=n;var o=""}else o=e.substring(r+1,n);n=(e=[e.substr(0,r),o,e.substr(n)])[1],e[1]=t?n?n+"&"+t:t:n,e=e[0]+(e[1]?"?"+e[1]:"")+e[2]}return e}return Ft(e,t,n),e}function Ln(e){this.f=[],this.F=new an,this.ga=this.pa=this.B=this.ha=this.a=this.I=this.j=this.V=this.g=this.J=this.i=null,this.Ra=this.P=0,this.Pa=!!c("internalChannelParams.failFast",e),this.ia=this.w=this.s=this.l=this.h=this.c=null,this.oa=!0,this.m=this.ra=this.O=-1,this.S=this.v=this.A=0,this.Oa=c("internalChannelParams.baseRetryDelayMs",e)||5e3,this.Sa=c("internalChannelParams.retryDelaySeedMs",e)||1e4,this.Qa=c("internalChannelParams.forwardChannelMaxRetries",e)||2,this.qa=c("internalChannelParams.forwardChannelRequestTimeoutMs",e)||2e4,this.La=e&&e.Ab||void 0,this.D=void 0,this.R=e&&e.supportsCrossDomainXhr||!1,this.H="",this.b=new ln(e&&e.concurrentRequestLimit),this.ja=new wn,this.o=!e||void 0===e.backgroundChannelTest||e.backgroundChannelTest,(this.W=e&&e.fastHandshake||!1)&&!this.o&&(this.o=!0),e&&e.forceLongPolling&&(this.oa=!1),this.fa=void 0}function Un(e){if(Fn(e),3==e.u){var t=e.P++,n=Rt(e.B);Ft(n,"SID",e.H),Ft(n,"RID",t),Ft(n,"TYPE","terminate"),zn(e,n),(t=new ht(e,t,void 0)).F=2,t.f=qt(Rt(n)),n=!1,a.navigator&&a.navigator.sendBeacon&&(n=a.navigator.sendBeacon(t.f.toString(),"")),!n&&a.Image&&((new Image).src=t.f,n=!0),n||(t.a=t.g.$(null),t.a.ca(t.f)),t.v=E(),Et(t)}Xn(e)}function Fn(e){e.w&&(e.w.abort(),e.w=null),e.a&&(e.a.cancel(),e.a=null),e.l&&(a.clearTimeout(e.l),e.l=null),Hn(e),e.b.cancel(),e.h&&(s(e.h)&&a.clearTimeout(e.h),e.h=null)}function Bn(e,t){e.f.push(new cn(e.Ra++,t)),3==e.u&&qn(e)}function qn(e){pn(e.b)||e.h||(e.h=!0,je(e.Ia,e),e.A=0)}function Vn(e,t){var n;n=t?t.W:e.P++;var r=Rt(e.B);Ft(r,"SID",e.H),Ft(r,"RID",n),Ft(r,"AID",e.O),zn(e,r),e.g&&e.i&&Mn(r,e.g,e.i),n=new ht(e,n,e.A+1),null===e.g&&(n.h=e.i),t&&(e.f=t.j.concat(e.f)),t=Wn(e,n,1e3),n.setTimeout(Math.round(.5*e.qa)+Math.round(.5*e.qa*Math.random())),yn(e.b,n),yt(n,r,t)}function zn(e,t){e.c&&Ct({},(function(e,n){Ft(t,n,e)}))}function Wn(e,t,n){n=Math.min(e.f.length,n);var r=e.c?b(e.c.Ta,e.c,e):null;e:for(var o=e.f,i=-1;;){var a=["count="+n];-1==i?0<n?(i=o[0].b,a.push("ofs="+i)):i=0:a.push("ofs="+i);for(var u=!0,s=0;s<n;s++){var c=o[s].b,l=o[s].a;if(0>(c-=i))i=Math.max(0,o[s].b-100),u=!1;else try{En(l,a,"req"+c+"_")}catch(f){r&&r(l)}}if(u){r=a.join("&");break e}}return e=e.f.splice(0,n),t.j=e,r}function Qn(e){e.a||e.l||(e.S=1,je(e.Ha,e),e.v=0)}function Gn(e){return!(e.a||e.l||3<=e.v)&&(e.S++,e.l=tt(b(e.Ha,e),Yn(e,e.v)),e.v++,!0)}function Kn(e,t,n){var r=t.l;r&&hn(e.b,r),e.ia=e.oa&&n,e.m=t.c,e.B=Jn(e,null,e.ha),qn(e)}function Hn(e){null!=e.s&&(a.clearTimeout(e.s),e.s=null)}function Yn(e,t){var n=e.Oa+Math.floor(Math.random()*e.Sa);return e.ma()||(n*=2),n*t}function $n(e,t){if(2==t){var n=null;e.c&&(n=null);var r=b(e.fb,e);n||(n=new Pt("//www.google.com/images/cleardot.gif"),a.location&&"http"==a.location.protocol||jt(n,"https"),qt(n)),function(e,t){var n=new He;if(a.Image){var r=new Image;r.onload=w(_n,n,r,"TestLoadImage: loaded",!0,t),r.onerror=w(_n,n,r,"TestLoadImage: error",!1,t),r.onabort=w(_n,n,r,"TestLoadImage: abort",!1,t),r.ontimeout=w(_n,n,r,"TestLoadImage: timeout",!1,t),a.setTimeout((function(){r.ontimeout&&r.ontimeout()}),1e4),r.src=e}else t(!1)}(n.toString(),r)}else Ze(2);e.u=0,e.c&&e.c.ta(t),Xn(e),Fn(e)}function Xn(e){e.u=0,e.m=-1,e.c&&(0==gn(e.b).length&&0==e.f.length||(e.b.c.length=0,C(e.f),e.f.length=0),e.c.sa())}
1function Jn(e,t,n){var r=function(e){return e instanceof Pt?Rt(e):new Pt(e,void 0)}(n);if(""!=r.b)t&&Mt(r,t+"."+r.b),Lt(r,r.i);else{var o,i=a.location;o=t?t+"."+i.hostname:i.hostname,r=function(e,t,n,r){var o=new Pt(null,void 0);return e&&jt(o,e),t&&Mt(o,t),n&&Lt(o,n),r&&(o.a=r),o}(i.protocol,o,+i.port,n)}return e.V&&j(e.V,(function(e,t){Ft(r,t,e)})),t=e.j,n=e.I,t&&n&&Ft(r,t,n),Ft(r,"VER",e.wa),zn(e,r),r}function Zn(){}function er(){if(V&&!(10<=Number(X)))throw Error("Environmental error: no available transport.")}function tr(e,t){Oe.call(this),this.a=new Ln(t),this.g=e,this.m=t&&t.testUrl?t.testUrl:function(e){for(var t=arguments[0],n=1;n<arguments.length;n++){var r,o=arguments[n];if(0==o.lastIndexOf("/",0))t=o;else(r=""==t)||(r=0<=(r=t.length-1)&&t.indexOf("/",r)==r),t+=r?o:"/"+o}return t}(this.g,"test"),this.b=t&&t.messageUrlParams||null,e=t&&t.messageHeaders||null,t&&t.clientProtocolHeaderRequired&&(e?e["X-Client-Protocol"]="webchannel":e={"X-Client-Protocol":"webchannel"}),this.a.i=e,e=t&&t.initMessageHeaders||null,t&&t.messageContentType&&(e?e["X-WebChannel-Content-Type"]=t.messageContentType:e={"X-WebChannel-Content-Type":t.messageContentType}),t&&t.xa&&(e?e["X-WebChannel-Client-Profile"]=t.xa:e={"X-WebChannel-Client-Profile":t.xa}),this.a.J=e,(e=t&&t.httpHeadersOverwriteParam)&&!x(e)&&(this.a.g=e),this.l=t&&t.supportsCrossDomainXhr||!1,this.h=t&&t.sendRawJson||!1,(t=t&&t.httpSessionIdParam)&&!x(t)&&(this.a.j=t,null!==(e=this.b)&&t in e&&(t in(e=this.b)&&delete e[t])),this.f=new or(this)}function nr(e){ct.call(this);var t=e.__sm__;if(t){e:{for(var n in t){e=n;break e}e=void 0}(this.c=e)?(e=this.c,this.data=null!==t&&e in t?t[e]:void 0):this.data=t}else this.data=e}function rr(){lt.call(this),this.status=1}function or(e){this.a=e}(r=Tn.prototype).ca=function(e,t,n,r){if(this.a)throw Error("[goog.net.XhrIo] Object is active with another request="+this.A+"; newUri="+e);t=t?t.toUpperCase():"GET",this.A=e,this.f="",this.h=0,this.v=!1,this.b=!0,this.a=new XMLHttpRequest,this.s=this.H?it(this.H):it(ut),this.a.onreadystatechange=b(this.Fa,this);try{this.w=!0,this.a.open(t,String(e),!0),this.w=!1}catch(i){return void An(this,i)}e=n||"";var o=new xt(this.headers);r&&Ct(r,(function(e,t){o.set(t,e)})),r=function(e){e:{for(var t=xn,n=e.length,r=u(e)?e.split(""):e,o=0;o<n;o++)if(o in r&&t.call(void 0,r[o],o,e)){t=o;break e}t=-1}return 0>t?null:u(e)?e.charAt(t):e[t]}(o.K()),n=a.FormData&&e instanceof a.FormData,!(0<=T(Cn,t))||r||n||o.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),o.forEach((function(e,t){this.a.setRequestHeader(t,e)}),this),this.I&&(this.a.responseType=this.I),"withCredentials"in this.a&&this.a.withCredentials!==this.F&&(this.a.withCredentials=this.F);try{Pn(this),0<this.o&&((this.D=function(e){return V&&Z(9)&&s(e.timeout)&&void 0!==e.ontimeout}(this.a))?(this.a.timeout=this.o,this.a.ontimeout=b(this.Ca,this)):this.m=qe(this.Ca,this.o,this)),this.l=!0,this.a.send(e),this.l=!1}catch(i){An(this,i)}},r.Ca=function(){"undefined"!=typeof i&&this.a&&(this.f="Timed out after "+this.o+"ms, aborting",this.h=8,this.dispatchEvent("timeout"),this.abort(8))},r.abort=function(e){this.a&&this.b&&(this.b=!1,this.g=!0,this.a.abort(),this.g=!1,this.h=e||7,this.dispatchEvent("complete"),this.dispatchEvent("abort"),Dn(this))},r.G=function(){this.a&&(this.b&&(this.b=!1,this.g=!0,this.a.abort(),this.g=!1),Dn(this,!0)),Tn.N.G.call(this)},r.Fa=function(){this.j||(this.w||this.l||this.g?Nn(this):this.$a())},r.$a=function(){Nn(this)},r.T=function(){try{return 2<Rn(this)?this.a.status:-1}catch(e){return-1}},r.za=function(){try{return 2<Rn(this)?this.a.statusText:""}catch(e){return""}},r.aa=function(){try{return this.a?this.a.responseText:""}catch(e){return""}},r.Va=function(e){if(this.a){var t=this.a.responseText;return e&&0==t.indexOf(e)&&(t=t.substring(e.length)),Sn(t)}},r.ya=function(){return this.h},r.Ya=function(){return u(this.f)?this.f:String(this.f)},(r=Ln.prototype).wa=8,r.u=1,r.Da=function(){return 0==this.u},r.Ia=function(e){if(this.h)if(this.h=null,1==this.u){if(!e){this.P=Math.floor(1e5*Math.random());var t,n=new ht(this,e=this.P++,void 0),r=this.i;if(this.J&&(r?U(r=M(r),this.J):r=this.J),null===this.g&&(n.h=r),this.W)e:{for(var o=t=0;o<this.f.length;o++){var i=this.f[o];if(void 0===(i="__data__"in i.a&&u(i=i.a.__data__)?i.length:void 0))break;if(4096<(t+=i)){t=o;break e}if(4096===t||o===this.f.length-1){t=o+1;break e}}t=1e3}else t=1e3;
1t=Wn(this,n,t),Ft(o=Rt(this.B),"RID",e),Ft(o,"CVER",22),this.o&&this.j&&Ft(o,"X-HTTP-Session-Id",this.j),zn(this,o),this.g&&r&&Mn(o,this.g,r),yn(this.b,n),this.W?(Ft(o,"$req",t),Ft(o,"SID","null"),n.S=!0,yt(n,o,null)):yt(n,o,t),this.u=2}}else 3==this.u&&(e?Vn(this,e):0==this.f.length||pn(this.b)||Vn(this))},r.Ha=function(){this.l=null,this.a=new ht(this,"rpc",this.S),null===this.g&&(this.a.h=this.i),this.a.J=0;var e=Rt(this.pa);Ft(e,"RID","rpc"),Ft(e,"SID",this.H),Ft(e,"CI",this.ia?"0":"1"),Ft(e,"AID",this.O),zn(this,e),Ft(e,"TYPE","xmlhttp"),this.g&&this.i&&Mn(e,this.g,this.i),this.D&&this.a.setTimeout(this.D),vt(this.a,e,!0,this.ga)},r.Ga=function(e,t){if(0!=this.u&&(this.a==e||mn(this.b,e)))if(this.m=e.o,!e.s&&mn(this.b,e)&&3==this.u){try{var n=this.ja.a.parse(t)}catch(i){n=null}if(h(n)&&3==n.length){if(0==(t=n)[0]){e:if(!this.l){if(this.a){if(!(this.a.v+3e3<e.v))break e;Hn(this),this.a.cancel(),this.a=null}Gn(this),Ze(18)}}else this.ra=t[1],0<this.ra-this.O&&37500>t[2]&&this.ia&&0==this.v&&!this.s&&(this.s=tt(b(this.Za,this),6e3));if(1>=dn(this.b)&&this.fa){try{this.fa()}catch(i){}this.fa=void 0}}else $n(this,11)}else if((e.s||this.a==e)&&Hn(this),!x(t))for(t=n=this.ja.a.parse(t),n=0;n<t.length;n++){var r=t[n];if(this.O=r[0],r=r[1],2==this.u)if("c"==r[0]){this.H=r[1],this.ga=r[2];var o=r[3];null!=o&&(this.wa=o),null!=(r=r[5])&&s(r)&&0<r&&(this.D=1.5*r),this.o&&(r=e.a)&&((o=jn(r,"X-Client-Wire-Protocol"))&&hn(this.b,o),this.j&&(r=jn(r,"X-HTTP-Session-Id")))&&(this.I=r,Ft(this.B,this.j,r)),this.u=3,this.c&&this.c.va(),r=e,this.pa=Jn(this,this.Y()?this.ga:null,this.ha),r.s?(vn(this.b,r),(o=this.D)&&r.setTimeout(o),r.i&&(St(r),Et(r)),this.a=r):Qn(this),0<this.f.length&&qn(this)}else"stop"!=r[0]&&"close"!=r[0]||$n(this,7);else 3==this.u&&("stop"==r[0]||"close"==r[0]?"stop"==r[0]?$n(this,7):Un(this):"noop"!=r[0]&&this.c&&this.c.ua(r),this.v=0)}},r.Za=function(){null!=this.s&&(this.s=null,this.a.cancel(),this.a=null,Gn(this),Ze(19))},r.na=function(e){var t=null;if(this.a==e){Hn(this),this.a=null;var n=2}else{if(!mn(this.b,e))return;t=e.j,vn(this.b,e),n=1}if(this.m=e.o,0!=this.u)if(e.b)1==n?(t=E()-e.v,Ye.dispatchEvent(new et(Ye,e.l?e.l.length:0,t,this.A)),qn(this)):Qn(this);else{var r=e.c;if(3==r||0==r&&0<this.m||!(1==n&&function(e,t){return!(dn(e.b)>=e.b.f-(e.h?1:0))&&(e.h?(e.f=t.j.concat(e.f),!0):!(1==e.u||2==e.u||e.A>=(e.Pa?0:e.Qa))&&(e.h=tt(b(e.Ia,e,t),Yn(e,e.A)),e.A++,!0))}(this,e)||2==n&&Gn(this)))switch(t&&0<t.length&&(e=this.b,e.c=e.c.concat(t)),r){case 1:$n(this,5);break;case 4:$n(this,10);break;case 3:$n(this,6);break;default:$n(this,2)}}},r.fb=function(e){Ze(e?2:1)},r.$=function(e){if(e&&!this.R)throw Error("Can't create secondary domain capable XhrIo object.");return(e=new Tn(this.La)).F=this.R,e},r.ma=function(){return!!this.c&&!0},r.Y=function(){return this.R},(r=Zn.prototype).va=function(){},r.ua=function(){},r.ta=function(){},r.sa=function(){},r.Ta=function(){},er.prototype.a=function(e,t){return new tr(e,t)},_(tr,Oe),(r=tr.prototype).addEventListener=function(e,t,n,r){tr.N.addEventListener.call(this,e,t,n,r)},r.removeEventListener=function(e,t,n,r){tr.N.removeEventListener.call(this,e,t,n,r)},r.Wa=function(){this.a.c=this.f,this.l&&(this.a.R=!0);var e=this.a,t=this.m,n=this.g,r=this.b||void 0;Ze(0),e.ha=n,e.V=r||{},e.o&&(e.F.b=[],e.F.a=!1),e.w=new rn(e),null===e.g&&(e.w.h=e.i),n=t,e.g&&e.i&&(n=Mn(t,e.g,e.i)),(e=e.w).i=n,t=Jn(e.a,null,e.i),Ze(3),null!=(n=e.a.F.b)?(e.f=n[0],e.M=1,on(e)):(Bt(t,"MODE","init"),!e.a.o&&e.a.j&&Bt(t,"X-HTTP-Session-Id",e.a.j),e.b=new ht(e,void 0,void 0),e.b.h=e.h,vt(e.b,t,!1,null),e.M=0)},r.close=function(){Un(this.a)},r.Xa=function(e){if(u(e)){var t={};t.__data__=e,Bn(this.a,t)}else this.h?((t={}).__data__=Ce(e),Bn(this.a,t)):Bn(this.a,e)},r.G=function(){this.a.c=null,delete this.f,Un(this.a),delete this.a,tr.N.G.call(this)},_(nr,ct),_(rr,lt),_(or,Zn),or.prototype.va=function(){this.a.dispatchEvent("a")},or.prototype.ua=function(e){this.a.dispatchEvent(new nr(e))},or.prototype.ta=function(e){this.a.dispatchEvent(new rr(e))},or.prototype.sa=function(){this.a.dispatchEvent("b")};var ir=w((function(e,t){function n(){}n.prototype=e.prototype;var r=new n;
1return e.apply(r,Array.prototype.slice.call(arguments,1)),r}),er);er.prototype.createWebChannel=er.prototype.a,tr.prototype.send=tr.prototype.Xa,tr.prototype.open=tr.prototype.Wa,tr.prototype.close=tr.prototype.close,nt.NO_ERROR=0,nt.TIMEOUT=8,nt.HTTP_ERROR=6,rt.COMPLETE="complete",at.EventType=st,st.OPEN="a",st.CLOSE="b",st.ERROR="c",st.MESSAGE="d",Oe.prototype.listen=Oe.prototype.Aa,Tn.prototype.listenOnce=Tn.prototype.Ba,Tn.prototype.getLastError=Tn.prototype.Ya,Tn.prototype.getLastErrorCode=Tn.prototype.ya,Tn.prototype.getStatus=Tn.prototype.T,Tn.prototype.getStatusText=Tn.prototype.za,Tn.prototype.getResponseJson=Tn.prototype.Va,Tn.prototype.getResponseText=Tn.prototype.aa,Tn.prototype.send=Tn.prototype.ca;var ar={createWebChannelTransport:ir,ErrorCode:nt,EventType:rt,WebChannel:at,XhrIo:Tn},ur=ar.createWebChannelTransport,sr=ar.ErrorCode,cr=ar.EventType,lr=ar.WebChannel,fr=ar.XhrIo;t.default=ar}.call(this,n(78))},function(e,t,n){var r=n(8);e.exports=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=r(e)););return e}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}},function(e,t,n){var r=n(59);e.exports=function(e,t){var n=!0;return r(e,(function(e,r,o){return n=!!t(e,r,o)})),n}},function(e,t){e.exports=function(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n}},function(e,t,n){var r=n(380),o=n(179);e.exports=function(e,t){return r(e,t,(function(t,n){return o(e,n)}))}},function(e,t,n){var r=n(104),o=n(197),i=n(86);e.exports=function(e,t,n){for(var a=-1,u=t.length,s={};++a<u;){var c=t[a],l=r(e,c);n(l,c)&&o(s,i(c,e),l)}return s}},function(e,t,n){var r=n(382),o=n(166),i=n(168);e.exports=function(e){return i(o(e,void 0,r),e+"")}},function(e,t,n){var r=n(142);e.exports=function(e){return(null==e?0:e.length)?r(e,1):[]}},function(e,t,n){var r=n(64),o=n(83),i=n(20),a=r?r.isConcatSpreadable:void 0;e.exports=function(e){return i(e)||o(e)||!!(a&&e&&e[a])}},function(e,t,n){var r=n(385),o=n(141),i=n(386);e.exports=function(e){return o(e)?i(e):r(e)}},function(e,t,n){var r=n(181)("length");e.exports=r},function(e,t){var n="[\\ud800-\\udfff]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",o="\\ud83c[\\udffb-\\udfff]",i="[^\\ud800-\\udfff]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",u="[\\ud800-\\udbff][\\udc00-\\udfff]",s="(?:"+r+"|"+o+")"+"?",c="[\\ufe0e\\ufe0f]?"+s+("(?:\\u200d(?:"+[i,a,u].join("|")+")[\\ufe0e\\ufe0f]?"+s+")*"),l="(?:"+[i+r+"?",r,a,u,n].join("|")+")",f=RegExp(o+"(?="+o+")|"+l+c,"g");e.exports=function(e){for(var t=f.lastIndex=0;f.test(e);)++t;return t}},function(e,t,n){var r=n(388),o=n(389),i=n(48),a=n(20);e.exports=function(e,t){return function(n,u){var s=a(n)?r:o,c=t?t():{};return s(n,e,i(u,2),c)}}},function(e,t){e.exports=function(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r}},function(e,t,n){var r=n(59);e.exports=function(e,t,n,o){return r(e,(function(e,r,i){t(o,e,n(e),i)})),o}},,function(e,t,n){var r=n(392),o=n(393);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var u=0;u<16;++u)t[i+u]=a[u];return t||o(a)}},function(e,t){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var o=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0===(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,o=n;return[o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]]].join("")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){HTMLCanvasElement.prototype.toBlob||(0,i.default)();return new Promise((function(r,o){var i=new FileReader;i.onload=function(i){var a=new Image;a.onload=function(i){var u=document.createElement("canvas"),s=t||a.width,c=n||a.height;u.width=s,u.height=c;var l=s/a.width,f=c/a.height,h=Math.max(l,f),p=h*a.width,d=h*a.height,m=Math.min((c-d)/2,0),y=Math.min((s-p)/2,0),v=u.getContext("2d");if(!v)return o("Could not get the context of the canvas element");v.drawImage(a,y,m,p,d),u.toBlob((function(e){r(e)}),e.type)},a.src=i.target.result},i.readAsDataURL(e)}))};var r,o=n(395),i=(r=o)&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){Object.defineProperty(HTMLCanvasElement.prototype,"toBlob",{value:function(e,t,n){for(var r=atob(this.toDataURL(t,n).split(",")[1]),o=r.length,i=new Uint8Array(o),a=0;a<o;a++)i[a]=r.charCodeAt(a);e(new Blob([i],{type:t||"image/png"}))}})}},function(e,t,n){var r=n(38),o=n(87),i=n(106),a=n(53),u=r.isFinite,s=Math.min;e.exports=function(e){var t=Math[e];return function(e,n){if(e=i(e),(n=null==n?0:s(o(n),292))&&u(e)){var r=(a(e)+"e").split("e"),c=t(r[0]+"e"+(+r[1]+n));return+((r=(a(c)+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=s(n(0)),o=s(n(7)),i=s(n(108)),a=n(209),u=n(208);function s(e){return e&&e.__esModule?e:{default:e}}function c(e){return(c="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})(e)}function l(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 f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return!t||"object"!==c(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var v=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),d(this,m(t).call(this,e,n))}var n,o,i;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&&y(e,t)}(t,e),n=t,(o=[{key:"render",value:function(){var e=f({},this.getContext(),{},this.props),t=(0,a.extractCloudinaryProps)(e),n=t.children,o=t.cloudinaryProps,i=t.nonCloudinaryProps,s=t.cloudinaryReactProps;return r.default.createElement(u.CloudinaryContextType.Provider,{value:o},s.includeOwnBody?n:r.default.createElement("div",i,n))}}])&&p(n.prototype,o),i&&p(n,i),t}(i.default);v.propTypes=f({},i.default.propTypes,{includeOwnBody:o.default.bool}),v.defaultProps={includeOwnBody:!1},v.contextType=u.CloudinaryContextType;var g=v;t.default=g},function(e,t,n){"use strict";(function(e){var r=n(399),o=n(400),i=n(401);function a(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=s.prototype:(null===e&&(e=new s(t)),e.length=t),e}function s(e,t,n){if(!s.TYPED_ARRAY_SUPPORT&&!(this instanceof s))return new s(e,t,n);if("number"===typeof e){if("string"===typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return c(this,e,t,n)}function c(e,t,n,r){if("number"===typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!==typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);s.TYPED_ARRAY_SUPPORT?(e=t).__proto__=s.prototype:e=h(e,t);return e}(e,t,n,r):"string"===typeof t?function(e,t,n){"string"===typeof n&&""!==n||(n="utf8");if(!s.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|d(t,n),o=(e=u(e,r)).write(t,n);o!==r&&(e=e.slice(0,o));return e}(e,t,n):function(e,t){if(s.isBuffer(t)){var n=0|p(t.length);return 0===(e=u(e,n)).length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!==typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!==typeof t.length||(r=t.length)!==r?u(e,0):h(e,t);if("Buffer"===t.type&&i(t.data))return h(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function l(e){if("number"!==typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(l(t),e=u(e,t<0?0:0|p(t)),!s.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function h(e,t){var n=t.length<0?0:0|p(t.length);e=u(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function p(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function d(e,t){if(s.isBuffer(e))return e.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&
vendor: 8,954 bytes, line 1
1(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!==typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return V(e).length;default:if(r)return q(e).length;t=(""+t).toLowerCase(),r=!0}}function m(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 I(this,t,n);case"utf8":case"utf-8":return k(this,t,n);case"ascii":return x(this,t,n);case"latin1":case"binary":return A(this,t,n);case"base64":return O(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 y(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,o){if(0===e.length)return-1;if("string"===typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"===typeof t&&(t=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:g(e,t,n,r,o);if("number"===typeof t)return t&=255,s.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):g(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function g(e,t,n,r,o){var i,a=1,u=e.length,s=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;a=2,u/=2,s/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var l=-1;for(i=n;i<u;i++)if(c(e,i)===c(t,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===s)return l*a}else-1!==l&&(i-=i-l),l=-1}else for(n+s>u&&(n=u-s),i=n;i>=0;i--){for(var f=!0,h=0;h<s;h++)if(c(e,i+h)!==c(t,h)){f=!1;break}if(f)return i}return-1}function b(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=t.length;if(i%2!==0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a<r;++a){var u=parseInt(t.substr(2*a,2),16);if(isNaN(u))return a;e[n+a]=u}return a}function w(e,t,n,r){return z(q(t,e.length-n),e,n,r)}function E(e,t,n,r){return z(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function _(e,t,n,r){return E(e,t,n,r)}function S(e,t,n,r){return z(V(t),e,n,r)}function T(e,t,n,r){return z(function(e,t){for(var n,r,o,i=[],a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function O(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function k(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o<n;){var i,a,u,s,c=e[o],l=null,f=c>239?4:c>223?3:c>191?2:1;if(o+f<=n)switch(f){case 1:c<128&&(l=c);break;case 2:128===(192&(i=e[o+1]))&&(s=(31&c)<<6|63&i)>127&&(l=s);break;case 3:i=e[o+1],a=e[o+2],128===(192&i)&&128===(192&a)&&(s=(15&c)<<12|(63&i)<<6|63&a)>2047&&(s<55296||s>57343)&&(l=s);break;case 4:i=e[o+1],a=e[o+2],u=e[o+3],128===(192&i)&&128===(192&a)&&128===(192&u)&&(s=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&u)>65535&&s<1114112&&(l=s)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=f}return function(e){var t=e.length;if(t<=C)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=C));return n}(r)}t.Buffer=s,t.SlowBuffer=function(e){+e!=e&&(e=0);return s.alloc(+e)},t.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"===typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(t){return!1}}(),t.kMaxLength=a(),s.poolSize=8192,s._augment=function(e){return e.__proto__=s.prototype,e},s.from=function(e,t,n){return c(null,e,t,n)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(e,t,n){return function(e,t,n,r){return l(t),t<=0?u(e,t):void 0!==n?"string"===typeof r?u(e,t).fill(n,r):u(e,t).fill(n):u(e,t)}(null,e,t,n)},s.allocUnsafe=function(e){return f(null,e)},s.allocUnsafeSlow=function(e){return f(null,e)},s.isBuffer=function(e){return!(null==e||!e._isBuffer)},s.compare=function(e,t){if(!s.isBuffer(e)||!s.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},s.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(e,t){if(!i(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=s.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var a=e[n];if(!s.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,o),o+=a.length}return r},s.byteLength=d,s.prototype._isBuffer=!0,s.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;t<e;t+=2)y(this,t,t+1);return this},s.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},s.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},s.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?k(this,0,e):m.apply(this,arguments)},s.prototype.equals=function(e){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},s.prototype.compare=function(e,t,n,r,o){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),u=Math.min(i,a),c=this.slice(r,o),l=e.slice(t,n),f=0;f<u;++f)if(c[f]!==l[f]){i=c[f],a=l[f];break}return i<a?-1:a<i?1:0},s.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},s.prototype.indexOf=function(e,t,n){return v(this,e,t,n,!0)},s.prototype.lastIndexOf=function(e,t,n){return v(this,e,t,n,!1)},s.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"===typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":return E(this,e,t,n);case"latin1":case"binary":return _(this,e,t,n);case"base64":return S(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var C=4096;function x(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function A(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function I(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=t;i<n;++i)o+=B(e[i]);return o}function N(e,t,n){for(var r=e.slice(t,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function D(e,t,n){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}
vendor: 7,301 bytes, line 1
1function P(e,t,n,r,o,i){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function R(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o<i;++o)e[n+o]=(t&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function j(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o<i;++o)e[n+o]=t>>>8*(r?o:3-o)&255}function M(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function L(e,t,n,r,i){return i||M(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function U(e,t,n,r,i){return i||M(e,0,n,8),o.write(e,t,n,r,52,8),n+8}s.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),s.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=s.prototype;else{var o=t-e;n=new s(o,void 0);for(var i=0;i<o;++i)n[i]=this[i+e]}return n},s.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r},s.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},s.prototype.readUInt8=function(e,t){return t||D(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return t||D(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return t||D(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*t)),r},s.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},s.prototype.readInt8=function(e,t){return t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){t||D(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(e,t){t||D(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(e,t){return t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return t||D(e,4,this.length),o.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return t||D(e,4,this.length),o.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return t||D(e,8,this.length),o.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return t||D(e,8,this.length),o.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||P(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i<n&&(o*=256);)this[t+i]=e/o&255;return t+n},s.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||P(this,e,t,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},s.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,1,255,0),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):j(this,e,t,!0),t+4},s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):j(this,e,t,!1),t+4},s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);P(this,e,t,n,o-1,-o)}var i=0,a=1,u=0;for(this[t]=255&e;++i<n&&(a*=256);)e<0&&0===u&&0!==this[t+i-1]&&(u=1),this[t+i]=(e/a>>0)-u&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);P(this,e,t,n,o-1,-o)}var i=n-1,a=1,u=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===u&&0!==this[t+i+1]&&(u=1),this[t+i]=(e/a>>0)-u&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,1,127,-128),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):j(this,e,t,!0),t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):j(this,e,t,!1),t+4},s.prototype.writeFloatLE=function(e,t,n){return L(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return L(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return U(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return U(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var o,i=r-n;if(this===e&&n<t&&t<r)for(o=i-1;o>=0;--o)e[o+t]=this[o+n];else if(i<1e3||!s.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+i),t);return i},s.prototype.fill=function(e,t,n,r){if("string"===typeof e){if("string"===typeof t?(r=t,t=0,n=this.length):"string"===typeof n&&(r=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==r&&"string"!==typeof r)throw new TypeError("encoding must be a string");if("string"===typeof r&&!s.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"===typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"===typeof e)for(i=t;i<n;++i)this[i]=e;else{var a=s.isBuffer(e)?e:q(new s(e,r).toString()),u=a.length;for(i=0;i<n-t;++i)this[i+t]=a[i%u]}
vendor: 4,252 bytes, line 1
1return this};var F=/[^+\/0-9A-Za-z-_]/g;function B(e){return e<16?"0"+e.toString(16):e.toString(16)}function q(e,t){var n;t=t||1/0;for(var r=e.length,o=null,i=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.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;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function V(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(F,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function z(e,t,n,r){for(var o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}}).call(this,n(78))},function(e,t,n){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=c(e),a=r[0],u=r[1],s=new i(function(e,t,n){return 3*(t+n)/4-n}(0,a,u)),l=0,f=u>0?a-4:a;for(n=0;n<f;n+=4)t=o[e.charCodeAt(n)]<<18|o[e.charCodeAt(n+1)]<<12|o[e.charCodeAt(n+2)]<<6|o[e.charCodeAt(n+3)],s[l++]=t>>16&255,s[l++]=t>>8&255,s[l++]=255&t;2===u&&(t=o[e.charCodeAt(n)]<<2|o[e.charCodeAt(n+1)]>>4,s[l++]=255&t);1===u&&(t=o[e.charCodeAt(n)]<<10|o[e.charCodeAt(n+1)]<<4|o[e.charCodeAt(n+2)]>>2,s[l++]=t>>8&255,s[l++]=255&t);return s},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=0,u=n-o;a<u;a+=16383)i.push(l(e,a,a+16383>u?u:a+16383));1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!==typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,s=a.length;u<s;++u)r[u]=a[u],o[a.charCodeAt(u)]=u;function c(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,n){for(var o,i,a=[],u=t;u<n;u+=3)o=(e[u]<<16&16711680)+(e[u+1]<<8&65280)+(255&e[u+2]),a.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,o){var i,a,u=8*o-r-1,s=(1<<u)-1,c=s>>1,l=-7,f=n?o-1:0,h=n?-1:1,p=e[t+f];for(f+=h,i=p&(1<<-l)-1,p>>=-l,l+=u;l>0;i=256*i+e[t+f],f+=h,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=r;l>0;a=256*a+e[t+f],f+=h,l-=8);if(0===i)i=1-c;else{if(i===s)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),i-=c}return(p?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,u,s,c=8*i-o-1,l=(1<<c)-1,f=l>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,d=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(u=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-a))<1&&(a--,s*=2),(t+=a+f>=1?h/s:h*Math.pow(2,1-f))*s>=2&&(a++,s/=2),a+f>=l?(u=0,a=l):a+f>=1?(u=(t*s-1)*Math.pow(2,o),a+=f):(u=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[n+p]=255&u,p+=d,u/=256,o-=8);for(a=a<<o|u,c+=o;c>0;e[n+p]=255&a,p+=d,a/=256,c-=8);e[n+p-d]|=128*m}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){var r=n(107),o=n(70),i=n(200),a=n(40),u=n(85),s=n(26),c=Object.prototype.hasOwnProperty,l=i((function(e,t){if(u(t)||a(t))o(t,s(t),e);else for(var n in t)c.call(t,n)&&r(e,n,t[n])}));e.exports=l},function(e,t,n){var r=n(404),o=1,i=4;e.exports=function(e){return r(e,o|i)}},function(e,t,n){var r=n(101),o=n(185),i=n(107),a=n(405),u=n(406),s=n(201),c=n(202),l=n(409),f=n(410),h=n(173),p=n(411),d=n(67),m=n(412),y=n(413),v=n(205),g=n(20),b=n(84),w=n(418),E=n(39),_=n(420),S=n(26),T=1,O=2,k=4,C="[object Arguments]",x="[object Function]",A="[object GeneratorFunction]",I="[object Object]",N={};N[C]=N["[object Array]"]=N["[object ArrayBuffer]"]=N["[object DataView]"]=N["[object Boolean]"]=N["[object Date]"]=N["[object Float32Array]"]=N["[object Float64Array
1]"]=N["[object Int8Array]"]=N["[object Int16Array]"]=N["[object Int32Array]"]=N["[object Map]"]=N["[object Number]"]=N[I]=N["[object RegExp]"]=N["[object Set]"]=N["[object String]"]=N["[object Symbol]"]=N["[object Uint8Array]"]=N["[object Uint8ClampedArray]"]=N["[object Uint16Array]"]=N["[object Uint32Array]"]=!0,N["[object Error]"]=N[x]=N["[object WeakMap]"]=!1,e.exports=function e(t,n,D,P,R,j){var M,L=n&T,U=n&O,F=n&k;if(D&&(M=R?D(t,P,R,j):D(t)),void 0!==M)return M;if(!E(t))return t;var B=g(t);if(B){if(M=m(t),!L)return c(t,M)}else{var q=d(t),V=q==x||q==A;if(b(t))return s(t,L);if(q==I||q==C||V&&!R){if(M=U||V?{}:v(t),!L)return U?f(t,u(M,t)):l(t,a(M,t))}else{if(!N[q])return R?t:{};M=y(t,q,L)}}j||(j=new r);var z=j.get(t);if(z)return z;j.set(t,M),_(t)?t.forEach((function(r){M.add(e(r,n,D,r,t,j))})):w(t)&&t.forEach((function(r,o){M.set(o,e(r,n,D,o,t,j))}));var W=F?U?p:h:U?keysIn:S,Q=B?void 0:W(t);return o(Q||t,(function(r,o){Q&&(r=t[o=r]),i(M,o,e(r,n,D,o,t,j))})),M}},function(e,t,n){var r=n(70),o=n(26);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(70),o=n(110);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(39),o=n(85),i=n(408),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=o(e),n=[];for(var u in e)("constructor"!=u||!t&&a.call(e,u))&&n.push(u);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){var r=n(70),o=n(132);e.exports=function(e,t){return r(e,o(e),t)}},function(e,t,n){var r=n(70),o=n(203);e.exports=function(e,t){return r(e,o(e),t)}},function(e,t,n){var r=n(174),o=n(203),i=n(110);e.exports=function(e){return r(e,i,o)}},function(e,t){var n=Object.prototype.hasOwnProperty;e.exports=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&n.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},function(e,t,n){var r=n(144),o=n(414),i=n(415),a=n(416),u=n(204),s="[object Boolean]",c="[object Date]",l="[object Map]",f="[object Number]",h="[object RegExp]",p="[object Set]",d="[object String]",m="[object Symbol]",y="[object ArrayBuffer]",v="[object DataView]",g="[object Float32Array]",b="[object Float64Array]",w="[object Int8Array]",E="[object Int16Array]",_="[object Int32Array]",S="[object Uint8Array]",T="[object Uint8ClampedArray]",O="[object Uint16Array]",k="[object Uint32Array]";e.exports=function(e,t,n){var C=e.constructor;switch(t){case y:return r(e);case s:case c:return new C(+e);case v:return o(e,n);case g:case b:case w:case E:case _:case S:case T:case O:case k:return u(e,n);case l:return new C;case f:case d:return new C(e);case h:return i(e);case p:return new C;case m:return a(e)}}},function(e,t,n){var r=n(144);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},function(e,t){var n=/\w*$/;e.exports=function(e){var t=new e.constructor(e.source,n.exec(e));return t.lastIndex=e.lastIndex,t}},function(e,t,n){var r=n(64),o=r?r.prototype:void 0,i=o?o.valueOf:void 0;e.exports=function(e){return i?Object(i.call(e)):{}}},function(e,t,n){var r=n(39),o=Object.create,i=function(){function e(){}return function(t){if(!r(t))return{};if(o)return o(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=i},function(e,t,n){var r=n(419),o=n(80),i=n(135),a=i&&i.isMap,u=a?o(a):r;e.exports=u},function(e,t,n){var r=n(67),o=n(31),i="[object Map]";e.exports=function(e){return o(e)&&r(e)==i}},function(e,t,n){var r=n(421),o=n(80),i=n(135),a=i&&i.isSet,u=a?o(a):r;e.exports=u},function(e,t,n){var r=n(67),o=n(31),i="[object Set]";e.exports=function(e){return o(e)&&r(e)==i}},function(e,t,n){var r=n(423),o=n(26);e.exports=function(e){return null==e?[]:r(e,o(e))}},function(e,t,n){var r=n(133),o=n(42);e.exports=function(e,t){return r(t,(function(t){return o(e[t])}))}},function(e,t,n){var r=n(31),o=n(60);e.exports=function(e){return r(e)&&1===e.nodeType&&!o(e)}},function(e,t,n){var r=n(426),o=n(200)((function(e,t,n){r(e,t,n)}));e.exports=o},function(e,t,n){var r=n(101),o=n(206),i=n(184),a=n(427),u=n(39),s=n(110),c=n(207);e.exports=function e(t,n,l,f,h){t!==n&&i(n,(function(i,s){if(h||(h=new r),u(i))a(t,n,s,l,e,f,h);else{var p=f?f(c(t,s),i,s+"",t,n,h):void 0;void 0===p&&(p=i),o(t,s,p)}}),s)}},function(e,t,n){var r=n(206),o=n(201),i=n(204),a=n(202),u=n(205),s=n(83),c=n(20),l=n(82),f=n(84),h=n(42),p=n(39),d=n(60),m=n(103),y=n(207),v=n(428);e.exports=function(e,t,n,g,b,w,E){var _=y(e,n),S=y(t,n),T=E.get(S);if(T)r(e,n,T);else{var O=w?w(_,S,n+"",e,t,E):void 0,k=void 0===O;if(k){var C=c(S),x=!C&&f(S),A=!C&&!x&&m(S);O=S,C||x||A?c(_)?O=_:l(_)?O=a(_):x?(k=!1,O=o(S,!0)):A?(k=!1,O=i(S,!0)):O=[]:d(S)||s(S)?(O=_,s(_)?O=v(_):p(_)&&!h(_)||(O=u(S))):k=!1}k&&(E.set(S,O),b(O,S,g,w,E),E.delete(S)),r(e,n,O)}}},function(e,t,n){var r=n(70),o=n(110);e.exports=function(e){return r(e,o(e))}},function(e,t,n){var r=n(138),o=n(193),i=n(430),a=n(431),u=n(194),s=n(53),c=/^\s+|\s+$/g;
1e.exports=function(e,t,n){if((e=s(e))&&(n||void 0===t))return e.replace(c,"");if(!e||!(t=r(t)))return e;var l=u(e),f=u(t),h=a(l,f),p=i(l,f)+1;return o(l,h,p).join("")}},function(e,t,n){var r=n(99);e.exports=function(e,t){for(var n=e.length;n--&&r(t,e[n],0)>-1;);return n}},function(e,t,n){var r=n(99);e.exports=function(e,t){for(var n=-1,o=e.length;++n<o&&r(t,e[n],0)>-1;);return n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r=arguments,o=this,i=null,a=function(){var a=o,u=r,s=n&&!i;i&&clearTimeout(i);i=setTimeout((function(){i=null,n||e.apply(a,u)}),t),s&&e.apply(a,u)};return a.cancel=function(){clearTimeout(i),i=null},a}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0;r<t.length;r++)if(void 0!==t[r])return t[r];return}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return e.reduce((function(e,n){return t<=e?e:n}),void 0)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cancelAnimationFrame=t.requestAnimationFrame=void 0;var r,o,i=0,a=["ms","moz","webkit","o"];if(t.requestAnimationFrame=r,t.cancelAnimationFrame=o,"undefined"!=typeof window){t.requestAnimationFrame=r=window.requestAnimationFrame,t.cancelAnimationFrame=o=window.cancelAnimationFrame;for(var u=0;u<a.length&&!r;++u)t.requestAnimationFrame=r=window[a[u]+"RequestAnimationFrame"],t.cancelAnimationFrame=o=window[a[u]+"CancelAnimationFrame"]||window[a[u]+"CancelRequestAnimationFrame"]}r||(t.requestAnimationFrame=r=function(e,t){var n=(new Date).getTime(),r=Math.max(0,16-(n-i)),o=setTimeout((function(){e(n+r)}),r);return i=n+r,o}),o||(t.cancelAnimationFrame=o=function(e){clearTimeout(e)})},function(e,t,n){"use strict";function r(e){return(r="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})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return null!=e&&1===e.nodeType&&function(e){return null!=e&&"object"==r(e)}(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(109);function o(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var i={includeOwnBody:!0},a=r.Transformation.PARAM_NAMES.map(r.Util.camelCase).reduce((function(e,t){return e[t]=!0,e}),{});t.default=function(e){var t=e.children,n=o(e,["children"]),u={children:t,cloudinaryProps:{},nonCloudinaryProps:{},cloudinaryReactProps:{}};return Object.keys(n).forEach((function(e){var t=r.Util.camelCase(e),o=n[e];a[t]?function(e,t){return void 0!==e[t]&&null!==e[t]}(n,e)&&(u.cloudinaryProps[t]=o):i[t]?u.cloudinaryReactProps[t]=o:u.nonCloudinaryProps[e]=o})),u}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=s(n(0)),o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==c(e)&&"function"!==typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(109)),i=s(n(108)),a=n(209);function u(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e){return e&&e.__esModule?e:{default:e}}function c(e){return(c="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})(e)}function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function f(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function h(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 p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var g=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;return t*Math.ceil(e/t)},b=function(e){function t(e,n){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t){return!t||"object"!==c(t)&&"function"!==typeof t?y(e):t}(this,m(t).call(this,e,n))).handleResize=r.handleResize.bind(y(r)),r.attachRef=r.attachRef.bind(y(r));var o={responsive:!1,url:void 0,breakpoints:g};return r.state=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?h(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},o,{},r.prepareState(e,n)),r}var n,u,s;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&&v(e,t)}(t,e),n=t,(u=[{key:"prepareState",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getContext(),n=i.default.normalizeOptions(t,e),r=this.getUrl(n),a={},u={};void 0!==n.breakpoints&&(a.breakpoints=n.breakpoints),n.responsive&&(a.responsive=!0,r=(u=this.cloudinaryUpdate(r,a)).url);var s=this.state||{};return a.width=u.width,o.Util.isEmpty(r)||r===s.url||(a.url=r),a}},{key:"attachRef",value:function(e){this.element=e;var t=this.props.innerRef;t&&(t instanceof Function?t(e):t.current=e)}},{key:"handleResize",value:function(){var e=this;this.props.responsive&&!this.rqf&&(this.rqf=(0,a.requestAnimationFrame)((function(){e.rqf=null;var t=e.prepareState();o.Util.isEmpty(t.url)||e.setState(t)})))}},{key:"componentDidMount",value:function(){this.handleResize()}},{key:"componentWillUnmount",value:function(){this.element=void 0,this.listener&&(this.listener.cancel(),this.window&&this.window.removeEventListener("resize",this.listener)),this.listener=void 0}},{key:"componentDidUpdate",value:function(e){if(this.setState(this.prepareState()),this.state.responsive){var t=(0,a.firstDefined)(this.props.responsiveDebounce,this.getContext().responsiveDebounce,100);this.listener&&this.window&&this.window.removeEventListener("resize",this.listener),this.listener=(0,a.debounce)(this.handleResize,t),this.window&&this.window.addEventListener("resize",this.listener)}}},{key:"render",value:function(){var e=i.default.normalizeOptions(this.props,this.getContext()),t=(e.publicId,e.responsive,e.responsiveDebounce,e.children,e.innerRef,f(e,["publicId","responsive","responsiveDebounce","children","innerRef"])),n=o.default.Transformation.new(t).toHtmlAttributes(),a=this.state.url;return r.default.createElement("img",l({},n,{src:a,ref:this.attachRef}))}},{key:"findContainerWidth",value:function(){var e,t;e=0;for(var n=this.element;(0,a.isElement)(n=null!=n?n.parentNode:void 0)&&!e;)t=this.window?this.window.getComputedStyle(n):"",/^inline/.test(t.display)||(e=o.Util.width(n));return Math.round(e)}},{key:"applyBreakpoints",value:function(e,t,n){var r=(n=i.default.normalizeOptions(this.getContext(),this.props,n)).responsiveUseBreakpoints;return!r||"resize"===r&&!n.resizing?e:this.calc_breakpoint(e,t)}},{key:"calc_breakpoint",value:function(e,t){var n,r;return n=this.state&&this.state.breakpoints||g,o.Util.isFunction(n)?n(e,t):(o.Util.isString(n)&&(n=function(){var e,t,o,i;for(i=[],e=0,t=(o=n.split(",")).length;e<t;e++)r=o[e],i.push(parseInt(r));return i}().sort((function(e,t){return e-t}))),(0,a.closestAbove)(n,e))}},{key:"device_pixel_ratio",value:function(){var e,t,n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return e=("undefined"!==typeof this.window&&null!==this.window?this.window.devicePixelRatio:void 0)||1,n&&(e=Math.ceil(e)),(e<=0||isNaN(e))&&(e=1),(t=e.toString()).match(/^\d+$/)&&(t+=".0"),t}},{key:"updateDpr",value:function(e,t){return e.replace(/\bdpr_(1\.0|auto)\b/g,"dpr_"+this.device_pixel_ratio(t))}},{key:"maxWidth",value:function(e){return Math.max(this.state&&this.state.width||0,e)}},{key:"cloudinaryUpdate",value:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=this.updateDpr(e,r.roundDpr);if(r.responsive||this.state&&this.state.responsive){var i=this.findContainerWidth();0!==i?/w_auto:breakpoints/.test(o)?(t=this.maxWidth(i,this.element),o=o.replace(/w_auto:breakpoints([_0-9]*)(:[0-9]+)?/,"w_auto:breakpoints$1:"+t)):(n=/w_auto(:(\d+))?/.exec(o))&&(t=this.applyBreakpoints(i,n[2],r),t=this.maxWidth(t,this.element),o=o.replace(/w_auto[^,\/]*/g,"w_"+t)):o=""}return{url:o,width:t}}},{key:"window",get:function(){var e=null;return"undefined"!==typeof window&&(e=window),this.element&&this.element.ownerDocument&&this.element.ownerDocument.defaultView||e}}])&&d(n.prototype,u),s&&d(n,s),t}(i.default);b.defaultProps={}
1,b.propTypes=i.default.propTypes;var w=b;t.default=w},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;o(n(0));var r=o(n(108));function o(e){return e&&e.__esModule?e:{default:e}}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})(e)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return!t||"object"!==i(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),u(this,s(t).call(this,e,n))}var n,r,o;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&&c(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){return null}}])&&a(n.prototype,r),o&&a(n,o),t}(r.default);l.propTypes=r.default.propTypes,l.defaultProps={},l.exposesProps=!0;var f=l;t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(0)),o=u(n(7)),i=n(109),a=u(n(108));function u(e){return e&&e.__esModule?e:{default:e}}function s(e){return(s="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})(e)}function c(){return(c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return!t||"object"!==s(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var m={format:"jpg",resource_type:"video"},y=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=h(this,p(t).call(this,e,n))).state={},r}var n,o,u;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&&d(e,t)}(t,e),n=t,(o=[{key:"render",value:function(){var e=Object.assign({},this.getContext(),this.props),t=e.publicId,n=e.poster,o=e.sourceTypes,u=e.fallback,s=e.sourceTransformation,f=e.innerRef,h=l(e,["publicId","poster","sourceTypes","fallback","sourceTransformation","innerRef"]);s=s||{},o=o||i.Cloudinary.DEFAULT_VIDEO_PARAMS.source_types,h=a.default.normalizeOptions(h,{});var p=i.Cloudinary.new(i.Util.withSnakeCaseKeys(h)),d=[],y=i.Transformation.new(h).toHtmlAttributes(),v=this.getTransformation(h);if(i.Util.isPlainObject(n)){var g=void 0!==n.publicId&&null!==n.publicId?i.Cloudinary.DEFAULT_IMAGE_PARAMS:m;n=p.url(n.publicId||t,i.Util.defaults({},i.Util.withSnakeCaseKeys(n),g))}if(i.Util.isEmpty(n)||(y.poster=n),i.Util.isEmpty(this.state.poster)||(y.poster=this.state.poster),i.Util.isArray(o))d=o.map((function(e){var n=s[e]||{},o=p.url(t,i.Util.defaults({},n,v,{resource_type:"video",format:e})),a="video/"+("ogv"===e?"ogg":e);return r.default.createElement("source",{key:a,src:o,type:a})}));else{var b=s[o]||{};y.src=p.url(t,i.Util.defaults({},b,v,{resource_type:"video",format:o}))}return r.default.createElement("video",c({ref:f},y),d,u,this.props.children)}}])&&f(n.prototype,o),u&&f(n,u),t}(a.default);y.propTypes={publicId:o.default.string},y.defaultProps={},y.contextTypes=a.default.contextTypes;var v=y;t.default=v},,function(e,t,n){"use strict";var r=n(32),o=n(210),i=n(444),a=n(216);function u(e){var t=new i(e),n=o(i.prototype.request,t);return r.extend(n,i.prototype,t),r.extend(n,t),n}var s=u(n(213));s.Axios=i,s.create=function(e){return u(a(s.defaults,e))},s.Cancel=n(217),s.CancelToken=n(456),s.isCancel=n(212),s.all=function(e){return Promise.all(e)},s.spread=n(457),e.exports=s,e.exports.default=s},function(e,t){e.exports=function(e){return null!=e&&null!=e.constructor&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},function(e,t,n){"use strict";var r=n(32),o=n(211),i=n(445),a=n(446),u=n(216);function s(e){this.defaults=e,this.interceptors={request:new i,response:new i}}s.prototype.request=function(e){"string"===typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=u(this.defaults,e)).method=e.method?e.method.toLowerCase():"get";var t=[a,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)n=n.then(t.shift(),t.shift());return n},s.prototype.getUri=function(e){return e=u(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){s.prototype[e]=function(t,n){return this.request(r.merge(n||{},{method:e,url:t}))}})),r.forEach(["post","put","patch"],(function(e){s.prototype[e]=function(t,n,o){return this.request(r.merge(o||{},{method:e,url:t,data:n}))}})),e.exports=s},function(e,t,n){"use strict";var r=n(32);function o(){this.handlers=[]}o.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},function(e,t,n){"use strict";var r=n(32),o=n(447),i=n(212),a=n(213),u=n(454),s=n(455);function c(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return c(e),e.baseURL&&!u(e.url)&&(e.url=s(e.baseURL,e.url)),e.headers=e.headers||{},e.data=o(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||a.adapter)(e).then((function(t){return c(e),t.data=o(t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(c(e),t&&t.response&&(t.response.data=o(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,n){"use strict";var r=n(32);e.exports=function(e,t,n){return r.forEach(n,(function(n){e=n(e,t)})),e}},function(e,t,n){"use strict";var r=n(32);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},function(e,t,n){"use strict";var r=n(215);e.exports=function(e,t,n){var o=n.config.validateStatus;!o||o(n.status)?e(n):t(r("Request failed with status code "+n.status,n.config,null,n.request,n))}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.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}},e}},function(e,t,n){"use strict";var r=n(32),o=["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,i,a={};return e?(r.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(a[t]&&o.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},function(e,t,n){"use strict";var r=n(32);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(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=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";var r=n(32);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,o,i,a){var u=[];u.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&u.push("expires="+new Date(n).toGMTString()),r.isString(o)&&u.push("path="+o),r.isString(i)&&u.push("domain="+i),!0===a&&u.push("secure"),document.cookie=u.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(){}}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(217);function o(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;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},,function(e,t,n){"use strict";var r=n(74),o=n.n(r);function i(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var a="firebasestorage.googleapis.com",u="storageBucket",s=12e4,c=6e4,l=-9007199254740991,f=function(){function e(e,t){this.co
1de_=p(e),this.message_="Firebase Storage: "+t,this.serverResponse_=null,this.name_="FirebaseError"}return e.prototype.codeProp=function(){return this.code},e.prototype.codeEquals=function(e){return p(e)===this.codeProp()},e.prototype.serverResponseProp=function(){return this.serverResponse_},e.prototype.setServerResponseProp=function(e){this.serverResponse_=e},Object.defineProperty(e.prototype,"name",{get:function(){return this.name_},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"code",{get:function(){return this.code_},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"message",{get:function(){return this.message_},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"serverResponse",{get:function(){return this.serverResponse_},enumerable:!0,configurable:!0}),e}(),h={UNKNOWN:"unknown",OBJECT_NOT_FOUND:"object-not-found",BUCKET_NOT_FOUND:"bucket-not-found",PROJECT_NOT_FOUND:"project-not-found",QUOTA_EXCEEDED:"quota-exceeded",UNAUTHENTICATED:"unauthenticated",UNAUTHORIZED:"unauthorized",RETRY_LIMIT_EXCEEDED:"retry-limit-exceeded",INVALID_CHECKSUM:"invalid-checksum",CANCELED:"canceled",INVALID_EVENT_NAME:"invalid-event-name",INVALID_URL:"invalid-url",INVALID_DEFAULT_BUCKET:"invalid-default-bucket",NO_DEFAULT_BUCKET:"no-default-bucket",CANNOT_SLICE_BLOB:"cannot-slice-blob",SERVER_FILE_WRONG_SIZE:"server-file-wrong-size",NO_DOWNLOAD_URL:"no-download-url",INVALID_ARGUMENT:"invalid-argument",INVALID_ARGUMENT_COUNT:"invalid-argument-count",APP_DELETED:"app-deleted",INVALID_ROOT_OPERATION:"invalid-root-operation",INVALID_FORMAT:"invalid-format",INTERNAL_ERROR:"internal-error"};function p(e){return"storage/"+e}function d(){return new f(h.UNKNOWN,"An unknown error occurred, please check the error payload for server response.")}function m(){return new f(h.CANCELED,"User canceled the upload/download.")}function y(){return new f(h.CANNOT_SLICE_BLOB,"Cannot slice blob for upload. Please retry the upload.")}function v(){return new f(h.NO_DOWNLOAD_URL,"The given file does not have any download URLs.")}function g(e,t,n){return new f(h.INVALID_ARGUMENT,"Invalid argument in `"+t+"` at index "+e+": "+n)}function b(){return new f(h.APP_DELETED,"The Firebase app was deleted.")}function w(e,t){return new f(h.INVALID_FORMAT,"String does not match format '"+e+"': "+t)}function E(e){throw new f(h.INTERNAL_ERROR,"Internal error: "+e)}var _={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"};function S(e){switch(e){case _.RAW:case _.BASE64:case _.BASE64URL:case _.DATA_URL:return;default:throw"Expected one of the event types: ["+_.RAW+", "+_.BASE64+", "+_.BASE64URL+", "+_.DATA_URL+"]."}}var T=function(){return function(e,t){this.data=e,this.contentType=t||null}}();function O(e,t){switch(e){case _.RAW:return new T(k(t));case _.BASE64:case _.BASE64URL:return new T(C(e,t));case _.DATA_URL:return new T(function(e){var t=new x(e);return t.base64?C(_.BASE64,t.rest):function(e){var t;try{t=decodeURIComponent(e)}catch(n){throw w(_.DATA_URL,"Malformed data URL.")}return k(t)}(t.rest)}(t),new x(t).contentType)}throw d()}function k(e){for(var t=[],n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r<=127)t.push(r);else if(r<=2047)t.push(192|r>>6,128|63&r);else if(55296===(64512&r))if(n<e.length-1&&56320===(64512&e.charCodeAt(n+1)))r=65536|(1023&r)<<10|1023&e.charCodeAt(++n),t.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|63&r);else t.push(239,191,189);else 56320===(64512&r)?t.push(239,191,189):t.push(224|r>>12,128|r>>6&63,128|63&r)}return new Uint8Array(t)}function C(e,t){switch(e){case _.BASE64:var n=-1!==t.indexOf("-"),r=-1!==t.indexOf("_");if(n||r)throw w(e,"Invalid character '"+(n?"-":"_")+"' found: is it base64url encoded?");break;case _.BASE64URL:var o=-1!==t.indexOf("+"),i=-1!==t.indexOf("/");if(o||i)throw w(e,"Invalid character '"+(o?"+":"/")+"' found: is it base64 encoded?");t=t.replace(/-/g,"+").replace(/_/g,"/")}var a;try{a=atob(t)}catch(c){throw w(e,"Invalid character found")}for(var u=new Uint8Array(a.length),s=0;s<a.length;s++)u[s]=a.charCodeAt(s);return u}var x=function(){return function(e){this.base64=!1,this.contentType=null;var t=e.match(/^data:([^,]+)?,/);if(null===t)throw w(_.DATA_URL,"Must be formatted 'data:[<mediatype>][;base64],<data>");var n=t[1]||null;null!=n&&(this.base64=function(e,t){if(!(e.length>=t.length))return!1;return e.substring(e.length-t.length)===t}(n,";base64"),this.contentType=this.base64?n.substring(0,n.length-";base64".length):n),this.rest=e.substring(e.indexOf(",")+1)}}();var A,I={STATE_CHANGED:"state_changed"},N={RUNNING:"running",PAUSING:"pausing",PAUSED:"paused",SUCCESS:"success",CANCELING:"canceling",CANCELED:"canceled",ERROR:"error"},D={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"};function P(e){switch(e){case N.RUNNING:case N.PAUSING:case N.CANCELING:return D.RUNNING;case N.PAUSED:return D.PAUSED;case N.SUCCESS:return D.SUCCESS;case N.CANCELED:return D.CANCELED;case N.ERROR:default:return D.ERROR}}function R(e){return null!=e}function j(e){return void 0!==e}function M(e){return"function"===typeof e}function L(e){return"object"===typeof e}function U(e){return L(e)&&null!==e}function F(e){return"string"===typeof e||e instanceof String}function B(e){return q(e)&&Number.isInteger(e)}function q(e){return"number"===typeof e||e instanceof Number}function V(e){return z()&&e instanceof Blob}function z(){return"undefined"!==typeof Blob}
1!function(e){e[e.NO_ERROR=0]="NO_ERROR",e[e.NETWORK_ERROR=1]="NETWORK_ERROR",e[e.ABORT=2]="ABORT"}(A||(A={}));var W=function(){function e(){var e=this;this.sent_=!1,this.xhr_=new XMLHttpRequest,this.errorCode_=A.NO_ERROR,this.sendPromise_=new Promise((function(t){e.xhr_.addEventListener("abort",(function(){e.errorCode_=A.ABORT,t(e)})),e.xhr_.addEventListener("error",(function(){e.errorCode_=A.NETWORK_ERROR,t(e)})),e.xhr_.addEventListener("load",(function(){t(e)}))}))}return e.prototype.send=function(e,t,n,r){if(this.sent_)throw E("cannot .send() more than once");if(this.sent_=!0,this.xhr_.open(t,e,!0),R(r))for(var o in r)r.hasOwnProperty(o)&&this.xhr_.setRequestHeader(o,r[o].toString());return R(n)?this.xhr_.send(n):this.xhr_.send(),this.sendPromise_},e.prototype.getErrorCode=function(){if(!this.sent_)throw E("cannot .getErrorCode() before sending");return this.errorCode_},e.prototype.getStatus=function(){if(!this.sent_)throw E("cannot .getStatus() before sending");try{return this.xhr_.status}catch(e){return-1}},e.prototype.getResponseText=function(){if(!this.sent_)throw E("cannot .getResponseText() before sending");return this.xhr_.responseText},e.prototype.abort=function(){this.xhr_.abort()},e.prototype.getResponseHeader=function(e){return this.xhr_.getResponseHeader(e)},e.prototype.addUploadProgressListener=function(e){R(this.xhr_.upload)&&this.xhr_.upload.addEventListener("progress",e)},e.prototype.removeUploadProgressListener=function(e){R(this.xhr_.upload)&&this.xhr_.upload.removeEventListener("progress",e)},e}(),Q=function(){function e(){}return e.prototype.createXhrIo=function(){return new W},e}();function G(){return"undefined"!==typeof BlobBuilder?BlobBuilder:"undefined"!==typeof WebKitBlobBuilder?WebKitBlobBuilder:void 0}function K(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=G();if(void 0!==n){for(var r=new n,o=0;o<e.length;o++)r.append(e[o]);return r.getBlob()}if(z())return new Blob(e);throw Error("This browser doesn't seem to support creating Blobs")}var H=function(){function e(e,t){var n=0,r="";V(e)?(this.data_=e,n=e.size,r=e.type):e instanceof ArrayBuffer?(t?this.data_=new Uint8Array(e):(this.data_=new Uint8Array(e.byteLength),this.data_.set(new Uint8Array(e))),n=this.data_.length):e instanceof Uint8Array&&(t?this.data_=e:(this.data_=new Uint8Array(e.length),this.data_.set(e)),n=e.length),this.size_=n,this.type_=r}return e.prototype.size=function(){return this.size_},e.prototype.type=function(){return this.type_},e.prototype.slice=function(t,n){if(V(this.data_)){var r=function(e,t,n){return e.webkitSlice?e.webkitSlice(t,n):e.mozSlice?e.mozSlice(t,n):e.slice?e.slice(t,n):null}(this.data_,t,n);return null===r?null:new e(r)}return new e(new Uint8Array(this.data_.buffer,t,n-t),!0)},e.getBlob=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(z()){var r=t.map((function(t){return t instanceof e?t.data_:t}));return new e(K.apply(null,r))}var o=t.map((function(e){return F(e)?O(_.RAW,e).data:e.data_})),i=0;o.forEach((function(e){i+=e.byteLength}));var a=new Uint8Array(i),u=0;return o.forEach((function(e){for(var t=0;t<e.length;t++)a[u++]=e[t]})),new e(a,!0)},e.prototype.uploadData=function(){return this.data_},e}(),Y=function(){function e(e,t){this.bucket=e,this.path_=t}return Object.defineProperty(e.prototype,"path",{get:function(){return this.path_},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isRoot",{get:function(){return 0===this.path.length},enumerable:!0,configurable:!0}),e.prototype.fullServerUrl=function(){var e=encodeURIComponent;return"/b/"+e(this.bucket)+"/o/"+e(this.path)},e.prototype.bucketOnlyServerUrl=function(){return"/b/"+encodeURIComponent(this.bucket)+"/o"},e.makeFromBucketSpec=function(t){var n,r;try{n=e.makeFromUrl(t)}catch(o){return new e(t,"")}if(""===n.path)return n;throw r=t,new f(h.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+r+"'.")},e.makeFromUrl=function(t){var n=null;var r=new RegExp("^gs://([A-Za-z0-9.\\-_]+)(/(.*))?$","i");for(var o=a.replace(/[.]/g,"\\."),i=[{regex:r,indices:{bucket:1,path:3},postModify:function(e){"/"===e.path.charAt(e.path.length-1)&&(e.path_=e.path_.slice(0,-1))}},{regex:new RegExp("^https?://"+o+"/v[A-Za-z0-9_]+/b/([A-Za-z0-9.\\-_]+)/o(/([^?#]*).*)?$","i"),indices:{bucket:1,path:3},postModify:function(e){e.path_=decodeURIComponent(e.path)}}],u=0;u<i.length;u++){var s=i[u],c=s.regex.exec(t);if(c){var l=c[s.indices.bucket],p=c[s.indices.path];p||(p=""),n=new e(l,p),s.postModify(n);break}}if(null==n)throw function(e){return new f(h.INVALID_URL,"Invalid URL '"+e+"'.")}(t);return n},e}();function $(e){var t,n;try{t=JSON.parse(e)}catch(r){return null}return L(n=t)&&!Array.isArray(n)?t:null}function X(e,t){var n=t.split("/").filter((function(e){return e.length>0})).join("/");return 0===e.length?n:e+"/"+n}function J(e){var t=e.lastIndexOf("/",e.length-2);return-1===t?e:e.slice(t+1)}function Z(e){return"https://"+a+"/v0"+e}function ee(e){var t=encodeURIComponent,n="?";for(var r in e){if(e.hasOwnProperty(r))n=n+(t(r)+"="+t(e[r]))+"&"}return n=n.slice(0,-1)}function te(e,t){return t}var ne=function(){return function(e,t,n,r){this.server=e,this.local=t||e,this.writable=!!n,this.xform=r||te}}(),re=null;function oe(){if(re)return re;var e=[];e.push(new ne("bucket")),e.push(new ne("generation")),e.push(new ne("metageneration")),e.push(new ne("name","fullPath",!0));var t=new ne("name");t.xform=function(e,t){return function(e){return!F(e)||e.length<2?e:J(e)}(t)},e.push(t);var n=new ne("size");return n.xform=function(e,t){return R(t)?Number(t):t},e.push(n),e.push(new ne("timeCreated")),e.push(new ne("updated")),e.push(new ne("md5Hash",null,!0)),e.push(new ne("cacheControl",null,!0)),e.push(new ne("contentDisposition",null,!0)),e.push(new ne("contentEncoding",null,!0)),e.push(new ne("contentLanguage",null,!0)),e.push(new ne("contentType",null,!0)),e.push(new ne("metadata","customMetadata",!0)),re=e}function ie(e,t,n){for(var r={type:"file"},o=n.length,i=0;i<o;i++){var a=n[i];r[a.local]=a.xform(r,t[a.server])}return function(e,t){Object.defineProperty(e,"ref",{get:function(){var n=e.bucket,r=e.fullPath,o=new Y(n,r);return t.makeStorageReference(o)}})}(r,e),r}function ae(e,t,n){var r=$(t);return null===r?null:ie(e,r,n)}function ue(e,t){for(var n={},r=t.length,o=0;o<r;o++){var i=t[o];i.writable&&(n[i.server]=e[i.local])}return JSON.stringify(n)}function se(e){if(!L(e)||!e)throw"Expected Metadata object.";for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];if("customMetadata"===t){if(!L(n))throw"Expected object for 'customMetadata' mapping."}else if(U(n))throw"Mapping for '"+t+"' cannot be an object."}}var ce="maxResults",le=1e3,fe="pageToken",he="prefixes",pe="items";function de(e,t){var n={prefixes:[],items:[],nextPageToken:t.nextPageToken},r=e.bucket();if(null===r)throw new f(h.NO_DEFAULT_BUCKET,"No default bucket found. Did you set the '"+u+"' property when initializing the app?");if(t[he])for(var o=0,i=t[he];o<i.length;o++){var a=i[o].replace(/\/$/,""),s=e.makeStorageReference(new Y(r,a));n.prefixes.push(s)}if(t[pe])for(var c=0,l=t[pe];c<l.length;c++){var p=l[c];s=e.makeStorageReference(new Y(r,p.name));n.items.push(s)}return n}function me(e){if(!L(e)||!e)throw"Expected ListOptions object.";for(var t in e)if(t===ce){if(!B(e[ce])||e[ce]<=0)throw"Expected maxResults to be a positive number.";if(e[ce]>1e3)throw"Expected maxResults to be less than or equal to "+le+"."}else{if(t!==fe)throw"Unknown option: "+t;if(e[fe]&&!F(e[fe]))throw"Expected pageToken to be string."}}var ye=function(){return function(e,t,n,r){this.url=e,this.method=t,this.handler=n,this.timeout=r,this.urlParam
1s={},this.headers={},this.body=null,this.errorHandler=null,this.progressCallback=null,this.successCodes=[200],this.additionalRetryCodes=[]}}();function ve(e){if(!e)throw d()}function ge(e,t){return function(n,r){var o=ae(e,r,t);return ve(null!==o),o}}function be(e){return function(t,n){var r=function(e,t){var n=$(t);return null===n?null:de(e,n)}(e,n);return ve(null!==r),r}}function we(e,t){return function(n,r){var o=ae(e,r,t);return ve(null!==o),function(e,t){var n=$(t);if(null===n)return null;if(!F(n.downloadTokens))return null;var r=n.downloadTokens;if(0===r.length)return null;var o=encodeURIComponent;return r.split(",").map((function(t){var n=e.bucket,r=e.fullPath;return Z("/b/"+o(n)+"/o/"+o(r))+ee({alt:"media",token:t})}))[0]}(o,r)}}function Ee(e){return function(t,n){var r,o,i;return 401===t.getStatus()?r=new f(h.UNAUTHENTICATED,"User is not authenticated, please authenticate using Firebase Authentication and try again."):402===t.getStatus()?(i=e.bucket,r=new f(h.QUOTA_EXCEEDED,"Quota for bucket '"+i+"' exceeded, please view quota on https://firebase.google.com/pricing/.")):403===t.getStatus()?(o=e.path,r=new f(h.UNAUTHORIZED,"User does not have permission to access '"+o+"'.")):r=n,r.setServerResponseProp(n.serverResponseProp()),r}}function _e(e){var t=Ee(e);return function(n,r){var o,i=t(n,r);return 404===n.getStatus()&&(o=e.path,i=new f(h.OBJECT_NOT_FOUND,"Object '"+o+"' does not exist.")),i.setServerResponseProp(r.serverResponseProp()),i}}function Se(e,t,n){var r=Z(t.fullServerUrl()),o=e.maxOperationRetryTime(),i=new ye(r,"GET",ge(e,n),o);return i.errorHandler=_e(t),i}function Te(e,t,n,r,o){var i={};t.isRoot?i.prefix="":i.prefix=t.path+"/",n&&n.length>0&&(i.delimiter=n),r&&(i.pageToken=r),o&&(i.maxResults=o);var a=Z(t.bucketOnlyServerUrl()),u=e.maxOperationRetryTime(),s=new ye(a,"GET",be(e),u);return s.urlParams=i,s.errorHandler=Ee(t),s}function Oe(e,t,n){var r=Z(t.fullServerUrl()),o=e.maxOperationRetryTime(),i=new ye(r,"GET",we(e,n),o);return i.errorHandler=_e(t),i}function ke(e,t,n,r){var o=Z(t.fullServerUrl()),i=ue(n,r),a=e.maxOperationRetryTime(),u=new ye(o,"PATCH",ge(e,r),a);return u.headers={"Content-Type":"application/json; charset=utf-8"},u.body=i,u.errorHandler=_e(t),u}function Ce(e,t){var n=Z(t.fullServerUrl()),r=e.maxOperationRetryTime();var o=new ye(n,"DELETE",(function(e,t){}),r);return o.successCodes=[200,204],o.errorHandler=_e(t),o}function xe(e,t,n){var r=Object.assign({},n);return r.fullPath=e.path,r.size=t.size(),r.contentType||(r.contentType=function(e,t){return e&&e.contentType||t&&t.type()||"application/octet-stream"}(null,t)),r}var Ae=function(){return function(e,t,n,r){this.current=e,this.total=t,this.finalized=!!n,this.metadata=r||null}}();function Ie(e,t){var n=null;try{n=e.getResponseHeader("X-Goog-Upload-Status")}catch(r){ve(!1)}return ve(!!n&&-1!==(t||["active"]).indexOf(n)),n}function Ne(e,t,n,r,o,i,a,u){var s=new Ae(0,0);if(a?(s.current=a.current,s.total=a.total):(s.current=0,s.total=r.size()),r.size()!==s.total)throw new f(h.SERVER_FILE_WRONG_SIZE,"Server recorded incorrect upload file size, please retry the upload.");var c=s.total-s.current,l=c;o>0&&(l=Math.min(l,o));var p=s.current,d=p+l,m={"X-Goog-Upload-Command":l===c?"upload, finalize":"upload","X-Goog-Upload-Offset":s.current},v=r.slice(p,d);if(null===v)throw y();var g=t.maxUploadRetryTime(),b=new ye(n,"POST",(function(e,n){var o,a=Ie(e,["active","final"]),u=s.current+l,c=r.size();return o="final"===a?ge(t,i)(e,n):null,new Ae(u,c,"final"===a,o)}),g);return b.headers=m,b.body=v.uploadData(),b.progressCallback=u||null,b.errorHandler=Ee(e),b}var De=function(){return function(e,t,n){if(M(e)||R(t)||R(n))this.next=e,this.error=t||null,this.complete=n||null;else{var r=e;this.next=r.next||null,this.error=r.error||null,this.complete=r.complete||null}}}(),Pe=function(){return function(e,t,n,r,o,i){this.bytesTransferred=e,this.totalBytes=t,this.state=n,this.metadata=r,this.task=o,this.ref=i}}();function Re(e,t,n){for(var r=t.length,o=t.length,i=0;i<t.length;i++)if(t[i].optional){r=i;break}if(!(r<=n.length&&n.length<=o))throw function(e,t,n,r){var o,i;return e===t?(o=e,i=1===e?"argument":"arguments"):(o="between "+e+" and "+t,i="arguments"),new f(h.INVALID_ARGUMENT_COUNT,"Invalid argument count in `"+n+"`: Expected "+o+" "+i+", received "+r+".")}(r,o,e,n.length);for(i=0;i<n.length;i++)try{t[i].validator(n[i])}catch(a){throw a instanceof Error?g(i,e,a.message):g(i,e,a)}}var je=function(){return function(e,t){var n=this;this.validator=function(t){n.optional&&!j(t)||e(t)},this.optional=!!t}}();function Me(e,t){function n(e){if(!F(e))throw"Expected string."}var r,o,i;return e?(o=n,i=e,r=function(e){o(e),i(e)}):r=n,new je(r,t)}function Le(){return new je((function(e){if(!(e instanceof Uint8Array||e instanceof ArrayBuffer||z()&&e instanceof Blob))throw"Expected Blob or File."}))}function Ue(e){return new je(se,e)}function Fe(e){return new je(me,e)}function Be(){return new je((function(e){if(!(q(e)&&e>=0))throw"Expected a number 0 or greater."}))}function qe(e,t){return new je((function(t){if(!(null===t||R(t)&&t instanceof Object))throw"Expected an Object.";void 0!==e&&null!==e&&e(t)}),t)}function Ve(e){return new je((function(e){if(!(null===e||M(e)))throw"Expected a Function."}),e)}function ze(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];Promise.resolve().then((function(){return e.apply(void 0,t)}))}}var We=function(){function e(e,t,n,r,o,i){var a=this;void 0===i&&(i=null),this.transferred_=0,this.needToFetchStatus_=!1,this.needToFetchMetadata_=!1,this.observers_=[],this.error_=null,this.uploadUrl_=null,this.request_=null,this.chunkMultiplier_=1,this.resolve_=null,this.reject_=null,this.ref_=e,this.authWrapper_=t,this.location_=n,this.blob_=o,this.metadata_=i,this.mappings_=r,this.resumable_=this.shouldDoResumable_(this.blob_),this.state_=N.RUNNING,this.errorHandler_=function(e){a.request_=null,a.chunkMultiplier_=1,e.codeEquals(h.CANCELED)?(a.needToFetchStatus_=!0,a.completeTransitions_()):(a.error_=e,a.transition_(N.ERROR))},this.metadataErrorHandler_=function(e){a.request_=null,e.codeEquals(h.CANCELED)?a.completeTransitions_():(a.error_=e,a.transition_(N.ERROR))},this.promise_=new Promise((function(e,t){a.resolve_=e,a.reject_=t,a.start_()}
1)),this.promise_.then(null,(function(){}))}return e.prototype.makeProgressCallback_=function(){var e=this,t=this.transferred_;return function(n){return e.updateProgress_(t+n)}},e.prototype.shouldDoResumable_=function(e){return e.size()>262144},e.prototype.start_=function(){this.state_===N.RUNNING&&null===this.request_&&(this.resumable_?null===this.uploadUrl_?this.createResumable_():this.needToFetchStatus_?this.fetchStatus_():this.needToFetchMetadata_?this.fetchMetadata_():this.continueUpload_():this.oneShotUpload_())},e.prototype.resolveToken_=function(e){var t=this;this.authWrapper_.getAuthToken().then((function(n){switch(t.state_){case N.RUNNING:e(n);break;case N.CANCELING:t.transition_(N.CANCELED);break;case N.PAUSING:t.transition_(N.PAUSED)}}))},e.prototype.createResumable_=function(){var e=this;this.resolveToken_((function(t){var n=function(e,t,n,r,o){var i=t.bucketOnlyServerUrl(),a=xe(t,r,o),u={name:a.fullPath},s=Z(i),c={"X-Goog-Upload-Protocol":"resumable","X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":r.size(),"X-Goog-Upload-Header-Content-Type":a.contentType,"Content-Type":"application/json; charset=utf-8"},l=ue(a,n),f=e.maxUploadRetryTime(),h=new ye(s,"POST",(function(e){var t;Ie(e);try{t=e.getResponseHeader("X-Goog-Upload-URL")}catch(n){ve(!1)}return ve(F(t)),t}),f);return h.urlParams=u,h.headers=c,h.body=l,h.errorHandler=Ee(t),h}(e.authWrapper_,e.location_,e.mappings_,e.blob_,e.metadata_),r=e.authWrapper_.makeRequest(n,t);e.request_=r,r.getPromise().then((function(t){e.request_=null,e.uploadUrl_=t,e.needToFetchStatus_=!1,e.completeTransitions_()}),e.errorHandler_)}))},e.prototype.fetchStatus_=function(){var e=this,t=this.uploadUrl_;this.resolveToken_((function(n){var r=function(e,t,n,r){var o=e.maxUploadRetryTime(),i=new ye(n,"POST",(function(e){var t=Ie(e,["active","final"]),n=null;try{n=e.getResponseHeader("X-Goog-Upload-Size-Received")}catch(i){ve(!1)}n||ve(!1);var o=Number(n);return ve(!isNaN(o)),new Ae(o,r.size(),"final"===t)}),o);return i.headers={"X-Goog-Upload-Command":"query"},i.errorHandler=Ee(t),i}(e.authWrapper_,e.location_,t,e.blob_),o=e.authWrapper_.makeRequest(r,n);e.request_=o,o.getPromise().then((function(t){t=t,e.request_=null,e.updateProgress_(t.current),e.needToFetchStatus_=!1,t.finalized&&(e.needToFetchMetadata_=!0),e.completeTransitions_()}),e.errorHandler_)}))},e.prototype.continueUpload_=function(){var e=this,t=262144*this.chunkMultiplier_,n=new Ae(this.transferred_,this.blob_.size()),r=this.uploadUrl_;this.resolveToken_((function(o){var i;try{i=Ne(e.location_,e.authWrapper_,r,e.blob_,t,e.mappings_,n,e.makeProgressCallback_())}catch(u){return e.error_=u,void e.transition_(N.ERROR)}var a=e.authWrapper_.makeRequest(i,o);e.request_=a,a.getPromise().then((function(t){e.increaseMultiplier_(),e.request_=null,e.updateProgress_(t.current),t.finalized?(e.metadata_=t.metadata,e.transition_(N.SUCCESS)):e.completeTransitions_()}),e.errorHandler_)}))},e.prototype.increaseMultiplier_=function(){262144*this.chunkMultiplier_<33554432&&(this.chunkMultiplier_*=2)},e.prototype.fetchMetadata_=function(){var e=this;this.resolveToken_((function(t){var n=Se(e.authWrapper_,e.location_,e.mappings_),r=e.authWrapper_.makeRequest(n,t);e.request_=r,r.getPromise().then((function(t){e.request_=null,e.metadata_=t,e.transition_(N.SUCCESS)}),e.metadataErrorHandler_)}))},e.prototype.oneShotUpload_=function(){var e=this;this.resolveToken_((function(t){var n=function(e,t,n,r,o){var i=t.bucketOnlyServerUrl(),a={"X-Goog-Upload-Protocol":"multipart"},u=function(){for(var e="",t=0;t<2;t++)e+=Math.random().toString().slice(2);return e}();a["Content-Type"]="multipart/related; boundary="+u;var s=xe(t,r,o),c="--"+u+"\r\nContent-Type: application/json; charset=utf-8\r\n\r\n"+ue(s,n)+"\r\n--"+u+"\r\nContent-Type: "+s.contentType+"\r\n\r\n",l="\r\n--"+u+"--",f=H.getBlob(c,r,l);if(null===f)throw y();var h={name:s.fullPath},p=Z(i),d=e.maxUploadRetryTime(),m=new ye(p,"POST",ge(e,n),d);return m.urlParams=h,m.headers=a,m.body=f.uploadData(),m.errorHandler=Ee(t),m}(e.authWrapper_,e.location_,e.mappings_,e.blob_,e.metadata_),r=e.authWrapper_.makeRequest
1(n,t);e.request_=r,r.getPromise().then((function(t){e.request_=null,e.metadata_=t,e.updateProgress_(e.blob_.size()),e.transition_(N.SUCCESS)}),e.errorHandler_)}))},e.prototype.updateProgress_=function(e){var t=this.transferred_;this.transferred_=e,this.transferred_!==t&&this.notifyObservers_()},e.prototype.transition_=function(e){if(this.state_!==e)switch(e){case N.CANCELING:case N.PAUSING:this.state_=e,null!==this.request_&&this.request_.cancel();break;case N.RUNNING:var t=this.state_===N.PAUSED;this.state_=e,t&&(this.notifyObservers_(),this.start_());break;case N.PAUSED:this.state_=e,this.notifyObservers_();break;case N.CANCELED:this.error_=m(),this.state_=e,this.notifyObservers_();break;case N.ERROR:case N.SUCCESS:this.state_=e,this.notifyObservers_()}},e.prototype.completeTransitions_=function(){switch(this.state_){case N.PAUSING:this.transition_(N.PAUSED);break;case N.CANCELING:this.transition_(N.CANCELED);break;case N.RUNNING:this.start_()}},Object.defineProperty(e.prototype,"snapshot",{get:function(){var e=P(this.state_);return new Pe(this.transferred_,this.blob_.size(),e,this.metadata_,this,this.ref_)},enumerable:!0,configurable:!0}),e.prototype.on=function(e,t,n,r){function o(){if(e!==I.STATE_CHANGED)throw"Expected one of the event types: ["+I.STATE_CHANGED+"]."}var i="Expected a function or an Object with one of `next`, `error`, `complete` properties.",a=Ve(!0).validator,u=qe(null,!0).validator;function s(e){try{return void a(e)}catch(t){}try{if(u(e),!(j(e.next)||j(e.error)||j(e.complete)))throw"";return}catch(t){throw i}}var c=[Me(o),qe(s,!0),Ve(!0),Ve(!0)];Re("on",c,arguments);var l=this;function f(e){return function(t,n,o){null!==e&&Re("on",e,arguments);var i=new De(t,n,r);return l.addObserver_(i),function(){l.removeObserver_(i)}}}function h(e){if(null===e)throw i;s(e)}var p=[qe(h),Ve(!0),Ve(!0)],d=!(j(t)||j(n)||j(r));return d?f(p):f(null)(t,n,r)},e.prototype.then=function(e,t){return this.promise_.then(e,t)},e.prototype.catch=function(e){return this.then(null,e)},e.prototype.addObserver_=function(e){this.observers_.push(e),this.notifyObserver_(e)},e.prototype.removeObserver_=function(e){var t=this.observers_.indexOf(e);-1!==t&&this.observers_.splice(t,1)},e.prototype.notifyObservers_=function(){var e=this;this.finishPromise_(),this.observers_.slice().forEach((function(t){e.notifyObserver_(t)}))},e.prototype.finishPromise_=function(){if(null!==this.resolve_){var e=!0;switch(P(this.state_)){case D.SUCCESS:ze(this.resolve_.bind(null,this.snapshot))();break;case D.CANCELED:case D.ERROR:ze(this.reject_.bind(null,this.error_))();break;default:e=!1}e&&(this.resolve_=null,this.reject_=null)}},e.prototype.notifyObserver_=function(e){switch(P(this.state_)){case D.RUNNING:case D.PAUSED:e.next&&ze(e.next.bind(e,this.snapshot))();break;case D.SUCCESS:e.complete&&ze(e.complete.bind(e))();break;case D.CANCELED:case D.ERROR:e.error&&ze(e.error.bind(e,this.error_))();break;default:e.error&&ze(e.error.bind(e,this.error_))()}},e.prototype.resume=function(){Re("resume",[],arguments);var e=this.state_===N.PAUSED||this.state_===N.PAUSING;return e&&this.transition_(N.RUNNING),e},e.prototype.pause=function(){Re("pause",[],arguments);var e=this.state_===N.RUNNING;return e&&this.transition_(N.PAUSING),e},e.prototype.cancel=function(){Re("cancel",[],arguments);var e=this.state_===N.RUNNING||this.state_===N.PAUSING;return e&&this.transition_(N.CANCELING),e},e}(),Qe=function(){function e(e,t){this.authWrapper=e,this.location=t instanceof Y?t:Y.makeFromUrl(t)}return e.prototype.toString=function(){return Re("toString",[],arguments),"gs://"+this.location.bucket+"/"+this.location.path},e.prototype.newRef=function(t,n){return new e(t,n)},e.prototype.mappings=function(){return oe()},e.prototype.child=function(e){Re("child",[Me()],arguments);var t=X(this.location.path,e),n=new Y(this.location.bucket,t);return this.newRef(this.authWrapper,n)},Object.defineProperty(e.prototype,"parent",{get:function(){var e=function(e){if(0===e.length)return null;var t=e.lastIndexOf("/");return-1===t?"":e.slice(0,t)}(this.location.path);if(null===e)return null;var t=new Y(this.location.bucket,e);return this.newRef(this.authWrapper,t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"root",{get:function(){var e=new Y(this.location.bucket,"");return this.newRef(this.authWrapper,e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bucket",{get:function(){return this.location.bucket},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fullPath",{get:function(){return this.location.path},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return J(this.location.path)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"storage",{get:function(){return this.authWrapper.service()},enumerable:!0,configurable:!0}),e.prototype.put=function(e,t){return void 0===t&&(t=null),Re("put",[Le(),Ue(!0)],arguments),this.throwIfRoot_("put"),new We(this,this.authWrapper,this.location,this.mappings(),new H(e),t)},e.prototype.putString=function(e,t,n){void 0===t&&(t=_.RAW),Re("putString",[Me(),Me(S,!0),Ue(!0)],arguments),this.throwIfRoot_("putString");var r=O(t,e),o=Object.assign({},n);return!R(o.contentType)&&R(r.contentType)&&(o.contentType=r.contentType),new We(this,this.authWrapper,this.location,this.mappings(),new H(r.data,!0),o)},e.prototype.delete=function(){var e=this;return Re("delete",[],arguments),this.throwIfRoot_("delete"),this.authWrapper.getAuthToken().then((function(t){var n=Ce(e.authWrapper,e.location);
1return e.authWrapper.makeRequest(n,t).getPromise()}))},e.prototype.listAll=function(){Re("listAll",[],arguments);var e={prefixes:[],items:[]};return this.listAllHelper(e).then((function(){return e}))},e.prototype.listAllHelper=function(e,t){return n=this,r=void 0,a=function(){var n,r,o,a;return i(this,(function(i){switch(i.label){case 0:return n={pageToken:t},[4,this.list(n)];case 1:return r=i.sent(),(o=e.prefixes).push.apply(o,r.prefixes),(a=e.items).push.apply(a,r.items),null==r.nextPageToken?[3,3]:[4,this.listAllHelper(e,r.nextPageToken)];case 2:i.sent(),i.label=3;case 3:return[2]}}))},new((o=void 0)||(o=Promise))((function(e,t){function i(e){try{s(a.next(e))}catch(n){t(n)}}function u(e){try{s(a.throw(e))}catch(n){t(n)}}function s(t){t.done?e(t.value):new o((function(e){e(t.value)})).then(i,u)}s((a=a.apply(n,r||[])).next())}));var n,r,o,a},e.prototype.list=function(e){Re("list",[Fe(!0)],arguments);var t=this;return this.authWrapper.getAuthToken().then((function(n){var r=e||{},o=Te(t.authWrapper,t.location,"/",r.pageToken,r.maxResults);return t.authWrapper.makeRequest(o,n).getPromise()}))},e.prototype.getMetadata=function(){var e=this;return Re("getMetadata",[],arguments),this.throwIfRoot_("getMetadata"),this.authWrapper.getAuthToken().then((function(t){var n=Se(e.authWrapper,e.location,e.mappings());return e.authWrapper.makeRequest(n,t).getPromise()}))},e.prototype.updateMetadata=function(e){var t=this;return Re("updateMetadata",[Ue()],arguments),this.throwIfRoot_("updateMetadata"),this.authWrapper.getAuthToken().then((function(n){var r=ke(t.authWrapper,t.location,e,t.mappings());return t.authWrapper.makeRequest(r,n).getPromise()}))},e.prototype.getDownloadURL=function(){var e=this;return Re("getDownloadURL",[],arguments),this.throwIfRoot_("getDownloadURL"),this.authWrapper.getAuthToken().then((function(t){var n=Oe(e.authWrapper,e.location,e.mappings());return e.authWrapper.makeRequest(n,t).getPromise().then((function(e){if(null===e)throw v();return e}))}))},e.prototype.throwIfRoot_=function(e){if(""===this.location.path)throw function(e){return new f(h.INVALID_ROOT_OPERATION,"The operation '"+e+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}(e)},e}(),Ge=function(){function e(e){this.promise_=Promise.reject(e)}return e.prototype.getPromise=function(){return this.promise_},e.prototype.cancel=function(e){},e}(),Ke=function(){function e(){this.map=new Map,this.id=l}return e.prototype.addRequest=function(e){var t=this,n=this.id;this.id++,this.map.set(n,e),e.getPromise().then((function(){return t.map.delete(n)}),(function(){return t.map.delete(n)}))},e.prototype.clear=function(){this.map.forEach((function(e){e&&e.cancel(!0)})),this.map.clear()},e}(),He=function(){function e(t,n,r,o,i){if(this.bucket_=null,this.deleted_=!1,this.app_=t,null!==this.app_){var a=this.app_.options;R(a)&&(this.bucket_=e.extractBucket_(a))}this.storageRefMaker_=n,this.requestMaker_=r,this.pool_=i,this.service_=o,this.maxOperationRetryTime_=s,this.maxUploadRetryTime_=c,this.requestMap_=new Ke}return e.extractBucket_=function(e){var t=e[u]||null;return null==t?null:Y.makeFromBucketSpec(t).bucket},e.prototype.getAuthToken=function(){return null!==this.app_&&R(this.app_.INTERNAL)&&R(this.app_.INTERNAL.getToken)?this.app_.INTERNAL.getToken().then((function(e){return null!==e?e.accessToken:null}),(function(){return null})):Promise.resolve(null)},e.prototype.bucket=function(){if(this.deleted_)throw b();return this.bucket_},e.prototype.service=function(){return this.service_},e.prototype.makeStorageReference=function(e){return this.storageRefMaker_(this,e)},e.prototype.makeRequest=function(e,t){if(this.deleted_)return new Ge(b());var n=this.requestMaker_(e,t,this.pool_);return this.requestMap_.addRequest(n),n},e.prototype.deleteApp=function(){this.deleted_=!0,this.app_=null,this.requestMap_.clear()},e.prototype.maxUploadRetryTime=function(){return this.maxUploadRetryTime_},e.prototype.setMaxUploadRetryTime=function(e){this.maxUploadRetryTime_=e},e.prototype.maxOperationRetryTime=function(){return this.maxOperationRetryTime_},e.prototype.setMaxOperationRetryTime=function(e){this.maxOperationRetryTime_=e},e}();var Ye=function(){function e(e,t,n,r,o,i,a,u,s,c,l){var f=this;this.pendingXhr_=null,this.backoffId_=null,this.resolve_=null,this.reject_=null,this.canceled_=!1,this.appDelete_=!1,this.url_=e,this.method_=t,this.headers_=n,this.body_=r,this.successCodes_=o.slice(),this.additionalRetryCodes_=i.slice(),this.callback_=a,this.errorCallback_=u,this.progressCallback_=c,this.timeout_=s,this.pool_=l,this.promise_=new Promise((function(e,t){f.resolve_=e,f.reject_=t,f.start_()}
1))}return e.prototype.start_=function(){var e=this;function t(t,n){var r,o=e.resolve_,i=e.reject_,a=n.xhr;if(n.wasSuccessCode)try{var u=e.callback_(a,a.getResponseText());j(u)?o(u):o()}catch(s){i(s)}else null!==a?((r=d()).setServerResponseProp(a.getResponseText()),e.errorCallback_?i(e.errorCallback_(a,r)):i(r)):n.canceled?i(r=e.appDelete_?b():m()):i(r=new f(h.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again."))}this.canceled_?t(0,new $e(!1,null,!0)):this.backoffId_=function(e,t,n){var r=1,o=null,i=!1,a=0;function u(){return 2===a}var s=!1;function c(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];s||(s=!0,t.apply(null,e))}function l(t){o=setTimeout((function(){o=null,e(f,u())}),t)}function f(e){for(var t,n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];s||(e?c.call.apply(c,[null,e].concat(n)):u()||i?c.call.apply(c,[null,e].concat(n)):(r<64&&(r*=2),1===a?(a=2,t=0):t=1e3*(r+Math.random()),l(t)))}var h=!1;function p(e){h||(h=!0,s||(null!==o?(e||(a=2),clearTimeout(o),l(0)):e||(a=1)))}return l(0),setTimeout((function(){i=!0,p(!0)}),n),p}((function(t,n){if(n)t(!1,new $e(!1,null,!0));else{var r=e.pool_.createXhrIo();e.pendingXhr_=r,null!==e.progressCallback_&&r.addUploadProgressListener(o),r.send(e.url_,e.method_,e.body_,e.headers_).then((function(n){null!==e.progressCallback_&&n.removeUploadProgressListener(o),e.pendingXhr_=null;var r=(n=n).getErrorCode()===A.NO_ERROR,i=n.getStatus();if(r&&!e.isRetryStatusCode_(i)){var a=-1!==e.successCodes_.indexOf(i);t(!0,new $e(a,n))}else{var u=n.getErrorCode()===A.ABORT;t(!1,new $e(!1,null,u))}}))}function o(t){var n=t.loaded,r=t.lengthComputable?t.total:-1;null!==e.progressCallback_&&e.progressCallback_(n,r)}}),t,this.timeout_)},e.prototype.getPromise=function(){return this.promise_},e.prototype.cancel=function(e){this.canceled_=!0,this.appDelete_=e||!1,null!==this.backoffId_&&(0,this.backoffId_)(!1),null!==this.pendingXhr_&&this.pendingXhr_.abort()},e.prototype.isRetryStatusCode_=function(e){var t=e>=500&&e<600,n=-1!==[408,429].indexOf(e),r=-1!==this.additionalRetryCodes_.indexOf(e);return t||n||r},e}(),$e=function(){return function(e,t,n){this.wasSuccessCode=e,this.xhr=t,this.canceled=!!n}}();function Xe(e,t,n){var r=ee(e.urlParams),i=e.url+r,a=Object.assign({},e.headers);return function(e,t){null!==t&&t.length>0&&(e.Authorization="Firebase "+t)}(a,t),function(e){var t="undefined"!==typeof o.a?o.a.SDK_VERSION:"AppManager";e["X-Firebase-Storage-Version"]="webjs/"+t}(a),new Ye(i,e.method,a,e.body,e.successCodes,e.additionalRetryCodes,e.handler,e.errorHandler,e.timeout,e.progressCallback,n)}var Je=function(){function e(e,t,n){if(this.bucket_=null,this.authWrapper_=new He(e,(function(e,t){return new Qe(e,t)}),Xe,this,t),this.app_=e,null!=n)this.bucket_=Y.makeFromBucketSpec(n);else{var r=this.authWrapper_.bucket();null!=r&&(this.bucket_=new Y(r,""))}this.internals_=new Ze(this)}return e.prototype.ref=function(e){function t(e){if("string"!==typeof e)throw"Path is not a string.";if(/^[A-Za-z]+:\/\//.test(e))throw"Expected child path but got a URL, use refFromURL instead."}if(Re("ref",[Me(t,!0)],arguments),null==this.bucket_)throw new Error("No Storage Bucket defined in Firebase Options.");var n=new Qe(this.authWrapper_,this.bucket_);return null!=e?n.child(e):n},e.prototype.refFromURL=function(e){function t(e){if("string"!==typeof e)throw"Path is not a string.";if(!/^[A-Za-z]+:\/\//.test(e))throw"Expected full URL but got a child path, use ref instead.";try{Y.makeFromUrl(e)}catch(t){throw"Expected valid full URL but got an invalid one."}}return Re("refFromURL",[Me(t,!1)],arguments),new Qe(this.authWrapper_,e)},Object.defineProperty(e.prototype,"maxUploadRetryTime",{get:function(){return this.authWrapper_.maxUploadRetryTime()},enumerable:!0,configurable:!0}),e.prototype.setMaxUploadRetryTime=function(e){Re("setMaxUploadRetryTime",[Be()],arguments),this.authWrapper_.setMaxUploadRetryTime(e)},e.prototype.setMaxOperationRetryTime=function(e){Re("setMaxOperationRetryTime",[Be()],arguments),this.authWrapper_.setMaxOperationRetryTime(e)},Object.defineProperty(e.prototype,"app",{get:function(){return this.app_},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"INTERNAL",{get:function(){return this.internals_},enumerable:!0,configurable:!0}),e}(),Ze=function(){function e(e){this.service_=e}return e.prototype.delete=function(){return this.service_.authWrapper_.deleteApp(),Promise.resolve()},e}(),et="storage";function tt(e,t,n){return new Je(e,new Q,n)}!function(e){var t={TaskState:D,TaskEvent:I,StringFormat:_,Storage:Je,Reference:Qe};e.INTERNAL.registerService(et,tt,t,void 0,!0)}(o.a)},function(e,t,n){"use strict";n(7);var r=n(0),o=n(111),i=n(15),a=n(16),u=n(17),s=n(18),c=n(25),l=n(19),f=n(28),h=n(62),p=n(57),d=function(e){function t(){var e,n;Object(i.a)(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return n=Object(u.a)(this,(e=Object(s.a)(t)).call.apply(e,[this].concat(o))),Object(f.a)(Object(c.a)(n),"prevNode",null),n}
1return Object(l.a)(t,e),Object(a.a)(t,[{key:"componentDidMount",value:function(){this.prevNode=h.findDOMNode(this),Object(p.a)(this.props.innerRef,this.prevNode)}},{key:"componentDidUpdate",value:function(e){var t=h.findDOMNode(this);this.prevNode!==t&&(this.prevNode=t,Object(p.a)(this.props.innerRef,t)),e.innerRef!==this.props.innerRef&&Object(p.a)(this.props.innerRef,t)}},{key:"componentWillUnmount",value:function(){Object(p.a)(this.props.innerRef,null)}},{key:"render",value:function(){return this.props.children}}]),t}(r.Component);Object(f.a)(d,"displayName","RefFindNode"),Object(f.a)(d,"propTypes",{});var m=function(e){function t(){var e,n;Object(i.a)(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return n=Object(u.a)(this,(e=Object(s.a)(t)).call.apply(e,[this].concat(o))),Object(f.a)(Object(c.a)(n),"handleRefOverride",(function(e){var t=n.props,r=t.children,o=t.innerRef;Object(p.a)(r.ref,e),Object(p.a)(o,e)})),n}return Object(l.a)(t,e),Object(a.a)(t,[{key:"render",value:function(){var e=this.props.children;return r.cloneElement(e,{ref:this.handleRefOverride})}}]),t}(r.Component);Object(f.a)(m,"displayName","RefForward"),Object(f.a)(m,"propTypes",{});var y=function(e){var t=e.children,n=e.innerRef,i=r.Children.only(t),a=o.isForwardRef(i)?m:d;return r.createElement(a,{innerRef:n},i)};y.displayName="Ref";t.a=y},,,,,,,,function(e,t,n){"use strict";var r=n(3),o=n.n(r),i=n(4),a=n.n(i),u=(n(7),n(0)),s=n.n(u),c=n(23),l=n(92),f=n(93),h=n(5);function p(e){var t=e.children,n=e.className,r=e.content,i=e.fluid,u=e.text,d=e.textAlign,m=a()("ui",Object(c.a)(u,"text"),Object(c.a)(i,"fluid"),Object(c.d)(d),"container",n),y=Object(l.a)(p,e),v=Object(f.a)(p,e);return s.a.createElement(v,o()({},y,{className:m}),h.b.isNil(t)?r:t)}p.handledProps=["as","children","className","content","fluid","text","textAlign"],p.propTypes={},t.a=p},function(e,t,n){"use strict";var r=n(3),o=n.n(r),i=n(14),a=n.n(i),u=n(9),s=n.n(u),c=n(10),l=n.n(c),f=n(11),h=n.n(f),p=n(8),d=n.n(p),m=n(2),y=n.n(m),v=n(12),g=n.n(v),b=n(1),w=n.n(b),E=n(6),_=n.n(E),S=n(21),T=n.n(S),O=n(460),k=(n(7),n(0)),C=n.n(k),x=n(92),A=n(93),I=function(e){function t(){var e,n;s()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=h()(this,(e=d()(t)).call.apply(e,[this].concat(o))),w()(y()(n),"ref",Object(k.createRef)()),w()(y()(n),"focus",(function(){return n.ref.current.focus()})),w()(y()(n),"handleChange",(function(e){var t=T()(e,"target.value");_()(n.props,"onChange",e,a()({},n.props,{value:t}))})),w()(y()(n),"handleInput",(function(e){var t=T()(e,"target.value");_()(n.props,"onInput",e,a()({},n.props,{value:t}))})),n}return g()(t,e),l()(t,[{key:"render",value:function(){var e=this.props,n=e.rows,r=e.value,i=Object(x.a)(t,this.props),a=Object(A.a)(t,this.props);return C.a.createElement(O.a,{innerRef:this.ref},C.a.createElement(a,o()({},i,{onChange:this.handleChange,onInput:this.handleInput,rows:n,value:r})))}}]),t}(k.Component);w()(I,"defaultProps",{as:"textarea",rows:3}),w()(I,"handledProps",["as","onChange","onInput","rows","value"]),I.propTypes={},t.a=I},function(e,t,n){"use strict";var r=n(3),o=n.n(r),i=n(9),a=n.n(i),u=n(10),s=n.n(u),c=n(11),l=n.n(c),f=n(8),h=n.n(f),p=n(2),d=n.n(p),m=n(12),y=n.n(m),v=n(1),g=n.n(v),b=n(241),w=n.n(b),E=n(242),_=n.n(E),S=n(29),T=n.n(S),O=(n(37),n(4)),k=n.n(O),C=(n(7),n(0)),x=n.n(C),A=n(5),I=n(145),N=n(23),D=n(92),P=n(93),R=function(e){function t(){var e,n;a()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=l()(this,(e=h()(t)).call.apply(e,[this].concat(o))),g()(d()(n),"calculatePercent",(function(){var e=n.props,t=e.percent,r=e.total,o=e.value;return T()(t)?T()(r)||T()(o)?void 0:o/r*100:t})),g()(d()(n),"computeValueText",(function(e){var t=n.props,r=t.progress,o=t.total,i=t.value;return"value"===r?i:"ratio"===r?"".concat(i,"/").concat(o):"".concat(e,"%")})),g()(d()(n),"getPercent",(function(){var e=n.props,t=e.precision,r=e.progress,o=e.total,i=e.value,a=_()(n.calculatePercent(),0,100);return T()(o)||T()(i)||"value"!==r?"value"===r?i:T()(t)?a:w()(a,t):i/o*100})),g()(d()(n),"isAutoSuccess",(function(){var e=n.props,t=e.autoSuccess,r=e.percent,o=e.total,i=e.value;return t&&(r>=100||i>=o)})),g()(d()(n),"renderLabel",(function(){var e=n.props,t=e.children,r=e.content,o=e.label;return A.b.isNil(t)?A.b.isNil(r)?Object(I.a)(o,{autoGenerateKey:!1,defaultProps:{className:"label"}}):x.a.createElement("div",{className:"label"},r):x.a.createElement("div",{className:"label"},t)})),g()(d()(n),"renderProgress",(function(e){var t=n.props,r=t.precision;if(t.progress||!T()(r))return x.a.createElement("div",{className:"progress"},n.computeValueText(e))})),n}return y()(t,e),s()(t,[{key:"render",value:function(){var e=this.props,n=e.active,r=e.attached,i=e.className,a=e.color,u=e.disabled,s=e.error,c=e.indicating,l=e.inverted,f=e.size,h=e.success,p=e.warning,d=k()("ui",a,f,Object(N.a)(n||c,"active"),Object(N.a)(u,"disabled"),Object(N.a)(s,"error"),Object(N.a)(c,"indicating"),Object(N.a)(l,"inverted"),Object(N.a)(h||this.isAutoSuccess(),"success"),Object(N.a)(p,"w
1arning"),Object(N.e)(r,"attached"),"progress",i),m=Object(D.a)(t,this.props),y=Object(P.a)(t,this.props),v=this.getPercent()||0;return x.a.createElement(y,o()({},m,{className:d,"data-percent":Math.floor(v)}),x.a.createElement("div",{className:"bar",style:{width:"".concat(v,"%")}},this.renderProgress(v)),this.renderLabel())}}]),t}(C.Component);g()(R,"handledProps",["active","as","attached","autoSuccess","children","className","color","content","disabled","error","indicating","inverted","label","percent","precision","progress","size","success","total","value","warning"]),R.propTypes={},t.a=R},function(e,t,n){"use strict";var r=n(3),o=n.n(r),i=n(9),a=n.n(i),u=n(10),s=n.n(u),c=n(11),l=n.n(c),f=n(8),h=n.n(f),p=n(2),d=n.n(p),m=n(12),y=n.n(m),v=n(1),g=n.n(v),b=n(6),w=n.n(b),E=n(37),_=n.n(E),S=n(4),T=n.n(S),O=(n(7),n(0)),k=n.n(O),C=n(23),x=n(92),A=n(93),I=n(475),N=n(14),D=n.n(N),P=n(13),R=n.n(P),j=n(21),M=n.n(j),L=n(5),U=n(145),F=n(116),B=n(50),q=n.n(B),V=n(229),z=n.n(V),W=n(460),Q=n(69),G=n(188),K=function(e){function t(){var e,n;a()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=l()(this,(e=h()(t)).call.apply(e,[this].concat(o))),g()(d()(n),"inputRef",Object(O.createRef)()),g()(d()(n),"labelRef",Object(O.createRef)()),g()(d()(n),"canToggle",(function(){var e=n.props,t=e.disabled,r=e.radio,o=e.readOnly,i=n.state.checked;return!t&&!o&&!(r&&i)})),g()(d()(n),"computeTabIndex",(function(){var e=n.props,t=e.disabled,r=e.tabIndex;return R()(r)?t?-1:0:r})),g()(d()(n),"handleClick",(function(e){var t=n.props.id,r=n.state,o=r.checked,i=r.indeterminate,a=w()(n.inputRef.current,"contains",e.target),u=w()(n.labelRef.current,"contains",e.target),s=!u&&!a,c=!R()(t);u&&c||w()(n.props,"onClick",e,D()({},n.props,{checked:!o,indeterminate:!!i})),n.isClickFromMouse&&(n.isClickFromMouse=!1,u&&!c&&n.handleChange(e),s&&n.handleChange(e),u&&c&&e.stopPropagation())})),g()(d()(n),"handleChange",(function(e){var t=n.state.checked;n.canToggle()&&(w()(n.props,"onChange",e,D()({},n.props,{checked:!t,indeterminate:!1})),n.trySetState({checked:!t,indeterminate:!1}))})),g()(d()(n),"handleMouseDown",(function(e){var t=n.state,r=t.checked,o=t.indeterminate;w()(n.props,"onMouseDown",e,D()({},n.props,{checked:!!r,indeterminate:!!o})),e.defaultPrevented||w()(n.inputRef.current,"focus"),e.preventDefault()})),g()(d()(n),"handleMouseUp",(function(e){var t=n.state,r=t.checked,o=t.indeterminate;n.isClickFromMouse=!0,w()(n.props,"onMouseUp",e,D()({},n.props,{checked:!!r,indeterminate:!!o}))})),g()(d()(n),"setIndeterminate",(function(){var e=n.state.indeterminate;z()(n.inputRef,"current.indeterminate",!!e)})),n}return y()(t,e),s()(t,[{key:"componentDidMount",value:function(){this.setIndeterminate()}},{key:"componentDidUpdate",value:function(){this.setIndeterminate()}},{key:"render",value:function(){var e=this.props,n=e.className,r=e.disabled,i=e.label,a=e.id,u=e.name,s=e.radio,c=e.readOnly,l=e.slider,f=e.toggle,h=e.type,p=e.value,d=this.state,m=d.checked,y=d.indeterminate,v=T()("ui",Object(C.a)(m,"checked"),Object(C.a)(r,"disabled"),Object(C.a)(y,"indeterminate"),Object(C.a)(R()(i),"fitted"),Object(C.a)(s,"radio"),Object(C.a)(c,"read-only"),Object(C.a)(l,"slider"),Object(C.a)(f,"toggle"),"checkbox",n),g=Object(x.a)(t,this.props),b=Object(A.a)(t,this.props),w=Object(Q.c)(g,{htmlProps:Q.b}),E=q()(w,2),_=E[0],S=E[1],O=Object(U.c)(i,{defaultProps:{htmlFor:a},autoGenerateKey:!1})||k.a.createElement("label",{htmlFor:a});return k.a.createElement(b,o()({},S,{className:v,onClick:this.handleClick,onChange:this.handleChange,onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp}),k.a.createElement(W.a,{innerRef:this.inputRef},k.a.createElement("input",o()({},_,{checked:m,className:"hidden",disabled:r,id:a,name:u,readOnly:!0,tabIndex:this.computeTabIndex(),type:h,value:p}))),k.a.createElement(W.a,{innerRef:this.labelRef},O))}}]),t}(G.a);function H(e){var t=e.slider,n=e.toggle,r=e.type,i=Object(x.a)(H,e),a=!(t||n)||void 0;return k.a.createElement(K,o()({},i,{type:r,radio:a,slider:t,toggle:n}))}g()(K,"defaultProps",{type:"checkbox"}),g()(K,"autoControlledProps",["checked","indeterminate"]),g()(K,"handledProps",["as","checked","className","defaultChecked","defaultIndeterminate","disabled","fitted","id","indeterminate","label","name","onChange","onClick","onMouseDown","onMouseUp","radio","readOnly","slider","tabIndex","toggle","type","value"]),K.propTypes={},H.handledProps=["slider","toggle","type"],H.propTypes={},H.defaultProps={type:"radio"};var Y=H;function $(e){var t=e.children,n=e.className,r=e.content,i=e.control,a=e.disabled,u=e.error,s=e.inline,c=e.label,l=e.required,f=e.type,h=e.width,p=T()(Object(C.a)(a,"disabled"),Object(C.a)(u,"error"),Object(C.a)(s,"inline"),Object(C.a)(l,"required"),Object(C.g)(h,"wide"),"field",n),d=Object(x.a)($,e),m=Object(A.a)($,e),y=M()(u,"pointing","above"),v=F.a.create(u,{autoGenerateKey:!1,defaultProps:{prompt:!0,pointing:y}}),g=("below"===y||"right"===y)&&v,b=("above"===y||"left"===y)&&v;if(R()(i))return R()(c)?k.a.createElement(m,o()({},d,{className:p}),L.b.isNil(t)?r:t):k.a.createElement(m,o()({},d,{className:p}),g,Object(U.c)(c,{autoGenerateKey:!1}),b);var w=D()({},d,{content:r,children:t,disabled:a,required:l,type:f});return"input"!==i||"checkbox"!==f&&"radio"!==f?i===K||i===Y?k.a.createElement(m,{className:p},g,Object(O.createElement)(i,D()({},w,{label:c})),b):k.a.createElement(m,{className:p},Object(U.c)(c,{defaultProps:{htmlFor:M()(w,"id")},autoGenerateKey:!1}),g,Object(O.createElement)(i,w),b):k.a.createElement(m,{className:p},k.a.createElement("label",null,g,Object(O.createElement)(i,w)," ",c,b))}$.handledProps=["as","children","className","content","control","disabled","error","inline","label","required","type","width"],$.propT
1ypes={};var X=$;function J(e){var t=e.control,n=Object(x.a)(J,e),r=Object(A.a)(J,e);return k.a.createElement(r,o()({},n,{control:t}))}J.handledProps=["as","control"],J.propTypes={},J.defaultProps={as:X,control:I.a};var Z=J;function ee(e){var t=e.control,n=Object(x.a)(ee,e),r=Object(A.a)(ee,e);return k.a.createElement(r,o()({},n,{control:t}))}ee.handledProps=["as","control"],ee.propTypes={},ee.defaultProps={as:X,control:K};var te=ee,ne=n(230),re=n.n(ne),oe=n(148),ie=n.n(oe),ae=n(27),ue=n.n(ae),se=n(231),ce=n.n(se),le=n(147),fe=n.n(le),he=n(113),pe=n.n(he),de=n(232),me=n.n(de),ye=n(54),ve=n.n(ye),ge=n(233),be=n.n(ge),we=n(114),Ee=n.n(we),_e=n(42),Se=n.n(_e),Te=n(73),Oe=n.n(Te),ke=n(234),Ce=n.n(ke),xe=n(235),Ae=n.n(xe),Ie=n(76),Ne=n.n(Ie),De=n(236),Pe=n.n(De),Re=n(115),je=n.n(Re),Me=n(153),Le=n.n(Me),Ue=n(34),Fe=n.n(Ue),Be=n(146),qe=n.n(Be),Ve=n(29),ze=n.n(Ve),We=n(237),Qe=n.n(We),Ge=(n(51),n(30)),Ke=n.n(Ge),He=n(22),Ye=n.n(He),$e=n(119),Xe=n.n($e),Je=n(187),Ze=n(56);function et(e){var t=e.className,n=T()("divider",t),r=Object(x.a)(et,e),i=Object(A.a)(et,e);return k.a.createElement(i,o()({},r,{className:n}))}et.handledProps=["as","className"],et.propTypes={};var tt=et,nt=function(e){function t(){return a()(this,t),l()(this,h()(t).apply(this,arguments))}return y()(t,e),s()(t,[{key:"render",value:function(){var e=this.props,n=e.className,r=e.name,i=T()(r,"flag",n),a=Object(x.a)(t,this.props),u=Object(A.a)(t,this.props);return k.a.createElement(u,o()({},a,{className:i}))}}]),t}(O.PureComponent);g()(nt,"defaultProps",{as:"i"}),g()(nt,"handledProps",["as","className","name"]),nt.propTypes={},nt.create=Object(U.f)(nt,(function(e){return{name:e}}));var rt=nt,ot=n(244),it=function(e){function t(){var e,n;a()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=l()(this,(e=h()(t)).call.apply(e,[this].concat(o))),g()(d()(n),"handleClick",(function(e){w()(n.props,"onClick",e,n.props)})),n}return y()(t,e),s()(t,[{key:"render",value:function(){var e=this.props,n=e.active,r=e.children,i=e.className,a=e.content,u=e.disabled,s=e.description,c=e.flag,l=e.icon,f=e.image,h=e.label,p=e.selected,d=e.text,m=T()(Object(C.a)(n,"active"),Object(C.a)(u,"disabled"),Object(C.a)(p,"selected"),"item",i),y=R()(l)?L.b.someByType(r,"DropdownMenu")&&"dropdown":l,v=Object(x.a)(t,this.props),g=Object(A.a)(t,this.props),b={role:"option","aria-disabled":u,"aria-checked":n,"aria-selected":p};if(!L.b.isNil(r))return k.a.createElement(g,o()({},v,b,{className:m,onClick:this.handleClick}),r);var w=rt.create(c,{autoGenerateKey:!1}),E=Ze.a.create(y,{autoGenerateKey:!1}),_=ot.a.create(f,{autoGenerateKey:!1}),S=F.a.create(h,{autoGenerateKey:!1}),O=Object(U.e)("span",(function(e){return{children:e}}),s,{defaultProps:{className:"description"},autoGenerateKey:!1}),I=Object(U.e)("span",(function(e){return{children:e}}),L.b.isNil(a)?d:a,{defaultProps:{className:"text"},autoGenerateKey:!1});return k.a.createElement(g,o()({},v,b,{className:m,onClick:this.handleClick}),_,E,w,S,O,I)}}]),t}(O.Component);g()(it,"handledProps",["active","as","children","className","content","description","disabled","flag","icon","image","label","onClick","selected","text","value"]),it.propTypes={},it.create=Object(U.f)(it,(function(e){return e}));var at=it;function ut(e){var t=e.children,n=e.className,r=e.content,i=e.icon,a=T()("header",n),u=Object(x.a)(ut,e),s=Object(A.a)(ut,e);return L.b.isNil(t)?k.a.createElement(s,o()({},u,{className:a}),Ze.a.create(i,{autoGenerateKey:!1}),r):k.a.createElement(s,o()({},u,{className:a}),t)}ut.handledProps=["as","children","className","content","icon"],ut.propTypes={},ut.create=Object(U.f)(ut,(function(e){return{content:e}}));var st=ut;function ct(e){var t=e.children,n=e.className,r=e.content,i=e.direction,a=e.open,u=e.scrolling,s=T()(i,Object(C.a)(a,"visible"),Object(C.a)(u,"scrolling"),"menu transition",n),c=Object(x.a)(ct,e),l=Object(A.a)(ct,e);return k.a.createElement(l,o()({},c,{className:s}),L.b.isNil(t)?r:t)}ct.handledProps=["as","children","className","content","direction","open","scrolling"],ct.propTypes={};var lt=ct,ft=function(e){function t(){var e,n;a()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=l()(this,(e=h()(t)).call.apply(e,[this].concat(o))),g()(d()(n),"handleChange",(function(e){var t=M()(e,"target.value");w()(n.props,"onChange",e,D()({},n.props,{value:t}))})),n}return y()(t,e),s()(t,[{key:"render",value:function(){var e=this.props,n=e.autoComplete,r=e.className,i=e.tabIndex,a=e.type,u=e.value,s=T()("search",r),c=Object(x.a)(t,this.props);return k.a.createElement("input",o()({},c,{"aria-autocomplete":"list",autoComplete:n,className:s,onChange:this.handleChange,tabIndex:i,type:a,value:u}))}}]),t}(O.Component);g()(ft,"defaultProps",{autoComplete:"off",type:"text"}),g()(ft,"handledProps",["as","autoComplete","className","tabIndex","type","value"]),ft.propTypes={},ft.create=Object(U.f)(ft,(function(e){return{type:e}}));var ht=ft,pt=function(e,t){return R()(e)?t:e},dt=function(e){function t(){var e,n;a()(this,t);for(var r=arguments.length,i=new Array(r),u=0;u<r;u++)i[u]=arguments[u];return n=l()(this,(e=h()(t)).call.apply(e,[this].concat(i))),g()(d()(n),"searchRef",Object(O.createRef)()),g()(d()(n),"sizerRef",Object(O.createRef)()),g()(d()(n),"ref",Object(O.createRef)()),g()(d()(n),"handleChange",(function(e,t){w()(n.props,"onChange",e,D()({},n.props,{value:t}))})),g()(d()(n),"closeOnChange",(function(e){var t=n.props,r=t.closeOnChange,o=t.multiple;(ze()(r)?!o:r)&&n.close(e,qe.a)})),g()(d()(n),"closeOnEscape",(function(e){n.props.closeOnEscape&&Ye.a.getCode(e)===Ye.a.Escape&&(e.preventDefault(),n.close(e))})),g()(d()(n),"moveSelectionOnKeyDown",(function(e){var t,r=n.props,o=r.multiple,i=r.selectOnNavigation,a=(t={},g()(t,Ye.a.ArrowDown,1),g()(t,Ye.a.ArrowUp,-1),t)[Ye.a.getCode(e)];void 0!==a&&(e.preventDefault(),n.moveSelectionBy(a),!o&&i&&n.makeSelectedItemActive(e))})),g()(d()(n),"openOnSpace",(function(e){Ye.a.getCode(e)===Ye.a.Spacebar&&(e.preventDefault(),n.open(e))})),g()(d()(n),"openOnArrow",(function(e){var t=Ye.a.getCode(e);Fe()([Ye.a.ArrowDown,Ye.a.ArrowUp],t)&&(n.state.open||(e.preventDefault(),n.open(e)))})),g()(d()(n),"makeSelectedItemActive",(function(e){var t=n.state,r=t.open,o=t.value,i=n.props.multiple,a=n.getSelectedItem(),u=M()(a,"value");if(!R()(u)&&r){var s=i?Le()(n.state.value,[u]):u;(i?!!je()(s,o).length:s!==o)&&(n.setValue(s),n.setSelectedIndex(s),n.handleChange(e,s),a["data-additional"]&&w()(n.props,"onAddItem",e,D()({},n.props,{value:u})))}})),g()(d()(n),"selectItemOnEnter",(function(e){var t=n.props.search;if(Ye.a.getCode(e)===Ye.a.Enter||!t&&Ye.a.getCode(e)===Ye.a.Spacebar){e.preventDefault();
1var r=Pe()(n.getMenuOptions());t&&0===r||(n.makeSelectedItemActive(e),n.closeOnChange(e),n.clearSearchQuery(),t&&w()(n.searchRef.current,"focus"))}})),g()(d()(n),"removeItemOnBackspace",(function(e){var t=n.props,r=t.multiple,o=t.search,i=n.state,a=i.searchQuery,u=i.value;if(Ye.a.getCode(e)===Ye.a.Backspace&&!a&&o&&r&&!Ne()(u)){e.preventDefault();var s=Ae()(u);n.setValue(s),n.setSelectedIndex(s),n.handleChange(e,s)}})),g()(d()(n),"closeOnDocumentClick",(function(e){n.props.closeOnBlur&&(n.ref.current&&Object(Je.a)(n.ref.current,e)||n.close())})),g()(d()(n),"handleMouseDown",(function(e){n.isMouseDown=!0,w()(n.props,"onMouseDown",e,n.props),document.addEventListener("mouseup",n.handleDocumentMouseUp)})),g()(d()(n),"handleDocumentMouseUp",(function(){n.isMouseDown=!1,document.removeEventListener("mouseup",n.handleDocumentMouseUp)})),g()(d()(n),"handleClick",(function(e){var t=n.props,r=t.minCharacters,o=t.search,i=n.state,a=i.open,u=i.searchQuery;if(w()(n.props,"onClick",e,n.props),e.stopPropagation(),!o)return n.toggle(e);a?w()(n.searchRef.current,"focus"):u.length>=r||1===r?n.open(e):w()(n.searchRef.current,"focus")})),g()(d()(n),"handleIconClick",(function(e){var t=n.props.clearable,r=n.hasValue();w()(n.props,"onClick",e,n.props),e.stopPropagation(),t&&r?n.clearValue(e):n.toggle(e)})),g()(d()(n),"handleItemClick",(function(e,t){var r=n.props,o=r.multiple,i=r.search,a=n.state.value,u=t.value;if(e.stopPropagation(),(o||t.disabled)&&e.nativeEvent.stopImmediatePropagation(),!t.disabled){var s=t["data-additional"],c=o?Le()(n.state.value,[u]):u;(o?!!je()(c,a).length:c!==a)&&(n.setValue(c),n.setSelectedIndex(u),n.handleChange(e,c)),n.clearSearchQuery(u),i?w()(n.searchRef.current,"focus"):w()(n.ref.current,"focus"),n.closeOnChange(e),s&&w()(n.props,"onAddItem",e,D()({},n.props,{value:u}))}})),g()(d()(n),"handleFocus",(function(e){n.state.focus||(w()(n.props,"onFocus",e,n.props),n.setState({focus:!0}))})),g()(d()(n),"handleBlur",(function(e){var t=M()(e,"currentTarget");if(!t||!t.contains(document.activeElement)){var r=n.props,o=r.closeOnBlur,i=r.multiple,a=r.selectOnBlur;n.isMouseDown||(w()(n.props,"onBlur",e,n.props),a&&!i&&(n.makeSelectedItemActive(e),o&&n.close()),n.setState({focus:!1}),n.clearSearchQuery())}})),g()(d()(n),"handleSearchChange",(function(e,t){var r=t.value;e.stopPropagation();var o=n.props.minCharacters,i=n.state.open,a=r;w()(n.props,"onSearchChange",e,D()({},n.props,{searchQuery:a})),n.trySetState({searchQuery:a,selectedIndex:0}),!i&&a.length>=o?n.open():i&&1!==o&&a.length<o&&n.close()})),g()(d()(n),"getKeyAndValues",(function(e){return e?e.map((function(e){return Ce()(e,["key","value"])})):e})),g()(d()(n),"getMenuOptions",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n.state.value,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.props.options,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.state.searchQuery,o=n.props,i=o.additionLabel,a=o.additionPosition,u=o.allowAdditions,s=o.deburr,c=o.multiple,l=o.search,f=t;if(c&&(f=Oe()(f,(function(t){return!Fe()(e,t.value)}))),l&&r)if(Se()(l))f=l(f,r);else{var h=s?Ee()(r):r,p=new RegExp(be()(h),"i");f=Oe()(f,(function(e){return p.test(s?Ee()(e.text):e.text)}))}if(u&&l&&r&&!ve()(f,{text:r})){var d=k.a.isValidElement(i)?k.a.cloneElement(i,{key:"addition-label"}):i||"",m={key:"addition",text:[d,k.a.createElement("b",{key:"addition-query"},r)],value:r,className:"addition","data-additional":!0};"top"===a?f.unshift(m):f.push(m)}return f})),g()(d()(n),"getSelectedItem",(function(){var e=n.state.selectedIndex,t=n.getMenuOptions();return M()(t,"[".concat(e,"]"))})),g()(d()(n),"getEnabledIndices",(function(e){var t=e||n.getMenuOptions();return me()(t,(function(e,t,n){return t.disabled||e.push(n),e}),[])})),g()(d()(n),"getItemByValue",(function(e){var t=n.props.options;return pe()(t,{value:e})})),g()(d()(n),"getMenuItemIndexByValue",(function(e,t){var r=t||n.getMenuOptions();return fe()(r,["value",e])})),g()(d()(n),"getDropdownAriaOptions",(function(){var e=n.props,t=e.loading,r=e.disabled,o=e.search,i=e.multiple,a={role:o?"combobox":"listbox","aria-busy":t,"aria-disabled":r,"aria-expanded":!!n.state.open};return"listbox"===a.role&&(a["aria-multiselectable"]=i),a})),g()(d()(n),"clearSearchQuery",(function(e){var t=n.state.searchQuery;void 0!==t&&""!==t&&(n.trySetState({searchQuery:""}),n.setSelectedIndex(e,void 0,""))})),g()(d()(n),"setValue",(function(e){n.trySetState({value:e})})),g()(d()(n),"setSelectedIndex",(function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n.state.value,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.props.options,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.state.searchQuery,i=n.props.multiple,a=n.state.selectedIndex,u=n.getMenuOptions(t,r,o),s=n.getEnabledIndices(u);if(!a||a<0){var c=s[0];e=i?c:n.getMenuItemIndexByValue(t,u)||s[0]}else if(i)a>=u.length-1&&(e=s[s.length-1]);else{var l=n.getMenuItemIndexByValue(t,u);e=Fe()(s,l)?l:void 0}(!e||e<0)&&(e=s[0]),n.setState({selectedIndex:e})})),g()(d()(n),"handleLabelClick",(function(e,t){e.stopPropagation(),n.setState({selectedLabel:t.value}),w()(n.props,"onLabelClick",e,t)})),g()(d()(n),"handleLabelRemove",(function(e,t){e.stopPropagation();var r=n.state.value,o=_()(r,t.value);n.setValue(o),n.setSelectedIndex(o),n.handleChange(e,o)})),g()(d()(n),"moveSelectionBy",(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.state.selectedIndex,r=n.getMenuOptions();if(void 0!==r&&!ce()(r,"disabled")){var o=r.length-1,i=n.props.wrapSelection,a=t+e;!i&&(a>o||a<0)?a=t:a>o?a=0:a<0&&(a=o),r[a].disabled?n.moveSelectionBy(e,a):(n.setState({selectedIndex:a}),n.scrollSelectedItemIntoView())}})),g()(d()(n),"handleIconOverrides",(function(e){var t=n.props.clearable;return{className:T()(t&&n.hasValue()&&"clear",e.className),onClick:function(t){w()(e,"onClick",t,e),n.handleIconClick(t)}}})),g()(d()(n),"clearValue",(function(e){var t=n.props.multiple?[]:"";n.setValue(t),n.setSelectedIndex(t),n.handleChange(e,t)})),g()(d()(n),"computeSearchInputTabIndex",(function(){var e=n.props,t=e.disabled,r=e.tabIndex;return R()(r)?t?-1:0:r})),g()(d()(n),"computeSearchInputWidth",(function(){var e=n.state.searchQuery;if(n.sizerRef.current&&e){n.sizerRef.current.style.display="inline",n.sizerRef.current.textContent=e;var t=Math.ceil(n.sizerRef.current.getBoundingClientRect().width);return n.sizerRef.current.style.removeProperty("display"),t}})),g()(d()(n),"computeTabIndex",(function(){var e=n.props,t=e.disabled,r=e.search,o=e.tabIndex;if(!r)return t?-1:R()(o)?0:o})),g()(d()(n),"handleSearchInputOverrides",(function(e){return{onChange:function(t,r){w()(e,"onChange",t,r),n.handleSearchChange(t,r)}}})),g()(d()(n),"hasValue",(function(){var e=n.props.multiple,t=n.state.value;return e?!Ne()(t):!R()(t)&&""!==t})),g()(d()(n),"scrollSelectedItemIntoView",(function(){if(n.ref.current){var e=n.ref.current.querySelector(".menu.visible");if(e){var t=e.querySelector(".item.selected");if(t){var r=t.offsetTop<e.scrollTop,o=t.offsetTop+t.clientHeight>e.scrollTop+e.clientHeight;r?e.scrollTop=t.offsetTop:o&&(e.scrollTop=t.offsetTop+t.clientHeight-e.clientHeight)}}}})),g()(d()(n),"setOpenDirection",(function(){if(n.ref.current){var e=n.ref.current.querySelector(".menu.visible");if(e){var t=n.ref.current.getBoundingClientRect(),r=e.clientHeight,o=document.documentElement.clientHeight-t.top-t.height-r,i=t.top-r,a=o<0&&i>o;!a!==!n.state.upward&&n.trySetState({upward:a})}}})),g()(d()(n),"open",(function(e){var t=n.props,r=t.disabled,o=(t.open,t.search);r||(o&&w()(n.searchRef.current,"focus"),w()(n.props,"onOpen",e,n.props),n.trySetState({open:!0}),n.scrollSelectedItemIntoView())})),g()(d()(n),"close",(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.handleClose,r=n.state.open;r&&(w()(n.props,"onClose",e,n.props),n.trySetState({open:!1},t))})),g()(d()(n),"handleClose",(function(){var e=document.activeElement===n.searchRef.current;!e&&n.ref.current&&n.ref.current.blur();var t=document.activeElement===n.ref.current,r=e||t;n.setState({focus:r})})),g()(d()(n),"toggle",(function(e){return n.state.open?n.close(e):n.open(e)})),g()(d()(n),"renderText",(function(){var e=n.props,t=e.multiple,r=e.placeholder,o=e.search,i=e.text,a=n.state,u=a.searchQuery,s=a.value,c=a.open,l=n.hasValue(),f=T()(r&&!l&&"default","text",o&&u&&"f
1iltered"),h=r;return i?h=i:c&&!t?h=M()(n.getSelectedItem(),"text"):l&&(h=M()(n.getItemByValue(s),"text")),k.a.createElement("div",{className:f,role:"alert","aria-live":"polite","aria-atomic":!0},h)})),g()(d()(n),"renderSearchInput",(function(){var e=n.props,t=e.search,r=e.searchInput,o=n.state.searchQuery;return t&&k.a.createElement(W.a,{innerRef:n.searchRef},ht.create(r,{defaultProps:{style:{width:n.computeSearchInputWidth()},tabIndex:n.computeSearchInputTabIndex(),value:o},overrideProps:n.handleSearchInputOverrides}))})),g()(d()(n),"renderSearchSizer",(function(){var e=n.props,t=e.search,r=e.multiple;return t&&r&&k.a.createElement("span",{className:"sizer",ref:n.sizerRef})})),g()(d()(n),"renderLabels",(function(){var e=n.props,t=e.multiple,r=e.renderLabel,o=n.state,i=o.selectedLabel,a=o.value;if(t&&!Ne()(a)){var u=ue()(a,n.getItemByValue);return ue()(ie()(u),(function(e,t){var o={active:e.value===i,as:"a",key:pt(e.key,e.value),onClick:n.handleLabelClick,onRemove:n.handleLabelRemove,value:e.value};return F.a.create(r(e,t,o),{defaultProps:o})}))}})),g()(d()(n),"renderOptions",(function(){var e=n.props,t=e.lazyLoad,r=e.multiple,o=e.search,i=e.noResultsMessage,a=n.state,u=a.open,s=a.selectedIndex,c=a.value;if(t&&!u)return null;var l=n.getMenuOptions();if(null!==i&&o&&Ne()(l))return k.a.createElement("div",{className:"message"},i);var f=r?function(e){return Fe()(c,e)}:function(e){return e===c};return ue()(l,(function(e,t){return at.create(D()({active:f(e.value),onClick:n.handleItemClick,selected:s===t},e,{key:pt(e.key,e.value),style:D()({},e.style,{pointerEvents:"all"})}))}))})),g()(d()(n),"renderMenu",(function(){var e=n.props,t=e.children,r=e.direction,i=e.header,a=n.state.open,u=n.getDropdownMenuAriaOptions();if(!L.b.isNil(t)){var s=O.Children.only(t),c=T()(r,Object(C.a)(a,"visible"),s.props.className);return Object(O.cloneElement)(s,D()({className:c},u))}return k.a.createElement(lt,o()({},u,{direction:r,open:a}),st.create(i,{autoGenerateKey:!1}),n.renderOptions())})),n}return y()(t,e),s()(t,[{key:"getInitialAutoControlledState",value:function(){return{focus:!1,searchQuery:""}}},{key:"UNSAFE_componentWillMount",value:function(){var e=this.state,t=e.open,n=e.value;this.setValue(n),this.setSelectedIndex(n),t&&this.open()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){re()(h()(t.prototype),"UNSAFE_componentWillReceiveProps",this).call(this,e),Xe()(e.value,this.props.value)||(this.setValue(e.value),this.setSelectedIndex(e.value)),Qe()(this.getKeyAndValues(e.options),this.getKeyAndValues(this.props.options))||this.setSelectedIndex(void 0,e.options)}},{key:"shouldComponentUpdate",value:function(e,t){return!Xe()(e,this.props)||!Xe()(t,this.state)}},{key:"componentDidUpdate",value:function(e,t){var n=this.props,r=n.closeOnBlur,o=n.minCharacters,i=n.openOnFocus,a=n.search;if(!t.focus&&this.state.focus){if(!this.isMouseDown){var u=!a||a&&1===o&&!this.state.open;i&&u&&this.open()}}else t.focus&&!this.state.focus&&!this.isMouseDown&&r&&this.close();!t.open&&this.state.open?(this.setOpenDirection(),this.scrollSelectedItemIntoView()):t.open&&this.state.open}},{key:"getDropdownMenuAriaOptions",value:function(){var e=this.props,t=e.search,n=e.multiple,r={};return t&&(r["aria-multiselectable"]=n,r.role="listbox"),r}},{key:"render",value:function(){var e=this.props,n=e.basic,r=e.button,i=e.className,a=e.compact,u=e.disabled,s=e.error,c=e.fluid,l=e.floating,f=e.icon,h=e.inline,p=e.item,d=e.labeled,m=e.loading,y=e.multiple,v=e.pointing,g=e.search,b=e.selection,w=e.scrolling,E=e.simple,_=e.trigger,S=this.state,O=S.focus,I=S.open,N=S.upward,D=T()("ui",Object(C.a)(I,"active visible"),Object(C.a)(u,"disabled"),Object(C.a)(s,"error"),Object(C.a)(m,"loading"),Object(C.a)(n,"basic"),Object(C.a)(r,"button"),Object(C.a)(a,"compact"),Object(C.a)(c,"fluid"),Object(C.a)(l,"floating"),Object(C.a)(h,"inline"),Object(C.a)(d,"labeled"),Object(C.a)(p,"item"),Object(C.a)(y,"multiple"),Object(C.a)(g,"search"),Object(C.a)(b,"selection"),Object(C.a)(E,"simple"),Object(C.a)(w,"scrolling"),Object(C.a)(N,"upward"),Object(C.b)(v,"pointing"),"dropdown",i),P=Object(x.a)(t,this.props),R=Object(A.a)(t,this.props),j=this.getDropdownAriaOptions(R,this.props);return k.a.createElement(W.a,{innerRef:this.ref},k.a.createElement(R,o()({},P,j,{className:D,onBlur:this.handleBlur,onClick:this.handleClick,onMouseDown:this.handleMouseDown,onFocus:this.handleFocus,onChange:this.handleChange,tabIndex:this.computeTabIndex()}),this.renderLabels(),this.renderSearchInput(),this.renderSearchSizer(),_||this.renderText(),Ze.a.create(f,{overrideProps:this.handleIconOverrides,autoGenerateKey:!1}),this.renderMenu(),I&&k.a.createElement(Ke.a,{name:"keydown",on:this.closeOnEscape}),I&&k.a.createElement(Ke.a,{name:"keydown",on:this.moveSelectionOnKeyDown}),I&&k.a.createElement(Ke.a,{name:"click",on:this.closeOnDocumentClick}
1),I&&k.a.createElement(Ke.a,{name:"keydown",on:this.selectItemOnEnter}),O&&k.a.createElement(Ke.a,{name:"keydown",on:this.removeItemOnBackspace}),O&&!I&&k.a.createElement(Ke.a,{name:"keydown",on:this.openOnArrow}),O&&!I&&k.a.createElement(Ke.a,{name:"keydown",on:this.openOnSpace})))}}]),t}(G.a);function mt(e){var t=e.control,n=Object(x.a)(mt,e),r=Object(A.a)(mt,e);return k.a.createElement(r,o()({},n,{control:t}))}g()(dt,"defaultProps",{additionLabel:"Add ",additionPosition:"top",closeOnBlur:!0,closeOnEscape:!0,deburr:!1,icon:"dropdown",minCharacters:1,noResultsMessage:"No results found.",openOnFocus:!0,renderLabel:function(e){return e.text},searchInput:"text",selectOnBlur:!0,selectOnNavigation:!0,wrapSelection:!0}),g()(dt,"autoControlledProps",["open","searchQuery","selectedLabel","value","upward"]),g()(dt,"Divider",tt),g()(dt,"Header",st),g()(dt,"Item",at),g()(dt,"Menu",lt),g()(dt,"SearchInput",ht),g()(dt,"handledProps",["additionLabel","additionPosition","allowAdditions","as","basic","button","children","className","clearable","closeOnBlur","closeOnChange","closeOnEscape","compact","deburr","defaultOpen","defaultSearchQuery","defaultSelectedLabel","defaultUpward","defaultValue","direction","disabled","error","floating","fluid","header","icon","inline","item","labeled","lazyLoad","loading","minCharacters","multiple","noResultsMessage","onAddItem","onBlur","onChange","onClick","onClose","onFocus","onLabelClick","onMouseDown","onOpen","onSearchChange","open","openOnFocus","options","placeholder","pointing","renderLabel","scrolling","search","searchInput","searchQuery","selectOnBlur","selectOnNavigation","selectedLabel","selection","simple","tabIndex","text","trigger","upward","value","wrapSelection"]),dt.propTypes={},mt.handledProps=["as","control"],mt.propTypes={},mt.defaultProps={as:X,control:dt};var yt=mt;n(43);function vt(e){var t=e.children,n=e.className,r=e.grouped,i=e.inline,a=e.unstackable,u=e.widths,s=T()(Object(C.a)(r,"grouped"),Object(C.a)(i,"inline"),Object(C.a)(a,"unstackable"),Object(C.g)(u,null,!0),"fields",n),c=Object(x.a)(vt,e),l=Object(A.a)(vt,e);return k.a.createElement(l,o()({},c,{className:s}),t)}vt.handledProps=["as","children","className","grouped","inline","unstackable","widths"],vt.propTypes={};var gt=vt,bt=n(57),wt=function(e){function t(){var e,n;a()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=l()(this,(e=h()(t)).call.apply(e,[this].concat(o))),g()(d()(n),"inputRef",Object(O.createRef)()),g()(d()(n),"computeIcon",(function(){var e=n.props,t=e.loading,r=e.icon;return R()(r)?t?"spinner":void 0:r})),g()(d()(n),"computeTabIndex",(function(){var e=n.props,t=e.disabled,r=e.tabIndex;return R()(r)?t?-1:void 0:r})),g()(d()(n),"focus",(function(){return n.inputRef.current.focus()})),g()(d()(n),"select",(function(){return n.inputRef.current.select()})),g()(d()(n),"handleChange",(function(e){var t=M()(e,"target.value");w()(n.props,"onChange",e,D()({},n.props,{value:t}))})),g()(d()(n),"handleChildOverrides",(function(e,t){return D()({},t,e.props,{ref:function(t){Object(bt.a)(e.ref,t),n.inputRef.current=t}})})),g()(d()(n),"partitionProps",(function(){var e=n.props,r=e.disabled,o=e.type,i=n.computeTabIndex(),a=Object(x.a)(t,n.props),u=Object(Q.c)(a),s=q()(u,2),c=s[0],l=s[1];return[D()({},c,{disabled:r,type:o,tabIndex:i,onChange:n.handleChange,ref:n.inputRef}),l]})),n}return y()(t,e),s()(t,[{key:"render",value:function(){var e=this,n=this.props,r=n.action,i=n.actionPosition,a=n.children,u=n.className,s=n.disabled,c=n.error,l=n.fluid,f=n.focus,h=n.icon,p=n.iconPosition,d=n.input,m=n.inverted,y=n.label,v=n.labelPosition,g=n.loading,b=n.size,w=n.transparent,E=n.type,_=T()("ui",b,Object(C.a)(s,"disabled"),Object(C.a)(c,"error"),Object(C.a)(l,"fluid"),Object(C.a)(f,"focus"),Object(C.a)(m,"inverted"),Object(C.a)(g,"loading"),Object(C.a)(w,"transparent"),Object(C.e)(i,"action")||Object(C.a)(r,"action"),Object(C.e)(p,"icon")||Object(C.a)(h||g,"icon"),Object(C.e)(v,"labeled")||Object(C.a)(y,"labeled"),"input",u),S=Object(A.a)(t,this.props),x=this.partitionProps(),N=q()(x,2),D=N[0],P=N[1];if(!L.b.isNil(a)){var R=ue()(O.Children.toArray(a),(function(t){return"input"!==t.type?t:Object(O.cloneElement)(t,e.handleChildOverrides(t,D))}));return k.a.createElement(S,o()({},P,{className:_}),R)}var j=I.a.create(r,{autoGenerateKey:!1}),M=F.a.create(y,{defaultProps:{className:T()("label",Fe()(v,"corner")&&v)},autoGenerateKey:!1});return k.a.createElement(S,o()({},P,{className:_}),"left"===i&&j,"right"!==v&&M,Object(U.b)(d||E,{defaultProps:D,autoGenerateKey:!1}),Ze.a.create(this.computeIcon(),{autoGenerateKey:!1}),"left"!==i&&j,"right"===v&&M)}}]),t}(O.Component);g()(wt,"defaultProps",{type:"text"}),g()(wt,"handledProps",["action","actionPosition","as","children","className","disabled","error","fluid","focus","icon","iconPosition","input","inverted","label","labelPosition","loading","onChange","size","tabIndex","transparent","type"]),wt.propTypes={},wt.create=Object(U.f)(wt,(function(e){return{type:e}}));var Et=wt;function _t(e){var t=e.control,n=Object(x.a)(_t,e),r=Object(A.a)(_t,e);return k.a.createElement(r,o()({},n,{control:t}))}
1_t.handledProps=["as","control"],_t.propTypes={},_t.defaultProps={as:X,control:Et};var St=_t;function Tt(e){var t=e.control,n=Object(x.a)(Tt,e),r=Object(A.a)(Tt,e);return k.a.createElement(r,o()({},n,{control:t}))}Tt.handledProps=["as","control"],Tt.propTypes={},Tt.defaultProps={as:X,control:Y};var Ot=Tt;function kt(e){return k.a.createElement(dt,o()({},e,{selection:!0}))}kt.handledProps=["options"],kt.propTypes={},kt.Divider=dt.Divider,kt.Header=dt.Header,kt.Item=dt.Item,kt.Menu=dt.Menu;var Ct=kt;function xt(e){var t=e.control,n=e.options,r=Object(x.a)(xt,e),i=Object(A.a)(xt,e);return k.a.createElement(i,o()({},r,{control:t,options:n}))}xt.handledProps=["as","control","options"],xt.propTypes={},xt.defaultProps={as:X,control:Ct};var At=xt,It=n(469);function Nt(e){var t=e.control,n=Object(x.a)(Nt,e),r=Object(A.a)(Nt,e);return k.a.createElement(r,o()({},n,{control:t}))}Nt.handledProps=["as","control"],Nt.propTypes={},Nt.defaultProps={as:X,control:It.a};var Dt=Nt,Pt=function(e){function t(){var e,n;a()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=l()(this,(e=h()(t)).call.apply(e,[this].concat(o))),g()(d()(n),"handleSubmit",(function(e){var t=n.props.action;"string"!==typeof t&&w()(e,"preventDefault");for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];w.a.apply(void 0,[n.props,"onSubmit",e,n.props].concat(o))})),n}return y()(t,e),s()(t,[{key:"render",value:function(){var e=this.props,n=e.action,r=e.children,i=e.className,a=e.error,u=e.inverted,s=e.loading,c=e.reply,l=e.size,f=e.success,h=e.unstackable,p=e.warning,d=e.widths,m=T()("ui",l,Object(C.a)(a,"error"),Object(C.a)(u,"inverted"),Object(C.a)(s,"loading"),Object(C.a)(c,"reply"),Object(C.a)(f,"success"),Object(C.a)(h,"unstackable"),Object(C.a)(p,"w
1arning"),Object(C.g)(d,null,!0),"form",i),y=Object(x.a)(t,this.props),v=Object(A.a)(t,this.props);return k.a.createElement(v,o()({},y,{action:n,className:m,onSubmit:this.handleSubmit}),r)}}]),t}(O.Component);g()(Pt,"defaultProps",{as:"form"}),g()(Pt,"Field",X),g()(Pt,"Button",Z),g()(Pt,"Checkbox",te),g()(Pt,"Dropdown",yt),g()(Pt,"Group",gt),g()(Pt,"Input",St),g()(Pt,"Radio",Ot),g()(Pt,"Select",At),g()(Pt,"TextArea",Dt),g()(Pt,"handledProps",["action","as","children","className","error","inverted","loading","onSubmit","reply","size","success","unstackable","warning","widths"]),Pt.propTypes={};t.a=Pt},function(e,t,n){"use strict";var r=n(3),o=n.n(r),i=n(9),a=n.n(i),u=n(10),s=n.n(u),c=n(11),l=n.n(c),f=n(8),h=n.n(f),p=n(2),d=n.n(p),m=n(12),y=n.n(m),v=n(1),g=n.n(v),b=n(27),w=n.n(b),E=n(6),_=n.n(E),S=n(4),T=n.n(S),O=(n(7),n(0)),k=n.n(O),C=n(23),x=n(92),A=n(93),I=n(5),N=n(145);function D(e){var t=e.children,n=e.className,r=e.content,i=T()(n,"description"),a=Object(x.a)(D,e),u=Object(A.a)(D,e);return k.a.createElement(u,o()({},a,{className:i}),I.b.isNil(t)?r:t)}D.handledProps=["as","children","className","content"],D.propTypes={},D.create=Object(N.f)(D,(function(e){return{content:e}}));var P=D;function R(e){var t=e.children,n=e.className,r=e.content,i=T()("header",n),a=Object(x.a)(R,e),u=Object(A.a)(R,e);return k.a.createElement(u,o()({},a,{className:i}),I.b.isNil(t)?r:t)}R.handledProps=["as","children","className","content"],R.propTypes={},R.create=Object(N.f)(R,(function(e){return{content:e}}));var j=R;function M(e){var t=e.children,n=e.className,r=e.content,i=e.description,a=e.floated,u=e.header,s=e.verticalAlign,c=T()(Object(C.e)(a,"floated"),Object(C.f)(s),"content",n),l=Object(x.a)(M,e),f=Object(A.a)(M,e);return I.b.isNil(t)?k.a.createElement(f,o()({},l,{className:c}),j.create(u),P.create(i),r):k.a.createElement(f,o()({},l,{className:c}),t)}M.handledProps=["as","children","className","content","description","floated","header","verticalAlign"],M.propTypes={},M.create=Object(N.f)(M,(function(e){return{content:e}}));var L=M,U=n(56);function F(e){var t=e.className,n=e.verticalAlign,r=T()(Object(C.f)(n),t),i=Object(x.a)(F,e);return k.a.createElement(U.a,o()({},i,{className:r}))}F.handledProps=["className","verticalAlign"],F.propTypes={},F.create=Object(N.f)(F,(function(e){return{name:e}}));var B=F,q=n(60),V=n.n(q),z=n(244),W=function(e){function t(){var e,n;a()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=l()(this,(e=h()(t)).call.apply(e,[this].concat(o))),g()(d()(n),"handleClick",(function(e){n.props.disabled||_()(n.props,"onClick",e,n.props)})),n}return y()(t,e),s()(t,[{key:"render",value:function(){var e=this.props,n=e.active,r=e.children,i=e.className,a=e.content,u=e.description,s=e.disabled,c=e.header,l=e.icon,f=e.image,h=e.value,p=Object(A.a)(t,this.props),d=T()(Object(C.a)(n,"active"),Object(C.a)(s,"disabled"),Object(C.a)("li"!==p,"item"),i),m=Object(x.a)(t,this.props),y="li"===p?{value:h}:{"data-value":h};if(!I.b.isNil(r))return k.a.createElement(p,o()({},y,{role:"listitem",className:d,onClick:this.handleClick},m),r);var v=B.create(l,{autoGenerateKey:!1}),g=z.a.create(f,{autoGenerateKey:!1});if(!Object(O.isValidElement)(a)&&V()(a))return k.a.createElement(p,o()({},y,{role:"listitem",className:d,onClick:this.handleClick},m),v||g,L.create(a,{autoGenerateKey:!1,defaultProps:{header:c,description:u}}));var b=j.create(c,{autoGenerateKey:!1}),w=P.create(u,{autoGenerateKey:!1});return v||g?k.a.createElement(p,o()({},y,{role:"listitem",className:d,onClick:this.handleClick},m),v||g,(a||b||w)&&k.a.createElement(L,null,b,w,a)):k.a.createElement(p,o()({},y,{role:"listitem",className:d,onClick:this.handleClick},m),b,w,a)}}]),t}(O.Component);g()(W,"handledProps",["active","as","children","className","content","description","disabled","header","icon","image","onClick","value"]),W.propTypes={},W.create=Object(N.f)(W,(function(e){return{content:e}}));var Q=W;function G(e){var t=e.children,n=e.className,r=e.content,i=Object(x.a)(G,e),a=Object(A.a)(G,e),u=T()(Object(C.a)("ul"!==a&&"ol"!==a,"list"),n);return k.a.createElement(a,o()({},i,{className:u}),I.b.isNil(t)?r:t)}
1G.handledProps=["as","children","className","content"],G.propTypes={};var K=G,H=function(e){function t(){var e,n;a()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=l()(this,(e=h()(t)).call.apply(e,[this].concat(o))),g()(d()(n),"handleItemOverrides",(function(e){return{onClick:function(t,r){_()(e,"onClick",t,r),_()(n.props,"onItemClick",t,r)}}})),n}return y()(t,e),s()(t,[{key:"render",value:function(){var e=this,n=this.props,r=n.animated,i=n.bulleted,a=n.celled,u=n.children,s=n.className,c=n.content,l=n.divided,f=n.floated,h=n.horizontal,p=n.inverted,d=n.items,m=n.link,y=n.ordered,v=n.relaxed,g=n.selection,b=n.size,E=n.verticalAlign,_=T()("ui",b,Object(C.a)(r,"animated"),Object(C.a)(i,"bulleted"),Object(C.a)(a,"celled"),Object(C.a)(l,"divided"),Object(C.a)(h,"horizontal"),Object(C.a)(p,"inverted"),Object(C.a)(m,"link"),Object(C.a)(y,"ordered"),Object(C.a)(g,"selection"),Object(C.b)(v,"relaxed"),Object(C.e)(f,"floated"),Object(C.f)(E),"list",s),S=Object(x.a)(t,this.props),O=Object(A.a)(t,this.props);return I.b.isNil(u)?I.b.isNil(c)?k.a.createElement(O,o()({role:"list",className:_},S),w()(d,(function(t){return Q.create(t,{overrideProps:e.handleItemOverrides})}))):k.a.createElement(O,o()({role:"list",className:_},S),c):k.a.createElement(O,o()({role:"list",className:_},S),u)}}]),t}(O.Component);g()(H,"Content",L),g()(H,"Description",P),g()(H,"Header",j),g()(H,"Icon",B),g()(H,"Item",Q),g()(H,"List",K),g()(H,"handledProps",["animated","as","bulleted","celled","children","className","content","divided","floated","horizontal","inverted","items","link","onItemClick","ordered","relaxed","selection","size","verticalAlign"]),H.propTypes={};t.a=H},function(e,t,n){"use strict";var r=n(3),o=n.n(r),i=n(14),a=n.n(i),u=n(9),s=n.n(u),c=n(10),l=n.n(c),f=n(11),h=n.n(f),p=n(8),d=n.n(p),m=n(2),y=n.n(m),v=n(12),g=n.n(v),b=n(1),w=n.n(b),E=n(6),_=n.n(E),S=n(191),T=n(227),O=n(72),k=function(e){return null!==e&&"object"===Object(O.a)(e)&&e.hasOwnProperty("current")},C={current:null},x=new WeakMap,A=function(e){if(null===e)return C;if(x.has(e))return x.get(e);var t={current:e};return x.set(e,t),t},I=n(460),N=n(4),D=n.n(N),P=(n(7),n(0)),R=n.n(P),j=n(187),M=n(23),L=n(92),U=n(93),F=n(5);function B(e){var t=e.className,n=e.children,r=e.content,i=D()("pushable",t),a=Object(L.a)(B,e),u=Object(U.a)(B,e);return R.a.createElement(u,o()({},a,{className:i}),F.b.isNil(n)?r:n)}B.handledProps=["as","children","className","content"],B.propTypes={};var q=B;function V(e){var t=e.className,n=e.dimmed,r=e.children,i=e.content,a=D()("pusher",Object(M.a)(n,"dimmed"),t),u=Object(L.a)(V,e),s=Object(U.a)(V,e);return R.a.createElement(s,o()({},u,{className:a}),F.b.isNil(r)?i:r)}V.handledProps=["as","children","className","content","dimmed"],V.propTypes={};var z=V,W=function(e){function t(e){var n;return s()(this,t),n=h()(this,d()(t).call(this,e)),w()(y()(n),"ref",Object(P.createRef)()),w()(y()(n),"handleAnimationStart",(function(){var e=n.props.visible?"onVisible":"onHide";clearTimeout(n.animationTimer),n.animationTimer=setTimeout(n.handleAnimationEnd,t.animationDuration),n.skipNextCallback?n.skipNextCallback=!1:_()(n.props,e,null,n.props)})),w()(y()(n),"handleAnimationEnd",(function(){var e=n.props.visible?"onShow":"onHidden";n.setState({animationTick:0}),_()(n.props,e,null,n.props)})),w()(y()(n),"handleDocumentClick",(function(e){Object(j.a)(n.ref.current,e)||(n.skipNextCallback=!0,_()(n.props,"onHide",e,a()({},n.props,{visible:!1})))})),n.state={animationTick:0,visible:e.visible},n}return g()(t,e),l()(t,[{key:"componentDidUpdate",value:function(e,t){this.state.animationTick>t.animationTick&&this.handleAnimationStart()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.animationTimer)}},{key:"render",value:function(){var e=this.props,n=e.animation,r=e.className,i=e.children,a=e.content,u=e.direction,s=e.target,c=e.visible,l=e.width,f=this.state.animationTick,h=D()("ui",n,u,l,Object(M.a)(f>0,"animating"),Object(M.a)(c,"visible"),"sidebar",r),p=Object(L.a)(t,this.props),d=Object(U.a)(t,this.props),m=k(s)?s:A(s);return R.a.createElement(I.a,{innerRef:this.ref},R.a.createElement(d,o()({},p,{className:h}),F.b.isNil(i)?a:i,c&&R.a.createElement(S.a,{listener:this.handleDocumentClick,targetRef
1:m,type:"click"})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=!!e.visible===!!t.visible?0:1;return{animationTick:t.animationTick+n,visible:e.visible}}}]),t}(P.Component);w()(W,"defaultProps",{direction:"left",target:T.documentRef,visible:!1}),w()(W,"animationDuration",500),w()(W,"autoControlledProps",["visible"]),w()(W,"Pushable",q),w()(W,"Pusher",z),w()(W,"handledProps",["animation","as","children","className","content","direction","onHidden","onHide","onShow","onVisible","target","visible","width"]),W.propTypes={};t.a=W},function(e,t,n){"use strict";var r=n(3),o=n.n(r),i=n(9),a=n.n(i),u=n(10),s=n.n(u),c=n(11),l=n.n(c),f=n(8),h=n.n(f),p=n(2),d=n.n(p),m=n(12),y=n.n(m),v=n(1),g=n.n(v),b=n(13),w=n.n(b),E=(n(37),n(4)),_=n.n(E),S=(n(7),n(0)),T=n.n(S),O=n(23),k=n(92),C=n(93),x=n(5),A=n(145),I=n(56);function N(e){var t=e.children,n=e.className,r=e.content,i=_()("content",n),a=Object(k.a)(N,e),u=Object(C.a)(N,e);return T.a.createElement(u,o()({},a,{className:i}),x.b.isNil(t)?r:t)}N.handledProps=["as","children","className","content"],N.propTypes={};var D=N;function P(e){var t=e.children,n=e.className,r=e.content,i=_()("header",n),a=Object(k.a)(P,e),u=Object(C.a)(P,e);return T.a.createElement(u,o()({},a,{className:i}),x.b.isNil(t)?r:t)}P.handledProps=["as","children","className","content"],P.propTypes={},P.create=Object(A.f)(P,(function(e){return{content:e}}));var R=P,j=n(27),M=n.n(j);function L(e){var t=e.children,n=e.className,r=e.content,i=_()("content",n),a=Object(k.a)(L,e),u=Object(C.a)(L,e);return T.a.createElement(u,o()({},a,{className:i}),x.b.isNil(t)?r:t)}L.handledProps=["as","children","className","content"],L.propTypes={},L.defaultProps={as:"li"},L.create=Object(A.f)(L,(function(e){return{content:e}}));var U=L;function F(e){var t=e.children,n=e.className,r=e.items,i=_()("list",n),a=Object(k.a)(F,e),u=Object(C.a)(F,e);return T.a.createElement(u,o()({},a,{className:i}),x.b.isNil(t)?M()(r,U.create):t)}F.handledProps=["as","children","className","items"],F.propTypes={},F.defaultProps={as:"ul"},F.create=Object(A.f)(F,(function(e){return{items:e}}));var B=F;n.d(t,"a",(function(){return q}));var q=function(e){function t(){var e,n;a()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=l()(this,(e=h()(t)).call.apply(e,[this].concat(o))),g()(d()(n),"handleDismiss",(function(e){var t=n.props.onDismiss;t&&t(e,n.props)})),n}return y()(t,e),s()(t,[{key:"render",value:function(){var e=this.props,n=e.attached,r=e.children,i=e.className,a=e.color,u=e.compact,s=e.content,c=e.error,l=e.floating,f=e.header,h=e.hidden,p=e.icon,d=e.info,m=e.list,y=e.negative,v=e.onDismiss,g=e.positive,b=e.size,E=e.success,S=e.visible,N=e.warning,P=_()("ui",a,b,Object(O.a)(u,"compact"),Object(O.a)(c,"error"),Object(O.a)(l,"floating"),Object(O.a)(h,"hidden"),Object(O.a)(p,"icon"),Object(O.a)(d,"info"),Object(O.a)(y,"negative"),Object(O.a)(g,"positive"),Object(O.a)(E,"success"),Object(O.a)(S,"visible"),Object(O.a)(N,"warning"),Object(O.b)(n,"attached"),"message",i),j=v&&T.a.createElement(I.a,{name:"close",onClick:this.handleDismiss}),M=Object(k.a)(t,this.props),L=Object(C.a)(t,this.props);return x.b.isNil(r)?T.a.createElement(L,o()({},M,{className:P}),j,I.a.create(p,{autoGenerateKey:!1}),(!w()(f)||!w()(s)||!w()(m))&&T.a.createElement(D,null,R.create(f,{autoGenerateKey:!1}),B.create(m,{autoGenerateKey:!1}),Object(A.d)(s,{autoGenerateKey:!1}))):T.a.createElement(L,o()({},M,{className:P}),j,r)}}]),t}(S.Component);g()(q,"Content",D),g()(q,"Header",R),g()(q,"List",B),g()(q,"Item",U),g()(q,"handledProps",["as","attached","children","className","color","compact","content","error","floating","header","hidden","icon","info","list","negative","onDismiss","positive","size","success","visible","warning"]),q.propTypes={}},function(e,t,n){"use strict";n(43);var r=n(3),o=n.n(r),i=n(9),a=n.n(i),u=n(10),s=n.n(u),c=n(11),l=n.n(c),f=n(8),h=n.n(f),p=n(2),d=n.n(p),m=n(12),y=n.n(m),v=n(1),g=n.n(v),b=n(6),w=n.n(b),E=n(13),_=n.n(E),S=n(460),T=n(4),O=n.n(T),k=(n(7),n(0)),C=n.n(k),x=n(5),A=n(23),I=n(92),N=n(93),D=n(145),P=n(56),R=n(116);function j(e){var t=e.children,n=e.className,r=e.content,i=e.hidden,a=e.visible,u=O()(Object(A.a)(a,"visible"),Object(A.a)(i,"hidden"),"content",n),s=Object(I.a)(j,e),c=Object(N.a)(j,e);return C.a.createElement(c,o()({},s,{className:u}),x.b.isNil(t)?r:t)}j.handledProps=["as","children","className","content","hidden","visible"],j.propTypes={};var M=j,L=n(27),U=n.n(L);function F(e){var t=e.attached,n=e.basic,r=e.buttons,i=e.children,a=e.className,u=e.color,s=e.compact,c=e.content,l=e.floated,f=e.fluid,h=e.icon,p=e.inverted,d=e.labeled,m=e.negative,y=e.positive,v=e.primary,g=e.secondary,b=e.size,w=e.toggle,E=e.vertical,S=e.widths,T=O()("ui",u,b,Object(A.a)(n,"basic"),Object(A.a)(s,"compact"),Object(A.a)(f,"fluid"),Object(A.a)(h,"icon"),Object(A.a)(p,"inverted"),Object(A.a)(d,"labeled"),Object(A.a)(m,"negative"),Object(A.a)(y,"positive"),Object(A.a)(v,"primary"),Object(A.a)(g,"secondary"),Object(A.a)(w,"toggle"),Object(A.a)(E,"vertical"),Object(A.b)(t,"attached"),Object(A.e)(l,"floated"),Object(A.g)(S),"buttons",a),k=Object(I.a)(F,e),D=Object(N.a)(F,e);return _()(r)?C.a.createElement(D,o()({}
1,k,{className:T}),x.b.isNil(i)?c:i):C.a.createElement(D,o()({},k,{className:T}),U()(r,(function(e){return W.create(e)})))}F.handledProps=["as","attached","basic","buttons","children","className","color","compact","content","floated","fluid","icon","inverted","labeled","negative","positive","primary","secondary","size","toggle","vertical","widths"],F.propTypes={};var B=F;function q(e){var t=e.className,n=e.text,r=O()("or",t),i=Object(I.a)(q,e),a=Object(N.a)(q,e);return C.a.createElement(a,o()({},i,{className:r,"data-text":n}))}q.handledProps=["as","className","text"],q.propTypes={};var V=q,z=function(e){function t(){var e,n;a()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=l()(this,(e=h()(t)).call.apply(e,[this].concat(o))),g()(d()(n),"ref",Object(k.createRef)()),g()(d()(n),"computeElementType",(function(){var e=n.props,t=e.attached,r=e.label;if(!_()(t)||!_()(r))return"div"})),g()(d()(n),"computeTabIndex",(function(e){var t=n.props,r=t.disabled,o=t.tabIndex;return _()(o)?r?-1:"div"===e?0:void 0:o})),g()(d()(n),"focus",(function(){return w()(n.ref.current,"focus")})),g()(d()(n),"handleClick",(function(e){n.props.disabled?e.preventDefault():w()(n.props,"onClick",e,n.props)})),g()(d()(n),"hasIconClass",(function(){var e=n.props,t=e.labelPosition,r=e.children,o=e.content,i=e.icon;return!0===i||i&&(t||x.b.isNil(r)&&_()(o))})),n}return y()(t,e),s()(t,[{key:"computeButtonAriaRole",value:function(e){var t=this.props.role;return _()(t)?"button"!==e?"button":void 0:t}},{key:"render",value:function(){var e=this.props,n=e.active,r=e.animated,i=e.attached,a=e.basic,u=e.children,s=e.circular,c=e.className,l=e.color,f=e.compact,h=e.content,p=e.disabled,d=e.floated,m=e.fluid,y=e.icon,v=e.inverted,g=e.label,b=e.labelPosition,w=e.loading,E=e.negative,T=e.positive,k=e.primary,D=e.secondary,j=e.size,M=e.toggle,L=O()(l,j,Object(A.a)(n,"active"),Object(A.a)(a,"basic"),Object(A.a)(s,"circular"),Object(A.a)(f,"compact"),Object(A.a)(m,"fluid"),Object(A.a)(this.hasIconClass(),"icon"),Object(A.a)(v,"inverted"),Object(A.a)(w,"loading"),Object(A.a)(E,"negative"),Object(A.a)(T,"positive"),Object(A.a)(k,"primary"),Object(A.a)(D,"secondary"),Object(A.a)(M,"toggle"),Object(A.b)(r,"animated"),Object(A.b)(i,"attached")),U=O()(Object(A.b)(b||!!g,"labeled")),F=O()(Object(A.a)(p,"disabled"),Object(A.e)(d,"floated")),B=Object(I.a)(t,this.props),q=Object(N.a)(t,this.props,this.computeElementType),V=this.computeTabIndex(q);if(!_()(g)){var z=O()("ui",L,"button",c),W=O()("ui",U,"button",c,F),Q=R.a.create(g,{defaultProps:{basic:!0,pointing:"left"===b?"right":"left"},autoGenerateKey:!1});return C.a.createElement(q,o()({},B,{className:W,onClick:this.handleClick}),"left"===b&&Q,C.a.createElement(S.a,{innerRef:this.ref},C.a.createElement("button",{className:z,"aria-pressed":M?!!n:void 0,disabled:p,tabIndex:V},P.a.create(y,{autoGenerateKey:!1})," ",h)),("right"===b||!b)&&Q)}var G=O()("ui",L,F,U,"button",c),K=!x.b.isNil(u),H=this.computeButtonAriaRole(q);return C.a.createElement(S.a,{innerRef:this.ref},C.a.createElement(q,o()({},B,{className:G,"aria-pressed":M?!!n:void 0,disabled:p&&"button"===q||void 0,onClick:this.handleClick,role:H,tabIndex:V}),K&&u,!K&&P.a.create(y,{autoGenerateKey:!1}),!K&&h))}}]),t}(k.Component);g()(z,"defaultProps",{as:"button"}),g()(z,"Content",M),g()(z,"Group",B),g()(z,"Or",V),g()(z,"handledProps",["active","animated","as","attached","basic","children","circular","className","color","compact","content","disabled","floated","fluid","icon","inverted","label","labelPosition","loading","negative","onClick","positive","primary","role","secondary","size","tabIndex","toggle"]),z.propTypes={},z.create=Object(D.f)(z,(function(e){return{content:e}}));var W=t.a=z},function(e,t,n){"use strict";var r=n(3),o=n.n(r),i=n(9),a=n.n(i),u=n(10),s=n.n(u),c=n(11),l=n.n(c),f=n(8),h=n.n(f),p=n(2),d=n.n(p),m=n(12),y=n.n(m),v=n(1),g=n.n(v),b=n(27),w=n.n(b),E=n(6),_=n.n(E),S=(n(37),n(4)),T=n.n(S),O=(n(7),n(0)),k=n.n(O),C=n(23),x=n(92),A=n(93),I=n(5),N=n(188),D=n(145);function P(e){var t=e.children,n=e.className,r=e.content,i=T()("header",n),a=Object(x.a)(P,e),u=Object(A.a)(P,e);return k.a.createElement(u,o()({},a,{className:i}),I.b.isNil(t)?r:t)}
1P.handledProps=["as","children","className","content"],P.propTypes={};var R=P,j=n(228),M=n.n(j),L=n(56),U=function(e){function t(){var e,n;a()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=l()(this,(e=h()(t)).call.apply(e,[this].concat(o))),g()(d()(n),"handleClick",(function(e){n.props.disabled||_()(n.props,"onClick",e,n.props)})),n}return y()(t,e),s()(t,[{key:"render",value:function(){var e=this.props,n=e.active,r=e.children,i=e.className,a=e.color,u=e.content,s=e.disabled,c=e.fitted,l=e.header,f=e.icon,h=e.link,p=e.name,d=e.onClick,m=e.position,y=T()(a,m,Object(C.a)(n,"active"),Object(C.a)(s,"disabled"),Object(C.a)(!0===f||f&&!(p||u),"icon"),Object(C.a)(l,"header"),Object(C.a)(h,"link"),Object(C.b)(c,"fitted"),"item",i),v=Object(A.a)(t,this.props,(function(){if(d)return"a"})),g=Object(x.a)(t,this.props);return I.b.isNil(r)?k.a.createElement(v,o()({},g,{className:y,onClick:this.handleClick}),L.a.create(f,{autoGenerateKey:!1}),I.b.isNil(u)?M()(p):u):k.a.createElement(v,o()({},g,{className:y,onClick:this.handleClick}),r)}}]),t}(O.Component);function F(e){var t=e.children,n=e.className,r=e.content,i=e.position,a=T()(i,"menu",n),u=Object(x.a)(F,e),s=Object(A.a)(F,e);return k.a.createElement(s,o()({},u,{className:a}),I.b.isNil(t)?r:t)}g()(U,"handledProps",["active","as","children","className","color","content","disabled","fitted","header","icon","index","link","name","onClick","position"]),U.propTypes={},U.create=Object(D.f)(U,(function(e){return{content:e,name:e}})),F.handledProps=["as","children","className","content","position"],F.propTypes={};var B=F,q=function(e){function t(){var e,n;a()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=l()(this,(e=h()(t)).call.apply(e,[this].concat(o))),g()(d()(n),"handleItemOverrides",(function(e){return{onClick:function(t,r){var o=r.index;n.trySetState({activeIndex:o}),_()(e,"onClick",t,r),_()(n.props,"onItemClick",t,r)}}})),n}return y()(t,e),s()(t,[{key:"renderItems",value:function(){var e=this,t=this.props.items,n=this.state.activeIndex;return w()(t,(function(t,r){return U.create(t,{defaultProps:{active:parseInt(n,10)===r,index:r},overrideProps:e.handleItemOverrides})}))}},{key:"render",value:function(){var e=this.props,n=e.attached,r=e.borderless,i=e.children,a=e.className,u=e.color,s=e.compact,c=e.fixed,l=e.floated,f=e.fluid,h=e.icon,p=e.inverted,d=e.pagination,m=e.pointing,y=e.secondary,v=e.size,g=e.stackable,b=e.tabular,w=e.text,E=e.vertical,_=e.widths,S=T()("ui",u,v,Object(C.a)(r,"borderless"),Object(C.a)(s,"compact"),Object(C.a)(f,"fluid"),Object(C.a)(p,"inverted"),Object(C.a)(d,"pagination"),Object(C.a)(m,"pointing"),Object(C.a)(y,"secondary"),Object(C.a)(g,"stackable"),Object(C.a)(w,"text"),Object(C.a)(E,"vertical"),Object(C.b)(n,"attached"),Object(C.b)(l,"floated"),Object(C.b)(h,"icon"),Object(C.b)(b,"tabular"),Object(C.e)(c,"fixed"),Object(C.g)(_,"item"),a,"menu"),O=Object(x.a)(t,this.props),N=Object(A.a)(t,this.props);return k.a.createElement(N,o()({},O,{className:S}),I.b.isNil(i)?this.renderItems():i)}}]),t}(N.a);g()(q,"autoControlledProps",["activeIndex"]),g()(q,"Header",R),g()(q,"Item",U),g()(q,"Menu",B),g()(q,"handledProps",["activeIndex","as","attached","borderless","children","className","color","compact","defaultActiveIndex","fixed","floated","fluid","icon","inverted","items","onItemClick","pagination","pointing","secondary","size","stackable","tabular","text","vertical","widths"]),q.propTypes={},q.create=Object(D.f)(q,(function(e){return{items:e}}));t.a=q},function(e,t,n){"use strict";n(43);var r=n(3),o=n.n(r),i=n(4),a=n.n(i),u=(n(7),n(0)),s=n.n(u),c=n(23),l=n(92),f=n(93),h=n(145);function p(e){var t=e.children,n=e.className,r=e.computer,i=e.color,u=e.floated,h=e.largeScreen,d=e.mobile,m=e.only,y=e.stretched,v=e.tablet,g=e.textAlign,b=e.verticalAlign,w=e.widescreen,E=e.width,_=a()(i,Object(c.a)(y,"stretched"),Object(c.c)(m,"only"),Object(c.d)(g),Object(c.e)(u,"floated"),Object(c.f)(b),Object(c.g)(r,"wide computer"),Object(c.g)(h,"wide large screen"),Object(c.g)(d,"wide mobile"),Object(c.g)(v,"wide tablet"),Object(c.g)(w,"wide widescreen"),Object(c.g)(E,"wide"),"column",n),S=Object(l.a)(p,e),T=Object(f.a)(p,e);return s.a.createElement(T,o()({},S,{className:_}),t)}p.handledProps=["as","children","className","color","computer","floated","largeScreen","mobile","only","stretched","tablet","textAlign","verticalAlign","widescreen","width"],p.propTypes={},p.create=Object(h.f)(p,(function(e){return{children:e}}));var d=p;function m(e){var t=e.centered,n=e.children,r=e.className,i=e.color,u=e.columns,h=e.divi
vendor: 4,202 bytes, line 1
1ded,p=e.only,d=e.reversed,y=e.stretched,v=e.textAlign,g=e.verticalAlign,b=a()(i,Object(c.a)(t,"centered"),Object(c.a)(h,"divided"),Object(c.a)(y,"stretched"),Object(c.c)(p,"only"),Object(c.c)(d,"reversed"),Object(c.d)(v),Object(c.f)(g),Object(c.g)(u,"column",!0),"row",r),w=Object(l.a)(m,e),E=Object(f.a)(m,e);return s.a.createElement(E,o()({},w,{className:b}),n)}m.handledProps=["as","centered","children","className","color","columns","divided","only","reversed","stretched","textAlign","verticalAlign"],m.propTypes={};var y=m;function v(e){var t=e.celled,n=e.centered,r=e.children,i=e.className,u=e.columns,h=e.container,p=e.divided,d=e.doubling,m=e.inverted,y=e.padded,g=e.relaxed,b=e.reversed,w=e.stackable,E=e.stretched,_=e.textAlign,S=e.verticalAlign,T=a()("ui",Object(c.a)(n,"centered"),Object(c.a)(h,"container"),Object(c.a)(d,"doubling"),Object(c.a)(m,"inverted"),Object(c.a)(w,"stackable"),Object(c.a)(E,"stretched"),Object(c.b)(t,"celled"),Object(c.b)(p,"divided"),Object(c.b)(y,"padded"),Object(c.b)(g,"relaxed"),Object(c.c)(b,"reversed"),Object(c.d)(_),Object(c.f)(S),Object(c.g)(u,"column",!0),"grid",i),O=Object(l.a)(v,e),k=Object(f.a)(v,e);return s.a.createElement(k,o()({},O,{className:T}),r)}v.handledProps=["as","celled","centered","children","className","columns","container","divided","doubling","inverted","padded","relaxed","reversed","stackable","stretched","textAlign","verticalAlign"],v.Column=d,v.Row=y,v.propTypes={};t.a=v},function(e,t,n){"use strict";var r=n(3),o=n.n(r),i=(n(37),n(4)),a=n.n(i),u=(n(7),n(0)),s=n.n(u),c=n(23),l=n(92),f=n(93),h=n(5);function p(e){var t=e.children,n=e.className,r=e.compact,i=e.content,u=e.horizontal,d=e.piled,m=e.raised,y=e.size,v=e.stacked,g=a()("ui",y,Object(c.a)(r,"compact"),Object(c.a)(u,"horizontal"),Object(c.a)(d,"piled"),Object(c.a)(m,"raised"),Object(c.a)(v,"stacked"),"segments",n),b=Object(l.a)(p,e),w=Object(f.a)(p,e);return s.a.createElement(w,o()({},b,{className:g}),h.b.isNil(t)?i:t)}p.handledProps=["as","children","className","compact","content","horizontal","piled","raised","size","stacked"],p.propTypes={};var d=p;function m(e){var t=e.children,n=e.className,r=e.content,i=a()("inline",n),u=Object(l.a)(m,e),c=Object(f.a)(m,e);return s.a.createElement(c,o()({},u,{className:i}),h.b.isNil(t)?r:t)}m.handledProps=["as","children","className","content"],m.propTypes={};var y=m;function v(e){var t=e.attached,n=e.basic,r=e.children,i=e.circular,u=e.className,p=e.clearing,d=e.color,m=e.compact,y=e.content,g=e.disabled,b=e.floated,w=e.inverted,E=e.loading,_=e.placeholder,S=e.padded,T=e.piled,O=e.raised,k=e.secondary,C=e.size,x=e.stacked,A=e.tertiary,I=e.textAlign,N=e.vertical,D=a()("ui",d,C,Object(c.a)(n,"basic"),Object(c.a)(i,"circular"),Object(c.a)(p,"clearing"),Object(c.a)(m,"compact"),Object(c.a)(g,"disabled"),Object(c.a)(w,"inverted"),Object(c.a)(E,"loading"),Object(c.a)(_,"placeholder"),Object(c.a)(T,"piled"),Object(c.a)(O,"raised"),Object(c.a)(k,"secondary"),Object(c.a)(x,"stacked"),Object(c.a)(A,"tertiary"),Object(c.a)(N,"vertical"),Object(c.b)(t,"attached"),Object(c.b)(S,"padded"),Object(c.d)(I),Object(c.e)(b,"floated"),"segment",u),P=Object(l.a)(v,e),R=Object(f.a)(v,e);return s.a.createElement(R,o()({},P,{className:D}),h.b.isNil(r)?y:r)}v.handledProps=["as","attached","basic","children","circular","className","clearing","color","compact","content","disabled","floated","inverted","loading","padded","piled","placeholder","raised","secondary","size","stacked","tertiary","textAlign","vertical"],v.Group=d,v.Inline=y,v.propTypes={};t.a=v},function(e,t,n){"use strict";var r=n(3),o=n.n(r),i=(n(37),n(4)),a=n.n(i),u=(n(7),n(0)),s=n.n(u),c=n(23),l=n(92),f=n(93),h=n(5),p=n(56),d=n(244),m=n(145);function y(e){var t=e.children,n=e.className,r=e.content,i=a()("sub header",n),u=Object(l.a)(y,e),c=Object(f.a)(y,e);return s.a.createElement(c,o()({},u,{className:i}),h.b.isNil(t)?r:t)}y.handledProps=["as","children","className","content"],y.propTypes={},y.create=Object(m.f)(y,(function(e){return{content:e}}));var v=y;function g(e){var t=e.children,n=e.className,r=e.content,i=a()("content",n),u=Object(l.a)(g,e),c=Object(f.a)(g,e);return s.a.createElement(c,o()({},u,{className:i}),h.b.isNil(t)?r:t)}
1g.handledProps=["as","children","className","content"],g.propTypes={};var b=g;function w(e){var t=e.attached,n=e.block,r=e.children,i=e.className,u=e.color,m=e.content,y=e.disabled,g=e.dividing,E=e.floated,_=e.icon,S=e.image,T=e.inverted,O=e.size,k=e.sub,C=e.subheader,x=e.textAlign,A=a()("ui",u,O,Object(c.a)(n,"block"),Object(c.a)(y,"disabled"),Object(c.a)(g,"dividing"),Object(c.e)(E,"floated"),Object(c.a)(!0===_,"icon"),Object(c.a)(!0===S,"image"),Object(c.a)(T,"inverted"),Object(c.a)(k,"sub"),Object(c.b)(t,"attached"),Object(c.d)(x),"header",i),I=Object(l.a)(w,e),N=Object(f.a)(w,e);if(!h.b.isNil(r))return s.a.createElement(N,o()({},I,{className:A}),r);var D=p.a.create(_,{autoGenerateKey:!1}),P=d.a.create(S,{autoGenerateKey:!1}),R=v.create(C,{autoGenerateKey:!1});return D||P?s.a.createElement(N,o()({},I,{className:A}),D||P,(m||R)&&s.a.createElement(b,null,m,R)):s.a.createElement(N,o()({},I,{className:A}),m,R)}w.handledProps=["as","attached","block","children","className","color","content","disabled","dividing","floated","icon","image","inverted","size","sub","subheader","textAlign"],w.propTypes={},w.Content=b,w.Subheader=v;t.a=w},function(e,t,n){"use strict";var r=n(14),o=n.n(r),i=n(9),a=n.n(i),u=n(10),s=n.n(u),c=n(11),l=n.n(c),f=n(8),h=n.n(f),p=n(2),d=n.n(p),m=n(12),y=n.n(m),v=n(1),g=n.n(v),b=n(34),w=n.n(b),E=n(13),_=n.n(E),S=n(21),T=n.n(S),O=n(6),k=n.n(O),C=n(4),x=n.n(C),A=(n(7),n(0)),I=n.n(A),N=n(198),D=n(5),P=n(23),R=n(90),j=n.n(R),M=n(51),L=n.n(M),U=n(45),F=n.n(U),B=n(238),q=n.n(B),V=n(143),z=n(93),W=n(92),Q=function(e){function t(){var e,n;a()(this,t);for(var r=arguments.length,i=new Array(r),u=0;u<r;u++)i[u]=arguments[u];n=l()(this,(e=h()(t)).call.apply(e,[this].concat(i))),g()(d()(n),"handleOnHide",(function(e,t){var r=t.reactKey;n.setState((function(e){var t=o()({},e.children);return delete t[r],{children:t}}))})),g()(d()(n),"wrapChild",(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.props,o=r.animation,i=r.directional,a=r.duration,u=e.key,s=t.visible,c=void 0===s||s,l=t.transitionOnMount,f=void 0!==l&&l;return I.a.createElement(K,{animation:o,directional:i,duration:a,key:u,onHide:n.handleOnHide,reactKey:u,transitionOnMount:f,visible:c},e)}));var s=n.props.children;return n.state={children:q()(Object(V.a)(s),(function(e){return n.wrapChild(e)}))},n}return y()(t,e),s()(t,[{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=this,n=this.state.children,r=Object(V.a)(e.children),o=Object(V.b)(n,r);F()(o,(function(e,i){var a=L()(n,i),u=L()(r,i),s=n[i],c=!T()(s,"props.visible");if(!u||a&&!c)if(u||!a||c){var l=s.props,f=l.visible,h=l.transitionOnMount;o[i]=t.wrapChild(e,{transitionOnMount:h,visible:f})}else o[i]=Object(A.cloneElement)(s,{visible:!1});else o[i]=t.wrapChild(e,{transitionOnMount:!0})})),this.setState({children:o})}},{key:"render",value:function(){var e=this.state.children,n=Object(z.a)(t,this.props),r=Object(W.a)(t,this.props);return I.a.createElement(n,r,j()(e))}}]),t}(I.a.Component);g()(Q,"defaultProps",{as:A.Fragment,animation:"fade",duration:500}),g()(Q,"handledProps",["animation","as","children","directional","duration"]),Q.propTypes={},n.d(t,"a",(function(){return K}));var G={ENTERING:"show",EXITING:"hide"},K=function(e){function t(){var e,n;a()(this,t);for(var r=arguments.length,i=new Array(r),u=0;u<r;u++)i[u]=arguments[u];n=l()(this,(e=h()(t)).call.apply(e,[this].concat(i))),g()(d()(n),"handleStart",(function(){var e=n.props.duration,t=n.nextStatus;n.nextStatus=null,n.setState({status:t,animating:!0},(function(){var r=G[t],i=Object(N.a)(e,r);k()(n.props,"onStart",null,o()({},n.props,{status:t})),n.timeoutId=setTimeout(n.handleComplete,i)}))})),g()(d()(n),"handleComplete",(function(){var e=n.state.status;if(k()(n.props,"onComplete",null,o()({},n.props,{status:e})),n.nextStatus)n.handleStart();else{var r=n.computeCompletedStatus(),i=e===t.ENTERING?"onShow":"onHide";n.setState({status:r,animating:!1},(function(){k()(n.props,i,null,o()({},n.props,{status:r}))}))}})),g()(d()(n),"updateStatus",(function(){var e=n.state.animating;n.nextStatus&&(n.nextStatus=n.computeNextStatus(),e||n.handleStart())})),g()(d()(n),"computeClasses",(function(){var e=n.props,r=e.animation,o=e.directional,i=e.children,a=n.state,u=a.animating,s=a.status,c=T()(i,"props.className");return(_()(o)?w()(D.a.DIRECTIONAL_TRANSITIONS,r):o)?x()(r,c,Object(P.a)(u,"animating"),Object(P.a)(s===t.ENTERING,"in"),Object(P.a)(s===t.EXITING,"out"),Object(P.a)(s===t.EXITED,"hidden"),Object(P.a)(s!==t.EXITED,"visible"),"transition"):x()(r,c,Object(P.a)(u,"animating transition"))})),g()(d()(n),"computeCompletedStatus",(function(){var e=n.props.unmountOnHide;return n.state.status===t.ENTERING?t.ENTERED:e?t.UNMOUNTED:t.EXITED})),g()(d()(n),"computeInitialStatuses",(function(){var e=n.props,r=e.visible,o=e.mountOnShow,i=e.transitionOnMount,a=e.unmountOnHide;return r?i?{initial:t.EXITED,next:t.ENTERING}:{initial:t.ENTERED}:o||a?{initial:t.UNMOUNTED}:{initial:t.EXITED}})),g()(d()(n),"computeNextStatus",(function(){var e=n.state,r=e.animating,o=e.status;return r?o===t.ENTERING?t.EXITING:t.ENTERING:o===t.ENTERED?t.EXITING:t.ENTERING})),g()(d()(n),"computeStatuses",(function(e){var r=n.state.status;return e.visible?{current:r===t.UNMOUNTED&&t.EXITED,next:r!==t.ENTERING&&r!==t.ENTERED&&t.ENTERING}:{next:(r===t.ENTERING||r===t.ENTERED)&&t.EXITING}})),g()(d()(n),"computeStyle",(function(){var e=n.props,t=e.children,r=e.duration,i=n.state.status,a=T()(t,"props.style"),u=G[i],s=u&&"".concat(Object(N.a)(r,u),"ms");return o()({},a,{animationDuration:s})}));var s=n.computeInitialStatuses(),c=s.initial,f=s.next;return n.nextStatus=f,n.state={status:c},n}
1return y()(t,e),s()(t,[{key:"componentDidMount",value:function(){this.updateStatus()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=this.computeStatuses(e),n=t.current,r=t.next;this.nextStatus=r,n&&this.setState({status:n})}},{key:"componentDidUpdate",value:function(){this.updateStatus()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timeoutId)}},{key:"render",value:function(){var e=this.props.children;return this.state.status===t.UNMOUNTED?null:Object(A.cloneElement)(e,{className:this.computeClasses(),style:this.computeStyle()})}}]),t}(A.Component);g()(K,"defaultProps",{animation:"fade",duration:500,visible:!0,mountOnShow:!0,transitionOnMount:!1,unmountOnHide:!1}),g()(K,"ENTERED","ENTERED"),g()(K,"ENTERING","ENTERING"),g()(K,"EXITED","EXITED"),g()(K,"EXITING","EXITING"),g()(K,"UNMOUNTED","UNMOUNTED"),g()(K,"Group",Q),g()(K,"handledProps",["animation","children","directional","duration","mountOnShow","onComplete","onHide","onShow","onStart","reactKey","transitionOnMount","unmountOnHide","visible"]),K.propTypes={}}]]); 2//# sourceMappingURL=2.b594ff37.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.