2 lines
539 KiB
JavaScript
2 lines
539 KiB
JavaScript
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Webapp=e()}}(function(){return function(){return function e(t,n,r){function i(o,s){if(!n[o]){if(!t[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(a)return a(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[o]={exports:{}};t[o][0].call(u.exports,function(e){return i(t[o][1][e]||e)},u,u.exports,e,t,n,r)}return n[o].exports}for(var a="function"==typeof require&&require,o=0;o<r.length;o++)i(r[o]);return i}}()({1:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("@firebase/util"),i=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a="[DEFAULT]",o=[],s=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_=r.deepCopy(e),this.INTERNAL={getUid:function(){return null},getToken:function(){return Promise.resolve(null)},addAuthTokenListener:function(e){o.push(e),setTimeout(function(){return e(null)},0)},removeAuthTokenListener:function(e){o=o.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_);var t=[];return Object.keys(e.services_).forEach(function(n){Object.keys(e.services_[n]).forEach(function(r){t.push(e.services_[n][r])})}),Promise.all(t.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=a),this.checkDestroyed_(),this.services_[e]||(this.services_[e]={}),!this.services_[e][t]){var n=t!==a?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.extendApp=function(e){var t=this;r.deepExtend(this,e),e.INTERNAL&&e.INTERNAL.addAuthTokenListener&&(o.forEach(function(e){t.INTERNAL.addAuthTokenListener(e)}),o=[])},e.prototype.checkDestroyed_=function(){this.isDeleted_&&l("app-deleted",{name:this.name_})},e}();function l(e,t){throw c.create(e,t)}s.prototype.name&&s.prototype.options||s.prototype.delete||console.log("dc");var c=new r.ErrorFactory("app","Firebase",{"no-app":"No Firebase App '{$name}' has been created - call Firebase App.initializeApp()","bad-app-name":"Illegal App name: '{$name}","duplicate-app":"Firebase App named '{$name}' already exists","app-deleted":"Firebase App named '{$name}' already deleted","duplicate-service":"Firebase service named '{$name}' already registered","sa-not-supported":"Initializing the Firebase SDK with a service account is only allowed in a Node.js environment. On client devices, you should instead initialize the SDK with an api key and auth domain","invalid-app-argument":"firebase.{$name}() takes either no argument or a Firebase App instance."}),u=function e(){var t={},n={},o={},c={__esModule:!0,initializeApp:function(e,n){if(void 0===n&&(n={}),"object"!=typeof n||null===n){var r=n;n={name:r}}var o=n;void 0===o.name&&(o.name=a);var u=o.name;"string"==typeof u&&u||l("bad-app-name",{name:u+""}),i(t,u)&&l("duplicate-app",{name:u});var d=new s(e,o,c);return t[u]=d,p(d,"create"),d},app:u,apps:null,Promise:Promise,SDK_VERSION:"5.5.0",INTERNAL:{registerService:function(e,t,i,a,p){n[e]&&l("duplicate-service",{name:e}),n[e]=t,a&&(o[e]=a,d().forEach(function(e){a("create",e)}));var h=function(t){return void 0===t&&(t=u()),"function"!=typeof t[e]&&l("invalid-app-argument",{name:e}),t[e]()};return void 0!==i&&r.deepExtend(h,i),c[e]=h,s.prototype[e]=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return this._getService.bind(this,e).apply(this,p?t:[])},h},createFirebaseNamespace:e,extendNamespace:function(e){r.deepExtend(c,e)},createSubscribe:r.createSubscribe,ErrorFactory:r.ErrorFactory,removeApp:function(e){p(t[e],"delete"),delete t[e]},factories:n,useAsService:h,Promise:Promise,deepExtend:r.deepExtend}};function u(e){return i(t,e=e||a)||l("no-app",{name:e}),t[e]}function d(){return Object.keys(t).map(function(e){return t[e]})}function p(e,t){Object.keys(n).forEach(function(n){var r=h(e,n);null!==r&&o[r]&&o[r](t,e)})}function h(e,t){if("serverAuth"===t)return null;var n=t;return e.options,n}return r.patchProperty(c,"default",c),Object.defineProperty(c,"apps",{get:d}),r.patchProperty(u,"App",s),c}();n.firebase=u,n.default=u},{"@firebase/util":4}],2:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i,a,o,s=e("@firebase/util"),l=e("tslib"),c=(r=e("@firebase/app"))&&"object"==typeof r&&"default"in r?r.default:r,u={AVAILABLE_IN_WINDOW:"only-available-in-window",AVAILABLE_IN_SW:"only-available-in-sw",SHOULD_BE_INHERITED:"should-be-overriden",BAD_SENDER_ID:"bad-sender-id",INCORRECT_GCM_SENDER_ID:"incorrect-gcm-sender-id",PERMISSION_DEFAULT:"permission-default",PERMISSION_BLOCKED:"permission-blocked",UNSUPPORTED_BROWSER:"unsupported-browser",NOTIFICATIONS_BLOCKED:"notifications-blocked",FAILED_DEFAULT_REGISTRATION:"failed-serviceworker-registration",SW_REGISTRATION_EXPECTED:"sw-registration-expected",GET_SUBSCRIPTION_FAILED:"get-subscription-failed",INVALID_SAVED_TOKEN:"invalid-saved-token",SW_REG_REDUNDANT:"sw-reg-redundant",TOKEN_SUBSCRIBE_FAILED:"token-subscribe-failed",TOKEN_SUBSCRIBE_NO_TOKEN:"token-subscribe-no-token",TOKEN_SUBSCRIBE_NO_PUSH_SET:"token-subscribe-no-push-set",TOKEN_UNSUBSCRIBE_FAILED:"token-unsubscribe-failed",TOKEN_UPDATE_FAILED:"token-update-failed",TOKEN_UPDATE_NO_TOKEN:"token-update-no-token",USE_SW_BEFORE_GET_TOKEN:"use-sw-before-get-token",INVALID_DELETE_TOKEN:"invalid-delete-token",DELETE_TOKEN_NOT_FOUND:"delete-token-not-found",DELETE_SCOPE_NOT_FOUND:"delete-scope-not-found",BG_HANDLER_FUNCTION_EXPECTED:"bg-handler-function-expected",NO_WINDOW_CLIENT_TO_MSG:"no-window-client-to-msg",UNABLE_TO_RESUBSCRIBE:"unable-to-resubscribe",NO_FCM_TOKEN_FOR_RESUBSCRIBE:"no-fcm-token-for-resubscribe",FAILED_TO_DELETE_TOKEN:"failed-to-delete-token",NO_SW_IN_REG:"no-sw-in-reg",BAD_SCOPE:"bad-scope",BAD_VAPID_KEY:"bad-vapid-key",BAD_SUBSCRIPTION:"bad-subscription",BAD_TOKEN:"bad-token",BAD_PUSH_SET:"bad-push-set",FAILED_DELETE_VAPID_KEY:"failed-delete-vapid-key",INVALID_PUBLIC_VAPID_KEY:"invalid-public-vapid-key",USE_PUBLIC_KEY_BEFORE_GET_TOKEN:"use-public-key-before-get-token",PUBLIC_KEY_DECRYPTION_FAILED:"public-vapid-key-decryption-failed"},d=((i={})[u.AVAILABLE_IN_WINDOW]="This method is available in a Window context.",i[u.AVAILABLE_IN_SW]="This method is available in a service worker context.",i[u.SHOULD_BE_INHERITED]="This method should be overriden by extended classes.",i[u.BAD_SENDER_ID]="Please ensure that 'messagingSenderId' is set correctly in the options passed into firebase.initializeApp().",i[u.PERMISSION_DEFAULT]="The required permissions were not granted and dismissed instead.",i[u.PERMISSION_BLOCKED]="The required permissions were not granted and blocked instead.",i[u.UNSUPPORTED_BROWSER]="This browser doesn't support the API's required to use the firebase SDK.",i[u.NOTIFICATIONS_BLOCKED]="Notifications have been blocked.",i[u.FAILED_DEFAULT_REGISTRATION]="We are unable to register the default service worker. {$browserErrorMessage}",i[u.SW_REGISTRATION_EXPECTED]="A service worker registration was the expected input.",i[u.GET_SUBSCRIPTION_FAILED]="There was an error when trying to get any existing Push Subscriptions.",i[u.INVALID_SAVED_TOKEN]="Unable to access details of the saved token.",i[u.SW_REG_REDUNDANT]="The service worker being used for push was made redundant.",i[u.TOKEN_SUBSCRIBE_FAILED]="A problem occured while subscribing the user to FCM: {$message}",i[u.TOKEN_SUBSCRIBE_NO_TOKEN]="FCM returned no token when subscribing the user to push.",i[u.TOKEN_SUBSCRIBE_NO_PUSH_SET]="FCM returned an invalid response when getting an FCM token.",i[u.TOKEN_UNSUBSCRIBE_FAILED]="A problem occured while unsubscribing the user from FCM: {$message}",i[u.TOKEN_UPDATE_FAILED]="A problem occured while updating the user from FCM: {$message}",i[u.TOKEN_UPDATE_NO_TOKEN]="FCM returned no token when updating the user to push.",i[u.USE_SW_BEFORE_GET_TOKEN]="The useServiceWorker() method may only be called once and must be called before calling getToken() to ensure your service worker is used.",i[u.INVALID_DELETE_TOKEN]="You must pass a valid token into deleteToken(), i.e. the token from getToken().",i[u.DELETE_TOKEN_NOT_FOUND]="The deletion attempt for token could not be performed as the token was not found.",i[u.DELETE_SCOPE_NOT_FOUND]="The deletion attempt for service worker scope could not be performed as the scope was not found.",i[u.BG_HANDLER_FUNCTION_EXPECTED]="The input to setBackgroundMessageHandler() must be a function.",i[u.NO_WINDOW_CLIENT_TO_MSG]="An attempt was made to message a non-existant window client.",i[u.UNABLE_TO_RESUBSCRIBE]="There was an error while re-subscribing the FCM token for push messaging. Will have to resubscribe the user on next visit. {$message}",i[u.NO_FCM_TOKEN_FOR_RESUBSCRIBE]="Could not find an FCM token and as a result, unable to resubscribe. Will have to resubscribe the user on next visit.",i[u.FAILED_TO_DELETE_TOKEN]="Unable to delete the currently saved token.",i[u.NO_SW_IN_REG]="Even though the service worker registration was successful, there was a problem accessing the service worker itself.",i[u.INCORRECT_GCM_SENDER_ID]="Please change your web app manifest's 'gcm_sender_id' value to '103953800507' to use Firebase messaging.",i[u.BAD_SCOPE]="The service worker scope must be a string with at least one character.",i[u.BAD_VAPID_KEY]="The public VAPID key is not a Uint8Array with 65 bytes.",i[u.BAD_SUBSCRIPTION]="The subscription must be a valid PushSubscription.",i[u.BAD_TOKEN]="The FCM Token used for storage / lookup was not a valid token string.",i[u.BAD_PUSH_SET]="The FCM push set used for storage / lookup was not not a valid push set string.",i[u.FAILED_DELETE_VAPID_KEY]="The VAPID key could not be deleted.",i[u.INVALID_PUBLIC_VAPID_KEY]="The public VAPID key must be a string.",i[u.PUBLIC_KEY_DECRYPTION_FAILED]="The public VAPID key did not equal 65 bytes when decrypted.",i),p=new s.ErrorFactory("messaging","Messaging",d),h=new Uint8Array([4,51,148,247,223,161,235,177,220,3,162,94,21,113,219,72,211,46,237,237,178,52,219,183,71,58,12,143,196,204,225,111,60,140,132,223,171,182,102,62,242,12,212,139,254,227,249,118,47,20,28,99,8,106,111,45,177,26,149,176,206,55,192,156,110]),f="https://fcm.googleapis.com";function m(e,t){if(null==e||null==t)return!1;if(e===t)return!0;if(e.byteLength!==t.byteLength)return!1;for(var n=new DataView(e),r=new DataView(t),i=0;i<e.byteLength;i++)if(n.getUint8(i)!==r.getUint8(i))return!1;return!0}function g(e){return function(e){var t=new Uint8Array(e);return btoa(String.fromCharCode.apply(null,t))}(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}!function(e){e.TYPE_OF_MSG="firebase-messaging-msg-type",e.DATA="firebase-messaging-msg-data"}(a||(a={})),function(e){e.PUSH_MSG_RECEIVED="push-msg-received",e.NOTIFICATION_CLICKED="notification-clicked"}(o||(o={}));var v=function(){function e(){}return e.prototype.getToken=function(e,t,n){return l.__awaiter(this,void 0,void 0,function(){var r,i,a,o,s,c,d,v;return l.__generator(this,function(l){switch(l.label){case 0:r=g(t.getKey("p256dh")),i=g(t.getKey("auth")),a="authorized_entity="+e+"&endpoint="+t.endpoint+"&encryption_key="+r+"&encryption_auth="+i,m(n.buffer,h.buffer)||(o=g(n),a+="&application_pub_key="+o),(s=new Headers).append("Content-Type","application/x-www-form-urlencoded"),c={method:"POST",headers:s,body:a},l.label=1;case 1:return l.trys.push([1,4,,5]),[4,fetch(f+"/fcm/connect/subscribe",c)];case 2:return[4,l.sent().json()];case 3:return d=l.sent(),[3,5];case 4:throw l.sent(),p.create(u.TOKEN_SUBSCRIBE_FAILED);case 5:if(d.error)throw v=d.error.message,p.create(u.TOKEN_SUBSCRIBE_FAILED,{message:v});if(!d.token)throw p.create(u.TOKEN_SUBSCRIBE_NO_TOKEN);if(!d.pushSet)throw p.create(u.TOKEN_SUBSCRIBE_NO_PUSH_SET);return[2,{token:d.token,pushSet:d.pushSet}]}})})},e.prototype.updateToken=function(e,t,n,r,i){return l.__awaiter(this,void 0,void 0,function(){var a,o,s,c,d,v,y,b;return l.__generator(this,function(l){switch(l.label){case 0:a=g(r.getKey("p256dh")),o=g(r.getKey("auth")),s="push_set="+n+"&token="+t+"&authorized_entity="+e+"&endpoint="+r.endpoint+"&encryption_key="+a+"&encryption_auth="+o,m(i.buffer,h.buffer)||(c=g(i),s+="&application_pub_key="+c),(d=new Headers).append("Content-Type","application/x-www-form-urlencoded"),v={method:"POST",headers:d,body:s},l.label=1;case 1:return l.trys.push([1,4,,5]),[4,fetch(f+"/fcm/connect/subscribe",v)];case 2:return[4,l.sent().json()];case 3:return y=l.sent(),[3,5];case 4:throw l.sent(),p.create(u.TOKEN_UPDATE_FAILED);case 5:if(y.error)throw b=y.error.message,p.create(u.TOKEN_UPDATE_FAILED,{message:b});if(!y.token)throw p.create(u.TOKEN_UPDATE_NO_TOKEN);return[2,y.token]}})})},e.prototype.deleteToken=function(e,t,n){return l.__awaiter(this,void 0,void 0,function(){var r,i,a,o,s;return l.__generator(this,function(l){switch(l.label){case 0:r="authorized_entity="+e+"&token="+t+"&pushSet="+n,(i=new Headers).append("Content-Type","application/x-www-form-urlencoded"),a={method:"POST",headers:i,body:r},l.label=1;case 1:return l.trys.push([1,4,,5]),[4,fetch(f+"/fcm/connect/unsubscribe",a)];case 2:return[4,l.sent().json()];case 3:if((o=l.sent()).error)throw s=o.error.message,p.create(u.TOKEN_UNSUBSCRIBE_FAILED,{message:s});return[3,5];case 4:throw l.sent(),p.create(u.TOKEN_UNSUBSCRIBE_FAILED);case 5:return[2]}})})},e}();function y(e){for(var t=(e+"=".repeat((4-e.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),n=atob(t),r=new Uint8Array(n.length),i=0;i<n.length;++i)r[i]=n.charCodeAt(i);return r}var b="undefined",w="fcm_token_object_Store";function _(){var e=indexedDB.open(b);e.onerror=function(e){},e.onsuccess=function(t){!function(e){if(e.objectStoreNames.contains(w)){var t=e.transaction(w).objectStore(w),n=new v,r=t.openCursor();r.onerror=function(e){console.warn("Unable to cleanup old IDB.",e)},r.onsuccess=function(){var t=r.result;if(t){var i=t.value;n.deleteToken(i.fcmSenderId,i.fcmToken,i.fcmPushSet),t.continue()}else e.close(),indexedDB.deleteDatabase(b)}}}(e.result)}}var E=function(){function e(){this.dbPromise=null}return e.prototype.get=function(e){return this.createTransaction(function(t){return t.get(e)})},e.prototype.getIndex=function(e,t){return this.createTransaction(function(n){return n.index(e).get(t)})},e.prototype.put=function(e){return this.createTransaction(function(t){return t.put(e)},"readwrite")},e.prototype.delete=function(e){return this.createTransaction(function(t){return t.delete(e)},"readwrite")},e.prototype.closeDatabase=function(){return l.__awaiter(this,void 0,void 0,function(){return l.__generator(this,function(e){switch(e.label){case 0:return this.dbPromise?[4,this.dbPromise]:[3,2];case 1:e.sent().close(),this.dbPromise=null,e.label=2;case 2:return[2]}})})},e.prototype.createTransaction=function(e,t){return void 0===t&&(t="readonly"),l.__awaiter(this,void 0,void 0,function(){var n,r,i,a;return l.__generator(this,function(o){switch(o.label){case 0:return[4,this.getDb()];case 1:return n=o.sent(),r=n.transaction(this.objectStoreName,t),i=r.objectStore(this.objectStoreName),[4,function(e){return new Promise(function(t,n){e.onsuccess=function(){t(e.result)},e.onerror=function(){n(e.error)}})}(e(i))];case 2:return a=o.sent(),[2,new Promise(function(e,t){r.oncomplete=function(){e(a)},r.onerror=function(){t(r.error)}})]}})})},e.prototype.getDb=function(){var e=this;return this.dbPromise||(this.dbPromise=new Promise(function(t,n){var r=indexedDB.open(e.dbName,e.dbVersion);r.onsuccess=function(){t(r.result)},r.onerror=function(){e.dbPromise=null,n(r.error)},r.onupgradeneeded=function(t){return e.onDbUpgrade(r,t)}})),this.dbPromise},e}();var S=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.dbName="fcm_token_details_db",t.dbVersion=3,t.objectStoreName="fcm_token_object_Store",t}return l.__extends(t,e),t.prototype.onDbUpgrade=function(e,t){var n=e.result;switch(t.oldVersion){case 0:(r=n.createObjectStore(this.objectStoreName,{keyPath:"swScope"})).createIndex("fcmSenderId","fcmSenderId",{unique:!1}),r.createIndex("fcmToken","fcmToken",{unique:!0});case 1:_();case 2:var r,i=(r=e.transaction.objectStore(this.objectStoreName)).openCursor();i.onsuccess=function(){var e=i.result;if(e){var t=e.value,n=l.__assign({},t);t.createTime||(n.createTime=Date.now()),"string"==typeof t.vapidKey&&(n.vapidKey=y(t.vapidKey)),"string"==typeof t.auth&&(n.auth=y(t.auth).buffer),"string"==typeof t.auth&&(n.p256dh=y(t.p256dh).buffer),e.update(n),e.continue()}}}},t.prototype.getTokenDetailsFromToken=function(e){return l.__awaiter(this,void 0,void 0,function(){return l.__generator(this,function(t){if(!e)throw p.create(u.BAD_TOKEN);return T({fcmToken:e}),[2,this.getIndex("fcmToken",e)]})})},t.prototype.getTokenDetailsFromSWScope=function(e){return l.__awaiter(this,void 0,void 0,function(){return l.__generator(this,function(t){if(!e)throw p.create(u.BAD_SCOPE);return T({swScope:e}),[2,this.get(e)]})})},t.prototype.saveTokenDetails=function(e){return l.__awaiter(this,void 0,void 0,function(){return l.__generator(this,function(t){if(!e.swScope)throw p.create(u.BAD_SCOPE);if(!e.vapidKey)throw p.create(u.BAD_VAPID_KEY);if(!e.endpoint||!e.auth||!e.p256dh)throw p.create(u.BAD_SUBSCRIPTION);if(!e.fcmSenderId)throw p.create(u.BAD_SENDER_ID);if(!e.fcmToken)throw p.create(u.BAD_TOKEN);if(!e.fcmPushSet)throw p.create(u.BAD_PUSH_SET);return T(e),[2,this.put(e)]})})},t.prototype.deleteToken=function(e){return l.__awaiter(this,void 0,void 0,function(){var t;return l.__generator(this,function(n){switch(n.label){case 0:return"string"!=typeof e||0===e.length?[2,Promise.reject(p.create(u.INVALID_DELETE_TOKEN))]:[4,this.getTokenDetailsFromToken(e)];case 1:if(!(t=n.sent()))throw p.create(u.DELETE_TOKEN_NOT_FOUND);return[4,this.delete(t.swScope)];case 2:return n.sent(),[2,t]}})})},t}(E);function T(e){if(e.fcmToken&&("string"!=typeof e.fcmToken||0===e.fcmToken.length))throw p.create(u.BAD_TOKEN);if(e.swScope&&("string"!=typeof e.swScope||0===e.swScope.length))throw p.create(u.BAD_SCOPE);if(e.vapidKey&&(!(e.vapidKey instanceof Uint8Array)||65!==e.vapidKey.length))throw p.create(u.BAD_VAPID_KEY);if(e.endpoint&&("string"!=typeof e.endpoint||0===e.endpoint.length))throw p.create(u.BAD_SUBSCRIPTION);if(e.auth&&!(e.auth instanceof ArrayBuffer))throw p.create(u.BAD_SUBSCRIPTION);if(e.p256dh&&!(e.p256dh instanceof ArrayBuffer))throw p.create(u.BAD_SUBSCRIPTION);if(e.fcmSenderId&&("string"!=typeof e.fcmSenderId||0===e.fcmSenderId.length))throw p.create(u.BAD_SENDER_ID);if(e.fcmPushSet&&("string"!=typeof e.fcmPushSet||0===e.fcmPushSet.length))throw p.create(u.BAD_PUSH_SET)}var k=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.dbName="fcm_vapid_details_db",t.dbVersion=1,t.objectStoreName="fcm_vapid_object_Store",t}return l.__extends(t,e),t.prototype.onDbUpgrade=function(e){e.result.createObjectStore(this.objectStoreName,{keyPath:"swScope"})},t.prototype.getVapidFromSWScope=function(e){return l.__awaiter(this,void 0,void 0,function(){var t;return l.__generator(this,function(n){switch(n.label){case 0:if("string"!=typeof e||0===e.length)throw p.create(u.BAD_SCOPE);return[4,this.get(e)];case 1:return[2,(t=n.sent())?t.vapidKey:void 0]}})})},t.prototype.saveVapidDetails=function(e,t){return l.__awaiter(this,void 0,void 0,function(){var n;return l.__generator(this,function(r){if("string"!=typeof e||0===e.length)throw p.create(u.BAD_SCOPE);if(null===t||65!==t.length)throw p.create(u.BAD_VAPID_KEY);return n={swScope:e,vapidKey:t},[2,this.put(n)]})})},t.prototype.deleteVapidDetails=function(e){return l.__awaiter(this,void 0,void 0,function(){var t;return l.__generator(this,function(n){switch(n.label){case 0:return[4,this.getVapidFromSWScope(e)];case 1:if(!(t=n.sent()))throw p.create(u.DELETE_SCOPE_NOT_FOUND);return[4,this.delete(e)];case 2:return n.sent(),[2,t]}})})},t}(E),C="messagingSenderId",x=function(){function e(e){var t=this;if(!e.options[C]||"string"!=typeof e.options[C])throw p.create(u.BAD_SENDER_ID);this.messagingSenderId=e.options[C],this.tokenDetailsModel=new S,this.vapidDetailsModel=new k,this.iidModel=new v,this.app=e,this.INTERNAL={delete:function(){return t.delete()}}}return e.prototype.getToken=function(){return l.__awaiter(this,void 0,void 0,function(){var e,t,n,r,i;return l.__generator(this,function(a){switch(a.label){case 0:if("denied"===(e=this.getNotificationPermission_()))throw p.create(u.NOTIFICATIONS_BLOCKED);return"granted"!==e?[2,null]:[4,this.getSWRegistration_()];case 1:return t=a.sent(),[4,this.getPublicVapidKey_()];case 2:return n=a.sent(),[4,this.getPushSubscription(t,n)];case 3:return r=a.sent(),[4,this.tokenDetailsModel.getTokenDetailsFromSWScope(t.scope)];case 4:return(i=a.sent())?[2,this.manageExistingToken(t,r,n,i)]:[2,this.getNewToken(t,r,n)]}})})},e.prototype.manageExistingToken=function(e,t,n,r){return l.__awaiter(this,void 0,void 0,function(){return l.__generator(this,function(i){switch(i.label){case 0:return function(e,t,n){if(!n.vapidKey||!m(t.buffer,n.vapidKey.buffer))return!1;var r=e.endpoint===n.endpoint,i=m(e.getKey("auth"),n.auth),a=m(e.getKey("p256dh"),n.p256dh);return r&&i&&a}(t,n,r)?Date.now()<r.createTime+6048e5?[2,r.fcmToken]:[2,this.updateToken(e,t,n,r)]:[4,this.deleteTokenFromDB(r.fcmToken)];case 1:return i.sent(),[2,this.getNewToken(e,t,n)]}})})},e.prototype.updateToken=function(e,t,n,r){return l.__awaiter(this,void 0,void 0,function(){var i,a,o;return l.__generator(this,function(s){switch(s.label){case 0:return s.trys.push([0,4,,6]),[4,this.iidModel.updateToken(this.messagingSenderId,r.fcmToken,r.fcmPushSet,t,n)];case 1:return i=s.sent(),a={swScope:e.scope,vapidKey:n,fcmSenderId:this.messagingSenderId,fcmToken:i,fcmPushSet:r.fcmPushSet,createTime:Date.now(),endpoint:t.endpoint,auth:t.getKey("auth"),p256dh:t.getKey("p256dh")},[4,this.tokenDetailsModel.saveTokenDetails(a)];case 2:return s.sent(),[4,this.vapidDetailsModel.saveVapidDetails(e.scope,n)];case 3:return s.sent(),[2,i];case 4:return o=s.sent(),[4,this.deleteToken(r.fcmToken)];case 5:throw s.sent(),o;case 6:return[2]}})})},e.prototype.getNewToken=function(e,t,n){return l.__awaiter(this,void 0,void 0,function(){var r,i;return l.__generator(this,function(a){switch(a.label){case 0:return[4,this.iidModel.getToken(this.messagingSenderId,t,n)];case 1:return r=a.sent(),i={swScope:e.scope,vapidKey:n,fcmSenderId:this.messagingSenderId,fcmToken:r.token,fcmPushSet:r.pushSet,createTime:Date.now(),endpoint:t.endpoint,auth:t.getKey("auth"),p256dh:t.getKey("p256dh")},[4,this.tokenDetailsModel.saveTokenDetails(i)];case 2:return a.sent(),[4,this.vapidDetailsModel.saveVapidDetails(e.scope,n)];case 3:return a.sent(),[2,r.token]}})})},e.prototype.deleteToken=function(e){return l.__awaiter(this,void 0,void 0,function(){var t,n;return l.__generator(this,function(r){switch(r.label){case 0:return[4,this.deleteTokenFromDB(e)];case 1:return r.sent(),[4,this.getSWRegistration_()];case 2:return(t=r.sent())?[4,t.pushManager.getSubscription()]:[3,4];case 3:if(n=r.sent())return[2,n.unsubscribe()];r.label=4;case 4:return[2,!0]}})})},e.prototype.deleteTokenFromDB=function(e){return l.__awaiter(this,void 0,void 0,function(){var t;return l.__generator(this,function(n){switch(n.label){case 0:return[4,this.tokenDetailsModel.deleteToken(e)];case 1:return t=n.sent(),[4,this.iidModel.deleteToken(t.fcmSenderId,t.fcmToken,t.fcmPushSet)];case 2:return n.sent(),[2]}})})},e.prototype.getPushSubscription=function(e,t){return e.pushManager.getSubscription().then(function(n){return n||e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:t})})},e.prototype.requestPermission=function(){throw p.create(u.AVAILABLE_IN_WINDOW)},e.prototype.useServiceWorker=function(e){throw p.create(u.AVAILABLE_IN_WINDOW)},e.prototype.usePublicVapidKey=function(e){throw p.create(u.AVAILABLE_IN_WINDOW)},e.prototype.onMessage=function(e,t,n){throw p.create(u.AVAILABLE_IN_WINDOW)},e.prototype.onTokenRefresh=function(e,t,n){throw p.create(u.AVAILABLE_IN_WINDOW)},e.prototype.setBackgroundMessageHandler=function(e){throw p.create(u.AVAILABLE_IN_SW)},e.prototype.delete=function(){return l.__awaiter(this,void 0,void 0,function(){return l.__generator(this,function(e){switch(e.label){case 0:return[4,Promise.all([this.tokenDetailsModel.closeDatabase(),this.vapidDetailsModel.closeDatabase()])];case 1:return e.sent(),[2]}})})},e.prototype.getNotificationPermission_=function(){return Notification.permission},e.prototype.getTokenDetailsModel=function(){return this.tokenDetailsModel},e.prototype.getVapidDetailsModel=function(){return this.vapidDetailsModel},e.prototype.getIidModel=function(){return this.iidModel},e}();var P=function(e){function t(t){var n=e.call(this,t)||this;return n.bgMessageHandler=null,self.addEventListener("push",function(e){n.onPush(e)}),self.addEventListener("pushsubscriptionchange",function(e){n.onSubChange(e)}),self.addEventListener("notificationclick",function(e){n.onNotificationClick(e)}),n}return l.__extends(t,e),t.prototype.onPush=function(e){e.waitUntil(this.onPush_(e))},t.prototype.onSubChange=function(e){e.waitUntil(this.onSubChange_(e))},t.prototype.onNotificationClick=function(e){e.waitUntil(this.onNotificationClick_(e))},t.prototype.onPush_=function(e){return l.__awaiter(this,void 0,void 0,function(){var t,n,r,i,a,o;return l.__generator(this,function(s){switch(s.label){case 0:if(!e.data)return[2];try{t=e.data.json()}catch(e){return[2]}return[4,this.hasVisibleClients_()];case 1:return s.sent()?[2,this.sendMessageToWindowClients_(t)]:(n=this.getNotificationData_(t))?(r=n.title||"",[4,this.getSWRegistration_()]):[3,3];case 2:return i=s.sent(),a=n.actions,o=Notification.maxActions,a&&o&&a.length>o&&console.warn("This browser only supports "+o+" actions.The remaining actions will not be displayed."),[2,i.showNotification(r,n)];case 3:return this.bgMessageHandler?[4,this.bgMessageHandler(t)]:[3,5];case 4:return s.sent(),[2];case 5:return[2]}})})},t.prototype.onSubChange_=function(e){return l.__awaiter(this,void 0,void 0,function(){var e,t,n,r;return l.__generator(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.getSWRegistration_()];case 1:return e=i.sent(),[3,3];case 2:throw t=i.sent(),p.create(u.UNABLE_TO_RESUBSCRIBE,{message:t});case 3:return i.trys.push([3,5,,8]),[4,e.pushManager.getSubscription()];case 4:return i.sent(),[3,8];case 5:return n=i.sent(),[4,this.getTokenDetailsModel().getTokenDetailsFromSWScope(e.scope)];case 6:if(!(r=i.sent()))throw n;return[4,this.deleteToken(r.fcmToken)];case 7:throw i.sent(),n;case 8:return[2]}})})},t.prototype.onNotificationClick_=function(e){return l.__awaiter(this,void 0,void 0,function(){var t,n,r,i;return l.__generator(this,function(a){switch(a.label){case 0:return e.notification&&e.notification.data&&e.notification.data.FCM_MSG?e.action?[2]:(e.stopImmediatePropagation(),e.notification.close(),(t=e.notification.data.FCM_MSG).notification&&(n=t.fcmOptions&&t.fcmOptions.link||t.notification.click_action)?[4,this.getWindowClient_(n)]:[2]):[2];case 1:return(r=a.sent())?[3,3]:[4,self.clients.openWindow(n)];case 2:return r=a.sent(),[3,5];case 3:return[4,r.focus()];case 4:r=a.sent(),a.label=5;case 5:return r?(delete t.notification,delete t.fcmOptions,i=D(o.NOTIFICATION_CLICKED,t),[2,this.attemptToMessageClient_(r,i)]):[2]}})})},t.prototype.getNotificationData_=function(e){if(e&&"object"==typeof e.notification){var t,n=l.__assign({},e.notification);return n.data=l.__assign({},e.notification.data,((t={}).FCM_MSG=e,t)),n}},t.prototype.setBackgroundMessageHandler=function(e){if(!e||"function"!=typeof e)throw p.create(u.BG_HANDLER_FUNCTION_EXPECTED);this.bgMessageHandler=e},t.prototype.getWindowClient_=function(e){return l.__awaiter(this,void 0,void 0,function(){var t,n,r,i;return l.__generator(this,function(a){switch(a.label){case 0:return t=new URL(e,self.location.href).href,[4,N()];case 1:for(n=a.sent(),r=null,i=0;i<n.length;i++)if(new URL(n[i].url,self.location.href).href===t){r=n[i];break}return[2,r]}})})},t.prototype.attemptToMessageClient_=function(e,t){return l.__awaiter(this,void 0,void 0,function(){return l.__generator(this,function(n){if(!e)throw p.create(u.NO_WINDOW_CLIENT_TO_MSG);return e.postMessage(t),[2]})})},t.prototype.hasVisibleClients_=function(){return l.__awaiter(this,void 0,void 0,function(){return l.__generator(this,function(e){switch(e.label){case 0:return[4,N()];case 1:return[2,e.sent().some(function(e){return"visible"===e.visibilityState})]}})})},t.prototype.sendMessageToWindowClients_=function(e){return l.__awaiter(this,void 0,void 0,function(){var t,n,r=this;return l.__generator(this,function(i){switch(i.label){case 0:return[4,N()];case 1:return t=i.sent(),n=D(o.PUSH_MSG_RECEIVED,e),[4,Promise.all(t.map(function(e){return r.attemptToMessageClient_(e,n)}))];case 2:return i.sent(),[2]}})})},t.prototype.getSWRegistration_=function(){return l.__awaiter(this,void 0,void 0,function(){return l.__generator(this,function(e){return[2,self.registration]})})},t.prototype.getPublicVapidKey_=function(){return l.__awaiter(this,void 0,void 0,function(){var e,t;return l.__generator(this,function(n){switch(n.label){case 0:return[4,this.getSWRegistration_()];case 1:if(!(e=n.sent()))throw p.create(u.SW_REGISTRATION_EXPECTED);return[4,this.getVapidDetailsModel().getVapidFromSWScope(e.scope)];case 2:return null==(t=n.sent())?[2,h]:[2,t]}})})},t}(x);function N(){return self.clients.matchAll({type:"window",includeUncontrolled:!0})}function D(e,t){return(n={})[a.TYPE_OF_MSG]=e,n[a.DATA]=t,n;var n}var M=function(e){function t(t){var n=e.call(this,t)||this;return n.registrationToUse=null,n.publicVapidKeyToUse=null,n.manifestCheckPromise=null,n.messageObserver=null,n.tokenRefreshObserver=null,n.onMessageInternal=s.createSubscribe(function(e){n.messageObserver=e}),n.onTokenRefreshInternal=s.createSubscribe(function(e){n.tokenRefreshObserver=e}),n.setupSWMessageListener_(),n}return l.__extends(t,e),t.prototype.getToken=function(){return l.__awaiter(this,void 0,void 0,function(){return l.__generator(this,function(t){switch(t.label){case 0:return this.manifestCheckPromise||(this.manifestCheckPromise=function(){return l.__awaiter(this,void 0,void 0,function(){var e,t;return l.__generator(this,function(n){switch(n.label){case 0:if(!(e=document.querySelector('link[rel="manifest"]')))return[2];n.label=1;case 1:return n.trys.push([1,4,,5]),[4,fetch(e.href)];case 2:return[4,n.sent().json()];case 3:return t=n.sent(),[3,5];case 4:return n.sent(),[2];case 5:if(!t||!t.gcm_sender_id)return[2];if("103953800507"!==t.gcm_sender_id)throw p.create(u.INCORRECT_GCM_SENDER_ID);return[2]}})})}()),[4,this.manifestCheckPromise];case 1:return t.sent(),[2,e.prototype.getToken.call(this)]}})})},t.prototype.requestPermission=function(){return l.__awaiter(this,void 0,void 0,function(){var e;return l.__generator(this,function(t){switch(t.label){case 0:return"granted"===this.getNotificationPermission_()?[2]:[4,Notification.requestPermission()];case 1:if("granted"===(e=t.sent()))return[2];throw"denied"===e?p.create(u.PERMISSION_BLOCKED):p.create(u.PERMISSION_DEFAULT)}})})},t.prototype.useServiceWorker=function(e){if(!(e instanceof ServiceWorkerRegistration))throw p.create(u.SW_REGISTRATION_EXPECTED);if(null!=this.registrationToUse)throw p.create(u.USE_SW_BEFORE_GET_TOKEN);this.registrationToUse=e},t.prototype.usePublicVapidKey=function(e){if("string"!=typeof e)throw p.create(u.INVALID_PUBLIC_VAPID_KEY);if(null!=this.publicVapidKeyToUse)throw p.create(u.USE_PUBLIC_KEY_BEFORE_GET_TOKEN);var t=y(e);if(65!==t.length)throw p.create(u.PUBLIC_KEY_DECRYPTION_FAILED);this.publicVapidKeyToUse=t},t.prototype.onMessage=function(e,t,n){return"function"==typeof e?this.onMessageInternal(e,t,n):this.onMessageInternal(e)},t.prototype.onTokenRefresh=function(e,t,n){return"function"==typeof e?this.onTokenRefreshInternal(e,t,n):this.onTokenRefreshInternal(e)},t.prototype.waitForRegistrationToActivate_=function(e){var t=e.installing||e.waiting||e.active;return new Promise(function(n,r){if(t)if("activated"!==t.state)if("redundant"!==t.state){var i=function(){if("activated"===t.state)n(e);else{if("redundant"!==t.state)return;r(p.create(u.SW_REG_REDUNDANT))}t.removeEventListener("statechange",i)};t.addEventListener("statechange",i)}else r(p.create(u.SW_REG_REDUNDANT));else n(e);else r(p.create(u.NO_SW_IN_REG))})},t.prototype.getSWRegistration_=function(){var e=this;return this.registrationToUse?this.waitForRegistrationToActivate_(this.registrationToUse):(this.registrationToUse=null,navigator.serviceWorker.register("/firebase-messaging-sw.js",{scope:"/firebase-cloud-messaging-push-scope"}).catch(function(e){throw p.create(u.FAILED_DEFAULT_REGISTRATION,{browserErrorMessage:e.message})}).then(function(t){return e.waitForRegistrationToActivate_(t).then(function(){return e.registrationToUse=t,t.update(),t})}))},t.prototype.getPublicVapidKey_=function(){return l.__awaiter(this,void 0,void 0,function(){return l.__generator(this,function(e){return this.publicVapidKeyToUse?[2,this.publicVapidKeyToUse]:[2,h]})})},t.prototype.setupSWMessageListener_=function(){var e=this;navigator.serviceWorker.addEventListener("message",function(t){if(t.data&&t.data[a.TYPE_OF_MSG]){var n=t.data;switch(n[a.TYPE_OF_MSG]){case o.PUSH_MSG_RECEIVED:case o.NOTIFICATION_CLICKED:var r=n[a.DATA];e.messageObserver&&e.messageObserver.next(r)}}},!1)},t}(x);function A(e){var t={isSupported:I};e.INTERNAL.registerService("messaging",function(e){if(!I())throw p.create(u.UNSUPPORTED_BROWSER);return self&&"ServiceWorkerGlobalScope"in self?new P(e):new M(e)},t)}function I(){return self&&"ServiceWorkerGlobalScope"in self?"PushManager"in self&&"Notification"in self&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey"):navigator.cookieEnabled&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")}A(c),n.registerMessaging=A,n.isSupported=I},{"@firebase/app":1,"@firebase/util":4,tslib:23}],3:[function(e,t,n){(function(t,n){"use strict";e("whatwg-fetch");var r=setTimeout;function i(){}function a(e){if(!(this instanceof a))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],u(e,this)}function o(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,a._immediateFn(function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var r;try{r=n(e._value)}catch(e){return void l(t.promise,e)}s(t.promise,r)}else(1===e._state?s:l)(t.promise,e._value)})):e._deferreds.push(t)}function s(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if(t instanceof a)return e._state=3,e._value=t,void c(e);if("function"==typeof n)return void u((r=n,i=t,function(){r.apply(i,arguments)}),e)}e._state=1,e._value=t,c(e)}catch(t){l(e,t)}var r,i}function l(e,t){e._state=2,e._value=t,c(e)}function c(e){2===e._state&&0===e._deferreds.length&&a._immediateFn(function(){e._handled||a._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t<n;t++)o(e,e._deferreds[t]);e._deferreds=null}function u(e,t){var n=!1;try{e(function(e){n||(n=!0,s(t,e))},function(e){n||(n=!0,l(t,e))})}catch(e){if(n)return;n=!0,l(t,e)}}a.prototype.catch=function(e){return this.then(null,e)},a.prototype.then=function(e,t){var n=new this.constructor(i);return o(this,new function(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}(e,t,n)),n},a.prototype.finally=function(e){var t=this.constructor;return this.then(function(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){return t.reject(n)})})},a.all=function(e){return new a(function(t,n){if(!e||void 0===e.length)throw new TypeError("Promise.all accepts an array");var r=Array.prototype.slice.call(e);if(0===r.length)return t([]);var i=r.length;function a(e,o){try{if(o&&("object"==typeof o||"function"==typeof o)){var s=o.then;if("function"==typeof s)return void s.call(o,function(t){a(e,t)},n)}r[e]=o,0==--i&&t(r)}catch(e){n(e)}}for(var o=0;o<r.length;o++)a(o,r[o])})},a.resolve=function(e){return e&&"object"==typeof e&&e.constructor===a?e:new a(function(t){t(e)})},a.reject=function(e){return new a(function(t,n){n(e)})},a.race=function(e){return new a(function(t,n){for(var r=0,i=e.length;r<i;r++)e[r].then(t,n)})},a._immediateFn="function"==typeof n&&function(e){n(e)}||function(e){r(e,0)},a._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var d=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==t)return t;throw new Error("unable to locate global object")}();function p(e,t){return e(t={exports:{}},t.exports),t.exports}d.Promise||(d.Promise=a);var h=p(function(e){var t=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)}),f=p(function(e){var t=e.exports={version:"2.5.5"};"number"==typeof __e&&(__e=t)}),m=(f.version,function(e){return"object"==typeof e?null!==e:"function"==typeof e}),g=function(e){if(!m(e))throw TypeError(e+" is not an object!");return e},v=function(e){try{return!!e()}catch(e){return!0}},y=!v(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),b=h.document,w=m(b)&&m(b.createElement),_=function(e){return w?b.createElement(e):{}},E=!y&&!v(function(){return 7!=Object.defineProperty(_("div"),"a",{get:function(){return 7}}).a}),S=function(e,t){if(!m(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!m(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!m(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!m(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},T=Object.defineProperty,k={f:y?Object.defineProperty:function(e,t,n){if(g(e),t=S(t,!0),g(n),E)try{return T(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},C=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},x=y?function(e,t,n){return k.f(e,t,C(1,n))}:function(e,t,n){return e[t]=n,e},P={}.hasOwnProperty,N=function(e,t){return P.call(e,t)},D=0,M=Math.random(),A=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++D+M).toString(36))},I=p(function(e){var t=A("src"),n=Function.toString,r=(""+n).split("toString");f.inspectSource=function(e){return n.call(e)},(e.exports=function(e,n,i,a){var o="function"==typeof i;o&&(N(i,"name")||x(i,"name",n)),e[n]!==i&&(o&&(N(i,t)||x(i,t,e[n]?""+e[n]:r.join(String(n)))),e===h?e[n]=i:a?e[n]?e[n]=i:x(e,n,i):(delete e[n],x(e,n,i)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[t]||n.call(this)})}),O=function(e,t,n){if(function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!")}(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}},R=function(e,t,n){var r,i,a,o,s=e&R.F,l=e&R.G,c=e&R.S,u=e&R.P,d=e&R.B,p=l?h:c?h[t]||(h[t]={}):(h[t]||{}).prototype,m=l?f:f[t]||(f[t]={}),g=m.prototype||(m.prototype={});for(r in l&&(n=t),n)a=((i=!s&&p&&void 0!==p[r])?p:n)[r],o=d&&i?O(a,h):u&&"function"==typeof a?O(Function.call,a):a,p&&I(p,r,a,e&R.U),m[r]!=a&&x(m,r,o),u&&g[r]!=a&&(g[r]=a)};h.core=f,R.F=1,R.G=2,R.S=4,R.P=8,R.B=16,R.W=32,R.U=64,R.R=128;var U=R,L={}.toString,F=function(e){return L.call(e).slice(8,-1)},j=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==F(e)?e.split(""):Object(e)},W=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e},B=function(e){return Object(W(e))},z=Math.ceil,V=Math.floor,q=function(e){return isNaN(e=+e)?0:(e>0?V:z)(e)},H=Math.min,K=function(e){return e>0?H(q(e),9007199254740991):0},G=Array.isArray||function(e){return"Array"==F(e)},$=h["__core-js_shared__"]||(h["__core-js_shared__"]={}),Y=function(e){return $[e]||($[e]={})},Q=p(function(e){var t=Y("wks"),n=h.Symbol,r="function"==typeof n;(e.exports=function(e){return t[e]||(t[e]=r&&n[e]||(r?n:A)("Symbol."+e))}).store=t}),X=Q("species"),J=function(e,t){return new(function(e){var t;return G(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!G(t.prototype)||(t=void 0),m(t)&&null===(t=t[X])&&(t=void 0)),void 0===t?Array:t}(e))(t)},Z=function(e,t){var n=1==e,r=2==e,i=3==e,a=4==e,o=6==e,s=5==e||o,l=t||J;return function(t,c,u){for(var d,p,h=B(t),f=j(h),m=O(c,u,3),g=K(f.length),v=0,y=n?l(t,g):r?l(t,0):void 0;g>v;v++)if((s||v in f)&&(p=m(d=f[v],v,h),e))if(n)y[v]=p;else if(p)switch(e){case 3:return!0;case 5:return d;case 6:return v;case 2:y.push(d)}else if(a)return!1;return o?-1:i||a?a:y}},ee=Q("unscopables"),te=Array.prototype;void 0==te[ee]&&x(te,ee,{});var ne=function(e){te[ee][e]=!0},re=Z(5),ie=!0;"find"in[]&&Array(1).find(function(){ie=!1}),U(U.P+U.F*ie,"Array",{find:function(e){return re(this,e,arguments.length>1?arguments[1]:void 0)}}),ne("find");f.Array.find;var ae=Z(6),oe=!0;"findIndex"in[]&&Array(1).findIndex(function(){oe=!1}),U(U.P+U.F*oe,"Array",{findIndex:function(e){return ae(this,e,arguments.length>1?arguments[1]:void 0)}}),ne("findIndex");f.Array.findIndex;var se,le=function(e){return j(W(e))},ce=Math.max,ue=Math.min,de=Y("keys"),pe=function(e){return de[e]||(de[e]=A(e))},he=(se=!1,function(e,t,n){var r,i=le(e),a=K(i.length),o=function(e,t){return(e=q(e))<0?ce(e+t,0):ue(e,t)}(n,a);if(se&&t!=t){for(;a>o;)if((r=i[o++])!=r)return!0}else for(;a>o;o++)if((se||o in i)&&i[o]===t)return se||o||0;return!se&&-1}),fe=pe("IE_PROTO"),me=function(e,t){var n,r=le(e),i=0,a=[];for(n in r)n!=fe&&N(r,n)&&a.push(n);for(;t.length>i;)N(r,n=t[i++])&&(~he(a,n)||a.push(n));return a},ge="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),ve=Object.keys||function(e){return me(e,ge)},ye={f:Object.getOwnPropertySymbols},be={f:{}.propertyIsEnumerable},we=Object.assign,_e=!we||v(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=we({},e)[n]||Object.keys(we({},t)).join("")!=r})?function(e,t){for(var n=B(e),r=arguments.length,i=1,a=ye.f,o=be.f;r>i;)for(var s,l=j(arguments[i++]),c=a?ve(l).concat(a(l)):ve(l),u=c.length,d=0;u>d;)o.call(l,s=c[d++])&&(n[s]=l[s]);return n}:we;U(U.S+U.F,"Object",{assign:_e});f.Object.assign;var Ee=Q("match"),Se=function(e,t,n){if(m(r=t)&&(void 0!==(i=r[Ee])?i:"RegExp"==F(r)))throw TypeError("String#"+n+" doesn't accept regex!");var r,i;return String(W(e))},Te=Q("match"),ke="".startsWith;U(U.P+U.F*function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[Te]=!1,!"/./"[e](t)}catch(e){}}return!0}("startsWith"),"String",{startsWith:function(e){var t=Se(this,e,"startsWith"),n=K(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return ke?ke.call(t,r,n):t.slice(n,n+r.length)===r}});f.String.startsWith;U(U.P,"String",{repeat:function(e){var t=String(W(this)),n="",r=q(e);if(r<0||r==1/0)throw RangeError("Count can't be negative");for(;r>0;(r>>>=1)&&(t+=t))1&r&&(n+=t);return n}});f.String.repeat;var Ce=p(function(e){var t=A("meta"),n=k.f,r=0,i=Object.isExtensible||function(){return!0},a=!v(function(){return i(Object.preventExtensions({}))}),o=function(e){n(e,t,{value:{i:"O"+ ++r,w:{}}})},s=e.exports={KEY:t,NEED:!1,fastKey:function(e,n){if(!m(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!N(e,t)){if(!i(e))return"F";if(!n)return"E";o(e)}return e[t].i},getWeak:function(e,n){if(!N(e,t)){if(!i(e))return!0;if(!n)return!1;o(e)}return e[t].w},onFreeze:function(e){return a&&s.NEED&&i(e)&&!N(e,t)&&o(e),e}}}),xe=(Ce.KEY,Ce.NEED,Ce.fastKey,Ce.getWeak,Ce.onFreeze,k.f),Pe=Q("toStringTag"),Ne=function(e,t,n){e&&!N(e=n?e:e.prototype,Pe)&&xe(e,Pe,{configurable:!0,value:t})},De={f:Q},Me=k.f,Ae=function(e){var t=f.Symbol||(f.Symbol=h.Symbol||{});"_"==e.charAt(0)||e in t||Me(t,e,{value:De.f(e)})},Ie=y?Object.defineProperties:function(e,t){g(e);for(var n,r=ve(t),i=r.length,a=0;i>a;)k.f(e,n=r[a++],t[n]);return e},Oe=h.document,Re=Oe&&Oe.documentElement,Ue=pe("IE_PROTO"),Le=function(){},Fe=function(){var e,t=_("iframe"),n=ge.length;for(t.style.display="none",Re.appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),Fe=e.F;n--;)delete Fe.prototype[ge[n]];return Fe()},je=Object.create||function(e,t){var n;return null!==e?(Le.prototype=g(e),n=new Le,Le.prototype=null,n[Ue]=e):n=Fe(),void 0===t?n:Ie(n,t)},We=ge.concat("length","prototype"),Be={f:Object.getOwnPropertyNames||function(e){return me(e,We)}},ze=Be.f,Ve={}.toString,qe="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],He={f:function(e){return qe&&"[object Window]"==Ve.call(e)?function(e){try{return ze(e)}catch(e){return qe.slice()}}(e):ze(le(e))}},Ke=Object.getOwnPropertyDescriptor,Ge={f:y?Ke:function(e,t){if(e=le(e),t=S(t,!0),E)try{return Ke(e,t)}catch(e){}if(N(e,t))return C(!be.f.call(e,t),e[t])}},$e=Ce.KEY,Ye=Ge.f,Qe=k.f,Xe=He.f,Je=h.Symbol,Ze=h.JSON,et=Ze&&Ze.stringify,tt=Q("_hidden"),nt=Q("toPrimitive"),rt={}.propertyIsEnumerable,it=Y("symbol-registry"),at=Y("symbols"),ot=Y("op-symbols"),st=Object.prototype,lt="function"==typeof Je,ct=h.QObject,ut=!ct||!ct.prototype||!ct.prototype.findChild,dt=y&&v(function(){return 7!=je(Qe({},"a",{get:function(){return Qe(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=Ye(st,t);r&&delete st[t],Qe(e,t,n),r&&e!==st&&Qe(st,t,r)}:Qe,pt=function(e){var t=at[e]=je(Je.prototype);return t._k=e,t},ht=lt&&"symbol"==typeof Je.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof Je},ft=function(e,t,n){return e===st&&ft(ot,t,n),g(e),t=S(t,!0),g(n),N(at,t)?(n.enumerable?(N(e,tt)&&e[tt][t]&&(e[tt][t]=!1),n=je(n,{enumerable:C(0,!1)})):(N(e,tt)||Qe(e,tt,C(1,{})),e[tt][t]=!0),dt(e,t,n)):Qe(e,t,n)},mt=function(e,t){g(e);for(var n,r=function(e){var t=ve(e),n=ye.f;if(n)for(var r,i=n(e),a=be.f,o=0;i.length>o;)a.call(e,r=i[o++])&&t.push(r);return t}(t=le(t)),i=0,a=r.length;a>i;)ft(e,n=r[i++],t[n]);return e},gt=function(e){var t=rt.call(this,e=S(e,!0));return!(this===st&&N(at,e)&&!N(ot,e))&&(!(t||!N(this,e)||!N(at,e)||N(this,tt)&&this[tt][e])||t)},vt=function(e,t){if(e=le(e),t=S(t,!0),e!==st||!N(at,t)||N(ot,t)){var n=Ye(e,t);return!n||!N(at,t)||N(e,tt)&&e[tt][t]||(n.enumerable=!0),n}},yt=function(e){for(var t,n=Xe(le(e)),r=[],i=0;n.length>i;)N(at,t=n[i++])||t==tt||t==$e||r.push(t);return r},bt=function(e){for(var t,n=e===st,r=Xe(n?ot:le(e)),i=[],a=0;r.length>a;)!N(at,t=r[a++])||n&&!N(st,t)||i.push(at[t]);return i};lt||(I((Je=function(){if(this instanceof Je)throw TypeError("Symbol is not a constructor!");var e=A(arguments.length>0?arguments[0]:void 0),t=function(n){this===st&&t.call(ot,n),N(this,tt)&&N(this[tt],e)&&(this[tt][e]=!1),dt(this,e,C(1,n))};return y&&ut&&dt(st,e,{configurable:!0,set:t}),pt(e)}).prototype,"toString",function(){return this._k}),Ge.f=vt,k.f=ft,Be.f=He.f=yt,be.f=gt,ye.f=bt,y&&I(st,"propertyIsEnumerable",gt,!0),De.f=function(e){return pt(Q(e))}),U(U.G+U.W+U.F*!lt,{Symbol:Je});for(var wt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),_t=0;wt.length>_t;)Q(wt[_t++]);for(var Et=ve(Q.store),St=0;Et.length>St;)Ae(Et[St++]);U(U.S+U.F*!lt,"Symbol",{for:function(e){return N(it,e+="")?it[e]:it[e]=Je(e)},keyFor:function(e){if(!ht(e))throw TypeError(e+" is not a symbol!");for(var t in it)if(it[t]===e)return t},useSetter:function(){ut=!0},useSimple:function(){ut=!1}}),U(U.S+U.F*!lt,"Object",{create:function(e,t){return void 0===t?je(e):mt(je(e),t)},defineProperty:ft,defineProperties:mt,getOwnPropertyDescriptor:vt,getOwnPropertyNames:yt,getOwnPropertySymbols:bt}),Ze&&U(U.S+U.F*(!lt||v(function(){var e=Je();return"[null]"!=et([e])||"{}"!=et({a:e})||"{}"!=et(Object(e))})),"JSON",{stringify:function(e){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=t=r[1],(m(t)||void 0!==e)&&!ht(e))return G(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!ht(t))return t}),r[1]=t,et.apply(Ze,r)}}),Je.prototype[nt]||x(Je.prototype,nt,Je.prototype.valueOf),Ne(Je,"Symbol"),Ne(Math,"Math",!0),Ne(h.JSON,"JSON",!0);var Tt=Q("toStringTag"),kt="Arguments"==F(function(){return arguments}()),Ct={};Ct[Q("toStringTag")]="z",Ct+""!="[object z]"&&I(Object.prototype,"toString",function(){return"[object "+(void 0===(e=this)?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),Tt))?n:kt?F(t):"Object"==(r=F(t))&&"function"==typeof t.callee?"Arguments":r)+"]";var e,t,n,r},!0),Ae("asyncIterator"),Ae("observable");f.Symbol;var xt={},Pt={};x(Pt,Q("iterator"),function(){return this});var Nt,Dt=function(e,t,n){e.prototype=je(Pt,{next:C(1,n)}),Ne(e,t+" Iterator")},Mt=pe("IE_PROTO"),At=Object.prototype,It=Object.getPrototypeOf||function(e){return e=B(e),N(e,Mt)?e[Mt]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?At:null},Ot=Q("iterator"),Rt=!([].keys&&"next"in[].keys()),Ut=function(){return this},Lt=function(e,t,n,r,i,a,o){Dt(n,t,r);var s,l,c,u=function(e){if(!Rt&&e in f)return f[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},d=t+" Iterator",p="values"==i,h=!1,f=e.prototype,m=f[Ot]||f["@@iterator"]||i&&f[i],g=m||u(i),v=i?p?u("entries"):g:void 0,y="Array"==t&&f.entries||m;if(y&&(c=It(y.call(new e)))!==Object.prototype&&c.next&&(Ne(c,d,!0),"function"!=typeof c[Ot]&&x(c,Ot,Ut)),p&&m&&"values"!==m.name&&(h=!0,g=function(){return m.call(this)}),(Rt||h||!f[Ot])&&x(f,Ot,g),xt[t]=g,xt[d]=Ut,i)if(s={values:p?g:u("values"),keys:a?g:u("keys"),entries:v},o)for(l in s)l in f||I(f,l,s[l]);else U(U.P+U.F*(Rt||h),t,s);return s},Ft=(Nt=!0,function(e,t){var n,r,i=String(W(e)),a=q(t),o=i.length;return a<0||a>=o?Nt?"":void 0:(n=i.charCodeAt(a))<55296||n>56319||a+1===o||(r=i.charCodeAt(a+1))<56320||r>57343?Nt?i.charAt(a):n:Nt?i.slice(a,a+2):r-56320+(n-55296<<10)+65536});Lt(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=Ft(t,n),this._i+=e.length,{value:e,done:!1})});var jt=function(e,t){return{value:t,done:!!e}},Wt=Lt(Array,"Array",function(e,t){this._t=le(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,jt(1)):jt(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])},"values");xt.Arguments=xt.Array,ne("keys"),ne("values"),ne("entries");for(var Bt=Q("iterator"),zt=Q("toStringTag"),Vt=xt.Array,qt={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},Ht=ve(qt),Kt=0;Kt<Ht.length;Kt++){var Gt,$t=Ht[Kt],Yt=qt[$t],Qt=h[$t],Xt=Qt&&Qt.prototype;if(Xt&&(Xt[Bt]||x(Xt,Bt,Vt),Xt[zt]||x(Xt,zt,$t),xt[$t]=Vt,Yt))for(Gt in Wt)Xt[Gt]||I(Xt,Gt,Wt[Gt],!0)}De.f("iterator")}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("timers").setImmediate)},{timers:29,"whatwg-fetch":24}],4:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("tslib"),i={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"},a=function(e,t){if(!e)throw o(t)},o=function(e){return new Error("Firebase Database ("+i.SDK_VERSION+") INTERNAL ASSERT FAILED: "+e)},s=function(e){for(var t=[],n=0,r=0;r<e.length;r++){var i=e.charCodeAt(r);i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=63&i|128):55296==(64512&i)&&r+1<e.length&&56320==(64512&e.charCodeAt(r+1))?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++r)),t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return t},l={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=[],i=0;i<e.length;i+=3){var a=e[i],o=i+1<e.length,s=o?e[i+1]:0,l=i+2<e.length,c=l?e[i+2]:0,u=a>>2,d=(3&a)<<4|s>>4,p=(15&s)<<2|c>>6,h=63&c;l||(h=64,o||(p=64)),r.push(n[u],n[d],n[p],n[h])}return r.join("")},encodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(s(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 i=e[n++];if(i<128)t[r++]=String.fromCharCode(i);else if(i>191&&i<224){var a=e[n++];t[r++]=String.fromCharCode((31&i)<<6|63&a)}else if(i>239&&i<365){var o=((7&i)<<18|(63&(a=e[n++]))<<12|(63&(s=e[n++]))<<6|63&e[n++])-65536;t[r++]=String.fromCharCode(55296+(o>>10)),t[r++]=String.fromCharCode(56320+(1023&o))}else{a=e[n++];var s=e[n++];t[r++]=String.fromCharCode((15&i)<<12|(63&a)<<6|63&s)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray:function(e,t){this.init_();for(var n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[],i=0;i<e.length;){var a=n[e.charAt(i++)],o=i<e.length?n[e.charAt(i)]:0,s=++i<e.length?n[e.charAt(i)]:64,l=++i<e.length?n[e.charAt(i)]:64;if(++i,null==a||null==o||null==s||null==l)throw Error();var c=a<<2|o>>4;if(r.push(c),64!=s){var u=o<<4&240|s>>2;if(r.push(u),64!=l){var d=s<<6&192|l;r.push(d)}}}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 l.decodeString(e,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};function u(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]=u(e[n],t[n]));return e}var d=function(){function e(){var e=this;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}(),p=function(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""},h="FirebaseError",f=Error.captureStackTrace;var m=function(){return function(e,t){if(this.code=e,this.message=t,f)f(this,g.prototype.create);else try{throw Error.apply(this,arguments)}catch(e){this.name=h,Object.defineProperty(this,"stack",{get:function(){return e.stack}})}}}();m.prototype=Object.create(Error.prototype),m.prototype.constructor=m,m.prototype.name=h;var g=function(){function e(e,t,n){this.service=e,this.serviceName=t,this.errors=n,this.pattern=/\{\$([^}]+)}/g}return e.prototype.create=function(e,t){void 0===t&&(t={});var n,r=this.errors[e],i=this.service+"/"+e;n=void 0===r?"Error":r.replace(this.pattern,function(e,n){var r=t[n];return void 0!==r?r.toString():"<"+n+"?>"}),n=this.serviceName+": "+n+" ("+i+").";var a=new m(i,n);for(var o in t)t.hasOwnProperty(o)&&"_"!==o.slice(-1)&&(a[o]=t[o]);return a},e}();function v(e){return JSON.parse(e)}var y=function(e){var t={},n={},r={},i="";try{var a=e.split(".");t=v(c(a[0])||""),n=v(c(a[1])||""),i=a[2],r=n.d||{},delete n.d}catch(e){}return{header:t,claims:n,data:r,signature:i}},b=function(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(n,e[n])},w=function(e,t){return b(t,function(t,n){e[t]=n}),e},_=function(e,t,n){for(var r in e)if(t.call(n,e[r],r,e))return r},E=function(e){function t(){var t=e.call(this)||this;t.chain_=[],t.buf_=[],t.W_=[],t.pad_=[],t.inbuf_=0,t.total_=0,t.blockSize=64,t.pad_[0]=128;for(var n=1;n<t.blockSize;++n)t.pad_[n]=0;return t.reset(),t}return r.__extends(t,e),t.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},t.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 i=n[r-3]^n[r-8]^n[r-14]^n[r-16];n[r]=4294967295&(i<<1|i>>>31)}var a,o,s=this.chain_[0],l=this.chain_[1],c=this.chain_[2],u=this.chain_[3],d=this.chain_[4];for(r=0;r<80;r++){r<40?r<20?(a=u^l&(c^u),o=1518500249):(a=l^c^u,o=1859775393):r<60?(a=l&c|u&(l|c),o=2400959708):(a=l^c^u,o=3395469782);i=(s<<5|s>>>27)+a+d+o+n[r]&4294967295;d=u,u=c,c=4294967295&(l<<30|l>>>2),l=s,s=i}this.chain_[0]=this.chain_[0]+s&4294967295,this.chain_[1]=this.chain_[1]+l&4294967295,this.chain_[2]=this.chain_[2]+c&4294967295,this.chain_[3]=this.chain_[3]+u&4294967295,this.chain_[4]=this.chain_[4]+d&4294967295},t.prototype.update=function(e,t){if(null!=e){void 0===t&&(t=e.length);for(var n=t-this.blockSize,r=0,i=this.buf_,a=this.inbuf_;r<t;){if(0==a)for(;r<=n;)this.compress_(e,r),r+=this.blockSize;if("string"==typeof e){for(;r<t;)if(i[a]=e.charCodeAt(r),++r,++a==this.blockSize){this.compress_(i),a=0;break}}else for(;r<t;)if(i[a]=e[r],++r,++a==this.blockSize){this.compress_(i),a=0;break}}this.inbuf_=a,this.total_+=t}},t.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 i=24;i>=0;i-=8)e[r]=this.chain_[n]>>i&255,++r;return e},t}(function(){return function(){this.blockSize=-1}}());var S=function(){function e(e,t){var n=this;this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.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,i=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 i=r[n];if(i in e&&"function"==typeof e[i])return!0}return!1}(e,["next","error","complete"])?e:{next:e,error:t,complete:n}).next&&(r.next=T),void 0===r.error&&(r.error=T),void 0===r.complete&&(r.complete=T);var a=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(function(){try{i.finalError?r.error(i.finalError):r.complete()}catch(e){}}),this.observers.push(r),a},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(e){"undefined"!=typeof console&&console.error&&console.error(e)}})},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 T(){}function k(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 i=e+" failed: ";return i+=r+" argument "}n.assert=a,n.assertionError=o,n.base64=l,n.base64Decode=c,n.base64Encode=function(e){var t=s(e);return l.encodeByteArray(t,!0)},n.CONSTANTS=i,n.deepCopy=function(e){return u(void 0,e)},n.deepExtend=u,n.patchProperty=function(e,t,n){e[t]=n},n.Deferred=d,n.getUA=p,n.isMobileCordova=function(){return"undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(p())},n.isNodeSdk=function(){return!0===i.NODE_CLIENT||!0===i.NODE_ADMIN},n.isReactNative=function(){return"object"==typeof navigator&&"ReactNative"===navigator.product},n.ErrorFactory=g,n.FirebaseError=m,n.patchCapture=function(e){var t=f;return f=e,t},n.jsonEval=v,n.stringify=function(e){return JSON.stringify(e)},n.decode=y,n.isAdmin=function(e){var t=y(e).claims;return"object"==typeof t&&!0===t.admin},n.issuedAtTime=function(e){var t=y(e).claims;return"object"==typeof t&&t.hasOwnProperty("iat")?t.iat:null},n.isValidFormat=function(e){var t=y(e).claims;return!!t&&"object"==typeof t&&t.hasOwnProperty("iat")},n.isValidTimestamp=function(e){var t,n,r=y(e).claims,i=Math.floor((new Date).getTime()/1e3);return"object"==typeof r&&(r.hasOwnProperty("nbf")?t=r.nbf:r.hasOwnProperty("iat")&&(t=r.iat),n=r.hasOwnProperty("exp")?r.exp:t+86400),i&&t&&n&&i>=t&&i<=n},n.clone=function(e){return w({},e)},n.contains=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.every=function(e,t){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&!t(n,e[n]))return!1;return!0},n.extend=w,n.findKey=_,n.findValue=function(e,t,n){var r=_(e,t,n);return r&&e[r]},n.forEach=b,n.getAnyKey=function(e){for(var t in e)return t},n.getCount=function(e){var t=0;for(var n in e)t++;return t},n.getValues=function(e){var t=[],n=0;for(var r in e)t[n++]=e[r];return t},n.isEmpty=function(e){for(var t in e)return!1;return!0},n.isNonNullObject=function(e){return"object"==typeof e&&null!==e},n.map=function(e,t,n){var r={};for(var i in e)r[i]=t.call(n,e[i],i,e);return r},n.safeGet=function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]},n.querystring=function(e){var t=[];return b(e,function(e,n){Array.isArray(n)?n.forEach(function(n){t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))}):t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))}),t.length?"&"+t.join("&"):""},n.querystringDecode=function(e){var t={};return e.replace(/^\?/,"").split("&").forEach(function(e){if(e){var n=e.split("=");t[n[0]]=n[1]}}),t},n.Sha1=E,n.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)})}},n.createSubscribe=function(e,t){var n=new S(e,t);return n.subscribe.bind(n)},n.errorPrefix=k,n.validateArgCount=function(e,t,n,r){var i;if(r<t?i="at least "+t:r>n&&(i=0===n?"none":"no more than "+n),i)throw new Error(e+" failed: Was called with "+r+(1===r?" argument.":" arguments.")+" Expects "+i+".")},n.validateCallback=function(e,t,n,r){if((!r||n)&&"function"!=typeof n)throw new Error(k(e,t,r)+"must be a valid function.")},n.validateContextObject=function(e,t,n,r){if((!r||n)&&("object"!=typeof n||null===n))throw new Error(k(e,t,r)+"must be a valid context object.")},n.validateNamespace=function(e,t,n,r){if((!r||n)&&"string"!=typeof n)throw new Error(k(e,t,r)+"must be a valid firebase namespace.")},n.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},n.stringToByteArray=function(e){for(var t=[],n=0,r=0;r<e.length;r++){var i=e.charCodeAt(r);if(i>=55296&&i<=56319){var o=i-55296;a(++r<e.length,"Surrogate pair missing trail surrogate."),i=65536+(o<<10)+(e.charCodeAt(r)-56320)}i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=63&i|128):i<65536?(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return t}},{tslib:23}],5:[function(e,t,n){"use strict";e("@firebase/polyfill");var r,i=(r=e("@firebase/app"))&&"object"==typeof r&&"default"in r?r.default:r;t.exports=i},{"@firebase/app":1,"@firebase/polyfill":3}],6:[function(e,t,n){"use strict";e("@firebase/messaging")},{"@firebase/messaging":2}],7:[function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;t.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(e){return!1}}()?Object.assign:function(e,t){for(var n,o,s=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l<arguments.length;l++){for(var c in n=Object(arguments[l]))i.call(n,c)&&(s[c]=n[c]);if(r){o=r(n);for(var u=0;u<o.length;u++)a.call(n,o[u])&&(s[o[u]]=n[o[u]])}}return s}},{}],8:[function(e,t,n){(function(n){"use strict";var r=function(){};if("production"!==n.env.NODE_ENV){var i=e("./lib/ReactPropTypesSecret"),a={};r=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}t.exports=function(e,t,o,s,l){if("production"!==n.env.NODE_ENV)for(var c in e)if(e.hasOwnProperty(c)){var u;try{if("function"!=typeof e[c]){var d=Error((s||"React class")+": "+o+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[c]+"`.");throw d.name="Invariant Violation",d}u=e[c](t,c,s,o,null,i)}catch(e){u=e}if(!u||u instanceof Error||r((s||"React class")+": type specification of "+o+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error&&!(u.message in a)){a[u.message]=!0;var p=l?l():"";r("Failed "+o+" type: "+u.message+(null!=p?p:""))}}}}).call(this,e("_process"))},{"./lib/ReactPropTypesSecret":9,_process:28}],9:[function(e,t,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},{}],10:[function(e,t,n){(function(n){"use strict";"production"!==n.env.NODE_ENV&&function(){var n=e("react"),r=e("object-assign"),i=e("prop-types/checkPropTypes"),a=e("schedule"),o=e("schedule/tracing"),s=function(){};function l(e,t,n,r,i,a,o,l){if(s(t),!e){var c=void 0;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 u=[n,r,i,a,o,l],d=0;(c=new Error(t.replace(/%s/g,function(){return u[d++]}))).name="Invariant Violation"}throw c.framesToPop=1,c}}s=function(e){if(void 0===e)throw new Error("invariant requires an error message argument")},n||l(!1,"ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM.");var c=function(e,t,n,r,i,a,o,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this.onError(e)}};if("undefined"!=typeof window&&"function"==typeof window.dispatchEvent&&"undefined"!=typeof document&&"function"==typeof document.createEvent){var u=document.createElement("react");c=function(e,t,n,r,i,a,o,s,c){"undefined"==typeof document&&l(!1,"The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.");var d=document.createEvent("Event"),p=!0,h=window.event,f=Array.prototype.slice.call(arguments,3);var m=void 0,g=!1,v=!1;function y(e){if(m=e.error,g=!0,null===m&&0===e.colno&&0===e.lineno&&(v=!0),e.defaultPrevented&&null!=m&&"object"==typeof m)try{m._suppressLogging=!0}catch(e){}}var b="react-"+(e||"invokeguardedcallback");window.addEventListener("error",y),u.addEventListener(b,function e(){u.removeEventListener(b,e,!1),void 0!==window.event&&window.hasOwnProperty("event")&&(window.event=h),t.apply(n,f),p=!1},!1),d.initEvent(b,!1,!1),u.dispatchEvent(d),p&&(g?v&&(m=new Error("A cross-origin error was thrown. React doesn't have access to the actual error object in development. See https://fb.me/react-crossorigin-error for more information.")):m=new Error("An error was thrown inside one of your components, but React doesn't know what it was. This is likely due to browser flakiness. React does its best to preserve the \"Pause on exceptions\" behavior of the DevTools, which requires some DEV-mode only tricks. It's possible that these don't work in your browser. Try triggering the error in production mode, or switching to a modern browser. If you suspect that this is actually an issue with React, please file an issue."),this.onError(m)),window.removeEventListener("error",y)}}var d=c,p=!1,h=null,f=!1,m=null,g={onError:function(e){p=!0,h=e}};function v(e,t,n,r,i,a,o,s,l){p=!1,h=null,d.apply(g,arguments)}function y(){return p}function b(){if(p){var e=h;return p=!1,h=null,e}l(!1,"clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.")}var w=null,_={};function E(){if(w)for(var e in _){var t=_[e],n=w.indexOf(e);if(n>-1||l(!1,"EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.",e),!k[n]){t.extractEvents||l(!1,"EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.",e),k[n]=t;var r=t.eventTypes;for(var i in r)S(r[i],t,i)||l(!1,"EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.",i,e)}}}function S(e,t,n){C.hasOwnProperty(n)&&l(!1,"EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.",n),C[n]=e;var r=e.phasedRegistrationNames;if(r){for(var i in r){if(r.hasOwnProperty(i))T(r[i],t,n)}return!0}return!!e.registrationName&&(T(e.registrationName,t,n),!0)}function T(e,t,n){x[e]&&l(!1,"EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.",e),x[e]=t,P[e]=t.eventTypes[n].dependencies;var r=e.toLowerCase();N[r]=e,"onDoubleClick"===e&&(N.ondblclick=e)}var k=[],C={},x={},P={},N={};var D=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if(void 0===t)throw new Error("`warningWithoutStack(condition, format, ...args)` requires a warning message argument");if(r.length>8)throw new Error("warningWithoutStack() currently supports at most 8 arguments.");if(!e){if("undefined"!=typeof console){var a=r.map(function(e){return""+e}),o=a[0],s=a[1],l=a[2],c=a[3],u=a[4],d=a[5],p=a[6],h=a[7],f="Warning: "+t;switch(r.length){case 0:console.error(f);break;case 1:console.error(f,o);break;case 2:console.error(f,o,s);break;case 3:console.error(f,o,s,l);break;case 4:console.error(f,o,s,l,c);break;case 5:console.error(f,o,s,l,c,u);break;case 6:console.error(f,o,s,l,c,u,d);break;case 7:console.error(f,o,s,l,c,u,d,p);break;case 8:console.error(f,o,s,l,c,u,d,p,h);break;default:throw new Error("warningWithoutStack() currently supports at most 8 arguments.")}}try{var m=0,g="Warning: "+t.replace(/%s/g,function(){return r[m++]});throw new Error(g)}catch(e){}}},M=null,A=null,I=null;var O=void 0;function R(e,t,n,r){var i=e.type||"unknown-event";e.currentTarget=I(r),function(e,t,n,r,i,a,o,s,l){if(v.apply(this,arguments),p){var c=b();f||(f=!0,m=c)}}(i,n,void 0,e),e.currentTarget=null}function U(e,t){return null==t&&l(!1,"accumulateInto(...): Accumulated items must not be null or undefined."),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 L(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}O=function(e){var t=e._dispatchListeners,n=e._dispatchInstances,r=Array.isArray(t),i=r?t.length:t?1:0,a=Array.isArray(n),o=a?n.length:n?1:0;(a!==r||o!==i)&&D(!1,"EventPluginUtils: Invalid `event`.")};var F=null,j=function(e,t){e&&(!function(e,t){var n=e._dispatchListeners,r=e._dispatchInstances;if(O(e),Array.isArray(n))for(var i=0;i<n.length&&!e.isPropagationStopped();i++)R(e,0,n[i],r[i]);else n&&R(e,0,n,r);e._dispatchListeners=null,e._dispatchInstances=null}(e),e.isPersistent()||e.constructor.release(e))},W=function(e){return j(e)},B=function(e){return j(e)};var z={injectEventPluginOrder:function(e){w&&l(!1,"EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React."),w=Array.prototype.slice.call(e),E()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];_.hasOwnProperty(n)&&_[n]===r||(_[n]&&l(!1,"EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.",n),_[n]=r,t=!0)}t&&E()}};function V(e,t){var n,r=e.stateNode;if(!r)return null;var i=M(r);return i?(n=i[t],function(e,t,n){switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":return!(!n.disabled||(r=t,"button"!==r&&"input"!==r&&"select"!==r&&"textarea"!==r));default:return!1}var r}(t,e.type,i)?null:(n&&"function"!=typeof n&&l(!1,"Expected `%s` listener to be a function, instead got a value of `%s` type.",t,typeof n),n)):null}function q(e,t){null!==e&&(F=U(F,e));var n=F;F=null,n&&(L(n,t?W:B),F&&l(!1,"processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented."),function(){if(f){var e=m;throw f=!1,m=null,e}}())}function H(e,t,n,r){q(function(e,t,n,r){for(var i=null,a=0;a<k.length;a++){var o=k[a];if(o){var s=o.extractEvents(e,t,n,r);s&&(i=U(i,s))}}return i}(e,t,n,r),!1)}var K=0,G=1,$=2,Y=3,Q=4,X=5,J=6,Z=7,ee=8,te=9,ne=10,re=11,ie=12,ae=13,oe=14,se=15,le=16,ce=Math.random().toString(36).slice(2),ue="__reactInternalInstance$"+ce,de="__reactEventHandlers$"+ce;function pe(e,t){t[ue]=e}function he(e){if(e[ue])return e[ue];for(;!e[ue];){if(!e.parentNode)return null;e=e.parentNode}var t=e[ue];return t.tag===Z||t.tag===ee?t:null}function fe(e){var t=e[ue];return t&&(t.tag===Z||t.tag===ee)?t:null}function me(e){if(e.tag===Z||e.tag===ee)return e.stateNode;l(!1,"getNodeFromInstance: Invalid argument.")}function ge(e){return e[de]||null}function ve(e,t){e[de]=t}function ye(e){do{e=e.return}while(e&&e.tag!==Z);return e||null}function be(e,t,n,r,i){for(var a=e&&t?function(e,t){for(var n=0,r=e;r;r=ye(r))n++;for(var i=0,a=t;a;a=ye(a))i++;for(;n-i>0;)e=ye(e),n--;for(;i-n>0;)t=ye(t),i--;for(var o=n;o--;){if(e===t||e===t.alternate)return e;e=ye(e),t=ye(t)}return null}(e,t):null,o=[];e&&e!==a;){var s=e.alternate;if(null!==s&&s===a)break;o.push(e),e=ye(e)}for(var l=[];t&&t!==a;){var c=t.alternate;if(null!==c&&c===a)break;l.push(t),t=ye(t)}for(var u=0;u<o.length;u++)n(o[u],"bubbled",r);for(var d=l.length;d-- >0;)n(l[d],"captured",i)}function we(e,t,n){e||D(!1,"Dispatching inst must not be null");var r=function(e,t,n){return V(e,t.dispatchConfig.phasedRegistrationNames[n])}(e,n,t);r&&(n._dispatchListeners=U(n._dispatchListeners,r),n._dispatchInstances=U(n._dispatchInstances,e))}function _e(e){e&&e.dispatchConfig.phasedRegistrationNames&&function(e,t,n){for(var r=[];e;)r.push(e),e=ye(e);var i=void 0;for(i=r.length;i-- >0;)t(r[i],"captured",n);for(i=0;i<r.length;i++)t(r[i],"bubbled",n)}(e._targetInst,we,e)}function Ee(e,t,n){if(e&&n&&n.dispatchConfig.registrationName){var r=V(e,n.dispatchConfig.registrationName);r&&(n._dispatchListeners=U(n._dispatchListeners,r),n._dispatchInstances=U(n._dispatchInstances,e))}}function Se(e){e&&e.dispatchConfig.registrationName&&Ee(e._targetInst,0,e)}function Te(e){L(e,_e)}var ke=!("undefined"==typeof window||!window.document||!window.document.createElement);function Ce(e){return e}function xe(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Pe={animationend:xe("Animation","AnimationEnd"),animationiteration:xe("Animation","AnimationIteration"),animationstart:xe("Animation","AnimationStart"),transitionend:xe("Transition","TransitionEnd")},Ne={},De={};function Me(e){if(Ne[e])return Ne[e];if(!Pe[e])return e;var t=Pe[e];for(var n in t)if(t.hasOwnProperty(n)&&n in De)return Ne[e]=t[n];return e}ke&&(De=document.createElement("div").style,"AnimationEvent"in window||(delete Pe.animationend.animation,delete Pe.animationiteration.animation,delete Pe.animationstart.animation),"TransitionEvent"in window||delete Pe.transitionend.transition);var Ae=Ce("abort"),Ie=Ce(Me("animationend")),Oe=Ce(Me("animationiteration")),Re=Ce(Me("animationstart")),Ue=Ce("blur"),Le=Ce("canplay"),Fe=Ce("canplaythrough"),je=Ce("cancel"),We=Ce("change"),Be=Ce("click"),ze=Ce("close"),Ve=Ce("compositionend"),qe=Ce("compositionstart"),He=Ce("compositionupdate"),Ke=Ce("contextmenu"),Ge=Ce("copy"),$e=Ce("cut"),Ye=Ce("dblclick"),Qe=Ce("auxclick"),Xe=Ce("drag"),Je=Ce("dragend"),Ze=Ce("dragenter"),et=Ce("dragexit"),tt=Ce("dragleave"),nt=Ce("dragover"),rt=Ce("dragstart"),it=Ce("drop"),at=Ce("durationchange"),ot=Ce("emptied"),st=Ce("encrypted"),lt=Ce("ended"),ct=Ce("error"),ut=Ce("focus"),dt=Ce("gotpointercapture"),pt=Ce("input"),ht=Ce("invalid"),ft=Ce("keydown"),mt=Ce("keypress"),gt=Ce("keyup"),vt=Ce("load"),yt=Ce("loadstart"),bt=Ce("loadeddata"),wt=Ce("loadedmetadata"),_t=Ce("lostpointercapture"),Et=Ce("mousedown"),St=Ce("mousemove"),Tt=Ce("mouseout"),kt=Ce("mouseover"),Ct=Ce("mouseup"),xt=Ce("paste"),Pt=Ce("pause"),Nt=Ce("play"),Dt=Ce("playing"),Mt=Ce("pointercancel"),At=Ce("pointerdown"),It=Ce("pointermove"),Ot=Ce("pointerout"),Rt=Ce("pointerover"),Ut=Ce("pointerup"),Lt=Ce("progress"),Ft=Ce("ratechange"),jt=Ce("reset"),Wt=Ce("scroll"),Bt=Ce("seeked"),zt=Ce("seeking"),Vt=Ce("selectionchange"),qt=Ce("stalled"),Ht=Ce("submit"),Kt=Ce("suspend"),Gt=Ce("textInput"),$t=Ce("timeupdate"),Yt=Ce("toggle"),Qt=Ce("touchcancel"),Xt=Ce("touchend"),Jt=Ce("touchmove"),Zt=Ce("touchstart"),en=Ce(Me("transitionend")),tn=Ce("volumechange"),nn=Ce("waiting"),rn=Ce("wheel"),an=[Ae,Le,Fe,at,ot,st,lt,ct,bt,wt,yt,Pt,Nt,Dt,Lt,Ft,Bt,zt,qt,Kt,$t,tn,nn];function on(e){return function(e){return e}(e)}var sn=null,ln=null,cn=null;function un(){if(cn)return cn;var e=void 0,t=ln,n=t.length,r=void 0,i=dn(),a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);var s=r>1?1-r:void 0;return cn=i.slice(e,s)}function dn(){return"value"in sn?sn.value:sn.textContent}var pn=10,hn={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};function fn(){return!0}function mn(){return!1}function gn(e,t,n,r){delete this.nativeEvent,delete this.preventDefault,delete this.stopPropagation,delete this.isDefaultPrevented,delete this.isPropagationStopped,this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n;var i=this.constructor.Interface;for(var a in i)if(i.hasOwnProperty(a)){delete this[a];var o=i[a];o?this[a]=o(n):"target"===a?this.target=r:this[a]=n[a]}var s=null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue;return this.isDefaultPrevented=s?fn:mn,this.isPropagationStopped=mn,this}function vn(e,t){var n="function"==typeof t;return{configurable:!0,set:function(e){return r(n?"setting the method":"setting the property","This is effectively a no-op"),e},get:function(){return r(n?"accessing the method":"accessing the property",n?"This is a no-op function":"This is set to null"),t}};function r(t,n){D(!1,"This synthetic event is reused for performance reasons. If you're seeing this, you're %s `%s` on a released/nullified synthetic event. %s. If you must keep the original synthetic event around, use event.persist(). See https://fb.me/react-event-pooling for more information.",t,e,n)}}function yn(e,t,n,r){if(this.eventPool.length){var i=this.eventPool.pop();return this.call(i,e,t,n,r),i}return new this(e,t,n,r)}function bn(e){e instanceof this||l(!1,"Trying to release an event instance into a pool of a different type."),e.destructor(),this.eventPool.length<pn&&this.eventPool.push(e)}function wn(e){e.eventPool=[],e.getPooled=yn,e.release=bn}r(gn.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=fn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=fn)},persist:function(){this.isPersistent=fn},isPersistent:mn,destructor:function(){var e=this.constructor.Interface;for(var t in e)Object.defineProperty(this,t,vn(t,e[t]));this.dispatchConfig=null,this._targetInst=null,this.nativeEvent=null,this.isDefaultPrevented=mn,this.isPropagationStopped=mn,this._dispatchListeners=null,this._dispatchInstances=null,Object.defineProperty(this,"nativeEvent",vn("nativeEvent",null)),Object.defineProperty(this,"isDefaultPrevented",vn("isDefaultPrevented",mn)),Object.defineProperty(this,"isPropagationStopped",vn("isPropagationStopped",mn)),Object.defineProperty(this,"preventDefault",vn("preventDefault",function(){})),Object.defineProperty(this,"stopPropagation",vn("stopPropagation",function(){}))}}),gn.Interface=hn,gn.extend=function(e){var t=this,n=function(){};n.prototype=t.prototype;var i=new n;function a(){return t.apply(this,arguments)}return r(i,a.prototype),a.prototype=i,a.prototype.constructor=a,a.Interface=r({},t.Interface,e),a.extend=t.extend,wn(a),a},wn(gn);var _n=gn.extend({data:null}),En=gn.extend({data:null}),Sn=[9,13,27,32],Tn=229,kn=ke&&"CompositionEvent"in window,Cn=null;ke&&"documentMode"in document&&(Cn=document.documentMode);var xn=ke&&"TextEvent"in window&&!Cn,Pn=ke&&(!kn||Cn&&Cn>8&&Cn<=11),Nn=32,Dn=String.fromCharCode(Nn),Mn={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:[Ve,mt,Gt,xt]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:[Ue,Ve,ft,mt,gt,Et]},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:[Ue,qe,ft,mt,gt,Et]},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:[Ue,He,ft,mt,gt,Et]}},An=!1;function In(e,t){switch(e){case gt:return-1!==Sn.indexOf(t.keyCode);case ft:return t.keyCode!==Tn;case mt:case Et:case Ue:return!0;default:return!1}}function On(e){var t=e.detail;return"object"==typeof t&&"data"in t?t.data:null}function Rn(e){return"ko"===e.locale}var Un=!1;function Ln(e,t,n,r){var i=void 0,a=void 0;if(kn?i=function(e){switch(e){case qe:return Mn.compositionStart;case Ve:return Mn.compositionEnd;case He:return Mn.compositionUpdate}}(e):Un?In(e,n)&&(i=Mn.compositionEnd):function(e,t){return e===ft&&t.keyCode===Tn}(e,n)&&(i=Mn.compositionStart),!i)return null;Pn&&!Rn(n)&&(Un||i!==Mn.compositionStart?i===Mn.compositionEnd&&Un&&(a=un()):Un=function(e){return sn=e,ln=dn(),!0}(r));var o=_n.getPooled(i,t,n,r);if(a)o.data=a;else{var s=On(n);null!==s&&(o.data=s)}return Te(o),o}function Fn(e,t){if(Un){if(e===Ve||!kn&&In(e,t)){var n=un();return sn=null,ln=null,cn=null,Un=!1,n}return null}switch(e){case xt:return null;case mt:if(!function(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}(t)){if(t.char&&t.char.length>1)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case Ve:return Pn&&!Rn(t)?null:t.data;default:return null}}function jn(e,t,n,r){var i=void 0;if(!(i=xn?function(e,t){switch(e){case Ve:return On(t);case mt:return t.which!==Nn?null:(An=!0,Dn);case Gt:var n=t.data;return n===Dn&&An?null:n;default:return null}}(e,n):Fn(e,n)))return null;var a=En.getPooled(Mn.beforeInput,t,n,r);return a.data=i,Te(a),a}var Wn={eventTypes:Mn,extractEvents:function(e,t,n,r){var i=Ln(e,t,n,r),a=jn(e,t,n,r);return null===i?a:null===a?i:[i,a]}},Bn=null,zn=null,Vn=null;function qn(e){var t=A(e);if(t){"function"!=typeof Bn&&l(!1,"setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue.");var n=M(t.stateNode);Bn(t.stateNode,t.type,n)}}function Hn(e){zn?Vn?Vn.push(e):Vn=[e]:zn=e}function Kn(){if(zn){var e=zn,t=Vn;if(zn=null,Vn=null,qn(e),t)for(var n=0;n<t.length;n++)qn(t[n])}}var Gn=function(e,t){return e(t)},$n=function(e,t,n){return e(t,n)},Yn=function(){},Qn=!1;function Xn(e,t){if(Qn)return e(t);Qn=!0;try{return Gn(e,t)}finally{Qn=!1,(null!==zn||null!==Vn)&&(Yn(),Kn())}}var Jn={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 Zn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Jn[e.type]:"textarea"===t}var er=1,tr=3,nr=8,rr=9,ir=11;function ar(e){var t=e.target||e.srcElement||window;return t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===tr?t.parentNode:t}function or(e){if(!ke)return!1;var t="on"+e,n=t in document;if(!n){var r=document.createElement("div");r.setAttribute(t,"return;"),n="function"==typeof r[t]}return n}function sr(e){var t=e.type,n=e.nodeName;return n&&"input"===n.toLowerCase()&&("checkbox"===t||"radio"===t)}function lr(e){return e._valueTracker}function cr(e){lr(e)||(e._valueTracker=function(e){var t=sr(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){!function(e){e._valueTracker=null}(e),delete e[t]}}}}(e))}function ur(e){if(!e)return!1;var t=lr(e);if(!t)return!0;var n=t.getValue(),r=function(e){var t="";return e?t=sr(e)?e.checked?"true":"false":e.value:t}(e);return r!==n&&(t.setValue(r),!0)}var dr=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,pr=/^(.*)[\\\/]/,hr=function(e,t,n){var r="";if(t){var i=t.fileName,a=i.replace(pr,"");if(/^index\./.test(a)){var o=i.match(pr);if(o){var s=o[1];if(s)a=s.replace(pr,"")+"/"+a}}r=" (at "+a+":"+t.lineNumber+")"}else n&&(r=" (created by "+n+")");return"\n in "+(e||"Unknown")+r},fr="function"==typeof Symbol&&Symbol.for,mr=fr?Symbol.for("react.element"):60103,gr=fr?Symbol.for("react.portal"):60106,vr=fr?Symbol.for("react.fragment"):60107,yr=fr?Symbol.for("react.strict_mode"):60108,br=fr?Symbol.for("react.profiler"):60114,wr=fr?Symbol.for("react.provider"):60109,_r=fr?Symbol.for("react.context"):60110,Er=fr?Symbol.for("react.async_mode"):60111,Sr=fr?Symbol.for("react.forward_ref"):60112,Tr=fr?Symbol.for("react.placeholder"):60113,kr="function"==typeof Symbol&&Symbol.iterator,Cr="@@iterator";function xr(e){if(null===e||"object"!=typeof e)return null;var t=kr&&e[kr]||e[Cr];return"function"==typeof t?t:null}var Pr=0,Nr=1,Dr=2;function Mr(e){return e._reactResult}function Ar(e){if(null==e)return null;if("number"==typeof e.tag&&D(!1,"Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case Er:return"AsyncMode";case vr:return"Fragment";case gr:return"Portal";case br:return"Profiler";case yr:return"StrictMode";case Tr:return"Placeholder"}if("object"==typeof e){switch(e.$$typeof){case _r:return"Context.Consumer";case wr:return"Context.Provider";case Sr:var t=e.render,n=t.displayName||t.name||"";return e.displayName||(""!==n?"ForwardRef("+n+")":"ForwardRef")}if("function"==typeof e.then){var r=function(e){return e._reactStatus===Nr?e._reactResult:null}(e);if(r)return Ar(r)}}return null}var Ir=dr.ReactDebugCurrentFrame;function Or(e){switch(e.tag){case Q:case K:case G:case $:case Y:case Z:case ne:var t=e._debugOwner,n=e._debugSource,r=Ar(e.type),i=null;return t&&(i=Ar(t.type)),hr(r,n,i);default:return""}}function Rr(e){var t="",n=e;do{t+=Or(n),n=n.return}while(n);return t}var Ur=null,Lr=null;function Fr(){if(null===Ur)return null;var e=Ur._debugOwner;return null!==e&&void 0!==e?Ar(e.type):null}function jr(){return null===Ur?"":Rr(Ur)}function Wr(){Ir.getCurrentStack=null,Ur=null,Lr=null}function Br(e){Ir.getCurrentStack=jr,Ur=e,Lr=null}function zr(e){Lr=e}var Vr=function(e,t){if(!e){for(var n=dr.ReactDebugCurrentFrame.getStackAddendum(),r=arguments.length,i=Array(r>2?r-2:0),a=2;a<r;a++)i[a-2]=arguments[a];D.apply(void 0,[!1,t+"%s"].concat(i,[n]))}},qr=0,Hr=2,Kr=3,Gr=4,$r=5,Yr=6,Qr=":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",Xr=Qr+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Jr="data-reactroot",Zr=new RegExp("^["+Qr+"]["+Xr+"]*$"),ei=Object.prototype.hasOwnProperty,ti={},ni={};function ri(e){return!!ei.call(ni,e)||!ei.call(ti,e)&&(Zr.test(e)?(ni[e]=!0,!0):(ti[e]=!0,Vr(!1,"Invalid attribute name: `%s`",e),!1))}function ii(e,t,n){return null!==t?t.type===qr:!n&&(e.length>2&&("o"===e[0]||"O"===e[0])&&("n"===e[1]||"N"===e[1]))}function ai(e,t,n,r){if(null!==n&&n.type===qr)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":if(r)return!1;if(null!==n)return!n.acceptsBooleans;var i=e.toLowerCase().slice(0,5);return"data-"!==i&&"aria-"!==i;default:return!1}}function oi(e,t,n,r){if(null===t||void 0===t)return!0;if(ai(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case Kr:return!t;case Gr:return!1===t;case $r:return isNaN(t);case Yr:return isNaN(t)||t<1}return!1}function si(e){return ci.hasOwnProperty(e)?ci[e]:null}function li(e,t,n,r,i){this.acceptsBooleans=t===Hr||t===Kr||t===Gr,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t}var ci={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach(function(e){ci[e]=new li(e,qr,!1,e,null)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0],n=e[1];ci[t]=new li(t,1,!1,n,null)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){ci[e]=new li(e,Hr,!1,e.toLowerCase(),null)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ci[e]=new li(e,Hr,!1,e,null)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(function(e){ci[e]=new li(e,Kr,!1,e.toLowerCase(),null)}),["checked","multiple","muted","selected"].forEach(function(e){ci[e]=new li(e,Kr,!0,e,null)}),["capture","download"].forEach(function(e){ci[e]=new li(e,Gr,!1,e,null)}),["cols","rows","size","span"].forEach(function(e){ci[e]=new li(e,Yr,!1,e,null)}),["rowSpan","start"].forEach(function(e){ci[e]=new li(e,$r,!1,e.toLowerCase(),null)});var ui=/[\-\:]([a-z])/g,di=function(e){return e[1].toUpperCase()};function pi(e,t,n,r){if(r.mustUseProperty)return e[r.propertyName];var i=r.attributeName,a=null;if(r.type===Gr){if(e.hasAttribute(i)){var o=e.getAttribute(i);return""===o||(oi(t,n,r,!1)?o:o===""+n?n:o)}}else if(e.hasAttribute(i)){if(oi(t,n,r,!1))return e.getAttribute(i);if(r.type===Kr)return n;a=e.getAttribute(i)}return oi(t,n,r,!1)?null===a?n:a:a===""+n?n:a}function hi(e,t,n){if(ri(t)){if(!e.hasAttribute(t))return void 0===n?void 0:null;var r=e.getAttribute(t);return r===""+n?n:r}}function fi(e,t,n,r){var i=si(t);if(!ii(t,i,r))if(oi(t,n,i,r)&&(n=null),r||null===i){if(ri(t)){var a=t;null===n?e.removeAttribute(a):e.setAttribute(a,""+n)}}else if(i.mustUseProperty){var o=i.propertyName;if(null===n){var s=i.type;e[o]=s!==Kr&&""}else e[o]=n}else{var l=i.attributeName,c=i.attributeNamespace;if(null===n)e.removeAttribute(l);else{var u=i.type,d=void 0;d=u===Kr||u===Gr&&!0===n?"":""+n,c?e.setAttributeNS(c,l,d):e.setAttribute(l,d)}}}function mi(e){return""+e}function gi(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}["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-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"].forEach(function(e){var t=e.replace(ui,di);ci[t]=new li(t,1,!1,e,null)}),["xlink:actuate","xlink:arcrole","xlink:href","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(e){var t=e.replace(ui,di);ci[t]=new li(t,1,!1,e,"http://www.w3.org/1999/xlink")}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(ui,di);ci[t]=new li(t,1,!1,e,"http://www.w3.org/XML/1998/namespace")}),ci.tabIndex=new li("tabIndex",1,!1,"tabindex",null);var vi,yi={checkPropTypes:null};vi=dr.ReactDebugCurrentFrame;var bi={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},wi={value:function(e,t,n){return bi[e.type]||e.onChange||e.readOnly||e.disabled||null==e[t]?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(e,t,n){return e.onChange||e.readOnly||e.disabled||null==e[t]?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}};yi.checkPropTypes=function(e,t){i(wi,t,"prop",e,vi.getStackAddendum)};var _i=!0,Ei=!1,Si=!1,Ti=!1,ki=!0,Ci=!0,xi=!1,Pi=!1,Ni=!0,Di=!0,Mi=!1,Ai=!1,Ii=!1,Oi=!1,Ri=!1;function Ui(e){return"checkbox"===e.type||"radio"===e.type?null!=e.checked:null!=e.value}function Li(e,t){var n=e,i=t.checked;return r({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=i?i:n._wrapperState.initialChecked})}function Fi(e,t){yi.checkPropTypes("input",t),void 0===t.checked||void 0===t.defaultChecked||Ii||(Vr(!1,"%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://fb.me/react-controlled-components",Fr()||"A component",t.type),Ii=!0),void 0===t.value||void 0===t.defaultValue||Ai||(Vr(!1,"%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://fb.me/react-controlled-components",Fr()||"A component",t.type),Ai=!0);var n=e,r=null==t.defaultValue?"":t.defaultValue;n._wrapperState={initialChecked:null!=t.checked?t.checked:t.defaultChecked,initialValue:gi(null!=t.value?t.value:r),controlled:Ui(t)}}function ji(e,t){var n=e,r=t.checked;null!=r&&fi(n,"checked",r,!1)}function Wi(e,t){var n=e,r=Ui(t);n._wrapperState.controlled||!r||Ri||(Vr(!1,"A component is changing an uncontrolled input of type %s to be controlled. Input elements should not switch from uncontrolled to controlled (or vice versa). Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://fb.me/react-controlled-components",t.type),Ri=!0),!n._wrapperState.controlled||r||Oi||(Vr(!1,"A component is changing a controlled input of type %s to be uncontrolled. Input elements should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://fb.me/react-controlled-components",t.type),Oi=!0),ji(e,t);var i=gi(t.value),a=t.type;if(null!=i)"number"===a?(0===i&&""===n.value||n.value!=i)&&(n.value=mi(i)):n.value!==mi(i)&&(n.value=mi(i));else if("submit"===a||"reset"===a)return void n.removeAttribute("value");Mi?t.hasOwnProperty("defaultValue")&&Vi(n,t.type,gi(t.defaultValue)):t.hasOwnProperty("value")?Vi(n,t.type,i):t.hasOwnProperty("defaultValue")&&Vi(n,t.type,gi(t.defaultValue)),Mi?null==t.defaultChecked?n.removeAttribute("checked"):n.defaultChecked=!!t.defaultChecked:null==t.checked&&null!=t.defaultChecked&&(n.defaultChecked=!!t.defaultChecked)}function Bi(e,t,n){var r=e;if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type,a="submit"===i||"reset"===i;if(a&&(void 0===t.value||null===t.value))return;var o=mi(r._wrapperState.initialValue);if(!n)if(Mi){var s=gi(t.value);null!=s&&(a||s!==r.value)&&(r.value=mi(s))}else o!==r.value&&(r.value=o);if(Mi){var l=gi(t.defaultValue);null!=l&&(r.defaultValue=mi(l))}else r.defaultValue=o}var c=r.name;""!==c&&(r.name=""),Mi?(n||ji(e,t),t.hasOwnProperty("defaultChecked")&&(r.defaultChecked=!r.defaultChecked,r.defaultChecked=!!t.defaultChecked)):(r.defaultChecked=!r.defaultChecked,r.defaultChecked=!!r._wrapperState.initialChecked),""!==c&&(r.name=c)}function zi(e,t){var n=e;Wi(n,t),function(e,t){var n=t.name;if("radio"===t.type&&null!=n){for(var r=e;r.parentNode;)r=r.parentNode;for(var i=r.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),a=0;a<i.length;a++){var o=i[a];if(o!==e&&o.form===e.form){var s=ge(o);s||l(!1,"ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported."),ur(o),Wi(o,s)}}}}(n,t)}function Vi(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=mi(e._wrapperState.initialValue):e.defaultValue!==mi(n)&&(e.defaultValue=mi(n)))}var qi={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:[Ue,We,Be,ut,pt,ft,gt,Vt]}};function Hi(e,t,n){var r=gn.getPooled(qi.change,e,t,n);return r.type="change",Hn(n),Te(r),r}var Ki=null,Gi=null;function $i(e){q(e,!1)}function Yi(e){if(ur(me(e)))return e}function Qi(e,t){if(e===We)return t}var Xi=!1;function Ji(){Ki&&(Ki.detachEvent("onpropertychange",Zi),Ki=null,Gi=null)}function Zi(e){"value"===e.propertyName&&Yi(Gi)&&function(e){Xn($i,Hi(Gi,e,ar(e)))}(e)}function ea(e,t,n){e===ut?(Ji(),function(e,t){Gi=t,(Ki=e).attachEvent("onpropertychange",Zi)}(t,n)):e===Ue&&Ji()}function ta(e,t){if(e===Vt||e===gt||e===ft)return Yi(Gi)}function na(e,t){if(e===Be)return Yi(t)}function ra(e,t){if(e===pt||e===We)return Yi(t)}ke&&(Xi=or("input")&&(!document.documentMode||document.documentMode>9));var ia={eventTypes:qi,_isInputEventSupported:Xi,extractEvents:function(e,t,n,r){var i,a,o,s,l=t?me(t):window,c=void 0,u=void 0;if("select"===(a=(i=l).nodeName&&i.nodeName.toLowerCase())||"input"===a&&"file"===i.type?c=Qi:Zn(l)?Xi?c=ra:(c=ta,u=ea):function(e){var t=e.nodeName;return t&&"input"===t.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)}(l)&&(c=na),c){var d=c(e,t);if(d)return Hi(d,n,r)}u&&u(e,l,t),e===Ue&&(s=(o=l)._wrapperState)&&s.controlled&&"number"===o.type&&(Mi||Vi(o,"number",o.value))}},aa=gn.extend({view:null,detail:null}),oa={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function sa(e){var t=this.nativeEvent;if(t.getModifierState)return t.getModifierState(e);var n=oa[e];return!!n&&!!t[n]}function la(e){return sa}var ca=0,ua=0,da=!1,pa=!1,ha=aa.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:la,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=ca;return ca=e.screenX,da?"mousemove"===e.type?e.screenX-t:0:(da=!0,0)},movementY:function(e){if("movementY"in e)return e.movementY;var t=ua;return ua=e.screenY,pa?"mousemove"===e.type?e.screenY-t:0:(pa=!0,0)}}),fa=ha.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),ma={mouseEnter:{registrationName:"onMouseEnter",dependencies:[Tt,kt]},mouseLeave:{registrationName:"onMouseLeave",dependencies:[Tt,kt]},pointerEnter:{registrationName:"onPointerEnter",dependencies:[Ot,Rt]},pointerLeave:{registrationName:"onPointerLeave",dependencies:[Ot,Rt]}},ga={eventTypes:ma,extractEvents:function(e,t,n,r){var i=e===kt||e===Rt,a=e===Tt||e===Ot;if(i&&(n.relatedTarget||n.fromElement))return null;if(!a&&!i)return null;var o=void 0;if(r.window===r)o=r;else{var s=r.ownerDocument;o=s?s.defaultView||s.parentWindow:window}var l=void 0,c=void 0;if(a){l=t;var u=n.relatedTarget||n.toElement;c=u?he(u):null}else l=null,c=t;if(l===c)return null;var d=void 0,p=void 0,h=void 0,f=void 0;e===Tt||e===kt?(d=ha,p=ma.mouseLeave,h=ma.mouseEnter,f="mouse"):e!==Ot&&e!==Rt||(d=fa,p=ma.pointerLeave,h=ma.pointerEnter,f="pointer");var m=null==l?o:me(l),g=null==c?o:me(c),v=d.getPooled(p,l,n,r);v.type=f+"leave",v.target=m,v.relatedTarget=g;var y=d.getPooled(h,c,n,r);return y.type=f+"enter",y.target=g,y.relatedTarget=m,function(e,t,n,r){be(n,r,Ee,e,t)}(v,y,l,c),[v,y]}},va=Object.prototype.hasOwnProperty;function ya(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function ba(e,t){if(ya(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(var i=0;i<n.length;i++)if(!va.call(t,n[i])||!ya(e[n[i]],t[n[i]]))return!1;return!0}function wa(e){return e._reactInternalFiber}var _a=0,Ea=1,Sa=2,Ta=4,ka=6,Ca=8,xa=16,Pa=32,Na=64,Da=128,Ma=256,Aa=420,Ia=511,Oa=512,Ra=1024,Ua=dr.ReactCurrentOwner,La=1,Fa=2,ja=3;function Wa(e){var t=e;if(e.alternate)for(;t.return;)t=t.return;else{if((t.effectTag&Sa)!==_a)return La;for(;t.return;)if(((t=t.return).effectTag&Sa)!==_a)return La}return t.tag===X?Fa:ja}function Ba(e){return Wa(e)===Fa}function za(e){Wa(e)!==Fa&&l(!1,"Unable to find node on an unmounted component.")}function Va(e){var t=e.alternate;if(!t){var n=Wa(e);return n===ja&&l(!1,"Unable to find node on an unmounted component."),n===La?null:e}for(var r=e,i=t;;){var a=r.return,o=a?a.alternate:null;if(!a||!o)break;if(a.child===o.child){for(var s=a.child;s;){if(s===r)return za(a),e;if(s===i)return za(a),t;s=s.sibling}l(!1,"Unable to find node on an unmounted component.")}if(r.return!==i.return)r=a,i=o;else{for(var c=!1,u=a.child;u;){if(u===r){c=!0,r=a,i=o;break}if(u===i){c=!0,i=a,r=o;break}u=u.sibling}if(!c){for(u=o.child;u;){if(u===r){c=!0,r=o,i=a;break}if(u===i){c=!0,i=o,r=a;break}u=u.sibling}c||l(!1,"Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}r.alternate!==i&&l(!1,"Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}return r.tag!==X&&l(!1,"Unable to find node on an unmounted component."),r.stateNode.current===r?e:t}function qa(e){var t=Va(e);if(!t)return null;for(var n=t;;){if(n.tag===Z||n.tag===ee)return n;if(n.child)n.child.return=n,n=n.child;else{if(n===t)return null;for(;!n.sibling;){if(!n.return||n.return===t)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}}return null}var Ha=gn.extend({animationName:null,elapsedTime:null,pseudoElement:null}),Ka=gn.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ga=aa.extend({relatedTarget:null});function $a(e){var t=void 0,n=e.keyCode;return"charCode"in e?0===(t=e.charCode)&&13===n&&(t=13):t=n,10===t&&(t=13),t>=32||13===t?t:0}var Ya={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Qa={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"};var Xa=aa.extend({key:function(e){if(e.key){var t=Ya[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=$a(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?Qa[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:la,charCode:function(e){return"keypress"===e.type?$a(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?$a(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Ja=ha.extend({dataTransfer:null}),Za=aa.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:la}),eo=gn.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),to=ha.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}),no=[[Ae,"abort"],[Ie,"animationEnd"],[Oe,"animationIteration"],[Re,"animationStart"],[Le,"canPlay"],[Fe,"canPlayThrough"],[Xe,"drag"],[Ze,"dragEnter"],[et,"dragExit"],[tt,"dragLeave"],[nt,"dragOver"],[at,"durationChange"],[ot,"emptied"],[st,"encrypted"],[lt,"ended"],[ct,"error"],[dt,"gotPointerCapture"],[vt,"load"],[bt,"loadedData"],[wt,"loadedMetadata"],[yt,"loadStart"],[_t,"lostPointerCapture"],[St,"mouseMove"],[Tt,"mouseOut"],[kt,"mouseOver"],[Dt,"playing"],[It,"pointerMove"],[Ot,"pointerOut"],[Rt,"pointerOver"],[Lt,"progress"],[Wt,"scroll"],[zt,"seeking"],[qt,"stalled"],[Kt,"suspend"],[$t,"timeUpdate"],[Yt,"toggle"],[Jt,"touchMove"],[en,"transitionEnd"],[nn,"waiting"],[rn,"wheel"]],ro={},io={};function ao(e,t){var n=e[0],r=e[1],i="on"+(r[0].toUpperCase()+r.slice(1)),a={phasedRegistrationNames:{bubbled:i,captured:i+"Capture"},dependencies:[n],isInteractive:t};ro[r]=a,io[n]=a}[[Ue,"blur"],[je,"cancel"],[Be,"click"],[ze,"close"],[Ke,"contextMenu"],[Ge,"copy"],[$e,"cut"],[Qe,"auxClick"],[Ye,"doubleClick"],[Je,"dragEnd"],[rt,"dragStart"],[it,"drop"],[ut,"focus"],[pt,"input"],[ht,"invalid"],[ft,"keyDown"],[mt,"keyPress"],[gt,"keyUp"],[Et,"mouseDown"],[Ct,"mouseUp"],[xt,"paste"],[Pt,"pause"],[Nt,"play"],[Mt,"pointerCancel"],[At,"pointerDown"],[Ut,"pointerUp"],[Ft,"rateChange"],[jt,"reset"],[Bt,"seeked"],[Ht,"submit"],[Qt,"touchCancel"],[Xt,"touchEnd"],[Zt,"touchStart"],[tn,"volumeChange"]].forEach(function(e){ao(e,!0)}),no.forEach(function(e){ao(e,!1)});var oo=[Ae,je,Le,Fe,ze,at,ot,st,lt,ct,pt,ht,vt,bt,wt,yt,Pt,Nt,Dt,Lt,Ft,jt,Bt,zt,qt,Ht,Kt,$t,Yt,tn,nn],so={eventTypes:ro,isInteractiveTopLevelEventType:function(e){var t=io[e];return void 0!==t&&!0===t.isInteractive},extractEvents:function(e,t,n,r){var i=io[e];if(!i)return null;var a=void 0;switch(e){case mt:if(0===$a(n))return null;case ft:case gt:a=Xa;break;case Ue:case ut:a=Ga;break;case Be:if(2===n.button)return null;case Qe:case Ye:case Et:case St:case Ct:case Tt:case kt:case Ke:a=ha;break;case Xe:case Je:case Ze:case et:case tt:case nt:case rt:case it:a=Ja;break;case Qt:case Xt:case Jt:case Zt:a=Za;break;case Ie:case Oe:case Re:a=Ha;break;case en:a=eo;break;case Wt:a=aa;break;case rn:a=to;break;case Ge:case $e:case xt:a=Ka;break;case dt:case _t:case Mt:case At:case It:case Ot:case Rt:case Ut:a=fa;break;default:-1===oo.indexOf(e)&&D(!1,"SimpleEventPlugin: Unhandled event type, `%s`. This warning is likely caused by a bug in React. Please file an issue.",e),a=gn}var o=a.getPooled(i,t,n,r);return Te(o),o}},lo=so.isInteractiveTopLevelEventType,co=10,uo=[];function po(e){for(;e.return;)e=e.return;return e.tag!==X?null:e.stateNode.containerInfo}function ho(e){var t=e.targetInst,n=t;do{if(!n){e.ancestors.push(n);break}var r=po(n);if(!r)break;e.ancestors.push(n),n=he(r)}while(n);for(var i=0;i<e.ancestors.length;i++)t=e.ancestors[i],H(e.topLevelType,t,e.nativeEvent,ar(e.nativeEvent))}var fo=!0;function mo(e){fo=!!e}function go(e,t){if(!t)return null;var n=lo(e)?yo:bo;!function(e,t,n){e.addEventListener(t,n,!1)}(t,on(e),n.bind(null,e))}function vo(e,t){if(!t)return null;var n=lo(e)?yo:bo;!function(e,t,n){e.addEventListener(t,n,!0)}(t,on(e),n.bind(null,e))}function yo(e,t){$n(bo,e,t)}function bo(e,t){if(fo){var n=he(ar(t));null===n||"number"!=typeof n.tag||Ba(n)||(n=null);var r,i=function(e,t,n){if(uo.length){var r=uo.pop();return r.topLevelType=e,r.nativeEvent=t,r.targetInst=n,r}return{topLevelType:e,nativeEvent:t,targetInst:n,ancestors:[]}}(e,t,n);try{Xn(ho,i)}finally{(r=i).topLevelType=null,r.nativeEvent=null,r.targetInst=null,r.ancestors.length=0,uo.length<co&&uo.push(r)}}}var wo={},_o=0,Eo="_reactListenersID"+(""+Math.random()).slice(2);function So(e){return Object.prototype.hasOwnProperty.call(e,Eo)||(e[Eo]=_o++,wo[e[Eo]]={}),wo[e[Eo]]}function To(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function ko(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Co(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function xo(e,t){for(var n=ko(e),r=0,i=0;n;){if(n.nodeType===tr){if(i=r+n.textContent.length,r<=t&&i>=t)return{node:n,offset:t-r};r=i}n=ko(Co(n))}}function Po(e){var t=e.ownerDocument,n=t&&t.defaultView||window,r=n.getSelection&&n.getSelection();if(!r||0===r.rangeCount)return null;var i=r.anchorNode,a=r.anchorOffset,o=r.focusNode,s=r.focusOffset;try{i.nodeType,o.nodeType}catch(e){return null}return function(e,t,n,r,i){var a=0,o=-1,s=-1,l=0,c=0,u=e,d=null;e:for(;;){for(var p=null;u!==t||0!==n&&u.nodeType!==tr||(o=a+n),u!==r||0!==i&&u.nodeType!==tr||(s=a+i),u.nodeType===tr&&(a+=u.nodeValue.length),null!==(p=u.firstChild);)d=u,u=p;for(;;){if(u===e)break e;if(d===t&&++l===n&&(o=a),d===r&&++c===i&&(s=a),null!==(p=u.nextSibling))break;d=(u=d).parentNode}u=p}if(-1===o||-1===s)return null;return{start:o,end:s}}(e,i,a,o,s)}function No(e){return e&&e.nodeType===tr}function Do(e){return e&&e.ownerDocument&&function e(t,n){return!(!t||!n)&&(t===n||!No(t)&&(No(n)?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}(e.ownerDocument.documentElement,e)}function Mo(){for(var e=window,t=To();t instanceof e.HTMLIFrameElement;){try{e=t.contentDocument.defaultView}catch(e){return t}t=To(e.document)}return t}function Ao(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)}function Io(){var e=Mo();return{focusedElem:e,selectionRange:Ao(e)?function(e){var t=void 0;t="selectionStart"in e?{start:e.selectionStart,end:e.selectionEnd}:Po(e);return t||{start:0,end:0}}(e):null}}function Oo(e){var t=Mo(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&Do(n)){null!==r&&Ao(n)&&function(e,t){var n=t.start,r=t.end;void 0===r&&(r=n);"selectionStart"in e?(e.selectionStart=n,e.selectionEnd=Math.min(r,e.value.length)):function(e,t){var n=e.ownerDocument||document,r=(n&&n.defaultView||window).getSelection(),i=e.textContent.length,a=Math.min(t.start,i),o=void 0===t.end?a:Math.min(t.end,i);if(!r.extend&&a>o){var s=o;o=a,a=s}var l=xo(e,a),c=xo(e,o);if(l&&c){if(1===r.rangeCount&&r.anchorNode===l.node&&r.anchorOffset===l.offset&&r.focusNode===c.node&&r.focusOffset===c.offset)return;var u=n.createRange();u.setStart(l.node,l.offset),r.removeAllRanges(),a>o?(r.addRange(u),r.extend(c.node,c.offset)):(u.setEnd(c.node,c.offset),r.addRange(u))}}(e,t)}(n,r);for(var i=[],a=n;a=a.parentNode;)a.nodeType===er&&i.push({element:a,left:a.scrollLeft,top:a.scrollTop});"function"==typeof n.focus&&n.focus();for(var o=0;o<i.length;o++){var s=i[o];s.element.scrollLeft=s.left,s.element.scrollTop=s.top}}}var Ro=ke&&"documentMode"in document&&document.documentMode<=11,Uo={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:[Ue,Ke,Je,ut,ft,gt,Et,Ct,Vt]}},Lo=null,Fo=null,jo=null,Wo=!1;function Bo(e){return e.window===e?e.document:e.nodeType===rr?e:e.ownerDocument}function zo(e,t){var n=Bo(t);if(Wo||null==Lo||Lo!==To(n))return null;var r=function(e){if("selectionStart"in e&&Ao(e))return{start:e.selectionStart,end:e.selectionEnd};var t=(e.ownerDocument&&e.ownerDocument.defaultView||window).getSelection();return{anchorNode:t.anchorNode,anchorOffset:t.anchorOffset,focusNode:t.focusNode,focusOffset:t.focusOffset}}(Lo);if(!jo||!ba(jo,r)){jo=r;var i=gn.getPooled(Uo.select,Fo,e,t);return i.type="select",i.target=Lo,Te(i),i}return null}var Vo={eventTypes:Uo,extractEvents:function(e,t,n,r){var i=Bo(r);if(!i||!function(e,t){for(var n=So(t),r=P[e],i=0;i<r.length;i++){var a=r[i];if(!n.hasOwnProperty(a)||!n[a])return!1}return!0}("onSelect",i))return null;var a=t?me(t):window;switch(e){case ut:(Zn(a)||"true"===a.contentEditable)&&(Lo=a,Fo=t,jo=null);break;case Ue:Lo=null,Fo=null,jo=null;break;case Et:Wo=!0;break;case Ke:case Ct:case Je:return Wo=!1,zo(n,r);case Vt:if(Ro)break;case ft:case gt:return zo(n,r)}return null}};z.injectEventPluginOrder(["ResponderEventPlugin","SimpleEventPlugin","EnterLeaveEventPlugin","ChangeEventPlugin","SelectEventPlugin","BeforeInputEventPlugin"]),M=ge,A=fe,(I=me)&&A||D(!1,"EventPluginUtils.setComponentTree(...): Injected module is missing getNodeFromInstance or getInstanceFromNode."),z.injectEventPluginsByName({SimpleEventPlugin:so,EnterLeaveEventPlugin:ga,ChangeEventPlugin:ia,SelectEventPlugin:Vo,BeforeInputEventPlugin:Wn});var qo=!1,Ho=!1;function Ko(e,t){"object"==typeof t.children&&null!==t.children&&n.Children.forEach(t.children,function(e){null!=e&&"string"!=typeof e&&"number"!=typeof e&&"string"==typeof e.type&&(Ho||(Ho=!0,Vr(!1,"Only strings and numbers are supported as <option> children.")))}),null==t.selected||qo||(Vr(!1,"Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),qo=!0)}function Go(e,t){var i=r({children:void 0},t),a=function(e){var t="";return n.Children.forEach(e,function(e){null!=e&&(t+=e)}),t}(t.children);return a&&(i.children=a),i}var $o=void 0;function Yo(){var e=Fr();return e?"\n\nCheck the render method of `"+e+"`.":""}$o=!1;var Qo=["value","defaultValue"];function Xo(e,t,n,r){var i=e.options;if(t){for(var a=n,o={},s=0;s<a.length;s++)o["$"+a[s]]=!0;for(var l=0;l<i.length;l++){var c=o.hasOwnProperty("$"+i[l].value);i[l].selected!==c&&(i[l].selected=c),c&&r&&(i[l].defaultSelected=!0)}}else{for(var u=mi(gi(n)),d=null,p=0;p<i.length;p++){if(i[p].value===u)return i[p].selected=!0,void(r&&(i[p].defaultSelected=!0));null!==d||i[p].disabled||(d=i[p])}null!==d&&(d.selected=!0)}}function Jo(e,t){return r({},t,{value:void 0})}function Zo(e,t){var n=e;!function(e){yi.checkPropTypes("select",e);for(var t=0;t<Qo.length;t++){var n=Qo[t];if(null!=e[n]){var r=Array.isArray(e[n]);e.multiple&&!r?Vr(!1,"The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",n,Yo()):!e.multiple&&r&&Vr(!1,"The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",n,Yo())}}}(t),n._wrapperState={wasMultiple:!!t.multiple},void 0===t.value||void 0===t.defaultValue||$o||(Vr(!1,"Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://fb.me/react-controlled-components"),$o=!0)}var es=!1;function ts(e,t){var n=e;return null!=t.dangerouslySetInnerHTML&&l(!1,"`dangerouslySetInnerHTML` does not make sense on <textarea>."),r({},t,{value:void 0,defaultValue:void 0,children:mi(n._wrapperState.initialValue)})}function ns(e,t){var n=e;yi.checkPropTypes("textarea",t),void 0===t.value||void 0===t.defaultValue||es||(Vr(!1,"%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://fb.me/react-controlled-components",Fr()||"A component"),es=!0);var r=t.value;if(null==r){var i=t.defaultValue,a=t.children;null!=a&&(Vr(!1,"Use the `defaultValue` or `value` props instead of setting children on <textarea>."),null!=i&&l(!1,"If you supply `defaultValue` on a <textarea>, do not pass children."),Array.isArray(a)&&(a.length<=1||l(!1,"<textarea> can only have at most one child."),a=a[0]),i=a),null==i&&(i=""),r=i}n._wrapperState={initialValue:gi(r)}}function rs(e,t){var n=e,r=gi(t.value),i=gi(t.defaultValue);if(null!=r){var a=mi(r);a!==n.value&&(n.value=a),null==t.defaultValue&&n.defaultValue!==a&&(n.defaultValue=a)}null!=i&&(n.defaultValue=mi(i))}function is(e,t){var n=e,r=n.textContent;r===n._wrapperState.initialValue&&(n.value=r)}var as="http://www.w3.org/1999/xhtml",os="http://www.w3.org/1998/Math/MathML",ss="http://www.w3.org/2000/svg",ls={html:as,mathml:os,svg:ss};function cs(e){switch(e){case"svg":return ss;case"math":return os;default:return as}}function us(e,t){return null==e||e===as?cs(t):e===ss&&"foreignObject"===t?as:e}var ds,ps=void 0,hs=(ds=function(e,t){if(e.namespaceURI!==ls.svg||"innerHTML"in e)e.innerHTML=t;else{(ps=ps||document.createElement("div")).innerHTML="<svg>"+t+"</svg>";for(var n=ps.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction(function(){return ds(e,t,n,r)})}:ds),fs=function(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===tr)return void(n.nodeValue=t)}e.textContent=t},ms={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};var gs=["Webkit","ms","Moz","O"];function vs(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ms.hasOwnProperty(e)&&ms[e]?(""+t).trim():t+"px"}Object.keys(ms).forEach(function(e){gs.forEach(function(t){ms[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(t,e)]=ms[e]})});var ys=/([A-Z])/g,bs=/^ms-/;var ws=/^(?:webkit|moz|o)[A-Z]/,_s=/^-ms-/,Es=/-(.)/g,Ss=/;\s*$/,Ts={},ks={},Cs=!1,xs=!1,Ps=function(e){Ts.hasOwnProperty(e)&&Ts[e]||(Ts[e]=!0,Vr(!1,"Unsupported style property %s. Did you mean %s?",e,e.replace(_s,"ms-").replace(Es,function(e,t){return t.toUpperCase()})))},Ns=function(e,t){e.indexOf("-")>-1?Ps(e):ws.test(e)?function(e){Ts.hasOwnProperty(e)&&Ts[e]||(Ts[e]=!0,Vr(!1,"Unsupported vendor-prefixed style property %s. Did you mean %s?",e,e.charAt(0).toUpperCase()+e.slice(1)))}(e):Ss.test(t)&&function(e,t){ks.hasOwnProperty(t)&&ks[t]||(ks[t]=!0,Vr(!1,'Style property values shouldn\'t contain a semicolon. Try "%s: %s" instead.',e,t.replace(Ss,"")))}(e,t),"number"==typeof t&&(isNaN(t)?function(e,t){Cs||(Cs=!0,Vr(!1,"`NaN` is an invalid value for the `%s` css style property.",e))}(e):isFinite(t)||function(e,t){xs||(xs=!0,Vr(!1,"`Infinity` is an invalid value for the `%s` css style property.",e))}(e))};function Ds(e){var t="",n="";for(var r in e)if(e.hasOwnProperty(r)){var i=e[r];if(null!=i){var a=0===r.indexOf("--");t+=n+r.replace(ys,"-$1").toLowerCase().replace(bs,"-ms-")+":",t+=vs(r,i,a),n=";"}}return t||null}function Ms(e,t){var n=e.style;for(var r in t)if(t.hasOwnProperty(r)){var i=0===r.indexOf("--");i||Ns(r,t[r]);var a=vs(r,t[r],i);"float"===r&&(r="cssFloat"),i?n.setProperty(r,a):n[r]=a}}var As=r({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}),Is="__html",Os=null;function Rs(e,t){t&&(As[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&l(!1,"%s is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.%s",e,Os.getStackAddendum()),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&l(!1,"Can only set one of `children` or `props.dangerouslySetInnerHTML`."),"object"==typeof t.dangerouslySetInnerHTML&&Is in t.dangerouslySetInnerHTML||l(!1,"`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.")),!t.suppressContentEditableWarning&&t.contentEditable&&null!=t.children&&Vr(!1,"A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional."),null!=t.style&&"object"!=typeof t.style&&l(!1,"The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.%s",Os.getStackAddendum()))}function Us(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}}Os=dr.ReactDebugCurrentFrame;var Ls={accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",download:"download",draggable:"draggable",enctype:"encType",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},Fs={"aria-current":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},js={},Ws=new RegExp("^(aria)-["+Xr+"]*$"),Bs=new RegExp("^(aria)[A-Z]["+Xr+"]*$"),zs=Object.prototype.hasOwnProperty;function Vs(e,t){if(zs.call(js,t)&&js[t])return!0;if(Bs.test(t)){var n="aria-"+t.slice(4).toLowerCase(),r=Fs.hasOwnProperty(n)?n:null;if(null==r)return Vr(!1,"Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",t),js[t]=!0,!0;if(t!==r)return Vr(!1,"Invalid ARIA attribute `%s`. Did you mean `%s`?",t,r),js[t]=!0,!0}if(Ws.test(t)){var i=t.toLowerCase(),a=Fs.hasOwnProperty(i)?i:null;if(null==a)return js[t]=!0,!1;if(t!==a)return Vr(!1,"Unknown ARIA attribute `%s`. Did you mean `%s`?",t,a),js[t]=!0,!0}return!0}function qs(e,t){Us(e,t)||function(e,t){var n=[];for(var r in t)Vs(0,r)||n.push(r);var i=n.map(function(e){return"`"+e+"`"}).join(", ");1===n.length?Vr(!1,"Invalid aria prop %s on <%s> tag. For details, see https://fb.me/invalid-aria-prop",i,e):n.length>1&&Vr(!1,"Invalid aria props %s on <%s> tag. For details, see https://fb.me/invalid-aria-prop",i,e)}(e,t)}var Hs=!1;var Ks,Gs={},$s=Object.prototype.hasOwnProperty,Ys=/^on./,Qs=/^on[^A-Z]/,Xs=new RegExp("^(aria)-["+Xr+"]*$"),Js=new RegExp("^(aria)[A-Z]["+Xr+"]*$");Ks=function(e,t,n,r){if($s.call(Gs,t)&&Gs[t])return!0;var i=t.toLowerCase();if("onfocusin"===i||"onfocusout"===i)return Vr(!1,"React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),Gs[t]=!0,!0;if(r){if(x.hasOwnProperty(t))return!0;var a=N.hasOwnProperty(i)?N[i]:null;if(null!=a)return Vr(!1,"Invalid event handler property `%s`. Did you mean `%s`?",t,a),Gs[t]=!0,!0;if(Ys.test(t))return Vr(!1,"Unknown event handler property `%s`. It will be ignored.",t),Gs[t]=!0,!0}else if(Ys.test(t))return Qs.test(t)&&Vr(!1,"Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",t),Gs[t]=!0,!0;if(Xs.test(t)||Js.test(t))return!0;if("innerhtml"===i)return Vr(!1,"Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),Gs[t]=!0,!0;if("aria"===i)return Vr(!1,"The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),Gs[t]=!0,!0;if("is"===i&&null!==n&&void 0!==n&&"string"!=typeof n)return Vr(!1,"Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof n),Gs[t]=!0,!0;if("number"==typeof n&&isNaN(n))return Vr(!1,"Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",t),Gs[t]=!0,!0;var o=si(t),s=null!==o&&o.type===qr;if(Ls.hasOwnProperty(i)){var l=Ls[i];if(l!==t)return Vr(!1,"Invalid DOM property `%s`. Did you mean `%s`?",t,l),Gs[t]=!0,!0}else if(!s&&t!==i)return Vr(!1,"React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",t,i),Gs[t]=!0,!0;return"boolean"==typeof n&&ai(t,n,o,!1)?(n?Vr(!1,'Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',n,t,t,n,t):Vr(!1,'Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',n,t,t,n,t,t,t),Gs[t]=!0,!0):!!s||(ai(t,n,o,!1)?(Gs[t]=!0,!1):"false"!==n&&"true"!==n||null===o||o.type!==Kr||(Vr(!1,"Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",n,t,"false"===n?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',t,n),Gs[t]=!0,!0))};var Zs=function(e,t,n){var r=[];for(var i in t){Ks(0,i,t[i],n)||r.push(i)}var a=r.map(function(e){return"`"+e+"`"}).join(", ");1===r.length?Vr(!1,"Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://fb.me/react-attribute-behavior",a,e):r.length>1&&Vr(!1,"Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://fb.me/react-attribute-behavior",a,e)};var el,tl=!1,nl=!1,rl="dangerouslySetInnerHTML",il="suppressContentEditableWarning",al="suppressHydrationWarning",ol="autoFocus",sl="children",ll="style",cl="__html",ul=ls.html,dl=void 0,pl=void 0,hl=void 0,fl=void 0,ml=void 0,gl=void 0,vl=void 0,yl=void 0,bl=void 0;dl={time:!0,dialog:!0,webview:!0},hl=function(e,t){qs(e,t),function(e,t){"input"!==e&&"textarea"!==e&&"select"!==e||null==t||null!==t.value||Hs||(Hs=!0,"select"===e&&t.multiple?Vr(!1,"`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",e):Vr(!1,"`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",e))}(e,t),function(e,t,n){Us(e,t)||Zs(e,t,n)}(e,t,!0)},yl=ke&&!document.documentMode;var wl=/\r\n?/g,_l=/\u0000|\uFFFD/g;function El(e,t){!function(e,t){for(var n=So(t),r=P[e],i=0;i<r.length;i++){var a=r[i];if(!n.hasOwnProperty(a)||!n[a]){switch(a){case Wt:vo(Wt,t);break;case ut:case Ue:vo(ut,t),vo(Ue,t),n[Ue]=!0,n[ut]=!0;break;case je:case ze:or(on(a))&&vo(a,t);break;case ht:case Ht:case jt:break;default:-1!==an.indexOf(a)||go(a,t)}n[a]=!0}}}(t,e.nodeType===rr||e.nodeType===ir?e:e.ownerDocument)}function Sl(e){return e.nodeType===rr?e:e.ownerDocument}function Tl(){}function kl(e){e.onclick=Tl}function Cl(e,t,n,r){var i=Us(t,n);hl(t,n),i&&!nl&&e.shadyRoot&&(Vr(!1,"%s is using shady DOM. Using shady DOM with React can cause things to break subtly.",Fr()||"A component"),nl=!0);var a=void 0;switch(t){case"iframe":case"object":go(vt,e),a=n;break;case"video":case"audio":for(var o=0;o<an.length;o++)go(an[o],e);a=n;break;case"source":go(ct,e),a=n;break;case"img":case"image":case"link":go(ct,e),go(vt,e),a=n;break;case"form":go(jt,e),go(Ht,e),a=n;break;case"details":go(Yt,e),a=n;break;case"input":Fi(e,n),a=Li(e,n),go(ht,e),El(r,"onChange");break;case"option":Ko(0,n),a=Go(0,n);break;case"select":Zo(e,n),a=Jo(0,n),go(ht,e),El(r,"onChange");break;case"textarea":ns(e,n),a=ts(e,n),go(ht,e),El(r,"onChange");break;default:a=n}switch(Rs(t,a),function(e,t,n,r,i){for(var a in r)if(r.hasOwnProperty(a)){var o=r[a];if(a===ll)o&&Object.freeze(o),Ms(t,o);else if(a===rl){var s=o?o[cl]:void 0;null!=s&&hs(t,s)}else a===sl?"string"==typeof o?("textarea"!==e||""!==o)&&fs(t,o):"number"==typeof o&&fs(t,""+o):a===il||a===al||a===ol||(x.hasOwnProperty(a)?null!=o&&("function"!=typeof o&&vl(a,o),El(n,a)):null!=o&&fi(t,a,o,i))}}(t,e,r,a,i),t){case"input":cr(e),Bi(e,n,!1);break;case"textarea":cr(e),is(e);break;case"option":!function(e,t){null!=t.value&&e.setAttribute("value",mi(gi(t.value)))}(e,n);break;case"select":!function(e,t){var n=e;n.multiple=!!t.multiple;var r=t.value;null!=r?Xo(n,!!t.multiple,r,!1):null!=t.defaultValue&&Xo(n,!!t.multiple,t.defaultValue,!0)}(e,n);break;default:"function"==typeof a.onClick&&kl(e)}}function xl(e,t,n,r,i){"input"===n&&"radio"===i.type&&null!=i.name&&ji(e,i);Us(n,r);switch(function(e,t,n,r){for(var i=0;i<t.length;i+=2){var a=t[i],o=t[i+1];a===ll?Ms(e,o):a===rl?hs(e,o):a===sl?fs(e,o):fi(e,a,o,r)}}(e,t,0,Us(n,i)),n){case"input":Wi(e,i);break;case"textarea":rs(e,i);break;case"select":!function(e,t){var n=e,r=n._wrapperState.wasMultiple;n._wrapperState.wasMultiple=!!t.multiple;var i=t.value;null!=i?Xo(n,!!t.multiple,i,!1):r!==!!t.multiple&&(null!=t.defaultValue?Xo(n,!!t.multiple,t.defaultValue,!0):Xo(n,!!t.multiple,t.multiple?[]:"",!1))}(e,i)}}function Pl(e,t){fl(e.nodeValue,t)}function Nl(e,t){tl||(tl=!0,D(!1,"Did not expect server HTML to contain a <%s> in <%s>.",t.nodeName.toLowerCase(),e.nodeName.toLowerCase()))}function Dl(e,t){tl||(tl=!0,D(!1,'Did not expect server HTML to contain the text node "%s" in <%s>.',t.nodeValue,e.nodeName.toLowerCase()))}function Ml(e,t,n){tl||(tl=!0,D(!1,"Expected server HTML to contain a matching <%s> in <%s>.",t,e.nodeName.toLowerCase()))}function Al(e,t){""!==t&&(tl||(tl=!0,D(!1,'Expected server HTML to contain a matching text node for "%s" in <%s>.',t,e.nodeName.toLowerCase())))}el=function(e){return("string"==typeof e?e:""+e).replace(wl,"\n").replace(_l,"")},fl=function(e,t){if(!tl){var n=el(t),r=el(e);r!==n&&(tl=!0,D(!1,'Text content did not match. Server: "%s" Client: "%s"',r,n))}},ml=function(e,t,n){if(!tl){var r=el(n),i=el(t);i!==r&&(tl=!0,D(!1,"Prop `%s` did not match. Server: %s Client: %s",e,JSON.stringify(i),JSON.stringify(r)))}},gl=function(e){if(!tl){tl=!0;var t=[];e.forEach(function(e){t.push(e)}),D(!1,"Extra attributes from the server: %s",t)}},vl=function(e,t){!1===t?Vr(!1,"Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",e,e,e):Vr(!1,"Expected `%s` listener to be a function, instead got a value of `%s` type.",e,typeof t)},bl=function(e,t){var n=e.namespaceURI===ul?e.ownerDocument.createElement(e.tagName):e.ownerDocument.createElementNS(e.namespaceURI,e.tagName);return n.innerHTML=t,n.innerHTML};var Il=function(){},Ol=function(){},Rl=["address","applet","area","article","aside","base","basefont","bgsound","blockquote","body","br","button","caption","center","col","colgroup","dd","details","dir","div","dl","dt","embed","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","img","input","isindex","li","link","listing","main","marquee","menu","menuitem","meta","nav","noembed","noframes","noscript","object","ol","p","param","plaintext","pre","script","section","select","source","style","summary","table","tbody","td","template","textarea","tfoot","th","thead","title","tr","track","ul","wbr","xmp"],Ul=["applet","caption","html","table","td","th","marquee","object","template","foreignObject","desc","title"],Ll=Ul.concat(["button"]),Fl=["dd","dt","li","option","optgroup","p","rp","rt"],jl={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null};Ol=function(e,t){var n=r({},e||jl),i={tag:t};return-1!==Ul.indexOf(t)&&(n.aTagInScope=null,n.buttonTagInScope=null,n.nobrTagInScope=null),-1!==Ll.indexOf(t)&&(n.pTagInButtonScope=null),-1!==Rl.indexOf(t)&&"address"!==t&&"div"!==t&&"p"!==t&&(n.listItemTagAutoclosing=null,n.dlItemTagAutoclosing=null),n.current=i,"form"===t&&(n.formTag=i),"a"===t&&(n.aTagInScope=i),"button"===t&&(n.buttonTagInScope=i),"nobr"===t&&(n.nobrTagInScope=i),"p"===t&&(n.pTagInButtonScope=i),"li"===t&&(n.listItemTagAutoclosing=i),"dd"!==t&&"dt"!==t||(n.dlItemTagAutoclosing=i),n};var Wl={};function Bl(){l(!1,"The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.")}Il=function(e,t,n){var r=(n=n||jl).current,i=r&&r.tag;null!=t&&(null!=e&&D(!1,"validateDOMNesting: when childText is passed, childTag should be null"),e="#text");var a=function(e,t){switch(t){case"select":return"option"===e||"optgroup"===e||"#text"===e;case"optgroup":return"option"===e||"#text"===e;case"option":return"#text"===e;case"tr":return"th"===e||"td"===e||"style"===e||"script"===e||"template"===e;case"tbody":case"thead":case"tfoot":return"tr"===e||"style"===e||"script"===e||"template"===e;case"colgroup":return"col"===e||"template"===e;case"table":return"caption"===e||"colgroup"===e||"tbody"===e||"tfoot"===e||"thead"===e||"style"===e||"script"===e||"template"===e;case"head":return"base"===e||"basefont"===e||"bgsound"===e||"link"===e||"meta"===e||"title"===e||"noscript"===e||"noframes"===e||"style"===e||"script"===e||"template"===e;case"html":return"head"===e||"body"===e;case"#document":return"html"===e}switch(e){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return"h1"!==t&&"h2"!==t&&"h3"!==t&&"h4"!==t&&"h5"!==t&&"h6"!==t;case"rp":case"rt":return-1===Fl.indexOf(t);case"body":case"caption":case"col":case"colgroup":case"frame":case"head":case"html":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return null==t}return!0}(e,i)?null:r,o=a?null:function(e,t){switch(e){case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"menu":case"nav":case"ol":case"p":case"section":case"summary":case"ul":case"pre":case"listing":case"table":case"hr":case"xmp":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return t.pTagInButtonScope;case"form":return t.formTag||t.pTagInButtonScope;case"li":return t.listItemTagAutoclosing;case"dd":case"dt":return t.dlItemTagAutoclosing;case"button":return t.buttonTagInScope;case"a":return t.aTagInScope;case"nobr":return t.nobrTagInScope}return null}(e,n),s=a||o;if(s){var l=s.tag,c=jr(),u=!!a+"|"+e+"|"+l+"|"+c;if(!Wl[u]){Wl[u]=!0;var d=e,p="";if("#text"===e?/\S/.test(t)?d="Text nodes":(d="Whitespace text nodes",p=" Make sure you don't have any extra whitespace between tags on each line of your source code."):d="<"+e+">",a){var h="";"table"===l&&"tr"===e&&(h+=" Add a <tbody> to your code to match the DOM tree generated by the browser."),D(!1,"validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s%s",d,l,p,h,c)}else D(!1,"validateDOMNesting(...): %s cannot appear as a descendant of <%s>.%s",d,l,c)}}};var zl=!1,Vl=Bl,ql=Bl,Hl=Bl,Kl=Bl,Gl=Bl,$l=void 0;$l="suppressHydrationWarning";var Yl=null,Ql=null;function Xl(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Jl(e){return e}function Zl(e){Yl=fo,Ql=Io(),mo(!1)}function ec(e,t,n,r,i){var a=r;if(Il(e,null,a.ancestorInfo),"string"==typeof t.children||"number"==typeof t.children){var o=""+t.children,s=Ol(a.ancestorInfo,e);Il(null,o,s)}var l=function(e,t,n,r){var i=void 0,a=Sl(n),o=void 0,s=r;if(s===ul&&(s=cs(e)),s===ul)if((i=Us(e,t))||e===e.toLowerCase()||Vr(!1,"<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",e),"script"===e){var l=a.createElement("div");l.innerHTML="<script><\/script>";var c=l.firstChild;o=l.removeChild(c)}else"string"==typeof t.is?o=a.createElement(e,{is:t.is}):(o=a.createElement(e),"select"===e&&t.multiple&&(o.multiple=!0));else o=a.createElementNS(s,e);return s===ul&&(i||"[object HTMLUnknownElement]"!==Object.prototype.toString.call(o)||Object.prototype.hasOwnProperty.call(dl,e)||(dl[e]=!0,Vr(!1,"The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",e))),o}(e,t,n,a.namespace);return pe(i,l),ve(l,t),l}function tc(e,t,n,r,i){return Cl(e,t,n,r),Xl(t,n)}function nc(e,t,n,r,i,a){var o=a;if(typeof r.children!=typeof n.children&&("string"==typeof r.children||"number"==typeof r.children)){var s=""+r.children,l=Ol(o.ancestorInfo,t);Il(null,s,l)}return function(e,t,n,r,i){hl(t,r);var a=null,o=void 0,s=void 0;switch(t){case"input":o=Li(e,n),s=Li(e,r),a=[];break;case"option":o=Go(0,n),s=Go(0,r),a=[];break;case"select":o=Jo(0,n),s=Jo(0,r),a=[];break;case"textarea":o=ts(e,n),s=ts(e,r),a=[];break;default:s=r,"function"!=typeof(o=n).onClick&&"function"==typeof s.onClick&&kl(e)}Rs(t,s);var l=void 0,c=void 0,u=null;for(l in o)if(!s.hasOwnProperty(l)&&o.hasOwnProperty(l)&&null!=o[l])if(l===ll){var d=o[l];for(c in d)d.hasOwnProperty(c)&&(u||(u={}),u[c]="")}else l===rl||l===sl||l===il||l===al||l===ol||(x.hasOwnProperty(l)?a||(a=[]):(a=a||[]).push(l,null));for(l in s){var p=s[l],h=null!=o?o[l]:void 0;if(s.hasOwnProperty(l)&&p!==h&&(null!=p||null!=h))if(l===ll)if(p&&Object.freeze(p),h){for(c in h)!h.hasOwnProperty(c)||p&&p.hasOwnProperty(c)||(u||(u={}),u[c]="");for(c in p)p.hasOwnProperty(c)&&h[c]!==p[c]&&(u||(u={}),u[c]=p[c])}else u||(a||(a=[]),a.push(l,u)),u=p;else if(l===rl){var f=p?p[cl]:void 0,m=h?h[cl]:void 0;null!=f&&m!==f&&(a=a||[]).push(l,""+f)}else l===sl?h===p||"string"!=typeof p&&"number"!=typeof p||(a=a||[]).push(l,""+p):l===il||l===al||(x.hasOwnProperty(l)?(null!=p&&("function"!=typeof p&&vl(l,p),El(i,l)),a||h===p||(a=[])):(a=a||[]).push(l,p))}return u&&(a=a||[]).push(ll,u),a}(e,t,n,r,i)}function rc(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}function ic(e,t,n,r){Il(null,e,n.ancestorInfo);var i=function(e,t){return Sl(t).createTextNode(e)}(e,t);return pe(r,i),i}var ac=!0,oc=setTimeout,sc=clearTimeout,lc=-1,cc=!0;function uc(e){fs(e,"")}function dc(e,t){e.appendChild(t)}function pc(e,t){var n=void 0;e.nodeType===nr?(n=e.parentNode).insertBefore(t,e):(n=e).appendChild(t),null===n.onclick&&kl(n)}function hc(e,t,n){e.insertBefore(t,n)}function fc(e,t){e.removeChild(t)}var mc=!0;function gc(e){for(var t=e.nextSibling;t&&t.nodeType!==er&&t.nodeType!==tr;)t=t.nextSibling;return t}function vc(e){for(var t=e.firstChild;t&&t.nodeType!==er&&t.nodeType!==tr;)t=t.nextSibling;return t}function yc(e,t,n,r,i,a){pe(a,e),ve(e,n);return function(e,t,n,r,i){var a,o=void 0;switch(pl=!0===n[al],a=Us(t,n),hl(t,n),a&&!nl&&e.shadyRoot&&(Vr(!1,"%s is using shady DOM. Using shady DOM with React can cause things to break subtly.",Fr()||"A component"),nl=!0),t){case"iframe":case"object":go(vt,e);break;case"video":case"audio":for(var s=0;s<an.length;s++)go(an[s],e);break;case"source":go(ct,e);break;case"img":case"image":case"link":go(ct,e),go(vt,e);break;case"form":go(jt,e),go(Ht,e);break;case"details":go(Yt,e);break;case"input":Fi(e,n),go(ht,e),El(i,"onChange");break;case"option":Ko(0,n);break;case"select":Zo(e,n),go(ht,e),El(i,"onChange");break;case"textarea":ns(e,n),go(ht,e),El(i,"onChange")}Rs(t,n),o=new Set;for(var l=e.attributes,c=0;c<l.length;c++)switch(l[c].name.toLowerCase()){case"data-reactroot":case"value":case"checked":case"selected":break;default:o.add(l[c].name)}var u,d=null;for(var p in n)if(n.hasOwnProperty(p)){var h=n[p];if(p===sl)"string"==typeof h?e.textContent!==h&&(pl||fl(e.textContent,h),d=[sl,h]):"number"==typeof h&&e.textContent!==""+h&&(pl||fl(e.textContent,h),d=[sl,""+h]);else if(x.hasOwnProperty(p))null!=h&&("function"!=typeof h&&vl(p,h),El(i,p));else if("boolean"==typeof a){var f=void 0,m=si(p);if(pl);else if(p===il||p===al||"value"===p||"checked"===p||"selected"===p);else if(p===rl){var g=e.innerHTML,v=h?h[cl]:void 0,y=bl(e,null!=v?v:"");y!==g&&ml(p,g,y)}else if(p===ll){if(o.delete(p),yl){var b=Ds(h);b!==(f=e.getAttribute("style"))&&ml(p,f,b)}}else if(a)o.delete(p.toLowerCase()),h!==(f=hi(e,p,h))&&ml(p,f,h);else if(!ii(p,m,a)&&!oi(p,h,m,a)){var w=!1;if(null!==m)o.delete(m.attributeName),f=pi(e,p,h,m);else{var _=r;if(_===ul&&(_=cs(t)),_===ul)o.delete(p.toLowerCase());else{var E=(u=p.toLowerCase(),Ls.hasOwnProperty(u)&&Ls[u]||null);null!==E&&E!==p&&(w=!0,o.delete(E)),o.delete(p)}f=hi(e,p,h)}h===f||w||ml(p,f,h)}}}switch(o.size>0&&!pl&&gl(o),t){case"input":cr(e),Bi(e,n,!0);break;case"textarea":cr(e),is(e);break;case"select":case"option":break;default:"function"==typeof n.onClick&&kl(e)}return d}(e,t,n,i.namespace,r)}var bc="undefined"!=typeof performance&&"function"==typeof performance.mark&&"function"==typeof performance.clearMarks&&"function"==typeof performance.measure&&"function"==typeof performance.clearMeasures,wc=null,_c=null,Ec=null,Sc=!1,Tc=!1,kc=!1,Cc=0,xc=0,Pc=!1,Nc=new Set,Dc=function(e){return"⚛ "+e},Mc=function(e){performance.mark(Dc(e))},Ac=function(e,t,n){var r=Dc(t),i=function(e,t){return(t?"⛔ ":"⚛ ")+e+(t?" Warning: "+t:"")}(e,n);try{performance.measure(i,r)}catch(e){}performance.clearMarks(r),performance.clearMeasures(i)},Ic=function(e,t){return e+" (#"+t+")"},Oc=function(e,t,n){return null===n?e+" ["+(t?"update":"mount")+"]":e+"."+n},Rc=function(e,t){var n=Ar(e.type)||"Unknown",r=e._debugID,i=null!==e.alternate,a=Oc(n,i,t);if(Sc&&Nc.has(a))return!1;Nc.add(a);var o=Ic(a,r);return Mc(o),!0},Uc=function(e,t){var n=Ar(e.type)||"Unknown",r=e._debugID,i=null!==e.alternate,a=Oc(n,i,t);!function(e){performance.clearMarks(Dc(e))}(Ic(a,r))},Lc=function(e,t,n){var r=Ar(e.type)||"Unknown",i=e._debugID,a=null!==e.alternate,o=Oc(r,a,t),s=Ic(o,i);Ac(o,s,n)},Fc=function(e){switch(e.tag){case X:case Z:case ee:case J:case te:case ie:case re:case ne:return!0;default:return!1}},jc=function(){null!==_c&&null!==Ec&&Uc(Ec,_c),Ec=null,_c=null,kc=!1},Wc=function(){for(var e=wc;e;)e._debugIsCurrentlyTiming&&Lc(e,null,null),e=e.return},Bc=function(e){null!==e.return&&Bc(e.return),e._debugIsCurrentlyTiming&&Rc(e,null)},zc=function(){null!==wc&&Bc(wc)};function Vc(){_i&&xc++}function qc(e){if(_i){if(!bc||Fc(e))return;if(wc=e.return,!e._debugIsCurrentlyTiming)return;e._debugIsCurrentlyTiming=!1,Lc(e,null,null)}}function Hc(e){if(_i){if(!bc||Fc(e))return;if(wc=e.return,!e._debugIsCurrentlyTiming)return;e._debugIsCurrentlyTiming=!1;Lc(e,null,"An error was thrown inside this error boundary")}}function Kc(e,t){if(_i){if(!bc)return;if(jc(),!Rc(e,t))return;Ec=e,_c=t}}function Gc(){if(_i){if(!bc)return;if(null!==_c&&null!==Ec)Lc(Ec,_c,kc?"Scheduled a cascading update":null);_c=null,Ec=null}}function $c(e,t){if(_i){if(!bc)return;var n=null;if(null!==e)if(e.tag===X)n="A top-level update interrupted the previous render";else n="An update to "+(Ar(e.type)||"Unknown")+" interrupted the previous render";else Cc>1&&(n="There were cascading updates");Cc=0;var r=t?"(React Tree Reconciliation: Completed Root)":"(React Tree Reconciliation: Yielded)";Wc(),Ac(r,"(React Tree Reconciliation)",n)}}var Yc=[],Qc=void 0;Qc=[];var Xc=-1;function Jc(e){return{current:e}}function Zc(e,t){Xc<0?D(!1,"Unexpected pop."):(t!==Qc[Xc]&&D(!1,"Unexpected Fiber popped."),e.current=Yc[Xc],Yc[Xc]=null,Qc[Xc]=null,Xc--)}function eu(e,t,n){Yc[++Xc]=e.current,Qc[Xc]=n,e.current=t}var tu=void 0;tu={};var nu={};Object.freeze(nu);var ru=Jc(nu),iu=Jc(!1),au=nu;function ou(e,t,n){return n&&uu(t)?au:ru.current}function su(e,t,n){var r=e.stateNode;r.__reactInternalMemoizedUnmaskedChildContext=t,r.__reactInternalMemoizedMaskedChildContext=n}function lu(e,t){var n=e.type,r=n.contextTypes;if(!r)return nu;var a=e.stateNode;if(a&&a.__reactInternalMemoizedUnmaskedChildContext===t)return a.__reactInternalMemoizedMaskedChildContext;var o={};for(var s in r)o[s]=t[s];var l=Ar(n)||"Unknown";return i(r,o,"context",l,jr),a&&su(e,t,o),o}function cu(){return iu.current}function uu(e){var t=e.childContextTypes;return null!==t&&void 0!==t}function du(e){Zc(iu,e),Zc(ru,e)}function pu(e){Zc(iu,e),Zc(ru,e)}function hu(e,t,n){ru.current!==nu&&l(!1,"Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue."),eu(ru,t,e),eu(iu,n,e)}function fu(e,t,n){var a=e.stateNode,o=t.childContextTypes;if("function"!=typeof a.getChildContext){var s=Ar(t)||"Unknown";return tu[s]||(tu[s]=!0,D(!1,"%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.",s,s)),n}var c;for(var u in zr("getChildContext"),Kc(e,"getChildContext"),c=a.getChildContext(),Gc(),zr(null),c)u in o||l(!1,'%s.getChildContext(): key "%s" is not defined in childContextTypes.',Ar(t)||"Unknown",u);var d=Ar(t)||"Unknown";return i(o,c,"child context",d,jr),r({},n,c)}function mu(e){var t=e.stateNode,n=t&&t.__reactInternalMemoizedMergedChildContext||nu;return au=ru.current,eu(ru,n,e),eu(iu,iu.current,e),!0}function gu(e,t,n){var r=e.stateNode;if(r||l(!1,"Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue."),n){var i=fu(e,t,au);r.__reactInternalMemoizedMergedChildContext=i,Zc(iu,e),Zc(ru,e),eu(ru,i,e),eu(iu,n,e)}else Zc(iu,e),eu(iu,n,e)}var vu=null,yu=null,bu=!1;function wu(e){return function(t){try{return e(t)}catch(e){bu||(bu=!0,D(!1,"React DevTools encountered an error: %s",e))}}}var _u="undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__;var Eu=1073741823,Su=0,Tu=1,ku=Eu,Cu=10,xu=2;function Pu(e){return(e/Cu|0)+xu}function Nu(e){return(e-xu)*Cu}function Du(e,t,n){return xu+(1+((e-xu+t/Cu)/(r=n/Cu)|0))*r;var r}var Mu=5e3,Au=250;function Iu(e){return Du(e,Mu,Au)}var Ou=500,Ru=100;var Uu=0,Lu=1,Fu=2,ju=4,Wu=void 0;Wu=!1;try{var Bu=Object.preventExtensions({}),zu=new Map([[Bu,null]]),Vu=new Set([Bu]);zu.set(0,0),Vu.add(0)}catch(e){Wu=!0}var qu=void 0;qu=1;var Hu=function(e,t,n,r){return new function(e,t,n,r){this.tag=e,this.key=n,this.type=null,this.stateNode=null,this.return=null,this.child=null,this.sibling=null,this.index=0,this.ref=null,this.pendingProps=t,this.memoizedProps=null,this.updateQueue=null,this.memoizedState=null,this.firstContextDependency=null,this.mode=r,this.effectTag=_a,this.nextEffect=null,this.firstEffect=null,this.lastEffect=null,this.expirationTime=Su,this.childExpirationTime=Su,this.alternate=null,Ni&&(this.actualDuration=0,this.actualStartTime=-1,this.selfBaseDuration=0,this.treeBaseDuration=0),this._debugID=qu++,this._debugSource=null,this._debugOwner=null,this._debugIsCurrentlyTiming=!1,Wu||"function"!=typeof Object.preventExtensions||Object.preventExtensions(this)}(e,t,n,r)};function Ku(e){var t=e.prototype;return!(!t||!t.isReactComponent)}function Gu(e,t,n){var r=e.alternate;return null===r?((r=Hu(e.tag,t,e.key,e.mode)).type=e.type,r.stateNode=e.stateNode,r._debugID=e._debugID,r._debugSource=e._debugSource,r._debugOwner=e._debugOwner,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.effectTag=_a,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null,Ni&&(r.actualDuration=0,r.actualStartTime=-1)),r.childExpirationTime=e.childExpirationTime,t!==e.pendingProps?r.expirationTime=n:r.expirationTime=e.expirationTime,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,r.firstContextDependency=e.firstContextDependency,r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,Ni&&(r.selfBaseDuration=e.selfBaseDuration,r.treeBaseDuration=e.treeBaseDuration),r}function $u(e,t,n){var r;r=e._owner;var i=void 0,a=e.type,o=e.key,s=e.props,c=void 0;if("function"==typeof a)c=Ku(a)?$:Q;else if("string"==typeof a)c=Z;else e:switch(a){case vr:return Yu(s.children,t,n,o);case Er:c=ne,t|=Lu|Fu;break;case yr:c=ne,t|=Fu;break;case br:return function(e,t,n,r){"string"==typeof e.id&&"function"==typeof e.onRender||D(!1,'Profiler must specify an "id" string and "onRender" function as props');var i=Hu(se,e,r,t|ju);return i.type=br,i.expirationTime=n,i}(s,t,n,o);case Tr:c=le;break;default:if("object"==typeof a&&null!==a)switch(a.$$typeof){case wr:c=ie;break e;case _r:c=re;break e;case Sr:c=ae;break e;default:if("function"==typeof a.then){c=Q;break e}}var u="";(void 0===a||"object"==typeof a&&null!==a&&0===Object.keys(a).length)&&(u+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var d=r?Ar(r.type):null;d&&(u+="\n\nCheck the render method of `"+d+"`."),l(!1,"Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",null==a?a:typeof a,u)}return(i=Hu(c,s,o,t)).type=a,i.expirationTime=n,i._debugSource=e._source,i._debugOwner=e._owner,i}function Yu(e,t,n,r){var i=Hu(te,e,r,t);return i.expirationTime=n,i}function Qu(e,t,n){var r=Hu(ee,e,null,t);return r.expirationTime=n,r}function Xu(e,t,n){var r=null!==e.children?e.children:[],i=Hu(J,r,e.key,t);return i.expirationTime=n,i.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},i}function Ju(e,t){return null===e&&(e=Hu(Q,null,null,Uu)),e.tag=t.tag,e.key=t.key,e.type=t.type,e.stateNode=t.stateNode,e.return=t.return,e.child=t.child,e.sibling=t.sibling,e.index=t.index,e.ref=t.ref,e.pendingProps=t.pendingProps,e.memoizedProps=t.memoizedProps,e.updateQueue=t.updateQueue,e.memoizedState=t.memoizedState,e.firstContextDependency=t.firstContextDependency,e.mode=t.mode,e.effectTag=t.effectTag,e.nextEffect=t.nextEffect,e.firstEffect=t.firstEffect,e.lastEffect=t.lastEffect,e.expirationTime=t.expirationTime,e.childExpirationTime=t.childExpirationTime,e.alternate=t.alternate,Ni&&(e.actualDuration=t.actualDuration,e.actualStartTime=t.actualStartTime,e.selfBaseDuration=t.selfBaseDuration,e.treeBaseDuration=t.treeBaseDuration),e._debugID=t._debugID,e._debugSource=t._debugSource,e._debugOwner=t._debugOwner,e._debugIsCurrentlyTiming=t._debugIsCurrentlyTiming,e}function Zu(e,t,n){var r=function(e){var t=e?Lu|Fu:Uu;return Ni&&_u&&(t|=ju),Hu(X,null,null,t)}(t),i=void 0;return i=Di?{current:r,containerInfo:e,pendingChildren:null,earliestPendingTime:Su,latestPendingTime:Su,earliestSuspendedTime:Su,latestSuspendedTime:Su,latestPingedTime:Su,didError:!1,pendingCommitExpirationTime:Su,finishedWork:null,timeoutHandle:lc,context:null,pendingContext:null,hydrate:n,nextExpirationTimeToWorkOn:Su,expirationTime:Su,firstBatch:null,nextScheduledRoot:null,interactionThreadID:o.unstable_getThreadID(),memoizedInteractions:new Set,pendingInteractionMap:new Map}:{current:r,containerInfo:e,pendingChildren:null,earliestPendingTime:Su,latestPendingTime:Su,earliestSuspendedTime:Su,latestSuspendedTime:Su,latestPingedTime:Su,didError:!1,pendingCommitExpirationTime:Su,finishedWork:null,timeoutHandle:lc,context:null,pendingContext:null,hydrate:n,nextExpirationTimeToWorkOn:Su,expirationTime:Su,firstBatch:null,nextScheduledRoot:null},r.stateNode=i,i}var ed=function(e,t){if(void 0===t)throw new Error("`lowPriorityWarning(condition, format, ...args)` requires a warning message argument");if(!e){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];(function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=0,a="Warning: "+e.replace(/%s/g,function(){return n[i++]});"undefined"!=typeof console&&console.warn(a);try{throw new Error(a)}catch(e){}}).apply(void 0,[t].concat(r))}},td={discardPendingWarnings:function(){},flushPendingDeprecationWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordDeprecationWarnings:function(e,t){},recordUnsafeLifecycleWarnings:function(e,t){},recordLegacyContextWarning:function(e,t){},flushLegacyContextWarning:function(){}},nd={UNSAFE_componentWillMount:"componentDidMount",UNSAFE_componentWillReceiveProps:"static getDerivedStateFromProps",UNSAFE_componentWillUpdate:"componentDidUpdate"},rd=[],id=[],ad=[],od=new Map,sd=new Map,ld=new Set,cd=new Set,ud=new Set,dd=function(e){var t=[];return e.forEach(function(e){t.push(e)}),t.sort().join(", ")};td.discardPendingWarnings=function(){rd=[],id=[],ad=[],od=new Map,sd=new Map},td.flushPendingUnsafeLifecycleWarnings=function(){od.forEach(function(e,t){var n=[];if(Object.keys(e).forEach(function(t){var r=e[t];if(r.length>0){var i=new Set;r.forEach(function(e){i.add(Ar(e.type)||"Component"),cd.add(e.type)});var a=t.replace("UNSAFE_",""),o=nd[t],s=dd(i);n.push(a+": Please update the following components to use "+o+" instead: "+s)}}),n.length>0){var r=Rr(t);D(!1,"Unsafe lifecycle methods were found within a strict-mode tree:%s\n\n%s\n\nLearn more about this warning here:\nhttps://fb.me/react-strict-mode-warnings",r,n.join("\n\n"))}}),od=new Map};var pd=function(e){for(var t=null,n=e;null!==n;)n.mode&Fu&&(t=n),n=n.return;return t};td.flushPendingDeprecationWarnings=function(){if(rd.length>0){var e=new Set;rd.forEach(function(t){e.add(Ar(t.type)||"Component"),ld.add(t.type)});var t=dd(e);ed(!1,"componentWillMount is deprecated and will be removed in the next major version. Use componentDidMount instead. As a temporary workaround, you can rename to UNSAFE_componentWillMount.\n\nPlease update the following components: %s\n\nLearn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks",t),rd=[]}if(id.length>0){var n=new Set;id.forEach(function(e){n.add(Ar(e.type)||"Component"),ld.add(e.type)});var r=dd(n);ed(!1,"componentWillReceiveProps is deprecated and will be removed in the next major version. Use static getDerivedStateFromProps instead.\n\nPlease update the following components: %s\n\nLearn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks",r),id=[]}if(ad.length>0){var i=new Set;ad.forEach(function(e){i.add(Ar(e.type)||"Component"),ld.add(e.type)});var a=dd(i);ed(!1,"componentWillUpdate is deprecated and will be removed in the next major version. Use componentDidUpdate instead. As a temporary workaround, you can rename to UNSAFE_componentWillUpdate.\n\nPlease update the following components: %s\n\nLearn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks",a),ad=[]}},td.recordDeprecationWarnings=function(e,t){ld.has(e.type)||("function"==typeof t.componentWillMount&&!0!==t.componentWillMount.__suppressDeprecationWarning&&rd.push(e),"function"==typeof t.componentWillReceiveProps&&!0!==t.componentWillReceiveProps.__suppressDeprecationWarning&&id.push(e),"function"==typeof t.componentWillUpdate&&!0!==t.componentWillUpdate.__suppressDeprecationWarning&&ad.push(e))},td.recordUnsafeLifecycleWarnings=function(e,t){var n=pd(e);if(null!==n){if(!cd.has(e.type)){var r=void 0;od.has(n)?r=od.get(n):(r={UNSAFE_componentWillMount:[],UNSAFE_componentWillReceiveProps:[],UNSAFE_componentWillUpdate:[]},od.set(n,r));var i=[];("function"==typeof t.componentWillMount&&!0!==t.componentWillMount.__suppressDeprecationWarning||"function"==typeof t.UNSAFE_componentWillMount)&&i.push("UNSAFE_componentWillMount"),("function"==typeof t.componentWillReceiveProps&&!0!==t.componentWillReceiveProps.__suppressDeprecationWarning||"function"==typeof t.UNSAFE_componentWillReceiveProps)&&i.push("UNSAFE_componentWillReceiveProps"),("function"==typeof t.componentWillUpdate&&!0!==t.componentWillUpdate.__suppressDeprecationWarning||"function"==typeof t.UNSAFE_componentWillUpdate)&&i.push("UNSAFE_componentWillUpdate"),i.length>0&&i.forEach(function(t){r[t].push(e)})}}else D(!1,"Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue.")},td.recordLegacyContextWarning=function(e,t){var n=pd(e);if(null!==n){if(!ud.has(e.type)){var r=sd.get(n);(null!=e.type.contextTypes||null!=e.type.childContextTypes||null!==t&&"function"==typeof t.getChildContext)&&(void 0===r&&(r=[],sd.set(n,r)),r.push(e))}}else D(!1,"Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue.")},td.flushLegacyContextWarning=function(){sd.forEach(function(e,t){var n=new Set;e.forEach(function(e){n.add(Ar(e.type)||"Component"),ud.add(e.type)});var r=dd(n),i=Rr(t);D(!1,"Legacy context API has been detected within a strict-mode tree: %s\n\nPlease update the following components: %s\n\nLearn more about this warning here:\nhttps://fb.me/react-strict-mode-warnings",i,r)})};var hd={debugTool:null};function fd(e,t){e.didError=!1;var n=e.earliestPendingTime;n===Su?e.earliestPendingTime=e.latestPendingTime=t:n>t?e.earliestPendingTime=t:e.latestPendingTime<t&&(e.latestPendingTime=t);yd(t,e)}function md(e,t){e.didError=!1,function(e,t){var n=e.latestPingedTime;n!==Su&&n<=t&&(e.latestPingedTime=Su)}(e,t);var n=e.earliestPendingTime,r=e.latestPendingTime;n===t?e.earliestPendingTime=r===t?e.latestPendingTime=Su:r:r===t&&(e.latestPendingTime=n);var i=e.earliestSuspendedTime,a=e.latestSuspendedTime;i===Su?e.earliestSuspendedTime=e.latestSuspendedTime=t:i>t?e.earliestSuspendedTime=t:a<t&&(e.latestSuspendedTime=t),yd(t,e)}function gd(e,t){var n=t,r=e.earliestPendingTime,i=e.earliestSuspendedTime;return(n===Su||r!==Su&&r<n)&&(n=r),(n===Su||i!==Su&&i<n)&&(n=i),n}function vd(e,t){var n=e.expirationTime;n!==Su&&t>=n&&(e.nextExpirationTimeToWorkOn=t)}function yd(e,t){var n=t.earliestSuspendedTime,r=t.latestSuspendedTime,i=t.earliestPendingTime,a=t.latestPingedTime,o=i!==Su?i:a;o===Su&&(e===Su||r>e)&&(o=r);var s=o;s!==Su&&n!==Su&&n<s&&(s=n),t.nextExpirationTimeToWorkOn=o,t.expirationTime=s}var bd=0,wd=1,_d=2,Ed=3,Sd=!1,Td=void 0,kd=void 0,Cd=void 0;function xd(e){return{baseState:e,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Pd(e){return{baseState:e.baseState,firstUpdate:e.firstUpdate,lastUpdate:e.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Nd(e){return{expirationTime:e,tag:bd,payload:null,callback:null,next:null,nextEffect:null}}function Dd(e,t){null===e.lastUpdate?e.firstUpdate=e.lastUpdate=t:(e.lastUpdate.next=t,e.lastUpdate=t)}function Md(e,t){var n=e.alternate,r=void 0,i=void 0;null===n?(i=null,null===(r=e.updateQueue)&&(r=e.updateQueue=xd(e.memoizedState))):(r=e.updateQueue,i=n.updateQueue,null===r?null===i?(r=e.updateQueue=xd(e.memoizedState),i=n.updateQueue=xd(n.memoizedState)):r=e.updateQueue=Pd(i):null===i&&(i=n.updateQueue=Pd(r))),null===i||r===i?Dd(r,t):null===r.lastUpdate||null===i.lastUpdate?(Dd(r,t),Dd(i,t)):(Dd(r,t),i.lastUpdate=t),e.tag!==$&&e.tag!==Y||kd!==r&&(null===i||kd!==i)||Td||(D(!1,"An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback."),Td=!0)}function Ad(e,t){var n=e.updateQueue;null===(n=null===n?e.updateQueue=xd(e.memoizedState):Id(e,n)).lastCapturedUpdate?n.firstCapturedUpdate=n.lastCapturedUpdate=t:(n.lastCapturedUpdate.next=t,n.lastCapturedUpdate=t)}function Id(e,t){var n=e.alternate;return null!==n&&t===n.updateQueue&&(t=e.updateQueue=Pd(t)),t}function Od(e,t,n,i,a,o){switch(n.tag){case wd:var s=n.payload;return"function"==typeof s?((Ti||ki&&e.mode&Fu)&&s.call(o,i,a),s.call(o,i,a)):s;case Ed:e.effectTag=e.effectTag&~Ra|Na;case bd:var l=n.payload,c=void 0;return"function"==typeof l?((Ti||ki&&e.mode&Fu)&&l.call(o,i,a),c=l.call(o,i,a)):c=l,null===c||void 0===c?i:r({},i,c);case _d:return Sd=!0,i}return i}function Rd(e,t,n,r,i){Sd=!1,t=Id(e,t),kd=t;for(var a=t.baseState,o=null,s=Su,l=t.firstUpdate,c=a;null!==l;){var u=l.expirationTime;if(u>i)null===o&&(o=l,a=c),(s===Su||s>u)&&(s=u);else c=Od(e,0,l,c,n,r),null!==l.callback&&(e.effectTag|=Pa,l.nextEffect=null,null===t.lastEffect?t.firstEffect=t.lastEffect=l:(t.lastEffect.nextEffect=l,t.lastEffect=l));l=l.next}var d=null;for(l=t.firstCapturedUpdate;null!==l;){var p=l.expirationTime;if(p>i)null===d&&(d=l,null===o&&(a=c)),(s===Su||s>p)&&(s=p);else c=Od(e,0,l,c,n,r),null!==l.callback&&(e.effectTag|=Pa,l.nextEffect=null,null===t.lastCapturedEffect?t.firstCapturedEffect=t.lastCapturedEffect=l:(t.lastCapturedEffect.nextEffect=l,t.lastCapturedEffect=l));l=l.next}null===o&&(t.lastUpdate=null),null===d?t.lastCapturedUpdate=null:e.effectTag|=Pa,null===o&&null===d&&(a=c),t.baseState=a,t.firstUpdate=o,t.firstCapturedUpdate=d,e.expirationTime=s,e.memoizedState=c,kd=null}function Ud(){Sd=!1}function Ld(){return Sd}function Fd(e,t,n,r){null!==t.firstCapturedUpdate&&(null!==t.lastUpdate&&(t.lastUpdate.next=t.firstCapturedUpdate,t.lastUpdate=t.lastCapturedUpdate),t.firstCapturedUpdate=t.lastCapturedUpdate=null),jd(t.firstEffect,n),t.firstEffect=t.lastEffect=null,jd(t.firstCapturedEffect,n),t.firstCapturedEffect=t.lastCapturedEffect=null}function jd(e,t){for(;null!==e;){var n=e.callback;null!==n&&(e.callback=null,i=t,"function"!=typeof(r=n)&&l(!1,"Invalid argument passed as callback. Expected a function. Instead received: %s",r),r.call(i)),e=e.nextEffect}var r,i}function Wd(e,t){return{value:e,source:t,stack:Rr(t)}}Td=!1,kd=null,Cd=function(){kd=null};var Bd=Jc(null),zd=void 0;zd={};var Vd=null,qd=null,Hd=null;function Kd(e,t){var n=e.type._context;ac?(eu(Bd,n._currentValue,e),n._currentValue=t,void 0!==n._currentRenderer&&null!==n._currentRenderer&&n._currentRenderer!==zd&&D(!1,"Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),n._currentRenderer=zd):(eu(Bd,n._currentValue2,e),n._currentValue2=t,void 0!==n._currentRenderer2&&null!==n._currentRenderer2&&n._currentRenderer2!==zd&&D(!1,"Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),n._currentRenderer2=zd)}function Gd(e){var t=Bd.current;Zc(Bd,e);var n=e.type._context;ac?n._currentValue=t:n._currentValue2=t}function $d(e,t){Vd=e,qd=null,Hd=null,e.firstContextDependency=null}function Yd(e,t){if(Hd===e);else if(!1===t||0===t);else{var n=void 0;"number"!=typeof t||t===Eu?(Hd=e,n=Eu):n=t;var r={context:e,observedBits:n,next:null};null===qd?(null===Vd&&l(!1,"Context.unstable_read(): Context can only be read while React is rendering, e.g. inside the render method or getDerivedStateFromProps."),Vd.firstContextDependency=qd=r):qd=qd.next=r}return ac?e._currentValue:e._currentValue2}var Qd={},Xd=Jc(Qd),Jd=Jc(Qd),Zd=Jc(Qd);function ep(e){return e===Qd&&l(!1,"Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."),e}function tp(){return ep(Zd.current)}function np(e,t){eu(Zd,t,e),eu(Jd,e,e),eu(Xd,Qd,e);var n=function(e){var t=void 0,n=void 0,r=e.nodeType;switch(r){case rr:case ir:t=r===rr?"#document":"#fragment";var i=e.documentElement;n=i?i.namespaceURI:us(null,"");break;default:var a=r===nr?e.parentNode:e;n=us(a.namespaceURI||null,t=a.tagName)}var o=t.toLowerCase();return{namespace:n,ancestorInfo:Ol(null,o)}}(t);Zc(Xd,e),eu(Xd,n,e)}function rp(e){Zc(Xd,e),Zc(Jd,e),Zc(Zd,e)}function ip(){return ep(Xd.current)}function ap(e){ep(Zd.current);var t,n,r,i=ep(Xd.current),a=(t=i,n=e.type,{namespace:us((r=t).namespace,n),ancestorInfo:Ol(r.ancestorInfo,n)});i!==a&&(eu(Jd,e,e),eu(Xd,a,e))}function op(e){Jd.current===e&&(Zc(Xd,e),Zc(Jd,e))}var sp=0,lp=-1;function cp(){return sp}function up(e){Ni&&(lp=a.unstable_now(),e.actualStartTime<0&&(e.actualStartTime=a.unstable_now()))}function dp(e){Ni&&(lp=-1)}function pp(e,t){if(Ni&&lp>=0){var n=a.unstable_now()-lp;e.actualDuration+=n,t&&(e.selfBaseDuration=n),lp=-1}}var hp,fp={},mp=Array.isArray,gp=(new n.Component).refs,vp=void 0,yp=void 0,bp=void 0,wp=void 0,_p=void 0,Ep=void 0,Sp=void 0;vp=new Set,yp=new Set,bp=new Set,wp=new Set,Sp=new Set,_p=new Set;var Tp=new Set;function kp(e,t,n,i){var a=e.memoizedState;(Ti||ki&&e.mode&Fu)&&n(i,a);var o=n(i,a);Ep(t,o);var s=null===o||void 0===o?a:r({},a,o);e.memoizedState=s;var l=e.updateQueue;null!==l&&e.expirationTime===Su&&(l.baseState=s)}hp=function(e,t){if(null!==e&&"function"!=typeof e){var n=t+"_"+e;Tp.has(n)||(Tp.add(n),D(!1,"%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",t,e))}},Ep=function(e,t){if(void 0===t){var n=Ar(e)||"Component";_p.has(n)||(_p.add(n),D(!1,"%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",n))}},Object.defineProperty(fp,"_processChildContext",{enumerable:!1,value:function(){l(!1,"_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).")}}),Object.freeze(fp);var Cp={isMounted:function(e){var t=Ua.current;if(null!==t&&(t.tag===$||t.tag===Y)){var n=t,r=n.stateNode;r._warnedAboutRefsInRender||D(!1,"%s is accessing isMounted inside its render() function. render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",Ar(n.type)||"A component"),r._warnedAboutRefsInRender=!0}var i=wa(e);return!!i&&Wa(i)===Fa},enqueueSetState:function(e,t,n){var r=wa(e),i=Of(hm(),r),a=Nd(i);a.payload=t,void 0!==n&&null!==n&&(hp(n,"setState"),a.callback=n),Md(r,a),jf(r,i)},enqueueReplaceState:function(e,t,n){var r=wa(e),i=Of(hm(),r),a=Nd(i);a.tag=wd,a.payload=t,void 0!==n&&null!==n&&(hp(n,"replaceState"),a.callback=n),Md(r,a),jf(r,i)},enqueueForceUpdate:function(e,t){var n=wa(e),r=Of(hm(),n),i=Nd(r);i.tag=_d,void 0!==t&&null!==t&&(hp(t,"forceUpdate"),i.callback=t),Md(n,i),jf(n,r)}};function xp(e,t,n,r,i,a,o){var s=e.stateNode;if("function"==typeof s.shouldComponentUpdate){Kc(e,"shouldComponentUpdate");var l=s.shouldComponentUpdate(r,a,o);return Gc(),void 0===l&&D(!1,"%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",Ar(t)||"Component"),l}return!t.prototype||!t.prototype.isPureReactComponent||(!ba(n,r)||!ba(i,a))}function Pp(e,t){var n;t.updater=Cp,e.stateNode=t,n=e,t._reactInternalFiber=n,t._reactInternalInstance=fp}function Np(e,t,n,r){var i=t.state;if(Kc(e,"componentWillReceiveProps"),"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),Gc(),t.state!==i){var a=Ar(e.type)||"Component";vp.has(a)||(vp.add(a),D(!1,"%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",a)),Cp.enqueueReplaceState(t,t.state,null)}}function Dp(e,t,n,r){!function(e,t,n){var r=e.stateNode,i=Ar(t)||"Component";r.render||(t.prototype&&"function"==typeof t.prototype.render?D(!1,"%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?",i):D(!1,"%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.",i)),!r.getInitialState||r.getInitialState.isReactClassApproved||r.state||D(!1,"getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",i),!r.getDefaultProps||r.getDefaultProps.isReactClassApproved||D(!1,"getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",i),!r.propTypes||D(!1,"propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",i),!r.contextTypes||D(!1,"contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.",i),"function"!=typeof r.componentShouldUpdate||D(!1,"%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",i),t.prototype&&t.prototype.isPureReactComponent&&void 0!==r.shouldComponentUpdate&&D(!1,"%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",Ar(t)||"A pure component"),"function"!=typeof r.componentDidUnmount||D(!1,"%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",i),"function"!=typeof r.componentDidReceiveProps||D(!1,"%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",i),"function"!=typeof r.componentWillRecieveProps||D(!1,"%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",i),"function"!=typeof r.UNSAFE_componentWillRecieveProps||D(!1,"%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",i);var a=r.props!==n;void 0!==r.props&&a&&D(!1,"%s(...): When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",i,i),!r.defaultProps||D(!1,"Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",i,i),"function"!=typeof r.getSnapshotBeforeUpdate||"function"==typeof r.componentDidUpdate||bp.has(t)||(bp.add(t),D(!1,"%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",Ar(t))),"function"!=typeof r.getDerivedStateFromProps||D(!1,"%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",i),"function"!=typeof r.getDerivedStateFromCatch||D(!1,"%s: getDerivedStateFromCatch() is defined as an instance method and will be ignored. Instead, declare it as a static method.",i),"function"!=typeof t.getSnapshotBeforeUpdate||D(!1,"%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",i);var o=r.state;o&&("object"!=typeof o||mp(o))&&D(!1,"%s.state: must be set to an object or null",i),"function"==typeof r.getChildContext&&"object"!=typeof t.childContextTypes&&D(!1,"%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",i)}(e,t,n);var i=e.stateNode,a=ou(0,t,!0);if(i.props=n,i.state=e.memoizedState,i.refs=gp,i.context=lu(e,a),i.state===n){var o=Ar(t)||"Component";Sp.has(o)||(Sp.add(o),D(!1,"%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",o))}e.mode&Fu&&(td.recordUnsafeLifecycleWarnings(e,i),td.recordLegacyContextWarning(e,i)),xi&&td.recordDeprecationWarnings(e,i);var s=e.updateQueue;null!==s&&(Rd(e,s,n,i,r),i.state=e.memoizedState);var l=t.getDerivedStateFromProps;"function"==typeof l&&(kp(e,t,l,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(!function(e,t){Kc(e,"componentWillMount");var n=t.state;"function"==typeof t.componentWillMount&&t.componentWillMount(),"function"==typeof t.UNSAFE_componentWillMount&&t.UNSAFE_componentWillMount(),Gc(),n!==t.state&&(D(!1,"%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",Ar(e.type)||"Component"),Cp.enqueueReplaceState(t,t.state,null))}(e,i),null!==(s=e.updateQueue)&&(Rd(e,s,n,i,r),i.state=e.memoizedState)),"function"==typeof i.componentDidMount&&(e.effectTag|=Ta)}var Mp=void 0,Ap=void 0,Ip=void 0,Op=void 0,Rp=void 0,Up=function(e){};Mp=!1,Ap=!1,Ip={},Op={},Rp={},Up=function(e){if(null!==e&&"object"==typeof e&&e._store&&!e._store.validated&&null==e.key){"object"!=typeof e._store&&l(!1,"React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue."),e._store.validated=!0;var t='Each child in an array or iterator should have a unique "key" prop. See https://fb.me/react-warning-keys for more information.'+jr();Op[t]||(Op[t]=!0,Vr(!1,'Each child in an array or iterator should have a unique "key" prop. See https://fb.me/react-warning-keys for more information.'))}};var Lp=Array.isArray;function Fp(e,t,n){var r=n.ref;if(null!==r&&"function"!=typeof r&&"object"!=typeof r){if(e.mode&Fu){var i=Ar(e.type)||"Component";Ip[i]||(D(!1,'A string ref, "%s", has been found within a strict mode tree. String refs are a source of potential bugs and should be avoided. We recommend using createRef() instead.\n%s\n\nLearn more about using refs safely here:\nhttps://fb.me/react-strict-mode-string-ref',r,Rr(e)),Ip[i]=!0)}if(n._owner){var a=n._owner,o=void 0;if(a){var s=a;s.tag!==$&&s.tag!==Y&&l(!1,"Stateless function components cannot have refs."),o=s.stateNode}o||l(!1,"Missing owner for string ref %s. This error is likely caused by a bug in React. Please file an issue.",r);var c=""+r;if(null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===c)return t.ref;var u=function(e){var t=o.refs;t===gp&&(t=o.refs={}),null===e?delete t[c]:t[c]=e};return u._stringRef=c,u}"string"!=typeof r&&l(!1,"Expected ref to be a function, a string, an object returned by React.createRef(), or null."),n._owner||l(!1,"Element ref was specified as a string (%s) but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a functional component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://fb.me/react-refs-must-have-owner for more information.",r)}return r}function jp(e,t){if("textarea"!==e.type){var n;n=" If you meant to render a collection of children, use an array instead."+jr(),l(!1,"Objects are not valid as a React child (found: %s).%s","[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,n)}}function Wp(){var e="Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it."+jr();Rp[e]||(Rp[e]=!0,Vr(!1,"Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it."))}function Bp(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=Ca}}function n(n,r){if(!e)return null;for(var i=r;null!==i;)t(n,i),i=i.sibling;return null}function r(e,t){for(var n=new Map,r=t;null!==r;)null!==r.key?n.set(r.key,r):n.set(r.index,r),r=r.sibling;return n}function i(e,t,n){var r=Gu(e,t,n);return r.index=0,r.sibling=null,r}function a(t,n,r){if(t.index=r,!e)return n;var i=t.alternate;if(null!==i){var a=i.index;return a<n?(t.effectTag=Sa,n):a}return t.effectTag=Sa,n}function o(t){return e&&null===t.alternate&&(t.effectTag=Sa),t}function s(e,t,n,r){if(null===t||t.tag!==ee){var a=Qu(n,e.mode,r);return a.return=e,a}var o=i(t,n,r);return o.return=e,o}function c(e,t,n,r){if(null!==t&&t.type===n.type){var a=i(t,n.props,r);return a.ref=Fp(e,t,n),a.return=e,a._debugSource=n._source,a._debugOwner=n._owner,a}var o=$u(n,e.mode,r);return o.ref=Fp(e,t,n),o.return=e,o}function u(e,t,n,r){if(null===t||t.tag!==J||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation){var a=Xu(n,e.mode,r);return a.return=e,a}var o=i(t,n.children||[],r);return o.return=e,o}function d(e,t,n,r,a){if(null===t||t.tag!==te){var o=Yu(n,e.mode,r,a);return o.return=e,o}var s=i(t,n,r);return s.return=e,s}function p(e,t,n){if("string"==typeof t||"number"==typeof t){var r=Qu(""+t,e.mode,n);return r.return=e,r}if("object"==typeof t&&null!==t){switch(t.$$typeof){case mr:var i=$u(t,e.mode,n);return i.ref=Fp(e,null,t),i.return=e,i;case gr:var a=Xu(t,e.mode,n);return a.return=e,a}if(Lp(t)||xr(t)){var o=Yu(t,e.mode,n,null);return o.return=e,o}jp(e,t)}return"function"==typeof t&&Wp(),null}function h(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==i?null:s(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case mr:return n.key===i?n.type===vr?d(e,t,n.props.children,r,i):c(e,t,n,r):null;case gr:return n.key===i?u(e,t,n,r):null}if(Lp(n)||xr(n))return null!==i?null:d(e,t,n,r,null);jp(e,n)}return"function"==typeof n&&Wp(),null}function f(e,t,n,r,i){if("string"==typeof r||"number"==typeof r)return s(t,e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case mr:var a=e.get(null===r.key?n:r.key)||null;return r.type===vr?d(t,a,r.props.children,i,r.key):c(t,a,r,i);case gr:return u(t,e.get(null===r.key?n:r.key)||null,r,i)}if(Lp(r)||xr(r))return d(t,e.get(n)||null,r,i,null);jp(t,r)}return"function"==typeof r&&Wp(),null}function m(e,t){if("object"!=typeof e||null===e)return t;switch(e.$$typeof){case mr:case gr:Up(e);var n=e.key;if("string"!=typeof n)break;if(null===t){(t=new Set).add(n);break}if(!t.has(n)){t.add(n);break}Vr(!1,"Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",n)}return t}return function(s,c,u,d){var g="object"==typeof u&&null!==u&&u.type===vr&&null===u.key;g&&(u=u.props.children);var v="object"==typeof u&&null!==u;if(v)switch(u.$$typeof){case mr:return o(function(e,r,a,o){for(var s=a.key,l=r;null!==l;){if(l.key===s){if(l.tag===te?a.type===vr:l.type===a.type){n(e,l.sibling);var c=i(l,a.type===vr?a.props.children:a.props,o);return c.ref=Fp(e,l,a),c.return=e,c._debugSource=a._source,c._debugOwner=a._owner,c}n(e,l);break}t(e,l),l=l.sibling}if(a.type===vr){var u=Yu(a.props.children,e.mode,o,a.key);return u.return=e,u}var d=$u(a,e.mode,o);return d.ref=Fp(e,r,a),d.return=e,d}(s,c,u,d));case gr:return o(function(e,r,a,o){for(var s=a.key,l=r;null!==l;){if(l.key===s){if(l.tag===J&&l.stateNode.containerInfo===a.containerInfo&&l.stateNode.implementation===a.implementation){n(e,l.sibling);var c=i(l,a.children||[],o);return c.return=e,c}n(e,l);break}t(e,l),l=l.sibling}var u=Xu(a,e.mode,o);return u.return=e,u}(s,c,u,d))}if("string"==typeof u||"number"==typeof u)return o(function(e,t,r,a){if(null!==t&&t.tag===ee){n(e,t.sibling);var o=i(t,r,a);return o.return=e,o}n(e,t);var s=Qu(r,e.mode,a);return s.return=e,s}(s,c,""+u,d));if(Lp(u))return function(i,o,s,l){for(var c=null,u=0;u<s.length;u++)c=m(s[u],c);for(var d=null,g=null,v=o,y=0,b=0,w=null;null!==v&&b<s.length;b++){v.index>b?(w=v,v=null):w=v.sibling;var _=h(i,v,s[b],l);if(null===_){null===v&&(v=w);break}e&&v&&null===_.alternate&&t(i,v),y=a(_,y,b),null===g?d=_:g.sibling=_,g=_,v=w}if(b===s.length)return n(i,v),d;if(null===v){for(;b<s.length;b++){var E=p(i,s[b],l);E&&(y=a(E,y,b),null===g?d=E:g.sibling=E,g=E)}return d}for(var S=r(0,v);b<s.length;b++){var T=f(S,i,b,s[b],l);T&&(e&&null!==T.alternate&&S.delete(null===T.key?b:T.key),y=a(T,y,b),null===g?d=T:g.sibling=T,g=T)}return e&&S.forEach(function(e){return t(i,e)}),d}(s,c,u,d);if(xr(u))return function(i,o,s,c){var u=xr(s);"function"!=typeof u&&l(!1,"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue."),"function"==typeof Symbol&&"Generator"===s[Symbol.toStringTag]&&(Ap||Vr(!1,"Using Generators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. Keep in mind you might need to polyfill these features for older browsers."),Ap=!0),s.entries===u&&(Mp||Vr(!1,"Using Maps as children is unsupported and will likely yield unexpected results. Convert it to a sequence/iterable of keyed ReactElements instead."),Mp=!0);var d=u.call(s);if(d)for(var g=null,v=d.next();!v.done;v=d.next())g=m(v.value,g);var y=u.call(s);null==y&&l(!1,"An iterable object provided no iterator.");for(var b=null,w=null,_=o,E=0,S=0,T=null,k=y.next();null!==_&&!k.done;S++,k=y.next()){_.index>S?(T=_,_=null):T=_.sibling;var C=h(i,_,k.value,c);if(null===C){_||(_=T);break}e&&_&&null===C.alternate&&t(i,_),E=a(C,E,S),null===w?b=C:w.sibling=C,w=C,_=T}if(k.done)return n(i,_),b;if(null===_){for(;!k.done;S++,k=y.next()){var x=p(i,k.value,c);null!==x&&(E=a(x,E,S),null===w?b=x:w.sibling=x,w=x)}return b}for(var P=r(0,_);!k.done;S++,k=y.next()){var N=f(P,i,S,k.value,c);null!==N&&(e&&null!==N.alternate&&P.delete(null===N.key?S:N.key),E=a(N,E,S),null===w?b=N:w.sibling=N,w=N)}return e&&P.forEach(function(e){return t(i,e)}),b}(s,c,u,d);if(v&&jp(s,u),"function"==typeof u&&Wp(),void 0===u&&!g)switch(s.tag){case $:case Y:if(s.stateNode.render._isMockFunction)break;case K:var y=s.type;l(!1,"%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.",y.displayName||y.name||"Component")}return n(s,c)}}var zp=Bp(!0),Vp=Bp(!1);var qp=null,Hp=null,Kp=!1;function Gp(e,t){switch(e.tag){case X:!function(e,t){t.nodeType===er?Nl(e,t):Dl(e,t)}(e.stateNode.containerInfo,t);break;case Z:!function(e,t,n,r){!0!==t[$l]&&(r.nodeType===er?Nl(n,r):Dl(n,r))}(e.type,e.memoizedProps,e.stateNode,t)}var n,r=((n=Hu(Z,null,null,Uu)).type="DELETED",n);r.stateNode=t,r.return=e,r.effectTag=Ca,null!==e.lastEffect?(e.lastEffect.nextEffect=r,e.lastEffect=r):e.firstEffect=e.lastEffect=r}function $p(e,t){switch(t.effectTag|=Sa,e.tag){case X:var n=e.stateNode.containerInfo;switch(t.tag){case Z:var r=t.type;t.pendingProps;!function(e,t,n){Ml(e,t)}(n,r);break;case ee:!function(e,t){Al(e,t)}(n,t.pendingProps)}break;case Z:e.type;var i=e.memoizedProps,a=e.stateNode;switch(t.tag){case Z:var o=t.type;t.pendingProps;!function(e,t,n,r,i){!0!==t[$l]&&Ml(n,r)}(0,i,a,o);break;case ee:!function(e,t,n,r){!0!==t[$l]&&Al(n,r)}(0,i,a,t.pendingProps)}break;default:return}}function Yp(e,t){switch(e.tag){case Z:var n=e.type,r=(e.pendingProps,function(e,t,n){return e.nodeType!==er||t.toLowerCase()!==e.nodeName.toLowerCase()?null:e}(t,n));return null!==r&&(e.stateNode=r,!0);case ee:var i=function(e,t){return""===t||e.nodeType!==tr?null:e}(t,e.pendingProps);return null!==i&&(e.stateNode=i,!0);default:return!1}}function Qp(e){if(Kp){var t=Hp;if(!t)return $p(qp,e),Kp=!1,void(qp=e);var n=t;if(!Yp(e,t)){if(!(t=gc(n))||!Yp(e,t))return $p(qp,e),Kp=!1,void(qp=e);Gp(qp,n)}qp=e,Hp=vc(t)}}function Xp(e){mc||l(!1,"Expected prepareToHydrateHostTextInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");var t=e.stateNode,n=e.memoizedProps,r=function(e,t,n){return pe(n,e),function(e,t){return e.nodeValue!==t}(e,t)}(t,n,e);if(r){var i=qp;if(null!==i)switch(i.tag){case X:i.stateNode.containerInfo;!function(e,t,n){Pl(t,n)}(0,t,n);break;case Z:i.type;var a=i.memoizedProps;i.stateNode;!function(e,t,n,r,i){!0!==t[$l]&&Pl(r,i)}(0,a,0,t,n)}}return r}function Jp(e){for(var t=e.return;null!==t&&t.tag!==Z&&t.tag!==X;)t=t.return;qp=t}function Zp(e){if(!mc)return!1;if(e!==qp)return!1;if(!Kp)return Jp(e),Kp=!0,!1;var t=e.type;if(e.tag!==Z||"head"!==t&&"body"!==t&&!rc(t,e.memoizedProps))for(var n=Hp;n;)Gp(e,n),n=gc(n);return Jp(e),Hp=qp?gc(e.stateNode):null,!0}function eh(){mc&&(qp=null,Hp=null,Kp=!1)}var th=dr.ReactCurrentOwner,nh=void 0,rh=void 0,ih=void 0;function ah(e,t,n,r){t.child=null===e?Vp(t,null,n,r):zp(t,e.child,n,r)}function oh(e,t,n,r,i){var a=n.render,o=t.ref;if(cu());else if(t.memoizedProps===r){if(o===(null!==e?e.ref:null))return gh(e,t,i)}var s;return th.current=t,zr("render"),s=a(r,o),zr(null),ah(e,t,s,i),vh(t,r),t.child}function sh(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=Da)}function lh(e,t,n,r,i){var a,o=lu(t,ou(0,n,!0));return $d(t),th.current=t,zr("render"),a=n(r,o),zr(null),t.effectTag|=Ea,ah(e,t,a,i),vh(t,r),t.child}function ch(e,t,n,r,i){var a=void 0;uu(n)?(a=!0,mu(t)):a=!1,$d(t);var o=void 0;return null===e?null===t.stateNode?(!function(e,t,n,r){var i=ou(0,t,!0),a=t.contextTypes,o=null!==a&&void 0!==a,s=o?lu(e,i):nu;(Ti||ki&&e.mode&Fu)&&new t(n,s);var l=new t(n,s),c=e.memoizedState=null!==l.state&&void 0!==l.state?l.state:null;if(Pp(e,l),"function"==typeof t.getDerivedStateFromProps&&null===c){var u=Ar(t)||"Component";yp.has(u)||(yp.add(u),D(!1,"`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",u,null===l.state?"null":"undefined",u))}if("function"==typeof t.getDerivedStateFromProps||"function"==typeof l.getSnapshotBeforeUpdate){var d=null,p=null,h=null;if("function"==typeof l.componentWillMount&&!0!==l.componentWillMount.__suppressDeprecationWarning?d="componentWillMount":"function"==typeof l.UNSAFE_componentWillMount&&(d="UNSAFE_componentWillMount"),"function"==typeof l.componentWillReceiveProps&&!0!==l.componentWillReceiveProps.__suppressDeprecationWarning?p="componentWillReceiveProps":"function"==typeof l.UNSAFE_componentWillReceiveProps&&(p="UNSAFE_componentWillReceiveProps"),"function"==typeof l.componentWillUpdate&&!0!==l.componentWillUpdate.__suppressDeprecationWarning?h="componentWillUpdate":"function"==typeof l.UNSAFE_componentWillUpdate&&(h="UNSAFE_componentWillUpdate"),null!==d||null!==p||null!==h){var f=Ar(t)||"Component",m="function"==typeof t.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";wp.has(f)||(wp.add(f),D(!1,"Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks",f,m,null!==d?"\n "+d:"",null!==p?"\n "+p:"",null!==h?"\n "+h:""))}}o&&su(e,i,s)}(t,n,r),Dp(t,n,r,i),o=!0):o=function(e,t,n,r){var i=e.stateNode,a=e.memoizedProps;i.props=a;var o=i.context,s=lu(e,ou(0,t,!0)),l=t.getDerivedStateFromProps,c="function"==typeof l||"function"==typeof i.getSnapshotBeforeUpdate;c||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||a===n&&o===s||Np(e,i,n,s),Ud();var u=e.memoizedState,d=i.state=u,p=e.updateQueue;if(null!==p&&(Rd(e,p,n,i,r),d=e.memoizedState),a===n&&u===d&&!cu()&&!Ld())return"function"==typeof i.componentDidMount&&(e.effectTag|=Ta),!1;"function"==typeof l&&(kp(e,t,l,n),d=e.memoizedState);var h=Ld()||xp(e,t,a,n,u,d,s);return h?(c||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(Kc(e,"componentWillMount"),"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),Gc()),"function"==typeof i.componentDidMount&&(e.effectTag|=Ta)):("function"==typeof i.componentDidMount&&(e.effectTag|=Ta),e.memoizedProps=n,e.memoizedState=d),i.props=n,i.state=d,i.context=s,h}(t,n,r,i):o=function(e,t,n,r,i){var a=t.stateNode,o=t.memoizedProps;a.props=o;var s=a.context,l=lu(t,ou(0,n,!0)),c=n.getDerivedStateFromProps,u="function"==typeof c||"function"==typeof a.getSnapshotBeforeUpdate;u||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||o===r&&s===l||Np(t,a,r,l),Ud();var d=t.memoizedState,p=a.state=d,h=t.updateQueue;if(null!==h&&(Rd(t,h,r,a,i),p=t.memoizedState),o===r&&d===p&&!cu()&&!Ld())return"function"==typeof a.componentDidUpdate&&(o===e.memoizedProps&&d===e.memoizedState||(t.effectTag|=Ta)),"function"==typeof a.getSnapshotBeforeUpdate&&(o===e.memoizedProps&&d===e.memoizedState||(t.effectTag|=Ma)),!1;"function"==typeof c&&(kp(t,n,c,r),p=t.memoizedState);var f=Ld()||xp(t,n,o,r,d,p,l);return f?(u||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||(Kc(t,"componentWillUpdate"),"function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,l),Gc()),"function"==typeof a.componentDidUpdate&&(t.effectTag|=Ta),"function"==typeof a.getSnapshotBeforeUpdate&&(t.effectTag|=Ma)):("function"==typeof a.componentDidUpdate&&(o===e.memoizedProps&&d===e.memoizedState||(t.effectTag|=Ta)),"function"==typeof a.getSnapshotBeforeUpdate&&(o===e.memoizedProps&&d===e.memoizedState||(t.effectTag|=Ma)),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=l,f}(e,t,n,r,i),uh(e,t,n,o,a,i)}function uh(e,t,n,r,i,a){sh(e,t);var o=(t.effectTag&Na)!==_a;if(!r&&!o)return i&&gu(t,n,!1),gh(e,t,a);var s=t.stateNode;th.current=t;var l=void 0;return!o||Ei&&"function"==typeof n.getDerivedStateFromCatch?(zr("render"),l=s.render(),(Ti||ki&&t.mode&Fu)&&s.render(),zr(null)):(l=null,Ni&&dp()),t.effectTag|=Ea,null!==e&&o&&(ah(e,t,null,a),t.child=null),ah(e,t,l,a),function(e,t){e.memoizedState=t}(t,s.state),vh(t,s.props),i&&gu(t,n,!0),t.child}function dh(e){var t=e.stateNode;t.pendingContext?hu(e,t.pendingContext,t.pendingContext!==t.context):t.context&&hu(e,t.context,!1),np(e,t.containerInfo)}function ph(e,t,n){dh(t);var r=t.updateQueue;null===r&&l(!1,"If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue.");var i=t.pendingProps,a=t.memoizedState,o=null!==a?a.element:null;Rd(t,r,i,null,n);var s=t.memoizedState.element;if(s===o)return eh(),gh(e,t,n);var c=t.stateNode;return(null===e||null===e.child)&&c.hydrate&&function(e){if(!mc)return!1;var t=e.stateNode.containerInfo;return Hp=vc(t),qp=e,Kp=!0,!0}(t)?(t.effectTag|=Sa,t.child=Vp(t,null,s,n)):(ah(e,t,s,n),eh()),t.child}function hh(e,t){if(e&&e.defaultProps){var n=r({},t),i=e.defaultProps;for(var a in i)void 0===n[a]&&(n[a]=i[a]);return n}return t}function fh(e,t,n,r){null!==e&&l(!1,"An indeterminate component should never have mounted. This error is likely caused by a bug in React. Please file an issue.");var i=t.pendingProps;if("object"==typeof n&&null!==n&&"function"==typeof n.then){n=function(e){switch(e._reactStatus){case Nr:return e._reactResult;case Dr:throw e._reactResult;case Pr:throw e;default:throw e._reactStatus=Pr,e.then(function(t){if(e._reactStatus===Pr){if(e._reactStatus=Nr,"object"==typeof t&&null!==t){var n=t.default;t=void 0!==n&&null!==n?n:t}else t=t;e._reactResult=t}},function(t){e._reactStatus===Pr&&(e._reactStatus=Dr,e._reactResult=t)}),e}}(n);var a=t.tag=function(e,t){return"function"==typeof t?Ku(t)?Y:G:void 0!==t&&null!==t&&t.$$typeof?oe:Q}(0,n),o=hh(n,i);switch(a){case G:return lh(e,t,n,o,r);case Y:return ch(e,t,n,o,r);case oe:return oh(e,t,n,o,r);default:l(!1,"Element type is invalid. Received a promise that resolves to: %s. Promise elements must resolve to a class or function.",n)}}var s=lu(t,ou(0,n,!1));$d(t);var c;if(n.prototype&&"function"==typeof n.prototype.render){var u=Ar(n)||"Unknown";nh[u]||(D(!1,"The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",u,u),nh[u]=!0)}if(t.mode&Fu&&td.recordLegacyContextWarning(t,null),th.current=t,c=n(i,s),t.effectTag|=Ea,"object"==typeof c&&null!==c&&"function"==typeof c.render&&void 0===c.$$typeof){t.tag=$;var d=!1;uu(n)?(d=!0,mu(t)):d=!1,t.memoizedState=null!==c.state&&void 0!==c.state?c.state:null;var p=n.getDerivedStateFromProps;return"function"==typeof p&&kp(t,n,p,i),Pp(t,c),Dp(t,n,i,r),uh(e,t,n,!0,d,r)}if(t.tag=K,n&&n.childContextTypes&&D(!1,"%s(...): childContextTypes cannot be defined on a functional component.",n.displayName||n.name||"Component"),null!==t.ref){var h="",f=Fr();f&&(h+="\n\nCheck the render method of `"+f+"`.");var m=f||t._debugID||"",g=t._debugSource;g&&(m=g.fileName+":"+g.lineNumber),ih[m]||(ih[m]=!0,Vr(!1,"Stateless function components cannot be given refs. Attempts to access this ref will fail.%s",h))}if("function"==typeof n.getDerivedStateFromProps){var v=Ar(n)||"Unknown";rh[v]||(D(!1,"%s: Stateless functional components do not support getDerivedStateFromProps.",v),rh[v]=!0)}return ah(e,t,c,r),vh(t,i),t.child}function mh(e,t,n){var r=t.type._context,a=t.pendingProps,o=t.memoizedProps,s=a.value;t.memoizedProps=a;var l=t.type.propTypes;if(l&&i(l,a,"prop","Context.Provider",jr),Kd(t,s),null!==o){var c=function(e,t,n){if(n===t&&(0!==n||1/n==1/t)||n!=n&&t!=t)return 0;var r="function"==typeof e._calculateChangedBits?e._calculateChangedBits(n,t):Eu;return(r&Eu)!==r&&Vr(!1,"calculateChangedBits: Expected the return value to be a 31-bit integer. Instead received: %s",r),0|r}(r,s,o.value);if(0===c){if(o.children===a.children&&!cu())return gh(e,t,n)}else!function(e,t,n,r){var i=e.child;for(null!==i&&(i.return=e);null!==i;){var a=void 0,o=i.firstContextDependency;if(null!==o)do{if(o.context===t&&0!=(o.observedBits&n)){if(i.tag===$||i.tag===Y){var s=Nd(r);s.tag=_d,Md(i,s)}(i.expirationTime===Su||i.expirationTime>r)&&(i.expirationTime=r);var l=i.alternate;null!==l&&(l.expirationTime===Su||l.expirationTime>r)&&(l.expirationTime=r);for(var c=i.return;null!==c;){if(l=c.alternate,c.childExpirationTime===Su||c.childExpirationTime>r)c.childExpirationTime=r,null!==l&&(l.childExpirationTime===Su||l.childExpirationTime>r)&&(l.childExpirationTime=r);else{if(null===l||!(l.childExpirationTime===Su||l.childExpirationTime>r))break;l.childExpirationTime=r}c=c.return}}a=i.child,o=o.next}while(null!==o);else a=i.tag===ie&&i.type===e.type?null:i.child;if(null!==a)a.return=i;else for(a=i;null!==a;){if(a===e){a=null;break}var u=a.sibling;if(null!==u){u.return=a.return,a=u;break}a=a.return}i=a}}(t,r,c,n)}return ah(e,t,a.children,n),t.child}function gh(e,t,n){!function(e){if(_i){if(!bc||Fc(e))return;e._debugIsCurrentlyTiming=!1,Uc(e,null)}}(t),null!==e&&(t.firstContextDependency=e.firstContextDependency),Ni&&dp();var r=t.childExpirationTime;return r===Su||r>n?null:(function(e,t){if(null!==e&&t.child!==e.child&&l(!1,"Resuming work not yet implemented."),null!==t.child){var n=t.child,r=Gu(n,n.pendingProps,n.expirationTime);for(t.child=r,r.return=t;null!==n.sibling;)n=n.sibling,(r=r.sibling=Gu(n,n.pendingProps,n.expirationTime)).return=t;r.sibling=null}}(e,t),t.child)}function vh(e,t){e.memoizedProps=t}function yh(e,t,n){var r=t.expirationTime;if(!cu()&&(r===Su||r>n)){switch(t.tag){case X:dh(t),eh();break;case Z:ap(t);break;case $:uu(t.type)&&mu(t);break;case Y:uu(Mr(t.type))&&mu(t);break;case J:np(t,t.stateNode.containerInfo);break;case ie:Kd(t,t.memoizedProps.value);break;case se:Ni&&(t.effectTag|=Ta)}return gh(e,t,n)}switch(t.expirationTime=Su,t.tag){case Q:return fh(e,t,t.type,n);case K:return lh(e,t,t.type,t.pendingProps,n);case G:var i=Mr(t.type),a=t.pendingProps,o=lh(e,t,i,hh(i,a),n);return t.memoizedProps=a,o;case $:return ch(e,t,t.type,t.pendingProps,n);case Y:var s=Mr(t.type),c=t.pendingProps,u=ch(e,t,s,hh(s,c),n);return t.memoizedProps=c,u;case X:return ph(e,t,n);case Z:return function(e,t,n){ap(t),null===e&&Qp(t);var r=t.type,i=t.pendingProps,a=null!==e?e.memoizedProps:null,o=i.children;return rc(r,i)?o=null:null!==a&&rc(r,a)&&(t.effectTag|=xa),sh(e,t),n!==ku&&t.mode&Lu&&i.hidden?(t.expirationTime=ku,t.memoizedProps=i,null):(ah(e,t,o,n),vh(t,i),t.child)}(e,t,n);case ee:return function(e,t){return null===e&&Qp(t),vh(t,t.pendingProps),null}(e,t);case le:return function(e,t,n){if(Si){var r=t.pendingProps,i=(t.effectTag&Na)===_a,a=void 0;null!==e&&null!==t.updateQueue?(t.updateQueue=null,a=!0,ah(e,t,null,n),e.child=null):a=!i,(t.mode&Fu)!==_a&&(a?t.effectTag|=Ta:t.stateNode=null);var o=r.children,s=void 0;return s="function"==typeof o?o(a):a?r.fallback:o,t.memoizedProps=r,t.memoizedState=a,ah(e,t,s,n),t.child}return null}(e,t,n);case J:return function(e,t,n){np(t,t.stateNode.containerInfo);var r=t.pendingProps;return null===e?(t.child=zp(t,null,r,n),vh(t,r)):(ah(e,t,r,n),vh(t,r)),t.child}(e,t,n);case ae:return oh(e,t,t.type,t.pendingProps,n);case oe:var d=Mr(t.type),p=t.pendingProps,h=oh(e,t,d,hh(d,p),n);return t.memoizedProps=p,h;case te:return function(e,t,n){var r=t.pendingProps;return ah(e,t,r,n),vh(t,r),t.child}(e,t,n);case ne:return function(e,t,n){var r=t.pendingProps.children;return ah(e,t,r,n),vh(t,r),t.child}(e,t,n);case se:return function(e,t,n){Ni&&(t.effectTag|=Ta);var r=t.pendingProps;return ah(e,t,r.children,n),vh(t,r),t.child}(e,t,n);case ie:return mh(e,t,n);case re:return function(e,t,n){var r=t.type,i=t.pendingProps,a=i.children;"function"!=typeof a&&D(!1,"A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),$d(t);var o,s=Yd(r,i.unstable_observedBits);return th.current=t,zr("render"),o=a(s),zr(null),t.effectTag|=Ea,ah(e,t,o,n),t.memoizedProps=i,t.child}(e,t,n);default:l(!1,"Unknown unit of work tag. This error is likely caused by a bug in React. Please file an issue.")}}function bh(e){e.effectTag|=Ta}function wh(e){e.effectTag|=Da}function _h(e,t){for(var n,r,i=t.child;null!==i;){if(i.tag===Z||i.tag===ee)n=e,r=i.stateNode,n.appendChild(r);else if(i.tag===J);else if(null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)return;for(;null===i.sibling;){if(null===i.return||i.return===t)return;i=i.return}i.sibling.return=i.return,i=i.sibling}}nh={},rh={},ih={};var Eh=void 0,Sh=void 0,Th=void 0;if(cc)Eh=function(e){},Sh=function(e,t,n,r,i){var a=e.memoizedProps;if(a!==r){var o=nc(t.stateNode,n,a,r,i,ip());t.updateQueue=o,o&&bh(t)}},Th=function(e,t,n,r){n!==r&&bh(t)};else if(zl){Eh=function(e){var t=e.stateNode;if(null===e.firstEffect);else{var n=t.containerInfo,r=ql(n);!function(e,t){for(var n=t.child;null!==n;){if(n.tag===Z||n.tag===ee)Hl(e,n.stateNode);else if(n.tag===J);else if(null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)return;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}(r,e),t.pendingChildren=r,bh(e),Kl(n,r)}},Sh=function(e,t,n,r,i){var a=e.stateNode,o=e.memoizedProps,s=null===t.firstEffect;if(s&&o===r)t.stateNode=a;else{var l=t.stateNode,c=ip(),u=null;if(o!==r&&(u=nc(l,n,o,r,i,c)),s&&null===u)t.stateNode=a;else{var d=Vl(a,u,n,o,r,t,s,l);tc(d,n,r,i)&&bh(t),t.stateNode=d,s?bh(t):_h(d,t)}}},Th=function(e,t,n,r){if(n!==r){var i=tp(),a=ip();t.stateNode=ic(r,i,a,t),bh(t)}}}else Eh=function(e){},Sh=function(e,t,n,r,i){},Th=function(e,t,n,r){};function kh(e,t,n){var r=t.pendingProps;switch(t.tag){case K:case G:break;case $:uu(t.type)&&du(t);break;case Y:uu(Mr(t.type))&&du(t);break;case X:rp(t),pu(t);var i=t.stateNode;i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),null!==e&&null!==e.child||(Zp(t),t.effectTag&=~Sa),Eh(t);break;case Z:op(t);var a=tp(),o=t.type;if(null!==e&&null!=t.stateNode)Sh(e,t,o,r,a),e.ref!==t.ref&&wh(t);else{if(!r){null===t.stateNode&&l(!1,"We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");break}var s=ip();if(Zp(t))(function(e,t,n){mc||l(!1,"Expected prepareToHydrateHostInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");var r=yc(e.stateNode,e.type,e.memoizedProps,t,n,e);return e.updateQueue=r,null!==r})(t,a,s)&&bh(t);else{var c=ec(o,r,a,s,t);_h(c,t),tc(c,o,r,a)&&bh(t),t.stateNode=c}null!==t.ref&&wh(t)}break;case ee:var u=r;if(e&&null!=t.stateNode){var d=e.memoizedProps;Th(e,t,d,u)}else{"string"!=typeof u&&null===t.stateNode&&l(!1,"We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");var p=tp(),h=ip();Zp(t)?Xp(t)&&bh(t):t.stateNode=ic(u,p,h,t)}break;case ae:case oe:case le:case te:case ne:case se:break;case J:rp(t),Eh(t);break;case ie:Gd(t);break;case re:break;case Q:l(!1,"An indeterminate component should have become determinate before completing. This error is likely caused by a bug in React. Please file an issue.");default:l(!1,"Unknown unit of work tag. This error is likely caused by a bug in React. Please file an issue.")}return null}var Ch={},xh=null;function Ph(e,t){var n=t.source,r=t.stack;null===r&&null!==n&&(r=Rr(n));var i={componentName:null!==n?Ar(n.type):null,componentStack:null!==r?r:"",error:t.value,errorBoundary:null,errorBoundaryName:null,errorBoundaryFound:!1,willRetry:!1};null!==e&&e.tag===$&&(i.errorBoundary=e.stateNode,i.errorBoundaryName=Ar(e.type),i.errorBoundaryFound=!0,i.willRetry=!0);try{!function(e){var t=e.error,n=e.componentName,r=e.componentStack,i=e.errorBoundaryName,a=e.errorBoundaryFound,o=e.willRetry;if(null!=t&&t._suppressLogging){if(a&&o)return;console.error(t)}var s=(n?"The above error occurred in the <"+n+"> component:":"The above error occurred in one of your React components:")+r+"\n\n"+(a&&i?o?"React will try to recreate this component tree from scratch using the error boundary you provided, "+i+".":"This error was initially handled by the error boundary "+i+".\nRecreating the tree from scratch failed so React will unmount the tree.":"Consider adding an error boundary to your tree to customize error handling behavior.\nVisit https://fb.me/react-error-boundaries to learn more about error boundaries.");console.error(s)}(i)}catch(e){setTimeout(function(){throw e})}}xh=new Set;var Nh=function(e,t){Kc(e,"componentWillUnmount"),t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount(),Gc()};function Dh(e){var t=e.ref;null!==t&&("function"==typeof t?(v(null,t,null,null),y()&&Af(e,b())):t.current=null)}function Mh(e,t){switch(t.tag){case $:case Y:if(t.effectTag&Ma&&null!==e){var n=e.memoizedProps,r=e.memoizedState;Kc(t,"getSnapshotBeforeUpdate");var i=t.stateNode;i.props=t.memoizedProps,i.state=t.memoizedState;var a=i.getSnapshotBeforeUpdate(n,r),o=xh;void 0!==a||o.has(t.type)||(o.add(t.type),D(!1,"%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",Ar(t.type))),i.__reactInternalSnapshotBeforeUpdate=a,Gc()}return;case X:case Z:case ee:case J:return;default:l(!1,"This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}}function Ah(e,t,n,r){switch(n.tag){case $:case Y:var i=n.stateNode;if(n.effectTag&Ta)if(null===t)Kc(n,"componentDidMount"),i.props=n.memoizedProps,i.state=n.memoizedState,i.componentDidMount(),Gc();else{var a=t.memoizedProps,o=t.memoizedState;Kc(n,"componentDidUpdate"),i.props=n.memoizedProps,i.state=n.memoizedState,i.componentDidUpdate(a,o,i.__reactInternalSnapshotBeforeUpdate),Gc()}var s=n.updateQueue;return void(null!==s&&(i.props=n.memoizedProps,i.state=n.memoizedState,Fd(0,s,i)));case X:var c=n.updateQueue;if(null!==c){var u=null;if(null!==n.child)switch(n.child.tag){case Z:u=Jl(n.child.stateNode);break;case $:case Y:u=n.child.stateNode}Fd(0,c,u)}return;case Z:var d=n.stateNode;if(null===t&&n.effectTag&Ta)!function(e,t,n,r){Xl(t,n)&&e.focus()}(d,n.type,n.memoizedProps);return;case ee:case J:return;case se:if(Ni){var p=n.memoizedProps.onRender;Di?p(n.memoizedProps.id,null===t?"mount":"update",n.actualDuration,n.treeBaseDuration,n.actualStartTime,cp(),e.memoizedInteractions):p(n.memoizedProps.id,null===t?"mount":"update",n.actualDuration,n.treeBaseDuration,n.actualStartTime,cp())}return;case le:if(Si)if((n.mode&Fu)===_a)n.updateQueue=Ch,jf(n,Tu);else{var h=hm();n.stateNode={timedOutAt:h}}return;default:l(!1,"This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}}function Ih(e){var t=e.ref;if(null!==t){var n=e.stateNode,r=void 0;switch(e.tag){case Z:r=Jl(n);break;default:r=n}"function"==typeof t?t(r):(t.hasOwnProperty("current")||D(!1,"Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().%s",Ar(e.type),Rr(e)),t.current=r)}}function Oh(e){var t=e.ref;null!==t&&("function"==typeof t?t(null):t.current=null)}function Rh(e){switch("function"==typeof yu&&yu(e),e.tag){case $:case Y:Dh(e);var t=e.stateNode;return void("function"==typeof t.componentWillUnmount&&function(e,t){v(null,Nh,null,e,t),y()&&Af(e,b())}(e,t));case Z:return void Dh(e);case J:return void(cc?jh(e):zl&&function(e){if(!zl)return;var t=e.stateNode.containerInfo,n=ql(t);Gl(t,n)}(e))}}function Uh(e){for(var t=e;;)if(Rh(t),null===t.child||cc&&t.tag===J){if(t===e)return;for(;null===t.sibling;){if(null===t.return||t.return===e)return;t=t.return}t.sibling.return=t.return,t=t.sibling}else t.child.return=t,t=t.child}function Lh(e){return e.tag===Z||e.tag===X||e.tag===J}function Fh(e){if(cc){var t=function(e){for(var t=e.return;null!==t;){if(Lh(t))return t;t=t.return}l(!1,"Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.")}(e),n=void 0,r=void 0;switch(t.tag){case Z:n=t.stateNode,r=!1;break;case X:case J:n=t.stateNode.containerInfo,r=!0;break;default:l(!1,"Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}t.effectTag&xa&&(uc(n),t.effectTag&=~xa);for(var i,a,o,s=function(e){var t=e;e:for(;;){for(;null===t.sibling;){if(null===t.return||Lh(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==Z&&t.tag!==ee;){if(t.effectTag&Sa)continue e;if(null===t.child||t.tag===J)continue e;t.child.return=t,t=t.child}if(!(t.effectTag&Sa))return t.stateNode}}(e),c=e;;){if(c.tag===Z||c.tag===ee)s?r?(i=n,a=c.stateNode,o=s,i.nodeType===nr?i.parentNode.insertBefore(a,o):i.insertBefore(a,o)):hc(n,c.stateNode,s):r?pc(n,c.stateNode):dc(n,c.stateNode);else if(c.tag===J);else if(null!==c.child){c.child.return=c,c=c.child;continue}if(c===e)return;for(;null===c.sibling;){if(null===c.return||c.return===e)return;c=c.return}c.sibling.return=c.return,c=c.sibling}}}function jh(e){for(var t,n,r=e,i=!1,a=void 0,o=void 0;;){if(!i){var s=r.return;e:for(;;){switch(null===s&&l(!1,"Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue."),s.tag){case Z:a=s.stateNode,o=!1;break e;case X:case J:a=s.stateNode.containerInfo,o=!0;break e}s=s.return}i=!0}if(r.tag===Z||r.tag===ee)Uh(r),o?(t=a,n=r.stateNode,t.nodeType===nr?t.parentNode.removeChild(n):t.removeChild(n)):fc(a,r.stateNode);else if(r.tag===J){if(a=r.stateNode.containerInfo,o=!0,null!==r.child){r.child.return=r,r=r.child;continue}}else if(Rh(r),null!==r.child){r.child.return=r,r=r.child;continue}if(r===e)return;for(;null===r.sibling;){if(null===r.return||r.return===e)return;(r=r.return).tag===J&&(i=!1)}r.sibling.return=r.return,r=r.sibling}}function Wh(e){cc?jh(e):Uh(e),function(e){e.return=null,e.child=null,e.alternate&&(e.alternate.child=null,e.alternate.return=null)}(e)}function Bh(e,t){if(cc)switch(t.tag){case $:case Y:return;case Z:var n=t.stateNode;if(null!=n){var r=t.memoizedProps,i=null!==e?e.memoizedProps:r,a=t.type,o=t.updateQueue;t.updateQueue=null,null!==o&&function(e,t,n,r,i,a){ve(e,i),xl(e,t,n,r,i)}(n,o,a,i,r)}return;case ee:null===t.stateNode&&l(!1,"This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");var s=t.stateNode,c=t.memoizedProps;null!==e&&e.memoizedProps;return void function(e,t,n){e.nodeValue=n}(s,0,c);case X:case se:case le:return;default:l(!1,"This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}else!function(e){if(zl)switch(e.tag){case $:case Y:case Z:case ee:return;case X:case J:var t=e.stateNode,n=t.containerInfo,r=t.pendingChildren;return void Gl(n,r);default:l(!1,"This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}}(t)}function zh(e){cc&&uc(e.stateNode)}function Vh(){return null}function qh(e,t,n){var r=Nd(n);r.tag=Ed,r.payload={element:null};var i=t.value;return r.callback=function(){Sm(i),Ph(e,t)},r}function Hh(e,t,n){var r=Nd(n);r.tag=Ed;var i=e.type.getDerivedStateFromCatch;if(Ei&&"function"==typeof i){var a=t.value;r.payload=function(){return i(a)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(r.callback=function(){var n;Ei&&"function"===i||(n=this,null===hf?hf=new Set([n]):hf.add(n));var r=t.value,a=t.stack;Ph(e,t),this.componentDidCatch(r,{componentStack:null!==a?a:""})}),r}function Kh(e,t,n,r,i){if(n.effectTag|=Oa,n.firstEffect=n.lastEffect=null,Si&&null!==r&&"object"==typeof r&&"function"==typeof r.then){var a=r,o=t,s=-1,l=-1;do{if(o.tag===le){var c=o.alternate;if(null!==c&&!0===c.memoizedState&&null!==c.stateNode){l=Nu(c.stateNode.timedOutAt);break}var u=o.pendingProps.delayMs;"number"==typeof u&&(u<=0?s=0:(-1===s||u<s)&&(s=u))}o=o.return}while(null!==o);o=t;do{if(o.tag===le)if(!o.memoizedState){var d=(o.mode&Lu)===_a?Tu:i,p=Uf.bind(null,e,o,d);if(a.then(p,p),(o.mode&Fu)===_a){o.effectTag|=Ta;return ah(n.alternate,n,null,i),n.effectTag&=~Oa,n.tag===Q&&(n.tag=K),void(n.tag!==$&&n.tag!==Y||(n.effectTag&=~Aa,null===n.alternate&&(n.tag=K,n.type=Vh)))}var h=void 0;if(-1===s)h=Eu;else{if(-1===l)l=Nu(gd(e,i))-Mu;h=l+s}return Rf(e,h,i),o.effectTag|=Ra,void(o.expirationTime=i)}o=o.return}while(null!==o);r=new Error("An update was suspended, but no placeholder UI was provided.")}uf=!0,r=Wd(r,n);var f=t;do{switch(f.tag){case X:var m=r;return f.effectTag|=Ra,f.expirationTime=i,void Ad(f,qh(f,m,i));case $:case Y:var g=r,v=f.type,y=f.stateNode;if((f.effectTag&Na)===_a&&("function"==typeof v.getDerivedStateFromCatch&&Ei||null!==y&&"function"==typeof y.componentDidCatch&&!kf(y)))return f.effectTag|=Ra,f.expirationTime=i,void Ad(f,Hh(f,g,i))}f=f.return}while(null!==f)}function Gh(e,t){switch(e.tag){case $:uu(e.type)&&du(e);var n=e.effectTag;return n&Ra?(e.effectTag=n&~Ra|Na,e):null;case Y:uu(e.type._reactResult)&&du(e);var r=e.effectTag;return r&Ra?(e.effectTag=r&~Ra|Na,e):null;case X:rp(e),pu(e);var i=e.effectTag;return(i&Na)!==_a&&l(!1,"The root failed to unmount after an error. This is likely a bug in React. Please file an issue."),e.effectTag=i&~Ra|Na,e;case Z:return op(e),null;case le:var a=e.effectTag;return a&Ra?(e.effectTag=a&~Ra|Na,e):null;case J:return rp(e),null;case ie:return Gd(e),null;default:return null}}function $h(e){switch(e.tag){case $:var t=e.type.childContextTypes;null!==t&&void 0!==t&&du(e);break;case Y:var n=e.type._reactResult.childContextTypes;null!==n&&void 0!==n&&du(e);break;case X:rp(e),pu(e);break;case Z:op(e);break;case J:rp(e);break;case ie:Gd(e)}}var Yh={readContext:Yd},Qh=dr.ReactCurrentOwner,Xh=void 0,Jh=void 0,Zh=void 0,ef=void 0;Di&&(null==o.__interactionsRef||null==o.__interactionsRef.current)&&l(!1,"It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `schedule/tracing` module with `schedule/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at http://fb.me/react-profiling"),Xh=!1,Jh=!1;var tf={};Zh=function(e){var t=Ar(e.type)||"ReactClass";tf[t]||(D(!1,"Can't call setState (or forceUpdate) on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.%s",Rr(e)),tf[t]=!0)},ef=function(e){switch(Lr){case"getChildContext":if(Jh)return;D(!1,"setState(...): Cannot call setState() inside getChildContext()"),Jh=!0;break;case"render":if(Xh)return;D(!1,"Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),Xh=!0}};var nf=0,rf=Su,af=!1,of=null,sf=null,lf=Su,cf=-1,uf=!1,df=null,pf=!1,hf=null,ff=null,mf=!1,gf=void 0,vf=void 0,yf=void 0,bf=void 0,wf=void 0;function _f(){if(null!==of)for(var e=of.return;null!==e;)$h(e),e=e.return;td.discardPendingWarnings(),-1!==Xc&&D(!1,"Expected an empty stack. Something was not reset properly."),sf=null,lf=Su,cf=-1,uf=!1,of=null}function Ef(){for(;null!==df;){Br(df),Vc();var e=df.effectTag;if(e&xa&&zh(df),e&Da){var t=df.alternate;null!==t&&Oh(t)}switch(e&(Sa|Ta|Ca)){case Sa:Fh(df),df.effectTag&=~Sa;break;case ka:Fh(df),df.effectTag&=~Sa,Bh(df.alternate,df);break;case Ta:Bh(df.alternate,df);break;case Ca:Wh(df)}df=df.nextEffect}Wr()}function Sf(){for(;null!==df;){if(Br(df),df.effectTag&Ma)Vc(),Mh(df.alternate,df);df=df.nextEffect}Wr()}function Tf(e,t){for(td.flushPendingUnsafeLifecycleWarnings(),xi&&td.flushPendingDeprecationWarnings(),Pi&&td.flushLegacyContextWarning();null!==df;){var n=df.effectTag;if(n&(Ta|Pa))Vc(),Ah(e,df.alternate,df);n&Da&&(Vc(),Ih(df));var r=df.nextEffect;df.nextEffect=null,df=r}}function kf(e){return null!==hf&&hf.has(e)}function Cf(e,t){af=!0,pf=!0,function(){if(_i){if(!bc)return;Sc=!0,Tc=!1,Nc.clear(),Mc("(Committing Changes)")}}(),e.current===t&&l(!1,"Cannot commit the same tree as before. This is probably a bug related to the return field. This error is likely caused by a bug in React. Please file an issue.");var n=e.pendingCommitExpirationTime;n===Su&&l(!1,"Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue."),e.pendingCommitExpirationTime=Su;var r=t.expirationTime,i=t.childExpirationTime;!function(e,t){if(e.didError=!1,t===Su)return e.earliestPendingTime=Su,e.latestPendingTime=Su,e.earliestSuspendedTime=Su,e.latestSuspendedTime=Su,e.latestPingedTime=Su,void yd(Su,e);var n=e.latestPendingTime;n!==Su&&(n<t?e.earliestPendingTime=e.latestPendingTime=Su:e.earliestPendingTime<t&&(e.earliestPendingTime=e.latestPendingTime));var r=e.earliestSuspendedTime;r===Su?(fd(e,t),yd(Su,e)):t>e.latestSuspendedTime?(e.earliestSuspendedTime=Su,e.latestSuspendedTime=Su,e.latestPingedTime=Su,fd(e,t),yd(Su,e)):t<r?(fd(e,t),yd(Su,e)):yd(Su,e)}(e,r===Su||i!==Su&&i<r?i:r);var s=null,c=Di?[]:null;Di&&(s=o.__interactionsRef.current,o.__interactionsRef.current=e.memoizedInteractions,e.pendingInteractionMap.forEach(function(t,r){r<=n&&(c.push.apply(c,Array.from(t)),e.pendingInteractionMap.delete(r))})),Qh.current=null;var u=void 0;for(t.effectTag>Ea?null!==t.lastEffect?(t.lastEffect.nextEffect=t,u=t.firstEffect):u=t:u=t.firstEffect,Zl(e.containerInfo),df=u,function(){if(_i){if(!bc)return;xc=0,Mc("(Committing Snapshot Effects)")}}();null!==df;){var d=!1,p=void 0;v(null,Sf,null),y()&&(d=!0,p=b()),d&&(null===df&&l(!1,"Should have next effect. This error is likely caused by a bug in React. Please file an issue."),Af(df,p),null!==df&&(df=df.nextEffect))}for(!function(){if(_i){if(!bc)return;var e=xc;xc=0,Ac("(Committing Snapshot Effects: "+e+" Total)","(Committing Snapshot Effects)",null)}}(),Ni&&Ni&&(sp=a.unstable_now()),df=u,function(){if(_i){if(!bc)return;xc=0,Mc("(Committing Host Effects)")}}();null!==df;){var h=!1,f=void 0;v(null,Ef,null),y()&&(h=!0,f=b()),h&&(null===df&&l(!1,"Should have next effect. This error is likely caused by a bug in React. Please file an issue."),Af(df,f),null!==df&&(df=df.nextEffect))}for(!function(){if(_i){if(!bc)return;var e=xc;xc=0,Ac("(Committing Host Effects: "+e+" Total)","(Committing Host Effects)",null)}}(),e.containerInfo,Oo(Ql),Ql=null,mo(Yl),Yl=null,e.current=t,df=u,function(){if(_i){if(!bc)return;xc=0,Mc("(Calling Lifecycle Methods)")}}();null!==df;){var m=!1,g=void 0;v(null,Tf,null,e,n),y()&&(m=!0,g=b()),m&&(null===df&&l(!1,"Should have next effect. This error is likely caused by a bug in React. Please file an issue."),Af(df,g),null!==df&&(df=df.nextEffect))}pf=!1,af=!1,function(){if(_i){if(!bc)return;var e=xc;xc=0,Ac("(Calling Lifecycle Methods: "+e+" Total)","(Calling Lifecycle Methods)",null)}}(),function(){if(_i){if(!bc)return;var e=null;Tc?e="Lifecycle hook scheduled a cascading update":Cc>0&&(e="Caused by a cascading update in earlier commit"),Tc=!1,Cc++,Sc=!1,Nc.clear(),Ac("(Committing Changes)","(Committing Changes)",e)}}(),function(e){"function"==typeof vu&&vu(e)}(t.stateNode),hd.debugTool&&hd.debugTool.onCommitWork(t);var w=t.expirationTime,_=t.childExpirationTime,E=w===Su||_!==Su&&_<w?_:w;if(E===Su&&(hf=null),function(e,t){e.expirationTime=t,e.finishedWork=null}(e,E),Di){o.__interactionsRef.current=s;var S=void 0;try{if(null!==(S=o.__subscriberRef.current)&&e.memoizedInteractions.size>0){var T=If(n,e.interactionThreadID);S.onWorkStopped(e.memoizedInteractions,T)}}catch(p){Qf||(Qf=!0,Xf=p)}finally{mf||c.forEach(function(e){if(e.__count--,null!==S&&0===e.__count)try{S.onInteractionScheduledWorkCompleted(e)}catch(e){Qf||(Qf=!0,Xf=e)}})}}}function xf(e,t){if(t===ku||e.childExpirationTime!==ku){var n=Su;if(Ni&&e.mode&ju){for(var r=e.actualDuration,i=e.selfBaseDuration,a=null===e.alternate||e.child!==e.alternate.child,o=e.child;null!==o;){var s=o.expirationTime,l=o.childExpirationTime;(n===Su||s!==Su&&s<n)&&(n=s),(n===Su||l!==Su&&l<n)&&(n=l),a&&(r+=o.actualDuration),i+=o.treeBaseDuration,o=o.sibling}e.actualDuration=r,e.treeBaseDuration=i}else for(var c=e.child;null!==c;){var u=c.expirationTime,d=c.childExpirationTime;(n===Su||u!==Su&&u<n)&&(n=u),(n===Su||d!==Su&&d<n)&&(n=d),c=c.sibling}e.childExpirationTime=n}}function Pf(e){for(;;){var t=e.alternate;Br(e);var n=e.return,r=e.sibling;if((e.effectTag&Oa)===_a){Ni?(e.mode&ju&&up(e),of=kh(t,e),e.mode&ju&&pp(e,!1)):of=kh(t,e);var i=of;if(qc(e),xf(e,lf),Wr(),null!==i)return qc(e),hd.debugTool&&hd.debugTool.onCompleteWork(e),i;if(null!==n&&(n.effectTag&Oa)===_a)null===n.firstEffect&&(n.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=e.firstEffect),n.lastEffect=e.lastEffect),e.effectTag>Ea&&(null!==n.lastEffect?n.lastEffect.nextEffect=e:n.firstEffect=e,n.lastEffect=e);if(hd.debugTool&&hd.debugTool.onCompleteWork(e),null!==r)return r;if(null!==n){e=n;continue}return null}e.mode&ju&&pp(e,!1);var a=Gh(e);if(e.effectTag&Na?Hc(e):qc(e),Wr(),null!==a){if(qc(e),hd.debugTool&&hd.debugTool.onCompleteWork(e),Ni&&a.mode&ju){for(var o=a.actualDuration,s=a.child;null!==s;)o+=s.actualDuration,s=s.sibling;a.actualDuration=o}return a.effectTag&=Ia,a}if(null!==n&&(n.firstEffect=n.lastEffect=null,n.effectTag|=Oa),hd.debugTool&&hd.debugTool.onCompleteWork(e),null!==r)return r;if(null===n)return null;e=n}return null}function Nf(e){var t=e.alternate;!function(e){if(_i){if(!bc||Fc(e))return;if(wc=e,!Rc(e,null))return;e._debugIsCurrentlyTiming=!0}}(e),Br(e),Ci&&(gf=Ju(gf,e));var n=void 0;return Ni?(e.mode&ju&&up(e),n=yh(t,e,lf),e.mode&ju&&pp(e,!0)):n=yh(t,e,lf),Wr(),yf&&wf(),hd.debugTool&&hd.debugTool.onBeginWork(e),null===n&&(n=Pf(e)),Qh.current=null,n}function Df(e){if(e)for(;null!==of&&!Em();)of=Nf(of);else for(;null!==of;)of=Nf(of)}function Mf(e,t,n){af&&l(!1,"renderRoot was called recursively. This error is likely caused by a bug in React. Please file an issue."),af=!0,Qh.currentDispatcher=Yh;var r=e.nextExpirationTimeToWorkOn,i=null;if(Di&&(i=o.__interactionsRef.current,o.__interactionsRef.current=e.memoizedInteractions),(r!==lf||e!==sf||null===of)&&(_f(),lf=r,of=Gu((sf=e).current,null,lf),e.pendingCommitExpirationTime=Su,Di)){var a=new Set;if(e.pendingInteractionMap.forEach(function(e,t){t<=r&&e.forEach(function(e){return a.add(e)})}),e.memoizedInteractions=a,a.size>0){var s=o.__subscriberRef.current;if(null!==s){var c=If(r,e.interactionThreadID);try{s.onWorkStarted(a,c)}catch(e){Qf||(Qf=!0,Xf=e)}}}}var u=!1;for(!function(e){if(_i){if(wc=e,!bc)return;Cc=0,Mc("(React Tree Reconciliation)"),zc()}}(of);;){try{Df(t)}catch(n){if(null===of)u=!0,Sm(n);else{Cd(),Ci&&vf(of,n,t),null===of&&l(!1,"Failed to replay rendering after an error. This is likely caused by a bug in React. Please file an issue with a reproducing case to help us find it.");var d=of,p=d.return;if(null!==p){Kh(e,p,d,n,lf),of=Pf(d);continue}u=!0,Sm(n)}}break}if(Di&&(o.__interactionsRef.current=i),af=!1,Qh.currentDispatcher=null,Vd=null,qd=null,Hd=null,u){return $c(ff,!1),ff=null,Xc=-1,Yc.length=0,Qc.length=0,sf=null,void function(e){e.finishedWork=null}(e)}if(null!==of){return $c(ff,!1),ff=null,void function(e){e.finishedWork=null}(e)}$c(ff,!0);var h=e.current.alternate;if(null===h&&l(!1,"Finished root should have a work-in-progress. This error is likely caused by a bug in React. Please file an issue."),sf=null,ff=null,uf){if(function(e,t){var n=e.latestPendingTime,r=e.latestSuspendedTime,i=e.latestPingedTime;return n!==Su&&n>t||r!==Su&&r>t||i!==Su&&i>t}(e,r))return md(e,r),void pm(e,h,r,e.expirationTime,-1);if(!e.didError&&!n){e.didError=!0;var f=e.nextExpirationTimeToWorkOn=r,m=e.expirationTime=Tu;return void pm(e,h,f,m,-1)}}if(Si&&!n&&-1!==cf){var g=r;md(e,g);var v=Nu(gd(e,r));v<cf&&(cf=v);var y=Nu(hm()),b=cf-y;return b=b<0?0:b,void pm(e,h,g,e.expirationTime,b)}!function(e,t,n){e.pendingCommitExpirationTime=n,e.finishedWork=t}(e,h,r)}function Af(e,t){return function(e,t,n){af&&!pf&&l(!1,"dispatch: Cannot dispatch during the render phase.");for(var r=e.return;null!==r;){switch(r.tag){case $:case Y:var i=r.type,a=r.stateNode;if("function"==typeof i.getDerivedStateFromCatch||"function"==typeof a.componentDidCatch&&!kf(a))return Md(r,Hh(r,Wd(t,e),n)),void jf(r,n);break;case X:return Md(r,qh(r,Wd(t,e),n)),void jf(r,n)}r=r.return}if(e.tag===X){var o=e;Md(o,qh(o,Wd(t,o),n)),jf(o,n)}}(e,t,Tu)}function If(e,t){return 1e3*e+t}function Of(e,t){var n=void 0;return rf!==Su?n=rf:af?n=pf?Tu:lf:t.mode&Lu?(n=tm?function(e){return Du(e,Ou,Ru)}(e):Iu(e),null!==sf&&n===lf&&(n+=1)):n=Tu,tm&&($f===Su||n>$f)&&($f=n),n}function Rf(e,t,n){t>=0&&cf<t&&(cf=t)}function Uf(e,t,n){if(Si){var r=void 0;if(function(e,t){var n=e.earliestSuspendedTime,r=e.latestSuspendedTime;return n!==Su&&t>=n&&t<=r}(e,n))!function(e,t){e.didError=!1;var n=e.latestPingedTime;(n===Su||n<t)&&(e.latestPingedTime=t),yd(t,e)}(e,r=n);else fd(e,r=Of(hm(),t));Lf(t,r);var i=e.expirationTime;if(i!==Su)if(Di){var a=o.__interactionsRef.current;o.__interactionsRef.current=e.memoizedInteractions,Ff(e,i,!1),fm(e,i),o.__interactionsRef.current=a}else fm(e,i)}}function Lf(e,t){(e.expirationTime===Su||e.expirationTime>t)&&(e.expirationTime=t);var n=e.alternate;null!==n&&(n.expirationTime===Su||n.expirationTime>t)&&(n.expirationTime=t);var r=e.return;if(null===r&&e.tag===X)return e.stateNode;for(;null!==r;){if(n=r.alternate,r.childExpirationTime===Su||r.childExpirationTime>t?(r.childExpirationTime=t,null!==n&&(n.childExpirationTime===Su||n.childExpirationTime>t)&&(n.childExpirationTime=t)):null!==n&&(n.childExpirationTime===Su||n.childExpirationTime>t)&&(n.childExpirationTime=t),null===r.return&&r.tag===X)return r.stateNode;r=r.return}return null}function Ff(e,t,n){if(Di){var r=o.__interactionsRef.current;if(r.size>0){var i=e.pendingInteractionMap.get(t);null!=i?r.forEach(function(e){n&&!i.has(e)&&e.__count++,i.add(e)}):(e.pendingInteractionMap.set(t,new Set(r)),n&&r.forEach(function(e){e.__count++}));var a=o.__subscriberRef.current;if(null!==a){var s=If(t,e.interactionThreadID);a.onWorkScheduled(r,s)}}}}function jf(e,t){if(_i&&(Sc&&(Tc=!0),null!==_c&&"componentWillMount"!==_c&&"componentWillReceiveProps"!==_c&&(kc=!0)),e.tag===$||e.tag===Y){var n=e.stateNode;ef(n)}var r=Lf(e,t);if(null!==r){if(Di&&Ff(r,t,!0),!af&&lf!==Su&&t<lf&&(ff=e,_f()),fd(r,t),!af||pf||sf!==r)fm(r,r.expirationTime);sm>om&&(sm=0,l(!1,"Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops."))}else e.tag!==$&&e.tag!==Y||Zh(e)}function Wf(e,t,n,r,i){var a=rf;rf=Tu;try{return e(t,n,r,i)}finally{rf=a}}Ci&&(gf=null,yf=!1,bf=null,vf=function(e,t,n){if(null===t||"object"!=typeof t||"function"!=typeof t.then)if(null!==gf){switch(Ju(e,gf),e.tag){case X:rp(e),pu(e);break;case Z:op(e);break;case $:uu(e.type)&&du(e);break;case Y:uu(Mr(e.type))&&du(e);break;case J:rp(e);break;case ie:Gd(e)}if(yf=!0,bf=t,v(null,Df,null,n),yf=!1,bf=null,y()){var r=b();if(null!=r&&null!=t)try{r._suppressLogging&&(t._suppressLogging=!0)}catch(e){}}else of=e}else D(!1,"Could not replay rendering after an error. This is likely a bug in React. Please file an issue.")},wf=function(){throw bf});var Bf=null,zf=null,Vf=Su,qf=void 0,Hf=!1,Kf=null,Gf=Su,$f=Su,Yf=!1,Qf=!1,Xf=null,Jf=null,Zf=!1,em=!1,tm=!1,nm=null,rm=a.unstable_now(),im=Pu(rm),am=im,om=50,sm=0,lm=null,cm=1;function um(){var e=a.unstable_now()-rm;im=Pu(e)}function dm(e,t){if(Vf!==Su){if(t>Vf)return;null!==qf&&a.unstable_cancelScheduledWork(qf)}else _i&&bc&&!Pc&&(Pc=!0,Mc("(Waiting for async callback...)"));Vf=t;var n=a.unstable_now()-rm,r=Nu(t)-n;qf=a.unstable_scheduleWork(gm,{timeout:r})}function pm(e,t,n,r,i){e.expirationTime=r,Si&&0===i&&!Em()?(e.pendingCommitExpirationTime=n,e.finishedWork=t):i>0&&(e.timeoutHandle=oc(function(e,t,n){Si&&(e.pendingCommitExpirationTime=n,e.finishedWork=t,um(),am=im,Di?(mf=!0,bm(e,n),mf=!1):bm(e,n))}.bind(null,e,t,n),i))}function hm(){return Hf?am:(mm(),Gf===Su||Gf===ku?(um(),am=im):am)}function fm(e,t){!function(e,t){if(null===e.nextScheduledRoot)e.expirationTime=t,null===zf?(Bf=zf=e,e.nextScheduledRoot=e):(zf.nextScheduledRoot=e,(zf=e).nextScheduledRoot=Bf);else{var n=e.expirationTime;(n===Su||t<n)&&(e.expirationTime=t)}}(e,t),Hf||(Zf?em&&(Kf=e,Gf=Tu,wm(e,Tu,!0)):t===Tu?vm():dm(0,t))}function mm(){var e=Su,t=null;if(null!==zf)for(var n=zf,r=Bf;null!==r;){var i=r.expirationTime;if(i===Su){if((null===n||null===zf)&&l(!1,"Should have a previous and last root. This error is likely caused by a bug in React. Please file an issue."),r===r.nextScheduledRoot){r.nextScheduledRoot=null,Bf=zf=null;break}if(r===Bf){var a=r.nextScheduledRoot;Bf=a,zf.nextScheduledRoot=a,r.nextScheduledRoot=null}else{if(r===zf){(zf=n).nextScheduledRoot=Bf,r.nextScheduledRoot=null;break}n.nextScheduledRoot=r.nextScheduledRoot,r.nextScheduledRoot=null}r=n.nextScheduledRoot}else{if((e===Su||i<e)&&(e=i,t=r),r===zf)break;if(e===Tu)break;n=r,r=r.nextScheduledRoot}}Kf=t,Gf=e}function gm(e){if(e.didTimeout&&null!==Bf){um();var t=Bf;do{vd(t,im),t=t.nextScheduledRoot}while(t!==Bf)}ym(Su,e)}function vm(){ym(Tu,null)}function ym(e,t){if(Jf=t,mm(),null!==Jf){if(um(),am=im,_i)!function(e,t){_i&&bc&&(Pc=!1,Ac("(Waiting for async callback... will force flush in "+t+" ms)","(Waiting for async callback...)",e?"React was blocked by main thread":null))}(Gf<im,Nu(Gf));for(;null!==Kf&&Gf!==Su&&(e===Su||e>=Gf)&&(!Yf||im>=Gf);)wm(Kf,Gf,im>=Gf),mm(),um(),am=im}else for(;null!==Kf&&Gf!==Su&&(e===Su||e>=Gf);)wm(Kf,Gf,!0),mm();null!==Jf&&(Vf=Su,qf=null),Gf!==Su&&dm(0,Gf),Jf=null,Yf=!1,function(){if(sm=0,lm=null,null!==nm){var e=nm;nm=null;for(var t=0;t<e.length;t++){var n=e[t];try{n._onComplete()}catch(r){Qf||(Qf=!0,Xf=r)}}}if(Qf){var r=Xf;throw Xf=null,Qf=!1,r}}()}function bm(e,t){Hf&&l(!1,"work.commit(): Cannot commit while already rendering. This likely means you attempted to commit from inside a lifecycle method."),Kf=e,Gf=t,wm(e,t,!0),vm()}function wm(e,t,n){if(Hf&&l(!1,"performWorkOnRoot was called recursively. This error is likely caused by a bug in React. Please file an issue."),Hf=!0,null===Jf||n){var r=e.finishedWork;if(null!==r)_m(e,r,t);else{e.finishedWork=null;var i=e.timeoutHandle;Si&&i!==lc&&(e.timeoutHandle=lc,sc(i));Mf(e,!1,n),null!==(r=e.finishedWork)&&_m(e,r,t)}}else{var a=e.finishedWork;if(null!==a)_m(e,a,t);else{e.finishedWork=null;var o=e.timeoutHandle;Si&&o!==lc&&(e.timeoutHandle=lc,sc(o));Mf(e,!0,n),null!==(a=e.finishedWork)&&(Em()?e.finishedWork=a:_m(e,a,t))}}Hf=!1}function _m(e,t,n){var r=e.firstBatch;if(null!==r&&r._expirationTime<=n&&(null===nm?nm=[r]:nm.push(r),r._defer))return e.finishedWork=t,void(e.expirationTime=Su);e.finishedWork=null,e===lm?sm++:(lm=e,sm=0),Cf(e,t)}function Em(){return!!Yf||!(null===Jf||Jf.timeRemaining()>cm)&&(Yf=!0,!0)}function Sm(e){null===Kf&&l(!1,"Should be working on a root. This error is likely caused by a bug in React. Please file an issue."),Kf.expirationTime=Su,Qf||(Qf=!0,Xf=e)}function Tm(e,t){var n=Zf;Zf=!0;try{return e(t)}finally{(Zf=n)||Hf||vm()}}function km(e,t){if(Zf&&!em){em=!0;try{return e(t)}finally{em=!1}}return e(t)}function Cm(e,t,n){if(tm)return e(t,n);Zf||Hf||$f===Su||(ym($f,null),$f=Su);var r=tm,i=Zf;tm=!0,Zf=!0;try{return e(t,n)}finally{tm=r,(Zf=i)||Hf||vm()}}var xm=void 0;function Pm(e){if(!e)return nu;var t=wa(e),n=function(e){(!Ba(e)||e.tag!==$&&e.tag!==Y)&&l(!1,"Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.");var t=e;do{switch(t.tag){case X:return t.stateNode.context;case $:if(uu(t.type))return t.stateNode.__reactInternalMemoizedMergedChildContext;break;case Y:if(uu(Mr(t.type)))return t.stateNode.__reactInternalMemoizedMergedChildContext}t=t.return}while(null!==t);l(!1,"Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.")}(t);if(t.tag===$){var r=t.type;if(uu(r))return fu(t,r,n)}else if(t.tag===Y){var i=Mr(t.type);if(uu(i))return fu(t,i,n)}return n}function Nm(e,t,n,r,i){var a=t.current;hd.debugTool&&(null===a.alternate?hd.debugTool.onMountContainer(t):null===e?hd.debugTool.onUnmountContainer(t):hd.debugTool.onUpdateContainer(t));var o=Pm(n);return null===t.context?t.context=o:t.pendingContext=o,function(e,t,n,r){"render"!==Lr||null===Ur||xm||(xm=!0,D(!1,"Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.\n\nCheck the render method of %s.",Ar(Ur.type)||"Unknown"));var i=Nd(n);return i.payload={element:t},null!==(r=void 0===r?null:r)&&("function"!=typeof r&&D(!1,"render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",r),i.callback=r),Md(e,i),jf(e,n),n}(a,e,r,i)}function Dm(e,t,n,r){var i=t.current;return Nm(e,t,n,Of(hm(),i),r)}function Mm(e){var t=e.current;if(!t.child)return null;switch(t.child.tag){case Z:return Jl(t.child.stateNode);default:return t.child.stateNode}}function Am(e){var t=function(e){var t=Va(e);if(!t)return null;for(var n=t;;){if(n.tag===Z||n.tag===ee)return n;if(n.child&&n.tag!==J)n.child.return=n,n=n.child;else{if(n===t)return null;for(;!n.sibling;){if(!n.return||n.return===t)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}}return null}(e);return null===t?null:t.stateNode}xm=!1;var Im,Om=dr.ReactCurrentOwner,Rm=void 0,Um=!1;function Lm(e){var t,n=((t=Iu(hm()))<=nf&&(t=nf+1),nf=t);this._expirationTime=n,this._root=e,this._next=null,this._callbacks=null,this._didComplete=!1,this._hasChildren=!1,this._children=null,this._defer=!0}function Fm(){this._callbacks=null,this._didCommit=!1,this._onCommit=this._onCommit.bind(this)}function jm(e,t,n){var r=function(e,t,n){return Zu(e,t,n)}(e,t,n);this._internalRoot=r}function Wm(e){return!(!e||e.nodeType!==er&&e.nodeType!==rr&&e.nodeType!==ir&&(e.nodeType!==nr||" react-mount-point-unstable "!==e.nodeValue))}function Bm(e){return e?e.nodeType===rr?e.documentElement:e.firstChild:null}"function"==typeof Map&&null!=Map.prototype&&"function"==typeof Map.prototype.forEach&&"function"==typeof Set&&null!=Set.prototype&&"function"==typeof Set.prototype.clear&&"function"==typeof Set.prototype.forEach||D(!1,"React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),Rm=function(e){if(e._reactRootContainer&&e.nodeType!==nr){var t=Am(e._reactRootContainer._internalRoot.current);t&&t.parentNode!==e&&D(!1,"render(...): It looks like the React-rendered content of this container was removed without using React. This is not supported and will cause errors. Instead, call ReactDOM.unmountComponentAtNode to empty a container.")}var n=!!e._reactRootContainer,r=Bm(e);!(!r||!fe(r))&&!n&&D(!1,"render(...): Replacing React-rendered children with a new root component. If you intended to update the children of this node, you should instead have the existing children update their state and render the new components instead of calling ReactDOM.render."),e.nodeType===er&&e.tagName&&"BODY"===e.tagName.toUpperCase()&&D(!1,"render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app.")},Im=function(e,t){null!==e&&"function"!=typeof e&&D(!1,"%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",t,e)},Bn=function(e,t,n){switch(t){case"input":return void zi(e,n);case"textarea":return void function(e,t){rs(e,t)}(e,n);case"select":return void function(e,t){var n=e,r=t.value;null!=r&&Xo(n,!!t.multiple,r,!1)}(e,n)}},Lm.prototype.render=function(e){this._defer||l(!1,"batch.render: Cannot render a batch that already committed."),this._hasChildren=!0,this._children=e;var t=this._root._internalRoot,n=this._expirationTime,r=new Fm;return Nm(e,t,null,n,r._onCommit),r},Lm.prototype.then=function(e){if(this._didComplete)e();else{var t=this._callbacks;null===t&&(t=this._callbacks=[]),t.push(e)}},Lm.prototype.commit=function(){var e=this._root._internalRoot,t=e.firstBatch;if(this._defer&&null!==t||l(!1,"batch.commit: Cannot commit a batch multiple times."),!this._hasChildren)return this._next=null,void(this._defer=!1);var n=this._expirationTime;if(t!==this){this._hasChildren&&(n=this._expirationTime=t._expirationTime,this.render(this._children));for(var r=null,i=t;i!==this;)r=i,i=i._next;null===r&&l(!1,"batch.commit: Cannot commit a batch multiple times."),r._next=i._next,this._next=t,t=e.firstBatch=this}this._defer=!1,bm(e,n);var a=this._next;this._next=null,null!==(t=e.firstBatch=a)&&t._hasChildren&&t.render(t._children)},Lm.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])()}}},Fm.prototype.then=function(e){if(this._didCommit)e();else{var t=this._callbacks;null===t&&(t=this._callbacks=[]),t.push(e)}},Fm.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];"function"!=typeof n&&l(!1,"Invalid argument passed as callback. Expected a function. Instead received: %s",n),n()}}},jm.prototype.render=function(e,t){var n=this._internalRoot,r=new Fm;return Im(t=void 0===t?null:t,"render"),null!==t&&r.then(t),Dm(e,n,null,r._onCommit),r},jm.prototype.unmount=function(e){var t=this._internalRoot,n=new Fm;return Im(e=void 0===e?null:e,"render"),null!==e&&n.then(e),Dm(null,t,null,n._onCommit),n},jm.prototype.legacy_renderSubtreeIntoContainer=function(e,t,n){var r=this._internalRoot,i=new Fm;return Im(n=void 0===n?null:n,"render"),null!==n&&i.then(n),Dm(t,r,e,i._onCommit),i},jm.prototype.createBatch=function(){var e=new Lm(this),t=e._expirationTime,n=this._internalRoot,r=n.firstBatch;if(null===r)n.firstBatch=e,e._next=null;else{for(var i=null,a=r;null!==a&&a._expirationTime<=t;)i=a,a=a._next;e._next=a,null!==i&&(i._next=e)}return e},Gn=Tm,$n=Cm,Yn=function(){Hf||$f===Su||(ym($f,null),$f=Su)};var zm=!1;function Vm(e,t){var n=t||function(e){var t=Bm(e);return!(!t||t.nodeType!==er||!t.hasAttribute(Jr))}(e);if(!n)for(var r=!1,i=void 0;i=e.lastChild;)!r&&i.nodeType===er&&i.hasAttribute(Jr)&&(r=!0,D(!1,"render(): Target node has markup rendered by React, but there are unrelated nodes as well. This is most commonly caused by white-space inserted around server-rendered markup.")),e.removeChild(i);!n||t||zm||(zm=!0,ed(!1,"render(): Calling ReactDOM.render() to hydrate server-rendered markup will stop working in React v17. Replace the ReactDOM.render() call with ReactDOM.hydrate() if you want React to attach to the server HTML."));return new jm(e,!1,n)}function qm(e,t,n,r,i){Wm(n)||l(!1,"Target container is not a DOM element."),Rm(n);var a=n._reactRootContainer;if(a){if("function"==typeof i){var o=i;i=function(){var e=Mm(a._internalRoot);o.call(e)}}null!=e?a.legacy_renderSubtreeIntoContainer(e,t,i):a.render(t,i)}else{if(a=n._reactRootContainer=Vm(n,r),"function"==typeof i){var s=i;i=function(){var e=Mm(a._internalRoot);s.call(e)}}km(function(){null!=e?a.legacy_renderSubtreeIntoContainer(e,t,i):a.render(t,i)})}return Mm(a._internalRoot)}function Hm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Wm(t)||l(!1,"Target container is not a DOM element."),function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:gr,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)}var Km,Gm,$m={createPortal:Hm,findDOMNode:function(e){var t=Om.current;null!==t&&null!==t.stateNode&&(t.stateNode._warnedAboutRefsInRender||D(!1,"%s is accessing findDOMNode inside its render(). render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",Ar(t.type)||"A component"),t.stateNode._warnedAboutRefsInRender=!0);return null==e?null:e.nodeType===er?e:function(e){var t=wa(e);void 0===t&&("function"==typeof e.render?l(!1,"Unable to find node on an unmounted component."):l(!1,"Argument appears to not be a ReactComponent. Keys: %s",Object.keys(e)));var n=qa(t);return null===n?null:n.stateNode}(e)},hydrate:function(e,t,n){return qm(null,e,t,!0,n)},render:function(e,t,n){return qm(null,e,t,!1,n)},unstable_renderSubtreeIntoContainer:function(e,t,n,r){return(null==e||void 0===e._reactInternalFiber)&&l(!1,"parentComponent must be a valid React Component"),qm(e,t,n,!1,r)},unmountComponentAtNode:function(e){if(Wm(e)||l(!1,"unmountComponentAtNode(...): Target container is not a DOM element."),e._reactRootContainer){var t=Bm(e);return t&&!fe(t)&&D(!1,"unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React."),km(function(){qm(null,null,e,!1,function(){e._reactRootContainer=null})}),!0}var n=Bm(e),r=!(!n||!fe(n)),i=e.nodeType===er&&Wm(e.parentNode)&&!!e.parentNode._reactRootContainer;return r&&D(!1,"unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s",i?"You may have accidentally passed in a React root node instead of its container.":"Instead, have the parent component update its state and rerender in order to remove this component."),!1},unstable_createPortal:function(){return Um||(Um=!0,ed(!1,'The ReactDOM.unstable_createPortal() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactDOM.createPortal() instead. It has the exact same API, but without the "unstable_" prefix.')),Hm.apply(void 0,arguments)},unstable_batchedUpdates:Tm,unstable_interactiveUpdates:Cm,flushSync:function(e,t){Hf&&l(!1,"flushSync was called from inside a lifecycle method. It cannot be called when React is already rendering.");var n=Zf;Zf=!0;try{return Wf(e,t)}finally{Zf=n,vm()}},unstable_flushControlled:function(e){var t=Zf;Zf=!0;try{Wf(e)}finally{(Zf=t)||Hf||vm()}},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{Events:[fe,me,ge,z.injectEventPluginsByName,C,Te,function(e){L(e,Se)},Hn,Kn,bo,q]},unstable_createRoot:function(e,t){return Wm(e)||l(!1,"unstable_createRoot(...): Target container is not a DOM element."),new jm(e,!0,null!=t&&!0===t.hydrate)}};if(!(Gm=(Km={findFiberByHostInstance:he,bundleType:1,version:"16.5.2",rendererPackageName:"react-dom"}).findFiberByHostInstance,function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled)return!0;if(!t.supportsFiber)return D(!1,"The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://fb.me/react-devtools"),!0;try{var n=t.inject(e);vu=wu(function(e){return t.onCommitFiberRoot(n,e)}),yu=wu(function(e){return t.onCommitFiberUnmount(n,e)})}catch(e){D(!1,"React DevTools encountered an error: %s.",e)}return!0}(r({},Km,{findHostInstanceByFiber:function(e){var t=qa(e);return null===t?null:t.stateNode},findFiberByHostInstance:function(e){return Gm?Gm(e):null}})))&&ke&&window.top===window.self&&(navigator.userAgent.indexOf("Chrome")>-1&&-1===navigator.userAgent.indexOf("Edge")||navigator.userAgent.indexOf("Firefox")>-1)){var Ym=window.location.protocol;/^(https?|file):$/.test(Ym)&&console.info("%cDownload the React DevTools for a better development experience: https://fb.me/react-devtools"+("file:"===Ym?"\nYou might need to use a local HTTP server (instead of file://): https://fb.me/react-devtools-faq":""),"font-weight:bold")}var Qm=Object.freeze({default:$m}),Xm=Qm&&$m||Qm,Jm=Xm.default||Xm;t.exports=Jm}()}).call(this,e("_process"))},{_process:28,"object-assign":7,"prop-types/checkPropTypes":8,react:15,schedule:20,"schedule/tracing":21}],11:[function(e,t,n){"use strict";var r=e("react"),i=e("object-assign"),a=e("schedule");function o(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);!function(e,t,n,r,i,a,o,s){if(!e){if(e=void 0,void 0===t)e=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,a,o,s],c=0;(e=Error(t.replace(/%s/g,function(){return l[c++]}))).name="Invariant Violation"}throw e.framesToPop=1,e}}(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}r||o("227");var s=!1,l=null,c=!1,u=null,d={onError:function(e){s=!0,l=e}};function p(e,t,n,r,i,a,o,c,u){s=!1,l=null,function(e,t,n,r,i,a,o,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this.onError(e)}}.apply(d,arguments)}var h=null,f={};function m(){if(h)for(var e in f){var t=f[e],n=h.indexOf(e);if(-1<n||o("96",e),!v[n])for(var r in t.extractEvents||o("97",e),v[n]=t,n=t.eventTypes){var i=void 0,a=n[r],s=t,l=r;y.hasOwnProperty(l)&&o("99",l),y[l]=a;var c=a.phasedRegistrationNames;if(c){for(i in c)c.hasOwnProperty(i)&&g(c[i],s,l);i=!0}else a.registrationName?(g(a.registrationName,s,l),i=!0):i=!1;i||o("98",r,e)}}}function g(e,t,n){b[e]&&o("100",e),b[e]=t,w[e]=t.eventTypes[n].dependencies}var v=[],y={},b={},w={},_=null,E=null,S=null;function T(e,t,n,r){t=e.type||"unknown-event",e.currentTarget=S(r),function(e,t,n,r,i,a,d,h,f){if(p.apply(this,arguments),s){if(s){var m=l;s=!1,l=null}else o("198"),m=void 0;c||(c=!0,u=m)}}(t,n,void 0,e),e.currentTarget=null}function k(e,t){return null==t&&o("30"),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 P(e,t){if(e){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var i=0;i<n.length&&!e.isPropagationStopped();i++)T(e,t,n[i],r[i]);else n&&T(e,t,n,r);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function N(e){return P(e,!0)}function D(e){return P(e,!1)}var M={injectEventPluginOrder:function(e){h&&o("101"),h=Array.prototype.slice.call(e),m()},injectEventPluginsByName:function(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var r=e[t];f.hasOwnProperty(t)&&f[t]===r||(f[t]&&o("102",t),f[t]=r,n=!0)}n&&m()}};function A(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}return e?null:(n&&"function"!=typeof n&&o("231",t,typeof n),n)}function I(e,t){if(null!==e&&(x=k(x,e)),e=x,x=null,e&&(C(e,t?N:D),x&&o("95"),c))throw t=u,c=!1,u=null,t}var O=Math.random().toString(36).slice(2),R="__reactInternalInstance$"+O,U="__reactEventHandlers$"+O;function L(e){if(e[R])return e[R];for(;!e[R];){if(!e.parentNode)return null;e=e.parentNode}return 7===(e=e[R]).tag||8===e.tag?e:null}function F(e){return!(e=e[R])||7!==e.tag&&8!==e.tag?null:e}function j(e){if(7===e.tag||8===e.tag)return e.stateNode;o("33")}function W(e){return e[U]||null}function B(e){do{e=e.return}while(e&&7!==e.tag);return e||null}function z(e,t,n){(t=A(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--;)z(n[t],"captured",e);for(t=0;t<n.length;t++)z(n[t],"bubbled",e)}}function q(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=A(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=k(n._dispatchListeners,t),n._dispatchInstances=k(n._dispatchInstances,e))}function H(e){e&&e.dispatchConfig.registrationName&&q(e._targetInst,null,e)}function K(e){C(e,V)}var G=!("undefined"==typeof window||!window.document||!window.document.createElement);function $(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Y={animationend:$("Animation","AnimationEnd"),animationiteration:$("Animation","AnimationIteration"),animationstart:$("Animation","AnimationStart"),transitionend:$("Transition","TransitionEnd")},Q={},X={};function J(e){if(Q[e])return Q[e];if(!Y[e])return e;var t,n=Y[e];for(t in n)if(n.hasOwnProperty(t)&&t in X)return Q[e]=n[t];return e}G&&(X=document.createElement("div").style,"AnimationEvent"in window||(delete Y.animationend.animation,delete Y.animationiteration.animation,delete Y.animationstart.animation),"TransitionEvent"in window||delete Y.transitionend.transition);var Z=J("animationend"),ee=J("animationiteration"),te=J("animationstart"),ne=J("transitionend"),re="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),ie=null,ae=null,oe=null;function se(){if(oe)return oe;var e,t,n=ae,r=n.length,i="value"in ie?ie.value:ie.textContent,a=i.length;for(e=0;e<r&&n[e]===i[e];e++);var o=r-e;for(t=1;t<=o&&n[r-t]===i[a-t];t++);return oe=i.slice(e,1<t?1-t:void 0)}function le(){return!0}function ce(){return!1}function ue(e,t,n,r){for(var i in this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface)e.hasOwnProperty(i)&&((t=e[i])?this[i]=t(n):"target"===i?this.target=r:this[i]=n[i]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?le:ce,this.isPropagationStopped=ce,this}function de(e,t,n,r){if(this.eventPool.length){var i=this.eventPool.pop();return this.call(i,e,t,n,r),i}return new this(e,t,n,r)}function pe(e){e instanceof this||o("279"),e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function he(e){e.eventPool=[],e.getPooled=de,e.release=pe}i(ue.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=le)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=le)},persist:function(){this.isPersistent=le},isPersistent:ce,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=ce,this._dispatchInstances=this._dispatchListeners=null}}),ue.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},ue.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var a=new t;return i(a,n.prototype),n.prototype=a,n.prototype.constructor=n,n.Interface=i({},r.Interface,e),n.extend=r.extend,he(n),n},he(ue);var fe=ue.extend({data:null}),me=ue.extend({data:null}),ge=[9,13,27,32],ve=G&&"CompositionEvent"in window,ye=null;G&&"documentMode"in document&&(ye=document.documentMode);var be=G&&"TextEvent"in window&&!ye,we=G&&(!ve||ye&&8<ye&&11>=ye),_e=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(" ")}},Se=!1;function Te(e,t){switch(e){case"keyup":return-1!==ge.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function ke(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Ce=!1;var xe={eventTypes:Ee,extractEvents:function(e,t,n,r){var i=void 0,a=void 0;if(ve)e:{switch(e){case"compositionstart":i=Ee.compositionStart;break e;case"compositionend":i=Ee.compositionEnd;break e;case"compositionupdate":i=Ee.compositionUpdate;break e}i=void 0}else Ce?Te(e,n)&&(i=Ee.compositionEnd):"keydown"===e&&229===n.keyCode&&(i=Ee.compositionStart);return i?(we&&"ko"!==n.locale&&(Ce||i!==Ee.compositionStart?i===Ee.compositionEnd&&Ce&&(a=se()):(ae="value"in(ie=r)?ie.value:ie.textContent,Ce=!0)),i=fe.getPooled(i,t,n,r),a?i.data=a:null!==(a=ke(n))&&(i.data=a),K(i),a=i):a=null,(e=be?function(e,t){switch(e){case"compositionend":return ke(t);case"keypress":return 32!==t.which?null:(Se=!0,_e);case"textInput":return(e=t.data)===_e&&Se?null:e;default:return null}}(e,n):function(e,t){if(Ce)return"compositionend"===e||!ve&&Te(e,t)?(e=se(),oe=ae=ie=null,Ce=!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 we&&"ko"!==t.locale?null:t.data;default:return null}}(e,n))?((t=me.getPooled(Ee.beforeInput,t,n,r)).data=e,K(t)):t=null,null===a?t:null===t?a:[a,t]}},Pe=null,Ne=null,De=null;function Me(e){if(e=E(e)){"function"!=typeof Pe&&o("280");var t=_(e.stateNode);Pe(e.stateNode,e.type,t)}}function Ae(e){Ne?De?De.push(e):De=[e]:Ne=e}function Ie(){if(Ne){var e=Ne,t=De;if(De=Ne=null,Me(e),t)for(e=0;e<t.length;e++)Me(t[e])}}function Oe(e,t){return e(t)}function Re(e,t,n){return e(t,n)}function Ue(){}var Le=!1;function Fe(e,t){if(Le)return e(t);Le=!0;try{return Oe(e,t)}finally{Le=!1,(null!==Ne||null!==De)&&(Ue(),Ie())}}var je={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 We(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!je[e.type]:"textarea"===t}function Be(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function ze(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 Ve(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function qe(e){e._valueTracker||(e._valueTracker=function(e){var t=Ve(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,a.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 He(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ve(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}var Ke=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ge=/^(.*)[\\\/]/,$e="function"==typeof Symbol&&Symbol.for,Ye=$e?Symbol.for("react.element"):60103,Qe=$e?Symbol.for("react.portal"):60106,Xe=$e?Symbol.for("react.fragment"):60107,Je=$e?Symbol.for("react.strict_mode"):60108,Ze=$e?Symbol.for("react.profiler"):60114,et=$e?Symbol.for("react.provider"):60109,tt=$e?Symbol.for("react.context"):60110,nt=$e?Symbol.for("react.async_mode"):60111,rt=$e?Symbol.for("react.forward_ref"):60112,it=$e?Symbol.for("react.placeholder"):60113,at="function"==typeof Symbol&&Symbol.iterator;function ot(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=at&&e[at]||e["@@iterator"])?e:null}function st(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 nt:return"AsyncMode";case Xe:return"Fragment";case Qe:return"Portal";case Ze:return"Profiler";case Je:return"StrictMode";case it:return"Placeholder"}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")}if("function"==typeof e.then&&(e=1===e._reactStatus?e._reactResult:null))return st(e)}return null}function lt(e){var t="";do{e:switch(e.tag){case 4:case 0:case 1:case 2:case 3:case 7:case 10:var n=e._debugOwner,r=e._debugSource,i=st(e.type),a=null;n&&(a=st(n.type)),n=i,i="",r?i=" (at "+r.fileName.replace(Ge,"")+":"+r.lineNumber+")":a&&(i=" (created by "+a+")"),a="\n in "+(n||"Unknown")+i;break e;default:a=""}t+=a,e=e.return}while(e);return t}var ct=/^[: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]*$/,ut=Object.prototype.hasOwnProperty,dt={},pt={};function ht(e,t,n,r,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t}var ft={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ft[e]=new ht(e,0,!1,e,null)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ft[t]=new ht(t,1,!1,e[1],null)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){ft[e]=new ht(e,2,!1,e.toLowerCase(),null)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ft[e]=new ht(e,2,!1,e,null)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ft[e]=new ht(e,3,!1,e.toLowerCase(),null)}),["checked","multiple","muted","selected"].forEach(function(e){ft[e]=new ht(e,3,!0,e,null)}),["capture","download"].forEach(function(e){ft[e]=new ht(e,4,!1,e,null)}),["cols","rows","size","span"].forEach(function(e){ft[e]=new ht(e,6,!1,e,null)}),["rowSpan","start"].forEach(function(e){ft[e]=new ht(e,5,!1,e.toLowerCase(),null)});var mt=/[\-:]([a-z])/g;function gt(e){return e[1].toUpperCase()}function vt(e,t,n,r){var i=ft.hasOwnProperty(t)?ft[t]:null;(null!==i?0===i.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||void 0===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,i,r)&&(n=null),r||null===i?function(e){return!!ut.call(pt,e)||!ut.call(dt,e)&&(ct.test(e)?pt[e]=!0:(dt[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}function yt(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function bt(e,t){var n=t.checked;return i({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function wt(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=yt(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 _t(e,t){null!=(t=t.checked)&&vt(e,"checked",t,!1)}function Et(e,t){_t(e,t);var n=yt(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")?Tt(e,t.type,n):t.hasOwnProperty("defaultValue")&&Tt(e,t.type,yt(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function St(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 Tt(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-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(mt,gt);ft[t]=new ht(t,1,!1,e,null)}),"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(mt,gt);ft[t]=new ht(t,1,!1,e,"http://www.w3.org/1999/xlink")}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(mt,gt);ft[t]=new ht(t,1,!1,e,"http://www.w3.org/XML/1998/namespace")}),ft.tabIndex=new ht("tabIndex",1,!1,"tabindex",null);var kt={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function Ct(e,t,n){return(e=ue.getPooled(kt.change,e,t,n)).type="change",Ae(n),K(e),e}var xt=null,Pt=null;function Nt(e){I(e,!1)}function Dt(e){if(He(j(e)))return e}function Mt(e,t){if("change"===e)return t}var At=!1;function It(){xt&&(xt.detachEvent("onpropertychange",Ot),Pt=xt=null)}function Ot(e){"value"===e.propertyName&&Dt(Pt)&&Fe(Nt,e=Ct(Pt,e,Be(e)))}function Rt(e,t,n){"focus"===e?(It(),Pt=n,(xt=t).attachEvent("onpropertychange",Ot)):"blur"===e&&It()}function Ut(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Dt(Pt)}function Lt(e,t){if("click"===e)return Dt(t)}function Ft(e,t){if("input"===e||"change"===e)return Dt(t)}G&&(At=ze("input")&&(!document.documentMode||9<document.documentMode));var jt={eventTypes:kt,_isInputEventSupported:At,extractEvents:function(e,t,n,r){var i=t?j(t):window,a=void 0,o=void 0,s=i.nodeName&&i.nodeName.toLowerCase();if("select"===s||"input"===s&&"file"===i.type?a=Mt:We(i)?At?a=Ft:(a=Ut,o=Rt):(s=i.nodeName)&&"input"===s.toLowerCase()&&("checkbox"===i.type||"radio"===i.type)&&(a=Lt),a&&(a=a(e,t)))return Ct(a,n,r);o&&o(e,i,t),"blur"===e&&(e=i._wrapperState)&&e.controlled&&"number"===i.type&&Tt(i,"number",i.value)}},Wt=ue.extend({view:null,detail:null}),Bt={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function zt(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Bt[e])&&!!t[e]}function Vt(){return zt}var qt=0,Ht=0,Kt=!1,Gt=!1,$t=Wt.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Vt,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=qt;return qt=e.screenX,Kt?"mousemove"===e.type?e.screenX-t:0:(Kt=!0,0)},movementY:function(e){if("movementY"in e)return e.movementY;var t=Ht;return Ht=e.screenY,Gt?"mousemove"===e.type?e.screenY-t:0:(Gt=!0,0)}}),Yt=$t.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Qt={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},Xt={eventTypes:Qt,extractEvents:function(e,t,n,r){var i="mouseover"===e||"pointerover"===e,a="mouseout"===e||"pointerout"===e;if(i&&(n.relatedTarget||n.fromElement)||!a&&!i)return null;if(i=r.window===r?r:(i=r.ownerDocument)?i.defaultView||i.parentWindow:window,a?(a=t,t=(t=n.relatedTarget||n.toElement)?L(t):null):a=null,a===t)return null;var o=void 0,s=void 0,l=void 0,c=void 0;"mouseout"===e||"mouseover"===e?(o=$t,s=Qt.mouseLeave,l=Qt.mouseEnter,c="mouse"):"pointerout"!==e&&"pointerover"!==e||(o=Yt,s=Qt.pointerLeave,l=Qt.pointerEnter,c="pointer");var u=null==a?i:j(a);if(i=null==t?i:j(t),(e=o.getPooled(s,a,n,r)).type=c+"leave",e.target=u,e.relatedTarget=i,(n=o.getPooled(l,t,n,r)).type=c+"enter",n.target=i,n.relatedTarget=u,r=t,a&&r)e:{for(i=r,c=0,o=t=a;o;o=B(o))c++;for(o=0,l=i;l;l=B(l))o++;for(;0<c-o;)t=B(t),c--;for(;0<o-c;)i=B(i),o--;for(;c--;){if(t===i||t===i.alternate)break e;t=B(t),i=B(i)}t=null}else t=null;for(i=t,t=[];a&&a!==i&&(null===(c=a.alternate)||c!==i);)t.push(a),a=B(a);for(a=[];r&&r!==i&&(null===(c=r.alternate)||c!==i);)a.push(r),r=B(r);for(r=0;r<t.length;r++)q(t[r],"bubbled",e);for(r=a.length;0<r--;)q(a[r],"captured",n);return[e,n]}},Jt=Object.prototype.hasOwnProperty;function Zt(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function en(e,t){if(Zt(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(!Jt.call(t,n[r])||!Zt(e[n[r]],t[n[r]]))return!1;return!0}function tn(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 5===t.tag?2:3}function nn(e){2!==tn(e)&&o("188")}function rn(e){if(!(e=function(e){var t=e.alternate;if(!t)return 3===(t=tn(e))&&o("188"),1===t?null:e;for(var n=e,r=t;;){var i=n.return,a=i?i.alternate:null;if(!i||!a)break;if(i.child===a.child){for(var s=i.child;s;){if(s===n)return nn(i),e;if(s===r)return nn(i),t;s=s.sibling}o("188")}if(n.return!==r.return)n=i,r=a;else{s=!1;for(var l=i.child;l;){if(l===n){s=!0,n=i,r=a;break}if(l===r){s=!0,r=i,n=a;break}l=l.sibling}if(!s){for(l=a.child;l;){if(l===n){s=!0,n=a,r=i;break}if(l===r){s=!0,r=a,n=i;break}l=l.sibling}s||o("189")}}n.alternate!==r&&o("190")}return 5!==n.tag&&o("188"),n.stateNode.current===n?e:t}(e)))return null;for(var t=e;;){if(7===t.tag||8===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}var an=ue.extend({animationName:null,elapsedTime:null,pseudoElement:null}),on=ue.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),sn=Wt.extend({relatedTarget:null});function ln(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}var cn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},un={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"},dn=Wt.extend({key:function(e){if(e.key){var t=cn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=ln(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?un[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Vt,charCode:function(e){return"keypress"===e.type?ln(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?ln(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),pn=$t.extend({dataTransfer:null}),hn=Wt.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Vt}),fn=ue.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),mn=$t.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}),gn=[["abort","abort"],[Z,"animationEnd"],[ee,"animationIteration"],[te,"animationStart"],["canplay","canPlay"],["canplaythrough","canPlayThrough"],["drag","drag"],["dragenter","dragEnter"],["dragexit","dragExit"],["dragleave","dragLeave"],["dragover","dragOver"],["durationchange","durationChange"],["emptied","emptied"],["encrypted","encrypted"],["ended","ended"],["error","error"],["gotpointercapture","gotPointerCapture"],["load","load"],["loadeddata","loadedData"],["loadedmetadata","loadedMetadata"],["loadstart","loadStart"],["lostpointercapture","lostPointerCapture"],["mousemove","mouseMove"],["mouseout","mouseOut"],["mouseover","mouseOver"],["playing","playing"],["pointermove","pointerMove"],["pointerout","pointerOut"],["pointerover","pointerOver"],["progress","progress"],["scroll","scroll"],["seeking","seeking"],["stalled","stalled"],["suspend","suspend"],["timeupdate","timeUpdate"],["toggle","toggle"],["touchmove","touchMove"],[ne,"transitionEnd"],["waiting","waiting"],["wheel","wheel"]],vn={},yn={};function bn(e,t){var n=e[0],r="on"+((e=e[1])[0].toUpperCase()+e.slice(1));t={phasedRegistrationNames:{bubbled:r,captured:r+"Capture"},dependencies:[n],isInteractive:t},vn[e]=t,yn[n]=t}[["blur","blur"],["cancel","cancel"],["click","click"],["close","close"],["contextmenu","contextMenu"],["copy","copy"],["cut","cut"],["auxclick","auxClick"],["dblclick","doubleClick"],["dragend","dragEnd"],["dragstart","dragStart"],["drop","drop"],["focus","focus"],["input","input"],["invalid","invalid"],["keydown","keyDown"],["keypress","keyPress"],["keyup","keyUp"],["mousedown","mouseDown"],["mouseup","mouseUp"],["paste","paste"],["pause","pause"],["play","play"],["pointercancel","pointerCancel"],["pointerdown","pointerDown"],["pointerup","pointerUp"],["ratechange","rateChange"],["reset","reset"],["seeked","seeked"],["submit","submit"],["touchcancel","touchCancel"],["touchend","touchEnd"],["touchstart","touchStart"],["volumechange","volumeChange"]].forEach(function(e){bn(e,!0)}),gn.forEach(function(e){bn(e,!1)});var wn={eventTypes:vn,isInteractiveTopLevelEventType:function(e){return void 0!==(e=yn[e])&&!0===e.isInteractive},extractEvents:function(e,t,n,r){var i=yn[e];if(!i)return null;switch(e){case"keypress":if(0===ln(n))return null;case"keydown":case"keyup":e=dn;break;case"blur":case"focus":e=sn;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=$t;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":e=pn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":e=hn;break;case Z:case ee:case te:e=an;break;case ne:e=fn;break;case"scroll":e=Wt;break;case"wheel":e=mn;break;case"copy":case"cut":case"paste":e=on;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":e=Yt;break;default:e=ue}return K(t=e.getPooled(i,t,n,r)),t}},_n=wn.isInteractiveTopLevelEventType,En=[];function Sn(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=5!==r.tag?null:r.stateNode.containerInfo))break;e.ancestors.push(n),n=L(r)}while(n);for(n=0;n<e.ancestors.length;n++){t=e.ancestors[n];var i=Be(e.nativeEvent);r=e.topLevelType;for(var a=e.nativeEvent,o=null,s=0;s<v.length;s++){var l=v[s];l&&(l=l.extractEvents(r,t,a,i))&&(o=k(o,l))}I(o,!1)}}var Tn=!0;function kn(e,t){if(!t)return null;var n=(_n(e)?xn:Pn).bind(null,e);t.addEventListener(e,n,!1)}function Cn(e,t){if(!t)return null;var n=(_n(e)?xn:Pn).bind(null,e);t.addEventListener(e,n,!0)}function xn(e,t){Re(Pn,e,t)}function Pn(e,t){if(Tn){var n=Be(t);if(null===(n=L(n))||"number"!=typeof n.tag||2===tn(n)||(n=null),En.length){var r=En.pop();r.topLevelType=e,r.nativeEvent=t,r.targetInst=n,e=r}else e={topLevelType:e,nativeEvent:t,targetInst:n,ancestors:[]};try{Fe(Sn,e)}finally{e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>En.length&&En.push(e)}}}var Nn={},Dn=0,Mn="_reactListenersID"+(""+Math.random()).slice(2);function An(e){return Object.prototype.hasOwnProperty.call(e,Mn)||(e[Mn]=Dn++,Nn[e[Mn]]={}),Nn[e[Mn]]}function In(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function On(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Rn(e,t){var n,r=On(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=On(r)}}function Un(){for(var e=window,t=In();t instanceof e.HTMLIFrameElement;){try{e=t.contentDocument.defaultView}catch(e){break}t=In(e.document)}return t}function Ln(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 Fn=G&&"documentMode"in document&&11>=document.documentMode,jn={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Wn=null,Bn=null,zn=null,Vn=!1;function qn(e,t){var n=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;return Vn||null==Wn||Wn!==In(n)?null:("selectionStart"in(n=Wn)&&Ln(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},zn&&en(zn,n)?null:(zn=n,(e=ue.getPooled(jn.select,Bn,e,t)).type="select",e.target=Wn,K(e),e))}var Hn={eventTypes:jn,extractEvents:function(e,t,n,r){var i,a=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(i=!a)){e:{a=An(a),i=w.onSelect;for(var o=0;o<i.length;o++){var s=i[o];if(!a.hasOwnProperty(s)||!a[s]){a=!1;break e}}a=!0}i=!a}if(i)return null;switch(a=t?j(t):window,e){case"focus":(We(a)||"true"===a.contentEditable)&&(Wn=a,Bn=t,zn=null);break;case"blur":zn=Bn=Wn=null;break;case"mousedown":Vn=!0;break;case"contextmenu":case"mouseup":case"dragend":return Vn=!1,qn(n,r);case"selectionchange":if(Fn)break;case"keydown":case"keyup":return qn(n,r)}return null}};function Kn(e,t){return e=i({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 Gn(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+yt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function $n(e,t){return null!=t.dangerouslySetInnerHTML&&o("91"),i({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Yn(e,t){var n=t.value;null==n&&(n=t.defaultValue,null!=(t=t.children)&&(null!=n&&o("92"),Array.isArray(t)&&(1>=t.length||o("93"),t=t[0]),n=t),null==n&&(n="")),e._wrapperState={initialValue:yt(n)}}function Qn(e,t){var n=yt(t.value),r=yt(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 Xn(e){var t=e.textContent;t===e._wrapperState.initialValue&&(e.value=t)}M.injectEventPluginOrder("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),_=W,E=F,S=j,M.injectEventPluginsByName({SimpleEventPlugin:wn,EnterLeaveEventPlugin:Xt,ChangeEventPlugin:jt,SelectEventPlugin:Hn,BeforeInputEventPlugin:xe});var Jn={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function Zn(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 er(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Zn(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var tr,nr=void 0,rr=(tr=function(e,t){if(e.namespaceURI!==Jn.svg||"innerHTML"in e)e.innerHTML=t;else{for((nr=nr||document.createElement("div")).innerHTML="<svg>"+t+"</svg>",t=nr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction(function(){return tr(e,t)})}:tr);function ir(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 ar={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},or=["Webkit","ms","Moz","O"];function sr(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=n,a=t[n];i=null==a||"boolean"==typeof a||""===a?"":r||"number"!=typeof a||0===a||ar.hasOwnProperty(i)&&ar[i]?(""+a).trim():a+"px","float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(ar).forEach(function(e){or.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ar[t]=ar[e]})});var lr=i({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 cr(e,t){t&&(lr[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&o("137",e,""),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&o("60"),"object"==typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML||o("61")),null!=t.style&&"object"!=typeof t.style&&o("62",""))}function ur(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 dr(e,t){var n=An(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=w[t];for(var r=0;r<t.length;r++){var i=t[r];if(!n.hasOwnProperty(i)||!n[i]){switch(i){case"scroll":Cn("scroll",e);break;case"focus":case"blur":Cn("focus",e),Cn("blur",e),n.blur=!0,n.focus=!0;break;case"cancel":case"close":ze(i)&&Cn(i,e);break;case"invalid":case"submit":case"reset":break;default:-1===re.indexOf(i)&&kn(i,e)}n[i]=!0}}}function pr(){}var hr=null,fr=null;function mr(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function gr(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}function vr(e){for(e=e.nextSibling;e&&1!==e.nodeType&&3!==e.nodeType;)e=e.nextSibling;return e}function yr(e){for(e=e.firstChild;e&&1!==e.nodeType&&3!==e.nodeType;)e=e.nextSibling;return e}new Set;var br=[],wr=-1;function _r(e){0>wr||(e.current=br[wr],br[wr]=null,wr--)}function Er(e,t){br[++wr]=e.current,e.current=t}var Sr={},Tr={current:Sr},kr={current:!1},Cr=Sr;function xr(e,t){var n=e.type.contextTypes;if(!n)return Sr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,a={};for(i in n)a[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Pr(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Nr(e){_r(kr),_r(Tr)}function Dr(e){_r(kr),_r(Tr)}function Mr(e,t,n){Tr.current!==Sr&&o("168"),Er(Tr,t),Er(kr,n)}function Ar(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var a in r=r.getChildContext())a in e||o("108",st(t)||"Unknown",a);return i({},n,r)}function Ir(e){var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||Sr,Cr=Tr.current,Er(Tr,t),Er(kr,kr.current),!0}function Or(e,t,n){var r=e.stateNode;r||o("169"),n?(t=Ar(e,t,Cr),r.__reactInternalMemoizedMergedChildContext=t,_r(kr),_r(Tr),Er(Tr,t)):_r(kr),Er(kr,n)}var Rr=null,Ur=null;function Lr(e){return function(t){try{return e(t)}catch(e){}}}function Fr(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=null,this.index=0,this.ref=null,this.pendingProps=t,this.firstContextDependency=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 jr(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Wr(e,t,n){var r=e.alternate;return null===r?((r=new Fr(e.tag,t,e.key,e.mode)).type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.effectTag=0,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null),r.childExpirationTime=e.childExpirationTime,r.expirationTime=t!==e.pendingProps?n:e.expirationTime,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,r.firstContextDependency=e.firstContextDependency,r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Br(e,t,n){var r=e.type,i=e.key;e=e.props;var a=void 0;if("function"==typeof r)a=jr(r)?2:4;else if("string"==typeof r)a=7;else e:switch(r){case Xe:return zr(e.children,t,n,i);case nt:a=10,t|=3;break;case Je:a=10,t|=2;break;case Ze:return(r=new Fr(15,e,i,4|t)).type=Ze,r.expirationTime=n,r;case it:a=16;break;default:if("object"==typeof r&&null!==r)switch(r.$$typeof){case et:a=12;break e;case tt:a=11;break e;case rt:a=13;break e;default:if("function"==typeof r.then){a=4;break e}}o("130",null==r?r:typeof r,"")}return(t=new Fr(a,e,i,t)).type=r,t.expirationTime=n,t}function zr(e,t,n,r){return(e=new Fr(9,e,r,t)).expirationTime=n,e}function Vr(e,t,n){return(e=new Fr(8,e,null,t)).expirationTime=n,e}function qr(e,t,n){return(t=new Fr(6,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Hr(e,t){e.didError=!1;var n=e.earliestPendingTime;0===n?e.earliestPendingTime=e.latestPendingTime=t:n>t?e.earliestPendingTime=t:e.latestPendingTime<t&&(e.latestPendingTime=t),Kr(t,e)}function Kr(e,t){var n=t.earliestSuspendedTime,r=t.latestSuspendedTime,i=t.earliestPendingTime,a=t.latestPingedTime;0===(i=0!==i?i:a)&&(0===e||r>e)&&(i=r),0!==(e=i)&&0!==n&&n<e&&(e=n),t.nextExpirationTimeToWorkOn=i,t.expirationTime=e}var Gr=!1;function $r(e){return{baseState:e,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Yr(e){return{baseState:e.baseState,firstUpdate:e.firstUpdate,lastUpdate:e.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Qr(e){return{expirationTime:e,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function Xr(e,t){null===e.lastUpdate?e.firstUpdate=e.lastUpdate=t:(e.lastUpdate.next=t,e.lastUpdate=t)}function Jr(e,t){var n=e.alternate;if(null===n){var r=e.updateQueue,i=null;null===r&&(r=e.updateQueue=$r(e.memoizedState))}else r=e.updateQueue,i=n.updateQueue,null===r?null===i?(r=e.updateQueue=$r(e.memoizedState),i=n.updateQueue=$r(n.memoizedState)):r=e.updateQueue=Yr(i):null===i&&(i=n.updateQueue=Yr(r));null===i||r===i?Xr(r,t):null===r.lastUpdate||null===i.lastUpdate?(Xr(r,t),Xr(i,t)):(Xr(r,t),i.lastUpdate=t)}function Zr(e,t){var n=e.updateQueue;null===(n=null===n?e.updateQueue=$r(e.memoizedState):ei(e,n)).lastCapturedUpdate?n.firstCapturedUpdate=n.lastCapturedUpdate=t:(n.lastCapturedUpdate.next=t,n.lastCapturedUpdate=t)}function ei(e,t){var n=e.alternate;return null!==n&&t===n.updateQueue&&(t=e.updateQueue=Yr(t)),t}function ti(e,t,n,r,a,o){switch(n.tag){case 1:return"function"==typeof(e=n.payload)?e.call(o,r,a):e;case 3:e.effectTag=-1025&e.effectTag|64;case 0:if(null===(a="function"==typeof(e=n.payload)?e.call(o,r,a):e)||void 0===a)break;return i({},r,a);case 2:Gr=!0}return r}function ni(e,t,n,r,i){Gr=!1;for(var a=(t=ei(e,t)).baseState,o=null,s=0,l=t.firstUpdate,c=a;null!==l;){var u=l.expirationTime;u>i?(null===o&&(o=l,a=c),(0===s||s>u)&&(s=u)):(c=ti(e,0,l,c,n,r),null!==l.callback&&(e.effectTag|=32,l.nextEffect=null,null===t.lastEffect?t.firstEffect=t.lastEffect=l:(t.lastEffect.nextEffect=l,t.lastEffect=l))),l=l.next}for(u=null,l=t.firstCapturedUpdate;null!==l;){var d=l.expirationTime;d>i?(null===u&&(u=l,null===o&&(a=c)),(0===s||s>d)&&(s=d)):(c=ti(e,0,l,c,n,r),null!==l.callback&&(e.effectTag|=32,l.nextEffect=null,null===t.lastCapturedEffect?t.firstCapturedEffect=t.lastCapturedEffect=l:(t.lastCapturedEffect.nextEffect=l,t.lastCapturedEffect=l))),l=l.next}null===o&&(t.lastUpdate=null),null===u?t.lastCapturedUpdate=null:e.effectTag|=32,null===o&&null===u&&(a=c),t.baseState=a,t.firstUpdate=o,t.firstCapturedUpdate=u,e.expirationTime=s,e.memoizedState=c}function ri(e,t,n){null!==t.firstCapturedUpdate&&(null!==t.lastUpdate&&(t.lastUpdate.next=t.firstCapturedUpdate,t.lastUpdate=t.lastCapturedUpdate),t.firstCapturedUpdate=t.lastCapturedUpdate=null),ii(t.firstEffect,n),t.firstEffect=t.lastEffect=null,ii(t.firstCapturedEffect,n),t.firstCapturedEffect=t.lastCapturedEffect=null}function ii(e,t){for(;null!==e;){var n=e.callback;if(null!==n){e.callback=null;var r=t;"function"!=typeof n&&o("191",n),n.call(r)}e=e.nextEffect}}function ai(e,t){return{value:e,source:t,stack:lt(t)}}var oi={current:null},si=null,li=null,ci=null;function ui(e,t){var n=e.type._context;Er(oi,n._currentValue),n._currentValue=t}function di(e){var t=oi.current;_r(oi),e.type._context._currentValue=t}function pi(e){si=e,ci=li=null,e.firstContextDependency=null}function hi(e,t){return ci!==e&&!1!==t&&0!==t&&("number"==typeof t&&1073741823!==t||(ci=e,t=1073741823),t={context:e,observedBits:t,next:null},null===li?(null===si&&o("277"),si.firstContextDependency=li=t):li=li.next=t),e._currentValue}var fi={},mi={current:fi},gi={current:fi},vi={current:fi};function yi(e){return e===fi&&o("174"),e}function bi(e,t){Er(vi,t),Er(gi,e),Er(mi,fi);var n=t.nodeType;switch(n){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:er(null,"");break;default:t=er(t=(n=8===n?t.parentNode:t).namespaceURI||null,n=n.tagName)}_r(mi),Er(mi,t)}function wi(e){_r(mi),_r(gi),_r(vi)}function _i(e){yi(vi.current);var t=yi(mi.current),n=er(t,e.type);t!==n&&(Er(gi,e),Er(mi,n))}function Ei(e){gi.current===e&&(_r(mi),_r(gi))}var Si=(new r.Component).refs;function Ti(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:i({},t,n),e.memoizedState=n,null!==(r=e.updateQueue)&&0===e.expirationTime&&(r.baseState=n)}var ki={isMounted:function(e){return!!(e=e._reactInternalFiber)&&2===tn(e)},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=oo(),i=Qr(r=Aa(r,e));i.payload=t,void 0!==n&&null!==n&&(i.callback=n),Jr(e,i),Ia(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=oo(),i=Qr(r=Aa(r,e));i.tag=1,i.payload=t,void 0!==n&&null!==n&&(i.callback=n),Jr(e,i),Ia(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=oo(),r=Qr(n=Aa(n,e));r.tag=2,void 0!==t&&null!==t&&(r.callback=t),Jr(e,r),Ia(e,n)}};function Ci(e,t,n,r,i,a,o){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,o):!t.prototype||!t.prototype.isPureReactComponent||(!en(n,r)||!en(i,a))}function xi(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&&ki.enqueueReplaceState(t,t.state,null)}function Pi(e,t,n,r){var i=e.stateNode,a=Pr(t)?Cr:Tr.current;i.props=n,i.state=e.memoizedState,i.refs=Si,i.context=xr(e,a),null!==(a=e.updateQueue)&&(ni(e,a,n,i,r),i.state=e.memoizedState),"function"==typeof(a=t.getDerivedStateFromProps)&&(Ti(e,t,a,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&ki.enqueueReplaceState(i,i.state,null),null!==(a=e.updateQueue)&&(ni(e,a,n,i,r),i.state=e.memoizedState)),"function"==typeof i.componentDidMount&&(e.effectTag|=4)}var Ni=Array.isArray;function Di(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){var r=void 0;(n=n._owner)&&(2!==n.tag&&3!==n.tag&&o("110"),r=n.stateNode),r||o("147",e);var i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:((t=function(e){var t=r.refs;t===Si&&(t=r.refs={}),null===e?delete t[i]:t[i]=e})._stringRef=i,t)}"string"!=typeof e&&o("284"),n._owner||o("254",e)}return e}function Mi(e,t){"textarea"!==e.type&&o("31","[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,"")}function Ai(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 i(e,t,n){return(e=Wr(e,t,n)).index=0,e.sibling=null,e}function a(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 s(t){return e&&null===t.alternate&&(t.effectTag=2),t}function l(e,t,n,r){return null===t||8!==t.tag?((t=Vr(n,e.mode,r)).return=e,t):((t=i(t,n,r)).return=e,t)}function c(e,t,n,r){return null!==t&&t.type===n.type?((r=i(t,n.props,r)).ref=Di(e,t,n),r.return=e,r):((r=Br(n,e.mode,r)).ref=Di(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||6!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=qr(n,e.mode,r)).return=e,t):((t=i(t,n.children||[],r)).return=e,t)}function d(e,t,n,r,a){return null===t||9!==t.tag?((t=zr(n,e.mode,r,a)).return=e,t):((t=i(t,n,r)).return=e,t)}function p(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=Vr(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case Ye:return(n=Br(t,e.mode,n)).ref=Di(e,null,t),n.return=e,n;case Qe:return(t=qr(t,e.mode,n)).return=e,t}if(Ni(t)||ot(t))return(t=zr(t,e.mode,n,null)).return=e,t;Mi(e,t)}return null}function h(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==i?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case Ye:return n.key===i?n.type===Xe?d(e,t,n.props.children,r,i):c(e,t,n,r):null;case Qe:return n.key===i?u(e,t,n,r):null}if(Ni(n)||ot(n))return null!==i?null:d(e,t,n,r,null);Mi(e,n)}return null}function f(e,t,n,r,i){if("string"==typeof r||"number"==typeof r)return l(t,e=e.get(n)||null,""+r,i);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?d(t,e,r.props.children,i,r.key):c(t,e,r,i);case Qe:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i)}if(Ni(r)||ot(r))return d(t,e=e.get(n)||null,r,i,null);Mi(t,r)}return null}function m(i,o,s,l){for(var c=null,u=null,d=o,m=o=0,g=null;null!==d&&m<s.length;m++){d.index>m?(g=d,d=null):g=d.sibling;var v=h(i,d,s[m],l);if(null===v){null===d&&(d=g);break}e&&d&&null===v.alternate&&t(i,d),o=a(v,o,m),null===u?c=v:u.sibling=v,u=v,d=g}if(m===s.length)return n(i,d),c;if(null===d){for(;m<s.length;m++)(d=p(i,s[m],l))&&(o=a(d,o,m),null===u?c=d:u.sibling=d,u=d);return c}for(d=r(i,d);m<s.length;m++)(g=f(d,i,m,s[m],l))&&(e&&null!==g.alternate&&d.delete(null===g.key?m:g.key),o=a(g,o,m),null===u?c=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),c}function g(i,s,l,c){var u=ot(l);"function"!=typeof u&&o("150"),null==(l=u.call(l))&&o("151");for(var d=u=null,m=s,g=s=0,v=null,y=l.next();null!==m&&!y.done;g++,y=l.next()){m.index>g?(v=m,m=null):v=m.sibling;var b=h(i,m,y.value,c);if(null===b){m||(m=v);break}e&&m&&null===b.alternate&&t(i,m),s=a(b,s,g),null===d?u=b:d.sibling=b,d=b,m=v}if(y.done)return n(i,m),u;if(null===m){for(;!y.done;g++,y=l.next())null!==(y=p(i,y.value,c))&&(s=a(y,s,g),null===d?u=y:d.sibling=y,d=y);return u}for(m=r(i,m);!y.done;g++,y=l.next())null!==(y=f(m,i,g,y.value,c))&&(e&&null!==y.alternate&&m.delete(null===y.key?g:y.key),s=a(y,s,g),null===d?u=y:d.sibling=y,d=y);return e&&m.forEach(function(e){return t(i,e)}),u}return function(e,r,a,l){var c="object"==typeof a&&null!==a&&a.type===Xe&&null===a.key;c&&(a=a.props.children);var u="object"==typeof a&&null!==a;if(u)switch(a.$$typeof){case Ye:e:{for(u=a.key,c=r;null!==c;){if(c.key===u){if(9===c.tag?a.type===Xe:c.type===a.type){n(e,c.sibling),(r=i(c,a.type===Xe?a.props.children:a.props,l)).ref=Di(e,c,a),r.return=e,e=r;break e}n(e,c);break}t(e,c),c=c.sibling}a.type===Xe?((r=zr(a.props.children,e.mode,l,a.key)).return=e,e=r):((l=Br(a,e.mode,l)).ref=Di(e,r,a),l.return=e,e=l)}return s(e);case Qe:e:{for(c=a.key;null!==r;){if(r.key===c){if(6===r.tag&&r.stateNode.containerInfo===a.containerInfo&&r.stateNode.implementation===a.implementation){n(e,r.sibling),(r=i(r,a.children||[],l)).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=qr(a,e.mode,l)).return=e,e=r}return s(e)}if("string"==typeof a||"number"==typeof a)return a=""+a,null!==r&&8===r.tag?(n(e,r.sibling),(r=i(r,a,l)).return=e,e=r):(n(e,r),(r=Vr(a,e.mode,l)).return=e,e=r),s(e);if(Ni(a))return m(e,r,a,l);if(ot(a))return g(e,r,a,l);if(u&&Mi(e,a),void 0===a&&!c)switch(e.tag){case 2:case 3:case 0:o("152",(l=e.type).displayName||l.name||"Component")}return n(e,r)}}var Ii=Ai(!0),Oi=Ai(!1),Ri=null,Ui=null,Li=!1;function Fi(e,t){var n=new Fr(7,null,null,0);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 ji(e,t){switch(e.tag){case 7:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 8:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function Wi(e){if(Li){var t=Ui;if(t){var n=t;if(!ji(e,t)){if(!(t=vr(n))||!ji(e,t))return e.effectTag|=2,Li=!1,void(Ri=e);Fi(Ri,n)}Ri=e,Ui=yr(t)}else e.effectTag|=2,Li=!1,Ri=e}}function Bi(e){for(e=e.return;null!==e&&7!==e.tag&&5!==e.tag;)e=e.return;Ri=e}function zi(e){if(e!==Ri)return!1;if(!Li)return Bi(e),Li=!0,!1;var t=e.type;if(7!==e.tag||"head"!==t&&"body"!==t&&!gr(t,e.memoizedProps))for(t=Ui;t;)Fi(e,t),t=vr(t);return Bi(e),Ui=Ri?vr(e.stateNode):null,!0}function Vi(){Ui=Ri=null,Li=!1}var qi=Ke.ReactCurrentOwner;function Hi(e,t,n,r){t.child=null===e?Oi(t,null,n,r):Ii(t,e.child,n,r)}function Ki(e,t,n,r,i){n=n.render;var a=t.ref;return kr.current||t.memoizedProps!==r||a!==(null!==e?e.ref:null)?(Hi(e,t,n=n(r,a),i),t.memoizedProps=r,t.child):Zi(e,t,i)}function Gi(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function $i(e,t,n,r,i){var a=Pr(n)?Cr:Tr.current;return a=xr(t,a),pi(t),n=n(r,a),t.effectTag|=1,Hi(e,t,n,i),t.memoizedProps=r,t.child}function Yi(e,t,n,r,i){if(Pr(n)){var a=!0;Ir(t)}else a=!1;if(pi(t),null===e)if(null===t.stateNode){var o=Pr(n)?Cr:Tr.current,s=n.contextTypes,l=null!==s&&void 0!==s,c=new n(r,s=l?xr(t,o):Sr);t.memoizedState=null!==c.state&&void 0!==c.state?c.state:null,c.updater=ki,t.stateNode=c,c._reactInternalFiber=t,l&&((l=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,l.__reactInternalMemoizedMaskedChildContext=s),Pi(t,n,r,i),r=!0}else{o=t.stateNode,s=t.memoizedProps,o.props=s;var u=o.context;l=xr(t,l=Pr(n)?Cr:Tr.current);var d=n.getDerivedStateFromProps;(c="function"==typeof d||"function"==typeof o.getSnapshotBeforeUpdate)||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(s!==r||u!==l)&&xi(t,o,r,l),Gr=!1;var p=t.memoizedState;u=o.state=p;var h=t.updateQueue;null!==h&&(ni(t,h,r,o,i),u=t.memoizedState),s!==r||p!==u||kr.current||Gr?("function"==typeof d&&(Ti(t,n,d,r),u=t.memoizedState),(s=Gr||Ci(t,n,s,r,p,u,l))?(c||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||("function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"==typeof o.componentDidMount&&(t.effectTag|=4)):("function"==typeof o.componentDidMount&&(t.effectTag|=4),t.memoizedProps=r,t.memoizedState=u),o.props=r,o.state=u,o.context=l,r=s):("function"==typeof o.componentDidMount&&(t.effectTag|=4),r=!1)}else o=t.stateNode,s=t.memoizedProps,o.props=s,u=o.context,l=xr(t,l=Pr(n)?Cr:Tr.current),(c="function"==typeof(d=n.getDerivedStateFromProps)||"function"==typeof o.getSnapshotBeforeUpdate)||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(s!==r||u!==l)&&xi(t,o,r,l),Gr=!1,u=t.memoizedState,p=o.state=u,null!==(h=t.updateQueue)&&(ni(t,h,r,o,i),p=t.memoizedState),s!==r||u!==p||kr.current||Gr?("function"==typeof d&&(Ti(t,n,d,r),p=t.memoizedState),(d=Gr||Ci(t,n,s,r,u,p,l))?(c||"function"!=typeof o.UNSAFE_componentWillUpdate&&"function"!=typeof o.componentWillUpdate||("function"==typeof o.componentWillUpdate&&o.componentWillUpdate(r,p,l),"function"==typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,p,l)),"function"==typeof o.componentDidUpdate&&(t.effectTag|=4),"function"==typeof o.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!=typeof o.componentDidUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=4),"function"!=typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=256),t.memoizedProps=r,t.memoizedState=p),o.props=r,o.state=p,o.context=l,r=d):("function"!=typeof o.componentDidUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=4),"function"!=typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=256),r=!1);return Qi(e,t,n,r,a,i)}function Qi(e,t,n,r,i,a){Gi(e,t);var o=0!=(64&t.effectTag);if(!r&&!o)return i&&Or(t,n,!1),Zi(e,t,a);r=t.stateNode,qi.current=t;var s=o?null:r.render();return t.effectTag|=1,null!==e&&o&&(Hi(e,t,null,a),t.child=null),Hi(e,t,s,a),t.memoizedState=r.state,t.memoizedProps=r.props,i&&Or(t,n,!0),t.child}function Xi(e){var t=e.stateNode;t.pendingContext?Mr(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Mr(0,t.context,!1),bi(e,t.containerInfo)}function Ji(e,t){if(e&&e.defaultProps)for(var n in t=i({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}function Zi(e,t,n){null!==e&&(t.firstContextDependency=e.firstContextDependency);var r=t.childExpirationTime;if(0===r||r>n)return null;if(null!==e&&t.child!==e.child&&o("153"),null!==t.child){for(n=Wr(e=t.child,e.pendingProps,e.expirationTime),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Wr(e,e.pendingProps,e.expirationTime)).return=t;n.sibling=null}return t.child}function ea(e,t,n){var r=t.expirationTime;if(!kr.current&&(0===r||r>n)){switch(t.tag){case 5:Xi(t),Vi();break;case 7:_i(t);break;case 2:Pr(t.type)&&Ir(t);break;case 3:Pr(t.type._reactResult)&&Ir(t);break;case 6:bi(t,t.stateNode.containerInfo);break;case 12:ui(t,t.memoizedProps.value)}return Zi(e,t,n)}switch(t.expirationTime=0,t.tag){case 4:return function(e,t,n,r){null!==e&&o("155");var i=t.pendingProps;if("object"==typeof n&&null!==n&&"function"==typeof n.then){var a=n=function(e){switch(e._reactStatus){case 1:return e._reactResult;case 2:throw e._reactResult;case 0:throw e;default:throw e._reactStatus=0,e.then(function(t){if(0===e._reactStatus){if(e._reactStatus=1,"object"==typeof t&&null!==t){var n=t.default;t=void 0!==n&&null!==n?n:t}e._reactResult=t}},function(t){0===e._reactStatus&&(e._reactStatus=2,e._reactResult=t)}),e}}(n);a="function"==typeof a?jr(a)?3:1:void 0!==a&&null!==a&&a.$$typeof?14:4,a=t.tag=a;var s=Ji(n,i);switch(a){case 1:return $i(e,t,n,s,r);case 3:return Yi(e,t,n,s,r);case 14:return Ki(e,t,n,s,r);default:o("283",n)}}if(a=xr(t,Tr.current),pi(t),a=n(i,a),t.effectTag|=1,"object"==typeof a&&null!==a&&"function"==typeof a.render&&void 0===a.$$typeof){t.tag=2,Pr(n)?(s=!0,Ir(t)):s=!1,t.memoizedState=null!==a.state&&void 0!==a.state?a.state:null;var l=n.getDerivedStateFromProps;return"function"==typeof l&&Ti(t,n,l,i),a.updater=ki,t.stateNode=a,a._reactInternalFiber=t,Pi(t,n,i,r),Qi(e,t,n,!0,s,r)}return t.tag=0,Hi(e,t,a,r),t.memoizedProps=i,t.child}(e,t,t.type,n);case 0:return $i(e,t,t.type,t.pendingProps,n);case 1:var i=t.type._reactResult;return e=$i(e,t,i,Ji(i,r=t.pendingProps),n),t.memoizedProps=r,e;case 2:return Yi(e,t,t.type,t.pendingProps,n);case 3:return e=Yi(e,t,i=t.type._reactResult,Ji(i,r=t.pendingProps),n),t.memoizedProps=r,e;case 5:return Xi(t),null===(r=t.updateQueue)&&o("282"),i=null!==(i=t.memoizedState)?i.element:null,ni(t,r,t.pendingProps,null,n),(r=t.memoizedState.element)===i?(Vi(),t=Zi(e,t,n)):(i=t.stateNode,(i=(null===e||null===e.child)&&i.hydrate)&&(Ui=yr(t.stateNode.containerInfo),Ri=t,i=Li=!0),i?(t.effectTag|=2,t.child=Oi(t,null,r,n)):(Hi(e,t,r,n),Vi()),t=t.child),t;case 7:_i(t),null===e&&Wi(t),r=t.type,i=t.pendingProps;var a=null!==e?e.memoizedProps:null,s=i.children;return gr(r,i)?s=null:null!==a&&gr(r,a)&&(t.effectTag|=16),Gi(e,t),1073741823!==n&&1&t.mode&&i.hidden?(t.expirationTime=1073741823,t.memoizedProps=i,t=null):(Hi(e,t,s,n),t.memoizedProps=i,t=t.child),t;case 8:return null===e&&Wi(t),t.memoizedProps=t.pendingProps,null;case 16:return null;case 6:return bi(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Ii(t,null,r,n):Hi(e,t,r,n),t.memoizedProps=r,t.child;case 13:return Ki(e,t,t.type,t.pendingProps,n);case 14:return e=Ki(e,t,i=t.type._reactResult,Ji(i,r=t.pendingProps),n),t.memoizedProps=r,e;case 9:return Hi(e,t,r=t.pendingProps,n),t.memoizedProps=r,t.child;case 10:return Hi(e,t,r=t.pendingProps.children,n),t.memoizedProps=r,t.child;case 15:return Hi(e,t,(r=t.pendingProps).children,n),t.memoizedProps=r,t.child;case 12:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,a=i.value,t.memoizedProps=i,ui(t,a),null!==s){var l=s.value;if(0===(a=l===a&&(0!==l||1/l==1/a)||l!=l&&a!=a?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(l,a):1073741823))){if(s.children===i.children&&!kr.current){t=Zi(e,t,n);break e}}else for(null!==(s=t.child)&&(s.return=t);null!==s;){if(null!==(l=s.firstContextDependency))do{if(l.context===r&&0!=(l.observedBits&a)){if(2===s.tag||3===s.tag){var c=Qr(n);c.tag=2,Jr(s,c)}(0===s.expirationTime||s.expirationTime>n)&&(s.expirationTime=n),null!==(c=s.alternate)&&(0===c.expirationTime||c.expirationTime>n)&&(c.expirationTime=n);for(var u=s.return;null!==u;){if(c=u.alternate,0===u.childExpirationTime||u.childExpirationTime>n)u.childExpirationTime=n,null!==c&&(0===c.childExpirationTime||c.childExpirationTime>n)&&(c.childExpirationTime=n);else{if(null===c||!(0===c.childExpirationTime||c.childExpirationTime>n))break;c.childExpirationTime=n}u=u.return}}c=s.child,l=l.next}while(null!==l);else c=12===s.tag&&s.type===t.type?null:s.child;if(null!==c)c.return=s;else for(c=s;null!==c;){if(c===t){c=null;break}if(null!==(s=c.sibling)){s.return=c.return,c=s;break}c=c.return}s=c}}Hi(e,t,i.children,n),t=t.child}return t;case 11:return a=t.type,i=(r=t.pendingProps).children,pi(t),i=i(a=hi(a,r.unstable_observedBits)),t.effectTag|=1,Hi(e,t,i,n),t.memoizedProps=r,t.child;default:o("156")}}function ta(e){e.effectTag|=4}var na=void 0,ra=void 0,ia=void 0;function aa(e,t){var n=t.source,r=t.stack;null===r&&null!==n&&(r=lt(n)),null!==n&&st(n.type),t=t.value,null!==e&&2===e.tag&&st(e.type);try{console.error(t)}catch(e){setTimeout(function(){throw e})}}function oa(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){Ma(e,t)}else t.current=null}function sa(e){switch("function"==typeof Ur&&Ur(e),e.tag){case 2:case 3:oa(e);var t=e.stateNode;if("function"==typeof t.componentWillUnmount)try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){Ma(e,t)}break;case 7:oa(e);break;case 6:ua(e)}}function la(e){return 7===e.tag||5===e.tag||6===e.tag}function ca(e){e:{for(var t=e.return;null!==t;){if(la(t)){var n=t;break e}t=t.return}o("160"),n=void 0}var r=t=void 0;switch(n.tag){case 7:t=n.stateNode,r=!1;break;case 5:case 6:t=n.stateNode.containerInfo,r=!0;break;default:o("161")}16&n.effectTag&&(ir(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||la(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;7!==n.tag&&8!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||6===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}for(var i=e;;){if(7===i.tag||8===i.tag)if(n)if(r){var a=t,s=i.stateNode,l=n;8===a.nodeType?a.parentNode.insertBefore(s,l):a.insertBefore(s,l)}else t.insertBefore(i.stateNode,n);else r?(a=t,s=i.stateNode,8===a.nodeType?(l=a.parentNode).insertBefore(s,a):(l=a).appendChild(s),null===l.onclick&&(l.onclick=pr)):t.appendChild(i.stateNode);else if(6!==i.tag&&null!==i.child){i.child.return=i,i=i.child;continue}if(i===e)break;for(;null===i.sibling;){if(null===i.return||i.return===e)return;i=i.return}i.sibling.return=i.return,i=i.sibling}}function ua(e){for(var t=e,n=!1,r=void 0,i=void 0;;){if(!n){n=t.return;e:for(;;){switch(null===n&&o("160"),n.tag){case 7:r=n.stateNode,i=!1;break e;case 5:case 6:r=n.stateNode.containerInfo,i=!0;break e}n=n.return}n=!0}if(7===t.tag||8===t.tag){e:for(var a=t,s=a;;)if(sa(s),null!==s.child&&6!==s.tag)s.child.return=s,s=s.child;else{if(s===a)break;for(;null===s.sibling;){if(null===s.return||s.return===a)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}i?(a=r,s=t.stateNode,8===a.nodeType?a.parentNode.removeChild(s):a.removeChild(s)):r.removeChild(t.stateNode)}else if(6===t.tag?(r=t.stateNode.containerInfo,i=!0):sa(t),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;6===(t=t.return).tag&&(n=!1)}t.sibling.return=t.return,t=t.sibling}}function da(e,t){switch(t.tag){case 2:case 3:break;case 7:var n=t.stateNode;if(null!=n){var r=t.memoizedProps,i=null!==e?e.memoizedProps:r;e=t.type;var a=t.updateQueue;if(t.updateQueue=null,null!==a){for(n[U]=r,"input"===e&&"radio"===r.type&&null!=r.name&&_t(n,r),ur(e,i),t=ur(e,r),i=0;i<a.length;i+=2){var s=a[i],l=a[i+1];"style"===s?sr(n,l):"dangerouslySetInnerHTML"===s?rr(n,l):"children"===s?ir(n,l):vt(n,s,l,t)}switch(e){case"input":Et(n,r);break;case"textarea":Qn(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(a=r.value)?Gn(n,!!r.multiple,a,!1):e!==!!r.multiple&&(null!=r.defaultValue?Gn(n,!!r.multiple,r.defaultValue,!0):Gn(n,!!r.multiple,r.multiple?[]:"",!1))}}}break;case 8:null===t.stateNode&&o("162"),t.stateNode.nodeValue=t.memoizedProps;break;case 5:case 15:case 16:break;default:o("163")}}function pa(e,t,n){(n=Qr(n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){fo(r),aa(e,t)},n}function ha(e,t,n){(n=Qr(n)).tag=3;var r=e.stateNode;return null!==r&&"function"==typeof r.componentDidCatch&&(n.callback=function(){null===Ca?Ca=new Set([this]):Ca.add(this);var n=t.value,r=t.stack;aa(e,t),this.componentDidCatch(n,{componentStack:null!==r?r:""})}),n}function fa(e){switch(e.tag){case 2:Pr(e.type)&&Nr();var t=e.effectTag;return 1024&t?(e.effectTag=-1025&t|64,e):null;case 3:return Pr(e.type._reactResult)&&Nr(),1024&(t=e.effectTag)?(e.effectTag=-1025&t|64,e):null;case 5:return wi(),Dr(),0!=(64&(t=e.effectTag))&&o("285"),e.effectTag=-1025&t|64,e;case 7:return Ei(e),null;case 16:return 1024&(t=e.effectTag)?(e.effectTag=-1025&t|64,e):null;case 6:return wi(),null;case 12:return di(e),null;default:return null}}na=function(){},ra=function(e,t,n,r,a){var o=e.memoizedProps;if(o!==r){var s=t.stateNode;switch(yi(mi.current),e=null,n){case"input":o=bt(s,o),r=bt(s,r),e=[];break;case"option":o=Kn(s,o),r=Kn(s,r),e=[];break;case"select":o=i({},o,{value:void 0}),r=i({},r,{value:void 0}),e=[];break;case"textarea":o=$n(s,o),r=$n(s,r),e=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(s.onclick=pr)}cr(n,r),s=n=void 0;var l=null;for(n in o)if(!r.hasOwnProperty(n)&&o.hasOwnProperty(n)&&null!=o[n])if("style"===n){var c=o[n];for(s in c)c.hasOwnProperty(s)&&(l||(l={}),l[s]="")}else"dangerouslySetInnerHTML"!==n&&"children"!==n&&"suppressContentEditableWarning"!==n&&"suppressHydrationWarning"!==n&&"autoFocus"!==n&&(b.hasOwnProperty(n)?e||(e=[]):(e=e||[]).push(n,null));for(n in r){var u=r[n];if(c=null!=o?o[n]:void 0,r.hasOwnProperty(n)&&u!==c&&(null!=u||null!=c))if("style"===n)if(c){for(s in c)!c.hasOwnProperty(s)||u&&u.hasOwnProperty(s)||(l||(l={}),l[s]="");for(s in u)u.hasOwnProperty(s)&&c[s]!==u[s]&&(l||(l={}),l[s]=u[s])}else l||(e||(e=[]),e.push(n,l)),l=u;else"dangerouslySetInnerHTML"===n?(u=u?u.__html:void 0,c=c?c.__html:void 0,null!=u&&c!==u&&(e=e||[]).push(n,""+u)):"children"===n?c===u||"string"!=typeof u&&"number"!=typeof u||(e=e||[]).push(n,""+u):"suppressContentEditableWarning"!==n&&"suppressHydrationWarning"!==n&&(b.hasOwnProperty(n)?(null!=u&&dr(a,n),e||c===u||(e=[])):(e=e||[]).push(n,u))}l&&(e=e||[]).push("style",l),a=e,(t.updateQueue=a)&&ta(t)}},ia=function(e,t,n,r){n!==r&&ta(t)};var ma={readContext:hi},ga=Ke.ReactCurrentOwner,va=0,ya=0,ba=!1,wa=null,_a=null,Ea=0,Sa=!1,Ta=null,ka=!1,Ca=null;function xa(){if(null!==wa)for(var e=wa.return;null!==e;){var t=e;switch(t.tag){case 2:var n=t.type.childContextTypes;null!==n&&void 0!==n&&Nr();break;case 3:null!==(n=t.type._reactResult.childContextTypes)&&void 0!==n&&Nr();break;case 5:wi(),Dr();break;case 7:Ei(t);break;case 6:wi();break;case 12:di(t)}e=e.return}_a=null,Ea=0,Sa=!1,wa=null}function Pa(e){for(;;){var t=e.alternate,n=e.return,r=e.sibling;if(0==(512&e.effectTag)){var a=t,s=(t=e).pendingProps;switch(t.tag){case 0:case 1:break;case 2:Pr(t.type)&&Nr();break;case 3:Pr(t.type._reactResult)&&Nr();break;case 5:wi(),Dr(),(s=t.stateNode).pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),null!==a&&null!==a.child||(zi(t),t.effectTag&=-3),na(t);break;case 7:Ei(t);var l=yi(vi.current),c=t.type;if(null!==a&&null!=t.stateNode)ra(a,t,c,s,l),a.ref!==t.ref&&(t.effectTag|=128);else if(s){var u=yi(mi.current);if(zi(t)){a=(s=t).stateNode;var d=s.type,p=s.memoizedProps,h=l;switch(a[R]=s,a[U]=p,c=void 0,l=d){case"iframe":case"object":kn("load",a);break;case"video":case"audio":for(d=0;d<re.length;d++)kn(re[d],a);break;case"source":kn("error",a);break;case"img":case"image":case"link":kn("error",a),kn("load",a);break;case"form":kn("reset",a),kn("submit",a);break;case"details":kn("toggle",a);break;case"input":wt(a,p),kn("invalid",a),dr(h,"onChange");break;case"select":a._wrapperState={wasMultiple:!!p.multiple},kn("invalid",a),dr(h,"onChange");break;case"textarea":Yn(a,p),kn("invalid",a),dr(h,"onChange")}for(c in cr(l,p),d=null,p)p.hasOwnProperty(c)&&(u=p[c],"children"===c?"string"==typeof u?a.textContent!==u&&(d=["children",u]):"number"==typeof u&&a.textContent!==""+u&&(d=["children",""+u]):b.hasOwnProperty(c)&&null!=u&&dr(h,c));switch(l){case"input":qe(a),St(a,p,!0);break;case"textarea":qe(a),Xn(a);break;case"select":case"option":break;default:"function"==typeof p.onClick&&(a.onclick=pr)}c=d,s.updateQueue=c,(s=null!==c)&&ta(t)}else{p=t,a=c,h=s,d=9===l.nodeType?l:l.ownerDocument,u===Jn.html&&(u=Zn(a)),u===Jn.html?"script"===a?((a=d.createElement("div")).innerHTML="<script><\/script>",d=a.removeChild(a.firstChild)):"string"==typeof h.is?d=d.createElement(a,{is:h.is}):(d=d.createElement(a),"select"===a&&h.multiple&&(d.multiple=!0)):d=d.createElementNS(u,a),(a=d)[R]=p,a[U]=s;e:for(p=a,h=t,d=h.child;null!==d;){if(7===d.tag||8===d.tag)p.appendChild(d.stateNode);else if(6!==d.tag&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===h)break;for(;null===d.sibling;){if(null===d.return||d.return===h)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}h=a;var f=l,m=ur(d=c,p=s);switch(d){case"iframe":case"object":kn("load",h),l=p;break;case"video":case"audio":for(l=0;l<re.length;l++)kn(re[l],h);l=p;break;case"source":kn("error",h),l=p;break;case"img":case"image":case"link":kn("error",h),kn("load",h),l=p;break;case"form":kn("reset",h),kn("submit",h),l=p;break;case"details":kn("toggle",h),l=p;break;case"input":wt(h,p),l=bt(h,p),kn("invalid",h),dr(f,"onChange");break;case"option":l=Kn(h,p);break;case"select":h._wrapperState={wasMultiple:!!p.multiple},l=i({},p,{value:void 0}),kn("invalid",h),dr(f,"onChange");break;case"textarea":Yn(h,p),l=$n(h,p),kn("invalid",h),dr(f,"onChange");break;default:l=p}cr(d,l),u=void 0;var g=d,v=h,y=l;for(u in y)if(y.hasOwnProperty(u)){var w=y[u];"style"===u?sr(v,w):"dangerouslySetInnerHTML"===u?null!=(w=w?w.__html:void 0)&&rr(v,w):"children"===u?"string"==typeof w?("textarea"!==g||""!==w)&&ir(v,w):"number"==typeof w&&ir(v,""+w):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(b.hasOwnProperty(u)?null!=w&&dr(f,u):null!=w&&vt(v,u,w,m))}switch(d){case"input":qe(h),St(h,p,!1);break;case"textarea":qe(h),Xn(h);break;case"option":null!=p.value&&h.setAttribute("value",""+yt(p.value));break;case"select":(l=h).multiple=!!p.multiple,null!=(h=p.value)?Gn(l,!!p.multiple,h,!1):null!=p.defaultValue&&Gn(l,!!p.multiple,p.defaultValue,!0);break;default:"function"==typeof l.onClick&&(h.onclick=pr)}(s=mr(c,s))&&ta(t),t.stateNode=a}null!==t.ref&&(t.effectTag|=128)}else null===t.stateNode&&o("166");break;case 8:a&&null!=t.stateNode?ia(a,t,a.memoizedProps,s):("string"!=typeof s&&(null===t.stateNode&&o("166")),a=yi(vi.current),yi(mi.current),zi(t)?(c=(s=t).stateNode,a=s.memoizedProps,c[R]=s,(s=c.nodeValue!==a)&&ta(t)):(c=t,(s=(9===a.nodeType?a:a.ownerDocument).createTextNode(s))[R]=c,t.stateNode=s));break;case 13:case 14:case 16:case 9:case 10:case 15:break;case 6:wi(),na(t);break;case 12:di(t);break;case 11:break;case 4:o("167");default:o("156")}if(t=wa=null,s=e,1073741823===Ea||1073741823!==s.childExpirationTime){for(c=0,a=s.child;null!==a;)l=a.expirationTime,p=a.childExpirationTime,(0===c||0!==l&&l<c)&&(c=l),(0===c||0!==p&&p<c)&&(c=p),a=a.sibling;s.childExpirationTime=c}if(null!==t)return t;null!==n&&0==(512&n.effectTag)&&(null===n.firstEffect&&(n.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=e.firstEffect),n.lastEffect=e.lastEffect),1<e.effectTag&&(null!==n.lastEffect?n.lastEffect.nextEffect=e:n.firstEffect=e,n.lastEffect=e))}else{if(null!==(e=fa(e)))return e.effectTag&=511,e;null!==n&&(n.firstEffect=n.lastEffect=null,n.effectTag|=512)}if(null!==r)return r;if(null===n)break;e=n}return null}function Na(e){var t=ea(e.alternate,e,Ea);return null===t&&(t=Pa(e)),ga.current=null,t}function Da(e,t,n){ba&&o("243"),ba=!0,ga.currentDispatcher=ma;var r=e.nextExpirationTimeToWorkOn;r===Ea&&e===_a&&null!==wa||(xa(),Ea=r,wa=Wr((_a=e).current,null,Ea),e.pendingCommitExpirationTime=0);for(var i=!1;;){try{if(t)for(;null!==wa&&!ho();)wa=Na(wa);else for(;null!==wa;)wa=Na(wa)}catch(e){if(null===wa)i=!0,fo(e);else{null===wa&&o("271");var a=wa,s=a.return;if(null!==s){e:{var l=s,c=a,u=e;s=Ea,c.effectTag|=512,c.firstEffect=c.lastEffect=null,Sa=!0,u=ai(u,c);do{switch(l.tag){case 5:l.effectTag|=1024,l.expirationTime=s,Zr(l,s=pa(l,u,s));break e;case 2:case 3:c=u;var d=l.stateNode;if(0==(64&l.effectTag)&&null!==d&&"function"==typeof d.componentDidCatch&&(null===Ca||!Ca.has(d))){l.effectTag|=1024,l.expirationTime=s,Zr(l,s=ha(l,c,s));break e}}l=l.return}while(null!==l)}wa=Pa(a);continue}i=!0,fo(e)}}break}if(ba=!1,ci=li=si=ga.currentDispatcher=null,i)_a=null,e.finishedWork=null;else if(null!==wa)e.finishedWork=null;else{if(null===(t=e.current.alternate)&&o("281"),_a=null,Sa){if(i=e.latestPendingTime,a=e.latestSuspendedTime,s=e.latestPingedTime,0!==i&&i>r||0!==a&&a>r||0!==s&&s>r)return e.didError=!1,0!==(n=e.latestPingedTime)&&n<=r&&(e.latestPingedTime=0),n=e.earliestPendingTime,t=e.latestPendingTime,n===r?e.earliestPendingTime=t===r?e.latestPendingTime=0:t:t===r&&(e.latestPendingTime=n),n=e.earliestSuspendedTime,t=e.latestSuspendedTime,0===n?e.earliestSuspendedTime=e.latestSuspendedTime=r:n>r?e.earliestSuspendedTime=r:t<r&&(e.latestSuspendedTime=r),Kr(r,e),void(e.expirationTime=e.expirationTime);if(!e.didError&&!n)return e.didError=!0,e.nextExpirationTimeToWorkOn=r,r=e.expirationTime=1,void(e.expirationTime=r)}e.pendingCommitExpirationTime=r,e.finishedWork=t}}function Ma(e,t){var n;e:{for(ba&&!ka&&o("263"),n=e.return;null!==n;){switch(n.tag){case 2:case 3:var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromCatch||"function"==typeof r.componentDidCatch&&(null===Ca||!Ca.has(r))){Jr(n,e=ha(n,e=ai(t,e),1)),Ia(n,1),n=void 0;break e}break;case 5:Jr(n,e=pa(n,e=ai(t,e),1)),Ia(n,1),n=void 0;break e}n=n.return}5===e.tag&&(Jr(e,n=pa(e,n=ai(t,e),1)),Ia(e,1)),n=void 0}return n}function Aa(e,t){return 0!==ya?e=ya:ba?e=ka?1:Ea:1&t.mode?(e=Ya?2+10*(1+((e-2+15)/10|0)):2+25*(1+((e-2+500)/25|0)),null!==_a&&e===Ea&&(e+=1)):e=1,Ya&&(0===za||e>za)&&(za=e),e}function Ia(e,t){e:{(0===e.expirationTime||e.expirationTime>t)&&(e.expirationTime=t);var n=e.alternate;null!==n&&(0===n.expirationTime||n.expirationTime>t)&&(n.expirationTime=t);var r=e.return;if(null===r&&5===e.tag)e=e.stateNode;else{for(;null!==r;){if(n=r.alternate,(0===r.childExpirationTime||r.childExpirationTime>t)&&(r.childExpirationTime=t),null!==n&&(0===n.childExpirationTime||n.childExpirationTime>t)&&(n.childExpirationTime=t),null===r.return&&5===r.tag){e=r.stateNode;break e}r=r.return}e=null}}null!==e&&(!ba&&0!==Ea&&t<Ea&&xa(),Hr(e,t),ba&&!ka&&_a===e||(t=e,e=e.expirationTime,null===t.nextScheduledRoot?(t.expirationTime=e,null===Ua?(Ra=Ua=t,t.nextScheduledRoot=t):(Ua=Ua.nextScheduledRoot=t).nextScheduledRoot=Ra):(0===(n=t.expirationTime)||e<n)&&(t.expirationTime=e),ja||(Ga?$a&&(Wa=t,Ba=1,uo(t,1,!0)):1===e?co(1,null):ao(t,e))),to>eo&&(to=0,o("185")))}function Oa(e,t,n,r,i){var a=ya;ya=1;try{return e(t,n,r,i)}finally{ya=a}}var Ra=null,Ua=null,La=0,Fa=void 0,ja=!1,Wa=null,Ba=0,za=0,Va=!1,qa=!1,Ha=null,Ka=null,Ga=!1,$a=!1,Ya=!1,Qa=null,Xa=a.unstable_now(),Ja=2+(Xa/10|0),Za=Ja,eo=50,to=0,no=null,ro=1;function io(){Ja=2+((a.unstable_now()-Xa)/10|0)}function ao(e,t){if(0!==La){if(t>La)return;null!==Fa&&a.unstable_cancelScheduledWork(Fa)}La=t,e=a.unstable_now()-Xa,Fa=a.unstable_scheduleWork(lo,{timeout:10*(t-2)-e})}function oo(){return ja?Za:(so(),0!==Ba&&1073741823!==Ba||(io(),Za=Ja),Za)}function so(){var e=0,t=null;if(null!==Ua)for(var n=Ua,r=Ra;null!==r;){var i=r.expirationTime;if(0===i){if((null===n||null===Ua)&&o("244"),r===r.nextScheduledRoot){Ra=Ua=r.nextScheduledRoot=null;break}if(r===Ra)Ra=i=r.nextScheduledRoot,Ua.nextScheduledRoot=i,r.nextScheduledRoot=null;else{if(r===Ua){(Ua=n).nextScheduledRoot=Ra,r.nextScheduledRoot=null;break}n.nextScheduledRoot=r.nextScheduledRoot,r.nextScheduledRoot=null}r=n.nextScheduledRoot}else{if((0===e||i<e)&&(e=i,t=r),r===Ua)break;if(1===e)break;n=r,r=r.nextScheduledRoot}}Wa=t,Ba=e}function lo(e){if(e.didTimeout&&null!==Ra){io();var t=Ra;do{var n=t.expirationTime;0!==n&&Ja>=n&&(t.nextExpirationTimeToWorkOn=Ja),t=t.nextScheduledRoot}while(t!==Ra)}co(0,e)}function co(e,t){if(Ka=t,so(),null!==Ka)for(io(),Za=Ja;null!==Wa&&0!==Ba&&(0===e||e>=Ba)&&(!Va||Ja>=Ba);)uo(Wa,Ba,Ja>=Ba),so(),io(),Za=Ja;else for(;null!==Wa&&0!==Ba&&(0===e||e>=Ba);)uo(Wa,Ba,!0),so();if(null!==Ka&&(La=0,Fa=null),0!==Ba&&ao(Wa,Ba),Ka=null,Va=!1,to=0,no=null,null!==Qa)for(e=Qa,Qa=null,t=0;t<e.length;t++){var n=e[t];try{n._onComplete()}catch(e){qa||(qa=!0,Ha=e)}}if(qa)throw e=Ha,Ha=null,qa=!1,e}function uo(e,t,n){if(ja&&o("245"),ja=!0,null===Ka||n){var r=e.finishedWork;null!==r?po(e,r,t):(e.finishedWork=null,Da(e,!1,n),null!==(r=e.finishedWork)&&po(e,r,t))}else null!==(r=e.finishedWork)?po(e,r,t):(e.finishedWork=null,Da(e,!0,n),null!==(r=e.finishedWork)&&(ho()?e.finishedWork=r:po(e,r,t)));ja=!1}function po(e,t,n){var r=e.firstBatch;if(null!==r&&r._expirationTime<=n&&(null===Qa?Qa=[r]:Qa.push(r),r._defer))return e.finishedWork=t,void(e.expirationTime=0);e.finishedWork=null,e===no?to++:(no=e,to=0),ka=ba=!0,e.current===t&&o("177"),0===(n=e.pendingCommitExpirationTime)&&o("261"),e.pendingCommitExpirationTime=0,r=t.expirationTime;var i=t.childExpirationTime;if(r=0===r||0!==i&&i<r?i:r,e.didError=!1,0===r?(e.earliestPendingTime=0,e.latestPendingTime=0,e.earliestSuspendedTime=0,e.latestSuspendedTime=0,e.latestPingedTime=0):(0!==(i=e.latestPendingTime)&&(i<r?e.earliestPendingTime=e.latestPendingTime=0:e.earliestPendingTime<r&&(e.earliestPendingTime=e.latestPendingTime)),0===(i=e.earliestSuspendedTime)?Hr(e,r):r>e.latestSuspendedTime?(e.earliestSuspendedTime=0,e.latestSuspendedTime=0,e.latestPingedTime=0,Hr(e,r)):r<i&&Hr(e,r)),Kr(0,e),ga.current=null,1<t.effectTag?null!==t.lastEffect?(t.lastEffect.nextEffect=t,r=t.firstEffect):r=t:r=t.firstEffect,hr=Tn,Ln(i=Un())){if("selectionStart"in i)var a={start:i.selectionStart,end:i.selectionEnd};else e:{var s=(a=(a=i.ownerDocument)&&a.defaultView||window).getSelection&&a.getSelection();if(s&&0!==s.rangeCount){a=s.anchorNode;var l=s.anchorOffset,c=s.focusNode;s=s.focusOffset;try{a.nodeType,c.nodeType}catch(e){a=null;break e}var u=0,d=-1,p=-1,h=0,f=0,m=i,g=null;t:for(;;){for(var v;m!==a||0!==l&&3!==m.nodeType||(d=u+l),m!==c||0!==s&&3!==m.nodeType||(p=u+s),3===m.nodeType&&(u+=m.nodeValue.length),null!==(v=m.firstChild);)g=m,m=v;for(;;){if(m===i)break t;if(g===a&&++h===l&&(d=u),g===c&&++f===s&&(p=u),null!==(v=m.nextSibling))break;g=(m=g).parentNode}m=v}a=-1===d||-1===p?null:{start:d,end:p}}else a=null}a=a||{start:0,end:0}}else a=null;for(fr={focusedElem:i,selectionRange:a},Tn=!1,Ta=r;null!==Ta;){i=!1,a=void 0;try{for(;null!==Ta;){if(256&Ta.effectTag){var y=Ta.alternate;e:switch(l=Ta,l.tag){case 2:case 3:if(256&l.effectTag&&null!==y){var b=y.memoizedProps,w=y.memoizedState,_=l.stateNode;_.props=l.memoizedProps,_.state=l.memoizedState;var E=_.getSnapshotBeforeUpdate(b,w);_.__reactInternalSnapshotBeforeUpdate=E}break e;case 5:case 7:case 8:case 6:break e;default:o("163")}}Ta=Ta.nextEffect}}catch(e){i=!0,a=e}i&&(null===Ta&&o("178"),Ma(Ta,a),null!==Ta&&(Ta=Ta.nextEffect))}for(Ta=r;null!==Ta;){y=!1,b=void 0;try{for(;null!==Ta;){var S=Ta.effectTag;if(16&S&&ir(Ta.stateNode,""),128&S){var T=Ta.alternate;if(null!==T){var k=T.ref;null!==k&&("function"==typeof k?k(null):k.current=null)}}switch(14&S){case 2:ca(Ta),Ta.effectTag&=-3;break;case 6:ca(Ta),Ta.effectTag&=-3,da(Ta.alternate,Ta);break;case 4:da(Ta.alternate,Ta);break;case 8:ua(w=Ta),w.return=null,w.child=null,w.alternate&&(w.alternate.child=null,w.alternate.return=null)}Ta=Ta.nextEffect}}catch(e){y=!0,b=e}y&&(null===Ta&&o("178"),Ma(Ta,b),null!==Ta&&(Ta=Ta.nextEffect))}if(k=fr,T=Un(),S=k.focusedElem,b=k.selectionRange,T!==S&&S&&S.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))))}(S.ownerDocument.documentElement,S)){null!==b&&Ln(S)&&(T=b.start,void 0===(k=b.end)&&(k=T),"selectionStart"in S?(S.selectionStart=T,S.selectionEnd=Math.min(k,S.value.length)):(T=((y=S.ownerDocument||document)&&y.defaultView||window).getSelection(),w=S.textContent.length,k=Math.min(b.start,w),b=void 0===b.end?k:Math.min(b.end,w),!T.extend&&k>b&&(w=b,b=k,k=w),w=Rn(S,k),_=Rn(S,b),w&&_&&(1!==T.rangeCount||T.anchorNode!==w.node||T.anchorOffset!==w.offset||T.focusNode!==_.node||T.focusOffset!==_.offset)&&((y=y.createRange()).setStart(w.node,w.offset),T.removeAllRanges(),k>b?(T.addRange(y),T.extend(_.node,_.offset)):(y.setEnd(_.node,_.offset),T.addRange(y))))),T=[];for(k=S;k=k.parentNode;)1===k.nodeType&&T.push({element:k,left:k.scrollLeft,top:k.scrollTop});for("function"==typeof S.focus&&S.focus(),S=0;S<T.length;S++)(k=T[S]).element.scrollLeft=k.left,k.element.scrollTop=k.top}for(fr=null,Tn=!!hr,hr=null,e.current=t,Ta=r;null!==Ta;){r=!1,S=void 0;try{for(T=n;null!==Ta;){var C=Ta.effectTag;if(36&C){var x=Ta.alternate;switch(y=T,(k=Ta).tag){case 2:case 3:var P=k.stateNode;if(4&k.effectTag)if(null===x)P.props=k.memoizedProps,P.state=k.memoizedState,P.componentDidMount();else{var N=x.memoizedProps,D=x.memoizedState;P.props=k.memoizedProps,P.state=k.memoizedState,P.componentDidUpdate(N,D,P.__reactInternalSnapshotBeforeUpdate)}var M=k.updateQueue;null!==M&&(P.props=k.memoizedProps,P.state=k.memoizedState,ri(0,M,P));break;case 5:var A=k.updateQueue;if(null!==A){if(b=null,null!==k.child)switch(k.child.tag){case 7:b=k.child.stateNode;break;case 2:case 3:b=k.child.stateNode}ri(0,A,b)}break;case 7:var I=k.stateNode;null===x&&4&k.effectTag&&mr(k.type,k.memoizedProps)&&I.focus();break;case 8:case 6:case 15:case 16:break;default:o("163")}}if(128&C){var O=Ta.ref;if(null!==O){var R=Ta.stateNode;switch(Ta.tag){case 7:var U=R;break;default:U=R}"function"==typeof O?O(U):O.current=U}}var L=Ta.nextEffect;Ta.nextEffect=null,Ta=L}}catch(e){r=!0,S=e}r&&(null===Ta&&o("178"),Ma(Ta,S),null!==Ta&&(Ta=Ta.nextEffect))}ba=ka=!1,"function"==typeof Rr&&Rr(t.stateNode),C=t.expirationTime,t=t.childExpirationTime,0===(t=0===C||0!==t&&t<C?t:C)&&(Ca=null),e.expirationTime=t,e.finishedWork=null}function ho(){return!!Va||!(null===Ka||Ka.timeRemaining()>ro)&&(Va=!0)}function fo(e){null===Wa&&o("246"),Wa.expirationTime=0,qa||(qa=!0,Ha=e)}function mo(e,t){var n=Ga;Ga=!0;try{return e(t)}finally{(Ga=n)||ja||co(1,null)}}function go(e,t){if(Ga&&!$a){$a=!0;try{return e(t)}finally{$a=!1}}return e(t)}function vo(e,t,n){if(Ya)return e(t,n);Ga||ja||0===za||(co(za,null),za=0);var r=Ya,i=Ga;Ga=Ya=!0;try{return e(t,n)}finally{Ya=r,(Ga=i)||ja||co(1,null)}}function yo(e,t,n,r,i){var a=t.current;return n=function(e){if(!e)return Sr;e=e._reactInternalFiber;e:{(2!==tn(e)||2!==e.tag&&3!==e.tag)&&o("170");var t=e;do{switch(t.tag){case 5:t=t.stateNode.context;break e;case 2:if(Pr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}break;case 3:if(Pr(t.type._reactResult)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);o("171"),t=void 0}if(2===e.tag){var n=e.type;if(Pr(n))return Ar(e,n,t)}else if(3===e.tag&&Pr(n=e.type._reactResult))return Ar(e,n,t);return t}(n),null===t.context?t.context=n:t.pendingContext=n,t=i,(i=Qr(r)).payload={element:e},null!==(t=void 0===t?null:t)&&(i.callback=t),Jr(a,i),Ia(a,r),r}function bo(e,t,n,r){var i=t.current;return yo(e,t,n,i=Aa(oo(),i),r)}function wo(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 7:default:return e.child.stateNode}}function _o(e){var t=2+25*(1+((oo()-2+500)/25|0));t<=va&&(t=va+1),this._expirationTime=va=t,this._root=e,this._callbacks=this._next=null,this._hasChildren=this._didComplete=!1,this._children=null,this._defer=!0}function Eo(){this._callbacks=null,this._didCommit=!1,this._onCommit=this._onCommit.bind(this)}function So(e,t,n){e={current:t=new Fr(5,null,null,t?3:0),containerInfo:e,pendingChildren:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,didError:!1,pendingCommitExpirationTime:0,finishedWork:null,timeoutHandle:-1,context:null,pendingContext:null,hydrate:n,nextExpirationTimeToWorkOn:0,expirationTime:0,firstBatch:null,nextScheduledRoot:null},this._internalRoot=t.stateNode=e}function To(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function ko(e,t,n,r,i){To(n)||o("200");var a=n._reactRootContainer;if(a){if("function"==typeof i){var s=i;i=function(){var e=wo(a._internalRoot);s.call(e)}}null!=e?a.legacy_renderSubtreeIntoContainer(e,t,i):a.render(t,i)}else{if(a=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 So(e,!1,t)}(n,r),"function"==typeof i){var l=i;i=function(){var e=wo(a._internalRoot);l.call(e)}}go(function(){null!=e?a.legacy_renderSubtreeIntoContainer(e,t,i):a.render(t,i)})}return wo(a._internalRoot)}function Co(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;return To(t)||o("200"),function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Qe,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)}Pe=function(e,t,n){switch(t){case"input":if(Et(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 i=W(r);i||o("90"),He(r),Et(r,i)}}}break;case"textarea":Qn(e,n);break;case"select":null!=(t=n.value)&&Gn(e,!!n.multiple,t,!1)}},_o.prototype.render=function(e){this._defer||o("250"),this._hasChildren=!0,this._children=e;var t=this._root._internalRoot,n=this._expirationTime,r=new Eo;return yo(e,t,null,n,r._onCommit),r},_o.prototype.then=function(e){if(this._didComplete)e();else{var t=this._callbacks;null===t&&(t=this._callbacks=[]),t.push(e)}},_o.prototype.commit=function(){var e=this._root._internalRoot,t=e.firstBatch;if(this._defer&&null!==t||o("251"),this._hasChildren){var n=this._expirationTime;if(t!==this){this._hasChildren&&(n=this._expirationTime=t._expirationTime,this.render(this._children));for(var r=null,i=t;i!==this;)r=i,i=i._next;null===r&&o("251"),r._next=i._next,this._next=t,e.firstBatch=this}this._defer=!1,t=n,ja&&o("253"),Wa=e,Ba=t,uo(e,t,!0),co(1,null),t=this._next,this._next=null,null!==(t=e.firstBatch=t)&&t._hasChildren&&t.render(t._children)}else this._next=null,this._defer=!1},_o.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])()}},Eo.prototype.then=function(e){if(this._didCommit)e();else{var t=this._callbacks;null===t&&(t=this._callbacks=[]),t.push(e)}},Eo.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];"function"!=typeof n&&o("191",n),n()}}},So.prototype.render=function(e,t){var n=this._internalRoot,r=new Eo;return null!==(t=void 0===t?null:t)&&r.then(t),bo(e,n,null,r._onCommit),r},So.prototype.unmount=function(e){var t=this._internalRoot,n=new Eo;return null!==(e=void 0===e?null:e)&&n.then(e),bo(null,t,null,n._onCommit),n},So.prototype.legacy_renderSubtreeIntoContainer=function(e,t,n){var r=this._internalRoot,i=new Eo;return null!==(n=void 0===n?null:n)&&i.then(n),bo(t,r,e,i._onCommit),i},So.prototype.createBatch=function(){var e=new _o(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},Oe=mo,Re=vo,Ue=function(){ja||0===za||(co(za,null),za=0)};var xo={createPortal:Co,findDOMNode:function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternalFiber;return void 0===t&&("function"==typeof e.render?o("188"):o("268",Object.keys(e))),e=null===(e=rn(t))?null:e.stateNode},hydrate:function(e,t,n){return ko(null,e,t,!0,n)},render:function(e,t,n){return ko(null,e,t,!1,n)},unstable_renderSubtreeIntoContainer:function(e,t,n,r){return(null==e||void 0===e._reactInternalFiber)&&o("38"),ko(e,t,n,!1,r)},unmountComponentAtNode:function(e){return To(e)||o("40"),!!e._reactRootContainer&&(go(function(){ko(null,null,e,!1,function(){e._reactRootContainer=null})}),!0)},unstable_createPortal:function(){return Co.apply(void 0,arguments)},unstable_batchedUpdates:mo,unstable_interactiveUpdates:vo,flushSync:function(e,t){ja&&o("187");var n=Ga;Ga=!0;try{return Oa(e,t)}finally{Ga=n,co(1,null)}},unstable_flushControlled:function(e){var t=Ga;Ga=!0;try{Oa(e)}finally{(Ga=t)||ja||co(1,null)}},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{Events:[F,j,W,M.injectEventPluginsByName,y,K,function(e){C(e,H)},Ae,Ie,Pn,I]},unstable_createRoot:function(e,t){return To(e)||o("278"),new So(e,!0,null!=t&&!0===t.hydrate)}};!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);Rr=Lr(function(e){return t.onCommitFiberRoot(n,e)}),Ur=Lr(function(e){return t.onCommitFiberUnmount(n,e)})}catch(e){}})(i({},e,{findHostInstanceByFiber:function(e){return null===(e=rn(e))?null:e.stateNode},findFiberByHostInstance:function(e){return t?t(e):null}}))}({findFiberByHostInstance:L,bundleType:0,version:"16.5.2",rendererPackageName:"react-dom"});var Po={default:xo},No=Po&&xo||Po;t.exports=No.default||No},{"object-assign":7,react:15,schedule:20}],12:[function(e,t,n){(function(n){"use strict";"production"===n.env.NODE_ENV?(!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){if("production"!==n.env.NODE_ENV)throw new Error("^_^");try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),t.exports=e("./cjs/react-dom.production.min.js")):t.exports=e("./cjs/react-dom.development.js")}).call(this,e("_process"))},{"./cjs/react-dom.development.js":10,"./cjs/react-dom.production.min.js":11,_process:28}],13:[function(e,t,n){(function(n){"use strict";"production"!==n.env.NODE_ENV&&function(){var n=e("object-assign"),r=e("prop-types/checkPropTypes"),i="function"==typeof Symbol&&Symbol.for,a=i?Symbol.for("react.element"):60103,o=i?Symbol.for("react.portal"):60106,s=i?Symbol.for("react.fragment"):60107,l=i?Symbol.for("react.strict_mode"):60108,c=i?Symbol.for("react.profiler"):60114,u=i?Symbol.for("react.provider"):60109,d=i?Symbol.for("react.context"):60110,p=i?Symbol.for("react.async_mode"):60111,h=i?Symbol.for("react.forward_ref"):60112,f=i?Symbol.for("react.placeholder"):60113,m="function"==typeof Symbol&&Symbol.iterator,g="@@iterator";function v(e){if(null===e||"object"!=typeof e)return null;var t=m&&e[m]||e[g];return"function"==typeof t?t:null}var y=function(){};function b(e,t,n,r,i,a,o,s){if(y(t),!e){var l=void 0;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,a,o,s],u=0;(l=new Error(t.replace(/%s/g,function(){return c[u++]}))).name="Invariant Violation"}throw l.framesToPop=1,l}}y=function(e){if(void 0===e)throw new Error("invariant requires an error message argument")};var w=function(e,t){if(void 0===t)throw new Error("`lowPriorityWarning(condition, format, ...args)` requires a warning message argument");if(!e){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];(function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=0,a="Warning: "+e.replace(/%s/g,function(){return n[i++]});"undefined"!=typeof console&&console.warn(a);try{throw new Error(a)}catch(e){}}).apply(void 0,[t].concat(r))}},_=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if(void 0===t)throw new Error("`warningWithoutStack(condition, format, ...args)` requires a warning message argument");if(r.length>8)throw new Error("warningWithoutStack() currently supports at most 8 arguments.");if(!e){if("undefined"!=typeof console){var a=r.map(function(e){return""+e}),o=a[0],s=a[1],l=a[2],c=a[3],u=a[4],d=a[5],p=a[6],h=a[7],f="Warning: "+t;switch(r.length){case 0:console.error(f);break;case 1:console.error(f,o);break;case 2:console.error(f,o,s);break;case 3:console.error(f,o,s,l);break;case 4:console.error(f,o,s,l,c);break;case 5:console.error(f,o,s,l,c,u);break;case 6:console.error(f,o,s,l,c,u,d);break;case 7:console.error(f,o,s,l,c,u,d,p);break;case 8:console.error(f,o,s,l,c,u,d,p,h);break;default:throw new Error("warningWithoutStack() currently supports at most 8 arguments.")}}try{var m=0,g="Warning: "+t.replace(/%s/g,function(){return r[m++]});throw new Error(g)}catch(e){}}},E={};function S(e,t){var n=e.constructor,r=n&&(n.displayName||n.name)||"ReactClass",i=r+"."+t;E[i]||(_(!1,"Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",t,r),E[i]=!0)}var T={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,n){S(e,"forceUpdate")},enqueueReplaceState:function(e,t,n,r){S(e,"replaceState")},enqueueSetState:function(e,t,n,r){S(e,"setState")}},k={};function C(e,t,n){this.props=e,this.context=t,this.refs=k,this.updater=n||T}Object.freeze(k),C.prototype.isReactComponent={},C.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&b(!1,"setState(...): takes an object of state variables to update or a function which returns an object of state variables."),this.updater.enqueueSetState(this,e,t,"setState")},C.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var x={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},P=function(e,t){Object.defineProperty(C.prototype,e,{get:function(){w(!1,"%s(...) is deprecated in plain JavaScript React classes. %s",t[0],t[1])}})};for(var N in x)x.hasOwnProperty(N)&&P(N,x[N]);function D(){}function M(e,t,n){this.props=e,this.context=t,this.refs=k,this.updater=n||T}D.prototype=C.prototype;var A=M.prototype=new D;A.constructor=M,n(A,C.prototype),A.isPureReactComponent=!0;var I={current:null,currentDispatcher:null},O=/^(.*)[\\\/]/,R=1;function U(e){if(null==e)return null;if("number"==typeof e.tag&&_(!1,"Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case p:return"AsyncMode";case s:return"Fragment";case o:return"Portal";case c:return"Profiler";case l:return"StrictMode";case f:return"Placeholder"}if("object"==typeof e){switch(e.$$typeof){case d:return"Context.Consumer";case u:return"Context.Provider";case h:var t=e.render,n=t.displayName||t.name||"";return e.displayName||(""!==n?"ForwardRef("+n+")":"ForwardRef")}if("function"==typeof e.then){var r=function(e){return e._reactStatus===R?e._reactResult:null}(e);if(r)return U(r)}}return null}var L={},F=null;function j(e){F=e}L.getCurrentStack=null,L.getStackAddendum=function(){var e="";if(F){var t=U(F.type),n=F._owner;e+=function(e,t,n){var r="";if(t){var i=t.fileName,a=i.replace(O,"");if(/^index\./.test(a)){var o=i.match(O);if(o){var s=o[1];s&&(a=s.replace(O,"")+"/"+a)}}r=" (at "+a+":"+t.lineNumber+")"}else n&&(r=" (created by "+n+")");return"\n in "+(e||"Unknown")+r}(t,F._source,n&&U(n.type))}var r=L.getCurrentStack;return r&&(e+=r()||""),e};var W={ReactCurrentOwner:I,assign:n};n(W,{ReactDebugCurrentFrame:L,ReactComponentTreeHook:{}});var B=function(e,t){if(!e){for(var n=W.ReactDebugCurrentFrame.getStackAddendum(),r=arguments.length,i=Array(r>2?r-2:0),a=2;a<r;a++)i[a-2]=arguments[a];_.apply(void 0,[!1,t+"%s"].concat(i,[n]))}},z=Object.prototype.hasOwnProperty,V={key:!0,ref:!0,__self:!0,__source:!0},q=void 0,H=void 0;function K(e){if(z.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}function G(e){if(z.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}var $=function(e,t,n,r,i,o,s){var l={$$typeof:a,type:e,key:t,ref:n,props:s,_owner:o,_store:{}};return Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(l,"_self",{configurable:!1,enumerable:!1,writable:!1,value:r}),Object.defineProperty(l,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l};function Y(e,t,n){var r=void 0,i={},a=null,o=null,s=null,l=null;if(null!=t)for(r in K(t)&&(o=t.ref),G(t)&&(a=""+t.key),s=void 0===t.__self?null:t.__self,l=void 0===t.__source?null:t.__source,t)z.call(t,r)&&!V.hasOwnProperty(r)&&(i[r]=t[r]);var c=arguments.length-2;if(1===c)i.children=n;else if(c>1){for(var u=Array(c),d=0;d<c;d++)u[d]=arguments[d+2];Object.freeze&&Object.freeze(u),i.children=u}if(e&&e.defaultProps){var p=e.defaultProps;for(r in p)void 0===i[r]&&(i[r]=p[r])}if(a||o){var h="function"==typeof e?e.displayName||e.name||"Unknown":e;a&&function(e,t){var n=function(){q||(q=!0,_(!1,"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(i,h),o&&function(e,t){var n=function(){H||(H=!0,_(!1,"%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}(i,h)}return $(e,a,o,s,l,I.current,i)}function Q(e){return"object"==typeof e&&null!==e&&e.$$typeof===a}var X=".",J=":";var Z=!1,ee=/\/+/g;function te(e){return(""+e).replace(ee,"$&/")}var ne=10,re=[];function ie(e,t,n,r){if(re.length){var i=re.pop();return i.result=e,i.keyPrefix=t,i.func=n,i.context=r,i.count=0,i}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function ae(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,re.length<ne&&re.push(e)}function oe(e,t,n){return null==e?0:function e(t,n,r,i){var s=typeof t;"undefined"!==s&&"boolean"!==s||(t=null);var l=!1;if(null===t)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(t.$$typeof){case a:case o:l=!0}}if(l)return r(i,t,""===n?X+se(t,0):n),1;var c=void 0,u=0,d=""===n?X:n+J;if(Array.isArray(t))for(var p=0;p<t.length;p++)u+=e(c=t[p],d+se(c,p),r,i);else{var h=v(t);if("function"==typeof h){h===t.entries&&(Z||B(!1,"Using Maps as children is unsupported and will likely yield unexpected results. Convert it to a sequence/iterable of keyed ReactElements instead."),Z=!0);for(var f=h.call(t),m=void 0,g=0;!(m=f.next()).done;)u+=e(c=m.value,d+se(c,g++),r,i)}else if("object"===s){var y;y=" If you meant to render a collection of children, use an array instead."+L.getStackAddendum();var w=""+t;b(!1,"Objects are not valid as a React child (found: %s).%s","[object Object]"===w?"object with keys {"+Object.keys(t).join(", ")+"}":w,y)}}return u}(e,"",t,n)}function se(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(n=e.key,r={"=":"=0",":":"=2"},"$"+(""+n).replace(/[=:]/g,function(e){return r[e]})):t.toString(36);var n,r}function le(e,t,n){var r=e.func,i=e.context;r.call(i,t,e.count++)}function ce(e,t,n){var r,i,a=e.result,o=e.keyPrefix,s=e.func,l=e.context,c=s.call(l,t,e.count++);Array.isArray(c)?ue(c,a,n,function(e){return e}):null!=c&&(Q(c)&&(r=c,i=o+(!c.key||t&&t.key===c.key?"":te(c.key)+"/")+n,c=$(r.type,i,r.ref,r._self,r._source,r._owner,r.props)),a.push(c))}function ue(e,t,n,r,i){var a="";null!=n&&(a=te(n)+"/");var o=ie(t,a,r,i);oe(e,ce,o),ae(o)}var de=void 0;function pe(){if(I.current){var e=U(I.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}de=!1;var he={};function fe(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=pe();if(!t){var n="string"==typeof e?e:e.displayName||e.name;n&&(t="\n\nCheck the top-level render call using <"+n+">.")}return t}(t);if(!he[n]){he[n]=!0;var r="";e&&e._owner&&e._owner!==I.current&&(r=" It was passed a child from "+U(e._owner.type)+"."),j(e),B(!1,'Each child in an array or iterator should have a unique "key" prop.%s%s See https://fb.me/react-warning-keys for more information.',n,r),j(null)}}}function me(e,t){if("object"==typeof e)if(Array.isArray(e))for(var n=0;n<e.length;n++){var r=e[n];Q(r)&&fe(r,t)}else if(Q(e))e._store&&(e._store.validated=!0);else if(e){var i=v(e);if("function"==typeof i&&i!==e.entries)for(var a=i.call(e),o=void 0;!(o=a.next()).done;)Q(o.value)&&fe(o.value,t)}}function ge(e){var t=e.type,n=void 0,i=void 0;if("function"==typeof t)n=t.displayName||t.name,i=t.propTypes;else{if("object"!=typeof t||null===t||t.$$typeof!==h)return;var a=t.render.displayName||t.render.name||"";n=t.displayName||(""!==a?"ForwardRef("+a+")":"ForwardRef"),i=t.propTypes}i?(j(e),r(i,e.props,"prop",n,L.getStackAddendum),j(null)):void 0===t.PropTypes||de||(de=!0,_(!1,"Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",n||"Unknown")),"function"==typeof t.getDefaultProps&&(t.getDefaultProps.isReactClassApproved||_(!1,"getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."))}function ve(e,t,n){var r=function(e){return"string"==typeof e||"function"==typeof e||e===s||e===p||e===c||e===l||e===f||"object"==typeof e&&null!==e&&("function"==typeof e.then||e.$$typeof===u||e.$$typeof===d||e.$$typeof===h)}(e);if(!r){var i="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(i+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var o=function(e){if(null!==e&&void 0!==e&&void 0!==e.__source){var t=e.__source;return"\n\nCheck your code at "+t.fileName.replace(/^.*[\\\/]/,"")+":"+t.lineNumber+"."}return""}(t);i+=o||pe();var m=void 0;null===e?m="null":Array.isArray(e)?m="array":void 0!==e&&e.$$typeof===a?(m="<"+(U(e.type)||"Unknown")+" />",i=" Did you accidentally export a JSX literal instead of a component?"):m=typeof e,B(!1,"React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",m,i)}var g=Y.apply(this,arguments);if(null==g)return g;if(r)for(var v=2;v<arguments.length;v++)me(arguments[v],e);return e===s?function(e){j(e);for(var t=Object.keys(e.props),n=0;n<t.length;n++){var r=t[n];if("children"!==r&&"key"!==r){B(!1,"Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r);break}}null!==e.ref&&B(!1,"Invalid attribute `ref` supplied to `React.Fragment`."),j(null)}(g):ge(g),g}var ye={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return ue(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;var r=ie(null,null,t,n);oe(e,le,r),ae(r)},count:function(e){return oe(e,function(){return null},null)},toArray:function(e){var t=[];return ue(e,t,null,function(e){return e}),t},only:function(e){return Q(e)||b(!1,"React.Children.only expected to receive a single React element child."),e}},createRef:function(){var e={current:null};return Object.seal(e),e},Component:C,PureComponent:M,createContext:function(e,t){void 0===t?t=null:null!==t&&"function"!=typeof t&&_(!1,"createContext: Expected the optional second argument to be a function. Instead received: %s",t);var n={$$typeof:d,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,Provider:null,Consumer:null,unstable_read:null};return n.Provider={$$typeof:u,_context:n},n.Consumer=n,n.unstable_read=function(e,t){var n=I.currentDispatcher;return null===n&&b(!1,"Context.unstable_read(): Context can only be read while React is rendering, e.g. inside the render method or getDerivedStateFromProps."),n.readContext(e,t)}.bind(null,n),n._currentRenderer=null,n._currentRenderer2=null,n},forwardRef:function(e){return"function"!=typeof e?_(!1,"forwardRef requires a render function but was given %s.",null===e?"null":typeof e):0!==e.length&&2!==e.length&&_(!1,"forwardRef render functions accept exactly two parameters: props and ref. %s",1===e.length?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),null!=e&&(null!=e.defaultProps||null!=e.propTypes)&&_(!1,"forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"),{$$typeof:h,render:e}},Fragment:s,StrictMode:l,unstable_AsyncMode:p,unstable_Profiler:c,createElement:ve,cloneElement:function(e,t,r){for(var i=function(e,t,r){(null===e||void 0===e)&&b(!1,"React.cloneElement(...): The argument must be a React element, but you passed %s.",e);var i=void 0,a=n({},e.props),o=e.key,s=e.ref,l=e._self,c=e._source,u=e._owner;if(null!=t){K(t)&&(s=t.ref,u=I.current),G(t)&&(o=""+t.key);var d=void 0;for(i in e.type&&e.type.defaultProps&&(d=e.type.defaultProps),t)z.call(t,i)&&!V.hasOwnProperty(i)&&(void 0===t[i]&&void 0!==d?a[i]=d[i]:a[i]=t[i])}var p=arguments.length-2;if(1===p)a.children=r;else if(p>1){for(var h=Array(p),f=0;f<p;f++)h[f]=arguments[f+2];a.children=h}return $(e.type,o,s,l,c,u,a)}.apply(this,arguments),a=2;a<arguments.length;a++)me(arguments[a],i.type);return ge(i),i},createFactory:function(e){var t=ve.bind(null,e);return t.type=e,Object.defineProperty(t,"type",{enumerable:!1,get:function(){return w(!1,"Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:e}),e}}),t},isValidElement:Q,version:"16.5.2",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:W};var be=Object.freeze({default:ye}),we=be&&ye||be,_e=we.default||we;t.exports=_e}()}).call(this,e("_process"))},{_process:28,"object-assign":7,"prop-types/checkPropTypes":8}],14:[function(e,t,n){"use strict";var r=e("object-assign"),i="function"==typeof Symbol&&Symbol.for,a=i?Symbol.for("react.element"):60103,o=i?Symbol.for("react.portal"):60106,s=i?Symbol.for("react.fragment"):60107,l=i?Symbol.for("react.strict_mode"):60108,c=i?Symbol.for("react.profiler"):60114,u=i?Symbol.for("react.provider"):60109,d=i?Symbol.for("react.context"):60110,p=i?Symbol.for("react.async_mode"):60111,h=i?Symbol.for("react.forward_ref"):60112;i&&Symbol.for("react.placeholder");var f="function"==typeof Symbol&&Symbol.iterator;function m(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);!function(e,t,n,r,i,a,o,s){if(!e){if(e=void 0,void 0===t)e=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,a,o,s],c=0;(e=Error(t.replace(/%s/g,function(){return l[c++]}))).name="Invariant Violation"}throw e.framesToPop=1,e}}(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}function b(){}function w(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&m("85"),this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},b.prototype=y.prototype;var _=w.prototype=new b;_.constructor=w,r(_,y.prototype),_.isPureReactComponent=!0;var E={current:null,currentDispatcher:null},S=Object.prototype.hasOwnProperty,T={key:!0,ref:!0,__self:!0,__source:!0};function k(e,t,n){var r=void 0,i={},o=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(o=""+t.key),t)S.call(t,r)&&!T.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(1===l)i.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===i[r]&&(i[r]=l[r]);return{$$typeof:a,type:e,key:o,ref:s,props:i,_owner:E.current}}function C(e){return"object"==typeof e&&null!==e&&e.$$typeof===a}var x=/\/+/g,P=[];function N(e,t,n,r){if(P.length){var i=P.pop();return i.result=e,i.keyPrefix=t,i.func=n,i.context=r,i.count=0,i}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function D(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,i){var s=typeof t;"undefined"!==s&&"boolean"!==s||(t=null);var l=!1;if(null===t)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(t.$$typeof){case a:case o:l=!0}}if(l)return r(i,t,""===n?"."+A(t,0):n),1;if(l=0,n=""===n?".":n+":",Array.isArray(t))for(var c=0;c<t.length;c++){var u=n+A(s=t[c],c);l+=e(s,u,r,i)}else if(u=null===t||"object"!=typeof t?null:"function"==typeof(u=f&&t[f]||t["@@iterator"])?u:null,"function"==typeof u)for(t=u.call(t),c=0;!(s=t.next()).done;)l+=e(s=s.value,u=n+A(s,c++),r,i);else"object"===s&&m("31","[object Object]"==(r=""+t)?"object with keys {"+Object.keys(t).join(", ")+"}":r,"");return l}(e,"",t,n)}function A(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 I(e,t){e.func.call(e.context,t,e.count++)}function O(e,t,n){var r=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?R(e,r,n,function(e){return e}):null!=e&&(C(e)&&(e=function(e,t){return{$$typeof:a,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,i+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(x,"$&/")+"/")+n)),r.push(e))}function R(e,t,n,r,i){var a="";null!=n&&(a=(""+n).replace(x,"$&/")+"/"),M(e,O,t=N(t,a,r,i)),D(t)}var U={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return R(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;M(e,I,t=N(null,null,t,n)),D(t)},count:function(e){return M(e,function(){return null},null)},toArray:function(e){var t=[];return R(e,t,null,function(e){return e}),t},only:function(e){return C(e)||m("143"),e}},createRef:function(){return{current:null}},Component:y,PureComponent:w,createContext:function(e,t){return void 0===t&&(t=null),(e={$$typeof:d,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,Provider:null,Consumer:null,unstable_read:null}).Provider={$$typeof:u,_context:e},e.Consumer=e,e.unstable_read=function(e,t){var n=E.currentDispatcher;return null===n&&m("277"),n.readContext(e,t)}.bind(null,e),e},forwardRef:function(e){return{$$typeof:h,render:e}},Fragment:s,StrictMode:l,unstable_AsyncMode:p,unstable_Profiler:c,createElement:k,cloneElement:function(e,t,n){(null===e||void 0===e)&&m("267",e);var i=void 0,o=r({},e.props),s=e.key,l=e.ref,c=e._owner;if(null!=t){void 0!==t.ref&&(l=t.ref,c=E.current),void 0!==t.key&&(s=""+t.key);var u=void 0;for(i in e.type&&e.type.defaultProps&&(u=e.type.defaultProps),t)S.call(t,i)&&!T.hasOwnProperty(i)&&(o[i]=void 0===t[i]&&void 0!==u?u[i]:t[i])}if(1===(i=arguments.length-2))o.children=n;else if(1<i){u=Array(i);for(var d=0;d<i;d++)u[d]=arguments[d+2];o.children=u}return{$$typeof:a,type:e.type,key:s,ref:l,props:o,_owner:c}},createFactory:function(e){var t=k.bind(null,e);return t.type=e,t},isValidElement:C,version:"16.5.2",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:E,assign:r}},L={default:U},F=L&&U||L;t.exports=F.default||F},{"object-assign":7}],15:[function(e,t,n){(function(n){"use strict";"production"===n.env.NODE_ENV?t.exports=e("./cjs/react.production.min.js"):t.exports=e("./cjs/react.development.js")}).call(this,e("_process"))},{"./cjs/react.development.js":13,"./cjs/react.production.min.js":14,_process:28}],16:[function(e,t,n){(function(e){"use strict";"production"!==e.env.NODE_ENV&&function(){Object.defineProperty(n,"__esModule",{value:!0});var e=!0,t=0,r=0,i=0;n.__interactionsRef=null,n.__subscriberRef=null,e&&(n.__interactionsRef={current:new Set},n.__subscriberRef={current:null});var a=null;function o(e){var t=!1,n=null;if(a.forEach(function(r){try{r.onInteractionTraced(e)}catch(e){t||(t=!0,n=e)}}),t)throw n}function s(e){var t=!1,n=null;if(a.forEach(function(r){try{r.onInteractionScheduledWorkCompleted(e)}catch(e){t||(t=!0,n=e)}}),t)throw n}function l(e,t){var n=!1,r=null;if(a.forEach(function(i){try{i.onWorkScheduled(e,t)}catch(e){n||(n=!0,r=e)}}),n)throw r}function c(e,t){var n=!1,r=null;if(a.forEach(function(i){try{i.onWorkStarted(e,t)}catch(e){n||(n=!0,r=e)}}),n)throw r}function u(e,t){var n=!1,r=null;if(a.forEach(function(i){try{i.onWorkStopped(e,t)}catch(e){n||(n=!0,r=e)}}),n)throw r}function d(e,t){var n=!1,r=null;if(a.forEach(function(i){try{i.onWorkCanceled(e,t)}catch(e){n||(n=!0,r=e)}}),n)throw r}e&&(a=new Set),n.unstable_clear=function(t){if(!e)return t();var r=n.__interactionsRef.current;n.__interactionsRef.current=new Set;try{return t()}finally{n.__interactionsRef.current=r}},n.unstable_getCurrent=function(){return e?n.__interactionsRef.current:null},n.unstable_getThreadID=function(){return++i},n.unstable_trace=function(i,a,o){var s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t;if(!e)return o();var l={__count:1,id:r++,name:i,timestamp:a},c=n.__interactionsRef.current,u=new Set(c);u.add(l),n.__interactionsRef.current=u;var d=n.__subscriberRef.current,p=void 0;try{null!==d&&d.onInteractionTraced(l)}finally{try{null!==d&&d.onWorkStarted(u,s)}finally{try{p=o()}finally{n.__interactionsRef.current=c;try{null!==d&&d.onWorkStopped(u,s)}finally{l.__count--,null!==d&&0===l.__count&&d.onInteractionScheduledWorkCompleted(l)}}}}return p},n.unstable_wrap=function(r){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;if(!e)return r;var a=n.__interactionsRef.current,o=n.__subscriberRef.current;null!==o&&o.onWorkScheduled(a,i),a.forEach(function(e){e.__count++});var s=!1;function l(){var e=n.__interactionsRef.current;n.__interactionsRef.current=a,o=n.__subscriberRef.current;try{var t=void 0;try{null!==o&&o.onWorkStarted(a,i)}finally{try{t=r.apply(void 0,arguments)}finally{n.__interactionsRef.current=e,null!==o&&o.onWorkStopped(a,i)}}return t}finally{s||(s=!0,a.forEach(function(e){e.__count--,null!==o&&0===e.__count&&o.onInteractionScheduledWorkCompleted(e)}))}}return l.cancel=function(){o=n.__subscriberRef.current;try{null!==o&&o.onWorkCanceled(a,i)}finally{a.forEach(function(e){e.__count--,o&&0===e.__count&&o.onInteractionScheduledWorkCompleted(e)})}},l},n.unstable_subscribe=function(t){e&&(a.add(t),1===a.size&&(n.__subscriberRef.current={onInteractionScheduledWorkCompleted:s,onInteractionTraced:o,onWorkCanceled:d,onWorkScheduled:l,onWorkStarted:c,onWorkStopped:u}))},n.unstable_unsubscribe=function(t){e&&(a.delete(t),0===a.size&&(n.__subscriberRef.current=null))}}()}).call(this,e("_process"))},{_process:28}],17:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=0;n.__interactionsRef=null,n.__subscriberRef=null,n.unstable_clear=function(e){return e()},n.unstable_getCurrent=function(){return null},n.unstable_getThreadID=function(){return++r},n.unstable_trace=function(e,t,n){return n()},n.unstable_wrap=function(e){return e},n.unstable_subscribe=function(){},n.unstable_unsubscribe=function(){}},{}],18:[function(e,t,n){(function(e){"use strict";"production"!==e.env.NODE_ENV&&function(){Object.defineProperty(n,"__esModule",{value:!0});var e=5e3,t=null,r=!1,i=!1,a="object"==typeof performance&&"function"==typeof performance.now,o={timeRemaining:a?function(){var e=f()-performance.now();return e>0?e:0}:function(){var e=f()-Date.now();return e>0?e:0},didTimeout:!1};function s(){if(!r){var e=t.timesOutAt;i?h():i=!0,p(c,e)}}function l(e){var n=t,r=t.next;if(t===r)t=null,r=null;else{var i=t.previous;t=i.next=r,r.previous=i}n.next=n.previous=null,(0,n.callback)(o)}function c(e){r=!0,o.didTimeout=e;try{if(e)for(;null!==t;){var a=n.unstable_now();if(!(t.timesOutAt<=a))break;do{l()}while(null!==t&&t.timesOutAt<=a)}else if(null!==t)do{l()}while(null!==t&&f()-n.unstable_now()>0)}finally{r=!1,null!==t?s():i=!1}}var u,d,p,h,f,m=Date,g="function"==typeof setTimeout?setTimeout:void 0,v="function"==typeof clearTimeout?clearTimeout:void 0,y="function"==typeof requestAnimationFrame?requestAnimationFrame:void 0,b="function"==typeof cancelAnimationFrame?cancelAnimationFrame:void 0,w=function(e){u=y(function(t){v(d),e(t)}),d=g(function(){b(u),e(n.unstable_now())},100)};if(a){var _=performance;n.unstable_now=function(){return _.now()}}else n.unstable_now=function(){return m.now()};if("undefined"==typeof window){var E=-1;p=function(e,t){E=setTimeout(e,0,!0)},h=function(){clearTimeout(E)},f=function(){return 0}}else if(window._schedMock){var S=window._schedMock;p=S[0],h=S[1],f=S[2]}else{"undefined"!=typeof console&&("function"!=typeof y&&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 b&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"));var T=null,k=!1,C=-1,x=!1,P=!1,N=0,D=33,M=33;f=function(){return N};var A="__reactIdleCallback$"+Math.random().toString(36).slice(2);window.addEventListener("message",function(e){if(e.source===window&&e.data===A){k=!1;var t=n.unstable_now(),r=!1;if(N-t<=0){if(!(-1!==C&&C<=t))return void(x||(x=!0,w(I)));r=!0}C=-1;var i=T;if(T=null,null!==i){P=!0;try{i(r)}finally{P=!1}}}},!1);var I=function(e){x=!1;var t=e-N+M;t<M&&D<M?(t<8&&(t=8),M=t<D?D:t):D=t,N=e+M,k||(k=!0,window.postMessage(A,"*"))};p=function(e,t){T=e,C=t,P?window.postMessage(A,"*"):x||(x=!0,w(I))},h=function(){T=null,k=!1,C=-1}}n.unstable_scheduleWork=function(r,i){var a,o=n.unstable_now(),l={callback:r,timesOutAt:a=void 0!==i&&null!==i&&null!==i.timeout&&void 0!==i.timeout?o+i.timeout:o+e,next:null,previous:null};if(null===t)t=l.next=l.previous=l,s();else{var c=null,u=t;do{if(u.timesOutAt>a){c=u;break}u=u.next}while(u!==t);null===c?c=t:c===t&&(t=l,s());var d=c.previous;d.next=c.previous=l,l.next=c,l.previous=d}return l},n.unstable_cancelScheduledWork=function(e){var n=e.next;if(null!==n){if(n===e)t=null;else{e===t&&(t=n);var r=e.previous;r.next=n,n.previous=r}e.next=e.previous=null}}}()}).call(this,e("_process"))},{_process:28}],19:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=null,i=!1,a=!1,o="object"==typeof performance&&"function"==typeof performance.now,s={timeRemaining:o?function(){var e=m()-performance.now();return 0<e?e:0}:function(){var e=m()-Date.now();return 0<e?e:0},didTimeout:!1};function l(){if(!i){var e=r.timesOutAt;a?f():a=!0,h(u,e)}}function c(){var e=r,t=r.next;if(r===t)r=null;else{var n=r.previous;r=n.next=t,t.previous=n}e.next=e.previous=null,(e=e.callback)(s)}function u(e){i=!0,s.didTimeout=e;try{if(e)for(;null!==r;){var t=n.unstable_now();if(!(r.timesOutAt<=t))break;do{c()}while(null!==r&&r.timesOutAt<=t)}else if(null!==r)do{c()}while(null!==r&&0<m()-n.unstable_now())}finally{i=!1,null!==r?l():a=!1}}var d,p,h,f,m,g=Date,v="function"==typeof setTimeout?setTimeout:void 0,y="function"==typeof clearTimeout?clearTimeout:void 0,b="function"==typeof requestAnimationFrame?requestAnimationFrame:void 0,w="function"==typeof cancelAnimationFrame?cancelAnimationFrame:void 0;function _(e){d=b(function(t){y(p),e(t)}),p=v(function(){w(d),e(n.unstable_now())},100)}if(o){var E=performance;n.unstable_now=function(){return E.now()}}else n.unstable_now=function(){return g.now()};if("undefined"==typeof window){var S=-1;h=function(e){S=setTimeout(e,0,!0)},f=function(){clearTimeout(S)},m=function(){return 0}}else if(window._schedMock){var T=window._schedMock;h=T[0],f=T[1],m=T[2]}else{"undefined"!=typeof console&&("function"!=typeof b&&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 w&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"));var k=null,C=!1,x=-1,P=!1,N=!1,D=0,M=33,A=33;m=function(){return D};var I="__reactIdleCallback$"+Math.random().toString(36).slice(2);window.addEventListener("message",function(e){if(e.source===window&&e.data===I){C=!1;var t=n.unstable_now();if(e=!1,0>=D-t){if(!(-1!==x&&x<=t))return void(P||(P=!0,_(O)));e=!0}if(x=-1,t=k,k=null,null!==t){N=!0;try{t(e)}finally{N=!1}}}},!1);var O=function(e){P=!1;var t=e-D+A;t<A&&M<A?(8>t&&(t=8),A=t<M?M:t):M=t,D=e+A,C||(C=!0,window.postMessage(I,"*"))};h=function(e,t){k=e,x=t,N?window.postMessage(I,"*"):P||(P=!0,_(O))},f=function(){k=null,C=!1,x=-1}}n.unstable_scheduleWork=function(e,t){var i=n.unstable_now();if(e={callback:e,timesOutAt:t=void 0!==t&&null!==t&&null!==t.timeout&&void 0!==t.timeout?i+t.timeout:i+5e3,next:null,previous:null},null===r)r=e.next=e.previous=e,l();else{i=null;var a=r;do{if(a.timesOutAt>t){i=a;break}a=a.next}while(a!==r);null===i?i=r:i===r&&(r=e,l()),(t=i.previous).next=i.previous=e,e.next=i,e.previous=t}return e},n.unstable_cancelScheduledWork=function(e){var t=e.next;if(null!==t){if(t===e)r=null;else{e===r&&(r=t);var n=e.previous;n.next=t,t.previous=n}e.next=e.previous=null}}},{}],20:[function(e,t,n){(function(n){"use strict";"production"===n.env.NODE_ENV?t.exports=e("./cjs/schedule.production.min.js"):t.exports=e("./cjs/schedule.development.js")}).call(this,e("_process"))},{"./cjs/schedule.development.js":18,"./cjs/schedule.production.min.js":19,_process:28}],21:[function(e,t,n){(function(n){"use strict";"production"===n.env.NODE_ENV?t.exports=e("./cjs/schedule-tracing.production.min.js"):t.exports=e("./cjs/schedule-tracing.development.js")}).call(this,e("_process"))},{"./cjs/schedule-tracing.development.js":16,"./cjs/schedule-tracing.production.min.js":17,_process:28}],22:[function(e,t,n){(function(r){!function(e){"object"==typeof n&&void 0!==t?t.exports=e():("undefined"!=typeof window?window:void 0!==r?r:"undefined"!=typeof self?self:this).Tinode=e()}(function(){var t={};const n=[{name:"ST",start:/(?:^|\W)(\*)[^\s*]/,end:/[^\s*](\*)(?=$|\W)/},{name:"EM",start:/(?:^|[\W_])(_)[^\s_]/,end:/[^\s_](_)(?=$|[\W_])/},{name:"DL",start:/(?:^|\W)(~)[^\s~]/,end:/[^\s~](~)(?=$|\W)/},{name:"CO",start:/(?:^|\W)(`)[^`]/,end:/[^`](`)(?=$|\W)/}],r=[{name:"LN",dataName:"url",pack:function(e){return/^[a-z]+:\/\//i.test(e)||(e="http://"+e),{url:e}},re:/(https?:\/\/)?(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\b(?:[-a-zA-Z0-9@:%_\+.~#?&\/\/=]*)/g},{name:"MN",dataName:"val",pack:function(e){return{val:e.slice(1)}},re:/\B@(\w\w+)/g},{name:"HT",dataName:"val",pack:function(e){return{val:e.slice(1)}},re:/\B#(\w\w+)/g}],i={ST:{name:"b",isVoid:!1},EM:{name:"i",isVoid:!1},DL:{name:"del",isVoid:!1},CO:{name:"tt",isVoid:!1},BR:{name:"br",isVoid:!0},LN:{name:"a",isVoid:!1},MN:{name:"a",isVoid:!1},HT:{name:"a",isVoid:!1},IM:{name:"img",isVoid:!0}};function a(e,t){var n;try{n=atob(e)}catch(e){console.log("Drafty: failed to decode base64-encoded object",e.message),n=atob("")}for(var r=n.length,i=new ArrayBuffer(r),a=new Uint8Array(i),o=0;o<r;o++)a[o]=n.charCodeAt(o);return URL.createObjectURL(new Blob([i],{type:t}))}var o={ST:{open:function(){return"<b>"},close:function(){return"</b>"}},EM:{open:function(){return"<i>"},close:function(){return"</i>"}},DL:{open:function(){return"<del>"},close:function(){return"</del>"}},CO:{open:function(){return"<tt>"},close:function(){return"</tt>"}},BR:{open:function(){return""},close:function(){return"<br/>"}},LN:{open:function(e){return'<a href="'+e.url+'">'},close:function(e){return"</a>"},props:function(e){return{href:e.url,target:"_blank"}}},MN:{open:function(e){return'<a href="#'+e.val+'">'},close:function(e){return"</a>"},props:function(e){return{name:e.val}}},HT:{open:function(e){return'<a href="#'+e.val+'">'},close:function(e){return"</a>"},props:function(e){return{name:e.val}}},IM:{open:function(e){var t=a(e.val,e.mime),n=e.ref?e.ref:t,r=(e.name?'<a href="'+n+'" download="'+e.name+'">':"")+'<img src="'+t+'"'+(e.width?' width="'+e.width+'"':"")+(e.height?' height="'+e.height+'"':"")+' border="0" />';return console.log("open: "+r),r},close:function(e){return e.name?"</a>":""},props:function(e){return{src:a(e.val,e.mime),title:e.name,"data-width":e.width,"data-height":e.height,"data-name":e.name,"data-size":.75*e.val.length|0,"data-mime":e.mime}}}},s=function(){};s.parse=function(e){if("string"!=typeof e)return null;var t=[],i={},a=[];e.split(/\r?\n/).map(function(e){var o,s,l=[];if(n.map(function(t){l=l.concat(function(e,t,n,r){for(var i=[],a=0,o=e.slice(0);o.length>0;){var s=t.exec(o);if(null==s)break;var l=s.index+s[0].lastIndexOf(s[1]);o=o.slice(l+1),a=(l+=a)+1;var c=n?n.exec(o):null;if(null==c)break;var u=c.index+c[0].indexOf(c[1]);o=o.slice(u+1),a=(u+=a)+1,i.push({text:e.slice(l+1,u),children:[],start:l,end:u,type:r})}return i}(e,t.start,t.end,t.name))}),0==l.length)s={txt:e};else{l.sort(function(e,t){return e.start-t.start}),l=function e(t){if(0==t.length)return[];for(var n=[t[0]],r=t[0],i=1;i<t.length;i++)t[i].start>r.end?(n.push(t[i]),r=t[i]):t[i].end<r.end&&r.children.push(t[i]);for(var i in n)n[i].children=e(n[i].children);return n}(l);var c=function e(t,n){var r="",i=[];for(var a in t){var o=t[a];if(!o.text){var s=e(o.children,r.length+n);o.text=s.txt,i=i.concat(s.fmt)}o.type&&i.push({at:r.length+n,len:o.text.length,tp:o.type}),r+=o.text}return{txt:r,fmt:i}}(function e(t,n,r,i){var a=[];if(0==i.length)return[];for(var o in i){var s=i[o];s.start>n&&a.push({text:t.slice(n,s.start)});var l={type:s.type},c=e(t,s.start+1,s.end-1,s.children);c.length>0?l.children=c:l.text=s.text,a.push(l),n=s.end+1}return n<r&&a.push({text:t.slice(n,r)}),a}(e,0,e.length,l),0);s={txt:c.txt,fmt:c.fmt}}if((o=function(e){var t,n=[];if(r.map(function(r){for(;null!==(t=r.re.exec(e));)n.push({offset:t.index,len:t[0].length,unique:t[0],data:r.pack(t[0]),type:r.name})}),0==n.length)return n;n.sort(function(e,t){return e.offset-t.offset});var i=-1;return n=n.filter(function(e){var t=e.offset>i;return i=e.offset+e.len,t})}(s.txt)).length>0){var u=[];for(var d in o){var p=o[d],h=i[p.unique];h||(h=t.length,i[p.unique]=h,t.push({tp:p.type,data:p.data})),u.push({at:p.offset,len:p.len,key:h})}s.ent=u}a.push(s)});var o={txt:""};if(a.length>0){o.txt=a[0].txt,o.fmt=(a[0].fmt||[]).concat(a[0].ent||[]);for(var s=1;s<a.length;s++){var l=a[s],c=o.txt.length+1;o.fmt.push({tp:"BR",len:1,at:c-1}),o.txt+=" "+l.txt,l.fmt&&(o.fmt=o.fmt.concat(l.fmt.map(function(e){return e.at+=c,e}))),l.ent&&(o.fmt=o.fmt.concat(l.ent.map(function(e){return e.at+=c,e})))}0==o.fmt.length&&delete o.fmt,t.length>0&&(o.ent=t)}return o},s.insertImage=function(e,t,n,r,i,a,o,s,l){return(e=e||{txt:" "}).ent=e.ent||[],e.fmt=e.fmt||[],e.fmt.push({at:t,len:1,key:e.ent.length}),e.ent.push({tp:"IM",data:{mime:n,val:r,width:i,height:a,name:o,ref:l,size:0|s}}),e},s.attachFile=function(e,t,n,r,i,a){(e=e||{txt:""}).ent=e.ent||[],e.fmt=e.fmt||[],e.fmt.push({at:-1,len:0,key:e.ent.length});let o={tp:"EX",data:{mime:t,val:n,name:r,ref:a,size:0|i}};return a instanceof Promise&&(o.data.ref=a.then(e=>{o.data.ref=e},e=>{})),e.ent.push(o),e},s.UNSAFE_toHTML=function(e){var t,n,r,{txt:i,fmt:a,ent:s}=e,l=[];if(a)for(var c in a){var u,d=a[c],p=d.tp;if(!p){var h=s[d.key];h&&(p=h.tp,u=h.data)}o[p]&&(l.push({idx:d.at+d.len,what:o[p].close(u)}),l.push({idx:d.at,what:o[p].open(u)}))}for(var c in l.sort(function(e,t){return t.idx-e.idx}),l)l[c].what&&(t=i,n=l[c].idx,r=l[c].what,i=t.slice(0,n)+r+t.slice(n));return i},s.format=function(e,t,n){var{txt:r,fmt:a,ent:o}=e;if(r=r||"",!a)return[r];var s=[].concat(a);return s.map(function(e){e.at=e.at||0,e.len=e.len||0}),s.sort(function(e,t){return e.at-t.at==0?t.len-e.len:e.at-t.at}),s=s.map(function(e){var t,n=e.tp;return n||(e.key=e.key||0,t=o[e.key].data,n=o[e.key].tp),{tp:n,data:t,at:e.at,len:e.len}}),function e(t,n,r,a,o,s){for(var l=[],c=0;c<a.length;c++){var u=a[c];n<u.at&&(l.push(o.call(s,null,void 0,t.slice(n,u.at))),n=u.at);for(var d=[],p=c+1;p<a.length&&a[p].at<u.at+u.len;p++)d.push(a[p]),c=p;var h=i[u.tp]||{};l.push(o.call(s,u.tp,u.data,h.isVoid?null:e(t,n,u.at+u.len,d,o,s))),n=u.at+u.len}return n<r&&l.push(o.call(s,null,void 0,t.slice(n,r))),l}(r,0,r.length,s,t,n)},s.toPlainText=function(e){return"string"==typeof e?e:e.txt},s.isPlainText=function(e){return"string"==typeof e||!(e.fmt||e.ent)},s.hasAttachments=function(e){if(e.ent&&e.ent.length>0)for(var t in e.ent)if("EX"==e.ent[t].tp)return!0;return!1},s.attachments=function(e,t,n){if(e.ent&&e.ent.length>0)for(var r in e.ent)"EX"==e.ent[r].tp&&t.call(n,e.ent[r].data,r)},s.getDownloadUrl=function(e){let t=null;return e.val?t=a(e.val,e.mime):"string"==typeof e.ref&&(t=e.ref),t},s.isUploading=function(e){return e.ref instanceof Promise},s.getPreviewUrl=function(e){return e.val?a(e.val,e.mime):null},s.getEntitySize=function(e){return e.size?e.size:e.val?.75*e.val.length|0:0},s.getEntityMimeType=function(e){return e.mime||"text/plain"},s.tagName=function(e){return i[e]?i[e].name:void 0},s.attrValue=function(e,t){if(t&&o[e])return o[e].props(t)},s.getContentType=function(){return"text/x-drafty"},t=s;var l;if("function"==typeof e)var c="0.15.6";const u="0",d=c||"0.15",p="tinodejs/"+d;function h(e){return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(e,t){return String.fromCharCode("0x"+t)}))}function f(e,t,n){if(null==t)return e;if("object"!=typeof t)return t||e;if(t instanceof Date)return t;if(t instanceof S)return new S(t);if(t instanceof Array)return t.length>0?t:e;for(var r in e||(e=t.constructor()),t)!t.hasOwnProperty(r)||!t[r]&&!1!==t[r]||n&&n[r]||"_generated"==r||(e[r]=f(e[r],t[r]));return e}function m(e,t,n,r){return e[t]=f(e[t],n,r),e[t]}function g(){var e=null;if("withCredentials"in new XMLHttpRequest)e=new XMLHttpRequest;else{if("undefined"==typeof XDomainRequest)throw new Error("browser not supported");e=new XDomainRequest}return e}function v(e,t){if("ts"===e&&"string"==typeof t&&t.length>=20&&t.length<=24){var n=new Date(t);if(n)return n}else if("acs"===e&&"object"==typeof t)return new S(t);return t}function y(e,t){return"string"==typeof t&&t.length>128?"<"+t.length+", bytes: "+t.substring(0,12)+"..."+t.substring(t.length-12)+">":function(e,t){if(t instanceof Date)t=function(e){if(e&&0!=e.getTime()){var t=e.getUTCMilliseconds();return e.getUTCFullYear()+"-"+n(e.getUTCMonth()+1)+"-"+n(e.getUTCDate())+"T"+n(e.getUTCHours())+":"+n(e.getUTCMinutes())+":"+n(e.getUTCSeconds())+(t?"."+n(t,3):"")+"Z"}function n(e,t){return"0".repeat((t=t||2)-(""+e).length)+e}}(t);else if(null==t||!1===t||Array.isArray(t)&&0==t.length||"object"==typeof t&&0===Object.keys(t).length)return;return t}(0,t)}function b(e,t,n){var r=null;return"http"!==t&&"https"!==t&&"ws"!==t&&"wss"!==t||(r=t+"://","/"!==(r+=e).charAt(r.length-1)&&(r+="/"),r+="v"+u+"/channels","http"!==t&&"https"!==t||(r+="/lp"),r+="?apikey="+n),r}var w=function(e,t,n,r,i){let a=e,o=r,s=t;var l=i;const c=2e3,u=10,d=.3;let p=null,h=0,f=!1,m=e=>{this.logger&&this.logger(e)};function y(e){var t=null;e.connect=function(n){return t&&1===t.readyState?Promise.resolve():(n&&(a=n),new Promise(function(n,r){var i=b(a,o?"wss":"ws",s);m("Connecting to: "+i);var g=new WebSocket(i);g.onopen=function(t){f=!1,e.onOpen&&e.onOpen(),n(),l&&(window.clearTimeout(p),p=null,h=0)},g.onclose=function(n){t=null,e.onDisconnect&&e.onDisconnect(null),!f&&l&&function(){clearTimeout(p);var e=c*(Math.pow(2,h)*(1+d*Math.random()));h=h>=u?h:h+1,p=setTimeout(()=>{m("Reconnecting, iter="+h+", timeout="+e),f||this.connect().catch(function(){})},e)}.call(e)},g.onerror=function(e){r(e)},g.onmessage=function(t){e.onMessage&&e.onMessage(t.data)},t=g}))},e.disconnect=function(){t&&(f=!0,t.close()),t=null},e.sendText=function(e){if(!t||t.readyState!=t.OPEN)throw new Error("Websocket is not connected");t.send(e)},e.isConnected=function(){return t&&1===t.readyState}}function w(e){var t=null,n=null,r=null;e.connect=function(r){return r&&(a=r),new Promise(function(r,i){var l=b(a,o?"https":"http",s);m("Connecting to: "+l),(n=function n(r,i,a){var o=g();return o.onreadystatechange=function(s){if(4==o.readyState)if(201==o.status){var l=JSON.parse(o.responseText,v);o.responseText,t=r+"&sid="+l.ctrl.params.sid,(o=n(t)).send(null),e.onOpen&&e.onOpen(),i&&i()}else 200==o.status?(e.onMessage&&e.onMessage(o.responseText),(o=n(t)).send(null)):(a&&a(o.responseText),e.onMessage&&e.onMessage(o.responseText),e.onDisconnect&&e.onDisconnect(new Error(o.status+" "+o.responseText)))},o.open("GET",r,!0),o}(l,r,i)).send(null)}).catch(function(){})},e.disconnect=function(){r&&(r.abort(),r=null),n&&(n.abort(),n=null),e.onDisconnect&&e.onDisconnect(null),t=null},e.sendText=function(e){var n,i;if(n=t,(i=g()).onreadystatechange=function(e){if(4==i.readyState&&i.status>=400)throw new Error("LP sender failed, "+i.status)},i.open("POST",n,!0),!(r=i)||1!=r.readyState)throw new Error("Long poller failed to connect");r.send(e)},e.isConnected=function(){return n&&!0}}"lp"===n?w(this):"ws"===n?y(this):"object"==typeof window&&window.WebSocket?y(this):w(this),this.onMessage=void 0,this.onDisconnect=void 0,this.onOpen=void 0,this.logger=void 0},_=function(e,t,n,r,i){this._appName=e||"Undefined",this._apiKey=n,this._browser="",this._platform="undefined",this._humanLanguage="xx","undefined"!=typeof navigator&&(this._browser=function(e){var t,n=(e=(e||"").replace(" (KHTML, like Gecko)","")).match(/(AppleWebKit\/[.\d]+)/i);if(n){for(var r=["chrome","safari","mobile","version"],i=e.substr(n.index+n[0].length).split(" "),a=[],o=0;o<i.length;o++){var s=/([\w.]+)[\/]([\.\d]+)/.exec(i[o]);s&&a.push([s[1],s[2],r.findIndex(function(e){return e==s[1].toLowerCase()})])}a.sort(function(e,t){var n=e[2]-t[2];return 0!=n?n:t[0].length-e[0].length}),t=a.length>0?a[0][0]+"/"+a[0][1]:n[1]}else t=/trident/i.test(e)?(n=/(?:\brv[ :]+([.\d]+))|(?:\bMSIE ([.\d]+))/g.exec(e))?"MSIE/"+(n[1]||n[2]):"MSIE/?":/firefox/i.test(e)?(n=/Firefox\/([.\d]+)/g.exec(e))?"Firefox/"+n[1]:"Firefox/?":/presto/i.test(e)?(n=/Opera\/([.\d]+)/g.exec(e))?"Opera/"+n[1]:"Opera/?":(n=/([\w.]+)\/([.\d]+)/.exec(e))?n[1]+"/"+n[2]:(n=e.split(" "))[0];if((n=t.split("/")).length>1){var l=n[1].split(".");t=n[0]+"/"+l[0]+(l[1]?"."+l[1]:"")}return t}(navigator.userAgent),this._platform=navigator.platform,this._humanLanguage=navigator.language||"en-US"),this._loggingEnabled=!1,this._trimLongStrings=!1,this._myUID=null,this._authenticated=!1,this._login=null,this._authToken=null,this._inPacketCount=0,this._messageId=Math.floor(65535*Math.random()+65535),this._serverInfo=null,this._deviceToken=null,this._pendingPromises={},this._connection=new w(t,n,r,i,!0),this.logger=(e=>{if(this._loggingEnabled){var t=new Date,n=("0"+t.getUTCHours()).slice(-2)+":"+("0"+t.getUTCMinutes()).slice(-2)+":"+("0"+t.getUTCSeconds()).slice(-2)+":"+("0"+t.getUTCMilliseconds()).slice(-3);console.log("["+n+"] "+e)}}),this._connection.logger=this.logger,this._cache={};let a=this.cachePut=((e,t,n)=>{this._cache[e+":"+t]=n}),o=this.cacheGet=((e,t)=>this._cache[e+":"+t]),s=this.cacheDel=((e,t)=>{delete this._cache[e+":"+t]}),l=this.cacheMap=((e,t)=>{for(var n in this._cache)if(e(this._cache[n],n,t))break});this.attachCacheToTopic=(e=>{e._tinode=this,e._cacheGetUser=(e=>{var t=o("user",e);if(t)return{user:e,public:f({},t)}}),e._cachePutUser=((e,t)=>a("user",e,f({},t.public))),e._cacheDelUser=(e=>s("user",e)),e._cachePutSelf=(()=>a("topic",e.name,e)),e._cacheDelSelf=(()=>s("topic",e.name))});let c=(e,t,n,r)=>{var i=this._pendingPromises[e];i&&(delete this._pendingPromises[e],t>=200&&t<400?i.resolve&&i.resolve(n):i.reject&&i.reject(new Error("Error: "+r+" ("+t+")")))},u=e=>{var t=null;return e&&(t=new Promise((t,n)=>{this._pendingPromises[e]={resolve:t,reject:n}})),t},h=this.getNextUniqueId=(()=>0!=this._messageId?""+this._messageId++:void 0),m=()=>this._appName+" ("+(this._browser?this._browser+"; ":"")+this._platform+"); "+p;this.initPacket=((e,t)=>{switch(e){case"hi":return{hi:{id:h(),ver:d,ua:m(),dev:this._deviceToken,lang:this._humanLanguage}};case"acc":return{acc:{id:h(),user:null,scheme:null,secret:null,login:!1,tags:null,desc:{},cred:{}}};case"login":return{login:{id:h(),scheme:null,secret:null}};case"sub":return{sub:{id:h(),topic:t,set:{},get:{}}};case"leave":return{leave:{id:h(),topic:t,unsub:!1}};case"pub":return{pub:{id:h(),topic:t,noecho:!1,head:null,content:{}}};case"get":return{get:{id:h(),topic:t,what:null,desc:{},sub:{},data:{}}};case"set":return{set:{id:h(),topic:t,desc:{},sub:{},tags:[]}};case"del":return{del:{id:h(),topic:t,what:null,delseq:null,user:null,hard:!1}};case"note":return{note:{topic:t,what:null,seq:void 0}};default:throw new Error("Unknown packet type requested: "+e)}}),this.send=((e,t)=>{let n;t&&(n=u(t)),e=function e(t){return Object.keys(t).forEach(function(n){"_"==n[0]?delete t[n]:t[n]?Array.isArray(t[n])&&0==t[n].length?delete t[n]:t[n]?"object"!=typeof t[n]||t[n]instanceof Date||(e(t[n]),0==Object.getOwnPropertyNames(t[n]).length&&delete t[n]):delete t[n]:delete t[n]}),t}(e);var r=JSON.stringify(e);return this.logger("out: "+(this._trimLongStrings?JSON.stringify(e,y):r)),this._connection.sendText(r),n}),this.loginSuccessful=(e=>{this._myUID=e.params.user,this._authenticated=e&&e.code>=200&&e.code<300,e.params&&e.params.token&&e.params.expires?this._authToken={token:e.params.token,expires:new Date(e.params.expires)}:this._authToken=null,this.onLogin&&this.onLogin(e.code,e.text)}),this._connection.onMessage=(e=>{if(e){this._inPacketCount++,this.onRawMessage&&this.onRawMessage(e);var t=JSON.parse(e,v);if(t)if(this.logger("in: "+(this._trimLongStrings?JSON.stringify(t,y):e)),this.onMessage&&this.onMessage(t),t.ctrl)this.onCtrlMessage&&this.onCtrlMessage(t.ctrl),t.ctrl.id&&c(t.ctrl.id,t.ctrl.code,t.ctrl,t.ctrl.text),t.ctrl.params&&"data"==t.ctrl.params.what&&(n=o("topic",t.ctrl.topic))&&n._allMessagesReceived(t.ctrl.params.count);else if(t.meta)(n=o("topic",t.meta.topic))&&n._routeMeta(t.meta),this.onMetaMessage&&this.onMetaMessage(t.meta);else if(t.data)(n=o("topic",t.data.topic))&&n._routeData(t.data),this.onDataMessage&&this.onDataMessage(t.data);else if(t.pres)(n=o("topic",t.pres.topic))&&n._routePres(t.pres),this.onPresMessage&&this.onPresMessage(t.pres);else if(t.info){var n;(n=o("topic",t.info.topic))&&n._routeInfo(t.info),this.onInfoMessage&&this.onInfoMessage(t.info)}else this.logger("ERROR: Unknown packet received.");else this.logger("in: "+e),this.logger("ERROR: failed to parse data")}}),this._connection.onOpen=(()=>{this.hello()}),this._connection.onDisconnect=(e=>{this._inPacketCount=0,this._serverInfo=null,this._authenticated=!1,l((e,t)=>{0===t.lastIndexOf("topic:",0)&&e._resetSub()}),this.onDisconnect&&this.onDisconnect(e)})};_.credential=function(e,t,n,r){return"object"==typeof e&&({val:t,params:n,resp:r,meth:e}=e),e&&(t||r)?[{meth:e,val:t,resp:r,params:n}]:null},_.topicType=function(e){return{me:"me",fnd:"fnd",grp:"grp",new:"grp",usr:"p2p"}["string"==typeof e?e.substring(0,3):"xxx"]},_.isNewGroupTopicName=function(e){return"string"==typeof e&&"new"==e.substring(0,3)},_.getVersion=function(){return d},_.getLibrary=function(){return p},_.MESSAGE_STATUS_NONE=0,_.MESSAGE_STATUS_QUEUED=1,_.MESSAGE_STATUS_SENDING=2,_.MESSAGE_STATUS_SENT=3,_.MESSAGE_STATUS_RECEIVED=4,_.MESSAGE_STATUS_READ=5,_.MESSAGE_STATUS_TO_ME=6,_.DEL_CHAR="␡",_.prototype={connect:function(e){return this._connection.connect(e)},disconnect:function(){this._connection&&this._connection.disconnect()},isConnected:function(){return this._connection&&this._connection.isConnected()},isAuthenticated:function(){return this._authenticated},account:function(e,t,n,r,i){var a=this.initPacket("acc");return a.acc.user=e,a.acc.scheme=t,a.acc.secret=n,a.acc.login=r,i&&(a.acc.desc.defacs=i.defacs,a.acc.desc.public=i.public,a.acc.desc.private=i.private,a.acc.tags=i.tags,a.acc.cred=i.cred),this.send(a,a.acc.id)},createAccount:function(e,t,n,r){var i=this.account("new",e,t,n,r);return n&&(i=i.then(e=>(this.loginSuccessful(e),e))),i},createAccountBasic:function(e,t,n){return e=e||"",t=t||"",this.createAccount("basic",h(e+":"+t),!0,n)},updateAccountBasic:function(e,t,n){return t=t||"",n=n||"",this.account(e,"basic",h(t+":"+n),!1,null)},hello:function(){var e=this.initPacket("hi");return this.send(e,e.hi.id).then(e=>(e.params&&(this._serverInfo=e.params),this.onConnect&&this.onConnect(),e)).catch(e=>{this.onDisconnect&&this.onDisconnect(e)})},setDeviceToken:function(e,t){let n=!1;return e&&e!=this._deviceToken&&(this._deviceToken=e,t&&this.isConnected()&&this.isAuthenticated()&&(this.send({hi:{dev:e}}),n=!0)),n},login:function(e,t,n){var r=this.initPacket("login");return r.login.scheme=e,r.login.secret=t,r.login.cred=n,this.send(r,r.login.id).then(e=>(this.loginSuccessful(e),e))},loginBasic:function(e,t,n){return this.login("basic",h(e+":"+t),n).then(t=>(this._login=e,t))},loginToken:function(e,t){return this.login("token",e,t)},getAuthToken:function(){return this._authToken&&this._authToken.expires.getTime()>Date.now()?this._authToken:(this._authToken=null,null)},setAuthToken:function(e){this._authToken=e},subscribe:function(e,t,n){var r=this.initPacket("sub",e);return e||(e="new"),r.sub.get=t,n&&(n.sub&&(r.sub.set.sub=n.sub),_.isNewGroupTopicName(e)&&n.desc&&(r.sub.set.desc=n.desc),n.tags&&(r.sub.set.tags=n.tags)),this.send(r,r.sub.id)},leave:function(e,t){var n=this.initPacket("leave",e);return n.leave.unsub=t,this.send(n,n.leave.id)},createMessage:function(e,n,r){let i=this.initPacket("pub",e),a="string"==typeof n?t.parse(n):n;return a&&!t.isPlainText(a)&&(i.pub.head={mime:t.getContentType()},n=a),i.pub.noecho=r,i.pub.content=n,i.pub},publish:function(e,t,n){return this.publishMessage(this.createMessage(e,t,n))},publishMessage:function(e){return(e=Object.assign({},e)).seq=void 0,e.from=void 0,e.ts=void 0,this.send({pub:e},e.id)},getMeta:function(e,t){var n=this.initPacket("get",e);return n.get=f(n.get,t),this.send(n,n.get.id)},setMeta:function(e,t){var n=this.initPacket("set",e),r=[];return t&&["desc","sub","tags"].map(function(e){t.hasOwnProperty(e)&&(r.push(e),n.set[e]=t[e])}),0==r.length?Promise.reject(new Error("Invalid {set} parameters")):this.send(n,n.set.id)},delMessages:function(e,t,n){var r=this.initPacket("del",e);return r.del.what="msg",r.del.delseq=t,r.del.hard=n,this.send(r,r.del.id)},delTopic:function(e){var t=this.initPacket("del",e);return t.del.what="topic",this.send(t,t.del.id).then(t=>(this.cacheDel("topic",e),this.ctrl))},delSubscription:function(e,t){var n=this.initPacket("del",e);return n.del.what="sub",n.del.user=t,this.send(n,n.del.id)},note:function(e,t,n){if(n<=0||n>=268435455)throw new Error("Invalid message id "+n);var r=this.initPacket("note",e);r.note.what=t,r.note.seq=n,this.send(r)},noteKeyPress:function(e){var t=this.initPacket("note",e);t.note.what="kp",this.send(t)},getTopic:function(e){var t=this.cacheGet("topic",e);return!t&&e&&(t="me"==e?new k:"fnd"==e?new C:new T(e),this.cachePut("topic",e,t),this.attachCacheToTopic(t)),t},newTopic:function(e){var t=new T("new",e);return this.attachCacheToTopic(t),t},newGroupTopicName:function(){return"new"+this.getNextUniqueId()},newTopicWith:function(e,t){var n=new T(e,t);return this.attachCacheToTopic(n),n},getMeTopic:function(){return this.getTopic("me")},getFndTopic:function(){return this.getTopic("fnd")},getLargeFileHelper:function(){return new x(this)},getCurrentUserID:function(){return this._myUID},getCurrentLogin:function(){return this._login},getServerInfo:function(){return this._serverInfo},enableLogging:function(e,t){this._loggingEnabled=e,this._trimLongStrings=t},isTopicOnline:function(e){var t=this.getMeTopic(),n=t&&t.getContact(e);return n&&n.online},wantAkn:function(e){this._messageId=e?Math.floor(16777215*Math.random()+16777215):0},onWebsocketOpen:void 0,onConnect:void 0,onDisconnect:void 0,onLogin:void 0,onCtrlMessage:void 0,onDataMessage:void 0,onPresMessage:void 0,onMessage:void 0,onRawMessage:void 0};var E=function(e){this.topic=e;var t=e._tinode.getMeTopic();this.contact=t&&t.getContact(e.name),this.what={}};E.prototype={_get_ims:function(){let e=this.contact&&this.contact.updated,t=this.topic._lastDescUpdate||0;return e>t?e:t},withData:function(e,t,n){return this.what.data={since:e,before:t,limit:n},this},withLaterData:function(e){return this.withData(this.topic._maxSeq>0?this.topic._maxSeq+1:void 0,void 0,e)},withEarlierData:function(e){return this.withData(void 0,this.topic._minSeq>0?this.topic._minSeq:void 0,e)},withDesc:function(e){return this.what.desc={ims:e},this},withLaterDesc:function(){return this.withDesc(this._get_ims())},withSub:function(e,t,n){var r={ims:e,limit:t};return"me"==this.topic.getType()?r.topic=n:r.user=n,this.what.sub=r,this},withOneSub:function(e,t){return this.withSub(e,void 0,t)},withLaterOneSub:function(e){return this.withOneSub(this.topic._lastSubsUpdate,e)},withLaterSub:function(e){return this.withSub("p2p"==this.topic.getType()?this._get_ims():this.topic._lastSubsUpdate,e)},withTags:function(){return this.what.tags=!0,this},withDel:function(e,t){return(e||t)&&(this.what.del={since:e,limit:t}),this},withLaterDel:function(e){return this.withDel(this.topic._maxSeq>0?this.topic._maxDel+1:void 0,e)},build:function(){var e={},t=[],n=this;return["data","sub","desc","tags","del"].map(function(r){n.what.hasOwnProperty(r)&&(t.push(r),Object.getOwnPropertyNames(n.what[r]).length>0&&(e[r]=n.what[r]))}),t.length>0?e.what=t.join(" "):e=void 0,e}};var S=function(e){e&&(this.given="number"==typeof e.given?e.given:S.decode(e.given),this.want="number"==typeof e.want?e.want:S.decode(e.want),this.mode=e.mode?"number"==typeof e.mode?e.mode:S.decode(e.mode):this.given&this.want)};S._NONE=0,S._JOIN=1,S._READ=2,S._WRITE=4,S._PRES=8,S._APPROVE=16,S._SHARE=32,S._DELETE=64,S._OWNER=128,S._BITMASK=S._JOIN|S._READ|S._WRITE|S._PRES|S._APPROVE|S._SHARE|S._DELETE|S._OWNER,S._INVALID=1048576,S.decode=function(e){if(!e)return null;if("number"==typeof e)return e&S._BITMASK;if("N"===e||"n"===e)return S._NONE;for(var t={J:S._JOIN,R:S._READ,W:S._WRITE,P:S._PRES,A:S._APPROVE,S:S._SHARE,D:S._DELETE,O:S._OWNER},n=S._NONE,r=0;r<e.length;r++){var i=t[e.charAt(r).toUpperCase()];i&&(n|=i)}return n},S.encode=function(e){if(null===e||e===S._INVALID)return null;if(e===S._NONE)return"N";for(var t=["J","R","W","P","A","S","D","O"],n="",r=0;r<t.length;r++)0!=(e&1<<r)&&(n+=t[r]);return n},S.update=function(e,t){if(!t||"string"!=typeof t)return e;var n=t.charAt(0);if("+"==n||"-"==n){for(var r=e,i=t.split(/([-+])/),a=1;a<i.length-1;a+=2){n=i[a];var o=S.decode(i[a+1]);if(o==S._INVALID)return e;null!=o&&("+"===n?r|=o:"-"===n&&(r&=~o))}e=r}else(r=S.decode(t))!=S._INVALID&&(e=r);return e},S.prototype={setMode:function(e){return this.mode=S.decode(e),this},updateMode:function(e){return this.mode=S.update(this.mode,e),this},getMode:function(){return S.encode(this.mode)},setGiven:function(e){return this.given=S.decode(e),this},updateGiven:function(e){return this.given=S.update(this.given,e),this},getGiven:function(){return S.encode(this.given)},setWant:function(e){return this.want=S.decode(e),this},updateWant:function(e){return this.want=S.update(this.want,e),this},getWant:function(){return S.encode(this.want)},updateAll:function(e){return e&&(this.updateGiven(e.given),this.updateWant(e.want),this.mode=this.given&this.want),this},isOwner:function(){return 0!=(this.mode&S._OWNER)},isMuted:function(){return 0==(this.mode&S._PRES)},isPresencer:function(){return 0!=(this.mode&S._PRES)},isJoiner:function(){return 0!=(this.mode&S._JOIN)},isReader:function(){return 0!=(this.mode&S._READ)},isWriter:function(){return 0!=(this.mode&S._WRITE)},isApprover:function(){return 0!=(this.mode&S._APPROVE)},isAdmin:function(){return this.isOwner()||this.isApprover()},isSharer:function(){return 0!=(this.mode&S._SHARE)},isDeleter:function(){return 0!=(this.mode&S._DELETE)}};var T=function(e,t){this._tinode=null,this.name=e,this.created=null,this.updated=null,this.touched=null,this.acs=new S(null),this.private=null,this.public=null,this._users={},this._queuedSeqId=268435455,this._maxSeq=0,this._minSeq=0,this._noEarlierMsgs=!1,this._maxDel=0,this._tags=[],this._messages=function(e){var t=[];function n(t,n,r){for(var i=0,a=n.length-1,o=0,s=0,l=!1;i<=a;)if((s=e(n[o=(i+a)/2|0],t))<0)i=o+1;else{if(!(s>0)){l=!0;break}a=o-1}return l?o:r?-1:s<0?o+1:o}function r(e,t){var r=n(e,t,!1);return t.splice(r,0,e),t}return e=e||function(e,t){return e===t?0:e<t?-1:1},{getAt:function(e){return t[e]},put:function(){var e;for(var n in e=1==arguments.length&&Array.isArray(arguments[0])?arguments[0]:arguments)r(e[n],t)},delAt:function(e){var n=t.splice(e,1);if(n&&n.length>0)return n[0]},delRange:function(e,n){return t.splice(e,n-e)},size:function(){return t.length},reset:function(e){t=[]},forEach:function(e,n,r,i){n|=0,r=r||t.length;for(var a=n;a<r;a++)e.call(i,t[a],a)},find:function(e,r){return n(e,t,!r)}}}(function(e,t){return e.seq-t.seq}),this._subscribed=!1,this._lastDescUpdate=null,this._lastSubsUpdate=null,this._new=!0,t&&(this.onData=t.onData,this.onMeta=t.onMeta,this.onPres=t.onPres,this.onInfo=t.onInfo,this.onMetaDesc=t.onMetaDesc,this.onMetaSub=t.onMetaSub,this.onSubsUpdated=t.onSubsUpdated,this.onTagsUpdated=t.onTagsUpdated,this.onDeleteTopic=t.onDeleteTopic,this.onAllMessagesReceived=t.onAllMessagesReceived)};T.prototype={isSubscribed:function(){return this._subscribed},subscribe:function(e,t){if(this._subscribed)return Promise.resolve(this);var n=this.name;return this._tinode.subscribe(n||"new",e,t).then(e=>{if(e.code>=300)return e;if(this._subscribed=!0,this.acs=e.params&&e.params.acs?e.params.acs:this.acs,this._new){this._new=!1,this.name=e.topic,this.created=e.ts,this.updated=e.ts,this.touched=e.ts,this._cachePutSelf();var n=this._tinode.getMeTopic();n&&n._processMetaSub([{_generated:!0,topic:this.name,created:e.ts,updated:e.ts,touched:e.ts,acs:this.acs}]),t&&t.desc&&(t.desc._generated=!0,this._processMetaDesc(t.desc))}return e})},publish:function(e,t){return this.publishMessage(this.createMessage(e,t))},createMessage:function(e,t){return this._tinode.createMessage(this.name,e,t)},publishMessage:function(e){if(!this._subscribed)return Promise.reject(new Error("Cannot publish on inactive topic"));if(t.hasAttachments(e.content)){let n=[];t.attachments(e.content,e=>{n.push(e.ref)}),e.head.attachments=n}return e._sending=!0,this._tinode.publishMessage(e)},publishDraft:function(e,t){return t||this._subscribed?(e.seq=this._getQueuedSeqId(),e._generated=!0,e.ts=new Date,e.from=this._tinode.getCurrentUserID(),e.noecho=!0,this._messages.put(e),this.onData&&this.onData(e),(t||Promise.resolve()).then(()=>e._cancelled?{code:300,text:"cancelled"}:this.publishMessage(e).then(t=>(e._sending=!1,e.seq=t.params.seq,e.ts=t.ts,this._routeData(e),t)),t=>{e._sending=!1,this._messages.delAt(this._messages.find(e)),this.onData&&this.onData()})):Promise.reject(new Error("Cannot publish on inactive topic"))},leave:function(e){return this._subscribed||e?this._tinode.leave(this.name,e).then(t=>(this._resetSub(),e&&this._gone(),t)):Promise.reject(new Error("Cannot leave inactive topic"))},getMeta:function(e){return this._subscribed?this._tinode.getMeta(this.name,e):Promise.reject(new Error("Cannot query inactive topic"))},getMessagesPage:function(e,t){var n=this.startMetaQuery();t?n.withLaterData(e):n.withEarlierData(e);var r=this.getMeta(n.build());return t||(r=r.then(e=>{e&&e.params&&!e.params.count&&(this._noEarlierMsgs=!0)})),r},setMeta:function(e){return this._subscribed?(e.tags&&(e.tags=function(e){var t=[];if(Array.isArray(e)){for(var n=0,r=e.length;n<r;n++){var i=e[n];i&&(i=i.trim().toLowerCase()).length>1&&t.push(i)}t.sort().filter(function(e,t,n){return!t||e!=n[t-1]})}return 0==t.length&&t.push(_.DEL_CHAR),t}(e.tags)),this._tinode.setMeta(this.name,e).then(t=>t&&t.code>=300?t:(e.sub&&(t.params&&t.params.acs&&(e.sub.acs=t.params.acs,e.sub.updated=t.ts),e.sub.user||(e.sub.user=this._tinode.getCurrentUserID(),e.desc||(e.desc={})),e.sub._generated=!0,this._processMetaSub([e.sub])),e.desc&&(t.params&&t.params.acs&&(e.desc.acs=t.params.acs,e.desc.updated=t.ts),this._processMetaDesc(e.desc)),e.tags&&this._processMetaTags(e.tags),t))):Promise.reject(new Error("Cannot update inactive topic"))},invite:function(e,t){return this.setMeta({sub:{user:e,mode:t}})},delMessages:function(e,t){if(!this._subscribed)return Promise.reject(new Error("Cannot delete messages in inactive topic"));e.sort(function(e,t){return e.low<t.low||e.low==t.low&&(!t.hi||e.hi>=t.hi)});let n,r=e.reduce((e,t)=>(t.low<268435455&&(!t.hi||t.hi<268435455?e.push(t):e.push({low:t.low,hi:this._maxSeq+1})),e),[]);return(n=e.length>0?this._tinode.delMessages(this.name,r,t):Promise.resolve({params:{del:0}})).then(t=>(t.params.del>this._maxDel&&(this._maxDel=t.params.del),e.map(e=>{e.hi?this.flushMessageRange(e.low,e.hi):this.flushMessage(e.low)}),this.onData&&this.onData(),t))},delMessagesAll:function(e){return this.delMessages([{low:1,hi:this._maxSeq+1,_all:!0}],e)},delMessagesList:function(e,t){e.sort((e,t)=>e-t);var n=e.reduce((e,t)=>{if(0==e.length)e.push({low:t});else{let n=e[e.length-1];!n.hi&&t!=n.low+1||t>n.hi?e.push({low:t}):n.hi=n.hi?Math.max(n.hi,t+1):t+1}return e},[]);return this.delMessages(n,t)},delTopic:function(){var e=this;return this._tinode.delTopic(this.name).then(function(t){return e._resetSub(),e._gone(),t})},delSubscription:function(e){return this._subscribed?this._tinode.delSubscription(this.name,e).then(t=>(delete this._users[e],this.onSubsUpdated&&this.onSubsUpdated(Object.keys(this._users)),t)):Promise.reject(new Error("Cannot delete subscription in inactive topic"))},note:function(e,t){var n=this._users[this._tinode.getCurrentUserID()];n?((!n[e]||n[e]<t)&&(this._subscribed?this._tinode.note(this.name,e,t):this._tinode.logger("Not sending {note} on inactive topic")),n[e]=t):this._tinode.logger("note(): user not found "+this._tinode.getCurrentUserID());var r=this._tinode.getMeTopic();r&&r.setMsgReadRecv(this.name,e,t)},noteRecv:function(e){this.note("recv",e)},noteRead:function(e){this.note("read",e)},noteKeyPress:function(){this._subscribed?this._tinode.noteKeyPress(this.name):this._tinode.logger("Cannot send notification in inactive topic")},userDesc:function(e){var t=this._cacheGetUser(e);if(t)return t},subscribers:function(e,t){var n=e||this.onMetaSub;if(n)for(var r in this._users)n.call(t,this._users[r],r,this._users)},tags:function(){return this._tags.slice(0)},subscriber:function(e){return this._users[e]},messages:function(e,t,n,r){var i=e||this.onData;if(i){let e="number"==typeof t?this._messages.find({seq:t}):void 0,a="number"==typeof n?this._messages.find({seq:n},!0):void 0;-1!=e&&-1!=a&&this._messages.forEach(i,e,a,r)}},msgReceiptCount:function(e,t){var n=0,r=this._tinode.getCurrentUserID();if(t>0)for(var i in this._users){var a=this._users[i];a.user!==r&&a[e]>=t&&n++}return n},msgReadCount:function(e){return this.msgReceiptCount("read",e)},msgRecvCount:function(e){return this.msgReceiptCount("recv",e)},msgHasMoreMessages:function(e){return e?this.seq>this._maxSeq:this._minSeq>1&&!this._noEarlierMsgs},isNewMessage:function(e){return this._maxSeq<=e},flushMessage:function(e){let t=this._messages.find({seq:e});return t>=0?this._messages.delAt(t):void 0},flushMessageRange:function(e,t){let n=this._messages.find({seq:e});return n>=0?this._messages.delRange(n,this._messages.find({seq:t},!0)):[]},cancelSend:function(e){let t=this._messages.find({seq:e});if(t>=0){let e=this._messages.getAt(t);if(1==this.msgStatus(e))return e._cancelled=!0,this._messages.delAt(t),!0}return!1},getType:function(){return _.topicType(this.name)},getAccessMode:function(){return this.acs},getDefaultAccess:function(){return this.defacs},startMetaQuery:function(){return new E(this)},msgStatus:function(e){var t=0;return e.from==this._tinode.getCurrentUserID()?e._sending?t=2:e.seq>=268435455?t=1:this.msgReadCount(e.seq)>0?t=5:this.msgRecvCount(e.seq)>0?t=4:e.seq>0&&(t=3):t=6,t},_routeData:function(e){e.content&&((!this.touched||this.touched<e.ts)&&(this.touched=e.ts),e._generated||this._messages.put(e)),e.seq>this._maxSeq&&(this._maxSeq=e.seq),(e.seq<this._minSeq||0==this._minSeq)&&(this._minSeq=e.seq),this.onData&&this.onData(e);var t=this._tinode.getMeTopic();t&&t.setMsgReadRecv(this.name,"msg",e.seq,e.ts)},_routeMeta:function(e){e.desc&&(this._lastDescUpdate=e.ts,this._processMetaDesc(e.desc)),e.sub&&e.sub.length>0&&(this._lastSubsUpdate=e.ts,this._processMetaSub(e.sub)),e.del&&this._processDelMessages(e.del.clear,e.del.delseq),e.tags&&this._processMetaTags(e.tags),this.onMeta&&this.onMeta(e)},_routePres:function(e){var t;switch(e.what){case"del":this._processDelMessages(e.clear,e.delseq);break;case"on":case"off":(t=this._users[e.src])?t.online="on"==e.what:this._tinode.logger("Presence update for an unknown user",this.name,e.src);break;case"acs":let r="me"==e.src?this._tinode.getCurrentUserID():e.src;if(t=this._users[r])t.acs.updateAll(e.dacs),r==this._tinode.getCurrentUserID()&&this.acs.updateAll(e.dacs),t.acs&&t.acs.mode!=S._NONE||("p2p"==this.getType()&&this.leave(),this._processMetaSub([{user:r,deleted:new Date,_generated:!0}]));else{var n=(new S).updateAll(e.dacs);n&&n.mode!=S._NONE&&((t=this._cacheGetUser(r))?t.acs=n:(t={user:r,acs:n},this.getMeta(this.startMetaQuery().withOneSub(void 0,r).build())),t._generated=!0,t.updated=new Date,this._processMetaSub([t]))}break;default:this._tinode.logger("Ignored presence update",e.what)}this.onPres&&this.onPres(e)},_routeInfo:function(e){if("kp"!==e.what){var t=this._users[e.from];t&&(t[e.what]=e.seq)}this.onInfo&&this.onInfo(e)},_processMetaDesc:function(e,t){if(f(this,e),"string"==typeof this.created&&(this.created=new Date(this.created)),"string"==typeof this.updated&&(this.updated=new Date(this.updated)),"string"==typeof this.touched&&(this.touched=new Date(this.touched)),"me"!==this.name&&!t&&!e._generated){var n=this._tinode.getMeTopic();n&&n._processMetaSub([{_generated:!0,topic:this.name,updated:this.updated,touched:this.touched,acs:this.acs,public:this.public,private:this.private}])}this.onMetaDesc&&this.onMetaDesc(this)},_processMetaSub:function(e){var t=void 0;for(var n in e){var r=e[n];if(r.user){r.updated=new Date(r.updated),r.deleted=r.deleted?new Date(r.deleted):null;var i=null;r.deleted?(delete this._users[r.user],i=r):((i=this._users[r.user])||(i=this._cacheGetUser(r.user)),i=this._updateCachedUser(r.user,r,r._generated)),this.onMetaSub&&this.onMetaSub(i)}else r._generated||(t=r)}t&&this.onMetaDesc&&this.onMetaDesc(t),this.onSubsUpdated&&this.onSubsUpdated(Object.keys(this._users))},_processMetaTags:function(e){1==e.length&&e[0]==_.DEL_CHAR&&(e=[]),this._tags=e,this.onTagsUpdated&&this.onTagsUpdated(e)},_processDelMessages:function(e,t){this._maxDel=Math.max(e,this._maxDel),this.clear=Math.max(e,this.clear);var n=this,r=0;Array.isArray(t)&&t.map(function(e){if(e.hi)for(var t=e.low;t<e.hi;t++)r++,n.flushMessage(t);else r++,n.flushMessage(e.low)}),r>0&&this.onData&&this.onData()},_allMessagesReceived:function(e){this.onAllMessagesReceived&&this.onAllMessagesReceived(e)},_resetSub:function(){this._subscribed=!1},_gone:function(){this._messages.reset(),this._users={},this.acs=new S(null),this.private=null,this.public=null,this._maxSeq=0,this._minSeq=0,this._subscribed=!1;var e=this._tinode.getMeTopic();e&&e._routePres({_generated:!0,what:"gone",topic:"me",src:this.name}),this.onDeleteTopic&&this.onDeleteTopic()},_updateCachedUser:function(e,t,n){var r=this._cacheGetUser(e);return r?r=f(r,t):(n&&this.getMeta(this.startMetaQuery().withLaterOneSub(e).build()),r=f({},t)),this._cachePutUser(e,r),m(this._users,e,r)},_getQueuedSeqId:function(){return this._queuedSeqId++}};var k=function(e){T.call(this,"me",e),this._contacts={},e&&(this.onContactUpdate=e.onContactUpdate)};k.prototype=Object.create(T.prototype,{_processMetaSub:{value:function(e){var t=0;for(var n in e){var r=e[n],i=r.topic;if("fnd"!=i&&"me"!=i){r.updated=new Date(r.updated),r.touched=r.touched?new Date(r.touched):null,r.deleted=r.deleted?new Date(r.deleted):null,r.seq=0|r.seq,r.recv=0|r.recv,r.read=0|r.read,r.unread=r.seq-r.read;var a=null;if(r.deleted)a=r,delete this._contacts[i];else if(r.seen&&r.seen.when&&(r.seen.when=new Date(r.seen.when)),a=m(this._contacts,i,r),"p2p"==_.topicType(i)&&this._cachePutUser(i,a),!r._generated){var o=this._tinode.getTopic(i);o&&o._processMetaDesc(r,!0)}t++,this.onMetaSub&&this.onMetaSub(a)}}t>0&&this.onSubsUpdated&&this.onSubsUpdated(Object.keys(this._contacts))},enumerable:!0,configurable:!0,writable:!1},_routePres:{value:function(e){var t=this._contacts[e.src];if(t){switch(e.what){case"on":t.online=!0;break;case"off":t.online&&(t.online=!1,t.seen?t.seen.when=new Date:t.seen={when:new Date});break;case"msg":t.touched=new Date,t.seq=0|e.seq,t.unread=t.seq-t.read;break;case"upd":this.getMeta(this.startMetaQuery().withLaterOneSub(e.src).build());break;case"acs":t.acs?t.acs.updateAll(e.dacs):t.acs=(new S).updateAll(e.dacs);break;case"ua":t.seen={when:new Date,ua:e.ua};break;case"recv":t.recv=t.recv?Math.max(t.recv,e.seq):0|e.seq;break;case"read":t.read=t.read?Math.max(t.read,e.seq):0|e.seq,t.unread=t.seq-t.read;break;case"gone":delete this._contacts[e.src]}this.onContactUpdate&&this.onContactUpdate(e.what,t)}else if("acs"==e.what){var n=new S(e.dacs);if(!n||n.mode==S._INVALID)return void this._tinode.logger("Invalid access mode update",e.src,e.dacs);if(n.mode==S._NONE)return void this._tinode.logger("Removing non-existent subscription",e.src,e.dacs);this.getMeta(this.startMetaQuery().withOneSub(void 0,e.src).build()),this._contacts[e.src]={topic:e.src,online:!1,acs:n}}this.onPres&&this.onPres(e)},enumerable:!0,configurable:!0,writable:!1},publish:{value:function(){return Promise.reject(new Error("Publishing to 'me' is not supported"))},enumerable:!0,configurable:!0,writable:!1},contacts:{value:function(e,t){var n=e||this.onMetaSub;if(n)for(var r in this._contacts)n.call(t,this._contacts[r],r,this._contacts)},enumerable:!0,configurable:!0,writable:!0},setMsgReadRecv:{value:function(e,t,n,r){var i,a=this._contacts[e],o=!1;a&&(n|=0,"recv"===t?(i=a.recv,a.recv=a.recv?Math.max(a.recv,n):n,o=i!=a.recv):"read"===t?(i=a.read,a.read=a.read?Math.max(a.read,n):n,a.unread=a.seq-a.read,o=i!=a.read,a.recv<a.read&&(a.recv=a.read,o=!0)):"msg"===t&&(i=a.seq,a.seq=a.seq?Math.max(a.seq,n):n,a.unread=a.seq-a.read,(!a.touched||a.touched<r)&&(a.touched=r),o=i!=a.seq),!o||a.acs&&a.acs.isMuted()||!this.onContactUpdate||this.onContactUpdate(t,a))},enumerable:!0,configurable:!0,writable:!0},getContact:{value:function(e){return this._contacts[e]},enumerable:!0,configurable:!0,writable:!0},getAccessMode:{value:function(e){var t=this._contacts[e];return t?t.acs:null},enumerable:!0,configurable:!0,writable:!0}}),k.prototype.constructor=k;var C=function(e){T.call(this,"fnd",e),this._contacts={}};C.prototype=Object.create(T.prototype,{_processMetaSub:{value:function(e){var t=Object.getOwnPropertyNames(this._contacts).length;for(var n in this._contacts={},e){var r=e[n],i=r.topic?r.topic:r.user;r.updated=new Date(r.updated),r.seen&&r.seen.when&&(r.seen.when=new Date(r.seen.when)),r=m(this._contacts,i,r),t++,this.onMetaSub&&this.onMetaSub(r)}t>0&&this.onSubsUpdated&&this.onSubsUpdated(Object.keys(this._contacts))},enumerable:!0,configurable:!0,writable:!1},publish:{value:function(){return Promise.reject(new Error("Publishing to 'fnd' is not supported"))},enumerable:!0,configurable:!0,writable:!1},setMeta:{value:function(e){var t=this;return Object.getPrototypeOf(C.prototype).setMeta.call(this,e).then(function(){Object.keys(t._contacts).length>0&&(t._contacts={},t.onSubsUpdated&&t.onSubsUpdated([]))})},enumerable:!0,configurable:!0,writable:!1},contacts:{value:function(e,t){var n=e||this.onMetaSub;if(n)for(var r in this._contacts)n.call(t,this._contacts[r],r,this._contacts)},enumerable:!0,configurable:!0,writable:!0}}),C.prototype.constructor=C;var x=function(e){this._tinode=e,this._apiKey=e._apiKey,this._authToken=e.getAuthToken(),this._msgId=e.getNextUniqueId(),this.xhr=g(),this.toResolve=null,this.toReject=null,this.onProgress=null,this.onSuccess=null,this.onFailure=null};x.prototype={upload:function(e,t,n,r){if(!this._authToken)throw new Error("Must authenticate first");var i=this;this.xhr.open("POST","/v"+u+"/file/u/",!0),this.xhr.setRequestHeader("X-Tinode-APIKey",this._apiKey),this.xhr.setRequestHeader("X-Tinode-Auth","Token "+this._authToken.token);var a=new Promise((e,t)=>{this.toResolve=e,this.toReject=t});this.onProgress=t,this.onSuccess=n,this.onFailure=r,this.xhr.upload.onprogress=function(e){e.lengthComputable&&i.onProgress&&i.onProgress(e.loaded/e.total)},this.xhr.onload=function(){var e;try{e=JSON.parse(this.response,v)}catch(e){i._tinode.logger("Invalid server response in LargeFileHelper",this.response)}this.status>=200&&this.status<300?(i.toResolve&&i.toResolve(e.ctrl.params.url),i.onSuccess&&i.onSuccess(e.ctrl)):this.status>=400?(i.toReject&&i.toReject(new Error(e.ctrl.text+" ("+e.ctrl.code+")")),i.onFailure&&i.onFailure(e.ctrl)):i._tinode.logger("Unexpected server response status",this.status,this.response)},this.xhr.onerror=function(e){i.toReject&&i.toReject(new Error("failed")),i.onFailure&&i.onFailure(null)},this.xhr.onabort=function(e){i.toReject&&i.toReject(new Error("upload cancelled by user")),i.onFailure&&i.onFailure(null)};try{var o=new FormData;o.append("file",e),o.set("id",this._msgId),this.xhr.send(o)}catch(e){this.toReject&&this.toReject(e),this.onFailure&&this.onFailure(null)}return a},download:function(e,t,n,r){if(/^(?:(?:[a-z]+:)?\/\/)/i.test(e))throw new Error("The URL '"+e+"' must be relative, not absolute");if(!this._authToken)throw new Error("Must authenticate first");var i=this;this.xhr.open("GET",e,!0),this.xhr.setRequestHeader("X-Tinode-APIKey",this._apiKey),this.xhr.setRequestHeader("X-Tinode-Auth","Token "+this._authToken.token),this.xhr.responseType="blob",this.onProgress=r,this.xhr.onprogress=function(e){i.onProgress&&i.onProgress(e.loaded)};var a=new Promise((e,t)=>{this.toResolve=e,this.toReject=t});this.xhr.onload=function(){if(200==this.status){var e=document.createElement("a");e.href=window.URL.createObjectURL(new Blob([this.response],{type:n})),e.style.display="none",e.setAttribute("download",t),document.body.appendChild(e),e.click(),document.body.removeChild(e),window.URL.revokeObjectURL(e.href),i.toResolve&&i.toResolve()}else if(this.status>=400&&i.toReject){var r=new FileReader;r.onload=function(){try{var e=JSON.parse(this.result,v);i.toReject(new Error(e.ctrl.text+" ("+e.ctrl.code+")"))}catch(e){i._tinode.logger("Invalid server response in LargeFileHelper",this.result),i.toReject(e)}},r.readAsText(this.response)}},this.xhr.onerror=function(e){i.toReject&&i.toReject(new Error("failed"))},this.xhr.onabort=function(){i.toReject&&i.toReject(null)};try{this.xhr.send()}catch(e){this.toReject&&this.toReject(e)}return a},cancel:function(){this.xhr&&this.xhr.readyState<4&&this.xhr.abort()},getId:function(){return this._msgId}};var P=function(e,t){this.status=P.STATUS_NONE,this.topic=e,this.content=t};return P.STATUS_NONE=0,P.STATUS_QUEUED=1,P.STATUS_SENDING=2,P.STATUS_SENT=3,P.STATUS_RECEIVED=4,P.STATUS_READ=5,P.STATUS_TO_ME=6,P.prototype={toJSON:function(){},fromJSON:function(e){}},P.prototype.constructor=P,(l=_).Drafty=t,l})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],23:[function(e,t,n){(function(e){var n,r,i,a,o,s,l,c,u,d,p,h,f,m,g,v,y,b,w;!function(n){var r="object"==typeof e?e:"object"==typeof self?self:"object"==typeof this?this:{};function i(e,t){return e!==r&&("function"==typeof Object.create?Object.defineProperty(e,"__esModule",{value:!0}):e.__esModule=!0),function(n,r){return e[n]=t?t(n,r):r}}"object"==typeof t&&"object"==typeof t.exports?n(i(r,i(t.exports))):n(i(r))}(function(e){var t=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])};n=function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)},r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i=function(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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&(n[r[i]]=e[r[i]])}return n},a=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},o=function(e,t){return function(n,r){t(n,r,e)}},s=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},l=function(e,t,n,r){return new(n||(n=Promise))(function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(o,s)}l((r=r.apply(e,t||[])).next())})},c=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=r[2&a[0]?"return":a[0]?"throw":"next"])&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[0,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}},u=function(e,t){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])},d=function(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}}}},p=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},h=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(p(arguments[t]));return e},f=function(e){return this instanceof f?(this.v=e,this):new f(e)},m=function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),a=[];return r={},o("next"),o("throw"),o("return"),r[Symbol.asyncIterator]=function(){return this},r;function o(e){i[e]&&(r[e]=function(t){return new Promise(function(n,r){a.push([e,t,n,r])>1||s(e,t)})})}function s(e,t){try{(n=i[e](t)).value instanceof f?Promise.resolve(n.value.v).then(l,c):u(a[0][2],n)}catch(e){u(a[0][3],e)}var n}function l(e){s("next",e)}function c(e){s("throw",e)}function u(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}},g=function(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,i){e[r]&&(t[r]=function(t){return(n=!n)?{value:f(e[r](t)),done:"return"===r}:i?i(t):t})}},v=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator];return t?t.call(e):"function"==typeof d?d(e):e[Symbol.iterator]()},y=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},b=function(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},w=function(e){return e&&e.__esModule?e:{default:e}},e("__extends",n),e("__assign",r),e("__rest",i),e("__decorate",a),e("__param",o),e("__metadata",s),e("__awaiter",l),e("__generator",c),e("__exportStar",u),e("__values",d),e("__read",p),e("__spread",h),e("__await",f),e("__asyncGenerator",m),e("__asyncDelegator",g),e("__asyncValues",v),e("__makeTemplateObject",y),e("__importStar",b),e("__importDefault",w)})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],24:[function(e,t,n){!function(e){"use strict";if(!e.fetch){var t={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(t.arrayBuffer)var n=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],r=function(e){return e&&DataView.prototype.isPrototypeOf(e)},i=ArrayBuffer.isView||function(e){return e&&n.indexOf(Object.prototype.toString.call(e))>-1};u.prototype.append=function(e,t){e=s(e),t=l(t);var n=this.map[e];this.map[e]=n?n+","+t:t},u.prototype.delete=function(e){delete this.map[s(e)]},u.prototype.get=function(e){return e=s(e),this.has(e)?this.map[e]:null},u.prototype.has=function(e){return this.map.hasOwnProperty(s(e))},u.prototype.set=function(e,t){this.map[s(e)]=l(t)},u.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},u.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),c(e)},u.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),c(e)},u.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),c(e)},t.iterable&&(u.prototype[Symbol.iterator]=u.prototype.entries);var a=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];g.prototype.clone=function(){return new g(this,{body:this._bodyInit})},m.call(g.prototype),m.call(y.prototype),y.prototype.clone=function(){return new y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new u(this.headers),url:this.url})},y.error=function(){var e=new y(null,{status:0,statusText:""});return e.type="error",e};var o=[301,302,303,307,308];y.redirect=function(e,t){if(-1===o.indexOf(t))throw new RangeError("Invalid status code");return new y(null,{status:t,headers:{location:e}})},e.Headers=u,e.Request=g,e.Response=y,e.fetch=function(e,n){return new Promise(function(r,i){var a=new g(e,n),o=new XMLHttpRequest;o.onload=function(){var e,t,n={status:o.status,statusText:o.statusText,headers:(e=o.getAllResponseHeaders()||"",t=new u,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}}),t)};n.url="responseURL"in o?o.responseURL:n.headers.get("X-Request-URL");var i="response"in o?o.response:o.responseText;r(new y(i,n))},o.onerror=function(){i(new TypeError("Network request failed"))},o.ontimeout=function(){i(new TypeError("Network request failed"))},o.open(a.method,a.url,!0),"include"===a.credentials?o.withCredentials=!0:"omit"===a.credentials&&(o.withCredentials=!1),"responseType"in o&&t.blob&&(o.responseType="blob"),a.headers.forEach(function(e,t){o.setRequestHeader(t,e)}),o.send(void 0===a._bodyInit?null:a._bodyInit)})},e.fetch.polyfill=!0}function s(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function c(e){var n={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return t.iterable&&(n[Symbol.iterator]=function(){return n}),n}function u(e){this.map={},e instanceof u?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function d(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function p(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function h(e){var t=new FileReader,n=p(t);return t.readAsArrayBuffer(e),n}function f(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,e)if("string"==typeof e)this._bodyText=e;else if(t.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(t.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(t.arrayBuffer&&t.blob&&r(e))this._bodyArrayBuffer=f(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!t.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e)&&!i(e))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=f(e)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},t.blob&&(this.blob=function(){var e=d(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?d(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(h)}),this.text=function(){var e,t,n,r=d(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=p(t),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},t.formData&&(this.formData=function(){return this.text().then(v)}),this.json=function(){return this.text().then(JSON.parse)},this}function g(e,t){var n,r,i=(t=t||{}).body;if(e instanceof g){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new u(e.headers)),this.method=e.method,this.mode=e.mode,i||null==e._bodyInit||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new u(t.headers)),this.method=(n=t.method||this.method||"GET",r=n.toUpperCase(),a.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function v(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}}),t}function y(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new u(t.headers),this.url=t.url||"",this._initBody(e)}}("undefined"!=typeof self?self:this)},{}],25:[function(e,t,n){var r=e("react"),i=e("react-dom"),a=e("./webapp.js");i.render(r.createElement(a,null),document.getElementById("mountPoint"))},{"./webapp.js":26,react:15,"react-dom":12}],26:[function(e,t,n){"use strict";if("function"==typeof e){if(void 0===r)var r=e("react"),i=e("react-dom");if(void 0===a)var a=e("tinode-sdk"),o=a.Drafty;if(void 0===s){var s=e("firebase/app");e("firebase/messaging")}var l=e("../version.json").version}const c="TinodeWeb/"+(l||"0.15"),u={hosted:"api.tinode.co",local:"localhost:6060"},d=u.hosted,p=new Audio("audio/msg.mp3"),h="AQEAAAABAAD_rAp4DJh05a1HAwFT3A6K",f=3e3,m=500,g=1e3,v=4,y=640,b=13,w=128,_=24,E=195840,S=1<<23,T=768,k=["image/jpeg","image/gif","image/png","image/svg","image/svg+xml"],C=["jpg","gif","png","svg","svg"];function x(e){var t=window.navigator.userLanguage||window.navigator.language,n=new Date;return e.getFullYear()==n.getFullYear()?e.getMonth()==n.getMonth()&&e.getDate()==n.getDate()?e.toLocaleTimeString(t,{hour12:!1,hour:"2-digit",minute:"2-digit"}):e.toLocaleDateString(t,{hour12:!1,month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}):e.toLocaleDateString(t,{hour12:!1,year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function P(e){if(!e||0==e)return"0 Bytes";var t=["Bytes","KB","MB","GB","TB","PB"],n=Math.min(0|Math.floor(Math.log2(e)/10),t.length-1),r=e/Math.pow(1024,n),i=n>0?r<3?2:r<30?1:0:0;return r.toFixed(i)+" "+t[n]}function N(e){return e&&e.type&&e.data?"data:image/"+e.type+";base64,"+e.data:null}function D(e,t,n,r,i){if(!(e&&t&&n&&r))return null;i&&(n=r=Math.min(n,r));let a=Math.min(Math.min(e,n)/e,Math.min(t,r)/t),o={dstWidth:e*a|0,dstHeight:t*a|0};return i?(o.dstWidth=o.dstHeight=Math.min(o.dstWidth,o.dstHeight),o.srcWidth=o.srcHeight=Math.min(e,t),o.xoffset=(e-o.srcWidth)/2|0,o.yoffset=(t-o.srcWidth)/2|0):(o.xoffset=o.yoffset=0,o.srcWidth=e,o.srcHeight=t),o}function M(e,t){var n=k.indexOf(t),r=C[n],i=e.lastIndexOf(".");return i>=0&&(e=e.substring(0,i)),e+"."+r}function A(e){var t=/^data:(image\/[-+a-z0-9.]+);base64/.exec(e);return t&&t.length>1?t[1]:null}function I(e){return 3*Math.floor(e/4)}function O(e,t,n,r,i,a){var o=new Image;o.crossOrigin="Anonymous",o.onerror=function(e){a("Image format unrecognized")},o.onload=function(){var o=D(this.width,this.height,t,n,r);if(o){var s=document.createElement("canvas");s.width=o.dstWidth,s.height=o.dstHeight;var l=s.getContext("2d");l.imageSmoothingEnabled=!0,l.drawImage(this,o.xoffset,o.yoffset,o.srcWidth,o.srcHeight,0,0,o.dstWidth,o.dstHeight);var c=this.width!=o.dstWidth||this.height!=o.dstHeight||k.indexOf(e.type)<0?"image/jpeg":e.type,u=s.toDataURL(c);if(c=A(u.split(",")[0])){var d=.78;if(I(u.length)>E&&(c="image/jpeg"),"image/jpeg"==c)for(;I(u.length)>E&&d>.45;)u=s.toDataURL(c,d),d*=.84;I(u.length)>E?a("The image size "+P(I(u.length))+" exceeds the "+P(E)+" limit.","err"):(s=null,i(u.split(",")[1],c,o.dstWidth,o.dstHeight,M(e.name,c)))}else a("Unsupported image format")}else a("Invalid image")},o.src=URL.createObjectURL(e)}function R(e,t,n){var r=new FileReader;r.addEventListener("load",function(){var i=r.result.split(","),a=A(i[0]);if(a){var o=new Image;o.crossOrigin="Anonymous",o.onload=function(){t(i[1],a,this.width,this.height,M(e.name,a))},o.onerror=function(e){n("Image format not recognized")},o.src=URL.createObjectURL(e)}else n("Failed to process image file")},!1),r.readAsDataURL(e)}function U(e,t,n){var r=new FileReader;r.addEventListener("load",function(){t(e.type,r.result.split(",")[1],e.name)}),r.readAsDataURL(e)}function L(e){let t=e.split("?",2),n={},r=[];return t[0]&&(r=t[0].substr(1).split("/")),t[1]&&t[1].split("&").forEach(function(e){let t=e.split("=");t[0]&&(n[decodeURIComponent(t[0])]=decodeURIComponent(t[1]))}),{path:r,params:n}}function F(e){window.location.hash=e}function j(e,t){var n=e.join("/"),r=[];for(var i in t)t.hasOwnProperty(i)&&r.push(i+"="+t[i]);return r.length>0&&(n+="?"+r.join("&")),n}function W(e,t,n){var r=L(e);return r.params[t]=n,j(r.path,r.params)}function B(e,t){var n=L(e);return delete n.params[t],j(n.path,n.params)}function z(e,t){var n=L(e);return n.path[0]=t,j(n.path,n.params)}function V(e,t){var n=L(e);return n.path[1]=t,delete n.params.info,j(n.path,n.params)}function q(){return"object"==typeof window.location&&"https:"==window.location.protocol}function H(e,t){var n=null;if((e&&e.trim()||t)&&(n={},e&&(n.fn=e.trim()),t)){var r=t.indexOf(",");n.photo={data:t.substring(r+1),type:"jpg"}}return n}function K(e,t){if(e.length!=t.length)return!1;e.sort(),t.sort();for(var n=0,r=e.length;n<r;n++)if(e[n]!==t[n])return!1;return!0}Storage.prototype.setObject=function(e,t){this.setItem(e,JSON.stringify(t))},Storage.prototype.getObject=function(e){let t=this.getItem(e);return t&&JSON.parse(t)},Storage.prototype.updateObject=function(e,t){let n=this.getObject(e);this.setObject(e,Object.assign(n||{},t))};class G extends r.Component{constructor(e){super(e),this.handlePageClick=this.handlePageClick.bind(this),this.handleEscapeKey=this.handleEscapeKey.bind(this),this.handleClick=this.handleClick.bind(this),this.MenuItems={topic_info:{title:"Info",handler:null},messages_clear:{title:"Clear messages",handler:(e,t)=>{this.deleteMessages(!0,!1,e,t)}},messages_clear_hard:{title:"Clear for All",handler:(e,t)=>{this.deleteMessages(!0,!0,e,t)}},message_delete:{title:"Delete",handler:(e,t)=>{this.deleteMessages(!1,!1,e,t)}},message_delete_hard:{title:"Delete for All",handler:(e,t)=>{this.deleteMessages(!1,!0,e,t)}},topic_unmute:{title:"Unmute",handler:this.topicPermissionSetter.bind(this,"+P")},topic_mute:{title:"Mute",handler:this.topicPermissionSetter.bind(this,"-P")},topic_unblock:{title:"Unblock",handler:this.topicPermissionSetter.bind(this,"+J")},topic_block:{title:"Block",handler:this.topicPermissionSetter.bind(this,"-J")},topic_delete:{title:"Delete",handler:(e,t)=>{let n=this.props.tinode.getTopic(e.topicName);n?n.delTopic().catch(e=>{t&&t(e.message,"err")}):console.log("Topic not found: ",e.topicName)}},permissions:{title:"Edit permissions",handler:null},member_delete:{title:"Remove",handler:(e,t)=>{let n=this.props.tinode.getTopic(e.topicName);n&&e.user?n.delSubscription(e.user).catch(e=>{t&&t(e.message,"err")}):console.log("Topic or user not found: '"+e.topicName+"', '"+e.user+"'")}},member_mute:{title:"Mute",handler:this.topicPermissionSetter.bind(this,"-P")},member_unmute:{title:"Unmute",handler:this.topicPermissionSetter.bind(this,"+P")},member_block:{title:"Block",handler:this.topicPermissionSetter.bind(this,"-J")},member_unblock:{title:"Unblock",handler:this.topicPermissionSetter.bind(this,"+J")}}}componentDidMount(){document.addEventListener("mousedown",this.handlePageClick,!1),document.addEventListener("keyup",this.handleEscapeKey,!1)}componentWillUnmount(){document.removeEventListener("mousedown",this.handlePageClick,!1),document.removeEventListener("keyup",this.handleEscapeKey,!1)}handlePageClick(e){i.findDOMNode(this).contains(e.target)||(e.preventDefault(),e.stopPropagation(),this.props.hide())}handleEscapeKey(e){27===e.keyCode&&this.props.hide()}handleClick(e){e.preventDefault(),e.stopPropagation(),this.props.hide();let t=this.props.items[e.currentTarget.dataset.id];"string"==typeof t&&(t=this.MenuItems[t]),t.handler(this.props.params,this.props.onError)}deleteMessages(e,t,n,r){var i=this.props.tinode.getTopic(n.topicName);if(i){if(i.cancelSend(n.seq))return new Promise.resolve;(e?i.delMessagesAll(t):i.delMessagesList([n.seq],t)).catch(e=>{r&&r(e.message,"err")})}else console.log("Topic not found: ",n.topicName)}topicPermissionSetter(e,t,n){var r=this.props.tinode.getTopic(t.topicName);if(r){var i,a;if(t.user){if(!(a=r.subscriber(t.user)))return void console.log("Subscriber not found",t.topicName+"["+t.user+"]");i=a.acs.updateGiven(e).getGiven()}else i=r.getAccessMode().updateWant(e).getWant();r.setMeta({sub:{user:t.user,mode:i}}).catch(e=>{n&&n(e.message,"err")})}else console.log("Topic not found",t.topicName)}render(){let e=0,t=[];this.props.items.map(n=>{"string"==typeof n&&(n=this.MenuItems[n]),n&&n.title&&t.push("-"==n.title?r.createElement("li",{className:"separator",key:e}):r.createElement("li",{onClick:this.handleClick,"data-id":e,key:e},n.title)),e++});var n=12*b,i=b*(.7+2.5*t.length),a={left:(this.props.bounds.right-this.props.clickAt.x<n?this.props.clickAt.x-this.props.bounds.left-n:this.props.clickAt.x-this.props.bounds.left)+"px",top:(this.props.bounds.bottom-this.props.clickAt.y<i?this.props.clickAt.y-this.props.bounds.top-i:this.props.clickAt.y-this.props.bounds.top)+"px"};return r.createElement("ul",{className:"menu",style:a},t)}}class $ extends r.PureComponent{constructor(e){super(e)}render(){return r.createElement("a",{href:"javascript:;",onClick:this.props.onCancel},r.createElement("i",{className:"material-icons"},"close"))}}class Y extends r.PureComponent{render(){return this.props.show?r.createElement("div",{className:"load-spinner-box"},r.createElement("div",{className:"loader-spinner"})):null}}class Q extends r.PureComponent{constructor(e){super(e),this.state={open:e.open},this.handleToggle=this.handleToggle.bind(this)}handleToggle(){let e=!this.state.open;this.setState({open:e}),this.props.onToggle&&this.props.onToggle(e)}render(){return r.createElement("label",{className:"small",onClick:this.handleToggle},this.props.title,"...",this.state.open?r.createElement("i",{className:"material-icons"},"expand_more"):r.createElement("i",{className:"material-icons"},"chevron_right"))}}class X extends r.PureComponent{render(){let e;if(!0===this.props.avatar)if(this.props.topic&&this.props.title&&this.props.title.trim()){let t=this.props.title.trim().charAt(0),n="lettertile dark-color"+Math.abs(function(e){var t=0;e=""+e;for(var n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t&=t;return t}(this.props.topic))%16;e=r.createElement("div",{className:n},r.createElement("div",null,t))}else e="grp"==a.topicType(this.props.topic)?r.createElement("i",{className:"material-icons"},"group"):r.createElement("i",{className:"material-icons"},"person");else e=this.props.avatar?r.createElement("img",{className:"avatar",alt:"avatar",src:this.props.avatar}):null;return e}}class J extends r.Component{constructor(e){super(e),this.state={active:e.state,initialText:e.text||"",text:e.text||""},this.handeTextChange=this.handeTextChange.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleStartEditing=this.handleStartEditing.bind(this),this.handleEditingFinished=this.handleEditingFinished.bind(this)}static getDerivedStateFromProps(e,t){return t.initialText==e.text||t.active?null:{initialText:e.text||"",text:e.text||""}}handeTextChange(e){this.setState({text:e.target.value})}handleKeyDown(e){27===e.keyCode?this.setState({text:this.props.text,active:!1}):13===e.keyCode&&this.handleEditingFinished()}handleStartEditing(){this.props.readOnly||(i.findDOMNode(this).focus(),this.setState({active:!0}))}handleEditingFinished(){this.setState({active:!1});var e=this.state.text.trim();(e||this.props.text)&&e!==this.props.text&&this.props.onFinished(e)}render(){var e="password"===this.props.type?"••••••••":this.state.text,t="in-place-edit"+(this.props.readOnly?" disabled":"");return e||(e=this.props.placeholder,t+=" placeholder"),e.length>20&&(e=e.substring(0,19)+"..."),this.state.active?r.createElement("input",{type:this.props.type||"text",value:this.state.text,placeholder:this.props.placeholder,onChange:this.handeTextChange,onKeyDown:this.handleKeyDown,onBlur:this.handleEditingFinished,autoFocus:!0}):r.createElement("span",{className:t,onClick:this.handleStartEditing},r.createElement("span",{className:"content"},e))}}class Z extends r.PureComponent{constructor(e){super(e),this.state={hostName:e.serverAddress,changed:!1},this.handleHostNameChange=this.handleHostNameChange.bind(this),this.handleEditingFinished=this.handleEditingFinished.bind(this)}handleHostNameChange(e){this.setState({hostName:e.target.value,changed:!0})}handleEditingFinished(){this.state.changed&&(this.setState({changed:!1}),this.props.onServerAddressChange(this.state.hostName.trim()))}render(){var e=[];for(var t in u){var n=u[t];e.push(r.createElement("option",{key:n,value:n}))}return r.createElement("div",{className:"panel-form-row"},r.createElement("input",{type:"search",id:"host-name",placeholder:this.props.hostName,list:"known-hosts",className:"quoted",value:this.state.hostName,onChange:this.handleHostNameChange,onBlur:this.handleEditingFinished,required:!0}),r.createElement("datalist",{id:"known-hosts"},e))}}class ee extends r.PureComponent{constructor(e){super(e),this.handleChange=this.handleChange.bind(this)}handleChange(){this.props.onChange(this.props.name,!this.props.checked)}render(){return this.props.onChange?this.props.checked?r.createElement("i",{className:"material-icons blue clickable",onClick:this.handleChange},"check_box"):r.createElement("i",{className:"material-icons blue clickable",onClick:this.handleChange},"check_box_outline_blank"):this.props.checked?r.createElement("i",{className:"material-icons"},"check_box"):r.createElement("i",{className:"material-icons"},"check_box_outline_blank")}}class te extends r.Component{constructor(e){super(e),this.state={mode:(e.mode||"").replace("N","")},this.handleChange=this.handleChange.bind(this),this.handleSubmit=this.handleSubmit.bind(this),this.handleCancel=this.handleCancel.bind(this)}handleChange(e){let t=this.state.mode;-1==t.indexOf(e)?t+=e:t=t.replace(e,""),this.setState({mode:t})}handleSubmit(){var e=(this.state.mode||"N").split("").sort().join("");e!==(this.props.mode||"N").split("").sort().join("")?this.props.onSubmit(e):this.props.onCancel()}handleCancel(){this.props.onCancel()}render(){const e={J:"Join (J)",R:"Read (R)",W:"Write (W)",P:"Get notified (P)",A:"Approve (A)",S:"Share (S)",D:"Delete (D)",O:"Owner (O)"};let t=this.props.skip||"",n=this.state.mode,i=(this.props.compare||"").replace("N",""),a=[];for(let o=0;o<"JRWPASDO".length;o++){let s="JRWPASDO".charAt(o);t.indexOf(s)>=0&&n.indexOf(s)<0||a.push(r.createElement("tr",{key:s},r.createElement("td",null,e[s]),r.createElement("td",{className:"checkbox"},t.indexOf(s)<0?r.createElement(ee,{name:s,checked:n.indexOf(s)>=0,onChange:this.handleChange}):r.createElement(ee,{name:s,checked:n.indexOf(s)>=0})),this.props.compare?r.createElement("td",{className:"checkbox"},r.createElement(ee,{name:s,checked:i.indexOf(s)>=0})):null))}return r.createElement("div",{className:"panel-form-column"},this.props.userTitle?r.createElement("ul",{className:"contact-box"},r.createElement(ge,{item:this.props.item,title:this.props.userTitle,avatar:N(this.props.userAvatar?this.props.userAvatar:null)})):null,r.createElement("label",{className:"small"},"Permissions"),r.createElement("table",{className:"permission-editor"},this.props.compare?r.createElement("thead",null,r.createElement("tr",null,r.createElement("th",null),r.createElement("th",null,this.props.modeTitle),r.createElement("th",null,this.props.compareTitle))):null,r.createElement("tbody",null,a)),r.createElement("br",null),r.createElement("div",{className:"dialog-buttons"},r.createElement("button",{className:"blue",onClick:this.handleSubmit},"Ok"),r.createElement("button",{className:"white",onClick:this.handleCancel},"Cancel")))}}class ne extends r.Component{constructor(e){super(e),this.state={placeholder:e.chips?"":e.prompt,sortedChips:ne.sortChips(e.chips,e.required),chipIndex:ne.indexChips(e.chips),input:"",focused:!1},this.handleTextInput=this.handleTextInput.bind(this),this.removeChipAt=this.removeChipAt.bind(this),this.handleChipCancel=this.handleChipCancel.bind(this),this.handleFocusGained=this.handleFocusGained.bind(this),this.handleFocusLost=this.handleFocusLost.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}UNSAFE_componentWillReceiveProps(e){this.setState({sortedChips:ne.sortChips(e.chips,e.required),chipIndex:ne.indexChips(e.chips)}),e.chips.length>this.props.chips.length&&this.setState({input:""})}static indexChips(e){var t={},n=0;return e.map(function(e){t[e.user]=n,n++}),t}static sortChips(e,t){var n=[],r=[];return e.map(function(e){e.user===t?n.push(e):r.push(e)}),n.concat(r)}handleTextInput(e){this.setState({input:e.target.value}),this.props.filterFunc&&this.props.filterFunc(e.target.value)}removeChipAt(e){var t=this.state.sortedChips[e];this.props.onChipRemoved(t.user,this.state.chipIndex[t.user])}handleChipCancel(e,t){this.removeChipAt(t)}handleFocusGained(){this.setState({focused:!0})}handleFocusLost(){this.setState({focused:!1}),this.props.onFocusLost&&this.props.onFocusLost(this.state.input)}handleKeyDown(e){if("Backspace"===e.key){if(0==this.state.input.length&&this.state.sortedChips.length>0){var t=this.state.sortedChips.length-1;this.state.sortedChips[t].user!==this.props.required&&this.removeChipAt(t)}}else"Enter"===e.key?this.props.onEnter&&this.props.onEnter(this.state.input):"Escape"===e.key&&this.props.onCancel&&this.props.onCancel()}render(){var e=[],t=0;this.state.sortedChips.map(n=>{e.push(r.createElement(re,{onCancel:this.handleChipCancel,avatar:N(n.public?n.public.photo:null),title:n.public?n.public.fn:void 0,noAvatar:this.props.avatarDisabled,topic:n.user,required:n.user===this.props.required,index:t,key:n.user})),t++});var n="chip-input"+(this.state.focused?" focused":"");return r.createElement("div",{className:n},e,r.createElement("input",{type:"text",placeholder:this.state.placeholder,onChange:this.handleTextInput,onFocus:this.handleFocusGained,onBlur:this.handleFocusLost,onKeyDown:this.handleKeyDown,value:this.state.input,autoFocus:!0}))}}class re extends r.PureComponent{constructor(e){super(e),this.handleCancel=this.handleCancel.bind(this)}handleCancel(){this.props.onCancel(this.props.topic,this.props.index)}render(){var e=this.props.title||this.props.topic;return r.createElement("div",{className:"chip"},this.props.noAvatar?r.createElement("span",{className:"spacer"}):r.createElement("div",{className:"avatar-box"},r.createElement(X,{avatar:this.props.avatar||!0,topic:this.props.topic,title:this.props.title})),r.createElement("span",null,e),this.props.onCancel&&!this.props.required?r.createElement("a",{href:"javascript:;",onClick:this.handleCancel},"×"):r.createElement("span",{className:"spacer"}))}}class ie extends r.Component{constructor(e){super(e),this.state={onlineSubs:e.subscribers||[]}}static getDerivedStateFromProps(e,t){return{onlineSubs:e.subscribers?e.subscribers:[]}}render(){var e=[];return this.state.onlineSubs.map(t=>{e.push(r.createElement("div",{className:"avatar-box",key:t.user},r.createElement(X,{topic:t.user,avatar:N(t.public?t.public.photo:null)||!0,title:t.public?t.public.fn:null})))}),r.createElement("div",{id:"topic-users"},e)}}class ae extends r.Component{constructor(e){super(e),this.state={login:e.login,password:"",hostName:e.serverAddress,saveToken:localStorage.getObject("keep-logged-in")},this.handleLoginChange=this.handleLoginChange.bind(this),this.handlePasswordChange=this.handlePasswordChange.bind(this),this.handleToggleSaveToken=this.handleToggleSaveToken.bind(this),this.handleSubmit=this.handleSubmit.bind(this)}handleLoginChange(e){this.setState({login:e.target.value})}handlePasswordChange(e){this.setState({password:e.target.value})}handleToggleSaveToken(){localStorage.setObject("keep-logged-in",!this.state.saveToken),this.setState({saveToken:!this.state.saveToken})}handleSubmit(e){e.preventDefault(),this.props.onLogin(this.state.login.trim(),this.state.password.trim())}render(){var e="blue";return this.props.disabled&&(e+=" disabled"),r.createElement("form",{id:"login-form",onSubmit:this.handleSubmit},r.createElement("input",{type:"text",id:"inputLogin",placeholder:"Login",autoComplete:"username",value:this.state.login,onChange:this.handleLoginChange,required:!0,autoFocus:!0}),r.createElement("input",{type:"password",id:"inputPassword",placeholder:"Password",autoComplete:"current-password",value:this.state.password,onChange:this.handlePasswordChange,required:!0}),r.createElement("div",{className:"panel-form-row"},r.createElement(ee,{id:"save-token",name:"save-token",checked:this.state.saveToken,onChange:this.handleToggleSaveToken}),r.createElement("label",{htmlFor:"save-token"}," Keep me logged in")),r.createElement("div",{className:"dialog-buttons"},r.createElement("button",{className:e,type:"submit"},"Sign in")))}}class oe extends r.PureComponent{constructor(e){super(e),this.state={login:"",password:"",password2:"",email:"",fn:"",imageDataUrl:null,errorCleared:!1,saveToken:localStorage.getObject("keep-logged-in")},this.handleLoginChange=this.handleLoginChange.bind(this),this.handlePasswordChange=this.handlePasswordChange.bind(this),this.handlePassword2Change=this.handlePassword2Change.bind(this),this.handleEmailChange=this.handleEmailChange.bind(this),this.handleFnChange=this.handleFnChange.bind(this),this.handleImageChanged=this.handleImageChanged.bind(this),this.handleToggleSaveToken=this.handleToggleSaveToken.bind(this),this.handleSubmit=this.handleSubmit.bind(this)}handleLoginChange(e){this.setState({login:e.target.value})}handlePasswordChange(e){this.setState({password:e.target.value})}handlePassword2Change(e){this.setState({password2:e.target.value})}handleEmailChange(e){this.setState({email:e.target.value})}handleFnChange(e){this.setState({fn:e.target.value})}handleImageChanged(e){this.setState({imageDataUrl:e})}handleToggleSaveToken(){localStorage.setObject("keep-logged-in",!this.state.saveToken),this.setState({saveToken:!this.state.saveToken})}handleSubmit(e){e.preventDefault(),this.state.password.trim()!=this.state.password2.trim()?this.props.onError("Passwords don't match","warn"):(this.setState({errorCleared:!1}),this.props.onCreateAccount(this.state.login.trim(),this.state.password.trim(),H(this.state.fn,this.state.imageDataUrl),{meth:"email",val:this.state.email}))}render(){var e="blue";return this.props.disabled&&(e+=" disabled"),r.createElement("form",{className:"panel-form-column",onSubmit:this.handleSubmit},r.createElement("div",{className:"panel-form-row"},r.createElement("div",{className:"panel-form-column"},r.createElement("input",{type:"text",placeholder:"Login",autoComplete:"user-name",value:this.state.login,onChange:this.handleLoginChange,required:!0,autoFocus:!0}),r.createElement("input",{type:"password",placeholder:"Password",autoComplete:"new-password",value:this.state.password,onChange:this.handlePasswordChange,required:!0}),r.createElement("input",{type:"password",placeholder:"Repeat password",autoComplete:"new-password",value:this.state.password2,onChange:this.handlePassword2Change,required:!0})),r.createElement(se,{onImageChanged:this.handleImageChanged,onError:this.props.onError})),r.createElement("div",{className:"panel-form-row"},r.createElement("input",{type:"email",placeholder:"Email, e.g john.doe@example.com",autoComplete:"email",value:this.state.email,onChange:this.handleEmailChange,required:!0})),r.createElement("div",{className:"panel-form-row"},r.createElement("input",{type:"text",placeholder:"Full name, e.g. John Doe",autoComplete:"name",value:this.state.fn,onChange:this.handleFnChange,required:!0})),r.createElement("div",{className:"panel-form-row"},r.createElement(ee,{id:"save-token",name:"save-token",checked:this.state.saveToken,onChange:this.handleToggleSaveToken}),r.createElement("label",{htmlFor:"save-token"}," Keep me logged in")),r.createElement("div",{className:"dialog-buttons"},r.createElement("button",{className:e,type:"submit"},"Sign up")))}}class se extends r.Component{constructor(e){super(e),this.state={dataUrl:e.avatar},this.handleFileUpload=this.handleFileUpload.bind(this)}static getDerivedStateFromProps(e,t){return t.dataUrl!=e.avatar?{dataUrl:e.avatar}:null}handleFileUpload(e){O(e.target.files[0],w,w,!0,(e,t)=>{var n=N({data:e,type:t});this.setState({dataUrl:n}),this.props.onImageChanged(n)},e=>{this.props.onError(e,"err")}),e.target.value=""}render(){var e="file-input-avatar-"+(Math.random()+"").substr(2);return r.createElement("div",{className:"avatar-upload"},this.state.dataUrl?r.createElement("img",{src:this.state.dataUrl,className:"preview"}):this.props.readOnly&&this.props.uid?r.createElement("div",{className:"avatar-box"},r.createElement(X,{avatar:!0,topic:this.props.uid,title:this.props.title})):r.createElement("div",{className:"blank"},"128×128"),this.props.readOnly?null:r.createElement("input",{type:"file",id:e,className:"inputfile hidden",accept:"image/*",onChange:this.handleFileUpload}),this.props.readOnly?null:r.createElement("label",{htmlFor:e,className:"round"},r.createElement("i",{className:"material-icons"},"file_upload")))}}class le extends r.PureComponent{constructor(e){super(e),this.state={transport:e.transport||"def",serverAddress:e.serverAddress},this.handleSubmit=this.handleSubmit.bind(this),this.handleTransportSelected=this.handleTransportSelected.bind(this),this.handleServerAddressChange=this.handleServerAddressChange.bind(this)}handleSubmit(e){e.preventDefault(),this.props.onUpdate({transport:this.state.transport,serverAddress:this.state.serverAddress})}handleTransportSelected(e){this.setState({transport:e.currentTarget.value})}handleServerAddressChange(e){this.setState({serverAddress:e}),this.props.onServerAddressChange(e)}render(){var e={def:"default",ws:"websocket",lp:"long polling"},t=[],n=this;return["def","ws","lp"].map(function(i){var a="transport-"+i,o=e[i];t.push(r.createElement("li",{key:i},r.createElement("input",{type:"radio",id:a,name:"transport-select",value:i,checked:n.state.transport===i,onChange:n.handleTransportSelected}),r.createElement("label",{htmlFor:a},o)))}),r.createElement("form",{id:"settings-form",className:"panel-form",onSubmit:this.handleSubmit},r.createElement("div",{className:"panel-form-row"},r.createElement("label",{className:"small"},"Server to use:")),r.createElement(Z,{serverAddress:this.state.serverAddress,onServerAddressChange:this.handleServerAddressChange}),r.createElement("div",{className:"panel-form-row"},r.createElement("label",{className:"small"},"Wire transport:")),r.createElement("div",{className:"panel-form-row"},r.createElement("ul",{className:"quoted"},t)),r.createElement("div",{className:"dialog-buttons"},r.createElement("button",{type:"submit",className:"blue"},"Update")))}}class ce extends r.PureComponent{render(){return r.createElement("div",{id:"side-caption-panel",className:"caption-panel"},r.createElement("div",{id:"self-avatar",className:"avatar-box"},r.createElement(X,{avatar:this.props.avatar,topic:this.props.myUserId,title:this.props.title})),r.createElement("div",{id:"sidepanel-title",className:"panel-title"},this.props.title),"login"===this.props.state?r.createElement(ue,{onSignUp:this.props.onSignUp,onSettings:this.props.onSettings}):"contacts"===this.props.state?r.createElement(de,{onNewTopic:this.props.onNewTopic,onSettings:this.props.onSettings}):null,this.props.onCancel?r.createElement($,{onCancel:this.props.onCancel}):null)}}class ue extends r.PureComponent{render(){return r.createElement("div",null,r.createElement("a",{href:"javascript:;",onClick:this.props.onSignUp},r.createElement("i",{className:"material-icons"},"person_add"))," ",r.createElement("a",{href:"javascript:;",onClick:this.props.onSettings},r.createElement("i",{className:"material-icons"},"settings")))}}class de extends r.PureComponent{render(){return r.createElement("div",null,r.createElement("a",{href:"javascript:;",onClick:this.props.onNewTopic},r.createElement("i",{className:"material-icons"},"chat"))," ",r.createElement("a",{href:"javascript:;",onClick:this.props.onSettings},r.createElement("i",{className:"material-icons"},"settings")))}}class pe extends r.Component{constructor(e){super(e),this.handleLoginRequested=this.handleLoginRequested.bind(this)}handleLoginRequested(e,t){this.props.onLoginRequest(e,t)}render(){var e=null,t=!1,n=void 0,i=this.props.state||(this.props.myUserId?"contacts":"login");switch(i){case"login":e="Sign In";break;case"register":e="Create Account",n=this.props.onCancel;break;case"settings":e="Settings",n=this.props.onCancel;break;case"edit":e="Edit Account",n=this.props.onCancel;break;case"contacts":e=this.props.title,t=!this.props.avatar||this.props.avatar;break;case"newtpk":e="Start New Chat",n=this.props.onCancel;break;case"cred":e="Confirm Credentials",n=this.props.onCancel}return r.createElement("div",{id:"sidepanel",className:this.props.hideSelf?"nodisplay":null},r.createElement(ce,{state:i,title:e,avatar:t,myUserId:this.props.myUserId,onSignUp:this.props.onSignUp,onSettings:this.props.onSettings,onNewTopic:this.props.onNewTopic,onCancel:n}),r.createElement(he,{level:this.props.errorLevel,text:this.props.errorText,onClearError:this.props.onError}),"login"===i?r.createElement(ae,{login:this.props.login,disabled:this.props.loginDisabled,onLogin:this.handleLoginRequested}):"register"===i?r.createElement(oe,{onCreateAccount:this.props.onCreateAccount,onCancel:this.props.onCancel,onError:this.props.onError}):"settings"===i?r.createElement(le,{transport:this.props.transport,serverAddress:this.props.serverAddress,onServerAddressChange:this.props.onGlobalSettings,onCancel:this.props.onCancel,onUpdate:this.props.onGlobalSettings}):"edit"===i?r.createElement(fe,{tinode:this.props.tinode,myUserId:this.props.myUserId,messageSounds:this.props.messageSounds,desktopAlerts:this.props.desktopAlerts,desktopAlertsEnabled:this.props.desktopAlertsEnabled,onSubmit:this.props.onUpdateAccount,onUpdateTags:this.props.onUpdateAccountTags,onTogglePushNotifications:this.props.onTogglePushNotifications,onToggleMessageSounds:this.props.onToggleMessageSounds,onLogout:this.props.onLogout,onCancel:this.props.onCancel,onError:this.props.onError}):"contacts"===i?r.createElement(ye,{tinode:this.props.tinode,myUserId:this.props.myUserId,connected:this.props.connected,topicSelected:this.props.topicSelected,chatList:this.props.chatList,showContextMenu:this.props.showContextMenu,onTopicSelected:this.props.onTopicSelected}):"newtpk"===i?r.createElement(_e,{searchResults:this.props.searchResults,onInitFind:this.props.onInitFind,onSearchContacts:this.props.onSearchContacts,onCreateTopic:this.props.onCreateTopic,onError:this.props.onError}):"cred"===i?r.createElement(ke,{credCode:this.props.credCode,credMethod:this.props.credMethod,onSubmit:this.props.onValidateCredentials,onCancel:this.props.onCancel,onError:this.props.onError}):null)}}class he extends r.PureComponent{constructor(e){super(e),this.state={show:!1},this.hide=this.hide.bind(this)}static getDerivedStateFromProps(e,t){return{show:!!e.level}}hide(){this.setState({show:!1}),this.props.onClearError&&this.props.onClearError()}render(){var e="err"==this.props.level?"error":"warning";return r.createElement("div",{className:this.state.show?"err"==this.props.level?"alert-box error":"alert-box warning":"alert-box"},r.createElement("div",{className:"icon"},r.createElement("i",{className:"material-icons"},e)),this.props.text,r.createElement("div",{className:"cancel"},r.createElement($,{onCancel:this.hide})))}}class fe extends r.Component{constructor(e){super(e);let t=this.props.tinode.getMeTopic(),n=t.getDefaultAccess(),r=this.props.tinode.getFndTopic();this.state={fullName:t.public?t.public.fn:void 0,avatar:N(t.public?t.public.photo:null),auth:n.auth,anon:n.anon,tags:r.tags(),previousOnTags:r.onTagsUpdated},this.tnNewTags=this.tnNewTags.bind(this),this.handleFullNameUpdate=this.handleFullNameUpdate.bind(this),this.handlePasswordUpdate=this.handlePasswordUpdate.bind(this),this.handleImageChanged=this.handleImageChanged.bind(this),this.handleCheckboxClick=this.handleCheckboxClick.bind(this),this.handleTagsUpdated=this.handleTagsUpdated.bind(this)}componentDidMount(){let e=this.props.tinode.getFndTopic();e.onTagsUpdated=this.tnNewTags,e.isSubscribed()||e.subscribe(e.startMetaQuery().withLaterDesc().withTags().build()).catch(e=>{this.props.onError(e.message,"err")})}componentWillUnmount(){this.props.tinode.getFndTopic().onTagsUpdated=this.state.previousOnTags}tnNewTags(e){this.setState({tags:e})}handleFullNameUpdate(e){this.setState({fullName:e}),this.props.onSubmit(null,H(e,this.state.avatar))}handlePasswordUpdate(e){this.setState({password:e}),this.props.onSubmit(e,null)}handleImageChanged(e){this.setState({avatar:e}),this.props.onSubmit(null,H(this.state.fullName,e))}handleCheckboxClick(e,t){"sound"==e?this.props.onToggleMessageSounds(t):"alert"==e&&this.props.onTogglePushNotifications(t)}handleTagsUpdated(e){K(this.state.tags.slice(0),e.slice(0))||this.props.onUpdateTags(e)}render(){var e=[];return this.state.tags.map(function(t){e.push(r.createElement("span",{className:"badge",key:e.length},t))}),0==e.length&&(e=r.createElement("i",null,"No tags defined. Add some.")),r.createElement("div",{id:"edit-account",className:"scrollable-panel"},r.createElement("div",{className:"panel-form-row"},r.createElement("div",{className:"panel-form-column"},r.createElement("div",null,r.createElement("label",{className:"small"},"Your name")),r.createElement("div",null,r.createElement(J,{placeholder:"Full name, e.g. John Doe",text:this.state.fullName,onFinished:this.handleFullNameUpdate})),r.createElement("div",null,r.createElement("label",{className:"small"},"Password")),r.createElement("div",null,r.createElement(J,{placeholder:"Unchanged",type:"password",onFinished:this.handlePasswordUpdate}))),r.createElement(se,{avatar:this.state.avatar,uid:this.props.myUserId,title:this.state.fullName,onImageChanged:this.handleImageChanged,onError:this.props.onError})),r.createElement("div",{className:"hr"}),r.createElement("div",{className:"panel-form-column"},r.createElement("div",{className:"panel-form-row"},r.createElement("label",null,"Address:"),r.createElement("tt",null,this.props.myUserId)),r.createElement("div",null,r.createElement("label",{className:"small"},"Default access mode:")),r.createElement("div",{className:"quoted"},r.createElement("div",null,"Auth: ",r.createElement("tt",null,this.state.auth)),r.createElement("div",null,"Anon: ",r.createElement("tt",null,this.state.anon)))),r.createElement("div",{className:"hr"}),r.createElement("div",{className:"panel-form-row"},r.createElement("label",{htmlFor:"message-sound"},"Message sound:"),r.createElement(ee,{name:"sound",id:"message-sound",checked:this.props.messageSounds,onChange:this.handleCheckboxClick})),r.createElement("div",{className:"panel-form-row"},r.createElement("label",{htmlFor:"desktop-alerts"},"Notification alerts",this.props.desktopAlertsEnabled?null:" (requires HTTPS)",":"),r.createElement(ee,{name:"alert",id:"desktop-alerts",checked:this.props.desktopAlerts,onChange:this.props.desktopAlertsEnabled?this.handleCheckboxClick:null})),r.createElement("div",{className:"hr"}),r.createElement(me,{title:"Tags (user discovery)",activated:!1,tags:this.state.tags,onSubmit:this.handleTagsUpdated}),r.createElement("div",{className:"hr"}),r.createElement("div",{className:"panel-form-column"},r.createElement("a",{href:"javascript:;",className:"red flat-button",onClick:this.props.onLogout},r.createElement("i",{className:"material-icons"},"exit_to_app")," Logout")))}}class me extends r.Component{constructor(e){super(e),this.state={tags:this.props.tags,tagInput:"",activated:this.props.activated,noTagsMessage:"Add some tags"},this.handleShowTagManager=this.handleShowTagManager.bind(this),this.handleTagInput=this.handleTagInput.bind(this),this.handleAddTag=this.handleAddTag.bind(this),this.handleRemoveTag=this.handleRemoveTag.bind(this),this.handleSubmit=this.handleSubmit.bind(this),this.handleCancel=this.handleCancel.bind(this)}static getDerivedStateFromProps(e,t){return K(e.tags,t.tags)||t.activated?null:{tags:e.tags}}handleShowTagManager(){this.setState({activated:!0})}handleTagInput(e){if(this.setState({tagInput:e}),e.length>0){var t=e[e.length-1];if(","==t||" "==t||";"==t){var n=e.substr(0,e.length-1).trim();n.length>=v&&this.handleAddTag(n)}}}handleAddTag(e){if((e=e.trim()).length>0){let t=this.state.tags.slice(0);t.push(e),this.setState({tags:t,tagInput:""}),this.props.onTagsChanged&&this.props.onTagsChanged(t)}}handleRemoveTag(e,t){var n=this.state.tags.slice(0);n.splice(t,1),this.setState({tags:n}),this.props.onTagsChanged&&this.props.onTagsChanged(n)}handleSubmit(){let e=this.state.tags.slice(0),t=this.state.tagInput.trim();t.length>0&&(e.push(t),this.props.onTagsChanged&&this.props.onTagsChanged(e)),this.props.onSubmit(e),this.setState({activated:!1,tagInput:"",tags:this.props.tags})}handleCancel(){this.setState({activated:!1,tagInput:"",tags:this.props.tags}),this.props.onCancel&&this.props.onCancel()}render(){var e=[];return this.state.activated?this.state.tags.map(function(t){e.push({user:t})}):(this.state.tags.map(function(t){e.push(r.createElement("span",{className:"badge",key:e.length},t))}),0==e.length&&(e=r.createElement("i",null,"No tags defined. Add some."))),r.createElement("div",{className:"panel-form-column"},r.createElement("div",{className:"panel-form-row"},r.createElement("label",{className:"small"},this.props.title)),this.state.activated?r.createElement("div",null,r.createElement(ne,{chips:e,avatarDisabled:!0,prompt:this.state.noTagsMessage,onEnter:this.handleAddTag,onFocusLost:this.handleAddTag,onCancel:this.handleCancel,onChipRemoved:this.handleRemoveTag,filterFunc:this.handleTagInput}),this.props.onSubmit||this.props.onCancel?r.createElement("div",{id:"tag-manager-buttons",className:"panel-form-row"},r.createElement("button",{className:"blue",onClick:this.handleSubmit},"OK"),r.createElement("button",{className:"white",onClick:this.handleCancel},"Cancel")):null):r.createElement("div",null,r.createElement("a",{href:"javascript:;",className:"flat-button",onClick:this.handleShowTagManager},r.createElement("i",{className:"material-icons"},"edit")," Manage tags"),r.createElement("span",null,e)))}}class ge extends r.Component{constructor(e){super(e),this.handleClick=this.handleClick.bind(this),this.handleContextClick=this.handleContextClick.bind(this)}handleClick(e){e.preventDefault(),e.stopPropagation(),this.props.onSelected&&this.props.onSelected(this.props.item,this.props.index,this.props.now,this.props.acs)}handleContextClick(e){e.preventDefault(),e.stopPropagation(),this.props.showContextMenu({topicName:this.props.item,y:e.pageY,x:e.pageX})}render(){var e=this.props.title;e?e.length>30&&(e=e.substring(0,28)+"..."):e=r.createElement("i",null,"unknown");var t=this.props.now?"online":"offline",n=!this.props.avatar||this.props.avatar,i=[];if(this.props.badges&&this.props.badges.length>0){var a=0;this.props.badges.map(function(e){var t="badge"+(e.color?" "+e.color:"");i.push(r.createElement("span",{className:t,key:a},e.name)),a++})}return this.props.showMode&&this.props.acs&&i.push(r.createElement("span",{className:"badge",key:"mode"},this.props.acs.getMode())),r.createElement("li",{className:!this.props.showCheckmark&&this.props.selected?"selected":null,onClick:this.handleClick},r.createElement("div",{className:"avatar-box"},r.createElement(X,{avatar:n,title:this.props.title,topic:this.props.item}),this.props.showOnline?r.createElement("span",{className:t}):this.props.showCheckmark&&this.props.selected?r.createElement("i",{className:"checkmark material-icons"},"check_circle"):null),r.createElement("div",{className:"text-box"},r.createElement("div",null,r.createElement("span",{className:"contact-title"},e),this.props.unread>0?r.createElement(ve,{count:this.props.unread}):null),this.props.comment?r.createElement("div",{className:"contact-comment"},this.props.comment):null,r.createElement("span",null,i)),this.props.showContextMenu?r.createElement("span",{className:"menuTrigger"},r.createElement("a",{href:"javascript:;",onClick:this.handleContextClick},r.createElement("i",{className:"material-icons"},"expand_more"))):null)}}class ve extends r.PureComponent{render(){var e=null;if(this.props.count>0){var t=this.props.count>9?"9+":this.props.count;e=r.createElement("span",{className:"unread"},t)}return e}}class ye extends r.Component{constructor(e){super(e),this.state=ye.getDerivedStateFromProps(e,{})}static getDerivedStateFromProps(e,t){let n=[],r=0;return e.chatList.map(e=>{r+=e.unread>0?1:0,n.push(e)}),n.sort(function(e,t){return t.touched-e.touched}),function(e){var t=document.getElementById("shortcut-icon");if(t){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("link");r.type="image/png",r.id="shortcut-icon",r.rel="shortcut icon",r.href="img/logo32x32"+(e>0?"a":"")+".png",n.removeChild(t),n.appendChild(r)}document.title=(e>0?"("+e+") ":"")+"Tinode"}(r),{contactList:n}}render(){return r.createElement(be,{connected:this.props.connected,contacts:this.state.contactList,emptyListMessage:r.createElement("span",null,"You have no chats",r.createElement("br",null),"¯\\_(ツ)_/¯"),topicSelected:this.props.topicSelected,myUserId:this.props.myUserId,showOnline:!0,showUnread:!0,onTopicSelected:this.props.onTopicSelected,showContextMenu:this.props.showContextMenu})}}class be extends r.Component{render(){var e=[],t=Array.isArray(this.props.topicSelected);return this.props.contacts&&this.props.contacts.length>0&&this.props.contacts.map(n=>{var i=n.topic?n.topic:n.user;if(this.props.filterFunc&&this.props.filter){var a=[i];if(n.private&&n.private.comment&&a.push((""+n.private.comment).toLowerCase()),n.public&&n.public.fn&&a.push((""+n.public.fn).toLowerCase()),!this.props.filterFunc(this.props.filter,a))return}var o=t?this.props.topicSelected.indexOf(i)>-1:this.props.topicSelected===i,s=[];this.props.showMode&&(i===this.props.myUserId&&s.push({name:"you",color:"green"}),n.acs&&n.acs.isOwner()&&s.push({name:"owner"}));var l=Array.isArray(n.private)?n.private.join(", "):n.private?n.private.comment:null;e.push(r.createElement(ge,{title:n.public?n.public.fn:null,avatar:N(n.public?n.public.photo:null),comment:l,unread:this.props.showUnread?n.unread:0,now:n.online&&this.props.connected,acs:n.acs,showMode:this.props.showMode,badges:s,showCheckmark:t,selected:o,showOnline:this.props.showOnline,onSelected:this.props.onTopicSelected,showContextMenu:this.props.showContextMenu,item:i,index:e.length,key:i}))},this),r.createElement("div",{className:this.props.noScroll?null:"scrollable-panel"},e.length>0?r.createElement("ul",{className:"contact-box"},e):r.createElement("div",{className:"center-medium-text"},this.props.emptyListMessage))}}class we extends r.Component{constructor(e){super(e),this.state={members:e.members,index:we.indexMembers(e.members),contactFilter:"",noContactsMessage:"You have no contacts :-(",selectedContacts:we.selectedContacts(e.members)},this.handleContactSelected=this.handleContactSelected.bind(this),this.handleMemberRemoved=this.handleMemberRemoved.bind(this),this.handleContactFilter=this.handleContactFilter.bind(this),this.handleSubmit=this.handleSubmit.bind(this),this.handleCancel=this.handleCancel.bind(this)}static indexMembers(e){var t={};return e.map(function(e){t[e.user]={delta:0,present:!0}}),t}static selectedContacts(e){var t=[];return e.map(function(e){t.push(e.user)}),t}handleContactSelected(e,t){var n=this.state.index[e];if(n){if(n.present)return;n.delta+=1,n.present=!0}else n={delta:1,present:!0};var r=this.state.members.slice();r.push(this.props.contacts[t]);var i=we.selectedContacts(r),a=this.state.index;a[e]=n,this.setState({members:r,index:a,selectedContacts:i})}handleMemberRemoved(e,t){var n=this.state.index[e];if(n&&n.present){n.present=!1,n.delta-=1;var r=this.state.members.slice();r.splice(t,1);var i=we.selectedContacts(r),a=this.state.index;a[e]=n,this.setState({members:r,index:a,selectedContacts:i})}}handleContactFilter(e){var t=e?"No contacts match '"+e+"'":"You have no contacts :-(";this.setState({contactFilter:e,noContactsMessage:t})}static doContactFiltering(e,t){if(e){for(var n=0;n<t.length;n++)if(t[n].indexOf(e)>=0)return!0;return!1}return!0}handleSubmit(){var e=this,t=[],n=[],r=[];Object.keys(this.state.index).map(function(i){e.state.index[i].present&&t.push(i),e.state.index[i].delta>0?n.push(i):e.state.index[i].delta<0&&r.push(i)}),this.props.onSubmit(t,n,r)}handleCancel(){this.props.onCancel()}render(){return r.createElement("div",{id:"group-manager"},r.createElement("div",{className:"panel-form-row"},r.createElement("label",{className:"small"},"Group members")),r.createElement("div",{className:"panel-form-row"},r.createElement(ne,{chips:this.state.members,required:this.props.requiredMember,prompt:"add members",filterFunc:this.handleContactFilter,onChipRemoved:this.handleMemberRemoved})),r.createElement("div",{className:"panel-form-row"},r.createElement("label",{className:"small"},"All contacts")),r.createElement(be,{contacts:this.props.contacts,myUserId:this.props.myUserId,topicSelected:this.state.selectedContacts,filter:this.state.contactFilter,filterFunc:we.doContactFiltering,emptyListMessage:this.state.noContactsMessage,showOnline:!1,showUnread:!1,onTopicSelected:this.handleContactSelected}),r.createElement("div",{id:"group-manager-buttons",className:"panel-form-row"},r.createElement("button",{className:"blue",onClick:this.handleSubmit},"OK"),r.createElement("button",{className:"white",onClick:this.handleCancel},"Cancel")))}}class _e extends r.Component{constructor(e){super(e),this.state={tabSelected:"p2p",contactList:e.searchResults},this.handleTabClick=this.handleTabClick.bind(this),this.handleContactSelected=this.handleContactSelected.bind(this),this.handleNewGroupSubmit=this.handleNewGroupSubmit.bind(this),this.handleGroupByID=this.handleGroupByID.bind(this)}componentDidMount(){this.props.onInitFind()}static getDerivedStateFromProps(e,t){return{contactList:e.searchResults}}handleTabClick(e){e.preventDefault(),F(W(window.location.hash,"tab",e.currentTarget.dataset.id)),this.setState({tabSelected:e.currentTarget.dataset.id})}handleContactSelected(e){"p2p"===this.state.tabSelected&&(F(B(window.location.hash,"tab")),this.props.onCreateTopic(e,void 0))}handleNewGroupSubmit(e,t,n,r){F(B(window.location.hash,"tab")),this.props.onCreateTopic(void 0,H(e,t),n,r)}handleGroupByID(e){F(B(window.location.hash,"tab")),this.props.onCreateTopic(e)}render(){return r.createElement("div",{className:"flex-column"},r.createElement("ul",{className:"tabbar"},r.createElement("li",{className:"p2p"===this.state.tabSelected?"active":null},r.createElement("a",{href:"javascript:;","data-id":"p2p",onClick:this.handleTabClick},"find")),r.createElement("li",{className:"grp"===this.state.tabSelected?"active":null},r.createElement("a",{href:"javascript:;","data-id":"grp",onClick:this.handleTabClick},"new group")),r.createElement("li",{className:"byid"===this.state.tabSelected?"active":null},r.createElement("a",{href:"javascript:;","data-id":"byid",onClick:this.handleTabClick},"by id"))),"grp"===this.state.tabSelected?r.createElement(Ee,{onSubmit:this.handleNewGroupSubmit}):"byid"===this.state.tabSelected?r.createElement(Te,{onSubmit:this.handleGroupByID,onError:this.props.onError}):r.createElement("div",{className:"flex-column"},r.createElement(Se,{type:"p2p",onSearchContacts:this.props.onSearchContacts}),r.createElement(be,{contacts:this.state.contactList,myUserId:this.props.myUserId,emptyListMessage:"Use search to find contacts",topicSelected:this.state.selectedContact,showOnline:!1,showUnread:!1,showContextMenu:!1,onTopicSelected:this.handleContactSelected})))}}class Ee extends r.PureComponent{constructor(e){super(e),this.state={fn:"",private:"",imageDataUrl:null,tags:[]},this.handleFnChange=this.handleFnChange.bind(this),this.handlePrivateChange=this.handlePrivateChange.bind(this),this.handleImageChanged=this.handleImageChanged.bind(this),this.handleTagsChanged=this.handleTagsChanged.bind(this),this.handleTagsChanged=this.handleTagsChanged.bind(this),this.handleSubmit=this.handleSubmit.bind(this)}handleFnChange(e){this.setState({fn:e.target.value})}handlePrivateChange(e){this.setState({private:e.target.value})}handleImageChanged(e){this.setState({imageDataUrl:e})}handleTagsChanged(e){this.setState({tags:e})}handleSubmit(e){e.preventDefault(),this.state.fn&&this.state.fn.trim()&&this.props.onSubmit(this.state.fn.trim(),this.state.imageDataUrl,this.state.private.trim(),this.state.tags)}render(){var e="blue";return this.props.disabled&&(e+=" disabled"),r.createElement("form",{className:"panel-form",onSubmit:this.handleSubmit},r.createElement("div",{className:"panel-form-row"},r.createElement("div",{className:"panel-form-column"},r.createElement("label",{className:"small",htmlFor:"new-topic-fn"},"Group name"),r.createElement("input",{type:"text",id:"new-topic-fn",placeholder:"Freeform name of the group",value:this.state.fn,onChange:this.handleFnChange,autoFocus:!0,required:!0}),r.createElement("br",null),r.createElement("label",{className:"small",htmlFor:"new-topic-priv"},"Private comment"),r.createElement("input",{type:"text",id:"new-topic-priv",placeholder:"Visible to you only",value:this.state.private,onChange:this.handlePrivateChange})),r.createElement(se,{onError:this.props.onError,onImageChanged:this.handleImageChanged})),r.createElement(me,{tags:this.state.tags,activated:!0,onTagsChanged:this.handleTagsChanged,title:"Optional tags (search and discovery)"}),r.createElement("div",{className:"dialog-buttons"},r.createElement("button",{className:e},"Create")))}}class Se extends r.PureComponent{constructor(e){super(e),this.state={edited:!1,search:""},this.handleSearchChange=this.handleSearchChange.bind(this),this.handleSearch=this.handleSearch.bind(this),this.handleClear=this.handleClear.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}componentWillUnmount(){this.state.edited&&(this.setState({search:"",edited:!1}),this.props.onSearchContacts(a.DEL_CHAR))}handleSearchChange(e){this.setState({search:e.target.value})}handleSearch(e){e.preventDefault();var t=this.state.search.trim();this.setState({edited:t.length>0}),this.props.onSearchContacts(t.length>0?t:a.DEL_CHAR)}handleClear(){this.state.edited&&this.props.onSearchContacts(a.DEL_CHAR),this.setState({search:"",edited:!1})}handleKeyDown(e){"Enter"===e.key?this.handleSearch(e):"Escape"===e.key&&this.handleClear()}render(){return r.createElement("div",{className:"panel-form"},r.createElement("div",{className:"panel-form-row"},r.createElement("i",{className:"material-icons search"},"search"),r.createElement("input",{className:"search",type:"text",placeholder:"List like email:alice@example.com, tel:17025550003...",value:this.state.search,onChange:this.handleSearchChange,onKeyDown:this.handleKeyDown,required:!0,autoFocus:!0}),r.createElement("a",{href:"javascript:;",onClick:this.handleClear},r.createElement("i",{className:"material-icons"},"close"))))}}class Te extends r.PureComponent{constructor(e){super(e),this.state={groupId:""},this.handleChange=this.handleChange.bind(this),this.handleKeyPress=this.handleKeyPress.bind(this),this.handleSubmit=this.handleSubmit.bind(this)}handleChange(e){this.setState({groupId:e.target.value})}handleKeyPress(e){"Enter"===e.key&&this.handleSubmit(e)}handleSubmit(e){if(e.preventDefault(),this.state.groupId){var t=this.state.groupId.trim();t.length>3&&("usr"==t.substr(0,3)||"grp"==t.substr(0,3))?this.props.onSubmit(t):this.props.onError("Invalid ID","err")}}render(){return r.createElement("div",{className:"panel-form"},r.createElement("div",{className:"panel-form-row"},r.createElement("input",{type:"text",placeholder:"Group or User ID",value:this.state.groupId,onChange:this.handleChange,onKeyPress:this.handleKeyPress,required:!0})),r.createElement("div",{className:"dialog-buttons"},r.createElement("button",{className:"blue",onClick:this.handleSubmit},"Subscribe")))}}class ke extends r.PureComponent{constructor(e){super(e),this.state={code:e.credCode||""},this.handleChange=this.handleChange.bind(this),this.handleKeyPress=this.handleKeyPress.bind(this),this.handleSubmit=this.handleSubmit.bind(this)}handleChange(e){this.setState({code:e.target.value})}handleKeyPress(e){"Enter"===e.key&&this.handleSubmit(e)}handleSubmit(e){e.preventDefault(),this.state.code&&this.state.code.trim()&&this.props.onSubmit(this.props.credMethod,this.state.code.trim())}render(){var e={email:"email",tel:"phone"}[this.props.credMethod]||this.props.credMethod;return r.createElement("div",{className:"panel-form"},r.createElement("div",{className:"panel-form-row"},r.createElement("label",{className:"small",htmlFor:"enter-confirmation-code"},"Enter confirmation code sent to you by ",e,":")),r.createElement("div",{className:"panel-form-row"},r.createElement("input",{type:"text",id:"enter-confirmation-code",placeholder:"Numbers only",value:this.state.code,onChange:this.handleChange,onKeyPress:this.handleKeyPress,required:!0})),r.createElement("div",{className:"dialog-buttons"},r.createElement("button",{className:"blue",onClick:this.handleSubmit},"Confirm")))}}class Ce extends r.Component{constructor(e){super(e),this.state={topic:null,owner:!1,admin:!1,sharer:!1,muted:!1,address:null,groupTopic:void 0,fullName:void 0,avatar:null,private:null,selectedContact:null,access:null,modeGiven:null,modeWant:null,modeGiven2:null,modeWant2:null,auth:null,anon:null,contactList:[],tags:[],showMemberPanel:!1,showPermissionEditorFor:void 0,moreInfoExpanded:!1,previousMetaDesc:void 0,previousSubsUpdated:void 0,previousTagsUpdated:void 0},this.resetSubs=this.resetSubs.bind(this),this.resetDesc=this.resetDesc.bind(this),this.onMetaDesc=this.onMetaDesc.bind(this),this.onSubsUpdated=this.onSubsUpdated.bind(this),this.onTagsUpdated=this.onTagsUpdated.bind(this),this.handleFullNameUpdate=this.handleFullNameUpdate.bind(this),this.handlePrivateUpdate=this.handlePrivateUpdate.bind(this),this.handleImageChanged=this.handleImageChanged.bind(this),this.handleMuted=this.handleMuted.bind(this),this.handlePermissionsChanged=this.handlePermissionsChanged.bind(this),this.handleLaunchPermissionsEditor=this.handleLaunchPermissionsEditor.bind(this),this.handleHidePermissionsEditor=this.handleHidePermissionsEditor.bind(this),this.handleShowAddMembers=this.handleShowAddMembers.bind(this),this.handleHideAddMembers=this.handleHideAddMembers.bind(this),this.handleMemberUpdateRequest=this.handleMemberUpdateRequest.bind(this),this.handleLeave=this.handleLeave.bind(this),this.handleMemberSelected=this.handleMemberSelected.bind(this),this.handleMoreInfo=this.handleMoreInfo.bind(this),this.handleTagsUpdated=this.handleTagsUpdated.bind(this),this.handleContextMenu=this.handleContextMenu.bind(this)}UNSAFE_componentWillReceiveProps(e){var t=this.props.tinode.getTopic(e.topic);t&&(this.onMetaDesc!=t.onMetaDesc&&(this.previousMetaDesc=t.onMetaDesc,t.onMetaDesc=this.onMetaDesc,this.previousSubsUpdated=t.onSubsUpdated,t.onSubsUpdated=this.onSubsUpdated,"grp"==t.getType()?(this.previousTagsUpdated=t.onTagsUpdated,t.onTagsUpdated=this.onTagsUpdated):this.previousTagsUpdated=void 0),this.state.topic!=e.topic&&(this.setState({topic:e.topic}),this.resetDesc(t,e),this.resetSubs(t,e)))}componentWillUnmount(){var e=this.props.tinode.getTopic(this.props.topic);e&&(this.setState({topic:null}),e.onMetaDesc=this.previousMetaDesc,e.onSubsUpdated=this.previousSubsUpdated,e.onTagsUpdated=this.previousTagsUpdated)}resetSubs(e,t){var n={contactList:[]};if("p2p"==e.getType()){var r=e.subscriber(t.topic);r&&(n.modeGiven2=r.acs.getGiven(),n.modeWant2=r.acs.getWant())}else e.subscribers(function(e){n.contactList.push(e)},this);this.setState(n)}resetDesc(e,t){var n=e.getDefaultAccess()||{},r=e.getAccessMode();this.setState({owner:r&&r.isOwner(),admin:r&&r.isAdmin(),sharer:r&&(r.isAdmin()||r.isSharer()),muted:r&&r.isMuted(),fullName:e.public?e.public.fn:void 0,avatar:N(e.public?e.public.photo:null),private:e.private?e.private.comment:null,address:e.name,groupTopic:"grp"==e.getType(),showMemberPanel:!1,access:r?r.getMode():void 0,modeGiven:r?r.getGiven():void 0,modeWant:r?r.getWant():void 0,auth:n.auth,anon:n.anon}),"grp"===e.getType()&&r&&r.isOwner()&&e.getMeta(e.startMetaQuery().withTags().build())}onMetaDesc(e){var t=this.props.tinode.getTopic(this.props.topic);t&&(this.resetDesc(t,this.props),this.previousMetaDesc&&this.previousMetaDesc!=this.onMetaDesc&&this.previousMetaDesc(e))}onSubsUpdated(){var e=this.props.tinode.getTopic(this.props.topic);e&&(this.resetSubs(e,this.props),this.previousSubsUpdated&&this.previousSubsUpdated!=this.onSubsUpdated&&this.previousSubsUpdated())}onTagsUpdated(e){this.setState({tags:e}),this.previousTagsUpdated&&this.previousTagsUpdated!=this.onTagsUpdated&&this.previousTagsUpdated()}handleFullNameUpdate(e){this.state.fullName!==e&&(this.setState({fullName:e}),this.props.onTopicDescUpdate(this.props.topic,H(e,this.state.avatar),null))}handlePrivateUpdate(e){this.state.priv!==e&&(this.setState({private:e}),this.props.onTopicDescUpdate(this.props.topic,null,e))}handleImageChanged(e){this.setState({avatar:e}),this.props.onTopicDescUpdate(this.props.topic,H(this.state.fullName,e),null)}handleMuted(e,t){this.setState({muted:t}),this.props.onChangePermissions(this.props.topic,t?"-P":"+P")}handlePermissionsChanged(e){switch(this.state.showPermissionEditorFor){case"auth":this.props.onTopicDescUpdate(this.props.topic,null,null,{auth:e});break;case"anon":this.props.onTopicDescUpdate(this.props.topic,null,null,{anon:e});break;case"mode":case"want":this.props.onChangePermissions(this.props.topic,e);break;case"given":this.props.onChangePermissions(this.props.topic,e,this.props.topic);break;case"user":this.props.onChangePermissions(this.props.topic,e,this.state.userPermissionsEdited)}this.setState({showPermissionEditorFor:void 0})}handleLaunchPermissionsEditor(e,t){var n,r,i,a,o,s,l;switch(e){case"mode":n=this.state.access;break;case"want":n=this.state.modeWant,r=this.state.modeGiven,i=this.state.groupTopic?"O":"ASDO",a="Requested",o="Granted";break;case"given":n=this.state.modeGiven2,r=this.state.modeWant2,i=this.state.groupTopic?this.state.owner?"":"O":"ASDO",a="Granted",o="Requested";break;case"auth":n=this.state.auth,i="O";break;case"anon":n=this.state.anon,i="O";break;case"user":var c=this.props.tinode.getTopic(this.props.topic);if(!c)return;var u=c.subscriber(t);if(!u||!u.acs)return;n=u.acs.getGiven(),r=u.acs.getWant(),i=this.state.owner?"":"O",a="Granted",o="Requested",u.public&&(s=u.public.fn,l=u.public.photo);break;default:console.log("Unknown permission editing mode '"+e+"'")}this.setState({showPermissionEditorFor:e,userPermissionsEdited:t,userPermissionsTitle:s,userPermissionsAvatar:l,editedPermissions:n,immutablePermissions:r,editedPermissionsTitle:a,immutablePermissionsTitle:o,editedPermissionsSkipped:i})}handleHidePermissionsEditor(){this.setState({showPermissionEditorFor:void 0})}handleShowAddMembers(){this.props.onInitFind(),this.setState({showMemberPanel:!0})}handleHideAddMembers(){this.setState({showMemberPanel:!1})}handleMemberUpdateRequest(e,t,n){this.props.onMemberUpdateRequest(this.props.topic,t,n),this.setState({showMemberPanel:!1})}handleLeave(){this.props.onLeaveTopic(this.props.topic)}handleMemberSelected(e){this.setState({selectedContact:e})}handleMoreInfo(e){this.setState({moreInfoExpanded:e})}handleTagsUpdated(e){K(this.state.tags.slice(0),e.slice(0))||this.props.onTopicTagsUpdate(this.props.topic,e)}handleContextMenu(e){var t=this,n=this.props.tinode.getTopic(this.props.topic);if(n){var r=n.subscriber(e.topicName);if(r&&r.acs){var i=[{title:"Edit permissions",handler:function(){t.handleLaunchPermissionsEditor("user",e.topicName)}},"member_delete",r.acs.isMuted()?"member_unmute":"member_mute",r.acs.isJoiner()?"member_block":"member_unblock"];this.props.showContextMenu({topicName:this.props.topic,x:e.x,y:e.y,user:e.topicName},i)}}}render(){return r.createElement("div",{id:"info-view"},r.createElement("div",{className:"caption-panel",id:"info-caption-panel"},r.createElement("div",{className:"panel-title",id:"info-title"},"Info"),r.createElement("div",null,r.createElement($,{onCancel:this.props.onCancel}))),this.props.displayMobile?r.createElement(he,{level:this.props.errorLevel,text:this.props.errorText,onClearError:this.props.onError}):null,this.state.showMemberPanel?r.createElement(we,{members:this.state.contactList,requiredMember:this.props.myUserId,myUserId:this.props.myUserId,contacts:this.props.searchableContacts,onCancel:this.handleHideAddMembers,onSubmit:this.handleMemberUpdateRequest}):this.state.showPermissionEditorFor?r.createElement(te,{mode:this.state.editedPermissions,compare:this.state.immutablePermissions,skip:this.state.editedPermissionsSkipped,modeTitle:this.state.editedPermissionsTitle,compareTitle:this.state.immutablePermissionsTitle,userTitle:this.state.userPermissionsTitle,item:this.state.userPermissionsEdited,userAvatar:this.state.userPermissionsAvatar,skip:this.state.editedPermissionsSkipped,onSubmit:this.handlePermissionsChanged,onCancel:this.handleHidePermissionsEditor}):r.createElement("div",{id:"info-view-content",className:"scrollable-panel"},r.createElement("div",{className:"panel-form-row"},r.createElement("div",{className:"panel-form-column"},r.createElement("div",null,r.createElement("label",{className:"small"},"Name")),r.createElement("div",null,r.createElement(J,{placeholder:"Group name",readOnly:!this.state.owner,text:this.state.fullName,onFinished:this.handleFullNameUpdate})),r.createElement("div",null,r.createElement("label",{className:"small"},"Private comment")),r.createElement("div",null,r.createElement(J,{placeholder:"Visible to you only",text:this.state.private,onFinished:this.handlePrivateUpdate}))),r.createElement(se,{avatar:this.state.avatar,readOnly:!this.state.owner,uid:this.props.topic,title:this.state.fullName,onImageChanged:this.handleImageChanged,onError:this.props.onError})),r.createElement("div",{className:"hr"}),r.createElement("div",{className:"panel-form-column"},r.createElement("div",{className:"panel-form-row"},r.createElement("label",null,"Muted:"),r.createElement(ee,{name:"P",checked:this.state.muted,onChange:this.handleMuted})),r.createElement(Q,{title:"More",open:this.state.moreInfoExpanded,onToggle:this.handleMoreInfo}),this.state.moreInfoExpanded?r.createElement("div",{className:"panel-form-column"},r.createElement("div",{className:"panel-form-row"},r.createElement("label",null,"Address:"),r.createElement("tt",null,this.state.address)),this.state.groupTopic?r.createElement("div",{className:"panel-form-row"},r.createElement("label",null,"Your permissions:"),r.createElement("tt",{className:"clickable",onClick:this.handleLaunchPermissionsEditor.bind(this,"want")},this.state.access)):r.createElement("div",null,r.createElement("div",null,r.createElement("label",{className:"small"},"Permissions:")),r.createElement("div",{className:"quoted"},r.createElement("div",null,"Yours: ",r.createElement("tt",{className:"clickable",onClick:this.handleLaunchPermissionsEditor.bind(this,"want")},this.state.access)),r.createElement("div",null,this.state.fullName,"′s: ",r.createElement("tt",{className:"clickable",onClick:this.handleLaunchPermissionsEditor.bind(this,"given")},this.state.modeGiven2)))),this.state.sharer&&(this.state.auth||this.state.anon)?r.createElement("div",null,r.createElement("div",null,r.createElement("label",{className:"small"},"Default access mode:")),r.createElement("div",{className:"quoted"},r.createElement("div",null,"Auth: ",this.state.admin?r.createElement("tt",{className:"clickable",onClick:this.handleLaunchPermissionsEditor.bind(this,"auth")},this.state.auth):r.createElement("tt",null,this.state.auth)),r.createElement("div",null,"Anon: ",this.state.admin?r.createElement("tt",{className:"clickable",onClick:this.handleLaunchPermissionsEditor.bind(this,"anon")},this.state.anon):r.createElement("tt",null,this.state.anon)))):null):null),r.createElement("div",{className:"hr"}),this.state.owner?r.createElement(me,{title:"Tags",tags:this.state.tags,activated:!1,onSubmit:this.handleTagsUpdated}):null,this.state.owner?r.createElement("div",{className:"hr"}):null,this.state.groupTopic?r.createElement("div",{className:"panel-form-column"},r.createElement("div",{className:"panel-form-row"},r.createElement("label",{className:"small"},"Group members:")),r.createElement("div",{className:"panel-form-row"},this.state.sharer?r.createElement("a",{href:"javascript:;",className:"flat-button",onClick:this.handleShowAddMembers},r.createElement("i",{className:"material-icons"},"person_add")," Add members"):null,this.state.owner?null:r.createElement("a",{href:"javascript:;",className:"red flat-button",onClick:this.handleLeave},r.createElement("i",{className:"material-icons"},"exit_to_app")," Leave")),r.createElement(be,{contacts:this.state.contactList,myUserId:this.props.myUserId,emptyListMessage:"No members",topicSelected:this.state.selectedContact,showOnline:!1,showUnread:!1,showMode:!0,noScroll:!0,onTopicSelected:this.handleMemberSelected,showContextMenu:!!this.state.admin&&this.handleContextMenu})):r.createElement("div",{className:"panel-form-row"},r.createElement("a",{href:"javascript:;",className:"red flat-button",onClick:this.handleLeave},r.createElement("i",{className:"material-icons"},"exit_to_app")," Leave"))))}}class xe extends r.Component{constructor(e){super(e),this.state={progress:0},e.uploader&&(e.uploader.onProgress=this.handleProgress.bind(this)),this.handlePreviewImage=this.handlePreviewImage.bind(this),this.handleContextClick=this.handleContextClick.bind(this),this.handleCancelUpload=this.handleCancelUpload.bind(this)}handlePreviewImage(e){e.preventDefault(),this.props.onImagePreview({url:e.target.src,filename:e.target.title,width:e.target.dataset.width,height:e.target.dataset.height,size:e.target.dataset.size,type:e.target.dataset.mime})}handleContextClick(e){e.preventDefault(),e.stopPropagation(),this.props.showContextMenu({seq:this.props.seq,y:e.pageY,x:e.pageX})}handleProgress(e){this.setState({progress:e})}handleCancelUpload(){this.props.uploader.cancel()}render(){var e=0,t=this.props.sequence+" "+(this.props.response?"left":"right"),n="single"==this.props.sequence||"last"==this.props.sequence?"bubble tip":"bubble",i=this.props.userAvatar||!0,a=this.props.userFrom&&this.props.response&&("single"==this.props.sequence||"last"==this.props.sequence),s=this.props.content,l=[];return this.props.mimeType==o.getContentType()?(o.attachments(s,function(e,t){l.push(r.createElement(De,{tinode:this.props.tinode,downloadUrl:o.getDownloadUrl(e),filename:e.name,uploader:o.isUploading(e),mimetype:e.mime,size:o.getEntitySize(e),progress:this.state.progress,onCancelUpload:this.handleCancelUpload,onError:this.props.onError,key:t}))},this),s=r.createElement("span",null,o.format(s,function(t,n,i){e+=1;var a=o.tagName(t);if(a){var s=o.attrValue(t,n)||{};if(s.key=e,"IM"==t){var l=D(n.width,n.height,Math.min(this.props.viewportWidth-4*b,36*b),24*b,!1);s.className="inline-image",s.style=l?{width:l.dstWidth+"px",height:l.dstHeight+"px"}:null,s.onClick=this.handlePreviewImage}return r.createElement(a,s,i)}return i},this))):"string"!=typeof s&&(s=r.createElement("span",null,r.createElement("i",{className:"material-icons"},"error_outline")," ",r.createElement("i",null,"invalid content"))),r.createElement("li",{className:t},this.props.userFrom&&this.props.response?r.createElement("div",{className:"avatar-box"},a?r.createElement(X,{topic:this.props.userFrom,title:this.props.userName,avatar:i}):null):null,r.createElement("div",null,r.createElement("div",{className:n},r.createElement("div",{className:"message-content"},s,l,r.createElement(Pe,{timestamp:this.props.timestamp,received:this.props.received})),r.createElement("span",{className:"menuTrigger"},r.createElement("a",{href:"javascript:;",onClick:this.handleContextClick},r.createElement("i",{className:"material-icons"},"expand_more")))),a?r.createElement("div",{className:"author"},this.props.userName):null))}}class Pe extends r.PureComponent{render(){var e=this.props.received<=a.MESSAGE_STATUS_SENDING?"sending ...":x(this.props.timestamp),t=null;return this.props.received<=a.MESSAGE_STATUS_SENDING?t=r.createElement("i",{className:"material-icons small"},"access_time"):this.props.received==a.MESSAGE_STATUS_SENT?t=r.createElement("i",{className:"material-icons small"},"done"):this.props.received==a.MESSAGE_STATUS_RECEIVED?t=r.createElement("i",{className:"material-icons small"},"done_all"):this.props.received==a.MESSAGE_STATUS_READ&&(t=r.createElement("i",{className:"material-icons small blue"},"done_all")),r.createElement("span",{className:"timestamp"},e," ",t)}}class Ne extends r.PureComponent{render(){return r.createElement("div",{className:"uploader"},r.createElement("div",null,r.createElement("span",{style:{width:100*this.props.progress+"%"}})),this.props.progress<.999?r.createElement("a",{href:"javascript:;",onClick:this.props.onCancel},r.createElement("i",{className:"material-icons"},"close")," cancel"):r.createElement("span",null,"finishing..."))}}class De extends r.Component{constructor(e){super(e),this.state={downloader:null,progress:0},this.downloadFile=this.downloadFile.bind(this),this.handleCancel=this.handleCancel.bind(this)}downloadFile(e,t,n){var r=this.props.tinode.getLargeFileHelper();this.setState({downloader:r}),r.download(e,t,n,e=>{this.setState({progress:e/this.props.size})}).then(()=>{this.setState({downloader:null,progress:0})}).catch(e=>{e&&this.props.onError("Error downloading file: "+e.message,"err"),this.setState({downloader:null,progress:0})})}handleCancel(){this.props.uploader?this.props.onCancelUpload():this.state.downloader&&this.state.downloader.cancel()}render(){let e=this.props.filename||"file_attachment";e.length>36&&(e=e.substr(0,16)+"..."+e.substr(-16));let t,n,i=this.props.size>0?r.createElement("span",{className:"small gray"},"(",P(this.props.size),")"):null;return this.props.uploader||this.state.downloader||/^(?:(?:[a-z]+:)?\/\/)/i.test(this.props.downloadUrl)?(t=this.props.downloadUrl,n=null):(t="javascript:;",n=(e=>{this.downloadFile(this.props.downloadUrl,this.props.filename,this.props.mimetype)})),r.createElement("div",{className:"attachment"},r.createElement("div",null,r.createElement("i",{className:"material-icons big gray"},"insert_drive_file")),r.createElement("div",{className:"flex-column"},r.createElement("div",null,e," ",i),this.props.uploader||this.state.downloader?r.createElement(Ne,{progress:this.props.uploader?this.props.progress:this.state.progress,onCancel:this.handleCancel}):r.createElement("div",null,r.createElement("a",{href:t,download:this.props.filename,onClick:n},r.createElement("i",{className:"material-icons"},"file_download")," save"))))}}const Me="Not found";class Ae extends r.Component{constructor(e){super(e),this.state={messages:[],onlineSubs:[],topic:"",title:"",avatar:null,scrollPosition:0,readOnly:!e.acs||!e.acs.isWriter(),writeOnly:!e.acs||!e.acs.isReader(),typingIndicator:!1,imagePreview:null},this.propsChange=this.propsChange.bind(this),this.leave=this.leave.bind(this),this.handleScrollReference=this.handleScrollReference.bind(this),this.fetchMoreMessages=this.fetchMoreMessages.bind(this),this.handleDescChange=this.handleDescChange.bind(this),this.handleSubsUpdated=this.handleSubsUpdated.bind(this),this.handleNewMessage=this.handleNewMessage.bind(this),this.handleAllMessagesReceived=this.handleAllMessagesReceived.bind(this),this.handleInfoReceipt=this.handleInfoReceipt.bind(this),this.handleImagePreview=this.handleImagePreview.bind(this),this.handleCloseImagePreview=this.handleCloseImagePreview.bind(this),this.handleContextClick=this.handleContextClick.bind(this),this.handleShowContextMenuMessage=this.handleShowContextMenuMessage.bind(this),this.handleBackNavigation=this.handleBackNavigation.bind(this)}componentDidUpdate(e,t){!this.messagesScroller||t.title==this.state.title&&t.messages.length==this.state.messages.length||(this.messagesScroller.scrollTop=this.messagesScroller.scrollHeight-this.state.scrollPosition)}componentDidMount(){this.propsChange(this.props),this.messagesScroller&&this.messagesScroller.addEventListener("scroll",this.fetchMoreMessages)}componentWillUnmount(){this.leave(),this.messagesScroller&&this.messagesScroller.removeEventListener("scroll",this.fetchMoreMessages)}UNSAFE_componentWillReceiveProps(e){this.propsChange(e)}propsChange(e){if(!e||!e.topic)return this.setState({messages:[],onlineSubs:[],topic:null}),void this.leave();if(!e.connected)return void this.setState({onlineSubs:[]});let t=this.props.tinode.getTopic(e.topic);if(!t)return;let n=a.isNewGroupTopicName(e.topic),r=!this.props.connected&&e.connected;if(e.topic!=this.state.topic){let n=[],i=[];t.onData=this.handleNewMessage,t.onAllMessagesReceived=this.handleAllMessagesReceived,t.onInfo=this.handleInfoReceipt,t.onMetaDesc=this.handleDescChange,t.onSubsUpdated=this.handleSubsUpdated,t.onPres=this.handleSubsUpdated,this.leave(),this.handleDescChange(t),t.subscribers(e=>{e.online&&e.user!=this.props.myUserId&&i.push(e)}),t.messages(function(e){e.deleted||(n=n.concat(e))}),this.setState({messages:n,onlineSubs:i,topic:e.topic,imagePreview:null,scrollPosition:0}),r=!0,this.props.readTimerHandler(null)}if(this.setState({readOnly:!e.acs||!e.acs.isWriter(),writeOnly:!e.acs||!e.acs.isReader()}),!t.isSubscribed()&&r){let r=t.startMetaQuery().withLaterDesc().withLaterSub().withLaterData(_).withLaterDel(),i=n?e.newGroupTopicParams:void 0;this.setState({fetchingMessages:!0}),t.subscribe(r.build(),i).then(t=>{this.setState({topic:t.topic}),this.props.onNewTopicCreated(e.topic,t.topic)}).catch(e=>{this.props.onError(e.message,"err"),this.setState({title:Me,avatar:null,readOnly:!0,writeOnly:!0,fetchingMessages:!1})})}}leave(){if(!this.state.topic)return;let e=this.props.tinode.getTopic(this.state.topic);e&&e.isSubscribed()&&e.leave(!1).finally(()=>{this.setState({fetchingMessages:!1}),e.onData=void 0,e.onAllMessagesReceived=void 0,e.onInfo=void 0,e.onMetaDesc=void 0,e.onSubsUpdated=void 0,e.onPres=void 0})}handleScrollReference(e){e&&(e.addEventListener("scroll",this.fetchMoreMessages),this.messagesScroller=e)}fetchMoreMessages(e){if(e.target.scrollTop<=0){let t={scrollPosition:e.target.scrollHeight-e.target.scrollTop};this.setState((e,n)=>{if(!e.fetchingMessages){var r=this.props.tinode.getTopic(this.state.topic);r&&r.isSubscribed()&&r.msgHasMoreMessages()&&(t.fetchingMessages=!0,r.getMessagesPage(_).catch(e=>{this.setState({fetchingMessages:!1}),this.props.onError(e.message,"err")}))}return t})}}handleDescChange(e){e.public?this.setState({title:e.public.fn,avatar:N(e.public.photo)}):this.setState({title:Me,avatar:null}),e.acs&&this.setState({readOnly:!e.acs.isWriter(),writeOnly:!e.acs.isReader()})}handleSubsUpdated(){if(this.state.topic){var e=[];this.props.tinode.getTopic(this.state.topic).subscribers(t=>{t.online&&t.user!=this.props.myUserId&&e.push(t)}),this.setState({onlineSubs:e})}}handleNewMessage(e){var t=this.props.tinode.getTopic(this.state.topic),n={messages:[]};if(t.messages(function(e){e.deleted||(n.messages=n.messages.concat(e))}),e&&!e.deleted){t.isNewMessage(e.seq)&&(n.scrollPosition=0),t.msgStatus(e)>=a.MESSAGE_STATUS_SENT&&this.props.readTimerHandler(()=>{t.noteRead(e.seq)}),this.props.onData(e)}this.setState(n)}handleAllMessagesReceived(e){this.setState({fetchingMessages:!1})}handleInfoReceipt(e){switch(e.what){case"kp":clearTimeout(this.keyPressTimer);var t=this;this.keyPressTimer=setTimeout(function(){t.setState({typingIndicator:!1})},f+1e3),this.state.typingIndicator||this.setState({typingIndicator:!0});break;case"read":case"recv":this.forceUpdate();break;default:console.log("Other change in topic: ",e.what)}}handleImagePreview(e){this.setState({imagePreview:e})}handleCloseImagePreview(){this.setState({imagePreview:null})}handleContextClick(e){e.preventDefault(),e.stopPropagation(),this.props.showContextMenu({topicName:this.state.topic,y:e.pageY,x:e.pageX})}handleShowContextMenuMessage(e){e.topicName=this.state.topic;var t=["message_delete"],n=this.props.tinode.getTopic(e.topicName);if(n){var r=n.getAccessMode();r&&r.isDeleter()&&t.push("message_delete_hard")}this.props.showContextMenu(e,t)}handleBackNavigation(){this.props.onHideMessagesView()}render(){var e=null;if(this.state.topic){for(var t=[],n=this.props.tinode.getTopic(this.state.topic),i="grp"==n.getType(),o=null,s=0;s<this.state.messages.length;s++){var l=this.state.messages[s],c=null;s+1<this.state.messages.length&&(c=this.state.messages[s+1].from);var u="single";l.from==o?u=l.from==c?"middle":"last":l.from==c&&(u="first"),o=l.from;var d,p,h,f,m=!(l.from==this.props.myUserId),g=n.msgStatus(l);if(i){var v=n.userDesc(l.from);v&&v.public&&(d=v.public.fn,p=N(v.public.photo)),h=l.from,f="chat-box group"}else f="chat-box";t.push(r.createElement(xe,{tinode:this.props.tinode,content:l.content,mimeType:l.head?l.head.mime:null,timestamp:l.ts,response:m,seq:l.seq,userFrom:h,userName:d,userAvatar:p,sequence:u,received:g,uploader:l._uploader,viewportWidth:this.props.viewportWidth,showContextMenu:this.handleShowContextMenuMessage,onImagePreview:this.handleImagePreview,onError:this.props.onError,key:l.seq}))}let w=null,_=this.props.tinode.getMeTopic().getContact(this.state.topic);_&&"p2p"==a.topicType(_.topic)&&(_.online?w="online now":_.seen&&(w="Last active: "+x(_.seen.when)));var y=this.state.avatar||!0,b=this.props.online?"online"+(this.state.typingIndicator?" typing":""):"offline";e=r.createElement("div",{id:"topic-view",className:this.props.hideSelf?"nodisplay":null},r.createElement("div",{id:"topic-caption-panel",className:"caption-panel"},this.props.displayMobile?r.createElement("a",{href:"javascript:;",id:"hide-message-view",onClick:this.handleBackNavigation},r.createElement("i",{className:"material-icons"},"arrow_back")):null,r.createElement("div",{className:"avatar-box"},r.createElement(X,{avatar:y,topic:this.state.topic,title:this.state.title}),r.createElement("span",{className:b})),r.createElement("div",{id:"topic-title-group"},r.createElement("div",{id:"topic-title",className:"panel-title"},this.state.title),r.createElement("div",{id:"topic-last-seen"},w)),i?r.createElement(ie,{subscribers:this.state.onlineSubs}):r.createElement("div",{id:"topic-users"}),r.createElement("div",null,r.createElement("a",{href:"javascript:;",onClick:this.handleContextClick},r.createElement("i",{className:"material-icons"},"more_vert")))),this.props.displayMobile?r.createElement(he,{level:this.props.errorLevel,text:this.props.errorText,onClearError:this.props.onError}):null,r.createElement(Y,{show:this.state.fetchingMessages}),r.createElement("div",{id:"messages-container"},r.createElement("div",{id:"messages-panel",ref:this.handleScrollReference},r.createElement("ul",{id:"scroller",className:f},t)),this.state.writeOnly?r.createElement("div",{id:"write-only-background"},r.createElement("div",{id:"write-only-note"},"no access to messages")):null),r.createElement(Ie,{tinode:this.props.tinode,topic:this.props.topic,disabled:this.state.readOnly,sendMessage:this.props.sendMessage,onError:this.props.onError}),this.state.imagePreview?r.createElement(Re,{content:this.state.imagePreview,onClose:this.handleCloseImagePreview}):null)}else e=r.createElement(Oe,{hideSelf:this.props.hideSelf,serverVersion:this.props.serverVersion,serverAddress:this.props.serverAddress});return e}}class Ie extends r.PureComponent{constructor(e){super(e),this.state={message:"",keypressTimestamp:(new Date).getTime()-f-1},this.handlePasteEvent=this.handlePasteEvent.bind(this),this.handleAttachImage=this.handleAttachImage.bind(this),this.handleAttachFile=this.handleAttachFile.bind(this),this.handleSend=this.handleSend.bind(this),this.handleKeyPress=this.handleKeyPress.bind(this),this.handleMessageTyping=this.handleMessageTyping.bind(this)}componentDidMount(){this.pasteFile.addEventListener("paste",this.handlePasteEvent,!1)}componentWillUnmount(){this.pasteFile.removeEventListener("paste",this.handlePasteEvent,!1)}handlePasteEvent(e){this.props.disabled||function(e,t,n,r){var i=(e.clipboardData||e.originalEvent.clipboardData||{}).items;for(var a in i){var o=i[a];if("file"===o.kind){var s=o.getAsFile();if(!s){console.log("Failed to get file object from pasted file item",o.kind,o.type);continue}return s.type&&"image"==s.type.split("/")[0]?s.size>E||k.indexOf(s.type)<0?O(s,T,T,!1,t,r):R(s,t,r):U(s,n),!0}}return!1}(e,(e,t,n,r,i)=>{this.props.sendMessage(o.insertImage(null,0,t,e,n,r,i))},(e,t,n)=>{this.props.sendMessage(o.attachFile(null,e,t,n))},this.props.onError)&&e.preventDefault()}handleAttachImage(e){if(e.target.files&&e.target.files.length>0){let t=e.target.files[0];t.size>E||k.indexOf(t.type)<0?O(t,T,T,!1,(e,t,n,r,i)=>{this.props.sendMessage(o.insertImage(null,0,t,e,n,r,i))},e=>{this.props.onError(e,"err")}):R(t,(e,t,n,r,i)=>{this.props.sendMessage(o.insertImage(null,0,t,e,n,r,i))},e=>{this.props.onError(e,"err")})}e.target.value=""}handleAttachFile(e){if(e.target.files&&e.target.files.length>0){var t=e.target.files[0];if(t.size>S)this.props.onError("The file size "+P(t.size)+" exceeds the "+P(S)+" limit.","err");else if(t.size>E){let e=this.props.tinode.getLargeFileHelper();if(!e)return void this.props.onError("Cannot initiate file upload.");let n=e.upload(t),r=o.attachFile(null,t.type,null,t.name,t.size,n);this.props.sendMessage(r,n,e)}else U(t,(e,t,n)=>{this.props.sendMessage(o.attachFile(null,e,t,n))},this.props.onError)}e.target.value=""}handleSend(){this.state.message.trim()&&(this.props.sendMessage(this.state.message.trim()),this.setState({message:""}))}handleKeyPress(e){"Enter"===e.key&&(e.shiftKey||(e.preventDefault(),e.stopPropagation(),this.handleSend()))}handleMessageTyping(e){var t={message:e.target.value},n=(new Date).getTime();if(n-this.state.keypressTimestamp>f){var r=this.props.tinode.getTopic(this.props.topic);r.isSubscribed()&&r.noteKeyPress(),t.keypressTimestamp=n}this.setState(t)}render(){var e=this.props.disabled?"Messaging disabled":"New message",t=this;return r.createElement("div",{id:"send-message-panel"},this.props.disabled?r.createElement("i",{className:"material-icons disabled"},"photo"):r.createElement("a",{href:"javascript:;",onClick:function(e){t.attachImage.click()},title:"Add image"},r.createElement("i",{className:"material-icons secondary"},"photo")),this.props.disabled?r.createElement("i",{className:"material-icons disabled"},"attach_file"):r.createElement("a",{href:"javascript:;",onClick:function(e){t.attachFile.click()},title:"Attach file"},r.createElement("i",{className:"material-icons secondary"},"attach_file")),r.createElement("textarea",{id:"sendMessage",placeholder:e,disabled:this.props.disabled,value:this.state.message,onChange:this.handleMessageTyping,onKeyPress:this.handleKeyPress,ref:function(e){t.pasteFile=e},autoFocus:!0}),this.props.disabled?r.createElement("i",{className:"material-icons disabled"},"send"):r.createElement("a",{href:"javascript:;",onClick:this.handleSend,title:"Send"},r.createElement("i",{className:"material-icons"},"send")),r.createElement("input",{type:"file",ref:function(e){t.attachFile=e},onChange:this.handleAttachFile,style:{display:"none"}}),r.createElement("input",{type:"file",ref:function(e){t.attachImage=e},accept:"image/*",onChange:this.handleAttachImage,style:{display:"none"}}))}}class Oe extends r.PureComponent{render(){var e=c+" ("+a.getLibrary()+")";return r.createElement("div",{id:"dummy-view",className:this.props.hideSelf?"nodisplay":null},r.createElement("div",null,r.createElement("a",{href:"https://github.com/tinode/chat/"},r.createElement("img",{id:"logo",alt:"logo",src:"img/logo.svg"}),r.createElement("h2",null,"Tinode Web")),r.createElement("p",null,"Client: ",e),r.createElement("p",null,"Server: ",this.props.serverVersion," (",this.props.serverAddress,")")))}}class Re extends r.PureComponent{constructor(e){super(e),this.state={}}componentDidMount(){this.setState({width:this.container.clientWidth,height:this.container.clientHeight})}render(){if(!this.props.content)return null;var e=this,t=D(this.props.content.width,this.props.content.height,this.state.width,this.state.height,!1),n=t?{width:t.dstWidth+"px",height:t.dstHeight+"px"}:this.props.content.width>this.props.content.height?{width:"100%"}:{height:"100%"};n.maxWidth="100%",n.maxHeight="100%";var i=this.props.content.filename,a=this.props.content.width/b|0;return i.length>a&&(i=i.slice(0,a-2)+"..."+i.slice(2-a)),r.createElement("div",{id:"image-preview",onClick:this.props.onClose},r.createElement("div",{id:"image-preview-caption-panel"},r.createElement("a",{href:"javascript:;",download:this.props.content.filename},r.createElement("i",{className:"material-icons"},"file_download")," download"),r.createElement("a",{href:"javascript:;",onClick:this.props.onClose},r.createElement("i",{className:"material-icons gray"},"close"))),r.createElement("div",{id:"image-preview-container",ref:function(t){e.container=t}},r.createElement("img",{src:this.props.content.url,style:n})),r.createElement("div",{id:"image-preview-footer"},r.createElement("div",null,r.createElement("div",null,r.createElement("b",null,"File name"),":"),r.createElement("div",null,r.createElement("span",{title:this.props.content.filename},i))),r.createElement("div",null,r.createElement("div",null,r.createElement("b",null,"Content type"),":"),r.createElement("div",null,this.props.content.type)),r.createElement("div",null,r.createElement("div",null,r.createElement("b",null,"Size"),":"),r.createElement("div",null,this.props.content.width," × ",this.props.content.height," px; ",P(this.props.content.size)))))}}class Ue extends r.Component{constructor(e){super(e),this.state=this.getBlankState(),this.handleResize=this.handleResize.bind(this),this.handleHashRoute=this.handleHashRoute.bind(this),this.handleOnline=this.handleOnline.bind(this),this.handleAppVisibility=this.handleAppVisibility.bind(this),this.handleReadTimer=this.handleReadTimer.bind(this),this.handleVisibilityEvent=this.handleVisibilityEvent.bind(this),this.handleError=this.handleError.bind(this),this.handleLoginRequest=this.handleLoginRequest.bind(this),this.handleConnected=this.handleConnected.bind(this),this.doLogin=this.doLogin.bind(this),this.handleCredentialsRequest=this.handleCredentialsRequest.bind(this),this.handleLoginSuccessful=this.handleLoginSuccessful.bind(this),this.handleDisconnect=this.handleDisconnect.bind(this),this.tnMeMetaDesc=this.tnMeMetaDesc.bind(this),this.tnMeContactUpdate=this.tnMeContactUpdate.bind(this),this.tnMeSubsUpdated=this.tnMeSubsUpdated.bind(this),this.resetContactList=this.resetContactList.bind(this),this.tnData=this.tnData.bind(this),this.tnInitFind=this.tnInitFind.bind(this),this.tnFndSubsUpdated=this.tnFndSubsUpdated.bind(this),this.handleSearchContacts=this.handleSearchContacts.bind(this),this.handleTopicSelected=this.handleTopicSelected.bind(this),this.handleHideMessagesView=this.handleHideMessagesView.bind(this),this.handleSendMessage=this.handleSendMessage.bind(this),this.handleNewAccount=this.handleNewAccount.bind(this),this.handleNewAccountRequest=this.handleNewAccountRequest.bind(this),this.handleUpdateAccountRequest=this.handleUpdateAccountRequest.bind(this),this.handleUpdateAccountTagsRequest=this.handleUpdateAccountTagsRequest.bind(this),this.handleSettings=this.handleSettings.bind(this),this.handleGlobalSettings=this.handleGlobalSettings.bind(this),this.handleToggleMessageSounds=this.handleToggleMessageSounds.bind(this),this.initDesktopAlerts=this.initDesktopAlerts.bind(this),this.togglePushToken=this.togglePushToken.bind(this),this.requestPushToken=this.requestPushToken.bind(this),this.handleSidepanelCancel=this.handleSidepanelCancel.bind(this),this.handleNewTopic=this.handleNewTopic.bind(this),this.handleNewTopicRequest=this.handleNewTopicRequest.bind(this),this.handleNewTopicCreated=this.handleNewTopicCreated.bind(this),this.handleTopicUpdateRequest=this.handleTopicUpdateRequest.bind(this),this.handleChangePermissions=this.handleChangePermissions.bind(this),this.handleTagsUpdated=this.handleTagsUpdated.bind(this),this.handleLogout=this.handleLogout.bind(this),this.handleLeaveUnsubRequest=this.handleLeaveUnsubRequest.bind(this),this.handleDialogCancel=this.handleDialogCancel.bind(this),this.handleShowContextMenu=this.handleShowContextMenu.bind(this),this.defaultTopicContextMenu=this.defaultTopicContextMenu.bind(this),this.handleHideContextMenu=this.handleHideContextMenu.bind(this),this.handleShowInfoView=this.handleShowInfoView.bind(this),this.handleHideInfoView=this.handleHideInfoView.bind(this),this.handleMemberUpdateRequest=this.handleMemberUpdateRequest.bind(this),this.handleValidateCredentialsRequest=this.handleValidateCredentialsRequest.bind(this)}getBlankState(){let e=localStorage.getObject("settings")||{};return{connected:!1,transport:e.transport||null,serverAddress:e.serverAddress||function(){let e=d;return"object"==typeof window.location&&("file:"==window.location.protocol||"localhost"==window.location.hostname?e=u.local:window.location.hostname&&(e=window.location.hostname+(window.location.port?":"+window.location.port:""))),e}(),serverVersion:"no connection",messageSounds:!e.messageSoundsOff,desktopAlerts:e.desktopAlerts,desktopAlertsEnabled:(q()||"object"==typeof window.location&&"localhost"==window.location.hostname)&&void 0!==s&&"undefined"!=typeof navigator&&"undefined"!=typeof FIREBASE_INIT,firebaseToken:localStorage.getObject("firebase-token"),errorText:"",errorLevel:null,sidePanelSelected:"login",sidePanelTitle:null,sidePanelAvatar:null,dialogSelected:null,contextMenuVisible:!1,login:"",password:"",myUserId:null,liveConnection:navigator.onLine,topicSelected:"",topicSelectedOnline:!1,topicSelectedAcs:null,newGroupTopicParams:null,loginDisabled:!1,displayMobile:window.innerWidth<=y,showInfoPanel:!1,mobilePanel:"sidepanel",contextMenuVisible:!1,contextMenuBounds:null,contextMenuClickAt:null,contextMenuParams:null,contextMenuItems:[],chatList:[],searchResults:[],searchableContacts:[],credMethod:void 0,credCode:void 0}}componentDidMount(){if(window.addEventListener("resize",this.handleResize),window.addEventListener("online",e=>{this.handleOnline(!0)}),window.addEventListener("offline",e=>{this.handleOnline(!1)}),window.addEventListener("hashchange",this.handleHashRoute),document.addEventListener("visibilitychange",this.handleVisibilityEvent),this.setState({viewportWidth:document.documentElement.clientWidth}),this.tinode=Ue.tnSetup(this.state.serverAddress,this.state.transport),this.state.desktopAlertsEnabled)try{this.fbPush=s.initializeApp(FIREBASE_INIT,c).messaging(),this.fbPush.usePublicVapidKey(FIREBASE_INIT.messagingVapidKey),navigator.serviceWorker.register("/service-worker.js").then(e=>{this.fbPush.useServiceWorker(e),this.initDesktopAlerts(),this.state.desktopAlerts&&(this.state.firebaseToken?this.tinode.setDeviceToken(this.state.firebaseToken):this.togglePushToken(!0))}).catch(e=>{console.log("Failed to register service worker:",e)})}catch(e){this.handleError("Failed to initialize push notifications","err"),console.log("Failed to initialize push notifications",e),this.setState({desktopAlertsEnabled:!1})}let e;if(this.tinode.enableLogging(!0,!0),this.tinode.onConnect=this.handleConnected,this.tinode.onDisconnect=this.handleDisconnect,localStorage.getObject("keep-logged-in")&&(e=localStorage.getObject("auth-token")),e){e.expires=new Date(e.expires),this.tinode.setAuthToken(e),this.tinode.connect().catch(e=>{this.handleError(e.message,"err")});var t=L(window.location.hash);delete t.params.info,delete t.params.tab,t.path[0]="",F(j(t.path,t.params))}else F("");this.readTimer=null,this.readTimerCallback=null,this.handleHashRoute()}componentWillUnmount(){window.removeEventListener("resize",this.handleResize),window.removeEventListener("hashchange",this.handleHashRoute),document.removeEventListener("visibilitychange",this.handleVisibilityEvent)}static tnSetup(e,t){return new a(c,e,h,t,q())}handleResize(){var e=document.documentElement.clientWidth<=y;this.setState({viewportWidth:document.documentElement.clientWidth}),this.state.displayMobile!=e&&this.setState({displayMobile:e})}handleHashRoute(){var e=L(window.location.hash);e.path&&e.path.length>0?(["register","settings","edit","cred","newtpk","contacts",""].includes(e.path[0])?this.setState({sidePanelSelected:e.path[0]}):console.log("Unknown sidepanel view",e.path[0]),e.path.length>1&&e.path[1]!=this.state.topicSelected&&this.setState({topicSelected:a.topicType(e.path[1])?e.path[1]:null})):this.setState({sidePanelSelected:""}),e.params.method&&this.setState({credMethod:e.params.method}),e.params.code&&this.setState({credCode:e.params.code}),this.setState({showInfoPanel:e.params.info,newTopicTabSelected:e.params.tab})}handleOnline(e){e?this.handleError("",null):this.handleError("No connection","warn"),this.setState({liveConnection:e})}handleAppVisibility(e,t){clearTimeout(this.readTimer),this.readTimerCallback=t,this.readTimer=e&&t?setTimeout(t,g):null}handleReadTimer(e){this.handleAppVisibility(!document.hidden,e)}handleVisibilityEvent(){this.handleAppVisibility(!document.hidden,this.readTimerCallback)}handleError(e,t){this.setState({errorText:e,errorLevel:t})}handleLoginRequest(e,t){this.setState({loginDisabled:!0,login:e,password:t}),this.handleError("",null),this.tinode.isConnected()?this.doLogin(e,t,{meth:this.state.credMethod,resp:this.state.credCode}):this.tinode.connect().catch(e=>{this.setState({loginDisabled:!1}),this.handleError(e.message,"err")})}handleConnected(){var e=this.tinode.getServerInfo();this.setState({serverVersion:e.ver+" "+(e.build?e.build:"none")+"; "}),this.doLogin(this.state.login,this.state.password,{meth:this.state.credMethod,resp:this.state.credCode})}doLogin(e,t,n){if(this.tinode.isAuthenticated())return void F("");n=a.credential(n);let r=null,i=this.tinode.getAuthToken();e&&t?(this.setState({password:null}),r=this.tinode.loginBasic(e,t,n)):i&&(r=this.tinode.loginToken(i.token,n)),r?r.then(e=>{e.code>=300&&"validate credentials"===e.text?(n&&this.handleError("Code does not match","warn"),this.handleCredentialsRequest(e.params)):this.handleLoginSuccessful()}).catch(e=>{this.setState({loginDisabled:!1,credMethod:void 0,credCode:void 0}),this.handleError(e.message,"err"),localStorage.removeItem("auth-token"),F("")}):(F(""),this.setState({loginDisabled:!1}))}handleCredentialsRequest(e){var t=L(window.location.hash);t.path[0]="cred",t.params.method=e.cred[0],F(j(t.path,t.params))}handleLoginSuccessful(){this.handleError("",null),localStorage.getObject("keep-logged-in")&&localStorage.setObject("auth-token",this.tinode.getAuthToken());var e=this.tinode.getMeTopic();e.onMetaDesc=this.tnMeMetaDesc,e.onContactUpdate=this.tnMeContactUpdate,e.onSubsUpdated=this.tnMeSubsUpdated,this.setState({connected:!0,credMethod:void 0,credCode:void 0,myUserId:this.tinode.getCurrentUserID()}),e.subscribe(e.startMetaQuery().withLaterSub().withDesc().build()).catch(e=>{localStorage.removeItem("auth-token"),this.handleError(e.message,"err"),F("")}),F(z(window.location.hash,"contacts"))}handleDisconnect(e){this.setState({connected:!1,topicSelectedOnline:!1,dialogSelected:null,errorText:e&&e.message?e.message:"Disconnected",errorLevel:e&&e.message?"err":"warn",loginDisabled:!1,contextMenuVisible:!1,serverVersion:"no connection"})}tnMeMetaDesc(e){e&&e.public&&this.setState({sidePanelTitle:e.public.fn,sidePanelAvatar:N(e.public.photo)})}tnMeContactUpdate(e,t){"on"==e||"off"==e?(this.resetContactList(),this.state.topicSelected==t.topic&&this.setState({topicSelectedOnline:"on"===e})):"read"==e?this.resetContactList():"msg"==e?this.state.topicSelected!=t.topic?(this.state.messageSounds&&p.play(),this.resetContactList()):document.hidden&&this.state.messageSounds&&p.play():"recv"==e||("gone"==e||"unsub"==e?(this.state.topicSelected==t.topic&&this.handleTopicSelected(null),this.resetContactList()):"acs"==e?this.state.topicSelected==t.topic&&this.setState({topicSelectedAcs:t.acs}):"del"==e||console.log("Unsupported (yet) presence update:"+e+" in: "+t.topic))}tnMeSubsUpdated(e){this.resetContactList()}static prepareSearchableContacts(e,t){let n={};for(const t of e)"p2p"==a.topicType(t.topic)&&(n[t.topic]={user:t.topic,updated:t.updated,public:t.public,private:t.private,acs:t.acs});for(const e of t)n[e.user]||(n[e.user]=e);return Object.values(n)}resetContactList(){let e={chatList:[]};this.tinode.getMeTopic().contacts(t=>{e.chatList.push(t),this.state.topicSelected==t.topic&&(e.topicSelectedOnline=t.online,e.topicSelectedAcs=t.acs)}),e.searchableContacts=Ue.prepareSearchableContacts(e.chatList,this.state.searchResults),this.setState(e)}tnData(e){let t=this.tinode.getTopic(e.topic);t.msgStatus(e)>a.MESSAGE_STATUS_SENDING&&(clearTimeout(this.receivedTimer),this.receivedTimer=setTimeout(()=>{this.receivedTimer=void 0,t.noteRecv(e.seq)},m))}tnInitFind(){let e=this.tinode.getFndTopic();e.isSubscribed()?this.tnFndSubsUpdated():(e.onSubsUpdated=this.tnFndSubsUpdated,e.subscribe(e.startMetaQuery().withSub().withTags().build()).catch(e=>{this.handleError(e.message,"err")}))}tnFndSubsUpdated(){let e=[];this.tinode.getFndTopic().contacts(t=>{e.push(t)}),this.setState({searchResults:e,searchableContacts:Ue.prepareSearchableContacts(this.state.chatList,e)})}handleSearchContacts(e){var t=this.tinode.getFndTopic();t.setMeta({desc:{public:e}}).then(e=>t.getMeta(t.startMetaQuery().withSub().build())).catch(e=>{this.handleError(e.message,"err")})}handleTopicSelected(e,t,n,r){e?(this.setState({errorText:"",errorLevel:null,mobilePanel:"topic-view",showInfoPanel:!1}),this.state.topicSelected!=e&&(this.setState({topicSelectedOnline:n,topicSelectedAcs:r}),F(V("",e)))):(this.setState({errorText:"",errorLevel:null,mobilePanel:"sidepanel",topicSelectedOnline:!1,topicSelectedAcs:null,showInfoPanel:!1}),this.state.topicSelected&&F(V("",null)))}handleHideMessagesView(){this.setState({mobilePanel:"sidepanel"}),F(V(window.location.hash,null))}handleSendMessage(e,t,n){let r=this.tinode.getTopic(this.state.topicSelected);(e=r.createMessage(e,!1))._uploader=n,r.isSubscribed()||(t||(t=Promise.resolve()),t=t.then(()=>r.subscribe())),t&&(t=t.catch(e=>{this.handleError(e.message,"err")})),r.publishDraft(e,t).catch(e=>{this.handleError(e.message,"err")})}handleNewAccount(){F(z(window.location.hash,"register"))}handleNewAccountRequest(e,t,n,r,i){this.tinode.connect(this.state.serverAddress).then(()=>this.tinode.createAccountBasic(e,t,{public:n,tags:i,cred:a.credential(r)})).then(e=>{e.code>=300&&"validate credentials"===e.text?this.handleCredentialsRequest(e.params):this.handleLoginSuccessful(this)}).catch(e=>{this.handleError(e.message,"err")})}handleUpdateAccountRequest(e,t,n){(t||n)&&this.tinode.getMeTopic().setMeta({desc:{public:t,private:n}}).catch(e=>{this.handleError(e.message,"err")}),e&&this.tinode.updateAccountBasic(null,this.tinode.getCurrentLogin(),e).catch(e=>{this.handleError(e.message,"err")})}handleUpdateAccountTagsRequest(e){this.tinode.getFndTopic().setMeta({tags:e}).catch(e=>{this.handleError(e.message,"err")})}handleSettings(){F(z(window.location.hash,this.state.myUserId?"edit":"settings"))}handleGlobalSettings(e){let t=e.serverAddress||this.state.serverAddress,n=e.transport||this.state.transport;this.setState({serverAddress:t,transport:n,tinode:Ue.tnSetup(t,n)}),localStorage.setObject("settings",{serverAddress:t,transport:n}),F(z(window.location.hash,""))}initDesktopAlerts(){this.fbPush.onTokenRefresh(()=>{this.requestPushToken(!0)}),this.fbPush.onMessage(e=>{})}togglePushToken(e){e?this.state.firebaseToken?(this.setState({desktopAlerts:!0}),localStorage.updateObject("settings",{desktopAlerts:!0})):this.fbPush.requestPermission().then(()=>{this.requestPushToken(!0)}).catch(e=>{this.handleError(e.message,"err"),this.setState({desktopAlerts:!1,firebaseToken:null}),localStorage.updateObject("settings",{desktopAlerts:!1}),console.log("Failed to get permission to notify.",e)}):this.state.firebaseToken?this.fbPush.deleteToken(this.state.firebaseToken).catch(e=>{console.log("Unable to delete token.",e)}).finally(()=>{localStorage.updateObject("settings",{desktopAlerts:!1}),localStorage.removeItem("firebase-token"),this.setState({desktopAlerts:!1,firebaseToken:null})}):(this.setState({desktopAlerts:!1,firebaseToken:null}),localStorage.updateObject("settings",{desktopAlerts:!1}))}requestPushToken(e){this.fbPush.getToken().then(t=>{t!=this.state.firebaseToken&&(this.tinode.setDeviceToken(t,e),localStorage.setObject("firebase-token",t)),this.setState({firebaseToken:t,desktopAlerts:!0}),localStorage.updateObject("settings",{desktopAlerts:!0})}).catch(e=>{this.handleError(e.message,"err"),console.log("Failed to retrieve firebase token",e)})}handleToggleMessageSounds(e){this.setState({messageSounds:e}),localStorage.updateObject("settings",{messageSoundsOff:!e})}handleSidepanelCancel(){var e=L(window.location.hash);e.path[0]=this.state.myUserId?"contacts":"",e.params&&(delete e.params.code,delete e.params.method,delete e.params.tab),F(j(e.path,e.params)),this.setState({errorText:"",errorLevel:null})}handleNewTopic(){F(z(window.location.hash,"newtpk"))}handleNewTopicRequest(e,t,n,r){var i=e||this.tinode.newGroupTopicName();e?this.handleTopicSelected(i):this.setState({newGroupTopicParams:{desc:{public:t,private:{comment:n}},tags:r}},()=>{this.handleTopicSelected(i)})}handleNewTopicCreated(e,t){this.state.topicSelected==e&&e!=t&&this.setState({topicSelected:t},()=>{F(V("",t))})}handleTopicUpdateRequest(e,t,n,r){var i=this.tinode.getTopic(e);if(i){var a={};t&&(a.public=t),n&&(a.private={comment:n}),r&&(a.defacs=r),i.setMeta({desc:a}).catch(e=>{this.handleError(e.message,"err")})}}handleChangePermissions(e,t,n){var r=this.tinode.getTopic(e);if(r){var i=r.getAccessMode();n?(i.updateGiven(t),t=i.getGiven()):(i.updateWant(t),t=i.getWant()),r.setMeta({sub:{user:n,mode:t}}).catch(e=>{this.handleError(e.message,"err")})}}handleTagsUpdated(e,t){var n=this.tinode.getTopic(e);if(n){n.setMeta({tags:t}).catch(e=>{this.handleError(e.message,"err")})}}handleLogout(){localStorage.removeItem("auth-token"),this.tinode&&(this.tinode.onDisconnect=void 0,this.tinode.disconnect()),this.setState(this.getBlankState()),this.tinode=Ue.tnSetup(this.state.serverAddress,this.state.transport),F("")}handleLeaveUnsubRequest(e){var t=this.tinode.getTopic(e);t&&t.leave(!0).then(e=>{F(V(window.location.hash,""))}).catch(e=>{this.handleError(e.message,"err")})}handleDialogCancel(){this.setState({dialogSelected:null})}handleShowContextMenu(e,t){this.setState({contextMenuVisible:!0,contextMenuClickAt:{x:e.x,y:e.y},contextMenuParams:e,contextMenuItems:t||this.defaultTopicContextMenu(e.topicName),contextMenuBounds:i.findDOMNode(this).getBoundingClientRect()})}defaultTopicContextMenu(e){var t=!1,n=!1,r=!1,i=!1,a=this.tinode.getTopic(e);if(a&&a.isSubscribed()){r=!0;var o=a.getAccessMode();t=o&&o.isMuted(),n=o&&!o.isJoiner(),i=o&&o.isDeleter()}return[r?{title:"Info",handler:this.handleShowInfoView}:null,r?"messages_clear":null,r&&i?"messages_clear_hard":null,r?t?"topic_unmute":"topic_mute":null,r?n?"topic_unblock":"topic_block":null,"topic_delete"]}handleHideContextMenu(){this.setState({contextMenuVisible:!1,contextMenuClickAt:null,contextMenuParams:null,contextMenuBounds:null})}handleShowInfoView(){F(W(window.location.hash,"info",!0)),this.setState({showInfoPanel:!0})}handleHideInfoView(){F(B(window.location.hash,"info")),this.setState({showInfoPanel:!1})}handleMemberUpdateRequest(e,t,n){if(e){var r=this.tinode.getTopic(e);r&&(t&&t.length>0&&t.map(e=>{r.invite(e,null).catch(e=>{this.handleError(e.message,"err")})}),n&&n.length>0&&n.map(e=>{r.delSubscription(e).catch(e=>{this.handleError(e.message,"err")})}))}}handleValidateCredentialsRequest(e,t){this.setState({credMethod:e,credCode:t}),this.doLogin(null,null,{meth:e,resp:t})}render(){return r.createElement("div",{id:"app-container"},this.state.contextMenuVisible?r.createElement(G,{tinode:this.tinode,bounds:this.state.contextMenuBounds,clickAt:this.state.contextMenuClickAt,params:this.state.contextMenuParams,items:this.state.contextMenuItems,hide:this.handleHideContextMenu,onAction:this.handleContextMenuAction,onError:this.handleError}):null,r.createElement(pe,{tinode:this.tinode,connected:this.state.connected,displayMobile:this.state.displayMobile,hideSelf:this.state.displayMobile&&"sidepanel"!==this.state.mobilePanel,state:this.state.sidePanelSelected,title:this.state.sidePanelTitle,avatar:this.state.sidePanelAvatar,login:this.state.login,myUserId:this.state.myUserId,loginDisabled:this.state.loginDisabled,errorText:this.state.errorText,errorLevel:this.state.errorLevel,topicSelected:this.state.topicSelected,chatList:this.state.chatList,credMethod:this.state.credMethod,credCode:this.state.credCode,transport:this.state.transport,messageSounds:this.state.messageSounds,desktopAlerts:this.state.desktopAlerts,desktopAlertsEnabled:this.state.desktopAlertsEnabled,serverAddress:this.state.serverAddress,onGlobalSettings:this.handleGlobalSettings,onSignUp:this.handleNewAccount,onSettings:this.handleSettings,onLoginRequest:this.handleLoginRequest,onCreateAccount:this.handleNewAccountRequest,onUpdateAccount:this.handleUpdateAccountRequest,onUpdateAccountTags:this.handleUpdateAccountTagsRequest,onTogglePushNotifications:this.togglePushToken,onToggleMessageSounds:this.handleToggleMessageSounds,onTopicSelected:this.handleTopicSelected,onCreateTopic:this.handleNewTopicRequest,onNewTopic:this.handleNewTopic,onLogout:this.handleLogout,onCancel:this.handleSidepanelCancel,onError:this.handleError,onValidateCredentials:this.handleValidateCredentialsRequest,onInitFind:this.tnInitFind,searchResults:this.state.searchResults,onSearchContacts:this.handleSearchContacts,showContextMenu:this.handleShowContextMenu}),r.createElement(Ae,{tinode:this.tinode,connected:this.state.connected,online:this.state.topicSelectedOnline,acs:this.state.topicSelectedAcs,displayMobile:this.state.displayMobile,viewportWidth:this.state.viewportWidth,hideSelf:this.state.displayMobile&&("topic-view"!==this.state.mobilePanel||this.state.showInfoPanel),topic:this.state.topicSelected,myUserId:this.state.myUserId,serverVersion:this.state.serverVersion,serverAddress:this.state.serverAddress,errorText:this.state.errorText,errorLevel:this.state.errorLevel,newGroupTopicParams:this.state.newGroupTopicParams,onHideMessagesView:this.handleHideMessagesView,onData:this.tnData,onError:this.handleError,onNewTopicCreated:this.handleNewTopicCreated,readTimerHandler:this.handleReadTimer,showContextMenu:this.handleShowContextMenu,sendMessage:this.handleSendMessage}),this.state.showInfoPanel?r.createElement(Ce,{tinode:this.tinode,connected:this.state.connected,displayMobile:this.state.displayMobile,topic:this.state.topicSelected,searchableContacts:this.state.searchableContacts,myUserId:this.state.myUserId,errorText:this.state.errorText,errorLevel:this.state.errorLevel,onTopicDescUpdate:this.handleTopicUpdateRequest,onCancel:this.handleHideInfoView,onChangePermissions:this.handleChangePermissions,onMemberUpdateRequest:this.handleMemberUpdateRequest,onLeaveTopic:this.handleLeaveUnsubRequest,onAddMember:this.handleManageGroupMembers,onTopicTagsUpdate:this.handleTagsUpdated,onInitFind:this.tnInitFind,onError:this.handleError,showContextMenu:this.handleShowContextMenu}):null)}}t.exports=Ue},{"../version.json":27,"firebase/app":5,"firebase/messaging":6,react:15,"react-dom":12,"tinode-sdk":22}],27:[function(e,t,n){t.exports={version:"0.15.7-rc1"}},{}],28:[function(e,t,n){var r,i,a=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function l(e){if(r===setTimeout)return setTimeout(e,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(e){r=o}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var c,u=[],d=!1,p=-1;function h(){d&&c&&(d=!1,c.length?u=c.concat(u):p=-1,u.length&&f())}function f(){if(!d){var e=l(h);d=!0;for(var t=u.length;t;){for(c=u,u=[];++p<t;)c&&c[p].run();p=-1,t=u.length}c=null,d=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function g(){}a.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];u.push(new m(e,t)),1!==u.length||d||l(f)},m.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=g,a.addListener=g,a.once=g,a.off=g,a.removeListener=g,a.removeAllListeners=g,a.emit=g,a.prependListener=g,a.prependOnceListener=g,a.listeners=function(e){return[]},a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},{}],29:[function(e,t,n){(function(t,r){var i=e("process/browser.js").nextTick,a=Function.prototype.apply,o=Array.prototype.slice,s={},l=0;function c(e,t){this._id=e,this._clearFn=t}n.setTimeout=function(){return new c(a.call(setTimeout,window,arguments),clearTimeout)},n.setInterval=function(){return new c(a.call(setInterval,window,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(e){e.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},n.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},n.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},n._unrefActive=n.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n.setImmediate="function"==typeof t?t:function(e){var t=l++,r=!(arguments.length<2)&&o.call(arguments,1);return s[t]=!0,i(function(){s[t]&&(r?e.apply(null,r):e.call(null),n.clearImmediate(t))}),t},n.clearImmediate="function"==typeof r?r:function(e){delete s[e]}}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":28,timers:29}]},{},[25])(25)});
|